@threadlabs/looma 0.25.4 → 0.25.5
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-card/ui-card.html +27 -2
- package/components/ui-cluster/ui-cluster.html +30 -0
- package/components/ui-editor-surface/ui-editor-surface.html +23 -0
- package/components/ui-scroll-area/ui-scroll-area.html +5 -0
- package/components/ui-stack/ui-stack.html +17 -1
- package/components/ui-text/ui-text.html +5 -0
- package/components/ui-textarea/ui-textarea.html +7 -0
- package/dist/index.js +1 -1
- package/package.json +1 -1
- package/styles/ui-card.css +24 -0
- package/styles/ui-cluster.css +25 -0
- package/styles/ui-editor-surface.css +19 -0
- package/styles/ui-scroll-area.css +4 -0
- package/styles/ui-stack.css +13 -0
- package/styles/ui-text.css +4 -0
- package/styles/ui-textarea.css +4 -0
- package/vanilla/UiCard.d.ts +1 -1
- package/vanilla/UiCard.js +1 -1
- package/vanilla/UiCluster.d.ts +3 -0
- package/vanilla/UiCluster.js +9 -3
- package/vanilla/UiEditorSurface.d.ts +14 -0
- package/vanilla/UiEditorSurface.js +27 -0
- package/vanilla/UiScrollArea.d.ts +1 -0
- package/vanilla/UiScrollArea.js +1 -1
- package/vanilla/UiStack.d.ts +2 -0
- package/vanilla/UiStack.js +8 -9
- package/vanilla/UiText.d.ts +1 -0
- package/vanilla/UiText.js +1 -1
- package/vanilla/UiTextarea.d.ts +1 -0
- package/vanilla/UiTextarea.js +4 -1
- package/vanilla/index.js +1 -0
- package/vue/UiCard.d.ts +3 -3
- package/vue/UiCard.vue +34 -5
- package/vue/UiCluster.d.ts +27 -0
- package/vue/UiCluster.vue +95 -1
- package/vue/UiEditorSurface.d.ts +26 -0
- package/vue/UiEditorSurface.js +2 -0
- package/vue/UiEditorSurface.vue +129 -0
- package/vue/UiScrollArea.d.ts +9 -0
- package/vue/UiScrollArea.vue +28 -2
- package/vue/UiStack.d.ts +18 -0
- package/vue/UiStack.vue +58 -1
- package/vue/UiText.d.ts +9 -0
- package/vue/UiText.vue +33 -0
- package/vue/UiTextarea.d.ts +9 -0
- package/vue/UiTextarea.vue +37 -2
- package/vue/chunks/UiCard.js +10 -3
- package/vue/chunks/UiCluster.js +82 -1
- package/vue/chunks/UiEditorSurface.js +71 -0
- package/vue/chunks/UiScrollArea.js +28 -2
- package/vue/chunks/UiStack.js +46 -1
- package/vue/chunks/UiText.js +43 -1
- package/vue/chunks/UiTextarea.js +28 -2
- package/vue/components.css +188 -104
- package/vue/editor/LoomaEditor.d.ts +12 -0
- package/vue/editor/index.js +7 -2
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/vue/UiText.d.ts
CHANGED
|
@@ -36,6 +36,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
36
36
|
type: PropType<"inherit" | "sans" | null>;
|
|
37
37
|
default: string;
|
|
38
38
|
};
|
|
39
|
+
grow: {
|
|
40
|
+
type: PropType<boolean | null>;
|
|
41
|
+
default: boolean;
|
|
42
|
+
};
|
|
39
43
|
size: {
|
|
40
44
|
type: PropType<"inherit" | "xs" | "sm" | "md" | "lg" | null>;
|
|
41
45
|
default: string;
|
|
@@ -73,6 +77,10 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
73
77
|
type: PropType<"inherit" | "sans" | null>;
|
|
74
78
|
default: string;
|
|
75
79
|
};
|
|
80
|
+
grow: {
|
|
81
|
+
type: PropType<boolean | null>;
|
|
82
|
+
default: boolean;
|
|
83
|
+
};
|
|
76
84
|
size: {
|
|
77
85
|
type: PropType<"inherit" | "xs" | "sm" | "md" | "lg" | null>;
|
|
78
86
|
default: string;
|
|
@@ -105,6 +113,7 @@ declare const __VLS_base: import("vue").DefineComponent<import("vue").ExtractPro
|
|
|
105
113
|
align: "center" | "start" | null;
|
|
106
114
|
as: "div" | "h2" | "h3" | "h4" | "h5" | "h6" | "label" | "p" | "small" | "span" | "strong" | null;
|
|
107
115
|
wrap: "normal" | "anywhere" | null;
|
|
116
|
+
grow: boolean | null;
|
|
108
117
|
truncate: boolean | null;
|
|
109
118
|
weight: "inherit" | "medium" | "normal" | "semibold" | null;
|
|
110
119
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/vue/UiText.vue
CHANGED
|
@@ -35,6 +35,14 @@ const propValidityContract = {
|
|
|
35
35
|
values: ['inherit', 'sans'],
|
|
36
36
|
default: 'inherit',
|
|
37
37
|
},
|
|
38
|
+
grow: {
|
|
39
|
+
type: { kind: 'terminal', name: 'boolean' },
|
|
40
|
+
required: false,
|
|
41
|
+
target: { attribute: 'grow' },
|
|
42
|
+
description:
|
|
43
|
+
'Lets this text use remaining inline space in a flex row, including when truncated.',
|
|
44
|
+
default: false,
|
|
45
|
+
},
|
|
38
46
|
size: {
|
|
39
47
|
type: { kind: 'terminal', name: 'keyword' },
|
|
40
48
|
required: false,
|
|
@@ -98,6 +106,7 @@ const props = defineProps({
|
|
|
98
106
|
default: 'p',
|
|
99
107
|
},
|
|
100
108
|
font: { type: null as unknown as PropType<'inherit' | 'sans' | null>, default: 'inherit' },
|
|
109
|
+
grow: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
101
110
|
size: {
|
|
102
111
|
type: null as unknown as PropType<'inherit' | 'xs' | 'sm' | 'md' | 'lg' | null>,
|
|
103
112
|
default: 'inherit',
|
|
@@ -131,6 +140,7 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
131
140
|
align: 'start',
|
|
132
141
|
as: 'p',
|
|
133
142
|
font: 'inherit',
|
|
143
|
+
grow: false,
|
|
134
144
|
size: 'inherit',
|
|
135
145
|
tone: 'default',
|
|
136
146
|
truncate: false,
|
|
@@ -167,6 +177,13 @@ const checkedProps = computed(() => ({
|
|
|
167
177
|
'font',
|
|
168
178
|
acceptedProps,
|
|
169
179
|
) as 'inherit' | 'sans',
|
|
180
|
+
grow: checkedProp<boolean>(
|
|
181
|
+
props['grow'],
|
|
182
|
+
{ kind: 'terminal', name: 'boolean' },
|
|
183
|
+
false,
|
|
184
|
+
'grow',
|
|
185
|
+
acceptedProps,
|
|
186
|
+
) as boolean,
|
|
170
187
|
size: checkedProp<'inherit' | 'xs' | 'sm' | 'md' | 'lg'>(
|
|
171
188
|
props['size'],
|
|
172
189
|
{ kind: 'terminal', name: 'keyword' },
|
|
@@ -291,6 +308,7 @@ if (
|
|
|
291
308
|
/** The values the styles' :host-state() rules test. */
|
|
292
309
|
const hostState = computed(() =>
|
|
293
310
|
[
|
|
311
|
+
checkedProps.value.grow && 'grow',
|
|
294
312
|
checkedProps.value.size && 'size',
|
|
295
313
|
checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`,
|
|
296
314
|
checkedProps.value.tone && 'tone',
|
|
@@ -320,6 +338,7 @@ const hostState = computed(() =>
|
|
|
320
338
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
321
339
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
322
340
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
341
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
323
342
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
324
343
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
325
344
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -337,6 +356,7 @@ const hostState = computed(() =>
|
|
|
337
356
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
338
357
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
339
358
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
359
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
340
360
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
341
361
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
342
362
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -356,6 +376,7 @@ const hostState = computed(() =>
|
|
|
356
376
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
357
377
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
358
378
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
379
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
359
380
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
360
381
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
361
382
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -373,6 +394,7 @@ const hostState = computed(() =>
|
|
|
373
394
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
374
395
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
375
396
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
397
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
376
398
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
377
399
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
378
400
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -390,6 +412,7 @@ const hostState = computed(() =>
|
|
|
390
412
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
391
413
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
392
414
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
415
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
393
416
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
394
417
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
395
418
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -407,6 +430,7 @@ const hostState = computed(() =>
|
|
|
407
430
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
408
431
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
409
432
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
433
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
410
434
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
411
435
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
412
436
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -426,6 +450,7 @@ const hostState = computed(() =>
|
|
|
426
450
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
427
451
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
428
452
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
453
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
429
454
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
430
455
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
431
456
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -445,6 +470,7 @@ const hostState = computed(() =>
|
|
|
445
470
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
446
471
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
447
472
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
473
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
448
474
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
449
475
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
450
476
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -464,6 +490,7 @@ const hostState = computed(() =>
|
|
|
464
490
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
465
491
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
466
492
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
493
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
467
494
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
468
495
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
469
496
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -483,6 +510,7 @@ const hostState = computed(() =>
|
|
|
483
510
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
484
511
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
485
512
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
513
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
486
514
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
487
515
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
488
516
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -502,6 +530,7 @@ const hostState = computed(() =>
|
|
|
502
530
|
:data-align="reflectedProp('align', 'align', checkedProps.align, undefined, false)"
|
|
503
531
|
:data-as="reflectedProp('as', 'as', checkedProps.as, undefined, false)"
|
|
504
532
|
:data-font="reflectedProp('font', 'font', checkedProps.font, undefined, false)"
|
|
533
|
+
:data-grow="reflectedProp('grow', 'grow', checkedProps.grow, undefined, false)"
|
|
505
534
|
:data-size="reflectedProp('size', 'size', checkedProps.size, undefined, false)"
|
|
506
535
|
:data-tone="reflectedProp('tone', 'tone', checkedProps.tone, undefined, false)"
|
|
507
536
|
:data-truncate="reflectedProp('truncate', 'truncate', checkedProps.truncate, undefined, false)"
|
|
@@ -519,6 +548,10 @@ const hostState = computed(() =>
|
|
|
519
548
|
/* Running text, set on the type scale and in a tone that says what it is, so a view never styles
|
|
520
549
|
text of its own. The root is a paragraph unless as= names a span, div, small, strong, label, or
|
|
521
550
|
heading. */
|
|
551
|
+
[data-component~="ui-text"][data-ui-text-state~="grow"] {
|
|
552
|
+
flex: 1;
|
|
553
|
+
}
|
|
554
|
+
|
|
522
555
|
[data-component~="ui-text"] {
|
|
523
556
|
margin: 0;
|
|
524
557
|
min-inline-size: 0;
|
package/vue/UiTextarea.d.ts
CHANGED
|
@@ -12,6 +12,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
12
12
|
type: PropType<boolean | null>;
|
|
13
13
|
default: boolean;
|
|
14
14
|
};
|
|
15
|
+
maxRows: {
|
|
16
|
+
type: PropType<number | null>;
|
|
17
|
+
default: null;
|
|
18
|
+
};
|
|
15
19
|
readonly: {
|
|
16
20
|
type: PropType<boolean | null>;
|
|
17
21
|
default: boolean;
|
|
@@ -50,6 +54,10 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
50
54
|
type: PropType<boolean | null>;
|
|
51
55
|
default: boolean;
|
|
52
56
|
};
|
|
57
|
+
maxRows: {
|
|
58
|
+
type: PropType<number | null>;
|
|
59
|
+
default: null;
|
|
60
|
+
};
|
|
53
61
|
readonly: {
|
|
54
62
|
type: PropType<boolean | null>;
|
|
55
63
|
default: boolean;
|
|
@@ -83,6 +91,7 @@ declare const __VLS_export: import("vue").DefineComponent<import("vue").ExtractP
|
|
|
83
91
|
disabled: boolean | null;
|
|
84
92
|
required: boolean | null;
|
|
85
93
|
readonly: boolean | null;
|
|
94
|
+
maxRows: number | null;
|
|
86
95
|
autosize: boolean | null;
|
|
87
96
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
88
97
|
declare const _default: typeof __VLS_export;
|
package/vue/UiTextarea.vue
CHANGED
|
@@ -32,6 +32,13 @@ const propValidityContract = {
|
|
|
32
32
|
description: 'Exposes invalid state to assistive technology and styling.',
|
|
33
33
|
default: false,
|
|
34
34
|
},
|
|
35
|
+
maxRows: {
|
|
36
|
+
type: { kind: 'terminal', name: 'integer' },
|
|
37
|
+
required: false,
|
|
38
|
+
target: { attribute: 'maxrows' },
|
|
39
|
+
description:
|
|
40
|
+
'Optional maximum visible rows, for a growing field in a bounded layout. Extra text scrolls inside the field. Omit it to retain unbounded growth.',
|
|
41
|
+
},
|
|
35
42
|
readonly: {
|
|
36
43
|
type: { kind: 'terminal', name: 'boolean' },
|
|
37
44
|
required: false,
|
|
@@ -75,6 +82,7 @@ const props = defineProps({
|
|
|
75
82
|
autosize: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
76
83
|
disabled: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
77
84
|
invalid: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
85
|
+
maxRows: { type: null as unknown as PropType<number | null>, default: null },
|
|
78
86
|
readonly: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
79
87
|
required: { type: null as unknown as PropType<boolean | null>, default: false },
|
|
80
88
|
rows: { type: null as unknown as PropType<number | null>, default: 4 },
|
|
@@ -86,6 +94,7 @@ const acceptedProps: Record<string, unknown> = {
|
|
|
86
94
|
autosize: false,
|
|
87
95
|
disabled: false,
|
|
88
96
|
invalid: false,
|
|
97
|
+
maxRows: null,
|
|
89
98
|
readonly: false,
|
|
90
99
|
required: false,
|
|
91
100
|
rows: 4,
|
|
@@ -114,6 +123,13 @@ const checkedProps = computed(() => ({
|
|
|
114
123
|
'invalid',
|
|
115
124
|
acceptedProps,
|
|
116
125
|
) as boolean,
|
|
126
|
+
maxRows: checkedProp<number>(
|
|
127
|
+
props['maxRows'],
|
|
128
|
+
{ kind: 'terminal', name: 'integer' },
|
|
129
|
+
false,
|
|
130
|
+
'maxRows',
|
|
131
|
+
acceptedProps,
|
|
132
|
+
),
|
|
117
133
|
readonly: checkedProp<boolean>(
|
|
118
134
|
props['readonly'],
|
|
119
135
|
{ kind: 'terminal', name: 'boolean' },
|
|
@@ -225,6 +241,8 @@ const hostState = computed(() =>
|
|
|
225
241
|
[
|
|
226
242
|
checkedProps.value.size && 'size',
|
|
227
243
|
checkedProps.value.size != null && `size=${encodeURIComponent(checkedProps.value.size)}`,
|
|
244
|
+
checkedProps.value.maxRows && 'maxRows',
|
|
245
|
+
checkedProps.value.maxRows != null && `maxRows=${checkedProps.value.maxRows}`,
|
|
228
246
|
checkedProps.value.autosize && 'autosize',
|
|
229
247
|
].filter(Boolean).join(' ')
|
|
230
248
|
)
|
|
@@ -246,7 +264,17 @@ useComponentHost(() => import('../components/ui-textarea/ui-textarea.js'), {
|
|
|
246
264
|
? (incoming[name] ?? incoming[kebab] ?? null)
|
|
247
265
|
: null
|
|
248
266
|
},
|
|
249
|
-
propNames: [
|
|
267
|
+
propNames: [
|
|
268
|
+
'autosize',
|
|
269
|
+
'disabled',
|
|
270
|
+
'invalid',
|
|
271
|
+
'maxRows',
|
|
272
|
+
'readonly',
|
|
273
|
+
'required',
|
|
274
|
+
'rows',
|
|
275
|
+
'size',
|
|
276
|
+
'value',
|
|
277
|
+
],
|
|
250
278
|
propValidity: (name: string) =>
|
|
251
279
|
propValidityState({ contract: propValidityContract, values: { ...props } }, name),
|
|
252
280
|
})
|
|
@@ -261,11 +289,12 @@ useComponentHost(() => import('../components/ui-textarea/ui-textarea.js'), {
|
|
|
261
289
|
:required="checkedProps.required ?? undefined"
|
|
262
290
|
:aria-invalid="checkedProps.invalid ?? undefined"
|
|
263
291
|
:rows="checkedProps.rows ?? undefined"
|
|
264
|
-
:style="{ '--_rows': checkedProps.rows ?? undefined }"
|
|
292
|
+
:style="{ '--_rows': checkedProps.rows ?? undefined, '--_max-rows': checkedProps.maxRows ?? undefined }"
|
|
265
293
|
v-prop-validity="{ contract: propValidityContract, values: { ...props } }"
|
|
266
294
|
:data-autosize="reflectedProp('autosize', 'autosize', checkedProps.autosize, undefined, false)"
|
|
267
295
|
:data-disabled="reflectedProp('disabled', 'disabled', checkedProps.disabled, undefined, false)"
|
|
268
296
|
:data-invalid="reflectedProp('invalid', 'invalid', checkedProps.invalid, undefined, false)"
|
|
297
|
+
:data-max-rows="reflectedProp('maxRows', 'max-rows', checkedProps.maxRows, undefined, false)"
|
|
269
298
|
:data-readonly="reflectedProp('readonly', 'readonly', checkedProps.readonly, undefined, false)"
|
|
270
299
|
:data-required="reflectedProp('required', 'required', checkedProps.required, undefined, false)"
|
|
271
300
|
:data-rows="reflectedProp('rows', 'rows', checkedProps.rows, undefined, false)"
|
|
@@ -466,6 +495,12 @@ useComponentHost(() => import('../components/ui-textarea/ui-textarea.js'), {
|
|
|
466
495
|
font-size: var(--ui-font-size-md);
|
|
467
496
|
}
|
|
468
497
|
|
|
498
|
+
[data-component~="ui-textarea"][data-ui-textarea-state~="maxRows"] {
|
|
499
|
+
max-block-size: calc(
|
|
500
|
+
max(var(--_rows), var(--_max-rows)) * 1lh + var(--_padding-block) + var(--_padding-block) + 2px
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
|
|
469
504
|
@supports (field-sizing: content) {
|
|
470
505
|
[data-component~="ui-textarea"][data-ui-textarea-state~="autosize"] {
|
|
471
506
|
field-sizing: content;
|
package/vue/chunks/UiCard.js
CHANGED
|
@@ -119,8 +119,15 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
119
119
|
},
|
|
120
120
|
required: false,
|
|
121
121
|
target: { attribute: "tone" },
|
|
122
|
-
description: "
|
|
123
|
-
values: [
|
|
122
|
+
description: "accent, info, success and warning add a quiet semantic surface. danger retains its strong leading edge for consequential content. Tone never changes child\n controls.",
|
|
123
|
+
values: [
|
|
124
|
+
"neutral",
|
|
125
|
+
"accent",
|
|
126
|
+
"info",
|
|
127
|
+
"success",
|
|
128
|
+
"warning",
|
|
129
|
+
"danger"
|
|
130
|
+
],
|
|
124
131
|
default: "neutral"
|
|
125
132
|
},
|
|
126
133
|
variant: {
|
|
@@ -267,6 +274,6 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
267
274
|
}]]);
|
|
268
275
|
};
|
|
269
276
|
}
|
|
270
|
-
}), [["__scopeId", "data-v-
|
|
277
|
+
}), [["__scopeId", "data-v-c589f774"]]);
|
|
271
278
|
//#endregion
|
|
272
279
|
export { UiCard_default as t };
|
package/vue/chunks/UiCluster.js
CHANGED
|
@@ -4,8 +4,11 @@ import { computed, createElementBlock, defineComponent, getCurrentInstance, merg
|
|
|
4
4
|
//#region .build/vue/UiCluster.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
6
6
|
"data-align",
|
|
7
|
+
"data-fixed",
|
|
7
8
|
"data-gap",
|
|
8
9
|
"data-justify",
|
|
10
|
+
"data-padding",
|
|
11
|
+
"data-padding-end",
|
|
9
12
|
"data-wrap",
|
|
10
13
|
"data-ui-cluster-state"
|
|
11
14
|
];
|
|
@@ -19,6 +22,10 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
19
22
|
type: null,
|
|
20
23
|
default: null
|
|
21
24
|
},
|
|
25
|
+
fixed: {
|
|
26
|
+
type: null,
|
|
27
|
+
default: false
|
|
28
|
+
},
|
|
22
29
|
gap: {
|
|
23
30
|
type: null,
|
|
24
31
|
default: null
|
|
@@ -27,6 +34,14 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
27
34
|
type: null,
|
|
28
35
|
default: null
|
|
29
36
|
},
|
|
37
|
+
padding: {
|
|
38
|
+
type: null,
|
|
39
|
+
default: "none"
|
|
40
|
+
},
|
|
41
|
+
paddingEnd: {
|
|
42
|
+
type: null,
|
|
43
|
+
default: "none"
|
|
44
|
+
},
|
|
30
45
|
wrap: {
|
|
31
46
|
type: null,
|
|
32
47
|
default: null
|
|
@@ -49,6 +64,16 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
49
64
|
"stretch"
|
|
50
65
|
]
|
|
51
66
|
},
|
|
67
|
+
fixed: {
|
|
68
|
+
type: {
|
|
69
|
+
kind: "terminal",
|
|
70
|
+
name: "boolean"
|
|
71
|
+
},
|
|
72
|
+
required: false,
|
|
73
|
+
target: { attribute: "fixed" },
|
|
74
|
+
description: "Keeps this group at its content size inside a flex layout.",
|
|
75
|
+
default: false
|
|
76
|
+
},
|
|
52
77
|
gap: {
|
|
53
78
|
type: {
|
|
54
79
|
kind: "terminal",
|
|
@@ -80,6 +105,39 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
80
105
|
"between"
|
|
81
106
|
]
|
|
82
107
|
},
|
|
108
|
+
padding: {
|
|
109
|
+
type: {
|
|
110
|
+
kind: "terminal",
|
|
111
|
+
name: "keyword"
|
|
112
|
+
},
|
|
113
|
+
required: false,
|
|
114
|
+
target: { attribute: "padding" },
|
|
115
|
+
description: "Optional internal space for an action group, using the shared spacing scale.",
|
|
116
|
+
values: [
|
|
117
|
+
"none",
|
|
118
|
+
"s",
|
|
119
|
+
"m",
|
|
120
|
+
"l"
|
|
121
|
+
],
|
|
122
|
+
default: "none"
|
|
123
|
+
},
|
|
124
|
+
paddingEnd: {
|
|
125
|
+
type: {
|
|
126
|
+
kind: "terminal",
|
|
127
|
+
name: "keyword"
|
|
128
|
+
},
|
|
129
|
+
required: false,
|
|
130
|
+
target: { attribute: "paddingend" },
|
|
131
|
+
description: "Optional extra space at the inline end, such as clearance beside another control. xl is 4rem.",
|
|
132
|
+
values: [
|
|
133
|
+
"none",
|
|
134
|
+
"s",
|
|
135
|
+
"m",
|
|
136
|
+
"l",
|
|
137
|
+
"xl"
|
|
138
|
+
],
|
|
139
|
+
default: "none"
|
|
140
|
+
},
|
|
83
141
|
wrap: {
|
|
84
142
|
type: {
|
|
85
143
|
kind: "terminal",
|
|
@@ -94,8 +152,11 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
94
152
|
const props = __props;
|
|
95
153
|
const acceptedProps = {
|
|
96
154
|
align: null,
|
|
155
|
+
fixed: false,
|
|
97
156
|
gap: null,
|
|
98
157
|
justify: null,
|
|
158
|
+
padding: "none",
|
|
159
|
+
paddingEnd: "none",
|
|
99
160
|
wrap: null
|
|
100
161
|
};
|
|
101
162
|
const checkedProps = computed(() => ({
|
|
@@ -103,6 +164,10 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
103
164
|
kind: "terminal",
|
|
104
165
|
name: "keyword"
|
|
105
166
|
}, false, "align", acceptedProps),
|
|
167
|
+
fixed: checkedProp(props["fixed"], {
|
|
168
|
+
kind: "terminal",
|
|
169
|
+
name: "boolean"
|
|
170
|
+
}, false, "fixed", acceptedProps),
|
|
106
171
|
gap: checkedProp(props["gap"], {
|
|
107
172
|
kind: "terminal",
|
|
108
173
|
name: "keyword"
|
|
@@ -111,6 +176,14 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
111
176
|
kind: "terminal",
|
|
112
177
|
name: "keyword"
|
|
113
178
|
}, false, "justify", acceptedProps),
|
|
179
|
+
padding: checkedProp(props["padding"], {
|
|
180
|
+
kind: "terminal",
|
|
181
|
+
name: "keyword"
|
|
182
|
+
}, false, "padding", acceptedProps),
|
|
183
|
+
paddingEnd: checkedProp(props["paddingEnd"], {
|
|
184
|
+
kind: "terminal",
|
|
185
|
+
name: "keyword"
|
|
186
|
+
}, false, "paddingEnd", acceptedProps),
|
|
114
187
|
wrap: checkedProp(props["wrap"], {
|
|
115
188
|
kind: "terminal",
|
|
116
189
|
name: "keyword"
|
|
@@ -142,6 +215,11 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
142
215
|
});
|
|
143
216
|
/** The values the styles' :host-state() rules test. */
|
|
144
217
|
const hostState = computed(() => [
|
|
218
|
+
checkedProps.value.fixed && "fixed",
|
|
219
|
+
checkedProps.value.padding && "padding",
|
|
220
|
+
checkedProps.value.padding != null && `padding=${encodeURIComponent(checkedProps.value.padding)}`,
|
|
221
|
+
checkedProps.value.paddingEnd && "paddingEnd",
|
|
222
|
+
checkedProps.value.paddingEnd != null && `paddingEnd=${encodeURIComponent(checkedProps.value.paddingEnd)}`,
|
|
145
223
|
checkedProps.value.gap && "gap",
|
|
146
224
|
checkedProps.value.gap != null && `gap=${encodeURIComponent(checkedProps.value.gap)}`,
|
|
147
225
|
checkedProps.value.align && "align",
|
|
@@ -154,8 +232,11 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
154
232
|
return (_ctx, _cache) => {
|
|
155
233
|
return withDirectives((openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-cluster" }, nativeAttrs(_ctx.$attrs), {
|
|
156
234
|
"data-align": reflectedProp("align", "align", checkedProps.value.align, void 0, false),
|
|
235
|
+
"data-fixed": reflectedProp("fixed", "fixed", checkedProps.value.fixed, void 0, false),
|
|
157
236
|
"data-gap": reflectedProp("gap", "gap", checkedProps.value.gap, void 0, false),
|
|
158
237
|
"data-justify": reflectedProp("justify", "justify", checkedProps.value.justify, void 0, false),
|
|
238
|
+
"data-padding": reflectedProp("padding", "padding", checkedProps.value.padding, void 0, false),
|
|
239
|
+
"data-padding-end": reflectedProp("paddingEnd", "padding-end", checkedProps.value.paddingEnd, void 0, false),
|
|
159
240
|
"data-wrap": reflectedProp("wrap", "wrap", checkedProps.value.wrap, void 0, false),
|
|
160
241
|
"data-ui-cluster-state": hostState.value || void 0
|
|
161
242
|
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
@@ -164,6 +245,6 @@ var UiCluster_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PU
|
|
|
164
245
|
}]]);
|
|
165
246
|
};
|
|
166
247
|
}
|
|
167
|
-
}), [["__scopeId", "data-v-
|
|
248
|
+
}), [["__scopeId", "data-v-e3a64464"]]);
|
|
168
249
|
//#endregion
|
|
169
250
|
export { UiCluster_default as t };
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { a as vPropValidity, n as checkedProp } from "./props.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, renderSlot, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
|
+
//#region .build/vue/UiEditorSurface.vue?vue&type=script&setup=true&lang.ts
|
|
5
|
+
var _hoisted_1 = ["data-density", "data-ui-editor-surface-state"];
|
|
6
|
+
//#endregion
|
|
7
|
+
//#region .build/vue/UiEditorSurface.vue
|
|
8
|
+
var UiEditorSurface_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
9
|
+
inheritAttrs: false,
|
|
10
|
+
__name: "UiEditorSurface",
|
|
11
|
+
props: { density: {
|
|
12
|
+
type: null,
|
|
13
|
+
default: "comfortable"
|
|
14
|
+
} },
|
|
15
|
+
setup(__props) {
|
|
16
|
+
const propValidityContract = { props: { density: {
|
|
17
|
+
type: {
|
|
18
|
+
kind: "terminal",
|
|
19
|
+
name: "keyword"
|
|
20
|
+
},
|
|
21
|
+
required: false,
|
|
22
|
+
target: { attribute: "density" },
|
|
23
|
+
description: "The document canvas. comfortable preserves the editor's normal room and mobile toolbar clearance. compact fits a read-only excerpt to its content without\n outer padding.",
|
|
24
|
+
values: ["comfortable", "compact"],
|
|
25
|
+
default: "comfortable"
|
|
26
|
+
} } };
|
|
27
|
+
const props = __props;
|
|
28
|
+
const acceptedProps = { density: "comfortable" };
|
|
29
|
+
const checkedProps = computed(() => ({ density: checkedProp(props["density"], {
|
|
30
|
+
kind: "terminal",
|
|
31
|
+
name: "keyword"
|
|
32
|
+
}, false, "density", acceptedProps) }));
|
|
33
|
+
checkedProps.value;
|
|
34
|
+
watchSyncEffect(() => {
|
|
35
|
+
checkedProps.value;
|
|
36
|
+
});
|
|
37
|
+
function nativeAttrs(attrs) {
|
|
38
|
+
const names = Object.keys(attrs);
|
|
39
|
+
if (!names.some((name) => Object.hasOwn(Object.prototype, name))) return attrs;
|
|
40
|
+
return Object.fromEntries(names.map((name) => [Object.hasOwn(Object.prototype, name) ? name === "__proto__" ? "__Proto__" : name[0].toUpperCase() + name.slice(1) : name, attrs[name]]));
|
|
41
|
+
}
|
|
42
|
+
const componentInstance = getCurrentInstance();
|
|
43
|
+
function reflectedProp(name, kebab, value, fallback, bound, separator) {
|
|
44
|
+
const incoming = componentInstance?.vnode.props;
|
|
45
|
+
if (!bound && (incoming === null || incoming === void 0 || !Object.hasOwn(incoming, name) && !Object.hasOwn(incoming, kebab))) return fallback;
|
|
46
|
+
if (value === null || value === void 0) return void 0;
|
|
47
|
+
return Array.isArray(value) && separator !== void 0 ? value.join(separator) : typeof value === "object" ? JSON.stringify(value) : String(value);
|
|
48
|
+
}
|
|
49
|
+
const hydrationNode = getCurrentInstance()?.vnode.el;
|
|
50
|
+
if (typeof window !== "undefined" && hydrationNode != null && (!(hydrationNode instanceof Element) || hydrationNode.localName !== "div")) throw Object.assign(/* @__PURE__ */ new Error("HR005: Server markup for <ui-editor-surface> has an incompatible root."), {
|
|
51
|
+
name: "HtmlDiagnosticError",
|
|
52
|
+
diagnostic: Object.freeze({
|
|
53
|
+
code: "HR005",
|
|
54
|
+
message: "Server markup for <ui-editor-surface> has an incompatible root."
|
|
55
|
+
})
|
|
56
|
+
});
|
|
57
|
+
/** The values the styles' :host-state() rules test. */
|
|
58
|
+
const hostState = computed(() => [checkedProps.value.density && "density", checkedProps.value.density != null && `density=${encodeURIComponent(checkedProps.value.density)}`].filter(Boolean).join(" "));
|
|
59
|
+
return (_ctx, _cache) => {
|
|
60
|
+
return withDirectives((openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-editor-surface" }, nativeAttrs(_ctx.$attrs), {
|
|
61
|
+
"data-density": reflectedProp("density", "density", checkedProps.value.density, void 0, false),
|
|
62
|
+
"data-ui-editor-surface-state": hostState.value || void 0
|
|
63
|
+
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
64
|
+
contract: propValidityContract,
|
|
65
|
+
values: { ...props }
|
|
66
|
+
}]]);
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
}), [["__scopeId", "data-v-7e72ed22"]]);
|
|
70
|
+
//#endregion
|
|
71
|
+
export { UiEditorSurface_default as t };
|
|
@@ -4,6 +4,7 @@ import { a as vPropValidity, n as checkedProp, r as propValidityState } from "./
|
|
|
4
4
|
import { computed, createElementBlock, createElementVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, renderSlot, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
5
5
|
//#region .build/vue/UiScrollArea.vue?vue&type=script&setup=true&lang.ts
|
|
6
6
|
var _hoisted_1 = [
|
|
7
|
+
"data-fill",
|
|
7
8
|
"data-orientation",
|
|
8
9
|
"data-size",
|
|
9
10
|
"data-ui-scroll-area-state"
|
|
@@ -14,6 +15,10 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
14
15
|
inheritAttrs: false,
|
|
15
16
|
__name: "UiScrollArea",
|
|
16
17
|
props: {
|
|
18
|
+
fill: {
|
|
19
|
+
type: null,
|
|
20
|
+
default: false
|
|
21
|
+
},
|
|
17
22
|
orientation: {
|
|
18
23
|
type: null,
|
|
19
24
|
default: "vertical"
|
|
@@ -25,6 +30,16 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
25
30
|
},
|
|
26
31
|
setup(__props) {
|
|
27
32
|
const propValidityContract = { props: {
|
|
33
|
+
fill: {
|
|
34
|
+
type: {
|
|
35
|
+
kind: "terminal",
|
|
36
|
+
name: "boolean"
|
|
37
|
+
},
|
|
38
|
+
required: false,
|
|
39
|
+
target: { attribute: "fill" },
|
|
40
|
+
description: "Grows into remaining space within a flex layout while keeping content independently scrollable.",
|
|
41
|
+
default: false
|
|
42
|
+
},
|
|
28
43
|
orientation: {
|
|
29
44
|
type: {
|
|
30
45
|
kind: "terminal",
|
|
@@ -55,10 +70,15 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
55
70
|
} };
|
|
56
71
|
const props = __props;
|
|
57
72
|
const acceptedProps = {
|
|
73
|
+
fill: false,
|
|
58
74
|
orientation: "vertical",
|
|
59
75
|
size: "content"
|
|
60
76
|
};
|
|
61
77
|
const checkedProps = computed(() => ({
|
|
78
|
+
fill: checkedProp(props["fill"], {
|
|
79
|
+
kind: "terminal",
|
|
80
|
+
name: "boolean"
|
|
81
|
+
}, false, "fill", acceptedProps),
|
|
62
82
|
orientation: checkedProp(props["orientation"], {
|
|
63
83
|
kind: "terminal",
|
|
64
84
|
name: "keyword"
|
|
@@ -97,6 +117,7 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
97
117
|
});
|
|
98
118
|
/** The values the styles' :host-state() rules test. */
|
|
99
119
|
const hostState = computed(() => [
|
|
120
|
+
checkedProps.value.fill && "fill",
|
|
100
121
|
checkedProps.value.orientation && "orientation",
|
|
101
122
|
checkedProps.value.orientation != null && `orientation=${encodeURIComponent(checkedProps.value.orientation)}`,
|
|
102
123
|
checkedProps.value.size && "size",
|
|
@@ -116,7 +137,11 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
116
137
|
const kebab = name.replace(/[A-Z]/g, (letter) => "-" + letter.toLowerCase());
|
|
117
138
|
return incoming !== null && incoming !== void 0 ? incoming[name] ?? incoming[kebab] ?? null : null;
|
|
118
139
|
},
|
|
119
|
-
propNames: [
|
|
140
|
+
propNames: [
|
|
141
|
+
"fill",
|
|
142
|
+
"orientation",
|
|
143
|
+
"size"
|
|
144
|
+
],
|
|
120
145
|
propValidity: (name) => propValidityState({
|
|
121
146
|
contract: propValidityContract,
|
|
122
147
|
values: { ...props }
|
|
@@ -125,6 +150,7 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
125
150
|
});
|
|
126
151
|
return (_ctx, _cache) => {
|
|
127
152
|
return withDirectives((openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-scroll-area" }, nativeAttrs(_ctx.$attrs), {
|
|
153
|
+
"data-fill": reflectedProp("fill", "fill", checkedProps.value.fill, void 0, false),
|
|
128
154
|
"data-orientation": reflectedProp("orientation", "orientation", checkedProps.value.orientation, void 0, false),
|
|
129
155
|
"data-size": reflectedProp("size", "size", checkedProps.value.size, void 0, false),
|
|
130
156
|
"data-ui-scroll-area-state": hostState.value || void 0,
|
|
@@ -140,6 +166,6 @@ var UiScrollArea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @_
|
|
|
140
166
|
}]]);
|
|
141
167
|
};
|
|
142
168
|
}
|
|
143
|
-
}), [["__scopeId", "data-v-
|
|
169
|
+
}), [["__scopeId", "data-v-1f6366dd"]]);
|
|
144
170
|
//#endregion
|
|
145
171
|
export { UiScrollArea_default as t };
|