@bspk/ui 1.3.3 → 1.3.4
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/build.ts +41 -10
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +4 -23
- package/dist/components/Breadcrumb/Breadcrumb.js +3 -7
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/BreadcumbDropdown.d.ts +27 -0
- package/dist/components/Breadcrumb/BreadcumbDropdown.js +68 -0
- package/dist/components/Breadcrumb/BreadcumbDropdown.js.map +1 -0
- package/dist/components/Button/Button.d.ts +5 -1
- package/dist/components/Button/Button.js +2 -2
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/button.css +5 -5
- package/dist/components/Button/button.css.js +5 -5
- package/dist/components/Calendar/Calendar.d.ts +33 -0
- package/dist/components/{CalendarPicker/CalendarPicker.js → Calendar/Calendar.js} +30 -34
- package/dist/components/Calendar/Calendar.js.map +1 -0
- package/dist/components/Calendar/CalendarExample.d.ts +4 -0
- package/dist/components/Calendar/CalendarExample.js +29 -0
- package/dist/components/Calendar/CalendarExample.js.map +1 -0
- package/dist/components/{CalendarPicker/calendar-picker.css → Calendar/calendar.css} +16 -16
- package/dist/components/{CalendarPicker/calendar-picker.css.js → Calendar/calendar.css.js} +16 -16
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/index.js +2 -0
- package/dist/components/Calendar/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +5 -3
- package/dist/components/Checkbox/Checkbox.js +2 -2
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +6 -25
- package/dist/components/CheckboxGroup/CheckboxGroup.js +15 -5
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js +3 -0
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css +7 -0
- package/dist/components/{DateField/date-field.css.js → CheckboxGroup/checkbox-group.css.js} +4 -5
- package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +15 -0
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js +17 -0
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js.map +1 -0
- package/dist/components/CheckboxGroupField/index.d.ts +1 -0
- package/dist/components/CheckboxGroupField/index.js +2 -0
- package/dist/components/CheckboxGroupField/index.js.map +1 -0
- package/dist/components/{ChipUtility/ChipUtility.d.ts → Chip/Chip.d.ts} +6 -6
- package/dist/components/Chip/Chip.js +25 -0
- package/dist/components/Chip/Chip.js.map +1 -0
- package/dist/components/Chip/ChipExample.d.ts +4 -0
- package/dist/components/{ChipUtility/ChipUtilityExample.js → Chip/ChipExample.js} +2 -2
- package/dist/components/Chip/ChipExample.js.map +1 -0
- package/dist/components/{ChipUtility/chip-utility.css → Chip/chip.css} +10 -10
- package/dist/components/{ChipUtility/chip-utility.css.js → Chip/chip.css.js} +10 -10
- package/dist/components/Chip/index.d.ts +1 -0
- package/dist/components/Chip/index.js +2 -0
- package/dist/components/Chip/index.js.map +1 -0
- package/dist/components/ChipGroup/ChipGroup.d.ts +8 -7
- package/dist/components/ChipGroup/ChipGroup.js +5 -4
- package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.js +4 -31
- package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +50 -0
- package/dist/components/DatePicker/DatePicker.js +133 -0
- package/dist/components/DatePicker/DatePicker.js.map +1 -0
- package/dist/components/DatePicker/DatePickerExample.d.ts +3 -0
- package/dist/components/DatePicker/DatePickerExample.js +10 -0
- package/dist/components/DatePicker/DatePickerExample.js.map +1 -0
- package/dist/components/{DateInput/date-input.css → DatePicker/date-picker.css} +2 -3
- package/dist/components/{DateInput/date-input.css.js → DatePicker/date-picker.css.js} +2 -3
- package/dist/components/DatePicker/index.d.ts +1 -0
- package/dist/components/DatePicker/index.js +2 -0
- package/dist/components/DatePicker/index.js.map +1 -0
- package/dist/components/DatePickerField/DatePickerField.d.ts +15 -0
- package/dist/components/DatePickerField/DatePickerField.js +17 -0
- package/dist/components/DatePickerField/DatePickerField.js.map +1 -0
- package/dist/components/DatePickerField/index.d.ts +1 -0
- package/dist/components/DatePickerField/index.js +2 -0
- package/dist/components/DatePickerField/index.js.map +1 -0
- package/dist/components/Drawer/Drawer.d.ts +1 -1
- package/dist/components/Drawer/Drawer.js +1 -1
- package/dist/components/Drawer/DrawerExample.js +3 -3
- package/dist/components/Drawer/DrawerExample.js.map +1 -1
- package/dist/components/EmptyState/EmptyState.d.ts +1 -1
- package/dist/components/EmptyState/EmptyState.js +1 -1
- package/dist/components/Fab/Fab.d.ts +1 -1
- package/dist/components/Fab/Fab.js +1 -1
- package/dist/components/Field/Field.d.ts +58 -0
- package/dist/components/Field/Field.js +70 -0
- package/dist/components/Field/Field.js.map +1 -0
- package/dist/components/Field/FieldDescription.d.ts +7 -0
- package/dist/components/Field/FieldDescription.js +9 -0
- package/dist/components/Field/FieldDescription.js.map +1 -0
- package/dist/components/Field/FieldError.d.ts +5 -0
- package/dist/components/Field/FieldError.js +8 -0
- package/dist/components/Field/FieldError.js.map +1 -0
- package/dist/components/Field/FieldExample.d.ts +5 -0
- package/dist/components/Field/FieldExample.js +10 -0
- package/dist/components/Field/FieldExample.js.map +1 -0
- package/dist/components/Field/FieldLabel.d.ts +15 -0
- package/dist/components/Field/FieldLabel.js +8 -0
- package/dist/components/Field/FieldLabel.js.map +1 -0
- package/dist/components/Field/field.css +36 -0
- package/dist/components/Field/field.css.js +41 -0
- package/dist/components/Field/index.d.ts +5 -0
- package/dist/components/Field/index.js +6 -0
- package/dist/components/Field/index.js.map +1 -0
- package/dist/components/Field/utils.d.ts +39 -0
- package/dist/components/Field/utils.js +35 -0
- package/dist/components/Field/utils.js.map +1 -0
- package/dist/components/FormField/FormField.d.ts +32 -17
- package/dist/components/FormField/FormField.js +10 -18
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormField/FormFieldExample.d.ts +10 -4
- package/dist/components/FormField/FormFieldExample.js +97 -9
- package/dist/components/FormField/FormFieldExample.js.map +1 -1
- package/dist/components/Img/Img.d.ts +1 -1
- package/dist/components/Img/Img.js +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +4 -4
- package/dist/components/InlineAlert/InlineAlert.js +3 -3
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
- package/dist/components/Input/Input.d.ts +37 -0
- package/dist/components/Input/Input.js +48 -0
- package/dist/components/Input/Input.js.map +1 -0
- package/dist/components/Input/InputElement.d.ts +77 -0
- package/dist/components/{TextInput/TextInput.js → Input/InputElement.js} +17 -16
- package/dist/components/Input/InputElement.js.map +1 -0
- package/dist/components/Input/InputExample.d.ts +8 -0
- package/dist/components/{TextInput/TextInputExample.js → Input/InputExample.js} +20 -9
- package/dist/components/Input/InputExample.js.map +1 -0
- package/dist/components/Input/index.d.ts +2 -0
- package/dist/components/Input/index.js +3 -0
- package/dist/components/Input/index.js.map +1 -0
- package/dist/components/{TextInput/text-input.css → Input/input.css} +23 -23
- package/dist/components/{TextInput/text-input.css.js → Input/input.css.js} +23 -23
- package/dist/components/InputField/InputField.d.ts +15 -0
- package/dist/components/InputField/InputField.js +17 -0
- package/dist/components/InputField/InputField.js.map +1 -0
- package/dist/components/InputField/index.d.ts +1 -0
- package/dist/components/InputField/index.js +2 -0
- package/dist/components/InputField/index.js.map +1 -0
- package/dist/components/{NumberInput → InputNumber}/IncrementButton.js.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +74 -0
- package/dist/components/{NumberInput/NumberInput.js → InputNumber/InputNumber.js} +40 -13
- package/dist/components/InputNumber/InputNumber.js.map +1 -0
- package/dist/components/InputNumber/InputNumberExample.d.ts +3 -0
- package/dist/components/{NumberInput/NumberInputExample.js → InputNumber/InputNumberExample.js} +2 -2
- package/dist/components/InputNumber/InputNumberExample.js.map +1 -0
- package/dist/components/InputNumber/index.d.ts +1 -0
- package/dist/components/InputNumber/index.js +2 -0
- package/dist/components/InputNumber/index.js.map +1 -0
- package/dist/components/{NumberInput/number-input.css → InputNumber/input-number.css} +21 -21
- package/dist/components/{NumberInput/number-input.css.js → InputNumber/input-number.css.js} +21 -21
- package/dist/components/InputNumberField/InputNumberField.d.ts +15 -0
- package/dist/components/InputNumberField/InputNumberField.js +17 -0
- package/dist/components/InputNumberField/InputNumberField.js.map +1 -0
- package/dist/components/InputNumberField/index.d.ts +1 -0
- package/dist/components/InputNumberField/index.js +2 -0
- package/dist/components/InputNumberField/index.js.map +1 -0
- package/dist/components/InputPhone/InputPhone.d.ts +57 -0
- package/dist/components/InputPhone/InputPhone.js +161 -0
- package/dist/components/InputPhone/InputPhone.js.map +1 -0
- package/dist/components/InputPhone/InputPhoneExample.d.ts +4 -0
- package/dist/components/InputPhone/InputPhoneExample.js +7 -0
- package/dist/components/InputPhone/InputPhoneExample.js.map +1 -0
- package/dist/components/InputPhone/index.d.ts +1 -0
- package/dist/components/InputPhone/index.js +2 -0
- package/dist/components/InputPhone/index.js.map +1 -0
- package/dist/components/InputPhone/input-phone.css +42 -0
- package/dist/components/InputPhone/input-phone.css.js +47 -0
- package/dist/components/InputPhoneField/InputPhoneField.d.ts +15 -0
- package/dist/components/InputPhoneField/InputPhoneField.js +17 -0
- package/dist/components/InputPhoneField/InputPhoneField.js.map +1 -0
- package/dist/components/InputPhoneField/index.d.ts +1 -0
- package/dist/components/InputPhoneField/index.js +2 -0
- package/dist/components/InputPhoneField/index.js.map +1 -0
- package/dist/components/Layout/Layout.d.ts +1 -1
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListItem/ListItem.d.ts +19 -10
- package/dist/components/ListItem/ListItem.js +3 -3
- package/dist/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/ListItem/ListItemExample.js +3 -3
- package/dist/components/ListItem/ListItemExample.js.map +1 -1
- package/dist/components/ListItem/list-item.css +5 -1
- package/dist/components/ListItem/list-item.css.js +5 -1
- package/dist/components/Menu/Menu.d.ts +1 -1
- package/dist/components/Menu/Menu.js +1 -1
- package/dist/components/Menu/MenuExample.js +1 -1
- package/dist/components/Menu/MenuExample.js.map +1 -1
- package/dist/components/MenuButton/MenuButton.d.ts +1 -1
- package/dist/components/MenuButton/MenuButton.js +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -1
- package/dist/components/Modal/Modal.js +1 -1
- package/dist/components/Modal/ModalExample.js +1 -1
- package/dist/components/Modal/ModalExample.js.map +1 -1
- package/dist/components/Pagination/PageInput.js +2 -2
- package/dist/components/Pagination/PageInput.js.map +1 -1
- package/dist/components/Password/Password.d.ts +43 -0
- package/dist/components/Password/Password.js +63 -0
- package/dist/components/Password/Password.js.map +1 -0
- package/dist/components/Password/index.d.ts +1 -0
- package/dist/components/Password/index.js +2 -0
- package/dist/components/Password/index.js.map +1 -0
- package/dist/components/Password/password.css +21 -0
- package/dist/components/Password/password.css.js +26 -0
- package/dist/components/PasswordField/PasswordField.d.ts +8 -24
- package/dist/components/PasswordField/PasswordField.js +7 -23
- package/dist/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +3 -3
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverExample.js +2 -2
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.js +3 -2
- package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +2 -2
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
- package/dist/components/Radio/Radio.d.ts +2 -2
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +7 -36
- package/dist/components/RadioGroup/RadioGroup.js +15 -9
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.css +2 -1
- package/dist/components/RadioGroup/radio-group.css.js +2 -1
- package/dist/components/RadioGroupField/RadioGroupField.d.ts +15 -0
- package/dist/components/RadioGroupField/RadioGroupField.js +17 -0
- package/dist/components/RadioGroupField/RadioGroupField.js.map +1 -0
- package/dist/components/RadioGroupField/index.d.ts +1 -0
- package/dist/components/RadioGroupField/index.js +2 -0
- package/dist/components/RadioGroupField/index.js.map +1 -0
- package/dist/components/SearchBar/SearchBar.d.ts +7 -16
- package/dist/components/SearchBar/SearchBar.js +6 -6
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/Select/Select.d.ts +39 -34
- package/dist/components/Select/Select.js +49 -21
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.js +1 -9
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/SelectField/SelectField.d.ts +6 -26
- package/dist/components/SelectField/SelectField.js +5 -27
- package/dist/components/SelectField/SelectField.js.map +1 -1
- package/dist/components/Skeleton/SkeletonExample.js +2 -2
- package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +72 -14
- package/dist/components/Snackbar/Snackbar.js +38 -9
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Snackbar/SnackbarExample.d.ts +1 -1
- package/dist/components/Snackbar/SnackbarExample.js +5 -3
- package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
- package/dist/components/Snackbar/snackbar.css +31 -2
- package/dist/components/Snackbar/snackbar.css.js +31 -2
- package/dist/components/StylesProviderDemo/StylesProviderDemo.d.ts +1 -1
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js +3 -1
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js.map +1 -1
- package/dist/components/StylesProviderDemo/exampleCss.d.ts +1 -0
- package/dist/components/StylesProviderDemo/exampleCss.js +1900 -0
- package/dist/components/StylesProviderDemo/exampleCss.js.map +1 -0
- package/dist/components/Switch/Switch.d.ts +5 -3
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/SwitchOption/SwitchOption.js +1 -1
- package/dist/components/SwitchOption/SwitchOption.js.map +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +2 -2
- package/dist/components/TabGroup/TabGroup.js +3 -3
- package/dist/components/TabGroup/TabGroup.js.map +1 -1
- package/dist/components/TabList/TabList.d.ts +6 -3
- package/dist/components/TabList/TabList.js +6 -4
- package/dist/components/TabList/TabList.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +20 -26
- package/dist/components/Textarea/Textarea.js +29 -11
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/textarea.css +24 -10
- package/dist/components/Textarea/textarea.css.js +24 -10
- package/dist/components/TextareaField/TextareaField.d.ts +6 -30
- package/dist/components/TextareaField/TextareaField.js +5 -31
- package/dist/components/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/TimePicker/Listbox.d.ts +15 -0
- package/dist/components/{TimeInput → TimePicker}/Listbox.js +2 -2
- package/dist/components/TimePicker/Listbox.js.map +1 -0
- package/dist/components/TimePicker/Segment.d.ts +21 -0
- package/dist/components/{TimeInput → TimePicker}/Segment.js +2 -1
- package/dist/components/TimePicker/Segment.js.map +1 -0
- package/dist/components/TimePicker/TimePicker.d.ts +36 -0
- package/dist/components/TimePicker/TimePicker.js +133 -0
- package/dist/components/TimePicker/TimePicker.js.map +1 -0
- package/dist/components/TimePicker/TimePickerExample.d.ts +3 -0
- package/dist/components/TimePicker/TimePickerExample.js +6 -0
- package/dist/components/TimePicker/TimePickerExample.js.map +1 -0
- package/dist/components/TimePicker/index.d.ts +1 -0
- package/dist/components/TimePicker/index.js +2 -0
- package/dist/components/TimePicker/index.js.map +1 -0
- package/dist/components/{TimeInput/time-input.css → TimePicker/time-picker.css} +28 -26
- package/dist/components/{TimeInput/time-input.css.js → TimePicker/time-picker.css.js} +28 -26
- package/dist/components/TimePicker/utils.d.ts +11 -0
- package/dist/components/TimePicker/utils.js +35 -0
- package/dist/components/TimePicker/utils.js.map +1 -0
- package/dist/components/TimePickerField/TimePickerField.d.ts +15 -0
- package/dist/components/TimePickerField/TimePickerField.js +17 -0
- package/dist/components/TimePickerField/TimePickerField.js.map +1 -0
- package/dist/components/TimePickerField/index.d.ts +1 -0
- package/dist/components/TimePickerField/index.js +2 -0
- package/dist/components/TimePickerField/index.js.map +1 -0
- package/dist/components/ToggleOption/ToggleOption.js +3 -2
- package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +1 -1
- package/dist/components/Tooltip/TooltipExample.js +2 -2
- package/dist/components/Tooltip/TooltipExample.js.map +1 -1
- package/dist/components/Txt/Txt.d.ts +1 -1
- package/dist/components/Txt/Txt.js +1 -1
- package/dist/constants/brands.d.ts +1 -1
- package/dist/constants/brands.js +4 -0
- package/dist/constants/brands.js.map +1 -1
- package/dist/hooks/useCheckboxGroupState.d.ts +1 -1
- package/dist/hooks/useCheckboxGroupState.js +1 -1
- package/dist/hooks/useCheckboxState.d.ts +1 -1
- package/dist/hooks/useCheckboxState.js +1 -1
- package/dist/hooks/useContainerWidth.d.ts +1 -1
- package/dist/hooks/useContainerWidth.js +1 -1
- package/dist/hooks/useModalState.d.ts +1 -1
- package/dist/hooks/useModalState.js +1 -1
- package/dist/hooks/useOutsideClick.d.ts +1 -1
- package/dist/hooks/useOutsideClick.js +1 -1
- package/dist/hooks/useRadioState.d.ts +2 -2
- package/dist/hooks/useRadioState.js +1 -1
- package/dist/hooks/useTimeout.d.ts +1 -1
- package/dist/styles/base.css +3 -0
- package/dist/styles/base.css.js +3 -0
- package/dist/types/common.d.ts +18 -10
- package/dist/types/common.js.map +1 -1
- package/dist/types/meta.d.ts +1 -0
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/demo.d.ts +1 -0
- package/dist/utils/demo.js.map +1 -1
- package/meta.ts +1 -0
- package/package.json +37 -37
- package/src/components/AvatarGroup/AvatarGroup.tsx +1 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +5 -56
- package/src/components/Breadcrumb/BreadcumbDropdown.tsx +135 -0
- package/src/components/Button/Button.tsx +7 -1
- package/src/components/Button/button.scss +5 -5
- package/src/components/Calendar/Calendar.rtl.test.tsx +22 -0
- package/src/components/{CalendarPicker/CalendarPicker.tsx → Calendar/Calendar.tsx} +86 -87
- package/src/components/Calendar/CalendarExample.tsx +31 -0
- package/src/components/{CalendarPicker/calendar-picker.scss → Calendar/calendar.scss} +1 -1
- package/src/components/Calendar/index.tsx +1 -0
- package/src/components/Checkbox/Checkbox.tsx +28 -26
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +73 -77
- package/src/components/CheckboxGroup/CheckboxGroupExample.tsx +3 -0
- package/src/components/CheckboxGroup/checkbox-group.scss +8 -0
- package/src/components/CheckboxGroupField/CheckboxGroupField.rtl.test.tsx +27 -0
- package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +36 -0
- package/src/components/CheckboxGroupField/index.tsx +1 -0
- package/src/components/{ChipUtility/ChipUtility.rtl.test.tsx → Chip/Chip.rtl.test.tsx} +5 -5
- package/src/components/{ChipUtility/ChipUtility.tsx → Chip/Chip.tsx} +26 -28
- package/src/components/{ChipUtility/ChipUtilityExample.tsx → Chip/ChipExample.tsx} +3 -3
- package/src/components/{ChipUtility/chip-utility.scss → Chip/chip.scss} +1 -1
- package/src/components/Chip/index.tsx +1 -0
- package/src/components/ChipGroup/ChipGroup.rtl.test.tsx +7 -7
- package/src/components/ChipGroup/ChipGroup.tsx +8 -7
- package/src/components/ChipGroup/ChipGroupExample.tsx +38 -138
- package/src/components/DatePicker/DatePicker.rtl.test.tsx +17 -0
- package/src/components/DatePicker/DatePicker.tsx +227 -0
- package/src/components/DatePicker/DatePickerExample.tsx +12 -0
- package/src/components/{DateInput/date-input.scss → DatePicker/date-picker.scss} +2 -3
- package/src/components/DatePicker/index.tsx +1 -0
- package/src/components/DatePickerField/DatePickerField.rtl.test.tsx +17 -0
- package/src/components/DatePickerField/DatePickerField.tsx +30 -0
- package/src/components/DatePickerField/index.tsx +1 -0
- package/src/components/Drawer/Drawer.tsx +1 -1
- package/src/components/Drawer/DrawerExample.tsx +2 -2
- package/src/components/EmptyState/EmptyState.tsx +1 -1
- package/src/components/Fab/Fab.tsx +1 -1
- package/src/components/Field/Field.rtl.test.tsx +23 -0
- package/src/components/Field/Field.tsx +110 -0
- package/src/components/Field/FieldDescription.tsx +15 -0
- package/src/components/Field/FieldError.tsx +19 -0
- package/src/components/Field/FieldExample.tsx +21 -0
- package/src/components/Field/FieldLabel.tsx +38 -0
- package/src/components/Field/field.scss +43 -0
- package/src/components/Field/index.tsx +5 -0
- package/src/components/Field/utils.ts +79 -0
- package/src/components/FormField/FormField.rtl.test.tsx +11 -21
- package/src/components/FormField/FormField.tsx +44 -66
- package/src/components/FormField/FormFieldExample.tsx +275 -38
- package/src/components/Img/Img.tsx +1 -1
- package/src/components/InlineAlert/InlineAlert.tsx +5 -5
- package/src/components/{NumberInput/NumberInput.rtl.test.tsx → Input/Input.rtl.test.tsx} +3 -3
- package/src/components/Input/Input.tsx +99 -0
- package/src/components/{TextInput/TextInput.tsx → Input/InputElement.tsx} +69 -77
- package/src/components/Input/InputExample.tsx +57 -0
- package/src/components/Input/index.tsx +2 -0
- package/src/components/{TextInput/text-input.scss → Input/input.scss} +7 -7
- package/src/components/InputField/InputField.rtl.test.tsx +15 -0
- package/src/components/InputField/InputField.tsx +24 -0
- package/src/components/InputField/index.tsx +1 -0
- package/src/components/{TextField/TextField.rtl.test.tsx → InputNumber/InputNumber.rtl.test.tsx} +3 -12
- package/src/components/{NumberInput/NumberInput.tsx → InputNumber/InputNumber.tsx} +48 -30
- package/src/components/{NumberInput/NumberInputExample.tsx → InputNumber/InputNumberExample.tsx} +2 -2
- package/src/components/InputNumber/index.tsx +1 -0
- package/src/components/{NumberInput/number-input.scss → InputNumber/input-number.scss} +1 -1
- package/src/components/InputNumberField/InputNumberField.rtl.test.tsx +17 -0
- package/src/components/InputNumberField/InputNumberField.tsx +30 -0
- package/src/components/InputNumberField/index.tsx +1 -0
- package/src/components/InputPhone/InputPhone.rtl.test.tsx +17 -0
- package/src/components/InputPhone/InputPhone.tsx +290 -0
- package/src/components/InputPhone/InputPhoneExample.tsx +9 -0
- package/src/components/InputPhone/index.tsx +1 -0
- package/src/components/{PhoneNumberInput/phone-number-input.scss → InputPhone/input-phone.scss} +13 -18
- package/src/components/InputPhoneField/InputPhoneField.rtl.test.tsx +17 -0
- package/src/components/InputPhoneField/InputPhoneField.tsx +30 -0
- package/src/components/InputPhoneField/index.tsx +1 -0
- package/src/components/Layout/Layout.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/ListItem/ListItem.tsx +31 -13
- package/src/components/ListItem/ListItemExample.tsx +3 -3
- package/src/components/ListItem/list-item.scss +6 -1
- package/src/components/Menu/Menu.tsx +1 -1
- package/src/components/Menu/MenuExample.tsx +1 -0
- package/src/components/MenuButton/MenuButton.tsx +1 -1
- package/src/components/Modal/Modal.tsx +1 -1
- package/src/components/Modal/ModalExample.tsx +4 -6
- package/src/components/Pagination/PageInput.tsx +2 -2
- package/src/components/{CalendarPicker/CalendarPicker.rtl.test.tsx → Password/Password.rtl.test.tsx} +4 -4
- package/src/components/Password/Password.tsx +113 -0
- package/src/components/Password/index.tsx +1 -0
- package/src/components/Password/password.scss +31 -0
- package/src/components/PasswordField/PasswordField.rtl.test.tsx +4 -11
- package/src/components/PasswordField/PasswordField.tsx +10 -53
- package/src/components/Popover/Popover.tsx +2 -2
- package/src/components/Popover/PopoverExample.tsx +2 -2
- package/src/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/components/ProgressCircle/ProgressCircle.tsx +1 -1
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +9 -14
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +2 -2
- package/src/components/Radio/Radio.tsx +15 -16
- package/src/components/RadioGroup/RadioGroup.rtl.test.tsx +4 -5
- package/src/components/RadioGroup/RadioGroup.tsx +51 -71
- package/src/components/RadioGroup/radio-group.scss +3 -1
- package/src/components/RadioGroupField/RadioGroupField.rtl.test.tsx +27 -0
- package/src/components/RadioGroupField/RadioGroupField.tsx +36 -0
- package/src/components/RadioGroupField/index.tsx +1 -0
- package/src/components/SearchBar/SearchBar.rtl.test.tsx +3 -3
- package/src/components/SearchBar/SearchBar.tsx +8 -21
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/components/Select/Select.rtl.test.tsx +6 -5
- package/src/components/Select/Select.tsx +56 -54
- package/src/components/Select/SelectExample.tsx +1 -14
- package/src/components/SelectField/SelectField.rtl.test.tsx +9 -6
- package/src/components/SelectField/SelectField.tsx +9 -56
- package/src/components/Skeleton/SkeletonExample.tsx +1 -3
- package/src/components/Snackbar/Snackbar.tsx +124 -28
- package/src/components/Snackbar/SnackbarExample.tsx +9 -3
- package/src/components/Snackbar/snackbar.scss +48 -16
- package/src/components/StylesProviderDemo/StylesProviderDemo.tsx +5 -2
- package/src/components/StylesProviderDemo/exampleCss.ts +1899 -0
- package/src/components/Switch/Switch.rtl.test.tsx +3 -1
- package/src/components/Switch/Switch.tsx +5 -3
- package/src/components/SwitchOption/SwitchOption.rtl.test.tsx +3 -1
- package/src/components/SwitchOption/SwitchOption.tsx +1 -1
- package/src/components/TabGroup/TabGroup.tsx +2 -2
- package/src/components/TabList/TabList.tsx +16 -6
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Textarea/Textarea.rtl.test.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +72 -68
- package/src/components/Textarea/textarea.scss +41 -19
- package/src/components/TextareaField/TextareaField.rtl.test.tsx +4 -11
- package/src/components/TextareaField/TextareaField.tsx +9 -74
- package/src/components/{TimeInput → TimePicker}/Listbox.tsx +5 -5
- package/src/components/{TimeInput → TimePicker}/Segment.tsx +8 -5
- package/src/components/{TextInput/TextInput.rtl.test.tsx → TimePicker/TimePicker.rtl.test.tsx} +3 -3
- package/src/components/{TimeInput/TimeInput.tsx → TimePicker/TimePicker.tsx} +104 -67
- package/src/components/TimePicker/TimePickerExample.tsx +8 -0
- package/src/components/TimePicker/index.tsx +1 -0
- package/src/components/{TimeInput/time-input.scss → TimePicker/time-picker.scss} +7 -5
- package/src/components/TimePicker/utils.test.tsx +26 -0
- package/src/components/TimePicker/utils.ts +44 -0
- package/src/components/TimePickerField/TimePickerField.rtl.test.tsx +17 -0
- package/src/components/TimePickerField/TimePickerField.tsx +30 -0
- package/src/components/TimePickerField/index.tsx +1 -0
- package/src/components/ToggleOption/ToggleOption.tsx +10 -5
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/Tooltip/TooltipExample.tsx +7 -9
- package/src/components/Txt/Txt.tsx +1 -1
- package/src/constants/brands.ts +5 -1
- package/src/hooks/useCheckboxGroupState.ts +1 -1
- package/src/hooks/useCheckboxState.ts +1 -1
- package/src/hooks/useContainerWidth.tsx +1 -1
- package/src/hooks/useModalState.ts +1 -1
- package/src/hooks/useOutsideClick.ts +1 -1
- package/src/hooks/useRadioState.ts +1 -1
- package/src/hooks/useTimeout.ts +1 -1
- package/src/styles/base.scss +3 -0
- package/src/types/common.ts +28 -10
- package/src/types/meta.ts +1 -0
- package/src/utils/demo.ts +1 -0
- package/dist/components/CalendarPicker/CalendarPicker.d.ts +0 -32
- package/dist/components/CalendarPicker/CalendarPicker.js.map +0 -1
- package/dist/components/CalendarPicker/CalendarPickerExample.d.ts +0 -3
- package/dist/components/CalendarPicker/CalendarPickerExample.js +0 -17
- package/dist/components/CalendarPicker/CalendarPickerExample.js.map +0 -1
- package/dist/components/CalendarPicker/index.d.ts +0 -1
- package/dist/components/CalendarPicker/index.js +0 -2
- package/dist/components/CalendarPicker/index.js.map +0 -1
- package/dist/components/ChipAssist/ChipAssist.d.ts +0 -24
- package/dist/components/ChipAssist/ChipAssist.js +0 -26
- package/dist/components/ChipAssist/ChipAssist.js.map +0 -1
- package/dist/components/ChipAssist/ChipAssistExample.d.ts +0 -4
- package/dist/components/ChipAssist/ChipAssistExample.js +0 -32
- package/dist/components/ChipAssist/ChipAssistExample.js.map +0 -1
- package/dist/components/ChipAssist/index.d.ts +0 -1
- package/dist/components/ChipAssist/index.js +0 -2
- package/dist/components/ChipAssist/index.js.map +0 -1
- package/dist/components/ChipFilter/ChipFilter.d.ts +0 -40
- package/dist/components/ChipFilter/ChipFilter.js +0 -31
- package/dist/components/ChipFilter/ChipFilter.js.map +0 -1
- package/dist/components/ChipFilter/ChipFilterExample.d.ts +0 -3
- package/dist/components/ChipFilter/ChipFilterExample.js +0 -62
- package/dist/components/ChipFilter/ChipFilterExample.js.map +0 -1
- package/dist/components/ChipFilter/index.d.ts +0 -1
- package/dist/components/ChipFilter/index.js +0 -2
- package/dist/components/ChipFilter/index.js.map +0 -1
- package/dist/components/ChipInput/ChipInput.d.ts +0 -31
- package/dist/components/ChipInput/ChipInput.js +0 -27
- package/dist/components/ChipInput/ChipInput.js.map +0 -1
- package/dist/components/ChipInput/ChipInputExample.d.ts +0 -4
- package/dist/components/ChipInput/ChipInputExample.js +0 -47
- package/dist/components/ChipInput/ChipInputExample.js.map +0 -1
- package/dist/components/ChipInput/index.d.ts +0 -1
- package/dist/components/ChipInput/index.js +0 -2
- package/dist/components/ChipInput/index.js.map +0 -1
- package/dist/components/ChipSuggestion/ChipSuggestion.d.ts +0 -17
- package/dist/components/ChipSuggestion/ChipSuggestion.js +0 -19
- package/dist/components/ChipSuggestion/ChipSuggestion.js.map +0 -1
- package/dist/components/ChipSuggestion/ChipSuggestionExample.d.ts +0 -4
- package/dist/components/ChipSuggestion/ChipSuggestionExample.js +0 -24
- package/dist/components/ChipSuggestion/ChipSuggestionExample.js.map +0 -1
- package/dist/components/ChipSuggestion/index.d.ts +0 -1
- package/dist/components/ChipSuggestion/index.js +0 -2
- package/dist/components/ChipSuggestion/index.js.map +0 -1
- package/dist/components/ChipUtility/ChipUtility.js +0 -25
- package/dist/components/ChipUtility/ChipUtility.js.map +0 -1
- package/dist/components/ChipUtility/ChipUtilityExample.d.ts +0 -4
- package/dist/components/ChipUtility/ChipUtilityExample.js.map +0 -1
- package/dist/components/ChipUtility/index.d.ts +0 -1
- package/dist/components/ChipUtility/index.js +0 -2
- package/dist/components/ChipUtility/index.js.map +0 -1
- package/dist/components/DateField/DateField.d.ts +0 -32
- package/dist/components/DateField/DateField.js +0 -34
- package/dist/components/DateField/DateField.js.map +0 -1
- package/dist/components/DateField/DateFieldExample.d.ts +0 -4
- package/dist/components/DateField/DateFieldExample.js +0 -11
- package/dist/components/DateField/DateFieldExample.js.map +0 -1
- package/dist/components/DateField/date-field.css +0 -8
- package/dist/components/DateField/index.d.ts +0 -1
- package/dist/components/DateField/index.js +0 -2
- package/dist/components/DateField/index.js.map +0 -1
- package/dist/components/DateInput/DateInput.d.ts +0 -39
- package/dist/components/DateInput/DateInput.js +0 -103
- package/dist/components/DateInput/DateInput.js.map +0 -1
- package/dist/components/DateInput/DateInputExample.d.ts +0 -4
- package/dist/components/DateInput/DateInputExample.js +0 -14
- package/dist/components/DateInput/DateInputExample.js.map +0 -1
- package/dist/components/DateInput/index.d.ts +0 -1
- package/dist/components/DateInput/index.js +0 -2
- package/dist/components/DateInput/index.js.map +0 -1
- package/dist/components/FormField/form-field.css +0 -17
- package/dist/components/FormField/form-field.css.js +0 -22
- package/dist/components/ListItemMenu/ListItemMenu.d.ts +0 -146
- package/dist/components/ListItemMenu/ListItemMenu.js +0 -159
- package/dist/components/ListItemMenu/ListItemMenu.js.map +0 -1
- package/dist/components/ListItemMenu/index.d.ts +0 -1
- package/dist/components/ListItemMenu/index.js +0 -2
- package/dist/components/ListItemMenu/index.js.map +0 -1
- package/dist/components/NumberField/NumberField.d.ts +0 -33
- package/dist/components/NumberField/NumberField.js +0 -35
- package/dist/components/NumberField/NumberField.js.map +0 -1
- package/dist/components/NumberField/index.d.ts +0 -1
- package/dist/components/NumberField/index.js +0 -2
- package/dist/components/NumberField/index.js.map +0 -1
- package/dist/components/NumberInput/NumberInput.d.ts +0 -63
- package/dist/components/NumberInput/NumberInput.js.map +0 -1
- package/dist/components/NumberInput/NumberInputExample.d.ts +0 -3
- package/dist/components/NumberInput/NumberInputExample.js.map +0 -1
- package/dist/components/NumberInput/index.d.ts +0 -1
- package/dist/components/NumberInput/index.js +0 -2
- package/dist/components/NumberInput/index.js.map +0 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +0 -21
- package/dist/components/PasswordInput/PasswordInput.js +0 -34
- package/dist/components/PasswordInput/PasswordInput.js.map +0 -1
- package/dist/components/PasswordInput/index.d.ts +0 -1
- package/dist/components/PasswordInput/index.js +0 -2
- package/dist/components/PasswordInput/index.js.map +0 -1
- package/dist/components/PasswordInput/password-input.css +0 -28
- package/dist/components/PasswordInput/password-input.css.js +0 -33
- package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +0 -14
- package/dist/components/PhoneNumberField/PhoneNumberField.js +0 -16
- package/dist/components/PhoneNumberField/PhoneNumberField.js.map +0 -1
- package/dist/components/PhoneNumberField/index.d.ts +0 -1
- package/dist/components/PhoneNumberField/index.js +0 -2
- package/dist/components/PhoneNumberField/index.js.map +0 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +0 -37
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +0 -83
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js.map +0 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.d.ts +0 -4
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js +0 -5
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js.map +0 -1
- package/dist/components/PhoneNumberInput/index.d.ts +0 -1
- package/dist/components/PhoneNumberInput/index.js +0 -2
- package/dist/components/PhoneNumberInput/index.js.map +0 -1
- package/dist/components/PhoneNumberInput/phone-number-input.css +0 -46
- package/dist/components/PhoneNumberInput/phone-number-input.css.js +0 -51
- package/dist/components/SelectField/SelectFieldExample.d.ts +0 -23
- package/dist/components/SelectField/SelectFieldExample.js +0 -13
- package/dist/components/SelectField/SelectFieldExample.js.map +0 -1
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +0 -90
- package/dist/components/SnackbarProvider/SnackbarProvider.js +0 -115
- package/dist/components/SnackbarProvider/SnackbarProvider.js.map +0 -1
- package/dist/components/SnackbarProvider/SnackbarProviderExample.d.ts +0 -4
- package/dist/components/SnackbarProvider/SnackbarProviderExample.js +0 -59
- package/dist/components/SnackbarProvider/SnackbarProviderExample.js.map +0 -1
- package/dist/components/SnackbarProvider/index.d.ts +0 -1
- package/dist/components/SnackbarProvider/index.js +0 -2
- package/dist/components/SnackbarProvider/index.js.map +0 -1
- package/dist/components/SnackbarProvider/snackbar-provider-example.css +0 -15
- package/dist/components/SnackbarProvider/snackbar-provider-example.css.js +0 -20
- package/dist/components/SnackbarProvider/snackbar-provider.css +0 -15
- package/dist/components/SnackbarProvider/snackbar-provider.css.js +0 -20
- package/dist/components/TextField/TextField.d.ts +0 -31
- package/dist/components/TextField/TextField.js +0 -33
- package/dist/components/TextField/TextField.js.map +0 -1
- package/dist/components/TextField/TextFieldExample.d.ts +0 -3
- package/dist/components/TextField/TextFieldExample.js +0 -6
- package/dist/components/TextField/TextFieldExample.js.map +0 -1
- package/dist/components/TextField/index.d.ts +0 -1
- package/dist/components/TextField/index.js +0 -2
- package/dist/components/TextField/index.js.map +0 -1
- package/dist/components/TextInput/TextInput.d.ts +0 -78
- package/dist/components/TextInput/TextInput.js.map +0 -1
- package/dist/components/TextInput/TextInputExample.d.ts +0 -3
- package/dist/components/TextInput/TextInputExample.js.map +0 -1
- package/dist/components/TextInput/index.d.ts +0 -1
- package/dist/components/TextInput/index.js +0 -2
- package/dist/components/TextInput/index.js.map +0 -1
- package/dist/components/TextareaField/TextareaFieldExample.d.ts +0 -3
- package/dist/components/TextareaField/TextareaFieldExample.js +0 -10
- package/dist/components/TextareaField/TextareaFieldExample.js.map +0 -1
- package/dist/components/TimeInput/Listbox.d.ts +0 -15
- package/dist/components/TimeInput/Listbox.js.map +0 -1
- package/dist/components/TimeInput/Segment.d.ts +0 -20
- package/dist/components/TimeInput/Segment.js.map +0 -1
- package/dist/components/TimeInput/TimeInput.d.ts +0 -24
- package/dist/components/TimeInput/TimeInput.js +0 -115
- package/dist/components/TimeInput/TimeInput.js.map +0 -1
- package/dist/components/TimeInput/TimeInputExample.d.ts +0 -3
- package/dist/components/TimeInput/TimeInputExample.js +0 -4
- package/dist/components/TimeInput/TimeInputExample.js.map +0 -1
- package/dist/components/TimeInput/index.d.ts +0 -1
- package/dist/components/TimeInput/index.js +0 -2
- package/dist/components/TimeInput/index.js.map +0 -1
- package/dist/hooks/useSnackbarContext.d.ts +0 -1
- package/dist/hooks/useSnackbarContext.js +0 -16
- package/dist/hooks/useSnackbarContext.js.map +0 -1
- package/dist/utils/snackbarContext.d.ts +0 -38
- package/dist/utils/snackbarContext.js +0 -3
- package/dist/utils/snackbarContext.js.map +0 -1
- package/src/components/CalendarPicker/CalendarPickerExample.tsx +0 -24
- package/src/components/CalendarPicker/index.tsx +0 -1
- package/src/components/ChipAssist/ChipAssist.rtl.test.tsx +0 -16
- package/src/components/ChipAssist/ChipAssist.tsx +0 -37
- package/src/components/ChipAssist/ChipAssistExample.tsx +0 -34
- package/src/components/ChipAssist/index.tsx +0 -1
- package/src/components/ChipFilter/ChipFilter.rtl.test.tsx +0 -15
- package/src/components/ChipFilter/ChipFilter.tsx +0 -75
- package/src/components/ChipFilter/ChipFilterExample.tsx +0 -63
- package/src/components/ChipFilter/index.tsx +0 -1
- package/src/components/ChipInput/ChipInput.rtl.test.tsx +0 -16
- package/src/components/ChipInput/ChipInput.tsx +0 -47
- package/src/components/ChipInput/ChipInputExample.tsx +0 -49
- package/src/components/ChipInput/index.tsx +0 -1
- package/src/components/ChipSuggestion/ChipSuggestion.rtl.test.tsx +0 -19
- package/src/components/ChipSuggestion/ChipSuggestion.tsx +0 -22
- package/src/components/ChipSuggestion/ChipSuggestionExample.tsx +0 -26
- package/src/components/ChipSuggestion/index.tsx +0 -1
- package/src/components/ChipUtility/index.tsx +0 -1
- package/src/components/DateField/DateField.rtl.test.tsx +0 -24
- package/src/components/DateField/DateField.tsx +0 -58
- package/src/components/DateField/DateFieldExample.tsx +0 -13
- package/src/components/DateField/date-field.scss +0 -8
- package/src/components/DateField/index.tsx +0 -1
- package/src/components/DateInput/DateInput.rtl.test.tsx +0 -17
- package/src/components/DateInput/DateInput.tsx +0 -198
- package/src/components/DateInput/DateInputExample.tsx +0 -17
- package/src/components/DateInput/index.tsx +0 -1
- package/src/components/FormField/form-field.scss +0 -19
- package/src/components/ListItemMenu/ListItemMenu.tsx +0 -359
- package/src/components/ListItemMenu/index.tsx +0 -1
- package/src/components/NumberField/NumberField.rtl.test.tsx +0 -24
- package/src/components/NumberField/NumberField.tsx +0 -70
- package/src/components/NumberField/index.tsx +0 -1
- package/src/components/NumberInput/index.tsx +0 -1
- package/src/components/PasswordInput/PasswordInput.rtl.test.tsx +0 -15
- package/src/components/PasswordInput/PasswordInput.tsx +0 -115
- package/src/components/PasswordInput/index.tsx +0 -1
- package/src/components/PasswordInput/password-input.scss +0 -36
- package/src/components/PhoneNumberField/PhoneNumberField.rtl.test.tsx +0 -24
- package/src/components/PhoneNumberField/PhoneNumberField.tsx +0 -41
- package/src/components/PhoneNumberField/index.tsx +0 -1
- package/src/components/PhoneNumberInput/PhoneNumberInput.rtl.test.tsx +0 -17
- package/src/components/PhoneNumberInput/PhoneNumberInput.tsx +0 -186
- package/src/components/PhoneNumberInput/PhoneNumberInputExample.tsx +0 -8
- package/src/components/PhoneNumberInput/index.tsx +0 -1
- package/src/components/SelectField/SelectFieldExample.tsx +0 -16
- package/src/components/SnackbarProvider/SnackbarProvider.tsx +0 -160
- package/src/components/SnackbarProvider/SnackbarProviderExample.tsx +0 -127
- package/src/components/SnackbarProvider/index.tsx +0 -1
- package/src/components/SnackbarProvider/snackbar-provider-example.scss +0 -17
- package/src/components/SnackbarProvider/snackbar-provider.scss +0 -15
- package/src/components/TextField/TextField.tsx +0 -67
- package/src/components/TextField/TextFieldExample.tsx +0 -8
- package/src/components/TextField/index.tsx +0 -1
- package/src/components/TextInput/TextInputExample.tsx +0 -44
- package/src/components/TextInput/index.tsx +0 -1
- package/src/components/TextareaField/TextareaFieldExample.tsx +0 -13
- package/src/components/TimeInput/TimeInput.rtl.test.tsx +0 -15
- package/src/components/TimeInput/TimeInputExample.tsx +0 -6
- package/src/components/TimeInput/index.tsx +0 -1
- package/src/hooks/useSnackbarContext.ts +0 -18
- package/src/utils/snackbarContext.tsx +0 -43
- /package/dist/components/{NumberInput → InputNumber}/IncrementButton.d.ts +0 -0
- /package/dist/components/{NumberInput → InputNumber}/IncrementButton.js +0 -0
- /package/src/components/{NumberInput → InputNumber}/IncrementButton.tsx +0 -0
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { InputPhoneProps } from '.';
|
|
2
|
+
import { ComponentExample, Preset } from '-/utils/demo';
|
|
3
|
+
|
|
4
|
+
export const presets: Preset<InputPhoneProps>[] = [];
|
|
5
|
+
|
|
6
|
+
export const InputPhoneExample: ComponentExample<InputPhoneProps> = {
|
|
7
|
+
render: ({ props, Component }) => <Component {...props} />,
|
|
8
|
+
variants: true,
|
|
9
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputPhone';
|
package/src/components/{PhoneNumberInput/phone-number-input.scss → InputPhone/input-phone.scss}
RENAMED
|
@@ -1,39 +1,34 @@
|
|
|
1
|
-
[data-bspk='phone
|
|
1
|
+
[data-bspk='input-phone'] {
|
|
2
2
|
position: relative;
|
|
3
3
|
width: 100%;
|
|
4
4
|
}
|
|
5
5
|
|
|
6
|
-
[data-bspk-owner='phone-
|
|
6
|
+
[data-bspk-owner='input-phone'][data-bspk='input'] {
|
|
7
7
|
padding-left: 0;
|
|
8
8
|
|
|
9
|
+
&:focus-within {
|
|
10
|
+
outline: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
input:focus-visible {
|
|
14
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
15
|
+
border-radius: var(--radius-sm);
|
|
16
|
+
}
|
|
17
|
+
|
|
9
18
|
[data-bspk='divider'] {
|
|
10
19
|
margin: 0 var(--spacing-sizing-02) 0 0;
|
|
11
20
|
}
|
|
12
21
|
|
|
13
22
|
[data-leading] {
|
|
14
|
-
overflow: hidden;
|
|
15
23
|
position: relative;
|
|
16
24
|
|
|
17
|
-
[contentEditable] {
|
|
18
|
-
position: absolute;
|
|
19
|
-
opacity: 0;
|
|
20
|
-
inset: 0;
|
|
21
|
-
z-index: 2;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
[contentEditable]:focus-visible {
|
|
25
|
-
outline: none;
|
|
26
|
-
|
|
27
|
-
& + [data-bspk='button'] {
|
|
28
|
-
outline: solid 2px var(--stroke-neutral-focus);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
25
|
[data-bspk='button'] {
|
|
33
26
|
gap: var(--spacing-sizing-02);
|
|
34
27
|
padding: 0 var(--spacing-sizing-03);
|
|
35
28
|
min-height: 100%;
|
|
36
29
|
margin-right: var(--spacing-sizing-02);
|
|
30
|
+
position: relative;
|
|
31
|
+
z-index: 2;
|
|
37
32
|
|
|
38
33
|
&::after {
|
|
39
34
|
content: '';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { InputPhoneField } from '.';
|
|
2
|
+
import { hasNoBasicA11yIssues } from '-/rtl/hasNoBasicA11yIssues';
|
|
3
|
+
import { render } from '-/rtl/util';
|
|
4
|
+
|
|
5
|
+
const TestBed = () => (
|
|
6
|
+
<InputPhoneField label="Example field label" name="example-field-name" onChange={() => {}} value="" />
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
describe('InputPhoneField (RTL)', () => {
|
|
10
|
+
it('has no basic a11y issues', hasNoBasicA11yIssues(<TestBed />));
|
|
11
|
+
|
|
12
|
+
it('renders', () => {
|
|
13
|
+
const { getAllByLabelText } = render(<TestBed />);
|
|
14
|
+
|
|
15
|
+
expect(getAllByLabelText('Example field label')[0]).toBeInTheDocument();
|
|
16
|
+
});
|
|
17
|
+
});
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { FormField, FormFieldControlProps } from '-/components/FormField';
|
|
2
|
+
import { InputPhone, InputPhoneProps } from '-/components/InputPhone';
|
|
3
|
+
|
|
4
|
+
export type InputPhoneFieldProps = FormFieldControlProps<InputPhoneProps>;
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A field wrapper for the InputPhone component.
|
|
8
|
+
*
|
|
9
|
+
* This component takes properties from the FormField and InputPhone components.
|
|
10
|
+
*
|
|
11
|
+
* @name InputPhoneField
|
|
12
|
+
* @phase UXReview
|
|
13
|
+
*
|
|
14
|
+
* @generated
|
|
15
|
+
*/
|
|
16
|
+
export function InputPhoneField({
|
|
17
|
+
label,
|
|
18
|
+
helperText,
|
|
19
|
+
labelTrailing,
|
|
20
|
+
errorMessage,
|
|
21
|
+
...controlProps
|
|
22
|
+
}: InputPhoneFieldProps) {
|
|
23
|
+
return (
|
|
24
|
+
<FormField errorMessage={errorMessage} helperText={helperText} label={label} labelTrailing={labelTrailing}>
|
|
25
|
+
<InputPhone {...controlProps} />
|
|
26
|
+
</FormField>
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './InputPhoneField';
|
|
@@ -46,7 +46,7 @@ export type LinkProps = Pick<CommonPropsLibrary, 'disabled'> & {
|
|
|
46
46
|
* @example
|
|
47
47
|
* import { Link } from '@bspk/ui/Link';
|
|
48
48
|
*
|
|
49
|
-
*
|
|
49
|
+
* function Example() {
|
|
50
50
|
* return <Link href="https://bspk.dev" label="Example label" trailingIcon="external" />;
|
|
51
51
|
* }
|
|
52
52
|
*
|
|
@@ -7,6 +7,7 @@ import {
|
|
|
7
7
|
AriaAttributes,
|
|
8
8
|
HTMLAttributes,
|
|
9
9
|
AriaRole,
|
|
10
|
+
ComponentProps,
|
|
10
11
|
} from 'react';
|
|
11
12
|
import { ListItemButton } from './ListItemButton';
|
|
12
13
|
import { Truncated } from '-/components/Truncated';
|
|
@@ -31,12 +32,16 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
31
32
|
* @options Icon, Img, Avatar
|
|
32
33
|
*/
|
|
33
34
|
leading?: ReactNode;
|
|
35
|
+
/** Props to pass to the leading element wrapper span. */
|
|
36
|
+
leadingProps?: ComponentProps<'span'>;
|
|
34
37
|
/**
|
|
35
38
|
* The label to display in the ListItem.
|
|
36
39
|
*
|
|
37
40
|
* @required
|
|
38
41
|
*/
|
|
39
42
|
label: string;
|
|
43
|
+
/** Props to pass to the label wrapper span. */
|
|
44
|
+
labelProps?: ComponentProps<'span'>;
|
|
40
45
|
/** The subtext to display in the ListItem. */
|
|
41
46
|
subText?: string;
|
|
42
47
|
/**
|
|
@@ -49,6 +54,8 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
49
54
|
* @options Checkbox, Icon, ListItemButton, Radio, Switch, Tag, Txt
|
|
50
55
|
*/
|
|
51
56
|
trailing?: ReactNode;
|
|
57
|
+
/** Props to pass to the trailing element wrapper span. */
|
|
58
|
+
trailingProps?: ComponentProps<'span'>;
|
|
52
59
|
/**
|
|
53
60
|
* The [href](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#href) of the list item.
|
|
54
61
|
*
|
|
@@ -75,18 +82,21 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
75
82
|
* If not provided, a unique ID will be generated. This is useful for accessibility and testing purposes.
|
|
76
83
|
*/
|
|
77
84
|
id?: string;
|
|
78
|
-
/**
|
|
79
|
-
* Whether to hide the label from screen readers. Use this when the label is redundant with other context, such
|
|
80
|
-
* as within a ListItemMenu or Label.
|
|
81
|
-
*
|
|
82
|
-
* @default false
|
|
83
|
-
*/
|
|
84
|
-
hideAriaLabel?: boolean;
|
|
85
85
|
/**
|
|
86
86
|
* Indicates the current "selected" state of the list item when used in a selectable context, such as within a
|
|
87
87
|
* ListItemMenu.
|
|
88
88
|
*/
|
|
89
89
|
'aria-selected'?: boolean;
|
|
90
|
+
/**
|
|
91
|
+
* Determines how the ListItem uses horizontal space.
|
|
92
|
+
*
|
|
93
|
+
* If set to 'fill', options expand to fill the container's width.
|
|
94
|
+
*
|
|
95
|
+
* If set to 'hug', options only take up as much space as the content requires.
|
|
96
|
+
*
|
|
97
|
+
* @default fill
|
|
98
|
+
*/
|
|
99
|
+
width?: 'fill' | 'hug';
|
|
90
100
|
};
|
|
91
101
|
|
|
92
102
|
/**
|
|
@@ -107,7 +117,7 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
107
117
|
* import { SvgSquare } from '@bspk/icons/Square';
|
|
108
118
|
* import { ListItem } from '@bspk/ui/ListItem';
|
|
109
119
|
*
|
|
110
|
-
*
|
|
120
|
+
* function Example() {
|
|
111
121
|
* return (
|
|
112
122
|
* <ListItem
|
|
113
123
|
* label="Example label"
|
|
@@ -121,22 +131,25 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
121
131
|
* @name ListItem
|
|
122
132
|
* @phase UXReview
|
|
123
133
|
*/
|
|
124
|
-
function ListItem<As extends ElementType =
|
|
134
|
+
function ListItem<As extends ElementType = ElementType>({
|
|
125
135
|
active,
|
|
126
136
|
as,
|
|
127
137
|
innerRef,
|
|
128
138
|
label,
|
|
139
|
+
labelProps,
|
|
129
140
|
leading,
|
|
141
|
+
leadingProps,
|
|
130
142
|
owner,
|
|
131
143
|
role: roleProp,
|
|
132
144
|
subText,
|
|
133
145
|
trailing,
|
|
146
|
+
trailingProps,
|
|
134
147
|
id: idProp,
|
|
135
148
|
'aria-label': ariaLabel,
|
|
136
149
|
'aria-selected': ariaSelected,
|
|
137
150
|
'aria-disabled': ariaDisabled,
|
|
138
151
|
'aria-readonly': ariaReadonly,
|
|
139
|
-
|
|
152
|
+
width,
|
|
140
153
|
...props
|
|
141
154
|
}: ElementProps<ListItemProps<As>, As>) {
|
|
142
155
|
const id = useId(idProp);
|
|
@@ -163,6 +176,7 @@ function ListItem<As extends ElementType = 'div'>({
|
|
|
163
176
|
data-bspk-owner={owner || undefined}
|
|
164
177
|
data-disabled={isDisabled || undefined}
|
|
165
178
|
data-readonly={isReadOnly || undefined}
|
|
179
|
+
data-width={width === 'hug' ? 'hug' : undefined}
|
|
166
180
|
id={id}
|
|
167
181
|
onClick={isReadOnly || isDisabled ? undefined : props.onClick}
|
|
168
182
|
ref={innerRef}
|
|
@@ -170,15 +184,19 @@ function ListItem<As extends ElementType = 'div'>({
|
|
|
170
184
|
tabIndex={props.tabIndex || (actionable ? 0 : -1)}
|
|
171
185
|
>
|
|
172
186
|
{leading && (
|
|
173
|
-
<span
|
|
187
|
+
<span {...leadingProps} data-leading>
|
|
174
188
|
{leading}
|
|
175
189
|
</span>
|
|
176
190
|
)}
|
|
177
|
-
<span
|
|
191
|
+
<span {...labelProps} data-item-label>
|
|
178
192
|
<Truncated data-text>{label}</Truncated>
|
|
179
193
|
{subText && <span data-sub-text>{subText}</span>}
|
|
180
194
|
</span>
|
|
181
|
-
{trailing &&
|
|
195
|
+
{trailing && (
|
|
196
|
+
<span {...trailingProps} data-trailing>
|
|
197
|
+
{trailing}
|
|
198
|
+
</span>
|
|
199
|
+
)}
|
|
182
200
|
</As>
|
|
183
201
|
);
|
|
184
202
|
}
|
|
@@ -20,12 +20,12 @@ export const presets = (action: (param: string) => void): Preset<ListItemProps>[
|
|
|
20
20
|
} as ElementProps<ListItemProps<'div'>, 'div'>,
|
|
21
21
|
},
|
|
22
22
|
{
|
|
23
|
-
label: 'As
|
|
23
|
+
label: 'As Div',
|
|
24
24
|
propState: {
|
|
25
25
|
as: undefined,
|
|
26
|
-
label: '
|
|
26
|
+
label: 'role = "button"',
|
|
27
27
|
role: 'button',
|
|
28
|
-
subText: '
|
|
28
|
+
subText: 'aria-disabled = {true}',
|
|
29
29
|
trailing: undefined,
|
|
30
30
|
leading: undefined,
|
|
31
31
|
'aria-disabled': true,
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[data-bspk='list-item'] {
|
|
2
2
|
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
3
|
user-select: none;
|
|
5
4
|
color: var(--foreground-neutral-on-surface);
|
|
6
5
|
background-color: var(--surface-neutral-t1-base);
|
|
@@ -14,6 +13,12 @@
|
|
|
14
13
|
border: unset;
|
|
15
14
|
margin: unset;
|
|
16
15
|
text-decoration: unset;
|
|
16
|
+
width: 100%;
|
|
17
|
+
|
|
18
|
+
&[data-width='hug'] {
|
|
19
|
+
width: auto;
|
|
20
|
+
max-width: 100%;
|
|
21
|
+
}
|
|
17
22
|
|
|
18
23
|
[data-pseudo='focus'] &,
|
|
19
24
|
&:focus-visible,
|
|
@@ -114,7 +114,7 @@ export type ModalProps = Pick<
|
|
|
114
114
|
* import { Button } from '@bspk/ui/Button';
|
|
115
115
|
* import { Modal } from '@bspk/ui/Modal';
|
|
116
116
|
*
|
|
117
|
-
*
|
|
117
|
+
* function Example() {
|
|
118
118
|
* const [open, setOpen] = React.useState(false);
|
|
119
119
|
*
|
|
120
120
|
* return (
|
|
@@ -28,12 +28,10 @@ export const ModalExample: ComponentExampleFn<ModalProps> = ({ action }) => ({
|
|
|
28
28
|
header: 'Confirmation Modal',
|
|
29
29
|
description: 'This modal has a call to action and a cancel button.',
|
|
30
30
|
children: (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
</p>
|
|
36
|
-
</>
|
|
31
|
+
<p>
|
|
32
|
+
This is a confirmation modal. It has a call to action and a cancel button. The call to action is
|
|
33
|
+
the primary button and the cancel button is the tertiary button.
|
|
34
|
+
</p>
|
|
37
35
|
),
|
|
38
36
|
callToAction: {
|
|
39
37
|
label: 'Call to Action',
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { FC, useEffect, useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { PaginationProps } from './Pagination';
|
|
4
|
-
import {
|
|
4
|
+
import { Input } from '-/components/Input';
|
|
5
5
|
import { Txt } from '-/components/Txt';
|
|
6
6
|
|
|
7
7
|
type PageInputProps = Pick<PaginationProps, 'numPages' | 'onChange' | 'value'>;
|
|
@@ -48,7 +48,7 @@ export const PageInput: FC<PageInputProps> = ({ numPages, onChange, value }) =>
|
|
|
48
48
|
style={{ display: 'contents' }}
|
|
49
49
|
>
|
|
50
50
|
<div data-bspk="page-input">
|
|
51
|
-
<
|
|
51
|
+
<Input
|
|
52
52
|
aria-label="Page input"
|
|
53
53
|
name="page-input"
|
|
54
54
|
onBlur={handleSubmit}
|
package/src/components/{CalendarPicker/CalendarPicker.rtl.test.tsx → Password/Password.rtl.test.tsx}
RENAMED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Password } from './';
|
|
2
2
|
import { hasNoBasicA11yIssues } from '-/rtl/hasNoBasicA11yIssues';
|
|
3
3
|
import { render } from '-/rtl/util';
|
|
4
4
|
|
|
5
|
-
const TestBed = () => <
|
|
5
|
+
const TestBed = () => <Password aria-label="Password" name="password" onChange={() => {}} value="foo" />;
|
|
6
6
|
|
|
7
|
-
describe('
|
|
7
|
+
describe('Password (RTL)', () => {
|
|
8
8
|
it('has no basic a11y issues', hasNoBasicA11yIssues(<TestBed />));
|
|
9
9
|
|
|
10
10
|
it('renders', () => {
|
|
11
11
|
const { getByLabelText } = render(<TestBed />);
|
|
12
12
|
|
|
13
|
-
expect(getByLabelText('
|
|
13
|
+
expect(getByLabelText('Password')).toBeInTheDocument();
|
|
14
14
|
});
|
|
15
15
|
});
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
import './password.scss';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Button } from '-/components/Button';
|
|
4
|
+
import { useFieldInit } from '-/components/Field';
|
|
5
|
+
import { InputElement, InputProps } from '-/components/Input';
|
|
6
|
+
import { FieldControlProps } from '-/types/common';
|
|
7
|
+
|
|
8
|
+
export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef' | 'inputProps' | 'inputRef' | 'size'>;
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* An input field that is specifically built with a show/hide toggle for entering security passwords.
|
|
12
|
+
*
|
|
13
|
+
* For a more complete example with field usage, see the PasswordField component.
|
|
14
|
+
*
|
|
15
|
+
* @example
|
|
16
|
+
* import { Password } from '@bspk/ui/Password';
|
|
17
|
+
* import { useState } from 'react';
|
|
18
|
+
*
|
|
19
|
+
* function ExampleStandalone() {
|
|
20
|
+
* const [value, setValue] = useState('');
|
|
21
|
+
*
|
|
22
|
+
* return (
|
|
23
|
+
* <Password
|
|
24
|
+
* aria-label="Enter password"
|
|
25
|
+
* value={value}
|
|
26
|
+
* onChange={setValue}
|
|
27
|
+
* aria-label="password"
|
|
28
|
+
* name="password"
|
|
29
|
+
* />
|
|
30
|
+
* );
|
|
31
|
+
* }
|
|
32
|
+
*
|
|
33
|
+
* function ExampleWithField() {
|
|
34
|
+
* const [value, setValue] = useState('');
|
|
35
|
+
* return (
|
|
36
|
+
* <Field>
|
|
37
|
+
* <FieldLabel>Password</FieldLabel>
|
|
38
|
+
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
39
|
+
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
40
|
+
* </Field>
|
|
41
|
+
* );
|
|
42
|
+
* }
|
|
43
|
+
*
|
|
44
|
+
* @name Password
|
|
45
|
+
* @phase UXReview
|
|
46
|
+
*/
|
|
47
|
+
export function Password({
|
|
48
|
+
inputProps,
|
|
49
|
+
inputRef,
|
|
50
|
+
name,
|
|
51
|
+
onChange,
|
|
52
|
+
required = false,
|
|
53
|
+
containerRef,
|
|
54
|
+
invalid: invalidProp,
|
|
55
|
+
readOnly,
|
|
56
|
+
disabled,
|
|
57
|
+
id: idProp,
|
|
58
|
+
'aria-label': ariaLabel,
|
|
59
|
+
...props
|
|
60
|
+
}: PasswordProps) {
|
|
61
|
+
const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
|
|
62
|
+
idProp,
|
|
63
|
+
required,
|
|
64
|
+
disabled,
|
|
65
|
+
readOnly,
|
|
66
|
+
invalidProp,
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
const [isShowingPassword, setIsShowingPassword] = useState(false);
|
|
70
|
+
|
|
71
|
+
const togglePasswordVisibility = () => {
|
|
72
|
+
if (disabled || readOnly) return;
|
|
73
|
+
setIsShowingPassword((prev) => !prev);
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
return (
|
|
77
|
+
<InputElement
|
|
78
|
+
{...props}
|
|
79
|
+
aria-describedby={ariaDescribedBy}
|
|
80
|
+
aria-errormessage={ariaErrorMessage}
|
|
81
|
+
aria-label={ariaLabel || undefined}
|
|
82
|
+
autoComplete="off"
|
|
83
|
+
containerRef={containerRef}
|
|
84
|
+
data-bspk-owner="password"
|
|
85
|
+
id={id}
|
|
86
|
+
inputProps={inputProps}
|
|
87
|
+
inputRef={inputRef}
|
|
88
|
+
invalid={invalid}
|
|
89
|
+
name={name}
|
|
90
|
+
onChange={onChange}
|
|
91
|
+
onClick={(e) => {
|
|
92
|
+
(e.currentTarget as HTMLElement)?.querySelector('input')?.focus();
|
|
93
|
+
}}
|
|
94
|
+
owner="password"
|
|
95
|
+
required={required}
|
|
96
|
+
showClearButton={false}
|
|
97
|
+
trailing={
|
|
98
|
+
!disabled &&
|
|
99
|
+
!readOnly && (
|
|
100
|
+
<Button
|
|
101
|
+
data-toggle-visibility-button
|
|
102
|
+
label={isShowingPassword ? 'Hide' : 'Show'}
|
|
103
|
+
onClick={togglePasswordVisibility}
|
|
104
|
+
variant="tertiary"
|
|
105
|
+
/>
|
|
106
|
+
)
|
|
107
|
+
}
|
|
108
|
+
type={isShowingPassword ? 'text' : 'password'}
|
|
109
|
+
/>
|
|
110
|
+
);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Password';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
[data-bspk-owner='password'] {
|
|
2
|
+
[data-bspk='input'] {
|
|
3
|
+
padding-right: 0;
|
|
4
|
+
|
|
5
|
+
[data-toggle-visibility-button] {
|
|
6
|
+
font: var(--button-font);
|
|
7
|
+
height: 100%;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
&[data-disabled],
|
|
11
|
+
&[data-readonly] {
|
|
12
|
+
[data-toggle-visibility-button] {
|
|
13
|
+
cursor: default;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
&[data-size='small'] {
|
|
18
|
+
--button-font: var(--labels-small);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
&[data-size='medium'] {
|
|
22
|
+
--button-font: var(--labels-base);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
&[data-size='large'] {
|
|
26
|
+
--button-font: var(--labels-large);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,24 +1,17 @@
|
|
|
1
|
-
import { PasswordField } from '
|
|
1
|
+
import { PasswordField } from '.';
|
|
2
2
|
import { hasNoBasicA11yIssues } from '-/rtl/hasNoBasicA11yIssues';
|
|
3
3
|
import { render } from '-/rtl/util';
|
|
4
4
|
|
|
5
5
|
const TestBed = () => (
|
|
6
|
-
<PasswordField
|
|
7
|
-
aria-label="Password field"
|
|
8
|
-
controlId="Example controlId"
|
|
9
|
-
label="Password field"
|
|
10
|
-
name="Example name"
|
|
11
|
-
onChange={() => {}}
|
|
12
|
-
value="foo"
|
|
13
|
-
/>
|
|
6
|
+
<PasswordField label="Example field label" name="example-field-name" onChange={() => {}} value="" />
|
|
14
7
|
);
|
|
15
8
|
|
|
16
9
|
describe('PasswordField (RTL)', () => {
|
|
17
10
|
it('has no basic a11y issues', hasNoBasicA11yIssues(<TestBed />));
|
|
18
11
|
|
|
19
12
|
it('renders', () => {
|
|
20
|
-
const {
|
|
13
|
+
const { getAllByLabelText } = render(<TestBed />);
|
|
21
14
|
|
|
22
|
-
expect(
|
|
15
|
+
expect(getAllByLabelText('Example field label')[0]).toBeInTheDocument();
|
|
23
16
|
});
|
|
24
17
|
});
|
|
@@ -1,65 +1,22 @@
|
|
|
1
|
-
import { FormField,
|
|
2
|
-
import {
|
|
1
|
+
import { FormField, FormFieldControlProps } from '-/components/FormField';
|
|
2
|
+
import { Password, PasswordProps } from '-/components/Password';
|
|
3
3
|
|
|
4
|
-
export type PasswordFieldProps =
|
|
4
|
+
export type PasswordFieldProps = FormFieldControlProps<PasswordProps>;
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
|
-
* A
|
|
7
|
+
* A field wrapper for the Password component.
|
|
8
8
|
*
|
|
9
|
-
* This component takes properties from the FormField and
|
|
10
|
-
*
|
|
11
|
-
* @example
|
|
12
|
-
* import { useState } from 'react';
|
|
13
|
-
* import { PasswordField } from '@bspk/ui/PasswordField';
|
|
14
|
-
*
|
|
15
|
-
* export function Example() {
|
|
16
|
-
* const [value, setValue] = useState<string>('');
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <PasswordField
|
|
20
|
-
* controlId="Example controlId"
|
|
21
|
-
* label="Example label"
|
|
22
|
-
* name="Example name"
|
|
23
|
-
* onChange={setValue}
|
|
24
|
-
* value={value}
|
|
25
|
-
* />
|
|
26
|
-
* );
|
|
27
|
-
* }
|
|
9
|
+
* This component takes properties from the FormField and Password components.
|
|
28
10
|
*
|
|
29
11
|
* @name PasswordField
|
|
30
12
|
* @phase UXReview
|
|
13
|
+
*
|
|
14
|
+
* @generated
|
|
31
15
|
*/
|
|
32
|
-
export function PasswordField({
|
|
33
|
-
controlId,
|
|
34
|
-
errorMessage,
|
|
35
|
-
helperText,
|
|
36
|
-
invalid,
|
|
37
|
-
label,
|
|
38
|
-
labelTrailing,
|
|
39
|
-
required,
|
|
40
|
-
...passwordInputProps
|
|
41
|
-
}: PasswordFieldProps) {
|
|
16
|
+
export function PasswordField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: PasswordFieldProps) {
|
|
42
17
|
return (
|
|
43
|
-
<FormField
|
|
44
|
-
|
|
45
|
-
data-bspk="password-field"
|
|
46
|
-
errorMessage={errorMessage}
|
|
47
|
-
helperText={helperText}
|
|
48
|
-
invalid={invalid}
|
|
49
|
-
label={label}
|
|
50
|
-
labelTrailing={labelTrailing}
|
|
51
|
-
required={required}
|
|
52
|
-
>
|
|
53
|
-
{(fieldProps) => (
|
|
54
|
-
<PasswordInput
|
|
55
|
-
{...passwordInputProps}
|
|
56
|
-
{...fieldProps}
|
|
57
|
-
id={controlId}
|
|
58
|
-
invalid={invalid}
|
|
59
|
-
required={required}
|
|
60
|
-
value={passwordInputProps.value ?? ''}
|
|
61
|
-
/>
|
|
62
|
-
)}
|
|
18
|
+
<FormField errorMessage={errorMessage} helperText={helperText} label={label} labelTrailing={labelTrailing}>
|
|
19
|
+
<Password {...controlProps} />
|
|
63
20
|
</FormField>
|
|
64
21
|
);
|
|
65
22
|
}
|