@bspk/ui 1.3.3 → 1.3.5
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/Avatar/Avatar.d.ts +3 -3
- package/dist/components/Avatar/Avatar.js +8 -8
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarExample.js +1 -1
- package/dist/components/Avatar/AvatarExample.js.map +1 -1
- package/dist/components/Avatar/avatar.css +5 -1
- package/dist/components/Avatar/avatar.css.js +5 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +12 -7
- package/dist/components/AvatarGroup/AvatarGroup.js +6 -7
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroupExample.js +36 -9
- package/dist/components/AvatarGroup/AvatarGroupExample.js.map +1 -1
- package/dist/components/AvatarGroup/Overflow.d.ts +11 -0
- package/dist/components/AvatarGroup/Overflow.js +37 -0
- package/dist/components/AvatarGroup/Overflow.js.map +1 -0
- package/dist/components/AvatarGroup/avatar-group.css +27 -13
- package/dist/components/AvatarGroup/avatar-group.css.js +27 -13
- package/dist/components/Badge/BadgeExample.js +1 -1
- package/dist/components/Badge/BadgeExample.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js.map +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 +7 -3
- 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/Card/Card.d.ts +2 -1
- package/dist/components/Card/Card.js +2 -2
- package/dist/components/Card/Card.js.map +1 -1
- 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 +10 -29
- package/dist/components/CheckboxGroup/CheckboxGroup.js +19 -9
- 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/CheckboxOption/CheckboxOption.d.ts +3 -2
- package/dist/components/CheckboxOption/CheckboxOption.js +2 -2
- package/dist/components/CheckboxOption/CheckboxOption.js.map +1 -1
- 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 +3 -3
- package/dist/components/Fab/Fab.js +1 -1
- package/dist/components/Fab/Fab.js.map +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 +33 -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 +3 -3
- package/dist/components/Layout/Layout.js +1 -1
- package/dist/components/Layout/Layout.js.map +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 +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 +9 -2
- package/dist/components/Menu/Menu.js +2 -2
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/MenuExample.js +2 -2
- package/dist/components/Menu/MenuExample.js.map +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/ProgressCircle/progress-circle.css +2 -0
- package/dist/components/ProgressCircle/progress-circle.css.js +2 -0
- 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 +7 -7
- 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 +47 -35
- package/dist/components/Select/Select.js +52 -23
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.js +36 -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/SkeletonText/SkeletonText.js +1 -1
- package/dist/components/SkeletonText/SkeletonText.js.map +1 -1
- package/dist/components/Slider/slider.css +1 -0
- package/dist/components/Slider/slider.css.js +1 -0
- 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 -32
- 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 +139 -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.d.ts +3 -3
- package/dist/components/ToggleOption/ToggleOption.js +4 -3
- 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/Truncated/Truncated.d.ts +2 -2
- package/dist/components/Truncated/Truncated.js.map +1 -1
- package/dist/components/Txt/Txt.d.ts +3 -3
- package/dist/components/Txt/Txt.js +1 -1
- package/dist/components/Txt/Txt.js.map +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.d.ts +0 -2
- package/dist/hooks/useArrowNavigation.js +0 -2
- package/dist/hooks/useArrowNavigation.js.map +1 -1
- package/dist/hooks/useCheckboxGroupState.d.ts +8 -11
- package/dist/hooks/useCheckboxGroupState.js +8 -11
- package/dist/hooks/useCheckboxGroupState.js.map +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/useFloating.js +8 -7
- package/dist/hooks/useFloating.js.map +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 +7 -0
- package/dist/styles/base.css.js +7 -0
- package/dist/types/common.d.ts +29 -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 +5 -4
- package/package.json +37 -39
- package/src/components/Avatar/Avatar.tsx +10 -11
- package/src/components/Avatar/AvatarExample.tsx +1 -1
- package/src/components/Avatar/avatar.scss +6 -1
- package/src/components/AvatarGroup/AvatarGroup.tsx +21 -25
- package/src/components/AvatarGroup/AvatarGroupExample.tsx +35 -9
- package/src/components/AvatarGroup/Overflow.tsx +91 -0
- package/src/components/AvatarGroup/avatar-group.scss +34 -14
- package/src/components/Badge/BadgeExample.tsx +1 -1
- package/src/components/BadgeDot/BadgeDotExample.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 +9 -3
- 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/Card/Card.tsx +3 -2
- package/src/components/Checkbox/Checkbox.tsx +28 -26
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +77 -81
- 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 +37 -0
- package/src/components/CheckboxGroupField/index.tsx +1 -0
- package/src/components/CheckboxOption/CheckboxOption.tsx +4 -1
- 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 +37 -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 +3 -3
- 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 +49 -61
- 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/{MenuButton/MenuButton.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 +37 -0
- package/src/components/InputField/index.tsx +1 -0
- package/src/components/{NumberInput/NumberInput.rtl.test.tsx → InputNumber/InputNumber.rtl.test.tsx} +3 -3
- 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 +37 -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 +37 -0
- package/src/components/InputPhoneField/index.tsx +1 -0
- package/src/components/Layout/Layout.tsx +3 -3
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/ListItem/ListItem.tsx +32 -14
- package/src/components/ListItem/ListItemExample.tsx +3 -3
- package/src/components/ListItem/list-item.scss +6 -1
- package/src/components/Menu/Menu.tsx +10 -2
- package/src/components/Menu/MenuExample.tsx +2 -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 +13 -43
- 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/ProgressCircle/progress-circle.scss +2 -0
- 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 +63 -85
- 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 +37 -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 +10 -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 +68 -57
- package/src/components/Select/SelectExample.tsx +36 -14
- package/src/components/SelectField/SelectField.rtl.test.tsx +9 -6
- package/src/components/SelectField/SelectField.tsx +10 -44
- package/src/components/Skeleton/SkeletonExample.tsx +1 -3
- package/src/components/SkeletonText/SkeletonText.tsx +1 -1
- package/src/components/Slider/slider.scss +1 -0
- 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 +40 -41
- package/src/components/Textarea/textarea.scss +41 -19
- package/src/components/TextareaField/TextareaField.rtl.test.tsx +4 -11
- package/src/components/TextareaField/TextareaField.tsx +13 -65
- 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} +117 -70
- 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 +37 -0
- package/src/components/TimePickerField/index.tsx +1 -0
- package/src/components/ToggleOption/ToggleOption.tsx +29 -23
- package/src/components/Tooltip/Tooltip.tsx +1 -1
- package/src/components/Tooltip/TooltipExample.tsx +7 -9
- package/src/components/Truncated/Truncated.tsx +2 -2
- package/src/components/Txt/Txt.tsx +3 -3
- package/src/constants/brands.ts +5 -1
- package/src/hooks/useArrowNavigation.ts +0 -2
- package/src/hooks/useCheckboxGroupState.ts +8 -11
- package/src/hooks/useCheckboxState.ts +1 -1
- package/src/hooks/useContainerWidth.tsx +1 -1
- package/src/hooks/useFloating.ts +8 -7
- 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 +7 -0
- package/src/types/common.ts +39 -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/MenuButton/MenuButton.d.ts +0 -19
- package/dist/components/MenuButton/MenuButton.js +0 -20
- package/dist/components/MenuButton/MenuButton.js.map +0 -1
- package/dist/components/MenuButton/index.d.ts +0 -1
- package/dist/components/MenuButton/index.js +0 -2
- package/dist/components/MenuButton/index.js.map +0 -1
- package/dist/components/MenuButton/menu-button.css +0 -16
- package/dist/components/MenuButton/menu-button.css.js +0 -21
- 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/MenuButton/MenuButton.tsx +0 -29
- package/src/components/MenuButton/index.tsx +0 -1
- package/src/components/MenuButton/menu-button.scss +0 -16
- 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.rtl.test.tsx +0 -24
- 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,8 +1,8 @@
|
|
|
1
1
|
import './list-item.scss';
|
|
2
|
-
import { AnchorHTMLAttributes, ElementType, ReactNode, MouseEvent, AriaAttributes, AriaRole } from 'react';
|
|
2
|
+
import { AnchorHTMLAttributes, ElementType, ReactNode, MouseEvent, AriaAttributes, AriaRole, ComponentProps } from 'react';
|
|
3
3
|
import { ListItemButton } from './ListItemButton';
|
|
4
4
|
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
5
|
-
export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'active' | 'owner'> & Pick<AriaAttributes, 'aria-label'> & {
|
|
5
|
+
export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'active' | 'owner' | 'style'> & Pick<AriaAttributes, 'aria-label'> & {
|
|
6
6
|
/**
|
|
7
7
|
* The element type to render as.
|
|
8
8
|
*
|
|
@@ -19,12 +19,16 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
19
19
|
* @options Icon, Img, Avatar
|
|
20
20
|
*/
|
|
21
21
|
leading?: ReactNode;
|
|
22
|
+
/** Props to pass to the leading element wrapper span. */
|
|
23
|
+
leadingProps?: ComponentProps<'span'>;
|
|
22
24
|
/**
|
|
23
25
|
* The label to display in the ListItem.
|
|
24
26
|
*
|
|
25
27
|
* @required
|
|
26
28
|
*/
|
|
27
29
|
label: string;
|
|
30
|
+
/** Props to pass to the label wrapper span. */
|
|
31
|
+
labelProps?: ComponentProps<'span'>;
|
|
28
32
|
/** The subtext to display in the ListItem. */
|
|
29
33
|
subText?: string;
|
|
30
34
|
/**
|
|
@@ -37,6 +41,8 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
37
41
|
* @options Checkbox, Icon, ListItemButton, Radio, Switch, Tag, Txt
|
|
38
42
|
*/
|
|
39
43
|
trailing?: ReactNode;
|
|
44
|
+
/** Props to pass to the trailing element wrapper span. */
|
|
45
|
+
trailingProps?: ComponentProps<'span'>;
|
|
40
46
|
/**
|
|
41
47
|
* The [href](https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/a#href) of the list item.
|
|
42
48
|
*
|
|
@@ -63,18 +69,21 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
63
69
|
* If not provided, a unique ID will be generated. This is useful for accessibility and testing purposes.
|
|
64
70
|
*/
|
|
65
71
|
id?: string;
|
|
66
|
-
/**
|
|
67
|
-
* Whether to hide the label from screen readers. Use this when the label is redundant with other context, such
|
|
68
|
-
* as within a ListItemMenu or Label.
|
|
69
|
-
*
|
|
70
|
-
* @default false
|
|
71
|
-
*/
|
|
72
|
-
hideAriaLabel?: boolean;
|
|
73
72
|
/**
|
|
74
73
|
* Indicates the current "selected" state of the list item when used in a selectable context, such as within a
|
|
75
74
|
* ListItemMenu.
|
|
76
75
|
*/
|
|
77
76
|
'aria-selected'?: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Determines how the ListItem uses horizontal space.
|
|
79
|
+
*
|
|
80
|
+
* If set to 'fill', options expand to fill the container's width.
|
|
81
|
+
*
|
|
82
|
+
* If set to 'hug', options only take up as much space as the content requires.
|
|
83
|
+
*
|
|
84
|
+
* @default fill
|
|
85
|
+
*/
|
|
86
|
+
width?: 'fill' | 'hug';
|
|
78
87
|
};
|
|
79
88
|
/**
|
|
80
89
|
* A hybrid interactive component that is used frequently to organize content and offers a wide range of control and
|
|
@@ -94,7 +103,7 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
94
103
|
* import { SvgSquare } from '@bspk/icons/Square';
|
|
95
104
|
* import { ListItem } from '@bspk/ui/ListItem';
|
|
96
105
|
*
|
|
97
|
-
*
|
|
106
|
+
* function Example() {
|
|
98
107
|
* return (
|
|
99
108
|
* <ListItem
|
|
100
109
|
* label="Example label"
|
|
@@ -108,7 +117,7 @@ export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'a
|
|
|
108
117
|
* @name ListItem
|
|
109
118
|
* @phase UXReview
|
|
110
119
|
*/
|
|
111
|
-
declare function ListItem<As extends ElementType =
|
|
120
|
+
declare function ListItem<As extends ElementType = ElementType>({ active, as, innerRef, label, labelProps, leading, leadingProps, owner, role: roleProp, subText, trailing, trailingProps, id: idProp, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, 'aria-disabled': ariaDisabled, 'aria-readonly': ariaReadonly, width, ...props }: ElementProps<ListItemProps<As>, As>): import("react/jsx-runtime").JSX.Element | null;
|
|
112
121
|
declare namespace ListItem {
|
|
113
122
|
var Button: typeof ListItemButton;
|
|
114
123
|
}
|
|
@@ -21,7 +21,7 @@ import { useId } from '../../hooks/useId';
|
|
|
21
21
|
* import { SvgSquare } from '@bspk/icons/Square';
|
|
22
22
|
* import { ListItem } from '@bspk/ui/ListItem';
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* function Example() {
|
|
25
25
|
* return (
|
|
26
26
|
* <ListItem
|
|
27
27
|
* label="Example label"
|
|
@@ -35,7 +35,7 @@ import { useId } from '../../hooks/useId';
|
|
|
35
35
|
* @name ListItem
|
|
36
36
|
* @phase UXReview
|
|
37
37
|
*/
|
|
38
|
-
function ListItem({ active, as, innerRef, label, leading, owner, role: roleProp, subText, trailing, id: idProp, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, 'aria-disabled': ariaDisabled, 'aria-readonly': ariaReadonly,
|
|
38
|
+
function ListItem({ active, as, innerRef, label, labelProps, leading, leadingProps, owner, role: roleProp, subText, trailing, trailingProps, id: idProp, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, 'aria-disabled': ariaDisabled, 'aria-readonly': ariaReadonly, width, ...props }) {
|
|
39
39
|
const id = useId(idProp);
|
|
40
40
|
if (!label)
|
|
41
41
|
return null;
|
|
@@ -44,7 +44,7 @@ function ListItem({ active, as, innerRef, label, leading, owner, role: roleProp,
|
|
|
44
44
|
const isDisabled = Boolean(props.disabled || ariaDisabled);
|
|
45
45
|
const actionable = !!(props.href || props.onClick || as === 'button') && !isReadOnly && !isDisabled;
|
|
46
46
|
const role = roleLogic(roleProp, { as: As, props, actionable });
|
|
47
|
-
return (_jsxs(As, { ...props, "aria-label": ariaLabel || undefined, "aria-selected": ariaSelected, "data-action": actionable || undefined, "data-active": active || undefined, "data-bspk": "list-item", "data-bspk-owner": owner || undefined, "data-disabled": isDisabled || undefined, "data-readonly": isReadOnly || undefined, id: id, onClick: isReadOnly || isDisabled ? undefined : props.onClick, ref: innerRef, role: role, tabIndex: props.tabIndex || (actionable ? 0 : -1), children: [leading && (_jsx("span", {
|
|
47
|
+
return (_jsxs(As, { ...props, "aria-label": ariaLabel || undefined, "aria-selected": ariaSelected, "data-action": actionable || undefined, "data-active": active || undefined, "data-bspk": "list-item", "data-bspk-owner": owner || undefined, "data-disabled": isDisabled || undefined, "data-readonly": isReadOnly || undefined, "data-width": width === 'hug' ? 'hug' : undefined, id: id, onClick: isReadOnly || isDisabled ? undefined : props.onClick, ref: innerRef, role: role, tabIndex: props.tabIndex || (actionable ? 0 : -1), children: [leading && (_jsx("span", { ...leadingProps, "data-leading": true, children: leading })), _jsxs("span", { ...labelProps, "data-item-label": true, children: [_jsx(Truncated, { "data-text": true, children: label }), subText && _jsx("span", { "data-sub-text": true, children: subText })] }), trailing && (_jsx("span", { ...trailingProps, "data-trailing": true, children: trailing }))] }));
|
|
48
48
|
}
|
|
49
49
|
ListItem.Button = ListItemButton;
|
|
50
50
|
export { ListItem };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,kBAAkB,CAAC;AAW1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAwFtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAS,QAAQ,CAAuC,EACpD,MAAM,EACN,EAAE,EACF,QAAQ,EACR,KAAK,EACL,UAAU,EACV,OAAO,EACP,YAAY,EACZ,KAAK,EACL,IAAI,EAAE,QAAQ,EACd,OAAO,EACP,QAAQ,EACR,aAAa,EACb,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,SAAS,EACvB,eAAe,EAAE,YAAY,EAC7B,eAAe,EAAE,YAAY,EAC7B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CAAC,aAEhD,OAAO,IAAI,CACR,kBAAU,YAAY,kCACjB,OAAO,GACL,CACV,EACD,mBAAU,UAAU,sCAChB,KAAC,SAAS,iCAAY,KAAK,GAAa,EACvC,OAAO,IAAI,gDAAqB,OAAO,GAAQ,IAC7C,EACN,QAAQ,IAAI,CACT,kBAAU,aAAa,mCAClB,QAAQ,GACN,CACV,IACA,CACR,CAAC;AACN,CAAC;AAED,QAAQ,CAAC,MAAM,GAAG,cAAc,CAAC;AAEjC,OAAO,EAAE,QAAQ,EAAE,CAAC;AAEpB,SAAS,OAAO,CAAyB,EAAkB,EAAE,KAA6B;IACtF,IAAI,EAAE;QAAE,OAAO,EAAE,CAAC;IAClB,IAAI,KAAK,CAAC,IAAI;QAAE,OAAO,GAAG,CAAC;IAC3B,OAAO,KAAK,CAAC;AACjB,CAAC;AAED,SAAS,SAAS;AACd,8BAA8B;AAC9B,YAAkC,EAClC,EACI,EAAE,EAAE,EAAE,EACN,KAAK,EACL,UAAU,GAKb;IAED,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,IAAI,CAAC,UAAU;QAAE,OAAO,SAAS,CAAC;IAElC,IAAI,KAAK,CAAC,OAAO,IAAI,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,OAAO;QAAE,OAAO,QAAQ,CAAC;IAExE,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -17,12 +17,12 @@ export const presets = (action) => [
|
|
|
17
17
|
},
|
|
18
18
|
},
|
|
19
19
|
{
|
|
20
|
-
label: 'As
|
|
20
|
+
label: 'As Div',
|
|
21
21
|
propState: {
|
|
22
22
|
as: undefined,
|
|
23
|
-
label: '
|
|
23
|
+
label: 'role = "button"',
|
|
24
24
|
role: 'button',
|
|
25
|
-
subText: '
|
|
25
|
+
subText: 'aria-disabled = {true}',
|
|
26
26
|
trailing: undefined,
|
|
27
27
|
leading: undefined,
|
|
28
28
|
'aria-disabled': true,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItemExample.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItemExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAA+B,EAA2B,EAAE,CAAC;IACjF;QACI,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE;YACP,KAAK,EAAE,8FAA8F;YACrG,EAAE,EAAE,SAAS;YACb,OAAO,EAAE,mDAAmD;YAC5D,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,QAAQ;YACjB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;YACnB,eAAe,EAAE,SAAS;YAC1B,eAAe,EAAE,SAAS;SACgB;KACjD;IACD;QACI,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"ListItemExample.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItemExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,QAAQ,EAAiB,MAAM,YAAY,CAAC;AAErD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,MAA+B,EAA2B,EAAE,CAAC;IACjF;QACI,KAAK,EAAE,YAAY;QACnB,SAAS,EAAE;YACP,KAAK,EAAE,8FAA8F;YACrG,EAAE,EAAE,SAAS;YACb,OAAO,EAAE,mDAAmD;YAC5D,QAAQ,EAAE,UAAU;YACpB,OAAO,EAAE,QAAQ;YACjB,QAAQ,EAAE,SAAS;YACnB,QAAQ,EAAE,SAAS;YACnB,eAAe,EAAE,SAAS;YAC1B,eAAe,EAAE,SAAS;SACgB;KACjD;IACD;QACI,KAAK,EAAE,QAAQ;QACf,SAAS,EAAE;YACP,EAAE,EAAE,SAAS;YACb,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,QAAQ;YAC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G,EAAE,CAAC,MAAM,CAAC,sCAAsC,CAAC;SACb;KACvD;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,eAAe,GAAsC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACzF,OAAO,EAAE,OAAO,CAAC,MAAM,CAAC;IACxB,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE;QAC9B,MAAM,OAAO,GAAG,yBAAyB,CAAC;YACtC,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,SAAS;YACf,QAAQ;YACR,MAAM;YACN,EAAE;SACL,CAAC,CAAC;QACH,MAAM,QAAQ,GAAG,yBAAyB,CAAC;YACvC,YAAY,EAAE,KAAK;YACnB,IAAI,EAAE,UAAU;YAChB,QAAQ;YACR,MAAM;YACN,EAAE;SACL,CAAC,CAAC;QAEH,IAAI,EAAE,GAAgB,KAAK,CAAC,EAAE,IAAI,KAAK,CAAC;QAExC,IAAI,CAAC,MAAM;YAAE,OAAO,IAAI,CAAC;QAEzB,IAAI,QAAQ,CAAC,aAAa,IAAI,CAAC,UAAU,EAAE,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,aAAa,CAAC;YAAE,EAAE,GAAG,OAAO,CAAC;QAE7G,OAAO,KAAC,QAAQ,OAAK,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,OAAO,CAAC,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,GAAI,CAAC;IACjG,CAAC;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
[data-bspk=list-item] {
|
|
2
2
|
display: flex;
|
|
3
|
-
width: 100%;
|
|
4
3
|
user-select: none;
|
|
5
4
|
color: var(--foreground-neutral-on-surface);
|
|
6
5
|
background-color: var(--surface-neutral-t1-base);
|
|
@@ -14,6 +13,11 @@
|
|
|
14
13
|
border: unset;
|
|
15
14
|
margin: unset;
|
|
16
15
|
text-decoration: unset;
|
|
16
|
+
width: 100%;
|
|
17
|
+
}
|
|
18
|
+
[data-bspk=list-item][data-width=hug] {
|
|
19
|
+
width: auto;
|
|
20
|
+
max-width: 100%;
|
|
17
21
|
}
|
|
18
22
|
[data-pseudo=focus] [data-bspk=list-item], [data-bspk=list-item]:focus-visible, [data-bspk=list-item]:has(*:focus-visible) {
|
|
19
23
|
outline: solid 2px var(--stroke-neutral-focus);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
const style = document.createElement('style');
|
|
4
4
|
style.appendChild(document.createTextNode(`[data-bspk=list-item] {
|
|
5
5
|
display: flex;
|
|
6
|
-
width: 100%;
|
|
7
6
|
user-select: none;
|
|
8
7
|
color: var(--foreground-neutral-on-surface);
|
|
9
8
|
background-color: var(--surface-neutral-t1-base);
|
|
@@ -17,6 +16,11 @@ style.appendChild(document.createTextNode(`[data-bspk=list-item] {
|
|
|
17
16
|
border: unset;
|
|
18
17
|
margin: unset;
|
|
19
18
|
text-decoration: unset;
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
[data-bspk=list-item][data-width=hug] {
|
|
22
|
+
width: auto;
|
|
23
|
+
max-width: 100%;
|
|
20
24
|
}
|
|
21
25
|
[data-pseudo=focus] [data-bspk=list-item], [data-bspk=list-item]:focus-visible, [data-bspk=list-item]:has(*:focus-visible) {
|
|
22
26
|
outline: solid 2px var(--stroke-neutral-focus);
|
|
@@ -2,7 +2,7 @@ import './menu.scss';
|
|
|
2
2
|
import { ElementType, ReactNode } from 'react';
|
|
3
3
|
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
4
4
|
export declare function menuItemId(menuId: string, index: number): string;
|
|
5
|
-
export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' | 'owner' | 'role'> & {
|
|
5
|
+
export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' | 'owner' | 'role' | 'style'> & {
|
|
6
6
|
/** A ref to the inner div element. */
|
|
7
7
|
innerRef?: SetRef<HTMLDivElement>;
|
|
8
8
|
/**
|
|
@@ -24,6 +24,13 @@ export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' |
|
|
|
24
24
|
* @type ElementType
|
|
25
25
|
*/
|
|
26
26
|
as?: As;
|
|
27
|
+
/**
|
|
28
|
+
* The width of the menu.
|
|
29
|
+
*
|
|
30
|
+
* @type HTMLElement.style.width
|
|
31
|
+
* @exampleType string
|
|
32
|
+
*/
|
|
33
|
+
width?: HTMLElement['style']['width'];
|
|
27
34
|
};
|
|
28
35
|
/**
|
|
29
36
|
* A container housing a simple list of options presented to the customer to select one option at a time.
|
|
@@ -33,7 +40,7 @@ export type MenuProps<As extends ElementType = ElementType> = CommonProps<'id' |
|
|
|
33
40
|
*
|
|
34
41
|
* import { Menu } from '@bspk/ui/Menu';
|
|
35
42
|
*
|
|
36
|
-
*
|
|
43
|
+
* function Example() {
|
|
37
44
|
* return (
|
|
38
45
|
* <Menu>
|
|
39
46
|
* <ListItem label="List Item" />
|
|
@@ -12,7 +12,7 @@ export function menuItemId(menuId, index) {
|
|
|
12
12
|
*
|
|
13
13
|
* import { Menu } from '@bspk/ui/Menu';
|
|
14
14
|
*
|
|
15
|
-
*
|
|
15
|
+
* function Example() {
|
|
16
16
|
* return (
|
|
17
17
|
* <Menu>
|
|
18
18
|
* <ListItem label="List Item" />
|
|
@@ -28,6 +28,6 @@ export function menuItemId(menuId, index) {
|
|
|
28
28
|
export function Menu({ as, innerRef, id: idProp, children, owner, label, ...props }) {
|
|
29
29
|
const menuId = useId(idProp);
|
|
30
30
|
const As = as || 'div';
|
|
31
|
-
return (_jsx(As, { ...props, "aria-label": label || undefined, "data-bspk-owner": owner || undefined, "data-bspk-utility": "menu", id: menuId, ref: innerRef, children: children }));
|
|
31
|
+
return (_jsx(As, { ...props, "aria-label": label || undefined, "data-bspk-owner": owner || undefined, "data-bspk-utility": "menu", id: menuId, ref: innerRef, style: { ...props.style, width: props.width }, children: children }));
|
|
32
32
|
}
|
|
33
33
|
//# sourceMappingURL=Menu.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,KAAa;IACpD,OAAO,QAAQ,MAAM,SAAS,KAAK,EAAE,CAAC;AAC1C,CAAC;
|
|
1
|
+
{"version":3,"file":"Menu.js","sourceRoot":"","sources":["../../../src/components/Menu/Menu.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,UAAU,UAAU,CAAC,MAAc,EAAE,KAAa;IACpD,OAAO,QAAQ,MAAM,SAAS,KAAK,EAAE,CAAC;AAC1C,CAAC;AAiCD;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,KAAK,EAAkC;IAC/G,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAE7B,MAAM,EAAE,GAAG,EAAE,IAAI,KAAK,CAAC;IAEvB,OAAO,CACH,KAAC,EAAE,OACK,KAAK,gBACG,KAAK,IAAI,SAAS,qBACb,KAAK,IAAI,SAAS,uBACjB,MAAM,EACxB,EAAE,EAAE,MAAM,EACV,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,EAAE,GAAG,KAAK,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,KAAK,EAAE,YAE5C,QAAQ,GACR,CACR,CAAC;AACN,CAAC"}
|
|
@@ -13,10 +13,10 @@ import { ListItem } from '../ListItem';
|
|
|
13
13
|
import { Switch } from '../Switch';
|
|
14
14
|
export const MenuExample = ({ action, }) => ({
|
|
15
15
|
render: ({ props, Component, setState }) => {
|
|
16
|
-
return (_jsxs(Component, { ...props, style: { padding: 'var(--spacing-sizing-02) var(--spacing-sizing-02)' }, children: [_jsx(ListItem, { label: "Michael Scott", leading: _jsx(Avatar, { image: "/
|
|
16
|
+
return (_jsxs(Component, { ...props, style: { padding: 'var(--spacing-sizing-02) var(--spacing-sizing-02)' }, children: [_jsx(ListItem, { label: "Michael Scott", leading: _jsx(Avatar, { image: "/avatar-01.png", name: "Michael Scott" }), subText: "michael.scott@email.com" }), _jsx(Divider, { inset: 2, padding: true }), _jsx(ListItem, { href: "#/my-profile", label: "My profile", leading: _jsx(SvgAccountCircle, {}) }), _jsx(ListItem, { href: "#/settings", label: "Settings", leading: _jsx(SvgSettings, {}) }), _jsx(ListItem, { as: "label", label: "Dark mode", leading: props['data-dark-mode'] ? _jsx(SvgDarkModeFill, {}) : _jsx(SvgDarkMode, {}), trailing: _jsx(Switch, { "aria-label": "Toggle dark mode", checked: !!props['data-dark-mode'], name: "dark-mode", onChange: () => {
|
|
17
17
|
setState((prev) => ({ 'data-dark-mode': !prev['data-dark-mode'] }));
|
|
18
18
|
action('Dark mode toggled');
|
|
19
|
-
} }) }), _jsx(Divider, { inset: 2, padding: false, thickness: "light" }), _jsx(ListItem, { href: "#/guide-tutorial", label: "Guide and tutorial", leading: _jsx(SvgMenuBook, {}) }), _jsx(ListItem, { href: "#/help-center", label: "Help center", leading: _jsx(SvgHelp, {}) }), _jsx(Divider, { inset: 2, padding: true }), _jsx(ListItem, { href: "#/go-premium", label: "Go premium", leading: _jsx(SvgLicense, {}) }), _jsx(ListItem, { label: "Log out", leading: _jsx(SvgLogout, {}), onClick: () => {
|
|
19
|
+
}, value: "dark-mode" }) }), _jsx(Divider, { inset: 2, padding: false, thickness: "light" }), _jsx(ListItem, { href: "#/guide-tutorial", label: "Guide and tutorial", leading: _jsx(SvgMenuBook, {}) }), _jsx(ListItem, { href: "#/help-center", label: "Help center", leading: _jsx(SvgHelp, {}) }), _jsx(Divider, { inset: 2, padding: true }), _jsx(ListItem, { href: "#/go-premium", label: "Go premium", leading: _jsx(SvgLicense, {}) }), _jsx(ListItem, { label: "Log out", leading: _jsx(SvgLogout, {}), onClick: () => {
|
|
20
20
|
action('Log out clicked');
|
|
21
21
|
}, role: "button" })] }));
|
|
22
22
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MenuExample.js","sourceRoot":"","sources":["../../../src/components/Menu/MenuExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAGnD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AACjD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAG7C,MAAM,CAAC,MAAM,WAAW,GAAoF,CAAC,EACzG,MAAM,GACT,EAAE,EAAE,CAAC,CAAC;IACH,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE;QACvC,OAAO,CACH,MAAC,SAAS,OAAK,KAAK,EAA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AC,EAAE,OAAO,SAAG,EAC7B,KAAC,QAAQ,IAAC,IAAI,EAAC,cAAc,EAAC,KAAK,EAAC,YAAY,EAAC,OAAO,EAAE,KAAC,UAAU,KAAG,GAAI,EAC5E,KAAC,QAAQ,IACL,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAC,SAAS,KAAG,EACtB,OAAO,EAAE,GAAG,EAAE;wBACV,MAAM,CAAC,iBAAiB,CAAC,CAAC;oBAC9B,CAAC,EACD,IAAI,EAAC,QAAQ,GACf,IACM,CACf,CAAC;IACN,CAAC;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -70,7 +70,7 @@ export type ModalProps = Pick<DialogProps, 'container' | 'disableFocusTrap' | 'i
|
|
|
70
70
|
* import { Button } from '@bspk/ui/Button';
|
|
71
71
|
* import { Modal } from '@bspk/ui/Modal';
|
|
72
72
|
*
|
|
73
|
-
*
|
|
73
|
+
* function Example() {
|
|
74
74
|
* const [open, setOpen] = React.useState(false);
|
|
75
75
|
*
|
|
76
76
|
* return (
|
|
@@ -18,7 +18,7 @@ export const ModalExample = ({ action }) => ({
|
|
|
18
18
|
propState: {
|
|
19
19
|
header: 'Confirmation Modal',
|
|
20
20
|
description: 'This modal has a call to action and a cancel button.',
|
|
21
|
-
children: (_jsx(
|
|
21
|
+
children: (_jsx("p", { children: "This is a confirmation modal. It has a call to action and a cancel button. The call to action is the primary button and the cancel button is the tertiary button." })),
|
|
22
22
|
callToAction: {
|
|
23
23
|
label: 'Call to Action',
|
|
24
24
|
onClick: () => action('Call to Action clicked'),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModalExample.js","sourceRoot":"","sources":["../../../src/components/Modal/ModalExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAc,KAAK,EAAE,MAAM,GAAG,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,uBA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AEV,KAAK,EAAE,UAAU,KAAK,GAAG,CAAC,EAAE,EAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,UAAU,KAAK,GAAG,CAAC,UAAU,CAAC,EACpD,QAAQ,EAAE,KAAC,QAAQ,kBAAY,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,QAAQ,EAAE,GAAG,EAAE,GAAE,CAAC,EAAE,KAAK,EAAC,EAAE,GAAG,IAHpE,MAAM,KAAK,EAAE,CAIpB,CACL,CAAC,IACP,CACN;aACJ;SACJ;KACJ;CACJ,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useState } from 'react';
|
|
3
|
-
import {
|
|
3
|
+
import { Input } from '../Input';
|
|
4
4
|
import { Txt } from '../Txt';
|
|
5
5
|
export const PageInput = ({ numPages, onChange, value }) => {
|
|
6
6
|
const [page, setPage] = useState(String(value));
|
|
@@ -31,6 +31,6 @@ export const PageInput = ({ numPages, onChange, value }) => {
|
|
|
31
31
|
return (_jsx("form", { onSubmit: (e) => {
|
|
32
32
|
e.preventDefault();
|
|
33
33
|
handleSubmit();
|
|
34
|
-
}, style: { display: 'contents' }, children: _jsxs("div", { "data-bspk": "page-input", children: [_jsx(
|
|
34
|
+
}, style: { display: 'contents' }, children: _jsxs("div", { "data-bspk": "page-input", children: [_jsx(Input, { "aria-label": "Page input", name: "page-input", onBlur: handleSubmit, onChange: handleChange, showClearButton: false, size: "small", value: page }), _jsx(Txt, { variant: "body-small", children: pageCountMessage })] }) }));
|
|
35
35
|
};
|
|
36
36
|
//# sourceMappingURL=PageInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageInput.js","sourceRoot":"","sources":["../../../src/components/Pagination/PageInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAM,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;A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AI,UAAU,IAAI,QAAQ,EAAE,CAAC;YAClE,QAAQ,CAAC,UAAU,CAAC,CAAC;QACzB,CAAC;aAAM,CAAC;YACJ,OAAO,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;QAC3B,CAAC;IACL,CAAC,CAAC;IAEF,MAAM,gBAAgB,GAAG,MAAM,QAAQ,EAAE,CAAC;IAE1C,OAAO,CACH,eACI,QAAQ,EAAE,CAAC,CAAC,EAAE,EAAE;YACZ,CAAC,CAAC,cAAc,EAAE,CAAC;YACnB,YAAY,EAAE,CAAC;QACnB,CAAC,EACD,KAAK,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,YAE9B,4BAAe,YAAY,aACvB,KAAC,KAAK,kBACS,YAAY,EACvB,IAAI,EAAC,YAAY,EACjB,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,YAAY,EACtB,eAAe,EAAE,KAAK,EACtB,IAAI,EAAC,OAAO,EACZ,KAAK,EAAE,IAAI,GACb,EAEF,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,YAAE,gBAAgB,GAAO,IAChD,GACH,CACV,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import './password.scss';
|
|
2
|
+
import { InputProps } from '-/components/Input';
|
|
3
|
+
import { FieldControlProps } from '-/types/common';
|
|
4
|
+
export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef' | 'inputProps' | 'inputRef' | 'size'>;
|
|
5
|
+
/**
|
|
6
|
+
* An input field that is specifically built with a show/hide toggle for entering security passwords.
|
|
7
|
+
*
|
|
8
|
+
* For a more complete example with field usage, see the PasswordField component.
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* import { Password } from '@bspk/ui/Password';
|
|
12
|
+
* import { useState } from 'react';
|
|
13
|
+
*
|
|
14
|
+
* function ExampleStandalone() {
|
|
15
|
+
* const [value, setValue] = useState('');
|
|
16
|
+
*
|
|
17
|
+
* return (
|
|
18
|
+
* <Password
|
|
19
|
+
* aria-label="Enter password"
|
|
20
|
+
* value={value}
|
|
21
|
+
* onChange={setValue}
|
|
22
|
+
* aria-label="password"
|
|
23
|
+
* name="password"
|
|
24
|
+
* />
|
|
25
|
+
* );
|
|
26
|
+
* }
|
|
27
|
+
*
|
|
28
|
+
* function ExampleWithField() {
|
|
29
|
+
* const [value, setValue] = useState('');
|
|
30
|
+
* return (
|
|
31
|
+
* <Field>
|
|
32
|
+
* <FieldLabel>Password</FieldLabel>
|
|
33
|
+
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
34
|
+
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
35
|
+
* </Field>
|
|
36
|
+
* );
|
|
37
|
+
* }
|
|
38
|
+
*
|
|
39
|
+
* @name Password
|
|
40
|
+
* @phase UXReview
|
|
41
|
+
*/
|
|
42
|
+
export declare function Password({ inputProps, inputRef, name, onChange, required, containerRef, invalid: invalidProp, readOnly, disabled, id: idProp, 'aria-label': ariaLabel, ...props }: PasswordProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import './password.css.js';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { Button } from '../Button';
|
|
5
|
+
import { useFieldInit } from '../Field';
|
|
6
|
+
import { InputElement } from '../Input';
|
|
7
|
+
/**
|
|
8
|
+
* An input field that is specifically built with a show/hide toggle for entering security passwords.
|
|
9
|
+
*
|
|
10
|
+
* For a more complete example with field usage, see the PasswordField component.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* import { Password } from '@bspk/ui/Password';
|
|
14
|
+
* import { useState } from 'react';
|
|
15
|
+
*
|
|
16
|
+
* function ExampleStandalone() {
|
|
17
|
+
* const [value, setValue] = useState('');
|
|
18
|
+
*
|
|
19
|
+
* return (
|
|
20
|
+
* <Password
|
|
21
|
+
* aria-label="Enter password"
|
|
22
|
+
* value={value}
|
|
23
|
+
* onChange={setValue}
|
|
24
|
+
* aria-label="password"
|
|
25
|
+
* name="password"
|
|
26
|
+
* />
|
|
27
|
+
* );
|
|
28
|
+
* }
|
|
29
|
+
*
|
|
30
|
+
* function ExampleWithField() {
|
|
31
|
+
* const [value, setValue] = useState('');
|
|
32
|
+
* return (
|
|
33
|
+
* <Field>
|
|
34
|
+
* <FieldLabel>Password</FieldLabel>
|
|
35
|
+
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
36
|
+
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
37
|
+
* </Field>
|
|
38
|
+
* );
|
|
39
|
+
* }
|
|
40
|
+
*
|
|
41
|
+
* @name Password
|
|
42
|
+
* @phase UXReview
|
|
43
|
+
*/
|
|
44
|
+
export function Password({ inputProps, inputRef, name, onChange, required = false, containerRef, invalid: invalidProp, readOnly, disabled, id: idProp, 'aria-label': ariaLabel, ...props }) {
|
|
45
|
+
const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
|
|
46
|
+
idProp,
|
|
47
|
+
required,
|
|
48
|
+
disabled,
|
|
49
|
+
readOnly,
|
|
50
|
+
invalidProp,
|
|
51
|
+
});
|
|
52
|
+
const [isShowingPassword, setIsShowingPassword] = useState(false);
|
|
53
|
+
const togglePasswordVisibility = () => {
|
|
54
|
+
if (disabled || readOnly)
|
|
55
|
+
return;
|
|
56
|
+
setIsShowingPassword((prev) => !prev);
|
|
57
|
+
};
|
|
58
|
+
return (_jsx(InputElement, { ...props, "aria-describedby": ariaDescribedBy, "aria-errormessage": ariaErrorMessage, "aria-label": ariaLabel || undefined, autoComplete: "off", containerRef: containerRef, "data-bspk-owner": "password", id: id, inputProps: inputProps, inputRef: inputRef, invalid: invalid, name: name, onChange: onChange, onClick: (e) => {
|
|
59
|
+
e.currentTarget?.querySelector('input')?.focus();
|
|
60
|
+
}, owner: "password", required: required, showClearButton: false, trailing: !disabled &&
|
|
61
|
+
!readOnly && (_jsx(Button, { "data-toggle-visibility-button": true, label: isShowingPassword ? 'Hide' : 'Show', onClick: togglePasswordVisibility, variant: "tertiary" })), type: isShowingPassword ? 'text' : 'password' }));
|
|
62
|
+
}
|
|
63
|
+
//# sourceMappingURL=Password.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Password.js","sourceRoot":"","sources":["../../../src/components/Password/Password.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAK9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAM,UAAU,QAAQ,CAAC,EACrB,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACI;IACZ,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,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAElE,MAAM,wBAAwB,GAAG,GAAG,EAAE;QAClC,IAAI,QAAQ,IAAI,QAAQ;YAAE,OAAO;QACjC,oBAAoB,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC;IAC1C,CAAC,CAAC;IAEF,OAAO,CACH,KAAC,YAAY,OACL,KAAK,sBACS,eAAe,uBACd,gBAAgB,gBACvB,SAAS,IAAI,SAAS,EAClC,YAAY,EAAC,KAAK,EAClB,YAAY,EAAE,YAAY,qBACV,UAAU,EAC1B,EAAE,EAAE,EAAE,EACN,UAAU,EAAE,UAAU,EACtB,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAE,IAAI,EACV,QAAQ,EAAE,QAAQ,EAClB,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;YACV,CAAC,CAAC,aAA6B,EAAE,aAAa,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;QACtE,CAAC,EACD,KAAK,EAAC,UAAU,EAChB,QAAQ,EAAE,QAAQ,EAClB,eAAe,EAAE,KAAK,EACtB,QAAQ,EACJ,CAAC,QAAQ;YACT,CAAC,QAAQ,IAAI,CACT,KAAC,MAAM,2CAEH,KAAK,EAAE,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAC1C,OAAO,EAAE,wBAAwB,EACjC,OAAO,EAAC,UAAU,GACpB,CACL,EAEL,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,GAC/C,CACL,CAAC;AACN,CAAC"}
|
|
@@ -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, style, ...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, style, ...controlProps }) {
|
|
15
|
+
return (_jsx(FormField, { errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, style: style, children: _jsx(Password, { ...controlProps }) }));
|
|
32
16
|
}
|
|
33
17
|
//# sourceMappingURL=PasswordField.js.map
|