@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.
- package/DESIGN.md +134 -5
- package/README.md +24 -3
- package/dist/components/index.d.ts +2 -0
- package/dist/components/index.js +58 -327
- package/dist/components/ui/core/accordion/accordion.js +79 -114
- package/dist/components/ui/core/action-toolbar/action-toolbar.js +108 -176
- package/dist/components/ui/core/alert/alert.js +158 -206
- package/dist/components/ui/core/avatar/avatar.js +64 -90
- package/dist/components/ui/core/badge/badge.js +73 -108
- package/dist/components/ui/core/banner/banner.js +146 -215
- package/dist/components/ui/core/breadcrumb/breadcrumb.js +105 -200
- package/dist/components/ui/core/button/button.js +47 -52
- package/dist/components/ui/core/button-group/button-group.js +40 -79
- package/dist/components/ui/core/card/card.js +102 -185
- package/dist/components/ui/core/chart/chart.js +116 -206
- package/dist/components/ui/core/chart/index.js +2 -8
- package/dist/components/ui/core/checkbox/checkbox.js +67 -132
- package/dist/components/ui/core/checkbox/checkbox.metadata.js +7 -7
- package/dist/components/ui/core/code-block/code-block.d.ts +1 -1
- package/dist/components/ui/core/code-block/code-block.js +179 -267
- package/dist/components/ui/core/collapsible/collapsible.js +29 -49
- package/dist/components/ui/core/combobox/combobox.js +41 -0
- package/dist/components/ui/core/command/command.js +85 -150
- package/dist/components/ui/core/count/count.js +21 -32
- package/dist/components/ui/core/date-time-pickers/date-picker/date-picker.js +60 -72
- package/dist/components/ui/core/date-time-pickers/date-picker/use-date-picker.js +36 -51
- package/dist/components/ui/core/date-time-pickers/date-range-picker/date-range-picker.js +63 -87
- package/dist/components/ui/core/date-time-pickers/date-range-picker/use-date-range-picker.js +60 -68
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/date-time-range-picker.js +118 -174
- package/dist/components/ui/core/date-time-pickers/date-time-range-picker/use-date-time-range-picker.js +104 -145
- package/dist/components/ui/core/date-time-pickers/index.js +5 -10
- package/dist/components/ui/core/date-time-pickers/shared/am-pm-scroll/am-pm-scroll.js +42 -56
- package/dist/components/ui/core/date-time-pickers/shared/calendar/calendar.js +66 -117
- package/dist/components/ui/core/date-time-pickers/shared/calendar-header/calendar-header.js +63 -93
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/date-time-input.js +64 -98
- package/dist/components/ui/core/date-time-pickers/shared/date-time-input/range-input-display.js +38 -67
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-popover-state.js +23 -23
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-date-state.js +52 -62
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-range-step-manager.js +18 -18
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-single-date-state.js +24 -31
- package/dist/components/ui/core/date-time-pickers/shared/hooks/use-time-state.js +24 -33
- package/dist/components/ui/core/date-time-pickers/shared/scroll-cell-classes.js +4 -7
- package/dist/components/ui/core/date-time-pickers/shared/shortcuts-panel/shortcuts-panel.js +17 -31
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-panel/time-picker-panel.js +40 -40
- package/dist/components/ui/core/date-time-pickers/shared/time-picker-scroll/time-picker-scroll.js +33 -50
- package/dist/components/ui/core/date-time-pickers/time-picker/time-picker.js +78 -99
- package/dist/components/ui/core/date-time-pickers/time-picker/use-time-picker.js +41 -63
- package/dist/components/ui/core/date-time-pickers/utils/calendar-utils.js +39 -52
- package/dist/components/ui/core/date-time-pickers/utils/time-utils.js +7 -15
- package/dist/components/ui/core/dialog/dialog.js +82 -155
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.d.ts +2 -2
- package/dist/components/ui/core/dropdown-menu/dropdown-menu.js +150 -248
- package/dist/components/ui/core/empty-state/empty-state.context.js +5 -8
- package/dist/components/ui/core/empty-state/empty-state.js +86 -138
- package/dist/components/ui/core/helper-text/helper-text.js +37 -65
- package/dist/components/ui/core/hover-card/hover-card.js +54 -80
- package/dist/components/ui/core/inline-citation/inline-citation.js +98 -181
- package/dist/components/ui/core/input/input.js +12 -27
- package/dist/components/ui/core/input-group/input-group.js +76 -173
- package/dist/components/ui/core/kbd/kbd.js +20 -36
- package/dist/components/ui/core/label/label.js +26 -43
- package/dist/components/ui/core/loader/loader.js +80 -117
- package/dist/components/ui/core/message/message-response-default-streamdown-controls.js +12 -12
- package/dist/components/ui/core/message/message.d.ts +2 -2
- package/dist/components/ui/core/message/message.js +316 -542
- package/dist/components/ui/core/pagination/pagination-size-context.js +5 -6
- package/dist/components/ui/core/pagination/pagination-teleport.js +86 -106
- package/dist/components/ui/core/pagination/pagination-teleport.utils.js +6 -6
- package/dist/components/ui/core/pagination/pagination.js +231 -334
- package/dist/components/ui/core/popover/popover.js +90 -157
- package/dist/components/ui/core/progress/progress.js +36 -61
- package/dist/components/ui/core/prompt-input/prompt-input.js +274 -413
- package/dist/components/ui/core/radio-group/radio-group.js +58 -113
- package/dist/components/ui/core/reasoning/reasoning.js +55 -86
- package/dist/components/ui/core/scroll-area/scroll-area.js +41 -71
- package/dist/components/ui/core/search/search.js +77 -99
- package/dist/components/ui/core/segmented-control/segmented-control.js +110 -167
- package/dist/components/ui/core/select/select.js +168 -293
- package/dist/components/ui/core/separator/separator.js +13 -23
- package/dist/components/ui/core/shimmer/shimmer.d.ts +2 -4
- package/dist/components/ui/core/shimmer/shimmer.js +40 -107
- package/dist/components/ui/core/skeleton/skeleton.js +13 -18
- package/dist/components/ui/core/sonner-toast/sonner-toast.js +54 -47
- package/dist/components/ui/core/sources/sources.d.ts +5 -1
- package/dist/components/ui/core/sources/sources.js +58 -79
- package/dist/components/ui/core/switch/switch.js +62 -0
- package/dist/components/ui/core/tabs/tabs.js +149 -223
- package/dist/components/ui/core/tabs/tabs.utils.js +6 -8
- package/dist/components/ui/core/textarea/textarea.js +13 -27
- package/dist/components/ui/core/toggle/toggle.js +55 -74
- package/dist/components/ui/core/tool/tool.js +127 -163
- package/dist/components/ui/core/tooltip/tooltip.js +47 -86
- package/dist/components/ui/core/topbar/topbar.js +106 -190
- package/dist/eslint/index.js +5 -10
- package/dist/eslint/no-overriding-styles.js +178 -237
- package/dist/icons/index.d.ts +1 -0
- package/dist/icons/index.js +1 -0
- package/dist/lib/highlight-code.d.ts +9 -0
- package/dist/lib/highlight-code.js +42 -0
- package/dist/lib/portal-container-context.js +8 -9
- package/dist/lib/style-scope.js +6 -6
- package/dist/lib/use-controllable-state.js +21 -30
- package/dist/lib/utils.d.ts +0 -2
- package/dist/lib/utils.js +32 -112
- package/dist/styles.css +1 -1
- package/dist/styles.source.css +23 -0
- package/package.json +23 -7
- package/dist/components/ui/core/date-time-pickers/shared/constants.js +0 -14
|
@@ -1,224 +1,150 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
u.Root,
|
|
88
|
-
{
|
|
89
|
-
ref: a,
|
|
90
|
-
"data-slot": "tabs",
|
|
91
|
-
className: l(e),
|
|
92
|
-
...t
|
|
93
|
-
}
|
|
94
|
-
)
|
|
95
|
-
);
|
|
96
|
-
_.displayName = "Tabs";
|
|
97
|
-
const g = v(void 0), h = n(({ className: e, size: t = "small", ...a }, s) => /* @__PURE__ */ i(
|
|
98
|
-
u.Indicator,
|
|
99
|
-
{
|
|
100
|
-
ref: s,
|
|
101
|
-
"data-slot": "tabs-indicator",
|
|
102
|
-
className: l(N({ size: t }), e),
|
|
103
|
-
...a
|
|
104
|
-
}
|
|
105
|
-
));
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { Badge as t } from "../badge/badge.js";
|
|
3
|
+
import { resolveTabLabelTitle as n } from "./tabs.utils.js";
|
|
4
|
+
import { createContext as r, forwardRef as i, useContext as a } from "react";
|
|
5
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { cva as c } from "class-variance-authority";
|
|
7
|
+
import { Tabs as l } from "@base-ui/react/tabs";
|
|
8
|
+
//#region libs/aura/src/components/ui/core/tabs/tabs.tsx
|
|
9
|
+
var u = c("relative isolate inline-flex", {
|
|
10
|
+
variants: {
|
|
11
|
+
orientation: {
|
|
12
|
+
horizontal: "flex-row",
|
|
13
|
+
vertical: "flex-col"
|
|
14
|
+
},
|
|
15
|
+
size: {
|
|
16
|
+
small: "",
|
|
17
|
+
default: ""
|
|
18
|
+
},
|
|
19
|
+
fullWidth: {
|
|
20
|
+
true: "w-full",
|
|
21
|
+
false: "w-fit"
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
compoundVariants: [
|
|
25
|
+
{
|
|
26
|
+
orientation: "horizontal",
|
|
27
|
+
size: "small",
|
|
28
|
+
className: "items-center gap-1"
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
orientation: "horizontal",
|
|
32
|
+
size: "default",
|
|
33
|
+
className: "items-center gap-2"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
orientation: "vertical",
|
|
37
|
+
size: "small",
|
|
38
|
+
className: "items-stretch gap-1"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
orientation: "vertical",
|
|
42
|
+
size: "default",
|
|
43
|
+
className: "items-stretch gap-2"
|
|
44
|
+
}
|
|
45
|
+
],
|
|
46
|
+
defaultVariants: {
|
|
47
|
+
orientation: "horizontal",
|
|
48
|
+
size: "small",
|
|
49
|
+
fullWidth: !1
|
|
50
|
+
}
|
|
51
|
+
}), d = c("pointer-events-none absolute top-(--active-tab-top) left-(--active-tab-left) z-0 h-(--active-tab-height) w-(--active-tab-width) bg-active-muted-background motion-safe:transition-[top,left,width,height] motion-safe:duration-200 motion-safe:ease-out data-[activation-direction=none]:transition-none", {
|
|
52
|
+
variants: { size: {
|
|
53
|
+
small: "rounded-md",
|
|
54
|
+
default: "rounded-lg"
|
|
55
|
+
} },
|
|
56
|
+
defaultVariants: { size: "small" }
|
|
57
|
+
}), f = c("group relative z-10 inline-flex min-w-0 max-w-full items-center justify-start outline-none transition-[color,box-shadow] duration-200 ease-out shrink-0 font-medium tracking-normal text-sm cursor-pointer focus-visible:border-ring focus-visible:ring-ring-shadow focus-visible:ring data-[disabled]:pointer-events-none data-[disabled]:cursor-default [&_[data-slot=tabs-label]]:min-w-0 [&_[data-slot=tabs-label]]:truncate", {
|
|
58
|
+
variants: {
|
|
59
|
+
size: {
|
|
60
|
+
small: "h-7 px-2 gap-1.5 leading-4.5 rounded-md",
|
|
61
|
+
default: "h-9 px-3 gap-2 leading-4.5 rounded-lg"
|
|
62
|
+
},
|
|
63
|
+
fullWidth: {
|
|
64
|
+
true: "min-w-px justify-center [&_[data-slot=tabs-label]]:flex-none [&_[data-slot=tabs-label]]:text-center",
|
|
65
|
+
false: ""
|
|
66
|
+
},
|
|
67
|
+
stateTone: { default: "text-muted-foreground hover:text-foreground data-active:text-foreground data-active:hover:text-foreground data-[disabled]:text-disabled-foreground" }
|
|
68
|
+
},
|
|
69
|
+
defaultVariants: {
|
|
70
|
+
size: "small",
|
|
71
|
+
fullWidth: !1,
|
|
72
|
+
stateTone: "default"
|
|
73
|
+
}
|
|
74
|
+
}), p = i(({ className: t, ...n }, r) => /* @__PURE__ */ o(l.Root, {
|
|
75
|
+
ref: r,
|
|
76
|
+
"data-slot": "tabs",
|
|
77
|
+
className: e(t),
|
|
78
|
+
...n
|
|
79
|
+
}));
|
|
80
|
+
p.displayName = "Tabs";
|
|
81
|
+
var m = r(void 0), h = i(({ className: t, size: n = "small", ...r }, i) => /* @__PURE__ */ o(l.Indicator, {
|
|
82
|
+
ref: i,
|
|
83
|
+
"data-slot": "tabs-indicator",
|
|
84
|
+
className: e(d({ size: n }), t),
|
|
85
|
+
...r
|
|
86
|
+
}));
|
|
106
87
|
h.displayName = "TabsIndicator";
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
s == null ? null : /* @__PURE__ */ i(
|
|
171
|
-
z,
|
|
172
|
-
{
|
|
173
|
-
variant: "mountain",
|
|
174
|
-
className: l(
|
|
175
|
-
"h-4 min-w-4 rounded-sm px-0.5 text-xs leading-3.5 tracking-tighter gap-0",
|
|
176
|
-
o && "bg-disabled-background text-disabled-foreground border-transparent"
|
|
177
|
-
),
|
|
178
|
-
children: s
|
|
179
|
-
}
|
|
180
|
-
)
|
|
181
|
-
]
|
|
182
|
-
}
|
|
183
|
-
);
|
|
184
|
-
}
|
|
185
|
-
);
|
|
186
|
-
V.displayName = "TabsTrigger";
|
|
187
|
-
const k = n(
|
|
188
|
-
({ className: e, children: t, title: a, ...s }, o) => {
|
|
189
|
-
const d = T(a, t);
|
|
190
|
-
return /* @__PURE__ */ i(
|
|
191
|
-
"span",
|
|
192
|
-
{
|
|
193
|
-
ref: o,
|
|
194
|
-
"data-slot": "tabs-label",
|
|
195
|
-
className: l("block min-w-0 flex-1 truncate text-left", e),
|
|
196
|
-
title: d,
|
|
197
|
-
...s,
|
|
198
|
-
children: t
|
|
199
|
-
}
|
|
200
|
-
);
|
|
201
|
-
}
|
|
202
|
-
);
|
|
203
|
-
k.displayName = "TabsLabel";
|
|
204
|
-
const j = n(
|
|
205
|
-
({ className: e, ...t }, a) => /* @__PURE__ */ i(
|
|
206
|
-
u.Panel,
|
|
207
|
-
{
|
|
208
|
-
ref: a,
|
|
209
|
-
"data-slot": "tabs-panel",
|
|
210
|
-
className: l("outline-none", e),
|
|
211
|
-
...t
|
|
212
|
-
}
|
|
213
|
-
)
|
|
214
|
-
);
|
|
215
|
-
j.displayName = "TabsPanel";
|
|
216
|
-
export {
|
|
217
|
-
_ as Tabs,
|
|
218
|
-
k as TabsLabel,
|
|
219
|
-
L as TabsList,
|
|
220
|
-
j as TabsPanel,
|
|
221
|
-
V as TabsTrigger,
|
|
222
|
-
w as tabsListVariants,
|
|
223
|
-
y as tabsTriggerVariants
|
|
224
|
-
};
|
|
88
|
+
var g = i(({ className: t, orientation: n = "horizontal", size: r = "small", fullWidth: i = !1, children: a, ...c }, d) => {
|
|
89
|
+
let f = r ?? "small";
|
|
90
|
+
return /* @__PURE__ */ o(l.List, {
|
|
91
|
+
ref: d,
|
|
92
|
+
"data-slot": "tabs-list",
|
|
93
|
+
"data-size": f,
|
|
94
|
+
"data-orientation": n,
|
|
95
|
+
"data-full-width": i ? "true" : "false",
|
|
96
|
+
className: e("[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-trigger]]:flex-1", "[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-trigger]]:justify-center", "[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-label]]:flex-none", "[&[data-orientation=horizontal][data-full-width=true]_[data-slot=tabs-label]]:text-center", "[&[data-orientation=vertical][data-full-width=true]_[data-slot=tabs-trigger]]:w-full", u({
|
|
97
|
+
orientation: n,
|
|
98
|
+
size: f,
|
|
99
|
+
fullWidth: i
|
|
100
|
+
}), t),
|
|
101
|
+
...c,
|
|
102
|
+
children: /* @__PURE__ */ s(m.Provider, {
|
|
103
|
+
value: f,
|
|
104
|
+
children: [/* @__PURE__ */ o(h, { size: f }), a]
|
|
105
|
+
})
|
|
106
|
+
});
|
|
107
|
+
});
|
|
108
|
+
g.displayName = "TabsList";
|
|
109
|
+
var _ = i(({ className: n, size: r, fullWidth: i = !1, badge: c, disabled: u = !1, children: d, ...p }, h) => {
|
|
110
|
+
let g = a(m), _ = r ?? g ?? "small";
|
|
111
|
+
return /* @__PURE__ */ s(l.Tab, {
|
|
112
|
+
ref: h,
|
|
113
|
+
"data-slot": "tabs-trigger",
|
|
114
|
+
"data-size": _,
|
|
115
|
+
"data-full-width": i ? "true" : "false",
|
|
116
|
+
disabled: u,
|
|
117
|
+
className: e(f({
|
|
118
|
+
size: _,
|
|
119
|
+
fullWidth: i
|
|
120
|
+
}), n),
|
|
121
|
+
...p,
|
|
122
|
+
children: [d, c == null ? null : /* @__PURE__ */ o(t, {
|
|
123
|
+
variant: "mountain",
|
|
124
|
+
className: e("h-4 min-w-4 rounded-sm px-0.5 text-xs leading-3.5 tracking-tighter gap-0", u && "bg-disabled-background text-disabled-foreground border-transparent"),
|
|
125
|
+
children: c
|
|
126
|
+
})]
|
|
127
|
+
});
|
|
128
|
+
});
|
|
129
|
+
_.displayName = "TabsTrigger";
|
|
130
|
+
var v = i(({ className: t, children: r, title: i, ...a }, s) => {
|
|
131
|
+
let c = n(i, r);
|
|
132
|
+
return /* @__PURE__ */ o("span", {
|
|
133
|
+
ref: s,
|
|
134
|
+
"data-slot": "tabs-label",
|
|
135
|
+
className: e("block min-w-0 flex-1 truncate text-left", t),
|
|
136
|
+
title: c,
|
|
137
|
+
...a,
|
|
138
|
+
children: r
|
|
139
|
+
});
|
|
140
|
+
});
|
|
141
|
+
v.displayName = "TabsLabel";
|
|
142
|
+
var y = i(({ className: t, ...n }, r) => /* @__PURE__ */ o(l.Panel, {
|
|
143
|
+
ref: r,
|
|
144
|
+
"data-slot": "tabs-panel",
|
|
145
|
+
className: e("outline-none", t),
|
|
146
|
+
...n
|
|
147
|
+
}));
|
|
148
|
+
y.displayName = "TabsPanel";
|
|
149
|
+
//#endregion
|
|
150
|
+
export { p as Tabs, v as TabsLabel, g as TabsList, y as TabsPanel, _ as TabsTrigger, u as tabsListVariants, f as tabsTriggerVariants };
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return String(r);
|
|
1
|
+
//#region libs/aura/src/components/ui/core/tabs/tabs.utils.ts
|
|
2
|
+
function e(e, t) {
|
|
3
|
+
if (e != null) return e;
|
|
4
|
+
if (typeof t == "string" || typeof t == "number") return String(t);
|
|
6
5
|
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
6
|
+
//#endregion
|
|
7
|
+
export { e as resolveTabLabelTitle };
|
|
@@ -1,27 +1,13 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
d,
|
|
15
|
-
s,
|
|
16
|
-
n,
|
|
17
|
-
l,
|
|
18
|
-
e
|
|
19
|
-
),
|
|
20
|
-
...t
|
|
21
|
-
}
|
|
22
|
-
)
|
|
23
|
-
);
|
|
24
|
-
c.displayName = "Textarea";
|
|
25
|
-
export {
|
|
26
|
-
c as Textarea
|
|
27
|
-
};
|
|
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 { forwardRef as s } from "react";
|
|
3
|
+
import { jsx as c } from "react/jsx-runtime";
|
|
4
|
+
//#region libs/aura/src/components/ui/core/textarea/textarea.tsx
|
|
5
|
+
var l = s(({ className: s, ...l }, u) => /* @__PURE__ */ c("textarea", {
|
|
6
|
+
ref: u,
|
|
7
|
+
"data-slot": "textarea",
|
|
8
|
+
className: e("flex field-sizing-content h-auto min-h-20 w-full transition-[color,background-color,border-color,box-shadow] resize-none", i, a, n, r, o, t, s),
|
|
9
|
+
...l
|
|
10
|
+
}));
|
|
11
|
+
l.displayName = "Textarea";
|
|
12
|
+
//#endregion
|
|
13
|
+
export { l as Textarea };
|
|
@@ -1,74 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import { cva as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
ref: l,
|
|
57
|
-
"data-slot": "toggle",
|
|
58
|
-
disabled: d,
|
|
59
|
-
className: s(x({ variant: r, size: t, className: e })),
|
|
60
|
-
...u,
|
|
61
|
-
children: g ?? (c && /* @__PURE__ */ m(f, { children: [
|
|
62
|
-
i,
|
|
63
|
-
n && /* @__PURE__ */ o("span", { "data-slot": "toggle-label", children: n }),
|
|
64
|
-
h(a, d)
|
|
65
|
-
] }))
|
|
66
|
-
}
|
|
67
|
-
);
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
k.displayName = "Toggle";
|
|
71
|
-
export {
|
|
72
|
-
k as Toggle,
|
|
73
|
-
x as toggleVariants
|
|
74
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { Fragment as n, jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
4
|
+
import { cva as a } from "class-variance-authority";
|
|
5
|
+
import { Toggle as o } from "@base-ui/react/toggle";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/toggle/toggle.tsx
|
|
7
|
+
var s = a("inline-flex items-center justify-center gap-2 rounded-md text-sm font-medium text-muted-foreground hover:bg-accent-background hover:text-foreground disabled:pointer-events-none disabled:text-disabled-foreground aria-pressed:bg-active-muted-background aria-pressed:text-muted-foreground [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 [&_svg]:shrink-0 focus-visible:border-ring focus-visible:ring-ring-muted focus-visible:ring outline-none transition-[color,box-shadow] aria-invalid:ring-destructive-background/20 dark:aria-invalid:ring-destructive-background/40 aria-invalid:border-destructive-background whitespace-nowrap", {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-transparent",
|
|
11
|
+
outline: "border border-muted-background bg-transparent shadow-xs hover:bg-accent-background hover:text-foreground"
|
|
12
|
+
},
|
|
13
|
+
size: {
|
|
14
|
+
default: "h-9 px-2 min-w-9",
|
|
15
|
+
sm: "h-7 px-1.5 min-w-7",
|
|
16
|
+
lg: "h-8 px-2.5 min-w-8"
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
defaultVariants: {
|
|
20
|
+
variant: "default",
|
|
21
|
+
size: "default"
|
|
22
|
+
}
|
|
23
|
+
}), c = (t, n) => {
|
|
24
|
+
if (t == null || t === "") return null;
|
|
25
|
+
let i = String(t);
|
|
26
|
+
return /* @__PURE__ */ r("span", {
|
|
27
|
+
"data-slot": "toggle-count",
|
|
28
|
+
className: e("inline-flex h-4 min-w-4 items-center justify-center rounded-sm px-0.5 text-xs font-medium leading-3.5 tracking-tightest", n ? "bg-disabled-background text-disabled-foreground" : "bg-decorative-background-mountain text-decorative-foreground-mountain"),
|
|
29
|
+
children: i
|
|
30
|
+
});
|
|
31
|
+
}, l = t(({ className: t, variant: a, size: l, icon: u, label: d, count: f, children: p, disabled: m, ...h }, g) => {
|
|
32
|
+
let _ = u !== void 0 || d !== void 0 || f !== void 0;
|
|
33
|
+
return /* @__PURE__ */ r(o, {
|
|
34
|
+
ref: g,
|
|
35
|
+
"data-slot": "toggle",
|
|
36
|
+
disabled: m,
|
|
37
|
+
className: e(s({
|
|
38
|
+
variant: a,
|
|
39
|
+
size: l,
|
|
40
|
+
className: t
|
|
41
|
+
})),
|
|
42
|
+
...h,
|
|
43
|
+
children: p ?? (_ && /* @__PURE__ */ i(n, { children: [
|
|
44
|
+
u,
|
|
45
|
+
d && /* @__PURE__ */ r("span", {
|
|
46
|
+
"data-slot": "toggle-label",
|
|
47
|
+
children: d
|
|
48
|
+
}),
|
|
49
|
+
c(f, m)
|
|
50
|
+
] }))
|
|
51
|
+
});
|
|
52
|
+
});
|
|
53
|
+
l.displayName = "Toggle";
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as Toggle, s as toggleVariants };
|