@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
|
@@ -1,159 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { useState, useMemo, } from 'react';
|
|
3
|
-
import { ListItem } from '../ListItem';
|
|
4
|
-
import { Menu } from '../Menu';
|
|
5
|
-
import { useArrowNavigation } from '../../hooks/useArrowNavigation';
|
|
6
|
-
import { useFloating } from '../../hooks/useFloating';
|
|
7
|
-
import { useId } from '../../hooks/useId';
|
|
8
|
-
import { useOutsideClick } from '../../hooks/useOutsideClick';
|
|
9
|
-
import { getElementById } from '../../utils/dom';
|
|
10
|
-
import { handleKeyDown } from '../../utils/handleKeyDown';
|
|
11
|
-
const LIST_ITEM_ROLES = {
|
|
12
|
-
group: undefined,
|
|
13
|
-
listbox: 'option',
|
|
14
|
-
menu: 'menuitem',
|
|
15
|
-
tree: 'treeitem',
|
|
16
|
-
};
|
|
17
|
-
/**
|
|
18
|
-
* A floating list Item menu for displaying additional actions or options presented as ListItems in a Menu.
|
|
19
|
-
*
|
|
20
|
-
* Includes keyboard navigation and accessibility features.
|
|
21
|
-
*
|
|
22
|
-
* The menu is anchored to a reference element provided as a children function with params that include the necessary
|
|
23
|
-
* ARIA attributes and event handlers.
|
|
24
|
-
*
|
|
25
|
-
* @example
|
|
26
|
-
* import { ListItemMenu } from '@bspk/ui/ListItemMenu';
|
|
27
|
-
*
|
|
28
|
-
* function Example() {
|
|
29
|
-
* return (
|
|
30
|
-
* <ListItemMenu
|
|
31
|
-
* items={[{ id: '1', label: 'Item 1' }]}
|
|
32
|
-
* label="Example Menu"
|
|
33
|
-
* role="menu"
|
|
34
|
-
* scrollLimit={5}
|
|
35
|
-
* width="200px"
|
|
36
|
-
* >
|
|
37
|
-
* {(toggleProps, { setRef, toggleMenu }) => (
|
|
38
|
-
* <button {...toggleProps} onClick={() => toggleMenu()} ref={setRef}>
|
|
39
|
-
* Toggle Menu
|
|
40
|
-
* </button>
|
|
41
|
-
* )}
|
|
42
|
-
* </ListItemMenu>
|
|
43
|
-
* );
|
|
44
|
-
* }
|
|
45
|
-
*
|
|
46
|
-
* @name ListItemMenu
|
|
47
|
-
* @phase Utility
|
|
48
|
-
*/
|
|
49
|
-
export function ListItemMenu({ activeElementId: activeElementIdProp = null, children, disabled, id: idProp, items: itemsProp, label, leading: menuLeading, offsetOptions = 4, arrowKeyNavigationCallback, itemOnClick, owner, placement = 'bottom', readOnly, role: containerRole = 'listbox', scrollLimit, trailing: menuTrailing, width: menuWidth = 'reference', onClose, hideWhenClosed = false, ...ariaProps }) {
|
|
50
|
-
const containerId = useId(idProp);
|
|
51
|
-
const [show, setShowBase] = useState(false);
|
|
52
|
-
const items = useMemo(() => (typeof itemsProp === 'function' ? itemsProp({ show }) : itemsProp), [itemsProp, show]);
|
|
53
|
-
const setShow = (next) => {
|
|
54
|
-
if (disabled || readOnly)
|
|
55
|
-
return;
|
|
56
|
-
setShowBase((prev) => {
|
|
57
|
-
if (prev && !next) {
|
|
58
|
-
// closing
|
|
59
|
-
onClose?.();
|
|
60
|
-
}
|
|
61
|
-
if (typeof next === 'function')
|
|
62
|
-
return next(prev);
|
|
63
|
-
return next;
|
|
64
|
-
});
|
|
65
|
-
};
|
|
66
|
-
const { floatingStyles, elements, currentPlacement } = useFloating({
|
|
67
|
-
hide: !show,
|
|
68
|
-
offsetOptions,
|
|
69
|
-
placement,
|
|
70
|
-
refWidth: menuWidth === 'reference',
|
|
71
|
-
strategy: 'fixed',
|
|
72
|
-
});
|
|
73
|
-
useOutsideClick({
|
|
74
|
-
elements: [elements.floating, elements.reference],
|
|
75
|
-
callback: () => setShow(false),
|
|
76
|
-
disabled: !show,
|
|
77
|
-
});
|
|
78
|
-
const { activeElementId, setActiveElementId, arrowKeyCallbacks } = useArrowNavigation({
|
|
79
|
-
ids: items.flatMap((item) => (item.disabled ? [] : item.id)),
|
|
80
|
-
callback: (params) => {
|
|
81
|
-
if (!show)
|
|
82
|
-
setShow(true);
|
|
83
|
-
if (typeof arrowKeyNavigationCallback === 'function' && arrowKeyNavigationCallback)
|
|
84
|
-
return arrowKeyNavigationCallback(params);
|
|
85
|
-
return true;
|
|
86
|
-
},
|
|
87
|
-
});
|
|
88
|
-
const tabEscape = () => {
|
|
89
|
-
setShow(false);
|
|
90
|
-
setActiveElementId(null);
|
|
91
|
-
};
|
|
92
|
-
const enterSpace = (event) => {
|
|
93
|
-
event.preventDefault();
|
|
94
|
-
if (!show) {
|
|
95
|
-
setShow(true);
|
|
96
|
-
return;
|
|
97
|
-
}
|
|
98
|
-
getElementById(activeElementId)?.click();
|
|
99
|
-
};
|
|
100
|
-
return (_jsxs(_Fragment, { children: [children({
|
|
101
|
-
'aria-disabled': disabled || undefined,
|
|
102
|
-
'aria-expanded': show,
|
|
103
|
-
'aria-haspopup': show && containerRole !== 'group' ? containerRole : undefined,
|
|
104
|
-
'aria-controls': containerId,
|
|
105
|
-
'aria-readonly': readOnly || undefined,
|
|
106
|
-
'aria-owns': containerId,
|
|
107
|
-
'aria-activedescendant': show ? activeElementId || undefined : undefined,
|
|
108
|
-
role: 'combobox',
|
|
109
|
-
tabIndex: 0,
|
|
110
|
-
onClick: (event) => {
|
|
111
|
-
const nextShow = !show;
|
|
112
|
-
setShow(nextShow);
|
|
113
|
-
setActiveElementId(nextShow ? activeElementIdProp || items[0]?.id || null : null);
|
|
114
|
-
event.preventDefault();
|
|
115
|
-
},
|
|
116
|
-
onKeyDownCapture: handleKeyDown({
|
|
117
|
-
...arrowKeyCallbacks,
|
|
118
|
-
Enter: enterSpace,
|
|
119
|
-
Space: enterSpace,
|
|
120
|
-
Tab: tabEscape,
|
|
121
|
-
Escape: tabEscape,
|
|
122
|
-
}),
|
|
123
|
-
}, {
|
|
124
|
-
setRef: elements.setReference,
|
|
125
|
-
toggleMenu: () => setShow(true),
|
|
126
|
-
itemCount: items.length,
|
|
127
|
-
reference: elements.reference,
|
|
128
|
-
}), (!hideWhenClosed || show) && (_jsxs(Menu, { ...ariaProps, "aria-label": label, as: "ul", "data-placement": currentPlacement, "data-scroll": !!scrollLimit && items.length > scrollLimit, id: containerId, innerRef: (node) => {
|
|
129
|
-
elements.setFloating(node);
|
|
130
|
-
}, owner: owner, role: containerRole, style: {
|
|
131
|
-
width: menuWidth !== 'reference' ? menuWidth : undefined,
|
|
132
|
-
...floatingStyles,
|
|
133
|
-
...scrollLimitStyle(scrollLimit, items.length),
|
|
134
|
-
}, children: [menuLeading, items.map((item, index) => {
|
|
135
|
-
return (_jsx(ListItem, { as: "li", ...item, active: activeElementId === item.id || undefined, onClick: (event) => {
|
|
136
|
-
elements.reference?.focus();
|
|
137
|
-
setActiveElementId(item.id);
|
|
138
|
-
item?.onClick?.(event);
|
|
139
|
-
itemOnClick?.({ event, currentId: item.id, show, setShow });
|
|
140
|
-
}, role: item.role || LIST_ITEM_ROLES[containerRole] || undefined, tabIndex: 0 }, index));
|
|
141
|
-
}), menuTrailing] }))] }));
|
|
142
|
-
}
|
|
143
|
-
const scrollLimitStyle = (scrollLimitProp, itemCount) => {
|
|
144
|
-
const scrollLimit = Number(scrollLimitProp);
|
|
145
|
-
// Check:
|
|
146
|
-
// 1. scrollLimit is valid
|
|
147
|
-
// 2. itemCount is a number
|
|
148
|
-
// 3. scrollLimit is less than itemCount
|
|
149
|
-
// If any of these fail, return undefined (no scrolling)
|
|
150
|
-
if (Number.isNaN(scrollLimit) || scrollLimit <= 0 || typeof itemCount !== 'number' || scrollLimit > itemCount)
|
|
151
|
-
return {};
|
|
152
|
-
return {
|
|
153
|
-
display: 'flex',
|
|
154
|
-
flexDirection: 'column',
|
|
155
|
-
maxHeight: `calc(var(--list-item-height) * ${scrollLimit})`,
|
|
156
|
-
overflow: 'hidden auto',
|
|
157
|
-
};
|
|
158
|
-
};
|
|
159
|
-
//# sourceMappingURL=ListItemMenu.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemMenu.js","sourceRoot":"","sources":["../../../src/components/ListItemMenu/ListItemMenu.tsx"],"names":[],"mappings":";AAAA,OAAO,EAKH,QAAQ,EAKR,OAAO,GACV,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,QAAQ,EAAiB,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAa,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAoC,kBAAkB,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kB,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;gCAC5B,IAAI,EAAE,OAAO,EAAE,CAAC,KAAK,CAAC,CAAC;gCACvB,WAAW,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAC;4BAChE,CAAC,EACD,IAAI,EAAE,IAAI,CAAC,IAAI,IAAI,eAAe,CAAC,aAAa,CAAC,IAAI,SAAS,EAC9D,QAAQ,EAAE,CAAC,IAVN,KAAK,CAWZ,CACL,CAAC;oBACN,CAAC,CAAC,EACD,YAAY,IACV,CACV,IACF,CACN,CAAC;AACN,CAAC;AAED,MAAM,gBAAgB,GAAG,CAAC,eAAwB,EAAE,SAAkB,EAAiB,EAAE;IACrF,MAAM,WAAW,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;IAE5C,SAAS;IACT,0BAA0B;IAC1B,2BAA2B;IAC3B,wCAAwC;IACxC,wDAAwD;IACxD,IAAI,MAAM,CAAC,KAAK,CAAC,WAAW,CAAC,IAAI,WAAW,IAAI,CAAC,IAAI,OAAO,SAAS,KAAK,QAAQ,IAAI,WAAW,GAAG,SAAS;QACzG,OAAO,EAAE,CAAC;IAEd,OAAO;QACH,OAAO,EAAE,MAAM;QACf,aAAa,EAAE,QAAQ;QACvB,SAAS,EAAE,kCAAkC,WAAW,GAAG;QAC3D,QAAQ,EAAE,aAAa;KAC1B,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './ListItemMenu';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/ListItemMenu/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { FormFieldWrapProps } from '-/components/FormField';
|
|
2
|
-
import { NumberInputProps } from '-/components/NumberInput';
|
|
3
|
-
export type NumberFieldProps = FormFieldWrapProps<NumberInputProps>;
|
|
4
|
-
/**
|
|
5
|
-
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
6
|
-
* pressing the (+) or (-).
|
|
7
|
-
*
|
|
8
|
-
* This component takes properties from the FormField and NumberInput components.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* import React from 'react';
|
|
12
|
-
*
|
|
13
|
-
* import { NumberField } from '@bspk/ui/NumberField';
|
|
14
|
-
*
|
|
15
|
-
* export function Example() {
|
|
16
|
-
* const [state, setState] = React.useState<number>();
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <NumberField
|
|
20
|
-
* controlId="Example controlId"
|
|
21
|
-
* label="Example label"
|
|
22
|
-
* name="Example name"
|
|
23
|
-
* onChange={(nextValue) => setState(nextValue)}
|
|
24
|
-
* value={state}
|
|
25
|
-
* />
|
|
26
|
-
* );
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* @name NumberField
|
|
30
|
-
* @phase UXReview
|
|
31
|
-
*/
|
|
32
|
-
export declare function NumberField({ label, errorMessage, disabled, helperText, controlId, labelTrailing, required, invalid, ...inputProps }: NumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormField } from '../FormField';
|
|
3
|
-
import { NumberInput } from '../NumberInput';
|
|
4
|
-
/**
|
|
5
|
-
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
6
|
-
* pressing the (+) or (-).
|
|
7
|
-
*
|
|
8
|
-
* This component takes properties from the FormField and NumberInput components.
|
|
9
|
-
*
|
|
10
|
-
* @example
|
|
11
|
-
* import React from 'react';
|
|
12
|
-
*
|
|
13
|
-
* import { NumberField } from '@bspk/ui/NumberField';
|
|
14
|
-
*
|
|
15
|
-
* export function Example() {
|
|
16
|
-
* const [state, setState] = React.useState<number>();
|
|
17
|
-
*
|
|
18
|
-
* return (
|
|
19
|
-
* <NumberField
|
|
20
|
-
* controlId="Example controlId"
|
|
21
|
-
* label="Example label"
|
|
22
|
-
* name="Example name"
|
|
23
|
-
* onChange={(nextValue) => setState(nextValue)}
|
|
24
|
-
* value={state}
|
|
25
|
-
* />
|
|
26
|
-
* );
|
|
27
|
-
* }
|
|
28
|
-
*
|
|
29
|
-
* @name NumberField
|
|
30
|
-
* @phase UXReview
|
|
31
|
-
*/
|
|
32
|
-
export function NumberField({ label, errorMessage, disabled, helperText, controlId, labelTrailing, required, invalid, ...inputProps }) {
|
|
33
|
-
return (_jsx(FormField, { controlId: controlId, "data-bspk": "number-field", errorMessage: errorMessage, helperText: helperText, invalid: invalid, label: label, labelTrailing: labelTrailing, required: required, children: (fieldProps) => (_jsx(NumberInput, { ...inputProps, ...fieldProps, "aria-label": label, disabled: disabled, id: controlId, invalid: invalid })) }));
|
|
34
|
-
}
|
|
35
|
-
//# sourceMappingURL=NumberField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberField.js","sourceRoot":"","sources":["../../../src/components/NumberField/NumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAoB,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAIzE;;;;;;;;;;;;;;;;;;;;;;;;;;;GA2BG;AACH,MAAM,UAAU,WAAW,CAAC,EACxB,KAAK,EACL,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,OAAO,EACP,GAAG,UAAU,EACE;IACf,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,SAAS,eACV,cAAc,EACxB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,YAEjB,CAAC,UAAU,EAAE,EAAE,CAAC,CACb,KAAC,WAAW,OACJ,UAAU,KACV,UAAU,gBACF,KAAK,EACjB,QAAQ,EAAE,QAAQ,EAClB,EAAE,EAAE,SAAS,EACb,OAAO,EAAE,OAAO,GAClB,CACL,GACO,CACf,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './NumberField';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NumberField/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import './number-input.scss';
|
|
2
|
-
import { CommonProps, FormFieldControlProps } from '-/types/common';
|
|
3
|
-
export type NumberInputProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'invalid' | 'name' | 'readOnly' | 'size'> & FormFieldControlProps & {
|
|
4
|
-
/** The value of the control. */
|
|
5
|
-
value?: number;
|
|
6
|
-
/**
|
|
7
|
-
* Callback when the value changes.
|
|
8
|
-
*
|
|
9
|
-
* @required
|
|
10
|
-
*/
|
|
11
|
-
onChange: (value: number | string | undefined) => void;
|
|
12
|
-
/**
|
|
13
|
-
* The alignment of the input box. Centered between the plus and minus buttons or to the left of the buttons.
|
|
14
|
-
*
|
|
15
|
-
* @default center
|
|
16
|
-
*/
|
|
17
|
-
align?: 'center' | 'left';
|
|
18
|
-
/**
|
|
19
|
-
* Defines the [maximum](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/max) value that is
|
|
20
|
-
* accepted.
|
|
21
|
-
*/
|
|
22
|
-
max?: number;
|
|
23
|
-
/**
|
|
24
|
-
* Defines the [minimum](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/min) value that is
|
|
25
|
-
* accepted.
|
|
26
|
-
*
|
|
27
|
-
* @default 0
|
|
28
|
-
*/
|
|
29
|
-
min?: number;
|
|
30
|
-
/**
|
|
31
|
-
* The amount to increment or decrement the value by when the (+) or (-) buttons are pressed.
|
|
32
|
-
*
|
|
33
|
-
* @default 1
|
|
34
|
-
*/
|
|
35
|
-
step?: number;
|
|
36
|
-
};
|
|
37
|
-
/**
|
|
38
|
-
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
39
|
-
* pressing the (+) or (-).
|
|
40
|
-
*
|
|
41
|
-
* The value of the input is a number. The value is clamped to the min and max values if they are provided.
|
|
42
|
-
*
|
|
43
|
-
* @example
|
|
44
|
-
* import { NumberInput } from '@bspk/ui/NumberInput';
|
|
45
|
-
*
|
|
46
|
-
* export function Example() {
|
|
47
|
-
* const [state, setState] = React.useState<number>();
|
|
48
|
-
*
|
|
49
|
-
* return (
|
|
50
|
-
* <NumberInput
|
|
51
|
-
* aria-label="Example aria-label"
|
|
52
|
-
* name="Example name"
|
|
53
|
-
* onChange={(nextValue) => setState(nextValue)}
|
|
54
|
-
* value={state}
|
|
55
|
-
* />
|
|
56
|
-
* );
|
|
57
|
-
* }
|
|
58
|
-
*
|
|
59
|
-
* @name NumberInput
|
|
60
|
-
* @phase Utility
|
|
61
|
-
*/
|
|
62
|
-
export declare function NumberInput({ value: valueProp, onChange, align, size, disabled, readOnly, name, id: inputIdProp, 'aria-label': ariaLabel, max: maxProp, min, invalid, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, step, ...inputElementProps }: NumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
63
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInput.js","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInput.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,O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AAQ,EAAE,CAAC,CAAC,QAAQ,IAAI,KAAK,GAAG,CAAC,GAAG,GAAG,EACvC,SAAS,EAAE,CAAC,EACZ,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,eAAe,GAC9B,IACA,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NumberInputExample.js","sourceRoot":"","sources":["../../../src/components/NumberInput/NumberInputExample.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IAClE,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI;CAC7D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './NumberInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/NumberInput/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import './password-input.scss';
|
|
2
|
-
import { TextInputProps } from '-/components/TextInput';
|
|
3
|
-
export type PasswordInputProps = Pick<TextInputProps, 'aria-describedby' | 'aria-errormessage' | 'aria-label' | 'containerRef' | 'disabled' | 'id' | 'inputProps' | 'inputRef' | 'invalid' | 'name' | 'onChange' | 'readOnly' | 'required' | 'size' | 'value'>;
|
|
4
|
-
/**
|
|
5
|
-
* An input field that is specifically built with a show/hide toggle for entering security passwords.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* import { PasswordInput } from '@bspk/ui/PasswordInput';
|
|
9
|
-
* import { useState } from 'react';
|
|
10
|
-
*
|
|
11
|
-
* function Example() {
|
|
12
|
-
* const [value, setValue] = useState('');
|
|
13
|
-
*
|
|
14
|
-
* return <PasswordInput value={value} onChange={setValue} aria-label="password" name="password" />;
|
|
15
|
-
* }
|
|
16
|
-
*
|
|
17
|
-
* @name PasswordInput
|
|
18
|
-
* @phase UXReview
|
|
19
|
-
*/
|
|
20
|
-
export declare function PasswordInput({ disabled, readOnly, size, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, inputProps, inputRef, name, onChange, required, value, containerRef, id, invalid, ...props }: PasswordInputProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import './password-input.css.js';
|
|
3
|
-
import { useState } from 'react';
|
|
4
|
-
import { Button } from '../Button';
|
|
5
|
-
import { TextInput } from '../TextInput';
|
|
6
|
-
/**
|
|
7
|
-
* An input field that is specifically built with a show/hide toggle for entering security passwords.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* import { PasswordInput } from '@bspk/ui/PasswordInput';
|
|
11
|
-
* import { useState } from 'react';
|
|
12
|
-
*
|
|
13
|
-
* function Example() {
|
|
14
|
-
* const [value, setValue] = useState('');
|
|
15
|
-
*
|
|
16
|
-
* return <PasswordInput value={value} onChange={setValue} aria-label="password" name="password" />;
|
|
17
|
-
* }
|
|
18
|
-
*
|
|
19
|
-
* @name PasswordInput
|
|
20
|
-
* @phase UXReview
|
|
21
|
-
*/
|
|
22
|
-
export function PasswordInput({ disabled, readOnly, size = 'medium', 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, inputProps, inputRef, name, onChange, required, value, containerRef, id, invalid, ...props }) {
|
|
23
|
-
const [isShowingPassword, setIsShowingPassword] = useState(false);
|
|
24
|
-
const togglePasswordVisibility = () => {
|
|
25
|
-
if (disabled || readOnly)
|
|
26
|
-
return;
|
|
27
|
-
setIsShowingPassword((prev) => !prev);
|
|
28
|
-
};
|
|
29
|
-
return (_jsx("div", { ...props, "data-bspk": "password-input", children: _jsx(TextInput, { "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-label": ariaLabel, autoComplete: "off", containerRef: containerRef, disabled: disabled, id: id, inputProps: inputProps, inputRef: inputRef, invalid: invalid, leading: !isShowingPassword && (_jsx(_Fragment, { children: Array.from({ length: value?.length || 0 }, (_, i) => (_jsx("span", {}, i))) })), name: name, onChange: onChange, onClick: (e) => {
|
|
30
|
-
e.currentTarget?.querySelector('input')?.focus();
|
|
31
|
-
}, owner: "password-input", readOnly: readOnly, required: required, showClearButton: false, size: size, trailing: !disabled &&
|
|
32
|
-
!readOnly && (_jsx(Button, { label: isShowingPassword ? 'Hide' : 'Show', onClick: togglePasswordVisibility, variant: "tertiary" })), type: isShowingPassword ? 'text' : 'password', value: value }) }));
|
|
33
|
-
}
|
|
34
|
-
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordInput.js","sourceRoot":"","sources":["../../../src/components/PasswordInput/PasswordInput.tsx"],"names":[],"mappings":";AAAA,OAAO,uBAAuB,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAkB,MAAM,wBAAwB,CAAC;AAqBnE;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,aAAa,CAAC,EAC1B,QAAQ,EACR,QAAQ,EACR,IAAI,GAAG,QAAQ,EACf,YAAY,EAAE,SAAS,EACvB,kBAAkB,EAAE,eAAe,EACnC,mBAAmB,EAAE,gBAAgB,EACrC,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,YAAY,EACZ,EAAE,EACF,OAAO,EACP,GAAG,KAAK,EACS;IACjB,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;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CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,EAC7C,KAAK,EAAE,KAAK,GACd,GACA,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PasswordInput';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PasswordInput/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
[data-bspk=password-input] {
|
|
2
|
-
display: flex;
|
|
3
|
-
flex-direction: column;
|
|
4
|
-
justify-content: center;
|
|
5
|
-
width: 100%;
|
|
6
|
-
}
|
|
7
|
-
[data-bspk=password-input] [data-bspk=text-input] {
|
|
8
|
-
padding-right: 0;
|
|
9
|
-
}
|
|
10
|
-
[data-bspk=password-input] [data-bspk=text-input] [data-bspk=button] {
|
|
11
|
-
font: var(--button-font);
|
|
12
|
-
height: 100%;
|
|
13
|
-
}
|
|
14
|
-
[data-bspk=password-input] [data-disabled] [data-toggle-visibility-button],
|
|
15
|
-
[data-bspk=password-input] [data-readonly] [data-toggle-visibility-button] {
|
|
16
|
-
cursor: default;
|
|
17
|
-
}
|
|
18
|
-
[data-bspk=password-input][data-size=small] {
|
|
19
|
-
--button-font: var(--labels-small);
|
|
20
|
-
}
|
|
21
|
-
[data-bspk=password-input][data-size=medium] {
|
|
22
|
-
--button-font: var(--labels-base);
|
|
23
|
-
}
|
|
24
|
-
[data-bspk=password-input][data-size=large] {
|
|
25
|
-
--button-font: var(--labels-large);
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
/** * This file is generated by the build script.
|
|
2
|
-
* Do not edit this file directly. */
|
|
3
|
-
const style = document.createElement('style');
|
|
4
|
-
style.appendChild(document.createTextNode(`[data-bspk=password-input] {
|
|
5
|
-
display: flex;
|
|
6
|
-
flex-direction: column;
|
|
7
|
-
justify-content: center;
|
|
8
|
-
width: 100%;
|
|
9
|
-
}
|
|
10
|
-
[data-bspk=password-input] [data-bspk=text-input] {
|
|
11
|
-
padding-right: 0;
|
|
12
|
-
}
|
|
13
|
-
[data-bspk=password-input] [data-bspk=text-input] [data-bspk=button] {
|
|
14
|
-
font: var(--button-font);
|
|
15
|
-
height: 100%;
|
|
16
|
-
}
|
|
17
|
-
[data-bspk=password-input] [data-disabled] [data-toggle-visibility-button],
|
|
18
|
-
[data-bspk=password-input] [data-readonly] [data-toggle-visibility-button] {
|
|
19
|
-
cursor: default;
|
|
20
|
-
}
|
|
21
|
-
[data-bspk=password-input][data-size=small] {
|
|
22
|
-
--button-font: var(--labels-small);
|
|
23
|
-
}
|
|
24
|
-
[data-bspk=password-input][data-size=medium] {
|
|
25
|
-
--button-font: var(--labels-base);
|
|
26
|
-
}
|
|
27
|
-
[data-bspk=password-input][data-size=large] {
|
|
28
|
-
--button-font: var(--labels-large);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
32
|
-
`));
|
|
33
|
-
document.head.appendChild(style);
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { FormFieldWrapProps } from '-/components/FormField';
|
|
2
|
-
import { PhoneNumberInputProps } from '-/components/PhoneNumberInput';
|
|
3
|
-
export type PhoneNumberFieldProps = FormFieldWrapProps<PhoneNumberInputProps>;
|
|
4
|
-
/**
|
|
5
|
-
* A text input that allows users to enter text phone numbers with country codes.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* <PhoneNumberField label="Phone Number" initialCountryCode="US" value={value} onChange={onChange} />;
|
|
9
|
-
*
|
|
10
|
-
* @name PhoneNumberField
|
|
11
|
-
* @phase UXReview
|
|
12
|
-
*/
|
|
13
|
-
export declare function PhoneNumberField({ controlId, errorMessage, helperText, invalid, label, labelTrailing, required, ...inputProps }: PhoneNumberFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { FormField } from '../FormField';
|
|
3
|
-
import { PhoneNumberInput } from '../PhoneNumberInput';
|
|
4
|
-
/**
|
|
5
|
-
* A text input that allows users to enter text phone numbers with country codes.
|
|
6
|
-
*
|
|
7
|
-
* @example
|
|
8
|
-
* <PhoneNumberField label="Phone Number" initialCountryCode="US" value={value} onChange={onChange} />;
|
|
9
|
-
*
|
|
10
|
-
* @name PhoneNumberField
|
|
11
|
-
* @phase UXReview
|
|
12
|
-
*/
|
|
13
|
-
export function PhoneNumberField({ controlId, errorMessage, helperText, invalid, label, labelTrailing, required, ...inputProps }) {
|
|
14
|
-
return (_jsx(FormField, { controlId: controlId, "data-bspk": "phone-number-field", errorMessage: errorMessage, helperText: helperText, invalid: invalid, label: label, labelTrailing: labelTrailing, required: required, children: (fieldProps) => _jsx(PhoneNumberInput, { ...inputProps, ...fieldProps, "aria-label": label, invalid: invalid }) }));
|
|
15
|
-
}
|
|
16
|
-
//# sourceMappingURL=PhoneNumberField.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"PhoneNumberField.js","sourceRoot":"","sources":["../../../src/components/PhoneNumberField/PhoneNumberField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAsB,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAE,gBAAgB,EAAyB,MAAM,+BAA+B,CAAC;AAIxF;;;;;;;;GAQG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAC7B,SAAS,EACT,YAAY,EACZ,UAAU,EACV,OAAO,EACP,KAAK,EACL,aAAa,EACb,QAAQ,EACR,GAAG,UAAU,EACO;IACpB,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,SAAS,eACV,oBAAoB,EAC9B,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,YAEjB,CAAC,UAAU,EAAE,EAAE,CAAC,KAAC,gBAAgB,OAAK,UAAU,KAAM,UAAU,gBAAc,KAAK,EAAE,OAAO,EAAE,OAAO,GAAI,GAClG,CACf,CAAC;AACN,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from './PhoneNumberField';
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/PhoneNumberField/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
import './phone-number-input.scss';
|
|
2
|
-
import { TextInputProps } from '-/components/TextInput';
|
|
3
|
-
import { FormFieldControlProps } from '-/types/common';
|
|
4
|
-
import { SupportedCountryCode } from '-/utils/countryCodes';
|
|
5
|
-
export type PhoneNumberInputProps = FormFieldControlProps & Pick<TextInputProps, 'aria-label' | 'disabled' | 'inputRef' | 'invalid' | 'name' | 'readOnly' | 'required' | 'size' | 'value'> & {
|
|
6
|
-
/**
|
|
7
|
-
* The default country code to select when the component is rendered. If not provided, it will attempt to guess
|
|
8
|
-
* based on the user's locale. If the guessed country code is not supported, it will default to 'US'. Based on
|
|
9
|
-
* [ISO](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) 2-digit country codes.
|
|
10
|
-
*
|
|
11
|
-
* @type string
|
|
12
|
-
*/
|
|
13
|
-
initialCountryCode?: SupportedCountryCode;
|
|
14
|
-
/**
|
|
15
|
-
* Disables formatting of the phone number input in the UI. values returned by `onChange` are always
|
|
16
|
-
* unformatted.
|
|
17
|
-
*
|
|
18
|
-
* @type boolean
|
|
19
|
-
*/
|
|
20
|
-
disableFormatting?: boolean;
|
|
21
|
-
/** Handler for change events. Contains the raw phone number value and the selected country code. */
|
|
22
|
-
onChange: (value: string, countryCode: SupportedCountryCode) => void;
|
|
23
|
-
};
|
|
24
|
-
/**
|
|
25
|
-
* A text input that allows users to enter text phone numbers with country codes.
|
|
26
|
-
*
|
|
27
|
-
* This is the base element and if used must contain the field label contextually. This will more often be used in the
|
|
28
|
-
* PhoneNumberField component.
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* <PhoneNumberInput aria-label="Phone Number" initialCountryCode="US" value={value} onChange={onChange} />;
|
|
32
|
-
*
|
|
33
|
-
* @name PhoneNumberInput
|
|
34
|
-
* @phase UXReview
|
|
35
|
-
*/
|
|
36
|
-
export declare function PhoneNumberInput({ value, onChange, disableFormatting, initialCountryCode, disabled, readOnly, 'aria-label': ariaLabel, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, name, ...inputProps }: PhoneNumberInputProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|