@bzync/rui 0.0.3 → 0.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/{autocomplete-CfbfpcO4.js → autocomplete-BgKbj6M4.js} +2 -2
- package/dist/{autocomplete-CaysJRpk.cjs → autocomplete-Bk4pRQ2R.cjs} +1 -1
- package/dist/{calendar-Bnld4G59.cjs → calendar-CUXpVrVE.cjs} +1 -1
- package/dist/{calendar-CdICOROs.js → calendar-j2_zvum1.js} +1 -1
- package/dist/{component-styles-Ce56hn9T.js → component-styles-Bgy44fc8.js} +2 -2
- package/dist/{component-styles-TkZ7v6Ef.cjs → component-styles-DOUctc8_.cjs} +1 -1
- package/dist/components/accordion.cjs +1 -1
- package/dist/components/accordion.js +1 -1
- package/dist/components/alert.cjs +1 -1
- package/dist/components/alert.js +1 -1
- package/dist/components/aspect-ratio.cjs +1 -0
- package/dist/components/aspect-ratio.d.ts +5 -0
- package/dist/components/aspect-ratio.js +20 -0
- package/dist/components/autocomplete.cjs +1 -1
- package/dist/components/autocomplete.js +1 -1
- package/dist/components/avatar-group.cjs +1 -0
- package/dist/components/avatar-group.d.ts +14 -0
- package/dist/components/avatar-group.js +35 -0
- package/dist/components/badge.cjs +1 -1
- package/dist/components/badge.js +1 -1
- package/dist/components/blockquote.cjs +1 -0
- package/dist/components/blockquote.d.ts +10 -0
- package/dist/components/blockquote.js +32 -0
- package/dist/components/breadcrumb.cjs +1 -1
- package/dist/components/breadcrumb.js +1 -1
- package/dist/components/button-group.cjs +1 -0
- package/dist/components/button-group.d.ts +7 -0
- package/dist/components/button-group.js +26 -0
- package/dist/components/button.cjs +1 -1
- package/dist/components/button.js +3 -3
- package/dist/components/calendar.cjs +1 -1
- package/dist/components/calendar.js +1 -1
- package/dist/components/card.cjs +1 -1
- package/dist/components/card.js +3 -3
- package/dist/components/checkbox.cjs +1 -1
- package/dist/components/checkbox.js +1 -1
- package/dist/components/code.cjs +1 -1
- package/dist/components/code.d.ts +4 -4
- package/dist/components/code.js +59 -57
- package/dist/components/command.cjs +1 -1
- package/dist/components/command.js +1 -1
- package/dist/components/copy-button.cjs +1 -1
- package/dist/components/copy-button.js +3 -3
- package/dist/components/currency.cjs +1 -0
- package/dist/components/currency.d.ts +18 -0
- package/dist/components/currency.js +62 -0
- package/dist/components/datatable.cjs +1 -1
- package/dist/components/datatable.js +1 -1
- package/dist/components/datepicker.cjs +1 -1
- package/dist/components/datepicker.js +2 -2
- package/dist/components/description-list.cjs +1 -0
- package/dist/components/description-list.d.ts +14 -0
- package/dist/components/description-list.js +38 -0
- package/dist/components/divider.cjs +1 -0
- package/dist/components/divider.d.ts +12 -0
- package/dist/components/divider.js +45 -0
- package/dist/components/drawer.cjs +1 -1
- package/dist/components/drawer.js +1 -1
- package/dist/components/file-upload.cjs +1 -1
- package/dist/components/file-upload.js +2 -2
- package/dist/components/form-field.cjs +1 -1
- package/dist/components/form-field.js +2 -2
- package/dist/components/input.cjs +1 -1
- package/dist/components/input.js +3 -3
- package/dist/components/label.cjs +1 -1
- package/dist/components/label.js +1 -1
- package/dist/components/modal.cjs +1 -1
- package/dist/components/modal.js +1 -1
- package/dist/components/navigation.cjs +1 -1
- package/dist/components/navigation.js +1 -1
- package/dist/components/number-input.cjs +1 -1
- package/dist/components/number-input.js +2 -2
- package/dist/components/pagination.cjs +1 -1
- package/dist/components/pagination.js +1 -1
- package/dist/components/radio.cjs +1 -1
- package/dist/components/radio.js +2 -2
- package/dist/components/rating.cjs +1 -0
- package/dist/components/rating.d.ts +15 -0
- package/dist/components/rating.js +75 -0
- package/dist/components/scroll-area.cjs +1 -0
- package/dist/components/scroll-area.d.ts +8 -0
- package/dist/components/scroll-area.js +19 -0
- package/dist/components/select.cjs +1 -1
- package/dist/components/select.js +1 -1
- package/dist/components/slider.cjs +1 -1
- package/dist/components/slider.js +2 -2
- package/dist/components/snackbar.cjs +1 -1
- package/dist/components/snackbar.js +1 -1
- package/dist/components/stat.cjs +1 -1
- package/dist/components/stat.js +8 -8
- package/dist/components/table.cjs +1 -1
- package/dist/components/table.js +2 -2
- package/dist/components/tabs.cjs +1 -1
- package/dist/components/tabs.js +1 -1
- package/dist/components/textarea.cjs +1 -1
- package/dist/components/textarea.js +2 -2
- package/dist/components/theme-toggle.cjs +1 -1
- package/dist/components/theme-toggle.js +1 -1
- package/dist/components/time-picker.cjs +1 -0
- package/dist/components/time-picker.d.ts +29 -0
- package/dist/components/time-picker.js +336 -0
- package/dist/components/toggle.cjs +1 -0
- package/dist/components/toggle.d.ts +42 -0
- package/dist/components/toggle.js +116 -0
- package/dist/components/typography.cjs +1 -0
- package/dist/components/typography.d.ts +51 -0
- package/dist/components/typography.js +189 -0
- package/dist/{datatable-BB3v__r5.cjs → datatable-rzDgQ3r6.cjs} +1 -1
- package/dist/{datatable-DlBhUhuO.js → datatable-yBN4M3UV.js} +3 -3
- package/dist/{drawer-Cbuh6qdL.cjs → drawer-CTeBsYrO.cjs} +1 -1
- package/dist/{drawer-CqkVZT9Y.js → drawer-ixuzyLVS.js} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +12 -0
- package/dist/index.js +102 -90
- package/dist/lib/component-styles.d.ts +1 -1
- package/dist/select-BFwx--uK.cjs +1 -0
- package/dist/{select-Ch5fp1GT.js → select-ClWrcj3R.js} +3 -3
- package/dist/styles.css +1 -1
- package/dist/{theme-toggle-CnoiorKV.js → theme-toggle-Bb0BYo51.js} +1 -1
- package/dist/{theme-toggle-Dp1-24zH.cjs → theme-toggle-Cld8tktJ.cjs} +1 -1
- package/package.json +1 -1
- package/dist/select-q0YCMhBP.cjs +0 -1
package/dist/index.js
CHANGED
|
@@ -1,94 +1,106 @@
|
|
|
1
1
|
import { t as e } from "./cn-DpgY2leY.js";
|
|
2
2
|
import { Accordion as t, Collapsible as n } from "./components/accordion.js";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { AspectRatio as r } from "./components/aspect-ratio.js";
|
|
4
|
+
import { t as i } from "./calendar-j2_zvum1.js";
|
|
5
|
+
import { Alert as a } from "./components/alert.js";
|
|
6
|
+
import { AuthBackdrop as ee } from "./components/auth-backdrop.js";
|
|
7
|
+
import { t as te } from "./autocomplete-BgKbj6M4.js";
|
|
7
8
|
import { t as o } from "./use-event-callback-DGkfO_uu.js";
|
|
8
|
-
import { Avatar as
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { a as
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
48
|
-
import {
|
|
49
|
-
import {
|
|
50
|
-
import {
|
|
51
|
-
import {
|
|
52
|
-
import {
|
|
53
|
-
import {
|
|
54
|
-
import {
|
|
55
|
-
import {
|
|
56
|
-
import {
|
|
57
|
-
import {
|
|
58
|
-
import {
|
|
59
|
-
import {
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import {
|
|
63
|
-
import {
|
|
64
|
-
import {
|
|
65
|
-
import {
|
|
66
|
-
import {
|
|
67
|
-
import {
|
|
68
|
-
import {
|
|
9
|
+
import { Avatar as ne } from "./components/avatar.js";
|
|
10
|
+
import { AvatarGroup as re, AvatarGroupOverflow as ie } from "./components/avatar-group.js";
|
|
11
|
+
import { Badge as ae, badgeVariants as oe } from "./components/badge.js";
|
|
12
|
+
import { BillingIntervalToggle as s } from "./components/billing-interval-toggle.js";
|
|
13
|
+
import { Blockquote as c } from "./components/blockquote.js";
|
|
14
|
+
import { Breadcrumb as l } from "./components/breadcrumb.js";
|
|
15
|
+
import { Button as u, buttonSizes as d, buttonVariants as f } from "./components/button.js";
|
|
16
|
+
import { ButtonGroup as p } from "./components/button-group.js";
|
|
17
|
+
import { Callout as m } from "./components/callout.js";
|
|
18
|
+
import { Card as h, CardBody as g, CardDescription as _, CardFooter as v, CardHeader as y, CardTitle as b, cardVariants as x } from "./components/card.js";
|
|
19
|
+
import { a as S, c as C, i as w, l as T, n as E, o as D, r as O, s as k, t as A, u as j } from "./charts-CxEy2c3M.js";
|
|
20
|
+
import { Checkbox as M } from "./components/checkbox.js";
|
|
21
|
+
import { CodeBlock as N, CodeEditor as P, InlineCode as F } from "./components/code.js";
|
|
22
|
+
import { a as I, i as L, n as R, r as z, t as B } from "./focus-Dk1YWVPN.js";
|
|
23
|
+
import { CommandPalette as V, CommandProvider as H, useCommand as U } from "./components/command.js";
|
|
24
|
+
import { Modal as W, ModalBody as G, ModalDescription as K, ModalFooter as q, ModalHeader as se, ModalTitle as ce } from "./components/modal.js";
|
|
25
|
+
import { ConfirmDialog as le } from "./components/confirm-dialog.js";
|
|
26
|
+
import { CopyButton as ue } from "./components/copy-button.js";
|
|
27
|
+
import { Currency as de, formatCurrency as fe } from "./components/currency.js";
|
|
28
|
+
import { t as pe } from "./datatable-yBN4M3UV.js";
|
|
29
|
+
import { DatePicker as me } from "./components/datepicker.js";
|
|
30
|
+
import { DescriptionDetails as he, DescriptionItem as ge, DescriptionList as _e, DescriptionTerm as ve } from "./components/description-list.js";
|
|
31
|
+
import { Divider as ye } from "./components/divider.js";
|
|
32
|
+
import { t as be } from "./theme-toggle-Bb0BYo51.js";
|
|
33
|
+
import { t as xe } from "./drawer-ixuzyLVS.js";
|
|
34
|
+
import { DropdownMenu as Se } from "./components/dropdown-menu.js";
|
|
35
|
+
import { EmptyState as Ce } from "./components/empty-state.js";
|
|
36
|
+
import { ErrorState as we } from "./components/error-state.js";
|
|
37
|
+
import { FileUpload as Te } from "./components/file-upload.js";
|
|
38
|
+
import { FormField as Ee } from "./components/form-field.js";
|
|
39
|
+
import { Input as De } from "./components/input.js";
|
|
40
|
+
import { InfoButton as Oe } from "./components/info-button.js";
|
|
41
|
+
import { Kbd as ke } from "./components/kbd.js";
|
|
42
|
+
import { Label as Ae } from "./components/label.js";
|
|
43
|
+
import { Link as je } from "./components/link.js";
|
|
44
|
+
import { List as Me, ListItem as Ne } from "./components/list.js";
|
|
45
|
+
import { AppShell as Pe, AppShellBody as Fe, AppShellHeader as Ie, AppShellMain as Le, Container as Re, Footer as ze, Inline as Be, PageHeader as Ve, Stack as He } from "./components/layout.js";
|
|
46
|
+
import { BottomBar as Ue, BrandLink as We, IconButton as Ge, Navbar as Ke, NavigationLink as qe, Sidebar as Je, Topbar as Ye, TopbarTitle as Xe } from "./components/navigation.js";
|
|
47
|
+
import { NumberInput as Ze } from "./components/number-input.js";
|
|
48
|
+
import { OtpInput as Qe } from "./components/otp-input.js";
|
|
49
|
+
import { Pagination as $e } from "./components/pagination.js";
|
|
50
|
+
import { Popover as et, PopoverContent as tt } from "./components/popover.js";
|
|
51
|
+
import { Progressbar as nt } from "./components/progressbar.js";
|
|
52
|
+
import { Radio as rt, RadioGroup as it } from "./components/radio.js";
|
|
53
|
+
import { Rating as at } from "./components/rating.js";
|
|
54
|
+
import { RichTextEditor as ot } from "./components/richtext.js";
|
|
55
|
+
import { ScrollArea as st } from "./components/scroll-area.js";
|
|
56
|
+
import { t as ct } from "./select-ClWrcj3R.js";
|
|
57
|
+
import { Separator as lt } from "./components/separator.js";
|
|
58
|
+
import { Skeleton as ut, SkeletonAvatar as dt, SkeletonCard as ft, SkeletonTable as pt, SkeletonText as mt, SkeletonTopbar as ht } from "./components/skeleton.js";
|
|
59
|
+
import { Slider as gt } from "./components/slider.js";
|
|
60
|
+
import { SnackbarProvider as _t, useSnackbar as vt } from "./components/snackbar.js";
|
|
61
|
+
import { Spinner as yt } from "./components/spinner.js";
|
|
62
|
+
import { Stat as bt } from "./components/stat.js";
|
|
63
|
+
import { StatusDot as xt } from "./components/status-dot.js";
|
|
64
|
+
import { Stepper as St } from "./components/stepper.js";
|
|
65
|
+
import { Switch as Ct } from "./components/switch.js";
|
|
66
|
+
import { Table as wt, TableBody as Tt, TableCell as Et, TableHead as Dt, TableHeader as Ot, TableRow as kt } from "./components/table.js";
|
|
67
|
+
import { Tabs as At, TabsContent as jt, TabsList as Mt, TabsTrigger as Nt } from "./components/tabs.js";
|
|
68
|
+
import { Tag as Pt } from "./components/tag.js";
|
|
69
|
+
import { n as Ft, t as It } from "./terminal-BOR2cFi1.js";
|
|
70
|
+
import { Textarea as Lt } from "./components/textarea.js";
|
|
71
|
+
import { Timeline as Rt } from "./components/timeline.js";
|
|
72
|
+
import { Toggle as zt, ToggleGroup as Bt, ToggleGroupItem as Vt, toggleSizes as Ht, toggleVariants as Ut } from "./components/toggle.js";
|
|
73
|
+
import { Tooltip as Wt } from "./components/tooltip.js";
|
|
74
|
+
import { ThemeProvider as Gt, useTheme as Kt } from "./components/theme-provider.js";
|
|
75
|
+
import { TimePicker as qt } from "./components/time-picker.js";
|
|
76
|
+
import { Tree as Jt } from "./components/tree.js";
|
|
77
|
+
import { Heading as Yt, Prose as Xt, Text as Zt, Time as Qt } from "./components/typography.js";
|
|
78
|
+
import { ArticleJsonLd as $t, BreadcrumbJsonLd as en, SeoImage as tn, StructuredData as nn } from "./components/seo.js";
|
|
79
|
+
import { Component as rn, useCallback as J, useEffect as Y, useLayoutEffect as X, useRef as Z, useState as Q } from "react";
|
|
80
|
+
import { jsx as $, jsxs as an } from "react/jsx-runtime";
|
|
69
81
|
//#region src/hooks/use-is-mounted.ts
|
|
70
|
-
function
|
|
82
|
+
function on() {
|
|
71
83
|
let e = Z(!1);
|
|
72
|
-
return
|
|
84
|
+
return Y(() => (e.current = !0, () => {
|
|
73
85
|
e.current = !1;
|
|
74
|
-
}), []),
|
|
86
|
+
}), []), J(() => e.current, []);
|
|
75
87
|
}
|
|
76
88
|
//#endregion
|
|
77
89
|
//#region src/hooks/use-isomorphic-layout-effect.ts
|
|
78
|
-
var
|
|
90
|
+
var sn = typeof window < "u" ? X : Y;
|
|
79
91
|
//#endregion
|
|
80
92
|
//#region src/hooks/use-previous.ts
|
|
81
|
-
function
|
|
93
|
+
function cn(e) {
|
|
82
94
|
let t = Z(void 0);
|
|
83
|
-
return
|
|
95
|
+
return Y(() => {
|
|
84
96
|
t.current = e;
|
|
85
97
|
}, [e]), t.current;
|
|
86
98
|
}
|
|
87
99
|
//#endregion
|
|
88
100
|
//#region src/hooks/use-update-effect.ts
|
|
89
|
-
function
|
|
101
|
+
function ln(e, t) {
|
|
90
102
|
let n = Z(!1);
|
|
91
|
-
|
|
103
|
+
Y(() => {
|
|
92
104
|
if (!n.current) {
|
|
93
105
|
n.current = !0;
|
|
94
106
|
return;
|
|
@@ -98,17 +110,17 @@ function Rt(e, t) {
|
|
|
98
110
|
}
|
|
99
111
|
//#endregion
|
|
100
112
|
//#region src/hooks/use-controllable-state.ts
|
|
101
|
-
function
|
|
113
|
+
function un({ value: e, defaultValue: t, onChange: n }) {
|
|
102
114
|
let [r, i] = Q(t), a = e !== void 0;
|
|
103
|
-
return [a ? e : r,
|
|
115
|
+
return [a ? e : r, J((e) => {
|
|
104
116
|
a || i(e), n?.(e);
|
|
105
117
|
}, [a, n])];
|
|
106
118
|
}
|
|
107
119
|
//#endregion
|
|
108
120
|
//#region src/hooks/use-media-query.ts
|
|
109
|
-
function
|
|
121
|
+
function dn(e) {
|
|
110
122
|
let [t, n] = Q(() => typeof window > "u" || window.matchMedia === void 0 ? !1 : window.matchMedia(e).matches);
|
|
111
|
-
return
|
|
123
|
+
return Y(() => {
|
|
112
124
|
let t = window.matchMedia(e), r = () => n(t.matches);
|
|
113
125
|
return t.addEventListener ? t.addEventListener("change", r) : t.addListener(r), () => {
|
|
114
126
|
t.removeEventListener ? t.removeEventListener("change", r) : t.removeListener(r);
|
|
@@ -117,28 +129,28 @@ function Bt(e) {
|
|
|
117
129
|
}
|
|
118
130
|
//#endregion
|
|
119
131
|
//#region src/hooks/use-abort-signal.ts
|
|
120
|
-
function
|
|
132
|
+
function fn(e = []) {
|
|
121
133
|
let t = Z(null);
|
|
122
|
-
return t.current === null && (t.current = new AbortController()),
|
|
134
|
+
return t.current === null && (t.current = new AbortController()), Y(() => {
|
|
123
135
|
let e = new AbortController();
|
|
124
136
|
return t.current = e, () => e.abort();
|
|
125
137
|
}, e), t.current.signal;
|
|
126
138
|
}
|
|
127
139
|
//#endregion
|
|
128
140
|
//#region src/utils/portal.ts
|
|
129
|
-
function
|
|
141
|
+
function pn(e = "rui-portal") {
|
|
130
142
|
if (typeof document > "u") return null;
|
|
131
143
|
let t = document.getElementById(e);
|
|
132
144
|
return t || (t = document.createElement("div"), t.id = e, document.body.appendChild(t)), t;
|
|
133
145
|
}
|
|
134
146
|
//#endregion
|
|
135
147
|
//#region src/utils/assert.ts
|
|
136
|
-
function
|
|
148
|
+
function mn(e, t) {
|
|
137
149
|
if (!e) throw Error(t);
|
|
138
150
|
}
|
|
139
151
|
//#endregion
|
|
140
152
|
//#region src/errors/error-boundary.tsx
|
|
141
|
-
var
|
|
153
|
+
var hn = class extends rn {
|
|
142
154
|
state = {
|
|
143
155
|
hasError: !1,
|
|
144
156
|
error: null
|
|
@@ -161,7 +173,7 @@ var Wt = class extends Mt {
|
|
|
161
173
|
render() {
|
|
162
174
|
if (this.state.hasError) {
|
|
163
175
|
let { fallback: e } = this.props;
|
|
164
|
-
return typeof e == "function" ? e(this.state.error, this.reset) : e || /* @__PURE__ */
|
|
176
|
+
return typeof e == "function" ? e(this.state.error, this.reset) : e || /* @__PURE__ */ an("div", {
|
|
165
177
|
role: "alert",
|
|
166
178
|
className: "rounded-lg border border-red-500/20 bg-red-500/[0.06] p-4 text-sm text-red-700 dark:text-red-300",
|
|
167
179
|
children: [
|
|
@@ -187,9 +199,9 @@ var Wt = class extends Mt {
|
|
|
187
199
|
};
|
|
188
200
|
//#endregion
|
|
189
201
|
//#region src/lifecycle/create-safe-effect.ts
|
|
190
|
-
function
|
|
202
|
+
function gn(e, t) {
|
|
191
203
|
let n = Z(null);
|
|
192
|
-
|
|
204
|
+
Y(() => {
|
|
193
205
|
let t = new AbortController();
|
|
194
206
|
n.current = t;
|
|
195
207
|
let r = !0, i = e({
|
|
@@ -203,13 +215,13 @@ function Gt(e, t) {
|
|
|
203
215
|
}
|
|
204
216
|
//#endregion
|
|
205
217
|
//#region src/lifecycle/mount.ts
|
|
206
|
-
function
|
|
218
|
+
function _n(e) {
|
|
207
219
|
let t = o(e);
|
|
208
|
-
|
|
220
|
+
Y(() => t(), [t]);
|
|
209
221
|
}
|
|
210
|
-
function
|
|
222
|
+
function vn(e) {
|
|
211
223
|
let t = o(e);
|
|
212
|
-
|
|
224
|
+
Y(() => () => t(), [t]);
|
|
213
225
|
}
|
|
214
226
|
//#endregion
|
|
215
|
-
export { t as Accordion,
|
|
227
|
+
export { t as Accordion, a as Alert, Pe as AppShell, Fe as AppShellBody, Ie as AppShellHeader, Le as AppShellMain, $t as ArticleJsonLd, r as AspectRatio, ee as AuthBackdrop, te as Autocomplete, ne as Avatar, re as AvatarGroup, ie as AvatarGroupOverflow, ae as Badge, j as BarChart, s as BillingIntervalToggle, c as Blockquote, Ue as BottomBar, We as BrandLink, l as Breadcrumb, en as BreadcrumbJsonLd, u as Button, p as ButtonGroup, i as Calendar, m as Callout, h as Card, g as CardBody, _ as CardDescription, v as CardFooter, y as CardHeader, b as CardTitle, M as Checkbox, N as CodeBlock, P as CodeEditor, n as Collapsible, V as CommandPalette, H as CommandProvider, le as ConfirmDialog, Re as Container, ue as CopyButton, de as Currency, z as DURATIONS, pe as DataTable, me as DatePicker, he as DescriptionDetails, ge as DescriptionItem, _e as DescriptionList, ve as DescriptionTerm, ye as Divider, k as DonutChart, xe as Drawer, Se as DropdownMenu, Ce as EmptyState, hn as ErrorBoundary, we as ErrorState, L as FOCUSABLE_SELECTOR, Te as FileUpload, ze as Footer, Ee as FormField, E as FunnelChart, S as GanttChart, Yt as Heading, w as HeatmapChart, Ge as IconButton, Oe as InfoButton, Be as Inline, F as InlineCode, De as Input, I as KEY, ke as Kbd, Ae as Label, T as LineChart, je as Link, Me as List, Ne as ListItem, W as Modal, G as ModalBody, K as ModalDescription, q as ModalFooter, se as ModalHeader, ce as ModalTitle, C as MultiLineChart, Ke as Navbar, qe as NavigationLink, Ze as NumberInput, Qe as OtpInput, Ve as PageHeader, $e as Pagination, et as Popover, tt as PopoverContent, nt as Progressbar, Xt as Prose, O as RadarChart, rt as Radio, it as RadioGroup, at as Rating, ot as RichTextEditor, D as ScatterChart, st as ScrollArea, ct as Select, tn as SeoImage, lt as Separator, Je as Sidebar, ut as Skeleton, dt as SkeletonAvatar, ft as SkeletonCard, pt as SkeletonTable, mt as SkeletonText, ht as SkeletonTopbar, gt as Slider, _t as SnackbarProvider, yt as Spinner, He as Stack, bt as Stat, xt as StatusDot, St as Stepper, nn as StructuredData, Ct as Switch, wt as Table, Tt as TableBody, Et as TableCell, Dt as TableHead, Ot as TableHeader, kt as TableRow, At as Tabs, jt as TabsContent, Mt as TabsList, Nt as TabsTrigger, Pt as Tag, Ft as TerminalBlock, It as TerminalEmulator, Zt as Text, Lt as Textarea, Gt as ThemeProvider, be as ThemeToggle, Qt as Time, qt as TimePicker, Rt as Timeline, zt as Toggle, Bt as ToggleGroup, Vt as ToggleGroupItem, Wt as Tooltip, Ye as Topbar, Xe as TopbarTitle, Jt as Tree, A as WaterfallChart, oe as badgeVariants, d as buttonSizes, f as buttonVariants, x as cardVariants, e as cn, fe as formatCurrency, B as getFocusable, mn as invariant, pn as portalTarget, Ht as toggleSizes, Ut as toggleVariants, R as trapFocus, fn as useAbortSignal, U as useCommand, un as useControllableState, o as useEventCallback, on as useIsMounted, sn as useIsomorphicLayoutEffect, dn as useMediaQuery, _n as useMountEffect, cn as usePrevious, gn as useSafeEffect, vt as useSnackbar, Kt as useTheme, vn as useUnmountEffect, ln as useUpdateEffect };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/** Shared visual anatomy for high-frequency controls. Keep these as static
|
|
2
2
|
* Tailwind strings so the library stylesheet can discover every utility. */
|
|
3
3
|
export declare const fieldRootStyles = "flex w-full flex-col gap-1.5";
|
|
4
|
-
export declare const fieldLabelStyles = "text-
|
|
4
|
+
export declare const fieldLabelStyles = "text-xs font-semibold leading-5 text-foreground";
|
|
5
5
|
export declare const fieldDescriptionStyles = "text-xs leading-5 text-muted-foreground";
|
|
6
6
|
export declare const fieldErrorStyles = "text-xs leading-5 text-destructive";
|
|
7
7
|
export declare const controlBaseStyles: string;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./cn-BdjraxxU.cjs"),t=require("./component-styles-DOUctc8_.cjs"),n=require("./utils-DOFJTw8o.cjs"),r=require("./use-event-callback-Du9_9eAi.cjs");let i=require("framer-motion"),a=require("react"),o=require("react/jsx-runtime"),s=require("react-dom");function c({listId:t,listRef:r,open:a,pos:c,options:u,flat:d,activeIdx:f,setActiveIdx:p,isSelected:m,onSelect:h,colorDot:g,multiselectable:_=!1,className:v}){return typeof document>`u`?null:(0,s.createPortal)((0,o.jsx)(i.AnimatePresence,{children:a&&c&&(0,o.jsx)(i.motion.ul,{ref:r,id:t,role:`listbox`,"aria-multiselectable":_,initial:{opacity:0,y:c.placement===`bottom`?-4:4,scaleY:.97},animate:{opacity:1,y:0,scaleY:1},exit:{opacity:0,y:c.placement===`bottom`?-4:4,scaleY:.97},transition:{duration:.13},style:{originY:c.placement===`bottom`?0:1,position:`fixed`,top:c.top,left:c.left,width:c.width,maxHeight:c.maxHeight},className:e.t(`z-[110] overflow-y-auto rounded-[var(--radius-lg)] border border-border bg-surface-raised py-1 shadow-floating`,v),children:u.map((e,r)=>n.a(e)?(0,o.jsxs)(`li`,{children:[(0,o.jsx)(`p`,{className:`px-3 pt-2 pb-1 text-xs font-semibold text-slate-600 uppercase tracking-widest`,children:e.group}),(0,o.jsx)(`ul`,{children:e.options.map(e=>{let n=d.find(t=>t.value===e.value);return(0,o.jsx)(l,{opt:e,listId:t,flatIdx:n.flatIdx,isActive:n.flatIdx===f,isSelected:m(e.value),onSelect:h,onHover:p,colorDot:g},e.value)})})]},r):(0,o.jsx)(l,{opt:e,listId:t,flatIdx:d.find(t=>t.value===e.value).flatIdx,isActive:d.find(t=>t.value===e.value).flatIdx===f,isSelected:m(e.value),onSelect:h,onHover:p,colorDot:g},e.value))})}),document.body)}function l({opt:t,listId:n,flatIdx:r,isActive:i,isSelected:a,onSelect:s,onHover:c,colorDot:l}){return(0,o.jsxs)(`li`,{id:`${n}-opt-${r}`,role:`option`,"aria-selected":a,"aria-disabled":t.disabled,"data-idx":r,onMouseDown:e=>e.preventDefault(),onClick:()=>!t.disabled&&s(t),onMouseEnter:()=>!t.disabled&&c(r),className:e.t(`flex min-h-9 items-center gap-3 px-3 py-2 cursor-pointer transition-colors select-none`,i&&`bg-surface-muted`,a&&!i&&`bg-accent-50 dark:bg-accent-500/10`,t.disabled&&`opacity-40 cursor-not-allowed pointer-events-none`),children:[t.icon&&(0,o.jsx)(`span`,{className:`shrink-0 text-slate-500 dark:text-slate-400`,children:t.icon}),t.color&&t.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-2 h-2 rounded-full shrink-0`,l[t.color])}),(0,o.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,o.jsx)(`p`,{className:e.t(`text-sm leading-snug truncate`,a?`text-accent-700 dark:text-accent-300 font-medium`:`text-foreground`),children:t.label}),t.description&&(0,o.jsx)(`p`,{className:`mt-0.5 truncate text-xs text-muted-foreground`,children:t.description})]}),a&&(0,o.jsx)(`svg`,{"aria-hidden":`true`,width:`14`,height:`14`,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:`2.5`,strokeLinecap:`round`,strokeLinejoin:`round`,className:`text-accent-600 shrink-0`,children:(0,o.jsx)(`path`,{d:`m20 6-11 11-5-5`})})]})}var u=(0,a.forwardRef)(({options:i,value:s,defaultValue:l,onChange:u,placeholder:d=`Select…`,label:f,hint:p,error:m,disabled:h,required:g,clearable:_=!1,className:v,wrapperClassName:y,triggerClassName:b,listClassName:x,id:S,unstyled:C=!1},w)=>{let T=(0,a.useId)(),E=S??T,D=`${E}-list`,O=`${E}-message`,[k,A]=(0,a.useState)(!1),[j,M]=(0,a.useState)(l??``),[N,P]=(0,a.useState)(-1),F=(0,a.useRef)(null),I=(0,a.useRef)(null),L=r.t(e=>u?.(e)),R=s===void 0?j:s,z=(0,a.useMemo)(()=>n.i(i),[i]),B=(0,a.useMemo)(()=>z.find(e=>e.value===R),[z,R]),V=(0,a.useCallback)(e=>{s===void 0&&M(e.value),L(e.value),A(!1),P(-1)},[s,L]),H=(0,a.useCallback)(e=>{e.stopPropagation(),s===void 0&&M(``),L(``)},[s,L]),U=(0,a.useCallback)(e=>{if(!k){if([`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(e.key)){e.preventDefault(),A(!0);let t=z.find(e=>e.value===R&&e.flatIdx>=0)?.flatIdx??-1,n=z.filter(e=>e.flatIdx>=0);P(t>=0?t:e.key===`ArrowUp`?n[n.length-1]?.flatIdx??-1:n[0]?.flatIdx??-1)}return}if(e.key===`ArrowDown`)e.preventDefault(),P(e=>{let t=z.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.min(n+1,t.length-1)]?.flatIdx??e});else if(e.key===`ArrowUp`)e.preventDefault(),P(e=>{let t=z.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.max(n-1,0)]?.flatIdx??e});else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=z.find(e=>e.flatIdx===N);t&&V(t)}else(e.key===`Escape`||e.key===`Tab`)&&(A(!1),P(-1))},[k,z,R,N,V]);(0,a.useEffect)(()=>{N<0||!I.current||I.current.querySelector(`[data-idx="${N}"]`)?.scrollIntoView({block:`nearest`})},[N]),(0,a.useEffect)(()=>{function e(e){let t=e.target;F.current?.contains(t)||I.current?.contains(t)||A(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let W=n.o(k,F);return C?(0,o.jsxs)(`div`,{ref:F,className:e.t(v,y),children:[(0,o.jsx)(`button`,{ref:w,id:E,type:`button`,role:`combobox`,"aria-expanded":k,onClick:()=>A(e=>!e),className:b,children:B?.label??d}),k&&(0,o.jsx)(`ul`,{ref:I,id:D,className:x,children:z.map(e=>(0,o.jsx)(`li`,{"data-idx":e.flatIdx,onClick:()=>V(e),children:e.label},e.value))})]}):(0,o.jsxs)(`div`,{ref:F,className:e.t(`relative`,t.o,y,v),children:[f&&(0,o.jsxs)(`label`,{htmlFor:E,className:`text-xs font-semibold leading-5 text-foreground`,children:[f,g&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1 text-destructive`,children:`*`}),(0,o.jsx)(`span`,{className:`sr-only`,children:` (required)`})]})]}),(0,o.jsxs)(`button`,{ref:w,id:E,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":k,"aria-controls":D,"aria-activedescendant":k&&N>=0?`${D}-opt-${N}`:void 0,"aria-invalid":m?!0:void 0,"aria-required":g||void 0,"aria-describedby":m||p?O:void 0,disabled:h,onKeyDown:U,onClick:()=>{h||(A(e=>!e),k||P(z.find(e=>e.value===R&&e.flatIdx>=0)?.flatIdx??-1))},className:e.t(`flex h-9 w-full items-center gap-2 rounded-[var(--radius-md)] px-3 text-left outline-none`,t.t,`focus:border-accent-500 focus:ring-2 focus:ring-focus-ring/20`,m&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20`,h&&`opacity-50 cursor-not-allowed`,b),children:[B?.icon&&(0,o.jsx)(`span`,{className:`shrink-0 text-slate-500 dark:text-slate-400`,children:B.icon}),B?.color&&B.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-2 h-2 rounded-full shrink-0`,n.r[B.color])}),(0,o.jsx)(`span`,{className:e.t(`flex-1 min-w-0 text-sm truncate`,B?`text-foreground`:`text-muted-foreground`),children:B?.label??d}),_&&R&&!h&&(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onClick:H,className:`shrink-0 text-slate-400 hover:text-slate-600 dark:hover:text-slate-300 transition-colors`,children:(0,o.jsx)(n.n,{})}),(0,o.jsx)(n.t,{open:k})]}),(0,o.jsx)(c,{listId:D,listRef:I,open:k,pos:W,options:i,flat:z,activeIdx:N,setActiveIdx:P,isSelected:e=>e===R,onSelect:V,colorDot:n.r,className:x}),m&&(0,o.jsx)(`p`,{id:O,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:m}),p&&!m&&(0,o.jsx)(`p`,{id:O,className:`text-xs leading-5 text-muted-foreground`,children:p})]})});u.displayName=`SelectSingle`;var d=(0,a.forwardRef)(({options:r,value:i,defaultValue:s,onChange:l,placeholder:u=`Select…`,label:d,hint:f,error:p,disabled:m,required:h,clearable:g=!1,className:_,wrapperClassName:v,triggerClassName:y,listClassName:b,id:x,unstyled:S=!1},C)=>{let w=(0,a.useId)(),T=x??w,E=`${T}-list`,D=`${T}-message`,[O,k]=(0,a.useState)(!1),[A,j]=(0,a.useState)(s??[]),[M,N]=(0,a.useState)(-1),P=(0,a.useRef)(null),F=(0,a.useRef)(null),I=i===void 0?A:i,L=n.i(r),R=L.filter(e=>I.includes(e.value));function z(e){let t=I.includes(e.value)?I.filter(t=>t!==e.value):[...I,e.value];i===void 0&&j(t),l?.(t)}function B(e,t){t.stopPropagation();let n=I.filter(t=>t!==e);i===void 0&&j(n),l?.(n)}function V(e){e.stopPropagation(),i===void 0&&j([]),l?.([])}function H(e){if(!O){[`Enter`,` `,`ArrowDown`,`ArrowUp`].includes(e.key)&&(e.preventDefault(),k(!0));return}if(e.key===`ArrowDown`)e.preventDefault(),N(e=>{let t=L.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.min(n+1,t.length-1)]?.flatIdx??e});else if(e.key===`ArrowUp`)e.preventDefault(),N(e=>{let t=L.filter(e=>e.flatIdx>=0),n=t.findIndex(t=>t.flatIdx===e);return t[Math.max(n-1,0)]?.flatIdx??e});else if(e.key===`Enter`||e.key===` `){e.preventDefault();let t=L.find(e=>e.flatIdx===M);t&&z(t)}else(e.key===`Escape`||e.key===`Tab`)&&(k(!1),N(-1))}(0,a.useEffect)(()=>{M<0||!F.current||F.current.querySelector(`[data-idx="${M}"]`)?.scrollIntoView({block:`nearest`})},[M]),(0,a.useEffect)(()=>{function e(e){let t=e.target;P.current?.contains(t)||F.current?.contains(t)||k(!1)}return document.addEventListener(`mousedown`,e),()=>document.removeEventListener(`mousedown`,e)},[]);let U=n.o(O,P);return S?(0,o.jsxs)(`div`,{ref:P,className:e.t(_,v),children:[(0,o.jsx)(`button`,{ref:C,id:T,type:`button`,role:`combobox`,"aria-expanded":O,"aria-controls":E,onKeyDown:H,onClick:()=>k(e=>!e),className:y,children:R.length>0?R.map(e=>e.label).join(`, `):u}),(0,o.jsx)(c,{listId:E,listRef:F,open:O,pos:U,options:r,flat:L,activeIdx:M,setActiveIdx:N,isSelected:e=>I.includes(e),onSelect:z,multiselectable:!0,colorDot:n.r,className:b})]}):(0,o.jsxs)(`div`,{ref:P,className:e.t(`relative`,t.o,v,_),children:[d&&(0,o.jsxs)(`label`,{htmlFor:T,className:`text-xs font-semibold leading-5 text-foreground`,children:[d,h&&(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(`span`,{"aria-hidden":`true`,className:`ml-1 text-destructive`,children:`*`}),(0,o.jsx)(`span`,{className:`sr-only`,children:` (required)`})]})]}),(0,o.jsxs)(`button`,{ref:C,id:T,type:`button`,role:`combobox`,"aria-haspopup":`listbox`,"aria-expanded":O,"aria-controls":E,"aria-activedescendant":O&&M>=0?`${E}-opt-${M}`:void 0,"aria-invalid":p?!0:void 0,"aria-required":h||void 0,"aria-describedby":p||f?D:void 0,disabled:m,onKeyDown:H,onClick:()=>{m||k(e=>!e)},className:e.t(`flex min-h-9 w-full flex-wrap items-center gap-1.5 rounded-[var(--radius-md)] px-2.5 py-1.5 text-left outline-none`,t.t,`focus:border-accent-500 focus:ring-2 focus:ring-focus-ring/20`,p&&`border-destructive/60 hover:border-destructive/70 focus-within:border-destructive focus-within:ring-destructive/20`,m&&`opacity-50 cursor-not-allowed`,y),children:[R.length===0?(0,o.jsx)(`span`,{className:`flex-1 text-sm text-slate-500 truncate`,children:u}):R.map(t=>(0,o.jsxs)(`span`,{className:`inline-flex max-w-[160px] items-center gap-1 rounded-md border border-border bg-surface-muted px-2 py-0.5 text-xs font-medium text-foreground`,children:[t.color&&t.color!=="default"&&(0,o.jsx)(`span`,{className:e.t(`w-1.5 h-1.5 rounded-full shrink-0`,n.r[t.color])}),(0,o.jsx)(`span`,{className:`truncate`,children:t.label}),(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onMouseDown:e=>e.stopPropagation(),onClick:e=>B(t.value,e),className:`shrink-0 text-slate-500 dark:text-slate-400 hover:text-gray-900 dark:hover:text-white transition-colors cursor-pointer ml-0.5`,"aria-label":`Remove ${t.label}`,children:(0,o.jsx)(n.n,{})})]},t.value)),(0,o.jsxs)(`span`,{className:`ml-auto flex items-center gap-1.5 shrink-0 pl-1`,children:[g&&I.length>0&&!m&&(0,o.jsx)(`span`,{role:`button`,tabIndex:-1,onClick:V,className:`text-slate-500 hover:text-slate-600 dark:hover:text-slate-300 transition-colors`,"aria-label":`Clear all`,children:(0,o.jsx)(n.n,{})}),I.length>0&&(0,o.jsx)(`span`,{className:`text-[10px] font-medium text-slate-500 tabular-nums`,children:I.length}),(0,o.jsx)(n.t,{open:O})]})]}),(0,o.jsx)(c,{listId:E,listRef:F,open:O,pos:U,options:r,flat:L,activeIdx:M,setActiveIdx:N,isSelected:e=>I.includes(e),onSelect:z,multiselectable:!0,colorDot:n.r,className:b}),p&&(0,o.jsx)(`p`,{id:D,"aria-live":`polite`,className:`text-xs leading-5 text-destructive`,children:p}),f&&!p&&(0,o.jsx)(`p`,{id:D,className:`text-xs leading-5 text-muted-foreground`,children:f})]})});d.displayName=`SelectMulti`;var f=(0,a.forwardRef)((e,t)=>e.multiple?(0,o.jsx)(d,{...e,ref:t}):(0,o.jsx)(u,{...e,ref:t}));f.displayName=`Select`,Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return f}});
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { t as e } from "./cn-DpgY2leY.js";
|
|
2
|
-
import { o as t, t as n } from "./component-styles-
|
|
2
|
+
import { o as t, t as n } from "./component-styles-Bgy44fc8.js";
|
|
3
3
|
import { a as r, i, n as a, o, r as s, t as c } from "./utils-CQ8pvCtk.js";
|
|
4
4
|
import { t as l } from "./use-event-callback-DGkfO_uu.js";
|
|
5
5
|
import { AnimatePresence as u, motion as d } from "framer-motion";
|
|
@@ -187,7 +187,7 @@ var T = f(({ options: r, value: u, defaultValue: d, onChange: f, placeholder: S
|
|
|
187
187
|
children: [
|
|
188
188
|
w && /* @__PURE__ */ x("label", {
|
|
189
189
|
htmlFor: R,
|
|
190
|
-
className: "text-
|
|
190
|
+
className: "text-xs font-semibold leading-5 text-foreground",
|
|
191
191
|
children: [w, O && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
192
192
|
"aria-hidden": "true",
|
|
193
193
|
className: "ml-1 text-destructive",
|
|
@@ -349,7 +349,7 @@ var E = f(({ options: r, value: l, defaultValue: u, onChange: d, placeholder: f
|
|
|
349
349
|
children: [
|
|
350
350
|
p && /* @__PURE__ */ x("label", {
|
|
351
351
|
htmlFor: F,
|
|
352
|
-
className: "text-
|
|
352
|
+
className: "text-xs font-semibold leading-5 text-foreground",
|
|
353
353
|
children: [p, T && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
|
|
354
354
|
"aria-hidden": "true",
|
|
355
355
|
className: "ml-1 text-destructive",
|