@volverjs/style 0.1.29 → 0.1.30

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 (158) hide show
  1. package/design-tokens.json +503 -7
  2. package/dist/base.css +1 -1
  3. package/dist/components/vv-alert.css +1 -1
  4. package/dist/components/vv-attachment-group.css +1 -0
  5. package/dist/components/vv-attachment.css +1 -0
  6. package/dist/components/vv-avatar.css +1 -1
  7. package/dist/components/vv-badge.css +1 -1
  8. package/dist/components/vv-breadcrumb.css +1 -1
  9. package/dist/components/vv-bubble-group.css +1 -0
  10. package/dist/components/vv-bubble.css +1 -0
  11. package/dist/components/vv-button.css +1 -1
  12. package/dist/components/vv-calendar.css +1 -0
  13. package/dist/components/vv-checkbox-group.css +1 -1
  14. package/dist/components/vv-checkbox.css +1 -1
  15. package/dist/components/vv-command.css +1 -0
  16. package/dist/components/vv-dialog.css +1 -1
  17. package/dist/components/vv-dropdown-action.css +1 -1
  18. package/dist/components/vv-dropdown-option.css +1 -1
  19. package/dist/components/vv-empty.css +1 -0
  20. package/dist/components/vv-field.css +1 -0
  21. package/dist/components/vv-input-file.css +1 -1
  22. package/dist/components/vv-input-otp.css +1 -0
  23. package/dist/components/vv-input-range.css +1 -1
  24. package/dist/components/vv-input-text.css +1 -1
  25. package/dist/components/vv-item-group.css +1 -0
  26. package/dist/components/vv-item.css +1 -0
  27. package/dist/components/vv-kbd-group.css +1 -0
  28. package/dist/components/vv-kbd.css +1 -0
  29. package/dist/components/vv-marker.css +1 -0
  30. package/dist/components/vv-message-scroller.css +1 -0
  31. package/dist/components/vv-message.css +1 -0
  32. package/dist/components/vv-nav.css +1 -1
  33. package/dist/components/vv-pagination.css +1 -0
  34. package/dist/components/vv-popover.css +1 -0
  35. package/dist/components/vv-progress.css +1 -1
  36. package/dist/components/vv-prose.css +1 -0
  37. package/dist/components/vv-questionnaire.css +1 -0
  38. package/dist/components/vv-radio-group.css +1 -1
  39. package/dist/components/vv-radio.css +1 -1
  40. package/dist/components/vv-select.css +1 -1
  41. package/dist/components/vv-separator.css +1 -0
  42. package/dist/components/vv-sidebar.css +1 -0
  43. package/dist/components/vv-spinner.css +1 -0
  44. package/dist/components/vv-table.css +1 -1
  45. package/dist/components/vv-text.css +1 -1
  46. package/dist/components/vv-textarea.css +1 -1
  47. package/dist/components.css +1 -1
  48. package/dist/export.css +1 -1
  49. package/dist/props/colors.css +1 -1
  50. package/dist/props/input.css +1 -1
  51. package/dist/props.css +1 -1
  52. package/dist/themes/dark/components.css +1 -1
  53. package/dist/themes/dark/props.css +1 -1
  54. package/dist/themes/dark/volver.css +1 -1
  55. package/dist/utilities/colors.css +1 -1
  56. package/dist/utilities/layout.css +1 -1
  57. package/dist/utilities.css +1 -1
  58. package/dist/volver.css +1 -1
  59. package/package.json +64 -16
  60. package/src/_config.scss +23 -0
  61. package/src/_preflight.scss +14 -2
  62. package/src/base.scss +1 -1
  63. package/src/components/index.scss +28 -0
  64. package/src/components/vv-attachment-group.scss +17 -0
  65. package/src/components/vv-attachment.scss +17 -0
  66. package/src/components/vv-bubble-group.scss +17 -0
  67. package/src/components/vv-bubble.scss +17 -0
  68. package/src/components/vv-calendar.scss +25 -0
  69. package/src/components/vv-command.scss +17 -0
  70. package/src/components/vv-empty.scss +17 -0
  71. package/src/components/vv-field.scss +25 -0
  72. package/src/components/vv-input-otp.scss +17 -0
  73. package/src/components/vv-item-group.scss +17 -0
  74. package/src/components/vv-item.scss +39 -0
  75. package/src/components/vv-kbd-group.scss +17 -0
  76. package/src/components/vv-kbd.scss +17 -0
  77. package/src/components/vv-marker.scss +17 -0
  78. package/src/components/vv-message-scroller.scss +24 -0
  79. package/src/components/vv-message.scss +25 -0
  80. package/src/components/vv-pagination.scss +17 -0
  81. package/src/components/vv-popover.scss +17 -0
  82. package/src/components/vv-prose.scss +17 -0
  83. package/src/components/vv-questionnaire.scss +28 -0
  84. package/src/components/vv-separator.scss +17 -0
  85. package/src/components/vv-sidebar.scss +17 -0
  86. package/src/components/vv-spinner.scss +27 -0
  87. package/src/presets/_outlined-fields.scss +346 -0
  88. package/src/props/colors.scss +6 -0
  89. package/src/settings/_colors.scss +161 -61
  90. package/src/settings/_index.scss +26 -0
  91. package/src/settings/_input.scss +11 -2
  92. package/src/settings/components/_choice.scss +104 -0
  93. package/src/settings/components/_vv-alert.scss +37 -12
  94. package/src/settings/components/_vv-attachment-group.scss +10 -0
  95. package/src/settings/components/_vv-attachment.scss +135 -0
  96. package/src/settings/components/_vv-avatar.scss +19 -9
  97. package/src/settings/components/_vv-badge.scss +47 -14
  98. package/src/settings/components/_vv-breadcrumb.scss +1 -1
  99. package/src/settings/components/_vv-bubble-group.scss +31 -0
  100. package/src/settings/components/_vv-bubble.scss +69 -0
  101. package/src/settings/components/_vv-button.scss +55 -13
  102. package/src/settings/components/_vv-calendar.scss +102 -0
  103. package/src/settings/components/_vv-checkbox-group.scss +33 -2
  104. package/src/settings/components/_vv-checkbox.scss +8 -3
  105. package/src/settings/components/_vv-command.scss +99 -0
  106. package/src/settings/components/_vv-dialog.scss +129 -26
  107. package/src/settings/components/_vv-dropdown-action.scss +3 -2
  108. package/src/settings/components/_vv-dropdown-option.scss +3 -3
  109. package/src/settings/components/_vv-empty.scss +71 -0
  110. package/src/settings/components/_vv-field.scss +111 -0
  111. package/src/settings/components/_vv-input-file.scss +8 -8
  112. package/src/settings/components/_vv-input-otp.scss +55 -0
  113. package/src/settings/components/_vv-input-range.scss +3 -3
  114. package/src/settings/components/_vv-input-text.scss +7 -7
  115. package/src/settings/components/_vv-item-group.scss +68 -0
  116. package/src/settings/components/_vv-item.scss +201 -0
  117. package/src/settings/components/_vv-kbd-group.scss +9 -0
  118. package/src/settings/components/_vv-kbd.scss +20 -0
  119. package/src/settings/components/_vv-marker.scss +32 -0
  120. package/src/settings/components/_vv-message-scroller.scss +65 -0
  121. package/src/settings/components/_vv-message.scss +95 -0
  122. package/src/settings/components/_vv-nav.scss +7 -3
  123. package/src/settings/components/_vv-pagination.scss +78 -0
  124. package/src/settings/components/_vv-popover.scss +53 -0
  125. package/src/settings/components/_vv-progress.scss +4 -4
  126. package/src/settings/components/_vv-prose.scss +274 -0
  127. package/src/settings/components/_vv-questionnaire.scss +77 -0
  128. package/src/settings/components/_vv-radio.scss +7 -3
  129. package/src/settings/components/_vv-select.scss +6 -6
  130. package/src/settings/components/_vv-separator.scss +79 -0
  131. package/src/settings/components/_vv-sidebar.scss +91 -0
  132. package/src/settings/components/_vv-spinner.scss +26 -0
  133. package/src/settings/components/_vv-table.scss +63 -0
  134. package/src/settings/components/_vv-text.scss +3 -3
  135. package/src/settings/components/_vv-textarea.scss +7 -7
  136. package/src/themes/dark/components/_vv-checkbox.scss +27 -0
  137. package/src/themes/dark/components/_vv-radio.scss +27 -0
  138. package/src/themes/dark/components/index.scss +2 -0
  139. package/src/themes/dark/props/_colors.scss +6 -0
  140. package/src/themes/dark/settings/_colors.scss +97 -32
  141. package/src/themes/dark/settings/_index.scss +2 -0
  142. package/src/themes/dark/settings/_input.scss +4 -8
  143. package/src/themes/dark/settings/components/_choice.scss +15 -0
  144. package/src/themes/dark/settings/components/_vv-alert.scss +6 -48
  145. package/src/themes/dark/settings/components/_vv-avatar.scss +1 -16
  146. package/src/themes/dark/settings/components/_vv-badge.scss +1 -32
  147. package/src/themes/dark/settings/components/_vv-button.scss +0 -15
  148. package/src/themes/dark/settings/components/_vv-checkbox.scss +7 -0
  149. package/src/themes/dark/settings/components/_vv-dropdown-action.scss +2 -3
  150. package/src/themes/dark/settings/components/_vv-dropdown-option.scss +2 -19
  151. package/src/themes/dark/settings/components/_vv-nav.scss +2 -15
  152. package/src/themes/dark/settings/components/_vv-radio.scss +7 -0
  153. package/src/tools/_functions.scss +430 -2
  154. package/src/tools/mixin-modules/_bem.scss +5 -39
  155. package/src/tools/mixin-modules/_states.scss +77 -0
  156. package/src/tools/mixin-modules/_theme.scss +135 -121
  157. package/src/utilities/colors.scss +49 -4
  158. package/src/utilities/layout.scss +25 -0
@@ -0,0 +1,24 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-message-scroller);
6
+ $component-map: $vv-message-scroller;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ // The reset hides `[hidden]` at zero specificity, before the components, so
18
+ // the `display` of the button would win over it: the script hides the button
19
+ // with the attribute while the reader is at the bottom
20
+ @include wrap-with-where($selector: '#{$component-selector}__jump[hidden]', $enabled: $zero-specificity-for-components) {
21
+ display: none;
22
+ }
23
+
24
+ }
@@ -0,0 +1,25 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-message);
6
+ $component-map: $vv-message;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ // A device that cannot hover never reveals what shows on hover: the metadata
18
+ // of a message is always there. The map cannot express a media feature.
19
+ @media (hover: none) {
20
+ @include wrap-with-where($selector: '#{$component-selector}__meta', $enabled: $zero-specificity-for-components) {
21
+ opacity: var(--opacity-100);
22
+ }
23
+ }
24
+
25
+ }
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-pagination);
6
+ $component-map: $vv-pagination;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ }
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-popover);
6
+ $component-map: $vv-popover;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ }
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-prose);
6
+ $component-map: $vv-prose;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ }
@@ -0,0 +1,28 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-questionnaire);
6
+ $component-map: $vv-questionnaire;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ // A title followed by its description sits close over it, and the space
18
+ // before the choices is the description's. The map cannot say "a title with a
19
+ // description after it", and the title is the `legend` of a choice, so it has
20
+ // to be told from the sibling it has, not from a wrapper.
21
+ @include wrap-with-where(
22
+ $selector: '#{$component-selector}__title:has(+ #{$component-selector}__description)',
23
+ $enabled: $zero-specificity-for-components
24
+ ) {
25
+ margin-block-end: var(--spacing-4);
26
+ }
27
+
28
+ }
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-separator);
6
+ $component-map: $vv-separator;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ }
@@ -0,0 +1,17 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-sidebar);
6
+ $component-map: $vv-sidebar;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ }
@@ -0,0 +1,27 @@
1
+ @use 'sass:map';
2
+ @use '../context' as *;
3
+
4
+ @include layer(components, $use-css-layers, $layer-prefix) {
5
+ $component-name: map.get($components-names, vv-spinner);
6
+ $component-map: $vv-spinner;
7
+ $component-selector: '.#{ $component-name}';
8
+
9
+ @include spread-map-into-bem(
10
+ $map: $component-map,
11
+ $block: $component-name,
12
+ $use-custom-props: $use-custom-props-for-components,
13
+ $zero-specificity: $zero-specificity-for-components,
14
+ $bps: $breakpoints
15
+ );
16
+
17
+ // A spinner that stands still says nothing, so reduced motion slows the ring
18
+ // down rather than stopping it. The map cannot express a media feature, and
19
+ // this rule comes after the block's own, which it overrides at the same
20
+ // specificity.
21
+ @media (prefers-reduced-motion: reduce) {
22
+ @include wrap-with-where($selector: $component-selector, $enabled: $zero-specificity-for-components) {
23
+ --spinner-duration: 1.5s;
24
+ }
25
+ }
26
+
27
+ }
@@ -0,0 +1,346 @@
1
+ @use 'sass:map';
2
+ @use '../context' as ctx;
3
+
4
+ // Outlined fields: every field of the library as a box on the plain surface,
5
+ // a 1px border, a radius, and a ring on focus, instead of the default filled
6
+ // box with a line underneath and a brand bar sliding in on focus. Opt in by
7
+ // loading this module after the context and before the library emits
8
+ // anything:
9
+
10
+ // @use '@volverjs/style/scss/context' with (...);
11
+ // @use '@volverjs/style/scss/presets/outlined-fields';
12
+ // @use '@volverjs/style/scss';
13
+
14
+ // It reassigns `$input` and the maps of `vv-input-text`, `vv-textarea`,
15
+ // `vv-select`, `vv-input-file` and `vv-field`, so it has to run before the
16
+ // props and the components are emitted: loaded later it changes nothing. It
17
+ // changes the look only, not the density: heights, paddings and font sizes
18
+ // stay those of the library. The new tokens are `--input-border-color`,
19
+ // `--input-border-color-hover`, `--input-border-radius`,
20
+ // `--input-focus-color`, `--input-focus-ring`, `--input-invalid-ring` and
21
+ // `--input-disabled-*`; the dark theme follows through the colours they read.
22
+
23
+ ctx.$input: map.deep-merge(
24
+ ctx.$input,
25
+ (
26
+ // The filled pattern darkened the surface on hover and focus; the
27
+ // outlined one keeps it still and moves the border instead
28
+ background-color: var(--color-surface),
29
+ background-color-hover: var(--color-surface),
30
+ background-color-focus: var(--color-surface),
31
+ border-color: var(--color-surface-4),
32
+ border-color-hover: var(--color-surface-5),
33
+ border-radius: var(--rounded-lg),
34
+ // The ring is the only focus indication and has to hold on its own
35
+ focus-color: var(--color-brand-graphic),
36
+ focus-ring: 0 0 0 var(--spacing-3)
37
+ color-mix(in srgb, var(--input-focus-color) 16%, transparent),
38
+ invalid-ring: 0 0 0 var(--spacing-3)
39
+ color-mix(in srgb, var(--input-invalid-color) 14%, transparent),
40
+ disabled-background-color: var(--color-surface-1),
41
+ disabled-border-color: var(--color-surface-3),
42
+ disabled-color: var(--color-word-3),
43
+ transition: (
44
+ border-color var(--duration-150) var(--ease-out),
45
+ box-shadow var(--duration-150) var(--ease-out),
46
+ ),
47
+ // The text keeps the padding of the field (the filled pattern pushed
48
+ // it down to make room inside the box) and the label rises to sit on
49
+ // the top border, half above it and half below
50
+ floating: (
51
+ padding-top: var(--input-spacing-top),
52
+ padding-bottom: var(--input-spacing-bottom),
53
+ label: (
54
+ translate: 0 -50%,
55
+ ),
56
+ ),
57
+ )
58
+ );
59
+
60
+ // The box around the control: the two pseudo elements of the filled pattern
61
+ // are hidden and every state moves to the border and the ring
62
+ $-wrapper: (
63
+ border: var(--spacing-px) solid var(--input-border-color),
64
+ border-radius: var(--input-border-radius),
65
+ transition: var(--input-transition),
66
+ pseudo: (
67
+ before: (
68
+ display: none,
69
+ ),
70
+ after: (
71
+ display: none,
72
+ ),
73
+ ),
74
+ state: (
75
+ hover: (
76
+ border-color: var(--input-border-color-hover),
77
+ ),
78
+ focus-within: (
79
+ border-color: var(--input-focus-color),
80
+ box-shadow: var(--input-focus-ring),
81
+ ),
82
+ ),
83
+ );
84
+ $-wrapper-invalid: (
85
+ border-color: var(--input-invalid-color),
86
+ state: (
87
+ hover: (
88
+ border-color: var(--input-invalid-color),
89
+ ),
90
+ focus-within: (
91
+ border-color: var(--input-invalid-color),
92
+ box-shadow: var(--input-invalid-ring),
93
+ ),
94
+ ),
95
+ );
96
+
97
+ // Success has no ring of its own: the border says it
98
+ $-wrapper-valid: (
99
+ border-color: var(--input-valid-color),
100
+ state: (
101
+ hover: (
102
+ border-color: var(--input-valid-color),
103
+ ),
104
+ focus-within: (
105
+ border-color: var(--input-valid-color),
106
+ ),
107
+ ),
108
+ );
109
+
110
+ // The indeterminate bar of `loading` is the `::after` of the filled pattern,
111
+ // shown again and pulled in by the radius so it runs along the straight part
112
+ // of the bottom edge
113
+ $-wrapper-loading: (
114
+ pseudo: (
115
+ after: (
116
+ display: block,
117
+ inset: auto var(--input-border-radius) 0,
118
+ ),
119
+ ),
120
+ );
121
+
122
+ // A quiet box that does not react. The label stays readable at full
123
+ // opacity: the box says it is disabled by itself. The dimmed text goes on the
124
+ // control of each field (`$-disabled-control` below), not through a token on
125
+ // the box: the control reads its colour from a property resolved at the root.
126
+ $-disabled: (
127
+ opacity: var(--opacity-100),
128
+ // The floating label paints the field surface behind itself
129
+ --input-background-color: var(--input-disabled-background-color),
130
+ element: (
131
+ wrapper: (
132
+ background-color: var(--input-disabled-background-color),
133
+ border-color: var(--input-disabled-border-color),
134
+ state: (
135
+ hover: (
136
+ border-color: var(--input-disabled-border-color),
137
+ ),
138
+ focus-within: (
139
+ border-color: var(--input-disabled-border-color),
140
+ box-shadow: none,
141
+ ),
142
+ ),
143
+ ),
144
+ ),
145
+ );
146
+
147
+ // The dimmed text of a disabled field, on its control element
148
+ @function -disabled-control($element) {
149
+ @return (
150
+ state: (
151
+ disabled: (
152
+ element: (
153
+ #{$element}: (
154
+ color: var(--input-disabled-color),
155
+ ),
156
+ ),
157
+ ),
158
+ ),
159
+ );
160
+ }
161
+
162
+ // Read only: looks like rest, ignores hover and focus
163
+ $-readonly: (
164
+ element: (
165
+ wrapper: (
166
+ state: (
167
+ hover: (
168
+ border-color: var(--input-border-color),
169
+ ),
170
+ focus-within: (
171
+ border-color: var(--input-border-color),
172
+ box-shadow: none,
173
+ ),
174
+ ),
175
+ ),
176
+ ),
177
+ );
178
+
179
+ // The floated label shrinks to its own line, sits on the top border with the
180
+ // field surface behind it and a little air on each side: the border is
181
+ // interrupted by the label, the notch of an outlined field
182
+ $-floating-label: (
183
+ top: 0,
184
+ min-height: 0,
185
+ line-height: var(--leading-normal),
186
+ padding-inline: var(--spacing-4),
187
+ margin-left: calc(-1 * var(--spacing-4)),
188
+ // Plain: the disabled state sets `--input-background-color` on the
189
+ // block, which a generated property, resolved at the root, would miss
190
+ [background-color]: var(--input-background-color),
191
+ );
192
+ $-floating: (
193
+ state: (
194
+ focus-within: (
195
+ element: (
196
+ label: $-floating-label,
197
+ ),
198
+ ),
199
+ dirty: (
200
+ element: (
201
+ label: $-floating-label,
202
+ ),
203
+ ),
204
+ ),
205
+ );
206
+
207
+ // The select spells "dirty" as a modifier rather than a state
208
+ $-floating-select: (
209
+ state: (
210
+ focus-within: (
211
+ element: (
212
+ label: $-floating-label,
213
+ ),
214
+ ),
215
+ ),
216
+ modifier: (
217
+ dirty: (
218
+ element: (
219
+ label: $-floating-label,
220
+ ),
221
+ ),
222
+ ),
223
+ );
224
+
225
+ // What every field takes
226
+ $-field: (
227
+ element: (
228
+ wrapper: $-wrapper,
229
+ ),
230
+ modifier: (
231
+ valid: (
232
+ element: (
233
+ wrapper: $-wrapper-valid,
234
+ ),
235
+ ),
236
+ invalid: (
237
+ element: (
238
+ wrapper: $-wrapper-invalid,
239
+ ),
240
+ ),
241
+ loading: (
242
+ element: (
243
+ wrapper: $-wrapper-loading,
244
+ ),
245
+ ),
246
+ ),
247
+ state: (
248
+ disabled: $-disabled,
249
+ ),
250
+ );
251
+
252
+ // A text input and a textarea: the field, the floating label, read only
253
+ $-text-like: map.deep-merge(
254
+ map.deep-merge($-field, -disabled-control('input')),
255
+ (
256
+ modifier: (
257
+ floating: $-floating,
258
+ ),
259
+ state: (
260
+ readonly: $-readonly,
261
+ ),
262
+ )
263
+ );
264
+
265
+ ctx.$vv-input-text: map.deep-merge(ctx.$vv-input-text, $-text-like);
266
+ ctx.$vv-textarea: map.deep-merge(ctx.$vv-textarea, $-text-like);
267
+
268
+ ctx.$vv-field: map.deep-merge(
269
+ ctx.$vv-field,
270
+ map.deep-merge(
271
+ map.deep-merge($-field, -disabled-control('control')),
272
+ (
273
+ state: (
274
+ readonly: $-readonly,
275
+ ),
276
+ )
277
+ )
278
+ );
279
+
280
+ // The dashed border of the drop area is its `::after` at `inset: 0`, so the
281
+ // radius goes on both
282
+ ctx.$vv-input-file: map.deep-merge(
283
+ ctx.$vv-input-file,
284
+ map.deep-merge(
285
+ $-field,
286
+ (
287
+ element: (
288
+ drop-area: (
289
+ border-radius: var(--input-border-radius),
290
+ pseudo: (
291
+ after: (
292
+ // Plain: `inherit` written into a custom
293
+ // property would apply to the property itself
294
+ [border-radius]: inherit,
295
+ ),
296
+ ),
297
+ ),
298
+ ),
299
+ )
300
+ )
301
+ );
302
+
303
+ // The focus of a combobox sits on its dropdown, so the open state carries
304
+ // the ring as well, and read only freezes the control with the disabled
305
+ // attribute: the box is told it is at rest, not disabled
306
+ ctx.$vv-select: map.deep-merge(
307
+ ctx.$vv-select,
308
+ map.deep-merge(
309
+ map.deep-merge($-field, -disabled-control('input')),
310
+ (
311
+ element: (
312
+ wrapper: (
313
+ state: (
314
+ open: (
315
+ border-color: var(--input-focus-color),
316
+ box-shadow: var(--input-focus-ring),
317
+ ),
318
+ ),
319
+ ),
320
+ ),
321
+ modifier: (
322
+ floating: $-floating-select,
323
+ readonly: (
324
+ element: (
325
+ input: (
326
+ color: var(--color-word-1),
327
+ ),
328
+ wrapper: (
329
+ background-color: var(--input-background-color),
330
+ border-color: var(--input-border-color),
331
+ state: (
332
+ hover: (
333
+ border-color: var(--input-border-color),
334
+ ),
335
+ focus-within: (
336
+ border-color: var(--input-border-color),
337
+ box-shadow: none,
338
+ ),
339
+ ),
340
+ ),
341
+ ),
342
+ ),
343
+ ),
344
+ )
345
+ )
346
+ );
@@ -3,5 +3,11 @@
3
3
  @include layer(props, $use-css-layers, $layer-prefix) {
4
4
  :where(:host, :root, .theme) {
5
5
  @include spread-map-into-props($colors, $prefix: color);
6
+
7
+ // Safari 17 reads `l` as a percentage: the fixed steps of word and
8
+ // surface, calc(l + 12), resolve there only written in percent
9
+ @supports not (color: hsl(from red h s calc(l + 1))) {
10
+ @include spread-map-into-props(fixed-steps-in-percent($colors), $prefix: color);
11
+ }
6
12
  }
7
13
  }