origam 2.44.0 → 2.45.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 (42) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/dist/src/assets/css/main.css +1 -1
  3. package/dist/src/assets/css/tokens/dark-pinned.css +3 -3
  4. package/dist/src/assets/css/tokens/dark-system.css +3 -3
  5. package/dist/src/assets/css/tokens/dark.css +6 -6
  6. package/dist/src/assets/css/tokens/light.css +3 -3
  7. package/dist/src/assets/scss/_ripple.scss +47 -0
  8. package/dist/src/assets/scss/main.scss +3 -0
  9. package/dist/src/assets/scss/tokens/_dark.scss +6 -6
  10. package/dist/src/assets/scss/tokens/_light.scss +3 -3
  11. package/dist/src/components/Audio/OrigamAudio.vue +1 -1
  12. package/dist/src/components/Chart/OrigamChartRadar.vue +1 -1
  13. package/dist/src/components/DataList/OrigamDataText.vue +1 -1
  14. package/dist/src/components/DataList/OrigamDataTitle.vue +1 -1
  15. package/dist/src/components/DatePicker/OrigamDatePickerControls.vue +1 -1
  16. package/dist/src/components/Drawer/OrigamDrawer.vue +65 -3
  17. package/dist/src/components/ExpansionPanel/OrigamExpansionPanel.vue +6 -4
  18. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelContent.vue +1 -1
  19. package/dist/src/components/ExpansionPanel/OrigamExpansionPanelHeader.vue +1 -1
  20. package/dist/src/components/List/OrigamListChildren.vue +1 -1
  21. package/dist/src/components/List/OrigamListItem.vue +5 -5
  22. package/dist/src/components/Video/OrigamVideo.vue +1 -1
  23. package/dist/src/composables/Commons/style.composable.cjs +3 -2
  24. package/dist/src/composables/Commons/style.composable.js +3 -2
  25. package/dist/src/consts/Commons/style.const.cjs +9 -0
  26. package/dist/src/consts/Commons/style.const.d.ts +26 -0
  27. package/dist/src/consts/Commons/style.const.js +3 -0
  28. package/dist/src/consts/index.cjs +11 -0
  29. package/dist/src/consts/index.d.ts +1 -0
  30. package/dist/src/consts/index.js +1 -0
  31. package/dist/src/interfaces/DataList/data-text.interface.d.ts +1 -1
  32. package/dist/src/interfaces/DataList/data-title.interface.d.ts +2 -2
  33. package/dist/src/interfaces/ExpansionPanel/expansion-panel.interface.d.ts +1 -0
  34. package/dist/src/themes/origam.theme.cjs +0 -2
  35. package/dist/src/themes/origam.theme.js +2 -2
  36. package/dist/src/utils/Commons/style.util.cjs +30 -0
  37. package/dist/src/utils/Commons/style.util.d.ts +18 -0
  38. package/dist/src/utils/Commons/style.util.js +23 -0
  39. package/dist/src/utils/index.cjs +11 -0
  40. package/dist/src/utils/index.d.ts +1 -0
  41. package/dist/src/utils/index.js +1 -0
  42. package/package.json +1 -1
@@ -2053,13 +2053,13 @@
2053
2053
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
2054
2054
  --origam-expansion-panel__inset---max-width: 100%;
2055
2055
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
2056
- --origam-data-list---background-color: var(--origam-color__surface---default);
2057
- --origam-data-list---color: var(--origam-color__text---primary);
2056
+ --origam-data-list---background-color: transparent;
2057
+ --origam-data-list---color: inherit;
2058
2058
  --origam-data-list---border-radius: var(--origam-radius---none);
2059
2059
  --origam-data-list---padding: var(--origam-space---0);
2060
2060
  --origam-data-list---gap: var(--origam-space---0);
2061
2061
  --origam-data-list---display: block;
2062
- --origam-data-list---overflow: hidden;
2062
+ --origam-data-list---overflow: visible;
2063
2063
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
2064
2064
  --origam-data-list__item---padding: var(--origam-space---0);
2065
2065
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -1877,13 +1877,13 @@
1877
1877
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
1878
1878
  --origam-expansion-panel__inset---max-width: 100%;
1879
1879
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
1880
- --origam-data-list---background-color: var(--origam-color__surface---default);
1881
- --origam-data-list---color: var(--origam-color__text---primary);
1880
+ --origam-data-list---background-color: transparent;
1881
+ --origam-data-list---color: inherit;
1882
1882
  --origam-data-list---border-radius: var(--origam-radius---none);
1883
1883
  --origam-data-list---padding: var(--origam-space---0);
1884
1884
  --origam-data-list---gap: var(--origam-space---0);
1885
1885
  --origam-data-list---display: block;
1886
- --origam-data-list---overflow: hidden;
1886
+ --origam-data-list---overflow: visible;
1887
1887
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
1888
1888
  --origam-data-list__item---padding: var(--origam-space---0);
1889
1889
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -2053,13 +2053,13 @@
2053
2053
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
2054
2054
  --origam-expansion-panel__inset---max-width: 100%;
2055
2055
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
2056
- --origam-data-list---background-color: var(--origam-color__surface---default);
2057
- --origam-data-list---color: var(--origam-color__text---primary);
2056
+ --origam-data-list---background-color: transparent;
2057
+ --origam-data-list---color: inherit;
2058
2058
  --origam-data-list---border-radius: var(--origam-radius---none);
2059
2059
  --origam-data-list---padding: var(--origam-space---0);
2060
2060
  --origam-data-list---gap: var(--origam-space---0);
2061
2061
  --origam-data-list---display: block;
2062
- --origam-data-list---overflow: hidden;
2062
+ --origam-data-list---overflow: visible;
2063
2063
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
2064
2064
  --origam-data-list__item---padding: var(--origam-space---0);
2065
2065
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -5110,13 +5110,13 @@
5110
5110
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
5111
5111
  --origam-expansion-panel__inset---max-width: 100%;
5112
5112
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
5113
- --origam-data-list---background-color: var(--origam-color__surface---default);
5114
- --origam-data-list---color: var(--origam-color__text---primary);
5113
+ --origam-data-list---background-color: transparent;
5114
+ --origam-data-list---color: inherit;
5115
5115
  --origam-data-list---border-radius: var(--origam-radius---none);
5116
5116
  --origam-data-list---padding: var(--origam-space---0);
5117
5117
  --origam-data-list---gap: var(--origam-space---0);
5118
5118
  --origam-data-list---display: block;
5119
- --origam-data-list---overflow: hidden;
5119
+ --origam-data-list---overflow: visible;
5120
5120
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
5121
5121
  --origam-data-list__item---padding: var(--origam-space---0);
5122
5122
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -1955,13 +1955,13 @@
1955
1955
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
1956
1956
  --origam-expansion-panel__inset---max-width: 100%;
1957
1957
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
1958
- --origam-data-list---background-color: var(--origam-color__surface---default);
1959
- --origam-data-list---color: var(--origam-color__text---primary);
1958
+ --origam-data-list---background-color: transparent;
1959
+ --origam-data-list---color: inherit;
1960
1960
  --origam-data-list---border-radius: var(--origam-radius---none);
1961
1961
  --origam-data-list---padding: var(--origam-space---0);
1962
1962
  --origam-data-list---gap: var(--origam-space---0);
1963
1963
  --origam-data-list---display: block;
1964
- --origam-data-list---overflow: hidden;
1964
+ --origam-data-list---overflow: visible;
1965
1965
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
1966
1966
  --origam-data-list__item---padding: var(--origam-space---0);
1967
1967
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -0,0 +1,47 @@
1
+ // Ripple directive (`v-ripple`) — styles of the nodes `RIPPLES.show` appends to
2
+ // its host (consts/Commons/ripple.const.ts). #1177: no sheet styled them, so the
3
+ // container sat `static` in the host's flow (Btn 77.0 → 78.1 px on press) and the
4
+ // wave had no fill. The container is absolute + clipped, so it never takes part
5
+ // in the host's layout; the wave paints `currentColor`.
6
+
7
+ .origam-ripple__container {
8
+ position: absolute;
9
+ inset: 0;
10
+ z-index: 0;
11
+ overflow: hidden;
12
+ border-radius: inherit;
13
+ pointer-events: none;
14
+ contain: strict;
15
+ }
16
+
17
+ .origam-ripple__animation {
18
+ position: absolute;
19
+ top: 0;
20
+ left: 0;
21
+ border-radius: 50%;
22
+ background: currentColor;
23
+ opacity: 0;
24
+ pointer-events: none;
25
+ will-change: transform, opacity;
26
+
27
+ &--enter {
28
+ transition: none;
29
+ opacity: 0;
30
+ }
31
+
32
+ &--in {
33
+ transition: transform 0.25s cubic-bezier(0, 0, 0.2, 1), opacity 0.1s cubic-bezier(0, 0, 0.2, 1);
34
+ opacity: 0.3;
35
+ }
36
+
37
+ &--out {
38
+ transition: opacity 0.3s cubic-bezier(0, 0, 0.2, 1);
39
+ opacity: 0;
40
+ }
41
+ }
42
+
43
+ @media (prefers-reduced-motion: reduce) {
44
+ .origam-ripple__animation {
45
+ transition: none;
46
+ }
47
+ }
@@ -30,6 +30,9 @@
30
30
  // equal specificity (0,1,0) thanks to source order.
31
31
  @forward 'tokens/origam-utilities';
32
32
 
33
+ // Ripple directive nodes (#1177).
34
+ @forward 'ripple';
35
+
33
36
  // Public mixin surface.
34
37
  @forward 'helpers';
35
38
 
@@ -2053,13 +2053,13 @@
2053
2053
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
2054
2054
  --origam-expansion-panel__inset---max-width: 100%;
2055
2055
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
2056
- --origam-data-list---background-color: var(--origam-color__surface---default);
2057
- --origam-data-list---color: var(--origam-color__text---primary);
2056
+ --origam-data-list---background-color: transparent;
2057
+ --origam-data-list---color: inherit;
2058
2058
  --origam-data-list---border-radius: var(--origam-radius---none);
2059
2059
  --origam-data-list---padding: var(--origam-space---0);
2060
2060
  --origam-data-list---gap: var(--origam-space---0);
2061
2061
  --origam-data-list---display: block;
2062
- --origam-data-list---overflow: hidden;
2062
+ --origam-data-list---overflow: visible;
2063
2063
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
2064
2064
  --origam-data-list__item---padding: var(--origam-space---0);
2065
2065
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -5110,13 +5110,13 @@
5110
5110
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
5111
5111
  --origam-expansion-panel__inset---max-width: 100%;
5112
5112
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
5113
- --origam-data-list---background-color: var(--origam-color__surface---default);
5114
- --origam-data-list---color: var(--origam-color__text---primary);
5113
+ --origam-data-list---background-color: transparent;
5114
+ --origam-data-list---color: inherit;
5115
5115
  --origam-data-list---border-radius: var(--origam-radius---none);
5116
5116
  --origam-data-list---padding: var(--origam-space---0);
5117
5117
  --origam-data-list---gap: var(--origam-space---0);
5118
5118
  --origam-data-list---display: block;
5119
- --origam-data-list---overflow: hidden;
5119
+ --origam-data-list---overflow: visible;
5120
5120
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
5121
5121
  --origam-data-list__item---padding: var(--origam-space---0);
5122
5122
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -1955,13 +1955,13 @@
1955
1955
  --origam-expansion-panel__popout---max-width-active: calc(100% + 16px);
1956
1956
  --origam-expansion-panel__inset---max-width: 100%;
1957
1957
  --origam-expansion-panel__inset---max-width-active: calc(100% - 32px);
1958
- --origam-data-list---background-color: var(--origam-color__surface---default);
1959
- --origam-data-list---color: var(--origam-color__text---primary);
1958
+ --origam-data-list---background-color: transparent;
1959
+ --origam-data-list---color: inherit;
1960
1960
  --origam-data-list---border-radius: var(--origam-radius---none);
1961
1961
  --origam-data-list---padding: var(--origam-space---0);
1962
1962
  --origam-data-list---gap: var(--origam-space---0);
1963
1963
  --origam-data-list---display: block;
1964
- --origam-data-list---overflow: hidden;
1964
+ --origam-data-list---overflow: visible;
1965
1965
  --origam-data-list__item---background-color: rgba(0, 0, 0, 0);
1966
1966
  --origam-data-list__item---padding: var(--origam-space---0);
1967
1967
  --origam-data-list__item---hover-background-color: var(--origam-color__surface---overlay);
@@ -1618,7 +1618,7 @@ const { colorClasses, colorStyles } = useColorEffect(props);
1618
1618
  * cablees a un comportement invente. Elles avertissent une fois, en
1619
1619
  * dev, avec la raison exacte. Meme traitement que la famille Chart.
1620
1620
  ********************************************************/
1621
- useUnsupportedProp("OrigamAudio", "waveformColor", "the waveform paints from `currentColor`; this prop reaches no declaration.", () => props.waveformColor !== undefined);
1621
+ useUnsupportedProp("OrigamAudio", "waveformColor", "the waveform paints from `currentColor`; this prop reaches no declaration.", () => props.waveformColor !== "currentColor");
1622
1622
  const hasColorProp = computed(() => !!props.color);
1623
1623
  const hasBgColorProp = computed(() => !!props.bgColor);
1624
1624
  const scrubberColorStyle = computed(() => {
@@ -570,7 +570,7 @@ const { headerTypographyStyles } = useChartHeaderTypography(props);
570
570
  * comportement fictif : elles avertissent une fois, en dev, avec la
571
571
  * raison exacte. Meme traitement que `OrigamChartGauge`.
572
572
  ********************************************************/
573
- useUnsupportedProp("OrigamChartRadar", "showTooltip", "no tooltip component is rendered by the radar — `ChartTooltip` appears nowhere in its template.", () => props.showTooltip !== undefined);
573
+ useUnsupportedProp("OrigamChartRadar", "showTooltip", "no tooltip component is rendered by the radar — `ChartTooltip` appears nowhere in its template.", () => props.showTooltip === true);
574
574
  const chartAnimationStyle = useChartAnimationStyle(props);
575
575
  const { resizeRef: svgRef, width: svgWidth, height: svgHeight } = useChartSize(CHART_SIZE_FALLBACK.radar, { aspectRatio: CHART_ASPECT_RATIO.radial });
576
576
  const { onKeydown: onChartKeydown } = useChartRoving(svgRef);
@@ -82,7 +82,7 @@ import { computed, StyleValue, toRef } from "vue";
82
82
  const props = defineProps({
83
83
  text: {
84
84
  type: [String, Number],
85
- required: true
85
+ required: false
86
86
  },
87
87
  id: {
88
88
  type: String,
@@ -85,7 +85,7 @@ import { computed, StyleValue, toRef } from "vue";
85
85
  const props = defineProps({
86
86
  text: {
87
87
  type: [String, Number],
88
- required: true
88
+ required: false
89
89
  },
90
90
  id: {
91
91
  type: String,
@@ -170,7 +170,7 @@ const props = defineProps({
170
170
  * (`viewMode` n'en fait plus partie : il pilote `aria-expanded` et le
171
171
  * pivot du chevron des deux boutons mois / annee.)
172
172
  ********************************************************/
173
- useUnsupportedProp("OrigamDatePickerControls", "active", "the controls row reflects the picker view state of its parent; it has no active state of its own.", () => props.active !== undefined);
173
+ useUnsupportedProp("OrigamDatePickerControls", "active", "the controls row reflects the picker view state of its parent; it has no active state of its own.", () => props.active === true);
174
174
  const emits = defineEmits([
175
175
  "click:year",
176
176
  "click:month",
@@ -9,8 +9,11 @@
9
9
  :is="tag"
10
10
  v-if="isActive"
11
11
  :id="id"
12
- :ref="rootEl"
12
+ ref="rootEl"
13
13
  :aria-label="drawerAriaLabel"
14
+ :aria-modal="isModal ? 'true' : undefined"
15
+ :role="isModal ? 'dialog' : undefined"
16
+ :tabindex="isModal ? -1 : undefined"
14
17
  :class="drawerClasses"
15
18
  :style="drawerStyles"
16
19
  v-bind="{...scopeId, ...$attrs}"
@@ -55,7 +58,7 @@
55
58
  </template>
56
59
 
57
60
  <script lang="ts" setup>
58
- import { computed, ComputedRef, isRef, nextTick, onBeforeMount, onServerPrefetch, Ref, ref, shallowRef, StyleValue, toRef, useSlots, watch } from "vue";
61
+ import { computed, ComputedRef, isRef, nextTick, onBeforeMount, onBeforeUnmount, onServerPrefetch, Ref, ref, shallowRef, StyleValue, toRef, useSlots, watch } from "vue";
59
62
  import OrigamOverlayScrim from "../Overlay/OrigamOverlayScrim.vue";
60
63
  import OrigamTransition from "../Transition/OrigamTransition.vue";
61
64
  import { useBackgroundColor } from "../../composables/Commons/backgroundColor.composable";
@@ -66,6 +69,7 @@ import { useProps } from "../../composables/Commons/props.composable";
66
69
  import { useRouter } from "../../composables/Commons/router.composable";
67
70
  import { useScopeId } from "../../composables/Commons/scopeId.composable";
68
71
  import { useSsrBoot } from "../../composables/Commons/ssrBoot.composable";
72
+ import { useStack } from "../../composables/Commons/stack.composable";
69
73
  import { useStateEffect } from "../../composables/Commons/stateEffect.composable";
70
74
  import { useStateFlag } from "../../composables/Commons/stateFlag.composable";
71
75
  import { useSticky } from "../../composables/Commons/sticky.composable";
@@ -75,8 +79,10 @@ import { useHydration } from "../../composables/Commons/hydration.composable";
75
79
  import { useToggleScope } from "../../composables/Commons/toggleScope.composable";
76
80
  import { useTouch } from "../../composables/Commons/touch.composable";
77
81
  import { useVModel } from "../../composables/Commons/vModel.composable";
82
+ import { IN_BROWSER } from "../../consts/Commons/commons.const";
78
83
  import { INLINE } from "../../enums/Commons/anchor.enum";
79
- import { int } from "../../utils/Commons/commons.util";
84
+ import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
85
+ import { focusableChildren, int } from "../../utils/Commons/commons.util";
80
86
  /*********************************************************
81
87
  * inheritAttrs — #916 / #853
82
88
  *
@@ -794,6 +800,62 @@ onBeforeMount(initActive);
794
800
  ********************************************************/
795
801
  onServerPrefetch(initActive);
796
802
  /*********************************************************
803
+ * Modal behaviour — #1454
804
+ *
805
+ * @description
806
+ * A `temporary` drawer with a scrim blocks the page behind it, so it is
807
+ * modal: `role="dialog"` + `aria-modal`, focus trapped inside, Escape
808
+ * closes it (top of the global stack only, same `useStack` as the
809
+ * Overlay family), and focus returns to whatever held it before opening.
810
+ ********************************************************/
811
+ const isModal = computed(() => isActive.value && isTemporary.value && !!props.scrim);
812
+ const { globalTop } = useStack(isModal, shallowRef(1e3), shallowRef(false));
813
+ let returnFocusEl = null;
814
+ /*********************************************************
815
+ * Tab wrap
816
+ *
817
+ * @description
818
+ * Leaving the last focusable moves focus out of the document (no
819
+ * `focusin` fires), so only a keydown guard can trap it.
820
+ ********************************************************/
821
+ const handleModalKeydown = (e) => {
822
+ if (!globalTop.value) return;
823
+ if (e.key === KEYBOARD_VALUES.ESC) {
824
+ isActive.value = false;
825
+ return;
826
+ }
827
+ const el = rootEl.value;
828
+ if (e.key !== KEYBOARD_VALUES.TAB || !el) return;
829
+ const focusable = focusableChildren(el);
830
+ const first = focusable[0] ?? el;
831
+ const last = focusable.at(-1) ?? el;
832
+ const outside = !el.contains(document.activeElement) || document.activeElement === el;
833
+ if (e.shiftKey && (document.activeElement === first || outside)) {
834
+ e.preventDefault();
835
+ last.focus();
836
+ } else if (!e.shiftKey && (document.activeElement === last || outside && !focusable.length)) {
837
+ e.preventDefault();
838
+ first.focus();
839
+ }
840
+ };
841
+ if (IN_BROWSER) {
842
+ watch(isModal, async (val) => {
843
+ if (val) {
844
+ returnFocusEl = document.activeElement;
845
+ window.addEventListener("keydown", handleModalKeydown);
846
+ await nextTick();
847
+ rootEl.value?.focus({ preventScroll: true });
848
+ } else {
849
+ window.removeEventListener("keydown", handleModalKeydown);
850
+ returnFocusEl?.focus({ preventScroll: true });
851
+ returnFocusEl = null;
852
+ }
853
+ }, { immediate: true });
854
+ onBeforeUnmount(() => {
855
+ window.removeEventListener("keydown", handleModalKeydown);
856
+ });
857
+ }
858
+ /*********************************************************
797
859
  * Drag
798
860
  *
799
861
  * @description
@@ -114,10 +114,11 @@ import { useBothColor } from "../../composables/Commons/bothColor.composable";
114
114
  import { useDensity } from "../../composables/Commons/density.composable";
115
115
  import { useGroupItem } from "../../composables/Commons/groupItem.composable";
116
116
  import { useLoader } from "../../composables/Commons/loader.composable";
117
- import { useProps } from "../../composables/Commons/props.composable";
117
+ import { filterPropsOf, useProps } from "../../composables/Commons/props.composable";
118
118
  import { useStateEffect } from "../../composables/Commons/stateEffect.composable";
119
119
  import { useStateFlag } from "../../composables/Commons/stateFlag.composable";
120
120
  import { useStyle } from "../../composables/Commons/style.composable";
121
+ import { getUid } from "../../utils/Commons/getCurrentInstance.util";
121
122
  import vContrast from "../../directives/Contrast/contrast.directive";
122
123
  import { ORIGAM_EXPANSION_PANEL_KEY } from "../../consts/ExpansionPanel/expansion-panel.const";
123
124
  import { LOADER_KIND } from "../../enums/Commons/loader.enum";
@@ -785,7 +786,8 @@ if (groupItem !== null) {
785
786
  provide(ORIGAM_EXPANSION_PANEL_KEY, {
786
787
  ...groupItem,
787
788
  headerId,
788
- contentId
789
+ contentId,
790
+ uid: getUid()
789
791
  });
790
792
  }
791
793
  /*********************************************************
@@ -832,7 +834,7 @@ const hasHeader = computed(() => {
832
834
  * Forwarded props
833
835
  ********************************************************/
834
836
  const expansionPanelHeaderProps = computed(() => {
835
- return origamExpansionPanelHeaderRef.value?.filterProps(props, [
837
+ return filterPropsOf(OrigamExpansionPanelHeader, props, [
836
838
  "class",
837
839
  "id",
838
840
  "style",
@@ -840,7 +842,7 @@ const expansionPanelHeaderProps = computed(() => {
840
842
  ]);
841
843
  });
842
844
  const expansionPanelContentProps = computed(() => {
843
- return origamExpansionPanelContentRef.value?.filterProps(props, [
845
+ return filterPropsOf(OrigamExpansionPanelContent, props, [
844
846
  "class",
845
847
  "id",
846
848
  "style",
@@ -606,7 +606,7 @@ if (!expansionPanel) throw new Error("[Origam] expansion-panel-content needs to
606
606
  * `aria-controls` at the REAL id instead of guessing the
607
607
  * generated-fallback naming scheme (#519, #520).
608
608
  ********************************************************/
609
- const contentDomId = computed(() => props.id || `expansion-panel-content-${expansionPanel.id}`);
609
+ const contentDomId = computed(() => props.id || `expansion-panel-content-${expansionPanel.uid}`);
610
610
  watchEffect(() => {
611
611
  expansionPanel.contentId.value = contentDomId.value;
612
612
  });
@@ -703,7 +703,7 @@ const slots = useSlots();
703
703
  * `aria-labelledby` at the REAL id instead of guessing the
704
704
  * generated-fallback naming scheme (#519, #520).
705
705
  ********************************************************/
706
- const headerDomId = computed(() => props.id || `expansion-panel-header-${expansionPanel.id}`);
706
+ const headerDomId = computed(() => props.id || `expansion-panel-header-${expansionPanel.uid}`);
707
707
  watchEffect(() => {
708
708
  expansionPanel.headerId.value = headerDomId.value;
709
709
  });
@@ -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
  ********************************************************/
@@ -931,9 +931,6 @@ const ariaSelected = computed(() => {
931
931
  const ariaDisabled = computed(() => {
932
932
  return isOption.value ? props.disabled : undefined;
933
933
  });
934
- const isLink = computed(() => {
935
- return props.link && link.isLink.value;
936
- });
937
934
  // `isClickable` drives cursor: pointer, the ripple, the keydown
938
935
  // handler, the `--link` modifier class, the focusable tabindex, and
939
936
  // the click bridge. It must be true whenever the item is interactive
@@ -994,7 +991,7 @@ const handleClick = (e) => {
994
991
  * handleKeyDown (#439)
995
992
  *
996
993
  * @description
997
- * `@keydown="isClickable && !isLink && handleKeyDown"` used to compile
994
+ * `@keydown="isClickable && !link.isLink && handleKeyDown"` used to compile
998
995
  * to `$event => (cond && _ctx.handleKeyDown)` — Vue's inline-statement
999
996
  * form for anything more complex than a bare member expression. The
1000
997
  * expression EVALUATES `handleKeyDown` (a function reference) and
@@ -1004,9 +1001,12 @@ const handleClick = (e) => {
1004
1001
  * form Vue auto-invokes with `$event`) — the guard moves in here,
1005
1002
  * where wrapping it in `&&`/`?:` again can't silently undo the fix
1006
1003
  * (see issue #439 / #397).
1004
+ * @description
1005
+ * #1066 — a row with `href`/`to` is a real <a>: Enter is native. Intercepting it
1006
+ * (preventDefault) made vue-router's navigate() bail on `defaultPrevented`.
1007
1007
  ********************************************************/
1008
1008
  const handleKeyDown = (e) => {
1009
- if (!isClickable.value || isLink.value) return;
1009
+ if (!isClickable.value || link.isLink.value) return;
1010
1010
  if (e.key === KEYBOARD_VALUES.ENTER || e.key === " ") {
1011
1011
  e.preventDefault();
1012
1012
  click(e);
@@ -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
  /*********************************************************
@@ -8,17 +8,18 @@ var _vue = require("vue");
8
8
  var _ssrStyle = require("../../consts/Commons/ssr-style.const.cjs");
9
9
  var _dom = require("../../utils/Commons/dom.util.cjs");
10
10
  var _getCurrentInstance = require("../../utils/Commons/getCurrentInstance.util.cjs");
11
+ var _style = require("../../utils/Commons/style.util.cjs");
11
12
  var _styleTag = require("./styleTag.composable.cjs");
12
13
  function toKebabCase(key) {
13
14
  return key.startsWith("--") ? key : key.replace(/[A-Z]/g, letter => `-${letter.toLowerCase()}`);
14
15
  }
15
16
  function toDeclarations(value) {
16
17
  if (value == null || typeof value === "boolean" || typeof value === "number") return [];
17
- if (typeof value === "string") return value.length > 0 ? [value] : [];
18
+ if (typeof value === "string") return (0, _style.toSafeCssDeclarations)(value);
18
19
  if (Array.isArray(value)) return value.flatMap(toDeclarations);
19
20
  if (typeof value === "object") {
20
21
  const bag = value;
21
- return Object.keys(bag).filter(key => typeof bag[key] !== "undefined").map(key => `${toKebabCase(key)}: ${bag[key]}`);
22
+ return Object.keys(bag).filter(key => typeof bag[key] !== "undefined").map(key => (0, _style.toSafeCssDeclaration)(toKebabCase(key), String(bag[key]))).filter(declaration => declaration !== null);
22
23
  }
23
24
  return [];
24
25
  }
@@ -2,17 +2,18 @@ import { computed, getCurrentInstance, inject, onMounted, toValue } from "vue";
2
2
  import { ORIGAM_SSR_STYLES_KEY, SSR_STYLE_TAG_PREFIX } from "../../consts/Commons/ssr-style.const.js";
3
3
  import { escapeCssIdent } from "../../utils/Commons/dom.util.js";
4
4
  import { getCurrentInstanceName, getUid } from "../../utils/Commons/getCurrentInstance.util.js";
5
+ import { toSafeCssDeclaration, toSafeCssDeclarations } from "../../utils/Commons/style.util.js";
5
6
  import { useStyleTag } from "./styleTag.composable.js";
6
7
  function toKebabCase(key) {
7
8
  return key.startsWith("--") ? key : key.replace(/[A-Z]/g, (letter) => `-${letter.toLowerCase()}`);
8
9
  }
9
10
  function toDeclarations(value) {
10
11
  if (value == null || typeof value === "boolean" || typeof value === "number") return [];
11
- if (typeof value === "string") return value.length > 0 ? [value] : [];
12
+ if (typeof value === "string") return toSafeCssDeclarations(value);
12
13
  if (Array.isArray(value)) return value.flatMap(toDeclarations);
13
14
  if (typeof value === "object") {
14
15
  const bag = value;
15
- return Object.keys(bag).filter((key) => typeof bag[key] !== "undefined").map((key) => `${toKebabCase(key)}: ${bag[key]}`);
16
+ return Object.keys(bag).filter((key) => typeof bag[key] !== "undefined").map((key) => toSafeCssDeclaration(toKebabCase(key), String(bag[key]))).filter((declaration) => declaration !== null);
16
17
  }
17
18
  return [];
18
19
  }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.CSS_UNSAFE_VALUE_REGEX = exports.CSS_PROPERTY_NAME_REGEX = exports.CSS_LITERAL_REGEX = void 0;
7
+ const CSS_LITERAL_REGEX = exports.CSS_LITERAL_REGEX = /"(?:[^"\\\n\r\f]|\\.)*"|'(?:[^'\\\n\r\f]|\\.)*'|url\(\s*[^\s"'()\\]*\s*\)/gi;
8
+ const CSS_UNSAFE_VALUE_REGEX = exports.CSS_UNSAFE_VALUE_REGEX = /[;{}<>@\\\n\r\f"']|\/\*|\*\/|expression\s*\(/i;
9
+ const CSS_PROPERTY_NAME_REGEX = exports.CSS_PROPERTY_NAME_REGEX = /^(?:--[\w-]+|-?[a-z][a-z0-9-]*)$/i;
@@ -0,0 +1,26 @@
1
+ /*********************************************************
2
+ * CSS_LITERAL_REGEX / CSS_UNSAFE_VALUE_REGEX / CSS_PROPERTY_NAME_REGEX (#1113)
3
+ *
4
+ * @description
5
+ * `useStyle()` serialises style values into the TEXT of a stylesheet, so a
6
+ * value is only safe when it cannot leave its declaration.
7
+ *
8
+ * @description
9
+ * `CSS_LITERAL_REGEX` matches the two places where `;`, `{`, `}` are plain
10
+ * content to the CSS tokenizer: a balanced quoted string and an unquoted
11
+ * `url(…)` body (`url(data:image/png;base64,…)`). They are masked before the
12
+ * unsafe test, so a `font-family: "A;B"` or a data URL keeps passing.
13
+ *
14
+ * @description
15
+ * `CSS_UNSAFE_VALUE_REGEX`, run on the MASKED value: a declaration or block
16
+ * boundary (`;` `{` `}`), markup (`<` `>`), an at-rule (`@`), an escape (`\`,
17
+ * which can spell `}` as `\7d`), a line break, a comment, a quote left
18
+ * unbalanced by the mask, or IE's `expression(`.
19
+ *
20
+ * @description
21
+ * `CSS_PROPERTY_NAME_REGEX`: a custom property (`--origam-btn---bg`) or a
22
+ * plain / vendor-prefixed property name, nothing else.
23
+ ********************************************************/
24
+ export declare const CSS_LITERAL_REGEX: RegExp;
25
+ export declare const CSS_UNSAFE_VALUE_REGEX: RegExp;
26
+ export declare const CSS_PROPERTY_NAME_REGEX: RegExp;
@@ -0,0 +1,3 @@
1
+ export const CSS_LITERAL_REGEX = /"(?:[^"\\\n\r\f]|\\.)*"|'(?:[^'\\\n\r\f]|\\.)*'|url\(\s*[^\s"'()\\]*\s*\)/gi;
2
+ export const CSS_UNSAFE_VALUE_REGEX = /[;{}<>@\\\n\r\f"']|\/\*|\*\/|expression\s*\(/i;
3
+ export const CSS_PROPERTY_NAME_REGEX = /^(?:--[\w-]+|-?[a-z][a-z0-9-]*)$/i;
@@ -80,6 +80,17 @@ Object.keys(_ssrStyle).forEach(function (key) {
80
80
  }
81
81
  });
82
82
  });
83
+ var _style = require("./Commons/style.const.cjs");
84
+ Object.keys(_style).forEach(function (key) {
85
+ if (key === "default" || key === "__esModule") return;
86
+ if (key in exports && exports[key] === _style[key]) return;
87
+ Object.defineProperty(exports, key, {
88
+ enumerable: true,
89
+ get: function () {
90
+ return _style[key];
91
+ }
92
+ });
93
+ });
83
94
  var _density = require("./Commons/density.const.cjs");
84
95
  Object.keys(_density).forEach(function (key) {
85
96
  if (key === "default" || key === "__esModule") return;
@@ -5,6 +5,7 @@ export * from './Commons/commons.const';
5
5
  export * from './Commons/date.const';
6
6
  export * from './Commons/defaults.const';
7
7
  export * from './Commons/ssr-style.const';
8
+ export * from './Commons/style.const';
8
9
  export * from './Commons/density.const';
9
10
  export * from './Commons/dimension.const';
10
11
  export * from './Commons/layout.const';
@@ -5,6 +5,7 @@ export * from "./Commons/commons.const.js";
5
5
  export * from "./Commons/date.const.js";
6
6
  export * from "./Commons/defaults.const.js";
7
7
  export * from "./Commons/ssr-style.const.js";
8
+ export * from "./Commons/style.const.js";
8
9
  export * from "./Commons/density.const.js";
9
10
  export * from "./Commons/dimension.const.js";
10
11
  export * from "./Commons/layout.const.js";
@@ -5,7 +5,7 @@ import type { IDensityProps } from '../Commons/density.interface';
5
5
  import type { IMarginProps } from '../Commons/margin.interface';
6
6
  import type { IPaddingProps } from '../Commons/padding.interface';
7
7
  export interface IDataTextProps extends ICommonsComponentProps, IAdjacentProps, IDensityProps, IMarginProps, IPaddingProps, IColorProps, IBgColorProps {
8
- text: string | number;
8
+ text?: string | number;
9
9
  }
10
10
  /*********************************************************
11
11
  * IDataTextEmits
@@ -5,7 +5,7 @@ import type { IDensityProps } from '../Commons/density.interface';
5
5
  import type { IMarginProps } from '../Commons/margin.interface';
6
6
  import type { IPaddingProps } from '../Commons/padding.interface';
7
7
  export interface IDataTitleProps extends ICommonsComponentProps, IAdjacentProps, IDensityProps, IMarginProps, IPaddingProps, IColorProps, IBgColorProps {
8
- text: string | number;
8
+ text?: string | number;
9
9
  }
10
10
  /*********************************************************
11
11
  * IDataTitleEmits
@@ -19,6 +19,6 @@ export interface IDataTitleEmits extends IAdjacentEmits {
19
19
  /** Slot signatures for `<OrigamDataTitle>`. */
20
20
  export interface IDataTitleSlots extends IAdjacentSlots {
21
21
  default?: (data: {
22
- text: string | number;
22
+ text?: string | number;
23
23
  }) => any;
24
24
  }
@@ -39,6 +39,7 @@ export interface IExpansionPanelProps extends ITagProps, ICommonsComponentProps,
39
39
  export interface IExpansionPanelGroupItemProvide extends IGroupItemProvide {
40
40
  headerId: Ref<string | undefined>;
41
41
  contentId: Ref<string | undefined>;
42
+ uid: string;
42
43
  }
43
44
  /** Emits fired by `<OrigamExpansionPanel>` — group membership lifecycle. */
44
45
  export interface IExpansionPanelEmits extends IGroupEmits {