@db-ux/wc-core-components 4.4.3 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +10 -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 +125 -106
- 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 +5 -5
- 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 +5 -5
- 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 +6 -6
- 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 +16 -8
- 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/{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-CSMPhlzz.js} +2 -2
- package/dist/cjs/index.cjs.js +3 -3
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +2 -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 +150 -107
- 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/index.js +6 -7
- package/dist/custom-elements.json +11169 -9175
- package/dist/db-ux/db-ux.esm.js +1 -1
- package/dist/db-ux/index.esm.js +1 -1
- package/dist/db-ux/p-00df7d53.entry.js +1 -0
- package/dist/db-ux/p-064ddad6.entry.js +1 -0
- package/dist/db-ux/p-0ff173fb.entry.js +1 -0
- package/dist/db-ux/p-1519dbbb.entry.js +1 -0
- package/dist/db-ux/p-16281dcb.entry.js +1 -0
- package/dist/db-ux/p-27eb6e88.entry.js +1 -0
- package/dist/db-ux/{p-f40d2d61.entry.js → p-2898ebe6.entry.js} +1 -1
- package/dist/db-ux/p-2e940d2e.entry.js +1 -0
- package/dist/db-ux/p-309259be.entry.js +1 -0
- package/dist/db-ux/p-4183b8e1.entry.js +1 -0
- package/dist/db-ux/p-4284c37f.entry.js +1 -0
- package/dist/db-ux/p-432ceb90.entry.js +1 -0
- package/dist/db-ux/p-503d5103.entry.js +1 -0
- package/dist/db-ux/p-6794144b.entry.js +1 -0
- package/dist/db-ux/p-6cb4232d.entry.js +1 -0
- package/dist/db-ux/p-6da70f61.entry.js +1 -0
- package/dist/db-ux/p-766057ea.entry.js +1 -0
- package/dist/db-ux/p-7a146dee.entry.js +1 -0
- package/dist/db-ux/p-7e274359.entry.js +1 -0
- package/dist/db-ux/p-Bs7RfNRP.js +2 -0
- 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-D_roHmuC.js +1 -0
- package/dist/db-ux/{p-fcf8e274.entry.js → p-aad9c604.entry.js} +1 -1
- package/dist/db-ux/{p-5237e5d5.entry.js → p-ad3d2cff.entry.js} +1 -1
- package/dist/db-ux/p-b218b08b.entry.js +1 -0
- package/dist/db-ux/p-bfe27311.entry.js +1 -0
- package/dist/db-ux/p-c1cf7ea4.entry.js +1 -0
- package/dist/db-ux/p-cd8557dd.entry.js +1 -0
- package/dist/db-ux/p-d2674cff.entry.js +1 -0
- package/dist/db-ux/p-d4e79c33.entry.js +1 -0
- package/dist/db-ux/p-e19f2640.entry.js +1 -0
- package/dist/db-ux/p-e3def528.entry.js +1 -0
- package/dist/db-ux/p-e6b17374.entry.js +1 -0
- package/dist/db-ux/{p-64264628.entry.js → p-ea7219af.entry.js} +1 -1
- 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 +126 -107
- 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 +5 -5
- 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 +5 -5
- 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 +6 -6
- 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 +16 -8
- 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/{form-components-BLsiOrPI.js → form-components-D6LQfJvq.js} +1 -1
- package/dist/esm/{index-Crtu1dn6.js → index-Bs7RfNRP.js} +2 -2
- package/dist/esm/{index-C4x0SOcx.js → index-xkoBSP8R.js} +6 -7
- package/dist/esm/index.js +3 -3
- package/dist/esm/loader.js +3 -3
- 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 +322 -10
- package/dist/web-types.json +600 -23
- package/package.json +4 -4
- 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-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-77150a25.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-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-b07122c4.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-fe06f815.entry.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
# @db-ux/wc-core-components
|
|
2
2
|
|
|
3
|
+
## 4.5.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- feat: add `wrap` property for possible inline components (badge, button, infotext, tooltip) besides link and navigation-item, which already have the `wrap` property - [see commit c08970c](https://github.com/db-ux-design-system/core-web/commit/c08970c640f24abee93ed17de258f4e15fa7cb7f)
|
|
8
|
+
|
|
9
|
+
- feat: add `propOverrides` property for components to provide a possibility for avoiding duplicated `id` property on Angular and Web Components - [see commit 9720ebb](https://github.com/db-ux-design-system/core-web/commit/9720ebb9c47302ed0d9939ce219a7d876ba0155c)
|
|
10
|
+
|
|
11
|
+
- feat: add DBCustomButton for development to style `<a>` or `<label><input/>` children - [see commit a50323b](https://github.com/db-ux-design-system/core-web/commit/a50323b21363981c02bbabf7828a6f2d94f11e4d)
|
|
12
|
+
|
|
3
13
|
## 4.4.3
|
|
4
14
|
|
|
5
15
|
### Patch Changes
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
5
|
|
|
6
6
|
const DBAccordionItem = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -90,9 +90,10 @@ const DBAccordionItem = class {
|
|
|
90
90
|
this.watch1Fn();
|
|
91
91
|
}
|
|
92
92
|
render() {
|
|
93
|
-
|
|
93
|
+
var _a, _b;
|
|
94
|
+
return (index.h("li", { key: 'd326ba8af9e635f673d1016cd16ef9a9a8b1503c', class: index$1.cls("db-accordion-item", this.className), id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("details", { key: '6f15470fcdaf103df318c251e941fed9fd79c4ee', "aria-disabled": index$1.getBooleanAsString(this.disabled), ref: (el) => {
|
|
94
95
|
this._ref = el;
|
|
95
|
-
}, name: this._name, open: this._open }, index.h("summary", { key: '
|
|
96
|
+
}, name: this._name, open: this._open }, index.h("summary", { key: 'db41f2b1f85dfdecf9ab37b35b04efb2e83d69af', onClick: (event) => this.handleToggle(event) }, this.headlinePlain ? this.headlinePlain : null, !this.headlinePlain ? index.h("slot", { name: "headline" }) : null), index.h("div", { key: '00a6fed4fdb26de2c998d991a6dfaee6caa3ca92' }, this.text ? this.text : index.h("slot", null)))));
|
|
96
97
|
}
|
|
97
98
|
static get watchers() { return {
|
|
98
99
|
"_ref": [{
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
5
|
|
|
6
6
|
const DBAccordion = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -129,11 +129,11 @@ const DBAccordion = class {
|
|
|
129
129
|
this.watch2Fn();
|
|
130
130
|
}
|
|
131
131
|
render() {
|
|
132
|
-
var _a;
|
|
133
|
-
return (index.h("ul", { key: '
|
|
132
|
+
var _a, _b, _c;
|
|
133
|
+
return (index.h("ul", { key: 'ea919e6fa79f820a40ece5ee3305dad84f113d1d', class: index$1.cls("db-accordion", this.className), ref: (el) => {
|
|
134
134
|
this._ref = el;
|
|
135
|
-
}, id: this.id, "data-variant": this.variant }, !this.items ? index.h("slot", null) : null, this.items
|
|
136
|
-
? (
|
|
135
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-variant": this.variant }, !this.items ? index.h("slot", null) : null, this.items
|
|
136
|
+
? (_c = this.convertItems()) === null || _c === void 0 ? void 0 : _c.map((item, index$1) => (index.h("db-accordion-item", { key: `accordion-item-${index$1}`, headlinePlain: item.headlinePlain, disabled: item.disabled, text: item.text })))
|
|
137
137
|
: null));
|
|
138
138
|
}
|
|
139
139
|
static get watchers() { return {
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
4
|
var constants = require('./constants-bMY2_d8A.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
6
6
|
|
|
7
7
|
const DBBadge = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -69,10 +69,10 @@ const DBBadge = class {
|
|
|
69
69
|
this.watch0Fn();
|
|
70
70
|
}
|
|
71
71
|
render() {
|
|
72
|
-
var _a, _b;
|
|
73
|
-
return (index.h("span", { key: '
|
|
72
|
+
var _a, _b, _c, _d;
|
|
73
|
+
return (index.h("span", { key: '285ff83ac5c79c7e1c6328aba89e1825f57dd78a', class: index$1.cls("db-badge", this.className), ref: (el) => {
|
|
74
74
|
this._ref = el;
|
|
75
|
-
}, id: this.id, "data-semantic": this.semantic, "data-size": this.size, "data-emphasis": this.emphasis, "data-placement": this.placement, "data-label": ((
|
|
75
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-size": this.size, "data-emphasis": this.emphasis, "data-placement": this.placement, "data-wrap": index$1.getBooleanAsString(this.wrap), "data-label": ((_c = this.placement) === null || _c === void 0 ? void 0 : _c.startsWith("corner")) && ((_d = this.label) !== null && _d !== void 0 ? _d : constants.DEFAULT_LABEL) }, this.text ? this.text : index.h("slot", null)));
|
|
76
76
|
}
|
|
77
77
|
static get watchers() { return {
|
|
78
78
|
"_ref": [{
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
4
|
var constants = require('./constants-bMY2_d8A.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
5
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
6
6
|
|
|
7
7
|
const DBBrand = class {
|
|
8
8
|
constructor(hostRef) {
|
|
@@ -48,10 +48,10 @@ const DBBrand = class {
|
|
|
48
48
|
this.enableAttributePassing(this._ref, "db-brand");
|
|
49
49
|
}
|
|
50
50
|
render() {
|
|
51
|
-
var _a;
|
|
52
|
-
return (index.h("div", { key: '
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
return (index.h("div", { key: '2dbff45d3e8c3dbe6f1993c3401a12f15628984d', class: index$1.cls("db-brand", this.className), ref: (el) => {
|
|
53
53
|
this._ref = el;
|
|
54
|
-
}, "data-icon": this.hideLogo ? "none" : (_a = this.icon) !== null && _a !== void 0 ? _a : constants.DEFAULT_ICON, "data-show-icon": index$1.getBooleanAsString(this.showIcon), id: this.id }, this.text ? this.text : index.h("slot", null)));
|
|
54
|
+
}, "data-icon": this.hideLogo ? "none" : (_a = this.icon) !== null && _a !== void 0 ? _a : constants.DEFAULT_ICON, "data-show-icon": index$1.getBooleanAsString(this.showIcon), id: (_b = this.id) !== null && _b !== void 0 ? _b : (_c = this.propOverrides) === null || _c === void 0 ? void 0 : _c.id }, this.text ? this.text : index.h("slot", null)));
|
|
55
55
|
}
|
|
56
56
|
};
|
|
57
57
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
5
|
|
|
6
6
|
const DBButton = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -57,10 +57,10 @@ const DBButton = class {
|
|
|
57
57
|
this.enableAttributePassing(this._ref, "db-button");
|
|
58
58
|
}
|
|
59
59
|
render() {
|
|
60
|
-
var _a, _b;
|
|
61
|
-
return (index.h("button", { key: '
|
|
60
|
+
var _a, _b, _c, _d;
|
|
61
|
+
return (index.h("button", { key: '8bd02e4a26046fa1b62f26449e961b2ba7edf377', class: index$1.cls("db-button", this.className), ref: (el) => {
|
|
62
62
|
this._ref = el;
|
|
63
|
-
}, id: this.id, type: this.getButtonType(), disabled: index$1.getBoolean(this.disabled, "disabled"), "data-icon": (
|
|
63
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, type: this.getButtonType(), disabled: index$1.getBoolean(this.disabled, "disabled"), "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": index$1.getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-wrap": index$1.getBooleanAsString(this.wrap), "data-no-text": index$1.getBooleanAsString(this.noText), name: this.name, form: this.form, value: this.value }, this.text ? this.text : index.h("slot", null)));
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
66
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
5
|
|
|
6
6
|
const DBCard = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -53,9 +53,10 @@ const DBCard = class {
|
|
|
53
53
|
this.enableAttributePassing(this._ref, "db-card");
|
|
54
54
|
}
|
|
55
55
|
render() {
|
|
56
|
-
|
|
56
|
+
var _a, _b;
|
|
57
|
+
return (index.h("div", { key: 'fc177f67efe5de971fcc6eeeb069473788988c1a', class: index$1.cls("db-card", this.className), ref: (el) => {
|
|
57
58
|
this._ref = el;
|
|
58
|
-
}, id: this.id, "data-behavior": this.behavior, "data-elevation-level": this.elevationLevel, "data-spacing": this.spacing, onClick: (event) => this.handleClick(event) }, index.h("slot", { key: '
|
|
59
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-behavior": this.behavior, "data-elevation-level": this.elevationLevel, "data-spacing": this.spacing, onClick: (event) => this.handleClick(event) }, index.h("slot", { key: 'cffa2e7b3427e279ef5ae1b3d00ff923e5c819c6' })));
|
|
59
60
|
}
|
|
60
61
|
};
|
|
61
62
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
4
|
var constants = require('./constants-bMY2_d8A.js');
|
|
5
|
-
var index$1 = require('./index-
|
|
6
|
-
var formComponents = require('./form-components-
|
|
5
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
6
|
+
var formComponents = require('./form-components-_ncB_U2D.js');
|
|
7
7
|
|
|
8
8
|
const DBCheckbox = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -71,6 +71,14 @@ const DBCheckbox = class {
|
|
|
71
71
|
this.focus.emit(event);
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
+
resetIds() {
|
|
75
|
+
var _a, _b, _c;
|
|
76
|
+
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 : `checkbox-${index$1.uuid()}`;
|
|
77
|
+
this._id = mId;
|
|
78
|
+
this._messageId = mId + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
79
|
+
this._validMessageId = mId + constants.DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
80
|
+
this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
81
|
+
}
|
|
74
82
|
/**
|
|
75
83
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
76
84
|
* @param element the ref for the component
|
|
@@ -108,16 +116,25 @@ const DBCheckbox = class {
|
|
|
108
116
|
}
|
|
109
117
|
}
|
|
110
118
|
watch0Fn() {
|
|
119
|
+
var _a, _b;
|
|
120
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
121
|
+
this.resetIds();
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
watch0() {
|
|
125
|
+
this.watch0Fn();
|
|
126
|
+
}
|
|
127
|
+
watch1Fn() {
|
|
111
128
|
var _a;
|
|
112
129
|
this._invalidMessage =
|
|
113
130
|
this.invalidMessage ||
|
|
114
131
|
((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
|
|
115
132
|
constants.DEFAULT_INVALID_MESSAGE;
|
|
116
133
|
}
|
|
117
|
-
|
|
118
|
-
this.
|
|
134
|
+
watch1() {
|
|
135
|
+
this.watch1Fn();
|
|
119
136
|
}
|
|
120
|
-
|
|
137
|
+
watch2Fn() {
|
|
121
138
|
if (this._id) {
|
|
122
139
|
const messageId = this._id + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
123
140
|
this._messageId = messageId;
|
|
@@ -129,10 +146,10 @@ const DBCheckbox = class {
|
|
|
129
146
|
this.handleValidation();
|
|
130
147
|
}
|
|
131
148
|
}
|
|
132
|
-
|
|
133
|
-
this.
|
|
149
|
+
watch2() {
|
|
150
|
+
this.watch2Fn();
|
|
134
151
|
}
|
|
135
|
-
|
|
152
|
+
watch3Fn() {
|
|
136
153
|
if (this._ref) {
|
|
137
154
|
if (this.indeterminate !== undefined) {
|
|
138
155
|
// When indeterminate is set, the value of the checked prop only impacts the form submitted values.
|
|
@@ -141,10 +158,10 @@ const DBCheckbox = class {
|
|
|
141
158
|
}
|
|
142
159
|
}
|
|
143
160
|
}
|
|
144
|
-
|
|
145
|
-
this.
|
|
161
|
+
watch3() {
|
|
162
|
+
this.watch3Fn();
|
|
146
163
|
}
|
|
147
|
-
|
|
164
|
+
watch4Fn() {
|
|
148
165
|
if (this.initialized && this._ref) {
|
|
149
166
|
// in angular this must be set via native element
|
|
150
167
|
if (this.checked != undefined) {
|
|
@@ -153,10 +170,10 @@ const DBCheckbox = class {
|
|
|
153
170
|
this.initialized = false;
|
|
154
171
|
}
|
|
155
172
|
}
|
|
156
|
-
|
|
157
|
-
this.
|
|
173
|
+
watch4() {
|
|
174
|
+
this.watch4Fn();
|
|
158
175
|
}
|
|
159
|
-
|
|
176
|
+
watch5Fn() {
|
|
160
177
|
if (this._ref) {
|
|
161
178
|
const defaultChecked = undefined;
|
|
162
179
|
let controller = this.abortController;
|
|
@@ -172,24 +189,20 @@ const DBCheckbox = class {
|
|
|
172
189
|
}, controller.signal);
|
|
173
190
|
}
|
|
174
191
|
}
|
|
175
|
-
|
|
176
|
-
this.
|
|
192
|
+
watch5() {
|
|
193
|
+
this.watch5Fn();
|
|
177
194
|
}
|
|
178
195
|
componentDidLoad() {
|
|
179
|
-
var _a;
|
|
180
196
|
this.enableAttributePassing(this._ref, "db-checkbox");
|
|
181
197
|
this.initialized = true;
|
|
182
|
-
|
|
183
|
-
this._id = mId;
|
|
184
|
-
this._messageId = mId + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
185
|
-
this._validMessageId = mId + constants.DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
186
|
-
this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
198
|
+
this.resetIds();
|
|
187
199
|
this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
|
|
188
200
|
this.watch0Fn();
|
|
189
201
|
this.watch1Fn();
|
|
190
202
|
this.watch2Fn();
|
|
191
203
|
this.watch3Fn();
|
|
192
204
|
this.watch4Fn();
|
|
205
|
+
this.watch5Fn();
|
|
193
206
|
}
|
|
194
207
|
disconnectedCallback() {
|
|
195
208
|
var _a;
|
|
@@ -197,36 +210,42 @@ const DBCheckbox = class {
|
|
|
197
210
|
}
|
|
198
211
|
render() {
|
|
199
212
|
var _a;
|
|
200
|
-
return (index.h("div", { key: '
|
|
213
|
+
return (index.h("div", { key: '433618f3dbf837b2b8febeb5b3acd77b0cebbc24', class: index$1.cls("db-checkbox", this.className), "data-size": this.size, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-hide-label": index$1.getHideProp(this.showLabel) }, index.h("label", { key: '02b767c372314a2dc32b90fec28a0a2d4caa67c1', htmlFor: this._id }, index.h("input", { key: '1fc78fbb4079f69ed7bde43097ff3125ec67edf9', type: "checkbox", "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
|
|
201
214
|
this._ref = el;
|
|
202
|
-
}, id: this._id, name: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, required: index$1.getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : index.h("slot", null)), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '
|
|
215
|
+
}, id: this._id, name: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, required: index$1.getBoolean(this.required, "required"), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_a = this.ariaDescribedBy) !== null && _a !== void 0 ? _a : this._descByIds }), this.label ? this.label : index.h("slot", null)), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: '1bc15384adefeb0a9749ebe60ee8e130e9258321', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), index.h("span", { key: '9daadc858ce041949b5470e6914c2c22f5a2918e', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
203
216
|
}
|
|
204
217
|
static get watchers() { return {
|
|
205
|
-
"
|
|
218
|
+
"id": [{
|
|
206
219
|
"watch0": 0
|
|
207
|
-
},
|
|
208
|
-
|
|
220
|
+
}],
|
|
221
|
+
"propOverrides?.id": [{
|
|
222
|
+
"watch0": 0
|
|
223
|
+
}],
|
|
224
|
+
"_ref": [{
|
|
225
|
+
"watch1": 0
|
|
209
226
|
}, {
|
|
210
227
|
"watch3": 0
|
|
211
228
|
}, {
|
|
212
229
|
"watch4": 0
|
|
230
|
+
}, {
|
|
231
|
+
"watch5": 0
|
|
213
232
|
}],
|
|
214
233
|
"invalidMessage": [{
|
|
215
|
-
"
|
|
234
|
+
"watch1": 0
|
|
216
235
|
}],
|
|
217
236
|
"_id": [{
|
|
218
|
-
"
|
|
237
|
+
"watch2": 0
|
|
219
238
|
}],
|
|
220
239
|
"initialized": [{
|
|
221
|
-
"watch2": 0
|
|
222
|
-
}, {
|
|
223
240
|
"watch3": 0
|
|
241
|
+
}, {
|
|
242
|
+
"watch4": 0
|
|
224
243
|
}],
|
|
225
244
|
"indeterminate": [{
|
|
226
|
-
"
|
|
245
|
+
"watch3": 0
|
|
227
246
|
}],
|
|
228
247
|
"checked": [{
|
|
229
|
-
"
|
|
248
|
+
"watch4": 0
|
|
230
249
|
}]
|
|
231
250
|
}; }
|
|
232
251
|
};
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
|
+
|
|
6
|
+
const DBCustomButton = class {
|
|
7
|
+
constructor(hostRef) {
|
|
8
|
+
index.registerInstance(this, hostRef);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
12
|
+
* @param element the ref for the component
|
|
13
|
+
* @param customElementSelector the custom element like `my-component`
|
|
14
|
+
*/
|
|
15
|
+
enableAttributePassing(element, customElementSelector) {
|
|
16
|
+
const parent = element === null || element === void 0 ? void 0 : element.closest(customElementSelector);
|
|
17
|
+
if (element && parent) {
|
|
18
|
+
const attributes = parent.attributes;
|
|
19
|
+
for (let i = 0; i < attributes.length; i++) {
|
|
20
|
+
const attr = attributes.item(i);
|
|
21
|
+
if (attr && attr.name !== 'data-density' &&
|
|
22
|
+
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
23
|
+
element.setAttribute(attr.name, attr.value);
|
|
24
|
+
parent.removeAttribute(attr.name);
|
|
25
|
+
}
|
|
26
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
27
|
+
element.setAttribute(attr.name, attr.value);
|
|
28
|
+
parent.removeAttribute(attr.name);
|
|
29
|
+
}
|
|
30
|
+
else if (attr && attr.name === "class") {
|
|
31
|
+
const isWebComponent = attr.value.includes("hydrated");
|
|
32
|
+
const value = attr.value.replace("hydrated", "").trim();
|
|
33
|
+
const currentClass = element.getAttribute("class");
|
|
34
|
+
element.setAttribute(attr.name, `${currentClass ? `${currentClass} ` : ""}${value}`);
|
|
35
|
+
if (isWebComponent) {
|
|
36
|
+
// Stencil is using this class for lazy loading component
|
|
37
|
+
parent.setAttribute("class", "hydrated");
|
|
38
|
+
}
|
|
39
|
+
else {
|
|
40
|
+
parent.removeAttribute(attr.name);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
componentDidLoad() {
|
|
47
|
+
this.enableAttributePassing(this._ref, "db-custom-button");
|
|
48
|
+
}
|
|
49
|
+
render() {
|
|
50
|
+
var _a, _b, _c, _d;
|
|
51
|
+
return (index.h("div", { key: 'ee954dad8cd0baff52172a1ec9553c43673d0fa4', class: index$1.cls("db-custom-button", this.className), ref: (el) => {
|
|
52
|
+
this._ref = el;
|
|
53
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-icon": (_c = this.iconLeading) !== null && _c !== void 0 ? _c : this.icon, "data-show-icon": index$1.getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-icon-trailing": this.iconTrailing, "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing), "data-size": this.size, "data-width": this.width, "data-variant": this.variant, "data-no-text": index$1.getBooleanAsString(this.noText) }, index.h("slot", { key: 'accbe2a436c60ecb945aea8b008453e3a264fd2b' })));
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
exports.db_custom_button = DBCustomButton;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var index = require('./index-
|
|
4
|
-
var index$1 = require('./index-
|
|
3
|
+
var index = require('./index-CSMPhlzz.js');
|
|
4
|
+
var index$1 = require('./index-2_9ESkQu.js');
|
|
5
5
|
var constants = require('./constants-bMY2_d8A.js');
|
|
6
|
-
var formComponents = require('./form-components-
|
|
6
|
+
var formComponents = require('./form-components-_ncB_U2D.js');
|
|
7
7
|
|
|
8
8
|
const DBCustomSelectDropdown = class {
|
|
9
9
|
constructor(hostRef) {
|
|
@@ -50,9 +50,10 @@ const DBCustomSelectDropdown = class {
|
|
|
50
50
|
this.enableAttributePassing(this._ref, "db-custom-select-dropdown");
|
|
51
51
|
}
|
|
52
52
|
render() {
|
|
53
|
-
|
|
53
|
+
var _a, _b;
|
|
54
|
+
return (index.h("article", { key: '18ea31a3993786aed93fbb95fabc349231b455ae', class: index$1.cls("db-custom-select-dropdown db-card", this.className), "data-spacing": "none", ref: (el) => {
|
|
54
55
|
this._ref = el;
|
|
55
|
-
}, id: this.id, "data-width": this.width }, index.h("slot", { key: '
|
|
56
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-width": this.width }, index.h("slot", { key: '14a29534f56e6fe16c6d6e856b26aba549fef8dc' })));
|
|
56
57
|
}
|
|
57
58
|
};
|
|
58
59
|
|
|
@@ -100,9 +101,10 @@ const DBCustomSelectList = class {
|
|
|
100
101
|
this.enableAttributePassing(this._ref, "db-custom-select-list");
|
|
101
102
|
}
|
|
102
103
|
render() {
|
|
103
|
-
|
|
104
|
+
var _a, _b;
|
|
105
|
+
return (index.h("div", { key: '7694da5a9c97c4f603217d79afd88afe63719db8', class: index$1.cls("db-custom-select-list", this.className), role: this.multiple ? "group" : "radiogroup", "aria-label": this.label, ref: (el) => {
|
|
104
106
|
this._ref = el;
|
|
105
|
-
}, id: this.id }, index.h("ul", { key: '
|
|
107
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, index.h("ul", { key: '5c718c452425cfec8a6234d5ae2cf6aef7ed4655' }, index.h("slot", { key: '93b311c5a750a9ec2b0cb9ab4f7453aa25cc77d8' }))));
|
|
106
108
|
}
|
|
107
109
|
};
|
|
108
110
|
|
|
@@ -171,12 +173,13 @@ const DBCustomSelectListItem = class {
|
|
|
171
173
|
this.watch0Fn();
|
|
172
174
|
}
|
|
173
175
|
render() {
|
|
174
|
-
|
|
176
|
+
var _a, _b;
|
|
177
|
+
return (index.h("li", { key: '40ae5213dd63ce580e2a036e5bf4781065026a30', class: index$1.cls("db-custom-select-list-item", this.className, {
|
|
175
178
|
"db-checkbox": this.type === "checkbox" && !this.isGroupTitle,
|
|
176
179
|
"db-radio": this.type !== "checkbox" && !this.isGroupTitle,
|
|
177
180
|
}), ref: (el) => {
|
|
178
181
|
this._ref = el;
|
|
179
|
-
}, id: this.id, "data-divider": index$1.getBooleanAsString(this.hasDivider) }, !this.isGroupTitle ? (index.h("label", { "data-icon": this.type !== "checkbox" && this.icon ? this.icon : undefined, "data-show-icon": index$1.getBooleanAsString(this.showIcon), "data-icon-trailing": this.getIconTrailing() }, index.h("input", { class: "db-custom-select-list-item-checkbox", "data-disable-focus": "true", type: this.type, name: this.name, form: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, onChange: (event) => this.handleChange(event) }), this.label ? this.label : index.h("slot", null))) : (index.h("span", null, this.groupTitle))));
|
|
182
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-divider": index$1.getBooleanAsString(this.hasDivider) }, !this.isGroupTitle ? (index.h("label", { "data-icon": this.type !== "checkbox" && this.icon ? this.icon : undefined, "data-show-icon": index$1.getBooleanAsString(this.showIcon), "data-icon-trailing": this.getIconTrailing() }, index.h("input", { class: "db-custom-select-list-item-checkbox", "data-disable-focus": "true", type: this.type, name: this.name, form: this.name, checked: index$1.getBoolean(this.checked, "checked"), disabled: index$1.getBoolean(this.disabled, "disabled"), value: this.value, onChange: (event) => this.handleChange(event) }), this.label ? this.label : index.h("slot", null))) : (index.h("span", null, this.groupTitle))));
|
|
180
183
|
}
|
|
181
184
|
static get watchers() { return {
|
|
182
185
|
"isGroupTitle": [{
|
|
@@ -271,6 +274,15 @@ const DBInput = class {
|
|
|
271
274
|
}))
|
|
272
275
|
: _list) || []);
|
|
273
276
|
}
|
|
277
|
+
resetIds() {
|
|
278
|
+
var _a, _b, _c;
|
|
279
|
+
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 : `input-${index$1.uuid()}`;
|
|
280
|
+
this._id = mId;
|
|
281
|
+
this._messageId = mId + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
282
|
+
this._validMessageId = mId + constants.DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
283
|
+
this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
284
|
+
this._dataListId = mId + constants.DEFAULT_DATALIST_ID_SUFFIX;
|
|
285
|
+
}
|
|
274
286
|
/**
|
|
275
287
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
276
288
|
* @param element the ref for the component
|
|
@@ -308,16 +320,25 @@ const DBInput = class {
|
|
|
308
320
|
}
|
|
309
321
|
}
|
|
310
322
|
watch0Fn() {
|
|
323
|
+
var _a, _b;
|
|
324
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
325
|
+
this.resetIds();
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
watch0() {
|
|
329
|
+
this.watch0Fn();
|
|
330
|
+
}
|
|
331
|
+
watch1Fn() {
|
|
311
332
|
var _a;
|
|
312
333
|
this._invalidMessage =
|
|
313
334
|
this.invalidMessage ||
|
|
314
335
|
((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
|
|
315
336
|
constants.DEFAULT_INVALID_MESSAGE;
|
|
316
337
|
}
|
|
317
|
-
|
|
318
|
-
this.
|
|
338
|
+
watch1() {
|
|
339
|
+
this.watch1Fn();
|
|
319
340
|
}
|
|
320
|
-
|
|
341
|
+
watch2Fn() {
|
|
321
342
|
var _a;
|
|
322
343
|
if (this._id) {
|
|
323
344
|
const messageId = this._id + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
@@ -332,18 +353,18 @@ const DBInput = class {
|
|
|
332
353
|
this.handleValidation();
|
|
333
354
|
}
|
|
334
355
|
}
|
|
335
|
-
|
|
336
|
-
this.
|
|
356
|
+
watch2() {
|
|
357
|
+
this.watch2Fn();
|
|
337
358
|
}
|
|
338
|
-
|
|
359
|
+
watch3Fn() {
|
|
339
360
|
if (this.value !== undefined) {
|
|
340
361
|
this._value = this.value;
|
|
341
362
|
}
|
|
342
363
|
}
|
|
343
|
-
|
|
344
|
-
this.
|
|
364
|
+
watch3() {
|
|
365
|
+
this.watch3Fn();
|
|
345
366
|
}
|
|
346
|
-
|
|
367
|
+
watch4Fn() {
|
|
347
368
|
// If angular uses ngModel value and _value are null
|
|
348
369
|
// then the value will be set afterward and the _ref will be refreshed
|
|
349
370
|
const addResetListener = true;
|
|
@@ -363,23 +384,18 @@ const DBInput = class {
|
|
|
363
384
|
}, controller.signal);
|
|
364
385
|
}
|
|
365
386
|
}
|
|
366
|
-
|
|
367
|
-
this.
|
|
387
|
+
watch4() {
|
|
388
|
+
this.watch4Fn();
|
|
368
389
|
}
|
|
369
390
|
componentDidLoad() {
|
|
370
|
-
var _a;
|
|
371
391
|
this.enableAttributePassing(this._ref, "db-input");
|
|
372
|
-
|
|
373
|
-
this._id = mId;
|
|
374
|
-
this._messageId = mId + constants.DEFAULT_MESSAGE_ID_SUFFIX;
|
|
375
|
-
this._validMessageId = mId + constants.DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
376
|
-
this._invalidMessageId = mId + constants.DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
377
|
-
this._dataListId = mId + constants.DEFAULT_DATALIST_ID_SUFFIX;
|
|
392
|
+
this.resetIds();
|
|
378
393
|
this._invalidMessage = this.invalidMessage || constants.DEFAULT_INVALID_MESSAGE;
|
|
379
394
|
this.watch0Fn();
|
|
380
395
|
this.watch1Fn();
|
|
381
396
|
this.watch2Fn();
|
|
382
397
|
this.watch3Fn();
|
|
398
|
+
this.watch4Fn();
|
|
383
399
|
}
|
|
384
400
|
disconnectedCallback() {
|
|
385
401
|
var _a;
|
|
@@ -387,7 +403,7 @@ const DBInput = class {
|
|
|
387
403
|
}
|
|
388
404
|
render() {
|
|
389
405
|
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
390
|
-
return (index.h("div", { key: '
|
|
406
|
+
return (index.h("div", { key: 'cd3b45e50318203965c74406dfe058b5c667520a', class: index$1.cls("db-input", this.className), "data-variant": this.variant, "data-hide-label": index$1.getHideProp(this.showLabel), "data-show-icon": index$1.getBooleanAsString((_a = this.showIconLeading) !== null && _a !== void 0 ? _a : this.showIcon), "data-icon": (_b = this.iconLeading) !== null && _b !== void 0 ? _b : this.icon, "data-icon-trailing": this.iconTrailing, "data-hide-asterisk": index$1.getHideProp(this.showRequiredAsterisk), "data-show-icon-trailing": index$1.getBooleanAsString(this.showIconTrailing) }, index.h("label", { key: '07a3c4f58cd6531ce8891e18603a6f534d2df1a5', htmlFor: this._id }, (_c = this.label) !== null && _c !== void 0 ? _c : constants.DEFAULT_LABEL), index.h("input", { key: 'b90a93ed9454972000e4e3f37cb839a3d14ab3ec', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, "data-field-sizing": this.fieldSizing, ref: (el) => {
|
|
391
407
|
this._ref = el;
|
|
392
408
|
}, id: this._id, name: this.name, type: this.type || "text", multiple: index$1.getBoolean(this.multiple, "multiple"), accept: this.accept, placeholder: (_d = this.placeholder) !== null && _d !== void 0 ? _d : constants.DEFAULT_PLACEHOLDER, disabled: index$1.getBoolean(this.disabled, "disabled"), required: index$1.getBoolean(this.required, "required"), step: index$1.getStep(this.step), value: (_e = this.value) !== null && _e !== void 0 ? _e : this._value, maxLength: index$1.getNumber(this.maxLength, this.maxlength), minLength: index$1.getNumber(this.minLength, this.minlength), max: index$1.getInputValue(this.max, this.type), min: index$1.getInputValue(this.min, this.type), readOnly: index$1.getBoolean(this.readOnly, "readOnly") ||
|
|
393
409
|
index$1.getBoolean(this.readonly, "readonly"), form: this.form, pattern: this.pattern, size: this.size, autoComplete: this.autocomplete, autoFocus: index$1.getBoolean(this.autofocus, "autofocus"), enterKeyHint: this.enterkeyhint, inputMode: this.inputmode, onInput: (event) => this.handleInput(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), list: this.dataList && this._dataListId, "aria-describedby": (_f = this.ariaDescribedBy) !== null && _f !== void 0 ? _f : this._descByIds, role: [
|
|
@@ -399,22 +415,28 @@ const DBInput = class {
|
|
|
399
415
|
"color",
|
|
400
416
|
].includes((_g = this.type) !== null && _g !== void 0 ? _g : "") && index$1.isIOSSafari()
|
|
401
417
|
? "textbox"
|
|
402
|
-
: undefined }), this.dataList ? (index.h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (index.h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, index.h("slot", { key: '
|
|
418
|
+
: undefined }), this.dataList ? (index.h("datalist", { id: this._dataListId }, (_h = this.getDataList()) === null || _h === void 0 ? void 0 : _h.map((option) => (index.h("option", { key: this._dataListId + "-option-" + option.value, value: option.value }, option.label))))) : null, index.h("slot", { key: '1333f33d378f1d888146fba5143867051b697a2d' }), index$1.stringPropVisible(this.message, this.showMessage) ? (index.h("db-infotext", { size: this.messageSize || "small", icon: this.messageIcon, id: this._messageId }, this.message)) : null, this.hasValidState() ? (index.h("db-infotext", { semantic: "successful", id: this._validMessageId, size: this.validMessageSize || "small" }, this.validMessage || constants.DEFAULT_VALID_MESSAGE)) : null, index.h("db-infotext", { key: 'bac739c900da2b312dbfd253f845f59fdf177f8d', semantic: "critical", id: this._invalidMessageId, size: this.invalidMessageSize || "small" }, this._invalidMessage), index.h("span", { key: '46779c27b49d4fd389ac446e4e8c097fae65f51b', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
403
419
|
}
|
|
404
420
|
static get watchers() { return {
|
|
405
|
-
"
|
|
421
|
+
"id": [{
|
|
406
422
|
"watch0": 0
|
|
423
|
+
}],
|
|
424
|
+
"propOverrides?.id": [{
|
|
425
|
+
"watch0": 0
|
|
426
|
+
}],
|
|
427
|
+
"_ref": [{
|
|
428
|
+
"watch1": 0
|
|
407
429
|
}, {
|
|
408
|
-
"
|
|
430
|
+
"watch4": 0
|
|
409
431
|
}],
|
|
410
432
|
"invalidMessage": [{
|
|
411
|
-
"
|
|
433
|
+
"watch1": 0
|
|
412
434
|
}],
|
|
413
435
|
"_id": [{
|
|
414
|
-
"
|
|
436
|
+
"watch2": 0
|
|
415
437
|
}],
|
|
416
438
|
"value": [{
|
|
417
|
-
"
|
|
439
|
+
"watch3": 0
|
|
418
440
|
}]
|
|
419
441
|
}; }
|
|
420
442
|
};
|
|
@@ -479,10 +501,10 @@ const DBTag = class {
|
|
|
479
501
|
this.enableAttributePassing(this._ref, "db-tag");
|
|
480
502
|
}
|
|
481
503
|
render() {
|
|
482
|
-
var _a;
|
|
483
|
-
return (index.h("div", { key: '
|
|
504
|
+
var _a, _b, _c;
|
|
505
|
+
return (index.h("div", { key: 'd84df9f55535db4fbe9befd09fd2eef8125069c4', class: index$1.cls("db-tag", this.className), ref: (el) => {
|
|
484
506
|
this._ref = el;
|
|
485
|
-
}, id: this.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": index$1.getBooleanAsString((
|
|
507
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-semantic": this.semantic, "data-emphasis": this.emphasis, "data-icon": this.icon, "data-show-check-state": index$1.getBooleanAsString((_c = this.showCheckState) !== null && _c !== void 0 ? _c : true), "data-show-icon": index$1.getBooleanAsString(this.showIcon), "data-no-text": index$1.getBooleanAsString(this.noText), "data-overflow": index$1.getBooleanAsString(this.overflow) }, index.h("slot", { key: '9f4d27ce3f4d4d2e1d193167148168a2cb8784dd', name: "content" }), index.h("slot", { key: '9feecc10d65e9f807709e5d90b90f69be72b8efb' }), this.text ? this.text : null, this.behavior === "removable" ? (index.h("button", { class: "db-button db-tab-remove-button", "data-icon": "cross", "data-size": "small", "data-no-text": "true", "data-variant": "ghost", type: "button", onClick: (event) => this.handleRemove(event) }, index.h("db-tooltip", { variant: "label" }, this.getRemoveButtonText()))) : null));
|
|
486
508
|
}
|
|
487
509
|
};
|
|
488
510
|
|