@rafal.lemieszewski/tide-ui 0.83.0 → 0.84.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/README.md +20 -8
- package/dist/cjs/components/core-index.cjs +1 -0
- package/dist/cjs/components/fundamental/accordion.cjs +1 -0
- package/dist/cjs/components/fundamental/alert-dialog.cjs +1 -0
- package/dist/cjs/components/fundamental/alert.cjs +1 -0
- package/dist/cjs/components/fundamental/autocomplete-search.cjs +1 -0
- package/dist/cjs/components/fundamental/avatar-group.cjs +1 -0
- package/dist/cjs/components/fundamental/avatar.cjs +1 -0
- package/dist/cjs/components/fundamental/badge.cjs +1 -0
- package/dist/cjs/components/fundamental/breadcrumb.cjs +1 -0
- package/dist/cjs/components/fundamental/button-group.cjs +1 -0
- package/dist/cjs/components/fundamental/button.cjs +1 -0
- package/dist/cjs/components/fundamental/calendar.cjs +1 -0
- package/dist/cjs/components/fundamental/card.cjs +1 -0
- package/dist/cjs/components/fundamental/chart.cjs +1 -0
- package/dist/cjs/components/fundamental/checkbox.cjs +1 -0
- package/dist/cjs/components/fundamental/collapsible.cjs +1 -0
- package/dist/cjs/components/fundamental/combobox.cjs +1 -0
- package/dist/cjs/components/fundamental/command.cjs +1 -0
- package/dist/cjs/components/fundamental/country-dropdown.cjs +1 -0
- package/dist/cjs/components/fundamental/custom-icons.cjs +1 -0
- package/dist/cjs/components/fundamental/date-picker.cjs +1 -0
- package/dist/cjs/components/fundamental/dialog.cjs +1 -0
- package/dist/cjs/components/fundamental/drawer.cjs +1 -0
- package/dist/cjs/components/fundamental/dropdown-menu.cjs +1 -0
- package/dist/cjs/components/fundamental/editable.cjs +1 -0
- package/dist/cjs/components/fundamental/empty.cjs +1 -0
- package/dist/cjs/components/fundamental/file-upload.cjs +1 -0
- package/dist/cjs/components/fundamental/flag.cjs +1 -0
- package/dist/cjs/components/fundamental/form-field.cjs +1 -0
- package/dist/cjs/components/fundamental/hover-card.cjs +1 -0
- package/dist/cjs/components/fundamental/icon.cjs +1 -0
- package/dist/cjs/components/fundamental/input-group.cjs +1 -0
- package/dist/cjs/components/fundamental/input.cjs +1 -0
- package/dist/cjs/components/fundamental/kbd.cjs +1 -0
- package/dist/cjs/components/fundamental/label.cjs +1 -0
- package/dist/cjs/components/fundamental/month-picker.cjs +1 -0
- package/dist/cjs/components/fundamental/pagination.cjs +1 -0
- package/dist/cjs/components/fundamental/popover.cjs +1 -0
- package/dist/cjs/components/fundamental/progress.cjs +1 -0
- package/dist/cjs/components/fundamental/radio-group.cjs +1 -0
- package/dist/cjs/components/fundamental/resizable.cjs +1 -0
- package/dist/cjs/components/fundamental/scroll-area.cjs +1 -0
- package/dist/cjs/components/fundamental/select.cjs +1 -0
- package/dist/cjs/components/fundamental/separator.cjs +1 -0
- package/dist/cjs/components/fundamental/sheet.cjs +1 -0
- package/dist/cjs/components/fundamental/sidebar.cjs +1 -0
- package/dist/cjs/components/fundamental/skeleton.cjs +1 -0
- package/dist/cjs/components/fundamental/slider.cjs +1 -0
- package/dist/cjs/components/fundamental/spinner.cjs +1 -0
- package/dist/cjs/components/fundamental/switch.cjs +1 -0
- package/dist/cjs/components/fundamental/table.cjs +1 -0
- package/dist/cjs/components/fundamental/tabs.cjs +1 -0
- package/dist/cjs/components/fundamental/tag.cjs +27 -0
- package/dist/cjs/components/fundamental/text-link.cjs +1 -0
- package/dist/cjs/components/fundamental/textarea.cjs +1 -0
- package/dist/cjs/components/fundamental/toast.cjs +1 -0
- package/dist/cjs/components/fundamental/toggle-group.cjs +1 -0
- package/dist/cjs/components/fundamental/toggle.cjs +1 -0
- package/dist/cjs/components/fundamental/tooltip.cjs +1 -0
- package/dist/cjs/components/fundamental/tree.cjs +1 -0
- package/dist/cjs/components/product/activity-log.cjs +1 -0
- package/dist/cjs/components/product/app-frame.cjs +1 -0
- package/dist/cjs/components/product/attributes-list.cjs +1 -0
- package/dist/cjs/components/product/bookmarks.cjs +1 -0
- package/dist/cjs/components/product/data-table-settings-menu.cjs +1 -0
- package/dist/cjs/components/product/data-table.cjs +1 -0
- package/dist/cjs/components/product/filters.cjs +1 -0
- package/dist/cjs/components/product/fixture-status.cjs +1 -0
- package/dist/cjs/components/product/linked-chart.cjs +1 -0
- package/dist/cjs/components/product/view-mode-menu.cjs +1 -0
- package/dist/cjs/lib/date-utils.cjs +1 -0
- package/dist/cjs/lib/hooks.cjs +1 -0
- package/dist/cjs/lib/index.cjs +1 -0
- package/dist/cjs/lib/utils.cjs +1 -0
- package/dist/es/components/core-index.js +37 -0
- package/dist/es/components/fundamental/accordion.js +60 -0
- package/dist/es/components/fundamental/alert-dialog.js +116 -0
- package/dist/es/components/fundamental/alert.js +65 -0
- package/dist/es/components/fundamental/autocomplete-search.js +139 -0
- package/dist/es/components/fundamental/avatar-group.js +51 -0
- package/dist/es/components/fundamental/avatar.js +165 -0
- package/dist/es/components/fundamental/badge.js +157 -0
- package/dist/es/components/fundamental/breadcrumb.js +142 -0
- package/dist/es/components/fundamental/button-group.js +86 -0
- package/dist/es/components/fundamental/button.js +186 -0
- package/dist/es/components/fundamental/calendar.js +130 -0
- package/dist/es/components/fundamental/card.js +68 -0
- package/dist/es/components/fundamental/chart.js +1006 -0
- package/dist/es/components/fundamental/checkbox.js +51 -0
- package/dist/es/components/fundamental/collapsible.js +55 -0
- package/dist/es/components/fundamental/combobox.js +229 -0
- package/dist/es/components/fundamental/command.js +155 -0
- package/dist/es/components/fundamental/country-dropdown.js +215 -0
- package/dist/es/components/fundamental/custom-icons.js +876 -0
- package/dist/es/components/fundamental/date-picker.js +119 -0
- package/dist/es/components/fundamental/dialog.js +106 -0
- package/dist/es/components/fundamental/drawer.js +93 -0
- package/dist/es/components/fundamental/dropdown-menu.js +600 -0
- package/dist/es/components/fundamental/editable.js +123 -0
- package/dist/es/components/fundamental/empty.js +152 -0
- package/dist/es/components/fundamental/file-upload.js +289 -0
- package/dist/es/components/fundamental/flag.js +60 -0
- package/dist/es/components/fundamental/form-field.js +352 -0
- package/dist/es/components/fundamental/hover-card.js +23 -0
- package/dist/es/components/fundamental/icon.js +200 -0
- package/dist/es/components/fundamental/input-group.js +135 -0
- package/dist/es/components/fundamental/input.js +78 -0
- package/dist/es/components/fundamental/kbd.js +57 -0
- package/dist/es/components/fundamental/label.js +54 -0
- package/dist/es/components/fundamental/month-picker.js +161 -0
- package/dist/es/components/fundamental/pagination.js +109 -0
- package/dist/es/components/fundamental/popover.js +24 -0
- package/dist/es/components/fundamental/progress.js +66 -0
- package/dist/es/components/fundamental/radio-group.js +64 -0
- package/dist/es/components/fundamental/resizable.js +43 -0
- package/dist/es/components/fundamental/scroll-area.js +38 -0
- package/dist/es/components/fundamental/select.js +136 -0
- package/dist/es/components/fundamental/separator.js +47 -0
- package/dist/es/components/fundamental/sheet.js +134 -0
- package/dist/es/components/fundamental/sidebar.js +709 -0
- package/dist/es/components/fundamental/skeleton.js +158 -0
- package/dist/es/components/fundamental/slider.js +35 -0
- package/dist/es/components/fundamental/spinner.js +225 -0
- package/dist/es/components/fundamental/switch.js +27 -0
- package/dist/es/components/fundamental/table.js +263 -0
- package/dist/es/components/fundamental/tabs.js +170 -0
- package/dist/es/components/fundamental/tag.js +295 -0
- package/dist/es/components/fundamental/text-link.js +105 -0
- package/dist/es/components/fundamental/textarea.js +47 -0
- package/dist/es/components/fundamental/toast.js +108 -0
- package/dist/es/components/fundamental/toggle-group.js +37 -0
- package/dist/es/components/fundamental/toggle.js +51 -0
- package/dist/es/components/fundamental/tooltip.js +26 -0
- package/dist/es/components/fundamental/tree.js +161 -0
- package/dist/es/components/product/activity-log.js +231 -0
- package/dist/es/components/product/app-frame.js +985 -0
- package/dist/es/components/product/attributes-list.js +351 -0
- package/dist/es/components/product/bookmarks.js +833 -0
- package/dist/es/components/product/data-table-settings-menu.js +169 -0
- package/dist/es/components/product/data-table.js +2473 -0
- package/dist/es/components/product/filters.js +1041 -0
- package/dist/es/components/product/fixture-status.js +178 -0
- package/dist/es/components/product/linked-chart.js +179 -0
- package/dist/es/components/product/view-mode-menu.js +353 -0
- package/dist/es/lib/date-utils.js +151 -0
- package/dist/es/lib/hooks.js +29 -0
- package/dist/es/lib/index.js +348 -0
- package/dist/es/lib/utils.js +8 -0
- package/dist/es/style.css +1 -0
- package/dist/types/bookmarks.d.ts +2 -0
- package/dist/types/calendar.d.ts +2 -0
- package/dist/types/chart.d.ts +2 -0
- package/dist/types/components/core-index.d.cts +135 -0
- package/dist/types/components/core-index.d.ts +135 -0
- package/dist/{components → types/components}/fundamental/avatar.d.ts +3 -3
- package/dist/{components → types/components}/fundamental/badge.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/button-group.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/button.d.ts +1 -1
- package/dist/types/components/fundamental/calendar.d.ts +7 -0
- package/dist/types/components/fundamental/chart.d.ts +95 -0
- package/dist/{components → types/components}/fundamental/command.d.ts +2 -2
- package/dist/types/components/fundamental/country-dropdown.d.ts +34 -0
- package/dist/types/components/fundamental/date-picker.d.ts +30 -0
- package/dist/{components → types/components}/fundamental/file-upload.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/form-field.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/form.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/icon.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/input-group.d.ts +1 -1
- package/dist/types/components/fundamental/resizable.d.cts +23 -0
- package/dist/{components → types/components}/fundamental/resizable.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/sidebar.d.ts +3 -3
- package/dist/{components → types/components}/fundamental/spinner.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/table.d.ts +3 -3
- package/dist/{components → types/components}/fundamental/text-link.d.ts +1 -1
- package/dist/{components → types/components}/index.d.ts +118 -118
- package/dist/{components → types/components}/product/activity-log.d.ts +1 -1
- package/dist/{components → types/components}/product/attributes-list.d.ts +1 -1
- package/dist/types/components/product/bookmarks.d.cts +90 -0
- package/dist/{components → types/components}/product/bookmarks.d.ts +1 -1
- package/dist/types/components/product/data-table.d.ts +802 -0
- package/dist/types/components/product/filters.d.ts +124 -0
- package/dist/{components → types/components}/product/fixture-status.d.ts +1 -1
- package/dist/types/components/product/linked-chart.d.cts +22 -0
- package/dist/{components → types/components}/product/linked-chart.d.ts +1 -1
- package/dist/types/country-dropdown.d.ts +2 -0
- package/dist/types/data-table.d.ts +2 -0
- package/dist/types/date-picker.d.ts +2 -0
- package/dist/types/filters.d.ts +2 -0
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/index.d.cts +104 -0
- package/dist/types/lib/index.d.ts +104 -0
- package/dist/types/linked-chart.d.ts +2 -0
- package/dist/types/resizable.d.ts +2 -0
- package/package.json +191 -31
- package/dist/index.cjs.js +0 -144
- package/dist/index.cjs.js.map +0 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.es.js +0 -87768
- package/dist/index.es.js.map +0 -1
- package/dist/lib/index.d.ts +0 -3
- package/dist/style.css +0 -1
- /package/dist/{components → types/components}/fundamental/accordion.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/alert-dialog.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/alert.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/autocomplete-search.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/avatar-group.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/breadcrumb.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/button.test.d.ts +0 -0
- /package/dist/{components/fundamental/calendar.d.ts → types/components/fundamental/calendar.d.cts} +0 -0
- /package/dist/{components → types/components}/fundamental/card.d.ts +0 -0
- /package/dist/{components/fundamental/chart.d.ts → types/components/fundamental/chart.d.cts} +0 -0
- /package/dist/{components → types/components}/fundamental/checkbox.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/collapsible.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/combobox.d.ts +0 -0
- /package/dist/{components/fundamental/country-dropdown.d.ts → types/components/fundamental/country-dropdown.d.cts} +0 -0
- /package/dist/{components → types/components}/fundamental/custom-icons.d.ts +0 -0
- /package/dist/{components/fundamental/date-picker.d.ts → types/components/fundamental/date-picker.d.cts} +0 -0
- /package/dist/{components → types/components}/fundamental/dialog.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/drawer.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/dropdown-menu.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/editable.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/empty.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/flag.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/hover-card.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/input.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/kbd.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/label.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/month-picker.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/pagination.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/popover.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/progress.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/radio-group.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/scroll-area.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/select.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/separator.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/sheet.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/skeleton.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/slider.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/switch.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/tabs.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/tag.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/textarea.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/toast.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/toggle-group.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/toggle.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/tooltip.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/tree.d.ts +0 -0
- /package/dist/{components → types/components}/product/app-frame.d.ts +0 -0
- /package/dist/{components → types/components}/product/data-table-settings-menu.d.ts +0 -0
- /package/dist/{components/product/data-table.d.ts → types/components/product/data-table.d.cts} +0 -0
- /package/dist/{components/product/filters.d.ts → types/components/product/filters.d.cts} +0 -0
- /package/dist/{components → types/components}/product/view-mode-menu.d.ts +0 -0
- /package/dist/{lib → types/lib}/date-utils.d.ts +0 -0
- /package/dist/{lib → types/lib}/hooks.d.ts +0 -0
- /package/dist/{lib → types/lib}/utils.d.ts +0 -0
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cn as m } from "../../lib/utils.js";
|
|
4
|
+
import { cva as b } from "class-variance-authority";
|
|
5
|
+
const g = b(
|
|
6
|
+
"animate-pulse bg-[var(--grey-alpha-50)] rounded",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: "",
|
|
11
|
+
circle: "rounded-full",
|
|
12
|
+
rectangular: "rounded-s"
|
|
13
|
+
},
|
|
14
|
+
size: {
|
|
15
|
+
s: "h-4",
|
|
16
|
+
m: "h-6",
|
|
17
|
+
l: "h-8",
|
|
18
|
+
xl: "h-12"
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
defaultVariants: {
|
|
22
|
+
variant: "default",
|
|
23
|
+
size: "m"
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
), o = /* @__PURE__ */ d.forwardRef(
|
|
27
|
+
({
|
|
28
|
+
className: s,
|
|
29
|
+
variant: t,
|
|
30
|
+
size: a,
|
|
31
|
+
width: r,
|
|
32
|
+
height: l,
|
|
33
|
+
randomWidth: n = !1,
|
|
34
|
+
lines: i = 1,
|
|
35
|
+
style: u,
|
|
36
|
+
...f
|
|
37
|
+
}, y) => {
|
|
38
|
+
const h = d.useMemo(() => n ? `${Math.floor(Math.random() * 40) + 50}%` : void 0, [n]), w = d.useMemo(() => {
|
|
39
|
+
const c = { ...u };
|
|
40
|
+
return r !== void 0 ? c.width = typeof r == "number" ? `${r}px` : r : h && (c.width = h), l !== void 0 && (c.height = typeof l == "number" ? `${l}px` : l), c;
|
|
41
|
+
}, [u, r, l, h]);
|
|
42
|
+
return i > 1 ? /* @__PURE__ */ e(
|
|
43
|
+
"div",
|
|
44
|
+
{
|
|
45
|
+
ref: y,
|
|
46
|
+
className: m("space-y-[var(--space-s)]", s),
|
|
47
|
+
...f,
|
|
48
|
+
children: Array.from({ length: i }).map((c, v) => /* @__PURE__ */ e(
|
|
49
|
+
"div",
|
|
50
|
+
{
|
|
51
|
+
className: m(
|
|
52
|
+
g({ variant: t, size: a }),
|
|
53
|
+
"w-full",
|
|
54
|
+
// Last line is often shorter in real text
|
|
55
|
+
v === i - 1 && n && "max-w-[75%]"
|
|
56
|
+
),
|
|
57
|
+
style: v === i - 1 && n ? { width: `${Math.floor(Math.random() * 25) + 50}%` } : n ? { width: h } : w,
|
|
58
|
+
"aria-hidden": "true"
|
|
59
|
+
},
|
|
60
|
+
v
|
|
61
|
+
))
|
|
62
|
+
}
|
|
63
|
+
) : /* @__PURE__ */ e(
|
|
64
|
+
"div",
|
|
65
|
+
{
|
|
66
|
+
ref: y,
|
|
67
|
+
className: m(g({ variant: t, size: a }), "w-full", s),
|
|
68
|
+
style: w,
|
|
69
|
+
"aria-hidden": "true",
|
|
70
|
+
...f
|
|
71
|
+
}
|
|
72
|
+
);
|
|
73
|
+
}
|
|
74
|
+
);
|
|
75
|
+
o.displayName = "Skeleton";
|
|
76
|
+
const N = /* @__PURE__ */ d.forwardRef(({ size: s = "m", className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
77
|
+
o,
|
|
78
|
+
{
|
|
79
|
+
ref: r,
|
|
80
|
+
variant: "circle",
|
|
81
|
+
className: m({
|
|
82
|
+
s: "h-8 w-8",
|
|
83
|
+
m: "h-10 w-10",
|
|
84
|
+
l: "h-12 w-12",
|
|
85
|
+
xl: "h-16 w-16"
|
|
86
|
+
}[s], t),
|
|
87
|
+
...a
|
|
88
|
+
}
|
|
89
|
+
));
|
|
90
|
+
N.displayName = "SkeletonAvatar";
|
|
91
|
+
const S = /* @__PURE__ */ d.forwardRef(({ size: s = "m", className: t, ...a }, r) => /* @__PURE__ */ e(
|
|
92
|
+
o,
|
|
93
|
+
{
|
|
94
|
+
ref: r,
|
|
95
|
+
variant: "rectangular",
|
|
96
|
+
className: m({
|
|
97
|
+
s: "h-9 w-20",
|
|
98
|
+
m: "h-10 w-24",
|
|
99
|
+
l: "h-11 w-28"
|
|
100
|
+
}[s], t),
|
|
101
|
+
...a
|
|
102
|
+
}
|
|
103
|
+
));
|
|
104
|
+
S.displayName = "SkeletonButton";
|
|
105
|
+
const k = /* @__PURE__ */ d.forwardRef(({ className: s, ...t }, a) => /* @__PURE__ */ p(
|
|
106
|
+
"div",
|
|
107
|
+
{
|
|
108
|
+
ref: a,
|
|
109
|
+
className: m(
|
|
110
|
+
"rounded-l border border-[var(--color-border-primary-subtle)] p-[var(--space-l)] space-y-[var(--space-m)]",
|
|
111
|
+
s
|
|
112
|
+
),
|
|
113
|
+
...t,
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ p("div", { className: "space-y-[var(--space-s)]", children: [
|
|
116
|
+
/* @__PURE__ */ e(o, { height: 20, width: "60%" }),
|
|
117
|
+
/* @__PURE__ */ e(o, { lines: 2, size: "s", randomWidth: !0 })
|
|
118
|
+
] }),
|
|
119
|
+
/* @__PURE__ */ p("div", { className: "flex items-center justify-between", children: [
|
|
120
|
+
/* @__PURE__ */ p("div", { className: "flex items-center gap-[var(--space-s)]", children: [
|
|
121
|
+
/* @__PURE__ */ e(N, { size: "s" }),
|
|
122
|
+
/* @__PURE__ */ e(o, { height: 16, width: "80px" })
|
|
123
|
+
] }),
|
|
124
|
+
/* @__PURE__ */ e(S, { size: "s" })
|
|
125
|
+
] })
|
|
126
|
+
]
|
|
127
|
+
}
|
|
128
|
+
));
|
|
129
|
+
k.displayName = "SkeletonCard";
|
|
130
|
+
const $ = /* @__PURE__ */ d.forwardRef(({ className: s, rows: t = 5, columns: a = 4, ...r }, l) => /* @__PURE__ */ p(
|
|
131
|
+
"div",
|
|
132
|
+
{
|
|
133
|
+
ref: l,
|
|
134
|
+
className: m("space-y-[var(--space-m)]", s),
|
|
135
|
+
...r,
|
|
136
|
+
children: [
|
|
137
|
+
/* @__PURE__ */ e("div", { className: "grid gap-[var(--space-m)]", style: { gridTemplateColumns: `repeat(${a}, 1fr)` }, children: Array.from({ length: a }).map((n, i) => /* @__PURE__ */ e(o, { height: 20, width: "70%" }, `header-${i}`)) }),
|
|
138
|
+
Array.from({ length: t }).map((n, i) => /* @__PURE__ */ e(
|
|
139
|
+
"div",
|
|
140
|
+
{
|
|
141
|
+
className: "grid gap-[var(--space-m)]",
|
|
142
|
+
style: { gridTemplateColumns: `repeat(${a}, 1fr)` },
|
|
143
|
+
children: Array.from({ length: a }).map((u, f) => /* @__PURE__ */ e(o, { height: 16, randomWidth: !0 }, `cell-${i}-${f}`))
|
|
144
|
+
},
|
|
145
|
+
`row-${i}`
|
|
146
|
+
))
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
));
|
|
150
|
+
$.displayName = "SkeletonTable";
|
|
151
|
+
export {
|
|
152
|
+
o as Skeleton,
|
|
153
|
+
N as SkeletonAvatar,
|
|
154
|
+
S as SkeletonButton,
|
|
155
|
+
k as SkeletonCard,
|
|
156
|
+
$ as SkeletonTable,
|
|
157
|
+
g as skeletonVariants
|
|
158
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsxs as n, jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as c from "react";
|
|
3
|
+
import * as r from "@radix-ui/react-slider";
|
|
4
|
+
import { cn as b } from "../../lib/utils.js";
|
|
5
|
+
const u = /* @__PURE__ */ c.forwardRef(({ className: l, value: a, defaultValue: e, ...s }, d) => {
|
|
6
|
+
const i = (a || e || [0]).length;
|
|
7
|
+
return /* @__PURE__ */ n(
|
|
8
|
+
r.Root,
|
|
9
|
+
{
|
|
10
|
+
ref: d,
|
|
11
|
+
className: b(
|
|
12
|
+
"relative flex w-full touch-none select-none items-center",
|
|
13
|
+
"[&[data-disabled]]:!cursor-not-allowed [&[data-disabled]_*]:!cursor-not-allowed",
|
|
14
|
+
l
|
|
15
|
+
),
|
|
16
|
+
value: a,
|
|
17
|
+
defaultValue: e,
|
|
18
|
+
...s,
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ o(r.Track, { className: "relative h-[var(--size-3xs)] w-full grow overflow-hidden rounded-full bg-[var(--color-background-neutral-default)] data-[disabled]:!cursor-not-allowed z-0", children: /* @__PURE__ */ o(r.Range, { className: "absolute h-full bg-[var(--color-background-blue-bold)] data-[disabled]:bg-[var(--grey-300)] data-[disabled]:!cursor-not-allowed" }) }),
|
|
21
|
+
Array.from({ length: i }).map((f, t) => /* @__PURE__ */ o(
|
|
22
|
+
r.Thumb,
|
|
23
|
+
{
|
|
24
|
+
className: "block h-[var(--size-xs)] w-[var(--size-xs)] rounded-full border border-[var(--color-border-brand-bold)] bg-[var(--color-surface-primary)] shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-surface-primary)] data-[disabled]:!cursor-not-allowed data-[disabled]:pointer-events-auto data-[disabled]:border-[var(--grey-300)] data-[disabled]:ring-0 z-10 relative"
|
|
25
|
+
},
|
|
26
|
+
t
|
|
27
|
+
))
|
|
28
|
+
]
|
|
29
|
+
}
|
|
30
|
+
);
|
|
31
|
+
});
|
|
32
|
+
u.displayName = r.Root.displayName;
|
|
33
|
+
export {
|
|
34
|
+
u as Slider
|
|
35
|
+
};
|
|
@@ -0,0 +1,225 @@
|
|
|
1
|
+
import { jsxs as f, jsx as l } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cn as c } from "../../lib/utils.js";
|
|
4
|
+
import { cva as b } from "class-variance-authority";
|
|
5
|
+
import { Icon as v } from "./icon.js";
|
|
6
|
+
const x = b(
|
|
7
|
+
"animate-spin",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xs: "h-3 w-3",
|
|
12
|
+
s: "h-4 w-4",
|
|
13
|
+
m: "h-5 w-5",
|
|
14
|
+
l: "h-6 w-6",
|
|
15
|
+
xl: "h-8 w-8",
|
|
16
|
+
"2xl": "h-10 w-10"
|
|
17
|
+
},
|
|
18
|
+
variant: {
|
|
19
|
+
default: "text-[var(--color-text-primary)]",
|
|
20
|
+
primary: "text-[var(--color-text-brand-bold)]",
|
|
21
|
+
secondary: "text-[var(--color-text-secondary)]",
|
|
22
|
+
tertiary: "text-[var(--color-text-tertiary)]",
|
|
23
|
+
inverse: "text-[var(--color-text-on-action)]",
|
|
24
|
+
success: "text-[var(--color-text-success-bold)]",
|
|
25
|
+
warning: "text-[var(--color-text-warning-bold)]",
|
|
26
|
+
error: "text-[var(--color-text-error-bold)]",
|
|
27
|
+
disabled: "text-[var(--color-text-disabled)]"
|
|
28
|
+
},
|
|
29
|
+
speed: {
|
|
30
|
+
slow: "animate-[spin_2s_linear_infinite]",
|
|
31
|
+
normal: "animate-spin",
|
|
32
|
+
fast: "animate-[spin_0.5s_linear_infinite]"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
defaultVariants: {
|
|
36
|
+
size: "m",
|
|
37
|
+
variant: "default",
|
|
38
|
+
speed: "normal"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
), p = /* @__PURE__ */ d.forwardRef(
|
|
42
|
+
({
|
|
43
|
+
className: o,
|
|
44
|
+
size: r,
|
|
45
|
+
variant: e,
|
|
46
|
+
speed: s,
|
|
47
|
+
label: a,
|
|
48
|
+
showLabel: n = !1,
|
|
49
|
+
loadingText: t = "Loading...",
|
|
50
|
+
...i
|
|
51
|
+
}, u) => /* @__PURE__ */ f(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: u,
|
|
55
|
+
className: c("inline-flex items-center gap-2", o),
|
|
56
|
+
role: "status",
|
|
57
|
+
"aria-label": a || t,
|
|
58
|
+
...i,
|
|
59
|
+
children: [
|
|
60
|
+
/* @__PURE__ */ l(
|
|
61
|
+
v,
|
|
62
|
+
{
|
|
63
|
+
name: "loader-2",
|
|
64
|
+
className: c(x({ size: r, variant: e, speed: s }))
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
n && /* @__PURE__ */ l("span", { className: "text-body-sm text-[var(--color-text-secondary)]", children: a || t }),
|
|
68
|
+
/* @__PURE__ */ l("span", { className: "sr-only", children: a || t })
|
|
69
|
+
]
|
|
70
|
+
}
|
|
71
|
+
)
|
|
72
|
+
);
|
|
73
|
+
p.displayName = "Spinner";
|
|
74
|
+
const y = /* @__PURE__ */ d.forwardRef(
|
|
75
|
+
({
|
|
76
|
+
className: o,
|
|
77
|
+
visible: r,
|
|
78
|
+
message: e = "Loading...",
|
|
79
|
+
spinnerSize: s = "l",
|
|
80
|
+
opacity: a = "medium",
|
|
81
|
+
children: n,
|
|
82
|
+
...t
|
|
83
|
+
}, i) => {
|
|
84
|
+
if (!r) return null;
|
|
85
|
+
const u = {
|
|
86
|
+
light: "bg-[var(--color-surface-primary)]/60",
|
|
87
|
+
medium: "bg-[var(--color-surface-primary)]/80",
|
|
88
|
+
heavy: "bg-[var(--color-surface-primary)]/95"
|
|
89
|
+
}[a];
|
|
90
|
+
return /* @__PURE__ */ f(
|
|
91
|
+
"div",
|
|
92
|
+
{
|
|
93
|
+
ref: i,
|
|
94
|
+
className: c(
|
|
95
|
+
"absolute inset-0 z-50 flex flex-col items-center justify-center",
|
|
96
|
+
u,
|
|
97
|
+
o
|
|
98
|
+
),
|
|
99
|
+
...t,
|
|
100
|
+
children: [
|
|
101
|
+
/* @__PURE__ */ l(p, { size: s, variant: "primary" }),
|
|
102
|
+
/* @__PURE__ */ l("p", { className: "mt-3 text-body-sm text-[var(--color-text-secondary)]", children: e }),
|
|
103
|
+
n
|
|
104
|
+
]
|
|
105
|
+
}
|
|
106
|
+
);
|
|
107
|
+
}
|
|
108
|
+
);
|
|
109
|
+
y.displayName = "LoadingOverlay";
|
|
110
|
+
const g = /* @__PURE__ */ d.forwardRef(
|
|
111
|
+
({
|
|
112
|
+
className: o,
|
|
113
|
+
width: r,
|
|
114
|
+
height: e = "1rem",
|
|
115
|
+
radius: s = "m",
|
|
116
|
+
animate: a = !0,
|
|
117
|
+
...n
|
|
118
|
+
}, t) => {
|
|
119
|
+
const i = {
|
|
120
|
+
none: "rounded-none",
|
|
121
|
+
s: "rounded-s",
|
|
122
|
+
m: "rounded",
|
|
123
|
+
l: "rounded-l",
|
|
124
|
+
full: "rounded-full"
|
|
125
|
+
}[s];
|
|
126
|
+
return /* @__PURE__ */ l(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
ref: t,
|
|
130
|
+
className: c(
|
|
131
|
+
"bg-[var(--color-background-neutral-subtlest)]",
|
|
132
|
+
i,
|
|
133
|
+
a && "animate-pulse",
|
|
134
|
+
o
|
|
135
|
+
),
|
|
136
|
+
style: {
|
|
137
|
+
width: typeof r == "number" ? `${r}px` : r,
|
|
138
|
+
height: typeof e == "number" ? `${e}px` : e
|
|
139
|
+
},
|
|
140
|
+
"aria-hidden": "true",
|
|
141
|
+
...n
|
|
142
|
+
}
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
);
|
|
146
|
+
g.displayName = "Skeleton";
|
|
147
|
+
const w = /* @__PURE__ */ d.forwardRef(
|
|
148
|
+
({
|
|
149
|
+
className: o,
|
|
150
|
+
variant: r = "primary",
|
|
151
|
+
size: e = "m",
|
|
152
|
+
...s
|
|
153
|
+
}, a) => {
|
|
154
|
+
const n = {
|
|
155
|
+
default: "bg-[var(--color-background-neutral-default)]",
|
|
156
|
+
primary: "bg-[var(--color-background-blue-bold)]",
|
|
157
|
+
success: "bg-[var(--color-background-success-subtle)]",
|
|
158
|
+
warning: "bg-[var(--color-background-warning-subtle)]",
|
|
159
|
+
error: "bg-[var(--color-background-error-subtle)]"
|
|
160
|
+
}[r], t = {
|
|
161
|
+
s: "h-2 w-2",
|
|
162
|
+
m: "h-3 w-3",
|
|
163
|
+
l: "h-4 w-4"
|
|
164
|
+
}[e];
|
|
165
|
+
return /* @__PURE__ */ l(
|
|
166
|
+
"div",
|
|
167
|
+
{
|
|
168
|
+
ref: a,
|
|
169
|
+
className: c(
|
|
170
|
+
"rounded-full animate-pulse",
|
|
171
|
+
n,
|
|
172
|
+
t,
|
|
173
|
+
o
|
|
174
|
+
),
|
|
175
|
+
...s
|
|
176
|
+
}
|
|
177
|
+
);
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
w.displayName = "Pulse";
|
|
181
|
+
const h = /* @__PURE__ */ d.forwardRef(
|
|
182
|
+
({
|
|
183
|
+
className: o,
|
|
184
|
+
total: r,
|
|
185
|
+
current: e,
|
|
186
|
+
size: s = "m",
|
|
187
|
+
animate: a = !0,
|
|
188
|
+
...n
|
|
189
|
+
}, t) => {
|
|
190
|
+
const i = {
|
|
191
|
+
s: "h-1.5 w-1.5",
|
|
192
|
+
m: "h-2 w-2",
|
|
193
|
+
l: "h-3 w-3"
|
|
194
|
+
}[s];
|
|
195
|
+
return /* @__PURE__ */ l(
|
|
196
|
+
"div",
|
|
197
|
+
{
|
|
198
|
+
ref: t,
|
|
199
|
+
className: c("flex items-center gap-2", o),
|
|
200
|
+
...n,
|
|
201
|
+
children: Array.from({ length: r }, (u, m) => /* @__PURE__ */ l(
|
|
202
|
+
"div",
|
|
203
|
+
{
|
|
204
|
+
className: c(
|
|
205
|
+
"rounded-full transition-colors duration-200",
|
|
206
|
+
i,
|
|
207
|
+
m === e ? "bg-[var(--color-background-blue-bold)]" : "bg-[var(--color-background-neutral-subtlest)]",
|
|
208
|
+
a && "transition-all duration-300"
|
|
209
|
+
)
|
|
210
|
+
},
|
|
211
|
+
m
|
|
212
|
+
))
|
|
213
|
+
}
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
);
|
|
217
|
+
h.displayName = "ProgressDots";
|
|
218
|
+
export {
|
|
219
|
+
y as LoadingOverlay,
|
|
220
|
+
h as ProgressDots,
|
|
221
|
+
w as Pulse,
|
|
222
|
+
g as Skeleton,
|
|
223
|
+
p as Spinner,
|
|
224
|
+
x as spinnerVariants
|
|
225
|
+
};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as e from "@radix-ui/react-switch";
|
|
4
|
+
import { cn as a } from "../../lib/utils.js";
|
|
5
|
+
const c = /* @__PURE__ */ i.forwardRef(({ className: s, ...o }, r) => /* @__PURE__ */ t(
|
|
6
|
+
e.Root,
|
|
7
|
+
{
|
|
8
|
+
className: a(
|
|
9
|
+
"peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full p-[2px] transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[#669fb6] focus-visible:ring-offset-2 focus-visible:ring-offset-[var(--color-surface-primary)] disabled:cursor-not-allowed data-[state=checked]:bg-[#005f85] data-[state=unchecked]:bg-[#c0c3c9] hover:data-[state=checked]:bg-[#004764] hover:data-[state=unchecked]:bg-[#9fa5ac] disabled:data-[state=checked]:bg-[#ccdfe7] disabled:data-[state=unchecked]:bg-[rgba(85,95,109,0.1)]",
|
|
10
|
+
s
|
|
11
|
+
),
|
|
12
|
+
...o,
|
|
13
|
+
ref: r,
|
|
14
|
+
children: /* @__PURE__ */ t(
|
|
15
|
+
e.Thumb,
|
|
16
|
+
{
|
|
17
|
+
className: a(
|
|
18
|
+
"pointer-events-none block h-4 w-4 rounded-full bg-white shadow-sm ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
)
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
c.displayName = e.Root.displayName;
|
|
25
|
+
export {
|
|
26
|
+
c as Switch
|
|
27
|
+
};
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
import { jsx as a, jsxs as m } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cva as c } from "class-variance-authority";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
const u = c(
|
|
6
|
+
"w-full caption-bottom text-body-sm",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
s: "[&_td:not([data-section-header])]:!text-body-xsm [&_th]:!text-body-strong-xsm [&_td:not([data-section-header])]:!px-3 [&_td:not([data-section-header])]:!py-1 [&_td:not([data-section-header])]:!h-7 [&_th]:!px-3 [&_th]:!py-1 [&_td[data-section-header]]:!p-0 [&_td[data-section-header]]:!h-5",
|
|
11
|
+
m: "[&_td:not([data-section-header])]:!text-body-sm [&_th]:!text-body-strong-sm [&_td:not([data-section-header])]:!px-4 [&_td:not([data-section-header])]:!py-2 [&_td:not([data-section-header])]:!h-9 [&_th]:!px-4 [&_th]:!py-2 [&_td[data-section-header]]:!p-0 [&_td[data-section-header]]:!h-7",
|
|
12
|
+
l: "[&_td:not([data-section-header])]:!text-body-md [&_th]:!text-body-strong-md [&_td:not([data-section-header])]:!px-6 [&_td:not([data-section-header])]:!py-3 [&_td:not([data-section-header])]:!h-11 [&_th]:!px-6 [&_th]:!py-3 [&_td[data-section-header]]:!p-0 [&_td[data-section-header]]:!h-9"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
size: "m"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
), y = c(
|
|
20
|
+
"transition-colors",
|
|
21
|
+
{
|
|
22
|
+
variants: {
|
|
23
|
+
variant: {
|
|
24
|
+
default: "",
|
|
25
|
+
zebra: "",
|
|
26
|
+
selected: "bg-[var(--blue-25)]"
|
|
27
|
+
},
|
|
28
|
+
showBorder: {
|
|
29
|
+
true: "",
|
|
30
|
+
false: ""
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
defaultVariants: {
|
|
34
|
+
variant: "default",
|
|
35
|
+
showBorder: !0
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
), v = c(
|
|
39
|
+
"[&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",
|
|
40
|
+
{
|
|
41
|
+
variants: {
|
|
42
|
+
size: {
|
|
43
|
+
s: "px-3 py-1 h-7 text-body-xsm",
|
|
44
|
+
m: "px-4 py-2 h-9 text-body-sm",
|
|
45
|
+
l: "px-6 py-3 h-11 text-body-md"
|
|
46
|
+
},
|
|
47
|
+
align: {
|
|
48
|
+
left: "text-left",
|
|
49
|
+
center: "text-center",
|
|
50
|
+
right: "text-right"
|
|
51
|
+
},
|
|
52
|
+
verticalAlign: {
|
|
53
|
+
top: "align-top",
|
|
54
|
+
middle: "align-middle",
|
|
55
|
+
bottom: "align-bottom"
|
|
56
|
+
},
|
|
57
|
+
numeric: {
|
|
58
|
+
true: "text-right tabular-nums",
|
|
59
|
+
false: ""
|
|
60
|
+
},
|
|
61
|
+
showBorder: {
|
|
62
|
+
true: "border-r border-[var(--color-border-primary-medium)] last:border-r-0",
|
|
63
|
+
false: ""
|
|
64
|
+
},
|
|
65
|
+
showRowBorder: {
|
|
66
|
+
true: "shadow-[inset_0_-1px_0_0_var(--color-border-primary-medium)]",
|
|
67
|
+
false: ""
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
defaultVariants: {
|
|
71
|
+
size: "m",
|
|
72
|
+
align: "left",
|
|
73
|
+
verticalAlign: "middle",
|
|
74
|
+
numeric: !1,
|
|
75
|
+
showBorder: !0,
|
|
76
|
+
showRowBorder: !1
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
), _ = c(
|
|
80
|
+
"align-middle font-semibold text-[var(--color-text-primary)] [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px] bg-[var(--grey-25)] border-b border-[var(--color-border-primary-medium)]",
|
|
81
|
+
{
|
|
82
|
+
variants: {
|
|
83
|
+
size: {
|
|
84
|
+
s: "px-3 py-1 text-body-strong-xsm",
|
|
85
|
+
m: "px-4 py-2 text-body-strong-sm",
|
|
86
|
+
l: "px-6 py-3 text-body-strong-md"
|
|
87
|
+
},
|
|
88
|
+
align: {
|
|
89
|
+
left: "text-left",
|
|
90
|
+
center: "text-center",
|
|
91
|
+
right: "text-right"
|
|
92
|
+
},
|
|
93
|
+
numeric: {
|
|
94
|
+
true: "text-right tabular-nums",
|
|
95
|
+
false: ""
|
|
96
|
+
},
|
|
97
|
+
showBorder: {
|
|
98
|
+
true: "border-r border-[var(--color-border-primary-medium)] last:border-r-0",
|
|
99
|
+
false: ""
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
defaultVariants: {
|
|
103
|
+
size: "m",
|
|
104
|
+
align: "left",
|
|
105
|
+
numeric: !1,
|
|
106
|
+
showBorder: !0
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
), g = /* @__PURE__ */ d.forwardRef(
|
|
110
|
+
({ className: t, size: e, ...r }, o) => /* @__PURE__ */ a("div", { className: "relative w-full overflow-auto", children: /* @__PURE__ */ a(
|
|
111
|
+
"table",
|
|
112
|
+
{
|
|
113
|
+
ref: o,
|
|
114
|
+
className: s(u({ size: e }), t),
|
|
115
|
+
...r
|
|
116
|
+
}
|
|
117
|
+
) })
|
|
118
|
+
);
|
|
119
|
+
g.displayName = "Table";
|
|
120
|
+
const w = /* @__PURE__ */ d.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
|
|
121
|
+
"thead",
|
|
122
|
+
{
|
|
123
|
+
ref: r,
|
|
124
|
+
className: s(
|
|
125
|
+
"[&_tr]:border-b [&_tr]:border-[var(--color-border-primary-medium)]",
|
|
126
|
+
t
|
|
127
|
+
),
|
|
128
|
+
...e
|
|
129
|
+
}
|
|
130
|
+
));
|
|
131
|
+
w.displayName = "TableHeader";
|
|
132
|
+
const N = /* @__PURE__ */ d.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
|
|
133
|
+
"tbody",
|
|
134
|
+
{
|
|
135
|
+
ref: r,
|
|
136
|
+
className: s("[&_tr:last-child]:border-0", t),
|
|
137
|
+
...e
|
|
138
|
+
}
|
|
139
|
+
));
|
|
140
|
+
N.displayName = "TableBody";
|
|
141
|
+
const T = /* @__PURE__ */ d.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
|
|
142
|
+
"tfoot",
|
|
143
|
+
{
|
|
144
|
+
ref: r,
|
|
145
|
+
className: s(
|
|
146
|
+
"border-t border-[var(--color-border-primary-medium)] bg-[var(--color-background-neutral-subtlest)] font-medium [&>tr]:last:border-b-0",
|
|
147
|
+
t
|
|
148
|
+
),
|
|
149
|
+
...e
|
|
150
|
+
}
|
|
151
|
+
));
|
|
152
|
+
T.displayName = "TableFooter";
|
|
153
|
+
const p = /* @__PURE__ */ d.forwardRef(
|
|
154
|
+
({ className: t, variant: e, zebra: r = !1, zebraIndex: o = 0, showBorder: l = !0, ...n }, i) => {
|
|
155
|
+
const b = r && o % 2 === 1 ? "bg-[var(--color-background-neutral-subtlest)]" : "";
|
|
156
|
+
return /* @__PURE__ */ a(
|
|
157
|
+
"tr",
|
|
158
|
+
{
|
|
159
|
+
ref: i,
|
|
160
|
+
className: s(
|
|
161
|
+
y({ variant: e, showBorder: l }),
|
|
162
|
+
b,
|
|
163
|
+
t
|
|
164
|
+
),
|
|
165
|
+
...n
|
|
166
|
+
}
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
);
|
|
170
|
+
p.displayName = "TableRow";
|
|
171
|
+
const x = /* @__PURE__ */ d.forwardRef(
|
|
172
|
+
({ className: t, size: e, align: r, numeric: o, showBorder: l = !0, ...n }, i) => /* @__PURE__ */ a(
|
|
173
|
+
"th",
|
|
174
|
+
{
|
|
175
|
+
ref: i,
|
|
176
|
+
className: s(_({ size: e, align: r, numeric: o, showBorder: l }), t),
|
|
177
|
+
...n
|
|
178
|
+
}
|
|
179
|
+
)
|
|
180
|
+
);
|
|
181
|
+
x.displayName = "TableHead";
|
|
182
|
+
const h = /* @__PURE__ */ d.forwardRef(
|
|
183
|
+
({ className: t, size: e, align: r, verticalAlign: o, numeric: l, showBorder: n = !0, showRowBorder: i = !1, ...b }, f) => /* @__PURE__ */ a(
|
|
184
|
+
"td",
|
|
185
|
+
{
|
|
186
|
+
ref: f,
|
|
187
|
+
className: s(v({ size: e, align: r, verticalAlign: o, numeric: l, showBorder: n, showRowBorder: i }), t),
|
|
188
|
+
...b
|
|
189
|
+
}
|
|
190
|
+
)
|
|
191
|
+
);
|
|
192
|
+
h.displayName = "TableCell";
|
|
193
|
+
const R = /* @__PURE__ */ d.forwardRef(({ className: t, ...e }, r) => /* @__PURE__ */ a(
|
|
194
|
+
"caption",
|
|
195
|
+
{
|
|
196
|
+
ref: r,
|
|
197
|
+
className: s("mt-[var(--space-m)] text-body-sm text-[var(--color-text-secondary)]", t),
|
|
198
|
+
...e
|
|
199
|
+
}
|
|
200
|
+
));
|
|
201
|
+
R.displayName = "TableCaption";
|
|
202
|
+
const z = /* @__PURE__ */ d.forwardRef(
|
|
203
|
+
({ className: t, sortable: e = !1, sorted: r = !1, onSort: o, children: l, ...n }, i) => /* @__PURE__ */ a(
|
|
204
|
+
x,
|
|
205
|
+
{
|
|
206
|
+
ref: i,
|
|
207
|
+
className: s(
|
|
208
|
+
e && "cursor-pointer select-none hover:text-[var(--color-text-primary)]",
|
|
209
|
+
t
|
|
210
|
+
),
|
|
211
|
+
onClick: e ? o : void 0,
|
|
212
|
+
...n,
|
|
213
|
+
children: /* @__PURE__ */ m("div", { className: "flex items-center gap-[var(--space-s)]", children: [
|
|
214
|
+
l,
|
|
215
|
+
e && /* @__PURE__ */ m("div", { className: "w-[var(--size-3xs)] h-[var(--size-3xs)] flex items-center justify-center", children: [
|
|
216
|
+
r === "asc" && /* @__PURE__ */ a("div", { className: "w-0 h-0 border-l-[3px] border-r-[3px] border-b-[4px] border-l-transparent border-r-transparent border-b-current" }),
|
|
217
|
+
r === "desc" && /* @__PURE__ */ a("div", { className: "w-0 h-0 border-l-[3px] border-r-[3px] border-t-[4px] border-l-transparent border-r-transparent border-t-current" }),
|
|
218
|
+
!r && /* @__PURE__ */ m("div", { className: "w-[var(--size-3xs)] h-[var(--size-3xs)] opacity-30", children: [
|
|
219
|
+
/* @__PURE__ */ a("div", { className: "w-0 h-0 border-l-[2px] border-r-[2px] border-b-[2px] border-l-transparent border-r-transparent border-b-current mb-[1px]" }),
|
|
220
|
+
/* @__PURE__ */ a("div", { className: "w-0 h-0 border-l-[2px] border-r-[2px] border-t-[2px] border-l-transparent border-r-transparent border-t-current" })
|
|
221
|
+
] })
|
|
222
|
+
] })
|
|
223
|
+
] })
|
|
224
|
+
}
|
|
225
|
+
)
|
|
226
|
+
);
|
|
227
|
+
z.displayName = "TableSortHeader";
|
|
228
|
+
const B = /* @__PURE__ */ d.forwardRef(({ className: t, colSpan: e, children: r, ...o }, l) => /* @__PURE__ */ a(
|
|
229
|
+
p,
|
|
230
|
+
{
|
|
231
|
+
ref: l,
|
|
232
|
+
className: s(
|
|
233
|
+
"bg-[var(--color-background-neutral-subtlest)] hover:bg-[var(--color-background-neutral-subtlest)]",
|
|
234
|
+
t
|
|
235
|
+
),
|
|
236
|
+
...o,
|
|
237
|
+
children: /* @__PURE__ */ a(
|
|
238
|
+
h,
|
|
239
|
+
{
|
|
240
|
+
colSpan: e,
|
|
241
|
+
className: "font-medium text-[var(--color-text-primary)] py-[var(--space-s)]",
|
|
242
|
+
children: r
|
|
243
|
+
}
|
|
244
|
+
)
|
|
245
|
+
}
|
|
246
|
+
));
|
|
247
|
+
B.displayName = "TableGroupHeader";
|
|
248
|
+
export {
|
|
249
|
+
g as Table,
|
|
250
|
+
N as TableBody,
|
|
251
|
+
R as TableCaption,
|
|
252
|
+
h as TableCell,
|
|
253
|
+
T as TableFooter,
|
|
254
|
+
B as TableGroupHeader,
|
|
255
|
+
x as TableHead,
|
|
256
|
+
w as TableHeader,
|
|
257
|
+
p as TableRow,
|
|
258
|
+
z as TableSortHeader,
|
|
259
|
+
v as tableCellVariants,
|
|
260
|
+
_ as tableHeaderVariants,
|
|
261
|
+
y as tableRowVariants,
|
|
262
|
+
u as tableVariants
|
|
263
|
+
};
|