@cascivo/react 0.9.0 → 0.10.0
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 +5 -5
- package/dist/command-menu/command-menu.js +2 -2
- package/dist/field/field.js +24 -15
- package/dist/index.d.ts +13 -0
- package/dist/node/accordion/accordion.js +95 -0
- package/dist/node/accordion/accordion.module.js +13 -0
- package/dist/node/action-sheet/action-sheet.js +91 -0
- package/dist/node/action-sheet/action-sheet.module.js +14 -0
- package/dist/node/alert/alert.js +55 -0
- package/dist/node/alert/alert.module.js +13 -0
- package/dist/node/alert-dialog/alert-dialog.js +68 -0
- package/dist/node/alert-dialog/alert-dialog.module.js +13 -0
- package/dist/node/app-shell/app-shell.js +80 -0
- package/dist/node/app-shell/app-shell.module.js +14 -0
- package/dist/node/aspect-ratio/aspect-ratio.js +22 -0
- package/dist/node/aspect-ratio/aspect-ratio.module.js +8 -0
- package/dist/node/avatar/avatar.js +57 -0
- package/dist/node/avatar/avatar.module.js +10 -0
- package/dist/node/avatar-group/avatar-group.js +26 -0
- package/dist/node/avatar-group/avatar-group.module.js +8 -0
- package/dist/node/badge/badge.js +17 -0
- package/dist/node/badge/badge.module.js +5 -0
- package/dist/node/blockquote/blockquote.js +18 -0
- package/dist/node/blockquote/blockquote.module.js +8 -0
- package/dist/node/bottom-sheet/bottom-sheet.js +111 -0
- package/dist/node/bottom-sheet/bottom-sheet.module.js +16 -0
- package/dist/node/breadcrumb/breadcrumb.js +28 -0
- package/dist/node/breadcrumb/breadcrumb.module.js +5 -0
- package/dist/node/button/button.js +31 -0
- package/dist/node/button/button.module.js +5 -0
- package/dist/node/button-group/button-group.js +39 -0
- package/dist/node/button-group/button-group.module.js +5 -0
- package/dist/node/calendar/calendar.js +195 -0
- package/dist/node/calendar/calendar.module.js +16 -0
- package/dist/node/card/card.js +45 -0
- package/dist/node/card/card.module.js +11 -0
- package/dist/node/carousel/carousel.js +138 -0
- package/dist/node/carousel/carousel.module.js +15 -0
- package/dist/node/chat-bubble/chat-bubble.js +33 -0
- package/dist/node/chat-bubble/chat-bubble.module.js +13 -0
- package/dist/node/checkbox/checkbox.js +38 -0
- package/dist/node/checkbox/checkbox.module.js +10 -0
- package/dist/node/checkbox-card/checkbox-card.js +48 -0
- package/dist/node/checkbox-card/checkbox-card.module.js +13 -0
- package/dist/node/code/code.js +16 -0
- package/dist/node/code/code.module.js +5 -0
- package/dist/node/code-snippet/code-snippet.js +116 -0
- package/dist/node/code-snippet/code-snippet.module.js +19 -0
- package/dist/node/code-snippet/highlight.js +69 -0
- package/dist/node/collapsible/collapsible.js +42 -0
- package/dist/node/collapsible/collapsible.module.js +10 -0
- package/dist/node/color-picker/color-picker.js +268 -0
- package/dist/node/color-picker/color-picker.module.js +20 -0
- package/dist/node/combobox/combobox.js +164 -0
- package/dist/node/combobox/combobox.module.js +21 -0
- package/dist/node/command-menu/command-menu.js +425 -0
- package/dist/node/command-menu/command-menu.module.js +36 -0
- package/dist/node/comparison/comparison.js +69 -0
- package/dist/node/comparison/comparison.module.js +11 -0
- package/dist/node/contained-list/contained-list.js +41 -0
- package/dist/node/contained-list/contained-list.module.js +13 -0
- package/dist/node/context-menu/context-menu.js +89 -0
- package/dist/node/context-menu/context-menu.module.js +9 -0
- package/dist/node/copy-button/copy-button.js +58 -0
- package/dist/node/copy-button/copy-button.module.js +8 -0
- package/dist/node/data-list/data-list.js +27 -0
- package/dist/node/data-list/data-list.module.js +10 -0
- package/dist/node/data-table/data-table.js +370 -0
- package/dist/node/data-table/data-table.module.js +35 -0
- package/dist/node/date-picker/date-picker.js +218 -0
- package/dist/node/date-picker/date-picker.module.js +25 -0
- package/dist/node/date-range-picker/date-range-picker.js +196 -0
- package/dist/node/date-range-picker/date-range-picker.module.js +20 -0
- package/dist/node/dock/dock.js +34 -0
- package/dist/node/dock/dock.module.js +10 -0
- package/dist/node/drawer/drawer.js +95 -0
- package/dist/node/drawer/drawer.module.js +15 -0
- package/dist/node/dropdown/dropdown.js +109 -0
- package/dist/node/dropdown/dropdown.module.js +11 -0
- package/dist/node/editable/editable.js +67 -0
- package/dist/node/editable/editable.module.js +13 -0
- package/dist/node/empty-state/empty-state.js +34 -0
- package/dist/node/empty-state/empty-state.module.js +11 -0
- package/dist/node/fab/fab.js +93 -0
- package/dist/node/fab/fab.module.js +14 -0
- package/dist/node/field/field.js +48 -0
- package/dist/node/field/field.module.js +9 -0
- package/dist/node/file-uploader/file-uploader.js +122 -0
- package/dist/node/file-uploader/file-uploader.module.js +20 -0
- package/dist/node/filter/filter.js +34 -0
- package/dist/node/filter/filter.module.js +8 -0
- package/dist/node/form/form.js +95 -0
- package/dist/node/form/form.module.js +5 -0
- package/dist/node/header/header.js +44 -0
- package/dist/node/header/header.module.js +13 -0
- package/dist/node/header-panel/header-panel.js +74 -0
- package/dist/node/header-panel/header-panel.module.js +11 -0
- package/dist/node/heading/heading.js +24 -0
- package/dist/node/heading/heading.module.js +5 -0
- package/dist/node/hover-card/hover-card.js +84 -0
- package/dist/node/hover-card/hover-card.module.js +8 -0
- package/dist/node/icon-button/icon-button.js +21 -0
- package/dist/node/icon-button/icon-button.module.js +5 -0
- package/dist/node/image/image.js +64 -0
- package/dist/node/image/image.module.js +11 -0
- package/dist/node/index.js +2 -0
- package/dist/node/indicator/indicator.js +18 -0
- package/dist/node/indicator/indicator.module.js +8 -0
- package/dist/node/inline-loading/inline-loading.js +76 -0
- package/dist/node/inline-loading/inline-loading.module.js +11 -0
- package/dist/node/input/input.js +54 -0
- package/dist/node/input/input.module.js +11 -0
- package/dist/node/input-group/input-group.js +41 -0
- package/dist/node/input-group/input-group.module.js +11 -0
- package/dist/node/item/item.js +52 -0
- package/dist/node/item/item.module.js +12 -0
- package/dist/node/join/join.js +14 -0
- package/dist/node/join/join.module.js +5 -0
- package/dist/node/kbd/kbd.js +16 -0
- package/dist/node/kbd/kbd.module.js +5 -0
- package/dist/node/label/label.js +25 -0
- package/dist/node/label/label.module.js +9 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.js +19 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +6 -0
- package/dist/node/layouts/src/center/center.js +18 -0
- package/dist/node/layouts/src/center/center.module.js +5 -0
- package/dist/node/layouts/src/columns/columns.js +23 -0
- package/dist/node/layouts/src/columns/columns.module.js +8 -0
- package/dist/node/layouts/src/flex/flex.js +22 -0
- package/dist/node/layouts/src/flex/flex.module.js +5 -0
- package/dist/node/layouts/src/grid/grid.js +57 -0
- package/dist/node/layouts/src/grid/grid.module.js +9 -0
- package/dist/node/layouts/src/spacer/spacer.js +19 -0
- package/dist/node/layouts/src/spacer/spacer.module.js +5 -0
- package/dist/node/link/link.js +22 -0
- package/dist/node/link/link.module.js +5 -0
- package/dist/node/list/list.js +23 -0
- package/dist/node/list/list.module.js +8 -0
- package/dist/node/log-viewer/log-viewer.js +184 -0
- package/dist/node/log-viewer/log-viewer.module.js +18 -0
- package/dist/node/menu/menu.js +121 -0
- package/dist/node/menu/menu.module.js +10 -0
- package/dist/node/menu-button/menu-button.js +92 -0
- package/dist/node/menu-button/menu-button.module.js +10 -0
- package/dist/node/menubar/menubar.js +103 -0
- package/dist/node/menubar/menubar.module.js +10 -0
- package/dist/node/modal/modal.js +70 -0
- package/dist/node/modal/modal.module.js +13 -0
- package/dist/node/multi-select/multi-select.js +106 -0
- package/dist/node/multi-select/multi-select.module.js +17 -0
- package/dist/node/native-select/native-select.js +37 -0
- package/dist/node/native-select/native-select.module.js +9 -0
- package/dist/node/navigation-menu/navigation-menu.js +99 -0
- package/dist/node/navigation-menu/navigation-menu.module.js +12 -0
- package/dist/node/notification/notification.js +134 -0
- package/dist/node/notification/notification.module.js +13 -0
- package/dist/node/number-input/number-input.js +145 -0
- package/dist/node/number-input/number-input.module.js +14 -0
- package/dist/node/otp-input/otp-input.js +70 -0
- package/dist/node/otp-input/otp-input.module.js +8 -0
- package/dist/node/overflow-menu/overflow-menu.js +65 -0
- package/dist/node/overflow-menu/overflow-menu.module.js +9 -0
- package/dist/node/pagination/pagination.js +92 -0
- package/dist/node/pagination/pagination.module.js +13 -0
- package/dist/node/password-input/password-input.js +80 -0
- package/dist/node/password-input/password-input.module.js +13 -0
- package/dist/node/popover/popover.js +49 -0
- package/dist/node/popover/popover.module.js +8 -0
- package/dist/node/popover/use-popover.js +57 -0
- package/dist/node/progress/progress.js +17 -0
- package/dist/node/progress/progress.module.js +8 -0
- package/dist/node/progress-bar/progress-bar.js +44 -0
- package/dist/node/progress-bar/progress-bar.module.js +13 -0
- package/dist/node/progress-circle/progress-circle.js +48 -0
- package/dist/node/progress-circle/progress-circle.module.js +11 -0
- package/dist/node/progress-indicator/progress-indicator.js +36 -0
- package/dist/node/progress-indicator/progress-indicator.module.js +12 -0
- package/dist/node/prose/prose.js +15 -0
- package/dist/node/prose/prose.module.js +5 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.js +82 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +11 -0
- package/dist/node/qr-code/encode.js +585 -0
- package/dist/node/qr-code/qr-code.js +41 -0
- package/dist/node/qr-code/qr-code.module.js +8 -0
- package/dist/node/radial-progress/radial-progress.js +28 -0
- package/dist/node/radial-progress/radial-progress.module.js +8 -0
- package/dist/node/radio/radio.js +49 -0
- package/dist/node/radio/radio.module.js +11 -0
- package/dist/node/radio-card/radio-card.js +63 -0
- package/dist/node/radio-card/radio-card.module.js +13 -0
- package/dist/node/rating-group/rating-group.js +37 -0
- package/dist/node/rating-group/rating-group.module.js +8 -0
- package/dist/node/react/src/index.js +138 -0
- package/dist/node/react/src/theme.js +54 -0
- package/dist/node/relative-time/relative-time.js +66 -0
- package/dist/node/relative-time/relative-time.module.js +5 -0
- package/dist/node/resizable/resizable.js +80 -0
- package/dist/node/resizable/resizable.module.js +10 -0
- package/dist/node/scroll-area/scroll-area.js +38 -0
- package/dist/node/scroll-area/scroll-area.module.js +5 -0
- package/dist/node/search/search.js +94 -0
- package/dist/node/search/search.module.js +11 -0
- package/dist/node/segmented-control/segmented-control.js +43 -0
- package/dist/node/segmented-control/segmented-control.module.js +8 -0
- package/dist/node/select/select.js +71 -0
- package/dist/node/select/select.module.js +13 -0
- package/dist/node/separator/separator.js +21 -0
- package/dist/node/separator/separator.module.js +5 -0
- package/dist/node/sheet/sheet.js +50 -0
- package/dist/node/sheet/sheet.module.js +11 -0
- package/dist/node/shell-header/shell-header.js +166 -0
- package/dist/node/shell-header/shell-header.module.js +25 -0
- package/dist/node/side-nav/side-nav.js +333 -0
- package/dist/node/side-nav/side-nav.module.js +33 -0
- package/dist/node/skeleton/skeleton.js +25 -0
- package/dist/node/skeleton/skeleton.module.js +9 -0
- package/dist/node/skip-nav/skip-nav.js +27 -0
- package/dist/node/skip-nav/skip-nav.module.js +5 -0
- package/dist/node/slider/slider.js +29 -0
- package/dist/node/slider/slider.module.js +9 -0
- package/dist/node/spinner/spinner.js +18 -0
- package/dist/node/spinner/spinner.module.js +8 -0
- package/dist/node/stack/stack.js +19 -0
- package/dist/node/stack/stack.module.js +8 -0
- package/dist/node/stat/stat.js +41 -0
- package/dist/node/stat/stat.module.js +13 -0
- package/dist/node/status/status.js +20 -0
- package/dist/node/status/status.module.js +9 -0
- package/dist/node/steps/steps.js +35 -0
- package/dist/node/steps/steps.module.js +10 -0
- package/dist/node/storage/src/drivers.js +36 -0
- package/dist/node/storage/src/persisted-signal.js +43 -0
- package/dist/node/structured-list/structured-list.js +101 -0
- package/dist/node/structured-list/structured-list.module.js +14 -0
- package/dist/node/swap/swap.js +36 -0
- package/dist/node/swap/swap.module.js +9 -0
- package/dist/node/swipe-item/swipe-item.js +62 -0
- package/dist/node/swipe-item/swipe-item.module.js +14 -0
- package/dist/node/switcher/switcher.js +32 -0
- package/dist/node/switcher/switcher.module.js +10 -0
- package/dist/node/tabs/tabs.js +95 -0
- package/dist/node/tabs/tabs.module.js +10 -0
- package/dist/node/tag/tag.js +26 -0
- package/dist/node/tag/tag.module.js +8 -0
- package/dist/node/tags-input/tags-input.js +64 -0
- package/dist/node/tags-input/tags-input.module.js +10 -0
- package/dist/node/text/text.js +18 -0
- package/dist/node/text/text.module.js +5 -0
- package/dist/node/textarea/textarea.js +56 -0
- package/dist/node/textarea/textarea.module.js +11 -0
- package/dist/node/tile/tile.js +39 -0
- package/dist/node/tile/tile.module.js +9 -0
- package/dist/node/time-picker/time-picker.js +62 -0
- package/dist/node/time-picker/time-picker.module.js +11 -0
- package/dist/node/timeline/timeline.js +41 -0
- package/dist/node/timeline/timeline.module.js +13 -0
- package/dist/node/toast/toast.js +85 -0
- package/dist/node/toast/toast.module.js +13 -0
- package/dist/node/toc/toc.js +42 -0
- package/dist/node/toc/toc.module.js +5 -0
- package/dist/node/toc/use-toc-from-region.js +18 -0
- package/dist/node/toggle/toggle.js +39 -0
- package/dist/node/toggle/toggle.module.js +10 -0
- package/dist/node/toggle-group/toggle-group.js +55 -0
- package/dist/node/toggle-group/toggle-group.module.js +8 -0
- package/dist/node/toggletip/toggletip.js +49 -0
- package/dist/node/toggletip/toggletip.module.js +9 -0
- package/dist/node/tooltip/tooltip.js +58 -0
- package/dist/node/tooltip/tooltip.module.js +8 -0
- package/dist/node/tree-view/tree-view.js +201 -0
- package/dist/node/tree-view/tree-view.module.js +15 -0
- package/dist/node/user/user.js +37 -0
- package/dist/node/user/user.module.js +11 -0
- package/dist/node/visually-hidden/visually-hidden.js +15 -0
- package/dist/node/visually-hidden/visually-hidden.module.js +5 -0
- package/dist/react/src/theme.js +35 -29
- package/package.json +3 -2
- package/readme.body.md +5 -5
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./avatar.module.js";
|
|
4
|
+
import { cn as t, createMachine as n, useMachine as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/avatar/avatar.tsx
|
|
7
|
+
var s = n({
|
|
8
|
+
initial: "loading",
|
|
9
|
+
states: {
|
|
10
|
+
loading: { on: {
|
|
11
|
+
LOADED: "loaded",
|
|
12
|
+
ERROR: "error"
|
|
13
|
+
} },
|
|
14
|
+
loaded: {},
|
|
15
|
+
error: {}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function c({ src: n, alt: c = "", name: u, fallback: d, size: f = "md", status: p, className: m, ...h }) {
|
|
19
|
+
i();
|
|
20
|
+
let [g, _] = r(s), v = !!n && g.value !== "error", y = d ?? l(u), b = c || u || d;
|
|
21
|
+
return /* @__PURE__ */ o("span", {
|
|
22
|
+
"data-size": f,
|
|
23
|
+
"data-status": p,
|
|
24
|
+
className: t(e.avatar, m),
|
|
25
|
+
role: v || !b ? void 0 : "img",
|
|
26
|
+
"aria-label": v ? void 0 : b || void 0,
|
|
27
|
+
...h,
|
|
28
|
+
children: [v ? /* @__PURE__ */ a("img", {
|
|
29
|
+
className: e.image,
|
|
30
|
+
src: n,
|
|
31
|
+
alt: c || u || "",
|
|
32
|
+
onLoad: () => _("LOADED"),
|
|
33
|
+
onError: () => _("ERROR")
|
|
34
|
+
}) : /* @__PURE__ */ a("span", {
|
|
35
|
+
className: e.fallback,
|
|
36
|
+
"aria-hidden": "true",
|
|
37
|
+
children: y
|
|
38
|
+
}), p && /* @__PURE__ */ a("span", {
|
|
39
|
+
className: e.status,
|
|
40
|
+
"aria-hidden": "true"
|
|
41
|
+
})]
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function l(e) {
|
|
45
|
+
if (!e) return;
|
|
46
|
+
let t = e.trim().split(/\s+/).filter(Boolean);
|
|
47
|
+
if (t.length !== 0) return (u(t[0]) + (t.length > 1 ? u(t[t.length - 1]) : "")).toLocaleUpperCase() || void 0;
|
|
48
|
+
}
|
|
49
|
+
function u(e) {
|
|
50
|
+
if (typeof Intl < "u" && "Segmenter" in Intl) {
|
|
51
|
+
let t = new Intl.Segmenter(void 0, { granularity: "grapheme" });
|
|
52
|
+
for (let n of t.segment(e)) return n.segment;
|
|
53
|
+
}
|
|
54
|
+
return [...e][0] ?? "";
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { c as Avatar };
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Avatar as e } from "../avatar/avatar.js";
|
|
4
|
+
import t from "./avatar-group.module.js";
|
|
5
|
+
import { cn as n } from "@cascivo/core";
|
|
6
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
import { Children as s } from "react";
|
|
9
|
+
//#region ../components/src/avatar-group/avatar-group.tsx
|
|
10
|
+
function c({ max: c, total: l, spacing: u = "md", isGrid: d = !1, labels: f, className: p, children: m, ...h }) {
|
|
11
|
+
let g = s.toArray(m), _ = c == null ? g : g.slice(0, c), v = (l ?? g.length) - _.length, y = f?.more?.(v) ?? i(r.avatarGroup.more, { count: v });
|
|
12
|
+
return /* @__PURE__ */ o("div", {
|
|
13
|
+
role: "group",
|
|
14
|
+
"data-spacing": u,
|
|
15
|
+
"data-grid": d || void 0,
|
|
16
|
+
className: n(t.group, p),
|
|
17
|
+
...h,
|
|
18
|
+
children: [_, v > 0 && /* @__PURE__ */ a(e, {
|
|
19
|
+
className: t.overflow,
|
|
20
|
+
fallback: `+${v}`,
|
|
21
|
+
"aria-label": y
|
|
22
|
+
})]
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
//#endregion
|
|
26
|
+
export { c as AvatarGroup };
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./badge.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/badge/badge.tsx
|
|
7
|
+
function r({ variant: r = "default", size: i = "md", className: a, children: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ n("span", {
|
|
9
|
+
"data-variant": r,
|
|
10
|
+
"data-size": i,
|
|
11
|
+
className: t(e.badge, a),
|
|
12
|
+
...s,
|
|
13
|
+
children: o
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
//#endregion
|
|
17
|
+
export { r as Badge };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./blockquote.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/blockquote/blockquote.tsx
|
|
7
|
+
function i({ cite: i, className: a, children: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ r("blockquote", {
|
|
9
|
+
className: t(e.blockquote, a),
|
|
10
|
+
...s,
|
|
11
|
+
children: [o, i ? /* @__PURE__ */ n("footer", {
|
|
12
|
+
className: e.footer,
|
|
13
|
+
children: /* @__PURE__ */ n("cite", { children: i })
|
|
14
|
+
}) : null]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { i as Blockquote };
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./bottom-sheet.module.js";
|
|
4
|
+
import { DismissableLayer as t, FocusScope as n, Portal as r, Presence as i, cn as a, useControllableSignal as o, useDraggable as s, useScrollLock as c, useSignals as l } from "@cascivo/core";
|
|
5
|
+
import { builtin as u, t as d } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { useId as m } from "react";
|
|
8
|
+
//#region ../components/src/bottom-sheet/bottom-sheet.tsx
|
|
9
|
+
var h = 120, g = .6, _ = .1, v = [.5, .92];
|
|
10
|
+
function y({ open: y, defaultOpen: b, onOpenChange: x, snapPoints: S = v, activeSnap: C, defaultSnap: w = 0, onSnapChange: T, title: E, description: D, children: O, labels: k, className: A }) {
|
|
11
|
+
l();
|
|
12
|
+
let [j, M] = o({
|
|
13
|
+
value: y,
|
|
14
|
+
defaultValue: b ?? !1,
|
|
15
|
+
onChange: x
|
|
16
|
+
}), [N, P] = o({
|
|
17
|
+
value: C,
|
|
18
|
+
defaultValue: w,
|
|
19
|
+
onChange: T
|
|
20
|
+
});
|
|
21
|
+
c(j);
|
|
22
|
+
let F = S, I = F[F.length - 1] ?? 1, L = F[0] ?? 0, R = F[Math.min(N.value, F.length - 1)] ?? I, { handleRef: z, offset: B, velocity: V, isDragging: H, reset: U } = s({
|
|
23
|
+
axis: "y",
|
|
24
|
+
onDragEnd: (e) => {
|
|
25
|
+
let t = typeof window > "u" ? 0 : window.innerHeight, n = V.value.y;
|
|
26
|
+
if (U(), t === 0) return;
|
|
27
|
+
let r = R - e.y / t - n * h / t;
|
|
28
|
+
if (n > g || r < L - _) {
|
|
29
|
+
M(!1);
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
let i = 0;
|
|
33
|
+
for (let e = 1; e < F.length; e++) Math.abs((F[e] ?? 0) - r) < Math.abs((F[i] ?? 0) - r) && (i = e);
|
|
34
|
+
P(i);
|
|
35
|
+
}
|
|
36
|
+
}), W = m(), G = m(), K = k?.close ?? d(u.bottomSheet.close), q = k?.handle ?? d(u.bottomSheet.handle), J = `${(1 - R / I) * 100}%`, Y = {
|
|
37
|
+
"--_sheet-height": `${I * 100}dvh`,
|
|
38
|
+
"--_sheet-y": J,
|
|
39
|
+
"--_sheet-drag": `${B.value.y}px`
|
|
40
|
+
};
|
|
41
|
+
return /* @__PURE__ */ f(r, { children: /* @__PURE__ */ f(i, {
|
|
42
|
+
present: j,
|
|
43
|
+
children: /* @__PURE__ */ f("div", {
|
|
44
|
+
className: e.overlay,
|
|
45
|
+
children: /* @__PURE__ */ f(t, {
|
|
46
|
+
onDismiss: () => M(!1),
|
|
47
|
+
children: /* @__PURE__ */ f(n, {
|
|
48
|
+
trapped: !0,
|
|
49
|
+
restoreFocus: !0,
|
|
50
|
+
autoFocus: !0,
|
|
51
|
+
children: /* @__PURE__ */ p("div", {
|
|
52
|
+
role: "dialog",
|
|
53
|
+
"aria-modal": "true",
|
|
54
|
+
"aria-labelledby": E ? W : void 0,
|
|
55
|
+
"aria-describedby": D ? G : void 0,
|
|
56
|
+
"data-dragging": H.value ? "" : void 0,
|
|
57
|
+
className: a(e.panel, A),
|
|
58
|
+
style: Y,
|
|
59
|
+
children: [/* @__PURE__ */ p("div", {
|
|
60
|
+
className: e.header,
|
|
61
|
+
ref: z,
|
|
62
|
+
children: [
|
|
63
|
+
/* @__PURE__ */ f("div", {
|
|
64
|
+
className: e.handle,
|
|
65
|
+
role: "separator",
|
|
66
|
+
"aria-label": q,
|
|
67
|
+
"aria-orientation": "horizontal"
|
|
68
|
+
}),
|
|
69
|
+
(E || D) && /* @__PURE__ */ p("div", {
|
|
70
|
+
className: e.heading,
|
|
71
|
+
children: [E && /* @__PURE__ */ f("h2", {
|
|
72
|
+
id: W,
|
|
73
|
+
className: e.title,
|
|
74
|
+
children: E
|
|
75
|
+
}), D && /* @__PURE__ */ f("p", {
|
|
76
|
+
id: G,
|
|
77
|
+
className: e.description,
|
|
78
|
+
children: D
|
|
79
|
+
})]
|
|
80
|
+
}),
|
|
81
|
+
/* @__PURE__ */ f("button", {
|
|
82
|
+
type: "button",
|
|
83
|
+
"aria-label": K,
|
|
84
|
+
onClick: () => M(!1),
|
|
85
|
+
className: e.close,
|
|
86
|
+
children: /* @__PURE__ */ f("svg", {
|
|
87
|
+
"aria-hidden": "true",
|
|
88
|
+
viewBox: "0 0 16 16",
|
|
89
|
+
className: e.closeIcon,
|
|
90
|
+
children: /* @__PURE__ */ f("path", {
|
|
91
|
+
d: "M4 4l8 8M12 4l-8 8",
|
|
92
|
+
fill: "none",
|
|
93
|
+
stroke: "currentColor",
|
|
94
|
+
strokeWidth: "1.5",
|
|
95
|
+
strokeLinecap: "round"
|
|
96
|
+
})
|
|
97
|
+
})
|
|
98
|
+
})
|
|
99
|
+
]
|
|
100
|
+
}), /* @__PURE__ */ f("div", {
|
|
101
|
+
className: e.body,
|
|
102
|
+
children: O
|
|
103
|
+
})]
|
|
104
|
+
})
|
|
105
|
+
})
|
|
106
|
+
})
|
|
107
|
+
})
|
|
108
|
+
}) });
|
|
109
|
+
}
|
|
110
|
+
//#endregion
|
|
111
|
+
export { y as BottomSheet };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
overlay: "_overlay_k9sg5_2",
|
|
5
|
+
panel: "_panel_k9sg5_25",
|
|
6
|
+
header: "_header_k9sg5_59",
|
|
7
|
+
handle: "_handle_k9sg5_77",
|
|
8
|
+
heading: "_heading_k9sg5_87",
|
|
9
|
+
title: "_title_k9sg5_93",
|
|
10
|
+
description: "_description_k9sg5_100",
|
|
11
|
+
close: "_close_k9sg5_106",
|
|
12
|
+
closeIcon: "_closeIcon_k9sg5_140",
|
|
13
|
+
body: "_body_k9sg5_145"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as default };
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./breadcrumb.module.js";
|
|
4
|
+
import { cn as t, getLinkComponent as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/breadcrumb/breadcrumb.tsx
|
|
8
|
+
function s({ items: s, maxVisible: c, className: l, ariaLabel: u }) {
|
|
9
|
+
r();
|
|
10
|
+
let d = n(), f = u ?? a(i.breadcrumb.nav), p = s, m = s[0];
|
|
11
|
+
return m !== void 0 && c !== void 0 && s.length > c && (p = [
|
|
12
|
+
m,
|
|
13
|
+
{ label: "…" },
|
|
14
|
+
...s.slice(s.length - (c - 2))
|
|
15
|
+
]), /* @__PURE__ */ o("nav", {
|
|
16
|
+
"aria-label": f,
|
|
17
|
+
className: t(e.breadcrumb, l),
|
|
18
|
+
children: /* @__PURE__ */ o("ol", { children: p.map((e, t) => /* @__PURE__ */ o("li", { children: t === p.length - 1 ? /* @__PURE__ */ o("span", {
|
|
19
|
+
"aria-current": "page",
|
|
20
|
+
children: e.label
|
|
21
|
+
}) : e.href === void 0 ? /* @__PURE__ */ o("span", { children: e.label }) : /* @__PURE__ */ o(d, {
|
|
22
|
+
href: e.href,
|
|
23
|
+
children: e.label
|
|
24
|
+
}) }, `${t}-${e.label}`)) })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { s as Breadcrumb };
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
|
+
import t from "./button.module.js";
|
|
5
|
+
import { Slot as n, cn as r } from "@cascivo/core";
|
|
6
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/button/button.tsx
|
|
8
|
+
function o({ variant: o = "primary", size: s = "md", loading: c = !1, asChild: l = !1, className: u, disabled: d, children: f, ...p }) {
|
|
9
|
+
let m = {
|
|
10
|
+
"data-variant": o,
|
|
11
|
+
"data-size": s,
|
|
12
|
+
"data-state": c ? "loading" : "idle",
|
|
13
|
+
"aria-busy": c || void 0,
|
|
14
|
+
className: r(t.button, u)
|
|
15
|
+
};
|
|
16
|
+
return l ? /* @__PURE__ */ i(n, {
|
|
17
|
+
...m,
|
|
18
|
+
...p,
|
|
19
|
+
children: f
|
|
20
|
+
}) : /* @__PURE__ */ a("button", {
|
|
21
|
+
...m,
|
|
22
|
+
disabled: d || c,
|
|
23
|
+
...p,
|
|
24
|
+
children: [c && /* @__PURE__ */ i(e, {
|
|
25
|
+
size: "sm",
|
|
26
|
+
"aria-hidden": "true"
|
|
27
|
+
}), /* @__PURE__ */ i("span", { children: f })]
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//#endregion
|
|
31
|
+
export { o as Button };
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./button-group.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
import { forwardRef as r } from "react";
|
|
7
|
+
//#region ../components/src/button-group/button-group.tsx
|
|
8
|
+
function i(e) {
|
|
9
|
+
return Array.from(e.querySelectorAll("button, a[href], [tabindex]")).filter((e) => !e.hasAttribute("disabled") && e.getAttribute("aria-disabled") !== "true");
|
|
10
|
+
}
|
|
11
|
+
var a = r(function({ orientation: r = "horizontal", size: a = "md", roving: o = !1, loop: s = !1, className: c, onKeyDown: l, children: u, ...d }, f) {
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
role: "group",
|
|
14
|
+
"data-orientation": r,
|
|
15
|
+
"data-size": a,
|
|
16
|
+
className: t(e.buttonGroup, c),
|
|
17
|
+
ref: f,
|
|
18
|
+
onKeyDown: (e) => {
|
|
19
|
+
if (l?.(e), !o) return;
|
|
20
|
+
let t = r === "horizontal", n = t ? "ArrowRight" : "ArrowDown", a = t ? "ArrowLeft" : "ArrowUp";
|
|
21
|
+
if (![
|
|
22
|
+
n,
|
|
23
|
+
a,
|
|
24
|
+
"Home",
|
|
25
|
+
"End"
|
|
26
|
+
].includes(e.key)) return;
|
|
27
|
+
let c = i(e.currentTarget);
|
|
28
|
+
if (c.length === 0) return;
|
|
29
|
+
let u = c.indexOf(document.activeElement);
|
|
30
|
+
if (u === -1) return;
|
|
31
|
+
let d = u;
|
|
32
|
+
e.key === n ? d = u + 1 : e.key === a ? d = u - 1 : e.key === "Home" ? d = 0 : e.key === "End" && (d = c.length - 1), d < 0 && (d = s ? c.length - 1 : 0), d >= c.length && (d = s ? 0 : c.length - 1), e.preventDefault(), c[d]?.focus();
|
|
33
|
+
},
|
|
34
|
+
...d,
|
|
35
|
+
children: u
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
export { a as ButtonGroup };
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./calendar.module.js";
|
|
4
|
+
import { batch as t, cn as n, useSignal as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { builtin as a, currentLocale as o, t as s } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/calendar/calendar.tsx
|
|
8
|
+
function u(e) {
|
|
9
|
+
try {
|
|
10
|
+
let t = new Intl.Locale(e).weekInfo;
|
|
11
|
+
if (t) return t.firstDay % 7;
|
|
12
|
+
} catch {}
|
|
13
|
+
return 1;
|
|
14
|
+
}
|
|
15
|
+
function d(e, t, n) {
|
|
16
|
+
let r = new Date(Date.UTC(e, t, 1)), i = new Date(Date.UTC(e, t + 1, 0)), a = (r.getUTCDay() - n + 7) % 7, o = [];
|
|
17
|
+
for (let e = 0; e < a; e++) o.push(null);
|
|
18
|
+
for (let n = 1; n <= i.getUTCDate(); n++) o.push(new Date(Date.UTC(e, t, n)));
|
|
19
|
+
for (; o.length % 7 != 0;) o.push(null);
|
|
20
|
+
let s = [];
|
|
21
|
+
for (let e = 0; e < o.length; e += 7) s.push(o.slice(e, e + 7));
|
|
22
|
+
return s;
|
|
23
|
+
}
|
|
24
|
+
function f(e) {
|
|
25
|
+
return `${e.getUTCFullYear()}-${e.getUTCMonth()}-${e.getUTCDate()}`;
|
|
26
|
+
}
|
|
27
|
+
function p(e, t) {
|
|
28
|
+
return !e || !t ? !1 : f(e) === f(t);
|
|
29
|
+
}
|
|
30
|
+
function m(e, t) {
|
|
31
|
+
return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth(), e.getUTCDate() + t));
|
|
32
|
+
}
|
|
33
|
+
function h(e, t) {
|
|
34
|
+
return new Date(Date.UTC(e.getUTCFullYear(), e.getUTCMonth() + t, e.getUTCDate()));
|
|
35
|
+
}
|
|
36
|
+
function g(e, t) {
|
|
37
|
+
return m(e, -((e.getUTCDay() - t + 7) % 7));
|
|
38
|
+
}
|
|
39
|
+
function _(e, t, n) {
|
|
40
|
+
if (t) {
|
|
41
|
+
let n = new Date(Date.UTC(t.getUTCFullYear(), t.getUTCMonth(), t.getUTCDate()));
|
|
42
|
+
if (e.getTime() < n.getTime()) return !0;
|
|
43
|
+
}
|
|
44
|
+
if (n) {
|
|
45
|
+
let t = new Date(Date.UTC(n.getUTCFullYear(), n.getUTCMonth(), n.getUTCDate()));
|
|
46
|
+
if (e.getTime() > t.getTime()) return !0;
|
|
47
|
+
}
|
|
48
|
+
return !1;
|
|
49
|
+
}
|
|
50
|
+
function v({ value: f, defaultValue: v, onValueChange: y, min: b, max: x, disabled: S, locale: C, size: w = "md", labels: T, className: E, isInRange: D, isRangeStart: O, isRangeEnd: k, onDayHover: A, month: j, year: M, onViewChange: N, hideNav: P = !1 }) {
|
|
51
|
+
i();
|
|
52
|
+
let F = C ?? o(), I = T?.previousMonth ?? s(a.calendar.previousMonth), L = T?.nextMonth ?? s(a.calendar.nextMonth), R = f === void 0 ? v ?? null : f, z = /* @__PURE__ */ new Date(), B = R ?? v ?? z, V = r(B.getUTCFullYear()), H = r(B.getUTCMonth()), U = r(B);
|
|
53
|
+
j !== void 0 && (H.value = j), M !== void 0 && (V.value = M);
|
|
54
|
+
let W = u(F), G = d(V.value, H.value, W), K = new Intl.DateTimeFormat(F, { weekday: "short" }), q = Array.from({ length: 7 }, (e, t) => {
|
|
55
|
+
let n = new Date(Date.UTC(2024, 0, 7 + W + t));
|
|
56
|
+
return K.format(n);
|
|
57
|
+
}), J = new Intl.DateTimeFormat(F, {
|
|
58
|
+
weekday: "long",
|
|
59
|
+
year: "numeric",
|
|
60
|
+
month: "long",
|
|
61
|
+
day: "numeric"
|
|
62
|
+
}), Y = new Intl.DateTimeFormat(F, {
|
|
63
|
+
month: "long",
|
|
64
|
+
year: "numeric"
|
|
65
|
+
}).format(new Date(Date.UTC(V.value, H.value, 1))), X = (e) => _(e, b, x) || (S ? S(e) : !1), Z = j !== void 0 || M !== void 0, ee = (e) => {
|
|
66
|
+
Z ? U.value = e : t(() => {
|
|
67
|
+
V.value = e.getUTCFullYear(), H.value = e.getUTCMonth(), U.value = e;
|
|
68
|
+
}), N?.({
|
|
69
|
+
month: e.getUTCMonth(),
|
|
70
|
+
year: e.getUTCFullYear()
|
|
71
|
+
});
|
|
72
|
+
}, Q = (e) => {
|
|
73
|
+
X(e) || y?.(e);
|
|
74
|
+
}, $ = (e) => {
|
|
75
|
+
let n = h(new Date(Date.UTC(V.value, H.value, 1)), e), r = n.getUTCMonth(), i = n.getUTCFullYear();
|
|
76
|
+
Z || t(() => {
|
|
77
|
+
H.value = r, V.value = i;
|
|
78
|
+
}), N?.({
|
|
79
|
+
month: r,
|
|
80
|
+
year: i
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ l("div", {
|
|
84
|
+
className: n(e.calendar, E),
|
|
85
|
+
"data-size": w,
|
|
86
|
+
onMouseLeave: () => A?.(null),
|
|
87
|
+
children: [/* @__PURE__ */ l("div", {
|
|
88
|
+
className: e.header,
|
|
89
|
+
children: [
|
|
90
|
+
P ? /* @__PURE__ */ c("span", { className: e.navSpacer }) : /* @__PURE__ */ c("button", {
|
|
91
|
+
type: "button",
|
|
92
|
+
className: e.navButton,
|
|
93
|
+
"aria-label": I,
|
|
94
|
+
onClick: () => $(-1),
|
|
95
|
+
children: "‹"
|
|
96
|
+
}),
|
|
97
|
+
/* @__PURE__ */ c("span", {
|
|
98
|
+
className: e.monthLabel,
|
|
99
|
+
"aria-live": "polite",
|
|
100
|
+
children: Y
|
|
101
|
+
}),
|
|
102
|
+
P ? /* @__PURE__ */ c("span", { className: e.navSpacer }) : /* @__PURE__ */ c("button", {
|
|
103
|
+
type: "button",
|
|
104
|
+
className: e.navButton,
|
|
105
|
+
"aria-label": L,
|
|
106
|
+
onClick: () => $(1),
|
|
107
|
+
children: "›"
|
|
108
|
+
})
|
|
109
|
+
]
|
|
110
|
+
}), /* @__PURE__ */ l("table", {
|
|
111
|
+
role: "grid",
|
|
112
|
+
"aria-label": Y,
|
|
113
|
+
className: e.grid,
|
|
114
|
+
onKeyDown: (e) => {
|
|
115
|
+
let t = U.value, n;
|
|
116
|
+
switch (e.key) {
|
|
117
|
+
case "ArrowRight":
|
|
118
|
+
n = m(t, 1);
|
|
119
|
+
break;
|
|
120
|
+
case "ArrowLeft":
|
|
121
|
+
n = m(t, -1);
|
|
122
|
+
break;
|
|
123
|
+
case "ArrowDown":
|
|
124
|
+
n = m(t, 7);
|
|
125
|
+
break;
|
|
126
|
+
case "ArrowUp":
|
|
127
|
+
n = m(t, -7);
|
|
128
|
+
break;
|
|
129
|
+
case "Home":
|
|
130
|
+
n = g(t, W);
|
|
131
|
+
break;
|
|
132
|
+
case "End":
|
|
133
|
+
n = m(g(t, W), 6);
|
|
134
|
+
break;
|
|
135
|
+
case "PageUp":
|
|
136
|
+
n = h(t, e.shiftKey ? -12 : -1);
|
|
137
|
+
break;
|
|
138
|
+
case "PageDown":
|
|
139
|
+
n = h(t, e.shiftKey ? 12 : 1);
|
|
140
|
+
break;
|
|
141
|
+
case "Enter":
|
|
142
|
+
case " ":
|
|
143
|
+
e.preventDefault(), Q(t);
|
|
144
|
+
return;
|
|
145
|
+
default: return;
|
|
146
|
+
}
|
|
147
|
+
e.preventDefault(), ee(n), A?.(n);
|
|
148
|
+
},
|
|
149
|
+
children: [/* @__PURE__ */ c("thead", { children: /* @__PURE__ */ c("tr", {
|
|
150
|
+
role: "row",
|
|
151
|
+
children: q.map((t) => /* @__PURE__ */ c("th", {
|
|
152
|
+
className: e.weekday,
|
|
153
|
+
abbr: t,
|
|
154
|
+
scope: "col",
|
|
155
|
+
children: t
|
|
156
|
+
}, t))
|
|
157
|
+
}) }), /* @__PURE__ */ c("tbody", { children: G.map((t, n) => /* @__PURE__ */ c("tr", {
|
|
158
|
+
role: "row",
|
|
159
|
+
children: t.map((t, n) => {
|
|
160
|
+
if (!t) return /* @__PURE__ */ c("td", {
|
|
161
|
+
role: "gridcell",
|
|
162
|
+
className: e.empty
|
|
163
|
+
}, n);
|
|
164
|
+
let r = p(t, R), i = p(t, z), a = p(t, U.value), o = X(t), s = D ? D(t) : !1, l = O ? O(t) : !1, u = k ? k(t) : !1;
|
|
165
|
+
return /* @__PURE__ */ c("td", {
|
|
166
|
+
role: "gridcell",
|
|
167
|
+
className: e.cell,
|
|
168
|
+
"aria-selected": r,
|
|
169
|
+
children: /* @__PURE__ */ c("button", {
|
|
170
|
+
type: "button",
|
|
171
|
+
className: e.day,
|
|
172
|
+
tabIndex: a ? 0 : -1,
|
|
173
|
+
"aria-label": J.format(t),
|
|
174
|
+
"aria-current": i ? "date" : void 0,
|
|
175
|
+
"aria-disabled": o || void 0,
|
|
176
|
+
"data-selected": r || void 0,
|
|
177
|
+
"data-today": i || void 0,
|
|
178
|
+
"data-in-range": s || void 0,
|
|
179
|
+
"data-range-start": l || void 0,
|
|
180
|
+
"data-range-end": u || void 0,
|
|
181
|
+
onClick: () => Q(t),
|
|
182
|
+
onFocus: () => {
|
|
183
|
+
U.value = t;
|
|
184
|
+
},
|
|
185
|
+
onMouseEnter: () => A?.(t),
|
|
186
|
+
children: t.getUTCDate()
|
|
187
|
+
})
|
|
188
|
+
}, n);
|
|
189
|
+
})
|
|
190
|
+
}, n)) })]
|
|
191
|
+
})]
|
|
192
|
+
});
|
|
193
|
+
}
|
|
194
|
+
//#endregion
|
|
195
|
+
export { v as Calendar };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
calendar: "_calendar_7pqxh_2",
|
|
5
|
+
header: "_header_7pqxh_33",
|
|
6
|
+
monthLabel: "_monthLabel_7pqxh_40",
|
|
7
|
+
navButton: "_navButton_7pqxh_46",
|
|
8
|
+
navSpacer: "_navSpacer_7pqxh_69",
|
|
9
|
+
grid: "_grid_7pqxh_74",
|
|
10
|
+
weekday: "_weekday_7pqxh_79",
|
|
11
|
+
cell: "_cell_7pqxh_88",
|
|
12
|
+
empty: "_empty_7pqxh_99",
|
|
13
|
+
day: "_day_7pqxh_104"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as default };
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./card.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/card/card.tsx
|
|
7
|
+
function r({ variant: r = "default", padding: i = "md", className: a, children: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
"data-variant": r,
|
|
10
|
+
"data-padding": i,
|
|
11
|
+
className: t(e.card, a),
|
|
12
|
+
...s,
|
|
13
|
+
children: o
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function i({ className: r, children: i, ...a }) {
|
|
17
|
+
return /* @__PURE__ */ n("div", {
|
|
18
|
+
className: t(e.header, r),
|
|
19
|
+
...a,
|
|
20
|
+
children: i
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function a({ className: r, children: i, ...a }) {
|
|
24
|
+
return /* @__PURE__ */ n("h3", {
|
|
25
|
+
className: t(e.title, r),
|
|
26
|
+
...a,
|
|
27
|
+
children: i
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function o({ className: r, children: i, ...a }) {
|
|
31
|
+
return /* @__PURE__ */ n("div", {
|
|
32
|
+
className: t(e.content, r),
|
|
33
|
+
...a,
|
|
34
|
+
children: i
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function s({ className: r, children: i, ...a }) {
|
|
38
|
+
return /* @__PURE__ */ n("div", {
|
|
39
|
+
className: t(e.footer, r),
|
|
40
|
+
...a,
|
|
41
|
+
children: i
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
//#endregion
|
|
45
|
+
export { r as Card, o as CardContent, s as CardFooter, i as CardHeader, a as CardTitle };
|