origam 2.23.1 → 2.24.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/CHANGELOG.md +37 -0
- package/dist/src/assets/css/main.css +1 -1
- package/dist/src/assets/css/tokens/dark.css +24 -10
- package/dist/src/assets/css/tokens/light.css +12 -5
- package/dist/src/assets/css/tokens/origam-utilities.css +84 -0
- package/dist/src/assets/css/tokens/primitive.css +1 -0
- package/dist/src/assets/scss/tokens/_dark.scss +24 -10
- package/dist/src/assets/scss/tokens/_light.scss +12 -5
- package/dist/src/assets/scss/tokens/_origam-utilities.scss +84 -0
- package/dist/src/assets/scss/tokens/_primitive.scss +1 -0
- package/dist/src/components/Breadcrumb/OrigamBreadcrumbItem.vue +1 -1
- package/dist/src/components/Skeleton/OrigamSkeleton.vue +89 -125
- package/dist/src/components/Skeleton/OrigamSkeletonGroup.vue +52 -0
- package/dist/src/components/Skeleton/index.cjs +7 -0
- package/dist/src/components/Skeleton/index.d.ts +1 -0
- package/dist/src/components/Skeleton/index.js +1 -0
- package/dist/src/consts/Skeleton/skeleton.const.cjs +7 -0
- package/dist/src/consts/Skeleton/skeleton.const.d.ts +11 -0
- package/dist/src/consts/Skeleton/skeleton.const.js +1 -0
- package/dist/src/consts/index.cjs +11 -0
- package/dist/src/consts/index.d.ts +1 -0
- package/dist/src/consts/index.js +1 -0
- package/dist/src/enums/Skeleton/skeleton.enum.cjs +9 -2
- package/dist/src/enums/Skeleton/skeleton.enum.d.ts +27 -4
- package/dist/src/enums/Skeleton/skeleton.enum.js +7 -0
- package/dist/src/interfaces/Skeleton/skeleton-group.interface.cjs +1 -0
- package/dist/src/interfaces/Skeleton/skeleton-group.interface.d.ts +34 -0
- package/dist/src/interfaces/Skeleton/skeleton-group.interface.js +0 -0
- package/dist/src/interfaces/Skeleton/skeleton.interface.d.ts +27 -10
- package/dist/src/interfaces/index.cjs +11 -0
- package/dist/src/interfaces/index.d.ts +1 -0
- package/dist/src/interfaces/index.js +1 -0
- package/dist/src/themes/origam.theme.cjs +2 -4
- package/dist/src/themes/origam.theme.js +2 -2
- package/dist/src/types/Skeleton/skeleton.type.d.ts +4 -1
- package/dist/src/types/tokens.type.d.ts +1 -1
- package/package.json +1 -1
|
@@ -4,39 +4,51 @@
|
|
|
4
4
|
</template>
|
|
5
5
|
|
|
6
6
|
<div
|
|
7
|
-
v-else-if="
|
|
7
|
+
v-else-if="isListItem"
|
|
8
8
|
:id="id"
|
|
9
9
|
:class="skeletonContainerClasses"
|
|
10
10
|
:style="skeletonContainerStyles"
|
|
11
|
-
|
|
12
|
-
aria-busy="true"
|
|
13
|
-
role="status"
|
|
14
|
-
v-bind="{ ...$attrs }"
|
|
11
|
+
v-bind="{ ...a11yAttrs, ...$attrs }"
|
|
15
12
|
>
|
|
16
13
|
<div
|
|
17
14
|
:class="skeletonCircularClasses"
|
|
18
|
-
|
|
15
|
+
aria-hidden="true"
|
|
19
16
|
/>
|
|
20
17
|
<div class="origam-skeleton__lines">
|
|
21
|
-
<div
|
|
22
|
-
|
|
18
|
+
<div
|
|
19
|
+
:class="skeletonTextClasses"
|
|
20
|
+
aria-hidden="true"
|
|
21
|
+
/>
|
|
22
|
+
<div
|
|
23
|
+
:class="skeletonTextClasses"
|
|
24
|
+
aria-hidden="true"
|
|
25
|
+
/>
|
|
23
26
|
</div>
|
|
24
27
|
</div>
|
|
25
28
|
|
|
26
29
|
<div
|
|
27
|
-
v-else-if="
|
|
30
|
+
v-else-if="isCard"
|
|
28
31
|
:id="id"
|
|
29
32
|
:class="skeletonContainerClasses"
|
|
30
33
|
:style="skeletonContainerStyles"
|
|
31
|
-
|
|
32
|
-
aria-busy="true"
|
|
33
|
-
role="status"
|
|
34
|
-
v-bind="{ ...$attrs }"
|
|
34
|
+
v-bind="{ ...a11yAttrs, ...$attrs }"
|
|
35
35
|
>
|
|
36
|
-
<div
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
<div
|
|
37
|
+
:class="skeletonRectangularClasses"
|
|
38
|
+
aria-hidden="true"
|
|
39
|
+
/>
|
|
40
|
+
<div
|
|
41
|
+
:class="skeletonTextClasses"
|
|
42
|
+
aria-hidden="true"
|
|
43
|
+
/>
|
|
44
|
+
<div
|
|
45
|
+
:class="skeletonTextClasses"
|
|
46
|
+
aria-hidden="true"
|
|
47
|
+
/>
|
|
48
|
+
<div
|
|
49
|
+
:class="skeletonTextClasses"
|
|
50
|
+
aria-hidden="true"
|
|
51
|
+
/>
|
|
40
52
|
</div>
|
|
41
53
|
|
|
42
54
|
<div
|
|
@@ -44,29 +56,25 @@
|
|
|
44
56
|
:id="id"
|
|
45
57
|
:class="skeletonClasses"
|
|
46
58
|
:style="skeletonStyles"
|
|
47
|
-
|
|
48
|
-
aria-busy="true"
|
|
49
|
-
role="status"
|
|
50
|
-
v-bind="{ ...$attrs }"
|
|
59
|
+
v-bind="{ ...a11yAttrs, ...$attrs }"
|
|
51
60
|
/>
|
|
52
61
|
</template>
|
|
53
62
|
|
|
54
63
|
<script lang="ts" setup>
|
|
55
64
|
import { useBothColor } from "../../composables/Commons/bothColor.composable";
|
|
65
|
+
import { useDimension } from "../../composables/Commons/dimension.composable";
|
|
56
66
|
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
57
67
|
import { useProps } from "../../composables/Commons/props.composable";
|
|
58
68
|
import { useRounded } from "../../composables/Commons/rounded.composable";
|
|
59
69
|
import { useSize } from "../../composables/Commons/size.composable";
|
|
60
|
-
import {
|
|
61
|
-
import {
|
|
62
|
-
import { computed, toRef } from "vue";
|
|
70
|
+
import { ORIGAM_SKELETON_GROUP_KEY } from "../../consts/Skeleton/skeleton.const";
|
|
71
|
+
import { SKELETON_ANIMATION, SKELETON_VARIANT } from "../../enums/Skeleton/skeleton.enum";
|
|
72
|
+
import { computed, inject, toRef } from "vue";
|
|
63
73
|
defineOptions({ inheritAttrs: false });
|
|
64
74
|
const props = defineProps({
|
|
65
75
|
variant: { type: null, required: false, default: "rectangular" },
|
|
66
|
-
width: { type: [String, Number], required: false },
|
|
67
|
-
height: { type: [String, Number], required: false },
|
|
68
76
|
loading: { type: Boolean, required: false, default: true },
|
|
69
|
-
|
|
77
|
+
animation: { type: null, required: false },
|
|
70
78
|
label: { type: String, required: false, default: "origam.loading" },
|
|
71
79
|
id: { type: String, required: false },
|
|
72
80
|
class: { type: [String, Array, Object], required: false },
|
|
@@ -82,7 +90,13 @@ const props = defineProps({
|
|
|
82
90
|
roundedStartStart: { type: [Boolean, Number, String], required: false },
|
|
83
91
|
roundedStartEnd: { type: [Boolean, Number, String], required: false },
|
|
84
92
|
roundedEndStart: { type: [Boolean, Number, String], required: false },
|
|
85
|
-
roundedEndEnd: { type: [Boolean, Number, String], required: false }
|
|
93
|
+
roundedEndEnd: { type: [Boolean, Number, String], required: false },
|
|
94
|
+
height: { type: [Number, String], required: false },
|
|
95
|
+
maxHeight: { type: [Number, String], required: false },
|
|
96
|
+
maxWidth: { type: [Number, String], required: false },
|
|
97
|
+
minHeight: { type: [Number, String], required: false },
|
|
98
|
+
minWidth: { type: [Number, String], required: false },
|
|
99
|
+
width: { type: [Number, String], required: false }
|
|
86
100
|
});
|
|
87
101
|
const { filterProps } = useProps(props);
|
|
88
102
|
defineEmits([]);
|
|
@@ -90,40 +104,43 @@ defineSlots();
|
|
|
90
104
|
const { t } = useLocale();
|
|
91
105
|
const { roundedClasses, roundedStyles } = useRounded(props);
|
|
92
106
|
const { sizeClasses, sizeStyles } = useSize(props);
|
|
93
|
-
const
|
|
107
|
+
const { dimensionStyles } = useDimension(props);
|
|
94
108
|
const { colorClasses, colorStyles } = useBothColor(toRef(props, "bgColor"), toRef(props, "color"));
|
|
95
|
-
const
|
|
96
|
-
|
|
97
|
-
|
|
109
|
+
const group = inject(ORIGAM_SKELETON_GROUP_KEY, null);
|
|
110
|
+
const isGrouped = computed(() => group !== null);
|
|
111
|
+
const animation = computed(() => props.animation ?? group?.animation.value ?? SKELETON_ANIMATION.PULSE);
|
|
112
|
+
const skeletonAriaLabel = computed(() => t(props.label));
|
|
113
|
+
const a11yAttrs = computed(() => {
|
|
114
|
+
if (isGrouped.value) return { "aria-hidden": true };
|
|
115
|
+
return {
|
|
116
|
+
"role": "status",
|
|
117
|
+
"aria-busy": true,
|
|
118
|
+
"aria-label": skeletonAriaLabel.value
|
|
119
|
+
};
|
|
98
120
|
});
|
|
99
|
-
const
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
const isListItem = computed(() => props.variant === SKELETON_VARIANT.LIST_ITEM);
|
|
122
|
+
const isCard = computed(() => props.variant === SKELETON_VARIANT.CARD);
|
|
123
|
+
const animationClasses = computed(() => [
|
|
124
|
+
"origam--skeleton",
|
|
125
|
+
{
|
|
126
|
+
"origam--skeleton-wave": animation.value === SKELETON_ANIMATION.WAVE,
|
|
127
|
+
"origam--skeleton-none": animation.value === SKELETON_ANIMATION.NONE
|
|
102
128
|
}
|
|
103
|
-
|
|
104
|
-
return props.width != null ? convertToUnit(props.width) : void 0;
|
|
105
|
-
}
|
|
106
|
-
return props.height != null ? convertToUnit(props.height) : void 0;
|
|
107
|
-
});
|
|
108
|
-
const circularSize = computed(() => props.width != null ? convertToUnit(props.width) : "36px");
|
|
109
|
-
const circularStyle = computed(() => ({
|
|
110
|
-
width: circularSize.value,
|
|
111
|
-
height: circularSize.value
|
|
112
|
-
}));
|
|
129
|
+
]);
|
|
113
130
|
const skeletonCircularClasses = computed(() => [
|
|
114
131
|
"origam-skeleton",
|
|
115
|
-
|
|
116
|
-
|
|
132
|
+
"origam-skeleton--circular",
|
|
133
|
+
animationClasses.value
|
|
117
134
|
]);
|
|
118
135
|
const skeletonTextClasses = computed(() => [
|
|
119
136
|
"origam-skeleton",
|
|
120
|
-
|
|
121
|
-
|
|
137
|
+
"origam-skeleton--text",
|
|
138
|
+
animationClasses.value
|
|
122
139
|
]);
|
|
123
140
|
const skeletonRectangularClasses = computed(() => [
|
|
124
141
|
"origam-skeleton",
|
|
125
|
-
|
|
126
|
-
|
|
142
|
+
"origam-skeleton--rectangular",
|
|
143
|
+
animationClasses.value
|
|
127
144
|
]);
|
|
128
145
|
const skeletonContainerClasses = computed(() => [
|
|
129
146
|
"origam-skeleton-wrapper",
|
|
@@ -134,102 +151,53 @@ const skeletonContainerStyles = computed(() => [props.style]);
|
|
|
134
151
|
const skeletonClasses = computed(() => [
|
|
135
152
|
"origam-skeleton",
|
|
136
153
|
`origam-skeleton--${props.variant}`,
|
|
137
|
-
|
|
154
|
+
animationClasses.value,
|
|
138
155
|
colorClasses.value,
|
|
139
156
|
roundedClasses.value,
|
|
140
157
|
sizeClasses.value,
|
|
141
158
|
props.class
|
|
142
159
|
]);
|
|
143
|
-
const skeletonStyles = computed(() =>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
160
|
+
const skeletonStyles = computed(() => [
|
|
161
|
+
dimensionStyles.value,
|
|
162
|
+
colorStyles.value,
|
|
163
|
+
roundedStyles.value,
|
|
164
|
+
sizeStyles.value,
|
|
165
|
+
props.style
|
|
166
|
+
]);
|
|
150
167
|
defineExpose({
|
|
151
|
-
filterProps
|
|
152
|
-
css,
|
|
153
|
-
id,
|
|
154
|
-
load,
|
|
155
|
-
unload,
|
|
156
|
-
isLoaded
|
|
168
|
+
filterProps
|
|
157
169
|
});
|
|
158
170
|
</script>
|
|
159
171
|
|
|
160
172
|
<style lang="scss" scoped>
|
|
161
|
-
@keyframes origam-skeleton-wave {
|
|
162
|
-
0% { background-position: -200% 0 }
|
|
163
|
-
100% { background-position: 200% 0 }
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
@keyframes origam-skeleton-spin {
|
|
167
|
-
from { transform: rotate(0deg) }
|
|
168
|
-
to { transform: rotate(360deg) }
|
|
169
|
-
}
|
|
170
|
-
|
|
171
173
|
.origam-skeleton {
|
|
172
174
|
display: block;
|
|
173
|
-
background-color: var(--origam-skeleton---background-color);
|
|
174
175
|
border-radius: var(--origam-skeleton---border-radius);
|
|
175
|
-
width: 100%;
|
|
176
|
-
height: var(--origam-skeleton---text-height);
|
|
177
176
|
|
|
178
177
|
&--text {
|
|
178
|
+
width: 100%;
|
|
179
179
|
height: var(--origam-skeleton---text-height);
|
|
180
|
-
|
|
180
|
+
margin-block: var(--origam-skeleton---text-margin-block);
|
|
181
|
+
border-radius: var(--origam-skeleton---border-radius-pill);
|
|
181
182
|
}
|
|
182
183
|
|
|
183
184
|
&--rectangular {
|
|
184
|
-
|
|
185
|
+
width: 100%;
|
|
185
186
|
height: 100%;
|
|
186
187
|
}
|
|
187
188
|
|
|
188
189
|
&--circular {
|
|
189
|
-
border-radius: var(--origam-skeleton---border-radius-circular, 50%);
|
|
190
190
|
flex-shrink: 0;
|
|
191
|
+
width: var(--origam-skeleton---circular-size);
|
|
192
|
+
aspect-ratio: 1;
|
|
193
|
+
border-radius: var(--origam-skeleton---border-radius-circular);
|
|
191
194
|
}
|
|
192
195
|
|
|
193
|
-
&--
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
&--text.origam-skeleton--pulse,
|
|
199
|
-
&--rectangular.origam-skeleton--pulse {
|
|
200
|
-
background-image: linear-gradient(
|
|
201
|
-
90deg,
|
|
202
|
-
transparent 0%,
|
|
203
|
-
var(
|
|
204
|
-
--origam-skeleton---wave-color,
|
|
205
|
-
color-mix(in srgb, var(--origam-skeleton---background-color) 50%, white)
|
|
206
|
-
) 50%,
|
|
207
|
-
transparent 100%
|
|
208
|
-
);
|
|
209
|
-
background-repeat: no-repeat;
|
|
210
|
-
background-size: 200% 100%;
|
|
211
|
-
animation: origam-skeleton-wave var(--origam-skeleton---animation-duration, 1500ms) linear infinite;
|
|
212
|
-
}
|
|
213
|
-
|
|
214
|
-
&--circular.origam-skeleton--pulse {
|
|
215
|
-
background:
|
|
216
|
-
conic-gradient(
|
|
217
|
-
from 0deg,
|
|
218
|
-
transparent 0deg,
|
|
219
|
-
var(
|
|
220
|
-
--origam-skeleton---wave-color,
|
|
221
|
-
color-mix(in srgb, var(--origam-skeleton---background-color) 50%, white)
|
|
222
|
-
) 90deg,
|
|
223
|
-
var(--origam-skeleton---background-color) 270deg
|
|
224
|
-
);
|
|
225
|
-
animation: origam-skeleton-spin var(--origam-skeleton---animation-duration, 1500ms) linear infinite;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
@media (prefers-reduced-motion: reduce) {
|
|
230
|
-
.origam-skeleton--pulse {
|
|
231
|
-
animation: none;
|
|
232
|
-
background-image: none;
|
|
196
|
+
&--pill {
|
|
197
|
+
flex-shrink: 0;
|
|
198
|
+
width: var(--origam-skeleton---pill-width);
|
|
199
|
+
height: var(--origam-skeleton---pill-height);
|
|
200
|
+
border-radius: var(--origam-skeleton---border-radius-pill);
|
|
233
201
|
}
|
|
234
202
|
}
|
|
235
203
|
|
|
@@ -239,10 +207,6 @@ defineExpose({
|
|
|
239
207
|
gap: var(--origam-skeleton---gap, 12px);
|
|
240
208
|
align-items: center;
|
|
241
209
|
|
|
242
|
-
> .origam-skeleton--circular {
|
|
243
|
-
flex-shrink: 0;
|
|
244
|
-
}
|
|
245
|
-
|
|
246
210
|
> .origam-skeleton__lines {
|
|
247
211
|
flex: 1;
|
|
248
212
|
display: flex;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div
|
|
3
|
+
:id="id"
|
|
4
|
+
:class="groupClasses"
|
|
5
|
+
:style="groupStyles"
|
|
6
|
+
role="status"
|
|
7
|
+
aria-busy="true"
|
|
8
|
+
:aria-label="groupAriaLabel"
|
|
9
|
+
v-bind="{ ...$attrs }"
|
|
10
|
+
>
|
|
11
|
+
<slot name="default"/>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script lang="ts" setup>
|
|
16
|
+
import { useLocale } from "../../composables/Commons/locale.composable";
|
|
17
|
+
import { useProps } from "../../composables/Commons/props.composable";
|
|
18
|
+
import { ORIGAM_SKELETON_GROUP_KEY } from "../../consts/Skeleton/skeleton.const";
|
|
19
|
+
import { SKELETON_ANIMATION } from "../../enums/Skeleton/skeleton.enum";
|
|
20
|
+
import { computed, provide } from "vue";
|
|
21
|
+
defineOptions({ inheritAttrs: false });
|
|
22
|
+
const props = defineProps({
|
|
23
|
+
animation: { type: null, required: false, default: "pulse" },
|
|
24
|
+
label: { type: String, required: false, default: "origam.loading" },
|
|
25
|
+
id: { type: String, required: false },
|
|
26
|
+
class: { type: [String, Array, Object], required: false },
|
|
27
|
+
style: { type: [String, Array, Object, Boolean, null], required: false, skipCheck: true }
|
|
28
|
+
});
|
|
29
|
+
const { filterProps } = useProps(props);
|
|
30
|
+
defineEmits([]);
|
|
31
|
+
defineSlots();
|
|
32
|
+
const { t } = useLocale();
|
|
33
|
+
const groupAriaLabel = computed(() => t(props.label));
|
|
34
|
+
const animation = computed(() => props.animation ?? SKELETON_ANIMATION.PULSE);
|
|
35
|
+
provide(ORIGAM_SKELETON_GROUP_KEY, { animation });
|
|
36
|
+
const groupClasses = computed(() => [
|
|
37
|
+
"origam-skeleton-group",
|
|
38
|
+
{ "origam--skeleton-group-pulse": animation.value === SKELETON_ANIMATION.PULSE },
|
|
39
|
+
props.class
|
|
40
|
+
]);
|
|
41
|
+
const groupStyles = computed(() => [props.style]);
|
|
42
|
+
defineExpose({
|
|
43
|
+
filterProps
|
|
44
|
+
});
|
|
45
|
+
</script>
|
|
46
|
+
|
|
47
|
+
<style lang="scss" scoped>
|
|
48
|
+
.origam-skeleton-group {
|
|
49
|
+
display: grid;
|
|
50
|
+
gap: var(--origam-skeleton---gap);
|
|
51
|
+
}
|
|
52
|
+
</style>
|
|
@@ -9,5 +9,12 @@ Object.defineProperty(exports, "OrigamSkeleton", {
|
|
|
9
9
|
return _OrigamSkeleton.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
+
Object.defineProperty(exports, "OrigamSkeletonGroup", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _OrigamSkeletonGroup.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
12
18
|
var _OrigamSkeleton = _interopRequireDefault(require("./OrigamSkeleton.vue"));
|
|
19
|
+
var _OrigamSkeletonGroup = _interopRequireDefault(require("./OrigamSkeletonGroup.vue"));
|
|
13
20
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { InjectionKey } from 'vue';
|
|
2
|
+
import type { ISkeletonGroupProvide } from '../../interfaces/Skeleton/skeleton-group.interface';
|
|
3
|
+
/*********************************************************
|
|
4
|
+
* ORIGAM_SKELETON_GROUP_KEY
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* Provided by `<OrigamSkeletonGroup>`; read by every `<OrigamSkeleton>` below
|
|
8
|
+
* it, which then follows the group's animation and stays out of the
|
|
9
|
+
* accessibility tree (the group announces the loading ONCE).
|
|
10
|
+
********************************************************/
|
|
11
|
+
export declare const ORIGAM_SKELETON_GROUP_KEY: InjectionKey<ISkeletonGroupProvide>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export const ORIGAM_SKELETON_GROUP_KEY = /* @__PURE__ */ Symbol.for("origam:skeleton-group");
|
|
@@ -696,6 +696,17 @@ Object.keys(_expansionPanel).forEach(function (key) {
|
|
|
696
696
|
}
|
|
697
697
|
});
|
|
698
698
|
});
|
|
699
|
+
var _skeleton = require("./Skeleton/skeleton.const.cjs");
|
|
700
|
+
Object.keys(_skeleton).forEach(function (key) {
|
|
701
|
+
if (key === "default" || key === "__esModule") return;
|
|
702
|
+
if (key in exports && exports[key] === _skeleton[key]) return;
|
|
703
|
+
Object.defineProperty(exports, key, {
|
|
704
|
+
enumerable: true,
|
|
705
|
+
get: function () {
|
|
706
|
+
return _skeleton[key];
|
|
707
|
+
}
|
|
708
|
+
});
|
|
709
|
+
});
|
|
699
710
|
var _dataTable = require("./DataTable/data-table.const.cjs");
|
|
700
711
|
Object.keys(_dataTable).forEach(function (key) {
|
|
701
712
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -61,6 +61,7 @@ export * from './TextField/text-field.const';
|
|
|
61
61
|
export * from './TextareaField/textarea-field.const';
|
|
62
62
|
export * from './EmptyState/empty-state.const';
|
|
63
63
|
export * from './ExpansionPanel/expansion-panel.const';
|
|
64
|
+
export * from './Skeleton/skeleton.const';
|
|
64
65
|
export * from './DataTable/data-table.const';
|
|
65
66
|
export * from './PasswordField/password-field.const';
|
|
66
67
|
export * from './Sheet/sheet.const';
|
package/dist/src/consts/index.js
CHANGED
|
@@ -61,6 +61,7 @@ export * from "./TextField/text-field.const.js";
|
|
|
61
61
|
export * from "./TextareaField/textarea-field.const.js";
|
|
62
62
|
export * from "./EmptyState/empty-state.const.js";
|
|
63
63
|
export * from "./ExpansionPanel/expansion-panel.const.js";
|
|
64
|
+
export * from "./Skeleton/skeleton.const.js";
|
|
64
65
|
export * from "./DataTable/data-table.const.js";
|
|
65
66
|
export * from "./PasswordField/password-field.const.js";
|
|
66
67
|
export * from "./Sheet/sheet.const.js";
|
|
@@ -3,12 +3,19 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.SKELETON_VARIANT = void 0;
|
|
6
|
+
exports.SKELETON_VARIANT = exports.SKELETON_ANIMATION = void 0;
|
|
7
7
|
var SKELETON_VARIANT = exports.SKELETON_VARIANT = /* @__PURE__ */(SKELETON_VARIANT2 => {
|
|
8
8
|
SKELETON_VARIANT2["TEXT"] = "text";
|
|
9
9
|
SKELETON_VARIANT2["RECTANGULAR"] = "rectangular";
|
|
10
10
|
SKELETON_VARIANT2["CIRCULAR"] = "circular";
|
|
11
|
+
SKELETON_VARIANT2["PILL"] = "pill";
|
|
11
12
|
SKELETON_VARIANT2["CARD"] = "card";
|
|
12
13
|
SKELETON_VARIANT2["LIST_ITEM"] = "list-item";
|
|
13
14
|
return SKELETON_VARIANT2;
|
|
14
|
-
})(SKELETON_VARIANT || {});
|
|
15
|
+
})(SKELETON_VARIANT || {});
|
|
16
|
+
var SKELETON_ANIMATION = exports.SKELETON_ANIMATION = /* @__PURE__ */(SKELETON_ANIMATION2 => {
|
|
17
|
+
SKELETON_ANIMATION2["PULSE"] = "pulse";
|
|
18
|
+
SKELETON_ANIMATION2["WAVE"] = "wave";
|
|
19
|
+
SKELETON_ANIMATION2["NONE"] = "none";
|
|
20
|
+
return SKELETON_ANIMATION2;
|
|
21
|
+
})(SKELETON_ANIMATION || {});
|
|
@@ -1,11 +1,34 @@
|
|
|
1
|
-
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
|
|
1
|
+
/*********************************************************
|
|
2
|
+
* SKELETON_VARIANT
|
|
3
|
+
*
|
|
4
|
+
* @description
|
|
5
|
+
* Shape presets for `<OrigamSkeleton>`. `text`, `rectangular`, `circular`
|
|
6
|
+
* and `pill` are the PRIMITIVES — the bricks a component assembles to mimic
|
|
7
|
+
* its own anatomy. `card` and `list-item` are fixed composite templates kept
|
|
8
|
+
* until the components that consume them have moved to primitives.
|
|
9
|
+
********************************************************/
|
|
5
10
|
export declare enum SKELETON_VARIANT {
|
|
6
11
|
TEXT = "text",
|
|
7
12
|
RECTANGULAR = "rectangular",
|
|
8
13
|
CIRCULAR = "circular",
|
|
14
|
+
PILL = "pill",
|
|
9
15
|
CARD = "card",
|
|
10
16
|
LIST_ITEM = "list-item"
|
|
11
17
|
}
|
|
18
|
+
/*********************************************************
|
|
19
|
+
* SKELETON_ANIMATION
|
|
20
|
+
*
|
|
21
|
+
* @description
|
|
22
|
+
* How a placeholder moves while content is loading. `pulse` is the default:
|
|
23
|
+
* a calm opacity breath. `wave` adds a shimmer that sweeps across the block.
|
|
24
|
+
* `none` is static.
|
|
25
|
+
*
|
|
26
|
+
* @description
|
|
27
|
+
* There is deliberately no spin — a rotating placeholder reads as a spinner,
|
|
28
|
+
* which is `<OrigamLoader>`'s job.
|
|
29
|
+
********************************************************/
|
|
30
|
+
export declare enum SKELETON_ANIMATION {
|
|
31
|
+
PULSE = "pulse",
|
|
32
|
+
WAVE = "wave",
|
|
33
|
+
NONE = "none"
|
|
34
|
+
}
|
|
@@ -2,7 +2,14 @@ export var SKELETON_VARIANT = /* @__PURE__ */ ((SKELETON_VARIANT2) => {
|
|
|
2
2
|
SKELETON_VARIANT2["TEXT"] = "text";
|
|
3
3
|
SKELETON_VARIANT2["RECTANGULAR"] = "rectangular";
|
|
4
4
|
SKELETON_VARIANT2["CIRCULAR"] = "circular";
|
|
5
|
+
SKELETON_VARIANT2["PILL"] = "pill";
|
|
5
6
|
SKELETON_VARIANT2["CARD"] = "card";
|
|
6
7
|
SKELETON_VARIANT2["LIST_ITEM"] = "list-item";
|
|
7
8
|
return SKELETON_VARIANT2;
|
|
8
9
|
})(SKELETON_VARIANT || {});
|
|
10
|
+
export var SKELETON_ANIMATION = /* @__PURE__ */ ((SKELETON_ANIMATION2) => {
|
|
11
|
+
SKELETON_ANIMATION2["PULSE"] = "pulse";
|
|
12
|
+
SKELETON_ANIMATION2["WAVE"] = "wave";
|
|
13
|
+
SKELETON_ANIMATION2["NONE"] = "none";
|
|
14
|
+
return SKELETON_ANIMATION2;
|
|
15
|
+
})(SKELETON_ANIMATION || {});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComputedRef } from 'vue';
|
|
2
|
+
import type { ICommonsComponentProps } from '../Commons/commons.interface';
|
|
3
|
+
import type { TSkeletonAnimation } from '../../types/Skeleton/skeleton.type';
|
|
4
|
+
export interface ISkeletonGroupProps extends ICommonsComponentProps {
|
|
5
|
+
/*********************************************************
|
|
6
|
+
* animation
|
|
7
|
+
*
|
|
8
|
+
* @description
|
|
9
|
+
* One animation clock for the whole group. `pulse` (default) animates
|
|
10
|
+
* the group container itself, so blocks that mount at different moments
|
|
11
|
+
* still breathe together. `wave` lets each block sweep its own shimmer.
|
|
12
|
+
* `none` is static. Blocks inherit it unless they set their own.
|
|
13
|
+
********************************************************/
|
|
14
|
+
animation?: TSkeletonAnimation;
|
|
15
|
+
/*********************************************************
|
|
16
|
+
* label
|
|
17
|
+
*
|
|
18
|
+
* @description
|
|
19
|
+
* Locale key of the ONE announcement made for the whole zone
|
|
20
|
+
* (`role="status"`, `aria-busy="true"`). Defaults to `'origam.loading'`.
|
|
21
|
+
********************************************************/
|
|
22
|
+
label?: string;
|
|
23
|
+
}
|
|
24
|
+
/*********************************************************
|
|
25
|
+
* ISkeletonGroupProvide
|
|
26
|
+
*
|
|
27
|
+
* @description
|
|
28
|
+
* Shape provided to the blocks of a group.
|
|
29
|
+
********************************************************/
|
|
30
|
+
export interface ISkeletonGroupProvide {
|
|
31
|
+
animation: ComputedRef<TSkeletonAnimation>;
|
|
32
|
+
}
|
|
33
|
+
export interface ISkeletonGroupEmits {
|
|
34
|
+
}
|
|
File without changes
|
|
@@ -1,27 +1,44 @@
|
|
|
1
1
|
import type { IBgColorProps, IColorProps } from '../Commons/color.interface';
|
|
2
2
|
import type { ICommonsComponentProps } from '../Commons/commons.interface';
|
|
3
|
+
import type { IDimensionProps } from '../Commons/dimension.interface';
|
|
3
4
|
import type { IRoundedProps } from '../Commons/rounded.interface';
|
|
4
5
|
import type { ISizeProps } from '../Commons/size.interface';
|
|
5
|
-
import type { TSkeletonVariant } from '../../types/Skeleton/skeleton.type';
|
|
6
|
-
export interface ISkeletonProps extends ICommonsComponentProps, IColorProps, IBgColorProps, ISizeProps, IRoundedProps {
|
|
6
|
+
import type { TSkeletonAnimation, TSkeletonVariant } from '../../types/Skeleton/skeleton.type';
|
|
7
|
+
export interface ISkeletonProps extends ICommonsComponentProps, IColorProps, IBgColorProps, ISizeProps, IRoundedProps, IDimensionProps {
|
|
7
8
|
variant?: TSkeletonVariant;
|
|
8
|
-
width?: string | number;
|
|
9
|
-
height?: string | number;
|
|
10
9
|
loading?: boolean;
|
|
11
|
-
|
|
10
|
+
/*********************************************************
|
|
11
|
+
* animation
|
|
12
|
+
*
|
|
13
|
+
* @description
|
|
14
|
+
* How the placeholder moves: `pulse` (default — an opacity breath),
|
|
15
|
+
* `wave` (a shimmer sweeping across) or `none`. Left unset, a block
|
|
16
|
+
* follows the `<OrigamSkeletonGroup>` it sits in, and falls back to
|
|
17
|
+
* `pulse` outside any group.
|
|
18
|
+
*
|
|
19
|
+
* @description
|
|
20
|
+
* Every animation stops after a finite number of loops
|
|
21
|
+
* (`--origam-skeleton---animation-iterations`, ~10 s) and is switched
|
|
22
|
+
* off under `prefers-reduced-motion: reduce` (WCAG 2.2.2).
|
|
23
|
+
********************************************************/
|
|
24
|
+
animation?: TSkeletonAnimation;
|
|
12
25
|
/*********************************************************
|
|
13
26
|
* label
|
|
14
27
|
*
|
|
15
28
|
* @description
|
|
16
|
-
* Accessible label announced on
|
|
17
|
-
* (aria-label). Carries a LOCALE KEY, not final
|
|
18
|
-
* through the DS `t()` mechanism, so it follows
|
|
19
|
-
* of the box. Defaults to `'origam.loading'`, the
|
|
20
|
-
* by Progress / Video / Audio / Switch for this
|
|
29
|
+
* Accessible label announced on a STANDALONE placeholder
|
|
30
|
+
* (`role="status"` + `aria-label`). Carries a LOCALE KEY, not final
|
|
31
|
+
* text — it is resolved through the DS `t()` mechanism, so it follows
|
|
32
|
+
* the active locale out of the box. Defaults to `'origam.loading'`, the
|
|
33
|
+
* shared key also used by Progress / Video / Audio / Switch for this
|
|
34
|
+
* same announcement.
|
|
21
35
|
* @description
|
|
22
36
|
* A raw string that matches no key is returned unchanged, so
|
|
23
37
|
* `label="Loading your invoices"` still works for consumers who prefer
|
|
24
38
|
* to translate on their side.
|
|
39
|
+
* @description
|
|
40
|
+
* Ignored inside an `<OrigamSkeletonGroup>`: the group owns the one
|
|
41
|
+
* announcement and its blocks are `aria-hidden`.
|
|
25
42
|
********************************************************/
|
|
26
43
|
label?: string;
|
|
27
44
|
}
|
|
@@ -2709,6 +2709,17 @@ Object.keys(_skeleton).forEach(function (key) {
|
|
|
2709
2709
|
}
|
|
2710
2710
|
});
|
|
2711
2711
|
});
|
|
2712
|
+
var _skeletonGroup = require("./Skeleton/skeleton-group.interface.cjs");
|
|
2713
|
+
Object.keys(_skeletonGroup).forEach(function (key) {
|
|
2714
|
+
if (key === "default" || key === "__esModule") return;
|
|
2715
|
+
if (key in exports && exports[key] === _skeletonGroup[key]) return;
|
|
2716
|
+
Object.defineProperty(exports, key, {
|
|
2717
|
+
enumerable: true,
|
|
2718
|
+
get: function () {
|
|
2719
|
+
return _skeletonGroup[key];
|
|
2720
|
+
}
|
|
2721
|
+
});
|
|
2722
|
+
});
|
|
2712
2723
|
var _kbd = require("./Kbd/kbd.interface.cjs");
|
|
2713
2724
|
Object.keys(_kbd).forEach(function (key) {
|
|
2714
2725
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -244,6 +244,7 @@ export * from './VirtualScroll/virtual-scroll-item.interface';
|
|
|
244
244
|
export * from './Window/window.interface';
|
|
245
245
|
export * from './Window/window-item.interface';
|
|
246
246
|
export * from './Skeleton/skeleton.interface';
|
|
247
|
+
export * from './Skeleton/skeleton-group.interface';
|
|
247
248
|
export * from './Kbd/kbd.interface';
|
|
248
249
|
export * from './Stepper/stepper.interface';
|
|
249
250
|
export * from './Stepper/stepper-item.interface';
|