@bspk/ui 1.3.21 → 1.3.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.js +1 -1
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/accordion.css +19 -12
- package/dist/components/Accordion/accordion.css.js +19 -12
- package/dist/components/BottomNavigation/BottomNavigation.d.ts +0 -1
- package/dist/components/BottomNavigation/BottomNavigation.js +0 -1
- package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -1
- package/dist/components/BottomNavigation/bottom-navigation.css +1 -0
- package/dist/components/BottomNavigation/bottom-navigation.css.js +1 -0
- package/dist/components/Button/button.css +4 -0
- package/dist/components/Button/button.css.js +4 -0
- package/dist/components/Checkbox/Checkbox.js +3 -3
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +4 -5
- package/dist/components/CheckboxGroup/CheckboxGroup.js +8 -13
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js +5 -0
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css +5 -0
- package/dist/components/CheckboxGroup/checkbox-group.css.js +5 -0
- package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +3 -3
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js +6 -4
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +0 -1
- package/dist/components/ChipGroup/ChipGroup.js +0 -1
- package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/ChipGroup/chip-group.css +3 -0
- package/dist/components/ChipGroup/chip-group.css.js +3 -0
- package/dist/components/DatePicker/DatePicker.d.ts +4 -8
- package/dist/components/DatePicker/DatePicker.js +6 -18
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/DatePickerExample.js +3 -3
- package/dist/components/DatePicker/DatePickerExample.js.map +1 -1
- package/dist/components/DatePickerField/DatePickerField.d.ts +4 -4
- package/dist/components/DatePickerField/DatePickerField.js +6 -4
- package/dist/components/DatePickerField/DatePickerField.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +2 -3
- package/dist/components/Dialog/Dialog.js +2 -3
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +8 -5
- package/dist/components/Fab/Fab.js +8 -5
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/fab.css +1 -0
- package/dist/components/Fab/fab.css.js +1 -0
- package/dist/components/Field/Field.d.ts +39 -20
- package/dist/components/Field/Field.js +10 -40
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/Field/FieldExample.d.ts +1 -0
- package/dist/components/Field/FieldExample.js +10 -3
- package/dist/components/Field/FieldExample.js.map +1 -1
- package/dist/components/Field/Fieldset.d.ts +40 -0
- package/dist/components/Field/Fieldset.js +44 -0
- package/dist/components/Field/Fieldset.js.map +1 -0
- package/dist/components/Field/field.css +9 -7
- package/dist/components/Field/field.css.js +9 -7
- package/dist/components/Field/index.d.ts +1 -3
- package/dist/components/Field/index.js +1 -3
- package/dist/components/Field/index.js.map +1 -1
- package/dist/components/Field/utils.d.ts +8 -38
- package/dist/components/Field/utils.js +6 -33
- package/dist/components/Field/utils.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js.map +1 -1
- package/dist/components/Flex/Flex.d.ts +10 -6
- package/dist/components/Flex/Flex.js +10 -6
- package/dist/components/Flex/Flex.js.map +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +2 -2
- package/dist/components/InlineAlert/InlineAlert.js +2 -2
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
- package/dist/components/Input/Input.d.ts +59 -15
- package/dist/components/Input/Input.js +40 -25
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/InputExample.js +4 -4
- package/dist/components/Input/InputExample.js.map +1 -1
- package/dist/components/Input/index.d.ts +0 -1
- package/dist/components/Input/index.js +0 -1
- package/dist/components/Input/index.js.map +1 -1
- package/dist/components/InputField/InputField.d.ts +4 -4
- package/dist/components/InputField/InputField.js +6 -4
- package/dist/components/InputField/InputField.js.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +8 -7
- package/dist/components/InputNumber/InputNumber.js +9 -16
- package/dist/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/components/InputNumber/InputNumberExample.js +3 -3
- package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
- package/dist/components/InputNumber/input-number.css +1 -0
- package/dist/components/InputNumber/input-number.css.js +1 -0
- package/dist/components/InputNumberField/InputNumberField.d.ts +4 -4
- package/dist/components/InputNumberField/InputNumberField.js +6 -4
- package/dist/components/InputNumberField/InputNumberField.js.map +1 -1
- package/dist/components/InputPhone/InputPhone.d.ts +8 -8
- package/dist/components/InputPhone/InputPhone.js +12 -18
- package/dist/components/InputPhone/InputPhone.js.map +1 -1
- package/dist/components/InputPhone/InputPhoneExample.js +3 -3
- package/dist/components/InputPhone/InputPhoneExample.js.map +1 -1
- package/dist/components/InputPhone/input-phone.css +1 -0
- package/dist/components/InputPhone/input-phone.css.js +1 -0
- package/dist/components/InputPhoneField/InputPhoneField.d.ts +4 -4
- package/dist/components/InputPhoneField/InputPhoneField.js +6 -4
- package/dist/components/InputPhoneField/InputPhoneField.js.map +1 -1
- package/dist/components/Link/Link.d.ts +0 -1
- package/dist/components/Link/Link.js +0 -1
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/ListItem/list-item.css +1 -0
- package/dist/components/ListItem/list-item.css.js +1 -0
- package/dist/components/Modal/Modal.js +22 -26
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalExample.js +4 -1
- package/dist/components/Modal/ModalExample.js.map +1 -1
- package/dist/components/Modal/modal.css +4 -2
- package/dist/components/Modal/modal.css.js +4 -2
- package/dist/components/OTPInput/otp-input.css +1 -0
- package/dist/components/OTPInput/otp-input.css.js +1 -0
- package/dist/components/Pagination/Pagination.js +2 -2
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Password/Password.d.ts +9 -7
- package/dist/components/Password/Password.js +13 -17
- package/dist/components/Password/Password.js.map +1 -1
- package/dist/components/Password/PasswordExample.js +3 -3
- package/dist/components/Password/PasswordExample.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +4 -4
- package/dist/components/PasswordField/PasswordField.js +6 -4
- package/dist/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +0 -1
- package/dist/components/Popover/Popover.js +0 -1
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -2
- package/dist/components/RadioGroup/RadioGroup.js +5 -11
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.css +3 -0
- package/dist/components/RadioGroup/radio-group.css.js +3 -0
- package/dist/components/RadioGroupField/RadioGroupField.d.ts +3 -3
- package/dist/components/RadioGroupField/RadioGroupField.js +6 -4
- package/dist/components/RadioGroupField/RadioGroupField.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +0 -1
- package/dist/components/SearchBar/SearchBar.js +0 -1
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +0 -1
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/Select/Select.d.ts +7 -6
- package/dist/components/Select/Select.js +10 -15
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.js +3 -3
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/Select/select.css +0 -10
- package/dist/components/Select/select.css.js +0 -10
- package/dist/components/SelectField/SelectField.d.ts +4 -4
- package/dist/components/SelectField/SelectField.js +6 -4
- package/dist/components/SelectField/SelectField.js.map +1 -1
- package/dist/components/Slider/Slider.d.ts +1 -2
- package/dist/components/Slider/Slider.js +1 -2
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +0 -1
- package/dist/components/Snackbar/Snackbar.js +0 -1
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +0 -1
- package/dist/components/Switch/Switch.js +0 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +0 -1
- package/dist/components/TabGroup/TabGroup.js +0 -1
- package/dist/components/TabGroup/TabGroup.js.map +1 -1
- package/dist/components/TabList/TabList.d.ts +0 -1
- package/dist/components/TabList/TabList.js +0 -1
- package/dist/components/TabList/TabList.js.map +1 -1
- package/dist/components/TabList/tab-list.css +1 -0
- package/dist/components/TabList/tab-list.css.js +1 -0
- package/dist/components/Table/table.css +2 -1
- package/dist/components/Table/table.css.js +2 -1
- package/dist/components/Textarea/Textarea.d.ts +4 -7
- package/dist/components/Textarea/Textarea.js +5 -16
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/TextareaExample.js +3 -3
- package/dist/components/Textarea/TextareaExample.js.map +1 -1
- package/dist/components/TextareaField/TextareaField.d.ts +4 -4
- package/dist/components/TextareaField/TextareaField.js +6 -4
- package/dist/components/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +8 -6
- package/dist/components/TimePicker/TimePicker.js +10 -14
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePicker/TimePickerExample.js +3 -3
- package/dist/components/TimePicker/TimePickerExample.js.map +1 -1
- package/dist/components/TimePickerField/TimePickerField.d.ts +4 -4
- package/dist/components/TimePickerField/TimePickerField.js +6 -4
- package/dist/components/TimePickerField/TimePickerField.js.map +1 -1
- package/dist/hooks/useFloating.d.ts +0 -6
- package/dist/hooks/useFloating.js +0 -6
- package/dist/hooks/useFloating.js.map +1 -1
- package/dist/styles/base.css +71 -81
- package/dist/styles/base.css.js +71 -81
- package/dist/types/common.d.ts +3 -0
- package/dist/types/common.js.map +1 -1
- package/package.json +3 -4
- package/src/components/Accordion/Accordion.tsx +2 -2
- package/src/components/Accordion/accordion.scss +10 -1
- package/src/components/BottomNavigation/BottomNavigation.tsx +0 -1
- package/src/components/BottomNavigation/bottom-navigation.scss +1 -0
- package/src/components/Button/button.scss +4 -0
- package/src/components/Checkbox/Checkbox.tsx +3 -3
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +37 -52
- package/src/components/CheckboxGroup/CheckboxGroupExample.tsx +6 -0
- package/src/components/CheckboxGroup/checkbox-group.scss +6 -0
- package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +16 -11
- package/src/components/ChipGroup/ChipGroup.tsx +0 -1
- package/src/components/ChipGroup/chip-group.scss +4 -0
- package/src/components/DatePicker/DatePicker.tsx +9 -20
- package/src/components/DatePicker/DatePickerExample.tsx +3 -5
- package/src/components/DatePickerField/DatePickerField.rtl.test.tsx +1 -1
- package/src/components/DatePickerField/DatePickerField.tsx +11 -6
- package/src/components/Dialog/Dialog.tsx +2 -3
- package/src/components/Fab/Fab.tsx +8 -5
- package/src/components/Fab/fab.scss +1 -0
- package/src/components/Field/Field.rtl.test.tsx +8 -6
- package/src/components/Field/Field.tsx +71 -63
- package/src/components/Field/FieldExample.tsx +27 -5
- package/src/components/Field/Fieldset.tsx +82 -0
- package/src/components/Field/field.scss +27 -26
- package/src/components/Field/index.tsx +1 -3
- package/src/components/Field/utils.ts +15 -77
- package/src/components/FileUpload/FileUpload.tsx +1 -1
- package/src/components/FileUploadItem/FileUploadItem.tsx +1 -1
- package/src/components/Flex/Flex.tsx +10 -6
- package/src/components/InlineAlert/InlineAlert.rtl.test.tsx +1 -1
- package/src/components/InlineAlert/InlineAlert.tsx +3 -3
- package/src/components/Input/Input.tsx +135 -48
- package/src/components/Input/InputExample.tsx +4 -6
- package/src/components/Input/index.tsx +0 -1
- package/src/components/InputField/InputField.tsx +11 -6
- package/src/components/InputNumber/InputNumber.tsx +11 -16
- package/src/components/InputNumber/InputNumberExample.tsx +7 -4
- package/src/components/InputNumber/input-number.scss +1 -0
- package/src/components/InputNumberField/InputNumberField.tsx +11 -6
- package/src/components/InputPhone/InputPhone.tsx +14 -18
- package/src/components/InputPhone/InputPhoneExample.tsx +7 -6
- package/src/components/InputPhone/input-phone.scss +1 -0
- package/src/components/InputPhoneField/InputPhoneField.tsx +11 -6
- package/src/components/Link/Link.tsx +0 -1
- package/src/components/ListItem/list-item.scss +1 -0
- package/src/components/Modal/Modal.tsx +26 -30
- package/src/components/Modal/ModalExample.tsx +7 -2
- package/src/components/Modal/modal.scss +1 -1
- package/src/components/OTPInput/otp-input.scss +1 -0
- package/src/components/Pagination/Pagination.tsx +2 -2
- package/src/components/Password/Password.tsx +15 -17
- package/src/components/Password/PasswordExample.tsx +13 -5
- package/src/components/PasswordField/PasswordField.tsx +11 -6
- package/src/components/Popover/Popover.tsx +0 -1
- package/src/components/RadioGroup/RadioGroup.tsx +14 -20
- package/src/components/RadioGroup/radio-group.scss +4 -0
- package/src/components/RadioGroupField/RadioGroupField.tsx +16 -11
- package/src/components/SearchBar/SearchBar.tsx +0 -1
- package/src/components/SegmentedControl/SegmentedControl.tsx +0 -1
- package/src/components/Select/Select.tsx +13 -14
- package/src/components/Select/SelectExample.tsx +7 -4
- package/src/components/Select/select.scss +0 -12
- package/src/components/SelectField/SelectField.rtl.test.tsx +7 -18
- package/src/components/SelectField/SelectField.tsx +11 -6
- package/src/components/Slider/Slider.tsx +1 -2
- package/src/components/Snackbar/Snackbar.tsx +0 -1
- package/src/components/Switch/Switch.tsx +0 -1
- package/src/components/TabGroup/TabGroup.tsx +0 -1
- package/src/components/TabList/TabList.tsx +0 -1
- package/src/components/TabList/tab-list.scss +1 -0
- package/src/components/Table/table.scss +2 -1
- package/src/components/Textarea/Textarea.tsx +8 -17
- package/src/components/Textarea/TextareaExample.tsx +3 -5
- package/src/components/TextareaField/TextareaField.tsx +11 -6
- package/src/components/TimePicker/TimePicker.tsx +12 -15
- package/src/components/TimePicker/TimePickerExample.tsx +3 -5
- package/src/components/TimePickerField/TimePickerField.tsx +11 -6
- package/src/hooks/useFloating.ts +0 -6
- package/src/styles/base.scss +109 -87
- package/src/types/common.ts +9 -0
- package/dist/components/Field/FieldDescription.d.ts +0 -9
- package/dist/components/Field/FieldDescription.js +0 -13
- package/dist/components/Field/FieldDescription.js.map +0 -1
- package/dist/components/Field/FieldError.d.ts +0 -11
- package/dist/components/Field/FieldError.js +0 -14
- package/dist/components/Field/FieldError.js.map +0 -1
- package/dist/components/Field/FieldLabel.d.ts +0 -21
- package/dist/components/Field/FieldLabel.js +0 -14
- package/dist/components/Field/FieldLabel.js.map +0 -1
- package/dist/components/FormField/FormField.d.ts +0 -66
- package/dist/components/FormField/FormField.js +0 -31
- package/dist/components/FormField/FormField.js.map +0 -1
- package/dist/components/FormField/FormFieldExample.d.ts +0 -9
- package/dist/components/FormField/FormFieldExample.js +0 -99
- package/dist/components/FormField/FormFieldExample.js.map +0 -1
- package/dist/components/FormField/index.d.ts +0 -1
- package/dist/components/FormField/index.js +0 -2
- package/dist/components/FormField/index.js.map +0 -1
- package/dist/components/Input/InputElement.d.ts +0 -82
- package/dist/components/Input/InputElement.js +0 -64
- package/dist/components/Input/InputElement.js.map +0 -1
- package/dist/components/Link/link.css +0 -18
- package/dist/components/Link/link.css.js +0 -23
- package/src/components/Field/FieldDescription.tsx +0 -17
- package/src/components/Field/FieldError.tsx +0 -25
- package/src/components/Field/FieldLabel.tsx +0 -44
- package/src/components/FormField/FormField.rtl.test.tsx +0 -20
- package/src/components/FormField/FormField.tsx +0 -95
- package/src/components/FormField/FormFieldExample.tsx +0 -277
- package/src/components/FormField/index.tsx +0 -1
- package/src/components/Input/InputElement.tsx +0 -192
- package/src/components/Link/link.scss +0 -21
|
@@ -3,40 +3,30 @@ import { SvgClose } from '@bspk/icons/Close';
|
|
|
3
3
|
import { ReactNode, useMemo, useRef } from 'react';
|
|
4
4
|
import { Button, ButtonProps } from '-/components/Button';
|
|
5
5
|
import { DialogProps, Dialog } from '-/components/Dialog';
|
|
6
|
-
import { useDebounceCallback } from '-/hooks/useDebounceCallback';
|
|
7
6
|
import { useEventListener } from '-/hooks/useEventListener';
|
|
8
7
|
import { useUIContext } from '-/hooks/useUIContext';
|
|
9
8
|
import { CallToActionButton } from '-/types/common';
|
|
10
9
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
const
|
|
16
|
-
if (!
|
|
17
|
-
|
|
18
|
-
|
|
10
|
+
function useMatchParentHeight() {
|
|
11
|
+
const elementRef = useRef<HTMLDivElement | null>(null);
|
|
12
|
+
const updateHeight = () => {
|
|
13
|
+
const element = elementRef.current;
|
|
14
|
+
const parentElement = element?.parentElement;
|
|
15
|
+
if (!element || !parentElement) return;
|
|
16
|
+
// Reset height to allow shrinking or growing
|
|
17
|
+
element.style.height = '';
|
|
18
|
+
// Apply new height on next frame
|
|
19
|
+
requestAnimationFrame(() => {
|
|
20
|
+
element.style.height = `${parentElement.clientHeight}px`;
|
|
21
|
+
});
|
|
19
22
|
};
|
|
20
|
-
|
|
21
|
-
useEventListener('
|
|
22
|
-
|
|
23
|
-
const modalRefs = useRef<{
|
|
24
|
-
dialogBox: HTMLDivElement | null;
|
|
25
|
-
modal: HTMLDivElement | null;
|
|
26
|
-
} | null>(null);
|
|
23
|
+
useEventListener('resize', updateHeight);
|
|
24
|
+
useEventListener('orientationchange', updateHeight);
|
|
27
25
|
|
|
28
26
|
return {
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const modal = node.querySelector<HTMLDivElement>('[data-bspk="modal"]');
|
|
33
|
-
modalRefs.current = {
|
|
34
|
-
dialogBox,
|
|
35
|
-
modal,
|
|
36
|
-
};
|
|
37
|
-
if (!dialogBox || !modal) return;
|
|
38
|
-
modal.style.height = `${dialogBox.offsetHeight}px`;
|
|
39
|
-
modal.style.visibility = '';
|
|
27
|
+
setElement: (el: HTMLDivElement | null) => {
|
|
28
|
+
elementRef.current = el;
|
|
29
|
+
updateHeight();
|
|
40
30
|
},
|
|
41
31
|
};
|
|
42
32
|
}
|
|
@@ -168,7 +158,7 @@ export function Modal({
|
|
|
168
158
|
return nextButtons;
|
|
169
159
|
}, [callToAction, cancelButton, dialogProps.onClose, isMobile]);
|
|
170
160
|
|
|
171
|
-
const {
|
|
161
|
+
const { setElement } = useMatchParentHeight();
|
|
172
162
|
|
|
173
163
|
return (
|
|
174
164
|
<Dialog
|
|
@@ -176,11 +166,16 @@ export function Modal({
|
|
|
176
166
|
aria-description={description}
|
|
177
167
|
aria-label={header}
|
|
178
168
|
disableFocusTrap={disableFocusTrap}
|
|
179
|
-
innerRef={setModalRefs}
|
|
180
169
|
placement="center"
|
|
181
170
|
showScrim
|
|
182
171
|
>
|
|
183
|
-
<div
|
|
172
|
+
<div
|
|
173
|
+
data-bspk="modal"
|
|
174
|
+
ref={(node) => {
|
|
175
|
+
innerRef?.(node);
|
|
176
|
+
setElement(node);
|
|
177
|
+
}}
|
|
178
|
+
>
|
|
184
179
|
<div data-modal-header>
|
|
185
180
|
<div data-modal-title>{header}</div>
|
|
186
181
|
<Button
|
|
@@ -188,6 +183,7 @@ export function Modal({
|
|
|
188
183
|
iconOnly
|
|
189
184
|
label="close"
|
|
190
185
|
onClick={dialogProps.onClose}
|
|
186
|
+
size={isMobile ? 'medium' : 'small'}
|
|
191
187
|
variant="tertiary"
|
|
192
188
|
/>
|
|
193
189
|
</div>
|
|
@@ -47,7 +47,12 @@ export const ModalExample: ComponentExampleFn<ModalProps> = ({ action }) => ({
|
|
|
47
47
|
header: 'Header Only',
|
|
48
48
|
description: 'This modal has no buttons.',
|
|
49
49
|
children: (
|
|
50
|
-
|
|
50
|
+
<div
|
|
51
|
+
style={{
|
|
52
|
+
display: 'flex',
|
|
53
|
+
flexDirection: 'column',
|
|
54
|
+
}}
|
|
55
|
+
>
|
|
51
56
|
<p>
|
|
52
57
|
This is a demo of a scrolling modal. Most modals won't scroll but mobile uses modals as
|
|
53
58
|
dropdowns which may have more items than can fit in the screen.
|
|
@@ -63,7 +68,7 @@ export const ModalExample: ComponentExampleFn<ModalProps> = ({ action }) => ({
|
|
|
63
68
|
trailing={<Checkbox aria-label="" name="" onChange={() => {}} value="" />}
|
|
64
69
|
/>
|
|
65
70
|
))}
|
|
66
|
-
|
|
71
|
+
</div>
|
|
67
72
|
),
|
|
68
73
|
},
|
|
69
74
|
},
|
|
@@ -3,7 +3,7 @@ import { SvgIcon } from '@bspk/icons/SvgIcon';
|
|
|
3
3
|
import { AriaAttributes, useEffect, useState } from 'react';
|
|
4
4
|
import { PageList } from './PageList';
|
|
5
5
|
import { Button } from '-/components/Button';
|
|
6
|
-
import {
|
|
6
|
+
import { Input } from '-/components/Input';
|
|
7
7
|
import { sendAriaLiveMessage } from '-/utils/sendAriaLiveMessage';
|
|
8
8
|
|
|
9
9
|
// After this point the manual input renders. With equal or fewer pages the individual page buttons render instead.
|
|
@@ -104,7 +104,7 @@ export function Pagination({
|
|
|
104
104
|
submitInputChange();
|
|
105
105
|
}}
|
|
106
106
|
>
|
|
107
|
-
<
|
|
107
|
+
<Input
|
|
108
108
|
name="page-number"
|
|
109
109
|
onBlur={() => submitInputChange()}
|
|
110
110
|
onChange={setInputValue}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import './password.scss';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Button } from '-/components/Button';
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
4
|
+
import { Input, InputProps } from '-/components/Input';
|
|
5
|
+
import { useId } from '-/hooks/useId';
|
|
6
6
|
import { FieldControlProps } from '-/types/common';
|
|
7
7
|
|
|
8
8
|
export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef' | 'inputProps' | 'inputRef' | 'size'>;
|
|
@@ -13,23 +13,25 @@ export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef'
|
|
|
13
13
|
* For a more complete example with field usage, see the PasswordField component.
|
|
14
14
|
*
|
|
15
15
|
* @example
|
|
16
|
-
* import { Password } from '
|
|
17
|
-
* import { Field, FieldLabel, FieldDescription } from '-/components/Field';
|
|
16
|
+
* import { Password } from '-/components/Password';
|
|
18
17
|
*
|
|
19
18
|
* () => {
|
|
20
19
|
* const [value, setValue] = useState<string | undefined>('');
|
|
21
20
|
*
|
|
22
21
|
* return (
|
|
23
|
-
* <div
|
|
24
|
-
* <Field
|
|
25
|
-
*
|
|
22
|
+
* <div>
|
|
23
|
+
* <Field
|
|
24
|
+
* controlId="example-password"
|
|
25
|
+
* helperText="The password field allows you to enter a secure password."
|
|
26
|
+
* label="Password"
|
|
27
|
+
* >
|
|
26
28
|
* <Password
|
|
27
29
|
* aria-label="password"
|
|
30
|
+
* id="example-password"
|
|
28
31
|
* name="password"
|
|
29
32
|
* onChange={(next) => setValue(next)}
|
|
30
33
|
* value={value}
|
|
31
34
|
* />
|
|
32
|
-
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
33
35
|
* </Field>
|
|
34
36
|
* </div>
|
|
35
37
|
* );
|
|
@@ -45,20 +47,16 @@ export function Password({
|
|
|
45
47
|
onChange,
|
|
46
48
|
required = false,
|
|
47
49
|
containerRef,
|
|
48
|
-
invalid
|
|
50
|
+
invalid = false,
|
|
49
51
|
readOnly,
|
|
50
52
|
disabled,
|
|
51
53
|
id: idProp,
|
|
52
54
|
'aria-label': ariaLabel,
|
|
55
|
+
'aria-describedby': ariaDescribedBy,
|
|
56
|
+
'aria-errormessage': ariaErrorMessage,
|
|
53
57
|
...props
|
|
54
58
|
}: PasswordProps) {
|
|
55
|
-
const
|
|
56
|
-
idProp,
|
|
57
|
-
required,
|
|
58
|
-
disabled,
|
|
59
|
-
readOnly,
|
|
60
|
-
invalidProp,
|
|
61
|
-
});
|
|
59
|
+
const id = useId(idProp);
|
|
62
60
|
|
|
63
61
|
const [isShowingPassword, setIsShowingPassword] = useState(false);
|
|
64
62
|
|
|
@@ -68,7 +66,7 @@ export function Password({
|
|
|
68
66
|
};
|
|
69
67
|
|
|
70
68
|
return (
|
|
71
|
-
<
|
|
69
|
+
<Input
|
|
72
70
|
{...props}
|
|
73
71
|
aria-describedby={ariaDescribedBy}
|
|
74
72
|
aria-errormessage={ariaErrorMessage}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { useState } from 'react';
|
|
2
2
|
import { Password, PasswordProps } from '.';
|
|
3
|
-
import { Field
|
|
3
|
+
import { Field } from '-/components/Field';
|
|
4
4
|
import { ComponentExample } from '-/utils/demo';
|
|
5
5
|
|
|
6
6
|
export const PasswordExample: ComponentExample<PasswordProps> = {
|
|
@@ -15,10 +15,18 @@ export const Usage = () => {
|
|
|
15
15
|
|
|
16
16
|
return (
|
|
17
17
|
<div>
|
|
18
|
-
<Field
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
<Field
|
|
19
|
+
controlId="example-password"
|
|
20
|
+
helperText="The password field allows you to enter a secure password."
|
|
21
|
+
label="Password"
|
|
22
|
+
>
|
|
23
|
+
<Password
|
|
24
|
+
aria-label="password"
|
|
25
|
+
id="example-password"
|
|
26
|
+
name="password"
|
|
27
|
+
onChange={(next) => setValue(next)}
|
|
28
|
+
value={value}
|
|
29
|
+
/>
|
|
22
30
|
</Field>
|
|
23
31
|
</div>
|
|
24
32
|
);
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Field, ComposedFieldProps, propsWithAria } from '-/components/Field';
|
|
2
2
|
import { Password, PasswordProps } from '-/components/Password';
|
|
3
|
+
import { useId } from '-/hooks/useId';
|
|
3
4
|
|
|
4
|
-
export type PasswordFieldProps =
|
|
5
|
+
export type PasswordFieldProps = ComposedFieldProps<PasswordProps>;
|
|
5
6
|
|
|
6
7
|
/**
|
|
7
8
|
* A field wrapper for the Password component.
|
|
@@ -9,7 +10,7 @@ export type PasswordFieldProps = FormFieldControlProps<PasswordProps>;
|
|
|
9
10
|
* This component takes properties from the FormField and Password components.
|
|
10
11
|
*
|
|
11
12
|
* @name PasswordField
|
|
12
|
-
* @phase
|
|
13
|
+
* @phase UXReview
|
|
13
14
|
*
|
|
14
15
|
* @generated
|
|
15
16
|
*/
|
|
@@ -19,18 +20,22 @@ export function PasswordField({
|
|
|
19
20
|
labelTrailing,
|
|
20
21
|
errorMessage,
|
|
21
22
|
style,
|
|
23
|
+
id: idProp,
|
|
22
24
|
...controlProps
|
|
23
25
|
}: PasswordFieldProps) {
|
|
26
|
+
const id = useId(idProp);
|
|
24
27
|
return (
|
|
25
|
-
<
|
|
28
|
+
<Field
|
|
29
|
+
controlId={id}
|
|
26
30
|
errorMessage={errorMessage}
|
|
27
31
|
helperText={helperText}
|
|
28
32
|
label={label}
|
|
29
33
|
labelTrailing={labelTrailing}
|
|
34
|
+
required={controlProps.required}
|
|
30
35
|
style={style}
|
|
31
36
|
>
|
|
32
|
-
<Password {...controlProps} />
|
|
33
|
-
</
|
|
37
|
+
<Password {...propsWithAria({ id, controlProps, errorMessage, helperText })} />
|
|
38
|
+
</Field>
|
|
34
39
|
);
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -56,7 +56,6 @@ export type PopoverProps = CommonProps<'disabled'> &
|
|
|
56
56
|
* Brief message that provide additional guidance and helps users perform an action if needed.
|
|
57
57
|
*
|
|
58
58
|
* @example
|
|
59
|
-
* import { useState } from 'react';
|
|
60
59
|
* import { Popover } from '@bspk/ui/Popover';
|
|
61
60
|
* import { Button } from '@bspk/ui/Button';
|
|
62
61
|
*
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './radio-group.scss';
|
|
2
|
-
import { useFieldInit } from '-/components/Field';
|
|
3
2
|
import { RadioProps } from '-/components/Radio';
|
|
4
3
|
import { RadioOption, RadioOptionProps } from '-/components/RadioOption';
|
|
4
|
+
import { useId } from '-/hooks/useId';
|
|
5
5
|
import { ElementProps, FieldControlProps } from '-/types/common';
|
|
6
6
|
|
|
7
7
|
export type RadioGroupOption = Pick<RadioOptionProps, 'checked' | 'description' | 'disabled' | 'label'> &
|
|
@@ -37,7 +37,6 @@ export type RadioGroupProps = Omit<FieldControlProps, 'readOnly'> & {
|
|
|
37
37
|
* For a more complete example with field usage, see the RadioGroupField component.
|
|
38
38
|
*
|
|
39
39
|
* @example
|
|
40
|
-
* import { useState } from 'react';
|
|
41
40
|
* import { RadioGroup } from '@bspk/ui/RadioGroup';
|
|
42
41
|
*
|
|
43
42
|
* () => {
|
|
@@ -68,45 +67,40 @@ export function RadioGroup({
|
|
|
68
67
|
onChange,
|
|
69
68
|
options = [],
|
|
70
69
|
name,
|
|
71
|
-
value
|
|
70
|
+
value,
|
|
72
71
|
disabled = false,
|
|
73
|
-
invalid: invalidProp,
|
|
74
72
|
required,
|
|
73
|
+
invalid = false,
|
|
75
74
|
id: idProp,
|
|
76
|
-
'aria-describedby':
|
|
77
|
-
'aria-errormessage':
|
|
75
|
+
'aria-describedby': ariaDescribedBy,
|
|
76
|
+
'aria-errormessage': ariaErrorMessage,
|
|
78
77
|
...props
|
|
79
78
|
}: ElementProps<RadioGroupProps, 'div'>) {
|
|
80
|
-
const
|
|
81
|
-
idProp,
|
|
82
|
-
required,
|
|
83
|
-
disabled,
|
|
84
|
-
invalidProp,
|
|
85
|
-
});
|
|
79
|
+
const id = useId(idProp);
|
|
86
80
|
|
|
87
81
|
return (
|
|
88
82
|
<div
|
|
89
83
|
{...props}
|
|
90
|
-
aria-describedby={
|
|
84
|
+
aria-describedby={ariaDescribedBy || undefined}
|
|
91
85
|
data-bspk="radio-group"
|
|
92
86
|
id={id}
|
|
93
87
|
role="radiogroup"
|
|
94
88
|
>
|
|
95
|
-
{options.map(({ label, description, value, ...option }
|
|
89
|
+
{options.map(({ label, description, value: optionValue, ...option }) => {
|
|
96
90
|
return (
|
|
97
91
|
<RadioOption
|
|
98
|
-
aria-describedby={
|
|
99
|
-
aria-errormessage={
|
|
100
|
-
checked={
|
|
92
|
+
aria-describedby={ariaDescribedBy || undefined}
|
|
93
|
+
aria-errormessage={ariaErrorMessage || undefined}
|
|
94
|
+
checked={value === optionValue}
|
|
101
95
|
description={description}
|
|
102
96
|
disabled={disabled || option.disabled}
|
|
103
97
|
invalid={invalid || undefined}
|
|
104
|
-
key={
|
|
98
|
+
key={optionValue}
|
|
105
99
|
label={label}
|
|
106
100
|
name={name}
|
|
107
|
-
onChange={(checked) => checked && onChange(
|
|
101
|
+
onChange={(checked) => checked && onChange(optionValue)}
|
|
108
102
|
required={required}
|
|
109
|
-
value={
|
|
103
|
+
value={optionValue}
|
|
110
104
|
/>
|
|
111
105
|
);
|
|
112
106
|
})}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FormFieldControlProps } from '-/components/FormField';
|
|
1
|
+
import { ComposedFieldProps, Fieldset, propsWithAria } from '-/components/Field';
|
|
3
2
|
import { RadioGroup, RadioGroupProps } from '-/components/RadioGroup';
|
|
3
|
+
import { useId } from '-/hooks/useId';
|
|
4
4
|
|
|
5
|
-
export type RadioGroupFieldProps =
|
|
5
|
+
export type RadioGroupFieldProps = ComposedFieldProps<RadioGroupProps>;
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A field wrapper for the RadioGroup component.
|
|
@@ -20,17 +20,22 @@ export function RadioGroupField({
|
|
|
20
20
|
labelTrailing,
|
|
21
21
|
errorMessage,
|
|
22
22
|
style,
|
|
23
|
+
id: idProp,
|
|
23
24
|
...controlProps
|
|
24
25
|
}: RadioGroupFieldProps) {
|
|
26
|
+
const id = useId(idProp);
|
|
25
27
|
return (
|
|
26
|
-
<
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
{
|
|
32
|
-
{
|
|
33
|
-
|
|
28
|
+
<Fieldset
|
|
29
|
+
controlId={id}
|
|
30
|
+
errorMessage={errorMessage}
|
|
31
|
+
helperText={helperText}
|
|
32
|
+
label={label}
|
|
33
|
+
labelTrailing={labelTrailing}
|
|
34
|
+
required={controlProps.required}
|
|
35
|
+
style={style}
|
|
36
|
+
>
|
|
37
|
+
<RadioGroup {...propsWithAria({ id, controlProps, errorMessage, helperText })} />
|
|
38
|
+
</Fieldset>
|
|
34
39
|
);
|
|
35
40
|
}
|
|
36
41
|
|
|
@@ -69,7 +69,6 @@ export type SearchBarProps<O extends SearchBarOption = SearchBarOption> = Omit<
|
|
|
69
69
|
* An input field that allows customers to input search queries and retrieve results.
|
|
70
70
|
*
|
|
71
71
|
* @example
|
|
72
|
-
* import { useState } from 'react';
|
|
73
72
|
* import { SearchBar } from '@bspk/ui/SearchBar';
|
|
74
73
|
*
|
|
75
74
|
* () => {
|
|
@@ -9,7 +9,6 @@ export type SegmentedControlProps = TabListProps<SegmentedControlOption>;
|
|
|
9
9
|
* Navigation tool that organizes content across different screens and views.
|
|
10
10
|
*
|
|
11
11
|
* @example
|
|
12
|
-
* import { useState } from 'react';
|
|
13
12
|
* import { SegmentedControl } from '@bspk/ui/SegmentedControl';
|
|
14
13
|
*
|
|
15
14
|
* () => {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import './select.scss';
|
|
2
2
|
import { SvgKeyboardArrowDown } from '@bspk/icons/KeyboardArrowDown';
|
|
3
3
|
import { useMemo, KeyboardEvent, MouseEvent } from 'react';
|
|
4
|
-
import { useFieldInit } from '-/components/Field';
|
|
5
4
|
import { ListItem, ListItemProps } from '-/components/ListItem';
|
|
6
5
|
import { Menu, MenuProps } from '-/components/Menu';
|
|
7
6
|
import { useArrowNavigation } from '-/hooks/useArrowNavigation';
|
|
8
7
|
import { useFloating } from '-/hooks/useFloating';
|
|
8
|
+
import { useId } from '-/hooks/useId';
|
|
9
9
|
import { useOutsideClick } from '-/hooks/useOutsideClick';
|
|
10
10
|
import { CommonProps, ElementProps, FieldControlProps } from '-/types/common';
|
|
11
11
|
import { getElementById } from '-/utils/dom';
|
|
@@ -82,9 +82,13 @@ export type SelectProps = CommonProps<'size'> &
|
|
|
82
82
|
*
|
|
83
83
|
* return (
|
|
84
84
|
* <div style={{ width: 320 }}>
|
|
85
|
-
* <Field
|
|
86
|
-
*
|
|
85
|
+
* <Field
|
|
86
|
+
* controlId="example-select"
|
|
87
|
+
* helperText="The select allows you to choose one option from a list of options."
|
|
88
|
+
* label="Select an option"
|
|
89
|
+
* >
|
|
87
90
|
* <Select
|
|
91
|
+
* id="example-select"
|
|
88
92
|
* name="example-select"
|
|
89
93
|
* onChange={setSelected}
|
|
90
94
|
* options={OPTIONS}
|
|
@@ -93,9 +97,6 @@ export type SelectProps = CommonProps<'size'> &
|
|
|
93
97
|
* size="medium"
|
|
94
98
|
* value={selected}
|
|
95
99
|
* />
|
|
96
|
-
* <FieldDescription>
|
|
97
|
-
* The select allows you to choose one option from a list of options.
|
|
98
|
-
* </FieldDescription>
|
|
99
100
|
* </Field>
|
|
100
101
|
* </div>
|
|
101
102
|
* );
|
|
@@ -112,22 +113,19 @@ export function Select({
|
|
|
112
113
|
size = 'medium',
|
|
113
114
|
disabled,
|
|
114
115
|
id: idProp,
|
|
115
|
-
invalid
|
|
116
|
+
invalid = false,
|
|
116
117
|
readOnly,
|
|
117
118
|
name,
|
|
118
119
|
scrollLimit,
|
|
119
120
|
required = false,
|
|
120
121
|
'aria-label': ariaLabel,
|
|
121
122
|
menuWidth,
|
|
123
|
+
'aria-describedby': ariaDescribedBy,
|
|
124
|
+
'aria-errormessage': ariaErrorMessage,
|
|
122
125
|
...elementProps
|
|
123
126
|
}: ElementProps<SelectProps, 'button'>) {
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
required,
|
|
127
|
-
disabled,
|
|
128
|
-
readOnly,
|
|
129
|
-
invalidProp,
|
|
130
|
-
});
|
|
127
|
+
const id = useId(idProp);
|
|
128
|
+
|
|
131
129
|
const menuId = useMemo(() => `${id}-menu`, [id]);
|
|
132
130
|
|
|
133
131
|
const { items, availableItems } = useMemo(() => {
|
|
@@ -188,6 +186,7 @@ export function Select({
|
|
|
188
186
|
aria-expanded={open}
|
|
189
187
|
aria-haspopup="listbox"
|
|
190
188
|
aria-readonly={readOnly || undefined}
|
|
189
|
+
aria-required={required || undefined}
|
|
191
190
|
data-bspk="select"
|
|
192
191
|
data-invalid={invalid || undefined}
|
|
193
192
|
data-open={open || undefined}
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { Select, SelectProps } from '.';
|
|
4
4
|
import { Avatar } from '-/components/Avatar';
|
|
5
|
-
import { Field
|
|
5
|
+
import { Field } from '-/components/Field';
|
|
6
6
|
import { Tag } from '-/components/Tag';
|
|
7
7
|
import { Txt } from '-/components/Txt';
|
|
8
8
|
import { ComponentExample, Preset } from '-/utils/demo';
|
|
@@ -180,9 +180,13 @@ export const Usage = () => {
|
|
|
180
180
|
|
|
181
181
|
return (
|
|
182
182
|
<div style={{ width: 320 }}>
|
|
183
|
-
<Field
|
|
184
|
-
|
|
183
|
+
<Field
|
|
184
|
+
controlId="example-select"
|
|
185
|
+
helperText="The select allows you to choose one option from a list of options."
|
|
186
|
+
label="Select an option"
|
|
187
|
+
>
|
|
185
188
|
<Select
|
|
189
|
+
id="example-select"
|
|
186
190
|
name="example-select"
|
|
187
191
|
onChange={setSelected}
|
|
188
192
|
options={OPTIONS}
|
|
@@ -191,7 +195,6 @@ export const Usage = () => {
|
|
|
191
195
|
size="medium"
|
|
192
196
|
value={selected}
|
|
193
197
|
/>
|
|
194
|
-
<FieldDescription>The select allows you to choose one option from a list of options.</FieldDescription>
|
|
195
198
|
</Field>
|
|
196
199
|
</div>
|
|
197
200
|
);
|
|
@@ -46,18 +46,6 @@
|
|
|
46
46
|
color: var(--select-text-color);
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
[data-icon] {
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
justify-content: center;
|
|
53
|
-
pointer-events: none;
|
|
54
|
-
|
|
55
|
-
svg {
|
|
56
|
-
transform: rotate(90deg);
|
|
57
|
-
width: var(--select-icon-width);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
49
|
&[data-size='small'] {
|
|
62
50
|
--select-height: var(--spacing-sizing-08);
|
|
63
51
|
--select-font: var(--body-small);
|
|
@@ -1,28 +1,17 @@
|
|
|
1
|
-
import { SelectField
|
|
2
|
-
import { presets } from '-/components/Select/SelectExample';
|
|
1
|
+
import { SelectField } from '.';
|
|
3
2
|
import { hasNoBasicA11yIssues } from '-/rtl/hasNoBasicA11yIssues';
|
|
4
3
|
import { render } from '-/rtl/util';
|
|
5
4
|
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
};
|
|
10
|
-
|
|
11
|
-
const TestBed = (props: SelectFieldProps) => <SelectField {...props} placeholder="SelectField an option" />;
|
|
5
|
+
const TestBed = () => (
|
|
6
|
+
<SelectField label="Example field label" name="example-field-name" onChange={() => {}} options={[]} value="" />
|
|
7
|
+
);
|
|
12
8
|
|
|
13
9
|
describe('SelectField (RTL)', () => {
|
|
14
|
-
|
|
15
|
-
it(
|
|
16
|
-
`has no basic a11y issues - ${preset.label}`,
|
|
17
|
-
hasNoBasicA11yIssues(<TestBed label={preset.label} {...preset.propState} {...nonPresetProps} />),
|
|
18
|
-
);
|
|
19
|
-
});
|
|
10
|
+
it('has no basic a11y issues', hasNoBasicA11yIssues(<TestBed />));
|
|
20
11
|
|
|
21
12
|
it('renders', () => {
|
|
22
|
-
const {
|
|
23
|
-
<TestBed label={presets[0].label} {...presets[0].propState} {...nonPresetProps} />,
|
|
24
|
-
);
|
|
13
|
+
const { getAllByLabelText } = render(<TestBed />);
|
|
25
14
|
|
|
26
|
-
expect(
|
|
15
|
+
expect(getAllByLabelText('Example field label')[0]).toBeInTheDocument();
|
|
27
16
|
});
|
|
28
17
|
});
|