origam 2.17.0 → 2.18.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 (213) hide show
  1. package/CHANGELOG.md +744 -1
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/dark.css +125 -24
  4. package/dist/src/assets/css/tokens/light.css +49 -12
  5. package/dist/src/assets/locales/en.json +21 -6
  6. package/dist/src/assets/locales/fr.json +21 -6
  7. package/dist/src/assets/scss/main.scss +10 -2
  8. package/dist/src/assets/scss/tokens/_dark.scss +2846 -12
  9. package/dist/src/assets/scss/tokens/_light.scss +49 -12
  10. package/dist/src/components/Alert/OrigamAlert.vue +6 -6
  11. package/dist/src/components/Avatar/OrigamAvatar.vue +15 -2
  12. package/dist/src/components/Badge/OrigamBadge.vue +7 -7
  13. package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +23 -4
  14. package/dist/src/components/Btn/OrigamBtn.vue +21 -3
  15. package/dist/src/components/Btn/OrigamBtnGroup.vue +1 -1
  16. package/dist/src/components/Calendar/OrigamCalendar.vue +1 -1
  17. package/dist/src/components/Card/OrigamCard.vue +2 -0
  18. package/dist/src/components/Card/OrigamCardHeader.vue +7 -7
  19. package/dist/src/components/Carousel/OrigamCarousel.vue +14 -1
  20. package/dist/src/components/Chart/OrigamChartBoxPlot.vue +1 -1
  21. package/dist/src/components/Chart/OrigamChartBullet.vue +3 -2
  22. package/dist/src/components/Chart/OrigamChartCandlestick.vue +2 -2
  23. package/dist/src/components/Chart/OrigamChartCartesian.vue +49 -4
  24. package/dist/src/components/Chart/OrigamChartLegend.vue +39 -18
  25. package/dist/src/components/Chart/OrigamChartPareto.vue +7 -1
  26. package/dist/src/components/Chart/OrigamChartPictorial.vue +2 -2
  27. package/dist/src/components/Chart/OrigamChartRadar.vue +3 -1
  28. package/dist/src/components/Chart/OrigamChartSparkline.vue +3 -1
  29. package/dist/src/components/Chart/OrigamChartStreamgraph.vue +2 -1
  30. package/dist/src/components/Checkbox/OrigamCheckbox.vue +2 -0
  31. package/dist/src/components/Checkbox/OrigamCheckboxGroup.vue +36 -11
  32. package/dist/src/components/Chip/OrigamChip.vue +19 -4
  33. package/dist/src/components/Code/OrigamCode.vue +20 -3
  34. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +43 -18
  35. package/dist/src/components/CommandPalette/OrigamCommandPalette.vue +3 -3
  36. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +6 -6
  37. package/dist/src/components/ContextualMenu/OrigamContextualMenu.vue +0 -4
  38. package/dist/src/components/DataList/OrigamDataList.vue +2 -0
  39. package/dist/src/components/DataList/OrigamDataText.vue +6 -6
  40. package/dist/src/components/DataList/OrigamDataTitle.vue +6 -6
  41. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +1 -1
  42. package/dist/src/components/DataTable/OrigamDataTableHeadersCell.vue +4 -1
  43. package/dist/src/components/DatePicker/OrigamDatePicker.vue +2 -0
  44. package/dist/src/components/DatePicker/OrigamDatePickerHeader.vue +6 -6
  45. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +34 -14
  46. package/dist/src/components/Dialog/OrigamDialog.vue +25 -0
  47. package/dist/src/components/Dialog/OrigamDialogConfirmation.vue +6 -0
  48. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +2 -0
  49. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +6 -6
  50. package/dist/src/components/Field/OrigamField.vue +83 -28
  51. package/dist/src/components/FileField/OrigamFileField.vue +20 -15
  52. package/dist/src/components/Icon/OrigamSvgIcon.vue +3 -1
  53. package/dist/src/components/Img/OrigamImg.vue +9 -2
  54. package/dist/src/components/InfiniteScroll/OrigamInfiniteScroll.vue +34 -18
  55. package/dist/src/components/InlineEdit/OrigamInlineEdit.vue +46 -5
  56. package/dist/src/components/Input/OrigamInput.vue +6 -6
  57. package/dist/src/components/List/OrigamListGroup.vue +4 -0
  58. package/dist/src/components/List/OrigamListItem.vue +68 -4
  59. package/dist/src/components/Masonry/OrigamMasonry.vue +19 -3
  60. package/dist/src/components/Menu/OrigamMenu.vue +79 -9
  61. package/dist/src/components/NumberField/OrigamNumberField.vue +26 -16
  62. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +48 -24
  63. package/dist/src/components/PasswordField/OrigamPasswordField.vue +20 -15
  64. package/dist/src/components/Radio/OrigamRadio.vue +2 -0
  65. package/dist/src/components/Radio/OrigamRadioGroup.vue +36 -11
  66. package/dist/src/components/RatingField/OrigamRatingField.vue +58 -7
  67. package/dist/src/components/RatingField/OrigamRatingFieldItem.vue +78 -30
  68. package/dist/src/components/Select/OrigamSelect.vue +57 -34
  69. package/dist/src/components/SliderField/OrigamSliderField.vue +20 -10
  70. package/dist/src/components/Snackbar/OrigamSnackbarGroup.vue +1 -1
  71. package/dist/src/components/Switch/OrigamSwitch.vue +2 -0
  72. package/dist/src/components/Switch/OrigamSwitchTrack.vue +20 -0
  73. package/dist/src/components/Tabs/OrigamTab.vue +7 -4
  74. package/dist/src/components/Tabs/OrigamTabPanel.vue +4 -2
  75. package/dist/src/components/Tabs/OrigamTabs.vue +7 -5
  76. package/dist/src/components/TextField/OrigamTextField.vue +20 -15
  77. package/dist/src/components/TextareaField/OrigamTextareaField.vue +20 -15
  78. package/dist/src/components/Transition/OrigamExpandX.vue +19 -3
  79. package/dist/src/components/Transition/OrigamExpandY.vue +19 -3
  80. package/dist/src/components/Transition/OrigamTranslateScale.vue +26 -4
  81. package/dist/src/components/Video/OrigamVideo.vue +3 -2
  82. package/dist/src/components/VirtualScroll/OrigamVirtualScroll.vue +1 -1
  83. package/dist/src/components/Window/OrigamWindow.vue +20 -3
  84. package/dist/src/composables/Commons/accessibleCommand.composable.cjs +26 -0
  85. package/dist/src/composables/Commons/accessibleCommand.composable.d.ts +78 -0
  86. package/dist/src/composables/Commons/accessibleCommand.composable.js +20 -0
  87. package/dist/src/composables/Commons/activator.composable.cjs +10 -1
  88. package/dist/src/composables/Commons/activator.composable.js +11 -2
  89. package/dist/src/composables/Commons/adjacent.composable.cjs +17 -0
  90. package/dist/src/composables/Commons/adjacent.composable.d.ts +12 -0
  91. package/dist/src/composables/Commons/adjacent.composable.js +17 -0
  92. package/dist/src/composables/Commons/adjacentInner.composable.cjs +20 -0
  93. package/dist/src/composables/Commons/adjacentInner.composable.d.ts +24 -5
  94. package/dist/src/composables/Commons/adjacentInner.composable.js +20 -0
  95. package/dist/src/composables/Commons/audio.composable.cjs +14 -1
  96. package/dist/src/composables/Commons/audio.composable.js +14 -1
  97. package/dist/src/composables/Commons/backButton.composable.cjs +3 -1
  98. package/dist/src/composables/Commons/backButton.composable.js +3 -1
  99. package/dist/src/composables/Commons/border.composable.d.ts +13 -0
  100. package/dist/src/composables/Commons/colorEffect.composable.cjs +58 -46
  101. package/dist/src/composables/Commons/colorEffect.composable.d.ts +10 -5
  102. package/dist/src/composables/Commons/colorEffect.composable.js +70 -46
  103. package/dist/src/composables/Commons/createLayout.composable.cjs +21 -12
  104. package/dist/src/composables/Commons/createLayout.composable.js +21 -12
  105. package/dist/src/composables/Commons/delay.composable.d.ts +16 -0
  106. package/dist/src/composables/Commons/dimension.composable.d.ts +11 -0
  107. package/dist/src/composables/Commons/elevation.composable.cjs +6 -2
  108. package/dist/src/composables/Commons/elevation.composable.d.ts +37 -1
  109. package/dist/src/composables/Commons/elevation.composable.js +7 -2
  110. package/dist/src/composables/Commons/goTo.composable.cjs +4 -2
  111. package/dist/src/composables/Commons/goTo.composable.js +5 -3
  112. package/dist/src/composables/Commons/group.composable.cjs +14 -14
  113. package/dist/src/composables/Commons/group.composable.js +14 -14
  114. package/dist/src/composables/Commons/hotkey.composable.d.ts +18 -7
  115. package/dist/src/composables/Commons/hydration.composable.d.ts +8 -0
  116. package/dist/src/composables/Commons/link.composable.d.ts +20 -0
  117. package/dist/src/composables/Commons/locationStrategies.composable.d.ts +17 -0
  118. package/dist/src/composables/Commons/message.composable.d.ts +19 -5
  119. package/dist/src/composables/Commons/position.composable.d.ts +17 -6
  120. package/dist/src/composables/Commons/refs.composable.d.ts +11 -5
  121. package/dist/src/composables/Commons/rounded.composable.d.ts +11 -1
  122. package/dist/src/composables/Commons/scrolling.composable.cjs +15 -12
  123. package/dist/src/composables/Commons/scrolling.composable.js +15 -12
  124. package/dist/src/composables/Commons/size.composable.d.ts +15 -0
  125. package/dist/src/composables/Commons/ssrBoot.composable.cjs +9 -1
  126. package/dist/src/composables/Commons/ssrBoot.composable.js +10 -2
  127. package/dist/src/composables/Commons/stack.composable.cjs +13 -1
  128. package/dist/src/composables/Commons/stack.composable.js +13 -1
  129. package/dist/src/composables/Commons/theme-props-resolver.composable.cjs +41 -32
  130. package/dist/src/composables/Commons/theme-props-resolver.composable.js +41 -32
  131. package/dist/src/composables/Commons/validation.composable.cjs +3 -3
  132. package/dist/src/composables/Commons/validation.composable.js +3 -3
  133. package/dist/src/composables/Commons/virtual.composable.cjs +24 -8
  134. package/dist/src/composables/Commons/virtual.composable.js +24 -8
  135. package/dist/src/composables/Masonry/masonry.composable.cjs +18 -11
  136. package/dist/src/composables/Masonry/masonry.composable.js +18 -11
  137. package/dist/src/composables/Parallax/parallax.composable.cjs +1 -1
  138. package/dist/src/composables/Parallax/parallax.composable.js +1 -1
  139. package/dist/src/composables/index.cjs +36 -0
  140. package/dist/src/composables/index.d.ts +3 -0
  141. package/dist/src/composables/index.js +3 -0
  142. package/dist/src/consts/Chart/chart-cartesian.const.cjs +5 -2
  143. package/dist/src/consts/Chart/chart-cartesian.const.d.ts +42 -0
  144. package/dist/src/consts/Chart/chart-cartesian.const.js +3 -0
  145. package/dist/src/consts/Commons/border.const.cjs +2 -1
  146. package/dist/src/consts/Commons/border.const.d.ts +19 -0
  147. package/dist/src/consts/Commons/border.const.js +15 -0
  148. package/dist/src/consts/Commons/elevation.const.cjs +5 -1
  149. package/dist/src/consts/Commons/elevation.const.d.ts +52 -2
  150. package/dist/src/consts/Commons/elevation.const.js +4 -0
  151. package/dist/src/consts/Commons/ripple.const.cjs +13 -3
  152. package/dist/src/consts/Commons/ripple.const.js +13 -3
  153. package/dist/src/consts/RatingField/rating-field.const.cjs +10 -0
  154. package/dist/src/consts/RatingField/rating-field.const.d.ts +36 -0
  155. package/dist/src/consts/RatingField/rating-field.const.js +12 -0
  156. package/dist/src/consts/index.cjs +11 -0
  157. package/dist/src/consts/index.d.ts +1 -0
  158. package/dist/src/consts/index.js +1 -0
  159. package/dist/src/directives/ClickOutside/clickOutside.directive.cjs +2 -0
  160. package/dist/src/directives/ClickOutside/clickOutside.directive.js +2 -0
  161. package/dist/src/directives/Ripple/ripple.directive.cjs +2 -0
  162. package/dist/src/directives/Ripple/ripple.directive.js +2 -0
  163. package/dist/src/enums/Commons/color.enum.cjs +0 -1
  164. package/dist/src/enums/Commons/color.enum.d.ts +14 -5
  165. package/dist/src/enums/Commons/color.enum.js +0 -1
  166. package/dist/src/enums/Sheet/sheet.enum.d.ts +1 -1
  167. package/dist/src/interfaces/Chart/chart-cartesian.interface.d.ts +6 -2
  168. package/dist/src/interfaces/Commons/activator.interface.d.ts +3 -2
  169. package/dist/src/interfaces/Commons/adjacent.interface.d.ts +29 -0
  170. package/dist/src/interfaces/Commons/group.interface.d.ts +13 -2
  171. package/dist/src/interfaces/Commons/ripple.interface.d.ts +16 -0
  172. package/dist/src/interfaces/Commons/scroll.interface.d.ts +3 -2
  173. package/dist/src/interfaces/DataTable/data-table-header.interface.d.ts +2 -2
  174. package/dist/src/interfaces/DatePicker/date-picker-month.interface.d.ts +2 -1
  175. package/dist/src/interfaces/Field/field.interface.d.ts +21 -1
  176. package/dist/src/interfaces/Menu/menu.interface.d.ts +28 -1
  177. package/dist/src/interfaces/OtpInputField/otp-input-field.interface.d.ts +21 -1
  178. package/dist/src/interfaces/RatingField/rating-field-item.interface.d.ts +16 -1
  179. package/dist/src/interfaces/index.cjs +11 -0
  180. package/dist/src/interfaces/index.d.ts +1 -0
  181. package/dist/src/interfaces/index.js +1 -0
  182. package/dist/src/themes/origam.theme.cjs +8 -14
  183. package/dist/src/themes/origam.theme.js +6 -8
  184. package/dist/src/types/Commons/color.type.d.ts +4 -3
  185. package/dist/src/types/Commons/commons.type.d.ts +33 -0
  186. package/dist/src/types/Commons/theme.type.d.ts +2 -1
  187. package/dist/src/types/Sheet/sheet.type.d.ts +2 -1
  188. package/dist/src/types/index.cjs +22 -0
  189. package/dist/src/types/index.d.ts +2 -0
  190. package/dist/src/types/index.js +2 -0
  191. package/dist/src/types/tokens.type.d.ts +1 -1
  192. package/dist/src/utils/Commons/a11y.util.cjs +35 -0
  193. package/dist/src/utils/Commons/a11y.util.d.ts +63 -0
  194. package/dist/src/utils/Commons/a11y.util.js +33 -0
  195. package/dist/src/utils/Commons/clickOutside.util.cjs +5 -1
  196. package/dist/src/utils/Commons/clickOutside.util.js +5 -1
  197. package/dist/src/utils/Commons/color.util.cjs +10 -5
  198. package/dist/src/utils/Commons/color.util.d.ts +34 -5
  199. package/dist/src/utils/Commons/color.util.js +9 -5
  200. package/dist/src/utils/Commons/goTo.util.cjs +31 -14
  201. package/dist/src/utils/Commons/goTo.util.d.ts +1 -1
  202. package/dist/src/utils/Commons/goTo.util.js +31 -16
  203. package/dist/src/utils/Commons/location.util.cjs +18 -3
  204. package/dist/src/utils/Commons/location.util.js +18 -3
  205. package/dist/src/utils/Commons/ripple.util.cjs +5 -1
  206. package/dist/src/utils/Commons/ripple.util.js +5 -1
  207. package/dist/src/utils/index.cjs +11 -0
  208. package/dist/src/utils/index.d.ts +1 -0
  209. package/dist/src/utils/index.js +1 -0
  210. package/package.json +13 -2
  211. package/dist/src/types/Commons/locale.type.cjs +0 -1
  212. package/dist/src/types/Commons/locale.type.d.ts +0 -0
  213. package/dist/src/types/Commons/locale.type.js +0 -0
@@ -53,6 +53,19 @@ import { TDirectionBoth } from '../../types/Commons/anchor.type';
53
53
  * variables.
54
54
  *
55
55
  * @description
56
+ * ⛔ LA FORME TABLEAU (`:border="['top', 'bottom']"`) N'EST QU'A MOITIE
57
+ * IMPLEMENTEE. Elle est portee par le type du parametre `Ref` et traversee
58
+ * par `borderClasses`, mais `borderStyles` ne la teste nulle part : ni
59
+ * `isUtilityBorder`, ni `isDirectionBorder`, ni `typeof === 'string'`, ni
60
+ * `typeof === 'number'` ne matchent un tableau. Mesure —
61
+ * `useBorder({border: ['top','bottom']})` rend
62
+ * `classes: ['{name}--border', '{name}--border-top,bottom']` et
63
+ * `styles: []` : la classe est interpolee depuis le tableau, donc porte la
64
+ * VIRGULE du `Array.prototype.toString`, et aucune feuille ne la declare.
65
+ * Aucune largeur n'est emise. Documente ici, non corrige : voir le lot de
66
+ * doc #600.
67
+ *
68
+ * @description
56
69
  * WHEN #514 IS SETTLED, THIS INLINE PATH IS THE THING TO REMOVE. If the DS
57
70
  * adopts `@layer` (measured in `packages/tests/e2e/btn-cascade-layer-probe.spec.ts`),
58
71
  * the utility wins on its own and these `styles.push` calls become dead.
@@ -7,6 +7,60 @@ exports.useColorEffect = useColorEffect;
7
7
  var _vue = require("vue");
8
8
  var _color = require("../../utils/Commons/color.util.cjs");
9
9
  var _gradient = require("../../utils/Commons/gradient.util.cjs");
10
+ function trackReactiveDependency(_value) {}
11
+ function resolveBackground(bgColorValue, bgRole) {
12
+ if (bgColorValue && (0, _gradient.isGradient)(bgColorValue)) {
13
+ const grad = (0, _gradient.resolveGradient)(bgColorValue);
14
+ if (grad) return [`background-image: ${grad}`, null, true];
15
+ return [null, null, false];
16
+ }
17
+ if (bgColorValue && (0, _color.isIntent)(bgColorValue)) {
18
+ const m = (0, _color.tokenStylesForIntent)(bgColorValue, bgRole);
19
+ return [`background-color: ${m["background-color"]}`, (0, _color.tokenStylesForIntent)(bgColorValue, "default").color, false];
20
+ }
21
+ if (bgColorValue === "transparent") {
22
+ return [`background-color: ${(0, _color.rawBgExprWithState)("transparent", bgRole)}`, null, false];
23
+ }
24
+ if (bgColorValue && typeof bgColorValue === "string" && (0, _color.isCssColor)(bgColorValue)) {
25
+ (0, _color.warnLegacyColor)("bgColor", bgColorValue);
26
+ return [`background-color: ${(0, _color.rawBgExprWithState)(bgColorValue, bgRole)}`, null, false];
27
+ }
28
+ return [null, null, false];
29
+ }
30
+ function isSameIntentOnBothAxes(colorValue, bgColorValue, bgIntentFg) {
31
+ return Boolean(bgIntentFg && bgColorValue && (0, _color.isIntent)(bgColorValue) && colorValue === bgColorValue);
32
+ }
33
+ function resolveAutoContrastForeground(bgColorValue, bgIntentFg, bgIsGradient) {
34
+ if (bgIsGradient) return null;
35
+ if (bgIntentFg) return `color: ${bgIntentFg}`;
36
+ if (bgColorValue && typeof bgColorValue === "string" && bgColorValue !== "transparent" && (0, _color.isParsableColor)(bgColorValue)) {
37
+ const parsed = (0, _color.parseColor)(bgColorValue);
38
+ if (parsed.a == null || parsed.a === 1) return `color: ${(0, _color.getForeground)(parsed)}`;
39
+ }
40
+ return null;
41
+ }
42
+ function resolveForeground(colorValue, bgColorValue, bgIntentFg, bgIsGradient) {
43
+ if (colorValue && (0, _gradient.isGradient)(colorValue)) {
44
+ const grad = (0, _gradient.resolveGradient)(colorValue);
45
+ if (grad) return ["color: transparent", `background-image: ${grad}`, true];
46
+ return [null, null, false];
47
+ }
48
+ if (colorValue && (0, _color.isIntent)(colorValue)) {
49
+ if (isSameIntentOnBothAxes(colorValue, bgColorValue, bgIntentFg)) {
50
+ return [`color: ${bgIntentFg}`, null, false];
51
+ }
52
+ return [`color: ${(0, _color.tokenForegroundForIntent)(colorValue)}`, null, false];
53
+ }
54
+ if (colorValue && typeof colorValue === "string" && (0, _color.isCssColor)(colorValue)) {
55
+ if (colorValue !== "transparent") (0, _color.warnLegacyColor)("color", colorValue);
56
+ return [`color: ${colorValue}`, null, false];
57
+ }
58
+ if (!colorValue) {
59
+ const autoFg = resolveAutoContrastForeground(bgColorValue, bgIntentFg, bgIsGradient);
60
+ if (autoFg) return [autoFg, null, false];
61
+ }
62
+ return [null, null, false];
63
+ }
10
64
  function useColorEffect(props, isHover = (0, _vue.ref)(false), isActive = (0, _vue.ref)(false), isDisabled = (0, _vue.ref)(false)) {
11
65
  const color = (0, _vue.computed)(() => props.color);
12
66
  const bgColor = (0, _vue.computed)(() => props.bgColor);
@@ -24,53 +78,11 @@ function useColorEffect(props, isHover = (0, _vue.ref)(false), isActive = (0, _v
24
78
  return classes;
25
79
  });
26
80
  const colorStyles = (0, _vue.computed)(() => {
27
- void isDisabled.value;
81
+ trackReactiveDependency(isDisabled.value);
28
82
  const bgRole = isHover.value ? "hover" : isActive.value ? "active" : "default";
29
- let bgDecl = null;
30
- let fgDecl = null;
31
- let bgIntentFg = null;
32
- let bgIsGradient = false;
33
- let clipText = false;
34
- if (bgColor.value && (0, _gradient.isGradient)(bgColor.value)) {
35
- const grad = (0, _gradient.resolveGradient)(bgColor.value);
36
- if (grad) {
37
- bgDecl = `background-image: ${grad}`;
38
- bgIsGradient = true;
39
- }
40
- } else if (bgColor.value && (0, _color.isIntent)(bgColor.value)) {
41
- const m = (0, _color.tokenStylesForIntent)(bgColor.value, bgRole);
42
- bgDecl = `background-color: ${m["background-color"]}`;
43
- bgIntentFg = (0, _color.tokenStylesForIntent)(bgColor.value, "default").color;
44
- } else if (bgColor.value === "transparent") {
45
- bgDecl = `background-color: ${(0, _color.rawBgExprWithState)("transparent", bgRole)}`;
46
- } else if (bgColor.value && typeof bgColor.value === "string" && (0, _color.isCssColor)(bgColor.value)) {
47
- (0, _color.warnLegacyColor)("bgColor", bgColor.value);
48
- bgDecl = `background-color: ${(0, _color.rawBgExprWithState)(bgColor.value, bgRole)}`;
49
- }
50
- if (color.value && (0, _gradient.isGradient)(color.value)) {
51
- const grad = (0, _gradient.resolveGradient)(color.value);
52
- if (grad) {
53
- fgDecl = "color: transparent";
54
- bgDecl = `background-image: ${grad}`;
55
- clipText = true;
56
- }
57
- } else if (color.value && (0, _color.isIntent)(color.value)) {
58
- if (bgIntentFg && bgColor.value && (0, _color.isIntent)(bgColor.value) && color.value === bgColor.value) {
59
- fgDecl = `color: ${bgIntentFg}`;
60
- } else {
61
- fgDecl = `color: ${(0, _color.tokenForegroundForIntent)(color.value)}`;
62
- }
63
- } else if (color.value && typeof color.value === "string" && (0, _color.isCssColor)(color.value)) {
64
- if (color.value !== "transparent") (0, _color.warnLegacyColor)("color", color.value);
65
- fgDecl = `color: ${color.value}`;
66
- } else if (!color.value && bgIntentFg && !bgIsGradient) {
67
- fgDecl = `color: ${bgIntentFg}`;
68
- } else if (!color.value && !bgIsGradient && bgColor.value && typeof bgColor.value === "string" && bgColor.value !== "transparent" && (0, _color.isParsableColor)(bgColor.value)) {
69
- const parsed = (0, _color.parseColor)(bgColor.value);
70
- if (parsed.a == null || parsed.a === 1) {
71
- fgDecl = `color: ${(0, _color.getForeground)(parsed)}`;
72
- }
73
- }
83
+ const [bgDeclBase, bgIntentFg, bgIsGradient] = resolveBackground(bgColor.value, bgRole);
84
+ const [fgDecl, bgDeclOverride, clipText] = resolveForeground(color.value, bgColor.value, bgIntentFg, bgIsGradient);
85
+ const bgDecl = bgDeclOverride ?? bgDeclBase;
74
86
  const styles = [];
75
87
  if (bgDecl) styles.push(bgDecl);
76
88
  if (fgDecl) styles.push(fgDecl);
@@ -1,5 +1,6 @@
1
1
  import type { ComputedRef, Ref } from 'vue';
2
2
  import type { IBgColorProps, IColorProps } from '../../interfaces/Commons/color.interface';
3
+ import type { TColor } from '../../types/Commons/color.type';
3
4
  /*********************************************************
4
5
  * useColorEffect
5
6
  *
@@ -11,9 +12,13 @@ import type { IBgColorProps, IColorProps } from '../../interfaces/Commons/color.
11
12
  * legacy static resolver, not a variant of it — kept in its own file
12
13
  * rather than forced to share a base.
13
14
  *
14
- * Returns the same shape as before — `{ colorStyles, color, bgColor }` —
15
- * so existing callers (`OrigamAudio`, `OrigamVideo`) keep working
16
- * without changes.
15
+ * Returns `{ colorClasses, colorStyles, color, bgColor }`. `color` and
16
+ * `bgColor` are pass-through computeds over the raw props, not resolved
17
+ * declarations. The two real callers are `OrigamAudio` and `OrigamVideo`.
18
+ *
19
+ * `colorClasses` is EMPTY as soon as `isHover` / `isActive` / `isDisabled`
20
+ * is true: utility classes are static, and the resolved token is no longer
21
+ * the resting one `.origam--bg-{intent}` names.
17
22
  *
18
23
  * `colorStyles` is an array of CSS declarations like
19
24
  * `'background-color: …'`, either pointing to a token
@@ -34,6 +39,6 @@ import type { IBgColorProps, IColorProps } from '../../interfaces/Commons/color.
34
39
  export declare function useColorEffect(props: IColorProps & IBgColorProps, isHover?: Ref<boolean> | ComputedRef<boolean>, isActive?: Ref<boolean> | ComputedRef<boolean>, isDisabled?: Ref<boolean> | ComputedRef<boolean>): {
35
40
  colorClasses: ComputedRef<string[]>;
36
41
  colorStyles: ComputedRef<string[]>;
37
- color: ComputedRef<import("../../types").TColor>;
38
- bgColor: ComputedRef<import("../../types").TColor>;
42
+ color: ComputedRef<TColor>;
43
+ bgColor: ComputedRef<TColor>;
39
44
  };
@@ -12,6 +12,67 @@ import {
12
12
  warnLegacyColor
13
13
  } from "../../utils/Commons/color.util.js";
14
14
  import { isGradient, resolveGradient } from "../../utils/Commons/gradient.util.js";
15
+ function trackReactiveDependency(_value) {
16
+ }
17
+ function resolveBackground(bgColorValue, bgRole) {
18
+ if (bgColorValue && isGradient(bgColorValue)) {
19
+ const grad = resolveGradient(bgColorValue);
20
+ if (grad) return [`background-image: ${grad}`, null, true];
21
+ return [null, null, false];
22
+ }
23
+ if (bgColorValue && isIntent(bgColorValue)) {
24
+ const m = tokenStylesForIntent(bgColorValue, bgRole);
25
+ return [
26
+ `background-color: ${m["background-color"]}`,
27
+ tokenStylesForIntent(bgColorValue, "default").color,
28
+ false
29
+ ];
30
+ }
31
+ if (bgColorValue === "transparent") {
32
+ return [`background-color: ${rawBgExprWithState("transparent", bgRole)}`, null, false];
33
+ }
34
+ if (bgColorValue && typeof bgColorValue === "string" && isCssColor(bgColorValue)) {
35
+ warnLegacyColor("bgColor", bgColorValue);
36
+ return [`background-color: ${rawBgExprWithState(bgColorValue, bgRole)}`, null, false];
37
+ }
38
+ return [null, null, false];
39
+ }
40
+ function isSameIntentOnBothAxes(colorValue, bgColorValue, bgIntentFg) {
41
+ return Boolean(
42
+ bgIntentFg && bgColorValue && isIntent(bgColorValue) && colorValue === bgColorValue
43
+ );
44
+ }
45
+ function resolveAutoContrastForeground(bgColorValue, bgIntentFg, bgIsGradient) {
46
+ if (bgIsGradient) return null;
47
+ if (bgIntentFg) return `color: ${bgIntentFg}`;
48
+ if (bgColorValue && typeof bgColorValue === "string" && bgColorValue !== "transparent" && isParsableColor(bgColorValue)) {
49
+ const parsed = parseColor(bgColorValue);
50
+ if (parsed.a == null || parsed.a === 1) return `color: ${getForeground(parsed)}`;
51
+ }
52
+ return null;
53
+ }
54
+ function resolveForeground(colorValue, bgColorValue, bgIntentFg, bgIsGradient) {
55
+ if (colorValue && isGradient(colorValue)) {
56
+ const grad = resolveGradient(colorValue);
57
+ if (grad) return ["color: transparent", `background-image: ${grad}`, true];
58
+ return [null, null, false];
59
+ }
60
+ if (colorValue && isIntent(colorValue)) {
61
+ if (isSameIntentOnBothAxes(colorValue, bgColorValue, bgIntentFg)) {
62
+ return [`color: ${bgIntentFg}`, null, false];
63
+ }
64
+ return [`color: ${tokenForegroundForIntent(colorValue)}`, null, false];
65
+ }
66
+ if (colorValue && typeof colorValue === "string" && isCssColor(colorValue)) {
67
+ if (colorValue !== "transparent") warnLegacyColor("color", colorValue);
68
+ return [`color: ${colorValue}`, null, false];
69
+ }
70
+ if (!colorValue) {
71
+ const autoFg = resolveAutoContrastForeground(bgColorValue, bgIntentFg, bgIsGradient);
72
+ if (autoFg) return [autoFg, null, false];
73
+ }
74
+ return [null, null, false];
75
+ }
15
76
  export function useColorEffect(props, isHover = ref(false), isActive = ref(false), isDisabled = ref(false)) {
16
77
  const color = computed(() => props.color);
17
78
  const bgColor = computed(() => props.bgColor);
@@ -30,53 +91,16 @@ export function useColorEffect(props, isHover = ref(false), isActive = ref(false
30
91
  return classes;
31
92
  });
32
93
  const colorStyles = computed(() => {
33
- void isDisabled.value;
94
+ trackReactiveDependency(isDisabled.value);
34
95
  const bgRole = isHover.value ? "hover" : isActive.value ? "active" : "default";
35
- let bgDecl = null;
36
- let fgDecl = null;
37
- let bgIntentFg = null;
38
- let bgIsGradient = false;
39
- let clipText = false;
40
- if (bgColor.value && isGradient(bgColor.value)) {
41
- const grad = resolveGradient(bgColor.value);
42
- if (grad) {
43
- bgDecl = `background-image: ${grad}`;
44
- bgIsGradient = true;
45
- }
46
- } else if (bgColor.value && isIntent(bgColor.value)) {
47
- const m = tokenStylesForIntent(bgColor.value, bgRole);
48
- bgDecl = `background-color: ${m["background-color"]}`;
49
- bgIntentFg = tokenStylesForIntent(bgColor.value, "default").color;
50
- } else if (bgColor.value === "transparent") {
51
- bgDecl = `background-color: ${rawBgExprWithState("transparent", bgRole)}`;
52
- } else if (bgColor.value && typeof bgColor.value === "string" && isCssColor(bgColor.value)) {
53
- warnLegacyColor("bgColor", bgColor.value);
54
- bgDecl = `background-color: ${rawBgExprWithState(bgColor.value, bgRole)}`;
55
- }
56
- if (color.value && isGradient(color.value)) {
57
- const grad = resolveGradient(color.value);
58
- if (grad) {
59
- fgDecl = "color: transparent";
60
- bgDecl = `background-image: ${grad}`;
61
- clipText = true;
62
- }
63
- } else if (color.value && isIntent(color.value)) {
64
- if (bgIntentFg && bgColor.value && isIntent(bgColor.value) && color.value === bgColor.value) {
65
- fgDecl = `color: ${bgIntentFg}`;
66
- } else {
67
- fgDecl = `color: ${tokenForegroundForIntent(color.value)}`;
68
- }
69
- } else if (color.value && typeof color.value === "string" && isCssColor(color.value)) {
70
- if (color.value !== "transparent") warnLegacyColor("color", color.value);
71
- fgDecl = `color: ${color.value}`;
72
- } else if (!color.value && bgIntentFg && !bgIsGradient) {
73
- fgDecl = `color: ${bgIntentFg}`;
74
- } else if (!color.value && !bgIsGradient && bgColor.value && typeof bgColor.value === "string" && bgColor.value !== "transparent" && isParsableColor(bgColor.value)) {
75
- const parsed = parseColor(bgColor.value);
76
- if (parsed.a == null || parsed.a === 1) {
77
- fgDecl = `color: ${getForeground(parsed)}`;
78
- }
79
- }
96
+ const [bgDeclBase, bgIntentFg, bgIsGradient] = resolveBackground(bgColor.value, bgRole);
97
+ const [fgDecl, bgDeclOverride, clipText] = resolveForeground(
98
+ color.value,
99
+ bgColor.value,
100
+ bgIntentFg,
101
+ bgIsGradient
102
+ );
103
+ const bgDecl = bgDeclOverride ?? bgDeclBase;
80
104
  const styles = [];
81
105
  if (bgDecl) styles.push(bgDecl);
82
106
  if (fgDecl) styles.push(fgDecl);
@@ -141,19 +141,33 @@ function useCreateLayout(props) {
141
141
  if (instanceIndex > -1) registered.value.splice(instanceIndex, 0, id);else registered.value.push(id);
142
142
  const index = (0, _vue.computed)(() => items.value.findIndex(i => i.id === id));
143
143
  const zIndex = (0, _vue.computed)(() => rootZIndex.value + layers.value.length * _layout.LAYOUT_ITEM_ZINDEX_STEP - index.value * _layout.LAYOUT_ITEM_ZINDEX_STEP);
144
- const layoutItemStyles = (0, _vue.computed)(() => {
145
- const isHorizontal = position.value === "left" || position.value === "right";
146
- const isOppositeHorizontal = position.value === "right";
147
- const isOppositeVertical = position.value === "bottom";
148
- const styles = {
144
+ const isHorizontalPosition = () => position.value === "left" || position.value === "right";
145
+ const baseItemStyles = () => {
146
+ const isOpposite = position.value === "right" || position.value === "bottom";
147
+ return {
149
148
  [position.value]: 0,
150
149
  "z-index": zIndex.value,
151
- "transform": `translate${isHorizontal ? "X" : "Y"}(${(active.value ? 0 : _layout.LAYOUT_ITEM_HIDDEN_OFFSET) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}%)`,
150
+ "transform": `translate${isHorizontalPosition() ? "X" : "Y"}(${(active.value ? 0 : _layout.LAYOUT_ITEM_HIDDEN_OFFSET) * (isOpposite ? -1 : 1)}%)`,
152
151
  "position": absolute.value || rootZIndex.value !== _layout.ROOT_ZINDEX ? "absolute" : "fixed",
153
152
  ...(transitionsEnabled.value ? void 0 : {
154
153
  "transition": "none"
155
154
  })
156
155
  };
156
+ };
157
+ const itemOffsetStyles = item => {
158
+ const isHorizontal = isHorizontalPosition();
159
+ const isOppositeHorizontal = position.value === "right";
160
+ return {
161
+ "height": isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.top)} - ${(0, _commons.convertToUnit)(item.bottom)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0,
162
+ left: isOppositeHorizontal ? void 0 : (0, _commons.convertToUnit)(item.left),
163
+ right: isOppositeHorizontal ? (0, _commons.convertToUnit)(item.right) : void 0,
164
+ top: position.value !== "bottom" ? (0, _commons.convertToUnit)(item.top) : void 0,
165
+ bottom: position.value !== "top" ? (0, _commons.convertToUnit)(item.bottom) : void 0,
166
+ "width": !isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.left)} - ${(0, _commons.convertToUnit)(item.right)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0
167
+ };
168
+ };
169
+ const layoutItemStyles = (0, _vue.computed)(() => {
170
+ const styles = baseItemStyles();
157
171
  if (!isMounted.value) return styles;
158
172
  const item = items.value[index.value];
159
173
  if (!item) return styles;
@@ -163,12 +177,7 @@ function useCreateLayout(props) {
163
177
  }
164
178
  return {
165
179
  ...styles,
166
- "height": isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.top)} - ${(0, _commons.convertToUnit)(item.bottom)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0,
167
- left: isOppositeHorizontal ? void 0 : (0, _commons.convertToUnit)(item.left),
168
- right: isOppositeHorizontal ? (0, _commons.convertToUnit)(item.right) : void 0,
169
- top: position.value !== "bottom" ? (0, _commons.convertToUnit)(item.top) : void 0,
170
- bottom: position.value !== "top" ? (0, _commons.convertToUnit)(item.bottom) : void 0,
171
- "width": !isHorizontal ? `calc(100% - ${(0, _commons.convertToUnit)(item.left)} - ${(0, _commons.convertToUnit)(item.right)})` : elementSize.value ? `${(0, _commons.convertToUnit)(elementSize.value)}` : void 0
180
+ ...itemOffsetStyles(item)
172
181
  };
173
182
  });
174
183
  const layoutItemScrimStyles = (0, _vue.computed)(() => ({
@@ -136,17 +136,31 @@ export function useCreateLayout(props) {
136
136
  else registered.value.push(id);
137
137
  const index = computed(() => items.value.findIndex((i) => i.id === id));
138
138
  const zIndex = computed(() => rootZIndex.value + layers.value.length * LAYOUT_ITEM_ZINDEX_STEP - index.value * LAYOUT_ITEM_ZINDEX_STEP);
139
- const layoutItemStyles = computed(() => {
140
- const isHorizontal = position.value === "left" || position.value === "right";
141
- const isOppositeHorizontal = position.value === "right";
142
- const isOppositeVertical = position.value === "bottom";
143
- const styles = {
139
+ const isHorizontalPosition = () => position.value === "left" || position.value === "right";
140
+ const baseItemStyles = () => {
141
+ const isOpposite = position.value === "right" || position.value === "bottom";
142
+ return {
144
143
  [position.value]: 0,
145
144
  "z-index": zIndex.value,
146
- "transform": `translate${isHorizontal ? "X" : "Y"}(${(active.value ? 0 : LAYOUT_ITEM_HIDDEN_OFFSET) * (isOppositeHorizontal || isOppositeVertical ? -1 : 1)}%)`,
145
+ "transform": `translate${isHorizontalPosition() ? "X" : "Y"}(${(active.value ? 0 : LAYOUT_ITEM_HIDDEN_OFFSET) * (isOpposite ? -1 : 1)}%)`,
147
146
  "position": absolute.value || rootZIndex.value !== ROOT_ZINDEX ? "absolute" : "fixed",
148
147
  ...transitionsEnabled.value ? void 0 : { "transition": "none" }
149
148
  };
149
+ };
150
+ const itemOffsetStyles = (item) => {
151
+ const isHorizontal = isHorizontalPosition();
152
+ const isOppositeHorizontal = position.value === "right";
153
+ return {
154
+ "height": isHorizontal ? `calc(100% - ${convertToUnit(item.top)} - ${convertToUnit(item.bottom)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0,
155
+ left: isOppositeHorizontal ? void 0 : convertToUnit(item.left),
156
+ right: isOppositeHorizontal ? convertToUnit(item.right) : void 0,
157
+ top: position.value !== "bottom" ? convertToUnit(item.top) : void 0,
158
+ bottom: position.value !== "top" ? convertToUnit(item.bottom) : void 0,
159
+ "width": !isHorizontal ? `calc(100% - ${convertToUnit(item.left)} - ${convertToUnit(item.right)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0
160
+ };
161
+ };
162
+ const layoutItemStyles = computed(() => {
163
+ const styles = baseItemStyles();
150
164
  if (!isMounted.value) return styles;
151
165
  const item = items.value[index.value];
152
166
  if (!item) return styles;
@@ -156,12 +170,7 @@ export function useCreateLayout(props) {
156
170
  }
157
171
  return {
158
172
  ...styles,
159
- "height": isHorizontal ? `calc(100% - ${convertToUnit(item.top)} - ${convertToUnit(item.bottom)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0,
160
- left: isOppositeHorizontal ? void 0 : convertToUnit(item.left),
161
- right: isOppositeHorizontal ? convertToUnit(item.right) : void 0,
162
- top: position.value !== "bottom" ? convertToUnit(item.top) : void 0,
163
- bottom: position.value !== "top" ? convertToUnit(item.bottom) : void 0,
164
- "width": !isHorizontal ? `calc(100% - ${convertToUnit(item.left)} - ${convertToUnit(item.right)})` : elementSize.value ? `${convertToUnit(elementSize.value)}` : void 0
173
+ ...itemOffsetStyles(item)
165
174
  };
166
175
  });
167
176
  const layoutItemScrimStyles = computed(() => ({
@@ -14,6 +14,22 @@ import type { IDelayProps } from '../../interfaces/Commons/delay.interface';
14
14
  * (`cancelRef.current()`) avant d'en programmer un nouveau — un
15
15
  * enter/leave rapide (survol qui repasse) ne declenche donc jamais les
16
16
  * deux callbacks empiles, seul le dernier delai programme aboutit.
17
+ *
18
+ * @description
19
+ * ⛔ `0` et « absent » ne se comportent PAS pareil, parce que `defer` teste
20
+ * `timeout === 0` : avec `openDelay: 0`, `cb` est appele SYNCHRONEMENT
21
+ * pendant `runOpenDelay()` et le « canceller » rendu est un no-op — donc
22
+ * `clearDelay()` ne peut plus rien annuler. Avec la prop ABSENTE,
23
+ * `Number(undefined)` vaut `NaN`, le test `=== 0` echoue et on passe par
24
+ * `setTimeout(cb, NaN)`, que le navigateur traite comme 0 ms : le callback
25
+ * part au tick suivant, et reste annulable. Mesure : delai 0 → callback vu
26
+ * avant le retour de `runOpenDelay()` ; delai absent → rien a 0 ms, vu
27
+ * apres 1 ms.
28
+ *
29
+ * @description
30
+ * Aucun nettoyage automatique n'est enregistre : un delai arme juste avant
31
+ * le demontage n'est pas annule par ce composable. `useActivator`, son seul
32
+ * consommateur, ne l'annule pas non plus a la destruction du scope.
17
33
  ********************************************************/
18
34
  export declare function useDelay(props: IDelayProps, cb?: (value: boolean) => void): {
19
35
  clearDelay: () => void;
@@ -16,6 +16,17 @@ import type { IDimensionProps } from '../../interfaces/Commons/dimension.interfa
16
16
  * inline, jamais de classe utilitaire — c'est le composable de reference a
17
17
  * `extends`-er (cf. CLAUDE.md racine) plutot que de parser `height`/`width`
18
18
  * a la main dans un nouveau composant.
19
+ *
20
+ * @description
21
+ * ⛔ La garde d'emission est `if (props[dimension])` — une garde de
22
+ * VERACITE, pas un test de presence. Toute valeur falsy est donc omise
23
+ * SILENCIEUSEMENT, y compris celles que `convertToUnit` sait pourtant
24
+ * traduire : mesure — `height={0}` n'emet RIEN (alors que
25
+ * `convertToUnit(0)` rend `"0px"`), et `height={NaN}` non plus. Pour une
26
+ * dimension nulle, passer la chaine `"0px"`. Symetriquement, `Infinity`
27
+ * est truthy et traverse la garde : `convertToUnit` rend `undefined` et la
28
+ * declaration emise est la chaine `"height: undefined"` — invalide, donc
29
+ * ignoree par le navigateur.
19
30
  ********************************************************/
20
31
  export declare function useDimension(props: IDimensionProps): {
21
32
  dimensionStyles: import("vue").ComputedRef<string[]>;
@@ -19,6 +19,10 @@ function isOrigamRung(value) {
19
19
  function isUtilityRung(value) {
20
20
  return typeof value === "string" && _elevation.UTILITY_SHADOW_RUNGS.has(value);
21
21
  }
22
+ function shadowVar(rung) {
23
+ const fallback = _elevation.SHADOW_RUNG_FALLBACK[rung];
24
+ return `var(${_elevation.SHADOW_TOKEN_PREFIX}${rung}${fallback ? `, ${fallback}` : ""})`;
25
+ }
22
26
  const _bgWarned = /* @__PURE__ */new WeakSet();
23
27
  function warnBgColorUsage(bgColor) {
24
28
  if (typeof console === "undefined" || !bgColor) return;
@@ -56,7 +60,7 @@ function useElevation(props, flat = (0, _vue.ref)(false), bgColor = (0, _vue.ref
56
60
  const styles = [];
57
61
  if (elevation == null || flat.value) return styles;
58
62
  if (isOrigamRung(elevation)) {
59
- styles.push(`box-shadow: var(${_elevation.SHADOW_TOKEN_PREFIX}${elevation})`);
63
+ styles.push(`box-shadow: ${shadowVar(elevation)}`);
60
64
  return styles;
61
65
  }
62
66
  if (typeof elevation === "string" && (0, _elevation2.isCustomBoxShadow)(elevation)) {
@@ -66,7 +70,7 @@ function useElevation(props, flat = (0, _vue.ref)(false), bgColor = (0, _vue.ref
66
70
  const numeric = typeof elevation === "string" ? parseInt(elevation, 10) : elevation;
67
71
  if (Number.isNaN(numeric)) return styles;
68
72
  const tokenName = elevationToToken(numeric);
69
- styles.push(`box-shadow: var(${_elevation.SHADOW_TOKEN_PREFIX}${tokenName})`);
73
+ styles.push(`box-shadow: ${shadowVar(tokenName)}`);
70
74
  return styles;
71
75
  });
72
76
  return {
@@ -15,10 +15,46 @@ import { TElevation } from '../../types/Commons/elevation.type';
15
15
  * jamais l'un a la place de l'autre (strategie A, cf. CLAUDE.md racine).
16
16
  *
17
17
  * @description
18
+ * ⚠️ `2xl` et `3xl` RENDENT COMME `xl` — #813, corrige par un repli.
19
+ * `ORIGAM_SHADOW_RUNGS` declare huit echelons, les feuilles n'en declarent
20
+ * que six : `--origam-shadow---2xl` et `---3xl` n'existent dans aucune
21
+ * feuille du DS. On emettait la reference NUE, et un `var()` non resolu
22
+ * rend la declaration invalide AU COMPUTED-VALUE TIME : la propriete
23
+ * calcule `unset`, et `box-shadow` n'etant pas heritee, cela vaut `none`.
24
+ * La declaration gagnait pourtant la cascade : elle ne cedait donc pas la
25
+ * place a la regle scopee du composant, elle l'EFFACAIT. Mesure Chromium —
26
+ * regle du composant seule `rgba(0,0,0,.9) 0px 1px 2px 0px`, avec
27
+ * `elevation="2xl"` : `none`.
28
+ *
29
+ * @description
30
+ * Ces deux echelons passent desormais par `SHADOW_RUNG_FALLBACK`, comme
31
+ * `useRounded` le fait depuis toujours via `UTILITY_RADIUS_FALLBACK` — ce
32
+ * qui explique que le canal `rounded` n'ait jamais eu ce defaut. ⚠️ Ils
33
+ * rendent donc EXACTEMENT comme `xl` : ils cessent d'effacer, ils ne
34
+ * deviennent pas deux echelons de plus. Declarer de vrais tokens est une
35
+ * decision de DESIGN — `xl` est deja le sommet de l'echelle Material 0..24
36
+ * que ce composable mappe (`MATERIAL_ELEVATION_TOP_RUNG`), il n'y a aucun
37
+ * echelon au-dessus a emprunter. Le jour ou ces tokens existeront, le repli
38
+ * deviendra inerte tout seul.
39
+ *
40
+ * @description
41
+ * ⛔ Le garde `token-var-channels` ne voit toujours RIEN de tout ceci : la
42
+ * reference est concatenee en TypeScript, pas ecrite dans une feuille.
43
+ * C'est l'angle mort structurel suivi par #823 — 90 references `var()`
44
+ * emises depuis du TS, aucune couverte par un garde.
45
+ *
46
+ * @description
18
47
  * `bgColor` est accepte pour compatibilite mais IGNORE (n'affecte plus
19
48
  * ni `elevationClasses` ni `elevationStyles`) — passer une valeur autre
20
49
  * que `ELEVATION_LEGACY_BG_COLOR` declenche un `console.warn` de
21
- * depreciation une seule fois via `warnBgColorUsage`. La detection du
50
+ * depreciation. ⚠️ Cette banniere annoncait « une seule fois » : faux.
51
+ * Mesure — trois appels a `useElevation` avec un `bgColor` non defaut
52
+ * produisent TROIS avertissements. La deduplication de `warnBgColorUsage`
53
+ * est inerte : elle interroge un `WeakSet` avec un objet litteral
54
+ * reconstruit a chaque appel, donc `has()` rend toujours `false`. L'appel
55
+ * etant fait dans le corps de `useElevation` et non dans un `computed`,
56
+ * le plafond reste d'un avertissement par MONTAGE de composant, pas par
57
+ * rendu. La detection du
22
58
  * `box-shadow` custom passe AVANT le `parseInt` de secours : sans cet
23
59
  * ordre, `parseInt('0 4px 12px rgba(0,0,0,.24)', 10)` lirait `0` (chiffre
24
60
  * de tete) et resoudrait silencieusement vers l'echelon `none`, perdant
@@ -6,6 +6,7 @@ import {
6
6
  MATERIAL_ELEVATION_LADDER,
7
7
  MATERIAL_ELEVATION_TOP_RUNG,
8
8
  ORIGAM_SHADOW_RUNGS,
9
+ SHADOW_RUNG_FALLBACK,
9
10
  SHADOW_TOKEN_PREFIX,
10
11
  SHADOW_UTILITY_CLASS_PREFIX,
11
12
  UTILITY_SHADOW_RUNGS
@@ -21,6 +22,10 @@ function isOrigamRung(value) {
21
22
  function isUtilityRung(value) {
22
23
  return typeof value === "string" && UTILITY_SHADOW_RUNGS.has(value);
23
24
  }
25
+ function shadowVar(rung) {
26
+ const fallback = SHADOW_RUNG_FALLBACK[rung];
27
+ return `var(${SHADOW_TOKEN_PREFIX}${rung}${fallback ? `, ${fallback}` : ""})`;
28
+ }
24
29
  const _bgWarned = /* @__PURE__ */ new WeakSet();
25
30
  function warnBgColorUsage(bgColor) {
26
31
  if (typeof console === "undefined" || !bgColor) return;
@@ -56,7 +61,7 @@ export function useElevation(props, flat = ref(false), bgColor = ref(ELEVATION_L
56
61
  const styles = [];
57
62
  if (elevation == null || flat.value) return styles;
58
63
  if (isOrigamRung(elevation)) {
59
- styles.push(`box-shadow: var(${SHADOW_TOKEN_PREFIX}${elevation})`);
64
+ styles.push(`box-shadow: ${shadowVar(elevation)}`);
60
65
  return styles;
61
66
  }
62
67
  if (typeof elevation === "string" && isCustomBoxShadow(elevation)) {
@@ -66,7 +71,7 @@ export function useElevation(props, flat = ref(false), bgColor = ref(ELEVATION_L
66
71
  const numeric = typeof elevation === "string" ? parseInt(elevation, 10) : elevation;
67
72
  if (Number.isNaN(numeric)) return styles;
68
73
  const tokenName = elevationToToken(numeric);
69
- styles.push(`box-shadow: var(${SHADOW_TOKEN_PREFIX}${tokenName})`);
74
+ styles.push(`box-shadow: ${shadowVar(tokenName)}`);
70
75
  return styles;
71
76
  });
72
77
  return { elevationClasses, elevationStyles };
@@ -26,11 +26,13 @@ function useGoTo(_options = {}) {
26
26
  ...goToInstance,
27
27
  rtl: (0, _vue.computed)(() => goToInstance.rtl.value || isRtl.value)
28
28
  };
29
+ const controller = new AbortController();
30
+ (0, _commons.tryOnScopeDispose)(() => controller.abort());
29
31
  async function go(target, options) {
30
- return (0, _goTo2.scrollTo)(target, (0, _commons.mergeDeep)(_options, options), false, goTo);
32
+ return (0, _goTo2.scrollTo)(target, (0, _commons.mergeDeep)(_options, options), false, goTo, controller.signal);
31
33
  }
32
34
  go.horizontal = async (target, options) => {
33
- return (0, _goTo2.scrollTo)(target, (0, _commons.mergeDeep)(_options, options), true, goTo);
35
+ return (0, _goTo2.scrollTo)(target, (0, _commons.mergeDeep)(_options, options), true, goTo, controller.signal);
34
36
  };
35
37
  return go;
36
38
  }
@@ -1,7 +1,7 @@
1
1
  import { computed, inject } from "vue";
2
2
  import { useRtl } from "./rtl.composable.js";
3
3
  import { ORIGAM_GO_TO_KEY } from "../../consts/Commons/goTo.const.js";
4
- import { mergeDeep } from "../../utils/Commons/commons.util.js";
4
+ import { mergeDeep, tryOnScopeDispose } from "../../utils/Commons/commons.util.js";
5
5
  import { genDefaults, scrollTo } from "../../utils/Commons/goTo.util.js";
6
6
  export function createGoTo(options, locale) {
7
7
  return {
@@ -17,11 +17,13 @@ export function useGoTo(_options = {}) {
17
17
  ...goToInstance,
18
18
  rtl: computed(() => goToInstance.rtl.value || isRtl.value)
19
19
  };
20
+ const controller = new AbortController();
21
+ tryOnScopeDispose(() => controller.abort());
20
22
  async function go(target, options) {
21
- return scrollTo(target, mergeDeep(_options, options), false, goTo);
23
+ return scrollTo(target, mergeDeep(_options, options), false, goTo, controller.signal);
22
24
  }
23
25
  go.horizontal = async (target, options) => {
24
- return scrollTo(target, mergeDeep(_options, options), true, goTo);
26
+ return scrollTo(target, mergeDeep(_options, options), true, goTo, controller.signal);
25
27
  };
26
28
  return go;
27
29
  }
@@ -75,21 +75,21 @@ function useGroup(props, injectKey) {
75
75
  if (props.multiple) (0, _console.consoleWarn)('This method is not supported when using "multiple" prop');
76
76
  if (!selected.value.length) {
77
77
  const item = items.find(item2 => !item2.disabled);
78
- if (item) {
79
- selected.value = [item.id];
80
- }
81
- } else {
82
- const currentId = selected.value[0];
83
- const currentIndex = items.findIndex(i => i.id === currentId);
84
- let newIndex = (currentIndex + offset) % items.length;
85
- let newItem = items[newIndex];
86
- while (newItem.disabled && newIndex !== currentIndex) {
87
- newIndex = (newIndex + offset) % items.length;
88
- newItem = items[newIndex];
89
- }
90
- if (newItem.disabled) return;
91
- selected.value = [items[newIndex].id];
78
+ if (!item) return void 0;
79
+ selected.value = [item.id];
80
+ return item.id;
81
+ }
82
+ const currentId = selected.value[0];
83
+ const currentIndex = items.findIndex(i => i.id === currentId);
84
+ let newIndex = (currentIndex + offset) % items.length;
85
+ let newItem = items[newIndex];
86
+ while (newItem.disabled && newIndex !== currentIndex) {
87
+ newIndex = (newIndex + offset) % items.length;
88
+ newItem = items[newIndex];
92
89
  }
90
+ if (newItem.disabled) return void 0;
91
+ selected.value = [items[newIndex].id];
92
+ return items[newIndex].id;
93
93
  };
94
94
  const state = {
95
95
  register,