@adaptabletools/adaptable 24.0.0-canary.6 → 24.0.0-canary.8

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 (85) hide show
  1. package/index.css +36 -173
  2. package/package.json +1 -1
  3. package/src/AdaptableOptions/DefaultAdaptableOptions.js +6 -0
  4. package/src/AdaptableOptions/UserInterfaceOptions.d.ts +83 -4
  5. package/src/AdaptableState/StyledColumns/GradientStyle.d.ts +4 -0
  6. package/src/Api/Implementation/QuickSearchApiImpl.js +2 -2
  7. package/src/Api/Implementation/UserInterfaceApiImpl.d.ts +0 -1
  8. package/src/Api/Implementation/UserInterfaceApiImpl.js +9 -15
  9. package/src/Api/Internal/AdaptableInternalApi.js +5 -3
  10. package/src/Api/Internal/StateInternalApi.js +4 -3
  11. package/src/Api/UserInterfaceApi.d.ts +0 -4
  12. package/src/Redux/ActionsReducers/QuickSearchRedux.d.ts +9 -0
  13. package/src/Redux/ActionsReducers/QuickSearchRedux.js +9 -0
  14. package/src/Redux/Store/AdaptableStore.js +4 -2
  15. package/src/Utilities/Helpers/UIHelper.d.ts +6 -11
  16. package/src/Utilities/Helpers/UIHelper.js +6 -33
  17. package/src/View/Components/Popups/AdaptablePopup/Navigation.js +9 -11
  18. package/src/View/Components/StyleComponent.js +2 -2
  19. package/src/View/Dashboard/Dashboard.d.ts +1 -1
  20. package/src/View/Dashboard/Dashboard.js +1 -1
  21. package/src/View/Filter/ColumnFilter/ColumnFilterNew.js +14 -9
  22. package/src/View/QuickSearch/QuickSearchInput.js +1 -1
  23. package/src/View/QuickSearch/QuickSearchPopup.d.ts +1 -1
  24. package/src/View/QuickSearch/QuickSearchPopup.js +1 -1
  25. package/src/View/QuickSearch/Utilities/useQuickSearchDebounced.d.ts +2 -2
  26. package/src/View/StyledColumn/RangesComponent.js +8 -11
  27. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.d.ts +0 -2
  28. package/src/View/StyledColumn/Wizard/BadgePillStyleEditor.js +2 -2
  29. package/src/View/StyledColumn/Wizard/StyledColumnBadgeSection.js +2 -3
  30. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.d.ts +0 -3
  31. package/src/View/StyledColumn/Wizard/StyledColumnSliceStyleEditors.js +3 -3
  32. package/src/View/StyledColumn/Wizard/StyledColumnSparklineSettingsSection.js +7 -11
  33. package/src/View/StyledColumn/Wizard/StyledColumnWizardBulletSection.js +4 -4
  34. package/src/View/StyledColumn/Wizard/StyledColumnWizardGradientSection.js +2 -2
  35. package/src/View/StyledColumn/Wizard/StyledColumnWizardIconSection.js +2 -2
  36. package/src/View/StyledColumn/Wizard/StyledColumnWizardRangeBarSection.js +7 -7
  37. package/src/View/StyledColumn/Wizard/StyledColumnWizardRatingSection.js +4 -4
  38. package/src/View/StyledColumn/Wizard/StyledColumnWizardStyleSection/StyledColumnWizardStyleSection.js +3 -3
  39. package/src/components/ColorField/index.d.ts +13 -0
  40. package/src/components/ColorField/index.js +26 -0
  41. package/src/components/aql/QueryBuilder/GroupEditor.js +1 -1
  42. package/src/components/aql/QueryBuilder/QueryBuilder.d.ts +5 -0
  43. package/src/components/aql/QueryBuilder/QueryBuilder.js +1 -1
  44. package/src/components/aql/QueryBuilder/context.d.ts +7 -0
  45. package/src/components/aql/QueryBuilder/context.js +3 -1
  46. package/src/env.js +2 -2
  47. package/src/migration/VersionUpgrade24.d.ts +9 -0
  48. package/src/migration/VersionUpgrade24.js +27 -0
  49. package/src/setupDevTools.js +163 -9
  50. package/src/types.d.ts +1 -1
  51. package/tsconfig.esm.tsbuildinfo +1 -1
  52. package/vendor/components/ColorField/index.d.ts +53 -0
  53. package/vendor/components/ColorField/index.d.ts.map +1 -0
  54. package/vendor/components/ColorField/index.js +80 -0
  55. package/vendor/components/ColorField/index.js.map +1 -0
  56. package/vendor/components/ColorPicker/colorPickerTab.d.ts +2 -2
  57. package/vendor/components/ColorPicker/colorPickerTab.d.ts.map +1 -1
  58. package/vendor/components/ColorPicker/colorPickerTab.js +6 -28
  59. package/vendor/components/ColorPicker/colorPickerTab.js.map +1 -1
  60. package/vendor/components/ColorPicker/index.d.ts +76 -9
  61. package/vendor/components/ColorPicker/index.d.ts.map +1 -1
  62. package/vendor/components/ColorPicker/index.js +217 -27
  63. package/vendor/components/ColorPicker/index.js.map +1 -1
  64. package/vendor/components/ColorPicker/themeColors.d.ts +74 -4
  65. package/vendor/components/ColorPicker/themeColors.d.ts.map +1 -1
  66. package/vendor/components/ColorPicker/themeColors.js +206 -18
  67. package/vendor/components/ColorPicker/themeColors.js.map +1 -1
  68. package/vendor/components/NumberInput/index.d.ts +51 -0
  69. package/vendor/components/NumberInput/index.d.ts.map +1 -0
  70. package/vendor/components/NumberInput/index.js +82 -0
  71. package/vendor/components/NumberInput/index.js.map +1 -0
  72. package/vendor/components/index.css +73 -24
  73. package/vendor/components/index.d.ts +6 -2
  74. package/vendor/components/index.d.ts.map +1 -1
  75. package/vendor/components/index.js +3 -1
  76. package/vendor/components/index.js.map +1 -1
  77. package/vendor/components/ui/input-group.d.ts.map +1 -1
  78. package/vendor/components/ui/input-group.js +5 -4
  79. package/vendor/components/ui/input-group.js.map +1 -1
  80. package/src/components/ColorPicker/ColorPicker.d.ts +0 -12
  81. package/src/components/ColorPicker/ColorPicker.js +0 -48
  82. package/src/components/ColorPicker/OptionalColorPicker.d.ts +0 -12
  83. package/src/components/ColorPicker/OptionalColorPicker.js +0 -13
  84. package/src/components/ColorPicker/index.d.ts +0 -2
  85. package/src/components/ColorPicker/index.js +0 -2
@@ -1,26 +1,26 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useEffect, useLayoutEffect, useRef, useState } from 'react';
2
+ import { useEffect, useLayoutEffect, useRef, useState, } from 'react';
3
3
  import { Check, Grid2x2, Pipette, SlidersHorizontal } from 'lucide-react';
4
- import { HexAlphaColorPicker } from 'react-colorful';
4
+ import { HexAlphaColorPicker, HexColorPicker } from 'react-colorful';
5
5
  import { Button } from '../Button';
6
6
  import { Tooltip } from '../Tooltip';
7
7
  import { cn } from '../lib/utils';
8
8
  import { InputGroup, InputGroupAddon, InputGroupInput, InputGroupText } from '../ui/input-group';
9
9
  import { Tabs, TabsContent, TabsList, TabsTrigger } from '../ui/tabs';
10
10
  import { useColorPickerTab } from './colorPickerTab';
11
- import { describeColor, THEME_COLOR_GROUPS } from './themeColors';
11
+ import { coloursKeptFromSource, describeColor, normalizeColorPickerTabs, readAllowedColors, readAllPaletteColors, readPaletteColors, readTabs, THEME_COLOR_GROUP, sortColorsByHex, uniqueColorsByKey, } from './themeColors';
12
12
  export { setColorPickerTab, useColorPickerTab } from './colorPickerTab';
13
- export { describeColor, THEME_COLOR_GROUPS } from './themeColors';
13
+ export { ALLOWED_COLORS_VAR, coloursKeptFromSource, describeColor, normalizeColorPickerTabs, PALETTE_COUNT_VAR, parseTabs, readAllowedColors, readAllPaletteColors, readPaletteColors, readTabs, TABS_VAR, THEME_COLOR_GROUP, } from './themeColors';
14
14
  /** `#rrggbb`, or `#rrggbbaa` when the colour has opacity. */
15
15
  export const HEX_COLOR = /^#([0-9a-f]{6}|[0-9a-f]{8})$/i;
16
16
  const HEX_DIGITS = /^([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i;
17
+ const OPAQUE_HEX_DIGITS = /^([0-9a-f]{3}|[0-9a-f]{6})$/i;
17
18
  /**
18
19
  * Both tabs' content is this tall, so switching tabs never resizes the
19
20
  * popover. `flex-none` undoes the panel's default `flex-1`, which in the
20
21
  * column-flex root would size it to its content instead.
21
22
  */
22
23
  const CONTENT_HEIGHT = 'twa:h-52 twa:flex-none twa:p-1';
23
- /** Where the precise picker starts while nothing is set. */
24
24
  const PICKER_START = '#808080';
25
25
  /** Transparency checkerboard — the "no colour" preview. */
26
26
  export const CHECKERBOARD = {
@@ -62,17 +62,176 @@ function useResolvedHex(value, previewRef) {
62
62
  }
63
63
  const eyeDropperSupported = () => typeof window !== 'undefined' && typeof window.EyeDropper === 'function';
64
64
  /**
65
- * The colour picker's popover body: a Swatches tab with the Adaptable theme
66
- * colours and a Precise tab with a free picker, over a footer shared by both —
65
+ * The swatches in effect where the picker renders, read from CSS once it is
66
+ * in the document. With `filterColours`, every palette colour is supplied to
67
+ * it; without, `--ab-cmp-color-picker__palette-count` caps the palette and
68
+ * `--ab-cmp-color-picker__allowed-colors: palette` drops the theme colours.
69
+ */
70
+ function usePalette(elementRef, excludeColor, orderPaletteColours, removeDuplicates, showGroupLabels, filterColours) {
71
+ const filterRef = useRef(filterColours);
72
+ filterRef.current = filterColours;
73
+ const hasFilter = !!filterColours;
74
+ const [sections, setSections] = useState([]);
75
+ const [css, setCss] = useState({ tabs: ['precise', 'colors'], allowed: 'any' });
76
+ useLayoutEffect(() => {
77
+ const element = elementRef.current;
78
+ if (!element) {
79
+ return;
80
+ }
81
+ const allowed = readAllowedColors(element);
82
+ setCss({ tabs: readTabs(element), allowed });
83
+ const filter = filterRef.current;
84
+ const visible = (color) => color.value !== excludeColor;
85
+ const paletteColours = (filter ? readAllPaletteColors(element) : readPaletteColors(element)).filter(visible);
86
+ const themeColours = !filter && allowed === 'palette' ? [] : THEME_COLOR_GROUP.colors.filter(visible);
87
+ const supplied = filter
88
+ ? withComputedHex(element, themeColours, paletteColours)
89
+ : { themeColours, paletteColours };
90
+ const filtered = applyColourFilter(supplied.themeColours, supplied.paletteColours, filter);
91
+ setSections(layoutSwatches(element, filtered, {
92
+ orderPaletteColours,
93
+ removeDuplicates,
94
+ showGroupLabels,
95
+ }));
96
+ }, [elementRef, excludeColor, orderPaletteColours, removeDuplicates, showGroupLabels, hasFilter]);
97
+ return { sections, css };
98
+ }
99
+ /** The same colours, each with the hex the active theme paints for it. */
100
+ function withComputedHex(host, themeColours, paletteColours) {
101
+ const hexOf = computedHexes(host, [...themeColours, ...paletteColours]);
102
+ const attach = (colors) => colors.map((color) => {
103
+ const hex = hexOf.get(color.value);
104
+ return hex ? { ...color, hex } : color;
105
+ });
106
+ return { themeColours: attach(themeColours), paletteColours: attach(paletteColours) };
107
+ }
108
+ /** Keeps only colours from the list they were returned in. No result shows every colour. */
109
+ function applyColourFilter(themeColours, paletteColours, filterColours) {
110
+ if (!filterColours) {
111
+ return { themeColours, paletteColours };
112
+ }
113
+ const result = filterColours({ themeColours, paletteColours });
114
+ if (!result) {
115
+ return { themeColours, paletteColours };
116
+ }
117
+ return {
118
+ themeColours: coloursKeptFromSource(result.themeColours, themeColours),
119
+ paletteColours: coloursKeptFromSource(result.paletteColours, paletteColours),
120
+ };
121
+ }
122
+ /**
123
+ * One grid, or a Theme section and a Palette section. Ordering and duplicate
124
+ * removal run after the filter: across the whole list when there is one grid,
125
+ * and inside each group when the headings are shown. A palette colour that
126
+ * paints the same hex as a theme colour is the one left out.
127
+ */
128
+ function layoutSwatches(host, lists, options) {
129
+ const { themeColours, paletteColours } = lists;
130
+ if (!options.showGroupLabels) {
131
+ return [
132
+ {
133
+ id: 'all',
134
+ colors: arrangeSwatches(host, [...themeColours, ...paletteColours], options),
135
+ },
136
+ ];
137
+ }
138
+ const arranged = arrangeGroups(host, themeColours, paletteColours, options);
139
+ const sections = [
140
+ { id: 'theme', label: 'Theme', colors: arranged.themeColours },
141
+ { id: 'palette', label: 'Palette', colors: arranged.paletteColours },
142
+ ];
143
+ const filled = sections.filter((section) => section.colors.length > 0);
144
+ // a single remaining group has nothing to distinguish it from
145
+ return filled.length > 1 ? filled : [{ id: 'all', colors: filled[0]?.colors ?? [] }];
146
+ }
147
+ function arrangeGroups(host, themeColours, paletteColours, options) {
148
+ if (!options.orderPaletteColours && !options.removeDuplicates) {
149
+ return { themeColours, paletteColours };
150
+ }
151
+ const hexOf = computedHexes(host, [...themeColours, ...paletteColours]);
152
+ const themeValues = new Set(themeColours.map((color) => color.value));
153
+ const listed = options.removeDuplicates
154
+ ? uniqueColorsByKey([...themeColours, ...paletteColours], (color) => hexOf.get(color.value))
155
+ : [...themeColours, ...paletteColours];
156
+ const theme = listed.filter((color) => themeValues.has(color.value));
157
+ const palette = listed.filter((color) => !themeValues.has(color.value));
158
+ if (!options.orderPaletteColours) {
159
+ return { themeColours: theme, paletteColours: palette };
160
+ }
161
+ return {
162
+ themeColours: sortColorsByHex(theme, (color) => hexOf.get(color.value)),
163
+ paletteColours: sortColorsByHex(palette, (color) => hexOf.get(color.value)),
164
+ };
165
+ }
166
+ /**
167
+ * The hex a swatch paints, read from a probe in the picker's theme so
168
+ * `var(--ab-color-…)` resolves. With `removeDuplicates`, a later swatch that
169
+ * paints the same hex is dropped. With `orderPaletteColours`, the rest are
170
+ * ordered around the colour wheel. With neither, the given order is kept.
171
+ */
172
+ function arrangeSwatches(host, colors, options) {
173
+ if (!options.orderPaletteColours && !options.removeDuplicates) {
174
+ return colors;
175
+ }
176
+ const hexOf = computedHexes(host, colors);
177
+ const listed = options.removeDuplicates
178
+ ? uniqueColorsByKey(colors, (color) => hexOf.get(color.value))
179
+ : colors;
180
+ return options.orderPaletteColours
181
+ ? sortColorsByHex(listed, (color) => hexOf.get(color.value))
182
+ : listed;
183
+ }
184
+ function computedHexes(host, colors) {
185
+ const probe = host.ownerDocument.createElement('span');
186
+ probe.style.cssText = 'position:absolute;width:0;height:0;overflow:hidden;pointer-events:none;';
187
+ host.appendChild(probe);
188
+ const hexOf = new Map();
189
+ try {
190
+ for (const color of colors) {
191
+ probe.style.backgroundColor = '';
192
+ probe.style.backgroundColor = color.value;
193
+ const hex = rgbToHex(getComputedStyle(probe).backgroundColor);
194
+ if (hex) {
195
+ hexOf.set(color.value, hex);
196
+ }
197
+ }
198
+ }
199
+ finally {
200
+ probe.remove();
201
+ }
202
+ return hexOf;
203
+ }
204
+ /**
205
+ * The colour picker's popover body: a palette tab with the Adaptable theme
206
+ * colours and a Custom tab with a free picker, over a footer shared by both —
67
207
  * the current colour, an eyedropper where the browser has one, and a hex
68
- * field. The tab is remembered across all pickers (see `colorPickerTab.ts`).
208
+ * field.
209
+ *
210
+ * `tabs` sets which tabs show and in what order. The picker shows `tab` when
211
+ * controlled; otherwise it opens on `defaultTab`, else on the tab the user
212
+ * last picked in any picker on the page (see `colorPickerTab.ts`), else on
213
+ * the first listed tab.
214
+ *
215
+ * Without `tabs`, the CSS variables decide: `--ab-cmp-color-picker__tabs`
216
+ * sets the tabs, and `--ab-cmp-color-picker__allowed-colors: predefined`
217
+ * drops the Custom tab, so no custom colour can be picked; `palette` also
218
+ * drops the theme colours (unless `filterColours` is given).
69
219
  */
70
220
  export function ColorPicker(props) {
71
- const { value, onInput, onCommit, groups = THEME_COLOR_GROUPS } = props;
221
+ const { value, onInput, onCommit, excludeColor, defaultColor = PICKER_START, includeAlpha = true, preciseTabLabel = 'Custom', colorsTabLabel = 'Palette', tabs: tabsProp, orderPaletteColours = true, removeDuplicates = true, showGroupLabels = false, filterColours, defaultTab, onTabChange, } = props;
72
222
  const dataName = props['data-name'];
73
- const [tab, setTab] = useColorPickerTab();
223
+ const [lastPickedTab, setLastPickedTab] = useColorPickerTab();
224
+ // so a picker with `defaultTab` can still switch tabs while it is open
225
+ const [ownTab, setOwnTab] = useState(null);
74
226
  const previewRef = useRef(null);
75
- const hex = useResolvedHex(value, previewRef);
227
+ const resolvedHex = useResolvedHex(value, previewRef);
228
+ const hex = includeAlpha ? resolvedHex : resolvedHex?.slice(0, 7);
229
+ const { sections: swatchSections, css } = usePalette(previewRef, excludeColor, orderPaletteColours, removeDuplicates, showGroupLabels, filterColours);
230
+ const tabsFromCss = tabsProp === undefined;
231
+ const shownTabs = tabsFromCss ? css.tabs : normalizeColorPickerTabs(tabsProp);
232
+ const tab = [props.tab, ownTab, defaultTab, lastPickedTab].find((t) => t != null && shownTabs.includes(t)) ?? shownTabs[0];
233
+ const defaultRef = useRef(null);
234
+ const startHex = useResolvedHex(defaultColor, defaultRef) ?? PICKER_START;
76
235
  // the hex field is free text until it parses; it snaps back to the colour on blur
77
236
  const [hexDraft, setHexDraft] = useState(null);
78
237
  useEffect(() => setHexDraft(null), [value]);
@@ -82,7 +241,8 @@ export function ColorPicker(props) {
82
241
  // at the third digit
83
242
  const commitHexDraft = (text, options) => {
84
243
  const digits = text.trim().replace(/^#/, '');
85
- if (HEX_DIGITS.test(digits) && (options.allowShort || digits.length !== 3)) {
244
+ const valid = includeAlpha ? HEX_DIGITS : OPAQUE_HEX_DIGITS;
245
+ if (valid.test(digits) && (options.allowShort || digits.length !== 3)) {
86
246
  const next = normalizeHex(digits);
87
247
  if (next !== hex) {
88
248
  onCommit(next);
@@ -103,20 +263,40 @@ export function ColorPicker(props) {
103
263
  // cancelled with Escape
104
264
  }
105
265
  };
106
- return (_jsxs(Tabs, { value: tab, onValueChange: (next) => setTab(next), "data-name": `${dataName}-picker`, className: "twa:gap-3", children: [_jsxs(TabsList, { className: "twa:grid twa:w-full twa:grid-cols-2", children: [_jsxs(TabsTrigger, { value: "precise", "data-name": `${dataName}-tab-precise`, children: [_jsx(SlidersHorizontal, { "aria-hidden": true }), "Precise"] }), _jsxs(TabsTrigger, { value: "swatches", "data-name": `${dataName}-tab-swatches`, children: [_jsx(Grid2x2, { "aria-hidden": true }), "Swatches"] })] }), _jsx(TabsContent, { value: "precise", className: CONTENT_HEIGHT, children: _jsx(HexAlphaColorPicker, { color: hex ?? PICKER_START, onChange: onInput, "data-name": `${dataName}-precise`,
107
- // react-colorful injects unlayered styles, which beat our layered
108
- // utilities whatever the specificity — hence `!`. Its parts are
109
- // addressed by position (saturation area, then the hue and alpha
110
- // strips) and by the `…__pointer` class suffix, so the selectors
111
- // survive minified class-name scanning.
112
- className: cn('twa:w-full! twa:h-full!', 'twa:*:first:rounded-md! twa:*:first:border-0!', 'twa:*:not-first:mt-2.5! twa:*:not-first:h-3! twa:*:not-first:rounded-full!', 'twa:**:[[class$=pointer]]:size-4! twa:**:[[class$=pointer]]:border-2!') }) }), _jsx(TabsContent, { value: "swatches", className: cn(CONTENT_HEIGHT, 'twa:flex twa:flex-col twa:gap-2.5 twa:overflow-y-auto twa:overscroll-contain twa:pr-1'), children: groups.map((group) => (_jsxs("div", { className: "twa:flex twa:flex-col twa:gap-1", children: [_jsx("div", { className: "twa:text-xs twa:font-medium twa:text-muted-foreground", children: group.label }), _jsx("div", { role: "listbox", "aria-label": `${group.label} colours`, "data-name": `${dataName}-options`, "data-group": group.id, className: "twa:grid twa:grid-cols-8 twa:gap-1", children: group.colors.map((color) => {
113
- const selected = color.value === value;
114
- return (_jsx(Tooltip, { label: color.label, className: "twa:min-w-0", children: _jsx("button", { type: "button", role: "option", "aria-selected": selected, "aria-label": color.label, "data-name": `${dataName}-option`, "data-value": color.value, onClick: () => {
115
- onCommit(color.value);
116
- props.onSwatchPicked?.();
117
- }, style: { backgroundColor: color.value }, className: cn('twa:flex twa:h-7 twa:w-full twa:items-center twa:justify-center twa:rounded-md twa:border twa:border-foreground/10 twa:transition-[box-shadow,transform]', 'twa:hover:scale-105 twa:hover:ring-2 twa:hover:ring-ring/40 twa:focus-visible:outline-none twa:focus-visible:ring-2 twa:focus-visible:ring-ring/50', selected &&
118
- 'twa:ring-2 twa:ring-accent twa:ring-offset-1 twa:ring-offset-popover'), children: selected ? (_jsx(Check, { "aria-hidden": true, className: "twa:size-3.5 twa:text-white twa:drop-shadow-[0_0_1px_rgba(0,0,0,0.9)]" })) : null }) }, color.value));
119
- }) })] }, group.id))) }), _jsxs("div", { className: "twa:flex twa:items-center twa:gap-2 twa:border-t twa:border-foreground/10 twa:pt-3", children: [_jsx(Tooltip, { label: value ? describeColor(value, groups) : 'Not set', children: _jsx("span", { ref: previewRef, "data-name": `${dataName}-preview`, "data-value": value, style: value ? { backgroundColor: value } : CHECKERBOARD, className: "twa:block twa:size-9 twa:shrink-0 twa:rounded-full twa:border twa:border-foreground/10" }) }), canPickFromScreen ? (_jsx(Button, { variant: "outline", size: "icon-sm", "data-name": `${dataName}-eyedropper`, tooltip: "Pick a colour from the screen", onClick: pickFromScreen, className: "twa:shrink-0 twa:rounded-full", children: _jsx(Pipette, { "aria-hidden": true }) })) : null, _jsxs(InputGroup, { className: "twa:h-8 twa:min-h-8 twa:min-w-0 twa:flex-1", children: [_jsx(InputGroupAddon, { children: _jsx(InputGroupText, { className: "twa:font-mono", children: "#" }) }), _jsx(InputGroupInput, { "data-name": `${dataName}-hex`, "aria-label": "Hex colour", value: hexText, placeholder: hex ? undefined : '000000', spellCheck: false, autoComplete: "off", maxLength: 9, className: "twa:font-mono twa:text-xs", onChange: (event) => {
266
+ const swatches = (_jsx("div", { className: "twa:flex twa:flex-col twa:gap-2.5", children: swatchSections.map((section) => (_jsxs("div", { className: "twa:flex twa:flex-col twa:gap-1", children: [section.label ? (_jsx("div", { "data-name": `${dataName}-group-${section.id}`, className: "twa:px-0.5 twa:text-xs twa:text-muted-foreground", children: section.label })) : null, _jsx(Swatches, { colors: section.colors, value: value, "data-name": dataName, onPick: (color) => {
267
+ onCommit(color);
268
+ props.onSwatchPicked?.();
269
+ } })] }, section.id))) }));
270
+ const described = value ? describeColor(value) : undefined;
271
+ // a raw hex is already shown in the hex field; a theme or palette colour has a name
272
+ const colorName = described && described !== value ? described : undefined;
273
+ const previewSwatch = (_jsx("span", { ref: previewRef, "data-name": `${dataName}-preview`, "data-value": value, style: value ? { backgroundColor: value } : CHECKERBOARD, className: "twa:block twa:size-9 twa:shrink-0 twa:rounded-full twa:border twa:border-foreground/10" }));
274
+ const preview = colorName ? (_jsx(Tooltip, { label: colorName, children: previewSwatch })) : (previewSwatch);
275
+ const name = colorName ? (_jsx("span", { "data-name": `${dataName}-name`, title: colorName, className: "twa:min-w-0 twa:max-w-28 twa:truncate twa:text-xs twa:text-muted-foreground", children: colorName })) : null;
276
+ if (tabsFromCss && css.allowed !== 'any') {
277
+ return (_jsxs("div", { "data-name": `${dataName}-picker`, className: "twa:flex twa:flex-col twa:gap-3", children: [_jsx("div", { className: cn(CONTENT_HEIGHT, SWATCHES_LAYOUT), children: swatches }), _jsxs("div", { className: FOOTER_LAYOUT, children: [preview, value ? (_jsx("span", { "data-name": `${dataName}-name`, className: "twa:min-w-0 twa:truncate twa:text-xs twa:text-muted-foreground", children: described })) : null] })] }));
278
+ }
279
+ const PrecisePicker = includeAlpha ? HexAlphaColorPicker : HexColorPicker;
280
+ const triggers = {
281
+ precise: (_jsxs(TabsTrigger, { value: "precise", "data-name": `${dataName}-tab-precise`, children: [_jsx(SlidersHorizontal, { "aria-hidden": true }), preciseTabLabel] }, "precise")),
282
+ colors: (_jsxs(TabsTrigger, { value: "colors", "data-name": `${dataName}-tab-colors`, children: [_jsx(Grid2x2, { "aria-hidden": true }), colorsTabLabel] }, "colors")),
283
+ };
284
+ const contents = {
285
+ precise: (_jsx(TabsContent, { value: "precise", className: CONTENT_HEIGHT, children: _jsx(PrecisePicker, { color: hex ?? startHex, onChange: onInput, "data-name": `${dataName}-precise`,
286
+ // react-colorful injects unlayered styles, which beat our layered
287
+ // utilities whatever the specificity — hence `!`. Its parts are
288
+ // addressed by position (saturation area, then the hue and alpha
289
+ // strips) and by the `…__pointer` class suffix, so the selectors
290
+ // survive minified class-name scanning.
291
+ className: cn('twa:w-full! twa:h-full!', 'twa:*:first:rounded-md! twa:*:first:border-0!', 'twa:*:not-first:mt-2.5! twa:*:not-first:h-3! twa:*:not-first:rounded-full!', 'twa:**:[[class$=pointer]]:size-4! twa:**:[[class$=pointer]]:border-2!') }) }, "precise")),
292
+ // scrolls inside the same height as the precise tab, so the popover keeps its size
293
+ colors: (_jsx(TabsContent, { value: "colors", className: cn(CONTENT_HEIGHT, SWATCHES_LAYOUT), children: swatches }, "colors")),
294
+ };
295
+ return (_jsxs(Tabs, { value: tab, onValueChange: (next) => {
296
+ setOwnTab(next);
297
+ setLastPickedTab(next);
298
+ onTabChange?.(next);
299
+ }, "data-name": `${dataName}-picker`, className: "twa:gap-3", children: [shownTabs.length > 1 ? (_jsx(TabsList, { className: "twa:grid twa:w-full twa:grid-cols-2", children: shownTabs.map((id) => triggers[id]) })) : null, shownTabs.map((id) => contents[id]), _jsxs("div", { className: FOOTER_LAYOUT, children: [preview, tab === 'colors' ? name : null, _jsx("span", { ref: defaultRef, hidden: true, style: { backgroundColor: defaultColor } }), tab === 'precise' && canPickFromScreen ? (_jsx(Button, { variant: "outline", size: "icon-sm", "data-name": `${dataName}-eyedropper`, tooltip: "Pick a colour from the screen", onClick: pickFromScreen, className: "twa:shrink-0 twa:rounded-full", children: _jsx(Pipette, { "aria-hidden": true }) })) : null, tab === 'precise' ? (_jsxs(InputGroup, { className: "twa:h-8 twa:min-h-8 twa:min-w-0 twa:flex-1", children: [_jsx(InputGroupAddon, { children: _jsx(InputGroupText, { className: "twa:font-mono", children: "#" }) }), _jsx(InputGroupInput, { "data-name": `${dataName}-hex`, "aria-label": "Hex colour", value: hexText, placeholder: hex ? undefined : '000000', spellCheck: false, autoComplete: "off", maxLength: includeAlpha ? 9 : 7, className: "twa:font-mono twa:text-xs", onChange: (event) => {
120
300
  setHexDraft(event.target.value);
121
301
  commitHexDraft(event.target.value, { allowShort: false });
122
302
  }, onBlur: (event) => {
@@ -127,6 +307,16 @@ export function ColorPicker(props) {
127
307
  commitHexDraft(event.currentTarget.value, { allowShort: true });
128
308
  setHexDraft(null);
129
309
  }
130
- } })] })] })] }));
310
+ } })] })) : (_jsx("span", { "data-name": `${dataName}-hex-text`, className: "twa:ml-auto twa:min-w-0 twa:truncate twa:font-mono twa:text-xs twa:text-muted-foreground", children: hex ? `#${hex}` : '' }))] })] }));
311
+ }
312
+ const SWATCHES_LAYOUT = 'twa:flex twa:flex-col twa:gap-2.5 twa:overflow-y-auto twa:overscroll-contain twa:pr-1';
313
+ const FOOTER_LAYOUT = 'twa:flex twa:items-center twa:gap-2 twa:border-t twa:border-foreground/10 twa:pt-3';
314
+ function Swatches(props) {
315
+ const { colors, value, onPick } = props;
316
+ const dataName = props['data-name'];
317
+ return (_jsx("div", { role: "listbox", "aria-label": "Colours", "data-name": `${dataName}-options`, className: "twa:grid twa:grid-cols-8 twa:gap-1", children: colors.map((color) => {
318
+ const selected = color.value === value;
319
+ return (_jsx(Tooltip, { label: color.label, className: "twa:min-w-0", children: _jsx("button", { type: "button", role: "option", "aria-selected": selected, "aria-label": color.label, "data-name": `${dataName}-option`, "data-value": color.value, onClick: () => onPick(color.value), style: { backgroundColor: color.value }, className: cn('twa:flex twa:h-7 twa:w-full twa:items-center twa:justify-center twa:rounded-md twa:border twa:border-foreground/10 twa:transition-[box-shadow,transform]', 'twa:hover:scale-105 twa:hover:ring-2 twa:hover:ring-ring/40 twa:focus-visible:outline-none twa:focus-visible:ring-2 twa:focus-visible:ring-ring/50', selected && 'twa:ring-2 twa:ring-accent twa:ring-offset-1 twa:ring-offset-popover'), children: selected ? (_jsx(Check, { "aria-hidden": true, className: "twa:size-3.5 twa:text-white twa:drop-shadow-[0_0_1px_rgba(0,0,0,0.9)]" })) : null }) }, color.value));
320
+ }) }));
131
321
  }
132
322
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/ColorPicker/index.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,SAAS,EAAE,eAAe,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACzF,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAC1E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AACnC,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,EAAE,IAAI,EAAE,WAAW,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAuB,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,aAAa,EAAE,kBAAk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ACZ,GAAG,QAAQ,SAAS,gBACnB,KAAK,CAAC,KAAK,EACvB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK,CAAC,EAClC,KAAK,EAAE,EAAE,eAAe,EAAE,KAAK,CAAC,KAAK,EAAE,EACvC,SAAS,EAAE,EAAE,CACX,0JAA0J,EAC1J,oJAAoJ,EACpJ,QAAQ,IAAI,sEAAsE,CACnF,YAEA,QAAQ,CAAC,CAAC,CAAC,CACV,KAAC,KAAK,yBAEJ,SAAS,EAAC,uEAAuE,GACjF,CACH,CAAC,CAAC,CAAC,IAAI,GACD,IAtBG,KAAK,CAAC,KAAK,CAuBf,CACX,CAAC;QACJ,CAAC,CAAC,GACE,CACP,CAAC;AACJ,CAAC"}
@@ -4,21 +4,91 @@
4
4
  * `var(--ab-color-…)` so a styled cell, alert or dashboard bar follows the
5
5
  * light / dark theme and any host overrides of those variables.
6
6
  */
7
+ import type { ColorPickerTab } from './colorPickerTab';
7
8
  export type ThemeColor = {
8
9
  /** The CSS value that gets stored, e.g. `var(--ab-color-success)`. */
9
10
  value: string;
10
11
  /** What the user sees for it. */
11
12
  label: string;
13
+ /**
14
+ * The colour as the active theme paints it, e.g. `#1c7ed6`. Set on the
15
+ * colours handed to `filterColours`. An alpha byte is included only when
16
+ * the colour is translucent.
17
+ */
18
+ hex?: string;
12
19
  };
13
20
  export type ThemeColorGroup = {
14
- id: 'theme' | 'palette' | 'swatch';
21
+ id: 'theme' | 'palette';
15
22
  label: string;
16
23
  colors: ThemeColor[];
17
24
  };
18
- export declare const THEME_COLOR_GROUPS: ThemeColorGroup[];
25
+ export declare const THEME_COLOR_GROUP: ThemeColorGroup;
26
+ /**
27
+ * One swatch per resolved colour. `keyOf` is the computed hex (or `undefined`
28
+ * when it cannot be resolved, in which case the stored value is the key).
29
+ * The first colour wins, so theme colours stay ahead of a palette colour that
30
+ * paints the same.
31
+ */
32
+ export declare function uniqueColorsByKey(colors: ThemeColor[], keyOf: (color: ThemeColor) => string | undefined): ThemeColor[];
33
+ /**
34
+ * Colour-wheel order. Hex order follows the red channel, so it splits blues
35
+ * and reds apart. Here each 30° of hue is a family (reds, then oranges,
36
+ * yellows, greens, cyans, blues, purples), light shades before dark ones.
37
+ * Greys, white and black come after the wheel, light to dark. An unresolvable
38
+ * colour stays at the end, in its original order.
39
+ */
40
+ export declare function sortColorsByHex(colors: ThemeColor[], hexOf: (color: ThemeColor) => string | undefined): ThemeColor[];
41
+ export declare const PALETTE_COUNT_VAR = "--ab-cmp-color-picker__palette-count";
42
+ export declare const ALLOWED_COLORS_VAR = "--ab-cmp-color-picker__allowed-colors";
43
+ export declare const TABS_VAR = "--ab-cmp-color-picker__tabs";
44
+ /** The names a host passes for the Colour Picker tabs, in display order. */
45
+ export type ColorPickerTabName = 'Custom' | 'Palette';
46
+ /**
47
+ * - `any`: theme colours, palette and a custom colour (the Custom tab)
48
+ * - `predefined`: theme colours and palette only
49
+ * - `palette`: palette only
50
+ */
51
+ export type AllowedColors = 'any' | 'predefined' | 'palette';
52
+ /**
53
+ * The palette colours in effect on `element`: `--ab-color-palette-1` upwards
54
+ * until one is not defined, capped by `--ab-cmp-color-picker__palette-count`
55
+ * when that is a positive integer.
56
+ */
57
+ export declare function readPaletteColors(element: Element): ThemeColor[];
58
+ /**
59
+ * Every palette colour in effect on `element`, ignoring
60
+ * `--ab-cmp-color-picker__palette-count`.
61
+ */
62
+ export declare function readAllPaletteColors(element: Element): ThemeColor[];
63
+ /** `--ab-cmp-color-picker__allowed-colors` on `element`; `any` when unset or unrecognised. */
64
+ export declare function readAllowedColors(element: Element): AllowedColors;
65
+ /**
66
+ * `--ab-cmp-color-picker__tabs` on `element`: the tabs to show, in order, the
67
+ * first being the default (e.g. `colors precise`; `colours` is also
68
+ * accepted). Unknown and repeated ids are dropped; `precise colors` when
69
+ * nothing valid is left.
70
+ */
71
+ export declare function readTabs(element: Element): ColorPickerTab[];
72
+ /** A `--ab-cmp-color-picker__tabs` value as tab ids; see `readTabs`. */
73
+ export declare function parseTabs(value: string): ColorPickerTab[];
74
+ /**
75
+ * The tabs to show, in the order given. `Custom` is the free picker; `Palette`
76
+ * is the swatches. Unknown and repeated names are dropped. `Custom` then
77
+ * `Palette` when nothing valid is left, including when `tabs` is omitted.
78
+ */
79
+ export declare function normalizeColorPickerTabs(tabs: readonly string[] | undefined): ColorPickerTab[];
80
+ /**
81
+ * The returned colours that belong to `source`, in the returned order.
82
+ * Anything whose `value` is not in `source` is dropped, and so is a repeat.
83
+ */
84
+ export declare function coloursKeptFromSource(returned: readonly {
85
+ value: string;
86
+ }[] | undefined, source: ThemeColor[]): ThemeColor[];
19
87
  /**
20
88
  * The picker's name for a stored colour: the token label for a theme colour
21
- * (`var(--ab-color-success)` → "Success"), the value itself otherwise.
89
+ * (`var(--ab-color-success)` → "Success", `var(--ab-color-palette-3)` →
90
+ * "Palette 3"), a name derived from any other `--ab-color-*` token
91
+ * (`var(--ab-color-badge-foreground)` → "Badge text"), the value itself otherwise.
22
92
  */
23
- export declare function describeColor(value: string, groups?: ThemeColorGroup[]): string;
93
+ export declare function describeColor(value: string): string;
24
94
  //# sourceMappingURL=themeColors.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"themeColors.d.ts","sourceRoot":"","sources":["../../src/ColorPicker/themeColors.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,MAAM,UAAU,GAAG;IACvB,sEAAsE;IACtE,KAAK,EAAE,MAAM,CAAC;IACd,iCAAiC;IACjC,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,EAAE,EAAE,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,UAAU,EAAE,CAAC;CACtB,CAAC;AAiCF,eAAO,MAAM,kBAAkB,EAAE,eAAe,EAI/C,CAAC;AAMF;;;GAGG;AACH,wBAAgB,aAAa,CAC3B,K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