doom-design-system 0.1.10 → 0.1.11

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 (72) hide show
  1. package/dist/DesignSystemProvider.js +1 -1
  2. package/dist/components/Accordion/index.js +1 -1
  3. package/dist/components/ActionRow/ActionRow.js +2 -2
  4. package/dist/components/ActionRow/index.js +1 -1
  5. package/dist/components/Alert/index.js +1 -1
  6. package/dist/components/Avatar/index.js +1 -1
  7. package/dist/components/Badge/index.js +1 -1
  8. package/dist/components/Breadcrumbs/Breadcrumbs.js +1 -1
  9. package/dist/components/Breadcrumbs/index.js +1 -1
  10. package/dist/components/Button/Button.d.ts +2 -1
  11. package/dist/components/Button/Button.js +5 -4
  12. package/dist/components/Button/Button.module.css +11 -3
  13. package/dist/components/Button/index.js +1 -1
  14. package/dist/components/Card/index.js +1 -1
  15. package/dist/components/Checkbox/Checkbox.d.ts +6 -0
  16. package/dist/components/Checkbox/Checkbox.js +24 -0
  17. package/dist/components/Checkbox/Checkbox.module.css +57 -0
  18. package/dist/components/Checkbox/index.d.ts +1 -0
  19. package/dist/components/Checkbox/index.js +1 -0
  20. package/dist/components/Drawer/Drawer.d.ts +3 -3
  21. package/dist/components/Drawer/Drawer.js +15 -15
  22. package/dist/components/Drawer/index.js +1 -1
  23. package/dist/components/Dropdown/Dropdown.js +2 -2
  24. package/dist/components/Dropdown/index.js +1 -1
  25. package/dist/components/Form/Form.js +1 -1
  26. package/dist/components/Form/Form.module.css +1 -0
  27. package/dist/components/Form/index.js +1 -1
  28. package/dist/components/Input/Input.js +1 -1
  29. package/dist/components/Input/index.js +1 -1
  30. package/dist/components/Label/index.js +1 -1
  31. package/dist/components/Layout/Layout.d.ts +23 -13
  32. package/dist/components/Layout/Layout.js +19 -4
  33. package/dist/components/Layout/Layout.module.css +23 -0
  34. package/dist/components/Layout/index.js +1 -1
  35. package/dist/components/Link/index.js +1 -1
  36. package/dist/components/Modal/Modal.js +3 -3
  37. package/dist/components/Modal/index.js +1 -1
  38. package/dist/components/Page/index.js +1 -1
  39. package/dist/components/Pagination/index.js +1 -1
  40. package/dist/components/Popover/index.js +1 -1
  41. package/dist/components/ProgressBar/index.js +1 -1
  42. package/dist/components/RadioGroup/index.js +1 -1
  43. package/dist/components/Select/Select.js +2 -2
  44. package/dist/components/Select/index.js +1 -1
  45. package/dist/components/Sheet/Sheet.js +2 -2
  46. package/dist/components/Sheet/Sheet.module.css +2 -2
  47. package/dist/components/Sheet/index.js +1 -1
  48. package/dist/components/Skeleton/index.js +1 -1
  49. package/dist/components/Slider/index.js +1 -1
  50. package/dist/components/Spinner/Spinner.d.ts +6 -0
  51. package/dist/components/Spinner/Spinner.js +20 -0
  52. package/dist/components/Spinner/Spinner.module.css +30 -0
  53. package/dist/components/Spinner/index.d.ts +1 -0
  54. package/dist/components/Spinner/index.js +1 -0
  55. package/dist/components/SplitButton/SplitButton.js +1 -1
  56. package/dist/components/SplitButton/index.js +1 -1
  57. package/dist/components/Switch/index.js +1 -1
  58. package/dist/components/Table/Table.js +4 -4
  59. package/dist/components/Table/index.js +1 -1
  60. package/dist/components/Tabs/index.js +1 -1
  61. package/dist/components/Text/index.js +1 -1
  62. package/dist/components/Textarea/index.js +1 -1
  63. package/dist/components/Toast/index.js +1 -1
  64. package/dist/components/Tooltip/Tooltip.js +1 -1
  65. package/dist/components/Tooltip/index.js +1 -1
  66. package/dist/index.d.ts +2 -0
  67. package/dist/index.js +38 -36
  68. package/dist/styles/globals.css +648 -256
  69. package/dist/styles/themes/ThemeProvider.js +1 -1
  70. package/dist/styles/themes/index.js +2 -2
  71. package/dist/tsconfig.tsbuildinfo +1 -1
  72. package/package.json +7 -4
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import './styles/globals.css';
4
- import { ThemeProvider } from './styles/themes';
4
+ import { ThemeProvider } from './styles/themes/index.js';
5
5
  export function DesignSystemProvider({ children, initialTheme = 'default', withBody = false, className = '', fontClassName = '' }) {
6
6
  const content = (_jsx(ThemeProvider, { initialTheme: initialTheme, children: children }));
7
7
  const combinedClassName = `${fontClassName} ${className}`.trim();
@@ -1 +1 @@
1
- export { Accordion, AccordionItem } from './Accordion';
1
+ export { Accordion, AccordionItem } from './Accordion/index.js';
@@ -11,8 +11,8 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
- import { Text } from '../Text/Text';
15
- import { Flex } from '../Layout/Layout';
14
+ import { Text } from '../Text/Text/index.js';
15
+ import { Flex } from '../Layout/Layout/index.js';
16
16
  import { ChevronRight } from 'lucide-react';
17
17
  import clsx from 'clsx';
18
18
  import styles from './ActionRow.module.css';
@@ -1 +1 @@
1
- export * from './ActionRow';
1
+ export * from './ActionRow/index.js';
@@ -1 +1 @@
1
- export { Alert } from './Alert';
1
+ export { Alert } from './Alert/index.js';
@@ -1 +1 @@
1
- export { Avatar } from './Avatar';
1
+ export { Avatar } from './Avatar/index.js';
@@ -1 +1 @@
1
- export * from './Badge';
1
+ export * from './Badge/index.js';
@@ -1,7 +1,7 @@
1
1
  'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import clsx from 'clsx';
4
- import { Link } from '../Link/Link';
4
+ import { Link } from '../Link/Link/index.js';
5
5
  import styles from './Breadcrumbs.module.css';
6
6
  export function Breadcrumbs({ children, className }) {
7
7
  return (_jsx("nav", { "aria-label": "breadcrumb", className: clsx(styles.nav, className), children: _jsx("ol", { className: styles.list, children: children }) }));
@@ -1 +1 @@
1
- export { Breadcrumbs, BreadcrumbItem } from './Breadcrumbs';
1
+ export { Breadcrumbs, BreadcrumbItem } from './Breadcrumbs/index.js';
@@ -4,6 +4,7 @@ type ButtonSize = 'sm' | 'md' | 'lg';
4
4
  interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
5
5
  variant?: ButtonVariant;
6
6
  size?: ButtonSize;
7
+ loading?: boolean;
7
8
  }
8
- export declare function Button({ children, variant, size, className, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function Button({ children, variant, size, loading, className, disabled, ...props }: ButtonProps): import("react/jsx-runtime").JSX.Element;
9
10
  export {};
@@ -10,11 +10,12 @@ var __rest = (this && this.__rest) || function (s, e) {
10
10
  }
11
11
  return t;
12
12
  };
13
- import { jsx as _jsx } from "react/jsx-runtime";
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import clsx from 'clsx';
15
+ import { Spinner } from '../Spinner/index.js';
15
16
  import styles from './Button.module.css';
16
17
  export function Button(_a) {
17
- var { children, variant = 'primary', size = 'md', className } = _a, props = __rest(_a, ["children", "variant", "size", "className"]);
18
- const buttonClass = clsx(styles.button, styles[variant], styles[size], className);
19
- return (_jsx("button", Object.assign({ className: buttonClass }, props, { children: children })));
18
+ var { children, variant = 'primary', size = 'md', loading = false, className, disabled } = _a, props = __rest(_a, ["children", "variant", "size", "loading", "className", "disabled"]);
19
+ const buttonClass = clsx(styles.button, styles[variant], styles[size], loading && styles.loading, className);
20
+ return (_jsxs("button", Object.assign({ className: buttonClass, disabled: disabled || loading }, props, { children: [loading && (_jsx(Spinner, { size: "sm", className: styles.spinnerIcon })), children] })));
20
21
  }
@@ -41,7 +41,6 @@
41
41
 
42
42
  /* Variants */
43
43
  .primary {
44
- /* Contrast Override */
45
44
  --btn-focus-border: var(--card-border);
46
45
  --btn-focus-shadow: #000000;
47
46
  background-color: var(--primary);
@@ -52,7 +51,6 @@
52
51
  }
53
52
 
54
53
  .secondary {
55
- /* Contrast Override */
56
54
  --btn-focus-border: var(--card-border);
57
55
  --btn-focus-shadow: #000000;
58
56
  background-color: var(--secondary);
@@ -63,7 +61,6 @@
63
61
  }
64
62
 
65
63
  .success {
66
- /* Contrast Override */
67
64
  --btn-focus-border: var(--card-border);
68
65
  --btn-focus-shadow: #000000;
69
66
  background-color: var(--success);
@@ -110,3 +107,14 @@
110
107
  padding: 1rem 2rem;
111
108
  font-size: var(--text-lg);
112
109
  }
110
+
111
+ /* Loading State */
112
+ .loading {
113
+ cursor: wait;
114
+ opacity: 0.8;
115
+ pointer-events: none;
116
+ }
117
+
118
+ .spinnerIcon {
119
+ margin-right: 0.5rem;
120
+ }
@@ -1 +1 @@
1
- export * from './Button';
1
+ export * from './Button/index.js';
@@ -1 +1 @@
1
- export * from './Card';
1
+ export * from './Card/index.js';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ export interface CheckboxProps extends Omit<React.InputHTMLAttributes<HTMLInputElement>, 'size'> {
3
+ label?: string;
4
+ error?: boolean;
5
+ }
6
+ export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLInputElement>>;
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
+ import { forwardRef, useId } from 'react';
15
+ import clsx from 'clsx';
16
+ import { Check } from 'lucide-react';
17
+ import { Label } from '../Label/index.js';
18
+ import styles from './Checkbox.module.css';
19
+ export const Checkbox = forwardRef((_a, ref) => {
20
+ var { className, label, error, disabled, checked, defaultChecked, onChange, id: propsId } = _a, props = __rest(_a, ["className", "label", "error", "disabled", "checked", "defaultChecked", "onChange", "id"]);
21
+ const generatedId = useId();
22
+ const id = propsId || generatedId;
23
+ return (_jsxs("div", { className: clsx(styles.checkboxWrapper, disabled && styles.disabled, className), children: [_jsx("input", Object.assign({ id: id, type: "checkbox", className: styles.checkboxInput, ref: ref, disabled: disabled, checked: checked, defaultChecked: defaultChecked, onChange: onChange }, props)), _jsx("label", { htmlFor: id, className: clsx(styles.checkboxDisplay), "aria-hidden": "true", children: _jsx(Check, { className: styles.icon }) }), label && (_jsx(Label, { htmlFor: id, className: styles.labelOverride, children: label }))] }));
24
+ });
@@ -0,0 +1,57 @@
1
+ .checkboxWrapper {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ gap: var(--spacing-sm);
5
+ cursor: pointer;
6
+ user-select: none;
7
+ }
8
+ .checkboxWrapper.disabled {
9
+ cursor: not-allowed;
10
+ opacity: 0.6;
11
+ }
12
+
13
+ .checkboxInput {
14
+ position: absolute;
15
+ opacity: 0;
16
+ width: 0;
17
+ height: 0;
18
+ margin: 0;
19
+ }
20
+ .checkboxInput:focus-visible + .checkboxDisplay:focus, .checkboxInput:focus-visible + .checkboxDisplay:focus-visible, .checkboxInput:focus-visible + .checkboxDisplay[aria-expanded=true] {
21
+ outline: none;
22
+ transform: translate(-2px, -2px);
23
+ box-shadow: 7px 7px 0px 0px var(--shadow-primary);
24
+ border-color: var(--primary);
25
+ }
26
+ .checkboxInput:focus-visible + .checkboxDisplay {
27
+ outline: 2px solid var(--primary);
28
+ }
29
+
30
+ .checkboxDisplay {
31
+ display: inline-flex;
32
+ align-items: center;
33
+ justify-content: center;
34
+ width: 1.5rem;
35
+ height: 1.5rem;
36
+ background-color: var(--card-bg);
37
+ color: transparent;
38
+ border: 3px solid var(--muted-foreground);
39
+ border-radius: 4px;
40
+ transition: all 0.1s ease;
41
+ }
42
+ .checkboxInput:checked + .checkboxDisplay {
43
+ background-color: var(--primary);
44
+ border-color: var(--card-border);
45
+ color: var(--primary-foreground);
46
+ }
47
+
48
+ .icon {
49
+ width: 80%;
50
+ height: 80%;
51
+ stroke-width: 3.5px;
52
+ }
53
+
54
+ .labelOverride {
55
+ cursor: pointer;
56
+ margin-left: var(--spacing-xs);
57
+ }
@@ -0,0 +1 @@
1
+ export * from './Checkbox';
@@ -0,0 +1 @@
1
+ export * from './Checkbox/index.js';
@@ -1,12 +1,12 @@
1
- import React from 'react';
1
+ import React from "react";
2
2
  interface DrawerProps {
3
3
  isOpen: boolean;
4
4
  onClose: () => void;
5
5
  title?: string;
6
- side?: 'left' | 'right';
6
+ side?: "left" | "right";
7
7
  children: React.ReactNode;
8
8
  footer?: React.ReactNode;
9
9
  className?: string;
10
10
  }
11
- export declare function Drawer({ isOpen, onClose, title, side, children, footer, className }: DrawerProps): React.ReactPortal | null;
11
+ export declare function Drawer({ isOpen, onClose, title, side, children, footer, className, }: DrawerProps): React.ReactPortal | null;
12
12
  export {};
@@ -1,35 +1,35 @@
1
- 'use client';
1
+ "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import clsx from 'clsx';
4
- import { createPortal } from 'react-dom';
5
- import { X } from 'lucide-react';
6
- import { Button } from '../Button/Button';
7
- import styles from './Drawer.module.css';
8
- import { useEffect, useState } from 'react';
9
- export function Drawer({ isOpen, onClose, title, side = 'right', children, footer, className }) {
3
+ import clsx from "clsx";
4
+ import { createPortal } from "react-dom";
5
+ import { X } from "lucide-react";
6
+ import { Button } from "../Button/Button/index.js";
7
+ import styles from "./Drawer.module.css";
8
+ import { useEffect, useState } from "react";
9
+ export function Drawer({ isOpen, onClose, title, side = "right", children, footer, className, }) {
10
10
  const [mounted, setMounted] = useState(false);
11
11
  useEffect(() => {
12
12
  setMounted(true);
13
13
  if (isOpen) {
14
- document.body.style.overflow = 'hidden';
14
+ document.body.style.overflow = "hidden";
15
15
  }
16
16
  else {
17
- document.body.style.overflow = '';
17
+ document.body.style.overflow = "";
18
18
  }
19
19
  return () => {
20
- document.body.style.overflow = '';
20
+ document.body.style.overflow = "";
21
21
  };
22
22
  }, [isOpen]);
23
23
  useEffect(() => {
24
24
  const handleEsc = (e) => {
25
- if (e.key === 'Escape')
25
+ if (e.key === "Escape")
26
26
  onClose();
27
27
  };
28
28
  if (isOpen)
29
- window.addEventListener('keydown', handleEsc);
30
- return () => window.removeEventListener('keydown', handleEsc);
29
+ window.addEventListener("keydown", handleEsc);
30
+ return () => window.removeEventListener("keydown", handleEsc);
31
31
  }, [isOpen, onClose]);
32
- if (!mounted)
32
+ if (!mounted || !isOpen)
33
33
  return null;
34
34
  return createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(styles.overlay, isOpen && styles.open), onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { className: clsx(styles.panel, styles[side], isOpen && styles.open, className), role: "dialog", "aria-modal": "true", children: [_jsxs("div", { className: styles.header, children: [_jsx("h2", { className: styles.title, children: title }), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, "aria-label": "Close drawer", children: _jsx(X, { size: 24 }) })] }), _jsx("div", { className: styles.content, children: children }), footer && _jsx("div", { className: styles.footer, children: footer })] })] }), document.body);
35
35
  }
@@ -1 +1 @@
1
- export { Drawer } from './Drawer';
1
+ export { Drawer } from './Drawer/index.js';
@@ -1,8 +1,8 @@
1
1
  'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import clsx from 'clsx';
4
- import { Button } from '../Button/Button';
5
- import { Popover } from '../Popover/Popover';
4
+ import { Button } from '../Button/Button/index.js';
5
+ import { Popover } from '../Popover/Popover/index.js';
6
6
  import styles from './Dropdown.module.css';
7
7
  import { useState } from 'react';
8
8
  export function Dropdown({ triggerLabel, items, variant = 'primary', className }) {
@@ -1 +1 @@
1
- export * from './Dropdown';
1
+ export * from './Dropdown/index.js';
@@ -12,7 +12,7 @@ var __rest = (this && this.__rest) || function (s, e) {
12
12
  };
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import clsx from 'clsx';
15
- import { Label } from '../Label/Label';
15
+ import { Label } from '../Label/Label/index.js';
16
16
  import styles from './Form.module.css';
17
17
  export function Form(_a) {
18
18
  var { children, className } = _a, props = __rest(_a, ["children", "className"]);
@@ -10,6 +10,7 @@
10
10
  flex-direction: column;
11
11
  gap: 0.5rem;
12
12
  width: 100%;
13
+ align-items: flex-start;
13
14
  }
14
15
 
15
16
  .message {
@@ -1 +1 @@
1
- export * from './Form';
1
+ export * from './Form/index.js';
@@ -13,7 +13,7 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { useState } from 'react';
15
15
  import clsx from 'clsx';
16
- import { Label } from '../Label/Label';
16
+ import { Label } from '../Label/Label/index.js';
17
17
  import styles from './Input.module.css';
18
18
  export function Input(_a) {
19
19
  var { label, error: errorProp, helperText, startAdornment, endAdornment, style, className, format, validate, onBlur, onFocus, value, id, required } = _a, props = __rest(_a, ["label", "error", "helperText", "startAdornment", "endAdornment", "style", "className", "format", "validate", "onBlur", "onFocus", "value", "id", "required"]);
@@ -1 +1 @@
1
- export * from './Input';
1
+ export * from './Input/index.js';
@@ -1 +1 @@
1
- export * from './Label';
1
+ export * from './Label/index.js';
@@ -1,17 +1,27 @@
1
- import React from 'react';
2
- interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
3
- children: React.ReactNode;
4
- columns?: string;
5
- gap?: string;
1
+ import React, { ElementType } from 'react';
2
+ interface LayoutProps extends React.HTMLAttributes<HTMLElement> {
3
+ children?: React.ReactNode;
4
+ as?: ElementType;
6
5
  }
7
- export declare function Grid({ children, columns, gap, className, style, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
8
- interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
9
- children: React.ReactNode;
10
- direction?: 'row' | 'column';
11
- justify?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around';
6
+ export interface GridProps extends LayoutProps {
7
+ columns?: string | number;
8
+ gap?: string | number;
9
+ }
10
+ export declare function Grid({ children, columns, gap, className, style, as: Component, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
11
+ export interface FlexProps extends LayoutProps {
12
+ direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse';
13
+ justify?: 'flex-start' | 'flex-end' | 'center' | 'space-between' | 'space-around' | 'space-evenly';
12
14
  align?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
13
- gap?: string;
14
- wrap?: boolean;
15
+ gap?: string | number;
16
+ wrap?: boolean | 'wrap' | 'nowrap' | 'wrap-reverse';
17
+ }
18
+ export declare function Flex({ children, direction, justify, align, gap, wrap, className, style, as: Component, ...props }: FlexProps): import("react/jsx-runtime").JSX.Element;
19
+ export interface StackProps extends Omit<FlexProps, 'direction'> {
20
+ direction?: 'column' | 'column-reverse' | 'row' | 'row-reverse';
21
+ }
22
+ export declare function Stack({ children, direction, gap, align, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
23
+ export interface ContainerProps extends LayoutProps {
24
+ maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'fluid';
15
25
  }
16
- export declare function Flex({ children, direction, justify, align, gap, wrap, className, style, ...props }: FlexProps): import("react/jsx-runtime").JSX.Element;
26
+ export declare function Container({ children, maxWidth, className, as: Component, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
17
27
  export {};
@@ -11,12 +11,27 @@ var __rest = (this && this.__rest) || function (s, e) {
11
11
  return t;
12
12
  };
13
13
  import { jsx as _jsx } from "react/jsx-runtime";
14
+ import clsx from 'clsx';
14
15
  import styles from './Layout.module.css';
15
16
  export function Grid(_a) {
16
- var { children, columns = '1fr', gap = '1rem', className, style } = _a, props = __rest(_a, ["children", "columns", "gap", "className", "style"]);
17
- return (_jsx("div", Object.assign({ className: `${styles.grid} ${className || ''}`, style: Object.assign({ gridTemplateColumns: columns, gap }, style) }, props, { children: children })));
17
+ var { children, columns = '1fr', gap = '1rem', className, style, as: Component = 'div' } = _a, props = __rest(_a, ["children", "columns", "gap", "className", "style", "as"]);
18
+ const gridTemplateColumns = typeof columns === 'number' ? `repeat(${columns}, 1fr)` : columns;
19
+ return (_jsx(Component, Object.assign({ className: clsx(styles.grid, className), style: Object.assign({ gridTemplateColumns,
20
+ gap }, style) }, props, { children: children })));
18
21
  }
19
22
  export function Flex(_a) {
20
- var { children, direction = 'row', justify = 'flex-start', align = 'stretch', gap = '0', wrap = false, className, style } = _a, props = __rest(_a, ["children", "direction", "justify", "align", "gap", "wrap", "className", "style"]);
21
- return (_jsx("div", Object.assign({ className: `${styles.flex} ${className || ''}`, style: Object.assign({ flexDirection: direction, justifyContent: justify, alignItems: align, gap, flexWrap: wrap ? 'wrap' : 'nowrap' }, style) }, props, { children: children })));
23
+ var { children, direction = 'row', justify = 'flex-start', align = 'stretch', gap = '0', wrap = false, className, style, as: Component = 'div' } = _a, props = __rest(_a, ["children", "direction", "justify", "align", "gap", "wrap", "className", "style", "as"]);
24
+ const flexWrap = typeof wrap === 'boolean'
25
+ ? (wrap ? 'wrap' : 'nowrap')
26
+ : wrap;
27
+ return (_jsx(Component, Object.assign({ className: clsx(styles.flex, className), style: Object.assign({ flexDirection: direction, justifyContent: justify, alignItems: align, gap,
28
+ flexWrap }, style) }, props, { children: children })));
29
+ }
30
+ export function Stack(_a) {
31
+ var { children, direction = 'column', gap = '1rem', align = 'stretch' } = _a, props = __rest(_a, ["children", "direction", "gap", "align"]);
32
+ return (_jsx(Flex, Object.assign({ direction: direction, gap: gap, align: align }, props, { children: children })));
33
+ }
34
+ export function Container(_a) {
35
+ var { children, maxWidth = 'xl', className, as: Component = 'div' } = _a, props = __rest(_a, ["children", "maxWidth", "className", "as"]);
36
+ return (_jsx(Component, Object.assign({ className: clsx(styles.container, styles[maxWidth], className) }, props, { children: children })));
22
37
  }
@@ -5,3 +5,26 @@
5
5
  .flex {
6
6
  display: flex;
7
7
  }
8
+
9
+ .container {
10
+ width: 100%;
11
+ margin-left: auto;
12
+ margin-right: auto;
13
+ padding-left: var(--spacing-md);
14
+ padding-right: var(--spacing-md);
15
+ }
16
+ .container.sm {
17
+ max-width: 640px;
18
+ }
19
+ .container.md {
20
+ max-width: 768px;
21
+ }
22
+ .container.lg {
23
+ max-width: 1024px;
24
+ }
25
+ .container.xl {
26
+ max-width: 1280px;
27
+ }
28
+ .container.fluid {
29
+ max-width: 100%;
30
+ }
@@ -1 +1 @@
1
- export * from './Layout';
1
+ export * from './Layout/index.js';
@@ -1 +1 @@
1
- export * from './Link';
1
+ export * from './Link/index.js';
@@ -4,9 +4,9 @@ import React, { useEffect, useRef } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { X } from 'lucide-react';
6
6
  import clsx from 'clsx';
7
- import { Card } from '../Card/Card';
8
- import { Button } from '../Button/Button';
9
- import { Flex } from '../Layout/Layout';
7
+ import { Card } from '../Card/Card/index.js';
8
+ import { Button } from '../Button/Button/index.js';
9
+ import { Flex } from '../Layout/Layout/index.js';
10
10
  import styles from './Modal.module.css';
11
11
  const ModalContext = React.createContext({ onClose: () => { } });
12
12
  export function ModalHeader({ children, className }) {
@@ -1 +1 @@
1
- export * from './Modal';
1
+ export * from './Modal/index.js';
@@ -1 +1 @@
1
- export * from './Page';
1
+ export * from './Page/index.js';
@@ -1 +1 @@
1
- export { Pagination } from './Pagination';
1
+ export { Pagination } from './Pagination/index.js';
@@ -1 +1 @@
1
- export * from './Popover';
1
+ export * from './Popover/index.js';
@@ -1 +1 @@
1
- export * from './ProgressBar';
1
+ export * from './ProgressBar/index.js';
@@ -1 +1 @@
1
- export { RadioGroup, RadioGroupItem } from './RadioGroup';
1
+ export { RadioGroup, RadioGroupItem } from './RadioGroup/index.js';
@@ -13,8 +13,8 @@ var __rest = (this && this.__rest) || function (s, e) {
13
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
14
14
  import { useState, useRef, useEffect, useId } from 'react';
15
15
  import clsx from 'clsx';
16
- import { Text } from '../Text/Text';
17
- import { Popover } from '../Popover/Popover';
16
+ import { Text } from '../Text/Text/index.js';
17
+ import { Popover } from '../Popover/Popover/index.js';
18
18
  import { Check, ChevronDown } from 'lucide-react';
19
19
  import styles from './Select.module.css';
20
20
  export function Select(_a) {
@@ -1 +1 @@
1
- export * from './Select';
1
+ export * from './Select/index.js';
@@ -3,8 +3,8 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import { useEffect, useState } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import clsx from 'clsx';
6
- import { Button } from '../Button/Button';
7
- import { Flex } from '../Layout/Layout';
6
+ import { Button } from '../Button/Button/index.js';
7
+ import { Flex } from '../Layout/Layout/index.js';
8
8
  import styles from './Sheet.module.css';
9
9
  import { X } from 'lucide-react';
10
10
  export function Sheet({ isOpen, onClose, title, children, className }) {
@@ -18,8 +18,8 @@
18
18
  bottom: 0;
19
19
  left: 0;
20
20
  right: 0;
21
- max-height: 96vh;
22
- min-height: 50vh;
21
+ max-height: 65vh;
22
+ min-height: 45vh;
23
23
  background-color: var(--card-bg);
24
24
  border-top: var(--border-width) solid var(--card-border);
25
25
  border-left: var(--border-width) solid var(--card-border);
@@ -1 +1 @@
1
- export { Sheet } from './Sheet';
1
+ export { Sheet } from './Sheet/index.js';
@@ -1 +1 @@
1
- export * from './Skeleton';
1
+ export * from './Skeleton/index.js';
@@ -1 +1 @@
1
- export { Slider } from './Slider';
1
+ export { Slider } from './Slider/index.js';
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import { LoaderCircle } from 'lucide-react';
3
+ export interface SpinnerProps extends React.ComponentProps<typeof LoaderCircle> {
4
+ size?: 'sm' | 'md' | 'lg' | 'xl';
5
+ }
6
+ export declare function Spinner({ size, className, strokeWidth, ...props }: SpinnerProps): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,20 @@
1
+ 'use client';
2
+ var __rest = (this && this.__rest) || function (s, e) {
3
+ var t = {};
4
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
5
+ t[p] = s[p];
6
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
7
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
8
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
9
+ t[p[i]] = s[p[i]];
10
+ }
11
+ return t;
12
+ };
13
+ import { jsx as _jsx } from "react/jsx-runtime";
14
+ import clsx from 'clsx';
15
+ import { LoaderCircle } from 'lucide-react';
16
+ import styles from './Spinner.module.css';
17
+ export function Spinner(_a) {
18
+ var { size = 'md', className, strokeWidth = 2 } = _a, props = __rest(_a, ["size", "className", "strokeWidth"]);
19
+ return (_jsx(LoaderCircle, Object.assign({ className: clsx(styles.spinner, styles[size], className), role: "status", "aria-label": "Loading", strokeWidth: strokeWidth }, props)));
20
+ }