@uh-design-system/component-library 0.4.2 → 0.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/dist/cjs/component-library.cjs.js +2 -2
- package/dist/cjs/ds-accordion_3.cjs.entry.js +10 -10
- package/dist/cjs/ds-checkbox-group.cjs.entry.js +15 -16
- package/dist/cjs/ds-checkbox.cjs.entry.js +42 -35
- package/dist/cjs/ds-input-validity.cjs.entry.js +4 -6
- package/dist/cjs/ds-link-with-arrow.cjs.entry.js +5 -5
- package/dist/cjs/ds-link.cjs.entry.js +5 -5
- package/dist/cjs/ds-text-input.cjs.entry.js +51 -23
- package/dist/cjs/ds-visually-hidden.cjs.entry.js +2 -2
- package/dist/cjs/{index-b2bddcf4.js → index-bf84b124.js} +16 -0
- package/dist/cjs/index.cjs.js +8 -0
- package/dist/cjs/{linkUtils-e911e899.js → linkUtils-695da37c.js} +0 -10
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/cjs/store-9bd20f3c.js +207 -0
- package/dist/cjs/{utils-c9113835.js → utils-2ba5e075.js} +10 -0
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/00-foundations/types.js +1 -0
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +6 -6
- package/dist/collection/components/01-base-components/ds-button/ds-button.js +1 -1
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +1 -1
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +68 -56
- package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js +1 -0
- package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +27 -67
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +1 -1
- package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +5 -8
- package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +1 -0
- package/dist/collection/components/01-base-components/ds-link/ds-link.js +6 -6
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +1 -1
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +6 -6
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.stories.js +1 -1
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +73 -27
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +82 -13
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +6 -7
- package/dist/collection/components/01-base-components/ds-text-input/utils.js +1 -10
- package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
- package/dist/collection/index.js +1 -1
- package/dist/collection/store.js +13 -0
- package/dist/collection/utils/link/linkUtils.js +0 -9
- package/dist/collection/utils/utils.js +9 -0
- package/dist/component-library/component-library.esm.js +1 -1
- package/dist/component-library/ds-accordion_3.entry.js +1 -1
- package/dist/component-library/ds-checkbox-group.entry.js +1 -1
- package/dist/component-library/ds-checkbox.entry.js +1 -1
- package/dist/component-library/ds-input-validity.entry.js +1 -1
- package/dist/component-library/ds-link-with-arrow.entry.js +1 -1
- package/dist/component-library/ds-link.entry.js +1 -1
- package/dist/component-library/ds-text-input.entry.js +1 -1
- package/dist/component-library/ds-visually-hidden.entry.js +1 -1
- package/dist/component-library/{index-50783b0c.js → index-434995e1.js} +2 -2
- package/dist/component-library/index.esm.js +1 -0
- package/dist/component-library/{linkUtils-fe63ff72.js → linkUtils-3d1b28cf.js} +1 -1
- package/dist/component-library/store-b8d17c10.js +1 -0
- package/dist/component-library/utils-5daa5bc0.js +1 -0
- package/dist/components/ds-accordion.js +6 -6
- package/dist/components/ds-button2.js +1 -1
- package/dist/components/ds-checkbox-group.js +21 -23
- package/dist/components/ds-checkbox2.js +44 -37
- package/dist/components/ds-icon2.js +11 -2
- package/dist/components/ds-input-validity2.js +4 -6
- package/dist/components/ds-link-with-arrow.js +5 -5
- package/dist/components/ds-link.js +5 -5
- package/dist/components/ds-text-input.js +57 -28
- package/dist/components/ds-visually-hidden2.js +1 -1
- package/dist/components/index.js +1 -0
- package/dist/components/index2.js +15 -1
- package/dist/components/linkUtils.js +1 -10
- package/dist/components/store.js +204 -0
- package/dist/esm/component-library.js +3 -3
- package/dist/esm/ds-accordion_3.entry.js +10 -10
- package/dist/esm/ds-checkbox-group.entry.js +15 -16
- package/dist/esm/ds-checkbox.entry.js +42 -35
- package/dist/esm/ds-input-validity.entry.js +4 -6
- package/dist/esm/ds-link-with-arrow.entry.js +5 -5
- package/dist/esm/ds-link.entry.js +5 -5
- package/dist/esm/ds-text-input.entry.js +51 -23
- package/dist/esm/ds-visually-hidden.entry.js +2 -2
- package/dist/esm/{index-50783b0c.js → index-434995e1.js} +15 -1
- package/dist/esm/index.js +2 -1
- package/dist/esm/{linkUtils-fe63ff72.js → linkUtils-3d1b28cf.js} +1 -10
- package/dist/esm/loader.js +3 -3
- package/dist/esm/store-b8d17c10.js +204 -0
- package/dist/esm/{utils-b5843ae1.js → utils-5daa5bc0.js} +10 -1
- package/dist/types/components/00-foundations/types.d.ts +3 -0
- package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +14 -14
- package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +14 -16
- package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +1 -1
- package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +1 -1
- package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +17 -8
- package/dist/types/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-text-input/utils.d.ts +1 -1
- package/dist/types/components.d.ts +42 -28
- package/dist/types/index.d.ts +1 -0
- package/dist/types/store.d.ts +10 -0
- package/dist/types/utils/link/linkUtils.d.ts +0 -1
- package/dist/types/utils/utils.d.ts +1 -0
- package/package.json +3 -2
- package/dist/component-library/utils-b5843ae1.js +0 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const appGlobals = require('./app-globals-3a1e7e63.js');
|
|
7
7
|
|
|
8
8
|
/*
|
|
@@ -19,7 +19,7 @@ var patchBrowser = () => {
|
|
|
19
19
|
|
|
20
20
|
patchBrowser().then(async (options) => {
|
|
21
21
|
await appGlobals.globalScripts();
|
|
22
|
-
return index.bootstrapLazy([["ds-accordion_3.cjs",[[1,"ds-accordion",{"variant":[1],"borderAligned":[4,"border-aligned"],"openByDefault":[4,"open-by-default"],"accordionId":[1,"accordion-id"],"headingLevel":[2,"heading-level"],"useCloseButton":[4,"use-close-button"],"closeButtonLabel":[1,"close-button-label"],"hideTopBorder":[4,"hide-top-border"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[6,"ds-button",{"value":[1],"variant":[1],"colour":[1],"size":[1],"fontWeight":[1,"font-weight"],"icon":[1],"iconPosition":[1,"icon-position"],"type":[1],"disabled":[4],"fullWidth":[4,"full-width"],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"dsTitle":[1,"title"],"role":[1],"hidden":[4],"message":[32]}]]],["ds-
|
|
22
|
+
return index.bootstrapLazy([["ds-accordion_3.cjs",[[1,"ds-accordion",{"variant":[1],"borderAligned":[4,"border-aligned"],"openByDefault":[4,"open-by-default"],"accordionId":[1,"accordion-id"],"headingLevel":[2,"heading-level"],"useCloseButton":[4,"use-close-button"],"closeButtonLabel":[1,"close-button-label"],"hideTopBorder":[4,"hide-top-border"],"isExpanded":[32]},null,{"isExpanded":["watchHandler"]}],[6,"ds-button",{"value":[1],"variant":[1],"colour":[1],"size":[1],"fontWeight":[1,"font-weight"],"icon":[1],"iconPosition":[1,"icon-position"],"type":[1],"disabled":[4],"fullWidth":[4,"full-width"],"ariaDisabled":[1,"aria-disabled"]}],[1,"ds-icon",{"name":[1],"colour":[1],"size":[1],"dsTitle":[1,"title"],"role":[1],"hidden":[4],"message":[32]}]]],["ds-input-validity.cjs",[[0,"ds-input-validity",{"text":[1],"type":[1],"validityRole":[1,"role"],"identifier":[32]}]]],["ds-text-input.cjs",[[70,"ds-text-input",{"label":[1],"placeholder":[1],"identifier":[1,"id"],"name":[1],"disabled":[4],"optional":[4],"required":[4],"readonly":[4],"value":[1],"min":[2],"max":[2],"maxlength":[2],"pattern":[1],"autocomplete":[1],"optionalText":[1,"optional-text"],"errorText":[1,"error-text"],"successText":[1,"success-text"],"assistiveText":[1,"assistive-text"],"actionButtonAriaLabel":[1,"action-button-aria-label"],"hiddenAssistiveText":[1,"hidden-assistive-text"],"prefixText":[1,"prefix-text"],"suffixText":[1,"suffix-text"],"icon":[1],"type":[1],"ariaLabel":[1,"aria-label"],"ariaLabelledBy":[1,"aria-labelledby"],"ariaDescribedby":[1,"aria-describedby"],"hasFocus":[32],"clearButtonVisible":[32],"passwordInputVisible":[32],"inputActive":[32],"validationMessage":[32],"togglePasswordVisibility":[64],"clearInput":[64]}]]],["ds-checkbox.cjs",[[65,"ds-checkbox",{"identifier":[1,"id"],"checked":[1028],"legend":[1],"assistiveText":[1,"assistive-text"],"text":[1],"indeterminate":[4],"disabled":[4],"errorText":[1,"error-text"],"errorsDisabled":[4,"data-errors-disabled"],"required":[4],"optional":[4],"optionalText":[1,"optional-text"],"ariaLabel":[1,"aria-label"],"value":[32],"validationMessage":[32]}]]],["ds-checkbox-group.cjs",[[1,"ds-checkbox-group",{"legend":[1],"assistiveText":[1,"assistive-text"],"direction":[1],"errorText":[1,"error-text"],"text":[1],"checked":[4],"disabled":[4],"childElementsCount":[32],"checkedChildElementCount":[32],"isIndeterminate":[32],"indeterminateChildCheckboxCount":[32],"setChecked":[64]},[[0,"dsCheckboxGroupIndeterminateChildChange","listenIndeterminateChildChange"],[0,"dsCheckboxInput","listenCheckboxChange"],[0,"dsCheckboxGroupChange","listenCheckboxGroupChange"]],{"disabled":["watchCheckboxDisabledChange"],"checked":["watchCheckedChange"],"isIndeterminate":["watchIndeterminateChange"],"checkedChildElementCount":["watchCheckedChildElementCountChange"]}]]],["ds-visually-hidden.cjs",[[1,"ds-visually-hidden"]]],["ds-link.cjs",[[1,"ds-link",{"text":[1],"size":[1],"variant":[1],"weight":[1],"icon":[1025],"iconPosition":[1025,"icon-position"],"iconTitle":[1,"icon-title"],"iconHidden":[4,"icon-hidden"],"href":[1],"target":[1],"download":[4],"language":[1,"lang"],"ariaLabel":[1,"aria-label"]}]]],["ds-link-with-arrow.cjs",[[1,"ds-link-with-arrow",{"text":[1],"iconPosition":[1,"icon-position"],"href":[1],"target":[1],"language":[1,"lang"],"ariaLabel":[1,"aria-label"]}]]]], options);
|
|
23
23
|
});
|
|
24
24
|
|
|
25
25
|
exports.setNonce = index.setNonce;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
7
|
const attributes = require('./attributes-5f5b58be.js');
|
|
8
|
-
const utils = require('./utils-
|
|
8
|
+
const utils = require('./utils-2ba5e075.js');
|
|
9
9
|
|
|
10
10
|
const dsAccordionCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-accordion__open-button{color:var(--ds-textColor-default);outline:var(--ds-borderWidth-thick) solid transparent;fill:var(--ds-textColor-default);position:relative;all:unset;align-items:flex-start;box-sizing:border-box;display:flex;flex-direction:row;gap:var(--ds-spacing-2xSmall);position:relative;width:100%}.ds-accordion__open-button:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::before,.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::after{content:\"\";position:absolute;top:0;width:var(--ds-spacing-small);height:100%}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::before{left:calc(var(--ds-spacing-small) * -1)}.ds-accordion__open-button:hover:not(:focus-visible).ds-accordion--border-aligned::after{right:calc(var(--ds-spacing-small) * -1)}.ds-accordion__open-button:hover{cursor:pointer}.ds-accordion__open-button:hover,.ds-accordion__open-button:hover::before,.ds-accordion__open-button:hover::after{background:var(--ds-bgColor-transparent-onLight-hover, rgba(0, 0, 0, 0.1019607843))}.ds-accordion__open-button:active,.ds-accordion__open-button:active::before,.ds-accordion__open-button:active::after{background:var(--ds-bgColor-transparent-onLight-active, rgba(0, 0, 0, 0.1490196078))}.ds-accordion__open-button:focus-visible{z-index:1}.ds-accordion__open-button.ds-accordion--default{padding:var(--ds-spacing-small) var(--ds-spacing-small) var(--ds-spacing-xSmall) var(--ds-spacing-small);font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-18);font-weight:var(--ds-fontWeight-semibold);line-height:var(--ds-lineHeight-large);letter-spacing:var(--letterSpacing-wide)}.ds-accordion__open-button.ds-accordion--compact{font-size:var(--ds-fontSize-16);padding:var(--ds-spacing-xSmall) var(--ds-spacing-small) var(--ds-spacing-xSmall) var(--ds-spacing-small);line-height:var(--ds-lineHeight-large);font-weight:var(--ds-fontWeight-semibold)}.ds-accordion__open-button.ds-accordion--border-aligned:not(:focus-visible){padding-inline:0;margin-inline:var(--ds-spacing-small);position:relative;width:calc(100% - var(--ds-spacing-large))}:host(:first-child) .ds-accordion__open-button:not(.ds-accordion--hide-top-border){border-top:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC)}:host(:first-child) .ds-accordion__open-button:not(.ds-accordion--hide-top-border):focus-visible{border-top-color:transparent}.ds-accordion__open-button[aria-expanded=false]{border-bottom:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC)}.ds-accordion__panel--border-aligned{position:relative;width:calc(100% - 32px)}.ds-accordion__panel--border-aligned::before{display:inline-block;content:\" \";position:absolute;bottom:-1px;height:1px;left:0px;background:var(--ds-palette-white);width:var(--ds-spacing-small)}.ds-accordion__panel--border-aligned::after{display:inline-block;content:\" \";position:absolute;bottom:-1px;height:1px;right:0px;background:var(--ds-palette-white);width:var(--ds-spacing-small)}.ds-accordion__panel--expanded{display:block;border-bottom:var(--ds-borderWidth-hairline) solid var(--ds-borderColor-light, #CCCCCC);padding-inline:var(--ds-spacing-small)}::slotted([slot=header]){color:var(--ds-textColor-default)}.ds-accordion__content{color:var(--ds-textColor-default, #1A1A1A);font-family:var(--ds-fontFamily-body);padding-block:var(--ds-spacing-small)}.ds-accordion__content .ds-accordion--default{font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-regular);line-height:var(--ds-lineHeight-xLarge);letter-spacing:var(--ds-letterSpacing-wide)}@media (min-width: 30rem){.ds-accordion__content .ds-accordion--default{font-size:var(--ds-fontSize-18)}}.ds-accordion__content .ds-accordion--compact{font-size:var(--fontSize-16);font-weight:var(--ds-fontWeight-regular);line-height:var(--ds-lineHeight-large);letter-spacing:var(--letterSpacing-wide)}.ds-accordion__close-button{display:flex;flex-direction:row;gap:var(--ds-spacing-2xSmall);font-family:var(--ds-fontFamily-body);letter-spacing:var(--ds-letterSpacing-wide);width:max-content}";
|
|
11
11
|
const DsAccordionStyle0 = dsAccordionCss;
|
|
@@ -56,18 +56,18 @@ const DsAccordion = class {
|
|
|
56
56
|
render() {
|
|
57
57
|
const iconSize = this.variant === 'compact' ? '1.5rem' : '2rem';
|
|
58
58
|
const buttonSize = this.variant === 'compact' ? 'small' : 'medium';
|
|
59
|
-
return (index.h("div", { key: '
|
|
59
|
+
return (index.h("div", { key: 'aeaa883c8500bda65c480ccea434cbeadc53ce69', class: index$1.classNames('ds-accordion', `ds-accordion--${this.variant}`, {
|
|
60
60
|
'ds-accordion--border-aligned': this.borderAligned
|
|
61
|
-
}), role: "presentation" }, index.h("div", { key: '
|
|
61
|
+
}), role: "presentation" }, index.h("div", { key: 'a7947fd7784084bcec3a02f2219fa2494366d590', class: "ds-accordion__item" }, index.h("div", { key: '20532a2d3f109e38341d496ffee0d2d02cfb26f4', role: "heading", "aria-level": this.headingLevel, class: "ds-accordion__title" }, index.h("button", { key: '40513d75b15c4701498b83c9a6afbcd7a322c73c', class: index$1.classNames('ds-accordion__open-button', `ds-accordion--${this.variant}`, {
|
|
62
62
|
'ds-accordion--border-aligned': this.borderAligned,
|
|
63
63
|
'ds-accordion--hide-top-border': this.hideTopBorder
|
|
64
|
-
}), onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-expanded": this.isExpanded ? 'true' : 'false', "aria-controls": `${this.accordionId}-panel`, id: this.accordionId, ref: (el) => this.headerButtonRef = el }, index.h("span", { key: '
|
|
64
|
+
}), onClick: this.handleClick, onKeyDown: this.handleKeyDown, "aria-expanded": this.isExpanded ? 'true' : 'false', "aria-controls": `${this.accordionId}-panel`, id: this.accordionId, ref: (el) => this.headerButtonRef = el }, index.h("span", { key: '883d1cbf50b3cfb0beacd62570a1077aa8bd7a04', class: "ds-accordion__icon", "aria-hidden": "true" }, this.isExpanded ?
|
|
65
65
|
index.h("ds-icon", { size: iconSize, hidden: true, name: "keyboard_arrow_up" })
|
|
66
|
-
: index.h("ds-icon", { size: iconSize, hidden: true, name: "keyboard_arrow_down" })), index.h("slot", { key: '
|
|
66
|
+
: index.h("ds-icon", { size: iconSize, hidden: true, name: "keyboard_arrow_down" })), index.h("slot", { key: 'a8ddede4cec5ab873fb69ab9963e7f143613fe0f', name: "header" }))), index.h("div", { key: '76cf35006795136597efd9c424237ac1c48bbc74', id: `${this.accordionId}-panel`, role: "region", "aria-labelledby": this.accordionId, class: index$1.classNames('ds-accordion__panel', `ds-accordion__panel--${this.variant}`, {
|
|
67
67
|
'ds-accordion__panel--border-aligned': this.borderAligned,
|
|
68
68
|
'ds-accordion__panel--expanded': this.isExpanded
|
|
69
|
-
}), hidden: !this.isExpanded }, index.h("div", { key: '
|
|
70
|
-
index.h("ds-button", { key: '
|
|
69
|
+
}), hidden: !this.isExpanded }, index.h("div", { key: '6236db88bc5735ec4e5618a63e303d997335e1be', class: "ds-accordion__content" }, index.h("slot", { key: '4d206253394878b4fba531cea6870aaaa3e63821', name: "content" })), this.useCloseButton &&
|
|
70
|
+
index.h("ds-button", { key: 'e5c0f76a802e6046f2872509a4944b72aa376bf1', "aria-labelledby": `${this.accordionId}-close-button ${this.accordionId}`, id: `${this.accordionId}-close-button`, class: index$1.classNames('ds-accordion__close-button', `ds-accordion--${this.variant}`, {
|
|
71
71
|
'ds-accordion--border-aligned': this.borderAligned
|
|
72
72
|
}), fontWeight: 'semiBold', variant: 'supplementary', colour: 'black', icon: 'keyboard_arrow_up', iconPosition: 'start', onClick: this.handleClick, onKeyDown: this.handleKeyDown, value: this.closeButtonLabel, size: buttonSize, type: 'button' })))));
|
|
73
73
|
}
|
|
@@ -147,7 +147,7 @@ const DsButton = class {
|
|
|
147
147
|
});
|
|
148
148
|
const iconSize = this.size === 'small' ? '1rem' : undefined;
|
|
149
149
|
const isDisabled = this.disabled || this.ariaDisabled === 'true';
|
|
150
|
-
return (index.h("button", { key: '
|
|
150
|
+
return (index.h("button", { key: '50633fbf3df7aeb84c2631dd7b8eb7a1f83cbc29', ref: el => (this.buttonEl = el), onKeyDown: this.handleKeyDown, onKeyUp: this.handleKeyUp, class: classes, style: { fontWeight: this.fontWeight }, type: this.type, "aria-disabled": isDisabled ? 'true' : 'false', ...this.inheritedAttributes }, index.h("slot", { key: 'aea86ce3195d3fa5344dfbf2048bc4db7882286b', name: "prefix" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: '38b833cbc1585a7cf0918dec9b2b2a0f62cc6fe2', name: this.icon, size: iconSize })), this.value && index.h("span", { key: '430bd3e7e54558706bcd8b2cc9fda5d0cc04667c', class: "button-value" }, this.value), index.h("slot", { key: '9c3d1b19e8c96afb9a6bc380fcd0dd04d9ed411e', name: "suffix" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: 'dcb2076975dd8648db795c3629cc12c79d4e7d70', name: this.icon, size: iconSize }))));
|
|
151
151
|
}
|
|
152
152
|
};
|
|
153
153
|
DsButton.style = DsButtonStyle0;
|
|
@@ -1082,7 +1082,7 @@ const DsIcon = class {
|
|
|
1082
1082
|
}
|
|
1083
1083
|
}
|
|
1084
1084
|
render() {
|
|
1085
|
-
return (index.h(index.Fragment, { key: '
|
|
1085
|
+
return (index.h(index.Fragment, { key: '58309a22dafbad09a1f9e884657aad264261174e' }, index.h("span", { key: '3295d61af901e74ea7c39d1e7a4b7e083f44794f', class: "ds-icon--container", innerHTML: this.getIcon(), "aria-hidden": this.hidden ? 'true' : 'false' })));
|
|
1086
1086
|
}
|
|
1087
1087
|
};
|
|
1088
1088
|
DsIcon.style = DsIconStyle0;
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
7
|
const attributes = require('./attributes-5f5b58be.js');
|
|
8
|
-
const utils = require('./utils-
|
|
8
|
+
const utils = require('./utils-2ba5e075.js');
|
|
9
9
|
|
|
10
10
|
const dsCheckboxGroupCss = ".ds-checkbox-group{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0}.ds-checkbox-group__legend{padding-inline:0;font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}.ds-checkbox-group__assistive-text{font-size:var(--ds-fontSize-14);color:var(--ds-textColor-secondary);line-height:var(--ds-lineHeight-large);margin-bottom:var(--ds-spacing-2xSmall)}.ds-checkbox-group__error{display:flex}.ds-checkbox-group__error--visible{padding-top:var(--ds-spacing-3xSmall)}.ds-checkbox-group>.ds-checkbox-group__checkboxes{display:inline-flex;flex-direction:column}.ds-checkbox-group--inset{margin-left:var(--ds-spacing-large)}.ds-checkbox-group--horizontal>.ds-checkbox-group__checkboxes{flex-direction:row;gap:var(--ds-spacing-small);flex-wrap:wrap}";
|
|
11
11
|
const DsCheckboxGroupStyle0 = dsCheckboxGroupCss;
|
|
@@ -32,10 +32,9 @@ const DsCheckboxGroup = class {
|
|
|
32
32
|
errorText = '';
|
|
33
33
|
text = '';
|
|
34
34
|
checked = false;
|
|
35
|
-
checkedChildElementCount = 0;
|
|
36
35
|
disabled = false;
|
|
37
|
-
parentCheckedCount = 0;
|
|
38
36
|
childElementsCount = 0;
|
|
37
|
+
checkedChildElementCount = 0;
|
|
39
38
|
isIndeterminate = false;
|
|
40
39
|
indeterminateChildCheckboxCount = 0;
|
|
41
40
|
elementIs = (localName) => (element) => element.localName === localName;
|
|
@@ -69,21 +68,21 @@ const DsCheckboxGroup = class {
|
|
|
69
68
|
async setChecked(newValue) {
|
|
70
69
|
this.updateChildElementsChecked(newValue);
|
|
71
70
|
}
|
|
72
|
-
|
|
71
|
+
watchCheckboxDisabledChange(newValue) {
|
|
73
72
|
this.updateChildElements((element) => {
|
|
74
73
|
element.disabled = newValue;
|
|
75
74
|
});
|
|
76
75
|
}
|
|
77
|
-
|
|
76
|
+
watchCheckedChange(newValue) {
|
|
78
77
|
this.updateChildElementsChecked(newValue);
|
|
79
78
|
}
|
|
80
|
-
|
|
79
|
+
watchIndeterminateChange(newValue) {
|
|
81
80
|
this.dsCheckboxGroupIndeterminateChildChange.emit({ id: this.fieldsetId, indeterminate: newValue });
|
|
82
81
|
}
|
|
83
|
-
|
|
82
|
+
listenIndeterminateChildChange(event) {
|
|
84
83
|
this.indeterminateChildCheckboxCount = event.detail.indeterminate ? this.indeterminateChildCheckboxCount + 1 : this.indeterminateChildCheckboxCount - 1;
|
|
85
84
|
}
|
|
86
|
-
|
|
85
|
+
watchCheckedChildElementCountChange(newValue, oldValue) {
|
|
87
86
|
this.isIndeterminate =
|
|
88
87
|
this.checkedChildElementCount !== this.childElementsCount && this.checkedChildElementCount < this.childElementsCount && this.checkedChildElementCount > 0;
|
|
89
88
|
if (newValue === this.childElementsCount && newValue > oldValue) {
|
|
@@ -101,7 +100,7 @@ const DsCheckboxGroup = class {
|
|
|
101
100
|
this.checkedChildElementCount = this.checkedChildElementCount === 0 ? 0 : this.checkedChildElementCount - 1;
|
|
102
101
|
}
|
|
103
102
|
};
|
|
104
|
-
|
|
103
|
+
listenCheckboxChange(event) {
|
|
105
104
|
if (event.detail.id === this.checkboxId) {
|
|
106
105
|
this.updateChildElementsChecked(event.detail.checked);
|
|
107
106
|
return;
|
|
@@ -110,7 +109,7 @@ const DsCheckboxGroup = class {
|
|
|
110
109
|
this.updateCheckedChildElementCount(event);
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
|
-
|
|
112
|
+
listenCheckboxGroupChange(event) {
|
|
114
113
|
if (this.getChildElements().includes(event.target)) {
|
|
115
114
|
this.updateCheckedChildElementCount(event);
|
|
116
115
|
}
|
|
@@ -142,13 +141,13 @@ const DsCheckboxGroup = class {
|
|
|
142
141
|
const nestedClasses = index$1.classNames('ds-checkbox-group', 'ds-checkbox-group--inset');
|
|
143
142
|
const checkboxesClasses = index$1.classNames('ds-checkbox-group__checkboxes');
|
|
144
143
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
145
|
-
return (index.h("fieldset", { key: '
|
|
144
|
+
return (index.h("fieldset", { key: '1029763130b4d2d138679c9f84ec72c0231fcc83', id: this.fieldsetId, class: classes, "aria-describedby": ariaDescribedBy, ...this.inheritedAttributes }, this.legend && index.h("legend", { key: 'a9be37aab510d5e402841c8bbda64190548bc1ea', class: legendClasses }, this.legend), this.assistiveText && (index.h("small", { key: '0ae42c2b46e52dad0570ad120180e662db43f2fa', class: assistiveTextClasses, id: this.assistiveTextId }, this.assistiveText)), this.text ? (index.h(index.Fragment, null, index.h("ds-checkbox", { id: this.checkboxId, text: this.text, checked: this.checkedChildElementCount === this.childElementsCount, disabled: this.disabled, indeterminate: this.indeterminateChildCheckboxCount > 0 || this.isIndeterminate }), index.h("fieldset", { id: this.nestedId, "aria-labelledby": this.checkboxId, class: nestedClasses }, index.h("slot", null)))) : (index.h("div", { class: checkboxesClasses }, index.h("slot", null))), index.h("div", { key: '3ea5bb7991a99c676cb50a24d1a679b6f68c96bf', class: errorClasses }, index.h("ds-input-validity", { key: '8d5ca5e80b2a5f985e09bf7039538a5a13278e8e', id: this.errorTextId, text: this.errorText, type: "error" }))));
|
|
146
145
|
}
|
|
147
146
|
static get watchers() { return {
|
|
148
|
-
"disabled": ["
|
|
149
|
-
"checked": ["
|
|
150
|
-
"isIndeterminate": ["
|
|
151
|
-
"checkedChildElementCount": ["
|
|
147
|
+
"disabled": ["watchCheckboxDisabledChange"],
|
|
148
|
+
"checked": ["watchCheckedChange"],
|
|
149
|
+
"isIndeterminate": ["watchIndeterminateChange"],
|
|
150
|
+
"checkedChildElementCount": ["watchCheckedChildElementCountChange"]
|
|
152
151
|
}; }
|
|
153
152
|
};
|
|
154
153
|
DsCheckboxGroup.style = DsCheckboxGroupStyle0;
|
|
@@ -2,21 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
7
|
const attributes = require('./attributes-5f5b58be.js');
|
|
8
|
-
const utils = require('./utils-c9113835.js');
|
|
9
8
|
const controlUtils = require('./controlUtils-041de0fd.js');
|
|
9
|
+
const store = require('./store-9bd20f3c.js');
|
|
10
|
+
const utils = require('./utils-2ba5e075.js');
|
|
10
11
|
|
|
11
|
-
const dsCheckboxCss = ".ds-checkbox-fieldset{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0;gap:var(--ds-spacing-3xSmall)}.ds-checkbox-fieldset__legend{padding-inline:0;font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}.ds-checkbox-fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-textColor-secondary);line-height:var(--ds-lineHeight-large)}.ds-checkbox{display:inline-flex;align-self:flex-start;align-items:center;flex-direction:row;flex-wrap:nowrap;text-wrap:
|
|
12
|
+
const dsCheckboxCss = ".ds-checkbox-fieldset{display:inline-flex;flex-direction:column;border:none;padding:0;margin:0;gap:var(--ds-spacing-3xSmall)}.ds-checkbox-fieldset__legend{padding-inline:0;font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-semibold);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}.ds-checkbox-fieldset__assistive-text{display:inline;font-size:var(--ds-fontSize-14);color:var(--ds-textColor-secondary);line-height:var(--ds-lineHeight-large)}.ds-checkbox{display:inline-flex;align-self:flex-start;align-items:center;flex-direction:row;flex-wrap:nowrap;text-wrap:wrap;position:relative;cursor:pointer;user-select:none;width:auto;padding:var(--ds-spacing-xSmall)}.ds-checkbox--no-margin .ds-checkbox__input{margin-right:0}.ds-checkbox--disabled{color:var(--ds-textColor-disabled-onLight)}.ds-checkbox__span--optional{color:var(--ds-textColor-secondary);font-size:var(--ds-fontSize-14)}.ds-checkbox:has(.ds-checkbox__input:disabled){cursor:not-allowed}.ds-checkbox__input{cursor:pointer;-webkit-appearance:none;appearance:none;background-color:var(--ds-bgColor-white);margin:0;display:grid;place-content:center;height:24px;width:24px;margin-right:var(--ds-spacing-xSmall);border-width:var(--ds-borderWidth-thin);border-style:solid;border-color:var(--ds-palette-black-50);}.ds-checkbox__input:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-checkbox__input:hover,.ds-checkbox__input:active{border-color:var(--ds-borderColor-default)}.ds-checkbox__input:hover{background-color:var(--ds-bgColor-white-hover)}.ds-checkbox__input:active{background-color:var(--ds-bgColor-white-active)}.ds-checkbox__input:disabled{background-color:var(--ds-bgColor-disabled-onLight);border-color:var(--ds-borderColor-disabled-onLight)}@media (forced-colors: active){.ds-checkbox__input:disabled{border-color:GrayText}}.ds-checkbox__input:checked,.ds-checkbox__input:indeterminate{background-color:var(--ds-bgColor-primary);border-color:var(--ds-borderColor-transparent)}.ds-checkbox__input:checked:hover,.ds-checkbox__input:indeterminate:hover{background-color:var(--ds-bgColor-primary-hover)}.ds-checkbox__input:checked:active,.ds-checkbox__input:indeterminate:active{background-color:var(--ds-bgColor-primary-active)}.ds-checkbox__input:checked:disabled,.ds-checkbox__input:indeterminate:disabled{background-color:var(--ds-bgColor-disabled-onLight)}.ds-checkbox__input:user-invalid,.ds-checkbox__input--invalid,.ds-checkbox__input--invalid:checked,.ds-checkbox__input--invalid:indeterminate{border-color:var(--ds-borderColor-danger)}.ds-checkbox__input:disabled{cursor:not-allowed;color:var(--ds-textColor-disabled-onLight)}.ds-checkbox__input::before{content:\"\";display:block;height:1em;width:1em;background-size:contain;background-repeat:no-repeat;background-position:center}.ds-checkbox__input:checked::before{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg width='16' height='13' viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.99997 7.87871L13.606 0.272705L15.7273 2.39403L5.99997 12.1214L0.272644 6.39402L2.39396 4.27271L5.99997 7.87871Z' fill='%23ffffff' /></svg>\")}.ds-checkbox__input:checked:disabled::before{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg width='16' height='13' viewBox='0 0 16 13' xmlns='http://www.w3.org/2000/svg'><path fill-rule='evenodd' clip-rule='evenodd' d='M5.99997 7.87871L13.606 0.272705L15.7273 2.39403L5.99997 12.1214L0.272644 6.39402L2.39396 4.27271L5.99997 7.87871Z' fill='%23999999' /></svg>\")}.ds-checkbox__input:indeterminate::before{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg width='14' height='4' viewBox='0 0 14 4' xmlns='http://www.w3.org/2000/svg'><rect width='13.3333' height='3' transform='matrix(1 0 0 -1 0.333313 3.5)' fill='%23ffffff' /></svg>\")}.ds-checkbox__input:indeterminate:disabled::before{background-image:url(\"data:image/svg+xml;charset=utf-8,<svg width='14' height='4' viewBox='0 0 14 4' xmlns='http://www.w3.org/2000/svg'><rect width='13.3333' height='3' transform='matrix(1 0 0 -1 0.333313 3.5)' fill='%23999999' /></svg>\")}.ds-checkbox-error{display:flex}.ds-checkbox-error--visible{padding-top:var(--ds-spacing-3xSmall);padding-left:var(--ds-spacing-xSmall)}";
|
|
12
13
|
const DsCheckboxStyle0 = dsCheckboxCss;
|
|
13
14
|
|
|
14
15
|
const checkboxIdGenerator = utils.idGenerator('ds-checkbox');
|
|
15
16
|
const DsCheckbox = class {
|
|
16
17
|
constructor(hostRef) {
|
|
17
18
|
index.registerInstance(this, hostRef);
|
|
18
|
-
this.
|
|
19
|
-
this.dsCheckboxError = index.createEvent(this, "dsCheckboxError", 7);
|
|
19
|
+
this.dsCheckboxInput = index.createEvent(this, "dsCheckboxInput", 7);
|
|
20
20
|
if (hostRef.$hostElement$["s-ei"]) {
|
|
21
21
|
this.internals = hostRef.$hostElement$["s-ei"];
|
|
22
22
|
}
|
|
@@ -25,17 +25,17 @@ const DsCheckbox = class {
|
|
|
25
25
|
hostRef.$hostElement$["s-ei"] = this.internals;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
|
+
inputElem;
|
|
28
29
|
labelId;
|
|
29
|
-
|
|
30
|
+
inputValidityId;
|
|
30
31
|
assistiveTextId;
|
|
31
32
|
inheritedAttributes = {};
|
|
32
33
|
initialChecked;
|
|
33
|
-
|
|
34
|
+
labelClicked = false;
|
|
34
35
|
get el() { return index.getElement(this); }
|
|
35
36
|
internals;
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
checkboxId;
|
|
37
|
+
dsCheckboxInput;
|
|
38
|
+
identifier = checkboxIdGenerator.next().value;
|
|
39
39
|
checked = false;
|
|
40
40
|
legend;
|
|
41
41
|
assistiveText;
|
|
@@ -51,12 +51,11 @@ const DsCheckbox = class {
|
|
|
51
51
|
value = this.checked.toString();
|
|
52
52
|
validationMessage;
|
|
53
53
|
setIds = () => {
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.assistiveTextId = `${this.checkboxId}-assistive-text`;
|
|
54
|
+
this.labelId = `${this.identifier}-label`;
|
|
55
|
+
this.inputValidityId = `${this.identifier}-validity`;
|
|
56
|
+
this.assistiveTextId = `${this.identifier}-assistive-text`;
|
|
58
57
|
};
|
|
59
|
-
|
|
58
|
+
getValidationMessage = () => (!this.errorsDisabled ? this.errorText || this.internals?.validationMessage || this.inputElem?.validationMessage : '');
|
|
60
59
|
getLegendText = () => {
|
|
61
60
|
if (this.required) {
|
|
62
61
|
return controlUtils.getRequiredText(this.legend);
|
|
@@ -78,7 +77,7 @@ const DsCheckbox = class {
|
|
|
78
77
|
}
|
|
79
78
|
return this.text;
|
|
80
79
|
};
|
|
81
|
-
getAriaDescribedBy = () => [Boolean(this.assistiveText) && this.assistiveTextId, Boolean(this.
|
|
80
|
+
getAriaDescribedBy = () => [Boolean(this.assistiveText) && this.assistiveTextId, Boolean(this.getValidationMessage()) && this.inputValidityId].filter(Boolean).join(' ');
|
|
82
81
|
restoreInitialState = () => {
|
|
83
82
|
this.checked = this.initialChecked;
|
|
84
83
|
this.value = this.checked.toString();
|
|
@@ -90,34 +89,43 @@ const DsCheckbox = class {
|
|
|
90
89
|
this.value = this.checked.toString();
|
|
91
90
|
this.internals?.setFormValue(this.value);
|
|
92
91
|
};
|
|
93
|
-
emitCheckboxError = () => {
|
|
94
|
-
this.dsCheckboxError.emit(this.getErrorText());
|
|
95
|
-
};
|
|
96
92
|
formResetCallback() {
|
|
97
93
|
this.restoreInitialState();
|
|
98
94
|
}
|
|
99
95
|
componentWillLoad() {
|
|
100
96
|
this.setInitialState();
|
|
101
97
|
this.setIds();
|
|
102
|
-
this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label', 'aria-describedby', 'aria-hidden']);
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
this.el.removeAttribute('aria-label');
|
|
107
|
-
}
|
|
108
|
-
componentDidUpdate() {
|
|
109
|
-
this.emitCheckboxError();
|
|
98
|
+
this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label', 'aria-describedby', 'aria-hidden', 'aria-invalid']);
|
|
99
|
+
if (store.isValidation('server') || this.errorText) {
|
|
100
|
+
this.validationMessage = this.getValidationMessage();
|
|
101
|
+
}
|
|
110
102
|
}
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
this.
|
|
103
|
+
handleInput = (e) => {
|
|
104
|
+
const target = e.target;
|
|
105
|
+
this.checked = target.checked;
|
|
106
|
+
this.value = target.checked.toString();
|
|
114
107
|
this.internals?.setFormValue(this.value);
|
|
115
|
-
this.
|
|
108
|
+
this.dsCheckboxInput.emit({ id: this.identifier, checked: target.checked });
|
|
109
|
+
if (store.isValidation('client') && this.validationMessage) {
|
|
110
|
+
this.validationMessage = this.getValidationMessage();
|
|
111
|
+
}
|
|
116
112
|
};
|
|
117
113
|
handleKeyUp = (event) => {
|
|
118
114
|
if (event.key === 'Enter') {
|
|
119
|
-
this.
|
|
115
|
+
this.inputElem.dispatchEvent(new Event('input'));
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
handleBlur = () => {
|
|
119
|
+
if (store.isValidation('client') && !this.labelClicked) {
|
|
120
|
+
this.validationMessage = this.getValidationMessage();
|
|
120
121
|
}
|
|
122
|
+
this.labelClicked = false;
|
|
123
|
+
};
|
|
124
|
+
handleMouseDown = () => {
|
|
125
|
+
this.labelClicked = true;
|
|
126
|
+
};
|
|
127
|
+
handleMouseUp = () => {
|
|
128
|
+
this.labelClicked = false;
|
|
121
129
|
};
|
|
122
130
|
renderCheckbox() {
|
|
123
131
|
const classes = index$1.classNames('ds-checkbox', {
|
|
@@ -127,12 +135,11 @@ const DsCheckbox = class {
|
|
|
127
135
|
const inputClasses = index$1.classNames('ds-checkbox__input', {
|
|
128
136
|
'ds-checkbox__input--invalid': Boolean(this.errorText),
|
|
129
137
|
});
|
|
130
|
-
const errorText = this.getErrorText();
|
|
131
138
|
const errorClasses = index$1.classNames('ds-checkbox-error', {
|
|
132
|
-
'ds-checkbox-error--visible': Boolean(
|
|
139
|
+
'ds-checkbox-error--visible': Boolean(this.validationMessage),
|
|
133
140
|
});
|
|
134
141
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
135
|
-
return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { id: this.labelId, class: classes }, index.h("input", { ref: inputElem => (this.inputElem = inputElem), type: "checkbox", class: inputClasses, checked: this.checked, indeterminate: this.indeterminate,
|
|
142
|
+
return (index.h(index.Fragment, null, index.h("div", null, index.h("label", { id: this.labelId, class: classes, onMouseDown: this.handleMouseDown, onMouseUp: this.handleMouseUp }, index.h("input", { ref: inputElem => (this.inputElem = inputElem), type: "checkbox", class: inputClasses, checked: this.checked, indeterminate: this.indeterminate, onInput: this.handleInput, onKeyUp: this.handleKeyUp, onBlur: this.handleBlur, value: this.value, disabled: this.disabled, required: this.required, id: this.identifier, "aria-describedby": ariaDescribedBy, "aria-label": utils.getAriaLabel(this.getCheckboxText(), this.ariaLabel), "aria-invalid": this.errorText ? true : undefined, ...this.inheritedAttributes }), this.getCheckboxText())), !this.errorsDisabled && (index.h("div", { class: errorClasses }, index.h("ds-input-validity", { id: this.inputValidityId, text: this.validationMessage, type: "error", role: "alert" })))));
|
|
136
143
|
}
|
|
137
144
|
renderFieldset() {
|
|
138
145
|
const fieldsetClasses = index$1.classNames('ds-checkbox-fieldset');
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
|
+
const store = require('./store-9bd20f3c.js');
|
|
7
8
|
|
|
8
9
|
const dsInputValidityCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}.ds-input-validity{display:flex;align-items:center;margin-top:var(--ds-spacing-2xSmall);gap:var(--ds-spacing-2xSmall)}.ds-input-validity--error{color:var(--ds-textColor-danger)}.ds-input-validity--success{color:var(--ds-textColor-success)}.ds-input-validity ds-icon{display:block;height:1.5rem}.ds-input-validity small{font-family:var(--ds-fontFamily-body);font-size:var(--ds-fontSize-16);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);line-height:var(--ds-lineHeight-large)}";
|
|
9
10
|
const DsInputValidityStyle0 = dsInputValidityCss;
|
|
@@ -15,7 +16,7 @@ const DsInputValidity = class {
|
|
|
15
16
|
get el() { return index.getElement(this); }
|
|
16
17
|
text;
|
|
17
18
|
type = 'error';
|
|
18
|
-
validityRole
|
|
19
|
+
validityRole;
|
|
19
20
|
identifier;
|
|
20
21
|
componentDidLoad() {
|
|
21
22
|
this.identifier = this.el.getAttribute('id');
|
|
@@ -27,10 +28,7 @@ const DsInputValidity = class {
|
|
|
27
28
|
'ds-input-validity--success': this.type === 'success',
|
|
28
29
|
});
|
|
29
30
|
const icon = this.type === 'success' ? 'check_circle_fill' : 'warning_fill';
|
|
30
|
-
|
|
31
|
-
return null;
|
|
32
|
-
}
|
|
33
|
-
return (index.h(index.Fragment, null, this.text && (index.h("div", { class: classes, role: this.validityRole }, index.h("ds-icon", { name: icon }), index.h("small", { id: this.identifier }, this.text)))));
|
|
31
|
+
return (index.h("div", { key: '2eca152eca6e7b4d7e894ff8aaf50a6d03c3e44f', role: store.isValidation('client') ? this.validityRole : undefined }, this.text && (index.h("div", { key: '73e4cd1b3af6a84b9c7cbca813c166bc10e9dd26', class: classes }, index.h("ds-icon", { key: '4eaad4001e758837f9e8b1aae48292a1c5a1a08f', name: icon }), index.h("small", { key: '3ee5d39785454b9aab9ae6012f3ad940c1f18df0', id: this.identifier }, this.text)))));
|
|
34
32
|
}
|
|
35
33
|
};
|
|
36
34
|
DsInputValidity.style = DsInputValidityStyle0;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
7
|
const attributes = require('./attributes-5f5b58be.js');
|
|
8
|
-
const linkUtils = require('./linkUtils-
|
|
9
|
-
const utils = require('./utils-
|
|
8
|
+
const linkUtils = require('./linkUtils-695da37c.js');
|
|
9
|
+
const utils = require('./utils-2ba5e075.js');
|
|
10
10
|
|
|
11
11
|
const dsLinkWithArrowCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link-with-arrow{display:inline-flex;align-items:center;color:var(--ds-textColor-link);letter-spacing:var(--ds-letterSpacing-wide);font-weight:var(--ds-fontWeight-semibold);font-size:var(--ds-fontSize-16);text-decoration-line:none}.ds-link-with-arrow:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}@media (min-width: 30rem){.ds-link-with-arrow{font-size:var(--ds-fontSize-18)}}.ds-link-with-arrow__icon{display:inline-flex;width:2em;height:2em;line-height:0;align-items:center;justify-content:center;color:var(--ds-textColor-white);background-color:var(--ds-bgColor-primary)}.ds-link-with-arrow__icon--start{margin-right:var(--ds-spacing-xSmall)}.ds-link-with-arrow__icon--end{margin-left:var(--ds-spacing-xSmall)}:hover slot>.ds-link-with-arrow__icon{outline:10px solid;background-color:var(--ds-bgColor-primary-hover)}:active slot>.ds-link-with-arrow__icon{background-color:var(--ds-bgColor-primary-active)}.ds-link-with-arrow:hover,.ds-link-with-arrow:active{text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link-with-arrow:hover{color:var(--ds-textColor-link-hover)}.ds-link-with-arrow:active,.ds-link-with-arrow:focus-visible{color:var(--ds-textColor-link-active)}";
|
|
12
12
|
const DsLinkWithArrowStyle0 = dsLinkWithArrowCss;
|
|
@@ -26,7 +26,7 @@ const DsLinkWithArrow = class {
|
|
|
26
26
|
href;
|
|
27
27
|
target;
|
|
28
28
|
language;
|
|
29
|
-
|
|
29
|
+
ariaLabel;
|
|
30
30
|
componentWillLoad() {
|
|
31
31
|
this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label']);
|
|
32
32
|
if (linkUtils.opensInNewTab(this.target)) {
|
|
@@ -40,7 +40,7 @@ const DsLinkWithArrow = class {
|
|
|
40
40
|
'ds-link-with-arrow__icon--start': this.iconPosition === 'start',
|
|
41
41
|
'ds-link-with-arrow__icon--end': this.iconPosition === 'end',
|
|
42
42
|
});
|
|
43
|
-
return (index.h("a", { key: '
|
|
43
|
+
return (index.h("a", { key: 'bce4a90f9cc5113ab3d5b300d791d2299e22b7ad', href: this.href, class: classes, rel: this.rel, target: this.target, "aria-label": utils.getAriaLabel(this.text, this.ariaLabel), ...this.inheritedAttributes }, index.h("slot", { key: '96ba4a33114443aab36d1301cf65c56437b9a85b', name: "iconStart" }, this.iconPosition === 'start' && index.h("ds-icon", { key: '86d8029de69c1ecb3002a97f5bc0cdbf899b7f91', name: this.icon, class: iconClasses, size: "1.4em" })), this.text, index.h("slot", { key: '7c2dafaee60253b1f5c22819b1afec83d106234b', name: "iconStart" }, this.iconPosition === 'end' && index.h("ds-icon", { key: 'a9fb3e2ddee16cce7c6b8fc0fba0b11970567276', name: this.icon, class: iconClasses, size: "1.4em" })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: 'f93f37d0d10d7a2d51980ff8feb76915cc4823b2', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
DsLinkWithArrow.style = DsLinkWithArrowStyle0;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
const index = require('./index-
|
|
5
|
+
const index = require('./index-bf84b124.js');
|
|
6
6
|
const index$1 = require('./index-5b0b9d4c.js');
|
|
7
7
|
const attributes = require('./attributes-5f5b58be.js');
|
|
8
|
-
const linkUtils = require('./linkUtils-
|
|
9
|
-
const utils = require('./utils-
|
|
8
|
+
const linkUtils = require('./linkUtils-695da37c.js');
|
|
9
|
+
const utils = require('./utils-2ba5e075.js');
|
|
10
10
|
|
|
11
11
|
const dsLinkCss = ":root{--ds-breakpoint-xSmall:20rem;--ds-breakpoint-small:30rem;--ds-breakpoint-medium:60rem;--ds-breakpoint-large:75rem;--ds-breakpoint-xLarge:90rem}:host{display:inline-block}.ds-link{display:inline-flex;align-items:center;color:var(--ds-textColor-link);font-weight:var(--ds-fontWeight-regular);letter-spacing:var(--ds-letterSpacing-wide);text-decoration-line:underline;text-decoration-style:solid;text-decoration-skip-ink:auto;text-decoration-thickness:7%;text-underline-offset:12%;text-underline-position:from-font}.ds-link:focus-visible{box-shadow:0 0 0 var(--ds-borderWidth-thin) var(--ds-borderColor-white);outline-color:var(--ds-borderColor-black);outline-offset:var(--ds-borderWidth-thin);outline-style:solid;outline-width:var(--ds-borderWidth-thin)}.ds-link--semibold{font-weight:var(--ds-fontWeight-semibold)}.ds-link--bold{font-weight:var(--ds-fontWeight-bold)}.ds-link--2xLarge{font-size:var(--ds-fontSize-22)}.ds-link--xLarge{font-size:var(--ds-fontSize-20)}.ds-link--large{font-size:var(--ds-fontSize-18)}.ds-link--medium{font-size:var(--ds-fontSize-16)}.ds-link--small{font-size:var(--ds-fontSize-14)}.ds-link--xSmall{font-size:var(--ds-fontSize-12)}.ds-link__icon{height:1em;width:1em}.ds-link__icon--start-inline{margin-right:var(--ds-spacing-3xSmall)}.ds-link__icon--start-standalone{margin-right:var(--ds-spacing-2xSmall)}.ds-link__icon--end-inline{margin-left:var(--ds-spacing-3xSmall)}.ds-link__icon--end-standalone{margin-left:var(--ds-spacing-2xSmall)}.ds-link:hover,.ds-link:active{text-decoration-thickness:13%;text-underline-offset:12%}.ds-link:hover{color:var(--ds-textColor-link-hover)}.ds-link:active{color:var(--ds-textColor-link-active)}.ds-link:visited{color:var(--ds-textColor-link-visited)}.ds-link--standalone{color:var(--ds-textColor-link);text-decoration-line:none}.ds-link--standalone:hover,.ds-link--standalone:active{text-decoration-line:underline}.ds-link--standalone:hover{color:var(--ds-textColor-link-hover)}.ds-link--standalone:active{color:var(--ds-textColor-link-active)}.ds-link--standalone:focus-visible{color:var(--ds-textColor-link)}.ds-link--standalone:visited{color:var(--ds-textColor-link)}";
|
|
12
12
|
const DsLinkStyle0 = dsLinkCss;
|
|
@@ -32,7 +32,7 @@ const DsLink = class {
|
|
|
32
32
|
target;
|
|
33
33
|
download;
|
|
34
34
|
language;
|
|
35
|
-
|
|
35
|
+
ariaLabel;
|
|
36
36
|
componentWillLoad() {
|
|
37
37
|
this.inheritedAttributes = attributes.inheritAriaAttributes(this.el, ['aria-label']);
|
|
38
38
|
if (linkUtils.opensInNewTab(this.target)) {
|
|
@@ -49,7 +49,7 @@ const DsLink = class {
|
|
|
49
49
|
[`ds-link__icon--start-${this.variant}`]: this.iconPosition === 'start',
|
|
50
50
|
[`ds-link__icon--end-${this.variant}`]: this.iconPosition === 'end',
|
|
51
51
|
});
|
|
52
|
-
return (index.h("a", { key: '
|
|
52
|
+
return (index.h("a", { key: 'f8e36a029709033379e53cc1c409bc9c0069820e', href: this.href, class: classes, rel: this.rel, target: this.target, download: this.download, "aria-label": utils.getAriaLabel(this.text, this.ariaLabel), ...this.inheritedAttributes }, index.h("slot", { key: '88f90209b6557942dd956585b5f77632aa647c8e', name: "iconStart" }, this.icon && this.iconPosition === 'start' && index.h("ds-icon", { key: '87169acfb32913d10d27b35a9c6f714385979aa7', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), this.text, index.h("slot", { key: 'b38677240eb8bd7c1200c8dc08876ba75e7b3e81', name: "iconEnd" }, this.icon && this.iconPosition === 'end' && index.h("ds-icon", { key: 'c3088e302a43b4cbc5601a9adff54a3dc27a59dc', name: this.icon, class: iconClasses, size: "1em", title: this.iconTitle, hidden: this.iconHidden })), linkUtils.opensInNewTab(this.target) && (index.h("ds-visually-hidden", { key: '25ac189fd216148a05fddfc6e384cfbde59e0e22', id: this.visuallyHiddenAssistiveTextId }, linkUtils.visuallyHiddenAssistiveText(this.language ?? document.documentElement.lang)))));
|
|
53
53
|
}
|
|
54
54
|
};
|
|
55
55
|
DsLink.style = DsLinkStyle0;
|