@4sh/ui-kit 0.7.0 → 0.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (158) hide show
  1. package/README.fr.md +12 -11
  2. package/README.md +12 -11
  3. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs +3 -3
  4. package/fesm2022/4sh-ui-kit-actions-ui-button-split.mjs.map +1 -1
  5. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs +7 -5
  6. package/fesm2022/4sh-ui-kit-actions-ui-button.mjs.map +1 -1
  7. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs +4 -4
  8. package/fesm2022/4sh-ui-kit-actions-ui-link.mjs.map +1 -1
  9. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs +3 -3
  10. package/fesm2022/4sh-ui-kit-actions-ui-speed-dial.mjs.map +1 -1
  11. package/fesm2022/4sh-ui-kit-base-ui-icon.mjs +6 -6
  12. package/fesm2022/4sh-ui-kit-base-ui-image.mjs +4 -4
  13. package/fesm2022/4sh-ui-kit-base-ui-image.mjs.map +1 -1
  14. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs +8 -6
  15. package/fesm2022/4sh-ui-kit-forms-ui-autocomplete.mjs.map +1 -1
  16. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs +5 -5
  17. package/fesm2022/4sh-ui-kit-forms-ui-checkbox.mjs.map +1 -1
  18. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs +211 -27
  19. package/fesm2022/4sh-ui-kit-forms-ui-datepicker.mjs.map +1 -1
  20. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs +4 -4
  21. package/fesm2022/4sh-ui-kit-forms-ui-editor.mjs.map +1 -1
  22. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs +18 -5
  23. package/fesm2022/4sh-ui-kit-forms-ui-field.mjs.map +1 -1
  24. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs +11 -9
  25. package/fesm2022/4sh-ui-kit-forms-ui-file-upload.mjs.map +1 -1
  26. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs +7 -7
  27. package/fesm2022/4sh-ui-kit-forms-ui-input-group.mjs.map +1 -1
  28. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs +5 -5
  29. package/fesm2022/4sh-ui-kit-forms-ui-input-mask.mjs.map +1 -1
  30. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs +5 -5
  31. package/fesm2022/4sh-ui-kit-forms-ui-input-number.mjs.map +1 -1
  32. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs +5 -5
  33. package/fesm2022/4sh-ui-kit-forms-ui-input-otp.mjs.map +1 -1
  34. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs +5 -5
  35. package/fesm2022/4sh-ui-kit-forms-ui-input-tags.mjs.map +1 -1
  36. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs +4 -4
  37. package/fesm2022/4sh-ui-kit-forms-ui-input.mjs.map +1 -1
  38. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs +282 -0
  39. package/fesm2022/4sh-ui-kit-forms-ui-knob.mjs.map +1 -0
  40. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs +4 -4
  41. package/fesm2022/4sh-ui-kit-forms-ui-label.mjs.map +1 -1
  42. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs +4 -4
  43. package/fesm2022/4sh-ui-kit-forms-ui-nudger.mjs.map +1 -1
  44. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs +4 -4
  45. package/fesm2022/4sh-ui-kit-forms-ui-radio.mjs.map +1 -1
  46. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs +4 -4
  47. package/fesm2022/4sh-ui-kit-forms-ui-rating.mjs.map +1 -1
  48. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs +8 -6
  49. package/fesm2022/4sh-ui-kit-forms-ui-segment-control.mjs.map +1 -1
  50. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs +7 -5
  51. package/fesm2022/4sh-ui-kit-forms-ui-select.mjs.map +1 -1
  52. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs +4 -4
  53. package/fesm2022/4sh-ui-kit-forms-ui-slider.mjs.map +1 -1
  54. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs +4 -4
  55. package/fesm2022/4sh-ui-kit-forms-ui-swatch-picker.mjs.map +1 -1
  56. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs +5 -5
  57. package/fesm2022/4sh-ui-kit-forms-ui-textarea.mjs.map +1 -1
  58. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs +215 -0
  59. package/fesm2022/4sh-ui-kit-forms-ui-toggle-block.mjs.map +1 -0
  60. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs +8 -6
  61. package/fesm2022/4sh-ui-kit-forms-ui-toggle-button.mjs.map +1 -1
  62. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs +4 -4
  63. package/fesm2022/4sh-ui-kit-forms-ui-toggle.mjs.map +1 -1
  64. package/fesm2022/4sh-ui-kit-forms.mjs +12 -7
  65. package/fesm2022/4sh-ui-kit-forms.mjs.map +1 -1
  66. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs +13 -13
  67. package/fesm2022/4sh-ui-kit-informative-ui-accordion.mjs.map +1 -1
  68. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs +4 -4
  69. package/fesm2022/4sh-ui-kit-informative-ui-alert.mjs.map +1 -1
  70. package/fesm2022/4sh-ui-kit-informative-ui-avatar-group.mjs +3 -3
  71. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs +4 -4
  72. package/fesm2022/4sh-ui-kit-informative-ui-avatar.mjs.map +1 -1
  73. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs +4 -4
  74. package/fesm2022/4sh-ui-kit-informative-ui-badge.mjs.map +1 -1
  75. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs +4 -4
  76. package/fesm2022/4sh-ui-kit-informative-ui-chip.mjs.map +1 -1
  77. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs +10 -10
  78. package/fesm2022/4sh-ui-kit-informative-ui-empty-state.mjs.map +1 -1
  79. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs +4 -4
  80. package/fesm2022/4sh-ui-kit-informative-ui-helper.mjs.map +1 -1
  81. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs +4 -4
  82. package/fesm2022/4sh-ui-kit-informative-ui-progress-bar.mjs.map +1 -1
  83. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs +4 -4
  84. package/fesm2022/4sh-ui-kit-informative-ui-read-only.mjs.map +1 -1
  85. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs +4 -4
  86. package/fesm2022/4sh-ui-kit-informative-ui-separator.mjs.map +1 -1
  87. package/fesm2022/4sh-ui-kit-informative-ui-skeleton.mjs +3 -3
  88. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs +4 -4
  89. package/fesm2022/4sh-ui-kit-informative-ui-spinner.mjs.map +1 -1
  90. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs +4 -4
  91. package/fesm2022/4sh-ui-kit-informative-ui-tag.mjs.map +1 -1
  92. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs +10 -10
  93. package/fesm2022/4sh-ui-kit-informative-ui-toast.mjs.map +1 -1
  94. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs +45 -26
  95. package/fesm2022/4sh-ui-kit-informative-ui-tooltip.mjs.map +1 -1
  96. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs +629 -0
  97. package/fesm2022/4sh-ui-kit-layout-ui-bottom-sheet.mjs.map +1 -0
  98. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs +16 -16
  99. package/fesm2022/4sh-ui-kit-layout-ui-card.mjs.map +1 -1
  100. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs +4 -4
  101. package/fesm2022/4sh-ui-kit-layout-ui-drawer.mjs.map +1 -1
  102. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs +4 -4
  103. package/fesm2022/4sh-ui-kit-layout-ui-modal.mjs.map +1 -1
  104. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs +4 -4
  105. package/fesm2022/4sh-ui-kit-layout-ui-popover.mjs.map +1 -1
  106. package/fesm2022/4sh-ui-kit-motion.mjs +3 -3
  107. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs +370 -0
  108. package/fesm2022/4sh-ui-kit-navigation-ui-bottom-tab-bar.mjs.map +1 -0
  109. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs +4 -4
  110. package/fesm2022/4sh-ui-kit-navigation-ui-breadcrumb.mjs.map +1 -1
  111. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs +7 -5
  112. package/fesm2022/4sh-ui-kit-navigation-ui-context-menu.mjs.map +1 -1
  113. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs +7 -5
  114. package/fesm2022/4sh-ui-kit-navigation-ui-menu.mjs.map +1 -1
  115. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs +14 -12
  116. package/fesm2022/4sh-ui-kit-navigation-ui-sidebar.mjs.map +1 -1
  117. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs +22 -22
  118. package/fesm2022/4sh-ui-kit-navigation-ui-stepper.mjs.map +1 -1
  119. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs +25 -21
  120. package/fesm2022/4sh-ui-kit-navigation-ui-tabs.mjs.map +1 -1
  121. package/fesm2022/4sh-ui-kit-ripple.mjs +298 -0
  122. package/fesm2022/4sh-ui-kit-ripple.mjs.map +1 -0
  123. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs +7 -5
  124. package/fesm2022/4sh-ui-kit-table-ui-paginator.mjs.map +1 -1
  125. package/fesm2022/4sh-ui-kit-table-ui-table.mjs +34 -34
  126. package/fesm2022/4sh-ui-kit-table-ui-table.mjs.map +1 -1
  127. package/fesm2022/4sh-ui-kit-theming.mjs +6 -6
  128. package/mcp/data/text-search-docs.json +741 -71
  129. package/mcp/data/ui-config.json +25927 -11496
  130. package/mcp/package.json +1 -1
  131. package/package.json +21 -1
  132. package/styles/base/_ripple.scss +53 -0
  133. package/styles/component-vars.scss +1426 -687
  134. package/styles/index.scss +1 -0
  135. package/styles/settings/_ui-config.scss +54 -2
  136. package/styles/utils/_mixins.scss +32 -30
  137. package/styles/utils/_overlay.scss +1 -1
  138. package/styles.css +1 -1
  139. package/types/4sh-ui-kit-actions-ui-button.d.ts +3 -1
  140. package/types/4sh-ui-kit-forms-ui-autocomplete.d.ts +3 -1
  141. package/types/4sh-ui-kit-forms-ui-datepicker.d.ts +59 -2
  142. package/types/4sh-ui-kit-forms-ui-field.d.ts +13 -1
  143. package/types/4sh-ui-kit-forms-ui-file-upload.d.ts +3 -1
  144. package/types/4sh-ui-kit-forms-ui-knob.d.ts +93 -0
  145. package/types/4sh-ui-kit-forms-ui-segment-control.d.ts +3 -1
  146. package/types/4sh-ui-kit-forms-ui-select.d.ts +3 -1
  147. package/types/4sh-ui-kit-forms-ui-toggle-block.d.ts +114 -0
  148. package/types/4sh-ui-kit-forms-ui-toggle-button.d.ts +3 -1
  149. package/types/4sh-ui-kit-forms.d.ts +5 -1
  150. package/types/4sh-ui-kit-informative-ui-tooltip.d.ts +4 -4
  151. package/types/4sh-ui-kit-layout-ui-bottom-sheet.d.ts +256 -0
  152. package/types/4sh-ui-kit-navigation-ui-bottom-tab-bar.d.ts +201 -0
  153. package/types/4sh-ui-kit-navigation-ui-context-menu.d.ts +3 -1
  154. package/types/4sh-ui-kit-navigation-ui-menu.d.ts +3 -1
  155. package/types/4sh-ui-kit-navigation-ui-sidebar.d.ts +3 -1
  156. package/types/4sh-ui-kit-navigation-ui-tabs.d.ts +3 -1
  157. package/types/4sh-ui-kit-ripple.d.ts +156 -0
  158. package/types/4sh-ui-kit-table-ui-paginator.d.ts +3 -1
package/styles/index.scss CHANGED
@@ -25,4 +25,5 @@
25
25
  @use 'base/base';
26
26
  @use 'base/typography';
27
27
  @use 'base/motion';
28
+ @use 'base/ripple';
28
29
  @use 'utils/helpers'; // global utility classes (.text-center, .no-margin…)
@@ -3,8 +3,14 @@
3
3
  //
4
4
  // Three levers, from the broadest to the narrowest: the design token each value
5
5
  // points at, the `--ui-<name>` hook declared here (kit-wide, no recompile), and
6
- // the LOCAL var of a component's .scss. No colors — themable colors are runtime
7
- // design tokens.
6
+ // the LOCAL var of a component's .scss.
7
+ //
8
+ // Colours sit here too, but only the ones a SHARED mixin paints (`_mixins.scss`):
9
+ // the hook has to be named after the category, since the mixin does not know which
10
+ // component included it. The token set is never in the name: one hook per role and
11
+ // state, the palette in force supplying the fallback. The mixin emits the read
12
+ // (`var(--ui-form-field-color, var(--form-high-content-default))`); the constants
13
+ // below are where that contract is declared and documented.
8
14
  //
9
15
  // Components interpolate these values, so a hook added here propagates into
10
16
  // every consumer on its own: `var(--ui-checkbox-box-size, var(--ui-form-control-size,
@@ -32,6 +38,15 @@ $motion-easing-leave: var(--transition-easein); /// Courbe accélérée (d
32
38
  $motion-distance: 0.5rem; /// Distance du glissement des presets `slide`.
33
39
  $motion-scale: 0.96; /// Échelle de départ / d’arrivée des presets `zoom`.
34
40
 
41
+ // --- Global : ripple ---------------------------------------------------
42
+ // Appearance of the press wave (base/_ripple.scss). Not hooked here: the
43
+ // `--ui-ripple-*` custom properties already expose colour, opacity, duration,
44
+ // easing and scale per instance, and they inherit down the cascade.
45
+ $ripple-opacity: 0.34; /// Opacité de départ de l'onde.
46
+ $ripple-duration: var(--transition-slow); /// Durée d'expansion de l'onde.
47
+ $ripple-easing: var(--transition-easeout); /// Courbe de l'onde (décélérée).
48
+ $ripple-scale: 1; /// Échelle finale de l'onde (1 = couvre l'élément).
49
+
35
50
  // --- Global : overlay panels ------------------------------------------
36
51
  // `--ui-overlay-*` (utils/_overlay.scss) retunes ONE panel; these set the default
37
52
  // for all of them.
@@ -40,6 +55,7 @@ $overlay-panel-padding: var(--ui-overlay-panel-padding, var(--units-sm));
40
55
  $overlay-panel-shadow: var(--ui-overlay-panel-shadow, var(--shadow-default-md)); /// Ombre des panneaux flottants.
41
56
  $overlay-panel-stroke-width: $control-stroke-width; /// Épaisseur de bordure des panneaux flottants (suit `--ui-control-stroke-width`).
42
57
  $overlay-panel-offset: var(--ui-overlay-panel-offset, 8px); /// Décalage d'un panneau par rapport à son ancre.
58
+ $overlay-panel-font-family: var(--ui-overlay-panel-font-family, var(--fontfamily-base));/// Famille typographique du contenu des panneaux flottants.
43
59
 
44
60
  // --- Category : forms -------------------------------------------------
45
61
  $form-control-size: var(--ui-form-control-size, var(--size-components-2xs)); /// Côté d'un contrôle carré (case à cocher, radio).
@@ -52,9 +68,45 @@ $form-field-height-small: var(--ui-form-field-height-small, var(--size-component
52
68
  $form-field-radius: var(--ui-form-field-radius, var(--radius-sm)); /// Rayon des coins de la boîte de champ.
53
69
  $form-field-padding-x: var(--ui-form-field-padding-x, var(--units-md)); /// Inset horizontal de la boîte de champ.
54
70
  $form-field-gap: var(--ui-form-field-gap, var(--units-sm)); /// Espace entre le contrôle et ses affixes.
71
+ $form-field-font-family: var(--ui-form-field-font-family, var(--fontfamily-base)); /// Famille typographique du texte saisi dans un champ.
55
72
  $form-field-stroke-width: $control-stroke-width; /// Bordure de la boîte de champ (suit `--ui-control-stroke-width`).
56
73
  $form-field-focus-ring-width: $form-focus-ring-width; /// Anneau de focus de la boîte de champ (suit `--ui-focus-ring-width`).
57
74
 
75
+ // Selection controls (checkbox, radio): palette routed by `form-control-palette`.
76
+ // Interpolated fallback (`--form-#{$palette}-…`), so the shipped default below is the
77
+ // `high` palette; `._invalid` swaps it for `error` under the same hook names.
78
+ $form-control-surface: var(--ui-form-control-surface, var(--form-high-surface-default)); /// Fond d'un contrôle de sélection.
79
+ $form-control-surface-hover: var(--ui-form-control-surface-hover, var(--form-high-surface-hover)); /// Fond d'un contrôle de sélection au survol.
80
+ $form-control-surface-checked: var(--ui-form-control-surface-checked, var(--form-high-surface-checked)); /// Fond d'un contrôle de sélection coché ou indéterminé.
81
+ $form-control-surface-disabled: var(--ui-form-control-surface-disabled, var(--form-high-surface-disabled)); /// Fond d'un contrôle de sélection désactivé.
82
+ $form-control-stroke: var(--ui-form-control-stroke, var(--form-high-stroke-default)); /// Couleur de bordure d'un contrôle de sélection.
83
+ $form-control-stroke-hover: var(--ui-form-control-stroke-hover, var(--form-high-stroke-hover)); /// Couleur de bordure au survol.
84
+ $form-control-stroke-checked: var(--ui-form-control-stroke-checked, var(--form-high-stroke-checked)); /// Couleur de bordure d'un contrôle coché ou indéterminé.
85
+ $form-control-stroke-focus: var(--ui-form-control-stroke-focus, var(--form-high-stroke-focused)); /// Couleur de bordure au focus clavier ; elle teinte aussi l'anneau.
86
+ $form-control-stroke-disabled: var(--ui-form-control-stroke-disabled, var(--form-high-stroke-disabled)); /// Couleur de bordure d'un contrôle désactivé.
87
+ $form-control-marker-color: var(--ui-form-control-marker-color, var(--form-high-content-checked)); /// Couleur du marqueur (coche, point radio).
88
+ $form-control-marker-color-disabled: var(--ui-form-control-marker-color-disabled, var(--form-high-content-disabled)); /// Couleur du marqueur désactivé.
89
+
90
+ // Field parts: painted by the `field-*` mixins, on every box field.
91
+ $form-field-color: var(--ui-form-field-color, var(--form-high-content-default)); /// Couleur du texte saisi dans un champ.
92
+ $form-field-color-disabled: var(--ui-form-field-color-disabled, var(--form-high-content-disabled)); /// Couleur du texte saisi, champ désactivé.
93
+ $form-field-placeholder-color: var(--ui-form-field-placeholder-color, var(--form-low-content-default)); /// Couleur du texte d'invite (placeholder).
94
+ $form-field-affix-color: var(--ui-form-field-affix-color, var(--form-low-content-default)); /// Couleur d'un affixe (icône décorative, unité).
95
+ $form-field-affix-color-disabled: var(--ui-form-field-affix-color-disabled, var(--form-high-content-disabled)); /// Couleur d'un affixe, champ désactivé.
96
+
97
+ $form-field-action-color: var(--ui-form-field-action-color, var(--form-low-content-default)); /// Couleur d'un bouton d'action dans un champ (œil, effacer).
98
+ $form-field-action-color-hover: var(--ui-form-field-action-color-hover, var(--form-high-content-hover)); /// Couleur d'un bouton d'action au survol.
99
+ $form-field-action-color-focus: var(--ui-form-field-action-color-focus, var(--form-high-content-focused)); /// Couleur d'un bouton d'action au focus clavier.
100
+ $form-field-action-color-disabled: var(--ui-form-field-action-color-disabled, var(--form-high-content-disabled)); /// Couleur d'un bouton d'action désactivé.
101
+ $form-field-action-surface-hover: var(--ui-form-field-action-surface-hover, var(--form-high-surface-hover)); /// Fond d'un bouton d'action au survol.
102
+ $form-field-action-surface-focus: var(--ui-form-field-action-surface-focus, var(--form-high-surface-focused)); /// Fond d'un bouton d'action au focus clavier ; c'est lui qui dit quel bouton tient le focus.
103
+
104
+ $form-field-spinner-stroke: var(--ui-form-field-spinner-stroke, var(--form-high-stroke-default)); /// Couleur des séparateurs du compteur (haut/bas).
105
+ $form-field-spinner-color: var(--ui-form-field-spinner-color, var(--form-low-content-default)); /// Couleur des flèches du compteur.
106
+ $form-field-spinner-color-hover: var(--ui-form-field-spinner-color-hover, var(--form-high-content-hover)); /// Couleur des flèches du compteur au survol.
107
+ $form-field-spinner-color-disabled: var(--ui-form-field-spinner-color-disabled, var(--form-high-content-disabled)); /// Couleur des flèches du compteur désactivé.
108
+ $form-field-spinner-surface-hover: var(--ui-form-field-spinner-surface-hover, var(--form-high-surface-hover)); /// Fond d'une flèche du compteur au survol.
109
+
58
110
  // Textarea (multiline field box)
59
111
  $form-textarea-min-height: var(--ui-form-textarea-min-height, var(--size-components-sm)); /// Hauteur minimale d'une boîte multiligne.
60
112
  $form-textarea-min-height-small: var(--ui-form-textarea-min-height-small, var(--size-components-sm)); /// Hauteur minimale d'une boîte multiligne, variante `small`.
@@ -23,31 +23,33 @@
23
23
  /// consumed by selection controls: --_surface, --_stroke, --_content, --_focus-ring
24
24
  /// (+ --ui-label-color). State selectors live here; re-include to swap palette.
25
25
  @mixin form-control-palette($palette, $control: '.ui-form-control-input') {
26
- --_surface: var(--form-#{$palette}-surface-default);
27
- --_stroke: var(--form-#{$palette}-stroke-default);
28
- --_content: var(--form-#{$palette}-content-checked);
26
+ --_surface: var(--ui-form-control-surface, var(--form-#{$palette}-surface-default));
27
+ --_stroke: var(--ui-form-control-stroke, var(--form-#{$palette}-stroke-default));
28
+ --_content: var(--ui-form-control-marker-color, var(--form-#{$palette}-content-checked));
29
29
 
30
30
  &:hover:not(._disabled):not(._readonly) {
31
- --_surface: var(--form-#{$palette}-surface-hover);
32
- --_stroke: var(--form-#{$palette}-stroke-hover);
31
+ --_surface: var(--ui-form-control-surface-hover, var(--form-#{$palette}-surface-hover));
32
+ --_stroke: var(--ui-form-control-stroke-hover, var(--form-#{$palette}-stroke-hover));
33
33
  --ui-label-color: var(--form-#{$palette}-content-hover);
34
34
  }
35
35
 
36
36
  &._checked:not(._disabled),
37
37
  &._indeterminate:not(._disabled) {
38
- --_surface: var(--form-#{$palette}-surface-checked);
39
- --_stroke: var(--form-#{$palette}-stroke-checked);
38
+ --_surface: var(--ui-form-control-surface-checked, var(--form-#{$palette}-surface-checked));
39
+ --_stroke: var(--ui-form-control-stroke-checked, var(--form-#{$palette}-stroke-checked));
40
40
  }
41
41
 
42
42
  &:has(#{$control}:focus-visible) {
43
- --_stroke: var(--form-#{$palette}-stroke-focused);
44
- --_focus-ring: rgb(from var(--form-#{$palette}-stroke-focused) r g b / 50%);
43
+ --_stroke: var(--ui-form-control-stroke-focus, var(--form-#{$palette}-stroke-focused));
44
+ // Derived from the focus border, like `ui-field`'s ring: retuning the stroke
45
+ // carries the halo with it instead of letting the two drift apart.
46
+ --_focus-ring: rgb(from var(--ui-form-control-stroke-focus, var(--form-#{$palette}-stroke-focused)) r g b / 50%);
45
47
  }
46
48
 
47
49
  &._disabled {
48
- --_surface: var(--form-#{$palette}-surface-disabled);
49
- --_stroke: var(--form-#{$palette}-stroke-disabled);
50
- --_content: var(--form-#{$palette}-content-disabled);
50
+ --_surface: var(--ui-form-control-surface-disabled, var(--form-#{$palette}-surface-disabled));
51
+ --_stroke: var(--ui-form-control-stroke-disabled, var(--form-#{$palette}-stroke-disabled));
52
+ --_content: var(--ui-form-control-marker-color-disabled, var(--form-#{$palette}-content-disabled));
51
53
  }
52
54
  }
53
55
 
@@ -102,9 +104,9 @@
102
104
  border-radius: inherit;
103
105
  background: transparent;
104
106
  outline: none;
105
- font-family: var(--fontfamily-base);
107
+ font-family: ui-config.$form-field-font-family;
106
108
  font-size: var(--size-typography-text-default);
107
- color: var(--form-high-content-default);
109
+ color: ui-config.$form-field-color;
108
110
 
109
111
  // `$inset: false` = nested in a wrapper that already carries both insets.
110
112
  @if $inset {
@@ -113,20 +115,20 @@
113
115
  }
114
116
 
115
117
  &::placeholder {
116
- color: var(--form-low-content-default);
118
+ color: ui-config.$form-field-placeholder-color;
117
119
  opacity: 1;
118
120
  }
119
- &:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
121
+ &:disabled { cursor: not-allowed; color: ui-config.$form-field-color-disabled; }
120
122
  }
121
123
 
122
124
  /// Low-emphasis affix (decorative icon, unit text) sitting inside the box.
123
125
  /// Toggle `._disabled` on the element to dim it with the field.
124
126
  @mixin field-affix {
125
127
  flex-shrink: 0;
126
- color: var(--form-low-content-default);
128
+ color: ui-config.$form-field-affix-color;
127
129
  @include field-inset-edges('margin');
128
130
 
129
- &._disabled { color: var(--form-high-content-disabled); }
131
+ &._disabled { color: ui-config.$form-field-affix-color-disabled; }
130
132
  }
131
133
 
132
134
  /// Square, full-height, flush-right action button (password reveal, clear…).
@@ -142,25 +144,25 @@
142
144
  background: none;
143
145
  border-radius: 0 calc(#{ui-config.$form-field-radius} - #{ui-config.$form-field-stroke-width})
144
146
  calc(#{ui-config.$form-field-radius} - #{ui-config.$form-field-stroke-width}) 0;
145
- color: var(--form-low-content-default);
147
+ color: ui-config.$form-field-action-color;
146
148
  cursor: pointer;
147
149
  @include control-transition(color, background-color);
148
150
 
149
151
  // Flush by design: no inset, the box has no padding to cancel.
150
152
 
151
153
  &:hover:not(:disabled) {
152
- color: var(--form-high-content-hover);
153
- background-color: var(--form-high-surface-hover);
154
+ color: ui-config.$form-field-action-color-hover;
155
+ background-color: ui-config.$form-field-action-surface-hover;
154
156
  }
155
157
  // Focus is a surface, never a border: the box already draws the field ring on
156
158
  // `:focus-within`, so an inset stroke here would nest a second outline inside
157
159
  // the field. The fill + `content-focused` say which control holds the focus.
158
160
  &:focus-visible {
159
161
  outline: none;
160
- color: var(--form-high-content-focused);
161
- background-color: var(--form-high-surface-focused);
162
+ color: ui-config.$form-field-action-color-focus;
163
+ background-color: ui-config.$form-field-action-surface-focus;
162
164
  }
163
- &:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
165
+ &:disabled { cursor: not-allowed; color: ui-config.$form-field-action-color-disabled; }
164
166
  }
165
167
 
166
168
  /// Vertical up/down spinner (number stepper), flush right + full height, split
@@ -171,7 +173,7 @@
171
173
  flex-shrink: 0;
172
174
  width: $width;
173
175
  // Flush by design: no inset, the box has no padding to cancel.
174
- border-left: ui-config.$form-field-stroke-width solid var(--form-high-stroke-default);
176
+ border-left: ui-config.$form-field-stroke-width solid ui-config.$form-field-spinner-stroke;
175
177
  border-radius: 0 ui-config.$form-field-radius ui-config.$form-field-radius 0;
176
178
  overflow: hidden;
177
179
 
@@ -185,18 +187,18 @@
185
187
  border: none;
186
188
  background: none;
187
189
  line-height: 0;
188
- color: var(--form-low-content-default);
190
+ color: ui-config.$form-field-spinner-color;
189
191
  cursor: pointer;
190
192
  @include control-transition(color, background-color);
191
193
 
192
194
  &:hover:not(:disabled) {
193
- color: var(--form-high-content-hover);
194
- background-color: var(--form-high-surface-hover);
195
+ color: ui-config.$form-field-spinner-color-hover;
196
+ background-color: ui-config.$form-field-spinner-surface-hover;
195
197
  }
196
- &:disabled { cursor: not-allowed; color: var(--form-high-content-disabled); }
198
+ &:disabled { cursor: not-allowed; color: ui-config.$form-field-spinner-color-disabled; }
197
199
  }
198
200
 
199
201
  #{$btn} + #{$btn} {
200
- border-top: ui-config.$form-field-stroke-width solid var(--form-high-stroke-default);
202
+ border-top: ui-config.$form-field-stroke-width solid ui-config.$form-field-spinner-stroke;
201
203
  }
202
204
  }
@@ -22,5 +22,5 @@
22
22
  border-radius: var(--ui-overlay-radius, #{ui-config.$overlay-panel-radius});
23
23
  background-color: var(--ui-overlay-surface, #{$surface});
24
24
  box-shadow: var(--ui-overlay-shadow, #{ui-config.$overlay-panel-shadow});
25
- font-family: var(--fontfamily-base);
25
+ font-family: ui-config.$overlay-panel-font-family;
26
26
  }