@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{._radialProgress_1z011_2{--cascivo-radial-size:5rem;--cascivo-radial-thickness:.375rem;--cascivo-radial-color:var(--cascivo-color-accent);inline-size:var(--cascivo-radial-size);block-size:var(--cascivo-radial-size);border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-surface-2);background-image:conic-gradient(var(--cascivo-radial-color) calc(var(--cascivo-radial-progress,0) * 1%), transparent 0);box-shadow:inset 0 0 0 calc(var(--cascivo-radial-size) / 2 - var(--cascivo-radial-thickness)) var(--cascivo-color-surface);justify-content:center;align-items:center;display:inline-flex}._radialProgress_1z011_2[data-size=sm]{--cascivo-radial-size:3.5rem;--cascivo-radial-thickness:.25rem}._radialProgress_1z011_2[data-size=md]{--cascivo-radial-size:5rem;--cascivo-radial-thickness:.375rem}._radialProgress_1z011_2[data-size=lg]{--cascivo-radial-size:7rem;--cascivo-radial-thickness:.5rem}._radialProgress_1z011_2[data-variant=primary]{--cascivo-radial-color:var(--cascivo-color-primary)}._radialProgress_1z011_2[data-variant=info]{--cascivo-radial-color:var(--cascivo-color-info)}._radialProgress_1z011_2[data-variant=success]{--cascivo-radial-color:var(--cascivo-color-success)}._radialProgress_1z011_2[data-variant=warning]{--cascivo-radial-color:var(--cascivo-color-warning)}._radialProgress_1z011_2[data-variant=error]{--cascivo-radial-color:var(--cascivo-color-error)}._label_1z011_51{color:var(--cascivo-color-text);font-size:.875em;font-weight:600;line-height:1}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./radial-progress.module.js";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region ../components/src/radial-progress/radial-progress.tsx
|
|
6
|
+
function n({ value: n, size: r = "md", variant: i = "primary", children: a, className: o, ...s }) {
|
|
7
|
+
let c = Math.min(100, Math.max(0, n));
|
|
8
|
+
return /* @__PURE__ */ t("div", {
|
|
9
|
+
role: "progressbar",
|
|
10
|
+
"aria-valuenow": c,
|
|
11
|
+
"aria-valuemin": 0,
|
|
12
|
+
"aria-valuemax": 100,
|
|
13
|
+
className: [e.radialProgress, o].filter(Boolean).join(" "),
|
|
14
|
+
"data-size": r,
|
|
15
|
+
"data-variant": i,
|
|
16
|
+
style: { "--cascivo-radial-progress": c },
|
|
17
|
+
...s,
|
|
18
|
+
children: /* @__PURE__ */ t("span", {
|
|
19
|
+
className: e.label,
|
|
20
|
+
children: a ?? `${c}%`
|
|
21
|
+
})
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { n as RadialProgress };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._group_1jh68_2{gap:var(--cascivo-space-3);display:flex}._group_1jh68_2[data-orientation=vertical]{flex-direction:column}._group_1jh68_2[data-orientation=horizontal]{flex-flow:wrap}._wrapper_1jh68_15{align-items:center;gap:var(--cascivo-space-2);font-family:var(--cascivo-font-sans);cursor:pointer;display:inline-flex}._wrapper_1jh68_15[data-disabled]{opacity:.5;cursor:not-allowed}._input_1jh68_28{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._control_1jh68_41{background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-full);block-size:1.125rem;inline-size:1.125rem;transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);flex-shrink:0;justify-content:center;align-items:center;display:inline-flex}._control_1jh68_41:after{content:"";border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-text-on-accent);block-size:.5rem;inline-size:.5rem;transition:scale var(--cascivo-duration-150) var(--cascivo-ease-out);scale:0}._input_1jh68_28:checked+._control_1jh68_41{background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent)}._input_1jh68_28:checked+._control_1jh68_41:after{scale:1}._input_1jh68_28:focus-visible+._control_1jh68_41{box-shadow:var(--cascivo-focus-ring);outline:none}._label_1jh68_80{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}}@media (forced-colors:active){._control_1jh68_41{background-color:field;border:1px solid buttontext}._input_1jh68_28:checked+._control_1jh68_41{background-color:highlight;border-color:highlight}._input_1jh68_28:focus-visible+._control_1jh68_41{outline-offset:2px;outline:2px solid highlight}}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./radio.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import { Children as i, cloneElement as a, isValidElement as o } from "react";
|
|
7
|
+
//#region ../components/src/radio/radio.tsx
|
|
8
|
+
function s({ label: i, className: a, id: o, disabled: s, value: c, ...l }) {
|
|
9
|
+
let u = o ?? (i ? `cascade-radio-${c}` : void 0);
|
|
10
|
+
return /* @__PURE__ */ r("label", {
|
|
11
|
+
className: t(e.wrapper, a),
|
|
12
|
+
"data-disabled": s || void 0,
|
|
13
|
+
children: [
|
|
14
|
+
/* @__PURE__ */ n("input", {
|
|
15
|
+
id: u,
|
|
16
|
+
type: "radio",
|
|
17
|
+
value: c,
|
|
18
|
+
className: e.input,
|
|
19
|
+
disabled: s,
|
|
20
|
+
...l
|
|
21
|
+
}),
|
|
22
|
+
/* @__PURE__ */ n("span", {
|
|
23
|
+
className: e.control,
|
|
24
|
+
"aria-hidden": "true"
|
|
25
|
+
}),
|
|
26
|
+
i && /* @__PURE__ */ n("span", {
|
|
27
|
+
className: e.label,
|
|
28
|
+
children: i
|
|
29
|
+
})
|
|
30
|
+
]
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function c({ name: r, value: s, defaultValue: c, onChange: l, orientation: u = "vertical", className: d, children: f }) {
|
|
34
|
+
let p = s !== void 0;
|
|
35
|
+
return /* @__PURE__ */ n("div", {
|
|
36
|
+
role: "radiogroup",
|
|
37
|
+
"data-orientation": u,
|
|
38
|
+
className: t(e.group, d),
|
|
39
|
+
children: i.map(f, (e) => {
|
|
40
|
+
if (!o(e)) return e;
|
|
41
|
+
let t = e, n = t.props.value, i = { name: r };
|
|
42
|
+
return p ? i.checked = n === s : c !== void 0 && (i.defaultChecked = n === c), l && (i.onChange = (e) => {
|
|
43
|
+
e.target.checked && l(n);
|
|
44
|
+
}), a(t, i);
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
//#endregion
|
|
49
|
+
export { s as Radio, c as RadioGroup };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._group_1290l_2{gap:var(--cascivo-space-3);display:grid}._card_1290l_7{gap:var(--cascivo-space-3);padding:var(--cascivo-space-4);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);background:var(--cascivo-color-bg);cursor:pointer;align-items:flex-start;transition:border-color .12s,background-color .12s;display:flex}._card_1290l_7:hover:not([data-disabled]){border-color:var(--cascivo-color-border-strong)}._card_1290l_7:has(input:checked){border-color:var(--cascivo-color-accent);background:color-mix(in oklch, var(--cascivo-color-accent) 4%, var(--cascivo-color-bg))}._card_1290l_7:has(input:focus-visible){box-shadow:var(--cascivo-focus-ring)}._card_1290l_7[data-disabled]{opacity:.5;cursor:not-allowed}._input_1290l_39{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._glyph_1290l_48{border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-full);flex:none;block-size:1rem;inline-size:1rem;margin-block-start:2px;transition:border-color .12s,background-color .12s}._card_1290l_7:has(input:checked) ._glyph_1290l_48{border-color:var(--cascivo-color-accent);background:radial-gradient(circle, var(--cascivo-color-accent) 0 35%, transparent 40%)}._body_1290l_65{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_1290l_71{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._description_1290l_77{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle)}}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./radio-card.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n, jsxs as r } from "react/jsx-runtime";
|
|
6
|
+
import { createContext as i } from "react";
|
|
7
|
+
//#region ../components/src/radio-card/radio-card.tsx
|
|
8
|
+
var a = i({ name: "" });
|
|
9
|
+
function o({ name: r, label: i, value: o, defaultValue: s, onValueChange: c, children: l, className: u }) {
|
|
10
|
+
return /* @__PURE__ */ n(a.Provider, {
|
|
11
|
+
value: {
|
|
12
|
+
name: r,
|
|
13
|
+
value: o,
|
|
14
|
+
defaultValue: s,
|
|
15
|
+
onValueChange: c
|
|
16
|
+
},
|
|
17
|
+
children: /* @__PURE__ */ n("div", {
|
|
18
|
+
role: "radiogroup",
|
|
19
|
+
"aria-label": i,
|
|
20
|
+
className: t(e.group, u),
|
|
21
|
+
children: l
|
|
22
|
+
})
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
function s({ value: t, title: i, description: o, disabled: s, hideIndicator: c, ...l }) {
|
|
26
|
+
return /* @__PURE__ */ n(a.Consumer, { children: (a) => /* @__PURE__ */ r("label", {
|
|
27
|
+
className: e.card,
|
|
28
|
+
"data-disabled": s || void 0,
|
|
29
|
+
children: [
|
|
30
|
+
/* @__PURE__ */ n("input", {
|
|
31
|
+
type: "radio",
|
|
32
|
+
className: e.input,
|
|
33
|
+
name: a.name,
|
|
34
|
+
value: t,
|
|
35
|
+
disabled: s,
|
|
36
|
+
...a.value === void 0 ? {
|
|
37
|
+
defaultChecked: a.defaultValue === t,
|
|
38
|
+
onChange: () => a.onValueChange?.(t)
|
|
39
|
+
} : {
|
|
40
|
+
checked: a.value === t,
|
|
41
|
+
onChange: () => a.onValueChange?.(t)
|
|
42
|
+
},
|
|
43
|
+
...l
|
|
44
|
+
}),
|
|
45
|
+
!c && /* @__PURE__ */ n("span", {
|
|
46
|
+
className: e.glyph,
|
|
47
|
+
"aria-hidden": "true"
|
|
48
|
+
}),
|
|
49
|
+
/* @__PURE__ */ r("span", {
|
|
50
|
+
className: e.body,
|
|
51
|
+
children: [/* @__PURE__ */ n("span", {
|
|
52
|
+
className: e.title,
|
|
53
|
+
children: i
|
|
54
|
+
}), o && /* @__PURE__ */ n("span", {
|
|
55
|
+
className: e.description,
|
|
56
|
+
children: o
|
|
57
|
+
})]
|
|
58
|
+
})
|
|
59
|
+
]
|
|
60
|
+
}) });
|
|
61
|
+
}
|
|
62
|
+
//#endregion
|
|
63
|
+
export { s as RadioCard, o as RadioCardGroup };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './radio-card.css';
|
|
4
|
+
var e = {
|
|
5
|
+
group: "_group_1290l_2",
|
|
6
|
+
card: "_card_1290l_7",
|
|
7
|
+
input: "_input_1290l_39",
|
|
8
|
+
glyph: "_glyph_1290l_48",
|
|
9
|
+
body: "_body_1290l_65",
|
|
10
|
+
title: "_title_1290l_71",
|
|
11
|
+
description: "_description_1290l_77"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._wrapper_b346p_2{gap:var(--cascivo-space-1);align-items:center;display:inline-flex}._wrapper_b346p_2[data-size=sm]{--_star-size:1.25rem}._wrapper_b346p_2[data-size=md]{--_star-size:1.5rem}._wrapper_b346p_2[data-size=lg]{--_star-size:2rem}._star_b346p_20{width:var(--_star-size,1.5rem);height:var(--_star-size,1.5rem);cursor:pointer;color:var(--cascivo-color-border-strong);transition:color var(--cascivo-duration-100) var(--cascivo-ease-out), transform var(--cascivo-duration-100) var(--cascivo-ease-out);background:0 0;background-color:var(--cascivo-color-border-strong);border:none;padding:0;-webkit-mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");mask-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l3.09 6.26L22 9.27l-5 4.87 1.18 6.88L12 17.77l-6.18 3.25L7 14.14 2 9.27l6.91-1.01L12 2z'/%3E%3C/svg%3E");-webkit-mask-size:contain;mask-size:contain;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat}._wrapper_b346p_2:not(:has(:disabled)):not(:has([tabindex="-1"])):hover ._star_b346p_20[data-filled]{background-color:var(--cascivo-color-warning)}._star_b346p_20[data-filled]{background-color:var(--cascivo-color-warning)}._wrapper_b346p_2:not(:has(:disabled)):hover ._star_b346p_20:hover~._star_b346p_20{background-color:var(--cascivo-color-border-strong)}._star_b346p_20:focus-visible{outline:2px solid var(--cascivo-color-accent);outline-offset:2px;border-radius:var(--cascivo-radius-control)}._star_b346p_20:disabled{cursor:not-allowed;opacity:.5}._star_b346p_20:not(:disabled):not([tabindex="-1"]):hover{transform:scale(1.1)}}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./rating-group.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/rating-group/rating-group.tsx
|
|
7
|
+
function r(e, t) {
|
|
8
|
+
return `${e} of ${t} stars`;
|
|
9
|
+
}
|
|
10
|
+
function i({ value: i, onValueChange: a, max: o = 5, size: s = "md", disabled: c = !1, readOnly: l = !1, labels: u, className: d, ...f }) {
|
|
11
|
+
let p = u?.rating ?? r, m = !c && !l && a !== void 0;
|
|
12
|
+
return /* @__PURE__ */ n("div", {
|
|
13
|
+
className: t(e.wrapper, d),
|
|
14
|
+
"data-size": s,
|
|
15
|
+
role: "radiogroup",
|
|
16
|
+
...f,
|
|
17
|
+
children: Array.from({ length: o }, (t, r) => {
|
|
18
|
+
let s = r + 1, l = s <= i;
|
|
19
|
+
return /* @__PURE__ */ n("button", {
|
|
20
|
+
type: "button",
|
|
21
|
+
role: "radio",
|
|
22
|
+
"aria-checked": s === i,
|
|
23
|
+
"aria-label": p(s, o),
|
|
24
|
+
className: e.star,
|
|
25
|
+
"data-filled": l ? "" : void 0,
|
|
26
|
+
"data-value": s,
|
|
27
|
+
disabled: c,
|
|
28
|
+
tabIndex: m ? 0 : -1,
|
|
29
|
+
onClick: () => {
|
|
30
|
+
m && a(s);
|
|
31
|
+
}
|
|
32
|
+
}, s);
|
|
33
|
+
})
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
//#endregion
|
|
37
|
+
export { i as RatingGroup };
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Spinner as e } from "../../spinner/spinner.js";
|
|
4
|
+
import { Button as t } from "../../button/button.js";
|
|
5
|
+
import { Input as n } from "../../input/input.js";
|
|
6
|
+
import { Card as r, CardContent as i, CardFooter as a, CardHeader as o, CardTitle as s } from "../../card/card.js";
|
|
7
|
+
import { Badge as c } from "../../badge/badge.js";
|
|
8
|
+
import { Modal as l } from "../../modal/modal.js";
|
|
9
|
+
import { Separator as u } from "../../separator/separator.js";
|
|
10
|
+
import { Alert as d } from "../../alert/alert.js";
|
|
11
|
+
import { Avatar as f } from "../../avatar/avatar.js";
|
|
12
|
+
import { AvatarGroup as p } from "../../avatar-group/avatar-group.js";
|
|
13
|
+
import { User as m } from "../../user/user.js";
|
|
14
|
+
import { Image as h } from "../../image/image.js";
|
|
15
|
+
import { Textarea as g } from "../../textarea/textarea.js";
|
|
16
|
+
import { Select as _ } from "../../select/select.js";
|
|
17
|
+
import { Checkbox as v } from "../../checkbox/checkbox.js";
|
|
18
|
+
import { Radio as y, RadioGroup as b } from "../../radio/radio.js";
|
|
19
|
+
import { Toggle as x } from "../../toggle/toggle.js";
|
|
20
|
+
import { Slider as S } from "../../slider/slider.js";
|
|
21
|
+
import { Tooltip as C } from "../../tooltip/tooltip.js";
|
|
22
|
+
import { Dropdown as w } from "../../dropdown/dropdown.js";
|
|
23
|
+
import { ToastProvider as T, dismissAllToasts as E, useToast as D } from "../../toast/toast.js";
|
|
24
|
+
import { Tabs as O, TabsContent as k, TabsList as A, TabsTrigger as j } from "../../tabs/tabs.js";
|
|
25
|
+
import { Accordion as M, AccordionContent as N, AccordionItem as P, AccordionTrigger as F } from "../../accordion/accordion.js";
|
|
26
|
+
import { ActionSheet as I } from "../../action-sheet/action-sheet.js";
|
|
27
|
+
import { Kbd as L } from "../../kbd/kbd.js";
|
|
28
|
+
import { Link as R } from "../../link/link.js";
|
|
29
|
+
import { Breadcrumb as z } from "../../breadcrumb/breadcrumb.js";
|
|
30
|
+
import { Toc as B } from "../../toc/toc.js";
|
|
31
|
+
import { useTocFromRegion as V } from "../../toc/use-toc-from-region.js";
|
|
32
|
+
import { Header as H } from "../../header/header.js";
|
|
33
|
+
import { usePopover as U } from "../../popover/use-popover.js";
|
|
34
|
+
import { SideNav as W } from "../../side-nav/side-nav.js";
|
|
35
|
+
import { Pagination as G } from "../../pagination/pagination.js";
|
|
36
|
+
import { ProgressIndicator as K } from "../../progress-indicator/progress-indicator.js";
|
|
37
|
+
import { Tag as q } from "../../tag/tag.js";
|
|
38
|
+
import { Skeleton as J } from "../../skeleton/skeleton.js";
|
|
39
|
+
import { ProgressBar as Y } from "../../progress-bar/progress-bar.js";
|
|
40
|
+
import { EmptyState as X } from "../../empty-state/empty-state.js";
|
|
41
|
+
import { Fab as Z } from "../../fab/fab.js";
|
|
42
|
+
import { OverflowMenu as Q } from "../../overflow-menu/overflow-menu.js";
|
|
43
|
+
import { Search as $ } from "../../search/search.js";
|
|
44
|
+
import { NumberInput as ee } from "../../number-input/number-input.js";
|
|
45
|
+
import { DataTable as te } from "../../data-table/data-table.js";
|
|
46
|
+
import { CommandMenu as ne, fuzzyScore as re } from "../../command-menu/command-menu.js";
|
|
47
|
+
import { Form as ie, createForm as ae, useForm as oe } from "../../form/form.js";
|
|
48
|
+
import { Combobox as se } from "../../combobox/combobox.js";
|
|
49
|
+
import { DatePicker as ce } from "../../date-picker/date-picker.js";
|
|
50
|
+
import { FileUploader as le } from "../../file-uploader/file-uploader.js";
|
|
51
|
+
import { TimePicker as ue } from "../../time-picker/time-picker.js";
|
|
52
|
+
import { Popover as de, PopoverContent as fe, PopoverTrigger as pe } from "../../popover/popover.js";
|
|
53
|
+
import { Menu as me, MenuItem as he, MenuSeparator as ge, MenuTrigger as _e } from "../../menu/menu.js";
|
|
54
|
+
import { AlertDialog as ve } from "../../alert-dialog/alert-dialog.js";
|
|
55
|
+
import { Sheet as ye } from "../../sheet/sheet.js";
|
|
56
|
+
import { BottomSheet as be } from "../../bottom-sheet/bottom-sheet.js";
|
|
57
|
+
import { ContextMenu as xe, ContextMenuItem as Se } from "../../context-menu/context-menu.js";
|
|
58
|
+
import { Comparison as Ce } from "../../comparison/comparison.js";
|
|
59
|
+
import { HoverCard as we, HoverCardContent as Te, HoverCardTrigger as Ee } from "../../hover-card/hover-card.js";
|
|
60
|
+
import { PasswordInput as De } from "../../password-input/password-input.js";
|
|
61
|
+
import { MultiSelect as Oe } from "../../multi-select/multi-select.js";
|
|
62
|
+
import { TagsInput as ke } from "../../tags-input/tags-input.js";
|
|
63
|
+
import { OtpInput as Ae } from "../../otp-input/otp-input.js";
|
|
64
|
+
import { SegmentedControl as je } from "../../segmented-control/segmented-control.js";
|
|
65
|
+
import { InputGroup as Me, InputGroupAddon as Ne } from "../../input-group/input-group.js";
|
|
66
|
+
import { RatingGroup as Pe } from "../../rating-group/rating-group.js";
|
|
67
|
+
import { Editable as Fe } from "../../editable/editable.js";
|
|
68
|
+
import { RadioCard as Ie, RadioCardGroup as Le } from "../../radio-card/radio-card.js";
|
|
69
|
+
import { ShellHeader as Re } from "../../shell-header/shell-header.js";
|
|
70
|
+
import { HeaderPanel as ze } from "../../header-panel/header-panel.js";
|
|
71
|
+
import { Switcher as Be } from "../../switcher/switcher.js";
|
|
72
|
+
import { CheckboxCard as Ve } from "../../checkbox-card/checkbox-card.js";
|
|
73
|
+
import { CopyButton as He } from "../../copy-button/copy-button.js";
|
|
74
|
+
import { Stat as Ue } from "../../stat/stat.js";
|
|
75
|
+
import { Status as We } from "../../status/status.js";
|
|
76
|
+
import { VisuallyHidden as Ge } from "../../visually-hidden/visually-hidden.js";
|
|
77
|
+
import { SkipNavLink as Ke, SkipNavTarget as qe } from "../../skip-nav/skip-nav.js";
|
|
78
|
+
import { Progress as Je } from "../../progress/progress.js";
|
|
79
|
+
import { ProgressCircle as Ye } from "../../progress-circle/progress-circle.js";
|
|
80
|
+
import { Heading as Xe } from "../../heading/heading.js";
|
|
81
|
+
import { Text as Ze } from "../../text/text.js";
|
|
82
|
+
import { Code as Qe } from "../../code/code.js";
|
|
83
|
+
import { Blockquote as $e } from "../../blockquote/blockquote.js";
|
|
84
|
+
import { List as et, ListItem as tt } from "../../list/list.js";
|
|
85
|
+
import { Prose as nt } from "../../prose/prose.js";
|
|
86
|
+
import { PullToRefresh as rt } from "../../pull-to-refresh/pull-to-refresh.js";
|
|
87
|
+
import { QrCode as it } from "../../qr-code/qr-code.js";
|
|
88
|
+
import { RelativeTime as at } from "../../relative-time/relative-time.js";
|
|
89
|
+
import { Label as ot } from "../../label/label.js";
|
|
90
|
+
import { Field as st } from "../../field/field.js";
|
|
91
|
+
import { Filter as ct } from "../../filter/filter.js";
|
|
92
|
+
import { IconButton as lt } from "../../icon-button/icon-button.js";
|
|
93
|
+
import { ButtonGroup as ut } from "../../button-group/button-group.js";
|
|
94
|
+
import { ToggleGroup as dt } from "../../toggle-group/toggle-group.js";
|
|
95
|
+
import { InlineLoading as ft } from "../../inline-loading/inline-loading.js";
|
|
96
|
+
import { Notification as pt } from "../../notification/notification.js";
|
|
97
|
+
import { ScrollArea as mt } from "../../scroll-area/scroll-area.js";
|
|
98
|
+
import { Collapsible as ht } from "../../collapsible/collapsible.js";
|
|
99
|
+
import { AspectRatio as gt } from "../../aspect-ratio/aspect-ratio.js";
|
|
100
|
+
import { MenuButton as _t } from "../../menu-button/menu-button.js";
|
|
101
|
+
import { Toggletip as vt } from "../../toggletip/toggletip.js";
|
|
102
|
+
import { Menubar as yt } from "../../menubar/menubar.js";
|
|
103
|
+
import { NavigationMenu as bt } from "../../navigation-menu/navigation-menu.js";
|
|
104
|
+
import { TreeView as xt, treeViewMessages as St } from "../../tree-view/tree-view.js";
|
|
105
|
+
import { StructuredList as Ct } from "../../structured-list/structured-list.js";
|
|
106
|
+
import { ContainedList as wt, ContainedListItem as Tt } from "../../contained-list/contained-list.js";
|
|
107
|
+
import { DataList as Et } from "../../data-list/data-list.js";
|
|
108
|
+
import { Timeline as Dt } from "../../timeline/timeline.js";
|
|
109
|
+
import { Item as Ot, ItemActions as kt, ItemContent as At, ItemDescription as jt, ItemMedia as Mt, ItemTitle as Nt } from "../../item/item.js";
|
|
110
|
+
import { Calendar as Pt } from "../../calendar/calendar.js";
|
|
111
|
+
import { DateRangePicker as Ft } from "../../date-range-picker/date-range-picker.js";
|
|
112
|
+
import { ColorPicker as It } from "../../color-picker/color-picker.js";
|
|
113
|
+
import { Carousel as Lt } from "../../carousel/carousel.js";
|
|
114
|
+
import { Resizable as Rt } from "../../resizable/resizable.js";
|
|
115
|
+
import { Dock as zt } from "../../dock/dock.js";
|
|
116
|
+
import { Drawer as Bt } from "../../drawer/drawer.js";
|
|
117
|
+
import { NativeSelect as Vt } from "../../native-select/native-select.js";
|
|
118
|
+
import { CodeSnippet as Ht } from "../../code-snippet/code-snippet.js";
|
|
119
|
+
import { Steps as Ut } from "../../steps/steps.js";
|
|
120
|
+
import { Tile as Wt } from "../../tile/tile.js";
|
|
121
|
+
import { Indicator as Gt } from "../../indicator/indicator.js";
|
|
122
|
+
import { Join as Kt } from "../../join/join.js";
|
|
123
|
+
import { Stack as qt } from "../../stack/stack.js";
|
|
124
|
+
import { AppShell as Jt } from "../../app-shell/app-shell.js";
|
|
125
|
+
import { ChatBubble as Yt } from "../../chat-bubble/chat-bubble.js";
|
|
126
|
+
import { RadialProgress as Xt } from "../../radial-progress/radial-progress.js";
|
|
127
|
+
import { Swap as Zt } from "../../swap/swap.js";
|
|
128
|
+
import { SwipeItem as Qt } from "../../swipe-item/swipe-item.js";
|
|
129
|
+
import { ErrorBoundary as $t, FocusScope as en, Portal as tn, SuspenseBoundary as nn } from "@cascivo/core";
|
|
130
|
+
export { M as Accordion, N as AccordionContent, P as AccordionItem, F as AccordionTrigger, I as ActionSheet, d as Alert, ve as AlertDialog, Jt as AppShell, gt as AspectRatio, f as Avatar, p as AvatarGroup, c as Badge, $e as Blockquote, be as BottomSheet, z as Breadcrumb, t as Button, ut as ButtonGroup, Pt as Calendar, r as Card, i as CardContent, a as CardFooter, o as CardHeader, s as CardTitle, Lt as Carousel, Yt as ChatBubble, v as Checkbox, Ve as CheckboxCard, Qe as Code, Ht as CodeSnippet, ht as Collapsible, It as ColorPicker, se as Combobox, ne as CommandMenu, Ce as Comparison, wt as ContainedList, Tt as ContainedListItem, xe as ContextMenu, Se as ContextMenuItem, He as CopyButton, Et as DataList, te as DataTable, ce as DatePicker, Ft as DateRangePicker, zt as Dock, Bt as Drawer, w as Dropdown, Fe as Editable, X as EmptyState, $t as ErrorBoundary, Z as Fab, st as Field, le as FileUploader, ct as Filter, en as FocusScope, ie as Form, H as Header, ze as HeaderPanel, Xe as Heading, we as HoverCard, Te as HoverCardContent, Ee as HoverCardTrigger, lt as IconButton, h as Image, Gt as Indicator, ft as InlineLoading, n as Input, Me as InputGroup, Ne as InputGroupAddon, Ot as Item, kt as ItemActions, At as ItemContent, jt as ItemDescription, Mt as ItemMedia, Nt as ItemTitle, Kt as Join, L as Kbd, ot as Label, R as Link, et as List, tt as ListItem, me as Menu, _t as MenuButton, he as MenuItem, ge as MenuSeparator, _e as MenuTrigger, yt as Menubar, l as Modal, Oe as MultiSelect, Vt as NativeSelect, bt as NavigationMenu, pt as Notification, ee as NumberInput, Ae as OtpInput, Q as OverflowMenu, G as Pagination, De as PasswordInput, de as Popover, fe as PopoverContent, pe as PopoverTrigger, tn as Portal, Je as Progress, Y as ProgressBar, Ye as ProgressCircle, K as ProgressIndicator, nt as Prose, rt as PullToRefresh, it as QrCode, Xt as RadialProgress, y as Radio, Ie as RadioCard, Le as RadioCardGroup, b as RadioGroup, Pe as RatingGroup, at as RelativeTime, Rt as Resizable, mt as ScrollArea, $ as Search, je as SegmentedControl, _ as Select, u as Separator, ye as Sheet, Re as ShellHeader, W as SideNav, J as Skeleton, Ke as SkipNavLink, qe as SkipNavTarget, S as Slider, e as Spinner, qt as Stack, Ue as Stat, We as Status, Ut as Steps, Ct as StructuredList, nn as SuspenseBoundary, Zt as Swap, Qt as SwipeItem, Be as Switcher, O as Tabs, k as TabsContent, A as TabsList, j as TabsTrigger, q as Tag, ke as TagsInput, Ze as Text, g as Textarea, Wt as Tile, ue as TimePicker, Dt as Timeline, T as ToastProvider, B as Toc, x as Toggle, dt as ToggleGroup, vt as Toggletip, C as Tooltip, xt as TreeView, m as User, Ge as VisuallyHidden, ae as createForm, E as dismissAllToasts, re as fuzzyScore, St as treeViewMessages, oe as useForm, U as usePopover, D as useToast, V as useTocFromRegion };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._relativeTime_ohxan_2{color:inherit;font:inherit;display:inline}}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./relative-time.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignalEffect as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { formatDate as a, formatRelativeTime as o } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as s } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/relative-time/relative-time.tsx
|
|
8
|
+
var c = 1e3, l = 60 * c, u = 60 * l, d = 24 * u, f = 7 * d, p = 30 * d, m = 365 * d;
|
|
9
|
+
function h(e) {
|
|
10
|
+
let t = Math.abs(e);
|
|
11
|
+
return t < l ? {
|
|
12
|
+
value: Math.round(e / c),
|
|
13
|
+
unit: "second",
|
|
14
|
+
nextUpdateMs: c
|
|
15
|
+
} : t < u ? {
|
|
16
|
+
value: Math.round(e / l),
|
|
17
|
+
unit: "minute",
|
|
18
|
+
nextUpdateMs: l
|
|
19
|
+
} : t < d ? {
|
|
20
|
+
value: Math.round(e / u),
|
|
21
|
+
unit: "hour",
|
|
22
|
+
nextUpdateMs: u
|
|
23
|
+
} : t < f ? {
|
|
24
|
+
value: Math.round(e / d),
|
|
25
|
+
unit: "day",
|
|
26
|
+
nextUpdateMs: d
|
|
27
|
+
} : t < p ? {
|
|
28
|
+
value: Math.round(e / f),
|
|
29
|
+
unit: "week",
|
|
30
|
+
nextUpdateMs: d
|
|
31
|
+
} : t < m ? {
|
|
32
|
+
value: Math.round(e / p),
|
|
33
|
+
unit: "month",
|
|
34
|
+
nextUpdateMs: d
|
|
35
|
+
} : {
|
|
36
|
+
value: Math.round(e / m),
|
|
37
|
+
unit: "year",
|
|
38
|
+
nextUpdateMs: d
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
var g = (e) => e instanceof Date ? e.getTime() : typeof e == "number" ? e : Date.parse(e);
|
|
42
|
+
function _({ date: c, sync: l = !0, now: u, format: d, className: f, ...p }) {
|
|
43
|
+
i();
|
|
44
|
+
let m = g(c), _ = u !== void 0, v = n(u ?? Date.now());
|
|
45
|
+
_ && (v.value = u), r(() => {
|
|
46
|
+
if (!l || _ || typeof window > "u") return;
|
|
47
|
+
let { nextUpdateMs: e } = h(m - v.value), t = window.setInterval(() => {
|
|
48
|
+
v.value = Date.now();
|
|
49
|
+
}, e);
|
|
50
|
+
return () => window.clearInterval(t);
|
|
51
|
+
});
|
|
52
|
+
let { value: y, unit: b } = h(m - v.value), x = o(y, b, d);
|
|
53
|
+
return /* @__PURE__ */ s("time", {
|
|
54
|
+
dateTime: new Date(m).toISOString(),
|
|
55
|
+
title: a(m, {
|
|
56
|
+
dateStyle: "long",
|
|
57
|
+
timeStyle: "short"
|
|
58
|
+
}),
|
|
59
|
+
className: t(e.relativeTime, f),
|
|
60
|
+
...p,
|
|
61
|
+
children: x
|
|
62
|
+
});
|
|
63
|
+
}
|
|
64
|
+
//#endregion
|
|
65
|
+
export { _ as RelativeTime };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._resizable_1agxs_2{block-size:100%;inline-size:100%;display:flex;overflow:hidden}._resizable_1agxs_2[data-orientation=horizontal]{flex-direction:row}._resizable_1agxs_2[data-orientation=vertical]{flex-direction:column}._pane_1agxs_17{min-block-size:0;min-inline-size:0;overflow:auto}._pane_1agxs_17:first-child{flex:var(--cascivo-resizable-ratio,.5)}._pane_1agxs_17:last-child{flex:calc(1 - var(--cascivo-resizable-ratio,.5))}._handle_1agxs_31{background-color:var(--cascivo-color-border);touch-action:none;flex:none;justify-content:center;align-items:center;display:flex;position:relative}._handle_1agxs_31:hover{background-color:var(--cascivo-color-border-strong)}._handle_1agxs_31:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._grip_1agxs_50{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong)}._resizable_1agxs_2[data-orientation=horizontal] ._handle_1agxs_31{cursor:col-resize;inline-size:.5rem}._resizable_1agxs_2[data-orientation=horizontal] ._grip_1agxs_50{block-size:2rem;inline-size:.125rem}._resizable_1agxs_2[data-orientation=vertical] ._handle_1agxs_31{cursor:row-resize;block-size:.5rem}._resizable_1agxs_2[data-orientation=vertical] ._grip_1agxs_50{block-size:.125rem;inline-size:2rem}}@media (forced-colors:active){._handle_1agxs_31{border:1px solid buttontext}._handle_1agxs_31:focus-visible{outline-offset:2px;outline:2px solid highlight}}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./resizable.module.js";
|
|
4
|
+
import { cn as t, useControllableSignal as n, useSignal as r, useSignalEffect as i, useSignals as a } from "@cascivo/core";
|
|
5
|
+
import { builtin as o, t as s } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as c, jsxs as l } from "react/jsx-runtime";
|
|
7
|
+
import { Children as u, useRef as d } from "react";
|
|
8
|
+
//#region ../components/src/resizable/resizable.tsx
|
|
9
|
+
function f(e, t, n) {
|
|
10
|
+
return Math.min(n, Math.max(t, e));
|
|
11
|
+
}
|
|
12
|
+
function p({ children: p, orientation: m = "horizontal", defaultRatio: h = .5, ratio: g, minRatio: _ = .1, maxRatio: v = .9, onRatioChange: y, className: b, label: x }) {
|
|
13
|
+
a();
|
|
14
|
+
let [S, C] = u.toArray(p), [w, T] = n({
|
|
15
|
+
value: g,
|
|
16
|
+
defaultValue: h,
|
|
17
|
+
onChange: y
|
|
18
|
+
}), E = d(null), D = r(!1), O = (e) => {
|
|
19
|
+
T(f(e, _, v));
|
|
20
|
+
}, k = (e, t) => {
|
|
21
|
+
let n = E.current;
|
|
22
|
+
if (!n) return w.value;
|
|
23
|
+
let r = n.getBoundingClientRect();
|
|
24
|
+
return m === "horizontal" ? (e - r.left) / r.width : (t - r.top) / r.height;
|
|
25
|
+
};
|
|
26
|
+
i(() => {
|
|
27
|
+
if (!D.value) return;
|
|
28
|
+
let e = (e) => O(k(e.clientX, e.clientY)), t = () => {
|
|
29
|
+
D.value = !1;
|
|
30
|
+
};
|
|
31
|
+
return window.addEventListener("pointermove", e), window.addEventListener("pointerup", t), () => {
|
|
32
|
+
window.removeEventListener("pointermove", e), window.removeEventListener("pointerup", t);
|
|
33
|
+
};
|
|
34
|
+
});
|
|
35
|
+
let A = (e) => {
|
|
36
|
+
let t = e.shiftKey ? .1 : .02, n = m === "horizontal" ? "ArrowLeft" : "ArrowUp", r = m === "horizontal" ? "ArrowRight" : "ArrowDown";
|
|
37
|
+
if (e.key === n) O(w.value - t);
|
|
38
|
+
else if (e.key === r) O(w.value + t);
|
|
39
|
+
else if (e.key === "Home") O(_);
|
|
40
|
+
else if (e.key === "End") O(v);
|
|
41
|
+
else return;
|
|
42
|
+
e.preventDefault();
|
|
43
|
+
}, j = x ?? s(o.resizable.handle), M = Math.round(w.value * 100);
|
|
44
|
+
return /* @__PURE__ */ l("div", {
|
|
45
|
+
ref: E,
|
|
46
|
+
className: t(e.resizable, b),
|
|
47
|
+
"data-orientation": m,
|
|
48
|
+
style: { "--cascivo-resizable-ratio": w.value },
|
|
49
|
+
children: [
|
|
50
|
+
/* @__PURE__ */ c("div", {
|
|
51
|
+
className: e.pane,
|
|
52
|
+
children: S
|
|
53
|
+
}),
|
|
54
|
+
/* @__PURE__ */ c("div", {
|
|
55
|
+
className: e.handle,
|
|
56
|
+
role: "separator",
|
|
57
|
+
"aria-orientation": m,
|
|
58
|
+
"aria-label": j,
|
|
59
|
+
"aria-valuenow": M,
|
|
60
|
+
"aria-valuemin": Math.round(_ * 100),
|
|
61
|
+
"aria-valuemax": Math.round(v * 100),
|
|
62
|
+
tabIndex: 0,
|
|
63
|
+
onKeyDown: A,
|
|
64
|
+
onPointerDown: (e) => {
|
|
65
|
+
e.preventDefault(), D.value = !0;
|
|
66
|
+
},
|
|
67
|
+
children: /* @__PURE__ */ c("span", {
|
|
68
|
+
className: e.grip,
|
|
69
|
+
"aria-hidden": "true"
|
|
70
|
+
})
|
|
71
|
+
}),
|
|
72
|
+
/* @__PURE__ */ c("div", {
|
|
73
|
+
className: e.pane,
|
|
74
|
+
children: C
|
|
75
|
+
})
|
|
76
|
+
]
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
//#endregion
|
|
80
|
+
export { p as Resizable };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._root_v07bg_2{max-block-size:var(--cascivo-scroll-area-height,none);max-inline-size:var(--cascivo-scroll-area-width,none);scrollbar-width:thin;scrollbar-color:var(--cascivo-color-border) transparent}._root_v07bg_2[data-orientation=vertical]{overflow:hidden auto}._root_v07bg_2[data-orientation=horizontal]{overflow:auto hidden}._root_v07bg_2[data-orientation=both]{overflow:auto}._root_v07bg_2::-webkit-scrollbar{block-size:.5rem;inline-size:.5rem}._root_v07bg_2::-webkit-scrollbar-track{background:0 0}._root_v07bg_2::-webkit-scrollbar-thumb{background-color:var(--cascivo-color-border);border-radius:var(--cascivo-radius-control)}._root_v07bg_2::-webkit-scrollbar-thumb:hover{background-color:var(--cascivo-color-text-subtle)}._root_v07bg_2{background:linear-gradient(var(--cascivo-color-surface) 30%, transparent) center top / 100% 1.5rem no-repeat, linear-gradient(transparent, var(--cascivo-color-surface) 70%) center bottom / 100% 1.5rem no-repeat;background-attachment:local,local}._root_v07bg_2[data-scroll-top]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-scroll-top][data-scroll-bottom]:not([data-edges=none]){box-shadow:inset 0 .5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent), inset 0 -.5rem .4rem -.4rem color-mix(in srgb, var(--cascivo-color-text) 12%, transparent)}._root_v07bg_2[data-edges=mask][data-scroll-top]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem);mask-image:linear-gradient(#0000,#000 1.5rem)}._root_v07bg_2[data-edges=mask][data-scroll-bottom]{-webkit-mask-image:linear-gradient(0deg,#0000,#000 1.5rem);mask-image:linear-gradient(0deg,#0000,#000 1.5rem)}._root_v07bg_2[data-edges=mask][data-scroll-top][data-scroll-bottom]{-webkit-mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000);mask-image:linear-gradient(#0000,#000 1.5rem calc(100% - 1.5rem),#0000)}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./scroll-area.module.js";
|
|
4
|
+
import { cn as t, useSignalEffect as n, useSignals as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
6
|
+
import { useRef as a } from "react";
|
|
7
|
+
//#region ../components/src/scroll-area/scroll-area.tsx
|
|
8
|
+
function o({ height: o, width: s, orientation: c = "vertical", edges: l = "shadow", className: u, style: d, children: f, ...p }) {
|
|
9
|
+
r();
|
|
10
|
+
let m = a(null);
|
|
11
|
+
n(() => {
|
|
12
|
+
let e = m.current;
|
|
13
|
+
if (!e) return;
|
|
14
|
+
let t = () => {
|
|
15
|
+
let t = e.scrollTop <= 0, n = e.scrollTop + e.clientHeight >= e.scrollHeight - 1, r = e.scrollLeft <= 0, i = e.scrollLeft + e.clientWidth >= e.scrollWidth - 1;
|
|
16
|
+
e.toggleAttribute("data-scroll-top", !t), e.toggleAttribute("data-scroll-bottom", !n), e.toggleAttribute("data-scroll-start", !r), e.toggleAttribute("data-scroll-end", !i);
|
|
17
|
+
};
|
|
18
|
+
return t(), e.addEventListener("scroll", t, { passive: !0 }), () => {
|
|
19
|
+
e.removeEventListener("scroll", t);
|
|
20
|
+
};
|
|
21
|
+
});
|
|
22
|
+
let h = {
|
|
23
|
+
...o === void 0 ? {} : { "--cascivo-scroll-area-height": o },
|
|
24
|
+
...s === void 0 ? {} : { "--cascivo-scroll-area-width": s },
|
|
25
|
+
...d
|
|
26
|
+
};
|
|
27
|
+
return /* @__PURE__ */ i("div", {
|
|
28
|
+
ref: m,
|
|
29
|
+
"data-orientation": c,
|
|
30
|
+
"data-edges": l,
|
|
31
|
+
className: t(e.root, u),
|
|
32
|
+
style: h,
|
|
33
|
+
...p,
|
|
34
|
+
children: f
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { o as ScrollArea };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._root_22xq7_2{align-items:center;inline-size:100%;display:inline-flex;position:relative}._root_22xq7_2[data-size=sm]{--_search-height:2rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-3)}._root_22xq7_2[data-size=md]{--_search-height:2.5rem;--_search-font:var(--cascivo-text-sm);--_search-px:var(--cascivo-space-4)}._root_22xq7_2[data-size=lg]{--_search-height:3rem;--_search-font:var(--cascivo-text-base);--_search-px:var(--cascivo-space-4)}._label_22xq7_28{clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0;block-size:1px;inline-size:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}._icon_22xq7_41{color:var(--cascivo-color-text-muted);pointer-events:none;align-items:center;display:inline-flex;position:absolute;inset-inline-start:var(--_search-px,var(--cascivo-space-4))}._input_22xq7_50{inline-size:100%;block-size:var(--_search-height,2.5rem);font-family:var(--cascivo-font-sans);font-size:var(--_search-font,var(--cascivo-text-sm));color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);transition:border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);outline:none;padding-inline-start:calc(var(--_search-px,var(--cascivo-space-4)) + 1rem + var(--cascivo-space-2));padding-inline-end:calc(var(--_search-px,var(--cascivo-space-4)) + 1.5rem)}._input_22xq7_50::-webkit-search-cancel-button{appearance:none;display:none}._input_22xq7_50::-webkit-search-decoration{appearance:none;display:none}._input_22xq7_50::placeholder{color:var(--cascivo-color-text-muted)}._input_22xq7_50:hover:not(:disabled):not(:focus){border-color:var(--cascivo-color-border-strong)}._input_22xq7_50:focus{border-color:var(--cascivo-color-accent);box-shadow:var(--cascivo-focus-ring)}._input_22xq7_50:disabled{opacity:.5;cursor:not-allowed;background-color:var(--cascivo-color-bg-subtle)}._clear_22xq7_96{block-size:1.5rem;inline-size:1.5rem;font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-none);color:var(--cascivo-color-text-muted);border-radius:var(--cascivo-radius-control);cursor:pointer;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out);background-color:#0000;border:none;justify-content:center;align-items:center;padding:0;display:inline-flex;position:absolute;inset-inline-end:var(--cascivo-space-2)}._clear_22xq7_96:hover:not(:disabled){color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle)}._clear_22xq7_96:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._clear_22xq7_96:disabled{cursor:not-allowed}}
|