@threadlabs/looma 0.34.0 → 0.35.0
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-badge/ui-badge.html +11 -3
- package/components/ui-button/ui-button.html +29 -4
- package/components/ui-card/ui-card.html +15 -13
- package/components/ui-checkbox/ui-checkbox.html +4 -2
- package/components/ui-dialog/ui-dialog.html +2 -0
- package/components/ui-icon-button/ui-icon-button.html +22 -8
- package/components/ui-input/ui-input.html +2 -1
- package/components/ui-input-group/ui-input-group.html +4 -1
- package/components/ui-light-editor/ui-light-editor.html +45 -0
- package/components/ui-light-editor/ui-light-editor.js +53 -0
- package/components/ui-menu/ui-menu.html +2 -0
- package/components/ui-number-input/ui-number-input.html +2 -1
- package/components/ui-number-input/ui-number-input.js +6 -3
- package/components/ui-popover/ui-popover.html +2 -0
- package/components/ui-select/ui-select.html +9 -7
- package/components/ui-switch/ui-switch.html +3 -0
- package/components/ui-textarea/ui-textarea.html +2 -1
- package/dist/index.js +24 -23
- package/docs/README.md +26 -2
- package/docs/catalog.json +566 -44
- package/docs/customizer-render.mjs +24 -11
- package/docs/customizer.js +67 -17
- package/docs/index.d.ts +4 -1
- package/docs/index.mjs +1 -1
- package/docs/render.mjs +1 -1
- package/docs/site.mjs +30 -20
- package/docs/theme-session.mjs +4 -2
- package/docs/theme.mjs +59 -7
- package/package.json +2 -2
- package/styles/ui-badge.css +11 -6
- package/styles/ui-button.css +29 -4
- package/styles/ui-card.css +9 -9
- package/styles/ui-checkbox.css +4 -2
- package/styles/ui-dialog.css +4 -0
- package/styles/ui-icon-button.css +22 -8
- package/styles/ui-input-group.css +4 -1
- package/styles/ui-input.css +2 -1
- package/styles/ui-light-editor.css +28 -0
- package/styles/ui-menu.css +2 -0
- package/styles/ui-popover.css +2 -0
- package/styles/ui-select.css +9 -7
- package/styles/ui-switch.css +3 -0
- package/styles/ui-textarea.css +2 -1
- package/theme-light.css +1 -0
- package/theme-system.css +43 -7
- package/tokens.css +4 -0
- package/vanilla/UiCard.d.ts +2 -1
- package/vanilla/UiCard.js +12 -12
- package/vanilla/UiLightEditor.d.ts +29 -0
- package/vanilla/UiLightEditor.js +102 -0
- package/vanilla/UiNumberInput.js +27 -20
- package/vanilla/index.js +1 -0
- package/vue/UiBadge.vue +29 -4
- package/vue/UiButton.vue +33 -4
- package/vue/UiCard.d.ts +8 -2
- package/vue/UiCard.vue +41 -17
- package/vue/UiCheckbox.vue +4 -2
- package/vue/UiDialog.vue +4 -0
- package/vue/UiIconButton.vue +26 -11
- package/vue/UiInput.vue +2 -1
- package/vue/UiInputGroup.vue +4 -1
- package/vue/UiLightEditor.d.ts +75 -0
- package/vue/UiLightEditor.js +2 -0
- package/vue/UiLightEditor.vue +402 -0
- package/vue/UiMenu.vue +2 -0
- package/vue/UiNumberInput.vue +32 -3
- package/vue/UiPopover.vue +2 -0
- package/vue/UiSelect.vue +16 -10
- package/vue/UiSwitch.vue +3 -0
- package/vue/UiTextarea.vue +2 -1
- package/vue/chunks/UiBadge.js +1 -1
- package/vue/chunks/UiButton.js +1 -1
- package/vue/chunks/UiCard.js +33 -5
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiDialog.js +1 -1
- package/vue/chunks/UiIconButton.js +1 -1
- package/vue/chunks/UiInput.js +1 -1
- package/vue/chunks/UiInputGroup.js +1 -1
- package/vue/chunks/UiLightEditor.js +347 -0
- package/vue/chunks/UiMenu.js +1 -1
- package/vue/chunks/UiNumberInput.js +21 -8
- package/vue/chunks/UiPopover.js +1 -1
- package/vue/chunks/UiSelect.js +1 -1
- package/vue/chunks/UiSwitch.js +1 -1
- package/vue/chunks/UiTextarea.js +1 -1
- package/vue/components.css +306 -66
- package/vue/index.d.ts +1 -0
- package/vue/index.js +2 -1
package/vue/chunks/UiCard.js
CHANGED
|
@@ -7,6 +7,7 @@ var _hoisted_1 = [
|
|
|
7
7
|
"data-ui-card-prop-padding",
|
|
8
8
|
"data-ui-card-prop-size",
|
|
9
9
|
"data-ui-card-prop-tone",
|
|
10
|
+
"data-ui-card-prop-treatment",
|
|
10
11
|
"data-ui-card-prop-variant",
|
|
11
12
|
"data-ui-card-state"
|
|
12
13
|
];
|
|
@@ -15,6 +16,7 @@ var _hoisted_2 = [
|
|
|
15
16
|
"data-ui-card-prop-padding",
|
|
16
17
|
"data-ui-card-prop-size",
|
|
17
18
|
"data-ui-card-prop-tone",
|
|
19
|
+
"data-ui-card-prop-treatment",
|
|
18
20
|
"data-ui-card-prop-variant",
|
|
19
21
|
"data-ui-card-state"
|
|
20
22
|
];
|
|
@@ -23,6 +25,7 @@ var _hoisted_3 = [
|
|
|
23
25
|
"data-ui-card-prop-padding",
|
|
24
26
|
"data-ui-card-prop-size",
|
|
25
27
|
"data-ui-card-prop-tone",
|
|
28
|
+
"data-ui-card-prop-treatment",
|
|
26
29
|
"data-ui-card-prop-variant",
|
|
27
30
|
"data-ui-card-state"
|
|
28
31
|
];
|
|
@@ -31,6 +34,7 @@ var _hoisted_4 = [
|
|
|
31
34
|
"data-ui-card-prop-padding",
|
|
32
35
|
"data-ui-card-prop-size",
|
|
33
36
|
"data-ui-card-prop-tone",
|
|
37
|
+
"data-ui-card-prop-treatment",
|
|
34
38
|
"data-ui-card-prop-variant",
|
|
35
39
|
"data-ui-card-state"
|
|
36
40
|
];
|
|
@@ -44,6 +48,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
44
48
|
padding: { type: null },
|
|
45
49
|
size: { type: null },
|
|
46
50
|
tone: { type: null },
|
|
51
|
+
treatment: { type: null },
|
|
47
52
|
variant: { type: null },
|
|
48
53
|
[BINDING_INPUTS_PROP]: { type: null }
|
|
49
54
|
},
|
|
@@ -104,7 +109,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
104
109
|
},
|
|
105
110
|
required: false,
|
|
106
111
|
target: { attribute: "tone" },
|
|
107
|
-
description: "accent, info, success and
|
|
112
|
+
description: "accent, info, success, warning and danger add a quiet semantic surface without changing card geometry. Row highlights follow the\n surface hue; action controls retain their own intent.",
|
|
108
113
|
values: [
|
|
109
114
|
"neutral",
|
|
110
115
|
"accent",
|
|
@@ -115,6 +120,17 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
115
120
|
],
|
|
116
121
|
default: "neutral"
|
|
117
122
|
},
|
|
123
|
+
treatment: {
|
|
124
|
+
type: {
|
|
125
|
+
kind: "terminal",
|
|
126
|
+
name: "keyword"
|
|
127
|
+
},
|
|
128
|
+
required: false,
|
|
129
|
+
target: { attribute: "treatment" },
|
|
130
|
+
description: "How much of the theme's decorative material the surface expresses. standard preserves its restrained treatment; expressive uses the full material treatment.\n This does not add elevation or require glass.",
|
|
131
|
+
values: ["standard", "expressive"],
|
|
132
|
+
default: "standard"
|
|
133
|
+
},
|
|
118
134
|
variant: {
|
|
119
135
|
type: {
|
|
120
136
|
kind: "terminal",
|
|
@@ -122,12 +138,11 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
122
138
|
},
|
|
123
139
|
required: false,
|
|
124
140
|
target: { attribute: "variant" },
|
|
125
|
-
description: "The surface. outlined is a bordered panel on the page; subtle is a quiet filled one with no border, for supporting details set apart from the flow;\n elevated
|
|
141
|
+
description: "The surface. outlined is a bordered panel on the page; subtle is a quiet filled one with no border, for supporting details set apart from the flow;\n elevated adds a subtle lift above the page, for a view's one card, such as sign-in. Treatment independently controls decorative material.",
|
|
126
142
|
values: [
|
|
127
143
|
"outlined",
|
|
128
144
|
"subtle",
|
|
129
|
-
"elevated"
|
|
130
|
-
"glass"
|
|
145
|
+
"elevated"
|
|
131
146
|
],
|
|
132
147
|
default: "outlined"
|
|
133
148
|
}
|
|
@@ -138,12 +153,14 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
138
153
|
padding: "md",
|
|
139
154
|
size: "content",
|
|
140
155
|
tone: "neutral",
|
|
156
|
+
treatment: "standard",
|
|
141
157
|
variant: "outlined"
|
|
142
158
|
}, {
|
|
143
159
|
as: "div",
|
|
144
160
|
padding: "md",
|
|
145
161
|
size: "content",
|
|
146
162
|
tone: "neutral",
|
|
163
|
+
treatment: "standard",
|
|
147
164
|
variant: "outlined"
|
|
148
165
|
}, (name, value, source, values) => {
|
|
149
166
|
switch (name) {
|
|
@@ -163,6 +180,10 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
163
180
|
kind: "terminal",
|
|
164
181
|
name: "keyword"
|
|
165
182
|
}, true, true);
|
|
183
|
+
case "treatment": return checkPropInput(value, {
|
|
184
|
+
kind: "terminal",
|
|
185
|
+
name: "keyword"
|
|
186
|
+
}, true, true);
|
|
166
187
|
case "variant": return checkPropInput(value, {
|
|
167
188
|
kind: "terminal",
|
|
168
189
|
name: "keyword"
|
|
@@ -180,6 +201,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
180
201
|
padding: propInputs.value("padding", props["padding"], props[BINDING_INPUTS_PROP]),
|
|
181
202
|
size: propInputs.value("size", props["size"], props[BINDING_INPUTS_PROP]),
|
|
182
203
|
tone: propInputs.value("tone", props["tone"], props[BINDING_INPUTS_PROP]),
|
|
204
|
+
treatment: propInputs.value("treatment", props["treatment"], props[BINDING_INPUTS_PROP]),
|
|
183
205
|
variant: propInputs.value("variant", props["variant"], props[BINDING_INPUTS_PROP])
|
|
184
206
|
};
|
|
185
207
|
});
|
|
@@ -197,6 +219,8 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
197
219
|
checkedProps.value.padding != null && `padding=${encodeURIComponent(checkedProps.value.padding)}`,
|
|
198
220
|
checkedProps.value.variant && "variant",
|
|
199
221
|
checkedProps.value.variant != null && `variant=${encodeURIComponent(checkedProps.value.variant)}`,
|
|
222
|
+
checkedProps.value.treatment && "treatment",
|
|
223
|
+
checkedProps.value.treatment != null && `treatment=${encodeURIComponent(checkedProps.value.treatment)}`,
|
|
200
224
|
checkedProps.value.tone && "tone",
|
|
201
225
|
checkedProps.value.tone != null && `tone=${encodeURIComponent(checkedProps.value.tone)}`,
|
|
202
226
|
checkedProps.value.size && "size",
|
|
@@ -213,6 +237,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
213
237
|
"data-ui-card-prop-padding": unref(reflectedProp)("padding", "padding", checkedProps.value.padding, void 0, false),
|
|
214
238
|
"data-ui-card-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
|
|
215
239
|
"data-ui-card-prop-tone": unref(reflectedProp)("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
240
|
+
"data-ui-card-prop-treatment": unref(reflectedProp)("treatment", "treatment", checkedProps.value.treatment, void 0, false),
|
|
216
241
|
"data-ui-card-prop-variant": unref(reflectedProp)("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
217
242
|
"data-ui-card-state": hostState.value || void 0,
|
|
218
243
|
ref: "@html-next/root"
|
|
@@ -229,6 +254,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
229
254
|
"data-ui-card-prop-padding": unref(reflectedProp)("padding", "padding", checkedProps.value.padding, void 0, false),
|
|
230
255
|
"data-ui-card-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
|
|
231
256
|
"data-ui-card-prop-tone": unref(reflectedProp)("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
257
|
+
"data-ui-card-prop-treatment": unref(reflectedProp)("treatment", "treatment", checkedProps.value.treatment, void 0, false),
|
|
232
258
|
"data-ui-card-prop-variant": unref(reflectedProp)("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
233
259
|
"data-ui-card-state": hostState.value || void 0,
|
|
234
260
|
ref: "@html-next/root"
|
|
@@ -245,6 +271,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
245
271
|
"data-ui-card-prop-padding": unref(reflectedProp)("padding", "padding", checkedProps.value.padding, void 0, false),
|
|
246
272
|
"data-ui-card-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
|
|
247
273
|
"data-ui-card-prop-tone": unref(reflectedProp)("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
274
|
+
"data-ui-card-prop-treatment": unref(reflectedProp)("treatment", "treatment", checkedProps.value.treatment, void 0, false),
|
|
248
275
|
"data-ui-card-prop-variant": unref(reflectedProp)("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
249
276
|
"data-ui-card-state": hostState.value || void 0,
|
|
250
277
|
ref: "@html-next/root"
|
|
@@ -261,6 +288,7 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
261
288
|
"data-ui-card-prop-padding": unref(reflectedProp)("padding", "padding", checkedProps.value.padding, void 0, false),
|
|
262
289
|
"data-ui-card-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
|
|
263
290
|
"data-ui-card-prop-tone": unref(reflectedProp)("tone", "tone", checkedProps.value.tone, void 0, false),
|
|
291
|
+
"data-ui-card-prop-treatment": unref(reflectedProp)("treatment", "treatment", checkedProps.value.treatment, void 0, false),
|
|
264
292
|
"data-ui-card-prop-variant": unref(reflectedProp)("variant", "variant", checkedProps.value.variant, void 0, false),
|
|
265
293
|
"data-ui-card-state": hostState.value || void 0,
|
|
266
294
|
ref: "@html-next/root"
|
|
@@ -270,6 +298,6 @@ var UiCard_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE_
|
|
|
270
298
|
}]]);
|
|
271
299
|
};
|
|
272
300
|
}
|
|
273
|
-
}), [["__scopeId", "data-v-
|
|
301
|
+
}), [["__scopeId", "data-v-2c59052c"]]);
|
|
274
302
|
//#endregion
|
|
275
303
|
export { UiCard_default as t };
|
package/vue/chunks/UiCheckbox.js
CHANGED
package/vue/chunks/UiDialog.js
CHANGED
package/vue/chunks/UiInput.js
CHANGED
|
@@ -0,0 +1,347 @@
|
|
|
1
|
+
import { a as concat, b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { d as requireInputStatus, i as checkPropInput, m as vuePropInputs, p as vPropValidity, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
|
+
import { t as UiNumberInput_default } from "./UiNumberInput.js";
|
|
4
|
+
import { computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withDirectives } from "vue";
|
|
5
|
+
//#region .build/vue/UiLightEditor.vue?vue&type=script&setup=true&lang.ts
|
|
6
|
+
var _hoisted_1 = [
|
|
7
|
+
"data-ui-light-editor-prop-disabled",
|
|
8
|
+
"data-ui-light-editor-prop-label",
|
|
9
|
+
"data-ui-light-editor-prop-size",
|
|
10
|
+
"data-ui-light-editor-prop-x",
|
|
11
|
+
"data-ui-light-editor-prop-y"
|
|
12
|
+
];
|
|
13
|
+
var _hoisted_2 = ["aria-label"];
|
|
14
|
+
var _hoisted_3 = {
|
|
15
|
+
class: "specimen",
|
|
16
|
+
"data-hn-ui-light-editor": ""
|
|
17
|
+
};
|
|
18
|
+
var _hoisted_4 = ["disabled", "aria-label"];
|
|
19
|
+
var _hoisted_5 = {
|
|
20
|
+
class: "coordinates",
|
|
21
|
+
"data-hn-ui-light-editor": ""
|
|
22
|
+
};
|
|
23
|
+
//#endregion
|
|
24
|
+
//#region .build/vue/UiLightEditor.vue
|
|
25
|
+
var UiLightEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__PURE__ */ defineComponent({
|
|
26
|
+
inheritAttrs: false,
|
|
27
|
+
__name: "UiLightEditor",
|
|
28
|
+
props: {
|
|
29
|
+
disabled: { type: null },
|
|
30
|
+
label: { type: null },
|
|
31
|
+
size: { type: null },
|
|
32
|
+
x: { type: null },
|
|
33
|
+
y: { type: null },
|
|
34
|
+
[BINDING_INPUTS_PROP]: { type: null }
|
|
35
|
+
},
|
|
36
|
+
emits: [
|
|
37
|
+
"update:x",
|
|
38
|
+
"update:y",
|
|
39
|
+
"input",
|
|
40
|
+
"change"
|
|
41
|
+
],
|
|
42
|
+
setup(__props, { emit: __emit }) {
|
|
43
|
+
const propValidityContract = { props: {
|
|
44
|
+
disabled: {
|
|
45
|
+
type: {
|
|
46
|
+
kind: "terminal",
|
|
47
|
+
name: "boolean"
|
|
48
|
+
},
|
|
49
|
+
required: false,
|
|
50
|
+
target: { attribute: "disabled" },
|
|
51
|
+
description: "Prevents pointer, keyboard and exact edits.",
|
|
52
|
+
default: false
|
|
53
|
+
},
|
|
54
|
+
label: {
|
|
55
|
+
type: {
|
|
56
|
+
kind: "terminal",
|
|
57
|
+
name: "string"
|
|
58
|
+
},
|
|
59
|
+
required: false,
|
|
60
|
+
target: { attribute: "aria-label" },
|
|
61
|
+
description: "Accessible name for the position editor.",
|
|
62
|
+
default: "Light position"
|
|
63
|
+
},
|
|
64
|
+
size: {
|
|
65
|
+
type: {
|
|
66
|
+
kind: "terminal",
|
|
67
|
+
name: "keyword"
|
|
68
|
+
},
|
|
69
|
+
required: false,
|
|
70
|
+
target: { attribute: "size" },
|
|
71
|
+
description: "Sets both coordinate fields to the shared small, medium or large control height.",
|
|
72
|
+
values: [
|
|
73
|
+
"sm",
|
|
74
|
+
"md",
|
|
75
|
+
"lg"
|
|
76
|
+
],
|
|
77
|
+
default: "md"
|
|
78
|
+
},
|
|
79
|
+
x: {
|
|
80
|
+
type: {
|
|
81
|
+
kind: "terminal",
|
|
82
|
+
name: "number"
|
|
83
|
+
},
|
|
84
|
+
required: false,
|
|
85
|
+
target: { attribute: "x" },
|
|
86
|
+
description: "Horizontal source position from 0 (left) to 1 (right), relative to every surface.",
|
|
87
|
+
default: .5
|
|
88
|
+
},
|
|
89
|
+
y: {
|
|
90
|
+
type: {
|
|
91
|
+
kind: "terminal",
|
|
92
|
+
name: "number"
|
|
93
|
+
},
|
|
94
|
+
required: false,
|
|
95
|
+
target: { attribute: "y" },
|
|
96
|
+
description: "Vertical source position from 0 (top) to 1 (bottom), relative to every surface.",
|
|
97
|
+
default: 0
|
|
98
|
+
}
|
|
99
|
+
} };
|
|
100
|
+
const props = __props;
|
|
101
|
+
const inputTracking = vuePropInputs({
|
|
102
|
+
disabled: false,
|
|
103
|
+
label: "Light position",
|
|
104
|
+
size: "md",
|
|
105
|
+
x: .5,
|
|
106
|
+
y: 0
|
|
107
|
+
}, {
|
|
108
|
+
disabled: false,
|
|
109
|
+
label: "Light position",
|
|
110
|
+
size: "md",
|
|
111
|
+
x: .5,
|
|
112
|
+
y: 0
|
|
113
|
+
}, (name, value, source, values) => {
|
|
114
|
+
switch (name) {
|
|
115
|
+
case "disabled": return checkPropInput(value, {
|
|
116
|
+
kind: "terminal",
|
|
117
|
+
name: "boolean"
|
|
118
|
+
}, true, true);
|
|
119
|
+
case "label": return checkPropInput(value, {
|
|
120
|
+
kind: "terminal",
|
|
121
|
+
name: "string"
|
|
122
|
+
}, true, true);
|
|
123
|
+
case "size": return checkPropInput(value, {
|
|
124
|
+
kind: "terminal",
|
|
125
|
+
name: "keyword"
|
|
126
|
+
}, true, true);
|
|
127
|
+
case "x": return checkPropInput(value, {
|
|
128
|
+
kind: "terminal",
|
|
129
|
+
name: "number"
|
|
130
|
+
}, true, true);
|
|
131
|
+
case "y": return checkPropInput(value, {
|
|
132
|
+
kind: "terminal",
|
|
133
|
+
name: "number"
|
|
134
|
+
}, true, true);
|
|
135
|
+
default: return { ok: false };
|
|
136
|
+
}
|
|
137
|
+
}, () => {
|
|
138
|
+
checkedProps.value;
|
|
139
|
+
});
|
|
140
|
+
const propInputs = inputTracking.inputs;
|
|
141
|
+
const checkedProps = computed(() => {
|
|
142
|
+
inputTracking.version.value;
|
|
143
|
+
return {
|
|
144
|
+
disabled: propInputs.value("disabled", props["disabled"], props[BINDING_INPUTS_PROP]),
|
|
145
|
+
label: propInputs.value("label", props["label"], props[BINDING_INPUTS_PROP]),
|
|
146
|
+
size: propInputs.value("size", props["size"], props[BINDING_INPUTS_PROP]),
|
|
147
|
+
x: propInputs.value("x", props["x"], props[BINDING_INPUTS_PROP]),
|
|
148
|
+
y: propInputs.value("y", props["y"], props[BINDING_INPUTS_PROP])
|
|
149
|
+
};
|
|
150
|
+
});
|
|
151
|
+
const inputStatus = (name, handlesError) => {
|
|
152
|
+
checkedProps.value;
|
|
153
|
+
inputTracking.version.value;
|
|
154
|
+
return requireInputStatus(propInputs.status(name), handlesError);
|
|
155
|
+
};
|
|
156
|
+
checkedProps.value;
|
|
157
|
+
watchSyncEffect(() => {
|
|
158
|
+
checkedProps.value;
|
|
159
|
+
});
|
|
160
|
+
const reflectedProp = useReflectedProp();
|
|
161
|
+
const hydrationInstance = getCurrentInstance();
|
|
162
|
+
const emit = __emit;
|
|
163
|
+
const root = ref(null);
|
|
164
|
+
const planeElement = useTemplateRef("planeElement");
|
|
165
|
+
const sourceElement = useTemplateRef("sourceElement");
|
|
166
|
+
const horizontal = ref("50");
|
|
167
|
+
const vertical = ref("0");
|
|
168
|
+
let guardedPrevious = null;
|
|
169
|
+
const guarded = computed(() => {
|
|
170
|
+
const candidate = concat(checkedProps.value.label, ". Arrow keys move the source; Shift moves faster.");
|
|
171
|
+
if (candidate === Symbol.for("html-next.invalid-result")) return guardedPrevious;
|
|
172
|
+
return guardedPrevious = candidate;
|
|
173
|
+
});
|
|
174
|
+
provide("html-next:ui-light-editor:horizontal", horizontal);
|
|
175
|
+
provide("html-next:ui-light-editor:vertical", vertical);
|
|
176
|
+
checkHydratedRoot("span", "ui-light-editor");
|
|
177
|
+
const isInputDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["x"] === "number" && Number.isFinite(detail["x"]) && typeof detail["y"] === "number" && Number.isFinite(detail["y"]) && Object.keys(detail).every((key) => ["x", "y"].includes(key));
|
|
178
|
+
const dispatch = createDispatch(root, emit, {
|
|
179
|
+
checks: {
|
|
180
|
+
input: isInputDetail,
|
|
181
|
+
change: isInputDetail
|
|
182
|
+
},
|
|
183
|
+
modeled: ["x", "y"]
|
|
184
|
+
});
|
|
185
|
+
useComponentHost(() => import("@threadlabs/looma/components/ui-light-editor/ui-light-editor.js"), {
|
|
186
|
+
root,
|
|
187
|
+
module: true,
|
|
188
|
+
dispatch,
|
|
189
|
+
acceptsState: (name, keys, value) => acceptsControllerWrite(value, {
|
|
190
|
+
horizontal: {
|
|
191
|
+
kind: "terminal",
|
|
192
|
+
name: "string"
|
|
193
|
+
},
|
|
194
|
+
vertical: {
|
|
195
|
+
kind: "terminal",
|
|
196
|
+
name: "string"
|
|
197
|
+
}
|
|
198
|
+
}[name], keys),
|
|
199
|
+
initials: {
|
|
200
|
+
horizontal: "50",
|
|
201
|
+
vertical: "0"
|
|
202
|
+
},
|
|
203
|
+
controllerSource: {
|
|
204
|
+
specifier: "../components/ui-light-editor/ui-light-editor.js",
|
|
205
|
+
definition: "./components/ui-light-editor/ui-light-editor.html"
|
|
206
|
+
},
|
|
207
|
+
props: checkedProps,
|
|
208
|
+
inputs: propInputs,
|
|
209
|
+
inputTracking,
|
|
210
|
+
propInputs: (name) => {
|
|
211
|
+
const incoming = hydrationInstance?.vnode.props;
|
|
212
|
+
const kebab = name.replace(/[A-Z]/g, (letter) => "-" + letter.toLowerCase());
|
|
213
|
+
return incoming !== null && incoming !== void 0 ? incoming[name] ?? incoming[kebab] ?? null : null;
|
|
214
|
+
},
|
|
215
|
+
propNames: [
|
|
216
|
+
"disabled",
|
|
217
|
+
"label",
|
|
218
|
+
"size",
|
|
219
|
+
"x",
|
|
220
|
+
"y"
|
|
221
|
+
],
|
|
222
|
+
propValidity: (name) => propValidityState({
|
|
223
|
+
contract: propValidityContract,
|
|
224
|
+
values: { ...props }
|
|
225
|
+
}, name),
|
|
226
|
+
refs: {
|
|
227
|
+
plane: planeElement,
|
|
228
|
+
source: sourceElement
|
|
229
|
+
},
|
|
230
|
+
state: {
|
|
231
|
+
horizontal,
|
|
232
|
+
vertical
|
|
233
|
+
}
|
|
234
|
+
});
|
|
235
|
+
return (_ctx, _cache) => {
|
|
236
|
+
return withDirectives((openBlock(), createElementBlock("span", mergeProps({ class: "ui-light-editor" }, unref(nativeAttrs)(_ctx.$attrs), {
|
|
237
|
+
"data-hn": "",
|
|
238
|
+
"data-hn-ui-light-editor": "",
|
|
239
|
+
"data-ui-light-editor-prop-disabled": unref(reflectedProp)("disabled", "disabled", checkedProps.value.disabled, void 0, false),
|
|
240
|
+
"data-ui-light-editor-prop-label": unref(reflectedProp)("label", "label", checkedProps.value.label, void 0, false),
|
|
241
|
+
"data-ui-light-editor-prop-size": unref(reflectedProp)("size", "size", checkedProps.value.size, void 0, false),
|
|
242
|
+
"data-ui-light-editor-prop-x": unref(reflectedProp)("x", "x", checkedProps.value.x, void 0, false),
|
|
243
|
+
"data-ui-light-editor-prop-y": unref(reflectedProp)("y", "y", checkedProps.value.y, void 0, false),
|
|
244
|
+
ref_key: "root",
|
|
245
|
+
ref: root
|
|
246
|
+
}), [
|
|
247
|
+
createElementVNode("span", {
|
|
248
|
+
class: "stage",
|
|
249
|
+
role: "group",
|
|
250
|
+
"data-hn-ui-light-editor": "",
|
|
251
|
+
"aria-label": checkedProps.value.label ?? void 0
|
|
252
|
+
}, [createElementVNode("span", {
|
|
253
|
+
class: "plane",
|
|
254
|
+
"data-hn-ui-light-editor": "",
|
|
255
|
+
ref_key: "planeElement",
|
|
256
|
+
ref: planeElement
|
|
257
|
+
}, [
|
|
258
|
+
_cache[0] || (_cache[0] = createElementVNode("svg", {
|
|
259
|
+
viewBox: "0 0 100 60",
|
|
260
|
+
preserveAspectRatio: "none",
|
|
261
|
+
"aria-hidden": "true",
|
|
262
|
+
"data-hn-ui-light-editor": ""
|
|
263
|
+
}, [createElementVNode("path", {
|
|
264
|
+
d: "M0 30 H100 M50 0 V60",
|
|
265
|
+
"data-hn-ui-light-editor": ""
|
|
266
|
+
})], -1)),
|
|
267
|
+
_cache[1] || (_cache[1] = createTextVNode(toDisplayString(" "), -1)),
|
|
268
|
+
createElementVNode("span", _hoisted_3, [renderSlot(_ctx.$slots, "default", {}, void 0, true)]),
|
|
269
|
+
_cache[2] || (_cache[2] = createTextVNode(toDisplayString(" "), -1)),
|
|
270
|
+
createElementVNode("button", {
|
|
271
|
+
type: "button",
|
|
272
|
+
class: "source",
|
|
273
|
+
"data-hn-ui-light-editor": "",
|
|
274
|
+
disabled: checkedProps.value.disabled ?? void 0,
|
|
275
|
+
"aria-label": guarded.value,
|
|
276
|
+
ref_key: "sourceElement",
|
|
277
|
+
ref: sourceElement
|
|
278
|
+
}, null, 8, _hoisted_4)
|
|
279
|
+
], 512)], 8, _hoisted_2),
|
|
280
|
+
_cache[4] || (_cache[4] = createTextVNode(toDisplayString(" "), -1)),
|
|
281
|
+
createElementVNode("span", _hoisted_5, [
|
|
282
|
+
createVNode(UiNumberInput_default, mergeProps({
|
|
283
|
+
class: "ui-number-input",
|
|
284
|
+
"data-coordinate": "x",
|
|
285
|
+
min: 0,
|
|
286
|
+
max: 100,
|
|
287
|
+
step: 1,
|
|
288
|
+
unit: "%",
|
|
289
|
+
label: "Light horizontal position",
|
|
290
|
+
value: horizontal.value,
|
|
291
|
+
size: checkedProps.value.size,
|
|
292
|
+
disabled: checkedProps.value.disabled
|
|
293
|
+
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
294
|
+
size: () => ({
|
|
295
|
+
value: checkedProps.value.size,
|
|
296
|
+
status: inputStatus("size", true)
|
|
297
|
+
}),
|
|
298
|
+
disabled: () => ({
|
|
299
|
+
value: checkedProps.value.disabled,
|
|
300
|
+
status: inputStatus("disabled", true)
|
|
301
|
+
})
|
|
302
|
+
} }), null, 16, [
|
|
303
|
+
"value",
|
|
304
|
+
"size",
|
|
305
|
+
"disabled"
|
|
306
|
+
]),
|
|
307
|
+
_cache[3] || (_cache[3] = createTextVNode(toDisplayString(" "), -1)),
|
|
308
|
+
createVNode(UiNumberInput_default, mergeProps({
|
|
309
|
+
class: "ui-number-input",
|
|
310
|
+
"data-coordinate": "y",
|
|
311
|
+
min: 0,
|
|
312
|
+
max: 100,
|
|
313
|
+
step: 1,
|
|
314
|
+
unit: "%",
|
|
315
|
+
label: "Light vertical position",
|
|
316
|
+
value: vertical.value,
|
|
317
|
+
size: checkedProps.value.size,
|
|
318
|
+
disabled: checkedProps.value.disabled
|
|
319
|
+
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
320
|
+
size: () => ({
|
|
321
|
+
value: checkedProps.value.size,
|
|
322
|
+
status: inputStatus("size", true)
|
|
323
|
+
}),
|
|
324
|
+
disabled: () => ({
|
|
325
|
+
value: checkedProps.value.disabled,
|
|
326
|
+
status: inputStatus("disabled", true)
|
|
327
|
+
})
|
|
328
|
+
} }), null, 16, [
|
|
329
|
+
"value",
|
|
330
|
+
"size",
|
|
331
|
+
"disabled"
|
|
332
|
+
])
|
|
333
|
+
]),
|
|
334
|
+
_cache[5] || (_cache[5] = createTextVNode(toDisplayString(" "), -1)),
|
|
335
|
+
_cache[6] || (_cache[6] = createElementVNode("span", {
|
|
336
|
+
class: "hint",
|
|
337
|
+
"data-hn-ui-light-editor": ""
|
|
338
|
+
}, "Drag the light, use arrow keys, or enter its position. Top centre is 50%, 0%.", -1))
|
|
339
|
+
], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
340
|
+
contract: propValidityContract,
|
|
341
|
+
values: { ...props }
|
|
342
|
+
}]]);
|
|
343
|
+
};
|
|
344
|
+
}
|
|
345
|
+
}), [["__scopeId", "data-v-1cd5c26a"]]);
|
|
346
|
+
//#endregion
|
|
347
|
+
export { UiLightEditor_default as t };
|
package/vue/chunks/UiMenu.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { a as concat, b as useReflectedProp, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import { d as requireInputStatus, i as checkPropInput, l as inputRead, m as vuePropInputs, n as READY_INPUT, p as vPropValidity, s as evaluateInput, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
1
|
+
import { S as warnUnless, a as concat, b as useReflectedProp, d as initializedState, i as checkHydratedRoot, m as nativeAttrs, o as createDispatch, t as _plugin_vue_export_helper_default, y as useComponentHost } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { d as requireInputStatus, i as checkPropInput, l as inputRead, m as vuePropInputs, n as READY_INPUT, o as copyStateSeed, p as vPropValidity, r as acceptsControllerWrite, s as evaluateInput, t as BINDING_INPUTS_PROP, u as propValidityState } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiInput_default } from "./UiInput.js";
|
|
5
5
|
import { t as UiIconButton_default } from "./UiIconButton.js";
|
|
6
|
-
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, renderList, toDisplayString, unref, watchSyncEffect, withCtx, withDirectives } from "vue";
|
|
6
|
+
import { Fragment, computed, createBlock, createElementBlock, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderList, toDisplayString, unref, watchSyncEffect, withCtx, withDirectives } from "vue";
|
|
7
7
|
//#region .build/vue/UiNumberInput.vue?vue&type=script&setup=true&lang.ts
|
|
8
8
|
var _hoisted_1 = [
|
|
9
9
|
"data-ui-number-input-prop-disabled",
|
|
@@ -228,6 +228,13 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
228
228
|
const hydrationInstance = getCurrentInstance();
|
|
229
229
|
const emit = __emit;
|
|
230
230
|
const root = ref(null);
|
|
231
|
+
const display = initializedState(() => evaluateInput(() => {
|
|
232
|
+
return inputRead(checkedProps.value.value, propInputs.status("value"));
|
|
233
|
+
}), (next) => typeof next === "string", copyStateSeed, () => warnUnless(false, "initializer:display", "State `display` does not satisfy its declared type."));
|
|
234
|
+
provide("html-next:ui-number-input:display", display);
|
|
235
|
+
const declarationStatuses = { display: () => display.status() };
|
|
236
|
+
const declarationStatus = (name) => declarationStatuses[name]();
|
|
237
|
+
display.start();
|
|
231
238
|
checkHydratedRoot("span", "ui-number-input");
|
|
232
239
|
const isInputDetail = (detail) => detail !== null && typeof detail === "object" && !Array.isArray(detail) && typeof detail["value"] === "string" && Object.keys(detail).every((key) => ["value"].includes(key));
|
|
233
240
|
const dispatch = createDispatch(root, emit, {
|
|
@@ -241,6 +248,10 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
241
248
|
root,
|
|
242
249
|
module: true,
|
|
243
250
|
dispatch,
|
|
251
|
+
acceptsState: (name, keys, value) => acceptsControllerWrite(value, { display: {
|
|
252
|
+
kind: "terminal",
|
|
253
|
+
name: "string"
|
|
254
|
+
} }[name], keys),
|
|
244
255
|
controllerSource: {
|
|
245
256
|
specifier: "../components/ui-number-input/ui-number-input.js",
|
|
246
257
|
definition: "./components/ui-number-input/ui-number-input.html"
|
|
@@ -267,7 +278,9 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
267
278
|
propValidity: (name) => propValidityState({
|
|
268
279
|
contract: propValidityContract,
|
|
269
280
|
values: { ...props }
|
|
270
|
-
}, name)
|
|
281
|
+
}, name),
|
|
282
|
+
state: { display },
|
|
283
|
+
availability: { display: () => declarationStatus("display") }
|
|
271
284
|
});
|
|
272
285
|
return (_ctx, _cache) => {
|
|
273
286
|
return withDirectives((openBlock(), createElementBlock("span", mergeProps({ class: "ui-number-input" }, unref(nativeAttrs)(_ctx.$attrs), {
|
|
@@ -324,7 +337,7 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
324
337
|
"aria-description": "Enter calculates arithmetic. Arrow keys step; Shift changes ten steps.",
|
|
325
338
|
size: checkedProps.value.size,
|
|
326
339
|
disabled: checkedProps.value.disabled,
|
|
327
|
-
value:
|
|
340
|
+
value: unref(display),
|
|
328
341
|
"aria-label": checkedProps.value.label,
|
|
329
342
|
name: checkedProps.value.name
|
|
330
343
|
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
@@ -337,8 +350,8 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
337
350
|
status: inputStatus("disabled", true)
|
|
338
351
|
}),
|
|
339
352
|
value: () => ({
|
|
340
|
-
value:
|
|
341
|
-
status:
|
|
353
|
+
value: unref(display),
|
|
354
|
+
status: declarationStatus("display")
|
|
342
355
|
})
|
|
343
356
|
} }), null, 16, [
|
|
344
357
|
"size",
|
|
@@ -385,6 +398,6 @@ var UiNumberInput_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
385
398
|
}]]);
|
|
386
399
|
};
|
|
387
400
|
}
|
|
388
|
-
}), [["__scopeId", "data-v-
|
|
401
|
+
}), [["__scopeId", "data-v-4b6c1ff2"]]);
|
|
389
402
|
//#endregion
|
|
390
403
|
export { UiNumberInput_default as t };
|
package/vue/chunks/UiPopover.js
CHANGED
package/vue/chunks/UiSelect.js
CHANGED
package/vue/chunks/UiSwitch.js
CHANGED
package/vue/chunks/UiTextarea.js
CHANGED