@cognite/aura 0.2.0 → 0.3.1
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/DESIGN.md +869 -870
- package/README.md +143 -9
- package/dist/colors.css +30 -0
- package/dist/components/index.d.ts +7 -36
- package/dist/components/index.js +319 -350
- 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/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 +32 -28
- package/dist/components/ui/core/code-block/code-block.d.ts +6 -9
- package/dist/components/ui/core/code-block/code-block.js +48 -44
- 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-picker/date-picker.d.ts +15 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +84 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/index.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/types.d.ts +18 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.d.ts +3 -0
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +63 -0
- 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 +8 -0
- package/dist/components/ui/core/date-time-pickers/index.js +8 -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-single-date-state.d.ts +23 -0
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +32 -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 +23 -22
- 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/input.js +1 -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 +387 -99
- 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 +337 -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 +180 -167
- package/dist/components/ui/core/radio-group/radio-group.d.ts +12 -8
- package/dist/components/ui/core/radio-group/radio-group.js +56 -53
- package/dist/components/ui/core/reasoning/reasoning.d.ts +5 -5
- 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 +4 -1
- package/dist/components/ui/core/select/select.d.ts +15 -14
- package/dist/components/ui/core/select/select.js +135 -108
- 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 +5 -5
- package/dist/components/ui/core/shimmer/shimmer.js +91 -52
- 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 +11 -9
- 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/toggle/toggle.d.ts +15 -0
- package/dist/components/ui/core/toggle/toggle.js +74 -0
- package/dist/components/ui/core/tool/tool.d.ts +7 -6
- package/dist/components/ui/core/tool/tool.js +47 -43
- 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/lib/portal-container-context.d.ts +2 -1
- package/dist/lib/portal-container-context.js +3 -5
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.js +7 -7
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +12 -1
- package/package.json +217 -14
- 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
- package/dist/index.js +0 -342
|
@@ -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, };
|
|
@@ -3,7 +3,10 @@ import { createContext as m, useContext 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
|
{
|
|
@@ -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,27 @@ 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):
|
|
38
|
-
declare function SelectItem({ className, children, icon, ...props }: SelectPrimitive.Item.Props & {
|
|
36
|
+
}): ReactNode;
|
|
37
|
+
declare function SelectLabel({ className, ...props }: SelectPrimitive.GroupLabel.Props): ReactNode;
|
|
38
|
+
declare function SelectItem({ className, children, icon, suffix, ...props }: SelectPrimitive.Item.Props & {
|
|
39
39
|
icon?: ReactNode;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
declare function
|
|
43
|
-
declare function
|
|
40
|
+
suffix?: ReactNode;
|
|
41
|
+
}): ReactNode;
|
|
42
|
+
declare function SelectSeparator({ className, ...props }: SelectPrimitive.Separator.Props): ReactNode;
|
|
43
|
+
declare function SelectScrollUpButton({ className, ...props }: SelectPrimitive.ScrollUpArrow.Props): ReactNode;
|
|
44
|
+
declare function SelectScrollDownButton({ className, ...props }: SelectPrimitive.ScrollDownArrow.Props): ReactNode;
|
|
44
45
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
@@ -1,117 +1,134 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { createContext as
|
|
3
|
-
import { Select as
|
|
4
|
-
import { IconChevronDown as
|
|
1
|
+
import { jsxs as m, Fragment as N, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { createContext as C, forwardRef as y, useId as z, useContext as k, useMemo as I } from "react";
|
|
3
|
+
import { Select as a } from "@base-ui/react/select";
|
|
4
|
+
import { IconChevronDown as v, IconExclamationCircle as V, IconCheck as _, IconChevronUp 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
|
-
import { cn as
|
|
8
|
-
const g =
|
|
9
|
-
const e =
|
|
7
|
+
import { cn as i, 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 = C(null), R = () => {
|
|
9
|
+
const e = k(g);
|
|
10
10
|
if (!e)
|
|
11
11
|
throw new Error("Select components must be used within Select");
|
|
12
12
|
return e;
|
|
13
13
|
};
|
|
14
14
|
function Y(e) {
|
|
15
|
-
const [
|
|
15
|
+
const [o, r] = j({
|
|
16
16
|
prop: e.open,
|
|
17
17
|
defaultProp: e.defaultOpen ?? !1,
|
|
18
18
|
onChange: e.onOpenChange
|
|
19
|
-
}), n =
|
|
19
|
+
}), n = I(() => ({ isOpen: o ?? !1 }), [o]);
|
|
20
20
|
if (e.multiple) {
|
|
21
21
|
const {
|
|
22
|
-
multiple:
|
|
23
|
-
value:
|
|
22
|
+
multiple: f,
|
|
23
|
+
value: h,
|
|
24
24
|
defaultValue: b,
|
|
25
|
-
onValueChange:
|
|
26
|
-
...
|
|
25
|
+
onValueChange: w,
|
|
26
|
+
...S
|
|
27
27
|
} = e;
|
|
28
28
|
return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
|
|
29
|
-
|
|
29
|
+
a.Root,
|
|
30
30
|
{
|
|
31
31
|
"data-slot": "select",
|
|
32
|
-
open:
|
|
33
|
-
onOpenChange: (
|
|
34
|
-
value:
|
|
32
|
+
open: o,
|
|
33
|
+
onOpenChange: (p) => r(p),
|
|
34
|
+
value: h,
|
|
35
35
|
defaultValue: b,
|
|
36
|
-
onValueChange: (
|
|
37
|
-
|
|
36
|
+
onValueChange: (p, W) => {
|
|
37
|
+
w?.(p ?? []);
|
|
38
38
|
},
|
|
39
39
|
multiple: !0,
|
|
40
|
-
...
|
|
40
|
+
...S
|
|
41
41
|
}
|
|
42
42
|
) });
|
|
43
43
|
}
|
|
44
|
-
const { value:
|
|
44
|
+
const { value: l, defaultValue: s, onValueChange: c, ...d } = e, u = l === void 0 ? void 0 : l === "" ? null : l, x = s === void 0 ? void 0 : s === "" ? null : s;
|
|
45
45
|
return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
|
|
46
|
-
|
|
46
|
+
a.Root,
|
|
47
47
|
{
|
|
48
48
|
"data-slot": "select",
|
|
49
|
-
open:
|
|
50
|
-
onOpenChange: (
|
|
51
|
-
value:
|
|
49
|
+
open: o,
|
|
50
|
+
onOpenChange: (f) => r(f),
|
|
51
|
+
value: u,
|
|
52
52
|
defaultValue: x,
|
|
53
|
-
onValueChange: (
|
|
54
|
-
|
|
53
|
+
onValueChange: (f, h) => {
|
|
54
|
+
c?.(typeof f == "string" ? f : "");
|
|
55
55
|
},
|
|
56
|
-
...
|
|
56
|
+
...d
|
|
57
57
|
}
|
|
58
58
|
) });
|
|
59
59
|
}
|
|
60
|
-
function Z({
|
|
60
|
+
function Z({
|
|
61
|
+
className: e,
|
|
62
|
+
...o
|
|
63
|
+
}) {
|
|
61
64
|
return /* @__PURE__ */ t(
|
|
62
|
-
|
|
65
|
+
a.Group,
|
|
63
66
|
{
|
|
64
67
|
"data-slot": "select-group",
|
|
65
|
-
className:
|
|
66
|
-
...
|
|
68
|
+
className: i("scroll-my-1 p-1", e),
|
|
69
|
+
...o
|
|
67
70
|
}
|
|
68
71
|
);
|
|
69
72
|
}
|
|
70
73
|
function M({
|
|
71
74
|
icon: e,
|
|
72
|
-
...
|
|
75
|
+
...o
|
|
73
76
|
}) {
|
|
74
|
-
return e ? /* @__PURE__ */
|
|
77
|
+
return e ? /* @__PURE__ */ m("span", { className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden", children: [
|
|
75
78
|
e,
|
|
76
|
-
/* @__PURE__ */ t(
|
|
77
|
-
|
|
79
|
+
/* @__PURE__ */ t(
|
|
80
|
+
a.Value,
|
|
81
|
+
{
|
|
82
|
+
"data-slot": "select-value",
|
|
83
|
+
className: "flex-1 truncate min-w-0",
|
|
84
|
+
...o
|
|
85
|
+
}
|
|
86
|
+
)
|
|
87
|
+
] }) : /* @__PURE__ */ t(
|
|
88
|
+
a.Value,
|
|
89
|
+
{
|
|
90
|
+
"data-slot": "select-value",
|
|
91
|
+
className: "flex-1 truncate min-w-0",
|
|
92
|
+
...o
|
|
93
|
+
}
|
|
94
|
+
);
|
|
78
95
|
}
|
|
79
|
-
const U = y(({ className: e, size:
|
|
80
|
-
const { isOpen:
|
|
81
|
-
return /* @__PURE__ */
|
|
82
|
-
/* @__PURE__ */
|
|
83
|
-
|
|
96
|
+
const U = y(({ className: e, size: o = "default", children: r, errorMessage: n, ...l }, s) => {
|
|
97
|
+
const { isOpen: c } = R(), d = !!n, u = z();
|
|
98
|
+
return /* @__PURE__ */ m(N, { children: [
|
|
99
|
+
/* @__PURE__ */ m(
|
|
100
|
+
a.Trigger,
|
|
84
101
|
{
|
|
85
|
-
ref:
|
|
102
|
+
ref: s,
|
|
86
103
|
"data-slot": "select-trigger",
|
|
87
|
-
"data-size":
|
|
88
|
-
"aria-invalid":
|
|
89
|
-
"aria-describedby":
|
|
90
|
-
className:
|
|
91
|
-
"w-
|
|
104
|
+
"data-size": o,
|
|
105
|
+
"aria-invalid": d ? !0 : void 0,
|
|
106
|
+
"aria-describedby": d ? u : void 0,
|
|
107
|
+
className: i(
|
|
108
|
+
"w-full min-w-50 h-9 max-w-[min(100%,420px)] flex items-center justify-between gap-2 text-left overflow-hidden transition-[color,box-shadow] cursor-pointer",
|
|
92
109
|
L,
|
|
93
110
|
G,
|
|
94
111
|
E,
|
|
95
112
|
B,
|
|
113
|
+
c && "shadow-focus-ring bg-background border-transparent focus:border-transparent hover:border-transparent text-foreground",
|
|
96
114
|
D,
|
|
97
115
|
T,
|
|
98
116
|
"dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background",
|
|
99
117
|
"[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
100
|
-
"*:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-2",
|
|
101
118
|
e
|
|
102
119
|
),
|
|
103
|
-
...
|
|
120
|
+
...l,
|
|
104
121
|
children: [
|
|
105
|
-
|
|
122
|
+
r,
|
|
106
123
|
/* @__PURE__ */ t(
|
|
107
|
-
|
|
124
|
+
a.Icon,
|
|
108
125
|
{
|
|
109
126
|
render: /* @__PURE__ */ t(
|
|
110
|
-
|
|
127
|
+
v,
|
|
111
128
|
{
|
|
112
|
-
className:
|
|
129
|
+
className: i(
|
|
113
130
|
"size-4 opacity-50 transition-transform",
|
|
114
|
-
|
|
131
|
+
c ? "rotate-180" : "rotate-0"
|
|
115
132
|
)
|
|
116
133
|
}
|
|
117
134
|
)
|
|
@@ -120,13 +137,13 @@ const U = y(({ className: e, size: a = "default", children: l, errorMessage: n,
|
|
|
120
137
|
]
|
|
121
138
|
}
|
|
122
139
|
),
|
|
123
|
-
n && /* @__PURE__ */
|
|
140
|
+
n && /* @__PURE__ */ m(
|
|
124
141
|
"div",
|
|
125
142
|
{
|
|
126
|
-
id:
|
|
143
|
+
id: u,
|
|
127
144
|
className: "flex flex-row gap-1 justify-start items-center p-1",
|
|
128
145
|
children: [
|
|
129
|
-
/* @__PURE__ */ t(
|
|
146
|
+
/* @__PURE__ */ t(V, { className: "text-destructive-foreground text-sm size-4" }),
|
|
130
147
|
/* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
|
|
131
148
|
]
|
|
132
149
|
}
|
|
@@ -136,38 +153,38 @@ const U = y(({ className: e, size: a = "default", children: l, errorMessage: n,
|
|
|
136
153
|
U.displayName = "SelectTrigger";
|
|
137
154
|
function ee({
|
|
138
155
|
className: e,
|
|
139
|
-
children:
|
|
140
|
-
position:
|
|
156
|
+
children: o,
|
|
157
|
+
position: r = "popper",
|
|
141
158
|
align: n = "start",
|
|
142
|
-
alignOffset:
|
|
143
|
-
side:
|
|
144
|
-
sideOffset:
|
|
145
|
-
...
|
|
159
|
+
alignOffset: l = 0,
|
|
160
|
+
side: s = "bottom",
|
|
161
|
+
sideOffset: c = 4,
|
|
162
|
+
...d
|
|
146
163
|
}) {
|
|
147
|
-
const
|
|
148
|
-
return /* @__PURE__ */ t(
|
|
149
|
-
|
|
164
|
+
const u = P();
|
|
165
|
+
return /* @__PURE__ */ t(a.Portal, { container: u, children: /* @__PURE__ */ t(
|
|
166
|
+
a.Positioner,
|
|
150
167
|
{
|
|
151
168
|
alignItemWithTrigger: !1,
|
|
152
169
|
align: n,
|
|
153
|
-
alignOffset:
|
|
154
|
-
side:
|
|
155
|
-
sideOffset:
|
|
170
|
+
alignOffset: l,
|
|
171
|
+
side: s,
|
|
172
|
+
sideOffset: c,
|
|
156
173
|
collisionPadding: 10,
|
|
157
174
|
className: "isolate z-50",
|
|
158
|
-
children: /* @__PURE__ */
|
|
159
|
-
|
|
175
|
+
children: /* @__PURE__ */ m(
|
|
176
|
+
a.Popup,
|
|
160
177
|
{
|
|
161
178
|
"data-slot": "select-content",
|
|
162
|
-
className:
|
|
163
|
-
"bg-popover-background text-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--available-height) min-w-
|
|
164
|
-
|
|
179
|
+
className: i(
|
|
180
|
+
"bg-popover-background text-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 relative z-50 max-h-(--available-height) max-w-[min(100%,420px)] min-w-(--anchor-width) origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-md border shadow-md outline-none",
|
|
181
|
+
r === "popper" && "data-[side=bottom]:translate-y-1",
|
|
165
182
|
e
|
|
166
183
|
),
|
|
167
|
-
...
|
|
184
|
+
...d,
|
|
168
185
|
children: [
|
|
169
186
|
/* @__PURE__ */ t(A, {}),
|
|
170
|
-
/* @__PURE__ */ t(
|
|
187
|
+
/* @__PURE__ */ t(a.List, { children: o }),
|
|
171
188
|
/* @__PURE__ */ t(F, {})
|
|
172
189
|
]
|
|
173
190
|
}
|
|
@@ -177,89 +194,99 @@ function ee({
|
|
|
177
194
|
}
|
|
178
195
|
function te({
|
|
179
196
|
className: e,
|
|
180
|
-
...
|
|
197
|
+
...o
|
|
181
198
|
}) {
|
|
182
199
|
return /* @__PURE__ */ t(
|
|
183
|
-
|
|
200
|
+
a.GroupLabel,
|
|
184
201
|
{
|
|
185
202
|
"data-slot": "select-label",
|
|
186
|
-
className:
|
|
187
|
-
...
|
|
203
|
+
className: i("text-muted-foreground px-2 py-1.5 text-xs", e),
|
|
204
|
+
...o
|
|
188
205
|
}
|
|
189
206
|
);
|
|
190
207
|
}
|
|
191
|
-
function
|
|
208
|
+
function oe({
|
|
192
209
|
className: e,
|
|
193
|
-
children:
|
|
194
|
-
icon:
|
|
195
|
-
|
|
210
|
+
children: o,
|
|
211
|
+
icon: r,
|
|
212
|
+
suffix: n,
|
|
213
|
+
...l
|
|
196
214
|
}) {
|
|
197
|
-
|
|
198
|
-
|
|
215
|
+
const s = typeof o == "string" ? o : void 0;
|
|
216
|
+
return /* @__PURE__ */ m(
|
|
217
|
+
a.Item,
|
|
199
218
|
{
|
|
200
219
|
"data-slot": "select-item",
|
|
201
|
-
className:
|
|
202
|
-
"relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-base leading-5 tracking-tightest outline-hidden select-none focus:bg-accent-background focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground
|
|
220
|
+
className: i(
|
|
221
|
+
"relative flex w-full min-h-9 cursor-default items-center gap-2 rounded-sm py-1.5 pr-8 pl-2 text-base leading-5 tracking-tightest outline-hidden select-none focus:bg-accent-background focus:text-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
|
|
203
222
|
e
|
|
204
223
|
),
|
|
205
|
-
...
|
|
224
|
+
...l,
|
|
206
225
|
children: [
|
|
207
226
|
/* @__PURE__ */ t(
|
|
208
|
-
|
|
227
|
+
a.ItemIndicator,
|
|
209
228
|
{
|
|
210
229
|
render: /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-3.5 items-center justify-center", children: /* @__PURE__ */ t(_, { className: "size-4 text-foreground" }) })
|
|
211
230
|
}
|
|
212
231
|
),
|
|
213
|
-
|
|
214
|
-
/* @__PURE__ */ t(
|
|
232
|
+
r && /* @__PURE__ */ t("span", { className: "flex items-center gap-2 mr-1", children: r }),
|
|
233
|
+
/* @__PURE__ */ t(
|
|
234
|
+
a.ItemText,
|
|
235
|
+
{
|
|
236
|
+
className: "flex-1 truncate min-w-0",
|
|
237
|
+
title: s,
|
|
238
|
+
children: o
|
|
239
|
+
}
|
|
240
|
+
),
|
|
241
|
+
n && /* @__PURE__ */ t("span", { className: "shrink-0 ml-auto", children: n })
|
|
215
242
|
]
|
|
216
243
|
}
|
|
217
244
|
);
|
|
218
245
|
}
|
|
219
|
-
function
|
|
246
|
+
function ae({
|
|
220
247
|
className: e,
|
|
221
|
-
...
|
|
248
|
+
...o
|
|
222
249
|
}) {
|
|
223
250
|
return /* @__PURE__ */ t(
|
|
224
|
-
|
|
251
|
+
a.Separator,
|
|
225
252
|
{
|
|
226
253
|
"data-slot": "select-separator",
|
|
227
|
-
className:
|
|
228
|
-
...
|
|
254
|
+
className: i("bg-border pointer-events-none -mx-1 my-1 h-px", e),
|
|
255
|
+
...o
|
|
229
256
|
}
|
|
230
257
|
);
|
|
231
258
|
}
|
|
232
259
|
function A({
|
|
233
260
|
className: e,
|
|
234
|
-
...
|
|
261
|
+
...o
|
|
235
262
|
}) {
|
|
236
263
|
return /* @__PURE__ */ t(
|
|
237
|
-
|
|
264
|
+
a.ScrollUpArrow,
|
|
238
265
|
{
|
|
239
266
|
"data-slot": "select-scroll-up-button",
|
|
240
|
-
className:
|
|
267
|
+
className: i(
|
|
241
268
|
"bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full",
|
|
242
269
|
e
|
|
243
270
|
),
|
|
244
|
-
...
|
|
271
|
+
...o,
|
|
245
272
|
children: /* @__PURE__ */ t(O, { className: "size-4" })
|
|
246
273
|
}
|
|
247
274
|
);
|
|
248
275
|
}
|
|
249
276
|
function F({
|
|
250
277
|
className: e,
|
|
251
|
-
...
|
|
278
|
+
...o
|
|
252
279
|
}) {
|
|
253
280
|
return /* @__PURE__ */ t(
|
|
254
|
-
|
|
281
|
+
a.ScrollDownArrow,
|
|
255
282
|
{
|
|
256
283
|
"data-slot": "select-scroll-down-button",
|
|
257
|
-
className:
|
|
284
|
+
className: i(
|
|
258
285
|
"bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full",
|
|
259
286
|
e
|
|
260
287
|
),
|
|
261
|
-
...
|
|
262
|
-
children: /* @__PURE__ */ t(
|
|
288
|
+
...o,
|
|
289
|
+
children: /* @__PURE__ */ t(v, { className: "size-4" })
|
|
263
290
|
}
|
|
264
291
|
);
|
|
265
292
|
}
|
|
@@ -267,11 +294,11 @@ export {
|
|
|
267
294
|
Y as Select,
|
|
268
295
|
ee as SelectContent,
|
|
269
296
|
Z as SelectGroup,
|
|
270
|
-
|
|
297
|
+
oe as SelectItem,
|
|
271
298
|
te as SelectLabel,
|
|
272
299
|
F as SelectScrollDownButton,
|
|
273
300
|
A as SelectScrollUpButton,
|
|
274
|
-
|
|
301
|
+
ae as SelectSeparator,
|
|
275
302
|
U as SelectTrigger,
|
|
276
303
|
M as SelectValue
|
|
277
304
|
};
|
|
@@ -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
|
};
|