pixelize-design-library 2.4.2-beta.2 → 2.4.2-beta.20

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 (192) hide show
  1. package/dist/Components/Accordion/Accordion.js +2 -2
  2. package/dist/Components/Button/Button.d.ts +2 -2
  3. package/dist/Components/Button/Button.js +3 -3
  4. package/dist/Components/Button/Button.styles.js +4 -3
  5. package/dist/Components/Button/ButtonProps.d.ts +6 -1
  6. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
  7. package/dist/Components/Card/Card.d.ts +1 -1
  8. package/dist/Components/Card/Card.js +2 -2
  9. package/dist/Components/Card/CardProps.d.ts +0 -1
  10. package/dist/Components/Checkbox/Checkbox.js +1 -1
  11. package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
  12. package/dist/Components/Common/fieldStyles.js +1 -1
  13. package/dist/Components/CopyButton/CopyButton.js +1 -1
  14. package/dist/Components/CustomModulesTable/EditModuleModal.js +1 -1
  15. package/dist/Components/DatePicker/CalendarPanel.js +1 -1
  16. package/dist/Components/DatePicker/RangeDatePicker.js +2 -2
  17. package/dist/Components/DatePicker/SingleDatePicker.js +2 -2
  18. package/dist/Components/DatePicker/TimeOnlyPicker.js +1 -1
  19. package/dist/Components/Dropdown/DropDown.js +3 -13
  20. package/dist/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  21. package/dist/Components/FilePreview/FilePreview.js +1 -1
  22. package/dist/Components/FileUpload/FileUpload.js +3 -2
  23. package/dist/Components/FileUpload/FileUploadProps.d.ts +2 -1
  24. package/dist/Components/FileUpload/constants.js +1 -0
  25. package/dist/Components/FilterSidebar/FilterSidebar.js +4 -4
  26. package/dist/Components/Form/FormWrapper.js +1 -1
  27. package/dist/Components/Input/TextInput.styles.js +6 -4
  28. package/dist/Components/InputTextArea/InputTextArea.style.js +5 -4
  29. package/dist/Components/KanbanBoard/KanbanBoard.js +5 -45
  30. package/dist/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  31. package/dist/Components/MultiSelect/MultiSelect.js +1 -1
  32. package/dist/Components/NavigationBar/NavigationBar.js +3 -3
  33. package/dist/Components/NoteTextArea/NoteTextArea.js +5 -3
  34. package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
  35. package/dist/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  36. package/dist/Components/PinInput/PinInput.js +1 -1
  37. package/dist/Components/PlanPill/PlanPill.js +5 -5
  38. package/dist/Components/PlanPill/planPillGradient.d.ts +2 -14
  39. package/dist/Components/PlanPill/planPillGradient.js +3 -15
  40. package/dist/Components/ProductCard/ProductPrice.js +1 -1
  41. package/dist/Components/ProfileCard/ProfileCard.js +1 -1
  42. package/dist/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  43. package/dist/Components/RadioButton/RadioButton.js +1 -1
  44. package/dist/Components/Reorder/Reorder.js +1 -1
  45. package/dist/Components/ScrollbarBox/ScrollbarBox.d.ts +13 -0
  46. package/dist/Components/ScrollbarBox/ScrollbarBox.js +11 -0
  47. package/dist/Components/SearchSelect/SearchSelect.js +5 -4
  48. package/dist/Components/Select/Select.styles.js +3 -2
  49. package/dist/Components/SelectSearch/SelectSearch.js +3 -3
  50. package/dist/Components/SelectV2/SelectV2.js +5 -11
  51. package/dist/Components/SideBar/SecondaryBar.js +1 -1
  52. package/dist/Components/StageProgress/StageProgress.js +2 -9
  53. package/dist/Components/Table/Table.d.ts +1 -1
  54. package/dist/Components/Table/Table.js +17 -24
  55. package/dist/Components/Table/TableProps.d.ts +4 -0
  56. package/dist/Components/Table/components/TableActions.js +2 -2
  57. package/dist/Components/Table/components/TableBody.js +41 -12
  58. package/dist/Components/Table/components/TableGroupRow.js +1 -1
  59. package/dist/Components/Table/components/TableHeader.js +21 -8
  60. package/dist/Components/Table/components/TableSearch.js +1 -1
  61. package/dist/Components/Table/filters/ActiveFilters.js +2 -18
  62. package/dist/Components/Table/settings/ManageColumns.js +3 -17
  63. package/dist/Components/Table/settings/TableSettings.js +5 -11
  64. package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
  65. package/dist/Components/Table/variants/TableVariantContext.js +17 -0
  66. package/dist/Components/Table/variants/classic.d.ts +6 -0
  67. package/dist/Components/Table/variants/classic.js +47 -0
  68. package/dist/Components/Table/variants/index.d.ts +7 -0
  69. package/dist/Components/Table/variants/index.js +27 -0
  70. package/dist/Components/Table/variants/pillInk.d.ts +6 -0
  71. package/dist/Components/Table/variants/pillInk.js +21 -0
  72. package/dist/Components/Table/variants/studio.d.ts +6 -0
  73. package/dist/Components/Table/variants/studio.js +50 -0
  74. package/dist/Components/Table/variants/tokens.d.ts +49 -0
  75. package/dist/Components/Table/variants/tokens.js +2 -0
  76. package/dist/Components/Timeline/Timeline.js +2 -2
  77. package/dist/Components/Toaster/Toaster.js +1 -1
  78. package/dist/Components/Trail/TrailWorks.js +1 -1
  79. package/dist/Components/UpgradeButton/UpgradeButton.js +3 -3
  80. package/dist/Constants/Sidebar.js +3 -2
  81. package/dist/Theme/chakra/Menu.styles.d.ts +9 -6
  82. package/dist/Theme/chakra/Menu.styles.js +11 -5
  83. package/dist/Theme/chakra/Popover.styles.d.ts +6 -3
  84. package/dist/Theme/chakra/Popover.styles.js +11 -6
  85. package/dist/Theme/chakra/Switch.styles.d.ts +1 -1
  86. package/dist/Theme/chakra/Switch.styles.js +7 -9
  87. package/dist/Theme/chakra/componentStyles.d.ts +15 -9
  88. package/dist/Theme/chakra/createBrandTheme.js +3 -16
  89. package/dist/Theme/provider/PixelizeThemeProvider.js +18 -20
  90. package/dist/Theme/provider/ThemeSwitcher.js +13 -20
  91. package/dist/Theme/tokens/brands/lavender/palette.light.js +2 -6
  92. package/dist/Theme/tokens/brands/slate/palette.light.js +1 -5
  93. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  94. package/dist/Theme/tokens/builders/gradientInk.d.ts +22 -0
  95. package/dist/Theme/tokens/builders/gradientInk.js +28 -0
  96. package/dist/Theme/tokens/builders/index.d.ts +3 -0
  97. package/dist/Theme/tokens/builders/index.js +3 -0
  98. package/dist/Theme/tokens/builders/outlineRung.d.ts +32 -3
  99. package/dist/Theme/tokens/builders/outlineRung.js +74 -5
  100. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  101. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  102. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
  103. package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
  104. package/dist/Theme/tokens/builders/scrollbar.d.ts +12 -0
  105. package/dist/Theme/tokens/builders/scrollbar.js +57 -0
  106. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -0
  107. package/dist/Theme/tokens/builders/surfaceRungs.js +20 -5
  108. package/dist/esm/Components/Accordion/Accordion.js +2 -2
  109. package/dist/esm/Components/Button/Button.js +4 -4
  110. package/dist/esm/Components/Button/Button.styles.js +5 -4
  111. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +6 -6
  112. package/dist/esm/Components/Card/Card.js +2 -2
  113. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  114. package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
  115. package/dist/esm/Components/Common/fieldStyles.js +1 -1
  116. package/dist/esm/Components/CopyButton/CopyButton.js +1 -1
  117. package/dist/esm/Components/CustomModulesTable/EditModuleModal.js +1 -1
  118. package/dist/esm/Components/DatePicker/CalendarPanel.js +1 -1
  119. package/dist/esm/Components/DatePicker/RangeDatePicker.js +2 -2
  120. package/dist/esm/Components/DatePicker/SingleDatePicker.js +2 -2
  121. package/dist/esm/Components/DatePicker/TimeOnlyPicker.js +1 -1
  122. package/dist/esm/Components/Dropdown/DropDown.js +3 -13
  123. package/dist/esm/Components/EmailCards/VerifyEmailOtp/VerifyEmailOtp.js +1 -1
  124. package/dist/esm/Components/FilePreview/FilePreview.js +1 -1
  125. package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
  126. package/dist/esm/Components/FileUpload/constants.js +1 -0
  127. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +4 -4
  128. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  129. package/dist/esm/Components/Input/TextInput.styles.js +6 -4
  130. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +5 -4
  131. package/dist/esm/Components/KanbanBoard/KanbanBoard.js +5 -45
  132. package/dist/esm/Components/LimitReachedModal/LimitReachedModal.js +4 -5
  133. package/dist/esm/Components/MultiSelect/MultiSelect.js +1 -1
  134. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
  135. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +5 -3
  136. package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
  137. package/dist/esm/Components/OrgSwitcher/OrgSwitcher.js +2 -2
  138. package/dist/esm/Components/PinInput/PinInput.js +1 -1
  139. package/dist/esm/Components/PlanPill/PlanPill.js +6 -6
  140. package/dist/esm/Components/PlanPill/planPillGradient.js +3 -15
  141. package/dist/esm/Components/ProductCard/ProductPrice.js +1 -1
  142. package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
  143. package/dist/esm/Components/ProfilePhotoViewer/ProfilePhotoViewer.js +1 -1
  144. package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
  145. package/dist/esm/Components/Reorder/Reorder.js +1 -1
  146. package/dist/esm/Components/ScrollbarBox/ScrollbarBox.js +9 -0
  147. package/dist/esm/Components/SearchSelect/SearchSelect.js +5 -4
  148. package/dist/esm/Components/Select/Select.styles.js +3 -2
  149. package/dist/esm/Components/SelectSearch/SelectSearch.js +3 -3
  150. package/dist/esm/Components/SelectV2/SelectV2.js +5 -11
  151. package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
  152. package/dist/esm/Components/StageProgress/StageProgress.js +2 -9
  153. package/dist/esm/Components/Table/Table.js +17 -24
  154. package/dist/esm/Components/Table/components/TableActions.js +2 -2
  155. package/dist/esm/Components/Table/components/TableBody.js +42 -13
  156. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
  157. package/dist/esm/Components/Table/components/TableHeader.js +21 -8
  158. package/dist/esm/Components/Table/components/TableSearch.js +1 -1
  159. package/dist/esm/Components/Table/filters/ActiveFilters.js +2 -18
  160. package/dist/esm/Components/Table/settings/ManageColumns.js +3 -17
  161. package/dist/esm/Components/Table/settings/TableSettings.js +5 -11
  162. package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
  163. package/dist/esm/Components/Table/variants/classic.js +43 -0
  164. package/dist/esm/Components/Table/variants/index.js +9 -0
  165. package/dist/esm/Components/Table/variants/pillInk.js +18 -0
  166. package/dist/esm/Components/Table/variants/studio.js +46 -0
  167. package/dist/esm/Components/Table/variants/tokens.js +1 -0
  168. package/dist/esm/Components/Timeline/Timeline.js +2 -2
  169. package/dist/esm/Components/Toaster/Toaster.js +1 -1
  170. package/dist/esm/Components/Trail/TrailWorks.js +1 -1
  171. package/dist/esm/Components/UpgradeButton/UpgradeButton.js +3 -3
  172. package/dist/esm/Constants/Sidebar.js +3 -2
  173. package/dist/esm/Theme/chakra/Menu.styles.js +11 -5
  174. package/dist/esm/Theme/chakra/Popover.styles.js +11 -6
  175. package/dist/esm/Theme/chakra/Switch.styles.js +7 -9
  176. package/dist/esm/Theme/chakra/createBrandTheme.js +3 -16
  177. package/dist/esm/Theme/provider/PixelizeThemeProvider.js +18 -20
  178. package/dist/esm/Theme/provider/ThemeSwitcher.js +13 -20
  179. package/dist/esm/Theme/tokens/brands/lavender/palette.light.js +2 -6
  180. package/dist/esm/Theme/tokens/brands/slate/palette.light.js +1 -5
  181. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  182. package/dist/esm/Theme/tokens/builders/gradientInk.js +22 -0
  183. package/dist/esm/Theme/tokens/builders/index.js +3 -0
  184. package/dist/esm/Theme/tokens/builders/outlineRung.js +70 -4
  185. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  186. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
  187. package/dist/esm/Theme/tokens/builders/scrollbar.js +52 -0
  188. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -5
  189. package/dist/esm/index.js +5 -1
  190. package/dist/index.d.ts +10 -2
  191. package/dist/index.js +17 -3
  192. package/package.json +4 -2
@@ -5,6 +5,7 @@ import { DragDropContext, Droppable, Draggable, } from "@hello-pangea/dnd";
5
5
  import { Plus, Trash2, GripVertical, ChevronLeft, ChevronRight } from "lucide-react";
6
6
  import { VariableSizeList as List, } from "react-window";
7
7
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
8
+ import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
8
9
  import { useGetPreferences, useSavePreferences, } from "../../Hooks/usePreferences.js";
9
10
  import AccountCard from "./AccountCard.js";
10
11
  import HeaderActions from "../Header/HeaderActions.js";
@@ -364,37 +365,15 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
364
365
  : colors.boxborder[200]}`, transition: "background 0.15s ease, border-color 0.15s ease, width 0.2s ease", display: "flex", flexDirection: "column", flexShrink: 0, overflow: isColCollapsed ? "visible" : "hidden", height: `${containerHeight - 60}px`, onMouseEnter: () => setHoveredColumn(colId), onMouseLeave: () => setHoveredColumn(null), children: [isColCollapsed ? (_jsxs(Flex, { direction: "column", align: "stretch", flex: "1", width: "100%", minH: 0, overflow: "visible", position: "relative", children: [_jsxs(Flex, { as: "header", direction: "column", align: "center", flexShrink: 0, width: "100%", py: 3, px: 1, gap: 3, borderTop: "0.25rem solid", borderTopColor: (_a = column.color) !== null && _a !== void 0 ? _a : colors.primary[500], bg: colors.background[100], position: "relative", zIndex: 1, children: [enableColumnReorder && columnDragHandleProps ? (_jsx(Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, children: _jsx(Box, { as: GripVertical, size: 14, color: colors.textMuted }) })) : null, enableColumnCollapse && (_jsx(Flex, { flexShrink: 0, w: "100%", justify: "center", bg: colors.background[100], position: "relative", zIndex: 3, children: _jsx(IconButton, { "aria-label": "Expand column", icon: _jsx(ChevronRight, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", onClick: () => toggleColumnCollapsed(colId) }) })), _jsx(Text, { as: "span", fontWeight: "700", fontSize: "0.75rem", color: colors.text[700], sx: {
365
366
  writingMode: "vertical-rl",
366
367
  textOrientation: "mixed",
367
- }, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), _jsx(Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "full", border: "1px solid", borderColor: colors.boxborder[200], display: "flex", backgroundColor: colors.background[100], alignItems: "center", justifyContent: "center", color: colors.text[900], fontWeight: 600, fontSize: "10px", children: (_b = column === null || column === void 0 ? void 0 : column.items) === null || _b === void 0 ? void 0 : _b.length })] }), column.customNode ? (_jsx(Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: colors.background[100], "aria-hidden": true })) : null, column.customNode ? (_jsx(Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: colors.background[100], position: "relative", zIndex: 2, children: _jsx(Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem', children: _jsx(VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: colors.text[600], children: column.customNode() }) }) })) : (_jsx(Box, { flex: "1", minH: 0 }))] })) : (_jsxs(Flex, { width: "100%", h: !isColCollapsed && !!((_c = column.customNode) === null || _c === void 0 ? void 0 : _c.call(column)) ? "auto" : "2.75rem", align: !isColCollapsed && !!((_d = column.customNode) === null || _d === void 0 ? void 0 : _d.call(column)) ? "flex-start" : "center", px: 3, py: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2, borderBottom: `0.063rem solid ${colors.boxborder[100]}`, children: [_jsxs(Flex, { direction: "column", gap: 1, minW: 0, flex: "1", children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Box, { boxSize: "0.625rem", borderRadius: "full", bg: (_e = column.color) !== null && _e !== void 0 ? _e : colors.primary[500], flexShrink: 0 }), enableColumnReorder && columnDragHandleProps ? (_jsx(Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, children: _jsx(Box, { as: GripVertical, size: 14, color: colors.textMuted }) })) : null, _jsx(Text, { as: "span", fontWeight: "600", fontSize: "0.875rem", color: colors.text[700], noOfLines: 1, minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", children: column.title }) })] }), column.customNode ? (_jsx(Box, { as: "section", "aria-label": "Column summary", width: "100%", flexShrink: 0, fontSize: "xs", color: colors.text[600], children: (_f = column.customNode) === null || _f === void 0 ? void 0 : _f.call(column) })) : null] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Badge, { minW: "1.5rem", h: "1.5rem", px: 2, borderRadius: "full", backgroundColor: colors.gray[100], display: "flex", alignItems: "center", justifyContent: "center", color: colors.text[700], fontWeight: 600, fontSize: "0.625rem", children: (_g = column === null || column === void 0 ? void 0 : column.items) === null || _g === void 0 ? void 0 : _g.length }), enableColumnCollapse && (_jsx(IconButton, { "aria-label": "Collapse column", icon: _jsx(ChevronLeft, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", flexShrink: 0, onClick: () => toggleColumnCollapsed(colId) })), canDelete &&
368
+ }, maxH: `${Math.max(120, containerHeight - 200)}px`, overflow: "hidden", lineHeight: "1.2", title: column.title, children: column.title }), _jsx(Badge, { minW: "1.25rem", h: "1.25rem", borderRadius: "full", border: "1px solid", borderColor: colors.boxborder[200], display: "flex", backgroundColor: colors.background[100], alignItems: "center", justifyContent: "center", color: colors.text[900], fontWeight: 600, fontSize: "10px", children: (_b = column === null || column === void 0 ? void 0 : column.items) === null || _b === void 0 ? void 0 : _b.length })] }), column.customNode ? (_jsx(Box, { flexShrink: 0, minH: COLLAPSED_CUSTOM_NODE_TOP_RESERVE, w: "100%", bg: colors.background[100], "aria-hidden": true })) : null, column.customNode ? (_jsx(Box, { as: "section", "aria-label": "Column summary", flex: "1", minH: 0, w: "100%", overflow: "visible", py: 2, display: "flex", flexDirection: "column", alignItems: "center", justifyContent: "flex-start", bg: colors.background[100], position: "relative", zIndex: 2, children: _jsx(Box, { position: "relative", transform: "rotate(90deg)", transformOrigin: "center center", marginTop: '1rem', children: _jsx(VStack, { align: "stretch", spacing: 1, minW: "max-content", fontSize: "xs", color: colors.text[600], children: column.customNode() }) }) })) : (_jsx(Box, { flex: "1", minH: 0 }))] })) : (_jsxs(Flex, { width: "100%", h: !isColCollapsed && !!((_c = column.customNode) === null || _c === void 0 ? void 0 : _c.call(column)) ? "auto" : "2.75rem", align: !isColCollapsed && !!((_d = column.customNode) === null || _d === void 0 ? void 0 : _d.call(column)) ? "flex-start" : "center", px: 3, py: 2, flexShrink: 0, justifyContent: "space-between", position: "relative", gap: 2, borderBottom: `0.063rem solid ${colors.boxborder[200]}`, children: [_jsxs(Flex, { direction: "column", gap: 1, minW: 0, flex: "1", children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Box, { boxSize: "0.625rem", borderRadius: "full", bg: (_e = column.color) !== null && _e !== void 0 ? _e : colors.primary[500], flexShrink: 0 }), enableColumnReorder && columnDragHandleProps ? (_jsx(Flex, { align: "center", justify: "center", flexShrink: 0, cursor: "grab", ...columnDragHandleProps, children: _jsx(Box, { as: GripVertical, size: 14, color: colors.textMuted }) })) : null, _jsx(Text, { as: "span", fontWeight: "600", fontSize: "0.875rem", color: colors.text[700], noOfLines: 1, minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", children: column.title }) })] }), column.customNode ? (_jsx(Box, { as: "section", "aria-label": "Column summary", width: "100%", flexShrink: 0, fontSize: "xs", color: colors.text[600], children: (_f = column.customNode) === null || _f === void 0 ? void 0 : _f.call(column) })) : null] }), _jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(Badge, { minW: "1.5rem", h: "1.5rem", px: 2, borderRadius: "full", backgroundColor: colors.gray[100], display: "flex", alignItems: "center", justifyContent: "center", color: colors.text[700], fontWeight: 600, fontSize: "0.625rem", children: (_g = column === null || column === void 0 ? void 0 : column.items) === null || _g === void 0 ? void 0 : _g.length }), enableColumnCollapse && (_jsx(IconButton, { "aria-label": "Collapse column", icon: _jsx(ChevronLeft, { size: 14 }), variant: "ghost", size: "xs", minW: "1.5rem", h: "1.75rem", flexShrink: 0, onClick: () => toggleColumnCollapsed(colId) })), canDelete &&
368
369
  hoveredColumn === colId &&
369
370
  column.items.length > 0 && (_jsx(Box, { as: Trash2, size: 16, cursor: "pointer", color: colors.text[600], _hover: { color: colors.semanticText.error }, onClick: () => handleColumnDelete(colId), transition: "color 0.2s ease", flexShrink: 0 })), !(canDelete &&
370
371
  hoveredColumn === colId &&
371
372
  column.items.length > 0) && _jsx(Box, { width: "16px", height: "16px", flexShrink: 0 })] })] })), !isColCollapsed && (_jsxs(Box, { px: 2, flex: "1", overflowY: "auto", width: "100%", sx: {
373
+ ...scrollbarStyles(colors),
372
374
  overflowY: "auto",
373
375
  overflowX: "hidden",
374
- scrollbarWidth: "thin",
375
- scrollbarColor: `${colors.gray[300]} transparent`,
376
- "&::-webkit-scrollbar": {
377
- width: "6px !important",
378
- height: "6px !important",
379
- },
380
- "&::-webkit-scrollbar-track": {
381
- background: colors.gray[100],
382
- borderRadius: "base",
383
- marginTop: "4px",
384
- marginBottom: "4px",
385
- },
386
- "&::-webkit-scrollbar-thumb": {
387
- background: colors.gray[300],
388
- borderRadius: "base",
389
- border: "1px solid",
390
- borderColor: colors.gray[100],
391
- },
392
- "&::-webkit-scrollbar-thumb:hover": {
393
- background: colors.gray[400],
394
- },
395
- "&": {
396
- scrollbarGutter: "stable both-edges",
397
- },
376
+ "&": { scrollbarGutter: "stable both-edges" },
398
377
  cursor: canDrag ? "grab" : "not-allowed",
399
378
  }, children: [(noItems === null || noItems === void 0 ? void 0 : noItems.isVisible) && column.items.length === 0 && (_jsx(NoItemsTemplate, { column: column, noItems: noItems, colors: colors })), virtualization ? (_jsx(List, { ref: (el) => {
400
379
  if (el)
@@ -409,26 +388,7 @@ const KanbanBoard = ({ data, customColumns, customizeColumn, onDrag, onDelete, o
409
388
  return null;
410
389
  const showAddColumn = Boolean(customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.isVisible);
411
390
  const hasAnyColumns = Object.keys(columns).length > 0;
412
- const flexScrollSx = {
413
- "&::-webkit-scrollbar": {
414
- height: "6px",
415
- },
416
- "&::-webkit-scrollbar-track": {
417
- background: colors.gray[100],
418
- borderRadius: "base",
419
- margin: "0 4px",
420
- },
421
- "&::-webkit-scrollbar-thumb": {
422
- background: colors.gray[400],
423
- borderRadius: "base",
424
- border: `1px solid ${colors.gray[100]}`,
425
- },
426
- "&::-webkit-scrollbar-thumb:hover": {
427
- background: colors.gray[500],
428
- },
429
- scrollbarWidth: "thin",
430
- scrollbarColor: `${colors.gray[400]} ${colors.gray[100]}`,
431
- };
391
+ const flexScrollSx = scrollbarStyles(colors);
432
392
  const addColumnBox = !isBoardLoading && showAddColumn && hasAnyColumns && (_jsx(Box, { width: columnWidth, borderRadius: "lg", border: `0.125rem dashed ${colors.boxborder[500]}`, bg: colors.background[100], flexShrink: 0, height: `${containerHeight - 60}px`, display: "flex", alignItems: "center", justifyContent: "center", cursor: "pointer", _hover: { borderColor: colors.primary[500] }, onClick: () => { var _a; return (_a = customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.onAddColumn) === null || _a === void 0 ? void 0 : _a.call(customizeColumn); }, children: _jsxs(Flex, { direction: "column", align: "center", gap: 2, children: [_jsx(Box, { as: Plus, size: 20, color: colors.text[700] }), _jsx(Text, { fontSize: "sm", color: colors.text[600], children: (customizeColumn === null || customizeColumn === void 0 ? void 0 : customizeColumn.buttonText) || "Add column" })] }) }));
433
393
  const columnsList = Object.entries(columns).map(([colId, column], colIndex) => {
434
394
  const isColCollapsed = enableColumnCollapse && Boolean(collapsedColumns[colId]);
@@ -4,7 +4,7 @@ import { CheckCircle, Crown, Users } from "lucide-react";
4
4
  import Button from "../Button/Button.js";
5
5
  import UpgradeButton from "../UpgradeButton/UpgradeButton.js";
6
6
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
7
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
7
+ import { resolveGradient } from "../../Theme/tokens/builders/gradientInk.js";
8
8
  import { formatLimitUsage, resolveLimitCopy } from "./limitReachedCopy.js";
9
9
  const KIND_ICON = {
10
10
  record: Crown,
@@ -19,10 +19,9 @@ const LimitReachedModal = ({ isOpen, onClose, kind, limit = null, used = null, c
19
19
  const copy = resolveLimitCopy(kind, canManageBilling);
20
20
  const usage = formatLimitUsage(kind, used, limit);
21
21
  const KindIcon = KIND_ICON[kind];
22
- const gradient = colors.gradient;
23
- // Header banner uses the brand gradient (not a fixed blue/purple) so it reads correctly
24
- // across all 9 brand themes, with ink picked for AA against whichever stop is lighter.
25
- const ink = onGradient(gradient.from, gradient.to, colors.white, colors.black);
22
+ // Header banner uses the brand gradient so it reads correctly across all 9 brands.
23
+ const gradient = resolveGradient(colors.gradient, colors.white, colors.black);
24
+ const ink = gradient.ink;
26
25
  return (_jsxs(Modal, { isOpen: isOpen, onClose: onClose, isCentered: true, size: "lg", motionPreset: "slideInBottom", children: [_jsx(ModalOverlay, { backdropFilter: "blur(5px)" }), _jsxs(ModalContent, { borderRadius: "xl", overflow: "hidden", boxShadow: "2xl", mx: 4, children: [_jsxs(Box, { bgGradient: `linear(to-r, ${gradient.from}, ${gradient.to})`, color: ink, children: [_jsx(ModalHeader, { pb: 4, children: _jsxs(Flex, { align: "center", children: [_jsx(Icon, { as: KindIcon, boxSize: "24px", mr: "12px" }), _jsx(Text, { fontSize: "xl", fontWeight: "bold", children: title !== null && title !== void 0 ? title : copy.title })] }) }), _jsx(ModalCloseButton, { "aria-label": "Dismiss", color: ink, _hover: { opacity: 0.7 } })] }), _jsxs(ModalBody, { py: 6, children: [_jsx(Text, { textAlign: "center", fontSize: "md", fontWeight: 600, color: colors.text[700], children: message !== null && message !== void 0 ? message : copy.message }), usage && (_jsx(Text, { textAlign: "center", fontSize: "sm", color: colors.textMuted, mt: 2, children: usage })), features && features.length > 0 && (_jsx(List, { spacing: 2, mt: 5, children: features.map((feature) => (_jsxs(ListItem, { display: "flex", alignItems: "center", fontSize: "sm", color: colors.text[600], children: [_jsx(ListIcon, { as: CheckCircle, color: colors.semanticText.success }), feature] }, feature))) }))] }), _jsx(Divider, {}), _jsx(ModalFooter, { children: _jsxs(HStack, { spacing: 3, children: [_jsx(Button, { label: canManageBilling ? "Maybe later" : "Close", variant: "outline", colorScheme: "gray", size: "md", onClick: onClose }), canManageBilling && (_jsx(UpgradeButton, { label: "Upgrade plan", size: "md", onClick: () => onUpgrade === null || onUpgrade === void 0 ? void 0 : onUpgrade() }))] }) })] })] }));
27
26
  };
28
27
  export default LimitReachedModal;
@@ -55,7 +55,7 @@ export default function MultiSelect({ value, onValueChange, width = "100%", labe
55
55
  // surface up to `muted` (lightest); [500] fails there, [800] clears all with margin.
56
56
  borderColor: error || localError
57
57
  ? theme.colors.semanticText.error
58
- : theme.colors.boxborder[800], borderRadius: "lg", bg: theme.colors.gray[50], minH: s.minH, transition: "border-color 0.2s, box-shadow 0.2s", _focusWithin: {
58
+ : theme.colors.boxborder[500], borderRadius: "lg", bg: theme.colors.gray[50], minH: s.minH, transition: "border-color 0.2s, box-shadow 0.2s", _focusWithin: {
59
59
  borderColor: error || localError
60
60
  ? theme.colors.semanticText.error
61
61
  : theme.colors.primary[500],
@@ -45,17 +45,17 @@ export default function NavBar({ userAvathar, userName, userRole, navMenu, moreI
45
45
  _focus: { bg: menuHoverBg, color: menuHoverInk },
46
46
  _active: { bg: menuHoverBg, color: menuHoverInk },
47
47
  };
48
- return (_jsx(Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.border[500], children: _jsxs(Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [_jsxs(Box, { display: "flex", gap: 1.5, alignItems: "center", children: [_jsx(Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? (_jsx(PanelLeftClose, { size: "1.25rem" })) : (_jsx(PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (_jsx(Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: _jsx(CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && (_jsx(Text, { color: accentTextOnCanvas(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }))] }), _jsx(Flex, { minW: 0, flexShrink: 1, children: _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && (_jsx(Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), _jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: _jsx(Avatar, { size: "sm", name: userName, src: userAvathar }) }), _jsx(MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
48
+ return (_jsx(Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: _jsxs(Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [_jsxs(Box, { display: "flex", gap: 1.5, alignItems: "center", children: [_jsx(Box, { as: "button", type: "button", onClick: () => onSideBarToggole === null || onSideBarToggole === void 0 ? void 0 : onSideBarToggole(), onMouseEnter: onSideBarPeek, onFocus: onSideBarPeek, "aria-label": sideBarToggole ? "Close navigation menu" : "Open navigation menu", "aria-expanded": !!sideBarToggole, ...iconButtonStyle, display: forceSideBarToggle ? "flex" : { base: "flex", lg: "none" }, w: SIDEBAR_TOGGLE_HIT, h: SIDEBAR_TOGGLE_HIT, children: sideBarToggole ? (_jsx(PanelLeftClose, { size: "1.25rem" })) : (_jsx(PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && (_jsx(Box, { ...iconButtonStyle, as: "button", type: "button", "aria-label": "Go back", display: "flex", onClick: () => { var _a; return (_a = navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) === null || _a === void 0 ? void 0 : _a.call(navigationBarText); }, children: _jsx(CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && (_jsx(Text, { color: accentTextOnCanvas(theme.colors.secondary, theme.colors.backgroundColor.light), fontSize: "1.25rem", fontWeight: 600, fontFamily: "open-sans, sans-serif", letterSpacing: "-0.013rem", children: navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text }))] }), _jsx(Flex, { minW: 0, flexShrink: 1, children: _jsxs(Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && (_jsx(Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), _jsxs(Menu, { children: [_jsx(MenuButton, { as: Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: _jsx(Avatar, { size: "sm", name: userName, src: userAvathar }) }), _jsx(MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
49
49
  // Without a cap one long title stretches the whole dropdown; titles truncate instead.
50
50
  maxW: "18rem", bg: theme.colors.backgroundColor.light,
51
51
  // Chakra's MenuItem renders `background: var(--menu-bg)` at rest; its MenuList
52
52
  // baseStyle hardcodes that var to "#fff" (gated behind `_dark`, which this theme-swap
53
53
  // app never triggers). The `bg` prop above only recolors the list itself, not the
54
54
  // inherited var, so items fall back to white until hover/focus — set the var too.
55
- sx: { "--menu-bg": theme.colors.backgroundColor.light }, border: "1px solid", borderColor: theme.colors.boxborder[500], borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Center, { pt: 4, pb: 2, children: _jsx(Avatar, { size: "xl", name: userName, src: userAvathar }) }), _jsxs(Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [_jsx(Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && (_jsx(Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), _jsx(MenuDivider, { borderColor: theme.colors.border[500] }), _jsx(Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
55
+ sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: _jsxs(Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [_jsx(Center, { pt: 4, pb: 2, children: _jsx(Avatar, { size: "xl", name: userName, src: userAvathar }) }), _jsxs(Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [_jsx(Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && (_jsx(Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), _jsx(MenuDivider, { borderColor: theme.colors.boxborder[200] }), _jsx(Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
56
56
  var _a, _b, _c, _d;
57
57
  return (_jsxs(MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && (_jsx(Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), _jsx(Box, { minW: 0, isTruncated: true, title: String((_a = menu.title) !== null && _a !== void 0 ? _a : ""), children: menu.title })] }, `${String((_d = (_c = (_b = menu.id) !== null && _b !== void 0 ? _b : menu.url) !== null && _c !== void 0 ? _c : menu.title) !== null && _d !== void 0 ? _d : idx)}-${idx}`));
58
- }) }), _jsx(MenuDivider, { borderColor: theme.colors.border[500] }), _jsxs(MenuItem, { onClick: handleLogout, sx: {
58
+ }) }), _jsx(MenuDivider, { borderColor: theme.colors.boxborder[200] }), _jsxs(MenuItem, { onClick: handleLogout, sx: {
59
59
  ...menuItemStyle,
60
60
  color: theme.colors.semanticText.error,
61
61
  _hover: { bg: dangerTone.bg, color: dangerTone.fg },
@@ -3,6 +3,7 @@ import { useEffect, useRef, useState } from "react";
3
3
  import { Box, Flex, Text, Input, Textarea, Button, Divider, Spinner, Tooltip, } from "@chakra-ui/react";
4
4
  import { Paperclip, X, SquarePen, File as FileIcon } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
6
7
  import { FIELD_RADIUS } from "../Common/fieldStyles.js";
7
8
  const countWords = (text = "") => {
8
9
  const t = text.trim();
@@ -119,9 +120,10 @@ export default function NoteTextArea({ width = "100%", handleSubmit, handleCance
119
120
  setTitleShow(false);
120
121
  setTitleValue(e.target.value);
121
122
  }, placeholder: "Add a title...", variant: "unstyled", px: 3, pt: 2.5, pb: 1.5, fontWeight: 600, fontSize: "0.875rem", color: theme.colors.text[700], _placeholder: {
122
- fontStyle: "italic",
123
- color: theme.colors.textMuted,
124
- } }), _jsx(Divider, { borderColor: theme.colors.gray[200] })] })), _jsx(Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: _jsx(Textarea, { ref: noteAreaRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: { fontStyle: "italic", color: theme.colors.textMuted }, style: { overflow: "hidden" }, p: 0 }) })] }), _jsx(Divider, { borderColor: theme.colors.gray[200] }), _jsxs(Box, { px: 3, py: 2.5, children: [_jsxs(Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: _jsx(Box, { as: "label", htmlFor: "file-upload", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: _jsx(Paperclip, { size: 16 }) }) }), _jsx(Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? (_jsx(Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: "+ Add a title" })) : (_jsx(Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), _jsxs(Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [_jsxs(Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : (_jsx(Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), _jsxs(Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? (_jsx(Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), _jsx("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
123
+ color: placeholderInk(theme.colors),
124
+ } }), _jsx(Divider, { borderColor: theme.colors.gray[200] })] })), _jsx(Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: _jsx(Textarea, { ref: noteAreaRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: {
125
+ color: placeholderInk(theme.colors),
126
+ }, style: { overflow: "hidden" }, p: 0 }) })] }), _jsx(Divider, { borderColor: theme.colors.gray[200] }), _jsxs(Box, { px: 3, py: 2.5, children: [_jsxs(Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [_jsxs(Flex, { align: "center", gap: 2, minW: 0, children: [_jsx(Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: _jsx(Box, { as: "label", htmlFor: "file-upload", cursor: "pointer", display: "flex", alignItems: "center", justifyContent: "center", w: "1.75rem", h: "1.75rem", borderRadius: "md", color: theme.colors.textMuted, transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: _jsx(Paperclip, { size: 16 }) }) }), _jsx(Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? (_jsx(Box, { as: "button", type: "button", onClick: () => setTitleShow(true), px: 2, py: 1, borderRadius: "md", color: theme.colors.textMuted, fontWeight: 500, fontSize: "sm", transition: "background 0.15s", _hover: { bg: theme.colors.gray[100] }, children: "+ Add a title" })) : (_jsx(Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: _jsx(Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), _jsxs(Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [_jsxs(Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : (_jsx(Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), _jsxs(Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? (_jsx(Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), _jsx("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
125
127
  const newFiles = Array.from(e.target.files || []);
126
128
  const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
127
129
  const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
@@ -1,5 +1,6 @@
1
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
1
2
  export const NumberInput = {
2
- baseStyle: {
3
+ baseStyle: ({ theme }) => ({
3
4
  field: {
4
5
  fontWeight: 500,
5
6
  fontSize: "0.875rem",
@@ -9,10 +10,10 @@ export const NumberInput = {
9
10
  borderRadius: "lg",
10
11
  transition: "border-color 0.2s, box-shadow 0.2s",
11
12
  _placeholder: {
12
- fontStyle: "italic",
13
+ color: placeholderInk(theme.colors),
13
14
  },
14
15
  },
15
- },
16
+ }),
16
17
  sizes: {
17
18
  md: {
18
19
  field: {
@@ -35,7 +36,7 @@ export const NumberInput = {
35
36
  border: "0.063rem solid",
36
37
  borderColor,
37
38
  _placeholder: {
38
- color: theme.colors.textMuted,
39
+ color: placeholderInk(theme.colors),
39
40
  },
40
41
  _hover: {
41
42
  borderColor: primary,
@@ -63,11 +63,11 @@ const OrgSwitcher = ({ organizations, value, onChange, isLoading = false, isSear
63
63
  focusOption(filtered.length - 1);
64
64
  }
65
65
  }, [activeIndex, filtered.length, focusOption]);
66
- // boxborder[800], not raw gray[200]: this styles a real `<button>` (Flex as="button" below),
66
+ // boxborder[500], not raw gray[200]: this styles a real `<button>` (Flex as="button" below),
67
67
  // so its border is a control boundary — WCAG 1.4.11 needs >=3.0 against any named surface up
68
68
  // to `muted` (lightest); gray[200] fails there in dark mode.
69
69
  const triggerStyles = triggerVariant === "outline"
70
- ? { border: "1px solid", borderColor: theme.colors.boxborder[800], bg: theme.colors.background[50] }
70
+ ? { border: "1px solid", borderColor: theme.colors.boxborder[500], bg: theme.colors.background[50] }
71
71
  : triggerVariant === "subtle"
72
72
  ? { bg: theme.colors.gray[50] }
73
73
  : { bg: "transparent" };
@@ -8,7 +8,7 @@ export default function PinInputs({ otp, mask, defaultValue, placeholder, manage
8
8
  // [800], not [300]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
9
9
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
10
10
  // [800] clears all named surfaces with margin (3.44-3.90).
11
- borderColor: theme.colors.boxborder[800], _focus: {
11
+ borderColor: theme.colors.boxborder[500], _focus: {
12
12
  borderColor: theme.colors.primary[500],
13
13
  boxShadow: `0 0 0 0.063rem ${theme.colors.primary[500]}`,
14
14
  } }, index))) }) })] }));
@@ -2,8 +2,8 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { Box, Flex, Text } from "@chakra-ui/react";
3
3
  import { AlertCircle, Clock, Sparkles } from "lucide-react";
4
4
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
5
- import { onGradient } from "../../Theme/tokens/builders/accentText.js";
6
- import { chipBorder, chipFill, inkSafeGradient, statusGradient, } from "./planPillGradient.js";
5
+ import { resolveGradient, gradientCss } from "../../Theme/tokens/builders/gradientInk.js";
6
+ import { chipBorder, chipFill, statusGradient, } from "./planPillGradient.js";
7
7
  const TONE_ICON = {
8
8
  normal: Sparkles,
9
9
  warning: Clock,
@@ -13,15 +13,15 @@ const PlanPill = ({ label, mobileLabel, status, tone = "normal", icon, gradient,
13
13
  const theme = useCustomTheme();
14
14
  const c = theme.colors;
15
15
  const toneGradient = {
16
- normal: inkSafeGradient(c.gradient),
16
+ normal: c.gradient,
17
17
  warning: statusGradient(c.semantic.warning),
18
18
  danger: statusGradient(c.semantic.error),
19
19
  };
20
- const resolved = inkSafeGradient(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone]);
21
- const ink = onGradient(resolved.from, resolved.to, c.white, c.black);
20
+ const resolved = resolveGradient(gradient !== null && gradient !== void 0 ? gradient : toneGradient[tone], c.white, c.black);
21
+ const ink = resolved.ink;
22
22
  const Icon = icon === undefined ? TONE_ICON[tone] : icon;
23
23
  const hasMobile = !!mobileLabel && mobileLabel !== label;
24
- return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: `linear-gradient(135deg, ${resolved.from} 0%, ${resolved.to} 100%)`, color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
24
+ return (_jsxs(Box, { as: "button", type: "button", "aria-label": ariaLabel || (status ? `${label} — ${status}` : label), onClick: onClick, display: "inline-flex", alignItems: "center", gap: "7px", pl: "12px", pr: status ? "5px" : "12px", py: "3px", bgImage: gradientCss(resolved), color: ink, borderRadius: "full", whiteSpace: "nowrap", cursor: "pointer", transition: "transform 0.2s ease, box-shadow 0.2s ease", _hover: {
25
25
  transform: "translateY(-1px)",
26
26
  boxShadow: `0 6px 18px ${resolved.from}59`,
27
27
  }, _focusVisible: {
@@ -2,22 +2,10 @@ import { resolveAvatarFill } from "../../Theme/tokens/builders/statusTone.js";
2
2
  import { relativeLuminance } from "../../Theme/tokens/builders/color.js";
3
3
  export const STATUS_INK = "#ffffff";
4
4
  /**
5
- * The plan badge's `normal` tone is a single fixed accent not brand-driven, and
6
- * not mode-dependent.
7
- *
8
- * Its tone carries meaning (normal / warning / danger), and a brand gradient can
9
- * collide with that: rosewood's `#c74962 → #ea0727` is red, so a healthy plan
10
- * rendered as if it had expired. Greyscale brands failed the other way, sinking
11
- * the badge into the header chrome.
12
- *
13
- * One accent for both color modes is deliberate: a lighter dark-mode variant was
14
- * tried and flipped `onGradient`'s ink to black, which read as a washed-out candy
15
- * pill on dark chrome. These stops keep white ink in both modes, so the badge looks
16
- * like the same component everywhere. Verified at AA (>= 4.5:1) on both stops.
17
- *
18
- * Consumers who genuinely want another colour still pass `gradient`.
5
+ * Opt-in accent for consumers who want a fixed badge colour instead of the brand `gradient`.
6
+ * One hue, like every brand gradient — a second hue reads as a status change, not a style.
19
7
  */
20
- export const ACCENT_GRADIENT = { from: "#8B3FC8", to: "#df187a" };
8
+ export const ACCENT_GRADIENT = { from: "#8b3fc8", to: "#762d9d" };
21
9
  /**
22
10
  * Sinks both stops until WHITE ink clears AA, keeping each stop's hue. Any mid-tone gradient —
23
11
  * a brand `gradient` token, a status scale — otherwise flips `onGradient` to black ink, so the
@@ -104,7 +104,7 @@ const ProductPrice = ({ options, size, onSelect, rightSlot }) => {
104
104
  }, templateColumns: { base: '1fr auto', md: '1fr auto' },
105
105
  // columnGap={{ base: 2, md: 3 }}
106
106
  // rowGap={{ base: 1.5, md: 2 }}
107
- alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: theme.colors.green[100], color: accentTextOnCanvas(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[800], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
107
+ alignItems: "center", children: [_jsx(HStack, { gridColumn: 1, gridRow: 1, spacing: 2, align: "center", minW: 0, mb: 0, children: _jsx(Box, { flex: "1", minW: 0, children: _jsx(OverflowTooltipText, { placement: "top", maxWidth: "100%", fontSize: { base: "xs", md: "sm" }, fontWeight: "medium", whiteSpace: "nowrap", children: option.label }) }) }), _jsx(Box, { gridColumn: 1, gridRow: 2, mt: 0, textAlign: "left", children: _jsxs(HStack, { spacing: 2, align: "center", children: [option.offer > 0 && (_jsx(Badge, { bg: theme.colors.green[100], color: accentTextOnCanvas(theme.colors.green, theme.colors.green[100]), borderRadius: "md", px: { base: 0, md: 0.5 }, py: { base: 0, md: 0.25 }, fontWeight: "bold", fontSize: "10px", flexShrink: 0, children: isMobile ? `${option.offer}%` : `${option.offer}% OFF` })), _jsxs(Text, { fontSize: "sm", fontWeight: "bold", color: accentTextOnCanvas(theme.colors.red, isSelected ? theme.colors.red[50] : theme.colors.background[50]), whiteSpace: "nowrap", children: ["\u20B9", discounted] }), option.offer > 0 && (_jsxs(Text, { fontSize: "xs", color: theme.colors.textMuted, textDecoration: "line-through", whiteSpace: "nowrap", children: ["\u20B9", option.price] }))] }) }), _jsx(Box, { gridColumn: 2, gridRow: 1, ml: { base: 0, md: 0 }, justifySelf: "end", w: { base: "0.625rem", md: "0.75rem" }, h: { base: "0.625rem", md: "0.75rem" }, minW: { base: "0.625rem", md: "0.75rem" }, borderRadius: "full", border: "0.125rem solid", borderColor: isSelected ? theme.colors.red[500] : theme.colors.boxborder[500], bg: theme.colors.background[50], display: "flex", alignItems: "center", justifyContent: "center", boxShadow: "none", children: isSelected && (_jsx(Box, { w: { base: "0.25rem", md: "0.3125rem" }, h: { base: "0.25rem", md: "0.3125rem" }, bg: theme.colors.red[500], borderRadius: "full" })) })] }, option.var_id));
108
108
  }) }) })), _jsxs(Flex, { mt: 2, w: "full", gap: 3, direction: { base: "column", md: "row" }, align: { base: "flex-start", md: "center" }, justify: { base: "flex-start", md: rightSlot ? "space-between" : "flex-start" }, children: [_jsxs(Box, { display: "flex", alignItems: "center", fontSize: cfg.price, gap: 2, minW: 0, children: [selected.offer > 0 && (_jsxs(Text, { color: theme.colors.textMuted, textDecoration: "line-through", children: ["\u20B9", selected.price] })), _jsxs(Text, { color: accentTextOnCanvas(theme.colors.red, theme.colors.backgroundColor.main), fontWeight: "semibold", children: ["\u20B9", getDiscountedPrice(selected)] })] }), rightSlot && (_jsx(Box, { flexShrink: 0, mt: { base: 2, md: 0 }, children: rightSlot }))] })] }));
109
109
  };
110
110
  export default ProductPrice;
@@ -13,7 +13,7 @@ export const ProfileCardFooter = ({ children, }) => {
13
13
  };
14
14
  export default function ProfileCard({ maxW, align, variant, direction, justify, children, size, color, overflow, dividercolor, dividersize = "0.5px", dividervariant = "solid", CardStyle, CardHeaderStyle, CardBodyStyle, borderTopColor, borderLeftColor, }) {
15
15
  const { colors } = useCustomTheme();
16
- const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.border[400];
16
+ const resolvedDividerColor = dividercolor !== null && dividercolor !== void 0 ? dividercolor : colors.boxborder[200];
17
17
  const accentBorder = `2px solid ${colors.primary[500]}`;
18
18
  const isReactElement = (child) => {
19
19
  return child !== null && typeof child === "object" && "type" in child;
@@ -35,7 +35,7 @@ export default function ProfilePhotoViewer({ photoUrl, onPhotoChange, imageWidth
35
35
  // [800], not [300]: the edit IconButton's border is a control boundary — WCAG 1.4.11 needs
36
36
  // >=3.0 against any named surface up to `muted` (lightest); [300] fails there, [800] clears
37
37
  // all with margin.
38
- const border = c.boxborder[800];
38
+ const border = c.boxborder[500];
39
39
  // Shared modern frame for whichever media we render (photo / pdf / fallback).
40
40
  const mediaFrame = {
41
41
  boxSize: imageWidth,
@@ -4,7 +4,7 @@ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
4
  import { TextLabel } from "../Common/FormLabel.js";
5
5
  const RadioButton = ({ label, colorScheme, isChecked, onChange, isDisabled, size, value, defaultChecked, labelFontSize = "0.75rem", labelClampLines = 2, showLabelTooltip = (label || "").length > 18, labelTooltip = label, }) => {
6
6
  const theme = useCustomTheme();
7
- return (_jsx(ChakraRadio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.gray[500], borderWidth: "1.6px", _hover: {
7
+ return (_jsx(ChakraRadio, { colorScheme: colorScheme, isChecked: isChecked, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], borderWidth: "1.6px", _hover: {
8
8
  borderColor: theme.colors.primary[500],
9
9
  backgroundColor: theme.colors.background[100],
10
10
  }, sx: {
@@ -15,7 +15,7 @@ const ReorderList = ({ label = "", items, onReorder, showRemoveIcon = false, onR
15
15
  };
16
16
  return (_jsxs(Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [_jsxs(Box, { display: "flex", alignItems: "center", gap: 2, children: [_jsx(BetweenHorizonalStart, {}), _jsx(Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: label })] }), _jsx(Divider, {}), _jsx("br", {}), _jsx(DragDropContext, { onDragEnd: handleDragEnd, children: _jsx(Droppable, { droppableId: "item-list", direction: "horizontal", children: (provided) => (_jsxs(HStack, { ref: provided.innerRef, ...provided.droppableProps, spacing: 4, overflowX: "auto", children: [items.map((item, index) => (_jsx(Draggable, { draggableId: item.id, index: index, children: (provided) => {
17
17
  var _a;
18
- return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[300], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
18
+ return (_jsxs(Box, { ref: provided.innerRef, ...provided.draggableProps, ...provided.dragHandleProps, position: "relative", border: "0.063rem solid", borderColor: colors.boxborder[200], borderRadius: "md", overflow: "hidden", children: [_jsx(Image, { src: item.previewUrl, alt: (_a = item.name) !== null && _a !== void 0 ? _a : `item-${index}`, boxSize: "7.5rem", objectFit: "cover" }), _jsx(IconButton, { icon: _jsx(GripVertical, { size: 16, color: colors.textMuted }), "aria-label": "Drag", size: "sm", position: "absolute", top: 1, left: 1, variant: "ghost" }), _jsx(Badge, { position: "absolute", colorScheme: "gray", variant: "solid", bottom: 1, right: 1, children: index + 1 }), showRemoveIcon && (_jsx(IconButton, { icon: _jsx(X, { size: 16, color: colors.semanticText.error }), "aria-label": "Remove", size: "sm", position: "absolute", top: 1, right: 1, variant: "ghost", onClick: () => onRemove === null || onRemove === void 0 ? void 0 : onRemove(item.id) }))] }));
19
19
  } }, item.id))), provided.placeholder] })) }) })] }));
20
20
  };
21
21
  export default ReorderList;
@@ -0,0 +1,9 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Box } from "@chakra-ui/react";
3
+ import { useCustomTheme } from "../../Theme/useCustomTheme.js";
4
+ import { scrollbarStyles, } from "../../Theme/tokens/builders/scrollbar.js";
5
+ const ScrollbarBox = ({ children, height, maxHeight, overflowX, overflowY = "auto", variant = "default", scrollContainerRef, }) => {
6
+ const { colors } = useCustomTheme();
7
+ return (_jsx(Box, { ref: scrollContainerRef, height: height, maxHeight: maxHeight, position: "relative", sx: { overflowX, overflowY, ...scrollbarStyles(colors, variant) }, children: children }));
8
+ };
9
+ export default ScrollbarBox;
@@ -5,6 +5,7 @@ import { Check, ChevronDown, ChevronUp, CircleX, Plus, X } from "lucide-react";
5
5
  import { TextLabel } from "../Common/FormLabel.js";
6
6
  import Tag from "../Tag/Tag.js";
7
7
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
8
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
8
9
  import ErrorMessage from "../Common/ErrorMessage.js";
9
10
  import HelperText from "../Common/HelperText.js";
10
11
  import ToolTip from "../ToolTip/ToolTip.js";
@@ -449,7 +450,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
449
450
  var _a, _b, _c, _d, _e;
450
451
  const insideLabel = (_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.label;
451
452
  const insidePlaceholder = (_b = insideSelect.placeholder) !== null && _b !== void 0 ? _b : "Select";
452
- return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[300], bg: customSelectOpen
453
+ return (_jsxs(Box, { position: "relative", ref: customSelectRef, flexShrink: 0, ml: s.insideSelectMarginLeft, h: "-webkit-fill-available", borderRight: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: customSelectOpen
453
454
  ? theme.colors.primary.opacity[8]
454
455
  : theme.colors.background[400], borderLeftRadius: "md", borderRightRadius: 0, transition: "background 0.15s ease, box-shadow 0.15s ease", boxShadow: customSelectOpen
455
456
  ? `inset 0 0 0 0.063rem ${theme.colors.primary[500]}`
@@ -457,7 +458,7 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
457
458
  e.stopPropagation();
458
459
  setIsOpen(false);
459
460
  setCustomSelectOpen((prev) => !prev);
460
- }, children: [_jsxs(Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? (_jsx(SelectTruncatedLabel, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : (_jsx(Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: theme.colors.placeholder[500], isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? theme.colors.accentText : theme.colors.textMuted, transition: "transform 0.2s ease, color 0.15s ease", transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: _jsx(ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && (_jsx(Portal, { children: _jsx(Box, { ref: setInsideSelectMenuRef, id: "custom-select-portal", position: "fixed", top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px`, zIndex: 1510, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: (_d = (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.md) !== null && _d !== void 0 ? _d : "md", minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_e = insideSelect.option) === null || _e === void 0 ? void 0 : _e.map((item) => {
461
+ }, children: [_jsxs(Box, { minW: "4.5rem", cursor: "pointer", display: "flex", justifyContent: "space-between", alignItems: "center", gap: 1, width: insideSelect.width, height: insideSelectBoxHeight, pl: "0.5rem", pr: "0.375rem", children: [insideLabel ? (_jsx(SelectTruncatedLabel, { label: insideLabel, maxWidth: insideSelect.width || "6rem", fontSize: s.fieldFontSize })) : (_jsx(Text, { fontSize: s.fieldFontSize, fontWeight: 500, color: placeholderInk(theme.colors), isTruncated: true, maxW: insideSelect.width || "6rem", children: insidePlaceholder })), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, color: customSelectOpen ? theme.colors.accentText : theme.colors.textMuted, transition: "transform 0.2s ease, color 0.15s ease", transform: customSelectOpen ? "rotate(180deg)" : "rotate(0deg)", children: _jsx(ChevronDown, { size: s.chevronSize }) })] }), customSelectOpen && (_jsx(Portal, { children: _jsx(Box, { ref: setInsideSelectMenuRef, id: "custom-select-portal", position: "fixed", top: `${customSelectPos.top}px`, left: `${customSelectPos.left}px`, zIndex: 1510, bg: theme.colors.background[50], border: "0.063rem solid", borderColor: theme.colors.boxborder[200], borderRadius: "lg", boxShadow: (_d = (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.md) !== null && _d !== void 0 ? _d : "md", minW: `${customSelectPos.width}px`, maxW: "20rem", py: 1, overflow: "hidden", children: (_e = insideSelect.option) === null || _e === void 0 ? void 0 : _e.map((item) => {
461
462
  var _a;
462
463
  const selected = ((_a = insideSelect.value) === null || _a === void 0 ? void 0 : _a.id) === item.id;
463
464
  return (_jsxs(Box, { display: "flex", alignItems: "center", justifyContent: "space-between", gap: 2, minH: s.optionRowMinH, py: s.optionRowPy, px: "0.75rem", fontSize: s.dropdownTextFontSize, fontWeight: selected ? 600 : 500, color: selected
@@ -506,10 +507,10 @@ const SearchSelect = ({ id, label, options, onSelect, onSearch, isOptionLoading
506
507
  setCustomSelectOpen(false);
507
508
  return !prev;
508
509
  });
509
- }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
510
+ }, "aria-label": "toggle-dropdown", display: "flex", alignItems: "center", children: isOpen ? (_jsx(ChevronUp, { size: s.chevronSize })) : (_jsx(ChevronDown, { size: s.chevronSize })) }))] })] }) }), isOpen && (_jsx(Portal, { children: _jsxs(Box, { ref: setDropdownMenuRef, id: listboxId, role: "listbox", "aria-multiselectable": isMultiple || undefined, position: "fixed", top: `${dropdownPos.top}px`, left: `${dropdownPos.left}px`, width: `${dropdownPos.width}px`, zIndex: 1500, maxH: "20rem", borderWidth: 1, borderColor: theme.colors.boxborder[200], borderRadius: "sm", bg: theme.colors.background[50], boxShadow: "md", display: "flex", flexDirection: "column", children: [isMultiple && isSelectAll && (_jsxs(Box, { py: s.optionRowPy, px: 3, cursor: "pointer", onClick: handleSelectAll, display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [_jsx(Checkbox, { isChecked: allFilteredSelected, sx: { pointerEvents: "none" }, size: s.checkboxSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: allFilteredSelected ? "Unselect All" : "Select All" })] })), _jsx(Box, { flex: "1", overflowY: "auto", onScroll: handleScroll, maxH: "15rem", borderBottom: "0.063rem solid", borderColor: theme.colors.boxborder[200], children: isOptionLoading && filteredOptions.length === 0 ? (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] })) : !isOptionLoading && filteredOptions.length === 0 ? (_jsx(Text, { p: 3, fontSize: s.dropdownTextFontSize, color: theme.colors.textMuted, children: "No results found" })) : (_jsxs(_Fragment, { children: [filteredOptions.map((option, index) => (_jsxs(Box, { id: getOptionId(index), role: "option", "aria-selected": isSelected(option.id), py: s.optionRowPy, px: 3, minH: s.optionRowMinH, cursor: "pointer", bg: index === activeIndex
510
511
  ? theme.colors.primary.opacity[8]
511
512
  : isSelected(option.id)
512
513
  ? theme.colors.gray[100]
513
- : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
514
+ : "transparent", _hover: { bg: theme.colors.gray[50] }, onClick: () => handleSelect(option), onMouseEnter: () => setActiveIndex(index), display: "flex", alignItems: "center", gap: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: [isMultiple && (_jsx(Checkbox, { isChecked: isSelected(option.id), sx: { pointerEvents: "none" }, size: s.checkboxSize })), option.view ? (_jsx(_Fragment, { children: option.view })) : (_jsx(Text, { fontSize: s.dropdownTextFontSize, children: option.label }))] }, option.id))), ((pagination === null || pagination === void 0 ? void 0 : pagination.scrollLoading) || (isOptionLoading && filteredOptions.length > 0)) && (_jsxs(Box, { py: s.optionRowPy, px: 3, display: "flex", alignItems: "center", justifyContent: "center", gap: 2, minH: s.optionRowMinH, children: [_jsx(Spinner, { size: s.spinnerSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: loadingText })] }))] })) }), (addNew === null || addNew === void 0 ? void 0 : addNew.enabled) && (_jsxs(Box, { py: s.optionRowPy, px: 3, borderTop: "0.063rem solid", borderColor: theme.colors.boxborder[200], bg: theme.colors.background[50], display: "flex", alignItems: "center", gap: 2, minH: s.optionRowMinH, cursor: "pointer", onClick: addNew.onClick, _hover: { bg: theme.colors.gray[50] }, children: [addNew.icon || _jsx(Plus, { size: s.addNewIconSize }), _jsx(Text, { fontSize: s.dropdownTextFontSize, children: addNew.text || "Add New" })] }))] }) })), helperText && !error && _jsx(HelperText, { helperText: helperText }), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }));
514
515
  };
515
516
  export default SearchSelect;
@@ -1,3 +1,4 @@
1
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
1
2
  export const Select = {
2
3
  baseStyle: ({ theme }) => ({
3
4
  field: {
@@ -16,7 +17,7 @@ export const Select = {
16
17
  width: "100%", // full container width
17
18
  maxWidth: "100%",
18
19
  _placeholder: {
19
- fontStyle: "italic",
20
+ color: placeholderInk(theme.colors),
20
21
  whiteSpace: "nowrap",
21
22
  overflow: "hidden",
22
23
  textOverflow: "ellipsis",
@@ -60,7 +61,7 @@ export const Select = {
60
61
  // [800], not [500]/[700]: WCAG 1.4.11 needs >=3.0 for a control boundary, measured
61
62
  // against the parent surface — up to `muted` (lightest). [700] fails there (2.41-2.72);
62
63
  // [800] clears all named surfaces with margin (3.44-3.90).
63
- const borderColor = theme.colors.boxborder[800];
64
+ const borderColor = theme.colors.boxborder[500];
64
65
  const shadowPrimary = theme.colors.boxShadow.primary;
65
66
  const shadowError = theme.colors.boxShadow.error;
66
67
  const primary = theme.colors.primary[500];
@@ -30,7 +30,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
30
30
  const errorBorder = `2px solid ${theme.colors.semanticText.error}`;
31
31
  // [800], not [500]: WCAG 1.4.11 needs >=3.0 for a control boundary against any named surface
32
32
  // up to `muted` (lightest); [500] fails there, [800] clears all with margin.
33
- const defaultBorderThin = `1px solid ${theme.colors.boxborder[800]}`;
33
+ const defaultBorderThin = `1px solid ${theme.colors.boxborder[500]}`;
34
34
  const [selectedOptions, setSelectedOptions] = useState(initialSelectedOption ? [initialSelectedOption] : []);
35
35
  const [inputValue, setInputValue] = useState(searchQuery);
36
36
  const [isOpen, setIsOpen] = useState(false);
@@ -246,7 +246,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
246
246
  return;
247
247
  }
248
248
  setIsOpen(true);
249
- }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[800], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
249
+ }, onChange: (e) => handleInputChange(e.target.value), placeholder: placeholder, onKeyDown: handleKeyDown, id: id, name: name, role: "combobox", "aria-autocomplete": "list", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, cursor: "pointer", borderColor: theme.colors.boxborder[500], transition: "border-color 0.2s, box-shadow 0.2s", _hover: {
250
250
  borderColor: error
251
251
  ? theme.colors.semanticText.error
252
252
  : theme.colors.primary[500],
@@ -264,7 +264,7 @@ BottomIcon = false, BottomText, handleBottomClick, BottomTextColor, isColorOptio
264
264
  fontSize: 15,
265
265
  letterSpacing: 0.7,
266
266
  border: error ? errorBorder : defaultBorderThin,
267
- } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[300], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[300], zIndex: 1, borderTop: `1px solid ${theme.colors.border[500]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
267
+ } }), rightIcon && (_jsx(InputRightElement, { pointerEvents: "none", children: rightIcon, style: { ...rightElementStyle } }))] }), isOpen && (_jsxs(Box, { ref: dropdownRef, marginTop: "5px", position: "absolute", top: position === "below" ? "100%" : "auto", bottom: position === "above" ? "100%" : "auto", left: 0, right: 0, border: "1px solid", borderColor: theme.colors.boxborder[200], borderRadius: "md", bg: theme.colors.background[50], maxHeight: "150px", overflowY: "auto", zIndex: 10, children: [_jsx(Box, { id: listboxId, role: "listbox", "aria-label": label !== null && label !== void 0 ? label : placeholder, onKeyDown: handleListKeyDown, children: _jsx(RenderOptions, { isOptionLoading: isOptionLoading, filteredOptions: filteredOptions, loadingText: loadingText, handleOptionClick: handleOptionClick, isProfile: isProfile, isColorOptions: isColorOptions, isOptionSelected: isOptionSelected, activeIndex: activeIndex, optionRefs: optionRefs }) }), _jsx("hr", {}), isBottomIcon && (_jsxs(Box, { position: "sticky", bottom: 0, background: theme.colors.background[50], display: "flex", alignItems: "center", pl: "1rem", cursor: "pointer", onClick: handleBottomClick, borderColor: theme.colors.boxborder[200], zIndex: 1, borderTop: `1px solid ${theme.colors.boxborder[200]}`, children: [_jsx(Box, { children: BottomIcon ? BottomIcon : _jsx(PlusIcon, { size: "1rem" }) }), _jsx(Box, { fontSize: "0.875rem", color: BottomTextColor
268
268
  ? BottomTextColor
269
269
  : theme.colors.accentText, padding: "8px 8px", children: BottomText || "Add New" })] }))] })), error && _jsx(ErrorMessage, { errorMessage: errorMessage })] }) }) }));
270
270
  }
@@ -3,6 +3,8 @@ import React, { useCallback, useEffect, useId, useMemo, useRef, useState } from
3
3
  import { Box, Checkbox, FormControl, Input, Popover, PopoverAnchor, PopoverContent, Portal, useDisclosure, } from "@chakra-ui/react";
4
4
  import { ChevronDown } from "lucide-react";
5
5
  import { useCustomTheme } from "../../Theme/useCustomTheme.js";
6
+ import { placeholderInk } from "../../Theme/tokens/builders/placeholderInk.js";
7
+ import { scrollbarStyles } from "../../Theme/tokens/builders/scrollbar.js";
6
8
  import { getFieldStateStyles } from "../Common/fieldStyles.js";
7
9
  import { TextLabel } from "../Common/FormLabel.js";
8
10
  import ErrorMessage from "../Common/ErrorMessage.js";
@@ -22,7 +24,7 @@ const OptionRow = React.memo(function OptionRow({ option, index, listboxId, isSe
22
24
  : theme.colors.text[700], bg: isActive ? theme.colors.primary.opacity[8] : "transparent", transition: "background 0.12s ease, color 0.12s ease", children: [isMulti ? (_jsx(Checkbox, { isChecked: isSelected, isDisabled: option.isDisabled, pointerEvents: "none", tabIndex: -1 })) : null, renderOption ? (_jsx(Box, { flex: 1, minW: 0, children: renderOption(option, { isSelected, isActive }) })) : (_jsxs(_Fragment, { children: [option.icon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: option.icon })) : null, _jsxs(Box, { flex: 1, minW: 0, isTruncated: true, children: [_jsx(Box, { as: "span", isTruncated: true, children: option.label }), option.description ? (_jsx(Box, { as: "span", display: "block", fontSize: "0.75rem", fontWeight: 400, color: theme.colors.textMuted, isTruncated: true, children: option.description })) : null] })] }))] }));
23
25
  });
24
26
  export default function SelectV2(props) {
25
- var _a, _b, _c;
27
+ var _a, _b;
26
28
  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;
27
29
  const theme = useCustomTheme();
28
30
  const { isOpen, onOpen, onClose } = useDisclosure({ defaultIsOpen: defaultOpen });
@@ -192,15 +194,7 @@ export default function SelectV2(props) {
192
194
  const triggerId = `selectv2-trigger-${instanceId}`;
193
195
  const activeOption = filteredOptions[activeIndex];
194
196
  const activeDescendantId = activeOption ? optionDomId(listboxId, activeOption.id) : undefined;
195
- const listScrollStyles = useMemo(() => ({
196
- scrollbarWidth: "thin",
197
- scrollbarColor: `${theme.colors.gray[300]} transparent`,
198
- "&::-webkit-scrollbar": { width: "6px" },
199
- "&::-webkit-scrollbar-thumb": {
200
- background: theme.colors.gray[300],
201
- borderRadius: "base",
202
- },
203
- }), [theme]);
197
+ const listScrollStyles = useMemo(() => scrollbarStyles(theme.colors, "overlay"), [theme]);
204
198
  const defaultTriggerContent = () => {
205
199
  var _a;
206
200
  if (props.isMulti) {
@@ -215,7 +209,7 @@ export default function SelectV2(props) {
215
209
  return selectedOptions[0] ? selectedOptions[0].label : placeholder;
216
210
  };
217
211
  const triggerIcon = !props.isMulti && ((_b = selectedOptions[0]) === null || _b === void 0 ? void 0 : _b.icon) ? selectedOptions[0].icon : null;
218
- return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "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 ? theme.colors.text[900] : theme.colors.placeholder[500], "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, fontStyle: selectedOptions.length ? "normal" : "italic", children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: theme.colors.textMuted, children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", border: `0.063rem solid ${theme.colors.boxborder[200]}`, boxShadow: (_c = theme.shadows) === null || _c === void 0 ? void 0 : _c.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[100]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
212
+ return (_jsxs(FormControl, { isInvalid: error, isDisabled: isDisabled, style: formControlStyle, width: width, children: [label && (_jsx(TextLabel, { label: label, id: triggerId, isRequired: isRequired })), _jsxs(Popover, { isOpen: isOpen, onClose: () => resetAndClose(), placement: "bottom-start", matchWidth: true, autoFocus: false, returnFocusOnClose: false, gutter: 4, children: [_jsx(PopoverAnchor, { children: _jsxs(Box, { as: "button", type: "button", id: triggerId, ref: triggerRef, role: "combobox", "aria-haspopup": "listbox", "aria-expanded": isOpen, "aria-controls": listboxId, "aria-activedescendant": activeDescendantId, "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 ? theme.colors.text[900] : placeholderInk(theme.colors), "data-testid": dataTestId, ...fieldStyles, children: [_jsxs(Box, { as: "span", display: "inline-flex", alignItems: "center", gap: 1.5, minW: 0, isTruncated: true, children: [triggerIcon ? (_jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, children: triggerIcon })) : null, _jsx(Box, { as: "span", isTruncated: true, children: renderValue ? renderValue(selectedOptions) : defaultTriggerContent() })] }), _jsx(Box, { as: "span", display: "inline-flex", flexShrink: 0, ml: 2, transition: "transform 0.2s ease", transform: isOpen ? "rotate(180deg)" : "rotate(0deg)", color: theme.colors.textMuted, children: _jsx(ChevronDown, { size: 16 }) })] }) }), _jsx(Portal, { children: _jsxs(PopoverContent, { width: "100%", borderRadius: "xl", boxShadow: theme.shadows.lg, overflow: "hidden", onKeyDown: handleListKeyDown, children: [isSearchable && (_jsx(Box, { p: 2, borderBottom: `0.063rem solid ${theme.colors.boxborder[200]}`, children: _jsx(Input, { ref: filterInputRef, size: "sm", placeholder: "Type to filter...", value: filterText, onChange: (event) => {
219
213
  setFilterText(event.target.value);
220
214
  setActiveIndex(0);
221
215
  }, "aria-activedescendant": activeDescendantId, "aria-label": "Filter options" }) })), _jsxs(Box, { id: listboxId, ref: listRef, role: "listbox", "aria-multiselectable": props.isMulti || undefined, maxH: maxMenuHeight, overflowY: "auto", py: 1, sx: listScrollStyles, children: [filteredOptions.length === 0 && (_jsx(Box, { px: 3, py: 2, fontSize: "0.8125rem", color: theme.colors.textMuted, children: "No Options" })), filteredOptions.map((option, index) => {