pixelize-design-library 2.3.21 → 2.3.25

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 (232) hide show
  1. package/dist/Assets/defaultLogo.tsx +30 -0
  2. package/dist/Components/Accordion/accordionColors.d.ts +6 -0
  3. package/dist/Components/Accordion/accordionColors.d.ts.map +1 -0
  4. package/dist/Components/Accordion/accordionColors.js +20 -0
  5. package/dist/Components/Editor/joditThemeVars.d.ts +21 -0
  6. package/dist/Components/Editor/joditThemeVars.d.ts.map +1 -0
  7. package/dist/Components/Editor/joditThemeVars.js +70 -0
  8. package/dist/Components/FilterSidebar/filterHoverStyle.d.ts +12 -0
  9. package/dist/Components/FilterSidebar/filterHoverStyle.d.ts.map +1 -0
  10. package/dist/Components/FilterSidebar/filterHoverStyle.js +14 -0
  11. package/dist/Components/OrganizationDetails/CreateOrgModal.js +6 -4
  12. package/dist/Components/OrganizationDetails/OrganizationDetails.d.ts.map +1 -1
  13. package/dist/Components/OrganizationDetails/OrganizationDetails.js +55 -7
  14. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts +24 -14
  15. package/dist/Components/OrganizationDetails/OrganizationDetailsProps.d.ts.map +1 -1
  16. package/dist/Components/SelectV2/SelectV2.d.ts +3 -0
  17. package/dist/Components/SelectV2/SelectV2.d.ts.map +1 -0
  18. package/dist/Components/SelectV2/SelectV2.js +185 -0
  19. package/dist/Components/SelectV2/SelectV2Props.d.ts +67 -0
  20. package/dist/Components/SelectV2/SelectV2Props.d.ts.map +1 -0
  21. package/dist/Components/SelectV2/SelectV2Props.js +2 -0
  22. package/dist/Components/SideBar/sidebarAccentColors.d.ts +21 -0
  23. package/dist/Components/SideBar/sidebarAccentColors.d.ts.map +1 -0
  24. package/dist/Components/SideBar/sidebarAccentColors.js +36 -0
  25. package/dist/Components/Table/components/tableRowHoverStyle.d.ts +13 -0
  26. package/dist/Components/Table/components/tableRowHoverStyle.d.ts.map +1 -0
  27. package/dist/Components/Table/components/tableRowHoverStyle.js +26 -0
  28. package/dist/Theme/chakra/Avatar.styles.d.ts +33 -0
  29. package/dist/Theme/chakra/Avatar.styles.d.ts.map +1 -0
  30. package/dist/Theme/chakra/Avatar.styles.js +28 -0
  31. package/dist/Theme/chakra/Drawer.styles.d.ts +32 -0
  32. package/dist/Theme/chakra/Drawer.styles.d.ts.map +1 -0
  33. package/dist/Theme/chakra/Drawer.styles.js +26 -0
  34. package/dist/Theme/chakra/Menu.styles.d.ts +70 -0
  35. package/dist/Theme/chakra/Menu.styles.d.ts.map +1 -0
  36. package/dist/Theme/chakra/Menu.styles.js +50 -0
  37. package/dist/Theme/chakra/Modal.styles.d.ts +32 -0
  38. package/dist/Theme/chakra/Modal.styles.d.ts.map +1 -0
  39. package/dist/Theme/chakra/Modal.styles.js +26 -0
  40. package/dist/Theme/chakra/Popover.styles.d.ts +37 -0
  41. package/dist/Theme/chakra/Popover.styles.d.ts.map +1 -0
  42. package/dist/Theme/chakra/Popover.styles.js +30 -0
  43. package/dist/Theme/chakra/Slider.styles.d.ts +31 -0
  44. package/dist/Theme/chakra/Slider.styles.d.ts.map +1 -0
  45. package/dist/Theme/chakra/Slider.styles.js +25 -0
  46. package/dist/Theme/chakra/Switch.styles.d.ts +31 -0
  47. package/dist/Theme/chakra/Switch.styles.d.ts.map +1 -0
  48. package/dist/Theme/chakra/Switch.styles.js +24 -0
  49. package/dist/Theme/chakra/Tabs.styles.d.ts +43 -0
  50. package/dist/Theme/chakra/Tabs.styles.d.ts.map +1 -0
  51. package/dist/Theme/chakra/Tabs.styles.js +41 -0
  52. package/dist/Theme/chakra/common.web.d.ts +171 -0
  53. package/dist/Theme/chakra/common.web.d.ts.map +1 -0
  54. package/dist/Theme/chakra/common.web.js +21 -0
  55. package/dist/Theme/chakra/componentStyles.d.ts +240 -0
  56. package/dist/Theme/chakra/componentStyles.d.ts.map +1 -0
  57. package/dist/Theme/chakra/componentStyles.js +150 -0
  58. package/dist/Theme/chakra/createBrandTheme.d.ts +18 -0
  59. package/dist/Theme/chakra/createBrandTheme.d.ts.map +1 -0
  60. package/dist/Theme/chakra/createBrandTheme.js +78 -0
  61. package/dist/Theme/chakra/fonts.web.d.ts +42 -0
  62. package/dist/Theme/chakra/fonts.web.d.ts.map +1 -0
  63. package/dist/Theme/chakra/fonts.web.js +15 -0
  64. package/dist/Theme/provider/PixelizeThemeProvider.d.ts +46 -0
  65. package/dist/Theme/provider/PixelizeThemeProvider.d.ts.map +1 -0
  66. package/dist/Theme/provider/PixelizeThemeProvider.js +124 -0
  67. package/dist/Theme/provider/ThemeSwitcher.d.ts +8 -0
  68. package/dist/Theme/provider/ThemeSwitcher.d.ts.map +1 -0
  69. package/dist/Theme/provider/ThemeSwitcher.js +111 -0
  70. package/dist/Theme/provider/colorModeStorage.d.ts +10 -0
  71. package/dist/Theme/provider/colorModeStorage.d.ts.map +1 -0
  72. package/dist/Theme/provider/colorModeStorage.js +106 -0
  73. package/dist/Theme/provider/index.d.ts +6 -0
  74. package/dist/Theme/provider/index.d.ts.map +1 -0
  75. package/dist/Theme/provider/index.js +9 -0
  76. package/dist/Theme/provider/useThemeMode.d.ts +3 -0
  77. package/dist/Theme/provider/useThemeMode.d.ts.map +1 -0
  78. package/dist/Theme/provider/useThemeMode.js +13 -0
  79. package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts +7 -0
  80. package/dist/Theme/tokens/brands/emerald/palette.dark.d.ts.map +1 -0
  81. package/dist/Theme/tokens/brands/emerald/palette.dark.js +13 -0
  82. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts +375 -0
  83. package/dist/Theme/tokens/brands/emerald/palette.light.d.ts.map +1 -0
  84. package/dist/Theme/tokens/brands/emerald/palette.light.js +135 -0
  85. package/dist/Theme/tokens/brands/index.d.ts +28 -0
  86. package/dist/Theme/tokens/brands/index.d.ts.map +1 -0
  87. package/dist/Theme/tokens/brands/index.js +93 -0
  88. package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts +7 -0
  89. package/dist/Theme/tokens/brands/lavender/palette.dark.d.ts.map +1 -0
  90. package/dist/Theme/tokens/brands/lavender/palette.dark.js +13 -0
  91. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts +375 -0
  92. package/dist/Theme/tokens/brands/lavender/palette.light.d.ts.map +1 -0
  93. package/dist/Theme/tokens/brands/lavender/palette.light.js +316 -0
  94. package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts +7 -0
  95. package/dist/Theme/tokens/brands/meadow/palette.dark.d.ts.map +1 -0
  96. package/dist/Theme/tokens/brands/meadow/palette.dark.js +13 -0
  97. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts +375 -0
  98. package/dist/Theme/tokens/brands/meadow/palette.light.d.ts.map +1 -0
  99. package/dist/Theme/tokens/brands/meadow/palette.light.js +133 -0
  100. package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts +7 -0
  101. package/dist/Theme/tokens/brands/radiant/palette.dark.d.ts.map +1 -0
  102. package/dist/Theme/tokens/brands/radiant/palette.dark.js +13 -0
  103. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts +375 -0
  104. package/dist/Theme/tokens/brands/radiant/palette.light.d.ts.map +1 -0
  105. package/dist/Theme/tokens/brands/radiant/palette.light.js +135 -0
  106. package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts +7 -0
  107. package/dist/Theme/tokens/brands/rosewood/palette.dark.d.ts.map +1 -0
  108. package/dist/Theme/tokens/brands/rosewood/palette.dark.js +13 -0
  109. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts +375 -0
  110. package/dist/Theme/tokens/brands/rosewood/palette.light.d.ts.map +1 -0
  111. package/dist/Theme/tokens/brands/rosewood/palette.light.js +139 -0
  112. package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts +7 -0
  113. package/dist/Theme/tokens/brands/skyline/palette.dark.d.ts.map +1 -0
  114. package/dist/Theme/tokens/brands/skyline/palette.dark.js +13 -0
  115. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts +375 -0
  116. package/dist/Theme/tokens/brands/skyline/palette.light.d.ts.map +1 -0
  117. package/dist/Theme/tokens/brands/skyline/palette.light.js +133 -0
  118. package/dist/Theme/tokens/brands/slate/palette.dark.d.ts +7 -0
  119. package/dist/Theme/tokens/brands/slate/palette.dark.d.ts.map +1 -0
  120. package/dist/Theme/tokens/brands/slate/palette.dark.js +13 -0
  121. package/dist/Theme/tokens/brands/slate/palette.light.d.ts +375 -0
  122. package/dist/Theme/tokens/brands/slate/palette.light.d.ts.map +1 -0
  123. package/dist/Theme/tokens/brands/slate/palette.light.js +137 -0
  124. package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts +7 -0
  125. package/dist/Theme/tokens/brands/storefront/palette.dark.d.ts.map +1 -0
  126. package/dist/Theme/tokens/brands/storefront/palette.dark.js +13 -0
  127. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts +375 -0
  128. package/dist/Theme/tokens/brands/storefront/palette.light.d.ts.map +1 -0
  129. package/dist/Theme/tokens/brands/storefront/palette.light.js +127 -0
  130. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts +204 -0
  131. package/dist/Theme/tokens/brands/zinc/palette.dark.d.ts.map +1 -0
  132. package/dist/Theme/tokens/brands/zinc/palette.dark.js +204 -0
  133. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts +375 -0
  134. package/dist/Theme/tokens/brands/zinc/palette.light.d.ts.map +1 -0
  135. package/dist/Theme/tokens/brands/zinc/palette.light.js +383 -0
  136. package/dist/Theme/tokens/builders/accentText.d.ts +56 -0
  137. package/dist/Theme/tokens/builders/accentText.d.ts.map +1 -0
  138. package/dist/Theme/tokens/builders/accentText.js +92 -0
  139. package/dist/Theme/tokens/builders/buildBrandTokens.d.ts +16 -0
  140. package/dist/Theme/tokens/builders/buildBrandTokens.d.ts.map +1 -0
  141. package/dist/Theme/tokens/builders/buildBrandTokens.js +33 -0
  142. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts +23 -0
  143. package/dist/Theme/tokens/builders/buildDarkPalette.d.ts.map +1 -0
  144. package/dist/Theme/tokens/builders/buildDarkPalette.js +282 -0
  145. package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts +17 -0
  146. package/dist/Theme/tokens/builders/chartColorsFromTheme.d.ts.map +1 -0
  147. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +26 -0
  148. package/dist/Theme/tokens/builders/color.d.ts +50 -0
  149. package/dist/Theme/tokens/builders/color.d.ts.map +1 -0
  150. package/dist/Theme/tokens/builders/color.js +156 -0
  151. package/dist/Theme/tokens/builders/index.d.ts +6 -0
  152. package/dist/Theme/tokens/builders/index.d.ts.map +1 -0
  153. package/dist/Theme/tokens/builders/index.js +21 -0
  154. package/dist/Theme/tokens/index.d.ts +15 -0
  155. package/dist/Theme/tokens/index.d.ts.map +1 -0
  156. package/dist/Theme/tokens/index.js +30 -0
  157. package/dist/Theme/tokens/primitives/breakpoints.d.ts +9 -0
  158. package/dist/Theme/tokens/primitives/breakpoints.d.ts.map +1 -0
  159. package/dist/Theme/tokens/primitives/breakpoints.js +10 -0
  160. package/dist/Theme/tokens/primitives/index.d.ts +10 -0
  161. package/dist/Theme/tokens/primitives/index.d.ts.map +1 -0
  162. package/dist/Theme/tokens/primitives/index.js +27 -0
  163. package/dist/Theme/tokens/primitives/letterSpacings.d.ts +10 -0
  164. package/dist/Theme/tokens/primitives/letterSpacings.d.ts.map +1 -0
  165. package/dist/Theme/tokens/primitives/letterSpacings.js +11 -0
  166. package/dist/Theme/tokens/primitives/lineHeights.d.ts +19 -0
  167. package/dist/Theme/tokens/primitives/lineHeights.d.ts.map +1 -0
  168. package/dist/Theme/tokens/primitives/lineHeights.js +20 -0
  169. package/dist/Theme/tokens/primitives/radii.d.ts +13 -0
  170. package/dist/Theme/tokens/primitives/radii.d.ts.map +1 -0
  171. package/dist/Theme/tokens/primitives/radii.js +14 -0
  172. package/dist/Theme/tokens/primitives/shadows.d.ts +16 -0
  173. package/dist/Theme/tokens/primitives/shadows.d.ts.map +1 -0
  174. package/dist/Theme/tokens/primitives/shadows.js +17 -0
  175. package/dist/Theme/tokens/primitives/sizes.d.ts +63 -0
  176. package/dist/Theme/tokens/primitives/sizes.d.ts.map +1 -0
  177. package/dist/Theme/tokens/primitives/sizes.js +39 -0
  178. package/dist/Theme/tokens/primitives/space.d.ts +34 -0
  179. package/dist/Theme/tokens/primitives/space.d.ts.map +1 -0
  180. package/dist/Theme/tokens/primitives/space.js +35 -0
  181. package/dist/Theme/tokens/primitives/typography.d.ts +73 -0
  182. package/dist/Theme/tokens/primitives/typography.d.ts.map +1 -0
  183. package/dist/Theme/tokens/primitives/typography.js +43 -0
  184. package/dist/Theme/tokens/primitives/zIndices.d.ts +17 -0
  185. package/dist/Theme/tokens/primitives/zIndices.d.ts.map +1 -0
  186. package/dist/Theme/tokens/primitives/zIndices.js +18 -0
  187. package/dist/Theme/tokens/types.d.ts +116 -0
  188. package/dist/Theme/tokens/types.d.ts.map +1 -0
  189. package/dist/Theme/tokens/types.js +8 -0
  190. package/package.json +5 -1
  191. package/.cursor/TASK-SETUP.md +0 -43
  192. package/.cursor/agents/be-impl.md +0 -37
  193. package/.cursor/agents/fe-impl.md +0 -39
  194. package/.cursor/agents/task-plan.md +0 -56
  195. package/.cursor/agents/test-create.md +0 -31
  196. package/.cursor/agents/test-exec.md +0 -26
  197. package/.cursor/hooks/task-hint.env +0 -1
  198. package/.cursor/hooks/task-skill-nudge.sh +0 -71
  199. package/.cursor/hooks/task-slash-guard.sh +0 -31
  200. package/.cursor/hooks.json +0 -13
  201. package/.cursor/modules/account-management/MODULE.md +0 -16
  202. package/.cursor/modules/buttons/MODULE.md +0 -13
  203. package/.cursor/modules/cards/MODULE.md +0 -13
  204. package/.cursor/modules/charts/MODULE.md +0 -13
  205. package/.cursor/modules/common/MODULE.md +0 -13
  206. package/.cursor/modules/contact-auth/MODULE.md +0 -13
  207. package/.cursor/modules/data-display/MODULE.md +0 -20
  208. package/.cursor/modules/feedback/MODULE.md +0 -14
  209. package/.cursor/modules/form/MODULE.md +0 -13
  210. package/.cursor/modules/inputs-basic/MODULE.md +0 -13
  211. package/.cursor/modules/inputs-date-file/MODULE.md +0 -20
  212. package/.cursor/modules/inputs-select/MODULE.md +0 -15
  213. package/.cursor/modules/inputs-toggle/MODULE.md +0 -13
  214. package/.cursor/modules/kanban/MODULE.md +0 -14
  215. package/.cursor/modules/layout-navigation/MODULE.md +0 -103
  216. package/.cursor/modules/overlays/MODULE.md +0 -30
  217. package/.cursor/modules/playground/MODULE.md +0 -15
  218. package/.cursor/modules/table/MODULE.md +0 -15
  219. package/.cursor/modules/theme/MODULE.md +0 -15
  220. package/.cursor/modules/types-exports/MODULE.md +0 -17
  221. package/.cursor/modules/utility-ui/MODULE.md +0 -15
  222. package/.cursor/modules/utils-hooks/MODULE.md +0 -23
  223. package/.cursor/pixelize-task-statusline.sh +0 -64
  224. package/.cursor/plans/blocked/.gitkeep +0 -0
  225. package/.cursor/plans/current.md +0 -12
  226. package/.cursor/plans/done/.gitkeep +0 -0
  227. package/.cursor/rules +0 -31
  228. package/.cursor/skills/task/SKILL.md +0 -167
  229. package/CLAUDE.md +0 -122
  230. package/eslint.config.js +0 -48
  231. package/index.html +0 -13
  232. package/vite.config.ts +0 -13
@@ -0,0 +1,185 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.default = SelectV2;
7
+ const jsx_runtime_1 = require("react/jsx-runtime");
8
+ const react_1 = require("react");
9
+ const react_2 = require("@chakra-ui/react");
10
+ const lucide_react_1 = require("lucide-react");
11
+ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
12
+ const fieldStyles_1 = require("../Common/fieldStyles");
13
+ const FormLabel_1 = require("../Common/FormLabel");
14
+ const ErrorMessage_1 = __importDefault(require("../Common/ErrorMessage"));
15
+ const HelperText_1 = __importDefault(require("../Common/HelperText"));
16
+ // Mirrors Select.styles.ts sizing so a call site swapping Select -> SelectV2 keeps its layout.
17
+ const SIZE_MAP = {
18
+ sm: { h: "2.125rem", fontSize: "0.8125rem", px: "0.5rem" },
19
+ md: { h: "2.375rem", fontSize: "0.875rem", px: "0.75rem" },
20
+ lg: { h: "2.75rem", fontSize: "0.9375rem", px: "1rem" },
21
+ };
22
+ const asIdSet = (values) => new Set((values !== null && values !== void 0 ? values : []).map((v) => v.toString()));
23
+ function SelectV2(props) {
24
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
25
+ const { options = [], placeholder = "Select Option", label, error = false, errorMessage, helperText, isDisabled = false, isRequired = false, size = "md", isSearchable = true, width, formControlStyle, onBlur, onFocus, renderOption, renderValue, maxMenuHeight = "16rem", defaultOpen = false, "data-testid": dataTestId, "aria-label": ariaLabel, } = props;
26
+ const theme = (0, useCustomTheme_1.useCustomTheme)();
27
+ const { isOpen, onOpen, onClose } = (0, react_2.useDisclosure)({ defaultIsOpen: defaultOpen });
28
+ const [filterText, setFilterText] = (0, react_1.useState)("");
29
+ const [activeIndex, setActiveIndex] = (0, react_1.useState)(-1);
30
+ const triggerRef = (0, react_1.useRef)(null);
31
+ const filterInputRef = (0, react_1.useRef)(null);
32
+ const listRef = (0, react_1.useRef)(null);
33
+ const s = (_a = SIZE_MAP[size]) !== null && _a !== void 0 ? _a : SIZE_MAP.md;
34
+ const fieldStyles = (0, fieldStyles_1.getFieldStateStyles)(theme, { error, focused: isOpen });
35
+ const selectedIds = (0, react_1.useMemo)(() => props.isMulti
36
+ ? asIdSet(props.value)
37
+ : asIdSet(props.value !== undefined ? [props.value] : undefined),
38
+ // eslint-disable-next-line react-hooks/exhaustive-deps
39
+ [props.isMulti, props.isMulti ? props.value : props.value]);
40
+ const selectedOptions = (0, react_1.useMemo)(() => options.filter((option) => selectedIds.has(option.id.toString())), [options, selectedIds]);
41
+ const filteredOptions = (0, react_1.useMemo)(() => {
42
+ if (!isSearchable || !filterText.trim())
43
+ return options;
44
+ const needle = filterText.trim().toLowerCase();
45
+ return options.filter((option) => option.label.toString().toLowerCase().includes(needle));
46
+ }, [options, filterText, isSearchable]);
47
+ const resetAndClose = (0, react_1.useCallback)((opts) => {
48
+ if (props.isMulti && (opts === null || opts === void 0 ? void 0 : opts.keepOpenForMulti))
49
+ return;
50
+ onClose();
51
+ setFilterText("");
52
+ setActiveIndex(-1);
53
+ onBlur === null || onBlur === void 0 ? void 0 : onBlur();
54
+ },
55
+ // eslint-disable-next-line react-hooks/exhaustive-deps
56
+ [onClose, onBlur, props.isMulti]);
57
+ const handleOpen = () => {
58
+ var _a;
59
+ if (isDisabled)
60
+ return;
61
+ onFocus === null || onFocus === void 0 ? void 0 : onFocus();
62
+ onOpen();
63
+ const firstSelected = props.isMulti ? (_a = props.value) === null || _a === void 0 ? void 0 : _a[0] : props.value;
64
+ const selectedFilteredIndex = filteredOptions.findIndex((option) => option.id.toString() === (firstSelected === null || firstSelected === void 0 ? void 0 : firstSelected.toString()));
65
+ setActiveIndex(selectedFilteredIndex);
66
+ };
67
+ const handleSelect = (option) => {
68
+ var _a, _b;
69
+ if (option.isDisabled)
70
+ return;
71
+ if (props.isMulti) {
72
+ const alreadySelected = selectedIds.has(option.id.toString());
73
+ const next = alreadySelected
74
+ ? selectedOptions.filter((selected) => selected.id.toString() !== option.id.toString())
75
+ : [...selectedOptions, option];
76
+ props.onChange(next);
77
+ resetAndClose({ keepOpenForMulti: true });
78
+ (_a = filterInputRef.current) === null || _a === void 0 ? void 0 : _a.focus();
79
+ return;
80
+ }
81
+ props.onChange(option);
82
+ resetAndClose();
83
+ (_b = triggerRef.current) === null || _b === void 0 ? void 0 : _b.focus();
84
+ };
85
+ (0, react_1.useEffect)(() => {
86
+ if (isOpen && isSearchable) {
87
+ // Popover content mounts after open; defer focus so it lands on the rendered input.
88
+ const id = requestAnimationFrame(() => { var _a; return (_a = filterInputRef.current) === null || _a === void 0 ? void 0 : _a.focus(); });
89
+ return () => cancelAnimationFrame(id);
90
+ }
91
+ }, [isOpen, isSearchable]);
92
+ (0, react_1.useEffect)(() => {
93
+ var _a;
94
+ if (activeIndex < 0 || !listRef.current)
95
+ return;
96
+ const activeEl = listRef.current.querySelector(`[data-index="${activeIndex}"]`);
97
+ (_a = activeEl === null || activeEl === void 0 ? void 0 : activeEl.scrollIntoView) === null || _a === void 0 ? void 0 : _a.call(activeEl, { block: "nearest" });
98
+ }, [activeIndex]);
99
+ const moveActive = (delta) => {
100
+ if (!filteredOptions.length)
101
+ return;
102
+ setActiveIndex((current) => {
103
+ const next = current + delta;
104
+ if (next < 0)
105
+ return filteredOptions.length - 1;
106
+ if (next >= filteredOptions.length)
107
+ return 0;
108
+ return next;
109
+ });
110
+ };
111
+ const handleTriggerKeyDown = (event) => {
112
+ if (isDisabled)
113
+ return;
114
+ if (event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Enter" || event.key === " ") {
115
+ event.preventDefault();
116
+ handleOpen();
117
+ }
118
+ };
119
+ const handleListKeyDown = (event) => {
120
+ var _a;
121
+ switch (event.key) {
122
+ case "ArrowDown":
123
+ event.preventDefault();
124
+ moveActive(1);
125
+ break;
126
+ case "ArrowUp":
127
+ event.preventDefault();
128
+ moveActive(-1);
129
+ break;
130
+ case "Enter": {
131
+ event.preventDefault();
132
+ const activeOption = filteredOptions[activeIndex];
133
+ if (activeOption)
134
+ handleSelect(activeOption);
135
+ break;
136
+ }
137
+ case "Escape":
138
+ event.preventDefault();
139
+ resetAndClose();
140
+ (_a = triggerRef.current) === null || _a === void 0 ? void 0 : _a.focus();
141
+ break;
142
+ case "Tab":
143
+ resetAndClose();
144
+ break;
145
+ default:
146
+ break;
147
+ }
148
+ };
149
+ const listboxId = `selectv2-listbox-${label !== null && label !== void 0 ? label : "field"}`;
150
+ const defaultTriggerContent = () => {
151
+ var _a;
152
+ if (props.isMulti) {
153
+ const max = (_a = props.maxLabelsBeforeSummary) !== null && _a !== void 0 ? _a : 2;
154
+ if (selectedOptions.length === 0)
155
+ return placeholder;
156
+ if (selectedOptions.length > max) {
157
+ return `${selectedOptions.length} selected`;
158
+ }
159
+ return selectedOptions.map((o) => o.label).join(", ");
160
+ }
161
+ return selectedOptions[0] ? selectedOptions[0].label : placeholder;
162
+ };
163
+ const triggerIcon = !props.isMulti && ((_b = selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.icon) ? selectedOptions[0].icon : null;
164
+ return ((0, jsx_runtime_1.jsxs)(react_2.FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsxs)(react_2.Box, { as: "button", type: "button", ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-disabled": isDisabled, "aria-label": ariaLabel, disabled: isDisabled, onClick: handleOpen, onKeyDown: handleTriggerKeyDown, display: "flex", alignItems: "center", justifyContent: "space-between", width: "100%", h: s.h, px: s.px, fontSize: s.fontSize, fontWeight: 500, textAlign: "left", cursor: isDisabled ? "not-allowed" : "pointer", opacity: isDisabled ? 0.4 : 1, color: selectedOptions.length ? (_c = theme.colors.text) === null || _c === void 0 ? void 0 : _c[900] : (_d = theme.colors.gray) === null || _d === void 0 ? void 0 : _d[500], "data-testid": dataTestId, ...fieldStyles, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: (_e = theme.colors.gray) === null || _e === void 0 ? void 0 : _e[500], children: (0, jsx_runtime_1.jsx)(lucide_react_1.ChevronDown, { size: 16 }) })] }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsxs)(react_2.PopoverContent, { width: "100%", borderRadius: "0.625rem", border: `0.063rem solid ${(_g = (_f = theme.colors.boxborder) === null || _f === void 0 ? void 0 : _f[200]) !== null && _g !== void 0 ? _g : (_h = theme.colors.gray) === null || _h === void 0 ? void 0 : _h[200]}`, boxShadow: (_j = theme.shadows) === null || _j === void 0 ? void 0 : _j.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && ((0, jsx_runtime_1.jsx)(react_2.Box, { p: 2, borderBottom: `0.063rem solid ${(_l = (_k = theme.colors.boxborder) === null || _k === void 0 ? void 0 : _k[100]) !== null && _l !== void 0 ? _l : (_m = theme.colors.gray) === null || _m === void 0 ? void 0 : _m[200]}`, children: (0, jsx_runtime_1.jsx)(react_2.Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
165
+ setFilterText(event.target.value);
166
+ setActiveIndex(0);
167
+ }, "aria-label": "Filter options" }) })), (0, jsx_runtime_1.jsxs)(react_2.Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: {
168
+ scrollbarWidth: "thin",
169
+ scrollbarColor: `${(_o = theme.colors.gray) === null || _o === void 0 ? void 0 : _o[300]} transparent`,
170
+ "&::-webkit-scrollbar": { width: "6px" },
171
+ "&::-webkit-scrollbar-thumb": {
172
+ background: (_p = theme.colors.gray) === null || _p === void 0 ? void 0 : _p[300],
173
+ borderRadius: "3px",
174
+ },
175
+ }, children: [filteredOptions.length === 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { px: 3, py: 2, fontSize: "0.8125rem", color: (_q = theme.colors.gray) === null || _q === void 0 ? void 0 : _q[500], children: "No Options" })), filteredOptions.map((option, index) => {
176
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
177
+ const isSelected = selectedIds.has(option.id.toString());
178
+ const isActive = index === activeIndex;
179
+ return ((0, jsx_runtime_1.jsxs)(react_2.Box, { id: `${listboxId}-option-${index}`, "data-index": index, role: "option", "aria-selected": isSelected, "aria-disabled": option.isDisabled, onMouseEnter: () => setActiveIndex(index), onClick: () => handleSelect(option), mx: 1.5, px: 2.5, py: 1.5, borderRadius: "0.375rem", cursor: option.isDisabled ? "not-allowed" : "pointer", opacity: option.isDisabled ? 0.4 : 1, display: "flex", alignItems: "center", gap: 2, fontSize: "0.8125rem", fontWeight: isSelected && !props.isMulti ? 600 : 500, color: isSelected && !props.isMulti
180
+ ? (_b = (_a = theme.colors.primary) === null || _a === void 0 ? void 0 : _a[700]) !== null && _b !== void 0 ? _b : (_c = theme.colors.primary) === null || _c === void 0 ? void 0 : _c[600]
181
+ : (_e = (_d = theme.colors.text) === null || _d === void 0 ? void 0 : _d[700]) !== null && _e !== void 0 ? _e : (_f = theme.colors.gray) === null || _f === void 0 ? void 0 : _f[700], bg: isActive
182
+ ? (_j = (_h = (_g = theme.colors.primary) === null || _g === void 0 ? void 0 : _g.opacity) === null || _h === void 0 ? void 0 : _h[8]) !== null && _j !== void 0 ? _j : (_k = theme.colors.gray) === null || _k === void 0 ? void 0 : _k[100]
183
+ : "transparent", transition: "background 0.12s ease, color 0.12s ease", children: [props.isMulti ? ((0, jsx_runtime_1.jsx)(react_2.Checkbox, { isChecked: isSelected, isDisabled: option.isDisabled, pointerEvents: "none", tabIndex: -1 })) : null, renderOption ? ((0, jsx_runtime_1.jsx)(react_2.Box, { flex: 1, minW: 0, children: renderOption(option, { isSelected, isActive }) })) : ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [option.icon ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "inline-flex", flexShrink: 0, children: option.icon })) : null, (0, jsx_runtime_1.jsxs)(react_2.Box, { flex: 1, minW: 0, isTruncated: true, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", isTruncated: true, children: option.label }), option.description ? ((0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", display: "block", fontSize: "0.75rem", fontWeight: 400, color: (_l = theme.colors.gray) === null || _l === void 0 ? void 0 : _l[500], isTruncated: true, children: option.description })) : null] })] }))] }, option.id));
184
+ })] })] }) })] }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage }), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText })] }));
185
+ }
@@ -0,0 +1,67 @@
1
+ import type { ReactNode } from "react";
2
+ export type OptionProp = {
3
+ id: string | number;
4
+ label: string | number;
5
+ /** Optional leading icon/avatar for this option's row (and the trigger, when selected). */
6
+ icon?: ReactNode;
7
+ /** Optional secondary line under the label (e.g. an email under a name). */
8
+ description?: string;
9
+ isDisabled?: boolean;
10
+ };
11
+ export type SelectV2Size = "sm" | "md" | "lg";
12
+ type SelectV2CommonProps = {
13
+ options: OptionProp[];
14
+ placeholder?: string;
15
+ label?: string;
16
+ error?: boolean;
17
+ errorMessage?: string;
18
+ helperText?: string;
19
+ isDisabled?: boolean;
20
+ isRequired?: boolean;
21
+ size?: SelectV2Size;
22
+ /** Shows a type-ahead filter input at the top of the popup. Defaults to true. */
23
+ isSearchable?: boolean;
24
+ /** Width applied to the trigger + popup. Defaults to 100% of the container. */
25
+ width?: string | number;
26
+ formControlStyle?: React.CSSProperties;
27
+ onBlur?: () => void;
28
+ onFocus?: () => void;
29
+ /** Forwarded to the trigger button — lets call sites keep existing RTL/e2e queries when migrating from `Select`. */
30
+ "data-testid"?: string;
31
+ /** Forwarded to the trigger button — for a labelless select (no `label` prop) that still needs an accessible name. */
32
+ "aria-label"?: string;
33
+ /**
34
+ * Full control over an option row's contents (icon + label + badge, avatar + name/email, etc).
35
+ * Falls back to plain `option.label` text when omitted. Receives `isSelected`/`isActive` so a
36
+ * custom row can mirror the built-in selected/keyboard-active styling if it re-implements them.
37
+ */
38
+ renderOption?: (option: OptionProp, state: {
39
+ isSelected: boolean;
40
+ isActive: boolean;
41
+ }) => ReactNode;
42
+ /** Custom trigger content when a value (or values) is selected. Falls back to label text / icon. */
43
+ renderValue?: (selected: OptionProp[]) => ReactNode;
44
+ /** Max popup height before the option list scrolls. Defaults to "16rem". */
45
+ maxMenuHeight?: string;
46
+ /**
47
+ * Opens the popup immediately on mount instead of waiting for a click — for inline-edit
48
+ * patterns (a table cell that swaps to a select the instant it becomes editable). Clicking
49
+ * away still closes it via the normal Popover close-on-blur behavior (which fires `onBlur`).
50
+ */
51
+ defaultOpen?: boolean;
52
+ };
53
+ export type SelectV2SingleProps = SelectV2CommonProps & {
54
+ isMulti?: false;
55
+ value?: string | number;
56
+ onChange: (selectedOption: OptionProp | undefined) => void;
57
+ };
58
+ export type SelectV2MultiProps = SelectV2CommonProps & {
59
+ isMulti: true;
60
+ value?: (string | number)[];
61
+ onChange: (selectedOptions: OptionProp[]) => void;
62
+ /** Show "N selected" once more than this many are chosen, instead of listing every label. Defaults to 2. */
63
+ maxLabelsBeforeSummary?: number;
64
+ };
65
+ export type SelectV2Props = SelectV2SingleProps | SelectV2MultiProps;
66
+ export {};
67
+ //# sourceMappingURL=SelectV2Props.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SelectV2Props.d.ts","sourceRoot":"","sources":["../../../src/Components/SelectV2/SelectV2Props.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,MAAM,MAAM,UAAU,GAAG;IACvB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,2FAA2F;IAC3F,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,4EAA4E;IAC5E,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,CAAC;AAE9C,KAAK,mBAAmB,GAAG;IACzB,OAAO,EAAE,UAAU,EAAE,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,IAAI,CAAC,EAAE,YAAY,CAAC;IACpB,iFAAiF;IACjF,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,+EAA+E;IAC/E,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,gBAAgB,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,oHAAoH;IACpH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sHAAsH;IACtH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;OAIG;IACH,YAAY,CAAC,EAAE,CACb,MAAM,EAAE,UAAU,EAClB,KAAK,EAAE;QAAE,UAAU,EAAE,OAAO,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,KAC9C,SAAS,CAAC;IACf,oGAAoG;IACpG,WAAW,CAAC,EAAE,CAAC,QAAQ,EAAE,UAAU,EAAE,KAAK,SAAS,CAAC;IACpD,4EAA4E;IAC5E,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IACtD,OAAO,CAAC,EAAE,KAAK,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACxB,QAAQ,EAAE,CAAC,cAAc,EAAE,UAAU,GAAG,SAAS,KAAK,IAAI,CAAC;CAC5D,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,mBAAmB,GAAG;IACrD,OAAO,EAAE,IAAI,CAAC;IACd,KAAK,CAAC,EAAE,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAC;IAC5B,QAAQ,EAAE,CAAC,eAAe,EAAE,UAAU,EAAE,KAAK,IAAI,CAAC;IAClD,4GAA4G;IAC5G,sBAAsB,CAAC,EAAE,MAAM,CAAC;CACjC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,kBAAkB,CAAC"}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,21 @@
1
+ import type { PaletteProps, ThemeName } from "../../Theme/tokens/types";
2
+ export declare const getSidebarActiveAccent: (colors: PaletteProps, brand: ThemeName | undefined, isDark: boolean) => {
3
+ icon: string;
4
+ label: string;
5
+ };
6
+ /**
7
+ * `sidebar.background` never inverts across modes (`buildDarkPalette.ts`), but `primary`
8
+ * does — so `primary[300]`/`primary[100]` correctly read as a light accent/label against a
9
+ * dark canvas in light mode, then invert to near-black in dark mode against that SAME
10
+ * permanently-dark canvas. Reusing each rung's own light-mode value in dark mode is the
11
+ * exact pairing already proven legible today.
12
+ *
13
+ * `brand` comes from `PixelizeThemeProvider`'s context, read directly (not via the throwing
14
+ * `useThemeMode()`) so a consumer on a plain `ChakraProvider` — dark mode is opt-in per
15
+ * CLAUDE.md — degrades to the current-mode value instead of crashing.
16
+ */
17
+ export declare const useSidebarActiveAccent: (colors: PaletteProps, isDark: boolean) => {
18
+ icon: string;
19
+ label: string;
20
+ };
21
+ //# sourceMappingURL=sidebarAccentColors.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sidebarAccentColors.d.ts","sourceRoot":"","sources":["../../../src/Components/SideBar/sidebarAccentColors.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,0BAA0B,CAAC;AAGxE,eAAO,MAAM,sBAAsB,GACjC,QAAQ,YAAY,EACpB,OAAO,SAAS,GAAG,SAAS,EAC5B,QAAQ,OAAO,KACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAU/B,CAAC;AAEF;;;;;;;;;;GAUG;AACH,eAAO,MAAM,sBAAsB,GACjC,QAAQ,YAAY,EACpB,QAAQ,OAAO,KACd;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAO/B,CAAC"}
@@ -0,0 +1,36 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.useSidebarActiveAccent = exports.getSidebarActiveAccent = void 0;
4
+ const react_1 = require("react");
5
+ const brands_1 = require("../../Theme/tokens/brands");
6
+ const PixelizeThemeProvider_1 = require("../../Theme/provider/PixelizeThemeProvider");
7
+ const getSidebarActiveAccent = (colors, brand, isDark) => {
8
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
9
+ const fallbackIcon = (_d = (_b = (_a = colors.primary) === null || _a === void 0 ? void 0 : _a[300]) !== null && _b !== void 0 ? _b : (_c = colors.gray) === null || _c === void 0 ? void 0 : _c[300]) !== null && _d !== void 0 ? _d : "#ffffff";
10
+ const fallbackLabel = (_h = (_f = (_e = colors.primary) === null || _e === void 0 ? void 0 : _e[100]) !== null && _f !== void 0 ? _f : (_g = colors.gray) === null || _g === void 0 ? void 0 : _g[100]) !== null && _h !== void 0 ? _h : "#ffffff";
11
+ if (!isDark)
12
+ return { icon: fallbackIcon, label: fallbackLabel };
13
+ const lightPrimary = brand ? (_j = brands_1.lightPalettes[brand]) === null || _j === void 0 ? void 0 : _j.primary : undefined;
14
+ return {
15
+ icon: (_k = lightPrimary === null || lightPrimary === void 0 ? void 0 : lightPrimary[300]) !== null && _k !== void 0 ? _k : fallbackIcon,
16
+ label: (_l = lightPrimary === null || lightPrimary === void 0 ? void 0 : lightPrimary[100]) !== null && _l !== void 0 ? _l : fallbackLabel,
17
+ };
18
+ };
19
+ exports.getSidebarActiveAccent = getSidebarActiveAccent;
20
+ /**
21
+ * `sidebar.background` never inverts across modes (`buildDarkPalette.ts`), but `primary`
22
+ * does — so `primary[300]`/`primary[100]` correctly read as a light accent/label against a
23
+ * dark canvas in light mode, then invert to near-black in dark mode against that SAME
24
+ * permanently-dark canvas. Reusing each rung's own light-mode value in dark mode is the
25
+ * exact pairing already proven legible today.
26
+ *
27
+ * `brand` comes from `PixelizeThemeProvider`'s context, read directly (not via the throwing
28
+ * `useThemeMode()`) so a consumer on a plain `ChakraProvider` — dark mode is opt-in per
29
+ * CLAUDE.md — degrades to the current-mode value instead of crashing.
30
+ */
31
+ const useSidebarActiveAccent = (colors, isDark) => {
32
+ const themeMode = (0, react_1.useContext)(PixelizeThemeProvider_1.ThemeModeContext);
33
+ const brand = themeMode === null || themeMode === void 0 ? void 0 : themeMode.brand;
34
+ return (0, react_1.useMemo)(() => (0, exports.getSidebarActiveAccent)(colors, brand, isDark), [colors, brand, isDark]);
35
+ };
36
+ exports.useSidebarActiveAccent = useSidebarActiveAccent;
@@ -0,0 +1,13 @@
1
+ import type { PaletteProps } from "../../../Theme/tokens/types";
2
+ /**
3
+ * Per-cell hover fill for a table row. `table.hover[300]` (the token built for this) still works
4
+ * in light mode — a pale tint against a white canvas — but in dark mode that rung sits within
5
+ * ~10 lightness points of the near-black canvas (both compressed near L7-15), so it computes to
6
+ * ~1.2:1 contrast: invisible, which is exactly what QA reported. `background[900]` is this
7
+ * palette's dark-mode "bright highlight" rung (~9.7-10.7:1 against the canvas, verified
8
+ * numerically across brands) — but the row's resting ink (`text[500]`) is tuned for a near-black
9
+ * backdrop and goes illegible against a bright one, so hover must also flip `color`, mirroring how
10
+ * Jodit's own dark-mode hover rule flips text to its canvas color alongside the brighter fill.
11
+ */
12
+ export declare const getTableRowHoverStyle: (colors: PaletteProps, isDark: boolean) => Record<string, string>;
13
+ //# sourceMappingURL=tableRowHoverStyle.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tableRowHoverStyle.d.ts","sourceRoot":"","sources":["../../../../src/Components/Table/components/tableRowHoverStyle.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE;;;;;;;;;GASG;AACH,eAAO,MAAM,qBAAqB,GAAI,QAAQ,YAAY,EAAE,QAAQ,OAAO,KAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAUlG,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getTableRowHoverStyle = void 0;
4
+ /**
5
+ * Per-cell hover fill for a table row. `table.hover[300]` (the token built for this) still works
6
+ * in light mode — a pale tint against a white canvas — but in dark mode that rung sits within
7
+ * ~10 lightness points of the near-black canvas (both compressed near L7-15), so it computes to
8
+ * ~1.2:1 contrast: invisible, which is exactly what QA reported. `background[900]` is this
9
+ * palette's dark-mode "bright highlight" rung (~9.7-10.7:1 against the canvas, verified
10
+ * numerically across brands) — but the row's resting ink (`text[500]`) is tuned for a near-black
11
+ * backdrop and goes illegible against a bright one, so hover must also flip `color`, mirroring how
12
+ * Jodit's own dark-mode hover rule flips text to its canvas color alongside the brighter fill.
13
+ */
14
+ const getTableRowHoverStyle = (colors, isDark) => {
15
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16
+ if (isDark) {
17
+ return {
18
+ backgroundColor: (_b = (_a = colors.background) === null || _a === void 0 ? void 0 : _a[900]) !== null && _b !== void 0 ? _b : (_d = (_c = colors.table) === null || _c === void 0 ? void 0 : _c.hover) === null || _d === void 0 ? void 0 : _d[300],
19
+ color: (_e = colors.backgroundColor) === null || _e === void 0 ? void 0 : _e.main,
20
+ };
21
+ }
22
+ return {
23
+ backgroundColor: (_h = (_g = (_f = colors.table) === null || _f === void 0 ? void 0 : _f.hover) === null || _g === void 0 ? void 0 : _g[300]) !== null && _h !== void 0 ? _h : (_k = (_j = colors.secondary) === null || _j === void 0 ? void 0 : _j.opacity) === null || _k === void 0 ? void 0 : _k[4],
24
+ };
25
+ };
26
+ exports.getTableRowHoverStyle = getTableRowHoverStyle;
@@ -0,0 +1,33 @@
1
+ import type { StyleFunctionProps } from "@chakra-ui/react";
2
+ declare const $badgeBorder: {
3
+ variable: string;
4
+ reference: string;
5
+ };
6
+ export declare const Avatar: {
7
+ baseStyle?: (({ theme }: StyleFunctionProps) => {
8
+ badge: {
9
+ [$badgeBorder.variable]: any;
10
+ };
11
+ container: {
12
+ [$badgeBorder.variable]: any;
13
+ };
14
+ }) | undefined;
15
+ sizes?: {
16
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
17
+ keys: ("container" | "label" | "group" | "badge" | "excessLabel")[];
18
+ }>;
19
+ } | undefined;
20
+ variants?: {
21
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
22
+ keys: ("container" | "label" | "group" | "badge" | "excessLabel")[];
23
+ }>;
24
+ } | undefined;
25
+ defaultProps?: {
26
+ size?: string | number | undefined;
27
+ variant?: string | number | undefined;
28
+ colorScheme?: string | undefined;
29
+ } | undefined;
30
+ parts: ("container" | "label" | "group" | "badge" | "excessLabel")[];
31
+ };
32
+ export {};
33
+ //# sourceMappingURL=Avatar.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Avatar.styles.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/Avatar.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAK3D,QAAA,MAAM,YAAY;;;CAAgC,CAAC;AAoBnD,eAAO,MAAM,MAAM;6BAZ4B,kBAAkB;;YAI3D,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAQ;;;YAG/B,CAAC,YAAY,CAAC,QAAQ,CAAC,MAAQ;;;;;;;;;;;;;;;;;;;CAOnC,CAAC"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Avatar = void 0;
4
+ const react_1 = require("@chakra-ui/react");
5
+ const anatomy_1 = require("@chakra-ui/anatomy");
6
+ const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.avatarAnatomy.keys);
7
+ const $badgeBorder = (0, react_1.cssVar)("avatar-border-color");
8
+ /**
9
+ * Same bug class as Menu/Modal/Popover: Chakra's own Avatar baseStyle hardcodes the badge/
10
+ * container border color to `colors.white` outside `_dark` (it's a cutout ring meant to match
11
+ * the surface the avatar sits on), gated behind `_dark`, which this theme-swap app never
12
+ * triggers. Every bare `<Avatar>`/`<AvatarBadge>` renders a white ring on the dark canvas.
13
+ */
14
+ const baseStyle = definePartsStyle(({ theme }) => {
15
+ var _a, _b, _c, _d, _e, _f;
16
+ const border = (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff";
17
+ return {
18
+ badge: {
19
+ [$badgeBorder.variable]: border,
20
+ },
21
+ container: {
22
+ [$badgeBorder.variable]: border,
23
+ },
24
+ };
25
+ });
26
+ exports.Avatar = defineMultiStyleConfig({
27
+ baseStyle,
28
+ });
@@ -0,0 +1,32 @@
1
+ import type { StyleFunctionProps } from "@chakra-ui/react";
2
+ declare const $bg: {
3
+ variable: string;
4
+ reference: string;
5
+ };
6
+ export declare const Drawer: {
7
+ baseStyle?: (({ theme }: StyleFunctionProps) => {
8
+ dialog: {
9
+ [$bg.variable]: any;
10
+ bg: string;
11
+ color: any;
12
+ };
13
+ }) | undefined;
14
+ sizes?: {
15
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
16
+ keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
17
+ }>;
18
+ } | undefined;
19
+ variants?: {
20
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
21
+ keys: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
22
+ }>;
23
+ } | undefined;
24
+ defaultProps?: {
25
+ size?: string | number | undefined;
26
+ variant?: string | number | undefined;
27
+ colorScheme?: string | undefined;
28
+ } | undefined;
29
+ parts: ("overlay" | "body" | "dialog" | "footer" | "header" | "closeButton" | "dialogContainer")[];
30
+ };
31
+ export {};
32
+ //# sourceMappingURL=Drawer.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.styles.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/Drawer.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAK3D,QAAA,MAAM,GAAG;;;CAAsB,CAAC;AAgBhC,eAAO,MAAM,MAAM;6BAR4B,kBAAkB;;YAE7D,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAkF;;;;;;;;;;;;;;;;;;;;;CAQlG,CAAC"}
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Drawer = void 0;
4
+ const react_1 = require("@chakra-ui/react");
5
+ const anatomy_1 = require("@chakra-ui/anatomy");
6
+ const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.drawerAnatomy.keys);
7
+ const $bg = (0, react_1.cssVar)("drawer-bg");
8
+ /**
9
+ * Chakra's own Drawer baseStyle hardcodes `--drawer-bg` to "colors.white" (gated behind `_dark`,
10
+ * which this theme-swap app never triggers — see createBrandTheme's colorMode comment), so every
11
+ * `<DrawerContent>` in every consuming app renders a white panel on the dark canvas — the same
12
+ * bug class `Menu.styles.ts`/`Modal.styles.ts` already fix.
13
+ */
14
+ const baseStyle = definePartsStyle(({ theme }) => {
15
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
16
+ return ({
17
+ dialog: {
18
+ [$bg.variable]: (_f = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.backgroundColor) === null || _b === void 0 ? void 0 : _b.light) !== null && _c !== void 0 ? _c : (_e = (_d = theme.colors) === null || _d === void 0 ? void 0 : _d.background) === null || _e === void 0 ? void 0 : _e[50]) !== null && _f !== void 0 ? _f : "#fff",
19
+ bg: $bg.reference,
20
+ color: (_j = (_h = (_g = theme.colors) === null || _g === void 0 ? void 0 : _g.text) === null || _h === void 0 ? void 0 : _h[900]) !== null && _j !== void 0 ? _j : "inherit",
21
+ },
22
+ });
23
+ });
24
+ exports.Drawer = defineMultiStyleConfig({
25
+ baseStyle,
26
+ });
@@ -0,0 +1,70 @@
1
+ import type { StyleFunctionProps } from "@chakra-ui/react";
2
+ declare const $bg: {
3
+ variable: string;
4
+ reference: string;
5
+ };
6
+ /**
7
+ * Chakra's own MenuList baseStyle hardcodes `--menu-bg` to "#fff" (gated behind `_dark`, which
8
+ * this theme-swap app never triggers — see createBrandTheme's colorMode comment), so every
9
+ * bare `<MenuList>` in every consuming app renders a white dropdown on the dark canvas. A `bg`
10
+ * prop set by a call site only recolors the list's own box, not this var — which `MenuItem`'s
11
+ * `_focus`/`_active`/`_expanded` states read — so both must come from the theme, not per call
12
+ * site (already duplicated at every fix-it-locally call site: NavigationBar, ButtonGroupIcon,
13
+ * ThemeSwitcher's BrandMenu/MenuVariant).
14
+ *
15
+ * Chakra's own MenuItem baseStyle then RE-hardcodes the same `--menu-bg` var on `_focus`/
16
+ * `_active`/`_expanded` (to `colors.gray.100`/`.200`, also `_dark`-gated) — so even with `list`
17
+ * fixed above, hovering/focusing an item snaps the var back to a near-white literal. Override
18
+ * `item` here too, to a theme-driven hover tint, or every hover state stays white regardless of
19
+ * the list fix.
20
+ */
21
+ declare const $itemBg: {
22
+ variable: string;
23
+ reference: string;
24
+ };
25
+ export declare const Menu: {
26
+ baseStyle?: (({ theme }: StyleFunctionProps) => {
27
+ list: {
28
+ [$bg.variable]: any;
29
+ bg: string;
30
+ color: any;
31
+ };
32
+ item: {
33
+ bg: string;
34
+ _focus: {
35
+ [$itemBg.variable]: any;
36
+ bg: string;
37
+ };
38
+ _hover: {
39
+ [$itemBg.variable]: any;
40
+ bg: string;
41
+ };
42
+ _active: {
43
+ [$itemBg.variable]: any;
44
+ bg: string;
45
+ };
46
+ _expanded: {
47
+ [$itemBg.variable]: any;
48
+ bg: string;
49
+ };
50
+ };
51
+ }) | undefined;
52
+ sizes?: {
53
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
54
+ keys: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
55
+ }>;
56
+ } | undefined;
57
+ variants?: {
58
+ [key: string]: import("@chakra-ui/react").PartsStyleInterpolation<{
59
+ keys: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
60
+ }>;
61
+ } | undefined;
62
+ defaultProps?: {
63
+ size?: string | number | undefined;
64
+ variant?: string | number | undefined;
65
+ colorScheme?: string | undefined;
66
+ } | undefined;
67
+ parts: ("button" | "list" | "icon" | "item" | "groupTitle" | "command" | "divider")[];
68
+ };
69
+ export {};
70
+ //# sourceMappingURL=Menu.styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Menu.styles.d.ts","sourceRoot":"","sources":["../../../src/Theme/chakra/Menu.styles.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAK3D,QAAA,MAAM,GAAG;;;CAAoB,CAAC;AAE9B;;;;;;;;;;;;;;GAcG;AACH,QAAA,MAAM,OAAO;;;CAAyB,CAAC;AA4BvC,eAAO,MAAM,IAAI;6BA1B8B,kBAAkB;;YAO3D,CAAC,GAAG,CAAC,QAAQ,CAAC,MAAkF;;;;;;;gBAWtF,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAS;;;;gBAC3B,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAS;;;;gBAC1B,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAU;;;;gBAC1B,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAS;;;;;;;;;;;;;;;;;;;;;CAO5C,CAAC"}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Menu = void 0;
4
+ const react_1 = require("@chakra-ui/react");
5
+ const anatomy_1 = require("@chakra-ui/anatomy");
6
+ const { defineMultiStyleConfig, definePartsStyle } = (0, react_1.createMultiStyleConfigHelpers)(anatomy_1.menuAnatomy.keys);
7
+ const $bg = (0, react_1.cssVar)("menu-bg");
8
+ /**
9
+ * Chakra's own MenuList baseStyle hardcodes `--menu-bg` to "#fff" (gated behind `_dark`, which
10
+ * this theme-swap app never triggers — see createBrandTheme's colorMode comment), so every
11
+ * bare `<MenuList>` in every consuming app renders a white dropdown on the dark canvas. A `bg`
12
+ * prop set by a call site only recolors the list's own box, not this var — which `MenuItem`'s
13
+ * `_focus`/`_active`/`_expanded` states read — so both must come from the theme, not per call
14
+ * site (already duplicated at every fix-it-locally call site: NavigationBar, ButtonGroupIcon,
15
+ * ThemeSwitcher's BrandMenu/MenuVariant).
16
+ *
17
+ * Chakra's own MenuItem baseStyle then RE-hardcodes the same `--menu-bg` var on `_focus`/
18
+ * `_active`/`_expanded` (to `colors.gray.100`/`.200`, also `_dark`-gated) — so even with `list`
19
+ * fixed above, hovering/focusing an item snaps the var back to a near-white literal. Override
20
+ * `item` here too, to a theme-driven hover tint, or every hover state stays white regardless of
21
+ * the list fix.
22
+ */
23
+ const $itemBg = (0, react_1.cssVar)("menu-item-bg");
24
+ const baseStyle = definePartsStyle(({ theme }) => {
25
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y;
26
+ const hoverBg = (_g = (_d = (_c = (_b = (_a = theme.colors) === null || _a === void 0 ? void 0 : _a.primary) === null || _b === void 0 ? void 0 : _b.opacity) === null || _c === void 0 ? void 0 : _c[8]) !== null && _d !== void 0 ? _d : (_f = (_e = theme.colors) === null || _e === void 0 ? void 0 : _e.gray) === null || _f === void 0 ? void 0 : _f[100]) !== null && _g !== void 0 ? _g : "#f7fafc";
27
+ const activeBg = (_p = (_l = (_k = (_j = (_h = theme.colors) === null || _h === void 0 ? void 0 : _h.primary) === null || _j === void 0 ? void 0 : _j.opacity) === null || _k === void 0 ? void 0 : _k[16]) !== null && _l !== void 0 ? _l : (_o = (_m = theme.colors) === null || _m === void 0 ? void 0 : _m.gray) === null || _o === void 0 ? void 0 : _o[200]) !== null && _p !== void 0 ? _p : "#edf2f7";
28
+ return {
29
+ list: {
30
+ [$bg.variable]: (_v = (_s = (_r = (_q = theme.colors) === null || _q === void 0 ? void 0 : _q.backgroundColor) === null || _r === void 0 ? void 0 : _r.light) !== null && _s !== void 0 ? _s : (_u = (_t = theme.colors) === null || _t === void 0 ? void 0 : _t.background) === null || _u === void 0 ? void 0 : _u[50]) !== null && _v !== void 0 ? _v : "#fff",
31
+ bg: $bg.reference,
32
+ color: (_y = (_x = (_w = theme.colors) === null || _w === void 0 ? void 0 : _w.text) === null || _x === void 0 ? void 0 : _x[900]) !== null && _y !== void 0 ? _y : "inherit",
33
+ },
34
+ // Own CSS var (`--menu-item-bg`), NOT the list's `--menu-bg` — Chakra's stock item
35
+ // baseStyle rewrites `--menu-bg` itself on hover/focus, so reusing that same var name
36
+ // here for the item's resting bg risked the two colliding under the same custom
37
+ // property. A dedicated var keeps the item's hover/focus tint fully independent of the
38
+ // list's background var.
39
+ item: {
40
+ bg: "transparent",
41
+ _focus: { [$itemBg.variable]: hoverBg, bg: $itemBg.reference },
42
+ _hover: { [$itemBg.variable]: hoverBg, bg: $itemBg.reference },
43
+ _active: { [$itemBg.variable]: activeBg, bg: $itemBg.reference },
44
+ _expanded: { [$itemBg.variable]: hoverBg, bg: $itemBg.reference },
45
+ },
46
+ };
47
+ });
48
+ exports.Menu = defineMultiStyleConfig({
49
+ baseStyle,
50
+ });