@cascivo/react 0.3.3 → 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,84 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { usePopover as e } from "../popover/use-popover.js";
|
|
4
|
+
import t from "./hover-card.module.js";
|
|
5
|
+
import { useSignalEffect as n, useSignals as r } from "@cascivo/core";
|
|
6
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
7
|
+
import { createContext as a, useRef as o } from "react";
|
|
8
|
+
//#region ../components/src/hover-card/hover-card.tsx
|
|
9
|
+
var s = a(null);
|
|
10
|
+
function c({ children: t, openDelay: r = 300, closeDelay: a = 100 }) {
|
|
11
|
+
let c = e(), l = o(void 0), u = o(void 0), d = o(r);
|
|
12
|
+
d.current = r;
|
|
13
|
+
let f = o(a);
|
|
14
|
+
f.current = a;
|
|
15
|
+
let p = {
|
|
16
|
+
...c,
|
|
17
|
+
open: () => {
|
|
18
|
+
clearTimeout(u.current), l.current = setTimeout(() => {
|
|
19
|
+
c.isOpen.value = !0;
|
|
20
|
+
}, d.current);
|
|
21
|
+
},
|
|
22
|
+
close: () => {
|
|
23
|
+
clearTimeout(l.current), u.current = setTimeout(() => {
|
|
24
|
+
c.isOpen.value = !1;
|
|
25
|
+
}, f.current);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
return n(() => () => {
|
|
29
|
+
clearTimeout(l.current), clearTimeout(u.current);
|
|
30
|
+
}), /* @__PURE__ */ i(s.Provider, {
|
|
31
|
+
value: p,
|
|
32
|
+
children: t
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
function l({ ctx: e, children: n }) {
|
|
36
|
+
r();
|
|
37
|
+
let { triggerRef: a, anchorName: o, open: s, close: c } = e;
|
|
38
|
+
return /* @__PURE__ */ i("span", {
|
|
39
|
+
ref: a,
|
|
40
|
+
style: { anchorName: o },
|
|
41
|
+
onMouseEnter: s,
|
|
42
|
+
onMouseLeave: c,
|
|
43
|
+
onFocus: s,
|
|
44
|
+
onBlur: c,
|
|
45
|
+
className: t.trigger,
|
|
46
|
+
children: n
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
function u({ children: e }) {
|
|
50
|
+
return /* @__PURE__ */ i(s.Consumer, { children: (t) => {
|
|
51
|
+
if (!t) throw Error("HoverCardTrigger must be inside <HoverCard>");
|
|
52
|
+
return /* @__PURE__ */ i(l, {
|
|
53
|
+
ctx: t,
|
|
54
|
+
children: e
|
|
55
|
+
});
|
|
56
|
+
} });
|
|
57
|
+
}
|
|
58
|
+
function d({ ctx: e, children: n, className: a }) {
|
|
59
|
+
r();
|
|
60
|
+
let { popoverRef: o, anchorName: s, isOpen: c, open: l, close: u } = e;
|
|
61
|
+
return /* @__PURE__ */ i("div", {
|
|
62
|
+
ref: o,
|
|
63
|
+
popover: "auto",
|
|
64
|
+
role: "complementary",
|
|
65
|
+
"data-state": c.value ? "open" : "closed",
|
|
66
|
+
style: { positionAnchor: s },
|
|
67
|
+
onMouseEnter: l,
|
|
68
|
+
onMouseLeave: u,
|
|
69
|
+
className: [t.content, a].filter(Boolean).join(" "),
|
|
70
|
+
children: n
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
function f({ children: e, className: t }) {
|
|
74
|
+
return /* @__PURE__ */ i(s.Consumer, { children: (n) => {
|
|
75
|
+
if (!n) throw Error("HoverCardContent must be inside <HoverCard>");
|
|
76
|
+
return /* @__PURE__ */ i(d, {
|
|
77
|
+
ctx: n,
|
|
78
|
+
...t !== void 0 && { className: t },
|
|
79
|
+
children: e
|
|
80
|
+
});
|
|
81
|
+
} });
|
|
82
|
+
}
|
|
83
|
+
//#endregion
|
|
84
|
+
export { c as HoverCard, f as HoverCardContent, u as HoverCardTrigger };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._iconButton_13zh2_2{aspect-ratio:1;font-family:var(--cascivo-font-sans);line-height:var(--cascivo-leading-none);cursor:pointer;border-radius:var(--cascivo-button-radius,var(--cascivo-radius-control));color:var(--cascivo-color-text);transition:background-color var(--cascivo-duration-150) var(--cascivo-ease-out), color var(--cascivo-duration-150) var(--cascivo-ease-out), box-shadow var(--cascivo-duration-150) var(--cascivo-ease-out);background-color:#0000;border:1px solid #0000;flex-shrink:0;justify-content:center;align-items:center;padding:0;display:inline-flex}._iconButton_13zh2_2:focus-visible{box-shadow:var(--cascivo-focus-ring);outline:none}._iconButton_13zh2_2:disabled{opacity:.5;cursor:not-allowed;pointer-events:none}._iconButton_13zh2_2[data-size=sm]{block-size:var(--cascivo-control-height-sm);inline-size:var(--cascivo-control-height-sm);font-size:var(--cascivo-text-sm)}._iconButton_13zh2_2[data-size=md]{block-size:var(--cascivo-control-height-md);inline-size:var(--cascivo-control-height-md);font-size:var(--cascivo-text-base)}._iconButton_13zh2_2[data-size=lg]{block-size:var(--cascivo-control-height-lg);inline-size:var(--cascivo-control-height-lg);font-size:var(--cascivo-text-lg)}._iconButton_13zh2_2[data-variant=ghost]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._iconButton_13zh2_2[data-variant=outline]{border-color:var(--cascivo-color-border);background-color:var(--cascivo-color-surface)}._iconButton_13zh2_2[data-variant=outline]:hover:not(:disabled){background-color:var(--cascivo-color-bg-subtle)}._iconButton_13zh2_2[data-variant=filled]{background-color:var(--cascivo-color-primary);color:var(--cascivo-color-primary-fg)}._iconButton_13zh2_2[data-variant=filled]:hover:not(:disabled){background-color:var(--cascivo-color-primary-hover)}._iconButton_13zh2_2[data-variant=filled]:active:not(:disabled){background-color:var(--cascivo-color-primary-active)}}@media (forced-colors:active){._iconButton_13zh2_2{border:1px solid buttontext}._iconButton_13zh2_2:focus-visible{outline-offset:2px;outline:2px solid highlight}._iconButton_13zh2_2:disabled{color:graytext;border-color:graytext}}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./icon-button.module.js";
|
|
4
|
+
import { Slot as t, cn as n } from "@cascivo/core";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
import { forwardRef as i } from "react";
|
|
7
|
+
//#region ../components/src/icon-button/icon-button.tsx
|
|
8
|
+
var a = i(function({ label: i, icon: a, size: o = "md", variant: s = "ghost", asChild: c = !1, className: l, children: u, ...d }, f) {
|
|
9
|
+
return /* @__PURE__ */ r(c ? t : "button", {
|
|
10
|
+
type: c ? void 0 : "button",
|
|
11
|
+
"aria-label": i,
|
|
12
|
+
"data-size": o,
|
|
13
|
+
"data-variant": s,
|
|
14
|
+
className: n(e.iconButton, l),
|
|
15
|
+
ref: f,
|
|
16
|
+
...d,
|
|
17
|
+
children: u ?? a
|
|
18
|
+
});
|
|
19
|
+
});
|
|
20
|
+
//#endregion
|
|
21
|
+
export { a as IconButton };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._wrapper_1cf1d_2{border-radius:var(--cascivo-radius-md);background-color:var(--cascivo-color-bg-subtle);flex-shrink:0;line-height:0;display:inline-block;position:relative;overflow:hidden}._wrapper_1cf1d_2[data-radius=none]{border-radius:var(--cascivo-radius-none)}._wrapper_1cf1d_2[data-radius=sm]{border-radius:var(--cascivo-radius-sm)}._wrapper_1cf1d_2[data-radius=md]{border-radius:var(--cascivo-radius-md)}._wrapper_1cf1d_2[data-radius=lg]{border-radius:var(--cascivo-radius-lg)}._wrapper_1cf1d_2[data-radius=full]{border-radius:var(--cascivo-radius-full)}._image_1cf1d_28{object-fit:cover;border-radius:inherit;opacity:1;block-size:100%;inline-size:100%;display:block}._wrapper_1cf1d_2[data-state=loading] ._image_1cf1d_28{opacity:0}._wrapper_1cf1d_2[data-state=loaded] ._image_1cf1d_28,._wrapper_1cf1d_2[data-state=error] ._image_1cf1d_28{opacity:1;transition:opacity .3s}._placeholder_1cf1d_47{background-color:var(--cascivo-color-border);background-image:linear-gradient(90deg, var(--cascivo-color-border) 25%, var(--cascivo-color-bg-subtle) 50%, var(--cascivo-color-border) 75%);background-size:200% 100%;animation:1.5s linear infinite _cascade-image-shimmer_1cf1d_1;position:absolute;inset:0}._wrapper_1cf1d_2[data-blurred] ._placeholder_1cf1d_47{filter:blur(.5rem)}._fallback_1cf1d_66{block-size:100%;inline-size:100%;min-inline-size:var(--cascivo-space-12);min-block-size:var(--cascivo-space-12);background-color:var(--cascivo-color-bg-subtle);display:block}._wrapper_1cf1d_2[data-zoom] ._image_1cf1d_28{transition:transform .3s,opacity .3s;transform:scale(1)}._wrapper_1cf1d_2[data-zoom]:hover ._image_1cf1d_28{transform:scale(1.05)}@keyframes _cascade-image-shimmer_1cf1d_1{0%{background-position:200% 0}to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){._placeholder_1cf1d_47{background-image:none;animation:none}._wrapper_1cf1d_2[data-state=loaded] ._image_1cf1d_28,._wrapper_1cf1d_2[data-state=error] ._image_1cf1d_28,._wrapper_1cf1d_2[data-zoom] ._image_1cf1d_28,._wrapper_1cf1d_2[data-zoom]:hover ._image_1cf1d_28{transition:none;transform:none}}}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./image.module.js";
|
|
4
|
+
import { cn as t, createMachine as n, useMachine as r, useSignals as i } from "@cascivo/core";
|
|
5
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/image/image.tsx
|
|
7
|
+
var s = n({
|
|
8
|
+
initial: "loading",
|
|
9
|
+
states: {
|
|
10
|
+
loading: { on: {
|
|
11
|
+
LOADED: "loaded",
|
|
12
|
+
ERROR: "error"
|
|
13
|
+
} },
|
|
14
|
+
loaded: {},
|
|
15
|
+
error: {}
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
function c({ src: n, alt: c = "", fallbackSrc: l, width: u, height: d, radius: f = "md", zoom: p = !1, removeWrapper: m = !1, isBlurred: h = !1, className: g, style: _, ...v }) {
|
|
19
|
+
i();
|
|
20
|
+
let [y, b] = r(s), x = y.value === "error", S = x && !l, C = x && l ? l : n, w = {
|
|
21
|
+
...u !== void 0 && { inlineSize: u },
|
|
22
|
+
...d !== void 0 && { blockSize: d }
|
|
23
|
+
};
|
|
24
|
+
return m ? /* @__PURE__ */ a("img", {
|
|
25
|
+
className: t(e.image, g),
|
|
26
|
+
src: C,
|
|
27
|
+
alt: c,
|
|
28
|
+
onLoad: () => b("LOADED"),
|
|
29
|
+
onError: () => b("ERROR"),
|
|
30
|
+
style: {
|
|
31
|
+
...w,
|
|
32
|
+
..._
|
|
33
|
+
},
|
|
34
|
+
...v
|
|
35
|
+
}) : /* @__PURE__ */ o("span", {
|
|
36
|
+
"data-state": y.value,
|
|
37
|
+
"data-radius": f,
|
|
38
|
+
"data-zoom": p || void 0,
|
|
39
|
+
"data-blurred": h || void 0,
|
|
40
|
+
className: t(e.wrapper, g),
|
|
41
|
+
style: {
|
|
42
|
+
...w,
|
|
43
|
+
..._
|
|
44
|
+
},
|
|
45
|
+
role: S ? "img" : void 0,
|
|
46
|
+
"aria-label": S ? c : void 0,
|
|
47
|
+
children: [y.value === "loading" && /* @__PURE__ */ a("span", {
|
|
48
|
+
className: e.placeholder,
|
|
49
|
+
"aria-hidden": "true"
|
|
50
|
+
}), S ? /* @__PURE__ */ a("span", {
|
|
51
|
+
className: e.fallback,
|
|
52
|
+
"aria-hidden": "true"
|
|
53
|
+
}) : /* @__PURE__ */ a("img", {
|
|
54
|
+
className: e.image,
|
|
55
|
+
src: C,
|
|
56
|
+
alt: c,
|
|
57
|
+
onLoad: () => b("LOADED"),
|
|
58
|
+
onError: () => b("ERROR"),
|
|
59
|
+
...v
|
|
60
|
+
})]
|
|
61
|
+
});
|
|
62
|
+
}
|
|
63
|
+
//#endregion
|
|
64
|
+
export { c as Image };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './image.css';
|
|
4
|
+
var e = {
|
|
5
|
+
wrapper: "_wrapper_1cf1d_2",
|
|
6
|
+
image: "_image_1cf1d_28",
|
|
7
|
+
placeholder: "_placeholder_1cf1d_47",
|
|
8
|
+
"cascade-image-shimmer": "_cascade-image-shimmer_1cf1d_1",
|
|
9
|
+
fallback: "_fallback_1cf1d_66"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._indicator_12iz3_2{display:inline-flex;position:relative}._overlay_12iz3_7{z-index:1;pointer-events:none;position:absolute}._indicator_12iz3_2[data-placement=top-start] ._overlay_12iz3_7{inset-block-start:0;inset-inline-start:0;transform:translate(-25%,-25%)}._indicator_12iz3_2[data-placement=top-end] ._overlay_12iz3_7{inset-block-start:0;inset-inline-end:0;transform:translate(25%,-25%)}._indicator_12iz3_2[data-placement=bottom-start] ._overlay_12iz3_7{inset-block-end:0;inset-inline-start:0;transform:translate(-25%,25%)}._indicator_12iz3_2[data-placement=bottom-end] ._overlay_12iz3_7{inset-block-end:0;inset-inline-end:0;transform:translate(25%,25%)}}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./indicator.module.js";
|
|
4
|
+
import { jsx as t, jsxs as n } from "react/jsx-runtime";
|
|
5
|
+
//#region ../components/src/indicator/indicator.tsx
|
|
6
|
+
function r({ children: r, overlay: i, placement: a = "top-end", className: o }) {
|
|
7
|
+
return /* @__PURE__ */ n("div", {
|
|
8
|
+
className: [e.indicator, o].filter(Boolean).join(" "),
|
|
9
|
+
"data-placement": a,
|
|
10
|
+
children: [r, /* @__PURE__ */ t("div", {
|
|
11
|
+
className: e.overlay,
|
|
12
|
+
"aria-hidden": !0,
|
|
13
|
+
children: i
|
|
14
|
+
})]
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as Indicator };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._inline-loading_h27o5_2{align-items:center;gap:var(--cascivo-space-2);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);line-height:var(--cascivo-leading-none);color:var(--cascivo-color-text);display:inline-flex}._inline-loading_h27o5_2[data-status=finished]{color:var(--cascivo-color-success-foreground,var(--cascivo-color-success))}._inline-loading_h27o5_2[data-status=error]{color:var(--cascivo-color-destructive)}._indicator_h27o5_20{flex-shrink:0;justify-content:center;align-items:center;block-size:1rem;inline-size:1rem;display:inline-flex}._spinner_h27o5_29{color:var(--cascivo-color-text-muted)}._icon_h27o5_33{opacity:1;block-size:1rem;inline-size:1rem}@starting-style{._icon_h27o5_33{opacity:0}}._icon_h27o5_33{transition:opacity var(--cascivo-motion-enter)}._label_h27o5_46{color:inherit}}@media (forced-colors:active){._inline-loading_h27o5_2[data-status=finished],._inline-loading_h27o5_2[data-status=error]{color:canvastext}}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { Spinner as e } from "../spinner/spinner.js";
|
|
4
|
+
import t from "./inline-loading.module.js";
|
|
5
|
+
import { cn as n } from "@cascivo/core";
|
|
6
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
7
|
+
import { jsx as a, jsxs as o } from "react/jsx-runtime";
|
|
8
|
+
//#region ../components/src/inline-loading/inline-loading.tsx
|
|
9
|
+
function s(e, t) {
|
|
10
|
+
switch (e) {
|
|
11
|
+
case "active": return t?.active ?? i(r.inlineLoading.active);
|
|
12
|
+
case "finished": return t?.finished ?? i(r.inlineLoading.finished);
|
|
13
|
+
case "error": return t?.error ?? i(r.inlineLoading.error);
|
|
14
|
+
default: return "";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function c({ status: n }) {
|
|
18
|
+
return n === "active" ? /* @__PURE__ */ a(e, {
|
|
19
|
+
size: "sm",
|
|
20
|
+
className: t.spinner
|
|
21
|
+
}) : n === "finished" ? /* @__PURE__ */ a("svg", {
|
|
22
|
+
className: t.icon,
|
|
23
|
+
viewBox: "0 0 16 16",
|
|
24
|
+
width: "16",
|
|
25
|
+
height: "16",
|
|
26
|
+
fill: "none",
|
|
27
|
+
"aria-hidden": "true",
|
|
28
|
+
children: /* @__PURE__ */ a("path", {
|
|
29
|
+
d: "M3.5 8.5l3 3 6-7",
|
|
30
|
+
stroke: "currentColor",
|
|
31
|
+
strokeWidth: "1.75",
|
|
32
|
+
strokeLinecap: "round",
|
|
33
|
+
strokeLinejoin: "round"
|
|
34
|
+
})
|
|
35
|
+
}) : n === "error" ? /* @__PURE__ */ o("svg", {
|
|
36
|
+
className: t.icon,
|
|
37
|
+
viewBox: "0 0 16 16",
|
|
38
|
+
width: "16",
|
|
39
|
+
height: "16",
|
|
40
|
+
fill: "none",
|
|
41
|
+
"aria-hidden": "true",
|
|
42
|
+
children: [/* @__PURE__ */ a("path", {
|
|
43
|
+
d: "M8 4.5v4M8 11h.01",
|
|
44
|
+
stroke: "currentColor",
|
|
45
|
+
strokeWidth: "1.75",
|
|
46
|
+
strokeLinecap: "round",
|
|
47
|
+
strokeLinejoin: "round"
|
|
48
|
+
}), /* @__PURE__ */ a("circle", {
|
|
49
|
+
cx: "8",
|
|
50
|
+
cy: "8",
|
|
51
|
+
r: "6.25",
|
|
52
|
+
stroke: "currentColor",
|
|
53
|
+
strokeWidth: "1.5"
|
|
54
|
+
})]
|
|
55
|
+
}) : null;
|
|
56
|
+
}
|
|
57
|
+
function l({ status: e, label: r, labels: i, className: l, ...u }) {
|
|
58
|
+
let d = r ?? s(e, i);
|
|
59
|
+
return /* @__PURE__ */ o("div", {
|
|
60
|
+
role: "status",
|
|
61
|
+
"aria-live": "polite",
|
|
62
|
+
"data-status": e,
|
|
63
|
+
className: n(t["inline-loading"], l),
|
|
64
|
+
...u,
|
|
65
|
+
children: [/* @__PURE__ */ a("span", {
|
|
66
|
+
className: t.indicator,
|
|
67
|
+
"aria-hidden": "true",
|
|
68
|
+
children: /* @__PURE__ */ a(c, { status: e })
|
|
69
|
+
}), d && /* @__PURE__ */ a("span", {
|
|
70
|
+
className: t.label,
|
|
71
|
+
children: d
|
|
72
|
+
})]
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
//#endregion
|
|
76
|
+
export { l as InlineLoading };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './inline-loading.css';
|
|
4
|
+
var e = {
|
|
5
|
+
"inline-loading": "_inline-loading_h27o5_2",
|
|
6
|
+
indicator: "_indicator_h27o5_20",
|
|
7
|
+
spinner: "_spinner_h27o5_29",
|
|
8
|
+
icon: "_icon_h27o5_33",
|
|
9
|
+
label: "_label_h27o5_46"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._wrapper_ao79u_2{gap:var(--cascivo-space-1);flex-direction:column;display:flex}._wrapper_ao79u_2[data-size=sm]{--_input-height:var(--cascivo-control-height-sm);--_input-font:var(--cascivo-text-sm);--_input-px:var(--cascivo-space-3)}._wrapper_ao79u_2[data-size=md]{--_input-height:var(--cascivo-control-height-md);--_input-font:var(--cascivo-text-sm);--_input-px:var(--cascivo-space-4)}._wrapper_ao79u_2[data-size=lg]{--_input-height:var(--cascivo-control-height-lg);--_input-font:var(--cascivo-text-base);--_input-px:var(--cascivo-space-4)}._label_ao79u_26{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text);line-height:var(--cascivo-leading-snug)}._input_ao79u_34{width:100%;height:var(--_input-height,2.5rem);padding-inline:var(--_input-px,var(--cascivo-space-4));font-family:var(--cascivo-font-sans);font-size:var(--_input-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}._input_ao79u_34::placeholder{color:var(--cascivo-color-text-muted)}._input_ao79u_34:hover:not(:disabled):not(:focus){border-color:var(--cascivo-color-border-strong)}._input_ao79u_34:focus{border-color:var(--cascivo-color-accent);box-shadow:var(--cascivo-focus-ring)}._input_ao79u_34:disabled{opacity:.5;cursor:not-allowed;background-color:var(--cascivo-color-bg-subtle)}._wrapper_ao79u_2[data-state=error] ._input_ao79u_34{border-color:var(--cascivo-color-destructive)}._wrapper_ao79u_2[data-state=error] ._input_ao79u_34:focus{box-shadow:0 0 0 3px rgb(from var(--cascivo-color-destructive) r g b / .3)}._error_ao79u_77{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-destructive);line-height:var(--cascivo-leading-snug)}._hint_ao79u_84{font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-snug)}@media (pointer:coarse){._wrapper_ao79u_2[data-size=sm] ._input_ao79u_34,._wrapper_ao79u_2[data-size=md] ._input_ao79u_34{min-block-size:var(--cascivo-target-min-coarse,2.75rem)}}}@media (forced-colors:active){._input_ao79u_34{color:fieldtext;background-color:field;border:1px solid fieldtext}._input_ao79u_34:focus{outline-offset:2px;outline:2px solid highlight}}
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./input.module.js";
|
|
4
|
+
import { cn as t, createMachine as n, useMachine as r } from "@cascivo/core";
|
|
5
|
+
import { jsx as i, jsxs as a } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/input/input.tsx
|
|
7
|
+
var o = n({
|
|
8
|
+
initial: "idle",
|
|
9
|
+
states: {
|
|
10
|
+
idle: { on: { FOCUS: "focused" } },
|
|
11
|
+
focused: { on: { BLUR: "idle" } }
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
function s({ label: n, hint: s, error: c, size: l = "md", className: u, id: d, onFocus: f, onBlur: p, ...m }) {
|
|
15
|
+
let [h, g] = r(o), _ = d ?? (n ? `cascade-input-${n.toLowerCase().replace(/\s+/g, "-")}` : void 0);
|
|
16
|
+
return /* @__PURE__ */ a("div", {
|
|
17
|
+
className: t(e.wrapper, u),
|
|
18
|
+
"data-state": c ? "error" : h.value,
|
|
19
|
+
"data-size": l,
|
|
20
|
+
children: [
|
|
21
|
+
n && /* @__PURE__ */ i("label", {
|
|
22
|
+
className: e.label,
|
|
23
|
+
htmlFor: _,
|
|
24
|
+
children: n
|
|
25
|
+
}),
|
|
26
|
+
/* @__PURE__ */ i("input", {
|
|
27
|
+
id: _,
|
|
28
|
+
className: e.input,
|
|
29
|
+
"aria-invalid": c ? !0 : void 0,
|
|
30
|
+
"aria-describedby": c ? `${_}-error` : s ? `${_}-hint` : void 0,
|
|
31
|
+
onFocus: (e) => {
|
|
32
|
+
g("FOCUS"), f?.(e);
|
|
33
|
+
},
|
|
34
|
+
onBlur: (e) => {
|
|
35
|
+
g("BLUR"), p?.(e);
|
|
36
|
+
},
|
|
37
|
+
...m
|
|
38
|
+
}),
|
|
39
|
+
c && /* @__PURE__ */ i("span", {
|
|
40
|
+
id: `${_}-error`,
|
|
41
|
+
className: e.error,
|
|
42
|
+
role: "alert",
|
|
43
|
+
children: c
|
|
44
|
+
}),
|
|
45
|
+
!c && s && /* @__PURE__ */ i("span", {
|
|
46
|
+
id: `${_}-hint`,
|
|
47
|
+
className: e.hint,
|
|
48
|
+
children: s
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
//#endregion
|
|
54
|
+
export { s as Input };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._input-group_n9tv2_2{align-items:stretch;width:100%;display:flex}._input-group_n9tv2_2[data-has-prefix] ._input-wrap_n9tv2_8>*{border-start-start-radius:0;border-end-start-radius:0}._input-group_n9tv2_2[data-has-suffix] ._input-wrap_n9tv2_8>*{border-start-end-radius:0;border-end-end-radius:0}._input-group_n9tv2_2[data-has-prefix] ._addon_n9tv2_18[data-position=prefix]{border-inline-end:none;border-start-end-radius:0;border-end-end-radius:0}._input-group_n9tv2_2[data-has-suffix] ._addon_n9tv2_18[data-position=suffix]{border-inline-start:none;border-start-start-radius:0;border-end-start-radius:0}._input-wrap_n9tv2_8{flex:1;min-width:0}._input-wrap_n9tv2_8>*{width:100%}._addon_n9tv2_18{padding-inline:var(--cascivo-space-3);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);color:var(--cascivo-color-text-subtle);background-color:var(--cascivo-color-bg-subtle);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field);white-space:nowrap;flex-shrink:0;align-items:center;display:inline-flex}._input-group_n9tv2_2:has(._inline-addon_n9tv2_55){border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-field,var(--cascivo-radius-control));background:var(--cascivo-color-bg);align-items:center;transition:border-color .12s,box-shadow .12s;display:flex}._input-group_n9tv2_2:has(._inline-addon_n9tv2_55):focus-within{border-color:var(--cascivo-color-accent);box-shadow:var(--cascivo-focus-ring)}._input-group_n9tv2_2:has(._inline-addon_n9tv2_55) ._input-wrap_n9tv2_8 input{box-shadow:none;background:0 0;border:none;outline:none}._inline-addon_n9tv2_55{color:var(--cascivo-color-text-subtle);pointer-events:none;align-items:center;display:inline-flex}._inline-addon_n9tv2_55[data-align=inline-start]{order:-1;padding-inline-start:var(--cascivo-space-3)}._inline-addon_n9tv2_55[data-align=inline-end]{order:1;padding-inline-end:var(--cascivo-space-3)}._inline-addon_n9tv2_55 svg{block-size:1rem;inline-size:1rem}._button-group_n9tv2_101{align-items:stretch;display:inline-flex}._button-group_n9tv2_101>:not(:first-child){border-start-start-radius:0;border-end-start-radius:0;margin-inline-start:-1px}._button-group_n9tv2_101>:not(:last-child){border-start-end-radius:0;border-end-end-radius:0}._button-group_n9tv2_101>:focus-visible{z-index:1;position:relative}}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./input-group.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/input-group/input-group.tsx
|
|
7
|
+
function i({ align: r = "inline-start", children: i, className: a, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ n("span", {
|
|
9
|
+
className: t(e["inline-addon"], a),
|
|
10
|
+
"data-align": r,
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
...o,
|
|
13
|
+
children: i
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function a({ prefix: i, suffix: a, children: o, className: s, ...c }) {
|
|
17
|
+
return /* @__PURE__ */ r("div", {
|
|
18
|
+
className: t(e["input-group"], s),
|
|
19
|
+
"data-has-prefix": i ? "" : void 0,
|
|
20
|
+
"data-has-suffix": a ? "" : void 0,
|
|
21
|
+
...c,
|
|
22
|
+
children: [
|
|
23
|
+
i && /* @__PURE__ */ n("span", {
|
|
24
|
+
className: e.addon,
|
|
25
|
+
"data-position": "prefix",
|
|
26
|
+
children: i
|
|
27
|
+
}),
|
|
28
|
+
/* @__PURE__ */ n("span", {
|
|
29
|
+
className: e["input-wrap"],
|
|
30
|
+
children: o
|
|
31
|
+
}),
|
|
32
|
+
a && /* @__PURE__ */ n("span", {
|
|
33
|
+
className: e.addon,
|
|
34
|
+
"data-position": "suffix",
|
|
35
|
+
children: a
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { a as InputGroup, i as InputGroupAddon };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './input-group.css';
|
|
4
|
+
var e = {
|
|
5
|
+
"input-group": "_input-group_n9tv2_2",
|
|
6
|
+
"input-wrap": "_input-wrap_n9tv2_8",
|
|
7
|
+
addon: "_addon_n9tv2_18",
|
|
8
|
+
"inline-addon": "_inline-addon_n9tv2_55",
|
|
9
|
+
"button-group": "_button-group_n9tv2_101"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._item_1uxrt_2{align-items:center;gap:var(--cascivo-space-3);box-sizing:border-box;inline-size:100%;font-family:var(--cascivo-font-sans);color:var(--cascivo-color-text);border-radius:var(--cascivo-radius-item);grid-template-columns:auto 1fr auto;display:grid}._item_1uxrt_2[data-size=sm]{padding-inline:var(--cascivo-space-3);padding-block:var(--cascivo-space-2);font-size:var(--cascivo-text-xs)}._item_1uxrt_2[data-size=md]{padding-inline:var(--cascivo-space-4);padding-block:var(--cascivo-space-3);font-size:var(--cascivo-text-sm)}._item_1uxrt_2[data-variant=muted]{background-color:var(--cascivo-color-bg-subtle)}._media_1uxrt_30{color:var(--cascivo-color-text-subtle);flex:none;justify-content:center;align-items:center;display:inline-flex}._content_1uxrt_38{gap:var(--cascivo-space-1);flex-direction:column;min-inline-size:0;display:flex}._title_1uxrt_45{font-weight:var(--cascivo-font-medium);line-height:var(--cascivo-leading-tight);color:var(--cascivo-color-text)}._description_1uxrt_51{font-size:var(--cascivo-text-xs);color:var(--cascivo-color-text-subtle);line-height:var(--cascivo-leading-normal);margin:0}._actions_1uxrt_58{align-items:center;gap:var(--cascivo-space-2);flex:none;display:inline-flex}}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./item.module.js";
|
|
4
|
+
import { Slot as t, cn as n } from "@cascivo/core";
|
|
5
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/item/item.tsx
|
|
7
|
+
function i({ asChild: i = !1, variant: a = "default", size: o = "md", className: s, children: c, ...l }) {
|
|
8
|
+
return /* @__PURE__ */ r(i ? t : "div", {
|
|
9
|
+
"data-variant": a,
|
|
10
|
+
"data-size": o,
|
|
11
|
+
className: n(e.item, s),
|
|
12
|
+
...l,
|
|
13
|
+
children: c
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
function a({ className: t, children: i, ...a }) {
|
|
17
|
+
return /* @__PURE__ */ r("div", {
|
|
18
|
+
className: n(e.media, t),
|
|
19
|
+
...a,
|
|
20
|
+
children: i
|
|
21
|
+
});
|
|
22
|
+
}
|
|
23
|
+
function o({ className: t, children: i, ...a }) {
|
|
24
|
+
return /* @__PURE__ */ r("div", {
|
|
25
|
+
className: n(e.content, t),
|
|
26
|
+
...a,
|
|
27
|
+
children: i
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
function s({ className: t, children: i, ...a }) {
|
|
31
|
+
return /* @__PURE__ */ r("div", {
|
|
32
|
+
className: n(e.title, t),
|
|
33
|
+
...a,
|
|
34
|
+
children: i
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
function c({ className: t, children: i, ...a }) {
|
|
38
|
+
return /* @__PURE__ */ r("p", {
|
|
39
|
+
className: n(e.description, t),
|
|
40
|
+
...a,
|
|
41
|
+
children: i
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function l({ className: t, children: i, ...a }) {
|
|
45
|
+
return /* @__PURE__ */ r("div", {
|
|
46
|
+
className: n(e.actions, t),
|
|
47
|
+
...a,
|
|
48
|
+
children: i
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
//#endregion
|
|
52
|
+
export { i as Item, l as ItemActions, o as ItemContent, c as ItemDescription, a as ItemMedia, s as ItemTitle };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import './item.css';
|
|
4
|
+
var e = {
|
|
5
|
+
item: "_item_1uxrt_2",
|
|
6
|
+
media: "_media_1uxrt_30",
|
|
7
|
+
content: "_content_1uxrt_38",
|
|
8
|
+
title: "_title_1uxrt_45",
|
|
9
|
+
description: "_description_1uxrt_51",
|
|
10
|
+
actions: "_actions_1uxrt_58"
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { e as default };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._join_qgqwu_2{display:inline-flex}._join_qgqwu_2[data-orientation=horizontal]{flex-direction:row}._join_qgqwu_2[data-orientation=vertical]{flex-direction:column}._join_qgqwu_2[data-orientation=horizontal]>:first-child:not(:last-child){border-start-end-radius:0!important;border-end-end-radius:0!important}._join_qgqwu_2[data-orientation=horizontal]>:last-child:not(:first-child){border-start-start-radius:0!important;border-end-start-radius:0!important}._join_qgqwu_2[data-orientation=horizontal]>:not(:first-child):not(:last-child){border-radius:0!important}._join_qgqwu_2[data-orientation=vertical]>:first-child:not(:last-child){border-end-end-radius:0!important;border-end-start-radius:0!important}._join_qgqwu_2[data-orientation=vertical]>:last-child:not(:first-child){border-start-start-radius:0!important;border-start-end-radius:0!important}._join_qgqwu_2[data-orientation=vertical]>:not(:first-child):not(:last-child){border-radius:0!important}._join_qgqwu_2[data-orientation=horizontal]>:not(:first-child){border-inline-start-width:0}._join_qgqwu_2[data-orientation=vertical]>:not(:first-child){border-block-start-width:0}}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./join.module.js";
|
|
4
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
5
|
+
//#region ../components/src/join/join.tsx
|
|
6
|
+
function n({ children: n, orientation: r = "horizontal", className: i }) {
|
|
7
|
+
return /* @__PURE__ */ t("div", {
|
|
8
|
+
className: [e.join, i].filter(Boolean).join(" "),
|
|
9
|
+
"data-orientation": r,
|
|
10
|
+
children: n
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
//#endregion
|
|
14
|
+
export { n as Join };
|
package/dist/kbd/kbd.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._kbd_fz6em_2{font-family:var(--cascivo-font-mono);font-weight:var(--cascivo-font-medium);color:var(--cascivo-color-text-subtle);background-color:var(--cascivo-color-surface-raised);border:1px solid var(--cascivo-color-border);border-radius:var(--cascivo-radius-indicator);box-shadow:inset 0 -1px 0 var(--cascivo-color-border-strong);white-space:nowrap;justify-content:center;align-items:center;line-height:1;display:inline-flex}._kbd_fz6em_2[data-size=sm]{min-inline-size:1.25rem;padding-block:var(--cascivo-space-0);padding-inline:var(--cascivo-space-1);font-size:var(--cascivo-text-xs);block-size:1.25rem}._kbd_fz6em_2[data-size=md]{min-inline-size:1.5rem;padding-block:var(--cascivo-space-1);padding-inline:var(--cascivo-space-2);font-size:var(--cascivo-text-sm);block-size:1.5rem}}
|
package/dist/kbd/kbd.js
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./kbd.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/kbd/kbd.tsx
|
|
7
|
+
function r({ size: r = "md", className: i, children: a, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ n("kbd", {
|
|
9
|
+
"data-size": r,
|
|
10
|
+
className: t(e.kbd, i),
|
|
11
|
+
...o,
|
|
12
|
+
children: a
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { r as Kbd };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer cascivo.component{._label_qztdi_2{align-items:center;gap:var(--cascivo-space-1);font-family:var(--cascivo-font-sans);font-size:var(--cascivo-text-sm);font-weight:var(--cascivo-font-medium);line-height:var(--cascivo-leading-snug);color:var(--cascivo-color-text);display:inline-flex}._label_qztdi_2[data-disabled]{opacity:.5;cursor:not-allowed}._marker_qztdi_18{color:var(--cascivo-color-destructive);line-height:var(--cascivo-leading-none)}._srOnly_qztdi_23{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}}@media (forced-colors:active){._label_qztdi_2[data-disabled]{color:graytext}}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./label.module.js";
|
|
4
|
+
import { Slot as t, cn as n } from "@cascivo/core";
|
|
5
|
+
import { builtin as r, t as i } from "@cascivo/i18n";
|
|
6
|
+
import { Fragment as a, jsx as o, jsxs as s } from "react/jsx-runtime";
|
|
7
|
+
//#region ../components/src/label/label.tsx
|
|
8
|
+
function c({ asChild: c = !1, required: l = !1, disabled: u = !1, className: d, children: f, labels: p, ...m }) {
|
|
9
|
+
let h = c ? t : "label", g = p?.required ?? i(r.label.required), _ = l ? /* @__PURE__ */ s(a, { children: [/* @__PURE__ */ o("span", {
|
|
10
|
+
className: e.marker,
|
|
11
|
+
"aria-hidden": "true",
|
|
12
|
+
children: "*"
|
|
13
|
+
}), /* @__PURE__ */ o("span", {
|
|
14
|
+
className: e.srOnly,
|
|
15
|
+
children: g
|
|
16
|
+
})] }) : null;
|
|
17
|
+
return /* @__PURE__ */ o(h, {
|
|
18
|
+
"data-disabled": u ? "" : void 0,
|
|
19
|
+
className: n(e.label, d),
|
|
20
|
+
...m,
|
|
21
|
+
children: _ ? /* @__PURE__ */ s(a, { children: [f, _] }) : f
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { c as Label };
|