origam 2.42.0 → 2.44.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 (53) hide show
  1. package/CHANGELOG.md +108 -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/Btn/OrigamBtn.vue +31 -10
  12. package/dist/src/components/ColorPickerField/OrigamColorPickerField.vue +3 -5
  13. package/dist/src/components/ConfirmWrapper/OrigamConfirmWrapper.vue +0 -1
  14. package/dist/src/components/DataTable/OrigamDataTableFooter.vue +3 -1
  15. package/dist/src/components/DataTable/OrigamDataTableHeaderCell.vue +20 -2
  16. package/dist/src/components/DatePickerField/OrigamDatePickerField.vue +3 -5
  17. package/dist/src/components/Field/OrigamField.vue +17 -7
  18. package/dist/src/components/FileField/OrigamFileField.vue +3 -3
  19. package/dist/src/components/Form/OrigamForm.vue +0 -1
  20. package/dist/src/components/Input/OrigamInput.vue +0 -1
  21. package/dist/src/components/Messages/OrigamMessages.vue +1 -1
  22. package/dist/src/components/NumberField/OrigamNumberField.vue +26 -14
  23. package/dist/src/components/OtpInputField/OrigamOtpInputField.vue +8 -5
  24. package/dist/src/components/PasswordField/OrigamPasswordField.vue +3 -3
  25. package/dist/src/components/Select/OrigamSelect.vue +22 -5
  26. package/dist/src/components/Stepper/OrigamStepper.vue +22 -1
  27. package/dist/src/components/Stepper/OrigamStepperItem.vue +46 -21
  28. package/dist/src/components/Table/OrigamTable.vue +1 -1
  29. package/dist/src/components/TextField/OrigamTextField.vue +3 -3
  30. package/dist/src/components/TextareaField/OrigamTextareaField.vue +3 -3
  31. package/dist/src/components/Toolbar/OrigamToolbar.vue +1 -1
  32. package/dist/src/composables/Commons/adjacentInner.composable.cjs +17 -3
  33. package/dist/src/composables/Commons/adjacentInner.composable.d.ts +5 -3
  34. package/dist/src/composables/Commons/adjacentInner.composable.js +18 -4
  35. package/dist/src/composables/Commons/link.composable.cjs +6 -5
  36. package/dist/src/composables/Commons/link.composable.js +6 -5
  37. package/dist/src/composables/Commons/popup-dialog-aria.composable.cjs +26 -0
  38. package/dist/src/composables/Commons/popup-dialog-aria.composable.d.ts +23 -0
  39. package/dist/src/composables/Commons/popup-dialog-aria.composable.js +17 -0
  40. package/dist/src/composables/Commons/stack.composable.cjs +2 -19
  41. package/dist/src/composables/Commons/stack.composable.d.ts +1 -1
  42. package/dist/src/composables/Commons/stack.composable.js +3 -20
  43. package/dist/src/composables/index.cjs +12 -0
  44. package/dist/src/composables/index.d.ts +1 -0
  45. package/dist/src/composables/index.js +1 -0
  46. package/dist/src/directives/Contrast/contrast.directive.cjs +52 -15
  47. package/dist/src/directives/Contrast/contrast.directive.js +47 -10
  48. package/dist/src/interfaces/NumberField/number-field.interface.d.ts +8 -0
  49. package/dist/src/interfaces/Stepper/stepper-item.interface.d.ts +11 -2
  50. package/dist/src/interfaces/Stepper/stepper.interface.d.ts +7 -0
  51. package/dist/src/interfaces/Table/table.interface.d.ts +2 -2
  52. package/dist/src/types/tokens.type.d.ts +1 -1
  53. package/package.json +1 -1
@@ -329,7 +329,6 @@
329
329
  --origam-btn---text-decoration: none;
330
330
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
331
331
  --origam-btn---opacity: 1;
332
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
333
332
  --origam-btn---opacity-plain: var(--origam-opacity---70);
334
333
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
335
334
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2576,6 +2575,11 @@
2576
2575
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2577
2576
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2578
2577
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2578
+ --origam-stepper---color-active: var(--origam-stepper---color);
2579
+ --origam-stepper---color-done: var(--origam-stepper---color);
2580
+ --origam-stepper-item__title---white-space: nowrap;
2581
+ --origam-stepper-item__subtitle---white-space: nowrap;
2582
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2579
2583
  --origam-timeline---background-color: var(--origam-color__surface---default);
2580
2584
  --origam-timeline---color: var(--origam-color__text---primary);
2581
2585
  --origam-timeline---gap: var(--origam-space---4);
@@ -153,7 +153,6 @@
153
153
  --origam-btn---text-decoration: none;
154
154
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
155
155
  --origam-btn---opacity: 1;
156
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
157
156
  --origam-btn---opacity-plain: var(--origam-opacity---70);
158
157
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
159
158
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2399,6 +2398,11 @@
2399
2398
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2400
2399
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2401
2400
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2401
+ --origam-stepper---color-active: var(--origam-stepper---color);
2402
+ --origam-stepper---color-done: var(--origam-stepper---color);
2403
+ --origam-stepper-item__title---white-space: nowrap;
2404
+ --origam-stepper-item__subtitle---white-space: nowrap;
2405
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2402
2406
  --origam-timeline---background-color: var(--origam-color__surface---default);
2403
2407
  --origam-timeline---color: var(--origam-color__text---primary);
2404
2408
  --origam-timeline---gap: var(--origam-space---4);
@@ -329,7 +329,6 @@
329
329
  --origam-btn---text-decoration: none;
330
330
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
331
331
  --origam-btn---opacity: 1;
332
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
333
332
  --origam-btn---opacity-plain: var(--origam-opacity---70);
334
333
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
335
334
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2576,6 +2575,11 @@
2576
2575
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2577
2576
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2578
2577
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2578
+ --origam-stepper---color-active: var(--origam-stepper---color);
2579
+ --origam-stepper---color-done: var(--origam-stepper---color);
2580
+ --origam-stepper-item__title---white-space: nowrap;
2581
+ --origam-stepper-item__subtitle---white-space: nowrap;
2582
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2579
2583
  --origam-timeline---background-color: var(--origam-color__surface---default);
2580
2584
  --origam-timeline---color: var(--origam-color__text---primary);
2581
2585
  --origam-timeline---gap: var(--origam-space---4);
@@ -3382,7 +3386,6 @@
3382
3386
  --origam-btn---text-decoration: none;
3383
3387
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
3384
3388
  --origam-btn---opacity: 1;
3385
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
3386
3389
  --origam-btn---opacity-plain: var(--origam-opacity---70);
3387
3390
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
3388
3391
  --origam-btn---overlay-opacity-active: 0.2;
@@ -5628,6 +5631,11 @@
5628
5631
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
5629
5632
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
5630
5633
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
5634
+ --origam-stepper---color-active: var(--origam-stepper---color);
5635
+ --origam-stepper---color-done: var(--origam-stepper---color);
5636
+ --origam-stepper-item__title---white-space: nowrap;
5637
+ --origam-stepper-item__subtitle---white-space: nowrap;
5638
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
5631
5639
  --origam-timeline---background-color: var(--origam-color__surface---default);
5632
5640
  --origam-timeline---color: var(--origam-color__text---primary);
5633
5641
  --origam-timeline---gap: var(--origam-space---4);
@@ -229,7 +229,6 @@
229
229
  --origam-btn---text-decoration: none;
230
230
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
231
231
  --origam-btn---opacity: 1;
232
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
233
232
  --origam-btn---opacity-plain: var(--origam-opacity---70);
234
233
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
235
234
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2490,6 +2489,11 @@
2490
2489
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2491
2490
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2492
2491
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2492
+ --origam-stepper---color-active: var(--origam-stepper---color);
2493
+ --origam-stepper---color-done: var(--origam-stepper---color);
2494
+ --origam-stepper-item__title---white-space: nowrap;
2495
+ --origam-stepper-item__subtitle---white-space: nowrap;
2496
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2493
2497
  --origam-timeline---background-color: var(--origam-color__surface---default);
2494
2498
  --origam-timeline---color: var(--origam-color__text---primary);
2495
2499
  --origam-timeline---gap: var(--origam-space---4);
@@ -7,6 +7,9 @@
7
7
  "open": "Open",
8
8
  "close": "Close",
9
9
  "dismiss": "Dismiss",
10
+ "select": {
11
+ "remove_item": "Remove {title}"
12
+ },
10
13
  "confirm_edit": {
11
14
  "ok": "OK",
12
15
  "cancel": "Cancel"
@@ -7,6 +7,9 @@
7
7
  "open": "Ouvrir",
8
8
  "close": "Fermer",
9
9
  "dismiss": "Dismiss",
10
+ "select": {
11
+ "remove_item": "Retirer {title}"
12
+ },
10
13
  "confirm_edit": {
11
14
  "ok": "OK",
12
15
  "cancel": "Annuler"
@@ -329,7 +329,6 @@
329
329
  --origam-btn---text-decoration: none;
330
330
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
331
331
  --origam-btn---opacity: 1;
332
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
333
332
  --origam-btn---opacity-plain: var(--origam-opacity---70);
334
333
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
335
334
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2576,6 +2575,11 @@
2576
2575
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2577
2576
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2578
2577
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2578
+ --origam-stepper---color-active: var(--origam-stepper---color);
2579
+ --origam-stepper---color-done: var(--origam-stepper---color);
2580
+ --origam-stepper-item__title---white-space: nowrap;
2581
+ --origam-stepper-item__subtitle---white-space: nowrap;
2582
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2579
2583
  --origam-timeline---background-color: var(--origam-color__surface---default);
2580
2584
  --origam-timeline---color: var(--origam-color__text---primary);
2581
2585
  --origam-timeline---gap: var(--origam-space---4);
@@ -3382,7 +3386,6 @@
3382
3386
  --origam-btn---text-decoration: none;
3383
3387
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
3384
3388
  --origam-btn---opacity: 1;
3385
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
3386
3389
  --origam-btn---opacity-plain: var(--origam-opacity---70);
3387
3390
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
3388
3391
  --origam-btn---overlay-opacity-active: 0.2;
@@ -5628,6 +5631,11 @@
5628
5631
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
5629
5632
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
5630
5633
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
5634
+ --origam-stepper---color-active: var(--origam-stepper---color);
5635
+ --origam-stepper---color-done: var(--origam-stepper---color);
5636
+ --origam-stepper-item__title---white-space: nowrap;
5637
+ --origam-stepper-item__subtitle---white-space: nowrap;
5638
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
5631
5639
  --origam-timeline---background-color: var(--origam-color__surface---default);
5632
5640
  --origam-timeline---color: var(--origam-color__text---primary);
5633
5641
  --origam-timeline---gap: var(--origam-space---4);
@@ -229,7 +229,6 @@
229
229
  --origam-btn---text-decoration: none;
230
230
  --origam-btn---text-indent: var(--origam-font__letterSpacing---widest);
231
231
  --origam-btn---opacity: 1;
232
- --origam-btn---opacity-disabled: var(--origam-opacity---50);
233
232
  --origam-btn---opacity-plain: var(--origam-opacity---70);
234
233
  --origam-btn---overlay-opacity-hover: var(--origam-opacity---12);
235
234
  --origam-btn---overlay-opacity-active: 0.2;
@@ -2490,6 +2489,11 @@
2490
2489
  --origam-stepper---connector-color: var(--origam-color__border---subtle);
2491
2490
  --origam-stepper---connector-color-done: var(--origam-color__action--primary---bg);
2492
2491
  --origam-stepper---connector-thickness: var(--origam-border__width---thin);
2492
+ --origam-stepper---color-active: var(--origam-stepper---color);
2493
+ --origam-stepper---color-done: var(--origam-stepper---color);
2494
+ --origam-stepper-item__title---white-space: nowrap;
2495
+ --origam-stepper-item__subtitle---white-space: nowrap;
2496
+ --origam-stepper-item--vertical__subtitle---white-space: normal;
2493
2497
  --origam-timeline---background-color: var(--origam-color__surface---default);
2494
2498
  --origam-timeline---color: var(--origam-color__text---primary);
2495
2499
  --origam-timeline---gap: var(--origam-space---4);
@@ -3,7 +3,7 @@
3
3
  :is="link.tag.value"
4
4
  :id="id"
5
5
  v-ripple="isRipple"
6
- v-contrast
6
+ v-contrast="!isDisabled"
7
7
  :data-origam-color-locked="colorLocked"
8
8
  :class="btnClasses"
9
9
  :disabled="isDisabled || undefined"
@@ -897,7 +897,13 @@ const isActive = computed(() => {
897
897
  return group.isSelected.value;
898
898
  }
899
899
  if (link.isLink.value) {
900
- return link.isActive?.value;
900
+ /*********************************************************
901
+ * Link active (#1125)
902
+ *
903
+ * @description
904
+ * Exact match only: a parent route in the matched chain is not "the current page". An explicit `active` still wins (above).
905
+ ********************************************************/
906
+ return link.isExactActive?.value;
901
907
  }
902
908
  return active.value;
903
909
  });
@@ -972,7 +978,13 @@ const { hasAppend, hasPrepend } = useAdjacent(props, prependIcon, appendIcon);
972
978
  * The capture listener runs first on the target, so it swallows all three.
973
979
  ********************************************************/
974
980
  const handleClickCapture = (e) => {
975
- if (!isLoading.value) return;
981
+ /*********************************************************
982
+ * Disabled anchor (#1097)
983
+ *
984
+ * @description
985
+ * A disabled anchor is no longer shielded by `pointer-events: none`; a native disabled <button> never reaches here.
986
+ ********************************************************/
987
+ if (!isLoading.value && !isDisabled.value) return;
976
988
  e.preventDefault();
977
989
  e.stopImmediatePropagation();
978
990
  };
@@ -1085,7 +1097,7 @@ const btnStyles = computed(() => {
1085
1097
  borderStyles.value,
1086
1098
  paddingStyles.value,
1087
1099
  marginStyles.value,
1088
- colorStyles.value,
1100
+ isDisabled.value ? ["--origam-btn---background-color: var(--origam-btn---background-color-disabled)", "color: var(--origam-btn---color-disabled)"] : colorStyles.value,
1089
1101
  dimensionStyles.value,
1090
1102
  locationStyles.value,
1091
1103
  roundedStyles.value,
@@ -1595,7 +1607,7 @@ defineExpose({
1595
1607
  box-shadow: none;
1596
1608
  opacity: var(--origam-btn---opacity-plain, var(--origam-opacity---70));
1597
1609
 
1598
- &:hover,
1610
+ &:hover:not(#{$this}--disabled),
1599
1611
  &:focus-visible {
1600
1612
  opacity: 1;
1601
1613
  }
@@ -1654,7 +1666,7 @@ defineExpose({
1654
1666
  ) !important;
1655
1667
  }
1656
1668
 
1657
- &:hover,
1669
+ &:hover:not(#{$this}--disabled),
1658
1670
  &:focus-visible {
1659
1671
  background-color: var(
1660
1672
  --origam-btn---background-color-ghost-hover,
@@ -1680,12 +1692,21 @@ defineExpose({
1680
1692
  --origam-btn---min-width: 100%;
1681
1693
  }
1682
1694
 
1695
+ /*********************************************************
1696
+ * Disabled (#1097)
1697
+ *
1698
+ * @description
1699
+ * The root keeps its pointer events so `cursor: not-allowed` can show (`pointer-events: none` hands the cursor to the parent). A native `disabled` <button> fires no click, an anchor is stopped by `handleClickCapture`, and the hover surfaces are switched off here and on the `plain` / `ghost` hover rules (`:not(--disabled)`).
1700
+ *
1701
+ * @description
1702
+ * No opacity veil: the grey tokens carry the state (owner decision). `opacity: 1` is written directly because `plain` sets its own `opacity` (70 %). `--origam-btn---opacity-disabled` is therefore no longer read.
1703
+ ********************************************************/
1683
1704
  &--disabled {
1684
- pointer-events: none;
1685
- --origam-btn---opacity: var(--origam-btn---opacity-disabled, 0.5);
1705
+ cursor: not-allowed;
1706
+ opacity: 1;
1686
1707
 
1687
- &:hover {
1688
- --origam-btn---opacity: var(--origam-btn---opacity-disabled, 0.5);
1708
+ > #{$this}__overlay {
1709
+ --origam-btn__overlay---opacity: 0;
1689
1710
  }
1690
1711
  }
1691
1712
 
@@ -136,6 +136,7 @@ import OrigamSheet from "../Sheet/OrigamSheet.vue";
136
136
  import OrigamTextField from "../TextField/OrigamTextField.vue";
137
137
  import OrigamTranslateScale from "../Transition/OrigamTranslateScale.vue";
138
138
  import { useLocale } from "../../composables/Commons/locale.composable";
139
+ import { usePopupDialogAria } from "../../composables/Commons/popup-dialog-aria.composable";
139
140
  import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
140
141
  import { useTeleportTypography } from "../../composables/Commons/teleport-typography.composable";
141
142
  import { useVModel } from "../../composables/Commons/vModel.composable";
@@ -1159,15 +1160,12 @@ const { typographyStyles: menuTypographyStyles } = useTeleportTypography(origamT
1159
1160
  "--origam-picker-title---font-size": fontSize,
1160
1161
  "--origam-color-picker-edit__label---font-size": fontSize
1161
1162
  }));
1162
- const comboboxAriaAttrs = computed(() => ({
1163
- role: "combobox",
1164
- "aria-haspopup": "dialog",
1165
- "aria-expanded": menu.value ? "true" : "false"
1166
- }));
1163
+ const { comboboxAriaAttrs, menuAriaProps } = usePopupDialogAria("origam-color-picker-field", () => props.label ? t(props.label) : undefined, menu);
1167
1164
  const menuProps = computed(() => {
1168
1165
  const consumerContentProps = props.menuProps?.contentProps ?? {};
1169
1166
  return {
1170
1167
  ...props.menuProps,
1168
+ ...menuAriaProps.value,
1171
1169
  activatorProps: {
1172
1170
  /*********************************************************
1173
1171
  * role + aria-haspopup — #818
@@ -106,7 +106,6 @@
106
106
  >
107
107
  <origam-messages
108
108
  :id="messagesId"
109
- :active="hasMessages"
110
109
  :messages="messages"
111
110
  >
112
111
  <template
@@ -4,7 +4,8 @@
4
4
  :class="dataTableFooterClasses"
5
5
  :style="dataTableFooterStyles"
6
6
  >
7
- <origam-row>
7
+ <!-- #1162 : gutter nul — la marge negative du Row rognait le libelle a gauche -->
8
+ <origam-row :gutters="ROW_GUTTER.NONE">
8
9
  <slot name="prepend"/>
9
10
 
10
11
  <div class="origam-data-table-footer__items-per-page">
@@ -51,6 +52,7 @@ import { usePagination } from "../../composables/DataTable/pagination.composable
51
52
  import { useProps } from "../../composables/Commons/props.composable";
52
53
  import { useStyle } from "../../composables/Commons/style.composable";
53
54
  import { DENSITY } from "../../enums/Commons/density.enum";
55
+ import { ROW_GUTTER } from "../../enums/Grids/row.enum";
54
56
  import { computed, ref, StyleValue } from "vue";
55
57
  /*********************************************************
56
58
  * Global
@@ -30,7 +30,11 @@
30
30
  </template>
31
31
 
32
32
  <template v-else>
33
- <div class="origam-data-table-header-cell__content">
33
+ <component
34
+ :is="column.sortable && !disableSort ? 'button' : 'div'"
35
+ :type="column.sortable && !disableSort ? 'button' : undefined"
36
+ class="origam-data-table-header-cell__content"
37
+ >
34
38
  <span>{{ column.title }}</span>
35
39
 
36
40
  <template v-if="column.sortable && !disableSort">
@@ -51,7 +55,7 @@
51
55
  {{ sortedItems(column) }}
52
56
  </div>
53
57
  </template>
54
- </div>
58
+ </component>
55
59
  </template>
56
60
  </slot>
57
61
  </template>
@@ -302,6 +306,20 @@ defineExpose({
302
306
  display: flex;
303
307
  align-items: center;
304
308
  gap: var(--origam-data-table-header-cell__content---gap, 4px);
309
+
310
+ /* Native <button> reset: the sort control keeps the former <div> look. */
311
+ &:is(button) {
312
+ appearance: none;
313
+ background: none;
314
+ border: 0;
315
+ padding: 0;
316
+ margin: 0;
317
+ width: 100%;
318
+ font: inherit;
319
+ color: inherit;
320
+ text-align: inherit;
321
+ cursor: inherit;
322
+ }
305
323
  }
306
324
 
307
325
  &__sort-badge {
@@ -183,6 +183,7 @@ import OrigamTextField from "../TextField/OrigamTextField.vue";
183
183
  import OrigamTranslateScale from "../Transition/OrigamTranslateScale.vue";
184
184
  import { useDate } from "../../composables/Commons/date.composable";
185
185
  import { useLocale } from "../../composables/Commons/locale.composable";
186
+ import { usePopupDialogAria } from "../../composables/Commons/popup-dialog-aria.composable";
186
187
  import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
187
188
  import { useTeleportTypography } from "../../composables/Commons/teleport-typography.composable";
188
189
  import { useTextColor } from "../../composables/Commons/textColor.composable";
@@ -1189,15 +1190,12 @@ const { typographyStyles: menuTypographyStyles } = useTeleportTypography(origamT
1189
1190
  "--origam-date-picker-month__weeks---font-size": fontSize,
1190
1191
  "--origam-date-picker-month__day---font-size": fontSize
1191
1192
  }));
1192
- const comboboxAriaAttrs = computed(() => ({
1193
- role: "combobox",
1194
- "aria-haspopup": "dialog",
1195
- "aria-expanded": menu.value ? "true" : "false"
1196
- }));
1193
+ const { comboboxAriaAttrs, menuAriaProps } = usePopupDialogAria("origam-date-picker-field", () => props.label ? t(props.label) : undefined, menu);
1197
1194
  const menuProps = computed(() => {
1198
1195
  const consumerContentProps = props.menuProps?.contentProps ?? {};
1199
1196
  return {
1200
1197
  ...props.menuProps,
1198
+ ...menuAriaProps.value,
1201
1199
  activatorProps: {
1202
1200
  /*********************************************************
1203
1201
  * role + aria-haspopup — #818
@@ -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
@@ -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"
@@ -112,9 +112,12 @@
112
112
  <slot name="loader"/>
113
113
  </template>
114
114
 
115
- <template #prependInner>
115
+ <template
116
+ v-if="hasPrependControls || slots.prependInner"
117
+ #prependInner
118
+ >
116
119
  <div
117
- v-if="!hideControls"
120
+ v-if="hasPrependControls"
118
121
  class="origam-number-field__control"
119
122
  >
120
123
  <template v-if="split">
@@ -282,7 +285,7 @@
282
285
  </template>
283
286
 
284
287
  <script lang="ts" setup>
285
- import { computed, getCurrentInstance, nextTick, onMounted, ref, shallowRef, StyleValue, useSlots, watch, watchEffect } from "vue";
288
+ import { computed, getCurrentInstance, nextTick, ref, shallowRef, StyleValue, useSlots, watch, watchEffect } from "vue";
286
289
  import OrigamBtn from "../Btn/OrigamBtn.vue";
287
290
  import OrigamDivider from "../Divider/OrigamDivider.vue";
288
291
  import OrigamInput from "../Input/OrigamInput.vue";
@@ -389,6 +392,11 @@ const props = defineProps({
389
392
  type: Boolean,
390
393
  required: false
391
394
  },
395
+ clamp: {
396
+ type: Boolean,
397
+ required: false,
398
+ default: true
399
+ },
392
400
  compact: {
393
401
  type: Boolean,
394
402
  required: false,
@@ -1178,7 +1186,7 @@ const controlsDisabled = computed(() => !!(props.disabled || props.readonly));
1178
1186
  /*********************************************************
1179
1187
  * Value
1180
1188
  ********************************************************/
1181
- const model = useVModel(props, "modelValue", null, (val) => val ?? null, (val) => val == null ? val ?? null : clamp(Number(val), props.min, props.max));
1189
+ const model = useVModel(props, "modelValue", null, (val) => val ?? null, (val) => val == null ? val ?? null : props.clamp ? clamp(Number(val), props.min, props.max) : Number(val));
1182
1190
  /*********************************************************
1183
1191
  * effectiveValidationValue (#696)
1184
1192
  *
@@ -1214,7 +1222,7 @@ const { isFocused, onFocus, onBlur } = useFocus(props);
1214
1222
  /*********************************************************
1215
1223
  * Composables
1216
1224
  ********************************************************/
1217
- const { onClickPrependInner: handleClickPrependInner, onClickAppendInner: handleClickAppendInner } = useAdjacentInner(props);
1225
+ const { appendInnerRelay, prependInnerRelay } = useAdjacentInner(props);
1218
1226
  /*********************************************************
1219
1227
  * click:prepend / click:append relay
1220
1228
  *
@@ -1299,7 +1307,7 @@ const inputText = computed({
1299
1307
  if (val === null || val === "") {
1300
1308
  model.value = null;
1301
1309
  _inputText.value = null;
1302
- } else if (!isNaN(Number(val)) && Number(val) <= props.max && Number(val) >= props.min) {
1310
+ } else if (!isNaN(Number(val)) && (!props.clamp || Number(val) <= props.max && Number(val) >= props.min)) {
1303
1311
  model.value = Number(val);
1304
1312
  _inputText.value = val;
1305
1313
  }
@@ -1323,9 +1331,6 @@ const canDecrease = computed(() => {
1323
1331
  return (model.value ?? 0) - props.step >= props.min;
1324
1332
  });
1325
1333
  watch(() => props.precision, () => formatInputValue());
1326
- onMounted(() => {
1327
- clampModel();
1328
- });
1329
1334
  /*********************************************************
1330
1335
  * Spinbutton role (non-compact input)
1331
1336
  *
@@ -1471,7 +1476,7 @@ const handleClear = (e) => {
1471
1476
  emits("click:clear", e);
1472
1477
  };
1473
1478
  const clampModel = () => {
1474
- if (controlsDisabled.value) return;
1479
+ if (controlsDisabled.value || !props.clamp) return;
1475
1480
  const actualText = _inputText.value ?? origamTextFieldRef.value?.value ?? null;
1476
1481
  if (actualText && !isNaN(Number(actualText))) {
1477
1482
  const clamped = clamp(Number(actualText), props.min, props.max);
@@ -1532,6 +1537,14 @@ const textFieldProps = computed(() => {
1532
1537
  "validationValue"
1533
1538
  ]);
1534
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);
1535
1548
  const hasAppendInner = computed(() => {
1536
1549
  return slots.appendInner || !props.hideControls;
1537
1550
  });
@@ -1569,8 +1582,7 @@ const compactInputText = computed({
1569
1582
  if (val === "") {
1570
1583
  model.value = null;
1571
1584
  } else if (!isNaN(Number(val))) {
1572
- const clamped = clamp(Number(val), props.min, props.max);
1573
- model.value = clamped;
1585
+ model.value = props.clamp ? clamp(Number(val), props.min, props.max) : Number(val);
1574
1586
  }
1575
1587
  }
1576
1588
  });