@central-ui/react 0.1.2 → 0.3.0
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.
- package/LICENSE +49 -0
- package/dist/components/accordion/index.d.ts +4 -3
- package/dist/components/accordion/index.js +7 -4
- package/dist/components/autocomplete/index.d.ts +23 -30
- package/dist/components/autocomplete/index.js +81 -56
- package/dist/components/avatar/index.d.ts +1 -2
- package/dist/components/avatar/index.js +0 -1
- package/dist/components/badge/index.d.ts +0 -1
- package/dist/components/badge/index.js +2 -2
- package/dist/components/banner/index.d.ts +1 -1
- package/dist/components/banner/index.js +23 -25
- package/dist/components/barchart/index.d.ts +106 -0
- package/dist/components/barchart/index.js +122 -0
- package/dist/components/breadcrumb/index.d.ts +0 -1
- package/dist/components/breadcrumb/index.js +6 -7
- package/dist/components/button/index.d.ts +2 -3
- package/dist/components/button/index.js +11 -12
- package/dist/components/card/index.d.ts +0 -1
- package/dist/components/card/index.js +0 -1
- package/dist/components/carousel/index.d.ts +169 -0
- package/dist/components/carousel/index.js +299 -0
- package/dist/components/checkbox/index.d.ts +13 -11
- package/dist/components/checkbox/index.js +51 -31
- package/dist/components/chip/index.d.ts +1 -1
- package/dist/components/chip/index.js +2 -3
- package/dist/components/combobox/index.d.ts +33 -49
- package/dist/components/combobox/index.js +102 -70
- package/dist/components/datepicker/index.d.ts +18 -31
- package/dist/components/datepicker/index.js +81 -99
- package/dist/components/dialog/index.d.ts +14 -27
- package/dist/components/dialog/index.js +17 -18
- package/dist/components/divider/index.d.ts +0 -1
- package/dist/components/divider/index.js +0 -1
- package/dist/components/donutchart/index.d.ts +100 -0
- package/dist/components/donutchart/index.js +178 -0
- package/dist/components/drawer/index.d.ts +12 -21
- package/dist/components/drawer/index.js +34 -36
- package/dist/components/empty/index.d.ts +3 -3
- package/dist/components/empty/index.js +4 -5
- package/dist/components/exception/index.d.ts +86 -0
- package/dist/components/exception/index.js +116 -0
- package/dist/components/fileupload/index.d.ts +4 -9
- package/dist/components/fileupload/index.js +26 -38
- package/dist/components/form/index.d.ts +0 -1
- package/dist/components/form/index.js +0 -1
- package/dist/components/horizontalbarchart/index.d.ts +120 -0
- package/dist/components/horizontalbarchart/index.js +193 -0
- package/dist/components/input/index.d.ts +22 -22
- package/dist/components/input/index.js +76 -105
- package/dist/components/linechart/index.d.ts +114 -0
- package/dist/components/linechart/index.js +139 -0
- package/dist/components/menu/index.d.ts +9 -11
- package/dist/components/menu/index.js +42 -39
- package/dist/components/metric/index.d.ts +0 -1
- package/dist/components/metric/index.js +0 -1
- package/dist/components/numberinput/index.d.ts +14 -21
- package/dist/components/numberinput/index.js +40 -53
- package/dist/components/otpinput/index.d.ts +14 -9
- package/dist/components/otpinput/index.js +25 -18
- package/dist/components/page/index.d.ts +0 -1
- package/dist/components/page/index.js +1 -3
- package/dist/components/passwordinput/index.d.ts +14 -11
- package/dist/components/passwordinput/index.js +36 -45
- package/dist/components/popover/index.d.ts +21 -19
- package/dist/components/popover/index.js +34 -15
- package/dist/components/radio/index.d.ts +13 -9
- package/dist/components/radio/index.js +69 -60
- package/dist/components/ratinginput/index.d.ts +13 -8
- package/dist/components/ratinginput/index.js +37 -17
- package/dist/components/select/index.d.ts +30 -30
- package/dist/components/select/index.js +80 -41
- package/dist/components/skeleton/index.d.ts +0 -1
- package/dist/components/skeleton/index.js +0 -1
- package/dist/components/slider/index.d.ts +14 -9
- package/dist/components/slider/index.js +64 -63
- package/dist/components/spinner/index.d.ts +1 -2
- package/dist/components/spinner/index.js +2 -3
- package/dist/components/splitter/index.d.ts +1 -2
- package/dist/components/splitter/index.js +5 -6
- package/dist/components/stepper/index.d.ts +8 -20
- package/dist/components/stepper/index.js +15 -16
- package/dist/components/switch/index.d.ts +12 -10
- package/dist/components/switch/index.js +46 -30
- package/dist/components/table/index.d.ts +3 -3
- package/dist/components/table/index.js +14 -13
- package/dist/components/tabs/index.d.ts +0 -1
- package/dist/components/tabs/index.js +1 -2
- package/dist/components/textarea/index.d.ts +14 -11
- package/dist/components/textarea/index.js +37 -46
- package/dist/components/textlink/index.d.ts +3 -1
- package/dist/components/textlink/index.js +4 -1
- package/dist/components/toast/index.d.ts +8 -14
- package/dist/components/toast/index.js +48 -48
- package/dist/components/toggle/index.d.ts +0 -1
- package/dist/components/toggle/index.js +17 -24
- package/dist/components/tooltip/index.d.ts +11 -13
- package/dist/components/tooltip/index.js +12 -9
- package/dist/components/tour/index.d.ts +154 -0
- package/dist/components/tour/index.js +280 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.js +7 -1
- package/dist/types/Icon.d.ts +0 -1
- package/dist/types/Icon.js +0 -1
- package/dist/types/Style.d.ts +0 -1
- package/dist/types/Style.js +0 -1
- package/dist/types/Validation.d.ts +12 -0
- package/dist/types/Validation.js +1 -0
- package/dist/utils/ArkStateToDataAttributes.d.ts +0 -1
- package/dist/utils/ArkStateToDataAttributes.js +0 -1
- package/dist/utils/Validation.d.ts +14 -0
- package/dist/utils/Validation.js +23 -0
- package/dist/utils/asChild.d.ts +41 -0
- package/dist/utils/asChild.js +15 -0
- package/dist/utils/icons.d.ts +24 -0
- package/dist/utils/icons.js +160 -0
- package/dist/utils/useForwardClickToInput.d.ts +0 -1
- package/dist/utils/useForwardClickToInput.js +0 -1
- package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts +0 -1
- package/dist/utils/virtualization/useVirtualizedAutocomplete.js +0 -1
- package/dist/utils/virtualization/useVirtualizedCombobox.d.ts +0 -1
- package/dist/utils/virtualization/useVirtualizedCombobox.js +0 -1
- package/dist/utils/virtualization/useVirtualizedTable.d.ts +0 -1
- package/dist/utils/virtualization/useVirtualizedTable.js +0 -1
- package/package.json +14 -11
- package/src/presets/shopify-polaris/shopify-polaris-autocomplete.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-barchart.css +64 -0
- package/src/presets/shopify-polaris/shopify-polaris-carousel.css +62 -0
- package/src/presets/shopify-polaris/shopify-polaris-checkbox.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-combobox.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-datepicker.css +4 -4
- package/src/presets/shopify-polaris/shopify-polaris-dialog.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-donutchart.css +172 -0
- package/src/presets/shopify-polaris/shopify-polaris-drawer.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-exception.css +40 -0
- package/src/presets/shopify-polaris/shopify-polaris-fileupload.css +1 -1
- package/src/presets/shopify-polaris/shopify-polaris-horizontalbarchart.css +60 -0
- package/src/presets/shopify-polaris/shopify-polaris-input.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-linechart.css +68 -0
- package/src/presets/shopify-polaris/shopify-polaris-menu.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-numberinput.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-otpinput.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-passwordinput.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-popover.css +29 -0
- package/src/presets/shopify-polaris/shopify-polaris-radio.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-ratinginput.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-select.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-slider.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-stepper.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris-switch.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-textarea.css +2 -2
- package/src/presets/shopify-polaris/shopify-polaris-tooltip.css +16 -0
- package/src/presets/shopify-polaris/shopify-polaris.css +6 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-autocomplete.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-barchart.css +64 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-carousel.css +55 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-checkbox.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-combobox.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-datepicker.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-dialog.css +9 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-donutchart.css +172 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-drawer.css +9 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-exception.css +40 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-fileupload.css +1 -1
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-horizontalbarchart.css +60 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-input.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-linechart.css +68 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-menu.css +9 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-numberinput.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-otpinput.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-passwordinput.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-popover.css +22 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-radio.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-ratinginput.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-slider.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-stepper.css +9 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-switch.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-textarea.css +2 -2
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy-tooltip.css +9 -0
- package/src/presets/shopify-polaris-legacy/shopify-polaris-legacy.css +6 -0
- package/dist/components/accordion/index.d.ts.map +0 -1
- package/dist/components/accordion/index.js.map +0 -1
- package/dist/components/autocomplete/index.d.ts.map +0 -1
- package/dist/components/autocomplete/index.js.map +0 -1
- package/dist/components/avatar/index.d.ts.map +0 -1
- package/dist/components/avatar/index.js.map +0 -1
- package/dist/components/badge/index.d.ts.map +0 -1
- package/dist/components/badge/index.js.map +0 -1
- package/dist/components/banner/index.d.ts.map +0 -1
- package/dist/components/banner/index.js.map +0 -1
- package/dist/components/breadcrumb/index.d.ts.map +0 -1
- package/dist/components/breadcrumb/index.js.map +0 -1
- package/dist/components/button/index.d.ts.map +0 -1
- package/dist/components/button/index.js.map +0 -1
- package/dist/components/card/index.d.ts.map +0 -1
- package/dist/components/card/index.js.map +0 -1
- package/dist/components/checkbox/index.d.ts.map +0 -1
- package/dist/components/checkbox/index.js.map +0 -1
- package/dist/components/chip/index.d.ts.map +0 -1
- package/dist/components/chip/index.js.map +0 -1
- package/dist/components/combobox/index.d.ts.map +0 -1
- package/dist/components/combobox/index.js.map +0 -1
- package/dist/components/datepicker/index.d.ts.map +0 -1
- package/dist/components/datepicker/index.js.map +0 -1
- package/dist/components/dialog/index.d.ts.map +0 -1
- package/dist/components/dialog/index.js.map +0 -1
- package/dist/components/divider/index.d.ts.map +0 -1
- package/dist/components/divider/index.js.map +0 -1
- package/dist/components/drawer/index.d.ts.map +0 -1
- package/dist/components/drawer/index.js.map +0 -1
- package/dist/components/empty/index.d.ts.map +0 -1
- package/dist/components/empty/index.js.map +0 -1
- package/dist/components/fileupload/index.d.ts.map +0 -1
- package/dist/components/fileupload/index.js.map +0 -1
- package/dist/components/form/index.d.ts.map +0 -1
- package/dist/components/form/index.js.map +0 -1
- package/dist/components/input/index.d.ts.map +0 -1
- package/dist/components/input/index.js.map +0 -1
- package/dist/components/menu/index.d.ts.map +0 -1
- package/dist/components/menu/index.js.map +0 -1
- package/dist/components/metric/index.d.ts.map +0 -1
- package/dist/components/metric/index.js.map +0 -1
- package/dist/components/numberinput/index.d.ts.map +0 -1
- package/dist/components/numberinput/index.js.map +0 -1
- package/dist/components/otpinput/index.d.ts.map +0 -1
- package/dist/components/otpinput/index.js.map +0 -1
- package/dist/components/page/index.d.ts.map +0 -1
- package/dist/components/page/index.js.map +0 -1
- package/dist/components/passwordinput/index.d.ts.map +0 -1
- package/dist/components/passwordinput/index.js.map +0 -1
- package/dist/components/popover/index.d.ts.map +0 -1
- package/dist/components/popover/index.js.map +0 -1
- package/dist/components/radio/index.d.ts.map +0 -1
- package/dist/components/radio/index.js.map +0 -1
- package/dist/components/ratinginput/index.d.ts.map +0 -1
- package/dist/components/ratinginput/index.js.map +0 -1
- package/dist/components/select/index.d.ts.map +0 -1
- package/dist/components/select/index.js.map +0 -1
- package/dist/components/skeleton/index.d.ts.map +0 -1
- package/dist/components/skeleton/index.js.map +0 -1
- package/dist/components/slider/index.d.ts.map +0 -1
- package/dist/components/slider/index.js.map +0 -1
- package/dist/components/spinner/index.d.ts.map +0 -1
- package/dist/components/spinner/index.js.map +0 -1
- package/dist/components/splitter/index.d.ts.map +0 -1
- package/dist/components/splitter/index.js.map +0 -1
- package/dist/components/stepper/index.d.ts.map +0 -1
- package/dist/components/stepper/index.js.map +0 -1
- package/dist/components/switch/index.d.ts.map +0 -1
- package/dist/components/switch/index.js.map +0 -1
- package/dist/components/table/index.d.ts.map +0 -1
- package/dist/components/table/index.js.map +0 -1
- package/dist/components/tabs/index.d.ts.map +0 -1
- package/dist/components/tabs/index.js.map +0 -1
- package/dist/components/textarea/index.d.ts.map +0 -1
- package/dist/components/textarea/index.js.map +0 -1
- package/dist/components/textlink/index.d.ts.map +0 -1
- package/dist/components/textlink/index.js.map +0 -1
- package/dist/components/toast/index.d.ts.map +0 -1
- package/dist/components/toast/index.js.map +0 -1
- package/dist/components/toggle/index.d.ts.map +0 -1
- package/dist/components/toggle/index.js.map +0 -1
- package/dist/components/tooltip/index.d.ts.map +0 -1
- package/dist/components/tooltip/index.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/types/Icon.d.ts.map +0 -1
- package/dist/types/Icon.js.map +0 -1
- package/dist/types/Style.d.ts.map +0 -1
- package/dist/types/Style.js.map +0 -1
- package/dist/types/Tone.d.ts +0 -4
- package/dist/types/Tone.d.ts.map +0 -1
- package/dist/types/Tone.js +0 -2
- package/dist/types/Tone.js.map +0 -1
- package/dist/utils/ArkStateToDataAttributes.d.ts.map +0 -1
- package/dist/utils/ArkStateToDataAttributes.js.map +0 -1
- package/dist/utils/Tone.d.ts +0 -3
- package/dist/utils/Tone.d.ts.map +0 -1
- package/dist/utils/Tone.js +0 -7
- package/dist/utils/Tone.js.map +0 -1
- package/dist/utils/useForwardClickToInput.d.ts.map +0 -1
- package/dist/utils/useForwardClickToInput.js.map +0 -1
- package/dist/utils/virtualization/useVirtualizedAutocomplete.d.ts.map +0 -1
- package/dist/utils/virtualization/useVirtualizedAutocomplete.js.map +0 -1
- package/dist/utils/virtualization/useVirtualizedCombobox.d.ts.map +0 -1
- package/dist/utils/virtualization/useVirtualizedCombobox.js.map +0 -1
- package/dist/utils/virtualization/useVirtualizedTable.d.ts.map +0 -1
- package/dist/utils/virtualization/useVirtualizedTable.js.map +0 -1
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { createElement, forwardRef } from 'react';
|
|
3
|
+
/** Builds a Lucide-compatible icon from its SVG elements, so the package ships only the icons it uses instead of the whole lucide-react catalog. Icon shapes are copied from lucide-react v1.57.0 (ISC license, https://lucide.dev). */
|
|
4
|
+
function createIcon(name, iconNode) {
|
|
5
|
+
const Icon = forwardRef(function Icon({ size = 24, width, height, color = 'currentColor', strokeWidth = 2, absoluteStrokeWidth, nonScalingStroke, className, children, ...props }, ref) {
|
|
6
|
+
// Keeping the stroke the same visual thickness at any size, when asked
|
|
7
|
+
const iconStrokeWidth = absoluteStrokeWidth
|
|
8
|
+
? (Number(strokeWidth) * 24) / Number(width ?? size)
|
|
9
|
+
: strokeWidth;
|
|
10
|
+
// Hiding the icon from screen readers unless it was given an accessible name
|
|
11
|
+
const hasAccessibleProp = Boolean(children) ||
|
|
12
|
+
Object.keys(props).some((prop) => prop.startsWith('aria-') || prop === 'role' || prop === 'title');
|
|
13
|
+
return (_jsxs("svg", { ref: ref, xmlns: "http://www.w3.org/2000/svg", width: width ?? size, height: height ?? size, viewBox: "0 0 24 24", fill: "none", stroke: color, strokeWidth: iconStrokeWidth, strokeLinecap: "round", strokeLinejoin: "round", className: ['lucide', `lucide-${name}`, className]
|
|
14
|
+
.filter(Boolean)
|
|
15
|
+
.join(' '), "aria-hidden": hasAccessibleProp ? undefined : 'true', ...props, children: [iconNode.map(([tag, attributes], index) => createElement(tag, {
|
|
16
|
+
key: index,
|
|
17
|
+
vectorEffect: nonScalingStroke ? 'non-scaling-stroke' : undefined,
|
|
18
|
+
...attributes,
|
|
19
|
+
})), children] }));
|
|
20
|
+
});
|
|
21
|
+
Icon.displayName = name.replace(/(^|-)(\w)/g, (_match, _dash, letter) => letter.toUpperCase());
|
|
22
|
+
return Icon;
|
|
23
|
+
}
|
|
24
|
+
export const ArrowLeft = /* @__PURE__ */ createIcon('arrow-left', [
|
|
25
|
+
['path', { d: 'm12 19-7-7 7-7' }],
|
|
26
|
+
['path', { d: 'M19 12H5' }],
|
|
27
|
+
]);
|
|
28
|
+
export const CalendarDays = /* @__PURE__ */ createIcon('calendar-days', [
|
|
29
|
+
['path', { d: 'M8 2v3' }],
|
|
30
|
+
['path', { d: 'M16 2v3' }],
|
|
31
|
+
['rect', { x: '3', y: '3', width: '18', height: '18', rx: '2' }],
|
|
32
|
+
['path', { d: 'M3 9h18' }],
|
|
33
|
+
['path', { d: 'M8 13h.01' }],
|
|
34
|
+
['path', { d: 'M12 13h.01' }],
|
|
35
|
+
['path', { d: 'M16 13h.01' }],
|
|
36
|
+
['path', { d: 'M8 17h.01' }],
|
|
37
|
+
['path', { d: 'M12 17h.01' }],
|
|
38
|
+
['path', { d: 'M16 17h.01' }],
|
|
39
|
+
]);
|
|
40
|
+
export const Check = /* @__PURE__ */ createIcon('check', [
|
|
41
|
+
['path', { d: 'M20 6 9 17l-5-5' }],
|
|
42
|
+
]);
|
|
43
|
+
export const ChevronDown = /* @__PURE__ */ createIcon('chevron-down', [
|
|
44
|
+
['path', { d: 'm6 9 6 6 6-6' }],
|
|
45
|
+
]);
|
|
46
|
+
export const ChevronLeft = /* @__PURE__ */ createIcon('chevron-left', [
|
|
47
|
+
['path', { d: 'm15 18-6-6 6-6' }],
|
|
48
|
+
]);
|
|
49
|
+
export const ChevronRight = /* @__PURE__ */ createIcon('chevron-right', [
|
|
50
|
+
['path', { d: 'm9 18 6-6-6-6' }],
|
|
51
|
+
]);
|
|
52
|
+
export const ChevronUp = /* @__PURE__ */ createIcon('chevron-up', [
|
|
53
|
+
['path', { d: 'm18 15-6-6-6 6' }],
|
|
54
|
+
]);
|
|
55
|
+
export const ChevronsUpDown = /* @__PURE__ */ createIcon('chevrons-up-down', [
|
|
56
|
+
['path', { d: 'm7 15 5 5 5-5' }],
|
|
57
|
+
['path', { d: 'm7 9 5-5 5 5' }],
|
|
58
|
+
]);
|
|
59
|
+
export const CircleAlert = /* @__PURE__ */ createIcon('circle-alert', [
|
|
60
|
+
['circle', { cx: '12', cy: '12', r: '10' }],
|
|
61
|
+
['line', { x1: '12', x2: '12', y1: '8', y2: '12' }],
|
|
62
|
+
['line', { x1: '12', x2: '12.01', y1: '16', y2: '16' }],
|
|
63
|
+
]);
|
|
64
|
+
export const CircleCheck = /* @__PURE__ */ createIcon('circle-check', [
|
|
65
|
+
['circle', { cx: '12', cy: '12', r: '10' }],
|
|
66
|
+
['path', { d: 'm16 9-5.5 5.5L8 12' }],
|
|
67
|
+
]);
|
|
68
|
+
export const Eye = /* @__PURE__ */ createIcon('eye', [
|
|
69
|
+
[
|
|
70
|
+
'path',
|
|
71
|
+
{
|
|
72
|
+
d: 'M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0',
|
|
73
|
+
},
|
|
74
|
+
],
|
|
75
|
+
['circle', { cx: '12', cy: '12', r: '3' }],
|
|
76
|
+
]);
|
|
77
|
+
export const EyeOff = /* @__PURE__ */ createIcon('eye-off', [
|
|
78
|
+
[
|
|
79
|
+
'path',
|
|
80
|
+
{
|
|
81
|
+
d: 'M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49',
|
|
82
|
+
},
|
|
83
|
+
],
|
|
84
|
+
['path', { d: 'M14.084 14.158a3 3 0 0 1-4.242-4.242' }],
|
|
85
|
+
[
|
|
86
|
+
'path',
|
|
87
|
+
{
|
|
88
|
+
d: 'M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143',
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
['path', { d: 'm2 2 20 20' }],
|
|
92
|
+
]);
|
|
93
|
+
export const File = /* @__PURE__ */ createIcon('file', [
|
|
94
|
+
[
|
|
95
|
+
'path',
|
|
96
|
+
{
|
|
97
|
+
d: 'M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z',
|
|
98
|
+
},
|
|
99
|
+
],
|
|
100
|
+
['path', { d: 'M14 2v5a1 1 0 0 0 1 1h5' }],
|
|
101
|
+
]);
|
|
102
|
+
export const FolderOpen = /* @__PURE__ */ createIcon('folder-open', [
|
|
103
|
+
[
|
|
104
|
+
'path',
|
|
105
|
+
{
|
|
106
|
+
d: 'm6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2',
|
|
107
|
+
},
|
|
108
|
+
],
|
|
109
|
+
]);
|
|
110
|
+
export const GripVertical = /* @__PURE__ */ createIcon('grip-vertical', [
|
|
111
|
+
['circle', { cx: '9', cy: '12', r: '1' }],
|
|
112
|
+
['circle', { cx: '9', cy: '5', r: '1' }],
|
|
113
|
+
['circle', { cx: '9', cy: '19', r: '1' }],
|
|
114
|
+
['circle', { cx: '15', cy: '12', r: '1' }],
|
|
115
|
+
['circle', { cx: '15', cy: '5', r: '1' }],
|
|
116
|
+
['circle', { cx: '15', cy: '19', r: '1' }],
|
|
117
|
+
]);
|
|
118
|
+
export const Info = /* @__PURE__ */ createIcon('info', [
|
|
119
|
+
['circle', { cx: '12', cy: '12', r: '10' }],
|
|
120
|
+
['path', { d: 'M12 16v-4' }],
|
|
121
|
+
['path', { d: 'M12 8h.01' }],
|
|
122
|
+
]);
|
|
123
|
+
export const LoaderCircle = /* @__PURE__ */ createIcon('loader-circle', [
|
|
124
|
+
['path', { d: 'M21 12a9 9 0 1 1-6.219-8.56' }],
|
|
125
|
+
]);
|
|
126
|
+
export const Minus = /* @__PURE__ */ createIcon('minus', [
|
|
127
|
+
['path', { d: 'M5 12h14' }],
|
|
128
|
+
]);
|
|
129
|
+
export const Star = /* @__PURE__ */ createIcon('star', [
|
|
130
|
+
[
|
|
131
|
+
'path',
|
|
132
|
+
{
|
|
133
|
+
d: 'M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z',
|
|
134
|
+
},
|
|
135
|
+
],
|
|
136
|
+
]);
|
|
137
|
+
export const Text = /* @__PURE__ */ createIcon('text-align-start', [
|
|
138
|
+
['path', { d: 'M21 5H3' }],
|
|
139
|
+
['path', { d: 'M15 12H3' }],
|
|
140
|
+
['path', { d: 'M17 19H3' }],
|
|
141
|
+
]);
|
|
142
|
+
export const TriangleAlert = /* @__PURE__ */ createIcon('triangle-alert', [
|
|
143
|
+
[
|
|
144
|
+
'path',
|
|
145
|
+
{
|
|
146
|
+
d: 'm21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3',
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
['path', { d: 'M12 9v4' }],
|
|
150
|
+
['path', { d: 'M12 17h.01' }],
|
|
151
|
+
]);
|
|
152
|
+
export const Upload = /* @__PURE__ */ createIcon('upload', [
|
|
153
|
+
['path', { d: 'M12 3v12' }],
|
|
154
|
+
['path', { d: 'm17 8-5-5-5 5' }],
|
|
155
|
+
['path', { d: 'M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4' }],
|
|
156
|
+
]);
|
|
157
|
+
export const X = /* @__PURE__ */ createIcon('x', [
|
|
158
|
+
['path', { d: 'M18 6 6 18' }],
|
|
159
|
+
['path', { d: 'm6 6 12 12' }],
|
|
160
|
+
]);
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import type { MouseEventHandler } from 'react';
|
|
2
2
|
/** Forward clicks on an input group to its input without calling the group's handler twice. */
|
|
3
3
|
export declare function useForwardClickToInput<T extends HTMLElement>(selector: string, onClick?: MouseEventHandler<T>): MouseEventHandler<T>;
|
|
4
|
-
//# sourceMappingURL=useForwardClickToInput.d.ts.map
|
|
@@ -195,4 +195,3 @@ export declare function FilteredItemsSync<Item extends ItemShape>({ onChange, }:
|
|
|
195
195
|
/** Spread the hook's filteredItemsSyncProps here to sync all native search results, not just mounted rows. */
|
|
196
196
|
onChange: (items: Item[]) => void;
|
|
197
197
|
}): null;
|
|
198
|
-
//# sourceMappingURL=useVirtualizedAutocomplete.d.ts.map
|
|
@@ -197,4 +197,3 @@ export declare function FilteredItemsSync<Item extends ItemShape>({ onChange, }:
|
|
|
197
197
|
/** Spread the hook's filteredItemsSyncProps here to sync all native search results, not just mounted rows. */
|
|
198
198
|
onChange: (items: Item[]) => void;
|
|
199
199
|
}): null;
|
|
200
|
-
//# sourceMappingURL=useVirtualizedCombobox.d.ts.map
|
|
@@ -166,4 +166,3 @@ export declare function useVirtualizedTable<TItem>({ items, getItemKey, estimate
|
|
|
166
166
|
scrollToIndex: (index: number, options?: Parameters<(index: number, { align: initialAlign, behavior, }?: import("@tanstack/virtual-core").ScrollToOptions) => void>[1]) => void;
|
|
167
167
|
virtualizer: import("@tanstack/react-virtual").ReactVirtualizer<HTMLTableSectionElement, HTMLTableRowElement>;
|
|
168
168
|
};
|
|
169
|
-
//# sourceMappingURL=useVirtualizedTable.d.ts.map
|
|
@@ -124,4 +124,3 @@ export function useVirtualizedTable({ items, getItemKey, estimateSize = 34, over
|
|
|
124
124
|
const scrollToIndex = useCallback((index, options) => virtualizer.scrollToIndex(index, { align: 'auto', ...options }), [virtualizer]);
|
|
125
125
|
return { bodyProps, rows, spacers, scrollToIndex, virtualizer };
|
|
126
126
|
}
|
|
127
|
-
//# sourceMappingURL=useVirtualizedTable.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@central-ui/react",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Accessible React components with optional Tailwind CSS style presets",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"keywords": [
|
|
@@ -52,15 +52,18 @@
|
|
|
52
52
|
"typescript": "6.0.3"
|
|
53
53
|
},
|
|
54
54
|
"dependencies": {
|
|
55
|
-
"@ark-ui/react": "5.39.3",
|
|
56
|
-
"@base-ui/react": "1.9.0",
|
|
57
|
-
"@internationalized/date": "3.12.4",
|
|
58
|
-
"@radix-ui/react-password-toggle-field": "0.2.1",
|
|
59
|
-
"@tanstack/react-virtual": "3.14.20",
|
|
60
|
-
"
|
|
61
|
-
"react
|
|
62
|
-
"react-aria
|
|
63
|
-
"react-
|
|
64
|
-
"
|
|
55
|
+
"@ark-ui/react": "^5.39.3",
|
|
56
|
+
"@base-ui/react": "^1.9.0",
|
|
57
|
+
"@internationalized/date": "^3.12.4",
|
|
58
|
+
"@radix-ui/react-password-toggle-field": "^0.2.1",
|
|
59
|
+
"@tanstack/react-virtual": "^3.14.20",
|
|
60
|
+
"embla-carousel-autoplay": "8.6.0",
|
|
61
|
+
"embla-carousel-react": "8.6.0",
|
|
62
|
+
"react-aria": "^3.53.1",
|
|
63
|
+
"react-aria-components": "^1.22.1",
|
|
64
|
+
"react-joyride": "^3.2.0",
|
|
65
|
+
"react-resizable-panels": "^4.14.5",
|
|
66
|
+
"recharts": "^3.10.1",
|
|
67
|
+
"tailwind-merge": "^3.7.0"
|
|
65
68
|
}
|
|
66
69
|
}
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
|
|
77
77
|
&:where([data-component='autocomplete-inputgroup']) {
|
|
78
78
|
@apply p-0 flex w-full min-w-0 items-center overflow-hidden rounded-xl border border-neutral-300 bg-white text-[0.8rem] text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-within:border-blue-500 focus-within:ring-2 focus-within:ring-blue-500/10 focus-within:shadow-sm data-disabled:cursor-not-allowed data-disabled:border-neutral-200 data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:cursor-not-allowed data-readonly:border-neutral-200 data-readonly:bg-neutral-50 data-readonly:hover:bg-neutral-50 data-readonly:shadow-none;
|
|
79
|
-
&[data-
|
|
79
|
+
&[data-validation='error'] {
|
|
80
80
|
@apply border-red-500 focus-within:border-red-500 focus-within:ring-red-500/10;
|
|
81
81
|
}
|
|
82
|
-
&[data-
|
|
82
|
+
&[data-validation='success'] {
|
|
83
83
|
@apply border-green-600 focus-within:border-green-600 focus-within:ring-green-600/10;
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/* barchart */
|
|
2
|
+
@layer components {
|
|
3
|
+
:where(:not([data-style-disabled])) {
|
|
4
|
+
&:where([data-component='barchart-gridline']) {
|
|
5
|
+
@apply stroke-neutral-200;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&:where([data-component='barchart-xaxis-ticklabel']) {
|
|
9
|
+
@apply fill-neutral-500;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:where([data-component='barchart-yaxis-ticklabel']) {
|
|
13
|
+
@apply fill-neutral-500;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:where([data-component='barchart-xaxis-line']) {
|
|
17
|
+
@apply stroke-neutral-300;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:where([data-component='barchart-yaxis-line']) {
|
|
21
|
+
@apply stroke-neutral-300;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:where([data-component='barchart-xaxis-tickline']) {
|
|
25
|
+
@apply stroke-neutral-300;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:where([data-component='barchart-yaxis-tickline']) {
|
|
29
|
+
@apply stroke-neutral-300;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:where([data-component='barchart-hoverguide']) {
|
|
33
|
+
@apply stroke-neutral-400/50;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:where([data-component='barchart-bar']) {
|
|
37
|
+
@apply fill-[#13ACF0];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:where([data-component='barchart-bar'])[data-active] {
|
|
41
|
+
@apply opacity-80;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:where([data-component='barchart-tooltip']) {
|
|
45
|
+
@apply grid min-w-56 grid-cols-[auto_1fr] items-center gap-x-1 gap-y-2 rounded-md border border-neutral-700 bg-neutral-900 p-2.5 shadow-md;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:where([data-component='barchart-tooltiptitle']) {
|
|
49
|
+
@apply col-span-full row-start-1 text-xs font-semibold leading-4 text-neutral-200;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:where([data-component='barchart-tooltiplabel']) {
|
|
53
|
+
@apply col-start-2 row-start-2 text-xs font-medium leading-4 text-neutral-400;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:where([data-component='barchart-tooltipvalue']) {
|
|
57
|
+
@apply col-span-full row-start-3 justify-self-start rounded-md bg-neutral-600 px-1.25 py-0.5 font-mono text-sm font-medium leading-5 text-neutral-200 tabular-nums;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:where([data-component='barchart-tooltipcolorindicator']) {
|
|
61
|
+
@apply col-start-1 row-start-2 h-2.5 w-2.5 rounded-sm bg-[#13ACF0];
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/* carousel */
|
|
2
|
+
@layer components {
|
|
3
|
+
:where(:not([data-style-disabled])) {
|
|
4
|
+
&:where([data-component='carousel-slideslist']) {
|
|
5
|
+
@apply w-full rounded-xl;
|
|
6
|
+
&[data-orientation='vertical'] {
|
|
7
|
+
@apply h-72;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
&:where([data-component='carousel-slide']) {
|
|
12
|
+
@apply basis-full;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
&:where([data-component='carousel-previousbutton']),
|
|
16
|
+
&:where([data-component='carousel-nextbutton']) {
|
|
17
|
+
@apply flex size-7 shrink-0 cursor-pointer items-center justify-center rounded-full p-0 outline-none focus-visible:outline-2 focus-visible:outline-blue-500 enabled:active:scale-97 transition-[background-color,transform] duration-400 ease-[cubic-bezier(0.2,0.8,0,1)] motion-reduce:transition-none disabled:pointer-events-none disabled:cursor-default;
|
|
18
|
+
|
|
19
|
+
&:not(:disabled) {
|
|
20
|
+
@apply bg-neutral-200 text-neutral-950 hover:bg-neutral-300 focus-visible:bg-neutral-300 active:bg-neutral-300;
|
|
21
|
+
}
|
|
22
|
+
&:disabled {
|
|
23
|
+
@apply bg-black/3 text-neutral-400;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
&:where([data-component='carousel-previousbuttonicon']),
|
|
28
|
+
&:where([data-component='carousel-nextbuttonicon']) {
|
|
29
|
+
@apply h-4 w-fit shrink-0;
|
|
30
|
+
&[data-orientation='vertical'] {
|
|
31
|
+
@apply rotate-90;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
&:where([data-component='carousel-indicatorlist']) {
|
|
36
|
+
@apply flex items-center justify-center gap-1.5;
|
|
37
|
+
&[data-orientation='vertical'] {
|
|
38
|
+
@apply flex-col;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
&:where([data-component='carousel-indicatorbutton']) {
|
|
43
|
+
@apply flex shrink-0 cursor-pointer items-center justify-center p-0 outline-none focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500 transition-[width,height,background-color,opacity] duration-300 motion-reduce:transition-none disabled:pointer-events-none disabled:opacity-50;
|
|
44
|
+
|
|
45
|
+
/* A dot when empty, stretching into a pill while selected */
|
|
46
|
+
&:empty {
|
|
47
|
+
@apply size-2 rounded-full bg-neutral-300 hover:bg-neutral-400 data-selected:bg-neutral-950;
|
|
48
|
+
&[data-selected][data-orientation='horizontal'] {
|
|
49
|
+
@apply w-5;
|
|
50
|
+
}
|
|
51
|
+
&[data-selected][data-orientation='vertical'] {
|
|
52
|
+
@apply h-5;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
/* Custom content, like a thumbnail, faded until selected */
|
|
57
|
+
&:not(:empty) {
|
|
58
|
+
@apply overflow-hidden rounded-lg opacity-50 hover:opacity-80 data-selected:opacity-100;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
&:where([data-component='checkbox-button']) {
|
|
13
13
|
@apply mt-0.5 row-start-1 flex size-4.25 shrink-0 cursor-pointer items-center justify-center rounded-sm border border-neutral-300 bg-white text-white shadow-xs transition-all duration-150 data-checked:border-neutral-950 data-checked:bg-neutral-950 data-indeterminate:border-neutral-950 data-indeterminate:bg-neutral-950 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 data-disabled:cursor-not-allowed data-disabled:opacity-50;
|
|
14
|
-
&[data-
|
|
14
|
+
&[data-validation='error'] {
|
|
15
15
|
@apply border-red-600 bg-red-50 data-checked:border-red-600 data-checked:bg-red-600 data-indeterminate:border-red-600 data-indeterminate:bg-red-600;
|
|
16
16
|
}
|
|
17
|
-
&[data-
|
|
17
|
+
&[data-validation='success'] {
|
|
18
18
|
@apply border-green-700 bg-green-50 data-checked:border-green-700 data-checked:bg-green-700 data-indeterminate:border-green-700 data-indeterminate:bg-green-700;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -84,10 +84,10 @@
|
|
|
84
84
|
|
|
85
85
|
&:where([data-component='combobox-inputgroup']) {
|
|
86
86
|
@apply p-0 flex w-full min-w-0 items-center overflow-hidden rounded-xl border border-neutral-300 bg-white text-[0.8rem] text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-within:border-blue-500 focus-within:ring-2 focus-within:ring-blue-500/10 focus-within:shadow-sm data-disabled:cursor-not-allowed data-disabled:border-neutral-200 data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:cursor-not-allowed data-readonly:border-neutral-200 data-readonly:bg-neutral-50 data-readonly:hover:bg-neutral-50 data-readonly:shadow-none;
|
|
87
|
-
&[data-
|
|
87
|
+
&[data-validation='error'] {
|
|
88
88
|
@apply border-red-500 focus-within:border-red-500 focus-within:ring-red-500/10;
|
|
89
89
|
}
|
|
90
|
-
&[data-
|
|
90
|
+
&[data-validation='success'] {
|
|
91
91
|
@apply border-green-600 focus-within:border-green-600 focus-within:ring-green-600/10;
|
|
92
92
|
}
|
|
93
93
|
}
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
&:where([data-component='datepicker-inputgroup']) {
|
|
13
13
|
@apply p-0 flex w-full min-w-0 items-center overflow-hidden rounded-xl border border-neutral-300 bg-white text-[0.8rem] text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 data-[focus-within]:border-blue-500 data-[focus-within]:ring-2 data-[focus-within]:ring-blue-500/10 data-[focus-within]:shadow-sm data-disabled:cursor-not-allowed data-disabled:border-neutral-200 data-disabled:bg-white data-disabled:text-neutral-400 data-disabled:shadow-none data-disabled:hover:bg-white data-readonly:cursor-not-allowed data-readonly:border-neutral-200 data-readonly:bg-neutral-50 data-readonly:hover:bg-neutral-50 data-readonly:shadow-none;
|
|
14
|
-
&[data-
|
|
14
|
+
&[data-validation='error'] {
|
|
15
15
|
@apply border-red-500 data-[focus-within]:border-red-500 data-[focus-within]:ring-red-500/10;
|
|
16
16
|
}
|
|
17
|
-
&[data-
|
|
17
|
+
&[data-validation='success'] {
|
|
18
18
|
@apply border-green-600 data-[focus-within]:border-green-600 data-[focus-within]:ring-green-600/10;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -88,10 +88,10 @@
|
|
|
88
88
|
|
|
89
89
|
&:where([data-component='datepicker-openbutton']) {
|
|
90
90
|
@apply flex h-8.5 w-fit shrink-0 cursor-pointer items-center justify-center gap-1.75 overflow-hidden rounded-xl border border-neutral-300 bg-white px-2.5 text-sm font-normal text-neutral-950 shadow-xs outline-none hover:bg-neutral-50 focus-visible:border-blue-500 focus-visible:ring-2 focus-visible:ring-blue-500/10 focus-visible:shadow-sm disabled:pointer-events-none disabled:bg-white disabled:text-neutral-400 disabled:shadow-none aria-expanded:border-blue-500 aria-expanded:ring-2 aria-expanded:ring-blue-500/10 aria-expanded:shadow-sm;
|
|
91
|
-
&[data-
|
|
91
|
+
&[data-validation='error'] {
|
|
92
92
|
@apply border-red-500 focus-visible:border-red-500 focus-visible:ring-red-500/10 aria-expanded:border-red-500 aria-expanded:ring-red-500/10;
|
|
93
93
|
}
|
|
94
|
-
&[data-
|
|
94
|
+
&[data-validation='success'] {
|
|
95
95
|
@apply border-green-600 focus-visible:border-green-600 focus-visible:ring-green-600/10 aria-expanded:border-green-600 aria-expanded:ring-green-600/10;
|
|
96
96
|
}
|
|
97
97
|
}
|
|
@@ -38,3 +38,19 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
/* dialog action buttons, styled like a secondary Button */
|
|
43
|
+
@layer components {
|
|
44
|
+
:where(:not([data-style-disabled])) {
|
|
45
|
+
&:where([data-component='dialog-openbutton']) {
|
|
46
|
+
@apply relative flex w-fit cursor-pointer items-center justify-center gap-1.5 rounded-full font-medium text-nowrap select-none outline-none focus-visible:outline-2 focus-visible:outline-blue-500 enabled:active:scale-97 transition-[background-color,box-shadow,transform] duration-400 ease-[cubic-bezier(0.2,0.8,0,1)] motion-reduce:transition-none disabled:pointer-events-none disabled:cursor-default min-h-7 px-4 py-1 text-[0.8rem] leading-4;
|
|
47
|
+
|
|
48
|
+
&:not(:disabled) {
|
|
49
|
+
@apply bg-neutral-200 text-neutral-950 hover:bg-neutral-300 focus-visible:bg-neutral-300 active:bg-neutral-300 aria-expanded:bg-neutral-300;
|
|
50
|
+
}
|
|
51
|
+
&:disabled {
|
|
52
|
+
@apply bg-black/3 text-neutral-400;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
/* donutchart */
|
|
2
|
+
@layer components {
|
|
3
|
+
:where(:not([data-style-disabled])) {
|
|
4
|
+
&:where([data-component='donutchart-track']) {
|
|
5
|
+
@apply fill-neutral-100;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
&:where([data-component='donutchart-slice'])[data-index='0'] {
|
|
9
|
+
@apply fill-[#13ACF0];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
&:where([data-component='donutchart-slice'])[data-index='1'] {
|
|
13
|
+
@apply fill-[#5365F6];
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
&:where([data-component='donutchart-slice'])[data-index='2'] {
|
|
17
|
+
@apply fill-[#8B5CF6];
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&:where([data-component='donutchart-slice'])[data-index='3'] {
|
|
21
|
+
@apply fill-[#B163E8];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&:where([data-component='donutchart-slice'])[data-index='4'] {
|
|
25
|
+
@apply fill-[#00AEFF];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
&:where([data-component='donutchart-slice'])[data-index='5'] {
|
|
29
|
+
@apply fill-[#FF9500];
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
&:where([data-component='donutchart-slice'])[data-index='6'] {
|
|
33
|
+
@apply fill-[#00FFB7];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:where([data-component='donutchart-slice'])[data-index='7'] {
|
|
37
|
+
@apply fill-[#FFDD46];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
&:where([data-component='donutchart-slice'])[data-inactive] {
|
|
41
|
+
@apply opacity-40;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&:where([data-component='donutchart-body']) {
|
|
45
|
+
@apply flex size-full flex-col items-center justify-center gap-1 text-center;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
&:where([data-component='donutchart-bodytitle']) {
|
|
49
|
+
@apply max-w-full truncate text-sm leading-5 text-neutral-700;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
&:where([data-component='donutchart-bodyvalue']) {
|
|
53
|
+
@apply max-w-full truncate text-2xl leading-8 font-semibold tabular-nums text-neutral-950;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
&:where([data-component='donutchart-legendlist']) {
|
|
57
|
+
@apply flex min-w-48 flex-col gap-2;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
&:where([data-component='donutchart-legendlist'])[data-position='right'] {
|
|
61
|
+
@apply pl-6;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
&:where([data-component='donutchart-legendlist'])[data-position='bottom'] {
|
|
65
|
+
@apply pt-4;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
&:where([data-component='donutchart-legenditem']) {
|
|
69
|
+
@apply grid grid-cols-[auto_1fr_auto] items-center gap-x-2 text-sm leading-5;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
&:where([data-component='donutchart-legenditem'])[data-inactive] {
|
|
73
|
+
@apply opacity-40;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&:where([data-component='donutchart-legendcolorindicator']) {
|
|
77
|
+
@apply size-3 rounded-sm;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='0'] {
|
|
81
|
+
@apply bg-[#13ACF0];
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='1'] {
|
|
85
|
+
@apply bg-[#5365F6];
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='2'] {
|
|
89
|
+
@apply bg-[#8B5CF6];
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='3'] {
|
|
93
|
+
@apply bg-[#B163E8];
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='4'] {
|
|
97
|
+
@apply bg-[#00AEFF];
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='5'] {
|
|
101
|
+
@apply bg-[#FF9500];
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='6'] {
|
|
105
|
+
@apply bg-[#00FFB7];
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
&:where([data-component='donutchart-legendcolorindicator'])[data-index='7'] {
|
|
109
|
+
@apply bg-[#FFDD46];
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
&:where([data-component='donutchart-legendlabel']) {
|
|
113
|
+
@apply min-w-0 truncate text-neutral-600;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
&:where([data-component='donutchart-legendvalue']) {
|
|
117
|
+
@apply pl-6 text-right tabular-nums text-neutral-500;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
&:where([data-component='donutchart-tooltip']) {
|
|
121
|
+
@apply grid min-w-56 grid-cols-[auto_1fr] items-center gap-x-1 gap-y-2 rounded-md border border-neutral-700 bg-neutral-900 p-2.5 shadow-md;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&:where([data-component='donutchart-tooltiptitle']) {
|
|
125
|
+
@apply col-span-full row-start-1 text-xs font-semibold leading-4 text-neutral-200;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
&:where([data-component='donutchart-tooltiplabel']) {
|
|
129
|
+
@apply col-start-2 row-start-2 text-xs font-medium leading-4 text-neutral-400;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&:where([data-component='donutchart-tooltipvalue']) {
|
|
133
|
+
@apply col-span-full row-start-3 justify-self-start rounded-md bg-neutral-600 px-1.25 py-0.5 font-mono text-sm font-medium leading-5 text-neutral-200 tabular-nums;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
&:where([data-component='donutchart-tooltipcolorindicator']) {
|
|
137
|
+
@apply col-start-1 row-start-2 h-2.5 w-2.5 rounded-sm;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='0'] {
|
|
141
|
+
@apply bg-[#13ACF0];
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='1'] {
|
|
145
|
+
@apply bg-[#5365F6];
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='2'] {
|
|
149
|
+
@apply bg-[#8B5CF6];
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='3'] {
|
|
153
|
+
@apply bg-[#B163E8];
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='4'] {
|
|
157
|
+
@apply bg-[#00AEFF];
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='5'] {
|
|
161
|
+
@apply bg-[#FF9500];
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='6'] {
|
|
165
|
+
@apply bg-[#00FFB7];
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
&:where([data-component='donutchart-tooltipcolorindicator'])[data-index='7'] {
|
|
169
|
+
@apply bg-[#FFDD46];
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
}
|
|
@@ -38,3 +38,19 @@
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
/* drawer action buttons, styled like a secondary Button */
|
|
43
|
+
@layer components {
|
|
44
|
+
:where(:not([data-style-disabled])) {
|
|
45
|
+
&:where([data-component='drawer-openbutton']) {
|
|
46
|
+
@apply relative flex w-fit cursor-pointer items-center justify-center gap-1.5 rounded-full font-medium text-nowrap select-none outline-none focus-visible:outline-2 focus-visible:outline-blue-500 enabled:active:scale-97 transition-[background-color,box-shadow,transform] duration-400 ease-[cubic-bezier(0.2,0.8,0,1)] motion-reduce:transition-none disabled:pointer-events-none disabled:cursor-default min-h-7 px-4 py-1 text-[0.8rem] leading-4;
|
|
47
|
+
|
|
48
|
+
&:not(:disabled) {
|
|
49
|
+
@apply bg-neutral-200 text-neutral-950 hover:bg-neutral-300 focus-visible:bg-neutral-300 active:bg-neutral-300 aria-expanded:bg-neutral-300;
|
|
50
|
+
}
|
|
51
|
+
&:disabled {
|
|
52
|
+
@apply bg-black/3 text-neutral-400;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|