@datum-cloud/datum-ui 0.2.0-alpha.3 → 0.2.0-alpha.4
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 +46 -21
- package/dist/alert/index.mjs +3 -0
- package/dist/alert-BC2Mccfo.mjs +95 -0
- package/dist/autocomplete/index.mjs +7 -0
- package/dist/autocomplete-DZtI97HP.mjs +295 -0
- package/dist/avatar-stack/index.mjs +5 -0
- package/dist/avatar-stack-JCfBlPB9.mjs +80 -0
- package/dist/badge/index.mjs +3 -0
- package/dist/badge-bFgeYceE.mjs +185 -0
- package/dist/breadcrumb/index.mjs +4 -0
- package/dist/breadcrumb-BGYJgom_.mjs +71 -0
- package/dist/button/index.mjs +4 -0
- package/dist/button-AzpnV-WB.mjs +49 -0
- package/dist/button-C1wRfGtT.mjs +230 -0
- package/dist/button-group/index.mjs +5 -0
- package/dist/button-group-C1IB2K5s.mjs +40 -0
- package/dist/calendar/index.mjs +5 -0
- package/dist/calendar-DlIHeWb0.mjs +113 -0
- package/dist/card/index.mjs +4 -0
- package/dist/card-3Kd0VdNf.mjs +63 -0
- package/dist/chart/index.mjs +4 -0
- package/dist/chart-BZqUKpkh.mjs +143 -0
- package/dist/checkbox/index.mjs +4 -0
- package/dist/checkbox-LG1OKTpG.mjs +34 -0
- package/dist/col-lrLMZaTJ.mjs +184 -0
- package/dist/collapsible/index.mjs +3 -0
- package/dist/collapsible-Bt9UYfv3.mjs +9 -0
- package/dist/command/index.mjs +5 -0
- package/dist/command-s0Yv3abE.mjs +86 -0
- package/dist/components/features/date-picker/index.d.ts +3 -0
- package/dist/components/features/date-picker/index.d.ts.map +1 -0
- package/dist/components/features/dropzone/index.d.ts +1 -0
- package/dist/components/features/dropzone/index.d.ts.map +1 -1
- package/dist/date-picker/index.mjs +9 -0
- package/dist/{datum.provider-D6VMjSV0.mjs → datum.provider-B77goJgl.mjs} +1 -1
- package/dist/dialog/index.mjs +5 -0
- package/dist/dialog-DXBaT9gA.mjs +86 -0
- package/dist/dialog-bnMMf9GD.mjs +73 -0
- package/dist/dropdown/index.mjs +3 -0
- package/dist/dropdown-DtSa_lqc.mjs +112 -0
- package/dist/dropzone/index.mjs +5 -0
- package/dist/dropzone-BkOnwrS4.mjs +221 -0
- package/dist/empty-content/index.mjs +3 -0
- package/dist/empty-content-BM9rzI13.mjs +196 -0
- package/dist/exports/map.d.ts +3 -0
- package/dist/exports/map.d.ts.map +1 -0
- package/dist/form/index.mjs +146 -0
- package/dist/grid/index.mjs +3 -0
- package/dist/hooks/index.mjs +2 -3
- package/dist/hover-card/index.mjs +4 -0
- package/dist/hover-card-CUPfFUqE.mjs +33 -0
- package/dist/icon-wrapper-9ticVbRL.mjs +14 -0
- package/dist/icons/index.mjs +3 -3
- package/dist/index.mjs +66 -8
- package/dist/input/index.mjs +5 -0
- package/dist/input-DuyjEKEW.mjs +17 -0
- package/dist/input-fzXBheCN.mjs +17 -0
- package/dist/input-group/index.mjs +7 -0
- package/dist/input-group-CPaFSTEV.mjs +80 -0
- package/dist/input-number/index.mjs +6 -0
- package/dist/input-number-9o62JHRl.mjs +106 -0
- package/dist/input-with-addons/index.mjs +3 -0
- package/dist/input-with-addons-BQn7KCTU.mjs +30 -0
- package/dist/label/index.mjs +4 -0
- package/dist/label-_ste_Re3.mjs +44 -0
- package/dist/link-button-TIF2Zdrk.mjs +36 -0
- package/dist/loader-overlay/index.mjs +3 -0
- package/dist/loader-overlay-DUaQSZQP.mjs +17 -0
- package/dist/map/index.mjs +13 -0
- package/dist/map-Df8QMcX0.mjs +1094 -0
- package/dist/more-actions/index.mjs +5 -0
- package/dist/more-actions-Ch1f6Mh3.mjs +54 -0
- package/dist/nprogress/index.mjs +32 -0
- package/dist/page-title/index.mjs +3 -0
- package/dist/page-title-BJuo81rT.mjs +26 -0
- package/dist/popover/index.mjs +4 -0
- package/dist/popover-SQlKSz6L.mjs +36 -0
- package/dist/provider/index.mjs +4 -0
- package/dist/radio-group/index.mjs +4 -0
- package/dist/radio-group-Oshv0b-U.mjs +49 -0
- package/dist/select/index.mjs +4 -0
- package/dist/select-DVlEzD2W.mjs +166 -0
- package/dist/separator/index.mjs +4 -0
- package/dist/separator-T2ppyD-8.mjs +18 -0
- package/dist/sheet/index.mjs +5 -0
- package/dist/sheet-BKiCwtNO.mjs +45 -0
- package/dist/sheet-CtnP6gTD.mjs +77 -0
- package/dist/sidebar/index.mjs +11 -0
- package/dist/sidebar-DfqezV8t.mjs +945 -0
- package/dist/skeleton/index.mjs +4 -0
- package/dist/skeleton-vzbxA-DQ.mjs +13 -0
- package/dist/spinner/index.mjs +4 -0
- package/dist/spinner-BE7k2bAD.mjs +16 -0
- package/dist/{icon-wrapper-BgPkifId.mjs → spinner.icon-Bg8zgGh0.mjs} +1 -12
- package/dist/stepper/index.mjs +5 -0
- package/dist/stepper-SWB-u_nM.mjs +323 -0
- package/dist/switch/index.mjs +4 -0
- package/dist/switch-Calk7Gyw.mjs +32 -0
- package/dist/table/index.mjs +4 -0
- package/dist/table-CsXBcQLI.mjs +68 -0
- package/dist/tabs/index.mjs +3 -0
- package/dist/tabs-D8n-dqnw.mjs +52 -0
- package/dist/tag-input/index.mjs +5 -0
- package/dist/tag-input-Di7SDNbK.mjs +284 -0
- package/dist/task-queue/index.mjs +7 -0
- package/dist/task-queue-dropdown-DW72ikDH.mjs +1356 -0
- package/dist/textarea/index.mjs +5 -0
- package/dist/textarea-CxE3YbC7.mjs +17 -0
- package/dist/textarea-QYRcDEpK.mjs +15 -0
- package/dist/theme/index.mjs +4 -0
- package/dist/theme-script-XBouzsNR.mjs +66 -0
- package/dist/to-api-format-C2xjQUcI.mjs +1506 -0
- package/dist/toast/index.mjs +3 -0
- package/dist/tooltip/index.mjs +4 -0
- package/dist/tooltip-Dd3ActSS.mjs +74 -0
- package/dist/typography/index.mjs +3 -0
- package/dist/typography-UA7ZZvgJ.mjs +200 -0
- package/dist/use-copy-to-clipboard-ki-WoTml.mjs +31 -0
- package/dist/use-stepper-BaToCYMs.mjs +2017 -0
- package/dist/{use-copy-to-clipboard-BfrpD6G8.mjs → use-toast-mdn_CqRY.mjs} +34 -27
- package/dist/utils/index.mjs +0 -1
- package/dist/utils-Bfgoe-Gm.mjs +20 -0
- package/dist/visually-hidden/index.mjs +3 -0
- package/dist/visuallyhidden-aaTUk4Yo.mjs +7 -0
- package/package.json +208 -8
- package/dist/components/index.mjs +0 -8
- package/dist/providers/index.mjs +0 -4
- package/dist/theme-script-DHyLk25i.mjs +0 -11128
- /package/dist/{close.icon-chkXPAUC.mjs → close.icon-CMNMoXM_.mjs} +0 -0
- /package/dist/{map-leaflet-imports-OKaoesjZ.mjs → map-leaflet-imports-CdzvEnzY.mjs} +0 -0
- /package/dist/{theme.provider-DpFLwtHe.mjs → theme.provider-DgGshapa.mjs} +0 -0
- /package/dist/{use-debounce-BYB-jPeX.mjs → use-debounce-DQ1tmxOL.mjs} +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { t as cn } from "./cn-DWCc1QRE.mjs";
|
|
2
|
+
import { t as Textarea$1 } from "./textarea-QYRcDEpK.mjs";
|
|
3
|
+
import "react";
|
|
4
|
+
import { jsx } from "react/jsx-runtime";
|
|
5
|
+
|
|
6
|
+
//#region src/components/base/textarea/textarea.tsx
|
|
7
|
+
function Textarea({ ref, className, ...props }) {
|
|
8
|
+
return /* @__PURE__ */ jsx(Textarea$1, {
|
|
9
|
+
ref,
|
|
10
|
+
className: cn("rounded-lg", "bg-input-background/50", "text-input-foreground", "border-input-border", "placeholder:text-input-placeholder", "focus-visible:ring-0 focus-visible:ring-offset-0", "focus-visible:border-input-focus-border", "focus-visible:shadow-(--input-focus-shadow)", "aria-invalid:border-destructive", className),
|
|
11
|
+
...props
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
Textarea.displayName = "Textarea";
|
|
15
|
+
|
|
16
|
+
//#endregion
|
|
17
|
+
export { Textarea as t };
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { t as cn } from "./utils-Bfgoe-Gm.mjs";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
|
|
5
|
+
//#region ../shadcn/ui/textarea.tsx
|
|
6
|
+
function Textarea({ className, ...props }) {
|
|
7
|
+
return /* @__PURE__ */ jsx("textarea", {
|
|
8
|
+
"data-slot": "textarea",
|
|
9
|
+
className: cn("border-input placeholder:text-muted-foreground", "dark:bg-input/30 flex field-sizing-content min-h-16 w-full rounded-md border bg-transparent", "px-3 py-2 text-base shadow-xs transition-[color,box-shadow] outline-none", "focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-hidden", "disabled:cursor-not-allowed disabled:opacity-50 md:text-sm", className),
|
|
10
|
+
...props
|
|
11
|
+
});
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
export { Textarea as t };
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import * as React$1 from "react";
|
|
2
|
+
import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
|
|
3
|
+
|
|
4
|
+
//#region src/components/themes/client-only.tsx
|
|
5
|
+
function ClientOnly({ children, fallback = null }) {
|
|
6
|
+
const [hasMounted, setHasMounted] = React$1.useState(false);
|
|
7
|
+
React$1.useEffect(() => {
|
|
8
|
+
setHasMounted(true);
|
|
9
|
+
}, []);
|
|
10
|
+
if (!hasMounted) return /* @__PURE__ */ jsx(Fragment$1, { children: fallback });
|
|
11
|
+
return /* @__PURE__ */ jsx(Fragment$1, { children });
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/components/themes/script.ts
|
|
16
|
+
function script(attribute, storageKey, defaultTheme, forcedTheme, themes, value, enableSystem, enableColorScheme) {
|
|
17
|
+
if (typeof window === "undefined") return;
|
|
18
|
+
const el = document.documentElement;
|
|
19
|
+
const systemThemes = ["light", "dark"];
|
|
20
|
+
function updateDOM(theme) {
|
|
21
|
+
(Array.isArray(attribute) ? attribute : [attribute]).forEach((attr) => {
|
|
22
|
+
const isClass = attr === "class";
|
|
23
|
+
const classes = isClass && value ? themes.map((t) => value[t] || t) : themes;
|
|
24
|
+
if (isClass) {
|
|
25
|
+
el.classList.remove(...classes);
|
|
26
|
+
el.classList.add(value && value[theme] ? value[theme] : theme);
|
|
27
|
+
} else el.setAttribute(attr, theme);
|
|
28
|
+
});
|
|
29
|
+
setColorScheme(theme);
|
|
30
|
+
}
|
|
31
|
+
function setColorScheme(theme) {
|
|
32
|
+
if (enableColorScheme && systemThemes.includes(theme)) el.style.colorScheme = theme;
|
|
33
|
+
}
|
|
34
|
+
function getSystemTheme() {
|
|
35
|
+
return window.matchMedia("(prefers-color-scheme: dark)").matches ? "dark" : "light";
|
|
36
|
+
}
|
|
37
|
+
if (forcedTheme) updateDOM(forcedTheme);
|
|
38
|
+
else try {
|
|
39
|
+
const themeName = localStorage.getItem(storageKey) || defaultTheme;
|
|
40
|
+
updateDOM(enableSystem && themeName === "system" ? getSystemTheme() : themeName);
|
|
41
|
+
} catch {}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
//#endregion
|
|
45
|
+
//#region src/components/themes/theme-script.tsx
|
|
46
|
+
const ThemeScript = React$1.memo(({ forcedTheme, storageKey = "theme", attribute = "data-theme", enableSystem = true, enableColorScheme = true, defaultTheme = "system", value, themes = ["light", "dark"], nonce, scriptProps }) => {
|
|
47
|
+
const scriptArgs = JSON.stringify([
|
|
48
|
+
attribute,
|
|
49
|
+
storageKey,
|
|
50
|
+
defaultTheme,
|
|
51
|
+
forcedTheme,
|
|
52
|
+
themes,
|
|
53
|
+
value,
|
|
54
|
+
enableSystem,
|
|
55
|
+
enableColorScheme
|
|
56
|
+
]).slice(1, -1);
|
|
57
|
+
return /* @__PURE__ */ jsx("script", {
|
|
58
|
+
...scriptProps,
|
|
59
|
+
suppressHydrationWarning: true,
|
|
60
|
+
nonce,
|
|
61
|
+
dangerouslySetInnerHTML: { __html: `(${script.toString()})(${scriptArgs})` }
|
|
62
|
+
});
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
//#endregion
|
|
66
|
+
export { ClientOnly as n, ThemeScript as t };
|