@datum-cloud/datum-ui 0.1.0 → 0.2.0-alpha.0

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.
Files changed (60) hide show
  1. package/dist/chunk-CtajNgzt.mjs +36 -0
  2. package/dist/close.icon-DgjsP0sw.mjs +23 -0
  3. package/dist/close.icon-DgjsP0sw.mjs.map +1 -0
  4. package/dist/components/index.d.mts +27 -0
  5. package/dist/components/index.d.mts.map +1 -0
  6. package/dist/components/index.mjs +252 -0
  7. package/dist/components/index.mjs.map +1 -0
  8. package/dist/datum.provider-CsG2KNNc.d.mts +30 -0
  9. package/dist/datum.provider-CsG2KNNc.d.mts.map +1 -0
  10. package/dist/datum.provider-D6VMjSV0.mjs +38 -0
  11. package/dist/datum.provider-D6VMjSV0.mjs.map +1 -0
  12. package/dist/fonts/AllianceNo1-Medium.ttf +0 -0
  13. package/dist/fonts/AllianceNo1-Regular.ttf +0 -0
  14. package/dist/fonts/AllianceNo1-SemiBold.ttf +0 -0
  15. package/dist/fonts/FTRegolaNeue-Medium.woff2 +0 -0
  16. package/dist/fonts/FTRegolaNeue-Regular.woff2 +0 -0
  17. package/dist/fonts/FTRegolaNeue-Semibold.woff2 +0 -0
  18. package/dist/hooks/index.d.mts +3 -0
  19. package/dist/hooks/index.mjs +5 -0
  20. package/dist/icon-wrapper-BTllM5Re.mjs +62 -0
  21. package/dist/icon-wrapper-BTllM5Re.mjs.map +1 -0
  22. package/dist/icons/index.d.mts +3 -0
  23. package/dist/icons/index.mjs +5 -0
  24. package/dist/index-DH2XEEjO.d.mts +3995 -0
  25. package/dist/index-DH2XEEjO.d.mts.map +1 -0
  26. package/dist/index.d.mts +29 -50
  27. package/dist/index.d.mts.map +1 -0
  28. package/dist/index.mjs +251 -3479
  29. package/dist/index.mjs.map +1 -0
  30. package/dist/providers/index.d.mts +3 -0
  31. package/dist/providers/index.mjs +4 -0
  32. package/dist/spinner.icon-q9zisVlw.d.mts +46 -0
  33. package/dist/spinner.icon-q9zisVlw.d.mts.map +1 -0
  34. package/dist/style.css +7096 -0
  35. package/dist/style.css.map +1 -0
  36. package/dist/theme-script-B_TkiYs4.mjs +8841 -0
  37. package/dist/theme-script-B_TkiYs4.mjs.map +1 -0
  38. package/dist/theme.provider-DpFLwtHe.mjs +135 -0
  39. package/dist/theme.provider-DpFLwtHe.mjs.map +1 -0
  40. package/dist/types-BoL47uxV.d.mts +34 -0
  41. package/dist/types-BoL47uxV.d.mts.map +1 -0
  42. package/dist/use-copy-to-clipboard-D5U8bWsn.mjs +117 -0
  43. package/dist/use-copy-to-clipboard-D5U8bWsn.mjs.map +1 -0
  44. package/dist/use-debounce-BYB-jPeX.mjs +25 -0
  45. package/dist/use-debounce-BYB-jPeX.mjs.map +1 -0
  46. package/dist/use-debounce-Dg9zNz9U.d.mts +19 -0
  47. package/dist/use-debounce-Dg9zNz9U.d.mts.map +1 -0
  48. package/dist/utils/index.d.mts +3 -0
  49. package/dist/utils/index.mjs +4 -0
  50. package/package.json +129 -50
  51. package/LICENSE +0 -21
  52. package/README.md +0 -42
  53. package/dist/index.d.ts +0 -52
  54. package/dist/index.js +0 -3529
  55. package/src/styles/custom.css +0 -27
  56. package/src/styles/fonts.css +0 -51
  57. package/src/styles/root.css +0 -28
  58. package/src/styles/themes/alpha.css +0 -421
  59. package/src/styles/tokens/brand-tokens.css +0 -57
  60. package/src/styles/tokens/figma-tokens.css +0 -624
@@ -0,0 +1,135 @@
1
+ import * as React$1 from "react";
2
+ import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
3
+
4
+ //#region src/components/themes/theme.provider.tsx
5
+ const colorSchemes = ["light", "dark"];
6
+ const MEDIA = "(prefers-color-scheme: dark)";
7
+ const isServer = typeof window === "undefined";
8
+ const ThemeContext = React$1.createContext(void 0);
9
+ const defaultContext = {
10
+ setTheme: (_) => {},
11
+ themes: []
12
+ };
13
+ function saveToLS(storageKey, value) {
14
+ try {
15
+ localStorage.setItem(storageKey, value);
16
+ } catch {}
17
+ }
18
+ const useTheme = () => React$1.use(ThemeContext) ?? defaultContext;
19
+ function ThemeProvider(props) {
20
+ if (React$1.use(ThemeContext)) return /* @__PURE__ */ jsx(Fragment$1, { children: props.children });
21
+ return /* @__PURE__ */ jsx(ThemeImpl, { ...props });
22
+ }
23
+ const defaultThemes = ["light", "dark"];
24
+ function ThemeImpl({ forcedTheme, disableTransitionOnChange = false, enableSystem = true, enableColorScheme = true, storageKey = "theme", themes = defaultThemes, defaultTheme = enableSystem ? "system" : "light", attribute = "data-theme", value, children, nonce, scriptProps: _scriptProps }) {
25
+ const [theme, setThemeState] = React$1.useState(() => isServer ? defaultTheme : getTheme(storageKey, defaultTheme));
26
+ const [resolvedTheme, setResolvedTheme] = React$1.useState(() => {
27
+ if (isServer) return defaultTheme === "dark" ? "dark" : "light";
28
+ return theme === "system" ? getSystemTheme() : theme;
29
+ });
30
+ const attrs = !value ? themes : Object.values(value);
31
+ const applyTheme = React$1.useCallback((theme) => {
32
+ let resolved = theme;
33
+ if (!resolved) return;
34
+ if (theme === "system" && enableSystem) resolved = getSystemTheme();
35
+ const name = value ? value[resolved] : resolved;
36
+ const enable = disableTransitionOnChange ? disableAnimation(nonce) : null;
37
+ const d = document.documentElement;
38
+ const handleAttribute = (attr) => {
39
+ if (attr === "class") {
40
+ d.classList.remove(...attrs.flatMap((a) => a.split(" ")));
41
+ if (name) d.classList.add(...name.split(" "));
42
+ } else if (attr.startsWith("data-")) if (name) d.setAttribute(attr, name);
43
+ else d.removeAttribute(attr);
44
+ };
45
+ if (Array.isArray(attribute)) attribute.forEach(handleAttribute);
46
+ else handleAttribute(attribute);
47
+ if (enableColorScheme) {
48
+ const fallback = colorSchemes.includes(defaultTheme) ? defaultTheme : null;
49
+ const colorScheme = colorSchemes.includes(resolved) ? resolved : fallback;
50
+ d.style.colorScheme = colorScheme;
51
+ }
52
+ enable?.();
53
+ }, [nonce]);
54
+ const setTheme = React$1.useCallback((value) => {
55
+ if (typeof value === "function") setThemeState((prevTheme) => {
56
+ const newTheme = value(prevTheme);
57
+ saveToLS(storageKey, newTheme);
58
+ return newTheme;
59
+ });
60
+ else {
61
+ setThemeState(value);
62
+ saveToLS(storageKey, value);
63
+ }
64
+ }, []);
65
+ const handleMediaQuery = React$1.useCallback((e) => {
66
+ setResolvedTheme(getSystemTheme(e));
67
+ if (theme === "system" && enableSystem && !forcedTheme) applyTheme("system");
68
+ }, [theme, forcedTheme]);
69
+ React$1.useEffect(() => {
70
+ if (typeof window === "undefined") return;
71
+ const media = window.matchMedia(MEDIA);
72
+ media.addListener(handleMediaQuery);
73
+ handleMediaQuery(media);
74
+ return () => media.removeListener(handleMediaQuery);
75
+ }, [handleMediaQuery]);
76
+ React$1.useEffect(() => {
77
+ if (typeof window === "undefined") return;
78
+ const handleStorage = (e) => {
79
+ if (e.key !== storageKey) return;
80
+ if (!e.newValue) setTheme(defaultTheme);
81
+ else setThemeState(e.newValue);
82
+ };
83
+ window.addEventListener("storage", handleStorage);
84
+ return () => window.removeEventListener("storage", handleStorage);
85
+ }, [setTheme]);
86
+ React$1.useEffect(() => {
87
+ if (typeof window !== "undefined") applyTheme(forcedTheme ?? theme);
88
+ }, [forcedTheme, theme]);
89
+ return /* @__PURE__ */ jsx(ThemeContext, {
90
+ value: React$1.useMemo(() => ({
91
+ theme,
92
+ setTheme,
93
+ forcedTheme,
94
+ resolvedTheme: theme === "system" ? resolvedTheme : theme,
95
+ themes: enableSystem ? [...themes, "system"] : themes,
96
+ systemTheme: enableSystem ? resolvedTheme : void 0
97
+ }), [
98
+ theme,
99
+ setTheme,
100
+ forcedTheme,
101
+ resolvedTheme,
102
+ enableSystem,
103
+ themes
104
+ ]),
105
+ children
106
+ });
107
+ }
108
+ function getTheme(key, fallback) {
109
+ if (isServer) return void 0;
110
+ let theme;
111
+ try {
112
+ theme = localStorage.getItem(key) || void 0;
113
+ } catch {}
114
+ return theme || fallback;
115
+ }
116
+ function disableAnimation(nonce) {
117
+ const css = document.createElement("style");
118
+ if (nonce) css.setAttribute("nonce", nonce);
119
+ css.appendChild(document.createTextNode(`*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`));
120
+ document.head.appendChild(css);
121
+ return () => {
122
+ window.getComputedStyle(document.body);
123
+ setTimeout(() => {
124
+ document.head.removeChild(css);
125
+ }, 1);
126
+ };
127
+ }
128
+ function getSystemTheme(e) {
129
+ if (!e) e = window.matchMedia(MEDIA);
130
+ return e.matches ? "dark" : "light";
131
+ }
132
+
133
+ //#endregion
134
+ export { useTheme as n, ThemeProvider as t };
135
+ //# sourceMappingURL=theme.provider-DpFLwtHe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.provider-DpFLwtHe.mjs","names":["React"],"sources":["../src/components/themes/theme.provider.tsx"],"sourcesContent":["'use client'\n\nimport type { Attribute, Theme, ThemeProviderProps, UseThemeProps } from './types'\nimport * as React from 'react'\n\nconst colorSchemes = ['light', 'dark']\nconst MEDIA = '(prefers-color-scheme: dark)'\nconst isServer = typeof window === 'undefined'\nconst ThemeContext = React.createContext<UseThemeProps | undefined>(undefined)\nconst defaultContext: UseThemeProps = {\n setTheme: (_: Theme | ((theme: Theme) => Theme)) => {},\n themes: [],\n}\n\nfunction saveToLS(storageKey: string, value: string) {\n // Save to storage\n try {\n localStorage.setItem(storageKey, value)\n }\n catch {\n // Unsupported\n }\n}\n\nexport const useTheme = () => React.use(ThemeContext) ?? defaultContext\n\nexport function ThemeProvider(props: ThemeProviderProps) {\n const context = React.use(ThemeContext)\n\n // Ignore nested context providers, just passthrough children\n if (context)\n return <>{props.children}</>\n return <ThemeImpl {...props} />\n}\n\nconst defaultThemes = ['light', 'dark']\n\nfunction ThemeImpl({\n forcedTheme,\n disableTransitionOnChange = false,\n enableSystem = true,\n enableColorScheme = true,\n storageKey = 'theme',\n themes = defaultThemes,\n defaultTheme = enableSystem ? 'system' : 'light',\n attribute = 'data-theme',\n value,\n children,\n nonce,\n scriptProps: _scriptProps,\n}: ThemeProviderProps) {\n const [theme, setThemeState] = React.useState<Theme>(\n () => (isServer ? defaultTheme : getTheme(storageKey, defaultTheme)) as Theme,\n )\n const [resolvedTheme, setResolvedTheme] = React.useState<'light' | 'dark'>(() => {\n if (isServer)\n return defaultTheme === 'dark' ? 'dark' : 'light'\n return (theme === 'system' ? getSystemTheme() : theme) as 'light' | 'dark'\n })\n const attrs = !value ? themes : Object.values(value)\n\n const applyTheme = React.useCallback(\n (theme: string) => {\n let resolved = theme\n if (!resolved)\n return\n\n // If theme is system, resolve it before setting theme\n if (theme === 'system' && enableSystem) {\n resolved = getSystemTheme()\n }\n\n const name = value ? value[resolved] : resolved\n const enable = disableTransitionOnChange ? disableAnimation(nonce) : null\n const d = document.documentElement\n\n const handleAttribute = (attr: Attribute) => {\n if (attr === 'class') {\n d.classList.remove(...attrs.flatMap(a => a.split(' ')))\n if (name)\n d.classList.add(...name.split(' '))\n }\n else if (attr.startsWith('data-')) {\n if (name) {\n d.setAttribute(attr, name)\n }\n else {\n d.removeAttribute(attr)\n }\n }\n }\n\n if (Array.isArray(attribute))\n attribute.forEach(handleAttribute)\n else handleAttribute(attribute)\n\n if (enableColorScheme) {\n const fallback = colorSchemes.includes(defaultTheme) ? defaultTheme : null\n const colorScheme = colorSchemes.includes(resolved) ? resolved : fallback\n // @ts-expect-error -- colorScheme may be null but style.colorScheme accepts it\n d.style.colorScheme = colorScheme\n }\n\n enable?.()\n },\n [nonce],\n )\n\n const setTheme = React.useCallback((value: Theme | ((theme: Theme) => Theme)) => {\n if (typeof value === 'function') {\n setThemeState((prevTheme) => {\n const newTheme = value(prevTheme)\n saveToLS(storageKey, newTheme)\n return newTheme\n })\n }\n else {\n setThemeState(value)\n saveToLS(storageKey, value)\n }\n }, [])\n\n const handleMediaQuery = React.useCallback(\n (e: MediaQueryListEvent | MediaQueryList) => {\n const resolved = getSystemTheme(e)\n setResolvedTheme(resolved)\n\n if (theme === 'system' && enableSystem && !forcedTheme) {\n applyTheme('system')\n }\n },\n [theme, forcedTheme],\n )\n\n // Always listen to System preference\n React.useEffect(() => {\n if (typeof window === 'undefined')\n return\n\n const media = window.matchMedia(MEDIA)\n\n // Intentionally use deprecated listener methods to support iOS & old browsers\n media.addListener(handleMediaQuery)\n handleMediaQuery(media)\n\n return () => media.removeListener(handleMediaQuery)\n }, [handleMediaQuery])\n\n // localStorage event handling\n React.useEffect(() => {\n if (typeof window === 'undefined')\n return\n\n const handleStorage = (e: StorageEvent) => {\n if (e.key !== storageKey) {\n return\n }\n\n // If default theme set, use it if localstorage === null (happens on local storage manual deletion)\n if (!e.newValue) {\n setTheme(defaultTheme)\n }\n else {\n setThemeState(e.newValue as Theme) // Direct state update to avoid loops\n }\n }\n\n window.addEventListener('storage', handleStorage)\n return () => window.removeEventListener('storage', handleStorage)\n }, [setTheme])\n\n // Whenever theme or forcedTheme changes, apply it\n React.useEffect(() => {\n if (typeof window !== 'undefined') {\n applyTheme(forcedTheme ?? theme)\n }\n }, [forcedTheme, theme])\n\n const providerValue = React.useMemo(\n () => ({\n theme,\n setTheme,\n forcedTheme,\n resolvedTheme: (theme === 'system' ? resolvedTheme : theme) as Theme,\n themes: enableSystem ? [...themes, 'system'] : themes,\n systemTheme: (enableSystem ? resolvedTheme : undefined) as 'light' | 'dark' | undefined,\n }),\n [theme, setTheme, forcedTheme, resolvedTheme, enableSystem, themes],\n )\n\n return <ThemeContext value={providerValue}>{children}</ThemeContext>\n}\n\n// Helpers\nfunction getTheme(key: string, fallback?: string): string | undefined {\n if (isServer)\n return undefined\n let theme\n try {\n theme = localStorage.getItem(key) || undefined\n }\n catch {\n // Unsupported\n }\n return theme || fallback\n}\n\nfunction disableAnimation(nonce?: string) {\n const css = document.createElement('style')\n if (nonce)\n css.setAttribute('nonce', nonce)\n css.appendChild(\n document.createTextNode(\n `*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}`,\n ),\n )\n document.head.appendChild(css)\n\n return () => {\n // Force restyle\n (() => window.getComputedStyle(document.body))()\n\n // Wait for next tick before removing\n setTimeout(() => {\n document.head.removeChild(css)\n }, 1)\n }\n}\n\nfunction getSystemTheme(e?: MediaQueryList | MediaQueryListEvent) {\n if (!e)\n e = window.matchMedia(MEDIA)\n const isDark = e.matches\n const systemTheme = isDark ? 'dark' : 'light'\n return systemTheme\n}\n"],"mappings":"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"}
@@ -0,0 +1,34 @@
1
+ import { ReactNode } from "react";
2
+
3
+ //#region src/components/themes/types.d.ts
4
+ type Theme = 'light' | 'dark' | 'system';
5
+ type ThemeStyle = 'alpha' | 'default' | 'experimental';
6
+ type Attribute = 'class' | `data-${string}`;
7
+ interface ThemeProviderProps {
8
+ children: ReactNode;
9
+ defaultTheme?: Theme;
10
+ storageKey?: string;
11
+ themes?: string[];
12
+ forcedTheme?: Theme;
13
+ enableSystem?: boolean;
14
+ disableTransitionOnChange?: boolean;
15
+ enableColorScheme?: boolean;
16
+ attribute?: Attribute | Attribute[];
17
+ value?: Record<string, string>;
18
+ nonce?: string;
19
+ scriptProps?: {
20
+ [key: string]: any;
21
+ };
22
+ }
23
+ interface UseThemeProps {
24
+ theme?: Theme;
25
+ setTheme: (theme: Theme | ((theme: Theme) => Theme)) => void;
26
+ forcedTheme?: Theme;
27
+ resolvedTheme?: Theme;
28
+ themes: string[];
29
+ systemTheme?: 'light' | 'dark';
30
+ themeStyle?: ThemeStyle;
31
+ }
32
+ //#endregion
33
+ export { UseThemeProps as i, ThemeProviderProps as n, ThemeStyle as r, Theme as t };
34
+ //# sourceMappingURL=types-BoL47uxV.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types-BoL47uxV.d.mts","names":[],"sources":["../src/components/themes/types.ts"],"mappings":";;;KAEY,KAAA;AAAA,KAEA,UAAA;AAAA,KAEA,SAAA;AAAA,UAEK,kBAAA;EACf,QAAA,EAAU,SAAA;EACV,YAAA,GAAe,KAAA;EACf,UAAA;EACA,MAAA;EACA,WAAA,GAAc,KAAA;EACd,YAAA;EACA,yBAAA;EACA,iBAAA;EACA,SAAA,GAAY,SAAA,GAAY,SAAA;EACxB,KAAA,GAAQ,MAAA;EACR,KAAA;EACA,WAAA;IAAA,CACG,GAAA;EAAA;AAAA;AAAA,UAIY,aAAA;EACf,KAAA,GAAQ,KAAA;EACR,QAAA,GAAW,KAAA,EAAO,KAAA,KAAU,KAAA,EAAO,KAAA,KAAU,KAAA;EAC7C,WAAA,GAAc,KAAA;EACd,aAAA,GAAgB,KAAA;EAChB,MAAA;EACA,WAAA;EACA,UAAA,GAAa,UAAA;AAAA"}
@@ -0,0 +1,117 @@
1
+ import { t as CloseIcon } from "./close.icon-DgjsP0sw.mjs";
2
+ import { cn } from "@repo/shadcn/lib/utils";
3
+ import { createElement, useCallback, useEffect, useRef, useState } from "react";
4
+ import { jsx, jsxs } from "react/jsx-runtime";
5
+ import { toast } from "sonner";
6
+
7
+ //#region src/components/features/toast/headless-toast.tsx
8
+ const variantAccentClass = {
9
+ message: "bg-toast-success-background text-toast-success-foreground",
10
+ info: "bg-toast-success-background text-toast-success-foreground",
11
+ success: "bg-toast-success-background text-toast-success-foreground",
12
+ warning: "bg-toast-error-background text-toast-error-foreground",
13
+ error: "bg-toast-error-background text-toast-error-foreground"
14
+ };
15
+ const variantIconClass = {
16
+ message: "fill-toast-success-icon",
17
+ info: "fill-toast-success-icon",
18
+ success: "fill-toast-success-icon",
19
+ warning: "fill-toast-error-icon",
20
+ error: "fill-toast-error-icon"
21
+ };
22
+ function HeadlessToast({ variant, title, description, onDismiss }) {
23
+ return /* @__PURE__ */ jsx("div", {
24
+ className: cn("bg-background text-foreground pointer-events-auto w-90 max-w-[calc(100vw-2rem)] overflow-hidden rounded-[10px]", "grid grid-cols-[1fr_auto] px-5 py-4 text-xs", variantAccentClass[variant]),
25
+ children: /* @__PURE__ */ jsxs("div", {
26
+ className: "relative flex w-full flex-col gap-1",
27
+ children: [
28
+ /* @__PURE__ */ jsx("div", {
29
+ className: "font-semibold",
30
+ children: title
31
+ }),
32
+ description ? /* @__PURE__ */ jsx("div", { children: description }) : null,
33
+ /* @__PURE__ */ jsx("button", {
34
+ type: "button",
35
+ onClick: onDismiss,
36
+ "aria-label": "Dismiss notification",
37
+ className: "absolute -top-1.5 -right-2.5 transition-opacity hover:opacity-90",
38
+ children: /* @__PURE__ */ jsx(CloseIcon, {
39
+ className: "size-4.5",
40
+ fill: variantIconClass[variant]
41
+ })
42
+ })
43
+ ]
44
+ })
45
+ });
46
+ }
47
+
48
+ //#endregion
49
+ //#region src/components/features/toast/toast.ts
50
+ const defaultOptions = {
51
+ message: { duration: 5e3 },
52
+ success: { duration: 5e3 },
53
+ error: { duration: Infinity },
54
+ info: { duration: 5e3 },
55
+ warning: { duration: 5e3 }
56
+ };
57
+ function show(variant, title, options) {
58
+ const { description, action: _action, cancel: _cancel, ...sonnerOptions } = {
59
+ ...defaultOptions[variant],
60
+ ...options
61
+ };
62
+ const resolvedDescription = typeof description === "function" ? description() : description;
63
+ return toast.custom((t) => createElement(HeadlessToast, {
64
+ variant,
65
+ title,
66
+ description: resolvedDescription,
67
+ onDismiss: () => toast.dismiss(t)
68
+ }), sonnerOptions);
69
+ }
70
+ const toast$1 = {
71
+ message: (title, options) => {
72
+ return show("message", title, options);
73
+ },
74
+ success: (title, options) => {
75
+ return show("success", title, options);
76
+ },
77
+ error: (title, options) => {
78
+ return show("error", title, options);
79
+ },
80
+ info: (title, options) => {
81
+ return show("info", title, options);
82
+ },
83
+ warning: (title, options) => {
84
+ return show("warning", title, options);
85
+ }
86
+ };
87
+
88
+ //#endregion
89
+ //#region src/hooks/use-copy-to-clipboard.ts
90
+ function useCopyToClipboard() {
91
+ const [isCopied, setIsCopied] = useState(false);
92
+ const timeoutRef = useRef(null);
93
+ useEffect(() => {
94
+ return () => {
95
+ if (timeoutRef.current) clearTimeout(timeoutRef.current);
96
+ };
97
+ }, []);
98
+ return [isCopied, useCallback(async (text, options) => {
99
+ if (!navigator?.clipboard) return false;
100
+ try {
101
+ await navigator.clipboard.writeText(text);
102
+ setIsCopied(true);
103
+ if (options?.withToast) toast$1.success(options.toastMessage ?? "Copied to clipboard");
104
+ timeoutRef.current = setTimeout(() => {
105
+ setIsCopied(false);
106
+ }, 2e3);
107
+ return true;
108
+ } catch {
109
+ setIsCopied(false);
110
+ return false;
111
+ }
112
+ }, [])];
113
+ }
114
+
115
+ //#endregion
116
+ export { toast$1 as n, useCopyToClipboard as t };
117
+ //# sourceMappingURL=use-copy-to-clipboard-D5U8bWsn.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-copy-to-clipboard-D5U8bWsn.mjs","names":["sonnerToast","toast"],"sources":["../src/components/features/toast/headless-toast.tsx","../src/components/features/toast/toast.ts","../src/hooks/use-copy-to-clipboard.ts"],"sourcesContent":["import { cn } from '@repo/shadcn/lib/utils'\nimport * as React from 'react'\nimport { CloseIcon } from '../../icons/close.icon'\n\nexport type HeadlessToastVariant = 'message' | 'success' | 'error' | 'info' | 'warning'\n\nexport interface HeadlessToastProps {\n variant: HeadlessToastVariant\n title: string\n description?: React.ReactNode\n onDismiss: () => void\n}\n\nconst variantAccentClass: Record<HeadlessToastVariant, string> = {\n message: 'bg-toast-success-background text-toast-success-foreground',\n info: 'bg-toast-success-background text-toast-success-foreground',\n success: 'bg-toast-success-background text-toast-success-foreground',\n warning: 'bg-toast-error-background text-toast-error-foreground',\n error: 'bg-toast-error-background text-toast-error-foreground',\n}\n\nconst variantIconClass: Record<HeadlessToastVariant, string> = {\n message: 'fill-toast-success-icon',\n info: 'fill-toast-success-icon',\n success: 'fill-toast-success-icon',\n warning: 'fill-toast-error-icon',\n error: 'fill-toast-error-icon',\n}\n\nexport function HeadlessToast({ variant, title, description, onDismiss }: HeadlessToastProps) {\n return (\n <div\n className={cn(\n 'bg-background text-foreground pointer-events-auto w-90 max-w-[calc(100vw-2rem)] overflow-hidden rounded-[10px]',\n 'grid grid-cols-[1fr_auto] px-5 py-4 text-xs',\n variantAccentClass[variant],\n )}\n >\n <div className=\"relative flex w-full flex-col gap-1\">\n <div className=\"font-semibold\">{title}</div>\n {description ? <div>{description}</div> : null}\n\n <button\n type=\"button\"\n onClick={onDismiss}\n aria-label=\"Dismiss notification\"\n className=\"absolute -top-1.5 -right-2.5 transition-opacity hover:opacity-90\"\n >\n <CloseIcon className=\"size-4.5\" fill={variantIconClass[variant]} />\n </button>\n </div>\n </div>\n )\n}\n","import type { ExternalToast } from 'sonner'\nimport type { HeadlessToastVariant } from './headless-toast'\nimport { createElement } from 'react'\nimport { toast as sonnerToast } from 'sonner'\nimport { HeadlessToast } from './headless-toast'\n\nconst defaultOptions = {\n message: { duration: 5000 },\n success: { duration: 5000 },\n error: { duration: Infinity },\n info: { duration: 5000 },\n warning: { duration: 5000 },\n}\n\nfunction show(variant: HeadlessToastVariant, title: string, options?: ExternalToast) {\n const merged = { ...defaultOptions[variant], ...options }\n const {\n description,\n action: _action,\n cancel: _cancel,\n ...sonnerOptions\n } = merged as ExternalToast\n const resolvedDescription = typeof description === 'function' ? description() : description\n\n return sonnerToast.custom(\n (t: string | number) =>\n createElement(HeadlessToast, {\n variant,\n title,\n description: resolvedDescription,\n onDismiss: () => sonnerToast.dismiss(t),\n }),\n sonnerOptions,\n )\n}\n\nexport const toast = {\n message: (title: string, options?: ExternalToast) => {\n return show('message', title, options)\n },\n success: (title: string, options?: ExternalToast) => {\n return show('success', title, options)\n },\n error: (title: string, options?: ExternalToast) => {\n return show('error', title, options)\n },\n info: (title: string, options?: ExternalToast) => {\n return show('info', title, options)\n },\n warning: (title: string, options?: ExternalToast) => {\n return show('warning', title, options)\n },\n}\n","import { useCallback, useEffect, useRef, useState } from 'react'\nimport { toast } from '../components/features/toast'\n\ninterface CopyOptions {\n withToast?: boolean\n toastMessage?: string\n}\n\ntype CopyFn = (text: string, options?: CopyOptions) => Promise<boolean>\n\nexport function useCopyToClipboard(): [boolean, CopyFn] {\n const [isCopied, setIsCopied] = useState(false)\n const timeoutRef = useRef<NodeJS.Timeout | null>(null)\n\n useEffect(() => {\n return () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current)\n }\n }\n }, [])\n\n const copy: CopyFn = useCallback(async (text, options) => {\n if (!navigator?.clipboard) {\n return false\n }\n\n try {\n await navigator.clipboard.writeText(text)\n setIsCopied(true)\n\n if (options?.withToast) {\n toast.success(options.toastMessage ?? 'Copied to clipboard')\n }\n\n timeoutRef.current = setTimeout(() => {\n setIsCopied(false)\n }, 2000)\n\n return true\n }\n catch {\n setIsCopied(false)\n return false\n }\n }, [])\n\n return [isCopied, copy]\n}\n"],"mappings":";;;;;;;AAaA,MAAM,qBAA2D;CAC/D,SAAS;CACT,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACR;AAED,MAAM,mBAAyD;CAC7D,SAAS;CACT,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACR;AAED,SAAgB,cAAc,EAAE,SAAS,OAAO,aAAa,aAAiC;AAC5F,QACE,oBAAC;EACC,WAAW,GACT,kHACA,+CACA,mBAAmB,SACpB;YAED,qBAAC;GAAI,WAAU;;IACb,oBAAC;KAAI,WAAU;eAAiB;MAAY;IAC3C,cAAc,oBAAC,mBAAK,cAAkB,GAAG;IAE1C,oBAAC;KACC,MAAK;KACL,SAAS;KACT,cAAW;KACX,WAAU;eAEV,oBAAC;MAAU,WAAU;MAAW,MAAM,iBAAiB;OAAY;MAC5D;;IACL;GACF;;;;;AC7CV,MAAM,iBAAiB;CACrB,SAAS,EAAE,UAAU,KAAM;CAC3B,SAAS,EAAE,UAAU,KAAM;CAC3B,OAAO,EAAE,UAAU,UAAU;CAC7B,MAAM,EAAE,UAAU,KAAM;CACxB,SAAS,EAAE,UAAU,KAAM;CAC5B;AAED,SAAS,KAAK,SAA+B,OAAe,SAAyB;CAEnF,MAAM,EACJ,aACA,QAAQ,SACR,QAAQ,SACR,GAAG,kBALU;EAAE,GAAG,eAAe;EAAU,GAAG;EAAS;CAOzD,MAAM,sBAAsB,OAAO,gBAAgB,aAAa,aAAa,GAAG;AAEhF,QAAOA,MAAY,QAChB,MACC,cAAc,eAAe;EAC3B;EACA;EACA,aAAa;EACb,iBAAiBA,MAAY,QAAQ,EAAE;EACxC,CAAC,EACJ,cACD;;AAGH,MAAaC,UAAQ;CACnB,UAAU,OAAe,YAA4B;AACnD,SAAO,KAAK,WAAW,OAAO,QAAQ;;CAExC,UAAU,OAAe,YAA4B;AACnD,SAAO,KAAK,WAAW,OAAO,QAAQ;;CAExC,QAAQ,OAAe,YAA4B;AACjD,SAAO,KAAK,SAAS,OAAO,QAAQ;;CAEtC,OAAO,OAAe,YAA4B;AAChD,SAAO,KAAK,QAAQ,OAAO,QAAQ;;CAErC,UAAU,OAAe,YAA4B;AACnD,SAAO,KAAK,WAAW,OAAO,QAAQ;;CAEzC;;;;AC1CD,SAAgB,qBAAwC;CACtD,MAAM,CAAC,UAAU,eAAe,SAAS,MAAM;CAC/C,MAAM,aAAa,OAA8B,KAAK;AAEtD,iBAAgB;AACd,eAAa;AACX,OAAI,WAAW,QACb,cAAa,WAAW,QAAQ;;IAGnC,EAAE,CAAC;AA2BN,QAAO,CAAC,UAzBa,YAAY,OAAO,MAAM,YAAY;AACxD,MAAI,CAAC,WAAW,UACd,QAAO;AAGT,MAAI;AACF,SAAM,UAAU,UAAU,UAAU,KAAK;AACzC,eAAY,KAAK;AAEjB,OAAI,SAAS,UACX,SAAM,QAAQ,QAAQ,gBAAgB,sBAAsB;AAG9D,cAAW,UAAU,iBAAiB;AACpC,gBAAY,MAAM;MACjB,IAAK;AAER,UAAO;UAEH;AACJ,eAAY,MAAM;AAClB,UAAO;;IAER,EAAE,CAAC,CAEiB"}
@@ -0,0 +1,25 @@
1
+ import { useEffect, useState } from "react";
2
+
3
+ //#region src/hooks/use-debounce.ts
4
+ /**
5
+ * Custom hook that debounces a value
6
+ * @param value - The value to debounce
7
+ * @param delay - The delay in milliseconds
8
+ * @returns The debounced value
9
+ */
10
+ function useDebounce(value, delay) {
11
+ const [debouncedValue, setDebouncedValue] = useState(value);
12
+ useEffect(() => {
13
+ const handler = setTimeout(() => {
14
+ setDebouncedValue(value);
15
+ }, delay);
16
+ return () => {
17
+ clearTimeout(handler);
18
+ };
19
+ }, [value, delay]);
20
+ return debouncedValue;
21
+ }
22
+
23
+ //#endregion
24
+ export { useDebounce as t };
25
+ //# sourceMappingURL=use-debounce-BYB-jPeX.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debounce-BYB-jPeX.mjs","names":[],"sources":["../src/hooks/use-debounce.ts"],"sourcesContent":["import { useEffect, useState } from 'react'\n\n/**\n * Custom hook that debounces a value\n * @param value - The value to debounce\n * @param delay - The delay in milliseconds\n * @returns The debounced value\n */\nexport function useDebounce<T>(value: T, delay: number): T {\n const [debouncedValue, setDebouncedValue] = useState<T>(value)\n\n useEffect(() => {\n const handler = setTimeout(() => {\n setDebouncedValue(value)\n }, delay)\n\n return () => {\n clearTimeout(handler)\n }\n }, [value, delay])\n\n return debouncedValue\n}\n"],"mappings":";;;;;;;;;AAQA,SAAgB,YAAe,OAAU,OAAkB;CACzD,MAAM,CAAC,gBAAgB,qBAAqB,SAAY,MAAM;AAE9D,iBAAgB;EACd,MAAM,UAAU,iBAAiB;AAC/B,qBAAkB,MAAM;KACvB,MAAM;AAET,eAAa;AACX,gBAAa,QAAQ;;IAEtB,CAAC,OAAO,MAAM,CAAC;AAElB,QAAO"}
@@ -0,0 +1,19 @@
1
+ //#region src/hooks/use-copy-to-clipboard.d.ts
2
+ interface CopyOptions {
3
+ withToast?: boolean;
4
+ toastMessage?: string;
5
+ }
6
+ type CopyFn = (text: string, options?: CopyOptions) => Promise<boolean>;
7
+ declare function useCopyToClipboard(): [boolean, CopyFn];
8
+ //#endregion
9
+ //#region src/hooks/use-debounce.d.ts
10
+ /**
11
+ * Custom hook that debounces a value
12
+ * @param value - The value to debounce
13
+ * @param delay - The delay in milliseconds
14
+ * @returns The debounced value
15
+ */
16
+ declare function useDebounce<T>(value: T, delay: number): T;
17
+ //#endregion
18
+ export { useCopyToClipboard as n, useDebounce as t };
19
+ //# sourceMappingURL=use-debounce-Dg9zNz9U.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use-debounce-Dg9zNz9U.d.mts","names":[],"sources":["../src/hooks/use-copy-to-clipboard.ts","../src/hooks/use-debounce.ts"],"mappings":";UAGU,WAAA;EACR,SAAA;EACA,YAAA;AAAA;AAAA,KAGG,MAAA,IAAU,IAAA,UAAc,OAAA,GAAU,WAAA,KAAgB,OAAA;AAAA,iBAEvC,kBAAA,CAAA,aAAgC,MAAA;;;;;;;;;iBCFhC,WAAA,GAAA,CAAe,KAAA,EAAO,CAAA,EAAG,KAAA,WAAgB,CAAA"}
@@ -0,0 +1,3 @@
1
+ import '../style.css';
2
+ import { cn } from "@repo/shadcn/lib/utils";
3
+ export { cn };
@@ -0,0 +1,4 @@
1
+ import '../style.css';
2
+ import { cn } from "@repo/shadcn/lib/utils";
3
+
4
+ export { cn };
package/package.json CHANGED
@@ -1,80 +1,159 @@
1
1
  {
2
2
  "name": "@datum-cloud/datum-ui",
3
- "version": "0.1.0",
3
+ "type": "module",
4
+ "version": "0.2.0-alpha.0",
5
+ "license": "MIT",
6
+ "repository": {
7
+ "url": "https://github.com/datum-cloud/datum-ui"
8
+ },
4
9
  "sideEffects": [
5
10
  "**/*.css"
6
11
  ],
7
- "license": "MIT",
8
- "main": "./dist/index.js",
9
- "module": "./dist/index.mjs",
10
- "types": "./dist/index.d.ts",
11
12
  "exports": {
12
13
  ".": {
13
- "types": "./dist/index.d.ts",
14
- "import": "./dist/index.mjs",
15
- "require": "./dist/index.js"
14
+ "types": "./dist/index.d.mts",
15
+ "default": "./dist/index.mjs"
16
16
  },
17
- "./styles": {
18
- "default": "./src/styles/root.css"
17
+ "./components": {
18
+ "types": "./dist/components/index.d.mts",
19
+ "default": "./dist/components/index.mjs"
19
20
  },
20
- "./styles/*": {
21
- "default": "./src/styles/*"
21
+ "./providers": {
22
+ "types": "./dist/providers/index.d.mts",
23
+ "default": "./dist/providers/index.mjs"
22
24
  },
23
- "./styles/*/*": {
24
- "default": "./src/styles/*/*"
25
- }
25
+ "./hooks": {
26
+ "types": "./dist/hooks/index.d.mts",
27
+ "default": "./dist/hooks/index.mjs"
28
+ },
29
+ "./icons": {
30
+ "types": "./dist/icons/index.d.mts",
31
+ "default": "./dist/icons/index.mjs"
32
+ },
33
+ "./utils": {
34
+ "types": "./dist/utils/index.d.mts",
35
+ "default": "./dist/utils/index.mjs"
36
+ },
37
+ "./styles": "./dist/style.css"
26
38
  },
39
+ "main": "./dist/index.mjs",
40
+ "module": "./dist/index.mjs",
41
+ "types": "./dist/index.d.mts",
27
42
  "files": [
28
- "dist",
29
- "src/styles",
43
+ "LICENSE",
30
44
  "README.md",
31
- "LICENSE"
45
+ "dist"
32
46
  ],
33
- "devDependencies": {
34
- "@types/react": "^19.2.3",
35
- "@types/react-dom": "^19.2.3",
36
- "eslint": "^8.57.0",
37
- "prettier": "^3.8.1",
38
- "prettier-plugin-organize-imports": "^4.3.0",
39
- "prettier-plugin-tailwindcss": "^0.7.2",
40
- "@types/nprogress": "^0.2.3",
41
- "react": "^19.2.3",
42
- "tsup": "^8.5.1",
43
- "typescript": "5.9.3",
44
- "@repo/eslint-config": "0.0.0",
45
- "@repo/typescript-config": "0.0.0",
46
- "@repo/shadcn": "0.0.0",
47
- "@repo/tailwind-config": "0.0.0"
47
+ "peerDependencies": {
48
+ "@conform-to/react": ">=1",
49
+ "@conform-to/zod": ">=1",
50
+ "@stepperize/react": ">=4",
51
+ "@tanstack/react-virtual": ">=3",
52
+ "date-fns": ">=4",
53
+ "date-fns-tz": ">=3",
54
+ "motion": ">=11",
55
+ "nprogress": ">=0.2",
56
+ "react": ">=19",
57
+ "react-day-picker": ">=9",
58
+ "react-dom": ">=19",
59
+ "react-dropzone": ">=14",
60
+ "react-number-format": ">=5",
61
+ "zod": ">=3"
62
+ },
63
+ "peerDependenciesMeta": {
64
+ "@conform-to/react": {
65
+ "optional": true
66
+ },
67
+ "@conform-to/zod": {
68
+ "optional": true
69
+ },
70
+ "@stepperize/react": {
71
+ "optional": true
72
+ },
73
+ "@tanstack/react-virtual": {
74
+ "optional": true
75
+ },
76
+ "date-fns": {
77
+ "optional": true
78
+ },
79
+ "date-fns-tz": {
80
+ "optional": true
81
+ },
82
+ "motion": {
83
+ "optional": true
84
+ },
85
+ "nprogress": {
86
+ "optional": true
87
+ },
88
+ "react-day-picker": {
89
+ "optional": true
90
+ },
91
+ "react-dropzone": {
92
+ "optional": true
93
+ },
94
+ "react-number-format": {
95
+ "optional": true
96
+ },
97
+ "zod": {
98
+ "optional": true
99
+ }
48
100
  },
49
101
  "dependencies": {
102
+ "class-variance-authority": "^0.7",
103
+ "lucide-react": "^0.556",
104
+ "tailwind-scrollbar-hide": "^4.0.0",
105
+ "tw-animate-css": "^1.4.0",
106
+ "@repo/shadcn": "0.0.0"
107
+ },
108
+ "devDependencies": {
109
+ "@bosh-code/tsdown-plugin-tailwindcss": "^1.0.1",
110
+ "@conform-to/react": "^1.17.1",
111
+ "@conform-to/zod": "^1.17.1",
50
112
  "@radix-ui/react-dialog": "^1.1.15",
51
113
  "@radix-ui/react-dropdown-menu": "^2.1.16",
52
114
  "@radix-ui/react-slot": "^1.2.4",
53
115
  "@radix-ui/react-tabs": "^1.1.13",
54
116
  "@radix-ui/react-tooltip": "^1.2.8",
55
- "@stepperize/react": "^3.0.0",
56
- "class-variance-authority": "^0.7.1",
57
- "lucide-react": "^0.556.0",
117
+ "@stepperize/react": "^6.1.0",
118
+ "@tailwindcss/node": "^4.2.1",
119
+ "@tailwindcss/oxide": "^4.2.1",
120
+ "@tanstack/react-virtual": "^3.13.19",
121
+ "@testing-library/jest-dom": "^6",
122
+ "@testing-library/react": "^16",
123
+ "@testing-library/user-event": "^14",
124
+ "@types/nprogress": "^0.2.3",
125
+ "@types/react": "^19",
126
+ "@types/react-dom": "^19",
127
+ "date-fns": "^4.1.0",
128
+ "date-fns-tz": "^3.2.0",
129
+ "eslint": "^9.39.3",
130
+ "jsdom": "^26",
131
+ "motion": "^12.34.4",
58
132
  "nprogress": "^0.2.0",
133
+ "react": "^19",
134
+ "react-day-picker": "^9.14.0",
135
+ "react-dom": "^19",
136
+ "react-dropzone": "^15.0.0",
137
+ "react-number-format": "^5.4.4",
59
138
  "sonner": "^2.0.7",
60
- "tailwind-scrollbar-hide": "^2.0.0"
61
- },
62
- "peerDependencies": {
63
- "react": ">=18",
64
- "react-router": "^7.0.0"
65
- },
66
- "peerDependenciesMeta": {
67
- "react-router": {
68
- "optional": true
69
- }
139
+ "tailwindcss": "^4.2.1",
140
+ "tsdown": "^0.20.3",
141
+ "typescript": "^5.9",
142
+ "vitest": "^3",
143
+ "zod": "^4.3.6",
144
+ "@repo/config": "0.0.0"
70
145
  },
71
146
  "publishConfig": {
72
147
  "access": "public"
73
148
  },
74
149
  "scripts": {
75
- "build": "tsup",
76
- "dev": "tsup --watch",
77
- "lint": "eslint . --max-warnings 0",
78
- "clean": "rm -rf .turbo node_modules dist"
150
+ "build": "tsdown --config-loader native && cp -r src/styles/fonts dist/fonts",
151
+ "dev": "tsdown --config-loader native --watch",
152
+ "lint": "eslint .",
153
+ "typecheck": "tsc --noEmit",
154
+ "test": "vitest run",
155
+ "test:watch": "vitest",
156
+ "test:coverage": "vitest run --coverage",
157
+ "clean": "rm -rf dist .turbo node_modules coverage"
79
158
  }
80
159
  }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2024 Datum Cloud
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.