@ds-autonomie/web-components 2.10.0 → 2.11.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/cdn/chunks/{chunk.IVJVQAQC.js → chunk.7AU43JKE.js} +4 -1
- package/cdn/chunks/{chunk.XCMDCOL6.js → chunk.A36W5FG6.js} +11 -8
- package/cdn/chunks/{chunk.3RUPWW4M.js → chunk.ALIVM5IK.js} +8 -0
- package/cdn/chunks/{chunk.32CDX2G7.js → chunk.AYVXBNFN.js} +1 -1
- package/cdn/chunks/{chunk.YTHNA2W4.js → chunk.BUKM2N6B.js} +11 -5
- package/cdn/chunks/{chunk.76P65WVM.js → chunk.CE4QX5GY.js} +5 -0
- package/cdn/chunks/{chunk.RVHELEGN.js → chunk.E7LCBTT5.js} +7 -5
- package/cdn/chunks/{chunk.25TCJH3S.js → chunk.FOB2ZQTP.js} +8 -3
- package/cdn/chunks/{chunk.JITNMLSZ.js → chunk.G6BQ2WKP.js} +11 -5
- package/cdn/chunks/{chunk.CA44N3RR.js → chunk.IIVSSOAU.js} +1 -1
- package/cdn/chunks/{chunk.JLURATAB.js → chunk.JFUUWE3Y.js} +5 -2
- package/cdn/chunks/{chunk.UXHX6KTB.js → chunk.JSZ62MET.js} +7 -7
- package/cdn/chunks/{chunk.RIGMCOQV.js → chunk.KNXOB4UE.js} +9 -5
- package/cdn/chunks/{chunk.ANBARN33.js → chunk.LAHTYN7O.js} +8 -2
- package/cdn/chunks/{chunk.HFZHMBO3.js → chunk.MYUDDEC5.js} +8 -3
- package/cdn/chunks/{chunk.22WBEYR5.js → chunk.N5YAEQVH.js} +4 -0
- package/cdn/chunks/{chunk.2L6I3VNO.js → chunk.OJYQEB5J.js} +71 -55
- package/cdn/chunks/{chunk.6BGRXQIW.js → chunk.QNIK7LHK.js} +5 -5
- package/cdn/chunks/{chunk.6KBDSFHY.js → chunk.REWGAX6A.js} +2 -1
- package/cdn/chunks/{chunk.BBXLEST4.js → chunk.RFDWBIL7.js} +5 -0
- package/cdn/chunks/{chunk.ORJKIZAO.js → chunk.SPF4JEAI.js} +8 -7
- package/cdn/chunks/{chunk.4O7VDH44.js → chunk.T7LIPTCL.js} +1 -1
- package/cdn/chunks/{chunk.S7UT2YD7.js → chunk.TAYXGYQL.js} +0 -1
- package/cdn/chunks/{chunk.INYJLKLJ.js → chunk.XCDQSN4K.js} +1 -1
- package/cdn/chunks/{chunk.HH3FXCDW.js → chunk.XFBBCWDH.js} +0 -1
- package/cdn/chunks/{chunk.H6FFNEL2.js → chunk.XHR7MVV6.js} +1 -1
- package/cdn/chunks/{chunk.OFG3L77A.js → chunk.XO5NWJKS.js} +4 -1
- package/cdn/chunks/{chunk.DPVUVRFZ.js → chunk.YVXTJRSI.js} +9 -1
- package/cdn/components/accordion-group/accordion-group.js +1 -1
- package/cdn/components/alert/alert.d.ts +1 -1
- package/cdn/components/alert/alert.js +1 -1
- package/cdn/components/button/button.js +1 -1
- package/cdn/components/checkbox/checkbox.js +1 -1
- package/cdn/components/combobox/combobox.js +2 -2
- package/cdn/components/copy-button/copy-button.d.ts +1 -2
- package/cdn/components/copy-button/copy-button.js +3 -2
- package/cdn/components/error-text/error-text-stories.d.ts +2 -0
- package/cdn/components/error-text/error-text-stories.js +4 -2
- package/cdn/components/filter-counter/filter-counter.js +7 -7
- package/cdn/components/filter-range/filter-range.js +7 -7
- package/cdn/components/filter-select/filter-select.js +8 -8
- package/cdn/components/header-search/header-search.js +1 -1
- package/cdn/components/input/input.js +6 -6
- package/cdn/components/input-amount/input-amount.js +3 -3
- package/cdn/components/input-date/input-date.js +3 -3
- package/cdn/components/input-mask/input-mask.js +3 -3
- package/cdn/components/input-native/input-native.d.ts +1 -0
- package/cdn/components/input-native/input-native.js +3 -3
- package/cdn/components/input-otp/input-otp.js +3 -3
- package/cdn/components/input-phone/input-phone.d.ts +10 -9
- package/cdn/components/input-phone/input-phone.js +4 -4
- package/cdn/components/input-time/input-time.js +3 -3
- package/cdn/components/menu-accordion/menu-accordion.js +3 -3
- package/cdn/components/menu-accordion/menu-accordion.styles.js +1 -1
- package/cdn/components/menu-item/menu-item.d.ts +1 -0
- package/cdn/components/menu-item/menu-item.js +3 -2
- package/cdn/components/menu-navigation/menu-navigation.d.ts +1 -1
- package/cdn/components/menu-navigation/menu-navigation.js +19 -1
- package/cdn/components/navbar-link/navbar-link.js +15 -1
- package/cdn/components/navbar-menu/navbar-menu.js +8 -1
- package/cdn/components/pagination/pagination.js +6 -6
- package/cdn/components/profile-button/profile-button.js +2 -1
- package/cdn/components/select/select.js +2 -2
- package/cdn/components/sidenav/sidenav.js +4 -3
- package/cdn/components/sidenav/sidenav.styles.js +1 -1
- package/cdn/components/sidenav-info-accordion/sidenav-info-accordion.js +3 -3
- package/cdn/components/step/step.js +2 -2
- package/cdn/components/step/step.styles.js +1 -1
- package/cdn/components/success-text/success-text-stories.d.ts +2 -0
- package/cdn/components/success-text/success-text-stories.js +4 -2
- package/cdn/components/tab-group/tab-group.js +1 -1
- package/cdn/components/table-header-row/table-header-row.js +1 -1
- package/cdn/components/table-row/table-row.js +1 -1
- package/cdn/components/textarea/textarea.js +2 -2
- package/cdn/components/tooltip/tooltip.js +2 -1
- package/cdn/components/tree/tree.js +1 -1
- package/cdn/components/tree-item/tree-item.js +1 -1
- package/cdn/custom-elements.json +77 -52
- package/cdn/design-system.js +31 -31
- package/cdn/internal/components/form-control/form-control-layout-stories.js +31 -7
- package/cdn/internal/components/form-control/form-control-layout.d.ts +3 -1
- package/cdn/internal/components/form-control/form-control-layout.js +8 -2
- package/cdn/internal/components/input-base/input-base-stories.js +14 -0
- package/cdn/templates/utilities/decorator.d.ts +6 -0
- package/{dist/templates → cdn/templates/utilities}/decorator.js +4 -4
- package/cdn/templates/utilities/header.d.ts +8 -0
- package/cdn/templates/utilities/header.js +114 -0
- package/cdn/templates/utilities/template-story-config.d.ts +16 -0
- package/cdn/templates/utilities/template-story-config.js +20 -0
- package/cdn/utilities/storybook.js +2 -1
- package/cdn/vscode.html-custom-data.json +4 -8
- package/cdn/web-types.json +49 -27
- package/dist/chunks/{chunk.YHQQWRGP.js → chunk.3FXWMOTD.js} +11 -5
- package/dist/chunks/{chunk.2M6NG4O7.js → chunk.5SU4CCQO.js} +1 -1
- package/dist/chunks/{chunk.Q35Y6PN4.js → chunk.6RDA3XLH.js} +0 -1
- package/dist/chunks/{chunk.75ZNSBG6.js → chunk.7OU2KJ5C.js} +4 -1
- package/dist/chunks/{chunk.TREOZZ7D.js → chunk.C2GI7AW5.js} +2 -1
- package/dist/chunks/{chunk.LNGE6VFS.js → chunk.DTRA3OZD.js} +5 -2
- package/dist/chunks/{chunk.PT44AIJN.js → chunk.EOBDJFKX.js} +1 -1
- package/dist/chunks/{chunk.SAKC6HWD.js → chunk.FGPLOCXU.js} +7 -7
- package/dist/chunks/{chunk.XRLHF7QC.js → chunk.FJUIXT7L.js} +9 -5
- package/dist/chunks/{chunk.JM6QCEPE.js → chunk.HYY7Y4SP.js} +8 -2
- package/dist/chunks/{chunk.NSAJTBR4.js → chunk.KYZD4HDJ.js} +8 -0
- package/dist/chunks/{chunk.QUYAJTQA.js → chunk.MJDFYFBT.js} +1 -1
- package/dist/chunks/{chunk.M2FVFT7D.js → chunk.MONMQF4P.js} +7 -5
- package/dist/chunks/{chunk.27MAGZH3.js → chunk.N6N5PXAU.js} +8 -3
- package/dist/chunks/{chunk.VIAKDLXU.js → chunk.NBBSSAAF.js} +5 -0
- package/dist/chunks/{chunk.JIE46CQ6.js → chunk.OBIOX2QK.js} +11 -8
- package/dist/chunks/{chunk.HWRZLJQQ.js → chunk.OGLESSI3.js} +4 -0
- package/dist/chunks/{chunk.5ZO4QRKN.js → chunk.OMIL5X3X.js} +1 -1
- package/dist/chunks/{chunk.CIPCYGAB.js → chunk.OUL3HENR.js} +1 -1
- package/dist/chunks/{chunk.PIRJ2ABB.js → chunk.QDXFBING.js} +0 -1
- package/dist/chunks/{chunk.A43SBIER.js → chunk.QQOPMOYX.js} +5 -5
- package/dist/chunks/{chunk.MFAEBC56.js → chunk.SHMCRSQN.js} +8 -3
- package/dist/chunks/{chunk.WTV5HKD2.js → chunk.SQJRLNS2.js} +71 -55
- package/dist/chunks/{chunk.G3ITJBUT.js → chunk.TEHV57S2.js} +5 -0
- package/dist/chunks/{chunk.XUEOWZLQ.js → chunk.UAENT3Y6.js} +9 -1
- package/dist/chunks/{chunk.ONHIOF25.js → chunk.UXNALBWT.js} +11 -5
- package/dist/chunks/{chunk.R4SXN6JP.js → chunk.VQ2ZMSUF.js} +8 -7
- package/dist/chunks/{chunk.CTNXZIBB.js → chunk.YVUJ2MK6.js} +4 -1
- package/dist/components/accordion-group/accordion-group.js +1 -1
- package/dist/components/alert/alert.d.ts +1 -1
- package/dist/components/alert/alert.js +1 -1
- package/dist/components/button/button.js +1 -1
- package/dist/components/checkbox/checkbox.js +1 -1
- package/dist/components/combobox/combobox.js +2 -2
- package/dist/components/copy-button/copy-button.d.ts +1 -2
- package/dist/components/copy-button/copy-button.js +3 -2
- package/dist/components/error-text/error-text-stories.d.ts +2 -0
- package/dist/components/error-text/error-text-stories.js +4 -2
- package/dist/components/filter-counter/filter-counter.js +7 -7
- package/dist/components/filter-range/filter-range.js +7 -7
- package/dist/components/filter-select/filter-select.js +8 -8
- package/dist/components/header-search/header-search.js +1 -1
- package/dist/components/input/input.js +6 -6
- package/dist/components/input-amount/input-amount.js +3 -3
- package/dist/components/input-date/input-date.js +3 -3
- package/dist/components/input-mask/input-mask.js +3 -3
- package/dist/components/input-native/input-native.d.ts +1 -0
- package/dist/components/input-native/input-native.js +3 -3
- package/dist/components/input-otp/input-otp.js +3 -3
- package/dist/components/input-phone/input-phone.d.ts +10 -9
- package/dist/components/input-phone/input-phone.js +4 -4
- package/dist/components/input-time/input-time.js +3 -3
- package/dist/components/menu-accordion/menu-accordion.js +3 -3
- package/dist/components/menu-accordion/menu-accordion.styles.js +1 -1
- package/dist/components/menu-item/menu-item.d.ts +1 -0
- package/dist/components/menu-item/menu-item.js +3 -2
- package/dist/components/menu-navigation/menu-navigation.d.ts +1 -1
- package/dist/components/menu-navigation/menu-navigation.js +15 -1
- package/dist/components/navbar-link/navbar-link.js +13 -1
- package/dist/components/navbar-menu/navbar-menu.js +6 -1
- package/dist/components/pagination/pagination.js +6 -6
- package/dist/components/profile-button/profile-button.js +2 -1
- package/dist/components/select/select.js +2 -2
- package/dist/components/sidenav/sidenav.js +4 -3
- package/dist/components/sidenav/sidenav.styles.js +1 -1
- package/dist/components/sidenav-info-accordion/sidenav-info-accordion.js +3 -3
- package/dist/components/step/step.js +2 -2
- package/dist/components/step/step.styles.js +1 -1
- package/dist/components/success-text/success-text-stories.d.ts +2 -0
- package/dist/components/success-text/success-text-stories.js +4 -2
- package/dist/components/tab-group/tab-group.js +1 -1
- package/dist/components/table-header-row/table-header-row.js +1 -1
- package/dist/components/table-row/table-row.js +1 -1
- package/dist/components/textarea/textarea.js +2 -2
- package/dist/components/tooltip/tooltip.js +2 -1
- package/dist/components/tree/tree.js +1 -1
- package/dist/components/tree-item/tree-item.js +1 -1
- package/dist/custom-elements.json +77 -52
- package/dist/design-system.js +31 -31
- package/dist/internal/components/form-control/form-control-layout-stories.js +31 -7
- package/dist/internal/components/form-control/form-control-layout.d.ts +3 -1
- package/dist/internal/components/form-control/form-control-layout.js +8 -2
- package/dist/internal/components/input-base/input-base-stories.js +14 -0
- package/dist/templates/utilities/decorator.d.ts +6 -0
- package/{cdn/templates → dist/templates/utilities}/decorator.js +4 -4
- package/dist/templates/utilities/header.d.ts +8 -0
- package/dist/templates/utilities/header.js +114 -0
- package/dist/templates/utilities/template-story-config.d.ts +16 -0
- package/dist/templates/utilities/template-story-config.js +20 -0
- package/dist/utilities/storybook.js +2 -1
- package/dist/vscode.html-custom-data.json +4 -8
- package/dist/web-types.json +49 -27
- package/package.json +1 -1
- package/cdn/templates/decorator.d.ts +0 -6
- package/dist/templates/decorator.d.ts +0 -6
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { errorArgTypes, errorMessageArgTypes, } from '../../../components/error-text/error-text-stories';
|
|
2
2
|
export const formControlLayoutArgTypes = {
|
|
3
|
-
|
|
4
|
-
name: '
|
|
5
|
-
|
|
3
|
+
'accessible-name': {
|
|
4
|
+
name: 'accessible-name',
|
|
5
|
+
type: { name: 'string', required: false },
|
|
6
|
+
description: 'Provides an accessible label for the element',
|
|
6
7
|
table: {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
summary: 'string',
|
|
10
|
-
},
|
|
8
|
+
type: { summary: 'string' },
|
|
9
|
+
category: 'Form controls common',
|
|
11
10
|
},
|
|
12
11
|
control: { type: 'text' },
|
|
13
12
|
},
|
|
@@ -19,6 +18,7 @@ export const formControlLayoutArgTypes = {
|
|
|
19
18
|
type: {
|
|
20
19
|
summary: 'string',
|
|
21
20
|
},
|
|
21
|
+
category: 'Form controls common',
|
|
22
22
|
},
|
|
23
23
|
control: { type: 'text' },
|
|
24
24
|
},
|
|
@@ -30,6 +30,7 @@ export const formControlLayoutArgTypes = {
|
|
|
30
30
|
type: {
|
|
31
31
|
summary: "'small' | 'medium' | 'large'",
|
|
32
32
|
},
|
|
33
|
+
category: 'Form controls common',
|
|
33
34
|
},
|
|
34
35
|
control: { type: 'select' },
|
|
35
36
|
options: ['small', 'medium', 'large'],
|
|
@@ -42,6 +43,7 @@ export const formControlLayoutArgTypes = {
|
|
|
42
43
|
type: {
|
|
43
44
|
summary: "'base' | 'layer' ",
|
|
44
45
|
},
|
|
46
|
+
category: 'Form controls common',
|
|
45
47
|
},
|
|
46
48
|
control: { type: 'select' },
|
|
47
49
|
options: ['base', 'layer'],
|
|
@@ -54,6 +56,7 @@ export const formControlLayoutArgTypes = {
|
|
|
54
56
|
type: {
|
|
55
57
|
summary: 'string',
|
|
56
58
|
},
|
|
59
|
+
category: 'Form controls common',
|
|
57
60
|
},
|
|
58
61
|
control: { type: 'text' },
|
|
59
62
|
},
|
|
@@ -65,6 +68,7 @@ export const formControlLayoutArgTypes = {
|
|
|
65
68
|
type: {
|
|
66
69
|
summary: 'string',
|
|
67
70
|
},
|
|
71
|
+
category: 'Form controls common',
|
|
68
72
|
},
|
|
69
73
|
control: { type: 'text' },
|
|
70
74
|
},
|
|
@@ -76,6 +80,7 @@ export const formControlLayoutArgTypes = {
|
|
|
76
80
|
type: {
|
|
77
81
|
summary: 'boolean',
|
|
78
82
|
},
|
|
83
|
+
category: 'Form controls common',
|
|
79
84
|
},
|
|
80
85
|
control: { type: 'boolean' },
|
|
81
86
|
},
|
|
@@ -87,6 +92,7 @@ export const formControlLayoutArgTypes = {
|
|
|
87
92
|
type: {
|
|
88
93
|
summary: 'string',
|
|
89
94
|
},
|
|
95
|
+
category: 'Form controls common',
|
|
90
96
|
},
|
|
91
97
|
control: { type: 'text' },
|
|
92
98
|
},
|
|
@@ -98,6 +104,7 @@ export const formControlLayoutArgTypes = {
|
|
|
98
104
|
type: {
|
|
99
105
|
summary: 'boolean',
|
|
100
106
|
},
|
|
107
|
+
category: 'Form controls common',
|
|
101
108
|
},
|
|
102
109
|
control: { type: 'boolean' },
|
|
103
110
|
},
|
|
@@ -111,6 +118,7 @@ export const formControlLayoutArgTypes = {
|
|
|
111
118
|
type: {
|
|
112
119
|
summary: 'string',
|
|
113
120
|
},
|
|
121
|
+
category: 'Form controls common',
|
|
114
122
|
},
|
|
115
123
|
control: { type: 'text' },
|
|
116
124
|
},
|
|
@@ -122,6 +130,7 @@ export const formControlLayoutArgTypes = {
|
|
|
122
130
|
type: {
|
|
123
131
|
summary: 'boolean',
|
|
124
132
|
},
|
|
133
|
+
category: 'Form controls common',
|
|
125
134
|
},
|
|
126
135
|
control: { type: 'boolean' },
|
|
127
136
|
},
|
|
@@ -130,7 +139,22 @@ export const formControlLayoutArgTypes = {
|
|
|
130
139
|
description: 'Provides an accessible description for the element.',
|
|
131
140
|
table: {
|
|
132
141
|
type: { summary: 'string' },
|
|
142
|
+
category: 'Form controls common',
|
|
133
143
|
},
|
|
134
144
|
control: { type: 'text' },
|
|
135
145
|
},
|
|
146
|
+
validity: {
|
|
147
|
+
name: 'validity',
|
|
148
|
+
description: 'Gets the validity state object',
|
|
149
|
+
table: {
|
|
150
|
+
category: 'Form controls common',
|
|
151
|
+
},
|
|
152
|
+
},
|
|
153
|
+
validationMessage: {
|
|
154
|
+
name: 'validationMessage',
|
|
155
|
+
description: 'Gets the validation message',
|
|
156
|
+
table: {
|
|
157
|
+
category: 'Form controls common',
|
|
158
|
+
},
|
|
159
|
+
},
|
|
136
160
|
};
|
|
@@ -3,8 +3,10 @@ import { ShoelaceElement } from '../../shoelace-element';
|
|
|
3
3
|
import { HasSlotController } from '../../slot';
|
|
4
4
|
export declare class FormControlLayout extends ShoelaceElement {
|
|
5
5
|
protected readonly hasSlotController: HasSlotController;
|
|
6
|
-
/** The title contains a text representing advisory information related to the element it belongs to. */
|
|
6
|
+
/** (deprecated) The title contains a text representing advisory information related to the element it belongs to. */
|
|
7
7
|
title: string;
|
|
8
|
+
/** Provides an accessible label for the input element */
|
|
9
|
+
accessibleName: string;
|
|
8
10
|
/** The name of the form control, submitted as a name/value pair with form data. */
|
|
9
11
|
name: string;
|
|
10
12
|
/** The form control's size. */
|
|
@@ -17,7 +17,7 @@ export class FormControlLayout extends ShoelaceElement {
|
|
|
17
17
|
constructor() {
|
|
18
18
|
super(...arguments);
|
|
19
19
|
this.hasSlotController = new HasSlotController(this, 'help-text', 'label', 'prefix', 'suffix', 'tooltip');
|
|
20
|
-
/** The title contains a text representing advisory information related to the element it belongs to. */
|
|
20
|
+
/** (deprecated) The title contains a text representing advisory information related to the element it belongs to. */
|
|
21
21
|
this.title = '';
|
|
22
22
|
/** The name of the form control, submitted as a name/value pair with form data. */
|
|
23
23
|
this.name = '';
|
|
@@ -73,7 +73,10 @@ export class FormControlLayout extends ShoelaceElement {
|
|
|
73
73
|
const hasHelpTextSlot = this.hasSlotController.test('help-text');
|
|
74
74
|
const hasLabel = this.label ? true : !!hasLabelSlot;
|
|
75
75
|
const hasHelpText = this.helpText ? true : !!hasHelpTextSlot;
|
|
76
|
-
if (
|
|
76
|
+
if (this.title) {
|
|
77
|
+
console.warn('The `title` attribute is deprecated since it can cause redundant enunciation by screen readers, and will be removed in the next major release. Please use the accessible-name attribute instead.');
|
|
78
|
+
}
|
|
79
|
+
if (!hasLabel && !this.accessibleName && !this.title) {
|
|
77
80
|
a11yWarning('Form controls require a label attribute or a label slot for accessibility');
|
|
78
81
|
}
|
|
79
82
|
if (this.error && !this.errorMessage) {
|
|
@@ -145,6 +148,9 @@ export class FormControlLayout extends ShoelaceElement {
|
|
|
145
148
|
__decorate([
|
|
146
149
|
property()
|
|
147
150
|
], FormControlLayout.prototype, "title", void 0);
|
|
151
|
+
__decorate([
|
|
152
|
+
property({ attribute: 'accessible-name', reflect: true })
|
|
153
|
+
], FormControlLayout.prototype, "accessibleName", void 0);
|
|
148
154
|
__decorate([
|
|
149
155
|
property()
|
|
150
156
|
], FormControlLayout.prototype, "name", void 0);
|
|
@@ -8,6 +8,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
8
8
|
type: {
|
|
9
9
|
summary: 'string',
|
|
10
10
|
},
|
|
11
|
+
category: 'Inputs common',
|
|
11
12
|
},
|
|
12
13
|
control: { type: 'text' },
|
|
13
14
|
}, pattern: {
|
|
@@ -18,6 +19,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
18
19
|
type: {
|
|
19
20
|
summary: 'string',
|
|
20
21
|
},
|
|
22
|
+
category: 'Inputs common',
|
|
21
23
|
},
|
|
22
24
|
control: { type: 'text' },
|
|
23
25
|
}, minlength: {
|
|
@@ -27,6 +29,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
27
29
|
type: {
|
|
28
30
|
summary: 'number',
|
|
29
31
|
},
|
|
32
|
+
category: 'Inputs common',
|
|
30
33
|
},
|
|
31
34
|
control: { type: 'number' },
|
|
32
35
|
}, maxlength: {
|
|
@@ -36,6 +39,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
36
39
|
type: {
|
|
37
40
|
summary: 'number',
|
|
38
41
|
},
|
|
42
|
+
category: 'Inputs common',
|
|
39
43
|
},
|
|
40
44
|
control: { type: 'number' },
|
|
41
45
|
}, '?counter': {
|
|
@@ -45,6 +49,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
45
49
|
type: {
|
|
46
50
|
summary: 'boolean',
|
|
47
51
|
},
|
|
52
|
+
category: 'Inputs common',
|
|
48
53
|
},
|
|
49
54
|
control: { type: 'boolean' },
|
|
50
55
|
}, min: {
|
|
@@ -54,6 +59,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
54
59
|
type: {
|
|
55
60
|
summary: 'number | string',
|
|
56
61
|
},
|
|
62
|
+
category: 'Inputs common',
|
|
57
63
|
},
|
|
58
64
|
control: { type: 'number' },
|
|
59
65
|
}, max: {
|
|
@@ -63,6 +69,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
63
69
|
type: {
|
|
64
70
|
summary: 'number | string',
|
|
65
71
|
},
|
|
72
|
+
category: 'Inputs common',
|
|
66
73
|
},
|
|
67
74
|
control: { type: 'number' },
|
|
68
75
|
}, step: {
|
|
@@ -70,6 +77,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
70
77
|
description: 'Specifies the granularity that the value must adhere to, or the special value any which means no stepping is implied, allowing any numeric value. Only applies to date and number input types',
|
|
71
78
|
table: {
|
|
72
79
|
type: { summary: "'number | 'any'" },
|
|
80
|
+
category: 'Inputs common',
|
|
73
81
|
},
|
|
74
82
|
control: { type: 'number' },
|
|
75
83
|
}, autocorrect: {
|
|
@@ -77,12 +85,14 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
77
85
|
description: "Indicates whether the browser's autocorrect feature is on or off",
|
|
78
86
|
table: {
|
|
79
87
|
type: { summary: "'off' | 'on'" },
|
|
88
|
+
category: 'Inputs common',
|
|
80
89
|
},
|
|
81
90
|
}, autocomplete: {
|
|
82
91
|
name: 'autocomplete',
|
|
83
92
|
description: 'Specifies what permission the browser has to provide assistance in filling out form field values. Refer to this page on MDN for available values',
|
|
84
93
|
table: {
|
|
85
94
|
type: { summary: 'string' },
|
|
95
|
+
category: 'Inputs common',
|
|
86
96
|
},
|
|
87
97
|
control: { type: 'text' },
|
|
88
98
|
}, autofocus: {
|
|
@@ -90,6 +100,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
90
100
|
description: 'Indicates that the input should receive focus on page load',
|
|
91
101
|
table: {
|
|
92
102
|
type: { summary: 'boolean' },
|
|
103
|
+
category: 'Inputs common',
|
|
93
104
|
},
|
|
94
105
|
}, enterkeyhint: {
|
|
95
106
|
name: 'enterkeyhint',
|
|
@@ -98,6 +109,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
98
109
|
type: {
|
|
99
110
|
summary: "'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send'",
|
|
100
111
|
},
|
|
112
|
+
category: 'Inputs common',
|
|
101
113
|
},
|
|
102
114
|
}, spellcheck: {
|
|
103
115
|
name: 'spellcheck',
|
|
@@ -107,6 +119,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
107
119
|
summary: 'boolean',
|
|
108
120
|
},
|
|
109
121
|
defaultValue: { summary: 'true' },
|
|
122
|
+
category: 'Inputs common',
|
|
110
123
|
},
|
|
111
124
|
}, inputmode: {
|
|
112
125
|
name: 'inputmode',
|
|
@@ -115,6 +128,7 @@ export const inputBaseGlobalArgTypes = Object.assign(Object.assign({}, formContr
|
|
|
115
128
|
type: {
|
|
116
129
|
summary: "'none' | 'text' | 'decimal' | 'numeric' | 'tel' | 'search' | 'email' | 'url'",
|
|
117
130
|
},
|
|
131
|
+
category: 'Inputs common',
|
|
118
132
|
},
|
|
119
133
|
},
|
|
120
134
|
//Form methods & getters/setters
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import '../../components/footer-sitemap-item/footer-sitemap-item';
|
|
2
|
+
import '../../components/footer-sitemap/footer-sitemap';
|
|
3
|
+
import '../../components/footer/footer';
|
|
4
|
+
import '../../components/header/header';
|
|
5
|
+
import { Decorator } from '@storybook/web-components-vite';
|
|
6
|
+
export declare const withPageTemplate: Decorator;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { html } from 'lit';
|
|
2
|
-
import '
|
|
3
|
-
import '
|
|
4
|
-
import '
|
|
5
|
-
import '
|
|
2
|
+
import '../../components/footer-sitemap-item/footer-sitemap-item';
|
|
3
|
+
import '../../components/footer-sitemap/footer-sitemap';
|
|
4
|
+
import '../../components/footer/footer';
|
|
5
|
+
import '../../components/header/header';
|
|
6
6
|
export const withPageTemplate = (story) => html `
|
|
7
7
|
<style>
|
|
8
8
|
/** CSS Reset */
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import '../../components/breadcrumb-item/breadcrumb-item';
|
|
2
|
+
import '../../components/breadcrumb/breadcrumb';
|
|
3
|
+
import '../../components/button/button';
|
|
4
|
+
import '../../components/dropdown/dropdown';
|
|
5
|
+
import '../../components/icon/icon';
|
|
6
|
+
import '../../components/menu-item/menu-item';
|
|
7
|
+
import '../../components/menu-navigation/menu-navigation';
|
|
8
|
+
export declare const templatePageHeader: (title: string, withActions?: boolean) => import("lit").TemplateResult<1>;
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { html } from 'lit';
|
|
2
|
+
import '../../components/breadcrumb-item/breadcrumb-item';
|
|
3
|
+
import '../../components/breadcrumb/breadcrumb';
|
|
4
|
+
import '../../components/button/button';
|
|
5
|
+
import '../../components/dropdown/dropdown';
|
|
6
|
+
import '../../components/icon/icon';
|
|
7
|
+
import '../../components/menu-item/menu-item';
|
|
8
|
+
import '../../components/menu-navigation/menu-navigation';
|
|
9
|
+
export const templatePageHeader = (title, withActions = false) => {
|
|
10
|
+
return html `
|
|
11
|
+
<style>
|
|
12
|
+
/** Header */
|
|
13
|
+
.page-header {
|
|
14
|
+
display: contents;
|
|
15
|
+
}
|
|
16
|
+
.title-and-actions {
|
|
17
|
+
display: flex;
|
|
18
|
+
flex-direction: column;
|
|
19
|
+
gap: var(--dsa-spacing-24);
|
|
20
|
+
}
|
|
21
|
+
.title-1 {
|
|
22
|
+
font: var(--dsa-font-x-large-bold);
|
|
23
|
+
}
|
|
24
|
+
.action-bar {
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-wrap: wrap;
|
|
27
|
+
gap: 1rem;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Media queries */
|
|
31
|
+
@media screen and (min-width: 600px) {
|
|
32
|
+
.title-and-actions {
|
|
33
|
+
gap: var(--dsa-spacing-32);
|
|
34
|
+
}
|
|
35
|
+
.title-1 {
|
|
36
|
+
font: var(--dsa-font-2x-large-bold);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
</style>
|
|
40
|
+
<header class="page-header">
|
|
41
|
+
<dsa-breadcrumb>
|
|
42
|
+
<dsa-breadcrumb-item href="#">
|
|
43
|
+
<dsa-icon slot="prefix" name="home"></dsa-icon>
|
|
44
|
+
Accueil
|
|
45
|
+
</dsa-breadcrumb-item>
|
|
46
|
+
<dsa-breadcrumb-item href="#">${title}</dsa-breadcrumb-item>
|
|
47
|
+
</dsa-breadcrumb>
|
|
48
|
+
<div class="title-and-actions">
|
|
49
|
+
<h1 class="title-1">${title}</h1>
|
|
50
|
+
${withActions
|
|
51
|
+
? html `
|
|
52
|
+
<div class="action-bar">
|
|
53
|
+
<dsa-button variant="secondary" id="printButton"
|
|
54
|
+
><dsa-icon name="print" slot="prefix"></dsa-icon
|
|
55
|
+
>Imprimer</dsa-button
|
|
56
|
+
>
|
|
57
|
+
<dsa-button variant="secondary" href="mailto:test@test.com"
|
|
58
|
+
><dsa-icon name="email" slot="prefix"></dsa-icon
|
|
59
|
+
>Envoyer</dsa-button
|
|
60
|
+
>
|
|
61
|
+
<dsa-dropdown>
|
|
62
|
+
<dsa-button slot="trigger" variant="secondary" caret
|
|
63
|
+
><dsa-icon name="send" slot="prefix"></dsa-icon
|
|
64
|
+
>Partager</dsa-button
|
|
65
|
+
>
|
|
66
|
+
<dsa-menu-navigation>
|
|
67
|
+
<dsa-menu-item
|
|
68
|
+
type="link"
|
|
69
|
+
target="_blank"
|
|
70
|
+
href="https://twitter.com/intent/tweet?url=https://dsa.service-public-autonomie.fr/latest/demarrer/design-system-de-l-autonomie/presentation-A6ygvnwd&text=Documentation%20du%20Design%20System%20de%20l'autonomie"
|
|
71
|
+
>
|
|
72
|
+
<svg
|
|
73
|
+
slot="prefix"
|
|
74
|
+
viewBox="0 0 128 128"
|
|
75
|
+
aria-hidden="true"
|
|
76
|
+
>
|
|
77
|
+
<path
|
|
78
|
+
d="M75.916 54.2 122.542 0h-11.05L71.008 47.06 38.672 0H1.376l48.898 71.164L1.376 128h11.05L55.18 78.303 89.328 128h37.296L75.913 54.2ZM60.782 71.79l-4.955-7.086-39.42-56.386h16.972L65.19 53.824l4.954 7.086 41.353 59.15h-16.97L60.782 71.793Z"
|
|
79
|
+
fill="#000"
|
|
80
|
+
style="stroke-width:.104373"
|
|
81
|
+
></path>
|
|
82
|
+
</svg>
|
|
83
|
+
X / Twitter</dsa-menu-item
|
|
84
|
+
>
|
|
85
|
+
<dsa-menu-item
|
|
86
|
+
type="link"
|
|
87
|
+
target="_blank"
|
|
88
|
+
href="https://www.linkedin.com/sharing/share-offsite/?url=https://dsa.service-public-autonomie.fr/latest/demarrer/design-system-de-l-autonomie/presentation-A6ygvnwd"
|
|
89
|
+
>
|
|
90
|
+
<svg
|
|
91
|
+
slot="prefix"
|
|
92
|
+
viewBox="0 0 128 128"
|
|
93
|
+
aria-hidden="true"
|
|
94
|
+
>
|
|
95
|
+
<path
|
|
96
|
+
fill="#0076b2"
|
|
97
|
+
d="M116 3H12a8.91 8.91 0 00-9 8.8v104.42a8.91 8.91 0 009 8.78h104a8.93 8.93 0 009-8.81V11.77A8.93 8.93 0 00116 3z"
|
|
98
|
+
></path>
|
|
99
|
+
<path
|
|
100
|
+
fill="#fff"
|
|
101
|
+
d="M21.06 48.73h18.11V107H21.06zm9.06-29a10.5 10.5 0 11-10.5 10.49 10.5 10.5 0 0110.5-10.49M50.53 48.73h17.36v8h.24c2.42-4.58 8.32-9.41 17.13-9.41C103.6 47.28 107 59.35 107 75v32H88.89V78.65c0-6.75-.12-15.44-9.41-15.44s-10.87 7.36-10.87 15V107H50.53z"
|
|
102
|
+
></path>
|
|
103
|
+
</svg>
|
|
104
|
+
Linkedin</dsa-menu-item
|
|
105
|
+
>
|
|
106
|
+
</dsa-menu-navigation>
|
|
107
|
+
</dsa-dropdown>
|
|
108
|
+
</div>
|
|
109
|
+
`
|
|
110
|
+
: ''}
|
|
111
|
+
</div>
|
|
112
|
+
</header>
|
|
113
|
+
`;
|
|
114
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ArgTypes } from '@storybook/web-components-vite';
|
|
2
|
+
export declare const templateStoryConfig: {
|
|
3
|
+
parameters: {
|
|
4
|
+
layout: string;
|
|
5
|
+
};
|
|
6
|
+
globals: {
|
|
7
|
+
viewport: {
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
};
|
|
11
|
+
decorators: import("@storybook/web-components-vite").Decorator[];
|
|
12
|
+
args: {
|
|
13
|
+
story_actions: boolean;
|
|
14
|
+
};
|
|
15
|
+
argTypes: ArgTypes;
|
|
16
|
+
};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { withPageTemplate } from './decorator';
|
|
2
|
+
export const templateStoryConfig = {
|
|
3
|
+
parameters: {
|
|
4
|
+
layout: 'fullscreen',
|
|
5
|
+
},
|
|
6
|
+
globals: {
|
|
7
|
+
viewport: { value: 'reset' },
|
|
8
|
+
},
|
|
9
|
+
decorators: [withPageTemplate],
|
|
10
|
+
args: {
|
|
11
|
+
story_actions: true,
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
story_actions: {
|
|
15
|
+
name: 'actions',
|
|
16
|
+
description: '(Story) Add actions below main title',
|
|
17
|
+
control: { type: 'boolean' },
|
|
18
|
+
},
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import "../chunks/chunk.
|
|
1
|
+
import "../chunks/chunk.KYZD4HDJ.js";
|
|
2
2
|
import "../chunks/chunk.UVGAHM33.js";
|
|
3
3
|
import "../chunks/chunk.IQCD6SDT.js";
|
|
4
4
|
import "../chunks/chunk.WYUQG5BJ.js";
|
|
5
5
|
import "../chunks/chunk.B4BZKR24.js";
|
|
6
6
|
import "../chunks/chunk.QBV4OLYE.js";
|
|
7
7
|
import "../chunks/chunk.LRTTUCZP.js";
|
|
8
|
+
import "../chunks/chunk.PWL7QCVG.js";
|
|
8
9
|
import "../chunks/chunk.7BLYNLBH.js";
|
|
9
10
|
import "../chunks/chunk.7627FYPL.js";
|
|
10
11
|
import "../chunks/chunk.KPJCYT4S.js";
|
|
@@ -118,7 +118,7 @@
|
|
|
118
118
|
},
|
|
119
119
|
{
|
|
120
120
|
"name": "duration",
|
|
121
|
-
"description": "The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.",
|
|
121
|
+
"description": "(deprecated) The length of time, in milliseconds, the alert will show before closing itself. If the user interacts with\nthe alert before it closes (e.g. moves the mouse over it), the timer will restart. Defaults to `Infinity`, meaning\nthe alert will not close on its own.",
|
|
122
122
|
"values": []
|
|
123
123
|
}
|
|
124
124
|
],
|
|
@@ -1021,11 +1021,6 @@
|
|
|
1021
1021
|
"description": "A custom label to show in the tooltip when a copy error occurs.",
|
|
1022
1022
|
"values": []
|
|
1023
1023
|
},
|
|
1024
|
-
{
|
|
1025
|
-
"name": "feedback-duration",
|
|
1026
|
-
"description": "The length of time to show feedback before restoring the default trigger.",
|
|
1027
|
-
"values": []
|
|
1028
|
-
},
|
|
1029
1024
|
{
|
|
1030
1025
|
"name": "tooltip-placement",
|
|
1031
1026
|
"description": "The preferred placement of the tooltip.",
|
|
@@ -2132,7 +2127,7 @@
|
|
|
2132
2127
|
},
|
|
2133
2128
|
{
|
|
2134
2129
|
"name": "dsa-input-phone",
|
|
2135
|
-
"description": "Inputs collect data from the user.\n---\n\n\n### **Events:**\n - **dsa-blur** - Emitted when the control loses focus.\n- **dsa-change** - Emitted when an alteration to the control's value is committed by the user.\n- **dsa-clear** - Emitted when the clear button is activated.\n- **dsa-focus** - Emitted when the control gains focus.\n- **dsa-input** - Emitted when the control receives input.\n- **dsa-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **
|
|
2130
|
+
"description": "Inputs collect data from the user.\n---\n\n\n### **Events:**\n - **dsa-blur** - Emitted when the control loses focus.\n- **dsa-change** - Emitted when an alteration to the control's value is committed by the user.\n- **dsa-clear** - Emitted when the clear button is activated.\n- **dsa-focus** - Emitted when the control gains focus.\n- **dsa-input** - Emitted when the control receives input.\n- **dsa-invalid** - Emitted when the form control has been checked for validity and its constraints aren't satisfied.\n\n### **Slots:**\n - **label** - The input's label. Alternatively, you can use the `label` attribute.\n- **help-text** - Text that describes how to use the input. Alternatively, you can use the `help-text` attribute.\n- **tooltip** - The tooltip slot allows additional information to be passed along the label.",
|
|
2136
2131
|
"attributes": [
|
|
2137
2132
|
{
|
|
2138
2133
|
"name": "value",
|
|
@@ -2258,7 +2253,8 @@
|
|
|
2258
2253
|
"name": "current",
|
|
2259
2254
|
"description": "Sets the link aria-current attribute and adds specific styles",
|
|
2260
2255
|
"values": []
|
|
2261
|
-
}
|
|
2256
|
+
},
|
|
2257
|
+
{ "name": "expanded", "values": [] }
|
|
2262
2258
|
],
|
|
2263
2259
|
"references": []
|
|
2264
2260
|
},
|