@natachah/vanilla-frontend 0.0.2

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 (104) hide show
  1. package/.gitlab-ci.yml +40 -0
  2. package/LICENSE.md +7 -0
  3. package/README.md +11 -0
  4. package/docs/index.html +36 -0
  5. package/docs/main.js +32 -0
  6. package/docs/pages/components/badge.html +154 -0
  7. package/docs/pages/components/button.html +186 -0
  8. package/docs/pages/components/card.html +184 -0
  9. package/docs/pages/components/dialog.html +334 -0
  10. package/docs/pages/components/disclosure.html +310 -0
  11. package/docs/pages/components/dropdown.html +255 -0
  12. package/docs/pages/components/form.html +331 -0
  13. package/docs/pages/components/list.html +140 -0
  14. package/docs/pages/components/loading.html +58 -0
  15. package/docs/pages/components/media.html +130 -0
  16. package/docs/pages/components/nav.html +119 -0
  17. package/docs/pages/components/progress.html +47 -0
  18. package/docs/pages/components/slider.html +311 -0
  19. package/docs/pages/components/table.html +168 -0
  20. package/docs/pages/javascript/autofill.html +170 -0
  21. package/docs/pages/javascript/checkall.html +59 -0
  22. package/docs/pages/javascript/comfort.html +134 -0
  23. package/docs/pages/javascript/consent.html +112 -0
  24. package/docs/pages/javascript/cookie.html +81 -0
  25. package/docs/pages/javascript/form.html +199 -0
  26. package/docs/pages/javascript/scroll.html +209 -0
  27. package/docs/pages/javascript/sidebar.html +53 -0
  28. package/docs/pages/javascript/sortable.html +148 -0
  29. package/docs/pages/javascript/toggle.html +191 -0
  30. package/docs/pages/javascript/tree.html +221 -0
  31. package/docs/pages/layout/grid.html +201 -0
  32. package/docs/pages/layout/reset.html +53 -0
  33. package/docs/pages/layout/typography.html +324 -0
  34. package/docs/pages/quick-start/conventions.html +112 -0
  35. package/docs/pages/quick-start/customization.html +187 -0
  36. package/docs/pages/quick-start/installation.html +95 -0
  37. package/docs/pages/quick-start/mixins.html +228 -0
  38. package/docs/pages/test.html +15 -0
  39. package/docs/src/js/demo.js +98 -0
  40. package/docs/src/js/doc-code.js +102 -0
  41. package/docs/src/js/doc-demo.js +14 -0
  42. package/docs/src/js/doc-layout.js +108 -0
  43. package/docs/src/scss/demo.scss +77 -0
  44. package/docs/src/scss/layout.scss +160 -0
  45. package/docs/src/scss/style.scss +278 -0
  46. package/docs/vite.config.mjs +23 -0
  47. package/esbuild.mjs +25 -0
  48. package/js/_autofill.js +131 -0
  49. package/js/_check-all.js +77 -0
  50. package/js/_comfort.js +174 -0
  51. package/js/_consent.js +84 -0
  52. package/js/_dialog.js +164 -0
  53. package/js/_dropdown.js +101 -0
  54. package/js/_scroll.js +184 -0
  55. package/js/_sidebar.js +97 -0
  56. package/js/_slider.js +249 -0
  57. package/js/_sortable.js +143 -0
  58. package/js/_tabpanel.js +88 -0
  59. package/js/_toggle.js +123 -0
  60. package/js/_tree.js +85 -0
  61. package/js/tests/autofill.test.js +157 -0
  62. package/js/tests/base-component.test.js +108 -0
  63. package/js/tests/check-all.test.js +88 -0
  64. package/js/tests/comfort.test.js +219 -0
  65. package/js/tests/consent.test.js +84 -0
  66. package/js/tests/cookie.test.js +102 -0
  67. package/js/tests/dialog.test.js +189 -0
  68. package/js/tests/dropdown.test.js +115 -0
  69. package/js/tests/form-helper.test.js +155 -0
  70. package/js/tests/scroll.test.js +203 -0
  71. package/js/tests/sidebar.test.js +99 -0
  72. package/js/tests/slider.test.js +307 -0
  73. package/js/tests/sortable.test.js +124 -0
  74. package/js/tests/tabpanel.test.js +114 -0
  75. package/js/tests/toggle.test.js +190 -0
  76. package/js/tests/tree.test.js +165 -0
  77. package/js/utilities/_base-component.js +101 -0
  78. package/js/utilities/_cookie.js +98 -0
  79. package/js/utilities/_error.js +80 -0
  80. package/js/utilities/_form-helper.js +101 -0
  81. package/package.json +42 -0
  82. package/scss/_badge.scss +37 -0
  83. package/scss/_button.scss +34 -0
  84. package/scss/_card.scss +122 -0
  85. package/scss/_dialog.scss +116 -0
  86. package/scss/_disclosure.scss +101 -0
  87. package/scss/_dropdown.scss +68 -0
  88. package/scss/_form.scss +197 -0
  89. package/scss/_grid.scss +40 -0
  90. package/scss/_group.scss +57 -0
  91. package/scss/_list.scss +18 -0
  92. package/scss/_loading.scss +49 -0
  93. package/scss/_media.scss +37 -0
  94. package/scss/_nav.scss +72 -0
  95. package/scss/_progress.scss +40 -0
  96. package/scss/_slider.scss +35 -0
  97. package/scss/_table.scss +36 -0
  98. package/scss/utilities/_mixin.scss +322 -0
  99. package/scss/utilities/_reset.scss +145 -0
  100. package/scss/utilities/_typography.scss +107 -0
  101. package/scss/vanilla-frontend.scss +23 -0
  102. package/scss/variables/_root.scss +70 -0
  103. package/scss/variables/_setting.scss +63 -0
  104. package/vitest.config.js +7 -0
@@ -0,0 +1,322 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Mixin
4
+ /// ------------------------------------------------------------------
5
+ /// Regroup all mixins of the package
6
+ ///
7
+ /// @group mixins
8
+ /// @author Natacha Herth
9
+ /// @since 1.0.0
10
+ ///
11
+ ////
12
+
13
+ @use "sass:map";
14
+
15
+ /// Create a basic item that can be interactive or not
16
+ ///
17
+ /// @param {string} $name - Name of the component
18
+ /// @param {array} $states - List of interactions (can be: focus, hover, active, disabled)
19
+ /// @param {array} $properties - List of default properties (check in /variables/_setting.scss)
20
+ /// @access public
21
+ ///
22
+ @mixin as-item($name, $states: (), $properties: $default-item-properties) {
23
+
24
+ // Define the default variables
25
+ // INFO: The choice of SASS variables other CSS private properties if for better readability of the final code
26
+ $default-color: var(--#{$name}-color, map.get($properties, color));
27
+ $default-background: var(--#{$name}-background, map.get($properties, background));
28
+ $default-border-size: var(--#{$name}-border-size, map.get($properties, border-size));
29
+ $default-border-style: var(--#{$name}-border-style, map.get($properties, border-style));
30
+ $default-border-color: var(--#{$name}-border-color, map.get($properties, border-color));
31
+ $default-border-radius: var(--#{$name}-border-radius, map.get($properties, border-radius));
32
+ $default-padding-inline: var(--#{$name}-padding-inline, map.get($properties, padding-inline));
33
+ $default-padding-block: var(--#{$name}-padding-block, map.get($properties, padding-block));
34
+
35
+ // Define the CSS
36
+ color: $default-color;
37
+ background-color: $default-background;
38
+ border: $default-border-size $default-border-style $default-border-color;
39
+ border-radius: $default-border-radius;
40
+ padding: $default-padding-block $default-padding-inline;
41
+
42
+ // Add cursor, text decoration and transition if needed
43
+ // ! Must be before any custom things SASS and CSS new convention
44
+ @if($states !=()) {
45
+ cursor: var(--#{$name}-cursor, pointer);
46
+ text-decoration: var(--#{$name}-decoration, var(--decoration));
47
+
48
+ @media screen and (prefers-reduced-motion: no-preference) {
49
+ transition: var(--#{$name}-transition, all .25s ease-in-out);
50
+ }
51
+ }
52
+
53
+ // Define the outline variations
54
+ @include with-outline-variations($name, $states);
55
+
56
+ // Define the interactive states
57
+ @if($states !=()) {
58
+
59
+ // State: focus
60
+ @if(index($states, 'focus')) {
61
+ &:focus {
62
+ 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
+ outline-offset: var(--#{$name}-focus-offset, var(--focus-offset));
64
+ }
65
+ }
66
+
67
+ // State: hover
68
+ @if(index($states, 'hover')) {
69
+ &:hover {
70
+ color: var(--#{$name}-hover-color, $default-color);
71
+ background-color: var(--#{$name}-hover-background, color-mix(in srgb, $default-background, var(--hover-color) var(--hover-percent)));
72
+ border-color: var(--#{$name}-hover-border-color, $default-border-color);
73
+ }
74
+ }
75
+
76
+ // State: active
77
+ @if(index($states, 'active')) {
78
+
79
+ &:active,
80
+ &[aria-current],
81
+ &[aria-selected=true],
82
+ &[aria-pressed=true] {
83
+ color: var(--#{$name}-active-color, $default-color);
84
+ background-color: var(--#{$name}-active-background, color-mix(in srgb, $default-background, var(--active-color) var(--active-percent)));
85
+ border-color: var(--#{$name}-active-border-color, $default-border-color);
86
+ }
87
+ }
88
+
89
+ // State: disabled
90
+ @if(index($states, 'disabled')) {
91
+ &:disabled {
92
+ pointer-events: none;
93
+ opacity: var(--#{$name}-disabled-opacity, var(--disabled-opacity));
94
+ }
95
+ }
96
+
97
+ }
98
+
99
+ // Define the color variations
100
+ @include with-color-variations($name, $states);
101
+
102
+ }
103
+
104
+ /// Create a basic list group that can be interactive
105
+ ///
106
+ /// @require {mixin} as-item
107
+ /// @param {string} $name - Name of the component
108
+ /// @param {array} $states - List of interactions (can be: focus, hover, active, disabled)
109
+ /// @param {array} $properties - List of default properties (check in /variables/_setting.scss)
110
+ /// @access public
111
+ ///
112
+ @mixin as-list($name, $states: (), $properties: $default-item-properties) {
113
+
114
+ // Reset
115
+ margin: 0;
116
+ padding: 0;
117
+
118
+ &:is(ul, ol) {
119
+ list-style: none;
120
+ }
121
+
122
+ > * {
123
+
124
+ position: relative;
125
+ margin: 0;
126
+
127
+ // Simple item
128
+ &:not(:has(> a:first-child:last-child)) {
129
+ @include as-item($name, (), $properties);
130
+ }
131
+
132
+ // Item with links
133
+ &:has(> a:first-child:last-child) > a {
134
+ display: block;
135
+ @include as-item($name, $states, $properties);
136
+ }
137
+
138
+ // Remove extra border
139
+ & + *,
140
+ & + * > a {
141
+ border-top: none !important;
142
+ }
143
+
144
+ // Remove radius on middle child
145
+ &:not(:first-child, :last-child),
146
+ &:not(:first-child, :last-child) > a {
147
+ border-radius: 0 !important;
148
+ }
149
+
150
+ // Remove the radius
151
+ &:not(:only-child) {
152
+
153
+ // Remove radius bottom on first child
154
+ &:first-child,
155
+ &:first-child > a {
156
+ border-end-start-radius: 0 !important;
157
+ border-end-end-radius: 0 !important;
158
+ }
159
+
160
+ // Remove radius top on last child
161
+ &:last-child,
162
+ &:last-child > a {
163
+ border-start-start-radius: 0 !important;
164
+ border-start-end-radius: 0 !important;
165
+ }
166
+
167
+ }
168
+
169
+ }
170
+ }
171
+
172
+ /// Create some outline variations
173
+ ///
174
+ /// @require {variable} $outline-variations - Map variable
175
+ /// @param {string} $name - Name of the component
176
+ /// @param {array} $states - List of interactions
177
+ /// @param {string} $color - The initial color of the item (used for color, border and :hover background)
178
+ /// @param {string} $contrast - The initial contrast color of the item (:hover color)
179
+ /// @access public
180
+ ///
181
+ @mixin with-outline-variations($name, $states: (), $color: var(--#{$name}-background, var(--color-font)), $contrast: var(--#{$name}-color, var(--color-body))) {
182
+
183
+ @if(variable-exists(outline-variations) and index($outline-variations, $name)) {
184
+
185
+ &.outline {
186
+
187
+ color: $color;
188
+ background-color: transparent;
189
+ border-color: currentColor;
190
+
191
+ @if(index($states, 'hover')) {
192
+
193
+ &:hover {
194
+ color: $contrast;
195
+ background-color: $color;
196
+ border-color: $color;
197
+ }
198
+
199
+ }
200
+
201
+ @if(index($states, 'active')) {
202
+
203
+ &:active,
204
+ &[aria-current],
205
+ &[aria-pressed=true] {
206
+ color: $contrast;
207
+ background-color: $color;
208
+ border-color: $color;
209
+ }
210
+
211
+ }
212
+
213
+ }
214
+
215
+ }
216
+
217
+ }
218
+
219
+ /// Create some color variations
220
+ ///
221
+ /// @require {variable} color-variations - Map variable
222
+ /// @param {string} $name - Name of the component
223
+ /// @param {boolean} @param {array} $states - List of interactions
224
+ /// @access public
225
+ ///
226
+ @mixin with-color-variations($name, $states: ()) {
227
+
228
+ @if(variable-exists(color-variations) and map-get($color-variations, #{$name})) {
229
+
230
+ @each $colorname in map-get($color-variations, #{$name}) {
231
+
232
+ &.#{$colorname} {
233
+
234
+ // Define the variables
235
+ $color: var(--color-#{$colorname});
236
+ $contrast: var(--color-#{$colorname}-contrast, white);
237
+
238
+ // Define the custom properties
239
+ --#{$name}-color: #{$contrast};
240
+ --#{$name}-background: #{$color};
241
+ --#{$name}-border-color: #{$color};
242
+
243
+ @if(index($states, 'hover')) {
244
+
245
+ // Define the variables
246
+ $hover: color-mix(in srgb, $color, var(--hover-color) var(--hover-percent));
247
+
248
+ // Define the custom properties
249
+ --#{$name}-hover-color: #{$contrast};
250
+ --#{$name}-hover-background: #{$hover};
251
+ --#{$name}-hover-border-color: #{$hover};
252
+
253
+ }
254
+
255
+ @if(index($states, 'active')) {
256
+
257
+ // Define the variables
258
+ $active: color-mix(in srgb, $color, var(--active-color) var(--active-percent));
259
+
260
+ // Define the custom properties
261
+ --#{$name}-active-color: #{$contrast};
262
+ --#{$name}-active-background: #{$active};
263
+ --#{$name}-active-border-color: #{$active};
264
+
265
+ }
266
+
267
+ }
268
+
269
+ }
270
+ }
271
+
272
+ }
273
+
274
+ /// Create a responsive table
275
+ ///
276
+ /// @access public
277
+ ///
278
+ @mixin as-responsive-table() {
279
+
280
+ // Remove the header & the border
281
+ thead {
282
+ display: none;
283
+ }
284
+
285
+ // Remove the header border
286
+ tbody tr:first-child {
287
+ border-top: none;
288
+ }
289
+
290
+ // Display as a grid
291
+ th,
292
+ td {
293
+ display: grid;
294
+ grid-template-columns: var(--table-grid-template, 15ch 1fr);
295
+
296
+ &[data-label] {
297
+ &::before {
298
+ padding-right: var(--table-padding-inline, var(--padding-inline));
299
+ content: attr(data-label);
300
+ }
301
+ }
302
+ }
303
+
304
+ }
305
+
306
+ /// Offset a flex grid column
307
+ ///
308
+ /// @param {int} $number - Number of column to offset
309
+ /// @access public
310
+ ///
311
+ @mixin flex-grid-offset-column($number: 1) {
312
+ margin-left: calc(($number * 100%) / var(--grid-columns, 12))
313
+ }
314
+
315
+ /// Make a flex grid column wider
316
+ ///
317
+ /// @param {int} $number - Number of column width
318
+ /// @access public
319
+ ///
320
+ @mixin flex-grid-wider-column($number: 2) {
321
+ flex-basis: calc($number / var(--grid-columns, 12) * 100% - var(--grid-gap-inline, 1rem) * (var(--grid-columns, 12) - 1) / var(--grid-columns, 12))
322
+ }
@@ -0,0 +1,145 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Reset
4
+ /// ------------------------------------------------------------------
5
+ /// This file is the CSS default reset
6
+ ///
7
+ /// @group reset
8
+ /// @author Natacha Herth
9
+ /// @since 1.0.0
10
+ ///
11
+ ////
12
+
13
+ // Remove all the styles of the "User-Agent-Stylesheet", except for the 'display' property
14
+ *:where(:not(iframe, canvas, img, svg, video, abbr, b, strong, i, em, cite, s, u, sub, sup, mark, code):not(svg *)) {
15
+ all: unset;
16
+ display: revert;
17
+ }
18
+
19
+ // Preferred box-sizing value
20
+ *,
21
+ *::before,
22
+ *::after {
23
+ box-sizing: border-box;
24
+ }
25
+
26
+ // For media to not be able to exceed their container
27
+ img,
28
+ picture,
29
+ video,
30
+ audio,
31
+ canvas,
32
+ figure {
33
+ max-width: 100%;
34
+ display: block;
35
+ }
36
+
37
+ // Avoid overflow of text
38
+ p,
39
+ h1,
40
+ h2,
41
+ h3,
42
+ h4,
43
+ h5,
44
+ h6 {
45
+ overflow-wrap: break-word;
46
+ }
47
+
48
+ // SVG default size and re-align with text
49
+ svg {
50
+ width: 1em;
51
+ height: 1em;
52
+ vertical-align: -.125em;
53
+ pointer-events: none; // For avoid e.target to get the SVG on clicked
54
+ }
55
+
56
+ // Basic table remove collapsing and set as block
57
+ table {
58
+ width: 100%;
59
+ border-collapse: collapse;
60
+ border-spacing: 0;
61
+ }
62
+
63
+ // Remove the default summary style
64
+ summary {
65
+ list-style: none;
66
+ }
67
+
68
+ // Force the hidden
69
+ [hidden] {
70
+ display: none;
71
+ }
72
+
73
+ // Change cursor for draggable
74
+ [draggable] {
75
+
76
+ &:not(:has([data-handle])),
77
+ [data-handle] {
78
+ cursor: grab;
79
+ }
80
+
81
+ &[aria-grabbed=true],
82
+ &[aria-grabbed=true] [data-handle] {
83
+ cursor: grabbing;
84
+ }
85
+
86
+ }
87
+
88
+ // Change cursor for tree + basic animation on svg
89
+ [role=tree],
90
+ [role=treegrid] {
91
+
92
+ [aria-expanded]:not(:has([data-handle])),
93
+ [data-handle] {
94
+ cursor: pointer;
95
+ }
96
+
97
+ @media screen and (prefers-reduced-motion: no-preference) {
98
+ [data-handle] > svg {
99
+ transition: all .25s ease-in-out;
100
+ }
101
+ }
102
+
103
+ [aria-expanded=true] > [data-handle] > svg {
104
+ transform: rotate(90deg);
105
+ }
106
+
107
+ }
108
+
109
+ // Reduce animation on scroll for #target
110
+ @media screen and (prefers-reduced-motion: no-preference) {
111
+ :has(:target) {
112
+ scroll-behavior: smooth;
113
+ }
114
+ }
115
+
116
+ // Define the bases for the body
117
+ body {
118
+
119
+ // Define Typography
120
+ font-size: var(--font-size, 1rem);
121
+ line-height: var(--line-height, 1.5);
122
+ font-family: var(--font-family, default);
123
+ font-weight: var(--font-weight, normal);
124
+
125
+ // Define color
126
+ color: var(--color-font, black);
127
+ background-color: var(--color-body, white);
128
+
129
+ // Trick to avoid reposition with or withour scrollbar
130
+ overflow-x: hidden;
131
+ margin-right: calc(100% - 100vw);
132
+
133
+ // Avoid scroll when a dialog is opened
134
+ &[inert] {
135
+ overflow: hidden;
136
+ pointer-events: none;
137
+ touch-action: none;
138
+ }
139
+
140
+ // Data attribute to prevent animation on first load DOM
141
+ &[data-preload] * {
142
+ transition-duration: 0s !important;
143
+ }
144
+
145
+ }
@@ -0,0 +1,107 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Typography
4
+ /// ------------------------------------------------------------------
5
+ /// This file define the basic typographic elements.
6
+ ///
7
+ /// @group typography
8
+ /// @author Natacha Herth
9
+ /// @since 1.0.0
10
+ ///
11
+ ////
12
+
13
+ @for $i from 1 through 6 {
14
+ h#{$i} {
15
+ font-size: var(--font-size-h#{$i});
16
+ font-weight: var(--heading-font-weight, var(--font-weight));
17
+ line-height: var(--heading-line-height, var(--line-height));
18
+ color: var(--heading-color, currentColor);
19
+ text-wrap: balance;
20
+ }
21
+ }
22
+
23
+ a {
24
+
25
+ cursor: pointer;
26
+ text-decoration: var(--anchor-decoration, var(--decoration));
27
+ color: var(--anchor-color, currentColor);
28
+
29
+ &:hover {
30
+ color: var(--anchor-hover-color, var(--anchor-color, currentColor));
31
+ }
32
+
33
+ &:active,
34
+ &[aria-current],
35
+ &[aria-selected=true] {
36
+ color: var(--anchor-active-color, var(--nav-hover-color, var(--nav-color, currentColor)));
37
+ }
38
+
39
+ &:disabled,
40
+ &:not([href]) {
41
+ pointer-events: none;
42
+ opacity: var(--anchor-disabled-opacity, var(--disabled-opacity));
43
+ }
44
+
45
+ }
46
+
47
+ small {
48
+ font-size: var(--font-size-small);
49
+ }
50
+
51
+ mark {
52
+ padding: var(--mark-padding-block, .175em) var(--mark-padding-inline, .175em);
53
+ background-color: var(--mark-background, #fff3cd);
54
+ }
55
+
56
+ kbd {
57
+ white-space: nowrap;
58
+ padding: var(--kbd-padding-block, .25em) var(--kbd-padding-inline, .375em);
59
+ font-family: var(--kbd-font-family, monospace);
60
+ color: var(--kbd-color, var(--color-body));
61
+ background-color: var(--kbd-background, var(--color-font));
62
+ border-radius: var(--kbd-border-radius, var(--border-radius));
63
+ }
64
+
65
+ :not(pre) > code {
66
+ white-space: nowrap;
67
+ padding: var(--code-padding-block, .25em) var(--code-padding-inline, .375em);
68
+ font-family: var(--code-font-family, monospace);
69
+ color: var(--code-color, currentColor);
70
+ background-color: var(--code-background, #f5f2f0);
71
+ border-radius: var(--code-border-radius, var(--border-radius));
72
+ }
73
+
74
+ ins {
75
+ color: var(--color-success, green);
76
+ }
77
+
78
+ del {
79
+ text-decoration: line-through;
80
+ color: var(--color-error, red);
81
+ }
82
+
83
+ pre {
84
+ white-space: nowrap;
85
+ padding: var(--pre-padding-block, 1em) var(--pre-padding-inline, 1em);
86
+ font-family: var(--pre-font-family, monospace);
87
+ color: var(--pre-color, currentColor);
88
+ background-color: var(--pre-background, #f5f2f0);
89
+ border-radius: var(--pre-border-radius, var(--border-radius));
90
+ }
91
+
92
+ ul,
93
+ ol {
94
+ padding-left: var(--list-offset, 1.25rem);
95
+ }
96
+
97
+ ul {
98
+ list-style: var(--list-bullet, disc);
99
+ }
100
+
101
+ ol {
102
+ list-style: var(--list-bullet, decimal);
103
+ }
104
+
105
+ hr {
106
+ border-top: var(--hr-border-size, 1px) var(--hr-border-style, solid) var(--hr-border-color, currentColor);
107
+ }
@@ -0,0 +1,23 @@
1
+ @import './variables/_root';
2
+ @import './variables/_setting';
3
+
4
+ @import './utilities/_mixin';
5
+ @import './utilities/_reset';
6
+ @import './utilities/_typography';
7
+
8
+ @import './_badge';
9
+ @import './_button';
10
+ @import './_card';
11
+ @import './_dialog';
12
+ @import './_disclosure';
13
+ @import './_dropdown';
14
+ @import './_form';
15
+ @import './_grid';
16
+ @import './_group';
17
+ @import './_list';
18
+ @import './_loading';
19
+ @import './_media';
20
+ @import './_nav';
21
+ @import './_progress';
22
+ @import './_slider';
23
+ @import './_table';
@@ -0,0 +1,70 @@
1
+ ////
2
+ /// ------------------------------------------------------------------
3
+ /// Root
4
+ /// ------------------------------------------------------------------
5
+ /// Regroup all the default CSS custom properties
6
+ ///
7
+ /// @group themes
8
+ /// @author Natacha Herth
9
+ /// @since 0.0.1
10
+ ///
11
+ ////
12
+
13
+ :root {
14
+
15
+ // Typography
16
+ --font-size: 16px;
17
+ --line-height: 1.5;
18
+ --font-family: Arial;
19
+ --font-weight: normal;
20
+
21
+ --font-size-h1: 2.25em; // 36px
22
+ --font-size-h2: 2.00em; // 32px
23
+ --font-size-h3: 1.75em; // 28px
24
+ --font-size-h4: 1.50em; // 24px
25
+ --font-size-h5: 1.25em; // 20px
26
+ --font-size-h6: 1.125em; // 18px
27
+ --font-size-large: 1.125em; // 18px
28
+ --font-size-small: .875em; // 14px
29
+
30
+ // Anchor
31
+ --decoration: none;
32
+
33
+ // Layouts
34
+ --padding-inline: .75em;
35
+ --padding-block: .5em;
36
+
37
+ // Border
38
+ --border-size: 1px;
39
+ --border-style: solid;
40
+ --border-radius: .25rem;
41
+
42
+ // Focus (outline)
43
+ --focus-size: 3px;
44
+ --focus-style: solid;
45
+ --focus-offset: 0;
46
+ --focus-opacity: 50%;
47
+
48
+ // Hover (color-mix)
49
+ --hover-color: black;
50
+ --hover-percent: 5%;
51
+
52
+ // Active (color-mix)
53
+ --active-color: black;
54
+ --active-percent: 10%;
55
+
56
+ // Disabled
57
+ --disabled-opacity: 50%;
58
+
59
+ // Colors
60
+ --color-body: white;
61
+ --color-font: black;
62
+ --color-primary: #B790E5;
63
+ --color-error: #DC3030;
64
+ --color-success: #008A00;
65
+ --color-warning: #FFA500;
66
+
67
+ // Contrasts
68
+ --color-warning-contrast: black;
69
+
70
+ }