@threadlabs/looma 0.26.0 → 0.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-dialog/ui-dialog.html +6 -4
- package/components/ui-scroll-area/ui-scroll-area.html +12 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-dialog.css +6 -4
- package/styles/ui-scroll-area.css +11 -0
- package/vanilla/UiDialog.js +14 -8
- package/vanilla/UiScrollArea.d.ts +1 -0
- package/vanilla/UiScrollArea.js +4 -4
- package/vue/UiDialog.vue +6 -4
- package/vue/UiScrollArea.d.ts +9 -0
- package/vue/UiScrollArea.vue +33 -1
- package/vue/chunks/UiDialog.js +4 -3
- package/vue/chunks/UiScrollArea.js +28 -5
- package/vue/components.css +52 -38
package/package.json
CHANGED
package/styles/ui-dialog.css
CHANGED
|
@@ -104,7 +104,7 @@
|
|
|
104
104
|
display: none;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
/*
|
|
107
|
+
/* Own the layout wrapper; nested component roots are outside these scoped rules. */
|
|
108
108
|
header {
|
|
109
109
|
display: flex;
|
|
110
110
|
align-items: center;
|
|
@@ -183,9 +183,11 @@
|
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
.body {
|
|
186
|
+
display: flex;
|
|
187
|
+
flex-direction: column;
|
|
186
188
|
flex: 1 1 auto;
|
|
187
189
|
min-block-size: 0;
|
|
188
|
-
padding: var(--ui-space-5);
|
|
190
|
+
padding: var(--ui-space-3) var(--ui-space-5) var(--ui-space-5);
|
|
189
191
|
}
|
|
190
192
|
|
|
191
193
|
footer {
|
|
@@ -194,7 +196,7 @@
|
|
|
194
196
|
flex-wrap: wrap;
|
|
195
197
|
justify-content: flex-end;
|
|
196
198
|
gap: var(--ui-space-2);
|
|
197
|
-
padding: var(--ui-space-
|
|
199
|
+
padding: 0 var(--ui-space-5) var(--ui-space-5);
|
|
198
200
|
}
|
|
199
201
|
|
|
200
202
|
footer:empty {
|
|
@@ -223,7 +225,7 @@
|
|
|
223
225
|
@scope ([data-component~="ui-dialog"]) to ([data-component]) {
|
|
224
226
|
/* This component's hooks style the element they are set on, and never a nested one. */
|
|
225
227
|
|
|
226
|
-
/*
|
|
228
|
+
/* Own the layout wrapper; nested component roots are outside these scoped rules. */
|
|
227
229
|
|
|
228
230
|
/* :host-qualified so page heading rules that reach in cannot outrank the dialog chrome. */
|
|
229
231
|
|
|
@@ -31,6 +31,8 @@
|
|
|
31
31
|
display: flow-root;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
|
+
/* Trim projected edges without changing spacing inside an item. */
|
|
35
|
+
|
|
34
36
|
:scope[data-ui-scroll-area-state~="orientation=horizontal"] {
|
|
35
37
|
overflow-x: auto;
|
|
36
38
|
overflow-y: hidden;
|
|
@@ -61,5 +63,14 @@
|
|
|
61
63
|
into whatever is behind the area without needing to know its colour. Before upgrade, its
|
|
62
64
|
zero-length defaults leave the authored scroll area fully visible. */
|
|
63
65
|
|
|
66
|
+
/* Trim projected edges without changing spacing inside an item. */
|
|
67
|
+
:scope[data-ui-scroll-area-state~="trim"] .content > :where([data-slotted], [data-slotted] *):is(:first-child) {
|
|
68
|
+
margin-block-start: 0;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
:scope[data-ui-scroll-area-state~="trim"] .content > :where([data-slotted], [data-slotted] *):is(:last-child) {
|
|
72
|
+
margin-block-end: 0;
|
|
73
|
+
}
|
|
74
|
+
|
|
64
75
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
65
76
|
}
|
package/vanilla/UiDialog.js
CHANGED
|
@@ -3,7 +3,7 @@ import { attachGeneratedController, buildTemplate, clearRegion, toAttribute, toT
|
|
|
3
3
|
import * as controller from "../components/ui-dialog/ui-dialog.js";
|
|
4
4
|
import "../styles/ui-dialog.css";
|
|
5
5
|
|
|
6
|
-
const T0 = ["",[],["header",[],1,["button",["class","close","type","button","aria-label","Close"]]],["
|
|
6
|
+
const T0 = ["",[],["header",[],1,["button",["class","close","type","button","aria-label","Close"]]],["div",["class","body"],["ui-scroll-area",[],4]],["footer",[],4]];
|
|
7
7
|
const T1 = ["h2",["class","title"],0];
|
|
8
8
|
const T2 = ["",[]];
|
|
9
9
|
const T3 = ["",[]];
|
|
@@ -59,10 +59,15 @@ export function createUiDialog(options = {}, html) {
|
|
|
59
59
|
const s0 = toAttribute(x0, "aria-label");
|
|
60
60
|
if (s0 !== r.v0) writeAttribute(r.n, "aria-label", r.v0 = s0);
|
|
61
61
|
}
|
|
62
|
+
if (c === -1) {
|
|
63
|
+
const x1 = true;
|
|
64
|
+
const s1 = toAttribute(x1, "trim");
|
|
65
|
+
if (s1 !== r.v1) writeAttribute(r.a3, "trim", r.v1 = s1);
|
|
66
|
+
}
|
|
62
67
|
if (c & 516) {
|
|
63
|
-
const
|
|
64
|
-
const
|
|
65
|
-
if (
|
|
68
|
+
const x2 = hostState(["size","alert"], [v[9], v[2]]);
|
|
69
|
+
const s2 = x2;
|
|
70
|
+
if (s2 !== r.v2) writeAttribute(r.n, "data-ui-dialog-state", (r.v2 = s2) === "" ? null : s2);
|
|
66
71
|
}
|
|
67
72
|
if (c & 32) {
|
|
68
73
|
const t0 = truthy(v[5]);
|
|
@@ -74,10 +79,10 @@ export function createUiDialog(options = {}, html) {
|
|
|
74
79
|
}
|
|
75
80
|
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
76
81
|
} else if (r.b0 !== undefined) p1(r.b0, c, d);
|
|
77
|
-
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.
|
|
82
|
+
if (r.f1 === undefined) { r.f1 = 1; const at = fillSlot(r.a4, r.e1, "", J, false, undefined, d);
|
|
78
83
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b1 = m2(d); at.before(r.b1.n); } }
|
|
79
84
|
else if (r.b1 !== undefined) p2(r.b1, c, d);
|
|
80
|
-
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.
|
|
85
|
+
if (r.f2 === undefined) { r.f2 = 1; const at = fillSlot(r.a5, r.e2, "actions", J, false, undefined, d);
|
|
81
86
|
if (Array.isArray(at)) (r.z ??= []).push(() => { at[0].l.delete(at[1]); dispose(at[1]); }); else if (at !== undefined) { r.b2 = m3(d); at.before(r.b2.n); } }
|
|
82
87
|
else if (r.b2 !== undefined) p3(r.b2, c, d);
|
|
83
88
|
};
|
|
@@ -86,8 +91,9 @@ export function createUiDialog(options = {}, html) {
|
|
|
86
91
|
const t2 = t1.nextSibling.nextSibling;
|
|
87
92
|
const t3 = t0.nextSibling;
|
|
88
93
|
const t4 = t3.firstChild;
|
|
89
|
-
const t5 =
|
|
90
|
-
const
|
|
94
|
+
const t5 = t4.firstChild;
|
|
95
|
+
const t6 = t3.nextSibling.firstChild;
|
|
96
|
+
const R = { n: element, a3: t4, v0: undefined, v1: null, v2: undefined, a1: t1, e0: t1.nextSibling, b0: undefined, a4: t5, e1: t5.nextSibling, b1: undefined, f1: undefined, a5: t6, e2: t6.nextSibling, b2: undefined, f2: undefined };
|
|
91
97
|
const I = { B };
|
|
92
98
|
const J = project(I, children, slots);
|
|
93
99
|
I.R = new Set();
|
|
@@ -9,6 +9,7 @@ export interface UiScrollAreaProps {
|
|
|
9
9
|
fill?: boolean | null;
|
|
10
10
|
orientation?: "vertical" | "horizontal" | null;
|
|
11
11
|
size?: "content" | "sm" | "md" | "lg" | null;
|
|
12
|
+
trim?: boolean | null;
|
|
12
13
|
attributes?: Readonly<Record<string, string | number | boolean | null | undefined>>;
|
|
13
14
|
children?: readonly (string | Node)[];
|
|
14
15
|
slots?: Readonly<Record<string, readonly (string | Node)[]>>;
|
package/vanilla/UiScrollArea.js
CHANGED
|
@@ -7,7 +7,7 @@ const T0 = ["",[],["div",["class","content"],4]];
|
|
|
7
7
|
const T1 = ["",[]];
|
|
8
8
|
let P0, P1;
|
|
9
9
|
const S = { n: [], t: [], f: import.meta.url, g: "ui-scroll-area" };
|
|
10
|
-
const D = { props: { "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "orientation": { "required":false,"values":["vertical","horizontal"],"default":"vertical", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] } } };
|
|
10
|
+
const D = { props: { "fill": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "orientation": { "required":false,"values":["vertical","horizontal"],"default":"vertical", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] }, "size": { "required":false,"values":["content","sm","md","lg"],"default":"content", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat),false] }, "trim": { "required":false,"default":false, c: checkBoolean, t: "boolean", j: 0, m: "b" } } };
|
|
11
11
|
const C = (host) => controller.default(host);
|
|
12
12
|
|
|
13
13
|
export function createUiScrollArea(options = {}, html) {
|
|
@@ -19,7 +19,7 @@ export function createUiScrollArea(options = {}, html) {
|
|
|
19
19
|
}
|
|
20
20
|
element.setAttribute("data-component", "ui-scroll-area");
|
|
21
21
|
element.append((P0 ??= buildTemplate(T0)).cloneNode(true));
|
|
22
|
-
const v = [null, null, null];
|
|
22
|
+
const v = [null, null, null, null];
|
|
23
23
|
const B = acceptProps(element, D, S.n, v, componentProps, [], html);
|
|
24
24
|
const m1 = (d) => {
|
|
25
25
|
const n = (P1 ??= buildTemplate(T1)).cloneNode(true);
|
|
@@ -30,8 +30,8 @@ export function createUiScrollArea(options = {}, html) {
|
|
|
30
30
|
const p1 = (r, c, d) => {
|
|
31
31
|
};
|
|
32
32
|
const p0 = (r, c, d) => {
|
|
33
|
-
if (c &
|
|
34
|
-
const x0 = hostState(["fill","orientation","size"], [v[0], v[1], v[2]]);
|
|
33
|
+
if (c & 15) {
|
|
34
|
+
const x0 = hostState(["fill","orientation","size","trim"], [v[0], v[1], v[2], v[3]]);
|
|
35
35
|
const s0 = x0;
|
|
36
36
|
if (s0 !== r.v0) writeAttribute(r.n, "data-ui-scroll-area-state", (r.v0 = s0) === "" ? null : s0);
|
|
37
37
|
}
|
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
|
-
<
|
|
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
|
-
/*
|
|
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-
|
|
550
|
+
padding: 0 var(--ui-space-5) var(--ui-space-5);
|
|
549
551
|
}
|
|
550
552
|
|
|
551
553
|
footer:empty {
|
package/vue/UiScrollArea.d.ts
CHANGED
|
@@ -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>;
|
package/vue/UiScrollArea.vue
CHANGED
|
@@ -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;
|
package/vue/chunks/UiDialog.js
CHANGED
|
@@ -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, {
|
|
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-
|
|
349
|
+
}), [["__scopeId", "data-v-6d90ae32"]]);
|
|
349
350
|
//#endregion
|
|
350
351
|
export { UiDialog_default as t };
|
|
@@ -7,6 +7,7 @@ var _hoisted_1 = [
|
|
|
7
7
|
"data-fill",
|
|
8
8
|
"data-orientation",
|
|
9
9
|
"data-size",
|
|
10
|
+
"data-trim",
|
|
10
11
|
"data-ui-scroll-area-state"
|
|
11
12
|
];
|
|
12
13
|
//#endregion
|
|
@@ -26,6 +27,10 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
26
27
|
size: {
|
|
27
28
|
type: null,
|
|
28
29
|
default: "content"
|
|
30
|
+
},
|
|
31
|
+
trim: {
|
|
32
|
+
type: null,
|
|
33
|
+
default: false
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
setup(__props) {
|
|
@@ -66,13 +71,24 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
66
71
|
"lg"
|
|
67
72
|
],
|
|
68
73
|
default: "content"
|
|
74
|
+
},
|
|
75
|
+
trim: {
|
|
76
|
+
type: {
|
|
77
|
+
kind: "terminal",
|
|
78
|
+
name: "boolean"
|
|
79
|
+
},
|
|
80
|
+
required: false,
|
|
81
|
+
target: { attribute: "trim" },
|
|
82
|
+
description: "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.",
|
|
83
|
+
default: false
|
|
69
84
|
}
|
|
70
85
|
} };
|
|
71
86
|
const props = __props;
|
|
72
87
|
const acceptedProps = {
|
|
73
88
|
fill: false,
|
|
74
89
|
orientation: "vertical",
|
|
75
|
-
size: "content"
|
|
90
|
+
size: "content",
|
|
91
|
+
trim: false
|
|
76
92
|
};
|
|
77
93
|
const checkedProps = computed(() => ({
|
|
78
94
|
fill: checkedProp(props["fill"], {
|
|
@@ -86,7 +102,11 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
86
102
|
size: checkedProp(props["size"], {
|
|
87
103
|
kind: "terminal",
|
|
88
104
|
name: "keyword"
|
|
89
|
-
}, false, "size", acceptedProps)
|
|
105
|
+
}, false, "size", acceptedProps),
|
|
106
|
+
trim: checkedProp(props["trim"], {
|
|
107
|
+
kind: "terminal",
|
|
108
|
+
name: "boolean"
|
|
109
|
+
}, false, "trim", acceptedProps)
|
|
90
110
|
}));
|
|
91
111
|
checkedProps.value;
|
|
92
112
|
watchSyncEffect(() => {
|
|
@@ -118,6 +138,7 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
118
138
|
/** The values the styles' :host-state() rules test. */
|
|
119
139
|
const hostState = computed(() => [
|
|
120
140
|
checkedProps.value.fill && "fill",
|
|
141
|
+
checkedProps.value.trim && "trim",
|
|
121
142
|
checkedProps.value.orientation && "orientation",
|
|
122
143
|
checkedProps.value.orientation != null && `orientation=${encodeURIComponent(checkedProps.value.orientation)}`,
|
|
123
144
|
checkedProps.value.size && "size",
|
|
@@ -140,7 +161,8 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
140
161
|
propNames: [
|
|
141
162
|
"fill",
|
|
142
163
|
"orientation",
|
|
143
|
-
"size"
|
|
164
|
+
"size",
|
|
165
|
+
"trim"
|
|
144
166
|
],
|
|
145
167
|
propValidity: (name) => propValidityState({
|
|
146
168
|
contract: propValidityContract,
|
|
@@ -153,6 +175,7 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
153
175
|
"data-fill": reflectedProp("fill", "fill", checkedProps.value.fill, void 0, false),
|
|
154
176
|
"data-orientation": reflectedProp("orientation", "orientation", checkedProps.value.orientation, void 0, false),
|
|
155
177
|
"data-size": reflectedProp("size", "size", checkedProps.value.size, void 0, false),
|
|
178
|
+
"data-trim": reflectedProp("trim", "trim", checkedProps.value.trim, void 0, false),
|
|
156
179
|
"data-ui-scroll-area-state": hostState.value || void 0,
|
|
157
180
|
ref_key: "root",
|
|
158
181
|
ref: root
|
|
@@ -160,12 +183,12 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
160
183
|
class: "content",
|
|
161
184
|
ref_key: "contentElement",
|
|
162
185
|
ref: contentElement
|
|
163
|
-
}, [renderSlot(_ctx.$slots, "default"
|
|
186
|
+
}, [renderSlot(_ctx.$slots, "default")], 512)], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
164
187
|
contract: propValidityContract,
|
|
165
188
|
values: { ...props }
|
|
166
189
|
}]]);
|
|
167
190
|
};
|
|
168
191
|
}
|
|
169
|
-
}), [["__scopeId", "data-v-
|
|
192
|
+
}), [["__scopeId", "data-v-a1ccf697"]]);
|
|
170
193
|
//#endregion
|
|
171
194
|
export { UiScrollArea_default as t };
|