@indico-data/design-system 2.12.0 → 2.12.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/package.json
CHANGED
|
@@ -60,7 +60,7 @@ const meta: Meta = {
|
|
|
60
60
|
},
|
|
61
61
|
isRequired: {
|
|
62
62
|
control: 'boolean',
|
|
63
|
-
description: 'Toggles the required
|
|
63
|
+
description: 'Toggles the required asterisk on the label',
|
|
64
64
|
table: {
|
|
65
65
|
category: 'Props',
|
|
66
66
|
type: {
|
|
@@ -80,16 +80,16 @@ const meta: Meta = {
|
|
|
80
80
|
},
|
|
81
81
|
defaultValue: { summary: 'false' },
|
|
82
82
|
},
|
|
83
|
-
|
|
83
|
+
errorMessage: {
|
|
84
84
|
control: false,
|
|
85
|
-
description: '
|
|
85
|
+
description: 'Error message',
|
|
86
86
|
table: {
|
|
87
87
|
category: 'Props',
|
|
88
88
|
type: {
|
|
89
|
-
summary: 'string
|
|
89
|
+
summary: 'string',
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
|
-
defaultValue: { summary: '
|
|
92
|
+
defaultValue: { summary: '' },
|
|
93
93
|
},
|
|
94
94
|
helpText: {
|
|
95
95
|
control: 'text',
|
|
@@ -164,14 +164,14 @@ export const Default: Story = {
|
|
|
164
164
|
placeholder: 'Please enter a value',
|
|
165
165
|
hasHiddenLabel: false,
|
|
166
166
|
isDisabled: false,
|
|
167
|
-
|
|
167
|
+
errorMessage: '',
|
|
168
168
|
value: '',
|
|
169
169
|
},
|
|
170
170
|
render: (args) => {
|
|
171
171
|
const [value, setValue] = useState('');
|
|
172
172
|
|
|
173
173
|
useEffect(() => {
|
|
174
|
-
setValue(args.value);
|
|
174
|
+
setValue(args.value || '');
|
|
175
175
|
}, [args.value]);
|
|
176
176
|
|
|
177
177
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -184,13 +184,13 @@ export const Default: Story = {
|
|
|
184
184
|
export const Errors: Story = {
|
|
185
185
|
args: {
|
|
186
186
|
...defaultArgs,
|
|
187
|
-
|
|
187
|
+
errorMessage: 'You require a username value.',
|
|
188
188
|
},
|
|
189
189
|
render: (args) => {
|
|
190
190
|
const [value, setValue] = useState('');
|
|
191
191
|
|
|
192
192
|
useEffect(() => {
|
|
193
|
-
setValue(args.value);
|
|
193
|
+
setValue(args.value || '');
|
|
194
194
|
}, [args.value]);
|
|
195
195
|
|
|
196
196
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -210,7 +210,7 @@ export const HiddenLabel: Story = {
|
|
|
210
210
|
const [value, setValue] = useState('');
|
|
211
211
|
|
|
212
212
|
useEffect(() => {
|
|
213
|
-
setValue(args.value);
|
|
213
|
+
setValue(args.value || '');
|
|
214
214
|
}, [args.value]);
|
|
215
215
|
|
|
216
216
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -230,7 +230,7 @@ export const HelpText: Story = {
|
|
|
230
230
|
const [value, setValue] = useState('');
|
|
231
231
|
|
|
232
232
|
useEffect(() => {
|
|
233
|
-
setValue(args.value);
|
|
233
|
+
setValue(args.value || '');
|
|
234
234
|
}, [args.value]);
|
|
235
235
|
|
|
236
236
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -250,7 +250,7 @@ export const Clearable: Story = {
|
|
|
250
250
|
const [value, setValue] = useState('');
|
|
251
251
|
|
|
252
252
|
useEffect(() => {
|
|
253
|
-
setValue(args.value);
|
|
253
|
+
setValue(args.value || '');
|
|
254
254
|
}, [args.value]);
|
|
255
255
|
|
|
256
256
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -270,7 +270,7 @@ export const Icon: Story = {
|
|
|
270
270
|
const [value, setValue] = useState('');
|
|
271
271
|
|
|
272
272
|
useEffect(() => {
|
|
273
|
-
setValue(args.value);
|
|
273
|
+
setValue(args.value || '');
|
|
274
274
|
}, [args.value]);
|
|
275
275
|
|
|
276
276
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|
|
@@ -290,7 +290,7 @@ export const Required: Story = {
|
|
|
290
290
|
const [value, setValue] = useState('');
|
|
291
291
|
|
|
292
292
|
useEffect(() => {
|
|
293
|
-
setValue(args.value);
|
|
293
|
+
setValue(args.value || '');
|
|
294
294
|
}, [args.value]);
|
|
295
295
|
|
|
296
296
|
const handleChange = (e: { target: { value: SetStateAction<string> } }) => {
|