feat: v3 of UI components (#19136)

* ui playground

* add types to ui

* push avatar ignore ts and eslint errors

* feat: V3 UI avatar  (#18997)

* avatar playground

* add overflow-hidden back for loading indicator

* update lock

* feat: v3/badge  (#18999)

* badge intro

* fix text on small badge

* add dark mode warning

* feat: v3/button (#19014)

* TOC

* wip buttons

* shadows

* secondary

* semantic colours

* minimal buttons

* update disabled states

* checkbox

* dropdown v3

* load icons

* fix design sections

* fix icon gap

* fix

* remove client component from rsc

* use peer as avatar

* gif

* fix button gap - dropdown iocn

* support start icon in dropdowns

* add alert demo + v3 component + darken semantic text

* base inputs and text field

* wip input

* input field addon/suffix

* toast page

* wip select

* match designs for input and select rounded

* fix

* fix select isloading transform

* fix multi icons transition rotation

* fix group heading

* range slider demo + range slider

* range slider popover design

* v3 dialog

* fix slider thumb size

* wrap in suspense for useSearchParam difference in next14+

* base of tabs + horizontal tabs

* fix select sizing to match input 36px

* fix dark mode hover on button

* target domState class for light/dark so we work on portal elements

* fix default bg on popover

* lightmode toasts + eleveation token

* empty screen

* intro to split button concept

* mass colour updates

* intro to themes

* remove i18n from label with name

* bouncy buttons

* feat: small select

* nav item dumb component

* full demo

* settings demo

* fix tabs

* fix mt

* fix dropdown feedback from loom

* alert fixes mentioned in loom

* push font-cal

* move to fumadocs

* fix avatar

* colors table

* add typeography

* icon + spacing guide

* add border radius and shadow tables

* fix colours and border radius

* remove prose undline via fumas fork

* fix icon buttons sizes

* button group component

* fix horizontal tabs

* tab fixes

* switches

* pagination component

* show toasts components raw

* sync with airtable

* add use client

* 10px on input again

* 10px in select also

* fix input height

* fix files merge

* fix loading state for icon buttons

* fix button fab

* Enable addon to now overflow to next line in DS

* use cal font for dialog text

* add avatar square variant

* fix select padding and menu size

* fix type errors

* fix type errors

* add switch small size and fix type errors

* fix ref types on input

* update web styles

* remove addonFilled to fix type errors

* push dialog fixes

* fix checkbox display

* remove prose from alert examples

* remove prose from all our component examples

* badge rounded-lg on lg size

* update colors

* force w/h on icon buttons instead of inheriting

* remove border-focus

* remove border-focus from tailwind config

* update tokens to match new colours

* add new border subtle tokens and add to toasts

* fix lg button padding

* fix and drastically improve rtl rests

* multi select use badges

* use badge design for select pills

* fix avatar alignment

* fix tests and remove redudant ones

* fix tests and remove redudant ones

* update atoms globals css

* extract tokens.css

* extract app.css

* force flex for atoms

* add @calcom/ui/css

* revert ui playground styles abstraction

* fix input focus states

* fix focus states for buttons

* feat: v3/app work (#19233)

* globals.css for app + event types listing search

* few app wide NITS

* fix select foucs within styling

* fix formbuilder switch styles

* fix disabled state of nested inputs

* workflow fixes

* webhook form fixes

* i18n on tabs info

* booking filters + tab

* fix filters spacing

* make first item so we get correct border radius if not default

* round radio group in create event types + make button small

* profile page

* update editor br

* button nits in existing places in the app

* fix timezone select and multilist in guest form

* fix text area on public booking page

* size small event types create

* margin on routing filter

* filters improvments

* routing insights fixes

* fix date filter range

* ooo fixes

* fix teams/members bulk actions

* create team UI

* i18n in useTabs instead of in tab component now

* Add event type setup border to availability

* fix bulk actions on org members table

* onboarding fixes

* fix input types with ref stripe comparision

* i18n fixes for platform

* update globals of atoms

* fix form builder firstname/lastname switch + correct footer useage

* fix select

* Revert "add @calcom/ui/css"

This reverts commit 0dd8f9012907a278cfede4a98f289cb0744c9244.

* revert tokens css

* Revert "extract app.css"

This reverts commit 10b998604816ad3310c24b36a02a638dabc5be24.

* linear nits

* workflow dropdown

* fix page theme heading sizes to match cards

* fix stepper for team creation

* adjust margin to FilterSearchField

* fix ooo icon

* fix booker and dark mode due to darkgray 50

* more dark mode fixes

* add size prop

---------

Co-authored-by: Eunjae Lee <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>

* remove ui-playground

* fix grow missing from merge

* add search icon data-test-id back to search

* fix FormAction style

* fix datatestid for apps and tabs

* change selector for team invitation e2e

* fix use data-testid from item instaed of using names

* rename upper case O

* fix unit tests data-testid

* fix unit tests data-testid

* more data-testid changes

* add data-testid to apps tab

* data-testid to installed appPage

* fix embed tests

* fix filter-popover-trigger

* use text-error and use dataId for locator

* more e2e improvment

* pass in single testId as button is now duplicate

* show field-error instead

* add test to eventtype tabs

* Add css vars to embed too\

* add scrollbar and change dialog overlay colour

* fix type

* use attribute instead of class for tab detection

* await promise

* use new tokens for sprite generation

* add correct testing Ids to e2e instead of button:text

* use testIds for creation of orgs

* Webhook receiver wait for 10 seconds

---------

Co-authored-by: Eunjae Lee <[email protected]>
Co-authored-by: Morgan Vernay <[email protected]>
Co-authored-by: Hariom <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
Co-authored-by: Joe Au-Yeung <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-02-14 16:31:21 -05:00
1 parent 0f67faeef3
commit 5d709cf63c
145 files changed
+17438 -10708

No files matched your search

@@ -0,0 +1,157 @@
export const addAppCssVars = () => {
try {
const cssVarsStyle = `cal-floating-button, cal-modal-box, cal-inline {
/* Spacing Scale */
--cal-spacing-0: 0px;
--cal-spacing-px: 1px;
--cal-spacing-0_5: 0.125rem; /* 2px */
--cal-spacing-1: 0.25rem; /* 4px */
--cal-spacing-1_5: 0.375rem; /* 6px */
--cal-spacing-2: 0.5rem; /* 8px */
--cal-spacing-2_5: 0.625rem; /* 10px */
--cal-spacing-3: 0.75rem; /* 12px */
--cal-spacing-3_5: 0.875rem; /* 14px */
--cal-spacing-4: 1rem; /* 16px */
--cal-spacing-5: 1.25rem; /* 20px */
--cal-spacing-6: 1.5rem; /* 24px */
--cal-spacing-7: 1.75rem; /* 28px */
--cal-spacing-8: 2rem; /* 32px */
--cal-spacing-9: 2.25rem; /* 36px */
--cal-spacing-10: 2.5rem; /* 40px */
--cal-spacing-11: 2.75rem; /* 44px */
--cal-spacing-12: 3rem; /* 48px */
--cal-spacing-14: 3.5rem; /* 56px */
--cal-spacing-16: 4rem; /* 64px */
--cal-spacing-20: 5rem; /* 80px */
--cal-spacing-24: 6rem; /* 96px */
--cal-spacing-28: 7rem; /* 112px */
--cal-spacing-32: 8rem; /* 128px */
--cal-spacing-36: 9rem; /* 144px */
--cal-spacing-40: 10rem; /* 160px */
--cal-spacing-44: 11rem; /* 176px */
--cal-spacing-48: 12rem; /* 192px */
--cal-spacing-52: 13rem; /* 208px */
--cal-spacing-56: 14rem; /* 224px */
--cal-spacing-60: 15rem; /* 240px */
--cal-spacing-64: 16rem; /* 256px */
--cal-spacing-72: 18rem; /* 288px */
--cal-spacing-80: 20rem; /* 320px */
--cal-spacing-96: 24rem; /* 384px */
/* Border Radius */
--cal-radius-none: 0px;
--cal-radius-sm: 0.125rem; /* 2px */
--cal-radius: 0.25rem; /* 4px */
--cal-radius-md: 0.375rem; /* 6px */
--cal-radius-lg: 0.5rem; /* 8px */
--cal-radius-xl: 0.75rem; /* 12px */
--cal-radius-2xl: 1rem; /* 16px */
--cal-radius-3xl: 1.5rem; /* 24px */
--cal-radius-full: 9999px;
/* Background Standard */
--cal-bg-emphasis: hsla(220, 13%, 91%, 1); /* gray.200 - active items and emphasising */
--cal-bg: hsla(0, 0%, 100%, 1); /* white - default background */
--cal-bg-subtle: hsla(220, 14%, 94%, 1); /* gray.100 - hovering on items, subtle raising */
--cal-bg-muted: hsla(210, 20%, 97%, 1); /* gray.50 - large items, sidebar, sections */
--cal-bg-inverted: hsla(210, 30%, 4%, 1); /* gray.900 - tooltips */
/* Background Primary */
--cal-bg-primary: hsla(214, 30%, 16%, 1); /* stone-100 */
--cal-bg-primary-emphasis: hsla(220, 6%, 25%, 1); /* stone-800 */
--cal-bg-primary-muted: hsla(220, 14%, 94%, 1); /* stone-400 */
/* Background Brand */
--cal-bg-brand: hsla(214, 30%, 16%, 1); /* gray-50 */
--cal-bg-brand-emphasis: hsla(220, 6%, 25%, 1); /* stone-100 */
--cal-bg-brand-muted: hsla(220, 14%, 94%, 1); /* stone-100 */
/* Background Semantic */
--cal-bg-semantic-info-subtle: hsla(212, 88%, 97%, 1); /* blue-100 */
--cal-bg-semantic-info-emphasis: hsla(236, 80%, 25%, 1); /* blue-500 */
--cal-bg-semantic-success-subtle: hsla(167, 54%, 93%, 1); /* green-100 */
--cal-bg-semantic-success-emphasis: hsla(158, 74%, 38%, 1); /* green-500 */
--cal-bg-semantic-attention-subtle: hsla(34, 100%, 92%, 1); /* orange-100 */
--cal-bg-semantic-attention-emphasis: hsla(15, 79%, 34%, 1); /* orange-500 */
--cal-bg-semantic-error-subtle: hsla(0, 93%, 94%, 1); /* red-100 */
--cal-bg-semantic-error-emphasis: hsla(0, 63%, 24%, 1); /* red-500 */
/* Background Visualization */
--cal-bg-visualization-1-subtle: hsla(326, 78%, 95%, 1); /* pink-100 */
--cal-bg-visualization-1-emphasis: hsla(330, 81%, 60%, 1); /* pink-500 */
--cal-bg-visualization-2-subtle: hsla(256, 86%, 91%, 1); /* purple-100 */
--cal-bg-visualization-2-emphasis: hsla(256, 85%, 57%, 1); /* purple-500 */
--cal-bg-visualization-3-subtle: hsla(217, 87%, 91%, 1); /* blue-100 */
--cal-bg-visualization-3-emphasis: hsla(235, 100%, 63%, 1); /* blue-500 */
--cal-bg-visualization-4-subtle: hsla(167, 54%, 93%, 1); /* green-100 */
--cal-bg-visualization-4-emphasis: hsla(158, 74%, 38%, 1); /* green-500 */
--cal-bg-visualization-5-subtle: hsla(55, 97%, 88%, 1); /* yellow-100 */
--cal-bg-visualization-5-emphasis: hsla(45, 93%, 47%, 1); /* yellow-500 */
--cal-bg-visualization-6-subtle: hsla(34, 100%, 92%, 1); /* orange-100 */
--cal-bg-visualization-6-emphasis: hsla(25, 95%, 53%, 1); /* orange-500 */
--cal-bg-visualization-7-subtle: hsla(0, 96%, 89%, 1); /* red-100 */
--cal-bg-visualization-7-emphasis: hsla(0, 84%, 60%, 1); /* red-500 */
/* Legacy Background Components - Consider deprecating */
--cal-bg-info: hsla(221, 91%, 93%, 1); /* #dee9fc - info backgrounds */
--cal-bg-success: hsla(142, 76%, 94%, 1); /* #e2fbe8 - success backgrounds */
--cal-bg-attention: hsla(33, 100%, 92%, 1); /* #fceed8 - attention backgrounds */
--cal-bg-error: hsla(3, 66%, 93%, 1); /* #f9e3e2 - error backgrounds */
--cal-bg-dark-error: hsla(2, 55%, 30%, 1); /* Keeping existing dark error */
/* Borders */
--cal-border-emphasis: hsla(218, 11%, 65%, 1); /* gray.400 - input:hover */
--cal-border: hsla(216, 12%, 84%, 1); /* gray.300 - inputs */
--cal-border-subtle: hsla(220, 13%, 91%, 1); /* gray.200 - container borders */
--cal-border-muted: hsla(220, 14%, 94%, 1); /* gray.100 */
--cal-border-error: hsla(0, 96%, 89%, 1); /* Keeping existing error border */
--cal-border-semantic-error: hsla(0, 96%, 89%, 1);
--cal-border-booker: var(--cal-border-subtle);
/* Content/Text Standard */
--cal-text-emphasis: hsla(210, 30%, 4%, 1); /* gray-900 */
--cal-text: hsla(220, 6%, 25%, 1); /* gray-700 */
--cal-text-subtle: hsla(220, 9%, 46%, 1); /* gray-500 */
--cal-text-muted: hsla(218, 11%, 65%, 1); /* gray-400 */
--cal-text-inverted: hsla(0, 0%, 100%, 1); /* white */
/* Content/Text Semantic */
--cal-text-semantic-info: hsla(236, 80%, 25%, 1); /* blue-800 */
--cal-text-semantic-success: hsla(150, 84%, 22%, 1); /* green-800 */
--cal-text-semantic-attention: hsla(15, 79%, 34%, 1); /* orange-800 */
--cal-text-semantic-error: hsla(0, 63%, 24%, 1); /* red-800 */
/* Content/Text Visualization */
--cal-text-visualization-1: hsla(332, 79%, 25%, 1); /* pink-800 */
--cal-text-visualization-2: hsla(270, 91%, 25%, 1); /* purple-800 */
--cal-text-visualization-3: hsla(217, 91%, 25%, 1); /* blue-800 */
--cal-text-visualization-4: hsla(142, 71%, 25%, 1); /* green-800 */
--cal-text-visualization-5: hsla(45, 93%, 25%, 1); /* yellow-800 */
--cal-text-visualization-6: hsla(24, 95%, 25%, 1); /* orange-800 */
--cal-text-visualization-7: hsla(0, 84%, 25%, 1); /* red-800 */
/* Border/Semantic Subtle */
--cal-border-semantic-attention-subtle: hsla(32, 98%, 83%, 1);
--cal-border-semantic-error-subtle: hsla(0, 96%, 89%, 1);
/* Legacy Content/Text Components - Consider deprecating */
--cal-text-info: hsla(225, 57%, 33%, 1); /* #253985 - interactive text/icons */
--cal-text-success: hsla(144, 34%, 24%, 1); /* #285231 */
--cal-text-attention: hsla(16, 62%, 28%, 1); /* Keeping existing attention text */
--cal-text-error: hsla(0, 63%, 31%, 1); /* Keeping existing error text */
/* Brand */
--cal-brand: hsla(221, 39%, 11%, 1); /* Keeping existing brand color */
--cal-brand-emphasis: hsla(0, 0%, 6%, 1); /* Keeping existing brand emphasis */
--cal-brand-text: hsla(0, 0%, 100%, 1); /* white */
}`;
// Create a style rule for above css
const style = document.createElement("style");
style.id = "cal-css-vars";
style.textContent = cssVarsStyle;
document.head.appendChild(style);
} catch (error) {
console.error("Error adding app css vars - Report this issue to support", error);
}
};
+3
View File
@@ -2,6 +2,7 @@
import { FloatingButton } from "./FloatingButton/FloatingButton";
import { Inline } from "./Inline/inline";
import { ModalBox } from "./ModalBox/ModalBox";
import { addAppCssVars } from "./addAppCssVars";
import type { InterfaceWithParent, interfaceWithParent, PrefillAndIframeAttrsConfig } from "./embed-iframe";
import css from "./embed.css";
import { SdkActionManager } from "./sdk-action-manager";
@@ -1056,6 +1057,8 @@ function initializeGlobalCalProps() {
globalCal.config.forwardQueryParams = globalCal.config.forwardQueryParams ?? false;
}
addAppCssVars();
function log(...args: unknown[]) {
console.log(...args);
}