@rafal.lemieszewski/tide-ui 0.83.0 → 0.84.2
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/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/index.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/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 +205 -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/index.js +37 -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 +2459 -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 +388 -0
- package/dist/es/lib/utils.js +8 -0
- package/dist/es/style.css +1 -0
- package/dist/{components → types/components}/fundamental/button-group.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/button.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/command.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/file-upload.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/form-field.d.ts +1 -1
- 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/{components → types/components}/fundamental/sidebar.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/{components → types/components}/product/bookmarks.d.ts +1 -1
- package/dist/{components → types/components}/product/fixture-status.d.ts +1 -1
- package/dist/{components → types/components}/product/linked-chart.d.ts +1 -1
- package/dist/types/lib/index.d.cts +3 -0
- package/dist/types/lib/index.d.ts +3 -0
- package/package.json +111 -33
- 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/avatar.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/badge.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 → types/components}/fundamental/calendar.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/card.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/chart.d.ts +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 → types/components}/fundamental/country-dropdown.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/custom-icons.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/date-picker.d.ts +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/resizable.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/spinner.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/switch.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/table.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 → types/components}/product/data-table.d.ts +0 -0
- /package/dist/{components → types/components}/product/filters.d.ts +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,142 @@
|
|
|
1
|
+
import { jsx as e, jsxs as i } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { Slot as x } from "@radix-ui/react-slot";
|
|
4
|
+
import { ChevronDown as h, Check as y, ArrowRight as N } from "lucide-react";
|
|
5
|
+
import { cn as s } from "../../lib/utils.js";
|
|
6
|
+
import { Popover as g, PopoverTrigger as B, PopoverContent as w } from "./popover.js";
|
|
7
|
+
import { Command as C, CommandInput as P, CommandList as R, CommandEmpty as k, CommandGroup as S, CommandItem as L } from "./command.js";
|
|
8
|
+
const z = t.forwardRef(({ ...r }, a) => /* @__PURE__ */ e("nav", { ref: a, "aria-label": "breadcrumb", ...r }));
|
|
9
|
+
z.displayName = "Breadcrumb";
|
|
10
|
+
const I = t.forwardRef(({ className: r, ...a }, o) => /* @__PURE__ */ e(
|
|
11
|
+
"ol",
|
|
12
|
+
{
|
|
13
|
+
ref: o,
|
|
14
|
+
className: s(
|
|
15
|
+
"[&]:text-body-md flex flex-wrap items-center gap-[var(--space-s)] text-[var(--color-text-secondary)]",
|
|
16
|
+
r
|
|
17
|
+
),
|
|
18
|
+
...a
|
|
19
|
+
}
|
|
20
|
+
));
|
|
21
|
+
I.displayName = "BreadcrumbList";
|
|
22
|
+
const j = t.forwardRef(({ className: r, ...a }, o) => /* @__PURE__ */ e(
|
|
23
|
+
"li",
|
|
24
|
+
{
|
|
25
|
+
ref: o,
|
|
26
|
+
className: s("inline-flex items-center gap-[var(--space-s)]", r),
|
|
27
|
+
...a
|
|
28
|
+
}
|
|
29
|
+
));
|
|
30
|
+
j.displayName = "BreadcrumbItem";
|
|
31
|
+
const O = t.forwardRef(({ asChild: r, className: a, ...o }, c) => /* @__PURE__ */ e(
|
|
32
|
+
r ? x : "a",
|
|
33
|
+
{
|
|
34
|
+
ref: c,
|
|
35
|
+
className: s(
|
|
36
|
+
"rounded-xs cursor-pointer underline-offset-2 transition-colors hover:text-[var(--color-text-primary)] hover:underline focus:ring-2 focus:ring-[var(--color-border-focused)] focus:ring-offset-2 focus:outline-none",
|
|
37
|
+
a
|
|
38
|
+
),
|
|
39
|
+
...o
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
O.displayName = "BreadcrumbLink";
|
|
43
|
+
const A = t.forwardRef(({ className: r, ...a }, o) => /* @__PURE__ */ e(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
ref: o,
|
|
47
|
+
role: "link",
|
|
48
|
+
"aria-disabled": "true",
|
|
49
|
+
"aria-current": "page",
|
|
50
|
+
className: s(
|
|
51
|
+
"!text-body-medium-md text-[var(--color-text-primary)]",
|
|
52
|
+
r
|
|
53
|
+
),
|
|
54
|
+
...a
|
|
55
|
+
}
|
|
56
|
+
));
|
|
57
|
+
A.displayName = "BreadcrumbPage";
|
|
58
|
+
const D = t.forwardRef(
|
|
59
|
+
({
|
|
60
|
+
children: r,
|
|
61
|
+
className: a,
|
|
62
|
+
siblings: o,
|
|
63
|
+
value: c,
|
|
64
|
+
onSelect: m,
|
|
65
|
+
searchPlaceholder: d = "Search...",
|
|
66
|
+
emptyMessage: u = "No items found.",
|
|
67
|
+
...p
|
|
68
|
+
}, f) => {
|
|
69
|
+
const [v, l] = t.useState(!1);
|
|
70
|
+
return /* @__PURE__ */ i(g, { open: v, onOpenChange: l, children: [
|
|
71
|
+
/* @__PURE__ */ e(B, { asChild: !0, children: /* @__PURE__ */ i(
|
|
72
|
+
"button",
|
|
73
|
+
{
|
|
74
|
+
ref: f,
|
|
75
|
+
"aria-current": "page",
|
|
76
|
+
className: s(
|
|
77
|
+
"!text-body-medium-md inline-flex cursor-pointer items-center gap-[var(--space-xs)] text-[var(--color-text-primary)] underline-offset-2 transition-colors hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--color-border-focused)] focus-visible:ring-offset-2",
|
|
78
|
+
a
|
|
79
|
+
),
|
|
80
|
+
...p,
|
|
81
|
+
children: [
|
|
82
|
+
r,
|
|
83
|
+
/* @__PURE__ */ e(h, { className: "h-[var(--size-3xs)] w-[var(--size-3xs)] shrink-0 text-[var(--color-icon-tertiary)]" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
) }),
|
|
87
|
+
/* @__PURE__ */ e(w, { align: "start", className: "min-w-[16rem] p-0", children: /* @__PURE__ */ i(C, { children: [
|
|
88
|
+
/* @__PURE__ */ e(P, { placeholder: d }),
|
|
89
|
+
/* @__PURE__ */ i(R, { children: [
|
|
90
|
+
/* @__PURE__ */ e(k, { children: u }),
|
|
91
|
+
/* @__PURE__ */ e(S, { children: o.map((n) => /* @__PURE__ */ i(
|
|
92
|
+
L,
|
|
93
|
+
{
|
|
94
|
+
value: n.value,
|
|
95
|
+
onSelect: (b) => {
|
|
96
|
+
m(b), l(!1);
|
|
97
|
+
},
|
|
98
|
+
children: [
|
|
99
|
+
n.label,
|
|
100
|
+
/* @__PURE__ */ e(
|
|
101
|
+
y,
|
|
102
|
+
{
|
|
103
|
+
className: s(
|
|
104
|
+
"ml-auto h-4 w-4 text-[var(--color-icon-brand-bold)]",
|
|
105
|
+
c === n.value ? "opacity-100" : "opacity-0"
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
)
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
n.value
|
|
112
|
+
)) })
|
|
113
|
+
] })
|
|
114
|
+
] }) })
|
|
115
|
+
] });
|
|
116
|
+
}
|
|
117
|
+
);
|
|
118
|
+
D.displayName = "BreadcrumbPagePicker";
|
|
119
|
+
const E = ({
|
|
120
|
+
children: r,
|
|
121
|
+
className: a,
|
|
122
|
+
...o
|
|
123
|
+
}) => /* @__PURE__ */ e(
|
|
124
|
+
"li",
|
|
125
|
+
{
|
|
126
|
+
role: "presentation",
|
|
127
|
+
"aria-hidden": "true",
|
|
128
|
+
className: s("text-[var(--color-text-tertiary)]", a),
|
|
129
|
+
...o,
|
|
130
|
+
children: r ?? /* @__PURE__ */ e(N, { className: "h-[var(--size-3xs)] w-[var(--size-3xs)]" })
|
|
131
|
+
}
|
|
132
|
+
);
|
|
133
|
+
E.displayName = "BreadcrumbSeparator";
|
|
134
|
+
export {
|
|
135
|
+
z as Breadcrumb,
|
|
136
|
+
j as BreadcrumbItem,
|
|
137
|
+
O as BreadcrumbLink,
|
|
138
|
+
I as BreadcrumbList,
|
|
139
|
+
A as BreadcrumbPage,
|
|
140
|
+
D as BreadcrumbPagePicker,
|
|
141
|
+
E as BreadcrumbSeparator
|
|
142
|
+
};
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { cn as i } from "../../lib/utils.js";
|
|
5
|
+
import { Separator as v } from "./separator.js";
|
|
6
|
+
const f = m(
|
|
7
|
+
"flex w-fit items-stretch has-[>[data-slot=button-group]]:gap-[var(--space-xs)] [&>*]:focus-visible:relative [&>*]:focus-visible:z-10",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
orientation: {
|
|
11
|
+
horizontal: "[&>*:not(:first-child)]:rounded-l-none [&>*:not(:first-child)]:border-l-0 [&>*:not(:last-child)]:rounded-r-none",
|
|
12
|
+
vertical: "flex-col [&>*:not(:first-child)]:rounded-t-none [&>*:not(:first-child)]:border-t-0 [&>*:not(:last-child)]:rounded-b-none"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
defaultVariants: {
|
|
16
|
+
orientation: "horizontal"
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
), b = t.forwardRef(
|
|
20
|
+
({ className: o, orientation: e, size: r, variant: a, children: l, ...u }, p) => {
|
|
21
|
+
const c = t.Children.map(l, (s) => {
|
|
22
|
+
if (t.isValidElement(s)) {
|
|
23
|
+
const n = s.props;
|
|
24
|
+
return n?.["data-slot"] && n["data-slot"] !== "button" ? s : t.cloneElement(s, {
|
|
25
|
+
size: n.size || r,
|
|
26
|
+
variant: n.variant || a
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
return s;
|
|
30
|
+
});
|
|
31
|
+
return /* @__PURE__ */ d(
|
|
32
|
+
"div",
|
|
33
|
+
{
|
|
34
|
+
ref: p,
|
|
35
|
+
role: "group",
|
|
36
|
+
"data-slot": "button-group",
|
|
37
|
+
"data-orientation": e,
|
|
38
|
+
className: i(f({ orientation: e }), o),
|
|
39
|
+
...u,
|
|
40
|
+
children: c
|
|
41
|
+
}
|
|
42
|
+
);
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
b.displayName = "ButtonGroup";
|
|
46
|
+
const x = t.forwardRef(
|
|
47
|
+
({ className: o, asChild: e = !1, children: r, ...a }, l) => e && t.isValidElement(r) ? t.cloneElement(r, {
|
|
48
|
+
className: i(
|
|
49
|
+
"bg-[var(--color-background-neutral-subtlest)] shadow-xs flex items-center gap-[var(--space-xs)] rounded-m border border-[var(--color-border-primary-subtle)] px-[var(--space-l)] [&]:text-body-sm font-medium [&_svg:not([class*='size-'])]:size-[var(--size-s)] [&_svg]:pointer-events-none",
|
|
50
|
+
r.props.className,
|
|
51
|
+
o
|
|
52
|
+
)
|
|
53
|
+
}) : /* @__PURE__ */ d(
|
|
54
|
+
"div",
|
|
55
|
+
{
|
|
56
|
+
ref: l,
|
|
57
|
+
className: i(
|
|
58
|
+
"bg-[var(--color-background-neutral-subtlest)] shadow-xs flex items-center gap-[var(--space-xs)] rounded-m border border-[var(--color-border-primary-subtle)] px-[var(--space-l)] [&]:text-body-sm font-medium [&_svg:not([class*='size-'])]:size-[var(--size-s)] [&_svg]:pointer-events-none",
|
|
59
|
+
o
|
|
60
|
+
),
|
|
61
|
+
...a,
|
|
62
|
+
children: r
|
|
63
|
+
}
|
|
64
|
+
)
|
|
65
|
+
);
|
|
66
|
+
x.displayName = "ButtonGroupText";
|
|
67
|
+
const g = t.forwardRef(({ className: o, orientation: e = "vertical", ...r }, a) => /* @__PURE__ */ d(
|
|
68
|
+
v,
|
|
69
|
+
{
|
|
70
|
+
ref: a,
|
|
71
|
+
"data-slot": "button-group-separator",
|
|
72
|
+
orientation: e,
|
|
73
|
+
className: i(
|
|
74
|
+
"bg-[var(--color-border-input)] relative !m-0 self-stretch data-[orientation=vertical]:h-auto",
|
|
75
|
+
o
|
|
76
|
+
),
|
|
77
|
+
...r
|
|
78
|
+
}
|
|
79
|
+
));
|
|
80
|
+
g.displayName = "ButtonGroupSeparator";
|
|
81
|
+
export {
|
|
82
|
+
b as ButtonGroup,
|
|
83
|
+
g as ButtonGroupSeparator,
|
|
84
|
+
x as ButtonGroupText,
|
|
85
|
+
f as buttonGroupVariants
|
|
86
|
+
};
|
|
@@ -0,0 +1,186 @@
|
|
|
1
|
+
import { jsxs as P, jsx as c } from "react/jsx-runtime";
|
|
2
|
+
import N from "react";
|
|
3
|
+
import { cva as j } from "class-variance-authority";
|
|
4
|
+
import { cn as I } from "../../lib/utils.js";
|
|
5
|
+
import { Icon as d } from "./icon.js";
|
|
6
|
+
const V = j(
|
|
7
|
+
"inline-flex items-center justify-center relative transition-all duration-150 ease-in-out focus:outline-none cursor-pointer select-none disabled:cursor-not-allowed gap-[var(--space-xs)] whitespace-nowrap",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: [
|
|
12
|
+
"bg-[var(--color-background-neutral-subtlest)] text-[var(--color-text-primary)]",
|
|
13
|
+
"border border-[var(--color-border-action-outline)]",
|
|
14
|
+
"enabled:hover:bg-[var(--color-background-neutral-subtlest-hovered)] enabled:hover:border-[var(--color-border-action-outline-hovered)] enabled:hover:shadow-sm",
|
|
15
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
16
|
+
"enabled:active:bg-[var(--grey-alpha-50)] enabled:active:translate-y-px enabled:active:shadow-xs",
|
|
17
|
+
"disabled:bg-[var(--color-background-disabled)] disabled:[&]:text-[var(--color-text-disabled)] disabled:border-[var(--color-border-action-outline)]"
|
|
18
|
+
],
|
|
19
|
+
secondary: [
|
|
20
|
+
"bg-[var(--color-background-neutral-subtlest)] text-[var(--color-text-primary)]",
|
|
21
|
+
"border border-[var(--color-border-action-outline)]",
|
|
22
|
+
"enabled:hover:bg-[var(--color-background-neutral-subtlest-hovered)] enabled:hover:border-[var(--color-border-action-outline-hovered)] enabled:hover:shadow-sm",
|
|
23
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
24
|
+
"enabled:active:bg-[var(--grey-alpha-50)] enabled:active:translate-y-px enabled:active:shadow-xs",
|
|
25
|
+
"disabled:bg-[var(--color-background-disabled)] disabled:[&]:text-[var(--color-text-disabled)] disabled:border-[var(--color-border-action-outline)]"
|
|
26
|
+
],
|
|
27
|
+
primary: [
|
|
28
|
+
"bg-[var(--color-background-blue-bold)] [&]:text-[var(--color-text-on-action)]",
|
|
29
|
+
"border-none",
|
|
30
|
+
"enabled:hover:bg-[var(--color-background-blue-bold-hovered)] enabled:hover:shadow-sm",
|
|
31
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
32
|
+
"enabled:active:bg-[var(--blue-700)] enabled:active:translate-y-px enabled:active:shadow-xs",
|
|
33
|
+
"disabled:bg-[var(--color-background-disabled)] disabled:[&]:text-[var(--color-text-disabled)]"
|
|
34
|
+
],
|
|
35
|
+
destructive: [
|
|
36
|
+
"bg-[var(--color-background-error-bold)] [&]:text-[var(--color-text-on-action)]",
|
|
37
|
+
"border-none",
|
|
38
|
+
"enabled:hover:bg-[var(--color-background-error-bold-hovered)] enabled:hover:shadow-sm",
|
|
39
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
40
|
+
"enabled:active:bg-[var(--red-700)] enabled:active:translate-y-px enabled:active:shadow-xs",
|
|
41
|
+
"disabled:bg-[var(--color-background-disabled)] disabled:[&]:text-[var(--color-text-disabled)]"
|
|
42
|
+
],
|
|
43
|
+
success: [
|
|
44
|
+
"bg-[var(--color-background-success-bold)] [&]:text-[var(--color-text-on-action)]",
|
|
45
|
+
"border-none",
|
|
46
|
+
"enabled:hover:bg-[var(--color-background-success-bold-hovered)] enabled:hover:shadow-sm",
|
|
47
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
48
|
+
"enabled:active:bg-[var(--green-700)] enabled:active:translate-y-px enabled:active:shadow-xs",
|
|
49
|
+
"disabled:bg-[var(--color-background-disabled)] disabled:[&]:text-[var(--color-text-disabled)]"
|
|
50
|
+
],
|
|
51
|
+
ghost: [
|
|
52
|
+
"bg-transparent text-[var(--color-text-primary)]",
|
|
53
|
+
"border-none",
|
|
54
|
+
"enabled:hover:bg-[var(--color-background-neutral-hovered)]",
|
|
55
|
+
"focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
56
|
+
"enabled:active:bg-[var(--grey-alpha-100)] enabled:active:translate-y-px",
|
|
57
|
+
"disabled:bg-[var(--color-background-neutral-subtlest)] disabled:[&]:text-[var(--color-text-disabled)]"
|
|
58
|
+
]
|
|
59
|
+
},
|
|
60
|
+
size: {
|
|
61
|
+
s: [
|
|
62
|
+
"text-label-sm h-[var(--size-s)] rounded-s px-[var(--space-m)]"
|
|
63
|
+
],
|
|
64
|
+
m: [
|
|
65
|
+
"text-label-md h-[var(--size-m)] rounded-s px-[var(--space-m)]"
|
|
66
|
+
],
|
|
67
|
+
l: [
|
|
68
|
+
"text-label-md h-[var(--size-l)] rounded-s px-[var(--space-l)]"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
iconPosition: {
|
|
72
|
+
none: "",
|
|
73
|
+
left: "",
|
|
74
|
+
right: "",
|
|
75
|
+
only: ""
|
|
76
|
+
}
|
|
77
|
+
},
|
|
78
|
+
compoundVariants: [
|
|
79
|
+
// Icon padding adjustments for different sizes
|
|
80
|
+
{
|
|
81
|
+
size: "s",
|
|
82
|
+
iconPosition: "left",
|
|
83
|
+
className: "pl-[var(--space-s)] pr-[var(--space-m)]"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
size: "s",
|
|
87
|
+
iconPosition: "right",
|
|
88
|
+
className: "pl-[var(--space-m)] pr-[var(--space-s)]"
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
size: "s",
|
|
92
|
+
iconPosition: "only",
|
|
93
|
+
className: "px-[var(--space-s)] min-w-[var(--size-s)]"
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
size: "m",
|
|
97
|
+
iconPosition: "left",
|
|
98
|
+
className: "pl-[var(--space-s)] pr-[var(--space-m)]"
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
size: "m",
|
|
102
|
+
iconPosition: "right",
|
|
103
|
+
className: "pl-[var(--space-m)] pr-[var(--space-s)]"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
size: "m",
|
|
107
|
+
iconPosition: "only",
|
|
108
|
+
className: "px-[var(--space-s)] min-w-[var(--size-m)]"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
size: "l",
|
|
112
|
+
iconPosition: "left",
|
|
113
|
+
className: "pl-[var(--space-m)] pr-[var(--space-l)]"
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
size: "l",
|
|
117
|
+
iconPosition: "right",
|
|
118
|
+
className: "pl-[var(--space-l)] pr-[var(--space-m)]"
|
|
119
|
+
},
|
|
120
|
+
{
|
|
121
|
+
size: "l",
|
|
122
|
+
iconPosition: "only",
|
|
123
|
+
className: "px-[var(--space-m)] min-w-[var(--size-l)]"
|
|
124
|
+
}
|
|
125
|
+
],
|
|
126
|
+
defaultVariants: {
|
|
127
|
+
variant: "default",
|
|
128
|
+
size: "m",
|
|
129
|
+
iconPosition: "none"
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
), B = N.forwardRef(
|
|
133
|
+
({
|
|
134
|
+
className: u,
|
|
135
|
+
variant: o,
|
|
136
|
+
size: b,
|
|
137
|
+
children: s,
|
|
138
|
+
icon: a,
|
|
139
|
+
iconPosition: p,
|
|
140
|
+
dropdown: i = !1,
|
|
141
|
+
dropdownOpen: g = !1,
|
|
142
|
+
disabled: m = !1,
|
|
143
|
+
loading: e = !1,
|
|
144
|
+
type: f = "button",
|
|
145
|
+
...x
|
|
146
|
+
}, h) => {
|
|
147
|
+
const l = b || "m", v = m || e, n = v ? "disabled" : o === "primary" || o === "destructive" || o === "success" ? "inverse" : "primary", y = () => e ? /* @__PURE__ */ c(d, { name: "loader-2", size: l, color: n, className: "animate-spin" }) : null, t = () => e ? y() : a ? /* @__PURE__ */ c(d, { name: a, size: l, color: n }) : null, z = () => i ? /* @__PURE__ */ c(d, { name: "chevron-down", size: l, color: n }) : null, r = a && s ? p : a || e ? "only" : e && s ? "left" : "none", w = i ? {
|
|
148
|
+
"aria-haspopup": "menu",
|
|
149
|
+
"aria-expanded": g
|
|
150
|
+
} : {}, k = e ? {
|
|
151
|
+
"aria-busy": !0,
|
|
152
|
+
"aria-disabled": !0
|
|
153
|
+
} : {};
|
|
154
|
+
return /* @__PURE__ */ P(
|
|
155
|
+
"button",
|
|
156
|
+
{
|
|
157
|
+
type: f,
|
|
158
|
+
className: I(
|
|
159
|
+
V({
|
|
160
|
+
variant: o,
|
|
161
|
+
size: b,
|
|
162
|
+
iconPosition: r,
|
|
163
|
+
className: u
|
|
164
|
+
})
|
|
165
|
+
),
|
|
166
|
+
ref: h,
|
|
167
|
+
disabled: v,
|
|
168
|
+
...w,
|
|
169
|
+
...k,
|
|
170
|
+
...x,
|
|
171
|
+
children: [
|
|
172
|
+
r === "left" && t(),
|
|
173
|
+
r !== "only" && s,
|
|
174
|
+
r === "right" && t(),
|
|
175
|
+
r === "only" && t(),
|
|
176
|
+
i && z()
|
|
177
|
+
]
|
|
178
|
+
}
|
|
179
|
+
);
|
|
180
|
+
}
|
|
181
|
+
);
|
|
182
|
+
B.displayName = "Button";
|
|
183
|
+
export {
|
|
184
|
+
B as Button,
|
|
185
|
+
V as buttonVariants
|
|
186
|
+
};
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
import { jsx as x } from "react/jsx-runtime";
|
|
2
|
+
import * as y from "react";
|
|
3
|
+
import { DayPicker as I } from "react-day-picker";
|
|
4
|
+
import { cn as m } from "../../lib/utils.js";
|
|
5
|
+
import { Icon as P } from "./icon.js";
|
|
6
|
+
function H(i) {
|
|
7
|
+
const {
|
|
8
|
+
className: h,
|
|
9
|
+
classNames: w,
|
|
10
|
+
showOutsideDays: _ = !0,
|
|
11
|
+
mode: n,
|
|
12
|
+
...k
|
|
13
|
+
} = i, o = "selected" in i ? i.selected : void 0, s = "onSelect" in i ? i.onSelect : void 0, [r, v] = y.useState(null), [g, b] = y.useState(null), f = (e, t) => e.toDateString() === t.toDateString(), p = (e, t, c) => {
|
|
14
|
+
const u = e.getTime(), a = t.getTime(), d = c.getTime(), [E, M] = a < d ? [a, d] : [d, a];
|
|
15
|
+
return u > E && u < M;
|
|
16
|
+
}, S = (e, t) => {
|
|
17
|
+
if (!t.disabled && n === "range")
|
|
18
|
+
if (!r)
|
|
19
|
+
v(e);
|
|
20
|
+
else if (f(e, r))
|
|
21
|
+
s && s({ from: r, to: r }), v(null), b(null);
|
|
22
|
+
else {
|
|
23
|
+
const [c, u] = [r, e].sort((a, d) => a.getTime() - d.getTime());
|
|
24
|
+
s && s({ from: c, to: u }), v(null), b(null);
|
|
25
|
+
}
|
|
26
|
+
}, z = (e, t) => {
|
|
27
|
+
n === "range" && r && !t.disabled && b(e);
|
|
28
|
+
}, D = () => {
|
|
29
|
+
n === "range" && b(null);
|
|
30
|
+
}, R = (e) => !r || !g ? !1 : p(e, r, g), C = (e) => r ? f(e, r) : !1, T = (e) => {
|
|
31
|
+
if (r || n !== "range" || !o || typeof o > "u") return !1;
|
|
32
|
+
const t = o;
|
|
33
|
+
return t.from ? f(e, t.from) : !1;
|
|
34
|
+
}, N = (e) => {
|
|
35
|
+
if (r || n !== "range" || !o || typeof o > "u") return !1;
|
|
36
|
+
const t = o;
|
|
37
|
+
return t.to ? f(e, t.to) : !1;
|
|
38
|
+
}, j = (e) => {
|
|
39
|
+
if (r || n !== "range" || !o || typeof o > "u") return !1;
|
|
40
|
+
const t = o;
|
|
41
|
+
return !t.from || !t.to ? !1 : p(e, t.from, t.to);
|
|
42
|
+
}, l = {
|
|
43
|
+
showOutsideDays: _,
|
|
44
|
+
className: m(
|
|
45
|
+
// relative for nav positioning; padding creates space around entire calendar including buttons
|
|
46
|
+
"relative",
|
|
47
|
+
"py-[var(--space-m)] px-[var(--space-s)]",
|
|
48
|
+
h
|
|
49
|
+
),
|
|
50
|
+
onDayMouseEnter: z,
|
|
51
|
+
onDayMouseLeave: D,
|
|
52
|
+
modifiers: {
|
|
53
|
+
rangeStart: C,
|
|
54
|
+
rangePreview: R,
|
|
55
|
+
confirmedRangeStart: T,
|
|
56
|
+
confirmedRangeEnd: N,
|
|
57
|
+
inConfirmedRange: j
|
|
58
|
+
},
|
|
59
|
+
classNames: {
|
|
60
|
+
// months: no 'relative' so nav positions to root; horizontal margin creates space for side buttons
|
|
61
|
+
months: "flex flex-col sm:flex-row sm:gap-[var(--space-l)] mx-[calc(var(--size-m)+var(--space-s))]",
|
|
62
|
+
month: "space-y-[var(--space-l)]",
|
|
63
|
+
month_caption: "flex justify-center pt-[var(--space-xs)] relative items-center",
|
|
64
|
+
caption_label: "text-body-medium-md text-[var(--color-text-primary)]",
|
|
65
|
+
// nav: fills root, flexbox positions buttons at left/right edges, vertically centered
|
|
66
|
+
nav: "absolute inset-0 flex justify-between items-center px-[var(--space-s)] pointer-events-none z-10",
|
|
67
|
+
button_previous: m(
|
|
68
|
+
"pointer-events-auto",
|
|
69
|
+
"inline-flex items-center justify-center rounded-m",
|
|
70
|
+
"w-[var(--size-m)] h-[var(--size-m)] p-0",
|
|
71
|
+
"bg-[var(--color-background-neutral-subtlest)] text-[var(--color-text-primary)]",
|
|
72
|
+
"border border-[var(--color-border-action-outline)]",
|
|
73
|
+
"hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:border-[var(--color-border-action-outline-hovered)] hover:shadow-sm",
|
|
74
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
75
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
76
|
+
),
|
|
77
|
+
button_next: m(
|
|
78
|
+
"pointer-events-auto",
|
|
79
|
+
"inline-flex items-center justify-center rounded-m",
|
|
80
|
+
"w-[var(--size-m)] h-[var(--size-m)] p-0",
|
|
81
|
+
"bg-[var(--color-background-neutral-subtlest)] text-[var(--color-text-primary)]",
|
|
82
|
+
"border border-[var(--color-border-action-outline)]",
|
|
83
|
+
"hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:border-[var(--color-border-action-outline-hovered)] hover:shadow-sm",
|
|
84
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-2",
|
|
85
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
86
|
+
),
|
|
87
|
+
month_grid: "w-full border-collapse space-y-[var(--space-xs)]",
|
|
88
|
+
weekdays: "flex",
|
|
89
|
+
weekday: "text-[var(--color-text-tertiary)] rounded-m w-[var(--size-m)] font-normal text-caption-medium-sm",
|
|
90
|
+
week: "flex w-full mt-[var(--space-s)]",
|
|
91
|
+
day: "h-[var(--size-m)] w-[var(--size-m)] text-center text-body-sm p-0 relative focus-within:relative focus-within:z-20",
|
|
92
|
+
day_button: m(
|
|
93
|
+
"inline-flex items-center justify-center rounded-m",
|
|
94
|
+
"w-[var(--size-m)] h-[var(--size-m)] p-0",
|
|
95
|
+
"text-body-sm font-normal text-[var(--color-text-primary)]",
|
|
96
|
+
"hover:bg-[var(--color-background-neutral-subtlest-hovered)]",
|
|
97
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)]",
|
|
98
|
+
"disabled:pointer-events-none disabled:opacity-50"
|
|
99
|
+
),
|
|
100
|
+
range_start: "day-range-start",
|
|
101
|
+
range_end: "day-range-end",
|
|
102
|
+
selected: "!bg-[var(--color-background-blue-bold)] [&_button]:!text-white [&_button]:after:!bg-white rounded-m",
|
|
103
|
+
today: "[&_button]:relative [&_button]:after:content-[''] [&_button]:after:absolute [&_button]:after:bottom-1 [&_button]:after:left-1/2 [&_button]:after:-translate-x-1/2 [&_button]:after:w-1 [&_button]:after:h-1 [&_button]:after:rounded-full [&_button]:after:bg-red-500 font-medium",
|
|
104
|
+
outside: "day-outside text-[var(--color-text-tertiary)] opacity-50 aria-selected:bg-[var(--color-background-blue-subtle)] aria-selected:text-[var(--color-text-tertiary)] aria-selected:opacity-30",
|
|
105
|
+
disabled: "text-[var(--color-text-disabled)] opacity-50",
|
|
106
|
+
range_middle: "bg-[var(--color-background-blue-subtle)] text-[var(--color-text-primary)]",
|
|
107
|
+
hidden: "invisible",
|
|
108
|
+
...w
|
|
109
|
+
},
|
|
110
|
+
modifiersClassNames: {
|
|
111
|
+
rangeStart: "!bg-[var(--color-background-blue-bold)] [&_button]:!text-white [&_button]:after:!bg-white rounded-l-md",
|
|
112
|
+
rangePreview: "bg-[var(--color-background-blue-subtle)] [&_button]:text-[var(--color-text-primary)]",
|
|
113
|
+
confirmedRangeStart: "!bg-[var(--color-background-blue-bold)] [&_button]:!text-white [&_button]:after:!bg-white rounded-l-md",
|
|
114
|
+
confirmedRangeEnd: "!bg-[var(--color-background-blue-bold)] [&_button]:!text-white [&_button]:after:!bg-white rounded-r-md",
|
|
115
|
+
inConfirmedRange: "bg-[var(--color-background-blue-subtle)] [&_button]:text-[var(--color-text-primary)]"
|
|
116
|
+
},
|
|
117
|
+
components: {
|
|
118
|
+
Chevron: ({ orientation: e, ...t }) => {
|
|
119
|
+
const c = e === "left" ? "chevron-left" : "chevron-right", { size: u, ...a } = t;
|
|
120
|
+
return /* @__PURE__ */ x(P, { name: c, size: "s", ...a });
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
...k
|
|
124
|
+
};
|
|
125
|
+
return n === "range" ? l.onDayClick = S : (l.mode = n, l.selected = o, l.onSelect = s), /* @__PURE__ */ x(I, { ...l });
|
|
126
|
+
}
|
|
127
|
+
H.displayName = "Calendar";
|
|
128
|
+
export {
|
|
129
|
+
H as Calendar
|
|
130
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cn as d } from "../../lib/utils.js";
|
|
4
|
+
const s = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
5
|
+
"div",
|
|
6
|
+
{
|
|
7
|
+
ref: e,
|
|
8
|
+
className: d(
|
|
9
|
+
"bg-[var(--color-surface-primary)] border border-[var(--color-border-primary-subtle)] rounded-l text-[var(--color-text-primary)]",
|
|
10
|
+
a
|
|
11
|
+
),
|
|
12
|
+
...r
|
|
13
|
+
}
|
|
14
|
+
));
|
|
15
|
+
s.displayName = "Card";
|
|
16
|
+
const c = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
17
|
+
"div",
|
|
18
|
+
{
|
|
19
|
+
ref: e,
|
|
20
|
+
className: d("flex flex-col space-y-[var(--space-s)] p-[var(--space-l)]", a),
|
|
21
|
+
...r
|
|
22
|
+
}
|
|
23
|
+
));
|
|
24
|
+
c.displayName = "CardHeader";
|
|
25
|
+
const l = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
26
|
+
"h3",
|
|
27
|
+
{
|
|
28
|
+
ref: e,
|
|
29
|
+
className: d("text-heading-md leading-none tracking-tight", a),
|
|
30
|
+
...r
|
|
31
|
+
}
|
|
32
|
+
));
|
|
33
|
+
l.displayName = "CardTitle";
|
|
34
|
+
const i = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
35
|
+
"p",
|
|
36
|
+
{
|
|
37
|
+
ref: e,
|
|
38
|
+
className: d("text-body-sm text-[var(--color-text-secondary)]", a),
|
|
39
|
+
...r
|
|
40
|
+
}
|
|
41
|
+
));
|
|
42
|
+
i.displayName = "CardDescription";
|
|
43
|
+
const p = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
44
|
+
"div",
|
|
45
|
+
{
|
|
46
|
+
ref: e,
|
|
47
|
+
className: d("p-[var(--space-l)] pt-0", a),
|
|
48
|
+
...r
|
|
49
|
+
}
|
|
50
|
+
));
|
|
51
|
+
p.displayName = "CardContent";
|
|
52
|
+
const m = t.forwardRef(({ className: a, ...r }, e) => /* @__PURE__ */ o(
|
|
53
|
+
"div",
|
|
54
|
+
{
|
|
55
|
+
ref: e,
|
|
56
|
+
className: d("flex items-center p-[var(--space-l)] pt-0", a),
|
|
57
|
+
...r
|
|
58
|
+
}
|
|
59
|
+
));
|
|
60
|
+
m.displayName = "CardFooter";
|
|
61
|
+
export {
|
|
62
|
+
s as Card,
|
|
63
|
+
p as CardContent,
|
|
64
|
+
i as CardDescription,
|
|
65
|
+
m as CardFooter,
|
|
66
|
+
c as CardHeader,
|
|
67
|
+
l as CardTitle
|
|
68
|
+
};
|