@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,200 +1,105 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { forwardRef as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
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
|
-
|
|
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
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
)
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
"inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1",
|
|
107
|
-
"text-sm leading-[18px] tracking-tight font-medium text-foreground",
|
|
108
|
-
"transition-colors hover:bg-accent-background",
|
|
109
|
-
e
|
|
110
|
-
),
|
|
111
|
-
...t
|
|
112
|
-
}
|
|
113
|
-
)
|
|
114
|
-
);
|
|
115
|
-
N.displayName = "BreadcrumbPageButton";
|
|
116
|
-
const y = o(
|
|
117
|
-
({ className: e, children: t, ...r }, s) => /* @__PURE__ */ a(
|
|
118
|
-
"button",
|
|
119
|
-
{
|
|
120
|
-
ref: s,
|
|
121
|
-
"data-slot": "breadcrumb-ellipsis-button",
|
|
122
|
-
type: "button",
|
|
123
|
-
className: n(
|
|
124
|
-
"flex size-7 items-center justify-center rounded-md",
|
|
125
|
-
"text-muted-foreground transition-colors hover:bg-accent-background hover:text-foreground",
|
|
126
|
-
"data-[popup-open]:bg-accent-background data-[popup-open]:text-foreground",
|
|
127
|
-
e
|
|
128
|
-
),
|
|
129
|
-
...r,
|
|
130
|
-
children: t ?? /* @__PURE__ */ u(c, { children: [
|
|
131
|
-
/* @__PURE__ */ a(i, { className: "size-3" }),
|
|
132
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
|
|
133
|
-
] })
|
|
134
|
-
}
|
|
135
|
-
)
|
|
136
|
-
);
|
|
137
|
-
y.displayName = "BreadcrumbEllipsisButton";
|
|
138
|
-
const B = o(
|
|
139
|
-
({ children: e, className: t, ...r }, s) => /* @__PURE__ */ a(
|
|
140
|
-
"li",
|
|
141
|
-
{
|
|
142
|
-
ref: s,
|
|
143
|
-
"data-slot": "breadcrumb-separator",
|
|
144
|
-
role: "presentation",
|
|
145
|
-
"aria-hidden": "true",
|
|
146
|
-
className: n(
|
|
147
|
-
"flex size-4 items-center justify-center [&>svg]:size-4",
|
|
148
|
-
t
|
|
149
|
-
),
|
|
150
|
-
...r,
|
|
151
|
-
children: e ?? /* @__PURE__ */ a(p, { className: "size-4 text-muted-foreground" })
|
|
152
|
-
}
|
|
153
|
-
)
|
|
154
|
-
);
|
|
155
|
-
B.displayName = "BreadcrumbSeparator";
|
|
156
|
-
const k = o(
|
|
157
|
-
({ children: e, className: t, ...r }, s) => {
|
|
158
|
-
const d = e != null;
|
|
159
|
-
return /* @__PURE__ */ a(
|
|
160
|
-
"li",
|
|
161
|
-
{
|
|
162
|
-
ref: s,
|
|
163
|
-
"data-slot": "breadcrumb-ellipsis",
|
|
164
|
-
role: d ? void 0 : "presentation",
|
|
165
|
-
"aria-hidden": d ? void 0 : !0,
|
|
166
|
-
className: n(
|
|
167
|
-
"inline-flex items-center",
|
|
168
|
-
"has-[button[data-popup-open]]:bg-accent-background has-[button[data-popup-open]]:text-foreground has-[button[data-popup-open]]:rounded-sm",
|
|
169
|
-
t
|
|
170
|
-
),
|
|
171
|
-
...r,
|
|
172
|
-
children: e ?? /* @__PURE__ */ u(
|
|
173
|
-
"span",
|
|
174
|
-
{
|
|
175
|
-
className: n(
|
|
176
|
-
"flex size-7 items-center justify-center rounded-md",
|
|
177
|
-
"cursor-default text-muted-foreground hover:bg-transparent dark:hover:bg-transparent"
|
|
178
|
-
),
|
|
179
|
-
children: [
|
|
180
|
-
/* @__PURE__ */ a(i, { className: "size-3" }),
|
|
181
|
-
/* @__PURE__ */ a("span", { className: "sr-only", children: "More" })
|
|
182
|
-
]
|
|
183
|
-
}
|
|
184
|
-
)
|
|
185
|
-
}
|
|
186
|
-
);
|
|
187
|
-
}
|
|
188
|
-
);
|
|
189
|
-
k.displayName = "BreadcrumbEllipsis";
|
|
190
|
-
export {
|
|
191
|
-
b as Breadcrumb,
|
|
192
|
-
k as BreadcrumbEllipsis,
|
|
193
|
-
y as BreadcrumbEllipsisButton,
|
|
194
|
-
f as BreadcrumbItem,
|
|
195
|
-
x as BreadcrumbLink,
|
|
196
|
-
g as BreadcrumbList,
|
|
197
|
-
h as BreadcrumbPage,
|
|
198
|
-
N as BreadcrumbPageButton,
|
|
199
|
-
B as BreadcrumbSeparator
|
|
200
|
-
};
|
|
1
|
+
import { cn as e } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as t } from "react";
|
|
3
|
+
import { IconDots as n, IconSlash as r } from "@tabler/icons-react";
|
|
4
|
+
import { Fragment as i, jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
5
|
+
import { mergeProps as s } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender as c } from "@base-ui/react/use-render";
|
|
7
|
+
//#region libs/aura/src/components/ui/core/breadcrumb/breadcrumb.tsx
|
|
8
|
+
var l = t(({ ...e }, t) => /* @__PURE__ */ a("nav", {
|
|
9
|
+
ref: t,
|
|
10
|
+
"aria-label": "breadcrumb",
|
|
11
|
+
"data-slot": "breadcrumb",
|
|
12
|
+
...e
|
|
13
|
+
}));
|
|
14
|
+
l.displayName = "Breadcrumb";
|
|
15
|
+
var u = t(({ className: t, ...n }, r) => /* @__PURE__ */ a("ol", {
|
|
16
|
+
ref: r,
|
|
17
|
+
"data-slot": "breadcrumb-list",
|
|
18
|
+
className: e("flex items-center text-sm tracking-tight flex-wrap wrap-break-word", t),
|
|
19
|
+
...n
|
|
20
|
+
}));
|
|
21
|
+
u.displayName = "BreadcrumbList";
|
|
22
|
+
var d = t(({ className: t, ...n }, r) => /* @__PURE__ */ a("li", {
|
|
23
|
+
ref: r,
|
|
24
|
+
"data-slot": "breadcrumb-item",
|
|
25
|
+
className: e("inline-flex items-center text-muted-foreground text-sm tracking-tight", "has-[button[data-popup-open]]:bg-accent-background has-[button[data-popup-open]]:text-foreground has-[button[data-popup-open]]:rounded-sm", t),
|
|
26
|
+
...n
|
|
27
|
+
}));
|
|
28
|
+
d.displayName = "BreadcrumbItem";
|
|
29
|
+
var f = t(({ className: t, render: n, children: r, ...i }, a) => c({
|
|
30
|
+
defaultTagName: "a",
|
|
31
|
+
ref: a,
|
|
32
|
+
props: s({
|
|
33
|
+
"data-slot": "breadcrumb-link",
|
|
34
|
+
className: e("inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1", "text-muted-foreground text-sm leading-[18px] tracking-tight font-normal", "transition-colors hover:bg-accent-background hover:text-foreground", "aria-[current=page]:font-medium aria-[current=page]:text-foreground", t)
|
|
35
|
+
}, {
|
|
36
|
+
...i,
|
|
37
|
+
children: r
|
|
38
|
+
}),
|
|
39
|
+
render: n,
|
|
40
|
+
state: { slot: "breadcrumb-link" }
|
|
41
|
+
}));
|
|
42
|
+
f.displayName = "BreadcrumbLink";
|
|
43
|
+
var p = t(({ className: t, ...n }, r) => /* @__PURE__ */ a("span", {
|
|
44
|
+
ref: r,
|
|
45
|
+
"data-slot": "breadcrumb-page",
|
|
46
|
+
role: "link",
|
|
47
|
+
"aria-disabled": "true",
|
|
48
|
+
"aria-current": "page",
|
|
49
|
+
tabIndex: -1,
|
|
50
|
+
className: e("inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1", "cursor-default hover:bg-transparent dark:hover:bg-transparent", "text-sm leading-[18px] tracking-tight font-medium text-foreground", t),
|
|
51
|
+
...n
|
|
52
|
+
}));
|
|
53
|
+
p.displayName = "BreadcrumbPage";
|
|
54
|
+
var m = t(({ className: t, ...n }, r) => /* @__PURE__ */ a("button", {
|
|
55
|
+
ref: r,
|
|
56
|
+
"data-slot": "breadcrumb-page-button",
|
|
57
|
+
type: "button",
|
|
58
|
+
"aria-current": "page",
|
|
59
|
+
className: e("inline-flex h-7 items-center justify-center gap-2 rounded-md px-[6px] py-1", "text-sm leading-[18px] tracking-tight font-medium text-foreground", "transition-colors hover:bg-accent-background", t),
|
|
60
|
+
...n
|
|
61
|
+
}));
|
|
62
|
+
m.displayName = "BreadcrumbPageButton";
|
|
63
|
+
var h = t(({ className: t, children: r, ...s }, c) => /* @__PURE__ */ a("button", {
|
|
64
|
+
ref: c,
|
|
65
|
+
"data-slot": "breadcrumb-ellipsis-button",
|
|
66
|
+
type: "button",
|
|
67
|
+
className: e("flex size-7 items-center justify-center rounded-md", "text-muted-foreground transition-colors hover:bg-accent-background hover:text-foreground", "data-[popup-open]:bg-accent-background data-[popup-open]:text-foreground", t),
|
|
68
|
+
...s,
|
|
69
|
+
children: r ?? /* @__PURE__ */ o(i, { children: [/* @__PURE__ */ a(n, { className: "size-3" }), /* @__PURE__ */ a("span", {
|
|
70
|
+
className: "sr-only",
|
|
71
|
+
children: "More"
|
|
72
|
+
})] })
|
|
73
|
+
}));
|
|
74
|
+
h.displayName = "BreadcrumbEllipsisButton";
|
|
75
|
+
var g = t(({ children: t, className: n, ...i }, o) => /* @__PURE__ */ a("li", {
|
|
76
|
+
ref: o,
|
|
77
|
+
"data-slot": "breadcrumb-separator",
|
|
78
|
+
role: "presentation",
|
|
79
|
+
"aria-hidden": "true",
|
|
80
|
+
className: e("flex size-4 items-center justify-center [&>svg]:size-4", n),
|
|
81
|
+
...i,
|
|
82
|
+
children: t ?? /* @__PURE__ */ a(r, { className: "size-4 text-muted-foreground" })
|
|
83
|
+
}));
|
|
84
|
+
g.displayName = "BreadcrumbSeparator";
|
|
85
|
+
var _ = t(({ children: t, className: r, ...i }, s) => {
|
|
86
|
+
let c = t != null;
|
|
87
|
+
return /* @__PURE__ */ a("li", {
|
|
88
|
+
ref: s,
|
|
89
|
+
"data-slot": "breadcrumb-ellipsis",
|
|
90
|
+
role: c ? void 0 : "presentation",
|
|
91
|
+
"aria-hidden": !c || void 0,
|
|
92
|
+
className: e("inline-flex items-center", "has-[button[data-popup-open]]:bg-accent-background has-[button[data-popup-open]]:text-foreground has-[button[data-popup-open]]:rounded-sm", r),
|
|
93
|
+
...i,
|
|
94
|
+
children: t ?? /* @__PURE__ */ o("span", {
|
|
95
|
+
className: e("flex size-7 items-center justify-center rounded-md", "cursor-default text-muted-foreground hover:bg-transparent dark:hover:bg-transparent"),
|
|
96
|
+
children: [/* @__PURE__ */ a(n, { className: "size-3" }), /* @__PURE__ */ a("span", {
|
|
97
|
+
className: "sr-only",
|
|
98
|
+
children: "More"
|
|
99
|
+
})]
|
|
100
|
+
})
|
|
101
|
+
});
|
|
102
|
+
});
|
|
103
|
+
_.displayName = "BreadcrumbEllipsis";
|
|
104
|
+
//#endregion
|
|
105
|
+
export { l as Breadcrumb, _ as BreadcrumbEllipsis, h as BreadcrumbEllipsisButton, d as BreadcrumbItem, f as BreadcrumbLink, u as BreadcrumbList, p as BreadcrumbPage, m as BreadcrumbPageButton, g as BreadcrumbSeparator };
|
|
@@ -1,52 +1,47 @@
|
|
|
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
|
-
k.displayName = "Button";
|
|
49
|
-
export {
|
|
50
|
-
k as Button,
|
|
51
|
-
v as buttonVariants
|
|
52
|
-
};
|
|
1
|
+
import { cn as e, focusRing as t, focusRingDestructive as n } from "../../../../lib/utils.js";
|
|
2
|
+
import { forwardRef as r } from "react";
|
|
3
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
4
|
+
import { cva as a } from "class-variance-authority";
|
|
5
|
+
import { Button as o } from "@base-ui/react/button";
|
|
6
|
+
//#region libs/aura/src/components/ui/core/button/button.tsx
|
|
7
|
+
var s = a(`inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-lg text-sm leading-4.5 tracking-normal font-medium transition-all cursor-pointer disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 ${t} aria-invalid:focus-visible:shadow-focus-ring-destructive`, {
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "bg-primary-background text-foreground-on-primary hover:bg-primary-background-hover",
|
|
11
|
+
defaultOnDark: "bg-primary-background-fixed-dark text-foreground-fixed-dark hover:bg-primary-background-fixed-dark-hover disabled:opacity-100 disabled:bg-disabled-background-fixed-dark disabled:text-disabled-foreground-fixed-dark",
|
|
12
|
+
secondary: "bg-secondary-background text-secondary-foreground hover:bg-secondary-background-hover",
|
|
13
|
+
secondaryOnDark: "bg-secondary-background-fixed-dark text-foreground-fixed-light hover:bg-secondary-background-fixed-dark-hover disabled:opacity-100 disabled:bg-disabled-background-fixed-dark disabled:text-disabled-foreground-fixed-dark",
|
|
14
|
+
outline: "border border-border-emphasized bg-background text-foreground hover:bg-accent-background disabled:border-transparent disabled:bg-disabled-background",
|
|
15
|
+
ghost: "hover:bg-accent-background",
|
|
16
|
+
ghostOnDark: "text-foreground-fixed-light hover:bg-secondary-background-fixed-dark disabled:opacity-100 disabled:text-disabled-foreground-fixed-dark",
|
|
17
|
+
destructive: `bg-destructive-background text-destructive-foreground-on-critical hover:bg-destructive-background-hover ${n}`
|
|
18
|
+
},
|
|
19
|
+
size: {
|
|
20
|
+
default: "h-9 px-3 has-[>svg]:px-3",
|
|
21
|
+
sm: "h-7 rounded-md gap-1.5 px-2 has-[>svg]:px-2",
|
|
22
|
+
lg: "h-10 px-4 has-[>svg]:px-4",
|
|
23
|
+
icon: "size-9",
|
|
24
|
+
"icon-sm": "size-7",
|
|
25
|
+
"icon-lg": "size-10"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
28
|
+
defaultVariants: {
|
|
29
|
+
variant: "default",
|
|
30
|
+
size: "default"
|
|
31
|
+
}
|
|
32
|
+
}), c = r(({ className: t, variant: n, size: r, children: a, render: c, nativeButton: l, ...u }, d) => /* @__PURE__ */ i(o, {
|
|
33
|
+
ref: d,
|
|
34
|
+
"data-slot": "button",
|
|
35
|
+
render: c,
|
|
36
|
+
nativeButton: l ?? (!c && void 0),
|
|
37
|
+
className: e(s({
|
|
38
|
+
variant: n,
|
|
39
|
+
size: r,
|
|
40
|
+
className: t
|
|
41
|
+
})),
|
|
42
|
+
...u,
|
|
43
|
+
children: a
|
|
44
|
+
}));
|
|
45
|
+
c.displayName = "Button";
|
|
46
|
+
//#endregion
|
|
47
|
+
export { c as Button, s as buttonVariants };
|
|
@@ -1,83 +1,44 @@
|
|
|
1
|
-
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
-
import { mergeProps as s } from "@base-ui/react/merge-props";
|
|
3
|
-
import { useRender as i } from "@base-ui/react/use-render";
|
|
4
|
-
import { cva as l } from "class-variance-authority";
|
|
5
1
|
import { cn as e } from "../../../../lib/utils.js";
|
|
6
|
-
import { Separator as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
"div",
|
|
28
|
-
{
|
|
29
|
-
role: "group",
|
|
30
|
-
"data-slot": "button-group",
|
|
31
|
-
"data-orientation": t,
|
|
32
|
-
className: e(u({ orientation: t }), o),
|
|
33
|
-
...r
|
|
34
|
-
}
|
|
35
|
-
);
|
|
2
|
+
import { Separator as t } from "../separator/separator.js";
|
|
3
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
4
|
+
import { cva as r } from "class-variance-authority";
|
|
5
|
+
import { mergeProps as i } from "@base-ui/react/merge-props";
|
|
6
|
+
import { useRender as a } from "@base-ui/react/use-render";
|
|
7
|
+
//#region libs/aura/src/components/ui/core/button-group/button-group.tsx
|
|
8
|
+
var o = r("flex w-fit items-stretch [&>*]:focus-visible:z-10 [&>*]:focus-visible:relative [&>[data-slot=select-trigger]:not([class*='w-'])]:w-fit [&>input]:flex-1 has-[select[aria-hidden=true]:last-child]:[&>[data-slot=select-trigger]:last-of-type]:rounded-r-md has-[>[data-slot=button-group]]:gap-2", {
|
|
9
|
+
variants: { orientation: {
|
|
10
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
11
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
12
|
+
} },
|
|
13
|
+
defaultVariants: { orientation: "horizontal" }
|
|
14
|
+
});
|
|
15
|
+
function s({ className: t, orientation: r, ...i }) {
|
|
16
|
+
return /* @__PURE__ */ n("div", {
|
|
17
|
+
role: "group",
|
|
18
|
+
"data-slot": "button-group",
|
|
19
|
+
"data-orientation": r,
|
|
20
|
+
className: e(o({ orientation: r }), t),
|
|
21
|
+
...i
|
|
22
|
+
});
|
|
36
23
|
}
|
|
37
|
-
function
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
className: e(
|
|
48
|
-
"bg-muted-background flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4",
|
|
49
|
-
o
|
|
50
|
-
)
|
|
51
|
-
},
|
|
52
|
-
{ ...n, children: r }
|
|
53
|
-
),
|
|
54
|
-
render: t,
|
|
55
|
-
state: {
|
|
56
|
-
slot: "button-group-text"
|
|
57
|
-
}
|
|
58
|
-
});
|
|
24
|
+
function c({ className: t, render: n, children: r, ...o }) {
|
|
25
|
+
return a({
|
|
26
|
+
defaultTagName: "div",
|
|
27
|
+
props: i({ className: e("bg-muted-background flex items-center gap-2 rounded-md border px-4 text-sm font-medium shadow-xs [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4", t) }, {
|
|
28
|
+
...o,
|
|
29
|
+
children: r
|
|
30
|
+
}),
|
|
31
|
+
render: n,
|
|
32
|
+
state: { slot: "button-group-text" }
|
|
33
|
+
});
|
|
59
34
|
}
|
|
60
|
-
function
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
{
|
|
68
|
-
"data-slot": "button-group-separator",
|
|
69
|
-
orientation: t,
|
|
70
|
-
className: e(
|
|
71
|
-
"bg-muted-background relative m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
72
|
-
o
|
|
73
|
-
),
|
|
74
|
-
...r
|
|
75
|
-
}
|
|
76
|
-
);
|
|
35
|
+
function l({ className: r, orientation: i = "vertical", ...a }) {
|
|
36
|
+
return /* @__PURE__ */ n(t, {
|
|
37
|
+
"data-slot": "button-group-separator",
|
|
38
|
+
orientation: i,
|
|
39
|
+
className: e("bg-muted-background relative m-0 self-stretch data-[orientation=vertical]:h-auto", r),
|
|
40
|
+
...a
|
|
41
|
+
});
|
|
77
42
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
x as ButtonGroupSeparator,
|
|
81
|
-
v as ButtonGroupText,
|
|
82
|
-
u as buttonGroupVariants
|
|
83
|
-
};
|
|
43
|
+
//#endregion
|
|
44
|
+
export { s as ButtonGroup, l as ButtonGroupSeparator, c as ButtonGroupText, o as buttonGroupVariants };
|