@bspk/ui 1.2.0 → 1.3.0
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/.scripts/index.ts +110 -0
- package/README.md +13 -0
- package/build.ts +2 -2
- package/dist/components/Accordion/Accordion.d.ts +42 -5
- package/dist/components/Accordion/Accordion.js +24 -20
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionExample.d.ts +2 -1
- package/dist/components/Accordion/AccordionExample.js +77 -64
- package/dist/components/Accordion/AccordionExample.js.map +1 -1
- package/dist/components/Accordion/accordion.css +37 -34
- package/dist/components/Accordion/accordion.css.js +37 -34
- package/dist/components/Avatar/Avatar.d.ts +10 -6
- package/dist/components/Avatar/Avatar.js +5 -10
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarExample.d.ts +2 -1
- package/dist/components/Avatar/AvatarExample.js +42 -41
- package/dist/components/Avatar/AvatarExample.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroupExample.d.ts +2 -1
- package/dist/components/AvatarGroup/AvatarGroupExample.js +33 -27
- package/dist/components/AvatarGroup/AvatarGroupExample.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDot.d.ts +1 -1
- package/dist/components/BadgeDot/BadgeDot.js +1 -1
- package/dist/components/BadgeDot/BadgeDot.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.ts +1 -1
- package/dist/components/BannerAlert/BannerAlert.js +3 -2
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlertExample.js +4 -0
- package/dist/components/BannerAlert/BannerAlertExample.js.map +1 -1
- package/dist/components/BannerAlert/banner-alert.css +0 -26
- package/dist/components/BannerAlert/banner-alert.css.js +0 -26
- package/dist/components/BottomNavigation/BottomNavigation.d.ts +53 -0
- package/dist/components/BottomNavigation/BottomNavigation.js +42 -0
- package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -0
- package/dist/components/BottomNavigation/BottomNavigationExample.d.ts +4 -0
- package/dist/components/BottomNavigation/BottomNavigationExample.js +119 -0
- package/dist/components/BottomNavigation/BottomNavigationExample.js.map +1 -0
- package/dist/components/BottomNavigation/bottom-navigation.css +68 -0
- package/dist/components/BottomNavigation/bottom-navigation.css.js +73 -0
- package/dist/components/BottomNavigation/index.d.ts +1 -0
- package/dist/components/BottomNavigation/index.js +2 -0
- package/dist/components/BottomNavigation/index.js.map +1 -0
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +4 -4
- package/dist/components/Breadcrumb/Breadcrumb.js +7 -16
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbExample.d.ts +2 -1
- package/dist/components/Breadcrumb/BreadcrumbExample.js +150 -149
- package/dist/components/Breadcrumb/BreadcrumbExample.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -1
- package/dist/components/Button/Button.js +6 -3
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/ButtonExample.d.ts +2 -1
- package/dist/components/Button/ButtonExample.js +25 -24
- package/dist/components/Button/ButtonExample.js.map +1 -1
- package/dist/components/ButtonDock/ButtonDock.d.ts +55 -0
- package/dist/components/ButtonDock/ButtonDock.js +33 -0
- package/dist/components/ButtonDock/ButtonDock.js.map +1 -0
- package/dist/components/ButtonDock/ButtonDockExample.d.ts +4 -0
- package/dist/components/ButtonDock/ButtonDockExample.js +75 -0
- package/dist/components/ButtonDock/ButtonDockExample.js.map +1 -0
- package/dist/components/ButtonDock/button-dock.css +42 -0
- package/dist/components/ButtonDock/button-dock.css.js +47 -0
- package/dist/components/ButtonDock/index.d.ts +1 -0
- package/dist/components/ButtonDock/index.js +2 -0
- package/dist/components/ButtonDock/index.js.map +1 -0
- package/dist/components/CalendarPicker/CalendarPicker.d.ts +32 -0
- package/dist/components/CalendarPicker/CalendarPicker.js +203 -0
- package/dist/components/CalendarPicker/CalendarPicker.js.map +1 -0
- package/dist/components/CalendarPicker/CalendarPickerExample.d.ts +3 -0
- package/dist/components/CalendarPicker/CalendarPickerExample.js +17 -0
- package/dist/components/CalendarPicker/CalendarPickerExample.js.map +1 -0
- package/dist/components/CalendarPicker/calendar-picker.css +70 -0
- package/dist/components/CalendarPicker/calendar-picker.css.js +75 -0
- package/dist/components/CalendarPicker/index.d.ts +1 -0
- package/dist/components/CalendarPicker/index.js +2 -0
- package/dist/components/CalendarPicker/index.js.map +1 -0
- package/dist/components/Card/Card.d.ts +3 -9
- package/dist/components/Card/Card.js +2 -2
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/CardExample.js +1 -0
- package/dist/components/Card/CardExample.js.map +1 -1
- package/dist/components/Card/card.css +0 -4
- package/dist/components/Card/card.css.js +0 -4
- package/dist/components/Carousel/Carousel.d.ts +63 -0
- package/dist/components/Carousel/Carousel.js +68 -0
- package/dist/components/Carousel/Carousel.js.map +1 -0
- package/dist/components/Carousel/CarouselExample.d.ts +5 -0
- package/dist/components/Carousel/CarouselExample.js +51 -0
- package/dist/components/Carousel/CarouselExample.js.map +1 -0
- package/dist/components/Carousel/carousel.css +34 -0
- package/dist/components/Carousel/carousel.css.js +39 -0
- package/dist/components/Carousel/index.d.ts +1 -0
- package/dist/components/Carousel/index.js +2 -0
- package/dist/components/Carousel/index.js.map +1 -0
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/checkbox.css +8 -8
- package/dist/components/Checkbox/checkbox.css.js +8 -8
- package/dist/components/CheckboxGroup/CheckboxGroupExample.d.ts +2 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js +49 -42
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
- package/dist/components/ChipAssist/ChipAssistExample.d.ts +2 -1
- package/dist/components/ChipAssist/ChipAssistExample.js +24 -23
- package/dist/components/ChipAssist/ChipAssistExample.js.map +1 -1
- package/dist/components/ChipFilter/ChipFilterExample.js +3 -0
- package/dist/components/ChipFilter/ChipFilterExample.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.d.ts +2 -1
- package/dist/components/ChipGroup/ChipGroupExample.js +9 -8
- package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
- package/dist/components/ChipInput/ChipInputExample.d.ts +2 -1
- package/dist/components/ChipInput/ChipInputExample.js +39 -38
- package/dist/components/ChipInput/ChipInputExample.js.map +1 -1
- package/dist/components/ChipSuggestion/ChipSuggestionExample.d.ts +2 -1
- package/dist/components/ChipSuggestion/ChipSuggestionExample.js +16 -15
- package/dist/components/ChipSuggestion/ChipSuggestionExample.js.map +1 -1
- package/dist/components/ChipUtility/ChipUtility.d.ts +1 -1
- package/dist/components/ChipUtility/ChipUtility.js +1 -1
- package/dist/components/ChipUtility/ChipUtility.js.map +1 -1
- package/dist/components/ChipUtility/ChipUtilityExample.d.ts +2 -1
- package/dist/components/ChipUtility/ChipUtilityExample.js +53 -52
- package/dist/components/ChipUtility/ChipUtilityExample.js.map +1 -1
- package/dist/components/DateField/DateField.d.ts +32 -0
- package/dist/components/DateField/DateField.js +34 -0
- package/dist/components/DateField/DateField.js.map +1 -0
- package/dist/components/DateField/DateFieldExample.d.ts +4 -0
- package/dist/components/DateField/DateFieldExample.js +11 -0
- package/dist/components/DateField/DateFieldExample.js.map +1 -0
- package/dist/components/DateField/date-field.css +8 -0
- package/dist/components/DateField/date-field.css.js +13 -0
- package/dist/components/DateField/index.d.ts +1 -0
- package/dist/components/DateField/index.js +2 -0
- package/dist/components/DateField/index.js.map +1 -0
- package/dist/components/DateInput/DateInput.d.ts +39 -0
- package/dist/components/DateInput/DateInput.js +102 -0
- package/dist/components/DateInput/DateInput.js.map +1 -0
- package/dist/components/DateInput/DateInputExample.d.ts +4 -0
- package/dist/components/DateInput/DateInputExample.js +14 -0
- package/dist/components/DateInput/DateInputExample.js.map +1 -0
- package/dist/components/DateInput/date-input.css +12 -0
- package/dist/components/DateInput/date-input.css.js +17 -0
- package/dist/components/DateInput/index.d.ts +1 -0
- package/dist/components/DateInput/index.js +2 -0
- package/dist/components/DateInput/index.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +15 -2
- package/dist/components/Dialog/Dialog.js +11 -9
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/DialogExample.d.ts +2 -1
- package/dist/components/Dialog/DialogExample.js +2 -0
- package/dist/components/Dialog/DialogExample.js.map +1 -1
- package/dist/components/Dialog/dialog.css +19 -67
- package/dist/components/Dialog/dialog.css.js +19 -67
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +1 -1
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Divider/DividerExample.d.ts +4 -2
- package/dist/components/Divider/DividerExample.js +2 -0
- package/dist/components/Divider/DividerExample.js.map +1 -1
- package/dist/components/Divider/divider.css +1 -1
- package/dist/components/Divider/divider.css.js +1 -1
- package/dist/components/Drawer/Drawer.d.ts +75 -0
- package/dist/components/Drawer/Drawer.js +49 -0
- package/dist/components/Drawer/Drawer.js.map +1 -0
- package/dist/components/Drawer/DrawerExample.d.ts +4 -0
- package/dist/components/Drawer/DrawerExample.js +47 -0
- package/dist/components/Drawer/DrawerExample.js.map +1 -0
- package/dist/components/Drawer/drawer.css +56 -0
- package/dist/components/Drawer/drawer.css.js +61 -0
- package/dist/components/Drawer/index.d.ts +1 -0
- package/dist/components/Drawer/index.js +2 -0
- package/dist/components/Drawer/index.js.map +1 -0
- package/dist/components/EmptyState/EmptyStateExample.d.ts +2 -1
- package/dist/components/EmptyState/EmptyStateExample.js +18 -11
- package/dist/components/EmptyState/EmptyStateExample.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +1 -1
- package/dist/components/Fab/Fab.js +5 -2
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/FabExample.d.ts +1 -0
- package/dist/components/Fab/FabExample.js +4 -2
- package/dist/components/Fab/FabExample.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/FileUpload/FileUpload.js.map +1 -1
- package/dist/components/FileUpload/FileUploadExample.d.ts +2 -1
- package/dist/components/FileUpload/FileUploadExample.js +17 -16
- package/dist/components/FileUpload/FileUploadExample.js.map +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.d.ts +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js.map +1 -1
- package/dist/components/FileUploadItem/FileUploadItemExample.d.ts +2 -1
- package/dist/components/FileUploadItem/FileUploadItemExample.js +44 -39
- package/dist/components/FileUploadItem/FileUploadItemExample.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +3 -3
- package/dist/components/FormField/FormField.js +2 -2
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormField/form-field.css +3 -3
- package/dist/components/FormField/form-field.css.js +3 -3
- package/dist/components/InlineAlert/InlineAlert.d.ts +1 -1
- package/dist/components/InlineAlert/InlineAlert.js +1 -1
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
- package/dist/components/Layout/LayoutExample.d.ts +2 -1
- package/dist/components/Layout/LayoutExample.js +2 -0
- package/dist/components/Layout/LayoutExample.js.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link/LinkExample.d.ts +2 -1
- package/dist/components/Link/LinkExample.js +2 -0
- package/dist/components/Link/LinkExample.js.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts +40 -14
- package/dist/components/ListItem/ListItem.js +26 -13
- package/dist/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/ListItem/ListItemExample.d.ts +2 -1
- package/dist/components/ListItem/ListItemExample.js +12 -12
- package/dist/components/ListItem/ListItemExample.js.map +1 -1
- package/dist/components/ListItem/list-item.css +10 -7
- package/dist/components/ListItem/list-item.css.js +10 -7
- package/dist/components/ListItemMenu/ListItemMenu.d.ts +146 -0
- package/dist/components/ListItemMenu/ListItemMenu.js +159 -0
- package/dist/components/ListItemMenu/ListItemMenu.js.map +1 -0
- package/dist/components/ListItemMenu/index.d.ts +1 -0
- package/dist/components/ListItemMenu/index.js +2 -0
- package/dist/components/ListItemMenu/index.js.map +1 -0
- package/dist/components/Menu/Menu.d.ts +12 -39
- package/dist/components/Menu/Menu.js +6 -26
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/MenuExample.d.ts +3 -3
- package/dist/components/Menu/MenuExample.js +1 -24
- package/dist/components/Menu/MenuExample.js.map +1 -1
- package/dist/components/Menu/menu.css +3 -10
- package/dist/components/Menu/menu.css.js +3 -10
- package/dist/components/MenuButton/MenuButton.d.ts +1 -1
- package/dist/components/MenuButton/MenuButton.js +1 -1
- package/dist/components/MenuButton/MenuButton.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts +4 -4
- package/dist/components/Modal/Modal.js +4 -4
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/NumberInput/NumberInput.d.ts +8 -4
- package/dist/components/NumberInput/NumberInput.js +5 -14
- package/dist/components/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/NumberInput/number-input.css +0 -1
- package/dist/components/NumberInput/number-input.css.js +0 -1
- package/dist/components/OTPInput/OTPInput.d.ts +3 -3
- package/dist/components/OTPInput/OTPInput.js +3 -3
- package/dist/components/OTPInput/OTPInput.js.map +1 -1
- package/dist/components/OTPInput/OTPInputExample.d.ts +2 -1
- package/dist/components/OTPInput/OTPInputExample.js +19 -16
- package/dist/components/OTPInput/OTPInputExample.js.map +1 -1
- package/dist/components/PageControl/PageControl.d.ts +5 -3
- package/dist/components/PageControl/PageControl.js +17 -16
- package/dist/components/PageControl/PageControl.js.map +1 -1
- package/dist/components/PageControl/PageControlExample.d.ts +4 -0
- package/dist/components/PageControl/PageControlExample.js +34 -0
- package/dist/components/PageControl/PageControlExample.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +1 -5
- package/dist/components/Pagination/Pagination.js +2 -6
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +2 -2
- package/dist/components/PasswordField/PasswordField.js +3 -3
- package/dist/components/PasswordField/PasswordField.js.map +1 -1
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +2 -2
- package/dist/components/PasswordInput/PasswordInput.js.map +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +3 -3
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +49 -52
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.d.ts +4 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js +5 -0
- package/dist/components/PhoneNumberInput/PhoneNumberInputExample.js.map +1 -0
- package/dist/components/PhoneNumberInput/phone-number-input.css +36 -26
- package/dist/components/PhoneNumberInput/phone-number-input.css.js +36 -26
- package/dist/components/Popover/Popover.d.ts +7 -4
- package/dist/components/Popover/Popover.js +22 -19
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/PopoverExample.js +7 -1
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/Popover/popover.css +3 -12
- package/dist/components/Popover/popover.css.js +3 -12
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.js +2 -2
- package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.d.ts +2 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +47 -46
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.d.ts +1 -1
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js +3 -3
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js.map +1 -1
- package/dist/components/Radio/Radio.d.ts +1 -1
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroupExample.d.ts +1 -0
- package/dist/components/RadioGroup/RadioGroupExample.js +2 -1
- package/dist/components/RadioGroup/RadioGroupExample.js.map +1 -1
- package/dist/components/RadioOption/RadioOption.js +1 -1
- package/dist/components/RadioOption/RadioOption.js.map +1 -1
- package/dist/components/Rating/Rating.js +2 -2
- package/dist/components/Rating/Rating.js.map +1 -1
- package/dist/components/Rating/RatingExample.d.ts +2 -1
- package/dist/components/Rating/RatingExample.js +9 -8
- package/dist/components/Rating/RatingExample.js.map +1 -1
- package/dist/components/Scrim/Scrim.d.ts +2 -2
- package/dist/components/Scrim/Scrim.js +2 -2
- package/dist/components/Scrim/Scrim.js.map +1 -1
- package/dist/components/Scrim/scrim.css +0 -3
- package/dist/components/Scrim/scrim.css.js +0 -3
- package/dist/components/SearchBar/SearchBar.d.ts +11 -8
- package/dist/components/SearchBar/SearchBar.js +46 -34
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar/SearchBarExample.d.ts +2 -1
- package/dist/components/SearchBar/SearchBarExample.js +2 -6
- package/dist/components/SearchBar/SearchBarExample.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControlExample.d.ts +2 -1
- package/dist/components/SegmentedControl/SegmentedControlExample.js +32 -23
- package/dist/components/SegmentedControl/SegmentedControlExample.js.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.css +7 -7
- package/dist/components/SegmentedControl/segmented-control.css.js +7 -7
- package/dist/components/Select/Select.d.ts +53 -35
- package/dist/components/Select/Select.js +99 -27
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.d.ts +2 -1
- package/dist/components/Select/SelectExample.js +104 -89
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/Select/select.css +12 -18
- package/dist/components/Select/select.css.js +12 -18
- package/dist/components/SelectField/SelectFieldExample.d.ts +23 -0
- package/dist/components/SelectField/SelectFieldExample.js +13 -0
- package/dist/components/SelectField/SelectFieldExample.js.map +1 -0
- package/dist/components/Skeleton/SkeletonExample.d.ts +2 -1
- package/dist/components/Skeleton/SkeletonExample.js +10 -9
- package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
- package/dist/components/SkeletonText/SkeletonTextExample.d.ts +2 -1
- package/dist/components/SkeletonText/SkeletonTextExample.js +12 -11
- package/dist/components/SkeletonText/SkeletonTextExample.js.map +1 -1
- package/dist/components/Slider/Slider.js +1 -1
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider/SliderExample.js +3 -0
- package/dist/components/Slider/SliderExample.js.map +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +27 -0
- package/dist/components/Snackbar/Snackbar.js +23 -0
- package/dist/components/Snackbar/Snackbar.js.map +1 -0
- package/dist/components/Snackbar/SnackbarExample.d.ts +3 -0
- package/dist/components/Snackbar/SnackbarExample.js +11 -0
- package/dist/components/Snackbar/SnackbarExample.js.map +1 -0
- package/dist/components/Snackbar/index.d.ts +1 -0
- package/dist/components/Snackbar/index.js +2 -0
- package/dist/components/Snackbar/index.js.map +1 -0
- package/dist/components/Snackbar/snackbar.css +19 -0
- package/dist/components/Snackbar/snackbar.css.js +24 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.d.ts +90 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.js +115 -0
- package/dist/components/SnackbarProvider/SnackbarProvider.js.map +1 -0
- package/dist/components/SnackbarProvider/SnackbarProviderExample.d.ts +4 -0
- package/dist/components/SnackbarProvider/SnackbarProviderExample.js +59 -0
- package/dist/components/SnackbarProvider/SnackbarProviderExample.js.map +1 -0
- package/dist/components/SnackbarProvider/index.d.ts +1 -0
- package/dist/components/SnackbarProvider/index.js +2 -0
- package/dist/components/SnackbarProvider/index.js.map +1 -0
- package/dist/components/SnackbarProvider/snackbar-provider-example.css +15 -0
- package/dist/components/SnackbarProvider/snackbar-provider-example.css.js +20 -0
- package/dist/components/SnackbarProvider/snackbar-provider.css +15 -0
- package/dist/components/SnackbarProvider/snackbar-provider.css.js +20 -0
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +1 -1
- package/dist/components/TabGroup/TabGroup.js +1 -1
- package/dist/components/TabGroup/TabGroup.js.map +1 -1
- package/dist/components/TabGroup/TabGroupExample.d.ts +2 -1
- package/dist/components/TabGroup/TabGroupExample.js +50 -45
- package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
- package/dist/components/TabGroup/tab-group.css +6 -6
- package/dist/components/TabGroup/tab-group.css.js +6 -6
- package/dist/components/TabList/TabList.d.ts +1 -1
- package/dist/components/TabList/TabList.js +32 -22
- package/dist/components/TabList/TabList.js.map +1 -1
- package/dist/components/TabList/tab-list.css +6 -9
- package/dist/components/TabList/tab-list.css.js +6 -9
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/TagExample.d.ts +2 -1
- package/dist/components/Tag/TagExample.js +12 -11
- package/dist/components/Tag/TagExample.js.map +1 -1
- package/dist/components/TextField/TextField.js +1 -1
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextField/TextFieldExample.d.ts +3 -0
- package/dist/components/TextField/TextFieldExample.js +6 -0
- package/dist/components/TextField/TextFieldExample.js.map +1 -0
- package/dist/components/TextInput/TextInput.d.ts +2 -2
- package/dist/components/TextInput/TextInput.js +27 -4
- package/dist/components/TextInput/TextInput.js.map +1 -1
- package/dist/components/TextInput/TextInputExample.js +9 -0
- package/dist/components/TextInput/TextInputExample.js.map +1 -1
- package/dist/components/TextInput/text-input.css +12 -25
- package/dist/components/TextInput/text-input.css.js +12 -25
- package/dist/components/Textarea/Textarea.d.ts +3 -3
- package/dist/components/Textarea/Textarea.js +2 -10
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +2 -2
- package/dist/components/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/TimeInput/Listbox.d.ts +10 -5
- package/dist/components/TimeInput/Listbox.js +14 -55
- package/dist/components/TimeInput/Listbox.js.map +1 -1
- package/dist/components/TimeInput/Segment.d.ts +3 -4
- package/dist/components/TimeInput/Segment.js +17 -13
- package/dist/components/TimeInput/Segment.js.map +1 -1
- package/dist/components/TimeInput/TimeInput.d.ts +3 -5
- package/dist/components/TimeInput/TimeInput.js +70 -23
- package/dist/components/TimeInput/TimeInput.js.map +1 -1
- package/dist/components/TimeInput/time-input.css +10 -9
- package/dist/components/TimeInput/time-input.css.js +10 -9
- package/dist/components/ToggleOption/ToggleOption.d.ts +1 -1
- package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +4 -3
- package/dist/components/Tooltip/Tooltip.js +12 -18
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/TooltipExample.js +1 -1
- package/dist/components/Tooltip/TooltipExample.js.map +1 -1
- package/dist/components/Tooltip/tooltip.css +0 -2
- package/dist/components/Tooltip/tooltip.css.js +0 -2
- package/dist/components/Truncated/Truncated.d.ts +1 -0
- package/dist/components/Truncated/Truncated.js +2 -8
- package/dist/components/Truncated/Truncated.js.map +1 -1
- package/dist/components/Truncated/truncated.css +8 -0
- package/dist/components/Truncated/truncated.css.js +13 -0
- package/dist/components/UIProvider/AriaLiveMessageHandler.d.ts +13 -0
- package/dist/components/UIProvider/AriaLiveMessageHandler.js +30 -0
- package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +1 -0
- package/dist/components/UIProvider/UIProvider.d.ts +12 -1
- package/dist/components/UIProvider/UIProvider.js +13 -4
- package/dist/components/UIProvider/UIProvider.js.map +1 -1
- package/dist/components/UIProvider/UIProviderExample.d.ts +5 -0
- package/dist/components/UIProvider/UIProviderExample.js +92 -0
- package/dist/components/UIProvider/UIProviderExample.js.map +1 -0
- package/dist/constants/phases.js +0 -1
- package/dist/constants/phases.js.map +1 -1
- package/dist/hooks/useAddEventListener.d.ts +2 -1
- package/dist/hooks/useAddEventListener.js.map +1 -1
- package/dist/hooks/useArrowNavigation.d.ts +50 -0
- package/dist/hooks/useArrowNavigation.js +57 -0
- package/dist/hooks/useArrowNavigation.js.map +1 -0
- package/dist/hooks/useCheckboxGroupState.d.ts +1 -1
- package/dist/hooks/useContainerWidth.d.ts +16 -0
- package/dist/hooks/useContainerWidth.js +35 -0
- package/dist/hooks/useContainerWidth.js.map +1 -0
- package/dist/hooks/useFloating.d.ts +7 -6
- package/dist/hooks/useFloating.js +10 -12
- package/dist/hooks/useFloating.js.map +1 -1
- package/dist/hooks/useSnackbarContext.d.ts +1 -0
- package/dist/hooks/useSnackbarContext.js +16 -0
- package/dist/hooks/useSnackbarContext.js.map +1 -0
- package/dist/hooks/useSwipe.d.ts +6 -0
- package/dist/hooks/useSwipe.js +28 -0
- package/dist/hooks/useSwipe.js.map +1 -0
- package/dist/styles/base.css +87 -15
- package/dist/styles/base.css.js +87 -15
- package/dist/types/common.d.ts +9 -4
- package/dist/types/common.js.map +1 -1
- package/dist/types/meta.d.ts +1 -1
- package/dist/types/meta.js +0 -7
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/createExampleChildElement.js +1 -1
- package/dist/utils/createExampleChildElement.js.map +1 -1
- package/dist/utils/demo.d.ts +31 -6
- package/dist/utils/demo.js.map +1 -1
- package/dist/utils/dom.d.ts +2 -0
- package/dist/utils/dom.js +9 -0
- package/dist/utils/dom.js.map +1 -0
- package/dist/utils/handleKeyDown.d.ts +4 -3
- package/dist/utils/handleKeyDown.js +6 -3
- package/dist/utils/handleKeyDown.js.map +1 -1
- package/dist/utils/keyboard.d.ts +2 -1
- package/dist/utils/keyboard.js.map +1 -1
- package/dist/utils/scrollListItemsStyle.d.ts +10 -0
- package/dist/utils/scrollListItemsStyle.js +17 -0
- package/dist/utils/scrollListItemsStyle.js.map +1 -0
- package/dist/utils/snackbarContext.d.ts +38 -0
- package/dist/utils/snackbarContext.js +3 -0
- package/dist/utils/snackbarContext.js.map +1 -0
- package/dist/utils/uiContext.d.ts +6 -0
- package/dist/utils/uiContext.js.map +1 -1
- package/dist/utils/useIds.d.ts +4 -0
- package/dist/utils/useIds.js +11 -0
- package/dist/utils/useIds.js.map +1 -0
- package/package.json +41 -12
- package/src/components/Accordion/Accordion.rtl.test.tsx +17 -0
- package/src/components/Accordion/Accordion.tsx +87 -24
- package/src/components/Accordion/AccordionExample.tsx +78 -72
- package/src/components/Accordion/accordion.scss +37 -36
- package/src/components/Avatar/Avatar.rtl.test.tsx +16 -0
- package/src/components/Avatar/Avatar.tsx +30 -26
- package/src/components/Avatar/AvatarExample.tsx +44 -42
- package/src/components/AvatarGroup/AvatarGroup.rtl.test.tsx +16 -0
- package/src/components/AvatarGroup/AvatarGroup.tsx +1 -2
- package/src/components/AvatarGroup/AvatarGroupExample.tsx +36 -28
- package/src/components/Badge/Badge.rtl.test.tsx +19 -0
- package/src/components/Badge/Badge.tsx +1 -2
- package/src/components/BadgeDot/BadgeDot.rtl.test.tsx +19 -0
- package/src/components/BadgeDot/BadgeDot.tsx +1 -2
- package/src/components/BannerAlert/BannerAlert.rtl.test.tsx +26 -0
- package/src/components/BannerAlert/BannerAlert.tsx +16 -7
- package/src/components/BannerAlert/BannerAlertExample.tsx +4 -0
- package/src/components/BannerAlert/banner-alert.scss +0 -28
- package/src/components/BottomNavigation/BottomNavigation.rtl.test.tsx +21 -0
- package/src/components/BottomNavigation/BottomNavigation.tsx +60 -0
- package/src/components/BottomNavigation/BottomNavigationExample.tsx +121 -0
- package/src/components/BottomNavigation/bottom-navigation.scss +87 -0
- package/src/components/BottomNavigation/index.tsx +1 -0
- package/src/components/Breadcrumb/Breadcrumb.rtl.test.tsx +16 -0
- package/src/components/Breadcrumb/Breadcrumb.tsx +57 -73
- package/src/components/Breadcrumb/BreadcrumbExample.tsx +152 -150
- package/src/components/Button/Button.rtl.test.tsx +16 -0
- package/src/components/Button/Button.tsx +8 -5
- package/src/components/Button/ButtonExample.tsx +27 -25
- package/src/components/ButtonDock/ButtonDock.rtl.test.tsx +18 -0
- package/src/components/ButtonDock/ButtonDock.tsx +68 -0
- package/src/components/ButtonDock/ButtonDockExample.tsx +77 -0
- package/src/components/ButtonDock/button-dock.scss +49 -0
- package/src/components/ButtonDock/index.tsx +1 -0
- package/src/components/CalendarPicker/CalendarPicker.rtl.test.tsx +15 -0
- package/src/components/CalendarPicker/CalendarPicker.tsx +424 -0
- package/src/components/CalendarPicker/CalendarPickerExample.tsx +24 -0
- package/src/components/CalendarPicker/calendar-picker.scss +89 -0
- package/src/components/CalendarPicker/index.tsx +1 -0
- package/src/components/Card/Card.rtl.test.tsx +19 -0
- package/src/components/Card/Card.tsx +4 -11
- package/src/components/Card/CardExample.tsx +1 -0
- package/src/components/Card/card.scss +0 -5
- package/src/components/Carousel/Carousel.tsx +177 -0
- package/src/components/Carousel/CarouselExample.tsx +82 -0
- package/src/components/Carousel/carousel.scss +39 -0
- package/src/components/Carousel/index.tsx +1 -0
- package/src/components/Checkbox/Checkbox.rtl.test.tsx +27 -0
- package/src/components/Checkbox/Checkbox.tsx +1 -3
- package/src/components/Checkbox/checkbox.scss +4 -4
- package/src/components/CheckboxGroup/CheckboxGroup.rtl.test.tsx +19 -0
- package/src/components/CheckboxGroup/CheckboxGroupExample.tsx +51 -43
- package/src/components/CheckboxOption/CheckboxOption.rtl.test.tsx +24 -0
- package/src/components/ChipAssist/ChipAssist.rtl.test.tsx +16 -0
- package/src/components/ChipAssist/ChipAssistExample.tsx +26 -24
- package/src/components/ChipFilter/ChipFilter.rtl.test.tsx +15 -0
- package/src/components/ChipFilter/ChipFilterExample.tsx +3 -0
- package/src/components/ChipGroup/ChipGroup.rtl.test.tsx +32 -0
- package/src/components/ChipGroup/ChipGroupExample.tsx +11 -9
- package/src/components/ChipInput/ChipInput.rtl.test.tsx +16 -0
- package/src/components/ChipInput/ChipInputExample.tsx +41 -39
- package/src/components/ChipSuggestion/ChipSuggestion.rtl.test.tsx +19 -0
- package/src/components/ChipSuggestion/ChipSuggestionExample.tsx +18 -16
- package/src/components/ChipUtility/ChipUtility.rtl.test.tsx +16 -0
- package/src/components/ChipUtility/ChipUtility.tsx +1 -3
- package/src/components/ChipUtility/ChipUtilityExample.tsx +56 -54
- package/src/components/DateField/DateField.rtl.test.tsx +24 -0
- package/src/components/DateField/DateField.tsx +58 -0
- package/src/components/DateField/DateFieldExample.tsx +13 -0
- package/src/components/DateField/date-field.scss +8 -0
- package/src/components/DateField/index.tsx +1 -0
- package/src/components/DateInput/DateInput.rtl.test.tsx +17 -0
- package/src/components/DateInput/DateInput.tsx +197 -0
- package/src/components/DateInput/DateInputExample.tsx +17 -0
- package/src/components/DateInput/date-input.scss +13 -0
- package/src/components/DateInput/index.tsx +1 -0
- package/src/components/Dialog/Dialog.rtl.test.tsx +22 -0
- package/src/components/Dialog/Dialog.tsx +26 -7
- package/src/components/Dialog/DialogExample.tsx +4 -1
- package/src/components/Dialog/dialog.scss +25 -79
- package/src/components/Divider/Divider.rtl.test.tsx +8 -0
- package/src/components/Divider/Divider.tsx +1 -2
- package/src/components/Divider/DividerExample.tsx +6 -2
- package/src/components/Divider/divider.scss +1 -1
- package/src/components/Drawer/Drawer.rtl.test.tsx +27 -0
- package/src/components/Drawer/Drawer.tsx +135 -0
- package/src/components/Drawer/DrawerExample.tsx +93 -0
- package/src/components/Drawer/drawer.scss +67 -0
- package/src/components/Drawer/index.tsx +1 -0
- package/src/components/EmptyState/EmptyState.rtl.test.tsx +16 -0
- package/src/components/EmptyState/EmptyStateExample.tsx +24 -16
- package/src/components/Fab/Fab.rtl.test.tsx +15 -0
- package/src/components/Fab/Fab.tsx +6 -4
- package/src/components/Fab/FabExample.tsx +5 -2
- package/src/components/FileUpload/FileUpload.rtl.test.tsx +14 -0
- package/src/components/FileUpload/FileUpload.tsx +1 -2
- package/src/components/FileUpload/FileUploadExample.tsx +19 -17
- package/src/components/FileUploadItem/FileUploadItem.rtl.test.tsx +19 -0
- package/src/components/FileUploadItem/FileUploadItem.tsx +1 -3
- package/src/components/FileUploadItem/FileUploadItemExample.tsx +47 -40
- package/src/components/FormField/FormField.rtl.test.tsx +30 -0
- package/src/components/FormField/FormField.tsx +3 -4
- package/src/components/FormField/form-field.scss +1 -1
- package/src/components/Img/Img.rtl.test.tsx +15 -0
- package/src/components/InlineAlert/InlineAlert.rtl.test.tsx +15 -0
- package/src/components/InlineAlert/InlineAlert.tsx +1 -2
- package/src/components/Layout/Layout.rtl.test.tsx +15 -0
- package/src/components/Layout/LayoutExample.tsx +4 -1
- package/src/components/Link/Link.rtl.test.tsx +14 -0
- package/src/components/Link/Link.tsx +1 -3
- package/src/components/Link/LinkExample.tsx +4 -1
- package/src/components/ListItem/ListItem.rtl.test.tsx +18 -0
- package/src/components/ListItem/ListItem.tsx +132 -73
- package/src/components/ListItem/ListItemExample.tsx +14 -13
- package/src/components/ListItem/list-item.scss +16 -10
- package/src/components/ListItemMenu/ListItemMenu.tsx +358 -0
- package/src/components/ListItemMenu/index.tsx +1 -0
- package/src/components/Menu/Menu.rtl.test.tsx +15 -0
- package/src/components/Menu/Menu.tsx +39 -106
- package/src/components/Menu/MenuExample.tsx +2 -32
- package/src/components/Menu/menu.scss +4 -16
- package/src/components/MenuButton/MenuButton.rtl.test.tsx +15 -0
- package/src/components/MenuButton/MenuButton.tsx +1 -3
- package/src/components/Modal/Modal.rtl.test.tsx +20 -0
- package/src/components/Modal/Modal.tsx +8 -5
- package/src/components/NumberField/NumberField.rtl.test.tsx +24 -0
- package/src/components/NumberInput/NumberInput.rtl.test.tsx +15 -0
- package/src/components/NumberInput/NumberInput.tsx +16 -22
- package/src/components/NumberInput/number-input.scss +0 -1
- package/src/components/OTPInput/OTPInput.rtl.test.tsx +19 -0
- package/src/components/OTPInput/OTPInput.tsx +3 -4
- package/src/components/OTPInput/OTPInputExample.tsx +21 -17
- package/src/components/PageControl/PageControl.rtl.test.tsx +15 -0
- package/src/components/PageControl/PageControl.tsx +23 -23
- package/src/components/PageControl/PageControlExample.tsx +36 -0
- package/src/components/Pagination/Pagination.rtl.test.tsx +15 -0
- package/src/components/Pagination/Pagination.tsx +2 -7
- package/src/components/PasswordField/PasswordField.rtl.test.tsx +24 -0
- package/src/components/PasswordField/PasswordField.tsx +4 -5
- package/src/components/PasswordInput/PasswordInput.rtl.test.tsx +15 -0
- package/src/components/PasswordInput/PasswordInput.tsx +2 -2
- package/src/components/PhoneNumberField/PhoneNumberField.rtl.test.tsx +24 -0
- package/src/components/PhoneNumberInput/PhoneNumberInput.rtl.test.tsx +17 -0
- package/src/components/PhoneNumberInput/PhoneNumberInput.tsx +103 -144
- package/src/components/PhoneNumberInput/PhoneNumberInputExample.tsx +8 -0
- package/src/components/PhoneNumberInput/phone-number-input.scss +40 -31
- package/src/components/Popover/Popover.rtl.test.tsx +28 -0
- package/src/components/Popover/Popover.tsx +82 -72
- package/src/components/Popover/PopoverExample.tsx +7 -1
- package/src/components/Popover/popover.scss +3 -13
- package/src/components/Portal/Portal.rtl.test.tsx +15 -0
- package/src/components/ProgressBar/ProgressBar.rtl.test.tsx +15 -0
- package/src/components/ProgressBar/ProgressBar.tsx +1 -2
- package/src/components/ProgressCircle/ProgressCircle.rtl.test.tsx +15 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +1 -2
- package/src/components/ProgressionStepper/ProgressionStepper.rtl.test.tsx +19 -0
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +2 -4
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +49 -47
- package/src/components/ProgressionStepperBar/ProgressionStepperBar.rtl.test.tsx +15 -0
- package/src/components/ProgressionStepperBar/ProgressionStepperBar.tsx +9 -4
- package/src/components/Radio/Radio.rtl.test.tsx +15 -0
- package/src/components/Radio/Radio.tsx +1 -3
- package/src/components/RadioGroup/RadioGroup.rtl.test.tsx +32 -0
- package/src/components/RadioGroup/RadioGroup.tsx +2 -3
- package/src/components/RadioGroup/RadioGroupExample.tsx +3 -1
- package/src/components/RadioOption/RadioOption.rtl.test.tsx +15 -0
- package/src/components/RadioOption/RadioOption.tsx +1 -1
- package/src/components/Rating/Rating.rtl.test.tsx +16 -0
- package/src/components/Rating/Rating.tsx +9 -12
- package/src/components/Rating/RatingExample.tsx +11 -9
- package/src/components/Scrim/Scrim.rtl.test.tsx +15 -0
- package/src/components/Scrim/Scrim.tsx +11 -4
- package/src/components/Scrim/scrim.scss +0 -4
- package/src/components/SearchBar/SearchBar.rtl.test.tsx +41 -0
- package/src/components/SearchBar/SearchBar.tsx +95 -89
- package/src/components/SearchBar/SearchBarExample.tsx +3 -20
- package/src/components/SegmentedControl/SegmentedControl.rtl.test.tsx +26 -0
- package/src/components/SegmentedControl/SegmentedControl.tsx +2 -4
- package/src/components/SegmentedControl/SegmentedControlExample.tsx +34 -24
- package/src/components/SegmentedControl/segmented-control.scss +19 -14
- package/src/components/Select/Select.rtl.test.tsx +25 -0
- package/src/components/Select/Select.tsx +229 -102
- package/src/components/Select/SelectExample.tsx +111 -91
- package/src/components/Select/select.scss +13 -23
- package/src/components/SelectField/SelectField.rtl.test.tsx +25 -0
- package/src/components/SelectField/SelectFieldExample.tsx +16 -0
- package/src/components/Skeleton/Skeleton.rtl.test.tsx +16 -0
- package/src/components/Skeleton/SkeletonExample.tsx +12 -10
- package/src/components/SkeletonText/SkeletonText.rtl.test.tsx +16 -0
- package/src/components/SkeletonText/SkeletonTextExample.tsx +14 -13
- package/src/components/Slider/Slider.rtl.test.tsx +8 -0
- package/src/components/Slider/Slider.tsx +1 -2
- package/src/components/Slider/SliderExample.tsx +3 -0
- package/src/components/Snackbar/Snackbar.tsx +48 -0
- package/src/components/Snackbar/SnackbarExample.tsx +12 -0
- package/src/components/Snackbar/index.tsx +1 -0
- package/src/components/Snackbar/snackbar.scss +22 -0
- package/src/components/SnackbarProvider/SnackbarProvider.tsx +160 -0
- package/src/components/SnackbarProvider/SnackbarProviderExample.tsx +127 -0
- package/src/components/SnackbarProvider/index.tsx +1 -0
- package/src/components/SnackbarProvider/snackbar-provider-example.scss +17 -0
- package/src/components/SnackbarProvider/snackbar-provider.scss +15 -0
- package/src/components/Switch/Switch.rtl.test.tsx +15 -0
- package/src/components/Switch/Switch.tsx +1 -3
- package/src/components/SwitchOption/SwitchOption.rtl.test.tsx +15 -0
- package/src/components/TabGroup/TabGroup.rtl.test.tsx +19 -0
- package/src/components/TabGroup/TabGroup.tsx +1 -2
- package/src/components/TabGroup/TabGroupExample.tsx +52 -46
- package/src/components/TabGroup/tab-group.scss +7 -5
- package/src/components/TabList/TabList.rtl.test.tsx +26 -0
- package/src/components/TabList/TabList.tsx +36 -31
- package/src/components/TabList/tab-list.scss +6 -9
- package/src/components/Table/Table.rtl.test.tsx +28 -0
- package/src/components/Tag/Tag.rtl.test.tsx +20 -0
- package/src/components/Tag/Tag.tsx +1 -3
- package/src/components/Tag/TagExample.tsx +14 -12
- package/src/components/TextField/TextField.rtl.test.tsx +24 -0
- package/src/components/TextField/TextField.tsx +0 -1
- package/src/components/TextField/TextFieldExample.tsx +8 -0
- package/src/components/TextInput/TextInput.rtl.test.tsx +17 -0
- package/src/components/TextInput/TextInput.tsx +46 -12
- package/src/components/TextInput/TextInputExample.tsx +9 -0
- package/src/components/TextInput/text-input.scss +9 -31
- package/src/components/Textarea/Textarea.rtl.test.tsx +17 -0
- package/src/components/Textarea/Textarea.tsx +5 -16
- package/src/components/TextareaField/TextareaField.rtl.test.tsx +24 -0
- package/src/components/TextareaField/TextareaField.tsx +2 -0
- package/src/components/TimeInput/Listbox.tsx +37 -64
- package/src/components/TimeInput/Segment.tsx +31 -21
- package/src/components/TimeInput/TimeInput.rtl.test.tsx +15 -0
- package/src/components/TimeInput/TimeInput.tsx +132 -65
- package/src/components/TimeInput/time-input.scss +5 -4
- package/src/components/ToggleOption/ToggleOption.rtl.test.tsx +15 -0
- package/src/components/ToggleOption/ToggleOption.tsx +1 -2
- package/src/components/Tooltip/Tooltip.rtl.test.tsx +24 -0
- package/src/components/Tooltip/Tooltip.tsx +14 -31
- package/src/components/Tooltip/TooltipExample.tsx +6 -8
- package/src/components/Tooltip/tooltip.scss +0 -2
- package/src/components/TopNavigation/TopNavigation.rtl.test.tsx +15 -0
- package/src/components/Truncated/Truncated.rtl.test.tsx +15 -0
- package/src/components/Truncated/Truncated.tsx +2 -9
- package/src/components/Truncated/truncated.scss +8 -0
- package/src/components/Txt/Txt.rtl.test.tsx +15 -0
- package/src/components/UIProvider/AriaLiveMessageHandler.tsx +44 -0
- package/src/components/UIProvider/UIProvider.tsx +16 -2
- package/src/components/UIProvider/UIProviderExample.tsx +146 -0
- package/src/constants/phases.ts +0 -1
- package/src/hooks/useAddEventListener.ts +3 -1
- package/src/hooks/useArrowNavigation.ts +107 -0
- package/src/hooks/useContainerWidth.tsx +37 -0
- package/src/hooks/useFloating.ts +20 -19
- package/src/hooks/useSnackbarContext.ts +18 -0
- package/src/hooks/useSwipe.ts +32 -0
- package/src/rtl/hasNoBasicA11yIssues.tsx +27 -0
- package/src/rtl/util.tsx +10 -0
- package/src/styles/base.scss +131 -70
- package/src/types/common.ts +9 -4
- package/src/types/meta.ts +1 -9
- package/src/utils/createExampleChildElement.tsx +1 -1
- package/src/utils/demo.ts +41 -7
- package/src/utils/dom.ts +6 -0
- package/src/utils/handleKeyDown.ts +11 -6
- package/src/utils/keyboard.ts +3 -0
- package/src/utils/scrollListItemsStyle.ts +29 -0
- package/src/utils/snackbarContext.tsx +43 -0
- package/src/utils/uiContext.ts +4 -1
- package/src/utils/useIds.ts +16 -0
- package/tsconfig.build.json +21 -0
- package/tsconfig.json +9 -1
- package/dist/components/Accordion/AccordionSection.d.ts +0 -84
- package/dist/components/Accordion/AccordionSection.js +0 -27
- package/dist/components/Accordion/AccordionSection.js.map +0 -1
- package/dist/components/Combobox/Combobox.d.ts +0 -92
- package/dist/components/Combobox/Combobox.js +0 -58
- package/dist/components/Combobox/Combobox.js.map +0 -1
- package/dist/components/Combobox/ListItems.d.ts +0 -26
- package/dist/components/Combobox/ListItems.js +0 -22
- package/dist/components/Combobox/ListItems.js.map +0 -1
- package/dist/components/Combobox/index.d.ts +0 -1
- package/dist/components/Combobox/index.js +0 -2
- package/dist/components/Combobox/index.js.map +0 -1
- package/dist/components/Listbox/Listbox.d.ts +0 -116
- package/dist/components/Listbox/Listbox.js +0 -83
- package/dist/components/Listbox/Listbox.js.map +0 -1
- package/dist/components/Listbox/index.d.ts +0 -1
- package/dist/components/Listbox/index.js +0 -2
- package/dist/components/Listbox/index.js.map +0 -1
- package/dist/hooks/useCombobox.d.ts +0 -56
- package/dist/hooks/useCombobox.js +0 -104
- package/dist/hooks/useCombobox.js.map +0 -1
- package/dist/hooks/useKeyNavigation.d.ts +0 -17
- package/dist/hooks/useKeyNavigation.js +0 -46
- package/dist/hooks/useKeyNavigation.js.map +0 -1
- package/src/components/Accordion/AccordionSection.tsx +0 -128
- package/src/components/Combobox/Combobox.tsx +0 -224
- package/src/components/Combobox/ListItems.tsx +0 -107
- package/src/components/Combobox/index.tsx +0 -1
- package/src/components/Listbox/Listbox.tsx +0 -257
- package/src/components/Listbox/index.tsx +0 -1
- package/src/hooks/useCombobox.ts +0 -173
- package/src/hooks/useKeyNavigation.ts +0 -66
- package/src/utils/placeholder.test.ts +0 -7
|
@@ -9,10 +9,13 @@ style.appendChild(document.createTextNode(`[data-bspk=text-input] {
|
|
|
9
9
|
border: solid 1px var(--border-color);
|
|
10
10
|
height: var(--field-height);
|
|
11
11
|
border-radius: var(--radius-sm);
|
|
12
|
-
padding: 0
|
|
12
|
+
padding: 0 var(--field-padding);
|
|
13
13
|
gap: var(--spacing-sizing-01);
|
|
14
14
|
width: 100%;
|
|
15
15
|
}
|
|
16
|
+
[data-bspk=text-input][data-show-clear-button] {
|
|
17
|
+
padding-right: 0;
|
|
18
|
+
}
|
|
16
19
|
[data-bspk=text-input] > * {
|
|
17
20
|
display: flex;
|
|
18
21
|
justify-content: center;
|
|
@@ -32,11 +35,11 @@ style.appendChild(document.createTextNode(`[data-bspk=text-input] {
|
|
|
32
35
|
--border-color: var(--stroke-neutral-disabled-light);
|
|
33
36
|
background: linear-gradient(var(--interactions-disabled-opacity), var(--interactions-disabled-opacity)), linear-gradient(var(--surface-neutral-t1-base), var(--surface-neutral-t1-base));
|
|
34
37
|
}
|
|
35
|
-
[data-bspk=text-input][data-disabled], [data-bspk=text-input]:has(input[disabled]) {
|
|
38
|
+
[data-bspk=text-input][data-disabled], [data-bspk=text-input]:has([data-main-input][disabled]) {
|
|
36
39
|
--border-color: var(--stroke-neutral-disabled-light);
|
|
37
40
|
background: linear-gradient(var(--interactions-disabled-opacity), var(--interactions-disabled-opacity)), linear-gradient(var(--surface-neutral-t1-base), var(--surface-neutral-t1-base));
|
|
38
41
|
}
|
|
39
|
-
[data-bspk=text-input][data-disabled] > *, [data-bspk=text-input]:has(input[disabled]) > * {
|
|
42
|
+
[data-bspk=text-input][data-disabled] > *, [data-bspk=text-input]:has([data-main-input][disabled]) > * {
|
|
40
43
|
color: var(--foreground-neutral-disabled-on-surface);
|
|
41
44
|
}
|
|
42
45
|
[data-bspk=text-input][data-invalid] {
|
|
@@ -63,6 +66,10 @@ style.appendChild(document.createTextNode(`[data-bspk=text-input] {
|
|
|
63
66
|
--field-icon-width: var(--spacing-sizing-06);
|
|
64
67
|
--field-clear-width: var(--spacing-sizing-06);
|
|
65
68
|
}
|
|
69
|
+
[data-bspk=text-input] [data-leading],
|
|
70
|
+
[data-bspk=text-input] [data-trailing] {
|
|
71
|
+
position: relative;
|
|
72
|
+
}
|
|
66
73
|
[data-bspk=text-input] [data-leading] svg,
|
|
67
74
|
[data-bspk=text-input] [data-trailing] svg {
|
|
68
75
|
width: var(--field-icon-width);
|
|
@@ -71,7 +78,7 @@ style.appendChild(document.createTextNode(`[data-bspk=text-input] {
|
|
|
71
78
|
font: var(--labels-small);
|
|
72
79
|
color: var(--foreground-neutral-on-surface-variant-01);
|
|
73
80
|
}
|
|
74
|
-
[data-bspk=text-input] input {
|
|
81
|
+
[data-bspk=text-input] [data-main-input] {
|
|
75
82
|
flex: 1;
|
|
76
83
|
background-color: transparent !important;
|
|
77
84
|
border: none;
|
|
@@ -80,27 +87,7 @@ style.appendChild(document.createTextNode(`[data-bspk=text-input] {
|
|
|
80
87
|
pointer-events: all;
|
|
81
88
|
text-overflow: ellipsis;
|
|
82
89
|
}
|
|
83
|
-
[data-bspk=text-input] input[type=number]::-webkit-inner-spin-button, [data-bspk=text-input] input[type=number]::-webkit-outer-spin-button {
|
|
84
|
-
display: none;
|
|
85
|
-
}
|
|
86
|
-
[data-bspk=text-input] button[data-clear] {
|
|
87
|
-
display: flex;
|
|
88
|
-
border: none;
|
|
89
|
-
background: none;
|
|
90
|
-
padding: 0;
|
|
91
|
-
cursor: pointer;
|
|
92
|
-
pointer-events: all;
|
|
93
|
-
margin-left: var(--spacing-sizing-02);
|
|
94
|
-
padding-right: var(--field-padding);
|
|
95
|
-
}
|
|
96
|
-
[data-bspk=text-input] button[data-clear] svg {
|
|
97
|
-
pointer-events: none;
|
|
98
|
-
width: var(--field-clear-width);
|
|
99
|
-
}
|
|
100
|
-
[data-bspk=text-input]:not(:focus-within), [data-bspk=text-input][data-empty], [data-bspk=text-input][data-readonly], [data-bspk=text-input][data-disabled], [data-bspk=text-input][data-clear-hidden] {
|
|
101
|
-
padding-right: var(--field-padding);
|
|
102
|
-
}
|
|
103
|
-
[data-bspk=text-input]:not(:focus-within) button[data-clear], [data-bspk=text-input][data-empty] button[data-clear], [data-bspk=text-input][data-readonly] button[data-clear], [data-bspk=text-input][data-disabled] button[data-clear], [data-bspk=text-input][data-clear-hidden] button[data-clear] {
|
|
90
|
+
[data-bspk=text-input] [data-main-input][type=number]::-webkit-inner-spin-button, [data-bspk=text-input] [data-main-input][type=number]::-webkit-outer-spin-button {
|
|
104
91
|
display: none;
|
|
105
92
|
}
|
|
106
93
|
[data-bspk=text-input]:focus-within {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import './textarea.scss';
|
|
1
2
|
import { ChangeEvent } from 'react';
|
|
2
3
|
import { CommonProps, FormFieldControlProps, SetRef } from '-/types/common';
|
|
3
|
-
import './textarea.scss';
|
|
4
4
|
export type TextareaProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'invalid' | 'readOnly'> & FormFieldControlProps & {
|
|
5
5
|
/**
|
|
6
6
|
* Callback when the value of the field changes.
|
|
@@ -50,7 +50,7 @@ export type TextareaProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'inva
|
|
|
50
50
|
*
|
|
51
51
|
* When set the textarea will automatically adjust its height to fit the content up to this limit.
|
|
52
52
|
*
|
|
53
|
-
* @default
|
|
53
|
+
* @default 10
|
|
54
54
|
* @minimum 3
|
|
55
55
|
* @maximum 10
|
|
56
56
|
*/
|
|
@@ -78,5 +78,5 @@ export type TextareaProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'inva
|
|
|
78
78
|
* @name Textarea
|
|
79
79
|
* @phase Utility
|
|
80
80
|
*/
|
|
81
|
-
export declare function Textarea({ invalid: invalidProp, onChange, textSize, value, name, 'aria-label': ariaLabel, innerRef, placeholder, id: idProp, minRows
|
|
81
|
+
export declare function Textarea({ invalid: invalidProp, onChange, textSize, value, name, 'aria-label': ariaLabel, innerRef, placeholder, id: idProp, minRows, maxRows, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, ...otherProps }: TextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
82
82
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,13 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './textarea.css.js';
|
|
2
3
|
import { useRef } from 'react';
|
|
3
4
|
import { useId } from '../../hooks/useId';
|
|
4
5
|
import { cssWithVars } from '../../utils/cwv';
|
|
5
|
-
import './textarea.css.js';
|
|
6
|
-
const DEFAULT = {
|
|
7
|
-
minRows: 3,
|
|
8
|
-
maxRows: 10,
|
|
9
|
-
textSize: 'medium',
|
|
10
|
-
};
|
|
11
6
|
/**
|
|
12
7
|
* A component that allows users to input large amounts of text that could span multiple lines.
|
|
13
8
|
*
|
|
@@ -30,12 +25,9 @@ const DEFAULT = {
|
|
|
30
25
|
* @name Textarea
|
|
31
26
|
* @phase Utility
|
|
32
27
|
*/
|
|
33
|
-
export function Textarea({ invalid: invalidProp, onChange, textSize =
|
|
28
|
+
export function Textarea({ invalid: invalidProp, onChange, textSize = 'medium', value = '', name, 'aria-label': ariaLabel, innerRef, placeholder, id: idProp, minRows = 4, maxRows = 10, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, ...otherProps }) {
|
|
34
29
|
const id = useId(idProp);
|
|
35
30
|
const invalid = !otherProps.readOnly && !otherProps.disabled && invalidProp;
|
|
36
|
-
// ensure minRows and maxRows are within bounds
|
|
37
|
-
const minRows = Math.min(DEFAULT.maxRows, Math.max(minRowsProp, DEFAULT.minRows));
|
|
38
|
-
const maxRows = Math.max(DEFAULT.minRows, Math.min(maxRowsProp, DEFAULT.maxRows));
|
|
39
31
|
const onInput = () => {
|
|
40
32
|
const target = textareaElement.current;
|
|
41
33
|
if (!target)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Textarea.js","sourceRoot":"","sources":["../../../src/components/Textarea/Textarea.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAe,MAAM,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA2D1C;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,UAAU,QAAQ,CAAC,EACrB,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,QAAQ,GAAG,QAAQ,EACnB,KAAK,GAAG,EAAE,EACV,IAAI,EACJ,YAAY,EAAE,SAAS,EACvB,QAAQ,EACR,WAAW,EACX,EAAE,EAAE,MAAM,EACV,OAAO,GAAG,CAAC,EACX,OAAO,GAAG,EAAE,EACZ,kBAAkB,EAAE,eAAe,EACnC,mBAAmB,EAAE,gBAAgB,EACrC,GAAG,UAAU,EACD;IACZ,MAAM,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IACzB,MAAM,OAAO,GAAG,CAAC,UAAU,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ,IAAI,WAAW,CAAC;IAE5E,MAAM,OAAO,GAAG,GAAG,EAAE;QACjB,MAAM,MAAM,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
|
|
36
36
|
* @phase UXReview
|
|
37
37
|
*/
|
|
38
|
-
export declare function TextareaField({ label, helperText, controlId, required, invalid, characterCount, ...inputProps }: TextareaFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
38
|
+
export declare function TextareaField({ label, errorMessage, helperText, controlId, required, invalid, characterCount, ...inputProps }: TextareaFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
39
39
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -30,9 +30,9 @@ import { tryIntParse } from '../../utils/tryIntPsrse';
|
|
|
30
30
|
* @name TextareaField
|
|
31
31
|
* @phase UXReview
|
|
32
32
|
*/
|
|
33
|
-
export function TextareaField({ label, helperText, controlId, required, invalid, characterCount, ...inputProps }) {
|
|
33
|
+
export function TextareaField({ label, errorMessage, helperText, controlId, required, invalid, characterCount, ...inputProps }) {
|
|
34
34
|
const maxLength = tryIntParse(inputProps.maxLength) || -1;
|
|
35
|
-
return (_jsx(FormField, { controlId: controlId, "data-bspk": "textarea-field", helperText: helperText, invalid: invalid, label: label, labelTrailing:
|
|
35
|
+
return (_jsx(FormField, { controlId: controlId, "data-bspk": "textarea-field", errorMessage: errorMessage, helperText: helperText, invalid: invalid, label: label, labelTrailing:
|
|
36
36
|
// If characterCount is falsey, we don't want to show the labelTrailing
|
|
37
37
|
characterCount && (_jsx(Txt, { style: {
|
|
38
38
|
color: 'var(--foreground-neutral-on-surface-variant-02)',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../src/components/TextareaField/TextareaField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAWlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,aAAa,CAAC,EAC1B,KAAK,EACL,UAAU,EACV,SAAS,EACT,QAAQ,EACR,OAAO,EACP,cAAc,EACd,GAAG,UAAU,EACI;IACjB,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAE1D,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,SAAS,eACV,gBAAgB,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa;QACT,uEAAuE;QACvE,cAAc,IAAI,CACd,KAAC,GAAG,IACA,KAAK,EAAE;gBACH,KAAK,EAAE,iDAAiD;aAC3D,EACD,OAAO,EAAC,YAAY,YAEnB,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,GACzE,CACT,EAEL,QAAQ,EAAE,QAAQ,YAEjB,CAAC,UAAU,EAAE,EAAE,CAAC,CACb,KAAC,QAAQ;QACL,EAAE;eACE,UAAU,KACV,UAAU,EACd,OAAO,EAAE,OAAO,GAClB,CACL,GACO,CACf,CAAC;AACN,CAAC"}
|
|
1
|
+
{"version":3,"file":"TextareaField.js","sourceRoot":"","sources":["../../../src/components/TextareaField/TextareaField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAsB,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACvE,OAAO,EAAiB,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAChE,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAWlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,UAAU,aAAa,CAAC,EAC1B,KAAK,EACL,YAAY,EACZ,UAAU,EACV,SAAS,EACT,QAAQ,EACR,OAAO,EACP,cAAc,EACd,GAAG,UAAU,EACI;IACjB,MAAM,SAAS,GAAG,WAAW,CAAC,UAAU,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC;IAE1D,OAAO,CACH,KAAC,SAAS,IACN,SAAS,EAAE,SAAS,eACV,gBAAgB,EAC1B,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,OAAO,EAAE,OAAO,EAChB,KAAK,EAAE,KAAK,EACZ,aAAa;QACT,uEAAuE;QACvE,cAAc,IAAI,CACd,KAAC,GAAG,IACA,KAAK,EAAE;gBACH,KAAK,EAAE,iDAAiD;aAC3D,EACD,OAAO,EAAC,YAAY,YAEnB,GAAG,UAAU,EAAE,KAAK,EAAE,MAAM,IAAI,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,CAAC,CAAC,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,EAAE,GACzE,CACT,EAEL,QAAQ,EAAE,QAAQ,YAEjB,CAAC,UAAU,EAAE,EAAE,CAAC,CACb,KAAC,QAAQ;QACL,EAAE;eACE,UAAU,KACV,UAAU,EACd,OAAO,EAAE,OAAO,GAClB,CACL,GACO,CACf,CAAC;AACN,CAAC"}
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import { TimeInputType } from './Segment';
|
|
2
|
-
type
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
type Option = {
|
|
3
|
+
id: string;
|
|
4
|
+
value: string;
|
|
5
|
+
label: string;
|
|
6
|
+
};
|
|
7
|
+
type TimeInputListboxProps = {
|
|
8
|
+
options: Option[];
|
|
9
|
+
selectedValue?: string;
|
|
5
10
|
type: TimeInputType;
|
|
6
|
-
onSelect?: (value:
|
|
11
|
+
onSelect?: (value: string) => void;
|
|
7
12
|
onTab?: (e: React.KeyboardEvent) => void;
|
|
8
13
|
};
|
|
9
|
-
export declare function TimeInputListbox
|
|
14
|
+
export declare function TimeInputListbox({ options, selectedValue, type: kind, onSelect, onTab }: TimeInputListboxProps): import("react/jsx-runtime").JSX.Element;
|
|
10
15
|
export {};
|
|
@@ -1,66 +1,25 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { useArrowNavigation } from '../../hooks/useArrowNavigation';
|
|
3
|
+
import { getElementById } from '../../utils/dom';
|
|
4
4
|
import { handleKeyDown } from '../../utils/handleKeyDown';
|
|
5
|
-
import { scrollElementIntoView } from '../../utils/scrollElementIntoView';
|
|
6
5
|
export function TimeInputListbox({ options, selectedValue, type: kind, onSelect, onTab }) {
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
num: prevIndex + (dir === 'down' ? 1 : -1),
|
|
15
|
-
min: 0,
|
|
16
|
-
max: options.length - 1,
|
|
17
|
-
rollover: true,
|
|
18
|
-
});
|
|
19
|
-
scrollElementIntoView(listRef.current?.children[next], listRef.current);
|
|
20
|
-
return next;
|
|
21
|
-
});
|
|
22
|
-
};
|
|
6
|
+
const { activeElementId, arrowKeyCallbacks } = useArrowNavigation({
|
|
7
|
+
ids: options.map((option) => option.id),
|
|
8
|
+
defaultActiveId: (options.find((option) => option.value === selectedValue) || options[0])?.id || null,
|
|
9
|
+
});
|
|
10
|
+
const enterSpaceClick = () => {
|
|
11
|
+
if (activeElementId)
|
|
12
|
+
getElementById(activeElementId)?.click();
|
|
23
13
|
};
|
|
24
|
-
return (_jsx("div", { "aria-label": `Select ${kind}`, "data-scroll-column": kind,
|
|
14
|
+
return (_jsx("div", { "aria-label": `Select ${kind}`, "data-bspk": "time-input-listbox", "data-scroll-column": kind, "data-type": kind, "data-visible": true, id: `${kind}-listbox`, onClickCapture: (event) => {
|
|
25
15
|
const target = event.target;
|
|
26
16
|
if (target.dataset.value)
|
|
27
17
|
onSelect?.(target.dataset.value);
|
|
28
|
-
}, onFocus: () => {
|
|
29
|
-
if (activeIndex < 0 && options.length > 0)
|
|
30
|
-
scrollElementIntoView(listRef.current?.children[activeIndex], listRef.current);
|
|
31
18
|
}, onKeyDown: handleKeyDown({
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
e.preventDefault();
|
|
36
|
-
const previousSibling = e.currentTarget.previousElementSibling;
|
|
37
|
-
if (previousSibling)
|
|
38
|
-
previousSibling.focus();
|
|
39
|
-
else
|
|
40
|
-
e.currentTarget.parentNode?.lastElementChild?.focus();
|
|
41
|
-
},
|
|
42
|
-
ArrowRight: (e) => {
|
|
43
|
-
e.preventDefault();
|
|
44
|
-
const nextSibling = e.currentTarget.nextElementSibling;
|
|
45
|
-
if (nextSibling)
|
|
46
|
-
nextSibling.focus();
|
|
47
|
-
else
|
|
48
|
-
e.currentTarget.parentNode?.firstElementChild?.focus();
|
|
49
|
-
},
|
|
50
|
-
Enter: (e) => {
|
|
51
|
-
e.preventDefault();
|
|
52
|
-
if (activeIndex >= 0 && activeIndex < options.length)
|
|
53
|
-
onSelect?.(options[activeIndex]);
|
|
54
|
-
},
|
|
19
|
+
...arrowKeyCallbacks,
|
|
20
|
+
Enter: enterSpaceClick,
|
|
21
|
+
Space: enterSpaceClick,
|
|
55
22
|
Tab: onTab,
|
|
56
|
-
}),
|
|
57
|
-
const target = event.target;
|
|
58
|
-
setActiveIndex(Number(target.dataset.index));
|
|
59
|
-
event.currentTarget.focus();
|
|
60
|
-
}, ref: (node) => {
|
|
61
|
-
if (!node)
|
|
62
|
-
return;
|
|
63
|
-
listRef.current = node;
|
|
64
|
-
}, role: "listbox", tabIndex: 0, children: options.map((val, index) => (_jsx("span", { "aria-label": `${val}`.padStart(2, '0'), "aria-selected": `${val}` === `${selectedValue}` || undefined, "data-active": activeIndex === index || undefined, "data-index": index, "data-value": val, role: "option", children: `${val}`.padStart(2, '0') }, `${val}`))) }));
|
|
23
|
+
}), role: "listbox", tabIndex: 0, children: options.map((option, index) => (_jsx("span", { "aria-label": option.label, "aria-selected": option.value === selectedValue, "data-active": activeElementId === option.id || undefined, "data-index": index, "data-value": option.value, id: option.id, role: "option", children: `${option.label}`.padStart(2, '0') }, option.id))) }));
|
|
65
24
|
}
|
|
66
25
|
//# sourceMappingURL=Listbox.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Listbox.js","sourceRoot":"","sources":["../../../src/components/TimeInput/Listbox.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Listbox.js","sourceRoot":"","sources":["../../../src/components/TimeInput/Listbox.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAgBtD,MAAM,UAAU,gBAAgB,CAAC,EAAE,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAyB;IAC3G,MAAM,EAAE,eAAe,EAAE,iBAAiB,EAAE,GAAG,kBAAkB,CAAC;QAC9D,GAAG,EAAE,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC;QACvC,eAAe,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,aAAa,CAAC,IAAI,OAAO,CAAC,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,IAAI;KACxG,CAAC,CAAC;IAEH,MAAM,eAAe,GAAG,GAAG,EAAE;QACzB,IAAI,eAAe;YAAE,cAAc,CAAC,eAAe,CAAC,EAAE,KAAK,EAAE,CAAC;IAClE,CAAC,CAAC;IAEF,OAAO,CACH,4BAEgB,UAAU,IAAI,EAAE,eAClB,oBAAoB,wBACV,IAAI,eACb,IAAI,kBACD,IAAI,EAClB,EAAE,EAAE,GAAG,IAAI,UAAU,EACrB,cAAc,EAAE,CAAC,KAAK,EAAE,EAAE;YACtB,MAAM,MAAM,GAAG,KAAK,CAAC,MAAyB,CAAC;YAC/C,IAAI,MAAM,CAAC,OAAO,CAAC,KAAK;gBAAE,QAAQ,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAC/D,CAAC,EACD,SAAS,EAAE,aAAa,CAAC;YACrB,GAAG,iBAAiB;YACpB,KAAK,EAAE,eAAe;YACtB,KAAK,EAAE,eAAe;YACtB,GAAG,EAAE,KAAK;SACb,CAAC,EACF,IAAI,EAAC,SAAS,EACd,QAAQ,EAAE,CAAC,YAEV,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,CAC5B,6BACgB,MAAM,CAAC,KAAK,mBACT,MAAM,CAAC,KAAK,KAAK,aAAa,iBAChC,eAAe,KAAK,MAAM,CAAC,EAAE,IAAI,SAAS,gBAC3C,KAAK,gBACL,MAAM,CAAC,KAAK,EACxB,EAAE,EAAE,MAAM,CAAC,EAAE,EAEb,IAAI,EAAC,QAAQ,YAEZ,GAAG,MAAM,CAAC,KAAK,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAH9B,MAAM,CAAC,EAAE,CAIX,CACV,CAAC,GACA,CACT,CAAC;AACN,CAAC"}
|
|
@@ -8,14 +8,13 @@ export declare const HOUR_BOUNDS: {
|
|
|
8
8
|
};
|
|
9
9
|
export declare const NUMBER_PLACEHOLDER: "--";
|
|
10
10
|
export type TimeInputType = 'hours' | 'meridiem' | 'minutes';
|
|
11
|
-
type TimeInputSegmentProps<T extends
|
|
12
|
-
ariaLabel?: string;
|
|
11
|
+
type TimeInputSegmentProps<T extends string> = {
|
|
13
12
|
disabled?: boolean;
|
|
14
13
|
name: string;
|
|
15
14
|
readOnly?: boolean;
|
|
16
|
-
|
|
15
|
+
value?: T;
|
|
17
16
|
type: TimeInputType;
|
|
18
17
|
onChange: (value: T | null) => void;
|
|
19
18
|
};
|
|
20
|
-
export declare function TimeInputSegment<T extends
|
|
19
|
+
export declare function TimeInputSegment<T extends string>({ disabled, name, readOnly, value: valueProp, type: kind, onChange, }: TimeInputSegmentProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
21
20
|
export {};
|
|
@@ -5,7 +5,7 @@ import { handleKeyDown } from '../../utils/handleKeyDown';
|
|
|
5
5
|
export const MINUTE_BOUNDS = { min: 0, max: 59 };
|
|
6
6
|
export const HOUR_BOUNDS = { min: 1, max: 12 };
|
|
7
7
|
export const NUMBER_PLACEHOLDER = '--';
|
|
8
|
-
export function TimeInputSegment({
|
|
8
|
+
export function TimeInputSegment({ disabled, name, readOnly, value: valueProp, type: kind, onChange, }) {
|
|
9
9
|
const ref = useRef(null);
|
|
10
10
|
const selectAll = (element = ref.current) => {
|
|
11
11
|
if (!element)
|
|
@@ -28,8 +28,8 @@ export function TimeInputSegment({ ariaLabel, disabled, name, readOnly, defaultV
|
|
|
28
28
|
}, [kind]);
|
|
29
29
|
useEffect(() => {
|
|
30
30
|
if (ref.current)
|
|
31
|
-
ref.current.textContent = valueToContent(
|
|
32
|
-
}, [
|
|
31
|
+
ref.current.textContent = valueToContent(valueProp);
|
|
32
|
+
}, [valueProp, valueToContent]);
|
|
33
33
|
const handleBlur = () => {
|
|
34
34
|
window.getSelection()?.removeAllRanges();
|
|
35
35
|
};
|
|
@@ -44,10 +44,12 @@ export function TimeInputSegment({ ariaLabel, disabled, name, readOnly, defaultV
|
|
|
44
44
|
num: Number(currentValue) + increment,
|
|
45
45
|
rollover: true,
|
|
46
46
|
...(kind === 'minutes' ? MINUTE_BOUNDS : HOUR_BOUNDS),
|
|
47
|
-
})
|
|
47
|
+
})
|
|
48
|
+
.toString()
|
|
49
|
+
.padStart(2, '0');
|
|
48
50
|
onChange(nextValue);
|
|
49
51
|
if (ref.current)
|
|
50
|
-
ref.current.textContent = nextValue
|
|
52
|
+
ref.current.textContent = nextValue;
|
|
51
53
|
}, [kind, onChange]);
|
|
52
54
|
const nextSibling = () => getNextSibling(ref.current, '[data-input]');
|
|
53
55
|
const previousSibling = () => getPreviousSibling(ref.current, '[data-input]');
|
|
@@ -90,7 +92,7 @@ export function TimeInputSegment({ ariaLabel, disabled, name, readOnly, defaultV
|
|
|
90
92
|
}
|
|
91
93
|
return;
|
|
92
94
|
}
|
|
93
|
-
// only handle digits
|
|
95
|
+
// only handle digits past this point, ignore everything else
|
|
94
96
|
if (!/^\d$/.test(event.key))
|
|
95
97
|
return;
|
|
96
98
|
let nextNumber = Number(event.key);
|
|
@@ -105,9 +107,10 @@ export function TimeInputSegment({ ariaLabel, disabled, name, readOnly, defaultV
|
|
|
105
107
|
num: nextNumber,
|
|
106
108
|
...(kind === 'minutes' ? MINUTE_BOUNDS : HOUR_BOUNDS),
|
|
107
109
|
});
|
|
108
|
-
|
|
110
|
+
const nextValue = nextNumber.toString().padStart(2, '0');
|
|
111
|
+
onChange(nextValue);
|
|
109
112
|
if (ref.current)
|
|
110
|
-
ref.current.textContent =
|
|
113
|
+
ref.current.textContent = nextValue;
|
|
111
114
|
const moveToNext = (kind === 'hours' && nextNumber > 2) || (kind === 'minutes' && nextNumber > 5);
|
|
112
115
|
if (moveToNext) {
|
|
113
116
|
nextSibling()?.focus();
|
|
@@ -118,20 +121,21 @@ export function TimeInputSegment({ ariaLabel, disabled, name, readOnly, defaultV
|
|
|
118
121
|
}
|
|
119
122
|
return;
|
|
120
123
|
}, [kind, handleIncrement, onChange]);
|
|
121
|
-
|
|
124
|
+
const valueText = valueProp ? valueToContent(valueProp) : 'Empty';
|
|
125
|
+
return (_jsx("span", { "aria-disabled": !!disabled, "aria-label": kind, "aria-readonly": readOnly, "aria-valuemax": kind === 'hours' ? 12 : kind === 'minutes' ? 59 : undefined, "aria-valuemin": kind === 'hours' ? 1 : kind === 'minutes' ? 0 : undefined, "aria-valuetext": valueText, contentEditable: !readOnly && !disabled, "data-input": true, "data-type": kind, "data-value": valueProp || undefined, id: `${name}`, inputMode: kind === 'meridiem' ? 'text' : 'numeric', onBlur: handleBlur, onClick: () => {
|
|
122
126
|
if (disabled || readOnly)
|
|
123
127
|
return;
|
|
124
|
-
selectAll();
|
|
128
|
+
//selectAll();
|
|
125
129
|
}, onFocus: () => {
|
|
126
130
|
if (disabled || readOnly)
|
|
127
131
|
return;
|
|
128
|
-
selectAll();
|
|
132
|
+
//selectAll();
|
|
129
133
|
}, onKeyDown: handleInputKeyDown, ref: (element) => {
|
|
130
134
|
if (!element)
|
|
131
135
|
return;
|
|
132
136
|
ref.current = element;
|
|
133
|
-
element.textContent = valueToContent(
|
|
134
|
-
}, role: "spinbutton", tabIndex: 0 }));
|
|
137
|
+
element.textContent = valueToContent(valueProp);
|
|
138
|
+
}, role: "spinbutton", spellCheck: "false", tabIndex: 0 }));
|
|
135
139
|
}
|
|
136
140
|
function getNextSibling(elem, selector) {
|
|
137
141
|
// Get the next sibling element
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Segment.js","sourceRoot":"","sources":["../../../src/components/TimeInput/Segment.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,MAAM,aAAa,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAW,CAAC;AAC1D,MAAM,CAAC,MAAM,WAAW,GAAG,EAAE,GAAG,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,EAAW,CAAC;AAExD,MAAM,CAAC,MAAM,kBAAkB,GAAG,IAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"Segment.js","sourceRoot":"","sources":["../../../src/components/TimeInput/Segment.tsx"],"names":[],"mappings":";AAAA,OAAO,E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c;QAClB,CAAC,EACD,SAAS,EAAE,kBAAkB,EAC7B,GAAG,EAAE,CAAC,OAAO,EAAE,EAAE;YACb,IAAI,CAAC,OAAO;gBAAE,OAAO;YACrB,GAAG,CAAC,OAAO,GAAG,OAAO,CAAC;YACtB,OAAO,CAAC,WAAW,GAAG,cAAc,CAAC,SAAS,CAAC,CAAC;QACpD,CAAC,EACD,IAAI,EAAC,YAAY,EACjB,UAAU,EAAC,OAAO,EAClB,QAAQ,EAAE,CAAC,GACb,CACL,CAAC;AACN,CAAC;AAED,SAAS,cAAc,CAAC,IAAwB,EAAE,QAAgB;IAC9D,+BAA+B;IAC/B,IAAI,OAAO,GAAG,IAAI,EAAE,kBAAkB,CAAC;IACvC,8CAA8C;IAC9C,yDAAyD;IACzD,OAAO,OAAO,EAAE,CAAC;QACb,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,OAA6B,CAAC;QACpE,OAAO,GAAG,OAAO,CAAC,kBAAkB,CAAC;IACzC,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC;AAED,SAAS,kBAAkB,CAAC,IAAwB,EAAE,QAAgB;IAClE,mCAAmC;IACnC,IAAI,OAAO,GAAG,IAAI,EAAE,sBAAsB,CAAC;IAC3C,8CAA8C;IAC9C,6DAA6D;IAC7D,OAAO,OAAO,EAAE,CAAC;QACb,IAAI,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC;YAAE,OAAO,OAA6B,CAAC;QACpE,OAAO,GAAG,OAAO,CAAC,sBAAsB,CAAC;IAC7C,CAAC;IACD,OAAO,IAAI,CAAC;AAChB,CAAC"}
|
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import './time-input.scss';
|
|
2
2
|
import { TextInputProps } from '-/components/TextInput';
|
|
3
|
-
export declare const MINUTE_OPTIONS:
|
|
4
|
-
export declare const HOUR_OPTIONS:
|
|
5
|
-
|
|
6
|
-
export declare const MERIDIEM_OPTIONS: Meridiem[];
|
|
3
|
+
export declare const MINUTE_OPTIONS: string[];
|
|
4
|
+
export declare const HOUR_OPTIONS: string[];
|
|
5
|
+
export declare const MERIDIEM_OPTIONS: string[];
|
|
7
6
|
export type TimeInputProps = Pick<TextInputProps, 'aria-describedby' | 'aria-errormessage' | 'aria-label' | 'disabled' | 'id' | 'invalid' | 'name' | 'readOnly' | 'size'> & {
|
|
8
7
|
value?: string;
|
|
9
8
|
};
|
|
@@ -22,5 +21,4 @@ export type TimeInputProps = Pick<TextInputProps, 'aria-describedby' | 'aria-err
|
|
|
22
21
|
* @phase UXReview
|
|
23
22
|
*/
|
|
24
23
|
export declare function TimeInput({ value, 'aria-label': ariaLabel, disabled, id: idProp, invalid, readOnly, name, size, 'aria-describedby': ariaDescribedBy, 'aria-errormessage': ariaErrorMessage, }: TimeInputProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export {};
|
|
26
24
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,16 +1,19 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { SvgSchedule } from '@bspk/icons/Schedule';
|
|
3
|
-
import { useEffect, useState } from 'react';
|
|
4
2
|
import './time-input.css.js';
|
|
3
|
+
import { SvgSchedule } from '@bspk/icons/Schedule';
|
|
4
|
+
import { FocusTrap } from 'focus-trap-react';
|
|
5
|
+
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
5
6
|
import { TimeInputListbox } from './Listbox';
|
|
6
7
|
import { TimeInputSegment } from './Segment';
|
|
7
8
|
import { Button } from '../Button';
|
|
8
9
|
import { Menu } from '../Menu';
|
|
10
|
+
import { Portal } from '../Portal';
|
|
9
11
|
import { useFloating } from '../../hooks/useFloating';
|
|
10
12
|
import { useId } from '../../hooks/useId';
|
|
13
|
+
import { useOutsideClick } from '../../hooks/useOutsideClick';
|
|
11
14
|
import { handleKeyDown } from '../../utils/handleKeyDown';
|
|
12
|
-
export const MINUTE_OPTIONS = [
|
|
13
|
-
export const HOUR_OPTIONS = [
|
|
15
|
+
export const MINUTE_OPTIONS = ['00', '05', '10', '15', '20', '25', '30', '35', '40', '45', '50', '55'];
|
|
16
|
+
export const HOUR_OPTIONS = ['01', '02', '03', '04', '05', '06', '07', '08', '09', '10', '11', '12'];
|
|
14
17
|
export const MERIDIEM_OPTIONS = ['AM', 'PM'];
|
|
15
18
|
/**
|
|
16
19
|
* An input field that allows a customer to manually type in a specific time or triggers a time picker combobox to
|
|
@@ -35,32 +38,76 @@ export function TimeInput({ value, 'aria-label': ariaLabel, disabled, id: idProp
|
|
|
35
38
|
useEffect(() => {
|
|
36
39
|
setInputValue(`${hours?.toString().padStart(2, '0')}:${minutes?.toString().padStart(2, '0')} ${meridiem || ''}`.trim());
|
|
37
40
|
if (hours !== undefined && minutes === undefined)
|
|
38
|
-
setMinutes(
|
|
41
|
+
setMinutes('00');
|
|
39
42
|
}, [hours, minutes, meridiem]);
|
|
40
|
-
const [open,
|
|
43
|
+
const [open, setOpenState] = useState(false);
|
|
41
44
|
const { floatingStyles, elements } = useFloating({
|
|
42
45
|
strategy: 'fixed',
|
|
43
46
|
refWidth: true,
|
|
44
47
|
offsetOptions: 4,
|
|
45
48
|
hide: !open,
|
|
46
49
|
});
|
|
47
|
-
|
|
50
|
+
const setOpen = useCallback((nextOpen) => {
|
|
51
|
+
setOpenState(nextOpen);
|
|
52
|
+
if (!elements.reference || !buttonRef.current)
|
|
53
|
+
return;
|
|
54
|
+
// Focus the button when closing the menu
|
|
55
|
+
if (!nextOpen && open)
|
|
56
|
+
buttonRef.current.focus();
|
|
57
|
+
// Focus the hours listbox when opening the menu
|
|
58
|
+
if (nextOpen && !open)
|
|
59
|
+
elements.reference.querySelector('[data-scroll-column="hours"]')?.focus();
|
|
60
|
+
}, [elements?.reference, open]);
|
|
61
|
+
useOutsideClick({ elements: [elements.floating], callback: () => setOpen(false), disabled: !open });
|
|
62
|
+
const { hourOptions, minuteOptions, meridiemOptions } = useMemo(() => ({
|
|
63
|
+
hourOptions: HOUR_OPTIONS.map((h) => ({
|
|
64
|
+
id: `${id}-hours-${h}`,
|
|
65
|
+
value: h,
|
|
66
|
+
label: h.toString().padStart(2, '0'),
|
|
67
|
+
})),
|
|
68
|
+
minuteOptions: MINUTE_OPTIONS.map((m) => ({
|
|
69
|
+
id: `${id}-minutes-${m}`,
|
|
70
|
+
value: m,
|
|
71
|
+
label: m.toString().padStart(2, '0'),
|
|
72
|
+
})),
|
|
73
|
+
meridiemOptions: MERIDIEM_OPTIONS.map((m) => ({
|
|
74
|
+
id: `${id}-meridiem-${m}`,
|
|
75
|
+
value: m,
|
|
76
|
+
label: m,
|
|
77
|
+
})),
|
|
78
|
+
}), [id]);
|
|
79
|
+
const listBoxRefs = useRef(null);
|
|
80
|
+
const buttonRef = useRef(null);
|
|
81
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { "aria-describedby": ariaErrorMessage || ariaDescribedBy || undefined, "data-aria-label": ariaLabel || undefined, "data-bspk": "time-input", "data-disabled": disabled || undefined, "data-invalid": invalid || undefined, "data-name": name || undefined, "data-open": open || undefined, "data-readonly": readOnly || undefined, "data-size": size || undefined, "data-value": inputValue || undefined, id: id, onClickCapture: () => {
|
|
48
82
|
elements.reference?.querySelector('[tabIndex]')?.focus();
|
|
49
|
-
},
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
83
|
+
}, onKeyDownCapture: handleKeyDown({ Escape: () => setOpen(false) }), ref: (node) => {
|
|
84
|
+
elements.setReference(node);
|
|
85
|
+
}, role: "group", children: [_jsx(TimeInputSegment, { disabled: disabled, name: `${name}-hours`, onChange: (next) => setHours(next || undefined), readOnly: readOnly, type: "hours", value: hours }), _jsx("span", { "aria-hidden": "true", children: ":" }), _jsx(TimeInputSegment, { disabled: disabled, name: `${name}-minutes`, onChange: (next) => setMinutes(next || undefined), readOnly: readOnly, type: "minutes", value: minutes }), _jsx(TimeInputSegment, { disabled: disabled, name: `${name}-meridiem`, onChange: (next) => setMeridiem(next || 'AM'), readOnly: readOnly, type: "meridiem", value: meridiem }), _jsx(Button, { icon: _jsx(SvgSchedule, {}), iconOnly: true, innerRef: (node) => {
|
|
86
|
+
buttonRef.current = node;
|
|
87
|
+
}, label: `${open ? 'Close' : 'Open'} Time Picker`, onClick: () => setOpen(!open), variant: "tertiary" })] }), !!open && (_jsx(Portal, { children: _jsx(Menu, { innerRef: (node) => {
|
|
88
|
+
if (!node)
|
|
89
|
+
return;
|
|
90
|
+
elements.setFloating(node);
|
|
91
|
+
}, label: "Select time", owner: "time-input", style: floatingStyles, children: _jsx(FocusTrap, { focusTrapOptions: {
|
|
92
|
+
fallbackFocus: () => listBoxRefs.current.hours,
|
|
93
|
+
clickOutsideDeactivates: true,
|
|
94
|
+
}, children: _jsxs("div", { "data-scroll-values": true, ref: (node) => {
|
|
95
|
+
listBoxRefs.current = {
|
|
96
|
+
hours: node?.querySelector('[data-scroll-column="hours"]'),
|
|
97
|
+
minutes: node?.querySelector('[data-scroll-column="minutes"]'),
|
|
98
|
+
meridiem: node?.querySelector('[data-scroll-column="meridiem"]'),
|
|
99
|
+
};
|
|
100
|
+
listBoxRefs.current.hours?.focus();
|
|
101
|
+
}, children: [_jsx(TimeInputListbox, { onSelect: (next) => {
|
|
102
|
+
setHours(next);
|
|
103
|
+
setTimeout(() => listBoxRefs.current?.minutes?.focus(), 10);
|
|
104
|
+
}, options: hourOptions, selectedValue: hours, type: "hours" }), _jsx(TimeInputListbox, { onSelect: (next) => {
|
|
105
|
+
setMinutes(next);
|
|
106
|
+
setTimeout(() => listBoxRefs.current?.meridiem?.focus(), 10);
|
|
107
|
+
}, options: minuteOptions, selectedValue: minutes, type: "minutes" }), _jsx(TimeInputListbox, { onSelect: (next) => {
|
|
108
|
+
setMeridiem(next);
|
|
109
|
+
setOpen(false);
|
|
110
|
+
setTimeout(() => buttonRef.current?.focus(), 10);
|
|
111
|
+
}, options: meridiemOptions, selectedValue: meridiem, type: "meridiem" })] }) }) }) }))] }));
|
|
65
112
|
}
|
|
66
113
|
//# sourceMappingURL=TimeInput.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TimeInput.js","sourceRoot":"","sources":["../../../src/components/TimeInput/TimeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,
|
|
1
|
+
{"version":3,"file":"TimeInput.js","sourceRoot":"","sources":["../../../src/components/TimeInput/TimeInput.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAE7C,OAAO,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAEtD,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC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