@natachah/vanilla-frontend 0.0.5 → 0.1.1

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 (72) hide show
  1. package/.gitlab-ci.yml +9 -0
  2. package/docs/pages/{components → base}/media.html +2 -2
  3. package/docs/pages/{layout → base}/reset.html +2 -2
  4. package/docs/pages/{layout → base}/typography.html +2 -16
  5. package/docs/pages/components/badge.html +2 -2
  6. package/docs/pages/components/breadcrumb.html +1 -1
  7. package/docs/pages/components/button.html +2 -2
  8. package/docs/pages/components/card.html +1 -1
  9. package/docs/pages/components/dialog.html +1 -1
  10. package/docs/pages/components/disclosure.html +1 -1
  11. package/docs/pages/components/dropdown.html +5 -11
  12. package/docs/pages/components/form.html +2 -2
  13. package/docs/pages/components/list.html +57 -24
  14. package/docs/pages/components/loading.html +1 -1
  15. package/docs/pages/components/progress.html +1 -1
  16. package/docs/pages/components/slider.html +1 -1
  17. package/docs/pages/components/table.html +1 -1
  18. package/docs/pages/{layout → layouts}/grid.html +1 -1
  19. package/docs/pages/quick-start/conventions.html +7 -7
  20. package/docs/pages/quick-start/customization.html +59 -62
  21. package/docs/pages/quick-start/installation.html +31 -28
  22. package/docs/pages/quick-start/mixins.html +29 -11
  23. package/docs/src/js/demo.js +1 -1
  24. package/docs/src/js/doc-layout.js +9 -6
  25. package/docs/src/scss/demo.scss +2 -2
  26. package/docs/src/scss/layout.scss +1 -1
  27. package/docs/src/scss/style.scss +2 -2
  28. package/esbuild.mjs +1 -1
  29. package/js/_autofill.js +0 -1
  30. package/js/_check-all.js +0 -1
  31. package/js/_comfort.js +0 -1
  32. package/js/_consent.js +0 -1
  33. package/js/_dialog.js +0 -1
  34. package/js/_dropdown.js +0 -1
  35. package/js/_scroll.js +0 -1
  36. package/js/_sidebar.js +0 -1
  37. package/js/_slider.js +0 -1
  38. package/js/_sortable.js +0 -1
  39. package/js/_tabpanel.js +0 -1
  40. package/js/_toggle.js +0 -1
  41. package/js/_tree.js +0 -1
  42. package/js/utilities/_base-component.js +0 -1
  43. package/js/utilities/_cookie.js +0 -1
  44. package/js/utilities/_error.js +0 -1
  45. package/js/utilities/_form-helper.js +0 -1
  46. package/natachah-vanilla-frontend-0.1.1.tgz +0 -0
  47. package/package.json +2 -1
  48. package/scss/abstracts/_default.scss +21 -0
  49. package/scss/{utilities/_mixin.scss → abstracts/_mixins.scss} +61 -39
  50. package/scss/{variables/_setting.scss → abstracts/_options.scss} +5 -24
  51. package/scss/{_media.scss → base/_media.scss} +1 -2
  52. package/scss/{utilities → base}/_reset.scss +2 -3
  53. package/scss/{utilities → base}/_typography.scss +1 -2
  54. package/scss/base/index.scss +3 -0
  55. package/scss/{_badge.scss → components/_badge.scss} +5 -4
  56. package/scss/{_breadcrumb.scss → components/_breadcrumb.scss} +0 -1
  57. package/scss/{_button.scss → components/_button.scss} +2 -1
  58. package/scss/{_card.scss → components/_card.scss} +9 -8
  59. package/scss/{_dialog.scss → components/_dialog.scss} +7 -23
  60. package/scss/{_disclosure.scss → components/_disclosure.scss} +2 -1
  61. package/scss/{_dropdown.scss → components/_dropdown.scss} +7 -6
  62. package/scss/{_form.scss → components/_form.scss} +2 -1
  63. package/scss/{_group.scss → components/_group.scss} +3 -1
  64. package/scss/{_list.scss → components/_list.scss} +4 -3
  65. package/scss/{_loading.scss → components/_loading.scss} +0 -1
  66. package/scss/{_progress.scss → components/_progress.scss} +0 -1
  67. package/scss/{_slider.scss → components/_slider.scss} +0 -1
  68. package/scss/{_table.scss → components/_table.scss} +0 -1
  69. package/scss/components/index.scss +14 -0
  70. package/scss/{_grid.scss → layouts/_grid.scss} +1 -2
  71. package/scss/{variables → themes}/_root.scss +0 -1
  72. package/scss/vanilla-frontend.scss +19 -21
@@ -0,0 +1,21 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Default values for items
4
+ /// ------------------------------------------------------------------
5
+ /// Setting variables
6
+ ///
7
+ /// @group abstracts
8
+ /// @author Natacha Herth
9
+ ///
10
+ ////
11
+
12
+ $item-properties: (
13
+ color: var(--color-font),
14
+ background: transparent,
15
+ border-size: var(--border-size),
16
+ border-style: var(--border-style),
17
+ border-color: transparent,
18
+ border-radius: var(--border-radius),
19
+ padding-inline: var(--padding-inline),
20
+ padding-block: var(--padding-block)
21
+ );
@@ -4,13 +4,16 @@
4
4
  /// ------------------------------------------------------------------
5
5
  /// Regroup all mixins of the package
6
6
  ///
7
- /// @group mixins
7
+ /// @group abstracts
8
8
  /// @author Natacha Herth
9
- /// @since 1.0.0
10
9
  ///
11
10
  ////
12
11
 
13
12
  @use "sass:map";
13
+ @use "sass:meta";
14
+ @use "sass:list";
15
+ @use "./default";
16
+ @use "./options" as *;
14
17
 
15
18
  /// Create a basic item that can be interactive or not
16
19
  ///
@@ -19,7 +22,7 @@
19
22
  /// @param {array} $properties - List of default properties (check in /variables/_setting.scss)
20
23
  /// @access public
21
24
  ///
22
- @mixin as-item($name, $states: (), $properties: $default-item-properties) {
25
+ @mixin as-item($name, $states: (), $properties: default.$item-properties) {
23
26
 
24
27
  // Define the default variables
25
28
  // INFO: The choice of SASS variables other CSS private properties if for better readability of the final code
@@ -57,7 +60,7 @@
57
60
  @if($states !=()) {
58
61
 
59
62
  // State: focus
60
- @if(index($states, 'focus')) {
63
+ @if(list.index($states, 'focus')) {
61
64
  &:focus {
62
65
  outline: var(--#{$name}-focus-size, var(--focus-size)) var(--#{$name}-focus-style, var(--focus-style)) var(--#{$name}-focus-color, color-mix(in srgb, var(--#{$name}-border-color, var(--#{$name}-background, $default-color)), transparent var(--focus-opacity)));
63
66
  outline-offset: var(--#{$name}-focus-offset, var(--focus-offset));
@@ -65,7 +68,7 @@
65
68
  }
66
69
 
67
70
  // State: hover
68
- @if(index($states, 'hover')) {
71
+ @if(list.index($states, 'hover')) {
69
72
  &:hover {
70
73
  color: var(--#{$name}-hover-color, $default-color);
71
74
  background-color: var(--#{$name}-hover-background, color-mix(in srgb, $default-background, var(--hover-color) var(--hover-percent)));
@@ -74,7 +77,7 @@
74
77
  }
75
78
 
76
79
  // State: active
77
- @if(index($states, 'active')) {
80
+ @if(list.index($states, 'active')) {
78
81
 
79
82
  &:active,
80
83
  &[aria-current],
@@ -87,7 +90,7 @@
87
90
  }
88
91
 
89
92
  // State: disabled
90
- @if(index($states, 'disabled')) {
93
+ @if(list.index($states, 'disabled')) {
91
94
  &:disabled {
92
95
  pointer-events: none;
93
96
  opacity: var(--#{$name}-disabled-opacity, var(--disabled-opacity));
@@ -109,7 +112,7 @@
109
112
  /// @param {array} $properties - List of default properties (check in /variables/_setting.scss)
110
113
  /// @access public
111
114
  ///
112
- @mixin as-list($name, $states: (), $properties: $default-item-properties) {
115
+ @mixin as-list($name, $states: (), $properties: default.$item-properties) {
113
116
 
114
117
  // Reset
115
118
  margin: 0;
@@ -120,56 +123,43 @@
120
123
  }
121
124
 
122
125
  > * {
123
-
124
126
  position: relative;
125
127
  margin: 0;
128
+ text-align: var(--list-text-align, left);
126
129
 
127
- // Simple item
128
- &:not(:has(> a:first-child:last-child, > button:first-child:last-child)) {
129
- @include as-item($name, (), $properties);
130
- }
131
-
132
- // Item with links
133
- &:has(> a:first-child:last-child) > a {
130
+ &:has(a[role=button]:only-child, button:only-child) > * {
134
131
  display: block;
132
+ width: 100%;
133
+ text-align: var(--list-text-align, left);
135
134
  @include as-item($name, $states, $properties);
136
135
  }
137
136
 
138
- // Item with button
139
- &:has(> button:first-child:last-child) > button {
140
- width: 100%;
141
- text-align: left;
137
+ &:not(:has(a[role=button]:only-child, button:only-child)) {
138
+ @include as-item($name, (), $properties);
142
139
  }
143
140
 
144
- // Remove extra border
145
141
  & + *,
146
- & + * > a,
147
- & + * > button {
142
+ & + * > :only-child {
148
143
  border-top: none !important;
149
144
  }
150
145
 
151
146
  // Remove radius on middle child
152
147
  &:not(:first-child, :last-child),
153
- &:not(:first-child, :last-child) > a,
154
- &:not(:first-child, :last-child) > button {
148
+ &:not(:first-child, :last-child) > :only-child {
155
149
  border-radius: 0 !important;
156
150
  }
157
151
 
158
- // Remove the radius
152
+ // Remove radius on first/last child
159
153
  &:not(:only-child) {
160
154
 
161
- // Remove radius bottom on first child
162
155
  &:first-child,
163
- &:first-child > a,
164
- &:first-child > button {
156
+ &:first-child > :only-child {
165
157
  border-end-start-radius: 0 !important;
166
158
  border-end-end-radius: 0 !important;
167
159
  }
168
160
 
169
- // Remove radius top on last child
170
161
  &:last-child,
171
- &:last-child > a,
172
- &:last-child > button {
162
+ &:last-child > :only-child {
173
163
  border-start-start-radius: 0 !important;
174
164
  border-start-end-radius: 0 !important;
175
165
  }
@@ -177,6 +167,37 @@
177
167
  }
178
168
 
179
169
  }
170
+
171
+ }
172
+
173
+ /// Create a basic item with an header and a footer style
174
+ ///
175
+ /// @param {string} $name - Name of the component
176
+ /// @param {array} $properties - List of default properties (check in /variables/_setting.scss)
177
+ /// @access public
178
+ ///
179
+ @mixin with-header-and-footer($name, $properties: default.$item-properties) {
180
+
181
+ > header,
182
+ > footer {
183
+ margin-inline: calc(var(--#{$name}-padding-inline, map.get($properties, padding-inline)) * -1);
184
+ padding: calc(var(--#{$name}-padding-block, map.get($properties, padding-block)) / 2) var(--#{$name}-padding-inline, map.get($properties, padding-inline));
185
+ }
186
+
187
+ > header {
188
+ margin-top: calc(var(--#{$name}-padding-block, map.get($properties, padding-block)) * -1);
189
+ border-start-start-radius: inherit;
190
+ border-start-end-radius: inherit;
191
+ border-bottom: var(--#{$name}-divider-size, var(--#{$name}-border-size, var(--border-size))) var(--#{$name}-divider-style, var(--#{$name}-border-style, var(--border-style))) var(--#{$name}-divider-color, var(--#{$name}-border-color, transparent));
192
+ }
193
+
194
+ > footer {
195
+ margin-bottom: calc(var(--#{$name}-padding-block, map.get($properties, padding-block)) * -1);
196
+ border-end-start-radius: inherit;
197
+ border-end-end-radius: inherit;
198
+ border-top: var(--#{$name}-divider-size, var(--#{$name}-border-size, var(--border-size))) var(--#{$name}-divider-style, var(--#{$name}-border-style, var(--border-style))) var(--#{$name}-divider-color, var(--#{$name}-border-color, transparent));
199
+ }
200
+
180
201
  }
181
202
 
182
203
  /// Create some outline variations
@@ -190,7 +211,7 @@
190
211
  ///
191
212
  @mixin with-outline-variations($name, $states: (), $color: var(--#{$name}-background, var(--color-font)), $contrast: var(--#{$name}-color, var(--color-body))) {
192
213
 
193
- @if(variable-exists(outline-variations) and index($outline-variations, $name)) {
214
+ @if(meta.global-variable-exists('outline-variations') and list.index($outline-variations, $name)) {
194
215
 
195
216
  &.outline {
196
217
 
@@ -198,7 +219,7 @@
198
219
  background-color: transparent;
199
220
  border-color: currentColor;
200
221
 
201
- @if(index($states, 'hover')) {
222
+ @if(list.index($states, 'hover')) {
202
223
 
203
224
  &:hover {
204
225
  color: $contrast;
@@ -208,7 +229,7 @@
208
229
 
209
230
  }
210
231
 
211
- @if(index($states, 'active')) {
232
+ @if(list.index($states, 'active')) {
212
233
 
213
234
  &:active,
214
235
  &[aria-current],
@@ -235,9 +256,9 @@
235
256
  ///
236
257
  @mixin with-color-variations($name, $states: ()) {
237
258
 
238
- @if(variable-exists(color-variations) and map-get($color-variations, #{$name})) {
259
+ @if(meta.global-variable-exists('color-variations') and map.get($color-variations, #{$name})) {
239
260
 
240
- @each $colorname in map-get($color-variations, #{$name}) {
261
+ @each $colorname in map.get($color-variations, #{$name}) {
241
262
 
242
263
  &.#{$colorname} {
243
264
 
@@ -250,7 +271,7 @@
250
271
  --#{$name}-background: #{$color};
251
272
  --#{$name}-border-color: #{$color};
252
273
 
253
- @if(index($states, 'hover')) {
274
+ @if(list.index($states, 'hover')) {
254
275
 
255
276
  // Define the variables
256
277
  $hover: color-mix(in srgb, $color, var(--hover-color) var(--hover-percent));
@@ -262,7 +283,7 @@
262
283
 
263
284
  }
264
285
 
265
- @if(index($states, 'active')) {
286
+ @if(list.index($states, 'active')) {
266
287
 
267
288
  // Define the variables
268
289
  $active: color-mix(in srgb, $color, var(--active-color) var(--active-percent));
@@ -277,6 +298,7 @@
277
298
  }
278
299
 
279
300
  }
301
+
280
302
  }
281
303
 
282
304
  }
@@ -2,11 +2,10 @@
2
2
  /// ------------------------------------------------------------------
3
3
  /// Setting
4
4
  /// ------------------------------------------------------------------
5
- /// Setting variables for default theme
5
+ /// Setting variables
6
6
  ///
7
- /// @group setting
7
+ /// @group abstracts
8
8
  /// @author Natacha Herth
9
- /// @since 0.0.1
10
9
  ///
11
10
  ////
12
11
 
@@ -18,8 +17,7 @@ $colors: (
18
17
  primary,
19
18
  success,
20
19
  error,
21
- warning
22
- );
20
+ warning) !default;
23
21
 
24
22
  /// Define the components that have some color variations
25
23
  ///
@@ -31,8 +29,7 @@ $color-variations: (
31
29
  button: $colors,
32
30
  card: $colors,
33
31
  disclosure: $colors,
34
- list: $colors
35
- );
32
+ list: $colors) !default;
36
33
 
37
34
  /// Define the components that have an outline variation
38
35
  ///
@@ -44,20 +41,4 @@ $outline-variations: (
44
41
  button,
45
42
  card,
46
43
  disclosure,
47
- list
48
- );
49
-
50
- /// Define the default properties for item
51
- ///
52
- /// @access public
53
- ///
54
- $default-item-properties: (
55
- color: var(--color-font),
56
- background: transparent,
57
- border-size: var(--border-size),
58
- border-style: var(--border-style),
59
- border-color: transparent,
60
- border-radius: var(--border-radius),
61
- padding-inline: var(--padding-inline),
62
- padding-block: var(--padding-block)
63
- );
44
+ list) !default;
@@ -6,9 +6,8 @@
6
6
  ///
7
7
  /// @example <img>, <picture>, <figure>, <video> and <audio>
8
8
  ///
9
- /// @group components
9
+ /// @group base
10
10
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
11
  ///
13
12
  ////
14
13
 
@@ -4,9 +4,8 @@
4
4
  /// ------------------------------------------------------------------
5
5
  /// This file is the CSS default reset
6
6
  ///
7
- /// @group reset
7
+ /// @group base
8
8
  /// @author Natacha Herth
9
- /// @since 1.0.0
10
9
  ///
11
10
  ////
12
11
 
@@ -67,7 +66,7 @@ summary {
67
66
 
68
67
  // Force the hidden
69
68
  [hidden] {
70
- display: none;
69
+ display: none !important;
71
70
  }
72
71
 
73
72
  // Change cursor for draggable
@@ -4,9 +4,8 @@
4
4
  /// ------------------------------------------------------------------
5
5
  /// This file define the basic typographic elements.
6
6
  ///
7
- /// @group typography
7
+ /// @group base
8
8
  /// @author Natacha Herth
9
- /// @since 1.0.0
10
9
  ///
11
10
  ////
12
11
 
@@ -0,0 +1,3 @@
1
+ @forward "./reset";
2
+ @forward "./typography";
3
+ @forward "./media";
@@ -9,20 +9,21 @@
9
9
  /// @require {mixin} as-item
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
16
15
  @use "sass:map";
16
+ @use "../abstracts/default";
17
+ @use "../abstracts/mixins" as *;
17
18
 
18
- $custom: (
19
+ $customBadge: (
19
20
  background: color-mix(in srgb, transparent, var(--hover-color) var(--hover-percent)),
20
21
  padding-block: .25em,
21
22
  padding-inline: .375em
22
23
  );
23
24
 
24
25
  // Change default properties
25
- $properties: map.merge($default-item-properties, $custom);
26
+ $customBadgeProperties: map.merge(default.$item-properties, $customBadge);
26
27
 
27
28
  .badge {
28
29
 
@@ -32,6 +33,6 @@ $properties: map.merge($default-item-properties, $custom);
32
33
  line-height: 1;
33
34
 
34
35
  // Define as an item
35
- @include as-item('badge', (), $properties);
36
+ @include as-item('badge', (), $customBadgeProperties);
36
37
 
37
38
  }
@@ -8,7 +8,6 @@
8
8
  ///
9
9
  /// @group components
10
10
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
11
  ///
13
12
  ////
14
13
 
@@ -9,10 +9,11 @@
9
9
  /// @require {mixin} as-item
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
15
+ @use "../abstracts/mixins" as *;
16
+
16
17
  button,
17
18
  [type=button],
18
19
  [type=reset],
@@ -9,24 +9,25 @@
9
9
  /// @require {mixin} as-item
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
16
15
  @use "sass:map";
16
+ @use "../abstracts/default";
17
+ @use "../abstracts/mixins" as *;
17
18
 
18
- $custom: (
19
+ $customCard: (
19
20
  padding-block: 1rem,
20
21
  padding-inline: 1rem
21
22
  );
22
23
 
23
24
  // Change default properties
24
- $properties: map.merge($default-item-properties, $custom);
25
+ $customCardProperties: map.merge(default.$item-properties, $customCard);
25
26
 
26
27
  .card {
27
28
 
28
29
  // Design as item
29
- @include as-item('card', (), $properties);
30
+ @include as-item('card', (), $customCardProperties);
30
31
 
31
32
  // Design the layout
32
33
  > header,
@@ -35,17 +36,17 @@ $properties: map.merge($default-item-properties, $custom);
35
36
  > .list,
36
37
  > .accordion,
37
38
  > .group {
38
- margin-inline: calc(var(--card-padding-inline, map.get($custom, padding-inline)) * -1);
39
+ margin-inline: calc(var(--card-padding-inline, map.get($customCard, padding-inline)) * -1);
39
40
  }
40
41
 
41
42
  > header,
42
43
  > footer {
43
- padding: calc(var(--card-padding-block, map.get($custom, padding-block)) / 2) var(--card-padding-inline, map.get($custom, padding-inline));
44
+ padding: calc(var(--card-padding-block, map.get($customCard, padding-block)) / 2) var(--card-padding-inline, map.get($customCard, padding-inline));
44
45
  }
45
46
 
46
47
  > header,
47
48
  > :first-child:is(picture, .list, .group) {
48
- margin-top: calc(var(--card-padding-block, map.get($custom, padding-block)) * -1);
49
+ margin-top: calc(var(--card-padding-block, map.get($customCard, padding-block)) * -1);
49
50
  border-start-start-radius: inherit;
50
51
  border-start-end-radius: inherit;
51
52
  border-bottom: var(--card-divider-size, var(--card-border-size, var(--border-size))) var(--card-divider-style, var(--card-border-style, var(--border-style))) var(--card-divider-color, var(--card-border-color, transparent));
@@ -53,7 +54,7 @@ $properties: map.merge($default-item-properties, $custom);
53
54
 
54
55
  > footer,
55
56
  > :last-child:is(picture, .list, .group) {
56
- margin-bottom: calc(var(--card-padding-block, map.get($custom, padding-block)) * -1);
57
+ margin-bottom: calc(var(--card-padding-block, map.get($customCard, padding-block)) * -1);
57
58
  border-end-start-radius: inherit;
58
59
  border-end-end-radius: inherit;
59
60
  border-top: var(--card-divider-size, var(--card-border-size, var(--border-size))) var(--card-divider-style, var(--card-border-style, var(--border-style))) var(--card-divider-color, var(--card-border-color, transparent));
@@ -6,22 +6,24 @@
6
6
  ///
7
7
  /// @example <dialog>My dialog</dialog>
8
8
  ///
9
+ /// @require {mixin} as-item
9
10
  /// @group components
10
11
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
12
  ///
13
13
  ////
14
14
 
15
15
  @use "sass:map";
16
+ @use "../abstracts/default";
17
+ @use "../abstracts/mixins" as *;
16
18
 
17
- $custom: (
19
+ $customDialog: (
18
20
  background: var(--color-body),
19
21
  padding-block: 2rem,
20
22
  padding-inline: 2rem
21
23
  );
22
24
 
23
25
  // Change default properties
24
- $properties: map.merge($default-item-properties, $custom);
26
+ $customDialogProperties: map.merge(default.$item-properties, $customDialog);
25
27
 
26
28
  dialog {
27
29
 
@@ -38,7 +40,7 @@ dialog {
38
40
  overflow: auto;
39
41
 
40
42
  // Design as item
41
- @include as-item('dialog', (), $properties);
43
+ @include as-item('dialog', (), $customDialogProperties);
42
44
 
43
45
  // Animate the dialog
44
46
  @media screen and (prefers-reduced-motion: no-preference) {
@@ -64,25 +66,7 @@ dialog {
64
66
  }
65
67
 
66
68
  // Design the layout
67
- > header,
68
- > footer {
69
- margin-inline: calc(var(--dialog-padding-inline, map.get($custom, padding-inline)) * -1);
70
- padding: calc(var(--dialog-padding-block, map.get($custom, padding-block)) / 2) var(--dialog-padding-inline, map.get($custom, padding-inline));
71
- }
72
-
73
- > header {
74
- margin-top: calc(var(--dialog-padding-block, map.get($custom, padding-block)) * -1);
75
- border-start-start-radius: inherit;
76
- border-start-end-radius: inherit;
77
- border-bottom: var(--dialog-divider-size, var(--dialog-border-size, var(--border-size))) var(--dialog-divider-style, var(--dialog-border-style, var(--border-style))) var(--dialog-divider-color, var(--dialog-border-color, transparent));
78
- }
79
-
80
- > footer {
81
- margin-bottom: calc(var(--dialog-padding-block, map.get($custom, padding-block)) * -1);
82
- border-end-start-radius: inherit;
83
- border-end-end-radius: inherit;
84
- border-top: var(--dialog-divider-size, var(--dialog-border-size, var(--border-size))) var(--dialog-divider-style, var(--dialog-border-style, var(--border-style))) var(--dialog-divider-color, var(--dialog-border-color, transparent));
85
- }
69
+ @include with-header-and-footer('dialog', $customDialogProperties);
86
70
 
87
71
  }
88
72
 
@@ -9,10 +9,11 @@
9
9
  /// @require {mixin} as-item
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
15
+ @use "../abstracts/mixins" as *;
16
+
16
17
  details {
17
18
 
18
19
  > summary {
@@ -6,22 +6,23 @@
6
6
  ///
7
7
  /// @example <div class="dropdown"><button aria-controls="myDropdown" aria-expanded="false" aria-pressed="false">Button</button><ul id="myDropdown" hidden>...</ul></div>
8
8
  ///
9
+ /// @require {mixin} as-item
9
10
  /// @require {mixin} as-list
10
11
  /// @group components
11
12
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
13
  ///
14
14
  ////
15
15
 
16
16
  @use "sass:map";
17
+ @use "../abstracts/default";
18
+ @use "../abstracts/mixins" as *;
17
19
 
18
- $custom: (
20
+ $customDropdown: (
19
21
  background: var(--color-body)
20
22
  );
21
23
 
22
24
  // Change default properties
23
- $properties: map.merge($default-item-properties, $custom);
24
-
25
+ $customDropdownProperties: map.merge(default.$item-properties, $customDropdown);
25
26
 
26
27
  .dropdown {
27
28
 
@@ -55,12 +56,12 @@ $properties: map.merge($default-item-properties, $custom);
55
56
 
56
57
  // Simple bloc
57
58
  &:not(ul, li) {
58
- @include as-item('dropdown', (), $properties);
59
+ @include as-item('dropdown', (), $customDropdownProperties);
59
60
  }
60
61
 
61
62
  // As list
62
63
  &:is(ul, ol) {
63
- @include as-list('dropdown', ('focus', 'hover', 'active', 'disabled'), $properties);
64
+ @include as-list('dropdown', ('focus', 'hover', 'active', 'disabled'), $customDropdownProperties);
64
65
  }
65
66
 
66
67
  }
@@ -9,10 +9,11 @@
9
9
  /// @require {mixin} as-item
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
15
+ @use "../abstracts/mixins" as *;
16
+
16
17
  label,
17
18
  fieldset legend {
18
19
  display: block;
@@ -6,12 +6,14 @@
6
6
  ///
7
7
  /// @example <div class="group">...</div>
8
8
  ///
9
+ /// @require { mixin} as-item
9
10
  /// @group components
10
11
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
12
  ///
13
13
  ////
14
14
 
15
+ @use "../abstracts/mixins" as *;
16
+
15
17
  .group {
16
18
 
17
19
  display: flex;
@@ -6,13 +6,14 @@
6
6
  ///
7
7
  /// @example <ul class="list">...</ul>, <ol class="list">...</ol> or <div class="list">...</div>
8
8
  ///
9
- /// @require {mixin} as-item
9
+ /// @require {mixin} as-list
10
10
  /// @group components
11
11
  /// @author Natacha Herth
12
- /// @since 1.0.0
13
12
  ///
14
13
  ////
15
14
 
15
+ @use "../abstracts/mixins" as *;
16
+
16
17
  .list {
17
- @include as-list('list', ('focus', 'hover', 'active', 'disabled'), $properties)
18
+ @include as-list('list', ('focus', 'hover', 'active', 'disabled'))
18
19
  }
@@ -8,7 +8,6 @@
8
8
  ///
9
9
  /// @group components
10
10
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
11
  ///
13
12
  ////
14
13
 
@@ -8,7 +8,6 @@
8
8
  ///
9
9
  /// @group components
10
10
  /// @author Natacha Herth
11
- /// @since 1.0.0
12
11
  ///
13
12
  ////
14
13