@lovince/ui-vue 0.4.0 → 0.6.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/README.md +1 -1
- package/dist/components/display/timeline.d.ts +12 -1
- package/dist/components/navigation/pagination.d.ts +107 -0
- package/dist/components/primitives/icon.d.ts +34 -1
- package/dist/components/primitives/primitives.d.ts +186 -9
- package/dist/icon.d.ts +1 -1
- package/dist/icon.js +48 -19
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1844 -1700
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@ effects run through [`@lovince/ui-dom`](../ui-dom). This package subscribes to
|
|
|
6
6
|
the machine, feeds props in, and renders what `connect()` returns. It holds no
|
|
7
7
|
behaviour of its own.
|
|
8
8
|
|
|
9
|
-
> **Status: `0.
|
|
9
|
+
> **Status: `0.6.0`, experimental.** The API may change before `1.0`.
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
bun add @lovince/ui-vue
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { Orientation } from '@lovince/ui-headless';
|
|
2
|
+
import { Orientation, TimelineAlign } from '@lovince/ui-headless';
|
|
3
3
|
export declare const LvTimeline: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
4
|
as: {
|
|
5
5
|
default: string;
|
|
@@ -13,6 +13,11 @@ export declare const LvTimeline: import('vue').DefineComponent<import('vue').Ext
|
|
|
13
13
|
type: PropType<Orientation>;
|
|
14
14
|
default: string;
|
|
15
15
|
};
|
|
16
|
+
/** Which side of the rail content sits on; `alternate` zig-zags. Horizontal timelines put content below. */
|
|
17
|
+
align: {
|
|
18
|
+
type: PropType<TimelineAlign>;
|
|
19
|
+
default: string;
|
|
20
|
+
};
|
|
16
21
|
reveal: {
|
|
17
22
|
type: BooleanConstructor;
|
|
18
23
|
default: boolean;
|
|
@@ -36,6 +41,11 @@ export declare const LvTimeline: import('vue').DefineComponent<import('vue').Ext
|
|
|
36
41
|
type: PropType<Orientation>;
|
|
37
42
|
default: string;
|
|
38
43
|
};
|
|
44
|
+
/** Which side of the rail content sits on; `alternate` zig-zags. Horizontal timelines put content below. */
|
|
45
|
+
align: {
|
|
46
|
+
type: PropType<TimelineAlign>;
|
|
47
|
+
default: string;
|
|
48
|
+
};
|
|
39
49
|
reveal: {
|
|
40
50
|
type: BooleanConstructor;
|
|
41
51
|
default: boolean;
|
|
@@ -50,6 +60,7 @@ export declare const LvTimeline: import('vue').DefineComponent<import('vue').Ext
|
|
|
50
60
|
orientation: Orientation;
|
|
51
61
|
reveal: boolean;
|
|
52
62
|
current: number;
|
|
63
|
+
align: "start" | "end" | "alternate";
|
|
53
64
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
54
65
|
export declare const LvTimelineItem: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
55
66
|
as: {
|
|
@@ -195,6 +195,113 @@ export declare const LvPaginationNext: import('vue').DefineComponent<import('vue
|
|
|
195
195
|
asChild: boolean;
|
|
196
196
|
label: string;
|
|
197
197
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
198
|
+
export declare const LvPaginationFirst: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
199
|
+
label: {
|
|
200
|
+
type: StringConstructor;
|
|
201
|
+
default: string;
|
|
202
|
+
};
|
|
203
|
+
as: {
|
|
204
|
+
readonly default: "button";
|
|
205
|
+
readonly type: import('vue').PropType<string | import('vue').Component>;
|
|
206
|
+
};
|
|
207
|
+
asChild: {
|
|
208
|
+
readonly type: BooleanConstructor;
|
|
209
|
+
readonly default: false;
|
|
210
|
+
};
|
|
211
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
212
|
+
[key: string]: any;
|
|
213
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
214
|
+
label: {
|
|
215
|
+
type: StringConstructor;
|
|
216
|
+
default: string;
|
|
217
|
+
};
|
|
218
|
+
as: {
|
|
219
|
+
readonly default: "button";
|
|
220
|
+
readonly type: import('vue').PropType<string | import('vue').Component>;
|
|
221
|
+
};
|
|
222
|
+
asChild: {
|
|
223
|
+
readonly type: BooleanConstructor;
|
|
224
|
+
readonly default: false;
|
|
225
|
+
};
|
|
226
|
+
}>> & Readonly<{}>, {
|
|
227
|
+
as: string | import('vue').Component;
|
|
228
|
+
asChild: boolean;
|
|
229
|
+
label: string;
|
|
230
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
231
|
+
export declare const LvPaginationLast: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
232
|
+
label: {
|
|
233
|
+
type: StringConstructor;
|
|
234
|
+
default: string;
|
|
235
|
+
};
|
|
236
|
+
as: {
|
|
237
|
+
readonly default: "button";
|
|
238
|
+
readonly type: import('vue').PropType<string | import('vue').Component>;
|
|
239
|
+
};
|
|
240
|
+
asChild: {
|
|
241
|
+
readonly type: BooleanConstructor;
|
|
242
|
+
readonly default: false;
|
|
243
|
+
};
|
|
244
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
245
|
+
[key: string]: any;
|
|
246
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
247
|
+
label: {
|
|
248
|
+
type: StringConstructor;
|
|
249
|
+
default: string;
|
|
250
|
+
};
|
|
251
|
+
as: {
|
|
252
|
+
readonly default: "button";
|
|
253
|
+
readonly type: import('vue').PropType<string | import('vue').Component>;
|
|
254
|
+
};
|
|
255
|
+
asChild: {
|
|
256
|
+
readonly type: BooleanConstructor;
|
|
257
|
+
readonly default: false;
|
|
258
|
+
};
|
|
259
|
+
}>> & Readonly<{}>, {
|
|
260
|
+
as: string | import('vue').Component;
|
|
261
|
+
asChild: boolean;
|
|
262
|
+
label: string;
|
|
263
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
264
|
+
/** A page field for long lists: typing edits a draft, Enter or blur goes to that page. */
|
|
265
|
+
export declare const LvPaginationInput: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
266
|
+
label: {
|
|
267
|
+
type: StringConstructor;
|
|
268
|
+
default: string;
|
|
269
|
+
};
|
|
270
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
271
|
+
[key: string]: any;
|
|
272
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
273
|
+
label: {
|
|
274
|
+
type: StringConstructor;
|
|
275
|
+
default: string;
|
|
276
|
+
};
|
|
277
|
+
}>> & Readonly<{}>, {
|
|
278
|
+
label: string;
|
|
279
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
280
|
+
/** Announces the page politely when it changes. Defaults to "Page 4 of 12". */
|
|
281
|
+
export declare const LvPaginationStatus: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
282
|
+
as: {
|
|
283
|
+
default: string;
|
|
284
|
+
type: import('vue').PropType<string | import('vue').Component>;
|
|
285
|
+
};
|
|
286
|
+
asChild: {
|
|
287
|
+
readonly type: BooleanConstructor;
|
|
288
|
+
readonly default: false;
|
|
289
|
+
};
|
|
290
|
+
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
291
|
+
[key: string]: any;
|
|
292
|
+
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
293
|
+
as: {
|
|
294
|
+
default: string;
|
|
295
|
+
type: import('vue').PropType<string | import('vue').Component>;
|
|
296
|
+
};
|
|
297
|
+
asChild: {
|
|
298
|
+
readonly type: BooleanConstructor;
|
|
299
|
+
readonly default: false;
|
|
300
|
+
};
|
|
301
|
+
}>> & Readonly<{}>, {
|
|
302
|
+
as: string | import('vue').Component;
|
|
303
|
+
asChild: boolean;
|
|
304
|
+
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
198
305
|
export declare const LvPaginationEllipsis: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
199
306
|
as: {
|
|
200
307
|
default: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PropType } from 'vue';
|
|
2
|
-
import { IconFlip, IconName } from '@lovince/icons';
|
|
2
|
+
import { IconAnimation, IconFlip, IconName, IconTrigger } from '@lovince/icons';
|
|
3
3
|
export declare const LvIcon: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
4
4
|
name: {
|
|
5
5
|
type: PropType<IconName>;
|
|
@@ -33,6 +33,21 @@ export declare const LvIcon: import('vue').DefineComponent<import('vue').Extract
|
|
|
33
33
|
type: StringConstructor;
|
|
34
34
|
default: undefined;
|
|
35
35
|
};
|
|
36
|
+
/** Motion from `@lovince/icons/style.css`. Omit for a still icon. */
|
|
37
|
+
animation: {
|
|
38
|
+
type: PropType<IconAnimation>;
|
|
39
|
+
default: undefined;
|
|
40
|
+
};
|
|
41
|
+
/** When it plays; each animation has a sensible default. */
|
|
42
|
+
trigger: {
|
|
43
|
+
type: PropType<IconTrigger>;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
/** `active` trigger: plays each time this turns true. `loop`: pauses while false. */
|
|
47
|
+
active: {
|
|
48
|
+
type: BooleanConstructor;
|
|
49
|
+
default: undefined;
|
|
50
|
+
};
|
|
36
51
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
37
52
|
[key: string]: any;
|
|
38
53
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
@@ -68,12 +83,30 @@ export declare const LvIcon: import('vue').DefineComponent<import('vue').Extract
|
|
|
68
83
|
type: StringConstructor;
|
|
69
84
|
default: undefined;
|
|
70
85
|
};
|
|
86
|
+
/** Motion from `@lovince/icons/style.css`. Omit for a still icon. */
|
|
87
|
+
animation: {
|
|
88
|
+
type: PropType<IconAnimation>;
|
|
89
|
+
default: undefined;
|
|
90
|
+
};
|
|
91
|
+
/** When it plays; each animation has a sensible default. */
|
|
92
|
+
trigger: {
|
|
93
|
+
type: PropType<IconTrigger>;
|
|
94
|
+
default: undefined;
|
|
95
|
+
};
|
|
96
|
+
/** `active` trigger: plays each time this turns true. `loop`: pauses while false. */
|
|
97
|
+
active: {
|
|
98
|
+
type: BooleanConstructor;
|
|
99
|
+
default: undefined;
|
|
100
|
+
};
|
|
71
101
|
}>> & Readonly<{}>, {
|
|
72
102
|
fill: number | boolean;
|
|
73
103
|
size: string | number;
|
|
74
104
|
label: string;
|
|
105
|
+
active: boolean;
|
|
106
|
+
trigger: "loop" | "active" | "hover" | "group-hover" | "press" | "in-view" | "mount";
|
|
75
107
|
flip: IconFlip;
|
|
76
108
|
rotate: string | number;
|
|
77
109
|
strokeWidth: string | number;
|
|
78
110
|
absoluteStrokeWidth: boolean;
|
|
111
|
+
animation: "pop" | "spin" | "pulse" | "bounce" | "wiggle" | "ring" | "nudge" | "draw";
|
|
79
112
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
@@ -1,13 +1,60 @@
|
|
|
1
1
|
import { Component, PropType } from 'vue';
|
|
2
|
-
export
|
|
2
|
+
export declare const TEXT_ROLES: readonly ["display-lg", "display-md", "display-sm", "headline-lg", "headline-md", "headline-sm", "title-lg", "title-md", "title-sm", "body-lg", "body-md", "body-sm", "label-lg", "label-md", "overline", "code"];
|
|
3
|
+
export declare const TEXT_COLORS: readonly ["default", "muted", "subtle", "inverse", "accent", "success", "warning", "danger", "disabled"];
|
|
4
|
+
export declare const TEXT_WEIGHTS: readonly ["medium", "semibold", "bold"];
|
|
5
|
+
export declare const TEXT_ALIGNS: readonly ["start", "center", "end", "justify"];
|
|
6
|
+
export declare const TEXT_WRAPS: readonly ["wrap", "nowrap", "balance", "pretty", "break"];
|
|
7
|
+
export type TextRole = (typeof TEXT_ROLES)[number];
|
|
8
|
+
export type TextColor = (typeof TEXT_COLORS)[number];
|
|
9
|
+
export type TextWeight = (typeof TEXT_WEIGHTS)[number];
|
|
10
|
+
export type TextAlign = (typeof TEXT_ALIGNS)[number];
|
|
11
|
+
export type TextWrap = (typeof TEXT_WRAPS)[number];
|
|
3
12
|
export declare const LvText: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
13
|
+
color: {
|
|
14
|
+
readonly type: PropType<TextColor>;
|
|
15
|
+
readonly default: undefined;
|
|
16
|
+
readonly validator: (value: string) => boolean;
|
|
17
|
+
};
|
|
18
|
+
weight: {
|
|
19
|
+
readonly type: PropType<TextWeight>;
|
|
20
|
+
readonly default: undefined;
|
|
21
|
+
readonly validator: (value: string) => boolean;
|
|
22
|
+
};
|
|
23
|
+
align: {
|
|
24
|
+
readonly type: PropType<TextAlign>;
|
|
25
|
+
readonly default: undefined;
|
|
26
|
+
readonly validator: (value: string) => boolean;
|
|
27
|
+
};
|
|
28
|
+
wrap: {
|
|
29
|
+
readonly type: PropType<TextWrap>;
|
|
30
|
+
readonly default: undefined;
|
|
31
|
+
readonly validator: (value: string) => boolean;
|
|
32
|
+
};
|
|
33
|
+
truncate: {
|
|
34
|
+
readonly type: PropType<boolean | number>;
|
|
35
|
+
readonly default: false;
|
|
36
|
+
readonly validator: (value: boolean | number) => boolean;
|
|
37
|
+
};
|
|
38
|
+
italic: {
|
|
39
|
+
readonly type: BooleanConstructor;
|
|
40
|
+
readonly default: false;
|
|
41
|
+
};
|
|
42
|
+
underline: {
|
|
43
|
+
readonly type: BooleanConstructor;
|
|
44
|
+
readonly default: false;
|
|
45
|
+
};
|
|
46
|
+
uppercase: {
|
|
47
|
+
readonly type: BooleanConstructor;
|
|
48
|
+
readonly default: false;
|
|
49
|
+
};
|
|
4
50
|
as: {
|
|
5
51
|
default: string;
|
|
6
52
|
type: PropType<string | Component>;
|
|
7
53
|
};
|
|
8
54
|
variant: {
|
|
9
55
|
readonly type: PropType<TextRole>;
|
|
10
|
-
readonly default: "body-md";
|
|
56
|
+
readonly default: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
57
|
+
readonly validator: (value: string) => boolean;
|
|
11
58
|
};
|
|
12
59
|
asChild: {
|
|
13
60
|
readonly type: BooleanConstructor;
|
|
@@ -16,13 +63,51 @@ export declare const LvText: import('vue').DefineComponent<import('vue').Extract
|
|
|
16
63
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
17
64
|
[key: string]: any;
|
|
18
65
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
66
|
+
color: {
|
|
67
|
+
readonly type: PropType<TextColor>;
|
|
68
|
+
readonly default: undefined;
|
|
69
|
+
readonly validator: (value: string) => boolean;
|
|
70
|
+
};
|
|
71
|
+
weight: {
|
|
72
|
+
readonly type: PropType<TextWeight>;
|
|
73
|
+
readonly default: undefined;
|
|
74
|
+
readonly validator: (value: string) => boolean;
|
|
75
|
+
};
|
|
76
|
+
align: {
|
|
77
|
+
readonly type: PropType<TextAlign>;
|
|
78
|
+
readonly default: undefined;
|
|
79
|
+
readonly validator: (value: string) => boolean;
|
|
80
|
+
};
|
|
81
|
+
wrap: {
|
|
82
|
+
readonly type: PropType<TextWrap>;
|
|
83
|
+
readonly default: undefined;
|
|
84
|
+
readonly validator: (value: string) => boolean;
|
|
85
|
+
};
|
|
86
|
+
truncate: {
|
|
87
|
+
readonly type: PropType<boolean | number>;
|
|
88
|
+
readonly default: false;
|
|
89
|
+
readonly validator: (value: boolean | number) => boolean;
|
|
90
|
+
};
|
|
91
|
+
italic: {
|
|
92
|
+
readonly type: BooleanConstructor;
|
|
93
|
+
readonly default: false;
|
|
94
|
+
};
|
|
95
|
+
underline: {
|
|
96
|
+
readonly type: BooleanConstructor;
|
|
97
|
+
readonly default: false;
|
|
98
|
+
};
|
|
99
|
+
uppercase: {
|
|
100
|
+
readonly type: BooleanConstructor;
|
|
101
|
+
readonly default: false;
|
|
102
|
+
};
|
|
19
103
|
as: {
|
|
20
104
|
default: string;
|
|
21
105
|
type: PropType<string | Component>;
|
|
22
106
|
};
|
|
23
107
|
variant: {
|
|
24
108
|
readonly type: PropType<TextRole>;
|
|
25
|
-
readonly default: "body-md";
|
|
109
|
+
readonly default: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
110
|
+
readonly validator: (value: string) => boolean;
|
|
26
111
|
};
|
|
27
112
|
asChild: {
|
|
28
113
|
readonly type: BooleanConstructor;
|
|
@@ -31,9 +116,54 @@ export declare const LvText: import('vue').DefineComponent<import('vue').Extract
|
|
|
31
116
|
}>> & Readonly<{}>, {
|
|
32
117
|
as: string | Component;
|
|
33
118
|
asChild: boolean;
|
|
34
|
-
variant:
|
|
119
|
+
variant: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
120
|
+
color: "default" | "disabled" | "success" | "warning" | "accent" | "subtle" | "danger" | "muted" | "inverse";
|
|
121
|
+
align: "center" | "start" | "end" | "justify";
|
|
122
|
+
wrap: "nowrap" | "balance" | "wrap" | "pretty" | "break";
|
|
123
|
+
italic: boolean;
|
|
124
|
+
weight: "bold" | "medium" | "semibold";
|
|
125
|
+
underline: boolean;
|
|
126
|
+
uppercase: boolean;
|
|
127
|
+
truncate: number | boolean;
|
|
35
128
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
36
129
|
export declare const LvHeading: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
|
130
|
+
color: {
|
|
131
|
+
readonly type: PropType<TextColor>;
|
|
132
|
+
readonly default: undefined;
|
|
133
|
+
readonly validator: (value: string) => boolean;
|
|
134
|
+
};
|
|
135
|
+
weight: {
|
|
136
|
+
readonly type: PropType<TextWeight>;
|
|
137
|
+
readonly default: undefined;
|
|
138
|
+
readonly validator: (value: string) => boolean;
|
|
139
|
+
};
|
|
140
|
+
align: {
|
|
141
|
+
readonly type: PropType<TextAlign>;
|
|
142
|
+
readonly default: undefined;
|
|
143
|
+
readonly validator: (value: string) => boolean;
|
|
144
|
+
};
|
|
145
|
+
wrap: {
|
|
146
|
+
readonly type: PropType<TextWrap>;
|
|
147
|
+
readonly default: undefined;
|
|
148
|
+
readonly validator: (value: string) => boolean;
|
|
149
|
+
};
|
|
150
|
+
truncate: {
|
|
151
|
+
readonly type: PropType<boolean | number>;
|
|
152
|
+
readonly default: false;
|
|
153
|
+
readonly validator: (value: boolean | number) => boolean;
|
|
154
|
+
};
|
|
155
|
+
italic: {
|
|
156
|
+
readonly type: BooleanConstructor;
|
|
157
|
+
readonly default: false;
|
|
158
|
+
};
|
|
159
|
+
underline: {
|
|
160
|
+
readonly type: BooleanConstructor;
|
|
161
|
+
readonly default: false;
|
|
162
|
+
};
|
|
163
|
+
uppercase: {
|
|
164
|
+
readonly type: BooleanConstructor;
|
|
165
|
+
readonly default: false;
|
|
166
|
+
};
|
|
37
167
|
as: {
|
|
38
168
|
type: PropType<string | Component>;
|
|
39
169
|
default: undefined;
|
|
@@ -48,12 +178,50 @@ export declare const LvHeading: import('vue').DefineComponent<import('vue').Extr
|
|
|
48
178
|
validator: (value: number) => boolean;
|
|
49
179
|
};
|
|
50
180
|
size: {
|
|
51
|
-
|
|
52
|
-
|
|
181
|
+
readonly type: PropType<TextRole>;
|
|
182
|
+
readonly default: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
183
|
+
readonly validator: (value: string) => boolean;
|
|
53
184
|
};
|
|
54
185
|
}>, () => import('vue').VNode<import('vue').RendererNode, import('vue').RendererElement, {
|
|
55
186
|
[key: string]: any;
|
|
56
187
|
}>, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {}, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<{
|
|
188
|
+
color: {
|
|
189
|
+
readonly type: PropType<TextColor>;
|
|
190
|
+
readonly default: undefined;
|
|
191
|
+
readonly validator: (value: string) => boolean;
|
|
192
|
+
};
|
|
193
|
+
weight: {
|
|
194
|
+
readonly type: PropType<TextWeight>;
|
|
195
|
+
readonly default: undefined;
|
|
196
|
+
readonly validator: (value: string) => boolean;
|
|
197
|
+
};
|
|
198
|
+
align: {
|
|
199
|
+
readonly type: PropType<TextAlign>;
|
|
200
|
+
readonly default: undefined;
|
|
201
|
+
readonly validator: (value: string) => boolean;
|
|
202
|
+
};
|
|
203
|
+
wrap: {
|
|
204
|
+
readonly type: PropType<TextWrap>;
|
|
205
|
+
readonly default: undefined;
|
|
206
|
+
readonly validator: (value: string) => boolean;
|
|
207
|
+
};
|
|
208
|
+
truncate: {
|
|
209
|
+
readonly type: PropType<boolean | number>;
|
|
210
|
+
readonly default: false;
|
|
211
|
+
readonly validator: (value: boolean | number) => boolean;
|
|
212
|
+
};
|
|
213
|
+
italic: {
|
|
214
|
+
readonly type: BooleanConstructor;
|
|
215
|
+
readonly default: false;
|
|
216
|
+
};
|
|
217
|
+
underline: {
|
|
218
|
+
readonly type: BooleanConstructor;
|
|
219
|
+
readonly default: false;
|
|
220
|
+
};
|
|
221
|
+
uppercase: {
|
|
222
|
+
readonly type: BooleanConstructor;
|
|
223
|
+
readonly default: false;
|
|
224
|
+
};
|
|
57
225
|
as: {
|
|
58
226
|
type: PropType<string | Component>;
|
|
59
227
|
default: undefined;
|
|
@@ -68,13 +236,22 @@ export declare const LvHeading: import('vue').DefineComponent<import('vue').Extr
|
|
|
68
236
|
validator: (value: number) => boolean;
|
|
69
237
|
};
|
|
70
238
|
size: {
|
|
71
|
-
|
|
72
|
-
|
|
239
|
+
readonly type: PropType<TextRole>;
|
|
240
|
+
readonly default: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
241
|
+
readonly validator: (value: string) => boolean;
|
|
73
242
|
};
|
|
74
243
|
}>> & Readonly<{}>, {
|
|
75
|
-
size:
|
|
244
|
+
size: "code" | "overline" | "display-lg" | "display-md" | "display-sm" | "headline-lg" | "headline-md" | "headline-sm" | "title-lg" | "title-md" | "title-sm" | "body-lg" | "body-md" | "body-sm" | "label-lg" | "label-md";
|
|
76
245
|
as: string | Component;
|
|
77
246
|
asChild: boolean;
|
|
247
|
+
color: "default" | "disabled" | "success" | "warning" | "accent" | "subtle" | "danger" | "muted" | "inverse";
|
|
248
|
+
align: "center" | "start" | "end" | "justify";
|
|
249
|
+
wrap: "nowrap" | "balance" | "wrap" | "pretty" | "break";
|
|
250
|
+
italic: boolean;
|
|
251
|
+
weight: "bold" | "medium" | "semibold";
|
|
252
|
+
underline: boolean;
|
|
253
|
+
uppercase: boolean;
|
|
254
|
+
truncate: number | boolean;
|
|
78
255
|
level: number;
|
|
79
256
|
}, {}, {}, {}, string, import('vue').ComponentProvideOptions, true, {}, any>;
|
|
80
257
|
export declare const LvLabel: import('vue').DefineComponent<import('vue').ExtractPropTypes<{
|
package/dist/icon.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { LvIcon } from './components/primitives/icon';
|
|
2
|
-
export type { IconFlip, IconName } from '@lovince/icons';
|
|
2
|
+
export type { IconAnimation, IconFlip, IconName, IconTrigger } from '@lovince/icons';
|
package/dist/icon.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { computed as e, defineComponent as t, h as n } from "vue";
|
|
2
|
-
import { CANVAS as
|
|
1
|
+
import { computed as e, defineComponent as t, h as n, onBeforeUnmount as r, ref as i, watch as a } from "vue";
|
|
2
|
+
import { CANVAS as o, iconMotionAttrs as s, iconPathLength as c, observeInView as l, paths as u, resolveFill as d, resolveGeometry as f, resolveIconTrigger as p } from "@lovince/icons";
|
|
3
3
|
//#region src/components/primitives/icon.ts
|
|
4
|
-
var
|
|
4
|
+
var m = t({
|
|
5
5
|
name: "LvIcon",
|
|
6
6
|
inheritAttrs: !1,
|
|
7
7
|
props: {
|
|
@@ -36,10 +36,31 @@ var s = t({
|
|
|
36
36
|
label: {
|
|
37
37
|
type: String,
|
|
38
38
|
default: void 0
|
|
39
|
+
},
|
|
40
|
+
animation: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: void 0
|
|
43
|
+
},
|
|
44
|
+
trigger: {
|
|
45
|
+
type: String,
|
|
46
|
+
default: void 0
|
|
47
|
+
},
|
|
48
|
+
active: {
|
|
49
|
+
type: Boolean,
|
|
50
|
+
default: void 0
|
|
39
51
|
}
|
|
40
52
|
},
|
|
41
|
-
setup: (t, { attrs:
|
|
42
|
-
let
|
|
53
|
+
setup: (t, { attrs: m }) => {
|
|
54
|
+
let h = i(null), g = i(!1), _ = null, v = () => {
|
|
55
|
+
_?.(), _ = null;
|
|
56
|
+
};
|
|
57
|
+
a([h, () => p({
|
|
58
|
+
animation: t.animation,
|
|
59
|
+
trigger: t.trigger
|
|
60
|
+
})], ([e, t]) => {
|
|
61
|
+
v(), e !== null && t === "in-view" && !g.value && (_ = l(e, () => g.value = !0));
|
|
62
|
+
}, { flush: "post" }), r(v);
|
|
63
|
+
let y = e(() => f({
|
|
43
64
|
size: t.size,
|
|
44
65
|
strokeWidth: t.strokeWidth,
|
|
45
66
|
absoluteStrokeWidth: t.absoluteStrokeWidth,
|
|
@@ -47,30 +68,38 @@ var s = t({
|
|
|
47
68
|
flip: t.flip
|
|
48
69
|
}));
|
|
49
70
|
return () => {
|
|
50
|
-
let e =
|
|
71
|
+
let e = u[t.name] ?? [], r = d(t.fill), i = t.label === void 0 || t.label.length === 0, a = {
|
|
72
|
+
animation: t.animation,
|
|
73
|
+
trigger: t.trigger,
|
|
74
|
+
active: t.active,
|
|
75
|
+
inView: g.value
|
|
76
|
+
}, l = c(a);
|
|
51
77
|
return n("svg", {
|
|
52
|
-
...
|
|
53
|
-
|
|
78
|
+
...m,
|
|
79
|
+
...s(a),
|
|
80
|
+
ref: h,
|
|
81
|
+
class: ["lovince-icon", m.class],
|
|
54
82
|
"data-icon": t.name,
|
|
55
83
|
xmlns: "http://www.w3.org/2000/svg",
|
|
56
|
-
width:
|
|
57
|
-
height:
|
|
58
|
-
viewBox: `0 0 ${
|
|
84
|
+
width: y.value.size,
|
|
85
|
+
height: y.value.size,
|
|
86
|
+
viewBox: `0 0 ${o} ${o}`,
|
|
59
87
|
fill: "none",
|
|
60
88
|
stroke: "currentColor",
|
|
61
|
-
"stroke-width":
|
|
89
|
+
"stroke-width": y.value.strokeWidth,
|
|
62
90
|
"stroke-linecap": "round",
|
|
63
91
|
"stroke-linejoin": "round",
|
|
64
|
-
"aria-hidden":
|
|
65
|
-
role:
|
|
66
|
-
"aria-label":
|
|
67
|
-
}, [n("g", { transform:
|
|
92
|
+
"aria-hidden": i ? "true" : void 0,
|
|
93
|
+
role: i ? void 0 : "img",
|
|
94
|
+
"aria-label": i ? void 0 : t.label
|
|
95
|
+
}, [n("g", { transform: y.value.transform }, e.map((e) => n("path", {
|
|
68
96
|
d: e,
|
|
69
|
-
|
|
70
|
-
|
|
97
|
+
pathLength: l,
|
|
98
|
+
fill: r > 0 ? "currentColor" : "none",
|
|
99
|
+
"fill-opacity": r > 0 ? r : void 0
|
|
71
100
|
})))]);
|
|
72
101
|
};
|
|
73
102
|
}
|
|
74
103
|
});
|
|
75
104
|
//#endregion
|
|
76
|
-
export {
|
|
105
|
+
export { m as LvIcon };
|
package/dist/index.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export * from './components/forms/phone-input';
|
|
|
41
41
|
export * from './components/layout/scroll-area';
|
|
42
42
|
export { LvFieldRoot, LvFieldLabel, LvForm, LvInput, LvTextarea } from './components/forms/forms';
|
|
43
43
|
export { LvButton, BUTTON_SHAPES, BUTTON_SIZES, BUTTON_VARIANTS, type ButtonShape, type ButtonSize, type ButtonVariant } from './components/primitives/button';
|
|
44
|
-
export { LvAspectRatio, LvBox, LvCode, LvHeading, LvKbd, LvLabel, LvLink, LvSeparator, LvText, LvVisuallyHidden, type TextRole } from './components/primitives/primitives';
|
|
44
|
+
export { LvAspectRatio, LvBox, LvCode, LvHeading, LvKbd, LvLabel, LvLink, LvSeparator, LvText, LvVisuallyHidden, TEXT_ALIGNS, TEXT_COLORS, TEXT_ROLES, TEXT_WEIGHTS, TEXT_WRAPS, type TextAlign, type TextColor, type TextRole, type TextWeight, type TextWrap, } from './components/primitives/primitives';
|
|
45
45
|
export type { ActivationMode, CheckedState, DialogRole, Direction, Orientation } from '@lovince/ui-headless';
|
|
46
46
|
export * from './components/display/feedback';
|
|
47
47
|
export * from './components/display/meter';
|