@uh-design-system/component-library 0.5.2 → 0.6.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/{utils-3412cbed.js → attributes-BMbXzbwU.js} +2 -28
- package/dist/cjs/component-library.cjs.js +7 -7
- package/dist/cjs/controlUtils-ofqiQxRF.js +42 -0
- package/dist/cjs/ds-accordion.cjs.entry.js +79 -0
- package/dist/cjs/ds-button.cjs.entry.js +107 -0
- package/dist/cjs/ds-card.cjs.entry.js +58 -0
- package/dist/cjs/ds-checkbox-group.cjs.entry.js +109 -49
- package/dist/cjs/ds-checkbox.cjs.entry.js +88 -79
- package/dist/cjs/ds-icon.cjs.entry.js +943 -0
- package/dist/cjs/ds-input-validity.cjs.entry.js +14 -15
- package/dist/cjs/ds-link-with-arrow.cjs.entry.js +21 -20
- package/dist/cjs/ds-link.cjs.entry.js +34 -31
- package/dist/cjs/ds-radio-button-group.cjs.entry.js +153 -0
- package/dist/cjs/ds-radio-button.cjs.entry.js +151 -0
- package/dist/cjs/ds-spinner.cjs.entry.js +62 -0
- package/dist/cjs/ds-text-input.cjs.entry.js +90 -77
- package/dist/cjs/ds-visually-hidden.cjs.entry.js +3 -6
- package/dist/cjs/index-Bp6Dd2i1.js +94 -0
- package/dist/cjs/{store-9bd20f3c.js → index-DwLFyR5p.js} +6 -2
- package/dist/cjs/{index-bf84b124.js → index-Mjp9Y-Sw.js} +701 -55
- package/dist/cjs/index.cjs.js +3 -5
- package/dist/cjs/{linkUtils-695da37c.js → linkUtils-onlbgKdI.js} +4 -2
- package/dist/cjs/loader.cjs.js +3 -5
- package/dist/cjs/utils-BjZTECpy.js +29 -0
- package/dist/collection/accessibility/stories/naming.stories.js +3 -3
- package/dist/collection/collection-manifest.json +78 -3
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.css +18 -17
- package/dist/collection/components/01-base-components/ds-accordion/ds-accordion.js +91 -50
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.examples.stories.js +6 -6
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.features.stories.js +14 -14
- package/dist/collection/components/01-base-components/ds-accordion/stories/ds-accordion.stories.js +24 -66
- package/dist/collection/components/01-base-components/ds-button/ds-button.css +124 -145
- package/dist/collection/components/01-base-components/ds-button/ds-button.js +150 -65
- package/dist/collection/components/01-base-components/ds-button/stories/ds-button.examples.stories.js +121 -23
- package/dist/collection/components/01-base-components/ds-button/stories/ds-button.features.stories.js +49 -42
- package/dist/collection/components/01-base-components/ds-button/stories/ds-button.stories.js +16 -72
- package/dist/collection/components/01-base-components/ds-card/ds-card.css +127 -0
- package/dist/collection/components/01-base-components/ds-card/ds-card.js +303 -0
- package/dist/collection/components/01-base-components/ds-card/stories/ds-card.examples.stories.js +92 -0
- package/dist/collection/components/01-base-components/ds-card/stories/ds-card.features.stories.js +66 -0
- package/dist/collection/components/01-base-components/ds-card/stories/ds-card.stories.js +71 -0
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.css +46 -46
- package/dist/collection/components/01-base-components/ds-checkbox/ds-checkbox.js +120 -111
- package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.features.stories.js +20 -20
- package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js +12 -25
- package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.css +2 -3
- package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js +214 -63
- package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.js +215 -50
- package/dist/collection/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.stories.js +30 -28
- package/dist/collection/components/01-base-components/ds-icon/ds-icon.js +36 -31
- package/dist/collection/components/01-base-components/ds-icon/stories/ds-icon.stories.js +10 -37
- package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.css +2 -2
- package/dist/collection/components/01-base-components/ds-input-validity/ds-input-validity.js +60 -30
- package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.features.stories.js +4 -4
- package/dist/collection/components/01-base-components/ds-input-validity/stories/ds-input-validity.stories.js +4 -9
- package/dist/collection/components/01-base-components/ds-link/ds-link.css +24 -14
- package/dist/collection/components/01-base-components/ds-link/ds-link.js +74 -75
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.examples.stories.js +27 -27
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.features.stories.js +38 -21
- package/dist/collection/components/01-base-components/ds-link/stories/ds-link.stories.js +8 -67
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.css +10 -12
- package/dist/collection/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.js +30 -52
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.examples.stories.js +4 -4
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.features.stories.js +6 -6
- package/dist/collection/components/01-base-components/ds-link-with-arrow/stories/ds-link-with-arrow.stories.js +4 -28
- package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.css +115 -0
- package/dist/collection/components/01-base-components/ds-radio-button/ds-radio-button.js +449 -0
- package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.js +72 -0
- package/dist/collection/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.js +22 -0
- package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.css +30 -0
- package/dist/collection/components/01-base-components/ds-radio-button-group/ds-radio-button-group.js +360 -0
- package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.js +42 -0
- package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.js +71 -0
- package/dist/collection/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.js +60 -0
- package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.css +279 -0
- package/dist/collection/components/01-base-components/ds-spinner/ds-spinner.js +221 -0
- package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.js +120 -0
- package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.js +107 -0
- package/dist/collection/components/01-base-components/ds-spinner/stories/ds-spinner.stories.js +14 -0
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.css +85 -118
- package/dist/collection/components/01-base-components/ds-text-input/ds-text-input.js +230 -155
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.examples.stories.js +26 -21
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.features.stories.js +40 -40
- package/dist/collection/components/01-base-components/ds-text-input/stories/ds-text-input.stories.js +30 -56
- package/dist/collection/components/01-base-components/ds-visually-hidden/ds-visually-hidden.js +1 -1
- package/dist/collection/store.js +7 -1
- package/dist/collection/utils/attributes/attributes.js +2 -2
- package/dist/collection/utils/button/buttonUtils.js +14 -0
- package/dist/collection/utils/colours/colourTypes.js +3 -3
- package/dist/collection/utils/colours/colourUtils.js +5 -3
- package/dist/collection/utils/controls/controlUtils.js +35 -1
- package/dist/collection/utils/link/linkUtils.js +3 -2
- package/dist/collection/utils/spinner/spinnerUtils.js +20 -0
- package/dist/collection/utils/tests/testUtils.js +1 -0
- package/dist/collection/utils/typography/typographyUtils.js +3 -3
- package/dist/collection/utils/utils.js +10 -9
- package/dist/component-library/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +1 -1
- package/dist/component-library/component-library.css +1 -1
- package/dist/component-library/component-library.esm.js +1 -1
- package/dist/component-library/controlUtils-CNER0MvM.js +1 -0
- package/dist/component-library/ds-accordion.entry.js +1 -0
- package/dist/component-library/ds-button.entry.js +1 -0
- package/dist/component-library/ds-card.entry.js +1 -0
- 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-icon.entry.js +1 -0
- 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-radio-button-group.entry.js +1 -0
- package/dist/component-library/ds-radio-button.entry.js +1 -0
- package/dist/component-library/ds-spinner.entry.js +1 -0
- 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-BfTCfPZ1.js +6 -0
- package/dist/component-library/index-Cm7V4EAn.js +2 -0
- package/dist/component-library/index-DuYjhvTn.js +1 -0
- package/dist/component-library/index.esm.js +1 -1
- package/dist/component-library/linkUtils-02nCfO0F.js +1 -0
- package/dist/component-library/utils-CqaqnfY4.js +1 -0
- package/dist/components/attributes.js +3 -3
- package/dist/components/controlUtils.js +35 -2
- package/dist/components/ds-accordion.js +58 -42
- package/dist/components/ds-button2.js +78 -39
- package/dist/components/ds-card.d.ts +11 -0
- package/dist/components/ds-card.js +91 -0
- package/dist/components/ds-checkbox-group.js +116 -56
- package/dist/components/ds-checkbox2.js +93 -80
- package/dist/components/ds-icon2.js +292 -292
- package/dist/components/ds-input-validity2.js +17 -14
- package/dist/components/ds-link-with-arrow.js +22 -22
- package/dist/components/ds-link.js +43 -40
- package/dist/components/ds-radio-button-group.d.ts +11 -0
- package/dist/components/ds-radio-button-group.js +185 -0
- package/dist/components/ds-radio-button.d.ts +11 -0
- package/dist/components/ds-radio-button.js +198 -0
- package/dist/components/ds-spinner.d.ts +11 -0
- package/dist/components/ds-spinner.js +6 -0
- package/dist/components/ds-spinner2.js +89 -0
- package/dist/components/ds-text-input.js +126 -104
- package/dist/components/ds-visually-hidden2.js +2 -3
- package/dist/components/index.js +208 -2
- package/dist/components/index2.js +713 -39
- package/dist/components/index3.js +69 -57
- package/dist/components/linkUtils.js +4 -2
- package/dist/docs.d.ts +443 -0
- package/dist/docs.json +4790 -0
- package/dist/esm/{utils-cfc536bc.js → attributes-BD_lNRxn.js} +3 -26
- package/dist/esm/component-library.js +6 -5
- package/dist/esm/controlUtils-CNER0MvM.js +37 -0
- package/dist/esm/ds-accordion.entry.js +77 -0
- package/dist/esm/ds-button.entry.js +105 -0
- package/dist/esm/ds-card.entry.js +56 -0
- package/dist/esm/ds-checkbox-group.entry.js +108 -46
- package/dist/esm/ds-checkbox.entry.js +78 -67
- package/dist/esm/ds-icon.entry.js +941 -0
- package/dist/esm/ds-input-validity.entry.js +14 -13
- package/dist/esm/ds-link-with-arrow.entry.js +21 -18
- package/dist/esm/ds-link.entry.js +34 -29
- package/dist/esm/ds-radio-button-group.entry.js +151 -0
- package/dist/esm/ds-radio-button.entry.js +149 -0
- package/dist/esm/ds-spinner.entry.js +60 -0
- package/dist/esm/ds-text-input.entry.js +88 -73
- package/dist/esm/ds-visually-hidden.entry.js +3 -4
- package/dist/esm/index-BfTCfPZ1.js +92 -0
- package/dist/esm/{index-434995e1.js → index-Cm7V4EAn.js} +699 -34
- package/dist/{components/store.js → esm/index-DuYjhvTn.js} +6 -3
- package/dist/esm/index.js +2 -2
- package/dist/esm/{linkUtils-3d1b28cf.js → linkUtils-02nCfO0F.js} +4 -2
- package/dist/esm/loader.js +4 -4
- package/dist/esm/utils-CqaqnfY4.js +25 -0
- package/dist/hydrate/index.d.ts +271 -0
- package/dist/hydrate/index.js +22280 -0
- package/dist/hydrate/index.mjs +22272 -0
- package/dist/hydrate/package.json +12 -0
- package/dist/styles/helpers.css +15 -0
- package/dist/styles/helpers.css.map +1 -0
- package/dist/styles/mixins/_breakpoints.scss +13 -0
- package/dist/styles/mixins/_focus.scss +26 -0
- package/dist/styles/mixins/_wrapper.scss +5 -0
- package/dist/styles/mixins/imports-default/_imports.scss +2 -0
- package/dist/styles/mixins/tokens/_breakpoints.scss +13 -0
- package/dist/styles/mixins/tokens/_semantic-colours.scss +75 -0
- package/dist/styles/mixins.scss +12 -0
- package/dist/styles/variables.css +176 -0
- package/dist/styles/variables.css.map +1 -0
- package/dist/types/components/01-base-components/ds-accordion/ds-accordion.d.ts +11 -8
- package/dist/types/components/01-base-components/ds-button/ds-button.d.ts +16 -11
- package/dist/types/components/01-base-components/ds-button/stories/ds-button.examples.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-button/stories/ds-button.features.stories.d.ts +1 -0
- package/dist/types/components/01-base-components/ds-card/ds-card.d.ts +20 -0
- package/dist/types/components/01-base-components/ds-card/stories/ds-card.examples.stories.d.ts +8 -0
- package/dist/types/components/01-base-components/ds-card/stories/ds-card.features.stories.d.ts +8 -0
- package/dist/types/components/01-base-components/ds-card/stories/ds-card.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-checkbox/ds-checkbox.d.ts +21 -22
- package/dist/types/components/01-base-components/ds-checkbox-group/ds-checkbox-group.d.ts +21 -11
- package/dist/types/components/01-base-components/ds-checkbox-group/stories/ds-checkbox-group.features.stories.d.ts +3 -0
- package/dist/types/components/01-base-components/ds-icon/ds-icon.d.ts +7 -5
- package/dist/types/components/01-base-components/ds-input-validity/ds-input-validity.d.ts +5 -6
- package/dist/types/components/01-base-components/ds-link/ds-link.d.ts +13 -14
- package/dist/types/components/01-base-components/ds-link/stories/ds-link.features.stories.d.ts +2 -0
- package/dist/types/components/01-base-components/ds-link-with-arrow/ds-link-with-arrow.d.ts +5 -7
- package/dist/types/components/01-base-components/ds-radio-button/ds-radio-button.d.ts +44 -0
- package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.features.stories.d.ts +15 -0
- package/dist/types/components/01-base-components/ds-radio-button/stories/ds-radio-button.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-radio-button-group/ds-radio-button-group.d.ts +34 -0
- package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.examples.stories.d.ts +6 -0
- package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.features.stories.d.ts +11 -0
- package/dist/types/components/01-base-components/ds-radio-button-group/stories/ds-radio-button-group.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-spinner/ds-spinner.d.ts +17 -0
- package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.examples.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.features.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-spinner/stories/ds-spinner.stories.d.ts +7 -0
- package/dist/types/components/01-base-components/ds-text-input/ds-text-input.d.ts +37 -32
- package/dist/types/components.d.ts +1287 -228
- package/dist/types/stencil-public-runtime.d.ts +22 -0
- package/dist/types/store.d.ts +6 -1
- package/dist/types/utils/attributes/attributes.d.ts +1 -1
- package/dist/types/utils/button/buttonUtils.d.ts +1 -0
- package/dist/types/utils/colours/colourTypes.d.ts +3 -3
- package/dist/types/utils/controls/controlUtils.d.ts +2 -0
- package/dist/types/utils/link/linkUtils.d.ts +1 -1
- package/dist/types/utils/spinner/spinnerUtils.d.ts +1 -0
- package/dist/types/utils/tests/testUtils.d.ts +1 -0
- package/dist/types/utils/utils.d.ts +2 -1
- package/package.json +40 -36
- package/dist/cjs/controlUtils-041de0fd.js +0 -7
- package/dist/cjs/ds-accordion_3.cjs.entry.js +0 -1095
- package/dist/cjs/index-5b0b9d4c.js +0 -82
- package/dist/component-library/controlUtils-9ca4087b.js +0 -1
- package/dist/component-library/ds-accordion_3.entry.js +0 -1
- package/dist/component-library/index-434995e1.js +0 -2
- package/dist/component-library/index-72ac5051.js +0 -6
- package/dist/component-library/linkUtils-3d1b28cf.js +0 -1
- package/dist/component-library/store-b8d17c10.js +0 -1
- package/dist/esm/controlUtils-9ca4087b.js +0 -4
- package/dist/esm/ds-accordion_3.entry.js +0 -1089
- package/dist/esm/index-72ac5051.js +0 -80
- package/dist/esm/store-b8d17c10.js +0 -204
- package/dist/loader/package.json +0 -11
- /package/dist/cjs/{app-globals-3a1e7e63.js → app-globals-V2Kpy_OQ.js} +0 -0
- /package/dist/component-library/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
- /package/dist/esm/{app-globals-0f993ce5.js → app-globals-DQuL1Twl.js} +0 -0
|
@@ -7,41 +7,41 @@ const meta = {
|
|
|
7
7
|
export default meta;
|
|
8
8
|
export const Unchecked = {
|
|
9
9
|
args: {
|
|
10
|
-
|
|
11
|
-
|
|
10
|
+
dsText: 'Checkbox text',
|
|
11
|
+
dsChecked: false,
|
|
12
12
|
},
|
|
13
13
|
};
|
|
14
14
|
export const Checked = {
|
|
15
15
|
args: {
|
|
16
|
-
|
|
17
|
-
|
|
16
|
+
dsText: 'Checkbox text',
|
|
17
|
+
dsChecked: true,
|
|
18
18
|
},
|
|
19
19
|
};
|
|
20
20
|
export const Indeterminate = {
|
|
21
21
|
args: {
|
|
22
|
-
|
|
23
|
-
|
|
22
|
+
dsText: 'Checkbox text',
|
|
23
|
+
dsIndeterminate: true,
|
|
24
24
|
},
|
|
25
25
|
};
|
|
26
26
|
export const Disabled = {
|
|
27
27
|
args: {
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
28
|
+
dsText: 'Checkbox text',
|
|
29
|
+
dsChecked: false,
|
|
30
|
+
dsDisabled: true
|
|
31
31
|
},
|
|
32
32
|
};
|
|
33
33
|
export const Invalid = {
|
|
34
34
|
args: {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
dsText: 'Checkbox text',
|
|
36
|
+
dsChecked: false,
|
|
37
|
+
dsErrorText: 'Error text',
|
|
38
38
|
},
|
|
39
39
|
};
|
|
40
40
|
const withoutValueTextDOM = html `
|
|
41
41
|
<div class="ds-sb-without-value-text">
|
|
42
|
-
<ds-checkbox checked="false" aria-label="Checkbox text"></ds-checkbox>
|
|
43
|
-
<ds-checkbox disabled="true" aria-label="Checkbox text"></ds-checkbox>
|
|
44
|
-
<ds-checkbox error-text="Error text" aria-label="Checkbox text"></ds-checkbox>
|
|
42
|
+
<ds-checkbox ds-checked="false" ds-aria-label="Checkbox text"></ds-checkbox>
|
|
43
|
+
<ds-checkbox ds-disabled="true" ds-aria-label="Checkbox text"></ds-checkbox>
|
|
44
|
+
<ds-checkbox ds-error-text="Error text" ds-aria-label="Checkbox text"></ds-checkbox>
|
|
45
45
|
</div>
|
|
46
46
|
`;
|
|
47
47
|
export const WithoutValueText = {
|
|
@@ -64,8 +64,8 @@ export const WithoutValueText = {
|
|
|
64
64
|
};
|
|
65
65
|
const requiredAndOptionalDOM = html `
|
|
66
66
|
<div class="ds-sb-required-and-optional">
|
|
67
|
-
<ds-checkbox required="true" text="Checkbox text"></ds-checkbox>
|
|
68
|
-
<ds-checkbox optional="true" text="Checkbox text"></ds-checkbox>
|
|
67
|
+
<ds-checkbox ds-required="true" ds-text="Checkbox text"></ds-checkbox>
|
|
68
|
+
<ds-checkbox ds-optional="true" ds-text="Checkbox text"></ds-checkbox>
|
|
69
69
|
<div>
|
|
70
70
|
`;
|
|
71
71
|
export const RequiredAndOptional = {
|
|
@@ -89,9 +89,9 @@ export const RequiredAndOptional = {
|
|
|
89
89
|
};
|
|
90
90
|
const withLegendAndAssistiveTextDOM = html `
|
|
91
91
|
<div class="ds-sb-with-legend-and-assistive-text">
|
|
92
|
-
<ds-checkbox legend="Legend text" assistive-text="Assistive text" text="Checkbox text"></ds-checkbox>
|
|
93
|
-
<ds-checkbox legend="Legend text" assistive-text="Assistive text" text="Checkbox text" required="true"></ds-checkbox>
|
|
94
|
-
<ds-checkbox legend="Legend text" assistive-text="Assistive text" text="Checkbox text" optional="true"></ds-checkbox>
|
|
92
|
+
<ds-checkbox ds-legend="Legend text" ds-assistive-text="Assistive text" ds-text="Checkbox text"></ds-checkbox>
|
|
93
|
+
<ds-checkbox ds-legend="Legend text" ds-assistive-text="Assistive text" ds-text="Checkbox text" ds-required="true"></ds-checkbox>
|
|
94
|
+
<ds-checkbox ds-legend="Legend text" ds-assistive-text="Assistive text" ds-text="Checkbox text" ds-optional="true"></ds-checkbox>
|
|
95
95
|
</div>
|
|
96
96
|
`;
|
|
97
97
|
export const WithLegendAndAssistiveText = {
|
package/dist/collection/components/01-base-components/ds-checkbox/stories/ds-checkbox.stories.js
CHANGED
|
@@ -5,34 +5,21 @@ const meta = {
|
|
|
5
5
|
export default meta;
|
|
6
6
|
export const Default = {
|
|
7
7
|
args: {
|
|
8
|
-
|
|
9
|
-
|
|
8
|
+
dsText: 'Checkbox text',
|
|
9
|
+
dsChecked: false,
|
|
10
10
|
},
|
|
11
11
|
};
|
|
12
12
|
export const Playground = {
|
|
13
13
|
args: {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
},
|
|
25
|
-
argTypes: {
|
|
26
|
-
text: { control: 'text' },
|
|
27
|
-
checked: { control: 'boolean' },
|
|
28
|
-
indeterminate: { control: 'boolean' },
|
|
29
|
-
disabled: { control: 'boolean' },
|
|
30
|
-
errorText: { control: 'text' },
|
|
31
|
-
required: { control: 'boolean' },
|
|
32
|
-
optional: { control: 'boolean' },
|
|
33
|
-
legend: { control: 'text' },
|
|
34
|
-
assistiveText: { control: 'text' },
|
|
35
|
-
optionalText: { control: 'text' },
|
|
36
|
-
ariaLabel: { name: 'aria-label', control: 'text' },
|
|
14
|
+
dsText: 'Checkbox text',
|
|
15
|
+
dsChecked: false,
|
|
16
|
+
dsIndeterminate: false,
|
|
17
|
+
dsDisabled: false,
|
|
18
|
+
dsErrorText: '',
|
|
19
|
+
dsRequired: false,
|
|
20
|
+
dsOptional: false,
|
|
21
|
+
dsLegend: '',
|
|
22
|
+
dsAssistiveText: '',
|
|
23
|
+
dsOptionalText: '',
|
|
37
24
|
},
|
|
38
25
|
};
|
package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.css
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
}
|
|
15
15
|
.ds-checkbox-group__assistive-text {
|
|
16
16
|
font-size: var(--ds-fontSize-14);
|
|
17
|
-
color: var(--ds-
|
|
17
|
+
color: var(--ds-palette-black-70);
|
|
18
18
|
line-height: var(--ds-lineHeight-large);
|
|
19
19
|
margin-bottom: var(--ds-spacing-2xSmall);
|
|
20
20
|
}
|
|
@@ -32,7 +32,6 @@
|
|
|
32
32
|
margin-left: var(--ds-spacing-large);
|
|
33
33
|
}
|
|
34
34
|
.ds-checkbox-group--horizontal > .ds-checkbox-group__checkboxes {
|
|
35
|
-
flex-
|
|
35
|
+
flex-flow: row wrap;
|
|
36
36
|
gap: var(--ds-spacing-small);
|
|
37
|
-
flex-wrap: wrap;
|
|
38
37
|
}
|
package/dist/collection/components/01-base-components/ds-checkbox-group/ds-checkbox-group.js
CHANGED
|
@@ -2,8 +2,10 @@ import { Fragment, h } from "@stencil/core";
|
|
|
2
2
|
import classNames from "classnames";
|
|
3
3
|
import { inheritAriaAttributes } from "../../../utils/attributes/attributes";
|
|
4
4
|
import { idGenerator } from "../../../utils/utils";
|
|
5
|
+
import { allOptions, atLeastOneOption, getOptionalText, getRequiredText } from "../../../utils/controls/controlUtils";
|
|
5
6
|
const fieldsetIdGenerator = idGenerator('ds-checkbox-group');
|
|
6
7
|
export class DsCheckboxGroup {
|
|
8
|
+
checkboxElem;
|
|
7
9
|
fieldsetId = fieldsetIdGenerator.next().value;
|
|
8
10
|
checkboxId = `${this.fieldsetId}-checkbox`;
|
|
9
11
|
errorTextId = `${this.fieldsetId}-error`;
|
|
@@ -11,23 +13,45 @@ export class DsCheckboxGroup {
|
|
|
11
13
|
nestedId = `${this.fieldsetId}-nested`;
|
|
12
14
|
inheritedAttributes = {};
|
|
13
15
|
el;
|
|
16
|
+
internals;
|
|
14
17
|
dsCheckboxGroupChange;
|
|
15
18
|
dsCheckboxGroupIndeterminateChildChange;
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
dsCheckboxGroupInvalidStateChange;
|
|
20
|
+
dsLegend;
|
|
21
|
+
dsAssistiveText;
|
|
22
|
+
dsDirection = 'vertical';
|
|
23
|
+
dsErrorText = '';
|
|
24
|
+
dsText = '';
|
|
25
|
+
dsChecked = false;
|
|
26
|
+
dsDisabled = false;
|
|
27
|
+
dsRequired = false;
|
|
28
|
+
dsAllRequired = false;
|
|
29
|
+
dsOptional = false;
|
|
30
|
+
dsOptionalText;
|
|
31
|
+
childElementsCount = 1;
|
|
24
32
|
checkedChildElementCount = 0;
|
|
25
33
|
isIndeterminate = false;
|
|
26
34
|
indeterminateChildCheckboxCount = 0;
|
|
35
|
+
showInternalsValidationMessage = false;
|
|
27
36
|
elementIs = (localName) => (element) => element.localName === localName;
|
|
28
37
|
elementIsCheckbox = this.elementIs('ds-checkbox');
|
|
29
38
|
elementIsCheckboxGroup = this.elementIs('ds-checkbox-group');
|
|
30
|
-
|
|
39
|
+
getLegendText = () => {
|
|
40
|
+
if (this.dsRequired || this.dsAllRequired) {
|
|
41
|
+
return getRequiredText(this.dsLegend);
|
|
42
|
+
}
|
|
43
|
+
if (this.dsOptional) {
|
|
44
|
+
return getOptionalText(this.dsLegend, this.dsOptionalText);
|
|
45
|
+
}
|
|
46
|
+
return this.dsLegend;
|
|
47
|
+
};
|
|
48
|
+
getAriaDescribedBy = () => [
|
|
49
|
+
!!this.dsAssistiveText && this.assistiveTextId,
|
|
50
|
+
(!!this.dsErrorText || (this.showInternalsValidationMessage && !!this.internals?.validationMessage)) && this.errorTextId,
|
|
51
|
+
]
|
|
52
|
+
.filter(Boolean)
|
|
53
|
+
.join(' ');
|
|
54
|
+
getValidationMessage = () => this.dsErrorText || (this.showInternalsValidationMessage ? this.internals?.validationMessage : '');
|
|
31
55
|
getChildElements = () => {
|
|
32
56
|
const slot = this.el.shadowRoot.querySelector('slot');
|
|
33
57
|
return (slot?.assignedElements() || []);
|
|
@@ -44,7 +68,7 @@ export class DsCheckboxGroup {
|
|
|
44
68
|
updateChildElementsChecked = (checked) => {
|
|
45
69
|
this.checkedChildElementCount = checked ? this.childElementsCount : 0;
|
|
46
70
|
this.updateChildElements((element) => {
|
|
47
|
-
element.
|
|
71
|
+
element.dsChecked = checked;
|
|
48
72
|
if (this.elementIsCheckboxGroup(element)) {
|
|
49
73
|
(async () => {
|
|
50
74
|
await element.setChecked(checked);
|
|
@@ -57,7 +81,7 @@ export class DsCheckboxGroup {
|
|
|
57
81
|
}
|
|
58
82
|
watchCheckboxDisabledChange(newValue) {
|
|
59
83
|
this.updateChildElements((element) => {
|
|
60
|
-
element.
|
|
84
|
+
element.dsDisabled = newValue;
|
|
61
85
|
});
|
|
62
86
|
}
|
|
63
87
|
watchCheckedChange(newValue) {
|
|
@@ -66,72 +90,100 @@ export class DsCheckboxGroup {
|
|
|
66
90
|
watchIndeterminateChange(newValue) {
|
|
67
91
|
this.dsCheckboxGroupIndeterminateChildChange.emit({ id: this.fieldsetId, indeterminate: newValue });
|
|
68
92
|
}
|
|
93
|
+
errorTextObserver(errorText) {
|
|
94
|
+
this.dsCheckboxGroupInvalidStateChange.emit(!!errorText);
|
|
95
|
+
}
|
|
69
96
|
listenIndeterminateChildChange(event) {
|
|
70
97
|
this.indeterminateChildCheckboxCount = event.detail.indeterminate ? this.indeterminateChildCheckboxCount + 1 : this.indeterminateChildCheckboxCount - 1;
|
|
71
98
|
}
|
|
72
|
-
watchCheckedChildElementCountChange(
|
|
73
|
-
this.isIndeterminate =
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
99
|
+
watchCheckedChildElementCountChange() {
|
|
100
|
+
this.isIndeterminate = this.checkedChildElementCount > 0 && this.checkedChildElementCount < this.childElementsCount;
|
|
101
|
+
if (this.dsRequired && this.checkedChildElementCount === 0) {
|
|
102
|
+
this.internals?.setValidity({ valueMissing: true }, atLeastOneOption(), this.getChildCheckboxElements()?.[0].shadowRoot.querySelector('input'));
|
|
103
|
+
}
|
|
104
|
+
else if (this.dsAllRequired && this.checkedChildElementCount !== this.childElementsCount) {
|
|
105
|
+
this.internals?.setValidity({ valueMissing: true }, allOptions(), this.getChildCheckboxElements()?.[0].shadowRoot.querySelector('input'));
|
|
77
106
|
}
|
|
78
|
-
else
|
|
79
|
-
this.
|
|
107
|
+
else {
|
|
108
|
+
this.internals?.setValidity({ valueMissing: false });
|
|
80
109
|
}
|
|
81
110
|
}
|
|
82
|
-
updateCheckedChildElementCount = (
|
|
83
|
-
if (
|
|
84
|
-
this.checkedChildElementCount =
|
|
111
|
+
updateCheckedChildElementCount = (checked) => {
|
|
112
|
+
if (checked) {
|
|
113
|
+
this.checkedChildElementCount = Math.min(this.childElementsCount, this.checkedChildElementCount + 1);
|
|
85
114
|
}
|
|
86
115
|
else {
|
|
87
|
-
this.checkedChildElementCount =
|
|
116
|
+
this.checkedChildElementCount = Math.max(0, this.checkedChildElementCount - 1);
|
|
88
117
|
}
|
|
89
118
|
};
|
|
90
119
|
listenCheckboxChange(event) {
|
|
91
|
-
if (
|
|
92
|
-
this.
|
|
120
|
+
if (!this.showInternalsValidationMessage) {
|
|
121
|
+
this.showInternalsValidationMessage = true;
|
|
122
|
+
}
|
|
123
|
+
if (event.target === this.el) {
|
|
124
|
+
this.updateChildElementsChecked(this.checkboxElem.dsChecked);
|
|
125
|
+
this.dsCheckboxGroupChange.emit({ id: this.fieldsetId, checked: this.checkboxElem.dsChecked });
|
|
93
126
|
return;
|
|
94
127
|
}
|
|
95
|
-
|
|
96
|
-
|
|
128
|
+
const target = event.target;
|
|
129
|
+
if (this.getChildCheckboxElements().includes(target)) {
|
|
130
|
+
const previousCheckedChildElementCount = this.checkedChildElementCount;
|
|
131
|
+
this.updateCheckedChildElementCount(target.dsChecked);
|
|
132
|
+
if (this.checkedChildElementCount === this.childElementsCount && this.checkedChildElementCount > previousCheckedChildElementCount) {
|
|
133
|
+
this.dsCheckboxGroupChange.emit({ id: this.fieldsetId, checked: true });
|
|
134
|
+
}
|
|
135
|
+
else if (previousCheckedChildElementCount === this.childElementsCount && this.checkedChildElementCount < previousCheckedChildElementCount) {
|
|
136
|
+
this.dsCheckboxGroupChange.emit({ id: this.fieldsetId, checked: false });
|
|
137
|
+
}
|
|
97
138
|
}
|
|
98
139
|
}
|
|
99
140
|
listenCheckboxGroupChange(event) {
|
|
100
141
|
if (this.getChildElements().includes(event.target)) {
|
|
101
|
-
|
|
142
|
+
event.stopPropagation();
|
|
143
|
+
this.updateCheckedChildElementCount(event.detail.checked);
|
|
102
144
|
}
|
|
103
145
|
}
|
|
104
|
-
|
|
105
|
-
this.
|
|
106
|
-
}
|
|
146
|
+
formResetCallback() {
|
|
147
|
+
this.internals?.setValidity({});
|
|
148
|
+
}
|
|
107
149
|
componentWillLoad() {
|
|
108
150
|
this.inheritedAttributes = inheritAriaAttributes(this.el, ['aria-labelledby']);
|
|
109
151
|
}
|
|
110
152
|
componentDidLoad() {
|
|
111
|
-
this.
|
|
153
|
+
this.childElementsCount = this.getChildElements().length;
|
|
112
154
|
this.updateChildCheckboxes(element => {
|
|
113
|
-
element.setAttribute('
|
|
155
|
+
element.setAttribute('ds-errors-disabled', 'true');
|
|
114
156
|
});
|
|
157
|
+
if (this.dsRequired) {
|
|
158
|
+
this.internals?.setValidity({ valueMissing: true }, atLeastOneOption(), this.getChildCheckboxElements()?.[0].shadowRoot.querySelector('input'));
|
|
159
|
+
}
|
|
160
|
+
else if (this.dsAllRequired) {
|
|
161
|
+
this.internals?.setValidity({ valueMissing: true }, allOptions(), this.getChildCheckboxElements()?.[0].shadowRoot.querySelector('input'));
|
|
162
|
+
}
|
|
115
163
|
}
|
|
116
164
|
componentDidUpdate() {
|
|
117
|
-
this.
|
|
165
|
+
const childElementCount = this.getChildElements().length;
|
|
166
|
+
if (this.childElementsCount !== childElementCount) {
|
|
167
|
+
this.childElementsCount = childElementCount;
|
|
168
|
+
}
|
|
118
169
|
}
|
|
119
170
|
render() {
|
|
120
171
|
const classes = classNames('ds-checkbox-group', {
|
|
121
|
-
'ds-checkbox-group--horizontal': this.
|
|
172
|
+
'ds-checkbox-group--horizontal': this.dsDirection === 'horizontal',
|
|
122
173
|
});
|
|
123
174
|
const legendClasses = classNames('ds-checkbox-group__legend');
|
|
124
175
|
const assistiveTextClasses = classNames('ds-checkbox-group__assistive-text');
|
|
125
176
|
const errorClasses = classNames('ds-checkbox-group__error', {
|
|
126
|
-
'ds-checkbox-group__error--visible': Boolean(this.
|
|
177
|
+
'ds-checkbox-group__error--visible': Boolean(this.dsErrorText),
|
|
127
178
|
});
|
|
128
179
|
const nestedClasses = classNames('ds-checkbox-group', 'ds-checkbox-group--inset');
|
|
129
180
|
const checkboxesClasses = classNames('ds-checkbox-group__checkboxes');
|
|
130
181
|
const ariaDescribedBy = this.getAriaDescribedBy();
|
|
131
|
-
return (h("fieldset", { key: '
|
|
182
|
+
return (h("fieldset", { key: '98ff7c5dd5c36c163ed1dfb177d5c0b28b93971a', id: this.fieldsetId, class: classes, "aria-describedby": ariaDescribedBy, ...this.inheritedAttributes }, this.dsLegend && h("legend", { key: '22274e3c85262fd08f69a9aa548d2910eaf30ce2', class: legendClasses }, this.getLegendText()), this.dsAssistiveText && (h("small", { key: '4566b9d66b0be262548ddecd11f6eda5acc6d399', class: assistiveTextClasses, id: this.assistiveTextId }, this.dsAssistiveText)), this.dsText ? (h(Fragment, null, h("ds-checkbox", { ref: checkboxElem => (this.checkboxElem = checkboxElem), dsId: this.checkboxId, dsText: this.dsText, dsChecked: this.checkedChildElementCount === this.childElementsCount, dsDisabled: this.dsDisabled, dsIndeterminate: this.indeterminateChildCheckboxCount > 0 || this.isIndeterminate }), h("fieldset", { id: this.nestedId, "aria-labelledby": this.checkboxId, class: nestedClasses }, h("slot", null)))) : (h("div", { class: checkboxesClasses }, h("slot", null))), (!!this.dsErrorText || this.dsRequired || this.dsAllRequired) && (h("div", { key: 'd0a2dbc9d46967de609096d9a398b040f5228807', class: errorClasses }, h("ds-input-validity", { key: '409b5d8fbd59b26245cb828146f28eec3d010aaa', id: this.errorTextId, dsText: this.getValidationMessage(), dsType: "error", dsAriaLive: "polite", dsAriaAtomic: "true" })))));
|
|
132
183
|
}
|
|
133
184
|
static get is() { return "ds-checkbox-group"; }
|
|
134
185
|
static get encapsulation() { return "shadow"; }
|
|
186
|
+
static get formAssociated() { return true; }
|
|
135
187
|
static get originalStyleUrls() {
|
|
136
188
|
return {
|
|
137
189
|
"$": ["ds-checkbox-group.scss"]
|
|
@@ -144,8 +196,9 @@ export class DsCheckboxGroup {
|
|
|
144
196
|
}
|
|
145
197
|
static get properties() {
|
|
146
198
|
return {
|
|
147
|
-
"
|
|
199
|
+
"dsLegend": {
|
|
148
200
|
"type": "string",
|
|
201
|
+
"attribute": "ds-legend",
|
|
149
202
|
"mutable": false,
|
|
150
203
|
"complexType": {
|
|
151
204
|
"original": "string",
|
|
@@ -156,15 +209,15 @@ export class DsCheckboxGroup {
|
|
|
156
209
|
"optional": true,
|
|
157
210
|
"docs": {
|
|
158
211
|
"tags": [],
|
|
159
|
-
"text": ""
|
|
212
|
+
"text": "Label of the checkbox group"
|
|
160
213
|
},
|
|
161
214
|
"getter": false,
|
|
162
215
|
"setter": false,
|
|
163
|
-
"attribute": "legend",
|
|
164
216
|
"reflect": false
|
|
165
217
|
},
|
|
166
|
-
"
|
|
218
|
+
"dsAssistiveText": {
|
|
167
219
|
"type": "string",
|
|
220
|
+
"attribute": "ds-assistive-text",
|
|
168
221
|
"mutable": false,
|
|
169
222
|
"complexType": {
|
|
170
223
|
"original": "string",
|
|
@@ -175,15 +228,15 @@ export class DsCheckboxGroup {
|
|
|
175
228
|
"optional": true,
|
|
176
229
|
"docs": {
|
|
177
230
|
"tags": [],
|
|
178
|
-
"text": ""
|
|
231
|
+
"text": "Text for additional information shown below label"
|
|
179
232
|
},
|
|
180
233
|
"getter": false,
|
|
181
234
|
"setter": false,
|
|
182
|
-
"attribute": "assistive-text",
|
|
183
235
|
"reflect": false
|
|
184
236
|
},
|
|
185
|
-
"
|
|
237
|
+
"dsDirection": {
|
|
186
238
|
"type": "string",
|
|
239
|
+
"attribute": "ds-direction",
|
|
187
240
|
"mutable": false,
|
|
188
241
|
"complexType": {
|
|
189
242
|
"original": "'horizontal' | 'vertical'",
|
|
@@ -194,16 +247,16 @@ export class DsCheckboxGroup {
|
|
|
194
247
|
"optional": false,
|
|
195
248
|
"docs": {
|
|
196
249
|
"tags": [],
|
|
197
|
-
"text": ""
|
|
250
|
+
"text": "`vertical` displays checkboxes stacked\n`horizontal` displays checkboxes side by side"
|
|
198
251
|
},
|
|
199
252
|
"getter": false,
|
|
200
253
|
"setter": false,
|
|
201
|
-
"attribute": "direction",
|
|
202
254
|
"reflect": false,
|
|
203
255
|
"defaultValue": "'vertical'"
|
|
204
256
|
},
|
|
205
|
-
"
|
|
257
|
+
"dsErrorText": {
|
|
206
258
|
"type": "string",
|
|
259
|
+
"attribute": "ds-error-text",
|
|
207
260
|
"mutable": false,
|
|
208
261
|
"complexType": {
|
|
209
262
|
"original": "string",
|
|
@@ -214,16 +267,16 @@ export class DsCheckboxGroup {
|
|
|
214
267
|
"optional": false,
|
|
215
268
|
"docs": {
|
|
216
269
|
"tags": [],
|
|
217
|
-
"text": ""
|
|
270
|
+
"text": "Error message shown below the checkbox group.\nIf set, the checkbox group is shown in an invalid state."
|
|
218
271
|
},
|
|
219
272
|
"getter": false,
|
|
220
273
|
"setter": false,
|
|
221
|
-
"attribute": "error-text",
|
|
222
274
|
"reflect": false,
|
|
223
275
|
"defaultValue": "''"
|
|
224
276
|
},
|
|
225
|
-
"
|
|
277
|
+
"dsText": {
|
|
226
278
|
"type": "string",
|
|
279
|
+
"attribute": "ds-text",
|
|
227
280
|
"mutable": false,
|
|
228
281
|
"complexType": {
|
|
229
282
|
"original": "string",
|
|
@@ -234,16 +287,76 @@ export class DsCheckboxGroup {
|
|
|
234
287
|
"optional": false,
|
|
235
288
|
"docs": {
|
|
236
289
|
"tags": [],
|
|
237
|
-
"text": ""
|
|
290
|
+
"text": "If given, a parent checkbox with this text will be rendered above slotted checkboxes"
|
|
238
291
|
},
|
|
239
292
|
"getter": false,
|
|
240
293
|
"setter": false,
|
|
241
|
-
"attribute": "text",
|
|
242
294
|
"reflect": false,
|
|
243
295
|
"defaultValue": "''"
|
|
244
296
|
},
|
|
245
|
-
"
|
|
297
|
+
"dsChecked": {
|
|
298
|
+
"type": "boolean",
|
|
299
|
+
"attribute": "ds-checked",
|
|
300
|
+
"mutable": false,
|
|
301
|
+
"complexType": {
|
|
302
|
+
"original": "boolean",
|
|
303
|
+
"resolved": "boolean",
|
|
304
|
+
"references": {}
|
|
305
|
+
},
|
|
306
|
+
"required": false,
|
|
307
|
+
"optional": false,
|
|
308
|
+
"docs": {
|
|
309
|
+
"tags": [],
|
|
310
|
+
"text": "Passed to the `checked` attribute of the `input` of parent checkbox element."
|
|
311
|
+
},
|
|
312
|
+
"getter": false,
|
|
313
|
+
"setter": false,
|
|
314
|
+
"reflect": false,
|
|
315
|
+
"defaultValue": "false"
|
|
316
|
+
},
|
|
317
|
+
"dsDisabled": {
|
|
318
|
+
"type": "boolean",
|
|
319
|
+
"attribute": "ds-disabled",
|
|
320
|
+
"mutable": false,
|
|
321
|
+
"complexType": {
|
|
322
|
+
"original": "boolean",
|
|
323
|
+
"resolved": "boolean",
|
|
324
|
+
"references": {}
|
|
325
|
+
},
|
|
326
|
+
"required": false,
|
|
327
|
+
"optional": false,
|
|
328
|
+
"docs": {
|
|
329
|
+
"tags": [],
|
|
330
|
+
"text": "Disables all checkboxes in the checkbox group"
|
|
331
|
+
},
|
|
332
|
+
"getter": false,
|
|
333
|
+
"setter": false,
|
|
334
|
+
"reflect": false,
|
|
335
|
+
"defaultValue": "false"
|
|
336
|
+
},
|
|
337
|
+
"dsRequired": {
|
|
338
|
+
"type": "boolean",
|
|
339
|
+
"attribute": "ds-required",
|
|
340
|
+
"mutable": false,
|
|
341
|
+
"complexType": {
|
|
342
|
+
"original": "boolean",
|
|
343
|
+
"resolved": "boolean",
|
|
344
|
+
"references": {}
|
|
345
|
+
},
|
|
346
|
+
"required": false,
|
|
347
|
+
"optional": false,
|
|
348
|
+
"docs": {
|
|
349
|
+
"tags": [],
|
|
350
|
+
"text": "One or more checkboxes must be checked."
|
|
351
|
+
},
|
|
352
|
+
"getter": false,
|
|
353
|
+
"setter": false,
|
|
354
|
+
"reflect": false,
|
|
355
|
+
"defaultValue": "false"
|
|
356
|
+
},
|
|
357
|
+
"dsAllRequired": {
|
|
246
358
|
"type": "boolean",
|
|
359
|
+
"attribute": "ds-all-required",
|
|
247
360
|
"mutable": false,
|
|
248
361
|
"complexType": {
|
|
249
362
|
"original": "boolean",
|
|
@@ -254,16 +367,16 @@ export class DsCheckboxGroup {
|
|
|
254
367
|
"optional": false,
|
|
255
368
|
"docs": {
|
|
256
369
|
"tags": [],
|
|
257
|
-
"text": ""
|
|
370
|
+
"text": "All checkboxes must be checked."
|
|
258
371
|
},
|
|
259
372
|
"getter": false,
|
|
260
373
|
"setter": false,
|
|
261
|
-
"attribute": "checked",
|
|
262
374
|
"reflect": false,
|
|
263
375
|
"defaultValue": "false"
|
|
264
376
|
},
|
|
265
|
-
"
|
|
377
|
+
"dsOptional": {
|
|
266
378
|
"type": "boolean",
|
|
379
|
+
"attribute": "ds-optional",
|
|
267
380
|
"mutable": false,
|
|
268
381
|
"complexType": {
|
|
269
382
|
"original": "boolean",
|
|
@@ -274,13 +387,31 @@ export class DsCheckboxGroup {
|
|
|
274
387
|
"optional": false,
|
|
275
388
|
"docs": {
|
|
276
389
|
"tags": [],
|
|
277
|
-
"text": ""
|
|
390
|
+
"text": "None of the checkboxes need to be checked."
|
|
278
391
|
},
|
|
279
392
|
"getter": false,
|
|
280
393
|
"setter": false,
|
|
281
|
-
"attribute": "disabled",
|
|
282
394
|
"reflect": false,
|
|
283
395
|
"defaultValue": "false"
|
|
396
|
+
},
|
|
397
|
+
"dsOptionalText": {
|
|
398
|
+
"type": "string",
|
|
399
|
+
"attribute": "ds-optional-text",
|
|
400
|
+
"mutable": false,
|
|
401
|
+
"complexType": {
|
|
402
|
+
"original": "string",
|
|
403
|
+
"resolved": "string",
|
|
404
|
+
"references": {}
|
|
405
|
+
},
|
|
406
|
+
"required": false,
|
|
407
|
+
"optional": true,
|
|
408
|
+
"docs": {
|
|
409
|
+
"tags": [],
|
|
410
|
+
"text": "Text shown alongside label, if the checkbox button group is set as optional."
|
|
411
|
+
},
|
|
412
|
+
"getter": false,
|
|
413
|
+
"setter": false,
|
|
414
|
+
"reflect": false
|
|
284
415
|
}
|
|
285
416
|
};
|
|
286
417
|
}
|
|
@@ -289,7 +420,8 @@ export class DsCheckboxGroup {
|
|
|
289
420
|
"childElementsCount": {},
|
|
290
421
|
"checkedChildElementCount": {},
|
|
291
422
|
"isIndeterminate": {},
|
|
292
|
-
"indeterminateChildCheckboxCount": {}
|
|
423
|
+
"indeterminateChildCheckboxCount": {},
|
|
424
|
+
"showInternalsValidationMessage": {}
|
|
293
425
|
};
|
|
294
426
|
}
|
|
295
427
|
static get events() {
|
|
@@ -301,7 +433,7 @@ export class DsCheckboxGroup {
|
|
|
301
433
|
"composed": true,
|
|
302
434
|
"docs": {
|
|
303
435
|
"tags": [],
|
|
304
|
-
"text": ""
|
|
436
|
+
"text": "`dsCheckboxGroupChange` event is emitted when the `checked` state of\na checkbox rendered inside the group changes.\nThis is used internally to synchronize the state of checkbox groups."
|
|
305
437
|
},
|
|
306
438
|
"complexType": {
|
|
307
439
|
"original": "DsCheckboxGroupChangeEvent",
|
|
@@ -322,7 +454,7 @@ export class DsCheckboxGroup {
|
|
|
322
454
|
"composed": true,
|
|
323
455
|
"docs": {
|
|
324
456
|
"tags": [],
|
|
325
|
-
"text": ""
|
|
457
|
+
"text": "`dsCheckboxGroupIndeterminateChildChange` event is emitted when\nthe `indeterminate` state of a nested checkbox group is changed.\nThis is used internally to synchronize the state of checkbox groups."
|
|
326
458
|
},
|
|
327
459
|
"complexType": {
|
|
328
460
|
"original": "DsCheckboxGroupIndeterminateChildChangeEvent",
|
|
@@ -335,6 +467,21 @@ export class DsCheckboxGroup {
|
|
|
335
467
|
}
|
|
336
468
|
}
|
|
337
469
|
}
|
|
470
|
+
}, {
|
|
471
|
+
"method": "dsCheckboxGroupInvalidStateChange",
|
|
472
|
+
"name": "dsCheckboxGroupInvalidStateChange",
|
|
473
|
+
"bubbles": true,
|
|
474
|
+
"cancelable": true,
|
|
475
|
+
"composed": true,
|
|
476
|
+
"docs": {
|
|
477
|
+
"tags": [],
|
|
478
|
+
"text": "The `dsCheckboxGroupInvalidStateChange` event is emitted when the\n`dsErrorText` property changes. The event `detail` will be `false`\nif the `dsErrorText` is empty, otherwise `true`.\nThis event is mainly used internallty to synchronize the invalid\nstate of checkboxes."
|
|
479
|
+
},
|
|
480
|
+
"complexType": {
|
|
481
|
+
"original": "boolean",
|
|
482
|
+
"resolved": "boolean",
|
|
483
|
+
"references": {}
|
|
484
|
+
}
|
|
338
485
|
}];
|
|
339
486
|
}
|
|
340
487
|
static get methods() {
|
|
@@ -368,14 +515,17 @@ export class DsCheckboxGroup {
|
|
|
368
515
|
static get elementRef() { return "el"; }
|
|
369
516
|
static get watchers() {
|
|
370
517
|
return [{
|
|
371
|
-
"propName": "
|
|
518
|
+
"propName": "dsDisabled",
|
|
372
519
|
"methodName": "watchCheckboxDisabledChange"
|
|
373
520
|
}, {
|
|
374
|
-
"propName": "
|
|
521
|
+
"propName": "dsChecked",
|
|
375
522
|
"methodName": "watchCheckedChange"
|
|
376
523
|
}, {
|
|
377
524
|
"propName": "isIndeterminate",
|
|
378
525
|
"methodName": "watchIndeterminateChange"
|
|
526
|
+
}, {
|
|
527
|
+
"propName": "dsErrorText",
|
|
528
|
+
"methodName": "errorTextObserver"
|
|
379
529
|
}, {
|
|
380
530
|
"propName": "checkedChildElementCount",
|
|
381
531
|
"methodName": "watchCheckedChildElementCountChange"
|
|
@@ -389,7 +539,7 @@ export class DsCheckboxGroup {
|
|
|
389
539
|
"capture": false,
|
|
390
540
|
"passive": false
|
|
391
541
|
}, {
|
|
392
|
-
"name": "
|
|
542
|
+
"name": "input",
|
|
393
543
|
"method": "listenCheckboxChange",
|
|
394
544
|
"target": undefined,
|
|
395
545
|
"capture": false,
|
|
@@ -402,4 +552,5 @@ export class DsCheckboxGroup {
|
|
|
402
552
|
"passive": false
|
|
403
553
|
}];
|
|
404
554
|
}
|
|
555
|
+
static get attachInternalsMemberName() { return "internals"; }
|
|
405
556
|
}
|