@cognite/aura 0.2.0 → 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/README.md +36 -3
- package/dist/colors.css +30 -0
- package/dist/components/index.d.ts +6 -36
- package/dist/components/index.js +311 -347
- package/dist/components/ui/core/accordion/accordion.d.ts +7 -7
- package/dist/components/ui/core/accordion/accordion.js +49 -47
- package/dist/components/ui/core/action-toolbar/action-toolbar.d.ts +41 -0
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +176 -0
- package/dist/components/ui/core/alert/alert.d.ts +23 -12
- package/dist/components/ui/core/alert/alert.js +123 -120
- package/dist/components/ui/core/avatar/avatar.d.ts +12 -8
- package/dist/components/ui/core/badge/badge.d.ts +11 -8
- package/dist/components/ui/core/banner/banner.d.ts +18 -28
- package/dist/components/ui/core/banner/banner.js +6 -6
- package/dist/components/ui/core/breadcrumb/breadcrumb.d.ts +10 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +98 -88
- package/dist/components/ui/core/button/button.d.ts +8 -5
- package/dist/components/ui/core/button/button.js +22 -19
- package/dist/components/ui/core/button-group/button-group.d.ts +7 -6
- package/dist/components/ui/core/card/card.d.ts +17 -16
- package/dist/components/ui/core/chart/chart.d.ts +69 -0
- package/dist/components/ui/core/chart/chart.js +215 -0
- package/dist/components/ui/core/chart/index.d.ts +2 -0
- package/dist/components/ui/core/chart/index.js +8 -0
- package/dist/components/ui/core/checkbox/checkbox.d.ts +13 -9
- package/dist/components/ui/core/checkbox/checkbox.js +38 -34
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +52 -48
- package/dist/components/ui/core/collapsible/collapsible.d.ts +5 -3
- package/dist/components/ui/core/combobox/combobox.d.ts +2 -2
- package/dist/components/ui/core/command/command.d.ts +11 -78
- package/dist/components/ui/core/command/command.js +53 -52
- package/dist/components/ui/core/count/count.d.ts +7 -6
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +99 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/types.d.ts +25 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.d.ts +4 -0
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +82 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +190 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/types.d.ts +42 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +161 -0
- package/dist/components/ui/core/date-time-pickers/index.d.ts +6 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.d.ts +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +57 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +119 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +93 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.d.ts +20 -0
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +14 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.d.ts +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +99 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +68 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.d.ts +12 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +40 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.d.ts +29 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +63 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +19 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.d.ts +17 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +34 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.d.ts +8 -0
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +7 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.d.ts +13 -0
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +31 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.d.ts +10 -0
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.d.ts +48 -0
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +52 -0
- package/dist/components/ui/core/date-time-pickers/utils/date-range-utils.d.ts +26 -0
- package/dist/components/ui/core/date-time-pickers/utils/format-utils.d.ts +37 -0
- package/dist/components/ui/core/date-time-pickers/utils/segment-utils.d.ts +34 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.d.ts +43 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +15 -0
- package/dist/components/ui/core/date-time-pickers/utils/time-validation.d.ts +23 -0
- package/dist/components/ui/core/dialog/dialog.d.ts +10 -10
- package/dist/components/ui/core/dialog/dialog.js +12 -3
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +24 -47
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +125 -123
- package/dist/components/ui/core/empty-state/empty-state.context.d.ts +10 -0
- package/dist/components/ui/core/empty-state/empty-state.context.js +8 -0
- package/dist/components/ui/core/empty-state/empty-state.d.ts +18 -0
- package/dist/components/ui/core/empty-state/empty-state.js +139 -0
- package/dist/components/ui/core/helper-text/helper-text.d.ts +7 -5
- package/dist/components/ui/core/hover-card/hover-card.d.ts +5 -7
- package/dist/components/ui/core/hover-card/hover-card.js +26 -25
- package/dist/components/ui/core/inline-citation/inline-citation.d.ts +10 -10
- package/dist/components/ui/core/inline-citation/inline-citation.js +57 -49
- package/dist/components/ui/core/input/input.d.ts +2 -1
- package/dist/components/ui/core/input-group/input-group.d.ts +17 -13
- package/dist/components/ui/core/input-group/input-group.js +35 -36
- package/dist/components/ui/core/kbd/kbd.d.ts +3 -2
- package/dist/components/ui/core/label/label.d.ts +3 -2
- package/dist/components/ui/core/loader/loader.d.ts +2 -2
- package/dist/components/ui/core/message/message.d.ts +18 -17
- package/dist/components/ui/core/message/message.js +15 -13
- package/dist/components/ui/core/pagination/pagination-size-context.d.ts +5 -0
- package/dist/components/ui/core/pagination/pagination-size-context.js +6 -0
- package/dist/components/ui/core/pagination/pagination-teleport.d.ts +11 -0
- package/dist/components/ui/core/pagination/pagination-teleport.js +108 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.d.ts +1 -0
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +7 -0
- package/dist/components/ui/core/pagination/pagination.d.ts +41 -0
- package/dist/components/ui/core/pagination/pagination.js +335 -0
- package/dist/components/ui/core/popover/popover.d.ts +12 -16
- package/dist/components/ui/core/popover/popover.js +52 -51
- package/dist/components/ui/core/progress/progress.d.ts +7 -4
- package/dist/components/ui/core/prompt-input/prompt-input.d.ts +36 -103
- package/dist/components/ui/core/prompt-input/prompt-input.js +193 -180
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
- package/dist/components/ui/core/radio-group/radio-group.js +58 -55
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- package/dist/components/ui/core/reasoning/reasoning.js +1 -1
- package/dist/components/ui/core/scroll-area/scroll-area.d.ts +4 -2
- package/dist/components/ui/core/search/search.d.ts +10 -0
- package/dist/components/ui/core/search/search.js +99 -0
- package/dist/components/ui/core/segmented-control/segmented-control.d.ts +15 -11
- package/dist/components/ui/core/segmented-control/segmented-control.js +7 -4
- package/dist/components/ui/core/select/select.d.ts +13 -13
- package/dist/components/ui/core/select/select.js +13 -10
- package/dist/components/ui/core/separator/separator.d.ts +2 -4
- package/dist/components/ui/core/separator/separator.js +4 -5
- package/dist/components/ui/core/shimmer/shimmer.d.ts +3 -5
- package/dist/components/ui/core/shimmer/shimmer.js +25 -26
- package/dist/components/ui/core/skeleton/skeleton.d.ts +2 -1
- package/dist/components/ui/core/sonner-toast/sonner-toast.d.ts +2 -1
- package/dist/components/ui/core/sources/sources.d.ts +3 -3
- package/dist/components/ui/core/sources/sources.js +6 -1
- package/dist/components/ui/core/switch/switch.d.ts +11 -0
- package/dist/components/ui/core/{button/button.metadata.d.ts → switch/switch.metadata.d.ts} +1 -1
- package/dist/components/ui/core/tabs/tabs.d.ts +21 -17
- package/dist/components/ui/core/tabs/tabs.js +14 -12
- package/dist/components/ui/core/textarea/textarea.d.ts +2 -1
- package/dist/components/ui/core/textarea/textarea.js +20 -18
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +48 -44
- package/dist/components/ui/core/tooltip/tooltip.d.ts +6 -5
- package/dist/components/ui/core/tooltip/tooltip.js +10 -8
- package/dist/components/ui/core/topbar/topbar.d.ts +11 -13
- package/dist/eslint/index.d.ts +2 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +302 -336
- package/dist/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +1 -3
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +9 -1
- package/package.json +22 -1
- package/dist/components/ui/core/accordion/accordion.metadata.d.ts +0 -2
- package/dist/components/ui/core/accordion/accordion.metadata.js +0 -9
- package/dist/components/ui/core/alert/alert.metadata.d.ts +0 -2
- package/dist/components/ui/core/alert/alert.metadata.js +0 -9
- package/dist/components/ui/core/avatar/avatar.metadata.d.ts +0 -8
- package/dist/components/ui/core/avatar/avatar.metadata.js +0 -9
- package/dist/components/ui/core/badge/badge.metadata.d.ts +0 -2
- package/dist/components/ui/core/badge/badge.metadata.js +0 -8
- package/dist/components/ui/core/banner/banner.metadata.d.ts +0 -2
- package/dist/components/ui/core/banner/banner.metadata.js +0 -9
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.d.ts +0 -2
- package/dist/components/ui/core/breadcrumb/breadcrumb.metadata.js +0 -9
- package/dist/components/ui/core/button/button.metadata.js +0 -9
- package/dist/components/ui/core/button-group/button-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/button-group/button-group.metadata.js +0 -8
- package/dist/components/ui/core/card/card.metadata.d.ts +0 -8
- package/dist/components/ui/core/card/card.metadata.js +0 -9
- package/dist/components/ui/core/code-block/code-block.metadata.d.ts +0 -2
- package/dist/components/ui/core/code-block/code-block.metadata.js +0 -8
- package/dist/components/ui/core/collapsible/collapsible.metadata.d.ts +0 -2
- package/dist/components/ui/core/collapsible/collapsible.metadata.js +0 -9
- package/dist/components/ui/core/combobox/combobox.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.d.ts +0 -2
- package/dist/components/ui/core/command/command.metadata.js +0 -9
- package/dist/components/ui/core/dialog/dialog.metadata.d.ts +0 -2
- package/dist/components/ui/core/dialog/dialog.metadata.js +0 -9
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.d.ts +0 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.metadata.js +0 -9
- package/dist/components/ui/core/helper-text/helper-text.metadata.d.ts +0 -2
- package/dist/components/ui/core/helper-text/helper-text.metadata.js +0 -9
- package/dist/components/ui/core/hover-card/hover-card.metadata.d.ts +0 -2
- package/dist/components/ui/core/hover-card/hover-card.metadata.js +0 -8
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.d.ts +0 -2
- package/dist/components/ui/core/inline-citation/inline-citation.metadata.js +0 -8
- package/dist/components/ui/core/input/input.metadata.d.ts +0 -2
- package/dist/components/ui/core/input/input.metadata.js +0 -9
- package/dist/components/ui/core/input-group/input-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/input-group/input-group.metadata.js +0 -9
- package/dist/components/ui/core/kbd/kbd.metadata.d.ts +0 -2
- package/dist/components/ui/core/kbd/kbd.metadata.js +0 -9
- package/dist/components/ui/core/label/label.metadata.d.ts +0 -2
- package/dist/components/ui/core/label/label.metadata.js +0 -9
- package/dist/components/ui/core/loader/loader.metadata.d.ts +0 -2
- package/dist/components/ui/core/loader/loader.metadata.js +0 -9
- package/dist/components/ui/core/message/message.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.d.ts +0 -2
- package/dist/components/ui/core/popover/popover.metadata.js +0 -9
- package/dist/components/ui/core/progress/progress.metadata.d.ts +0 -2
- package/dist/components/ui/core/progress/progress.metadata.js +0 -9
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.d.ts +0 -2
- package/dist/components/ui/core/prompt-input/prompt-input.metadata.js +0 -9
- package/dist/components/ui/core/radio-group/radio-group.metadata.d.ts +0 -2
- package/dist/components/ui/core/radio-group/radio-group.metadata.js +0 -9
- package/dist/components/ui/core/reasoning/reasoning.metadata.d.ts +0 -2
- package/dist/components/ui/core/reasoning/reasoning.metadata.js +0 -8
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.d.ts +0 -2
- package/dist/components/ui/core/scroll-area/scroll-area.metadata.js +0 -9
- package/dist/components/ui/core/select/select.metadata.d.ts +0 -2
- package/dist/components/ui/core/select/select.metadata.js +0 -9
- package/dist/components/ui/core/separator/separator.metadata.d.ts +0 -2
- package/dist/components/ui/core/separator/separator.metadata.js +0 -8
- package/dist/components/ui/core/shimmer/shimmer.metadata.d.ts +0 -2
- package/dist/components/ui/core/shimmer/shimmer.metadata.js +0 -9
- package/dist/components/ui/core/skeleton/skeleton.metadata.d.ts +0 -2
- package/dist/components/ui/core/skeleton/skeleton.metadata.js +0 -9
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.d.ts +0 -2
- package/dist/components/ui/core/sonner-toast/sonner-toast.metadata.js +0 -9
- package/dist/components/ui/core/sources/sources.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.d.ts +0 -2
- package/dist/components/ui/core/textarea/textarea.metadata.js +0 -9
- package/dist/components/ui/core/tool/tool.metadata.d.ts +0 -2
- package/dist/components/ui/core/tool/tool.metadata.js +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.d.ts +0 -8
- package/dist/components/ui/core/tooltip/tooltip.metadata.js +0 -9
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
import { Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
|
|
2
|
+
import { AccordionItemProps, AccordionPanelProps, AccordionTriggerProps, Accordion as AccordionPrimitive } from '@base-ui/react/accordion';
|
|
3
3
|
import { Icon } from '@tabler/icons-react';
|
|
4
4
|
type AccordionCommonProps = Omit<ComponentProps<typeof AccordionPrimitive.Root>, 'multiple' | 'value' | 'defaultValue' | 'onValueChange'>;
|
|
5
5
|
type AccordionSingleProps = {
|
|
@@ -15,10 +15,10 @@ type AccordionMultipleProps = {
|
|
|
15
15
|
defaultValue?: string[];
|
|
16
16
|
onValueChange?: (value: string[]) => void;
|
|
17
17
|
};
|
|
18
|
-
declare const Accordion:
|
|
19
|
-
declare const AccordionItem:
|
|
20
|
-
declare const AccordionTrigger:
|
|
18
|
+
declare const Accordion: ForwardRefExoticComponent<Omit<AccordionCommonProps, 'ref'> & (AccordionSingleProps | AccordionMultipleProps) & RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const AccordionItem: ForwardRefExoticComponent<Omit<AccordionItemProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
20
|
+
declare const AccordionTrigger: ForwardRefExoticComponent<Omit<AccordionTriggerProps & {
|
|
21
21
|
icon?: Icon;
|
|
22
|
-
},
|
|
23
|
-
declare const AccordionContent:
|
|
22
|
+
}, 'ref'> & RefAttributes<HTMLElement>>;
|
|
23
|
+
declare const AccordionContent: ForwardRefExoticComponent<Omit<AccordionPanelProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
24
24
|
export { Accordion, AccordionItem, AccordionTrigger, AccordionContent };
|
|
@@ -3,63 +3,65 @@ import { forwardRef as d } from "react";
|
|
|
3
3
|
import { Accordion as r } from "@base-ui/react/accordion";
|
|
4
4
|
import { IconChevronDown as A } from "@tabler/icons-react";
|
|
5
5
|
import { cn as u } from "../../../../lib/utils.js";
|
|
6
|
-
const C = d(
|
|
7
|
-
|
|
6
|
+
const C = d(
|
|
7
|
+
(e, t) => {
|
|
8
|
+
if (e.type === "multiple") {
|
|
9
|
+
const {
|
|
10
|
+
type: s,
|
|
11
|
+
value: c,
|
|
12
|
+
defaultValue: b,
|
|
13
|
+
onValueChange: m,
|
|
14
|
+
...x
|
|
15
|
+
} = e;
|
|
16
|
+
return /* @__PURE__ */ o(
|
|
17
|
+
r.Root,
|
|
18
|
+
{
|
|
19
|
+
ref: t,
|
|
20
|
+
"data-slot": "accordion",
|
|
21
|
+
multiple: !0,
|
|
22
|
+
value: c,
|
|
23
|
+
defaultValue: b,
|
|
24
|
+
onValueChange: (y) => {
|
|
25
|
+
if (!m) return;
|
|
26
|
+
const N = y.filter(
|
|
27
|
+
(V) => V != null
|
|
28
|
+
);
|
|
29
|
+
m(N);
|
|
30
|
+
},
|
|
31
|
+
...x
|
|
32
|
+
}
|
|
33
|
+
);
|
|
34
|
+
}
|
|
8
35
|
const {
|
|
9
|
-
type:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
36
|
+
type: n,
|
|
37
|
+
collapsible: i = !1,
|
|
38
|
+
value: l,
|
|
39
|
+
defaultValue: a,
|
|
40
|
+
onValueChange: g,
|
|
41
|
+
...p
|
|
42
|
+
} = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = a === void 0 ? void 0 : a === "" ? [] : [a];
|
|
15
43
|
return /* @__PURE__ */ o(
|
|
16
44
|
r.Root,
|
|
17
45
|
{
|
|
18
46
|
ref: t,
|
|
19
47
|
"data-slot": "accordion",
|
|
20
|
-
multiple: !
|
|
21
|
-
value:
|
|
22
|
-
defaultValue:
|
|
23
|
-
onValueChange: (
|
|
24
|
-
if (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
48
|
+
multiple: !1,
|
|
49
|
+
value: h,
|
|
50
|
+
defaultValue: v,
|
|
51
|
+
onValueChange: (s, c) => {
|
|
52
|
+
if (g) {
|
|
53
|
+
if (!i && s.length === 0) {
|
|
54
|
+
c.cancel();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
g(s[0] ?? "");
|
|
58
|
+
}
|
|
29
59
|
},
|
|
30
|
-
...
|
|
60
|
+
...p
|
|
31
61
|
}
|
|
32
62
|
);
|
|
33
63
|
}
|
|
34
|
-
|
|
35
|
-
type: n,
|
|
36
|
-
collapsible: i = !1,
|
|
37
|
-
value: l,
|
|
38
|
-
defaultValue: a,
|
|
39
|
-
onValueChange: g,
|
|
40
|
-
...p
|
|
41
|
-
} = e, h = l === void 0 ? void 0 : l === "" ? [] : [l], v = a === void 0 ? void 0 : a === "" ? [] : [a];
|
|
42
|
-
return /* @__PURE__ */ o(
|
|
43
|
-
r.Root,
|
|
44
|
-
{
|
|
45
|
-
ref: t,
|
|
46
|
-
"data-slot": "accordion",
|
|
47
|
-
multiple: !1,
|
|
48
|
-
value: h,
|
|
49
|
-
defaultValue: v,
|
|
50
|
-
onValueChange: (s, c) => {
|
|
51
|
-
if (g) {
|
|
52
|
-
if (!i && s.length === 0) {
|
|
53
|
-
c.cancel();
|
|
54
|
-
return;
|
|
55
|
-
}
|
|
56
|
-
g(s[0] ?? "");
|
|
57
|
-
}
|
|
58
|
-
},
|
|
59
|
-
...p
|
|
60
|
-
}
|
|
61
|
-
);
|
|
62
|
-
});
|
|
64
|
+
);
|
|
63
65
|
C.displayName = "Accordion";
|
|
64
66
|
const w = d(({ className: e, ...t }, n) => /* @__PURE__ */ o(
|
|
65
67
|
r.Item,
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
|
|
2
|
+
import { VariantProps } from 'class-variance-authority';
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
import { Button } from '../button/button';
|
|
5
|
+
interface ActionToolbarVariantProps {
|
|
6
|
+
width?: 'full' | 'fit' | null;
|
|
7
|
+
}
|
|
8
|
+
declare const actionToolbarVariants: (props?: (ActionToolbarVariantProps & ClassProp) | undefined) => string;
|
|
9
|
+
type ActionToolbarProps = ComponentProps<'div'> & VariantProps<typeof actionToolbarVariants> & {
|
|
10
|
+
selectedCount?: number;
|
|
11
|
+
};
|
|
12
|
+
declare const ActionToolbar: ForwardRefExoticComponent<Omit<ActionToolbarProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
13
|
+
declare const ActionToolbarSelection: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
14
|
+
type ActionToolbarSelectionSummaryProps = ComponentProps<'div'> & {
|
|
15
|
+
count?: ReactNode;
|
|
16
|
+
label?: ReactNode;
|
|
17
|
+
};
|
|
18
|
+
declare const ActionToolbarSelectionSummary: ForwardRefExoticComponent<Omit<ActionToolbarSelectionSummaryProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
19
|
+
declare const ActionToolbarActions: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
20
|
+
type ActionToolbarActionProps = Omit<ComponentProps<typeof Button>, 'size'> & ({
|
|
21
|
+
iconOnly: true;
|
|
22
|
+
'aria-label': string;
|
|
23
|
+
} | {
|
|
24
|
+
iconOnly?: false;
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
});
|
|
27
|
+
declare const ActionToolbarAction: ForwardRefExoticComponent<Omit<ComponentProps<typeof Button>, 'size' | 'ref'> & ({
|
|
28
|
+
iconOnly: true;
|
|
29
|
+
'aria-label': string;
|
|
30
|
+
} | {
|
|
31
|
+
iconOnly?: false;
|
|
32
|
+
'aria-label'?: string;
|
|
33
|
+
}) & RefAttributes<HTMLElement>>;
|
|
34
|
+
type ActionToolbarActionClearProps = Omit<ActionToolbarActionProps, 'variant' | 'iconOnly' | 'children'> & {
|
|
35
|
+
icon?: ReactNode;
|
|
36
|
+
label?: ReactNode;
|
|
37
|
+
};
|
|
38
|
+
declare const ActionToolbarActionClear: ForwardRefExoticComponent<Omit<ActionToolbarActionClearProps, 'ref'> & RefAttributes<HTMLElement>>;
|
|
39
|
+
type ActionToolbarPrimaryActionProps = Omit<ActionToolbarActionProps, 'variant' | 'iconOnly'>;
|
|
40
|
+
declare const ActionToolbarPrimaryAction: ForwardRefExoticComponent<Omit<ActionToolbarPrimaryActionProps, 'ref'> & RefAttributes<HTMLElement>>;
|
|
41
|
+
export { ActionToolbar, ActionToolbarAction, ActionToolbarActionClear, ActionToolbarActions, ActionToolbarPrimaryAction, ActionToolbarSelection, ActionToolbarSelectionSummary, };
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
import { jsx as i, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as e, useMemo as b, useContext as A, createContext as x } from "react";
|
|
3
|
+
import { IconX as T } from "@tabler/icons-react";
|
|
4
|
+
import { cva as y } from "class-variance-authority";
|
|
5
|
+
import { cn as s } from "../../../../lib/utils.js";
|
|
6
|
+
import { Button as f } from "../button/button.js";
|
|
7
|
+
import { TooltipProvider as g, Tooltip as h, TooltipTrigger as w, TooltipContent as N } from "../tooltip/tooltip.js";
|
|
8
|
+
const v = y(
|
|
9
|
+
"min-w-[400px] max-w-[1200px] h-14 flex items-center justify-between gap-3 bg-raised-background text-foreground-fixed-light pl-4 pr-3 rounded-xl shadow-default",
|
|
10
|
+
{
|
|
11
|
+
variants: {
|
|
12
|
+
width: {
|
|
13
|
+
full: "w-full",
|
|
14
|
+
fit: "w-fit"
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
defaultVariants: {
|
|
18
|
+
width: "full"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
), p = x({
|
|
22
|
+
selectedCount: void 0
|
|
23
|
+
}), k = e(
|
|
24
|
+
({ className: t, width: a, role: n = "toolbar", selectedCount: o, ...r }, l) => {
|
|
25
|
+
const c = typeof o == "number" && o === 0, d = b(() => ({ selectedCount: o }), [o]);
|
|
26
|
+
return c ? null : /* @__PURE__ */ i(g, { delayDuration: 0, children: /* @__PURE__ */ i(p.Provider, { value: d, children: /* @__PURE__ */ i(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: l,
|
|
30
|
+
"data-slot": "action-toolbar",
|
|
31
|
+
role: n,
|
|
32
|
+
className: s(v({ width: a }), t),
|
|
33
|
+
...r
|
|
34
|
+
}
|
|
35
|
+
) }) });
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
k.displayName = "ActionToolbar";
|
|
39
|
+
const C = e(
|
|
40
|
+
({ className: t, role: a = "group", ...n }, o) => /* @__PURE__ */ i(
|
|
41
|
+
"div",
|
|
42
|
+
{
|
|
43
|
+
ref: o,
|
|
44
|
+
"data-slot": "action-toolbar-selection",
|
|
45
|
+
role: a,
|
|
46
|
+
className: s("flex min-w-0 shrink-0 items-center gap-3", t),
|
|
47
|
+
...n
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
C.displayName = "ActionToolbarSelection";
|
|
52
|
+
const S = e(
|
|
53
|
+
({ className: t, count: a, label: n = "selected", children: o, ...r }, l) => {
|
|
54
|
+
const { selectedCount: c } = A(p), d = a ?? c;
|
|
55
|
+
return /* @__PURE__ */ i(
|
|
56
|
+
"div",
|
|
57
|
+
{
|
|
58
|
+
ref: l,
|
|
59
|
+
"data-slot": "action-toolbar-selection-summary",
|
|
60
|
+
className: s("flex min-w-0", t),
|
|
61
|
+
...r,
|
|
62
|
+
children: o ?? /* @__PURE__ */ m(
|
|
63
|
+
"span",
|
|
64
|
+
{
|
|
65
|
+
"data-slot": "action-toolbar-selection-label",
|
|
66
|
+
className: "flex min-w-0 items-center gap-0.5 text-sm font-medium leading-4.5 tracking-normal text-foreground-fixed-light",
|
|
67
|
+
children: [
|
|
68
|
+
d == null ? null : /* @__PURE__ */ i("span", { children: d }),
|
|
69
|
+
/* @__PURE__ */ i("span", { className: "truncate", children: n })
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
);
|
|
77
|
+
S.displayName = "ActionToolbarSelectionSummary";
|
|
78
|
+
const O = e(
|
|
79
|
+
({ className: t, role: a = "group", ...n }, o) => /* @__PURE__ */ i(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
ref: o,
|
|
83
|
+
"data-slot": "action-toolbar-actions",
|
|
84
|
+
role: a,
|
|
85
|
+
className: s(
|
|
86
|
+
"flex min-w-0 shrink-0 items-center justify-end gap-1",
|
|
87
|
+
t
|
|
88
|
+
),
|
|
89
|
+
...n
|
|
90
|
+
}
|
|
91
|
+
)
|
|
92
|
+
);
|
|
93
|
+
O.displayName = "ActionToolbarActions";
|
|
94
|
+
const u = e(
|
|
95
|
+
({
|
|
96
|
+
className: t,
|
|
97
|
+
variant: a = "ghostOnDark",
|
|
98
|
+
iconOnly: n = !1,
|
|
99
|
+
"aria-label": o,
|
|
100
|
+
children: r,
|
|
101
|
+
...l
|
|
102
|
+
}, c) => n && o ? /* @__PURE__ */ m(h, { children: [
|
|
103
|
+
/* @__PURE__ */ i(
|
|
104
|
+
w,
|
|
105
|
+
{
|
|
106
|
+
render: /* @__PURE__ */ i(
|
|
107
|
+
f,
|
|
108
|
+
{
|
|
109
|
+
ref: c,
|
|
110
|
+
"data-slot": "action-toolbar-action",
|
|
111
|
+
variant: a,
|
|
112
|
+
size: "icon",
|
|
113
|
+
"aria-label": o,
|
|
114
|
+
className: t,
|
|
115
|
+
...l,
|
|
116
|
+
children: r
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
}
|
|
120
|
+
),
|
|
121
|
+
/* @__PURE__ */ i(N, { sideOffset: 18, children: o })
|
|
122
|
+
] }) : /* @__PURE__ */ i(
|
|
123
|
+
f,
|
|
124
|
+
{
|
|
125
|
+
ref: c,
|
|
126
|
+
"data-slot": "action-toolbar-action",
|
|
127
|
+
variant: a,
|
|
128
|
+
size: n ? "icon" : "default",
|
|
129
|
+
"aria-label": o,
|
|
130
|
+
className: t,
|
|
131
|
+
...l,
|
|
132
|
+
children: r
|
|
133
|
+
}
|
|
134
|
+
)
|
|
135
|
+
);
|
|
136
|
+
u.displayName = "ActionToolbarAction";
|
|
137
|
+
const j = e(
|
|
138
|
+
({ icon: t, label: a = "Clear", ...n }, o) => /* @__PURE__ */ m(
|
|
139
|
+
u,
|
|
140
|
+
{
|
|
141
|
+
ref: o,
|
|
142
|
+
"data-slot": "action-toolbar-action-clear",
|
|
143
|
+
variant: "secondaryOnDark",
|
|
144
|
+
iconOnly: !1,
|
|
145
|
+
...n,
|
|
146
|
+
children: [
|
|
147
|
+
t ?? /* @__PURE__ */ i(T, {}),
|
|
148
|
+
a
|
|
149
|
+
]
|
|
150
|
+
}
|
|
151
|
+
)
|
|
152
|
+
);
|
|
153
|
+
j.displayName = "ActionToolbarActionClear";
|
|
154
|
+
const D = e(
|
|
155
|
+
({ className: t, ...a }, n) => /* @__PURE__ */ i(
|
|
156
|
+
u,
|
|
157
|
+
{
|
|
158
|
+
ref: n,
|
|
159
|
+
"data-slot": "action-toolbar-primary-action",
|
|
160
|
+
variant: "defaultOnDark",
|
|
161
|
+
iconOnly: !1,
|
|
162
|
+
className: s("ml-2", t),
|
|
163
|
+
...a
|
|
164
|
+
}
|
|
165
|
+
)
|
|
166
|
+
);
|
|
167
|
+
D.displayName = "ActionToolbarPrimaryAction";
|
|
168
|
+
export {
|
|
169
|
+
k as ActionToolbar,
|
|
170
|
+
u as ActionToolbarAction,
|
|
171
|
+
j as ActionToolbarActionClear,
|
|
172
|
+
O as ActionToolbarActions,
|
|
173
|
+
D as ActionToolbarPrimaryAction,
|
|
174
|
+
C as ActionToolbarSelection,
|
|
175
|
+
S as ActionToolbarSelectionSummary
|
|
176
|
+
};
|
|
@@ -1,20 +1,31 @@
|
|
|
1
|
-
import { ComponentProps, ReactNode } from 'react';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps, ReactNode } from 'react';
|
|
2
2
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
4
|
+
type AlertVariant = 'default' | 'info' | 'warning' | 'error';
|
|
5
|
+
/** @deprecated Use `'info'` instead. Will be removed in a future major release. */
|
|
6
|
+
type DeprecatedAlertVariant = 'secondary';
|
|
7
|
+
type AlertVariantInput = AlertVariant | DeprecatedAlertVariant;
|
|
8
|
+
type AlertStyle = 'card' | 'strip';
|
|
9
|
+
interface AlertVariantProps {
|
|
10
|
+
variant?: 'default' | 'error' | 'info' | 'warning' | null;
|
|
11
|
+
alertStyle?: 'card' | 'strip' | null;
|
|
12
|
+
}
|
|
13
|
+
declare const alertVariants: (props?: (AlertVariantProps & ClassProp) | undefined) => string;
|
|
7
14
|
type AlertProps = ComponentProps<'div'> & Omit<VariantProps<typeof alertVariants>, 'variant'> & {
|
|
8
|
-
variant?:
|
|
15
|
+
variant?: AlertVariantInput;
|
|
16
|
+
alertStyle?: AlertStyle;
|
|
9
17
|
visible?: boolean;
|
|
10
18
|
defaultVisible?: boolean;
|
|
11
19
|
onClose?: () => void;
|
|
12
20
|
icon?: ReactNode;
|
|
13
21
|
};
|
|
14
|
-
declare const Alert:
|
|
15
|
-
declare const AlertTitle:
|
|
16
|
-
declare const AlertDescription:
|
|
17
|
-
declare const AlertActions:
|
|
18
|
-
|
|
19
|
-
declare const
|
|
22
|
+
declare const Alert: ForwardRefExoticComponent<Omit<AlertProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
23
|
+
declare const AlertTitle: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
24
|
+
declare const AlertDescription: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
25
|
+
declare const AlertActions: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
26
|
+
type AlertButtonVariant = 'default' | 'ghost';
|
|
27
|
+
declare const AlertButton: ForwardRefExoticComponent<Omit<ComponentProps<'button'> & {
|
|
28
|
+
variant?: AlertButtonVariant;
|
|
29
|
+
}, 'ref'> & RefAttributes<HTMLButtonElement>>;
|
|
30
|
+
declare const AlertClose: ForwardRefExoticComponent<ComponentProps<'button'> & RefAttributes<HTMLButtonElement>>;
|
|
20
31
|
export { Alert, AlertTitle, AlertDescription, AlertActions, AlertButton, AlertClose, };
|