@threadlabs/looma 0.13.6 → 0.14.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-button/ui-button.html +2 -1
- package/components/ui-checkbox/ui-checkbox.html +35 -0
- package/components/ui-combobox/ui-combobox.html +38 -3
- package/components/ui-description-list/ui-description-list.html +54 -9
- package/components/ui-input/ui-input.html +27 -0
- package/components/ui-input-group/ui-input-group.html +15 -0
- package/components/ui-radio/ui-radio.html +35 -0
- package/components/ui-select/ui-select.html +29 -3
- package/components/ui-switch/ui-switch.html +36 -0
- package/components/ui-table/ui-table.html +131 -0
- package/components/ui-table/ui-table.js +55 -0
- package/components/ui-textarea/ui-textarea.html +20 -0
- package/dist/index.js +8 -7
- package/package.json +1 -1
- package/styles/ui-button.css +3 -1
- package/styles/ui-checkbox.css +38 -0
- package/styles/ui-combobox.css +38 -1
- package/styles/ui-description-list.css +52 -7
- package/styles/ui-input-group.css +20 -0
- package/styles/ui-input.css +29 -0
- package/styles/ui-radio.css +38 -0
- package/styles/ui-select.css +29 -3
- package/styles/ui-switch.css +41 -0
- package/styles/ui-table.css +134 -0
- package/styles/ui-textarea.css +21 -0
- package/vanilla/UiCheckbox.d.ts +1 -0
- package/vanilla/UiCheckbox.js +1 -1
- package/vanilla/UiCombobox.d.ts +1 -1
- package/vanilla/UiCombobox.js +1 -1
- package/vanilla/UiDescriptionList.d.ts +3 -1
- package/vanilla/UiDescriptionList.js +6 -2
- package/vanilla/UiInput.d.ts +1 -0
- package/vanilla/UiInput.js +1 -1
- package/vanilla/UiRadio.d.ts +1 -0
- package/vanilla/UiRadio.js +1 -1
- package/vanilla/UiSelect.d.ts +1 -0
- package/vanilla/UiSelect.js +1 -1
- package/vanilla/UiSwitch.d.ts +1 -0
- package/vanilla/UiSwitch.js +1 -1
- package/vanilla/UiTable.d.ts +15 -0
- package/vanilla/UiTable.js +30 -0
- package/vanilla/UiTextarea.d.ts +1 -0
- package/vanilla/UiTextarea.js +1 -1
- package/vanilla/index.js +1 -0
- package/vue/UiButton.vue +2 -1
- package/vue/UiCheckbox.d.ts +2 -0
- package/vue/UiCheckbox.vue +34 -0
- package/vue/UiCombobox.d.ts +2 -2
- package/vue/UiCombobox.vue +39 -2
- package/vue/UiDescriptionList.d.ts +5 -2
- package/vue/UiDescriptionList.vue +51 -7
- package/vue/UiInput.d.ts +2 -0
- package/vue/UiInput.vue +41 -0
- package/vue/UiInputGroup.vue +15 -0
- package/vue/UiList.d.ts +1 -1
- package/vue/UiRadio.d.ts +2 -0
- package/vue/UiRadio.vue +34 -0
- package/vue/UiSelect.d.ts +2 -0
- package/vue/UiSelect.vue +34 -3
- package/vue/UiSwitch.d.ts +2 -0
- package/vue/UiSwitch.vue +35 -0
- package/vue/UiTable.d.ts +20 -0
- package/vue/UiTable.js +2 -0
- package/vue/UiTable.vue +172 -0
- package/vue/UiTextarea.d.ts +2 -0
- package/vue/UiTextarea.vue +27 -0
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCheckbox.js +3 -2
- package/vue/chunks/UiCombobox.js +1 -1
- package/vue/chunks/UiDescriptionList.js +11 -3
- package/vue/chunks/UiInput.js +7 -2
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiRadio.js +3 -2
- package/vue/chunks/UiSelect.js +7 -2
- package/vue/chunks/UiSwitch.js +3 -2
- package/vue/chunks/UiTable.js +40 -0
- package/vue/chunks/UiTextarea.js +7 -2
- package/vue/components.css +522 -174
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/vue/UiTable.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type __VLS_Props = {
|
|
2
|
+
density?: 'comfortable' | 'compact';
|
|
3
|
+
stickyHeader?: boolean;
|
|
4
|
+
};
|
|
5
|
+
declare var __VLS_1: {};
|
|
6
|
+
type __VLS_Slots = {} & {
|
|
7
|
+
default?: (props: typeof __VLS_1) => any;
|
|
8
|
+
};
|
|
9
|
+
declare const __VLS_base: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{}>, {
|
|
10
|
+
density: "comfortable" | "compact";
|
|
11
|
+
stickyHeader: boolean;
|
|
12
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
13
|
+
declare const __VLS_export: __VLS_WithSlots<typeof __VLS_base, __VLS_Slots>;
|
|
14
|
+
declare const _default: typeof __VLS_export;
|
|
15
|
+
export default _default;
|
|
16
|
+
type __VLS_WithSlots<T, S> = T & {
|
|
17
|
+
new (): {
|
|
18
|
+
$slots: S;
|
|
19
|
+
};
|
|
20
|
+
};
|
package/vue/UiTable.js
ADDED
package/vue/UiTable.vue
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
<!-- Generated by HTML Next 1.0.0-alpha.7 for Vue 3.5. Do not edit. -->
|
|
2
|
+
<script setup lang="ts">
|
|
3
|
+
import { computed, ref } from 'vue'
|
|
4
|
+
import * as controllerModule from '../components/ui-table/ui-table.js'
|
|
5
|
+
import { createDispatch, useComponentHost } from './host'
|
|
6
|
+
|
|
7
|
+
defineOptions({ inheritAttrs: false })
|
|
8
|
+
|
|
9
|
+
const props = withDefaults(
|
|
10
|
+
defineProps<{
|
|
11
|
+
density?: 'comfortable' | 'compact'
|
|
12
|
+
stickyHeader?: boolean
|
|
13
|
+
}>(),
|
|
14
|
+
{
|
|
15
|
+
density: 'comfortable',
|
|
16
|
+
stickyHeader: false,
|
|
17
|
+
},
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
const root = ref<HTMLElement | null>(null)
|
|
21
|
+
|
|
22
|
+
/** The values the styles' :host-state() rules test. */
|
|
23
|
+
const hostState = computed(() =>
|
|
24
|
+
[
|
|
25
|
+
props.density && `density density=${props.density}`,
|
|
26
|
+
props.stickyHeader && 'stickyHeader',
|
|
27
|
+
].filter(Boolean).join(' ')
|
|
28
|
+
)
|
|
29
|
+
|
|
30
|
+
const dispatch = createDispatch(root)
|
|
31
|
+
|
|
32
|
+
useComponentHost(controllerModule.default, {
|
|
33
|
+
root,
|
|
34
|
+
dispatch,
|
|
35
|
+
props,
|
|
36
|
+
})
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div
|
|
41
|
+
data-component="ui-table"
|
|
42
|
+
v-bind="$attrs"
|
|
43
|
+
:data-ui-table-state="hostState || undefined"
|
|
44
|
+
ref="root"
|
|
45
|
+
>
|
|
46
|
+
<slot />
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<style scoped>
|
|
51
|
+
/* Styles an authored <table> (caption, thead, tbody, th scope) without replacing it: the table is
|
|
52
|
+
meaningful before JavaScript, and a screen reader reads it as a table. The root scrolls a table
|
|
53
|
+
wider than it, or taller than a bounded height; while it does, the controller makes the root a named, focusable region so a
|
|
54
|
+
keyboard can scroll it. A cell's data-ui-align (start, center, or end; start by default) sets its
|
|
55
|
+
content along the row, such as end for a column of figures. */
|
|
56
|
+
[data-component~="ui-table"] {
|
|
57
|
+
--_pad-block: var(--ui-space-1);
|
|
58
|
+
--_pad-inline: var(--ui-space-3);
|
|
59
|
+
--_row-size: var(--ui-control-size);
|
|
60
|
+
display: block;
|
|
61
|
+
box-sizing: border-box;
|
|
62
|
+
max-inline-size: 100%;
|
|
63
|
+
min-inline-size: 0;
|
|
64
|
+
min-block-size: 0;
|
|
65
|
+
overflow: auto;
|
|
66
|
+
overscroll-behavior-inline: contain;
|
|
67
|
+
/* The sideways scroll fade every Looma scroller uses (see ui-scroll-area). Only the inline edges
|
|
68
|
+
fade, so a sticky header never fades. */
|
|
69
|
+
--_ui-scroll-fade-direction: to right;
|
|
70
|
+
--_ui-scroll-fade-size: var(--ui-scroll-fade-size, 24px);
|
|
71
|
+
mask-image: linear-gradient(
|
|
72
|
+
var(--_ui-scroll-fade-direction),
|
|
73
|
+
transparent,
|
|
74
|
+
#000 var(--_ui-scroll-fade-start),
|
|
75
|
+
#000 calc(100% - var(--_ui-scroll-fade-end)),
|
|
76
|
+
transparent
|
|
77
|
+
);
|
|
78
|
+
animation:
|
|
79
|
+
ui-scroll-fade-start linear,
|
|
80
|
+
ui-scroll-fade-start-hold linear,
|
|
81
|
+
ui-scroll-fade-end-hold linear,
|
|
82
|
+
ui-scroll-fade-end linear;
|
|
83
|
+
animation-timeline: scroll(self inline);
|
|
84
|
+
animation-range:
|
|
85
|
+
0 var(--_ui-scroll-fade-size),
|
|
86
|
+
var(--_ui-scroll-fade-size) calc(100% + 1px),
|
|
87
|
+
-1px calc(100% - var(--_ui-scroll-fade-size)),
|
|
88
|
+
calc(100% - var(--_ui-scroll-fade-size)) 100%;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
[data-component~="ui-table"]:dir(rtl) {
|
|
92
|
+
--_ui-scroll-fade-direction: to left;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
[data-component~="ui-table"]:focus-visible {
|
|
96
|
+
outline: 2px solid var(--ui-focus-ring);
|
|
97
|
+
outline-offset: -2px;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
[data-component~="ui-table"][data-ui-table-state~="density=compact"] {
|
|
101
|
+
--_pad-block: var(--ui-space-0-5);
|
|
102
|
+
--_pad-inline: var(--ui-space-2);
|
|
103
|
+
--_row-size: var(--ui-control-size-sm);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
/* Separate borders stay on their cells when a sticky header scrolls; collapsed ones stay behind. */
|
|
107
|
+
:slotted(table) {
|
|
108
|
+
inline-size: 100%;
|
|
109
|
+
border-collapse: separate;
|
|
110
|
+
border-spacing: 0;
|
|
111
|
+
color: var(--ui-text-primary);
|
|
112
|
+
font-size: var(--ui-font-size-sm);
|
|
113
|
+
line-height: var(--ui-line-height);
|
|
114
|
+
font-variant-numeric: tabular-nums;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
:slotted(caption) {
|
|
118
|
+
padding-block-end: var(--ui-space-2);
|
|
119
|
+
color: var(--ui-text-secondary);
|
|
120
|
+
font-weight: var(--ui-font-medium);
|
|
121
|
+
text-align: start;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/* Every row is at least one control tall, so a row holding a checkbox, select, or input keeps the
|
|
125
|
+
rhythm of the rows around it. A cell's height is its minimum. */
|
|
126
|
+
:slotted(th),
|
|
127
|
+
:slotted(td) {
|
|
128
|
+
block-size: var(--_row-size);
|
|
129
|
+
padding: var(--_pad-block) var(--_pad-inline);
|
|
130
|
+
border-block-end: 1px solid var(--ui-border-subtle);
|
|
131
|
+
text-align: start;
|
|
132
|
+
vertical-align: middle;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
:slotted(thead th) {
|
|
136
|
+
block-size: auto;
|
|
137
|
+
padding-block: var(--ui-space-2);
|
|
138
|
+
border-block-end-color: var(--ui-border-default);
|
|
139
|
+
background: var(--ui-surface);
|
|
140
|
+
color: var(--ui-text-muted);
|
|
141
|
+
font-weight: var(--ui-font-medium);
|
|
142
|
+
white-space: nowrap;
|
|
143
|
+
vertical-align: bottom;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
:slotted(tbody th) {
|
|
147
|
+
font-weight: var(--ui-font-medium);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
:slotted(tbody tr:last-child > *) {
|
|
151
|
+
border-block-end-width: 0;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
:slotted([data-ui-align="center"]) {
|
|
155
|
+
text-align: center;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
:slotted([data-ui-align="end"]) {
|
|
159
|
+
text-align: end;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[data-component~="ui-table"][data-ui-table-state~="stickyHeader"] :slotted(thead th) {
|
|
163
|
+
position: sticky;
|
|
164
|
+
inset-block-start: 0;
|
|
165
|
+
z-index: 1;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
169
|
+
[data-component~="ui-table"][hidden] {
|
|
170
|
+
display: none;
|
|
171
|
+
}
|
|
172
|
+
</style>
|
package/vue/UiTextarea.d.ts
CHANGED
|
@@ -4,6 +4,7 @@ type __VLS_Props = {
|
|
|
4
4
|
readonly?: boolean;
|
|
5
5
|
required?: boolean;
|
|
6
6
|
rows?: number;
|
|
7
|
+
size?: 'sm' | 'md' | 'lg';
|
|
7
8
|
value?: string;
|
|
8
9
|
modelValue?: string | null;
|
|
9
10
|
};
|
|
@@ -13,6 +14,7 @@ declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {
|
|
|
13
14
|
"onUpdate:modelValue"?: ((value: string) => any) | undefined;
|
|
14
15
|
}>, {
|
|
15
16
|
invalid: boolean;
|
|
17
|
+
size: "sm" | "md" | "lg";
|
|
16
18
|
disabled: boolean;
|
|
17
19
|
required: boolean;
|
|
18
20
|
readonly: boolean;
|
package/vue/UiTextarea.vue
CHANGED
|
@@ -13,6 +13,7 @@ const props = withDefaults(
|
|
|
13
13
|
readonly?: boolean
|
|
14
14
|
required?: boolean
|
|
15
15
|
rows?: number
|
|
16
|
+
size?: 'sm' | 'md' | 'lg'
|
|
16
17
|
value?: string
|
|
17
18
|
modelValue?: string | null
|
|
18
19
|
}>(),
|
|
@@ -22,6 +23,7 @@ const props = withDefaults(
|
|
|
22
23
|
readonly: false,
|
|
23
24
|
required: false,
|
|
24
25
|
rows: 4,
|
|
26
|
+
size: 'md',
|
|
25
27
|
},
|
|
26
28
|
)
|
|
27
29
|
const emit = defineEmits<{
|
|
@@ -34,6 +36,13 @@ const model = computed({
|
|
|
34
36
|
|
|
35
37
|
const root = ref<HTMLElement | null>(null)
|
|
36
38
|
|
|
39
|
+
/** The values the styles' :host-state() rules test. */
|
|
40
|
+
const hostState = computed(() =>
|
|
41
|
+
[
|
|
42
|
+
props.size && `size size=${props.size}`,
|
|
43
|
+
].filter(Boolean).join(' ')
|
|
44
|
+
)
|
|
45
|
+
|
|
37
46
|
const dispatch = createDispatch(root)
|
|
38
47
|
|
|
39
48
|
useComponentHost(controllerModule.default, {
|
|
@@ -53,6 +62,7 @@ useComponentHost(controllerModule.default, {
|
|
|
53
62
|
:aria-invalid="invalid"
|
|
54
63
|
:rows="rows"
|
|
55
64
|
v-model="model"
|
|
65
|
+
:data-ui-textarea-state="hostState || undefined"
|
|
56
66
|
ref="root"
|
|
57
67
|
></textarea>
|
|
58
68
|
</template>
|
|
@@ -139,6 +149,23 @@ useComponentHost(controllerModule.default, {
|
|
|
139
149
|
cursor: not-allowed;
|
|
140
150
|
}
|
|
141
151
|
|
|
152
|
+
[data-component~="ui-textarea"][data-ui-textarea-state~="size=sm"] {
|
|
153
|
+
padding: var(--ui-space-1) var(--ui-space-2);
|
|
154
|
+
font-size: var(--ui-font-size-sm);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
[data-component~="ui-textarea"][data-ui-textarea-state~="size=lg"] {
|
|
158
|
+
padding: var(--ui-space-3) var(--ui-space-4);
|
|
159
|
+
font-size: var(--ui-font-size-md);
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
/* Below 16px, iOS zooms the page into the focused field, so touch keeps body-size text. */
|
|
163
|
+
@media (pointer: coarse) {
|
|
164
|
+
[data-component~="ui-textarea"][data-ui-textarea-state~="size=sm"] {
|
|
165
|
+
font-size: inherit;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
142
169
|
/* A component that sets its display still honours the hidden attribute on its root. */
|
|
143
170
|
[data-component~="ui-textarea"][hidden] {
|
|
144
171
|
display: none;
|
package/vue/chunks/UiButton.js
CHANGED
|
@@ -87,6 +87,6 @@ var UiButton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
87
87
|
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_2));
|
|
88
88
|
};
|
|
89
89
|
}
|
|
90
|
-
}), [["__scopeId", "data-v-
|
|
90
|
+
}), [["__scopeId", "data-v-bd32a08d"]]);
|
|
91
91
|
//#endregion
|
|
92
92
|
export { UiButton_default as t };
|
package/vue/chunks/UiCheckbox.js
CHANGED
|
@@ -42,6 +42,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
42
42
|
type: Boolean,
|
|
43
43
|
default: false
|
|
44
44
|
},
|
|
45
|
+
size: { default: "md" },
|
|
45
46
|
value: { default: "on" }
|
|
46
47
|
},
|
|
47
48
|
emits: [
|
|
@@ -57,7 +58,7 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
57
58
|
const descriptionElement = useTemplateRef("description");
|
|
58
59
|
const internalChecked = ref(false);
|
|
59
60
|
/** The values the styles' :host-state() rules test. */
|
|
60
|
-
const hostState = computed(() => [props.disabled && "disabled"].filter(Boolean).join(" "));
|
|
61
|
+
const hostState = computed(() => [props.disabled && "disabled", props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
61
62
|
const isChangeDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["checked"] === "boolean" && typeof detail["value"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
62
63
|
"checked",
|
|
63
64
|
"value",
|
|
@@ -94,6 +95,6 @@ var UiCheckbox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
94
95
|
}, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, void 0, true)], 512)])], 16, _hoisted_1);
|
|
95
96
|
};
|
|
96
97
|
}
|
|
97
|
-
}), [["__scopeId", "data-v-
|
|
98
|
+
}), [["__scopeId", "data-v-bfcc98e1"]]);
|
|
98
99
|
//#endregion
|
|
99
100
|
export { UiCheckbox_default as t };
|
package/vue/chunks/UiCombobox.js
CHANGED
|
@@ -488,6 +488,6 @@ var UiCombobox_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
488
488
|
], 16, _hoisted_1);
|
|
489
489
|
};
|
|
490
490
|
}
|
|
491
|
-
}), [["__scopeId", "data-v-
|
|
491
|
+
}), [["__scopeId", "data-v-fd4a871f"]]);
|
|
492
492
|
//#endregion
|
|
493
493
|
export { UiCombobox_default as t };
|
|
@@ -7,15 +7,23 @@ var _hoisted_1 = ["data-ui-description-list-state"];
|
|
|
7
7
|
var UiDescriptionList_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
8
8
|
inheritAttrs: false,
|
|
9
9
|
__name: "UiDescriptionList",
|
|
10
|
-
props: {
|
|
10
|
+
props: {
|
|
11
|
+
columns: {},
|
|
12
|
+
density: { default: "comfortable" },
|
|
13
|
+
layout: { default: "rows" }
|
|
14
|
+
},
|
|
11
15
|
setup(__props) {
|
|
12
16
|
const props = __props;
|
|
13
17
|
/** The values the styles' :host-state() rules test. */
|
|
14
|
-
const hostState = computed(() => [
|
|
18
|
+
const hostState = computed(() => [
|
|
19
|
+
props.layout && `layout layout=${props.layout}`,
|
|
20
|
+
props.columns && `columns columns=${props.columns}`,
|
|
21
|
+
props.density && `density density=${props.density}`
|
|
22
|
+
].filter(Boolean).join(" "));
|
|
15
23
|
return (_ctx, _cache) => {
|
|
16
24
|
return openBlock(), createElementBlock("dl", mergeProps({ "data-component": "ui-description-list" }, _ctx.$attrs, { "data-ui-description-list-state": hostState.value || void 0 }), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1);
|
|
17
25
|
};
|
|
18
26
|
}
|
|
19
|
-
}), [["__scopeId", "data-v-
|
|
27
|
+
}), [["__scopeId", "data-v-640c2332"]]);
|
|
20
28
|
//#endregion
|
|
21
29
|
export { UiDescriptionList_default as t };
|
package/vue/chunks/UiInput.js
CHANGED
|
@@ -7,7 +7,8 @@ var _hoisted_1 = [
|
|
|
7
7
|
"disabled",
|
|
8
8
|
"readonly",
|
|
9
9
|
"required",
|
|
10
|
-
"aria-invalid"
|
|
10
|
+
"aria-invalid",
|
|
11
|
+
"data-ui-input-state"
|
|
11
12
|
];
|
|
12
13
|
//#endregion
|
|
13
14
|
//#region .build/vue/UiInput.vue
|
|
@@ -31,6 +32,7 @@ var UiInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
31
32
|
type: Boolean,
|
|
32
33
|
default: false
|
|
33
34
|
},
|
|
35
|
+
size: { default: "md" },
|
|
34
36
|
value: {},
|
|
35
37
|
modelValue: {}
|
|
36
38
|
},
|
|
@@ -43,6 +45,8 @@ var UiInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
43
45
|
set: (value) => emit("update:modelValue", value)
|
|
44
46
|
});
|
|
45
47
|
const root = ref(null);
|
|
48
|
+
/** The values the styles' :host-state() rules test. */
|
|
49
|
+
const hostState = computed(() => [props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
46
50
|
const dispatch = createDispatch(root);
|
|
47
51
|
useComponentHost(controllerModule.default, {
|
|
48
52
|
root,
|
|
@@ -56,11 +60,12 @@ var UiInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
56
60
|
required: __props.required,
|
|
57
61
|
"aria-invalid": __props.invalid,
|
|
58
62
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
63
|
+
"data-ui-input-state": hostState.value || void 0,
|
|
59
64
|
ref_key: "root",
|
|
60
65
|
ref: root
|
|
61
66
|
}), null, 16, _hoisted_1)), [[vModelDynamic, model.value]]);
|
|
62
67
|
};
|
|
63
68
|
}
|
|
64
|
-
}), [["__scopeId", "data-v-
|
|
69
|
+
}), [["__scopeId", "data-v-4ba095d3"]]);
|
|
65
70
|
//#endregion
|
|
66
71
|
export { UiInput_default as t };
|
package/vue/chunks/UiRadio.js
CHANGED
|
@@ -37,6 +37,7 @@ var UiRadio_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: false
|
|
39
39
|
},
|
|
40
|
+
size: { default: "md" },
|
|
40
41
|
value: { default: "on" }
|
|
41
42
|
},
|
|
42
43
|
emits: [
|
|
@@ -52,7 +53,7 @@ var UiRadio_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
52
53
|
const descriptionElement = useTemplateRef("description");
|
|
53
54
|
const internalChecked = ref(false);
|
|
54
55
|
/** The values the styles' :host-state() rules test. */
|
|
55
|
-
const hostState = computed(() => [props.disabled && "disabled"].filter(Boolean).join(" "));
|
|
56
|
+
const hostState = computed(() => [props.disabled && "disabled", props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
56
57
|
const isChangeDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["checked"] === "boolean" && typeof detail["value"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
57
58
|
"checked",
|
|
58
59
|
"value",
|
|
@@ -88,6 +89,6 @@ var UiRadio_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE
|
|
|
88
89
|
}, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, void 0, true)], 512)])], 16, _hoisted_1);
|
|
89
90
|
};
|
|
90
91
|
}
|
|
91
|
-
}), [["__scopeId", "data-v-
|
|
92
|
+
}), [["__scopeId", "data-v-02111ebf"]]);
|
|
92
93
|
//#endregion
|
|
93
94
|
export { UiRadio_default as t };
|
package/vue/chunks/UiSelect.js
CHANGED
|
@@ -6,7 +6,8 @@ import * as controllerModule from "@threadlabs/looma/components/ui-select/ui-sel
|
|
|
6
6
|
var _hoisted_1 = [
|
|
7
7
|
"disabled",
|
|
8
8
|
"required",
|
|
9
|
-
"aria-invalid"
|
|
9
|
+
"aria-invalid",
|
|
10
|
+
"data-ui-select-state"
|
|
10
11
|
];
|
|
11
12
|
//#endregion
|
|
12
13
|
//#region .build/vue/UiSelect.vue
|
|
@@ -26,6 +27,7 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
26
27
|
type: Boolean,
|
|
27
28
|
default: false
|
|
28
29
|
},
|
|
30
|
+
size: { default: "md" },
|
|
29
31
|
value: {},
|
|
30
32
|
modelValue: {}
|
|
31
33
|
},
|
|
@@ -38,6 +40,8 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
38
40
|
set: (value) => emit("update:modelValue", value)
|
|
39
41
|
});
|
|
40
42
|
const root = ref(null);
|
|
43
|
+
/** The values the styles' :host-state() rules test. */
|
|
44
|
+
const hostState = computed(() => [props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
41
45
|
const dispatch = createDispatch(root);
|
|
42
46
|
useComponentHost(controllerModule.default, {
|
|
43
47
|
root,
|
|
@@ -50,11 +54,12 @@ var UiSelect_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
50
54
|
required: __props.required,
|
|
51
55
|
"aria-invalid": __props.invalid,
|
|
52
56
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
57
|
+
"data-ui-select-state": hostState.value || void 0,
|
|
53
58
|
ref_key: "root",
|
|
54
59
|
ref: root
|
|
55
60
|
}), [renderSlot(_ctx.$slots, "default", {}, void 0, true)], 16, _hoisted_1)), [[vModelSelect, model.value]]);
|
|
56
61
|
};
|
|
57
62
|
}
|
|
58
|
-
}), [["__scopeId", "data-v-
|
|
63
|
+
}), [["__scopeId", "data-v-c81ec3d9"]]);
|
|
59
64
|
//#endregion
|
|
60
65
|
export { UiSelect_default as t };
|
package/vue/chunks/UiSwitch.js
CHANGED
|
@@ -37,6 +37,7 @@ var UiSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
37
37
|
type: Boolean,
|
|
38
38
|
default: false
|
|
39
39
|
},
|
|
40
|
+
size: { default: "md" },
|
|
40
41
|
value: { default: "on" }
|
|
41
42
|
},
|
|
42
43
|
emits: [
|
|
@@ -52,7 +53,7 @@ var UiSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
52
53
|
const descriptionElement = useTemplateRef("description");
|
|
53
54
|
const internalChecked = ref(false);
|
|
54
55
|
/** The values the styles' :host-state() rules test. */
|
|
55
|
-
const hostState = computed(() => [props.disabled && "disabled"].filter(Boolean).join(" "));
|
|
56
|
+
const hostState = computed(() => [props.disabled && "disabled", props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
56
57
|
const isChangeDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["checked"] === "boolean" && typeof detail["value"] === "string" && (detail["trigger"] === "keyboard" || detail["trigger"] === "pointer" || detail["trigger"] === "programmatic") && Object.keys(detail).every((key) => [
|
|
57
58
|
"checked",
|
|
58
59
|
"value",
|
|
@@ -89,6 +90,6 @@ var UiSwitch_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PUR
|
|
|
89
90
|
}, null, 40, _hoisted_2), createElementVNode("span", _hoisted_3, [createElementVNode("span", _hoisted_4, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]), createElementVNode("span", _hoisted_5, [renderSlot(_ctx.$slots, "description", {}, void 0, true)], 512)])], 16, _hoisted_1);
|
|
90
91
|
};
|
|
91
92
|
}
|
|
92
|
-
}), [["__scopeId", "data-v-
|
|
93
|
+
}), [["__scopeId", "data-v-87fc218c"]]);
|
|
93
94
|
//#endregion
|
|
94
95
|
export { UiSwitch_default as t };
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { n as useComponentHost, t as createDispatch } from "./host.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, ref, renderSlot } from "vue";
|
|
4
|
+
import * as controllerModule from "@threadlabs/looma/components/ui-table/ui-table.js";
|
|
5
|
+
//#region .build/vue/UiTable.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = ["data-ui-table-state"];
|
|
7
|
+
//#endregion
|
|
8
|
+
//#region .build/vue/UiTable.vue
|
|
9
|
+
var UiTable_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
10
|
+
inheritAttrs: false,
|
|
11
|
+
__name: "UiTable",
|
|
12
|
+
props: {
|
|
13
|
+
density: { default: "comfortable" },
|
|
14
|
+
stickyHeader: {
|
|
15
|
+
type: Boolean,
|
|
16
|
+
default: false
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
setup(__props) {
|
|
20
|
+
const props = __props;
|
|
21
|
+
const root = ref(null);
|
|
22
|
+
/** The values the styles' :host-state() rules test. */
|
|
23
|
+
const hostState = computed(() => [props.density && `density density=${props.density}`, props.stickyHeader && "stickyHeader"].filter(Boolean).join(" "));
|
|
24
|
+
const dispatch = createDispatch(root);
|
|
25
|
+
useComponentHost(controllerModule.default, {
|
|
26
|
+
root,
|
|
27
|
+
dispatch,
|
|
28
|
+
props
|
|
29
|
+
});
|
|
30
|
+
return (_ctx, _cache) => {
|
|
31
|
+
return openBlock(), createElementBlock("div", mergeProps({ "data-component": "ui-table" }, _ctx.$attrs, {
|
|
32
|
+
"data-ui-table-state": hostState.value || void 0,
|
|
33
|
+
ref_key: "root",
|
|
34
|
+
ref: root
|
|
35
|
+
}), [renderSlot(_ctx.$slots, "default")], 16, _hoisted_1);
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
}), [["__scopeId", "data-v-9980d203"]]);
|
|
39
|
+
//#endregion
|
|
40
|
+
export { UiTable_default as t };
|
package/vue/chunks/UiTextarea.js
CHANGED
|
@@ -8,7 +8,8 @@ var _hoisted_1 = [
|
|
|
8
8
|
"readonly",
|
|
9
9
|
"required",
|
|
10
10
|
"aria-invalid",
|
|
11
|
-
"rows"
|
|
11
|
+
"rows",
|
|
12
|
+
"data-ui-textarea-state"
|
|
12
13
|
];
|
|
13
14
|
//#endregion
|
|
14
15
|
//#region .build/vue/UiTextarea.vue
|
|
@@ -33,6 +34,7 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
33
34
|
default: false
|
|
34
35
|
},
|
|
35
36
|
rows: { default: 4 },
|
|
37
|
+
size: { default: "md" },
|
|
36
38
|
value: {},
|
|
37
39
|
modelValue: {}
|
|
38
40
|
},
|
|
@@ -45,6 +47,8 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
45
47
|
set: (value) => emit("update:modelValue", value)
|
|
46
48
|
});
|
|
47
49
|
const root = ref(null);
|
|
50
|
+
/** The values the styles' :host-state() rules test. */
|
|
51
|
+
const hostState = computed(() => [props.size && `size size=${props.size}`].filter(Boolean).join(" "));
|
|
48
52
|
const dispatch = createDispatch(root);
|
|
49
53
|
useComponentHost(controllerModule.default, {
|
|
50
54
|
root,
|
|
@@ -59,11 +63,12 @@ var UiTextarea_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
59
63
|
"aria-invalid": __props.invalid,
|
|
60
64
|
rows: __props.rows,
|
|
61
65
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => model.value = $event),
|
|
66
|
+
"data-ui-textarea-state": hostState.value || void 0,
|
|
62
67
|
ref_key: "root",
|
|
63
68
|
ref: root
|
|
64
69
|
}), null, 16, _hoisted_1)), [[vModelText, model.value]]);
|
|
65
70
|
};
|
|
66
71
|
}
|
|
67
|
-
}), [["__scopeId", "data-v-
|
|
72
|
+
}), [["__scopeId", "data-v-00f7b2fd"]]);
|
|
68
73
|
//#endregion
|
|
69
74
|
export { UiTextarea_default as t };
|