@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
|
@@ -3,36 +3,35 @@ import { forwardRef as t } from "react";
|
|
|
3
3
|
import { Radio as s } from "@base-ui/react/radio";
|
|
4
4
|
import { RadioGroup as n } from "@base-ui/react/radio-group";
|
|
5
5
|
import { cva as u } from "class-variance-authority";
|
|
6
|
-
import { cn as d,
|
|
7
|
-
const m = t(
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
6
|
+
import { cn as d, focusState as b, selectionItemDescription as l, selectionItemLabel as c, selectionItemBase as p, selectionItemCard as f, selectionItemDefault as g } from "../../../../lib/utils.js";
|
|
7
|
+
const m = t(
|
|
8
|
+
({ className: r, orientation: e = "vertical", ...o }, i) => /* @__PURE__ */ a(
|
|
9
|
+
n,
|
|
10
|
+
{
|
|
11
|
+
ref: i,
|
|
12
|
+
"data-slot": "radio-group",
|
|
13
|
+
"data-orientation": e,
|
|
14
|
+
"aria-orientation": e,
|
|
15
|
+
className: d(
|
|
16
|
+
e === "horizontal" ? "flex items-center gap-2" : "grid has-[[data-variant=card]]:gap-2",
|
|
17
|
+
r
|
|
18
|
+
),
|
|
19
|
+
...o
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
);
|
|
21
23
|
m.displayName = "RadioGroup";
|
|
22
|
-
const h = u(
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
default: c,
|
|
28
|
-
card: l
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
defaultVariants: {
|
|
32
|
-
variant: "default"
|
|
24
|
+
const h = u(d("group/radio-group-item", p), {
|
|
25
|
+
variants: {
|
|
26
|
+
variant: {
|
|
27
|
+
default: g,
|
|
28
|
+
card: f
|
|
33
29
|
}
|
|
30
|
+
},
|
|
31
|
+
defaultVariants: {
|
|
32
|
+
variant: "default"
|
|
34
33
|
}
|
|
35
|
-
), v = t(
|
|
34
|
+
}), v = t(
|
|
36
35
|
({ className: r, variant: e, ...o }, i) => /* @__PURE__ */ a(
|
|
37
36
|
"label",
|
|
38
37
|
{
|
|
@@ -57,7 +56,7 @@ const I = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
|
57
56
|
"data-[checked]:hover:before:border-border-active data-[checked]:hover:before:bg-accent-background",
|
|
58
57
|
"data-[checked]:group-hover/radio-group-item:before:border-border-active data-[checked]:group-hover/radio-group-item:before:bg-accent-background",
|
|
59
58
|
"data-[disabled]:before:border-disabled-foreground data-[disabled]:before:bg-disabled-background data-[disabled]:hover:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:border-disabled-foreground data-[disabled]:group-hover/radio-group-item:before:bg-disabled-background",
|
|
60
|
-
|
|
59
|
+
b,
|
|
61
60
|
r
|
|
62
61
|
),
|
|
63
62
|
...e,
|
|
@@ -72,34 +71,38 @@ const I = t(({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
|
72
71
|
}
|
|
73
72
|
));
|
|
74
73
|
I.displayName = "RadioGroupItemControl";
|
|
75
|
-
const R = t(
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
74
|
+
const R = t(
|
|
75
|
+
({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
76
|
+
"span",
|
|
77
|
+
{
|
|
78
|
+
ref: o,
|
|
79
|
+
"data-slot": "radio-group-item-label",
|
|
80
|
+
className: d(
|
|
81
|
+
c,
|
|
82
|
+
"group-has-[[data-checked]]/radio-group-item:text-foreground",
|
|
83
|
+
"group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
|
|
84
|
+
r
|
|
85
|
+
),
|
|
86
|
+
...e
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
);
|
|
89
90
|
R.displayName = "RadioGroupItemLabel";
|
|
90
|
-
const k = t(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
91
|
+
const k = t(
|
|
92
|
+
({ className: r, ...e }, o) => /* @__PURE__ */ a(
|
|
93
|
+
"span",
|
|
94
|
+
{
|
|
95
|
+
ref: o,
|
|
96
|
+
"data-slot": "radio-group-item-description",
|
|
97
|
+
className: d(
|
|
98
|
+
l,
|
|
99
|
+
"group-has-[[data-disabled]]/radio-group-item:text-disabled-foreground",
|
|
100
|
+
r
|
|
101
|
+
),
|
|
102
|
+
...e
|
|
103
|
+
}
|
|
104
|
+
)
|
|
105
|
+
);
|
|
103
106
|
k.displayName = "RadioGroupItemDescription";
|
|
104
107
|
export {
|
|
105
108
|
m as RadioGroup,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ComponentProps } from 'react';
|
|
2
|
-
declare const Reasoning:
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
|
|
2
|
+
declare const Reasoning: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
3
3
|
type ReasoningHeaderProps = ComponentProps<'div'> & {
|
|
4
4
|
title?: string;
|
|
5
5
|
};
|
|
6
|
-
declare const ReasoningHeader:
|
|
7
|
-
declare const ReasoningContent:
|
|
8
|
-
declare const ReasoningItem:
|
|
6
|
+
declare const ReasoningHeader: ForwardRefExoticComponent<Omit<ReasoningHeaderProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
7
|
+
declare const ReasoningContent: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
8
|
+
declare const ReasoningItem: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
9
9
|
export { Reasoning, ReasoningContent, ReasoningHeader, ReasoningItem };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as n, jsxs as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { forwardRef as s, createContext as g, useContext as c } from "react";
|
|
3
3
|
import { IconBrain as m } from "@tabler/icons-react";
|
|
4
4
|
import { cn as i } from "../../../../lib/utils.js";
|
|
5
5
|
const l = g(!0), p = () => c(l), b = s(
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes } from 'react';
|
|
2
|
+
import { ScrollAreaRootProps, ScrollAreaScrollbarProps } from '@base-ui/react/scroll-area';
|
|
3
|
+
declare const ScrollArea: ForwardRefExoticComponent<Omit<ScrollAreaRootProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
4
|
+
declare const ScrollBar: ForwardRefExoticComponent<Omit<ScrollAreaScrollbarProps, 'ref'> & RefAttributes<HTMLDivElement>>;
|
|
3
5
|
export { ScrollArea, ScrollBar };
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
|
|
2
|
+
type SearchProps = Omit<ComponentProps<'input'>, 'type' | 'className'> & {
|
|
3
|
+
className?: string;
|
|
4
|
+
inputClassName?: string;
|
|
5
|
+
clearLabel?: string;
|
|
6
|
+
onClear?: () => void;
|
|
7
|
+
'data-slot'?: never;
|
|
8
|
+
};
|
|
9
|
+
declare const Search: ForwardRefExoticComponent<Omit<SearchProps, 'ref'> & RefAttributes<HTMLInputElement | null>>;
|
|
10
|
+
export { Search };
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { jsx as t, jsxs as A } from "react/jsx-runtime";
|
|
2
|
+
import { forwardRef as D, useState as f, useRef as H, useImperativeHandle as R } from "react";
|
|
3
|
+
import { IconSearch as M, IconCircleXFilled as U } from "@tabler/icons-react";
|
|
4
|
+
import { cn as m } from "../../../../lib/utils.js";
|
|
5
|
+
import { InputGroup as W, InputGroupAddon as g, InputGroupInput as L, InputGroupButton as O } from "../input-group/input-group.js";
|
|
6
|
+
const s = (n) => typeof n == "string" ? n.length > 0 : typeof n == "number" ? Number.isFinite(n) : Array.isArray(n) ? n.length > 0 : !1, P = D(
|
|
7
|
+
({
|
|
8
|
+
className: n,
|
|
9
|
+
inputClassName: I,
|
|
10
|
+
clearLabel: b = "Clear search",
|
|
11
|
+
onClear: i,
|
|
12
|
+
value: o,
|
|
13
|
+
defaultValue: c,
|
|
14
|
+
onChange: C,
|
|
15
|
+
onInput: w,
|
|
16
|
+
onFocus: F,
|
|
17
|
+
onBlur: N,
|
|
18
|
+
disabled: l,
|
|
19
|
+
readOnly: u,
|
|
20
|
+
...y
|
|
21
|
+
}, T) => {
|
|
22
|
+
const [x, p] = f(!1), [E, d] = f(() => s(o ?? c)), a = H(null), r = o != null, k = r ? s(o) : E;
|
|
23
|
+
R(T, () => a.current, []);
|
|
24
|
+
const v = () => {
|
|
25
|
+
p(!0);
|
|
26
|
+
}, B = (e) => {
|
|
27
|
+
e.relatedTarget instanceof Node && e.currentTarget.contains(e.relatedTarget) || p(!1);
|
|
28
|
+
}, G = () => {
|
|
29
|
+
const e = a.current;
|
|
30
|
+
e != null && (i?.(), !r && e.value !== "" && (Object.getOwnPropertyDescriptor(
|
|
31
|
+
HTMLInputElement.prototype,
|
|
32
|
+
"value"
|
|
33
|
+
)?.set?.call(e, ""), e.dispatchEvent(new Event("input", { bubbles: !0 })), e.dispatchEvent(new Event("change", { bubbles: !0 }))), e.focus());
|
|
34
|
+
}, S = (e) => {
|
|
35
|
+
r || d(s(e.currentTarget.value)), w?.(e);
|
|
36
|
+
}, j = (e) => {
|
|
37
|
+
r || d(s(e.currentTarget.value)), C?.(e);
|
|
38
|
+
}, z = !r || i != null, h = x && k && !l && !u && z;
|
|
39
|
+
return /* @__PURE__ */ t(
|
|
40
|
+
"div",
|
|
41
|
+
{
|
|
42
|
+
"data-slot": "search",
|
|
43
|
+
className: m("w-full cursor-text", n),
|
|
44
|
+
onFocusCapture: v,
|
|
45
|
+
onBlurCapture: B,
|
|
46
|
+
onClick: () => a.current?.focus(),
|
|
47
|
+
children: /* @__PURE__ */ A(W, { className: "w-full transition-none", children: [
|
|
48
|
+
/* @__PURE__ */ t(g, { align: "inline-start", children: /* @__PURE__ */ t(M, { className: "size-4", "aria-hidden": !0 }) }),
|
|
49
|
+
/* @__PURE__ */ t(
|
|
50
|
+
L,
|
|
51
|
+
{
|
|
52
|
+
...y,
|
|
53
|
+
ref: a,
|
|
54
|
+
type: "search",
|
|
55
|
+
value: o,
|
|
56
|
+
defaultValue: c,
|
|
57
|
+
disabled: l,
|
|
58
|
+
readOnly: u,
|
|
59
|
+
onInput: S,
|
|
60
|
+
onChange: j,
|
|
61
|
+
onFocus: F,
|
|
62
|
+
onBlur: N,
|
|
63
|
+
className: m(
|
|
64
|
+
"placeholder:text-muted-foreground [&::-webkit-search-cancel-button]:appearance-none [&::-webkit-search-decoration]:appearance-none",
|
|
65
|
+
I
|
|
66
|
+
)
|
|
67
|
+
}
|
|
68
|
+
),
|
|
69
|
+
/* @__PURE__ */ t(
|
|
70
|
+
g,
|
|
71
|
+
{
|
|
72
|
+
align: "inline-end",
|
|
73
|
+
"aria-hidden": h ? void 0 : !0,
|
|
74
|
+
className: h ? void 0 : "invisible pointer-events-none",
|
|
75
|
+
children: /* @__PURE__ */ t(
|
|
76
|
+
O,
|
|
77
|
+
{
|
|
78
|
+
type: "button",
|
|
79
|
+
variant: "ghost",
|
|
80
|
+
size: "icon-sm",
|
|
81
|
+
"aria-label": b,
|
|
82
|
+
onMouseDown: (e) => {
|
|
83
|
+
e.preventDefault();
|
|
84
|
+
},
|
|
85
|
+
onClick: G,
|
|
86
|
+
children: /* @__PURE__ */ t(U, { className: "size-4", "aria-hidden": !0 })
|
|
87
|
+
}
|
|
88
|
+
)
|
|
89
|
+
}
|
|
90
|
+
)
|
|
91
|
+
] })
|
|
92
|
+
}
|
|
93
|
+
);
|
|
94
|
+
}
|
|
95
|
+
);
|
|
96
|
+
P.displayName = "Search";
|
|
97
|
+
export {
|
|
98
|
+
P as Search
|
|
99
|
+
};
|
|
@@ -1,16 +1,20 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { Tabs as TabsPrimitive } from '@base-ui/react/tabs';
|
|
2
3
|
import { VariantProps } from 'class-variance-authority';
|
|
3
|
-
|
|
4
|
-
declare
|
|
5
|
-
|
|
6
|
-
|
|
4
|
+
import { ClassProp } from 'class-variance-authority/types';
|
|
5
|
+
declare function SegmentedControl({ className, ...props }: TabsPrimitive.Root.Props): ReactNode;
|
|
6
|
+
interface SegmentedControlListVariantProps {
|
|
7
|
+
size?: 'small' | 'default' | null;
|
|
8
|
+
}
|
|
9
|
+
declare const segmentedControlListVariants: (props?: (SegmentedControlListVariantProps & ClassProp) | undefined) => string;
|
|
7
10
|
type SegmentedControlListProps = TabsPrimitive.List.Props & VariantProps<typeof segmentedControlListVariants>;
|
|
8
|
-
declare function SegmentedControlList({ className, size, children, ...props }: SegmentedControlListProps):
|
|
9
|
-
|
|
10
|
-
size?:
|
|
11
|
-
tabContent?:
|
|
12
|
-
}
|
|
11
|
+
declare function SegmentedControlList({ className, size, children, ...props }: SegmentedControlListProps): ReactNode;
|
|
12
|
+
interface SegmentedControlButtonVariantProps {
|
|
13
|
+
size?: 'small' | 'default' | null;
|
|
14
|
+
tabContent?: 'icon-label' | 'label-only' | 'icon-only' | null;
|
|
15
|
+
}
|
|
16
|
+
declare const segmentedControlButtonVariants: (props?: (SegmentedControlButtonVariantProps & ClassProp) | undefined) => string;
|
|
13
17
|
type SegmentedControlButtonProps = TabsPrimitive.Tab.Props & VariantProps<typeof segmentedControlButtonVariants>;
|
|
14
|
-
declare function SegmentedControlButton({ className, size, tabContent, ...props }: SegmentedControlButtonProps):
|
|
15
|
-
declare function SegmentedControlContent({ className, ...props }: TabsPrimitive.Panel.Props):
|
|
18
|
+
declare function SegmentedControlButton({ className, size, tabContent, ...props }: SegmentedControlButtonProps): ReactNode;
|
|
19
|
+
declare function SegmentedControlContent({ className, ...props }: TabsPrimitive.Panel.Props): ReactNode;
|
|
16
20
|
export { SegmentedControl, SegmentedControlButton, SegmentedControlContent, SegmentedControlList, segmentedControlButtonVariants, segmentedControlListVariants, };
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { useContext as m, createContext as f } from "react";
|
|
3
3
|
import { Tabs as a } from "@base-ui/react/tabs";
|
|
4
4
|
import { cva as l } from "class-variance-authority";
|
|
5
5
|
import { cn as i } from "../../../../lib/utils.js";
|
|
6
|
-
function N({
|
|
6
|
+
function N({
|
|
7
|
+
className: t,
|
|
8
|
+
...e
|
|
9
|
+
}) {
|
|
7
10
|
return /* @__PURE__ */ n(
|
|
8
11
|
a.Root,
|
|
9
12
|
{
|
|
@@ -26,7 +29,7 @@ const g = l(
|
|
|
26
29
|
size: "default"
|
|
27
30
|
}
|
|
28
31
|
}
|
|
29
|
-
), d =
|
|
32
|
+
), d = f(void 0);
|
|
30
33
|
function S({
|
|
31
34
|
className: t,
|
|
32
35
|
size: e,
|
|
@@ -133,7 +136,7 @@ function w({
|
|
|
133
136
|
tabContent: o,
|
|
134
137
|
...r
|
|
135
138
|
}) {
|
|
136
|
-
const s =
|
|
139
|
+
const s = m(d), c = e ?? s;
|
|
137
140
|
return /* @__PURE__ */ n(
|
|
138
141
|
a.Tab,
|
|
139
142
|
{
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { Select as SelectPrimitive } from '@base-ui/react/select';
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ReactNode } from 'react';
|
|
2
|
+
import { SelectTriggerProps, Select as SelectPrimitive } from '@base-ui/react/select';
|
|
3
3
|
type SelectPropsBase = Omit<SelectPrimitive.Root.Props<string>, 'open' | 'defaultOpen' | 'onOpenChange' | 'value' | 'defaultValue' | 'onValueChange' | 'multiple'> & {
|
|
4
4
|
open?: boolean;
|
|
5
5
|
defaultOpen?: boolean;
|
|
@@ -19,26 +19,26 @@ type SelectPropsMultiple = SelectPropsBase & {
|
|
|
19
19
|
};
|
|
20
20
|
declare function Select(props: SelectPropsSingle): ReactNode;
|
|
21
21
|
declare function Select(props: SelectPropsMultiple): ReactNode;
|
|
22
|
-
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props):
|
|
22
|
+
declare function SelectGroup({ className, ...props }: SelectPrimitive.Group.Props): ReactNode;
|
|
23
23
|
declare function SelectValue({ icon, ...props }: SelectPrimitive.Value.Props & {
|
|
24
24
|
icon?: ReactNode;
|
|
25
|
-
}):
|
|
26
|
-
declare const SelectTrigger:
|
|
27
|
-
size?:
|
|
25
|
+
}): ReactNode;
|
|
26
|
+
declare const SelectTrigger: ForwardRefExoticComponent<Omit<SelectTriggerProps & {
|
|
27
|
+
size?: 'sm' | 'default';
|
|
28
28
|
errorMessage?: string;
|
|
29
|
-
},
|
|
29
|
+
}, 'ref'> & RefAttributes<HTMLButtonElement>>;
|
|
30
30
|
declare function SelectContent({ className, children, position: _position, align, alignOffset, side, sideOffset, ...props }: SelectPrimitive.Popup.Props & {
|
|
31
31
|
position?: 'popper' | 'item-aligned';
|
|
32
32
|
align?: SelectPrimitive.Positioner.Props['align'];
|
|
33
33
|
alignOffset?: SelectPrimitive.Positioner.Props['alignOffset'];
|
|
34
34
|
side?: SelectPrimitive.Positioner.Props['side'];
|
|
35
35
|
sideOffset?: SelectPrimitive.Positioner.Props['sideOffset'];
|
|
36
|
-
}):
|
|
37
|
-
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props):
|
|
36
|
+
}): ReactNode;
|
|
37
|
+
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): ReactNode;
|
|
38
38
|
declare function SelectItem({ className, children, icon, ...props }: SelectPrimitive.Item.Props & {
|
|
39
39
|
icon?: ReactNode;
|
|
40
|
-
}):
|
|
41
|
-
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props):
|
|
42
|
-
declare function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpArrow.Props):
|
|
43
|
-
declare function SelectScrollDownButton({ className, ...props }: SelectPrimitive.ScrollDownArrow.Props):
|
|
40
|
+
}): ReactNode;
|
|
41
|
+
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): ReactNode;
|
|
42
|
+
declare function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpArrow.Props): ReactNode;
|
|
43
|
+
declare function SelectScrollDownButton({ className, ...props }: SelectPrimitive.ScrollDownArrow.Props): ReactNode;
|
|
44
44
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import { jsx as t, jsxs as u, Fragment as C } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo as N, forwardRef as y, useId as z, createContext as I, useContext as V } from "react";
|
|
3
3
|
import { Select as o } from "@base-ui/react/select";
|
|
4
|
-
import {
|
|
4
|
+
import { IconCheck as k, IconChevronDown as h, IconChevronUp as _, IconExclamationCircle as O } from "@tabler/icons-react";
|
|
5
5
|
import { usePortalContainer as P } from "../../../../lib/portal-container-context.js";
|
|
6
6
|
import { useControllableState as j } from "../../../../lib/use-controllable-state.js";
|
|
7
7
|
import { cn as r, disabledState as T, invalidState as D, focusState as B, filledState as E, hoverState as G, formElementBase as L } from "../../../../lib/utils.js";
|
|
8
|
-
const g =
|
|
9
|
-
const e =
|
|
8
|
+
const g = I(null), R = () => {
|
|
9
|
+
const e = V(g);
|
|
10
10
|
if (!e)
|
|
11
11
|
throw new Error("Select components must be used within Select");
|
|
12
12
|
return e;
|
|
@@ -16,7 +16,7 @@ function Y(e) {
|
|
|
16
16
|
prop: e.open,
|
|
17
17
|
defaultProp: e.defaultOpen ?? !1,
|
|
18
18
|
onChange: e.onOpenChange
|
|
19
|
-
}), n =
|
|
19
|
+
}), n = N(() => ({ isOpen: a ?? !1 }), [a]);
|
|
20
20
|
if (e.multiple) {
|
|
21
21
|
const {
|
|
22
22
|
multiple: p,
|
|
@@ -57,7 +57,10 @@ function Y(e) {
|
|
|
57
57
|
}
|
|
58
58
|
) });
|
|
59
59
|
}
|
|
60
|
-
function Z({
|
|
60
|
+
function Z({
|
|
61
|
+
className: e,
|
|
62
|
+
...a
|
|
63
|
+
}) {
|
|
61
64
|
return /* @__PURE__ */ t(
|
|
62
65
|
o.Group,
|
|
63
66
|
{
|
|
@@ -126,7 +129,7 @@ const U = y(({ className: e, size: a = "default", children: l, errorMessage: n,
|
|
|
126
129
|
id: d,
|
|
127
130
|
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
128
131
|
children: [
|
|
129
|
-
/* @__PURE__ */ t(
|
|
132
|
+
/* @__PURE__ */ t(O, { className: "text-destructive-foreground text-sm size-4" }),
|
|
130
133
|
/* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
|
|
131
134
|
]
|
|
132
135
|
}
|
|
@@ -207,7 +210,7 @@ function ae({
|
|
|
207
210
|
/* @__PURE__ */ t(
|
|
208
211
|
o.ItemIndicator,
|
|
209
212
|
{
|
|
210
|
-
render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(
|
|
213
|
+
render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(k, { className: "size-4 text-foreground" }) })
|
|
211
214
|
}
|
|
212
215
|
),
|
|
213
216
|
l && /* @__PURE__ */ t("span", { className: "flex items-center gap-2 mr-1", children: l }),
|
|
@@ -242,7 +245,7 @@ function A({
|
|
|
242
245
|
e
|
|
243
246
|
),
|
|
244
247
|
...a,
|
|
245
|
-
children: /* @__PURE__ */ t(
|
|
248
|
+
children: /* @__PURE__ */ t(_, { className: "size-4" })
|
|
246
249
|
}
|
|
247
250
|
);
|
|
248
251
|
}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { Separator as SeparatorPrimitive } from '@base-ui/react/separator';
|
|
2
|
-
declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props):
|
|
3
|
-
declare namespace Separator {
|
|
4
|
-
var displayName: string;
|
|
5
|
-
}
|
|
3
|
+
declare function Separator({ className, orientation, ...props }: SeparatorPrimitive.Props): ReactNode;
|
|
6
4
|
export { Separator };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
2
|
import { Separator as i } from "@base-ui/react/separator";
|
|
3
|
-
import { cn as
|
|
4
|
-
function
|
|
3
|
+
import { cn as n } from "../../../../lib/utils.js";
|
|
4
|
+
function m({
|
|
5
5
|
className: a,
|
|
6
6
|
orientation: r = "horizontal",
|
|
7
7
|
...t
|
|
@@ -11,7 +11,7 @@ function n({
|
|
|
11
11
|
{
|
|
12
12
|
"data-slot": "separator",
|
|
13
13
|
orientation: r,
|
|
14
|
-
className:
|
|
14
|
+
className: n(
|
|
15
15
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
16
16
|
a
|
|
17
17
|
),
|
|
@@ -19,7 +19,6 @@ function n({
|
|
|
19
19
|
}
|
|
20
20
|
);
|
|
21
21
|
}
|
|
22
|
-
n.displayName = "Separator";
|
|
23
22
|
export {
|
|
24
|
-
|
|
23
|
+
m as Separator
|
|
25
24
|
};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { MemoExoticComponent, ReactNode } from 'react';
|
|
1
2
|
type TextShimmerProps = {
|
|
2
3
|
children: string;
|
|
3
4
|
as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
|
|
@@ -6,9 +7,6 @@ type TextShimmerProps = {
|
|
|
6
7
|
spread?: number;
|
|
7
8
|
variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
|
|
8
9
|
};
|
|
9
|
-
declare function ShimmerComponent({ children, as: Component, className, duration, spread, variant, }: TextShimmerProps):
|
|
10
|
-
declare
|
|
11
|
-
var displayName: string;
|
|
12
|
-
}
|
|
13
|
-
declare const MemoizedShimmer: import('react').MemoExoticComponent<typeof ShimmerComponent>;
|
|
10
|
+
declare function ShimmerComponent({ children, as: Component, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
|
|
11
|
+
declare const MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent>;
|
|
14
12
|
export { MemoizedShimmer as Shimmer };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import { memo as
|
|
2
|
+
import { memo as h, useMemo as s } from "react";
|
|
3
3
|
import { motion as a } from "framer-motion";
|
|
4
|
-
import { cn as
|
|
5
|
-
const
|
|
4
|
+
import { cn as f } from "../../../../lib/utils.js";
|
|
5
|
+
const v = {
|
|
6
6
|
nordic: "var(--gradient-nordic)",
|
|
7
7
|
aurora: "var(--gradient-aurora)",
|
|
8
8
|
dusk: "var(--gradient-dusk)",
|
|
@@ -11,42 +11,42 @@ const S = {
|
|
|
11
11
|
spring: "var(--gradient-spring)",
|
|
12
12
|
fall: "var(--gradient-fall)"
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function S({
|
|
15
15
|
children: n,
|
|
16
|
-
as:
|
|
17
|
-
className:
|
|
18
|
-
duration:
|
|
19
|
-
spread:
|
|
16
|
+
as: m = "p",
|
|
17
|
+
className: d,
|
|
18
|
+
duration: c = 2,
|
|
19
|
+
spread: o = 2,
|
|
20
20
|
variant: t = "default"
|
|
21
21
|
}) {
|
|
22
|
-
const
|
|
23
|
-
() => (n?.length ?? 0) *
|
|
24
|
-
[n,
|
|
25
|
-
),
|
|
26
|
-
const
|
|
27
|
-
return t === "default" ? `${
|
|
28
|
-
}, [t]),
|
|
29
|
-
"--spread": `${
|
|
30
|
-
backgroundImage:
|
|
22
|
+
const u = s(
|
|
23
|
+
() => (n?.length ?? 0) * o,
|
|
24
|
+
[n, o]
|
|
25
|
+
), p = s(() => {
|
|
26
|
+
const i = "linear-gradient(90deg, transparent calc(50% - var(--spread)), rgba(255, 255, 255, 0.4), transparent calc(50% + var(--spread)))";
|
|
27
|
+
return t === "default" ? `${i}, linear-gradient(var(--color-muted-foreground), var(--color-muted-foreground))` : `${i}, ${v[t]}`;
|
|
28
|
+
}, [t]), g = {
|
|
29
|
+
"--spread": `${u}px`,
|
|
30
|
+
backgroundImage: p,
|
|
31
31
|
backgroundSize: "250% 100%, 100% 100%"
|
|
32
|
-
},
|
|
32
|
+
}, l = {
|
|
33
33
|
repeat: Number.POSITIVE_INFINITY,
|
|
34
|
-
duration:
|
|
34
|
+
duration: c,
|
|
35
35
|
ease: "linear"
|
|
36
36
|
}, r = {
|
|
37
37
|
"data-slot": "shimmer",
|
|
38
38
|
animate: {
|
|
39
39
|
backgroundPosition: ["100% center, center", "0% center, center"]
|
|
40
40
|
},
|
|
41
|
-
className:
|
|
41
|
+
className: f(
|
|
42
42
|
"relative inline-block bg-clip-text text-transparent rounded-md",
|
|
43
|
-
|
|
43
|
+
d
|
|
44
44
|
),
|
|
45
|
-
style:
|
|
46
|
-
transition:
|
|
45
|
+
style: g,
|
|
46
|
+
transition: l,
|
|
47
47
|
children: n
|
|
48
48
|
};
|
|
49
|
-
switch (
|
|
49
|
+
switch (m) {
|
|
50
50
|
case "span":
|
|
51
51
|
return /* @__PURE__ */ e(a.span, { ...r });
|
|
52
52
|
case "div":
|
|
@@ -61,8 +61,7 @@ function m({
|
|
|
61
61
|
return /* @__PURE__ */ e(a.p, { ...r });
|
|
62
62
|
}
|
|
63
63
|
}
|
|
64
|
-
|
|
65
|
-
const b = f(m);
|
|
64
|
+
const b = h(S);
|
|
66
65
|
b.displayName = "Shimmer";
|
|
67
66
|
export {
|
|
68
67
|
b as Shimmer
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
1
|
+
import { ForwardRefExoticComponent, RefAttributes, ComponentProps } from 'react';
|
|
2
|
+
declare const Skeleton: ForwardRefExoticComponent<ComponentProps<'div'> & RefAttributes<HTMLDivElement>>;
|
|
2
3
|
export { Skeleton };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ToasterProps, toast } from 'sonner';
|
|
2
|
-
declare const Toaster: ({ ...props }: ToasterProps) =>
|
|
3
|
+
declare const Toaster: ({ ...props }: ToasterProps) => ReactNode;
|
|
3
4
|
export { Toaster, toast };
|
|
@@ -3,14 +3,14 @@ import { InlineCitationLink } from '../inline-citation/inline-citation';
|
|
|
3
3
|
type SourcesProps = Omit<ComponentProps<'div'>, 'title'> & {
|
|
4
4
|
title?: ReactNode | boolean;
|
|
5
5
|
};
|
|
6
|
-
declare const Sources: ({ className, title, children, ...props }: SourcesProps) =>
|
|
6
|
+
declare const Sources: ({ className, title, children, ...props }: SourcesProps) => ReactNode;
|
|
7
7
|
type SourcesTitleProps = ComponentProps<'div'> & {
|
|
8
8
|
title?: string;
|
|
9
9
|
};
|
|
10
|
-
declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) =>
|
|
10
|
+
declare const SourcesTitle: ({ className, title, children, ...props }: SourcesTitleProps) => ReactNode;
|
|
11
11
|
type SourceProps = ComponentProps<typeof InlineCitationLink> & {
|
|
12
12
|
title?: string;
|
|
13
13
|
url?: string;
|
|
14
14
|
};
|
|
15
|
-
declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) =>
|
|
15
|
+
declare const Source: ({ href, url, title, variant, target, icon, className, children, ...props }: SourceProps) => ReactNode;
|
|
16
16
|
export { Source, Sources, SourcesTitle };
|