@ukic/web-components 2.35.0 → 2.35.2
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/README.md +1 -0
- package/dist/cjs/core.cjs.js +1 -1
- package/dist/cjs/ic-badge.cjs.entry.js +23 -0
- package/dist/cjs/ic-badge.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-button_3.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-button.cjs.entry.js +2 -2
- package/dist/cjs/ic-navigation-button.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js +1 -1
- package/dist/cjs/ic-navigation-item.cjs.entry.js.map +1 -1
- package/dist/cjs/ic-toast.cjs.entry.js +2 -2
- package/dist/cjs/ic-toast.cjs.entry.js.map +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ic-accordion/ic-accordion.stories.js +635 -0
- package/dist/collection/components/ic-alert/ic-alert.stories.js +257 -0
- package/dist/collection/components/ic-back-to-top/ic-back-to-top.stories.js +162 -0
- package/dist/collection/components/ic-badge/ic-badge.js +39 -1
- package/dist/collection/components/ic-badge/ic-badge.js.map +1 -1
- package/dist/collection/components/ic-badge/ic-badge.stories.js +1082 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js +194 -0
- package/dist/collection/components/ic-badge/test/basic/ic-badge.spec.js.map +1 -1
- package/dist/collection/components/ic-breadcrumb-group/ic-breadcrumb-group.stories.js +502 -0
- package/dist/collection/components/ic-button/ic-button.stories.js +2218 -0
- package/dist/collection/components/ic-card/ic-card.stories.js +1034 -0
- package/dist/collection/components/ic-checkbox-group/ic-checkbox-group.stories.js +687 -0
- package/dist/collection/components/ic-chip/ic-chip.stories.js +670 -0
- package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js +131 -0
- package/dist/collection/components/ic-data-entity/ic-data-entity.stories.js +487 -0
- package/dist/collection/components/ic-dialog/ic-dialog.stories.js +1256 -0
- package/dist/collection/components/ic-empty-state/ic-empty-state.stories.js +397 -0
- package/dist/collection/components/ic-footer/ic-footer.stories.js +383 -0
- package/dist/collection/components/ic-hero/ic-hero.stories.js +489 -0
- package/dist/collection/components/ic-link/ic-link.stories.js +114 -0
- package/dist/collection/components/ic-loading-indicator/ic-loading-indicator.stories.js +416 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.css +4 -0
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js +1 -1
- package/dist/collection/components/ic-navigation-button/ic-navigation-button.js.map +1 -1
- package/dist/collection/components/ic-navigation-item/ic-navigation-item.css +7 -35
- package/dist/collection/components/ic-page-header/ic-page-header.stories.js +557 -0
- package/dist/collection/components/ic-pagination/ic-pagination.stories.js +125 -0
- package/dist/collection/components/ic-popover-menu/ic-popover-menu.stories.js +486 -0
- package/dist/collection/components/ic-radio-group/ic-radio-group.stories.js +450 -0
- package/dist/collection/components/ic-search-bar/ic-search-bar.stories.js +591 -0
- package/dist/collection/components/ic-section-container/ic-section-container.stories.js +62 -0
- package/dist/collection/components/ic-select/ic-select-searchable.stories.js +953 -0
- package/dist/collection/components/ic-select/ic-select-single.stories.js +780 -0
- package/dist/collection/components/ic-side-navigation/ic-side-navigation.stories.js +2526 -0
- package/dist/collection/components/ic-skeleton/ic-skeleton.stories.js +141 -0
- package/dist/collection/components/ic-status-tag/ic-status-tag.stories.js +161 -0
- package/dist/collection/components/ic-stepper/ic-stepper.stories.js +327 -0
- package/dist/collection/components/ic-switch/ic-switch.stories.js +171 -0
- package/dist/collection/components/ic-tab-context/ic-tabs.stories.js +388 -0
- package/dist/collection/components/ic-text-field/ic-text-field.stories.js +1083 -0
- package/dist/collection/components/ic-theme/ic-theme.stories.js +171 -0
- package/dist/collection/components/ic-toast/ic-toast.js +2 -2
- package/dist/collection/components/ic-toast/ic-toast.js.map +1 -1
- package/dist/collection/components/ic-toast/ic-toast.stories.js +413 -0
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js +3 -3
- package/dist/collection/components/ic-toast/test/basic/ic-toast.spec.js.map +1 -1
- package/dist/collection/components/ic-toggle-button/ic-toggle-button.stories.js +537 -0
- package/dist/collection/components/ic-toggle-button-group/ic-toggle-button-group.stories.js +610 -0
- package/dist/collection/components/ic-tooltip/ic-tooltip.js +2 -5
- package/dist/collection/components/ic-tooltip/ic-tooltip.js.map +1 -1
- package/dist/collection/components/ic-tooltip/ic-tooltip.stories.js +356 -0
- package/dist/collection/components/ic-top-navigation/ic-top-navigation.stories.js +1083 -0
- package/dist/collection/components/ic-typography/ic-typography.stories.js +437 -0
- package/dist/collection/patterns/top-nav-content-footer.stories.js +109 -0
- package/dist/collection/patterns/z-index.stories.js +474 -0
- package/dist/components/ic-badge.js +25 -2
- package/dist/components/ic-badge.js.map +1 -1
- package/dist/components/ic-navigation-button.js +2 -2
- package/dist/components/ic-navigation-button.js.map +1 -1
- package/dist/components/ic-navigation-item.js +1 -1
- package/dist/components/ic-navigation-item.js.map +1 -1
- package/dist/components/ic-toast.js +2 -2
- package/dist/components/ic-toast.js.map +1 -1
- package/dist/components/ic-tooltip2.js.map +1 -1
- package/dist/core/core.esm.js +1 -1
- package/dist/core/core.esm.js.map +1 -1
- package/dist/core/p-3e8023ff.entry.js +2 -0
- package/dist/core/p-3e8023ff.entry.js.map +1 -0
- package/dist/core/p-ba06cc95.entry.js.map +1 -1
- package/dist/core/{p-7e8a4abd.entry.js → p-bfaa257c.entry.js} +2 -2
- package/dist/core/{p-7e8a4abd.entry.js.map → p-bfaa257c.entry.js.map} +1 -1
- package/dist/core/p-c05474f3.entry.js +2 -0
- package/dist/core/p-c05474f3.entry.js.map +1 -0
- package/dist/core/{p-5d3c6ea1.entry.js → p-d0299926.entry.js} +2 -2
- package/dist/core/p-d0299926.entry.js.map +1 -0
- package/dist/esm/core.js +1 -1
- package/dist/esm/ic-badge.entry.js +23 -0
- package/dist/esm/ic-badge.entry.js.map +1 -1
- package/dist/esm/ic-button_3.entry.js.map +1 -1
- package/dist/esm/ic-navigation-button.entry.js +2 -2
- package/dist/esm/ic-navigation-button.entry.js.map +1 -1
- package/dist/esm/ic-navigation-item.entry.js +1 -1
- package/dist/esm/ic-navigation-item.entry.js.map +1 -1
- package/dist/esm/ic-toast.entry.js +2 -2
- package/dist/esm/ic-toast.entry.js.map +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/types/components/ic-badge/ic-badge.d.ts +5 -0
- package/dist/types/components/ic-tooltip/ic-tooltip.d.ts +1 -1
- package/dist/types/components.d.ts +7 -0
- package/hydrate/index.js +30 -7
- package/package.json +17 -12
- package/vscode-data.json +4 -0
- package/dist/core/p-405d89bb.entry.js +0 -2
- package/dist/core/p-405d89bb.entry.js.map +0 -1
- package/dist/core/p-5d3c6ea1.entry.js.map +0 -1
- package/dist/core/p-dfb3e76e.entry.js +0 -2
- package/dist/core/p-dfb3e76e.entry.js.map +0 -1
package/dist/collection/components/ic-classification-banner/ic-classification-banner.stories.js
ADDED
@@ -0,0 +1,131 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
additionalSelectors: "",
|
5
|
+
classification: "official",
|
6
|
+
country: "uk",
|
7
|
+
inline: true,
|
8
|
+
upTo: false,
|
9
|
+
};
|
10
|
+
|
11
|
+
export default {
|
12
|
+
title: "Web Components/Classification banner",
|
13
|
+
component: "ic-classification-banner",
|
14
|
+
};
|
15
|
+
|
16
|
+
export const Classifications = {
|
17
|
+
render: () =>
|
18
|
+
html`<ic-classification-banner inline="true"></ic-classification-banner>
|
19
|
+
<ic-classification-banner
|
20
|
+
classification="official"
|
21
|
+
inline="true"
|
22
|
+
></ic-classification-banner>
|
23
|
+
<ic-classification-banner
|
24
|
+
classification="official-sensitive"
|
25
|
+
inline="true"
|
26
|
+
></ic-classification-banner>
|
27
|
+
<ic-classification-banner
|
28
|
+
classification="secret"
|
29
|
+
inline="true"
|
30
|
+
></ic-classification-banner>
|
31
|
+
<ic-classification-banner
|
32
|
+
classification="top-secret"
|
33
|
+
inline="true"
|
34
|
+
></ic-classification-banner>`,
|
35
|
+
|
36
|
+
name: "Classifications",
|
37
|
+
};
|
38
|
+
|
39
|
+
export const UpTo = {
|
40
|
+
render: () =>
|
41
|
+
html`<ic-classification-banner inline="true"></ic-classification-banner>
|
42
|
+
<ic-classification-banner
|
43
|
+
classification="official"
|
44
|
+
inline="true"
|
45
|
+
up-to="true"
|
46
|
+
></ic-classification-banner>
|
47
|
+
<ic-classification-banner
|
48
|
+
classification="official-sensitive"
|
49
|
+
inline="true"
|
50
|
+
up-to="true"
|
51
|
+
></ic-classification-banner>
|
52
|
+
<ic-classification-banner
|
53
|
+
classification="secret"
|
54
|
+
inline="true"
|
55
|
+
up-to="true"
|
56
|
+
></ic-classification-banner>
|
57
|
+
<ic-classification-banner
|
58
|
+
classification="top-secret"
|
59
|
+
inline="true"
|
60
|
+
up-to="true"
|
61
|
+
></ic-classification-banner>`,
|
62
|
+
|
63
|
+
name: "Up to",
|
64
|
+
};
|
65
|
+
|
66
|
+
export const BottomOfPage = {
|
67
|
+
render: () =>
|
68
|
+
html`<ic-classification-banner
|
69
|
+
classification="official"
|
70
|
+
></ic-classification-banner>`,
|
71
|
+
|
72
|
+
name: "Bottom of page",
|
73
|
+
};
|
74
|
+
|
75
|
+
export const Country = {
|
76
|
+
render: () =>
|
77
|
+
html`<ic-classification-banner
|
78
|
+
classification="official"
|
79
|
+
inline="true"
|
80
|
+
country="us"
|
81
|
+
></ic-classification-banner>
|
82
|
+
<ic-classification-banner
|
83
|
+
classification="official"
|
84
|
+
inline="true"
|
85
|
+
country=""
|
86
|
+
></ic-classification-banner>`,
|
87
|
+
|
88
|
+
name: "Country",
|
89
|
+
};
|
90
|
+
|
91
|
+
export const AdditionalSelectors = {
|
92
|
+
render: () =>
|
93
|
+
html`<ic-classification-banner
|
94
|
+
classification="official"
|
95
|
+
inline="true"
|
96
|
+
additional-selectors="ukic"
|
97
|
+
/>`,
|
98
|
+
|
99
|
+
name: "Additional selectors",
|
100
|
+
};
|
101
|
+
|
102
|
+
export const Playground = {
|
103
|
+
render: (args) =>
|
104
|
+
html`<ic-classification-banner
|
105
|
+
classification=${args.classification}
|
106
|
+
inline=${args.inline}
|
107
|
+
up-to=${args.upTo}
|
108
|
+
country=${args.country}
|
109
|
+
additional-selectors=${args.additionalSelectors}
|
110
|
+
></ic-classification-banner>`,
|
111
|
+
|
112
|
+
args: defaultArgs,
|
113
|
+
|
114
|
+
argTypes: {
|
115
|
+
classification: {
|
116
|
+
options: [
|
117
|
+
"default",
|
118
|
+
"official",
|
119
|
+
"secret",
|
120
|
+
"official-sensitive",
|
121
|
+
"top-secret",
|
122
|
+
],
|
123
|
+
|
124
|
+
control: {
|
125
|
+
type: "select",
|
126
|
+
},
|
127
|
+
},
|
128
|
+
},
|
129
|
+
|
130
|
+
name: "Playground",
|
131
|
+
};
|
@@ -0,0 +1,487 @@
|
|
1
|
+
import { html } from "lit-html";
|
2
|
+
|
3
|
+
const defaultArgs = {
|
4
|
+
heading: "Details",
|
5
|
+
size: "default",
|
6
|
+
label: "Name",
|
7
|
+
rowSize: "default",
|
8
|
+
value: "Michael Johnson",
|
9
|
+
endCompSlot: "end-component",
|
10
|
+
};
|
11
|
+
|
12
|
+
export default {
|
13
|
+
title: "Web Components/Data entity",
|
14
|
+
component: "ic-data-entity",
|
15
|
+
};
|
16
|
+
|
17
|
+
export const Default = {
|
18
|
+
render: () =>
|
19
|
+
html`<ic-data-entity heading="Personal details">
|
20
|
+
<ic-data-row label="Name" value="Michael Johnson"></ic-data-row>
|
21
|
+
<ic-data-row label="Date of birth" value="16 October 1995"></ic-data-row>
|
22
|
+
<ic-data-row label="Telephone" value="07449 7654873"></ic-data-row>
|
23
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov"></ic-data-row>
|
24
|
+
<ic-data-row label="Address">
|
25
|
+
<ic-typography variant="body" slot="value">
|
26
|
+
383 Coffee Drive
|
27
|
+
<br />
|
28
|
+
London
|
29
|
+
<br />
|
30
|
+
SW7 988
|
31
|
+
<br />
|
32
|
+
United Kingdom
|
33
|
+
</ic-typography>
|
34
|
+
</ic-data-row>
|
35
|
+
</ic-data-entity>`,
|
36
|
+
|
37
|
+
name: "Default",
|
38
|
+
};
|
39
|
+
|
40
|
+
export const SlottedHeadingAndLabel = {
|
41
|
+
render: () =>
|
42
|
+
html`<ic-data-entity>
|
43
|
+
<ic-typography variant="h3" slot="heading"
|
44
|
+
>Personal details</ic-typography
|
45
|
+
>
|
46
|
+
<ic-data-row value="Michael Johnson">
|
47
|
+
<ic-typography variant="subtitle-large" slot="label"
|
48
|
+
>Name</ic-typography
|
49
|
+
>
|
50
|
+
</ic-data-row>
|
51
|
+
<ic-data-row value="16 October 1995">
|
52
|
+
<ic-typography variant="subtitle-large" slot="label"
|
53
|
+
>Date of birth</ic-typography
|
54
|
+
>
|
55
|
+
</ic-data-row>
|
56
|
+
</ic-data-entity>`,
|
57
|
+
|
58
|
+
name: "Slotted heading and label",
|
59
|
+
};
|
60
|
+
|
61
|
+
export const LongTextValues = {
|
62
|
+
render: () =>
|
63
|
+
html`<ic-data-entity
|
64
|
+
heading="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
|
65
|
+
>
|
66
|
+
<ic-data-row
|
67
|
+
label="Lorem ipsum dolor sit amet, consectetur adipiscing elit"
|
68
|
+
value="Michael Johnson"
|
69
|
+
></ic-data-row>
|
70
|
+
<ic-data-row label="Date of birth" value="16 October 1995"></ic-data-row>
|
71
|
+
<ic-data-row label="Telephone" value="07449 7654873"></ic-data-row>
|
72
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov"></ic-data-row>
|
73
|
+
<ic-data-row
|
74
|
+
label="Address"
|
75
|
+
value="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat"
|
76
|
+
></ic-data-row>
|
77
|
+
<ic-data-row label="Second address">
|
78
|
+
<ic-typography variant="body" slot="value">
|
79
|
+
383 Coffee Drive
|
80
|
+
<br />
|
81
|
+
London
|
82
|
+
<br />
|
83
|
+
SW7 988
|
84
|
+
<br />
|
85
|
+
United Kingdom
|
86
|
+
</ic-typography>
|
87
|
+
</ic-data-row>
|
88
|
+
</ic-data-entity>`,
|
89
|
+
|
90
|
+
name: "Long text values",
|
91
|
+
};
|
92
|
+
|
93
|
+
export const Small = {
|
94
|
+
render: () =>
|
95
|
+
html`<ic-data-entity heading="Personal details" size="small">
|
96
|
+
<ic-data-row label="Name" value="Michael Johnson"></ic-data-row>
|
97
|
+
<ic-data-row label="Date of birth" value="16 October 1995"></ic-data-row>
|
98
|
+
<ic-data-row label="Telephone" value="07449 7654873"></ic-data-row>
|
99
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov"></ic-data-row>
|
100
|
+
<ic-data-row label="Address">
|
101
|
+
<ic-typography variant="body" slot="value">
|
102
|
+
383 Coffee Drive
|
103
|
+
<br />
|
104
|
+
London
|
105
|
+
<br />
|
106
|
+
SW7 988
|
107
|
+
<br />
|
108
|
+
United Kingdom
|
109
|
+
</ic-typography>
|
110
|
+
</ic-data-row>
|
111
|
+
</ic-data-entity>`,
|
112
|
+
|
113
|
+
name: "Small",
|
114
|
+
};
|
115
|
+
|
116
|
+
export const DeprecatedSmall = {
|
117
|
+
render: () =>
|
118
|
+
html`<ic-data-entity heading="Personal details" small>
|
119
|
+
<ic-data-row label="Name" value="Michael Johnson"></ic-data-row>
|
120
|
+
<ic-data-row label="Date of birth" value="16 October 1995"></ic-data-row>
|
121
|
+
<ic-data-row label="Telephone" value="07449 7654873"></ic-data-row>
|
122
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov"></ic-data-row>
|
123
|
+
<ic-data-row label="Address">
|
124
|
+
<ic-typography variant="body" slot="value">
|
125
|
+
383 Coffee Drive
|
126
|
+
<br />
|
127
|
+
London
|
128
|
+
<br />
|
129
|
+
SW7 988
|
130
|
+
<br />
|
131
|
+
United Kingdom
|
132
|
+
</ic-typography>
|
133
|
+
</ic-data-row>
|
134
|
+
</ic-data-entity>`,
|
135
|
+
|
136
|
+
name: "Deprecated - small",
|
137
|
+
};
|
138
|
+
|
139
|
+
export const WithLink = {
|
140
|
+
render: () =>
|
141
|
+
html`<ic-data-entity heading="Personal details">
|
142
|
+
<ic-data-row label="Name" value="Michael Johnson">
|
143
|
+
<ic-link href="#" slot="end-component"> Edit </ic-link>
|
144
|
+
</ic-data-row>
|
145
|
+
<ic-data-row label="Date of birth" value="16 October 1995">
|
146
|
+
<ic-link href="#" slot="end-component"> Edit </ic-link>
|
147
|
+
</ic-data-row>
|
148
|
+
<ic-data-row label="Telephone" value="07449 7654873">
|
149
|
+
<ic-link href="#" slot="end-component"> Edit </ic-link>
|
150
|
+
</ic-data-row>
|
151
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov">
|
152
|
+
<ic-link href="#" slot="end-component"> Edit </ic-link>
|
153
|
+
</ic-data-row>
|
154
|
+
<ic-data-row label="Address">
|
155
|
+
<ic-typography variant="body" slot="value">
|
156
|
+
383 Coffee Drive
|
157
|
+
<br />
|
158
|
+
London
|
159
|
+
<br />
|
160
|
+
SW7 988
|
161
|
+
<br />
|
162
|
+
United Kingdom
|
163
|
+
</ic-typography>
|
164
|
+
<ic-link href="#" slot="end-component"> Edit </ic-link>
|
165
|
+
</ic-data-row>
|
166
|
+
</ic-data-entity>`,
|
167
|
+
|
168
|
+
name: "With link",
|
169
|
+
};
|
170
|
+
|
171
|
+
export const IconButton = {
|
172
|
+
render: () =>
|
173
|
+
html`<ic-data-entity heading="Personal details">
|
174
|
+
<ic-data-row label="Name" value="Michael Johnson">
|
175
|
+
<ic-button variant="icon" aria-label="Edit" slot="end-component">
|
176
|
+
<svg
|
177
|
+
xmlns="http://www.w3.org/2000/svg"
|
178
|
+
width="24"
|
179
|
+
height="24"
|
180
|
+
viewBox="0 0 24 24"
|
181
|
+
>
|
182
|
+
<path
|
183
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
184
|
+
/>
|
185
|
+
</svg>
|
186
|
+
</ic-button>
|
187
|
+
</ic-data-row>
|
188
|
+
<ic-data-row label="Date of birth" value="16 October 1995">
|
189
|
+
<ic-button variant="icon" aria-label="Edit" slot="end-component">
|
190
|
+
<svg
|
191
|
+
xmlns="http://www.w3.org/2000/svg"
|
192
|
+
width="24"
|
193
|
+
height="24"
|
194
|
+
viewBox="0 0 24 24"
|
195
|
+
>
|
196
|
+
<path
|
197
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
198
|
+
/>
|
199
|
+
</svg>
|
200
|
+
</ic-button>
|
201
|
+
</ic-data-row>
|
202
|
+
<ic-data-row label="Telephone" value="07449 7654873">
|
203
|
+
<ic-button variant="icon" aria-label="Edit" slot="end-component">
|
204
|
+
<svg
|
205
|
+
xmlns="http://www.w3.org/2000/svg"
|
206
|
+
width="24"
|
207
|
+
height="24"
|
208
|
+
viewBox="0 0 24 24"
|
209
|
+
>
|
210
|
+
<path
|
211
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
212
|
+
/>
|
213
|
+
</svg>
|
214
|
+
</ic-button>
|
215
|
+
</ic-data-row>
|
216
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov">
|
217
|
+
<ic-button variant="icon" aria-label="Edit" slot="end-component">
|
218
|
+
<svg
|
219
|
+
xmlns="http://www.w3.org/2000/svg"
|
220
|
+
width="24"
|
221
|
+
height="24"
|
222
|
+
viewBox="0 0 24 24"
|
223
|
+
>
|
224
|
+
<path
|
225
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
226
|
+
/>
|
227
|
+
</svg>
|
228
|
+
</ic-button>
|
229
|
+
</ic-data-row>
|
230
|
+
<ic-data-row label="Address">
|
231
|
+
<ic-typography variant="body" slot="value">
|
232
|
+
383 Coffee Drive
|
233
|
+
<br />
|
234
|
+
London
|
235
|
+
<br />
|
236
|
+
SW7 988
|
237
|
+
<br />
|
238
|
+
United Kingdom
|
239
|
+
</ic-typography>
|
240
|
+
<ic-button variant="icon" aria-label="Edit" slot="end-component">
|
241
|
+
<svg
|
242
|
+
xmlns="http://www.w3.org/2000/svg"
|
243
|
+
width="24"
|
244
|
+
height="24"
|
245
|
+
viewBox="0 0 24 24"
|
246
|
+
>
|
247
|
+
<path
|
248
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
249
|
+
/>
|
250
|
+
</svg>
|
251
|
+
</ic-button>
|
252
|
+
</ic-data-row>
|
253
|
+
</ic-data-entity>`,
|
254
|
+
|
255
|
+
name: "Icon button",
|
256
|
+
};
|
257
|
+
|
258
|
+
export const Adornment = {
|
259
|
+
render: () =>
|
260
|
+
html`<ic-data-entity heading="Personal details">
|
261
|
+
<ic-data-row label="Name" value="Michael Johnson">
|
262
|
+
<ic-status-tag
|
263
|
+
status="success"
|
264
|
+
label="confirmed"
|
265
|
+
variant="filled"
|
266
|
+
slot="end-component"
|
267
|
+
>
|
268
|
+
</ic-status-tag>
|
269
|
+
</ic-data-row>
|
270
|
+
<ic-data-row label="Date of birth" value="16 October 1995">
|
271
|
+
<ic-status-tag
|
272
|
+
status="warning"
|
273
|
+
label="in review"
|
274
|
+
variant="filled"
|
275
|
+
slot="end-component"
|
276
|
+
/>
|
277
|
+
</ic-data-row>
|
278
|
+
<ic-data-row label="Telephone" value="07449 7654873">
|
279
|
+
<ic-status-tag
|
280
|
+
status="warning"
|
281
|
+
label="in review"
|
282
|
+
variant="filled"
|
283
|
+
slot="end-component"
|
284
|
+
/>
|
285
|
+
</ic-data-row>
|
286
|
+
<ic-data-row label="Email" value="mjohnson@coffee.gov">
|
287
|
+
<ic-status-tag
|
288
|
+
status="success"
|
289
|
+
label="confirmed"
|
290
|
+
variant="filled"
|
291
|
+
slot="end-component"
|
292
|
+
/>
|
293
|
+
</ic-data-row>
|
294
|
+
<ic-data-row label="Address">
|
295
|
+
<ic-typography variant="body" slot="value">
|
296
|
+
383 Coffee Drive
|
297
|
+
<br />
|
298
|
+
London
|
299
|
+
<br />
|
300
|
+
SW7 988
|
301
|
+
<br />
|
302
|
+
United Kingdom
|
303
|
+
</ic-typography>
|
304
|
+
<ic-status-tag
|
305
|
+
label="not confirmed"
|
306
|
+
variant="filled"
|
307
|
+
slot="end-component"
|
308
|
+
/>
|
309
|
+
</ic-data-row>
|
310
|
+
</ic-data-entity>`,
|
311
|
+
|
312
|
+
name: "Adornment",
|
313
|
+
};
|
314
|
+
|
315
|
+
export const WithStatusTag = {
|
316
|
+
render: () =>
|
317
|
+
html` <ic-data-entity heading="Personal details">
|
318
|
+
<ic-data-row label="Name"
|
319
|
+
><ic-status-tag
|
320
|
+
status="success"
|
321
|
+
label="approved"
|
322
|
+
variant="filled"
|
323
|
+
slot="value"
|
324
|
+
/></ic-data-row>
|
325
|
+
<ic-data-row label="Date of birth"
|
326
|
+
><ic-status-tag
|
327
|
+
status="success"
|
328
|
+
label="approved"
|
329
|
+
variant="filled"
|
330
|
+
slot="value"
|
331
|
+
/></ic-data-row>
|
332
|
+
<ic-data-row label="Telephone"
|
333
|
+
><ic-status-tag
|
334
|
+
status="success"
|
335
|
+
label="approved"
|
336
|
+
variant="filled"
|
337
|
+
slot="value"
|
338
|
+
/></ic-data-row>
|
339
|
+
<ic-data-row label="Address"
|
340
|
+
><ic-status-tag
|
341
|
+
status="success"
|
342
|
+
label="approved"
|
343
|
+
variant="filled"
|
344
|
+
slot="value"
|
345
|
+
/></ic-data-row>
|
346
|
+
<ic-data-row label="Email"
|
347
|
+
><ic-status-tag
|
348
|
+
status="success"
|
349
|
+
label="approved"
|
350
|
+
variant="filled"
|
351
|
+
slot="value"
|
352
|
+
/></ic-data-row>
|
353
|
+
</ic-data-entity>`,
|
354
|
+
|
355
|
+
name: "With status tag",
|
356
|
+
};
|
357
|
+
|
358
|
+
export const EditableExample = {
|
359
|
+
render: () =>
|
360
|
+
html`<ic-data-entity heading="Personal details">
|
361
|
+
<ic-data-row label="Name">
|
362
|
+
<ic-text-field
|
363
|
+
slot="value"
|
364
|
+
label="Name"
|
365
|
+
value="Michael Johnson"
|
366
|
+
readonly
|
367
|
+
hide-label
|
368
|
+
full-width
|
369
|
+
/>
|
370
|
+
</ic-data-row>
|
371
|
+
<ic-data-row label="Date of birth">
|
372
|
+
<ic-text-field
|
373
|
+
slot="value"
|
374
|
+
label="Date of birth"
|
375
|
+
value="16 October 1995"
|
376
|
+
readonly
|
377
|
+
hide-label
|
378
|
+
full-width
|
379
|
+
/>
|
380
|
+
</ic-data-row>
|
381
|
+
<ic-data-row label="Telephone">
|
382
|
+
<ic-text-field
|
383
|
+
slot="value"
|
384
|
+
label="Telephone"
|
385
|
+
value="07449 7654873"
|
386
|
+
readonly
|
387
|
+
hide-label
|
388
|
+
full-width
|
389
|
+
/>
|
390
|
+
</ic-data-row>
|
391
|
+
<ic-data-row label="Email">
|
392
|
+
<ic-text-field
|
393
|
+
slot="value"
|
394
|
+
label="Email"
|
395
|
+
value="mjohnson@coffee.gov"
|
396
|
+
readonly
|
397
|
+
hide-label
|
398
|
+
full-width
|
399
|
+
/>
|
400
|
+
</ic-data-row>
|
401
|
+
<ic-data-row label="Address">
|
402
|
+
<ic-text-field
|
403
|
+
slot="value"
|
404
|
+
label="Address"
|
405
|
+
value="383 Coffee Drive, London, SW7 988, United Kingdom"
|
406
|
+
readonly
|
407
|
+
hide-label
|
408
|
+
full-width
|
409
|
+
/>
|
410
|
+
</ic-data-row>
|
411
|
+
</ic-data-entity>
|
412
|
+
<ic-button
|
413
|
+
onclick="
|
414
|
+
var textFields = document.querySelectorAll('ic-text-field');
|
415
|
+
for (var i=0; i < textFields.length; i++) {
|
416
|
+
textFields[i].setAttribute('readonly', '');
|
417
|
+
}"
|
418
|
+
style="margin-right: var(--ic-space-md);margin-top: var(--ic-space-lg);"
|
419
|
+
>
|
420
|
+
Confirm
|
421
|
+
</ic-button>
|
422
|
+
<ic-button
|
423
|
+
onclick="
|
424
|
+
var textFields = document.querySelectorAll('ic-text-field');
|
425
|
+
for (var i=0; i < textFields.length; i++) {
|
426
|
+
textFields[i].removeAttribute('readonly');
|
427
|
+
}"
|
428
|
+
variant="secondary"
|
429
|
+
style="margin-top: var(--ic-space-lg);"
|
430
|
+
>
|
431
|
+
Edit
|
432
|
+
</ic-button>`,
|
433
|
+
|
434
|
+
name: "Editable example",
|
435
|
+
};
|
436
|
+
|
437
|
+
export const Playground = {
|
438
|
+
render: (args) =>
|
439
|
+
html`<ic-data-entity heading=${args.heading} size=${args.size}>
|
440
|
+
<ic-data-row label=${args.label} value=${args.value} size=${args.rowSize}>
|
441
|
+
<ic-button variant="icon" aria-label="Edit" slot=${args.endCompSlot}>
|
442
|
+
<svg
|
443
|
+
xmlns="http://www.w3.org/2000/svg"
|
444
|
+
width="24"
|
445
|
+
height="24"
|
446
|
+
viewBox="0 0 24 24"
|
447
|
+
>
|
448
|
+
<path
|
449
|
+
d="M7.127 22.562l-7.127 1.438 1.438-7.128 5.689 5.69zm1.414-1.414l11.228-11.225-5.69-5.692-11.227 11.227 5.689 5.69zm9.768-21.148l-2.816 2.817 5.691 5.691 2.816-2.819-5.691-5.689z"
|
450
|
+
/>
|
451
|
+
</svg>
|
452
|
+
</ic-button>
|
453
|
+
</ic-data-row>
|
454
|
+
<ic-data-row label="Date of birth" value="16 October 1995"></ic-data-row>
|
455
|
+
<ic-data-row label="Telephone" value="07449 7654873"></ic-data-row>
|
456
|
+
</ic-data-entity>`,
|
457
|
+
|
458
|
+
args: defaultArgs,
|
459
|
+
|
460
|
+
argTypes: {
|
461
|
+
size: {
|
462
|
+
options: ["default", "small"],
|
463
|
+
|
464
|
+
control: {
|
465
|
+
type: "inline-radio",
|
466
|
+
},
|
467
|
+
},
|
468
|
+
|
469
|
+
rowSize: {
|
470
|
+
options: ["default", "small"],
|
471
|
+
|
472
|
+
control: {
|
473
|
+
type: "inline-radio",
|
474
|
+
},
|
475
|
+
},
|
476
|
+
|
477
|
+
endCompSlot: {
|
478
|
+
options: ["end-component", ""],
|
479
|
+
|
480
|
+
control: {
|
481
|
+
type: "select",
|
482
|
+
},
|
483
|
+
},
|
484
|
+
},
|
485
|
+
|
486
|
+
name: "Playground",
|
487
|
+
};
|