pixelize-design-library 2.4.2-beta.2 → 2.4.2-beta.21
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 +2 -2
- package/dist/Components/Button/Button.d.ts +2 -2
- package/dist/Components/Button/Button.js +3 -3
- package/dist/Components/Button/Button.styles.js +4 -3
- 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/Checkbox/Checkbox.js +1 -1
- package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
- package/dist/Components/Common/fieldStyles.js +1 -1
- package/dist/Components/CopyButton/CopyButton.js +1 -1
- package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/Components/DatePicker/CalendarPanel.js +1 -1
- package/dist/Components/DatePicker/RangeDatePicker.js +2 -2
- package/dist/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/Components/Dropdown/DropDown.js +3 -13
- package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/Components/FilePreview/FilePreview.js +1 -1
- package/dist/Components/FileUpload/FileUpload.js +3 -2
- package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -1
- package/dist/Components/FileUpload/constants.js +1 -0
- package/dist/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/Components/Form/FormWrapper.js +1 -1
- 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/MultiSelect/MultiSelect.js +1 -1
- package/dist/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/Components/NoteTextArea/NoteTextArea.js +5 -3
- package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- 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/ProfileCard/ProfileCard.js +1 -1
- package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/Components/RadioButton/RadioButton.js +1 -1
- package/dist/Components/Reorder/Reorder.js +1 -1
- package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
- package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
- package/dist/Components/SearchSelect/SearchSelect.js +5 -4
- package/dist/Components/Select/Select.styles.js +3 -2
- package/dist/Components/SelectSearch/SelectSearch.js +3 -3
- package/dist/Components/SelectV2/SelectV2.js +5 -11
- package/dist/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/Components/StageProgress/StageProgress.js +2 -9
- 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/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 +3 -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/Timeline/Timeline.js +2 -2
- package/dist/Components/Toaster/Toaster.js +1 -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/chakra/Menu.styles.d.ts +9 -6
- package/dist/Theme/chakra/Menu.styles.js +11 -5
- package/dist/Theme/chakra/Popover.styles.d.ts +6 -3
- package/dist/Theme/chakra/Popover.styles.js +11 -6
- package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
- package/dist/Theme/chakra/Switch.styles.js +7 -9
- package/dist/Theme/chakra/componentStyles.d.ts +15 -9
- package/dist/Theme/chakra/createBrandTheme.js +3 -16
- package/dist/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/Theme/provider/ThemeSwitcher.js +13 -20
- package/dist/Theme/tokens/brands/lavender/palette.light.js +2 -6
- package/dist/Theme/tokens/brands/slate/palette.light.js +1 -5
- package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- 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 +3 -0
- package/dist/Theme/tokens/builders/index.js +3 -0
- package/dist/Theme/tokens/builders/outlineRung.d.ts +32 -3
- package/dist/Theme/tokens/builders/outlineRung.js +74 -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/scrollbar.d.ts +12 -0
- package/dist/Theme/tokens/builders/scrollbar.js +57 -0
- package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
- package/dist/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/esm/Components/Accordion/Accordion.js +2 -2
- package/dist/esm/Components/Button/Button.js +4 -4
- package/dist/esm/Components/Button/Button.styles.js +5 -4
- package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
- package/dist/esm/Components/Card/Card.js +2 -2
- package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
- package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
- package/dist/esm/Components/Common/fieldStyles.js +1 -1
- package/dist/esm/Components/CopyButton/CopyButton.js +1 -1
- package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
- package/dist/esm/Components/DatePicker/CalendarPanel.js +1 -1
- package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -2
- package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -2
- package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
- package/dist/esm/Components/Dropdown/DropDown.js +3 -13
- package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
- package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
- package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
- package/dist/esm/Components/FileUpload/constants.js +1 -0
- package/dist/esm/Components/FilterSidebar/FilterSidebar.js +4 -4
- package/dist/esm/Components/Form/FormWrapper.js +1 -1
- 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/MultiSelect/MultiSelect.js +1 -1
- package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
- package/dist/esm/Components/NoteTextArea/NoteTextArea.js +5 -3
- package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
- package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
- 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/ProfileCard/ProfileCard.js +1 -1
- package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
- package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
- package/dist/esm/Components/Reorder/Reorder.js +1 -1
- package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
- package/dist/esm/Components/SearchSelect/SearchSelect.js +5 -4
- package/dist/esm/Components/Select/Select.styles.js +3 -2
- package/dist/esm/Components/SelectSearch/SelectSearch.js +3 -3
- package/dist/esm/Components/SelectV2/SelectV2.js +5 -11
- package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
- package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
- package/dist/esm/Components/Table/Table.js +17 -24
- 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 +3 -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/Timeline/Timeline.js +2 -2
- package/dist/esm/Components/Toaster/Toaster.js +1 -1
- 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/chakra/Menu.styles.js +11 -5
- package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
- package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
- package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
- package/dist/esm/Theme/provider/PixelizeThemeProvider.js +18 -20
- package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
- package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +2 -6
- package/dist/esm/Theme/tokens/brands/slate/palette.light.js +1 -5
- package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
- package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
- package/dist/esm/Theme/tokens/builders/index.js +3 -0
- package/dist/esm/Theme/tokens/builders/outlineRung.js +70 -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/scrollbar.js +52 -0
- package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -5
- package/dist/esm/index.js +6 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.js +21 -3
- package/package.json +4 -2
|
@@ -159,42 +159,40 @@ export const PixelizeThemeProvider = ({ children, brand: brandProp = DEFAULT_BRA
|
|
|
159
159
|
* `data-mode` for consumers that want to hook their own dark CSS.
|
|
160
160
|
*/
|
|
161
161
|
useLayoutEffect(() => {
|
|
162
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
163
162
|
const root = document.documentElement;
|
|
164
163
|
root.dataset.mode = resolvedMode;
|
|
165
|
-
const colors = resolvedTheme
|
|
166
|
-
const
|
|
167
|
-
const gray = colors.gray;
|
|
164
|
+
const { colors } = resolvedTheme;
|
|
165
|
+
const { gray, semantic } = colors;
|
|
168
166
|
const HUE_SCALES = [
|
|
169
167
|
"primary", "gray", "red", "orange", "yellow",
|
|
170
168
|
"green", "teal", "blue", "cyan", "purple", "pink",
|
|
171
169
|
];
|
|
172
|
-
const SEMANTIC_SCALES = ["success", "error", "warning", "info"];
|
|
170
|
+
const SEMANTIC_SCALES = ["success", "error", "warning", "info"];
|
|
173
171
|
const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
|
|
174
|
-
//
|
|
175
|
-
//
|
|
172
|
+
// The dark gray ramp runs dark(50) → light(900), so low rungs read as surfaces
|
|
173
|
+
// and high rungs as text — correct in dark, cleared in light.
|
|
176
174
|
const SEMANTIC_VARS = {
|
|
177
|
-
"text-heading": gray
|
|
178
|
-
"text-subtle": gray
|
|
179
|
-
"bg-main": gray
|
|
180
|
-
"bg-quaternary": gray
|
|
181
|
-
"bg-accent": gray
|
|
182
|
-
"bg-neutral": gray
|
|
183
|
-
"border-default": gray
|
|
184
|
-
"border-dark": gray
|
|
185
|
-
"border-error":
|
|
186
|
-
"border-warning":
|
|
175
|
+
"text-heading": gray[900], "text-body": gray[700],
|
|
176
|
+
"text-subtle": gray[500], "text-input": gray[500],
|
|
177
|
+
"bg-main": gray[50], "bg-secondary": gray[100], "bg-tertiary": gray[100],
|
|
178
|
+
"bg-quaternary": gray[200], "bg-light": gray[50], "bg-medium": gray[100],
|
|
179
|
+
"bg-accent": gray[200], "bg-subtle": gray[100], "bg-muted": gray[200],
|
|
180
|
+
"bg-neutral": gray[100], "bg-base": gray[50], "bg-table-header": gray[100],
|
|
181
|
+
"border-default": gray[200], "border-light": gray[100],
|
|
182
|
+
"border-dark": gray[300], "border-input": gray[300],
|
|
183
|
+
"border-error": semantic.error[500], "border-success": semantic.success[500],
|
|
184
|
+
"border-warning": semantic.warning[500], "border-info": semantic.info[500],
|
|
187
185
|
};
|
|
188
|
-
const set = (name, val) =>
|
|
186
|
+
const set = (name, val) => root.style.setProperty(`--color-${name}`, val);
|
|
189
187
|
const clear = (name) => root.style.removeProperty(`--color-${name}`);
|
|
190
188
|
const allRampNames = [...HUE_SCALES, ...SEMANTIC_SCALES].flatMap((s) => RUNGS.map((r) => `${s}-${r}`));
|
|
191
189
|
if (resolvedMode === "dark") {
|
|
192
190
|
for (const s of HUE_SCALES)
|
|
193
191
|
for (const r of RUNGS)
|
|
194
|
-
set(`${s}-${r}`,
|
|
192
|
+
set(`${s}-${r}`, colors[s][r]);
|
|
195
193
|
for (const s of SEMANTIC_SCALES)
|
|
196
194
|
for (const r of RUNGS)
|
|
197
|
-
set(`${s}-${r}`,
|
|
195
|
+
set(`${s}-${r}`, semantic[s][r]);
|
|
198
196
|
for (const [name, val] of Object.entries(SEMANTIC_VARS))
|
|
199
197
|
set(name, val);
|
|
200
198
|
}
|
|
@@ -22,33 +22,26 @@ const toBrandLabel = (brand) => brand.charAt(0).toUpperCase() + brand.slice(1);
|
|
|
22
22
|
* the dot always matches what selecting that brand actually looks like,
|
|
23
23
|
* regardless of which brand/mode is currently active.
|
|
24
24
|
*/
|
|
25
|
-
const brandSwatchColor = (brand) =>
|
|
26
|
-
|
|
27
|
-
|
|
25
|
+
const brandSwatchColor = (brand) => brandThemes[brand].light.colors.primary[500];
|
|
26
|
+
const BrandSwatch = ({ brand }) => {
|
|
27
|
+
const { colors } = useCustomTheme();
|
|
28
|
+
return (_jsx(Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: colors.boxborder[200], flexShrink: 0 }));
|
|
28
29
|
};
|
|
29
|
-
const BrandSwatch = ({ brand }) => (_jsx(Box, { as: "span", display: "inline-block", w: "0.625rem", h: "0.625rem", borderRadius: "full", bg: brandSwatchColor(brand), border: "1px solid", borderColor: "whiteAlpha.300", flexShrink: 0 }));
|
|
30
30
|
/**
|
|
31
31
|
* Palette values already differ per color mode (`brandThemes[brand].light|dark`), so tokens
|
|
32
32
|
* are read straight from the active theme — no `useColorModeValue` pairing needed here.
|
|
33
|
-
* Fallbacks are Chakra token names, never literal colors, for themes without a brand palette.
|
|
34
33
|
*/
|
|
35
34
|
const useSwitcherColors = () => {
|
|
36
|
-
|
|
37
|
-
const colors = useCustomTheme().colors;
|
|
35
|
+
const { colors } = useCustomTheme();
|
|
38
36
|
return {
|
|
39
|
-
trackBg:
|
|
40
|
-
activeBg:
|
|
41
|
-
activeColor:
|
|
42
|
-
mutedColor:
|
|
43
|
-
hoverBg:
|
|
44
|
-
borderColor:
|
|
45
|
-
//
|
|
46
|
-
|
|
47
|
-
// Re-deriving it here too and pushing it back via `sx` on every render caused a redundant
|
|
48
|
-
// Emotion style recompute per render, which showed up as flicker while hovering/scrolling
|
|
49
|
-
// this list. Keep menuColor (Menu.styles.ts doesn't set list `color` per this component's
|
|
50
|
-
// needs) but stop duplicating menuBg.
|
|
51
|
-
menuColor: (_0 = (_y = (_x = colors === null || colors === void 0 ? void 0 : colors.text) === null || _x === void 0 ? void 0 : _x[900]) !== null && _y !== void 0 ? _y : (_z = colors === null || colors === void 0 ? void 0 : colors.gray) === null || _z === void 0 ? void 0 : _z[900]) !== null && _0 !== void 0 ? _0 : "gray.900",
|
|
37
|
+
trackBg: colors.backgroundColor.secondary,
|
|
38
|
+
activeBg: colors.backgroundColor.main,
|
|
39
|
+
activeColor: colors.primary[500],
|
|
40
|
+
mutedColor: colors.text[600],
|
|
41
|
+
hoverBg: colors.gray[100],
|
|
42
|
+
borderColor: colors.boxborder[200],
|
|
43
|
+
// NOTE: menuBg lives in Menu.styles.ts — re-pushing it via `sx` flickers on every render.
|
|
44
|
+
menuColor: colors.text[900],
|
|
52
45
|
};
|
|
53
46
|
};
|
|
54
47
|
const BrandMenu = ({ size }) => {
|
|
@@ -186,12 +186,8 @@ const disabled = {
|
|
|
186
186
|
800: "#625d75",
|
|
187
187
|
900: "#4b4759",
|
|
188
188
|
};
|
|
189
|
-
//
|
|
190
|
-
|
|
191
|
-
// original let white drop to 3.53 there (`from` already passed at 5.76, unchanged).
|
|
192
|
-
// Nudged one step further (4.511 -> 4.609): the first pass cleared AA by <0.02, too thin a
|
|
193
|
-
// margin to trust against rounding/rendering variance.
|
|
194
|
-
const gradient = { from: "#8B3FC8", to: "#df187a" };
|
|
189
|
+
// Single-hue gradient: white clears AA by margin, not by hundredths. See gradientTone.test.ts.
|
|
190
|
+
const gradient = { from: "#8b3fc8", to: "#762d9d" };
|
|
195
191
|
const palette = {
|
|
196
192
|
gradient,
|
|
197
193
|
primary,
|
|
@@ -18,11 +18,7 @@ const primary = {
|
|
|
18
18
|
const palette = {
|
|
19
19
|
...neutralTokens,
|
|
20
20
|
...buildBrandInk(PRIMARY_500),
|
|
21
|
-
|
|
22
|
-
// original let white drop to 2.98 there (`from` already passed at 4.83, unchanged).
|
|
23
|
-
// Nudged one step further (4.520 -> 4.608): the first pass cleared AA by <0.02, too thin a
|
|
24
|
-
// margin to trust against rounding/rendering variance.
|
|
25
|
-
gradient: { from: "#6b7280", to: "#5664f6" }, // slate gray → indigo
|
|
21
|
+
gradient: { from: "#666d7a", to: "#4a4e59" },
|
|
26
22
|
primary,
|
|
27
23
|
tertiary: { ...primary },
|
|
28
24
|
gray: {
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { onGradient } from "./accentText.js";
|
|
2
|
+
import { resolveAvatarFill } from "./statusTone.js";
|
|
3
|
+
/**
|
|
4
|
+
* Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient
|
|
5
|
+
* otherwise flips `onGradient` to black ink, so the same element reads white-on-colour in one
|
|
6
|
+
* brand and black-on-pastel in the next.
|
|
7
|
+
*/
|
|
8
|
+
export const inkSafeGradient = (gradient) => ({
|
|
9
|
+
from: resolveAvatarFill(gradient.from),
|
|
10
|
+
to: resolveAvatarFill(gradient.to),
|
|
11
|
+
});
|
|
12
|
+
/**
|
|
13
|
+
* The only correct way to paint text on a gradient: returns the stops to draw AND the ink for
|
|
14
|
+
* them. Calling `onGradient` on raw stops is the black-text bug — it picks ink for a backdrop
|
|
15
|
+
* that is then painted differently.
|
|
16
|
+
*/
|
|
17
|
+
export const resolveGradient = (gradient, white, black) => {
|
|
18
|
+
const { from, to } = inkSafeGradient(gradient);
|
|
19
|
+
return { from, to, ink: onGradient(from, to, white, black) };
|
|
20
|
+
};
|
|
21
|
+
/** `linear-gradient(...)` for a resolved pair — one spelling of the CSS everywhere. */
|
|
22
|
+
export const gradientCss = (g, angle = "135deg") => `linear-gradient(${angle}, ${g.from} 0%, ${g.to} 100%)`;
|
|
@@ -7,6 +7,29 @@ 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, and the focus
|
|
16
|
+
* ring is still held to `AA_NON_TEXT`.
|
|
17
|
+
*/
|
|
18
|
+
export const CHROME_BORDER = 1.5;
|
|
19
|
+
// The resting rule between two surfaces — a card edge, a divider, a menu outline. Lighter than
|
|
20
|
+
// CHROME_BORDER, which outlines a control the user acts on.
|
|
21
|
+
export const CHROME_RULE = 1.31;
|
|
22
|
+
/**
|
|
23
|
+
* A rule is decorative, so it has a ceiling and no floor: soften it until the surface it reads
|
|
24
|
+
* hardest against sits at `target`, and leave a already-fainter rung alone. Never `settleAcross`
|
|
25
|
+
* here — that clears a floor on EVERY surface, so one tinted surface drags the rule darker.
|
|
26
|
+
*/
|
|
27
|
+
export function ruleInk(hex, surfaces, target) {
|
|
28
|
+
const loudest = surfaces.reduce((worst, s) => contrastRatio(hex, s) > contrastRatio(hex, worst) ? s : worst);
|
|
29
|
+
return contrastRatio(hex, loudest) > target
|
|
30
|
+
? softenToContrast(hex, loudest, target)
|
|
31
|
+
: hex;
|
|
32
|
+
}
|
|
10
33
|
/**
|
|
11
34
|
* Walks a hex toward `target` contrast against `backdrop`, keeping hue and saturation.
|
|
12
35
|
* Direction is DERIVED from the backdrop, never passed: a mode argument here was redundant
|
|
@@ -30,11 +53,30 @@ export function liftToContrast(hex, backdrop, target = AA_NON_TEXT) {
|
|
|
30
53
|
const ends = [withLightness(hex, 100, s), withLightness(hex, 0, s)];
|
|
31
54
|
return contrastRatio(ends[0], backdrop) >= contrastRatio(ends[1], backdrop) ? ends[0] : ends[1];
|
|
32
55
|
}
|
|
56
|
+
/**
|
|
57
|
+
* Mirror of `liftToContrast`: walks ink TOWARD the backdrop, stopping at the last step that
|
|
58
|
+
* still clears `target`. For ink that must stay legible without reading as body copy.
|
|
59
|
+
*/
|
|
60
|
+
export function softenToContrast(hex, backdrop, target) {
|
|
61
|
+
if (contrastRatio(hex, backdrop) <= target)
|
|
62
|
+
return hex;
|
|
63
|
+
const { s, l: start } = hexToHsl(hex);
|
|
64
|
+
const toward = relativeLuminance(backdrop) < 0.5 ? -1 : 1;
|
|
65
|
+
let softest = hex;
|
|
66
|
+
for (let l = start; l > 0 && l < 100; l += toward) {
|
|
67
|
+
const next = withLightness(hex, l, s);
|
|
68
|
+
if (contrastRatio(next, backdrop) < target)
|
|
69
|
+
break;
|
|
70
|
+
softest = next;
|
|
71
|
+
}
|
|
72
|
+
return softest;
|
|
73
|
+
}
|
|
33
74
|
/**
|
|
34
75
|
* `boxborder[500]` is the rung every control outline reads (Checkbox, SearchSelect, the date
|
|
35
|
-
* pickers, the editor's inputs).
|
|
36
|
-
*
|
|
37
|
-
*
|
|
76
|
+
* pickers, the editor's inputs). Settled onto `CHROME_BORDER` — lifted when a brand authored it
|
|
77
|
+
* invisibly pale, softened when it overshoots. It was previously lifted to `AA_NON_TEXT`, which
|
|
78
|
+
* shipped 3.85-4.95:1 outlines: a text-weight box around every card and popover.
|
|
79
|
+
* Resolved here rather than hand-pinned per brand: a copied hex goes stale the moment a canvas moves.
|
|
38
80
|
*
|
|
39
81
|
* `border[*]` is deliberately untouched — that ramp draws table gridlines, which are decorative
|
|
40
82
|
* and outside 1.4.11.
|
|
@@ -47,7 +89,9 @@ export function withOutlineRung(palette) {
|
|
|
47
89
|
contrastRatio(current, palette.background[50])
|
|
48
90
|
? palette.backgroundColor.main
|
|
49
91
|
: palette.background[50];
|
|
50
|
-
const resolved =
|
|
92
|
+
const resolved = contrastRatio(current, backdrop) > CHROME_BORDER
|
|
93
|
+
? softenToContrast(current, backdrop, CHROME_BORDER)
|
|
94
|
+
: liftToContrast(current, backdrop, CHROME_BORDER);
|
|
51
95
|
if (resolved === current)
|
|
52
96
|
return palette;
|
|
53
97
|
return { ...palette, boxborder: { ...palette.boxborder, 500: resolved } };
|
|
@@ -63,3 +107,25 @@ export function withOutlineRung(palette) {
|
|
|
63
107
|
export function resolveHoverTint(seed, restSurface) {
|
|
64
108
|
return liftToContrast(seed, restSurface, MIN_PERCEPTIBLE_STEP);
|
|
65
109
|
}
|
|
110
|
+
/**
|
|
111
|
+
* Settles ink into `target` against EVERY surface at once. Softening one step can change which
|
|
112
|
+
* surface is hardest, so resolving against a single pre-computed "hardest" one lands under the
|
|
113
|
+
* floor on another — that is how radiant and rosewood ended up with an invisible outline on
|
|
114
|
+
* their muted surface.
|
|
115
|
+
*/
|
|
116
|
+
export function settleAcross(hex, surfaces, target) {
|
|
117
|
+
const clearsAll = (c) => surfaces.every((s) => contrastRatio(c, s) >= target);
|
|
118
|
+
if (!clearsAll(hex)) {
|
|
119
|
+
return surfaces.reduce((ink, s) => liftToContrast(ink, s, target), hex);
|
|
120
|
+
}
|
|
121
|
+
const { s: sat, l: start } = hexToHsl(hex);
|
|
122
|
+
const toward = relativeLuminance(surfaces[0]) < 0.5 ? -1 : 1;
|
|
123
|
+
let settled = hex;
|
|
124
|
+
for (let l = start; l > 0 && l < 100; l += toward) {
|
|
125
|
+
const next = withLightness(hex, l, sat);
|
|
126
|
+
if (!clearsAll(next))
|
|
127
|
+
break;
|
|
128
|
+
settled = next;
|
|
129
|
+
}
|
|
130
|
+
return settled;
|
|
131
|
+
}
|
|
@@ -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,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
|
+
}
|
|
@@ -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,6 +42,7 @@ 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";
|
|
47
48
|
import Table from "./Components/Table/Table.js";
|
|
@@ -96,7 +97,7 @@ import SignInActivityTable from "./Components/SignInActivityTable/SignInActivity
|
|
|
96
97
|
import OrganizationDetails from "./Components/OrganizationDetails/OrganizationDetails.js";
|
|
97
98
|
export {
|
|
98
99
|
// 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,
|
|
100
|
+
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, ScrollbarBox, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp,
|
|
100
101
|
// hooks
|
|
101
102
|
useSidebarPrefs, useIsTruncated,
|
|
102
103
|
// themes
|
|
@@ -135,3 +136,7 @@ export { isDarkCanvas, onFilled, onGradient, accentTextOnCanvas, pickAccentText,
|
|
|
135
136
|
// primitives; `compositeOver` flattens a translucent color onto a backdrop first (an alpha
|
|
136
137
|
// color has no defined luminance on its own, so measure the composited result, not the tint).
|
|
137
138
|
export { hexToRgb, hexToRgba, compositeOver, rgbToHex, rgbToHsl, hslToRgb, hexToHsl, hslToHex, withLightness, mix, relativeLuminance, contrastRatio, } from "./Theme/tokens/builders/color.js";
|
|
139
|
+
export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar.js";
|
|
140
|
+
export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk.js";
|
|
141
|
+
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk.js";
|
|
142
|
+
export * from "./Components/Primitives/Primitives.js";
|
package/dist/index.d.ts
CHANGED
|
@@ -40,6 +40,7 @@ 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";
|
|
45
46
|
import Table from "./Components/Table/Table";
|
|
@@ -91,7 +92,7 @@ import RolesPermission from "./Components/RolesPermission/RolesPermission";
|
|
|
91
92
|
import CustomModulesTable from "./Components/CustomModulesTable/CustomModulesTable";
|
|
92
93
|
import SignInActivityTable from "./Components/SignInActivityTable/SignInActivityTable";
|
|
93
94
|
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, };
|
|
95
|
+
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, ScrollbarBox, Skeletons, Switch, Table, TableToggle, Tag, TextInput, Timeline, Toaster, ToolTip, OverflowToolTip, useToaster, VerifyEmailOtp, useSidebarPrefs, useIsTruncated, useCustomTheme, ThemesList, debounce, isAllowedReturnUrl, resolveReturnUrl, createAccountHandoff, };
|
|
95
96
|
export default withTheme;
|
|
96
97
|
export type { UserDetailsProps, UserDetailsLabels, UserListItem, SelectedUserDetail, UserDetailRow, RoleOption, AddUserFormValues, ChangeRoleSubmitPayload, } from "./Components/UserDetails/UserDetailsProps";
|
|
97
98
|
export type { WorkspaceWindowProps, WorkspaceWindowState, WorkspaceTrayProps, WorkspaceTrayItem, WorkspaceTrayPreviewProps, } from "./Components/WorkspaceWindow/WorkspaceWindowProps";
|
|
@@ -123,7 +124,7 @@ export type { PlanBadgeInput, PlanBadgeResult } from "./Utils/planBadge";
|
|
|
123
124
|
export type { PlanExpiryInput } from "./Utils/planExpiry";
|
|
124
125
|
export type { LimitReachedModalProps, LimitKind, } from "./Components/LimitReachedModal/LimitReachedModalProps";
|
|
125
126
|
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";
|
|
127
|
+
export type { TableProps, TableHeaderProps, TableColumnType, TableDensity, TableVariant, TableEmptyState, TableRenderGroup, HeaderActionsProps, ColumnSortingProps, ExportOption, DataObject, FilterValues, } from "./Components/Table/TableProps";
|
|
127
128
|
export type { ButtonProps } from "./Components/Button/ButtonProps";
|
|
128
129
|
export type { CardProps } from "./Components/Card/CardProps";
|
|
129
130
|
export type { ProfileCardProps, ProfileCardVariant, ProfileCardVariantLegacy, } from "./Components/ProfileCard/ProfileCardProps";
|
|
@@ -156,3 +157,11 @@ export type { FileUploaderProps, MimeExtension } from "./Components/FileUpload/F
|
|
|
156
157
|
export type { SidebarProps, SidebarUser, SecondaryBarProps, OtherAppsProps, MenuProps as SidebarMenuProps, } from "./Components/SideBar/SideBarProps";
|
|
157
158
|
export type { NavbarProps, MenuProps as NavbarMenuProps } from "./Components/NavigationBar/NavigationBarProps";
|
|
158
159
|
export type { HeaderProps } from "./Components/Header/HeaderProps";
|
|
160
|
+
export { scrollbarStyles, globalScrollbarStyles, SCROLLBAR_WIDTH, } from "./Theme/tokens/builders/scrollbar";
|
|
161
|
+
export type { ScrollbarVariant, ScrollbarStyle, } from "./Theme/tokens/builders/scrollbar";
|
|
162
|
+
export type { ScrollbarBoxProps } from "./Components/ScrollbarBox/ScrollbarBox";
|
|
163
|
+
export { placeholderInk, placeholderInkOn, fieldSurfaces } from "./Theme/tokens/builders/placeholderInk";
|
|
164
|
+
export type { FieldSurfaces } from "./Theme/tokens/builders/placeholderInk";
|
|
165
|
+
export { resolveGradient, gradientCss, inkSafeGradient as inkSafeGradientToken, } from "./Theme/tokens/builders/gradientInk";
|
|
166
|
+
export type { Gradient, ResolvedGradient, } from "./Theme/tokens/builders/gradientInk";
|
|
167
|
+
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
43
|
exports.UserDetails = exports.splitMonthsAndDays = exports.resolvePlanBadge = exports.formatPlanRemaining = exports.formatPlanExpiry = exports.formatPlanElapsed = exports.PlanBadge = exports.PlanPill = exports.UpgradeButton = exports.LimitReachedModal = 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;
|
|
41
|
-
exports.
|
|
42
|
-
exports.
|
|
43
|
-
exports.contrastRatio = exports.relativeLuminance = exports.mix = exports.withLightness = exports.hslToHex = exports.hexToHsl = exports.hslToRgb = exports.rgbToHsl = void 0;
|
|
44
|
+
exports.ToolTip = exports.Toaster = exports.Timeline = exports.TextInput = exports.Tag = exports.TableToggle = exports.Table = 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 = void 0;
|
|
45
|
+
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 = exports.chipFill = exports.inkSafeGradient = exports.statusGradient = exports.resolveStatusTone = exports.resolveAvatarFill = exports.meetsBodyText = exports.avatarFillFor = exports.AVATAR_SEEDS = 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 = void 0;
|
|
46
|
+
exports.inkSafeGradientToken = exports.gradientCss = exports.resolveGradient = exports.fieldSurfaces = exports.placeholderInkOn = exports.placeholderInk = exports.SCROLLBAR_WIDTH = exports.globalScrollbarStyles = exports.scrollbarStyles = exports.contrastRatio = exports.relativeLuminance = exports.mix = exports.withLightness = exports.hslToHex = exports.hexToHsl = exports.hslToRgb = exports.rgbToHsl = exports.rgbToHex = 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,6 +139,8 @@ 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"));
|
|
@@ -324,3 +329,16 @@ Object.defineProperty(exports, "withLightness", { enumerable: true, get: functio
|
|
|
324
329
|
Object.defineProperty(exports, "mix", { enumerable: true, get: function () { return color_1.mix; } });
|
|
325
330
|
Object.defineProperty(exports, "relativeLuminance", { enumerable: true, get: function () { return color_1.relativeLuminance; } });
|
|
326
331
|
Object.defineProperty(exports, "contrastRatio", { enumerable: true, get: function () { return color_1.contrastRatio; } });
|
|
332
|
+
var scrollbar_1 = require("./Theme/tokens/builders/scrollbar");
|
|
333
|
+
Object.defineProperty(exports, "scrollbarStyles", { enumerable: true, get: function () { return scrollbar_1.scrollbarStyles; } });
|
|
334
|
+
Object.defineProperty(exports, "globalScrollbarStyles", { enumerable: true, get: function () { return scrollbar_1.globalScrollbarStyles; } });
|
|
335
|
+
Object.defineProperty(exports, "SCROLLBAR_WIDTH", { enumerable: true, get: function () { return scrollbar_1.SCROLLBAR_WIDTH; } });
|
|
336
|
+
var placeholderInk_1 = require("./Theme/tokens/builders/placeholderInk");
|
|
337
|
+
Object.defineProperty(exports, "placeholderInk", { enumerable: true, get: function () { return placeholderInk_1.placeholderInk; } });
|
|
338
|
+
Object.defineProperty(exports, "placeholderInkOn", { enumerable: true, get: function () { return placeholderInk_1.placeholderInkOn; } });
|
|
339
|
+
Object.defineProperty(exports, "fieldSurfaces", { enumerable: true, get: function () { return placeholderInk_1.fieldSurfaces; } });
|
|
340
|
+
var gradientInk_1 = require("./Theme/tokens/builders/gradientInk");
|
|
341
|
+
Object.defineProperty(exports, "resolveGradient", { enumerable: true, get: function () { return gradientInk_1.resolveGradient; } });
|
|
342
|
+
Object.defineProperty(exports, "gradientCss", { enumerable: true, get: function () { return gradientInk_1.gradientCss; } });
|
|
343
|
+
Object.defineProperty(exports, "inkSafeGradientToken", { enumerable: true, get: function () { return gradientInk_1.inkSafeGradient; } });
|
|
344
|
+
__exportStar(require("./Components/Primitives/Primitives"), exports);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pixelize-design-library",
|
|
3
|
-
"version": "2.4.2-beta.
|
|
3
|
+
"version": "2.4.2-beta.21",
|
|
4
4
|
"description": "React component library for Pixelize apps: themeable Chakra-based components, design tokens and light/dark brand theming.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"react",
|
|
@@ -91,7 +91,9 @@
|
|
|
91
91
|
"\\.(css|less|scss|sass)$": "<rootDir>/__mocks__/styleMock.js"
|
|
92
92
|
},
|
|
93
93
|
"testPathIgnorePatterns": [
|
|
94
|
-
"
|
|
94
|
+
"/node_modules/",
|
|
95
|
+
"<rootDir>/dist/",
|
|
96
|
+
"<rootDir>/.claude/"
|
|
95
97
|
],
|
|
96
98
|
"testMatch": [
|
|
97
99
|
"**/__tests__/**/*.[jt]s?(x)",
|