@db-ux/wc-core-components 4.4.3 → 4.5.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.
- package/CHANGELOG.md +24 -0
- package/agent/.gitkeep +0 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +5 -4
- package/dist/cjs/db-accordion.cjs.entry.js +6 -6
- package/dist/cjs/db-badge.cjs.entry.js +5 -5
- package/dist/cjs/db-brand.cjs.entry.js +5 -5
- package/dist/cjs/db-button.cjs.entry.js +5 -5
- package/dist/cjs/db-card.cjs.entry.js +5 -4
- package/dist/cjs/db-checkbox.cjs.entry.js +53 -34
- package/dist/cjs/db-custom-button.cjs.entry.js +57 -0
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +59 -37
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +5 -4
- package/dist/cjs/db-custom-select.cjs.entry.js +132 -109
- package/dist/cjs/db-divider.cjs.entry.js +5 -4
- package/dist/cjs/db-drawer.cjs.entry.js +6 -6
- package/dist/cjs/db-header.cjs.entry.js +7 -7
- package/dist/cjs/db-icon.cjs.entry.js +5 -4
- package/dist/cjs/db-infotext.cjs.entry.js +5 -5
- package/dist/cjs/db-link.cjs.entry.js +5 -5
- package/dist/cjs/db-navigation-item.cjs.entry.js +7 -7
- package/dist/cjs/db-navigation.cjs.entry.js +5 -4
- package/dist/cjs/db-notification.cjs.entry.js +6 -6
- package/dist/cjs/db-page.cjs.entry.js +5 -4
- package/dist/cjs/db-popover.cjs.entry.js +7 -7
- package/dist/cjs/db-radio.cjs.entry.js +33 -14
- package/dist/cjs/db-section.cjs.entry.js +5 -4
- package/dist/cjs/db-select.cjs.entry.js +48 -29
- package/dist/cjs/db-stack.cjs.entry.js +5 -4
- package/dist/cjs/db-switch.cjs.entry.js +58 -22
- package/dist/cjs/db-tab-item_3.cjs.entry.js +11 -9
- package/dist/cjs/db-tabs.cjs.entry.js +6 -6
- package/dist/cjs/db-textarea.cjs.entry.js +46 -27
- package/dist/cjs/db-tooltip.cjs.entry.js +17 -9
- package/dist/cjs/db-ux.cjs.js +3 -3
- package/dist/cjs/{document-click-listener-Bb3Tinb8.js → document-click-listener-B2-xKJv3.js} +1 -1
- package/dist/cjs/{document-scroll-listener-unypEU42.js → document-scroll-listener-ChQ7XZRk.js} +1 -1
- package/dist/cjs/{floating-components-pYaTeNhp.js → floating-components-DlstoCKH.js} +4 -0
- package/dist/cjs/{form-components-LsqVohyb.js → form-components-_ncB_U2D.js} +1 -1
- package/dist/cjs/{index-CsHqnQII.js → index-2_9ESkQu.js} +6 -7
- package/dist/cjs/{index-Bh5ovRL2.js → index-D_vrmAD6.js} +23 -14
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{navigation-BztJmEHf.js → navigation-Bah882nU.js} +1 -1
- package/dist/collection/collection-manifest.json +3 -1
- package/dist/collection/components/accordion/accordion.js +28 -4
- package/dist/collection/components/accordion-item/accordion-item.js +27 -2
- package/dist/collection/components/badge/badge.js +54 -4
- package/dist/collection/components/brand/brand.js +27 -3
- package/dist/collection/components/button/button.js +53 -3
- package/dist/collection/components/card/card.js +27 -2
- package/dist/collection/components/checkbox/checkbox.js +81 -38
- package/dist/collection/components/custom-button/custom-button.js +394 -0
- package/dist/collection/components/custom-button/index.js +2 -0
- package/dist/collection/components/custom-button/model.js +1 -0
- package/dist/collection/components/custom-select/custom-select.js +156 -109
- package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +27 -2
- package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +27 -2
- package/dist/collection/components/custom-select-list/custom-select-list.js +27 -2
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +27 -2
- package/dist/collection/components/divider/divider.js +27 -2
- package/dist/collection/components/drawer/drawer.js +28 -4
- package/dist/collection/components/header/header.js +27 -3
- package/dist/collection/components/icon/icon.js +27 -2
- package/dist/collection/components/infotext/infotext.js +53 -3
- package/dist/collection/components/input/input.js +74 -31
- package/dist/collection/components/link/link.js +27 -3
- package/dist/collection/components/navigation/navigation.js +27 -2
- package/dist/collection/components/navigation-item/navigation-item.js +27 -3
- package/dist/collection/components/notification/notification.js +28 -4
- package/dist/collection/components/page/page.js +27 -2
- package/dist/collection/components/popover/popover.js +27 -3
- package/dist/collection/components/radio/radio.js +54 -11
- package/dist/collection/components/section/section.js +27 -2
- package/dist/collection/components/select/select.js +75 -32
- package/dist/collection/components/stack/stack.js +27 -2
- package/dist/collection/components/switch/switch.js +107 -45
- package/dist/collection/components/tab-item/tab-item.js +27 -3
- package/dist/collection/components/tab-list/tab-list.js +27 -2
- package/dist/collection/components/tab-panel/tab-panel.js +27 -2
- package/dist/collection/components/tabs/tabs.js +28 -4
- package/dist/collection/components/tag/tag.js +27 -3
- package/dist/collection/components/textarea/textarea.js +73 -30
- package/dist/collection/components/tooltip/tooltip.js +63 -5
- package/dist/collection/index.js +2 -0
- package/dist/collection/utils/floating-components.js +4 -0
- package/dist/collection/utils/index.js +6 -7
- package/dist/custom-elements.json +3692 -1698
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/index.esm.js +1 -1
- package/dist/db-ux/p-043c407c.entry.js +1 -0
- package/dist/db-ux/p-0541c3c2.entry.js +1 -0
- package/dist/db-ux/p-074e4a43.entry.js +1 -0
- package/dist/db-ux/p-11251b99.entry.js +1 -0
- package/dist/db-ux/p-1c89f0fc.entry.js +1 -0
- package/dist/db-ux/p-213bfff6.entry.js +1 -0
- package/dist/db-ux/p-29442fd9.entry.js +1 -0
- package/dist/db-ux/p-2bce91e1.entry.js +1 -0
- package/dist/db-ux/p-32c4a1b5.entry.js +1 -0
- package/dist/db-ux/p-3e5be44c.entry.js +1 -0
- package/dist/db-ux/p-4cda36f1.entry.js +1 -0
- package/dist/db-ux/p-4cf64cbb.entry.js +1 -0
- package/dist/db-ux/p-5028b12e.entry.js +1 -0
- package/dist/db-ux/{p-b07122c4.entry.js → p-56af9177.entry.js} +1 -1
- package/dist/db-ux/{p-64264628.entry.js → p-587263ad.entry.js} +1 -1
- package/dist/db-ux/p-58f21c03.entry.js +1 -0
- package/dist/db-ux/{p-77150a25.entry.js → p-6b073570.entry.js} +1 -1
- package/dist/db-ux/p-745ccfb8.entry.js +1 -0
- package/dist/db-ux/p-836f0fef.entry.js +1 -0
- package/dist/db-ux/p-9a19e197.entry.js +1 -0
- package/dist/db-ux/p-9fb146d1.entry.js +1 -0
- package/dist/db-ux/p-BjIPMjCM.js +2 -0
- package/dist/db-ux/{p-cNk4ImpW.js → p-BuBrj57D.js} +1 -1
- package/dist/db-ux/p-CHLgQ9vn.js +1 -0
- package/dist/db-ux/{p-CAEpg8tJ.js → p-D5mInaY7.js} +1 -1
- package/dist/db-ux/p-DOPXnIzL.js +1 -0
- package/dist/db-ux/p-D_roHmuC.js +1 -0
- package/dist/db-ux/p-a34d2691.entry.js +1 -0
- package/dist/db-ux/p-c6f43506.entry.js +1 -0
- package/dist/db-ux/p-cdfaf027.entry.js +1 -0
- package/dist/db-ux/p-d186aef4.entry.js +1 -0
- package/dist/db-ux/p-dceb35a8.entry.js +1 -0
- package/dist/db-ux/p-e199b6f9.entry.js +1 -0
- package/dist/db-ux/p-e3664354.entry.js +1 -0
- package/dist/db-ux/p-ef034bba.entry.js +1 -0
- package/dist/db-ux/p-f0bc176a.entry.js +1 -0
- package/dist/db-ux/p-ff3866f3.entry.js +1 -0
- package/dist/db-ux/p-xkoBSP8R.js +1 -0
- package/dist/esm/db-accordion-item.entry.js +5 -4
- package/dist/esm/db-accordion.entry.js +6 -6
- package/dist/esm/db-badge.entry.js +5 -5
- package/dist/esm/db-brand.entry.js +5 -5
- package/dist/esm/db-button.entry.js +5 -5
- package/dist/esm/db-card.entry.js +5 -4
- package/dist/esm/db-checkbox.entry.js +54 -35
- package/dist/esm/db-custom-button.entry.js +55 -0
- package/dist/esm/db-custom-select-dropdown_5.entry.js +60 -38
- package/dist/esm/db-custom-select-form-field.entry.js +5 -4
- package/dist/esm/db-custom-select.entry.js +133 -110
- package/dist/esm/db-divider.entry.js +5 -4
- package/dist/esm/db-drawer.entry.js +6 -6
- package/dist/esm/db-header.entry.js +7 -7
- package/dist/esm/db-icon.entry.js +5 -4
- package/dist/esm/db-infotext.entry.js +5 -5
- package/dist/esm/db-link.entry.js +5 -5
- package/dist/esm/db-navigation-item.entry.js +7 -7
- package/dist/esm/db-navigation.entry.js +5 -4
- package/dist/esm/db-notification.entry.js +6 -6
- package/dist/esm/db-page.entry.js +5 -4
- package/dist/esm/db-popover.entry.js +7 -7
- package/dist/esm/db-radio.entry.js +33 -14
- package/dist/esm/db-section.entry.js +5 -4
- package/dist/esm/db-select.entry.js +49 -30
- package/dist/esm/db-stack.entry.js +5 -4
- package/dist/esm/db-switch.entry.js +58 -22
- package/dist/esm/db-tab-item_3.entry.js +11 -9
- package/dist/esm/db-tabs.entry.js +6 -6
- package/dist/esm/db-textarea.entry.js +47 -28
- package/dist/esm/db-tooltip.entry.js +17 -9
- package/dist/esm/db-ux.js +4 -4
- package/dist/esm/{document-click-listener-CmYoXpGE.js → document-click-listener-D7W_VE5O.js} +1 -1
- package/dist/esm/{document-scroll-listener-65bHuFAN.js → document-scroll-listener-DOBe3Oa9.js} +1 -1
- package/dist/esm/{floating-components-DfYL98sI.js → floating-components-DOPXnIzL.js} +4 -0
- package/dist/esm/{form-components-BLsiOrPI.js → form-components-D6LQfJvq.js} +1 -1
- package/dist/esm/{index-Crtu1dn6.js → index-BjIPMjCM.js} +23 -14
- package/dist/esm/{index-C4x0SOcx.js → index-xkoBSP8R.js} +6 -7
- package/dist/esm/index.js +5 -5
- package/dist/esm/loader.js +3 -3
- package/dist/esm/{navigation-DgsMCdfn.js → navigation-Jh6m0eMk.js} +1 -1
- package/dist/types/components/accordion/accordion.d.ts +1 -0
- package/dist/types/components/accordion-item/accordion-item.d.ts +1 -0
- package/dist/types/components/badge/badge.d.ts +2 -0
- package/dist/types/components/badge/model.d.ts +2 -2
- package/dist/types/components/brand/brand.d.ts +1 -0
- package/dist/types/components/button/button.d.ts +2 -0
- package/dist/types/components/button/model.d.ts +8 -10
- package/dist/types/components/card/card.d.ts +1 -0
- package/dist/types/components/checkbox/checkbox.d.ts +5 -1
- package/dist/types/components/custom-button/custom-button.d.ts +29 -0
- package/dist/types/components/custom-button/index.d.ts +2 -0
- package/dist/types/components/custom-button/model.d.ts +6 -0
- package/dist/types/components/custom-select/custom-select.d.ts +5 -1
- package/dist/types/components/custom-select-dropdown/custom-select-dropdown.d.ts +1 -0
- package/dist/types/components/custom-select-form-field/custom-select-form-field.d.ts +1 -0
- package/dist/types/components/custom-select-list/custom-select-list.d.ts +1 -0
- package/dist/types/components/custom-select-list-item/custom-select-list-item.d.ts +1 -0
- package/dist/types/components/divider/divider.d.ts +1 -0
- package/dist/types/components/drawer/drawer.d.ts +1 -0
- package/dist/types/components/header/header.d.ts +1 -0
- package/dist/types/components/icon/icon.d.ts +1 -0
- package/dist/types/components/infotext/infotext.d.ts +2 -0
- package/dist/types/components/infotext/model.d.ts +2 -2
- package/dist/types/components/input/input.d.ts +5 -1
- package/dist/types/components/link/link.d.ts +1 -0
- package/dist/types/components/navigation/navigation.d.ts +1 -0
- package/dist/types/components/navigation-item/navigation-item.d.ts +1 -0
- package/dist/types/components/notification/model.d.ts +2 -2
- package/dist/types/components/notification/notification.d.ts +1 -0
- package/dist/types/components/page/page.d.ts +1 -0
- package/dist/types/components/popover/popover.d.ts +1 -0
- package/dist/types/components/radio/radio.d.ts +4 -0
- package/dist/types/components/section/section.d.ts +1 -0
- package/dist/types/components/select/select.d.ts +5 -1
- package/dist/types/components/stack/stack.d.ts +1 -0
- package/dist/types/components/switch/switch.d.ts +7 -1
- package/dist/types/components/tab-item/tab-item.d.ts +1 -0
- package/dist/types/components/tab-list/tab-list.d.ts +1 -0
- package/dist/types/components/tab-panel/tab-panel.d.ts +1 -0
- package/dist/types/components/tabs/tabs.d.ts +1 -0
- package/dist/types/components/tag/model.d.ts +2 -6
- package/dist/types/components/tag/tag.d.ts +1 -0
- package/dist/types/components/textarea/textarea.d.ts +5 -1
- package/dist/types/components/tooltip/model.d.ts +3 -3
- package/dist/types/components/tooltip/tooltip.d.ts +3 -0
- package/dist/types/components.d.ts +145 -6
- package/dist/types/index.d.ts +2 -0
- package/dist/types/shared/model.d.ts +15 -1
- package/dist/types/stencil-public-runtime.d.ts +3 -1
- package/dist/vscode.html-custom-data.json +397 -85
- package/dist/web-types.json +730 -153
- package/package.json +4 -4
- package/agent/Accordion.md +0 -23
- package/agent/AccordionItem.md +0 -29
- package/agent/Badge.md +0 -32
- package/agent/Brand.md +0 -13
- package/agent/Button.md +0 -47
- package/agent/Card.md +0 -23
- package/agent/Checkbox.md +0 -41
- package/agent/CustomSelect.md +0 -54
- package/agent/Divider.md +0 -21
- package/agent/Drawer.md +0 -71
- package/agent/Header.md +0 -29
- package/agent/Icon.md +0 -20
- package/agent/Infotext.md +0 -25
- package/agent/Input.md +0 -48
- package/agent/Link.md +0 -52
- package/agent/Navigation.md +0 -19
- package/agent/NavigationItem.md +0 -29
- package/agent/Notification.md +0 -38
- package/agent/Page.md +0 -27
- package/agent/Popover.md +0 -52
- package/agent/Radio.md +0 -28
- package/agent/Section.md +0 -21
- package/agent/Select.md +0 -62
- package/agent/Stack.md +0 -35
- package/agent/Switch.md +0 -44
- package/agent/TabItem.md +0 -25
- package/agent/Tabs.md +0 -61
- package/agent/Tag.md +0 -41
- package/agent/Textarea.md +0 -44
- package/agent/Tooltip.md +0 -37
- package/agent/_instructions.md +0 -31
- package/dist/db-ux/p-1a72176e.entry.js +0 -1
- package/dist/db-ux/p-1b7f6a0b.entry.js +0 -1
- package/dist/db-ux/p-1da21066.entry.js +0 -1
- package/dist/db-ux/p-2d15e200.entry.js +0 -1
- package/dist/db-ux/p-312d52da.entry.js +0 -1
- package/dist/db-ux/p-3e6b86d6.entry.js +0 -1
- package/dist/db-ux/p-4aa16916.entry.js +0 -1
- package/dist/db-ux/p-4b69acea.entry.js +0 -1
- package/dist/db-ux/p-4cfff250.entry.js +0 -1
- package/dist/db-ux/p-5237e5d5.entry.js +0 -1
- package/dist/db-ux/p-5b1a0f0f.entry.js +0 -1
- package/dist/db-ux/p-5fa85b19.entry.js +0 -1
- package/dist/db-ux/p-7351b5ab.entry.js +0 -1
- package/dist/db-ux/p-7c6b7578.entry.js +0 -1
- package/dist/db-ux/p-828a77d8.entry.js +0 -1
- package/dist/db-ux/p-9b47dc80.entry.js +0 -1
- package/dist/db-ux/p-BhXdfCpU.js +0 -1
- package/dist/db-ux/p-C4x0SOcx.js +0 -1
- package/dist/db-ux/p-Crtu1dn6.js +0 -2
- package/dist/db-ux/p-DfYL98sI.js +0 -1
- package/dist/db-ux/p-RHqkTr-_.js +0 -1
- package/dist/db-ux/p-a3a8ce36.entry.js +0 -1
- package/dist/db-ux/p-aa0f7280.entry.js +0 -1
- package/dist/db-ux/p-b1fc0f4c.entry.js +0 -1
- package/dist/db-ux/p-c2624e1b.entry.js +0 -1
- package/dist/db-ux/p-c29d8e32.entry.js +0 -1
- package/dist/db-ux/p-cf50169a.entry.js +0 -1
- package/dist/db-ux/p-d4f3cfa2.entry.js +0 -1
- package/dist/db-ux/p-e05fee5a.entry.js +0 -1
- package/dist/db-ux/p-f40d2d61.entry.js +0 -1
- package/dist/db-ux/p-fcf8e274.entry.js +0 -1
- package/dist/db-ux/p-fe06f815.entry.js +0 -1
|
@@ -74,6 +74,14 @@ export class DBTextarea {
|
|
|
74
74
|
this.focus.emit(event);
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
|
+
resetIds() {
|
|
78
|
+
var _a, _b, _c;
|
|
79
|
+
const mId = (_c = (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : `textarea-${uuid()}`;
|
|
80
|
+
this._id = mId;
|
|
81
|
+
this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
82
|
+
this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
83
|
+
this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
84
|
+
}
|
|
77
85
|
/**
|
|
78
86
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
79
87
|
* @param element the ref for the component
|
|
@@ -111,16 +119,25 @@ export class DBTextarea {
|
|
|
111
119
|
}
|
|
112
120
|
}
|
|
113
121
|
watch0Fn() {
|
|
122
|
+
var _a, _b;
|
|
123
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
124
|
+
this.resetIds();
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
watch0() {
|
|
128
|
+
this.watch0Fn();
|
|
129
|
+
}
|
|
130
|
+
watch1Fn() {
|
|
114
131
|
var _a;
|
|
115
132
|
this._invalidMessage =
|
|
116
133
|
this.invalidMessage ||
|
|
117
134
|
((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
|
|
118
135
|
DEFAULT_INVALID_MESSAGE;
|
|
119
136
|
}
|
|
120
|
-
|
|
121
|
-
this.
|
|
137
|
+
watch1() {
|
|
138
|
+
this.watch1Fn();
|
|
122
139
|
}
|
|
123
|
-
|
|
140
|
+
watch2Fn() {
|
|
124
141
|
if (this._id) {
|
|
125
142
|
const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
126
143
|
this._messageId = messageId;
|
|
@@ -132,18 +149,18 @@ export class DBTextarea {
|
|
|
132
149
|
this.handleValidation();
|
|
133
150
|
}
|
|
134
151
|
}
|
|
135
|
-
|
|
136
|
-
this.
|
|
152
|
+
watch2() {
|
|
153
|
+
this.watch2Fn();
|
|
137
154
|
}
|
|
138
|
-
|
|
155
|
+
watch3Fn() {
|
|
139
156
|
if (this.value !== undefined) {
|
|
140
157
|
this._value = this.value;
|
|
141
158
|
}
|
|
142
159
|
}
|
|
143
|
-
|
|
144
|
-
this.
|
|
160
|
+
watch3() {
|
|
161
|
+
this.watch3Fn();
|
|
145
162
|
}
|
|
146
|
-
|
|
163
|
+
watch4Fn() {
|
|
147
164
|
// If angular uses ngModel value and _value are null
|
|
148
165
|
// then the value will be set afterward and the _ref will be refreshed
|
|
149
166
|
const addResetListener = true;
|
|
@@ -163,22 +180,18 @@ export class DBTextarea {
|
|
|
163
180
|
}, controller.signal);
|
|
164
181
|
}
|
|
165
182
|
}
|
|
166
|
-
|
|
167
|
-
this.
|
|
183
|
+
watch4() {
|
|
184
|
+
this.watch4Fn();
|
|
168
185
|
}
|
|
169
186
|
componentDidLoad() {
|
|
170
|
-
var _a;
|
|
171
187
|
this.enableAttributePassing(this._ref, "db-textarea");
|
|
172
|
-
|
|
173
|
-
this._id = mId;
|
|
174
|
-
this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
175
|
-
this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
176
|
-
this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
188
|
+
this.resetIds();
|
|
177
189
|
this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
|
|
178
190
|
this.watch0Fn();
|
|
179
191
|
this.watch1Fn();
|
|
180
192
|
this.watch2Fn();
|
|
181
193
|
this.watch3Fn();
|
|
194
|
+
this.watch4Fn();
|
|
182
195
|
}
|
|
183
196
|
disconnectedCallback() {
|
|
184
197
|
var _a;
|
|
@@ -186,19 +199,19 @@ export class DBTextarea {
|
|
|
186
199
|
}
|
|
187
200
|
render() {
|
|
188
201
|
var _a, _b, _c, _d, _e;
|
|
189
|
-
return (h("div", { key: '
|
|
202
|
+
return (h("div", { key: 'acb23abfb477beeceebdf88503a51a6aa90e268e', class: cls("db-textarea", this.className), "data-variant": this.variant, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-hide-label": getHideProp(this.showLabel) }, h("label", { key: '03df1963dce7436d616df5f26c8fbff37243421f', htmlFor: this._id }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL), h("textarea", { key: 'b09e8a714ee44c18a2af738d90c6939309eb143c', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
190
203
|
this._ref = el;
|
|
191
204
|
}, id: this._id, "data-resize": this.resize, "data-hide-resizer": getHideProp((_b = this.showResizer) !== null && _b !== void 0 ? _b : true), disabled: getBoolean(this.disabled, "disabled"), required: getBoolean(this.required, "required"), readOnly: getBoolean(this.readOnly, "readOnly") ||
|
|
192
|
-
getBoolean(this.readonly, "readonly"), form: this.form, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), name: this.name, wrap: this.wrap, spellcheck: this.spellCheck, autocomplete: this.autocomplete, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), value: (_c = this.value) !== null && _c !== void 0 ? _c : this._value, "aria-describedby": (_d = this.ariaDescribedBy) !== null && _d !== void 0 ? _d : this._descByIds, placeholder: (_e = this.placeholder) !== null && _e !== void 0 ? _e : DEFAULT_PLACEHOLDER, rows: getNumber(this.rows, DEFAULT_ROWS), cols: getNumber(this.cols) }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '
|
|
205
|
+
getBoolean(this.readonly, "readonly"), form: this.form, maxLength: getNumber(this.maxLength, this.maxlength), minLength: getNumber(this.minLength, this.minlength), name: this.name, wrap: this.wrap, spellcheck: this.spellCheck, autocomplete: this.autocomplete, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), value: (_c = this.value) !== null && _c !== void 0 ? _c : this._value, "aria-describedby": (_d = this.ariaDescribedBy) !== null && _d !== void 0 ? _d : this._descByIds, placeholder: (_e = this.placeholder) !== null && _e !== void 0 ? _e : DEFAULT_PLACEHOLDER, rows: getNumber(this.rows, DEFAULT_ROWS), cols: getNumber(this.cols) }), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: 'c62d3e639536d955cc454b43c289b0ad11e9d7b3', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '430d5b39be9fa9eb29c7720f46be601fa1f25161', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
193
206
|
}
|
|
194
207
|
static get is() { return "db-textarea"; }
|
|
195
208
|
static get properties() {
|
|
196
209
|
return {
|
|
197
|
-
"
|
|
210
|
+
"invalidMessage": {
|
|
198
211
|
"type": "string",
|
|
199
212
|
"mutable": false,
|
|
200
213
|
"complexType": {
|
|
201
|
-
"original": "DBTextareaProps[\"
|
|
214
|
+
"original": "DBTextareaProps[\"invalidMessage\"]",
|
|
202
215
|
"resolved": "string",
|
|
203
216
|
"references": {
|
|
204
217
|
"DBTextareaProps": {
|
|
@@ -218,13 +231,13 @@ export class DBTextarea {
|
|
|
218
231
|
"getter": false,
|
|
219
232
|
"setter": false,
|
|
220
233
|
"reflect": false,
|
|
221
|
-
"attribute": "
|
|
234
|
+
"attribute": "invalid-message"
|
|
222
235
|
},
|
|
223
|
-
"
|
|
236
|
+
"id": {
|
|
224
237
|
"type": "string",
|
|
225
238
|
"mutable": false,
|
|
226
239
|
"complexType": {
|
|
227
|
-
"original": "DBTextareaProps[\"
|
|
240
|
+
"original": "DBTextareaProps[\"id\"]",
|
|
228
241
|
"resolved": "string",
|
|
229
242
|
"references": {
|
|
230
243
|
"DBTextareaProps": {
|
|
@@ -244,7 +257,31 @@ export class DBTextarea {
|
|
|
244
257
|
"getter": false,
|
|
245
258
|
"setter": false,
|
|
246
259
|
"reflect": false,
|
|
247
|
-
"attribute": "
|
|
260
|
+
"attribute": "id"
|
|
261
|
+
},
|
|
262
|
+
"propOverrides": {
|
|
263
|
+
"type": "unknown",
|
|
264
|
+
"mutable": false,
|
|
265
|
+
"complexType": {
|
|
266
|
+
"original": "DBTextareaProps[\"propOverrides\"]",
|
|
267
|
+
"resolved": "{ id?: string; }",
|
|
268
|
+
"references": {
|
|
269
|
+
"DBTextareaProps": {
|
|
270
|
+
"location": "import",
|
|
271
|
+
"path": "./model",
|
|
272
|
+
"id": "src/components/textarea/model.ts::DBTextareaProps",
|
|
273
|
+
"referenceLocation": "DBTextareaProps"
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
},
|
|
277
|
+
"required": false,
|
|
278
|
+
"optional": false,
|
|
279
|
+
"docs": {
|
|
280
|
+
"tags": [],
|
|
281
|
+
"text": ""
|
|
282
|
+
},
|
|
283
|
+
"getter": false,
|
|
284
|
+
"setter": false
|
|
248
285
|
},
|
|
249
286
|
"message": {
|
|
250
287
|
"type": "string",
|
|
@@ -1132,20 +1169,26 @@ export class DBTextarea {
|
|
|
1132
1169
|
}
|
|
1133
1170
|
static get watchers() {
|
|
1134
1171
|
return [{
|
|
1135
|
-
"propName": "
|
|
1172
|
+
"propName": "id",
|
|
1136
1173
|
"methodName": "watch0"
|
|
1137
1174
|
}, {
|
|
1138
|
-
"propName": "
|
|
1175
|
+
"propName": "propOverrides?.id",
|
|
1139
1176
|
"methodName": "watch0"
|
|
1140
1177
|
}, {
|
|
1141
|
-
"propName": "
|
|
1178
|
+
"propName": "_ref",
|
|
1142
1179
|
"methodName": "watch1"
|
|
1143
1180
|
}, {
|
|
1144
|
-
"propName": "
|
|
1181
|
+
"propName": "invalidMessage",
|
|
1182
|
+
"methodName": "watch1"
|
|
1183
|
+
}, {
|
|
1184
|
+
"propName": "_id",
|
|
1145
1185
|
"methodName": "watch2"
|
|
1146
1186
|
}, {
|
|
1147
|
-
"propName": "
|
|
1187
|
+
"propName": "value",
|
|
1148
1188
|
"methodName": "watch3"
|
|
1189
|
+
}, {
|
|
1190
|
+
"propName": "_ref",
|
|
1191
|
+
"methodName": "watch4"
|
|
1149
1192
|
}];
|
|
1150
1193
|
}
|
|
1151
1194
|
}
|
|
@@ -66,6 +66,10 @@ export class DBTooltip {
|
|
|
66
66
|
this.handleAutoPlacement(parent);
|
|
67
67
|
(_a = this._observer) === null || _a === void 0 ? void 0 : _a.observe(this.getParent());
|
|
68
68
|
}
|
|
69
|
+
resetIds() {
|
|
70
|
+
var _a, _b, _c;
|
|
71
|
+
this._id = (_c = (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) !== null && _c !== void 0 ? _c : "tooltip-" + uuid();
|
|
72
|
+
}
|
|
69
73
|
/**
|
|
70
74
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
71
75
|
* @param element the ref for the component
|
|
@@ -103,8 +107,9 @@ export class DBTooltip {
|
|
|
103
107
|
}
|
|
104
108
|
}
|
|
105
109
|
watch0Fn() {
|
|
106
|
-
|
|
107
|
-
|
|
110
|
+
var _a, _b;
|
|
111
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
112
|
+
this.resetIds();
|
|
108
113
|
}
|
|
109
114
|
}
|
|
110
115
|
watch0() {
|
|
@@ -146,16 +151,16 @@ export class DBTooltip {
|
|
|
146
151
|
}
|
|
147
152
|
componentDidLoad() {
|
|
148
153
|
this.enableAttributePassing(this._ref, "db-tooltip");
|
|
149
|
-
this.
|
|
154
|
+
this.resetIds();
|
|
150
155
|
this.initialized = true;
|
|
151
156
|
this.watch0Fn();
|
|
152
157
|
this.watch1Fn();
|
|
153
158
|
}
|
|
154
159
|
render() {
|
|
155
160
|
var _a, _b;
|
|
156
|
-
return (h("i", { key: '
|
|
161
|
+
return (h("i", { key: 'df7b27f485e4029f51329dd73e50603f6965efb8', class: cls("db-tooltip", this.className), role: "tooltip", "aria-hidden": "true", "data-gap": "true", ref: (el) => {
|
|
157
162
|
this._ref = el;
|
|
158
|
-
}, id: this._id, "data-emphasis": this.emphasis, "data-animation": getBooleanAsString((_a = this.animation) !== null && _a !== void 0 ? _a : true), "data-delay": this.delay, "data-width": this.width, "data-show-arrow": getBooleanAsString((_b = this.showArrow) !== null && _b !== void 0 ? _b : true), "data-placement": this.placement, onClick: (event) => this.handleClick(event) }, h("slot", { key: '
|
|
163
|
+
}, id: this._id, "data-emphasis": this.emphasis, "data-wrap": getBooleanAsString(this.wrap), "data-animation": getBooleanAsString((_a = this.animation) !== null && _a !== void 0 ? _a : true), "data-delay": this.delay, "data-width": this.width, "data-show-arrow": getBooleanAsString((_b = this.showArrow) !== null && _b !== void 0 ? _b : true), "data-placement": this.placement, onClick: (event) => this.handleClick(event) }, h("slot", { key: '7c1aee92a530f8b0899231f55122f6109c72bc46' })));
|
|
159
164
|
}
|
|
160
165
|
static get is() { return "db-tooltip"; }
|
|
161
166
|
static get properties() {
|
|
@@ -186,6 +191,30 @@ export class DBTooltip {
|
|
|
186
191
|
"reflect": false,
|
|
187
192
|
"attribute": "id"
|
|
188
193
|
},
|
|
194
|
+
"propOverrides": {
|
|
195
|
+
"type": "unknown",
|
|
196
|
+
"mutable": false,
|
|
197
|
+
"complexType": {
|
|
198
|
+
"original": "DBTooltipProps[\"propOverrides\"]",
|
|
199
|
+
"resolved": "{ id?: string; }",
|
|
200
|
+
"references": {
|
|
201
|
+
"DBTooltipProps": {
|
|
202
|
+
"location": "import",
|
|
203
|
+
"path": "./model",
|
|
204
|
+
"id": "src/components/tooltip/model.ts::DBTooltipProps",
|
|
205
|
+
"referenceLocation": "DBTooltipProps"
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
"required": false,
|
|
210
|
+
"optional": false,
|
|
211
|
+
"docs": {
|
|
212
|
+
"tags": [],
|
|
213
|
+
"text": ""
|
|
214
|
+
},
|
|
215
|
+
"getter": false,
|
|
216
|
+
"setter": false
|
|
217
|
+
},
|
|
189
218
|
"variant": {
|
|
190
219
|
"type": "string",
|
|
191
220
|
"mutable": false,
|
|
@@ -290,6 +319,32 @@ export class DBTooltip {
|
|
|
290
319
|
"reflect": false,
|
|
291
320
|
"attribute": "emphasis"
|
|
292
321
|
},
|
|
322
|
+
"wrap": {
|
|
323
|
+
"type": "any",
|
|
324
|
+
"mutable": false,
|
|
325
|
+
"complexType": {
|
|
326
|
+
"original": "DBTooltipProps[\"wrap\"]",
|
|
327
|
+
"resolved": "boolean | string",
|
|
328
|
+
"references": {
|
|
329
|
+
"DBTooltipProps": {
|
|
330
|
+
"location": "import",
|
|
331
|
+
"path": "./model",
|
|
332
|
+
"id": "src/components/tooltip/model.ts::DBTooltipProps",
|
|
333
|
+
"referenceLocation": "DBTooltipProps"
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
},
|
|
337
|
+
"required": false,
|
|
338
|
+
"optional": false,
|
|
339
|
+
"docs": {
|
|
340
|
+
"tags": [],
|
|
341
|
+
"text": ""
|
|
342
|
+
},
|
|
343
|
+
"getter": false,
|
|
344
|
+
"setter": false,
|
|
345
|
+
"reflect": false,
|
|
346
|
+
"attribute": "wrap"
|
|
347
|
+
},
|
|
293
348
|
"animation": {
|
|
294
349
|
"type": "any",
|
|
295
350
|
"mutable": false,
|
|
@@ -408,6 +463,9 @@ export class DBTooltip {
|
|
|
408
463
|
return [{
|
|
409
464
|
"propName": "id",
|
|
410
465
|
"methodName": "watch0"
|
|
466
|
+
}, {
|
|
467
|
+
"propName": "propOverrides?.id",
|
|
468
|
+
"methodName": "watch0"
|
|
411
469
|
}, {
|
|
412
470
|
"propName": "_ref",
|
|
413
471
|
"methodName": "watch1"
|
package/dist/collection/index.js
CHANGED
|
@@ -12,6 +12,8 @@ export * from './components/card';
|
|
|
12
12
|
export * from './components/card/model';
|
|
13
13
|
export * from './components/checkbox';
|
|
14
14
|
export * from './components/checkbox/model';
|
|
15
|
+
export * from './components/custom-button';
|
|
16
|
+
export * from './components/custom-button/model';
|
|
15
17
|
export * from './components/custom-select';
|
|
16
18
|
export * from './components/custom-select-dropdown';
|
|
17
19
|
export * from './components/custom-select-dropdown/model';
|
|
@@ -60,6 +60,8 @@ export const handleDataOutside = (el) => {
|
|
|
60
60
|
return dataOutsidePair;
|
|
61
61
|
};
|
|
62
62
|
export const handleFixedDropdown = (element, parent, placement) => {
|
|
63
|
+
if (!element || !parent)
|
|
64
|
+
return;
|
|
63
65
|
// We skip this if we are in mobile it's already fixed
|
|
64
66
|
if (getComputedStyle(element).zIndex === '9999')
|
|
65
67
|
return;
|
|
@@ -249,6 +251,8 @@ const getAncestorHasCorrectedPlacement = (element) => {
|
|
|
249
251
|
};
|
|
250
252
|
export const handleFixedPopover = (element, parent, placement) => {
|
|
251
253
|
var _a, _b;
|
|
254
|
+
if (!element || !parent)
|
|
255
|
+
return;
|
|
252
256
|
const parentComputedStyles = getComputedStyle(parent);
|
|
253
257
|
const parentHasFloatingPosition = ['absolute', 'fixed'].includes(parentComputedStyles.position);
|
|
254
258
|
const ancestorWithCorrectedPlacement = getAncestorHasCorrectedPlacement(element);
|
|
@@ -70,15 +70,15 @@ export const getBooleanAsString = (originBool) => {
|
|
|
70
70
|
if (originBool === undefined || originBool === null)
|
|
71
71
|
return;
|
|
72
72
|
if (typeof originBool === 'string') {
|
|
73
|
-
return String(
|
|
73
|
+
return String(originBool === 'true');
|
|
74
74
|
}
|
|
75
75
|
return String(originBool);
|
|
76
76
|
};
|
|
77
77
|
export const getBoolean = (originBool, propertyName) => {
|
|
78
78
|
if (originBool === undefined || originBool === null)
|
|
79
79
|
return;
|
|
80
|
-
if (typeof originBool === 'string'
|
|
81
|
-
return Boolean(propertyName === originBool || originBool);
|
|
80
|
+
if (typeof originBool === 'string') {
|
|
81
|
+
return Boolean(propertyName === originBool || originBool === 'true');
|
|
82
82
|
}
|
|
83
83
|
return Boolean(originBool);
|
|
84
84
|
};
|
|
@@ -119,20 +119,19 @@ export const getStep = (step) => {
|
|
|
119
119
|
export const getInputValue = (value, inputType) => {
|
|
120
120
|
return inputType && ['number', 'range'].includes(inputType) ? getNumber(value) : value;
|
|
121
121
|
};
|
|
122
|
+
const toBool = (value) => typeof value === 'string' ? value === 'true' : value;
|
|
122
123
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
123
124
|
export const getHideProp = (show) => {
|
|
124
125
|
if (show === undefined || show === null) {
|
|
125
126
|
return undefined;
|
|
126
127
|
}
|
|
127
|
-
return getBooleanAsString(!
|
|
128
|
+
return getBooleanAsString(!toBool(show));
|
|
128
129
|
};
|
|
129
130
|
export const stringPropVisible = (givenString, showString) => {
|
|
130
131
|
if (showString === undefined) {
|
|
131
132
|
return !!givenString;
|
|
132
133
|
}
|
|
133
|
-
|
|
134
|
-
return Boolean(showString) && Boolean(givenString);
|
|
135
|
-
}
|
|
134
|
+
return toBool(showString) && Boolean(givenString);
|
|
136
135
|
};
|
|
137
136
|
export const getSearchInput = (element) => element.querySelector(`input[type="search"]`);
|
|
138
137
|
export const getOptionKey = (option, prefix) => {
|