@db-ux/wc-core-components 4.4.2 → 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 +20 -0
- package/dist/cjs/db-accordion-item.cjs.entry.js +11 -6
- package/dist/cjs/db-accordion.cjs.entry.js +12 -8
- package/dist/cjs/db-badge.cjs.entry.js +11 -7
- package/dist/cjs/db-brand.cjs.entry.js +11 -7
- package/dist/cjs/db-button.cjs.entry.js +11 -7
- package/dist/cjs/db-card.cjs.entry.js +11 -6
- package/dist/cjs/db-checkbox.cjs.entry.js +59 -36
- package/dist/cjs/db-custom-button.cjs.entry.js +57 -0
- package/dist/cjs/db-custom-select-dropdown_5.cjs.entry.js +89 -47
- package/dist/cjs/db-custom-select-form-field.cjs.entry.js +11 -6
- package/dist/cjs/db-custom-select.cjs.entry.js +133 -110
- package/dist/cjs/db-divider.cjs.entry.js +11 -6
- package/dist/cjs/db-drawer.cjs.entry.js +12 -8
- package/dist/cjs/db-header.cjs.entry.js +13 -9
- package/dist/cjs/db-icon.cjs.entry.js +11 -6
- package/dist/cjs/db-infotext.cjs.entry.js +11 -7
- package/dist/cjs/db-link.cjs.entry.js +11 -7
- package/dist/cjs/db-navigation-item.cjs.entry.js +13 -9
- package/dist/cjs/db-navigation.cjs.entry.js +11 -6
- package/dist/cjs/db-notification.cjs.entry.js +12 -8
- package/dist/cjs/db-page.cjs.entry.js +11 -6
- package/dist/cjs/db-popover.cjs.entry.js +14 -10
- package/dist/cjs/db-radio.cjs.entry.js +39 -16
- package/dist/cjs/db-section.cjs.entry.js +11 -6
- package/dist/cjs/db-select.cjs.entry.js +54 -31
- package/dist/cjs/db-stack.cjs.entry.js +11 -6
- package/dist/cjs/db-switch.cjs.entry.js +64 -24
- package/dist/cjs/db-tab-item_3.cjs.entry.js +29 -15
- package/dist/cjs/db-tabs.cjs.entry.js +12 -8
- package/dist/cjs/db-textarea.cjs.entry.js +52 -29
- package/dist/cjs/db-tooltip.cjs.entry.js +25 -12
- 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-ogUqz72V.js → floating-components-pYaTeNhp.js} +65 -15
- 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-CEqZnn9s.js → index-CSMPhlzz.js} +2 -2
- package/dist/cjs/index.cjs.js +5 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/{navigation-DauGE-qj.js → navigation-BztJmEHf.js} +1 -1
- package/dist/collection/collection-manifest.json +2 -1
- package/dist/collection/components/accordion/accordion.js +34 -6
- package/dist/collection/components/accordion-item/accordion-item.js +33 -4
- package/dist/collection/components/badge/badge.js +60 -6
- package/dist/collection/components/brand/brand.js +33 -5
- package/dist/collection/components/button/button.js +59 -5
- package/dist/collection/components/card/card.js +33 -4
- package/dist/collection/components/checkbox/checkbox.js +87 -40
- 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 +157 -110
- package/dist/collection/components/custom-select-dropdown/custom-select-dropdown.js +33 -4
- package/dist/collection/components/custom-select-form-field/custom-select-form-field.js +33 -4
- package/dist/collection/components/custom-select-list/custom-select-list.js +33 -4
- package/dist/collection/components/custom-select-list-item/custom-select-list-item.js +33 -4
- package/dist/collection/components/divider/divider.js +33 -4
- package/dist/collection/components/drawer/drawer.js +34 -6
- package/dist/collection/components/header/header.js +33 -5
- package/dist/collection/components/icon/icon.js +33 -4
- package/dist/collection/components/infotext/infotext.js +59 -5
- package/dist/collection/components/input/input.js +80 -33
- package/dist/collection/components/link/link.js +33 -5
- package/dist/collection/components/navigation/navigation.js +33 -4
- package/dist/collection/components/navigation-item/navigation-item.js +33 -5
- package/dist/collection/components/notification/notification.js +34 -6
- package/dist/collection/components/page/page.js +33 -4
- package/dist/collection/components/popover/popover.js +34 -6
- package/dist/collection/components/radio/radio.js +60 -13
- package/dist/collection/components/section/section.js +33 -4
- package/dist/collection/components/select/select.js +81 -34
- package/dist/collection/components/stack/stack.js +33 -4
- package/dist/collection/components/switch/switch.js +118 -50
- package/dist/collection/components/tab-item/tab-item.js +33 -5
- package/dist/collection/components/tab-list/tab-list.js +33 -4
- package/dist/collection/components/tab-panel/tab-panel.js +33 -4
- package/dist/collection/components/tabs/tabs.js +34 -6
- package/dist/collection/components/tag/tag.js +33 -5
- package/dist/collection/components/textarea/textarea.js +79 -32
- package/dist/collection/components/tooltip/tooltip.js +71 -8
- package/dist/collection/index.js +2 -0
- package/dist/collection/utils/floating-components.js +65 -15
- package/dist/collection/utils/index.js +6 -7
- package/dist/custom-elements.json +19735 -1796
- 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-2898ebe6.entry.js +1 -0
- 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-DfYL98sI.js +1 -0
- package/dist/db-ux/p-aad9c604.entry.js +1 -0
- package/dist/db-ux/p-ad3d2cff.entry.js +1 -0
- 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-sP2NlPcu.js → p-cNk4ImpW.js} +1 -1
- 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-ea7219af.entry.js +1 -0
- package/dist/db-ux/p-xkoBSP8R.js +1 -0
- package/dist/esm/db-accordion-item.entry.js +11 -6
- package/dist/esm/db-accordion.entry.js +12 -8
- package/dist/esm/db-badge.entry.js +11 -7
- package/dist/esm/db-brand.entry.js +11 -7
- package/dist/esm/db-button.entry.js +11 -7
- package/dist/esm/db-card.entry.js +11 -6
- package/dist/esm/db-checkbox.entry.js +60 -37
- package/dist/esm/db-custom-button.entry.js +55 -0
- package/dist/esm/db-custom-select-dropdown_5.entry.js +90 -48
- package/dist/esm/db-custom-select-form-field.entry.js +11 -6
- package/dist/esm/db-custom-select.entry.js +134 -111
- package/dist/esm/db-divider.entry.js +11 -6
- package/dist/esm/db-drawer.entry.js +12 -8
- package/dist/esm/db-header.entry.js +13 -9
- package/dist/esm/db-icon.entry.js +11 -6
- package/dist/esm/db-infotext.entry.js +11 -7
- package/dist/esm/db-link.entry.js +11 -7
- package/dist/esm/db-navigation-item.entry.js +13 -9
- package/dist/esm/db-navigation.entry.js +11 -6
- package/dist/esm/db-notification.entry.js +12 -8
- package/dist/esm/db-page.entry.js +11 -6
- package/dist/esm/db-popover.entry.js +14 -10
- package/dist/esm/db-radio.entry.js +39 -16
- package/dist/esm/db-section.entry.js +11 -6
- package/dist/esm/db-select.entry.js +55 -32
- package/dist/esm/db-stack.entry.js +11 -6
- package/dist/esm/db-switch.entry.js +64 -24
- package/dist/esm/db-tab-item_3.entry.js +29 -15
- package/dist/esm/db-tabs.entry.js +12 -8
- package/dist/esm/db-textarea.entry.js +53 -30
- package/dist/esm/db-tooltip.entry.js +25 -12
- 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-G-TursYV.js → floating-components-DfYL98sI.js} +65 -15
- package/dist/esm/{form-components-BLsiOrPI.js → form-components-D6LQfJvq.js} +1 -1
- package/dist/esm/{index-BrThqi62.js → index-Bs7RfNRP.js} +2 -2
- 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--UdC9CzO.js → navigation-DgsMCdfn.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/model.d.ts +1 -1
- 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 +146 -6
- package/dist/types/index.d.ts +2 -0
- package/dist/types/shared/model.d.ts +17 -3
- package/dist/types/stencil-public-runtime.d.ts +3 -1
- package/dist/vscode.html-custom-data.json +1981 -245
- package/dist/web-types.json +3299 -648
- package/package.json +4 -4
- package/dist/db-ux/p-07bf3657.entry.js +0 -1
- package/dist/db-ux/p-0a89cbcd.entry.js +0 -1
- package/dist/db-ux/p-15539d9d.entry.js +0 -1
- package/dist/db-ux/p-41cb4673.entry.js +0 -1
- package/dist/db-ux/p-460073dd.entry.js +0 -1
- package/dist/db-ux/p-4a9b9909.entry.js +0 -1
- package/dist/db-ux/p-4ec09cf1.entry.js +0 -1
- package/dist/db-ux/p-57205dfd.entry.js +0 -1
- package/dist/db-ux/p-5775bf7a.entry.js +0 -1
- package/dist/db-ux/p-5bcde39a.entry.js +0 -1
- package/dist/db-ux/p-6341aaa9.entry.js +0 -1
- package/dist/db-ux/p-64573104.entry.js +0 -1
- package/dist/db-ux/p-6b63156d.entry.js +0 -1
- package/dist/db-ux/p-70822a27.entry.js +0 -1
- package/dist/db-ux/p-710a430d.entry.js +0 -1
- package/dist/db-ux/p-72d712b0.entry.js +0 -1
- package/dist/db-ux/p-7b7f4d03.entry.js +0 -1
- package/dist/db-ux/p-7bd4c573.entry.js +0 -1
- package/dist/db-ux/p-819cf20a.entry.js +0 -1
- package/dist/db-ux/p-87fdbcfb.entry.js +0 -1
- package/dist/db-ux/p-9051e26c.entry.js +0 -1
- package/dist/db-ux/p-934a708c.entry.js +0 -1
- package/dist/db-ux/p-9ffa5c48.entry.js +0 -1
- package/dist/db-ux/p-BhXdfCpU.js +0 -1
- package/dist/db-ux/p-BrThqi62.js +0 -2
- package/dist/db-ux/p-C4x0SOcx.js +0 -1
- package/dist/db-ux/p-G-TursYV.js +0 -1
- package/dist/db-ux/p-RHqkTr-_.js +0 -1
- package/dist/db-ux/p-a9af70eb.entry.js +0 -1
- package/dist/db-ux/p-aa8383a3.entry.js +0 -1
- package/dist/db-ux/p-ba1f69bd.entry.js +0 -1
- package/dist/db-ux/p-d273b998.entry.js +0 -1
- package/dist/db-ux/p-da4ee6ee.entry.js +0 -1
- package/dist/db-ux/p-e584e927.entry.js +0 -1
- package/dist/db-ux/p-fe185f98.entry.js +0 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-
|
|
2
|
-
import { l as DEFAULT_INVALID_MESSAGE,
|
|
3
|
-
import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, g as getBooleanAsString, l as getHideProp, c as cls } from './index-
|
|
4
|
-
import { c as addValueResetEventListener } from './form-components-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Bs7RfNRP.js';
|
|
2
|
+
import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, i as DEFAULT_PLACEHOLDER_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE, a as DEFAULT_LABEL } from './constants-BdL-nI5y.js';
|
|
3
|
+
import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, g as getBooleanAsString, l as getHideProp, c as cls } from './index-xkoBSP8R.js';
|
|
4
|
+
import { c as addValueResetEventListener } from './form-components-D6LQfJvq.js';
|
|
5
5
|
|
|
6
6
|
const DBSelect = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -102,6 +102,15 @@ const DBSelect = class {
|
|
|
102
102
|
// Default: show empty option for non-required selects
|
|
103
103
|
return !this.required;
|
|
104
104
|
}
|
|
105
|
+
resetIds() {
|
|
106
|
+
var _a, _b, _c;
|
|
107
|
+
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 : `select-${uuid()}`;
|
|
108
|
+
this._id = mId;
|
|
109
|
+
this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
110
|
+
this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
111
|
+
this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
112
|
+
this._placeholderId = mId + DEFAULT_PLACEHOLDER_ID_SUFFIX;
|
|
113
|
+
}
|
|
105
114
|
/**
|
|
106
115
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
107
116
|
* @param element the ref for the component
|
|
@@ -113,12 +122,16 @@ const DBSelect = class {
|
|
|
113
122
|
const attributes = parent.attributes;
|
|
114
123
|
for (let i = 0; i < attributes.length; i++) {
|
|
115
124
|
const attr = attributes.item(i);
|
|
116
|
-
if (attr &&
|
|
125
|
+
if (attr && attr.name !== 'data-density' &&
|
|
117
126
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
118
127
|
element.setAttribute(attr.name, attr.value);
|
|
119
128
|
parent.removeAttribute(attr.name);
|
|
120
129
|
}
|
|
121
|
-
if (attr && attr.name
|
|
130
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
131
|
+
element.setAttribute(attr.name, attr.value);
|
|
132
|
+
parent.removeAttribute(attr.name);
|
|
133
|
+
}
|
|
134
|
+
else if (attr && attr.name === "class") {
|
|
122
135
|
const isWebComponent = attr.value.includes("hydrated");
|
|
123
136
|
const value = attr.value.replace("hydrated", "").trim();
|
|
124
137
|
const currentClass = element.getAttribute("class");
|
|
@@ -135,16 +148,25 @@ const DBSelect = class {
|
|
|
135
148
|
}
|
|
136
149
|
}
|
|
137
150
|
watch0Fn() {
|
|
151
|
+
var _a, _b;
|
|
152
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
153
|
+
this.resetIds();
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
watch0() {
|
|
157
|
+
this.watch0Fn();
|
|
158
|
+
}
|
|
159
|
+
watch1Fn() {
|
|
138
160
|
var _a;
|
|
139
161
|
this._invalidMessage =
|
|
140
162
|
this.invalidMessage ||
|
|
141
163
|
((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
|
|
142
164
|
DEFAULT_INVALID_MESSAGE;
|
|
143
165
|
}
|
|
144
|
-
|
|
145
|
-
this.
|
|
166
|
+
watch1() {
|
|
167
|
+
this.watch1Fn();
|
|
146
168
|
}
|
|
147
|
-
|
|
169
|
+
watch2Fn() {
|
|
148
170
|
if (this._id && this.initialized) {
|
|
149
171
|
const messageId = this._id + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
150
172
|
const placeholderId = this._id + DEFAULT_PLACEHOLDER_ID_SUFFIX;
|
|
@@ -165,16 +187,16 @@ const DBSelect = class {
|
|
|
165
187
|
this.initialized = false;
|
|
166
188
|
}
|
|
167
189
|
}
|
|
168
|
-
watch1() {
|
|
169
|
-
this.watch1Fn();
|
|
170
|
-
}
|
|
171
|
-
watch2Fn() {
|
|
172
|
-
this._value = this.value;
|
|
173
|
-
}
|
|
174
190
|
watch2() {
|
|
175
191
|
this.watch2Fn();
|
|
176
192
|
}
|
|
177
193
|
watch3Fn() {
|
|
194
|
+
this._value = this.value;
|
|
195
|
+
}
|
|
196
|
+
watch3() {
|
|
197
|
+
this.watch3Fn();
|
|
198
|
+
}
|
|
199
|
+
watch4Fn() {
|
|
178
200
|
// If angular uses ngModel value and _value are null
|
|
179
201
|
// then the value will be set afterward and the _ref will be refreshed
|
|
180
202
|
const addResetListener = true;
|
|
@@ -194,24 +216,19 @@ const DBSelect = class {
|
|
|
194
216
|
}, controller.signal);
|
|
195
217
|
}
|
|
196
218
|
}
|
|
197
|
-
|
|
198
|
-
this.
|
|
219
|
+
watch4() {
|
|
220
|
+
this.watch4Fn();
|
|
199
221
|
}
|
|
200
222
|
componentDidLoad() {
|
|
201
|
-
var _a;
|
|
202
223
|
this.enableAttributePassing(this._ref, "db-select");
|
|
203
224
|
this.initialized = true;
|
|
204
|
-
|
|
205
|
-
this._id = mId;
|
|
206
|
-
this._messageId = mId + DEFAULT_MESSAGE_ID_SUFFIX;
|
|
207
|
-
this._validMessageId = mId + DEFAULT_VALID_MESSAGE_ID_SUFFIX;
|
|
208
|
-
this._invalidMessageId = mId + DEFAULT_INVALID_MESSAGE_ID_SUFFIX;
|
|
209
|
-
this._placeholderId = mId + DEFAULT_PLACEHOLDER_ID_SUFFIX;
|
|
225
|
+
this.resetIds();
|
|
210
226
|
this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
|
|
211
227
|
this.watch0Fn();
|
|
212
228
|
this.watch1Fn();
|
|
213
229
|
this.watch2Fn();
|
|
214
230
|
this.watch3Fn();
|
|
231
|
+
this.watch4Fn();
|
|
215
232
|
}
|
|
216
233
|
disconnectedCallback() {
|
|
217
234
|
var _a;
|
|
@@ -219,32 +236,38 @@ const DBSelect = class {
|
|
|
219
236
|
}
|
|
220
237
|
render() {
|
|
221
238
|
var _a, _b, _c, _d, _e;
|
|
222
|
-
return (h("div", { key: '
|
|
239
|
+
return (h("div", { key: '0e3ebb6a472cbd86ec971d96062c6779e11c9ff4', class: cls("db-select", this.className), "data-variant": this.variant, "data-hide-label": getHideProp(this.showLabel), "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-icon": this.icon, "data-show-icon": getBooleanAsString(this.showIcon) }, h("label", { key: '7d22cdb4c487037568a185719165efeaf4825b38', htmlFor: this._id }, (_a = this.label) !== null && _a !== void 0 ? _a : DEFAULT_LABEL), h("select", { key: '6a4e62ac9f68e9ec0cf8379b812b8868bf47beb0', "aria-invalid": this.validation === "invalid", "data-custom-validity": this.validation, ref: (el) => {
|
|
223
240
|
this._ref = el;
|
|
224
241
|
}, required: getBoolean(this.required, "required"), disabled: getBoolean(this.disabled, "disabled"), id: this._id, name: this.name, size: this.size,
|
|
225
242
|
/* @ts-ignore */
|
|
226
243
|
value: (_b = this.value) !== null && _b !== void 0 ? _b : this._value, autocomplete: this.autocomplete, multiple: this.multiple, onInput: (event) => this.handleInput(event), onClick: (event) => this.handleClick(event), onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), "aria-describedby": (_c = this.ariaDescribedBy) !== null && _c !== void 0 ? _c : this._descByIds }, this.variant === "floating" || !!this.placeholder ? (h("option", { class: "placeholder", value: "", "data-show-empty-option": getBooleanAsString(this.shouldShowEmptyOption()) })) : null, ((_d = this.options) === null || _d === void 0 ? void 0 : _d.length) ? ((_e = this.options) === null || _e === void 0 ? void 0 : _e.map((option) => {
|
|
227
244
|
var _a;
|
|
228
245
|
return (h(Fragment, null, option.options ? (h("optgroup", { label: this.getOptionLabel(option), key: undefined }, (_a = option.options) === null || _a === void 0 ? void 0 : _a.map((optgroupOption) => (h("option", { value: optgroupOption.value, selected: optgroupOption.selected, disabled: optgroupOption.disabled, key: undefined }, this.getOptionLabel(optgroupOption)))))) : (h("option", { value: option.value, disabled: option.disabled, selected: option.selected, key: undefined }, this.getOptionLabel(option)))));
|
|
229
|
-
})) : (h("slot", null))), this.placeholder ? (h("span", { class: "db-select-placeholder", id: this._placeholderId }, this.placeholder)) : null, 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: '
|
|
246
|
+
})) : (h("slot", null))), this.placeholder ? (h("span", { class: "db-select-placeholder", id: this._placeholderId }, this.placeholder)) : null, 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: '736b83b341e8161f463a3131fc6cb39f6c966fc7', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '1353c1a7cf3ae895b6108bc4800ab40ca808c596', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
230
247
|
}
|
|
231
248
|
static get watchers() { return {
|
|
232
|
-
"
|
|
249
|
+
"id": [{
|
|
233
250
|
"watch0": 0
|
|
251
|
+
}],
|
|
252
|
+
"propOverrides?.id": [{
|
|
253
|
+
"watch0": 0
|
|
254
|
+
}],
|
|
255
|
+
"_ref": [{
|
|
256
|
+
"watch1": 0
|
|
234
257
|
}, {
|
|
235
|
-
"
|
|
258
|
+
"watch4": 0
|
|
236
259
|
}],
|
|
237
260
|
"invalidMessage": [{
|
|
238
|
-
"
|
|
261
|
+
"watch1": 0
|
|
239
262
|
}],
|
|
240
263
|
"_id": [{
|
|
241
|
-
"
|
|
264
|
+
"watch2": 0
|
|
242
265
|
}],
|
|
243
266
|
"initialized": [{
|
|
244
|
-
"
|
|
267
|
+
"watch2": 0
|
|
245
268
|
}],
|
|
246
269
|
"value": [{
|
|
247
|
-
"
|
|
270
|
+
"watch3": 0
|
|
248
271
|
}]
|
|
249
272
|
}; }
|
|
250
273
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, h } from './index-
|
|
2
|
-
import { g as getBooleanAsString, c as cls } from './index-
|
|
1
|
+
import { r as registerInstance, h } from './index-Bs7RfNRP.js';
|
|
2
|
+
import { g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBStack = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -16,12 +16,16 @@ const DBStack = class {
|
|
|
16
16
|
const attributes = parent.attributes;
|
|
17
17
|
for (let i = 0; i < attributes.length; i++) {
|
|
18
18
|
const attr = attributes.item(i);
|
|
19
|
-
if (attr &&
|
|
19
|
+
if (attr && attr.name !== 'data-density' &&
|
|
20
20
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
21
21
|
element.setAttribute(attr.name, attr.value);
|
|
22
22
|
parent.removeAttribute(attr.name);
|
|
23
23
|
}
|
|
24
|
-
if (attr && attr.name
|
|
24
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
25
|
+
element.setAttribute(attr.name, attr.value);
|
|
26
|
+
parent.removeAttribute(attr.name);
|
|
27
|
+
}
|
|
28
|
+
else if (attr && attr.name === "class") {
|
|
25
29
|
const isWebComponent = attr.value.includes("hydrated");
|
|
26
30
|
const value = attr.value.replace("hydrated", "").trim();
|
|
27
31
|
const currentClass = element.getAttribute("class");
|
|
@@ -41,9 +45,10 @@ const DBStack = class {
|
|
|
41
45
|
this.enableAttributePassing(this._ref, "db-stack");
|
|
42
46
|
}
|
|
43
47
|
render() {
|
|
44
|
-
|
|
48
|
+
var _a, _b;
|
|
49
|
+
return (h("div", { key: '6927a665a08e7383c992d2b93d264a991e871969', class: cls("db-stack", this.className), ref: (el) => {
|
|
45
50
|
this._ref = el;
|
|
46
|
-
}, id: this.id, "data-gap": this.gap, "data-variant": this.variant, "data-direction": this.direction, "data-alignment": this.alignment, "data-justify-content": this.justifyContent, "data-wrap": getBooleanAsString(this.wrap) }, h("slot", { key: '
|
|
51
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-gap": this.gap, "data-variant": this.variant, "data-direction": this.direction, "data-alignment": this.alignment, "data-justify-content": this.justifyContent, "data-wrap": getBooleanAsString(this.wrap) }, h("slot", { key: '0c5f39afc50167b38e39797c240f32a696d93adb' })));
|
|
47
52
|
}
|
|
48
53
|
};
|
|
49
54
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
2
|
import { l as DEFAULT_INVALID_MESSAGE, f as DEFAULT_MESSAGE_ID_SUFFIX, g as DEFAULT_VALID_MESSAGE_ID_SUFFIX, h as DEFAULT_INVALID_MESSAGE_ID_SUFFIX, k as DEFAULT_VALID_MESSAGE } from './constants-BdL-nI5y.js';
|
|
3
|
-
import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, l as getHideProp, g as getBooleanAsString, c as cls } from './index-
|
|
4
|
-
import { a as addCheckedResetEventListener } from './form-components-
|
|
3
|
+
import { h as hasVoiceOver, d as delay, s as stringPropVisible, u as uuid, e as getBoolean, l as getHideProp, g as getBooleanAsString, c as cls } from './index-xkoBSP8R.js';
|
|
4
|
+
import { a as addCheckedResetEventListener } from './form-components-D6LQfJvq.js';
|
|
5
5
|
|
|
6
6
|
const DBSwitch = class {
|
|
7
7
|
constructor(hostRef) {
|
|
@@ -82,6 +82,14 @@ const DBSwitch = class {
|
|
|
82
82
|
}
|
|
83
83
|
}
|
|
84
84
|
}
|
|
85
|
+
resetIds() {
|
|
86
|
+
var _a, _b, _c;
|
|
87
|
+
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 : `switch-${uuid()}`;
|
|
88
|
+
this._id = mId;
|
|
89
|
+
this._messageId = `${mId}${DEFAULT_MESSAGE_ID_SUFFIX}`;
|
|
90
|
+
this._validMessageId = `${mId}${DEFAULT_VALID_MESSAGE_ID_SUFFIX}`;
|
|
91
|
+
this._invalidMessageId = `${mId}${DEFAULT_INVALID_MESSAGE_ID_SUFFIX}`;
|
|
92
|
+
}
|
|
85
93
|
/**
|
|
86
94
|
* Passes `aria-*`, `data-*` & `class` attributes to correct child. Used in angular and stencil.
|
|
87
95
|
* @param element the ref for the component
|
|
@@ -93,12 +101,16 @@ const DBSwitch = class {
|
|
|
93
101
|
const attributes = parent.attributes;
|
|
94
102
|
for (let i = 0; i < attributes.length; i++) {
|
|
95
103
|
const attr = attributes.item(i);
|
|
96
|
-
if (attr &&
|
|
104
|
+
if (attr && attr.name !== 'data-density' &&
|
|
97
105
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
98
106
|
element.setAttribute(attr.name, attr.value);
|
|
99
107
|
parent.removeAttribute(attr.name);
|
|
100
108
|
}
|
|
101
|
-
if (attr && attr.name
|
|
109
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
110
|
+
element.setAttribute(attr.name, attr.value);
|
|
111
|
+
parent.removeAttribute(attr.name);
|
|
112
|
+
}
|
|
113
|
+
else if (attr && attr.name === "class") {
|
|
102
114
|
const isWebComponent = attr.value.includes("hydrated");
|
|
103
115
|
const value = attr.value.replace("hydrated", "").trim();
|
|
104
116
|
const currentClass = element.getAttribute("class");
|
|
@@ -115,12 +127,31 @@ const DBSwitch = class {
|
|
|
115
127
|
}
|
|
116
128
|
}
|
|
117
129
|
watch0Fn() {
|
|
118
|
-
|
|
130
|
+
var _a, _b;
|
|
131
|
+
if ((_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id) {
|
|
132
|
+
this.resetIds();
|
|
133
|
+
}
|
|
119
134
|
}
|
|
120
135
|
watch0() {
|
|
121
136
|
this.watch0Fn();
|
|
122
137
|
}
|
|
123
138
|
watch1Fn() {
|
|
139
|
+
this.handleValidation();
|
|
140
|
+
}
|
|
141
|
+
watch1() {
|
|
142
|
+
this.watch1Fn();
|
|
143
|
+
}
|
|
144
|
+
watch2Fn() {
|
|
145
|
+
var _a;
|
|
146
|
+
this._invalidMessage =
|
|
147
|
+
this.invalidMessage ||
|
|
148
|
+
((_a = this._ref) === null || _a === void 0 ? void 0 : _a.validationMessage) ||
|
|
149
|
+
DEFAULT_INVALID_MESSAGE;
|
|
150
|
+
}
|
|
151
|
+
watch2() {
|
|
152
|
+
this.watch2Fn();
|
|
153
|
+
}
|
|
154
|
+
watch3Fn() {
|
|
124
155
|
if (this._ref) {
|
|
125
156
|
const defaultChecked = undefined;
|
|
126
157
|
let controller = this.abortController;
|
|
@@ -136,54 +167,63 @@ const DBSwitch = class {
|
|
|
136
167
|
}, controller.signal);
|
|
137
168
|
}
|
|
138
169
|
}
|
|
139
|
-
|
|
140
|
-
this.
|
|
170
|
+
watch3() {
|
|
171
|
+
this.watch3Fn();
|
|
141
172
|
}
|
|
142
173
|
componentDidLoad() {
|
|
143
|
-
var _a;
|
|
144
174
|
this.enableAttributePassing(this._ref, "db-switch");
|
|
145
|
-
this.
|
|
146
|
-
this._messageId = `${this._id}${DEFAULT_MESSAGE_ID_SUFFIX}`;
|
|
147
|
-
this._validMessageId = `${this._id}${DEFAULT_VALID_MESSAGE_ID_SUFFIX}`;
|
|
148
|
-
this._invalidMessageId = `${this._id}${DEFAULT_INVALID_MESSAGE_ID_SUFFIX}`;
|
|
175
|
+
this.resetIds();
|
|
149
176
|
this.handleValidation();
|
|
177
|
+
this._invalidMessage = this.invalidMessage || DEFAULT_INVALID_MESSAGE;
|
|
150
178
|
this.watch0Fn();
|
|
151
179
|
this.watch1Fn();
|
|
180
|
+
this.watch2Fn();
|
|
181
|
+
this.watch3Fn();
|
|
152
182
|
}
|
|
153
183
|
disconnectedCallback() {
|
|
154
184
|
var _a;
|
|
155
185
|
(_a = this.abortController) === null || _a === void 0 ? void 0 : _a.abort();
|
|
156
186
|
}
|
|
157
187
|
render() {
|
|
158
|
-
var _a, _b
|
|
159
|
-
return (h("div", { key: '
|
|
188
|
+
var _a, _b;
|
|
189
|
+
return (h("div", { key: '5d55932625984fa62f0ee9d86f3d89f5b63f9072', class: cls("db-switch", this.className), "data-visual-aid": getBooleanAsString(this.visualAid), "data-size": this.size, "data-hide-label": getHideProp(this.showLabel), "data-variant": this.variant, "data-hide-asterisk": getHideProp(this.showRequiredAsterisk), "data-custom-validity": this.validation }, h("label", { key: '711ab3c882dbd490e19400ecf5d926f5bf80e95e', htmlFor: this._id }, h("input", { key: 'aa50031870b7ee76e1f1e6f9bd5dd14b9013de18', type: "checkbox", role: "switch", id: this._id, ref: (el) => {
|
|
160
190
|
this._ref = el;
|
|
161
|
-
}, checked: getBoolean(this.checked, "checked"), value: this.value, disabled: getBoolean(this.disabled, "disabled"), "aria-invalid": this.validation === "invalid" ? "true" : undefined, "aria-describedby": this._descByIds, name: this.name, required: getBoolean(this.required, "required"), "data-aid-icon": (_a = this.iconLeading) !== null && _a !== void 0 ? _a : this.icon, "data-aid-icon-trailing": this.iconTrailing, onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), onKeyDown: (event) => this.handleKeyDown(event) }), this.label ? this.label : h("slot", null)), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", semantic: "adaptive", id: this._messageId, icon: this.messageIcon }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, (_b = this.validMessage) !== null && _b !== void 0 ? _b : DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '
|
|
191
|
+
}, checked: getBoolean(this.checked, "checked"), value: this.value, disabled: getBoolean(this.disabled, "disabled"), "aria-invalid": this.validation === "invalid" ? "true" : undefined, "aria-describedby": this._descByIds, name: this.name, required: getBoolean(this.required, "required"), "data-aid-icon": (_a = this.iconLeading) !== null && _a !== void 0 ? _a : this.icon, "data-aid-icon-trailing": this.iconTrailing, onChange: (event) => this.handleChange(event), onBlur: (event) => this.handleBlur(event), onFocus: (event) => this.handleFocus(event), onKeyDown: (event) => this.handleKeyDown(event) }), this.label ? this.label : h("slot", null)), stringPropVisible(this.message, this.showMessage) ? (h("db-infotext", { size: "small", semantic: "adaptive", id: this._messageId, icon: this.messageIcon }, this.message)) : null, this.hasValidState() ? (h("db-infotext", { size: "small", semantic: "successful", id: this._validMessageId }, (_b = this.validMessage) !== null && _b !== void 0 ? _b : DEFAULT_VALID_MESSAGE)) : null, h("db-infotext", { key: '95f846f3de48f29bef0406c3c19d0314a2a0cfc6', size: "small", semantic: "critical", id: this._invalidMessageId }, this._invalidMessage), h("span", { key: '297a64a0c5b5faf97a3f685ab78eea7145fe700e', "data-visually-hidden": "true", role: "status" }, this._voiceOverFallback)));
|
|
162
192
|
}
|
|
163
193
|
static get watchers() { return {
|
|
164
|
-
"
|
|
194
|
+
"id": [{
|
|
165
195
|
"watch0": 0
|
|
166
196
|
}],
|
|
167
|
-
"
|
|
197
|
+
"propOverrides?.id": [{
|
|
168
198
|
"watch0": 0
|
|
169
199
|
}],
|
|
200
|
+
"validation": [{
|
|
201
|
+
"watch1": 0
|
|
202
|
+
}],
|
|
203
|
+
"required": [{
|
|
204
|
+
"watch1": 0
|
|
205
|
+
}],
|
|
170
206
|
"message": [{
|
|
171
|
-
"
|
|
207
|
+
"watch1": 0
|
|
172
208
|
}],
|
|
173
209
|
"showMessage": [{
|
|
174
|
-
"
|
|
210
|
+
"watch1": 0
|
|
175
211
|
}],
|
|
176
212
|
"validMessage": [{
|
|
177
|
-
"
|
|
213
|
+
"watch1": 0
|
|
178
214
|
}],
|
|
179
215
|
"invalidMessage": [{
|
|
180
|
-
"
|
|
216
|
+
"watch1": 0
|
|
217
|
+
}, {
|
|
218
|
+
"watch2": 0
|
|
181
219
|
}],
|
|
182
220
|
"checked": [{
|
|
183
|
-
"
|
|
221
|
+
"watch1": 0
|
|
184
222
|
}],
|
|
185
223
|
"_ref": [{
|
|
186
|
-
"
|
|
224
|
+
"watch2": 0
|
|
225
|
+
}, {
|
|
226
|
+
"watch3": 0
|
|
187
227
|
}]
|
|
188
228
|
}; }
|
|
189
229
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h } from './index-
|
|
2
|
-
import { g as getBooleanAsString, e as getBoolean, c as cls } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h } from './index-Bs7RfNRP.js';
|
|
2
|
+
import { g as getBooleanAsString, e as getBoolean, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBTabItem = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -42,12 +42,16 @@ const DBTabItem = class {
|
|
|
42
42
|
const attributes = parent.attributes;
|
|
43
43
|
for (let i = 0; i < attributes.length; i++) {
|
|
44
44
|
const attr = attributes.item(i);
|
|
45
|
-
if (attr &&
|
|
45
|
+
if (attr && attr.name !== 'data-density' &&
|
|
46
46
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
47
47
|
element.setAttribute(attr.name, attr.value);
|
|
48
48
|
parent.removeAttribute(attr.name);
|
|
49
49
|
}
|
|
50
|
-
if (attr && attr.name
|
|
50
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
51
|
+
element.setAttribute(attr.name, attr.value);
|
|
52
|
+
parent.removeAttribute(attr.name);
|
|
53
|
+
}
|
|
54
|
+
else if (attr && attr.name === "class") {
|
|
51
55
|
const isWebComponent = attr.value.includes("hydrated");
|
|
52
56
|
const value = attr.value.replace("hydrated", "").trim();
|
|
53
57
|
const currentClass = element.getAttribute("class");
|
|
@@ -107,10 +111,10 @@ const DBTabItem = class {
|
|
|
107
111
|
}
|
|
108
112
|
}
|
|
109
113
|
render() {
|
|
110
|
-
var _a, _b;
|
|
111
|
-
return (h("li", { key: '
|
|
114
|
+
var _a, _b, _c, _d, _e, _f;
|
|
115
|
+
return (h("li", { key: 'aa5a73d9a5f1482623ebdb8a79846b478ecf9fd1', class: cls("db-tab-item", this.className), role: "none" }, h("label", { key: 'b6148c23f64ffd2d9153db7e8e3d39a90f009da3', htmlFor: (_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-icon-trailing": this.iconTrailing, "data-show-icon": getBooleanAsString((_d = this.showIconLeading) !== null && _d !== void 0 ? _d : this.showIcon), "data-show-icon-trailing": getBooleanAsString(this.showIconTrailing), "data-no-text": getBooleanAsString(this.noText) }, h("input", { key: 'c7d167364eaa4f9cee156d9260553b14d60ffb13', type: "radio", role: "tab", disabled: getBoolean(this.disabled, "disabled"), "aria-selected": this._selected, checked: getBoolean(this.checked, "checked"), ref: (el) => {
|
|
112
116
|
this._ref = el;
|
|
113
|
-
}, name: this._name, id: this.id, onInput: (event) => this.handleChange(event) }), this.label ? this.label : null, h("slot", { key: '
|
|
117
|
+
}, name: this._name, id: (_e = this.id) !== null && _e !== void 0 ? _e : (_f = this.propOverrides) === null || _f === void 0 ? void 0 : _f.id, onInput: (event) => this.handleChange(event) }), this.label ? this.label : null, h("slot", { key: 'aab78a92118a8ea9b7ffcb446ead8211294a6e6c' }))));
|
|
114
118
|
}
|
|
115
119
|
static get watchers() { return {
|
|
116
120
|
"_ref": [{
|
|
@@ -143,12 +147,16 @@ const DBTabList = class {
|
|
|
143
147
|
const attributes = parent.attributes;
|
|
144
148
|
for (let i = 0; i < attributes.length; i++) {
|
|
145
149
|
const attr = attributes.item(i);
|
|
146
|
-
if (attr &&
|
|
150
|
+
if (attr && attr.name !== 'data-density' &&
|
|
147
151
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
148
152
|
element.setAttribute(attr.name, attr.value);
|
|
149
153
|
parent.removeAttribute(attr.name);
|
|
150
154
|
}
|
|
151
|
-
if (attr && attr.name
|
|
155
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
156
|
+
element.setAttribute(attr.name, attr.value);
|
|
157
|
+
parent.removeAttribute(attr.name);
|
|
158
|
+
}
|
|
159
|
+
else if (attr && attr.name === "class") {
|
|
152
160
|
const isWebComponent = attr.value.includes("hydrated");
|
|
153
161
|
const value = attr.value.replace("hydrated", "").trim();
|
|
154
162
|
const currentClass = element.getAttribute("class");
|
|
@@ -168,9 +176,10 @@ const DBTabList = class {
|
|
|
168
176
|
this.enableAttributePassing(this._ref, "db-tab-list");
|
|
169
177
|
}
|
|
170
178
|
render() {
|
|
171
|
-
|
|
179
|
+
var _a, _b;
|
|
180
|
+
return (h("div", { key: '9d2121250cb2a12971ea33774d8ff9e79117d18e', class: cls("db-tab-list", this.className), ref: (el) => {
|
|
172
181
|
this._ref = el;
|
|
173
|
-
}, id: this.id }, h("ul", { key: '
|
|
182
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, h("ul", { key: 'db93a3777f11ee39e15633b0b5ae501b0526d73d', role: "tablist" }, h("slot", { key: '14d45a6c1693c5c2bdb2d422397e6ddeb93bf5b3' }))));
|
|
174
183
|
}
|
|
175
184
|
};
|
|
176
185
|
|
|
@@ -189,12 +198,16 @@ const DBTabPanel = class {
|
|
|
189
198
|
const attributes = parent.attributes;
|
|
190
199
|
for (let i = 0; i < attributes.length; i++) {
|
|
191
200
|
const attr = attributes.item(i);
|
|
192
|
-
if (attr &&
|
|
201
|
+
if (attr && attr.name !== 'data-density' &&
|
|
193
202
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
194
203
|
element.setAttribute(attr.name, attr.value);
|
|
195
204
|
parent.removeAttribute(attr.name);
|
|
196
205
|
}
|
|
197
|
-
if (attr && attr.name
|
|
206
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
207
|
+
element.setAttribute(attr.name, attr.value);
|
|
208
|
+
parent.removeAttribute(attr.name);
|
|
209
|
+
}
|
|
210
|
+
else if (attr && attr.name === "class") {
|
|
198
211
|
const isWebComponent = attr.value.includes("hydrated");
|
|
199
212
|
const value = attr.value.replace("hydrated", "").trim();
|
|
200
213
|
const currentClass = element.getAttribute("class");
|
|
@@ -214,9 +227,10 @@ const DBTabPanel = class {
|
|
|
214
227
|
this.enableAttributePassing(this._ref, "db-tab-panel");
|
|
215
228
|
}
|
|
216
229
|
render() {
|
|
217
|
-
|
|
230
|
+
var _a, _b;
|
|
231
|
+
return (h("section", { key: '3cae700e240af4818416120b8c85fc91839c7fa1', class: cls("db-tab-panel", this.className), role: "tabpanel", ref: (el) => {
|
|
218
232
|
this._ref = el;
|
|
219
|
-
}, id: this.id }, this.content ? this.content : null, h("slot", { key: '
|
|
233
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id }, this.content ? this.content : null, h("slot", { key: '25595de165921a31119ffd785bd5c569c42fa557' })));
|
|
220
234
|
}
|
|
221
235
|
};
|
|
222
236
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-
|
|
2
|
-
import { u as uuid, c as cls } from './index-
|
|
1
|
+
import { r as registerInstance, c as createEvent, h, F as Fragment } from './index-Bs7RfNRP.js';
|
|
2
|
+
import { u as uuid, c as cls } from './index-xkoBSP8R.js';
|
|
3
3
|
|
|
4
4
|
const DBTabs = class {
|
|
5
5
|
constructor(hostRef) {
|
|
@@ -143,12 +143,16 @@ const DBTabs = class {
|
|
|
143
143
|
const attributes = parent.attributes;
|
|
144
144
|
for (let i = 0; i < attributes.length; i++) {
|
|
145
145
|
const attr = attributes.item(i);
|
|
146
|
-
if (attr &&
|
|
146
|
+
if (attr && attr.name !== 'data-density' &&
|
|
147
147
|
(attr.name.startsWith("data-") || attr.name.startsWith("aria-"))) {
|
|
148
148
|
element.setAttribute(attr.name, attr.value);
|
|
149
149
|
parent.removeAttribute(attr.name);
|
|
150
150
|
}
|
|
151
|
-
if (attr && attr.name
|
|
151
|
+
else if (attr && attr.name !== 'data-density' && attr.name !== "class" && attr.name === "style") {
|
|
152
|
+
element.setAttribute(attr.name, attr.value);
|
|
153
|
+
parent.removeAttribute(attr.name);
|
|
154
|
+
}
|
|
155
|
+
else if (attr && attr.name === "class") {
|
|
152
156
|
const isWebComponent = attr.value.includes("hydrated");
|
|
153
157
|
const value = attr.value.replace("hydrated", "").trim();
|
|
154
158
|
const currentClass = element.getAttribute("class");
|
|
@@ -201,11 +205,11 @@ const DBTabs = class {
|
|
|
201
205
|
this._resizeObserver = undefined;
|
|
202
206
|
}
|
|
203
207
|
render() {
|
|
204
|
-
var _a, _b, _c, _d;
|
|
205
|
-
return (h("div", { key: '
|
|
208
|
+
var _a, _b, _c, _d, _e, _f;
|
|
209
|
+
return (h("div", { key: '6d273b967668288248c3853be80261a877d3ae04', class: cls("db-tabs", this.className), ref: (el) => {
|
|
206
210
|
this._ref = el;
|
|
207
|
-
}, id: this.id, "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-alignment": (
|
|
208
|
-
|
|
211
|
+
}, id: (_a = this.id) !== null && _a !== void 0 ? _a : (_b = this.propOverrides) === null || _b === void 0 ? void 0 : _b.id, "data-orientation": this.orientation, "data-scroll-behavior": this.behavior, "data-alignment": (_c = this.alignment) !== null && _c !== void 0 ? _c : "start", "data-width": (_d = this.width) !== null && _d !== void 0 ? _d : "auto", onInput: (event) => this.handleChange(event), onChange: (event) => this.handleChange(event) }, this.showScrollLeft ? (h("db-button", { class: "tabs-scroll-left", variant: "ghost", icon: "chevron_left", type: "button", noText: true, onClick: () => this.scroll(true) }, "Scroll left")) : null, this.tabs ? (h(Fragment, null, h("db-tab-list", null, (_e = this.convertTabs()) === null || _e === void 0 ? void 0 : _e.map((tab, index) => (h("db-tab-item", { key: this.name + "tab-item" + index, active: tab.active, label: tab.label, iconTrailing: tab.iconTrailing, icon: tab.icon, noText: tab.noText })))), (_f = this.convertTabs()) === null || _f === void 0 ? void 0 :
|
|
212
|
+
_f.map((tab, index) => (h("db-tab-panel", { key: this.name + "tab-panel" + index, content: tab.content }, tab.children))))) : null, this.showScrollRight ? (h("db-button", { class: "tabs-scroll-right", variant: "ghost", icon: "chevron_right", type: "button", noText: true, onClick: () => this.scroll() }, "Scroll right")) : null, h("slot", { key: '04f5d96f32695ae2661ace77827ee783eb0f23d0' })));
|
|
209
213
|
}
|
|
210
214
|
static get watchers() { return {
|
|
211
215
|
"_ref": [{
|