@rafal.lemieszewski/tide-ui 0.82.1 → 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 +21 -9
- 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/avatar-group.d.ts +5 -5
- package/dist/{components → types/components}/fundamental/avatar.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/badge.d.ts +5 -5
- package/dist/{components → types/components}/fundamental/button-group.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/button.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/command.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/empty.d.ts +4 -4
- package/dist/{components → types/components}/fundamental/file-upload.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/flag.d.ts +10 -10
- 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 +5 -5
- package/dist/{components → types/components}/fundamental/input-group.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/input.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/kbd.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/label.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/progress.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/select.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/sidebar.d.ts +6 -6
- package/dist/{components → types/components}/fundamental/skeleton.d.ts +3 -3
- package/dist/{components → types/components}/fundamental/spinner.d.ts +4 -4
- package/dist/{components → types/components}/fundamental/table.d.ts +3 -3
- package/dist/{components → types/components}/fundamental/tabs.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/tag.d.ts +4 -4
- package/dist/{components → types/components}/fundamental/text-link.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/textarea.d.ts +1 -1
- package/dist/{components → types/components}/fundamental/toggle-group.d.ts +2 -2
- package/dist/{components → types/components}/fundamental/toggle.d.ts +1 -1
- package/dist/{components → types/components}/index.d.ts +134 -128
- package/dist/{components → types/components}/product/activity-log.d.ts +1 -1
- package/dist/{components → types/components}/product/attributes-list.d.ts +3 -3
- package/dist/{components → types/components}/product/bookmarks.d.ts +1 -1
- package/dist/{components → types/components}/product/fixture-status.d.ts +5 -5
- 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 -87763
- 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/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/hover-card.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/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/separator.d.ts +0 -0
- /package/dist/{components → types/components}/fundamental/sheet.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/toast.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,65 @@
|
|
|
1
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { cva as l } from "class-variance-authority";
|
|
4
|
+
import { cn as s } from "../../lib/utils.js";
|
|
5
|
+
const d = l(
|
|
6
|
+
"relative w-full rounded-m border p-[var(--space-l)] [&>svg~*]:pl-[var(--space-3xl)] [&>svg+div]:translate-y-[-2px] [&>svg]:absolute [&>svg]:left-[var(--space-l)] [&>svg]:top-[var(--space-l)] [&>svg]:text-current",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
variant: {
|
|
10
|
+
default: [
|
|
11
|
+
"bg-[var(--color-surface-primary)] text-[var(--color-text-primary)] border-[var(--color-border-primary-subtle)]"
|
|
12
|
+
],
|
|
13
|
+
info: [
|
|
14
|
+
"bg-[var(--color-background-info-subtle)] text-[var(--color-text-primary)] border-[var(--color-border-brand-bold)] [&>svg]:text-[var(--color-text-brand-bold)]"
|
|
15
|
+
],
|
|
16
|
+
success: [
|
|
17
|
+
"bg-[var(--color-background-success-subtle)] text-[var(--color-text-primary)] border-[var(--color-border-success-bold)] [&>svg]:text-[var(--color-text-success-bold)]"
|
|
18
|
+
],
|
|
19
|
+
warning: [
|
|
20
|
+
"bg-[var(--color-background-warning-subtle)] text-[var(--color-text-primary)] border-[var(--color-border-warning-bold)] [&>svg]:text-[var(--color-text-warning-bold)]"
|
|
21
|
+
],
|
|
22
|
+
destructive: [
|
|
23
|
+
"bg-[var(--color-background-error-subtle)] text-[var(--color-text-primary)] border-[var(--color-border-error-bold)] [&>svg]:text-[var(--color-text-error-bold)]"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
defaultVariants: {
|
|
28
|
+
variant: "default"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
), i = l(
|
|
32
|
+
"mb-[var(--space-xs)] [&]:text-body-strong-md text-[var(--color-text-primary)] leading-none tracking-tight"
|
|
33
|
+
), v = l(
|
|
34
|
+
"[&]:text-body-md text-[var(--color-text-secondary)] [&_p]:leading-relaxed"
|
|
35
|
+
), n = a.forwardRef(
|
|
36
|
+
({ className: r, variant: t, ...e }, c) => /* @__PURE__ */ o(
|
|
37
|
+
"div",
|
|
38
|
+
{
|
|
39
|
+
ref: c,
|
|
40
|
+
role: "alert",
|
|
41
|
+
className: s(d({ variant: t }), r),
|
|
42
|
+
...e
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
);
|
|
46
|
+
n.displayName = "Alert";
|
|
47
|
+
const b = a.forwardRef(
|
|
48
|
+
({ className: r, ...t }, e) => /* @__PURE__ */ o("h5", { ref: e, className: s(i(), r), ...t })
|
|
49
|
+
);
|
|
50
|
+
b.displayName = "AlertTitle";
|
|
51
|
+
const x = a.forwardRef(({ className: r, ...t }, e) => /* @__PURE__ */ o(
|
|
52
|
+
"div",
|
|
53
|
+
{
|
|
54
|
+
ref: e,
|
|
55
|
+
className: s(v(), r),
|
|
56
|
+
...t
|
|
57
|
+
}
|
|
58
|
+
));
|
|
59
|
+
x.displayName = "AlertDescription";
|
|
60
|
+
export {
|
|
61
|
+
n as Alert,
|
|
62
|
+
x as AlertDescription,
|
|
63
|
+
b as AlertTitle,
|
|
64
|
+
d as alertVariants
|
|
65
|
+
};
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { jsx as n, jsxs as u } from "react/jsx-runtime";
|
|
2
|
+
import * as m from "react";
|
|
3
|
+
import { Command as y } from "cmdk";
|
|
4
|
+
import { Command as N, CommandList as x, CommandGroup as S, CommandItem as M, CommandEmpty as k } from "./command.js";
|
|
5
|
+
import { Popover as A, PopoverAnchor as O, PopoverContent as $ } from "./popover.js";
|
|
6
|
+
import { Input as D } from "./input.js";
|
|
7
|
+
function E(t, r) {
|
|
8
|
+
if (!t || !r)
|
|
9
|
+
return !1;
|
|
10
|
+
const o = t.toLowerCase(), p = r.toLowerCase();
|
|
11
|
+
return p.includes(o) ? !0 : p.split(" ").some((i) => i.includes(o));
|
|
12
|
+
}
|
|
13
|
+
function j(t, r) {
|
|
14
|
+
if (!t || !r)
|
|
15
|
+
return null;
|
|
16
|
+
const o = t.toLowerCase(), l = r.toLowerCase().indexOf(o);
|
|
17
|
+
if (l !== -1)
|
|
18
|
+
return {
|
|
19
|
+
before: r.substring(0, l),
|
|
20
|
+
match: r.substring(l, l + t.length),
|
|
21
|
+
after: r.substring(l + t.length)
|
|
22
|
+
};
|
|
23
|
+
const i = r.split(" ");
|
|
24
|
+
for (let s = 0; s < i.length; s++) {
|
|
25
|
+
const d = i[s], a = d.toLowerCase().indexOf(o);
|
|
26
|
+
if (a !== -1) {
|
|
27
|
+
const b = i.slice(0, s).join(" ") + (s > 0 ? " " : "") + d.substring(0, a), f = d.substring(a, a + t.length), c = d.substring(a + t.length) + (s < i.length - 1 ? " " : "") + i.slice(s + 1).join(" ");
|
|
28
|
+
return { before: b, match: f, after: c };
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
return null;
|
|
32
|
+
}
|
|
33
|
+
function z({ text: t, search: r }) {
|
|
34
|
+
const o = j(r, t);
|
|
35
|
+
return o ? /* @__PURE__ */ u("span", { children: [
|
|
36
|
+
o.before,
|
|
37
|
+
/* @__PURE__ */ n("span", { className: "bg-[#ffeb10] text-body-strong-md", children: o.match }),
|
|
38
|
+
o.after
|
|
39
|
+
] }) : /* @__PURE__ */ n("span", { children: t });
|
|
40
|
+
}
|
|
41
|
+
function G({
|
|
42
|
+
value: t,
|
|
43
|
+
onValueChange: r,
|
|
44
|
+
suggestions: o,
|
|
45
|
+
placeholder: p = "Search...",
|
|
46
|
+
minCharacters: l = 2,
|
|
47
|
+
emptyMessage: i = "No results found.",
|
|
48
|
+
className: s,
|
|
49
|
+
onSelect: d
|
|
50
|
+
}) {
|
|
51
|
+
const [h, a] = m.useState(!1), b = m.useId(), f = m.useMemo(() => o.map((e) => typeof e == "string" ? {
|
|
52
|
+
label: e,
|
|
53
|
+
value: e,
|
|
54
|
+
filterLabel: "",
|
|
55
|
+
filterIcon: () => null
|
|
56
|
+
} : e), [o]), c = m.useMemo(() => !t || t.length < l ? [] : f.filter((e) => e && e.label).filter((e) => E(t, e.label)).slice(0, 50), [t, f, l]);
|
|
57
|
+
m.useEffect(() => {
|
|
58
|
+
const e = f.some((w) => w.value === t);
|
|
59
|
+
a(e ? !1 : c.length > 0 && t.length >= l);
|
|
60
|
+
}, [c.length, t.length, l, f, t]);
|
|
61
|
+
const L = (e) => {
|
|
62
|
+
r(e.value), a(!1), d?.(e.label, e.filterLabel);
|
|
63
|
+
}, v = (e) => {
|
|
64
|
+
e.relatedTarget?.hasAttribute("cmdk-list") || a(!1);
|
|
65
|
+
};
|
|
66
|
+
return /* @__PURE__ */ n("div", { className: s, children: /* @__PURE__ */ n(A, { open: h, onOpenChange: a, children: /* @__PURE__ */ u(
|
|
67
|
+
N,
|
|
68
|
+
{
|
|
69
|
+
shouldFilter: !1,
|
|
70
|
+
loop: !0,
|
|
71
|
+
className: "overflow-visible [&_[cmdk-input-wrapper]]:border-0 [&_[cmdk-input-wrapper]]:p-0",
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ n(O, { asChild: !0, children: /* @__PURE__ */ n(
|
|
74
|
+
y.Input,
|
|
75
|
+
{
|
|
76
|
+
asChild: !0,
|
|
77
|
+
value: t,
|
|
78
|
+
onValueChange: r,
|
|
79
|
+
onKeyDown: (e) => {
|
|
80
|
+
e.key === "Escape" && a(!1);
|
|
81
|
+
},
|
|
82
|
+
onBlur: v,
|
|
83
|
+
children: /* @__PURE__ */ n(
|
|
84
|
+
D,
|
|
85
|
+
{
|
|
86
|
+
type: "search",
|
|
87
|
+
role: "combobox",
|
|
88
|
+
"aria-expanded": h,
|
|
89
|
+
"aria-haspopup": "listbox",
|
|
90
|
+
"aria-controls": b,
|
|
91
|
+
"aria-autocomplete": "list",
|
|
92
|
+
"aria-label": "Search with autocomplete suggestions",
|
|
93
|
+
placeholder: p
|
|
94
|
+
}
|
|
95
|
+
)
|
|
96
|
+
}
|
|
97
|
+
) }),
|
|
98
|
+
!h && /* @__PURE__ */ n(x, { "aria-hidden": "true", className: "hidden" }),
|
|
99
|
+
/* @__PURE__ */ n(
|
|
100
|
+
$,
|
|
101
|
+
{
|
|
102
|
+
asChild: !0,
|
|
103
|
+
onOpenAutoFocus: (e) => e.preventDefault(),
|
|
104
|
+
onInteractOutside: (e) => {
|
|
105
|
+
e.target instanceof Element && e.target.hasAttribute("cmdk-input") && e.preventDefault();
|
|
106
|
+
},
|
|
107
|
+
className: "w-[--radix-popover-trigger-width] p-[var(--space-s)]",
|
|
108
|
+
children: /* @__PURE__ */ u(x, { id: b, role: "listbox", "aria-label": "Autocomplete suggestions", children: [
|
|
109
|
+
c.length > 0 ? /* @__PURE__ */ n(S, { className: "[&]:p-0", children: c.map((e, w) => {
|
|
110
|
+
const C = e.filterIcon, I = e.filterLabel && e.filterLabel.length > 0;
|
|
111
|
+
return /* @__PURE__ */ u(
|
|
112
|
+
M,
|
|
113
|
+
{
|
|
114
|
+
value: `${e.value}|${e.filterLabel}`,
|
|
115
|
+
onMouseDown: (g) => g.preventDefault(),
|
|
116
|
+
onSelect: () => L(e),
|
|
117
|
+
className: "text-body-md h-[var(--size-m)] py-0 gap-[var(--space-m)] hover:bg-[var(--color-background-neutral-subtlest-hovered)] hover:text-[var(--color-text-primary)]",
|
|
118
|
+
children: [
|
|
119
|
+
/* @__PURE__ */ n(z, { text: e.label, search: t }),
|
|
120
|
+
I && /* @__PURE__ */ u("span", { className: "ml-auto flex items-center gap-[var(--space-xs)] text-caption-sm text-[var(--color-text-tertiary)]", children: [
|
|
121
|
+
/* @__PURE__ */ n(C, { className: "w-[12px] h-[12px]" }),
|
|
122
|
+
e.filterLabel
|
|
123
|
+
] })
|
|
124
|
+
]
|
|
125
|
+
},
|
|
126
|
+
`${e.value}-${e.filterLabel}-${w}`
|
|
127
|
+
);
|
|
128
|
+
}) }) : null,
|
|
129
|
+
c.length === 0 && t.length >= l ? /* @__PURE__ */ n(k, { children: i }) : null
|
|
130
|
+
] })
|
|
131
|
+
}
|
|
132
|
+
)
|
|
133
|
+
]
|
|
134
|
+
}
|
|
135
|
+
) }) });
|
|
136
|
+
}
|
|
137
|
+
export {
|
|
138
|
+
G as AutocompleteSearch
|
|
139
|
+
};
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import * as a from "react";
|
|
3
|
+
import { cn as e } from "../../lib/utils.js";
|
|
4
|
+
const u = {
|
|
5
|
+
xxs: "-ml-[6px]",
|
|
6
|
+
xs: "-ml-[var(--space-xs)]",
|
|
7
|
+
s: "-ml-[var(--space-s)]",
|
|
8
|
+
m: "-ml-[var(--space-m)]",
|
|
9
|
+
l: "-ml-[var(--space-l)]",
|
|
10
|
+
xl: "-ml-[var(--space-l)]"
|
|
11
|
+
}, m = {
|
|
12
|
+
xxs: "border",
|
|
13
|
+
xs: "border",
|
|
14
|
+
s: "border-2",
|
|
15
|
+
m: "border-2",
|
|
16
|
+
l: "border-2",
|
|
17
|
+
xl: "border-2"
|
|
18
|
+
}, b = a.forwardRef(
|
|
19
|
+
({ className: c, children: p, size: s = "m", ...n }, d) => {
|
|
20
|
+
const t = a.Children.toArray(p), v = t.length;
|
|
21
|
+
return /* @__PURE__ */ f(
|
|
22
|
+
"div",
|
|
23
|
+
{
|
|
24
|
+
ref: d,
|
|
25
|
+
className: e("flex items-center", c),
|
|
26
|
+
...n,
|
|
27
|
+
children: t.map((r, o) => {
|
|
28
|
+
if (!a.isValidElement(r)) return r;
|
|
29
|
+
const x = v - o, i = o === 0 ? e(m[s], "border-[var(--color-surface-primary)]") : e(
|
|
30
|
+
m[s],
|
|
31
|
+
"border-[var(--color-surface-primary)]",
|
|
32
|
+
u[s]
|
|
33
|
+
), l = r.props;
|
|
34
|
+
return a.cloneElement(r, {
|
|
35
|
+
...l,
|
|
36
|
+
className: e(l.className, i),
|
|
37
|
+
style: {
|
|
38
|
+
...l.style,
|
|
39
|
+
zIndex: x
|
|
40
|
+
},
|
|
41
|
+
key: o
|
|
42
|
+
});
|
|
43
|
+
})
|
|
44
|
+
}
|
|
45
|
+
);
|
|
46
|
+
}
|
|
47
|
+
);
|
|
48
|
+
b.displayName = "AvatarGroup";
|
|
49
|
+
export {
|
|
50
|
+
b as AvatarGroup
|
|
51
|
+
};
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { jsx as o, jsxs as c, Fragment as u } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
|
+
import * as a from "@radix-ui/react-avatar";
|
|
4
|
+
import { cva as d } from "class-variance-authority";
|
|
5
|
+
import { cn as l } from "../../lib/utils.js";
|
|
6
|
+
const p = d(
|
|
7
|
+
"relative flex shrink-0 overflow-hidden items-center justify-center aspect-square",
|
|
8
|
+
{
|
|
9
|
+
variants: {
|
|
10
|
+
size: {
|
|
11
|
+
xxs: "h-4 w-4",
|
|
12
|
+
// 16px
|
|
13
|
+
xs: "h-[var(--size-s)] w-[var(--size-s)]",
|
|
14
|
+
// 20px
|
|
15
|
+
s: "h-[var(--size-m)] w-[var(--size-m)]",
|
|
16
|
+
// 24px
|
|
17
|
+
m: "h-[var(--size-l)] w-[var(--size-l)]",
|
|
18
|
+
// 32px
|
|
19
|
+
l: "h-[var(--size-xl)] w-[var(--size-xl)]",
|
|
20
|
+
// 48px
|
|
21
|
+
xl: "h-[var(--size-2xl)] w-[var(--size-2xl)]"
|
|
22
|
+
// 64px
|
|
23
|
+
},
|
|
24
|
+
type: {
|
|
25
|
+
user: "rounded-full",
|
|
26
|
+
organization: ""
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
compoundVariants: [
|
|
30
|
+
{
|
|
31
|
+
type: "organization",
|
|
32
|
+
size: "xxs",
|
|
33
|
+
className: "rounded-[2px]"
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
type: "organization",
|
|
37
|
+
size: "xs",
|
|
38
|
+
className: "rounded-[3px]"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
type: "organization",
|
|
42
|
+
size: "s",
|
|
43
|
+
className: "rounded-s"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: "organization",
|
|
47
|
+
size: "m",
|
|
48
|
+
className: "rounded-m"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
type: "organization",
|
|
52
|
+
size: "l",
|
|
53
|
+
className: "rounded-m"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
type: "organization",
|
|
57
|
+
size: "xl",
|
|
58
|
+
className: "rounded-l"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
defaultVariants: {
|
|
62
|
+
size: "m",
|
|
63
|
+
type: "user"
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
), x = d(
|
|
67
|
+
"flex h-full w-full items-center justify-center font-medium [&]:text-[var(--color-text-inverse)]",
|
|
68
|
+
{
|
|
69
|
+
variants: {
|
|
70
|
+
size: {
|
|
71
|
+
xxs: "text-[7px] leading-none",
|
|
72
|
+
xs: "text-[9px] leading-none",
|
|
73
|
+
s: "text-caption-sm",
|
|
74
|
+
m: "text-label-sm",
|
|
75
|
+
l: "text-label-md",
|
|
76
|
+
xl: "text-heading-sm"
|
|
77
|
+
},
|
|
78
|
+
type: {
|
|
79
|
+
user: "rounded-full",
|
|
80
|
+
organization: ""
|
|
81
|
+
},
|
|
82
|
+
variant: {
|
|
83
|
+
information: "bg-[var(--color-background-info-bold)]",
|
|
84
|
+
success: "bg-[var(--color-background-success-bold)]",
|
|
85
|
+
error: "bg-[var(--color-background-error-bold)]",
|
|
86
|
+
warning: "bg-[var(--color-background-warning-bold)]",
|
|
87
|
+
violet: "bg-[var(--violet-500)]",
|
|
88
|
+
magenta: "bg-[var(--magenta-500)]"
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
compoundVariants: [
|
|
92
|
+
{
|
|
93
|
+
type: "organization",
|
|
94
|
+
size: "xxs",
|
|
95
|
+
className: "rounded-[2px]"
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
type: "organization",
|
|
99
|
+
size: "xs",
|
|
100
|
+
className: "rounded-[3px]"
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
type: "organization",
|
|
104
|
+
size: "s",
|
|
105
|
+
className: "rounded-s"
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
type: "organization",
|
|
109
|
+
size: "m",
|
|
110
|
+
className: "rounded-m"
|
|
111
|
+
},
|
|
112
|
+
{
|
|
113
|
+
type: "organization",
|
|
114
|
+
size: "l",
|
|
115
|
+
className: "rounded-m"
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
type: "organization",
|
|
119
|
+
size: "xl",
|
|
120
|
+
className: "rounded-l"
|
|
121
|
+
}
|
|
122
|
+
],
|
|
123
|
+
defaultVariants: {
|
|
124
|
+
size: "m",
|
|
125
|
+
type: "user",
|
|
126
|
+
variant: "information"
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
), z = n.forwardRef(({ className: e, size: s, type: r, ...i }, t) => /* @__PURE__ */ o(
|
|
130
|
+
a.Root,
|
|
131
|
+
{
|
|
132
|
+
ref: t,
|
|
133
|
+
className: l(p({ size: s, type: r }), e),
|
|
134
|
+
...i
|
|
135
|
+
}
|
|
136
|
+
));
|
|
137
|
+
z.displayName = a.Root.displayName;
|
|
138
|
+
const v = n.forwardRef(({ className: e, ...s }, r) => /* @__PURE__ */ c(u, { children: [
|
|
139
|
+
/* @__PURE__ */ o(
|
|
140
|
+
a.Image,
|
|
141
|
+
{
|
|
142
|
+
ref: r,
|
|
143
|
+
className: l("aspect-square h-full w-full object-cover rounded-[inherit]", e),
|
|
144
|
+
...s
|
|
145
|
+
}
|
|
146
|
+
),
|
|
147
|
+
/* @__PURE__ */ o("div", { className: "absolute inset-0 rounded-[inherit] shadow-[inset_0_0_0_1px_rgba(85,95,109,0.1)] pointer-events-none" })
|
|
148
|
+
] }));
|
|
149
|
+
v.displayName = a.Image.displayName;
|
|
150
|
+
const g = n.forwardRef(({ className: e, size: s, type: r, variant: i, ...t }, m) => /* @__PURE__ */ o(
|
|
151
|
+
a.Fallback,
|
|
152
|
+
{
|
|
153
|
+
ref: m,
|
|
154
|
+
className: l(x({ size: s, type: r, variant: i }), e),
|
|
155
|
+
...t
|
|
156
|
+
}
|
|
157
|
+
));
|
|
158
|
+
g.displayName = a.Fallback.displayName;
|
|
159
|
+
export {
|
|
160
|
+
z as Avatar,
|
|
161
|
+
g as AvatarFallback,
|
|
162
|
+
v as AvatarImage,
|
|
163
|
+
x as avatarFallbackVariants,
|
|
164
|
+
p as avatarVariants
|
|
165
|
+
};
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { jsxs as v, jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import * as u from "react";
|
|
3
|
+
import { cva as x } from "class-variance-authority";
|
|
4
|
+
import { cn as e } from "../../lib/utils.js";
|
|
5
|
+
const m = x(
|
|
6
|
+
"inline-flex items-center w-fit max-w-full shrink-0 rounded-s px-[var(--space-s)] py-[var(--space-xs)] text-caption-medium-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-[var(--ring-color)] focus-visible:ring-offset-1 cursor-default",
|
|
7
|
+
{
|
|
8
|
+
variants: {
|
|
9
|
+
intent: {
|
|
10
|
+
neutral: "",
|
|
11
|
+
brand: "",
|
|
12
|
+
success: "",
|
|
13
|
+
warning: "",
|
|
14
|
+
destructive: "",
|
|
15
|
+
information: "",
|
|
16
|
+
violet: "",
|
|
17
|
+
magenta: ""
|
|
18
|
+
},
|
|
19
|
+
appearance: {
|
|
20
|
+
bold: "border-transparent",
|
|
21
|
+
subtle: ""
|
|
22
|
+
},
|
|
23
|
+
size: {
|
|
24
|
+
xs: "px-[var(--space-xs)] h-4 [&]:text-body-medium-xsm min-w-[16px] justify-center",
|
|
25
|
+
s: "px-[var(--space-xs)] h-5 [&]:text-body-medium-xsm min-w-[20px] justify-center",
|
|
26
|
+
m: "px-[var(--space-s)] h-6 [&]:text-body-medium-sm",
|
|
27
|
+
l: "px-[var(--space-m)] h-7 [&]:text-body-medium-md"
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
compoundVariants: [
|
|
31
|
+
// Neutral intent variants
|
|
32
|
+
{
|
|
33
|
+
intent: "neutral",
|
|
34
|
+
appearance: "bold",
|
|
35
|
+
class: "border-transparent bg-[var(--grey-600)] text-[var(--color-text-inverse)]"
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
intent: "neutral",
|
|
39
|
+
appearance: "subtle",
|
|
40
|
+
class: "border border-[var(--color-border-neutral-subtle)] bg-[var(--grey-100)] text-[var(--color-text-primary)]"
|
|
41
|
+
},
|
|
42
|
+
// Brand intent variants
|
|
43
|
+
{
|
|
44
|
+
intent: "brand",
|
|
45
|
+
appearance: "bold",
|
|
46
|
+
class: "border-transparent bg-[var(--color-background-blue-bold)] text-[var(--color-text-inverse)]"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
intent: "brand",
|
|
50
|
+
appearance: "subtle",
|
|
51
|
+
class: "border border-[var(--color-border-brand-subtle)] bg-[var(--blue-50)] text-[var(--color-text-brand-bold)]"
|
|
52
|
+
},
|
|
53
|
+
// Success intent variants
|
|
54
|
+
{
|
|
55
|
+
intent: "success",
|
|
56
|
+
appearance: "bold",
|
|
57
|
+
class: "border-transparent bg-[var(--color-background-success-bold)] text-[var(--color-text-inverse)]"
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
intent: "success",
|
|
61
|
+
appearance: "subtle",
|
|
62
|
+
class: "border border-[var(--color-border-success-subtle)] bg-[var(--color-background-success-subtle)] text-[var(--color-text-success-bold)]"
|
|
63
|
+
},
|
|
64
|
+
// Warning intent variants
|
|
65
|
+
{
|
|
66
|
+
intent: "warning",
|
|
67
|
+
appearance: "bold",
|
|
68
|
+
class: "border-transparent bg-[var(--color-background-warning-bold)] text-[var(--color-text-inverse)]"
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
intent: "warning",
|
|
72
|
+
appearance: "subtle",
|
|
73
|
+
class: "border border-[var(--color-border-warning-subtle)] bg-[var(--color-background-warning-subtle)] text-[var(--color-text-warning-bold)]"
|
|
74
|
+
},
|
|
75
|
+
// Destructive intent variants
|
|
76
|
+
{
|
|
77
|
+
intent: "destructive",
|
|
78
|
+
appearance: "bold",
|
|
79
|
+
class: "border-transparent bg-[var(--color-background-error-bold)] text-[var(--color-text-inverse)]"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
intent: "destructive",
|
|
83
|
+
appearance: "subtle",
|
|
84
|
+
class: "border border-[var(--color-border-error-subtle)] bg-[var(--color-background-error-subtle)] text-[var(--color-text-error-bold)]"
|
|
85
|
+
},
|
|
86
|
+
// Information intent variants
|
|
87
|
+
{
|
|
88
|
+
intent: "information",
|
|
89
|
+
appearance: "bold",
|
|
90
|
+
class: "border-transparent bg-[var(--color-background-info-bold)] text-[var(--color-text-inverse)]"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
intent: "information",
|
|
94
|
+
appearance: "subtle",
|
|
95
|
+
class: "border border-[var(--color-border-info-subtle)] bg-[var(--color-background-info-subtle)] text-[var(--color-text-info-bold)]"
|
|
96
|
+
},
|
|
97
|
+
// Violet intent variants
|
|
98
|
+
{
|
|
99
|
+
intent: "violet",
|
|
100
|
+
appearance: "bold",
|
|
101
|
+
class: "border-transparent bg-[var(--violet-500)] text-[var(--color-text-inverse)]"
|
|
102
|
+
},
|
|
103
|
+
{
|
|
104
|
+
intent: "violet",
|
|
105
|
+
appearance: "subtle",
|
|
106
|
+
class: "border border-[var(--color-border-violet-subtle)] bg-[var(--violet-50)] text-[var(--violet-600)]"
|
|
107
|
+
},
|
|
108
|
+
// Magenta intent variants
|
|
109
|
+
{
|
|
110
|
+
intent: "magenta",
|
|
111
|
+
appearance: "bold",
|
|
112
|
+
class: "border-transparent bg-[var(--magenta-500)] text-[var(--color-text-inverse)]"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
intent: "magenta",
|
|
116
|
+
appearance: "subtle",
|
|
117
|
+
class: "border border-[var(--color-border-magenta-subtle)] bg-[var(--magenta-50)] text-[var(--magenta-600)]"
|
|
118
|
+
}
|
|
119
|
+
],
|
|
120
|
+
defaultVariants: {
|
|
121
|
+
intent: "neutral",
|
|
122
|
+
appearance: "subtle",
|
|
123
|
+
size: "m"
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
), o = {
|
|
127
|
+
xs: "w-3 h-3",
|
|
128
|
+
s: "w-3.5 h-3.5",
|
|
129
|
+
m: "w-4 h-4",
|
|
130
|
+
l: "w-[18px] h-[18px]"
|
|
131
|
+
}, g = u.forwardRef(
|
|
132
|
+
({ className: n, intent: s, appearance: l, size: a = "m", icon: r, truncate: c = !0, children: b, ...i }, d) => {
|
|
133
|
+
const p = o[a] ?? o.m;
|
|
134
|
+
return /* @__PURE__ */ v(
|
|
135
|
+
"div",
|
|
136
|
+
{
|
|
137
|
+
ref: d,
|
|
138
|
+
className: e(
|
|
139
|
+
m({ intent: s, appearance: l, size: a }),
|
|
140
|
+
r && "gap-[var(--space-xs)]",
|
|
141
|
+
n
|
|
142
|
+
),
|
|
143
|
+
...i,
|
|
144
|
+
children: [
|
|
145
|
+
r && /* @__PURE__ */ t("span", { className: e("inline-flex items-center justify-center shrink-0 [&_svg]:w-full [&_svg]:h-full", p), children: r }),
|
|
146
|
+
/* @__PURE__ */ t("span", { className: e("min-w-0 whitespace-nowrap", c && "overflow-hidden text-ellipsis"), children: b })
|
|
147
|
+
]
|
|
148
|
+
}
|
|
149
|
+
);
|
|
150
|
+
}
|
|
151
|
+
);
|
|
152
|
+
g.displayName = "Badge";
|
|
153
|
+
export {
|
|
154
|
+
g as Badge,
|
|
155
|
+
m as badgeVariants,
|
|
156
|
+
o as iconSizeClasses
|
|
157
|
+
};
|