origam 2.37.19 → 2.37.21

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.
@@ -342,6 +342,7 @@
342
342
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
343
343
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
344
344
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
345
+ --origam-btn---border-compensation: 0px;
345
346
  --origam-btn---backdrop-filter-ghost: blur(8px);
346
347
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
347
348
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -3368,6 +3369,7 @@
3368
3369
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
3369
3370
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
3370
3371
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
3372
+ --origam-btn---border-compensation: 0px;
3371
3373
  --origam-btn---backdrop-filter-ghost: blur(8px);
3372
3374
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
3373
3375
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -242,6 +242,7 @@
242
242
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
243
243
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
244
244
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
245
+ --origam-btn---border-compensation: 0px;
245
246
  --origam-btn---backdrop-filter-ghost: blur(8px);
246
247
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
247
248
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -342,6 +342,7 @@
342
342
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
343
343
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
344
344
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
345
+ --origam-btn---border-compensation: 0px;
345
346
  --origam-btn---backdrop-filter-ghost: blur(8px);
346
347
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
347
348
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -3368,6 +3369,7 @@
3368
3369
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
3369
3370
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
3370
3371
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
3372
+ --origam-btn---border-compensation: 0px;
3371
3373
  --origam-btn---backdrop-filter-ghost: blur(8px);
3372
3374
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
3373
3375
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -242,6 +242,7 @@
242
242
  --origam-btn---box-shadow-tonal-active: var(--origam-shadow---xs);
243
243
  --origam-btn---border-width-outlined: var(--origam-border__width---thin);
244
244
  --origam-btn---border-width-ghost: var(--origam-border__width---thin);
245
+ --origam-btn---border-compensation: 0px;
245
246
  --origam-btn---backdrop-filter-ghost: blur(8px);
246
247
  --origam-btn---transition-duration: var(--origam-motion__duration---slow);
247
248
  --origam-btn---transition-easing: var(--origam-motion__easing---standard);
@@ -497,7 +497,7 @@ defineExpose({
497
497
  // plus que `padding-inline`, sans quoi leur shorthand `padding: 0 …`
498
498
  // remettrait ce bloc a zero.
499
499
  padding-block: var(--origam-btn---padding-block, 0);
500
- padding-inline: calc(16px + var(--origam-btn---density-padding-x, 0px));
500
+ padding-inline: calc(16px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
501
501
 
502
502
  width: var(--origam-btn---width, auto);
503
503
  min-width: calc(var(--origam-btn---min-width, 64px) + var(--origam-btn---density, 0px));
@@ -592,7 +592,7 @@ defineExpose({
592
592
  --origam-btn---height: var(--origam-btn---height-xs, 20px);
593
593
  --origam-btn---font-size: 0.625rem;
594
594
  --origam-btn---min-width: 36px;
595
- padding-inline: calc(var(--origam-btn---padding-xs, 8px) + var(--origam-btn---density-padding-x, 0px));
595
+ padding-inline: calc(var(--origam-btn---padding-xs, 8px) + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
596
596
 
597
597
  :deep(.origam-icon) {
598
598
  --origam-btn---font-size: 16px;
@@ -603,7 +603,7 @@ defineExpose({
603
603
  --origam-btn---height: var(--origam-btn---height-sm, 28px);
604
604
  --origam-btn---font-size: 0.75rem;
605
605
  --origam-btn---min-width: 50px;
606
- padding-inline: calc(var(--origam-btn---padding-sm, 12px) + var(--origam-btn---density-padding-x, 0px));
606
+ padding-inline: calc(var(--origam-btn---padding-sm, 12px) + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
607
607
 
608
608
  :deep(.origam-icon) {
609
609
  --origam-btn---font-size: 20px;
@@ -611,7 +611,7 @@ defineExpose({
611
611
  }
612
612
 
613
613
  &--size-default {
614
- padding-inline: calc(var(--origam-btn---padding-md, 16px) + var(--origam-btn---density-padding-x, 0px));
614
+ padding-inline: calc(var(--origam-btn---padding-md, 16px) + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
615
615
 
616
616
  :deep(.origam-icon) {
617
617
  --origam-btn---font-size: 24px;
@@ -622,7 +622,7 @@ defineExpose({
622
622
  --origam-btn---height: var(--origam-btn---height-lg, 44px);
623
623
  --origam-btn---font-size: 1rem;
624
624
  --origam-btn---min-width: 78px;
625
- padding-inline: calc(var(--origam-btn---padding-lg, 20px) + var(--origam-btn---density-padding-x, 0px));
625
+ padding-inline: calc(var(--origam-btn---padding-lg, 20px) + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
626
626
 
627
627
  :deep(.origam-icon) {
628
628
  --origam-btn---font-size: 28px;
@@ -633,7 +633,7 @@ defineExpose({
633
633
  --origam-btn---height: var(--origam-btn---height-xl, 52px);
634
634
  --origam-btn---font-size: 1.125rem;
635
635
  --origam-btn---min-width: 92px;
636
- padding-inline: calc(var(--origam-btn---padding-xl, 24px) + var(--origam-btn---density-padding-x, 0px));
636
+ padding-inline: calc(var(--origam-btn---padding-xl, 24px) + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
637
637
 
638
638
  :deep(.origam-icon) {
639
639
  --origam-btn---font-size: 32px;
@@ -834,6 +834,7 @@ defineExpose({
834
834
  }
835
835
 
836
836
  &--variant-outlined {
837
+ --origam-btn---border-compensation: var(--origam-btn---border-width-outlined, var(--origam-border__width---thin));
837
838
  background-color: transparent !important;
838
839
  border-width: var(--origam-btn---border-width-outlined, var(--origam-border__width---thin));
839
840
  border-style: solid;
@@ -903,6 +904,7 @@ defineExpose({
903
904
  // survol : changement de rendu, pas correction. Ils restent dormants —
904
905
  // meme arbitrage.
905
906
  &--variant-ghost {
907
+ --origam-btn---border-compensation: var(--origam-btn---border-width-ghost, var(--origam-border__width---thin));
906
908
  background-color: var(
907
909
  --origam-btn---background-color-ghost,
908
910
  color-mix(in srgb, currentColor 12%, transparent)
@@ -1065,35 +1067,35 @@ defineExpose({
1065
1067
  --origam-btn---height: 56px;
1066
1068
  font-size: 0.625rem;
1067
1069
  min-width: 56px;
1068
- padding-inline: calc(12px + var(--origam-btn---density-padding-x, 0px));
1070
+ padding-inline: calc(12px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
1069
1071
  }
1070
1072
 
1071
1073
  &#{$this}--size-small {
1072
1074
  --origam-btn---height: 64px;
1073
1075
  font-size: 0.75rem;
1074
1076
  min-width: 64px;
1075
- padding-inline: calc(14px + var(--origam-btn---density-padding-x, 0px));
1077
+ padding-inline: calc(14px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
1076
1078
  }
1077
1079
 
1078
1080
  &#{$this}--size-default {
1079
1081
  --origam-btn---height: 72px;
1080
1082
  font-size: 0.875rem;
1081
1083
  min-width: 72px;
1082
- padding-inline: calc(16px + var(--origam-btn---density-padding-x, 0px));
1084
+ padding-inline: calc(16px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
1083
1085
  }
1084
1086
 
1085
1087
  &#{$this}--size-large {
1086
1088
  --origam-btn---height: 80px;
1087
1089
  font-size: 1rem;
1088
1090
  min-width: 80px;
1089
- padding-inline: calc(18px + var(--origam-btn---density-padding-x, 0px));
1091
+ padding-inline: calc(18px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
1090
1092
  }
1091
1093
 
1092
1094
  &#{$this}--size-x-large {
1093
1095
  --origam-btn---height: 88px;
1094
1096
  font-size: 1.125rem;
1095
1097
  min-width: 88px;
1096
- padding-inline: calc(20px + var(--origam-btn---density-padding-x, 0px));
1098
+ padding-inline: calc(20px + var(--origam-btn---density-padding-x, 0px) - var(--origam-btn---border-compensation, 0px));
1097
1099
  }
1098
1100
 
1099
1101
  &#{$this}--density-comfortable {
@@ -480,7 +480,11 @@ defineExpose({
480
480
  // matche jamais : le premier essai a rendu un ecart de 0px, identique
481
481
  // a l'etat d'avant. `:deep()` pose l'attribut sur l'ANCETRE, qui lui
482
482
  // le porte.
483
- :deep(.origam-list-item + .origam-list-item) {
483
+ // #1249 — a link row sits in `.origam-list-item-wrapper`, so adjacency is read on the wrapper too.
484
+ :deep(.origam-list-item + .origam-list-item),
485
+ :deep(.origam-list-item-wrapper + .origam-list-item-wrapper > .origam-list-item),
486
+ :deep(.origam-list-item-wrapper + .origam-list-item),
487
+ :deep(.origam-list-item + .origam-list-item-wrapper > .origam-list-item) {
484
488
  margin-block-start: var(--origam-list--nav---item-gap, 2px);
485
489
  }
486
490
  }
@@ -1,4 +1,5 @@
1
1
  <template>
2
+ <origam-list-item-wrapper :role="wrapperRole">
2
3
  <component
3
4
  :is="link.tag.value"
4
5
  :id="styleId"
@@ -7,9 +8,10 @@
7
8
  :aria-selected="ariaSelected"
8
9
  :class="listItemClasses"
9
10
  :href="link.href.value"
10
- :role="itemRole"
11
+ :role="anchorRole"
11
12
  :style="listItemStyles"
12
13
  :tabindex="listItemTabIndex"
14
+ v-bind="$attrs"
13
15
  @click="handleClick"
14
16
  @keydown="handleKeyDown"
15
17
  >
@@ -115,12 +117,14 @@
115
117
  </div>
116
118
  </slot>
117
119
  </component>
120
+ </origam-list-item-wrapper>
118
121
  </template>
119
122
 
120
123
  <script lang="ts" setup>
121
124
  import { computed, onBeforeMount, StyleValue, toRef, useAttrs, useSlots, watch } from "vue";
122
125
  import OrigamAvatar from "../Avatar/OrigamAvatar.vue";
123
126
  import OrigamIcon from "../Icon/OrigamIcon.vue";
127
+ import OrigamListItemWrapper from "./OrigamListItemWrapper.vue";
124
128
  import { useAccessibleCommand } from "../../composables/Commons/accessibleCommand.composable";
125
129
  import { useAdjacent } from "../../composables/Commons/adjacent.composable";
126
130
  import { useBothColor } from "../../composables/Commons/bothColor.composable";
@@ -139,6 +143,7 @@ import vRipple from "../../directives/Ripple/ripple.directive";
139
143
  import { KEYBOARD_VALUES } from "../../enums/Commons/hotkey.enum";
140
144
  import { LIST_ITEM_ROLE } from "../../enums/List/list-item.enum";
141
145
  const attrs = useAttrs();
146
+ defineOptions({ inheritAttrs: false });
142
147
  const props = defineProps({
143
148
  active: { type: Boolean, required: false },
144
149
  activeClass: { type: String, required: false },
@@ -302,6 +307,15 @@ const isActive = computed(() => {
302
307
  const itemRole = computed(() => {
303
308
  return list && !isGroupActivator ? list.itemRole.value : void 0;
304
309
  });
310
+ const isListitemLink = computed(() => {
311
+ return link.isLink.value && itemRole.value === LIST_ITEM_ROLE.LISTITEM;
312
+ });
313
+ const wrapperRole = computed(() => {
314
+ return isListitemLink.value ? itemRole.value : void 0;
315
+ });
316
+ const anchorRole = computed(() => {
317
+ return isListitemLink.value ? void 0 : itemRole.value;
318
+ });
305
319
  const isOption = computed(() => {
306
320
  return itemRole.value === LIST_ITEM_ROLE.OPTION;
307
321
  });
@@ -666,6 +680,10 @@ defineExpose({
666
680
  --origam-list-item---margin-block-end: 4px;
667
681
  }
668
682
 
683
+ .origam-list-item-wrapper:not(:only-child) > & {
684
+ --origam-list-item---margin-block-end: 4px;
685
+ }
686
+
669
687
  #{$this}__title {
670
688
  --origam-list-item__title---font-size: 0.8125rem;
671
689
  --origam-list-item__title---font-weight: 500;
@@ -0,0 +1,15 @@
1
+ <script>
2
+ import { defineComponent, h } from "vue";
3
+ export default defineComponent({
4
+ name: "OrigamListItemWrapper",
5
+ props: {
6
+ role: { type: String, default: void 0 }
7
+ },
8
+ setup(props, { slots }) {
9
+ return () => {
10
+ const child = slots.default?.();
11
+ return props.role ? h("div", { role: props.role, class: "origam-list-item-wrapper" }, child) : child?.[0];
12
+ };
13
+ }
14
+ });
15
+ </script>
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.SUPPORTS_TOUCH = exports.SUPPORTS_INTERSECTION = exports.SUPPORTS_EYE_DROPPER = exports.REDUCED_MOTION_QUERY = exports.REDUCED_MOTION_ANIMATION_DURATION = exports.ON_REGEX = exports.NAME_ATTR_TAGS = exports.IN_BROWSER = exports.HORIZON = exports.HISTORY = exports.EVENT_PROP = exports.DEFAULT_DOCUMENT = void 0;
6
+ exports.SUPPORTS_TOUCH = exports.SUPPORTS_INTERSECTION = exports.SUPPORTS_EYE_DROPPER = exports.REDUCED_MOTION_QUERY = exports.REDUCED_MOTION_ANIMATION_DURATION = exports.ON_REGEX = exports.NAME_ATTR_TAGS = exports.IN_BROWSER = exports.INTERNAL_COMPONENTS = exports.HORIZON = exports.HISTORY = exports.EVENT_PROP = exports.DEFAULT_DOCUMENT = void 0;
7
7
  const IN_BROWSER = exports.IN_BROWSER = typeof window !== "undefined" && typeof document !== "undefined";
8
8
  const DEFAULT_DOCUMENT = exports.DEFAULT_DOCUMENT = IN_BROWSER ? window.document : void 0;
9
9
  const EVENT_PROP = () => [Function, Array];
@@ -16,4 +16,5 @@ const SUPPORTS_TOUCH = exports.SUPPORTS_TOUCH = IN_BROWSER && ("ontouchstart" in
16
16
  const SUPPORTS_EYE_DROPPER = exports.SUPPORTS_EYE_DROPPER = IN_BROWSER && "EyeDropper" in window;
17
17
  const REDUCED_MOTION_QUERY = exports.REDUCED_MOTION_QUERY = "(prefers-reduced-motion: reduce)";
18
18
  const REDUCED_MOTION_ANIMATION_DURATION = exports.REDUCED_MOTION_ANIMATION_DURATION = 0.01;
19
- const NAME_ATTR_TAGS = exports.NAME_ATTR_TAGS = /* @__PURE__ */new Set(["button", "fieldset", "form", "input", "output", "select", "textarea"]);
19
+ const NAME_ATTR_TAGS = exports.NAME_ATTR_TAGS = /* @__PURE__ */new Set(["button", "fieldset", "form", "input", "output", "select", "textarea"]);
20
+ const INTERNAL_COMPONENTS = exports.INTERNAL_COMPONENTS = ["OrigamListItemWrapper"];
@@ -47,3 +47,14 @@ export declare const REDUCED_MOTION_ANIMATION_DURATION = 0.01;
47
47
  * on this set rather than emitting `name` unconditionally.
48
48
  ********************************************************/
49
49
  export declare const NAME_ATTR_TAGS: ReadonlySet<string>;
50
+ /*********************************************************
51
+ * INTERNAL_COMPONENTS (#1249)
52
+ *
53
+ * @description
54
+ * Components that exist as `.vue` files but are NOT part of the public catalogue: never exported,
55
+ * never documented, never in the playground. The ONE list read by every tool that enumerates
56
+ * `components/**\/*.vue` as the public surface (guards, doc sync extractor, playground catalogue).
57
+ * `scripts/guards/lib/components.mjs` reads this array literal as text: keep it a plain array of
58
+ * string literals.
59
+ ********************************************************/
60
+ export declare const INTERNAL_COMPONENTS: readonly ["OrigamListItemWrapper"];
@@ -18,3 +18,6 @@ export const NAME_ATTR_TAGS = /* @__PURE__ */ new Set([
18
18
  "select",
19
19
  "textarea"
20
20
  ]);
21
+ export const INTERNAL_COMPONENTS = [
22
+ "OrigamListItemWrapper"
23
+ ];