@threadlabs/looma 0.26.0 → 0.26.2

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.
@@ -4,6 +4,10 @@ type __VLS_Slots = {} & {
4
4
  default?: (props: typeof __VLS_1) => any;
5
5
  };
6
6
  declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
7
+ fill: {
8
+ type: PropType<boolean | null>;
9
+ default: boolean;
10
+ };
7
11
  gutters: {
8
12
  type: PropType<"s" | "m" | "l" | null>;
9
13
  default: null;
@@ -13,6 +17,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
13
17
  default: null;
14
18
  };
15
19
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
+ fill: {
21
+ type: PropType<boolean | null>;
22
+ default: boolean;
23
+ };
16
24
  gutters: {
17
25
  type: PropType<"s" | "m" | "l" | null>;
18
26
  default: null;
@@ -22,6 +30,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
22
30
  default: null;
23
31
  };
24
32
  }>> & Readonly<{}>, {
33
+ fill: boolean | null;
25
34
  gutters: "s" | "m" | "l" | null;
26
35
  measure: "narrow" | "wide" | null;
27
36
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
@@ -8,6 +8,14 @@ defineOptions({ inheritAttrs: false })
8
8
 
9
9
  const propValidityContract = {
10
10
  props: {
11
+ fill: {
12
+ type: { kind: 'terminal', name: 'boolean' },
13
+ required: false,
14
+ target: { attribute: 'fill' },
15
+ description:
16
+ 'Keeps the readable width while filling available layout space. Uses a flex column so scrolling children can shrink inside a bounded flex or grid parent.\n Omit it to keep the usual block layout.',
17
+ default: false,
18
+ },
11
19
  gutters: {
12
20
  type: { kind: 'terminal', name: 'keyword' },
13
21
  required: false,
@@ -27,11 +35,19 @@ const propValidityContract = {
27
35
  },
28
36
  } as const
29
37
  const props = defineProps({
38
+ fill: { type: null as unknown as PropType<boolean | null>, default: false },
30
39
  gutters: { type: null as unknown as PropType<'s' | 'm' | 'l' | null>, default: null },
31
40
  measure: { type: null as unknown as PropType<'narrow' | 'wide' | null>, default: null },
32
41
  })
33
- const acceptedProps: Record<string, unknown> = { gutters: null, measure: null }
42
+ const acceptedProps: Record<string, unknown> = { fill: false, gutters: null, measure: null }
34
43
  const checkedProps = computed(() => ({
44
+ fill: checkedProp<boolean>(
45
+ props['fill'],
46
+ { kind: 'terminal', name: 'boolean' },
47
+ false,
48
+ 'fill',
49
+ acceptedProps,
50
+ ) as boolean,
35
51
  gutters: checkedProp<'s' | 'm' | 'l'>(
36
52
  props['gutters'],
37
53
  { kind: 'terminal', name: 'keyword' },
@@ -108,6 +124,7 @@ const hostState = computed(() =>
108
124
  checkedProps.value.measure && 'measure',
109
125
  checkedProps.value.measure != null
110
126
  && `measure=${encodeURIComponent(checkedProps.value.measure)}`,
127
+ checkedProps.value.fill && 'fill',
111
128
  checkedProps.value.gutters && 'gutters',
112
129
  checkedProps.value.gutters != null
113
130
  && `gutters=${encodeURIComponent(checkedProps.value.gutters)}`,
@@ -120,6 +137,7 @@ const hostState = computed(() =>
120
137
  data-component="ui-container"
121
138
  v-bind="nativeAttrs($attrs)"
122
139
  v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
140
+ :data-fill="reflectedProp('fill', 'fill', checkedProps.fill, undefined, false)"
123
141
  :data-gutters="reflectedProp('gutters', 'gutters', checkedProps.gutters, undefined, false)"
124
142
  :data-measure="reflectedProp('measure', 'measure', checkedProps.measure, undefined, false)"
125
143
  :data-ui-container-state="hostState || undefined"
@@ -152,6 +170,14 @@ const hostState = computed(() =>
152
170
  [data-component~="ui-container"][data-ui-container-state~="measure=narrow"] {
153
171
  --_container-measure: 45ch;
154
172
  }
173
+ [data-component~="ui-container"][data-ui-container-state~="fill"] {
174
+ box-sizing: border-box;
175
+ display: flex;
176
+ flex-direction: column;
177
+ flex: 1;
178
+ min-inline-size: 0;
179
+ min-block-size: 0;
180
+ }
155
181
  [data-component~="ui-container"][data-ui-container-state~="measure=wide"] {
156
182
  --_container-measure: 80ch;
157
183
  }
package/vue/UiDialog.vue CHANGED
@@ -350,7 +350,7 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
350
350
  <h2 v-if="checkedProps.label" class="title">{{ checkedProps.label }}</h2>
351
351
  <button class="close" type="button" aria-label="Close" ref="closeElement"></button>
352
352
  </header>
353
- <UiScrollArea class="body"><slot /></UiScrollArea>
353
+ <div class="body"><UiScrollArea :trim="true"><slot /></UiScrollArea></div>
354
354
  <footer><slot name="actions" /></footer>
355
355
  </dialog>
356
356
  </template>
@@ -453,7 +453,7 @@ useComponentHost(() => import('../components/ui-dialog/ui-dialog.js'), {
453
453
  display: none;
454
454
  }
455
455
 
456
- /* Header and actions stay pinned; only the body scrolls when content is long. */
456
+ /* Own the layout wrapper; nested component roots are outside these scoped rules. */
457
457
  header {
458
458
  display: flex;
459
459
  align-items: center;
@@ -534,9 +534,11 @@ html[data-ui-input-modality="touch"] [data-component~="ui-dialog"] .close {
534
534
  }
535
535
 
536
536
  .body {
537
+ display: flex;
538
+ flex-direction: column;
537
539
  flex: 1 1 auto;
538
540
  min-block-size: 0;
539
- padding: var(--ui-space-5);
541
+ padding: var(--ui-space-3) var(--ui-space-5) var(--ui-space-5);
540
542
  }
541
543
 
542
544
  footer {
@@ -545,7 +547,7 @@ footer {
545
547
  flex-wrap: wrap;
546
548
  justify-content: flex-end;
547
549
  gap: var(--ui-space-2);
548
- padding: var(--ui-space-3) var(--ui-space-5);
550
+ padding: 0 var(--ui-space-5) var(--ui-space-5);
549
551
  }
550
552
 
551
553
  footer:empty {
@@ -36,6 +36,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
36
36
  type: PropType<"sm" | "md" | "lg" | null>;
37
37
  default: string;
38
38
  };
39
+ tone: {
40
+ type: PropType<"accent" | "neutral" | null>;
41
+ default: null;
42
+ };
39
43
  variant: {
40
44
  type: PropType<"ghost" | "outline" | "solid" | null>;
41
45
  default: string;
@@ -73,6 +77,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
73
77
  type: PropType<"sm" | "md" | "lg" | null>;
74
78
  default: string;
75
79
  };
80
+ tone: {
81
+ type: PropType<"accent" | "neutral" | null>;
82
+ default: null;
83
+ };
76
84
  variant: {
77
85
  type: PropType<"ghost" | "outline" | "solid" | null>;
78
86
  default: string;
@@ -81,6 +89,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
81
89
  label: string | null;
82
90
  round: boolean | null;
83
91
  size: "sm" | "md" | "lg" | null;
92
+ tone: "neutral" | "accent" | null;
84
93
  variant: "solid" | "outline" | "ghost" | null;
85
94
  disabled: boolean | null;
86
95
  loading: boolean | null;
@@ -71,6 +71,14 @@ const propValidityContract = {
71
71
  values: ['sm', 'md', 'lg'],
72
72
  default: 'md',
73
73
  },
74
+ tone: {
75
+ type: { kind: 'terminal', name: 'keyword' },
76
+ required: false,
77
+ target: { attribute: 'tone' },
78
+ description:
79
+ 'Colour for every variant. When omitted, ghost and outline keep their neutral appearance and solid keeps its accent fill. Set accent for a coloured action\n or neutral for a quiet one. Native aria-pressed="true" keeps an outline toggle visibly pressed; the consumer owns that state.',
80
+ values: ['accent', 'neutral'],
81
+ },
74
82
  variant: {
75
83
  type: { kind: 'terminal', name: 'keyword' },
76
84
  required: false,
@@ -91,6 +99,7 @@ const props = defineProps({
91
99
  pending: { type: null as unknown as PropType<boolean | null>, default: false },
92
100
  round: { type: null as unknown as PropType<boolean | null>, default: false },
93
101
  size: { type: null as unknown as PropType<'sm' | 'md' | 'lg' | null>, default: 'md' },
102
+ tone: { type: null as unknown as PropType<'accent' | 'neutral' | null>, default: null },
94
103
  variant: {
95
104
  type: null as unknown as PropType<'ghost' | 'outline' | 'solid' | null>,
96
105
  default: 'ghost',
@@ -105,6 +114,7 @@ const acceptedProps: Record<string, unknown> = {
105
114
  pending: false,
106
115
  round: false,
107
116
  size: 'md',
117
+ tone: null,
108
118
  variant: 'ghost',
109
119
  }
110
120
  const checkedProps = computed(() => ({
@@ -164,6 +174,13 @@ const checkedProps = computed(() => ({
164
174
  'size',
165
175
  acceptedProps,
166
176
  ) as 'sm' | 'md' | 'lg',
177
+ tone: checkedProp<'accent' | 'neutral'>(
178
+ props['tone'],
179
+ { kind: 'terminal', name: 'keyword' },
180
+ false,
181
+ 'tone',
182
+ acceptedProps,
183
+ ),
167
184
  variant: checkedProp<'ghost' | 'outline' | 'solid'>(
168
185
  props['variant'],
169
186
  { kind: 'terminal', name: 'keyword' },
@@ -269,6 +286,8 @@ if (
269
286
  /** The values the styles' :host-state() rules test. */
270
287
  const hostState = computed(() =>
271
288
  [
289
+ checkedProps.value.tone && 'tone',
290
+ checkedProps.value.tone != null && `tone=${encodeURIComponent(checkedProps.value.tone)}`,
272
291
  checkedProps.value.anticipatory && 'anticipatory',
273
292
  checkedProps.value.variant && 'variant',
274
293
  checkedProps.value.variant != null
@@ -308,6 +327,7 @@ useComponentHost(() => import('../components/ui-icon-button/ui-icon-button.js'),
308
327
  'pending',
309
328
  'round',
310
329
  'size',
330
+ 'tone',
311
331
  'variant',
312
332
  ],
313
333
  propValidity: (name: string) =>
@@ -364,6 +384,7 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
364
384
  :data-pending="reflectedProp('pending', 'pending', checkedProps.pending, undefined, false)"
365
385
  :data-round="reflectedProp('round', 'round', checkedProps.round, undefined, false)"
366
386
  :data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
387
+ :data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
367
388
  :data-variant="reflectedProp('variant', 'variant', checkedProps.variant, undefined, false)"
368
389
  :data-ui-icon-button-state="hostState || undefined"
369
390
  ref="root"
@@ -461,6 +482,25 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
461
482
  color: var(--ui-text-secondary);
462
483
  }
463
484
 
485
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="tone=accent"] {
486
+ --_icon-button-border: var(--ui-accent-solid);
487
+ --_icon-button-hover-border: var(--ui-accent-hover);
488
+ --_icon-button-text: var(--ui-accent-subtle-text, var(--ui-accent-solid));
489
+ --_icon-button-outline-surface: color-mix(
490
+ in srgb,
491
+ var(--ui-accent-solid) 5%,
492
+ var(--ui-surface-default)
493
+ );
494
+ color: var(--_icon-button-text);
495
+ }
496
+
497
+ /* Omitted tone retains the existing accent solid; explicit neutral is additive. */
498
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="tone=neutral"] {
499
+ --_icon-button-solid-surface: var(--ui-text-primary);
500
+ --_icon-button-solid-hover-surface: var(--ui-text-primary);
501
+ --_icon-button-solid-text: var(--ui-surface-default);
502
+ }
503
+
464
504
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"] {
465
505
  position: relative;
466
506
  }
@@ -495,13 +535,13 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
495
535
  }
496
536
 
497
537
  @media (hover: hover) and (pointer: fine) {
498
- [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:not([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="loading"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="pending"], :disabled, [data-ui-proximity="near"], :hover, :focus-visible) {
538
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:not([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="loading"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="pending"], :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible) {
499
539
  border-color: transparent;
500
540
  background-color: transparent;
501
541
  box-shadow: none;
502
542
  }
503
543
 
504
- [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:not([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="loading"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="pending"], :disabled, [data-ui-proximity="near"], :hover, :focus-visible)
544
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:not([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="loading"], [data-component~="ui-icon-button"][data-ui-icon-button-state~="pending"], :disabled, [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)
505
545
  .content {
506
546
  opacity: 0;
507
547
  transform: scale(0.65);
@@ -509,7 +549,7 @@ function concat<T extends unknown[]>(...values: T): ConcatResult<T> {
509
549
  }
510
550
  }
511
551
 
512
- [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:is([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [data-ui-proximity="near"], :hover, :focus-visible)::before {
552
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="anticipatory"]:is([data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"], [aria-pressed="true"], [data-ui-proximity="near"], :hover, :focus-visible)::before {
513
553
  opacity: 0;
514
554
  }
515
555
 
@@ -622,17 +662,26 @@ html[data-ui-input-modality="touch"] [data-component~="ui-icon-button"]::after {
622
662
  }
623
663
 
624
664
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"] {
625
- border-color: var(--ui-icon-button-border, var(--ui-control-border, var(--ui-border-strong)));
626
- background-color: var(--ui-icon-button-outline-surface, var(--ui-surface-default));
665
+ border-color: var(
666
+ --ui-icon-button-border,
667
+ var(--_icon-button-border, var(--ui-control-border, var(--ui-border-strong)))
668
+ );
669
+ background-color: var(
670
+ --ui-icon-button-outline-surface,
671
+ var(--_icon-button-outline-surface, var(--ui-surface-default))
672
+ );
627
673
  background-image: var(--ui-raised-highlight);
628
- color: var(--ui-icon-button-outline-text, var(--ui-text-primary));
674
+ color: var(--ui-icon-button-outline-text, var(--_icon-button-text, var(--ui-text-primary)));
629
675
  box-shadow: var(--ui-raised);
630
676
  }
631
677
 
632
678
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"] {
633
- background-color: var(--ui-icon-button-solid-surface, var(--ui-accent-solid));
679
+ background-color: var(
680
+ --ui-icon-button-solid-surface,
681
+ var(--_icon-button-solid-surface, var(--ui-accent-solid))
682
+ );
634
683
  background-image: var(--ui-raised-highlight);
635
- color: var(--ui-icon-button-solid-text, var(--ui-text-on-accent));
684
+ color: var(--ui-icon-button-solid-text, var(--_icon-button-solid-text, var(--ui-text-on-accent)));
636
685
  box-shadow: var(
637
686
  --ui-icon-button-solid-shadow,
638
687
  0 1px 2px color-mix(in srgb, var(--ui-accent-solid) 18%, transparent)
@@ -645,18 +694,26 @@ html[data-ui-input-modality="touch"] [data-component~="ui-icon-button"]::after {
645
694
  --ui-icon-button-hover-surface,
646
695
  color-mix(in srgb, currentColor 8%, transparent)
647
696
  );
648
- color: var(--ui-icon-button-hover-text, var(--ui-text-primary));
697
+ color: var(--ui-icon-button-hover-text, var(--_icon-button-text, var(--ui-text-primary)));
649
698
  }
650
699
 
651
700
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"]:hover:enabled:not([aria-disabled="true"]) {
652
701
  border-color: var(
653
702
  --ui-icon-button-hover-border,
654
- var(--ui-control-border-hover, var(--ui-control-border))
703
+ var(--_icon-button-hover-border, var(--ui-control-border-hover, var(--ui-control-border)))
655
704
  );
656
705
  }
657
706
 
658
707
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"]:hover:enabled:not([aria-disabled="true"]) {
659
- background-color: var(--ui-icon-button-solid-hover-surface, var(--ui-accent-hover));
708
+ background-color: var(
709
+ --ui-icon-button-solid-hover-surface,
710
+ var(--_icon-button-solid-hover-surface, var(--ui-accent-hover))
711
+ );
712
+ }
713
+
714
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"][data-ui-icon-button-state~="tone=accent"]:hover:enabled:not([aria-disabled="true"]),
715
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=solid"][data-ui-icon-button-state~="tone=neutral"]:hover:enabled:not([aria-disabled="true"]) {
716
+ color: var(--ui-icon-button-solid-text, var(--_icon-button-solid-text, var(--ui-text-on-accent)));
660
717
  }
661
718
 
662
719
  [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=ghost"][aria-expanded="true"]:enabled:not([aria-disabled="true"]) {
@@ -664,7 +721,17 @@ html[data-ui-input-modality="touch"] [data-component~="ui-icon-button"]::after {
664
721
  --ui-icon-button-active-surface,
665
722
  color-mix(in srgb, currentColor 16%, transparent)
666
723
  );
667
- color: var(--ui-icon-button-hover-text, var(--ui-text-primary));
724
+ color: var(--ui-icon-button-hover-text, var(--_icon-button-text, var(--ui-text-primary)));
725
+ box-shadow: var(--ui-pressed);
726
+ }
727
+
728
+ /* Native toggle state persists after pointer release, including during loading. */
729
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"][aria-pressed="true"]:enabled {
730
+ background-color: var(
731
+ --ui-icon-button-active-surface,
732
+ color-mix(in srgb, currentColor 12%, var(--ui-surface-default))
733
+ );
734
+ background-image: none;
668
735
  box-shadow: var(--ui-pressed);
669
736
  }
670
737
 
@@ -698,6 +765,22 @@ html[data-ui-input-modality="touch"] [data-component~="ui-icon-button"]::after {
698
765
  box-shadow: var(--ui-focus-halo);
699
766
  }
700
767
 
768
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"][aria-pressed="true"]:enabled:focus-visible {
769
+ box-shadow:
770
+ var(--ui-pressed),
771
+ var(--ui-focus-halo);
772
+ }
773
+
774
+ @media (forced-colors: active) {
775
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"][aria-pressed="true"]:enabled {
776
+ outline: var(--ui-focus-width) solid Highlight;
777
+ outline-offset: calc(-2 * var(--ui-focus-width));
778
+ }
779
+ [data-component~="ui-icon-button"][data-ui-icon-button-state~="variant=outline"][aria-pressed="true"]:enabled:focus-visible {
780
+ outline-offset: var(--ui-focus-width);
781
+ }
782
+ }
783
+
701
784
  /* Disabled is a flat neutral control, independent of the active variant's tone. */
702
785
  [data-component~="ui-icon-button"]:disabled {
703
786
  border-color: var(--ui-disabled-border);
@@ -16,6 +16,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
16
16
  type: PropType<"content" | "sm" | "md" | "lg" | null>;
17
17
  default: string;
18
18
  };
19
+ trim: {
20
+ type: PropType<boolean | null>;
21
+ default: boolean;
22
+ };
19
23
  }>, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
20
24
  fill: {
21
25
  type: PropType<boolean | null>;
@@ -29,9 +33,14 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
29
33
  type: PropType<"content" | "sm" | "md" | "lg" | null>;
30
34
  default: string;
31
35
  };
36
+ trim: {
37
+ type: PropType<boolean | null>;
38
+ default: boolean;
39
+ };
32
40
  }>> & Readonly<{}>, {
33
41
  fill: boolean | null;
34
42
  size: "sm" | "md" | "content" | "lg" | null;
43
+ trim: boolean | null;
35
44
  orientation: "vertical" | "horizontal" | null;
36
45
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
37
46
  declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
@@ -35,6 +35,14 @@ const propValidityContract = {
35
35
  values: ['content', 'sm', 'md', 'lg'],
36
36
  default: 'content',
37
37
  },
38
+ trim: {
39
+ type: { kind: 'terminal', name: 'boolean' },
40
+ required: false,
41
+ target: { attribute: 'trim' },
42
+ description:
43
+ 'Removes the outer block margins of the first and last projected items when the surrounding panel owns its edge padding. Margins between items remain\n intact.',
44
+ default: false,
45
+ },
38
46
  },
39
47
  } as const
40
48
  const props = defineProps({
@@ -47,11 +55,13 @@ const props = defineProps({
47
55
  type: null as unknown as PropType<'content' | 'sm' | 'md' | 'lg' | null>,
48
56
  default: 'content',
49
57
  },
58
+ trim: { type: null as unknown as PropType<boolean | null>, default: false },
50
59
  })
51
60
  const acceptedProps: Record<string, unknown> = {
52
61
  fill: false,
53
62
  orientation: 'vertical',
54
63
  size: 'content',
64
+ trim: false,
55
65
  }
56
66
  const checkedProps = computed(() => ({
57
67
  fill: checkedProp<boolean>(
@@ -75,6 +85,13 @@ const checkedProps = computed(() => ({
75
85
  'size',
76
86
  acceptedProps,
77
87
  ) as 'content' | 'sm' | 'md' | 'lg',
88
+ trim: checkedProp<boolean>(
89
+ props['trim'],
90
+ { kind: 'terminal', name: 'boolean' },
91
+ false,
92
+ 'trim',
93
+ acceptedProps,
94
+ ) as boolean,
78
95
  }))
79
96
  void checkedProps.value
80
97
  watchSyncEffect(() => {
@@ -137,6 +154,7 @@ if (
137
154
  const hostState = computed(() =>
138
155
  [
139
156
  checkedProps.value.fill && 'fill',
157
+ checkedProps.value.trim && 'trim',
140
158
  checkedProps.value.orientation && 'orientation',
141
159
  checkedProps.value.orientation != null
142
160
  && `orientation=${encodeURIComponent(checkedProps.value.orientation)}`,
@@ -162,7 +180,7 @@ useComponentHost(() => import('../components/ui-scroll-area/ui-scroll-area.js'),
162
180
  ? (incoming[name] ?? incoming[kebab] ?? null)
163
181
  : null
164
182
  },
165
- propNames: ['fill', 'orientation', 'size'],
183
+ propNames: ['fill', 'orientation', 'size', 'trim'],
166
184
  propValidity: (name: string) =>
167
185
  propValidityState({ contract: propValidityContract, values: { ...props } }, name),
168
186
  refs: { content: contentElement },
@@ -177,6 +195,7 @@ useComponentHost(() => import('../components/ui-scroll-area/ui-scroll-area.js'),
177
195
  :data-fill="reflectedProp('fill', 'fill', checkedProps.fill, undefined, false)"
178
196
  :data-orientation="reflectedProp('orientation', 'orientation', checkedProps.orientation, undefined, false)"
179
197
  :data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
198
+ :data-trim="reflectedProp('trim', 'trim', checkedProps.trim, undefined, false)"
180
199
  :data-ui-scroll-area-state="hostState || undefined"
181
200
  ref="root"
182
201
  >
@@ -216,6 +235,19 @@ useComponentHost(() => import('../components/ui-scroll-area/ui-scroll-area.js'),
216
235
  display: flow-root;
217
236
  }
218
237
 
238
+ /* Trim projected edges without changing spacing inside an item. */
239
+ [data-component~="ui-scroll-area"][data-ui-scroll-area-state~="trim"]
240
+ .content
241
+ > :slotted(:first-child) {
242
+ margin-block-start: 0;
243
+ }
244
+
245
+ [data-component~="ui-scroll-area"][data-ui-scroll-area-state~="trim"]
246
+ .content
247
+ > :slotted(:last-child) {
248
+ margin-block-end: 0;
249
+ }
250
+
219
251
  [data-component~="ui-scroll-area"][data-ui-scroll-area-state~="orientation=horizontal"] {
220
252
  overflow-x: auto;
221
253
  overflow-y: hidden;
@@ -46,12 +46,13 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
46
46
  },
47
47
  required: false,
48
48
  target: { attribute: "shape" },
49
- description: "Silhouette. pill is rounded at both ends; tag is a pointed label. dot is a compact circular signal with visually hidden text: include a state label, or set\n aria-hidden when the surrounding control already names that state. square is a fixed rounded square for an icon or single glyph beside a heading; hide a\n decorative icon when adjacent words name it.",
49
+ description: "Silhouette. pill is rounded at both ends; tag is a pointed label. dot is a compact circular signal with visually hidden text: include a state label, or set\n aria-hidden when the surrounding control already names that state. square is a fixed rounded square for an icon or single glyph beside a heading; hide a\n decorative icon when adjacent words name it. circle frames a visible single glyph or icon in a fixed circle, centered in both directions.",
50
50
  values: [
51
51
  "pill",
52
52
  "tag",
53
53
  "dot",
54
- "square"
54
+ "square",
55
+ "circle"
55
56
  ],
56
57
  default: "pill"
57
58
  },
@@ -62,7 +63,7 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
62
63
  },
63
64
  required: false,
64
65
  target: { attribute: "size" },
65
- description: "Scale. xs is a compact count beside small controls; md is the usual text badge. A square is 24px at xs and 32px at md with default spacing.",
66
+ description: "Scale. xs is a compact count beside small controls; md is the usual text badge. A square is 24px at xs and 32px at md with default spacing. A circle is\n 16px at xs and 24px at md.",
66
67
  values: ["xs", "md"],
67
68
  default: "md"
68
69
  },
@@ -173,6 +174,6 @@ var UiBadge_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
173
174
  }]]);
174
175
  };
175
176
  }
176
- }), [["__scopeId", "data-v-a45f2b52"]]);
177
+ }), [["__scopeId", "data-v-c96818e7"]]);
177
178
  //#endregion
178
179
  export { UiBadge_default as t };
@@ -3,6 +3,7 @@ import { a as vPropValidity, n as checkedProp } from "./props.js";
3
3
  import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
4
4
  //#region .build/vue/UiContainer.vue?vue&type=script&setup=true&lang.ts
5
5
  var _hoisted_1 = [
6
+ "data-fill",
6
7
  "data-gutters",
7
8
  "data-measure",
8
9
  "data-ui-container-state"
@@ -13,6 +14,10 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
13
14
  inheritAttrs: false,
14
15
  __name: "UiContainer",
15
16
  props: {
17
+ fill: {
18
+ type: null,
19
+ default: false
20
+ },
16
21
  gutters: {
17
22
  type: null,
18
23
  default: null
@@ -24,6 +29,16 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
24
29
  },
25
30
  setup(__props) {
26
31
  const propValidityContract = { props: {
32
+ fill: {
33
+ type: {
34
+ kind: "terminal",
35
+ name: "boolean"
36
+ },
37
+ required: false,
38
+ target: { attribute: "fill" },
39
+ description: "Keeps the readable width while filling available layout space. Uses a flex column so scrolling children can shrink inside a bounded flex or grid parent.\n Omit it to keep the usual block layout.",
40
+ default: false
41
+ },
27
42
  gutters: {
28
43
  type: {
29
44
  kind: "terminal",
@@ -51,10 +66,15 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
51
66
  } };
52
67
  const props = __props;
53
68
  const acceptedProps = {
69
+ fill: false,
54
70
  gutters: null,
55
71
  measure: null
56
72
  };
57
73
  const checkedProps = computed(() => ({
74
+ fill: checkedProp(props["fill"], {
75
+ kind: "terminal",
76
+ name: "boolean"
77
+ }, false, "fill", acceptedProps),
58
78
  gutters: checkedProp(props["gutters"], {
59
79
  kind: "terminal",
60
80
  name: "keyword"
@@ -92,11 +112,13 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
92
112
  const hostState = computed(() => [
93
113
  checkedProps.value.measure && "measure",
94
114
  checkedProps.value.measure != null && `measure=${encodeURIComponent(checkedProps.value.measure)}`,
115
+ checkedProps.value.fill && "fill",
95
116
  checkedProps.value.gutters && "gutters",
96
117
  checkedProps.value.gutters != null && `gutters=${encodeURIComponent(checkedProps.value.gutters)}`
97
118
  ].filter(Boolean).join(" "));
98
119
  return (_ctx, _cache) => {
99
120
  return withDirectives((openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-container" }, nativeAttrs(_ctx.$attrs), {
121
+ "data-fill": reflectedProp("fill", "fill", checkedProps.value.fill, void 0, false),
100
122
  "data-gutters": reflectedProp("gutters", "gutters", checkedProps.value.gutters, void 0, false),
101
123
  "data-measure": reflectedProp("measure", "measure", checkedProps.value.measure, void 0, false),
102
124
  "data-ui-container-state": hostState.value || void 0
@@ -106,6 +128,6 @@ var UiContainer_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__
106
128
  }]]);
107
129
  };
108
130
  }
109
- }), [["__scopeId", "data-v-955318c7"]]);
131
+ }), [["__scopeId", "data-v-d3919ea4"]]);
110
132
  //#endregion
111
133
  export { UiContainer_default as t };
@@ -20,6 +20,7 @@ var _hoisted_2 = {
20
20
  key: 0,
21
21
  class: "title"
22
22
  };
23
+ var _hoisted_3 = { class: "body" };
23
24
  var htmlNextAuthoredCheck2Reported = /* @__PURE__ */ new Set();
24
25
  function htmlNextAuthoredCheck2(accepted, location, message) {
25
26
  if (!accepted && !htmlNextAuthoredCheck2Reported.has(location)) {
@@ -334,10 +335,10 @@ var UiDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
334
335
  ref_key: "closeElement",
335
336
  ref: closeElement
336
337
  }, null, 512)]),
337
- createVNode(UiScrollArea_default, { class: "body" }, {
338
+ createElementVNode("div", _hoisted_3, [createVNode(UiScrollArea_default, { trim: true }, {
338
339
  default: withCtx(() => [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
339
340
  _: 3
340
- }),
341
+ })]),
341
342
  createElementVNode("footer", null, [renderSlot(_ctx.$slots, "actions", {}, void 0, true)])
342
343
  ], 16, _hoisted_1)), [[unref(vPropValidity), {
343
344
  contract: propValidityContract,
@@ -345,6 +346,6 @@ var UiDialog_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
345
346
  }]]);
346
347
  };
347
348
  }
348
- }), [["__scopeId", "data-v-f11b295f"]]);
349
+ }), [["__scopeId", "data-v-6d90ae32"]]);
349
350
  //#endregion
350
351
  export { UiDialog_default as t };