@tomny-dev/uzi 0.1.9 → 0.1.10

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 (68) hide show
  1. package/README.md +132 -103
  2. package/dist/components/alert/Alert.d.ts +9 -0
  3. package/dist/components/alert/Alert.d.ts.map +1 -0
  4. package/dist/components/app-shell/AppShell.d.ts +46 -0
  5. package/dist/components/app-shell/AppShell.d.ts.map +1 -0
  6. package/dist/components/avatar/Avatar.d.ts +10 -0
  7. package/dist/components/avatar/Avatar.d.ts.map +1 -0
  8. package/dist/components/button/Button.d.ts +20 -0
  9. package/dist/components/button/Button.d.ts.map +1 -0
  10. package/dist/components/card/Card.d.ts +28 -0
  11. package/dist/components/card/Card.d.ts.map +1 -0
  12. package/dist/components/checkbox/Checkbox.d.ts +4 -0
  13. package/dist/components/checkbox/Checkbox.d.ts.map +1 -0
  14. package/dist/components/dropdown/Dropdown.d.ts +18 -0
  15. package/dist/components/dropdown/Dropdown.d.ts.map +1 -0
  16. package/dist/components/dropdown-menu/DropdownMenu.d.ts +24 -0
  17. package/dist/components/dropdown-menu/DropdownMenu.d.ts.map +1 -0
  18. package/dist/components/input/Input.d.ts +4 -0
  19. package/dist/components/input/Input.d.ts.map +1 -0
  20. package/dist/components/label/Label.d.ts +4 -0
  21. package/dist/components/label/Label.d.ts.map +1 -0
  22. package/dist/components/modal/Modal.d.ts +21 -0
  23. package/dist/components/modal/Modal.d.ts.map +1 -0
  24. package/dist/components/multi-select/MultiSelect.d.ts +21 -0
  25. package/dist/components/multi-select/MultiSelect.d.ts.map +1 -0
  26. package/dist/components/pill/Pill.d.ts +28 -0
  27. package/dist/components/pill/Pill.d.ts.map +1 -0
  28. package/dist/components/progress/Progress.d.ts +12 -0
  29. package/dist/components/progress/Progress.d.ts.map +1 -0
  30. package/dist/components/select/Select.d.ts +28 -0
  31. package/dist/components/select/Select.d.ts.map +1 -0
  32. package/dist/components/sidebar-nav/SidebarNav.d.ts +36 -0
  33. package/dist/components/sidebar-nav/SidebarNav.d.ts.map +1 -0
  34. package/dist/components/skeleton/Skeleton.d.ts +11 -0
  35. package/dist/components/skeleton/Skeleton.d.ts.map +1 -0
  36. package/dist/components/theme-toggle-button/ThemeToggleButton.d.ts +8 -0
  37. package/dist/components/theme-toggle-button/ThemeToggleButton.d.ts.map +1 -0
  38. package/dist/components/toast/ToastContext.d.ts +27 -0
  39. package/dist/components/toast/ToastContext.d.ts.map +1 -0
  40. package/dist/components/toast/types.d.ts +46 -0
  41. package/dist/components/toast/types.d.ts.map +1 -0
  42. package/dist/components/top-bar/TopBar.d.ts +20 -0
  43. package/dist/components/top-bar/TopBar.d.ts.map +1 -0
  44. package/dist/index.cjs +46 -1487
  45. package/dist/index.cjs.map +1 -1
  46. package/dist/index.d.ts +44 -390
  47. package/dist/index.d.ts.map +1 -0
  48. package/dist/index.js +6774 -1152
  49. package/dist/index.js.map +1 -1
  50. package/dist/server.cjs +7 -51
  51. package/dist/server.cjs.map +1 -1
  52. package/dist/server.d.ts +2 -16
  53. package/dist/server.d.ts.map +1 -0
  54. package/dist/server.js +13 -18
  55. package/dist/server.js.map +1 -1
  56. package/dist/style.css +1 -0
  57. package/dist/theme/ThemeProvider.d.ts +29 -0
  58. package/dist/theme/ThemeProvider.d.ts.map +1 -0
  59. package/dist/theme/constants.d.ts +5 -0
  60. package/dist/theme/constants.d.ts.map +1 -0
  61. package/dist/{server.d.cts → theme/themeScript.d.ts} +2 -3
  62. package/dist/theme/themeScript.d.ts.map +1 -0
  63. package/dist/utils/cx.d.ts +2 -0
  64. package/dist/utils/cx.d.ts.map +1 -0
  65. package/package.json +11 -7
  66. package/dist/index.css +0 -1428
  67. package/dist/index.css.map +0 -1
  68. package/dist/index.d.cts +0 -390
@@ -0,0 +1,36 @@
1
+ import { type AnchorHTMLAttributes, type ReactNode } from "react";
2
+ export type SidebarNavItem = {
3
+ label: string;
4
+ href?: string;
5
+ icon?: ReactNode;
6
+ description?: ReactNode;
7
+ badge?: ReactNode;
8
+ active?: boolean;
9
+ disabled?: boolean;
10
+ title?: string;
11
+ target?: AnchorHTMLAttributes<HTMLAnchorElement>["target"];
12
+ rel?: AnchorHTMLAttributes<HTMLAnchorElement>["rel"];
13
+ onClick?: () => void;
14
+ };
15
+ export type SidebarNavSection = {
16
+ id?: string;
17
+ label?: ReactNode;
18
+ items: SidebarNavItem[];
19
+ };
20
+ export type SidebarNavProps = {
21
+ items?: SidebarNavItem[];
22
+ sections?: SidebarNavSection[];
23
+ currentPath?: string;
24
+ getIsActive?: (item: SidebarNavItem, currentPath?: string) => boolean;
25
+ onItemClick?: (item: SidebarNavItem) => void;
26
+ header?: ReactNode;
27
+ footer?: ReactNode;
28
+ ariaLabel?: string;
29
+ collapsed?: boolean;
30
+ iconSize?: number | string;
31
+ className?: string;
32
+ itemClassName?: string;
33
+ sectionClassName?: string;
34
+ };
35
+ export declare function SidebarNav({ items, sections, currentPath, getIsActive, onItemClick, header, footer, ariaLabel, collapsed, iconSize, className, itemClassName, sectionClassName, }: SidebarNavProps): import("react/jsx-runtime").JSX.Element;
36
+ //# sourceMappingURL=SidebarNav.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SidebarNav.d.ts","sourceRoot":"","sources":["../../../src/components/sidebar-nav/SidebarNav.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,oBAAoB,EAAsB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAItF,MAAM,MAAM,cAAc,GAAG;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,IAAI,CAAC,EAAE,SAAS,CAAC;IACjB,WAAW,CAAC,EAAE,SAAS,CAAC;IACxB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAA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from "react";
2
+ export type SkeletonProps = HTMLAttributes<HTMLDivElement> & {
3
+ /** Width as a CSS value. */
4
+ width?: string;
5
+ /** Height as a CSS value. */
6
+ height?: string;
7
+ /** Border radius preset. Defaults to "md". */
8
+ radius?: "sm" | "md" | "lg" | "full";
9
+ };
10
+ export declare function Skeleton({ width, height, radius, className, style, ...rest }: SkeletonProps): import("react/jsx-runtime").JSX.Element;
11
+ //# sourceMappingURL=Skeleton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Skeleton.d.ts","sourceRoot":"","sources":["../../../src/components/skeleton/Skeleton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,MAAM,MAAM,aAAa,GAAG,cAAc,CAAC,cAAc,CAAC,GAAG;IAC3D,4BAA4B;IAC5B,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,MAAM,CAAC;CACtC,CAAC;AAEF,wBAAgB,QAAQ,CAAC,EACvB,KAAK,EACL,MAAM,EACN,MAAa,EACb,SAAS,EACT,KAAK,EACL,GAAG,IAAI,EACR,EAAE,aAAa,2CASf"}
@@ -0,0 +1,8 @@
1
+ import type { ButtonHTMLAttributes } from "react";
2
+ export type ThemeToggleButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, "children"> & {
3
+ showLabel?: boolean;
4
+ lightLabel?: string;
5
+ darkLabel?: string;
6
+ };
7
+ export declare function ThemeToggleButton({ showLabel, lightLabel, darkLabel, className, onClick, ...rest }: ThemeToggleButtonProps): import("react/jsx-runtime").JSX.Element;
8
+ //# sourceMappingURL=ThemeToggleButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ThemeToggleButton.d.ts","sourceRoot":"","sources":["../../../src/components/theme-toggle-button/ThemeToggleButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,OAAO,CAAC;AAMlD,MAAM,MAAM,sBAAsB,GAAG,IAAI,CACvC,oBAAoB,CAAC,iBAAiB,CAAC,EACvC,UAAU,CACX,GAAG;IACF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AA8BF,wBAAgB,iBAAiB,CAAC,EAChC,SAAiB,EACjB,UAAyB,EACzB,SAAuB,EACvB,SAAS,EACT,OAAO,EACP,GAAG,IAAI,EACR,EAAE,sBAAsB,2CAsBxB"}
@@ -0,0 +1,27 @@
1
+ import { type ReactNode } from "react";
2
+ import type { ToastConfig, ToastContextValue } from "./types";
3
+ /**
4
+ * Toast notification context provider.
5
+ *
6
+ * @remarks
7
+ * Wrap your app (or a section) to enable `useToast` calls. Supports configurable placement,
8
+ * maximum visible toasts, and pause behavior on hover or window blur.
9
+ *
10
+ * @param props.children - React subtree that can consume the toast context.
11
+ * @param props.config - Optional provider configuration overrides.
12
+ */
13
+ export declare function ToastProvider({ children, config, }: {
14
+ children: ReactNode;
15
+ config?: ToastConfig;
16
+ }): import("react/jsx-runtime").JSX.Element;
17
+ /**
18
+ * Hook to access the toast API.
19
+ *
20
+ * @remarks
21
+ * Exposes `push`, intent helpers (`success`, `error`, `warning`, `info`), and dismissal helpers.
22
+ * Must be called within a `ToastProvider`.
23
+ *
24
+ * @throws Error if used outside of a `ToastProvider`.
25
+ */
26
+ export declare function useToast(): ToastContextValue;
27
+ //# sourceMappingURL=ToastContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ToastContext.d.ts","sourceRoot":"","sources":["../../../src/components/toast/ToastContext.tsx"],"names":[],"mappings":"AAEA,OAAO,EASL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf,OAAO,KAAK,EAEV,WAAW,EACX,iBAAiB,EAIlB,MAAM,SAAS,CAAC;AAiBjB;;;;;;;;;GASG;AACH,wBAAgB,aAAa,CAAC,EAC5B,QAAQ,EACR,MAAM,GACP,EAAE;IACD,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;CACtB,2CA+EA;AAED;;;;;;;;GAQG;AACH,wBAAgB,QAAQ,IAAI,iBAAiB,CAI5C"}
@@ -0,0 +1,46 @@
1
+ /** Visual intent for a toast. Drives colors and icons. */
2
+ export type ToastType = "success" | "error" | "warning" | "info";
3
+ /** Where toast stack is anchored in the viewport. */
4
+ export type ToastPosition = "top-right" | "top-left" | "top-center" | "bottom-right" | "bottom-left" | "bottom-center";
5
+ /** A single toast entry. */
6
+ export interface Toast {
7
+ id: string;
8
+ message: string;
9
+ type: ToastType;
10
+ duration?: number;
11
+ dismissible?: boolean;
12
+ action?: {
13
+ label: string;
14
+ onClick: () => void;
15
+ };
16
+ }
17
+ /** Options when pushing a toast. */
18
+ export interface ToastOptions {
19
+ type?: ToastType;
20
+ duration?: number;
21
+ dismissible?: boolean;
22
+ action?: {
23
+ label: string;
24
+ onClick: () => void;
25
+ };
26
+ }
27
+ /** Provider configuration. */
28
+ export interface ToastConfig {
29
+ position?: ToastPosition;
30
+ maxToasts?: number;
31
+ defaultDuration?: number;
32
+ pauseOnHover?: boolean;
33
+ pauseOnFocusLoss?: boolean;
34
+ }
35
+ /** Public API exposed by the toast context. */
36
+ export interface ToastContextValue {
37
+ toasts: Toast[];
38
+ push: (message: string, options?: ToastOptions) => string;
39
+ success: (message: string, options?: Omit<ToastOptions, "type">) => string;
40
+ error: (message: string, options?: Omit<ToastOptions, "type">) => string;
41
+ warning: (message: string, options?: Omit<ToastOptions, "type">) => string;
42
+ info: (message: string, options?: Omit<ToastOptions, "type">) => string;
43
+ dismiss: (id: string) => void;
44
+ dismissAll: () => void;
45
+ }
46
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file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OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IAC3E,KAAK,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IACzE,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IAC3E,IAAI,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,YAAY,EAAE,MAAM,CAAC,KAAK,MAAM,CAAC;IACxE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9B,UAAU,EAAE,MAAM,IAAI,CAAC;CACxB"}
@@ -0,0 +1,20 @@
1
+ import type { HTMLAttributes, ReactNode } from "react";
2
+ import { type ThemeToggleButtonProps } from "../theme-toggle-button/ThemeToggleButton";
3
+ export type TopBarProps = HTMLAttributes<HTMLElement> & {
4
+ leading?: ReactNode;
5
+ brand?: ReactNode;
6
+ brandHref?: string;
7
+ brandingLocation?: "left" | "center";
8
+ /** Content rendered after the brand in the left region (e.g. breadcrumbs, search). */
9
+ start?: ReactNode;
10
+ /** Content rendered in the center region. */
11
+ center?: ReactNode;
12
+ actions?: ReactNode;
13
+ showThemeToggle?: boolean;
14
+ themeToggleProps?: ThemeToggleButtonProps;
15
+ innerClassName?: string;
16
+ isSticky?: boolean;
17
+ sticky?: boolean;
18
+ };
19
+ export declare function TopBar({ leading, brand, brandHref, brandingLocation, start, center, actions, showThemeToggle, themeToggleProps, className, innerClassName, isSticky, sticky, children, ...rest }: TopBarProps): import("react/jsx-runtime").JSX.Element;
20
+ //# sourceMappingURL=TopBar.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TopBar.d.ts","sourceRoot":"","sources":["../../../src/components/top-bar/TopBar.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAEL,KAAK,sBAAsB,EAC5B,MAAM,0CAA0C,CAAC;AAGlD,MAAM,MAAM,WAAW,GAAG,cAAc,CAAC,WAAW,CAAC,GAAG;IACtD,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,MAAM,GAAG,QAAQ,CAAC;IACrC,sFAAsF;IACtF,KAAK,CAAC,EAAE,SAAS,CAAC;IAClB,6CAA6C;IAC7C,MAAM,CAAC,EAAE,SAAS,CAAC;IACnB,OAAO,CAAC,EAAE,SAAS,CAAC;IACpB,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,gBAAgB,CAAC,EAAE,sBAAsB,CAAC;IAC1C,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,wBAAgB,MAAM,CAAC,EACrB,OAAO,EACP,KAAK,EACL,SAAS,EACT,gBAAyB,EACzB,KAAK,EACL,MAAM,EACN,OAAO,EACP,eAAuB,EACvB,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,QAAQ,EACR,MAAa,EACb,QAAQ,EACR,GAAG,IAAI,EACR,EAAE,WAAW,2CAsCb"}