@awc-ui/vue 1.0.0-beta.9 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -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,kBAAkB,GAAG,mBAAmB,CAAC;AAC/C,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,iBAAiB,GAAG,YAAY,CAAC;AACvC,MAAM,WAAW,GAAG,YAAY,CAAC;AACjC,MAAM,kBAAkB,GAAG,QAAQ,CAAC;AACpC,MAAM,gBAAgB,GAAG,MAAM,CAAC;AAChC;;;;;;;;GAQG;AACH,MAAM,UAAU,GAAG,MAAM,EAAE,CAAC;AAC5B,MAAM,kBAAkB,GAAG,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC;AAMnD,MAAM,mBAAmB,GAAG,CAAC,OAAgB,EAAE,EAAE;IAC/C,OAAQ,OAAkB,EAAE,KAAK,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;AAC/C,CAAC,CAAC;AAEF,MAA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AE,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 './vue-component-lib/utils';
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, [
@@ -428,7 +429,7 @@ export const MdCard = /*@__PURE__*/ defineContainer<JSX.MdCard>('md-card', defin
428
429
  ]);
429
430
 
430
431
 
431
- export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox>('md-checkbox', defineMdCheckbox, [
432
+ export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox, JSX.MdCheckbox["checked"]>('md-checkbox', defineMdCheckbox, [
432
433
  'valueMissingLabel',
433
434
  'error',
434
435
  'errorText',
@@ -443,7 +444,8 @@ export const MdCheckbox = /*@__PURE__*/ defineContainer<JSX.MdCheckbox>('md-chec
443
444
  'density',
444
445
  'mdChange',
445
446
  'mdValidityChange'
446
- ]);
447
+ ],
448
+ 'checked', 'mdChange');
447
449
 
448
450
 
449
451
  export const MdChip = /*@__PURE__*/ defineContainer<JSX.MdChip>('md-chip', defineMdChip, [
@@ -468,6 +470,7 @@ export const MdChip = /*@__PURE__*/ defineContainer<JSX.MdChip>('md-chip', defin
468
470
 
469
471
 
470
472
  export const MdColorPicker = /*@__PURE__*/ defineContainer<JSX.MdColorPicker>('md-color-picker', defineMdColorPicker, [
473
+ 'locale',
471
474
  'variant',
472
475
  'value',
473
476
  'format',
@@ -486,7 +489,7 @@ export const MdColorPicker = /*@__PURE__*/ defineContainer<JSX.MdColorPicker>('m
486
489
  ]);
487
490
 
488
491
 
489
- 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, [
490
493
  'valueMissingLabel',
491
494
  'reserveSupportingSpace',
492
495
  'variant',
@@ -544,7 +547,8 @@ export const MdDatePicker = /*@__PURE__*/ defineContainer<JSX.MdDatePicker>('md-
544
547
  'mdMenuSelect',
545
548
  'mdModeChange',
546
549
  'mdValidityChange'
547
- ]);
550
+ ],
551
+ 'value', 'mdChange');
548
552
 
549
553
 
550
554
  export const MdDialog = /*@__PURE__*/ defineContainer<JSX.MdDialog>('md-dialog', defineMdDialog, [
@@ -816,7 +820,7 @@ export const MdMeter = /*@__PURE__*/ defineContainer<JSX.MdMeter>('md-meter', de
816
820
  ]);
817
821
 
818
822
 
819
- 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, [
820
824
  'valueMissingLabel',
821
825
  'reserveSupportingSpace',
822
826
  'variant',
@@ -867,7 +871,8 @@ export const MdMultiSelect = /*@__PURE__*/ defineContainer<JSX.MdMultiSelect>('m
867
871
  'mdRemove',
868
872
  'mdClear',
869
873
  'mdValidityChange'
870
- ]);
874
+ ],
875
+ 'value', 'mdChange');
871
876
 
872
877
 
873
878
  export const MdNavigationBar = /*@__PURE__*/ defineContainer<JSX.MdNavigationBar>('md-navigation-bar', defineMdNavigationBar, [
@@ -937,7 +942,7 @@ export const MdNavigationTab = /*@__PURE__*/ defineContainer<JSX.MdNavigationTab
937
942
  ]);
938
943
 
939
944
 
940
- 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, [
941
946
  'variant',
942
947
  'label',
943
948
  'placeholder',
@@ -968,7 +973,8 @@ export const MdNumberField = /*@__PURE__*/ defineContainer<JSX.MdNumberField>('m
968
973
  'mdInput',
969
974
  'mdChange',
970
975
  'mdValidityChange'
971
- ]);
976
+ ],
977
+ 'value', 'mdChange');
972
978
 
973
979
 
974
980
  export const MdOrganizationChart = /*@__PURE__*/ defineContainer<JSX.MdOrganizationChart>('md-organization-chart', defineMdOrganizationChart, [
@@ -986,7 +992,7 @@ export const MdOrganizationChart = /*@__PURE__*/ defineContainer<JSX.MdOrganizat
986
992
  ]);
987
993
 
988
994
 
989
- 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, [
990
996
  'length',
991
997
  'value',
992
998
  'validationType',
@@ -1013,7 +1019,8 @@ export const MdOtpField = /*@__PURE__*/ defineContainer<JSX.MdOtpField>('md-otp-
1013
1019
  'mdComplete',
1014
1020
  'mdInvalidInput',
1015
1021
  'mdValidityChange'
1016
- ]);
1022
+ ],
1023
+ 'value', 'mdInput');
1017
1024
 
1018
1025
 
1019
1026
  export const MdPieChart = /*@__PURE__*/ defineContainer<JSX.MdPieChart>('md-pie-chart', defineMdPieChart, [
@@ -1075,7 +1082,7 @@ export const MdProgressIndicator = /*@__PURE__*/ defineContainer<JSX.MdProgressI
1075
1082
  ]);
1076
1083
 
1077
1084
 
1078
- export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio>('md-radio', defineMdRadio, [
1085
+ export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio, JSX.MdRadio["value"]>('md-radio', defineMdRadio, [
1079
1086
  'valueMissingLabel',
1080
1087
  'checked',
1081
1088
  'disabled',
@@ -1088,10 +1095,11 @@ export const MdRadio = /*@__PURE__*/ defineContainer<JSX.MdRadio>('md-radio', de
1088
1095
  'mdFocus',
1089
1096
  'mdBlur',
1090
1097
  'mdValidityChange'
1091
- ]);
1098
+ ],
1099
+ 'value', 'mdChange');
1092
1100
 
1093
1101
 
1094
- export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating>('md-rating', defineMdRating, [
1102
+ export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating, JSX.MdRating["value"]>('md-rating', defineMdRating, [
1095
1103
  'value',
1096
1104
  'defaultValue',
1097
1105
  'max',
@@ -1111,7 +1119,8 @@ export const MdRating = /*@__PURE__*/ defineContainer<JSX.MdRating>('md-rating',
1111
1119
  'density',
1112
1120
  'mdHover',
1113
1121
  'mdChange'
1114
- ]);
1122
+ ],
1123
+ 'value', 'mdChange');
1115
1124
 
1116
1125
 
1117
1126
  export const MdRipple = /*@__PURE__*/ defineContainer<JSX.MdRipple>('md-ripple', defineMdRipple, [
@@ -1188,7 +1197,7 @@ export const MdSegmentedButtonSet = /*@__PURE__*/ defineContainer<JSX.MdSegmente
1188
1197
  ]);
1189
1198
 
1190
1199
 
1191
- export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect>('md-select', defineMdSelect, [
1200
+ export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect, JSX.MdSelect["value"]>('md-select', defineMdSelect, [
1192
1201
  'valueMissingLabel',
1193
1202
  'reserveSupportingSpace',
1194
1203
  'variant',
@@ -1227,7 +1236,8 @@ export const MdSelect = /*@__PURE__*/ defineContainer<JSX.MdSelect>('md-select',
1227
1236
  'mdOpen',
1228
1237
  'mdClose',
1229
1238
  'mdValidityChange'
1230
- ]);
1239
+ ],
1240
+ 'value', 'mdChange');
1231
1241
 
1232
1242
 
1233
1243
  export const MdSelectOption = /*@__PURE__*/ defineContainer<JSX.MdSelectOption>('md-select-option', defineMdSelectOption, [
@@ -1276,7 +1286,7 @@ export const MdSkeleton = /*@__PURE__*/ defineContainer<JSX.MdSkeleton>('md-skel
1276
1286
  ]);
1277
1287
 
1278
1288
 
1279
- export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider>('md-slider', defineMdSlider, [
1289
+ export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider, JSX.MdSlider["value"]>('md-slider', defineMdSlider, [
1280
1290
  'min',
1281
1291
  'max',
1282
1292
  'value',
@@ -1311,7 +1321,8 @@ export const MdSlider = /*@__PURE__*/ defineContainer<JSX.MdSlider>('md-slider',
1311
1321
  'mdBlur',
1312
1322
  'mdDragStart',
1313
1323
  'mdDragEnd'
1314
- ]);
1324
+ ],
1325
+ 'value', 'mdChange');
1315
1326
 
1316
1327
 
1317
1328
  export const MdSnackbar = /*@__PURE__*/ defineContainer<JSX.MdSnackbar>('md-snackbar', defineMdSnackbar, [
@@ -1451,7 +1462,7 @@ export const MdSubMenuItem = /*@__PURE__*/ defineContainer<JSX.MdSubMenuItem>('m
1451
1462
  ]);
1452
1463
 
1453
1464
 
1454
- export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch>('md-switch', defineMdSwitch, [
1465
+ export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch, JSX.MdSwitch["selected"]>('md-switch', defineMdSwitch, [
1455
1466
  'valueMissingLabel',
1456
1467
  'selected',
1457
1468
  'disabled',
@@ -1467,7 +1478,8 @@ export const MdSwitch = /*@__PURE__*/ defineContainer<JSX.MdSwitch>('md-switch',
1467
1478
  'mdInput',
1468
1479
  'mdChange',
1469
1480
  'mdValidityChange'
1470
- ]);
1481
+ ],
1482
+ 'selected', 'mdChange');
1471
1483
 
1472
1484
 
1473
1485
  export const MdTab = /*@__PURE__*/ defineContainer<JSX.MdTab>('md-tab', defineMdTab, [
@@ -1623,6 +1635,8 @@ export const MdTableSortLabel = /*@__PURE__*/ defineContainer<JSX.MdTableSortLab
1623
1635
  'inactiveIcon',
1624
1636
  'active',
1625
1637
  'order',
1638
+ 'sortedAscendingLabel',
1639
+ 'sortedDescendingLabel',
1626
1640
  'density',
1627
1641
  'mdSortRequest'
1628
1642
  ]);
@@ -1650,7 +1664,7 @@ export const MdTabs = /*@__PURE__*/ defineContainer<JSX.MdTabs>('md-tabs', defin
1650
1664
  ]);
1651
1665
 
1652
1666
 
1653
- export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField>('md-text-field', defineMdTextField, [
1667
+ export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField, JSX.MdTextField["value"]>('md-text-field', defineMdTextField, [
1654
1668
  'reserveSupportingSpace',
1655
1669
  'variant',
1656
1670
  'label',
@@ -1679,6 +1693,8 @@ export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField>('md-te
1679
1693
  'maxLength',
1680
1694
  'clearable',
1681
1695
  'passwordToggle',
1696
+ 'showPasswordLabel',
1697
+ 'hidePasswordLabel',
1682
1698
  'density',
1683
1699
  'multiline',
1684
1700
  'rows',
@@ -1703,10 +1719,11 @@ export const MdTextField = /*@__PURE__*/ defineContainer<JSX.MdTextField>('md-te
1703
1719
  'mdPasswordToggle',
1704
1720
  'mdSpeechResult',
1705
1721
  'mdValidityChange'
1706
- ]);
1722
+ ],
1723
+ 'value', 'mdInput');
1707
1724
 
1708
1725
 
1709
- export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker>('md-time-picker', defineMdTimePicker, [
1726
+ export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker, JSX.MdTimePicker["value"]>('md-time-picker', defineMdTimePicker, [
1710
1727
  'variant',
1711
1728
  'format',
1712
1729
  'value',
@@ -1750,7 +1767,8 @@ export const MdTimePicker = /*@__PURE__*/ defineContainer<JSX.MdTimePicker>('md-
1750
1767
  'mdCancel',
1751
1768
  'mdModeChange',
1752
1769
  'mdValidityChange'
1753
- ]);
1770
+ ],
1771
+ 'value', 'mdChange');
1754
1772
 
1755
1773
 
1756
1774
  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
  *