pixelize-design-library 2.4.2-beta.5 → 2.4.2

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 (136) hide show
  1. package/dist/Components/Button/Button.d.ts +2 -2
  2. package/dist/Components/Button/Button.js +3 -3
  3. package/dist/Components/Button/Button.styles.js +29 -3
  4. package/dist/Components/Button/ButtonProps.d.ts +6 -1
  5. package/dist/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  6. package/dist/Components/Card/Card.d.ts +1 -1
  7. package/dist/Components/Card/Card.js +2 -2
  8. package/dist/Components/Card/CardProps.d.ts +0 -1
  9. package/dist/Components/Checkbox/Checkbox.js +1 -1
  10. package/dist/Components/Checkbox/Checkbox.styles.js +2 -0
  11. package/dist/Components/DatePicker/RangeDatePicker.js +1 -1
  12. package/dist/Components/DatePicker/SingleDatePicker.js +1 -1
  13. package/dist/Components/FileUpload/FileUpload.js +3 -2
  14. package/dist/Components/FileUpload/FileUploadProps.d.ts +3 -1
  15. package/dist/Components/FileUpload/constants.js +1 -0
  16. package/dist/Components/FilterSidebar/FilterSidebar.js +2 -2
  17. package/dist/Components/Form/FormWrapper.js +1 -1
  18. package/dist/Components/Input/TextInput.styles.js +6 -8
  19. package/dist/Components/InputTextArea/InputTextArea.style.js +5 -4
  20. package/dist/Components/NavigationBar/NavigationBar.js +3 -3
  21. package/dist/Components/NoteTextArea/NoteTextArea.js +5 -3
  22. package/dist/Components/NumberInput/NumberInput.js +3 -1
  23. package/dist/Components/NumberInput/NumberInput.styles.js +5 -4
  24. package/dist/Components/Primitives/Primitives.d.ts +6 -0
  25. package/dist/Components/Primitives/Primitives.js +113 -0
  26. package/dist/Components/ProfileCard/ProfileCard.js +1 -1
  27. package/dist/Components/RadioButton/RadioButton.js +1 -1
  28. package/dist/Components/Search/Search.js +2 -2
  29. package/dist/Components/SearchSelect/SearchSelect.js +2 -1
  30. package/dist/Components/Select/Select.d.ts +1 -1
  31. package/dist/Components/Select/Select.js +4 -2
  32. package/dist/Components/Select/Select.styles.js +2 -1
  33. package/dist/Components/Select/SelectProps.d.ts +3 -0
  34. package/dist/Components/SelectSearch/SelectSearch.js +1 -1
  35. package/dist/Components/SelectV2/SelectV2.js +3 -2
  36. package/dist/Components/SideBar/SecondaryBar.js +1 -1
  37. package/dist/Components/SideBar/SideBar.js +1 -1
  38. package/dist/Components/Table/Table.d.ts +1 -1
  39. package/dist/Components/Table/Table.js +10 -4
  40. package/dist/Components/Table/TableProps.d.ts +4 -0
  41. package/dist/Components/Table/components/Pagination.js +1 -1
  42. package/dist/Components/Table/components/TableActions.js +2 -2
  43. package/dist/Components/Table/components/TableBody.js +40 -11
  44. package/dist/Components/Table/components/TableGroupRow.js +1 -1
  45. package/dist/Components/Table/components/TableHeader.js +21 -8
  46. package/dist/Components/Table/components/TableSearch.js +1 -1
  47. package/dist/Components/Table/settings/ManageColumns.js +1 -1
  48. package/dist/Components/Table/settings/TableSettings.js +2 -2
  49. package/dist/Components/Table/variants/TableVariantContext.d.ts +4 -0
  50. package/dist/Components/Table/variants/TableVariantContext.js +17 -0
  51. package/dist/Components/Table/variants/classic.d.ts +6 -0
  52. package/dist/Components/Table/variants/classic.js +47 -0
  53. package/dist/Components/Table/variants/index.d.ts +7 -0
  54. package/dist/Components/Table/variants/index.js +27 -0
  55. package/dist/Components/Table/variants/pillInk.d.ts +6 -0
  56. package/dist/Components/Table/variants/pillInk.js +21 -0
  57. package/dist/Components/Table/variants/studio.d.ts +6 -0
  58. package/dist/Components/Table/variants/studio.js +50 -0
  59. package/dist/Components/Table/variants/tokens.d.ts +49 -0
  60. package/dist/Components/Table/variants/tokens.js +2 -0
  61. package/dist/Components/Trail/TrailWorks.js +1 -1
  62. package/dist/Theme/chakra/Menu.styles.d.ts +2 -0
  63. package/dist/Theme/chakra/Menu.styles.js +5 -3
  64. package/dist/Theme/chakra/Popover.styles.d.ts +3 -0
  65. package/dist/Theme/chakra/Popover.styles.js +5 -1
  66. package/dist/Theme/chakra/componentStyles.d.ts +5 -0
  67. package/dist/Theme/provider/ThemeSwitcher.js +5 -2
  68. package/dist/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  69. package/dist/Theme/tokens/builders/index.d.ts +1 -0
  70. package/dist/Theme/tokens/builders/index.js +1 -0
  71. package/dist/Theme/tokens/builders/outlineRung.d.ts +27 -3
  72. package/dist/Theme/tokens/builders/outlineRung.js +55 -5
  73. package/dist/Theme/tokens/builders/placeholderInk.d.ts +19 -0
  74. package/dist/Theme/tokens/builders/placeholderInk.js +35 -0
  75. package/dist/Theme/tokens/builders/resolvedRungs.d.ts +5 -1
  76. package/dist/Theme/tokens/builders/resolvedRungs.js +7 -2
  77. package/dist/Theme/tokens/builders/surfaceRungs.d.ts +5 -2
  78. package/dist/Theme/tokens/builders/surfaceRungs.js +19 -9
  79. package/dist/esm/Components/Button/Button.js +4 -4
  80. package/dist/esm/Components/Button/Button.styles.js +29 -3
  81. package/dist/esm/Components/ButtonGroupIcon/ButtonGroupIcon.js +1 -1
  82. package/dist/esm/Components/Card/Card.js +2 -2
  83. package/dist/esm/Components/Checkbox/Checkbox.js +1 -1
  84. package/dist/esm/Components/Checkbox/Checkbox.styles.js +2 -0
  85. package/dist/esm/Components/DatePicker/RangeDatePicker.js +1 -1
  86. package/dist/esm/Components/DatePicker/SingleDatePicker.js +1 -1
  87. package/dist/esm/Components/FileUpload/FileUpload.js +4 -3
  88. package/dist/esm/Components/FileUpload/constants.js +1 -0
  89. package/dist/esm/Components/FilterSidebar/FilterSidebar.js +2 -2
  90. package/dist/esm/Components/Form/FormWrapper.js +1 -1
  91. package/dist/esm/Components/Input/TextInput.styles.js +6 -8
  92. package/dist/esm/Components/InputTextArea/InputTextArea.style.js +5 -4
  93. package/dist/esm/Components/NavigationBar/NavigationBar.js +3 -3
  94. package/dist/esm/Components/NoteTextArea/NoteTextArea.js +5 -3
  95. package/dist/esm/Components/NumberInput/NumberInput.js +4 -2
  96. package/dist/esm/Components/NumberInput/NumberInput.styles.js +5 -4
  97. package/dist/esm/Components/Primitives/Primitives.js +6 -0
  98. package/dist/esm/Components/ProfileCard/ProfileCard.js +1 -1
  99. package/dist/esm/Components/RadioButton/RadioButton.js +1 -1
  100. package/dist/esm/Components/Search/Search.js +2 -2
  101. package/dist/esm/Components/SearchSelect/SearchSelect.js +2 -1
  102. package/dist/esm/Components/Select/Select.js +5 -3
  103. package/dist/esm/Components/Select/Select.styles.js +2 -1
  104. package/dist/esm/Components/SelectSearch/SelectSearch.js +1 -1
  105. package/dist/esm/Components/SelectV2/SelectV2.js +3 -2
  106. package/dist/esm/Components/SideBar/SecondaryBar.js +1 -1
  107. package/dist/esm/Components/SideBar/SideBar.js +1 -1
  108. package/dist/esm/Components/Table/Table.js +10 -4
  109. package/dist/esm/Components/Table/components/Pagination.js +1 -1
  110. package/dist/esm/Components/Table/components/TableActions.js +2 -2
  111. package/dist/esm/Components/Table/components/TableBody.js +41 -12
  112. package/dist/esm/Components/Table/components/TableGroupRow.js +1 -1
  113. package/dist/esm/Components/Table/components/TableHeader.js +21 -8
  114. package/dist/esm/Components/Table/components/TableSearch.js +1 -1
  115. package/dist/esm/Components/Table/settings/ManageColumns.js +1 -1
  116. package/dist/esm/Components/Table/settings/TableSettings.js +2 -2
  117. package/dist/esm/Components/Table/variants/TableVariantContext.js +13 -0
  118. package/dist/esm/Components/Table/variants/classic.js +43 -0
  119. package/dist/esm/Components/Table/variants/index.js +9 -0
  120. package/dist/esm/Components/Table/variants/pillInk.js +18 -0
  121. package/dist/esm/Components/Table/variants/studio.js +46 -0
  122. package/dist/esm/Components/Table/variants/tokens.js +1 -0
  123. package/dist/esm/Components/Trail/TrailWorks.js +1 -1
  124. package/dist/esm/Theme/chakra/Menu.styles.js +5 -3
  125. package/dist/esm/Theme/chakra/Popover.styles.js +5 -1
  126. package/dist/esm/Theme/provider/ThemeSwitcher.js +5 -2
  127. package/dist/esm/Theme/tokens/builders/chartColorsFromTheme.js +1 -1
  128. package/dist/esm/Theme/tokens/builders/index.js +1 -0
  129. package/dist/esm/Theme/tokens/builders/outlineRung.js +52 -4
  130. package/dist/esm/Theme/tokens/builders/placeholderInk.js +29 -0
  131. package/dist/esm/Theme/tokens/builders/resolvedRungs.js +7 -2
  132. package/dist/esm/Theme/tokens/builders/surfaceRungs.js +20 -10
  133. package/dist/esm/index.js +2 -0
  134. package/dist/index.d.ts +4 -1
  135. package/dist/index.js +9 -1
  136. package/package.json +4 -2
@@ -1,4 +1,4 @@
1
+ import { type ComponentWithAs } from "@chakra-ui/react";
1
2
  import { ButtonProps } from "./ButtonProps";
2
- declare function Button({ label, children, onClick, opacity, variant, leftIcon, rightIcon, size, isDisabled, isLoading, loadingText, type, width, sx, colorScheme, ref, border, borderRadius, onMouseEnter, onMouseLeave, ...aria }: ButtonProps): import("react/jsx-runtime").JSX.Element;
3
- declare const _default: import("react").MemoExoticComponent<typeof Button>;
3
+ declare const _default: ComponentWithAs<"button", ButtonProps>;
4
4
  export default _default;
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const jsx_runtime_1 = require("react/jsx-runtime");
4
4
  const react_1 = require("react");
5
5
  const react_2 = require("@chakra-ui/react");
6
- function Button({ label, children, onClick, opacity, variant = "solid", leftIcon, rightIcon, size, isDisabled = false, isLoading = false, loadingText = "Loading", type, width, sx, colorScheme, ref, border, borderRadius, onMouseEnter, onMouseLeave, ...aria }) {
7
- return ((0, jsx_runtime_1.jsx)(react_2.Button, { ...aria, type: type, onClick: onClick, width: width || "fit-content", variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, ref: ref, colorScheme: colorScheme, sx: sx, opacity: opacity, border: border, borderRadius: borderRadius, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: children !== null && children !== void 0 ? children : label }));
8
- }
6
+ const Button = (0, react_1.forwardRef)(function Button({ label, children, onClick, opacity, variant = "solid", leftIcon, rightIcon, size, isDisabled = false, isLoading = false, loadingText = "Loading", type, width, w, sx, colorScheme, border, borderRadius, onMouseEnter, onMouseLeave, ...aria }, ref) {
7
+ return ((0, jsx_runtime_1.jsx)(react_2.Button, { ...aria, type: type, onClick: onClick, width: width || w || "fit-content", variant: variant, size: size, isLoading: isLoading, isDisabled: isDisabled, loadingText: loadingText, leftIcon: leftIcon, rightIcon: rightIcon, ref: ref, colorScheme: colorScheme, sx: sx, opacity: opacity, border: border, borderRadius: borderRadius, onMouseEnter: onMouseEnter, onMouseLeave: onMouseLeave, children: children !== null && children !== void 0 ? children : label }));
8
+ });
9
9
  exports.default = (0, react_1.memo)(Button);
@@ -2,6 +2,7 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Button = void 0;
4
4
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
5
+ const color_1 = require("../../Theme/tokens/builders/color");
5
6
  const gradientInk_1 = require("../../Theme/tokens/builders/gradientInk");
6
7
  /**
7
8
  * Outline/ghost/link text sits ON the canvas, so it needs a rung that stays readable there —
@@ -30,9 +31,34 @@ const onCanvasHoverBg = (theme, colorScheme, step) => {
30
31
  * ~3.2 contrast.
31
32
  */
32
33
  const FILL_STEP_RUNGS = { light: [600, 700], dark: [400, 300] };
34
+ const RUNGS = [50, 100, 200, 300, 400, 500, 600, 700, 800, 900];
35
+ const AA_NORMAL_TEXT = 4.5;
36
+ // Semantic scales (red/green) carry no opacity ramp; brand scales do and keep their own [500].
37
+ const solidRung = (theme, colorScheme) => {
38
+ const scale = theme.colors[colorScheme];
39
+ const white = theme.colors.white;
40
+ if ("opacity" in scale)
41
+ return 500;
42
+ if ((0, color_1.contrastRatio)(scale[500], white) >= AA_NORMAL_TEXT)
43
+ return 500;
44
+ const passing = RUNGS.filter((r) => scale[r] && (0, color_1.contrastRatio)(scale[r], white) >= AA_NORMAL_TEXT);
45
+ if (!passing.length)
46
+ return 500;
47
+ return passing.reduce((a, b) => (0, color_1.contrastRatio)(scale[a], white) <= (0, color_1.contrastRatio)(scale[b], white) ? a : b);
48
+ };
49
+ const steppedRung = (theme, base, step) => {
50
+ const dir = (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main) ? -100 : 100;
51
+ return Math.min(900, Math.max(50, base + dir * step));
52
+ };
33
53
  const darkerFill = (theme, colorScheme, step) => {
34
- const mode = (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main) ? "dark" : "light";
35
- return theme.colors[colorScheme][FILL_STEP_RUNGS[mode][step]];
54
+ var _a;
55
+ const scale = theme.colors[colorScheme];
56
+ const base = solidRung(theme, colorScheme);
57
+ if (base === 500) {
58
+ const mode = (0, accentText_1.isDarkCanvas)(theme.colors.backgroundColor.main) ? "dark" : "light";
59
+ return scale[FILL_STEP_RUNGS[mode][step]];
60
+ }
61
+ return (_a = scale[steppedRung(theme, base, step === 0 ? 1 : 2)]) !== null && _a !== void 0 ? _a : scale[base];
36
62
  };
37
63
  /** Label for the solid variant's filled bg — derived from THAT fill, since hover/active swap it. */
38
64
  const labelFor = (theme, fill) => (0, accentText_1.onFilled)(fill, theme.colors.white, theme.colors.black);
@@ -49,7 +75,7 @@ exports.Button = {
49
75
  }),
50
76
  variants: {
51
77
  solid: ({ theme, colorScheme = "primary" }) => {
52
- const fill = theme.colors[colorScheme][500];
78
+ const fill = theme.colors[colorScheme][solidRung(theme, colorScheme)];
53
79
  const hoverFill = darkerFill(theme, colorScheme, 0);
54
80
  const activeFill = darkerFill(theme, colorScheme, 1);
55
81
  const hoverLabel = labelFor(theme, hoverFill);
@@ -1,5 +1,9 @@
1
1
  import { ButtonProps as ChakraButtonProps } from "@chakra-ui/react";
2
- export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "spinner" | "sx" | "border" | "borderRadius" | "onMouseEnter" | "onMouseLeave" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "aria-current" | "id" | "title"> & {
2
+ type LayoutProps = Pick<ChakraButtonProps, "as" | "m" | "mt" | "mb" | "ml" | "mr" | "mx" | "my" | "p" | "pt" | "pb" | "pl" | "pr" | "px" | "py" | "w" | "minW" | "maxW" | "h" | "minH" | "maxH" | "boxSize" | "flex" | "flexShrink" | "flexGrow" | "alignSelf" | "justifyContent" | "cursor" | "fontWeight" | "fontSize" | "textAlign" | "whiteSpace" | "_hover" | "_active" | "_focus" | "_focusVisible" | "_disabled" | "isActive" | "onKeyDown" | "onFocus" | "onBlur" | "onPointerDown" | "tabIndex" | "form" | "name" | "value" | "autoFocus" | "role">;
3
+ type DataAttributes = {
4
+ [key: `data-${string}`]: string | number | boolean | undefined;
5
+ };
6
+ export type ButtonProps = LayoutProps & DataAttributes & Pick<ChakraButtonProps, "onClick" | "leftIcon" | "rightIcon" | "isDisabled" | "isLoading" | "loadingText" | "spinner" | "sx" | "border" | "borderRadius" | "onMouseEnter" | "onMouseLeave" | "aria-label" | "aria-labelledby" | "aria-describedby" | "aria-expanded" | "aria-haspopup" | "aria-controls" | "aria-pressed" | "aria-current" | "id" | "title"> & {
3
7
  label?: string;
4
8
  width?: string | number;
5
9
  size?: "lg" | "md" | "sm" | "xs" | "xl";
@@ -10,3 +14,4 @@ export type ButtonProps = Pick<ChakraButtonProps, "onClick" | "leftIcon" | "righ
10
14
  children?: React.ReactNode;
11
15
  opacity?: number;
12
16
  };
17
+ export {};
@@ -72,7 +72,7 @@ rightIconDropdown, menulistStyle, menuItemStyle, isLoading, divider = true, left
72
72
  // this theme-swap app never triggers) — our `bg` prop above only recolors the list
73
73
  // itself, not the inherited var, so items fell back to white until hover/focus (which
74
74
  // our own sx already overrides). Setting the var here fixes the rest state too.
75
- sx: { "--menu-bg": theme.colors.backgroundColor.light }, border: "1px solid", borderColor: theme.colors.boxborder[500], borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
75
+ sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", py: "0.375rem", minW: "12rem", overflow: "hidden", children: dropdownOptions === null || dropdownOptions === void 0 ? void 0 : dropdownOptions.map((option, index) => ((0, jsx_runtime_1.jsxs)(react_2.MenuItem, { onClick: (event) => handleMenuClick(event, option), style: menuItemStyle, sx: {
76
76
  display: "flex",
77
77
  alignItems: "center",
78
78
  gap: "0.5rem",
@@ -1,2 +1,2 @@
1
1
  import { CardProps } from "./CardProps";
2
- export default function Card({ key, maxW, align, variant, direction, justify, children, size, color, overflow, sx, }: CardProps): import("react/jsx-runtime").JSX.Element;
2
+ export default function Card({ maxW, align, variant, direction, justify, children, size, color, overflow, sx, }: CardProps): import("react/jsx-runtime").JSX.Element;
@@ -3,6 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.default = Card;
4
4
  const jsx_runtime_1 = require("react/jsx-runtime");
5
5
  const react_1 = require("@chakra-ui/react");
6
- function Card({ key, maxW, align, variant, direction, justify, children, size, color, overflow, sx, }) {
7
- return ((0, jsx_runtime_1.jsx)(react_1.Card, { maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, p: 4, sx: sx, children: children }, key));
6
+ function Card({ maxW, align, variant, direction, justify, children, size, color, overflow, sx, }) {
7
+ return ((0, jsx_runtime_1.jsx)(react_1.Card, { maxW: maxW, align: align, variant: variant, direction: direction, justify: justify, size: size, overflow: overflow, colorScheme: color, p: 4, sx: sx, children: children }));
8
8
  }
@@ -6,7 +6,6 @@ export type CardProps = Pick<ChakraCardProps, "direction" | "maxW" | "align" | "
6
6
  variant?: "elevated" | "outline" | "filled" | "unstyled";
7
7
  size?: "sm" | "md" | "lg";
8
8
  color?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
9
- key?: string;
10
9
  dividercolor?: "whiteAlpha" | "blackAlpha" | "gray" | "red" | "orange" | "yellow" | "green" | "teal" | "blue" | "cyan" | "purple" | "pink";
11
10
  dividersize?: string;
12
11
  dividervariant?: "solid" | "dashed";
@@ -27,7 +27,7 @@ function CheckBox({ label, labelFontSize, showLabelTooltip, labelTooltip, labelC
27
27
  ...labelSx,
28
28
  }
29
29
  : { ...labelSx };
30
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Checkbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.gray[500], display: "flex", alignItems: "center", sx: {
30
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(react_1.Checkbox, { ...aria, onClick: onClick, spacing: spacing !== null && spacing !== void 0 ? spacing : "0.5rem", isInvalid: isInvalid, colorScheme: color, iconColor: iconColor, iconSize: iconSize, isChecked: isChecked, isIndeterminate: isIndeterminate, onChange: onChange, isDisabled: isDisabled, size: size, value: value, defaultChecked: defaultChecked, borderColor: theme.colors.boxborder[500], display: "flex", alignItems: "center", sx: {
31
31
  ...sx,
32
32
  ".chakra-checkbox__control": { w: controlSize, h: controlSize },
33
33
  }, children: label && (showLabelTooltip ? ((0, jsx_runtime_1.jsx)(ToolTip_1.default, { label: labelTooltip !== null && labelTooltip !== void 0 ? labelTooltip : label, hasArrow: true, placement: "top", fontSize: "0.75rem", children: (0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }) })) : ((0, jsx_runtime_1.jsx)(react_1.Box, { as: "span", sx: clampStyles, fontSize: labelFontSize !== null && labelFontSize !== void 0 ? labelFontSize : "0.8125rem", color: theme.colors.text[700], fontWeight: 500, ml: 0, children: label }))) }), error && (0, jsx_runtime_1.jsx)(ErrorMessage_1.default, { errorMessage: errorMessage }), helperText && !error && (0, jsx_runtime_1.jsx)(HelperText_1.default, { helperText: helperText })] }));
@@ -18,6 +18,8 @@ exports.Checkbox = {
18
18
  height: "1.25rem",
19
19
  borderWidth: "1.6px",
20
20
  borderRadius: "base",
21
+ // Without a resting colour Chakra falls back to its own gray.500.
22
+ borderColor: theme.colors.boxborder[500],
21
23
  transition: "background 0.15s, border-color 0.15s, box-shadow 0.15s",
22
24
  _disabled: {
23
25
  bg: theme.colors.background[50],
@@ -178,7 +178,7 @@ const RangeDatePicker = (props) => {
178
178
  : `0 0 0 1px ${theme.colors.primary[500]}`,
179
179
  }, _hover: {
180
180
  borderColor: error ? theme.colors.semanticText.error : undefined,
181
- }, cursor: "pointer" }), (0, jsx_runtime_1.jsx)(react_2.InputRightElement, { height: "100%", display: "flex", alignItems: "center", pointerEvents: "auto", style: { cursor: "pointer" }, onClick: () => (isOpen ? onClose() : handleOpen()), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx: calendarIconWrapperSx, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CalendarIcon, { size: calendarIconPx, color: theme.colors.textMuted }) }) })] }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: "18rem", maxW: "18rem", p: 3, ref: popoverRef, boxShadow: "lg", borderRadius: "xl", border: "1px solid", borderColor: theme.colors.boxborder[500], bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", flexWrap: "wrap", gap: 2, mb: 3, children: presets.map((p) => ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "gray", sx: { flex: "1 1 auto" }, onClick: () => {
181
+ }, cursor: "pointer" }), (0, jsx_runtime_1.jsx)(react_2.InputRightElement, { height: "100%", display: "flex", alignItems: "center", pointerEvents: "auto", style: { cursor: "pointer" }, onClick: () => (isOpen ? onClose() : handleOpen()), children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx: calendarIconWrapperSx, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CalendarIcon, { size: calendarIconPx, color: theme.colors.textMuted }) }) })] }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { w: "18rem", maxW: "18rem", p: 3, ref: popoverRef, boxShadow: "lg", borderRadius: "xl", bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", flexWrap: "wrap", gap: 2, mb: 3, children: presets.map((p) => ((0, jsx_runtime_1.jsx)(Button_1.default, { size: "xs", variant: "outline", colorScheme: "gray", sx: { flex: "1 1 auto" }, onClick: () => {
182
182
  const [from, to] = p.getRange();
183
183
  applyPreset(from, to);
184
184
  }, children: p.label }, p.label))) }), (0, jsx_runtime_1.jsx)(CalendarPanel_1.default, { currentMonth: currentMonth, setCurrentMonth: (updater) => setCurrentMonthState((prev) => updater(prev)), today: today, isRange: true, tempDate: null, tempRangeStart: tempRangeStart, tempRangeEnd: tempRangeEnd, hoveredDate: hoveredDate, onDayHover: setHoveredDate, isSameDay: date_fns_1.isSameDay, isBefore: date_fns_1.isBefore, isAfter: date_fns_1.isAfter, minDate: minDate, maxDate: maxDate, disablePastDates: disablePastDates, disableFutureDates: disableFutureDates, disableToday: disableToday, onDaySelect: handleDaySelect }), formatHasTime && ((0, jsx_runtime_1.jsxs)(react_2.Box, { mt: 3, display: "grid", gridTemplateColumns: "1fr", gap: 2, children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { fontSize: "xs", color: theme.colors.textMuted, mb: 1, children: "Start time" }), shouldUseSelectTimePicker ? ((0, jsx_runtime_1.jsx)(TimePicker_1.default, { date: startTimeBaseDate, onChange: (updated) => {
@@ -962,7 +962,7 @@ const SingleDatePicker = (props) => {
962
962
  else {
963
963
  onClose();
964
964
  }
965
- }, style: { cursor: "pointer" }, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx: calendarIconWrapperSx, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CalendarIcon, { size: calendarIconPx, color: theme.colors.textMuted }) }) })] }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "auto", p: 3, ref: popoverRef, boxShadow: "lg", borderRadius: "xl", border: "1px solid", borderColor: theme.colors.boxborder[500], bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [showDate && ((0, jsx_runtime_1.jsx)(CalendarPanel_1.default, { currentMonth: currentMonth, setCurrentMonth: (updater) => setCurrentMonth((prev) => updater(prev)), today: today, isRange: false, tempDate: tempDate, tempRangeStart: null, tempRangeEnd: null, isSameDay: date_fns_1.isSameDay, isBefore: date_fns_1.isBefore, isAfter: date_fns_1.isAfter, minDate: minDate, maxDate: maxDate, disablePastDates: disablePastDates, disableFutureDates: disableFutureDates, disableToday: disableToday, onDaySelect: handleDaySelect })), showTime && ((0, jsx_runtime_1.jsx)(react_2.Box, { mt: showDate ? 3 : 0, children: resolvedPickerType === "time" ? ((0, jsx_runtime_1.jsx)(TimePickerInput_1.TimePickerInput, { value: tempDate, onChange: (updatedDate) => {
965
+ }, style: { cursor: "pointer" }, children: (0, jsx_runtime_1.jsx)(react_2.Box, { as: "span", sx: calendarIconWrapperSx, children: (0, jsx_runtime_1.jsx)(lucide_react_1.CalendarIcon, { size: calendarIconPx, color: theme.colors.textMuted }) }) })] }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "auto", p: 3, ref: popoverRef, boxShadow: "lg", borderRadius: "xl", bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsxs)(react_2.PopoverBody, { p: 0, children: [showDate && ((0, jsx_runtime_1.jsx)(CalendarPanel_1.default, { currentMonth: currentMonth, setCurrentMonth: (updater) => setCurrentMonth((prev) => updater(prev)), today: today, isRange: false, tempDate: tempDate, tempRangeStart: null, tempRangeEnd: null, isSameDay: date_fns_1.isSameDay, isBefore: date_fns_1.isBefore, isAfter: date_fns_1.isAfter, minDate: minDate, maxDate: maxDate, disablePastDates: disablePastDates, disableFutureDates: disableFutureDates, disableToday: disableToday, onDaySelect: handleDaySelect })), showTime && ((0, jsx_runtime_1.jsx)(react_2.Box, { mt: showDate ? 3 : 0, children: resolvedPickerType === "time" ? ((0, jsx_runtime_1.jsx)(TimePickerInput_1.TimePickerInput, { value: tempDate, onChange: (updatedDate) => {
966
966
  setTempDate(updatedDate);
967
967
  setInputValue(updatedDate ? (0, date_fns_1.format)(updatedDate, resolvedDateFormat) : "");
968
968
  setIsTyping(false);
@@ -42,7 +42,8 @@ const useCustomTheme_1 = require("../../Theme/useCustomTheme");
42
42
  const accentText_1 = require("../../Theme/tokens/builders/accentText");
43
43
  const constants_1 = require("./constants");
44
44
  const Modal_1 = __importStar(require("../Modal/Modal"));
45
- const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes = [".jpg", ".png"], maxSizeKB = 5, maxFiles = undefined, progress = {}, }) => {
45
+ const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes = [".jpg", ".png"], maxSizeKB = 5, maxFiles = undefined, progress = {}, size = "md", inputAriaLabel = "Upload files", }) => {
46
+ const compact = size === "sm";
46
47
  const { colors, radii } = (0, useCustomTheme_1.useCustomTheme)();
47
48
  const { isOpen, onOpen, onClose } = (0, react_2.useDisclosure)();
48
49
  const [previewUrl, setPreviewUrl] = react_1.default.useState(null);
@@ -88,7 +89,7 @@ const FileUpload = ({ onFilesUploaded, uploadedFiles, onRemoveFile, acceptTypes
88
89
  setErrors(messages);
89
90
  },
90
91
  });
91
- return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, align: "stretch", children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { ...getRootProps(), border: "2px dashed", borderColor: border, borderRadius: "md", p: 10, textAlign: "center", bg: bg, cursor: "pointer", transition: "all 0.2s", _hover: { bg: colors.gray[100] }, position: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...getInputProps() }), (0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 2, children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Upload, boxSize: 6 }), (0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "medium", children: "Drag and drop files here" }), (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", color: colors.textMuted, children: [acceptTypes.join(", "), " up to ", (0, constants_1.toMB)(maxSizeKB), " ", maxFiles ? `- ${maxFiles} file(s) max` : ""] })] })] }), errors.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { children: errors.map((err, idx) => ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: colors.semanticText.error, children: err }, idx))) })), uploadedFiles.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, children: (0, jsx_runtime_1.jsx)(react_2.Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: "Uploaded Files" }) }), (0, jsx_runtime_1.jsx)(react_2.List, { spacing: 2, children: uploadedFiles.map((file, index) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [(0, jsx_runtime_1.jsxs)(react_2.ListItem, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 3, flex: "1", children: [file.type.startsWith("image/") ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { boxSize: "2.5rem", cursor: "pointer", position: "relative", _hover: {
92
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(react_2.VStack, { spacing: 4, align: "stretch", children: [(0, jsx_runtime_1.jsxs)(react_2.Box, { ...getRootProps(), border: "2px dashed", borderColor: border, borderRadius: "md", p: compact ? 3 : 10, textAlign: "center", bg: bg, cursor: "pointer", transition: "all 0.2s", _hover: { bg: colors.gray[100] }, position: "relative", children: [(0, jsx_runtime_1.jsx)("input", { ...getInputProps({ "aria-label": inputAriaLabel }) }), (0, jsx_runtime_1.jsxs)(react_2.Stack, { direction: compact ? "row" : "column", spacing: compact ? 3 : 2, align: "center", justify: "center", children: [(0, jsx_runtime_1.jsx)(react_2.Icon, { as: lucide_react_1.Upload, boxSize: compact ? 4 : 6 }), (0, jsx_runtime_1.jsxs)(react_2.Stack, { spacing: 0, align: compact ? "start" : "center", children: [(0, jsx_runtime_1.jsx)(react_2.Text, { fontWeight: "medium", fontSize: compact ? "sm" : "md", color: colors.textMuted, children: "Drag and drop files here" }), (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: compact ? "xs" : "sm", color: colors.textMuted, children: [acceptTypes.join(", "), " up to ", (0, constants_1.toMB)(maxSizeKB), " ", maxFiles ? `- ${maxFiles} file(s) max` : ""] })] })] })] }), errors.length > 0 && ((0, jsx_runtime_1.jsx)(react_2.Box, { children: errors.map((err, idx) => ((0, jsx_runtime_1.jsx)(react_2.Text, { fontSize: "sm", color: colors.semanticText.error, children: err }, idx))) })), uploadedFiles.length > 0 && ((0, jsx_runtime_1.jsxs)(react_2.Box, { children: [(0, jsx_runtime_1.jsx)(react_2.Box, { display: "flex", alignItems: "center", gap: 2, children: (0, jsx_runtime_1.jsx)(react_2.Text, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 14, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", py: 4, children: "Uploaded Files" }) }), (0, jsx_runtime_1.jsx)(react_2.List, { spacing: 2, children: uploadedFiles.map((file, index) => ((0, jsx_runtime_1.jsxs)(react_2.Box, { borderWidth: "0.063rem", borderRadius: "md", px: 3, py: 2, bg: colors.background[50], children: [(0, jsx_runtime_1.jsxs)(react_2.ListItem, { display: "flex", justifyContent: "space-between", alignItems: "center", children: [(0, jsx_runtime_1.jsxs)(react_2.HStack, { spacing: 3, flex: "1", children: [file.type.startsWith("image/") ? ((0, jsx_runtime_1.jsxs)(react_2.Box, { boxSize: "2.5rem", cursor: "pointer", position: "relative", _hover: {
92
93
  ".hover-icon": {
93
94
  opacity: 1,
94
95
  bg: colors.secondary.opacity[16],
@@ -1,4 +1,4 @@
1
- export type MimeExtension = '.jpg' | '.jpeg' | '.png' | '.gif' | '.webp' | '.svg' | '.pdf' | '.doc' | '.docx' | '.xls' | '.xlsx' | '.ppt' | '.pptx' | '.txt' | '.mp4' | '.mov' | '.mp3' | '.wav' | '.zip' | '.rar' | '.7z';
1
+ export type MimeExtension = '.jpg' | '.jpeg' | '.png' | '.gif' | '.webp' | '.svg' | '.pdf' | '.doc' | '.docx' | '.xls' | '.xlsx' | '.ppt' | '.pptx' | '.txt' | '.csv' | '.mp4' | '.mov' | '.mp3' | '.wav' | '.zip' | '.rar' | '.7z';
2
2
  export type MimeMap = Record<MimeExtension, string>;
3
3
  export type FileUploaderProps = {
4
4
  onFilesUploaded: (files: File[]) => void;
@@ -7,5 +7,7 @@ export type FileUploaderProps = {
7
7
  acceptTypes?: MimeExtension[];
8
8
  maxSizeKB?: number;
9
9
  maxFiles?: number;
10
+ size?: 'sm' | 'md';
10
11
  progress?: Record<string, number>;
12
+ inputAriaLabel?: string;
11
13
  };
@@ -16,6 +16,7 @@ exports.mimeMap = {
16
16
  '.ppt': 'application/vnd.ms-powerpoint',
17
17
  '.pptx': 'application/vnd.openxmlformats-officedocument.presentationml.presentation',
18
18
  '.txt': 'text/plain',
19
+ '.csv': 'text/csv',
19
20
  '.mp4': 'video/mp4',
20
21
  '.mov': 'video/quicktime',
21
22
  '.mp3': 'audio/mpeg',
@@ -149,13 +149,13 @@ panelPadding = 3, clearAllButton = true, onClearAllHandler,
149
149
  pointerEvents: 'none', // Allow clicks to pass through track
150
150
  zIndex: 3,
151
151
  margin: 0,
152
- } })] }), (0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [(0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(react_2.Box, { ml: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
152
+ } })] }), (0, jsx_runtime_1.jsxs)(react_2.SimpleGrid, { columns: 2, spacing: 2, pt: 2, w: "full", children: [(0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: openPrice.id === section.id && openPrice.target === "min", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "min" }), gap: 2, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(react_2.Box, { ml: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMin, range.unit ? ` ${range.unit}` : ""] }) }) }) }), (0, jsx_runtime_1.jsx)(react_2.Portal, { children: (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "6rem", p: 0, zIndex: 1600, bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMin === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMin === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMin === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
153
153
  const min = v;
154
154
  const max = currentMax;
155
155
  const nextVal = [Math.min(min, max), Math.max(min, max)];
156
156
  setInternalSelected((prev) => { const next = { ...prev, [section.id]: nextVal }; onChange === null || onChange === void 0 ? void 0 : onChange(next); return next; });
157
157
  setOpenPrice({});
158
- }, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 9, color: (0, accentText_1.onFilled)(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), (0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.gray[300], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(react_2.Box, { ml: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "6rem", p: 0, bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
158
+ }, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "sm", color: theme.colors.gray[800], children: [v, range.unit ? ` ${range.unit}` : ""] }), currentMin === v ? ((0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.red[100], borderRadius: "full", p: 1, display: "flex", alignItems: "center", children: (0, jsx_runtime_1.jsx)(lucide_react_1.Check, { size: 9, color: (0, accentText_1.onFilled)(theme.colors.red[100], theme.colors.white, theme.colors.black) }) })) : null] }, `min-${v}`))) }) }) }) })] }), (0, jsx_runtime_1.jsxs)(react_2.Popover, { isOpen: openPrice.id === section.id && openPrice.target === "max", onClose: () => setOpenPrice({}), placement: "bottom-start", closeOnBlur: true, children: [(0, jsx_runtime_1.jsx)(react_2.PopoverTrigger, { children: (0, jsx_runtime_1.jsx)(react_2.Flex, { borderWidth: "0", borderRadius: "md", alignItems: "center", px: 3, py: 2, bg: theme.colors.gray[50], borderColor: theme.colors.boxborder[500], cursor: "pointer", onClick: () => setOpenPrice({ id: section.id, target: "max" }), gap: 2, overflow: "hidden", children: (0, jsx_runtime_1.jsx)(react_2.Box, { ml: "auto", children: (0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "12px", color: theme.colors.text[500], whiteSpace: "nowrap", children: [currentMax, range.unit ? ` ${range.unit}` : ""] }) }) }) }), (0, jsx_runtime_1.jsx)(react_2.PopoverContent, { width: "6rem", p: 0, bg: theme.colors.background[50], children: (0, jsx_runtime_1.jsx)(react_2.PopoverBody, { p: 0, children: (0, jsx_runtime_1.jsx)(react_2.VStack, { align: "stretch", spacing: 0, maxH: "12rem", overflowY: "auto", children: values.map((v) => ((0, jsx_runtime_1.jsxs)(react_2.Flex, { px: 2, py: 1, align: "center", justify: "space-between", cursor: "pointer", bg: currentMax === v ? theme.colors.red[50] : theme.colors.background[50], borderLeftWidth: currentMax === v ? 3 : 0, borderLeftStyle: "solid", borderLeftColor: currentMax === v ? theme.colors.red[400] : "transparent", _hover: { bg: hoverBg }, onClick: () => {
159
159
  const max = v;
160
160
  const min = currentMin;
161
161
  const nextVal = [Math.min(min, max), Math.max(min, max)];
@@ -5,6 +5,6 @@ const react_1 = require("@chakra-ui/react");
5
5
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
6
6
  const FormWrapper = ({ icon, text, children, }) => {
7
7
  const { colors } = (0, useCustomTheme_1.useCustomTheme)();
8
- return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [icon && (0, jsx_runtime_1.jsx)(react_1.Icon, { as: icon, size: "1rem", color: colors.header[500] }), text && ((0, jsx_runtime_1.jsx)(react_1.Box, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 12, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", color: colors.header[500], children: text }))] }), (0, jsx_runtime_1.jsx)(react_1.Box, { borderRadius: "base", bg: colors.background[50], border: `0.075rem solid ${colors.border[500]}`, boxShadow: `0 0.063rem 0.125rem 0 ${colors.boxShadow.primary}`, p: "1.5rem", children: children })] }));
8
+ return ((0, jsx_runtime_1.jsxs)(react_1.Box, { children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", alignItems: "center", gap: 2, mb: 2, children: [icon && (0, jsx_runtime_1.jsx)(react_1.Icon, { as: icon, size: "1rem", color: colors.header[500] }), text && ((0, jsx_runtime_1.jsx)(react_1.Box, { fontFamily: "open-sans, sans-serif", fontWeight: 600, fontSize: 12, lineHeight: "100%", letterSpacing: "4%", textTransform: "uppercase", color: colors.header[500], children: text }))] }), (0, jsx_runtime_1.jsx)(react_1.Box, { borderRadius: "base", bg: colors.background[50], border: `0.075rem solid ${colors.boxborder[200]}`, boxShadow: `0 0.063rem 0.125rem 0 ${colors.boxShadow.primary}`, p: "1.5rem", children: children })] }));
9
9
  };
10
10
  exports.default = FormWrapper;
@@ -1,10 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Input = void 0;
4
- const outlineRung_1 = require("../../Theme/tokens/builders/outlineRung");
5
- const surfaceRungs_1 = require("../../Theme/tokens/builders/surfaceRungs");
4
+ const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
6
5
  exports.Input = {
7
- baseStyle: {
6
+ baseStyle: ({ theme }) => ({
8
7
  field: {
9
8
  fontWeight: 500,
10
9
  fontSize: "0.875rem",
@@ -15,11 +14,12 @@ exports.Input = {
15
14
  alignItems: "center",
16
15
  borderRadius: "lg",
17
16
  transition: "border-color 0.2s, box-shadow 0.2s",
17
+ // Every variant inherits the hint ink; only `outline` used to set it.
18
18
  _placeholder: {
19
- fontStyle: "italic",
19
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
20
20
  },
21
21
  },
22
- },
22
+ }),
23
23
  sizes: {
24
24
  sm: {
25
25
  field: {
@@ -53,10 +53,8 @@ exports.Input = {
53
53
  bg: theme.colors.gray[50],
54
54
  border: "0.063rem solid",
55
55
  borderColor,
56
- // `textMuted` is body copy, so a hint read as a filled value (6.59:1).
57
- // Settled against the field's own bg to just clear of AA.
58
56
  _placeholder: {
59
- color: (0, outlineRung_1.softenToContrast)(theme.colors.placeholder[500], theme.colors.gray[50], surfaceRungs_1.PLACEHOLDER_TEXT),
57
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
60
58
  },
61
59
  _hover: {
62
60
  borderColor: primary,
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Textarea = void 0;
4
+ const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
4
5
  exports.Textarea = {
5
- baseStyle: {
6
+ baseStyle: ({ theme }) => ({
6
7
  fontWeight: 500,
7
8
  fontSize: "0.875rem",
8
9
  letterSpacing: "0.044rem",
@@ -11,9 +12,9 @@ exports.Textarea = {
11
12
  borderRadius: "lg",
12
13
  transition: "border-color 0.2s, box-shadow 0.2s",
13
14
  _placeholder: {
14
- fontStyle: "italic",
15
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
15
16
  },
16
- },
17
+ }),
17
18
  sizes: {
18
19
  md: {
19
20
  fontSize: "0.875rem",
@@ -33,7 +34,7 @@ exports.Textarea = {
33
34
  borderColor,
34
35
  bg: theme.colors.gray[50],
35
36
  _placeholder: {
36
- color: theme.colors.textMuted,
37
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
37
38
  },
38
39
  _hover: {
39
40
  borderColor: primary,
@@ -48,17 +48,17 @@ function NavBar({ userAvathar, userName, userRole, navMenu, moreIcon, handleNavO
48
48
  _focus: { bg: menuHoverBg, color: menuHoverInk },
49
49
  _active: { bg: menuHoverBg, color: menuHoverInk },
50
50
  };
51
- return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.border[500], children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", gap: 1.5, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.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 ? ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && ((0, jsx_runtime_1.jsx)(react_1.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: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: (0, accentText_1.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 }))] }), (0, jsx_runtime_1.jsx)(react_1.Flex, { minW: 0, flexShrink: 1, children: (0, jsx_runtime_1.jsxs)(react_1.Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), (0, jsx_runtime_1.jsxs)(react_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_1.MenuButton, { as: react_1.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "sm", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsx)(react_1.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
51
+ return ((0, jsx_runtime_1.jsx)(react_1.Box, { bg: theme.colors.backgroundColor.light, px: 4, borderBottom: "1px solid", borderColor: theme.colors.boxborder[200], children: (0, jsx_runtime_1.jsxs)(react_1.Flex, { h: 16, alignItems: "center", justifyContent: "space-between", children: [(0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", gap: 1.5, alignItems: "center", children: [(0, jsx_runtime_1.jsx)(react_1.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 ? ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelLeftClose, { size: "1.25rem" })) : ((0, jsx_runtime_1.jsx)(lucide_react_1.PanelRightClose, { size: "1.25rem" })) }), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.onIconClick) && ((0, jsx_runtime_1.jsx)(react_1.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: (0, jsx_runtime_1.jsx)(lucide_react_1.CircleArrowLeft, { size: "1.25rem", color: theme.colors.text[500] }) })), (navigationBarText === null || navigationBarText === void 0 ? void 0 : navigationBarText.text) && ((0, jsx_runtime_1.jsx)(react_1.Text, { color: (0, accentText_1.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 }))] }), (0, jsx_runtime_1.jsx)(react_1.Flex, { minW: 0, flexShrink: 1, children: (0, jsx_runtime_1.jsxs)(react_1.Stack, { direction: "row", alignItems: "center", spacing: 4, minW: 0, children: [moreIcon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", minW: 0, children: moreIcon })), (0, jsx_runtime_1.jsxs)(react_1.Menu, { children: [(0, jsx_runtime_1.jsx)(react_1.MenuButton, { as: react_1.Button, rounded: "full", variant: "link", cursor: "pointer", minW: 0, flexShrink: 0, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "sm", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsx)(react_1.MenuList, { alignItems: "center", zIndex: 5, p: 0, py: "0.375rem",
52
52
  // Without a cap one long title stretches the whole dropdown; titles truncate instead.
53
53
  maxW: "18rem", bg: theme.colors.backgroundColor.light,
54
54
  // Chakra's MenuItem renders `background: var(--menu-bg)` at rest; its MenuList
55
55
  // baseStyle hardcodes that var to "#fff" (gated behind `_dark`, which this theme-swap
56
56
  // app never triggers). The `bg` prop above only recolors the list itself, not the
57
57
  // inherited var, so items fall back to white until hover/focus — set the var too.
58
- 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: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [(0, jsx_runtime_1.jsx)(react_1.Center, { pt: 4, pb: 2, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "xl", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsxs)(react_1.Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.border[500] }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
58
+ sx: { "--menu-bg": theme.colors.backgroundColor.light }, borderRadius: "xl", boxShadow: "lg", color: theme.colors.text[900], overflow: "hidden", children: (0, jsx_runtime_1.jsxs)(react_1.Box, { display: "flex", flexDirection: "column", maxH: "90vh", children: [(0, jsx_runtime_1.jsx)(react_1.Center, { pt: 4, pb: 2, children: (0, jsx_runtime_1.jsx)(react_1.Avatar, { size: "xl", name: userName, src: userAvathar }) }), (0, jsx_runtime_1.jsxs)(react_1.Center, { flexDirection: "column", gap: "0.125rem", pb: 2, px: 4, children: [(0, jsx_runtime_1.jsx)(react_1.Text, { fontWeight: 600, fontSize: "14px", color: theme.colors.text[900], isTruncated: true, maxW: "100%", children: userName }), userRole && ((0, jsx_runtime_1.jsx)(react_1.Text, { fontSize: "11px", color: theme.colors.text[500], isTruncated: true, maxW: "100%", children: userRole }))] }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsx)(react_1.Box, { flex: 1, overflowY: "auto", overflowX: "hidden", children: navMenu === null || navMenu === void 0 ? void 0 : navMenu.map((menu, idx) => {
59
59
  var _a, _b, _c, _d;
60
60
  return ((0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: () => handleNavOnClick(menu.url), sx: menuItemStyle, children: [menu.icon && ((0, jsx_runtime_1.jsx)(react_1.Box, { display: "flex", alignItems: "center", flexShrink: 0, sx: { "& svg": { width: "16px", height: "16px" } }, children: menu === null || menu === void 0 ? void 0 : menu.icon })), (0, jsx_runtime_1.jsx)(react_1.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}`));
61
- }) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.border[500] }), (0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: handleLogout, sx: {
61
+ }) }), (0, jsx_runtime_1.jsx)(react_1.MenuDivider, { borderColor: theme.colors.boxborder[200] }), (0, jsx_runtime_1.jsxs)(react_1.MenuItem, { onClick: handleLogout, sx: {
62
62
  ...menuItemStyle,
63
63
  color: theme.colors.semanticText.error,
64
64
  _hover: { bg: dangerTone.bg, color: dangerTone.fg },
@@ -6,6 +6,7 @@ const react_1 = require("react");
6
6
  const react_2 = require("@chakra-ui/react");
7
7
  const lucide_react_1 = require("lucide-react");
8
8
  const useCustomTheme_1 = require("../../Theme/useCustomTheme");
9
+ const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
9
10
  const fieldStyles_1 = require("../Common/fieldStyles");
10
11
  const countWords = (text = "") => {
11
12
  const t = text.trim();
@@ -122,9 +123,10 @@ function NoteTextArea({ width = "100%", handleSubmit, handleCancel, value, title
122
123
  setTitleShow(false);
123
124
  setTitleValue(e.target.value);
124
125
  }, 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: {
125
- fontStyle: "italic",
126
- color: theme.colors.textMuted,
127
- } }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: (0, jsx_runtime_1.jsx)(react_2.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 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { px: 3, py: 2.5, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.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: (0, jsx_runtime_1.jsx)(lucide_react_1.Paperclip, { size: 16 }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? ((0, jsx_runtime_1.jsx)(react_2.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" })) : ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), (0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), (0, jsx_runtime_1.jsx)("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
126
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
127
+ } }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] })] })), (0, jsx_runtime_1.jsx)(react_2.Box, { bg: theme.colors.background[50], minH: "76px", px: 3, pt: 2.5, position: "relative", children: (0, jsx_runtime_1.jsx)(react_2.Textarea, { ref: noteAreaRef, value: noteValue, onChange: handleNoteChange, placeholder: customPlaceholder, variant: "unstyled", resize: "none", minH: "76px", fontSize: "0.75rem", color: theme.colors.text[700], _placeholder: {
128
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
129
+ }, style: { overflow: "hidden" }, p: 0 }) })] }), (0, jsx_runtime_1.jsx)(react_2.Divider, { borderColor: theme.colors.gray[200] }), (0, jsx_runtime_1.jsxs)(react_2.Box, { px: 3, py: 2.5, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", justify: "space-between", w: "100%", gap: 3, children: [(0, jsx_runtime_1.jsxs)(react_2.Flex, { align: "center", gap: 2, minW: 0, children: [(0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: "Attach files", hasArrow: true, placement: "top", children: (0, jsx_runtime_1.jsx)(react_2.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: (0, jsx_runtime_1.jsx)(lucide_react_1.Paperclip, { size: 16 }) }) }), (0, jsx_runtime_1.jsx)(react_2.Box, { h: "1rem", w: "1px", bg: theme.colors.gray[200] }), !titleShow ? ((0, jsx_runtime_1.jsx)(react_2.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" })) : ((0, jsx_runtime_1.jsx)(react_2.Tooltip, { label: titleValue, hasArrow: true, isDisabled: !titleValue, children: (0, jsx_runtime_1.jsx)(react_2.Text, { color: theme.colors.textMuted, fontSize: "sm", fontWeight: 500, isTruncated: true, maxW: "180px", children: titleValue || "Title" }) }))] }), (0, jsx_runtime_1.jsxs)(react_2.Flex, { gap: 2.5, align: "center", ml: "auto", flexShrink: 0, children: [(0, jsx_runtime_1.jsxs)(react_2.Text, { fontSize: "xs", fontWeight: 500, color: isOverLimit ? theme.colors.semanticText.error : theme.colors.textMuted, whiteSpace: "nowrap", children: [noteWordCount, "/", maxNoteWordCount] }), cancelButtonHide ? null : ((0, jsx_runtime_1.jsx)(react_2.Button, { size: "sm", variant: "ghost", colorScheme: "gray", onClick: handleCloseTextArea, children: "Cancel" })), (0, jsx_runtime_1.jsxs)(react_2.Button, { size: "sm", variant: "solid", isLoading: !!saveButtonLoading, isDisabled: !noteValue || isSaveDisabled, onClick: () => handleSubmit(noteValue, titleValue, files), children: [saveButtonLoading ? ((0, jsx_runtime_1.jsx)(react_2.Spinner, { size: "xs", thickness: "2px", mr: 2 })) : null, "Save"] })] })] }), (0, jsx_runtime_1.jsx)("input", { id: "file-upload", type: "file", style: { display: "none" }, onChange: (e) => {
128
130
  const newFiles = Array.from(e.target.files || []);
129
131
  const validFiles = newFiles.filter((f) => f.size <= maxFileSize);
130
132
  const invalidFiles = newFiles.filter((f) => f.size > maxFileSize);
@@ -5,6 +5,8 @@ const react_1 = require("@chakra-ui/react");
5
5
  const react_2 = require("react");
6
6
  const FormLabel_1 = require("../Common/FormLabel");
7
7
  const NumberInput = (0, react_2.forwardRef)(function NumberInput({ defaultValue, min, max, precision, step, clampValueOnBlur, keepWithinRange, value, onChange, onBlur, name, size, maxW, allowMouseWheel, NumberIncrementStepperBg, NumberIncrementStepperActive, NumberIncrementStepperChildren, NumberDecrementStepperBg, NumberDecrementStepperChildren, NumberDecrementStepperActive, label, isInformation, informationMessage, isRequired, id, width = "100%", minW, ...props }, ref) {
8
- return ((0, jsx_runtime_1.jsxs)(react_1.FormControl, { w: width, minW: minW, maxW: maxW, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: id, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_1.NumberInput, { defaultValue: defaultValue, min: min, max: max, step: step, precision: precision, clampValueOnBlur: clampValueOnBlur, keepWithinRange: keepWithinRange, value: value, onChange: onChange, onBlur: onBlur, name: name, size: size, maxW: maxW, allowMouseWheel: allowMouseWheel, ...props, children: [(0, jsx_runtime_1.jsx)(react_1.NumberInputField, { ref: ref }), (0, jsx_runtime_1.jsxs)(react_1.NumberInputStepper, { children: [(0, jsx_runtime_1.jsx)(react_1.NumberIncrementStepper, { bg: NumberIncrementStepperBg, _active: NumberIncrementStepperActive, children: NumberIncrementStepperChildren }), (0, jsx_runtime_1.jsx)(react_1.NumberDecrementStepper, { bg: NumberDecrementStepperBg, _active: NumberDecrementStepperActive, children: NumberDecrementStepperChildren })] })] })] }));
8
+ const generatedId = (0, react_2.useId)();
9
+ const resolvedId = id !== null && id !== void 0 ? id : generatedId;
10
+ return ((0, jsx_runtime_1.jsxs)(react_1.FormControl, { w: width, minW: minW, maxW: maxW, id: resolvedId, isRequired: isRequired, children: [label && ((0, jsx_runtime_1.jsx)(FormLabel_1.TextLabel, { label: label, id: resolvedId, isInformation: isInformation, informationMessage: informationMessage, isRequired: isRequired })), (0, jsx_runtime_1.jsxs)(react_1.NumberInput, { defaultValue: defaultValue, min: min, max: max, step: step, precision: precision, clampValueOnBlur: clampValueOnBlur, keepWithinRange: keepWithinRange, value: value, onChange: onChange, onBlur: onBlur, name: name, size: size, maxW: maxW, allowMouseWheel: allowMouseWheel, ...props, children: [(0, jsx_runtime_1.jsx)(react_1.NumberInputField, { ref: ref }), (0, jsx_runtime_1.jsxs)(react_1.NumberInputStepper, { children: [(0, jsx_runtime_1.jsx)(react_1.NumberIncrementStepper, { bg: NumberIncrementStepperBg, _active: NumberIncrementStepperActive, children: NumberIncrementStepperChildren }), (0, jsx_runtime_1.jsx)(react_1.NumberDecrementStepper, { bg: NumberDecrementStepperBg, _active: NumberDecrementStepperActive, children: NumberDecrementStepperChildren })] })] })] }));
9
11
  });
10
12
  exports.default = NumberInput;
@@ -1,8 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.NumberInput = void 0;
4
+ const placeholderInk_1 = require("../../Theme/tokens/builders/placeholderInk");
4
5
  exports.NumberInput = {
5
- baseStyle: {
6
+ baseStyle: ({ theme }) => ({
6
7
  field: {
7
8
  fontWeight: 500,
8
9
  fontSize: "0.875rem",
@@ -12,10 +13,10 @@ exports.NumberInput = {
12
13
  borderRadius: "lg",
13
14
  transition: "border-color 0.2s, box-shadow 0.2s",
14
15
  _placeholder: {
15
- fontStyle: "italic",
16
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
16
17
  },
17
18
  },
18
- },
19
+ }),
19
20
  sizes: {
20
21
  md: {
21
22
  field: {
@@ -38,7 +39,7 @@ exports.NumberInput = {
38
39
  border: "0.063rem solid",
39
40
  borderColor,
40
41
  _placeholder: {
41
- color: theme.colors.textMuted,
42
+ color: (0, placeholderInk_1.placeholderInk)(theme.colors),
42
43
  },
43
44
  _hover: {
44
45
  borderColor: primary,
@@ -0,0 +1,6 @@
1
+ export { Box, Flex, Stack, VStack, HStack, Grid, GridItem, SimpleGrid, Wrap, WrapItem, Center, Spacer, Container, Divider, Text, Heading, Link, Image, Icon, Avatar, AvatarGroup, Badge, Spinner, Alert, AlertIcon, AlertTitle, AlertDescription, Portal, Collapse, Show, Hide, List, ListItem, ListIcon, OrderedList, UnorderedList, Tabs, TabList, Tab, TabPanels, TabPanel, Popover, PopoverTrigger, PopoverContent, PopoverBody, PopoverHeader, PopoverFooter, PopoverArrow, PopoverCloseButton, FormControl, FormLabel, FormErrorMessage, FormHelperText, IconButton, TableContainer, Thead, Tbody, Tfoot, Tr, Th, Td, Menu, MenuButton, MenuList, MenuItem, MenuGroup, MenuDivider, MenuOptionGroup, MenuItemOption, Accordion, AccordionItem, AccordionButton, AccordionPanel, AccordionIcon, SliderTrack, SliderFilledTrack, SliderThumb, SliderMark, ChakraProvider, extendTheme, useDisclosure, useMediaQuery, useToken, useBreakpointValue, } from "@chakra-ui/react";
2
+ export { Table as TableRoot, Slider as RangeSlider } from "@chakra-ui/react";
3
+ export type { BoxProps, FlexProps, StackProps, TextProps, HeadingProps, GridProps, GridItemProps, SimpleGridProps, AvatarProps, BadgeProps, IconProps, LinkProps, ImageProps, SpinnerProps, DividerProps, ContainerProps, IconButtonProps, FormControlProps, FormLabelProps, TabsProps, PopoverProps, ListProps, AlertProps, MenuProps, AccordionProps, } from "@chakra-ui/react";
4
+ export { Input, Textarea, Progress, Radio, RadioGroup, Skeleton, ModalOverlay, ModalContent, ModalCloseButton, CardBody, } from "@chakra-ui/react";
5
+ export { Card as ChakraCard, Select as ChakraSelect, Modal as ChakraModal, ModalBody as ChakraModalBody, ModalHeader as ChakraModalHeader, ModalFooter as ChakraModalFooter, } from "@chakra-ui/react";
6
+ export type { InputProps, TextareaProps, ProgressProps, RadioProps, SkeletonProps as ChakraSkeletonProps, SelectProps as ChakraSelectProps, ModalProps as ChakraModalProps, CardProps as ChakraCardProps, } from "@chakra-ui/react";