@cognite/aura 0.3.2 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (108) hide show
  1. package/DESIGN.md +134 -5
  2. package/README.md +24 -3
  3. package/dist/components/index.d.ts +2 -0
  4. package/dist/components/index.js +58 -327
  5. package/dist/components/ui/core/accordion/accordion.js +79 -114
  6. package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
  7. package/dist/components/ui/core/alert/alert.js +158 -206
  8. package/dist/components/ui/core/avatar/avatar.js +64 -90
  9. package/dist/components/ui/core/badge/badge.js +73 -108
  10. package/dist/components/ui/core/banner/banner.js +146 -215
  11. package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
  12. package/dist/components/ui/core/button/button.js +47 -52
  13. package/dist/components/ui/core/button-group/button-group.js +40 -79
  14. package/dist/components/ui/core/card/card.js +102 -185
  15. package/dist/components/ui/core/chart/chart.js +116 -206
  16. package/dist/components/ui/core/chart/index.js +2 -8
  17. package/dist/components/ui/core/checkbox/checkbox.js +67 -132
  18. package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
  19. package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
  20. package/dist/components/ui/core/code-block/code-block.js +179 -267
  21. package/dist/components/ui/core/collapsible/collapsible.js +29 -49
  22. package/dist/components/ui/core/combobox/combobox.js +41 -0
  23. package/dist/components/ui/core/command/command.js +85 -150
  24. package/dist/components/ui/core/count/count.js +21 -32
  25. package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -72
  26. package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
  27. package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
  28. package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
  29. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
  30. package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
  31. package/dist/components/ui/core/date-time-pickers/index.js +5 -10
  32. package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
  33. package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
  34. package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
  35. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
  36. package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
  37. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -23
  38. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
  39. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
  40. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
  41. package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
  42. package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
  43. package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
  44. package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +40 -40
  45. package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
  46. package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +78 -99
  47. package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
  48. package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
  49. package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
  50. package/dist/components/ui/core/dialog/dialog.js +82 -155
  51. package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +2 -2
  52. package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
  53. package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
  54. package/dist/components/ui/core/empty-state/empty-state.js +86 -138
  55. package/dist/components/ui/core/helper-text/helper-text.js +37 -65
  56. package/dist/components/ui/core/hover-card/hover-card.js +54 -80
  57. package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
  58. package/dist/components/ui/core/input/input.js +12 -27
  59. package/dist/components/ui/core/input-group/input-group.js +76 -173
  60. package/dist/components/ui/core/kbd/kbd.js +20 -36
  61. package/dist/components/ui/core/label/label.js +26 -43
  62. package/dist/components/ui/core/loader/loader.js +80 -117
  63. package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
  64. package/dist/components/ui/core/message/message.d.ts +2 -2
  65. package/dist/components/ui/core/message/message.js +316 -542
  66. package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
  67. package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
  68. package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
  69. package/dist/components/ui/core/pagination/pagination.js +231 -334
  70. package/dist/components/ui/core/popover/popover.js +90 -157
  71. package/dist/components/ui/core/progress/progress.js +36 -61
  72. package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
  73. package/dist/components/ui/core/radio-group/radio-group.js +58 -113
  74. package/dist/components/ui/core/reasoning/reasoning.js +55 -86
  75. package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
  76. package/dist/components/ui/core/search/search.js +77 -99
  77. package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
  78. package/dist/components/ui/core/select/select.js +168 -293
  79. package/dist/components/ui/core/separator/separator.js +13 -23
  80. package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
  81. package/dist/components/ui/core/shimmer/shimmer.js +40 -107
  82. package/dist/components/ui/core/skeleton/skeleton.js +13 -18
  83. package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
  84. package/dist/components/ui/core/sources/sources.d.ts +5 -1
  85. package/dist/components/ui/core/sources/sources.js +58 -79
  86. package/dist/components/ui/core/switch/switch.js +62 -0
  87. package/dist/components/ui/core/tabs/tabs.js +149 -223
  88. package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
  89. package/dist/components/ui/core/textarea/textarea.js +13 -27
  90. package/dist/components/ui/core/toggle/toggle.js +55 -74
  91. package/dist/components/ui/core/tool/tool.js +127 -163
  92. package/dist/components/ui/core/tooltip/tooltip.js +47 -86
  93. package/dist/components/ui/core/topbar/topbar.js +106 -190
  94. package/dist/eslint/index.js +5 -10
  95. package/dist/eslint/no-overriding-styles.js +178 -237
  96. package/dist/icons/index.d.ts +1 -0
  97. package/dist/icons/index.js +1 -0
  98. package/dist/lib/highlight-code.d.ts +9 -0
  99. package/dist/lib/highlight-code.js +42 -0
  100. package/dist/lib/portal-container-context.js +8 -9
  101. package/dist/lib/style-scope.js +6 -6
  102. package/dist/lib/use-controllable-state.js +21 -30
  103. package/dist/lib/utils.d.ts +0 -2
  104. package/dist/lib/utils.js +32 -112
  105. package/dist/styles.css +1 -1
  106. package/dist/styles.source.css +23 -0
  107. package/package.json +23 -7
  108. package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
@@ -1,304 +1,179 @@
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
- import { usePortalContainer as P } from "../../../../lib/portal-container-context.js";
6
- import { useControllableState as j } from "../../../../lib/use-controllable-state.js";
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
- if (!e)
11
- throw new Error("Select components must be used within Select");
12
- return e;
1
+ import { cn as e, disabledState as t, filledState as n, focusState as r, formElementBase as i, hoverState as a, invalidState as o } from "../../../../lib/utils.js";
2
+ import { usePortalContainer as s } from "../../../../lib/portal-container-context.js";
3
+ import { useControllableState as c } from "../../../../lib/use-controllable-state.js";
4
+ import { createContext as l, forwardRef as u, useContext as d, useId as f, useMemo as p } from "react";
5
+ import { IconCheck as m, IconChevronDown as h, IconChevronUp as g, IconExclamationCircle as _ } from "@tabler/icons-react";
6
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
7
+ import { Select as x } from "@base-ui/react/select";
8
+ //#region libs/aura/src/components/ui/core/select/select.tsx
9
+ var S = l(null), C = () => {
10
+ let e = d(S);
11
+ if (!e) throw Error("Select components must be used within Select");
12
+ return e;
13
13
  };
14
- function Y(e) {
15
- const [o, r] = j({
16
- prop: e.open,
17
- defaultProp: e.defaultOpen ?? !1,
18
- onChange: e.onOpenChange
19
- }), n = I(() => ({ isOpen: o ?? !1 }), [o]);
20
- if (e.multiple) {
21
- const {
22
- multiple: f,
23
- value: h,
24
- defaultValue: b,
25
- onValueChange: w,
26
- ...S
27
- } = e;
28
- return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
29
- a.Root,
30
- {
31
- "data-slot": "select",
32
- open: o,
33
- onOpenChange: (p) => r(p),
34
- value: h,
35
- defaultValue: b,
36
- onValueChange: (p, W) => {
37
- w?.(p ?? []);
38
- },
39
- multiple: !0,
40
- ...S
41
- }
42
- ) });
43
- }
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
- return /* @__PURE__ */ t(g.Provider, { value: n, children: /* @__PURE__ */ t(
46
- a.Root,
47
- {
48
- "data-slot": "select",
49
- open: o,
50
- onOpenChange: (f) => r(f),
51
- value: u,
52
- defaultValue: x,
53
- onValueChange: (f, h) => {
54
- c?.(typeof f == "string" ? f : "");
55
- },
56
- ...d
57
- }
58
- ) });
14
+ function w(e) {
15
+ let [t, n] = c({
16
+ prop: e.open,
17
+ defaultProp: e.defaultOpen ?? !1,
18
+ onChange: e.onOpenChange
19
+ }), r = p(() => ({ isOpen: t ?? !1 }), [t]);
20
+ if (e.multiple) {
21
+ let { multiple: i, value: a, defaultValue: o, onValueChange: s, ...c } = e;
22
+ return /* @__PURE__ */ y(S.Provider, {
23
+ value: r,
24
+ children: /* @__PURE__ */ y(x.Root, {
25
+ "data-slot": "select",
26
+ open: t,
27
+ onOpenChange: (e) => n(e),
28
+ value: a,
29
+ defaultValue: o,
30
+ onValueChange: (e, t) => {
31
+ s?.(e ?? []);
32
+ },
33
+ multiple: !0,
34
+ ...c
35
+ })
36
+ });
37
+ }
38
+ let { value: i, defaultValue: a, onValueChange: o, ...s } = e, l = i === void 0 ? void 0 : i === "" ? null : i, u = a === void 0 ? void 0 : a === "" ? null : a;
39
+ return /* @__PURE__ */ y(S.Provider, {
40
+ value: r,
41
+ children: /* @__PURE__ */ y(x.Root, {
42
+ "data-slot": "select",
43
+ open: t,
44
+ onOpenChange: (e) => n(e),
45
+ value: l,
46
+ defaultValue: u,
47
+ onValueChange: (e, t) => {
48
+ o?.(typeof e == "string" ? e : "");
49
+ },
50
+ ...s
51
+ })
52
+ });
59
53
  }
60
- function Z({
61
- className: e,
62
- ...o
63
- }) {
64
- return /* @__PURE__ */ t(
65
- a.Group,
66
- {
67
- "data-slot": "select-group",
68
- className: i("scroll-my-1 p-1", e),
69
- ...o
70
- }
71
- );
54
+ function T({ className: t, ...n }) {
55
+ return /* @__PURE__ */ y(x.Group, {
56
+ "data-slot": "select-group",
57
+ className: e("scroll-my-1 p-1", t),
58
+ ...n
59
+ });
72
60
  }
73
- function M({
74
- icon: e,
75
- ...o
76
- }) {
77
- return e ? /* @__PURE__ */ m("span", { className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden", children: [
78
- e,
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
- );
61
+ function E({ icon: e, ...t }) {
62
+ return e ? /* @__PURE__ */ b("span", {
63
+ className: "flex flex-1 items-center gap-2 min-w-0 overflow-hidden",
64
+ children: [e, /* @__PURE__ */ y(x.Value, {
65
+ "data-slot": "select-value",
66
+ className: "flex-1 truncate min-w-0",
67
+ ...t
68
+ })]
69
+ }) : /* @__PURE__ */ y(x.Value, {
70
+ "data-slot": "select-value",
71
+ className: "flex-1 truncate min-w-0",
72
+ ...t
73
+ });
95
74
  }
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,
101
- {
102
- ref: s,
103
- "data-slot": "select-trigger",
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",
109
- L,
110
- G,
111
- E,
112
- B,
113
- c && "shadow-focus-ring bg-background border-transparent focus:border-transparent hover:border-transparent text-foreground",
114
- D,
115
- T,
116
- "dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background",
117
- "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground",
118
- e
119
- ),
120
- ...l,
121
- children: [
122
- r,
123
- /* @__PURE__ */ t(
124
- a.Icon,
125
- {
126
- render: /* @__PURE__ */ t(
127
- v,
128
- {
129
- className: i(
130
- "size-4 opacity-50 transition-transform",
131
- c ? "rotate-180" : "rotate-0"
132
- )
133
- }
134
- )
135
- }
136
- )
137
- ]
138
- }
139
- ),
140
- n && /* @__PURE__ */ m(
141
- "div",
142
- {
143
- id: u,
144
- className: "flex flex-row gap-1 justify-start items-center p-1",
145
- children: [
146
- /* @__PURE__ */ t(V, { className: "text-destructive-foreground text-sm size-4" }),
147
- /* @__PURE__ */ t("span", { className: "text-destructive-foreground text-sm", children: n })
148
- ]
149
- }
150
- )
151
- ] });
75
+ var D = u(({ className: s, size: c = "default", children: l, errorMessage: u, ...d }, p) => {
76
+ let { isOpen: m } = C(), g = !!u, S = f();
77
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ b(x.Trigger, {
78
+ ref: p,
79
+ "data-slot": "select-trigger",
80
+ "data-size": c,
81
+ "aria-invalid": g ? !0 : void 0,
82
+ "aria-describedby": g ? S : void 0,
83
+ className: e("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", i, a, n, r, m && "shadow-focus-ring bg-background border-transparent focus:border-transparent hover:border-transparent text-foreground", o, t, "dark:bg-muted-background/30 dark:text-muted-foreground dark:hover:bg-accent-background", "[&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground", s),
84
+ ...d,
85
+ children: [l, /* @__PURE__ */ y(x.Icon, { render: /* @__PURE__ */ y(h, { className: e("size-4 opacity-50 transition-transform", m ? "rotate-180" : "rotate-0") }) })]
86
+ }), u && /* @__PURE__ */ b("div", {
87
+ id: S,
88
+ className: "flex flex-row gap-1 justify-start items-center p-1",
89
+ children: [/* @__PURE__ */ y(_, { className: "text-destructive-foreground text-sm size-4" }), /* @__PURE__ */ y("span", {
90
+ className: "text-destructive-foreground text-sm",
91
+ children: u
92
+ })]
93
+ })] });
152
94
  });
153
- U.displayName = "SelectTrigger";
154
- function ee({
155
- className: e,
156
- children: o,
157
- position: r = "popper",
158
- align: n = "start",
159
- alignOffset: l = 0,
160
- side: s = "bottom",
161
- sideOffset: c = 4,
162
- ...d
163
- }) {
164
- const u = P();
165
- return /* @__PURE__ */ t(a.Portal, { container: u, children: /* @__PURE__ */ t(
166
- a.Positioner,
167
- {
168
- alignItemWithTrigger: !1,
169
- align: n,
170
- alignOffset: l,
171
- side: s,
172
- sideOffset: c,
173
- collisionPadding: 10,
174
- className: "isolate z-50",
175
- children: /* @__PURE__ */ m(
176
- a.Popup,
177
- {
178
- "data-slot": "select-content",
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",
182
- e
183
- ),
184
- ...d,
185
- children: [
186
- /* @__PURE__ */ t(A, {}),
187
- /* @__PURE__ */ t(a.List, { children: o }),
188
- /* @__PURE__ */ t(F, {})
189
- ]
190
- }
191
- )
192
- }
193
- ) });
95
+ D.displayName = "SelectTrigger";
96
+ function O({ className: t, children: n, position: r = "popper", align: i = "start", alignOffset: a = 0, side: o = "bottom", sideOffset: c = 4, ...l }) {
97
+ let u = s();
98
+ return /* @__PURE__ */ y(x.Portal, {
99
+ container: u,
100
+ children: /* @__PURE__ */ y(x.Positioner, {
101
+ alignItemWithTrigger: !1,
102
+ align: i,
103
+ alignOffset: a,
104
+ side: o,
105
+ sideOffset: c,
106
+ collisionPadding: 10,
107
+ className: "isolate z-50",
108
+ children: /* @__PURE__ */ b(x.Popup, {
109
+ "data-slot": "select-content",
110
+ className: e("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", r === "popper" && "data-[side=bottom]:translate-y-1", t),
111
+ ...l,
112
+ children: [
113
+ /* @__PURE__ */ y(M, {}),
114
+ /* @__PURE__ */ y(x.List, { children: n }),
115
+ /* @__PURE__ */ y(N, {})
116
+ ]
117
+ })
118
+ })
119
+ });
194
120
  }
195
- function te({
196
- className: e,
197
- ...o
198
- }) {
199
- return /* @__PURE__ */ t(
200
- a.GroupLabel,
201
- {
202
- "data-slot": "select-label",
203
- className: i("text-muted-foreground px-2 py-1.5 text-xs", e),
204
- ...o
205
- }
206
- );
121
+ function k({ className: t, ...n }) {
122
+ return /* @__PURE__ */ y(x.GroupLabel, {
123
+ "data-slot": "select-label",
124
+ className: e("text-muted-foreground px-2 py-1.5 text-xs", t),
125
+ ...n
126
+ });
207
127
  }
208
- function oe({
209
- className: e,
210
- children: o,
211
- icon: r,
212
- suffix: n,
213
- ...l
214
- }) {
215
- const s = typeof o == "string" ? o : void 0;
216
- return /* @__PURE__ */ m(
217
- a.Item,
218
- {
219
- "data-slot": "select-item",
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",
222
- e
223
- ),
224
- ...l,
225
- children: [
226
- /* @__PURE__ */ t(
227
- a.ItemIndicator,
228
- {
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" }) })
230
- }
231
- ),
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 })
242
- ]
243
- }
244
- );
128
+ function A({ className: t, children: n, icon: r, suffix: i, ...a }) {
129
+ let o = typeof n == "string" ? n : void 0;
130
+ return /* @__PURE__ */ b(x.Item, {
131
+ "data-slot": "select-item",
132
+ className: e("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", t),
133
+ ...a,
134
+ children: [
135
+ /* @__PURE__ */ y(x.ItemIndicator, { render: /* @__PURE__ */ y("span", {
136
+ className: "absolute right-2 flex size-3.5 items-center justify-center",
137
+ children: /* @__PURE__ */ y(m, { className: "size-4 text-foreground" })
138
+ }) }),
139
+ r && /* @__PURE__ */ y("span", {
140
+ className: "flex items-center gap-2 mr-1",
141
+ children: r
142
+ }),
143
+ /* @__PURE__ */ y(x.ItemText, {
144
+ className: "flex-1 truncate min-w-0",
145
+ title: o,
146
+ children: n
147
+ }),
148
+ i && /* @__PURE__ */ y("span", {
149
+ className: "shrink-0 ml-auto",
150
+ children: i
151
+ })
152
+ ]
153
+ });
245
154
  }
246
- function ae({
247
- className: e,
248
- ...o
249
- }) {
250
- return /* @__PURE__ */ t(
251
- a.Separator,
252
- {
253
- "data-slot": "select-separator",
254
- className: i("bg-border pointer-events-none -mx-1 my-1 h-px", e),
255
- ...o
256
- }
257
- );
155
+ function j({ className: t, ...n }) {
156
+ return /* @__PURE__ */ y(x.Separator, {
157
+ "data-slot": "select-separator",
158
+ className: e("bg-border pointer-events-none -mx-1 my-1 h-px", t),
159
+ ...n
160
+ });
258
161
  }
259
- function A({
260
- className: e,
261
- ...o
262
- }) {
263
- return /* @__PURE__ */ t(
264
- a.ScrollUpArrow,
265
- {
266
- "data-slot": "select-scroll-up-button",
267
- className: i(
268
- "bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full",
269
- e
270
- ),
271
- ...o,
272
- children: /* @__PURE__ */ t(O, { className: "size-4" })
273
- }
274
- );
162
+ function M({ className: t, ...n }) {
163
+ return /* @__PURE__ */ y(x.ScrollUpArrow, {
164
+ "data-slot": "select-scroll-up-button",
165
+ className: e("bg-popover-background z-10 flex cursor-default items-center justify-center py-1 top-0 w-full", t),
166
+ ...n,
167
+ children: /* @__PURE__ */ y(g, { className: "size-4" })
168
+ });
275
169
  }
276
- function F({
277
- className: e,
278
- ...o
279
- }) {
280
- return /* @__PURE__ */ t(
281
- a.ScrollDownArrow,
282
- {
283
- "data-slot": "select-scroll-down-button",
284
- className: i(
285
- "bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full",
286
- e
287
- ),
288
- ...o,
289
- children: /* @__PURE__ */ t(v, { className: "size-4" })
290
- }
291
- );
170
+ function N({ className: t, ...n }) {
171
+ return /* @__PURE__ */ y(x.ScrollDownArrow, {
172
+ "data-slot": "select-scroll-down-button",
173
+ className: e("bg-popover-background z-10 flex cursor-default items-center justify-center py-1 bottom-0 w-full", t),
174
+ ...n,
175
+ children: /* @__PURE__ */ y(h, { className: "size-4" })
176
+ });
292
177
  }
293
- export {
294
- Y as Select,
295
- ee as SelectContent,
296
- Z as SelectGroup,
297
- oe as SelectItem,
298
- te as SelectLabel,
299
- F as SelectScrollDownButton,
300
- A as SelectScrollUpButton,
301
- ae as SelectSeparator,
302
- U as SelectTrigger,
303
- M as SelectValue
304
- };
178
+ //#endregion
179
+ export { w as Select, O as SelectContent, T as SelectGroup, A as SelectItem, k as SelectLabel, N as SelectScrollDownButton, M as SelectScrollUpButton, j as SelectSeparator, D as SelectTrigger, E as SelectValue };
@@ -1,24 +1,14 @@
1
- import { jsx as o } from "react/jsx-runtime";
2
- import { Separator as i } from "@base-ui/react/separator";
3
- import { cn as n } from "../../../../lib/utils.js";
4
- function m({
5
- className: a,
6
- orientation: r = "horizontal",
7
- ...t
8
- }) {
9
- return /* @__PURE__ */ o(
10
- i,
11
- {
12
- "data-slot": "separator",
13
- orientation: r,
14
- className: n(
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
- a
17
- ),
18
- ...t
19
- }
20
- );
1
+ import { cn as e } from "../../../../lib/utils.js";
2
+ import { jsx as t } from "react/jsx-runtime";
3
+ import { Separator as n } from "@base-ui/react/separator";
4
+ //#region libs/aura/src/components/ui/core/separator/separator.tsx
5
+ function r({ className: r, orientation: i = "horizontal", ...a }) {
6
+ return /* @__PURE__ */ t(n, {
7
+ "data-slot": "separator",
8
+ orientation: i,
9
+ className: e("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px", r),
10
+ ...a
11
+ });
21
12
  }
22
- export {
23
- m as Separator
24
- };
13
+ //#endregion
14
+ export { r as Separator };
@@ -1,14 +1,12 @@
1
1
  import { MemoExoticComponent, ReactNode } from 'react';
2
2
  type TextShimmerProps = {
3
3
  children: string;
4
- /** SVG URL or data URI used as a CSS mask. Not a React component which would require runtime SVG serialization. */
5
- iconUrl?: string;
6
4
  as?: 'p' | 'span' | 'div' | 'h1' | 'h2' | 'h3';
7
5
  className?: string;
8
6
  duration?: number;
9
7
  spread?: number;
10
- variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall';
8
+ variant?: 'default' | 'nordic' | 'aurora' | 'dusk' | 'equinox' | 'summer' | 'spring' | 'fall' | 'active';
11
9
  };
12
- declare function ShimmerComponent({ children, iconUrl, as: Tag, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
10
+ declare function ShimmerComponent({ children, as: Tag, className, duration, spread, variant, }: TextShimmerProps): ReactNode;
13
11
  declare const MemoizedShimmer: MemoExoticComponent<typeof ShimmerComponent>;
14
12
  export { MemoizedShimmer as Shimmer };