@cascivo/react 0.9.0 → 0.10.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/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 +4 -3
- package/readme.body.md +5 -5
package/README.md
CHANGED
|
@@ -46,7 +46,7 @@ for `LineChart`, `AreaChart`, `BarChart`, `Sparkline`, and more.
|
|
|
46
46
|
In a Server Component file (e.g. `app/layout.tsx`), import the themes once:
|
|
47
47
|
|
|
48
48
|
```tsx
|
|
49
|
-
import '@cascivo/themes/all'
|
|
49
|
+
import '@cascivo/themes/all.css'
|
|
50
50
|
```
|
|
51
51
|
|
|
52
52
|
Component CSS ships **per component** and is pulled in automatically when you
|
|
@@ -83,7 +83,7 @@ RSC without any extra wrapper.
|
|
|
83
83
|
|
|
84
84
|
```tsx
|
|
85
85
|
// once, in your entry file — themes are the only global import
|
|
86
|
-
import '@cascivo/themes/all' // tokens (once) + base typography + light & dark
|
|
86
|
+
import '@cascivo/themes/all.css' // tokens (once) + base typography + light & dark
|
|
87
87
|
|
|
88
88
|
// anywhere — each component brings its own CSS along
|
|
89
89
|
import { Button, Card, CardContent, Toggle } from '@cascivo/react'
|
|
@@ -110,9 +110,9 @@ Prefer à-la-carte? Import only the themes you need — each self-imports the to
|
|
|
110
110
|
(deduped by URL, so light + dark load tokens once):
|
|
111
111
|
|
|
112
112
|
```tsx
|
|
113
|
-
import '@cascivo/themes/base' // base typography (font/line-height/color)
|
|
114
|
-
import '@cascivo/themes/light'
|
|
115
|
-
import '@cascivo/themes/dark'
|
|
113
|
+
import '@cascivo/themes/base.css' // base typography (font/line-height/color)
|
|
114
|
+
import '@cascivo/themes/light.css'
|
|
115
|
+
import '@cascivo/themes/dark.css'
|
|
116
116
|
```
|
|
117
117
|
|
|
118
118
|
Scope a theme with `data-theme="light" | "dark" | "warm"` on any container. Brand
|
|
@@ -282,6 +282,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
282
282
|
role: "listbox",
|
|
283
283
|
id: k,
|
|
284
284
|
"aria-label": S,
|
|
285
|
+
tabIndex: 0,
|
|
285
286
|
children: H.map((e, r) => /* @__PURE__ */ d("div", {
|
|
286
287
|
role: "group",
|
|
287
288
|
"aria-label": e.heading,
|
|
@@ -338,8 +339,7 @@ function v({ open: m, onOpenChange: v, groups: te, placeholder: y, emptyLabel: b
|
|
|
338
339
|
}),
|
|
339
340
|
r.actions && r.actions.length > 0 && /* @__PURE__ */ u("span", {
|
|
340
341
|
className: n.actions,
|
|
341
|
-
children: r.actions.map((e) => /* @__PURE__ */ d("
|
|
342
|
-
type: "button",
|
|
342
|
+
children: r.actions.map((e) => /* @__PURE__ */ d("span", {
|
|
343
343
|
className: n.action,
|
|
344
344
|
onClick: (t) => {
|
|
345
345
|
t.stopPropagation(), Y(e);
|
package/dist/field/field.js
CHANGED
|
@@ -6,34 +6,43 @@ import { cn as n, useId as r } from "@cascivo/core";
|
|
|
6
6
|
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
7
7
|
import { Children as o, cloneElement as s, isValidElement as c } from "react";
|
|
8
8
|
//#region ../components/src/field/field.tsx
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
9
|
+
var l = /* @__PURE__ */ new Set();
|
|
10
|
+
function u() {
|
|
11
|
+
return globalThis.process?.env?.NODE_ENV !== "production";
|
|
12
|
+
}
|
|
13
|
+
function d(e, t) {
|
|
14
|
+
if (!u() || e == null || t.props.label == null) return;
|
|
15
|
+
let n = String(e);
|
|
16
|
+
l.has(n) || (l.add(n), console.warn(`cascivo Field: both the Field and its child control define a \`label\` (${n}). Omit the child's \`label\` inside a Field — it renders a second <label> for the same control. The Field owns the label.`));
|
|
17
|
+
}
|
|
18
|
+
function f({ label: l, description: u, error: f, required: p = !1, disabled: m = !1, id: h, children: g, className: _ }) {
|
|
19
|
+
let v = r("cascade-field"), y = h ?? v, b = `${y}-description`, x = `${y}-error`, S = [u ? b : null, f ? x : null].filter(Boolean).join(" ") || void 0, C = { id: y };
|
|
20
|
+
S && (C["aria-describedby"] = S), f && (C["aria-invalid"] = !0), (m || g.props.disabled) && (C.disabled = !0), c(g) && d(l, g);
|
|
21
|
+
let w = c(g) ? s(o.only(g), C) : g;
|
|
13
22
|
return /* @__PURE__ */ a("div", {
|
|
14
|
-
className: n(t.field,
|
|
15
|
-
"data-disabled":
|
|
23
|
+
className: n(t.field, _),
|
|
24
|
+
"data-disabled": m ? "" : void 0,
|
|
16
25
|
children: [
|
|
17
26
|
l && /* @__PURE__ */ i(e, {
|
|
18
|
-
htmlFor:
|
|
19
|
-
required:
|
|
20
|
-
disabled:
|
|
27
|
+
htmlFor: y,
|
|
28
|
+
required: p,
|
|
29
|
+
disabled: m,
|
|
21
30
|
children: l
|
|
22
31
|
}),
|
|
23
|
-
|
|
32
|
+
w,
|
|
24
33
|
u && /* @__PURE__ */ i("p", {
|
|
25
|
-
id:
|
|
34
|
+
id: b,
|
|
26
35
|
className: t.description,
|
|
27
36
|
children: u
|
|
28
37
|
}),
|
|
29
|
-
|
|
30
|
-
id:
|
|
38
|
+
f && /* @__PURE__ */ i("p", {
|
|
39
|
+
id: x,
|
|
31
40
|
role: "alert",
|
|
32
41
|
className: t.error,
|
|
33
|
-
children:
|
|
42
|
+
children: f
|
|
34
43
|
})
|
|
35
44
|
]
|
|
36
45
|
});
|
|
37
46
|
}
|
|
38
47
|
//#endregion
|
|
39
|
-
export {
|
|
48
|
+
export { f as Field };
|
package/dist/index.d.ts
CHANGED
|
@@ -3427,6 +3427,12 @@ interface ThemeProviderProps {
|
|
|
3427
3427
|
target?: RefObject<HTMLElement | null>;
|
|
3428
3428
|
/** Called whenever the active theme changes. */
|
|
3429
3429
|
onChange?: (theme: string) => void;
|
|
3430
|
+
/**
|
|
3431
|
+
* CSP nonce forwarded to the inline attribute-setter script emitted for the
|
|
3432
|
+
* controlled ({@link ThemeProviderProps.value}) SSR flow. Set it to match your
|
|
3433
|
+
* Content-Security-Policy `script-src 'nonce-…'`.
|
|
3434
|
+
*/
|
|
3435
|
+
nonce?: string;
|
|
3430
3436
|
children?: ReactNode;
|
|
3431
3437
|
}
|
|
3432
3438
|
/**
|
|
@@ -3438,6 +3444,12 @@ interface ThemeProviderProps {
|
|
|
3438
3444
|
* - No banned React hooks: the DOM write happens in `useSignalEffect`, not
|
|
3439
3445
|
* `useEffect`; there is no `useState`/`useContext`.
|
|
3440
3446
|
* - Uncontrolled by default (persists to localStorage); pass `value` to control.
|
|
3447
|
+
* - SSR-safe when controlled: with a `value` (and no scoped `target`), the
|
|
3448
|
+
* provider renders a tiny inline script that sets `data-theme` during HTML
|
|
3449
|
+
* parsing, so the server-rendered first paint is themed — no flash, no
|
|
3450
|
+
* hydration mismatch (the same markup renders on both sides; the client effect
|
|
3451
|
+
* owns every update after hydration). For the uncontrolled/persisted flow, pair
|
|
3452
|
+
* with {@link themePreloadScript} in `<head>` instead.
|
|
3441
3453
|
*/
|
|
3442
3454
|
declare function ThemeProvider({
|
|
3443
3455
|
defaultTheme,
|
|
@@ -3446,6 +3458,7 @@ declare function ThemeProvider({
|
|
|
3446
3458
|
attribute,
|
|
3447
3459
|
target,
|
|
3448
3460
|
onChange,
|
|
3461
|
+
nonce,
|
|
3449
3462
|
children
|
|
3450
3463
|
}: ThemeProviderProps): ReactNode;
|
|
3451
3464
|
/**
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./accordion.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as o, useId as s } from "react";
|
|
7
|
+
//#region ../components/src/accordion/accordion.tsx
|
|
8
|
+
var c = o(null), l = o(null);
|
|
9
|
+
function u(e) {
|
|
10
|
+
return e === void 0 ? [] : Array.isArray(e) ? e : [e];
|
|
11
|
+
}
|
|
12
|
+
function d({ type: r = "single", defaultValue: a, value: o, onValueChange: l, className: d, children: f }) {
|
|
13
|
+
let p = s(), m = n(u(o ?? a));
|
|
14
|
+
o !== void 0 && (m.value = u(o));
|
|
15
|
+
let h = {
|
|
16
|
+
open: m,
|
|
17
|
+
baseId: p,
|
|
18
|
+
toggle: (e) => {
|
|
19
|
+
let t = m.value, n;
|
|
20
|
+
n = r === "multiple" ? t.includes(e) ? t.filter((t) => t !== e) : [...t, e] : t.includes(e) ? [] : [e], o === void 0 && (m.value = n), l?.(r === "multiple" ? n : n[0] ?? "");
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
return /* @__PURE__ */ i(c.Provider, {
|
|
24
|
+
value: h,
|
|
25
|
+
children: /* @__PURE__ */ i("div", {
|
|
26
|
+
"data-type": r,
|
|
27
|
+
className: t(e.accordion, d),
|
|
28
|
+
children: f
|
|
29
|
+
})
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
function f({ value: n, className: r, children: a, ...o }) {
|
|
33
|
+
return /* @__PURE__ */ i(l.Provider, {
|
|
34
|
+
value: { value: n },
|
|
35
|
+
children: /* @__PURE__ */ i("div", {
|
|
36
|
+
"data-value": n,
|
|
37
|
+
className: t(e.item, r),
|
|
38
|
+
...o,
|
|
39
|
+
children: a
|
|
40
|
+
})
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
function p(e) {
|
|
44
|
+
return /* @__PURE__ */ i(c.Consumer, { children: (t) => /* @__PURE__ */ i(l.Consumer, { children: (n) => t && n ? /* @__PURE__ */ i(m, {
|
|
45
|
+
store: t,
|
|
46
|
+
item: n,
|
|
47
|
+
...e
|
|
48
|
+
}) : null }) });
|
|
49
|
+
}
|
|
50
|
+
function m({ store: n, item: o, className: s, children: c, ...l }) {
|
|
51
|
+
r();
|
|
52
|
+
let u = n.open.value.includes(o.value);
|
|
53
|
+
return /* @__PURE__ */ i("h3", {
|
|
54
|
+
className: e.heading,
|
|
55
|
+
children: /* @__PURE__ */ a("button", {
|
|
56
|
+
type: "button",
|
|
57
|
+
id: `${n.baseId}-trigger-${o.value}`,
|
|
58
|
+
"aria-expanded": u,
|
|
59
|
+
"aria-controls": `${n.baseId}-content-${o.value}`,
|
|
60
|
+
"data-state": u ? "open" : "closed",
|
|
61
|
+
className: t(e.trigger, s),
|
|
62
|
+
onClick: () => n.toggle(o.value),
|
|
63
|
+
...l,
|
|
64
|
+
children: [/* @__PURE__ */ i("span", { children: c }), /* @__PURE__ */ i("span", {
|
|
65
|
+
className: e.indicator,
|
|
66
|
+
"aria-hidden": "true"
|
|
67
|
+
})]
|
|
68
|
+
})
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
function h(e) {
|
|
72
|
+
return /* @__PURE__ */ i(c.Consumer, { children: (t) => /* @__PURE__ */ i(l.Consumer, { children: (n) => t && n ? /* @__PURE__ */ i(g, {
|
|
73
|
+
store: t,
|
|
74
|
+
item: n,
|
|
75
|
+
...e
|
|
76
|
+
}) : null }) });
|
|
77
|
+
}
|
|
78
|
+
function g({ store: n, item: a, className: o, children: s, ...c }) {
|
|
79
|
+
r();
|
|
80
|
+
let l = n.open.value.includes(a.value);
|
|
81
|
+
return /* @__PURE__ */ i("div", {
|
|
82
|
+
role: "region",
|
|
83
|
+
id: `${n.baseId}-content-${a.value}`,
|
|
84
|
+
"aria-labelledby": `${n.baseId}-trigger-${a.value}`,
|
|
85
|
+
"data-state": l ? "open" : "closed",
|
|
86
|
+
className: t(e.content, o),
|
|
87
|
+
...c,
|
|
88
|
+
children: /* @__PURE__ */ i("div", {
|
|
89
|
+
className: e.contentInner,
|
|
90
|
+
children: s
|
|
91
|
+
})
|
|
92
|
+
});
|
|
93
|
+
}
|
|
94
|
+
//#endregion
|
|
95
|
+
export { d as Accordion, h as AccordionContent, f as AccordionItem, p as AccordionTrigger };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
accordion: "_accordion_9ch4s_2",
|
|
5
|
+
item: "_item_9ch4s_10",
|
|
6
|
+
heading: "_heading_9ch4s_16",
|
|
7
|
+
trigger: "_trigger_9ch4s_22",
|
|
8
|
+
indicator: "_indicator_9ch4s_48",
|
|
9
|
+
content: "_content_9ch4s_62",
|
|
10
|
+
contentInner: "_contentInner_9ch4s_77"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./action-sheet.module.js";
|
|
4
|
+
import { DismissableLayer as t, FocusScope as n, Portal as r, Presence as i, cn as a, useControllableSignal as o, useRovingFocus as s, useSignals as c } from "@cascivo/core";
|
|
5
|
+
import { builtin as l, t as u } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as d, jsxs as f } from "react/jsx-runtime";
|
|
7
|
+
import { useId as p } from "react";
|
|
8
|
+
//#region ../components/src/action-sheet/action-sheet.tsx
|
|
9
|
+
function m({ open: m, defaultOpen: h, onOpenChange: g, actions: _, title: v, description: y, showCancel: b = !0, labels: x, className: S }) {
|
|
10
|
+
c();
|
|
11
|
+
let [C, w] = o({
|
|
12
|
+
value: m,
|
|
13
|
+
defaultValue: h ?? !1,
|
|
14
|
+
onChange: g
|
|
15
|
+
}), T = s({
|
|
16
|
+
orientation: "vertical",
|
|
17
|
+
loop: !0
|
|
18
|
+
}), E = p(), D = p(), O = x?.cancel ?? u(l.actionSheet.cancel), k = x?.label ?? u(l.actionSheet.label), A = (e) => {
|
|
19
|
+
e.disabled || (e.onSelect(), w(!1));
|
|
20
|
+
}, j = _.length;
|
|
21
|
+
return /* @__PURE__ */ d(r, { children: /* @__PURE__ */ d(i, {
|
|
22
|
+
present: C,
|
|
23
|
+
children: /* @__PURE__ */ d("div", {
|
|
24
|
+
className: e.overlay,
|
|
25
|
+
children: /* @__PURE__ */ d(t, {
|
|
26
|
+
onDismiss: () => w(!1),
|
|
27
|
+
children: /* @__PURE__ */ d(n, {
|
|
28
|
+
trapped: !0,
|
|
29
|
+
restoreFocus: !0,
|
|
30
|
+
autoFocus: !0,
|
|
31
|
+
children: /* @__PURE__ */ f("div", {
|
|
32
|
+
role: "menu",
|
|
33
|
+
"aria-label": v ? void 0 : k,
|
|
34
|
+
"aria-labelledby": v ? E : void 0,
|
|
35
|
+
"aria-describedby": y ? D : void 0,
|
|
36
|
+
className: a(e.sheet, S),
|
|
37
|
+
children: [/* @__PURE__ */ f("div", {
|
|
38
|
+
className: e.group,
|
|
39
|
+
children: [(v || y) && /* @__PURE__ */ f("div", {
|
|
40
|
+
className: e.heading,
|
|
41
|
+
role: "presentation",
|
|
42
|
+
children: [v && /* @__PURE__ */ d("p", {
|
|
43
|
+
id: E,
|
|
44
|
+
className: e.title,
|
|
45
|
+
children: v
|
|
46
|
+
}), y && /* @__PURE__ */ d("p", {
|
|
47
|
+
id: D,
|
|
48
|
+
className: e.description,
|
|
49
|
+
children: y
|
|
50
|
+
})]
|
|
51
|
+
}), _.map((t, n) => {
|
|
52
|
+
let r = T.getItemProps(n);
|
|
53
|
+
return /* @__PURE__ */ d("button", {
|
|
54
|
+
ref: r.ref,
|
|
55
|
+
type: "button",
|
|
56
|
+
role: "menuitem",
|
|
57
|
+
tabIndex: r.tabIndex,
|
|
58
|
+
"aria-disabled": t.disabled || void 0,
|
|
59
|
+
"data-destructive": t.destructive ? "" : void 0,
|
|
60
|
+
className: e.item,
|
|
61
|
+
onKeyDown: r.onKeyDown,
|
|
62
|
+
onFocus: r.onFocus,
|
|
63
|
+
onClick: () => A(t),
|
|
64
|
+
children: t.label
|
|
65
|
+
}, n);
|
|
66
|
+
})]
|
|
67
|
+
}), b && /* @__PURE__ */ d("div", {
|
|
68
|
+
className: e.group,
|
|
69
|
+
children: (() => {
|
|
70
|
+
let t = T.getItemProps(j);
|
|
71
|
+
return /* @__PURE__ */ d("button", {
|
|
72
|
+
ref: t.ref,
|
|
73
|
+
type: "button",
|
|
74
|
+
role: "menuitem",
|
|
75
|
+
tabIndex: t.tabIndex,
|
|
76
|
+
className: a(e.item, e.cancel),
|
|
77
|
+
onKeyDown: t.onKeyDown,
|
|
78
|
+
onFocus: t.onFocus,
|
|
79
|
+
onClick: () => w(!1),
|
|
80
|
+
children: O
|
|
81
|
+
});
|
|
82
|
+
})()
|
|
83
|
+
})]
|
|
84
|
+
})
|
|
85
|
+
})
|
|
86
|
+
})
|
|
87
|
+
})
|
|
88
|
+
}) });
|
|
89
|
+
}
|
|
90
|
+
//#endregion
|
|
91
|
+
export { m as ActionSheet };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
overlay: "_overlay_17irl_2",
|
|
5
|
+
sheet: "_sheet_17irl_28",
|
|
6
|
+
group: "_group_17irl_50",
|
|
7
|
+
heading: "_heading_17irl_60",
|
|
8
|
+
title: "_title_17irl_66",
|
|
9
|
+
description: "_description_17irl_73",
|
|
10
|
+
item: "_item_17irl_79",
|
|
11
|
+
cancel: "_cancel_17irl_119"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./alert.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/alert/alert.tsx
|
|
8
|
+
var c = new Set(["warning", "destructive"]);
|
|
9
|
+
function l({ variant: l = "default", title: u, icon: d, dismissible: f = !1, onDismiss: p, action: m, className: h, children: g, ..._ }) {
|
|
10
|
+
r();
|
|
11
|
+
let v = n(!1);
|
|
12
|
+
return v.value ? null : /* @__PURE__ */ s("div", {
|
|
13
|
+
role: c.has(l) ? "alert" : "status",
|
|
14
|
+
"data-variant": l,
|
|
15
|
+
className: t(e.alert, h),
|
|
16
|
+
..._,
|
|
17
|
+
children: [
|
|
18
|
+
d && /* @__PURE__ */ o("span", {
|
|
19
|
+
className: e.icon,
|
|
20
|
+
"aria-hidden": "true",
|
|
21
|
+
children: d
|
|
22
|
+
}),
|
|
23
|
+
/* @__PURE__ */ s("div", {
|
|
24
|
+
className: e.body,
|
|
25
|
+
children: [
|
|
26
|
+
u && /* @__PURE__ */ o("div", {
|
|
27
|
+
className: e.title,
|
|
28
|
+
children: u
|
|
29
|
+
}),
|
|
30
|
+
g && /* @__PURE__ */ o("div", {
|
|
31
|
+
className: e.content,
|
|
32
|
+
children: g
|
|
33
|
+
}),
|
|
34
|
+
m && /* @__PURE__ */ o("button", {
|
|
35
|
+
type: "button",
|
|
36
|
+
className: e.action,
|
|
37
|
+
onClick: m.onClick,
|
|
38
|
+
children: m.label
|
|
39
|
+
})
|
|
40
|
+
]
|
|
41
|
+
}),
|
|
42
|
+
f && /* @__PURE__ */ o("button", {
|
|
43
|
+
type: "button",
|
|
44
|
+
className: e.dismiss,
|
|
45
|
+
"aria-label": a(i.alert.dismiss),
|
|
46
|
+
onClick: () => {
|
|
47
|
+
v.value = !0, p?.();
|
|
48
|
+
},
|
|
49
|
+
children: "✕"
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
//#endregion
|
|
55
|
+
export { l as Alert };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
alert: "_alert_a2dn2_2",
|
|
5
|
+
icon: "_icon_a2dn2_18",
|
|
6
|
+
title: "_title_a2dn2_19",
|
|
7
|
+
body: "_body_a2dn2_90",
|
|
8
|
+
content: "_content_a2dn2_104",
|
|
9
|
+
action: "_action_a2dn2_110",
|
|
10
|
+
dismiss: "_dismiss_a2dn2_149"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./alert-dialog.module.js";
|
|
4
|
+
import { useId as t, useSignal as n, useSignalEffect as r } from "@cascivo/core";
|
|
5
|
+
import { builtin as i, t as a } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
import { useRef as c } from "react";
|
|
8
|
+
//#region ../components/src/alert-dialog/alert-dialog.tsx
|
|
9
|
+
function l({ open: l, title: u, description: d, onConfirm: f, onCancel: p, labels: m, variant: h = "default" }) {
|
|
10
|
+
let g = c(null), _ = t("cascivo-alert-dialog-title"), v = t("cascivo-alert-dialog-desc"), y = n(l);
|
|
11
|
+
y.value = l;
|
|
12
|
+
let b = c(null), x = c(p);
|
|
13
|
+
x.current = p;
|
|
14
|
+
let S = c(f);
|
|
15
|
+
return S.current = f, r(() => {
|
|
16
|
+
let e = g.current;
|
|
17
|
+
if (e) if (y.value) {
|
|
18
|
+
try {
|
|
19
|
+
e.showPopover();
|
|
20
|
+
} catch {}
|
|
21
|
+
requestAnimationFrame(() => b.current?.focus());
|
|
22
|
+
} else try {
|
|
23
|
+
e.hidePopover();
|
|
24
|
+
} catch {}
|
|
25
|
+
}), /* @__PURE__ */ o("div", {
|
|
26
|
+
ref: g,
|
|
27
|
+
popover: "manual",
|
|
28
|
+
role: "alertdialog",
|
|
29
|
+
"aria-modal": "true",
|
|
30
|
+
"aria-labelledby": _,
|
|
31
|
+
"aria-describedby": v,
|
|
32
|
+
"data-state": l ? "open" : "closed",
|
|
33
|
+
"data-variant": h,
|
|
34
|
+
className: e.dialog,
|
|
35
|
+
children: /* @__PURE__ */ s("div", {
|
|
36
|
+
className: e.content,
|
|
37
|
+
children: [
|
|
38
|
+
/* @__PURE__ */ o("p", {
|
|
39
|
+
id: _,
|
|
40
|
+
className: e.title,
|
|
41
|
+
children: u
|
|
42
|
+
}),
|
|
43
|
+
/* @__PURE__ */ o("p", {
|
|
44
|
+
id: v,
|
|
45
|
+
className: e.description,
|
|
46
|
+
children: d
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ s("div", {
|
|
49
|
+
className: e.actions,
|
|
50
|
+
children: [/* @__PURE__ */ o("button", {
|
|
51
|
+
ref: b,
|
|
52
|
+
type: "button",
|
|
53
|
+
className: e.cancel,
|
|
54
|
+
onClick: () => x.current(),
|
|
55
|
+
children: m?.cancel ?? a(i.alertDialog.cancel)
|
|
56
|
+
}), /* @__PURE__ */ o("button", {
|
|
57
|
+
type: "button",
|
|
58
|
+
className: e.confirm,
|
|
59
|
+
onClick: () => S.current(),
|
|
60
|
+
children: m?.confirm ?? a(i.alertDialog.confirm)
|
|
61
|
+
})]
|
|
62
|
+
})
|
|
63
|
+
]
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
//#endregion
|
|
68
|
+
export { l as AlertDialog };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
dialog: "_dialog_1net6_2",
|
|
5
|
+
content: "_content_1net6_58",
|
|
6
|
+
title: "_title_1net6_71",
|
|
7
|
+
description: "_description_1net6_78",
|
|
8
|
+
actions: "_actions_1net6_84",
|
|
9
|
+
cancel: "_cancel_1net6_123",
|
|
10
|
+
confirm: "_confirm_1net6_124"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./app-shell.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
6
|
+
import { cloneElement as c, isValidElement as l, useRef as u } from "react";
|
|
7
|
+
//#region ../components/src/app-shell/app-shell.tsx
|
|
8
|
+
function d({ header: d, nav: f, children: p, footer: m, open: h, defaultOpen: g, onOpenChange: _, className: v }) {
|
|
9
|
+
i();
|
|
10
|
+
let y = h !== void 0, b = n(h ?? g ?? !0);
|
|
11
|
+
y && (b.value = h);
|
|
12
|
+
let x = u(null), S = u(null);
|
|
13
|
+
function C(e) {
|
|
14
|
+
y || (b.value = e), _?.(e);
|
|
15
|
+
}
|
|
16
|
+
function w() {
|
|
17
|
+
typeof document < "u" && (S.current = document.activeElement), C(!b.value);
|
|
18
|
+
}
|
|
19
|
+
r(() => {
|
|
20
|
+
y || g !== void 0 || typeof window > "u" || typeof window.matchMedia != "function" || window.matchMedia("(max-width: 63.999rem)").matches && (b.value = !1);
|
|
21
|
+
}), r(() => {
|
|
22
|
+
if (!b.value || typeof document > "u") return;
|
|
23
|
+
let e = (e) => {
|
|
24
|
+
e.key === "Escape" && C(!1);
|
|
25
|
+
};
|
|
26
|
+
return document.addEventListener("keydown", e), () => document.removeEventListener("keydown", e);
|
|
27
|
+
}), r(() => {
|
|
28
|
+
let e = x.current;
|
|
29
|
+
if (e) if (b.value) e.removeAttribute("inert");
|
|
30
|
+
else {
|
|
31
|
+
e.setAttribute("inert", "");
|
|
32
|
+
let t = S.current;
|
|
33
|
+
t && e.contains(document.activeElement) && t.focus();
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
let T = l(d) && f ? c(d, {
|
|
37
|
+
onMenuClick: w,
|
|
38
|
+
menuExpanded: b.value
|
|
39
|
+
}) : d;
|
|
40
|
+
return /* @__PURE__ */ s("div", {
|
|
41
|
+
className: t(e.shell, v),
|
|
42
|
+
"data-open": b.value,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ o("div", {
|
|
45
|
+
className: e.header,
|
|
46
|
+
children: T
|
|
47
|
+
}),
|
|
48
|
+
/* @__PURE__ */ s("div", {
|
|
49
|
+
className: e.body,
|
|
50
|
+
children: [f && /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("div", {
|
|
51
|
+
ref: x,
|
|
52
|
+
className: e.navWrapper,
|
|
53
|
+
"data-open": b.value,
|
|
54
|
+
"data-testid": "app-shell-nav",
|
|
55
|
+
children: /* @__PURE__ */ o("div", {
|
|
56
|
+
className: e.navInner,
|
|
57
|
+
children: f
|
|
58
|
+
})
|
|
59
|
+
}), /* @__PURE__ */ o("div", {
|
|
60
|
+
className: e.scrim,
|
|
61
|
+
"data-open": b.value,
|
|
62
|
+
"data-testid": "app-shell-scrim",
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
onClick: () => C(!1)
|
|
65
|
+
})] }), /* @__PURE__ */ o("main", {
|
|
66
|
+
id: "cascade-main",
|
|
67
|
+
tabIndex: -1,
|
|
68
|
+
className: e.main,
|
|
69
|
+
children: p
|
|
70
|
+
})]
|
|
71
|
+
}),
|
|
72
|
+
m && /* @__PURE__ */ o("div", {
|
|
73
|
+
className: e.footer,
|
|
74
|
+
children: m
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { d as AppShell };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
shell: "_shell_11je2_4",
|
|
5
|
+
header: "_header_11je2_16",
|
|
6
|
+
body: "_body_11je2_21",
|
|
7
|
+
navWrapper: "_navWrapper_11je2_32",
|
|
8
|
+
navInner: "_navInner_11je2_58",
|
|
9
|
+
scrim: "_scrim_11je2_70",
|
|
10
|
+
main: "_main_11je2_87",
|
|
11
|
+
footer: "_footer_11je2_93"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./aspect-ratio.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/aspect-ratio/aspect-ratio.tsx
|
|
7
|
+
function r({ ratio: r = 16 / 9, className: i, style: a, children: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: t(e.root, i),
|
|
10
|
+
style: {
|
|
11
|
+
"--cascivo-aspect-ratio": r,
|
|
12
|
+
...a
|
|
13
|
+
},
|
|
14
|
+
...s,
|
|
15
|
+
children: /* @__PURE__ */ n("div", {
|
|
16
|
+
className: e.inner,
|
|
17
|
+
children: o
|
|
18
|
+
})
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as AspectRatio };
|