@stamcat/craftsman 0.0.23-alpha.8 → 0.0.23-alpha.9
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/AGENTS.md +162 -0
- package/Components.esm.js +5 -3
- package/components/Button.d.ts +6 -1
- package/components/Loader.d.ts +9 -0
- package/components/Modal.d.ts +23 -0
- package/components/Progress.d.ts +1 -0
- package/components/index.d.ts +2 -0
- package/package.json +12 -1
- package/src/components/Button.esm.js +20 -0
- package/src/components/Loader.esm.js +19 -0
- package/src/components/Modal.esm.js +156 -0
- package/src/styles/global/components/loaders.esm.js +65 -0
- package/src/styles/global/components/loaders.module.css +1 -0
- package/src/styles/global/components/loaders.module.esm.js +25 -0
- package/src/styles/global/components/loaders.module.scss +240 -0
- package/src/styles/utilities/color.esm.js +19 -0
- package/src/styles/utilities/config.esm.js +25 -0
- package/src/styles/utilities/constants.esm.js +79 -0
- package/src/styles/utilities/layout.esm.js +48 -0
- package/stories/Button.stories.d.ts +7 -0
- package/stories/Colors.stories.d.ts +5 -0
- package/stories/Icons.stories.d.ts +36 -0
- package/stories/Loaders.stories.d.ts +6 -0
- package/stories/Modal.stories.d.ts +8 -0
- package/stories/Toastify.stories.d.ts +7 -0
- package/stories/Typography.stories.d.ts +6 -0
- package/styles/global/components/button.d.ts +7 -0
- package/styles/global/components/code.d.ts +1 -0
- package/styles/global/components/loaders.d.ts +17 -0
- package/styles/global/components/typography.d.ts +11 -0
- package/styles/global/variables.d.ts +2 -0
- package/styles/theme/components.d.ts +1 -1
- package/styles/theme/constants.d.ts +1 -2
- package/styles/theme/types.d.ts +1 -1
- package/styles/theme/utilities.d.ts +2 -0
- package/styles/utilities/color.d.ts +2 -66
- package/styles/utilities/config.d.ts +7 -0
- package/styles/utilities/constants.d.ts +77 -0
- package/styles/utilities/layout.d.ts +15 -0
- package/styles/utilities/types.d.ts +17 -0
- package/Button.esm.js +0 -5
- package/icons/IconCalendar.d.ts +0 -3
- package/icons/IconChevronRight.d.ts +0 -2
- package/icons/IconCircleAlert.d.ts +0 -2
- package/icons/IconCircleCheck.d.ts +0 -2
- package/icons/IconCircleHelp.d.ts +0 -2
- package/icons/IconCircleInfo.d.ts +0 -2
- package/icons/IconEye.d.ts +0 -2
- package/icons/IconEyeClosed.d.ts +0 -2
- package/icons/IconX.d.ts +0 -2
- package/styles/global/colors.d.ts +0 -1
- package/styles/theme/components/button.d.ts +0 -1
- /package/{Input.esm.js → src/components/Input.esm.js} +0 -0
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
.dots {
|
|
2
|
+
aspect-ratio: 1;
|
|
3
|
+
border-radius: 50%;
|
|
4
|
+
animation: l5 1s infinite linear alternate;
|
|
5
|
+
width: var(--_l5w);
|
|
6
|
+
margin: 0 var(--_l5w2);
|
|
7
|
+
}
|
|
8
|
+
@keyframes l5 {
|
|
9
|
+
0% {
|
|
10
|
+
box-shadow:
|
|
11
|
+
var(--_l5w2) 0 var(--_l5c),
|
|
12
|
+
var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);
|
|
13
|
+
background: var(--_l5c);
|
|
14
|
+
}
|
|
15
|
+
33% {
|
|
16
|
+
box-shadow:
|
|
17
|
+
var(--_l5w2) 0 var(--_l5c),
|
|
18
|
+
var(--_l5w3) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%);
|
|
19
|
+
background: color-mix(in srgb, var(--_l5c) 80%, white 75%);
|
|
20
|
+
}
|
|
21
|
+
66% {
|
|
22
|
+
box-shadow:
|
|
23
|
+
var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%),
|
|
24
|
+
var(--_l5w3) 0 var(--_l5c);
|
|
25
|
+
background: color-mix(in srgb, var(--_l5c) 80%, white 75%);
|
|
26
|
+
}
|
|
27
|
+
100% {
|
|
28
|
+
box-shadow:
|
|
29
|
+
var(--_l5w2) 0 color-mix(in srgb, var(--_l5c) 80%, white 75%),
|
|
30
|
+
var(--_l5w3) 0 var(--_l5c);
|
|
31
|
+
background: var(--_l5c);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.dots-bounce {
|
|
36
|
+
width: var(--_gw);
|
|
37
|
+
aspect-ratio: 2;
|
|
38
|
+
background:
|
|
39
|
+
var(--_g) 0% 50%,
|
|
40
|
+
var(--_g) 50% 50%,
|
|
41
|
+
var(--_g) 100% 50%;
|
|
42
|
+
background-size: calc(100% / 3) 50%;
|
|
43
|
+
animation: l3 1s infinite linear;
|
|
44
|
+
}
|
|
45
|
+
@keyframes l3 {
|
|
46
|
+
20% {
|
|
47
|
+
background-position:
|
|
48
|
+
0% 0%,
|
|
49
|
+
50% 50%,
|
|
50
|
+
100% 50%;
|
|
51
|
+
}
|
|
52
|
+
40% {
|
|
53
|
+
background-position:
|
|
54
|
+
0% 100%,
|
|
55
|
+
50% 0%,
|
|
56
|
+
100% 50%;
|
|
57
|
+
}
|
|
58
|
+
60% {
|
|
59
|
+
background-position:
|
|
60
|
+
0% 50%,
|
|
61
|
+
50% 100%,
|
|
62
|
+
100% 0%;
|
|
63
|
+
}
|
|
64
|
+
80% {
|
|
65
|
+
background-position:
|
|
66
|
+
0% 50%,
|
|
67
|
+
50% 50%,
|
|
68
|
+
100% 100%;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.dots-trace {
|
|
73
|
+
width: var(--_dtw);
|
|
74
|
+
aspect-ratio: 4;
|
|
75
|
+
background: radial-gradient(circle closest-side, var(--_dtc) 90%, #0000) 0 / calc(100% / 3) 100% space;
|
|
76
|
+
clip-path: inset(0 100% 0 0);
|
|
77
|
+
animation: l1 1s steps(4) infinite;
|
|
78
|
+
|
|
79
|
+
}
|
|
80
|
+
@keyframes l1 {
|
|
81
|
+
to {
|
|
82
|
+
clip-path: inset(0 -34% 0 0);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.dots-orbit {
|
|
87
|
+
width: var(--_dow);
|
|
88
|
+
aspect-ratio: 1;
|
|
89
|
+
border-radius: 50%;
|
|
90
|
+
background: var(--_doc);
|
|
91
|
+
display: grid;
|
|
92
|
+
animation: l22-0 2s infinite linear;
|
|
93
|
+
&:before,
|
|
94
|
+
&:after {
|
|
95
|
+
content: "";
|
|
96
|
+
grid-area: 1/1;
|
|
97
|
+
margin: 15%;
|
|
98
|
+
border-radius: 50%;
|
|
99
|
+
background: inherit;
|
|
100
|
+
transform: rotate(0deg) translate(150%);
|
|
101
|
+
animation: l22 1s infinite;
|
|
102
|
+
}
|
|
103
|
+
&:after {
|
|
104
|
+
animation-delay: -.5s
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
@keyframes l22-0 {
|
|
109
|
+
100% {transform: rotate(1turn)}
|
|
110
|
+
}
|
|
111
|
+
@keyframes l22 {
|
|
112
|
+
100% {transform: rotate(1turn) translate(150%)}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
.dashes {
|
|
116
|
+
width: var(--_dshw);
|
|
117
|
+
height: calc(var(--_dshw) * 0.3);
|
|
118
|
+
background:
|
|
119
|
+
linear-gradient(var(--_dshc) 0 0) left/var(--_dshw2) 4px,
|
|
120
|
+
linear-gradient(var(--_dshc) 0 0) center/var(--_dshw2) 4px,
|
|
121
|
+
linear-gradient(var(--_dshc) 0 0) right/var(--_dshw2) 4px;
|
|
122
|
+
background-repeat: no-repeat;
|
|
123
|
+
animation: dashes 1s infinite linear;
|
|
124
|
+
|
|
125
|
+
}
|
|
126
|
+
@keyframes dashes {
|
|
127
|
+
0% {
|
|
128
|
+
background-size:
|
|
129
|
+
var(--_dshw2) 4px,
|
|
130
|
+
var(--_dshw2) 4px,
|
|
131
|
+
var(--_dshw2) 4px;
|
|
132
|
+
opacity: 1;
|
|
133
|
+
}
|
|
134
|
+
33% {
|
|
135
|
+
background-size:
|
|
136
|
+
var(--_dshw2) var(--_dshw2),
|
|
137
|
+
var(--_dshw2) 4px,
|
|
138
|
+
var(--_dshw2) 4px;
|
|
139
|
+
opacity: 0.7;
|
|
140
|
+
}
|
|
141
|
+
66% {
|
|
142
|
+
background-size:
|
|
143
|
+
var(--_dshw2) 4px,
|
|
144
|
+
var(--_dshw2) var(--_dshw2),
|
|
145
|
+
var(--_dshw2) 4px;
|
|
146
|
+
opacity: 0.7;
|
|
147
|
+
}
|
|
148
|
+
100% {
|
|
149
|
+
background-size:
|
|
150
|
+
var(--_dshw2) 4px,
|
|
151
|
+
var(--_dshw2) 4px,
|
|
152
|
+
var(--_dshw2) var(--_dshw2);
|
|
153
|
+
opacity: 1;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.spinner {
|
|
158
|
+
width: var(--_spnw);
|
|
159
|
+
aspect-ratio: 1;
|
|
160
|
+
border-radius: 50%;
|
|
161
|
+
border: var(--_spnw2) solid color-mix(in srgb, var(--_spnc) 20%, transparent);
|
|
162
|
+
border-right-color: var(--_spnc);
|
|
163
|
+
animation: l2 1s infinite linear;
|
|
164
|
+
}
|
|
165
|
+
@keyframes l2 {to{transform: rotate(1turn)}}
|
|
166
|
+
|
|
167
|
+
.swirl {
|
|
168
|
+
width: var(--_swrlw);
|
|
169
|
+
padding: var(--_swrlw2);
|
|
170
|
+
aspect-ratio: 1;
|
|
171
|
+
border-radius: 50%;
|
|
172
|
+
background: var(--_swrlc);
|
|
173
|
+
--_m:
|
|
174
|
+
conic-gradient(#0000 10%,#000),
|
|
175
|
+
linear-gradient(#000 0 0) content-box;
|
|
176
|
+
-webkit-mask: var(--_m);
|
|
177
|
+
mask: var(--_m);
|
|
178
|
+
-webkit-mask-composite: source-out;
|
|
179
|
+
mask-composite: subtract;
|
|
180
|
+
animation: l3 1s infinite linear;
|
|
181
|
+
}
|
|
182
|
+
@keyframes l3 {to{transform: rotate(1turn)}}
|
|
183
|
+
|
|
184
|
+
.ball {
|
|
185
|
+
width: var(--_ballw);
|
|
186
|
+
aspect-ratio: 1;
|
|
187
|
+
border-radius: 50%;
|
|
188
|
+
background:
|
|
189
|
+
radial-gradient(farthest-side,var(--_ballc) 95%,#0000) 50% 1px/var(--_ballw2) var(--_ballw2) no-repeat,
|
|
190
|
+
radial-gradient(farthest-side,#0000 calc(100% - var(--_ballw2)),#ccc 0);
|
|
191
|
+
animation: l9 2s infinite linear;
|
|
192
|
+
}
|
|
193
|
+
@keyframes l9 {to{transform: rotate(1turn)}}
|
|
194
|
+
|
|
195
|
+
.boxy {
|
|
196
|
+
width: var(--_boxw);
|
|
197
|
+
height: var(--_boxw2);
|
|
198
|
+
-webkit-mask: linear-gradient(90deg,#000 70%,#0000 0) left/20% 100%;
|
|
199
|
+
background:
|
|
200
|
+
linear-gradient(var(--_boxc) 0 0) left -25% top 0 /20% 100% no-repeat
|
|
201
|
+
#ddd;
|
|
202
|
+
animation: l7 1s infinite steps(6);
|
|
203
|
+
}
|
|
204
|
+
@keyframes l7 {
|
|
205
|
+
100% {background-position: right -25% top 0}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.factory {
|
|
209
|
+
width: var(--_ftyw);
|
|
210
|
+
height: var(--_ftyw2);
|
|
211
|
+
box-shadow: 0 3px 0 var(--_ftyc);
|
|
212
|
+
position: relative;
|
|
213
|
+
clip-path: inset(-40px 0 -5px);
|
|
214
|
+
&:before {
|
|
215
|
+
content: "";
|
|
216
|
+
position: absolute;
|
|
217
|
+
inset: auto calc(50% - 17px) 0;
|
|
218
|
+
height: var(--_ftyw3);
|
|
219
|
+
--g:no-repeat linear-gradient(color-mix(in srgb, var(--_ftyc) 30%, white) 0 0);
|
|
220
|
+
background: var(--g),var(--g),var(--g),var(--g);
|
|
221
|
+
background-size: var(--_ftyw4) 14px;
|
|
222
|
+
animation:
|
|
223
|
+
l7-1 2s infinite linear,
|
|
224
|
+
l7-2 2s infinite linear;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
@keyframes l7-1 {
|
|
228
|
+
0%,
|
|
229
|
+
100% {background-position: 0 -var(--_ftyw3),100% -var(--_ftyw3)}
|
|
230
|
+
17.5% {background-position: 0 100%,100% -var(--_ftyw3),0 -var(--_ftyw3),100% -var(--_ftyw3)}
|
|
231
|
+
35% {background-position: 0 100%,100% 100% ,0 -var(--_ftyw3),100% -var(--_ftyw3)}
|
|
232
|
+
52.5% {background-position: 0 100%,100% 100% ,0 calc(100% - var(--_ftyw4)),100% -var(--_ftyw3)}
|
|
233
|
+
70%,
|
|
234
|
+
98% {background-position: 0 100%,100% 100% ,0 calc(100% - var(--_ftyw4)),100% calc(100% - var(--_ftyw4))}
|
|
235
|
+
}
|
|
236
|
+
@keyframes l7-2 {
|
|
237
|
+
0%,70% {transform:translate(0)}
|
|
238
|
+
100% {transform:translate(200%)}
|
|
239
|
+
}
|
|
240
|
+
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { defaultColors as e } from "./constants.esm.js";
|
|
2
|
+
import { getCraftsmanConfig as t } from "./config.esm.js";
|
|
3
|
+
//#region src/styles/utilities/color.ts
|
|
4
|
+
var n = Object.keys(e).reduce((e, n) => (e[n] = {
|
|
5
|
+
enumerable: !0,
|
|
6
|
+
get: () => t().colors[n]
|
|
7
|
+
}, e), {}), r = Object.defineProperties({}, n);
|
|
8
|
+
function i(e, t = 1) {
|
|
9
|
+
e = e.replace("#", "");
|
|
10
|
+
let n, r, i;
|
|
11
|
+
if (e.length === 6) n = Number.parseInt(e.substring(0, 2), 16), r = Number.parseInt(e.substring(2, 4), 16), i = Number.parseInt(e.substring(4, 6), 16);
|
|
12
|
+
else if (e.length === 8) n = Number.parseInt(e.substring(0, 2), 16), r = Number.parseInt(e.substring(2, 4), 16), i = Number.parseInt(e.substring(4, 6), 16), t = Number.parseInt(e.substring(6, 8), 16) / 255;
|
|
13
|
+
else if (e.length === 3) n = Number.parseInt(e.charAt(0) + e.charAt(0), 16), r = Number.parseInt(e.charAt(1) + e.charAt(1), 16), i = Number.parseInt(e.charAt(2) + e.charAt(2), 16);
|
|
14
|
+
else throw Error("Invalid hex color format");
|
|
15
|
+
return t = Math.max(0, Math.min(1, t)), `rgba(${n}, ${r}, ${i}, ${t})`;
|
|
16
|
+
}
|
|
17
|
+
var a = (e, t = "hex", n = 1) => t === "rgba" ? i(r[e], n) : r[e];
|
|
18
|
+
//#endregion
|
|
19
|
+
export { a as color, r as colors, i as hexToRgba };
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { defaultColors as e, defaultWidths as t } from "./constants.esm.js";
|
|
2
|
+
//#region src/styles/utilities/config.ts
|
|
3
|
+
var n = {
|
|
4
|
+
colors: e,
|
|
5
|
+
widths: t
|
|
6
|
+
}, r = {
|
|
7
|
+
colors: { ...n.colors },
|
|
8
|
+
widths: { ...n.widths }
|
|
9
|
+
};
|
|
10
|
+
function i(e) {
|
|
11
|
+
return {
|
|
12
|
+
...e,
|
|
13
|
+
mobileMax: e.tablet - 1e-5,
|
|
14
|
+
tabletMax: e.desktop - 1e-5,
|
|
15
|
+
desktopMax: e.extDesktop - 1e-5
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
function a() {
|
|
19
|
+
return {
|
|
20
|
+
colors: { ...r.colors },
|
|
21
|
+
widths: i(r.widths)
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//#endregion
|
|
25
|
+
export { a as getCraftsmanConfig };
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
//#region src/styles/utilities/constants.ts
|
|
2
|
+
var e = {
|
|
3
|
+
text: "#2e2e2e",
|
|
4
|
+
primary: "#005cac",
|
|
5
|
+
transparent: "transparent",
|
|
6
|
+
white: "#ffffff",
|
|
7
|
+
black: "#000000",
|
|
8
|
+
grey50: "#f8fafc",
|
|
9
|
+
grey100: "#f1f5f9",
|
|
10
|
+
grey200: "#e2e8f0",
|
|
11
|
+
grey300: "#cbd5e1",
|
|
12
|
+
grey400: "#94a3b8",
|
|
13
|
+
grey500: "#64748b",
|
|
14
|
+
grey600: "#475569",
|
|
15
|
+
grey700: "#334155",
|
|
16
|
+
grey800: "#1e293b",
|
|
17
|
+
grey900: "#0f172a",
|
|
18
|
+
blue50: "#eff6ff",
|
|
19
|
+
blue100: "#dbeafe",
|
|
20
|
+
blue200: "#bfdbfe",
|
|
21
|
+
blue300: "#93c5fd",
|
|
22
|
+
blue400: "#60a5fa",
|
|
23
|
+
blue500: "#3b82f6",
|
|
24
|
+
blue600: "#2563eb",
|
|
25
|
+
blue700: "#1d4ed8",
|
|
26
|
+
blue800: "#1e40af",
|
|
27
|
+
blue900: "#1e3a8a",
|
|
28
|
+
green50: "#f0fdf4",
|
|
29
|
+
green100: "#dcfce7",
|
|
30
|
+
green200: "#bbf7d0",
|
|
31
|
+
green300: "#86efac",
|
|
32
|
+
green400: "#4ade80",
|
|
33
|
+
green500: "#22c55e",
|
|
34
|
+
green600: "#16a34a",
|
|
35
|
+
green700: "#15803d",
|
|
36
|
+
green800: "#166534",
|
|
37
|
+
green900: "#14532d",
|
|
38
|
+
yellow50: "#fefce8",
|
|
39
|
+
yellow100: "#fef9c3",
|
|
40
|
+
yellow200: "#fef08a",
|
|
41
|
+
yellow300: "#fde047",
|
|
42
|
+
yellow400: "#facc15",
|
|
43
|
+
yellow500: "#eab308",
|
|
44
|
+
yellow600: "#ca8a04",
|
|
45
|
+
yellow700: "#a16207",
|
|
46
|
+
yellow800: "#854d0e",
|
|
47
|
+
yellow900: "#713f12",
|
|
48
|
+
red50: "#fef2f2",
|
|
49
|
+
red100: "#fee2e2",
|
|
50
|
+
red200: "#fecaca",
|
|
51
|
+
red300: "#fca5a5",
|
|
52
|
+
red400: "#f87171",
|
|
53
|
+
red500: "#ef4444",
|
|
54
|
+
red600: "#dc2626",
|
|
55
|
+
red700: "#b91c1c",
|
|
56
|
+
red800: "#991b1b",
|
|
57
|
+
red900: "#7f1d1d",
|
|
58
|
+
purple50: "#faf5ff",
|
|
59
|
+
purple100: "#f3e8ff",
|
|
60
|
+
purple200: "#e9d5ff",
|
|
61
|
+
purple300: "#d8b4fe",
|
|
62
|
+
purple400: "#c084fc",
|
|
63
|
+
purple500: "#a855f7",
|
|
64
|
+
purple600: "#9333ea",
|
|
65
|
+
purple700: "#7e22ce",
|
|
66
|
+
purple800: "#6b21a8",
|
|
67
|
+
purple900: "#581c87"
|
|
68
|
+
}, t = {
|
|
69
|
+
text: 16,
|
|
70
|
+
column: 60,
|
|
71
|
+
gutter: 16,
|
|
72
|
+
extDesktop: 1320,
|
|
73
|
+
extNav: 1240,
|
|
74
|
+
desktop: 1040,
|
|
75
|
+
tablet: 660,
|
|
76
|
+
extMobile: 320
|
|
77
|
+
};
|
|
78
|
+
//#endregion
|
|
79
|
+
export { e as defaultColors, t as defaultWidths };
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { getCraftsmanConfig as e } from "./config.esm.js";
|
|
2
|
+
import { css as t } from "@emotion/react";
|
|
3
|
+
//#region src/styles/utilities/layout.ts
|
|
4
|
+
var n = [
|
|
5
|
+
"text",
|
|
6
|
+
"column",
|
|
7
|
+
"gutter",
|
|
8
|
+
"extDesktop",
|
|
9
|
+
"extNav",
|
|
10
|
+
"desktop",
|
|
11
|
+
"tablet",
|
|
12
|
+
"extMobile",
|
|
13
|
+
"mobileMax",
|
|
14
|
+
"tabletMax",
|
|
15
|
+
"desktopMax"
|
|
16
|
+
].reduce((t, n) => (t[n] = {
|
|
17
|
+
enumerable: !0,
|
|
18
|
+
get: () => e().widths[n]
|
|
19
|
+
}, t), {}), r = Object.defineProperties({}, n), i = {
|
|
20
|
+
get mobile() {
|
|
21
|
+
return "(min-width: 0px)";
|
|
22
|
+
},
|
|
23
|
+
get tablet() {
|
|
24
|
+
return `(min-width: ${r.tablet}px)`;
|
|
25
|
+
},
|
|
26
|
+
get desktop() {
|
|
27
|
+
return `(min-width: ${r.desktop}px)`;
|
|
28
|
+
},
|
|
29
|
+
get extDesktop() {
|
|
30
|
+
return `(min-width: ${r.extDesktop}px)`;
|
|
31
|
+
},
|
|
32
|
+
get mobileOnly() {
|
|
33
|
+
return `(min-width: 0px) and (max-width: ${r.mobileMax}px)`;
|
|
34
|
+
},
|
|
35
|
+
get tabletOnly() {
|
|
36
|
+
return `(min-width: ${r.tablet}px) and (max-width: ${r.tabletMax}px)`;
|
|
37
|
+
},
|
|
38
|
+
get mobileTablet() {
|
|
39
|
+
return `(min-width: 0px) and (max-width: ${r.tabletMax}px)`;
|
|
40
|
+
},
|
|
41
|
+
get desktopOnly() {
|
|
42
|
+
return `(min-width: ${r.desktop}px) and (max-width: ${r.desktopMax}px)`;
|
|
43
|
+
}
|
|
44
|
+
}, a = (e, n) => t`@media ${i[e]} {
|
|
45
|
+
${n}
|
|
46
|
+
}`;
|
|
47
|
+
//#endregion
|
|
48
|
+
export { a as breakpoint, i as media, r as widths };
|
|
@@ -4,5 +4,12 @@ declare const meta: Meta<typeof Button>;
|
|
|
4
4
|
export default meta;
|
|
5
5
|
type Story = StoryObj<typeof meta>;
|
|
6
6
|
export declare const Default: Story;
|
|
7
|
+
export declare const Primary: Story;
|
|
8
|
+
export declare const Text: Story;
|
|
7
9
|
export declare const Disabled: Story;
|
|
10
|
+
export declare const FullyDisabled: Story;
|
|
11
|
+
export declare const Loading: Story;
|
|
8
12
|
export declare const AsSubmit: Story;
|
|
13
|
+
export declare const WithClassName: Story;
|
|
14
|
+
export declare const WithAriaLabel: Story;
|
|
15
|
+
export declare const WithEmotionStyles: Story;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
declare const meta: Meta;
|
|
3
|
+
export default meta;
|
|
4
|
+
type Story = StoryObj<typeof meta>;
|
|
5
|
+
export declare const AntDesign: Story;
|
|
6
|
+
export declare const BoxIcons: Story;
|
|
7
|
+
export declare const BootstrapIcons: Story;
|
|
8
|
+
export declare const CssGgIcons: Story;
|
|
9
|
+
export declare const CircumIcons: Story;
|
|
10
|
+
export declare const Devicons: Story;
|
|
11
|
+
export declare const FontAwesome: Story;
|
|
12
|
+
export declare const FontAwesome6: Story;
|
|
13
|
+
export declare const FlatColorIcons: Story;
|
|
14
|
+
export declare const Feather: Story;
|
|
15
|
+
export declare const GameIcons: Story;
|
|
16
|
+
export declare const GithubOcticons: Story;
|
|
17
|
+
export declare const GrommetIcons: Story;
|
|
18
|
+
export declare const HeroIcons: Story;
|
|
19
|
+
export declare const HeroIcons2: Story;
|
|
20
|
+
export declare const IcoMoonFree: Story;
|
|
21
|
+
export declare const Ionicons4: Story;
|
|
22
|
+
export declare const Ionicons5: Story;
|
|
23
|
+
export declare const LineAwesome: Story;
|
|
24
|
+
export declare const Lucide: Story;
|
|
25
|
+
export declare const MaterialDesignIcons: Story;
|
|
26
|
+
export declare const PhosphorIcons: Story;
|
|
27
|
+
export declare const RemixIcons: Story;
|
|
28
|
+
export declare const RadixIcons: Story;
|
|
29
|
+
export declare const SimpleIcons: Story;
|
|
30
|
+
export declare const SimpleLineIcons: Story;
|
|
31
|
+
export declare const TablerIcons: Story;
|
|
32
|
+
export declare const ThemifyIcons: Story;
|
|
33
|
+
export declare const Typicons: Story;
|
|
34
|
+
export declare const VSCodeIcons: Story;
|
|
35
|
+
export declare const WeatherIcons: Story;
|
|
36
|
+
export declare const Palette: Story;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Modal } from '../components/Modal';
|
|
3
|
+
declare const meta: Meta<typeof Modal>;
|
|
4
|
+
export default meta;
|
|
5
|
+
type Story = StoryObj<typeof meta>;
|
|
6
|
+
export declare const Dialog: Story;
|
|
7
|
+
export declare const Panel: Story;
|
|
8
|
+
export declare const NonDismissableBackground: Story;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { ToastContainerProps } from 'react-toastify';
|
|
3
|
+
type StoryArgs = Pick<ToastContainerProps, "position" | "autoClose" | "theme" | "closeOnClick" | "pauseOnHover" | "draggable" | "newestOnTop">;
|
|
4
|
+
declare const meta: Meta<StoryArgs>;
|
|
5
|
+
export default meta;
|
|
6
|
+
type Story = StoryObj<StoryArgs>;
|
|
7
|
+
export declare const UsageGuide: Story;
|
|
@@ -1 +1,8 @@
|
|
|
1
|
+
import { default as z } from 'zod';
|
|
2
|
+
export declare const ButtonType: z.ZodEnum<{
|
|
3
|
+
text: "text";
|
|
4
|
+
primary: "primary";
|
|
5
|
+
default: "default";
|
|
6
|
+
}>;
|
|
7
|
+
export type ButtonType = z.infer<typeof ButtonType>;
|
|
1
8
|
export declare const button: import('@emotion/utils').SerializedStyles;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const code: import('@emotion/utils').SerializedStyles;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { SerializedStyles } from '@emotion/react';
|
|
2
|
+
import { default as z } from 'zod';
|
|
3
|
+
export declare const LoaderStyleSchema: z.ZodEnum<{
|
|
4
|
+
dots: "dots";
|
|
5
|
+
"dots-trace": "dots-trace";
|
|
6
|
+
"dots-bounce": "dots-bounce";
|
|
7
|
+
"dots-orbit": "dots-orbit";
|
|
8
|
+
dashes: "dashes";
|
|
9
|
+
spinner: "spinner";
|
|
10
|
+
swirl: "swirl";
|
|
11
|
+
ball: "ball";
|
|
12
|
+
boxy: "boxy";
|
|
13
|
+
factory: "factory";
|
|
14
|
+
}>;
|
|
15
|
+
export type LoaderStyle = z.infer<typeof LoaderStyleSchema>;
|
|
16
|
+
export type LoaderStyleDefinition = (color: string, width?: number) => SerializedStyles;
|
|
17
|
+
export declare const loaders: Record<LoaderStyle, LoaderStyleDefinition>;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare const typography: {
|
|
2
|
+
body: import('@emotion/utils').SerializedStyles;
|
|
3
|
+
h1: import('@emotion/utils').SerializedStyles;
|
|
4
|
+
h2: import('@emotion/utils').SerializedStyles;
|
|
5
|
+
h3: import('@emotion/utils').SerializedStyles;
|
|
6
|
+
h4: import('@emotion/utils').SerializedStyles;
|
|
7
|
+
h5: import('@emotion/utils').SerializedStyles;
|
|
8
|
+
h6: import('@emotion/utils').SerializedStyles;
|
|
9
|
+
p: import('@emotion/utils').SerializedStyles;
|
|
10
|
+
};
|
|
11
|
+
export declare const typographyStyles: import('@emotion/utils').SerializedStyles[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import * as exportedComponents from "../../components";
|
|
1
|
+
import * as exportedComponents from "../../components/index";
|
|
2
2
|
type ExportedComponentName = keyof typeof exportedComponents & string;
|
|
3
3
|
export type RegisteredComponentName = Uncapitalize<ExportedComponentName>;
|
|
4
4
|
export declare const componentSelectors: Record<RegisteredComponentName, string>;
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const defaultAppTheme: Theme;
|
|
1
|
+
export declare const htmlTagNames: Set<string>;
|
package/styles/theme/types.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ import { componentSelectors } from './components';
|
|
|
4
4
|
export type ColorVariableName = `--${ColorKey}`;
|
|
5
5
|
export type RegisteredComponent = keyof typeof componentSelectors;
|
|
6
6
|
export type ComponentThemeOverrides = {
|
|
7
|
-
[K in RegisteredComponent]?: CSSObject | SerializedStyles;
|
|
7
|
+
[K in RegisteredComponent]?: CSSObject | SerializedStyles | string;
|
|
8
8
|
};
|
|
9
9
|
export type Colors = Partial<Record<ColorVariableName, string>>;
|
|
10
10
|
export type Theme = {
|
|
@@ -1,69 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const colors:
|
|
3
|
-
white: string;
|
|
4
|
-
black: string;
|
|
5
|
-
transparent: string;
|
|
6
|
-
grey50: string;
|
|
7
|
-
grey100: string;
|
|
8
|
-
grey200: string;
|
|
9
|
-
grey300: string;
|
|
10
|
-
grey400: string;
|
|
11
|
-
grey500: string;
|
|
12
|
-
grey600: string;
|
|
13
|
-
grey700: string;
|
|
14
|
-
grey800: string;
|
|
15
|
-
grey900: string;
|
|
16
|
-
blue50: string;
|
|
17
|
-
blue100: string;
|
|
18
|
-
blue200: string;
|
|
19
|
-
blue300: string;
|
|
20
|
-
blue400: string;
|
|
21
|
-
blue500: string;
|
|
22
|
-
blue600: string;
|
|
23
|
-
blue700: string;
|
|
24
|
-
blue800: string;
|
|
25
|
-
blue900: string;
|
|
26
|
-
green50: string;
|
|
27
|
-
green100: string;
|
|
28
|
-
green200: string;
|
|
29
|
-
green300: string;
|
|
30
|
-
green400: string;
|
|
31
|
-
green500: string;
|
|
32
|
-
green600: string;
|
|
33
|
-
green700: string;
|
|
34
|
-
green800: string;
|
|
35
|
-
green900: string;
|
|
36
|
-
yellow50: string;
|
|
37
|
-
yellow100: string;
|
|
38
|
-
yellow200: string;
|
|
39
|
-
yellow300: string;
|
|
40
|
-
yellow400: string;
|
|
41
|
-
yellow500: string;
|
|
42
|
-
yellow600: string;
|
|
43
|
-
yellow700: string;
|
|
44
|
-
yellow800: string;
|
|
45
|
-
yellow900: string;
|
|
46
|
-
red50: string;
|
|
47
|
-
red100: string;
|
|
48
|
-
red200: string;
|
|
49
|
-
red300: string;
|
|
50
|
-
red400: string;
|
|
51
|
-
red500: string;
|
|
52
|
-
red600: string;
|
|
53
|
-
red700: string;
|
|
54
|
-
red800: string;
|
|
55
|
-
red900: string;
|
|
56
|
-
purple50: string;
|
|
57
|
-
purple100: string;
|
|
58
|
-
purple200: string;
|
|
59
|
-
purple300: string;
|
|
60
|
-
purple400: string;
|
|
61
|
-
purple500: string;
|
|
62
|
-
purple600: string;
|
|
63
|
-
purple700: string;
|
|
64
|
-
purple800: string;
|
|
65
|
-
purple900: string;
|
|
66
|
-
};
|
|
1
|
+
import { ColorType } from './types';
|
|
2
|
+
export declare const colors: Record<string, string>;
|
|
67
3
|
export type ColorKey = keyof typeof colors;
|
|
68
4
|
export declare function hexToRgba(hex: string, alpha?: number): string;
|
|
69
5
|
export declare const color: (name: ColorKey, type?: ColorType, alpha?: number) => string;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ResponsiveWidth, SetConfig } from './types';
|
|
2
|
+
export declare function setCraftsmanConfig(config: SetConfig): void;
|
|
3
|
+
export declare function resetCraftsmanConfig(): void;
|
|
4
|
+
export declare function getCraftsmanConfig(): {
|
|
5
|
+
colors: Record<string, string>;
|
|
6
|
+
widths: ResponsiveWidth;
|
|
7
|
+
};
|