doom-design-system 0.3.3 → 0.3.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (34) hide show
  1. package/README.md +10 -6
  2. package/dist/components/Badge/Badge.d.ts +2 -2
  3. package/dist/components/Badge/Badge.js +4 -4
  4. package/dist/components/Badge/Badge.module.css +6 -0
  5. package/dist/components/Button/Button.d.ts +3 -3
  6. package/dist/components/Button/Button.js +6 -6
  7. package/dist/components/Button/Button.module.css +30 -6
  8. package/dist/components/Drawer/Drawer.js +1 -1
  9. package/dist/components/Drawer/Drawer.module.css +0 -22
  10. package/dist/components/FileUpload/FileUpload.d.ts +32 -0
  11. package/dist/components/FileUpload/FileUpload.js +238 -0
  12. package/dist/components/FileUpload/FileUpload.module.css +335 -0
  13. package/dist/components/FileUpload/index.d.ts +2 -0
  14. package/dist/components/FileUpload/index.js +1 -0
  15. package/dist/components/Layout/Layout.d.ts +12 -8
  16. package/dist/components/Layout/Layout.js +13 -11
  17. package/dist/components/Layout/Layout.module.css +29 -0
  18. package/dist/components/Link/Link.module.css +12 -5
  19. package/dist/components/Modal/Modal.js +1 -1
  20. package/dist/components/Modal/Modal.module.css +0 -36
  21. package/dist/components/Sheet/Sheet.js +1 -1
  22. package/dist/components/Sheet/Sheet.module.css +0 -22
  23. package/dist/components/Slat/Slat.d.ts +14 -0
  24. package/dist/components/Slat/Slat.js +27 -0
  25. package/dist/components/Slat/Slat.module.css +101 -0
  26. package/dist/components/Slat/index.d.ts +2 -0
  27. package/dist/components/Slat/index.js +1 -0
  28. package/dist/index.d.ts +40 -38
  29. package/dist/index.js +40 -38
  30. package/dist/styles/globals.css +238 -0
  31. package/dist/styles/themes/definitions.d.ts +3 -3
  32. package/dist/styles/themes/definitions.js +3 -3
  33. package/dist/tsconfig.build.tsbuildinfo +1 -1
  34. package/package.json +1 -1
@@ -0,0 +1,335 @@
1
+ .window {
2
+ background-color: var(--card-bg);
3
+ border: var(--border-width) solid var(--card-border);
4
+ border-radius: var(--radius);
5
+ box-shadow: var(--shadow-hard);
6
+ padding: 0;
7
+ display: flex;
8
+ flex-direction: column;
9
+ overflow: hidden;
10
+ position: relative;
11
+ transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
12
+ width: 100%;
13
+ max-width: 100%;
14
+ min-width: 280px;
15
+ }
16
+ .window.disabled {
17
+ cursor: not-allowed;
18
+ opacity: 0.6;
19
+ cursor: not-allowed !important;
20
+ background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px) !important;
21
+ }
22
+ .window.disabled:hover {
23
+ transform: none !important;
24
+ filter: none !important;
25
+ }
26
+ .window.disabled {
27
+ /*
28
+ .window should be able to override all children css and this is an example of that
29
+ */
30
+ }
31
+ .window.disabled * {
32
+ pointer-events: none;
33
+ }
34
+ .window.disabled::after {
35
+ content: "";
36
+ position: absolute;
37
+ inset: 0;
38
+ pointer-events: none;
39
+ z-index: 20;
40
+ }
41
+ .window.void {
42
+ border-color: transparent;
43
+ box-shadow: 0 0 0 4px var(--foreground);
44
+ transform: scale(1.01);
45
+ cursor: wait;
46
+ }
47
+ .window.void .header {
48
+ background-color: var(--common-black);
49
+ color: var(--background);
50
+ border-bottom: none;
51
+ }
52
+ .window.void .header > * {
53
+ --primary: var(--common-white);
54
+ --primary-foreground: var(--common-black);
55
+ }
56
+ .window.void .body {
57
+ background-color: var(--common-black);
58
+ cursor: wait;
59
+ margin-top: -1px;
60
+ position: relative;
61
+ z-index: 1;
62
+ overflow: hidden;
63
+ }
64
+ .window.void .body::before, .window.void .body::after {
65
+ content: "";
66
+ position: absolute;
67
+ inset: -50%;
68
+ width: 200%;
69
+ height: 200%;
70
+ background-image: radial-gradient(1px 1px at 20% 30%, #fff 100%, transparent), radial-gradient(1px 1px at 40% 70%, #fff 100%, transparent), radial-gradient(1px 1px at 60% 40%, #fff 100%, transparent), radial-gradient(1px 1px at 80% 80%, #fff 100%, transparent), radial-gradient(1px 1px at 10% 10%, #fff 100%, transparent), radial-gradient(1px 1px at 30% 50%, #fff 100%, transparent), radial-gradient(1px 1px at 50% 20%, #fff 100%, transparent), radial-gradient(1px 1px at 70% 90%, #fff 100%, transparent), radial-gradient(1px 1px at 90% 30%, #fff 100%, transparent), radial-gradient(1.5px 1.5px at 15% 75%, #fff 100%, transparent), radial-gradient(1px 1px at 85% 15%, #fff 100%, transparent), radial-gradient(1px 1px at 55% 65%, #fff 100%, transparent);
71
+ background-size: 50% 50%;
72
+ opacity: 0.5;
73
+ z-index: 0;
74
+ animation: consume-stars 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
75
+ pointer-events: none;
76
+ }
77
+ .window.void .body::after {
78
+ animation-name: consume-stars-alt;
79
+ animation-delay: -3s;
80
+ background-position: 33% 33%;
81
+ opacity: 0.3;
82
+ }
83
+ .window.void .body .starField {
84
+ position: absolute;
85
+ inset: 0;
86
+ pointer-events: none;
87
+ z-index: 0;
88
+ overflow: hidden;
89
+ }
90
+ .window.void .body .starField::before, .window.void .body .starField::after {
91
+ content: "";
92
+ position: absolute;
93
+ inset: -50%;
94
+ width: 200%;
95
+ height: 200%;
96
+ background-image: radial-gradient(1px 1px at 25% 35%, #fff 100%, transparent), radial-gradient(1px 1px at 45% 75%, #fff 100%, transparent), radial-gradient(1px 1px at 65% 45%, #fff 100%, transparent), radial-gradient(1px 1px at 85% 85%, #fff 100%, transparent), radial-gradient(1px 1px at 15% 15%, #fff 100%, transparent), radial-gradient(1px 1px at 35% 55%, #fff 100%, transparent), radial-gradient(1px 1px at 55% 25%, #fff 100%, transparent), radial-gradient(1px 1px at 75% 95%, #fff 100%, transparent), radial-gradient(1px 1px at 95% 35%, #fff 100%, transparent), radial-gradient(1.5px 1.5px at 20% 80%, #fff 100%, transparent), radial-gradient(1px 1px at 90% 20%, #fff 100%, transparent), radial-gradient(1px 1px at 60% 70%, #fff 100%, transparent);
97
+ background-size: 50% 50%;
98
+ opacity: 0.5;
99
+ animation: consume-stars 6s cubic-bezier(0.4, 0, 0.6, 1) infinite;
100
+ animation-delay: -1.5s;
101
+ }
102
+ .window.void .body .starField::after {
103
+ animation-name: consume-stars-alt;
104
+ animation-delay: -4.5s;
105
+ background-position: 40% 40%;
106
+ opacity: 0.3;
107
+ }
108
+ .window.void .headerContent,
109
+ .window.void .headerTitle {
110
+ opacity: 0;
111
+ visibility: hidden;
112
+ }
113
+ .window.void .voidIconWrapper,
114
+ .window.void .voidText,
115
+ .window.void .secondary,
116
+ .window.void .helperText {
117
+ opacity: 0;
118
+ transform: scale(0.9);
119
+ pointer-events: none;
120
+ }
121
+
122
+ .header {
123
+ background-color: var(--primary);
124
+ color: var(--primary-foreground);
125
+ padding: var(--spacing-sm) var(--spacing-md);
126
+ border-bottom: var(--border-width) solid var(--border-strong);
127
+ user-select: none;
128
+ min-height: 56px;
129
+ transition: all 0.4s ease;
130
+ }
131
+ @media (max-width: 480px) {
132
+ .header {
133
+ padding: var(--spacing-sm);
134
+ min-height: 48px;
135
+ }
136
+ }
137
+ @media (max-width: 360px) {
138
+ .header {
139
+ padding: var(--spacing-md);
140
+ }
141
+ }
142
+ .header > * {
143
+ --primary: var(--primary-foreground);
144
+ --primary-foreground: var(--primary);
145
+ --foreground: var(--primary-foreground);
146
+ --muted-foreground: var(--primary-foreground);
147
+ }
148
+ .header.errorHeader {
149
+ background-color: var(--error);
150
+ color: var(--error-foreground);
151
+ }
152
+ .header.disabledHeader {
153
+ background-color: var(--muted);
154
+ color: var(--muted-foreground);
155
+ opacity: 0.6;
156
+ cursor: not-allowed !important;
157
+ background-image: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0, 0, 0, 0.05) 10px, rgba(0, 0, 0, 0.05) 20px) !important;
158
+ }
159
+ .header.disabledHeader:hover {
160
+ transform: none !important;
161
+ filter: none !important;
162
+ }
163
+ .header.disabledHeader {
164
+ opacity: 1;
165
+ }
166
+
167
+ .headerContent {
168
+ flex: 1;
169
+ min-width: 0;
170
+ }
171
+
172
+ .headerTitle {
173
+ font-family: var(--font-heading);
174
+ font-weight: 800;
175
+ font-size: var(--text-sm);
176
+ letter-spacing: 0.05em;
177
+ text-transform: uppercase;
178
+ line-height: 1.2;
179
+ display: block;
180
+ }
181
+
182
+ .requiredMark {
183
+ display: inline-flex;
184
+ vertical-align: middle;
185
+ margin-left: 2px;
186
+ color: inherit;
187
+ transform: translateY(-2px);
188
+ }
189
+
190
+ .body {
191
+ padding: var(--spacing-lg);
192
+ background-color: var(--card-bg);
193
+ min-height: 200px;
194
+ display: flex;
195
+ flex-direction: column;
196
+ align-items: center;
197
+ justify-content: center;
198
+ cursor: pointer;
199
+ transition: background-color 0.2s ease;
200
+ position: relative;
201
+ }
202
+ @media (max-width: 640px) {
203
+ .body {
204
+ padding: var(--spacing-md);
205
+ min-height: 160px;
206
+ }
207
+ }
208
+ @media (max-width: 360px) {
209
+ .body {
210
+ padding: var(--spacing-sm) var(--spacing-md);
211
+ }
212
+ }
213
+ .body.hasFiles {
214
+ justify-content: flex-start;
215
+ align-items: stretch;
216
+ cursor: default;
217
+ }
218
+ .body.dragging, .body.error {
219
+ background-color: var(--surface-accent);
220
+ }
221
+
222
+ .emptyState {
223
+ width: 100%;
224
+ cursor: pointer;
225
+ outline: none;
226
+ border-radius: var(--radius);
227
+ transition: background-color 0.2s ease;
228
+ }
229
+ .emptyState:focus-visible {
230
+ box-shadow: 0 0 0 2px var(--background), 0 0 0 4px var(--primary);
231
+ }
232
+ .void .emptyState:hover {
233
+ background-color: transparent;
234
+ cursor: wait;
235
+ }
236
+ .emptyState {
237
+ text-align: center;
238
+ }
239
+
240
+ .voidIconWrapper {
241
+ transition: all 0.3s ease;
242
+ padding: var(--spacing-md);
243
+ margin-bottom: var(--spacing-sm);
244
+ }
245
+
246
+ .icon {
247
+ color: var(--muted-foreground);
248
+ transition: all 0.3s ease;
249
+ }
250
+ @media (max-width: 480px) {
251
+ .icon {
252
+ width: 32px;
253
+ height: 32px;
254
+ }
255
+ }
256
+
257
+ .secondary {
258
+ color: var(--muted-foreground);
259
+ opacity: 0.8;
260
+ }
261
+
262
+ .hiddenInput {
263
+ display: none;
264
+ }
265
+
266
+ .fileList {
267
+ width: 100%;
268
+ flex: 1;
269
+ }
270
+
271
+ .removeButton {
272
+ width: 32px;
273
+ height: 32px;
274
+ padding: 0 !important;
275
+ flex-shrink: 0;
276
+ }
277
+
278
+ @keyframes consume-stars {
279
+ 0% {
280
+ transform: scale(2.5) rotate(0deg);
281
+ opacity: 0;
282
+ }
283
+ 5% {
284
+ opacity: 1;
285
+ }
286
+ 95% {
287
+ opacity: 1;
288
+ }
289
+ 100% {
290
+ transform: scale(0) rotate(360deg);
291
+ opacity: 0;
292
+ }
293
+ }
294
+ @keyframes consume-stars-alt {
295
+ 0% {
296
+ transform: scale(3) rotate(45deg);
297
+ opacity: 0;
298
+ }
299
+ 5% {
300
+ opacity: 1;
301
+ }
302
+ 95% {
303
+ opacity: 1;
304
+ }
305
+ 100% {
306
+ transform: scale(0) rotate(405deg);
307
+ opacity: 0;
308
+ }
309
+ }
310
+ .previewWrapper {
311
+ width: 64px;
312
+ height: 64px;
313
+ border-radius: var(--radius);
314
+ overflow: hidden;
315
+ border: var(--border-width) solid var(--border-strong);
316
+ position: relative;
317
+ background: var(--surface-accent);
318
+ flex-shrink: 0;
319
+ }
320
+
321
+ .previewImg {
322
+ width: 100%;
323
+ height: 100%;
324
+ object-fit: cover;
325
+ opacity: 0;
326
+ transition: opacity 0.3s ease;
327
+ }
328
+ .previewImg.loaded {
329
+ opacity: 1;
330
+ }
331
+
332
+ .previewSkeleton {
333
+ position: absolute;
334
+ inset: 0;
335
+ }
@@ -0,0 +1,2 @@
1
+ export { FileUpload } from "./FileUpload";
2
+ export type { FileUploadProps } from "./FileUpload";
@@ -0,0 +1 @@
1
+ export { FileUpload } from "./FileUpload.js";
@@ -1,4 +1,4 @@
1
- import React, { ElementType } from 'react';
1
+ import React, { ElementType } from "react";
2
2
  interface LayoutProps extends React.HTMLAttributes<HTMLElement> {
3
3
  children?: React.ReactNode;
4
4
  as?: ElementType;
@@ -9,19 +9,23 @@ export interface GridProps extends LayoutProps {
9
9
  }
10
10
  export declare function Grid({ children, columns, gap, className, style, as: Component, ...props }: GridProps): import("react/jsx-runtime").JSX.Element;
11
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';
14
- align?: 'flex-start' | 'flex-end' | 'center' | 'stretch' | 'baseline';
12
+ direction?: "row" | "column" | "row-reverse" | "column-reverse";
13
+ justify?: "flex-start" | "flex-end" | "center" | "space-between" | "space-around" | "space-evenly";
14
+ align?: "flex-start" | "flex-end" | "center" | "stretch" | "baseline";
15
15
  gap?: string | number;
16
- wrap?: boolean | 'wrap' | 'nowrap' | 'wrap-reverse';
16
+ wrap?: boolean | "wrap" | "nowrap" | "wrap-reverse";
17
17
  }
18
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';
19
+ export interface StackProps extends Omit<FlexProps, "direction"> {
20
+ direction?: "column" | "column-reverse" | "row" | "row-reverse";
21
21
  }
22
22
  export declare function Stack({ children, direction, gap, align, ...props }: StackProps): import("react/jsx-runtime").JSX.Element;
23
+ export interface SwitcherProps extends FlexProps {
24
+ threshold?: "xxs" | "xs" | "sm" | "md";
25
+ }
26
+ export declare function Switcher({ children, threshold, className, ...props }: SwitcherProps): import("react/jsx-runtime").JSX.Element;
23
27
  export interface ContainerProps extends LayoutProps {
24
- maxWidth?: 'sm' | 'md' | 'lg' | 'xl' | 'fluid';
28
+ maxWidth?: "sm" | "md" | "lg" | "xl" | "fluid";
25
29
  }
26
30
  export declare function Container({ children, maxWidth, className, as: Component, ...props }: ContainerProps): import("react/jsx-runtime").JSX.Element;
27
31
  export {};
@@ -1,4 +1,4 @@
1
- 'use client';
1
+ "use client";
2
2
  var __rest = (this && this.__rest) || function (s, e) {
3
3
  var t = {};
4
4
  for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
@@ -11,27 +11,29 @@ 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';
15
- import styles from './Layout.module.css';
14
+ import clsx from "clsx";
15
+ import styles from "./Layout.module.css";
16
16
  export function Grid(_a) {
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;
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
19
  return (_jsx(Component, Object.assign({ className: clsx(styles.grid, className), style: Object.assign({ gridTemplateColumns,
20
20
  gap }, style) }, props, { children: children })));
21
21
  }
22
22
  export function Flex(_a) {
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;
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" ? (wrap ? "wrap" : "nowrap") : wrap;
27
25
  return (_jsx(Component, Object.assign({ className: clsx(styles.flex, className), style: Object.assign({ flexDirection: direction, justifyContent: justify, alignItems: align, gap,
28
26
  flexWrap }, style) }, props, { children: children })));
29
27
  }
30
28
  export function Stack(_a) {
31
- var { children, direction = 'column', gap = '1rem', align = 'stretch' } = _a, props = __rest(_a, ["children", "direction", "gap", "align"]);
29
+ var { children, direction = "column", gap = "1rem", align = "stretch" } = _a, props = __rest(_a, ["children", "direction", "gap", "align"]);
32
30
  return (_jsx(Flex, Object.assign({ direction: direction, gap: gap, align: align }, props, { children: children })));
33
31
  }
32
+ export function Switcher(_a) {
33
+ var { children, threshold = "xs", className } = _a, props = __rest(_a, ["children", "threshold", "className"]);
34
+ return (_jsx(Flex, Object.assign({ className: clsx(styles.switcher, styles[`switch-${threshold}`], className) }, props, { children: children })));
35
+ }
34
36
  export function Container(_a) {
35
- var { children, maxWidth = 'xl', className, as: Component = 'div' } = _a, props = __rest(_a, ["children", "maxWidth", "className", "as"]);
37
+ var { children, maxWidth = "xl", className, as: Component = "div" } = _a, props = __rest(_a, ["children", "maxWidth", "className", "as"]);
36
38
  return (_jsx(Component, Object.assign({ className: clsx(styles.container, styles[maxWidth], className) }, props, { children: children })));
37
39
  }
@@ -28,3 +28,32 @@
28
28
  .container.fluid {
29
29
  max-width: 100%;
30
30
  }
31
+
32
+ .switcher {
33
+ display: flex;
34
+ flex-direction: row;
35
+ }
36
+ @media (max-width: 360px) {
37
+ .switcher.switch-xxs {
38
+ flex-direction: column;
39
+ align-items: flex-start !important;
40
+ }
41
+ }
42
+ @media (max-width: 480px) {
43
+ .switcher.switch-xs {
44
+ flex-direction: column;
45
+ align-items: flex-start !important;
46
+ }
47
+ }
48
+ @media (max-width: 640px) {
49
+ .switcher.switch-sm {
50
+ flex-direction: column;
51
+ align-items: flex-start !important;
52
+ }
53
+ }
54
+ @media (max-width: 768px) {
55
+ .switcher.switch-md {
56
+ flex-direction: column;
57
+ align-items: flex-start !important;
58
+ }
59
+ }
@@ -8,13 +8,20 @@
8
8
  cursor: pointer;
9
9
  }
10
10
  .link.default {
11
- color: var(--foreground);
12
- border-bottom: 2px solid transparent;
11
+ color: var(--primary);
12
+ text-decoration: underline;
13
+ text-decoration-thickness: 2px;
14
+ text-underline-offset: 2px;
13
15
  }
14
16
  .link.default:hover {
15
- color: var(--primary);
16
- border-bottom-color: var(--primary);
17
- transform: translateY(-1px);
17
+ filter: brightness(1.2);
18
+ }
19
+ .link.default:visited {
20
+ color: var(--primary-dark, var(--primary));
21
+ filter: brightness(0.8);
22
+ }
23
+ .link.default:active {
24
+ filter: brightness(0.9);
18
25
  }
19
26
  .link.subtle {
20
27
  color: var(--muted-foreground);
@@ -25,7 +25,7 @@ const ModalContext = React.createContext({
25
25
  });
26
26
  export function ModalHeader({ children, className, id }) {
27
27
  const { onClose, titleId } = React.useContext(ModalContext);
28
- return (_jsxs(Flex, { align: "center", justify: "space-between", className: clsx(styles.header, className), children: [_jsx("div", { id: id || titleId, className: styles.headerContent, children: children }), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, "aria-label": "Close modal", className: styles.closeButton, children: _jsx(X, { size: 20, strokeWidth: 2.5 }) })] }));
28
+ return (_jsxs(Flex, { align: "center", justify: "space-between", className: clsx(styles.header, className), children: [_jsx("div", { id: id || titleId, className: styles.headerContent, children: children }), _jsx(Button, { variant: "danger", size: "sm", onClick: onClose, "aria-label": "Close modal", className: styles.closeButton, children: _jsx(X, { size: 20, strokeWidth: 2.5 }) })] }));
29
29
  }
30
30
  export function ModalBody({ children, className, }) {
31
31
  return _jsx("div", { className: clsx(styles.body, className), children: children });
@@ -69,14 +69,6 @@
69
69
  border-color: var(--border-strong) !important;
70
70
  box-shadow: var(--shadow-hard) !important;
71
71
  }
72
- .modalCard.solid .closeButton:hover {
73
- transform: translate(-2px, -2px);
74
- box-shadow: var(--shadow-hover) !important;
75
- }
76
- .modalCard.solid .closeButton:active {
77
- transform: translate(2px, 2px);
78
- box-shadow: none !important;
79
- }
80
72
 
81
73
  .header {
82
74
  padding: var(--spacing-lg);
@@ -93,34 +85,6 @@
93
85
  max-width: 85%;
94
86
  }
95
87
 
96
- .closeButton {
97
- flex-shrink: 0;
98
- background-color: var(--error) !important;
99
- color: var(--error-foreground) !important;
100
- border: var(--border-width) solid var(--card-border) !important;
101
- border-radius: var(--radius) !important;
102
- height: 36px !important;
103
- width: 36px !important;
104
- min-width: 36px !important;
105
- display: flex !important;
106
- align-items: center;
107
- justify-content: center;
108
- padding: 0 !important;
109
- /* Use standardized shadow-error mixed with black for depth */
110
- box-shadow: var(--shadow-hard) !important;
111
- transition: all 0.2s ease;
112
- cursor: pointer;
113
- }
114
- .closeButton:hover {
115
- filter: brightness(1.1);
116
- transform: translate(-2px, -2px);
117
- box-shadow: var(--shadow-hover) !important;
118
- }
119
- .closeButton:active {
120
- transform: translate(2px, 2px);
121
- box-shadow: none !important;
122
- }
123
-
124
88
  .modalContent {
125
89
  background-color: var(--card-bg);
126
90
  padding-top: 1px;
@@ -34,5 +34,5 @@ export function Sheet({ isOpen, onClose, title, children, footer, variant = "def
34
34
  }, [isOpen, onClose]);
35
35
  if (!mounted)
36
36
  return null;
37
- return createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(styles.overlay, isOpen && styles.isOpen), onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { className: clsx(styles.panel, styles[variant], isOpen && styles.isOpen, className), role: "dialog", "aria-modal": "true", "aria-labelledby": title ? titleId : undefined, "aria-label": !title ? "Sheet" : undefined, children: [_jsxs("div", { className: styles.header, children: [_jsx("div", { className: styles.handleBar }), _jsxs(Flex, { align: "center", justify: "space-between", className: styles.headerBody, children: [title && (_jsx("h2", { id: titleId, className: styles.title, children: title })), _jsx(Button, { variant: "ghost", size: "sm", onClick: onClose, "aria-label": "Close sheet", children: _jsx(X, { size: 24 }) })] })] }), _jsx("div", { className: styles.content, children: children }), footer && _jsx("div", { className: styles.footer, children: footer })] })] }), document.body);
37
+ return createPortal(_jsxs(_Fragment, { children: [_jsx("div", { className: clsx(styles.overlay, isOpen && styles.isOpen), onClick: onClose, "aria-hidden": "true" }), _jsxs("div", { className: clsx(styles.panel, styles[variant], isOpen && styles.isOpen, className), role: "dialog", "aria-modal": "true", "aria-labelledby": title ? titleId : undefined, "aria-label": !title ? "Sheet" : undefined, children: [_jsxs("div", { className: styles.header, children: [_jsx("div", { className: styles.handleBar }), _jsxs(Flex, { align: "center", justify: "space-between", className: styles.headerBody, children: [title && (_jsx("h2", { id: titleId, className: styles.title, children: title })), _jsx(Button, { variant: "danger", size: "sm", onClick: onClose, "aria-label": "Close sheet", children: _jsx(X, { size: 24 }) })] })] }), _jsx("div", { className: styles.content, children: children }), footer && _jsx("div", { className: styles.footer, children: footer })] })] }), document.body);
38
38
  }
@@ -62,11 +62,6 @@
62
62
  background-color: transparent !important;
63
63
  color: var(--solid-fg);
64
64
  }
65
- .panel.solid .header button {
66
- background-color: var(--error) !important;
67
- color: var(--error-foreground) !important;
68
- border-color: var(--border-strong) !important;
69
- }
70
65
  .panel.solid .handleBar {
71
66
  background-color: var(--solid-fg);
72
67
  opacity: 0.8;
@@ -103,23 +98,6 @@
103
98
  display: flex;
104
99
  justify-content: space-between;
105
100
  align-items: center;
106
- /* Match Modal/Drawer's Close Button Styling */
107
- }
108
- .headerBody button {
109
- background-color: var(--error) !important;
110
- color: var(--error-foreground) !important;
111
- border: var(--border-width) solid var(--border-strong) !important;
112
- box-shadow: var(--shadow-sm) !important;
113
- }
114
- .headerBody button:hover {
115
- background-color: var(--error) !important;
116
- filter: brightness(1.1);
117
- transform: translate(-2px, -2px);
118
- box-shadow: var(--shadow-sm-hover) !important;
119
- }
120
- .headerBody button:active {
121
- transform: translate(2px, 2px);
122
- box-shadow: var(--shadow-sm-checked) !important;
123
101
  }
124
102
 
125
103
  .title {
@@ -0,0 +1,14 @@
1
+ import React from "react";
2
+ export interface SlatProps extends React.HTMLAttributes<HTMLDivElement> {
3
+ /** Main label (e.g. filename) */
4
+ label: React.ReactNode;
5
+ /** Secondary label (e.g. filesize) */
6
+ secondaryLabel?: React.ReactNode;
7
+ /** Icon/Graphics to display on the left */
8
+ prependContent?: React.ReactNode;
9
+ /** Content to display on the right (actions) */
10
+ appendContent?: React.ReactNode;
11
+ /** Variant of the slat */
12
+ variant?: "default" | "danger" | "success";
13
+ }
14
+ export declare const Slat: React.ForwardRefExoticComponent<SlatProps & React.RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,27 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
12
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
+ import React from "react";
14
+ import styles from "./Slat.module.css";
15
+ import { Text } from "../Text/Text.js";
16
+ import { Stack, Flex } from "../Layout/Layout.js";
17
+ import clsx from "clsx";
18
+ export const Slat = React.forwardRef((_a, ref) => {
19
+ var { label, secondaryLabel, prependContent, appendContent, variant = "default", className, onClick } = _a, props = __rest(_a, ["label", "secondaryLabel", "prependContent", "appendContent", "variant", "className", "onClick"]);
20
+ return (_jsx("div", Object.assign({ ref: ref, role: onClick ? "button" : undefined, tabIndex: onClick ? 0 : undefined, className: clsx(styles.slat, styles[variant], { [styles.hoverable]: onClick }, className), onClick: onClick, onKeyDown: (e) => {
21
+ if (onClick && (e.key === "Enter" || e.key === " ")) {
22
+ e.preventDefault();
23
+ onClick(e);
24
+ }
25
+ } }, props, { children: _jsxs(Flex, { justify: "space-between", align: "center", gap: "var(--spacing-sm)", children: [_jsxs(Flex, { gap: "var(--spacing-sm)", align: "center", style: { flex: 1, minWidth: 0 }, children: [prependContent && (_jsx("div", { className: styles.prepend, children: prependContent })), _jsxs(Stack, { gap: 0, style: { flex: 1, minWidth: 0 }, children: [_jsx(Text, { className: styles.label, children: label }), secondaryLabel && (_jsx(Text, { variant: "small", className: styles.secondaryLabel, children: secondaryLabel }))] })] }), _jsx(Flex, { align: "center", gap: "var(--spacing-sm)", children: appendContent && (_jsx("div", { className: styles.append, children: appendContent })) })] }) })));
26
+ });
27
+ Slat.displayName = "Slat";