@threadlabs/looma 0.39.0 → 0.39.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/ui-button/ui-button.html +24 -3
- package/components/ui-checkbox/ui-checkbox.html +34 -18
- package/components/ui-light-editor/ui-light-editor.html +26 -25
- package/components/ui-skeleton/ui-skeleton.html +36 -7
- package/components/ui-skeleton/ui-skeleton.js +46 -0
- package/dist/index.js +13 -12
- package/docs/README.md +17 -6
- package/docs/catalog.json +10 -10
- package/docs/customizer-render.mjs +37 -33
- package/docs/customizer.js +82 -47
- package/docs/site.mjs +1 -1
- package/docs/theme-session.mjs +7 -8
- package/docs/theme.mjs +2 -20
- package/package.json +1 -1
- package/styles/ui-button.css +24 -1
- package/styles/ui-checkbox.css +39 -19
- package/styles/ui-light-editor.css +111 -0
- package/styles/ui-skeleton.css +30 -5
- package/tokens.css +9 -2
- package/vanilla/UiButton.js +14 -12
- package/vanilla/UiLightEditor.js +2 -2
- package/vanilla/UiSkeleton.js +5 -3
- package/vue/UiButton.vue +28 -7
- package/vue/UiCheckbox.vue +34 -19
- package/vue/UiLightEditor.vue +156 -40
- package/vue/UiSkeleton.vue +71 -10
- package/vue/chunks/UiButton.js +18 -10
- package/vue/chunks/UiCheckbox.js +1 -1
- package/vue/chunks/UiLightEditor.js +66 -58
- package/vue/chunks/UiSkeleton.js +41 -9
- package/vue/components.css +262 -46
- package/vue/editor/index.js +46 -36
|
@@ -2,7 +2,8 @@ import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as ch
|
|
|
2
2
|
import { d as propValidityState, f as requireInputStatus, h as vuePropInputs, i as checkPropInput, m as vPropValidity, r as acceptsControllerWrite, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
3
|
import { t as UiIcon_default } from "./UiIcon.js";
|
|
4
4
|
import { t as UiNumberInput_default } from "./UiNumberInput.js";
|
|
5
|
-
import {
|
|
5
|
+
import { t as UiDisclosure_default } from "./UiDisclosure.js";
|
|
6
|
+
import { computed, createElementBlock, createElementVNode, createTextVNode, createVNode, defineComponent, getCurrentInstance, mergeProps, openBlock, provide, ref, renderSlot, toDisplayString, unref, useTemplateRef, watchSyncEffect, withCtx, withDirectives } from "vue";
|
|
6
7
|
//#region .build/vue/UiLightEditor.vue?vue&type=script&setup=true&lang.ts
|
|
7
8
|
var _hoisted_1 = [
|
|
8
9
|
"data-ui-light-editor-prop-disabled",
|
|
@@ -23,6 +24,7 @@ var _hoisted_5 = {
|
|
|
23
24
|
};
|
|
24
25
|
var _hoisted_6 = {
|
|
25
26
|
class: "coordinates",
|
|
27
|
+
"data-slotted": "ui-light-editor",
|
|
26
28
|
"data-hn-ui-light-editor": ""
|
|
27
29
|
};
|
|
28
30
|
//#endregion
|
|
@@ -288,70 +290,76 @@ var UiLightEditor_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @
|
|
|
288
290
|
})])], 8, _hoisted_4)
|
|
289
291
|
], 512)], 8, _hoisted_2),
|
|
290
292
|
_cache[4] || (_cache[4] = createTextVNode(toDisplayString(" "), -1)),
|
|
291
|
-
createElementVNode("span",
|
|
292
|
-
createVNode(UiNumberInput_default, mergeProps({
|
|
293
|
-
class: "ui-number-input",
|
|
294
|
-
"data-coordinate": "x",
|
|
295
|
-
min: 0,
|
|
296
|
-
max: 100,
|
|
297
|
-
step: 1,
|
|
298
|
-
unit: "%",
|
|
299
|
-
label: "Light horizontal position",
|
|
300
|
-
value: horizontal.value,
|
|
301
|
-
size: checkedProps.value.size,
|
|
302
|
-
disabled: checkedProps.value.disabled
|
|
303
|
-
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
304
|
-
size: () => ({
|
|
305
|
-
value: checkedProps.value.size,
|
|
306
|
-
status: inputStatus("size", true)
|
|
307
|
-
}),
|
|
308
|
-
disabled: () => ({
|
|
309
|
-
value: checkedProps.value.disabled,
|
|
310
|
-
status: inputStatus("disabled", true)
|
|
311
|
-
})
|
|
312
|
-
} }), null, 16, [
|
|
313
|
-
"value",
|
|
314
|
-
"size",
|
|
315
|
-
"disabled"
|
|
316
|
-
]),
|
|
317
|
-
_cache[3] || (_cache[3] = createTextVNode(toDisplayString(" "), -1)),
|
|
318
|
-
createVNode(UiNumberInput_default, mergeProps({
|
|
319
|
-
class: "ui-number-input",
|
|
320
|
-
"data-coordinate": "y",
|
|
321
|
-
min: 0,
|
|
322
|
-
max: 100,
|
|
323
|
-
step: 1,
|
|
324
|
-
unit: "%",
|
|
325
|
-
label: "Light vertical position",
|
|
326
|
-
value: vertical.value,
|
|
327
|
-
size: checkedProps.value.size,
|
|
328
|
-
disabled: checkedProps.value.disabled
|
|
329
|
-
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
330
|
-
size: () => ({
|
|
331
|
-
value: checkedProps.value.size,
|
|
332
|
-
status: inputStatus("size", true)
|
|
333
|
-
}),
|
|
334
|
-
disabled: () => ({
|
|
335
|
-
value: checkedProps.value.disabled,
|
|
336
|
-
status: inputStatus("disabled", true)
|
|
337
|
-
})
|
|
338
|
-
} }), null, 16, [
|
|
339
|
-
"value",
|
|
340
|
-
"size",
|
|
341
|
-
"disabled"
|
|
342
|
-
])
|
|
343
|
-
]),
|
|
344
|
-
_cache[5] || (_cache[5] = createTextVNode(toDisplayString(" "), -1)),
|
|
345
|
-
_cache[6] || (_cache[6] = createElementVNode("span", {
|
|
293
|
+
_cache[5] || (_cache[5] = createElementVNode("span", {
|
|
346
294
|
class: "hint",
|
|
347
295
|
"data-hn-ui-light-editor": ""
|
|
348
|
-
}, "Drag
|
|
296
|
+
}, "Drag or tap to move the light. Arrow keys adjust; Escape cancels.", -1)),
|
|
297
|
+
_cache[6] || (_cache[6] = createTextVNode(toDisplayString(" "), -1)),
|
|
298
|
+
createVNode(UiDisclosure_default, {
|
|
299
|
+
class: "ui-disclosure",
|
|
300
|
+
summary: "Exact position"
|
|
301
|
+
}, {
|
|
302
|
+
default: withCtx(() => [createElementVNode("span", _hoisted_6, [
|
|
303
|
+
createVNode(UiNumberInput_default, mergeProps({
|
|
304
|
+
class: "ui-number-input",
|
|
305
|
+
"data-coordinate": "x",
|
|
306
|
+
min: 0,
|
|
307
|
+
max: 100,
|
|
308
|
+
step: 1,
|
|
309
|
+
unit: "%",
|
|
310
|
+
label: "Light horizontal position",
|
|
311
|
+
value: horizontal.value,
|
|
312
|
+
size: checkedProps.value.size,
|
|
313
|
+
disabled: checkedProps.value.disabled
|
|
314
|
+
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
315
|
+
size: () => ({
|
|
316
|
+
value: checkedProps.value.size,
|
|
317
|
+
status: inputStatus("size", true)
|
|
318
|
+
}),
|
|
319
|
+
disabled: () => ({
|
|
320
|
+
value: checkedProps.value.disabled,
|
|
321
|
+
status: inputStatus("disabled", true)
|
|
322
|
+
})
|
|
323
|
+
} }), null, 16, [
|
|
324
|
+
"value",
|
|
325
|
+
"size",
|
|
326
|
+
"disabled"
|
|
327
|
+
]),
|
|
328
|
+
_cache[3] || (_cache[3] = createTextVNode(toDisplayString(" "), -1)),
|
|
329
|
+
createVNode(UiNumberInput_default, mergeProps({
|
|
330
|
+
class: "ui-number-input",
|
|
331
|
+
"data-coordinate": "y",
|
|
332
|
+
min: 0,
|
|
333
|
+
max: 100,
|
|
334
|
+
step: 1,
|
|
335
|
+
unit: "%",
|
|
336
|
+
label: "Light vertical position",
|
|
337
|
+
value: vertical.value,
|
|
338
|
+
size: checkedProps.value.size,
|
|
339
|
+
disabled: checkedProps.value.disabled
|
|
340
|
+
}, { [unref(BINDING_INPUTS_PROP)]: {
|
|
341
|
+
size: () => ({
|
|
342
|
+
value: checkedProps.value.size,
|
|
343
|
+
status: inputStatus("size", true)
|
|
344
|
+
}),
|
|
345
|
+
disabled: () => ({
|
|
346
|
+
value: checkedProps.value.disabled,
|
|
347
|
+
status: inputStatus("disabled", true)
|
|
348
|
+
})
|
|
349
|
+
} }), null, 16, [
|
|
350
|
+
"value",
|
|
351
|
+
"size",
|
|
352
|
+
"disabled"
|
|
353
|
+
])
|
|
354
|
+
])]),
|
|
355
|
+
_: 1
|
|
356
|
+
})
|
|
349
357
|
], 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
350
358
|
contract: propValidityContract,
|
|
351
359
|
values: { ...props }
|
|
352
360
|
}]]);
|
|
353
361
|
};
|
|
354
362
|
}
|
|
355
|
-
}), [["__scopeId", "data-v-
|
|
363
|
+
}), [["__scopeId", "data-v-7f354401"]]);
|
|
356
364
|
//#endregion
|
|
357
365
|
export { UiLightEditor_default as t };
|
package/vue/chunks/UiSkeleton.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { C as useReflectedProp, _ as nativeAttrs, a as checkHydratedRoot, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
-
import { h as vuePropInputs, i as checkPropInput, m as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
|
-
import { computed, createElementBlock, defineComponent, mergeProps, openBlock, unref, watchSyncEffect, withDirectives } from "vue";
|
|
1
|
+
import { C as useReflectedProp, S as useComponentHost, _ as nativeAttrs, a as checkHydratedRoot, s as createDispatch, t as _plugin_vue_export_helper_default } from "./_plugin-vue_export-helper.js";
|
|
2
|
+
import { d as propValidityState, h as vuePropInputs, i as checkPropInput, m as vPropValidity, t as BINDING_INPUTS_PROP } from "./props.js";
|
|
3
|
+
import { computed, createElementBlock, defineComponent, getCurrentInstance, mergeProps, openBlock, ref, unref, watchSyncEffect, withDirectives } from "vue";
|
|
4
4
|
//#region .build/vue/UiSkeleton.vue?vue&type=script&setup=true&lang.ts
|
|
5
5
|
var _hoisted_1 = [
|
|
6
6
|
"data-ui-skeleton-prop-animated",
|
|
@@ -30,8 +30,8 @@ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
30
30
|
},
|
|
31
31
|
required: false,
|
|
32
32
|
target: { attribute: "animated" },
|
|
33
|
-
description: "
|
|
34
|
-
default:
|
|
33
|
+
description: "Moves a subtle highlight from left to right. On by default; pass false to keep it static. Reduced-motion preferences always disable the shimmer.",
|
|
34
|
+
default: true
|
|
35
35
|
},
|
|
36
36
|
height: {
|
|
37
37
|
type: {
|
|
@@ -71,12 +71,12 @@ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
71
71
|
} };
|
|
72
72
|
const props = __props;
|
|
73
73
|
const inputTracking = vuePropInputs({
|
|
74
|
-
animated:
|
|
74
|
+
animated: true,
|
|
75
75
|
height: "",
|
|
76
76
|
shape: "text",
|
|
77
77
|
width: ""
|
|
78
78
|
}, {
|
|
79
|
-
animated:
|
|
79
|
+
animated: true,
|
|
80
80
|
height: "",
|
|
81
81
|
shape: "text",
|
|
82
82
|
width: ""
|
|
@@ -118,6 +118,8 @@ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
118
118
|
checkedProps.value;
|
|
119
119
|
});
|
|
120
120
|
const reflectedProp = useReflectedProp();
|
|
121
|
+
const hydrationInstance = getCurrentInstance();
|
|
122
|
+
const root = ref(null);
|
|
121
123
|
checkHydratedRoot("span", "ui-skeleton");
|
|
122
124
|
/** The values the styles' :host() and :state() rules test. */
|
|
123
125
|
const hostState = computed(() => [
|
|
@@ -125,6 +127,34 @@ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
125
127
|
checkedProps.value.shape != null && `shape=${encodeURIComponent(checkedProps.value.shape)}`,
|
|
126
128
|
checkedProps.value.animated && "animated"
|
|
127
129
|
].filter(Boolean).join(" "));
|
|
130
|
+
const dispatch = createDispatch(root);
|
|
131
|
+
useComponentHost(() => import("@threadlabs/looma/components/ui-skeleton/ui-skeleton.js"), {
|
|
132
|
+
root,
|
|
133
|
+
module: true,
|
|
134
|
+
dispatch,
|
|
135
|
+
controllerSource: {
|
|
136
|
+
specifier: "../components/ui-skeleton/ui-skeleton.js",
|
|
137
|
+
definition: "./components/ui-skeleton/ui-skeleton.html"
|
|
138
|
+
},
|
|
139
|
+
props: checkedProps,
|
|
140
|
+
inputs: propInputs,
|
|
141
|
+
inputTracking,
|
|
142
|
+
propInputs: (name) => {
|
|
143
|
+
const incoming = hydrationInstance?.vnode.props;
|
|
144
|
+
const kebab = name.replace(/[A-Z]/g, (letter) => "-" + letter.toLowerCase());
|
|
145
|
+
return incoming !== null && incoming !== void 0 ? incoming[name] ?? incoming[kebab] ?? null : null;
|
|
146
|
+
},
|
|
147
|
+
propNames: [
|
|
148
|
+
"animated",
|
|
149
|
+
"height",
|
|
150
|
+
"shape",
|
|
151
|
+
"width"
|
|
152
|
+
],
|
|
153
|
+
propValidity: (name) => propValidityState({
|
|
154
|
+
contract: propValidityContract,
|
|
155
|
+
values: { ...props }
|
|
156
|
+
}, name)
|
|
157
|
+
});
|
|
128
158
|
return (_ctx, _cache) => {
|
|
129
159
|
return withDirectives((openBlock(), createElementBlock("span", mergeProps({
|
|
130
160
|
class: "ui-skeleton",
|
|
@@ -139,13 +169,15 @@ var UiSkeleton_default = /*#__PURE__*/ _plugin_vue_export_helper_default(/* @__P
|
|
|
139
169
|
"data-ui-skeleton-prop-height": unref(reflectedProp)("height", "height", checkedProps.value.height, void 0, false),
|
|
140
170
|
"data-ui-skeleton-prop-shape": unref(reflectedProp)("shape", "shape", checkedProps.value.shape, void 0, false),
|
|
141
171
|
"data-ui-skeleton-prop-width": unref(reflectedProp)("width", "width", checkedProps.value.width, void 0, false),
|
|
142
|
-
"data-ui-skeleton-state": hostState.value || void 0
|
|
172
|
+
"data-ui-skeleton-state": hostState.value || void 0,
|
|
173
|
+
ref_key: "root",
|
|
174
|
+
ref: root
|
|
143
175
|
}), null, 16, _hoisted_1)), [[unref(vPropValidity), {
|
|
144
176
|
contract: propValidityContract,
|
|
145
177
|
values: { ...props }
|
|
146
178
|
}]]);
|
|
147
179
|
};
|
|
148
180
|
}
|
|
149
|
-
}), [["__scopeId", "data-v-
|
|
181
|
+
}), [["__scopeId", "data-v-908ae327"]]);
|
|
150
182
|
//#endregion
|
|
151
183
|
export { UiSkeleton_default as t };
|