@dxc-technology/halstack-react 0.0.0-ee92231 → 0.0.0-efa7c74
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/alert/Alert.stories.tsx +170 -0
- package/alert/types.d.ts +1 -1
- package/box/Box.d.ts +1 -1
- package/box/Box.js +2 -5
- package/box/types.d.ts +0 -4
- package/button/Button.d.ts +1 -1
- package/button/Button.js +4 -2
- package/button/Button.stories.tsx +216 -233
- package/button/types.d.ts +2 -2
- package/card/Card.js +4 -5
- package/card/Card.stories.tsx +201 -0
- package/card/ice-cream.jpg +0 -0
- package/card/types.d.ts +4 -6
- package/checkbox/types.d.ts +1 -1
- package/chip/Chip.stories.tsx +121 -0
- package/common/variables.js +13 -5
- package/date-input/DateInput.stories.tsx +138 -0
- package/dialog/Dialog.stories.tsx +212 -0
- package/file-input/FileInput.d.ts +4 -0
- package/file-input/FileInput.js +7 -28
- package/file-input/FileItem.d.ts +14 -0
- package/file-input/FileItem.js +4 -15
- package/file-input/types.d.ts +87 -0
- package/file-input/types.js +5 -0
- package/footer/types.d.ts +1 -1
- package/header/Header.stories.tsx +162 -0
- package/header/types.d.ts +4 -2
- package/heading/Heading.d.ts +4 -0
- package/heading/Heading.js +6 -23
- package/heading/Heading.stories.tsx +53 -0
- package/heading/types.d.ts +33 -0
- package/heading/types.js +5 -0
- package/link/Link.js +2 -2
- package/link/Link.stories.tsx +146 -0
- package/number-input/NumberInput.d.ts +4 -0
- package/number-input/NumberInput.js +2 -44
- package/number-input/{NumberInput.stories.jsx → NumberInput.stories.tsx} +0 -0
- package/number-input/NumberInputContext.d.ts +4 -0
- package/number-input/NumberInputContext.js +5 -2
- package/number-input/numberInputContextTypes.d.ts +19 -0
- package/number-input/numberInputContextTypes.js +5 -0
- package/number-input/types.d.ts +117 -0
- package/number-input/types.js +5 -0
- package/package.json +1 -1
- package/password-input/types.d.ts +13 -8
- package/radio/types.d.ts +2 -2
- package/resultsetTable/ResultsetTable.d.ts +4 -0
- package/resultsetTable/ResultsetTable.js +0 -25
- package/resultsetTable/types.d.ts +63 -0
- package/resultsetTable/types.js +5 -0
- package/select/Select.stories.tsx +572 -0
- package/sidenav/Sidenav.d.ts +9 -0
- package/sidenav/Sidenav.js +4 -13
- package/sidenav/Sidenav.stories.tsx +165 -0
- package/sidenav/types.d.ts +50 -0
- package/sidenav/types.js +5 -0
- package/slider/Slider.d.ts +1 -1
- package/slider/Slider.js +41 -30
- package/slider/Slider.stories.tsx +177 -0
- package/slider/types.d.ts +2 -7
- package/table/Table.js +1 -1
- package/tabs/Tabs.js +3 -1
- package/tabs/Tabs.stories.tsx +121 -0
- package/tabs/types.d.ts +2 -3
- package/tag/Tag.d.ts +4 -0
- package/tag/Tag.js +3 -24
- package/tag/{Tag.stories.jsx → Tag.stories.tsx} +0 -0
- package/tag/types.d.ts +60 -0
- package/tag/types.js +5 -0
- package/text-input/TextInput.d.ts +4 -0
- package/text-input/TextInput.js +4 -44
- package/text-input/types.d.ts +157 -0
- package/text-input/types.js +5 -0
- package/toggle-group/ToggleGroup.d.ts +4 -0
- package/toggle-group/ToggleGroup.js +5 -31
- package/toggle-group/ToggleGroup.stories.tsx +178 -0
- package/toggle-group/types.d.ts +84 -0
- package/toggle-group/types.js +5 -0
- package/wizard/Wizard.d.ts +4 -0
- package/wizard/Wizard.js +11 -51
- package/wizard/Wizard.stories.jsx +224 -0
- package/wizard/types.d.ts +64 -0
- package/wizard/types.js +5 -0
- package/file-input/index.d.ts +0 -81
- package/heading/index.d.ts +0 -17
- package/number-input/index.d.ts +0 -113
- package/resultsetTable/index.d.ts +0 -19
- package/sidenav/index.d.ts +0 -13
- package/tag/index.d.ts +0 -24
- package/text-input/index.d.ts +0 -135
- package/toggle-group/index.d.ts +0 -21
- package/wizard/index.d.ts +0 -18
|
@@ -20,274 +20,257 @@ const iconSVG = () => {
|
|
|
20
20
|
};
|
|
21
21
|
export const Chromatic = () => (
|
|
22
22
|
<>
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
<
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
<
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
<
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
<
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
23
|
+
<Title title="Primary" theme="light" level={2} />
|
|
24
|
+
<ExampleContainer>
|
|
25
|
+
<Title title="Enabled" theme="light" level={4} />
|
|
26
|
+
<DxcButton label="Primary enabled" />
|
|
27
|
+
</ExampleContainer>
|
|
28
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
29
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
30
|
+
<DxcButton label="Primary hovered" />
|
|
31
|
+
</ExampleContainer>
|
|
32
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
33
|
+
<Title title="Focused" theme="light" level={4} />
|
|
34
|
+
<DxcButton label="Primary focused" />
|
|
35
|
+
</ExampleContainer>
|
|
36
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
37
|
+
<Title title="Actived" theme="light" level={4} />
|
|
38
|
+
<DxcButton label="Primary actived" />
|
|
39
|
+
</ExampleContainer>
|
|
40
|
+
<ExampleContainer>
|
|
41
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
42
|
+
<DxcButton label="Primary disabled" disabled />
|
|
43
|
+
</ExampleContainer>
|
|
44
|
+
<ExampleContainer>
|
|
45
|
+
<Title title="With left icon" theme="light" level={4} />
|
|
46
|
+
<DxcButton label="Primary" icon={iconSVG} />
|
|
47
|
+
</ExampleContainer>
|
|
48
|
+
<ExampleContainer>
|
|
49
|
+
<Title title="With right icon" theme="light" level={4} />
|
|
50
|
+
<DxcButton label="Primary" icon={iconSVG} iconPosition="after" />
|
|
51
|
+
</ExampleContainer>
|
|
52
|
+
<ExampleContainer>
|
|
53
|
+
<Title title="Only icon" theme="light" level={4} />
|
|
54
|
+
<DxcButton icon={iconSVG} />
|
|
55
|
+
</ExampleContainer>
|
|
56
|
+
<Title title="Secondary" theme="light" level={2} />
|
|
57
|
+
<ExampleContainer>
|
|
58
|
+
<Title title="Enabled" theme="light" level={4} />
|
|
59
|
+
<DxcButton mode="secondary" label="Secondary enabled" />
|
|
60
|
+
</ExampleContainer>
|
|
61
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
62
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
63
|
+
<DxcButton mode="secondary" label="Secondary hovered" />
|
|
64
|
+
</ExampleContainer>
|
|
65
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
66
|
+
<Title title="Focused" theme="light" level={4} />
|
|
67
|
+
<DxcButton mode="secondary" label="Secondary focused" />
|
|
68
|
+
</ExampleContainer>
|
|
69
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
70
|
+
<Title title="Actived" theme="light" level={4} />
|
|
71
|
+
<DxcButton mode="secondary" label="Secondary actived" />
|
|
72
|
+
</ExampleContainer>
|
|
73
|
+
<ExampleContainer>
|
|
74
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
75
|
+
<DxcButton mode="secondary" disabled label="Secondary disabled" />
|
|
76
|
+
</ExampleContainer>
|
|
77
|
+
<ExampleContainer>
|
|
78
|
+
<Title title="With icon" theme="light" level={4} />
|
|
79
|
+
<DxcButton mode="secondary" label="Secondary" icon={iconSVG} />
|
|
80
|
+
</ExampleContainer>
|
|
81
|
+
<Title title="Text" theme="light" level={2} />
|
|
82
|
+
<ExampleContainer>
|
|
83
|
+
<Title title="Enabled" theme="light" level={4} />
|
|
84
|
+
<DxcButton mode="text" label="Text enabled" />
|
|
85
|
+
</ExampleContainer>
|
|
86
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
87
|
+
<Title title="Hovered" theme="light" level={4} />
|
|
88
|
+
<DxcButton mode="text" label="Text hovered" />
|
|
89
|
+
</ExampleContainer>
|
|
90
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
91
|
+
<Title title="Focused" theme="light" level={4} />
|
|
92
|
+
<DxcButton mode="text" label="Text focused" />
|
|
93
|
+
</ExampleContainer>
|
|
94
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
95
|
+
<Title title="Actived" theme="light" level={4} />
|
|
96
|
+
<DxcButton mode="text" label="Text actived" />
|
|
97
|
+
</ExampleContainer>
|
|
98
|
+
<ExampleContainer>
|
|
99
|
+
<Title title="Disabled" theme="light" level={4} />
|
|
100
|
+
<DxcButton mode="text" label="Text disabled" disabled />
|
|
101
|
+
</ExampleContainer>
|
|
102
|
+
<ExampleContainer>
|
|
103
|
+
<Title title="With icon" theme="light" level={4} />
|
|
104
|
+
<DxcButton label="Text" mode="text" icon={iconSVG} />
|
|
105
|
+
</ExampleContainer>
|
|
106
|
+
<BackgroundColorProvider color="#333333">
|
|
107
|
+
<DarkContainer>
|
|
108
|
+
<Title title="Primary" theme="dark" level={2} />
|
|
61
109
|
<ExampleContainer>
|
|
62
|
-
<Title title="Enabled" theme="
|
|
110
|
+
<Title title="Enabled" theme="dark" level={4} />
|
|
111
|
+
<DxcButton label="Primary enabled" />
|
|
112
|
+
</ExampleContainer>
|
|
113
|
+
<ExampleContainer pseudoState="pseudo-hover">
|
|
114
|
+
<Title title="Hovered" theme="dark" level={4} />
|
|
115
|
+
<DxcButton label="Primary hovered" />
|
|
116
|
+
</ExampleContainer>
|
|
117
|
+
<ExampleContainer pseudoState="pseudo-focus">
|
|
118
|
+
<Title title="Focused" theme="dark" level={4} />
|
|
119
|
+
<DxcButton label="Primary focused" />
|
|
120
|
+
</ExampleContainer>
|
|
121
|
+
<ExampleContainer pseudoState="pseudo-active">
|
|
122
|
+
<Title title="Actived" theme="dark" level={4} />
|
|
123
|
+
<DxcButton label="Primary actived" />
|
|
124
|
+
</ExampleContainer>
|
|
125
|
+
<ExampleContainer>
|
|
126
|
+
<Title title="Disabled" theme="dark" level={4} />
|
|
127
|
+
<DxcButton label="Primary disabled" disabled />
|
|
128
|
+
</ExampleContainer>
|
|
129
|
+
<ExampleContainer>
|
|
130
|
+
<Title title="With icon" theme="dark" level={4} />
|
|
131
|
+
<DxcButton label="Primary" icon={iconSVG} />
|
|
132
|
+
</ExampleContainer>
|
|
133
|
+
<Title title="Secondary" theme="dark" level={2} />
|
|
134
|
+
<ExampleContainer>
|
|
135
|
+
<Title title="Enabled" theme="dark" level={4} />
|
|
63
136
|
<DxcButton mode="secondary" label="Secondary enabled" />
|
|
64
137
|
</ExampleContainer>
|
|
65
138
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
66
|
-
<Title title="Hovered" theme="
|
|
139
|
+
<Title title="Hovered" theme="dark" level={4} />
|
|
67
140
|
<DxcButton mode="secondary" label="Secondary hovered" />
|
|
68
141
|
</ExampleContainer>
|
|
69
142
|
<ExampleContainer pseudoState="pseudo-focus">
|
|
70
|
-
<Title title="Focused" theme="
|
|
143
|
+
<Title title="Focused" theme="dark" level={4} />
|
|
71
144
|
<DxcButton mode="secondary" label="Secondary focused" />
|
|
72
145
|
</ExampleContainer>
|
|
73
146
|
<ExampleContainer pseudoState="pseudo-active">
|
|
74
|
-
<Title title="Actived" theme="
|
|
147
|
+
<Title title="Actived" theme="dark" level={4} />
|
|
75
148
|
<DxcButton mode="secondary" label="Secondary actived" />
|
|
76
149
|
</ExampleContainer>
|
|
77
150
|
<ExampleContainer>
|
|
78
|
-
<Title title="Disabled" theme="
|
|
151
|
+
<Title title="Disabled" theme="dark" level={4} />
|
|
79
152
|
<DxcButton mode="secondary" disabled label="Secondary disabled" />
|
|
80
153
|
</ExampleContainer>
|
|
81
154
|
<ExampleContainer>
|
|
82
|
-
<Title title="With icon" theme="
|
|
83
|
-
<DxcButton mode="secondary" label="
|
|
155
|
+
<Title title="With icon" theme="dark" level={4} />
|
|
156
|
+
<DxcButton mode="secondary" label="Primary" icon={iconSVG} />
|
|
84
157
|
</ExampleContainer>
|
|
85
|
-
|
|
86
|
-
<>
|
|
87
|
-
<Title title="Text" theme="light" level={2}/>
|
|
158
|
+
<Title title="Text" theme="dark" level={2} />
|
|
88
159
|
<ExampleContainer>
|
|
89
|
-
<Title title="Enabled" theme="
|
|
160
|
+
<Title title="Enabled" theme="dark" level={4} />
|
|
90
161
|
<DxcButton mode="text" label="Text enabled" />
|
|
91
162
|
</ExampleContainer>
|
|
92
163
|
<ExampleContainer pseudoState="pseudo-hover">
|
|
93
|
-
<Title title="Hovered" theme="
|
|
164
|
+
<Title title="Hovered" theme="dark" level={4} />
|
|
94
165
|
<DxcButton mode="text" label="Text hovered" />
|
|
95
166
|
</ExampleContainer>
|
|
96
167
|
<ExampleContainer pseudoState="pseudo-focus">
|
|
97
|
-
<Title title="Focused" theme="
|
|
168
|
+
<Title title="Focused" theme="dark" level={4} />
|
|
98
169
|
<DxcButton mode="text" label="Text focused" />
|
|
99
170
|
</ExampleContainer>
|
|
100
171
|
<ExampleContainer pseudoState="pseudo-active">
|
|
101
|
-
<Title title="Actived" theme="
|
|
172
|
+
<Title title="Actived" theme="dark" level={4} />
|
|
102
173
|
<DxcButton mode="text" label="Text actived" />
|
|
103
174
|
</ExampleContainer>
|
|
104
175
|
<ExampleContainer>
|
|
105
|
-
<Title title="Disabled" theme="
|
|
176
|
+
<Title title="Disabled" theme="dark" level={4} />
|
|
106
177
|
<DxcButton mode="text" label="Text disabled" disabled />
|
|
107
178
|
</ExampleContainer>
|
|
108
179
|
<ExampleContainer>
|
|
109
|
-
<Title title="With icon" theme="
|
|
110
|
-
<DxcButton
|
|
180
|
+
<Title title="With icon" theme="dark" level={4} />
|
|
181
|
+
<DxcButton mode="text" label="Primary" icon={iconSVG} />
|
|
111
182
|
</ExampleContainer>
|
|
112
|
-
</>
|
|
113
|
-
</>
|
|
114
|
-
<BackgroundColorProvider color="#333333">
|
|
115
|
-
<DarkContainer>
|
|
116
|
-
<>
|
|
117
|
-
<Title title="Primary" theme="dark" level={2}/>
|
|
118
|
-
<ExampleContainer>
|
|
119
|
-
<Title title="Enabled" theme="dark" level={4}/>
|
|
120
|
-
<DxcButton label="Primary enabled" />
|
|
121
|
-
</ExampleContainer>
|
|
122
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
123
|
-
<Title title="Hovered" theme="dark" level={4}/>
|
|
124
|
-
<DxcButton label="Primary hovered" />
|
|
125
|
-
</ExampleContainer>
|
|
126
|
-
<ExampleContainer pseudoState="pseudo-focus">
|
|
127
|
-
<Title title="Focused" theme="dark" level={4}/>
|
|
128
|
-
<DxcButton label="Primary focused" />
|
|
129
|
-
</ExampleContainer>
|
|
130
|
-
<ExampleContainer pseudoState="pseudo-active">
|
|
131
|
-
<Title title="Actived" theme="dark" level={4}/>
|
|
132
|
-
<DxcButton label="Primary actived" />
|
|
133
|
-
</ExampleContainer>
|
|
134
|
-
<ExampleContainer>
|
|
135
|
-
<Title title="Disabled" theme="dark" level={4}/>
|
|
136
|
-
<DxcButton label="Primary disabled" disabled />
|
|
137
|
-
</ExampleContainer>
|
|
138
|
-
<ExampleContainer>
|
|
139
|
-
<Title title="With icon" theme="dark" level={4}/>
|
|
140
|
-
<DxcButton label="Primary" icon={iconSVG} />
|
|
141
|
-
</ExampleContainer>
|
|
142
|
-
</>
|
|
143
|
-
<>
|
|
144
|
-
<Title title="Secondary" theme="dark" level={2}/>
|
|
145
|
-
<ExampleContainer>
|
|
146
|
-
<Title title="Enabled" theme="dark" level={4}/>
|
|
147
|
-
<DxcButton mode="secondary" label="Secondary enabled" />
|
|
148
|
-
</ExampleContainer>
|
|
149
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
150
|
-
<Title title="Hovered" theme="dark" level={4}/>
|
|
151
|
-
<DxcButton mode="secondary" label="Secondary hovered" />
|
|
152
|
-
</ExampleContainer>
|
|
153
|
-
<ExampleContainer pseudoState="pseudo-focus">
|
|
154
|
-
<Title title="Focused" theme="dark" level={4}/>
|
|
155
|
-
<DxcButton mode="secondary" label="Secondary focused" />
|
|
156
|
-
</ExampleContainer>
|
|
157
|
-
<ExampleContainer pseudoState="pseudo-active">
|
|
158
|
-
<Title title="Actived" theme="dark" level={4}/>
|
|
159
|
-
<DxcButton mode="secondary" label="Secondary actived" />
|
|
160
|
-
</ExampleContainer>
|
|
161
|
-
<ExampleContainer>
|
|
162
|
-
<Title title="Disabled" theme="dark" level={4}/>
|
|
163
|
-
<DxcButton mode="secondary" disabled label="Secondary disabled" />
|
|
164
|
-
</ExampleContainer>
|
|
165
|
-
<ExampleContainer>
|
|
166
|
-
<Title title="With icon" theme="dark" level={4}/>
|
|
167
|
-
<DxcButton mode="secondary" label="Primary" icon={iconSVG} />
|
|
168
|
-
</ExampleContainer>
|
|
169
|
-
</>
|
|
170
|
-
<>
|
|
171
|
-
<Title title="Text" theme="dark" level={2}/>
|
|
172
|
-
<ExampleContainer>
|
|
173
|
-
<Title title="Enabled" theme="dark" level={4}/>
|
|
174
|
-
<DxcButton mode="text" label="Text enabled" />
|
|
175
|
-
</ExampleContainer>
|
|
176
|
-
<ExampleContainer pseudoState="pseudo-hover">
|
|
177
|
-
<Title title="Hovered" theme="dark" level={4}/>
|
|
178
|
-
<DxcButton mode="text" label="Text hovered" />
|
|
179
|
-
</ExampleContainer>
|
|
180
|
-
<ExampleContainer pseudoState="pseudo-focus">
|
|
181
|
-
<Title title="Focused" theme="dark" level={4}/>
|
|
182
|
-
<DxcButton mode="text" label="Text focused" />
|
|
183
|
-
</ExampleContainer>
|
|
184
|
-
<ExampleContainer pseudoState="pseudo-active">
|
|
185
|
-
<Title title="Actived" theme="dark" level={4}/>
|
|
186
|
-
<DxcButton mode="text" label="Text actived" />
|
|
187
|
-
</ExampleContainer>
|
|
188
|
-
<ExampleContainer>
|
|
189
|
-
<Title title="Disabled" theme="dark" level={4}/>
|
|
190
|
-
<DxcButton mode="text" label="Text disabled" disabled />
|
|
191
|
-
</ExampleContainer>
|
|
192
|
-
<ExampleContainer>
|
|
193
|
-
<Title title="With icon" theme="dark" level={4}/>
|
|
194
|
-
<DxcButton mode="text" label="Primary" icon={iconSVG} />
|
|
195
|
-
</ExampleContainer>
|
|
196
|
-
</>
|
|
197
183
|
</DarkContainer>
|
|
198
184
|
</BackgroundColorProvider>
|
|
199
|
-
|
|
200
|
-
<
|
|
201
|
-
<
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
<
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
<
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
<
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
<
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
<
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
<
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
<
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
<
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
<
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
<
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
<
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
<
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
<
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
<
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
<
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
<
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
<
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
<
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
<
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
<
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
</ExampleContainer>
|
|
290
|
-
</>
|
|
185
|
+
<Title title="Sizes" theme="light" level={2} />
|
|
186
|
+
<ExampleContainer>
|
|
187
|
+
<Title title="Small size" theme="light" level={4} />
|
|
188
|
+
<DxcButton label="Small" size="small" />
|
|
189
|
+
</ExampleContainer>
|
|
190
|
+
<ExampleContainer>
|
|
191
|
+
<Title title="Medium size" theme="light" level={4} />
|
|
192
|
+
<DxcButton label="MediumSiz" size="medium" />
|
|
193
|
+
</ExampleContainer>
|
|
194
|
+
<ExampleContainer>
|
|
195
|
+
<Title title="Medium size with ellipsis" theme="light" level={4} />
|
|
196
|
+
<DxcButton label="MediumSize" size="medium" />
|
|
197
|
+
</ExampleContainer>
|
|
198
|
+
<ExampleContainer>
|
|
199
|
+
<Title title="Medium size icon after" theme="light" level={4} />
|
|
200
|
+
<DxcButton label="Mediu" iconPosition="after" icon={iconSVG} size="medium" />
|
|
201
|
+
</ExampleContainer>
|
|
202
|
+
<ExampleContainer>
|
|
203
|
+
<Title title="Medium size icon before" theme="light" level={4} />
|
|
204
|
+
<DxcButton label="Mediu" iconPosition="before" icon={iconSVG} size="medium" />
|
|
205
|
+
</ExampleContainer>
|
|
206
|
+
<ExampleContainer>
|
|
207
|
+
<Title title="Medium size icon after with ellipsis" theme="light" level={4} />
|
|
208
|
+
<DxcButton label="Medium" iconPosition="after" icon={iconSVG} size="medium" />
|
|
209
|
+
</ExampleContainer>
|
|
210
|
+
<ExampleContainer>
|
|
211
|
+
<Title title="Medium size icon before with ellipsis" theme="light" level={4} />
|
|
212
|
+
<DxcButton label="Medium" iconPosition="before" icon={iconSVG} size="medium" />
|
|
213
|
+
</ExampleContainer>
|
|
214
|
+
<ExampleContainer>
|
|
215
|
+
<Title title="Large size" theme="light" level={4} />
|
|
216
|
+
<DxcButton label="LargeSizePrimaryButtonEx" size="large" />
|
|
217
|
+
</ExampleContainer>
|
|
218
|
+
<ExampleContainer>
|
|
219
|
+
<Title title="Large size with ellipsis" theme="light" level={4} />
|
|
220
|
+
<DxcButton label="LargeSizePrimaryButtonExa" size="large" />
|
|
221
|
+
</ExampleContainer>
|
|
222
|
+
<ExampleContainer>
|
|
223
|
+
<Title title="Large size icon after" theme="light" level={4} />
|
|
224
|
+
<DxcButton label="LargeSizePrimaryButto" iconPosition="after" icon={iconSVG} size="large" />
|
|
225
|
+
</ExampleContainer>
|
|
226
|
+
<ExampleContainer>
|
|
227
|
+
<Title title="Large size icon before" theme="light" level={4} />
|
|
228
|
+
<DxcButton label="LargeSizePrimaryButto" iconPosition="before" icon={iconSVG} size="large" />
|
|
229
|
+
</ExampleContainer>
|
|
230
|
+
<ExampleContainer>
|
|
231
|
+
<Title title="Large size icon after with ellipsis" theme="light" level={4} />
|
|
232
|
+
<DxcButton label="LargeSizePrimaryButton" iconPosition="after" icon={iconSVG} size="large" />
|
|
233
|
+
</ExampleContainer>
|
|
234
|
+
<ExampleContainer>
|
|
235
|
+
<Title title="Large size icon before with ellipsis" theme="light" level={4} />
|
|
236
|
+
<DxcButton label="LargeSizePrimaryButton" iconPosition="before" icon={iconSVG} size="large" />
|
|
237
|
+
</ExampleContainer>
|
|
238
|
+
<ExampleContainer>
|
|
239
|
+
<Title title="FillParent size" theme="light" level={4} />
|
|
240
|
+
<DxcButton label="FillParent" size="fillParent" />
|
|
241
|
+
</ExampleContainer>
|
|
242
|
+
<ExampleContainer>
|
|
243
|
+
<Title title="FitContent size" theme="light" level={4} />
|
|
244
|
+
<DxcButton label="FitContent" size="fitContent" />
|
|
245
|
+
</ExampleContainer>
|
|
246
|
+
<Title title="Margins" theme="light" level={2} />
|
|
247
|
+
<ExampleContainer>
|
|
248
|
+
<Title title="Xxsmall margin" theme="light" level={4} />
|
|
249
|
+
<DxcButton label="Xxsmall margin" margin="xxsmall" />
|
|
250
|
+
</ExampleContainer>
|
|
251
|
+
<ExampleContainer>
|
|
252
|
+
<Title title="Xsmall margin" theme="light" level={4} />
|
|
253
|
+
<DxcButton label="Xsmall margin" margin="xsmall" />
|
|
254
|
+
</ExampleContainer>
|
|
255
|
+
<ExampleContainer>
|
|
256
|
+
<Title title="Small margin" theme="light" level={4} />
|
|
257
|
+
<DxcButton label="Small margin" margin="small" />
|
|
258
|
+
</ExampleContainer>
|
|
259
|
+
<ExampleContainer>
|
|
260
|
+
<Title title="Medium margin" theme="light" level={4} />
|
|
261
|
+
<DxcButton label="Medium margin" margin="medium" />
|
|
262
|
+
</ExampleContainer>
|
|
263
|
+
<ExampleContainer>
|
|
264
|
+
<Title title="Large margin" theme="light" level={4} />
|
|
265
|
+
<DxcButton label="Large margin" margin="large" />
|
|
266
|
+
</ExampleContainer>
|
|
267
|
+
<ExampleContainer>
|
|
268
|
+
<Title title="Xlarge margin" theme="light" level={4} />
|
|
269
|
+
<DxcButton label="Xlarge margin" margin="xlarge" />
|
|
270
|
+
</ExampleContainer>
|
|
271
|
+
<ExampleContainer>
|
|
272
|
+
<Title title="Xxlarge margin" theme="light" level={4} />
|
|
273
|
+
<DxcButton label="Xxlarge margin" margin="xxlarge" />
|
|
274
|
+
</ExampleContainer>
|
|
291
275
|
</>
|
|
292
276
|
);
|
|
293
|
-
|
package/button/types.d.ts
CHANGED
|
@@ -37,9 +37,9 @@ declare type Props = {
|
|
|
37
37
|
*/
|
|
38
38
|
iconSrc?: string;
|
|
39
39
|
/**
|
|
40
|
-
* This function will be called when the user clicks the button.
|
|
40
|
+
* This function will be called when the user clicks the button.
|
|
41
41
|
*/
|
|
42
|
-
onClick?: (
|
|
42
|
+
onClick?: () => void;
|
|
43
43
|
/**
|
|
44
44
|
* Size of the margin to be applied to the component ('xxsmall' | 'xsmall' | 'small' | 'medium' | 'large' | 'xlarge' | 'xxlarge').
|
|
45
45
|
* You can pass an object with 'top', 'bottom', 'left' and 'right' properties in order to specify different margin sizes.
|
package/card/Card.js
CHANGED
|
@@ -47,7 +47,7 @@ var DxcCard = function DxcCard(_ref) {
|
|
|
47
47
|
_ref$tabIndex = _ref.tabIndex,
|
|
48
48
|
tabIndex = _ref$tabIndex === void 0 ? 0 : _ref$tabIndex,
|
|
49
49
|
_ref$outlined = _ref.outlined,
|
|
50
|
-
outlined = _ref$outlined === void 0 ?
|
|
50
|
+
outlined = _ref$outlined === void 0 ? true : _ref$outlined,
|
|
51
51
|
children = _ref.children;
|
|
52
52
|
var colorsTheme = (0, _useTheme["default"])();
|
|
53
53
|
|
|
@@ -57,12 +57,11 @@ var DxcCard = function DxcCard(_ref) {
|
|
|
57
57
|
changeIsHovered = _useState2[1];
|
|
58
58
|
|
|
59
59
|
var tagContent = /*#__PURE__*/_react["default"].createElement(_Box["default"], {
|
|
60
|
-
shadowDepth: outlined ? 0 : isHovered && (onClick || linkHref) ? 2 : 1
|
|
60
|
+
shadowDepth: !outlined ? 0 : isHovered && (onClick || linkHref) ? 2 : 1
|
|
61
61
|
}, /*#__PURE__*/_react["default"].createElement(_styledComponents.ThemeProvider, {
|
|
62
62
|
theme: colorsTheme.card
|
|
63
63
|
}, /*#__PURE__*/_react["default"].createElement(CardContainer, {
|
|
64
64
|
hasAction: onClick || linkHref,
|
|
65
|
-
outlined: outlined,
|
|
66
65
|
imagePosition: imagePosition
|
|
67
66
|
}, imageSrc && /*#__PURE__*/_react["default"].createElement(ImageContainer, {
|
|
68
67
|
imageBgColor: imageBgColor
|
|
@@ -91,7 +90,7 @@ var DxcCard = function DxcCard(_ref) {
|
|
|
91
90
|
}, tagContent) || tagContent);
|
|
92
91
|
};
|
|
93
92
|
|
|
94
|
-
var StyledDxcCard = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n cursor: ", ";\n outline: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n"])), function (_ref2) {
|
|
93
|
+
var StyledDxcCard = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n display: inline-flex;\n cursor: ", ";\n outline: ", ";\n margin: ", ";\n margin-top: ", ";\n margin-right: ", ";\n margin-bottom: ", ";\n margin-left: ", ";\n\n :focus {\n outline: #0095ff auto 1px;\n }\n"])), function (_ref2) {
|
|
95
94
|
var hasAction = _ref2.hasAction;
|
|
96
95
|
return hasAction && "pointer" || "unset";
|
|
97
96
|
}, function (_ref3) {
|
|
@@ -126,7 +125,7 @@ var CardContainer = _styledComponents["default"].div(_templateObject2 || (_templ
|
|
|
126
125
|
return hasAction ? "" : "unset";
|
|
127
126
|
});
|
|
128
127
|
|
|
129
|
-
var StyledLink = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n cursor: pointer;\n text-decoration: none;\n"])));
|
|
128
|
+
var StyledLink = _styledComponents["default"].a(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2["default"])(["\n cursor: pointer;\n text-decoration: none;\n\n :focus {\n outline-color: #0095ff;\n }\n"])));
|
|
130
129
|
|
|
131
130
|
var TagImage = _styledComponents["default"].img(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n height: ", ";\n width: ", ";\n object-fit: ", ";\n"])), function (_ref11) {
|
|
132
131
|
var imagePadding = _ref11.imagePadding;
|