@natachah/vanilla-frontend 0.2.8 → 0.3.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/docs/main-demo.js +2 -0
- package/docs/main.js +1 -1
- package/docs/pages/base/layout.html +131 -0
- package/docs/pages/base/media.html +2 -0
- package/docs/pages/components/button.html +9 -10
- package/docs/pages/components/disclosure.html +0 -139
- package/docs/pages/components/loading.html +4 -4
- package/docs/pages/{components → customs}/badge.html +4 -8
- package/docs/pages/{components → customs}/breadcrumb.html +1 -1
- package/docs/pages/{components → customs}/card.html +4 -8
- package/docs/pages/{components → customs}/list.html +0 -65
- package/docs/pages/{components → customs}/slider.html +14 -29
- package/docs/pages/demo/layout.html +85 -0
- package/docs/pages/javascript/toggle.html +4 -2
- package/docs/pages/quick-start/customization.html +115 -86
- package/docs/pages/quick-start/mixins.html +22 -54
- package/docs/src/js/doc-layout.js +13 -9
- package/js/_drawer.js +12 -0
- package/js/_toggle.js +12 -3
- package/js/tests/toggle.test.js +15 -9
- package/natachah-vanilla-frontend-0.3.0.tgz +0 -0
- package/package.json +1 -1
- package/scss/abstracts/_mixins.scss +58 -87
- package/scss/base/_layout.scss +61 -0
- package/scss/base/_media.scss +2 -0
- package/scss/base/_typography.scss +2 -2
- package/scss/base/index.scss +1 -0
- package/scss/components/_badge.scss +12 -0
- package/scss/components/_button.scss +12 -0
- package/scss/components/_card.scss +12 -0
- package/scss/components/_disclosure.scss +0 -3
- package/scss/components/index.scss +3 -3
- package/scss/themes/_root.scss +43 -3
- package/scss/vanilla-frontend-doc.scss +34 -0
- package/docs/pages/test.html +0 -15
- package/natachah-vanilla-frontend-0.2.8.tgz +0 -0
- package/scss/abstracts/_options.scss +0 -44
- /package/docs/pages/{components → customs}/drawer.html +0 -0
- /package/docs/pages/{components → customs}/dropdown.html +0 -0
- /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
|
-
|
|
74
|
+
&:focus,
|
|
75
|
+
&:focus-visible {
|
|
78
76
|
|
|
79
|
-
|
|
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
|
-
|
|
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
|
-
|
|
98
|
-
&:focus-visible {
|
|
99
|
-
outline: var(--#{$name}-outline-size, var(--outline-size)) var(--#{$name}-outline-style, var(--outline-style)) var(--#{$name}-outline-color, color-mix(in srgb, var(--#{$name}-border-color, currentcolor), transparent var(--outline-opacity)));
|
|
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
|
-
|
|
113
|
-
|
|
114
|
-
|
|
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
|
|
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
|
|
237
|
-
/// @param {string} $contrast - The
|
|
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-
|
|
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
|
-
|
|
247
|
-
background-color: transparent;
|
|
248
|
-
border-color: currentColor;
|
|
239
|
+
&.outline {
|
|
249
240
|
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
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
|
-
|
|
245
|
+
// Define the interactive states
|
|
246
|
+
@if($states !=()) {
|
|
261
247
|
|
|
262
|
-
|
|
263
|
-
|
|
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 {
|
|
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
|
-
|
|
294
|
-
$color: var(--color-#{$colorname});
|
|
295
|
-
$contrast: var(--color-#{$colorname}-contrast, white);
|
|
275
|
+
@each $colorname in $colors {
|
|
296
276
|
|
|
297
|
-
|
|
298
|
-
--#{$name}-color: #{$contrast};
|
|
299
|
-
--#{$name}-background: #{$color};
|
|
300
|
-
--#{$name}-border-color: #{$color};
|
|
277
|
+
&.#{$colorname} {
|
|
301
278
|
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
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
|
-
|
|
283
|
+
// Define the custom properties
|
|
284
|
+
--#{$name}-color: #{$contrast};
|
|
285
|
+
--#{$name}-background: #{$color};
|
|
286
|
+
--#{$name}-border-color: #{$color};
|
|
315
287
|
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
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
|
+
}
|
package/scss/base/_media.scss
CHANGED
|
@@ -15,6 +15,7 @@ img {
|
|
|
15
15
|
width: var(--image-width, auto);
|
|
16
16
|
height: var(--image-height, auto);
|
|
17
17
|
object-fit: var(--image-fit, cover);
|
|
18
|
+
object-position: var(--image-position, center);
|
|
18
19
|
aspect-ratio: var(--image-ratio, auto);
|
|
19
20
|
}
|
|
20
21
|
|
|
@@ -22,6 +23,7 @@ video {
|
|
|
22
23
|
width: var(--video-width, 100%);
|
|
23
24
|
height: var(--video-height, auto);
|
|
24
25
|
object-fit: var(--video-fit, cover);
|
|
26
|
+
object-position: var(--video-position, center);
|
|
25
27
|
aspect-ratio: var(--video-ratio, 16/9);
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -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, color-mix(in srgb, currentColor, transparent var(--
|
|
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
|
|
package/scss/base/index.scss
CHANGED
|
@@ -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,
|
|
@@ -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";
|
package/scss/themes/_root.scss
CHANGED
|
@@ -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.
|
|
27
|
-
--font-size-
|
|
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,7 +46,10 @@
|
|
|
42
46
|
--outline-size: 3px;
|
|
43
47
|
--outline-style: solid;
|
|
44
48
|
--outline-offset: 0;
|
|
45
|
-
--outline-
|
|
49
|
+
// --outline-color: var(--color-primary);
|
|
50
|
+
|
|
51
|
+
// Backdrop
|
|
52
|
+
--backdrop-color: rgba(0, 0, 0, .5);
|
|
46
53
|
|
|
47
54
|
// Hover (color-mix)
|
|
48
55
|
--hover-color: black;
|
|
@@ -52,6 +59,10 @@
|
|
|
52
59
|
--active-color: black;
|
|
53
60
|
--active-percent: 10%;
|
|
54
61
|
|
|
62
|
+
// Focus (color-mix)
|
|
63
|
+
--focus-color: currentColor;
|
|
64
|
+
--focus-percent: 50%;
|
|
65
|
+
|
|
55
66
|
// Disabled
|
|
56
67
|
--disabled-opacity: 50%;
|
|
57
68
|
|
|
@@ -66,6 +77,10 @@
|
|
|
66
77
|
// Contrasts
|
|
67
78
|
--color-warning-contrast: black;
|
|
68
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
|
+
|
|
69
84
|
// Icons
|
|
70
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>');
|
|
71
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>');
|
|
@@ -75,4 +90,29 @@
|
|
|
75
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>');
|
|
76
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>');
|
|
77
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
|
+
|
|
78
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/docs/pages/test.html
DELETED
|
@@ -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
|
|
File without changes
|