doom-design-system 0.1.7 → 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.
- package/README.md +23 -20
- package/dist/DesignSystemProvider.d.ts +1 -0
- package/dist/DesignSystemProvider.js +3 -4
- package/dist/components/Accordion/Accordion.js +5 -63
- package/dist/components/Accordion/Accordion.module.css +69 -0
- package/dist/components/ActionRow/ActionRow.js +3 -28
- package/dist/components/ActionRow/ActionRow.module.css +24 -0
- package/dist/components/Alert/Alert.js +3 -58
- package/dist/components/Alert/Alert.module.css +77 -0
- package/dist/components/Avatar/Avatar.js +3 -45
- package/dist/components/Avatar/Avatar.module.css +67 -0
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +4 -42
- package/dist/components/Badge/Badge.module.css +31 -0
- package/dist/components/Breadcrumbs/Breadcrumbs.js +6 -38
- package/dist/components/Breadcrumbs/Breadcrumbs.module.css +34 -0
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +5 -129
- package/dist/components/Button/Button.module.css +112 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +4 -13
- package/dist/components/Card/Card.module.css +8 -0
- package/dist/components/Drawer/Drawer.js +5 -71
- package/dist/components/Drawer/Drawer.module.css +75 -0
- package/dist/components/Dropdown/Dropdown.d.ts +2 -1
- package/dist/components/Dropdown/Dropdown.js +6 -39
- package/dist/components/Dropdown/Dropdown.module.css +33 -0
- package/dist/components/Form/Form.d.ts +4 -9
- package/dist/components/Form/Form.js +9 -43
- package/dist/components/Form/Form.module.css +41 -0
- package/dist/components/Input/Input.js +3 -59
- package/dist/components/Input/Input.module.css +86 -0
- package/dist/components/Label/Label.d.ts +1 -1
- package/dist/components/Label/Label.js +4 -23
- package/dist/components/Label/Label.module.css +16 -0
- package/dist/components/Layout/Layout.d.ts +2 -2
- package/dist/components/Layout/Layout.js +5 -20
- package/dist/components/Layout/Layout.module.css +7 -0
- package/dist/components/Link/Link.d.ts +2 -1
- package/dist/components/Link/Link.js +4 -62
- package/dist/components/Link/Link.module.css +48 -0
- package/dist/components/Modal/Modal.js +9 -52
- package/dist/components/Modal/Modal.module.css +57 -0
- package/dist/components/Page/Page.js +3 -23
- package/dist/components/Page/Page.module.css +23 -0
- package/dist/components/Pagination/Pagination.js +4 -42
- package/dist/components/Pagination/Pagination.module.css +43 -0
- package/dist/components/Popover/Popover.js +21 -26
- package/dist/components/Popover/Popover.module.css +19 -0
- package/dist/components/ProgressBar/ProgressBar.js +7 -37
- package/dist/components/ProgressBar/ProgressBar.module.css +31 -0
- package/dist/components/RadioGroup/RadioGroup.js +4 -79
- package/dist/components/RadioGroup/RadioGroup.module.css +81 -0
- package/dist/components/Select/Select.js +6 -80
- package/dist/components/Select/Select.module.css +89 -0
- package/dist/components/Sheet/Sheet.js +5 -56
- package/dist/components/Sheet/Sheet.module.css +64 -0
- package/dist/components/Skeleton/Skeleton.js +4 -49
- package/dist/components/Skeleton/Skeleton.module.css +29 -0
- package/dist/components/Slider/Slider.js +3 -140
- package/dist/components/Slider/Slider.module.css +130 -0
- package/dist/components/SplitButton/SplitButton.d.ts +2 -1
- package/dist/components/SplitButton/SplitButton.js +6 -82
- package/dist/components/SplitButton/SplitButton.module.css +79 -0
- package/dist/components/Switch/Switch.js +3 -54
- package/dist/components/Switch/Switch.module.css +64 -0
- package/dist/components/Table/Table.d.ts +1 -1
- package/dist/components/Table/Table.js +13 -109
- package/dist/components/Table/Table.module.css +111 -0
- package/dist/components/Tabs/Tabs.js +7 -56
- package/dist/components/Tabs/Tabs.module.css +65 -0
- package/dist/components/Text/Text.js +4 -106
- package/dist/components/Text/Text.module.css +123 -0
- package/dist/components/Textarea/Textarea.d.ts +1 -1
- package/dist/components/Textarea/Textarea.js +16 -20
- package/dist/components/Textarea/Textarea.module.css +23 -0
- package/dist/components/Toast/Toast.js +3 -67
- package/dist/components/Toast/Toast.module.css +87 -0
- package/dist/components/Tooltip/Tooltip.js +3 -19
- package/dist/components/Tooltip/Tooltip.module.css +17 -0
- package/dist/styles/globals.css +999 -0
- package/dist/styles/themes/ThemeProvider.js +4 -9
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +8 -5
- package/dist/styles/index.d.ts +0 -3
- package/dist/styles/index.js +0 -3
- package/dist/styles/mixins.d.ts +0 -3
- package/dist/styles/mixins.js +0 -25
- package/dist/styles/reset.d.ts +0 -1
- package/dist/styles/reset.js +0 -29
- package/dist/styles/theme.d.ts +0 -1
- package/dist/styles/theme.js +0 -11
- package/dist/styles/utilities.d.ts +0 -1
- package/dist/styles/utilities.js +0 -184
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "doom-design-system",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.8",
|
|
4
4
|
"description": "Neubrutalist and comic book inspired design system",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"dist"
|
|
14
14
|
],
|
|
15
15
|
"scripts": {
|
|
16
|
-
"build": "rimraf dist && tsc",
|
|
16
|
+
"build": "rimraf dist && tsc && sass components:dist/components styles:dist/styles --no-source-map && node scripts/fix-imports.cjs",
|
|
17
17
|
"storybook": "storybook dev -p 6006",
|
|
18
18
|
"build-storybook": "storybook build",
|
|
19
19
|
"test": "vitest"
|
|
@@ -27,8 +27,6 @@
|
|
|
27
27
|
"author": "",
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"peerDependencies": {
|
|
30
|
-
"@emotion/react": "^11.14.0",
|
|
31
|
-
"@emotion/styled": "^11.14.1",
|
|
32
30
|
"lucide-react": "^0.555.0",
|
|
33
31
|
"react": "^19.2.1",
|
|
34
32
|
"react-dom": "^19.2.1"
|
|
@@ -44,18 +42,23 @@
|
|
|
44
42
|
"@types/react-dom": "^19.0.2",
|
|
45
43
|
"@types/styled-jsx": "^2.2.9",
|
|
46
44
|
"@vitest/mocker": "^4.0.15",
|
|
45
|
+
"copyfiles": "^2.4.1",
|
|
47
46
|
"eslint-plugin-storybook": "^10.1.4",
|
|
48
47
|
"jsdom": "^27.2.0",
|
|
49
48
|
"next": "^15.5.7",
|
|
49
|
+
"replace-in-file": "^8.4.0",
|
|
50
50
|
"rimraf": "^6.1.2",
|
|
51
|
+
"sass": "^1.96.0",
|
|
51
52
|
"storybook": "^10.1.4",
|
|
52
53
|
"styled-jsx": "^5.1.7",
|
|
54
|
+
"tsc-alias": "^1.8.16",
|
|
53
55
|
"typescript": "^5",
|
|
54
56
|
"vite": "^7.2.7",
|
|
55
57
|
"vitest": "^4.0.15"
|
|
56
58
|
},
|
|
57
59
|
"dependencies": {
|
|
58
60
|
"@tanstack/react-table": "^8.21.3",
|
|
59
|
-
"@tanstack/react-virtual": "^3.13.12"
|
|
61
|
+
"@tanstack/react-virtual": "^3.13.12",
|
|
62
|
+
"clsx": "^2.1.1"
|
|
60
63
|
}
|
|
61
64
|
}
|
package/dist/styles/index.d.ts
DELETED
package/dist/styles/index.js
DELETED
package/dist/styles/mixins.d.ts
DELETED
package/dist/styles/mixins.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
export const baseInteractiveStyles = css `
|
|
3
|
-
border: var(--border-width) solid var(--card-border);
|
|
4
|
-
border-radius: var(--radius);
|
|
5
|
-
box-shadow: var(--shadow-hard);
|
|
6
|
-
transition: all 0.1s ease;
|
|
7
|
-
outline: none;
|
|
8
|
-
`;
|
|
9
|
-
export const focusStyles = css `
|
|
10
|
-
&:focus, &:focus-visible, &[aria-expanded="true"] {
|
|
11
|
-
outline: none;
|
|
12
|
-
transform: translate(-2px, -2px);
|
|
13
|
-
box-shadow: 7px 7px 0px 0px var(--shadow-primary);
|
|
14
|
-
border-color: var(--primary);
|
|
15
|
-
}
|
|
16
|
-
`;
|
|
17
|
-
export const errorStyles = css `
|
|
18
|
-
border-color: var(--error);
|
|
19
|
-
box-shadow: 5px 5px 0px 0px var(--shadow-error);
|
|
20
|
-
|
|
21
|
-
&:focus, &:focus-visible {
|
|
22
|
-
border-color: var(--error);
|
|
23
|
-
box-shadow: 7px 7px 0px 0px var(--shadow-error);
|
|
24
|
-
}
|
|
25
|
-
`;
|
package/dist/styles/reset.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const resetStyles: import("@emotion/utils").SerializedStyles;
|
package/dist/styles/reset.js
DELETED
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
export const resetStyles = css `
|
|
3
|
-
* {
|
|
4
|
-
box-sizing: border-box;
|
|
5
|
-
padding: 0;
|
|
6
|
-
margin: 0;
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
html {
|
|
10
|
-
overflow-y: scroll; /* Force scrollbar to prevent layout shift */
|
|
11
|
-
overflow-x: hidden;
|
|
12
|
-
background-color: var(--background);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
body {
|
|
16
|
-
min-height: 100vh;
|
|
17
|
-
display: flex;
|
|
18
|
-
flex-direction: column;
|
|
19
|
-
background-color: var(--background);
|
|
20
|
-
color: var(--foreground);
|
|
21
|
-
font-family: var(--font-montserrat), system-ui, sans-serif;
|
|
22
|
-
-webkit-font-smoothing: antialiased;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
a {
|
|
26
|
-
color: inherit;
|
|
27
|
-
text-decoration: none;
|
|
28
|
-
}
|
|
29
|
-
`;
|
package/dist/styles/theme.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const themeDefaults: import("@emotion/utils").SerializedStyles;
|
package/dist/styles/theme.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
import { themes } from './themes';
|
|
3
|
-
// Use the default theme as the baseline for the design system
|
|
4
|
-
const defaultTheme = themes.default.variables;
|
|
5
|
-
export const themeDefaults = css `
|
|
6
|
-
:root {
|
|
7
|
-
${Object.entries(defaultTheme)
|
|
8
|
-
.map(([key, value]) => `${key}: ${value};`)
|
|
9
|
-
.join('\n ')}
|
|
10
|
-
}
|
|
11
|
-
`;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const utilityStyles: import("@emotion/utils").SerializedStyles;
|
package/dist/styles/utilities.js
DELETED
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import { css } from '@emotion/react';
|
|
2
|
-
export const utilityStyles = css `
|
|
3
|
-
/* Typography Base Styles */
|
|
4
|
-
h1, h2, h3, h4, h5, h6 {
|
|
5
|
-
font-family: var(--font-heading, var(--font-montserrat)), sans-serif;
|
|
6
|
-
font-weight: var(--heading-weight, 700);
|
|
7
|
-
text-transform: var(--heading-transform, none);
|
|
8
|
-
line-height: 1.1;
|
|
9
|
-
letter-spacing: 0.02em;
|
|
10
|
-
margin-bottom: 0.5em;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
h1 { font-size: var(--text-5xl); }
|
|
14
|
-
h2 { font-size: var(--text-4xl); }
|
|
15
|
-
h3 { font-size: var(--text-3xl); }
|
|
16
|
-
h4 { font-size: var(--text-2xl); }
|
|
17
|
-
h5 { font-size: var(--text-xl); }
|
|
18
|
-
h6 { font-size: var(--text-lg); }
|
|
19
|
-
|
|
20
|
-
p {
|
|
21
|
-
margin-bottom: 1em;
|
|
22
|
-
line-height: 1.6;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
/* Generated Utilities */
|
|
26
|
-
${(() => {
|
|
27
|
-
const utils = [];
|
|
28
|
-
// Typography Sizes
|
|
29
|
-
const textSizes = ['xs', 'sm', 'base', 'lg', 'xl', '2xl', '3xl', '4xl', '5xl', '6xl'];
|
|
30
|
-
textSizes.forEach(size => {
|
|
31
|
-
utils.push(`.text-${size} { font-size: var(--text-${size}); }`);
|
|
32
|
-
});
|
|
33
|
-
// Font Weights
|
|
34
|
-
const weights = ['thin', 'extralight', 'light', 'regular', 'medium', 'semibold', 'bold', 'extrabold', 'black'];
|
|
35
|
-
weights.forEach(weight => {
|
|
36
|
-
utils.push(`.font-${weight} { font-weight: var(--font-${weight}); }`);
|
|
37
|
-
});
|
|
38
|
-
// Colors (Text & Background)
|
|
39
|
-
const colors = ['primary', 'secondary', 'muted', 'success', 'warning', 'error', 'background', 'foreground'];
|
|
40
|
-
colors.forEach(color => {
|
|
41
|
-
// Text Colors
|
|
42
|
-
utils.push(`.text-${color} { color: var(--${color}); }`);
|
|
43
|
-
// Background Colors
|
|
44
|
-
utils.push(`.bg-${color} { background-color: var(--${color}); }`);
|
|
45
|
-
});
|
|
46
|
-
// Special Text Colors
|
|
47
|
-
utils.push('.text-muted { color: var(--muted-foreground); }');
|
|
48
|
-
// Z-Index
|
|
49
|
-
const zIndices = {
|
|
50
|
-
'0': 'var(--z-base)',
|
|
51
|
-
'10': 'var(--z-elevated)',
|
|
52
|
-
'40': 'var(--z-header)',
|
|
53
|
-
'50': 'var(--z-dropdown)',
|
|
54
|
-
'modal': 'var(--z-modal)',
|
|
55
|
-
'tooltip': 'var(--z-tooltip)'
|
|
56
|
-
};
|
|
57
|
-
Object.entries(zIndices).forEach(([key, value]) => {
|
|
58
|
-
utils.push(`.z-${key} { z-index: ${value}; }`);
|
|
59
|
-
});
|
|
60
|
-
// Opacity (0-100, step 10)
|
|
61
|
-
for (let i = 0; i <= 100; i += 10) {
|
|
62
|
-
utils.push(`.opacity-${i} { opacity: ${i / 100}; }`);
|
|
63
|
-
}
|
|
64
|
-
// Spacing (Margin, Padding, Width, Height)
|
|
65
|
-
const MAX_SPACING = 10;
|
|
66
|
-
for (let i = 0; i <= MAX_SPACING; i++) {
|
|
67
|
-
const value = i === 0 ? '0' : `${i * 0.25}rem`;
|
|
68
|
-
// Margin & Padding
|
|
69
|
-
utils.push(`
|
|
70
|
-
.m-${i} { margin: ${value}; }
|
|
71
|
-
.mt-${i} { margin-top: ${value}; }
|
|
72
|
-
.mb-${i} { margin-bottom: ${value}; }
|
|
73
|
-
.ml-${i} { margin-left: ${value}; }
|
|
74
|
-
.mr-${i} { margin-right: ${value}; }
|
|
75
|
-
.mx-${i} { margin-left: ${value}; margin-right: ${value}; }
|
|
76
|
-
.my-${i} { margin-top: ${value}; margin-bottom: ${value}; }
|
|
77
|
-
|
|
78
|
-
.p-${i} { padding: ${value}; }
|
|
79
|
-
.pt-${i} { padding-top: ${value}; }
|
|
80
|
-
.pb-${i} { padding-bottom: ${value}; }
|
|
81
|
-
.pl-${i} { padding-left: ${value}; }
|
|
82
|
-
.pr-${i} { padding-right: ${value}; }
|
|
83
|
-
.px-${i} { padding-left: ${value}; padding-right: ${value}; }
|
|
84
|
-
.py-${i} { padding-top: ${value}; padding-bottom: ${value}; }
|
|
85
|
-
`);
|
|
86
|
-
// Width & Height (Spacing Scale)
|
|
87
|
-
utils.push(`
|
|
88
|
-
.w-${i} { width: ${value}; }
|
|
89
|
-
.h-${i} { height: ${value}; }
|
|
90
|
-
`);
|
|
91
|
-
}
|
|
92
|
-
// Width Percentages
|
|
93
|
-
const widthPercentages = {
|
|
94
|
-
'1/4': '25%',
|
|
95
|
-
'2/4': '50%',
|
|
96
|
-
'1/2': '50%',
|
|
97
|
-
'3/4': '75%',
|
|
98
|
-
'full': '100%'
|
|
99
|
-
};
|
|
100
|
-
Object.entries(widthPercentages).forEach(([key, value]) => {
|
|
101
|
-
utils.push(`.w-${key} { width: ${value}; }`);
|
|
102
|
-
});
|
|
103
|
-
return utils.join('\n');
|
|
104
|
-
})()}
|
|
105
|
-
|
|
106
|
-
/* Manual Overrides & Extras */
|
|
107
|
-
|
|
108
|
-
/* Text Extras */
|
|
109
|
-
.italic { font-style: italic; }
|
|
110
|
-
.uppercase { text-transform: uppercase; }
|
|
111
|
-
.capitalize { text-transform: capitalize; }
|
|
112
|
-
.block { display: block; }
|
|
113
|
-
.tracking-wide { letter-spacing: 0.05em; }
|
|
114
|
-
.tracking-widest { letter-spacing: 0.1em; }
|
|
115
|
-
.leading-none { line-height: 1; }
|
|
116
|
-
.text-left { text-align: left; }
|
|
117
|
-
.text-center { text-align: center; }
|
|
118
|
-
.text-right { text-align: right; }
|
|
119
|
-
|
|
120
|
-
/* Flex */
|
|
121
|
-
.flex { display: flex; }
|
|
122
|
-
.flex-wrap { flex-wrap: wrap; }
|
|
123
|
-
.align-self-start { align-self: flex-start; }
|
|
124
|
-
.items-center { align-items: center; }
|
|
125
|
-
.justify-center { justify-content: center; }
|
|
126
|
-
.justify-between { justify-content: space-between; }
|
|
127
|
-
|
|
128
|
-
/* Grid */
|
|
129
|
-
.grid { display: grid; }
|
|
130
|
-
.col-span-full { grid-column: 1 / -1; }
|
|
131
|
-
|
|
132
|
-
/* Layout & Sizing Extras */
|
|
133
|
-
.w-fit { width: fit-content; }
|
|
134
|
-
.min-w-fit { min-width: fit-content;}
|
|
135
|
-
.w-32 { width: 8rem; } /* Kept for compatibility, though covered by w-32 generator if we went that high */
|
|
136
|
-
.h-full { height: 100%; }
|
|
137
|
-
.hidden { display: none; }
|
|
138
|
-
|
|
139
|
-
/* Positioning */
|
|
140
|
-
.relative { position: relative; }
|
|
141
|
-
.absolute { position: absolute; }
|
|
142
|
-
.fixed { position: fixed; }
|
|
143
|
-
.top-0 { top: 0; }
|
|
144
|
-
.top-4 { top: 1rem; }
|
|
145
|
-
.right-0 { right: 0; }
|
|
146
|
-
.right-4 { right: 1rem; }
|
|
147
|
-
.inset-0 { top: 0; right: 0; bottom: 0; left: 0; }
|
|
148
|
-
|
|
149
|
-
/* Backgrounds & Borders Extras */
|
|
150
|
-
.bg-black-50 { background-color: rgba(0, 0, 0, 0.5); }
|
|
151
|
-
.bg-slate-50 { background-color: #f8fafc; }
|
|
152
|
-
.bg-transparent { background-color: transparent; }
|
|
153
|
-
.bg-amber-100 { background-color: #fef3c7; }
|
|
154
|
-
.bg-blue-100 { background-color: #dbeafe; }
|
|
155
|
-
|
|
156
|
-
.border-slate-100 { border-color: #f1f5f9; }
|
|
157
|
-
.border-b-2 { border-bottom-width: 2px; }
|
|
158
|
-
.border-t-2 { border-top-width: 2px; }
|
|
159
|
-
.border-2 { border-width: 2px; }
|
|
160
|
-
.border-brand { border-width: var(--border-width); }
|
|
161
|
-
.border-black { border-color: #000000; }
|
|
162
|
-
.rounded-lg { border-radius: var(--radius); }
|
|
163
|
-
|
|
164
|
-
/* Effects */
|
|
165
|
-
.backdrop-blur-sm { backdrop-filter: blur(4px); }
|
|
166
|
-
.shadow-hard { box-shadow: var(--shadow-hard); }
|
|
167
|
-
.shadow-hover { box-shadow: var(--shadow-hover); }
|
|
168
|
-
|
|
169
|
-
/* Overflow */
|
|
170
|
-
.overflow-hidden { overflow: hidden; }
|
|
171
|
-
|
|
172
|
-
/* Max Width */
|
|
173
|
-
.max-w-md { max-width: 500px; }
|
|
174
|
-
|
|
175
|
-
/* Transforms & Transitions */
|
|
176
|
-
.transition-all { transition: all 0.2s ease; }
|
|
177
|
-
.duration-200 { transition-duration: 200ms; }
|
|
178
|
-
.translate-x-\[-2px\] { transform: translateX(-2px); }
|
|
179
|
-
.translate-y-\[-2px\] { transform: translateY(-2px); }
|
|
180
|
-
.hover\:translate-y-\[-2px\]:hover { transform: translateY(-2px); }
|
|
181
|
-
.hover\:shadow-hover:hover { box-shadow: var(--shadow-hover); }
|
|
182
|
-
.cursor-pointer { cursor: pointer; }
|
|
183
|
-
.cursor-not-allowed { cursor: not-allowed; }
|
|
184
|
-
`;
|