pixelize-design-library 2.4.2-beta.3 → 2.4.2-beta.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Components/Accordion/Accordion.js +5 -3
- package/dist/Components/AppSwitcher/AppMark.d.ts +19 -0
- package/dist/Components/AppSwitcher/AppMark.js +62 -0
- package/dist/Components/AppSwitcher/AppSwitcher.d.ts +4 -0
- package/dist/Components/AppSwitcher/AppSwitcher.js +315 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.d.ts +64 -0
- package/dist/Components/AppSwitcher/AppSwitcherProps.js +86 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.d.ts +3 -0
- package/dist/Components/AppSwitcher/useAppSwitcherShortcut.js +31 -0
- package/dist/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +4 -3
- package/dist/Components/Button/Button.styles.js +39 -25
- package/dist/Components/Button/ButtonProps.d.ts +6 -1
- package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
- package/dist/Components/Card/Card.d.ts +1 -1
- package/dist/Components/Card/Card.js +2 -2
- package/dist/Components/Card/CardProps.d.ts +0 -1
- package/dist/Components/Card/PaymentCard/PaymentCard.js +7 -7
- package/dist/Components/Checkbox/Checkbox.js +1 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +12 -7
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/CopyButton/CopyButton.js +6 -2
- package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/Components/DatePicker/CalendarPanel.d.ts +5 -0
- package/dist/Components/DatePicker/CalendarPanel.js +24 -5
- package/dist/Components/DatePicker/DatePickerProps.d.ts +21 -0
- package/dist/Components/DatePicker/RangeDatePicker.js +4 -4
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/Components/DatePicker/dayStates.d.ts +56 -0
- package/dist/Components/DatePicker/dayStates.js +87 -0
- package/dist/Components/Dropdown/DropDown.js +7 -15
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/Components/EmptyState/EmptyState.js +2 -1
- package/dist/Components/FilePreview/FilePreview.js +1 -1
- package/dist/Components/FileUpload/FileUpload.js +5 -4
- package/dist/Components/FileUpload/FileUploadProps.d.ts +3 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +0 -9
- package/dist/Components/FilterSidebar/filterHoverStyle.js +4 -10
- package/dist/Components/Form/FormWrapper.js +1 -1
- package/dist/Components/Header/components/mobileMenu.js +12 -3
- package/dist/Components/Input/TextInput.styles.js +6 -4
- package/dist/Components/InputTextArea/InputTextArea.style.js +5 -4
- package/dist/Components/KanbanBoard/KanbanBoard.js +5 -45
- package/dist/Components/LimitReachedModal/LimitReachedModal.js +4 -5
- package/dist/Components/Loading/Loading.js +15 -14
- package/dist/Components/MultiSelect/MultiSelect.js +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/Components/NoteTextArea/NoteTextArea.js +9 -4
- package/dist/Components/NumberInput/NumberInput.js +3 -1
- package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- package/dist/Components/PdfViewer/PdfViewer.js +6 -1
- package/dist/Components/PinInput/PinInput.js +1 -1
- package/dist/Components/PlanPill/PlanPill.js +5 -5
- package/dist/Components/PlanPill/planPillGradient.d.ts +2 -14
- package/dist/Components/PlanPill/planPillGradient.js +3 -15
- package/dist/Components/Primitives/Primitives.d.ts +6 -0
- package/dist/Components/Primitives/Primitives.js +113 -0
- package/dist/Components/ProductCard/ProductPrice.js +1 -1
- package/dist/Components/ProductCard/ProductReview.js +6 -1
- package/dist/Components/ProductCard/ProductTags.js +1 -1
- package/dist/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/Components/RadioButton/RadioButton.js +3 -2
- package/dist/Components/Reorder/Reorder.js +1 -1
- package/dist/Components/ScrollToTop/ScrollToTop.js +2 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
- package/dist/Components/Search/Search.js +2 -2
- package/dist/Components/SearchSelect/SearchSelect.js +14 -9
- package/dist/Components/SegmentedControl/SegmentedControl.d.ts +2 -0
- package/dist/Components/SegmentedControl/SegmentedControl.js +58 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.d.ts +16 -0
- package/dist/Components/SegmentedControl/SegmentedControlProps.js +2 -0
- package/dist/Components/Select/Select.d.ts +1 -1
- package/dist/Components/Select/Select.js +4 -2
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/Select/SelectProps.d.ts +3 -0
- package/dist/Components/SelectSearch/SelectSearch.js +7 -4
- package/dist/Components/SelectV2/SelectV2.js +18 -14
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/SideBar/SideBar.js +1 -1
- package/dist/Components/SideBar/components/MenuPopoverContent.js +2 -2
- package/dist/Components/Slider/Slider.js +8 -1
- package/dist/Components/StageProgress/StageProgress.js +2 -9
- package/dist/Components/StageProgress/StepperStage.js +2 -2
- package/dist/Components/Table/Table.d.ts +1 -1
- package/dist/Components/Table/Table.js +17 -24
- package/dist/Components/Table/TableProps.d.ts +4 -0
- package/dist/Components/Table/components/Pagination.js +1 -1
- package/dist/Components/Table/components/TableActions.js +2 -2
- package/dist/Components/Table/components/TableBody.js +41 -12
- package/dist/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/Components/Table/components/TableHeader.js +21 -8
- package/dist/Components/Table/components/TableSearch.js +1 -1
- package/dist/Components/Table/filters/ActiveFilters.js +2 -18
- package/dist/Components/Table/settings/ManageColumns.js +4 -17
- package/dist/Components/Table/settings/TableSettings.js +5 -11
- package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
- package/dist/Components/Table/variants/TableVariantContext.js +17 -0
- package/dist/Components/Table/variants/classic.d.ts +6 -0
- package/dist/Components/Table/variants/classic.js +47 -0
- package/dist/Components/Table/variants/index.d.ts +7 -0
- package/dist/Components/Table/variants/index.js +27 -0
- package/dist/Components/Table/variants/pillInk.d.ts +6 -0
- package/dist/Components/Table/variants/pillInk.js +21 -0
- package/dist/Components/Table/variants/studio.d.ts +6 -0
- package/dist/Components/Table/variants/studio.js +50 -0
- package/dist/Components/Table/variants/tokens.d.ts +49 -0
- package/dist/Components/Table/variants/tokens.js +2 -0
- package/dist/Components/Tag/Tag.styles.js +9 -8
- package/dist/Components/Timeline/Timeline.js +2 -2
- package/dist/Components/Toaster/Toaster.js +1 -1
- package/dist/Components/Toggle/TableToggle.js +11 -7
- package/dist/Components/ToggleSwitch/ToggleSwitch.d.ts +2 -0
- package/dist/Components/ToggleSwitch/ToggleSwitch.js +18 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.d.ts +11 -0
- package/dist/Components/ToggleSwitch/ToggleSwitchProps.js +2 -0
- package/dist/Components/ToolTip/ToolTip.js +6 -6
- package/dist/Components/ToolTip/ToolTipProps.d.ts +3 -1
- package/dist/Components/Trail/TrailWorks.js +1 -1
- package/dist/Components/UpgradeButton/UpgradeButton.js +3 -3
- package/dist/Constants/Sidebar.js +3 -2
- package/dist/Theme/assertPalette.d.ts +1 -1
- package/dist/Theme/assertPalette.js +3 -2
- package/dist/Theme/chakra/Menu.styles.d.ts +3 -0
- package/dist/Theme/chakra/Menu.styles.js +5 -0
- package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
- package/dist/Theme/chakra/Popover.styles.js +5 -1
- package/dist/Theme/chakra/componentStyles.d.ts +6 -0
- package/dist/Theme/chakra/componentStyles.js +5 -5
- package/dist/Theme/chakra/createBrandTheme.js +10 -16
- package/dist/Theme/chakra/focusRing.styles.d.ts +52 -0
- package/dist/Theme/chakra/focusRing.styles.js +46 -0
- package/dist/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/Theme/tokens/brands/index.js +6 -1
- package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +1 -0
- package/dist/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/Theme/tokens/builders/focusRing.d.ts +52 -0
- package/dist/Theme/tokens/builders/focusRing.js +92 -0
- package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
- package/dist/Theme/tokens/builders/gradientInk.js +28 -0
- package/dist/Theme/tokens/builders/index.d.ts +4 -0
- package/dist/Theme/tokens/builders/index.js +4 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +46 -3
- package/dist/Theme/tokens/builders/outlineRung.js +101 -5
- package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
- package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
- package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
- package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/Theme/tokens/builders/rowStates.d.ts +13 -0
- package/dist/Theme/tokens/builders/rowStates.js +19 -0
- package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
- package/dist/Theme/tokens/builders/scrollbar.js +57 -0
- package/dist/Theme/tokens/builders/solidFillRung.d.ts +4 -0
- package/dist/Theme/tokens/builders/solidFillRung.js +33 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
- package/dist/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/Theme/tokens/types.d.ts +21 -1
- package/dist/esm/Components/Accordion/Accordion.js +5 -3
- package/dist/esm/Components/AppSwitcher/AppMark.js +56 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcher.js +280 -0
- package/dist/esm/Components/AppSwitcher/AppSwitcherProps.js +78 -0
- package/dist/esm/Components/AppSwitcher/useAppSwitcherShortcut.js +27 -0
- package/dist/esm/Components/AppearanceSettings/AppearanceSettings.js +2 -1
- package/dist/esm/Components/Button/Button.js +5 -4
- package/dist/esm/Components/Button/Button.styles.js +40 -26
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +7 -7
- package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +13 -8
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/CopyButton/CopyButton.js +7 -3
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +24 -5
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +4 -4
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/esm/Components/DatePicker/dayStates.js +79 -0
- package/dist/esm/Components/Dropdown/DropDown.js +7 -15
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/esm/Components/EmptyState/EmptyState.js +2 -1
- package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +6 -5
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/esm/Components/FilterSidebar/filterHoverStyle.js +4 -10
- package/dist/esm/Components/Form/FormWrapper.js +1 -1
- package/dist/esm/Components/Header/components/mobileMenu.js +12 -3
- package/dist/esm/Components/Input/TextInput.styles.js +6 -4
- package/dist/esm/Components/InputTextArea/InputTextArea.style.js +5 -4
- package/dist/esm/Components/KanbanBoard/KanbanBoard.js +5 -45
- package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -5
- package/dist/esm/Components/Loading/Loading.js +12 -11
- package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -1
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +9 -4
- package/dist/esm/Components/NumberInput/NumberInput.js +4 -2
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- package/dist/esm/Components/PdfViewer/PdfViewer.js +6 -1
- package/dist/esm/Components/PinInput/PinInput.js +1 -1
- package/dist/esm/Components/PlanPill/PlanPill.js +6 -6
- package/dist/esm/Components/PlanPill/planPillGradient.js +3 -15
- package/dist/esm/Components/Primitives/Primitives.js +6 -0
- package/dist/esm/Components/ProductCard/ProductPrice.js +1 -1
- package/dist/esm/Components/ProductCard/ProductReview.js +6 -1
- package/dist/esm/Components/ProductCard/ProductTags.js +1 -1
- package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +3 -2
- package/dist/esm/Components/Reorder/Reorder.js +1 -1
- package/dist/esm/Components/ScrollToTop/ScrollToTop.js +2 -0
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
- package/dist/esm/Components/Search/Search.js +2 -2
- package/dist/esm/Components/SearchSelect/SearchSelect.js +14 -9
- package/dist/esm/Components/SegmentedControl/SegmentedControl.js +55 -0
- package/dist/esm/Components/SegmentedControl/SegmentedControlProps.js +1 -0
- package/dist/esm/Components/Select/Select.js +5 -3
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +7 -4
- package/dist/esm/Components/SelectV2/SelectV2.js +18 -14
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/SideBar/SideBar.js +1 -1
- package/dist/esm/Components/SideBar/components/MenuPopoverContent.js +2 -2
- package/dist/esm/Components/Slider/Slider.js +8 -1
- package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
- package/dist/esm/Components/StageProgress/StepperStage.js +2 -2
- package/dist/esm/Components/Table/Table.js +17 -24
- package/dist/esm/Components/Table/components/Pagination.js +1 -1
- package/dist/esm/Components/Table/components/TableActions.js +2 -2
- package/dist/esm/Components/Table/components/TableBody.js +42 -13
- package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
- package/dist/esm/Components/Table/components/TableHeader.js +21 -8
- package/dist/esm/Components/Table/components/TableSearch.js +1 -1
- package/dist/esm/Components/Table/filters/ActiveFilters.js +2 -18
- package/dist/esm/Components/Table/settings/ManageColumns.js +4 -17
- package/dist/esm/Components/Table/settings/TableSettings.js +5 -11
- package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
- package/dist/esm/Components/Table/variants/classic.js +43 -0
- package/dist/esm/Components/Table/variants/index.js +9 -0
- package/dist/esm/Components/Table/variants/pillInk.js +18 -0
- package/dist/esm/Components/Table/variants/studio.js +46 -0
- package/dist/esm/Components/Table/variants/tokens.js +1 -0
- package/dist/esm/Components/Tag/Tag.styles.js +10 -9
- package/dist/esm/Components/Timeline/Timeline.js +2 -2
- package/dist/esm/Components/Toaster/Toaster.js +1 -1
- package/dist/esm/Components/Toggle/TableToggle.js +11 -7
- package/dist/esm/Components/ToggleSwitch/ToggleSwitch.js +15 -0
- package/dist/esm/Components/ToggleSwitch/ToggleSwitchProps.js +1 -0
- package/dist/esm/Components/ToolTip/ToolTip.js +6 -6
- package/dist/esm/Components/Trail/TrailWorks.js +1 -1
- package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -3
- package/dist/esm/Constants/Sidebar.js +3 -2
- package/dist/esm/Theme/assertPalette.js +3 -2
- package/dist/esm/Theme/chakra/Menu.styles.js +5 -0
- package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
- package/dist/esm/Theme/chakra/componentStyles.js +5 -5
- package/dist/esm/Theme/chakra/createBrandTheme.js +10 -16
- package/dist/esm/Theme/chakra/focusRing.styles.js +40 -0
- package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
- package/dist/esm/Theme/tokens/brands/index.js +6 -1
- package/dist/esm/Theme/tokens/builders/buildDarkPalette.js +6 -1
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/focusRing.js +85 -0
- package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
- package/dist/esm/Theme/tokens/builders/index.js +4 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +96 -4
- package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
- package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
- package/dist/esm/Theme/tokens/builders/rowStates.js +15 -0
- package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
- package/dist/esm/Theme/tokens/builders/solidFillRung.js +28 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/esm/index.js +24 -1
- package/dist/index.d.ts +27 -3
- package/dist/index.js +64 -4
- package/package.json +8 -2
|
@@ -7,6 +7,35 @@ import { contrastRatio, hexToHsl, relativeLuminance, withLightness } from "./col
|
|
|
7
7
|
export const MIN_PERCEPTIBLE_STEP = 1.15;
|
|
8
8
|
/** WCAG 1.4.11 — a control outline is a UI component boundary, held to 3:1. */
|
|
9
9
|
export const AA_NON_TEXT = 3;
|
|
10
|
+
/**
|
|
11
|
+
* Resting chrome — card, popover and field outlines — settles here, not at `AA_NON_TEXT`.
|
|
12
|
+
* At 3:1 a container border is text-weight and the UI reads as a wireframe; every mainstream
|
|
13
|
+
* system draws this line far lighter (Tailwind gray-200 1.24, Chakra gray.200 1.30, Material
|
|
14
|
+
* outline-variant 1.61). 1.4.11 asks that a control be identifiable, not that its resting
|
|
15
|
+
* border carry the whole job: the fill, the label and the focus ring do that.
|
|
16
|
+
*
|
|
17
|
+
* That defence was untrue when it was written. Buttons defined no `_focusVisible` at all, so the
|
|
18
|
+
* focus ring was Chakra's stock `shadows.outline` — a fixed blue measuring 1.38:1 on a primary
|
|
19
|
+
* button — and nothing in the library was held to `AA_NON_TEXT` at the moment of focus. It is
|
|
20
|
+
* true now: `focusRing` (`builders/focusRing.ts`) is derived per brand per mode and gated at 3:1
|
|
21
|
+
* on the canvas, on a card and on the button's own fill by `builders/focusRing.test.ts`. If that
|
|
22
|
+
* gate is ever relaxed, this constant loses its justification with it.
|
|
23
|
+
*/
|
|
24
|
+
export const CHROME_BORDER = 1.5;
|
|
25
|
+
// The resting rule between two surfaces — a card edge, a divider, a menu outline. Lighter than
|
|
26
|
+
// CHROME_BORDER, which outlines a control the user acts on.
|
|
27
|
+
export const CHROME_RULE = 1.31;
|
|
28
|
+
/**
|
|
29
|
+
* A rule is decorative, so it has a ceiling and no floor: soften it until the surface it reads
|
|
30
|
+
* hardest against sits at `target`, and leave a already-fainter rung alone. Never `settleAcross`
|
|
31
|
+
* here — that clears a floor on EVERY surface, so one tinted surface drags the rule darker.
|
|
32
|
+
*/
|
|
33
|
+
export function ruleInk(hex, surfaces, target) {
|
|
34
|
+
const loudest = surfaces.reduce((worst, s) => contrastRatio(hex, s) > contrastRatio(hex, worst) ? s : worst);
|
|
35
|
+
return contrastRatio(hex, loudest) > target
|
|
36
|
+
? softenToContrast(hex, loudest, target)
|
|
37
|
+
: hex;
|
|
38
|
+
}
|
|
10
39
|
/**
|
|
11
40
|
* Walks a hex toward `target` contrast against `backdrop`, keeping hue and saturation.
|
|
12
41
|
* Direction is DERIVED from the backdrop, never passed: a mode argument here was redundant
|
|
@@ -30,11 +59,30 @@ export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
|
|
|
30
59
|
const ends = [withLightness(hex, 100, s), withLightness(hex, 0, s)];
|
|
31
60
|
return contrastRatio(ends[0], backdrop) >= contrastRatio(ends[1], backdrop) ? ends[0] : ends[1];
|
|
32
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Mirror of `liftToContrast`: walks ink TOWARD the backdrop, stopping at the last step that
|
|
64
|
+
* still clears `target`. For ink that must stay legible without reading as body copy.
|
|
65
|
+
*/
|
|
66
|
+
export function softenToContrast(hex, backdrop, target) {
|
|
67
|
+
if (contrastRatio(hex, backdrop) <= target)
|
|
68
|
+
return hex;
|
|
69
|
+
const { s, l: start } = hexToHsl(hex);
|
|
70
|
+
const toward = relativeLuminance(backdrop) < 0.5 ? -1 : 1;
|
|
71
|
+
let softest = hex;
|
|
72
|
+
for (let l = start; l > 0 && l < 100; l += toward) {
|
|
73
|
+
const next = withLightness(hex, l, s);
|
|
74
|
+
if (contrastRatio(next, backdrop) < target)
|
|
75
|
+
break;
|
|
76
|
+
softest = next;
|
|
77
|
+
}
|
|
78
|
+
return softest;
|
|
79
|
+
}
|
|
33
80
|
/**
|
|
34
81
|
* `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
|
|
35
|
-
* pickers, the editor's inputs).
|
|
36
|
-
*
|
|
37
|
-
*
|
|
82
|
+
* pickers, the editor's inputs). Settled onto `CHROME_BORDER` — lifted when a brand authored it
|
|
83
|
+
* invisibly pale, softened when it overshoots. It was previously lifted to `AA_NON_TEXT`, which
|
|
84
|
+
* shipped 3.85-4.95:1 outlines: a text-weight box around every card and popover.
|
|
85
|
+
* Resolved here rather than hand-pinned per brand: a copied hex goes stale the moment a canvas moves.
|
|
38
86
|
*
|
|
39
87
|
* `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
|
|
40
88
|
* and outside 1.4.11.
|
|
@@ -47,7 +95,9 @@ export function withOutlineRung(palette) {
|
|
|
47
95
|
contrastRatio(current, palette.background[50])
|
|
48
96
|
? palette.backgroundColor.main
|
|
49
97
|
: palette.background[50];
|
|
50
|
-
const resolved =
|
|
98
|
+
const resolved = contrastRatio(current, backdrop) > CHROME_BORDER
|
|
99
|
+
? softenToContrast(current, backdrop, CHROME_BORDER)
|
|
100
|
+
: liftToContrast(current, backdrop, CHROME_BORDER);
|
|
51
101
|
if (resolved === current)
|
|
52
102
|
return palette;
|
|
53
103
|
return { ...palette, boxborder: { ...palette.boxborder, 500: resolved } };
|
|
@@ -63,3 +113,45 @@ export function withOutlineRung(palette) {
|
|
|
63
113
|
export function resolveHoverTint(seed, restSurface) {
|
|
64
114
|
return liftToContrast(seed, restSurface, MIN_PERCEPTIBLE_STEP);
|
|
65
115
|
}
|
|
116
|
+
/**
|
|
117
|
+
* Settles ink into `target` against EVERY surface at once. Softening one step can change which
|
|
118
|
+
* surface is hardest, so resolving against a single pre-computed "hardest" one lands under the
|
|
119
|
+
* floor on another — that is how radiant and rosewood ended up with an invisible outline on
|
|
120
|
+
* their muted surface.
|
|
121
|
+
*/
|
|
122
|
+
export function settleAcross(hex, surfaces, target) {
|
|
123
|
+
const clearsAll = (c) => surfaces.every((s) => contrastRatio(c, s) >= target);
|
|
124
|
+
if (!clearsAll(hex)) {
|
|
125
|
+
return surfaces.reduce((ink, s) => liftToContrast(ink, s, target), hex);
|
|
126
|
+
}
|
|
127
|
+
const { s: sat, l: start } = hexToHsl(hex);
|
|
128
|
+
const toward = relativeLuminance(surfaces[0]) < 0.5 ? -1 : 1;
|
|
129
|
+
let settled = hex;
|
|
130
|
+
for (let l = start; l > 0 && l < 100; l += toward) {
|
|
131
|
+
const next = withLightness(hex, l, sat);
|
|
132
|
+
if (!clearsAll(next))
|
|
133
|
+
break;
|
|
134
|
+
settled = next;
|
|
135
|
+
}
|
|
136
|
+
return settled;
|
|
137
|
+
}
|
|
138
|
+
/**
|
|
139
|
+
* A pure-grey surface sitting `target` contrast away from `backdrop`. Binary search, not a walk:
|
|
140
|
+
* `liftToContrast` cannot move a seed already at lightness 0 or 100, and a pure-white panel seeded
|
|
141
|
+
* itself straight to black. Neutral on purpose — the light palettes are hand-authored and tinted,
|
|
142
|
+
* so lifting one of their surface rungs turns a selected row into a saturated brand block, while
|
|
143
|
+
* the derived dark palettes land on grey and look right.
|
|
144
|
+
*/
|
|
145
|
+
export function neutralStep(backdrop, target) {
|
|
146
|
+
const grey = (l) => withLightness("#808080", l, 0);
|
|
147
|
+
let lo = hexToHsl(backdrop).l;
|
|
148
|
+
let hi = relativeLuminance(backdrop) < 0.5 ? 100 : 0;
|
|
149
|
+
for (let i = 0; i < 20; i += 1) {
|
|
150
|
+
const mid = (lo + hi) / 2;
|
|
151
|
+
if (contrastRatio(grey(mid), backdrop) < target)
|
|
152
|
+
lo = mid;
|
|
153
|
+
else
|
|
154
|
+
hi = mid;
|
|
155
|
+
}
|
|
156
|
+
return grey(hi);
|
|
157
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { contrastRatio } from "./color.js";
|
|
2
|
+
import { liftToContrast, softenToContrast } from "./outlineRung.js";
|
|
3
|
+
import { PLACEHOLDER_TEXT } from "./surfaceRungs.js";
|
|
4
|
+
/**
|
|
5
|
+
* The hint ink for a field: the brand's authored rung settled onto `PLACEHOLDER_TEXT` against the
|
|
6
|
+
* hardest surface a field can land on — lifted when it falls short, softened when it overshoots.
|
|
7
|
+
*
|
|
8
|
+
* Settled rather than floored because the authored rungs measured 3.96-7.73:1 across the brands,
|
|
9
|
+
* and anything much past the floor reads as a field already typed into. The floor is the look:
|
|
10
|
+
* one hint weight for every brand in both modes, instead of a per-brand accident.
|
|
11
|
+
*/
|
|
12
|
+
export const placeholderInkOn = (palette, surfaces) => {
|
|
13
|
+
const rung = palette.placeholder[500];
|
|
14
|
+
const hardest = surfaces.reduce((worst, s) => contrastRatio(rung, s) < contrastRatio(rung, worst) ? s : worst);
|
|
15
|
+
return contrastRatio(rung, hardest) > PLACEHOLDER_TEXT
|
|
16
|
+
? softenToContrast(rung, hardest, PLACEHOLDER_TEXT)
|
|
17
|
+
: liftToContrast(rung, hardest, PLACEHOLDER_TEXT);
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Every surface an ENABLED field renders on. Disabled fields are deliberately absent — 1.4.3
|
|
21
|
+
* exempts them, and folding their dimmer fill in here would darken the hint on every other field.
|
|
22
|
+
*/
|
|
23
|
+
export const fieldSurfaces = (palette) => [
|
|
24
|
+
palette.gray[50],
|
|
25
|
+
palette.background[50],
|
|
26
|
+
palette.backgroundColor.main,
|
|
27
|
+
];
|
|
28
|
+
/** The hint ink every field in this library reads. Takes no backdrop: see `fieldSurfaces`. */
|
|
29
|
+
export const placeholderInk = (palette) => placeholderInkOn(palette, fieldSurfaces(palette));
|
|
@@ -1,8 +1,13 @@
|
|
|
1
1
|
import { liftToContrast, AA_NON_TEXT } from "./outlineRung.js";
|
|
2
2
|
import { AA_NORMAL_TEXT } from "./accentText.js";
|
|
3
|
-
|
|
3
|
+
import { PLACEHOLDER_TEXT } from "./surfaceRungs.js";
|
|
4
|
+
/**
|
|
5
|
+
* A hint is floored at 3:1, not 4.5:1. Held to body-text contrast it stopped reading as a hint —
|
|
6
|
+
* an empty field looked like one already typed into — and the published library ships this rung
|
|
7
|
+
* as the brand authored it. See CHROME-CONSISTENCY.md.
|
|
8
|
+
*/
|
|
4
9
|
export function withPlaceholderRung(palette) {
|
|
5
|
-
const resolved = liftToContrast(palette.placeholder[500], palette.background[50],
|
|
10
|
+
const resolved = liftToContrast(palette.placeholder[500], palette.background[50], PLACEHOLDER_TEXT);
|
|
6
11
|
if (resolved === palette.placeholder[500])
|
|
7
12
|
return palette;
|
|
8
13
|
return { ...palette, placeholder: { ...palette.placeholder, 500: resolved } };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { resolveHoverTint } from "./outlineRung.js";
|
|
2
|
+
/**
|
|
3
|
+
* The three backgrounds a selectable list row can rest on. Every rung is NEUTRAL and pale, so a
|
|
4
|
+
* row's ink stays the canvas ink `withSurfaceRungs` already settled. Seeding a row state from
|
|
5
|
+
* `primary[500]` instead — the filled-button rung — is what painted SelectV2's hovered rows a
|
|
6
|
+
* solid brand fill under unreadable text.
|
|
7
|
+
*/
|
|
8
|
+
export const listRowBackgrounds = (colors) => {
|
|
9
|
+
const selected = colors.backgroundColor.tertiary;
|
|
10
|
+
return {
|
|
11
|
+
active: resolveHoverTint(colors.gray[50], colors.backgroundColor.light),
|
|
12
|
+
selected,
|
|
13
|
+
selectedActive: resolveHoverTint(selected, selected),
|
|
14
|
+
};
|
|
15
|
+
};
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
/** One width everywhere. The 3px, 4px, 5px and 10px bars in use were all accidents. */
|
|
2
|
+
export const SCROLLBAR_WIDTH = "6px";
|
|
3
|
+
const RADIUS = "6px";
|
|
4
|
+
/**
|
|
5
|
+
* The single source of scrollbar chrome. `overlay` drops the track for bars that float over a
|
|
6
|
+
* card; `hover` keeps the thumb invisible until the region is hovered.
|
|
7
|
+
*/
|
|
8
|
+
export function scrollbarStyles(palette, variant = "default") {
|
|
9
|
+
const { gray } = palette;
|
|
10
|
+
const track = variant === "default" ? gray[100] : "transparent";
|
|
11
|
+
const thumb = variant === "hover" ? "transparent" : gray[400];
|
|
12
|
+
return {
|
|
13
|
+
scrollbarWidth: "thin",
|
|
14
|
+
scrollbarColor: `${thumb} ${track}`,
|
|
15
|
+
"&::-webkit-scrollbar": {
|
|
16
|
+
width: SCROLLBAR_WIDTH,
|
|
17
|
+
height: SCROLLBAR_WIDTH,
|
|
18
|
+
},
|
|
19
|
+
"&::-webkit-scrollbar-track": {
|
|
20
|
+
background: track,
|
|
21
|
+
borderRadius: RADIUS,
|
|
22
|
+
},
|
|
23
|
+
"&::-webkit-scrollbar-thumb": {
|
|
24
|
+
background: thumb,
|
|
25
|
+
borderRadius: RADIUS,
|
|
26
|
+
transition: "background 0.2s ease",
|
|
27
|
+
},
|
|
28
|
+
"&::-webkit-scrollbar-thumb:hover": {
|
|
29
|
+
background: gray[500],
|
|
30
|
+
},
|
|
31
|
+
"&::-webkit-scrollbar-corner": {
|
|
32
|
+
background: track,
|
|
33
|
+
},
|
|
34
|
+
...(variant === "hover"
|
|
35
|
+
? {
|
|
36
|
+
"&:hover": { scrollbarColor: `${gray[400]} ${track}` },
|
|
37
|
+
"&:hover::-webkit-scrollbar-thumb": { background: gray[400] },
|
|
38
|
+
}
|
|
39
|
+
: {}),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
/** The same chrome for the document itself, where `&` selectors do not apply. */
|
|
43
|
+
export function globalScrollbarStyles(palette) {
|
|
44
|
+
const { gray } = palette;
|
|
45
|
+
return {
|
|
46
|
+
"::-webkit-scrollbar": { width: SCROLLBAR_WIDTH, height: SCROLLBAR_WIDTH },
|
|
47
|
+
"::-webkit-scrollbar-track": { background: gray[100] },
|
|
48
|
+
"::-webkit-scrollbar-thumb": { background: gray[400], borderRadius: RADIUS },
|
|
49
|
+
"::-webkit-scrollbar-thumb:hover": { background: gray[500] },
|
|
50
|
+
"::-webkit-scrollbar-corner": { background: gray[100] },
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { contrastRatio } from "./color.js";
|
|
2
|
+
const AA_NORMAL_TEXT = 4.5;
|
|
3
|
+
const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
4
|
+
const FILL_STEP_RUNGS = { light: [600, 700], dark: [400, 300] };
|
|
5
|
+
const hasOpacity = (scale) => "opacity" in scale;
|
|
6
|
+
// Brand scales keep [500]; utility scales (red, green, …) step to the closest passing rung.
|
|
7
|
+
export const solidRung = (scale, white) => {
|
|
8
|
+
if (hasOpacity(scale))
|
|
9
|
+
return 500;
|
|
10
|
+
if (contrastRatio(scale[500], white) >= AA_NORMAL_TEXT)
|
|
11
|
+
return 500;
|
|
12
|
+
const passing = RUNGS.filter((r) => scale[r] && contrastRatio(scale[r], white) >= AA_NORMAL_TEXT);
|
|
13
|
+
if (!passing.length)
|
|
14
|
+
return 500;
|
|
15
|
+
return passing.reduce((a, b) => contrastRatio(scale[a], white) <= contrastRatio(scale[b], white) ? a : b);
|
|
16
|
+
};
|
|
17
|
+
const steppedRung = (base, step, isDark) => {
|
|
18
|
+
const dir = isDark ? -100 : 100;
|
|
19
|
+
return Math.min(900, Math.max(50, base + dir * step));
|
|
20
|
+
};
|
|
21
|
+
export const darkerFillRung = (scale, white, isDark, step) => {
|
|
22
|
+
const base = solidRung(scale, white);
|
|
23
|
+
if (base === 500) {
|
|
24
|
+
const mode = isDark ? "dark" : "light";
|
|
25
|
+
return FILL_STEP_RUNGS[mode][step];
|
|
26
|
+
}
|
|
27
|
+
return steppedRung(base, step === 0 ? 1 : 2, isDark);
|
|
28
|
+
};
|
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import { contrastRatio } from "./color.js";
|
|
2
|
-
import { liftToContrast, AA_NON_TEXT } from "./outlineRung.js";
|
|
2
|
+
import { liftToContrast, settleAcross, ruleInk, AA_NON_TEXT, CHROME_BORDER, CHROME_RULE } from "./outlineRung.js";
|
|
3
3
|
import { AA_NORMAL_TEXT, pickAccentText } from "./accentText.js";
|
|
4
4
|
import { SEMANTIC_TONES } from "./semanticText.js";
|
|
5
|
+
/**
|
|
6
|
+
* A hint is held to the non-text floor, not the body-text one. Deliberate: at 4.5 an empty field
|
|
7
|
+
* reads as one already typed into. See CHROME-CONSISTENCY.md.
|
|
8
|
+
*/
|
|
9
|
+
export const PLACEHOLDER_TEXT = AA_NON_TEXT;
|
|
5
10
|
export const namedSurfaces = (palette) => [
|
|
6
11
|
...Object.values(palette.backgroundColor),
|
|
7
12
|
palette.background[50],
|
|
@@ -13,6 +18,8 @@ export const hardestSurface = (ink, surfaces) => surfaces.reduce((worst, s) => c
|
|
|
13
18
|
export function withSurfaceRungs(palette) {
|
|
14
19
|
const surfaces = namedSurfaces(palette);
|
|
15
20
|
const lift = (ink, target) => liftToContrast(ink, hardestSurface(ink, surfaces), target);
|
|
21
|
+
const settle = (ink, target) => settleAcross(ink, surfaces, target);
|
|
22
|
+
const rule = (ink) => ruleInk(ink, [palette.backgroundColor.main, palette.background[50]], CHROME_RULE);
|
|
16
23
|
const semanticText = SEMANTIC_TONES.reduce((acc, tone) => {
|
|
17
24
|
acc[tone] = lift(palette.semanticText[tone], AA_NORMAL_TEXT);
|
|
18
25
|
return acc;
|
|
@@ -24,10 +31,18 @@ export function withSurfaceRungs(palette) {
|
|
|
24
31
|
semanticText,
|
|
25
32
|
text: { ...palette.text, 500: lift(palette.text[500], AA_NORMAL_TEXT) },
|
|
26
33
|
header: { ...palette.header, 500: lift(palette.header[500], AA_NORMAL_TEXT) },
|
|
27
|
-
placeholder:
|
|
28
|
-
|
|
29
|
-
|
|
34
|
+
// `placeholder` is deliberately absent: the brand authors that rung and the published
|
|
35
|
+
// library ships it untouched. Its floor is enforced in `placeholderInk`, against the
|
|
36
|
+
// surfaces a FIELD renders on — not `table.hover`, which no field sits on.
|
|
37
|
+
// Settled, not lifted: this rung already passed through `withOutlineRung`, and lifting it
|
|
38
|
+
// again here to AA_NON_TEXT is what shipped 3.85-4.95:1 outlines. See CHROME_BORDER.
|
|
39
|
+
boxborder: {
|
|
40
|
+
...palette.boxborder,
|
|
41
|
+
200: rule(palette.boxborder[200]),
|
|
42
|
+
500: settle(palette.boxborder[500], CHROME_BORDER),
|
|
30
43
|
},
|
|
31
|
-
|
|
44
|
+
// The 200 rung of both ramps is the same job under two names; settle them together or an
|
|
45
|
+
// app picking `border` gets a heavier rule than one picking `boxborder`.
|
|
46
|
+
border: { ...palette.border, 200: rule(palette.border[200]) },
|
|
32
47
|
};
|
|
33
48
|
}
|
package/dist/esm/index.js
CHANGED
|
@@ -42,8 +42,11 @@ import SearchSelect from "./Components/SearchSelect/SearchSelect.js";
|
|
|
42
42
|
import SelectSearch from "./Components/SelectSearch/SelectSearch.js";
|
|
43
43
|
import SideBar from "./Components/SideBar/SideBar.js";
|
|
44
44
|
import Slider from "./Components/Slider/Slider.js";
|
|
45
|
+
import ScrollbarBox from "./Components/ScrollbarBox/ScrollbarBox.js";
|
|
45
46
|
import Skeletons from "./Components/Skeletons/Skeletons.js";
|
|
46
47
|
import Switch from "./Components/Switch/Switch.js";
|
|
48
|
+
import ToggleSwitch from "./Components/ToggleSwitch/ToggleSwitch.js";
|
|
49
|
+
import SegmentedControl from "./Components/SegmentedControl/SegmentedControl.js";
|
|
47
50
|
import Table from "./Components/Table/Table.js";
|
|
48
51
|
import Tag from "./Components/Tag/Tag.js";
|
|
49
52
|
import TextInput from "./Components/Input/TextInput.js";
|
|
@@ -83,6 +86,7 @@ import FilePreview, { FilePreviewTrigger, } from "./Components/FilePreview/FileP
|
|
|
83
86
|
import StageProgress from "./Components/StageProgress/StageProgress.js";
|
|
84
87
|
import StageItem from "./Components/StageProgress/StageItem.js";
|
|
85
88
|
import OrgSwitcher from "./Components/OrgSwitcher/OrgSwitcher.js";
|
|
89
|
+
import AppSwitcher from "./Components/AppSwitcher/AppSwitcher.js";
|
|
86
90
|
import UpgradeButton from "./Components/UpgradeButton/UpgradeButton.js";
|
|
87
91
|
import PlanPill from "./Components/PlanPill/PlanPill.js";
|
|
88
92
|
import PlanBadge from "./Components/PlanBadge/PlanBadge.js";
|
|
@@ -96,7 +100,7 @@ import SignInActivityTable from "./Components/SignInActivityTable/SignInActivity
|
|
|
96
100
|
import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails.js";
|
|
97
101
|
export {
|
|
98
102
|
// components
|
|
99
|
-
Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, ApexAreaChart, ApexRadialChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, LimitReachedModal, UpgradeButton, PlanPill, PlanBadge, formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, resolvePlanBadge, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp,
|
|
103
|
+
Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, ApexAreaChart, ApexRadialChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, AppSwitcher, LimitReachedModal, UpgradeButton, PlanPill, PlanBadge, formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, resolvePlanBadge, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, ScrollbarBox, Skeletons, Switch, ToggleSwitch, SegmentedControl, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp,
|
|
100
104
|
// hooks
|
|
101
105
|
useSidebarPrefs, useIsTruncated,
|
|
102
106
|
// themes
|
|
@@ -123,6 +127,15 @@ export { buildDarkPalette } from "./Theme/tokens/builders/buildDarkPalette.js";
|
|
|
123
127
|
// status chips and generated avatars. Consumers pass a scale/seed and get tokens that already
|
|
124
128
|
// clear the bar, instead of pinning hexes that go stale when a palette moves.
|
|
125
129
|
export { AA_NON_TEXT, liftToContrast, withOutlineRung, } from "./Theme/tokens/builders/outlineRung.js";
|
|
130
|
+
// The three backgrounds a selectable row rests on, for a consumer's own list. Neutral by
|
|
131
|
+
// construction, so the canvas ink stays readable on every one of them.
|
|
132
|
+
export { listRowBackgrounds } from "./Theme/tokens/builders/rowStates.js";
|
|
133
|
+
// The two-tone `:focus-visible` indicator, derived per brand per mode. `buildFocusRing` resolves
|
|
134
|
+
// the pair from a palette; `focusVisibleStyles` is the ready-made Chakra pseudo-selector block a
|
|
135
|
+
// consumer's own control can spread to get the same ring Button draws. Both exist because Chakra's
|
|
136
|
+
// `shadows.outline` is one hardcoded blue that fails WCAG 1.4.11 on every Pixelize palette.
|
|
137
|
+
export { buildFocusRing, settleBetween, withFocusRing } from "./Theme/tokens/builders/focusRing.js";
|
|
138
|
+
export { focusRingShadow, focusVisibleRing, focusVisibleStyles, FOCUS_VISIBLE_OVER_STATE, FOCUS_HALO_WIDTH, FOCUS_RING_WIDTH, } from "./Theme/chakra/focusRing.styles.js";
|
|
126
139
|
export { AVATAR_SEEDS, avatarFillFor, meetsBodyText, resolveAvatarFill, resolveStatusTone, } from "./Theme/tokens/builders/statusTone.js";
|
|
127
140
|
// WCAG contrast + accent-picking helpers this library uses internally to keep text readable
|
|
128
141
|
// against any canvas/fill a palette produces. Pure and dependency-free — consumers building
|
|
@@ -135,3 +148,13 @@ export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, pickAccentText,
|
|
|
135
148
|
// primitives; `compositeOver` flattens a translucent color onto a backdrop first (an alpha
|
|
136
149
|
// color has no defined luminance on its own, so measure the composited result, not the tint).
|
|
137
150
|
export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexToHsl, hslToHex, withLightness, mix, relativeLuminance, contrastRatio, } from "./Theme/tokens/builders/color.js";
|
|
151
|
+
// Calendar day marking (`DatePicker` + `isRange`). Exported so a consumer can build a legend,
|
|
152
|
+
// or a summary line, from the SAME keys, tokens and phrasing the calendar itself paints and
|
|
153
|
+
// announces — a hand-copied legend is how a legend goes stale.
|
|
154
|
+
export { DAY_STATE_KEYS, DAY_CLASS as CALENDAR_DAY_CLASS, isDayStateKey, resolveDayStateVisual, describeDayStates, } from "./Components/DatePicker/dayStates.js";
|
|
155
|
+
export { appInitials, filterApps, matchesShortcut, formatShortcut, buildSuiteApps, } from "./Components/AppSwitcher/AppSwitcherProps.js";
|
|
156
|
+
export { useAppSwitcherShortcut } from "./Components/AppSwitcher/useAppSwitcherShortcut.js";
|
|
157
|
+
export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar.js";
|
|
158
|
+
export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk.js";
|
|
159
|
+
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk.js";
|
|
160
|
+
export * from "./Components/Primitives/Primitives.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -40,8 +40,11 @@ import SearchSelect from "./Components/SearchSelect/SearchSelect";
|
|
|
40
40
|
import SelectSearch from "./Components/SelectSearch/SelectSearch";
|
|
41
41
|
import SideBar from "./Components/SideBar/SideBar";
|
|
42
42
|
import Slider from "./Components/Slider/Slider";
|
|
43
|
+
import ScrollbarBox from "./Components/ScrollbarBox/ScrollbarBox";
|
|
43
44
|
import Skeletons from "./Components/Skeletons/Skeletons";
|
|
44
45
|
import Switch from "./Components/Switch/Switch";
|
|
46
|
+
import ToggleSwitch from "./Components/ToggleSwitch/ToggleSwitch";
|
|
47
|
+
import SegmentedControl from "./Components/SegmentedControl/SegmentedControl";
|
|
45
48
|
import Table from "./Components/Table/Table";
|
|
46
49
|
import Tag from "./Components/Tag/Tag";
|
|
47
50
|
import TextInput from "./Components/Input/TextInput";
|
|
@@ -80,6 +83,7 @@ import FilePreview, { FilePreviewTrigger } from "./Components/FilePreview/FilePr
|
|
|
80
83
|
import StageProgress from "./Components/StageProgress/StageProgress";
|
|
81
84
|
import StageItem from "./Components/StageProgress/StageItem";
|
|
82
85
|
import OrgSwitcher from "./Components/OrgSwitcher/OrgSwitcher";
|
|
86
|
+
import AppSwitcher from "./Components/AppSwitcher/AppSwitcher";
|
|
83
87
|
import UpgradeButton from "./Components/UpgradeButton/UpgradeButton";
|
|
84
88
|
import PlanPill from "./Components/PlanPill/PlanPill";
|
|
85
89
|
import PlanBadge from "./Components/PlanBadge/PlanBadge";
|
|
@@ -91,7 +95,7 @@ import RolesPermission from "./Components/RolesPermission/RolesPermission";
|
|
|
91
95
|
import CustomModulesTable from "./Components/CustomModulesTable/CustomModulesTable";
|
|
92
96
|
import SignInActivityTable from "./Components/SignInActivityTable/SignInActivityTable";
|
|
93
97
|
import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails";
|
|
94
|
-
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, ApexAreaChart, ApexRadialChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, LimitReachedModal, UpgradeButton, PlanPill, PlanBadge, formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, resolvePlanBadge, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, isAllowedReturnUrl, resolveReturnUrl, createAccountHandoff, };
|
|
98
|
+
export { Accordian, AlertDialog, ApexBarChart, ApexPieChart, ApexPolarChart, ApexLineChart, ApexAreaChart, ApexRadialChart, Breadcrumbs, Button, ButtonGroupIcon, Card, Checkbox, ContactForm, DatePicker, Drawer, DrawerHeader, DrawerBody, DrawerFooter, Dropdown, Editor, EmptyState, WorkspaceWindow, WorkspaceTray, WorkspaceTrayPreview, FieldSelectModal, FilePreview, FilePreviewTrigger, FileUpload, FileUploader, FilterSidebar, FormWrapper, LazyWrapper, MoreItems, PdfViewer, ScrollToTop, CopyButton, StageProgress, StageItem, OrgSwitcher, AppSwitcher, LimitReachedModal, UpgradeButton, PlanPill, PlanBadge, formatPlanElapsed, formatPlanExpiry, formatPlanRemaining, resolvePlanBadge, splitMonthsAndDays, UserDetails, RolesPermission, CustomModulesTable, SignInActivityTable, OrganizationDetails, Header, HeaderActions, InputTextArea, InputSwitch, KanbanBoard, Loading, Modal, ModalHeader, ModalBody, ModalFooter, NavigationBar, Notification, NoteTextArea, MultiSelect, NumberInput, PaymentCard, PhoneNumberInput, PinInput, ProductCard, ProductDetails, ProfileCard, ProfileCardHeader, ProfileCardBody, ProfileCardFooter, ProfilePhotoViewer, ProgressBar, RadioButton, RadioButtonGroup, Reorder, Search, Select, SelectV2, SearchSelect, SelectSearch, SideBar, Slider, ScrollbarBox, Skeletons, Switch, ToggleSwitch, SegmentedControl, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, isAllowedReturnUrl, resolveReturnUrl, createAccountHandoff, };
|
|
95
99
|
export default withTheme;
|
|
96
100
|
export type { UserDetailsProps, UserDetailsLabels, UserListItem, SelectedUserDetail, UserDetailRow, RoleOption, AddUserFormValues, ChangeRoleSubmitPayload, } from "./Components/UserDetails/UserDetailsProps";
|
|
97
101
|
export type { WorkspaceWindowProps, WorkspaceWindowState, WorkspaceTrayProps, WorkspaceTrayItem, WorkspaceTrayPreviewProps, } from "./Components/WorkspaceWindow/WorkspaceWindowProps";
|
|
@@ -109,9 +113,14 @@ export { brandThemes } from "./Theme";
|
|
|
109
113
|
export { lightPalettes, darkPalettes, palettes, themeNames, } from "./Theme/tokens/brands";
|
|
110
114
|
export { buildDarkPalette } from "./Theme/tokens/builders/buildDarkPalette";
|
|
111
115
|
export { AA_NON_TEXT, liftToContrast, withOutlineRung, } from "./Theme/tokens/builders/outlineRung";
|
|
116
|
+
export { listRowBackgrounds } from "./Theme/tokens/builders/rowStates";
|
|
117
|
+
export type { RowStateBackgrounds } from "./Theme/tokens/builders/rowStates";
|
|
118
|
+
export { buildFocusRing, settleBetween, withFocusRing } from "./Theme/tokens/builders/focusRing";
|
|
119
|
+
export type { FocusRingSource } from "./Theme/tokens/builders/focusRing";
|
|
120
|
+
export { focusRingShadow, focusVisibleRing, focusVisibleStyles, FOCUS_VISIBLE_OVER_STATE, FOCUS_HALO_WIDTH, FOCUS_RING_WIDTH, } from "./Theme/chakra/focusRing.styles";
|
|
112
121
|
export { AVATAR_SEEDS, avatarFillFor, meetsBodyText, resolveAvatarFill, resolveStatusTone, } from "./Theme/tokens/builders/statusTone";
|
|
113
122
|
export type { StatusTone } from "./Theme/tokens/builders/statusTone";
|
|
114
|
-
export type { ColorMode, ResolvedColorMode, ThemeName, PaletteProps, ColorScale, BrandScale, SemanticColors, NamedSurfaces, } from "./Theme/tokens/types";
|
|
123
|
+
export type { ColorMode, ResolvedColorMode, ThemeName, PaletteProps, ColorScale, BrandScale, SemanticColors, NamedSurfaces, FocusRingTokens, } from "./Theme/tokens/types";
|
|
115
124
|
export { statusGradient, inkSafeGradient, chipFill, chipBorder, ACCENT_GRADIENT, STATUS_INK, } from "./Components/PlanPill/planPillGradient";
|
|
116
125
|
export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, pickAccentText, AA_NORMAL_TEXT, DARK_CANVAS_LUMINANCE, } from "./Theme/tokens/builders/accentText";
|
|
117
126
|
export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexToHsl, hslToHex, withLightness, mix, relativeLuminance, contrastRatio, } from "./Theme/tokens/builders/color";
|
|
@@ -123,7 +132,7 @@ export type { PlanBadgeInput, PlanBadgeResult } from "./Utils/planBadge";
|
|
|
123
132
|
export type { PlanExpiryInput } from "./Utils/planExpiry";
|
|
124
133
|
export type { LimitReachedModalProps, LimitKind, } from "./Components/LimitReachedModal/LimitReachedModalProps";
|
|
125
134
|
export type { AccountHandoffConfig, AccountHandoff, AccountHandoffLinkOptions, AccountHandoffUsersOptions, ResolveReturnUrlOptions, } from "./Utils/accountHandoff";
|
|
126
|
-
export type { TableProps, TableHeaderProps, TableColumnType, TableDensity, TableEmptyState, TableRenderGroup, HeaderActionsProps, ColumnSortingProps, ExportOption, DataObject, FilterValues, } from "./Components/Table/TableProps";
|
|
135
|
+
export type { TableProps, TableHeaderProps, TableColumnType, TableDensity, TableVariant, TableEmptyState, TableRenderGroup, HeaderActionsProps, ColumnSortingProps, ExportOption, DataObject, FilterValues, } from "./Components/Table/TableProps";
|
|
127
136
|
export type { ButtonProps } from "./Components/Button/ButtonProps";
|
|
128
137
|
export type { CardProps } from "./Components/Card/CardProps";
|
|
129
138
|
export type { ProfileCardProps, ProfileCardVariant, ProfileCardVariantLegacy, } from "./Components/ProfileCard/ProfileCardProps";
|
|
@@ -134,12 +143,16 @@ export type { chakraSelectProps as SelectProps, OptionProp as SelectOption, } fr
|
|
|
134
143
|
export type { SearchSelectProps, Options as SearchSelectOption } from "./Components/SearchSelect/SearchSelectProps";
|
|
135
144
|
export type { MultiSelectProps, MultiSelctOPtions as MultiSelectOption } from "./Components/MultiSelect/MultiSelectProps";
|
|
136
145
|
export type { SearchProps } from "./Components/Search/SearchProps";
|
|
146
|
+
export { DAY_STATE_KEYS, DAY_CLASS as CALENDAR_DAY_CLASS, isDayStateKey, resolveDayStateVisual, describeDayStates, } from "./Components/DatePicker/dayStates";
|
|
147
|
+
export type { DayStateKey, DayStates, DayStateVisual, RenderDayContent, } from "./Components/DatePicker/dayStates";
|
|
137
148
|
export type { DatePickerProps, TimePickerProps, SingleDatePickerProps, RangeDatePickerProps, RangeDate, PickerType, } from "./Components/DatePicker/DatePickerProps";
|
|
138
149
|
export type { TextInputProps } from "./Components/Input/TextInputProps";
|
|
139
150
|
export type { InputTextAreaProps } from "./Components/InputTextArea/InputTextAreaProps";
|
|
140
151
|
export type { NumberInputProps, ActiveStyle as NumberInputActiveStyle } from "./Components/NumberInput/NumberInputProps";
|
|
141
152
|
export type { CheckboxProps } from "./Components/Checkbox/CheckboxProps";
|
|
142
153
|
export type { SwitchProps } from "./Components/Switch/SwitchProps";
|
|
154
|
+
export type { ToggleSwitchProps, ToggleSwitchSize } from "./Components/ToggleSwitch/ToggleSwitchProps";
|
|
155
|
+
export type { SegmentedControlProps, SegmentedControlOption, SegmentedControlSize, } from "./Components/SegmentedControl/SegmentedControlProps";
|
|
143
156
|
export type { ChakraRadioProps as RadioButtonProps, ChakraRadioGroupProps as RadioButtonGroupProps } from "./Components/RadioButton/RadioButtonProps";
|
|
144
157
|
export type { ChakraPinInputProps as PinInputProps } from "./Components/PinInput/PinInputProps";
|
|
145
158
|
export type { TagProps, TagSize, TagVariant, TagColorScheme } from "./Components/Tag/TagProps";
|
|
@@ -156,3 +169,14 @@ export type { FileUploaderProps, MimeExtension } from "./Components/FileUpload/F
|
|
|
156
169
|
export type { SidebarProps, SidebarUser, SecondaryBarProps, OtherAppsProps, MenuProps as SidebarMenuProps, } from "./Components/SideBar/SideBarProps";
|
|
157
170
|
export type { NavbarProps, MenuProps as NavbarMenuProps } from "./Components/NavigationBar/NavigationBarProps";
|
|
158
171
|
export type { HeaderProps } from "./Components/Header/HeaderProps";
|
|
172
|
+
export { appInitials, filterApps, matchesShortcut, formatShortcut, buildSuiteApps, } from "./Components/AppSwitcher/AppSwitcherProps";
|
|
173
|
+
export { useAppSwitcherShortcut } from "./Components/AppSwitcher/useAppSwitcherShortcut";
|
|
174
|
+
export type { AppOption, AppIcon, AppSwitcherProps, SuiteAppSource, SuiteUrlOptions, } from "./Components/AppSwitcher/AppSwitcherProps";
|
|
175
|
+
export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar";
|
|
176
|
+
export type { ScrollbarVariant, ScrollbarStyle, } from "./Theme/tokens/builders/scrollbar";
|
|
177
|
+
export type { ScrollbarBoxProps } from "./Components/ScrollbarBox/ScrollbarBox";
|
|
178
|
+
export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk";
|
|
179
|
+
export type { FieldSurfaces } from "./Theme/tokens/builders/placeholderInk";
|
|
180
|
+
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk";
|
|
181
|
+
export type { Gradient, ResolvedGradient, } from "./Theme/tokens/builders/gradientInk";
|
|
182
|
+
export * from "./Components/Primitives/Primitives";
|
package/dist/index.js
CHANGED
|
@@ -33,14 +33,17 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
33
33
|
return result;
|
|
34
34
|
};
|
|
35
35
|
})();
|
|
36
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
37
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
38
|
+
};
|
|
36
39
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
37
40
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
38
41
|
};
|
|
39
42
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
40
|
-
exports.
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.contrastRatio = exports.relativeLuminance = exports.mix = exports.withLightness = exports.hslToHex = exports.hexToHsl = exports.hslToRgb = exports.rgbToHsl = void 0;
|
|
43
|
+
exports.splitMonthsAndDays = exports.resolvePlanBadge = exports.formatPlanRemaining = exports.formatPlanExpiry = exports.formatPlanElapsed = exports.PlanBadge = exports.PlanPill = exports.UpgradeButton = exports.LimitReachedModal = exports.AppSwitcher = exports.OrgSwitcher = exports.StageItem = exports.StageProgress = exports.CopyButton = exports.ScrollToTop = exports.PdfViewer = exports.MoreItems = exports.LazyWrapper = exports.FormWrapper = exports.FilterSidebar = exports.FileUploader = exports.FileUpload = exports.FilePreviewTrigger = exports.FilePreview = exports.FieldSelectModal = exports.WorkspaceTrayPreview = exports.WorkspaceTray = exports.WorkspaceWindow = exports.EmptyState = exports.Editor = exports.Dropdown = exports.DrawerFooter = exports.DrawerBody = exports.DrawerHeader = exports.Drawer = exports.DatePicker = exports.ContactForm = exports.Checkbox = exports.Card = exports.ButtonGroupIcon = exports.Button = exports.Breadcrumbs = exports.ApexRadialChart = exports.ApexAreaChart = exports.ApexLineChart = exports.ApexPolarChart = exports.ApexPieChart = exports.ApexBarChart = exports.AlertDialog = exports.Accordian = void 0;
|
|
44
|
+
exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = exports.SegmentedControl = exports.ToggleSwitch = exports.Switch = exports.Skeletons = exports.ScrollbarBox = exports.Slider = exports.SideBar = exports.SelectSearch = exports.SearchSelect = exports.SelectV2 = exports.Select = exports.Search = exports.Reorder = exports.RadioButtonGroup = exports.RadioButton = exports.ProgressBar = exports.ProfilePhotoViewer = exports.ProfileCardFooter = exports.ProfileCardBody = exports.ProfileCardHeader = exports.ProfileCard = exports.ProductDetails = exports.ProductCard = exports.PinInput = exports.PhoneNumberInput = exports.PaymentCard = exports.NumberInput = exports.MultiSelect = exports.NoteTextArea = exports.Notification = exports.NavigationBar = exports.ModalFooter = exports.ModalBody = exports.ModalHeader = exports.Modal = exports.Loading = exports.KanbanBoard = exports.InputSwitch = exports.InputTextArea = exports.HeaderActions = exports.Header = exports.OrganizationDetails = exports.SignInActivityTable = exports.CustomModulesTable = exports.RolesPermission = exports.UserDetails = void 0;
|
|
45
|
+
exports.chipFill = exports.inkSafeGradient = exports.statusGradient = exports.resolveStatusTone = exports.resolveAvatarFill = exports.meetsBodyText = exports.avatarFillFor = exports.AVATAR_SEEDS = exports.FOCUS_RING_WIDTH = exports.FOCUS_HALO_WIDTH = exports.FOCUS_VISIBLE_OVER_STATE = exports.focusVisibleStyles = exports.focusVisibleRing = exports.focusRingShadow = exports.withFocusRing = exports.settleBetween = exports.buildFocusRing = exports.listRowBackgrounds = exports.withOutlineRung = exports.liftToContrast = exports.AA_NON_TEXT = exports.buildDarkPalette = exports.themeNames = exports.palettes = exports.darkPalettes = exports.lightPalettes = exports.brandThemes = exports.AppearanceSettings = exports.useFontSizeSync = exports.resolveFontSize = exports.isFontSize = exports.FONT_SIZE_OPTIONS = exports.DEFAULT_FONT_SIZE = exports.ThemeSwitcher = exports.useThemeMode = exports.PixelizeThemeProvider = exports.createAccountHandoff = exports.resolveReturnUrl = exports.isAllowedReturnUrl = exports.debounce = exports.ThemesList = exports.useCustomTheme = exports.useIsTruncated = exports.useSidebarPrefs = exports.VerifyEmailOtp = exports.useToaster = exports.OverflowToolTip = exports.ToolTip = exports.Toaster = exports.Timeline = void 0;
|
|
46
|
+
exports.inkSafeGradientToken = exports.gradientCss = exports.resolveGradient = exports.fieldSurfaces = exports.placeholderInkOn = exports.placeholderInk = exports.SCROLLBAR_WIDTH = exports.globalScrollbarStyles = exports.scrollbarStyles = exports.useAppSwitcherShortcut = exports.buildSuiteApps = exports.formatShortcut = exports.matchesShortcut = exports.filterApps = exports.appInitials = exports.describeDayStates = exports.resolveDayStateVisual = exports.isDayStateKey = exports.CALENDAR_DAY_CLASS = exports.DAY_STATE_KEYS = exports.contrastRatio = exports.relativeLuminance = exports.mix = exports.withLightness = exports.hslToHex = exports.hexToHsl = exports.hslToRgb = exports.rgbToHsl = exports.rgbToHex = exports.compositeOver = exports.hexToRgba = exports.hexToRgb = exports.DARK_CANVAS_LUMINANCE = exports.AA_NORMAL_TEXT = exports.pickAccentText = exports.accentTextOnCanvas = exports.onGradient = exports.onFilled = exports.isDarkCanvas = exports.STATUS_INK = exports.ACCENT_GRADIENT = exports.chipBorder = void 0;
|
|
44
47
|
const Accordion_1 = __importDefault(require("./Components/Accordion/Accordion"));
|
|
45
48
|
exports.Accordian = Accordion_1.default;
|
|
46
49
|
const AlertDialog_1 = __importDefault(require("./Components/AlertDialog/AlertDialog"));
|
|
@@ -136,10 +139,16 @@ const SideBar_1 = __importDefault(require("./Components/SideBar/SideBar"));
|
|
|
136
139
|
exports.SideBar = SideBar_1.default;
|
|
137
140
|
const Slider_1 = __importDefault(require("./Components/Slider/Slider"));
|
|
138
141
|
exports.Slider = Slider_1.default;
|
|
142
|
+
const ScrollbarBox_1 = __importDefault(require("./Components/ScrollbarBox/ScrollbarBox"));
|
|
143
|
+
exports.ScrollbarBox = ScrollbarBox_1.default;
|
|
139
144
|
const Skeletons_1 = __importDefault(require("./Components/Skeletons/Skeletons"));
|
|
140
145
|
exports.Skeletons = Skeletons_1.default;
|
|
141
146
|
const Switch_1 = __importDefault(require("./Components/Switch/Switch"));
|
|
142
147
|
exports.Switch = Switch_1.default;
|
|
148
|
+
const ToggleSwitch_1 = __importDefault(require("./Components/ToggleSwitch/ToggleSwitch"));
|
|
149
|
+
exports.ToggleSwitch = ToggleSwitch_1.default;
|
|
150
|
+
const SegmentedControl_1 = __importDefault(require("./Components/SegmentedControl/SegmentedControl"));
|
|
151
|
+
exports.SegmentedControl = SegmentedControl_1.default;
|
|
143
152
|
const Table_1 = __importDefault(require("./Components/Table/Table"));
|
|
144
153
|
exports.Table = Table_1.default;
|
|
145
154
|
const Tag_1 = __importDefault(require("./Components/Tag/Tag"));
|
|
@@ -221,6 +230,8 @@ const StageItem_1 = __importDefault(require("./Components/StageProgress/StageIte
|
|
|
221
230
|
exports.StageItem = StageItem_1.default;
|
|
222
231
|
const OrgSwitcher_1 = __importDefault(require("./Components/OrgSwitcher/OrgSwitcher"));
|
|
223
232
|
exports.OrgSwitcher = OrgSwitcher_1.default;
|
|
233
|
+
const AppSwitcher_1 = __importDefault(require("./Components/AppSwitcher/AppSwitcher"));
|
|
234
|
+
exports.AppSwitcher = AppSwitcher_1.default;
|
|
224
235
|
const UpgradeButton_1 = __importDefault(require("./Components/UpgradeButton/UpgradeButton"));
|
|
225
236
|
exports.UpgradeButton = UpgradeButton_1.default;
|
|
226
237
|
const PlanPill_1 = __importDefault(require("./Components/PlanPill/PlanPill"));
|
|
@@ -282,6 +293,25 @@ var outlineRung_1 = require("./Theme/tokens/builders/outlineRung");
|
|
|
282
293
|
Object.defineProperty(exports, "AA_NON_TEXT", { enumerable: true, get: function () { return outlineRung_1.AA_NON_TEXT; } });
|
|
283
294
|
Object.defineProperty(exports, "liftToContrast", { enumerable: true, get: function () { return outlineRung_1.liftToContrast; } });
|
|
284
295
|
Object.defineProperty(exports, "withOutlineRung", { enumerable: true, get: function () { return outlineRung_1.withOutlineRung; } });
|
|
296
|
+
// The three backgrounds a selectable row rests on, for a consumer's own list. Neutral by
|
|
297
|
+
// construction, so the canvas ink stays readable on every one of them.
|
|
298
|
+
var rowStates_1 = require("./Theme/tokens/builders/rowStates");
|
|
299
|
+
Object.defineProperty(exports, "listRowBackgrounds", { enumerable: true, get: function () { return rowStates_1.listRowBackgrounds; } });
|
|
300
|
+
// The two-tone `:focus-visible` indicator, derived per brand per mode. `buildFocusRing` resolves
|
|
301
|
+
// the pair from a palette; `focusVisibleStyles` is the ready-made Chakra pseudo-selector block a
|
|
302
|
+
// consumer's own control can spread to get the same ring Button draws. Both exist because Chakra's
|
|
303
|
+
// `shadows.outline` is one hardcoded blue that fails WCAG 1.4.11 on every Pixelize palette.
|
|
304
|
+
var focusRing_1 = require("./Theme/tokens/builders/focusRing");
|
|
305
|
+
Object.defineProperty(exports, "buildFocusRing", { enumerable: true, get: function () { return focusRing_1.buildFocusRing; } });
|
|
306
|
+
Object.defineProperty(exports, "settleBetween", { enumerable: true, get: function () { return focusRing_1.settleBetween; } });
|
|
307
|
+
Object.defineProperty(exports, "withFocusRing", { enumerable: true, get: function () { return focusRing_1.withFocusRing; } });
|
|
308
|
+
var focusRing_styles_1 = require("./Theme/chakra/focusRing.styles");
|
|
309
|
+
Object.defineProperty(exports, "focusRingShadow", { enumerable: true, get: function () { return focusRing_styles_1.focusRingShadow; } });
|
|
310
|
+
Object.defineProperty(exports, "focusVisibleRing", { enumerable: true, get: function () { return focusRing_styles_1.focusVisibleRing; } });
|
|
311
|
+
Object.defineProperty(exports, "focusVisibleStyles", { enumerable: true, get: function () { return focusRing_styles_1.focusVisibleStyles; } });
|
|
312
|
+
Object.defineProperty(exports, "FOCUS_VISIBLE_OVER_STATE", { enumerable: true, get: function () { return focusRing_styles_1.FOCUS_VISIBLE_OVER_STATE; } });
|
|
313
|
+
Object.defineProperty(exports, "FOCUS_HALO_WIDTH", { enumerable: true, get: function () { return focusRing_styles_1.FOCUS_HALO_WIDTH; } });
|
|
314
|
+
Object.defineProperty(exports, "FOCUS_RING_WIDTH", { enumerable: true, get: function () { return focusRing_styles_1.FOCUS_RING_WIDTH; } });
|
|
285
315
|
var statusTone_1 = require("./Theme/tokens/builders/statusTone");
|
|
286
316
|
Object.defineProperty(exports, "AVATAR_SEEDS", { enumerable: true, get: function () { return statusTone_1.AVATAR_SEEDS; } });
|
|
287
317
|
Object.defineProperty(exports, "avatarFillFor", { enumerable: true, get: function () { return statusTone_1.avatarFillFor; } });
|
|
@@ -324,3 +354,33 @@ Object.defineProperty(exports, "withLightness", { enumerable: true, get: functio
|
|
|
324
354
|
Object.defineProperty(exports, "mix", { enumerable: true, get: function () { return color_1.mix; } });
|
|
325
355
|
Object.defineProperty(exports, "relativeLuminance", { enumerable: true, get: function () { return color_1.relativeLuminance; } });
|
|
326
356
|
Object.defineProperty(exports, "contrastRatio", { enumerable: true, get: function () { return color_1.contrastRatio; } });
|
|
357
|
+
// Calendar day marking (`DatePicker` + `isRange`). Exported so a consumer can build a legend,
|
|
358
|
+
// or a summary line, from the SAME keys, tokens and phrasing the calendar itself paints and
|
|
359
|
+
// announces — a hand-copied legend is how a legend goes stale.
|
|
360
|
+
var dayStates_1 = require("./Components/DatePicker/dayStates");
|
|
361
|
+
Object.defineProperty(exports, "DAY_STATE_KEYS", { enumerable: true, get: function () { return dayStates_1.DAY_STATE_KEYS; } });
|
|
362
|
+
Object.defineProperty(exports, "CALENDAR_DAY_CLASS", { enumerable: true, get: function () { return dayStates_1.DAY_CLASS; } });
|
|
363
|
+
Object.defineProperty(exports, "isDayStateKey", { enumerable: true, get: function () { return dayStates_1.isDayStateKey; } });
|
|
364
|
+
Object.defineProperty(exports, "resolveDayStateVisual", { enumerable: true, get: function () { return dayStates_1.resolveDayStateVisual; } });
|
|
365
|
+
Object.defineProperty(exports, "describeDayStates", { enumerable: true, get: function () { return dayStates_1.describeDayStates; } });
|
|
366
|
+
var AppSwitcherProps_1 = require("./Components/AppSwitcher/AppSwitcherProps");
|
|
367
|
+
Object.defineProperty(exports, "appInitials", { enumerable: true, get: function () { return AppSwitcherProps_1.appInitials; } });
|
|
368
|
+
Object.defineProperty(exports, "filterApps", { enumerable: true, get: function () { return AppSwitcherProps_1.filterApps; } });
|
|
369
|
+
Object.defineProperty(exports, "matchesShortcut", { enumerable: true, get: function () { return AppSwitcherProps_1.matchesShortcut; } });
|
|
370
|
+
Object.defineProperty(exports, "formatShortcut", { enumerable: true, get: function () { return AppSwitcherProps_1.formatShortcut; } });
|
|
371
|
+
Object.defineProperty(exports, "buildSuiteApps", { enumerable: true, get: function () { return AppSwitcherProps_1.buildSuiteApps; } });
|
|
372
|
+
var useAppSwitcherShortcut_1 = require("./Components/AppSwitcher/useAppSwitcherShortcut");
|
|
373
|
+
Object.defineProperty(exports, "useAppSwitcherShortcut", { enumerable: true, get: function () { return useAppSwitcherShortcut_1.useAppSwitcherShortcut; } });
|
|
374
|
+
var scrollbar_1 = require("./Theme/tokens/builders/scrollbar");
|
|
375
|
+
Object.defineProperty(exports, "scrollbarStyles", { enumerable: true, get: function () { return scrollbar_1.scrollbarStyles; } });
|
|
376
|
+
Object.defineProperty(exports, "globalScrollbarStyles", { enumerable: true, get: function () { return scrollbar_1.globalScrollbarStyles; } });
|
|
377
|
+
Object.defineProperty(exports, "SCROLLBAR_WIDTH", { enumerable: true, get: function () { return scrollbar_1.SCROLLBAR_WIDTH; } });
|
|
378
|
+
var placeholderInk_1 = require("./Theme/tokens/builders/placeholderInk");
|
|
379
|
+
Object.defineProperty(exports, "placeholderInk", { enumerable: true, get: function () { return placeholderInk_1.placeholderInk; } });
|
|
380
|
+
Object.defineProperty(exports, "placeholderInkOn", { enumerable: true, get: function () { return placeholderInk_1.placeholderInkOn; } });
|
|
381
|
+
Object.defineProperty(exports, "fieldSurfaces", { enumerable: true, get: function () { return placeholderInk_1.fieldSurfaces; } });
|
|
382
|
+
var gradientInk_1 = require("./Theme/tokens/builders/gradientInk");
|
|
383
|
+
Object.defineProperty(exports, "resolveGradient", { enumerable: true, get: function () { return gradientInk_1.resolveGradient; } });
|
|
384
|
+
Object.defineProperty(exports, "gradientCss", { enumerable: true, get: function () { return gradientInk_1.gradientCss; } });
|
|
385
|
+
Object.defineProperty(exports, "inkSafeGradientToken", { enumerable: true, get: function () { return gradientInk_1.inkSafeGradient; } });
|
|
386
|
+
__exportStar(require("./Components/Primitives/Primitives"), exports);
|