@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,135 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as e from "react";
|
|
3
|
+
import { cva as u } from "class-variance-authority";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
import { Button as l } from "./button.js";
|
|
6
|
+
import { Input as d } from "./input.js";
|
|
7
|
+
import { Textarea as c } from "./textarea.js";
|
|
8
|
+
const v = /* @__PURE__ */ e.forwardRef(
|
|
9
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ o(
|
|
10
|
+
"div",
|
|
11
|
+
{
|
|
12
|
+
ref: t,
|
|
13
|
+
"data-slot": "input-group",
|
|
14
|
+
role: "group",
|
|
15
|
+
className: s(
|
|
16
|
+
"group/input-group relative flex w-full items-center rounded-m border border-[var(--color-interaction-border-input)] bg-[var(--color-interaction-background-input-neutral)] outline-none transition-[color,box-shadow,border-color]",
|
|
17
|
+
// Default height for inputs
|
|
18
|
+
"h-[var(--size-m)] has-[>textarea]:h-auto",
|
|
19
|
+
// Adjust padding when inline addons are present
|
|
20
|
+
"has-[>[data-align=inline-start]]:[&>input]:pl-[var(--space-xs)]",
|
|
21
|
+
"has-[>[data-align=inline-end]]:[&>input]:pr-[var(--space-xs)]",
|
|
22
|
+
// Block alignment for textareas
|
|
23
|
+
"has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>[data-align=block-start]]:[&>textarea]:pb-[var(--space-m)]",
|
|
24
|
+
"has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-end]]:[&>textarea]:pt-[var(--space-m)]",
|
|
25
|
+
// Hover state
|
|
26
|
+
"hover:border-[var(--color-interaction-border-input-hovered)]",
|
|
27
|
+
// Focus state
|
|
28
|
+
"has-[[data-slot=input-group-control]:focus-visible]:border-[#005f85] has-[[data-slot=input-group-control]:focus-visible]:shadow-[0px_0px_0px_2px_rgba(0,95,133,0.2),0px_3px_4px_0px_rgba(0,14,20,0.03)]",
|
|
29
|
+
// Invalid state
|
|
30
|
+
"has-[[data-slot][aria-invalid=true]]:border-[var(--color-border-error-bold)]",
|
|
31
|
+
// Disabled state
|
|
32
|
+
"group-data-[disabled=true]/input-group:opacity-50 group-data-[disabled=true]/input-group:cursor-not-allowed",
|
|
33
|
+
r
|
|
34
|
+
),
|
|
35
|
+
...a
|
|
36
|
+
}
|
|
37
|
+
)
|
|
38
|
+
);
|
|
39
|
+
v.displayName = "InputGroup";
|
|
40
|
+
const b = u(
|
|
41
|
+
"text-[var(--color-text-secondary)] flex h-auto cursor-text select-none items-center justify-center gap-[var(--space-xs)] py-[var(--space-s)] [&]:text-body-sm font-medium group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-xs [&>svg:not([class*='size-'])]:size-[var(--size-s)]",
|
|
42
|
+
{
|
|
43
|
+
variants: {
|
|
44
|
+
align: {
|
|
45
|
+
"inline-start": "order-first pl-[var(--space-s)] has-[>button]:pl-[var(--space-xs)] has-[>.inline-flex]:pl-[var(--space-xs)] has-[>kbd]:ml-[-var(--space-xs)]",
|
|
46
|
+
"inline-end": "order-last pr-[var(--space-s)] has-[>button]:pr-[var(--space-xs)] has-[>.inline-flex]:pr-[var(--space-xs)] has-[>kbd]:mr-[-var(--space-xs)]",
|
|
47
|
+
"block-start": "order-first w-full justify-start px-[var(--space-m)] pt-[var(--space-m)] group-has-[>input]/input-group:pt-[var(--space-s)]",
|
|
48
|
+
"block-end": "order-last w-full justify-start px-[var(--space-m)] pb-[var(--space-m)] group-has-[>input]/input-group:pb-[var(--space-s)]"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
defaultVariants: {
|
|
52
|
+
align: "inline-start"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
), x = /* @__PURE__ */ e.forwardRef(
|
|
56
|
+
({ className: r, align: a = "inline-start", ...t }, n) => /* @__PURE__ */ o(
|
|
57
|
+
"div",
|
|
58
|
+
{
|
|
59
|
+
ref: n,
|
|
60
|
+
role: "group",
|
|
61
|
+
"data-slot": "input-group-addon",
|
|
62
|
+
"data-align": a,
|
|
63
|
+
className: s(b({ align: a }), r),
|
|
64
|
+
onClick: (p) => {
|
|
65
|
+
p.target.closest("button") || p.currentTarget.parentElement?.querySelector("input")?.focus();
|
|
66
|
+
},
|
|
67
|
+
...t
|
|
68
|
+
}
|
|
69
|
+
)
|
|
70
|
+
);
|
|
71
|
+
x.displayName = "InputGroupAddon";
|
|
72
|
+
const f = /* @__PURE__ */ e.forwardRef(({ className: r, type: a = "button", variant: t = "ghost", size: n = "s", ...p }, i) => /* @__PURE__ */ o(
|
|
73
|
+
l,
|
|
74
|
+
{
|
|
75
|
+
ref: i,
|
|
76
|
+
type: a,
|
|
77
|
+
variant: t,
|
|
78
|
+
size: n,
|
|
79
|
+
className: s("shadow-none", r),
|
|
80
|
+
...p
|
|
81
|
+
}
|
|
82
|
+
));
|
|
83
|
+
f.displayName = "InputGroupButton";
|
|
84
|
+
const g = /* @__PURE__ */ e.forwardRef(
|
|
85
|
+
({ className: r, ...a }, t) => /* @__PURE__ */ o(
|
|
86
|
+
"span",
|
|
87
|
+
{
|
|
88
|
+
ref: t,
|
|
89
|
+
className: s(
|
|
90
|
+
"text-[var(--color-text-secondary)] flex items-center gap-[var(--space-xs)] [&]:text-body-sm [&_svg:not([class*='size-'])]:size-[var(--size-s)] [&_svg]:pointer-events-none",
|
|
91
|
+
r
|
|
92
|
+
),
|
|
93
|
+
...a
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
);
|
|
97
|
+
g.displayName = "InputGroupText";
|
|
98
|
+
const m = /* @__PURE__ */ e.forwardRef(
|
|
99
|
+
({ className: r, size: a, ...t }, n) => /* @__PURE__ */ o(
|
|
100
|
+
d,
|
|
101
|
+
{
|
|
102
|
+
ref: n,
|
|
103
|
+
"data-slot": "input-group-control",
|
|
104
|
+
size: a,
|
|
105
|
+
className: s(
|
|
106
|
+
"flex-1 rounded-none border-0 bg-transparent shadow-none focus-visible:ring-0 focus-visible:shadow-none",
|
|
107
|
+
r
|
|
108
|
+
),
|
|
109
|
+
...t
|
|
110
|
+
}
|
|
111
|
+
)
|
|
112
|
+
);
|
|
113
|
+
m.displayName = "InputGroupInput";
|
|
114
|
+
const h = /* @__PURE__ */ e.forwardRef(({ className: r, ...a }, t) => /* @__PURE__ */ o(
|
|
115
|
+
c,
|
|
116
|
+
{
|
|
117
|
+
ref: t,
|
|
118
|
+
"data-slot": "input-group-control",
|
|
119
|
+
className: s(
|
|
120
|
+
"flex-1 resize-none rounded-none border-0 bg-transparent py-[var(--space-m)] shadow-none focus-visible:ring-0 focus-visible:shadow-none",
|
|
121
|
+
r
|
|
122
|
+
),
|
|
123
|
+
...a
|
|
124
|
+
}
|
|
125
|
+
));
|
|
126
|
+
h.displayName = "InputGroupTextarea";
|
|
127
|
+
export {
|
|
128
|
+
v as InputGroup,
|
|
129
|
+
x as InputGroupAddon,
|
|
130
|
+
f as InputGroupButton,
|
|
131
|
+
m as InputGroupInput,
|
|
132
|
+
g as InputGroupText,
|
|
133
|
+
h as InputGroupTextarea,
|
|
134
|
+
b as inputGroupAddonVariants
|
|
135
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { jsxs as d, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as v from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { cn as c } from "../../lib/utils.js";
|
|
5
|
+
import { Icon as b } from "./icon.js";
|
|
6
|
+
const n = m(
|
|
7
|
+
"flex w-full rounded-m border transition-colors file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-[var(--color-text-tertiary)] focus-visible:outline-none focus-visible:shadow-[0px_0px_0px_2px_rgba(0,95,133,0.2),0px_3px_4px_0px_rgba(0,14,20,0.03)] disabled:cursor-not-allowed disabled:opacity-50",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: [
|
|
12
|
+
"bg-[var(--color-interaction-background-input-neutral)] text-[var(--color-text-primary)]",
|
|
13
|
+
"border-[var(--color-interaction-border-input)]",
|
|
14
|
+
"hover:border-[var(--color-interaction-border-input-hovered)]",
|
|
15
|
+
"focus-visible:border-[#005f85]"
|
|
16
|
+
],
|
|
17
|
+
error: [
|
|
18
|
+
"bg-[var(--color-interaction-background-input-neutral)] text-[var(--color-text-primary)]",
|
|
19
|
+
"border-[var(--color-border-error-bold)]",
|
|
20
|
+
"focus-visible:border-[var(--color-border-error-bold)]"
|
|
21
|
+
]
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
s: "h-[var(--size-s)] px-[var(--space-s)] py-[var(--space-xs)] text-body-sm",
|
|
25
|
+
m: "h-[var(--size-m)] px-[var(--space-m)] py-[var(--space-s)] text-body-md",
|
|
26
|
+
l: "h-[var(--size-l)] px-[var(--space-l)] py-[var(--space-m)] text-body-md"
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
variant: "default",
|
|
31
|
+
size: "m"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
), u = /* @__PURE__ */ v.forwardRef(
|
|
35
|
+
({ className: o, variant: t, size: r, type: e = "text", ...s }, i) => {
|
|
36
|
+
if (e === "search") {
|
|
37
|
+
const l = r === "s" ? "s" : "m", p = r === "s" ? "pl-[calc(var(--space-m)+var(--size-3xs)+var(--space-s))]" : "pl-[calc(var(--space-m)+var(--size-2xs)+var(--space-s))]";
|
|
38
|
+
return /* @__PURE__ */ d("div", { className: "relative", children: [
|
|
39
|
+
/* @__PURE__ */ a(
|
|
40
|
+
b,
|
|
41
|
+
{
|
|
42
|
+
name: "search",
|
|
43
|
+
size: l,
|
|
44
|
+
color: "tertiary",
|
|
45
|
+
className: "absolute left-[var(--space-m)] top-1/2 -translate-y-1/2 pointer-events-none"
|
|
46
|
+
}
|
|
47
|
+
),
|
|
48
|
+
/* @__PURE__ */ a(
|
|
49
|
+
"input",
|
|
50
|
+
{
|
|
51
|
+
type: e,
|
|
52
|
+
className: c(
|
|
53
|
+
n({ variant: t, size: r }),
|
|
54
|
+
p,
|
|
55
|
+
o
|
|
56
|
+
),
|
|
57
|
+
ref: i,
|
|
58
|
+
...s
|
|
59
|
+
}
|
|
60
|
+
)
|
|
61
|
+
] });
|
|
62
|
+
}
|
|
63
|
+
return /* @__PURE__ */ a(
|
|
64
|
+
"input",
|
|
65
|
+
{
|
|
66
|
+
type: e,
|
|
67
|
+
className: c(n({ variant: t, size: r }), o),
|
|
68
|
+
ref: i,
|
|
69
|
+
...s
|
|
70
|
+
}
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
);
|
|
74
|
+
u.displayName = "Input";
|
|
75
|
+
export {
|
|
76
|
+
u as Input,
|
|
77
|
+
n as inputVariants
|
|
78
|
+
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { cn as o } from "../../lib/utils.js";
|
|
5
|
+
const d = m(
|
|
6
|
+
"inline-flex items-center justify-center rounded-xs font-mono font-medium transition-colors select-none relative",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
light: [
|
|
11
|
+
"bg-grey-25/50",
|
|
12
|
+
"text-[var(--color-text-secondary)]",
|
|
13
|
+
"border border-[var(--color-border-primary-subtle)]"
|
|
14
|
+
],
|
|
15
|
+
dark: [
|
|
16
|
+
"bg-grey-800/50",
|
|
17
|
+
"text-[var(--grey-200)]",
|
|
18
|
+
"border border-[var(--grey-alpha-400)]"
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
size: {
|
|
22
|
+
s: "px-[var(--space-2xs)] py-[var(--space-null)] min-w-[var(--size-2xs)] [&]:text-body-xsm",
|
|
23
|
+
m: "px-[var(--space-s)] py-[var(--space-2xs)] min-w-[var(--size-m)] [&]:text-body-sm"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
defaultVariants: {
|
|
27
|
+
variant: "light",
|
|
28
|
+
size: "s"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
), p = /* @__PURE__ */ t.forwardRef(
|
|
32
|
+
({ className: r, variant: e, size: a, ...i }, n) => /* @__PURE__ */ s(
|
|
33
|
+
"kbd",
|
|
34
|
+
{
|
|
35
|
+
className: o(d({ variant: e, size: a, className: r })),
|
|
36
|
+
ref: n,
|
|
37
|
+
...i
|
|
38
|
+
}
|
|
39
|
+
)
|
|
40
|
+
);
|
|
41
|
+
p.displayName = "Kbd";
|
|
42
|
+
const c = /* @__PURE__ */ t.forwardRef(
|
|
43
|
+
({ className: r, ...e }, a) => /* @__PURE__ */ s(
|
|
44
|
+
"span",
|
|
45
|
+
{
|
|
46
|
+
className: o("inline-flex items-center gap-[var(--space-xs)]", r),
|
|
47
|
+
ref: a,
|
|
48
|
+
...e
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
);
|
|
52
|
+
c.displayName = "KbdGroup";
|
|
53
|
+
export {
|
|
54
|
+
p as Kbd,
|
|
55
|
+
c as KbdGroup,
|
|
56
|
+
d as kbdVariants
|
|
57
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { jsx as r, jsxs as a } from "react/jsx-runtime";
|
|
2
|
+
import * as d from "react";
|
|
3
|
+
import { cva as m } from "class-variance-authority";
|
|
4
|
+
import { cn as p } from "../../lib/utils.js";
|
|
5
|
+
import { Icon as x } from "./icon.js";
|
|
6
|
+
import { TooltipProvider as b, Tooltip as h, TooltipTrigger as f, TooltipContent as y } from "./tooltip.js";
|
|
7
|
+
const u = m(
|
|
8
|
+
"cursor-pointer peer-disabled:cursor-not-allowed peer-disabled:opacity-70",
|
|
9
|
+
{
|
|
10
|
+
variants: {
|
|
11
|
+
size: {
|
|
12
|
+
s: "[&]:text-body-sm",
|
|
13
|
+
m: "[&]:text-body-md"
|
|
14
|
+
},
|
|
15
|
+
color: {
|
|
16
|
+
primary: "text-[var(--color-text-primary)]",
|
|
17
|
+
secondary: "text-[var(--color-text-tertiary)]"
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
defaultVariants: {
|
|
21
|
+
size: "m",
|
|
22
|
+
color: "primary"
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
), v = /* @__PURE__ */ d.forwardRef(
|
|
26
|
+
({ className: o, children: l, required: t, info: e, size: i, color: s, ...n }, c) => /* @__PURE__ */ r(
|
|
27
|
+
"label",
|
|
28
|
+
{
|
|
29
|
+
ref: c,
|
|
30
|
+
className: p(u({ size: i, color: s }), o),
|
|
31
|
+
...n,
|
|
32
|
+
children: /* @__PURE__ */ a("span", { className: "inline-flex items-center gap-[var(--space-xs)]", children: [
|
|
33
|
+
l,
|
|
34
|
+
t && /* @__PURE__ */ r("span", { className: "text-[var(--color-text-error-bold)]", "aria-label": "required", children: "*" }),
|
|
35
|
+
e && /* @__PURE__ */ r(b, { children: /* @__PURE__ */ a(h, { children: [
|
|
36
|
+
/* @__PURE__ */ r(f, { asChild: !0, children: /* @__PURE__ */ r("span", { className: "inline-flex cursor-help", children: /* @__PURE__ */ r(
|
|
37
|
+
x,
|
|
38
|
+
{
|
|
39
|
+
name: "info",
|
|
40
|
+
size: "s",
|
|
41
|
+
color: "secondary",
|
|
42
|
+
"aria-label": e
|
|
43
|
+
}
|
|
44
|
+
) }) }),
|
|
45
|
+
/* @__PURE__ */ r(y, { children: /* @__PURE__ */ r("p", { children: e }) })
|
|
46
|
+
] }) })
|
|
47
|
+
] })
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
);
|
|
51
|
+
v.displayName = "Label";
|
|
52
|
+
export {
|
|
53
|
+
v as Label
|
|
54
|
+
};
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
import { jsx as d, jsxs as T } from "react/jsx-runtime";
|
|
2
|
+
import p from "react";
|
|
3
|
+
import { cva as L } from "class-variance-authority";
|
|
4
|
+
import { cn as u } from "../../lib/utils.js";
|
|
5
|
+
import { Button as k } from "./button.js";
|
|
6
|
+
import { Icon as w } from "./icon.js";
|
|
7
|
+
L("", {
|
|
8
|
+
variants: {
|
|
9
|
+
size: {
|
|
10
|
+
default: "",
|
|
11
|
+
small: ""
|
|
12
|
+
}
|
|
13
|
+
},
|
|
14
|
+
defaultVariants: {
|
|
15
|
+
size: "default"
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
const O = {
|
|
19
|
+
default: {
|
|
20
|
+
container: "gap-[var(--space-m)]",
|
|
21
|
+
navButton: "h-[var(--size-m)] w-[var(--size-m)]",
|
|
22
|
+
navIcon: "h-[var(--size-xs)] w-[var(--size-xs)]",
|
|
23
|
+
yearGridGap: "gap-[var(--space-m)]",
|
|
24
|
+
yearSectionGap: "gap-[var(--space-s)]",
|
|
25
|
+
yearHeader: "text-label-sm",
|
|
26
|
+
monthGridGap: "gap-[var(--space-xs)]",
|
|
27
|
+
monthButton: "px-[var(--space-xs)] py-[var(--space-s)] text-body-sm",
|
|
28
|
+
monthBorderRadius: "rounded-m"
|
|
29
|
+
},
|
|
30
|
+
small: {
|
|
31
|
+
container: "gap-[var(--space-s)]",
|
|
32
|
+
navButton: "h-[var(--size-s)] w-[var(--size-s)]",
|
|
33
|
+
navIcon: "h-4 w-4",
|
|
34
|
+
yearGridGap: "gap-[var(--space-s)]",
|
|
35
|
+
yearSectionGap: "gap-[var(--space-xs)]",
|
|
36
|
+
yearHeader: "[&]:text-caption-medium-sm [&]:font-medium py-[var(--space-s)]",
|
|
37
|
+
monthGridGap: "gap-1",
|
|
38
|
+
monthButton: "px-1 py-[var(--space-xs)] [&]:text-caption-sm",
|
|
39
|
+
monthBorderRadius: "rounded-s"
|
|
40
|
+
}
|
|
41
|
+
}, n = (r) => new Date(r.getFullYear(), r.getMonth(), 1), Q = (r) => r.toLocaleDateString("en-US", { month: "short" }), W = (r) => Array.from({ length: 12 }, (a, o) => new Date(r, o, 1)), X = (r, a, o, l) => {
|
|
42
|
+
const f = n(r);
|
|
43
|
+
if (a) {
|
|
44
|
+
const i = n(a);
|
|
45
|
+
if (f < i) return !0;
|
|
46
|
+
}
|
|
47
|
+
if (o) {
|
|
48
|
+
const i = n(o);
|
|
49
|
+
if (f > i) return !0;
|
|
50
|
+
}
|
|
51
|
+
if (l && l.length > 0) {
|
|
52
|
+
const i = f.getTime();
|
|
53
|
+
for (const g of l)
|
|
54
|
+
if (n(g).getTime() === i)
|
|
55
|
+
return !0;
|
|
56
|
+
}
|
|
57
|
+
return !1;
|
|
58
|
+
}, B = (r, a, o) => {
|
|
59
|
+
if (!a) return !1;
|
|
60
|
+
const l = n(r).getTime(), f = n(a).getTime();
|
|
61
|
+
if (!o)
|
|
62
|
+
return l > f;
|
|
63
|
+
const i = n(o).getTime();
|
|
64
|
+
return l > f && l < i;
|
|
65
|
+
}, v = (r, a) => !r || !a ? !1 : n(r).getTime() === n(a).getTime(), Z = /* @__PURE__ */ p.forwardRef(
|
|
66
|
+
({
|
|
67
|
+
value: r,
|
|
68
|
+
onChange: a,
|
|
69
|
+
mode: o,
|
|
70
|
+
size: l = "default",
|
|
71
|
+
yearCount: f,
|
|
72
|
+
startYear: i,
|
|
73
|
+
minDate: g,
|
|
74
|
+
maxDate: Y,
|
|
75
|
+
disabledDates: I,
|
|
76
|
+
className: R,
|
|
77
|
+
monthLabelFormat: S,
|
|
78
|
+
yearLabelFormat: b,
|
|
79
|
+
enableNavigation: h = !1,
|
|
80
|
+
onYearNavigate: G
|
|
81
|
+
}, C) => {
|
|
82
|
+
const [c, M] = p.useState(null), [z, x] = p.useState(null), [y, N] = p.useState(
|
|
83
|
+
i || (/* @__PURE__ */ new Date()).getFullYear()
|
|
84
|
+
), s = O[l], A = f ?? (o === "single" ? 1 : 2), H = h ? y : i || (/* @__PURE__ */ new Date()).getFullYear(), D = Array.from({ length: A }, (e, t) => H + t), _ = () => {
|
|
85
|
+
const e = y - 1;
|
|
86
|
+
N(e), G?.(e);
|
|
87
|
+
}, E = () => {
|
|
88
|
+
const e = y + 1;
|
|
89
|
+
N(e), G?.(e);
|
|
90
|
+
}, P = (e) => {
|
|
91
|
+
if (o === "single") {
|
|
92
|
+
a(n(e));
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
if (!c)
|
|
96
|
+
M(n(e));
|
|
97
|
+
else {
|
|
98
|
+
const t = c < e ? c : e, m = c < e ? e : c;
|
|
99
|
+
a([n(t), n(m)]), M(null), x(null);
|
|
100
|
+
}
|
|
101
|
+
}, j = (e) => c || !r ? !1 : Array.isArray(r) ? v(e, r[0]) || v(e, r[1]) : v(e, r), q = (e) => {
|
|
102
|
+
if (c || !r || !Array.isArray(r)) return !1;
|
|
103
|
+
const [t, m] = r;
|
|
104
|
+
return B(e, t, m);
|
|
105
|
+
}, F = (e) => !c || !z ? !1 : B(e, c, z);
|
|
106
|
+
return /* @__PURE__ */ d("div", { ref: C, className: u("flex flex-col", s.container, R), children: /* @__PURE__ */ T("div", { className: u("flex items-center", s.yearGridGap), children: [
|
|
107
|
+
h && /* @__PURE__ */ d(
|
|
108
|
+
k,
|
|
109
|
+
{
|
|
110
|
+
variant: "default",
|
|
111
|
+
size: "s",
|
|
112
|
+
onClick: _,
|
|
113
|
+
className: u(s.navButton, "p-0 shrink-0"),
|
|
114
|
+
children: /* @__PURE__ */ d(w, { name: "chevron-left", className: s.navIcon })
|
|
115
|
+
}
|
|
116
|
+
),
|
|
117
|
+
/* @__PURE__ */ d("div", { className: u("flex flex-1", s.yearGridGap), children: D.map((e) => /* @__PURE__ */ T("div", { className: u("flex-1 flex flex-col", s.yearSectionGap), children: [
|
|
118
|
+
/* @__PURE__ */ d("div", { className: u(s.yearHeader, "text-[var(--color-text-primary)] text-center"), children: b ? b(e) : e }),
|
|
119
|
+
/* @__PURE__ */ d("div", { className: u("grid grid-cols-3", s.monthGridGap), children: W(e).map((t) => {
|
|
120
|
+
const m = X(t, g, Y, I), U = j(t), V = q(t), J = F(t), K = v(t, c);
|
|
121
|
+
return /* @__PURE__ */ d(
|
|
122
|
+
"button",
|
|
123
|
+
{
|
|
124
|
+
onClick: () => !m && P(t),
|
|
125
|
+
onMouseEnter: () => !m && x(t),
|
|
126
|
+
onMouseLeave: () => x(null),
|
|
127
|
+
disabled: m,
|
|
128
|
+
className: u(
|
|
129
|
+
"transition-colors",
|
|
130
|
+
s.monthBorderRadius,
|
|
131
|
+
s.monthButton,
|
|
132
|
+
"bg-[var(--color-background-neutral-subtle)] text-[var(--color-text-primary)]",
|
|
133
|
+
"hover:bg-[var(--color-background-neutral-hovered)]",
|
|
134
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)]",
|
|
135
|
+
"disabled:opacity-50 disabled:cursor-not-allowed",
|
|
136
|
+
(V || J) && "bg-[var(--color-background-blue-subtle)] text-[var(--color-text-primary)]",
|
|
137
|
+
(U || K) && "!bg-[var(--color-background-blue-bold)] !text-[var(--color-text-on-action)]"
|
|
138
|
+
),
|
|
139
|
+
children: S ? S(t) : Q(t)
|
|
140
|
+
},
|
|
141
|
+
t.getTime()
|
|
142
|
+
);
|
|
143
|
+
}) })
|
|
144
|
+
] }, e)) }),
|
|
145
|
+
h && /* @__PURE__ */ d(
|
|
146
|
+
k,
|
|
147
|
+
{
|
|
148
|
+
variant: "default",
|
|
149
|
+
size: "s",
|
|
150
|
+
onClick: E,
|
|
151
|
+
className: u(s.navButton, "p-0 shrink-0"),
|
|
152
|
+
children: /* @__PURE__ */ d(w, { name: "chevron-right", className: s.navIcon })
|
|
153
|
+
}
|
|
154
|
+
)
|
|
155
|
+
] }) });
|
|
156
|
+
}
|
|
157
|
+
);
|
|
158
|
+
Z.displayName = "MonthPicker";
|
|
159
|
+
export {
|
|
160
|
+
Z as MonthPicker
|
|
161
|
+
};
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
import { jsxs as n, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as L from "react";
|
|
3
|
+
import { cn as h } from "../../lib/utils.js";
|
|
4
|
+
import { Button as l } from "./button.js";
|
|
5
|
+
import { ButtonGroup as I } from "./button-group.js";
|
|
6
|
+
import { Icon as r } from "./icon.js";
|
|
7
|
+
import { DropdownMenu as $, DropdownMenuTrigger as j, DropdownMenuContent as B, DropdownMenuLabel as E, DropdownMenuItem as F } from "./dropdown-menu.js";
|
|
8
|
+
const y = /* @__PURE__ */ L.forwardRef(
|
|
9
|
+
({
|
|
10
|
+
className: w,
|
|
11
|
+
variant: p = "default",
|
|
12
|
+
currentPage: s,
|
|
13
|
+
totalItems: i,
|
|
14
|
+
pageSize: o,
|
|
15
|
+
onPageChange: t,
|
|
16
|
+
onPageSizeChange: u,
|
|
17
|
+
pageSizeOptions: f = [10, 25, 50, 100],
|
|
18
|
+
onNextPageHover: M,
|
|
19
|
+
onPreviousPageHover: v,
|
|
20
|
+
...N
|
|
21
|
+
}, x) => {
|
|
22
|
+
const c = Math.ceil(i / o), b = (s - 1) * o + 1, g = Math.min(s * o, i), D = () => t(1), R = () => t(Math.max(1, s - 1)), k = () => t(Math.min(c, s + 1)), T = () => t(c), m = s === 1, d = s === c || i === 0, C = (e) => {
|
|
23
|
+
const G = (s - 1) * o + 1, q = Math.ceil(G / e);
|
|
24
|
+
u(e), t(Math.max(1, q));
|
|
25
|
+
};
|
|
26
|
+
return /* @__PURE__ */ n(
|
|
27
|
+
"div",
|
|
28
|
+
{
|
|
29
|
+
ref: x,
|
|
30
|
+
className: h("flex items-center gap-[var(--space-s)]", w),
|
|
31
|
+
...N,
|
|
32
|
+
children: [
|
|
33
|
+
/* @__PURE__ */ n(I, { size: "s", children: [
|
|
34
|
+
p === "full" && /* @__PURE__ */ a(
|
|
35
|
+
l,
|
|
36
|
+
{
|
|
37
|
+
onClick: D,
|
|
38
|
+
disabled: m,
|
|
39
|
+
"aria-label": "Go to first page",
|
|
40
|
+
className: "px-[var(--space-s)] aspect-square",
|
|
41
|
+
children: /* @__PURE__ */ a(r, { name: "arrow-left-to-line", className: "w-4 h-4" })
|
|
42
|
+
}
|
|
43
|
+
),
|
|
44
|
+
/* @__PURE__ */ a(
|
|
45
|
+
l,
|
|
46
|
+
{
|
|
47
|
+
onClick: R,
|
|
48
|
+
disabled: m,
|
|
49
|
+
"aria-label": "Go to previous page",
|
|
50
|
+
className: "px-[var(--space-s)] aspect-square",
|
|
51
|
+
onMouseEnter: m ? void 0 : v,
|
|
52
|
+
children: /* @__PURE__ */ a(r, { name: "arrow-left", className: "w-4 h-4" })
|
|
53
|
+
}
|
|
54
|
+
),
|
|
55
|
+
/* @__PURE__ */ a(
|
|
56
|
+
l,
|
|
57
|
+
{
|
|
58
|
+
onClick: k,
|
|
59
|
+
disabled: d,
|
|
60
|
+
"aria-label": "Go to next page",
|
|
61
|
+
className: "px-[var(--space-s)] aspect-square",
|
|
62
|
+
onMouseEnter: d ? void 0 : M,
|
|
63
|
+
children: /* @__PURE__ */ a(r, { name: "arrow-right", className: "w-4 h-4" })
|
|
64
|
+
}
|
|
65
|
+
),
|
|
66
|
+
p === "full" && /* @__PURE__ */ a(
|
|
67
|
+
l,
|
|
68
|
+
{
|
|
69
|
+
onClick: T,
|
|
70
|
+
disabled: d,
|
|
71
|
+
"aria-label": "Go to last page",
|
|
72
|
+
className: "px-[var(--space-s)] aspect-square",
|
|
73
|
+
children: /* @__PURE__ */ a(r, { name: "arrow-right-to-line", className: "w-4 h-4" })
|
|
74
|
+
}
|
|
75
|
+
)
|
|
76
|
+
] }),
|
|
77
|
+
/* @__PURE__ */ n($, { children: [
|
|
78
|
+
/* @__PURE__ */ a(j, { asChild: !0, children: /* @__PURE__ */ n(l, { variant: "ghost", size: "s", className: "gap-1 min-w-0", children: [
|
|
79
|
+
/* @__PURE__ */ a("span", { className: "whitespace-nowrap", children: i === 0 ? "0 of 0" : `${b}-${g} of ${i}` }),
|
|
80
|
+
/* @__PURE__ */ a(r, { name: "chevron-down", className: "w-4 h-4" })
|
|
81
|
+
] }) }),
|
|
82
|
+
/* @__PURE__ */ n(B, { align: "end", className: "min-w-[80px]", children: [
|
|
83
|
+
/* @__PURE__ */ a(E, { children: "Items per page" }),
|
|
84
|
+
f.map((e) => /* @__PURE__ */ n(
|
|
85
|
+
F,
|
|
86
|
+
{
|
|
87
|
+
onClick: () => C(e),
|
|
88
|
+
className: h(
|
|
89
|
+
"cursor-pointer",
|
|
90
|
+
e === o && "font-medium"
|
|
91
|
+
),
|
|
92
|
+
children: [
|
|
93
|
+
e,
|
|
94
|
+
e === o && /* @__PURE__ */ a(r, { name: "check", className: "w-4 h-4 ml-auto text-[var(--color-icon-brand-bold)]" })
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
e
|
|
98
|
+
))
|
|
99
|
+
] })
|
|
100
|
+
] })
|
|
101
|
+
]
|
|
102
|
+
}
|
|
103
|
+
);
|
|
104
|
+
}
|
|
105
|
+
);
|
|
106
|
+
y.displayName = "Pagination";
|
|
107
|
+
export {
|
|
108
|
+
y as Pagination
|
|
109
|
+
};
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-popover";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
const c = o.Root, f = o.Trigger, v = o.Anchor, m = /* @__PURE__ */ n.forwardRef(({ className: e, align: r = "center", sideOffset: a = 4, ...i }, d) => /* @__PURE__ */ t(o.Portal, { children: /* @__PURE__ */ t(
|
|
6
|
+
o.Content,
|
|
7
|
+
{
|
|
8
|
+
ref: d,
|
|
9
|
+
align: r,
|
|
10
|
+
sideOffset: a,
|
|
11
|
+
className: s(
|
|
12
|
+
"z-50 w-[var(--radix-popover-trigger-width)] min-w-[16rem] overflow-hidden rounded-l border border-[var(--color-border-divider)] bg-[var(--color-surface-primary)] p-[var(--space-2xl)] text-[var(--color-text-primary)] shadow-xl outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",
|
|
13
|
+
e
|
|
14
|
+
),
|
|
15
|
+
...i
|
|
16
|
+
}
|
|
17
|
+
) }));
|
|
18
|
+
m.displayName = o.Content.displayName;
|
|
19
|
+
export {
|
|
20
|
+
c as Popover,
|
|
21
|
+
v as PopoverAnchor,
|
|
22
|
+
m as PopoverContent,
|
|
23
|
+
f as PopoverTrigger
|
|
24
|
+
};
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { jsxs as f, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import * as g from "react";
|
|
3
|
+
import * as o from "@radix-ui/react-progress";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
import { cva as l } from "class-variance-authority";
|
|
6
|
+
const v = l(
|
|
7
|
+
"relative h-2 w-full rounded-full border border-[var(--color-border-primary-medium)] bg-white p-px",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
variant: {
|
|
11
|
+
default: "bg-[var(--color-background-neutral-subtlest)]",
|
|
12
|
+
success: "bg-[var(--color-background-success-subtle)]",
|
|
13
|
+
warning: "bg-[var(--color-background-warning-subtle)]",
|
|
14
|
+
error: "bg-[var(--color-background-error-subtle)]"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
s: "h-1",
|
|
18
|
+
m: "h-2",
|
|
19
|
+
l: "h-3"
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
defaultVariants: {
|
|
23
|
+
variant: "default",
|
|
24
|
+
size: "m"
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
), p = l(
|
|
28
|
+
"h-full w-full flex-1 transition-all duration-300 ease-in-out rounded-full",
|
|
29
|
+
{
|
|
30
|
+
variants: {
|
|
31
|
+
variant: {
|
|
32
|
+
default: "bg-[var(--color-background-blue-bold)]",
|
|
33
|
+
success: "bg-[var(--green-500)]",
|
|
34
|
+
warning: "bg-[var(--orange-500)]",
|
|
35
|
+
error: "bg-[var(--red-500)]"
|
|
36
|
+
}
|
|
37
|
+
},
|
|
38
|
+
defaultVariants: {
|
|
39
|
+
variant: "default"
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
), h = /* @__PURE__ */ g.forwardRef(({ className: n, value: r, variant: e, size: i, showLabel: d, formatLabel: t, ...c }, u) => {
|
|
43
|
+
const b = (m) => `${Math.round(m)}%`;
|
|
44
|
+
return /* @__PURE__ */ f("div", { className: "w-full", children: [
|
|
45
|
+
/* @__PURE__ */ a("div", { className: s(v({ variant: e, size: i, className: n })), children: /* @__PURE__ */ a(
|
|
46
|
+
o.Root,
|
|
47
|
+
{
|
|
48
|
+
ref: u,
|
|
49
|
+
className: "relative h-full w-full overflow-hidden rounded-full bg-[var(--color-background-neutral-subtlest)]",
|
|
50
|
+
...c,
|
|
51
|
+
children: /* @__PURE__ */ a(
|
|
52
|
+
o.Indicator,
|
|
53
|
+
{
|
|
54
|
+
className: s(p({ variant: e })),
|
|
55
|
+
style: { transform: `translateX(-${100 - (r || 0)}%)` }
|
|
56
|
+
}
|
|
57
|
+
)
|
|
58
|
+
}
|
|
59
|
+
) }),
|
|
60
|
+
d && r !== void 0 && r !== null && /* @__PURE__ */ a("div", { className: "mt-1 text-caption-sm text-[var(--color-text-secondary)]", children: t ? t(r) : b(r) })
|
|
61
|
+
] });
|
|
62
|
+
});
|
|
63
|
+
h.displayName = o.Root.displayName;
|
|
64
|
+
export {
|
|
65
|
+
h as Progress
|
|
66
|
+
};
|