@awc-ui/vue 1.0.0-beta.1 → 1.0.0-beta.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/README.md +62 -17
- package/dist/components.d.ts +81 -81
- package/dist/components.d.ts.map +1 -1
- package/dist/components.js +28 -14
- package/dist/components.js.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +551 -463
- package/dist/index.mjs.map +4 -4
- package/dist/runtime.d.ts +17 -0
- package/dist/runtime.d.ts.map +1 -0
- package/dist/runtime.js +178 -0
- package/dist/runtime.js.map +1 -0
- package/lib/components.ts +54 -27
- package/lib/index.ts +4 -1
- package/lib/runtime.ts +220 -0
- package/package.json +27 -6
package/dist/runtime.js
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
// Hand-owned Vue adapter. Generated proxies import this through withVueRuntime.
|
|
2
|
+
// @ts-nocheck
|
|
3
|
+
// It's easier and safer for Volar to disable typechecking and let the return type inference do its job.
|
|
4
|
+
import { defineComponent, getCurrentInstance, h, inject, ref } from 'vue';
|
|
5
|
+
const UPDATE_VALUE_EVENT = 'update:modelValue';
|
|
6
|
+
const MODEL_VALUE = 'modelValue';
|
|
7
|
+
const ROUTER_LINK_VALUE = 'routerLink';
|
|
8
|
+
const NAV_MANAGER = 'navManager';
|
|
9
|
+
const ROUTER_PROP_PREFIX = 'router';
|
|
10
|
+
const ARIA_PROP_PREFIX = 'aria';
|
|
11
|
+
/**
|
|
12
|
+
* Starting in Vue 3.1.0, all properties are
|
|
13
|
+
* added as keys to the props object, even if
|
|
14
|
+
* they are not being used. In order to correctly
|
|
15
|
+
* account for both value props and v-model props,
|
|
16
|
+
* we need to check if the key exists for Vue <3.1.0
|
|
17
|
+
* and then check if it is not undefined for Vue >= 3.1.0.
|
|
18
|
+
* See https://github.com/vuejs/vue-next/issues/3889
|
|
19
|
+
*/
|
|
20
|
+
const EMPTY_PROP = Symbol();
|
|
21
|
+
const DEFAULT_EMPTY_PROP = { default: EMPTY_PROP };
|
|
22
|
+
const getComponentClasses = (classes) => {
|
|
23
|
+
return classes?.split(' ') || [];
|
|
24
|
+
};
|
|
25
|
+
const getElementClasses = (ref, componentClasses, defaultClasses = []) => {
|
|
26
|
+
return [...Array.from(ref.value?.classList || []), ...defaultClasses].filter((c, i, self) => !componentClasses.has(c) && self.indexOf(c) === i);
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Create a callback to define a Vue component wrapper around a Web Component.
|
|
30
|
+
*
|
|
31
|
+
* @prop name - The component tag name (i.e. `ion-button`)
|
|
32
|
+
* @prop componentProps - An array of properties on the
|
|
33
|
+
* component. These usually match up with the @Prop definitions
|
|
34
|
+
* in each component's TSX file.
|
|
35
|
+
* @prop customElement - An option custom element instance to pass
|
|
36
|
+
* to customElements.define. Only set if `includeImportCustomElements: true` in your config.
|
|
37
|
+
* @prop modelProp - The prop that v-model binds to (i.e. value)
|
|
38
|
+
* @prop modelUpdateEvent - The event that is fired from your Web Component when the value changes (i.e. ionChange)
|
|
39
|
+
*/
|
|
40
|
+
export const defineContainer = (name, defineCustomElement, componentProps = [], modelProp, modelUpdateEvent) => {
|
|
41
|
+
/**
|
|
42
|
+
* Create a Vue component wrapper around a Web Component.
|
|
43
|
+
* Note: The `props` here are not all properties on a component.
|
|
44
|
+
* They refer to whatever properties are set on an instance of a component.
|
|
45
|
+
*/
|
|
46
|
+
if (defineCustomElement !== undefined) {
|
|
47
|
+
defineCustomElement();
|
|
48
|
+
}
|
|
49
|
+
// Stencil includes both props and events in this array. AWC custom events
|
|
50
|
+
// consistently use the mdXxx prefix; ordinary component props do not.
|
|
51
|
+
const eventNames = componentProps.filter((name) => /^md[A-Z]/.test(name));
|
|
52
|
+
const propertyNames = componentProps.filter((name) => !eventNames.includes(name));
|
|
53
|
+
const Container = defineComponent((props, { attrs, slots, emit }) => {
|
|
54
|
+
let modelPropValue = props[modelProp];
|
|
55
|
+
const containerRef = ref();
|
|
56
|
+
const classes = new Set(getComponentClasses(attrs.class));
|
|
57
|
+
const currentInstance = getCurrentInstance();
|
|
58
|
+
const hasRouter = currentInstance?.appContext?.provides[NAV_MANAGER];
|
|
59
|
+
const navManager = hasRouter ? inject(NAV_MANAGER) : undefined;
|
|
60
|
+
const handleRouterLink = (ev) => {
|
|
61
|
+
const { routerLink } = props;
|
|
62
|
+
if (routerLink === EMPTY_PROP)
|
|
63
|
+
return;
|
|
64
|
+
if (navManager !== undefined) {
|
|
65
|
+
/**
|
|
66
|
+
* This prevents the browser from
|
|
67
|
+
* performing a page reload when pressing
|
|
68
|
+
* an Ionic component with routerLink.
|
|
69
|
+
* The page reload interferes with routing
|
|
70
|
+
* and causes ion-back-button to disappear
|
|
71
|
+
* since the local history is wiped on reload.
|
|
72
|
+
*/
|
|
73
|
+
ev.preventDefault();
|
|
74
|
+
let navigationPayload = { event: ev };
|
|
75
|
+
for (const key in props) {
|
|
76
|
+
const value = props[key];
|
|
77
|
+
if (props.hasOwnProperty(key) && key.startsWith(ROUTER_PROP_PREFIX) && value !== EMPTY_PROP) {
|
|
78
|
+
navigationPayload[key] = value;
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
navManager.navigate(navigationPayload);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
console.warn('Tried to navigate, but no router was found. Make sure you have mounted Vue Router.');
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
return () => {
|
|
88
|
+
modelPropValue = props[modelProp];
|
|
89
|
+
getComponentClasses(attrs.class).forEach((value) => {
|
|
90
|
+
classes.add(value);
|
|
91
|
+
});
|
|
92
|
+
const oldClick = props.onClick;
|
|
93
|
+
const handleClick = (ev) => {
|
|
94
|
+
if (oldClick !== undefined) {
|
|
95
|
+
oldClick(ev);
|
|
96
|
+
}
|
|
97
|
+
if (!ev.defaultPrevented) {
|
|
98
|
+
handleRouterLink(ev);
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
let propsToAdd = {
|
|
102
|
+
ref: containerRef,
|
|
103
|
+
class: getElementClasses(containerRef, classes),
|
|
104
|
+
onClick: handleClick,
|
|
105
|
+
};
|
|
106
|
+
/**
|
|
107
|
+
* We can use Object.entries here
|
|
108
|
+
* to avoid the hasOwnProperty check,
|
|
109
|
+
* but that would require 2 iterations
|
|
110
|
+
* where as this only requires 1.
|
|
111
|
+
*/
|
|
112
|
+
for (const key in props) {
|
|
113
|
+
const value = props[key];
|
|
114
|
+
if ((props.hasOwnProperty(key) && value !== EMPTY_PROP) || key.startsWith(ARIA_PROP_PREFIX)) {
|
|
115
|
+
propsToAdd[key] = value;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
if (modelProp) {
|
|
119
|
+
/**
|
|
120
|
+
* If form value property was set using v-model
|
|
121
|
+
* then we should use that value.
|
|
122
|
+
* Otherwise, check to see if form value property
|
|
123
|
+
* was set as a static value (i.e. no v-model).
|
|
124
|
+
*/
|
|
125
|
+
if (props[MODEL_VALUE] !== EMPTY_PROP) {
|
|
126
|
+
propsToAdd = {
|
|
127
|
+
...propsToAdd,
|
|
128
|
+
...(name === 'md-radio'
|
|
129
|
+
? { checked: props[MODEL_VALUE] != null && Object.is(props[MODEL_VALUE], props.value) }
|
|
130
|
+
: { [modelProp]: props[MODEL_VALUE] }),
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
else if (modelPropValue !== EMPTY_PROP) {
|
|
134
|
+
propsToAdd = {
|
|
135
|
+
...propsToAdd,
|
|
136
|
+
[modelProp]: modelPropValue,
|
|
137
|
+
};
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
// If router link is defined, add href to props
|
|
141
|
+
// in order to properly render an anchor tag inside
|
|
142
|
+
// of components that should become activatable and
|
|
143
|
+
// focusable with router link.
|
|
144
|
+
if (props[ROUTER_LINK_VALUE] !== EMPTY_PROP) {
|
|
145
|
+
propsToAdd = {
|
|
146
|
+
...propsToAdd,
|
|
147
|
+
href: props[ROUTER_LINK_VALUE],
|
|
148
|
+
};
|
|
149
|
+
}
|
|
150
|
+
for (const eventName of eventNames) {
|
|
151
|
+
// Vue's onMdInput DOM fallback listens for md-input. The on: prefix
|
|
152
|
+
// preserves the actual case-sensitive CustomEvent name instead.
|
|
153
|
+
propsToAdd[`on:${eventName}`] = (event) => {
|
|
154
|
+
if (modelProp && eventName === modelUpdateEvent && event.target === event.currentTarget && (name !== 'md-radio' || event.target.checked)) {
|
|
155
|
+
emit(UPDATE_VALUE_EVENT, event.target[modelProp]);
|
|
156
|
+
}
|
|
157
|
+
emit(eventName, event);
|
|
158
|
+
};
|
|
159
|
+
}
|
|
160
|
+
return h(name, propsToAdd, slots.default && slots.default());
|
|
161
|
+
};
|
|
162
|
+
});
|
|
163
|
+
if (typeof Container !== 'function') {
|
|
164
|
+
Container.name = name;
|
|
165
|
+
Container.props = {
|
|
166
|
+
[ROUTER_LINK_VALUE]: DEFAULT_EMPTY_PROP,
|
|
167
|
+
};
|
|
168
|
+
propertyNames.forEach((componentProp) => {
|
|
169
|
+
Container.props[componentProp] = DEFAULT_EMPTY_PROP;
|
|
170
|
+
});
|
|
171
|
+
Container.emits = [...eventNames, ...(modelProp ? [UPDATE_VALUE_EVENT] : [])];
|
|
172
|
+
if (modelProp) {
|
|
173
|
+
Container.props[MODEL_VALUE] = DEFAULT_EMPTY_PROP;
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
return Container;
|
|
177
|
+
};
|
|
178
|
+
//# sourceMappingURL=runtime.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../lib/runtime.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,cAAc;AACd,wGAAwG;AACxG,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,CAAC,EAAE,MAAM,EAAE,GAAG,EAAO,MAAM,KAAK,CAAC;AAM/E,MAAM,kB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AC,EAAE,CAAC;wBAClJ,IAAI,CAAC,kBAAkB,EAAG,KAAK,CAAC,MAAc,CAAC,SAAS,CAAC,CAAC,CAAC;oBAC7D,CAAC;oBACD,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC;gBACzB,CAAC,CAAC;YACJ,CAAC;YACD,OAAO,CAAC,CAAC,IAAI,EAAE,UAAU,EAAE,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAC/D,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;IAEH,IAAI,OAAO,SAAS,KAAK,UAAU,EAAE,CAAC;QACpC,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC;QAEtB,SAAS,CAAC,KAAK,GAAG;YAChB,CAAC,iBAAiB,CAAC,EAAE,kBAAkB;SACxC,CAAC;QAEF,aAAa,CAAC,OAAO,CAAC,CAAC,aAAa,EAAE,EAAE;YACtC,SAAS,CAAC,KAAK,CAAC,aAAa,CAAC,GAAG,kBAAkB,CAAC;QACtD,CAAC,CAAC,CAAC;QAEH,SAAS,CAAC,KAAK,GAAG,CAAC,GAAG,UAAU,EAAE,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAE9E,IAAI,SAAS,EAAE,CAAC;YACd,SAAS,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,kBAAkB,CAAC;QAEpD,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC"}
|
package/lib/components.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/* eslint-disable */
|
|
2
2
|
/* tslint:disable */
|
|
3
3
|
/* auto-generated vue proxies */
|
|
4
|
-
import { defineContainer } from './
|
|
4
|
+
import { defineContainer } from './runtime.js';
|
|
5
5
|
|
|
6
6
|
import type { JSX } from '@awc-ui/core/dist/components';
|
|
7
7
|
|
|
@@ -199,7 +199,7 @@ export const MdAreaChart = /*@__PURE__*/ defineContainer<JSX.MdAreaChart>('md-ar
|
|
|
199
199
|
]);
|
|
200
200
|
|
|
201
201
|
|
|
202
|
-
export const MdAutocomplete = /*@__PURE__*/ defineContainer<JSX.MdAutocomplete>('md-autocomplete', defineMdAutocomplete, [
|
|
202
|
+
export const MdAutocomplete = /*@__PURE__*/ defineContainer<JSX.MdAutocomplete, JSX.MdAutocomplete["value"]>('md-autocomplete', defineMdAutocomplete, [
|
|
203
203
|
'valueMissingLabel',
|
|
204
204
|
'reserveSupportingSpace',
|
|
205
205
|
'variant',
|
|
@@ -245,7 +245,8 @@ export const MdAutocomplete = /*@__PURE__*/ defineContainer<JSX.MdAutocomplete>(
|
|
|
245
245
|
'mdClose',
|
|
246
246
|
'mdClear',
|
|
247
247
|
'mdValidityChange'
|
|
248
|
-
]
|
|
248
|
+
],
|
|
249
|
+
'value', 'mdInput');
|
|
249
250
|
|
|
250
251
|
|
|
251
252
|
export const MdAvatar = /*@__PURE__*/ defineContainer<JSX.MdAvatar>('md-avatar', defineMdAvatar, [
|
|
@@ -270,6 +271,7 @@ export const MdBadge = /*@__PURE__*/ defineContainer<JSX.MdBadge>('md-badge', de
|
|
|
270
271
|
'value',
|
|
271
272
|
'max',
|
|
272
273
|
'icon',
|
|
274
|
+
'shape',
|
|
273
275
|
'density'
|
|
274
276
|
]);
|
|
275
277
|
|
|
@@ -427,7 +429,7 @@ export const MdCard = /*@__PURE__*/ defineContainer<JSX.MdCard>('md-card', defin
|
|
|
427
429
|
]);
|
|
428
430
|
|
|
429
431
|
|
|
430
|
-
export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox>('md-checkbox', defineMdCheckbox, [
|
|
432
|
+
export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox, JSX.MdCheckbox["checked"]>('md-checkbox', defineMdCheckbox, [
|
|
431
433
|
'valueMissingLabel',
|
|
432
434
|
'error',
|
|
433
435
|
'errorText',
|
|
@@ -442,7 +444,8 @@ export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox>('md-chec
|
|
|
442
444
|
'density',
|
|
443
445
|
'mdChange',
|
|
444
446
|
'mdValidityChange'
|
|
445
|
-
]
|
|
447
|
+
],
|
|
448
|
+
'checked', 'mdChange');
|
|
446
449
|
|
|
447
450
|
|
|
448
451
|
export const MdChip = /*@__PURE__*/ defineContainer<JSX.MdChip>('md-chip', defineMdChip, [
|
|
@@ -458,6 +461,7 @@ export const MdChip = /*@__PURE__*/ defineContainer<JSX.MdChip>('md-chip', defin
|
|
|
458
461
|
'softDisabled',
|
|
459
462
|
'removable',
|
|
460
463
|
'label',
|
|
464
|
+
'contentAlign',
|
|
461
465
|
'density',
|
|
462
466
|
'mdClick',
|
|
463
467
|
'mdSelect',
|
|
@@ -466,6 +470,7 @@ export const MdChip = /*@__PURE__*/ defineContainer<JSX.MdChip>('md-chip', defin
|
|
|
466
470
|
|
|
467
471
|
|
|
468
472
|
export const MdColorPicker = /*@__PURE__*/ defineContainer<JSX.MdColorPicker>('md-color-picker', defineMdColorPicker, [
|
|
473
|
+
'locale',
|
|
469
474
|
'variant',
|
|
470
475
|
'value',
|
|
471
476
|
'format',
|
|
@@ -484,7 +489,7 @@ export const MdColorPicker = /*@__PURE__*/ defineContainer<JSX.MdColorPicker>('m
|
|
|
484
489
|
]);
|
|
485
490
|
|
|
486
491
|
|
|
487
|
-
export const MdDatePicker = /*@__PURE__*/ defineContainer<JSX.MdDatePicker>('md-date-picker', defineMdDatePicker, [
|
|
492
|
+
export const MdDatePicker = /*@__PURE__*/ defineContainer<JSX.MdDatePicker, JSX.MdDatePicker["value"]>('md-date-picker', defineMdDatePicker, [
|
|
488
493
|
'valueMissingLabel',
|
|
489
494
|
'reserveSupportingSpace',
|
|
490
495
|
'variant',
|
|
@@ -542,7 +547,8 @@ export const MdDatePicker = /*@__PURE__*/ defineContainer<JSX.MdDatePicker>('md-
|
|
|
542
547
|
'mdMenuSelect',
|
|
543
548
|
'mdModeChange',
|
|
544
549
|
'mdValidityChange'
|
|
545
|
-
]
|
|
550
|
+
],
|
|
551
|
+
'value', 'mdChange');
|
|
546
552
|
|
|
547
553
|
|
|
548
554
|
export const MdDialog = /*@__PURE__*/ defineContainer<JSX.MdDialog>('md-dialog', defineMdDialog, [
|
|
@@ -814,7 +820,7 @@ export const MdMeter = /*@__PURE__*/ defineContainer<JSX.MdMeter>('md-meter', de
|
|
|
814
820
|
]);
|
|
815
821
|
|
|
816
822
|
|
|
817
|
-
export const MdMultiSelect = /*@__PURE__*/ defineContainer<JSX.MdMultiSelect>('md-multi-select', defineMdMultiSelect, [
|
|
823
|
+
export const MdMultiSelect = /*@__PURE__*/ defineContainer<JSX.MdMultiSelect, JSX.MdMultiSelect["value"]>('md-multi-select', defineMdMultiSelect, [
|
|
818
824
|
'valueMissingLabel',
|
|
819
825
|
'reserveSupportingSpace',
|
|
820
826
|
'variant',
|
|
@@ -865,7 +871,8 @@ export const MdMultiSelect = /*@__PURE__*/ defineContainer<JSX.MdMultiSelect>('m
|
|
|
865
871
|
'mdRemove',
|
|
866
872
|
'mdClear',
|
|
867
873
|
'mdValidityChange'
|
|
868
|
-
]
|
|
874
|
+
],
|
|
875
|
+
'value', 'mdChange');
|
|
869
876
|
|
|
870
877
|
|
|
871
878
|
export const MdNavigationBar = /*@__PURE__*/ defineContainer<JSX.MdNavigationBar>('md-navigation-bar', defineMdNavigationBar, [
|
|
@@ -935,7 +942,7 @@ export const MdNavigationTab = /*@__PURE__*/ defineContainer<JSX.MdNavigationTab
|
|
|
935
942
|
]);
|
|
936
943
|
|
|
937
944
|
|
|
938
|
-
export const MdNumberField = /*@__PURE__*/ defineContainer<JSX.MdNumberField>('md-number-field', defineMdNumberField, [
|
|
945
|
+
export const MdNumberField = /*@__PURE__*/ defineContainer<JSX.MdNumberField, JSX.MdNumberField["value"]>('md-number-field', defineMdNumberField, [
|
|
939
946
|
'variant',
|
|
940
947
|
'label',
|
|
941
948
|
'placeholder',
|
|
@@ -966,7 +973,8 @@ export const MdNumberField = /*@__PURE__*/ defineContainer<JSX.MdNumberField>('m
|
|
|
966
973
|
'mdInput',
|
|
967
974
|
'mdChange',
|
|
968
975
|
'mdValidityChange'
|
|
969
|
-
]
|
|
976
|
+
],
|
|
977
|
+
'value', 'mdChange');
|
|
970
978
|
|
|
971
979
|
|
|
972
980
|
export const MdOrganizationChart = /*@__PURE__*/ defineContainer<JSX.MdOrganizationChart>('md-organization-chart', defineMdOrganizationChart, [
|
|
@@ -984,7 +992,7 @@ export const MdOrganizationChart = /*@__PURE__*/ defineContainer<JSX.MdOrganizat
|
|
|
984
992
|
]);
|
|
985
993
|
|
|
986
994
|
|
|
987
|
-
export const MdOtpField = /*@__PURE__*/ defineContainer<JSX.MdOtpField>('md-otp-field', defineMdOtpField, [
|
|
995
|
+
export const MdOtpField = /*@__PURE__*/ defineContainer<JSX.MdOtpField, JSX.MdOtpField["value"]>('md-otp-field', defineMdOtpField, [
|
|
988
996
|
'length',
|
|
989
997
|
'value',
|
|
990
998
|
'validationType',
|
|
@@ -1011,7 +1019,8 @@ export const MdOtpField = /*@__PURE__*/ defineContainer<JSX.MdOtpField>('md-otp-
|
|
|
1011
1019
|
'mdComplete',
|
|
1012
1020
|
'mdInvalidInput',
|
|
1013
1021
|
'mdValidityChange'
|
|
1014
|
-
]
|
|
1022
|
+
],
|
|
1023
|
+
'value', 'mdInput');
|
|
1015
1024
|
|
|
1016
1025
|
|
|
1017
1026
|
export const MdPieChart = /*@__PURE__*/ defineContainer<JSX.MdPieChart>('md-pie-chart', defineMdPieChart, [
|
|
@@ -1073,7 +1082,7 @@ export const MdProgressIndicator = /*@__PURE__*/ defineContainer<JSX.MdProgressI
|
|
|
1073
1082
|
]);
|
|
1074
1083
|
|
|
1075
1084
|
|
|
1076
|
-
export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio>('md-radio', defineMdRadio, [
|
|
1085
|
+
export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio, JSX.MdRadio["value"]>('md-radio', defineMdRadio, [
|
|
1077
1086
|
'valueMissingLabel',
|
|
1078
1087
|
'checked',
|
|
1079
1088
|
'disabled',
|
|
@@ -1086,10 +1095,11 @@ export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio>('md-radio', de
|
|
|
1086
1095
|
'mdFocus',
|
|
1087
1096
|
'mdBlur',
|
|
1088
1097
|
'mdValidityChange'
|
|
1089
|
-
]
|
|
1098
|
+
],
|
|
1099
|
+
'value', 'mdChange');
|
|
1090
1100
|
|
|
1091
1101
|
|
|
1092
|
-
export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating>('md-rating', defineMdRating, [
|
|
1102
|
+
export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating, JSX.MdRating["value"]>('md-rating', defineMdRating, [
|
|
1093
1103
|
'value',
|
|
1094
1104
|
'defaultValue',
|
|
1095
1105
|
'max',
|
|
@@ -1109,7 +1119,8 @@ export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating>('md-rating',
|
|
|
1109
1119
|
'density',
|
|
1110
1120
|
'mdHover',
|
|
1111
1121
|
'mdChange'
|
|
1112
|
-
]
|
|
1122
|
+
],
|
|
1123
|
+
'value', 'mdChange');
|
|
1113
1124
|
|
|
1114
1125
|
|
|
1115
1126
|
export const MdRipple = /*@__PURE__*/ defineContainer<JSX.MdRipple>('md-ripple', defineMdRipple, [
|
|
@@ -1186,7 +1197,7 @@ export const MdSegmentedButtonSet = /*@__PURE__*/ defineContainer<JSX.MdSegmente
|
|
|
1186
1197
|
]);
|
|
1187
1198
|
|
|
1188
1199
|
|
|
1189
|
-
export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect>('md-select', defineMdSelect, [
|
|
1200
|
+
export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect, JSX.MdSelect["value"]>('md-select', defineMdSelect, [
|
|
1190
1201
|
'valueMissingLabel',
|
|
1191
1202
|
'reserveSupportingSpace',
|
|
1192
1203
|
'variant',
|
|
@@ -1225,7 +1236,8 @@ export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect>('md-select',
|
|
|
1225
1236
|
'mdOpen',
|
|
1226
1237
|
'mdClose',
|
|
1227
1238
|
'mdValidityChange'
|
|
1228
|
-
]
|
|
1239
|
+
],
|
|
1240
|
+
'value', 'mdChange');
|
|
1229
1241
|
|
|
1230
1242
|
|
|
1231
1243
|
export const MdSelectOption = /*@__PURE__*/ defineContainer<JSX.MdSelectOption>('md-select-option', defineMdSelectOption, [
|
|
@@ -1274,7 +1286,7 @@ export const MdSkeleton = /*@__PURE__*/ defineContainer<JSX.MdSkeleton>('md-skel
|
|
|
1274
1286
|
]);
|
|
1275
1287
|
|
|
1276
1288
|
|
|
1277
|
-
export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider>('md-slider', defineMdSlider, [
|
|
1289
|
+
export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider, JSX.MdSlider["value"]>('md-slider', defineMdSlider, [
|
|
1278
1290
|
'min',
|
|
1279
1291
|
'max',
|
|
1280
1292
|
'value',
|
|
@@ -1309,7 +1321,8 @@ export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider>('md-slider',
|
|
|
1309
1321
|
'mdBlur',
|
|
1310
1322
|
'mdDragStart',
|
|
1311
1323
|
'mdDragEnd'
|
|
1312
|
-
]
|
|
1324
|
+
],
|
|
1325
|
+
'value', 'mdChange');
|
|
1313
1326
|
|
|
1314
1327
|
|
|
1315
1328
|
export const MdSnackbar = /*@__PURE__*/ defineContainer<JSX.MdSnackbar>('md-snackbar', defineMdSnackbar, [
|
|
@@ -1376,6 +1389,8 @@ export const MdSplitButton = /*@__PURE__*/ defineContainer<JSX.MdSplitButton>('m
|
|
|
1376
1389
|
export const MdStatusDot = /*@__PURE__*/ defineContainer<JSX.MdStatusDot>('md-status-dot', defineMdStatusDot, [
|
|
1377
1390
|
'state',
|
|
1378
1391
|
'size',
|
|
1392
|
+
'inline',
|
|
1393
|
+
'shape',
|
|
1379
1394
|
'live',
|
|
1380
1395
|
'label',
|
|
1381
1396
|
'density'
|
|
@@ -1412,6 +1427,7 @@ export const MdStepper = /*@__PURE__*/ defineContainer<JSX.MdStepper>('md-steppe
|
|
|
1412
1427
|
'active',
|
|
1413
1428
|
'autoComplete',
|
|
1414
1429
|
'nav',
|
|
1430
|
+
'readonly',
|
|
1415
1431
|
'nextDisabled',
|
|
1416
1432
|
'loading',
|
|
1417
1433
|
'lazy',
|
|
@@ -1439,12 +1455,14 @@ export const MdSubMenuItem = /*@__PURE__*/ defineContainer<JSX.MdSubMenuItem>('m
|
|
|
1439
1455
|
'divider',
|
|
1440
1456
|
'gap',
|
|
1441
1457
|
'badge',
|
|
1458
|
+
'openDelay',
|
|
1459
|
+
'closeDelay',
|
|
1442
1460
|
'density',
|
|
1443
1461
|
'mdClick'
|
|
1444
1462
|
]);
|
|
1445
1463
|
|
|
1446
1464
|
|
|
1447
|
-
export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch>('md-switch', defineMdSwitch, [
|
|
1465
|
+
export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch, JSX.MdSwitch["selected"]>('md-switch', defineMdSwitch, [
|
|
1448
1466
|
'valueMissingLabel',
|
|
1449
1467
|
'selected',
|
|
1450
1468
|
'disabled',
|
|
@@ -1460,7 +1478,8 @@ export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch>('md-switch',
|
|
|
1460
1478
|
'mdInput',
|
|
1461
1479
|
'mdChange',
|
|
1462
1480
|
'mdValidityChange'
|
|
1463
|
-
]
|
|
1481
|
+
],
|
|
1482
|
+
'selected', 'mdChange');
|
|
1464
1483
|
|
|
1465
1484
|
|
|
1466
1485
|
export const MdTab = /*@__PURE__*/ defineContainer<JSX.MdTab>('md-tab', defineMdTab, [
|
|
@@ -1613,6 +1632,7 @@ export const MdTableSortLabel = /*@__PURE__*/ defineContainer<JSX.MdTableSortLab
|
|
|
1613
1632
|
'defaultOrder',
|
|
1614
1633
|
'iconPosition',
|
|
1615
1634
|
'icon',
|
|
1635
|
+
'inactiveIcon',
|
|
1616
1636
|
'active',
|
|
1617
1637
|
'order',
|
|
1618
1638
|
'density',
|
|
@@ -1634,6 +1654,7 @@ export const MdTableToolbar = /*@__PURE__*/ defineContainer<JSX.MdTableToolbar>(
|
|
|
1634
1654
|
export const MdTabs = /*@__PURE__*/ defineContainer<JSX.MdTabs>('md-tabs', defineMdTabs, [
|
|
1635
1655
|
'activeTabIndex',
|
|
1636
1656
|
'variant',
|
|
1657
|
+
'divider',
|
|
1637
1658
|
'ariaLabelProp',
|
|
1638
1659
|
'tabWidth',
|
|
1639
1660
|
'width',
|
|
@@ -1641,7 +1662,7 @@ export const MdTabs = /*@__PURE__*/ defineContainer<JSX.MdTabs>('md-tabs', defin
|
|
|
1641
1662
|
]);
|
|
1642
1663
|
|
|
1643
1664
|
|
|
1644
|
-
export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField>('md-text-field', defineMdTextField, [
|
|
1665
|
+
export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField, JSX.MdTextField["value"]>('md-text-field', defineMdTextField, [
|
|
1645
1666
|
'reserveSupportingSpace',
|
|
1646
1667
|
'variant',
|
|
1647
1668
|
'label',
|
|
@@ -1694,10 +1715,11 @@ export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField>('md-te
|
|
|
1694
1715
|
'mdPasswordToggle',
|
|
1695
1716
|
'mdSpeechResult',
|
|
1696
1717
|
'mdValidityChange'
|
|
1697
|
-
]
|
|
1718
|
+
],
|
|
1719
|
+
'value', 'mdInput');
|
|
1698
1720
|
|
|
1699
1721
|
|
|
1700
|
-
export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker>('md-time-picker', defineMdTimePicker, [
|
|
1722
|
+
export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker, JSX.MdTimePicker["value"]>('md-time-picker', defineMdTimePicker, [
|
|
1701
1723
|
'variant',
|
|
1702
1724
|
'format',
|
|
1703
1725
|
'value',
|
|
@@ -1706,6 +1728,10 @@ export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker>('md-
|
|
|
1706
1728
|
'max',
|
|
1707
1729
|
'required',
|
|
1708
1730
|
'label',
|
|
1731
|
+
'supportingText',
|
|
1732
|
+
'error',
|
|
1733
|
+
'errorText',
|
|
1734
|
+
'reserveSupportingSpace',
|
|
1709
1735
|
'headline',
|
|
1710
1736
|
'headlineInputLabel',
|
|
1711
1737
|
'headlineDialLabel',
|
|
@@ -1737,7 +1763,8 @@ export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker>('md-
|
|
|
1737
1763
|
'mdCancel',
|
|
1738
1764
|
'mdModeChange',
|
|
1739
1765
|
'mdValidityChange'
|
|
1740
|
-
]
|
|
1766
|
+
],
|
|
1767
|
+
'value', 'mdChange');
|
|
1741
1768
|
|
|
1742
1769
|
|
|
1743
1770
|
export const MdToolbar = /*@__PURE__*/ defineContainer<JSX.MdToolbar>('md-toolbar', defineMdToolbar, [
|
package/lib/index.ts
CHANGED
|
@@ -2,7 +2,10 @@ import type { App } from 'vue';
|
|
|
2
2
|
import { defineCustomElements } from '@awc-ui/core/loader';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* AwcUiVue plugin
|
|
5
|
+
* AwcUiVue compatibility plugin for lazy-loader registration.
|
|
6
|
+
* Imported component wrappers register themselves and do not require this plugin.
|
|
7
|
+
* Precompiled SFCs with raw md-* tags must also configure isCustomElement in
|
|
8
|
+
* the build-time Vue compiler; this runtime setting cannot affect Vite/Nuxt builds.
|
|
6
9
|
*
|
|
7
10
|
* Install in your Vue 3 app:
|
|
8
11
|
*
|