@cascivo/react 0.9.0 → 0.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -5
- package/dist/command-menu/command-menu.js +2 -2
- package/dist/field/field.js +24 -15
- package/dist/index.d.ts +13 -0
- package/dist/node/accordion/accordion.js +95 -0
- package/dist/node/accordion/accordion.module.js +13 -0
- package/dist/node/action-sheet/action-sheet.js +91 -0
- package/dist/node/action-sheet/action-sheet.module.js +14 -0
- package/dist/node/alert/alert.js +55 -0
- package/dist/node/alert/alert.module.js +13 -0
- package/dist/node/alert-dialog/alert-dialog.js +68 -0
- package/dist/node/alert-dialog/alert-dialog.module.js +13 -0
- package/dist/node/app-shell/app-shell.js +80 -0
- package/dist/node/app-shell/app-shell.module.js +14 -0
- package/dist/node/aspect-ratio/aspect-ratio.js +22 -0
- package/dist/node/aspect-ratio/aspect-ratio.module.js +8 -0
- package/dist/node/avatar/avatar.js +57 -0
- package/dist/node/avatar/avatar.module.js +10 -0
- package/dist/node/avatar-group/avatar-group.js +26 -0
- package/dist/node/avatar-group/avatar-group.module.js +8 -0
- package/dist/node/badge/badge.js +17 -0
- package/dist/node/badge/badge.module.js +5 -0
- package/dist/node/blockquote/blockquote.js +18 -0
- package/dist/node/blockquote/blockquote.module.js +8 -0
- package/dist/node/bottom-sheet/bottom-sheet.js +111 -0
- package/dist/node/bottom-sheet/bottom-sheet.module.js +16 -0
- package/dist/node/breadcrumb/breadcrumb.js +28 -0
- package/dist/node/breadcrumb/breadcrumb.module.js +5 -0
- package/dist/node/button/button.js +31 -0
- package/dist/node/button/button.module.js +5 -0
- package/dist/node/button-group/button-group.js +39 -0
- package/dist/node/button-group/button-group.module.js +5 -0
- package/dist/node/calendar/calendar.js +195 -0
- package/dist/node/calendar/calendar.module.js +16 -0
- package/dist/node/card/card.js +45 -0
- package/dist/node/card/card.module.js +11 -0
- package/dist/node/carousel/carousel.js +138 -0
- package/dist/node/carousel/carousel.module.js +15 -0
- package/dist/node/chat-bubble/chat-bubble.js +33 -0
- package/dist/node/chat-bubble/chat-bubble.module.js +13 -0
- package/dist/node/checkbox/checkbox.js +38 -0
- package/dist/node/checkbox/checkbox.module.js +10 -0
- package/dist/node/checkbox-card/checkbox-card.js +48 -0
- package/dist/node/checkbox-card/checkbox-card.module.js +13 -0
- package/dist/node/code/code.js +16 -0
- package/dist/node/code/code.module.js +5 -0
- package/dist/node/code-snippet/code-snippet.js +116 -0
- package/dist/node/code-snippet/code-snippet.module.js +19 -0
- package/dist/node/code-snippet/highlight.js +69 -0
- package/dist/node/collapsible/collapsible.js +42 -0
- package/dist/node/collapsible/collapsible.module.js +10 -0
- package/dist/node/color-picker/color-picker.js +268 -0
- package/dist/node/color-picker/color-picker.module.js +20 -0
- package/dist/node/combobox/combobox.js +164 -0
- package/dist/node/combobox/combobox.module.js +21 -0
- package/dist/node/command-menu/command-menu.js +425 -0
- package/dist/node/command-menu/command-menu.module.js +36 -0
- package/dist/node/comparison/comparison.js +69 -0
- package/dist/node/comparison/comparison.module.js +11 -0
- package/dist/node/contained-list/contained-list.js +41 -0
- package/dist/node/contained-list/contained-list.module.js +13 -0
- package/dist/node/context-menu/context-menu.js +89 -0
- package/dist/node/context-menu/context-menu.module.js +9 -0
- package/dist/node/copy-button/copy-button.js +58 -0
- package/dist/node/copy-button/copy-button.module.js +8 -0
- package/dist/node/data-list/data-list.js +27 -0
- package/dist/node/data-list/data-list.module.js +10 -0
- package/dist/node/data-table/data-table.js +370 -0
- package/dist/node/data-table/data-table.module.js +35 -0
- package/dist/node/date-picker/date-picker.js +218 -0
- package/dist/node/date-picker/date-picker.module.js +25 -0
- package/dist/node/date-range-picker/date-range-picker.js +196 -0
- package/dist/node/date-range-picker/date-range-picker.module.js +20 -0
- package/dist/node/dock/dock.js +34 -0
- package/dist/node/dock/dock.module.js +10 -0
- package/dist/node/drawer/drawer.js +95 -0
- package/dist/node/drawer/drawer.module.js +15 -0
- package/dist/node/dropdown/dropdown.js +109 -0
- package/dist/node/dropdown/dropdown.module.js +11 -0
- package/dist/node/editable/editable.js +67 -0
- package/dist/node/editable/editable.module.js +13 -0
- package/dist/node/empty-state/empty-state.js +34 -0
- package/dist/node/empty-state/empty-state.module.js +11 -0
- package/dist/node/fab/fab.js +93 -0
- package/dist/node/fab/fab.module.js +14 -0
- package/dist/node/field/field.js +48 -0
- package/dist/node/field/field.module.js +9 -0
- package/dist/node/file-uploader/file-uploader.js +122 -0
- package/dist/node/file-uploader/file-uploader.module.js +20 -0
- package/dist/node/filter/filter.js +34 -0
- package/dist/node/filter/filter.module.js +8 -0
- package/dist/node/form/form.js +95 -0
- package/dist/node/form/form.module.js +5 -0
- package/dist/node/header/header.js +44 -0
- package/dist/node/header/header.module.js +13 -0
- package/dist/node/header-panel/header-panel.js +74 -0
- package/dist/node/header-panel/header-panel.module.js +11 -0
- package/dist/node/heading/heading.js +24 -0
- package/dist/node/heading/heading.module.js +5 -0
- package/dist/node/hover-card/hover-card.js +84 -0
- package/dist/node/hover-card/hover-card.module.js +8 -0
- package/dist/node/icon-button/icon-button.js +21 -0
- package/dist/node/icon-button/icon-button.module.js +5 -0
- package/dist/node/image/image.js +64 -0
- package/dist/node/image/image.module.js +11 -0
- package/dist/node/index.js +2 -0
- package/dist/node/indicator/indicator.js +18 -0
- package/dist/node/indicator/indicator.module.js +8 -0
- package/dist/node/inline-loading/inline-loading.js +76 -0
- package/dist/node/inline-loading/inline-loading.module.js +11 -0
- package/dist/node/input/input.js +54 -0
- package/dist/node/input/input.module.js +11 -0
- package/dist/node/input-group/input-group.js +41 -0
- package/dist/node/input-group/input-group.module.js +11 -0
- package/dist/node/item/item.js +52 -0
- package/dist/node/item/item.module.js +12 -0
- package/dist/node/join/join.js +14 -0
- package/dist/node/join/join.module.js +5 -0
- package/dist/node/kbd/kbd.js +16 -0
- package/dist/node/kbd/kbd.module.js +5 -0
- package/dist/node/label/label.js +25 -0
- package/dist/node/label/label.module.js +9 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.js +19 -0
- package/dist/node/layouts/src/auto-grid/auto-grid.module.js +6 -0
- package/dist/node/layouts/src/center/center.js +18 -0
- package/dist/node/layouts/src/center/center.module.js +5 -0
- package/dist/node/layouts/src/columns/columns.js +23 -0
- package/dist/node/layouts/src/columns/columns.module.js +8 -0
- package/dist/node/layouts/src/flex/flex.js +22 -0
- package/dist/node/layouts/src/flex/flex.module.js +5 -0
- package/dist/node/layouts/src/grid/grid.js +57 -0
- package/dist/node/layouts/src/grid/grid.module.js +9 -0
- package/dist/node/layouts/src/spacer/spacer.js +19 -0
- package/dist/node/layouts/src/spacer/spacer.module.js +5 -0
- package/dist/node/link/link.js +22 -0
- package/dist/node/link/link.module.js +5 -0
- package/dist/node/list/list.js +23 -0
- package/dist/node/list/list.module.js +8 -0
- package/dist/node/log-viewer/log-viewer.js +184 -0
- package/dist/node/log-viewer/log-viewer.module.js +18 -0
- package/dist/node/menu/menu.js +121 -0
- package/dist/node/menu/menu.module.js +10 -0
- package/dist/node/menu-button/menu-button.js +92 -0
- package/dist/node/menu-button/menu-button.module.js +10 -0
- package/dist/node/menubar/menubar.js +103 -0
- package/dist/node/menubar/menubar.module.js +10 -0
- package/dist/node/modal/modal.js +70 -0
- package/dist/node/modal/modal.module.js +13 -0
- package/dist/node/multi-select/multi-select.js +106 -0
- package/dist/node/multi-select/multi-select.module.js +17 -0
- package/dist/node/native-select/native-select.js +37 -0
- package/dist/node/native-select/native-select.module.js +9 -0
- package/dist/node/navigation-menu/navigation-menu.js +99 -0
- package/dist/node/navigation-menu/navigation-menu.module.js +12 -0
- package/dist/node/notification/notification.js +134 -0
- package/dist/node/notification/notification.module.js +13 -0
- package/dist/node/number-input/number-input.js +145 -0
- package/dist/node/number-input/number-input.module.js +14 -0
- package/dist/node/otp-input/otp-input.js +70 -0
- package/dist/node/otp-input/otp-input.module.js +8 -0
- package/dist/node/overflow-menu/overflow-menu.js +65 -0
- package/dist/node/overflow-menu/overflow-menu.module.js +9 -0
- package/dist/node/pagination/pagination.js +92 -0
- package/dist/node/pagination/pagination.module.js +13 -0
- package/dist/node/password-input/password-input.js +80 -0
- package/dist/node/password-input/password-input.module.js +13 -0
- package/dist/node/popover/popover.js +49 -0
- package/dist/node/popover/popover.module.js +8 -0
- package/dist/node/popover/use-popover.js +57 -0
- package/dist/node/progress/progress.js +17 -0
- package/dist/node/progress/progress.module.js +8 -0
- package/dist/node/progress-bar/progress-bar.js +44 -0
- package/dist/node/progress-bar/progress-bar.module.js +13 -0
- package/dist/node/progress-circle/progress-circle.js +48 -0
- package/dist/node/progress-circle/progress-circle.module.js +11 -0
- package/dist/node/progress-indicator/progress-indicator.js +36 -0
- package/dist/node/progress-indicator/progress-indicator.module.js +12 -0
- package/dist/node/prose/prose.js +15 -0
- package/dist/node/prose/prose.module.js +5 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.js +82 -0
- package/dist/node/pull-to-refresh/pull-to-refresh.module.js +11 -0
- package/dist/node/qr-code/encode.js +585 -0
- package/dist/node/qr-code/qr-code.js +41 -0
- package/dist/node/qr-code/qr-code.module.js +8 -0
- package/dist/node/radial-progress/radial-progress.js +28 -0
- package/dist/node/radial-progress/radial-progress.module.js +8 -0
- package/dist/node/radio/radio.js +49 -0
- package/dist/node/radio/radio.module.js +11 -0
- package/dist/node/radio-card/radio-card.js +63 -0
- package/dist/node/radio-card/radio-card.module.js +13 -0
- package/dist/node/rating-group/rating-group.js +37 -0
- package/dist/node/rating-group/rating-group.module.js +8 -0
- package/dist/node/react/src/index.js +138 -0
- package/dist/node/react/src/theme.js +54 -0
- package/dist/node/relative-time/relative-time.js +66 -0
- package/dist/node/relative-time/relative-time.module.js +5 -0
- package/dist/node/resizable/resizable.js +80 -0
- package/dist/node/resizable/resizable.module.js +10 -0
- package/dist/node/scroll-area/scroll-area.js +38 -0
- package/dist/node/scroll-area/scroll-area.module.js +5 -0
- package/dist/node/search/search.js +94 -0
- package/dist/node/search/search.module.js +11 -0
- package/dist/node/segmented-control/segmented-control.js +43 -0
- package/dist/node/segmented-control/segmented-control.module.js +8 -0
- package/dist/node/select/select.js +71 -0
- package/dist/node/select/select.module.js +13 -0
- package/dist/node/separator/separator.js +21 -0
- package/dist/node/separator/separator.module.js +5 -0
- package/dist/node/sheet/sheet.js +50 -0
- package/dist/node/sheet/sheet.module.js +11 -0
- package/dist/node/shell-header/shell-header.js +166 -0
- package/dist/node/shell-header/shell-header.module.js +25 -0
- package/dist/node/side-nav/side-nav.js +333 -0
- package/dist/node/side-nav/side-nav.module.js +33 -0
- package/dist/node/skeleton/skeleton.js +25 -0
- package/dist/node/skeleton/skeleton.module.js +9 -0
- package/dist/node/skip-nav/skip-nav.js +27 -0
- package/dist/node/skip-nav/skip-nav.module.js +5 -0
- package/dist/node/slider/slider.js +29 -0
- package/dist/node/slider/slider.module.js +9 -0
- package/dist/node/spinner/spinner.js +18 -0
- package/dist/node/spinner/spinner.module.js +8 -0
- package/dist/node/stack/stack.js +19 -0
- package/dist/node/stack/stack.module.js +8 -0
- package/dist/node/stat/stat.js +41 -0
- package/dist/node/stat/stat.module.js +13 -0
- package/dist/node/status/status.js +20 -0
- package/dist/node/status/status.module.js +9 -0
- package/dist/node/steps/steps.js +35 -0
- package/dist/node/steps/steps.module.js +10 -0
- package/dist/node/storage/src/drivers.js +36 -0
- package/dist/node/storage/src/persisted-signal.js +43 -0
- package/dist/node/structured-list/structured-list.js +101 -0
- package/dist/node/structured-list/structured-list.module.js +14 -0
- package/dist/node/swap/swap.js +36 -0
- package/dist/node/swap/swap.module.js +9 -0
- package/dist/node/swipe-item/swipe-item.js +62 -0
- package/dist/node/swipe-item/swipe-item.module.js +14 -0
- package/dist/node/switcher/switcher.js +32 -0
- package/dist/node/switcher/switcher.module.js +10 -0
- package/dist/node/tabs/tabs.js +95 -0
- package/dist/node/tabs/tabs.module.js +10 -0
- package/dist/node/tag/tag.js +26 -0
- package/dist/node/tag/tag.module.js +8 -0
- package/dist/node/tags-input/tags-input.js +64 -0
- package/dist/node/tags-input/tags-input.module.js +10 -0
- package/dist/node/text/text.js +18 -0
- package/dist/node/text/text.module.js +5 -0
- package/dist/node/textarea/textarea.js +56 -0
- package/dist/node/textarea/textarea.module.js +11 -0
- package/dist/node/tile/tile.js +39 -0
- package/dist/node/tile/tile.module.js +9 -0
- package/dist/node/time-picker/time-picker.js +62 -0
- package/dist/node/time-picker/time-picker.module.js +11 -0
- package/dist/node/timeline/timeline.js +41 -0
- package/dist/node/timeline/timeline.module.js +13 -0
- package/dist/node/toast/toast.js +85 -0
- package/dist/node/toast/toast.module.js +13 -0
- package/dist/node/toc/toc.js +42 -0
- package/dist/node/toc/toc.module.js +5 -0
- package/dist/node/toc/use-toc-from-region.js +18 -0
- package/dist/node/toggle/toggle.js +39 -0
- package/dist/node/toggle/toggle.module.js +10 -0
- package/dist/node/toggle-group/toggle-group.js +55 -0
- package/dist/node/toggle-group/toggle-group.module.js +8 -0
- package/dist/node/toggletip/toggletip.js +49 -0
- package/dist/node/toggletip/toggletip.module.js +9 -0
- package/dist/node/tooltip/tooltip.js +58 -0
- package/dist/node/tooltip/tooltip.module.js +8 -0
- package/dist/node/tree-view/tree-view.js +201 -0
- package/dist/node/tree-view/tree-view.module.js +15 -0
- package/dist/node/user/user.js +37 -0
- package/dist/node/user/user.module.js +11 -0
- package/dist/node/visually-hidden/visually-hidden.js +15 -0
- package/dist/node/visually-hidden/visually-hidden.module.js +5 -0
- package/dist/react/src/theme.js +35 -29
- package/package.json +4 -3
- package/readme.body.md +5 -5
|
@@ -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,11 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
"input-group": "_input-group_n9tv2_2",
|
|
5
|
+
"input-wrap": "_input-wrap_n9tv2_8",
|
|
6
|
+
addon: "_addon_n9tv2_18",
|
|
7
|
+
"inline-addon": "_inline-addon_n9tv2_55",
|
|
8
|
+
"button-group": "_button-group_n9tv2_101"
|
|
9
|
+
};
|
|
10
|
+
//#endregion
|
|
11
|
+
export { e as default };
|
|
@@ -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,12 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
var e = {
|
|
4
|
+
item: "_item_1uxrt_2",
|
|
5
|
+
media: "_media_1uxrt_30",
|
|
6
|
+
content: "_content_1uxrt_38",
|
|
7
|
+
title: "_title_1uxrt_45",
|
|
8
|
+
description: "_description_1uxrt_51",
|
|
9
|
+
actions: "_actions_1uxrt_58"
|
|
10
|
+
};
|
|
11
|
+
//#endregion
|
|
12
|
+
export { e as default };
|
|
@@ -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 };
|
|
@@ -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,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 };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./auto-grid.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/auto-grid/auto-grid.tsx
|
|
7
|
+
function r({ min: r = "16rem", gap: i = 4, className: a, style: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: t(e["auto-grid"], a),
|
|
10
|
+
style: {
|
|
11
|
+
"--_min": r,
|
|
12
|
+
"--_gap": `var(--cascivo-space-${i})`,
|
|
13
|
+
...o
|
|
14
|
+
},
|
|
15
|
+
...s
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as AutoGrid };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./center.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/center/center.tsx
|
|
7
|
+
function r({ maxWidth: r = "48rem", className: i, style: a, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: t(e.center, i),
|
|
10
|
+
style: {
|
|
11
|
+
"--_center-max": r,
|
|
12
|
+
...a
|
|
13
|
+
},
|
|
14
|
+
...o
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
//#endregion
|
|
18
|
+
export { r as Center };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./columns.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/columns/columns.tsx
|
|
7
|
+
function r({ count: r = 2, gap: i = 4, className: a, style: o, children: s, ...c }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: t(e["columns-container"], a),
|
|
10
|
+
style: {
|
|
11
|
+
"--_cols": String(r),
|
|
12
|
+
"--_gap": `var(--cascivo-space-${i})`,
|
|
13
|
+
...o
|
|
14
|
+
},
|
|
15
|
+
...c,
|
|
16
|
+
children: /* @__PURE__ */ n("div", {
|
|
17
|
+
className: e.columns,
|
|
18
|
+
children: s
|
|
19
|
+
})
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as Columns };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./flex.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/flex/flex.tsx
|
|
7
|
+
function r({ direction: r = "vertical", gap: i = 4, align: a, justify: o, wrap: s = !1, className: c, style: l, ...u }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
className: t(e.flex, c),
|
|
10
|
+
"data-direction": r,
|
|
11
|
+
"data-wrap": s ? "" : void 0,
|
|
12
|
+
style: {
|
|
13
|
+
"--_flex-gap": `var(--cascivo-space-${i})`,
|
|
14
|
+
...a ? { alignItems: a === "start" || a === "end" ? `flex-${a}` : a } : {},
|
|
15
|
+
...o ? { justifyContent: o === "between" ? "space-between" : o === "start" || o === "end" ? `flex-${o}` : o } : {},
|
|
16
|
+
...l
|
|
17
|
+
},
|
|
18
|
+
...u
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as Flex };
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./grid.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/grid/grid.tsx
|
|
7
|
+
function r(e) {
|
|
8
|
+
return typeof e == "object" && !!e;
|
|
9
|
+
}
|
|
10
|
+
function i(e, t) {
|
|
11
|
+
if (t === void 0) return {};
|
|
12
|
+
if (!r(t)) return { [e]: String(t) };
|
|
13
|
+
let n = {};
|
|
14
|
+
t.base !== void 0 && (n[e] = String(t.base));
|
|
15
|
+
for (let r of [
|
|
16
|
+
"sm",
|
|
17
|
+
"md",
|
|
18
|
+
"lg",
|
|
19
|
+
"xl"
|
|
20
|
+
]) {
|
|
21
|
+
let i = t[r];
|
|
22
|
+
i !== void 0 && (n[`${e}-${r}`] = String(i));
|
|
23
|
+
}
|
|
24
|
+
return n;
|
|
25
|
+
}
|
|
26
|
+
function a({ cols: a = 12, gap: o = 4, align: s, justify: c, className: l, style: u, children: d, ...f }) {
|
|
27
|
+
return /* @__PURE__ */ n("div", {
|
|
28
|
+
className: t(e["grid-container"], l),
|
|
29
|
+
style: {
|
|
30
|
+
...i("--_grid-cols", a),
|
|
31
|
+
"--_grid-gap": `var(--cascivo-space-${o})`,
|
|
32
|
+
...s ? { "--_grid-align": s } : {},
|
|
33
|
+
...c ? { "--_grid-justify": c } : {},
|
|
34
|
+
...u
|
|
35
|
+
},
|
|
36
|
+
...f,
|
|
37
|
+
children: /* @__PURE__ */ n("div", {
|
|
38
|
+
className: e.grid,
|
|
39
|
+
"data-responsive": r(a) ? "" : void 0,
|
|
40
|
+
children: d
|
|
41
|
+
})
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function o({ span: a, className: o, style: s, ...c }) {
|
|
45
|
+
let l = a !== void 0 && r(a);
|
|
46
|
+
return /* @__PURE__ */ n("div", {
|
|
47
|
+
className: t(e["grid-item"], o),
|
|
48
|
+
"data-responsive": l ? "" : void 0,
|
|
49
|
+
style: {
|
|
50
|
+
...i("--_span", a),
|
|
51
|
+
...s
|
|
52
|
+
},
|
|
53
|
+
...c
|
|
54
|
+
});
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { a as Grid, o as GridItem };
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./spacer.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../layouts/src/spacer/spacer.tsx
|
|
7
|
+
function r({ size: r = 4, className: i, style: a, ...o }) {
|
|
8
|
+
return /* @__PURE__ */ n("div", {
|
|
9
|
+
role: "none",
|
|
10
|
+
className: t(e.spacer, i),
|
|
11
|
+
style: {
|
|
12
|
+
"--_spacer-size": `var(--cascivo-space-${r})`,
|
|
13
|
+
...a
|
|
14
|
+
},
|
|
15
|
+
...o
|
|
16
|
+
});
|
|
17
|
+
}
|
|
18
|
+
//#endregion
|
|
19
|
+
export { r as Spacer };
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./link.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/link/link.tsx
|
|
7
|
+
function r({ variant: r = "standalone", size: i = "md", external: a = !1, className: o, children: s, ...c }) {
|
|
8
|
+
return /* @__PURE__ */ n("a", {
|
|
9
|
+
"data-variant": r,
|
|
10
|
+
"data-size": i,
|
|
11
|
+
"data-external": a || void 0,
|
|
12
|
+
className: t(e.link, o),
|
|
13
|
+
...a ? {
|
|
14
|
+
target: "_blank",
|
|
15
|
+
rel: "noreferrer"
|
|
16
|
+
} : {},
|
|
17
|
+
...c,
|
|
18
|
+
children: s
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
//#endregion
|
|
22
|
+
export { r as Link };
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./list.module.js";
|
|
4
|
+
import { cn as t } from "@cascivo/core";
|
|
5
|
+
import { jsx as n } from "react/jsx-runtime";
|
|
6
|
+
//#region ../components/src/list/list.tsx
|
|
7
|
+
function r({ as: r = "ul", marker: i, className: a, children: o, ...s }) {
|
|
8
|
+
return /* @__PURE__ */ n(r, {
|
|
9
|
+
"data-marker": i ?? (r === "ol" ? "decimal" : "disc"),
|
|
10
|
+
className: t(e.list, a),
|
|
11
|
+
...s,
|
|
12
|
+
children: o
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
function i({ className: r, children: i, ...a }) {
|
|
16
|
+
return /* @__PURE__ */ n("li", {
|
|
17
|
+
className: t(e.item, r),
|
|
18
|
+
...a,
|
|
19
|
+
children: i
|
|
20
|
+
});
|
|
21
|
+
}
|
|
22
|
+
//#endregion
|
|
23
|
+
export { r as List, i as ListItem };
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import e from "./log-viewer.module.js";
|
|
4
|
+
import { VisuallyHidden as t, cn as n, useClipboard as r, useComputed as i, useControllableSignal as a, useResizeObserver as o, useSignal as s, useSignalEffect as c, useSignals as l } from "@cascivo/core";
|
|
5
|
+
import { builtin as u, t as d } from "@cascivo/i18n";
|
|
6
|
+
import { jsx as f, jsxs as p } from "react/jsx-runtime";
|
|
7
|
+
import { Fragment as m } from "react";
|
|
8
|
+
//#region ../components/src/log-viewer/log-viewer.tsx
|
|
9
|
+
var h = {
|
|
10
|
+
30: "black",
|
|
11
|
+
31: "red",
|
|
12
|
+
32: "green",
|
|
13
|
+
33: "yellow",
|
|
14
|
+
34: "blue",
|
|
15
|
+
35: "magenta",
|
|
16
|
+
36: "cyan",
|
|
17
|
+
37: "white",
|
|
18
|
+
90: "bright-black",
|
|
19
|
+
91: "red",
|
|
20
|
+
92: "green",
|
|
21
|
+
93: "yellow",
|
|
22
|
+
94: "blue",
|
|
23
|
+
95: "magenta",
|
|
24
|
+
96: "cyan",
|
|
25
|
+
97: "white"
|
|
26
|
+
};
|
|
27
|
+
function g(e) {
|
|
28
|
+
if (!e.includes("\x1B[")) return [{ text: e }];
|
|
29
|
+
try {
|
|
30
|
+
let t = [], n = /\[([0-9;]*)m/g, r = 0, i, a = !1, o;
|
|
31
|
+
for (; (o = n.exec(e)) !== null;) {
|
|
32
|
+
o.index > r && t.push({
|
|
33
|
+
text: e.slice(r, o.index),
|
|
34
|
+
color: i,
|
|
35
|
+
bold: a
|
|
36
|
+
});
|
|
37
|
+
for (let e of o[1].split(";")) {
|
|
38
|
+
let t = Number(e || "0");
|
|
39
|
+
t === 0 ? (i = void 0, a = !1) : t === 1 ? a = !0 : t === 22 ? a = !1 : h[t] && (i = h[t]);
|
|
40
|
+
}
|
|
41
|
+
r = n.lastIndex;
|
|
42
|
+
}
|
|
43
|
+
return r < e.length && t.push({
|
|
44
|
+
text: e.slice(r),
|
|
45
|
+
color: i,
|
|
46
|
+
bold: a
|
|
47
|
+
}), t.length > 0 ? t : [{ text: e }];
|
|
48
|
+
} catch {
|
|
49
|
+
return [{ text: e }];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function _(e, t, n) {
|
|
53
|
+
if (!t) return e;
|
|
54
|
+
let r = e.toLowerCase(), i = t.toLowerCase(), a = [], o = 0, s = r.indexOf(i, o), c = 0;
|
|
55
|
+
for (; s !== -1;) s > o && a.push(e.slice(o, s)), a.push(/* @__PURE__ */ f("mark", { children: e.slice(s, s + i.length) }, `${n}-${c++}`)), o = s + i.length, s = r.indexOf(i, o);
|
|
56
|
+
return o < e.length && a.push(e.slice(o)), a;
|
|
57
|
+
}
|
|
58
|
+
function v(t, n, r) {
|
|
59
|
+
return (n ? g(t.text) : [{ text: t.text }]).map((n, i) => /* @__PURE__ */ f("span", {
|
|
60
|
+
"data-ansi": n.color,
|
|
61
|
+
style: n.bold ? { fontWeight: 700 } : void 0,
|
|
62
|
+
className: n.color ? e.ansi : void 0,
|
|
63
|
+
children: _(n.text, r, `${String(t.id)}-${i}`)
|
|
64
|
+
}, i));
|
|
65
|
+
}
|
|
66
|
+
function y({ lines: h, rowHeight: g = 20, overscan: _ = 8, follow: y, onFollowChange: b, ansi: x = !1, search: S, maxHeight: C = "24rem", labels: w, className: T, ...E }) {
|
|
67
|
+
l();
|
|
68
|
+
let D = {
|
|
69
|
+
searchPlaceholder: w?.searchPlaceholder ?? d(u.logViewer.search),
|
|
70
|
+
follow: w?.follow ?? d(u.logViewer.follow),
|
|
71
|
+
paused: w?.paused ?? d(u.logViewer.paused),
|
|
72
|
+
copy: w?.copy ?? d(u.logViewer.copy),
|
|
73
|
+
copied: w?.copied ?? d(u.logViewer.copied),
|
|
74
|
+
empty: w?.empty ?? d(u.logViewer.empty),
|
|
75
|
+
label: d(u.logViewer.label)
|
|
76
|
+
}, O = s(Array.isArray(h) ? h : []);
|
|
77
|
+
Array.isArray(h) && (O.value = h);
|
|
78
|
+
let k = Array.isArray(h) ? O : h, { ref: A, size: j } = o(), M = s(0), [N, P] = a({
|
|
79
|
+
value: y,
|
|
80
|
+
defaultValue: !0,
|
|
81
|
+
onChange: b
|
|
82
|
+
}), F = s(S ?? ""), { copied: I, copy: L } = r(), R = i(() => {
|
|
83
|
+
let e = k.value, t = e.length, n = j.value?.height ?? 320, r = Math.max(0, t * g - n), i = N.value ? r : M.value, a = Math.floor(i / g), o = Math.ceil(n / g) + _ * 2, s = Math.max(0, a - _), c = Math.min(t, s + o);
|
|
84
|
+
return {
|
|
85
|
+
total: t,
|
|
86
|
+
start: s,
|
|
87
|
+
end: c,
|
|
88
|
+
rows: e.slice(s, c)
|
|
89
|
+
};
|
|
90
|
+
}), z = i(() => {
|
|
91
|
+
let e = F.value.trim().toLowerCase();
|
|
92
|
+
if (!e) return 0;
|
|
93
|
+
let t = 0;
|
|
94
|
+
for (let n of k.value) n.text.toLowerCase().includes(e) && t++;
|
|
95
|
+
return t;
|
|
96
|
+
});
|
|
97
|
+
c(() => {
|
|
98
|
+
if (k.value, !N.value) return;
|
|
99
|
+
let e = A.current;
|
|
100
|
+
e && (e.scrollTop = e.scrollHeight);
|
|
101
|
+
});
|
|
102
|
+
let B = (e) => {
|
|
103
|
+
let t = e.currentTarget;
|
|
104
|
+
M.value = t.scrollTop, P(t.scrollHeight - t.clientHeight - t.scrollTop <= g);
|
|
105
|
+
}, V = R.value, H = F.value.trim();
|
|
106
|
+
return /* @__PURE__ */ p("div", {
|
|
107
|
+
className: n(e.root, T),
|
|
108
|
+
...E,
|
|
109
|
+
children: [
|
|
110
|
+
/* @__PURE__ */ p("div", {
|
|
111
|
+
className: e.toolbar,
|
|
112
|
+
children: [
|
|
113
|
+
/* @__PURE__ */ f("input", {
|
|
114
|
+
type: "search",
|
|
115
|
+
className: e.search,
|
|
116
|
+
placeholder: D.searchPlaceholder,
|
|
117
|
+
"aria-label": D.searchPlaceholder,
|
|
118
|
+
value: F.value,
|
|
119
|
+
onInput: (e) => {
|
|
120
|
+
F.value = e.currentTarget.value;
|
|
121
|
+
}
|
|
122
|
+
}),
|
|
123
|
+
H ? /* @__PURE__ */ f("span", {
|
|
124
|
+
className: e.count,
|
|
125
|
+
"aria-live": "polite",
|
|
126
|
+
children: d(u.logViewer.matches, { count: z.value })
|
|
127
|
+
}) : null,
|
|
128
|
+
/* @__PURE__ */ f("span", { className: e.spacer }),
|
|
129
|
+
/* @__PURE__ */ f("button", {
|
|
130
|
+
type: "button",
|
|
131
|
+
className: e.toggle,
|
|
132
|
+
"aria-pressed": N.value,
|
|
133
|
+
onClick: () => {
|
|
134
|
+
let e = !N.value;
|
|
135
|
+
if (P(e), e) {
|
|
136
|
+
let e = A.current;
|
|
137
|
+
e && (e.scrollTop = e.scrollHeight);
|
|
138
|
+
}
|
|
139
|
+
},
|
|
140
|
+
children: N.value ? D.follow : D.paused
|
|
141
|
+
}),
|
|
142
|
+
/* @__PURE__ */ f("button", {
|
|
143
|
+
type: "button",
|
|
144
|
+
className: e.copy,
|
|
145
|
+
onClick: () => void L(k.value.map((e) => e.text).join("\n")),
|
|
146
|
+
children: I.value ? D.copied : D.copy
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
}),
|
|
150
|
+
/* @__PURE__ */ f("div", {
|
|
151
|
+
ref: A,
|
|
152
|
+
className: e.scroll,
|
|
153
|
+
role: "log",
|
|
154
|
+
"aria-live": "polite",
|
|
155
|
+
"aria-label": D.label,
|
|
156
|
+
tabIndex: 0,
|
|
157
|
+
style: { maxBlockSize: C },
|
|
158
|
+
onScroll: B,
|
|
159
|
+
children: V.total === 0 ? /* @__PURE__ */ f("div", {
|
|
160
|
+
className: e.empty,
|
|
161
|
+
children: D.empty
|
|
162
|
+
}) : /* @__PURE__ */ f("div", {
|
|
163
|
+
className: e.sizer,
|
|
164
|
+
style: { blockSize: V.total * g },
|
|
165
|
+
children: V.rows.map((t, n) => /* @__PURE__ */ f(m, { children: /* @__PURE__ */ f("div", {
|
|
166
|
+
className: e.line,
|
|
167
|
+
"data-level": t.level,
|
|
168
|
+
style: {
|
|
169
|
+
insetBlockStart: (V.start + n) * g,
|
|
170
|
+
blockSize: g
|
|
171
|
+
},
|
|
172
|
+
children: v(t, x, H)
|
|
173
|
+
}) }, t.id))
|
|
174
|
+
})
|
|
175
|
+
}),
|
|
176
|
+
/* @__PURE__ */ f(t, {
|
|
177
|
+
"aria-live": "polite",
|
|
178
|
+
children: d(u.logViewer.lines, { count: V.total })
|
|
179
|
+
})
|
|
180
|
+
]
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
//#endregion
|
|
184
|
+
export { y as LogViewer };
|