@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
|
@@ -3,6 +3,49 @@ import { useState } from 'react';
|
|
|
3
3
|
import { FileUploadItem } from './FileUploadItem';
|
|
4
4
|
import { useTimeout } from '../../hooks/useTimeout';
|
|
5
5
|
import { randomNumber } from '../../utils/random';
|
|
6
|
+
export const presets = [
|
|
7
|
+
{
|
|
8
|
+
label: 'long file name',
|
|
9
|
+
propState: {
|
|
10
|
+
fileName: 'I-think-this-is-a-long-file-name.txt',
|
|
11
|
+
status: 'uploading',
|
|
12
|
+
cancelButtonLabel: 'Close',
|
|
13
|
+
fileSize: 10,
|
|
14
|
+
id: '10',
|
|
15
|
+
},
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
label: 'state: uploading',
|
|
19
|
+
propState: {
|
|
20
|
+
fileName: 'basic-file.png',
|
|
21
|
+
status: 'uploading',
|
|
22
|
+
fileSize: 1.2,
|
|
23
|
+
cancelButtonLabel: 'Cancel',
|
|
24
|
+
id: '1.2',
|
|
25
|
+
},
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
label: 'state: success',
|
|
29
|
+
propState: {
|
|
30
|
+
fileName: 'success-story.pdf',
|
|
31
|
+
status: 'complete',
|
|
32
|
+
cancelButtonLabel: 'Bye',
|
|
33
|
+
fileSize: 42,
|
|
34
|
+
id: '42',
|
|
35
|
+
},
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
label: 'state: failed',
|
|
39
|
+
propState: {
|
|
40
|
+
fileName: 'file-name.txt',
|
|
41
|
+
status: 'error',
|
|
42
|
+
errorMessage: 'File too large. Please upload a smaller file.',
|
|
43
|
+
cancelButtonLabel: 'Escape',
|
|
44
|
+
fileSize: 10000000,
|
|
45
|
+
id: '10000000',
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
];
|
|
6
49
|
export const FileUploadItemExample = ({ action }) => ({
|
|
7
50
|
render: ({ props, preset }) => {
|
|
8
51
|
let progress = props.progress;
|
|
@@ -10,45 +53,7 @@ export const FileUploadItemExample = ({ action }) => ({
|
|
|
10
53
|
progress = 100;
|
|
11
54
|
return (_jsx(FileUploadItemExampleRender, { ...props, onCancel: () => action('Cancel action clicked!'), progress: progress }, preset?.label));
|
|
12
55
|
},
|
|
13
|
-
presets
|
|
14
|
-
{
|
|
15
|
-
label: 'long file name',
|
|
16
|
-
propState: {
|
|
17
|
-
fileName: 'I-think-this-is-a-long-file-name.txt',
|
|
18
|
-
status: 'uploading',
|
|
19
|
-
cancelButtonLabel: 'Close',
|
|
20
|
-
fileSize: 10,
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
label: 'state: uploading',
|
|
25
|
-
propState: {
|
|
26
|
-
fileName: 'basic-file.png',
|
|
27
|
-
status: 'uploading',
|
|
28
|
-
fileSize: 1.2,
|
|
29
|
-
cancelButtonLabel: 'Cancel',
|
|
30
|
-
},
|
|
31
|
-
},
|
|
32
|
-
{
|
|
33
|
-
label: 'state: success',
|
|
34
|
-
propState: {
|
|
35
|
-
fileName: 'success-story.pdf',
|
|
36
|
-
status: 'complete',
|
|
37
|
-
cancelButtonLabel: 'Bye',
|
|
38
|
-
fileSize: 42,
|
|
39
|
-
},
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
label: 'state: failed',
|
|
43
|
-
propState: {
|
|
44
|
-
fileName: 'file-name.txt',
|
|
45
|
-
status: 'error',
|
|
46
|
-
errorMessage: 'File too large. Please upload a smaller file.',
|
|
47
|
-
cancelButtonLabel: 'Escape',
|
|
48
|
-
fileSize: 10000000,
|
|
49
|
-
},
|
|
50
|
-
},
|
|
51
|
-
],
|
|
56
|
+
presets,
|
|
52
57
|
variants: false,
|
|
53
58
|
});
|
|
54
59
|
function FileUploadItemExampleRender({ progress, ...props }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileUploadItemExample.js","sourceRoot":"","sources":["../../../src/components/FileUploadItem/FileUploadItemExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"FileUploadItemExample.js","sourceRoot":"","sources":["../../../src/components/FileUploadItem/FileUploadItemExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAE9C,MAAM,CAAC,MAAM,OAAO,GAAkC;IAClD;QACI,KAAK,EAAE,gBAAgB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,sCAAsC;YAChD,MAAM,EAAE,WAA+B;YACvC,iBAAiB,EAAE,OAAO;YAC1B,QAAQ,EAAE,EAAE;YACZ,EAAE,EAAE,IAAI;SACX;KACJ;IACD;QACI,KAAK,EAAE,kBAAkB;QACzB,SAAS,EAAE;YACP,QAAQ,EAAE,gBAAgB;YAC1B,MAAM,EAAE,WAA+B;YACvC,QAAQ,EAAE,GAAG;YACb,iBAAiB,EAAE,QAAQ;YAC3B,EAAE,EAAE,KAAK;SACZ;KACJ;IACD;QACI,KAAK,EAAE,gBAAgB;QACvB,SAAS,EAAE;YACP,QAAQ,EAAE,mBAAmB;YAC7B,MAAM,EAAE,UAA8B;Y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AAE,GAAG,CAAC,CAAC,CAAC;QAC/E,cAAc,CAAC,IAAI,CAAC,CAAC;QACrB,IAAI,IAAI,GAAG,GAAG;YAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,IAAI,CAAC,EAAE,IAAI,CAAC,CAAC;IAC5D,CAAC,CAAC;IAEF,IAAI,KAAK,CAAC,MAAM,KAAK,WAAW;QAAE,OAAO,CAAC,GAAG,CAAC,cAAc,CAAC,WAAW,CAAC,EAAE,IAAI,CAAC,CAAC;IAEjF,OAAO,KAAC,cAAc,OAAK,KAAK,EAAE,QAAQ,EAAE,WAAW,GAAI,CAAC;AAChE,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { CommonProps, ElementProps, FormFieldControlProps } from '-/types/common';
|
|
2
1
|
import './form-field.scss';
|
|
2
|
+
import { CommonProps, ElementProps, FormFieldControlProps } from '-/types/common';
|
|
3
3
|
export type FormFieldWrapProps<T extends Record<string, unknown>> = Omit<FormFieldProps, keyof T | 'children'> & Omit<T, 'aria-describedby' | 'aria-errormessage'>;
|
|
4
4
|
export type FormFieldProps = CommonProps<'invalid' | 'required'> & {
|
|
5
5
|
/** The error message to display when the field is invalid. */
|
|
@@ -13,7 +13,7 @@ export type FormFieldProps = CommonProps<'invalid' | 'required'> & {
|
|
|
13
13
|
/** The id of the control. */
|
|
14
14
|
controlId: string;
|
|
15
15
|
/**
|
|
16
|
-
* The children of the form field. This should be a control such as TextInput, Select,
|
|
16
|
+
* The children of the form field. This should be a control such as TextInput, Select, DateInput, or TimeInput.
|
|
17
17
|
*
|
|
18
18
|
* @type (childProps: FormFieldControlProps) => JSX.Element
|
|
19
19
|
* @required
|
|
@@ -27,7 +27,7 @@ export type FormFieldProps = CommonProps<'invalid' | 'required'> & {
|
|
|
27
27
|
/**
|
|
28
28
|
* Wrapper component for form controls.
|
|
29
29
|
*
|
|
30
|
-
* Children
|
|
30
|
+
* Children should be one of the following: TextInput, Select, DateInput or TimeInput.
|
|
31
31
|
*
|
|
32
32
|
* @example
|
|
33
33
|
* import { TextInput } from '@bspk/ui/TextInput';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './form-field.css.js';
|
|
2
3
|
import { InlineAlert } from '../InlineAlert';
|
|
3
4
|
import { Txt } from '../Txt';
|
|
4
|
-
import './form-field.css.js';
|
|
5
5
|
/**
|
|
6
6
|
* Wrapper component for form controls.
|
|
7
7
|
*
|
|
8
|
-
* Children
|
|
8
|
+
* Children should be one of the following: TextInput, Select, DateInput or TimeInput.
|
|
9
9
|
*
|
|
10
10
|
* @example
|
|
11
11
|
* import { TextInput } from '@bspk/ui/TextInput';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"FormField.js","sourceRoot":"","sources":["../../../src/components/FormField/FormField.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AACvD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AA+BvC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,MAAM,UAAU,SAAS,CAAC,EACtB,KAAK,EACL,OAAO,EACP,YAAY,EAAE,gBAAgB,EAC9B,UAAU,EAAE,cAAc,EAC1B,QAAQ,EACR,aAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EAC0B;IAClC,MAAM,YAAY,GAAG,OAAO,IAAI,gBAAgB,CAAC,CAAC,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,MAAM,cAAc,GAAG,YAAY,CAAC,CAAC,CAAC,GAAG,SAAS,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC;IAC/E,MAAM,UAAU,GAAG,CAAC,YAAY,IAAI,cAAc,CAAC,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;IAChF,MAAM,YAAY,GAAG,CAAC,YAAY,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,SAAS,cAAc,CAAC,CAAC,CAAC,SAAS,CAAC;IAE1F,IAAI,OAAO,QAAQ,KAAK,UAAU;QAAE,OAAO,IAAI,CAAC;IAEhD,OAAO,CACH,kBAAS,KAAK,uBAAoB,YAAY,kBAAe,OAAO,IAAI,SAAS,aAC7E,6BACI,iBAAO,OAAO,EAAE,SAAS,aACrB,KAAC,GAAG,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,cAAc,YAChC,KAAK,GACJ,EACL,QAAQ,IAAI,CACT,KAAC,GAAG,IAAC,EAAE,EAAC,MAAM,EAAC,OAAO,EAAC,YAAY,YAC9B,aAAa,GACZ,CACT,IACG,EACP,aAAa,IACT,EACR,QAAQ,CAAC;gBACN,kBAAkB,EAAE,YAAY;gBAChC,mBAAmB,EAAE,cAAc;aACtC,CAAC,EACD,YAAY,IAAI,CACb,KAAC,WAAW,IAAC,EAAE,EAAE,cAAc,EAAE,OAAO,EAAC,OAAO,YAC3C,YAAY,GACH,CACjB,EACA,UAAU,IAAI,CACX,KAAC,GAAG,IAAC,EAAE,EAAE,YAAY,EAAE,OAAO,EAAC,YAAY,YACtC,UAAU,GACT,CACT,IACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
[data-bspk=form-field] {
|
|
1
|
+
[data-bspk-utility=form-field] {
|
|
2
2
|
width: 100%;
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-direction: column;
|
|
5
5
|
gap: var(--spacing-sizing-01);
|
|
6
6
|
}
|
|
7
|
-
[data-bspk=form-field] header {
|
|
7
|
+
[data-bspk-utility=form-field] header {
|
|
8
8
|
flex-grow: 1;
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: row;
|
|
11
11
|
justify-content: space-between;
|
|
12
12
|
}
|
|
13
|
-
[data-bspk=form-field] header label {
|
|
13
|
+
[data-bspk-utility=form-field] header label {
|
|
14
14
|
flex-grow: 1;
|
|
15
15
|
}
|
|
16
16
|
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
/** * This file is generated by the build script.
|
|
2
2
|
* Do not edit this file directly. */
|
|
3
3
|
const style = document.createElement('style');
|
|
4
|
-
style.appendChild(document.createTextNode(`[data-bspk=form-field] {
|
|
4
|
+
style.appendChild(document.createTextNode(`[data-bspk-utility=form-field] {
|
|
5
5
|
width: 100%;
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
gap: var(--spacing-sizing-01);
|
|
9
9
|
}
|
|
10
|
-
[data-bspk=form-field] header {
|
|
10
|
+
[data-bspk-utility=form-field] header {
|
|
11
11
|
flex-grow: 1;
|
|
12
12
|
display: flex;
|
|
13
13
|
flex-direction: row;
|
|
14
14
|
justify-content: space-between;
|
|
15
15
|
}
|
|
16
|
-
[data-bspk=form-field] header label {
|
|
16
|
+
[data-bspk-utility=form-field] header label {
|
|
17
17
|
flex-grow: 1;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './inline-alert.css.js';
|
|
2
3
|
import { SvgCheckCircleFill } from '@bspk/icons/CheckCircleFill';
|
|
3
4
|
import { SvgErrorFill } from '@bspk/icons/ErrorFill';
|
|
4
5
|
import { SvgInfoFill } from '@bspk/icons/InfoFill';
|
|
5
6
|
import { SvgWarningTwoTone } from './SvgWarningTwoTone';
|
|
6
7
|
import { Txt } from '../Txt';
|
|
7
|
-
import './inline-alert.css.js';
|
|
8
8
|
/**
|
|
9
9
|
* Inline alerts provide contextual feedback messages for typical user actions with a handful of available and flexible
|
|
10
10
|
* alert messages.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InlineAlert.js","sourceRoot":"","sources":["../../../src/components/InlineAlert/InlineAlert.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"InlineAlert.js","sourceRoot":"","sources":["../../../src/components/InlineAlert/InlineAlert.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAEnD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAqBvC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,WAAW,CAAC,EAAE,QAAQ,EAAE,OAAO,GAAG,eAAe,EAAE,EAAE,EAAoB;IACrF,OAAO,CACH,4BAAe,cAAc,kBAAe,OAAO,EAAE,EAAE,EAAE,EAAE,EAAE,IAAI,EAAC,OAAO,aACpE,YAAY,CAAC,OAAO,CAAC,EACtB,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,YAAE,QAAQ,GAAO,IACxC,CACT,CAAC;AACN,CAAC;AAED,MAAM,YAAY,GAAoC;IAClD,KAAK,EAAE,KAAC,YAAY,KAAG;IACvB,aAAa,EAAE,KAAC,WAAW,KAAG;IAC9B,OAAO,EAAE,KAAC,kBAAkB,KAAG;IAC/B,OAAO,EAAE,KAAC,iBAAiB,KAAG;CACjC,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { LayoutProps } from './Layout';
|
|
2
|
-
import { ComponentExample } from '-/utils/demo';
|
|
2
|
+
import { ComponentExample, Preset } from '-/utils/demo';
|
|
3
|
+
export declare const presets: Preset<LayoutProps>[];
|
|
3
4
|
export declare const LayoutExample: ComponentExample<LayoutProps>;
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
export const presets = [];
|
|
2
3
|
export const LayoutExample = {
|
|
3
4
|
render: ({ props, Component }) => {
|
|
4
5
|
return (_jsxs(Component, { ...props, children: [_jsx("div", { children: "Alpha" }), _jsx("div", { children: "Beta" }), _jsx("div", { children: "Gamma" })] }));
|
|
5
6
|
},
|
|
7
|
+
presets,
|
|
6
8
|
};
|
|
7
9
|
//# sourceMappingURL=LayoutExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutExample.js","sourceRoot":"","sources":["../../../src/components/Layout/LayoutExample.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,aAAa,GAAkC;IACxD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,OAAO,CACH,MAAC,SAAS,OAAK,KAAK,aAChB,kCAAgB,EAChB,iCAAe,EACf,kCAAgB,IACR,CACf,CAAC;IACN,CAAC;
|
|
1
|
+
{"version":3,"file":"LayoutExample.js","sourceRoot":"","sources":["../../../src/components/Layout/LayoutExample.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,OAAO,GAA0B,EAAE,CAAC;AAEjD,MAAM,CAAC,MAAM,aAAa,GAAkC;IACxD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,OAAO,CACH,MAAC,SAAS,OAAK,KAAK,aAChB,kCAAgB,EAChB,iCAAe,EACf,kCAAgB,IACR,CACf,CAAC;IACN,CAAC;IACD,OAAO;CACV,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { lazy, Suspense } from 'react';
|
|
3
2
|
import './link.css.js';
|
|
3
|
+
import { lazy, Suspense } from 'react';
|
|
4
4
|
/**
|
|
5
5
|
* This is the standalone link component. Inline links can use the native `a` element.
|
|
6
6
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAuC,IAAI,EAAuB,QAAQ,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Link.js","sourceRoot":"","sources":["../../../src/components/Link/Link.tsx"],"names":[],"mappings":";AAAA,OAAO,aAAa,CAAC;AACrB,OAAO,EAAuC,IAAI,EAAuB,QAAQ,EAAE,MAAM,OAAO,CAAC;AAyCjG;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,IAAI,CAAC,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,EAAE,GAAG,KAAK,EAAgC;IACjH,IAAI,QAAQ,GAA4D,SAAS,CAAC;IAElF,IAAI,YAAY,KAAK,UAAU;QAC3B,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,uBAAuB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;IAEhH,IAAI,YAAY,KAAK,SAAS;QAC1B,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CACjB,MAAM,CAAC,0BAA0B,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,eAAe,EAAE,CAAC,CAAC,CAC7F,CAAC;IAEN,IAAI,YAAY,KAAK,MAAM;QACvB,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,kBAAkB,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC;IAEtG,OAAO,CACH,gBACQ,KAAK,eACC,MAAM,eACL,IAAI,iBACF,OAAO,KAAK,QAAQ,IAAI,SAAS,yBACzB,OAAO,KAAK,gBAAgB,IAAI,SAAS,wBAC1C,YAAY,IAAI,SAAS,EAC7C,MAAM,EAAE,YAAY,KAAK,UAAU,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,MAAM,aAEvD,yBAAO,KAAK,GAAQ,EACnB,QAAQ,IAAI,CACT,KAAC,QAAQ,IAAC,QAAQ,EAAE,IAAI,YACpB,KAAC,QAAQ,KAAG,GACL,CACd,IACD,CACP,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { LinkProps } from '.';
|
|
2
|
-
import { ComponentExample } from '-/utils/demo';
|
|
2
|
+
import { ComponentExample, Preset } from '-/utils/demo';
|
|
3
|
+
export declare const presets: Preset<LinkProps>[];
|
|
3
4
|
export declare const LinkExample: ComponentExample<LinkProps>;
|
|
4
5
|
/**
|
|
5
6
|
* This component demonstrates the different pseudo states of the Link component.
|
|
@@ -3,6 +3,7 @@ import { Fragment } from 'react';
|
|
|
3
3
|
import { Link } from '.';
|
|
4
4
|
import { Txt } from '../Txt';
|
|
5
5
|
import { useId } from '../../hooks/useId';
|
|
6
|
+
export const presets = [];
|
|
6
7
|
export const LinkExample = {
|
|
7
8
|
containerStyle: {
|
|
8
9
|
width: '100%',
|
|
@@ -22,6 +23,7 @@ export const LinkExample = {
|
|
|
22
23
|
content: ({ props }) => _jsx(LinkDemo, { props: props }),
|
|
23
24
|
},
|
|
24
25
|
],
|
|
26
|
+
presets,
|
|
25
27
|
};
|
|
26
28
|
/**
|
|
27
29
|
* This component demonstrates the different pseudo states of the Link component.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LinkExample.js","sourceRoot":"","sources":["../../../src/components/Link/LinkExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEjC,OAAO,EAAa,IAAI,EAAE,MAAM,GAAG,CAAC;AACpC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAGtC,MAAM,CAAC,MAAM,WAAW,GAAgC;IACpD,cAAc,EAAE;QACZ,KAAK,EAAE,MAAM;KAChB;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,OAAO,CACH,cACI,KAAK,EAAE;gBACH,OAAO,EAAE,MAAM;gBACf,KAAK,EAAE,MAAM;gBACb,cAAc,EAAE,QAAQ;gBACxB,UAAU,EAAE,KAAK,CAAC,OAAO,KAAK,gBAAgB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE;gBAC7D,SAAS,EAAE,0BAA0B;aACxC,YAED,KAAC,SAAS,OAAK,KAAK,GAAI,GACtB,CACT,CAAC;IACN,CAAC;IACD,QAAQ,EAAE;QACN;YACI,KAAK,EAAE,6BAA6B;YACpC,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,CAAC,KAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,GAAI;SACrD;KACJ;
|
|
1
|
+
{"version":3,"file":"LinkExample.js","sourceRoot":"","sources":["../../../src/components/Link/LinkExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE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"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import
|
|
1
|
+
import './list-item.scss';
|
|
2
|
+
import { AnchorHTMLAttributes, ElementType, ReactNode, MouseEvent, AriaAttributes, AriaRole } from 'react';
|
|
2
3
|
import { ListItemButton } from './ListItemButton';
|
|
3
4
|
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
4
|
-
|
|
5
|
-
export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = CommonProps<'active' | 'disabled' | 'owner' | 'readOnly'> & {
|
|
5
|
+
export type ListItemProps<As extends ElementType = ElementType> = CommonProps<'active' | 'disabled' | 'owner' | 'readOnly'> & Pick<AriaAttributes, 'aria-label'> & {
|
|
6
6
|
/**
|
|
7
7
|
* The element type to render as.
|
|
8
8
|
*
|
|
@@ -13,7 +13,7 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
13
13
|
/**
|
|
14
14
|
* The leading element to display in the ListItem.
|
|
15
15
|
*
|
|
16
|
-
* Leading elements
|
|
16
|
+
* Leading elements should only be one of the following [Icon](/icons), Img, Avatar.
|
|
17
17
|
*
|
|
18
18
|
* @exampleType select
|
|
19
19
|
* @options Icon, Img, Avatar
|
|
@@ -30,8 +30,8 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
30
30
|
/**
|
|
31
31
|
* The trailing element to display in the ListItem.
|
|
32
32
|
*
|
|
33
|
-
* Trailing elements
|
|
34
|
-
* Txt.
|
|
33
|
+
* Trailing elements should only be one of the following [Icon](/icons), Checkbox, ListItemButton, Radio,
|
|
34
|
+
* Switch, Tag, Txt.
|
|
35
35
|
*
|
|
36
36
|
* @exampleType select
|
|
37
37
|
* @options Checkbox, Icon, ListItemButton, Radio, Switch, Tag, Txt
|
|
@@ -44,11 +44,37 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
44
44
|
*/
|
|
45
45
|
href?: AnchorHTMLAttributes<unknown>['href'];
|
|
46
46
|
/** A ref to the list item div element. */
|
|
47
|
-
innerRef?: SetRef<
|
|
48
|
-
/**
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
47
|
+
innerRef?: SetRef<HTMLElement>;
|
|
48
|
+
/**
|
|
49
|
+
* The ARIA role of the list item.
|
|
50
|
+
*
|
|
51
|
+
* The role will be set to 'button' automatically if the ListItem has an onClick prop and is not a button,
|
|
52
|
+
* label, or anchor element.
|
|
53
|
+
*
|
|
54
|
+
* If including other focusable elements (e.g. buttons, links) in the leading or trailing slots, the role should
|
|
55
|
+
* be set explicitly to something other than 'button'.
|
|
56
|
+
*/
|
|
57
|
+
role?: AriaRole;
|
|
58
|
+
/** Callback function that is called when the ListItem is clicked. */
|
|
59
|
+
onClick?: (event: MouseEvent<HTMLElement>) => void;
|
|
60
|
+
/**
|
|
61
|
+
* The unique ID of the list item.
|
|
62
|
+
*
|
|
63
|
+
* If not provided, a unique ID will be generated. This is useful for accessibility and testing purposes.
|
|
64
|
+
*/
|
|
65
|
+
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
|
+
/**
|
|
74
|
+
* Indicates the current "selected" state of the list item when used in a selectable context, such as within a
|
|
75
|
+
* ListItemMenu.
|
|
76
|
+
*/
|
|
77
|
+
'aria-selected'?: boolean;
|
|
52
78
|
};
|
|
53
79
|
/**
|
|
54
80
|
* A hybrid interactive component that is used frequently to organize content and offers a wide range of control and
|
|
@@ -58,9 +84,9 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
58
84
|
*
|
|
59
85
|
* The ListItem has three main elements: leading element, label, and trailing element.
|
|
60
86
|
*
|
|
61
|
-
* Leading elements
|
|
87
|
+
* Leading elements should be one of the following [Icon](/icons), Img, Avatar.
|
|
62
88
|
*
|
|
63
|
-
* Trailing elements
|
|
89
|
+
* Trailing elements should be one of the following [Icon](/icons), Checkbox, ListItemButton, Radio, Switch, Tag, Txt.
|
|
64
90
|
*
|
|
65
91
|
* The ListItemButton is a more limited Button with context specific options.
|
|
66
92
|
*
|
|
@@ -82,7 +108,7 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
82
108
|
* @name ListItem
|
|
83
109
|
* @phase UXReview
|
|
84
110
|
*/
|
|
85
|
-
declare function ListItem<As extends ElementType =
|
|
111
|
+
declare function ListItem<As extends ElementType = ElementType>({ active, as, disabled, innerRef, label, leading, readOnly, owner, role: roleProp, subText, trailing, id: idProp, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, hideAriaLabel, ...props }: ElementProps<ListItemProps<As>, As>): import("react/jsx-runtime").JSX.Element | null;
|
|
86
112
|
declare namespace ListItem {
|
|
87
113
|
var Button: typeof ListItemButton;
|
|
88
114
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import './list-item.css.js';
|
|
2
3
|
import { ListItemButton } from './ListItemButton';
|
|
3
4
|
import { Truncated } from '../Truncated';
|
|
4
|
-
import '
|
|
5
|
+
import { useId } from '../../hooks/useId';
|
|
5
6
|
/**
|
|
6
7
|
* A hybrid interactive component that is used frequently to organize content and offers a wide range of control and
|
|
7
8
|
* navigation in most experiences.
|
|
@@ -10,9 +11,9 @@ import './list-item.css.js';
|
|
|
10
11
|
*
|
|
11
12
|
* The ListItem has three main elements: leading element, label, and trailing element.
|
|
12
13
|
*
|
|
13
|
-
* Leading elements
|
|
14
|
+
* Leading elements should be one of the following [Icon](/icons), Img, Avatar.
|
|
14
15
|
*
|
|
15
|
-
* Trailing elements
|
|
16
|
+
* Trailing elements should be one of the following [Icon](/icons), Checkbox, ListItemButton, Radio, Switch, Tag, Txt.
|
|
16
17
|
*
|
|
17
18
|
* The ListItemButton is a more limited Button with context specific options.
|
|
18
19
|
*
|
|
@@ -34,19 +35,31 @@ import './list-item.css.js';
|
|
|
34
35
|
* @name ListItem
|
|
35
36
|
* @phase UXReview
|
|
36
37
|
*/
|
|
37
|
-
function ListItem({
|
|
38
|
+
function ListItem({ active, as, disabled, innerRef, label, leading, readOnly, owner, role: roleProp, subText, trailing, id: idProp, 'aria-label': ariaLabel, 'aria-selected': ariaSelected, hideAriaLabel, ...props }) {
|
|
39
|
+
const id = useId(idProp);
|
|
38
40
|
if (!label)
|
|
39
41
|
return null;
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
else if (props.onClick)
|
|
45
|
-
As = 'button';
|
|
46
|
-
}
|
|
47
|
-
const actionable = (As === 'a' || As === 'button') && !props.disabled && !props.readOnly;
|
|
48
|
-
return (_jsxs(As, { ...props, "aria-disabled": disabled || undefined, "aria-label": As === 'label' || As === 'span' || As === 'div' || includeAriaLabel === false ? undefined : label, as: As, "data-action": actionable || undefined, "data-active": active || undefined, "data-bspk": "list-item", "data-bspk-owner": owner || undefined, "data-readonly": readOnly || undefined, ref: innerRef, role: role || (As === 'button' ? 'option' : undefined), tabIndex: actionable ? 0 : undefined, children: [leading && (_jsx("span", { "aria-hidden": true, "data-leading": true, children: leading })), _jsxs("span", { "data-item-label": true, children: [_jsx(Truncated, { "data-text": true, children: label }), subText && _jsx("span", { "data-sub-text": true, children: subText })] }), trailing && _jsx("span", { "data-trailing": true, children: trailing })] }));
|
|
42
|
+
const As = asLogic(as, props);
|
|
43
|
+
const role = roleLogic(roleProp, { as: As, props });
|
|
44
|
+
const actionable = (props.href || props.onClick) && !props.disabled && !props.readOnly;
|
|
45
|
+
return (_jsxs(As, { ...props, "aria-disabled": disabled || undefined, "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-readonly": readOnly || undefined, id: id, ref: innerRef, role: role, tabIndex: props.tabIndex || (actionable ? 0 : undefined), children: [leading && (_jsx("span", { "aria-hidden": true, "data-leading": true, children: leading })), _jsxs("span", { "aria-hidden": hideAriaLabel ? true : undefined, "data-item-label": true, children: [_jsx(Truncated, { "data-text": true, children: label }), subText && _jsx("span", { "data-sub-text": true, children: subText })] }), trailing && _jsx("span", { "data-trailing": true, children: trailing })] }));
|
|
49
46
|
}
|
|
50
47
|
ListItem.Button = ListItemButton;
|
|
51
48
|
export { ListItem };
|
|
49
|
+
function asLogic(as, props) {
|
|
50
|
+
if (as)
|
|
51
|
+
return as;
|
|
52
|
+
if (props.href)
|
|
53
|
+
return 'a';
|
|
54
|
+
return 'div';
|
|
55
|
+
}
|
|
56
|
+
function roleLogic(existingRole, { as: As, props, }) {
|
|
57
|
+
if (existingRole)
|
|
58
|
+
return existingRole;
|
|
59
|
+
if (props.href)
|
|
60
|
+
return As !== 'a' ? 'link' : undefined;
|
|
61
|
+
if (props.onClick && As !== 'button' && As !== 'label')
|
|
62
|
+
return 'button';
|
|
63
|
+
return undefined;
|
|
64
|
+
}
|
|
52
65
|
//# sourceMappingURL=ListItem.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ListItem.js","sourceRoot":"","sources":["../../../src/components/ListItem/ListItem.tsx"],"names":[],"mappings":";AAAA,OAAO,kBAAkB,CAAC;AAU1B,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACnD,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAiFtC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,SAAS,QAAQ,CAAuC,EACpD,MAAM,EACN,EAAE,EACF,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,O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,GAAQ,IACjD,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,CACd,YAAkC,EAClC,EACI,EAAE,EAAE,EAAE,EACN,KAAK,GAIR;IAED,IAAI,YAAY;QAAE,OAAO,YAAY,CAAC;IAEtC,IAAI,KAAK,CAAC,IAAI;QAAE,OAAO,EAAE,KAAK,GAAG,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,CAAC;IAEvD,IAAI,KAAK,CAAC,OAAO,IAAI,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,OAAO;QAAE,OAAO,QAAQ,CAAC;IAExE,OAAO,SAAS,CAAC;AACrB,CAAC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
import { ListItemProps } from './ListItem';
|
|
2
|
-
import { ComponentExampleFn } from '-/utils/demo';
|
|
2
|
+
import { ComponentExampleFn, Preset } from '-/utils/demo';
|
|
3
|
+
export declare const presets: Preset<ListItemProps>[];
|
|
3
4
|
export declare const ListItemExample: ComponentExampleFn<ListItemProps>;
|
|
@@ -1,6 +1,17 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
2
|
import { ListItem } from './ListItem';
|
|
3
3
|
import { createExampleChildElement } from '../../utils/createExampleChildElement';
|
|
4
|
+
export const presets = [
|
|
5
|
+
{
|
|
6
|
+
label: 'Long Label',
|
|
7
|
+
propState: {
|
|
8
|
+
label: 'This is a really long label that should be truncated if it exceeds the width of the ListItem',
|
|
9
|
+
subText: 'See below for other leading and trailing examples',
|
|
10
|
+
trailing: 'Checkbox',
|
|
11
|
+
leading: 'Avatar',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
];
|
|
4
15
|
export const ListItemExample = ({ action, setState }) => ({
|
|
5
16
|
render: ({ props, id }) => {
|
|
6
17
|
const leading = createExampleChildElement({
|
|
@@ -22,17 +33,6 @@ export const ListItemExample = ({ action, setState }) => ({
|
|
|
22
33
|
as = 'label';
|
|
23
34
|
return _jsx(ListItem, { ...props, as: as, leading: leading.element, trailing: trailing.element });
|
|
24
35
|
},
|
|
25
|
-
presets
|
|
26
|
-
{
|
|
27
|
-
value: 'long-label',
|
|
28
|
-
label: 'Long Label',
|
|
29
|
-
propState: {
|
|
30
|
-
label: 'This is a really long label that should be truncated if it exceeds the width of the ListItem',
|
|
31
|
-
subText: 'See below for other leading and trailing examples',
|
|
32
|
-
trailing: 'Checkbox',
|
|
33
|
-
leading: 'Avatar',
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
],
|
|
36
|
+
presets,
|
|
37
37
|
});
|
|
38
38
|
//# sourceMappingURL=ListItemExample.js.map
|
|
@@ -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;AACrD,OAAO,EAAE,yBAAyB,EAAE,MAAM,mCAAmC,CAAC;AAG9E,MAAM,CAAC,MAAM,eAAe,GAAsC,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,CAAC;IACzF,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,EAAE;QACtB,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,E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AAY,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,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,OAAO;CACV,CAAC,CAAC"}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
width: 100%;
|
|
4
4
|
user-select: none;
|
|
5
5
|
color: var(--foreground-neutral-on-surface);
|
|
6
|
+
background-color: var(--surface-neutral-t1-base);
|
|
6
7
|
height: 100%;
|
|
7
8
|
overflow: hidden;
|
|
8
9
|
min-height: var(--list-item-height);
|
|
@@ -10,7 +11,6 @@
|
|
|
10
11
|
gap: var(--spacing-sizing-03);
|
|
11
12
|
padding: var(--spacing-sizing-02);
|
|
12
13
|
justify-items: stretch;
|
|
13
|
-
background: unset;
|
|
14
14
|
border: unset;
|
|
15
15
|
margin: unset;
|
|
16
16
|
text-decoration: unset;
|
|
@@ -21,16 +21,12 @@
|
|
|
21
21
|
[data-pseudo=focus] [data-bspk=list-item] [data-inner], [data-bspk=list-item]:focus-visible [data-inner], [data-bspk=list-item]:has(*:focus-visible) [data-inner] {
|
|
22
22
|
border-color: transparent;
|
|
23
23
|
}
|
|
24
|
-
[data-pseudo=hover] [data-bspk=list-item][data-action], [data-bspk=list-item][data-action]:hover {
|
|
24
|
+
[data-bspk=list-item][data-action][data-active], [data-pseudo=hover] [data-bspk=list-item][data-action], [data-bspk=list-item][data-action]:hover, [data-bspk=list-item]:is(label)[data-active], [data-pseudo=hover] [data-bspk=list-item]:is(label), [data-bspk=list-item]:is(label):hover {
|
|
25
25
|
background-color: var(--interactions-neutral-hover-opacity);
|
|
26
26
|
}
|
|
27
|
-
[data-pseudo=active] [data-bspk=list-item][data-action], [data-bspk=list-item][data-action][data-active]
|
|
27
|
+
[data-pseudo=active] [data-bspk=list-item][data-action], [data-bspk=list-item][data-action]:active, [data-pseudo=active] [data-bspk=list-item]:is(label), [data-bspk=list-item]:is(label):active {
|
|
28
28
|
background-color: var(--interactions-neutral-press-opacity);
|
|
29
29
|
}
|
|
30
|
-
[data-bspk=list-item][aria-disabled] [data-text],
|
|
31
|
-
[data-bspk=list-item][aria-disabled] [data-sub-text] {
|
|
32
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
33
|
-
}
|
|
34
30
|
[data-bspk=list-item] [data-leading],
|
|
35
31
|
[data-bspk=list-item] [data-item-label],
|
|
36
32
|
[data-bspk=list-item] [data-trailing] {
|
|
@@ -65,6 +61,10 @@
|
|
|
65
61
|
font: var(--body-small);
|
|
66
62
|
color: var(--foreground-neutral-on-surface-variant-01);
|
|
67
63
|
}
|
|
64
|
+
[data-bspk=list-item][aria-disabled] [data-text],
|
|
65
|
+
[data-bspk=list-item][aria-disabled] [data-sub-text] {
|
|
66
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
67
|
+
}
|
|
68
68
|
[data-bspk=list-item] [data-trailing]:has(input) {
|
|
69
69
|
pointer-events: none;
|
|
70
70
|
}
|
|
@@ -77,5 +77,8 @@
|
|
|
77
77
|
border-bottom: 0;
|
|
78
78
|
gap: var(--spacing-sizing-02);
|
|
79
79
|
}
|
|
80
|
+
[data-bspk=list-item][aria-selected=true] {
|
|
81
|
+
background-color: var(--surface-brand-primary-highlight);
|
|
82
|
+
}
|
|
80
83
|
|
|
81
84
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|