origam 2.43.0 → 2.44.1

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 (76) hide show
  1. package/CHANGELOG.md +116 -0
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/dark-pinned.css +5 -1
  4. package/dist/src/assets/css/tokens/dark-system.css +5 -1
  5. package/dist/src/assets/css/tokens/dark.css +10 -2
  6. package/dist/src/assets/css/tokens/light.css +5 -1
  7. package/dist/src/assets/locales/en.json +3 -0
  8. package/dist/src/assets/locales/fr.json +3 -0
  9. package/dist/src/assets/scss/tokens/_dark.scss +10 -2
  10. package/dist/src/assets/scss/tokens/_light.scss +5 -1
  11. package/dist/src/components/Audio/OrigamAudio.vue +1 -1
  12. package/dist/src/components/Btn/OrigamBtn.vue +31 -10
  13. package/dist/src/components/Chart/OrigamChartRadar.vue +1 -1
  14. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +3 -5
  15. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +0 -1
  16. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +3 -1
  17. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +20 -2
  18. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +1 -1
  19. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +3 -5
  20. package/dist/src/components/Drawer/OrigamDrawer.vue +65 -3
  21. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +6 -4
  22. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +1 -1
  23. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +1 -1
  24. package/dist/src/components/Field/OrigamField.vue +17 -7
  25. package/dist/src/components/FileField/OrigamFileField.vue +3 -3
  26. package/dist/src/components/Form/OrigamForm.vue +0 -1
  27. package/dist/src/components/Input/OrigamInput.vue +0 -1
  28. package/dist/src/components/List/OrigamListChildren.vue +1 -1
  29. package/dist/src/components/Messages/OrigamMessages.vue +1 -1
  30. package/dist/src/components/NumberField/OrigamNumberField.vue +13 -5
  31. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +8 -5
  32. package/dist/src/components/PasswordField/OrigamPasswordField.vue +3 -3
  33. package/dist/src/components/Select/OrigamSelect.vue +22 -5
  34. package/dist/src/components/Stepper/OrigamStepper.vue +22 -1
  35. package/dist/src/components/Stepper/OrigamStepperItem.vue +46 -21
  36. package/dist/src/components/TextField/OrigamTextField.vue +3 -3
  37. package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -3
  38. package/dist/src/components/Toolbar/OrigamToolbar.vue +1 -1
  39. package/dist/src/components/Video/OrigamVideo.vue +1 -1
  40. package/dist/src/composables/Commons/adjacentInner.composable.cjs +17 -3
  41. package/dist/src/composables/Commons/adjacentInner.composable.d.ts +5 -3
  42. package/dist/src/composables/Commons/adjacentInner.composable.js +18 -4
  43. package/dist/src/composables/Commons/link.composable.cjs +6 -5
  44. package/dist/src/composables/Commons/link.composable.js +6 -5
  45. package/dist/src/composables/Commons/popup-dialog-aria.composable.cjs +26 -0
  46. package/dist/src/composables/Commons/popup-dialog-aria.composable.d.ts +23 -0
  47. package/dist/src/composables/Commons/popup-dialog-aria.composable.js +17 -0
  48. package/dist/src/composables/Commons/stack.composable.cjs +2 -19
  49. package/dist/src/composables/Commons/stack.composable.d.ts +1 -1
  50. package/dist/src/composables/Commons/stack.composable.js +3 -20
  51. package/dist/src/composables/Commons/style.composable.cjs +3 -2
  52. package/dist/src/composables/Commons/style.composable.js +3 -2
  53. package/dist/src/composables/index.cjs +12 -0
  54. package/dist/src/composables/index.d.ts +1 -0
  55. package/dist/src/composables/index.js +1 -0
  56. package/dist/src/consts/Commons/style.const.cjs +9 -0
  57. package/dist/src/consts/Commons/style.const.d.ts +26 -0
  58. package/dist/src/consts/Commons/style.const.js +3 -0
  59. package/dist/src/consts/index.cjs +11 -0
  60. package/dist/src/consts/index.d.ts +1 -0
  61. package/dist/src/consts/index.js +1 -0
  62. package/dist/src/directives/Contrast/contrast.directive.cjs +5 -1
  63. package/dist/src/directives/Contrast/contrast.directive.js +5 -1
  64. package/dist/src/interfaces/ExpansionPanel/expansion-panel.interface.d.ts +1 -0
  65. package/dist/src/interfaces/Stepper/stepper-item.interface.d.ts +11 -2
  66. package/dist/src/interfaces/Stepper/stepper.interface.d.ts +7 -0
  67. package/dist/src/themes/origam.theme.cjs +0 -2
  68. package/dist/src/themes/origam.theme.js +2 -2
  69. package/dist/src/types/tokens.type.d.ts +1 -1
  70. package/dist/src/utils/Commons/style.util.cjs +30 -0
  71. package/dist/src/utils/Commons/style.util.d.ts +18 -0
  72. package/dist/src/utils/Commons/style.util.js +23 -0
  73. package/dist/src/utils/index.cjs +11 -0
  74. package/dist/src/utils/index.d.ts +1 -0
  75. package/dist/src/utils/index.js +1 -0
  76. package/package.json +1 -1
@@ -978,7 +978,8 @@ const labelProps = computed(() => {
978
978
  const defaultLabelProps = origamLabelRef.value?.filterProps(props, [
979
979
  "text",
980
980
  "class",
981
- "style"
981
+ "style",
982
+ "id"
982
983
  ]);
983
984
  return {
984
985
  class: ["origam-field__label"],
@@ -1015,7 +1016,8 @@ const floatingLabelProps = computed(() => {
1015
1016
  const defaultFloatingLabelProps = origamFloatingLabelRef.value?.filterProps(props, [
1016
1017
  "text",
1017
1018
  "class",
1018
- "style"
1019
+ "style",
1020
+ "id"
1019
1021
  ]);
1020
1022
  return {
1021
1023
  class: ["origam-field__label", "origam-field__label--floating"],
@@ -1152,7 +1154,7 @@ onMounted(() => {
1152
1154
  const duration = parseFloat(style.transitionDuration) * 1e3 || 150;
1153
1155
  const scale = parseFloat(targetStyle.getPropertyValue("--origam-field__label---font-size"));
1154
1156
  const color = targetStyle.getPropertyValue("color");
1155
- el.style.visibility = "visible";
1157
+ el.style.clipPath = "none";
1156
1158
  targetEl.style.visibility = "hidden";
1157
1159
  animate(el, {
1158
1160
  transform: `translate(${x}px, ${y}px) scale(${scale})`,
@@ -1163,7 +1165,7 @@ onMounted(() => {
1163
1165
  easing: EASING.STANDARD,
1164
1166
  direction: newVal ? "normal" : "reverse"
1165
1167
  }).finished.then(() => {
1166
- el.style.removeProperty("visibility");
1168
+ el.style.removeProperty("clip-path");
1167
1169
  targetEl.style.removeProperty("visibility");
1168
1170
  });
1169
1171
  });
@@ -1499,7 +1501,7 @@ defineExpose({
1499
1501
  * lecteur — et le lot ne peut pas le verifier sur les trois
1500
1502
  * composants sans changer de perimetre.
1501
1503
  */
1502
- min-height: max(calc(var(--origam-input__control---height, 36px) + var(--origam-input---density, 0px)), 1.5rem + var(--origam-field__input---padding-top) + var(--origam-field__input---padding-bottom));
1504
+ min-height: max(calc(var(--origam-input__control---height, 36px) + var(--origam-input---density, 0px)), calc(1rem * var(--origam-input---line-height, 1.5)) + var(--origam-field__input---padding-top) + var(--origam-field__input---padding-bottom));
1503
1505
  min-width: 0;
1504
1506
  padding-inline: var(--origam-field__input---padding-start) var(--origam-field__input---padding-end);
1505
1507
  padding-top: var(--origam-field__input---padding-top);
@@ -1532,6 +1534,8 @@ defineExpose({
1532
1534
  textarea {
1533
1535
  letter-spacing: inherit;
1534
1536
  border: none;
1537
+ // #1280 — remet a zero le padding UA (1px 2px) : le texte demarre au retrait du champ.
1538
+ padding: 0;
1535
1539
 
1536
1540
  &::placeholder {
1537
1541
  color: var(--origam-field---placeholder-color, currentColor);
@@ -1558,7 +1562,7 @@ defineExpose({
1558
1562
  opacity: 0;
1559
1563
  transition: inherit;
1560
1564
  white-space: nowrap;
1561
- min-height: max(var(--origam-input__control---height, 36px), 1.5rem + var(--origam-field__input---padding-top, 0px) + var(--origam-field__input---padding-bottom, 0px));
1565
+ min-height: max(var(--origam-input__control---height, 36px), calc(1rem * var(--origam-input---line-height, 1.5)) + var(--origam-field__input---padding-top, 0px) + var(--origam-field__input---padding-bottom, 0px));
1562
1566
  padding-top: calc(var(--origam-field---padding-top, 4px) + calc(var(--origam-input---padding-top, 16px) + var(--origam-input---density, 0px)));
1563
1567
  padding-bottom: var(--origam-field---padding-bottom, 6px);
1564
1568
  }
@@ -1721,11 +1725,17 @@ defineExpose({
1721
1725
  }
1722
1726
 
1723
1727
  &--active {
1728
+ /*
1729
+ * Le label d'origine reste visible pour les technologies d'assistance
1730
+ * (axe ne lit que le PREMIER label[for] : `visibility: hidden` y vidait
1731
+ * le nom accessible, #1149) ; il est seulement rogne visuellement.
1732
+ */
1724
1733
  #{$this}__label {
1725
- visibility: hidden;
1734
+ clip-path: inset(50%);
1726
1735
 
1727
1736
  &--floating {
1728
1737
  visibility: unset;
1738
+ clip-path: none;
1729
1739
  }
1730
1740
  }
1731
1741
 
@@ -153,8 +153,8 @@
153
153
  @click="handleControlClick"
154
154
  @mousedown="handleControlMousedown"
155
155
  @click:clear="handleClear"
156
- @click:prepend-inner="handleClickPrependInner"
157
- @click:append-inner="handleClickAppendInner"
156
+ @click:prepend-inner="prependInnerRelay"
157
+ @click:append-inner="appendInnerRelay"
158
158
  >
159
159
  <template
160
160
  v-if="slots.loader"
@@ -1321,7 +1321,7 @@ const model = useVModel(props, "modelValue", () => props.multiple ? [] : null, (
1321
1321
  * Composables
1322
1322
  ********************************************************/
1323
1323
  const { onClickPrepend, onClickAppend: handleClickAppend } = useAdjacent(props, toRef(props, "prependIcon"), toRef(props, "appendIcon"));
1324
- const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
1324
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1325
1325
  /*********************************************************
1326
1326
  * Reference Html
1327
1327
  *
@@ -29,7 +29,6 @@
29
29
  >
30
30
  <origam-messages
31
31
  :id="messagesId"
32
- :active="hasMessages"
33
32
  :messages="messages"
34
33
  >
35
34
  <template
@@ -73,7 +73,6 @@
73
73
  >
74
74
  <origam-messages
75
75
  :id="messagesId"
76
- :active="hasMessages"
77
76
  :messages="messages"
78
77
  >
79
78
  <template
@@ -123,7 +123,7 @@ const listItems = computed(() => {
123
123
  * cablees a un comportement invente. Elles avertissent une fois, en
124
124
  * dev, avec la raison exacte. Meme traitement que la famille Chart.
125
125
  ********************************************************/
126
- useUnsupportedProp("OrigamListChildren", "returnObject", "this renderer emits nothing — selection payload shape is decided by `<origam-list>` upstream.", () => props.returnObject !== undefined);
126
+ useUnsupportedProp("OrigamListChildren", "returnObject", "this renderer emits nothing — selection payload shape is decided by `<origam-list>` upstream.", () => props.returnObject === true);
127
127
  /*********************************************************
128
128
  * Slots
129
129
  ********************************************************/
@@ -595,7 +595,7 @@ const { typographyStyles: rootTypographyStyles } = useTypography(props, "message
595
595
  * cablees a un comportement invente. Elles avertissent une fois, en
596
596
  * dev, avec la raison exacte. Meme traitement que la famille Chart.
597
597
  ********************************************************/
598
- useUnsupportedProp("OrigamMessages", "active", "visibility is driven by `messages` being non-empty, never by this prop.", () => props.active !== undefined);
598
+ useUnsupportedProp("OrigamMessages", "active", "visibility is driven by `messages` being non-empty, never by this prop.", () => props.active === true);
599
599
  const { typographyStyles: childTypographyStyles } = useTypography(props, "messages__message");
600
600
  /*********************************************************
601
601
  * Composables
@@ -85,8 +85,8 @@
85
85
  @click:clear="handleClear"
86
86
  @click:prepend="handleClickPrepend"
87
87
  @click:append="handleClickAppend"
88
- @click:prepend-inner="handleClickPrependInner"
89
- @click:append-inner="handleClickAppendInner"
88
+ @click:prepend-inner="prependInnerRelay"
89
+ @click:append-inner="appendInnerRelay"
90
90
  >
91
91
  <template
92
92
  v-if="slots.prepend"
@@ -113,11 +113,11 @@
113
113
  </template>
114
114
 
115
115
  <template
116
- v-if="!hideControls || slots.prependInner"
116
+ v-if="hasPrependControls || slots.prependInner"
117
117
  #prependInner
118
118
  >
119
119
  <div
120
- v-if="!hideControls"
120
+ v-if="hasPrependControls"
121
121
  class="origam-number-field__control"
122
122
  >
123
123
  <template v-if="split">
@@ -1222,7 +1222,7 @@ const { isFocused, onFocus, onBlur } = useFocus(props);
1222
1222
  /*********************************************************
1223
1223
  * Composables
1224
1224
  ********************************************************/
1225
- const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
1225
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1226
1226
  /*********************************************************
1227
1227
  * click:prepend / click:append relay
1228
1228
  *
@@ -1537,6 +1537,14 @@ const textFieldProps = computed(() => {
1537
1537
  "validationValue"
1538
1538
  ]);
1539
1539
  });
1540
+ /*********************************************************
1541
+ * hasPrependControls
1542
+ *
1543
+ * @description
1544
+ * #1449 — the prepend-inner controls only exist in `split` mode
1545
+ * (otherwise they live in appendInner).
1546
+ ********************************************************/
1547
+ const hasPrependControls = computed(() => props.split && !props.hideControls);
1540
1548
  const hasAppendInner = computed(() => {
1541
1549
  return slots.appendInner || !props.hideControls;
1542
1550
  });
@@ -29,8 +29,8 @@
29
29
  :focused="(isFocused && focusAll) || focusIndex === i"
30
30
  v-bind="{...fieldProps(i)}"
31
31
  @click:clear="handleClear"
32
- @click:append-inner="handleClickAppendInner"
33
- @click:prepend-inner="handleClickPrependInner"
32
+ @click:append-inner="appendInnerRelay"
33
+ @click:prepend-inner="prependInnerRelay"
34
34
  >
35
35
  <template
36
36
  v-if="slots.prependInner"
@@ -141,7 +141,6 @@
141
141
  >
142
142
  <origam-messages
143
143
  :id="messagesId"
144
- :active="hasMessages"
145
144
  :messages="validationMessages"
146
145
  />
147
146
  </div>
@@ -149,7 +148,7 @@
149
148
  </template>
150
149
 
151
150
  <script lang="ts" setup>
152
- import { computed, nextTick, onBeforeUnmount, ref, StyleValue, useAttrs, useSlots, watch } from "vue";
151
+ import { computed, getCurrentInstance, nextTick, onBeforeUnmount, ref, StyleValue, useAttrs, useSlots, watch } from "vue";
153
152
  import OrigamField from "../Field/OrigamField.vue";
154
153
  import OrigamOverlay from "../Overlay/OrigamOverlay.vue";
155
154
  import OrigamProgress from "../Progress/OrigamProgress.vue";
@@ -165,7 +164,7 @@ import { useStyle } from "../../composables/Commons/style.composable";
165
164
  import { OTP_INPUT_FIELD_TYPE } from "../../enums/OtpInputField/otp-input-field.enum";
166
165
  import { PROGRESS_TYPE } from "../../enums/Progress/progress.enum";
167
166
  import { filterInputAttrs } from "../../utils/Input/input.util";
168
- import { focusChild, wrapInArray } from "../../utils/Commons/commons.util";
167
+ import { focusChild, hasEvent, wrapInArray } from "../../utils/Commons/commons.util";
169
168
  import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
170
169
  import { getUid } from "../../utils/Commons/getCurrentInstance.util";
171
170
  /*********************************************************
@@ -1155,6 +1154,10 @@ const handleClear = (e) => {
1155
1154
  * `handleClear` above: relay on THIS component's own instance whichever
1156
1155
  * cell the click came from.
1157
1156
  ********************************************************/
1157
+ const vm = getCurrentInstance();
1158
+ const hasListener = (name) => hasEvent(vm?.vnode.props ?? {}, name);
1159
+ const appendInnerRelay = computed(() => hasListener("click:appendInner") ? handleClickAppendInner : undefined);
1160
+ const prependInnerRelay = computed(() => hasListener("click:prependInner") ? handleClickPrependInner : undefined);
1158
1161
  const handleClickAppendInner = (e) => {
1159
1162
  emits("click:appendInner", e);
1160
1163
  };
@@ -33,8 +33,8 @@
33
33
  @click="handleControlClick"
34
34
  @mousedown="handleControlMousedown"
35
35
  @click:clear="handleClear"
36
- @click:prepend-inner="handleClickPrependInner"
37
- @click:append-inner="handleClickAppendInner"
36
+ @click:prepend-inner="prependInnerRelay"
37
+ @click:append-inner="appendInnerRelay"
38
38
  >
39
39
  <template
40
40
  v-if="slots.loader"
@@ -1213,7 +1213,7 @@ const model = useVModel(props, "modelValue");
1213
1213
  /*********************************************************
1214
1214
  * Composables
1215
1215
  ********************************************************/
1216
- const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
1216
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1217
1217
  /*********************************************************
1218
1218
  * Icon
1219
1219
  ********************************************************/
@@ -22,8 +22,8 @@
22
22
  @mousedown:control="handleMousedownControl"
23
23
  @click:append="handleClickAppend"
24
24
  @click:prepend="handleClickPrepend"
25
- @click:append-inner="handleClickAppendInner"
26
- @click:prepend-inner="handleClickPrependInner"
25
+ @click:append-inner="appendInnerRelay"
26
+ @click:prepend-inner="prependInnerRelay"
27
27
  >
28
28
  <template
29
29
  v-if="slots.prepend"
@@ -68,6 +68,8 @@
68
68
  </template>
69
69
 
70
70
  <template #default>
71
+ <output class="origam-select__announcement">{{ menu && hasNoData ? t(noDataText) : '' }}</output>
72
+
71
73
  <origam-menu
72
74
  ref="origamMenuRef"
73
75
  v-model="menu"
@@ -96,7 +98,6 @@
96
98
  :selected="selectedValues"
97
99
  :size="listSize"
98
100
  :tabindex="-1"
99
- aria-live="polite"
100
101
  v-bind="{ ...listProps }"
101
102
  @focusin="handleFocusin"
102
103
  @focusout="handleFocusout"
@@ -123,10 +124,12 @@
123
124
  <template #item.renderless="{item, index, itemRef}">
124
125
  <origam-divider
125
126
  v-if="isDivider(item)"
127
+ role="presentation"
126
128
  v-bind="item.props"
127
129
  />
128
130
  <origam-list-subheader
129
131
  v-else-if="isSubheader(item)"
132
+ role="presentation"
130
133
  v-bind="item.props"
131
134
  />
132
135
  <slot
@@ -147,6 +150,8 @@
147
150
  :model-value="isSelected"
148
151
  :ripple="false"
149
152
  :tabindex="-1"
153
+ aria-hidden="true"
154
+ inert
150
155
  />
151
156
 
152
157
  <origam-avatar
@@ -312,7 +317,7 @@ import { LIST_ITEM_TYPE } from "../../enums/List/list-item.enum";
312
317
  import { SELECT_STRATEGY } from "../../enums/Commons/nested.enum";
313
318
  import { SIZES } from "../../enums/Commons/size.enum";
314
319
  import { TEXT_FIELD_TYPE } from "../../enums/TextField/text-field.enum";
315
- import { deepEqual, matchesSelector, wrapInArray } from "../../utils/Commons/commons.util";
320
+ import { deepEqual, hasEvent, matchesSelector, wrapInArray } from "../../utils/Commons/commons.util";
316
321
  import { forwardRefs } from "../../utils/Commons/forwardRefs.util";
317
322
  import { getUid } from "../../utils/Commons/getCurrentInstance.util";
318
323
  /*********************************************************
@@ -1285,6 +1290,9 @@ const origamChipsRef = ref();
1285
1290
  // expose certain props/methods (notably `$el`, which the proxy filters
1286
1291
  // because of its `$` prefix).
1287
1292
  const vm = getCurrentInstance();
1293
+ const hasListener = (name) => hasEvent(vm?.vnode.props ?? {}, name);
1294
+ const appendInnerRelay = computed(() => hasListener("click:appendInner") ? handleClickAppendInner : undefined);
1295
+ const prependInnerRelay = computed(() => hasListener("click:prependInner") ? handleClickPrependInner : undefined);
1288
1296
  /*********************************************************
1289
1297
  * WAI-ARIA combobox IDs
1290
1298
  *
@@ -1433,6 +1441,7 @@ const menuProps = computed(() => {
1433
1441
  const consumerContentProps = consumerProps.contentProps ?? {};
1434
1442
  return {
1435
1443
  ...consumerProps,
1444
+ role: consumerProps.role ?? "presentation",
1436
1445
  /*********************************************************
1437
1446
  * Menu activator ARIA — #1247
1438
1447
  *
@@ -1440,7 +1449,8 @@ const menuProps = computed(() => {
1440
1449
  * `activator="parent"` is the role-less `.origam-field` wrapper: OrigamMenu's
1441
1450
  * default aria-haspopup/expanded/owns are illegal there (aria-allowed-attr).
1442
1451
  * The combobox ARIA lives on the <input> (`comboboxAriaAttrs`); `undefined`
1443
- * suppresses the defaults.
1452
+ * suppresses the defaults. #1331: `role` below replaces the overlay's hardcoded
1453
+ * `role="menu"`, illegal around a listbox.
1444
1454
  ********************************************************/
1445
1455
  activatorProps: {
1446
1456
  ...MENU_WRAPPER_ARIA_RESET,
@@ -1914,6 +1924,7 @@ const chipSlotProps = (item) => {
1914
1924
  disabled: item.props?.disabled,
1915
1925
  border: true,
1916
1926
  rounded: true,
1927
+ closeLabel: t("origam.select.remove_item", { title: item.title }),
1917
1928
  "onClick:close": (e) => handleChipClose(e, item),
1918
1929
  onKeydown: (e) => handleChipKeydown(e, item),
1919
1930
  onMousedown: (e) => handleChipMousedown(e),
@@ -2149,6 +2160,12 @@ defineExpose(forwardRefs({
2149
2160
  </script>
2150
2161
 
2151
2162
  <style lang="scss" scoped>
2163
+ @use '../../assets/scss/helpers' as ds;
2164
+
2165
+ .origam-select__announcement {
2166
+ @include ds.ds-visually-hidden;
2167
+ }
2168
+
2152
2169
  .origam-select {
2153
2170
  $this: &;
2154
2171
 
@@ -23,7 +23,28 @@
23
23
  :index="index"
24
24
  :data-cy="`stepper-item-${index}`"
25
25
  @click="handleItemClick"
26
- />
26
+ >
27
+ <template
28
+ v-if="$slots['item-prepend']"
29
+ #prepend="slotProps"
30
+ >
31
+ <slot
32
+ name="item-prepend"
33
+ v-bind="slotProps"
34
+ :item="item"
35
+ />
36
+ </template>
37
+ <template
38
+ v-if="$slots['item-append']"
39
+ #append="slotProps"
40
+ >
41
+ <slot
42
+ name="item-append"
43
+ v-bind="slotProps"
44
+ :item="item"
45
+ />
46
+ </template>
47
+ </origam-stepper-item>
27
48
  </template>
28
49
  </template>
29
50
  </slot>
@@ -10,6 +10,12 @@
10
10
  :disabled="isClickable && resolvedStatus === STEPPER_ITEM_STATUS.ACTIVE ? true : undefined"
11
11
  @click="handleClick"
12
12
  >
13
+ <slot
14
+ name="prepend"
15
+ :index="index"
16
+ :status="resolvedStatus"
17
+ />
18
+
13
19
  <span
14
20
  v-contrast
15
21
  :class="indicatorClasses"
@@ -39,6 +45,12 @@
39
45
  class="origam-stepper-item__subtitle"
40
46
  >{{ subtitle }}</span>
41
47
  </span>
48
+
49
+ <slot
50
+ name="append"
51
+ :index="index"
52
+ :status="resolvedStatus"
53
+ />
42
54
  </component>
43
55
  </template>
44
56
 
@@ -159,7 +171,10 @@ const itemClasses = computed(() => [
159
171
  "origam-stepper-item",
160
172
  `origam-stepper-item--${resolvedStatus.value}`,
161
173
  `origam-stepper-item--${orientation.value}`,
162
- { "origam-stepper-item--clickable": isClickable.value },
174
+ {
175
+ "origam-stepper-item--clickable": isClickable.value,
176
+ "origam-stepper-item--colored": !!stepper?.color.value
177
+ },
163
178
  props.class
164
179
  ]);
165
180
  const indicatorClasses = computed(() => ["origam-stepper-item__indicator", `origam-stepper-item__indicator--${resolvedStatus.value}`]);
@@ -226,24 +241,28 @@ defineExpose({
226
241
  line-height: 1;
227
242
  }
228
243
 
229
- &--active,
230
- &--done {
231
- color: var(
232
- --origam-stepper---color,
233
- var(--origam-color__action--primary---bg)
234
- );
235
- border-color: var(
236
- --origam-stepper---color,
237
- var(--origam-color__action--primary---bg)
238
- );
239
- background-color: var(
240
- --origam-stepper---background-color,
241
- color-mix(
242
- in srgb,
243
- var(--origam-stepper---color, var(--origam-color__action--primary---bg)) 16%,
244
- transparent
245
- )
246
- );
244
+ @each $status in (active, done) {
245
+ &--#{$status} {
246
+ $status-color: var(
247
+ --origam-stepper---color-#{$status},
248
+ var(--origam-stepper---color, var(--origam-color__action--primary---bg))
249
+ );
250
+
251
+ color: $status-color;
252
+ border-color: $status-color;
253
+ background-color: var(
254
+ --origam-stepper---background-color,
255
+ color-mix(in srgb, #{$status-color} 16%, transparent)
256
+ );
257
+ }
258
+ }
259
+
260
+ // The stepper's own `color` prop wins over the per-status tokens: the item
261
+ // inherits the colour the stepper root already resolved (class or inline).
262
+ #{$this}--colored &--active,
263
+ #{$this}--colored &--done {
264
+ color: inherit;
265
+ border-color: currentColor;
247
266
  }
248
267
 
249
268
  &--error {
@@ -270,13 +289,19 @@ defineExpose({
270
289
  align-items: flex-start;
271
290
  text-align: start;
272
291
  }
292
+
293
+ // Vertical: the subtitle wraps by default (own token, so a root-level
294
+ // `subtitle---white-space` override still reaches horizontal steppers).
295
+ #{$this}__subtitle {
296
+ white-space: var(--origam-stepper-item--vertical__subtitle---white-space, normal);
297
+ }
273
298
  }
274
299
 
275
300
  &__title {
276
301
  font-size: var(--origam-stepper---title-font-size, 0.875rem);
277
302
  font-weight: var(--origam-stepper---title-font-weight, 500);
278
303
  color: var(--origam-stepper---title-color, var(--origam-color__text---primary));
279
- white-space: nowrap;
304
+ white-space: var(--origam-stepper-item__title---white-space, nowrap);
280
305
  overflow: hidden;
281
306
  text-overflow: ellipsis;
282
307
  max-width: 100%;
@@ -285,7 +310,7 @@ defineExpose({
285
310
  &__subtitle {
286
311
  font-size: var(--origam-stepper---subtitle-font-size, 0.75rem);
287
312
  color: var(--origam-stepper---subtitle-color, var(--origam-color__text---secondary));
288
- white-space: nowrap;
313
+ white-space: var(--origam-stepper-item__subtitle---white-space, nowrap);
289
314
  overflow: hidden;
290
315
  text-overflow: ellipsis;
291
316
  max-width: 100%;
@@ -33,8 +33,8 @@
33
33
  @click="handleControlClick"
34
34
  @mousedown="handleControlMousedown"
35
35
  @click:clear="handleClear"
36
- @click:prepend-inner="handleClickPrependInner"
37
- @click:append-inner="handleClickAppendInner"
36
+ @click:prepend-inner="prependInnerRelay"
37
+ @click:append-inner="appendInnerRelay"
38
38
  >
39
39
  <template
40
40
  v-if="slots.loader"
@@ -1030,7 +1030,7 @@ const { isFocused, onFocus, onBlur: handleBlur } = useFocus(props);
1030
1030
  /*********************************************************
1031
1031
  * Composables
1032
1032
  ********************************************************/
1033
- const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
1033
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1034
1034
  /*********************************************************
1035
1035
  * Icon
1036
1036
  ********************************************************/
@@ -32,8 +32,8 @@
32
32
  @click="handleControlClick"
33
33
  @mousedown="handleControlMousedown"
34
34
  @click:clear="handleClear"
35
- @click:prepend-inner="handleClickPrependInner"
36
- @click:append-inner="handleClickAppendInner"
35
+ @click:prepend-inner="prependInnerRelay"
36
+ @click:append-inner="appendInnerRelay"
37
37
  >
38
38
  <template
39
39
  v-if="slots.loader"
@@ -1182,7 +1182,7 @@ watch(() => model.value, (next) => {
1182
1182
  /*********************************************************
1183
1183
  * Composables
1184
1184
  ********************************************************/
1185
- const { onClickAppendInner: handleClickAppendInner, onClickPrependInner: handleClickPrependInner } = useAdjacentInner(props);
1185
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1186
1186
  /*********************************************************
1187
1187
  * Icon
1188
1188
  ********************************************************/
@@ -683,7 +683,7 @@ const { isOn: isHover, config: hoverState } = useStateFlag(props, { state: "hove
683
683
  * cablees a un comportement invente. Elles avertissent une fois, en
684
684
  * dev, avec la raison exacte. Meme traitement que la famille Chart.
685
685
  ********************************************************/
686
- useUnsupportedProp("OrigamToolbar", "modelValue", "the toolbar has no open/closed state to bind — nothing reads this value.", () => props.modelValue !== undefined);
686
+ useUnsupportedProp("OrigamToolbar", "modelValue", "the toolbar has no open/closed state to bind — nothing reads this value.", () => props.modelValue !== true);
687
687
  const { isOn: isActive, config: activeState } = useStateFlag(props, { state: "active" });
688
688
  // `colorClasses` / `colorStyles` MUST come from `useStateEffect` so the
689
689
  // surface follows `hover` / `active` — e.g. a transparent sticky AppBar
@@ -1446,7 +1446,7 @@ const { colorClasses, colorStyles } = useColorEffect(props);
1446
1446
  * cablees a un comportement invente. Elles avertissent une fois, en
1447
1447
  * dev, avec la raison exacte. Meme traitement que la famille Chart.
1448
1448
  ********************************************************/
1449
- useUnsupportedProp("OrigamVideo", "showCenterControls", "no centre overlay is rendered; the controls live in the bottom bar only.", () => props.showCenterControls === true);
1449
+ useUnsupportedProp("OrigamVideo", "showCenterControls", "no centre overlay is rendered; the controls live in the bottom bar only.", () => props.showCenterControls !== true);
1450
1450
  const hasColorProp = computed(() => !!props.color);
1451
1451
  const hasBgColorProp = computed(() => !!props.bgColor);
1452
1452
  /*********************************************************
@@ -12,20 +12,30 @@ var _getCurrentInstance = require("../../utils/Commons/getCurrentInstance.util.c
12
12
  function useAdjacentInner(props) {
13
13
  const vm = (0, _getCurrentInstance.getCurrentInstance)("OrigamAdjacentInner");
14
14
  const slots = (0, _vue.useSlots)();
15
+ const slotsVersion = (0, _vue.shallowRef)(0);
16
+ (0, _vue.onBeforeUpdate)(() => {
17
+ slotsVersion.value++;
18
+ });
19
+ const slotPresence = (0, _vue.computed)(() => ({
20
+ version: slotsVersion.value,
21
+ prependInner: !!slots.prependInner,
22
+ appendInner: !!slots.appendInner,
23
+ clear: !!slots.clear
24
+ }));
15
25
  const hasPrependInnerMedia = (0, _vue.computed)(() => {
16
26
  return !!(props.prependInnerAvatar || props.prependInnerIcon);
17
27
  });
18
28
  const hasPrependInner = (0, _vue.computed)(() => {
19
- return slots.prependInner || hasPrependInnerMedia.value;
29
+ return slotPresence.value.prependInner || hasPrependInnerMedia.value;
20
30
  });
21
31
  const hasAppendInnerMedia = (0, _vue.computed)(() => {
22
32
  return !!(props.appendInnerAvatar || props.appendInnerIcon);
23
33
  });
24
34
  const hasAppendInner = (0, _vue.computed)(() => {
25
- return slots.appendInner || hasAppendInnerMedia.value;
35
+ return slotPresence.value.appendInner || hasAppendInnerMedia.value;
26
36
  });
27
37
  const hasClear = (0, _vue.computed)(() => {
28
- return props.clearable || slots.clear;
38
+ return !!props.clearable || slotPresence.value.clear;
29
39
  });
30
40
  const onClickPrependInner = e => {
31
41
  vm.emit("click:prependInner", e);
@@ -42,6 +52,8 @@ function useAdjacentInner(props) {
42
52
  const isAppendInnerClickable = (0, _vue.computed)(() => {
43
53
  return (0, _commons.hasEvent)(vm.attrs, "click:appendInner") || (0, _commons.hasEvent)(vm.vnode.props ?? {}, "click:appendInner");
44
54
  });
55
+ const appendInnerRelay = (0, _vue.computed)(() => isAppendInnerClickable.value ? onClickAppendInner : void 0);
56
+ const prependInnerRelay = (0, _vue.computed)(() => isPrependInnerClickable.value ? onClickPrependInner : void 0);
45
57
  const ownsKey = e => e.target === e.currentTarget;
46
58
  const onKeydownPrependInner = e => {
47
59
  if (!isPrependInnerClickable.value) return;
@@ -81,6 +93,8 @@ function useAdjacentInner(props) {
81
93
  hasClear,
82
94
  isPrependInnerClickable,
83
95
  isAppendInnerClickable,
96
+ appendInnerRelay,
97
+ prependInnerRelay,
84
98
  onClickPrependInner,
85
99
  onClickAppendInner,
86
100
  onKeydownPrependInner,
@@ -41,12 +41,14 @@ export declare function useAdjacentInner(props: IAdjacentInnerProps): {
41
41
  prependInnerCommandAttrs: import("vue").ComputedRef<Record<string, unknown>>;
42
42
  appendInnerCommandAttrs: import("vue").ComputedRef<Record<string, unknown>>;
43
43
  hasPrependInnerMedia: import("vue").ComputedRef<boolean>;
44
- hasPrependInner: import("vue").ComputedRef<boolean | import("vue").Slot<any>>;
44
+ hasPrependInner: import("vue").ComputedRef<boolean>;
45
45
  hasAppendInnerMedia: import("vue").ComputedRef<boolean>;
46
- hasAppendInner: import("vue").ComputedRef<boolean | import("vue").Slot<any>>;
47
- hasClear: import("vue").ComputedRef<true | import("vue").Slot<any> | undefined>;
46
+ hasAppendInner: import("vue").ComputedRef<boolean>;
47
+ hasClear: import("vue").ComputedRef<boolean>;
48
48
  isPrependInnerClickable: import("vue").ComputedRef<boolean>;
49
49
  isAppendInnerClickable: import("vue").ComputedRef<boolean>;
50
+ appendInnerRelay: import("vue").ComputedRef<((e: Event) => void) | undefined>;
51
+ prependInnerRelay: import("vue").ComputedRef<((e: Event) => void) | undefined>;
50
52
  onClickPrependInner: (e: Event) => void;
51
53
  onClickAppendInner: (e: Event) => void;
52
54
  onKeydownPrependInner: (e: KeyboardEvent) => void;