doom-design-system 0.1.6 → 0.1.8

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 (96) hide show
  1. package/README.md +23 -20
  2. package/dist/DesignSystemProvider.d.ts +1 -0
  3. package/dist/DesignSystemProvider.js +3 -4
  4. package/dist/components/Accordion/Accordion.js +5 -63
  5. package/dist/components/Accordion/Accordion.module.css +69 -0
  6. package/dist/components/ActionRow/ActionRow.js +3 -28
  7. package/dist/components/ActionRow/ActionRow.module.css +24 -0
  8. package/dist/components/Alert/Alert.js +3 -58
  9. package/dist/components/Alert/Alert.module.css +77 -0
  10. package/dist/components/Avatar/Avatar.js +3 -45
  11. package/dist/components/Avatar/Avatar.module.css +67 -0
  12. package/dist/components/Badge/Badge.d.ts +1 -1
  13. package/dist/components/Badge/Badge.js +4 -42
  14. package/dist/components/Badge/Badge.module.css +31 -0
  15. package/dist/components/Breadcrumbs/Breadcrumbs.js +6 -38
  16. package/dist/components/Breadcrumbs/Breadcrumbs.module.css +34 -0
  17. package/dist/components/Button/Button.d.ts +1 -1
  18. package/dist/components/Button/Button.js +5 -129
  19. package/dist/components/Button/Button.module.css +112 -0
  20. package/dist/components/Card/Card.d.ts +1 -1
  21. package/dist/components/Card/Card.js +4 -13
  22. package/dist/components/Card/Card.module.css +8 -0
  23. package/dist/components/Drawer/Drawer.js +5 -71
  24. package/dist/components/Drawer/Drawer.module.css +75 -0
  25. package/dist/components/Dropdown/Dropdown.d.ts +2 -1
  26. package/dist/components/Dropdown/Dropdown.js +6 -39
  27. package/dist/components/Dropdown/Dropdown.module.css +33 -0
  28. package/dist/components/Form/Form.d.ts +4 -9
  29. package/dist/components/Form/Form.js +9 -43
  30. package/dist/components/Form/Form.module.css +41 -0
  31. package/dist/components/Input/Input.js +3 -59
  32. package/dist/components/Input/Input.module.css +86 -0
  33. package/dist/components/Label/Label.d.ts +1 -1
  34. package/dist/components/Label/Label.js +4 -23
  35. package/dist/components/Label/Label.module.css +16 -0
  36. package/dist/components/Layout/Layout.d.ts +2 -2
  37. package/dist/components/Layout/Layout.js +5 -20
  38. package/dist/components/Layout/Layout.module.css +7 -0
  39. package/dist/components/Link/Link.d.ts +2 -1
  40. package/dist/components/Link/Link.js +4 -62
  41. package/dist/components/Link/Link.module.css +48 -0
  42. package/dist/components/Modal/Modal.js +9 -52
  43. package/dist/components/Modal/Modal.module.css +57 -0
  44. package/dist/components/Page/Page.js +3 -23
  45. package/dist/components/Page/Page.module.css +23 -0
  46. package/dist/components/Pagination/Pagination.js +4 -42
  47. package/dist/components/Pagination/Pagination.module.css +43 -0
  48. package/dist/components/Popover/Popover.js +21 -26
  49. package/dist/components/Popover/Popover.module.css +19 -0
  50. package/dist/components/ProgressBar/ProgressBar.js +7 -37
  51. package/dist/components/ProgressBar/ProgressBar.module.css +31 -0
  52. package/dist/components/RadioGroup/RadioGroup.js +4 -79
  53. package/dist/components/RadioGroup/RadioGroup.module.css +81 -0
  54. package/dist/components/Select/Select.js +6 -80
  55. package/dist/components/Select/Select.module.css +89 -0
  56. package/dist/components/Sheet/Sheet.js +5 -56
  57. package/dist/components/Sheet/Sheet.module.css +64 -0
  58. package/dist/components/Skeleton/Skeleton.js +4 -49
  59. package/dist/components/Skeleton/Skeleton.module.css +29 -0
  60. package/dist/components/Slider/Slider.js +3 -140
  61. package/dist/components/Slider/Slider.module.css +130 -0
  62. package/dist/components/SplitButton/SplitButton.d.ts +2 -1
  63. package/dist/components/SplitButton/SplitButton.js +6 -82
  64. package/dist/components/SplitButton/SplitButton.module.css +79 -0
  65. package/dist/components/Switch/Switch.js +3 -54
  66. package/dist/components/Switch/Switch.module.css +64 -0
  67. package/dist/components/Table/Table.d.ts +1 -1
  68. package/dist/components/Table/Table.js +13 -109
  69. package/dist/components/Table/Table.module.css +111 -0
  70. package/dist/components/Tabs/Tabs.js +7 -56
  71. package/dist/components/Tabs/Tabs.module.css +65 -0
  72. package/dist/components/Text/Text.js +4 -106
  73. package/dist/components/Text/Text.module.css +123 -0
  74. package/dist/components/Textarea/Textarea.d.ts +1 -1
  75. package/dist/components/Textarea/Textarea.js +16 -20
  76. package/dist/components/Textarea/Textarea.module.css +23 -0
  77. package/dist/components/Toast/Toast.js +3 -67
  78. package/dist/components/Toast/Toast.module.css +87 -0
  79. package/dist/components/Tooltip/Tooltip.js +3 -19
  80. package/dist/components/Tooltip/Tooltip.module.css +17 -0
  81. package/dist/index.d.ts +1 -0
  82. package/dist/index.js +1 -0
  83. package/dist/styles/globals.css +999 -0
  84. package/dist/styles/themes/ThemeProvider.js +4 -9
  85. package/dist/tsconfig.tsbuildinfo +1 -1
  86. package/package.json +8 -5
  87. package/dist/styles/index.d.ts +0 -3
  88. package/dist/styles/index.js +0 -3
  89. package/dist/styles/mixins.d.ts +0 -3
  90. package/dist/styles/mixins.js +0 -25
  91. package/dist/styles/reset.d.ts +0 -1
  92. package/dist/styles/reset.js +0 -29
  93. package/dist/styles/theme.d.ts +0 -1
  94. package/dist/styles/theme.js +0 -11
  95. package/dist/styles/utilities.d.ts +0 -1
  96. package/dist/styles/utilities.js +0 -184
@@ -2,12 +2,12 @@ import React from 'react';
2
2
  export interface FormProps extends React.FormHTMLAttributes<HTMLFormElement> {
3
3
  children: React.ReactNode;
4
4
  }
5
- export declare function Form({ children, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function Form({ children, className, ...props }: FormProps): import("react/jsx-runtime").JSX.Element;
6
6
  export interface FormMessageProps extends React.HTMLAttributes<HTMLSpanElement> {
7
7
  children: React.ReactNode;
8
8
  variant?: 'error' | 'description';
9
9
  }
10
- export declare function FormMessage({ children, variant, ...props }: FormMessageProps): import("react/jsx-runtime").JSX.Element;
10
+ export declare function FormMessage({ children, variant, className, ...props }: FormMessageProps): import("react/jsx-runtime").JSX.Element;
11
11
  export interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
12
12
  children: React.ReactNode;
13
13
  label?: string;
@@ -16,10 +16,5 @@ export interface FieldProps extends React.HTMLAttributes<HTMLDivElement> {
16
16
  htmlFor?: string;
17
17
  required?: boolean;
18
18
  }
19
- export declare function Field({ children, label, error, description, htmlFor, required, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
20
- export declare const FormGroup: import("@emotion/styled").StyledComponent<{
21
- theme?: import("@emotion/react").Theme;
22
- as?: React.ElementType;
23
- } & {
24
- error?: boolean;
25
- }, React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
19
+ export declare function Field({ children, label, error, description, htmlFor, required, className, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
20
+ export declare const FormGroup: typeof Field;
@@ -11,53 +11,19 @@ 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 styled from '@emotion/styled';
15
- import { css } from '@emotion/react';
14
+ import clsx from 'clsx';
16
15
  import { Label } from '../Label/Label';
17
- const StyledForm = styled.form `
18
- display: flex;
19
- flex-direction: column;
20
- gap: 1.5rem;
21
- width: 100%;
22
- `;
23
- const StyledField = styled.div `
24
- display: flex;
25
- flex-direction: column;
26
- gap: 0.5rem;
27
- width: 100%;
28
-
29
- `;
30
- const StyledMessage = styled.span `
31
- font-size: 0.75rem;
32
- font-weight: 500;
33
-
34
- ${props => props.variant === 'error' && css `
35
- color: var(--error);
36
- font-weight: 700;
37
- text-transform: uppercase;
38
- animation: shake 0.3s ease-in-out;
39
- `}
40
-
41
- ${props => props.variant === 'description' && css `
42
- color: var(--muted-foreground);
43
- `}
44
-
45
- @keyframes shake {
46
- 0%, 100% { transform: translateX(0); }
47
- 25% { transform: translateX(-4px); }
48
- 75% { transform: translateX(4px); }
49
- }
50
- `;
16
+ import styles from './Form.module.css';
51
17
  export function Form(_a) {
52
- var { children } = _a, props = __rest(_a, ["children"]);
53
- return _jsx(StyledForm, Object.assign({}, props, { children: children }));
18
+ var { children, className } = _a, props = __rest(_a, ["children", "className"]);
19
+ return _jsx("form", Object.assign({ className: clsx(styles.form, className) }, props, { children: children }));
54
20
  }
55
21
  export function FormMessage(_a) {
56
- var { children, variant = 'description' } = _a, props = __rest(_a, ["children", "variant"]);
57
- return _jsx(StyledMessage, Object.assign({ variant: variant }, props, { children: children }));
22
+ var { children, variant = 'description', className } = _a, props = __rest(_a, ["children", "variant", "className"]);
23
+ return (_jsx("span", Object.assign({ className: clsx(styles.message, variant === 'error' && styles.error, variant === 'description' && styles.description, className) }, props, { children: children })));
58
24
  }
59
25
  export function Field(_a) {
60
- var { children, label, error, description, htmlFor, required } = _a, props = __rest(_a, ["children", "label", "error", "description", "htmlFor", "required"]);
61
- return (_jsxs(StyledField, Object.assign({ error: !!error }, props, { children: [label && (_jsx(Label, { htmlFor: htmlFor, required: required, children: label })), children, description && !error && (_jsx(FormMessage, { variant: "description", children: description })), error && typeof error === 'string' && (_jsx(FormMessage, { variant: "error", children: error }))] })));
26
+ var { children, label, error, description, htmlFor, required, className } = _a, props = __rest(_a, ["children", "label", "error", "description", "htmlFor", "required", "className"]);
27
+ return (_jsxs("div", Object.assign({ className: clsx(styles.field, className) }, props, { children: [label && (_jsx(Label, { htmlFor: htmlFor, required: required, children: label })), children, description && !error && (_jsx(FormMessage, { variant: "description", children: description })), error && typeof error === 'string' && (_jsx(FormMessage, { variant: "error", children: error }))] })));
62
28
  }
63
- export const FormGroup = StyledField;
29
+ export const FormGroup = Field;
@@ -0,0 +1,41 @@
1
+ .form {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 1.5rem;
5
+ width: 100%;
6
+ }
7
+
8
+ .field {
9
+ display: flex;
10
+ flex-direction: column;
11
+ gap: 0.5rem;
12
+ width: 100%;
13
+ }
14
+
15
+ .message {
16
+ font-size: 0.75rem;
17
+ font-weight: 500;
18
+ }
19
+
20
+ .error {
21
+ color: var(--error);
22
+ font-weight: 700;
23
+ text-transform: uppercase;
24
+ animation: shake 0.3s ease-in-out;
25
+ }
26
+
27
+ .description {
28
+ color: var(--muted-foreground);
29
+ }
30
+
31
+ @keyframes shake {
32
+ 0%, 100% {
33
+ transform: translateX(0);
34
+ }
35
+ 25% {
36
+ transform: translateX(-4px);
37
+ }
38
+ 75% {
39
+ transform: translateX(4px);
40
+ }
41
+ }
@@ -12,65 +12,9 @@ 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 { useState } from 'react';
15
- import styled from '@emotion/styled';
16
- import { css } from '@emotion/react';
15
+ import clsx from 'clsx';
17
16
  import { Label } from '../Label/Label';
18
- import { baseInteractiveStyles, focusStyles, errorStyles } from '../../styles/mixins';
19
- const InputContainer = styled.div `
20
- display: flex;
21
- flex-direction: column;
22
- gap: 0.5rem;
23
- width: 100%;
24
- `;
25
- const InputWrapper = styled.div `
26
- position: relative;
27
- display: flex;
28
- align-items: center;
29
- width: 100%;
30
- `;
31
- const StyledInput = styled.input `
32
- width: 100%;
33
- padding: 0.75rem 1rem;
34
- padding-left: ${props => props.hasStartAdornment ? '2rem' : '1rem'};
35
- padding-right: ${props => props.hasEndAdornment ? '2rem' : '1rem'};
36
- font-size: var(--text-base);
37
- background: var(--card-bg);
38
- color: var(--foreground);
39
-
40
- ${baseInteractiveStyles}
41
- ${focusStyles}
42
-
43
- &::placeholder {
44
- color: var(--muted);
45
- }
46
-
47
- ${props => props.isError && errorStyles}
48
- `;
49
- const Adornment = styled.span `
50
- position: absolute;
51
- ${props => props.position === 'start' ? 'left: 0.75rem;' : 'right: 0.75rem;'}
52
- color: var(--muted-foreground);
53
- font-size: 0.875rem;
54
- pointer-events: none;
55
- z-index: 1;
56
- `;
57
- const HelperText = styled.span `
58
- font-size: var(--text-xs);
59
- font-weight: var(--font-medium);
60
- color: ${props => props.isError ? 'var(--error)' : 'var(--muted-foreground)'};
61
-
62
- ${props => props.isError && css `
63
- font-weight: var(--font-bold);
64
- text-transform: uppercase;
65
- animation: input-shake 0.3s ease-in-out;
66
- `}
67
-
68
- @keyframes input-shake {
69
- 0%, 100% { transform: translateX(0); }
70
- 25% { transform: translateX(-4px); }
71
- 75% { transform: translateX(4px); }
72
- }
73
- `;
17
+ import styles from './Input.module.css';
74
18
  export function Input(_a) {
75
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"]);
76
20
  const [isFocused, setIsFocused] = useState(false);
@@ -92,5 +36,5 @@ export function Input(_a) {
92
36
  const displayValue = (!isFocused && format && value !== undefined)
93
37
  ? format(value)
94
38
  : value;
95
- return (_jsxs(InputContainer, { style: style, className: className, children: [label && (_jsx(Label, { htmlFor: id, required: required, children: label })), _jsxs(InputWrapper, { children: [startAdornment && _jsx(Adornment, { position: "start", children: startAdornment }), _jsx(StyledInput, Object.assign({ id: id, required: required, value: displayValue, hasStartAdornment: !!startAdornment, hasEndAdornment: !!endAdornment, isError: !!error, onBlur: handleBlur, onFocus: handleFocus }, props)), endAdornment && _jsx(Adornment, { position: "end", children: endAdornment })] }), helperText && !error && (_jsx(HelperText, { children: helperText })), error && (_jsx(HelperText, { isError: true, children: error }))] }));
39
+ return (_jsxs("div", { className: clsx(styles.container, className), style: style, children: [label && (_jsx(Label, { htmlFor: id, required: required, children: label })), _jsxs("div", { className: styles.wrapper, children: [startAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.start), children: startAdornment })), _jsx("input", Object.assign({ className: clsx(styles.input, startAdornment && styles.hasStartAdornment, endAdornment && styles.hasEndAdornment, error && styles.error), id: id, required: required, value: displayValue, onBlur: handleBlur, onFocus: handleFocus }, props)), endAdornment && (_jsx("span", { className: clsx(styles.adornment, styles.end), children: endAdornment }))] }), helperText && !error && (_jsx("span", { className: styles.helperText, children: helperText })), error && (_jsx("span", { className: clsx(styles.helperText, styles.error), children: error }))] }));
96
40
  }
@@ -0,0 +1,86 @@
1
+ .container {
2
+ display: flex;
3
+ flex-direction: column;
4
+ gap: 0.5rem;
5
+ width: 100%;
6
+ }
7
+
8
+ .wrapper {
9
+ position: relative;
10
+ display: flex;
11
+ align-items: center;
12
+ width: 100%;
13
+ }
14
+
15
+ .input {
16
+ width: 100%;
17
+ padding: 0.75rem 1rem;
18
+ font-size: var(--text-base);
19
+ background: var(--card-bg);
20
+ color: var(--foreground);
21
+ border: var(--border-width) solid var(--card-border);
22
+ border-radius: var(--radius);
23
+ box-shadow: var(--shadow-hard);
24
+ transition: all 0.1s ease;
25
+ outline: none;
26
+ }
27
+ .input:focus, .input:focus-visible, .input[aria-expanded=true] {
28
+ outline: none;
29
+ transform: translate(-2px, -2px);
30
+ box-shadow: 7px 7px 0px 0px var(--shadow-primary);
31
+ border-color: var(--primary);
32
+ }
33
+ .input::placeholder {
34
+ color: var(--muted);
35
+ }
36
+ .input.error {
37
+ border-color: var(--error);
38
+ box-shadow: 5px 5px 0px 0px var(--shadow-error);
39
+ }
40
+ .input.error:focus, .input.error:focus-visible {
41
+ border-color: var(--error);
42
+ box-shadow: 7px 7px 0px 0px var(--shadow-error);
43
+ }
44
+ .input.hasStartAdornment {
45
+ padding-left: 2rem;
46
+ }
47
+ .input.hasEndAdornment {
48
+ padding-right: 2rem;
49
+ }
50
+
51
+ .adornment {
52
+ position: absolute;
53
+ color: var(--muted-foreground);
54
+ font-size: 0.875rem;
55
+ pointer-events: none;
56
+ z-index: 1;
57
+ }
58
+ .adornment.start {
59
+ left: 0.75rem;
60
+ }
61
+ .adornment.end {
62
+ right: 0.75rem;
63
+ }
64
+
65
+ .helperText {
66
+ font-size: var(--text-xs);
67
+ font-weight: var(--font-medium);
68
+ color: var(--muted-foreground);
69
+ }
70
+ .helperText.error {
71
+ color: var(--error);
72
+ font-weight: var(--font-bold);
73
+ text-transform: uppercase;
74
+ animation: input-shake 0.3s ease-in-out;
75
+ }
76
+ @keyframes input-shake {
77
+ 0%, 100% {
78
+ transform: translateX(0);
79
+ }
80
+ 25% {
81
+ transform: translateX(-4px);
82
+ }
83
+ 75% {
84
+ transform: translateX(4px);
85
+ }
86
+ }
@@ -3,4 +3,4 @@ export interface LabelProps extends React.LabelHTMLAttributes<HTMLLabelElement>
3
3
  children: React.ReactNode;
4
4
  required?: boolean;
5
5
  }
6
- export declare function Label({ children, required, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
6
+ export declare function Label({ children, required, className, ...props }: LabelProps): import("react/jsx-runtime").JSX.Element;
@@ -11,28 +11,9 @@ 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 styled from '@emotion/styled';
15
- import { css } from '@emotion/react';
16
- const StyledLabel = styled.label `
17
- font-family: var(--font-heading);
18
- font-weight: var(--font-bold);
19
- font-size: var(--text-sm);
20
- color: var(--foreground);
21
- text-transform: uppercase;
22
- letter-spacing: 0.05em;
23
- display: flex;
24
- align-items: center;
25
- gap: 0.25rem;
26
-
27
- ${props => props.required && css `
28
- &::after {
29
- content: '*';
30
- color: var(--error);
31
- margin-left: 0.25rem;
32
- }
33
- `}
34
- `;
14
+ import clsx from 'clsx';
15
+ import styles from './Label.module.css';
35
16
  export function Label(_a) {
36
- var { children, required } = _a, props = __rest(_a, ["children", "required"]);
37
- return _jsx(StyledLabel, Object.assign({ required: required }, props, { children: children }));
17
+ var { children, required, className } = _a, props = __rest(_a, ["children", "required", "className"]);
18
+ return (_jsx("label", Object.assign({ className: clsx(styles.label, required && styles.required, className) }, props, { children: children })));
38
19
  }
@@ -0,0 +1,16 @@
1
+ .label {
2
+ font-family: var(--font-heading);
3
+ font-weight: var(--font-bold);
4
+ font-size: var(--text-sm);
5
+ color: var(--foreground);
6
+ text-transform: uppercase;
7
+ letter-spacing: 0.05em;
8
+ display: flex;
9
+ align-items: center;
10
+ gap: 0.25rem;
11
+ }
12
+ .label.required::after {
13
+ content: "*";
14
+ color: var(--error);
15
+ margin-left: 0.25rem;
16
+ }
@@ -4,7 +4,7 @@ interface GridProps extends React.HTMLAttributes<HTMLDivElement> {
4
4
  columns?: string;
5
5
  gap?: string;
6
6
  }
7
- export declare function Grid({ children, columns, gap, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
7
+ export declare function Grid({ children, columns, gap, className, style, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
8
8
  interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
9
9
  children: React.ReactNode;
10
10
  direction?: 'row' | 'column';
@@ -13,5 +13,5 @@ interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {
13
13
  gap?: string;
14
14
  wrap?: boolean;
15
15
  }
16
- export declare function Flex({ children, direction, justify, align, gap, wrap, ...props }: FlexProps): import("react/jsx-runtime").JSX.Element;
16
+ export declare function Flex({ children, direction, justify, align, gap, wrap, className, style, ...props }: FlexProps): import("react/jsx-runtime").JSX.Element;
17
17
  export {};
@@ -1,6 +1,4 @@
1
1
  'use client';
2
- 'use client';
3
- 'use client';
4
2
  var __rest = (this && this.__rest) || function (s, e) {
5
3
  var t = {};
6
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -13,25 +11,12 @@ var __rest = (this && this.__rest) || function (s, e) {
13
11
  return t;
14
12
  };
15
13
  import { jsx as _jsx } from "react/jsx-runtime";
16
- import styled from '@emotion/styled';
17
- const StyledGrid = styled.div `
18
- display: grid;
19
- grid-template-columns: ${props => props.columns};
20
- gap: ${props => props.gap};
21
- `;
14
+ import styles from './Layout.module.css';
22
15
  export function Grid(_a) {
23
- var { children, columns = '1fr', gap = '1rem' } = _a, props = __rest(_a, ["children", "columns", "gap"]);
24
- return (_jsx(StyledGrid, Object.assign({ columns: columns, gap: gap }, props, { children: children })));
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 })));
25
18
  }
26
- const StyledFlex = styled.div `
27
- display: flex;
28
- flex-direction: ${props => props.direction};
29
- justify-content: ${props => props.justify};
30
- align-items: ${props => props.align};
31
- gap: ${props => props.gap};
32
- flex-wrap: ${props => props.$wrap ? 'wrap' : 'nowrap'};
33
- `;
34
19
  export function Flex(_a) {
35
- var { children, direction = 'row', justify = 'flex-start', align = 'stretch', gap = '0', wrap = false } = _a, props = __rest(_a, ["children", "direction", "justify", "align", "gap", "wrap"]);
36
- return (_jsx(StyledFlex, Object.assign({ direction: direction, justify: justify, align: align, gap: gap, "$wrap": wrap }, props, { children: children })));
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 })));
37
22
  }
@@ -0,0 +1,7 @@
1
+ .grid {
2
+ display: grid;
3
+ }
4
+
5
+ .flex {
6
+ display: flex;
7
+ }
@@ -3,6 +3,7 @@ export type LinkVariant = 'default' | 'button' | 'subtle';
3
3
  interface LinkProps extends React.AnchorHTMLAttributes<HTMLAnchorElement> {
4
4
  children: React.ReactNode;
5
5
  variant?: LinkVariant;
6
+ className?: string;
6
7
  }
7
- export declare function Link({ children, variant, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
8
+ export declare function Link({ children, variant, className, ...props }: LinkProps): import("react/jsx-runtime").JSX.Element;
8
9
  export {};
@@ -11,67 +11,9 @@ 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 styled from '@emotion/styled';
15
- import { css } from '@emotion/react';
16
- const StyledLink = styled.a `
17
- display: inline-flex;
18
- align-items: center;
19
- justify-content: center;
20
- font-weight: 700;
21
- text-decoration: none;
22
- transition: all var(--duration-fast) var(--ease-in-out);
23
- cursor: pointer;
24
-
25
- /* Default Variant */
26
- ${props => (!props.variant || props.variant === 'default') && css `
27
- color: var(--foreground);
28
- border-bottom: 2px solid transparent;
29
-
30
- &:hover {
31
- color: var(--primary);
32
- border-bottom-color: var(--primary);
33
- transform: translateY(-1px);
34
- }
35
- `}
36
-
37
- /* Subtle Variant */
38
- ${props => props.variant === 'subtle' && css `
39
- color: var(--muted-foreground);
40
- font-size: 0.875rem;
41
- text-transform: uppercase;
42
- letter-spacing: 0.05em;
43
-
44
- &:hover {
45
- color: var(--foreground);
46
- text-decoration: underline;
47
- }
48
- `}
49
-
50
- /* Button-like Variant */
51
- ${props => props.variant === 'button' && css `
52
- background-color: var(--primary);
53
- color: var(--primary-foreground);
54
- border: var(--border-width) solid var(--card-border);
55
- border-radius: var(--radius);
56
- padding: 0.75rem 1.5rem;
57
- text-transform: uppercase;
58
- letter-spacing: 0.05em;
59
- box-shadow: var(--shadow-hover);
60
- font-size: 0.75rem;
61
-
62
- &:hover {
63
- filter: brightness(1.1);
64
- transform: translate(-2px, -2px);
65
- box-shadow: var(--shadow-hover);
66
- }
67
-
68
- &:active {
69
- transform: translate(0, 0);
70
- box-shadow: none;
71
- }
72
- `}
73
- `;
14
+ import clsx from 'clsx';
15
+ import styles from './Link.module.css';
74
16
  export function Link(_a) {
75
- var { children, variant = 'default' } = _a, props = __rest(_a, ["children", "variant"]);
76
- return (_jsx(StyledLink, Object.assign({ variant: variant }, props, { children: children })));
17
+ var { children, variant = 'default', className } = _a, props = __rest(_a, ["children", "variant", "className"]);
18
+ return (_jsx("a", Object.assign({ className: clsx(styles.link, styles[variant], className) }, props, { children: children })));
77
19
  }
@@ -0,0 +1,48 @@
1
+ .link {
2
+ display: inline-flex;
3
+ align-items: center;
4
+ justify-content: center;
5
+ font-weight: 700;
6
+ text-decoration: none;
7
+ transition: all 0.2s ease-in-out;
8
+ cursor: pointer;
9
+ }
10
+ .link.default {
11
+ color: var(--foreground);
12
+ border-bottom: 2px solid transparent;
13
+ }
14
+ .link.default:hover {
15
+ color: var(--primary);
16
+ border-bottom-color: var(--primary);
17
+ transform: translateY(-1px);
18
+ }
19
+ .link.subtle {
20
+ color: var(--muted-foreground);
21
+ font-size: 0.875rem;
22
+ text-transform: uppercase;
23
+ letter-spacing: 0.05em;
24
+ }
25
+ .link.subtle:hover {
26
+ color: var(--foreground);
27
+ text-decoration: underline;
28
+ }
29
+ .link.button {
30
+ background-color: var(--primary);
31
+ color: var(--primary-foreground);
32
+ border: var(--border-width) solid var(--card-border);
33
+ border-radius: var(--radius);
34
+ padding: 0.75rem 1.5rem;
35
+ text-transform: uppercase;
36
+ letter-spacing: 0.05em;
37
+ box-shadow: var(--shadow-hover);
38
+ font-size: 0.75rem;
39
+ }
40
+ .link.button:hover {
41
+ filter: brightness(1.1);
42
+ transform: translate(-2px, -2px);
43
+ box-shadow: var(--shadow-hover);
44
+ }
45
+ .link.button:active {
46
+ transform: translate(0, 0);
47
+ box-shadow: none;
48
+ }
@@ -3,64 +3,21 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
3
3
  import React, { useEffect, useRef } from 'react';
4
4
  import { createPortal } from 'react-dom';
5
5
  import { X } from 'lucide-react';
6
- import styled from '@emotion/styled';
7
- import { Card, Button, Flex } from '../..';
6
+ import clsx from 'clsx';
7
+ import { Card } from '../Card/Card';
8
+ import { Button } from '../Button/Button';
9
+ import { Flex } from '../Layout/Layout';
10
+ import styles from './Modal.module.css';
8
11
  const ModalContext = React.createContext({ onClose: () => { } });
9
- const Overlay = styled.div `
10
- position: fixed;
11
- inset: 0;
12
- z-index: var(--z-modal);
13
- display: flex;
14
- align-items: center;
15
- justify-content: center;
16
- padding: var(--spacing-md);
17
- backdrop-filter: blur(4px);
18
- background-color: rgba(0, 0, 0, var(--overlay-opacity));
19
- animation: fadeIn 0.2s ease-out;
20
-
21
- @keyframes fadeIn {
22
- from { opacity: 0; }
23
- to { opacity: 1; }
24
- }
25
- `;
26
- const ContentContainer = styled.div `
27
- width: 100%;
28
- max-width: 28rem;
29
- animation: slideUp 0.3s ease-out;
30
-
31
- @keyframes slideUp {
32
- from { transform: translateY(20px); opacity: 0; }
33
- to { transform: translateY(0); opacity: 1; }
34
- }
35
- `;
36
- const StyledHeader = styled(Flex) `
37
- padding: var(--spacing-lg);
38
- border-bottom: var(--border-width) solid var(--card-border);
39
- background: var(--background);
40
-
41
- h2 {
42
- font-size: var(--text-xl);
43
- font-weight: bold;
44
- margin: 0;
45
- }
46
- `;
47
- const StyledBody = styled.div `
48
- padding: var(--spacing-lg);
49
- `;
50
- const StyledFooter = styled.div `
51
- padding: var(--spacing-lg);
52
- border-top: var(--border-width) solid var(--card-border);
53
- background: var(--background);
54
- `;
55
12
  export function ModalHeader({ children, className }) {
56
13
  const { onClose } = React.useContext(ModalContext);
57
- return (_jsxs(StyledHeader, { justify: "space-between", align: "center", className: className, children: [_jsx("h2", { children: children }), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: _jsx(X, { size: 20, strokeWidth: 2.5 }) })] }));
14
+ return (_jsxs(Flex, { align: "center", justify: "space-between", className: clsx(styles.header, className), children: [_jsx("h2", { children: children }), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, children: _jsx(X, { size: 20, strokeWidth: 2.5 }) })] }));
58
15
  }
59
16
  export function ModalBody({ children, className }) {
60
- return (_jsx(StyledBody, { className: className, children: children }));
17
+ return (_jsx("div", { className: clsx(styles.body, className), children: children }));
61
18
  }
62
19
  export function ModalFooter({ children, className }) {
63
- return (_jsx(StyledFooter, { className: className, children: children }));
20
+ return (_jsx("div", { className: clsx(styles.footer, className), children: children }));
64
21
  }
65
22
  export function Modal({ isOpen, onClose, title, children, footer }) {
66
23
  const overlayRef = useRef(null);
@@ -85,5 +42,5 @@ export function Modal({ isOpen, onClose, title, children, footer }) {
85
42
  onClose();
86
43
  }
87
44
  };
88
- return createPortal(_jsx(ModalContext.Provider, { value: { onClose }, children: _jsx(Overlay, { ref: overlayRef, onClick: handleOverlayClick, children: _jsx(ContentContainer, { children: _jsx(Card, { style: { padding: 0, overflow: 'hidden' }, children: title ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { children: title }), _jsx(ModalBody, { children: children }), footer && _jsx(ModalFooter, { children: footer })] })) : (children) }) }) }) }), document.body);
45
+ return createPortal(_jsx(ModalContext.Provider, { value: { onClose }, children: _jsx("div", { className: styles.overlay, ref: overlayRef, onClick: handleOverlayClick, children: _jsx("div", { className: styles.contentContainer, children: _jsx(Card, { style: { padding: 0, overflow: 'hidden' }, children: title ? (_jsxs(_Fragment, { children: [_jsx(ModalHeader, { children: title }), _jsx(ModalBody, { children: children }), footer && _jsx(ModalFooter, { children: footer })] })) : (children) }) }) }) }), document.body);
89
46
  }