@guillaumemmm/marquedefabrique 1.0.5 → 2.0.0

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/src/kit.css ADDED
@@ -0,0 +1,457 @@
1
+ /* TITLES */
2
+ .mdf-title1,
3
+ .mdf-title2,
4
+ .mdf-title3,
5
+ .mdf-title4 {
6
+ font-weight: 700;
7
+ }
8
+
9
+ .mdf-title1 {
10
+ font-size: 3rem;
11
+ }
12
+
13
+ .mdf-title2 {
14
+ font-size: 2.4rem;
15
+ }
16
+
17
+ .mdf-title3 {
18
+ font-size: 1.7rem;
19
+ }
20
+
21
+ .mdf-title4 {
22
+ font-size: 1.2rem;
23
+ }
24
+
25
+ /* TEXT */
26
+ .mdf-emphasis {
27
+ font-weight: 700;
28
+ }
29
+
30
+ .mdf-italic {
31
+ font-style: italic;
32
+ }
33
+
34
+ .mdf-highlighted {
35
+ font-weight: 700;
36
+ color: var(--mdf-color-text-brand-primary-default);
37
+
38
+ &.mdf-highlighted-secondary {
39
+ color: var(--mdf-color-text-brand-secondary-default);
40
+ }
41
+ }
42
+
43
+ .mdf-muted {
44
+ color: var(--mdf-color-text-muted);
45
+ }
46
+
47
+ .mdf-block {
48
+ padding: 1rem;
49
+ background-color: var(--mdf-color-background-muted);
50
+ border-radius: 8px;
51
+ border: 1px solid var(--mdf-color-border-default);
52
+ box-shadow: 0px 1px 1px var(--mdf-color-transparent-300);
53
+
54
+ &.mdf-block-brand-primary {
55
+ background-color: var(--mdf-color-background-brand-primary);
56
+ border-color: var(--mdf-color-border-brand-primary);
57
+ }
58
+
59
+ &.mdf-block-brand-secondary {
60
+ background-color: var(--mdf-color-background-brand-secondary);
61
+ border-color: var(--mdf-color-border-brand-secondary);
62
+ }
63
+
64
+ &.mdf-block-error {
65
+ background-color: var(--mdf-color-background-error);
66
+ border-color: var(--mdf-color-border-error);
67
+ }
68
+
69
+ &.mdf-block-success {
70
+ background-color: var(--mdf-color-background-success);
71
+ border-color: var(--mdf-color-border-success);
72
+ }
73
+
74
+ &.mdf-block-warning {
75
+ background-color: var(--mdf-color-background-warning);
76
+ border-color: var(--mdf-color-border-warning);
77
+ }
78
+ }
79
+
80
+ /* BADGE */
81
+ .mdf-badge {
82
+ display: inline-block;
83
+ --background: var(--mdf-color-background-default);
84
+ --background-dark: hsl(from var(--background) h s calc(l - 5));
85
+ background: var(--background);
86
+ background: linear-gradient(var(--background), var(--background-dark));
87
+
88
+ padding: 5px 7px;
89
+ border-radius: 8px;
90
+ white-space: nowrap;
91
+ box-shadow: var(--mdf-color-transparent-100) -1px -2px 0.5px inset;
92
+ }
93
+
94
+ /* LINK */
95
+ .mdf-link {
96
+ display: inline;
97
+ line-height: 1rem;
98
+ padding: 1px 3px;
99
+ border-radius: 5px;
100
+
101
+ --color-visited: var(--mdf-color-brand-primary-muted);
102
+ --hover-luminosity-reduction: 5;
103
+ --text-luminosity-reduction: 85;
104
+
105
+ color: var(--mdf-color-text-default);
106
+ background-color: var(--mdf-color-background-muted);
107
+
108
+ text-decoration: underline;
109
+ text-underline-offset: 1.5px;
110
+ text-decoration-thickness: 1.5px;
111
+
112
+ &:visited {
113
+ background-color: var(--mdf-color-background-brand-secondary);
114
+ color: var(--mdf-color-text-brand-secondary);
115
+ }
116
+
117
+ &:hover {
118
+ background-color: hsl(from var(--mdf-color-background-muted) h s calc(l - 5));
119
+
120
+ &:visited {
121
+ background-color: hsl(from var(--mdf-color-background-brand-secondary) h s calc(l - 5));
122
+ }
123
+ }
124
+
125
+ &:focus-visible {
126
+ outline: 2px solid var(--mdf-color-outline-default);
127
+ outline-offset: 1px;
128
+ }
129
+ }
130
+
131
+ /* BUTTON */
132
+ .mdf-button-container {
133
+ border: 3px solid transparent;
134
+ border-radius: 11px;
135
+ background-clip: padding-box;
136
+ position: relative;
137
+ display: inline-block;
138
+
139
+ --color: var(--mdf-color-background-muted);
140
+ --color-dark: hsl(from var(--color) h s calc(l - 2));
141
+ --color-border-light: hsl(from var(--color) h s calc(l + 3));
142
+ --color-border-dark: hsl(from var(--color) h s calc(l - 5));
143
+
144
+ --color-border-light-2: hsl(from var(--color) h calc(s - 10) l);
145
+ --color-border-dark-2: hsl(from var(--color) calc(h) s calc(l - 20));
146
+
147
+ &:hover {
148
+ &:before {
149
+ content: '';
150
+ position: absolute;
151
+ top: 0;
152
+ right: 0;
153
+ bottom: 0;
154
+ left: 0;
155
+ z-index: -1;
156
+ margin: -3px;
157
+ border-radius: inherit;
158
+ background: linear-gradient(var(--color-border-light-2), var(--color-border-dark-2));
159
+ }
160
+ }
161
+
162
+ .mdf-button {
163
+ color: inherit;
164
+ background: linear-gradient(var(--color-border-light) 10%, var(--color-border-dark) 50%);
165
+ cursor: pointer;
166
+ line-height: 1.5rem;
167
+ text-decoration: none;
168
+ border-radius: 8px;
169
+ box-shadow: 0px 0px 2px var(--mdf-color-transparent-300);
170
+ font-size: 1rem;
171
+ padding: 0;
172
+ border: none;
173
+ transition: box-shadow 0.2s;
174
+
175
+ .mdf-button-content {
176
+ display: flex;
177
+ align-items: center;
178
+ margin: 5px;
179
+ border-radius: 5px;
180
+ padding: 5px 1rem;
181
+ background-color: var(--color);
182
+ transition: background-color 0.2s
183
+ }
184
+
185
+ &:active {
186
+ box-shadow: 0px 0px 1px var(--mdf-color-transparent-200);
187
+
188
+ .mdf-button-content {
189
+ background-color: var(--color-dark);
190
+ }
191
+ }
192
+
193
+ &:focus-visible {
194
+ outline: 2px solid var(--mdf-color-outline-default);
195
+ outline-offset: 3px;
196
+ }
197
+ }
198
+ }
199
+
200
+ /* FORM */
201
+ .mdf-select-field {
202
+ cursor: pointer;
203
+ background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/></svg>");
204
+ background-repeat: no-repeat;
205
+ background-position: right 0.75rem center;
206
+ background-size: 16px 12px;
207
+
208
+ -webkit-appearance: none;
209
+ -moz-appearance: none;
210
+ appearance: none;
211
+
212
+ border: 1px solid var(--mdf-color-border-muted);
213
+ border-radius: 8px;
214
+ font-size: inherit;
215
+ padding: 9px 12px;
216
+ line-height: 1.5rem;
217
+ background-color: var(--mdf-color-background-muted);
218
+ width: 250px;
219
+ box-shadow: 0px 1px 1px var(--mdf-color-transparent-300);
220
+ font-family: inherit;
221
+ color: inherit;
222
+
223
+ &:hover,
224
+ &:focus {
225
+ background-color: var(--mdf-color-background-default);
226
+ }
227
+
228
+ &:focus {
229
+ outline: 2px solid var(--mdf-color-outline-default);
230
+ outline-offset: 3px;
231
+ }
232
+ }
233
+
234
+ .mdf-input-label,
235
+ .mdf-select-label,
236
+ .mdf-textarea-label {
237
+ margin-bottom: 2px;
238
+ }
239
+
240
+ .mdf-input-field[type="text"],
241
+ .mdf-input-field[type="search"],
242
+ .mdf-input-field[type="password"],
243
+ .mdf-textarea-field {
244
+ border: 1px solid var(--mdf-color-border-muted);
245
+ border-radius: 8px;
246
+ font-size: inherit;
247
+ padding: 9px 12px;
248
+ line-height: 1.5rem;
249
+ background-color: var(--mdf-color-background-muted);
250
+ width: 250px;
251
+ box-shadow: 0px 1px 1px var(--mdf-color-transparent-300);
252
+ font-family: inherit;
253
+
254
+ &:hover,
255
+ &:focus {
256
+ background-color: var(--mdf-color-background-default);
257
+ }
258
+
259
+ &:focus {
260
+ outline: 2px solid var(--mdf-color-outline-default);
261
+ outline-offset: 3px;
262
+ }
263
+ }
264
+
265
+ .mdf-textarea-field {
266
+ width: 320px;
267
+ height: 150px;
268
+ }
269
+
270
+ .mdf-checkbox {
271
+ font-size: 1rem;
272
+ display: flex;
273
+ align-items: center;
274
+ gap: 0.5em;
275
+ cursor: pointer;
276
+ }
277
+
278
+ .mdf-checkbox-field {
279
+ -webkit-appearance: none;
280
+ appearance: none;
281
+ margin: 0;
282
+ width: 1.4em;
283
+ height: 1.4em;
284
+ border: 0.15em solid var(--mdf-color-border-brand-primary);
285
+ background-color: var(--mdf-color-background-brand-primary);
286
+ border-radius: 0.25rem;
287
+ padding: 0;
288
+ cursor: pointer;
289
+
290
+ display: grid;
291
+ place-content: center;
292
+
293
+ &:hover,
294
+ &:focus {
295
+ background-color: var(--mdf-color-background-default);
296
+ }
297
+ }
298
+
299
+ .mdf-checkbox-field::before {
300
+ content: "";
301
+ width: 20px;
302
+ height: 20px;
303
+ clip-path: path("M 6.9101 9.3579 C 6.4728 8.9207 5.7636 8.9207 5.3259 9.3579 S 4.8887 10.5044 5.3259 10.9421 L 7.4069 13.023 C 8.056 13.6722 9.108 13.6722 9.7571 13.023 L 10.1661 12.614 L 6.9101 9.3579 Z M 14.5261 6.6699 C 14.0888 6.2327 13.3796 6.2327 12.9419 6.6699 L 8.582 11.0299 L 10.1661 12.614 L 14.5261 8.2541 C 14.9633 7.8164 14.9633 7.1072 14.5261 6.6699 Z");
304
+ transform: scale(0);
305
+ transform-origin: bottom left;
306
+ box-shadow: inset 1em 1em var(--mdf-color-text-brand-primary-default);
307
+ background-color: CanvasText;
308
+ }
309
+
310
+ .mdf-checkbox-field:checked::before {
311
+ transform: scale(1);
312
+ }
313
+
314
+ .mdf-checkbox-field:focus-visible {
315
+ outline: 2px solid var(--mdf-color-outline-default);
316
+ outline-offset: 3px;
317
+ }
318
+
319
+ .mdf-color {
320
+ --border-radius: 8px;
321
+ --background: var(--mdf-color-background-muted);
322
+ --border: 1px solid var(--mdf-color-border-muted);
323
+
324
+ display: flex;
325
+ flex-direction: column;
326
+ width: auto;
327
+
328
+ .mdf-color-label {
329
+ padding: 0.5rem;
330
+ background-color: var(--background);
331
+ border-bottom-left-radius: var(--border-radius);
332
+ border-bottom-right-radius: var(--border-radius);
333
+ border: var(--border);
334
+ box-shadow: 0px 1px 0px var(--mdf-color-transparent-300);
335
+ border-top: none;
336
+ }
337
+
338
+ .mdf-color-field {
339
+ appearance: none;
340
+ -moz-appearance: none;
341
+ -webkit-appearance: none;
342
+ background: none;
343
+ border: 0;
344
+ cursor: pointer;
345
+ padding: 0;
346
+ width: 100%;
347
+ height: 4rem;
348
+ position: relative;
349
+ z-index: 0;
350
+ border-bottom-left-radius: 0;
351
+ border-bottom-right-radius: 0;
352
+
353
+ &:focus {
354
+ border-radius: var(--border-radius);
355
+ }
356
+
357
+ &::-webkit-color-swatch {
358
+ border-top-left-radius: var(--border-radius);
359
+ border-top-right-radius: var(--border-radius);
360
+ border-bottom-left-radius: 0;
361
+ border-bottom-right-radius: 0;
362
+ border: var(--border);
363
+ }
364
+
365
+ &::-webkit-color-swatch-wrapper {
366
+ padding: 0;
367
+ }
368
+ }
369
+ }
370
+
371
+ /* TABLES */
372
+ .mdf-table {
373
+ border-radius: 8px;
374
+ border-style: hidden;
375
+ box-shadow: 0 1px 2px var(--mdf-color-transparent-200);
376
+
377
+ .mdf-th:first-child {
378
+ border-top-left-radius: 8px;
379
+ }
380
+
381
+ .mdf-th:last-child {
382
+ border-top-right-radius: 8px;
383
+ }
384
+
385
+ tbody>tr:last-child>td:first-child {
386
+ border-bottom-left-radius: 8px;
387
+ }
388
+
389
+ tbody>tr:last-child>td:last-child {
390
+ border-bottom-right-radius: 8px;
391
+ }
392
+
393
+ .mdf-td,
394
+ .mdf-th {
395
+ padding: 0.5rem;
396
+ border: 1px solid var(--mdf-color-border-muted);
397
+ }
398
+
399
+ .mdf-th {
400
+ font-weight: 600;
401
+ }
402
+
403
+ .mdf-th,
404
+ :nth-child(even)>.mdf-td {
405
+ background-color: var(--mdf-color-background-muted);
406
+ text-align: start;
407
+ }
408
+ }
409
+
410
+ /* CODE */
411
+ .mdf-code-inline {
412
+ line-height: 1rem;
413
+ padding: 1px 3px;
414
+ border-radius: 5px;
415
+ background-color: var(--mdf-color-background-muted);
416
+ font-weight: 600;
417
+ font-family: monospace;
418
+ }
419
+
420
+ .mdf-code-block {
421
+ line-height: 1rem;
422
+ padding: 10px 1rem;
423
+ border-radius: 8px;
424
+ background-color: var(--mdf-color-background-brand-primary);
425
+ font-family: monospace;
426
+ margin: 0;
427
+ box-shadow: 0px 1px 1px var(--mdf-color-transparent-300);
428
+ }
429
+
430
+ /* QUOTE */
431
+ .mdf-quote {
432
+ padding: 1rem 2rem;
433
+ border-top-right-radius: 8px;
434
+ border-bottom-right-radius: 8px;
435
+ background-color: var(--mdf-color-background-brand-secondary);
436
+ box-shadow: 0px 1px 1px var(--mdf-color-transparent-300);
437
+ border-left: 5px solid var(--mdf-color-border-brand-secondary);
438
+
439
+ .mdf-quote-source {
440
+ margin-top: 1rem;
441
+ font-style: italic;
442
+ color: var(--mdf-color-text-muted);
443
+ }
444
+ }
445
+
446
+ /* UTILITIES */
447
+ .visually-hidden {
448
+ position: absolute !important;
449
+ width: 1px !important;
450
+ height: 1px !important;
451
+ padding: 0 !important;
452
+ margin: -1px !important;
453
+ overflow: hidden !important;
454
+ clip: rect(0, 0, 0, 0) !important;
455
+ white-space: nowrap !important;
456
+ border: 0 !important;
457
+ }
@@ -1,6 +1,4 @@
1
- // Generated on Fri Apr 04 2025 from v1.0.3
2
-
3
- export const reset = `@layer reset {
1
+ @layer reset {
4
2
  * {
5
3
  box-sizing: border-box;
6
4
  }
@@ -130,4 +128,3 @@ export const reset = `@layer reset {
130
128
  border-spacing: 0;
131
129
  }
132
130
  }
133
- `;
@@ -0,0 +1,68 @@
1
+ :root {
2
+
3
+ /* PRIMITIVES */
4
+ --mdf-color-grey-100: rgb(36, 36, 36);
5
+ --mdf-color-grey-200: rgb(51, 51, 51);
6
+ --mdf-color-grey-300: rgb(71, 71, 71);
7
+ --mdf-color-grey-400: rgb(101, 101, 101);
8
+ --mdf-color-grey-500: rgb(135, 135, 135);
9
+ --mdf-color-grey-600: rgb(170, 170, 170);
10
+ --mdf-color-grey-700: rgb(201, 201, 201);
11
+ --mdf-color-grey-800: rgb(225, 225, 225);
12
+ --mdf-color-grey-900: rgb(242, 242, 242);
13
+ --mdf-color-grey-1000: rgb(250, 250, 250);
14
+
15
+ --mdf-color-blue-100: rgb(0, 99, 192);
16
+ --mdf-color-blue-500: hsl(from var(--mdf-color-blue-100) h s calc(l + 20));
17
+ --mdf-color-blue-900: hsl(from var(--mdf-color-blue-100) h s calc(l + 60));
18
+
19
+ --mdf-color-purple-100: rgb(83, 47, 128);
20
+ --mdf-color-purple-500: hsl(from var(--mdf-color-purple-100) h s calc(l + 20));
21
+ --mdf-color-purple-900: hsl(from var(--mdf-color-purple-100) h s calc(l + 60));
22
+
23
+ --mdf-color-green-100: rgb(49, 148, 59);
24
+ --mdf-color-green-500: hsl(from var(--mdf-color-green-100) h s calc(l + 20));
25
+ --mdf-color-green-900: hsl(from var(--mdf-color-green-100) h s calc(l + 55));
26
+
27
+ --mdf-color-red-100: rgb(175, 0, 35);
28
+ --mdf-color-red-500: hsl(from var(--mdf-color-red-100) h s calc(l + 20));
29
+ --mdf-color-red-900: hsl(from var(--mdf-color-red-100) h s calc(l + 62));
30
+
31
+ --mdf-color-yellow-100: rgb(255, 207, 33);
32
+ --mdf-color-yellow-500: hsl(from var(--mdf-color-yellow-100) h s calc(l + 16));
33
+ --mdf-color-yellow-900: hsl(from var(--mdf-color-yellow-100) h s calc(l + 38));
34
+
35
+ --mdf-color-transparent-100: rgba(0, 0, 0, 0.1);
36
+ --mdf-color-transparent-200: rgba(0, 0, 0, 0.2);
37
+ --mdf-color-transparent-300: rgba(0, 0, 0, 0.3);
38
+ --mdf-color-transparent-500: rgba(0, 0, 0, 0.5);
39
+
40
+
41
+ /* SEMANTIC */
42
+ --mdf-color-text-default: var(--mdf-color-grey-100);
43
+ --mdf-color-text-muted: var(--mdf-color-grey-200);
44
+ --mdf-color-text-brand-primary-default: var(--mdf-color-blue-100);
45
+ --mdf-color-text-brand-primary-muted: var(--mdf-color-blue-500);
46
+ --mdf-color-text-brand-secondary-default: var(--mdf-color-purple-100);
47
+ --mdf-color-text-brand-secondary-muted: var(--mdf-color-purple-500);
48
+
49
+ --mdf-color-background-default: var(--mdf-color-grey-1000);
50
+ --mdf-color-background-muted: var(--mdf-color-grey-900);
51
+ --mdf-color-background-brand-primary: var(--mdf-color-blue-900);
52
+ --mdf-color-background-brand-secondary: var(--mdf-color-purple-900);
53
+ --mdf-color-background-error: var(--mdf-color-red-900);
54
+ --mdf-color-background-warning: var(--mdf-color-yellow-900);
55
+ --mdf-color-background-success: var(--mdf-color-green-900);
56
+
57
+ --mdf-color-border-default: var(--mdf-color-grey-700);
58
+ --mdf-color-border-muted: var(--mdf-color-grey-800);
59
+ --mdf-color-border-brand-primary: var(--mdf-color-blue-500);
60
+ --mdf-color-border-brand-secondary: var(--mdf-color-purple-500);
61
+ --mdf-color-border-error: var(--mdf-color-red-500);
62
+ --mdf-color-border-warning: var(--mdf-color-yellow-500);
63
+ --mdf-color-border-success: var(--mdf-color-green-500);
64
+
65
+ --mdf-color-outline-default: var(--mdf-color-grey-200);
66
+
67
+ --mdf-color-box-shadow-default:
68
+ }
package/vite.config.js ADDED
@@ -0,0 +1,25 @@
1
+ import { defineConfig } from 'vite';
2
+ import { viteStaticCopy } from 'vite-plugin-static-copy';
3
+
4
+ export default defineConfig({
5
+ plugins: [
6
+ viteStaticCopy({
7
+ targets: [
8
+ { src: 'src/**.css', dest: 'css' },
9
+ ],
10
+ }),
11
+ ],
12
+ build: {
13
+ lib: {
14
+ entry: 'src/index.js',
15
+ name: 'mdf',
16
+ fileName: 'js/kit',
17
+ formats: ['es'],
18
+ }
19
+ },
20
+ server: {
21
+ fs: {
22
+ allow: ['./src', './examples'],
23
+ },
24
+ },
25
+ });
@@ -1,5 +0,0 @@
1
- {
2
- "prettier": {
3
- "configPath": ".prettierrc"
4
- }
5
- }