@natachah/vanilla-frontend 0.2.9 → 0.4.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.
Files changed (52) hide show
  1. package/docs/main-demo.js +2 -0
  2. package/docs/main.js +1 -1
  3. package/docs/pages/base/layout.html +131 -0
  4. package/docs/pages/components/button.html +9 -10
  5. package/docs/pages/components/disclosure.html +0 -139
  6. package/docs/pages/components/loading.html +4 -4
  7. package/docs/pages/{components → customs}/badge.html +4 -8
  8. package/docs/pages/{components → customs}/breadcrumb.html +1 -1
  9. package/docs/pages/{components → customs}/card.html +4 -8
  10. package/docs/pages/{components → customs}/list.html +0 -65
  11. package/docs/pages/{components → customs}/slider.html +14 -29
  12. package/docs/pages/demo/layout.html +85 -0
  13. package/docs/pages/javascript/comfort.html +14 -2
  14. package/docs/pages/quick-start/customization.html +115 -87
  15. package/docs/pages/quick-start/mixins.html +22 -54
  16. package/docs/src/js/demo.js +7 -1
  17. package/docs/src/js/doc-layout.js +13 -9
  18. package/docs/vite.config.mjs +1 -1
  19. package/js/_comfort.js +17 -0
  20. package/js/tests/autofill.test.js +8 -0
  21. package/js/tests/comfort.test.js +32 -2
  22. package/js/tests/consent.test.js +4 -0
  23. package/js/tests/dialog.test.js +4 -1
  24. package/js/tests/dropdown.test.js +4 -0
  25. package/js/tests/form-helper.test.js +2 -2
  26. package/js/tests/scroll.test.js +21 -6
  27. package/js/tests/slider.test.js +19 -2
  28. package/js/tests/sortable.test.js +8 -0
  29. package/js/tests/tabpanel.test.js +4 -0
  30. package/js/tests/toggle.test.js +4 -0
  31. package/js/tests/trap.test.js +4 -0
  32. package/js/tests/tree.test.js +10 -10
  33. package/natachah-vanilla-frontend-0.4.0.tgz +0 -0
  34. package/package.json +7 -7
  35. package/scss/abstracts/_mixins.scss +58 -87
  36. package/scss/base/_layout.scss +61 -0
  37. package/scss/base/_typography.scss +2 -2
  38. package/scss/base/index.scss +1 -0
  39. package/scss/components/_badge.scss +12 -0
  40. package/scss/components/_button.scss +12 -0
  41. package/scss/components/_card.scss +12 -0
  42. package/scss/components/_disclosure.scss +0 -3
  43. package/scss/components/index.scss +3 -3
  44. package/scss/themes/_root.scss +43 -4
  45. package/scss/vanilla-frontend-doc.scss +34 -0
  46. package/vitest.config.js +2 -1
  47. package/docs/pages/test.html +0 -15
  48. package/natachah-vanilla-frontend-0.2.9.tgz +0 -0
  49. package/scss/abstracts/_options.scss +0 -44
  50. /package/docs/pages/{components → customs}/drawer.html +0 -0
  51. /package/docs/pages/{components → customs}/dropdown.html +0 -0
  52. /package/docs/pages/{components → customs}/grid.html +0 -0
@@ -13,7 +13,6 @@
13
13
  @use "sass:meta";
14
14
  @use "sass:list";
15
15
  @use "./default";
16
- @use "./options" as *;
17
16
 
18
17
  /// Create a basic item that can be interactive or not
19
18
  ///
@@ -37,6 +36,7 @@
37
36
 
38
37
  $default-hover-background: color-mix(in srgb, $default-background, var(--hover-color) var(--hover-percent));
39
38
  $default-active-background: color-mix(in srgb, $default-background, var(--active-color) var(--active-percent));
39
+ $default-outline-color: color-mix(in srgb, var(--focus-color, $default-color), transparent var(--focus-percent));
40
40
 
41
41
  // Define the CSS
42
42
  color: $default-color;
@@ -56,9 +56,6 @@
56
56
  }
57
57
  }
58
58
 
59
- // Define the outline variations
60
- @include with-outline-variations($name, $states);
61
-
62
59
  // Define the interactive states
63
60
  @if($states !=()) {
64
61
 
@@ -74,29 +71,22 @@
74
71
  // State: focus
75
72
  @if(list.index($states, 'focus')) {
76
73
 
77
- @if(list.index($states, 'hover')) {
74
+ &:focus,
75
+ &:focus-visible {
78
76
 
79
- &:focus,
80
- &:focus-visible {
77
+ @if(list.index($states, 'hover')) {
81
78
  color: var(--#{$name}-focus-color, var(--#{$name}-hover-color, $default-color));
82
79
  background-color: var(--#{$name}-focus-background, var(--#{$name}-hover-background, $default-hover-background));
83
80
  border-color: var(--#{$name}-focus-border-color, var(--#{$name}-hover-border-color, $default-border-color));
84
81
  }
85
- }
86
-
87
- @else {
88
82
 
89
- &:focus,
90
- &:focus-visible {
83
+ @else {
91
84
  color: var(--#{$name}-focus-color, $default-color);
92
85
  background-color: var(--#{$name}-focus-background, $default-hover-background);
93
86
  border-color: var(--#{$name}-focus-border-color, $default-border-color);
94
87
  }
95
- }
96
88
 
97
- &:focus,
98
- &:focus-visible {
99
- outline: var(--#{$name}-outline-size, var(--outline-size)) var(--#{$name}-outline-style, var(--outline-style)) var(--#{$name}-outline-color, var(--outline-color));
89
+ outline: var(--#{$name}-outline-size, var(--outline-size)) var(--#{$name}-outline-style, var(--outline-style)) var(--#{$name}-outline-color, var(--outline-color, $default-outline-color));
100
90
  outline-offset: var(--#{$name}-outline-offset, var(--outline-offset));
101
91
  }
102
92
 
@@ -109,10 +99,21 @@
109
99
  &[aria-current],
110
100
  &[aria-selected=true],
111
101
  &[aria-pressed=true] {
112
- color: var(--#{$name}-active-color, $default-color);
113
- background-color: var(--#{$name}-active-background, $default-active-background);
114
- border-color: var(--#{$name}-active-border-color, $default-border-color);
102
+
103
+ @if(list.index($states, 'hover')) {
104
+ color: var(--#{$name}-active-color, var(--#{$name}-hover-color, $default-color));
105
+ background-color: var(--#{$name}-active-background, var(--#{$name}-hover-background, $default-active-background));
106
+ border-color: var(--#{$name}-active-border-color, var(--#{$name}-hover-border-color, $default-border-color));
107
+ }
108
+
109
+ @else {
110
+ color: var(--#{$name}-active-color, $default-color);
111
+ background-color: var(--#{$name}-active-background, $default-active-background);
112
+ border-color: var(--#{$name}-active-border-color, $default-border-color);
113
+ }
114
+
115
115
  }
116
+
116
117
  }
117
118
 
118
119
  // State: disabled
@@ -125,9 +126,6 @@
125
126
 
126
127
  }
127
128
 
128
- // Define the color variations
129
- @include with-color-variations($name, $states);
130
-
131
129
  }
132
130
 
133
131
  /// Create a basic list group that can be interactive
@@ -228,45 +226,33 @@
228
226
 
229
227
  }
230
228
 
231
- /// Create some outline variations
229
+ /// Create a outline variation
232
230
  ///
233
- /// @require {variable} $outline-variations - Map variable
234
231
  /// @param {string} $name - Name of the component
235
232
  /// @param {array} $states - List of interactions
236
- /// @param {string} $color - The initial color of the item (used for color, border and :hover background)
237
- /// @param {string} $contrast - The initial contrast color of the item (:hover color)
233
+ /// @param {string} $color - The color of the item
234
+ /// @param {string} $contrast - The color contrast of the item
238
235
  /// @access public
239
236
  ///
240
- @mixin with-outline-variations($name, $states: (), $color: var(--#{$name}-background, var(--color-font)), $contrast: var(--#{$name}-color, var(--color-body))) {
241
-
242
- @if(meta.global-variable-exists('outline-variations') and list.index($outline-variations, $name)) {
243
-
244
- &.outline {
237
+ @mixin with-outline-variation($name, $states: (), $color: var(--color-font), $contrast: var(--color-body)) {
245
238
 
246
- color: $color;
247
- background-color: transparent;
248
- border-color: currentColor;
239
+ &.outline {
249
240
 
250
- @if(list.index($states, 'hover')) {
251
-
252
- &:hover {
253
- color: $contrast;
254
- background-color: $color;
255
- border-color: $color;
256
- }
257
-
258
- }
241
+ --#{$name}-color: #{$color};
242
+ --#{$name}-background: transparent;
243
+ --#{$name}-border-color: #{$color};
259
244
 
260
- @if(list.index($states, 'active')) {
245
+ // Define the interactive states
246
+ @if($states !=()) {
261
247
 
262
- &:active,
263
- &[aria-current],
264
- &[aria-pressed=true] {
265
- color: $contrast;
266
- background-color: $color;
267
- border-color: $color;
268
- }
248
+ // Update the default focus color
249
+ --focus-color: #{$color};
269
250
 
251
+ // State :hover and it wil auto set for hover exept if you custom the colors
252
+ @if(list.index($states, 'hover')) {
253
+ --#{$name}-hover-color: #{$contrast};
254
+ --#{$name}-hover-background: #{$color};
255
+ --#{$name}-hover-border-color: #{$color};
270
256
  }
271
257
 
272
258
  }
@@ -277,52 +263,36 @@
277
263
 
278
264
  /// Create some color variations
279
265
  ///
280
- /// @require {variable} color-variations - Map variable
281
266
  /// @param {string} $name - Name of the component
282
- /// @param {boolean} @param {array} $states - List of interactions
267
+ /// @param {array} $states - List of interactions
268
+ /// @param {array} $colors - List of colors
269
+ /// @param {boolean} $withOutline - Thit outline colored version
283
270
  /// @access public
284
271
  ///
285
- @mixin with-color-variations($name, $states: ()) {
286
-
287
- @if(meta.global-variable-exists('color-variations') and map.get($color-variations, #{$name})) {
288
-
289
- @each $colorname in map.get($color-variations, #{$name}) {
272
+ @mixin with-color-variations($name, $states: (), $colors: (), $withOutline: false) {
290
273
 
291
- &.#{$colorname} {
292
274
 
293
- // Define the variables
294
- $color: var(--color-#{$colorname});
295
- $contrast: var(--color-#{$colorname}-contrast, white);
275
+ @each $colorname in $colors {
296
276
 
297
- // Define the custom properties
298
- --#{$name}-color: #{$contrast};
299
- --#{$name}-background: #{$color};
300
- --#{$name}-border-color: #{$color};
277
+ &.#{$colorname} {
301
278
 
302
- @if(list.index($states, 'hover')) {
303
-
304
- // Define the variables
305
- $hover: color-mix(in srgb, $color, var(--hover-color) var(--hover-percent));
306
-
307
- // Define the custom properties
308
- --#{$name}-hover-color: #{$contrast};
309
- --#{$name}-hover-background: #{$hover};
310
- --#{$name}-hover-border-color: #{$hover};
311
-
312
- }
279
+ // Define the variables
280
+ $color: var(--color-#{$colorname});
281
+ $contrast: var(--color-#{$colorname}-contrast, white);
313
282
 
314
- @if(list.index($states, 'active')) {
283
+ // Define the custom properties
284
+ --#{$name}-color: #{$contrast};
285
+ --#{$name}-background: #{$color};
286
+ --#{$name}-border-color: #{$color};
315
287
 
316
- // Define the variables
317
- $active: color-mix(in srgb, $color, var(--active-color) var(--active-percent));
318
-
319
- // Define the custom properties
320
- --#{$name}-active-color: #{$contrast};
321
- --#{$name}-active-background: #{$active};
322
- --#{$name}-active-border-color: #{$active};
323
-
324
- }
288
+ // Define colored outline colored version
289
+ @if($withOutline) {
290
+ @include with-outline-variation($name, $states, $color, $contrast);
291
+ }
325
292
 
293
+ // Update the default focus color
294
+ @if($states !=()) {
295
+ --focus-color: #{$color};
326
296
  }
327
297
 
328
298
  }
@@ -331,6 +301,7 @@
331
301
 
332
302
  }
333
303
 
304
+
334
305
  /// Create a responsive table
335
306
  ///
336
307
  /// @access public
@@ -0,0 +1,61 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Layout
4
+ /// ------------------------------------------------------------------
5
+ /// Create the layout
6
+ ///
7
+ /// @group base
8
+ /// @author Natacha Herth
9
+ ///
10
+ ////
11
+
12
+ // Reset value for html and body
13
+ html,
14
+ body {
15
+ height: 100%;
16
+ margin: 0;
17
+ padding: 0;
18
+ }
19
+
20
+ // Define the layout into the body
21
+ body {
22
+ --layout-content-width: minmax(0, calc((var(--layout-width, 1280) - ((var(--layout-columns, 12) - 1) * var(--layout-gap-inline, 1rem))) / var(--layout-columns, 12)));
23
+
24
+ min-height: 100vh;
25
+ display: grid;
26
+ grid-template-columns: [full-start] minmax(var(--layout-gap-inline, 1rem), 1fr) [content-start] repeat(var(--layout-columns, 12), var(--layout-content-width)) [content-end] minmax(var(--layout-gap-inline, 1rem), 1fr) [full-end];
27
+ grid-template-rows: auto 1fr auto;
28
+ gap: var(--layout-gap-block, 1rem) var(--layout-gap-inline, 1rem);
29
+
30
+ // Add animation exept on first load
31
+ @media screen and (prefers-reduced-motion: no-preference) {
32
+ &:not([data-preload]) {
33
+ transition: all .5s ease-in-out;
34
+ }
35
+ }
36
+
37
+ // Add the subgrid to direct child of the body as <header>, <main> and <footer>
38
+ > header,
39
+ > main,
40
+ > footer {
41
+ grid-column: full;
42
+ display: grid;
43
+ grid-template-columns: subgrid;
44
+ gap: var(--subgrid-gap-block, 0) var(--subgrid-gap-inline, var(--layout-gap-inline, 1rem));
45
+
46
+ .container {
47
+ grid-column: content;
48
+ }
49
+
50
+ .container-full {
51
+ grid-column: full;
52
+ }
53
+
54
+ .subgrid {
55
+ display: grid;
56
+ grid-template-columns: subgrid;
57
+ gap: var(--subgrid-gap-block, 0) var(--subgrid-gap-inline, var(--layout-gap-inline, 1rem));
58
+ }
59
+ }
60
+
61
+ }
@@ -14,7 +14,7 @@
14
14
  font-size: var(--font-size-h#{$i});
15
15
  font-weight: var(--heading-font-weight, var(--font-weight));
16
16
  line-height: var(--heading-line-height, var(--line-height));
17
- color: var(--heading-color, currentColor);
17
+ color: var(--heading-color, var(--color-font, currentColor));
18
18
  text-wrap: balance;
19
19
  }
20
20
  }
@@ -33,7 +33,7 @@ button[role=link] {
33
33
  &:focus,
34
34
  &:focus-visible {
35
35
  color: var(--anchor-focus-color, var(--anchor-hover-color, var(--anchor-color, currentColor)));
36
- outline: var(--anchor-outline-size, var(--outline-size)) var(--anchor-outline-style, var(--outline-style)) var(--anchor-outline-color, var(--outline-color));
36
+ outline: var(--anchor-outline-size, var(--outline-size)) var(--anchor-outline-style, var(--outline-style)) var(--anchor-outline-color, var(--outline-color, color-mix(in srgb, var(--focus-color, currentColor), transparent var(--focus-percent))));
37
37
  outline-offset: var(--anchor-outline-offset, var(--outline-offset));
38
38
  }
39
39
 
@@ -1,3 +1,4 @@
1
1
  @forward "./reset";
2
+ @forward "./layout";
2
3
  @forward "./typography";
3
4
  @forward "./media";
@@ -16,6 +16,10 @@
16
16
  @use "../abstracts/default";
17
17
  @use "../abstracts/mixins" as *;
18
18
 
19
+ $colors: () !default;
20
+
21
+ $outline: false !default;
22
+
19
23
  $customBadge: (
20
24
  background: color-mix(in srgb, transparent, var(--hover-color) var(--hover-percent)),
21
25
  padding-block: .25em,
@@ -35,4 +39,12 @@ $customBadgeProperties: map.merge(default.$item-properties, $customBadge);
35
39
  // Define as an item
36
40
  @include as-item('badge', (), $customBadgeProperties);
37
41
 
42
+ // Define the outline variation
43
+ @if($outline) {
44
+ @include with-outline-variation('badge');
45
+ }
46
+
47
+ // Define the color variations
48
+ @include with-color-variations('badge', (), $colors, $outline);
49
+
38
50
  }
@@ -14,6 +14,10 @@
14
14
 
15
15
  @use "../abstracts/mixins" as *;
16
16
 
17
+ $colors: () !default;
18
+
19
+ $outline: false !default;
20
+
17
21
  button:not([role=link]),
18
22
  [type=button],
19
23
  [type=reset],
@@ -33,4 +37,12 @@ button:not([role=link]),
33
37
  opacity: var(--button-disabled-opacity, var(--disabled-opacity));
34
38
  }
35
39
 
40
+ // Define the outline variation
41
+ @if($outline) {
42
+ @include with-outline-variation('button', ('focus', 'hover', 'active', 'disabled'));
43
+ }
44
+
45
+ // Define the color variations
46
+ @include with-color-variations('button', ('focus', 'hover', 'active', 'disabled'), $colors, $outline);
47
+
36
48
  }
@@ -16,6 +16,10 @@
16
16
  @use "../abstracts/default";
17
17
  @use "../abstracts/mixins" as *;
18
18
 
19
+ $colors: () !default;
20
+
21
+ $outline: false !default;
22
+
19
23
  $customCard: (
20
24
  padding-block: 1rem,
21
25
  padding-inline: 1rem
@@ -29,6 +33,14 @@ $customCardProperties: map.merge(default.$item-properties, $customCard);
29
33
  // Design as item
30
34
  @include as-item('card', (), $customCardProperties);
31
35
 
36
+ // Define the outline variation
37
+ @if($outline) {
38
+ @include with-outline-variation('card');
39
+ }
40
+
41
+ // Define the color variations
42
+ @include with-color-variations('card', (), $colors, $outline);
43
+
32
44
  // Design the layout
33
45
  > header,
34
46
  > footer,
@@ -49,9 +49,6 @@ details {
49
49
 
50
50
  }
51
51
 
52
- // Include the color variation on the parent
53
- @include with-color-variations('disclosure');
54
-
55
52
  }
56
53
 
57
54
  .accordion {
@@ -1,7 +1,7 @@
1
- @forward "./badge";
1
+ @forward "./badge" as badge-*;
2
2
  @forward "./breadcrumb";
3
- @forward "./button";
4
- @forward "./card";
3
+ @forward "./button" as button-*;
4
+ @forward "./card" as card-*;
5
5
  @forward "./dialog";
6
6
  @forward "./disclosure";
7
7
  @forward "./drawer";
@@ -16,6 +16,9 @@
16
16
  --line-height: 1.5;
17
17
  --font-family: Arial;
18
18
  --font-weight: normal;
19
+ --font-weight-light: 300;
20
+ --font-weight-medium: 500;
21
+ --font-weight-bold: 600;
19
22
 
20
23
  --font-size-h1: 2.25em; // 36px
21
24
  --font-size-h2: 2.00em; // 32px
@@ -23,8 +26,9 @@
23
26
  --font-size-h4: 1.50em; // 24px
24
27
  --font-size-h5: 1.25em; // 20px
25
28
  --font-size-h6: 1.125em; // 18px
26
- --font-size-large: 1.125em; // 18px
27
- --font-size-small: .875em; // 14px
29
+ --font-size-large: 1.25em;
30
+ --font-size-medium: 1.125em;
31
+ --font-size-small: .875em;
28
32
 
29
33
  // Anchor
30
34
  --decoration: none;
@@ -42,8 +46,10 @@
42
46
  --outline-size: 3px;
43
47
  --outline-style: solid;
44
48
  --outline-offset: 0;
45
- --outline-opacity: 50%;
46
- --outline-color: color-mix(in srgb, currentColor, transparent var(--outline-opacity));
49
+ // --outline-color: var(--color-primary);
50
+
51
+ // Backdrop
52
+ --backdrop-color: rgba(0, 0, 0, .5);
47
53
 
48
54
  // Hover (color-mix)
49
55
  --hover-color: black;
@@ -53,6 +59,10 @@
53
59
  --active-color: black;
54
60
  --active-percent: 10%;
55
61
 
62
+ // Focus (color-mix)
63
+ --focus-color: currentColor;
64
+ --focus-percent: 50%;
65
+
56
66
  // Disabled
57
67
  --disabled-opacity: 50%;
58
68
 
@@ -67,6 +77,10 @@
67
77
  // Contrasts
68
78
  --color-warning-contrast: black;
69
79
 
80
+ // Form
81
+ --form-border-color: currentColor;
82
+ --form-active-background: color-mix(in srgb, var(--form-background, transparent), var(--active-color, currentColor) 40%);
83
+
70
84
  // Icons
71
85
  --icon-external: url('data: image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" ><path fill-rule="evenodd" d="M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5" /><path fill-rule="evenodd" d="M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z" /></svg>');
72
86
  --icon-date: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="black" viewBox="0 0 16 16"><path d="M3.5 0a.5.5 0 0 1 .5.5V1h8V.5a.5.5 0 0 1 1 0V1h1a2 2 0 0 1 2 2v11a2 2 0 0 1-2 2H2a2 2 0 0 1-2-2V3a2 2 0 0 1 2-2h1V.5a.5.5 0 0 1 .5-.5zM1 4v10a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1V4H1z"/></svg>');
@@ -76,4 +90,29 @@
76
90
  --icon-radio: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><circle cx="8" cy="8" r="8"/></svg>');
77
91
  --icon-check: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="white" viewBox="0 0 16 16"><path d="M10.97 4.97a.75.75 0 0 1 1.07 1.05l-3.99 4.99a.75.75 0 0 1-1.08.02L4.324 8.384a.75.75 0 1 1 1.06-1.06l2.094 2.093 3.473-4.425a.267.267 0 0 1 .02-.022z"/></svg>');
78
92
  --icon-switch: var(--icon-radio);
93
+
94
+ // Layout
95
+ --layout-width: 1280px;
96
+ --layout-gap-block: 1rem;
97
+ --layout-gap-inline: 1rem;
98
+ --layout-columns: 1;
99
+
100
+ @media (min-width: 720px) {
101
+ --layout-columns: 6;
102
+ --layout-gap-block: 1rem;
103
+ --layout-gap-inline: 1rem;
104
+ }
105
+
106
+ @media (min-width: 1024px) {
107
+ --layout-columns: 12;
108
+ --layout-gap-block: 2rem;
109
+ --layout-gap-inline: 2rem;
110
+ }
111
+
112
+ @media (min-width: 1440px) {
113
+ --layout-columns: 12;
114
+ --layout-gap-block: 4rem;
115
+ --layout-gap-inline: 2rem;
116
+ }
117
+
79
118
  }
@@ -0,0 +1,34 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Main
4
+ /// ------------------------------------------------------------------
5
+ /// This is the main scss generated
6
+ ///
7
+ /// @author Natacha Herth
8
+ ///
9
+
10
+
11
+ // Themes
12
+ @use "./themes/root";
13
+
14
+ // Base
15
+ @use "./base/reset";
16
+ @use "./base/typography";
17
+ @use "./base/media";
18
+
19
+ // Components
20
+ @use "./components/badge" with ($colors: ('primary'), $outline: true);
21
+ @use "./components/breadcrumb";
22
+ @use "./components/button" with ($colors: ('primary'), $outline: true);
23
+ @use "./components/card" with ($colors: ('primary'), $outline: true);
24
+ @use "./components/dialog";
25
+ @use "./components/disclosure";
26
+ @use "./components/drawer";
27
+ @use "./components/dropdown";
28
+ @use "./components/form";
29
+ @use "./components/grid";
30
+ @use "./components/list";
31
+ @use "./components/loading";
32
+ @use "./components/progress";
33
+ @use "./components/table";
34
+ @use "./components/slider";
package/vitest.config.js CHANGED
@@ -2,6 +2,7 @@ import { defineConfig } from 'vite'
2
2
 
3
3
  export default defineConfig({
4
4
  test: {
5
- environment: 'happy-dom'
5
+ environment: 'happy-dom',
6
+ globals: true,
6
7
  }
7
8
  })
@@ -1,15 +0,0 @@
1
- <!doctype html>
2
- <html lang="en">
3
-
4
- <head>
5
- <meta charset="UTF-8" />
6
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
- <title>Documentations: Javascript ></title>
8
- </head>
9
-
10
- <body data-preload>
11
- <doc-layout></doc-layout>
12
- <script type="module" src="/main.js"></script>
13
- </body>
14
-
15
- </html>
Binary file
@@ -1,44 +0,0 @@
1
- ////
2
- /// ------------------------------------------------------------------
3
- /// Setting
4
- /// ------------------------------------------------------------------
5
- /// Setting variables
6
- ///
7
- /// @group abstracts
8
- /// @author Natacha Herth
9
- ///
10
- ////
11
-
12
- /// Define the default list of colors available
13
- ///
14
- /// @access public
15
- ///
16
- $colors: (
17
- primary,
18
- success,
19
- error,
20
- warning) !default;
21
-
22
- /// Define the components that have some color variations
23
- ///
24
- /// @example button: (error) // <button class="error"></button>
25
- /// @access public
26
- ///
27
- $color-variations: (
28
- badge: $colors,
29
- button: $colors,
30
- card: $colors,
31
- disclosure: $colors,
32
- list: $colors) !default;
33
-
34
- /// Define the components that have an outline variation
35
- ///
36
- /// @example button // <button class="outline"></button>
37
- /// @access public
38
- ///
39
- $outline-variations: (
40
- badge,
41
- button,
42
- card,
43
- disclosure,
44
- list) !default;
File without changes
File without changes