@bspk/ui 1.3.2 → 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/InputNumber/InputNumber.js +78 -0
- 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 +20 -11
- package/dist/components/ListItem/ListItem.js +12 -8
- package/dist/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/ListItem/ListItemExample.d.ts +1 -1
- package/dist/components/ListItem/ListItemExample.js +72 -3
- package/dist/components/ListItem/ListItemExample.js.map +1 -1
- package/dist/components/ListItem/list-item.css +13 -7
- package/dist/components/ListItem/list-item.css.js +13 -7
- 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 +2 -1
- package/dist/components/Popover/Popover.js.map +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 +4 -8
- package/dist/components/ProgressionStepper/ProgressionStepper.js +11 -6
- package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +20 -4
- 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 +37 -45
- package/dist/components/SearchBar/SearchBar.js +104 -53
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar/SearchBarExample.js +2 -1
- package/dist/components/SearchBar/SearchBarExample.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 +41 -36
- package/dist/components/Select/Select.js +52 -26
- 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 -3
- package/dist/components/TabList/TabList.js.map +1 -1
- package/dist/components/TabList/tab-list.css +6 -0
- package/dist/components/TabList/tab-list.css.js +6 -0
- 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/useArrowNavigation.js +6 -1
- package/dist/hooks/useArrowNavigation.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 +5 -4
- package/dist/hooks/useOutsideClick.js +14 -3
- package/dist/hooks/useOutsideClick.js.map +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} +61 -56
- 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.rtl.test.tsx +4 -1
- package/src/components/ListItem/ListItem.tsx +48 -23
- package/src/components/ListItem/ListItemExample.tsx +74 -4
- package/src/components/ListItem/list-item.scss +26 -17
- 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 +3 -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 +24 -20
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +20 -4
- 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 -4
- package/src/components/SearchBar/SearchBar.tsx +190 -126
- package/src/components/SearchBar/SearchBarExample.tsx +2 -1
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/components/Select/Select.rtl.test.tsx +6 -5
- package/src/components/Select/Select.tsx +62 -66
- 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 -5
- package/src/components/TabList/tab-list.scss +12 -0
- 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/useArrowNavigation.ts +6 -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 +17 -4
- 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 -102
- 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 +0 -64
- 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 -197
- 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 -358
- 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 @@
|
|
|
1
|
+
export * from './Password';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Password/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[data-bspk-owner=password] [data-bspk=input] {
|
|
2
|
+
padding-right: 0;
|
|
3
|
+
}
|
|
4
|
+
[data-bspk-owner=password] [data-bspk=input] [data-toggle-visibility-button] {
|
|
5
|
+
font: var(--button-font);
|
|
6
|
+
height: 100%;
|
|
7
|
+
}
|
|
8
|
+
[data-bspk-owner=password] [data-bspk=input][data-disabled] [data-toggle-visibility-button], [data-bspk-owner=password] [data-bspk=input][data-readonly] [data-toggle-visibility-button] {
|
|
9
|
+
cursor: default;
|
|
10
|
+
}
|
|
11
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=small] {
|
|
12
|
+
--button-font: var(--labels-small);
|
|
13
|
+
}
|
|
14
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=medium] {
|
|
15
|
+
--button-font: var(--labels-base);
|
|
16
|
+
}
|
|
17
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=large] {
|
|
18
|
+
--button-font: var(--labels-large);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,26 @@
|
|
|
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-owner=password] [data-bspk=input] {
|
|
5
|
+
padding-right: 0;
|
|
6
|
+
}
|
|
7
|
+
[data-bspk-owner=password] [data-bspk=input] [data-toggle-visibility-button] {
|
|
8
|
+
font: var(--button-font);
|
|
9
|
+
height: 100%;
|
|
10
|
+
}
|
|
11
|
+
[data-bspk-owner=password] [data-bspk=input][data-disabled] [data-toggle-visibility-button], [data-bspk-owner=password] [data-bspk=input][data-readonly] [data-toggle-visibility-button] {
|
|
12
|
+
cursor: default;
|
|
13
|
+
}
|
|
14
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=small] {
|
|
15
|
+
--button-font: var(--labels-small);
|
|
16
|
+
}
|
|
17
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=medium] {
|
|
18
|
+
--button-font: var(--labels-base);
|
|
19
|
+
}
|
|
20
|
+
[data-bspk-owner=password] [data-bspk=input][data-size=large] {
|
|
21
|
+
--button-font: var(--labels-large);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
25
|
+
`));
|
|
26
|
+
document.head.appendChild(style);
|
|
@@ -1,31 +1,15 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
export type PasswordFieldProps =
|
|
1
|
+
import { FormFieldControlProps } from '-/components/FormField';
|
|
2
|
+
import { PasswordProps } from '-/components/Password';
|
|
3
|
+
export type PasswordFieldProps = FormFieldControlProps<PasswordProps>;
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A field wrapper for the Password component.
|
|
6
6
|
*
|
|
7
|
-
* This component takes properties from the FormField and
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* import { useState } from 'react';
|
|
11
|
-
* import { PasswordField } from '@bspk/ui/PasswordField';
|
|
12
|
-
*
|
|
13
|
-
* export function Example() {
|
|
14
|
-
* const [value, setValue] = useState<string>('');
|
|
15
|
-
*
|
|
16
|
-
* return (
|
|
17
|
-
* <PasswordField
|
|
18
|
-
* controlId="Example controlId"
|
|
19
|
-
* label="Example label"
|
|
20
|
-
* name="Example name"
|
|
21
|
-
* onChange={setValue}
|
|
22
|
-
* value={value}
|
|
23
|
-
* />
|
|
24
|
-
* );
|
|
25
|
-
* }
|
|
7
|
+
* This component takes properties from the FormField and Password components.
|
|
26
8
|
*
|
|
27
9
|
* @name PasswordField
|
|
28
10
|
* @phase UXReview
|
|
11
|
+
*
|
|
12
|
+
* @generated
|
|
29
13
|
*/
|
|
30
|
-
export declare function PasswordField({
|
|
14
|
+
export declare function PasswordField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: PasswordFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
31
15
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,33 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { FormField } from '../FormField';
|
|
3
|
-
import {
|
|
3
|
+
import { Password } from '../Password';
|
|
4
4
|
/**
|
|
5
|
-
* A
|
|
5
|
+
* A field wrapper for the Password component.
|
|
6
6
|
*
|
|
7
|
-
* This component takes properties from the FormField and
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* import { useState } from 'react';
|
|
11
|
-
* import { PasswordField } from '@bspk/ui/PasswordField';
|
|
12
|
-
*
|
|
13
|
-
* export function Example() {
|
|
14
|
-
* const [value, setValue] = useState<string>('');
|
|
15
|
-
*
|
|
16
|
-
* return (
|
|
17
|
-
* <PasswordField
|
|
18
|
-
* controlId="Example controlId"
|
|
19
|
-
* label="Example label"
|
|
20
|
-
* name="Example name"
|
|
21
|
-
* onChange={setValue}
|
|
22
|
-
* value={value}
|
|
23
|
-
* />
|
|
24
|
-
* );
|
|
25
|
-
* }
|
|
7
|
+
* This component takes properties from the FormField and Password components.
|
|
26
8
|
*
|
|
27
9
|
* @name PasswordField
|
|
28
10
|
* @phase UXReview
|
|
11
|
+
*
|
|
12
|
+
* @generated
|
|
29
13
|
*/
|
|
30
|
-
export function PasswordField({
|
|
31
|
-
return (_jsx(FormField, {
|
|
14
|
+
export function PasswordField({ label, helperText, labelTrailing, errorMessage, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, children: _jsx(Password, { ...controlProps }) }));
|
|
32
16
|
}
|
|
33
17
|
//# sourceMappingURL=PasswordField.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,
|
|
1
|
+
{"version":3,"file":"PasswordField.js","sourceRoot":"","sources":["../../../src/components/PasswordField/PasswordField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAyB,MAAM,wBAAwB,CAAC;AAC1E,OAAO,EAAE,QAAQ,EAAiB,MAAM,uBAAuB,CAAC;AAIhE;;;;;;;;;GASG;AACH,MAAM,UAAU,aAAa,CAAC,EAAE,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,EAAE,GAAG,YAAY,EAAsB;IACjH,OAAO,CACH,KAAC,SAAS,IAAC,YAAY,EAAE,YAAY,EAAE,UAAU,EAAE,UAAU,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,aAAa,YACrG,KAAC,QAAQ,OAAK,YAAY,GAAI,GACtB,CACf,CAAC;AACN,CAAC"}
|
|
@@ -38,7 +38,7 @@ export type PopoverProps = CommonProps<'disabled'> & Pick<UseFloatingProps, 'ref
|
|
|
38
38
|
*
|
|
39
39
|
* @required
|
|
40
40
|
*/
|
|
41
|
-
children: (triggerProps: PopoverTriggerProps) => ReactElement;
|
|
41
|
+
children: (triggerProps: PopoverTriggerProps) => ReactElement | null;
|
|
42
42
|
};
|
|
43
43
|
/**
|
|
44
44
|
* Brief message that provide additional guidance and helps users perform an action if needed.
|
|
@@ -48,7 +48,7 @@ export type PopoverProps = CommonProps<'disabled'> & Pick<UseFloatingProps, 'ref
|
|
|
48
48
|
* import { Popover } from '@bspk/ui/Popover';
|
|
49
49
|
* import { Button } from '@bspk/ui/Button';
|
|
50
50
|
*
|
|
51
|
-
*
|
|
51
|
+
* function Example() {
|
|
52
52
|
* const [showPopover, setShowPopover] = useState<boolean>(false);
|
|
53
53
|
*
|
|
54
54
|
* const togglePopover = () => setShowPopover(!showPopover);
|
|
@@ -72,5 +72,5 @@ export type PopoverProps = CommonProps<'disabled'> & Pick<UseFloatingProps, 'ref
|
|
|
72
72
|
* @name Popover
|
|
73
73
|
* @phase UXReview
|
|
74
74
|
*/
|
|
75
|
-
export declare function Popover({ placement, header, content, callToAction, secondaryCallToAction, children, disabled, refWidth, ...props }: ElementProps<PopoverProps, 'div'>): import("react/jsx-runtime").JSX.Element;
|
|
75
|
+
export declare function Popover({ placement, header, content, callToAction, secondaryCallToAction, children, disabled, refWidth, ...props }: ElementProps<PopoverProps, 'div'>): import("react/jsx-runtime").JSX.Element | null;
|
|
76
76
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -18,7 +18,7 @@ import { cssWithVars } from '../../utils/cwv';
|
|
|
18
18
|
* import { Popover } from '@bspk/ui/Popover';
|
|
19
19
|
* import { Button } from '@bspk/ui/Button';
|
|
20
20
|
*
|
|
21
|
-
*
|
|
21
|
+
* function Example() {
|
|
22
22
|
* const [showPopover, setShowPopover] = useState<boolean>(false);
|
|
23
23
|
*
|
|
24
24
|
* const togglePopover = () => setShowPopover(!showPopover);
|
|
@@ -57,6 +57,7 @@ export function Popover({ placement = 'top', header, content, callToAction, seco
|
|
|
57
57
|
useOutsideClick({
|
|
58
58
|
elements: [elements.floating],
|
|
59
59
|
callback: () => setShow(false),
|
|
60
|
+
disabled: !show,
|
|
60
61
|
});
|
|
61
62
|
const basicArrowX = middlewareData?.arrow?.x ? `${middlewareData.arrow.x}px` : '0px';
|
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AAK,EACzB,OAAO,EAAE,YAAY,CAAC,OAAO,EAC7B,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,SAAS,GACnB,CACL,IACC,IACJ,EACN,kCAEI,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;oCACV,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;gCAC5B,CAAC,EACD,KAAK,EAAE,WAAW,CAAC;oCACf,iBAAiB,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW;oCACvD,gBAAgB,EAAE,GAAG,cAAc,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI;iCACzD,CAAC,GACJ,IACA,GACE,GACP,CACZ,IACF,CACN,CAAC;AACN,CAAC"}
|
|
@@ -16,7 +16,7 @@ export const PopoverExample = ({ action }) => ({
|
|
|
16
16
|
label: 'CTA Button',
|
|
17
17
|
onClick: () => action('Call to action clicked!'),
|
|
18
18
|
},
|
|
19
|
-
children: () =>
|
|
19
|
+
children: () => null,
|
|
20
20
|
},
|
|
21
21
|
},
|
|
22
22
|
{
|
|
@@ -32,7 +32,7 @@ export const PopoverExample = ({ action }) => ({
|
|
|
32
32
|
label: 'Secondary',
|
|
33
33
|
onClick: () => action('Secondary call to action clicked!'),
|
|
34
34
|
},
|
|
35
|
-
children: () =>
|
|
35
|
+
children: () => null,
|
|
36
36
|
},
|
|
37
37
|
},
|
|
38
38
|
],
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverExample.js","sourceRoot":"","sources":["../../../src/components/Popover/PopoverExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC,MAAM,CAAC,MAAM,cAAc,GAAqC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7E,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM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AG,KAAK,CAAC,SAAS,EAAE,EAAE,OAAO,EAAC,WAAW,KAAK,YAAY,GAAI,GACxF,IACb,CACN,CAAC;IACN,CAAC;IACD,OAAO,EAAE;QACL;YACI,KAAK,EAAE,mBAAmB;YAC1B,SAAS,EAAE;gBACP,MAAM,EAAE,mBAAmB;gBAC3B,OAAO,EAAE,wBAAwB;gBACjC,YAAY,EAAE;oBACV,KAAK,EAAE,YAAY;oBACnB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,yBAAyB,CAAC;iBACnD;gBACD,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;aACvB;SACJ;QACD;YACI,KAAK,EAAE,yBAAyB;YAChC,SAAS,EAAE;gBACP,MAAM,EAAE,yBAAyB;gBACjC,OAAO,EAAE,8BAA8B;gBACvC,YAAY,EAAE;oBACV,KAAK,EAAE,SAAS;oBAChB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,iCAAiC,CAAC;iBAC3D;gBACD,qBAAqB,EAAE;oBACnB,KAAK,EAAE,WAAW;oBAClB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,mCAAmC,CAAC;iBAC7D;gBACD,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;aACvB;SACJ;KACJ;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -37,16 +37,12 @@ export type ProgressionStepperProps = {
|
|
|
37
37
|
*/
|
|
38
38
|
steps: ProgressionStepperItem[];
|
|
39
39
|
/**
|
|
40
|
-
* The
|
|
41
|
-
*
|
|
42
|
-
* If the current step is greater than the number of steps, all steps with be completed.
|
|
43
|
-
*
|
|
44
|
-
* If the current step is less than 1, all steps will be incomplete.
|
|
40
|
+
* The last completed step in the progress bar. This is only applicable for the 'widget' variant.
|
|
45
41
|
*
|
|
46
42
|
* @default 0
|
|
47
43
|
* @minimum 0
|
|
48
44
|
*/
|
|
49
|
-
|
|
45
|
+
completedStep?: number;
|
|
50
46
|
/**
|
|
51
47
|
* The variant of the progress bar. Can be either horizontal, vertical, or widget.
|
|
52
48
|
*
|
|
@@ -62,12 +58,12 @@ export type ProgressionStepperProps = {
|
|
|
62
58
|
* @example
|
|
63
59
|
* import { ProgressionStepper } from '@bspk/ui/ProgressionStepper';
|
|
64
60
|
*
|
|
65
|
-
*
|
|
61
|
+
* function Example() {
|
|
66
62
|
* return <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
67
63
|
* }
|
|
68
64
|
*
|
|
69
65
|
* @name ProgressionStepper
|
|
70
66
|
* @phase UXReview
|
|
71
67
|
*/
|
|
72
|
-
export declare function ProgressionStepper({ steps,
|
|
68
|
+
export declare function ProgressionStepper({ steps, completedStep: completedStepProp, variant, ...containerProps }: ElementProps<ProgressionStepperProps, 'div'>): import("react/jsx-runtime").JSX.Element | null;
|
|
73
69
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -7,21 +7,26 @@ import { SvgCheck } from '@bspk/icons/Check';
|
|
|
7
7
|
* @example
|
|
8
8
|
* import { ProgressionStepper } from '@bspk/ui/ProgressionStepper';
|
|
9
9
|
*
|
|
10
|
-
*
|
|
10
|
+
* function Example() {
|
|
11
11
|
* return <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
12
12
|
* }
|
|
13
13
|
*
|
|
14
14
|
* @name ProgressionStepper
|
|
15
15
|
* @phase UXReview
|
|
16
16
|
*/
|
|
17
|
-
export function ProgressionStepper({ steps = [],
|
|
18
|
-
const
|
|
19
|
-
|
|
17
|
+
export function ProgressionStepper({ steps = [], completedStep: completedStepProp = 0, variant = 'horizontal', ...containerProps }) {
|
|
18
|
+
const completedStepNumber = Math.max(0, Math.min(completedStepProp, steps.length));
|
|
19
|
+
const currentStepNumber = Math.min(completedStepNumber + 1, steps.length);
|
|
20
|
+
const currentStep = steps[currentStepNumber - 1];
|
|
21
|
+
if (!steps?.length)
|
|
22
|
+
return null;
|
|
23
|
+
return (_jsxs("div", { ...containerProps, "data-bspk": "progression-stepper", "data-variant": variant, children: [variant === 'widget' && (_jsxs("label", { children: [_jsx("span", { "data-title": true, children: currentStep.name }), _jsx("span", { "data-subtitle": true, children: currentStep?.subtext ||
|
|
24
|
+
(completedStepNumber === steps.length ? ('Completed') : (_jsxs(_Fragment, { children: ["Step ", currentStepNumber, " of ", steps.length] }))) })] })), _jsx("ol", { children: steps.map(({ name, subtext }, index) => {
|
|
20
25
|
const stepNum = index + 1;
|
|
21
26
|
let status = 'incomplete';
|
|
22
|
-
if (
|
|
27
|
+
if (completedStepNumber >= stepNum)
|
|
23
28
|
status = 'complete';
|
|
24
|
-
else if (
|
|
29
|
+
else if (completedStepNumber + 1 === stepNum)
|
|
25
30
|
status = 'current';
|
|
26
31
|
return (_jsxs("li", { "aria-current": status === 'current' ? 'step' : undefined, "data-status": status, "data-step": stepNum, children: [_jsxs("span", { "data-line-circle": true, children: [_jsx("span", { "data-line": "before" }), _jsx("span", { "data-circle": true, children: status === 'complete' ? (_jsx(SvgCheck, { "aria-hidden": true })) : ((variant !== 'widget' || status === 'current') && _jsx("span", { children: stepNum })) }), _jsx("span", { "data-line": "after" })] }), variant !== 'widget' && (_jsxs("span", { "data-content": true, children: [_jsx("span", { "data-name": true, children: name }), subtext && _jsx("span", { "data-subtext": true, children: subtext })] }))] }, `step-${index}`));
|
|
27
32
|
}) })] }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressionStepper.js","sourceRoot":"","sources":["../../../src/components/ProgressionStepper/ProgressionStepper.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"ProgressionStepper.js","sourceRoot":"","sources":["../../../src/components/ProgressionStepper/ProgressionStepper.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CA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K,OAAO;wBAAE,MAAM,GAAG,SAAS,CAAC;oBAEjE,OAAO,CACH,8BACkB,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,iBAC1C,MAAM,eACR,OAAO,aAGlB,qDACI,4BAAgB,QAAQ,GAAG,EAC3B,8CACK,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CACrB,KAAC,QAAQ,mBAAc,IAAI,GAAI,CAClC,CAAC,CAAC,CAAC,CACA,CAAC,OAAO,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,yBAAO,OAAO,GAAQ,CAC3E,GACE,EACP,4BAAgB,OAAO,GAAG,IACvB,EACN,OAAO,KAAK,QAAQ,IAAI,CACrB,iDACI,4CAAiB,IAAI,GAAQ,EAC5B,OAAO,IAAI,+CAAoB,OAAO,GAAQ,IAC5C,CACV,KAlBI,QAAQ,KAAK,EAAE,CAmBnB,CACR,CAAC;gBACN,CAAC,CAAC,GACD,IACH,CACT,CAAC;AACN,CAAC"}
|
|
@@ -3,7 +3,7 @@ export const presets = [
|
|
|
3
3
|
label: 'Horizontal',
|
|
4
4
|
propState: {
|
|
5
5
|
variant: 'horizontal',
|
|
6
|
-
|
|
6
|
+
completedStep: 2,
|
|
7
7
|
steps: [{ name: 'Name of step 1' }, { name: 'Name of step 2' }, { name: 'Name of step 3' }],
|
|
8
8
|
},
|
|
9
9
|
},
|
|
@@ -11,7 +11,7 @@ export const presets = [
|
|
|
11
11
|
label: 'Vertical',
|
|
12
12
|
propState: {
|
|
13
13
|
variant: 'vertical',
|
|
14
|
-
|
|
14
|
+
completedStep: 2,
|
|
15
15
|
steps: [
|
|
16
16
|
{
|
|
17
17
|
name: 'Name of step 1',
|
|
@@ -32,7 +32,7 @@ export const presets = [
|
|
|
32
32
|
label: 'Widget',
|
|
33
33
|
propState: {
|
|
34
34
|
variant: 'widget',
|
|
35
|
-
|
|
35
|
+
completedStep: 3,
|
|
36
36
|
steps: [
|
|
37
37
|
{ name: 'Name of step 1' },
|
|
38
38
|
{ name: 'Name of step 2' },
|
|
@@ -40,7 +40,23 @@ export const presets = [
|
|
|
40
40
|
{ name: 'Name of step 4' },
|
|
41
41
|
{ name: 'Name of step 5' },
|
|
42
42
|
{ name: 'Name of step 6' },
|
|
43
|
-
{ name: '
|
|
43
|
+
{ name: 'Review' },
|
|
44
|
+
],
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
label: 'Widget (w/ subtext)',
|
|
49
|
+
propState: {
|
|
50
|
+
variant: 'widget',
|
|
51
|
+
completedStep: 6,
|
|
52
|
+
steps: [
|
|
53
|
+
{ name: 'Name of step 1' },
|
|
54
|
+
{ name: 'Name of step 2' },
|
|
55
|
+
{ name: 'Name of step 3' },
|
|
56
|
+
{ name: 'Name of step 4' },
|
|
57
|
+
{ name: 'Name of step 5' },
|
|
58
|
+
{ name: 'Name of step 6' },
|
|
59
|
+
{ name: 'Review', subtext: `Whoop, there it is...` },
|
|
44
60
|
],
|
|
45
61
|
},
|
|
46
62
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressionStepperExample.js","sourceRoot":"","sources":["../../../src/components/ProgressionStepper/ProgressionStepperExample.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,OAAO,GAAsC;IACtD;QACI,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE;YACP,OAAO,EAAE,YAAY;YACrB,
|
|
1
|
+
{"version":3,"file":"ProgressionStepperExample.js","sourceRoot":"","sources":["../../../src/components/ProgressionStepper/ProgressionStepperExample.tsx"],"names":[],"mappings":"AAGA,MAAM,CAAC,MAAM,OAAO,GAAsC;IACtD;QACI,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE;YACP,OAAO,EAAE,YAAY;YACrB,aAAa,EAAE,CAAC;YAChB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,gBAAgB,EAAE,EAAE,EAAE,IAAI,EAAE,g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AuB,EAAE;aACvD;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAA8C;IAChF,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACjC,OAAO;CACV,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import './radio.scss';
|
|
2
2
|
import { ChangeEvent } from 'react';
|
|
3
|
-
import { ElementProps,
|
|
4
|
-
export type RadioProps =
|
|
3
|
+
import { ElementProps, FieldControlProps } from '-/types/common';
|
|
4
|
+
export type RadioProps = Omit<FieldControlProps<string, ChangeEvent<HTMLInputElement>>, 'onChange' | 'readOnly'> & {
|
|
5
5
|
/**
|
|
6
6
|
* Marks the radio as checked.
|
|
7
7
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;
|
|
1
|
+
{"version":3,"file":"Radio.js","sourceRoot":"","sources":["../../../src/components/Radio/Radio.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AAmBtB;;;;;;;;GAQG;AACH,MAAM,UAAU,KAAK,CAAC,KAAwC;IAC1D,MAAM,EAAE,OAAO,GAAG,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAK,CAAC;IAE9E,OAAO,CACH,6BAAgB,OAAO,aACnB,mBACQ,UAAU,EACd,OAAO,EAAE,CAAC,CAAC,OAAO,kBACJ,OAAO,IAAI,SAAS,EAClC,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAC/B,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,CAAC,EAC5D,IAAI,EAAC,OAAO,GACd,EACF,qCAAoB,IACjB,CACV,CAAC;AACN,CAAC"}
|
|
@@ -1,26 +1,9 @@
|
|
|
1
1
|
import './radio-group.scss';
|
|
2
|
+
import { RadioProps } from '-/components/Radio';
|
|
2
3
|
import { RadioOptionProps } from '-/components/RadioOption';
|
|
3
|
-
import { ElementProps,
|
|
4
|
-
export type RadioGroupOption = Pick<RadioOptionProps, 'checked' | 'description' | 'disabled' | 'label'
|
|
5
|
-
export type RadioGroupProps =
|
|
6
|
-
/**
|
|
7
|
-
* The value of the control.
|
|
8
|
-
*
|
|
9
|
-
* @example
|
|
10
|
-
* 1;
|
|
11
|
-
*
|
|
12
|
-
* @required
|
|
13
|
-
*/
|
|
14
|
-
value: string;
|
|
15
|
-
/**
|
|
16
|
-
* The function to call when the radios are changed.
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* (value) => setState({ value }),
|
|
20
|
-
*
|
|
21
|
-
* @required
|
|
22
|
-
*/
|
|
23
|
-
onChange: (value: string) => void;
|
|
4
|
+
import { ElementProps, FieldControlProps } from '-/types/common';
|
|
5
|
+
export type RadioGroupOption = Pick<RadioOptionProps, 'checked' | 'description' | 'disabled' | 'label'> & Pick<RadioProps, 'value'>;
|
|
6
|
+
export type RadioGroupProps = FieldControlProps & {
|
|
24
7
|
/**
|
|
25
8
|
* The options for the radios.
|
|
26
9
|
*
|
|
@@ -42,18 +25,6 @@ export type RadioGroupProps = CommonProps<'disabled' | 'name'> & FormFieldContro
|
|
|
42
25
|
* @required
|
|
43
26
|
*/
|
|
44
27
|
options: RadioGroupOption[];
|
|
45
|
-
/**
|
|
46
|
-
* The label of the radio group.
|
|
47
|
-
*
|
|
48
|
-
* @required
|
|
49
|
-
*/
|
|
50
|
-
label: string;
|
|
51
|
-
/**
|
|
52
|
-
* Hides the RadioGroup label. When label isn't showing it is used as the aria-label prop.
|
|
53
|
-
*
|
|
54
|
-
* @default false
|
|
55
|
-
*/
|
|
56
|
-
hideLabel?: boolean;
|
|
57
28
|
};
|
|
58
29
|
/**
|
|
59
30
|
* A group of radios that allows users to choose one or more items from a list or turn an feature on or off.
|
|
@@ -62,12 +33,12 @@ export type RadioGroupProps = CommonProps<'disabled' | 'name'> & FormFieldContro
|
|
|
62
33
|
* import { useState } from 'react';
|
|
63
34
|
* import { RadioGroup } from '@bspk/ui/RadioGroup';
|
|
64
35
|
*
|
|
65
|
-
*
|
|
36
|
+
* function Example() {
|
|
66
37
|
* const [selectedOption, setSelectedOption] = useState<string>('1');
|
|
67
38
|
*
|
|
68
39
|
* return (
|
|
69
40
|
* <RadioGroup
|
|
70
|
-
* name="
|
|
41
|
+
* name="example-name"
|
|
71
42
|
* onChange={(nextValue) => setSelectedOption(nextValue)}
|
|
72
43
|
* options={[
|
|
73
44
|
* {
|
|
@@ -86,5 +57,5 @@ export type RadioGroupProps = CommonProps<'disabled' | 'name'> & FormFieldContro
|
|
|
86
57
|
* @name RadioGroup
|
|
87
58
|
* @phase UXReview
|
|
88
59
|
*/
|
|
89
|
-
export declare function RadioGroup({ onChange, options, name, value: groupValue,
|
|
60
|
+
export declare function RadioGroup({ onChange, options, name, value: groupValue, disabled, readOnly, invalid: invalidProp, required, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-errormessage': ariaErrorMessageProp, ...props }: ElementProps<RadioGroupProps, 'div'>): import("react/jsx-runtime").JSX.Element;
|
|
90
61
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import './radio-group.css.js';
|
|
3
|
+
import { useFieldInit } from '../Field';
|
|
3
4
|
import { RadioOption } from '../RadioOption';
|
|
4
|
-
import { useId } from '../../hooks/useId';
|
|
5
5
|
/**
|
|
6
6
|
* A group of radios that allows users to choose one or more items from a list or turn an feature on or off.
|
|
7
7
|
*
|
|
@@ -9,12 +9,12 @@ import { useId } from '../../hooks/useId';
|
|
|
9
9
|
* import { useState } from 'react';
|
|
10
10
|
* import { RadioGroup } from '@bspk/ui/RadioGroup';
|
|
11
11
|
*
|
|
12
|
-
*
|
|
12
|
+
* function Example() {
|
|
13
13
|
* const [selectedOption, setSelectedOption] = useState<string>('1');
|
|
14
14
|
*
|
|
15
15
|
* return (
|
|
16
16
|
* <RadioGroup
|
|
17
|
-
* name="
|
|
17
|
+
* name="example-name"
|
|
18
18
|
* onChange={(nextValue) => setSelectedOption(nextValue)}
|
|
19
19
|
* options={[
|
|
20
20
|
* {
|
|
@@ -33,10 +33,16 @@ import { useId } from '../../hooks/useId';
|
|
|
33
33
|
* @name RadioGroup
|
|
34
34
|
* @phase UXReview
|
|
35
35
|
*/
|
|
36
|
-
export function RadioGroup({ onChange, options = [], name, value: groupValue,
|
|
37
|
-
const id =
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
36
|
+
export function RadioGroup({ onChange, options = [], name, value: groupValue, disabled = false, readOnly, invalid: invalidProp, required, id: idProp, 'aria-describedby': ariaDescribedByProp, 'aria-errormessage': ariaErrorMessageProp, ...props }) {
|
|
37
|
+
const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
|
|
38
|
+
idProp,
|
|
39
|
+
required,
|
|
40
|
+
disabled,
|
|
41
|
+
readOnly,
|
|
42
|
+
invalidProp,
|
|
43
|
+
});
|
|
44
|
+
return (_jsx("div", { ...props, "aria-describedby": ariaDescribedByProp || ariaDescribedBy || undefined, "data-bspk": "radio-group", id: id, role: "radiogroup", children: _jsx("div", { role: "presentation", children: options.map(({ label, description, value, ...option }, index) => {
|
|
45
|
+
return (_jsx(RadioOption, { "aria-describedby": ariaDescribedByProp || ariaDescribedBy || undefined, "aria-errormessage": ariaErrorMessageProp || ariaErrorMessage || undefined, checked: groupValue === value, description: description, disabled: disabled || option.disabled, invalid: invalid || undefined, label: label, name: name, onChange: (checked) => checked && onChange(value), required: required, value: value }, `radio-option-${value || index}`));
|
|
46
|
+
}) }) }));
|
|
41
47
|
}
|
|
42
48
|
//# sourceMappingURL=RadioGroup.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"RadioGroup.js","sourceRoot":"","sources":["../../../src/components/RadioGroup/RadioGroup.tsx"],"names":[],"mappings":";AAAA,OAAO,oBAAoB,CAAC;AAC5B,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,EAAE,WAAW,EAAoB,MAAM,0BAA0B,CAAC;AA8BzE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA8BG;AACH,MAAM,UAAU,UAAU,CAAC,EACvB,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,IAAI,EACJ,KAAK,EAAE,UAAU,EACjB,QAAQ,GAAG,KAAK,EAChB,QAAQ,EACR,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,kBAAkB,EAAE,mBAAmB,EACvC,mBAAmB,EAAE,oBAAoB,EACzC,GAAG,KAAK,EAC2B;IACnC,MAAM,EAAE,EAAE,EAAE,eAAe,EAAE,gBAAgB,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC;QACpE,MAAM;QACN,QAAQ;QACR,QAAQ;QACR,QAAQ;QACR,WAAW;KACd,CAAC,CAAC;IAEH,OAAO,CACH,iBACQ,KAAK,sBACS,mBAAmB,IAAI,eAAe,IAAI,SAAS,eAC3D,aAAa,EACvB,EAAE,EAAE,EAAE,EACN,IAAI,EAAC,YAAY,YAEjB,cAAK,IAAI,EAAC,cAAc,YACnB,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,WAAW,EAAE,KAAK,EAAE,GAAG,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE;gBAC7D,OAAO,CACH,KAAC,WAAW,wBACU,mBAAmB,IAAI,eAAe,IAAI,SAAS,uBAClD,oBAAoB,IAAI,gBAAgB,IAAI,SAAS,EACxE,OAAO,EAAE,UAAU,KAAK,KAAK,EAC7B,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,IAAI,MAAM,CAAC,QAAQ,EACrC,OAAO,EAAE,OAAO,IAAI,SAAS,EAE7B,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,IAAI,QAAQ,CAAC,KAAK,CAAC,EACjD,QAAQ,EAAE,QAAQ,EAClB,KAAK,EAAE,KAAK,IALP,gBAAgB,KAAK,IAAI,KAAK,EAAE,CAMvC,CACL,CAAC;YACN,CAAC,CAAC,GACA,GACJ,CACT,CAAC;AACN,CAAC"}
|
|
@@ -4,8 +4,9 @@ const style = document.createElement('style');
|
|
|
4
4
|
style.appendChild(document.createTextNode(`[data-bspk=radio-group] {
|
|
5
5
|
display: flex;
|
|
6
6
|
flex-direction: column;
|
|
7
|
-
gap:
|
|
7
|
+
gap: 0;
|
|
8
8
|
max-width: 100%;
|
|
9
|
+
--list-item-height: "auto";
|
|
9
10
|
}
|
|
10
11
|
`));
|
|
11
12
|
document.head.appendChild(style);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { FormFieldControlProps } from '-/components/FormField';
|
|
2
|
+
import { RadioGroupProps } from '-/components/RadioGroup';
|
|
3
|
+
export type RadioGroupFieldProps = FormFieldControlProps<RadioGroupProps>;
|
|
4
|
+
/**
|
|
5
|
+
* A field wrapper for the RadioGroup component.
|
|
6
|
+
*
|
|
7
|
+
* This component takes properties from the FormField and RadioGroup components.
|
|
8
|
+
*
|
|
9
|
+
* @name RadioGroupField
|
|
10
|
+
* @phase UXReview
|
|
11
|
+
*
|
|
12
|
+
* @generated
|
|
13
|
+
*/
|
|
14
|
+
export declare function RadioGroupField({ label, helperText, labelTrailing, errorMessage, ...controlProps }: RadioGroupFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|