pixelize-design-library 2.4.2-beta.32 → 2.4.2-beta.34

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.
Files changed (47) hide show
  1. package/README.md +21 -0
  2. package/dist/Components/Button/Button.styles.js +7 -6
  3. package/dist/Components/Card/PaymentCard/PaymentCard.js +14 -5
  4. package/dist/Components/Common/ErrorComponent.js +6 -5
  5. package/dist/Components/DatePicker/CalendarPanel.js +6 -7
  6. package/dist/Components/FilePreview/FilePreview.js +2 -1
  7. package/dist/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -2
  8. package/dist/Components/OrganizationDetails/OrganizationDetails.js +3 -2
  9. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +4 -3
  10. package/dist/Components/ScrollToTop/ScrollToTop.js +3 -3
  11. package/dist/Components/SelectSearch/SelectSearch.js +1 -1
  12. package/dist/Components/SideBar/SideBar.js +4 -2
  13. package/dist/Components/StageProgress/StageProgressProps.js +6 -4
  14. package/dist/Components/Table/Table.js +2 -1
  15. package/dist/Components/Table/filters/LeftFilterPane.js +1 -1
  16. package/dist/Components/Tag/Tag.styles.js +13 -9
  17. package/dist/Theme/chakra/componentStyles.js +16 -9
  18. package/dist/Theme/chakra/createBrandTheme.js +15 -9
  19. package/dist/Theme/tokens/builders/filledSurface.d.ts +29 -0
  20. package/dist/Theme/tokens/builders/filledSurface.js +74 -0
  21. package/dist/Utils/table.js +5 -2
  22. package/dist/esm/Components/Button/Button.styles.js +8 -7
  23. package/dist/esm/Components/Card/PaymentCard/PaymentCard.js +14 -5
  24. package/dist/esm/Components/Common/ErrorComponent.js +6 -5
  25. package/dist/esm/Components/DatePicker/CalendarPanel.js +6 -7
  26. package/dist/esm/Components/FilePreview/FilePreview.js +2 -1
  27. package/dist/esm/Components/KanbanBoard/KanbanActions/KanbanActions.js +1 -2
  28. package/dist/esm/Components/OrganizationDetails/OrganizationDetails.js +4 -3
  29. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +5 -4
  30. package/dist/esm/Components/ScrollToTop/ScrollToTop.js +3 -3
  31. package/dist/esm/Components/SelectSearch/SelectSearch.js +1 -1
  32. package/dist/esm/Components/SideBar/SideBar.js +4 -2
  33. package/dist/esm/Components/StageProgress/StageProgressProps.js +7 -5
  34. package/dist/esm/Components/Table/Table.js +2 -1
  35. package/dist/esm/Components/Table/filters/LeftFilterPane.js +1 -1
  36. package/dist/esm/Components/Tag/Tag.styles.js +14 -10
  37. package/dist/esm/Theme/chakra/componentStyles.js +16 -9
  38. package/dist/esm/Theme/chakra/createBrandTheme.js +15 -9
  39. package/dist/esm/Theme/tokens/builders/filledSurface.js +67 -0
  40. package/dist/esm/Utils/table.js +5 -2
  41. package/dist/esm/index.js +3 -0
  42. package/dist/index.d.ts +2 -0
  43. package/dist/index.js +8 -1
  44. package/package.json +1 -1
  45. package/dist/Theme/tokens/builders/solidFillRung.d.ts +0 -4
  46. package/dist/Theme/tokens/builders/solidFillRung.js +0 -33
  47. package/dist/esm/Theme/tokens/builders/solidFillRung.js +0 -28
package/README.md CHANGED
@@ -53,6 +53,27 @@ function App() {
53
53
  export default App;
54
54
  ```
55
55
 
56
+ ## Theming and filled surfaces
57
+
58
+ Nine brand presets with light/dark palettes. Wrap your app in `PixelizeThemeProvider` and read tokens
59
+ via `useCustomTheme()`.
60
+
61
+ **Do not** pair a scale's `[500]` swatch with `colors.white` or `onPrimary` for custom filled UI —
62
+ white often fails WCAG on `[500]` and ink falls back to black (e.g. black text on red badges). Use
63
+ library components (`Button`, `Tag`, `Badge`) or:
64
+
65
+ ```ts
66
+ import { resolveFilledSurface, useCustomTheme } from "pixelize-design-library";
67
+
68
+ const { colors } = useCustomTheme();
69
+ const solid = resolveFilledSurface(colors.red, colors);
70
+ // solid.fill, solid.color, solid.hoverFill, solid.hoverColor, …
71
+ ```
72
+
73
+ Full rules for app developers and AI assistants: [`src/Theme/THEME-CONTRACT.md`](src/Theme/THEME-CONTRACT.md)
74
+ (§ *Filled surfaces in consumer apps*). After upgrading, rebuild the library (`npm run build`) and run
75
+ `npm run pixelize` in consumer frontends.
76
+
56
77
  ## Components
57
78
 
58
79
  ### Layout & Navigation
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Button = void 0;
4
4
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
5
- const solidFillRung_1 = require("../../Theme/tokens/builders/solidFillRung");
5
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
6
6
  const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
7
7
  const focusRing_styles_1 = require("../../Theme/chakra/focusRing.styles");
8
8
  /**
@@ -22,14 +22,15 @@ const onCanvasHoverBg = (theme, colorScheme, step) => {
22
22
  const scale = theme.colors[colorScheme];
23
23
  return "opacity" in scale ? scale.opacity[step] : scale[50];
24
24
  };
25
- const buttonSolidRung = (theme, colorScheme) => (0, solidFillRung_1.solidRung)(theme.colors[colorScheme], theme.colors.white);
25
+ const swatch = (theme, colorScheme) => theme.colors[colorScheme];
26
+ const buttonSolidRung = (theme, colorScheme) => (0, filledSurface_1.solidFillRung)(swatch(theme, colorScheme), theme.colors.white);
26
27
  const darkerFill = (theme, colorScheme, step) => {
27
- const scale = theme.colors[colorScheme];
28
- const isDark = (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main);
29
- return scale[(0, solidFillRung_1.darkerFillRung)(scale, theme.colors.white, isDark, step)];
28
+ const scale = swatch(theme, colorScheme);
29
+ const rung = (0, filledSurface_1.darkerFillRung)(scale, theme.colors.backgroundColor.main, theme.colors.white, step);
30
+ return scale[rung];
30
31
  };
31
32
  /** Label for the solid variant's filled bg — derived from THAT fill, since hover/active swap it. */
32
- const labelFor = (theme, fill) => (0, accentText_1.onFilled)(fill, theme.colors.white, theme.colors.black);
33
+ const labelFor = (theme, fill) => (0, filledSurface_1.labelOnFill)(fill, theme.colors.white, theme.colors.black);
33
34
  /**
34
35
  * The two-tone `:focus-visible` ring, from the palette's derived `focusRing` pair.
35
36
  *
@@ -7,18 +7,24 @@ const jsx_runtime_1 = require("react/jsx-runtime");
7
7
  const react_1 = require("@chakra-ui/react");
8
8
  const lucide_react_1 = require("lucide-react");
9
9
  const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
10
- const accentText_1 = require("../../../Theme/tokens/builders/accentText");
10
+ const filledSurface_1 = require("../../../Theme/tokens/builders/filledSurface");
11
11
  const Button_1 = __importDefault(require("../../Button/Button"));
12
12
  const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
13
- const withOnButtonColor = (styles) => ({
14
- ...styles,
15
- onButtonColor: (0, accentText_1.onFilled)(styles.buttonColor, theme.colors.white, theme.colors.black),
16
- });
13
+ const withOnButtonColor = (styles) => {
14
+ const scale = theme.colors[styles.buttonScale];
15
+ const solid = (0, filledSurface_1.resolveFilledSurface)(scale, theme.colors);
16
+ return {
17
+ ...styles,
18
+ buttonColor: solid.fill,
19
+ onButtonColor: solid.color,
20
+ };
21
+ };
17
22
  if (isActive) {
18
23
  return withOnButtonColor({
19
24
  badgeText: "Active Plan",
20
25
  badgeColor: `0.125rem solid ${theme.colors.green[500]}`,
21
26
  buttonColor: theme.colors.green[500],
27
+ buttonScale: "green",
22
28
  buttonColor50: theme.colors.green[50],
23
29
  colorScheme: "green",
24
30
  });
@@ -28,6 +34,7 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
28
34
  badgeText: "Upgrade Your Plan",
29
35
  badgeColor: `0.125rem solid ${theme.colors.primary[500]}`,
30
36
  buttonColor: theme.colors.primary[500],
37
+ buttonScale: "primary",
31
38
  buttonColor50: theme.colors.primary[50],
32
39
  colorScheme: "primary",
33
40
  });
@@ -37,6 +44,7 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
37
44
  badgeText: "Most Popular",
38
45
  badgeColor: `0.125rem solid ${theme.colors.primary[500]}`,
39
46
  buttonColor: theme.colors.primary[500],
47
+ buttonScale: "primary",
40
48
  buttonColor50: theme.colors.primary[50],
41
49
  colorScheme: "primary",
42
50
  });
@@ -45,6 +53,7 @@ const getCardStyles = (isActive, isNextUpgrade, popular, theme) => {
45
53
  badgeText: "",
46
54
  badgeColor: "",
47
55
  buttonColor: theme.colors.primary[500],
56
+ buttonScale: "primary",
48
57
  buttonColor50: theme.colors.primary[50],
49
58
  colorScheme: "primary",
50
59
  });
@@ -3,12 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("@chakra-ui/react");
5
5
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
6
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
6
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
7
7
  const ErrorComponent = ({ error, errorClassName, }) => {
8
8
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
9
- const errorFill = colors.semanticText.error;
10
- // errorFill is ink, not a fill tuned to carry a mark — pick the mark's ink structurally.
11
- const markInk = (0, accentText_1.onFilled)(errorFill, colors.white, colors.black);
12
- return ((0, jsx_runtime_1.jsxs)(react_1.HStack, { as: "p", align: "flex-start", spacing: 1, mt: 1, fontSize: "sm", color: errorFill, className: errorClassName, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "50", fill: errorFill }), (0, jsx_runtime_1.jsx)("rect", { x: "46", y: "40", width: "8", height: "30", rx: "2", fill: markInk }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "28", r: "4", fill: markInk })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", children: error })] }));
9
+ const errorText = colors.semanticText.error;
10
+ const errorSolid = (0, filledSurface_1.resolveFilledSurface)(colors.semantic.error, colors);
11
+ const errorFill = errorSolid.fill;
12
+ const markInk = errorSolid.color;
13
+ return ((0, jsx_runtime_1.jsxs)(react_1.HStack, { as: "p", align: "flex-start", spacing: 1, mt: 1, fontSize: "sm", color: errorText, className: errorClassName, children: [(0, jsx_runtime_1.jsxs)("svg", { width: "12", height: "12", viewBox: "0 0 100 100", xmlns: "http://www.w3.org/2000/svg", "aria-hidden": true, children: [(0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "50", r: "50", fill: errorFill }), (0, jsx_runtime_1.jsx)("rect", { x: "46", y: "40", width: "8", height: "30", rx: "2", fill: markInk }), (0, jsx_runtime_1.jsx)("circle", { cx: "50", cy: "28", r: "4", fill: markInk })] }), (0, jsx_runtime_1.jsx)(react_1.Text, { as: "span", children: error })] }));
13
14
  };
14
15
  exports.default = ErrorComponent;
@@ -10,7 +10,7 @@ const date_fns_1 = require("date-fns");
10
10
  const lucide_react_1 = require("lucide-react");
11
11
  const Button_1 = __importDefault(require("../Button/Button"));
12
12
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
13
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
13
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
14
14
  const dayStates_1 = require("./dayStates");
15
15
  const CalendarPanel = ({ currentMonth, setCurrentMonth, today, isRange, tempDate, tempRangeStart, tempRangeEnd, isSameDay, isBefore, isAfter, minDate, maxDate, disablePastDates, disableFutureDates, disableToday, onDaySelect, hoveredDate, onDayHover, renderWeekdays, dayStates, renderDayContent, }) => {
16
16
  const theme = (0, useCustomTheme_1.useCustomTheme)();
@@ -101,16 +101,15 @@ const CalendarPanel = ({ currentMonth, setCurrentMonth, today, isRange, tempDate
101
101
  // Solid fill (selected/range-endpoint) needs the ink checked against that
102
102
  // specific fill — `primary[500]` doesn't reliably clear AA for white text on
103
103
  // every brand/mode (same gap the solid Button variant already accounts for).
104
- const solidFill = theme.colors.primary[500];
105
- const solidHoverFill = theme.colors.primary[600];
104
+ const primarySolid = (0, filledSurface_1.resolveFilledSurface)(theme.colors.primary, theme.colors);
105
+ const solidFill = primarySolid.fill;
106
+ const solidHoverFill = primarySolid.hoverFill;
106
107
  const circleColor = circleSolid
107
- ? (0, accentText_1.onFilled)(solidFill, theme.colors.white, theme.colors.black)
108
+ ? primarySolid.color
108
109
  : isInCurrentMonth
109
110
  ? theme.colors.text[700]
110
111
  : theme.colors.gray[400];
111
- const circleHoverColor = circleSolid
112
- ? (0, accentText_1.onFilled)(solidHoverFill, theme.colors.white, theme.colors.black)
113
- : circleColor;
112
+ const circleHoverColor = circleSolid ? primarySolid.hoverColor : circleColor;
114
113
  const circleBorder = circleSolid
115
114
  ? "1px solid transparent"
116
115
  : isTentativeEnd
@@ -10,6 +10,7 @@ const react_2 = require("@chakra-ui/react");
10
10
  const framer_motion_1 = require("framer-motion");
11
11
  const lucide_react_1 = require("lucide-react");
12
12
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
13
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
13
14
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
14
15
  const MotionContent = (0, framer_motion_1.motion)(react_2.ModalContent);
15
16
  const inferKind = (url, fileName) => {
@@ -62,7 +63,7 @@ const FilePreview = ({ isOpen, onClose, fileUrl, fileName, fileType, hideDownloa
62
63
  if (kind === "video") {
63
64
  return ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "video", src: fileUrl, controls: true, width: "100%", borderRadius: "lg" }));
64
65
  }
65
- return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 3, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.FileQuestion, { size: 48, color: theme.colors.textMuted }), (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", children: "Preview isn't available for this file type." }), !hideDownload && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", align: "center", gap: 2, px: 4, py: 2, borderRadius: "lg", bg: theme.colors.primary[500], color: theme.colors.onPrimary, fontSize: "sm", fontWeight: 500, onClick: () => downloadFile(fileUrl, fileName), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Download, { size: 16 }), " Download file"] }))] }));
66
+ return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { direction: "column", align: "center", justify: "center", py: 12, gap: 3, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.FileQuestion, { size: 48, color: theme.colors.textMuted }), (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", children: "Preview isn't available for this file type." }), !hideDownload && ((0, jsx_runtime_1.jsxs)(react_2.Flex, { as: "button", align: "center", gap: 2, px: 4, py: 2, borderRadius: "lg", bg: theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], color: (0, filledSurface_1.labelOnFill)(theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], theme.colors.white, theme.colors.black), fontSize: "sm", fontWeight: 500, onClick: () => downloadFile(fileUrl, fileName), children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Download, { size: 16 }), " Download file"] }))] }));
66
67
  };
67
68
  return ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isOpen, onClose: handleClose, size: size, isCentered: true, children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, { bg: "blackAlpha.600", backdropFilter: "blur(4px)" }), (0, jsx_runtime_1.jsxs)(MotionContent
68
69
  // Chakra's default Modal drives its bg off `--modal-bg`, which flips to
@@ -9,10 +9,9 @@ const Select_1 = __importDefault(require("../../Select/Select"));
9
9
  const lucide_react_1 = require("lucide-react");
10
10
  const Divider_1 = __importDefault(require("../../Divider/Divider"));
11
11
  const useCustomTheme_1 = require("../../../Theme/useCustomTheme");
12
- const accentText_1 = require("../../../Theme/tokens/builders/accentText");
13
12
  const Button_1 = __importDefault(require("../../Button/Button"));
14
13
  const KanbanActions = ({ options, onSelectChange, onEdit, onCreate, }) => {
15
14
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
16
- return ((0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: "0.625rem", children: [(0, jsx_runtime_1.jsx)(Select_1.default, { options: options, placeholder: "Filter by Status", width: "12.5rem", onChange: (option) => onSelectChange && onSelectChange(option) }), (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: "0.5rem", children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.SquarePen, { size: 20, color: colors.text[500] }), onClick: () => onEdit === null || onEdit === void 0 ? void 0 : onEdit(), children: "Edit Layout" }), (0, jsx_runtime_1.jsx)(Divider_1.default, {}), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "solid", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.CirclePlus, { size: 20, color: (0, accentText_1.onFilled)(colors.primary[500], colors.white, colors.black) }), onClick: () => onCreate === null || onCreate === void 0 ? void 0 : onCreate(), children: "Create New" })] })] }));
15
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: "0.625rem", children: [(0, jsx_runtime_1.jsx)(Select_1.default, { options: options, placeholder: "Filter by Status", width: "12.5rem", onChange: (option) => onSelectChange && onSelectChange(option) }), (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: "0.5rem", children: [(0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "ghost", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.SquarePen, { size: 20, color: colors.text[500] }), onClick: () => onEdit === null || onEdit === void 0 ? void 0 : onEdit(), children: "Edit Layout" }), (0, jsx_runtime_1.jsx)(Divider_1.default, {}), (0, jsx_runtime_1.jsx)(Button_1.default, { size: "sm", variant: "solid", leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.CirclePlus, { size: 20 }), onClick: () => onCreate === null || onCreate === void 0 ? void 0 : onCreate(), children: "Create New" })] })] }));
17
16
  };
18
17
  exports.default = KanbanActions;
@@ -9,6 +9,7 @@ const react_2 = require("@chakra-ui/react");
9
9
  const lucide_react_1 = require("lucide-react");
10
10
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
11
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
12
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
12
13
  const statusTone_1 = require("../../Theme/tokens/builders/statusTone");
13
14
  const Button_1 = __importDefault(require("../Button/Button"));
14
15
  const EmptyState_1 = __importDefault(require("../EmptyState/EmptyState"));
@@ -72,7 +73,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
72
73
  const pageBg = colors.backgroundColor.main;
73
74
  const primary50 = colors.primary[50];
74
75
  const primary100 = colors.primary[100];
75
- const primary500 = colors.primary[500];
76
+ const primarySolid = (0, filledSurface_1.resolveFilledSurface)(colors.primary, colors);
76
77
  const onPrimary50 = (0, accentText_1.accentTextOnCanvas)(colors.primary, colors.primary[50]);
77
78
  const cardSx = {
78
79
  backgroundColor: surface,
@@ -158,7 +159,7 @@ const OrganizationDetails = ({ activeOrganizations, invitedOrganizations, isLoad
158
159
  width: "100%",
159
160
  };
160
161
  const hasOrganizations = activeOrganizations.length > 0 || invitedOrganizations.length > 0;
161
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primary500, color: (0, accentText_1.onFilled)(primary500, colors.white, colors.black), children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
162
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { backgroundColor: pageBg, minHeight: "100%", p: { base: 2, md: 3 }, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { ...cardSx, px: 3, py: 2.5, mb: 3, alignItems: "center", justifyContent: "space-between", flexWrap: "wrap", gap: 3, bgGradient: `linear(135deg, ${primary50} 0%, ${primary100} 100%)`, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { alignItems: "center", gap: 3, children: [onBack && ((0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Go back", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.ArrowLeft, { size: 18 }), variant: "ghost", size: "sm", color: subtle, onClick: onBack })), (0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", justify: "center", boxSize: "36px", borderRadius: "full", bg: primarySolid.fill, color: primarySolid.color, children: (0, jsx_runtime_1.jsx)(lucide_react_1.Building2, { size: 18 }) }), (0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 700, children: userName
162
163
  ? `${labels.greeting.replace(/User!?/, "")}${userName}!`.trim()
163
164
  : labels.greeting }), (0, jsx_runtime_1.jsx)(react_2.Avatar, { size: "xs", name: userName, src: userAvatarUrl })] }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "xs", color: subtle, mt: 0.5, children: labels.manageSubtitle })] })] }), (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createNewOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" })] }), isLoading ? ((0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: Array.from({ length: 6 }).map((_, idx) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { ...cardSx, p: 3, children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { boxSize: "36px", borderRadius: "lg", mb: 2 }), (0, jsx_runtime_1.jsx)(react_2.SkeletonText, { noOfLines: 2, spacing: 2 })] }, idx))) })) : !hasOrganizations ? ((0, jsx_runtime_1.jsx)(EmptyState_1.default, { icon: lucide_react_1.Building2, title: labels.noOrganizationsTitle, description: labels.noOrganizationsDescription, minH: "40vh", action: (0, jsx_runtime_1.jsx)(Button_1.default, { label: labels.createOrganization, onClick: () => setCreateOpen(true), leftIcon: (0, jsx_runtime_1.jsx)(lucide_react_1.Plus, { size: 16 }), colorScheme: "primary", size: "sm" }) })) : ((0, jsx_runtime_1.jsxs)(react_2.VStack, { align: "stretch", spacing: 4, children: [activeOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Users, { size: 16, color: colors.accentText }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.activeOrganizations }), sectionBadge(activeOrganizations.length, "blue")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: activeOrganizations.map(renderActiveCard) })] })), invitedOrganizations.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, mb: 2, children: [(0, jsx_runtime_1.jsx)(lucide_react_1.Mail, { size: 16, color: colors.semanticText.warning }), (0, jsx_runtime_1.jsx)(react_2.Heading, { size: "sm", color: heading, fontWeight: 600, children: labels.invitedOrganizations }), sectionBadge(invitedOrganizations.length, "yellow")] }), (0, jsx_runtime_1.jsx)(react_2.Box, { ...gridSx, children: invitedOrganizations.map(renderInvitedCard) })] }))] })), footerSlot, (0, jsx_runtime_1.jsx)(CreateOrgModal_1.default, { isOpen: isCreateOpen, onClose: () => setCreateOpen(false), isLoading: isCreating, onSubmit: async (values) => {
164
165
  await (onCreateOrganization === null || onCreateOrganization === void 0 ? void 0 : onCreateOrganization(values));
@@ -7,6 +7,7 @@ const react_2 = require("@chakra-ui/react");
7
7
  const lucide_react_1 = require("lucide-react");
8
8
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
9
9
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
10
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
10
11
  function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth = "100px", imageAlt = "Profile Photo", imageObjectFit = "cover", imageBorderRadius = "full", editIconSize = "sm", editIconPositionRight = "0px", editIconPositionBottom = "0px", isRound = true, boxStyle, isEditable = false, isView = false, style, handleIsView, fallbackText, revealOnHover = true, }) {
11
12
  var _a, _b, _c, _d, _e;
12
13
  const [photo, setPhoto] = (0, react_1.useState)(photoUrl);
@@ -60,14 +61,14 @@ function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth = "100px", ima
60
61
  "&:hover .ppv-media": {
61
62
  boxShadow: `0 0 0 0.1875rem ${c.primary.opacity[24]}`,
62
63
  },
63
- }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition: "box-shadow 0.2s ease", children: renderMedia() }), hasActions && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { className: "ppv-overlay", position: "absolute", inset: 0, borderRadius: imageBorderRadius, bg: "blackAlpha.300", opacity: 0, transition: "opacity 0.2s ease", pointerEvents: "none" }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { className: "ppv-actions", position: "absolute", right: editIconPositionRight, bottom: editIconPositionBottom, transform: "translate(-15%, -15%)", spacing: 1.5, opacity: revealOnHover ? 0 : 1, transition: "opacity 0.2s ease", children: [isEditable && ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Edit", "aria-label": "Edit", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.SquarePen, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleClick, "aria-label": "Edit photo", bg: c.primary[500], color: (0, accentText_1.onFilled)(c.primary[500], c.white, c.black), border: `0.125rem solid ${c.background[50]}`, boxShadow: (_b = theme.shadows) === null || _b === void 0 ? void 0 : _b.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
64
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { className: "ppv-media", borderRadius: imageBorderRadius, transition: "box-shadow 0.2s ease", children: renderMedia() }), hasActions && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { className: "ppv-overlay", position: "absolute", inset: 0, borderRadius: imageBorderRadius, bg: "blackAlpha.300", opacity: 0, transition: "opacity 0.2s ease", pointerEvents: "none" }), (0, jsx_runtime_1.jsxs)(react_2.HStack, { className: "ppv-actions", position: "absolute", right: editIconPositionRight, bottom: editIconPositionBottom, transform: "translate(-15%, -15%)", spacing: 1.5, opacity: revealOnHover ? 0 : 1, transition: "opacity 0.2s ease", children: [isEditable && ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Edit", "aria-label": "Edit", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.SquarePen, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleClick, "aria-label": "Edit photo", bg: c.primary[(0, filledSurface_1.solidFillRung)(c.primary, c.white)], color: (0, filledSurface_1.labelOnFill)(c.primary[(0, filledSurface_1.solidFillRung)(c.primary, c.white)], c.white, c.black), border: `0.125rem solid ${c.background[50]}`, boxShadow: (_b = theme.shadows) === null || _b === void 0 ? void 0 : _b.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
64
65
  bg: c.primary[600],
65
- color: (0, accentText_1.onFilled)(c.primary[600], c.white, c.black),
66
+ color: (0, filledSurface_1.labelOnFill)(c.primary[600], c.white, c.black),
66
67
  transform: "scale(1.1)",
67
68
  boxShadow: (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.lg,
68
69
  }, _active: {
69
70
  bg: c.primary[700],
70
- color: (0, accentText_1.onFilled)(c.primary[700], c.white, c.black),
71
+ color: (0, filledSurface_1.labelOnFill)(c.primary[700], c.white, c.black),
71
72
  } }) })), isView && ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "View", "aria-label": "View", hasArrow: true, children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { icon: (0, jsx_runtime_1.jsx)(lucide_react_1.Eye, { size: 14 }), isRound: isRound, size: editIconSize, onClick: handleIsView, "aria-label": "View photo", bg: c.background[50], color: c.text[700], border: `0.063rem solid ${border}`, boxShadow: (_d = theme.shadows) === null || _d === void 0 ? void 0 : _d.md, style: style, transition: "transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease", _hover: {
72
73
  bg: c.gray[50],
73
74
  color: (0, accentText_1.accentTextOnCanvas)(c.primary, c.gray[50]),
@@ -10,7 +10,7 @@ const lucide_react_1 = require("lucide-react");
10
10
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
11
  const ToolTip_1 = __importDefault(require("../ToolTip/ToolTip"));
12
12
  const rafThrottle_1 = require("../../Utils/rafThrottle");
13
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
13
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
14
14
  const ScrollToTop = ({ children, tooltipLabel = "Scroll to top", threshold = 300, duration = 600, useWindow = false, bottom = "2rem", right = "2rem", }) => {
15
15
  const [visible, setVisible] = (0, react_1.useState)(false);
16
16
  const anchorRef = (0, react_1.useRef)(null);
@@ -63,9 +63,9 @@ const ScrollToTop = ({ children, tooltipLabel = "Scroll to top", threshold = 300
63
63
  };
64
64
  // eslint-disable-next-line react-hooks/exhaustive-deps
65
65
  }, [useWindow, threshold]);
66
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { ref: anchorRef, position: "relative", children: [children, (0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel, placement: "left", children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", onClick: scrollToTop, "aria-label": tooltipLabel, border: "none", position: "fixed", bottom: bottom, right: right, zIndex: 1000, display: "flex", alignItems: "center", justifyContent: "center", boxSize: "44px", borderRadius: "full", cursor: "pointer", bg: theme.colors.primary[500], color: theme.colors.onPrimary, boxShadow: "md", opacity: visible ? 1 : 0, transform: visible ? "translateY(0) scale(1)" : "translateY(16px) scale(0.85)", pointerEvents: visible ? "auto" : "none", transition: "all 0.25s cubic-bezier(0.16, 1, 0.3, 1)", _hover: {
66
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { ref: anchorRef, position: "relative", children: [children, (0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: tooltipLabel, placement: "left", children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", onClick: scrollToTop, "aria-label": tooltipLabel, border: "none", position: "fixed", bottom: bottom, right: right, zIndex: 1000, display: "flex", alignItems: "center", justifyContent: "center", boxSize: "44px", borderRadius: "full", cursor: "pointer", bg: theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], color: (0, filledSurface_1.labelOnFill)(theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], theme.colors.white, theme.colors.black), boxShadow: "md", opacity: visible ? 1 : 0, transform: visible ? "translateY(0) scale(1)" : "translateY(16px) scale(0.85)", pointerEvents: visible ? "auto" : "none", transition: "all 0.25s cubic-bezier(0.16, 1, 0.3, 1)", _hover: {
67
67
  bg: theme.colors.primary[600],
68
- color: (0, accentText_1.onFilled)(theme.colors.primary[600], theme.colors.white, theme.colors.black),
68
+ color: (0, filledSurface_1.labelOnFill)(theme.colors.primary[600], theme.colors.white, theme.colors.black),
69
69
  transform: "translateY(-2px) scale(1.05)",
70
70
  boxShadow: "lg",
71
71
  }, _active: { transform: "scale(0.95)" }, children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronUp, { size: 24, strokeWidth: 2.5 }) }) })] }));
@@ -249,7 +249,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
249
249
  document.removeEventListener("mousedown", handleClickOutside);
250
250
  };
251
251
  }, [isOpen]);
252
- return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: error, children: (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", flexDirection: "column", position: "relative", sx: boxStyle, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: id, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), isMultipleSelect && selectedOptions.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.HStack, { spacing: 2, mb: 2, children: selectedOptions.map((option) => ((0, jsx_runtime_1.jsxs)(react_2.Tag, { size: "md", borderRadius: "full", variant: "solid", sx: { backgroundColor: theme.colors.primary[500] }, children: [(0, jsx_runtime_1.jsx)(react_2.TagLabel, { width: "50px", children: option.label }), (0, jsx_runtime_1.jsx)(react_2.TagCloseButton, { onClick: () => handleRemoveOption(option) })] }, option.id))) })), (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { children: [(0, jsx_runtime_1.jsx)(react_2.Input, { ref: inputRef, variant: "outline", borderRadius: fieldStyles_1.FIELD_RADIUS, value: inputValue ? inputValue : "", onClick: () => setIsOpen(true), onFocus: () => {
252
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(react_2.FormControl, { isInvalid: error, children: (0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", flexDirection: "column", position: "relative", sx: boxStyle, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: id, isRequired: isRequired, isInformation: isInformation, informationMessage: informationMessage })), isMultipleSelect && selectedOptions.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.HStack, { spacing: 2, mb: 2, children: selectedOptions.map((option) => ((0, jsx_runtime_1.jsxs)(react_2.Tag, { size: "md", borderRadius: "full", variant: "solid", colorScheme: "primary", children: [(0, jsx_runtime_1.jsx)(react_2.TagLabel, { width: "50px", children: option.label }), (0, jsx_runtime_1.jsx)(react_2.TagCloseButton, { onClick: () => handleRemoveOption(option) })] }, option.id))) })), (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { children: [(0, jsx_runtime_1.jsx)(react_2.Input, { ref: inputRef, variant: "outline", borderRadius: fieldStyles_1.FIELD_RADIUS, value: inputValue ? inputValue : "", onClick: () => setIsOpen(true), onFocus: () => {
253
253
  if (skipNextInputFocusOpen.current) {
254
254
  skipNextInputFocusOpen.current = false;
255
255
  return;
@@ -8,7 +8,7 @@ const jsx_runtime_1 = require("react/jsx-runtime");
8
8
  const react_1 = require("react");
9
9
  const react_2 = require("@chakra-ui/react");
10
10
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
11
- const accentText_1 = require("../../Theme/tokens/builders/accentText");
11
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
12
12
  const sidebarAccentColors_1 = require("./sidebarAccentColors");
13
13
  const Sidebar_1 = require("../../Constants/Sidebar");
14
14
  const lucide_react_1 = require("lucide-react");
@@ -33,7 +33,9 @@ const SidebarHeader = ({ logo, companyName, companySubtitle, toggle, isLoading,
33
33
  if (isLoading) {
34
34
  return ((0, jsx_runtime_1.jsx)(react_2.Box, { w: "100%", px: toggle ? 2 : 4, py: 2, h: Sidebar_1.HEADER_HEIGHT, display: "flex", alignItems: "center", flexShrink: 0, children: toggle ? ((0, jsx_runtime_1.jsx)(react_2.Flex, { align: "center", gap: 4, justifyContent: "center", w: "100%", children: (0, jsx_runtime_1.jsx)(react_2.Skeleton, { w: "28px", h: "28px", borderRadius: "md", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] }) })) : ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 3, w: "100%", children: [(0, jsx_runtime_1.jsx)(react_2.Skeleton, { w: "28px", h: "28px", borderRadius: "md", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] }), (0, jsx_runtime_1.jsx)(react_2.Skeleton, { h: "1.25rem", w: "60%", borderRadius: "md", startColor: theme.colors.sidebar.background[400], endColor: theme.colors.sidebar.background[300] })] })) }));
35
35
  }
36
- const logoNode = logo ? ((0, jsx_runtime_1.jsx)(react_2.Image, { borderRadius: "md", boxSize: "1.75rem", src: logo, alt: "Company Logo", flexShrink: 0, cursor: toggle ? "pointer" : undefined, onClick: toggle ? onToggle : undefined })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.primary[500], color: (0, accentText_1.onFilled)(theme.colors.primary[500], theme.colors.white, theme.colors.black), borderRadius: "md", boxSize: "1.75rem", display: "flex", alignItems: "center", justifyContent: "center", fontWeight: "bold", flexShrink: 0, cursor: toggle ? "pointer" : undefined, onClick: toggle ? onToggle : undefined, children: (0, jsx_runtime_1.jsx)(defaultLogo_1.default, {}) }));
36
+ const primaryFillRung = (0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white);
37
+ const primaryFill = theme.colors.primary[primaryFillRung];
38
+ const logoNode = logo ? ((0, jsx_runtime_1.jsx)(react_2.Image, { borderRadius: "md", boxSize: "1.75rem", src: logo, alt: "Company Logo", flexShrink: 0, cursor: toggle ? "pointer" : undefined, onClick: toggle ? onToggle : undefined })) : ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: primaryFill, color: (0, filledSurface_1.labelOnFill)(primaryFill, theme.colors.white, theme.colors.black), borderRadius: "md", boxSize: "1.75rem", display: "flex", alignItems: "center", justifyContent: "center", fontWeight: "bold", flexShrink: 0, cursor: toggle ? "pointer" : undefined, onClick: toggle ? onToggle : undefined, children: (0, jsx_runtime_1.jsx)(defaultLogo_1.default, {}) }));
37
39
  return ((0, jsx_runtime_1.jsxs)(react_2.Flex, { h: Sidebar_1.HEADER_HEIGHT, w: "100%", alignItems: "center", justifyContent: toggle ? "center" : "flex-start", gap: "8px", px: toggle ? "8px" : "10px", borderBottom: "1px solid", borderColor: "whiteAlpha.100", minW: 0, overflow: "hidden", flexShrink: 0, children: [logoNode, !toggle && ((0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsx)(OverflowTooltipText_1.default, { placement: "right", fontWeight: 600, fontSize: "12.5px", textAlign: "left", color: theme.colors.white, lineHeight: "1.3", as: "p", width: "100%", children: companyName !== null && companyName !== void 0 ? companyName : "" }), companySubtitle && ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "10px", color: theme.colors.sidebar.mutedLabel, lineHeight: "1.3", isTruncated: true, children: companySubtitle }))] })), !toggle && ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "button", type: "button", onClick: overlay ? onClose : onToggle, "aria-label": overlay ? "Close menu" : "Collapse sidebar", w: "22px", h: "22px", borderRadius: "base", bg: "whiteAlpha.100", display: "flex", alignItems: "center", justifyContent: "center", flexShrink: 0, _hover: { bg: "whiteAlpha.300" }, transition: "background 0.15s", children: overlay ? ((0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 15, color: theme.colors.sidebar.mutedIcon })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.ChevronLeft, { size: 14, color: theme.colors.sidebar.mutedIcon })) }))] }));
38
40
  };
39
41
  const SkeletonMenuRow = ({ toggle }) => {
@@ -2,16 +2,18 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveStagePalette = void 0;
4
4
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
5
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
5
6
  /** Exhaustive by construction: a new scheme that maps nowhere is a compile error. */
6
7
  const scaleFor = (colors, scheme) => scheme === "primary" || scheme === "secondary" || scheme === "tertiary"
7
8
  ? colors[scheme]
8
9
  : colors.semantic[scheme];
9
10
  /** Resolve a chevron palette for a given color scheme from the theme. */
10
11
  const resolveStagePalette = (theme, colorScheme = "primary") => {
11
- const { gray, white, black } = theme.colors;
12
+ const { gray } = theme.colors;
12
13
  const scale = scaleFor(theme.colors, colorScheme);
13
- const strong = scale[500];
14
- const onStrong = (0, accentText_1.onFilled)(strong, white, black);
14
+ const solid = (0, filledSurface_1.resolveFilledSurface)(scale, theme.colors);
15
+ const strong = solid.fill;
16
+ const onStrong = solid.color;
15
17
  const soft = scale[100];
16
18
  // A fixed [700] fails AA against [100] for some hues (orange 3.30, borderline green 3.58) —
17
19
  // walk the scale's own rungs against this specific tint instead.
@@ -21,7 +23,7 @@ const resolveStagePalette = (theme, colorScheme = "primary") => {
21
23
  softText,
22
24
  strong,
23
25
  onStrong,
24
- hover: scale[600],
26
+ hover: solid.hoverFill,
25
27
  muted: gray[100],
26
28
  mutedText: gray[500],
27
29
  };
@@ -13,6 +13,7 @@ const LeftFilterPane_1 = __importDefault(require("./filters/LeftFilterPane"));
13
13
  const variants_1 = require("./variants");
14
14
  const TableVariantContext_1 = require("./variants/TableVariantContext");
15
15
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
16
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
16
17
  const Pagination_1 = __importDefault(require("./components/Pagination"));
17
18
  const TableHeader_1 = __importDefault(require("./components/TableHeader"));
18
19
  const TableBody_1 = __importDefault(require("./components/TableBody"));
@@ -371,7 +372,7 @@ function Table({ data, columns, onSelection, isLoading, isCheckbox = false, head
371
372
  // Square children poked past the rounded border, leaving a gap at each corner.
372
373
  overflow: "hidden", children: [filterSidebar && filterMode === "modal" && ((0, jsx_runtime_1.jsxs)(react_2.Modal, { isOpen: isFilterModalOpen, onClose: onFilterModalClose, size: "4xl", scrollBehavior: "inside", children: [(0, jsx_runtime_1.jsx)(react_2.ModalOverlay, {}), (0, jsx_runtime_1.jsxs)(react_2.ModalContent, { bg: theme.colors.background[50], my: 0, top: "10%", position: "fixed", left: "auto", right: "auto", children: [(0, jsx_runtime_1.jsx)(react_2.ModalCloseButton, { size: "sm" }), (0, jsx_runtime_1.jsx)(react_2.ModalBody, { p: 0, children: (0, jsx_runtime_1.jsx)(LeftFilterPane_1.default, { theme: theme, sections: (_c = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _c !== void 0 ? _c : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: (sel) => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply) === null || _a === void 0 ? void 0 : _a.call(filterSidebar, sel); onFilterModalClose(); }, onClear: () => { var _a; (_a = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) === null || _a === void 0 ? void 0 : _a.call(filterSidebar); }, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })] })] })), (0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "start", children: [filterMode === "sidebar" && ((0, jsx_runtime_1.jsx)(MotionBox, { "data-testid": "filter-sidebar-pane", initial: { width: 0 }, animate: { width: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? 180 : 0 }, transition: { type: "tween", duration: 0.5 }, overflow: "hidden", flexShrink: 0, borderRight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "1px solid" : "none", borderColor: theme.colors.boxborder[200], style: { height: controlsHeight + tableMaxH }, minHeight: (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isFilterSidebar) ? "32rem" : "auto", children: (0, jsx_runtime_1.jsx)(LeftFilterPane_1.default, { height: controlsHeight + tableMaxH, theme: theme, sections: (_d = filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.sidebarOptions) !== null && _d !== void 0 ? _d : [], selected: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.selected, onApply: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onApply, onClear: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler, isApplyLoading: filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.isApplyLoading, filterMode: filterMode }) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: "1", minW: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { display: "flex", alignItems: "center", justifyContent: "space-between", px: 3, py: 0, height: controlsHeight, gap: 3, flexWrap: "nowrap", bg: theme.colors.background[50], borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [filterSidebar && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: "Filter", placement: "top", children: (0, jsx_runtime_1.jsxs)(react_2.Box, { position: "relative", display: "inline-block", children: [(0, jsx_runtime_1.jsx)(react_3.Icon, { as: lucide_react_1.Filter, transform: "scaleX(-1)", cursor: "pointer", boxSize: 4, color: sidebarActiveCount > 0 ? theme.colors.accentText : theme.colors.text[500], onClick: filterMode === "modal" ? onFilterModalOpen : filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.filterSidebarToggle, _hover: {
373
374
  color: theme.colors.accentText,
374
- } }), sidebarActiveCount > 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", top: "-6px", right: "-10px", bg: theme.colors.primary[500], color: theme.colors.onPrimary, borderRadius: "full", p: "1px", cursor: "pointer", onClick: (e) => {
375
+ } }), sidebarActiveCount > 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { position: "absolute", top: "-6px", right: "-10px", bg: theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], color: (0, filledSurface_1.labelOnFill)(theme.colors.primary[(0, filledSurface_1.solidFillRung)(theme.colors.primary, theme.colors.white)], theme.colors.white, theme.colors.black), borderRadius: "full", p: "1px", cursor: "pointer", onClick: (e) => {
375
376
  var _a;
376
377
  e.stopPropagation();
377
378
  if (filterSidebar === null || filterSidebar === void 0 ? void 0 : filterSidebar.onClearAllHandler) {
@@ -206,6 +206,6 @@ const LeftFilterPane = ({ title = "Filter", height = 300, sections, selected: se
206
206
  }
207
207
  return filteredSections.map((sec) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, py: 2, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: (0, jsx_runtime_1.jsx)(SectionLabel, { label: sec.label, theme: theme }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, pt: 2, pb: 1, children: (0, jsx_runtime_1.jsx)(SectionContent, { sec: sec, ...sectionContentProps }) })] }, sec.id)));
208
208
  };
209
- return ((0, jsx_runtime_1.jsxs)(react_2.Box, { width: filterMode === "modal" ? "100%" : "180px", height: filterMode === "modal" ? "100%" : height, minHeight: "32rem", bg: theme.colors.background[50], borderRight: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", overflow: "hidden", display: "flex", flexDirection: "column", marginBottom: filterMode === "modal" && hasActiveFilters ? '3.5rem' : 0, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { p: 3, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: !isSearching ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "semibold", fontSize: "sm", children: title }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Search filters", icon: (0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Search, transform: "scaleX(-1)", boxSize: 4 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: theme.colors.text[500], onClick: () => setIsSearching(true), mr: filterMode === "modal" ? 8 : 2, mt: filterMode === "modal" ? -1 : 0 })] })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { ref: searchRef, initial: { opacity: 0, x: 40 }, animate: { opacity: 1, x: 0 }, transition: { type: "tween", duration: 0.2 }, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16, color: theme.colors.text[500] }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search", value: search, onChange: (e) => setSearch(e.target.value), autoFocus: true }), search.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Clear", size: "xs", variant: "ghost", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14 }), onClick: () => { setSearch(""); setIsSearching(false); } }) }))] }) })) }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", overflowY: "auto", children: renderSections() }), hasActiveFilters && ((0, jsx_runtime_1.jsxs)(react_2.HStack, { px: 2, py: 1, borderTop: "1px solid", borderColor: theme.colors.boxborder[200], spacing: 2, position: filterMode === "modal" ? "absolute" : "relative", bottom: 0, left: 0, right: 0, bg: theme.colors.background[50], children: [(0, jsx_runtime_1.jsx)(react_2.Button, { flex: 1, variant: "outline", size: "sm", onClick: handleClear, fontSize: "xs", colorScheme: "red", children: "Clear All" }), (0, jsx_runtime_1.jsx)(react_2.Button, { flex: 1, colorScheme: "primary", color: theme.colors.onPrimary, size: "sm", onClick: handleApply, fontSize: "xs", isLoading: isApplyLoading, children: "Apply" })] }))] }));
209
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { width: filterMode === "modal" ? "100%" : "180px", height: filterMode === "modal" ? "100%" : height, minHeight: "32rem", bg: theme.colors.background[50], borderRight: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", overflow: "hidden", display: "flex", flexDirection: "column", marginBottom: filterMode === "modal" && hasActiveFilters ? '3.5rem' : 0, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { p: 3, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: !isSearching ? ((0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "semibold", fontSize: "sm", children: title }), (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Search filters", icon: (0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Search, transform: "scaleX(-1)", boxSize: 4 }), variant: "unstyled", minW: "auto", h: "auto", display: "flex", cursor: "pointer", color: theme.colors.text[500], onClick: () => setIsSearching(true), mr: filterMode === "modal" ? 8 : 2, mt: filterMode === "modal" ? -1 : 0 })] })) : ((0, jsx_runtime_1.jsx)(framer_motion_1.motion.div, { ref: searchRef, initial: { opacity: 0, x: 40 }, animate: { opacity: 1, x: 0 }, transition: { type: "tween", duration: 0.2 }, children: (0, jsx_runtime_1.jsxs)(react_2.InputGroup, { size: "sm", children: [(0, jsx_runtime_1.jsx)(react_2.InputLeftElement, { pointerEvents: "none", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Search, { size: 16, color: theme.colors.text[500] }) }), (0, jsx_runtime_1.jsx)(react_2.Input, { placeholder: "Search", value: search, onChange: (e) => setSearch(e.target.value), autoFocus: true }), search.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.InputRightElement, { children: (0, jsx_runtime_1.jsx)(react_2.IconButton, { "aria-label": "Clear", size: "xs", variant: "ghost", icon: (0, jsx_runtime_1.jsx)(lucide_react_1.X, { size: 14 }), onClick: () => { setSearch(""); setIsSearching(false); } }) }))] }) })) }), (0, jsx_runtime_1.jsx)(react_2.Box, { flex: "1", overflowY: "auto", children: renderSections() }), hasActiveFilters && ((0, jsx_runtime_1.jsxs)(react_2.HStack, { px: 2, py: 1, borderTop: "1px solid", borderColor: theme.colors.boxborder[200], spacing: 2, position: filterMode === "modal" ? "absolute" : "relative", bottom: 0, left: 0, right: 0, bg: theme.colors.background[50], children: [(0, jsx_runtime_1.jsx)(react_2.Button, { flex: 1, variant: "outline", size: "sm", onClick: handleClear, fontSize: "xs", colorScheme: "red", children: "Clear All" }), (0, jsx_runtime_1.jsx)(react_2.Button, { flex: 1, colorScheme: "primary", size: "sm", onClick: handleApply, fontSize: "xs", isLoading: isApplyLoading, children: "Apply" })] }))] }));
210
210
  };
211
211
  exports.default = LeftFilterPane;
@@ -2,7 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Tag = void 0;
4
4
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
5
- const solidFillRung_1 = require("../../Theme/tokens/builders/solidFillRung");
5
+ const filledSurface_1 = require("../../Theme/tokens/builders/filledSurface");
6
6
  // Resolve a colorScheme key to a numeric swatch from the theme. All supported
7
7
  // colorScheme values (brand + global scales) expose a 50-900 scale; fall back to
8
8
  // gray so an unknown/missing key can never throw at render time.
@@ -42,18 +42,22 @@ exports.Tag = {
42
42
  },
43
43
  variants: {
44
44
  solid: ({ theme, colorScheme = "primary" }) => {
45
+ const palette = theme.colors;
45
46
  const c = swatch(theme, colorScheme);
46
- const { white, black, backgroundColor } = theme.colors;
47
- const isDark = (0, accentText_1.isDarkCanvas)(backgroundColor.main);
48
- const fill = c[(0, solidFillRung_1.solidRung)(c, white)];
49
- const hoverFill = c[(0, solidFillRung_1.darkerFillRung)(c, white, isDark, 0)];
50
- const activeFill = c[(0, solidFillRung_1.darkerFillRung)(c, white, isDark, 1)];
47
+ const { white, black, backgroundColor } = palette;
48
+ const canvas = backgroundColor.main;
49
+ const fillRung = (0, filledSurface_1.solidFillRung)(c, white);
50
+ const hoverRung = (0, filledSurface_1.darkerFillRung)(c, canvas, white, 0);
51
+ const activeRung = (0, filledSurface_1.darkerFillRung)(c, canvas, white, 1);
52
+ const fill = c[fillRung];
53
+ const hoverFill = c[hoverRung];
54
+ const activeFill = c[activeRung];
51
55
  return {
52
56
  container: {
53
57
  bg: fill,
54
- color: (0, accentText_1.onFilled)(fill, white, black),
55
- _hover: { bg: hoverFill, color: (0, accentText_1.onFilled)(hoverFill, white, black) },
56
- _active: { bg: activeFill, color: (0, accentText_1.onFilled)(activeFill, white, black) },
58
+ color: (0, filledSurface_1.labelOnFill)(fill, white, black),
59
+ _hover: { bg: hoverFill, color: (0, filledSurface_1.labelOnFill)(hoverFill, white, black) },
60
+ _active: { bg: activeFill, color: (0, filledSurface_1.labelOnFill)(activeFill, white, black) },
57
61
  },
58
62
  };
59
63
  },
@@ -12,9 +12,9 @@ const Tag_styles_1 = require("../../Components/Tag/Tag.styles");
12
12
  const InputTextArea_style_1 = require("../../Components/InputTextArea/InputTextArea.style");
13
13
  const NumberInput_styles_1 = require("../../Components/NumberInput/NumberInput.styles");
14
14
  const accentText_1 = require("../tokens/builders/accentText");
15
+ const filledSurface_1 = require("../tokens/builders/filledSurface");
15
16
  const color_1 = require("../tokens/builders/color");
16
17
  const outlineRung_1 = require("../tokens/builders/outlineRung");
17
- const solidFillRung_1 = require("../tokens/builders/solidFillRung");
18
18
  const Drawer_styles_1 = require("./Drawer.styles");
19
19
  const Menu_styles_1 = require("./Menu.styles");
20
20
  const Modal_styles_1 = require("./Modal.styles");
@@ -28,6 +28,14 @@ const Avatar_styles_1 = require("./Avatar.styles");
28
28
  // math (hexToRgb) throws on those on purpose (see color.ts). Guard so those scales fall back to
29
29
  // Chakra's own original fixed rung instead of computing contrast on a color it can't parse.
30
30
  const isHexColor = (color) => typeof color === "string" && /^#([0-9a-f]{3}|[0-9a-f]{6})$/i.test(color);
31
+ const solidFillStyle = (palette, swatch) => {
32
+ const rung = (0, filledSurface_1.solidFillRung)(swatch, palette.white);
33
+ const bg = swatch[rung];
34
+ return {
35
+ bg,
36
+ color: isHexColor(bg) ? (0, filledSurface_1.labelOnFill)(bg, palette.white, palette.black) : swatch[800],
37
+ };
38
+ };
31
39
  // Badge isn't its own component family (no Components/Badge/), so its style config lives here —
32
40
  // Chakra's stock `solid` variant hardcodes a white label on a variable fill, same AA gap Tag had.
33
41
  const Badge = {
@@ -35,10 +43,7 @@ const Badge = {
35
43
  solid: ({ theme, colorScheme = "gray" }) => {
36
44
  const palette = (0, paletteFromTheme_1.paletteOf)(theme);
37
45
  const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
38
- if (!isHexColor(swatch[500]))
39
- return { bg: swatch[500], color: swatch[800] };
40
- const bg = swatch[(0, solidFillRung_1.solidRung)(swatch, palette.white)];
41
- return { bg, color: (0, accentText_1.onFilled)(bg, palette.white, palette.black) };
46
+ return solidFillStyle(palette, swatch);
42
47
  },
43
48
  // Chakra's stock `subtle` picks its bg/color pair via `mode()`, keyed to Chakra's own
44
49
  // colorMode — which this app never toggles (dark mode swaps the palette object instead), so
@@ -90,13 +95,14 @@ const Alert = defineAlertStyles({
90
95
  variants: {
91
96
  solid: defineAlertParts(({ theme, colorScheme = "gray" }) => {
92
97
  const palette = (0, paletteFromTheme_1.paletteOf)(theme);
93
- const bg = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme)[500];
98
+ const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
99
+ const { bg, color } = solidFillStyle(palette, swatch);
94
100
  if (!isHexColor(bg))
95
101
  return { container: {} };
96
102
  return {
97
103
  container: {
98
104
  [$alertBg.variable]: bg,
99
- [$alertFg.variable]: (0, accentText_1.onFilled)(bg, palette.white, palette.black),
105
+ [$alertFg.variable]: color,
100
106
  },
101
107
  };
102
108
  }),
@@ -154,8 +160,9 @@ const Skeleton = {
154
160
  const Radio = {
155
161
  baseStyle: ({ theme, colorScheme }) => {
156
162
  const palette = (0, paletteFromTheme_1.paletteOf)(theme);
157
- const fill = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme)[500];
158
- const dot = (0, accentText_1.onFilled)(fill, palette.white, palette.black);
163
+ const swatch = (0, paletteFromTheme_1.scaleFor)(palette, colorScheme);
164
+ const fill = swatch[(0, filledSurface_1.solidFillRung)(swatch, palette.white)];
165
+ const dot = (0, filledSurface_1.labelOnFill)(fill, palette.white, palette.black);
159
166
  // A browser probe found the checked radio's hover repeating its own resting `fill` —
160
167
  // Chakra's stock checked._hover (inherited from checkbox) lands on the SAME `bg`/`borderColor`
161
168
  // keys we do, so extendTheme's merge is a scalar overwrite here, not a coexisting selector;
@@ -8,7 +8,7 @@ const react_1 = require("@chakra-ui/react");
8
8
  const common_web_1 = __importDefault(require("./common.web"));
9
9
  const fonts_web_1 = __importDefault(require("./fonts.web"));
10
10
  const componentStyles_1 = require("./componentStyles");
11
- const accentText_1 = require("../tokens/builders/accentText");
11
+ const filledSurface_1 = require("../tokens/builders/filledSurface");
12
12
  const scrollbar_1 = require("../tokens/builders/scrollbar");
13
13
  const focusRing_styles_1 = require("./focusRing.styles");
14
14
  /**
@@ -88,14 +88,20 @@ const createBrandTheme = (palette, options = {}) => {
88
88
  // selecting text anywhere (e.g. a table cell) shows a stray white/lavender patch on
89
89
  // the dark canvas. Brand it instead, with WCAG-safe ink via the same `onFilled` math
90
90
  // used for buttons/badges.
91
- "::selection": {
92
- background: palette.primary[500],
93
- color: (0, accentText_1.onFilled)(palette.primary[500], palette.white, palette.black),
94
- },
95
- "::-moz-selection": {
96
- background: palette.primary[500],
97
- color: (0, accentText_1.onFilled)(palette.primary[500], palette.white, palette.black),
98
- },
91
+ "::selection": (() => {
92
+ const solid = (0, filledSurface_1.resolveFilledSurface)(palette.primary, palette);
93
+ return {
94
+ background: solid.fill,
95
+ color: solid.color,
96
+ };
97
+ })(),
98
+ "::-moz-selection": (() => {
99
+ const solid = (0, filledSurface_1.resolveFilledSurface)(palette.primary, palette);
100
+ return {
101
+ background: solid.fill,
102
+ color: solid.color,
103
+ };
104
+ })(),
99
105
  // `color-scheme: dark` gives WebKit/Blink a dark scrollbar by default, but it's the
100
106
  // OS's generic dark gray, not brand-aware.
101
107
  ...(0, scrollbar_1.globalScrollbarStyles)(palette),