@threadlabs/looma 0.39.0 → 0.39.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-skeleton/ui-skeleton.html +36 -7
- package/components/ui-skeleton/ui-skeleton.js +46 -0
- package/dist/index.js +13 -12
- package/docs/catalog.json +9 -9
- package/package.json +1 -1
- package/styles/ui-skeleton.css +30 -5
- package/vanilla/UiSkeleton.js +5 -3
- package/vue/UiSkeleton.vue +71 -10
- package/vue/chunks/UiSkeleton.js +41 -9
- package/vue/components.css +30 -4
package/docs/catalog.json
CHANGED
|
@@ -458,7 +458,7 @@
|
|
|
458
458
|
],
|
|
459
459
|
"schemaVersion": 1,
|
|
460
460
|
"package": "@threadlabs/looma",
|
|
461
|
-
"version": "0.39.
|
|
461
|
+
"version": "0.39.1",
|
|
462
462
|
"groups": [
|
|
463
463
|
{
|
|
464
464
|
"id": "layout",
|
|
@@ -20455,7 +20455,7 @@
|
|
|
20455
20455
|
"tag": "ui-skeleton",
|
|
20456
20456
|
"package": "@threadlabs/looma",
|
|
20457
20457
|
"root": "span",
|
|
20458
|
-
"description": "Reserve the shape of incoming content without announcing each placeholder. Text follows the surrounding line metrics; circles and rectangles stand in for avatars and media. Use one status message and aria-busy on the loading region, then replace the placeholders with real content. Keep existing content visible during refresh when possible.
|
|
20458
|
+
"description": "Reserve the shape of incoming content without announcing each placeholder. Text follows the surrounding line metrics; circles and rectangles stand in for avatars and media. Use one status message and aria-busy on the loading region, then replace the placeholders with real content. Keep existing content visible during refresh when possible. A broad shimmer sweeps across the placeholders together by default, continuously from left to right. Reduced-motion preferences always keep it static.",
|
|
20459
20459
|
"designTokens": {
|
|
20460
20460
|
"sources": [
|
|
20461
20461
|
"packages/looma/src/components/ui-skeleton/ui-skeleton.html"
|
|
@@ -20499,9 +20499,9 @@
|
|
|
20499
20499
|
{
|
|
20500
20500
|
"name": "animated",
|
|
20501
20501
|
"property": "animated",
|
|
20502
|
-
"description": "
|
|
20502
|
+
"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.",
|
|
20503
20503
|
"type": "boolean",
|
|
20504
|
-
"default":
|
|
20504
|
+
"default": true
|
|
20505
20505
|
},
|
|
20506
20506
|
{
|
|
20507
20507
|
"name": "height",
|
|
@@ -20533,9 +20533,9 @@
|
|
|
20533
20533
|
"properties": [
|
|
20534
20534
|
{
|
|
20535
20535
|
"name": "animated",
|
|
20536
|
-
"description": "
|
|
20536
|
+
"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.",
|
|
20537
20537
|
"type": "boolean",
|
|
20538
|
-
"default":
|
|
20538
|
+
"default": true
|
|
20539
20539
|
},
|
|
20540
20540
|
{
|
|
20541
20541
|
"name": "height",
|
|
@@ -20605,9 +20605,9 @@
|
|
|
20605
20605
|
{
|
|
20606
20606
|
"id": "@threadlabs/looma/ui-skeleton/04-animation",
|
|
20607
20607
|
"name": "04-animation",
|
|
20608
|
-
"title": "
|
|
20609
|
-
"description": "
|
|
20610
|
-
"markup": "<ui-stack gap=\"s\">\n <ui-
|
|
20608
|
+
"title": "Shared shimmer",
|
|
20609
|
+
"description": "One broad gradient stays fixed to the viewport, so every placeholder reveals the same moving highlight. It loops continuously and stops for reduced motion.",
|
|
20610
|
+
"markup": "<ui-stack gap=\"s\">\n <ui-cluster gap=\"s\">\n <ui-skeleton shape=\"circle\"></ui-skeleton>\n <ui-skeleton width=\"50%\"></ui-skeleton>\n </ui-cluster>\n <ui-skeleton shape=\"rectangle\" width=\"75%\" height=\"3rem\"></ui-skeleton>\n</ui-stack>",
|
|
20611
20611
|
"resizable": false,
|
|
20612
20612
|
"bindings": "",
|
|
20613
20613
|
"frameworks": {}
|
package/package.json
CHANGED
package/styles/ui-skeleton.css
CHANGED
|
@@ -16,8 +16,20 @@
|
|
|
16
16
|
syntax: "*";
|
|
17
17
|
inherits: false;
|
|
18
18
|
}
|
|
19
|
+
@property --_ui-skeleton-viewport-x {
|
|
20
|
+
syntax: "<length>";
|
|
21
|
+
inherits: false;
|
|
22
|
+
initial-value: 0px;
|
|
23
|
+
}
|
|
24
|
+
@property --_ui-skeleton-viewport-scale {
|
|
25
|
+
syntax: "<number>";
|
|
26
|
+
inherits: false;
|
|
27
|
+
initial-value: 1;
|
|
28
|
+
}
|
|
19
29
|
|
|
20
30
|
:scope:where([data-component~="ui-skeleton"]) {
|
|
31
|
+
--_ui-skeleton-paint-x: var(--_ui-skeleton-viewport-x);
|
|
32
|
+
--_ui-skeleton-paint-scale: var(--_ui-skeleton-viewport-scale);
|
|
21
33
|
display: block !important;
|
|
22
34
|
position: relative;
|
|
23
35
|
box-sizing: border-box !important;
|
|
@@ -59,23 +71,36 @@
|
|
|
59
71
|
}
|
|
60
72
|
|
|
61
73
|
:scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="animated"]::before {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
74
|
+
background-image: linear-gradient(
|
|
75
|
+
90deg,
|
|
76
|
+
transparent,
|
|
77
|
+
light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.14)) 50%,
|
|
78
|
+
transparent
|
|
79
|
+
);
|
|
80
|
+
background-size: calc(100vw / var(--_ui-skeleton-paint-scale)) 100%;
|
|
81
|
+
background-position: calc(0vw - var(--_ui-skeleton-paint-x)) 0;
|
|
82
|
+
background-repeat: repeat-x;
|
|
83
|
+
animation: ui-skeleton-shimmer 3s linear infinite;
|
|
84
|
+
}
|
|
85
|
+
@keyframes ui-skeleton-shimmer {
|
|
86
|
+
to {
|
|
87
|
+
background-position: calc(100vw / var(--_ui-skeleton-paint-scale) - var(--_ui-skeleton-paint-x)) 0;
|
|
67
88
|
}
|
|
68
89
|
}
|
|
69
90
|
@media (prefers-reduced-motion: reduce) {
|
|
70
91
|
:scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="animated"]::before {
|
|
71
92
|
animation: none;
|
|
93
|
+
background-image: none;
|
|
72
94
|
}
|
|
73
95
|
}
|
|
74
96
|
@media (forced-colors: active) {
|
|
75
97
|
:scope:where([data-component~="ui-skeleton"])::before {
|
|
76
98
|
background: CanvasText;
|
|
77
99
|
opacity: 0.2;
|
|
100
|
+
}
|
|
101
|
+
:scope:where([data-component~="ui-skeleton"])[data-ui-skeleton-state~="animated"]::before {
|
|
78
102
|
animation: none;
|
|
103
|
+
background-image: none;
|
|
79
104
|
}
|
|
80
105
|
}
|
|
81
106
|
:scope:where([data-component~="ui-skeleton"])[hidden] {
|
package/vanilla/UiSkeleton.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
// Generated by HTML Next 1.0.0-alpha.69 for Vanilla DOM. Do not edit.
|
|
2
|
-
import { attachGeneratedController, toText, writeAttribute, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkString, defineComponent } from "@nextwebwg/html-next/generated-runtime";
|
|
2
|
+
import { attachGeneratedController, toText, writeAttribute, formatOf, keywordFormat, hostState, acceptProps, manageProps, generatedInputs, checkBoolean, checkFormat, checkString, defineComponent, activateModule } from "@nextwebwg/html-next/generated-runtime";
|
|
3
|
+
import * as controller from "../components/ui-skeleton/ui-skeleton.js";
|
|
3
4
|
import "../styles/ui-skeleton.css";
|
|
4
5
|
|
|
5
|
-
const S = { n: [], t: [], f: import.meta.url, g: "ui-skeleton", b: generatedInputs };
|
|
6
|
-
const D = { g: "ui-skeleton", props: { "animated": { "required":false,"default":
|
|
6
|
+
const S = { n: [], t: [], f: import.meta.url, g: "ui-skeleton", a: (host, I) => C(host, I), b: generatedInputs };
|
|
7
|
+
const D = { g: "ui-skeleton", props: { "animated": { "required":false,"default":true, c: checkBoolean, t: "boolean", j: 0, m: "b" }, "height": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" }, "shape": { "required":false,"values":["text","circle","rectangle"],"default":"text", c: checkFormat("keyword", keywordFormat), t: "keyword", j: 0, m: ["p",formatOf(keywordFormat)] }, "width": { "required":false,"default":"", c: checkString, t: "string", j: 0, m: "s" } } };
|
|
8
|
+
const C = (host) => activateModule(controller, host);
|
|
7
9
|
|
|
8
10
|
export function createUiSkeleton(options = {}, html) {
|
|
9
11
|
const { attributes = {}, children = [], slots = {}, ...componentProps } = options;
|
package/vue/UiSkeleton.vue
CHANGED
|
@@ -1,13 +1,20 @@
|
|
|
1
1
|
<!-- Generated by HTML Next 1.0.0-alpha.69 for Vue 3.5. Do not edit. -->
|
|
2
2
|
<script setup lang="ts">
|
|
3
|
-
import { computed, watchSyncEffect } from 'vue'
|
|
3
|
+
import { computed, getCurrentInstance, ref, watchSyncEffect } from 'vue'
|
|
4
4
|
import type { PropType } from 'vue'
|
|
5
|
-
import {
|
|
5
|
+
import {
|
|
6
|
+
checkHydratedRoot,
|
|
7
|
+
createDispatch,
|
|
8
|
+
nativeAttrs,
|
|
9
|
+
useComponentHost,
|
|
10
|
+
useReflectedProp,
|
|
11
|
+
} from './host'
|
|
6
12
|
import {
|
|
7
13
|
BINDING_INPUTS_PROP,
|
|
8
14
|
checkedProp,
|
|
9
15
|
checkPropInput,
|
|
10
16
|
type InputBindings,
|
|
17
|
+
propValidityState,
|
|
11
18
|
READY_INPUT,
|
|
12
19
|
requireInputStatus,
|
|
13
20
|
UNRESOLVED_INPUT,
|
|
@@ -24,8 +31,8 @@ const propValidityContract = {
|
|
|
24
31
|
required: false,
|
|
25
32
|
target: { attribute: 'animated' },
|
|
26
33
|
description:
|
|
27
|
-
'
|
|
28
|
-
default:
|
|
34
|
+
'Moves a subtle highlight from left to right. On by default; pass false to keep it static. Reduced-motion preferences always disable the shimmer.',
|
|
35
|
+
default: true,
|
|
29
36
|
},
|
|
30
37
|
height: {
|
|
31
38
|
type: { kind: 'terminal', name: 'string' },
|
|
@@ -62,13 +69,13 @@ const props = defineProps({
|
|
|
62
69
|
[BINDING_INPUTS_PROP]: { type: null as unknown as PropType<InputBindings> },
|
|
63
70
|
})
|
|
64
71
|
const acceptedProps: Record<string, unknown> = {
|
|
65
|
-
animated:
|
|
72
|
+
animated: true,
|
|
66
73
|
height: '',
|
|
67
74
|
shape: 'text',
|
|
68
75
|
width: '',
|
|
69
76
|
}
|
|
70
77
|
const inputTracking = vuePropInputs(acceptedProps, {
|
|
71
|
-
animated:
|
|
78
|
+
animated: true,
|
|
72
79
|
height: '',
|
|
73
80
|
shape: 'text',
|
|
74
81
|
width: '',
|
|
@@ -124,7 +131,9 @@ watchSyncEffect(() => {
|
|
|
124
131
|
void checkedProps.value
|
|
125
132
|
})
|
|
126
133
|
const reflectedProp = useReflectedProp()
|
|
134
|
+
const hydrationInstance = getCurrentInstance()
|
|
127
135
|
|
|
136
|
+
const root = ref<HTMLElement | null>(null)
|
|
128
137
|
checkHydratedRoot('span', 'ui-skeleton')
|
|
129
138
|
|
|
130
139
|
/** The values the styles' :host() and :state() rules test. */
|
|
@@ -135,6 +144,31 @@ const hostState = computed(() =>
|
|
|
135
144
|
checkedProps.value.animated && 'animated',
|
|
136
145
|
].filter(Boolean).join(' ')
|
|
137
146
|
)
|
|
147
|
+
|
|
148
|
+
const dispatch = createDispatch(root)
|
|
149
|
+
|
|
150
|
+
useComponentHost(() => import('../components/ui-skeleton/ui-skeleton.js'), {
|
|
151
|
+
root,
|
|
152
|
+
module: true,
|
|
153
|
+
dispatch,
|
|
154
|
+
controllerSource: {
|
|
155
|
+
specifier: '../components/ui-skeleton/ui-skeleton.js',
|
|
156
|
+
definition: './components/ui-skeleton/ui-skeleton.html',
|
|
157
|
+
},
|
|
158
|
+
props: checkedProps,
|
|
159
|
+
inputs: propInputs,
|
|
160
|
+
inputTracking,
|
|
161
|
+
propInputs: (name: string) => {
|
|
162
|
+
const incoming = hydrationInstance?.vnode.props
|
|
163
|
+
const kebab = name.replace(/[A-Z]/g, (letter) => '-' + letter.toLowerCase())
|
|
164
|
+
return incoming !== null && incoming !== undefined
|
|
165
|
+
? (incoming[name] ?? incoming[kebab] ?? null)
|
|
166
|
+
: null
|
|
167
|
+
},
|
|
168
|
+
propNames: ['animated', 'height', 'shape', 'width'],
|
|
169
|
+
propValidity: (name: string) =>
|
|
170
|
+
propValidityState({ contract: propValidityContract, values: { ...props } }, name),
|
|
171
|
+
})
|
|
138
172
|
</script>
|
|
139
173
|
|
|
140
174
|
<template>
|
|
@@ -153,6 +187,7 @@ const hostState = computed(() =>
|
|
|
153
187
|
:data-ui-skeleton-prop-shape="reflectedProp('shape', 'shape', checkedProps.shape, undefined, false)"
|
|
154
188
|
:data-ui-skeleton-prop-width="reflectedProp('width', 'width', checkedProps.width, undefined, false)"
|
|
155
189
|
:data-ui-skeleton-state="hostState || undefined"
|
|
190
|
+
ref="root"
|
|
156
191
|
></span>
|
|
157
192
|
</template>
|
|
158
193
|
|
|
@@ -166,13 +201,26 @@ const hostState = computed(() =>
|
|
|
166
201
|
syntax: "*";
|
|
167
202
|
inherits: false;
|
|
168
203
|
}
|
|
169
|
-
@
|
|
170
|
-
|
|
171
|
-
|
|
204
|
+
@property --_ui-skeleton-viewport-x {
|
|
205
|
+
syntax: "<length>";
|
|
206
|
+
inherits: false;
|
|
207
|
+
initial-value: 0px;
|
|
208
|
+
}
|
|
209
|
+
@property --_ui-skeleton-viewport-scale {
|
|
210
|
+
syntax: "<number>";
|
|
211
|
+
inherits: false;
|
|
212
|
+
initial-value: 1;
|
|
213
|
+
}
|
|
214
|
+
@keyframes ui-skeleton-shimmer {
|
|
215
|
+
to {
|
|
216
|
+
background-position: calc(100vw / var(--_ui-skeleton-paint-scale) - var(--_ui-skeleton-paint-x))
|
|
217
|
+
0;
|
|
172
218
|
}
|
|
173
219
|
}
|
|
174
220
|
@scope (.ui-skeleton) to ([data-hn]) {
|
|
175
221
|
:global(:scope) {
|
|
222
|
+
--_ui-skeleton-paint-x: var(--_ui-skeleton-viewport-x);
|
|
223
|
+
--_ui-skeleton-paint-scale: var(--_ui-skeleton-viewport-scale);
|
|
176
224
|
display: block !important;
|
|
177
225
|
position: relative;
|
|
178
226
|
box-sizing: border-box !important;
|
|
@@ -214,18 +262,31 @@ const hostState = computed(() =>
|
|
|
214
262
|
}
|
|
215
263
|
|
|
216
264
|
:global(:scope[data-ui-skeleton-state~="animated"]::before) {
|
|
217
|
-
|
|
265
|
+
background-image: linear-gradient(
|
|
266
|
+
90deg,
|
|
267
|
+
transparent,
|
|
268
|
+
light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.14)) 50%,
|
|
269
|
+
transparent
|
|
270
|
+
);
|
|
271
|
+
background-size: calc(100vw / var(--_ui-skeleton-paint-scale)) 100%;
|
|
272
|
+
background-position: calc(0vw - var(--_ui-skeleton-paint-x)) 0;
|
|
273
|
+
background-repeat: repeat-x;
|
|
274
|
+
animation: ui-skeleton-shimmer 3s linear infinite;
|
|
218
275
|
}
|
|
219
276
|
@media (prefers-reduced-motion: reduce) {
|
|
220
277
|
:global(:scope[data-ui-skeleton-state~="animated"]::before) {
|
|
221
278
|
animation: none;
|
|
279
|
+
background-image: none;
|
|
222
280
|
}
|
|
223
281
|
}
|
|
224
282
|
@media (forced-colors: active) {
|
|
225
283
|
:global(:scope::before) {
|
|
226
284
|
background: CanvasText;
|
|
227
285
|
opacity: 0.2;
|
|
286
|
+
}
|
|
287
|
+
:global(:scope[data-ui-skeleton-state~="animated"]::before) {
|
|
228
288
|
animation: none;
|
|
289
|
+
background-image: none;
|
|
229
290
|
}
|
|
230
291
|
}
|
|
231
292
|
:global(:scope[hidden]) {
|
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 };
|
package/vue/components.css
CHANGED
|
@@ -10486,13 +10486,26 @@ dialog:where([data-hn-ui-search-shell]) {
|
|
|
10486
10486
|
syntax: "*";
|
|
10487
10487
|
inherits: false;
|
|
10488
10488
|
}
|
|
10489
|
-
@
|
|
10490
|
-
|
|
10491
|
-
|
|
10489
|
+
@property --_ui-skeleton-viewport-x {
|
|
10490
|
+
syntax: "<length>";
|
|
10491
|
+
inherits: false;
|
|
10492
|
+
initial-value: 0px;
|
|
10493
|
+
}
|
|
10494
|
+
@property --_ui-skeleton-viewport-scale {
|
|
10495
|
+
syntax: "<number>";
|
|
10496
|
+
inherits: false;
|
|
10497
|
+
initial-value: 1;
|
|
10498
|
+
}
|
|
10499
|
+
@keyframes ui-skeleton-shimmer-908ae327 {
|
|
10500
|
+
to {
|
|
10501
|
+
background-position: calc(100vw / var(--_ui-skeleton-paint-scale) - var(--_ui-skeleton-paint-x))
|
|
10502
|
+
0;
|
|
10492
10503
|
}
|
|
10493
10504
|
}
|
|
10494
10505
|
@scope (.ui-skeleton) to ([data-hn]) {
|
|
10495
10506
|
:scope {
|
|
10507
|
+
--_ui-skeleton-paint-x: var(--_ui-skeleton-viewport-x);
|
|
10508
|
+
--_ui-skeleton-paint-scale: var(--_ui-skeleton-viewport-scale);
|
|
10496
10509
|
display: block !important;
|
|
10497
10510
|
position: relative;
|
|
10498
10511
|
box-sizing: border-box !important;
|
|
@@ -10529,18 +10542,31 @@ dialog:where([data-hn-ui-search-shell]) {
|
|
|
10529
10542
|
border-radius: var(--ui-radius-md);
|
|
10530
10543
|
}
|
|
10531
10544
|
:scope[data-ui-skeleton-state~="animated"]::before {
|
|
10532
|
-
|
|
10545
|
+
background-image: linear-gradient(
|
|
10546
|
+
90deg,
|
|
10547
|
+
transparent,
|
|
10548
|
+
light-dark(rgb(255 255 255 / 0.6), rgb(255 255 255 / 0.14)) 50%,
|
|
10549
|
+
transparent
|
|
10550
|
+
);
|
|
10551
|
+
background-size: calc(100vw / var(--_ui-skeleton-paint-scale)) 100%;
|
|
10552
|
+
background-position: calc(0vw - var(--_ui-skeleton-paint-x)) 0;
|
|
10553
|
+
background-repeat: repeat-x;
|
|
10554
|
+
animation: ui-skeleton-shimmer-908ae327 3s linear infinite;
|
|
10533
10555
|
}
|
|
10534
10556
|
@media (prefers-reduced-motion: reduce) {
|
|
10535
10557
|
:scope[data-ui-skeleton-state~="animated"]::before {
|
|
10536
10558
|
animation: none;
|
|
10559
|
+
background-image: none;
|
|
10537
10560
|
}
|
|
10538
10561
|
}
|
|
10539
10562
|
@media (forced-colors: active) {
|
|
10540
10563
|
:scope::before {
|
|
10541
10564
|
background: CanvasText;
|
|
10542
10565
|
opacity: 0.2;
|
|
10566
|
+
}
|
|
10567
|
+
:scope[data-ui-skeleton-state~="animated"]::before {
|
|
10543
10568
|
animation: none;
|
|
10569
|
+
background-image: none;
|
|
10544
10570
|
}
|
|
10545
10571
|
}
|
|
10546
10572
|
:scope[hidden] {
|