@flikk/ui 1.0.0-beta.21 → 1.0.0-beta.22

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 (177) hide show
  1. package/dist/components/ai/CodeBlock/CodeBlock.theme.js +2 -2
  2. package/dist/components/ai/PromptInput/PromptInput.theme.js +3 -3
  3. package/dist/components/ai/PromptSuggestions/PromptSuggestion.theme.js +1 -1
  4. package/dist/components/ai/StreamingResponse/StreamingResponse.theme.js +4 -4
  5. package/dist/components/ai/TokenCounter/TokenCounter.theme.js +6 -6
  6. package/dist/components/charts/ActivityRings/ActivityRings.theme.js +2 -2
  7. package/dist/components/charts/DonutChart/DonutChart.theme.js +2 -2
  8. package/dist/components/charts/DonutChart/MultiSegmentDonutChart.theme.js +1 -1
  9. package/dist/components/charts/Heatmap/Heatmap.theme.js +1 -1
  10. package/dist/components/charts/RadarChart/RadarChart.theme.js +2 -2
  11. package/dist/components/charts/ScatterPlot/ScatterPlot.theme.js +2 -2
  12. package/dist/components/charts/shared/ChartText/ChartText.theme.js +1 -1
  13. package/dist/components/charts/shared/ChartTooltip/ChartTooltip.theme.js +4 -4
  14. package/dist/components/core/Alert/Alert.theme.js +1 -1
  15. package/dist/components/core/Avatar/Avatar.theme.js +10 -10
  16. package/dist/components/core/AvatarGroup/AvatarGroup.theme.js +1 -1
  17. package/dist/components/core/Badge/Badge.js +2 -12
  18. package/dist/components/core/Badge/Badge.theme.js +2 -2
  19. package/dist/components/core/Button/Button.theme.js +6 -6
  20. package/dist/components/core/ButtonGroup/ButtonGroup.theme.js +1 -1
  21. package/dist/components/core/Calendar/Calendar.theme.js +5 -5
  22. package/dist/components/core/Card/Card.theme.js +2 -2
  23. package/dist/components/core/CommandPalette/CommandPalette.theme.js +4 -4
  24. package/dist/components/core/Drawer/Drawer.animations.js +5 -4
  25. package/dist/components/core/Drawer/Drawer.theme.js +2 -2
  26. package/dist/components/core/Dropdown/Dropdown.theme.js +1 -1
  27. package/dist/components/core/Empty/Empty.theme.js +2 -2
  28. package/dist/components/core/Icon/Icon.d.ts +3 -0
  29. package/dist/components/core/Icon/Icon.js +70 -0
  30. package/dist/components/core/Icon/Icon.theme.d.ts +2 -0
  31. package/dist/components/core/Icon/Icon.theme.js +19 -0
  32. package/dist/components/core/Icon/Icon.types.d.ts +32 -0
  33. package/dist/components/core/{FileTypeIcon → Icon/data}/fileTypes.d.ts +1 -1
  34. package/dist/components/core/Icon/data/paymentMethods.d.ts +27 -0
  35. package/dist/components/core/Icon/data/paymentMethods.js +169 -0
  36. package/dist/components/core/Icon/index.d.ts +4 -0
  37. package/dist/components/core/Kbd/Kbd.theme.js +2 -2
  38. package/dist/components/core/MenuItem/MenuItem.theme.js +2 -2
  39. package/dist/components/core/Message/Message.theme.js +6 -6
  40. package/dist/components/core/Modal/Modal.animations.js +3 -1
  41. package/dist/components/core/Modal/Modal.theme.js +2 -2
  42. package/dist/components/core/Modal/ModalBody.js +7 -8
  43. package/dist/components/core/NavItem/NavItem.theme.js +1 -1
  44. package/dist/components/core/OfflineIndicator/OfflineIndicator.theme.js +2 -2
  45. package/dist/components/core/PageHeading/PageHeading.theme.js +2 -2
  46. package/dist/components/core/Pagination/Pagination.theme.js +2 -2
  47. package/dist/components/core/Pill/Pill.theme.js +3 -3
  48. package/dist/components/core/Progress/Progress.theme.js +2 -2
  49. package/dist/components/core/Segmented/Segmented.theme.js +3 -3
  50. package/dist/components/core/Tabs/Tabs.theme.js +2 -2
  51. package/dist/components/core/Tag/Tag.theme.js +2 -2
  52. package/dist/components/core/Toast/Toast.theme.js +2 -2
  53. package/dist/components/core/Tooltip/Tooltip.theme.js +1 -1
  54. package/dist/components/core/Tree/Tree.theme.js +1 -1
  55. package/dist/components/core/index.d.ts +1 -2
  56. package/dist/components/core/index.js +2 -2
  57. package/dist/components/data-display/DescriptionList/DescriptionList.theme.js +2 -2
  58. package/dist/components/data-display/Feed/Feed.theme.js +1 -1
  59. package/dist/components/data-display/GanttChart/GanttChart.theme.js +2 -2
  60. package/dist/components/data-display/KPI/KPI.theme.js +9 -9
  61. package/dist/components/data-display/Metric/Metric.theme.js +9 -9
  62. package/dist/components/data-display/Table/Table.animations.js +16 -10
  63. package/dist/components/data-display/Table/Table.filterUtils.js +8 -1
  64. package/dist/components/data-display/Table/Table.js +10 -14
  65. package/dist/components/data-display/Table/Table.theme.js +3 -3
  66. package/dist/components/data-display/Table/Table.types.d.ts +2 -0
  67. package/dist/components/data-display/Table/TableActions.js +3 -3
  68. package/dist/components/data-display/Table/TableActionsMenu.js +2 -3
  69. package/dist/components/data-display/Table/TableCell.js +6 -3
  70. package/dist/components/data-display/Table/TableDeclarative.js +5 -7
  71. package/dist/components/data-display/Table/TableHeader.js +5 -2
  72. package/dist/components/data-display/Table/TablePagination.js +2 -6
  73. package/dist/components/data-display/Table/TableRow.js +2 -6
  74. package/dist/components/data-display/Table/index.js +1 -0
  75. package/dist/components/effects/CustomCursor/CustomCursor.theme.js +1 -1
  76. package/dist/components/effects/Overlay/Overlay.js +50 -21
  77. package/dist/components/forms/Checkbox/Checkbox.theme.js +3 -3
  78. package/dist/components/forms/ColorPicker/ColorPicker.d.ts +5 -9
  79. package/dist/components/forms/ColorPicker/ColorPicker.js +126 -22
  80. package/dist/components/forms/ColorPicker/ColorPicker.theme.js +9 -6
  81. package/dist/components/forms/ColorPicker/ColorPicker.types.d.ts +99 -0
  82. package/dist/components/forms/ColorPicker/ColorPicker2DCanvas.js +43 -6
  83. package/dist/components/forms/ColorPicker/ColorPickerBody.js +1 -1
  84. package/dist/components/forms/ColorPicker/ColorPickerContext.d.ts +4 -0
  85. package/dist/components/forms/ColorPicker/ColorPickerContext.js +12 -0
  86. package/dist/components/forms/ColorPicker/ColorPickerEyeDropper.js +1 -1
  87. package/dist/components/forms/ColorPicker/ColorPickerFormatSelector.js +1 -1
  88. package/dist/components/forms/ColorPicker/ColorPickerGradient.d.ts +7 -0
  89. package/dist/components/forms/ColorPicker/ColorPickerGradient.js +186 -0
  90. package/dist/components/forms/ColorPicker/ColorPickerHeader.d.ts +14 -0
  91. package/dist/components/forms/ColorPicker/ColorPickerHeader.js +31 -0
  92. package/dist/components/forms/ColorPicker/ColorPickerImage.d.ts +6 -0
  93. package/dist/components/forms/ColorPicker/ColorPickerImage.js +154 -0
  94. package/dist/components/forms/ColorPicker/ColorPickerInput.d.ts +0 -4
  95. package/dist/components/forms/ColorPicker/ColorPickerInput.js +53 -61
  96. package/dist/components/forms/ColorPicker/ColorPickerPresets.js +13 -12
  97. package/dist/components/forms/ColorPicker/ColorPickerSavedColors.d.ts +3 -0
  98. package/dist/components/forms/ColorPicker/ColorPickerSavedColors.js +69 -0
  99. package/dist/components/forms/ColorPicker/ColorPickerSliders.d.ts +1 -2
  100. package/dist/components/forms/ColorPicker/ColorPickerSliders.js +84 -23
  101. package/dist/components/forms/ColorPicker/ColorPickerSwatch.d.ts +1 -1
  102. package/dist/components/forms/ColorPicker/ColorPickerSwatch.js +10 -9
  103. package/dist/components/forms/ColorPicker/ColorPickerTrigger.js +7 -3
  104. package/dist/components/forms/ColorPicker/index.d.ts +8 -2
  105. package/dist/components/forms/CronInput/CronInput.theme.js +8 -8
  106. package/dist/components/forms/DatePicker/DatePicker.theme.js +1 -1
  107. package/dist/components/forms/DateRangePicker/DateRangePicker.theme.js +3 -3
  108. package/dist/components/forms/FileUpload/FileUpload.theme.js +4 -4
  109. package/dist/components/forms/FileUpload/FileUploadProgress.js +3 -3
  110. package/dist/components/forms/FileUpload/FileUploadProgress.theme.js +2 -2
  111. package/dist/components/forms/FormLabel/FormLabel.theme.js +1 -1
  112. package/dist/components/forms/Input/Input.js +3 -3
  113. package/dist/components/forms/Input/Input.theme.js +1 -1
  114. package/dist/components/forms/Input/Input.types.d.ts +2 -0
  115. package/dist/components/forms/InputCounter/InputCounter.theme.js +1 -1
  116. package/dist/components/forms/InputOTP/InputOTP.theme.js +1 -1
  117. package/dist/components/forms/Mention/Mention.theme.js +3 -3
  118. package/dist/components/forms/Radio/Radio.theme.js +3 -3
  119. package/dist/components/forms/RichTextEditor/RichTextEditor.theme.js +1 -1
  120. package/dist/components/forms/Select/Select.theme.js +1 -1
  121. package/dist/components/forms/SelectableCard/SelectableCard.js +42 -27
  122. package/dist/components/forms/SelectableCard/SelectableCard.theme.js +15 -25
  123. package/dist/components/forms/SelectableCard/SelectableCard.types.d.ts +16 -3
  124. package/dist/components/forms/SelectableCard/SelectableCardContext.d.ts +1 -0
  125. package/dist/components/forms/SelectableCard/SelectableCardContext.js +4 -7
  126. package/dist/components/forms/SelectableCard/SelectableCardGroup.js +31 -10
  127. package/dist/components/forms/SelectableCard/index.d.ts +1 -1
  128. package/dist/components/forms/Signature/Signature.theme.js +1 -1
  129. package/dist/components/forms/Slider/Slider.theme.js +3 -3
  130. package/dist/components/forms/Switch/Switch.theme.js +1 -1
  131. package/dist/components/forms/TimePicker/TimePicker.theme.js +2 -2
  132. package/dist/components/forms/forms.theme.js +6 -6
  133. package/dist/components/forms/index.js +6 -1
  134. package/dist/components/layout/FormLayout/FormLayout.theme.js +2 -2
  135. package/dist/hooks/useOverlay.d.ts +2 -0
  136. package/dist/hooks/useOverlay.js +34 -4
  137. package/dist/index.js +8 -3
  138. package/dist/styles.css +1 -1
  139. package/package.json +2 -1
  140. package/src/global.scss +1 -1
  141. package/dist/bg/bg/1.jpg +0 -0
  142. package/dist/bg/bg/10.jpg +0 -0
  143. package/dist/bg/bg/11.jpg +0 -0
  144. package/dist/bg/bg/14.jpg +0 -0
  145. package/dist/bg/bg/15.jpg +0 -0
  146. package/dist/bg/bg/16.jpg +0 -0
  147. package/dist/bg/bg/17.jpg +0 -0
  148. package/dist/bg/bg/18.jpg +0 -0
  149. package/dist/bg/bg/19.jpg +0 -0
  150. package/dist/bg/bg/2.jpg +0 -0
  151. package/dist/bg/bg/20.jpg +0 -0
  152. package/dist/bg/bg/21.jpg +0 -0
  153. package/dist/bg/bg/22.jpg +0 -0
  154. package/dist/bg/bg/23.jpg +0 -0
  155. package/dist/bg/bg/24.jpg +0 -0
  156. package/dist/bg/bg/3.jpg +0 -0
  157. package/dist/bg/bg/4.jpg +0 -0
  158. package/dist/bg/bg/5.jpg +0 -0
  159. package/dist/bg/bg/6.jpg +0 -0
  160. package/dist/bg/bg/7.jpg +0 -0
  161. package/dist/bg/bg/8.jpg +0 -0
  162. package/dist/bg/bg/9.jpg +0 -0
  163. package/dist/components/core/FileTypeIcon/FileTypeIcon.d.ts +0 -3
  164. package/dist/components/core/FileTypeIcon/FileTypeIcon.js +0 -33
  165. package/dist/components/core/FileTypeIcon/FileTypeIcon.theme.d.ts +0 -2
  166. package/dist/components/core/FileTypeIcon/FileTypeIcon.theme.js +0 -12
  167. package/dist/components/core/FileTypeIcon/FileTypeIcon.types.d.ts +0 -19
  168. package/dist/components/core/FileTypeIcon/index.d.ts +0 -2
  169. package/dist/components/core/SocialIcon/SocialIcon.d.ts +0 -3
  170. package/dist/components/core/SocialIcon/SocialIcon.js +0 -30
  171. package/dist/components/core/SocialIcon/SocialIcon.theme.d.ts +0 -2
  172. package/dist/components/core/SocialIcon/SocialIcon.theme.js +0 -12
  173. package/dist/components/core/SocialIcon/SocialIcon.types.d.ts +0 -18
  174. package/dist/components/core/SocialIcon/index.d.ts +0 -2
  175. /package/dist/components/core/{FileTypeIcon → Icon/data}/fileTypes.js +0 -0
  176. /package/dist/components/core/{SocialIcon → Icon/data}/platforms.d.ts +0 -0
  177. /package/dist/components/core/{SocialIcon → Icon/data}/platforms.js +0 -0
@@ -1,3 +1,9 @@
1
+ const EASE = [0.04, 0.62, 0.23, 0.98];
2
+ // Expand is slightly slower than collapse — feels more intentional
3
+ const EXPAND_DURATION = 0.32;
4
+ const COLLAPSE_DURATION = 0.25;
5
+ const CONTENT_DURATION = 0.22;
6
+ const CONTENT_EXPAND_DELAY = 0.08;
1
7
  /**
2
8
  * Container animation for row expansion (height: 0 -> auto with opacity)
3
9
  * Uses the same easing curve pattern as Accordion for consistency
@@ -7,16 +13,16 @@ const tableExpandAnimations = {
7
13
  height: 0,
8
14
  opacity: 0,
9
15
  transition: {
10
- height: { duration: 0.3, ease: [0.04, 0.62, 0.23, 0.98] },
11
- opacity: { duration: 0.25 },
16
+ height: { duration: COLLAPSE_DURATION, ease: EASE },
17
+ opacity: { duration: COLLAPSE_DURATION },
12
18
  },
13
19
  },
14
20
  expanded: {
15
21
  height: 'auto',
16
22
  opacity: 1,
17
23
  transition: {
18
- height: { duration: 0.4, ease: [0.04, 0.62, 0.23, 0.98] },
19
- opacity: { duration: 0.3, delay: 0.1 },
24
+ height: { duration: EXPAND_DURATION, ease: EASE },
25
+ opacity: { duration: EXPAND_DURATION, delay: CONTENT_EXPAND_DELAY },
20
26
  },
21
27
  },
22
28
  };
@@ -26,19 +32,19 @@ const tableExpandAnimations = {
26
32
  const tableExpandContentAnimations = {
27
33
  collapsed: {
28
34
  opacity: 0,
29
- y: -10,
35
+ y: -8,
30
36
  transition: {
31
- y: { duration: 0.2 },
32
- opacity: { duration: 0.2 },
37
+ y: { duration: CONTENT_DURATION },
38
+ opacity: { duration: CONTENT_DURATION },
33
39
  },
34
40
  },
35
41
  expanded: {
36
42
  opacity: 1,
37
43
  y: 0,
38
44
  transition: {
39
- delay: 0.15,
40
- y: { duration: 0.3 },
41
- opacity: { duration: 0.3 },
45
+ delay: CONTENT_EXPAND_DELAY,
46
+ y: { duration: CONTENT_DURATION },
47
+ opacity: { duration: CONTENT_DURATION },
42
48
  },
43
49
  },
44
50
  };
@@ -242,13 +242,20 @@ function filterData(data, columns, filters, logic = 'and') {
242
242
  return data;
243
243
  // Build a column lookup for quick access
244
244
  const columnMap = new Map(columns.map((col) => [col.id, col]));
245
+ // Pre-compute filter type per filter — inferFilterType samples the full dataset,
246
+ // so calling it inside the row loop is O(n × filters × n). Hoist it out.
247
+ const filterTypeMap = new Map(activeFilters.map((filter) => {
248
+ const column = columnMap.get(filter.columnId);
249
+ return [filter.columnId, column ? inferFilterType(column, data) : 'text'];
250
+ }));
245
251
  return data.filter((row) => {
246
252
  const results = activeFilters.map((filter) => {
253
+ var _a;
247
254
  const column = columnMap.get(filter.columnId);
248
255
  if (!column)
249
256
  return true;
250
257
  const cellValue = getCellValue(row, column);
251
- const filterType = inferFilterType(column, data);
258
+ const filterType = (_a = filterTypeMap.get(filter.columnId)) !== null && _a !== void 0 ? _a : 'text';
252
259
  return evaluateFilter(cellValue, filter, filterType);
253
260
  });
254
261
  return logic === 'and'
@@ -93,26 +93,21 @@ function TableComponent(props) {
93
93
  observer.observe(container);
94
94
  return () => observer.disconnect();
95
95
  }, []);
96
- // Merge global theme with component-specific overrides
97
- // When the table overflows, add backdrop-blur + shadow to frozen columns
98
- const theme = useMemo(() => {
99
- const merged = {
100
- ...tableTheme,
101
- ...(themeOverrides || {}),
102
- };
103
- if (isOverflowing) {
104
- const overflowBg = "backdrop-blur-sm bg-black/5 dark:bg-white/5";
105
- merged.frozenColumnStyle = cn(merged.frozenColumnStyle, overflowBg, "shadow-l-xl");
106
- merged.lastFrozenColumnStyle = cn(merged.lastFrozenColumnStyle, overflowBg, "shadow-r-xl");
107
- }
108
- return merged;
109
- }, [themeOverrides, isOverflowing]);
96
+ // Merge global theme with component-specific overrides.
97
+ // isOverflowing is intentionally excluded it changes on every resize event and
98
+ // would invalidate the context memo, causing all cells to re-render. Instead,
99
+ // isOverflowing is passed separately in context and applied in TableCell.
100
+ const theme = useMemo(() => ({
101
+ ...tableTheme,
102
+ ...(themeOverrides || {}),
103
+ }), [themeOverrides]);
110
104
  // Get base classes from theme
111
105
  const baseClasses = theme.baseStyle || "";
112
106
  const variantClasses = ((_a = theme.variants) === null || _a === void 0 ? void 0 : _a[variant]) || "";
113
107
  // Memoize context value to prevent unnecessary re-renders in consumers
114
108
  const contextValue = useMemo(() => ({
115
109
  theme,
110
+ isOverflowing,
116
111
  variant,
117
112
  freezeHeader,
118
113
  freezeFirstColumn,
@@ -133,6 +128,7 @@ function TableComponent(props) {
133
128
  onSelectionChange,
134
129
  }), [
135
130
  theme,
131
+ isOverflowing,
136
132
  variant,
137
133
  freezeHeader,
138
134
  freezeFirstColumn,
@@ -3,7 +3,7 @@ const tableTheme = {
3
3
  // Uses border-separate so sticky cells keep their borders (border-collapse
4
4
  // paints borders on the table grid, which sticky cells float above)
5
5
  // Light: white background | Dark: neutral-900 background
6
- baseStyle: "w-full border-separate border-spacing-0 text-base " + "",
6
+ baseStyle: "w-full border-separate border-spacing-0 text-sm",
7
7
  // Variant styles
8
8
  // Each variant gets dark mode border colors and alternate row colors
9
9
  variants: {
@@ -23,7 +23,7 @@ const tableTheme = {
23
23
  // Header styles
24
24
  // Light: primary text, light border | Dark: neutral-200 text, neutral-700 border
25
25
  headerStyle: "text-left font-semibold sticky top-0 border-b first:pl-4 last:pr-4 " +
26
- "text-[var(--color-text-secondary)]/80 text-base border-[var(--color-border)] ",
26
+ "text-[var(--color-text-secondary)]/80 text-sm border-[var(--color-border)] ",
27
27
  // Cell styles — borders on cells (not rows) so sticky columns keep them
28
28
  // Light: primary text | Dark: neutral-300 text
29
29
  cellStyle: "border-b border-b-[var(--color-border)] first:pl-4 last:pr-4 " +
@@ -46,7 +46,7 @@ const tableTheme = {
46
46
  "dark:shadow-[var(--color-neutral-900)]/50",
47
47
  // Utility controls - Column manager button
48
48
  // Light: white bg with light border | Dark: neutral-800 bg with neutral-600 border
49
- columnManagerButton: "inline-flex items-center gap-2 rounded-[calc(var(--radius-base)*0.75)] px-3 py-2 text-base font-medium " +
49
+ columnManagerButton: "inline-flex items-center gap-2 rounded-[calc(var(--radius-base)*0.75)] px-3 py-2 text-sm font-medium " +
50
50
  "focus:outline-none focus:ring-2 focus:ring-[var(--color-primary-500)] focus:ring-offset-2 " +
51
51
  "dark:focus:ring-offset-[var(--color-neutral-900)] " +
52
52
  "bg-white border border-[var(--color-neutral-300)] text-[var(--color-text-primary)] hover:bg-[var(--color-neutral-50)] " +
@@ -111,6 +111,8 @@ export interface TableThemeOverrides {
111
111
  export interface TableContextType {
112
112
  theme: TableThemeOverrides;
113
113
  variant: TableVariant;
114
+ /** Whether the scroll container is horizontally overflowing — used to apply frozen column backdrop styles */
115
+ isOverflowing?: boolean;
114
116
  freezeHeader?: boolean;
115
117
  freezeFirstColumn?: boolean;
116
118
  freezeLastColumn?: boolean;
@@ -1,5 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import { useMemo } from 'react';
2
+ import { useMemo, useCallback } from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { Dropdown } from '../../core/Dropdown/Dropdown.js';
5
5
  import '../../core/Dropdown/DropdownTrigger.js';
@@ -31,13 +31,13 @@ const TableActions = ({ actions, row, maxVisibleActions = 2, className, }) => {
31
31
  .filter((action) => { var _a; return (_a = action.disabled) === null || _a === void 0 ? void 0 : _a.call(action, row); })
32
32
  .map((action) => action.id);
33
33
  }, [sortedActions, row]);
34
- const handleAction = (key) => {
34
+ const handleAction = useCallback((key) => {
35
35
  var _a;
36
36
  const action = sortedActions.find((a) => a.id === key);
37
37
  if (action && !((_a = action.disabled) === null || _a === void 0 ? void 0 : _a.call(action, row))) {
38
38
  action.onClick(row);
39
39
  }
40
- };
40
+ }, [sortedActions, row]);
41
41
  const renderInlineActions = (actionsToRender) => {
42
42
  return actionsToRender.map((action) => {
43
43
  var _a;
@@ -1,6 +1,7 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { cn } from '../../../utils/cn.js';
3
3
  import 'react';
4
+ import { Button } from '../../core/Button/Button.js';
4
5
 
5
6
  /**
6
7
  * TableActionsMenu component for displaying actions in an overflow menu
@@ -17,9 +18,7 @@ const TableActionsMenu = ({ actions, row, onClose, className, }) => {
17
18
  var _a;
18
19
  const isDisabled = (_a = action.disabled) === null || _a === void 0 ? void 0 : _a.call(action, row);
19
20
  const Icon = action.icon;
20
- return (jsxs("button", { onClick: () => handleActionClick(action), disabled: isDisabled, className: cn("w-full flex items-center gap-3 px-3 py-2 text-base font-medium text-left transition-all duration-300", "hover:bg-[var(--color-background-secondary)] focus:bg-[var(--color-background-secondary)] focus:outline-none rounded-sm cursor-pointer", action.variant === 'danger'
21
- ? "text-[var(--color-danger)] hover:bg-[var(--color-danger-50)] focus:bg-[var(--color-danger-50)]"
22
- : "text-[var(--color-text-primary)]", isDisabled && "opacity-50 cursor-not-allowed hover:bg-transparent"), role: "menuitem", "aria-label": action.label, children: [jsx(Icon, { className: "size-4 flex-shrink-0" }), jsx("span", { children: action.label })] }, action.id));
21
+ return (jsxs(Button, { variant: "ghost", color: action.variant === 'danger' ? 'danger' : 'neutral', size: "sm", onClick: () => handleActionClick(action), disabled: isDisabled, className: "w-full justify-start gap-3", role: "menuitem", "aria-label": action.label, children: [jsx(Icon, { className: "size-4 flex-shrink-0" }), jsx("span", { children: action.label })] }, action.id));
23
22
  }) }));
24
23
  };
25
24
 
@@ -1,7 +1,8 @@
1
1
  import { jsx } from 'react/jsx-runtime';
2
- import React__default from 'react';
2
+ import React__default, { useContext } from 'react';
3
3
  import { cn } from '../../../utils/cn.js';
4
4
  import { UTILITY_COLUMN_ID, alignmentClasses } from './Table.utils.js';
5
+ import { TableContext } from './Table.js';
5
6
 
6
7
  /**
7
8
  * Internal TableCell component used by the data-driven API
@@ -10,11 +11,13 @@ import { UTILITY_COLUMN_ID, alignmentClasses } from './Table.utils.js';
10
11
  * @internal This component is used internally by the Table component
11
12
  */
12
13
  function TableCellComponent({ column, row, rowId, isHeader = false, isFrozen = false, isLastFrozen = false, isSelected = false, theme, children, }) {
14
+ const { isOverflowing } = useContext(TableContext);
15
+ const overflowFrozenStyle = isOverflowing ? "backdrop-blur-sm bg-black/5 dark:bg-white/5" : undefined;
13
16
  const Cell = isHeader ? 'th' : 'td';
14
17
  const isUtilityColumn = column.id === UTILITY_COLUMN_ID;
15
18
  // For header cells, render the column header content
16
19
  if (isHeader) {
17
- const cellClasses = cn(theme === null || theme === void 0 ? void 0 : theme.headerStyle, isFrozen && (theme === null || theme === void 0 ? void 0 : theme.frozenColumnStyle), isLastFrozen && (theme === null || theme === void 0 ? void 0 : theme.lastFrozenColumnStyle), column.align && alignmentClasses[column.align], isUtilityColumn && 'whitespace-nowrap');
20
+ const cellClasses = cn(theme === null || theme === void 0 ? void 0 : theme.headerStyle, isFrozen && (theme === null || theme === void 0 ? void 0 : theme.frozenColumnStyle), isFrozen && overflowFrozenStyle, isLastFrozen && (theme === null || theme === void 0 ? void 0 : theme.lastFrozenColumnStyle), isLastFrozen && overflowFrozenStyle, column.align && alignmentClasses[column.align], isUtilityColumn && 'whitespace-nowrap');
18
21
  return (jsx(Cell, { className: cellClasses, "data-frozen": isFrozen ? 'true' : isLastFrozen ? 'last' : undefined, style: { width: column.width }, role: "columnheader", "aria-label": typeof column.header === 'string' ? column.header : column.id, children: children || column.header }));
19
22
  }
20
23
  // For data cells, extract value using accessor (string key or function)
@@ -29,7 +32,7 @@ function TableCellComponent({ column, row, rowId, isHeader = false, isFrozen = f
29
32
  : column.tooltip
30
33
  ? String(value)
31
34
  : undefined;
32
- const cellClasses = cn(theme === null || theme === void 0 ? void 0 : theme.cellStyle, isFrozen && (theme === null || theme === void 0 ? void 0 : theme.frozenColumnStyle), isLastFrozen && (theme === null || theme === void 0 ? void 0 : theme.lastFrozenColumnStyle), isSelected && "bg-[var(--color-primary-50)]/50 dark:bg-[var(--color-primary-500)]/20", column.align && alignmentClasses[column.align], column.ellipsis && 'truncate', isUtilityColumn && 'whitespace-nowrap');
35
+ const cellClasses = cn(theme === null || theme === void 0 ? void 0 : theme.cellStyle, isFrozen && (theme === null || theme === void 0 ? void 0 : theme.frozenColumnStyle), isFrozen && overflowFrozenStyle, isLastFrozen && (theme === null || theme === void 0 ? void 0 : theme.lastFrozenColumnStyle), isLastFrozen && overflowFrozenStyle, isSelected && "bg-[var(--color-primary-50)]/50 dark:bg-[var(--color-primary-500)]/20", column.align && alignmentClasses[column.align], column.ellipsis && 'truncate', isUtilityColumn && 'whitespace-nowrap');
33
36
  return (jsx(Cell, { className: cellClasses, "data-frozen": isFrozen ? 'true' : isLastFrozen ? 'last' : undefined, style: { width: column.width }, title: tooltipContent, role: "cell", children: children || content }));
34
37
  }
35
38
  TableCellComponent.displayName = 'TableCell';
@@ -3,6 +3,7 @@ import React__default, { useContext } from 'react';
3
3
  import { TableContext } from './Table.js';
4
4
  import { cn } from '../../../utils/cn.js';
5
5
  import { alignmentClasses } from './Table.utils.js';
6
+ import { ChevronUpIcon, ChevronDownIcon } from '@heroicons/react/16/solid';
6
7
 
7
8
  /**
8
9
  * Declarative Table Header component
@@ -32,12 +33,7 @@ const Body = React__default.memo(BodyComponent);
32
33
  const RowComponent = ({ children, isExpandable = false, isExpanded = false, onExpandToggle, isSelected = false, onSelectToggle, className = '', }) => {
33
34
  const { theme } = useContext(TableContext);
34
35
  const rowClasses = cn(theme === null || theme === void 0 ? void 0 : theme.rowStyle, isSelected && (theme === null || theme === void 0 ? void 0 : theme.selectedRowStyle), theme === null || theme === void 0 ? void 0 : theme.hoverRowStyle, className);
35
- const handleRowClick = () => {
36
- if (onSelectToggle) {
37
- onSelectToggle();
38
- }
39
- };
40
- return (jsx("tr", { className: rowClasses, "data-selected": isSelected ? 'true' : undefined, "data-expanded": isExpandable && isExpanded ? 'true' : undefined, onClick: onSelectToggle ? handleRowClick : undefined, role: "row", "aria-selected": isSelected, "aria-expanded": isExpandable ? isExpanded : undefined, children: children }));
36
+ return (jsx("tr", { className: rowClasses, "data-selected": isSelected ? 'true' : undefined, "data-expanded": isExpandable && isExpanded ? 'true' : undefined, onClick: onSelectToggle, role: "row", "aria-selected": isSelected, "aria-expanded": isExpandable ? isExpanded : undefined, children: children }));
41
37
  };
42
38
  RowComponent.displayName = 'Table.Row';
43
39
  const Row = React__default.memo(RowComponent);
@@ -60,7 +56,9 @@ const HeaderCellComponent = ({ children, isFrozen = false, isLastFrozen = false,
60
56
  return (jsx("th", { className: headerCellClasses, "data-frozen": isFrozen ? 'true' : isLastFrozen ? 'last' : undefined, onClick: isSortable && onSort ? onSort : undefined, style: { width }, role: "columnheader", "aria-sort": sortDirection ? (sortDirection === 'asc' ? 'ascending' : 'descending') : undefined, children: jsxs("div", { className: cn("flex items-center", {
61
57
  'justify-end': align === 'right',
62
58
  'justify-center': align === 'center',
63
- }), children: [children, isSortable && sortDirection && (jsx("span", { className: "ml-1", children: sortDirection === 'asc' ? '\u2191' : '\u2193' }))] }) }));
59
+ }), children: [children, isSortable && sortDirection && (jsx("span", { className: "ml-1", children: sortDirection === 'asc'
60
+ ? jsx(ChevronUpIcon, { className: "size-3.5" })
61
+ : jsx(ChevronDownIcon, { className: "size-3.5" }) }))] }) }));
64
62
  };
65
63
  HeaderCellComponent.displayName = 'Table.HeaderCell';
66
64
  const HeaderCell = React__default.memo(HeaderCellComponent);
@@ -3,6 +3,7 @@ import { useCallback } from 'react';
3
3
  import { TableCell } from './TableCell.js';
4
4
  import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
5
5
  import { getRowId, UTILITY_COLUMN_WIDTH, UTILITY_COLUMN_ID } from './Table.utils.js';
6
+ import { ChevronUpIcon, ChevronDownIcon } from '@heroicons/react/16/solid';
6
7
 
7
8
  function TableHeaderComponent({ columns, sortConfig = [], onSortChange, freezeHeader, freezeFirstColumn, freezeLastColumn, expandable, expandedRowRender, selectable, selectionType, selectedRows = [], onSelectionChange, theme, data = [], rowKey, }) {
8
9
  const handleSort = useCallback((columnId) => {
@@ -45,10 +46,12 @@ function TableHeaderComponent({ columns, sortConfig = [], onSortChange, freezeHe
45
46
  header: '',
46
47
  accessor: () => '',
47
48
  width: UTILITY_COLUMN_WIDTH,
48
- }, row: {}, rowId: "", isHeader: true, theme: theme, children: jsx("div", { className: "flex items-center gap-2", children: selectable && selectionType === 'checkbox' && (jsx(Checkbox, { id: "table-select-all", name: "table-select-all", value: "select-all", checked: isAllSelected, indeterminate: isIndeterminate, onChange: handleSelectAll, "aria-label": "Select all rows" })) }) })), columns.map((column, index) => {
49
+ }, row: null, rowId: "", isHeader: true, theme: theme, children: jsx("div", { className: "flex items-center gap-2", children: selectable && selectionType === 'checkbox' && (jsx(Checkbox, { id: "table-select-all", name: "table-select-all", value: "select-all", checked: isAllSelected, indeterminate: isIndeterminate, onChange: handleSelectAll, "aria-label": "Select all rows" })) }) })), columns.map((column, index) => {
49
50
  const currentSort = sortConfig.find(sort => sort.columnId === column.id);
50
51
  const isSortable = column.sortable && onSortChange;
51
- return (jsx(TableCell, { column: column, row: {}, rowId: "header", isHeader: true, isFrozen: freezeFirstColumn && index === 0, isLastFrozen: freezeLastColumn && index === columns.length - 1, theme: theme, children: isSortable ? (jsxs("button", { onClick: () => handleSort(column.id), className: "flex items-center gap-1 w-full text-left hover:text-[var(--color-primary)] transition-colors", "aria-label": `Sort by ${typeof column.header === 'string' ? column.header : column.id}`, children: [column.header, currentSort && (jsx("span", { className: "text-sm", children: currentSort.direction === 'asc' ? '\u2191' : '\u2193' }))] })) : (column.header) }, column.id));
52
+ return (jsx(TableCell, { column: column, row: null, rowId: "header", isHeader: true, isFrozen: freezeFirstColumn && index === 0, isLastFrozen: freezeLastColumn && index === columns.length - 1, theme: theme, children: isSortable ? (jsxs("button", { onClick: () => handleSort(column.id), className: "flex items-center gap-1 w-full text-left hover:text-[var(--color-primary)] transition-colors", "aria-label": `Sort by ${typeof column.header === 'string' ? column.header : column.id}`, children: [column.header, currentSort && (jsx("span", { className: "text-sm", children: currentSort.direction === 'asc'
53
+ ? jsx(ChevronUpIcon, { className: "size-3.5" })
54
+ : jsx(ChevronDownIcon, { className: "size-3.5" }) }))] })) : (column.header) }, column.id));
52
55
  })] }) }));
53
56
  }
54
57
  const TableHeader = TableHeaderComponent;
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
2
- import React__default from 'react';
2
+ import React__default, { useMemo } from 'react';
3
3
  import { Pagination } from '../../core/Pagination/Pagination.js';
4
4
  import { Select } from '../../forms/Select/Select.js';
5
5
  import '../../forms/Select/Select.theme.js';
@@ -13,11 +13,7 @@ const TablePagination = React__default.forwardRef(({ currentPage, totalItems, pa
13
13
  const totalPages = Math.ceil(totalItems / pageSize);
14
14
  const startItem = (currentPage - 1) * pageSize + 1;
15
15
  const endItem = Math.min(currentPage * pageSize, totalItems);
16
- const pageSizeSelectOptions = pageSizeOptions.map((option) => ({
17
- id: option,
18
- label: option.toString(),
19
- value: option,
20
- }));
16
+ const pageSizeSelectOptions = useMemo(() => pageSizeOptions.map((option) => ({ id: option, label: option.toString(), value: option })), [pageSizeOptions]);
21
17
  return (jsxs("div", { ref: ref, className: cn("flex flex-col sm:flex-row items-start sm:items-center justify-between gap-3 px-4 py-3 border-t border-[var(--color-border)] bg-[var(--color-background)]", className), children: [jsxs("div", { className: "flex items-center gap-4", children: [showPageSizeSelector && (jsxs("div", { className: "flex items-center gap-2", children: [jsx("span", { className: "text-base text-[var(--color-text-muted)]", children: "Rows per page:" }), jsx(Select, { value: pageSize, onChange: (value) => onPageSizeChange(value), options: pageSizeSelectOptions, size: "sm", className: "w-20" })] })), jsx("div", { className: "text-base text-[var(--color-text-muted)]", children: totalItems > 0 ? (jsxs(Fragment, { children: ["Showing ", startItem.toLocaleString(), " to ", endItem.toLocaleString(), " of", " ", totalItems.toLocaleString(), " results"] })) : ("No results") })] }), totalPages > 1 && (jsx(Pagination, { currentPage: currentPage, totalPages: totalPages, onPageChange: onPageChange, showPrevNext: true, showFirstLast: false, siblingCount: 1 }))] }));
22
18
  });
23
19
  TablePagination.displayName = "Table.Pagination";
@@ -7,15 +7,11 @@ import { Checkbox } from '../../forms/Checkbox/Checkbox.js';
7
7
  import { Radio } from '../../forms/Radio/Radio.js';
8
8
  import { MinusIcon, PlusIcon } from '@heroicons/react/24/outline';
9
9
  import { UTILITY_COLUMN_WIDTH, UTILITY_COLUMN_ID } from './Table.utils.js';
10
+ import { cn } from '../../../utils/cn.js';
10
11
  import { tableExpandAnimations, tableExpandContentAnimations } from './Table.animations.js';
11
12
 
12
13
  function TableRowComponent({ row, rowId, columns, expandedRowRender, isExpanded = false, onExpandChange, selectable, selectionType, isSelected = false, onSelectionChange, freezeFirstColumn, freezeLastColumn, theme, }) {
13
- const rowClasses = [
14
- (theme === null || theme === void 0 ? void 0 : theme.rowStyle) || "",
15
- isSelected ? (theme === null || theme === void 0 ? void 0 : theme.selectedRowStyle) || "" : "",
16
- ]
17
- .filter(Boolean)
18
- .join(" ");
14
+ const rowClasses = cn(theme === null || theme === void 0 ? void 0 : theme.rowStyle, isSelected && (theme === null || theme === void 0 ? void 0 : theme.selectedRowStyle));
19
15
  const handleExpandClick = (e) => {
20
16
  e.stopPropagation();
21
17
  onExpandChange === null || onExpandChange === void 0 ? void 0 : onExpandChange(!isExpanded);
@@ -5,6 +5,7 @@ import 'react/jsx-runtime';
5
5
  import 'clsx';
6
6
  import 'tailwind-merge';
7
7
  import 'react';
8
+ import '../../core/Button/Button.js';
8
9
  import { TablePagination } from './TablePagination.js';
9
10
  import { TableFilter } from './TableFilter.js';
10
11
 
@@ -6,7 +6,7 @@ const customCursorTheme = {
6
6
  baseStyle: "pointer-events-none z-[9999] absolute transform-[translate(-50%,-50%)]",
7
7
  cursorStyle: "transition-transform duration-150",
8
8
  cursorFollowVariants: {
9
- default: "rounded-[var(--radius-base)] bg-white dark:bg-[var(--color-background-secondary)] shadow-lg border border-[var(--color-border)] px-3 py-2 text-base text-[var(--color-text-primary)]",
9
+ default: "rounded-[var(--radius-base)] bg-white dark:bg-[var(--color-background-secondary)] shadow-lg border border-[var(--color-border)] px-3 py-2 text-sm text-[var(--color-text-primary)]",
10
10
  user: "flex items-center gap-2 rounded-full pl-1 pr-3 py-1 shadow-xl",
11
11
  },
12
12
  cursorFollowColors: {
@@ -1,9 +1,9 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
- import React__default, { useRef } from 'react';
2
+ import React__default, { useRef, useCallback, useEffect, useMemo } from 'react';
3
3
  import { createPortal } from 'react-dom';
4
4
  import { useReducedMotion, AnimatePresence, motion } from 'motion/react';
5
5
  import { cn } from '../../../utils/cn.js';
6
- import { useOverlay } from '../../../hooks/useOverlay.js';
6
+ import { useOverlay, lockScroll, unlockScroll } from '../../../hooks/useOverlay.js';
7
7
  import { useFocusTrap } from '../../../hooks/useFocusTrap.js';
8
8
  import { useIsClient } from '../../../hooks/useIsClient.js';
9
9
  import { overlayTheme, overlayPositionVariants } from './Overlay.theme.js';
@@ -81,14 +81,41 @@ const Overlay = React__default.forwardRef(({ isOpen, onClose, closeOnOverlayClic
81
81
  // Ref for focus trap container
82
82
  const focusTrapRef = useRef(null);
83
83
  useFocusTrap(focusTrapRef, enableFocusTrap && isOpen);
84
- // Use overlay hook for behavior (escape key, scroll lock, click handling)
84
+ // Memoized ref callback to avoid recreation on every animation frame
85
+ const mergedRef = useCallback((node) => {
86
+ focusTrapRef.current = node;
87
+ if (typeof ref === "function")
88
+ ref(node);
89
+ else if (ref)
90
+ ref.current = node;
91
+ }, [ref]);
92
+ // Use overlay hook for behavior (escape key, click handling)
93
+ // Scroll lock is managed separately below so we can tie unlock to animation completion
85
94
  const { handleOverlayClick } = useOverlay({
86
95
  isOpen,
87
96
  onClose,
88
97
  closeOnEsc,
89
98
  closeOnOverlayClick,
90
- enableScrollLock,
99
+ enableScrollLock: false, // managed below via lockScroll/unlockScroll
91
100
  });
101
+ // Lock scroll immediately on open; track via ref so we can unlock in onExitComplete
102
+ const hasLockedScroll = useRef(false);
103
+ useEffect(() => {
104
+ if (isOpen && enableScrollLock) {
105
+ lockScroll();
106
+ hasLockedScroll.current = true;
107
+ }
108
+ // No unlock here — onExitComplete handles it after the exit animation finishes
109
+ }, [isOpen, enableScrollLock]);
110
+ // Safety: unlock on unmount (e.g. parent unmounts while overlay is still open)
111
+ useEffect(() => {
112
+ return () => {
113
+ if (hasLockedScroll.current) {
114
+ unlockScroll();
115
+ hasLockedScroll.current = false;
116
+ }
117
+ };
118
+ }, []);
92
119
  // Merge custom animations with defaults
93
120
  const overlayAnimations = (animations === null || animations === void 0 ? void 0 : animations.overlay) || defaultOverlayAnimations;
94
121
  const contentAnimations = (animations === null || animations === void 0 ? void 0 : animations.content) || defaultContentAnimations;
@@ -111,6 +138,14 @@ const Overlay = React__default.forwardRef(({ isOpen, onClose, closeOnOverlayClic
111
138
  };
112
139
  }
113
140
  }
141
+ // Detect dark mode from document (memoized to avoid DOM traversal on every animation frame)
142
+ const isDarkMode = useMemo(() => {
143
+ if (!isClient)
144
+ return false;
145
+ return (document.documentElement.classList.contains("dark") ||
146
+ document.body.classList.contains("dark") ||
147
+ document.querySelector(".dark") !== null);
148
+ }, [isClient]);
114
149
  // Determine portal target
115
150
  const target = portalTarget !== undefined
116
151
  ? portalTarget
@@ -121,23 +156,17 @@ const Overlay = React__default.forwardRef(({ isOpen, onClose, closeOnOverlayClic
121
156
  if (!target) {
122
157
  return null;
123
158
  }
124
- // Detect dark mode from document
125
- const isDarkMode = isClient &&
126
- (document.documentElement.classList.contains("dark") ||
127
- document.body.classList.contains("dark") ||
128
- document.querySelector(".dark") !== null);
129
- const content = (jsx(AnimatePresence, { mode: "wait", children: isOpen && (jsxs(motion.div, { className: cn(isDarkMode && "dark", overlayTheme.backdrop, overlayPositionVariants[position], overlayClassName), onClick: handleOverlayClick, variants: finalOverlayAnimations, initial: "initial", animate: "animate", exit: "exit", transition: instantTransition, children: [jsx("div", { className: overlayTheme.pattern, style: {
130
- backgroundImage: "url(/overlay-dots.svg)",
131
- backgroundRepeat: "repeat",
132
- backgroundSize: "540px 540px",
133
- } }), jsx(motion.div, { ref: (node) => {
134
- // Merge external ref and focus trap ref
135
- focusTrapRef.current = node;
136
- if (typeof ref === "function")
137
- ref(node);
138
- else if (ref)
139
- ref.current = node;
140
- }, className: cn(overlayTheme.content, contentClassName), style: contentStyle, variants: finalContentAnimations, initial: "initial", animate: "animate", exit: "exit", transition: instantTransition, onClick: (e) => e.stopPropagation(), ...(role ? { role } : {}), ...(ariaModal ? { "aria-modal": true } : {}), ...(ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}), ...(ariaDescribedBy
159
+ const content = (jsx(AnimatePresence, { mode: "wait", onExitComplete: () => {
160
+ if (hasLockedScroll.current) {
161
+ unlockScroll();
162
+ hasLockedScroll.current = false;
163
+ }
164
+ }, children: isOpen && (jsxs(motion.div, { className: cn(isDarkMode && "dark", overlayTheme.backdrop, overlayPositionVariants[position], overlayClassName), onClick: handleOverlayClick, variants: finalOverlayAnimations, initial: "initial", animate: "animate", exit: "exit", transition: instantTransition, children: [jsx("div", { className: overlayTheme.pattern, style: {
165
+ backgroundImage: "radial-gradient(circle, rgba(250,250,250,0.08) 1.5px, transparent 1.5px)",
166
+ backgroundSize: "30px 30px",
167
+ maskImage: "radial-gradient(ellipse at center, black 0%, transparent 70%)",
168
+ WebkitMaskImage: "radial-gradient(ellipse at center, black 0%, transparent 70%)",
169
+ } }), jsx(motion.div, { ref: mergedRef, className: cn(overlayTheme.content, contentClassName), style: contentStyle, variants: finalContentAnimations, initial: "initial", animate: "animate", exit: "exit", transition: instantTransition, onClick: (e) => e.stopPropagation(), ...(role ? { role } : {}), ...(ariaModal ? { "aria-modal": true } : {}), ...(ariaLabelledBy ? { "aria-labelledby": ariaLabelledBy } : {}), ...(ariaDescribedBy
141
170
  ? { "aria-describedby": ariaDescribedBy }
142
171
  : {}), children: children })] })) }));
143
172
  return createPortal(content, target);
@@ -26,7 +26,7 @@ const checkboxTheme = {
26
26
  "dark:disabled:bg-[var(--color-neutral-800)] dark:disabled:border-[var(--color-neutral-600)] " +
27
27
  "dark:data-[state=disabled]:bg-[var(--color-neutral-700)] dark:data-[state=disabled]:border-[var(--color-neutral-600)]",
28
28
  // Description text - light and dark
29
- descriptionStyle: "text-base mt-0.5 " + "text-[var(--color-text-secondary)]/80 " + " ",
29
+ descriptionStyle: "text-sm mt-0.5 " + "text-[var(--color-text-secondary)]/80 " + " ",
30
30
  sizes: {
31
31
  sm: "size-5 mt-0.25",
32
32
  md: "size-6",
@@ -34,8 +34,8 @@ const checkboxTheme = {
34
34
  // Group styles
35
35
  groupStyle: "flex flex-col gap-1.5",
36
36
  groupHorizontalStyle: "flex-row flex-wrap gap-x-6 gap-y-3",
37
- groupDescriptionStyle: "text-base text-[var(--color-text-secondary)] -mt-0.5 mb-1",
38
- groupErrorStyle: "text-base text-[var(--color-danger)] mt-1.5",
37
+ groupDescriptionStyle: "text-sm text-[var(--color-text-secondary)] -mt-0.5 mb-1",
38
+ groupErrorStyle: "text-sm text-[var(--color-danger)] mt-1.5",
39
39
  groupItemsStyle: "flex flex-col gap-3",
40
40
  };
41
41
 
@@ -1,19 +1,12 @@
1
1
  import React from 'react';
2
- import type { ColorPickerContextValue, ColorPickerProps } from './ColorPicker.types';
3
- /**
4
- * ColorPicker Context
5
- */
6
- export declare const ColorPickerContext: React.Context<ColorPickerContextValue | undefined>;
7
- /**
8
- * Hook to access ColorPicker context
9
- */
10
- export declare const useColorPicker: () => ColorPickerContextValue;
2
+ import type { ColorPickerProps } from './ColorPicker.types';
11
3
  /**
12
4
  * Export compound component with sub-components
13
5
  * Following Flikkui pattern (like Accordion, Tabs, Table)
14
6
  */
15
7
  export declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerProps & React.RefAttributes<HTMLDivElement>> & {
16
8
  Trigger: React.FC<import("./ColorPicker.types").ColorPickerTriggerProps>;
9
+ Header: React.FC<import("./ColorPickerHeader").ColorPickerHeaderProps>;
17
10
  Body: React.FC<import("./ColorPicker.types").ColorPickerBodyProps>;
18
11
  Canvas: React.FC<{
19
12
  className?: string;
@@ -24,4 +17,7 @@ export declare const ColorPicker: React.ForwardRefExoticComponent<ColorPickerPro
24
17
  FormatSelector: React.FC<import("./ColorPicker.types").ColorPickerFormatSelectorProps>;
25
18
  EyeDropper: React.FC<import("./ColorPicker.types").ColorPickerEyeDropperProps>;
26
19
  Presets: React.FC<import("./ColorPicker.types").ColorPickerPresetsProps>;
20
+ SavedColors: React.FC<import("./ColorPicker.types").ColorPickerSavedColorsProps>;
21
+ Gradient: React.FC<import("./ColorPicker.types").ColorPickerGradientProps>;
22
+ ImagePicker: React.FC<import("./ColorPicker.types").ColorPickerImageProps>;
27
23
  };