@soygalo/ui 0.0.1 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/controls/Accordion.js +42 -0
- package/dist/controls/ActionMenu.js +64 -0
- package/dist/controls/AlertDialog.js +62 -0
- package/dist/controls/ChipGroup.js +90 -0
- package/dist/controls/Collapsible.js +6 -0
- package/dist/controls/Command.js +88 -0
- package/dist/controls/ConfirmDialog.js +42 -0
- package/dist/controls/Dialog.js +66 -0
- package/dist/controls/FilterPopover.js +161 -0
- package/dist/controls/Kbd.js +12 -0
- package/dist/controls/Popover.js +55 -0
- package/dist/controls/SegmentedControl.js +52 -0
- package/dist/controls/Sheet.js +123 -0
- package/dist/controls/Tooltip.js +15 -0
- package/dist/controls/overlay-container.js +20 -0
- package/dist/controls/return-focus.js +16 -0
- package/dist/controls.js +17 -0
- package/dist/data-attr.js +5 -0
- package/dist/data-display/Avatar.js +47 -0
- package/dist/data-display/Badge.js +88 -0
- package/dist/data-display/Board.js +73 -0
- package/dist/data-display/Card.js +141 -0
- package/dist/data-display/ChatBubble.js +44 -0
- package/dist/data-display/Code.js +32 -0
- package/dist/data-display/DataTable.js +114 -0
- package/dist/data-display/IconTile.js +60 -0
- package/dist/data-display/Item.js +128 -0
- package/dist/data-display/Overline.js +13 -0
- package/dist/data-display/Separator.js +19 -0
- package/dist/data-display/Stat.js +36 -0
- package/dist/data-display/TablePagination.js +98 -0
- package/dist/data-display/Timeline.js +58 -0
- package/dist/data-display/chart-colors.js +36 -0
- package/dist/data-display.js +16 -0
- package/dist/feedback/Callout.js +107 -0
- package/dist/feedback/FeedbackState.js +55 -0
- package/dist/feedback/LoadingState.js +24 -0
- package/dist/feedback/Progress.js +51 -0
- package/dist/feedback/ProgressRing.js +50 -0
- package/dist/feedback/Skeleton.js +12 -0
- package/dist/feedback/SplashScreen.js +145 -0
- package/dist/feedback/StatusDot.js +34 -0
- package/dist/feedback/Stepper.js +48 -0
- package/dist/feedback/Toaster.js +38 -0
- package/dist/feedback.js +11 -0
- package/dist/fonts.css +7 -0
- package/dist/forms/Button.js +128 -0
- package/dist/forms/ButtonGroup.js +14 -0
- package/dist/forms/Calendar.js +51 -0
- package/dist/forms/Checkbox.js +30 -0
- package/dist/forms/Combobox.js +123 -0
- package/dist/forms/CopyButton.js +24 -0
- package/dist/forms/DatePicker.js +146 -0
- package/dist/forms/DateTimePicker.js +97 -0
- package/dist/forms/EditableValue.js +49 -0
- package/dist/forms/FileUpload.js +99 -0
- package/dist/forms/FormField.js +47 -0
- package/dist/forms/Input.js +58 -0
- package/dist/forms/Label.js +42 -0
- package/dist/forms/MultiSelect.js +139 -0
- package/dist/forms/QuantityStepper.js +71 -0
- package/dist/forms/RadioGroup.js +21 -0
- package/dist/forms/SearchField.js +55 -0
- package/dist/forms/Select.js +79 -0
- package/dist/forms/Slider.js +23 -0
- package/dist/forms/Switch.js +23 -0
- package/dist/forms/TagInput.js +64 -0
- package/dist/forms/Textarea.js +41 -0
- package/dist/forms/control-size.js +44 -0
- package/dist/forms/use-copy-to-clipboard.js +23 -0
- package/dist/forms.js +25 -0
- package/dist/icons/create-icon.js +20 -0
- package/dist/icons/glyphs.js +9 -0
- package/dist/icons.js +3 -0
- package/dist/index.js +101 -0
- package/dist/layout/FilterBar.js +29 -0
- package/dist/layout/Page.js +44 -0
- package/dist/layout/PageHeader.js +65 -0
- package/dist/layout/PageShell.js +20 -0
- package/dist/layout/PageSurface.js +19 -0
- package/dist/layout/Resizable.js +21 -0
- package/dist/layout/ScrollArea.js +35 -0
- package/dist/layout/SelectionBar.js +41 -0
- package/dist/layout.js +9 -0
- package/dist/lite/Contact.js +59 -0
- package/dist/lite/Coupon.js +56 -0
- package/dist/lite/Loading.js +79 -0
- package/dist/lite/Order.js +216 -0
- package/dist/lite/Product.js +124 -0
- package/dist/lite/Resolver.js +181 -0
- package/dist/lite/Shell.js +178 -0
- package/dist/lite/Smart.js +48 -0
- package/dist/lite.js +9 -0
- package/dist/navigation/ApplicationSidebar.js +101 -0
- package/dist/navigation/NavigationRail.js +45 -0
- package/dist/navigation/SidebarAccountSummary.js +20 -0
- package/dist/navigation/SidebarBrandContent.js +24 -0
- package/dist/navigation/SidebarNavigationItem.js +14 -0
- package/dist/navigation/SidebarSubnavigation.js +26 -0
- package/dist/navigation/navigation-path.js +21 -0
- package/dist/navigation/sidebar-styles.js +17 -0
- package/dist/navigation.js +9 -0
- package/dist/password-manager.js +11 -0
- package/dist/preflight.css +445 -0
- package/dist/sidebar/primitives.js +253 -0
- package/dist/sidebar/use-sidebar-shortcut.js +15 -0
- package/dist/sidebar.js +2 -0
- package/dist/styles.css +3773 -0
- package/dist/tabs/Tabs.js +48 -0
- package/dist/tabs.js +2 -0
- package/dist/tailwind-preset.js +213 -0
- package/dist/type-scale.js +45 -0
- package/dist/types/src/controls/Accordion.d.ts +10 -0
- package/dist/types/src/controls/ActionMenu.d.ts +17 -0
- package/dist/types/src/controls/AlertDialog.d.ts +15 -0
- package/dist/types/src/controls/ChipGroup.d.ts +43 -0
- package/dist/types/src/controls/Collapsible.d.ts +4 -0
- package/dist/types/src/controls/Command.d.ts +83 -0
- package/dist/types/src/controls/ConfirmDialog.d.ts +17 -0
- package/dist/types/src/controls/Dialog.d.ts +20 -0
- package/dist/types/src/controls/FilterPopover.d.ts +47 -0
- package/dist/types/src/controls/Kbd.d.ts +2 -0
- package/dist/types/src/controls/Popover.d.ts +31 -0
- package/dist/types/src/controls/SegmentedControl.d.ts +32 -0
- package/dist/types/src/controls/Sheet.d.ts +34 -0
- package/dist/types/src/controls/Tooltip.d.ts +6 -0
- package/dist/types/src/controls/index.d.ts +16 -0
- package/dist/types/src/controls/overlay-container.d.ts +11 -0
- package/dist/types/src/controls/return-focus.d.ts +6 -0
- package/dist/types/src/data-attr.d.ts +3 -0
- package/dist/types/src/data-display/Avatar.d.ts +30 -0
- package/dist/types/src/data-display/Badge.d.ts +28 -0
- package/dist/types/src/data-display/Board.d.ts +21 -0
- package/dist/types/src/data-display/Card.d.ts +45 -0
- package/dist/types/src/data-display/ChatBubble.d.ts +24 -0
- package/dist/types/src/data-display/Code.d.ts +25 -0
- package/dist/types/src/data-display/DataTable.d.ts +74 -0
- package/dist/types/src/data-display/IconTile.d.ts +22 -0
- package/dist/types/src/data-display/Item.d.ts +24 -0
- package/dist/types/src/data-display/Overline.d.ts +5 -0
- package/dist/types/src/data-display/Separator.d.ts +9 -0
- package/dist/types/src/data-display/Stat.d.ts +17 -0
- package/dist/types/src/data-display/TablePagination.d.ts +23 -0
- package/dist/types/src/data-display/Timeline.d.ts +16 -0
- package/dist/types/src/data-display/chart-colors.d.ts +51 -0
- package/dist/types/src/data-display/index.d.ts +15 -0
- package/dist/types/src/feedback/Callout.d.ts +17 -0
- package/dist/types/src/feedback/FeedbackState.d.ts +16 -0
- package/dist/types/src/feedback/LoadingState.d.ts +7 -0
- package/dist/types/src/feedback/Progress.d.ts +37 -0
- package/dist/types/src/feedback/ProgressRing.d.ts +11 -0
- package/dist/types/src/feedback/Skeleton.d.ts +2 -0
- package/dist/types/src/feedback/SplashScreen.d.ts +11 -0
- package/dist/types/src/feedback/StatusDot.d.ts +27 -0
- package/dist/types/src/feedback/Stepper.d.ts +16 -0
- package/dist/types/src/feedback/Toaster.d.ts +4 -0
- package/dist/types/src/feedback/index.d.ts +10 -0
- package/dist/types/src/forms/Button.d.ts +26 -0
- package/dist/types/src/forms/ButtonGroup.d.ts +7 -0
- package/dist/types/src/forms/Calendar.d.ts +4 -0
- package/dist/types/src/forms/Checkbox.d.ts +11 -0
- package/dist/types/src/forms/Combobox.d.ts +51 -0
- package/dist/types/src/forms/CopyButton.d.ts +8 -0
- package/dist/types/src/forms/DatePicker.d.ts +34 -0
- package/dist/types/src/forms/DateTimePicker.d.ts +20 -0
- package/dist/types/src/forms/EditableValue.d.ts +14 -0
- package/dist/types/src/forms/FileUpload.d.ts +28 -0
- package/dist/types/src/forms/FormField.d.ts +12 -0
- package/dist/types/src/forms/Input.d.ts +11 -0
- package/dist/types/src/forms/Label.d.ts +11 -0
- package/dist/types/src/forms/MultiSelect.d.ts +45 -0
- package/dist/types/src/forms/QuantityStepper.d.ts +36 -0
- package/dist/types/src/forms/RadioGroup.d.ts +4 -0
- package/dist/types/src/forms/SearchField.d.ts +13 -0
- package/dist/types/src/forms/Select.d.ts +15 -0
- package/dist/types/src/forms/Slider.d.ts +9 -0
- package/dist/types/src/forms/Switch.d.ts +14 -0
- package/dist/types/src/forms/TagInput.d.ts +19 -0
- package/dist/types/src/forms/Textarea.d.ts +10 -0
- package/dist/types/src/forms/control-size.d.ts +17 -0
- package/dist/types/src/forms/index.d.ts +24 -0
- package/dist/types/src/forms/use-copy-to-clipboard.d.ts +5 -0
- package/dist/types/src/icons/create-icon.d.ts +16 -0
- package/dist/types/src/icons/glyphs.d.ts +294 -0
- package/dist/types/src/icons/index.d.ts +2 -0
- package/dist/types/src/index.d.ts +12 -0
- package/dist/types/src/layout/FilterBar.d.ts +11 -0
- package/dist/types/src/layout/Page.d.ts +19 -0
- package/dist/types/src/layout/PageHeader.d.ts +14 -0
- package/dist/types/src/layout/PageShell.d.ts +8 -0
- package/dist/types/src/layout/PageSurface.d.ts +13 -0
- package/dist/types/src/layout/Resizable.d.ts +23 -0
- package/dist/types/src/layout/ScrollArea.d.ts +9 -0
- package/dist/types/src/layout/SelectionBar.d.ts +15 -0
- package/dist/types/src/layout/index.d.ts +8 -0
- package/dist/types/src/lite/Contact.d.ts +14 -0
- package/dist/types/src/lite/Coupon.d.ts +11 -0
- package/dist/types/src/lite/Loading.d.ts +13 -0
- package/dist/types/src/lite/Order.d.ts +49 -0
- package/dist/types/src/lite/Product.d.ts +16 -0
- package/dist/types/src/lite/Resolver.d.ts +41 -0
- package/dist/types/src/lite/Shell.d.ts +44 -0
- package/dist/types/src/lite/Smart.d.ts +9 -0
- package/dist/types/src/lite/index.d.ts +8 -0
- package/dist/types/src/navigation/ApplicationSidebar.d.ts +15 -0
- package/dist/types/src/navigation/NavigationRail.d.ts +21 -0
- package/dist/types/src/navigation/SidebarAccountSummary.d.ts +8 -0
- package/dist/types/src/navigation/SidebarBrandContent.d.ts +7 -0
- package/dist/types/src/navigation/SidebarNavigationItem.d.ts +9 -0
- package/dist/types/src/navigation/SidebarSubnavigation.d.ts +15 -0
- package/dist/types/src/navigation/index.d.ts +28 -0
- package/dist/types/src/navigation/navigation-path.d.ts +9 -0
- package/dist/types/src/navigation/sidebar-styles.d.ts +14 -0
- package/dist/types/src/password-manager.d.ts +3 -0
- package/dist/types/src/sidebar/index.d.ts +1 -0
- package/dist/types/src/sidebar/primitives.d.ts +51 -0
- package/dist/types/src/sidebar/use-sidebar-shortcut.d.ts +9 -0
- package/dist/types/src/tabs/Tabs.d.ts +21 -0
- package/dist/types/src/tabs/index.d.ts +1 -0
- package/dist/types/src/type-scale.d.ts +51 -0
- package/dist/types/src/use-media-query.d.ts +2 -0
- package/dist/types/src/utils.d.ts +5 -0
- package/dist/types/tailwind-preset.d.ts +214 -0
- package/dist/use-media-query.js +12 -0
- package/dist/utils.js +24 -0
- package/eslint/eslint-plugin-galo-ds.js +314 -0
- package/eslint/eslint.design-system.js +99 -0
- package/eslint/index.js +9 -0
- package/package.json +117 -1
- package/src/styles.css +540 -0
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../utils.js";
|
|
3
|
+
import { ChevronLeft as t, ChevronRight as n } from "../icons/glyphs.js";
|
|
4
|
+
import "../icons.js";
|
|
5
|
+
import { Button as r } from "../forms/Button.js";
|
|
6
|
+
import { Select as i, SelectContent as a, SelectItem as o, SelectTrigger as s, SelectValue as c } from "../forms/Select.js";
|
|
7
|
+
import { jsx as l, jsxs as u } from "react/jsx-runtime";
|
|
8
|
+
//#region src/data-display/TablePagination.tsx
|
|
9
|
+
var d = [
|
|
10
|
+
25,
|
|
11
|
+
50,
|
|
12
|
+
100,
|
|
13
|
+
200
|
|
14
|
+
], f = ({ from: e, to: t, total: n }) => `Mostrando ${e}–${t} de ${n}`, p = (e, t) => {
|
|
15
|
+
if (t <= 5) return Array.from({ length: t }, (e, t) => t + 1);
|
|
16
|
+
let n = Math.min(Math.max(e - 2, 1), t - 4);
|
|
17
|
+
return Array.from({ length: 5 }, (e, t) => n + t);
|
|
18
|
+
};
|
|
19
|
+
function m({ page: m, pageCount: h, onPageChange: g, pageSize: _, pageSizeOptions: v = d, totalItems: y, onPageSizeChange: b, label: x, className: S, previousLabel: C = "Página anterior", nextLabel: w = "Página siguiente", pageSizeLabel: T = "Filas por página", emptyLabel: E = "Sin registros", formatRange: D = f }) {
|
|
20
|
+
let O = Math.max(h, 1), k = Math.min(Math.max(m, 1), O), A = y !== void 0 && _ ? y === 0 ? E : D({
|
|
21
|
+
from: (k - 1) * _ + 1,
|
|
22
|
+
to: Math.min(k * _, y),
|
|
23
|
+
total: y
|
|
24
|
+
}) : void 0;
|
|
25
|
+
return /* @__PURE__ */ u("nav", {
|
|
26
|
+
"aria-label": "Paginación",
|
|
27
|
+
className: e("flex flex-wrap items-center justify-between gap-3", S),
|
|
28
|
+
children: [/* @__PURE__ */ l("p", {
|
|
29
|
+
className: "min-w-0 text-body-xs tabular-nums text-muted-foreground",
|
|
30
|
+
children: x ?? A ?? `Página ${k} de ${O}`
|
|
31
|
+
}), /* @__PURE__ */ u("div", {
|
|
32
|
+
className: "flex items-center gap-2",
|
|
33
|
+
children: [b && _ !== void 0 && /* @__PURE__ */ u(i, {
|
|
34
|
+
value: String(_),
|
|
35
|
+
onValueChange: (e) => b(Number(e)),
|
|
36
|
+
children: [/* @__PURE__ */ l(s, {
|
|
37
|
+
"aria-label": T,
|
|
38
|
+
className: "w-[4.5rem] text-body-xs",
|
|
39
|
+
children: /* @__PURE__ */ l(c, {})
|
|
40
|
+
}), /* @__PURE__ */ l(a, { children: v.map((e) => /* @__PURE__ */ l(o, {
|
|
41
|
+
value: String(e),
|
|
42
|
+
className: "text-body-xs",
|
|
43
|
+
children: e
|
|
44
|
+
}, e)) })]
|
|
45
|
+
}), /* @__PURE__ */ u("div", {
|
|
46
|
+
className: "flex items-center gap-1",
|
|
47
|
+
children: [
|
|
48
|
+
/* @__PURE__ */ l(r, {
|
|
49
|
+
type: "button",
|
|
50
|
+
size: "sm",
|
|
51
|
+
iconOnly: !0,
|
|
52
|
+
variant: "outline",
|
|
53
|
+
"data-attr": "pagination-prev",
|
|
54
|
+
"aria-label": C,
|
|
55
|
+
disabled: k === 1,
|
|
56
|
+
onClick: () => g(k - 1),
|
|
57
|
+
children: /* @__PURE__ */ l(t, { "aria-hidden": "true" })
|
|
58
|
+
}),
|
|
59
|
+
/* @__PURE__ */ l("div", {
|
|
60
|
+
className: "hidden items-center gap-1 sm:flex",
|
|
61
|
+
children: p(k, O).map((e) => /* @__PURE__ */ l(r, {
|
|
62
|
+
type: "button",
|
|
63
|
+
size: "sm",
|
|
64
|
+
iconOnly: !0,
|
|
65
|
+
variant: e === k ? "solid" : "ghost",
|
|
66
|
+
"data-attr": "pagination-page",
|
|
67
|
+
"aria-label": `Página ${e}`,
|
|
68
|
+
"aria-current": e === k ? "page" : void 0,
|
|
69
|
+
onClick: () => g(e),
|
|
70
|
+
children: e
|
|
71
|
+
}, e))
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ u("span", {
|
|
74
|
+
className: "px-2 text-body-xs text-muted-foreground sm:hidden",
|
|
75
|
+
children: [
|
|
76
|
+
k,
|
|
77
|
+
" / ",
|
|
78
|
+
O
|
|
79
|
+
]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ l(r, {
|
|
82
|
+
type: "button",
|
|
83
|
+
size: "sm",
|
|
84
|
+
iconOnly: !0,
|
|
85
|
+
variant: "outline",
|
|
86
|
+
"data-attr": "pagination-next",
|
|
87
|
+
"aria-label": w,
|
|
88
|
+
disabled: k === O,
|
|
89
|
+
onClick: () => g(k + 1),
|
|
90
|
+
children: /* @__PURE__ */ l(n, { "aria-hidden": "true" })
|
|
91
|
+
})
|
|
92
|
+
]
|
|
93
|
+
})]
|
|
94
|
+
})]
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
//#endregion
|
|
98
|
+
export { m as TablePagination };
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import * as t from "react";
|
|
3
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
4
|
+
//#region src/data-display/Timeline.tsx
|
|
5
|
+
var i = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("ol", {
|
|
6
|
+
ref: i,
|
|
7
|
+
className: e("flex flex-col", t),
|
|
8
|
+
...r
|
|
9
|
+
}));
|
|
10
|
+
i.displayName = "Timeline";
|
|
11
|
+
var a = {
|
|
12
|
+
neutral: "border-border bg-card text-foreground",
|
|
13
|
+
info: "border-info-border bg-info-bg text-info",
|
|
14
|
+
success: "border-success-border bg-success-bg text-success",
|
|
15
|
+
warning: "border-warning-border bg-warning-bg text-warning",
|
|
16
|
+
error: "border-error-border bg-error-bg text-error"
|
|
17
|
+
}, o = t.forwardRef(({ marker: t, current: i, last: o, tone: s = "neutral", className: c, children: l, ...u }, d) => /* @__PURE__ */ r("li", {
|
|
18
|
+
ref: d,
|
|
19
|
+
"aria-current": i ? "step" : void 0,
|
|
20
|
+
className: e("relative flex gap-3", !o && "pb-4", c),
|
|
21
|
+
...u,
|
|
22
|
+
children: [
|
|
23
|
+
!o && /* @__PURE__ */ n("span", {
|
|
24
|
+
"aria-hidden": "true",
|
|
25
|
+
className: "absolute left-4 top-8 h-[calc(100%-2rem)] w-px -translate-x-1/2 bg-muted"
|
|
26
|
+
}),
|
|
27
|
+
/* @__PURE__ */ n("span", {
|
|
28
|
+
"aria-hidden": "true",
|
|
29
|
+
className: e("relative z-10 flex size-8 shrink-0 items-center justify-center rounded-full border text-label-sm font-semibold shadow-md [&_svg]:size-4", i ? "border-primary bg-background text-primary ring-4 ring-primary/10" : a[s]),
|
|
30
|
+
children: t
|
|
31
|
+
}),
|
|
32
|
+
/* @__PURE__ */ n("div", {
|
|
33
|
+
className: "min-w-0 flex-1",
|
|
34
|
+
children: l
|
|
35
|
+
})
|
|
36
|
+
]
|
|
37
|
+
}));
|
|
38
|
+
o.displayName = "TimelineItem";
|
|
39
|
+
var s = t.forwardRef(({ className: t, ...r }, i) => /* @__PURE__ */ n("dl", {
|
|
40
|
+
ref: i,
|
|
41
|
+
className: e("grid gap-3", t),
|
|
42
|
+
...r
|
|
43
|
+
}));
|
|
44
|
+
s.displayName = "DescriptionList";
|
|
45
|
+
function c({ label: t, children: i, layout: a = "inline", className: o }) {
|
|
46
|
+
return /* @__PURE__ */ r("div", {
|
|
47
|
+
className: e("grid gap-1", a === "inline" && "sm:grid-cols-[9rem_1fr] sm:gap-3", o),
|
|
48
|
+
children: [/* @__PURE__ */ n("dt", {
|
|
49
|
+
className: "text-body-xs text-muted-foreground",
|
|
50
|
+
children: t
|
|
51
|
+
}), /* @__PURE__ */ n("dd", {
|
|
52
|
+
className: "min-w-0 text-body-md text-foreground",
|
|
53
|
+
children: i
|
|
54
|
+
})]
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
//#endregion
|
|
58
|
+
export { c as DescriptionItem, s as DescriptionList, i as Timeline, o as TimelineItem };
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
//#region src/data-display/chart-colors.ts
|
|
2
|
+
var e = {
|
|
3
|
+
primary: "hsl(var(--chart-1))",
|
|
4
|
+
primarySoft: "hsl(var(--chart-3))",
|
|
5
|
+
accent: "hsl(var(--chart-2))",
|
|
6
|
+
accentSoft: "hsl(var(--chart-5))",
|
|
7
|
+
positive: "hsl(var(--success))",
|
|
8
|
+
neutral: "hsl(var(--chart-6))",
|
|
9
|
+
neutralSoft: "hsl(var(--chart-4))",
|
|
10
|
+
surface: "hsl(var(--muted))",
|
|
11
|
+
warning: "hsl(var(--warning))",
|
|
12
|
+
info: "hsl(var(--info))",
|
|
13
|
+
error: "hsl(var(--error))"
|
|
14
|
+
}, t = [
|
|
15
|
+
e.primary,
|
|
16
|
+
e.accent,
|
|
17
|
+
e.primarySoft,
|
|
18
|
+
e.neutralSoft,
|
|
19
|
+
e.accentSoft,
|
|
20
|
+
e.neutral
|
|
21
|
+
], n = (e) => {
|
|
22
|
+
let t = String(e), n = 0;
|
|
23
|
+
for (let e = 0; e < t.length; e++) n = n * 31 + t.charCodeAt(e) | 0;
|
|
24
|
+
return Math.abs(n);
|
|
25
|
+
}, r = Array.from({ length: 8 }, (e, t) => `hsl(var(--categorical-${t + 1}))`), i = (e) => r[n(e) % r.length], a = Array.from({ length: 18 }, (e, t) => ({
|
|
26
|
+
background: `hsl(var(--identity-${t + 1}))`,
|
|
27
|
+
foreground: `hsl(var(--identity-${t + 1}-foreground))`
|
|
28
|
+
})), o = (e) => a[n(e) % a.length], s = 6, c = (e) => `hsl(var(--entity-${e}))`, l = (e, t) => {
|
|
29
|
+
let r = n(t) % s + 1;
|
|
30
|
+
return {
|
|
31
|
+
background: `hsl(var(--entity-${e}-${r}))`,
|
|
32
|
+
foreground: `hsl(var(--entity-${e}-${r}-foreground))`
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
//#endregion
|
|
36
|
+
export { i as categoricalColor, r as categoricalColors, e as chartColors, t as chartSeries, c as entityColor, l as entityTone, o as identityColor, a as identityColors };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BADGE_APPEARANCES as e, Badge as t, badgeVariants as n } from "./data-display/Badge.js";
|
|
2
|
+
import { Item as r, ItemActions as i, ItemContent as a, ItemDescription as o, ItemTitle as s } from "./data-display/Item.js";
|
|
3
|
+
import { ICON_TILE_APPEARANCES as c, IconTile as l, iconTileVariants as u } from "./data-display/IconTile.js";
|
|
4
|
+
import { DataTable as d, DataTableBody as f, DataTableCaption as p, DataTableCell as m, DataTableEmpty as h, DataTableFooter as g, DataTableHead as _, DataTableHeader as v, DataTableLoading as y, DataTableRow as b, DataTableSortButton as x, tableCellTones as S } from "./data-display/DataTable.js";
|
|
5
|
+
import { TablePagination as C } from "./data-display/TablePagination.js";
|
|
6
|
+
import { Board as w, BoardCard as T, BoardColumn as E } from "./data-display/Board.js";
|
|
7
|
+
import { CARD_TONES as D, CARD_VARIANTS as O, Card as k, CardContent as A, CardDescription as j, CardFooter as M, CardHeader as N, CardTitle as P, cardVariants as F } from "./data-display/Card.js";
|
|
8
|
+
import { Avatar as I, AvatarFallback as L, AvatarImage as R } from "./data-display/Avatar.js";
|
|
9
|
+
import { Separator as z } from "./data-display/Separator.js";
|
|
10
|
+
import { DescriptionItem as B, DescriptionList as V, Timeline as H, TimelineItem as U } from "./data-display/Timeline.js";
|
|
11
|
+
import { Overline as W } from "./data-display/Overline.js";
|
|
12
|
+
import { categoricalColor as G, categoricalColors as K, chartColors as q, chartSeries as J, entityColor as Y, entityTone as X, identityColor as Z, identityColors as Q } from "./data-display/chart-colors.js";
|
|
13
|
+
import { Code as $, CodeBlock as ee, Highlight as te } from "./data-display/Code.js";
|
|
14
|
+
import { ChatBubble as ne, ChatBubbleMedia as re, ChatBubbleMeta as ie, ChatBubbleQuote as ae, ChatWallpaper as oe } from "./data-display/ChatBubble.js";
|
|
15
|
+
import { Stat as se, StatGroup as ce } from "./data-display/Stat.js";
|
|
16
|
+
export { I as Avatar, L as AvatarFallback, R as AvatarImage, e as BADGE_APPEARANCES, t as Badge, w as Board, T as BoardCard, E as BoardColumn, D as CARD_TONES, O as CARD_VARIANTS, k as Card, A as CardContent, j as CardDescription, M as CardFooter, N as CardHeader, P as CardTitle, ne as ChatBubble, re as ChatBubbleMedia, ie as ChatBubbleMeta, ae as ChatBubbleQuote, oe as ChatWallpaper, $ as Code, ee as CodeBlock, d as DataTable, f as DataTableBody, p as DataTableCaption, m as DataTableCell, h as DataTableEmpty, g as DataTableFooter, _ as DataTableHead, v as DataTableHeader, y as DataTableLoading, b as DataTableRow, x as DataTableSortButton, B as DescriptionItem, V as DescriptionList, te as Highlight, c as ICON_TILE_APPEARANCES, l as IconTile, r as Item, i as ItemActions, a as ItemContent, o as ItemDescription, s as ItemTitle, W as Overline, z as Separator, se as Stat, ce as StatGroup, C as TablePagination, H as Timeline, U as TimelineItem, n as badgeVariants, F as cardVariants, G as categoricalColor, K as categoricalColors, q as chartColors, J as chartSeries, Y as entityColor, X as entityTone, u as iconTileVariants, Z as identityColor, Q as identityColors, S as tableCellTones };
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import { CircleAlert as t, CircleCheck as n, Info as r, Lightbulb as i, TriangleAlert as a } from "../icons/glyphs.js";
|
|
3
|
+
import "../icons.js";
|
|
4
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
5
|
+
import { cva as c } from "class-variance-authority";
|
|
6
|
+
//#region src/feedback/Callout.tsx
|
|
7
|
+
var l = c("flex w-full items-start rounded-2xl border", {
|
|
8
|
+
variants: {
|
|
9
|
+
tone: {
|
|
10
|
+
success: "border-success-border bg-success-bg text-success",
|
|
11
|
+
warning: "border-warning-border bg-warning-bg text-warning",
|
|
12
|
+
info: "border-info-border bg-info-bg text-info",
|
|
13
|
+
error: "border-error-border bg-error-bg text-error",
|
|
14
|
+
neutral: "border-border bg-secondary/50 text-muted-foreground"
|
|
15
|
+
},
|
|
16
|
+
size: {
|
|
17
|
+
sm: "gap-2 rounded-xl px-3 py-2 text-body-xs",
|
|
18
|
+
md: "gap-3 p-4 text-body-md"
|
|
19
|
+
},
|
|
20
|
+
variant: {
|
|
21
|
+
card: "",
|
|
22
|
+
banner: "items-center rounded-none border-x-0"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
compoundVariants: [{
|
|
26
|
+
variant: "banner",
|
|
27
|
+
size: "sm",
|
|
28
|
+
className: "rounded-none px-4 py-1.5"
|
|
29
|
+
}, {
|
|
30
|
+
variant: "banner",
|
|
31
|
+
size: "md",
|
|
32
|
+
className: "rounded-none px-4 py-2"
|
|
33
|
+
}],
|
|
34
|
+
defaultVariants: {
|
|
35
|
+
tone: "info",
|
|
36
|
+
size: "md",
|
|
37
|
+
variant: "card"
|
|
38
|
+
}
|
|
39
|
+
}), u = {
|
|
40
|
+
success: n,
|
|
41
|
+
warning: a,
|
|
42
|
+
info: r,
|
|
43
|
+
error: t,
|
|
44
|
+
neutral: i
|
|
45
|
+
}, d = ({ tone: t = "info", size: n = "md", variant: r = "card", title: i, children: a, icon: c, action: d, className: f }) => {
|
|
46
|
+
let p = u[t ?? "info"];
|
|
47
|
+
return r === "banner" ? /* @__PURE__ */ s("div", {
|
|
48
|
+
role: t === "neutral" ? "note" : "alert",
|
|
49
|
+
className: e(l({
|
|
50
|
+
tone: t,
|
|
51
|
+
size: n,
|
|
52
|
+
variant: r
|
|
53
|
+
}), f),
|
|
54
|
+
children: [
|
|
55
|
+
c !== !1 && /* @__PURE__ */ o("span", {
|
|
56
|
+
"aria-hidden": "true",
|
|
57
|
+
className: "shrink-0 [&_svg]:size-3.5",
|
|
58
|
+
children: c ?? /* @__PURE__ */ o(p, {})
|
|
59
|
+
}),
|
|
60
|
+
/* @__PURE__ */ s("p", {
|
|
61
|
+
className: "min-w-0 flex-1 truncate",
|
|
62
|
+
children: [
|
|
63
|
+
i && /* @__PURE__ */ o("span", {
|
|
64
|
+
className: "font-medium",
|
|
65
|
+
children: i
|
|
66
|
+
}),
|
|
67
|
+
i && a && /* @__PURE__ */ o("span", { children: " · " }),
|
|
68
|
+
a && /* @__PURE__ */ o("span", { children: a })
|
|
69
|
+
]
|
|
70
|
+
}),
|
|
71
|
+
d && /* @__PURE__ */ o("div", {
|
|
72
|
+
className: "flex shrink-0 items-center gap-1.5 text-foreground",
|
|
73
|
+
children: d
|
|
74
|
+
})
|
|
75
|
+
]
|
|
76
|
+
}) : /* @__PURE__ */ s("div", {
|
|
77
|
+
role: t === "neutral" ? "note" : "alert",
|
|
78
|
+
className: e(l({
|
|
79
|
+
tone: t,
|
|
80
|
+
size: n,
|
|
81
|
+
variant: r
|
|
82
|
+
}), f),
|
|
83
|
+
children: [
|
|
84
|
+
c !== !1 && /* @__PURE__ */ o("span", {
|
|
85
|
+
"aria-hidden": "true",
|
|
86
|
+
className: e("mt-0.5 shrink-0", n === "sm" ? "[&_svg]:size-3.5" : "[&_svg]:size-4"),
|
|
87
|
+
children: c ?? /* @__PURE__ */ o(p, {})
|
|
88
|
+
}),
|
|
89
|
+
/* @__PURE__ */ s("div", {
|
|
90
|
+
className: "min-w-0 flex-1 space-y-1",
|
|
91
|
+
children: [i && /* @__PURE__ */ o("p", {
|
|
92
|
+
className: "font-medium leading-none",
|
|
93
|
+
children: i
|
|
94
|
+
}), a && /* @__PURE__ */ o("div", {
|
|
95
|
+
className: "[&_p]:leading-relaxed",
|
|
96
|
+
children: a
|
|
97
|
+
})]
|
|
98
|
+
}),
|
|
99
|
+
d && /* @__PURE__ */ o("div", {
|
|
100
|
+
className: "shrink-0",
|
|
101
|
+
children: d
|
|
102
|
+
})
|
|
103
|
+
]
|
|
104
|
+
});
|
|
105
|
+
};
|
|
106
|
+
//#endregion
|
|
107
|
+
export { d as Callout };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import { CircleAlert as t, CircleCheck as n, Inbox as r } from "../icons/glyphs.js";
|
|
3
|
+
import "../icons.js";
|
|
4
|
+
import { Button as i } from "../forms/Button.js";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region src/feedback/FeedbackState.tsx
|
|
7
|
+
var s = {
|
|
8
|
+
empty: "bg-secondary text-secondary-foreground",
|
|
9
|
+
error: "bg-error-bg text-error",
|
|
10
|
+
success: "bg-success-bg text-success"
|
|
11
|
+
}, c = {
|
|
12
|
+
empty: /* @__PURE__ */ a(r, {}),
|
|
13
|
+
error: /* @__PURE__ */ a(t, {}),
|
|
14
|
+
success: /* @__PURE__ */ a(n, {})
|
|
15
|
+
};
|
|
16
|
+
function l({ title: t, description: n, icon: r, actionLabel: l, onAction: u, actionDataAttr: d, variant: f = "empty", plain: p = !1, className: m }) {
|
|
17
|
+
return /* @__PURE__ */ o("div", {
|
|
18
|
+
className: e("flex flex-col items-center justify-center text-center", p ? "px-4 py-8" : "min-h-52 rounded-2xl border border-dashed border-border bg-card p-6", m),
|
|
19
|
+
children: [
|
|
20
|
+
/* @__PURE__ */ a("div", {
|
|
21
|
+
"aria-hidden": "true",
|
|
22
|
+
className: e("mb-3 flex size-10 items-center justify-center rounded-2xl [&_svg]:size-5", s[f]),
|
|
23
|
+
children: r ?? c[f]
|
|
24
|
+
}),
|
|
25
|
+
/* @__PURE__ */ a("p", {
|
|
26
|
+
className: "text-label-md text-foreground",
|
|
27
|
+
children: t
|
|
28
|
+
}),
|
|
29
|
+
n && /* @__PURE__ */ a("div", {
|
|
30
|
+
className: "mt-1 max-w-sm text-body-md text-muted-foreground",
|
|
31
|
+
children: n
|
|
32
|
+
}),
|
|
33
|
+
l && /* @__PURE__ */ a(i, {
|
|
34
|
+
className: "mt-4",
|
|
35
|
+
variant: f === "error" ? "soft" : "outline",
|
|
36
|
+
tone: f === "error" ? "error" : void 0,
|
|
37
|
+
onClick: u,
|
|
38
|
+
"data-attr": d,
|
|
39
|
+
children: l
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
var u = (e) => /* @__PURE__ */ a(l, {
|
|
45
|
+
...e,
|
|
46
|
+
variant: "empty"
|
|
47
|
+
}), d = (e) => /* @__PURE__ */ a(l, {
|
|
48
|
+
...e,
|
|
49
|
+
variant: "error"
|
|
50
|
+
}), f = (e) => /* @__PURE__ */ a(l, {
|
|
51
|
+
...e,
|
|
52
|
+
variant: "success"
|
|
53
|
+
});
|
|
54
|
+
//#endregion
|
|
55
|
+
export { u as EmptyState, d as ErrorState, l as FeedbackState, f as SuccessState };
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import { Loader2 as t } from "../icons/glyphs.js";
|
|
3
|
+
import "../icons.js";
|
|
4
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
5
|
+
//#region src/feedback/LoadingState.tsx
|
|
6
|
+
var i = {
|
|
7
|
+
block: "flex flex-col items-center justify-center gap-4",
|
|
8
|
+
page: "flex min-h-[400px] flex-col items-center justify-center gap-4",
|
|
9
|
+
inline: "inline-flex items-center gap-2",
|
|
10
|
+
overlay: "absolute inset-0 z-20 flex items-center justify-center gap-4 rounded-[inherit] bg-card/50 backdrop-blur-[1px]"
|
|
11
|
+
}, a = ({ text: a = "Cargando...", layout: o = "block", className: s }) => /* @__PURE__ */ r("div", {
|
|
12
|
+
role: "status",
|
|
13
|
+
"aria-live": "polite",
|
|
14
|
+
className: e(i[o], s),
|
|
15
|
+
children: [/* @__PURE__ */ n(t, {
|
|
16
|
+
"aria-hidden": "true",
|
|
17
|
+
className: e("animate-spin text-primary motion-reduce:animate-none", o === "inline" ? "size-4" : "size-8")
|
|
18
|
+
}), /* @__PURE__ */ n("p", {
|
|
19
|
+
className: "font-ibm-plex text-body-md text-muted-foreground",
|
|
20
|
+
children: a
|
|
21
|
+
})]
|
|
22
|
+
});
|
|
23
|
+
//#endregion
|
|
24
|
+
export { a as LoadingState };
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../utils.js";
|
|
3
|
+
import * as t from "react";
|
|
4
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
5
|
+
import * as r from "@radix-ui/react-progress";
|
|
6
|
+
//#region src/feedback/Progress.tsx
|
|
7
|
+
var i = {
|
|
8
|
+
primary: "bg-primary",
|
|
9
|
+
tertiary: "bg-tertiary",
|
|
10
|
+
success: "bg-success",
|
|
11
|
+
warning: "bg-warning",
|
|
12
|
+
error: "bg-error",
|
|
13
|
+
info: "bg-info",
|
|
14
|
+
muted: "bg-muted-foreground/40"
|
|
15
|
+
}, a = {
|
|
16
|
+
xs: "h-1",
|
|
17
|
+
sm: "h-1.5",
|
|
18
|
+
md: "h-2",
|
|
19
|
+
lg: "h-3",
|
|
20
|
+
xl: "h-4"
|
|
21
|
+
}, o = (e) => Math.min(100, Math.max(0, e)), s = t.forwardRef(({ className: t, value: s = 0, tone: c = "primary", size: l = "md", orientation: u = "horizontal", color: d, segments: f, ...p }, m) => {
|
|
22
|
+
let h = u === "vertical", g = e("relative overflow-hidden bg-secondary", h ? "h-full rounded-md" : e("w-full rounded-full", a[l]), t);
|
|
23
|
+
if (f) return /* @__PURE__ */ n("div", {
|
|
24
|
+
ref: m,
|
|
25
|
+
role: "img",
|
|
26
|
+
"aria-label": p["aria-label"] ?? f.map((e) => e.label ?? `${e.value}%`).join(", "),
|
|
27
|
+
className: e(g, "flex"),
|
|
28
|
+
children: f.map((t, r) => /* @__PURE__ */ n("span", {
|
|
29
|
+
className: e("h-full transition-[width] duration-slow ease-standard motion-reduce:transition-none", i[t.tone]),
|
|
30
|
+
style: { width: `${o(t.value)}%` }
|
|
31
|
+
}, r))
|
|
32
|
+
});
|
|
33
|
+
let _ = o(s ?? 0);
|
|
34
|
+
return /* @__PURE__ */ n(r.Root, {
|
|
35
|
+
ref: m,
|
|
36
|
+
value: _,
|
|
37
|
+
"data-orientation": u,
|
|
38
|
+
className: g,
|
|
39
|
+
...p,
|
|
40
|
+
children: /* @__PURE__ */ n(r.Indicator, {
|
|
41
|
+
className: e("h-full w-full transition-transform duration-slow ease-standard motion-reduce:transition-none", i[c]),
|
|
42
|
+
style: {
|
|
43
|
+
transform: h ? `translateY(${100 - _}%)` : `translateX(-${100 - _}%)`,
|
|
44
|
+
backgroundColor: d
|
|
45
|
+
}
|
|
46
|
+
})
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
s.displayName = r.Root.displayName;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { s as Progress, i as progressTones };
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
3
|
+
//#region src/feedback/ProgressRing.tsx
|
|
4
|
+
function r({ value: r, max: i = 100, size: a = 48, strokeWidth: o = 4, label: s, showValue: c = !0, valueLabel: l = (e) => `${e}%`, className: u, style: d, ...f }) {
|
|
5
|
+
let p = i > 0 ? i : 100, m = Math.round(Math.min(Math.max(r / p, 0), 1) * 100), h = (a - o) / 2, g = 2 * Math.PI * h, _ = g * (1 - m / 100);
|
|
6
|
+
return /* @__PURE__ */ n("div", {
|
|
7
|
+
role: "progressbar",
|
|
8
|
+
"aria-valuemin": 0,
|
|
9
|
+
"aria-valuemax": p,
|
|
10
|
+
"aria-valuenow": Math.min(Math.max(r, 0), p),
|
|
11
|
+
"aria-valuetext": l(m),
|
|
12
|
+
className: e("relative inline-flex shrink-0 items-center justify-center", u),
|
|
13
|
+
style: {
|
|
14
|
+
width: a,
|
|
15
|
+
height: a,
|
|
16
|
+
...d
|
|
17
|
+
},
|
|
18
|
+
...f,
|
|
19
|
+
children: [/* @__PURE__ */ n("svg", {
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
className: "-rotate-90",
|
|
22
|
+
width: a,
|
|
23
|
+
height: a,
|
|
24
|
+
viewBox: `0 0 ${a} ${a}`,
|
|
25
|
+
children: [/* @__PURE__ */ t("circle", {
|
|
26
|
+
className: "stroke-muted",
|
|
27
|
+
cx: a / 2,
|
|
28
|
+
cy: a / 2,
|
|
29
|
+
r: h,
|
|
30
|
+
fill: "none",
|
|
31
|
+
strokeWidth: o
|
|
32
|
+
}), /* @__PURE__ */ t("circle", {
|
|
33
|
+
className: "stroke-primary transition-[stroke-dashoffset] duration-slow ease-standard motion-reduce:transition-none",
|
|
34
|
+
cx: a / 2,
|
|
35
|
+
cy: a / 2,
|
|
36
|
+
r: h,
|
|
37
|
+
fill: "none",
|
|
38
|
+
strokeWidth: o,
|
|
39
|
+
strokeLinecap: "round",
|
|
40
|
+
strokeDasharray: g,
|
|
41
|
+
strokeDashoffset: _
|
|
42
|
+
})]
|
|
43
|
+
}), /* @__PURE__ */ t("span", {
|
|
44
|
+
className: "absolute inset-0 flex items-center justify-center text-label-sm font-semibold text-foreground",
|
|
45
|
+
children: s ?? (c ? l(m) : null)
|
|
46
|
+
})]
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
//#endregion
|
|
50
|
+
export { r as ProgressRing };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { cn as e } from "../utils.js";
|
|
2
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
3
|
+
//#region src/feedback/Skeleton.tsx
|
|
4
|
+
function n({ className: n, ...r }) {
|
|
5
|
+
return /* @__PURE__ */ t("div", {
|
|
6
|
+
"aria-hidden": "true",
|
|
7
|
+
className: e("animate-pulse rounded-xl bg-muted motion-reduce:animate-none", n),
|
|
8
|
+
...r
|
|
9
|
+
});
|
|
10
|
+
}
|
|
11
|
+
//#endregion
|
|
12
|
+
export { n as Skeleton };
|
|
@@ -0,0 +1,145 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cn as e } from "../utils.js";
|
|
3
|
+
import { RevealCircle as t } from "../layout/PageSurface.js";
|
|
4
|
+
import "../layout.js";
|
|
5
|
+
import { useState as n } from "react";
|
|
6
|
+
import { jsx as r, jsxs as i } from "react/jsx-runtime";
|
|
7
|
+
import { motion as a, useReducedMotion as o } from "framer-motion";
|
|
8
|
+
//#region src/feedback/SplashScreen.tsx
|
|
9
|
+
var s = "M45,-51.1C56.6,-40.3,63,-24.1,65.2,-7.1C67.4,10,65.3,27.8,55.8,40.5C46.3,53.2,29.3,60.7,11.4,63.5C-6.5,66.3,-25.3,64.3,-39.8,55C-54.3,45.7,-64.5,29,-67.8,11C-71.2,-7,-67.6,-26.3,-57.2,-37.8C-46.8,-49.3,-29.5,-53,-13.1,-54.8C3.3,-56.5,33.4,-61.8,45,-51.1Z", c = a.create(t), l = ({ position: t = "fixed", label: l = "Cargando aplicación" } = {}) => {
|
|
10
|
+
let [u, d] = n(!0), [f, p] = n(!1), m = o();
|
|
11
|
+
return {
|
|
12
|
+
showSplash: u,
|
|
13
|
+
triggerExit: () => {
|
|
14
|
+
m ? d(!1) : p(!0);
|
|
15
|
+
},
|
|
16
|
+
SplashElement: u ? /* @__PURE__ */ i("div", {
|
|
17
|
+
className: e(t, "inset-0 z-50 overflow-hidden"),
|
|
18
|
+
role: "status",
|
|
19
|
+
"aria-label": l,
|
|
20
|
+
children: [
|
|
21
|
+
/* @__PURE__ */ r(a.div, {
|
|
22
|
+
className: "absolute inset-0 bg-success-bg",
|
|
23
|
+
animate: f ? { opacity: 0 } : void 0,
|
|
24
|
+
transition: {
|
|
25
|
+
duration: .3,
|
|
26
|
+
delay: .55,
|
|
27
|
+
ease: "easeOut"
|
|
28
|
+
}
|
|
29
|
+
}),
|
|
30
|
+
/* @__PURE__ */ r(c, {
|
|
31
|
+
initial: {
|
|
32
|
+
x: "-50%",
|
|
33
|
+
y: "-50%",
|
|
34
|
+
scale: 0,
|
|
35
|
+
opacity: 0
|
|
36
|
+
},
|
|
37
|
+
animate: f ? {
|
|
38
|
+
scale: 1,
|
|
39
|
+
opacity: [
|
|
40
|
+
1,
|
|
41
|
+
1,
|
|
42
|
+
0
|
|
43
|
+
]
|
|
44
|
+
} : void 0,
|
|
45
|
+
transition: {
|
|
46
|
+
scale: {
|
|
47
|
+
duration: .7,
|
|
48
|
+
delay: .1,
|
|
49
|
+
ease: "easeInOut"
|
|
50
|
+
},
|
|
51
|
+
opacity: {
|
|
52
|
+
duration: .85,
|
|
53
|
+
times: [
|
|
54
|
+
0,
|
|
55
|
+
.65,
|
|
56
|
+
1
|
|
57
|
+
],
|
|
58
|
+
ease: "easeOut"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
onAnimationComplete: () => d(!1)
|
|
62
|
+
}),
|
|
63
|
+
/* @__PURE__ */ i("div", {
|
|
64
|
+
className: "absolute inset-0 flex items-center justify-center",
|
|
65
|
+
children: [/* @__PURE__ */ r(a.div, {
|
|
66
|
+
className: "absolute",
|
|
67
|
+
animate: f ? { opacity: 0 } : void 0,
|
|
68
|
+
transition: {
|
|
69
|
+
duration: .25,
|
|
70
|
+
ease: "easeIn"
|
|
71
|
+
},
|
|
72
|
+
children: /* @__PURE__ */ r(a.svg, {
|
|
73
|
+
width: "320",
|
|
74
|
+
height: "320",
|
|
75
|
+
viewBox: "-80 -80 160 160",
|
|
76
|
+
"aria-hidden": "true",
|
|
77
|
+
animate: m ? void 0 : {
|
|
78
|
+
rotate: 360,
|
|
79
|
+
scale: 1.1
|
|
80
|
+
},
|
|
81
|
+
transition: {
|
|
82
|
+
rotate: {
|
|
83
|
+
duration: 25,
|
|
84
|
+
ease: "linear",
|
|
85
|
+
repeat: Infinity
|
|
86
|
+
},
|
|
87
|
+
scale: {
|
|
88
|
+
duration: 2.5,
|
|
89
|
+
ease: "easeInOut",
|
|
90
|
+
repeat: Infinity,
|
|
91
|
+
repeatType: "reverse"
|
|
92
|
+
}
|
|
93
|
+
},
|
|
94
|
+
children: /* @__PURE__ */ r("path", {
|
|
95
|
+
d: s,
|
|
96
|
+
className: "fill-primary opacity-[0.07]"
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
}), /* @__PURE__ */ r(a.div, {
|
|
100
|
+
className: "relative z-10",
|
|
101
|
+
initial: !m && {
|
|
102
|
+
scale: .5,
|
|
103
|
+
opacity: 0
|
|
104
|
+
},
|
|
105
|
+
animate: f ? {
|
|
106
|
+
scale: 1.1,
|
|
107
|
+
opacity: 0
|
|
108
|
+
} : {
|
|
109
|
+
scale: 1,
|
|
110
|
+
opacity: 1
|
|
111
|
+
},
|
|
112
|
+
transition: f ? {
|
|
113
|
+
duration: .3,
|
|
114
|
+
ease: "easeIn"
|
|
115
|
+
} : {
|
|
116
|
+
duration: .7,
|
|
117
|
+
ease: "backOut"
|
|
118
|
+
},
|
|
119
|
+
children: /* @__PURE__ */ i(a.picture, {
|
|
120
|
+
className: "block",
|
|
121
|
+
animate: m ? void 0 : { scale: 1.05 },
|
|
122
|
+
transition: {
|
|
123
|
+
delay: .7,
|
|
124
|
+
duration: 1.4,
|
|
125
|
+
ease: "easeInOut",
|
|
126
|
+
repeat: Infinity,
|
|
127
|
+
repeatType: "reverse"
|
|
128
|
+
},
|
|
129
|
+
children: [/* @__PURE__ */ r("source", {
|
|
130
|
+
srcSet: "/galo-logo-256.webp",
|
|
131
|
+
type: "image/webp"
|
|
132
|
+
}), /* @__PURE__ */ r("img", {
|
|
133
|
+
src: "/galo-logo-256.png",
|
|
134
|
+
alt: "Galo AI",
|
|
135
|
+
className: "h-28 w-28"
|
|
136
|
+
})]
|
|
137
|
+
})
|
|
138
|
+
})]
|
|
139
|
+
})
|
|
140
|
+
]
|
|
141
|
+
}) : null
|
|
142
|
+
};
|
|
143
|
+
};
|
|
144
|
+
//#endregion
|
|
145
|
+
export { l as useSplashScreen };
|