@dubai-design-system/components-js 5.1.0 → 5.2.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 +83 -0
- package/MIGRATION.md +76 -15
- package/dist/cjs/dda-accordion.cjs.entry.js +2 -2
- package/dist/cjs/dda-alert.cjs.entry.js +4 -4
- package/dist/cjs/dda-attach-file.cjs.entry.js +2 -2
- package/dist/cjs/dda-avatar.cjs.entry.js +3 -3
- package/dist/cjs/dda-banner.cjs.entry.js +2 -2
- package/dist/cjs/dda-breadcrumb.cjs.entry.js +2 -2
- package/dist/cjs/dda-button.cjs.entry.js +2 -2
- package/dist/cjs/dda-checkbox.cjs.entry.js +2 -2
- package/dist/cjs/dda-chip.cjs.entry.js +2 -2
- package/dist/cjs/dda-credit-card.cjs.entry.js +2 -2
- package/dist/cjs/dda-creditcard-field.cjs.entry.js +3 -3
- package/dist/cjs/dda-dropdown.cjs.entry.js +3 -3
- package/dist/cjs/dda-footer.cjs.entry.js +2 -2
- package/dist/cjs/dda-header.cjs.entry.js +22 -12
- package/dist/cjs/dda-home-banner.cjs.entry.js +3 -3
- package/dist/cjs/dda-horizontal-stepper.cjs.entry.js +3 -3
- package/dist/cjs/dda-input.cjs.entry.js +3 -3
- package/dist/cjs/dda-link-button.cjs.entry.js +51 -0
- package/dist/cjs/dda-link-button_2.cjs.entry.js +3 -3
- package/dist/cjs/dda-number-field.cjs.entry.js +2 -2
- package/dist/cjs/dda-pagination.cjs.entry.js +3 -3
- package/dist/cjs/dda-phonefield.cjs.entry.js +2 -2
- package/dist/cjs/dda-progressbar.cjs.entry.js +2 -2
- package/dist/cjs/dda-radiobutton.cjs.entry.js +27 -0
- package/dist/cjs/dda-range-slider.cjs.entry.js +1 -1
- package/dist/cjs/dda-search-input.cjs.entry.js +2 -2
- package/dist/cjs/dda-segmented-tabs.cjs.entry.js +4 -4
- package/dist/cjs/dda-select.cjs.entry.js +5 -3
- package/dist/cjs/dda-sticky-footer.cjs.entry.js +14 -3
- package/dist/cjs/dda-tabs.cjs.entry.js +4 -4
- package/dist/cjs/dda-textarea.cjs.entry.js +16239 -1401
- package/dist/cjs/dda-toggle.cjs.entry.js +3 -3
- package/dist/cjs/dda-tooltip.cjs.entry.js +3 -3
- package/dist/cjs/dda-ui-card.cjs.entry.js +3 -3
- package/dist/cjs/dda-vertical-stepper.cjs.entry.js +2 -2
- package/dist/cjs/dda.cjs.js +30 -3
- package/dist/cjs/index-DXyiIgGK.js +4637 -0
- package/dist/cjs/{index-Dm7JbFAh.js → index-Na_7EWDR.js} +1 -1
- package/dist/cjs/index.cjs.js +10 -0
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/components/dda-alert/dda-alert.stories.js +27 -20
- package/dist/collection/components/dda-header/dda-header.js +34 -4
- package/dist/collection/components/dda-header/dda-header.stories.js +21 -0
- package/dist/collection/components/dda-home-banner/home-banner.css +14 -3
- package/dist/collection/components/dda-input/dda-input.js +20 -1
- package/dist/collection/components/dda-radiobutton/dda-radiobutton.css +165 -27
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.js +16 -5
- package/dist/collection/components/dda-sticky-footer/dda-sticky-footer.stories.js +12 -1
- package/dist/collection/components/dda-tabs/dda-tabs.js +1 -1
- package/dist/collection/components/dda-textarea/dda-textarea.js +2 -2
- package/dist/collection/components/dda-toggle/dda-toggle.js +1 -1
- package/dist/collection/components/dda-tooltip/dda-tooltip.js +1 -1
- package/dist/collection/components/dda-ui-card/dda-ui-card.js +1 -1
- package/dist/collection/components/segmented-groups/dda-segmented-tabs/dda-segmented-tabs.js +1 -1
- package/dist/collection/components/stepper/dda-horizontal-stepper/dda-horizontal-stepper.js +1 -1
- package/dist/collection/components/stepper/dda-vertical-stepper/dda-vertical-stepper.js +1 -1
- package/dist/collection/global/global.css +165 -27
- package/dist/components/dda-accordion.js +59 -1
- package/dist/components/dda-alert.js +94 -1
- package/dist/components/dda-attach-file.js +138 -1
- package/dist/components/dda-avatar.js +107 -1
- package/dist/components/dda-banner.js +57 -1
- package/dist/components/dda-breadcrumb.js +66 -1
- package/dist/components/dda-button.js +6 -1
- package/dist/components/dda-button2.js +80 -0
- package/dist/components/dda-checkbox.js +59 -1
- package/dist/components/dda-chip.js +55 -1
- package/dist/components/dda-credit-card.js +54 -1
- package/dist/components/dda-creditcard-field.js +133 -1
- package/dist/components/dda-dropdown.js +113 -1
- package/dist/components/dda-footer.js +72 -1
- package/dist/components/dda-header.js +367 -1
- package/dist/components/dda-home-banner.js +249 -1
- package/dist/components/dda-horizontal-stepper.js +69 -1
- package/dist/components/dda-input.js +92 -1
- package/dist/components/dda-link-button.js +6 -1
- package/dist/components/dda-link-button2.js +81 -0
- package/dist/components/dda-number-field.js +127 -1
- package/dist/components/dda-pagination.js +133 -1
- package/dist/components/dda-phonefield.js +316 -1
- package/dist/components/dda-progressbar.js +58 -1
- package/dist/components/dda-radiobutton.js +6 -1
- package/dist/components/dda-radiobutton2.js +54 -0
- package/dist/components/dda-range-slider.js +93 -1
- package/dist/components/dda-search-input.js +102 -1
- package/dist/components/dda-segmented-tabs.js +133 -1
- package/dist/components/dda-select.js +219 -1
- package/dist/components/dda-sticky-footer.js +132 -1
- package/dist/components/dda-tabs.js +91 -1
- package/dist/components/dda-textarea.js +31277 -1
- package/dist/components/dda-toggle.js +55 -1
- package/dist/components/dda-tooltip.js +6 -1
- package/dist/components/dda-tooltip2.js +70 -0
- package/dist/components/dda-ui-card.js +71 -1
- package/dist/components/dda-vertical-stepper.js +72 -1
- package/dist/components/index.js +34 -1
- package/dist/components/index2.js +4622 -0
- package/dist/components/p-C2Cs3ruo.js +1 -0
- package/dist/components/p-C520q-ka.js +1 -0
- package/dist/components/p-CZO9Eawo.js +1 -0
- package/dist/components/p-D7sJgBDk.js +1 -0
- package/dist/components/p-_-I_65FG.js +1 -0
- package/dist/components/unique-id.js +12 -0
- package/dist/dda/dda-accordion.entry.js +31 -0
- package/dist/dda/dda-alert.entry.js +57 -0
- package/dist/dda/dda-attach-file.entry.js +102 -0
- package/dist/dda/dda-avatar.entry.js +70 -0
- package/dist/dda/dda-banner.entry.js +30 -0
- package/dist/dda/dda-breadcrumb.entry.js +40 -0
- package/dist/dda/dda-button.entry.js +47 -0
- package/dist/dda/dda-checkbox.entry.js +27 -0
- package/dist/dda/dda-chip.entry.js +25 -0
- package/dist/dda/dda-credit-card.entry.js +26 -0
- package/dist/dda/dda-creditcard-field.entry.js +94 -0
- package/dist/dda/dda-dropdown.entry.js +75 -0
- package/dist/dda/dda-footer.entry.js +34 -0
- package/dist/dda/dda-header.entry.js +282 -0
- package/dist/dda/dda-home-banner.entry.js +208 -0
- package/dist/dda/dda-horizontal-stepper.entry.js +39 -0
- package/dist/dda/dda-input.entry.js +56 -0
- package/dist/dda/dda-link-button.entry.js +49 -0
- package/dist/dda/dda-number-field.entry.js +86 -0
- package/dist/dda/dda-pagination.entry.js +86 -0
- package/dist/dda/dda-phonefield.entry.js +271 -0
- package/dist/dda/dda-progressbar.entry.js +30 -0
- package/dist/dda/dda-radiobutton.entry.js +25 -0
- package/dist/dda/dda-range-slider.entry.js +55 -0
- package/dist/dda/dda-search-input.entry.js +63 -0
- package/dist/dda/dda-segmented-tabs.entry.js +96 -0
- package/dist/dda/dda-select.entry.js +183 -0
- package/dist/dda/dda-sticky-footer.entry.js +61 -0
- package/dist/dda/dda-tabs.entry.js +59 -0
- package/dist/dda/dda-textarea.entry.js +31241 -0
- package/dist/dda/dda-toggle.entry.js +25 -0
- package/dist/dda/dda-tooltip.entry.js +46 -0
- package/dist/dda/dda-ui-card.entry.js +41 -0
- package/dist/dda/dda-vertical-stepper.entry.js +41 -0
- package/dist/dda/dda.css +6385 -46
- package/dist/dda/dda.esm.js +47 -1
- package/dist/dda/index-CFIwfRqf.js +4622 -0
- package/dist/dda/index.esm.js +29 -1
- package/dist/dda/p-0574c9df.entry.js +1 -0
- package/dist/dda/p-0a86a74c.entry.js +1 -0
- package/dist/dda/p-16f94322.entry.js +1 -0
- package/dist/dda/p-1acc0fda.entry.js +1 -0
- package/dist/dda/p-2630152f.entry.js +1 -0
- package/dist/dda/p-271c5f91.entry.js +1 -0
- package/dist/dda/{p-e3a65ceb.entry.js → p-32746429.entry.js} +1 -1
- package/dist/dda/p-3835f3b7.entry.js +1 -0
- package/dist/dda/p-3d57e957.entry.js +1 -0
- package/dist/dda/{p-9672af43.entry.js → p-489a3711.entry.js} +1 -1
- package/dist/dda/p-58de747b.entry.js +1 -0
- package/dist/dda/p-63754a93.entry.js +1 -0
- package/dist/dda/p-87d647e7.entry.js +1 -0
- package/dist/dda/p-8de4f35e.entry.js +1 -0
- package/dist/dda/p-9416d8ec.entry.js +1 -0
- package/dist/dda/p-9541e108.entry.js +1 -0
- package/dist/dda/p-95b87c55.entry.js +1 -0
- package/dist/dda/{p-6daa282f.entry.js → p-95e1a389.entry.js} +1 -1
- package/dist/dda/p-96741f45.entry.js +1 -0
- package/dist/dda/p-98c59aa8.entry.js +1 -0
- package/dist/dda/p-9c86dc30.entry.js +1 -0
- package/dist/dda/p-CI_UcUy5.js +2 -0
- package/dist/dda/p-b6190656.entry.js +1 -0
- package/dist/dda/p-c0da1e14.entry.js +1 -0
- package/dist/dda/p-c39d196d.entry.js +1 -0
- package/dist/dda/p-c5ebf7df.entry.js +1 -0
- package/dist/dda/p-d06c5daf.entry.js +1 -0
- package/dist/dda/p-d8fd3f73.entry.js +1 -0
- package/dist/dda/p-e660a594.entry.js +1 -0
- package/dist/dda/p-e8ca224f.entry.js +1 -0
- package/dist/dda/p-ea1720d2.entry.js +1 -0
- package/dist/dda/p-ee6d56fc.entry.js +1 -0
- package/dist/dda/p-eecfe091.entry.js +1 -0
- package/dist/dda/p-eed4a104.entry.js +1 -0
- package/dist/dda/unique-id-B-I003EB.js +12 -0
- package/dist/esm/dda-accordion.entry.js +2 -2
- package/dist/esm/dda-alert.entry.js +4 -4
- package/dist/esm/dda-attach-file.entry.js +2 -2
- package/dist/esm/dda-avatar.entry.js +3 -3
- package/dist/esm/dda-banner.entry.js +2 -2
- package/dist/esm/dda-breadcrumb.entry.js +2 -2
- package/dist/esm/dda-button.entry.js +2 -2
- package/dist/esm/dda-checkbox.entry.js +2 -2
- package/dist/esm/dda-chip.entry.js +2 -2
- package/dist/esm/dda-credit-card.entry.js +2 -2
- package/dist/esm/dda-creditcard-field.entry.js +3 -3
- package/dist/esm/dda-dropdown.entry.js +3 -3
- package/dist/esm/dda-footer.entry.js +2 -2
- package/dist/esm/dda-header.entry.js +22 -12
- package/dist/esm/dda-home-banner.entry.js +3 -3
- package/dist/esm/dda-horizontal-stepper.entry.js +3 -3
- package/dist/esm/dda-input.entry.js +3 -3
- package/dist/esm/dda-link-button.entry.js +49 -0
- package/dist/esm/dda-link-button_2.entry.js +3 -3
- package/dist/esm/dda-number-field.entry.js +2 -2
- package/dist/esm/dda-pagination.entry.js +3 -3
- package/dist/esm/dda-phonefield.entry.js +2 -2
- package/dist/esm/dda-progressbar.entry.js +2 -2
- package/dist/esm/dda-radiobutton.entry.js +25 -0
- package/dist/esm/dda-range-slider.entry.js +1 -1
- package/dist/esm/dda-search-input.entry.js +2 -2
- package/dist/esm/dda-segmented-tabs.entry.js +4 -4
- package/dist/esm/dda-select.entry.js +5 -3
- package/dist/esm/dda-sticky-footer.entry.js +14 -3
- package/dist/esm/dda-tabs.entry.js +4 -4
- package/dist/esm/dda-textarea.entry.js +16239 -1401
- package/dist/esm/dda-toggle.entry.js +3 -3
- package/dist/esm/dda-tooltip.entry.js +3 -3
- package/dist/esm/dda-ui-card.entry.js +3 -3
- package/dist/esm/dda-vertical-stepper.entry.js +2 -2
- package/dist/esm/dda.js +31 -4
- package/dist/esm/index-CFIwfRqf.js +4622 -0
- package/dist/esm/{index-o6021Dsk.js → index-CI_UcUy5.js} +1 -1
- package/dist/esm/index.js +10 -0
- package/dist/esm/loader.js +3 -3
- package/dist/types/components/dda-alert/dda-alert.stories.d.ts +5 -1
- package/dist/types/components/dda-header/dda-header.d.ts +6 -2
- package/dist/types/components/dda-header/dda-header.stories.d.ts +19 -0
- package/dist/types/components/dda-input/dda-input.d.ts +2 -0
- package/dist/types/components/dda-sticky-footer/dda-sticky-footer.d.ts +5 -4
- package/dist/types/components/dda-sticky-footer/dda-sticky-footer.stories.d.ts +13 -0
- package/dist/types/components.d.ts +32 -12
- package/package.json +2 -2
- package/dist/components/p-B4nkZ15I.js +0 -1
- package/dist/components/p-Bk2uycTf.js +0 -1
- package/dist/components/p-C96R7OFb.js +0 -1
- package/dist/components/p-Ciz-pnTr.js +0 -1
- package/dist/components/p-CleacZFl.js +0 -1
- package/dist/dda/p-0daa2a14.entry.js +0 -1
- package/dist/dda/p-1537b9dd.entry.js +0 -1
- package/dist/dda/p-175c52b8.entry.js +0 -1
- package/dist/dda/p-2b65a79a.entry.js +0 -1
- package/dist/dda/p-2d93b185.entry.js +0 -1
- package/dist/dda/p-30d3a014.entry.js +0 -1
- package/dist/dda/p-33b890a5.entry.js +0 -1
- package/dist/dda/p-64d90f29.entry.js +0 -1
- package/dist/dda/p-69bc04c1.entry.js +0 -1
- package/dist/dda/p-72f22d1f.entry.js +0 -1
- package/dist/dda/p-7549868d.entry.js +0 -1
- package/dist/dda/p-7a51a946.entry.js +0 -1
- package/dist/dda/p-7b187e1f.entry.js +0 -1
- package/dist/dda/p-7b4d895e.entry.js +0 -1
- package/dist/dda/p-8f408141.entry.js +0 -1
- package/dist/dda/p-91341ca7.entry.js +0 -1
- package/dist/dda/p-9552def5.entry.js +0 -1
- package/dist/dda/p-98bba4dc.entry.js +0 -1
- package/dist/dda/p-a0768b2f.entry.js +0 -1
- package/dist/dda/p-a5bd30ad.entry.js +0 -1
- package/dist/dda/p-a83f6267.entry.js +0 -1
- package/dist/dda/p-b17f79df.entry.js +0 -1
- package/dist/dda/p-b79505e1.entry.js +0 -1
- package/dist/dda/p-b8b98df2.entry.js +0 -1
- package/dist/dda/p-cc2cc09b.entry.js +0 -1
- package/dist/dda/p-ceee08fa.entry.js +0 -1
- package/dist/dda/p-d000e69d.entry.js +0 -1
- package/dist/dda/p-e5b79469.entry.js +0 -1
- package/dist/dda/p-f2f3be5f.entry.js +0 -1
- package/dist/dda/p-f92e0a32.entry.js +0 -1
- package/dist/dda/p-o6021Dsk.js +0 -2
|
@@ -1 +1,71 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { p as proxyCustomElement, H, e as createEvent, h, d as Host, t as transformTag } from './index2.js';
|
|
2
|
+
|
|
3
|
+
const ddaUiCardCss = () => `:host{display:block}`;
|
|
4
|
+
|
|
5
|
+
const DdaUiCard$1 = /*@__PURE__*/ proxyCustomElement(class DdaUiCard extends H {
|
|
6
|
+
constructor(registerHost) {
|
|
7
|
+
super();
|
|
8
|
+
if (registerHost !== false) {
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
this.linkClick = createEvent(this, "linkClick", 7);
|
|
12
|
+
/** `default` renders the icon, image, title, subtitle and link from props before the slot; `custom` renders only the slot. */
|
|
13
|
+
this.type = 'default';
|
|
14
|
+
/** Material Icons name shown at the top of the card, e.g. `description`. */
|
|
15
|
+
this.icon = '';
|
|
16
|
+
/** URL of an image shown at the top of the card. Its alt text is `maintitle`. */
|
|
17
|
+
this.image = '';
|
|
18
|
+
/** Card title, rendered as a heading at `heading_level`. */
|
|
19
|
+
this.maintitle = '';
|
|
20
|
+
/** Muted text shown below the title. */
|
|
21
|
+
this.subtitle = '';
|
|
22
|
+
/** URL of the card link. The link shows only when this is set. */
|
|
23
|
+
this.link = '';
|
|
24
|
+
/** Text of the card link. */
|
|
25
|
+
this.linktext = '';
|
|
26
|
+
/** Material Icons name shown after the link text. Set it to an empty string to hide the icon. */
|
|
27
|
+
this.linkicon = 'arrow_forward';
|
|
28
|
+
/** Heading level (1–6) of the title; pick the level that fits the page outline. */
|
|
29
|
+
this.heading_level = 3;
|
|
30
|
+
}
|
|
31
|
+
// The title was always an <h1>, so a page of cards had many h1s.
|
|
32
|
+
// Clamp to a valid heading level; anything unparsable falls back to 3.
|
|
33
|
+
get headingTag() {
|
|
34
|
+
const level = Math.round(Number(this.heading_level));
|
|
35
|
+
return `h${Number.isFinite(level) ? Math.min(6, Math.max(1, level)) : 3}`;
|
|
36
|
+
}
|
|
37
|
+
render() {
|
|
38
|
+
const HeadingTag = this.headingTag;
|
|
39
|
+
return (h(Host, { key: '4657e8ea3f7a5782eff6d4d004afc15030a9d89d' }, h("div", { key: '929b59ee6a676e9ee95441907bea8d98a7f62bcb', class: 'dda-card' }, h("div", { key: 'c7a7a115aef102e726f3232bcc7c75cfac9b676c', class: 'dda-card-body' }, this.type !== 'custom' && (h("div", { key: '50e93eb07a7bf279af39d8af5536292b41fef9f8' }, !!this.icon && (h("span", { key: 'f449d9a299d8cb5a534277babe0e413c43b091af', class: 'dda-card-icon' }, h("i", { key: '5d51449ce164db38f3d6540e9fae2dbade609b10', class: 'material-icons', "aria-hidden": "true" }, this.icon))), !!this.image && (h("span", { key: '55d39ea5df2decaf84062e4149a8a690c34801f4', class: 'dda-card-icon' }, h("img", { key: '9cf6e418dbfd5a69f3b745abf57cd9e5ad3fcd54', src: this.image, alt: this.maintitle }))), !!this.maintitle && h(HeadingTag, { key: 'ba558f13bba45d63e1940fdf5bc3e8501ee3d2f0', class: 'dda-card-title' }, this.maintitle), !!this.subtitle && h("p", { key: 'a03f8484f9de87dd5de5df7d86ef16348f35544e', class: 'dda-card-text-muted' }, this.subtitle), !!this.link && (h("a", { key: 'f64d0dc6f8940ef81a789a056fdb280bedf2b95e', href: this.link, class: 'dda-card-link', onClick: (event) => this.linkClick.emit(event) }, this.linktext, ' ', this.linkicon && (h("span", { key: '743465002d7738b4d8aa0145689c14e814f99ffe' }, h("i", { key: '6812c7e5e69512ea16a2a6a61f47990c4f80900c', class: 'material-icons', "aria-hidden": "true" }, this.linkicon))))))), h("slot", { key: '684fe104483ca674eb0ce801a484ca7307a39f48' })))));
|
|
40
|
+
}
|
|
41
|
+
static get style() { return ddaUiCardCss(); }
|
|
42
|
+
}, [260, "dda-ui-card", {
|
|
43
|
+
"type": [1],
|
|
44
|
+
"icon": [1],
|
|
45
|
+
"image": [1],
|
|
46
|
+
"maintitle": [1],
|
|
47
|
+
"subtitle": [1],
|
|
48
|
+
"link": [1],
|
|
49
|
+
"linktext": [1],
|
|
50
|
+
"linkicon": [1],
|
|
51
|
+
"heading_level": [2]
|
|
52
|
+
}]);
|
|
53
|
+
function defineCustomElement$1() {
|
|
54
|
+
if (typeof customElements === "undefined") {
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
const components = ["dda-ui-card"];
|
|
58
|
+
components.forEach(tagName => { switch (tagName) {
|
|
59
|
+
case "dda-ui-card":
|
|
60
|
+
if (!customElements.get(transformTag(tagName))) {
|
|
61
|
+
customElements.define(transformTag(tagName), DdaUiCard$1);
|
|
62
|
+
}
|
|
63
|
+
break;
|
|
64
|
+
} });
|
|
65
|
+
}
|
|
66
|
+
defineCustomElement$1(DdaUiCard$1);
|
|
67
|
+
|
|
68
|
+
const DdaUiCard = DdaUiCard$1;
|
|
69
|
+
const defineCustomElement = defineCustomElement$1;
|
|
70
|
+
|
|
71
|
+
export { DdaUiCard, defineCustomElement };
|
|
@@ -1 +1,72 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { p as proxyCustomElement, H, h, d as Host, t as transformTag } from './index2.js';
|
|
2
|
+
|
|
3
|
+
const ddaVerticalStepperCss = () => `.v-stepper-container{display:flex;flex-direction:column;align-items:flex-start;width:100%}.v-step{display:flex;flex-wrap:wrap;position:relative;width:100%;background-color:transparent;border:solid 1px transparent;border-radius:16px}.v-step.active{background-color:var(--dda-surface-100);border:solid 1px var(--dda-color-primary-40);box-shadow:0px 10px 15px -3px rgba(16, 24, 40, 0.1)}.v-step .v-step-indicator{flex:0 0 auto;align-items:center;padding:15px;position:relative}.v-step .icon{width:30px;height:30px;background:var(--dda-surface-100);border-radius:30px;display:flex;justify-content:center;align-items:center;position:relative;z-index:2}.v-step-indicator::before{content:"";width:1px;height:100%;border-right:dashed 1px var(--dda-surface-variant-80);position:absolute;top:0px;left:50%;z-index:1;transform:translate(-50%, 0%)}.v-step.active .v-step-indicator::before{border-right:solid 1px var(--dda-color-primary-40)}.v-step.active .v-step-indicator::after{content:"";width:1px;height:30px;border-right:solid 1px var(--dda-color-primary-40);position:absolute;top:100%;left:50%;z-index:2;transform:translate(-50%, 0%)}.v-step .icon i{font-size:24px;color:var(--dda-on-surface-variant-30)}.v-step.active .icon i{color:var(--dda-color-primary-40)}.v-step .v-step-content{padding:15px 15px 15px 0;display:flex;flex-direction:column;flex:1}.v-step .v-step-title{font-size:18px;font-weight:var(--dda-fw-500)}.v-step .v-step-subtitle{font-size:14px;color:var(--dda-color-primary-40)}.v-step .v-step-description{font-size:14px;color:var(--dda-on-surface-variant-30)}.v-step-arrow{padding:15px;position:relative}.v-step-arrow i{position:absolute;left:5px;top:50%;transform:translate(0%, -50%);color:var(--dda-on-surface-variant-30)}`;
|
|
4
|
+
|
|
5
|
+
const DdaVerticalStepper$1 = /*@__PURE__*/ proxyCustomElement(class DdaVerticalStepper extends H {
|
|
6
|
+
constructor(registerHost) {
|
|
7
|
+
super();
|
|
8
|
+
if (registerHost !== false) {
|
|
9
|
+
this.__registerHost();
|
|
10
|
+
}
|
|
11
|
+
/** @deprecated Use `current_step`. Its attribute is `current_-step`, so it never worked in HTML. */
|
|
12
|
+
this.current_Step = 0;
|
|
13
|
+
/** Extra CSS classes added to the stepper container. */
|
|
14
|
+
this.custom_class = '';
|
|
15
|
+
this.parsedSteps = [];
|
|
16
|
+
}
|
|
17
|
+
componentWillLoad() {
|
|
18
|
+
this.parseSteps();
|
|
19
|
+
}
|
|
20
|
+
/** Re-parses `steps` when it changes after load. A missing or invalid value renders no steps. */
|
|
21
|
+
parseSteps() {
|
|
22
|
+
var _a;
|
|
23
|
+
try {
|
|
24
|
+
const steps = JSON.parse((_a = this.steps) !== null && _a !== void 0 ? _a : '[]');
|
|
25
|
+
this.parsedSteps = Array.isArray(steps) ? steps : [];
|
|
26
|
+
}
|
|
27
|
+
catch (_b) {
|
|
28
|
+
this.parsedSteps = [];
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
render() {
|
|
32
|
+
var _a;
|
|
33
|
+
const current = (_a = this.current_step) !== null && _a !== void 0 ? _a : this.current_Step;
|
|
34
|
+
return (h(Host, { key: '65de2bf7a859c1deb216c9042031cde73378e622' }, h("div", { key: '38cd1783a7f3b5ba036aebace4fd3ce86b34a978', class: `${this.custom_class} ${this.component_mode} v-stepper-container` }, this.parsedSteps.map((step, index) => (h("div", { class: `v-step ${index <= current ? 'active' : ''}` }, h("div", { class: "v-step-indicator" }, h("div", { class: "icon" }, h("i", { class: `material-icons` }, step.icon))), h("div", { class: "v-step-content" }, h("div", { class: "v-step-title" }, step.title), h("div", { class: "v-step-subtitle" }, step.subtitle), h("div", { class: "v-step-description" }, step.description)), h("div", { class: "v-step-arrow" }, h("i", { class: "material-icons material-symbols-outlined" }, "chevron_right"))))))));
|
|
35
|
+
}
|
|
36
|
+
static get watchers() { return {
|
|
37
|
+
"steps": [{
|
|
38
|
+
"parseSteps": 0
|
|
39
|
+
}]
|
|
40
|
+
}; }
|
|
41
|
+
static get style() { return ddaVerticalStepperCss(); }
|
|
42
|
+
}, [0, "dda-vertical-stepper", {
|
|
43
|
+
"steps": [1],
|
|
44
|
+
"current_step": [2],
|
|
45
|
+
"current_Step": [2, "current_-step"],
|
|
46
|
+
"custom_class": [1],
|
|
47
|
+
"component_mode": [1],
|
|
48
|
+
"parsedSteps": [32]
|
|
49
|
+
}, undefined, {
|
|
50
|
+
"steps": [{
|
|
51
|
+
"parseSteps": 0
|
|
52
|
+
}]
|
|
53
|
+
}]);
|
|
54
|
+
function defineCustomElement$1() {
|
|
55
|
+
if (typeof customElements === "undefined") {
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
const components = ["dda-vertical-stepper"];
|
|
59
|
+
components.forEach(tagName => { switch (tagName) {
|
|
60
|
+
case "dda-vertical-stepper":
|
|
61
|
+
if (!customElements.get(transformTag(tagName))) {
|
|
62
|
+
customElements.define(transformTag(tagName), DdaVerticalStepper$1);
|
|
63
|
+
}
|
|
64
|
+
break;
|
|
65
|
+
} });
|
|
66
|
+
}
|
|
67
|
+
defineCustomElement$1(DdaVerticalStepper$1);
|
|
68
|
+
|
|
69
|
+
const DdaVerticalStepper = DdaVerticalStepper$1;
|
|
70
|
+
const defineCustomElement = defineCustomElement$1;
|
|
71
|
+
|
|
72
|
+
export { DdaVerticalStepper, defineCustomElement };
|
package/dist/components/index.js
CHANGED
|
@@ -1 +1,34 @@
|
|
|
1
|
-
|
|
1
|
+
import { g as globalScripts } from './index2.js';
|
|
2
|
+
export { a as getAssetPath, r as render, s as setAssetPath, b as setNonce, c as setPlatformOptions } from './index2.js';
|
|
3
|
+
|
|
4
|
+
function format(first, middle, last) {
|
|
5
|
+
return (first || '') + (middle ? ` ${middle}` : '') + (last ? ` ${last}` : '');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
function applyTheme(theme) {
|
|
9
|
+
const root = document.documentElement;
|
|
10
|
+
|
|
11
|
+
// Apply colors
|
|
12
|
+
for (const [key, value] of Object.entries(theme.colors)) {
|
|
13
|
+
root.style.setProperty(`--${key}`, value);
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
// Apply font families
|
|
17
|
+
if (theme.fontFamily) {
|
|
18
|
+
root.style.setProperty('--font-family-main', theme.fontFamily.main.join(', '));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* @fileoverview entry point for your component library
|
|
24
|
+
*
|
|
25
|
+
* This is the entry point for your component library. Use this file to export utilities,
|
|
26
|
+
* constants or data structure that accompany your components.
|
|
27
|
+
*
|
|
28
|
+
* DO NOT use this file to export your components. Instead, use the recommended approaches
|
|
29
|
+
* to consume components of this package as outlined in the `README.md`.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
globalScripts();
|
|
33
|
+
|
|
34
|
+
export { applyTheme, format };
|