@bspk/ui 1.3.8 → 1.3.9
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/dist/components/Accordion/Accordion.d.ts +19 -3
- package/dist/components/Accordion/Accordion.js +20 -3
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +13 -14
- package/dist/components/Avatar/Avatar.js +13 -14
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +29 -12
- package/dist/components/AvatarGroup/AvatarGroup.js +29 -12
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -3
- package/dist/components/Badge/Badge.js +1 -3
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDot.d.ts +4 -4
- package/dist/components/BadgeDot/BadgeDot.js +5 -4
- package/dist/components/BadgeDot/BadgeDot.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.ts +11 -12
- package/dist/components/BannerAlert/BannerAlert.js +11 -12
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigation.d.ts +6 -3
- package/dist/components/BottomNavigation/BottomNavigation.js +6 -3
- package/dist/components/BottomNavigation/BottomNavigation.js.map +1 -1
- package/dist/components/BottomNavigation/BottomNavigationExample.js +31 -36
- package/dist/components/BottomNavigation/BottomNavigationExample.js.map +1 -1
- package/dist/components/BottomNavigation/bottom-navigation.css +8 -1
- package/dist/components/BottomNavigation/bottom-navigation.css.js +8 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +17 -18
- package/dist/components/Breadcrumb/Breadcrumb.js +17 -18
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +1 -11
- package/dist/components/Button/Button.js +1 -11
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/ButtonExample.js +1 -3
- package/dist/components/Button/ButtonExample.js.map +1 -1
- package/dist/components/ButtonDock/ButtonDock.d.ts +10 -14
- package/dist/components/ButtonDock/ButtonDock.js +10 -14
- package/dist/components/ButtonDock/ButtonDock.js.map +1 -1
- package/dist/components/Card/Card.d.ts +8 -10
- package/dist/components/Card/Card.js +6 -10
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Carousel/Carousel.d.ts +9 -13
- package/dist/components/Carousel/Carousel.js +9 -13
- package/dist/components/Carousel/Carousel.js.map +1 -1
- package/dist/components/Carousel/CarouselExample.js +14 -14
- package/dist/components/Carousel/CarouselExample.js.map +1 -1
- package/dist/components/Checkbox/Checkbox.d.ts +7 -4
- package/dist/components/Checkbox/Checkbox.js +7 -4
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +3 -3
- package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -3
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +4 -4
- package/dist/components/CheckboxOption/CheckboxOption.js +4 -4
- package/dist/components/Chip/Chip.d.ts +3 -7
- package/dist/components/Chip/Chip.js +3 -7
- package/dist/components/Chip/Chip.js.map +1 -1
- package/dist/components/Chip/ChipExample.js +50 -3
- package/dist/components/Chip/ChipExample.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +21 -10
- package/dist/components/ChipGroup/ChipGroup.js +21 -10
- package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.js +1 -0
- package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +13 -12
- package/dist/components/DatePicker/DatePicker.js +13 -12
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/Dialog/Dialog.d.ts +11 -6
- package/dist/components/Dialog/Dialog.js +11 -6
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Divider/Divider.d.ts +5 -9
- package/dist/components/Divider/Divider.js +5 -9
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Divider/DividerExample.js +16 -1
- package/dist/components/Divider/DividerExample.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +3 -3
- package/dist/components/Drawer/Drawer.js +3 -3
- package/dist/components/EmptyState/EmptyState.d.ts +3 -7
- package/dist/components/EmptyState/EmptyState.js +3 -7
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +4 -5
- package/dist/components/Fab/Fab.js +4 -6
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/FabExample.d.ts +2 -1
- package/dist/components/Fab/FabExample.js +20 -2
- package/dist/components/Fab/FabExample.js.map +1 -1
- package/dist/components/Field/Field.d.ts +4 -5
- package/dist/components/Field/Field.js +4 -5
- package/dist/components/Field/Field.js.map +1 -1
- package/dist/components/FileUpload/FileUpload.d.ts +3 -3
- package/dist/components/FileUpload/FileUpload.js +3 -3
- package/dist/components/FileUploadItem/FileUploadItem.d.ts +6 -10
- package/dist/components/FileUploadItem/FileUploadItem.js +6 -10
- package/dist/components/FileUploadItem/FileUploadItem.js.map +1 -1
- package/dist/components/FormField/FormField.d.ts +5 -16
- package/dist/components/FormField/FormField.js +5 -16
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/Img/Img.d.ts +1 -3
- package/dist/components/Img/Img.js +1 -3
- package/dist/components/Img/Img.js.map +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +1 -3
- package/dist/components/InlineAlert/InlineAlert.js +1 -3
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
- package/dist/components/Input/Input.d.ts +13 -13
- package/dist/components/Input/Input.js +13 -13
- package/dist/components/Input/InputElement.d.ts +11 -5
- package/dist/components/Input/InputElement.js +11 -5
- package/dist/components/Input/InputElement.js.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +20 -20
- package/dist/components/InputNumber/InputNumber.js +20 -20
- package/dist/components/InputPhone/InputPhone.d.ts +21 -16
- package/dist/components/InputPhone/InputPhone.js +21 -16
- package/dist/components/InputPhone/InputPhone.js.map +1 -1
- package/dist/components/Layout/Layout.d.ts +1 -3
- package/dist/components/Layout/Layout.js +1 -3
- package/dist/components/Layout/Layout.js.map +1 -1
- package/dist/components/Link/Link.d.ts +1 -3
- package/dist/components/Link/Link.js +1 -3
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/ListItem/ListItem.d.ts +22 -21
- package/dist/components/ListItem/ListItem.js +19 -16
- package/dist/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +5 -9
- package/dist/components/Menu/Menu.js +5 -9
- package/dist/components/Menu/Menu.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/Modal/modal.css +12 -1
- package/dist/components/Modal/modal.css.js +12 -1
- package/dist/components/OTPInput/OTPInput.d.ts +1 -3
- package/dist/components/OTPInput/OTPInput.js +1 -3
- package/dist/components/OTPInput/OTPInput.js.map +1 -1
- package/dist/components/PageControl/PageControl.d.ts +1 -3
- package/dist/components/PageControl/PageControl.js +1 -3
- package/dist/components/PageControl/PageControl.js.map +1 -1
- package/dist/components/Pagination/Pagination.d.ts +6 -7
- package/dist/components/Pagination/Pagination.js +28 -15
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/pagination.css +5 -14
- package/dist/components/Pagination/pagination.css.js +5 -14
- package/dist/components/Password/Password.d.ts +19 -20
- package/dist/components/Password/Password.js +19 -20
- package/dist/components/Password/Password.js.map +1 -1
- package/dist/components/Popover/Popover.d.ts +11 -20
- package/dist/components/Popover/Popover.js +11 -20
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/PopoverExample.js +1 -1
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -3
- package/dist/components/ProgressBar/ProgressBar.js +1 -3
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -3
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -3
- package/dist/components/ProgressCircle/ProgressCircle.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -3
- package/dist/components/ProgressionStepper/ProgressionStepper.js +1 -3
- package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroup.d.ts +2 -2
- package/dist/components/RadioGroup/RadioGroup.js +2 -2
- package/dist/components/Rating/Rating.d.ts +2 -4
- package/dist/components/Rating/Rating.js +8 -6
- package/dist/components/Rating/Rating.js.map +1 -1
- package/dist/components/Rating/RatingExample.js +17 -1
- package/dist/components/Rating/RatingExample.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +2 -2
- package/dist/components/SearchBar/SearchBar.js +2 -2
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +3 -3
- package/dist/components/SegmentedControl/SegmentedControl.js +3 -3
- package/dist/components/SegmentedControl/SegmentedControlExample.js +10 -12
- package/dist/components/SegmentedControl/SegmentedControlExample.js.map +1 -1
- package/dist/components/Select/Select.d.ts +24 -25
- package/dist/components/Select/Select.js +24 -25
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +10 -14
- package/dist/components/Skeleton/Skeleton.js +10 -14
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/SkeletonExample.js +4 -3
- package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
- package/dist/components/SkeletonText/SkeletonText.d.ts +5 -9
- package/dist/components/SkeletonText/SkeletonText.js +5 -9
- package/dist/components/SkeletonText/SkeletonText.js.map +1 -1
- package/dist/components/Slider/Slider.d.ts +2 -2
- package/dist/components/Slider/Slider.js +2 -2
- package/dist/components/Slider/SliderExample.js +40 -18
- package/dist/components/Slider/SliderExample.js.map +1 -1
- package/dist/components/Snackbar/Manager.d.ts +29 -0
- package/dist/components/Snackbar/Manager.js +35 -0
- package/dist/components/Snackbar/Manager.js.map +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +23 -5
- package/dist/components/Snackbar/Snackbar.js +23 -4
- package/dist/components/Snackbar/Snackbar.js.map +1 -1
- package/dist/components/Snackbar/SnackbarExample.js +8 -1
- package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
- package/dist/components/Snackbar/index.d.ts +1 -0
- package/dist/components/Snackbar/index.js +1 -0
- package/dist/components/Snackbar/index.js.map +1 -1
- package/dist/components/StylesProviderDemo/StylesProviderDemo.d.ts +1 -3
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js +1 -3
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +2 -2
- package/dist/components/Switch/Switch.js +2 -2
- package/dist/components/TabGroup/TabGroup.d.ts +2 -2
- package/dist/components/TabGroup/TabGroup.js +2 -2
- package/dist/components/TabGroup/TabGroupExample.js +5 -11
- package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
- package/dist/components/TabGroup/tab-group.css +1 -0
- package/dist/components/TabGroup/tab-group.css.js +1 -0
- package/dist/components/TabList/TabList.d.ts +2 -2
- package/dist/components/TabList/TabList.js +2 -2
- package/dist/components/TabList/tab-list.css +0 -1
- package/dist/components/TabList/tab-list.css.js +0 -1
- package/dist/components/Table/Table.d.ts +53 -16
- package/dist/components/Table/Table.js +53 -16
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/table.css +0 -1
- package/dist/components/Table/table.css.js +0 -1
- package/dist/components/Tag/Tag.d.ts +1 -3
- package/dist/components/Tag/Tag.js +1 -3
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Textarea/Textarea.d.ts +13 -13
- package/dist/components/Textarea/Textarea.js +13 -13
- package/dist/components/TimePicker/TimePicker.d.ts +14 -14
- package/dist/components/TimePicker/TimePicker.js +14 -14
- package/dist/components/ToggleOption/ToggleOption.js +1 -1
- package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
- package/dist/components/ToggleOption/toggle-option.css +2 -49
- package/dist/components/ToggleOption/toggle-option.css.js +2 -49
- package/dist/components/Tooltip/Tooltip.d.ts +3 -7
- package/dist/components/Tooltip/Tooltip.js +3 -7
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/TooltipExample.js +23 -3
- package/dist/components/Tooltip/TooltipExample.js.map +1 -1
- package/dist/components/Txt/Txt.d.ts +1 -3
- package/dist/components/Txt/Txt.js +1 -3
- package/dist/components/Txt/Txt.js.map +1 -1
- package/dist/components/UIProvider/AriaLiveMessageHandler.js +3 -2
- package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +1 -1
- package/dist/hooks/useAddEventListener.d.ts +1 -2
- package/dist/hooks/useAddEventListener.js.map +1 -1
- package/dist/hooks/useRadioState.d.ts +1 -1
- package/dist/hooks/useTimeout.d.ts +1 -2
- package/dist/hooks/useTimeout.js +20 -4
- package/dist/hooks/useTimeout.js.map +1 -1
- package/dist/types/common.d.ts +3 -0
- package/dist/types/common.js.map +1 -1
- package/dist/types/meta.d.ts +1 -0
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/createCustomEvent.d.ts +17 -0
- package/dist/utils/createCustomEvent.js +21 -0
- package/dist/utils/createCustomEvent.js.map +1 -0
- package/dist/utils/createExampleChildElement.js +3 -3
- package/dist/utils/createExampleChildElement.js.map +1 -1
- package/dist/utils/demo.d.ts +18 -26
- package/dist/utils/demo.js.map +1 -1
- package/meta.ts +6 -1
- package/package.json +1 -1
- package/src/components/Accordion/Accordion.tsx +20 -3
- package/src/components/Avatar/Avatar.tsx +13 -14
- package/src/components/AvatarGroup/AvatarGroup.tsx +30 -13
- package/src/components/Badge/Badge.tsx +1 -3
- package/src/components/BadgeDot/BadgeDot.tsx +6 -4
- package/src/components/BannerAlert/BannerAlert.tsx +11 -12
- package/src/components/BottomNavigation/BottomNavigation.tsx +6 -3
- package/src/components/BottomNavigation/BottomNavigationExample.tsx +31 -36
- package/src/components/BottomNavigation/bottom-navigation.scss +10 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +17 -18
- package/src/components/Button/Button.tsx +1 -11
- package/src/components/Button/ButtonExample.tsx +1 -2
- package/src/components/ButtonDock/ButtonDock.tsx +10 -14
- package/src/components/Card/Card.tsx +9 -11
- package/src/components/Carousel/Carousel.tsx +9 -13
- package/src/components/Carousel/CarouselExample.tsx +25 -25
- package/src/components/Checkbox/Checkbox.tsx +7 -4
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +3 -3
- package/src/components/CheckboxOption/CheckboxOption.tsx +4 -4
- package/src/components/Chip/Chip.tsx +3 -7
- package/src/components/Chip/ChipExample.tsx +52 -3
- package/src/components/ChipGroup/ChipGroup.tsx +21 -10
- package/src/components/ChipGroup/ChipGroupExample.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +13 -12
- package/src/components/Dialog/Dialog.tsx +11 -6
- package/src/components/Divider/Divider.tsx +5 -9
- package/src/components/Divider/DividerExample.tsx +18 -1
- package/src/components/Drawer/Drawer.tsx +3 -3
- package/src/components/EmptyState/EmptyState.tsx +3 -7
- package/src/components/Fab/Fab.tsx +8 -5
- package/src/components/Fab/FabExample.tsx +22 -3
- package/src/components/Field/Field.tsx +4 -5
- package/src/components/FileUpload/FileUpload.tsx +3 -3
- package/src/components/FileUploadItem/FileUploadItem.tsx +6 -10
- package/src/components/FormField/FormField.tsx +5 -16
- package/src/components/Img/Img.tsx +1 -3
- package/src/components/InlineAlert/InlineAlert.tsx +1 -3
- package/src/components/Input/Input.tsx +13 -13
- package/src/components/Input/InputElement.tsx +11 -5
- package/src/components/InputNumber/InputNumber.tsx +20 -20
- package/src/components/InputPhone/InputPhone.tsx +21 -16
- package/src/components/Layout/Layout.tsx +1 -3
- package/src/components/Link/Link.tsx +1 -3
- package/src/components/ListItem/ListItem.tsx +22 -20
- package/src/components/Menu/Menu.tsx +5 -9
- package/src/components/Modal/Modal.tsx +10 -5
- package/src/components/Modal/modal.scss +13 -1
- package/src/components/OTPInput/OTPInput.tsx +1 -3
- package/src/components/PageControl/PageControl.tsx +1 -3
- package/src/components/Pagination/Pagination.tsx +50 -24
- package/src/components/Pagination/pagination.scss +7 -17
- package/src/components/Password/Password.tsx +19 -20
- package/src/components/Popover/Popover.tsx +11 -20
- package/src/components/Popover/PopoverExample.tsx +1 -1
- package/src/components/ProgressBar/ProgressBar.tsx +1 -3
- package/src/components/ProgressCircle/ProgressCircle.tsx +1 -3
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +1 -3
- package/src/components/RadioGroup/RadioGroup.tsx +2 -2
- package/src/components/Rating/Rating.tsx +34 -14
- package/src/components/Rating/RatingExample.tsx +18 -1
- package/src/components/SearchBar/SearchBar.tsx +2 -2
- package/src/components/SegmentedControl/SegmentedControl.tsx +3 -3
- package/src/components/SegmentedControl/SegmentedControlExample.tsx +10 -12
- package/src/components/Select/Select.tsx +24 -25
- package/src/components/Skeleton/Skeleton.tsx +10 -14
- package/src/components/Skeleton/SkeletonExample.tsx +5 -3
- package/src/components/SkeletonText/SkeletonText.tsx +5 -9
- package/src/components/Slider/Slider.tsx +2 -2
- package/src/components/Slider/SliderExample.tsx +42 -17
- package/src/components/Snackbar/Manager.tsx +64 -0
- package/src/components/Snackbar/Snackbar.tsx +23 -6
- package/src/components/Snackbar/SnackbarExample.tsx +28 -6
- package/src/components/Snackbar/index.tsx +1 -0
- package/src/components/StylesProviderDemo/StylesProviderDemo.tsx +1 -3
- package/src/components/Switch/Switch.tsx +2 -2
- package/src/components/TabGroup/TabGroup.tsx +2 -2
- package/src/components/TabGroup/TabGroupExample.tsx +5 -11
- package/src/components/TabGroup/tab-group.scss +1 -0
- package/src/components/TabList/TabList.tsx +2 -2
- package/src/components/TabList/tab-list.scss +0 -1
- package/src/components/Table/Table.tsx +53 -16
- package/src/components/Table/table.scss +0 -1
- package/src/components/Tag/Tag.tsx +1 -3
- package/src/components/Textarea/Textarea.tsx +13 -13
- package/src/components/TimePicker/TimePicker.tsx +14 -14
- package/src/components/ToggleOption/ToggleOption.tsx +1 -0
- package/src/components/ToggleOption/toggle-option.scss +2 -61
- package/src/components/Tooltip/Tooltip.tsx +3 -7
- package/src/components/Tooltip/TooltipExample.tsx +23 -11
- package/src/components/Txt/Txt.tsx +1 -3
- package/src/components/UIProvider/AriaLiveMessageHandler.tsx +4 -2
- package/src/hooks/useAddEventListener.ts +1 -3
- package/src/hooks/useTimeout.ts +1 -5
- package/src/types/common.ts +4 -0
- package/src/types/meta.ts +1 -0
- package/src/utils/createCustomEvent.ts +35 -0
- package/src/utils/createExampleChildElement.tsx +3 -8
- package/src/utils/demo.ts +24 -27
- package/dist/components/ListItem/ListItemButton.d.ts +0 -2
- package/dist/components/ListItem/ListItemButton.js +0 -7
- package/dist/components/ListItem/ListItemButton.js.map +0 -1
- package/dist/components/Pagination/PageInput.d.ts +0 -4
- package/dist/components/Pagination/PageInput.js +0 -36
- package/dist/components/Pagination/PageInput.js.map +0 -1
- package/dist/hooks/usePaginationState.d.ts +0 -4
- package/dist/hooks/usePaginationState.js +0 -22
- package/dist/hooks/usePaginationState.js.map +0 -1
- package/src/components/ListItem/ListItemButton.tsx +0 -6
- package/src/components/Pagination/PageInput.tsx +0 -65
- package/src/hooks/usePaginationState.tsx +0 -24
|
@@ -33,15 +33,11 @@ export type SkeletonTextProps = {
|
|
|
33
33
|
* @example
|
|
34
34
|
* import { SkeletonText } from '@bspk/ui/SkeletonText';
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* </Txt>
|
|
42
|
-
* </SkeletonText>
|
|
43
|
-
* );
|
|
44
|
-
* }
|
|
36
|
+
* <SkeletonText textLines={1} textVariant="body-base">
|
|
37
|
+
* <Txt as="p" variant="body-base">
|
|
38
|
+
* {'This is the loaded text content that was previously loading.'}
|
|
39
|
+
* </Txt>
|
|
40
|
+
* </SkeletonText>;
|
|
45
41
|
*
|
|
46
42
|
* @exampleDescription This example shows a skeleton loading state for some text but can be used for any element.
|
|
47
43
|
*
|
|
@@ -74,11 +74,11 @@ export type SliderProps<Value> = Pick<CommonPropsLibrary, 'disabled' | 'readOnly
|
|
|
74
74
|
* import { Slider } from '@bspk/ui/Slider';
|
|
75
75
|
* import { useState } from 'react';
|
|
76
76
|
*
|
|
77
|
-
*
|
|
77
|
+
* () => {
|
|
78
78
|
* const [value, setValue] = useState(50);
|
|
79
79
|
*
|
|
80
80
|
* return <Slider value={value} min={0} max={100} label="Slider Example" onChange={setValue} />;
|
|
81
|
-
* }
|
|
81
|
+
* };
|
|
82
82
|
*
|
|
83
83
|
* @name Slider
|
|
84
84
|
* @phase UXReview
|
|
@@ -22,19 +22,21 @@ export const SliderExample: ComponentExample<SliderProps<number | [number, numbe
|
|
|
22
22
|
},
|
|
23
23
|
presets: [
|
|
24
24
|
{
|
|
25
|
-
label: '
|
|
25
|
+
label: 'Formatted Number',
|
|
26
26
|
propState: {
|
|
27
|
-
label: '
|
|
28
|
-
min:
|
|
29
|
-
max:
|
|
30
|
-
step:
|
|
31
|
-
value:
|
|
27
|
+
label: 'Price option',
|
|
28
|
+
min: 0,
|
|
29
|
+
max: 100,
|
|
30
|
+
step: 5,
|
|
31
|
+
value: 50,
|
|
32
32
|
formatNumber: (num) => `$${num}`,
|
|
33
|
-
name: '
|
|
33
|
+
name: 'formatted-number-slider',
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
{
|
|
37
37
|
label: 'Range Slider',
|
|
38
|
+
designPattern:
|
|
39
|
+
'A control element that allows customers to select a value or adjust a setting by moving the handle along a horizontal track.',
|
|
38
40
|
propState: {
|
|
39
41
|
label: 'Range option',
|
|
40
42
|
min: 0,
|
|
@@ -48,19 +50,42 @@ export const SliderExample: ComponentExample<SliderProps<number | [number, numbe
|
|
|
48
50
|
},
|
|
49
51
|
},
|
|
50
52
|
{
|
|
51
|
-
label: '
|
|
53
|
+
label: 'Continuous Slider',
|
|
54
|
+
designPattern: 'Continuous sliders allow users to select a value along a subjective range.',
|
|
52
55
|
propState: {
|
|
53
|
-
label: '
|
|
54
|
-
min:
|
|
55
|
-
max:
|
|
56
|
+
label: 'What is the purpose of life?',
|
|
57
|
+
min: 0,
|
|
58
|
+
max: 100,
|
|
59
|
+
value: 42,
|
|
56
60
|
step: 1,
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
61
|
+
formatNumber: (num) => num.toFixed(0),
|
|
62
|
+
name: 'continuous-slider',
|
|
63
|
+
marks: false,
|
|
64
|
+
},
|
|
65
|
+
},
|
|
66
|
+
{
|
|
67
|
+
label: 'Discrete Slider',
|
|
68
|
+
designPattern:
|
|
69
|
+
'Discrete sliders can be adjusted to a specific value by referencing its value indicator. You can generate a mark for each step with marks={true}.',
|
|
70
|
+
propState: {
|
|
71
|
+
label: 'Discrete option',
|
|
72
|
+
min: 0,
|
|
73
|
+
max: 100,
|
|
74
|
+
step: 10,
|
|
75
|
+
value: 40,
|
|
76
|
+
formatNumber: (num) => num.toString(),
|
|
77
|
+
name: 'discrete-slider',
|
|
78
|
+
marks: true,
|
|
63
79
|
},
|
|
64
80
|
},
|
|
65
81
|
],
|
|
82
|
+
defaultState: {
|
|
83
|
+
label: 'Basic option',
|
|
84
|
+
min: 20,
|
|
85
|
+
max: 80,
|
|
86
|
+
step: 1,
|
|
87
|
+
value: 30,
|
|
88
|
+
formatNumber: (num) => `$${num}`,
|
|
89
|
+
name: 'basic-slider',
|
|
90
|
+
},
|
|
66
91
|
};
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { IconName } from '@bspk/icons';
|
|
2
|
+
import { SvgIcon } from '@bspk/icons/SvgIcon';
|
|
3
|
+
import { useState } from 'react';
|
|
4
|
+
import { SnackbarProps, Snackbar } from './Snackbar';
|
|
5
|
+
import { BspkIcon } from '-/types/common';
|
|
6
|
+
import { createCustomEvent } from '-/utils/createCustomEvent';
|
|
7
|
+
|
|
8
|
+
const CLEAR_EVENT = 'bspk-snackbar-clear' as const;
|
|
9
|
+
|
|
10
|
+
// make onClose optional
|
|
11
|
+
export type SendSnackbarProps = Omit<SnackbarProps, 'icon' | 'innerRef' | 'onClose'> & {
|
|
12
|
+
onClose?: SnackbarProps['onClose'];
|
|
13
|
+
icon?: BspkIcon;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export type SnackbarManagerProps = {
|
|
17
|
+
/**
|
|
18
|
+
* Default timeout for snackbars sent via the manager (in milliseconds).
|
|
19
|
+
*
|
|
20
|
+
* @default 5000
|
|
21
|
+
*/
|
|
22
|
+
defaultTimeout?: number;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
const SnackbarEvent = createCustomEvent<SendSnackbarProps | string | typeof CLEAR_EVENT>('bspk-snackbar-event');
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* SnackbarManager is a single use component that listens for snackbar events and displays them to the user.
|
|
29
|
+
*
|
|
30
|
+
* We use a custom event to communicate between components and this manager.
|
|
31
|
+
*
|
|
32
|
+
* We don't store the snackbar props in React.Context to avoid unnecessary re-renders of all components that consume the
|
|
33
|
+
* context. :)
|
|
34
|
+
*
|
|
35
|
+
* @name SnackbarManager
|
|
36
|
+
*
|
|
37
|
+
* @phase UXReview
|
|
38
|
+
*/
|
|
39
|
+
export function SnackbarManager({ defaultTimeout = 5000 }: SnackbarManagerProps) {
|
|
40
|
+
const [snackbarProps, setSnackbarProps] = useState<SendSnackbarProps | undefined>();
|
|
41
|
+
const { useEventListener } = SnackbarEvent;
|
|
42
|
+
|
|
43
|
+
useEventListener((detail) => {
|
|
44
|
+
if (detail === CLEAR_EVENT || !detail) return setSnackbarProps(undefined);
|
|
45
|
+
|
|
46
|
+
setSnackbarProps(typeof detail === 'string' ? { text: detail, timeout: defaultTimeout } : detail);
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
return snackbarProps ? (
|
|
50
|
+
<Snackbar
|
|
51
|
+
{...snackbarProps}
|
|
52
|
+
icon={snackbarProps.icon ? <SvgIcon name={snackbarProps.icon as IconName} /> : undefined}
|
|
53
|
+
onClose={() => {
|
|
54
|
+
setSnackbarProps(undefined);
|
|
55
|
+
snackbarProps?.onClose?.();
|
|
56
|
+
}}
|
|
57
|
+
open={true}
|
|
58
|
+
/>
|
|
59
|
+
) : null;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const sendSnackbar = (props: SendSnackbarProps | string) => SnackbarEvent.send(props);
|
|
63
|
+
|
|
64
|
+
export const clearSnackbar = () => SnackbarEvent.send(CLEAR_EVENT);
|
|
@@ -41,8 +41,6 @@ export type SnackbarProps = CommonProps<'id'> & {
|
|
|
41
41
|
* @required
|
|
42
42
|
*/
|
|
43
43
|
onClose: () => void;
|
|
44
|
-
/** Content to be rendered inside the snack bar provider, the snackbar trigger element. */
|
|
45
|
-
// children: ReactNode;
|
|
46
44
|
/**
|
|
47
45
|
* Time in milliseconds after which the snackbar will auto dismiss.
|
|
48
46
|
*
|
|
@@ -67,24 +65,43 @@ export type SnackbarProps = CommonProps<'id'> & {
|
|
|
67
65
|
};
|
|
68
66
|
|
|
69
67
|
/**
|
|
70
|
-
* Snackbars
|
|
71
|
-
*
|
|
68
|
+
* Snackbars provide brief feedback about user actions. Because they use a focus trap, they interrupt the user's
|
|
69
|
+
* workflow and should be used sparingly.
|
|
70
|
+
*
|
|
71
|
+
* #### Inline
|
|
72
|
+
*
|
|
73
|
+
* Render the Snackbar inside the component that triggers it and control visibility with local state/props. This is
|
|
74
|
+
* simple and useful for small or isolated components, but can lead to duplicate snackbars or inadvertent render loops
|
|
75
|
+
* if state is not managed carefully.
|
|
76
|
+
*
|
|
77
|
+
* #### Managed
|
|
78
|
+
*
|
|
79
|
+
* Use the SnackbarManager together with `sendSnackbar` and `clearSnackbar` to control snackbars globally. This lets any
|
|
80
|
+
* part of the app trigger snackbars without prop drilling and helps avoid duplicates. and prevents duplicate snackbars
|
|
81
|
+
* from being shown.
|
|
72
82
|
*
|
|
73
83
|
* @example
|
|
74
84
|
* import { Snackbar } from '@bspk/ui/Snackbar';
|
|
75
85
|
* import { Button } from '@bspk/ui/Button';
|
|
76
86
|
* import { useState } from 'react';
|
|
87
|
+
* import { sendSnackbar } from '@bspk/ui/Snackbar/Manager';
|
|
77
88
|
*
|
|
78
|
-
*
|
|
89
|
+
* () => {
|
|
79
90
|
* const [snackbarOpen, setSnackbarOpen] = useState(false);
|
|
80
91
|
*
|
|
81
92
|
* return (
|
|
82
93
|
* <>
|
|
94
|
+
* // -- inline snackbar
|
|
83
95
|
* <Button label="Show snackbar" onClick={() => setSnackbarOpen(true)} size="medium" title="Snackbar" />
|
|
84
96
|
* <Snackbar text="I am an example." open={snackbarOpen} onClose={() => setSnackbarOpen(false)} />
|
|
97
|
+
* // -- managed snackbar
|
|
98
|
+
* <Button
|
|
99
|
+
* label="Show managed snackbar"
|
|
100
|
+
* onClick={() => sendSnackbar({ text: 'I am a managed snackbar!' })}
|
|
101
|
+
* />
|
|
85
102
|
* </>
|
|
86
103
|
* );
|
|
87
|
-
* }
|
|
104
|
+
* };
|
|
88
105
|
*
|
|
89
106
|
* @name Snackbar
|
|
90
107
|
*
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { IconName } from '@bspk/icons';
|
|
2
|
+
import { clearSnackbar, sendSnackbar } from './Manager';
|
|
1
3
|
import { Snackbar, SnackbarProps } from './Snackbar';
|
|
2
4
|
import { Button } from '-/components/Button';
|
|
3
5
|
import { ComponentExample } from '-/utils/demo';
|
|
@@ -7,12 +9,32 @@ export const SnackbarExample: ComponentExample<SnackbarProps> = {
|
|
|
7
9
|
defaultState: {},
|
|
8
10
|
disableProps: [],
|
|
9
11
|
presets: [],
|
|
10
|
-
render: ({ props, setState }) =>
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
12
|
+
render: ({ props, setState }) => {
|
|
13
|
+
return (
|
|
14
|
+
<>
|
|
15
|
+
<Snackbar {...props} onClose={() => setState({ open: false })} />
|
|
16
|
+
<Button
|
|
17
|
+
label="Launch Inline Snackbar"
|
|
18
|
+
onClick={() => setState({ open: true })}
|
|
19
|
+
size="medium"
|
|
20
|
+
title="Snackbar"
|
|
21
|
+
/>
|
|
22
|
+
<br />
|
|
23
|
+
<Button
|
|
24
|
+
label="Launch Managed Snackbar"
|
|
25
|
+
onClick={() =>
|
|
26
|
+
sendSnackbar({
|
|
27
|
+
...props,
|
|
28
|
+
text: `Managed: ${props.text}`,
|
|
29
|
+
icon: 'icon:icon-name' in props ? (props['icon:icon-name'] as IconName) : undefined,
|
|
30
|
+
})
|
|
31
|
+
}
|
|
32
|
+
/>
|
|
33
|
+
<br />
|
|
34
|
+
<Button label="Clear Managed Snackbar" onClick={() => clearSnackbar()} />
|
|
35
|
+
</>
|
|
36
|
+
);
|
|
37
|
+
},
|
|
16
38
|
sections: [],
|
|
17
39
|
variants: false,
|
|
18
40
|
};
|
|
@@ -21,9 +21,7 @@ export type StylesProviderDemoProps = {
|
|
|
21
21
|
* @example
|
|
22
22
|
* import { StylesProviderDemo } from '@bspk/ui/StylesProviderDemo';
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
* return <StylesProviderDemo brand="anywhere" />;
|
|
26
|
-
* }
|
|
24
|
+
* <StylesProviderDemo brand="anywhere" />;
|
|
27
25
|
*
|
|
28
26
|
* @name StylesProviderDemo
|
|
29
27
|
* @phase Utility
|
|
@@ -29,7 +29,7 @@ export type SwitchProps = CommonProps<'aria-label' | 'disabled' | 'name'> & {
|
|
|
29
29
|
* import { useState } from 'react';
|
|
30
30
|
* import { Switch } from '@bspk/ui/Switch';
|
|
31
31
|
*
|
|
32
|
-
*
|
|
32
|
+
* () => {
|
|
33
33
|
* const [isChecked, setIsChecked] = useState<boolean>(false);
|
|
34
34
|
*
|
|
35
35
|
* return (
|
|
@@ -40,7 +40,7 @@ export type SwitchProps = CommonProps<'aria-label' | 'disabled' | 'name'> & {
|
|
|
40
40
|
* checked={isChecked}
|
|
41
41
|
* />
|
|
42
42
|
* );
|
|
43
|
-
* }
|
|
43
|
+
* };
|
|
44
44
|
*
|
|
45
45
|
* @element
|
|
46
46
|
*
|
|
@@ -21,7 +21,7 @@ export type TabGroupProps = Omit<TabListProps<TabOption>, 'iconsOnly'> & {
|
|
|
21
21
|
* import { useState } from 'react';
|
|
22
22
|
* import { TabGroup } from '@bspk/ui/TabGroup';
|
|
23
23
|
*
|
|
24
|
-
*
|
|
24
|
+
* () => {
|
|
25
25
|
* const [selectedTab, setSelectedTab] = useState<string>();
|
|
26
26
|
*
|
|
27
27
|
* return (
|
|
@@ -35,7 +35,7 @@ export type TabGroupProps = Omit<TabListProps<TabOption>, 'iconsOnly'> & {
|
|
|
35
35
|
* value={selectedTab}
|
|
36
36
|
* />
|
|
37
37
|
* );
|
|
38
|
-
* }
|
|
38
|
+
* };
|
|
39
39
|
*
|
|
40
40
|
* @name TabGroup
|
|
41
41
|
* @phase UXReview
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import { SvgCircle } from '@bspk/icons/Circle';
|
|
2
|
-
import { SvgDiamond } from '@bspk/icons/Diamond';
|
|
3
|
-
import { SvgDiamondFill } from '@bspk/icons/DiamondFill';
|
|
4
|
-
import { SvgSquare } from '@bspk/icons/Square';
|
|
5
|
-
import { SvgSquareFill } from '@bspk/icons/SquareFill';
|
|
6
|
-
|
|
7
1
|
import { TabGroupProps } from '.';
|
|
8
2
|
import { ComponentExample, Preset } from '-/utils/demo';
|
|
9
3
|
|
|
@@ -34,17 +28,17 @@ const PRESET_OPTIONS: TabGroupProps['options'] = [
|
|
|
34
28
|
|
|
35
29
|
const OPTION_ICONS = [
|
|
36
30
|
{
|
|
37
|
-
icon:
|
|
38
|
-
iconSelected:
|
|
31
|
+
icon: 'Diamond',
|
|
32
|
+
iconSelected: 'DiamondFill',
|
|
39
33
|
},
|
|
40
34
|
|
|
41
35
|
{
|
|
42
|
-
icon:
|
|
36
|
+
icon: 'Circle',
|
|
43
37
|
iconSelected: undefined,
|
|
44
38
|
},
|
|
45
39
|
{
|
|
46
|
-
icon:
|
|
47
|
-
iconSelected:
|
|
40
|
+
icon: 'Square',
|
|
41
|
+
iconSelected: 'SquareFill',
|
|
48
42
|
},
|
|
49
43
|
];
|
|
50
44
|
|
|
@@ -127,7 +127,7 @@ export type TabListProps<O extends TabOption = TabOption> = {
|
|
|
127
127
|
* import { useState } from 'react';
|
|
128
128
|
* import { TabList } from '@bspk/ui/TabList';
|
|
129
129
|
*
|
|
130
|
-
*
|
|
130
|
+
* () => {
|
|
131
131
|
* const [selectedTab, setSelectedTab] = useState<string>();
|
|
132
132
|
*
|
|
133
133
|
* return (
|
|
@@ -141,7 +141,7 @@ export type TabListProps<O extends TabOption = TabOption> = {
|
|
|
141
141
|
* value={selectedTab}
|
|
142
142
|
* />
|
|
143
143
|
* );
|
|
144
|
-
* }
|
|
144
|
+
* };
|
|
145
145
|
*
|
|
146
146
|
* @name TabList
|
|
147
147
|
* @phase Utility
|
|
@@ -72,22 +72,59 @@ export type TableProps<R extends TableRow> = {
|
|
|
72
72
|
* @example
|
|
73
73
|
* import { Table } from '@bspk/ui/Table';
|
|
74
74
|
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
75
|
+
* <Table
|
|
76
|
+
* columns={[
|
|
77
|
+
* { key: 'state', label: 'State', width: '160px' },
|
|
78
|
+
* { key: 'capital', label: 'Capital', width: '140px' },
|
|
79
|
+
* { key: 'population', label: 'Population', width: '140px' },
|
|
80
|
+
* { key: 'nickname', label: 'Nickname', width: '1fr' },
|
|
81
|
+
* ]}
|
|
82
|
+
* data={[
|
|
83
|
+
* {
|
|
84
|
+
* id: 'ca',
|
|
85
|
+
* state: 'California',
|
|
86
|
+
* capital: 'Sacramento',
|
|
87
|
+
* population: '39,512,223',
|
|
88
|
+
* nickname: 'The Golden State',
|
|
89
|
+
* },
|
|
90
|
+
* {
|
|
91
|
+
* id: 'ny',
|
|
92
|
+
* state: 'New York',
|
|
93
|
+
* capital: 'Albany',
|
|
94
|
+
* population: '19,299,981',
|
|
95
|
+
* nickname: 'The Empire State',
|
|
96
|
+
* },
|
|
97
|
+
* {
|
|
98
|
+
* id: 'nj',
|
|
99
|
+
* state: 'New Jersey',
|
|
100
|
+
* capital: 'Trenton',
|
|
101
|
+
* population: '8,882,190',
|
|
102
|
+
* nickname: 'The Garden State',
|
|
103
|
+
* },
|
|
104
|
+
* {
|
|
105
|
+
* id: 'tx',
|
|
106
|
+
* state: 'Texas',
|
|
107
|
+
* capital: 'Austin',
|
|
108
|
+
* population: '29,183,290',
|
|
109
|
+
* nickname: 'The Lone Star State',
|
|
110
|
+
* },
|
|
111
|
+
* {
|
|
112
|
+
* id: 'hi',
|
|
113
|
+
* state: 'Hawaii',
|
|
114
|
+
* capital: 'Honolulu',
|
|
115
|
+
* population: '1,415,872',
|
|
116
|
+
* nickname: 'The Aloha State',
|
|
117
|
+
* },
|
|
118
|
+
* {
|
|
119
|
+
* id: 'ak',
|
|
120
|
+
* state: 'Alaska',
|
|
121
|
+
* capital: 'Juneau',
|
|
122
|
+
* population: '731,545',
|
|
123
|
+
* nickname: 'The Last Frontier',
|
|
124
|
+
* },
|
|
125
|
+
* ]}
|
|
126
|
+
* title="U.S. States — Capitals & Quick Facts"
|
|
127
|
+
* />;
|
|
91
128
|
*
|
|
92
129
|
* @name Table
|
|
93
130
|
* @phase UXReview
|
|
@@ -35,9 +35,7 @@ export type TagProps = {
|
|
|
35
35
|
* @example
|
|
36
36
|
* import { Tag } from '@bspk/ui/Tag';
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
* return <Tag label="Example Tag" variant="flat" color="primary" />;
|
|
40
|
-
* }
|
|
38
|
+
* <Tag label="Example Tag" variant="flat" color="primary" />;
|
|
41
39
|
*
|
|
42
40
|
* @name Tag
|
|
43
41
|
* @phase UXReview
|
|
@@ -49,22 +49,22 @@ export type TextareaProps = CommonProps<'size'> &
|
|
|
49
49
|
* import { useState } from 'react';
|
|
50
50
|
* import { Textarea } from '@bspk/ui/Textarea';
|
|
51
51
|
*
|
|
52
|
-
*
|
|
52
|
+
* () => {
|
|
53
53
|
* const [value, setValue] = useState('');
|
|
54
54
|
* return (
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
* <Textarea name="example-name" onChange={setValue} value={value} />
|
|
58
|
-
* <
|
|
59
|
-
*
|
|
55
|
+
* <>
|
|
56
|
+
* // standalone textarea example
|
|
57
|
+
* <Textarea aria-label="Enter text" name="example-name" onChange={setValue} value={value} />
|
|
58
|
+
* <br />
|
|
59
|
+
* // textarea used within a field
|
|
60
|
+
* <Field>
|
|
61
|
+
* <FieldLabel>Example Textarea</FieldLabel>
|
|
62
|
+
* <Textarea name="example-name" onChange={setValue} value={value} />
|
|
63
|
+
* <FieldDescription>This is an example textarea field.</FieldDescription>
|
|
64
|
+
* </Field>
|
|
65
|
+
* </>
|
|
60
66
|
* );
|
|
61
|
-
* }
|
|
62
|
-
*
|
|
63
|
-
* function ExampleStandalone() {
|
|
64
|
-
* const [value, setValue] = useState('');
|
|
65
|
-
*
|
|
66
|
-
* return <Textarea aria-label="Enter text" name="example-name" onChange={setValue} value={value} />;
|
|
67
|
-
* }
|
|
67
|
+
* };
|
|
68
68
|
*
|
|
69
69
|
* @element
|
|
70
70
|
*
|
|
@@ -33,23 +33,23 @@ export type TimePickerProps = FieldControlProps & Pick<InputProps, 'size'>;
|
|
|
33
33
|
* @example
|
|
34
34
|
* import { TimePicker } from '@bspk/ui/TimePicker';
|
|
35
35
|
*
|
|
36
|
-
*
|
|
37
|
-
* const [value, onChange] =
|
|
38
|
-
*
|
|
39
|
-
* return <TimePicker aria-label="Time" name="time" value={value} onChange={onChange} />;
|
|
40
|
-
* }
|
|
41
|
-
*
|
|
42
|
-
* function ExampleWithField() {
|
|
43
|
-
* const [value, onChange] = React.useState('');
|
|
36
|
+
* () => {
|
|
37
|
+
* const [value, onChange] = useState('');
|
|
44
38
|
*
|
|
45
39
|
* return (
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* <TimePicker value={value} onChange={onChange} />
|
|
49
|
-
* <
|
|
50
|
-
*
|
|
40
|
+
* <>
|
|
41
|
+
* // standalone time picker example
|
|
42
|
+
* <TimePicker aria-label="Time" name="time" value={value} onChange={onChange} />
|
|
43
|
+
* <br />
|
|
44
|
+
* // time picker used within a field
|
|
45
|
+
* <Field>
|
|
46
|
+
* <FieldLabel>Time</FieldLabel>
|
|
47
|
+
* <TimePicker value={value} onChange={onChange} />
|
|
48
|
+
* <FieldDescription>The time picker allows you to select a time.</FieldDescription>
|
|
49
|
+
* </Field>
|
|
50
|
+
* </>
|
|
51
51
|
* );
|
|
52
|
-
* }
|
|
52
|
+
* };
|
|
53
53
|
*
|
|
54
54
|
* @name TimePicker
|
|
55
55
|
* @phase UXReview
|
|
@@ -1,64 +1,5 @@
|
|
|
1
|
-
[data-bspk='toggle-option'] {
|
|
2
|
-
|
|
3
|
-
width: 100%;
|
|
4
|
-
grid-template-columns: auto 1fr;
|
|
5
|
-
grid-column-gap: var(--spacing-sizing-02);
|
|
6
|
-
user-select: none;
|
|
7
|
-
background: unset;
|
|
8
|
-
border: unset;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
min-height: var(--spacing-sizing-08);
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
padding: var(--spacing-sizing-01);
|
|
13
|
-
|
|
14
|
-
&:has([data-description]) {
|
|
15
|
-
align-items: unset;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
// this media query targets touch devices
|
|
19
|
-
@media (any-pointer: coarse) {
|
|
20
|
-
min-height: var(--spacing-sizing-12);
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
[data-control],
|
|
24
|
-
[data-label],
|
|
25
|
-
[data-description] {
|
|
26
|
-
display: flex;
|
|
27
|
-
flex-direction: row;
|
|
28
|
-
align-items: center;
|
|
29
|
-
justify-content: start;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
[data-label] {
|
|
33
|
-
color: var(--foreground-neutral-on-surface);
|
|
34
|
-
font: var(--labels-base);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
[data-description] {
|
|
38
|
-
grid-column-start: 2;
|
|
39
|
-
font: var(--body-small);
|
|
40
|
-
color: var(--foreground-neutral-on-surface-variant-01);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
&:not([aria-disabled]) {
|
|
44
|
-
[data-pseudo='focus'] &,
|
|
45
|
-
&:focus-visible,
|
|
46
|
-
&:has(*:focus-visible) {
|
|
47
|
-
outline: var(--stroke-neutral-focus) 2px solid;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
&[aria-disabled] {
|
|
52
|
-
cursor: not-allowed;
|
|
53
|
-
|
|
54
|
-
[data-label] {
|
|
55
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
[data-description] {
|
|
59
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
1
|
+
[data-bspk-owner='toggle-option'] {
|
|
2
|
+
align-items: start;
|
|
62
3
|
}
|
|
63
4
|
|
|
64
5
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|