@cascivo/react 0.3.4 → 0.3.8
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 +23 -10
- 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/index.d.ts +59 -1
- 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/log-viewer/log-viewer.css +1 -0
- package/dist/log-viewer/log-viewer.js +184 -0
- package/dist/log-viewer/log-viewer.module.js +19 -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 +131 -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 +250 -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 +23 -10
- package/dist/cascivo.css +0 -2
- package/dist/index.js +0 -9174
|
@@ -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 };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._carousel_1dvrl_2{gap:var(--cascivo-space-3);flex-direction:column;inline-size:100%;display:flex}._viewport_1dvrl_9{align-items:center;display:flex;position:relative}._track_1dvrl_15{scroll-snap-type:x mandatory;scrollbar-width:none;border-radius:var(--cascivo-radius-md);inline-size:100%;display:flex;overflow-x:auto}._track_1dvrl_15::-webkit-scrollbar{display:none}._slide_1dvrl_28{scroll-snap-align:center;scroll-snap-stop:always;flex:0 0 100%;inline-size:100%}._nav_1dvrl_35{z-index:1;block-size:2.25rem;inline-size:2.25rem;color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-full);box-shadow:var(--cascivo-shadow-sm);cursor:pointer;justify-content:center;align-items:center;display:inline-flex;position:absolute}._nav_1dvrl_35:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._nav_1dvrl_35:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._nav_1dvrl_35:disabled{opacity:.4;cursor:not-allowed}._prev_1dvrl_65{inset-inline-start:var(--cascivo-space-2)}._next_1dvrl_69{inset-inline-end:var(--cascivo-space-2)}._dots_1dvrl_73{justify-content:center;align-items:center;gap:var(--cascivo-space-2);display:flex}._dot_1dvrl_73{border-radius:var(--cascivo-radius-full);background-color:var(--cascivo-color-border-strong);cursor:pointer;block-size:.625rem;inline-size:.625rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out);border:none;padding:0}._dot_1dvrl_73[data-active]{background-color:var(--cascivo-color-accent)}._dot_1dvrl_73:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}}@media (prefers-reduced-motion:reduce){._track_1dvrl_15{scroll-behavior:auto}}@media (forced-colors:active){._nav_1dvrl_35:focus-visible,._dot_1dvrl_73:focus-visible{outline-offset:2px;outline:2px solid highlight}._dot_1dvrl_73[data-active]{background-color:highlight}}
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./carousel.module.js";
|
|
4
|
+
import { cn as t, useControllableSignal as n, useRovingFocus 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 { useId as u, useRef as d } from "react";
|
|
8
|
+
//#region ../components/src/carousel/carousel.tsx
|
|
9
|
+
function f(e, t) {
|
|
10
|
+
return t || (e == null ? [] : Array.isArray(e) ? e : [e]);
|
|
11
|
+
}
|
|
12
|
+
function p({ children: p, slides: m, index: h, defaultIndex: g, onIndexChange: _, loop: v = !1, className: y, labels: b }) {
|
|
13
|
+
a();
|
|
14
|
+
let x = u(), S = f(p, m), C = S.length, [w, T] = n({
|
|
15
|
+
value: h,
|
|
16
|
+
defaultValue: g ?? 0,
|
|
17
|
+
onChange: _
|
|
18
|
+
}), E = d(null), D = d([]), O = d(!1), { getItemProps: k, setActiveIndex: A } = r({
|
|
19
|
+
orientation: "horizontal",
|
|
20
|
+
loop: v
|
|
21
|
+
});
|
|
22
|
+
i(() => {
|
|
23
|
+
let e = E.current;
|
|
24
|
+
if (!e) return;
|
|
25
|
+
let t = () => {
|
|
26
|
+
if (O.current) return;
|
|
27
|
+
let t = Math.round(e.scrollLeft / e.clientWidth);
|
|
28
|
+
t !== w.value && T(t);
|
|
29
|
+
};
|
|
30
|
+
return e.addEventListener("scroll", t, { passive: !0 }), () => e.removeEventListener("scroll", t);
|
|
31
|
+
});
|
|
32
|
+
let j = (e) => {
|
|
33
|
+
if (C === 0) return;
|
|
34
|
+
let t = e;
|
|
35
|
+
t < 0 && (t = v ? C - 1 : 0), t >= C && (t = v ? 0 : C - 1);
|
|
36
|
+
let n = E.current;
|
|
37
|
+
n && typeof n.scrollTo == "function" && (O.current = !0, n.scrollTo({
|
|
38
|
+
left: t * n.clientWidth,
|
|
39
|
+
behavior: "smooth"
|
|
40
|
+
}), window.setTimeout(() => {
|
|
41
|
+
O.current = !1;
|
|
42
|
+
}, 400)), T(t), A(t);
|
|
43
|
+
}, M = b?.region ?? s(o.carousel.region), N = b?.previous ?? s(o.carousel.previous), P = b?.next ?? s(o.carousel.next);
|
|
44
|
+
return /* @__PURE__ */ l("section", {
|
|
45
|
+
className: t(e.carousel, y),
|
|
46
|
+
"aria-roledescription": "carousel",
|
|
47
|
+
"aria-label": M,
|
|
48
|
+
children: [/* @__PURE__ */ l("div", {
|
|
49
|
+
className: e.viewport,
|
|
50
|
+
children: [
|
|
51
|
+
/* @__PURE__ */ c("button", {
|
|
52
|
+
type: "button",
|
|
53
|
+
className: t(e.nav, e.prev),
|
|
54
|
+
"aria-label": N,
|
|
55
|
+
"aria-controls": `${x}-track`,
|
|
56
|
+
disabled: !v && w.value <= 0,
|
|
57
|
+
onClick: () => j(w.value - 1),
|
|
58
|
+
children: /* @__PURE__ */ c("svg", {
|
|
59
|
+
width: "20",
|
|
60
|
+
height: "20",
|
|
61
|
+
viewBox: "0 0 24 24",
|
|
62
|
+
fill: "none",
|
|
63
|
+
"aria-hidden": "true",
|
|
64
|
+
children: /* @__PURE__ */ c("path", {
|
|
65
|
+
d: "m15 18-6-6 6-6",
|
|
66
|
+
stroke: "currentColor",
|
|
67
|
+
strokeWidth: "2",
|
|
68
|
+
strokeLinecap: "round",
|
|
69
|
+
strokeLinejoin: "round"
|
|
70
|
+
})
|
|
71
|
+
})
|
|
72
|
+
}),
|
|
73
|
+
/* @__PURE__ */ c("div", {
|
|
74
|
+
ref: E,
|
|
75
|
+
id: `${x}-track`,
|
|
76
|
+
className: e.track,
|
|
77
|
+
children: S.map((t, n) => /* @__PURE__ */ c("div", {
|
|
78
|
+
ref: (e) => {
|
|
79
|
+
D.current[n] = e;
|
|
80
|
+
},
|
|
81
|
+
className: e.slide,
|
|
82
|
+
role: "group",
|
|
83
|
+
"aria-roledescription": "slide",
|
|
84
|
+
"aria-label": s(o.carousel.slide, {
|
|
85
|
+
n: n + 1,
|
|
86
|
+
total: C
|
|
87
|
+
}),
|
|
88
|
+
"aria-hidden": n !== w.value || void 0,
|
|
89
|
+
children: t
|
|
90
|
+
}, n))
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ c("button", {
|
|
93
|
+
type: "button",
|
|
94
|
+
className: t(e.nav, e.next),
|
|
95
|
+
"aria-label": P,
|
|
96
|
+
"aria-controls": `${x}-track`,
|
|
97
|
+
disabled: !v && w.value >= C - 1,
|
|
98
|
+
onClick: () => j(w.value + 1),
|
|
99
|
+
children: /* @__PURE__ */ c("svg", {
|
|
100
|
+
width: "20",
|
|
101
|
+
height: "20",
|
|
102
|
+
viewBox: "0 0 24 24",
|
|
103
|
+
fill: "none",
|
|
104
|
+
"aria-hidden": "true",
|
|
105
|
+
children: /* @__PURE__ */ c("path", {
|
|
106
|
+
d: "m9 18 6-6-6-6",
|
|
107
|
+
stroke: "currentColor",
|
|
108
|
+
strokeWidth: "2",
|
|
109
|
+
strokeLinecap: "round",
|
|
110
|
+
strokeLinejoin: "round"
|
|
111
|
+
})
|
|
112
|
+
})
|
|
113
|
+
})
|
|
114
|
+
]
|
|
115
|
+
}), /* @__PURE__ */ c("div", {
|
|
116
|
+
className: e.dots,
|
|
117
|
+
role: "group",
|
|
118
|
+
"aria-label": M,
|
|
119
|
+
children: S.map((t, n) => {
|
|
120
|
+
let r = k(n);
|
|
121
|
+
return /* @__PURE__ */ c("button", {
|
|
122
|
+
ref: r.ref,
|
|
123
|
+
type: "button",
|
|
124
|
+
className: e.dot,
|
|
125
|
+
"aria-label": s(o.carousel.goTo, { n: n + 1 }),
|
|
126
|
+
"aria-current": n === w.value || void 0,
|
|
127
|
+
"data-active": n === w.value || void 0,
|
|
128
|
+
tabIndex: r.tabIndex,
|
|
129
|
+
onKeyDown: r.onKeyDown,
|
|
130
|
+
onFocus: r.onFocus,
|
|
131
|
+
onClick: () => j(n)
|
|
132
|
+
}, n);
|
|
133
|
+
})
|
|
134
|
+
})]
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
//#endregion
|
|
138
|
+
export { p as Carousel };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './carousel.css';
|
|
4
|
+
var e = {
|
|
5
|
+
carousel: "_carousel_1dvrl_2",
|
|
6
|
+
viewport: "_viewport_1dvrl_9",
|
|
7
|
+
track: "_track_1dvrl_15",
|
|
8
|
+
slide: "_slide_1dvrl_28",
|
|
9
|
+
nav: "_nav_1dvrl_35",
|
|
10
|
+
prev: "_prev_1dvrl_65",
|
|
11
|
+
next: "_next_1dvrl_69",
|
|
12
|
+
dots: "_dots_1dvrl_73",
|
|
13
|
+
dot: "_dot_1dvrl_73"
|
|
14
|
+
};
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._bubble_ykkyv_2{align-items:flex-end;gap:.5rem;max-inline-size:75%;display:flex}._bubble_ykkyv_2[data-side=start]{flex-direction:row;align-self:flex-start}._bubble_ykkyv_2[data-side=end]{flex-direction:row-reverse;align-self:flex-end}._avatar_ykkyv_18{flex-shrink:0;align-self:flex-end}._content_ykkyv_23{flex-direction:column;gap:.25rem;display:flex}._bubble_ykkyv_2[data-side=end] ._content_ykkyv_23{align-items:flex-end}._meta_ykkyv_32{color:var(--cascivo-color-text-muted);align-items:baseline;gap:.5rem;font-size:.75rem;display:flex}._name_ykkyv_40{color:var(--cascivo-color-text-subtle);font-weight:600}._time_ykkyv_44{color:var(--cascivo-color-text-muted)}._body_ykkyv_48{border-radius:var(--cascivo-radius-overlay);padding-block:.5rem;padding-inline:.875rem;font-size:.9375rem;line-height:1.5}._bubble_ykkyv_2[data-side=start] ._body_ykkyv_48{background-color:var(--cascivo-color-surface);color:var(--cascivo-color-text);border-end-start-radius:var(--cascivo-radius-indicator)}._bubble_ykkyv_2[data-side=end] ._body_ykkyv_48{background-color:var(--cascivo-color-accent);color:var(--cascivo-color-accent-content);border-end-end-radius:var(--cascivo-radius-indicator)}}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./chat-bubble.module.js";
|
|
4
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
|
+
//#region ../components/src/chat-bubble/chat-bubble.tsx
|
|
6
|
+
function r({ children: r, side: i = "start", avatar: a, name: o, time: s, className: c }) {
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
8
|
+
className: [e.bubble, c].filter(Boolean).join(" "),
|
|
9
|
+
"data-side": i,
|
|
10
|
+
children: [a && /* @__PURE__ */ t("div", {
|
|
11
|
+
className: e.avatar,
|
|
12
|
+
"aria-hidden": "true",
|
|
13
|
+
children: a
|
|
14
|
+
}), /* @__PURE__ */ n("div", {
|
|
15
|
+
className: e.content,
|
|
16
|
+
children: [(o || s) && /* @__PURE__ */ n("div", {
|
|
17
|
+
className: e.meta,
|
|
18
|
+
children: [o && /* @__PURE__ */ t("span", {
|
|
19
|
+
className: e.name,
|
|
20
|
+
children: o
|
|
21
|
+
}), s && /* @__PURE__ */ t("time", {
|
|
22
|
+
className: e.time,
|
|
23
|
+
children: s
|
|
24
|
+
})]
|
|
25
|
+
}), /* @__PURE__ */ t("div", {
|
|
26
|
+
className: e.body,
|
|
27
|
+
children: r
|
|
28
|
+
})]
|
|
29
|
+
})]
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { r as ChatBubble };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './chat-bubble.css';
|
|
4
|
+
var e = {
|
|
5
|
+
bubble: "_bubble_ykkyv_2",
|
|
6
|
+
avatar: "_avatar_ykkyv_18",
|
|
7
|
+
content: "_content_ykkyv_23",
|
|
8
|
+
meta: "_meta_ykkyv_32",
|
|
9
|
+
name: "_name_ykkyv_40",
|
|
10
|
+
time: "_time_ykkyv_44",
|
|
11
|
+
body: "_body_ykkyv_48"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._wrapper_tw120_2{align-items:center;gap:var(--cascivo-space-2);font-family:var(--cascivo-font-sans);cursor:pointer;display:inline-flex}._wrapper_tw120_2[data-disabled]{opacity:.5;cursor:not-allowed}._input_tw120_15{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_tw120_28{--_check-color:transparent;background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-indicator);block-size:1.125rem;inline-size:1.125rem;transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), border-color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);flex-shrink:0;display:inline-flex}._control_tw120_28:after{content:"";background-color:var(--_check-color);block-size:100%;inline-size:100%;-webkit-mask:var(--_check-icon,none) no-repeat center / .75rem;mask:var(--_check-icon,none) no-repeat center / .75rem}._input_tw120_15:checked+._control_tw120_28,._input_tw120_15:indeterminate+._control_tw120_28{--_check-color:var(--cascivo-color-text-on-accent);background-color:var(--cascivo-color-accent);border-color:var(--cascivo-color-accent)}._input_tw120_15:checked+._control_tw120_28{--_check-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.5l3 3 6-6'/%3E%3C/svg%3E")}._input_tw120_15:indeterminate+._control_tw120_28{--_check-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='black' stroke-width='2' stroke-linecap='round' d='M4 8h8'/%3E%3C/svg%3E")}._input_tw120_15:focus-visible+._control_tw120_28{box-shadow:var(--cascivo-focus-ring);outline:none}._label_tw120_72{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}}@media (forced-colors:active){._control_tw120_28{background-color:field;border:1px solid buttontext}._input_tw120_15:checked+._control_tw120_28,._input_tw120_15:indeterminate+._control_tw120_28{background-color:highlight;border-color:highlight}._input_tw120_15:focus-visible+._control_tw120_28{outline-offset:2px;outline:2px solid highlight}}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./checkbox.module.js";
|
|
4
|
+
import { cn as t, useSignal as n, useSignalEffect as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
import { useRef as o } from "react";
|
|
7
|
+
//#region ../components/src/checkbox/checkbox.tsx
|
|
8
|
+
function s({ label: s, indeterminate: c = !1, className: l, id: u, disabled: d, ...f }) {
|
|
9
|
+
let p = o(null), m = n(c);
|
|
10
|
+
m.value = c, r(() => {
|
|
11
|
+
p.current && (p.current.indeterminate = m.value);
|
|
12
|
+
});
|
|
13
|
+
let h = u ?? (s ? `cascade-checkbox-${s.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
14
|
+
return /* @__PURE__ */ a("label", {
|
|
15
|
+
className: t(e.wrapper, l),
|
|
16
|
+
"data-disabled": d || void 0,
|
|
17
|
+
children: [
|
|
18
|
+
/* @__PURE__ */ i("input", {
|
|
19
|
+
ref: p,
|
|
20
|
+
id: h,
|
|
21
|
+
type: "checkbox",
|
|
22
|
+
className: e.input,
|
|
23
|
+
disabled: d,
|
|
24
|
+
...f
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ i("span", {
|
|
27
|
+
className: e.control,
|
|
28
|
+
"aria-hidden": "true"
|
|
29
|
+
}),
|
|
30
|
+
s && /* @__PURE__ */ i("span", {
|
|
31
|
+
className: e.label,
|
|
32
|
+
children: s
|
|
33
|
+
})
|
|
34
|
+
]
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
//#endregion
|
|
38
|
+
export { s as Checkbox };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._card_102u6_2{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_102u6_2:hover:not([data-disabled]){border-color:var(--cascivo-color-border-strong)}._card_102u6_2:has(input:checked){border-color:var(--cascivo-color-accent);background:color-mix(in oklch, var(--cascivo-color-accent) 4%, var(--cascivo-color-bg))}._card_102u6_2:has(input:focus-visible){box-shadow:var(--cascivo-focus-ring)}._card_102u6_2[data-disabled]{opacity:.5;cursor:not-allowed}._input_102u6_34{clip-path:inset(50%);white-space:nowrap;block-size:1px;inline-size:1px;position:absolute;overflow:hidden}._glyph_102u6_43{border:1px solid var(--cascivo-color-border-strong);border-radius:var(--cascivo-radius-indicator);color:#0000;flex:none;place-items:center;block-size:1rem;inline-size:1rem;margin-block-start:2px;transition:all .12s;display:grid}._card_102u6_2:has(input:checked) ._glyph_102u6_43{border-color:var(--cascivo-color-accent);background:var(--cascivo-color-accent);color:var(--cascivo-color-accent-foreground,oklch(100% 0 0))}._check_102u6_62{block-size:.75rem;inline-size:.75rem}._body_102u6_67{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._title_102u6_73{font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text)}._description_102u6_79{font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle)}}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./checkbox-card.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/checkbox-card/checkbox-card.tsx
|
|
7
|
+
function i({ title: i, description: a, checked: o, defaultChecked: s, disabled: c, onCheckedChange: l, className: u, ...d }) {
|
|
8
|
+
return /* @__PURE__ */ r("label", {
|
|
9
|
+
className: t(e.card, u),
|
|
10
|
+
"data-disabled": c || void 0,
|
|
11
|
+
children: [
|
|
12
|
+
/* @__PURE__ */ n("input", {
|
|
13
|
+
type: "checkbox",
|
|
14
|
+
className: e.input,
|
|
15
|
+
disabled: c,
|
|
16
|
+
...o === void 0 ? { defaultChecked: s } : { checked: o },
|
|
17
|
+
onChange: (e) => l?.(e.currentTarget.checked),
|
|
18
|
+
...d
|
|
19
|
+
}),
|
|
20
|
+
/* @__PURE__ */ n("span", {
|
|
21
|
+
className: e.glyph,
|
|
22
|
+
"aria-hidden": "true",
|
|
23
|
+
children: /* @__PURE__ */ n("svg", {
|
|
24
|
+
viewBox: "0 0 12 12",
|
|
25
|
+
className: e.check,
|
|
26
|
+
children: /* @__PURE__ */ n("path", {
|
|
27
|
+
d: "M2.5 6.5 5 9l4.5-5.5",
|
|
28
|
+
fill: "none",
|
|
29
|
+
stroke: "currentColor",
|
|
30
|
+
strokeWidth: "1.5"
|
|
31
|
+
})
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
/* @__PURE__ */ r("span", {
|
|
35
|
+
className: e.body,
|
|
36
|
+
children: [/* @__PURE__ */ n("span", {
|
|
37
|
+
className: e.title,
|
|
38
|
+
children: i
|
|
39
|
+
}), a && /* @__PURE__ */ n("span", {
|
|
40
|
+
className: e.description,
|
|
41
|
+
children: a
|
|
42
|
+
})]
|
|
43
|
+
})
|
|
44
|
+
]
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
//#endregion
|
|
48
|
+
export { i as CheckboxCard };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './checkbox-card.css';
|
|
4
|
+
var e = {
|
|
5
|
+
card: "_card_102u6_2",
|
|
6
|
+
input: "_input_102u6_34",
|
|
7
|
+
glyph: "_glyph_102u6_43",
|
|
8
|
+
check: "_check_102u6_62",
|
|
9
|
+
body: "_body_102u6_67",
|
|
10
|
+
title: "_title_102u6_73",
|
|
11
|
+
description: "_description_102u6_79"
|
|
12
|
+
};
|
|
13
|
+
//#endregion
|
|
14
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._code_hxmy6_2{font-family:var(--cascivo-font-mono);color:var(--cascivo-color-text);background-color:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-indicator);padding-block:.0625rem;padding-inline:var(--cascivo-space-1);white-space:nowrap}._code_hxmy6_2[data-size=sm]{font-size:var(--cascivo-text-xs)}._code_hxmy6_2[data-size=md]{font-size:var(--cascivo-text-sm)}}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./code.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/code/code.tsx
|
|
7
|
+
function r({ size: r = "md", className: i, children: a, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ n("code", {
|
|
9
|
+
"data-size": r,
|
|
10
|
+
className: t(e.code, i),
|
|
11
|
+
...o,
|
|
12
|
+
children: a
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as Code };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._root_4lyzf_2{position:relative}._root_4lyzf_2[data-variant=inline]{align-items:center;gap:var(--cascivo-space-1);display:inline-flex}._inlineCode_4lyzf_12{font-family:var(--cascivo-font-mono);color:var(--cascivo-color-text);background:var(--cascivo-color-bg-subtle);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-control);padding-inline:var(--cascivo-space-1);padding-block:.125em;font-size:.875em}._pre_4lyzf_23{padding:var(--cascivo-space-4);font-family:var(--cascivo-font-mono);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-relaxed);color:var(--cascivo-color-text);background:var(--cascivo-color-bg-subtle);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);margin:0;padding-inline-end:var(--cascivo-space-10);overflow-x:auto}._root_4lyzf_2[data-variant=single] ._pre_4lyzf_23,._root_4lyzf_2[data-variant=multi] ._pre_4lyzf_23{white-space:pre}._code_4lyzf_44{font:inherit;color:inherit}._line_4lyzf_49{gap:var(--cascivo-space-4);display:flex}._lineNumber_4lyzf_54{text-align:end;inline-size:2ch;color:var(--cascivo-color-text-subtle);-webkit-user-select:none;user-select:none;flex:none}._lineText_4lyzf_62{white-space:pre}._copy_4lyzf_66{block-size:1.75rem;inline-size:1.75rem;color:var(--cascivo-color-text-muted);background:var(--cascivo-color-surface);border:1px solid var(--cascivo-color-border);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);justify-content:center;align-items:center;padding:0;display:flex;position:absolute;inset-block-start:var(--cascivo-space-2);inset-inline-end:var(--cascivo-space-2)}._copy_4lyzf_66:hover{color:var(--cascivo-color-text);background-color:var(--cascivo-color-bg-subtle)}._copy_4lyzf_66:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._copy_4lyzf_66[data-state=copied]{color:var(--cascivo-color-success,var(--cascivo-color-accent))}._root_4lyzf_2[data-variant=inline] ._copy_4lyzf_66{block-size:1.25rem;inline-size:1.25rem;position:static}._icon_4lyzf_106{block-size:1rem;inline-size:1rem}._code_4lyzf_44 [data-tok=comment]{color:var(--cs-comment,var(--cascivo-color-text-muted));font-style:italic}._code_4lyzf_44 [data-tok=string]{color:var(--cs-string,var(--cascivo-color-success))}._code_4lyzf_44 [data-tok=keyword]{color:var(--cs-keyword,var(--cascivo-color-accent))}._code_4lyzf_44 [data-tok=fn]{color:var(--cs-fn,var(--cascivo-color-info))}._code_4lyzf_44 [data-tok=number]{color:var(--cs-number,var(--cascivo-color-warning))}._code_4lyzf_44 [data-tok=variable]{color:var(--cs-variable,var(--cascivo-color-accent-hover))}._code_4lyzf_44 [data-tok=punct]{color:var(--cs-punct,var(--cascivo-color-text-subtle))}._code_4lyzf_44 [data-tok=prompt]{color:var(--cs-prompt,var(--cascivo-color-text-subtle));-webkit-user-select:none;user-select:none}._root_4lyzf_2[data-terminal]{border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-surface);overflow:hidden}._bar_4lyzf_153{align-items:center;gap:var(--cascivo-space-3);padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);background:var(--cascivo-color-surface);border-block-end:1px solid var(--cascivo-color-border);display:flex}._dots_4lyzf_163{gap:.375rem;display:inline-flex}._dot_4lyzf_163{border-radius:var(--cascivo-radius-full);background:var(--cascivo-color-border);block-size:.7rem;inline-size:.7rem}._dot_4lyzf_163:first-child{background:#ff5f57}._dot_4lyzf_163:nth-child(2){background:#febc2e}._dot_4lyzf_163:nth-child(3){background:#28c840}._title_4lyzf_187{font-family:var(--cascivo-font-mono);font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-muted)}._root_4lyzf_2[data-terminal] ._pre_4lyzf_23{border:none;border-radius:0}._root_4lyzf_2[data-terminal] ._copy_4lyzf_66{background:0 0;border-color:#0000;inset-block-start:.4rem}}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { tokenize as e } from "./highlight.js";
|
|
4
|
+
import t from "./code-snippet.module.js";
|
|
5
|
+
import { cn as n, useClipboard as r, useSignals as i } from "@cascivo/core";
|
|
6
|
+
import { builtin as a, t as o } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as s, jsxs as c } from "react/jsx-runtime";
|
|
8
|
+
//#region ../components/src/code-snippet/code-snippet.tsx
|
|
9
|
+
function l({ code: n, language: r }) {
|
|
10
|
+
return /* @__PURE__ */ s("code", {
|
|
11
|
+
className: t.code,
|
|
12
|
+
children: e(n, r).map((e, t) => e.type === "text" ? /* @__PURE__ */ s("span", { children: e.value }, t) : /* @__PURE__ */ s("span", {
|
|
13
|
+
"data-tok": e.type,
|
|
14
|
+
children: e.value
|
|
15
|
+
}, t))
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
function u({ code: e, variant: u = "single", language: d, terminal: f = !1, title: p, showLineNumbers: m, showCopyButton: h, labels: g, className: _ }) {
|
|
19
|
+
i();
|
|
20
|
+
let { copied: v, copy: y } = r(), b = g?.copy ?? o(a.codeSnippet.copy), x = g?.copied ?? o(a.codeSnippet.copied), S = h ?? u !== "inline" ? /* @__PURE__ */ s("button", {
|
|
21
|
+
type: "button",
|
|
22
|
+
"aria-label": v.value ? x : b,
|
|
23
|
+
"data-state": v.value ? "copied" : "idle",
|
|
24
|
+
className: t.copy,
|
|
25
|
+
onClick: () => void y(e),
|
|
26
|
+
children: v.value ? /* @__PURE__ */ s("svg", {
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
viewBox: "0 0 16 16",
|
|
29
|
+
className: t.icon,
|
|
30
|
+
children: /* @__PURE__ */ s("path", {
|
|
31
|
+
d: "M13.5 4.5 6 12 2.5 8.5",
|
|
32
|
+
fill: "none",
|
|
33
|
+
stroke: "currentColor",
|
|
34
|
+
strokeWidth: "1.5",
|
|
35
|
+
strokeLinecap: "round",
|
|
36
|
+
strokeLinejoin: "round"
|
|
37
|
+
})
|
|
38
|
+
}) : /* @__PURE__ */ c("svg", {
|
|
39
|
+
"aria-hidden": "true",
|
|
40
|
+
viewBox: "0 0 16 16",
|
|
41
|
+
className: t.icon,
|
|
42
|
+
children: [/* @__PURE__ */ s("rect", {
|
|
43
|
+
x: "5.5",
|
|
44
|
+
y: "5.5",
|
|
45
|
+
width: "8",
|
|
46
|
+
height: "8",
|
|
47
|
+
rx: "1.5",
|
|
48
|
+
fill: "none",
|
|
49
|
+
stroke: "currentColor",
|
|
50
|
+
strokeWidth: "1.5"
|
|
51
|
+
}), /* @__PURE__ */ s("path", {
|
|
52
|
+
d: "M3.5 10.5h-1a1 1 0 0 1-1-1v-7a1 1 0 0 1 1-1h7a1 1 0 0 1 1 1v1",
|
|
53
|
+
fill: "none",
|
|
54
|
+
stroke: "currentColor",
|
|
55
|
+
strokeWidth: "1.5"
|
|
56
|
+
})]
|
|
57
|
+
})
|
|
58
|
+
}) : null;
|
|
59
|
+
if (u === "inline") return /* @__PURE__ */ c("span", {
|
|
60
|
+
className: n(t.root, _),
|
|
61
|
+
"data-variant": "inline",
|
|
62
|
+
children: [/* @__PURE__ */ s("code", {
|
|
63
|
+
className: t.inlineCode,
|
|
64
|
+
children: e
|
|
65
|
+
}), S]
|
|
66
|
+
});
|
|
67
|
+
let C = e.split("\n"), w = u === "multi" && m && !d;
|
|
68
|
+
return /* @__PURE__ */ c("div", {
|
|
69
|
+
className: n(t.root, _),
|
|
70
|
+
"data-variant": u,
|
|
71
|
+
"data-terminal": f ? "" : void 0,
|
|
72
|
+
children: [
|
|
73
|
+
f && /* @__PURE__ */ c("div", {
|
|
74
|
+
className: t.bar,
|
|
75
|
+
"aria-hidden": "true",
|
|
76
|
+
children: [/* @__PURE__ */ c("span", {
|
|
77
|
+
className: t.dots,
|
|
78
|
+
children: [
|
|
79
|
+
/* @__PURE__ */ s("span", { className: t.dot }),
|
|
80
|
+
/* @__PURE__ */ s("span", { className: t.dot }),
|
|
81
|
+
/* @__PURE__ */ s("span", { className: t.dot })
|
|
82
|
+
]
|
|
83
|
+
}), p && /* @__PURE__ */ s("span", {
|
|
84
|
+
className: t.title,
|
|
85
|
+
children: p
|
|
86
|
+
})]
|
|
87
|
+
}),
|
|
88
|
+
/* @__PURE__ */ s("pre", {
|
|
89
|
+
className: t.pre,
|
|
90
|
+
children: w ? /* @__PURE__ */ s("code", {
|
|
91
|
+
className: t.code,
|
|
92
|
+
children: C.map((e, n) => /* @__PURE__ */ c("span", {
|
|
93
|
+
className: t.line,
|
|
94
|
+
children: [/* @__PURE__ */ s("span", {
|
|
95
|
+
"aria-hidden": "true",
|
|
96
|
+
className: t.lineNumber,
|
|
97
|
+
children: n + 1
|
|
98
|
+
}), /* @__PURE__ */ s("span", {
|
|
99
|
+
className: t.lineText,
|
|
100
|
+
children: e
|
|
101
|
+
})]
|
|
102
|
+
}, n))
|
|
103
|
+
}) : d ? /* @__PURE__ */ s(l, {
|
|
104
|
+
code: e,
|
|
105
|
+
language: d
|
|
106
|
+
}) : /* @__PURE__ */ s("code", {
|
|
107
|
+
className: t.code,
|
|
108
|
+
children: e
|
|
109
|
+
})
|
|
110
|
+
}),
|
|
111
|
+
S
|
|
112
|
+
]
|
|
113
|
+
});
|
|
114
|
+
}
|
|
115
|
+
//#endregion
|
|
116
|
+
export { u as CodeSnippet };
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './code-snippet.css';
|
|
4
|
+
var e = {
|
|
5
|
+
root: "_root_4lyzf_2",
|
|
6
|
+
inlineCode: "_inlineCode_4lyzf_12",
|
|
7
|
+
pre: "_pre_4lyzf_23",
|
|
8
|
+
code: "_code_4lyzf_44",
|
|
9
|
+
line: "_line_4lyzf_49",
|
|
10
|
+
lineNumber: "_lineNumber_4lyzf_54",
|
|
11
|
+
lineText: "_lineText_4lyzf_62",
|
|
12
|
+
copy: "_copy_4lyzf_66",
|
|
13
|
+
icon: "_icon_4lyzf_106",
|
|
14
|
+
bar: "_bar_4lyzf_153",
|
|
15
|
+
dots: "_dots_4lyzf_163",
|
|
16
|
+
dot: "_dot_4lyzf_163",
|
|
17
|
+
title: "_title_4lyzf_187"
|
|
18
|
+
};
|
|
19
|
+
//#endregion
|
|
20
|
+
export { e as default };
|