@cascivo/react 0.3.4 → 0.3.7
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 +12 -9
- package/dist/accordion/accordion.css +1 -0
- package/dist/accordion/accordion.js +95 -0
- package/dist/accordion/accordion.module.js +14 -0
- package/dist/action-sheet/action-sheet.css +1 -0
- package/dist/action-sheet/action-sheet.js +91 -0
- package/dist/action-sheet/action-sheet.module.js +15 -0
- package/dist/alert/alert.css +1 -0
- package/dist/alert/alert.js +55 -0
- package/dist/alert/alert.module.js +14 -0
- package/dist/alert-dialog/alert-dialog.css +1 -0
- package/dist/alert-dialog/alert-dialog.js +68 -0
- package/dist/alert-dialog/alert-dialog.module.js +14 -0
- package/dist/app-shell/app-shell.css +1 -0
- package/dist/app-shell/app-shell.js +80 -0
- package/dist/app-shell/app-shell.module.js +15 -0
- package/dist/aspect-ratio/aspect-ratio.css +1 -0
- package/dist/aspect-ratio/aspect-ratio.js +22 -0
- package/dist/aspect-ratio/aspect-ratio.module.js +9 -0
- package/dist/avatar/avatar.css +1 -0
- package/dist/avatar/avatar.js +45 -0
- package/dist/avatar/avatar.module.js +11 -0
- package/dist/avatar-group/avatar-group.css +1 -0
- package/dist/avatar-group/avatar-group.js +26 -0
- package/dist/avatar-group/avatar-group.module.js +9 -0
- package/dist/badge/badge.css +1 -0
- package/dist/badge/badge.js +17 -0
- package/dist/badge/badge.module.js +6 -0
- package/dist/blockquote/blockquote.css +1 -0
- package/dist/blockquote/blockquote.js +18 -0
- package/dist/blockquote/blockquote.module.js +9 -0
- package/dist/bottom-sheet/bottom-sheet.css +1 -0
- package/dist/bottom-sheet/bottom-sheet.js +111 -0
- package/dist/bottom-sheet/bottom-sheet.module.js +17 -0
- package/dist/breadcrumb/breadcrumb.css +1 -0
- package/dist/breadcrumb/breadcrumb.js +28 -0
- package/dist/breadcrumb/breadcrumb.module.js +6 -0
- package/dist/button/button.css +1 -0
- package/dist/button/button.js +31 -0
- package/dist/button/button.module.js +6 -0
- package/dist/button-group/button-group.css +1 -0
- package/dist/button-group/button-group.js +39 -0
- package/dist/button-group/button-group.module.js +6 -0
- package/dist/calendar/calendar.css +1 -0
- package/dist/calendar/calendar.js +195 -0
- package/dist/calendar/calendar.module.js +17 -0
- package/dist/card/card.css +1 -0
- package/dist/card/card.js +45 -0
- package/dist/card/card.module.js +12 -0
- package/dist/carousel/carousel.css +1 -0
- package/dist/carousel/carousel.js +138 -0
- package/dist/carousel/carousel.module.js +16 -0
- package/dist/chat-bubble/chat-bubble.css +1 -0
- package/dist/chat-bubble/chat-bubble.js +33 -0
- package/dist/chat-bubble/chat-bubble.module.js +14 -0
- package/dist/checkbox/checkbox.css +1 -0
- package/dist/checkbox/checkbox.js +38 -0
- package/dist/checkbox/checkbox.module.js +11 -0
- package/dist/checkbox-card/checkbox-card.css +1 -0
- package/dist/checkbox-card/checkbox-card.js +48 -0
- package/dist/checkbox-card/checkbox-card.module.js +14 -0
- package/dist/code/code.css +1 -0
- package/dist/code/code.js +16 -0
- package/dist/code/code.module.js +6 -0
- package/dist/code-snippet/code-snippet.css +1 -0
- package/dist/code-snippet/code-snippet.js +116 -0
- package/dist/code-snippet/code-snippet.module.js +20 -0
- package/dist/code-snippet/highlight.js +69 -0
- package/dist/collapsible/collapsible.css +1 -0
- package/dist/collapsible/collapsible.js +42 -0
- package/dist/collapsible/collapsible.module.js +11 -0
- package/dist/color-picker/color-picker.css +1 -0
- package/dist/color-picker/color-picker.js +268 -0
- package/dist/color-picker/color-picker.module.js +21 -0
- package/dist/combobox/combobox.css +1 -0
- package/dist/combobox/combobox.js +164 -0
- package/dist/combobox/combobox.module.js +22 -0
- package/dist/command-menu/command-menu.css +1 -0
- package/dist/command-menu/command-menu.js +263 -0
- package/dist/command-menu/command-menu.module.js +22 -0
- package/dist/comparison/comparison.css +1 -0
- package/dist/comparison/comparison.js +69 -0
- package/dist/comparison/comparison.module.js +12 -0
- package/dist/contained-list/contained-list.css +1 -0
- package/dist/contained-list/contained-list.js +41 -0
- package/dist/contained-list/contained-list.module.js +14 -0
- package/dist/context-menu/context-menu.css +1 -0
- package/dist/context-menu/context-menu.js +60 -0
- package/dist/context-menu/context-menu.module.js +10 -0
- package/dist/copy-button/copy-button.css +1 -0
- package/dist/copy-button/copy-button.js +58 -0
- package/dist/copy-button/copy-button.module.js +9 -0
- package/dist/data-list/data-list.css +1 -0
- package/dist/data-list/data-list.js +27 -0
- package/dist/data-list/data-list.module.js +11 -0
- package/dist/data-table/data-table.css +1 -0
- package/dist/data-table/data-table.js +368 -0
- package/dist/data-table/data-table.module.js +36 -0
- package/dist/date-picker/date-picker.css +1 -0
- package/dist/date-picker/date-picker.js +218 -0
- package/dist/date-picker/date-picker.module.js +26 -0
- package/dist/date-range-picker/date-range-picker.css +1 -0
- package/dist/date-range-picker/date-range-picker.js +195 -0
- package/dist/date-range-picker/date-range-picker.module.js +21 -0
- package/dist/dock/dock.css +1 -0
- package/dist/dock/dock.js +32 -0
- package/dist/dock/dock.module.js +11 -0
- package/dist/drawer/drawer.css +1 -0
- package/dist/drawer/drawer.js +95 -0
- package/dist/drawer/drawer.module.js +16 -0
- package/dist/dropdown/dropdown.css +1 -0
- package/dist/dropdown/dropdown.js +109 -0
- package/dist/dropdown/dropdown.module.js +12 -0
- package/dist/editable/editable.css +1 -0
- package/dist/editable/editable.js +67 -0
- package/dist/editable/editable.module.js +14 -0
- package/dist/empty-state/empty-state.css +1 -0
- package/dist/empty-state/empty-state.js +34 -0
- package/dist/empty-state/empty-state.module.js +12 -0
- package/dist/fab/fab.css +1 -0
- package/dist/fab/fab.js +93 -0
- package/dist/fab/fab.module.js +15 -0
- package/dist/field/field.css +1 -0
- package/dist/field/field.js +39 -0
- package/dist/field/field.module.js +10 -0
- package/dist/file-uploader/file-uploader.css +1 -0
- package/dist/file-uploader/file-uploader.js +122 -0
- package/dist/file-uploader/file-uploader.module.js +21 -0
- package/dist/filter/filter.css +1 -0
- package/dist/filter/filter.js +34 -0
- package/dist/filter/filter.module.js +9 -0
- package/dist/form/form.css +1 -0
- package/dist/form/form.js +88 -0
- package/dist/form/form.module.js +6 -0
- package/dist/header/header.css +1 -0
- package/dist/header/header.js +44 -0
- package/dist/header/header.module.js +14 -0
- package/dist/header-panel/header-panel.css +1 -0
- package/dist/header-panel/header-panel.js +74 -0
- package/dist/header-panel/header-panel.module.js +12 -0
- package/dist/heading/heading.css +1 -0
- package/dist/heading/heading.js +24 -0
- package/dist/heading/heading.module.js +6 -0
- package/dist/hover-card/hover-card.css +1 -0
- package/dist/hover-card/hover-card.js +84 -0
- package/dist/hover-card/hover-card.module.js +9 -0
- package/dist/icon-button/icon-button.css +1 -0
- package/dist/icon-button/icon-button.js +21 -0
- package/dist/icon-button/icon-button.module.js +6 -0
- package/dist/image/image.css +1 -0
- package/dist/image/image.js +64 -0
- package/dist/image/image.module.js +12 -0
- package/dist/indicator/indicator.css +1 -0
- package/dist/indicator/indicator.js +18 -0
- package/dist/indicator/indicator.module.js +9 -0
- package/dist/inline-loading/inline-loading.css +1 -0
- package/dist/inline-loading/inline-loading.js +76 -0
- package/dist/inline-loading/inline-loading.module.js +12 -0
- package/dist/input/input.css +1 -0
- package/dist/input/input.js +54 -0
- package/dist/input/input.module.js +12 -0
- package/dist/input-group/input-group.css +1 -0
- package/dist/input-group/input-group.js +41 -0
- package/dist/input-group/input-group.module.js +12 -0
- package/dist/item/item.css +1 -0
- package/dist/item/item.js +52 -0
- package/dist/item/item.module.js +13 -0
- package/dist/join/join.css +1 -0
- package/dist/join/join.js +14 -0
- package/dist/join/join.module.js +6 -0
- package/dist/kbd/kbd.css +1 -0
- package/dist/kbd/kbd.js +16 -0
- package/dist/kbd/kbd.module.js +6 -0
- package/dist/label/label.css +1 -0
- package/dist/label/label.js +25 -0
- package/dist/label/label.module.js +10 -0
- package/dist/link/link.css +1 -0
- package/dist/link/link.js +22 -0
- package/dist/link/link.module.js +6 -0
- package/dist/list/list.css +1 -0
- package/dist/list/list.js +23 -0
- package/dist/list/list.module.js +9 -0
- package/dist/menu/menu.css +1 -0
- package/dist/menu/menu.js +96 -0
- package/dist/menu/menu.module.js +11 -0
- package/dist/menu-button/menu-button.css +1 -0
- package/dist/menu-button/menu-button.js +92 -0
- package/dist/menu-button/menu-button.module.js +11 -0
- package/dist/menubar/menubar.css +1 -0
- package/dist/menubar/menubar.js +103 -0
- package/dist/menubar/menubar.module.js +11 -0
- package/dist/modal/modal.css +1 -0
- package/dist/modal/modal.js +73 -0
- package/dist/modal/modal.module.js +14 -0
- package/dist/multi-select/multi-select.css +1 -0
- package/dist/multi-select/multi-select.js +105 -0
- package/dist/multi-select/multi-select.module.js +18 -0
- package/dist/native-select/native-select.css +1 -0
- package/dist/native-select/native-select.js +37 -0
- package/dist/native-select/native-select.module.js +10 -0
- package/dist/navigation-menu/navigation-menu.css +1 -0
- package/dist/navigation-menu/navigation-menu.js +95 -0
- package/dist/navigation-menu/navigation-menu.module.js +13 -0
- package/dist/notification/notification.css +1 -0
- package/dist/notification/notification.js +134 -0
- package/dist/notification/notification.module.js +14 -0
- package/dist/number-input/number-input.css +1 -0
- package/dist/number-input/number-input.js +145 -0
- package/dist/number-input/number-input.module.js +15 -0
- package/dist/otp-input/otp-input.css +1 -0
- package/dist/otp-input/otp-input.js +70 -0
- package/dist/otp-input/otp-input.module.js +9 -0
- package/dist/overflow-menu/overflow-menu.css +1 -0
- package/dist/overflow-menu/overflow-menu.js +65 -0
- package/dist/overflow-menu/overflow-menu.module.js +10 -0
- package/dist/pagination/pagination.css +1 -0
- package/dist/pagination/pagination.js +92 -0
- package/dist/pagination/pagination.module.js +14 -0
- package/dist/password-input/password-input.css +1 -0
- package/dist/password-input/password-input.js +76 -0
- package/dist/password-input/password-input.module.js +14 -0
- package/dist/popover/popover.css +1 -0
- package/dist/popover/popover.js +49 -0
- package/dist/popover/popover.module.js +9 -0
- package/dist/popover/use-popover.js +57 -0
- package/dist/progress/progress.css +1 -0
- package/dist/progress/progress.js +17 -0
- package/dist/progress/progress.module.js +9 -0
- package/dist/progress-bar/progress-bar.css +1 -0
- package/dist/progress-bar/progress-bar.js +44 -0
- package/dist/progress-bar/progress-bar.module.js +14 -0
- package/dist/progress-circle/progress-circle.css +1 -0
- package/dist/progress-circle/progress-circle.js +48 -0
- package/dist/progress-circle/progress-circle.module.js +12 -0
- package/dist/progress-indicator/progress-indicator.css +1 -0
- package/dist/progress-indicator/progress-indicator.js +36 -0
- package/dist/progress-indicator/progress-indicator.module.js +13 -0
- package/dist/prose/prose.css +1 -0
- package/dist/prose/prose.js +15 -0
- package/dist/prose/prose.module.js +6 -0
- package/dist/pull-to-refresh/pull-to-refresh.css +1 -0
- package/dist/pull-to-refresh/pull-to-refresh.js +82 -0
- package/dist/pull-to-refresh/pull-to-refresh.module.js +12 -0
- package/dist/qr-code/encode.js +585 -0
- package/dist/qr-code/qr-code.css +1 -0
- package/dist/qr-code/qr-code.js +41 -0
- package/dist/qr-code/qr-code.module.js +9 -0
- package/dist/radial-progress/radial-progress.css +1 -0
- package/dist/radial-progress/radial-progress.js +25 -0
- package/dist/radial-progress/radial-progress.module.js +9 -0
- package/dist/radio/radio.css +1 -0
- package/dist/radio/radio.js +49 -0
- package/dist/radio/radio.module.js +12 -0
- package/dist/radio-card/radio-card.css +1 -0
- package/dist/radio-card/radio-card.js +63 -0
- package/dist/radio-card/radio-card.module.js +14 -0
- package/dist/rating-group/rating-group.css +1 -0
- package/dist/rating-group/rating-group.js +37 -0
- package/dist/rating-group/rating-group.module.js +9 -0
- package/dist/react/src/index.js +130 -0
- package/dist/relative-time/relative-time.css +1 -0
- package/dist/relative-time/relative-time.js +65 -0
- package/dist/relative-time/relative-time.module.js +6 -0
- package/dist/resizable/resizable.css +1 -0
- package/dist/resizable/resizable.js +80 -0
- package/dist/resizable/resizable.module.js +11 -0
- package/dist/scroll-area/scroll-area.css +1 -0
- package/dist/scroll-area/scroll-area.js +38 -0
- package/dist/scroll-area/scroll-area.module.js +6 -0
- package/dist/search/search.css +1 -0
- package/dist/search/search.js +94 -0
- package/dist/search/search.module.js +12 -0
- package/dist/segmented-control/segmented-control.css +1 -0
- package/dist/segmented-control/segmented-control.js +43 -0
- package/dist/segmented-control/segmented-control.module.js +9 -0
- package/dist/select/select.css +1 -0
- package/dist/select/select.js +71 -0
- package/dist/select/select.module.js +14 -0
- package/dist/separator/separator.css +1 -0
- package/dist/separator/separator.js +21 -0
- package/dist/separator/separator.module.js +6 -0
- package/dist/sheet/sheet.css +1 -0
- package/dist/sheet/sheet.js +50 -0
- package/dist/sheet/sheet.module.js +12 -0
- package/dist/shell-header/shell-header.css +1 -0
- package/dist/shell-header/shell-header.js +165 -0
- package/dist/shell-header/shell-header.module.js +26 -0
- package/dist/side-nav/side-nav.css +1 -0
- package/dist/side-nav/side-nav.js +326 -0
- package/dist/side-nav/side-nav.module.js +34 -0
- package/dist/skeleton/skeleton.css +1 -0
- package/dist/skeleton/skeleton.js +25 -0
- package/dist/skeleton/skeleton.module.js +10 -0
- package/dist/skip-nav/skip-nav.css +1 -0
- package/dist/skip-nav/skip-nav.js +27 -0
- package/dist/skip-nav/skip-nav.module.js +6 -0
- package/dist/slider/slider.css +1 -0
- package/dist/slider/slider.js +29 -0
- package/dist/slider/slider.module.js +10 -0
- package/dist/spinner/spinner.css +1 -0
- package/dist/spinner/spinner.js +18 -0
- package/dist/spinner/spinner.module.js +9 -0
- package/dist/stack/stack.css +1 -0
- package/dist/stack/stack.js +19 -0
- package/dist/stack/stack.module.js +9 -0
- package/dist/stat/stat.css +1 -0
- package/dist/stat/stat.js +37 -0
- package/dist/stat/stat.module.js +13 -0
- package/dist/status/status.css +1 -0
- package/dist/status/status.js +20 -0
- package/dist/status/status.module.js +10 -0
- package/dist/steps/steps.css +1 -0
- package/dist/steps/steps.js +32 -0
- package/dist/steps/steps.module.js +11 -0
- package/dist/structured-list/structured-list.css +1 -0
- package/dist/structured-list/structured-list.js +101 -0
- package/dist/structured-list/structured-list.module.js +15 -0
- package/dist/styles.css +248 -0
- package/dist/swap/swap.css +1 -0
- package/dist/swap/swap.js +36 -0
- package/dist/swap/swap.module.js +10 -0
- package/dist/swipe-item/swipe-item.css +1 -0
- package/dist/swipe-item/swipe-item.js +62 -0
- package/dist/swipe-item/swipe-item.module.js +15 -0
- package/dist/switcher/switcher.css +1 -0
- package/dist/switcher/switcher.js +29 -0
- package/dist/switcher/switcher.module.js +11 -0
- package/dist/tabs/tabs.css +1 -0
- package/dist/tabs/tabs.js +95 -0
- package/dist/tabs/tabs.module.js +11 -0
- package/dist/tag/tag.css +1 -0
- package/dist/tag/tag.js +26 -0
- package/dist/tag/tag.module.js +9 -0
- package/dist/tags-input/tags-input.css +1 -0
- package/dist/tags-input/tags-input.js +63 -0
- package/dist/tags-input/tags-input.module.js +11 -0
- package/dist/text/text.css +1 -0
- package/dist/text/text.js +18 -0
- package/dist/text/text.module.js +6 -0
- package/dist/textarea/textarea.css +1 -0
- package/dist/textarea/textarea.js +56 -0
- package/dist/textarea/textarea.module.js +12 -0
- package/dist/tile/tile.css +1 -0
- package/dist/tile/tile.js +39 -0
- package/dist/tile/tile.module.js +10 -0
- package/dist/time-picker/time-picker.css +1 -0
- package/dist/time-picker/time-picker.js +62 -0
- package/dist/time-picker/time-picker.module.js +12 -0
- package/dist/timeline/timeline.css +1 -0
- package/dist/timeline/timeline.js +41 -0
- package/dist/timeline/timeline.module.js +14 -0
- package/dist/toast/toast.css +1 -0
- package/dist/toast/toast.js +85 -0
- package/dist/toast/toast.module.js +14 -0
- package/dist/toc/toc.css +1 -0
- package/dist/toc/toc.js +42 -0
- package/dist/toc/toc.module.js +6 -0
- package/dist/toc/use-toc-from-region.js +17 -0
- package/dist/toggle/toggle.css +1 -0
- package/dist/toggle/toggle.js +39 -0
- package/dist/toggle/toggle.module.js +11 -0
- package/dist/toggle-group/toggle-group.css +1 -0
- package/dist/toggle-group/toggle-group.js +55 -0
- package/dist/toggle-group/toggle-group.module.js +9 -0
- package/dist/toggletip/toggletip.css +1 -0
- package/dist/toggletip/toggletip.js +49 -0
- package/dist/toggletip/toggletip.module.js +10 -0
- package/dist/tooltip/tooltip.css +1 -0
- package/dist/tooltip/tooltip.js +58 -0
- package/dist/tooltip/tooltip.module.js +9 -0
- package/dist/tree-view/tree-view.css +1 -0
- package/dist/tree-view/tree-view.js +201 -0
- package/dist/tree-view/tree-view.module.js +16 -0
- package/dist/user/user.css +1 -0
- package/dist/user/user.js +33 -0
- package/dist/user/user.module.js +12 -0
- package/dist/visually-hidden/visually-hidden.css +1 -0
- package/dist/visually-hidden/visually-hidden.js +15 -0
- package/dist/visually-hidden/visually-hidden.module.js +6 -0
- package/package.json +6 -6
- package/readme.body.md +12 -9
- package/dist/cascivo.css +0 -2
- package/dist/index.js +0 -9174
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._group_il139_2{align-items:center;display:inline-flex}._group_il139_2>*{box-shadow:0 0 0 2px var(--cascivo-color-surface)}._group_il139_2:not([data-grid])>:not(:first-child){margin-inline-start:var(--overlap,-.5rem)}._group_il139_2[data-spacing=sm]{--overlap:-.25rem}._group_il139_2[data-spacing=md]{--overlap:-.5rem}._group_il139_2[data-spacing=lg]{--overlap:-.75rem}._group_il139_2[data-grid]{gap:var(--cascivo-space-2);grid-template-columns:repeat(auto-fit,minmax(0,max-content));display:inline-grid}._overflow_il139_34{color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-xs);font-weight:var(--cascivo-font-medium)}}
|
|
@@ -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 @@
|
|
|
1
|
+
@layer cascivo.component{._badge_beiqa_2{font-family:var(--cascivo-font-sans);font-weight:var(--cascivo-font-medium);border-radius:var(--cascivo-radius-badge);white-space:nowrap;border:1px solid #0000;align-items:center;display:inline-flex}._badge_beiqa_2[data-size=sm]{padding-inline:var(--cascivo-space-2);padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);line-height:1}._badge_beiqa_2[data-size=md]{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);line-height:var(--cascivo-leading-normal)}._badge_beiqa_2[data-variant=default]{background-color:var(--cascivo-color-accent);color:var(--cascivo-color-text-on-accent)}._badge_beiqa_2[data-variant=secondary]{background-color:var(--cascivo-color-bg-subtle);color:var(--cascivo-color-text);border-color:var(--cascivo-color-border)}._badge_beiqa_2[data-variant=success]{background-color:var(--cascivo-color-success-subtle);color:var(--cascivo-color-success-foreground)}._badge_beiqa_2[data-variant=warning]{background-color:var(--cascivo-color-warning-subtle);color:var(--cascivo-color-warning-foreground)}._badge_beiqa_2[data-variant=destructive]{background-color:var(--cascivo-color-destructive-subtle);color:var(--cascivo-color-destructive-foreground)}._badge_beiqa_2[data-variant=primary]{background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-content)}._badge_beiqa_2[data-variant=info]{background-color:var(--cascivo-color-info);color:var(--cascivo-color-info-content)}._badge_beiqa_2[data-variant=error]{background-color:var(--cascivo-color-error);color:var(--cascivo-color-error-content)}._badge_beiqa_2[data-variant=outline]{color:var(--cascivo-color-text);border-color:var(--cascivo-color-border-strong);background-color:#0000}}@media (forced-colors:active){._badge_beiqa_2{color:canvastext;border:1px solid canvastext}}@media (prefers-contrast:more){._badge_beiqa_2{border-width:2px}}
|
|
@@ -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 @@
|
|
|
1
|
+
@layer cascivo.component{._blockquote_ja266_2{border-inline-start:3px solid var(--cascivo-color-border-strong);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-base);line-height:var(--cascivo-leading-relaxed);color:var(--cascivo-color-text-subtle);margin:0;padding-inline-start:var(--cascivo-space-4)}._footer_ja266_12{font-size:var(--cascivo-text-sm);margin-block-start:var(--cascivo-space-2)}._footer_ja266_12 cite{color:var(--cascivo-color-text);font-style:normal;font-weight:var(--cascivo-font-medium)}._footer_ja266_12 cite:before{content:"— "}}
|
|
@@ -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 @@
|
|
|
1
|
+
@layer cascivo.component{._overlay_k9sg5_2{z-index:var(--cascivo-z-overlay,50);opacity:1;transition:opacity var(--cascivo-motion-enter);background-color:#0006;justify-content:center;align-items:flex-end;display:flex;position:fixed;inset:0}._overlay_k9sg5_2[data-state=closed]{opacity:0;transition:opacity var(--cascivo-motion-exit)}@starting-style{._overlay_k9sg5_2[data-state=open]{opacity:0}}._panel_k9sg5_25{inline-size:100%;max-inline-size:32rem;block-size:var(--_sheet-height,92dvh);background:var(--cascivo-color-surface);max-block-size:100dvh;box-shadow:var(--cascivo-shadow-overlay);translate:0 max(0px, calc(var(--_sheet-y,0%) + var(--_sheet-drag,0px)));transition:translate var(--cascivo-motion-enter);border-start-start-radius:var(--cascivo-radius-overlay);border-start-end-radius:var(--cascivo-radius-overlay);flex-direction:column;display:flex}._panel_k9sg5_25[data-dragging]{transition:none}._overlay_k9sg5_2[data-state=closed] ._panel_k9sg5_25{transition:translate var(--cascivo-motion-exit);translate:0 100%}@starting-style{._overlay_k9sg5_2[data-state=open] ._panel_k9sg5_25{translate:0 100%}}._header_k9sg5_59{justify-content:space-between;align-items:flex-start;gap:var(--cascivo-space-4);padding:var(--cascivo-space-3) var(--cascivo-space-6) var(--cascivo-space-4);border-block-end:1px solid var(--cascivo-color-border);touch-action:none;cursor:grab;flex-wrap:wrap;flex-shrink:0;display:flex}._header_k9sg5_59:active{cursor:grabbing}._handle_k9sg5_77{block-size:.25rem;inline-size:2.25rem;border-radius:var(--cascivo-radius-full,9999px);background:var(--cascivo-color-border);flex-basis:100%;margin-block-end:var(--cascivo-space-2);margin-inline:auto}._heading_k9sg5_87{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_k9sg5_93{font-size:var(--cascivo-text-lg);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);margin:0}._description_k9sg5_100{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);margin:0}._close_k9sg5_106{block-size:2rem;inline-size:2rem;color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:color var(--cascivo-duration-150) var(--cascivo-ease-out), background-color var(--cascivo-duration-150) var(--cascivo-ease-out);background:0 0;border:none;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:flex}._close_k9sg5_106:hover{color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle)}._close_k9sg5_106:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}@media (pointer:coarse){._close_k9sg5_106{min-inline-size:var(--cascivo-target-min-coarse,2.75rem);min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}._closeIcon_k9sg5_140{block-size:1rem;inline-size:1rem}._body_k9sg5_145{padding:var(--cascivo-space-6);overscroll-behavior:contain;flex:1;padding-block-end:calc(var(--cascivo-space-6) + env(safe-area-inset-bottom,0px));overflow-y:auto}@media (prefers-reduced-motion:reduce){._panel_k9sg5_25{transition:none}}}
|
|
@@ -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,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './bottom-sheet.css';
|
|
4
|
+
var e = {
|
|
5
|
+
overlay: "_overlay_k9sg5_2",
|
|
6
|
+
panel: "_panel_k9sg5_25",
|
|
7
|
+
header: "_header_k9sg5_59",
|
|
8
|
+
handle: "_handle_k9sg5_77",
|
|
9
|
+
heading: "_heading_k9sg5_87",
|
|
10
|
+
title: "_title_k9sg5_93",
|
|
11
|
+
description: "_description_k9sg5_100",
|
|
12
|
+
close: "_close_k9sg5_106",
|
|
13
|
+
closeIcon: "_closeIcon_k9sg5_140",
|
|
14
|
+
body: "_body_k9sg5_145"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._breadcrumb_1c3dy_2{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-normal)}._breadcrumb_1c3dy_2 ol{align-items:center;gap:var(--cascivo-space-2);flex-wrap:wrap;margin:0;padding:0;list-style:none;display:flex}._breadcrumb_1c3dy_2 li{align-items:center;gap:var(--cascivo-space-2);color:var(--cascivo-color-text-muted);display:inline-flex}._breadcrumb_1c3dy_2 li+li:before{content:"/" / "";color:var(--cascivo-color-text-subtle)}._breadcrumb_1c3dy_2 a{color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-item);transition:color var(--cascivo-duration-150) var(--cascivo-ease-out);text-decoration:none}._breadcrumb_1c3dy_2 a:hover{color:var(--cascivo-color-text);text-decoration:underline}._breadcrumb_1c3dy_2 a:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._breadcrumb_1c3dy_2 [aria-current=page]{color:var(--cascivo-color-text);font-weight:var(--cascivo-font-medium)}}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./breadcrumb.module.js";
|
|
4
|
+
import { cn as t, useSignals as n } from "@cascivo/core";
|
|
5
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/breadcrumb/breadcrumb.tsx
|
|
8
|
+
function o({ items: o, maxVisible: s, className: c, ariaLabel: l }) {
|
|
9
|
+
n();
|
|
10
|
+
let u = l ?? i(r.breadcrumb.nav), d = o, f = o[0];
|
|
11
|
+
return f !== void 0 && s !== void 0 && o.length > s && (d = [
|
|
12
|
+
f,
|
|
13
|
+
{ label: "…" },
|
|
14
|
+
...o.slice(o.length - (s - 2))
|
|
15
|
+
]), /* @__PURE__ */ a("nav", {
|
|
16
|
+
"aria-label": u,
|
|
17
|
+
className: t(e.breadcrumb, c),
|
|
18
|
+
children: /* @__PURE__ */ a("ol", { children: d.map((e, t) => /* @__PURE__ */ a("li", { children: t === d.length - 1 ? /* @__PURE__ */ a("span", {
|
|
19
|
+
"aria-current": "page",
|
|
20
|
+
children: e.label
|
|
21
|
+
}) : e.href === void 0 ? /* @__PURE__ */ a("span", { children: e.label }) : /* @__PURE__ */ a("a", {
|
|
22
|
+
href: e.href,
|
|
23
|
+
children: e.label
|
|
24
|
+
}) }, `${t}-${e.label}`)) })
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
//#endregion
|
|
28
|
+
export { o as Breadcrumb };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._button_1l5my_2{justify-content:center;align-items:center;gap:var(--cascivo-space-2);font-family:var(--cascivo-font-sans);font-weight:var(--cascivo-font-medium);line-height:var(--cascivo-leading-none);white-space:nowrap;cursor:pointer;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);border-radius:var(--cascivo-button-radius,var(--cascivo-radius-control));border:1px solid #0000;display:inline-flex}._button_1l5my_2:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._button_1l5my_2:disabled{opacity:.5;opacity:var(--cascivo-disabled-opacity,.5);cursor:not-allowed;pointer-events:none}._button_1l5my_2[data-size=sm]{height:var(--cascivo-control-height-sm);padding-inline:var(--cascivo-space-3);font-size:var(--cascivo-text-sm)}._button_1l5my_2[data-size=md]{height:var(--cascivo-control-height-md);padding-inline:var(--cascivo-space-4);padding-block:.5rem;padding-block:--cascivo-step(2);font-size:var(--cascivo-text-sm)}._button_1l5my_2[data-size=lg]{height:var(--cascivo-control-height-lg);padding-inline:var(--cascivo-space-6);font-size:var(--cascivo-text-base)}@media (pointer:coarse){._button_1l5my_2[data-size=sm],._button_1l5my_2[data-size=md]{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}._button_1l5my_2[data-variant=primary]{background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-fg)}._button_1l5my_2[data-variant=primary]:hover:not(:disabled){background-color:var(--cascivo-color-primary-hover)}._button_1l5my_2[data-variant=primary]:active:not(:disabled){background-color:var(--cascivo-color-primary-active)}._button_1l5my_2[data-variant=secondary]{background-color:var(--cascivo-color-secondary);color:var(--cascivo-color-secondary-content)}._button_1l5my_2[data-variant=secondary]:hover:not(:disabled){background-color:var(--cascivo-color-secondary-hover)}._button_1l5my_2[data-variant=ghost]{color:var(--cascivo-color-text);background-color:#0000}._button_1l5my_2[data-variant=ghost]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._button_1l5my_2[data-variant=destructive]{background-color:var(--cascivo-color-destructive);color:var(--cascivo-color-text-on-destructive)}._button_1l5my_2[data-variant=destructive]:hover:not(:disabled){background-color:var(--cascivo-color-destructive-hover)}}@media (forced-colors:active){._button_1l5my_2{border:1px solid buttontext}._button_1l5my_2:focus-visible{outline-offset:2px;outline:2px solid highlight}._button_1l5my_2:disabled{color:graytext;border-color:graytext}}
|
|
@@ -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 @@
|
|
|
1
|
+
@layer cascivo.component{._buttonGroup_3e81x_2{--_radius:var(--cascivo-button-radius,var(--cascivo-radius-control));display:inline-flex}._buttonGroup_3e81x_2[data-orientation=horizontal]{flex-direction:row}._buttonGroup_3e81x_2[data-orientation=vertical]{flex-direction:column}._buttonGroup_3e81x_2>*{border-radius:0}._buttonGroup_3e81x_2[data-orientation=horizontal]>:first-child{border-start-start-radius:var(--_radius);border-end-start-radius:var(--_radius)}._buttonGroup_3e81x_2[data-orientation=horizontal]>:last-child{border-start-end-radius:var(--_radius);border-end-end-radius:var(--_radius)}._buttonGroup_3e81x_2[data-orientation=horizontal]>:not(:first-child){margin-inline-start:-1px}._buttonGroup_3e81x_2[data-orientation=vertical]>:first-child{border-start-start-radius:var(--_radius);border-start-end-radius:var(--_radius)}._buttonGroup_3e81x_2[data-orientation=vertical]>:last-child{border-end-end-radius:var(--_radius);border-end-start-radius:var(--_radius)}._buttonGroup_3e81x_2[data-orientation=vertical]>:not(:first-child){margin-block-start:-1px}._buttonGroup_3e81x_2>:hover,._buttonGroup_3e81x_2>:focus-visible,._buttonGroup_3e81x_2>:focus-within{z-index:1;position:relative}}
|
|
@@ -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 @@
|
|
|
1
|
+
@layer cascivo.component{._calendar_7pqxh_2{--cascivo-calendar-bg:var(--cascivo-color-surface);--cascivo-calendar-radius:var(--cascivo-radius-overlay);--cascivo-calendar-cell-size:2.25rem;--cascivo-calendar-day-selected-bg:var(--cascivo-color-accent);--cascivo-calendar-day-selected-fg:var(--cascivo-color-accent-foreground,var(--cascivo-color-text-on-accent));--cascivo-calendar-day-today-color:var(--cascivo-color-accent);--cascivo-calendar-range-bg:color-mix(in srgb, var(--cascivo-color-accent) 16%, transparent);gap:var(--cascivo-space-2);padding:var(--cascivo-space-3);font-family:var(--cascivo-font-sans);background-color:var(--cascivo-calendar-bg);border-radius:var(--cascivo-calendar-radius);flex-direction:column;display:inline-flex}._calendar_7pqxh_2[data-size=sm]{--cascivo-calendar-cell-size:1.875rem}._calendar_7pqxh_2[data-size=md]{--cascivo-calendar-cell-size:2.25rem}._calendar_7pqxh_2[data-size=lg]{--cascivo-calendar-cell-size:2.75rem}._header_7pqxh_33{justify-content:space-between;align-items:center;margin-block-end:var(--cascivo-space-1);display:flex}._monthLabel_7pqxh_40{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text)}._navButton_7pqxh_46{border-radius:var(--cascivo-radius-control);cursor:pointer;block-size:2rem;inline-size:2rem;color:var(--cascivo-color-text-muted);font-size:var(--cascivo-text-base);background:0 0;border:1px solid #0000;outline:none;justify-content:center;align-items:center;display:inline-flex}._navButton_7pqxh_46:hover{background-color:var(--cascivo-color-bg-subtle);color:var(--cascivo-color-text)}._navButton_7pqxh_46:focus-visible{box-shadow:var(--cascivo-focus-ring)}._navSpacer_7pqxh_69{block-size:2rem;inline-size:2rem}._grid_7pqxh_74{border-collapse:collapse;inline-size:100%}._weekday_7pqxh_79{padding-block:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-muted);text-align:center;inline-size:var(--cascivo-calendar-cell-size)}._cell_7pqxh_88{text-align:center;padding:0}._cell_7pqxh_88[data-in-range]{background-color:var(--cascivo-calendar-range-bg)}._cell_7pqxh_88:has([data-in-range]){background-color:var(--cascivo-calendar-range-bg)}._empty_7pqxh_99{inline-size:var(--cascivo-calendar-cell-size);block-size:var(--cascivo-calendar-cell-size)}._day_7pqxh_104{inline-size:var(--cascivo-calendar-cell-size);block-size:var(--cascivo-calendar-cell-size);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-control);cursor:pointer;background:0 0;border:none;outline:none;justify-content:center;align-items:center;display:inline-flex}._day_7pqxh_104:hover:not([aria-disabled]){background-color:var(--cascivo-color-bg-subtle)}._day_7pqxh_104:focus-visible{box-shadow:var(--cascivo-focus-ring)}._day_7pqxh_104[data-today]{font-weight:var(--cascivo-font-semibold);color:var(--cascivo-calendar-day-today-color)}._day_7pqxh_104[data-in-range]{background-color:var(--cascivo-calendar-range-bg)}._day_7pqxh_104[data-selected],._day_7pqxh_104[data-range-start],._day_7pqxh_104[data-range-end]{background-color:var(--cascivo-calendar-day-selected-bg);color:var(--cascivo-calendar-day-selected-fg)}._day_7pqxh_104[aria-disabled]{opacity:.35;cursor:not-allowed}}@media (forced-colors:active){._day_7pqxh_104[data-selected]{outline:2px solid highlight}}
|
|
@@ -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,17 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './calendar.css';
|
|
4
|
+
var e = {
|
|
5
|
+
calendar: "_calendar_7pqxh_2",
|
|
6
|
+
header: "_header_7pqxh_33",
|
|
7
|
+
monthLabel: "_monthLabel_7pqxh_40",
|
|
8
|
+
navButton: "_navButton_7pqxh_46",
|
|
9
|
+
navSpacer: "_navSpacer_7pqxh_69",
|
|
10
|
+
grid: "_grid_7pqxh_74",
|
|
11
|
+
weekday: "_weekday_7pqxh_79",
|
|
12
|
+
cell: "_cell_7pqxh_88",
|
|
13
|
+
empty: "_empty_7pqxh_99",
|
|
14
|
+
day: "_day_7pqxh_104"
|
|
15
|
+
};
|
|
16
|
+
//#endregion
|
|
17
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._card_hb4jd_2{background-color:var(--cascivo-color-surface);border-radius:var(--cascivo-radius-surface);padding:var(--_card-p,0);overflow:hidden}._card_hb4jd_2[data-padding=none]{--_card-p:0}._card_hb4jd_2[data-padding=sm]{--_card-p:var(--cascivo-space-4)}._card_hb4jd_2[data-padding=md]{--_card-p:var(--cascivo-space-6)}._card_hb4jd_2[data-padding=lg]{--_card-p:var(--cascivo-space-8)}._card_hb4jd_2[data-variant=default]{border:1px solid var(--cascivo-color-border)}._card_hb4jd_2[data-variant=outlined]{border:1.5px solid var(--cascivo-color-border-strong)}._card_hb4jd_2[data-variant=elevated]{box-shadow:var(--cascivo-shadow-md);border:none}._header_hb4jd_35{padding:var(--_card-p,var(--cascivo-space-6));gap:var(--cascivo-space-1);flex-direction:column;padding-block-end:0;display:flex}._title_hb4jd_43{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-lg);font-weight:var(--cascivo-font-semibold);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-tight);margin:0}._content_hb4jd_52{padding:var(--_card-p,var(--cascivo-space-6));color:var(--cascivo-color-text-subtle);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-relaxed)}._footer_hb4jd_60{padding:var(--_card-p,var(--cascivo-space-6));align-items:center;gap:var(--cascivo-space-2);padding-block-start:0;display:flex}}
|
|
@@ -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 };
|