@bwui/vue 0.1.9 → 0.1.11
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/dist/date-picker.d.ts +36 -0
- package/dist/date-picker.js +25 -5
- package/dist/index.d.ts +7 -1
- package/dist/index.js +5 -1
- package/dist/modal.d.ts +75 -0
- package/dist/modal.js +124 -0
- package/dist/pages.d.ts +2 -2
- package/dist/popover.d.ts +100 -0
- package/dist/popover.js +182 -0
- package/dist/primitives.d.ts +738 -22
- package/dist/primitives.js +680 -26
- package/dist/stat.d.ts +216 -0
- package/dist/stat.js +111 -0
- package/package.json +3 -3
- package/src/date-picker.ts +70 -42
- package/src/index.ts +25 -0
- package/src/modal.ts +160 -0
- package/src/popover.ts +241 -0
- package/src/primitives.ts +914 -27
- package/src/stat.ts +138 -0
package/dist/date-picker.d.ts
CHANGED
|
@@ -11,6 +11,14 @@ export declare const DatePicker: import("vue").DefineComponent<import("vue").Ext
|
|
|
11
11
|
};
|
|
12
12
|
disabled: BooleanConstructor;
|
|
13
13
|
required: BooleanConstructor;
|
|
14
|
+
panelLabel: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
default: string;
|
|
17
|
+
};
|
|
18
|
+
triggerLabel: {
|
|
19
|
+
type: StringConstructor;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
14
22
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
15
23
|
[key: string]: any;
|
|
16
24
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "update:modelValue"[], "update:modelValue", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -26,6 +34,14 @@ export declare const DatePicker: import("vue").DefineComponent<import("vue").Ext
|
|
|
26
34
|
};
|
|
27
35
|
disabled: BooleanConstructor;
|
|
28
36
|
required: BooleanConstructor;
|
|
37
|
+
panelLabel: {
|
|
38
|
+
type: StringConstructor;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
triggerLabel: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
default: string;
|
|
44
|
+
};
|
|
29
45
|
}>> & Readonly<{
|
|
30
46
|
"onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
|
|
31
47
|
}>, {
|
|
@@ -33,6 +49,8 @@ export declare const DatePicker: import("vue").DefineComponent<import("vue").Ext
|
|
|
33
49
|
required: boolean;
|
|
34
50
|
modelValue: string;
|
|
35
51
|
placeholder: string;
|
|
52
|
+
panelLabel: string;
|
|
53
|
+
triggerLabel: string;
|
|
36
54
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
37
55
|
export declare const DateRangePicker: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
38
56
|
start: {
|
|
@@ -46,6 +64,14 @@ export declare const DateRangePicker: import("vue").DefineComponent<import("vue"
|
|
|
46
64
|
startName: StringConstructor;
|
|
47
65
|
endName: StringConstructor;
|
|
48
66
|
disabled: BooleanConstructor;
|
|
67
|
+
panelLabel: {
|
|
68
|
+
type: StringConstructor;
|
|
69
|
+
default: string;
|
|
70
|
+
};
|
|
71
|
+
triggerLabel: {
|
|
72
|
+
type: StringConstructor;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
49
75
|
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
50
76
|
[key: string]: any;
|
|
51
77
|
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:start" | "update:end")[], "update:start" | "update:end", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
@@ -60,11 +86,21 @@ export declare const DateRangePicker: import("vue").DefineComponent<import("vue"
|
|
|
60
86
|
startName: StringConstructor;
|
|
61
87
|
endName: StringConstructor;
|
|
62
88
|
disabled: BooleanConstructor;
|
|
89
|
+
panelLabel: {
|
|
90
|
+
type: StringConstructor;
|
|
91
|
+
default: string;
|
|
92
|
+
};
|
|
93
|
+
triggerLabel: {
|
|
94
|
+
type: StringConstructor;
|
|
95
|
+
default: string;
|
|
96
|
+
};
|
|
63
97
|
}>> & Readonly<{
|
|
64
98
|
"onUpdate:start"?: ((...args: any[]) => any) | undefined;
|
|
65
99
|
"onUpdate:end"?: ((...args: any[]) => any) | undefined;
|
|
66
100
|
}>, {
|
|
67
101
|
disabled: boolean;
|
|
102
|
+
panelLabel: string;
|
|
103
|
+
triggerLabel: string;
|
|
68
104
|
start: string;
|
|
69
105
|
end: string;
|
|
70
106
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
package/dist/date-picker.js
CHANGED
|
@@ -71,7 +71,7 @@ function Calendar(opts) {
|
|
|
71
71
|
type: 'button',
|
|
72
72
|
class: 'bw-calendar__day',
|
|
73
73
|
'aria-label': toISO(date),
|
|
74
|
-
'aria-
|
|
74
|
+
'aria-pressed': isSelected,
|
|
75
75
|
...(inRange ? { 'data-bw-in-range': '' } : {}),
|
|
76
76
|
onClick: () => opts.onSelect(date),
|
|
77
77
|
}, String(date.getDate()));
|
|
@@ -88,6 +88,8 @@ export const DatePicker = defineComponent({
|
|
|
88
88
|
placeholder: { type: String, default: 'YYYY-MM-DD' },
|
|
89
89
|
disabled: Boolean,
|
|
90
90
|
required: Boolean,
|
|
91
|
+
panelLabel: { type: String, default: 'Choose date' },
|
|
92
|
+
triggerLabel: { type: String, default: 'Open calendar' },
|
|
91
93
|
},
|
|
92
94
|
emits: ['update:modelValue'],
|
|
93
95
|
setup(props, { emit, attrs }) {
|
|
@@ -120,14 +122,22 @@ export const DatePicker = defineComponent({
|
|
|
120
122
|
h('button', {
|
|
121
123
|
type: 'button',
|
|
122
124
|
class: 'bw-date-picker-chrome__trigger',
|
|
123
|
-
'aria-label':
|
|
125
|
+
'aria-label': props.triggerLabel,
|
|
126
|
+
'aria-expanded': open.value,
|
|
127
|
+
'aria-haspopup': 'dialog',
|
|
124
128
|
disabled: props.disabled,
|
|
125
129
|
onClick: () => {
|
|
126
130
|
open.value = !open.value;
|
|
127
131
|
},
|
|
128
132
|
}, 'Cal'),
|
|
129
133
|
]),
|
|
130
|
-
h('div', {
|
|
134
|
+
h('div', {
|
|
135
|
+
class: 'bw-date-picker-chrome__panel',
|
|
136
|
+
role: 'dialog',
|
|
137
|
+
'aria-modal': 'true',
|
|
138
|
+
'aria-label': props.panelLabel,
|
|
139
|
+
hidden: !open.value,
|
|
140
|
+
}, [
|
|
131
141
|
Calendar({
|
|
132
142
|
view: view.value,
|
|
133
143
|
selected: parseISO(props.modelValue),
|
|
@@ -151,6 +161,8 @@ export const DateRangePicker = defineComponent({
|
|
|
151
161
|
startName: String,
|
|
152
162
|
endName: String,
|
|
153
163
|
disabled: Boolean,
|
|
164
|
+
panelLabel: { type: String, default: 'Choose dates' },
|
|
165
|
+
triggerLabel: { type: String, default: 'Open range calendar' },
|
|
154
166
|
},
|
|
155
167
|
emits: ['update:start', 'update:end'],
|
|
156
168
|
setup(props, { emit, attrs }) {
|
|
@@ -198,14 +210,22 @@ export const DateRangePicker = defineComponent({
|
|
|
198
210
|
h('button', {
|
|
199
211
|
type: 'button',
|
|
200
212
|
class: 'bw-date-picker-chrome__trigger',
|
|
201
|
-
'aria-label':
|
|
213
|
+
'aria-label': props.triggerLabel,
|
|
214
|
+
'aria-expanded': open.value,
|
|
215
|
+
'aria-haspopup': 'dialog',
|
|
202
216
|
disabled: props.disabled,
|
|
203
217
|
onClick: () => {
|
|
204
218
|
open.value = !open.value;
|
|
205
219
|
},
|
|
206
220
|
}, 'Cal'),
|
|
207
221
|
]),
|
|
208
|
-
h('div', {
|
|
222
|
+
h('div', {
|
|
223
|
+
class: 'bw-date-picker-chrome__panel',
|
|
224
|
+
role: 'dialog',
|
|
225
|
+
'aria-modal': 'true',
|
|
226
|
+
'aria-label': props.panelLabel,
|
|
227
|
+
hidden: !open.value,
|
|
228
|
+
}, [
|
|
209
229
|
Calendar({
|
|
210
230
|
view: view.value,
|
|
211
231
|
rangeStart: parseISO(props.start),
|
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,13 @@
|
|
|
1
|
-
export { Button, ButtonLink, Badge, Card, Alert, Stack, Cluster, Grid, Container, Field, Form, FormActions, Label, Hint, FieldError, Input, Textarea, Select, Checkbox, Radio, TimeInput, DateTimeInput, SkipLink, ThemeToggle, } from './primitives';
|
|
1
|
+
export { Button, ButtonLink, Badge, Chip, Card, Alert, AlertTitle, AlertBody, Banner, Stack, Cluster, Grid, Inset, Container, Centre, VisuallyHidden, Field, Form, FormActions, Label, Hint, FieldError, Input, Textarea, Select, Switch, CopyButton, Checkbox, Radio, Slider, TimeInput, DateTimeInput, InputGroup, SkipLink, ThemeToggle, Segmented, NumberStepper, Topbar, PageHeader, } from './primitives';
|
|
2
2
|
export { Combobox } from './combobox';
|
|
3
3
|
export type { ComboboxOption } from './combobox';
|
|
4
4
|
export { DatePicker, DateRangePicker } from './date-picker';
|
|
5
5
|
export { Homepage, Landing, ContactForm } from './pages';
|
|
6
|
+
export { Modal } from './modal';
|
|
7
|
+
export { Popover } from './popover';
|
|
8
|
+
export type { PopoverPlacement, PopoverCloseReason } from './popover';
|
|
9
|
+
export { Stat, StatComparison, StatGrid, StatCard, StatCards } from './stat';
|
|
10
|
+
export type { StatSize, StatChrome } from './stat';
|
|
6
11
|
export { cn } from './cn';
|
|
12
|
+
export { BwDescriptionList, BwDescriptionTerm, BwDescriptionDetails } from './primitives';
|
|
7
13
|
export * as tokens from '@bwui/tokens';
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
export { Button, ButtonLink, Badge, Card, Alert, Stack, Cluster, Grid, Container, Field, Form, FormActions, Label, Hint, FieldError, Input, Textarea, Select, Checkbox, Radio, TimeInput, DateTimeInput, SkipLink, ThemeToggle, } from './primitives';
|
|
1
|
+
export { Button, ButtonLink, Badge, Chip, Card, Alert, AlertTitle, AlertBody, Banner, Stack, Cluster, Grid, Inset, Container, Centre, VisuallyHidden, Field, Form, FormActions, Label, Hint, FieldError, Input, Textarea, Select, Switch, CopyButton, Checkbox, Radio, Slider, TimeInput, DateTimeInput, InputGroup, SkipLink, ThemeToggle, Segmented, NumberStepper, Topbar, PageHeader, } from './primitives';
|
|
2
2
|
export { Combobox } from './combobox';
|
|
3
3
|
export { DatePicker, DateRangePicker } from './date-picker';
|
|
4
4
|
export { Homepage, Landing, ContactForm } from './pages';
|
|
5
|
+
export { Modal } from './modal';
|
|
6
|
+
export { Popover } from './popover';
|
|
7
|
+
export { Stat, StatComparison, StatGrid, StatCard, StatCards } from './stat';
|
|
5
8
|
export { cn } from './cn';
|
|
9
|
+
export { BwDescriptionList, BwDescriptionTerm, BwDescriptionDetails } from './primitives';
|
|
6
10
|
export * as tokens from '@bwui/tokens';
|
package/dist/modal.d.ts
ADDED
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
type ModalSize = 'sm' | 'md' | 'lg' | 'full';
|
|
3
|
+
type HeaderRecipe = 'plain' | 'muted' | 'bordered';
|
|
4
|
+
type FooterRecipe = 'plain' | 'muted' | 'actions';
|
|
5
|
+
export declare const Modal: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
6
|
+
open: {
|
|
7
|
+
type: BooleanConstructor;
|
|
8
|
+
default: boolean;
|
|
9
|
+
};
|
|
10
|
+
title: {
|
|
11
|
+
type: StringConstructor;
|
|
12
|
+
required: true;
|
|
13
|
+
};
|
|
14
|
+
closeLabel: {
|
|
15
|
+
type: StringConstructor;
|
|
16
|
+
required: true;
|
|
17
|
+
};
|
|
18
|
+
size: {
|
|
19
|
+
type: PropType<ModalSize>;
|
|
20
|
+
default: string;
|
|
21
|
+
};
|
|
22
|
+
backdropDismiss: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
headerRecipe: {
|
|
27
|
+
type: PropType<HeaderRecipe>;
|
|
28
|
+
default: string;
|
|
29
|
+
};
|
|
30
|
+
footerRecipe: {
|
|
31
|
+
type: PropType<FooterRecipe>;
|
|
32
|
+
default: string;
|
|
33
|
+
};
|
|
34
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
35
|
+
[key: string]: any;
|
|
36
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:open" | "openChange")[], "update:open" | "openChange", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
37
|
+
open: {
|
|
38
|
+
type: BooleanConstructor;
|
|
39
|
+
default: boolean;
|
|
40
|
+
};
|
|
41
|
+
title: {
|
|
42
|
+
type: StringConstructor;
|
|
43
|
+
required: true;
|
|
44
|
+
};
|
|
45
|
+
closeLabel: {
|
|
46
|
+
type: StringConstructor;
|
|
47
|
+
required: true;
|
|
48
|
+
};
|
|
49
|
+
size: {
|
|
50
|
+
type: PropType<ModalSize>;
|
|
51
|
+
default: string;
|
|
52
|
+
};
|
|
53
|
+
backdropDismiss: {
|
|
54
|
+
type: BooleanConstructor;
|
|
55
|
+
default: boolean;
|
|
56
|
+
};
|
|
57
|
+
headerRecipe: {
|
|
58
|
+
type: PropType<HeaderRecipe>;
|
|
59
|
+
default: string;
|
|
60
|
+
};
|
|
61
|
+
footerRecipe: {
|
|
62
|
+
type: PropType<FooterRecipe>;
|
|
63
|
+
default: string;
|
|
64
|
+
};
|
|
65
|
+
}>> & Readonly<{
|
|
66
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
67
|
+
onOpenChange?: ((...args: any[]) => any) | undefined;
|
|
68
|
+
}>, {
|
|
69
|
+
size: ModalSize;
|
|
70
|
+
open: boolean;
|
|
71
|
+
backdropDismiss: boolean;
|
|
72
|
+
headerRecipe: HeaderRecipe;
|
|
73
|
+
footerRecipe: FooterRecipe;
|
|
74
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
75
|
+
export {};
|
package/dist/modal.js
ADDED
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
import { defineComponent, h, onBeforeUnmount, watch } from 'vue';
|
|
2
|
+
import { cn } from './cn';
|
|
3
|
+
const FOCUSABLE = 'a[href],button:not([disabled]),textarea:not([disabled]),input:not([disabled]),select:not([disabled]),[tabindex]:not([tabindex="-1"])';
|
|
4
|
+
export const Modal = defineComponent({
|
|
5
|
+
name: 'BwModal',
|
|
6
|
+
props: {
|
|
7
|
+
open: { type: Boolean, default: false },
|
|
8
|
+
title: { type: String, required: true },
|
|
9
|
+
closeLabel: { type: String, required: true },
|
|
10
|
+
size: { type: String, default: 'md' },
|
|
11
|
+
backdropDismiss: { type: Boolean, default: true },
|
|
12
|
+
headerRecipe: { type: String, default: 'plain' },
|
|
13
|
+
footerRecipe: { type: String, default: 'plain' },
|
|
14
|
+
},
|
|
15
|
+
emits: ['update:open', 'openChange'],
|
|
16
|
+
setup(props, { slots, attrs, emit }) {
|
|
17
|
+
let previouslyFocused = null;
|
|
18
|
+
let prevOverflow = '';
|
|
19
|
+
let panelEl = null;
|
|
20
|
+
const close = () => {
|
|
21
|
+
emit('update:open', false);
|
|
22
|
+
emit('openChange', false);
|
|
23
|
+
};
|
|
24
|
+
const onKey = (e) => {
|
|
25
|
+
if (!props.open)
|
|
26
|
+
return;
|
|
27
|
+
if (e.key === 'Escape') {
|
|
28
|
+
e.preventDefault();
|
|
29
|
+
close();
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
if (e.key !== 'Tab' || !panelEl)
|
|
33
|
+
return;
|
|
34
|
+
const nodes = Array.from(panelEl.querySelectorAll(FOCUSABLE)).filter((el) => el.tabIndex !== -1);
|
|
35
|
+
if (nodes.length === 0) {
|
|
36
|
+
e.preventDefault();
|
|
37
|
+
panelEl.focus();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const first = nodes[0];
|
|
41
|
+
const last = nodes[nodes.length - 1];
|
|
42
|
+
if (e.shiftKey && document.activeElement === first) {
|
|
43
|
+
e.preventDefault();
|
|
44
|
+
last.focus();
|
|
45
|
+
}
|
|
46
|
+
else if (!e.shiftKey && document.activeElement === last) {
|
|
47
|
+
e.preventDefault();
|
|
48
|
+
first.focus();
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
watch(() => props.open, (open) => {
|
|
52
|
+
if (open) {
|
|
53
|
+
previouslyFocused =
|
|
54
|
+
document.activeElement instanceof HTMLElement ? document.activeElement : null;
|
|
55
|
+
prevOverflow = document.body.style.overflow;
|
|
56
|
+
document.body.style.overflow = 'hidden';
|
|
57
|
+
document.addEventListener('keydown', onKey);
|
|
58
|
+
requestAnimationFrame(() => {
|
|
59
|
+
const autofocus = panelEl?.querySelector('[data-bw-autofocus]');
|
|
60
|
+
const nodes = panelEl
|
|
61
|
+
? Array.from(panelEl.querySelectorAll(FOCUSABLE))
|
|
62
|
+
: [];
|
|
63
|
+
(autofocus || nodes[0] || panelEl)?.focus();
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
document.removeEventListener('keydown', onKey);
|
|
68
|
+
document.body.style.overflow = prevOverflow;
|
|
69
|
+
previouslyFocused?.focus?.();
|
|
70
|
+
previouslyFocused = null;
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
onBeforeUnmount(() => {
|
|
74
|
+
document.removeEventListener('keydown', onKey);
|
|
75
|
+
document.body.style.overflow = prevOverflow;
|
|
76
|
+
});
|
|
77
|
+
return () => {
|
|
78
|
+
const headerExtra = props.headerRecipe !== 'plain' ? ` bw-modal--header-${props.headerRecipe}` : '';
|
|
79
|
+
const footerExtra = props.footerRecipe !== 'plain' ? ` bw-modal--footer-${props.footerRecipe}` : '';
|
|
80
|
+
const headerMod = props.headerRecipe !== 'plain' ? ` bw-modal__header--${props.headerRecipe}` : '';
|
|
81
|
+
const footerMod = props.footerRecipe !== 'plain' ? ` bw-modal__footer--${props.footerRecipe}` : '';
|
|
82
|
+
const titleId = 'bw-modal-title';
|
|
83
|
+
return h('div', {
|
|
84
|
+
...attrs,
|
|
85
|
+
class: cn('bw-modal', `bw-modal--size-${props.size}`, props.open && 'bw-modal--open', headerExtra.trim(), footerExtra.trim(), String(attrs.class || '')),
|
|
86
|
+
role: 'presentation',
|
|
87
|
+
...(props.open ? { 'data-bw-open': '' } : {}),
|
|
88
|
+
}, [
|
|
89
|
+
h('div', {
|
|
90
|
+
class: 'bw-modal__scrim',
|
|
91
|
+
'aria-hidden': 'true',
|
|
92
|
+
onClick: () => {
|
|
93
|
+
if (props.backdropDismiss)
|
|
94
|
+
close();
|
|
95
|
+
},
|
|
96
|
+
}),
|
|
97
|
+
h('div', {
|
|
98
|
+
class: 'bw-modal__panel',
|
|
99
|
+
role: 'dialog',
|
|
100
|
+
'aria-modal': 'true',
|
|
101
|
+
'aria-labelledby': titleId,
|
|
102
|
+
tabindex: -1,
|
|
103
|
+
ref: (el) => {
|
|
104
|
+
panelEl = el ?? null;
|
|
105
|
+
},
|
|
106
|
+
}, [
|
|
107
|
+
h('header', { class: `bw-modal__header${headerMod}` }, [
|
|
108
|
+
h('h2', { class: 'bw-modal__title', id: titleId }, props.title),
|
|
109
|
+
h('button', {
|
|
110
|
+
type: 'button',
|
|
111
|
+
class: 'bw-modal__close bw-btn bw-btn--ghost bw-btn--size-sm bw-btn--icon-only',
|
|
112
|
+
'aria-label': props.closeLabel,
|
|
113
|
+
onClick: close,
|
|
114
|
+
}, [h('span', { 'aria-hidden': 'true' }, '×')]),
|
|
115
|
+
]),
|
|
116
|
+
h('div', { class: 'bw-modal__body' }, slots.default?.()),
|
|
117
|
+
slots.footer
|
|
118
|
+
? h('footer', { class: `bw-modal__footer${footerMod}` }, slots.footer())
|
|
119
|
+
: null,
|
|
120
|
+
]),
|
|
121
|
+
]);
|
|
122
|
+
};
|
|
123
|
+
},
|
|
124
|
+
});
|
package/dist/pages.d.ts
CHANGED
|
@@ -30,8 +30,8 @@ export declare const Homepage: import("vue").DefineComponent<import("vue").Extra
|
|
|
30
30
|
};
|
|
31
31
|
}>> & Readonly<{}>, {
|
|
32
32
|
title: string;
|
|
33
|
-
brand: string;
|
|
34
33
|
description: string;
|
|
34
|
+
brand: string;
|
|
35
35
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
36
36
|
export declare const Landing: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
37
37
|
brand: {
|
|
@@ -63,8 +63,8 @@ export declare const Landing: import("vue").DefineComponent<import("vue").Extrac
|
|
|
63
63
|
};
|
|
64
64
|
}>> & Readonly<{}>, {
|
|
65
65
|
title: string;
|
|
66
|
-
brand: string;
|
|
67
66
|
description: string;
|
|
67
|
+
brand: string;
|
|
68
68
|
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
69
69
|
export declare const ContactForm: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
70
70
|
topics: {
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { type PropType } from 'vue';
|
|
2
|
+
export type PopoverPlacement = 'top' | 'bottom' | 'start' | 'end';
|
|
3
|
+
export type PopoverCloseReason = 'escape' | 'outside' | 'close-button' | 'trigger' | 'programmatic';
|
|
4
|
+
type PopoverTriggerVariant = 'primary' | 'secondary' | 'ghost' | 'danger';
|
|
5
|
+
type PopoverTriggerSize = 'xs' | 'sm' | 'md' | 'lg' | 'xl';
|
|
6
|
+
/**
|
|
7
|
+
* Popover (docs/components/popover.md). Slots: `trigger`, the default (body)
|
|
8
|
+
* and `footer`. `v-model:open` carries the state (or leave it unbound for an
|
|
9
|
+
* uncontrolled popover). Escape with focus on the trigger or in the panel, and
|
|
10
|
+
* a press outside, close it; every close returns focus to the trigger only if
|
|
11
|
+
* it was inside the panel or on the trigger (POP-035). The panel needs a name:
|
|
12
|
+
* pass `title` or `aria-label` (POP-051).
|
|
13
|
+
*/
|
|
14
|
+
export declare const Popover: import("vue").DefineComponent<import("vue").ExtractPropTypes<{
|
|
15
|
+
id: StringConstructor;
|
|
16
|
+
placement: {
|
|
17
|
+
type: PropType<PopoverPlacement>;
|
|
18
|
+
default: string;
|
|
19
|
+
};
|
|
20
|
+
title: StringConstructor;
|
|
21
|
+
ariaLabel: StringConstructor;
|
|
22
|
+
closable: {
|
|
23
|
+
type: BooleanConstructor;
|
|
24
|
+
default: boolean;
|
|
25
|
+
};
|
|
26
|
+
closeLabel: {
|
|
27
|
+
type: StringConstructor;
|
|
28
|
+
default: undefined;
|
|
29
|
+
validator(value: unknown, props: {
|
|
30
|
+
closable?: boolean;
|
|
31
|
+
}): boolean;
|
|
32
|
+
};
|
|
33
|
+
triggerVariant: {
|
|
34
|
+
type: PropType<PopoverTriggerVariant>;
|
|
35
|
+
default: string;
|
|
36
|
+
};
|
|
37
|
+
triggerSize: {
|
|
38
|
+
type: PropType<PopoverTriggerSize>;
|
|
39
|
+
default: string;
|
|
40
|
+
};
|
|
41
|
+
triggerLabel: StringConstructor;
|
|
42
|
+
open: {
|
|
43
|
+
type: BooleanConstructor;
|
|
44
|
+
default: undefined;
|
|
45
|
+
};
|
|
46
|
+
defaultOpen: {
|
|
47
|
+
type: BooleanConstructor;
|
|
48
|
+
default: boolean;
|
|
49
|
+
};
|
|
50
|
+
}>, () => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
51
|
+
[key: string]: any;
|
|
52
|
+
}>, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:open" | "open-change")[], "update:open" | "open-change", import("vue").PublicProps, Readonly<import("vue").ExtractPropTypes<{
|
|
53
|
+
id: StringConstructor;
|
|
54
|
+
placement: {
|
|
55
|
+
type: PropType<PopoverPlacement>;
|
|
56
|
+
default: string;
|
|
57
|
+
};
|
|
58
|
+
title: StringConstructor;
|
|
59
|
+
ariaLabel: StringConstructor;
|
|
60
|
+
closable: {
|
|
61
|
+
type: BooleanConstructor;
|
|
62
|
+
default: boolean;
|
|
63
|
+
};
|
|
64
|
+
closeLabel: {
|
|
65
|
+
type: StringConstructor;
|
|
66
|
+
default: undefined;
|
|
67
|
+
validator(value: unknown, props: {
|
|
68
|
+
closable?: boolean;
|
|
69
|
+
}): boolean;
|
|
70
|
+
};
|
|
71
|
+
triggerVariant: {
|
|
72
|
+
type: PropType<PopoverTriggerVariant>;
|
|
73
|
+
default: string;
|
|
74
|
+
};
|
|
75
|
+
triggerSize: {
|
|
76
|
+
type: PropType<PopoverTriggerSize>;
|
|
77
|
+
default: string;
|
|
78
|
+
};
|
|
79
|
+
triggerLabel: StringConstructor;
|
|
80
|
+
open: {
|
|
81
|
+
type: BooleanConstructor;
|
|
82
|
+
default: undefined;
|
|
83
|
+
};
|
|
84
|
+
defaultOpen: {
|
|
85
|
+
type: BooleanConstructor;
|
|
86
|
+
default: boolean;
|
|
87
|
+
};
|
|
88
|
+
}>> & Readonly<{
|
|
89
|
+
"onUpdate:open"?: ((...args: any[]) => any) | undefined;
|
|
90
|
+
"onOpen-change"?: ((...args: any[]) => any) | undefined;
|
|
91
|
+
}>, {
|
|
92
|
+
open: boolean;
|
|
93
|
+
closeLabel: string;
|
|
94
|
+
placement: PopoverPlacement;
|
|
95
|
+
closable: boolean;
|
|
96
|
+
triggerVariant: PopoverTriggerVariant;
|
|
97
|
+
triggerSize: PopoverTriggerSize;
|
|
98
|
+
defaultOpen: boolean;
|
|
99
|
+
}, {}, {}, {}, string, import("vue").ComponentProvideOptions, true, {}, any>;
|
|
100
|
+
export {};
|