@devalok/shilp-sutra 0.17.2 → 0.18.0
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/dist/_chunks/avatar.js +21 -19
- package/dist/_chunks/button-group.js +27 -0
- package/dist/_chunks/button.js +53 -35
- package/dist/_chunks/card.js +50 -0
- package/dist/_chunks/checkbox.js +11 -9
- package/dist/_chunks/date-utils.js +13 -0
- package/dist/_chunks/form.js +20 -20
- package/dist/_chunks/link-context.js +19 -0
- package/dist/_chunks/motion.js +1376 -0
- package/dist/_chunks/motion2.js +35 -0
- package/dist/_chunks/primitives.js +3499 -3920
- package/dist/_chunks/sidebar.js +225 -211
- package/dist/_chunks/spinner.js +58 -28
- package/dist/_chunks/tiptap.js +1 -1
- package/dist/_chunks/tooltip.js +27 -10
- package/dist/_chunks/tree-view.js +180 -178
- package/dist/_chunks/use-calendar.js +531 -515
- package/dist/_chunks/utils.js +3 -3
- package/dist/_chunks/vendor-client.js +1792 -1049
- package/dist/_chunks/vendor-utils.js +5123 -1169
- package/dist/composed/activity-feed.d.ts.map +1 -1
- package/dist/composed/activity-feed.js +71 -74
- package/dist/composed/avatar-group.js +36 -36
- package/dist/composed/command-palette.d.ts +1 -1
- package/dist/composed/command-palette.d.ts.map +1 -1
- package/dist/composed/command-palette.js +207 -158
- package/dist/composed/confirm-dialog.d.ts +3 -5
- package/dist/composed/confirm-dialog.d.ts.map +1 -1
- package/dist/composed/confirm-dialog.js +46 -41
- package/dist/composed/content-card.d.ts +1 -1
- package/dist/composed/content-card.js +29 -29
- package/dist/composed/date-picker/calendar-grid.d.ts +1 -1
- package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
- package/dist/composed/date-picker/date-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts +1 -1
- package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/month-picker.d.ts +1 -1
- package/dist/composed/date-picker/month-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/presets.d.ts +1 -1
- package/dist/composed/date-picker/presets.d.ts.map +1 -1
- package/dist/composed/date-picker/time-picker.d.ts +1 -1
- package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
- package/dist/composed/date-picker/year-picker.d.ts +1 -1
- package/dist/composed/date-picker/year-picker.d.ts.map +1 -1
- package/dist/composed/empty-state.d.ts +1 -0
- package/dist/composed/empty-state.d.ts.map +1 -1
- package/dist/composed/empty-state.js +51 -47
- package/dist/composed/error-boundary.d.ts +1 -1
- package/dist/composed/error-boundary.d.ts.map +1 -1
- package/dist/composed/error-boundary.js +48 -48
- package/dist/composed/extensions/mention-suggestion.d.ts +1 -1
- package/dist/composed/extensions/mention-suggestion.d.ts.map +1 -1
- package/dist/composed/global-loading.d.ts +1 -1
- package/dist/composed/global-loading.d.ts.map +1 -1
- package/dist/composed/global-loading.js +23 -20
- package/dist/composed/index.d.ts +2 -4
- package/dist/composed/index.d.ts.map +1 -1
- package/dist/composed/index.js +26 -29
- package/dist/composed/loading-skeleton.d.ts +1 -1
- package/dist/composed/loading-skeleton.d.ts.map +1 -1
- package/dist/composed/loading-skeleton.js +92 -87
- package/dist/composed/member-picker.d.ts +1 -1
- package/dist/composed/member-picker.d.ts.map +1 -1
- package/dist/composed/member-picker.js +47 -43
- package/dist/composed/page-header.js +36 -36
- package/dist/composed/page-skeletons.d.ts +9 -3
- package/dist/composed/page-skeletons.d.ts.map +1 -1
- package/dist/composed/page-skeletons.js +58 -58
- package/dist/composed/priority-indicator.js +19 -19
- package/dist/composed/rich-text-editor.d.ts +3 -3
- package/dist/composed/rich-text-editor.d.ts.map +1 -1
- package/dist/composed/rich-text-editor.js +316 -309
- package/dist/composed/schedule-view.js +88 -88
- package/dist/composed/simple-tooltip.d.ts +2 -5
- package/dist/composed/simple-tooltip.d.ts.map +1 -1
- package/dist/composed/simple-tooltip.js +19 -14
- package/dist/composed/status-badge.d.ts +2 -1
- package/dist/composed/status-badge.d.ts.map +1 -1
- package/dist/composed/status-badge.js +76 -63
- package/dist/hooks/index.d.ts +2 -1
- package/dist/hooks/index.d.ts.map +1 -1
- package/dist/hooks/index.js +3 -4
- package/dist/hooks/use-toast.d.ts +15 -45
- package/dist/hooks/use-toast.d.ts.map +1 -1
- package/dist/hooks/use-toast.js +2 -95
- package/dist/motion/index.d.ts +4 -0
- package/dist/motion/index.d.ts.map +1 -0
- package/dist/motion/index.js +10 -0
- package/dist/motion/motion-provider.d.ts +18 -0
- package/dist/motion/motion-provider.d.ts.map +1 -0
- package/dist/motion/motion-provider.js +24 -0
- package/dist/motion/primitives-index.d.ts +3 -0
- package/dist/motion/primitives-index.d.ts.map +1 -0
- package/dist/motion/primitives-index.js +11 -0
- package/dist/motion/primitives.d.ts +38 -0
- package/dist/motion/primitives.d.ts.map +1 -0
- package/dist/motion/primitives.js +187 -0
- package/dist/shell/app-command-palette.d.ts +14 -5
- package/dist/shell/app-command-palette.d.ts.map +1 -1
- package/dist/shell/app-command-palette.js +152 -130
- package/dist/shell/bottom-navbar.d.ts.map +1 -1
- package/dist/shell/bottom-navbar.js +90 -92
- package/dist/shell/command-registry.d.ts +23 -0
- package/dist/shell/command-registry.d.ts.map +1 -0
- package/dist/shell/command-registry.js +18 -0
- package/dist/shell/index.d.ts +2 -1
- package/dist/shell/index.d.ts.map +1 -1
- package/dist/shell/index.js +14 -11
- package/dist/shell/link-context.d.ts +6 -10
- package/dist/shell/link-context.d.ts.map +1 -1
- package/dist/shell/link-context.js +3 -16
- package/dist/shell/notification-center.d.ts.map +1 -1
- package/dist/shell/notification-center.js +137 -132
- package/dist/shell/notification-preferences.d.ts +10 -5
- package/dist/shell/notification-preferences.d.ts.map +1 -1
- package/dist/shell/notification-preferences.js +168 -165
- package/dist/shell/sidebar.js +119 -119
- package/dist/shell/top-bar.js +65 -65
- package/dist/tailwind/index.cjs +118 -297
- package/dist/tailwind/preset.d.ts.map +1 -1
- package/dist/tailwind/preset.js +118 -297
- package/dist/tokens/generate-scale.d.ts +86 -0
- package/dist/tokens/generate-scale.d.ts.map +1 -0
- package/dist/tokens/primitives.css +415 -187
- package/dist/tokens/semantic.css +244 -270
- package/dist/tokens/typography.css +6 -6
- package/dist/ui/accordion.d.ts.map +1 -1
- package/dist/ui/accordion.js +32 -22
- package/dist/ui/alert-dialog.d.ts +4 -1
- package/dist/ui/alert-dialog.d.ts.map +1 -1
- package/dist/ui/alert-dialog.js +114 -73
- package/dist/ui/alert.d.ts +6 -1
- package/dist/ui/alert.d.ts.map +1 -1
- package/dist/ui/alert.js +64 -49
- package/dist/ui/aspect-ratio.d.ts +2 -1
- package/dist/ui/aspect-ratio.d.ts.map +1 -1
- package/dist/ui/aspect-ratio.js +14 -4
- package/dist/ui/autocomplete.d.ts +11 -2
- package/dist/ui/autocomplete.d.ts.map +1 -1
- package/dist/ui/autocomplete.js +82 -57
- package/dist/ui/avatar.d.ts.map +1 -1
- package/dist/ui/avatar.js +45 -34
- package/dist/ui/badge.d.ts +1 -1
- package/dist/ui/badge.d.ts.map +1 -1
- package/dist/ui/badge.js +70 -65
- package/dist/ui/banner.d.ts.map +1 -1
- package/dist/ui/banner.js +53 -39
- package/dist/ui/breadcrumb.d.ts +2 -0
- package/dist/ui/breadcrumb.d.ts.map +1 -1
- package/dist/ui/breadcrumb.js +21 -21
- package/dist/ui/button.d.ts +10 -1
- package/dist/ui/button.d.ts.map +1 -1
- package/dist/ui/button.js +103 -67
- package/dist/ui/card.d.ts +2 -2
- package/dist/ui/card.d.ts.map +1 -1
- package/dist/ui/card.js +61 -53
- package/dist/ui/charts/_internal/animation.d.ts +1 -1
- package/dist/ui/charts/_internal/animation.d.ts.map +1 -1
- package/dist/ui/charts/area-chart.d.ts +3 -5
- package/dist/ui/charts/area-chart.d.ts.map +1 -1
- package/dist/ui/charts/bar-chart.d.ts +3 -5
- package/dist/ui/charts/bar-chart.d.ts.map +1 -1
- package/dist/ui/charts/chart-container.d.ts +2 -5
- package/dist/ui/charts/chart-container.d.ts.map +1 -1
- package/dist/ui/charts/gauge-chart.d.ts +3 -5
- package/dist/ui/charts/gauge-chart.d.ts.map +1 -1
- package/dist/ui/charts/index.js +1204 -1095
- package/dist/ui/charts/line-chart.d.ts +3 -5
- package/dist/ui/charts/line-chart.d.ts.map +1 -1
- package/dist/ui/charts/pie-chart.d.ts +2 -5
- package/dist/ui/charts/pie-chart.d.ts.map +1 -1
- package/dist/ui/charts/radar-chart.d.ts +3 -5
- package/dist/ui/charts/radar-chart.d.ts.map +1 -1
- package/dist/ui/charts/sparkline.d.ts +5 -5
- package/dist/ui/charts/sparkline.d.ts.map +1 -1
- package/dist/ui/checkbox.d.ts.map +1 -1
- package/dist/ui/checkbox.js +31 -19
- package/dist/ui/chip.d.ts +3 -2
- package/dist/ui/chip.d.ts.map +1 -1
- package/dist/ui/chip.js +62 -54
- package/dist/ui/code.js +16 -16
- package/dist/ui/collapsible.d.ts.map +1 -1
- package/dist/ui/collapsible.js +23 -15
- package/dist/ui/color-input.d.ts +1 -1
- package/dist/ui/color-input.d.ts.map +1 -1
- package/dist/ui/color-input.js +27 -27
- package/dist/ui/combobox.d.ts +2 -0
- package/dist/ui/combobox.d.ts.map +1 -1
- package/dist/ui/combobox.js +177 -166
- package/dist/ui/context-menu.d.ts +4 -2
- package/dist/ui/context-menu.d.ts.map +1 -1
- package/dist/ui/context-menu.js +146 -86
- package/dist/ui/data-table-toolbar.d.ts +3 -2
- package/dist/ui/data-table-toolbar.d.ts.map +1 -1
- package/dist/ui/data-table-toolbar.js +61 -59
- package/dist/ui/data-table.d.ts.map +1 -1
- package/dist/ui/data-table.js +289 -254
- package/dist/ui/dialog.d.ts +3 -1
- package/dist/ui/dialog.d.ts.map +1 -1
- package/dist/ui/dialog.js +114 -74
- package/dist/ui/dropdown-menu.d.ts +5 -3
- package/dist/ui/dropdown-menu.d.ts.map +1 -1
- package/dist/ui/dropdown-menu.js +150 -89
- package/dist/ui/file-upload.d.ts.map +1 -1
- package/dist/ui/file-upload.js +169 -127
- package/dist/ui/form.d.ts.map +1 -1
- package/dist/ui/form.js +29 -26
- package/dist/ui/hover-card.d.ts +1 -1
- package/dist/ui/hover-card.d.ts.map +1 -1
- package/dist/ui/hover-card.js +53 -21
- package/dist/ui/index.d.ts +18 -18
- package/dist/ui/index.d.ts.map +1 -1
- package/dist/ui/index.js +432 -449
- package/dist/ui/input-otp.d.ts +2 -0
- package/dist/ui/input-otp.d.ts.map +1 -1
- package/dist/ui/input-otp.js +7 -7
- package/dist/ui/input.d.ts.map +1 -1
- package/dist/ui/input.js +36 -34
- package/dist/ui/label.js +12 -12
- package/dist/ui/lib/date-utils.d.ts +6 -0
- package/dist/ui/lib/date-utils.d.ts.map +1 -0
- package/dist/ui/lib/index.d.ts +7 -0
- package/dist/ui/lib/index.d.ts.map +1 -0
- package/dist/ui/lib/link-context.d.ts +13 -0
- package/dist/ui/lib/link-context.d.ts.map +1 -0
- package/dist/ui/lib/motion.d.ts +44 -9
- package/dist/ui/lib/motion.d.ts.map +1 -1
- package/dist/ui/lib/use-ripple.d.ts.map +1 -1
- package/dist/ui/lib/utils.js +1 -1
- package/dist/ui/link.js +11 -11
- package/dist/ui/menubar.d.ts +4 -2
- package/dist/ui/menubar.d.ts.map +1 -1
- package/dist/ui/menubar.js +141 -97
- package/dist/ui/navigation-menu.d.ts +2 -0
- package/dist/ui/navigation-menu.d.ts.map +1 -1
- package/dist/ui/navigation-menu.js +176 -73
- package/dist/ui/number-input.d.ts.map +1 -1
- package/dist/ui/number-input.js +56 -49
- package/dist/ui/pagination.js +22 -22
- package/dist/ui/popover.d.ts +2 -1
- package/dist/ui/popover.d.ts.map +1 -1
- package/dist/ui/popover.js +54 -22
- package/dist/ui/progress.d.ts.map +1 -1
- package/dist/ui/progress.js +58 -42
- package/dist/ui/radio.js +19 -19
- package/dist/ui/search-input.d.ts.map +1 -1
- package/dist/ui/search-input.js +28 -33
- package/dist/ui/segmented-control.d.ts +2 -2
- package/dist/ui/segmented-control.d.ts.map +1 -1
- package/dist/ui/segmented-control.js +143 -124
- package/dist/ui/select.d.ts.map +1 -1
- package/dist/ui/select.js +72 -61
- package/dist/ui/separator.js +11 -11
- package/dist/ui/sheet.d.ts +1 -1
- package/dist/ui/sheet.d.ts.map +1 -1
- package/dist/ui/sheet.js +111 -75
- package/dist/ui/sidebar.d.ts +6 -1
- package/dist/ui/sidebar.d.ts.map +1 -1
- package/dist/ui/sidebar.js +27 -25
- package/dist/ui/skeleton.js +1 -1
- package/dist/ui/slider.d.ts +9 -0
- package/dist/ui/slider.d.ts.map +1 -1
- package/dist/ui/slider.js +33 -27
- package/dist/ui/spinner.d.ts +32 -25
- package/dist/ui/spinner.d.ts.map +1 -1
- package/dist/ui/spinner.js +199 -40
- package/dist/ui/stat-card.d.ts.map +1 -1
- package/dist/ui/stat-card.js +183 -116
- package/dist/ui/stepper.d.ts +22 -1
- package/dist/ui/stepper.d.ts.map +1 -1
- package/dist/ui/stepper.js +121 -43
- package/dist/ui/switch.d.ts.map +1 -1
- package/dist/ui/switch.js +39 -26
- package/dist/ui/table.d.ts +3 -0
- package/dist/ui/table.d.ts.map +1 -1
- package/dist/ui/table.js +47 -47
- package/dist/ui/tabs.d.ts +4 -1
- package/dist/ui/tabs.d.ts.map +1 -1
- package/dist/ui/tabs.js +94 -44
- package/dist/ui/text.d.ts +3 -3
- package/dist/ui/text.js +1 -1
- package/dist/ui/textarea.d.ts.map +1 -1
- package/dist/ui/textarea.js +29 -27
- package/dist/ui/toast-types.d.ts +43 -0
- package/dist/ui/toast-types.d.ts.map +1 -0
- package/dist/ui/toast-types.js +2 -0
- package/dist/ui/toast.d.ts +60 -26
- package/dist/ui/toast.d.ts.map +1 -1
- package/dist/ui/toast.js +535 -89
- package/dist/ui/toaster.d.ts +19 -23
- package/dist/ui/toaster.d.ts.map +1 -1
- package/dist/ui/toaster.js +31 -21
- package/dist/ui/toggle-group.d.ts +2 -2
- package/dist/ui/toggle-group.d.ts.map +1 -1
- package/dist/ui/toggle-group.js +29 -26
- package/dist/ui/toggle.d.ts +2 -2
- package/dist/ui/toggle.d.ts.map +1 -1
- package/dist/ui/toggle.js +21 -17
- package/dist/ui/tooltip.d.ts +2 -1
- package/dist/ui/tooltip.d.ts.map +1 -1
- package/dist/ui/tooltip.js +58 -21
- package/dist/ui/tree-view/tree-view.d.ts +1 -1
- package/dist/ui/tree-view/tree-view.d.ts.map +1 -1
- package/llms-full.txt +221 -102
- package/llms.txt +65 -12
- package/package.json +26 -8
- package/dist/_chunks/switch.js +0 -10
- package/dist/composed/upload-progress.d.ts +0 -33
- package/dist/composed/upload-progress.d.ts.map +0 -1
- package/dist/composed/upload-progress.js +0 -386
- package/dist/ui/lib/use-reduced-motion.d.ts +0 -4
- package/dist/ui/lib/use-reduced-motion.d.ts.map +0 -1
- package/dist/ui/transitions.d.ts +0 -17
- package/dist/ui/transitions.d.ts.map +0 -1
- package/dist/ui/transitions.js +0 -111
package/dist/ui/switch.js
CHANGED
|
@@ -1,29 +1,42 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import * as
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
c
|
|
2
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { bc as i, bd as u } from "../_chunks/primitives.js";
|
|
5
|
+
import { s as g } from "../_chunks/motion2.js";
|
|
6
|
+
import { c as h } from "../_chunks/utils.js";
|
|
7
|
+
import { m as w } from "../_chunks/motion.js";
|
|
8
|
+
const v = t.forwardRef(({ className: n, error: d, checked: r, defaultChecked: e, onCheckedChange: s, ...c }, l) => {
|
|
9
|
+
const [m, b] = t.useState(e ?? !1), f = r !== void 0 ? r : m, p = t.useCallback(
|
|
10
|
+
(a) => {
|
|
11
|
+
r === void 0 && b(a), s == null || s(a);
|
|
12
|
+
},
|
|
13
|
+
[r, s]
|
|
14
|
+
);
|
|
15
|
+
return /* @__PURE__ */ o(
|
|
16
|
+
i,
|
|
17
|
+
{
|
|
18
|
+
className: h(
|
|
19
|
+
"peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-ds-full border-2 border-surface-border-strong shadow-01 transition-colors duration-fast-01 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-action-disabled data-[state=checked]:border-transparent data-[state=checked]:bg-accent-9 data-[state=unchecked]:bg-surface-border-strong",
|
|
20
|
+
d && "border-error-7 data-[state=checked]:bg-error-9",
|
|
21
|
+
n
|
|
22
|
+
),
|
|
23
|
+
checked: r,
|
|
24
|
+
defaultChecked: e,
|
|
25
|
+
onCheckedChange: p,
|
|
26
|
+
...c,
|
|
27
|
+
ref: l,
|
|
28
|
+
children: /* @__PURE__ */ o(u, { asChild: !0, children: /* @__PURE__ */ o(
|
|
29
|
+
w.span,
|
|
30
|
+
{
|
|
31
|
+
className: "pointer-events-none block h-ico-md w-ico-md rounded-ds-full bg-accent-fg shadow-02 ring-0",
|
|
32
|
+
animate: { x: f ? 20 : 0 },
|
|
33
|
+
transition: g.snappy
|
|
34
|
+
}
|
|
35
|
+
) })
|
|
36
|
+
}
|
|
37
|
+
);
|
|
38
|
+
});
|
|
39
|
+
v.displayName = i.displayName;
|
|
27
40
|
export {
|
|
28
|
-
|
|
41
|
+
v as Switch
|
|
29
42
|
};
|
package/dist/ui/table.d.ts
CHANGED
|
@@ -7,5 +7,8 @@ declare const TableRow: React.ForwardRefExoticComponent<React.HTMLAttributes<HTM
|
|
|
7
7
|
declare const TableHead: React.ForwardRefExoticComponent<React.ThHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
8
8
|
declare const TableCell: React.ForwardRefExoticComponent<React.TdHTMLAttributes<HTMLTableCellElement> & React.RefAttributes<HTMLTableCellElement>>;
|
|
9
9
|
declare const TableCaption: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLTableCaptionElement> & React.RefAttributes<HTMLTableCaptionElement>>;
|
|
10
|
+
export type TableProps = React.HTMLAttributes<HTMLTableElement>;
|
|
11
|
+
export type TableRowProps = React.HTMLAttributes<HTMLTableRowElement>;
|
|
12
|
+
export type TableCellProps = React.TdHTMLAttributes<HTMLTableCellElement>;
|
|
10
13
|
export { Table, TableHeader, TableBody, TableFooter, TableHead, TableRow, TableCell, TableCaption, };
|
|
11
14
|
//# sourceMappingURL=table.d.ts.map
|
package/dist/ui/table.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,iHAWT,CAAA;AAGF,QAAA,MAAM,WAAW,+HAKf,CAAA;AAGF,QAAA,MAAM,SAAS,+HASb,CAAA;AAGF,QAAA,MAAM,WAAW,+HAYf,CAAA;AAGF,QAAA,MAAM,QAAQ,uHAYZ,CAAA;AAGF,QAAA,MAAM,SAAS,2HAab,CAAA;AAGF,QAAA,MAAM,SAAS,2HAYb,CAAA;AAGF,QAAA,MAAM,YAAY,+HAShB,CAAA;AAGF,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
|
1
|
+
{"version":3,"file":"table.d.ts","sourceRoot":"","sources":["../../src/ui/table.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,iHAWT,CAAA;AAGF,QAAA,MAAM,WAAW,+HAKf,CAAA;AAGF,QAAA,MAAM,SAAS,+HASb,CAAA;AAGF,QAAA,MAAM,WAAW,+HAYf,CAAA;AAGF,QAAA,MAAM,QAAQ,uHAYZ,CAAA;AAGF,QAAA,MAAM,SAAS,2HAab,CAAA;AAGF,QAAA,MAAM,SAAS,2HAYb,CAAA;AAGF,QAAA,MAAM,YAAY,+HAShB,CAAA;AAGF,MAAM,MAAM,UAAU,GAAG,KAAK,CAAC,cAAc,CAAC,gBAAgB,CAAC,CAAA;AAC/D,MAAM,MAAM,aAAa,GAAG,KAAK,CAAC,cAAc,CAAC,mBAAmB,CAAC,CAAA;AACrE,MAAM,MAAM,cAAc,GAAG,KAAK,CAAC,gBAAgB,CAAC,oBAAoB,CAAC,CAAA;AAEzE,OAAO,EACL,KAAK,EACL,WAAW,EACX,SAAS,EACT,WAAW,EACX,SAAS,EACT,QAAQ,EACR,SAAS,EACT,YAAY,GACb,CAAA"}
|
package/dist/ui/table.js
CHANGED
|
@@ -1,91 +1,91 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { c as
|
|
4
|
-
const r =
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import { c as l } from "../_chunks/utils.js";
|
|
4
|
+
const r = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ t(
|
|
5
5
|
"table",
|
|
6
6
|
{
|
|
7
|
-
ref:
|
|
8
|
-
className:
|
|
9
|
-
...
|
|
7
|
+
ref: o,
|
|
8
|
+
className: l("w-full caption-bottom text-ds-md", a),
|
|
9
|
+
...e
|
|
10
10
|
}
|
|
11
11
|
) }));
|
|
12
12
|
r.displayName = "Table";
|
|
13
|
-
const d =
|
|
13
|
+
const d = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t("thead", { ref: o, className: l("", a), ...e }));
|
|
14
14
|
d.displayName = "TableHeader";
|
|
15
|
-
const c =
|
|
15
|
+
const c = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
16
16
|
"tbody",
|
|
17
17
|
{
|
|
18
|
-
ref:
|
|
19
|
-
className:
|
|
20
|
-
...
|
|
18
|
+
ref: o,
|
|
19
|
+
className: l("[&_tr:last-child]:border-0", a),
|
|
20
|
+
...e
|
|
21
21
|
}
|
|
22
22
|
));
|
|
23
23
|
c.displayName = "TableBody";
|
|
24
|
-
const m =
|
|
24
|
+
const m = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
25
25
|
"tfoot",
|
|
26
26
|
{
|
|
27
|
-
ref:
|
|
28
|
-
className:
|
|
29
|
-
"bg-[color-mix(in_srgb,var(--color-
|
|
30
|
-
|
|
27
|
+
ref: o,
|
|
28
|
+
className: l(
|
|
29
|
+
"bg-[color-mix(in_srgb,var(--color-surface-2)_50%,transparent)] font-medium [&>tr]:last:border-b-0",
|
|
30
|
+
a
|
|
31
31
|
),
|
|
32
|
-
...
|
|
32
|
+
...e
|
|
33
33
|
}
|
|
34
34
|
));
|
|
35
35
|
m.displayName = "TableFooter";
|
|
36
|
-
const
|
|
36
|
+
const f = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
37
37
|
"tr",
|
|
38
38
|
{
|
|
39
|
-
ref:
|
|
40
|
-
className:
|
|
41
|
-
"transition-colors hover:bg-
|
|
42
|
-
|
|
39
|
+
ref: o,
|
|
40
|
+
className: l(
|
|
41
|
+
"transition-colors hover:bg-surface-2 data-[state=selected]:bg-accent-3",
|
|
42
|
+
a
|
|
43
43
|
),
|
|
44
|
-
...
|
|
44
|
+
...e
|
|
45
45
|
}
|
|
46
46
|
));
|
|
47
|
-
|
|
48
|
-
const
|
|
47
|
+
f.displayName = "TableRow";
|
|
48
|
+
const b = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
49
49
|
"th",
|
|
50
50
|
{
|
|
51
|
-
ref:
|
|
51
|
+
ref: o,
|
|
52
52
|
scope: "col",
|
|
53
|
-
className:
|
|
54
|
-
"h-ds-md px-ds-03 text-left font-medium text-
|
|
55
|
-
|
|
53
|
+
className: l(
|
|
54
|
+
"h-ds-md px-ds-03 text-left font-medium text-surface-fg-muted [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
55
|
+
a
|
|
56
56
|
),
|
|
57
|
-
...
|
|
57
|
+
...e
|
|
58
58
|
}
|
|
59
59
|
));
|
|
60
|
-
|
|
61
|
-
const
|
|
60
|
+
b.displayName = "TableHead";
|
|
61
|
+
const i = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
62
62
|
"td",
|
|
63
63
|
{
|
|
64
|
-
ref:
|
|
65
|
-
className:
|
|
64
|
+
ref: o,
|
|
65
|
+
className: l(
|
|
66
66
|
"py-ds-03 px-ds-03 [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
67
|
-
|
|
67
|
+
a
|
|
68
68
|
),
|
|
69
|
-
...
|
|
69
|
+
...e
|
|
70
70
|
}
|
|
71
71
|
));
|
|
72
|
-
|
|
73
|
-
const
|
|
72
|
+
i.displayName = "TableCell";
|
|
73
|
+
const p = s.forwardRef(({ className: a, ...e }, o) => /* @__PURE__ */ t(
|
|
74
74
|
"caption",
|
|
75
75
|
{
|
|
76
|
-
ref:
|
|
77
|
-
className:
|
|
78
|
-
...
|
|
76
|
+
ref: o,
|
|
77
|
+
className: l("mt-ds-05 text-ds-md text-surface-fg-muted", a),
|
|
78
|
+
...e
|
|
79
79
|
}
|
|
80
80
|
));
|
|
81
|
-
|
|
81
|
+
p.displayName = "TableCaption";
|
|
82
82
|
export {
|
|
83
83
|
r as Table,
|
|
84
84
|
c as TableBody,
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
p as TableCaption,
|
|
86
|
+
i as TableCell,
|
|
87
87
|
m as TableFooter,
|
|
88
|
-
|
|
88
|
+
b as TableHead,
|
|
89
89
|
d as TableHeader,
|
|
90
|
-
|
|
90
|
+
f as TableRow
|
|
91
91
|
};
|
package/dist/ui/tabs.d.ts
CHANGED
|
@@ -16,6 +16,9 @@ import * as React from 'react';
|
|
|
16
16
|
* all `TabsTrigger` children. You do NOT need to repeat `variant` on each trigger — but you CAN
|
|
17
17
|
* override it per-trigger if needed.
|
|
18
18
|
*
|
|
19
|
+
* The active tab indicator animates between tabs using Framer Motion `layoutId`. Line variant
|
|
20
|
+
* shows a sliding underline; contained variant shows a sliding pill background.
|
|
21
|
+
*
|
|
19
22
|
* @compound
|
|
20
23
|
* @example
|
|
21
24
|
* // Default line variant:
|
|
@@ -42,7 +45,7 @@ import * as React from 'react';
|
|
|
42
45
|
* <TabsContent value="roles">Roles list here.</TabsContent>
|
|
43
46
|
* </Tabs>
|
|
44
47
|
*/
|
|
45
|
-
declare const Tabs: React.ForwardRefExoticComponent<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>>;
|
|
48
|
+
declare const Tabs: React.ForwardRefExoticComponent<Omit<TabsPrimitive.TabsProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
46
49
|
/** Props for the Tabs root (defaultValue, value, onValueChange, etc.). */
|
|
47
50
|
export type TabsProps = React.ComponentPropsWithoutRef<typeof TabsPrimitive.Root>;
|
|
48
51
|
declare const tabsListVariants: (props?: ({
|
package/dist/ui/tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ui/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;
|
|
1
|
+
{"version":3,"file":"tabs.d.ts","sourceRoot":"","sources":["../../src/ui/tabs.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,QAAA,MAAM,IAAI,mJAgCR,CAAA;AAGF,0EAA0E;AAC1E,MAAM,MAAM,SAAS,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,CAAA;AAQjF,QAAA,MAAM,gBAAgB;;8EASpB,CAAA;AAEF,QAAA,MAAM,mBAAmB;;8EAmBxB,CAAA;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,aACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,IAAI,CAAC,EAC/D,YAAY,CAAC,OAAO,gBAAgB,CAAC;CAAG;AAE5C,QAAA,MAAM,QAAQ,sFAqBZ,CAAA;AAGF,MAAM,WAAW,gBACf,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,EAClE,YAAY,CAAC,OAAO,mBAAmB,CAAC;CAAG;AAE/C,QAAA,MAAM,WAAW,4FAmCf,CAAA;AAGF,QAAA,MAAM,WAAW,0JAYf,CAAA;AAGF,kFAAkF;AAClF,MAAM,MAAM,gBAAgB,GAAG,KAAK,CAAC,wBAAwB,CAAC,OAAO,aAAa,CAAC,OAAO,CAAC,CAAA;AAE3F,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,WAAW,EAAE,CAAA"}
|
package/dist/ui/tabs.js
CHANGED
|
@@ -1,75 +1,125 @@
|
|
|
1
1
|
"use client";
|
|
2
|
-
import { jsx as
|
|
3
|
-
import {
|
|
4
|
-
import * as
|
|
5
|
-
import {
|
|
6
|
-
import { c as
|
|
7
|
-
|
|
2
|
+
import { jsx as s, jsxs as N } from "react/jsx-runtime";
|
|
3
|
+
import { be as h, bf as b, bg as v, bh as g } from "../_chunks/primitives.js";
|
|
4
|
+
import * as t from "react";
|
|
5
|
+
import { ag as p } from "../_chunks/vendor-utils.js";
|
|
6
|
+
import { c as f } from "../_chunks/utils.js";
|
|
7
|
+
import { s as u } from "../_chunks/motion2.js";
|
|
8
|
+
import { L as T, m } from "../_chunks/motion.js";
|
|
9
|
+
const x = t.createContext(void 0), I = t.forwardRef(({ value: e, defaultValue: i, onValueChange: a, ...r }, o) => {
|
|
10
|
+
const [n, c] = t.useState(e ?? i ?? "");
|
|
11
|
+
t.useEffect(() => {
|
|
12
|
+
e !== void 0 && c(e);
|
|
13
|
+
}, [e]);
|
|
14
|
+
const d = t.useCallback(
|
|
15
|
+
(l) => {
|
|
16
|
+
c(l), a == null || a(l);
|
|
17
|
+
},
|
|
18
|
+
[a]
|
|
19
|
+
);
|
|
20
|
+
return /* @__PURE__ */ s(x.Provider, { value: n, children: /* @__PURE__ */ s(
|
|
21
|
+
h,
|
|
22
|
+
{
|
|
23
|
+
ref: o,
|
|
24
|
+
value: e,
|
|
25
|
+
defaultValue: e === void 0 ? i : void 0,
|
|
26
|
+
onValueChange: d,
|
|
27
|
+
...r
|
|
28
|
+
}
|
|
29
|
+
) });
|
|
30
|
+
});
|
|
31
|
+
I.displayName = "Tabs";
|
|
32
|
+
const y = t.createContext({
|
|
33
|
+
variant: "line",
|
|
34
|
+
layoutId: "tab-indicator"
|
|
35
|
+
}), w = p("inline-flex items-center", {
|
|
8
36
|
variants: {
|
|
9
37
|
variant: {
|
|
10
|
-
line: "border-b border-border w-full gap-0",
|
|
11
|
-
contained: "bg-
|
|
38
|
+
line: "border-b border-surface-border-strong w-full gap-0",
|
|
39
|
+
contained: "bg-surface-2 p-ds-02 rounded-ds-lg gap-ds-02"
|
|
12
40
|
}
|
|
13
41
|
},
|
|
14
42
|
defaultVariants: { variant: "line" }
|
|
15
|
-
}),
|
|
16
|
-
"inline-flex items-center justify-center gap-ds-02 whitespace-nowrap font-sans text-ds-md font-medium transition-
|
|
43
|
+
}), C = p(
|
|
44
|
+
"relative inline-flex items-center justify-center gap-ds-02 whitespace-nowrap font-sans text-ds-md font-medium transition-colors duration-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-1 disabled:pointer-events-none disabled:opacity-action-disabled",
|
|
17
45
|
{
|
|
18
46
|
variants: {
|
|
19
47
|
variant: {
|
|
20
48
|
line: [
|
|
21
|
-
"px-ds-05 py-ds-03 -mb-px
|
|
22
|
-
"text-
|
|
23
|
-
"data-[state=active]:
|
|
49
|
+
"px-ds-05 py-ds-03 -mb-px",
|
|
50
|
+
"text-surface-fg-muted hover:text-surface-fg",
|
|
51
|
+
"data-[state=active]:text-accent-11"
|
|
24
52
|
],
|
|
25
53
|
contained: [
|
|
26
54
|
"px-ds-05 py-ds-02b rounded-ds-md",
|
|
27
|
-
"text-
|
|
28
|
-
"data-[state=active]:
|
|
55
|
+
"text-surface-fg-muted hover:text-surface-fg",
|
|
56
|
+
"data-[state=active]:text-surface-fg"
|
|
29
57
|
]
|
|
30
58
|
}
|
|
31
59
|
},
|
|
32
60
|
defaultVariants: { variant: "line" }
|
|
33
61
|
}
|
|
34
|
-
),
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
62
|
+
), L = t.forwardRef(({ className: e, variant: i, ...a }, r) => {
|
|
63
|
+
const o = i ?? "line", n = t.useId(), c = t.useMemo(
|
|
64
|
+
() => ({ variant: o, layoutId: `tab-indicator-${n}` }),
|
|
65
|
+
[o, n]
|
|
66
|
+
);
|
|
67
|
+
return /* @__PURE__ */ s(y.Provider, { value: c, children: /* @__PURE__ */ s(T, { children: /* @__PURE__ */ s(
|
|
68
|
+
b,
|
|
38
69
|
{
|
|
39
|
-
ref:
|
|
40
|
-
className:
|
|
41
|
-
...
|
|
70
|
+
ref: r,
|
|
71
|
+
className: f(w({ variant: o }), e),
|
|
72
|
+
...a
|
|
42
73
|
}
|
|
43
|
-
) });
|
|
74
|
+
) }) });
|
|
44
75
|
});
|
|
45
|
-
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
return /* @__PURE__ */
|
|
49
|
-
|
|
76
|
+
L.displayName = b.displayName;
|
|
77
|
+
const R = t.forwardRef(({ className: e, variant: i, children: a, ...r }, o) => {
|
|
78
|
+
const n = t.useContext(y), c = t.useContext(x), d = i ?? n.variant, l = r.value === c;
|
|
79
|
+
return /* @__PURE__ */ N(
|
|
80
|
+
v,
|
|
50
81
|
{
|
|
51
|
-
ref:
|
|
52
|
-
className:
|
|
53
|
-
...
|
|
82
|
+
ref: o,
|
|
83
|
+
className: f(C({ variant: d }), e),
|
|
84
|
+
...r,
|
|
85
|
+
children: [
|
|
86
|
+
d === "contained" && l && /* @__PURE__ */ s(
|
|
87
|
+
m.span,
|
|
88
|
+
{
|
|
89
|
+
layoutId: `${n.layoutId}-contained`,
|
|
90
|
+
className: "absolute inset-0 rounded-ds-md bg-surface-1 shadow-01",
|
|
91
|
+
transition: u.smooth
|
|
92
|
+
}
|
|
93
|
+
),
|
|
94
|
+
/* @__PURE__ */ s("span", { className: "relative z-[1] inline-flex items-center gap-ds-02", children: a }),
|
|
95
|
+
d === "line" && l && /* @__PURE__ */ s(
|
|
96
|
+
m.span,
|
|
97
|
+
{
|
|
98
|
+
layoutId: `${n.layoutId}-line`,
|
|
99
|
+
className: "absolute bottom-0 left-0 right-0 h-0.5 bg-accent-9",
|
|
100
|
+
transition: u.smooth
|
|
101
|
+
}
|
|
102
|
+
)
|
|
103
|
+
]
|
|
54
104
|
}
|
|
55
105
|
);
|
|
56
106
|
});
|
|
57
|
-
|
|
58
|
-
const
|
|
59
|
-
|
|
107
|
+
R.displayName = v.displayName;
|
|
108
|
+
const V = t.forwardRef(({ className: e, ...i }, a) => /* @__PURE__ */ s(
|
|
109
|
+
g,
|
|
60
110
|
{
|
|
61
|
-
ref:
|
|
62
|
-
className:
|
|
63
|
-
"mt-ds-05 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
64
|
-
|
|
111
|
+
ref: a,
|
|
112
|
+
className: f(
|
|
113
|
+
"mt-ds-05 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:ring-offset-2",
|
|
114
|
+
e
|
|
65
115
|
),
|
|
66
|
-
...
|
|
116
|
+
...i
|
|
67
117
|
}
|
|
68
118
|
));
|
|
69
|
-
|
|
119
|
+
V.displayName = g.displayName;
|
|
70
120
|
export {
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
121
|
+
I as Tabs,
|
|
122
|
+
V as TabsContent,
|
|
123
|
+
L as TabsList,
|
|
124
|
+
R as TabsTrigger
|
|
75
125
|
};
|
package/dist/ui/text.d.ts
CHANGED
|
@@ -23,17 +23,17 @@ type TextVariant = NonNullable<VariantProps<typeof textVariants>['variant']>;
|
|
|
23
23
|
*
|
|
24
24
|
* @example
|
|
25
25
|
* // Section label (uppercase, small):
|
|
26
|
-
* <Text variant="label-sm" className="text-
|
|
26
|
+
* <Text variant="label-sm" className="text-surface-fg-muted">Recent activity</Text>
|
|
27
27
|
*
|
|
28
28
|
* @example
|
|
29
29
|
* // Body copy with custom element (renders as <span> for inline use):
|
|
30
|
-
* <Text variant="body-sm" as="span" className="text-
|
|
30
|
+
* <Text variant="body-sm" as="span" className="text-surface-fg-muted">
|
|
31
31
|
* Last updated 3 hours ago
|
|
32
32
|
* </Text>
|
|
33
33
|
*
|
|
34
34
|
* @example
|
|
35
35
|
* // Caption under an image or figure:
|
|
36
|
-
* <Text variant="caption" className="text-
|
|
36
|
+
* <Text variant="caption" className="text-surface-fg-subtle">Figure 1: System architecture</Text>
|
|
37
37
|
* // These are just a few ways — feel free to combine props creatively!
|
|
38
38
|
*/
|
|
39
39
|
type TextProps<T extends React.ElementType = 'p'> = {
|
package/dist/ui/text.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"textarea.d.ts","sourceRoot":"","sources":["../../src/ui/textarea.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAGjE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAGzC,QAAA,MAAM,gBAAgB;;8EAsBrB,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,WAAW,aACf,SAAQ,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC,EACrE,YAAY,CAAC,OAAO,gBAAgB,CAAC;IACvC,KAAK,CAAC,EAAE,UAAU,CAAA;CACnB;AAED,QAAA,MAAM,QAAQ,2FAyBb,CAAA;AAGD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,CAAA"}
|
package/dist/ui/textarea.js
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import { jsx as c } from "react/jsx-runtime";
|
|
3
3
|
import * as l from "react";
|
|
4
|
-
import {
|
|
5
|
-
import { c as
|
|
6
|
-
import {
|
|
7
|
-
|
|
4
|
+
import { ag as u } from "../_chunks/vendor-utils.js";
|
|
5
|
+
import { c as f } from "../_chunks/utils.js";
|
|
6
|
+
import { m } from "../_chunks/motion2.js";
|
|
7
|
+
import { u as b } from "../_chunks/form.js";
|
|
8
|
+
import { m as x } from "../_chunks/motion.js";
|
|
9
|
+
const p = u(
|
|
8
10
|
[
|
|
9
11
|
"flex w-full font-sans resize-y",
|
|
10
|
-
"bg-
|
|
11
|
-
"border border-border rounded-ds-md",
|
|
12
|
-
"placeholder:text-
|
|
13
|
-
"hover:bg-
|
|
12
|
+
"bg-surface-3 text-surface-fg",
|
|
13
|
+
"border border-surface-border-strong rounded-ds-md",
|
|
14
|
+
"placeholder:text-surface-fg-subtle",
|
|
15
|
+
"hover:bg-surface-4",
|
|
14
16
|
"transition-colors duration-fast-01",
|
|
15
|
-
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-
|
|
16
|
-
"disabled:cursor-not-allowed disabled:opacity-
|
|
17
|
-
"read-only:bg-
|
|
17
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-accent-9 focus-visible:border-accent-7",
|
|
18
|
+
"disabled:cursor-not-allowed disabled:opacity-action-disabled",
|
|
19
|
+
"read-only:bg-surface-2 read-only:cursor-default"
|
|
18
20
|
],
|
|
19
21
|
{
|
|
20
22
|
variants: {
|
|
@@ -26,30 +28,30 @@ const m = b(
|
|
|
26
28
|
},
|
|
27
29
|
defaultVariants: { size: "md" }
|
|
28
30
|
}
|
|
29
|
-
),
|
|
30
|
-
({ className:
|
|
31
|
-
const r =
|
|
31
|
+
), g = l.forwardRef(
|
|
32
|
+
({ className: a, state: i, size: o, ...s }, t) => {
|
|
33
|
+
const r = b(), e = i ?? (r.state === "helper" ? void 0 : r.state), d = s["aria-describedby"] ?? r.helperTextId, n = s["aria-required"] ?? r.required;
|
|
32
34
|
return /* @__PURE__ */ c(
|
|
33
|
-
|
|
35
|
+
x.textarea,
|
|
34
36
|
{
|
|
35
37
|
"aria-invalid": e === "error" || void 0,
|
|
36
|
-
"aria-describedby":
|
|
38
|
+
"aria-describedby": d,
|
|
37
39
|
"aria-required": n || void 0,
|
|
38
|
-
className:
|
|
39
|
-
|
|
40
|
-
e === "error" && "border-
|
|
41
|
-
e === "warning" && "border-
|
|
42
|
-
e === "success" && "border-
|
|
43
|
-
|
|
40
|
+
className: f(
|
|
41
|
+
p({ size: o }),
|
|
42
|
+
e === "error" && "border-error-7 focus-visible:ring-error-7",
|
|
43
|
+
e === "warning" && "border-warning-7 focus-visible:ring-warning-7",
|
|
44
|
+
e === "success" && "border-success-7 focus-visible:ring-success-7",
|
|
45
|
+
a
|
|
44
46
|
),
|
|
45
|
-
ref:
|
|
46
|
-
...s
|
|
47
|
+
ref: t,
|
|
48
|
+
...m(s)
|
|
47
49
|
}
|
|
48
50
|
);
|
|
49
51
|
}
|
|
50
52
|
);
|
|
51
|
-
|
|
53
|
+
g.displayName = "Textarea";
|
|
52
54
|
export {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
+
g as Textarea,
|
|
56
|
+
p as textareaVariants
|
|
55
57
|
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import type * as React from 'react';
|
|
3
|
+
export interface UploadFile {
|
|
4
|
+
id: string;
|
|
5
|
+
name: string;
|
|
6
|
+
/** File size in bytes */
|
|
7
|
+
size: number;
|
|
8
|
+
/** 0-100 progress percentage. undefined = indeterminate */
|
|
9
|
+
progress?: number;
|
|
10
|
+
/** Upload state */
|
|
11
|
+
status: 'pending' | 'uploading' | 'processing' | 'complete' | 'error';
|
|
12
|
+
/** Error message if status is 'error' */
|
|
13
|
+
error?: string;
|
|
14
|
+
/** Optional preview URL (for images) */
|
|
15
|
+
previewUrl?: string;
|
|
16
|
+
}
|
|
17
|
+
export interface ToastActionOptions {
|
|
18
|
+
label: string;
|
|
19
|
+
onClick: () => void;
|
|
20
|
+
}
|
|
21
|
+
export interface ToastUndoOptions {
|
|
22
|
+
onUndo: () => void;
|
|
23
|
+
/** Auto-dismiss duration in ms. Default: 8000 */
|
|
24
|
+
duration?: number;
|
|
25
|
+
description?: string;
|
|
26
|
+
}
|
|
27
|
+
export interface ToastUploadOptions {
|
|
28
|
+
/** Pass an existing toast id to update it */
|
|
29
|
+
id?: string;
|
|
30
|
+
files: UploadFile[];
|
|
31
|
+
onRetry?: (fileId: string) => void;
|
|
32
|
+
onRemove?: (fileId: string) => void;
|
|
33
|
+
}
|
|
34
|
+
export interface ToastOptions {
|
|
35
|
+
id?: string;
|
|
36
|
+
title?: React.ReactNode;
|
|
37
|
+
description?: React.ReactNode;
|
|
38
|
+
action?: ToastActionOptions;
|
|
39
|
+
cancel?: ToastActionOptions;
|
|
40
|
+
duration?: number;
|
|
41
|
+
}
|
|
42
|
+
export type ToastType = 'success' | 'error' | 'warning' | 'info' | 'loading' | 'message';
|
|
43
|
+
//# sourceMappingURL=toast-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"toast-types.d.ts","sourceRoot":"","sources":["../../src/ui/toast-types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAMnC,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,yBAAyB;IACzB,IAAI,EAAE,MAAM,CAAA;IACZ,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,mBAAmB;IACnB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,YAAY,GAAG,UAAU,GAAG,OAAO,CAAA;IACrE,yCAAyC;IACzC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,wCAAwC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB;AAMD,MAAM,WAAW,kBAAkB;IACjC,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,IAAI,CAAA;IAClB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,6CAA6C;IAC7C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,UAAU,EAAE,CAAA;IACnB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAClC,QAAQ,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;CACpC;AAED,MAAM,WAAW,YAAY;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACvB,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC7B,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,MAAM,CAAC,EAAE,kBAAkB,CAAA;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,MAAM,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA"}
|