@bspk/ui 1.3.8 → 1.3.10
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/Breadcrumb/BreadcrumbDropdown.d.ts +6 -0
- package/dist/components/Breadcrumb/BreadcrumbDropdown.js +6 -0
- package/dist/components/Breadcrumb/BreadcrumbDropdown.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/CheckboxGroup/CheckboxGroupExample.js +1 -0
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
- 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/Drawer/Drawer.js.map +1 -1
- 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/Field/FieldDescription.d.ts +7 -5
- package/dist/components/Field/FieldDescription.js +7 -3
- package/dist/components/Field/FieldDescription.js.map +1 -1
- package/dist/components/Field/FieldError.d.ts +6 -0
- package/dist/components/Field/FieldError.js +6 -0
- package/dist/components/Field/FieldError.js.map +1 -1
- package/dist/components/Field/FieldLabel.d.ts +6 -0
- package/dist/components/Field/FieldLabel.js +6 -0
- package/dist/components/Field/FieldLabel.js.map +1 -1
- package/dist/components/Field/utils.d.ts +5 -0
- package/dist/components/Field/utils.js +5 -0
- package/dist/components/Field/utils.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/InlineAlert/SvgWarningTwoTone.d.ts +6 -0
- package/dist/components/InlineAlert/SvgWarningTwoTone.js +6 -0
- package/dist/components/InlineAlert/SvgWarningTwoTone.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/IncrementButton.d.ts +13 -3
- package/dist/components/InputNumber/IncrementButton.js +11 -4
- package/dist/components/InputNumber/IncrementButton.js.map +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +20 -20
- package/dist/components/InputNumber/InputNumber.js +46 -30
- package/dist/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/components/InputNumber/InputNumberExample.js +1 -0
- package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
- package/dist/components/InputNumber/input-number.css +6 -0
- package/dist/components/InputNumber/input-number.css.js +6 -0
- 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 +5 -3
- package/dist/components/OTPInput/OTPInput.js +5 -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/PageList.d.ts +6 -0
- package/dist/components/Pagination/PageList.js +6 -0
- package/dist/components/Pagination/PageList.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/Scrim/Scrim.d.ts +0 -1
- package/dist/components/Scrim/Scrim.js +0 -1
- package/dist/components/Scrim/Scrim.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 +33 -34
- package/dist/components/Select/Select.js +33 -34
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Skeleton/Circular.d.ts +6 -0
- package/dist/components/Skeleton/Circular.js +6 -0
- package/dist/components/Skeleton/Circular.js.map +1 -1
- package/dist/components/Skeleton/Photo.d.ts +6 -0
- package/dist/components/Skeleton/Photo.js +6 -0
- package/dist/components/Skeleton/Photo.js.map +1 -1
- package/dist/components/Skeleton/Profile.d.ts +6 -0
- package/dist/components/Skeleton/Profile.js +6 -0
- package/dist/components/Skeleton/Profile.js.map +1 -1
- package/dist/components/Skeleton/Rectangular.d.ts +6 -0
- package/dist/components/Skeleton/Rectangular.js +6 -0
- package/dist/components/Skeleton/Rectangular.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/Skeleton/Thumbnail.d.ts +6 -0
- package/dist/components/Skeleton/Thumbnail.js +6 -0
- package/dist/components/Skeleton/Thumbnail.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/Slider/SliderIntervalDots.d.ts +6 -0
- package/dist/components/Slider/SliderIntervalDots.js +6 -0
- package/dist/components/Slider/SliderIntervalDots.js.map +1 -1
- package/dist/components/Snackbar/Manager.d.ts +28 -0
- package/dist/components/Snackbar/Manager.js +34 -0
- package/dist/components/Snackbar/Manager.js.map +1 -0
- package/dist/components/Snackbar/Snackbar.d.ts +23 -6
- package/dist/components/Snackbar/Snackbar.js +23 -5
- 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 +3 -4
- package/dist/components/TabList/TabList.js.map +1 -1
- package/dist/components/TabList/tab-list.css +0 -1
- package/dist/components/TabList/tab-list.css.js +0 -1
- package/dist/components/Table/Footer.d.ts +6 -0
- package/dist/components/Table/Footer.js +6 -0
- package/dist/components/Table/Footer.js.map +1 -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/Listbox.d.ts +6 -0
- package/dist/components/TimePicker/Listbox.js +6 -0
- package/dist/components/TimePicker/Listbox.js.map +1 -1
- package/dist/components/TimePicker/Segment.d.ts +6 -0
- package/dist/components/TimePicker/Segment.js +6 -0
- package/dist/components/TimePicker/Segment.js.map +1 -1
- 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/Truncated/Truncated.d.ts +0 -1
- package/dist/components/Truncated/Truncated.js +1 -2
- package/dist/components/Truncated/Truncated.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/components/UIProvider/UIProvider.d.ts +0 -1
- package/dist/components/UIProvider/UIProvider.js +0 -1
- package/dist/components/UIProvider/UIProvider.js.map +1 -1
- package/dist/hooks/useAddEventListener.d.ts +1 -2
- package/dist/hooks/useAddEventListener.js.map +1 -1
- package/dist/hooks/useLongPress.d.ts +30 -15
- package/dist/hooks/useLongPress.js +26 -42
- package/dist/hooks/useLongPress.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/styles/base.css +9 -0
- package/dist/styles/base.css.js +9 -0
- 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/Breadcrumb/BreadcrumbDropdown.tsx +6 -0
- 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/CheckboxGroup/CheckboxGroupExample.tsx +1 -0
- 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 -4
- 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/Field/FieldDescription.tsx +7 -5
- package/src/components/Field/FieldError.tsx +6 -0
- package/src/components/Field/FieldLabel.tsx +6 -0
- package/src/components/Field/utils.ts +5 -0
- 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/InlineAlert/SvgWarningTwoTone.tsx +6 -0
- package/src/components/Input/Input.tsx +13 -13
- package/src/components/Input/InputElement.tsx +11 -5
- package/src/components/InputNumber/IncrementButton.tsx +21 -11
- package/src/components/InputNumber/InputNumber.tsx +53 -51
- package/src/components/InputNumber/InputNumberExample.tsx +1 -0
- package/src/components/InputNumber/input-number.scss +10 -0
- 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 +5 -3
- package/src/components/PageControl/PageControl.tsx +1 -3
- package/src/components/Pagination/PageList.tsx +6 -0
- 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/Scrim/Scrim.tsx +0 -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 +33 -34
- package/src/components/Skeleton/Circular.tsx +6 -0
- package/src/components/Skeleton/Photo.tsx +6 -0
- package/src/components/Skeleton/Profile.tsx +6 -0
- package/src/components/Skeleton/Rectangular.tsx +6 -0
- package/src/components/Skeleton/Skeleton.tsx +10 -14
- package/src/components/Skeleton/SkeletonExample.tsx +5 -3
- package/src/components/Skeleton/Thumbnail.tsx +6 -0
- 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/Slider/SliderIntervalDots.tsx +6 -0
- package/src/components/Snackbar/Manager.tsx +63 -0
- package/src/components/Snackbar/Snackbar.tsx +23 -7
- 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 +3 -4
- package/src/components/TabList/tab-list.scss +0 -1
- package/src/components/Table/Footer.tsx +6 -0
- 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/Listbox.tsx +6 -0
- package/src/components/TimePicker/Segment.tsx +6 -0
- 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/Truncated/Truncated.tsx +1 -2
- package/src/components/Txt/Txt.tsx +1 -3
- package/src/components/UIProvider/AriaLiveMessageHandler.tsx +4 -2
- package/src/components/UIProvider/UIProvider.tsx +0 -1
- package/src/hooks/useAddEventListener.ts +1 -3
- package/src/hooks/useLongPress.ts +58 -48
- package/src/hooks/useTimeout.ts +1 -5
- package/src/styles/base.scss +9 -0
- 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/components/Truncated/truncated.css +0 -8
- package/dist/components/Truncated/truncated.css.js +0 -13
- 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/components/Truncated/truncated.scss +0 -8
- package/src/hooks/usePaginationState.tsx +0 -24
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PageList.js","sourceRoot":"","sources":["../../../src/components/Pagination/PageList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAiB;IACjE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QACjD,MAAM,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;QACvB,OAAO,CACH,KAAC,MAAM,kBACS,QAAQ,IAAI,EAAE,EAE1B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,KAAK,EAAC,YAAY,EAClB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,IAL3C,IAAI,CAMX,CACL,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
1
|
+
{"version":3,"file":"PageList.js","sourceRoot":"","sources":["../../../src/components/Pagination/PageList.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAI7C;;;;;GAKG;AACH,MAAM,UAAU,QAAQ,CAAC,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAiB;IACjE,OAAO,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE;QACjD,MAAM,IAAI,GAAG,KAAK,GAAG,CAAC,CAAC;QACvB,OAAO,CACH,KAAC,MAAM,kBACS,QAAQ,IAAI,EAAE,EAE1B,KAAK,EAAE,MAAM,CAAC,IAAI,CAAC,EACnB,OAAO,EAAE,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAC7B,KAAK,EAAC,YAAY,EAClB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,UAAU,IAL3C,IAAI,CAMX,CACL,CAAC;IACN,CAAC,CAAC,CAAC;AACP,CAAC"}
|
|
@@ -4,7 +4,9 @@ export type PaginationProps = {
|
|
|
4
4
|
/**
|
|
5
5
|
* The number of pages to display in the pagination component.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
7
|
+
* If there is only one page, the component will not render.
|
|
8
|
+
*
|
|
9
|
+
* @default 2
|
|
8
10
|
*/
|
|
9
11
|
numPages: number;
|
|
10
12
|
/**
|
|
@@ -22,18 +24,15 @@ export type PaginationProps = {
|
|
|
22
24
|
*
|
|
23
25
|
* @example
|
|
24
26
|
* import { Pagination } from '@bspk/ui/Pagination';
|
|
25
|
-
* import { usePaginationState } from '@bspk/ui/hooks/usePaginationState';
|
|
26
27
|
*
|
|
27
28
|
* function Example() {
|
|
28
|
-
* const
|
|
29
|
-
*
|
|
30
|
-
* const { currentPage, setCurrentPage } = usePaginationState(numPages);
|
|
29
|
+
* const [currentPage, setCurrentPage] = useState(1);
|
|
31
30
|
*
|
|
32
|
-
* return <Pagination value={currentPage} onChange={setCurrentPage} numPages={
|
|
31
|
+
* return <Pagination value={currentPage} onChange={setCurrentPage} numPages={10} />;
|
|
33
32
|
* }
|
|
34
33
|
*
|
|
35
34
|
* @name Pagination
|
|
36
35
|
* @phase UXReview
|
|
37
36
|
*/
|
|
38
|
-
export declare function Pagination({ numPages, value, onChange, ...ariaProps }: AriaAttributes & PaginationProps): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
export declare function Pagination({ numPages, value, onChange, ...ariaProps }: AriaAttributes & PaginationProps): import("react/jsx-runtime").JSX.Element | null;
|
|
39
38
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import './pagination.css.js';
|
|
3
3
|
import { SvgIcon } from '@bspk/icons/SvgIcon';
|
|
4
|
-
import {
|
|
4
|
+
import { useEffect, useState } from 'react';
|
|
5
5
|
import { PageList } from './PageList';
|
|
6
6
|
import { Button } from '../Button';
|
|
7
|
+
import { InputElement } from '../Input';
|
|
7
8
|
// After this point the manual input renders. With equal or fewer pages the individual page buttons render instead.
|
|
8
9
|
const INPUT_TYPE_THRESHOLD = 7;
|
|
9
10
|
/**
|
|
@@ -12,14 +13,11 @@ const INPUT_TYPE_THRESHOLD = 7;
|
|
|
12
13
|
*
|
|
13
14
|
* @example
|
|
14
15
|
* import { Pagination } from '@bspk/ui/Pagination';
|
|
15
|
-
* import { usePaginationState } from '@bspk/ui/hooks/usePaginationState';
|
|
16
16
|
*
|
|
17
17
|
* function Example() {
|
|
18
|
-
* const
|
|
18
|
+
* const [currentPage, setCurrentPage] = useState(1);
|
|
19
19
|
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
* return <Pagination value={currentPage} onChange={setCurrentPage} numPages={numPages} />;
|
|
20
|
+
* return <Pagination value={currentPage} onChange={setCurrentPage} numPages={10} />;
|
|
23
21
|
* }
|
|
24
22
|
*
|
|
25
23
|
* @name Pagination
|
|
@@ -27,19 +25,34 @@ const INPUT_TYPE_THRESHOLD = 7;
|
|
|
27
25
|
*/
|
|
28
26
|
export function Pagination({ numPages, value, onChange, ...ariaProps }) {
|
|
29
27
|
const nextPage = () => {
|
|
30
|
-
if (value < numPages)
|
|
28
|
+
if (value < numPages)
|
|
31
29
|
onChange(value + 1);
|
|
32
|
-
}
|
|
33
30
|
};
|
|
34
31
|
const previousPage = () => {
|
|
35
|
-
if (value > 1)
|
|
32
|
+
if (value > 1)
|
|
36
33
|
onChange(value - 1);
|
|
37
|
-
}
|
|
38
34
|
};
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
|
|
35
|
+
const [inputValue, setInputValue] = useState(`${value}`);
|
|
36
|
+
useEffect(() => setInputValue(`${value}`), [value]);
|
|
37
|
+
const submitInputChange = () => {
|
|
38
|
+
const parsedValue = parseInt(inputValue || '', 10);
|
|
39
|
+
if (isNaN(parsedValue))
|
|
40
|
+
return setInputValue(`${value}`);
|
|
41
|
+
let next = parsedValue;
|
|
42
|
+
if (parsedValue < 1)
|
|
43
|
+
next = 1;
|
|
44
|
+
if (parsedValue > numPages)
|
|
45
|
+
next = numPages;
|
|
46
|
+
onChange(next);
|
|
47
|
+
if (next !== parsedValue)
|
|
48
|
+
setInputValue(`${next}`);
|
|
49
|
+
};
|
|
50
|
+
const inBounds = (n) => n >= 1 && n <= numPages;
|
|
51
|
+
if (numPages <= 1)
|
|
52
|
+
return null;
|
|
53
|
+
return (_jsxs("span", { "data-bspk": "pagination", role: "group", ...ariaProps, children: [_jsx(Button, { disabled: !inBounds(value - 1), icon: _jsx(SvgIcon, { name: "ChevronLeft" }), iconOnly: true, label: value === 1 ? 'First page' : `Previous page (${value - 1})`, onClick: previousPage, owner: "pagination", size: "small", variant: "tertiary" }), numPages > INPUT_TYPE_THRESHOLD ? (_jsxs("form", { "data-input-form": true, onSubmit: (e) => {
|
|
54
|
+
e.preventDefault();
|
|
55
|
+
submitInputChange();
|
|
56
|
+
}, children: [_jsx(InputElement, { name: "page-number", onBlur: () => submitInputChange(), onChange: setInputValue, owner: "pagination", showClearButton: false, type: "number", value: inputValue }), "of ", numPages] })) : (_jsx(PageList, { numPages: numPages, onChange: onChange, value: value })), _jsx(Button, { disabled: !inBounds(value + 1), icon: _jsx(SvgIcon, { name: "ChevronRight" }), iconOnly: true, label: value === numPages ? 'Last page' : `Next page (${value + 1})`, onClick: nextPage, owner: "pagination", size: "small", variant: "tertiary" })] }));
|
|
44
57
|
}
|
|
45
58
|
//# sourceMappingURL=Pagination.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Pagination.js","sourceRoot":"","sources":["../../../src/components/Pagination/Pagination.tsx"],"names":[],"mappings":";AAAA,OAAO,mBAAmB,CAAC;AAC3B,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAkB,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAElD,mHAAmH;AACnH,MAAM,oBAAoB,GAAG,CAAC,CAAC;AAsB/B;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,UAAU,CAAC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ACjB,KAAK,EAAC,YAAY,EAClB,IAAI,EAAC,OAAO,EACZ,OAAO,EAAC,UAAU,GACpB,IACC,CACV,CAAC;AACN,CAAC"}
|
|
@@ -6,23 +6,14 @@
|
|
|
6
6
|
gap: var(--spacing-sizing-01);
|
|
7
7
|
flex: 1;
|
|
8
8
|
}
|
|
9
|
-
[data-bspk=pagination] [data-
|
|
10
|
-
display:
|
|
11
|
-
flex-direction: row;
|
|
12
|
-
align-items: center;
|
|
13
|
-
justify-content: center;
|
|
14
|
-
gap: var(--spacing-sizing-01);
|
|
15
|
-
}
|
|
16
|
-
[data-bspk=pagination] [data-bspk=page-input] [data-bspk=txt] {
|
|
17
|
-
color: var(--foreground-neutral-on-surface-variant-02);
|
|
18
|
-
text-wrap: nowrap;
|
|
9
|
+
[data-bspk=pagination] [data-input-form] {
|
|
10
|
+
display: contents;
|
|
19
11
|
}
|
|
20
|
-
[data-bspk=pagination] [data-bspk=
|
|
21
|
-
width: var(--spacing-sizing-12);
|
|
12
|
+
[data-bspk=pagination] [data-bspk=input] {
|
|
13
|
+
max-width: var(--spacing-sizing-12);
|
|
22
14
|
}
|
|
23
|
-
[data-bspk=pagination] [data-bspk=
|
|
15
|
+
[data-bspk=pagination] [data-bspk=input] input {
|
|
24
16
|
text-align: center;
|
|
25
|
-
flex: 1;
|
|
26
17
|
}
|
|
27
18
|
[data-bspk=pagination] button[data-bspk-owner=pagination][data-bspk=button][data-size=small] {
|
|
28
19
|
padding: 6px 0;
|
|
@@ -9,23 +9,14 @@ style.appendChild(document.createTextNode(`[data-bspk=pagination] {
|
|
|
9
9
|
gap: var(--spacing-sizing-01);
|
|
10
10
|
flex: 1;
|
|
11
11
|
}
|
|
12
|
-
[data-bspk=pagination] [data-
|
|
13
|
-
display:
|
|
14
|
-
flex-direction: row;
|
|
15
|
-
align-items: center;
|
|
16
|
-
justify-content: center;
|
|
17
|
-
gap: var(--spacing-sizing-01);
|
|
18
|
-
}
|
|
19
|
-
[data-bspk=pagination] [data-bspk=page-input] [data-bspk=txt] {
|
|
20
|
-
color: var(--foreground-neutral-on-surface-variant-02);
|
|
21
|
-
text-wrap: nowrap;
|
|
12
|
+
[data-bspk=pagination] [data-input-form] {
|
|
13
|
+
display: contents;
|
|
22
14
|
}
|
|
23
|
-
[data-bspk=pagination] [data-bspk=
|
|
24
|
-
width: var(--spacing-sizing-12);
|
|
15
|
+
[data-bspk=pagination] [data-bspk=input] {
|
|
16
|
+
max-width: var(--spacing-sizing-12);
|
|
25
17
|
}
|
|
26
|
-
[data-bspk=pagination] [data-bspk=
|
|
18
|
+
[data-bspk=pagination] [data-bspk=input] input {
|
|
27
19
|
text-align: center;
|
|
28
|
-
flex: 1;
|
|
29
20
|
}
|
|
30
21
|
[data-bspk=pagination] button[data-bspk-owner=pagination][data-bspk=button][data-size=small] {
|
|
31
22
|
padding: 6px 0;
|
|
@@ -11,30 +11,29 @@ export type PasswordProps = FieldControlProps & Pick<InputProps, 'containerRef'
|
|
|
11
11
|
* import { Password } from '@bspk/ui/Password';
|
|
12
12
|
* import { useState } from 'react';
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* () => {
|
|
15
15
|
* const [value, setValue] = useState('');
|
|
16
16
|
*
|
|
17
17
|
* return (
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
18
|
+
* <>
|
|
19
|
+
* // standalone password example
|
|
20
|
+
* <Password
|
|
21
|
+
* aria-label="Enter password"
|
|
22
|
+
* value={value}
|
|
23
|
+
* onChange={setValue}
|
|
24
|
+
* aria-label="password"
|
|
25
|
+
* name="password"
|
|
26
|
+
* />
|
|
27
|
+
* <br />
|
|
28
|
+
* // password used within a field
|
|
29
|
+
* <Field>
|
|
30
|
+
* <FieldLabel>Password</FieldLabel>
|
|
31
|
+
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
32
|
+
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
33
|
+
* </Field>
|
|
34
|
+
* </>
|
|
25
35
|
* );
|
|
26
|
-
* }
|
|
27
|
-
*
|
|
28
|
-
* function ExampleWithField() {
|
|
29
|
-
* const [value, setValue] = useState('');
|
|
30
|
-
* return (
|
|
31
|
-
* <Field>
|
|
32
|
-
* <FieldLabel>Password</FieldLabel>
|
|
33
|
-
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
34
|
-
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
35
|
-
* </Field>
|
|
36
|
-
* );
|
|
37
|
-
* }
|
|
36
|
+
* };
|
|
38
37
|
*
|
|
39
38
|
* @name Password
|
|
40
39
|
* @phase UXReview
|
|
@@ -13,30 +13,29 @@ import { InputElement } from '../Input';
|
|
|
13
13
|
* import { Password } from '@bspk/ui/Password';
|
|
14
14
|
* import { useState } from 'react';
|
|
15
15
|
*
|
|
16
|
-
*
|
|
16
|
+
* () => {
|
|
17
17
|
* const [value, setValue] = useState('');
|
|
18
18
|
*
|
|
19
19
|
* return (
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
20
|
+
* <>
|
|
21
|
+
* // standalone password example
|
|
22
|
+
* <Password
|
|
23
|
+
* aria-label="Enter password"
|
|
24
|
+
* value={value}
|
|
25
|
+
* onChange={setValue}
|
|
26
|
+
* aria-label="password"
|
|
27
|
+
* name="password"
|
|
28
|
+
* />
|
|
29
|
+
* <br />
|
|
30
|
+
* // password used within a field
|
|
31
|
+
* <Field>
|
|
32
|
+
* <FieldLabel>Password</FieldLabel>
|
|
33
|
+
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
34
|
+
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
35
|
+
* </Field>
|
|
36
|
+
* </>
|
|
27
37
|
* );
|
|
28
|
-
* }
|
|
29
|
-
*
|
|
30
|
-
* function ExampleWithField() {
|
|
31
|
-
* const [value, setValue] = useState('');
|
|
32
|
-
* return (
|
|
33
|
-
* <Field>
|
|
34
|
-
* <FieldLabel>Password</FieldLabel>
|
|
35
|
-
* <Password value={value} onChange={setValue} aria-label="password" name="password" />
|
|
36
|
-
* <FieldDescription>The password field allows you to enter a secure password.</FieldDescription>
|
|
37
|
-
* </Field>
|
|
38
|
-
* );
|
|
39
|
-
* }
|
|
38
|
+
* };
|
|
40
39
|
*
|
|
41
40
|
* @name Password
|
|
42
41
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Password.js","sourceRoot":"","sources":["../../../src/components/Password/Password.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAK9D
|
|
1
|
+
{"version":3,"file":"Password.js","sourceRoot":"","sources":["../../../src/components/Password/Password.tsx"],"names":[],"mappings":";AAAA,OAAO,iBAAiB,CAAC;AACzB,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAc,MAAM,oBAAoB,CAAC;AAK9D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,UAAU,QAAQ,CAAC,EACrB,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,QAAQ,EACR,QAAQ,GAAG,KAAK,EAChB,YAAY,EACZ,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,QAAQ,EACR,EAAE,EAAE,MAAM,EACV,YA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AC,CAAC,CAAC,UAAU,GAC/C,CACL,CAAC;AACN,CAAC"}
|
|
@@ -48,26 +48,17 @@ export type PopoverProps = CommonProps<'disabled'> & Pick<UseFloatingProps, 'ref
|
|
|
48
48
|
* import { Popover } from '@bspk/ui/Popover';
|
|
49
49
|
* import { Button } from '@bspk/ui/Button';
|
|
50
50
|
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
* callToAction={{
|
|
63
|
-
* label: 'Action',
|
|
64
|
-
* onClick: onPopoverCallToActionClick,
|
|
65
|
-
* }}
|
|
66
|
-
* >
|
|
67
|
-
* <Button label="Toggle popover" onClick={togglePopover} />
|
|
68
|
-
* </Popover>
|
|
69
|
-
* );
|
|
70
|
-
* }
|
|
51
|
+
* <Popover
|
|
52
|
+
* placement="bottom"
|
|
53
|
+
* content="This is a popover content"
|
|
54
|
+
* header="Popover Header"
|
|
55
|
+
* callToAction={{
|
|
56
|
+
* label: 'Action',
|
|
57
|
+
* onClick: () => action('Action clicked'),
|
|
58
|
+
* }}
|
|
59
|
+
* >
|
|
60
|
+
* {(triggerProps) => <Button {...triggerProps} label="Toggle popover" />}
|
|
61
|
+
* </Popover>;
|
|
71
62
|
*
|
|
72
63
|
* @name Popover
|
|
73
64
|
* @phase UXReview
|
|
@@ -18,26 +18,17 @@ import { cssWithVars } from '../../utils/cwv';
|
|
|
18
18
|
* import { Popover } from '@bspk/ui/Popover';
|
|
19
19
|
* import { Button } from '@bspk/ui/Button';
|
|
20
20
|
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
* callToAction={{
|
|
33
|
-
* label: 'Action',
|
|
34
|
-
* onClick: onPopoverCallToActionClick,
|
|
35
|
-
* }}
|
|
36
|
-
* >
|
|
37
|
-
* <Button label="Toggle popover" onClick={togglePopover} />
|
|
38
|
-
* </Popover>
|
|
39
|
-
* );
|
|
40
|
-
* }
|
|
21
|
+
* <Popover
|
|
22
|
+
* placement="bottom"
|
|
23
|
+
* content="This is a popover content"
|
|
24
|
+
* header="Popover Header"
|
|
25
|
+
* callToAction={{
|
|
26
|
+
* label: 'Action',
|
|
27
|
+
* onClick: () => action('Action clicked'),
|
|
28
|
+
* }}
|
|
29
|
+
* >
|
|
30
|
+
* {(triggerProps) => <Button {...triggerProps} label="Toggle popover" />}
|
|
31
|
+
* </Popover>;
|
|
41
32
|
*
|
|
42
33
|
* @name Popover
|
|
43
34
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../src/components/Popover/Popover.tsx"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAgB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAa,WAAW,EAAoB,MAAM,qBAAqB,CAAC;AAC/E,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA2C1C
|
|
1
|
+
{"version":3,"file":"Popover.js","sourceRoot":"","sources":["../../../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AE,QAAQ,CAAC,CAAC,CAAC,SAAS,EAAE,CAAC,CAAC,CAAC,WAAW;oCACvD,gBAAgB,EAAE,GAAG,cAAc,EAAE,KAAK,EAAE,CAAC,IAAI,CAAC,IAAI;iCACzD,CAAC,GACJ,IACA,GACE,GACP,CACZ,IACF,CACN,CAAC;AACN,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { Txt } from '../Txt';
|
|
|
4
4
|
export const PopoverExample = ({ action }) => ({
|
|
5
5
|
containerStyle: { width: '100%' },
|
|
6
6
|
render: ({ props, Component }) => {
|
|
7
|
-
return (_jsxs(_Fragment, { children: [_jsx(Txt, { style: { marginBottom: `var(--spacing-sizing-02)` }, children: "Click
|
|
7
|
+
return (_jsxs(_Fragment, { children: [_jsx(Txt, { style: { marginBottom: `var(--spacing-sizing-02)` }, children: "Click for a Popover" }), _jsx(Component, { ...props, children: (triggerProps) => _jsx(Button, { label: `${props.placement}`, variant: "secondary", ...triggerProps }) })] }));
|
|
8
8
|
},
|
|
9
9
|
presets: [
|
|
10
10
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PopoverExample.js","sourceRoot":"","sources":["../../../src/components/Popover/PopoverExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC,MAAM,CAAC,MAAM,cAAc,GAAqC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IAC7E,cAAc,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE;IACjC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,OAAO,CACH,8BACI,KAAC,GAAG,IAAC,KAAK,EAAE,EAAE,YAAY,EAAE,0BAA0B,EAAE,
|
|
1
|
+
{"version":3,"file":"PopoverExample.js","sourceRoot":"","sources":["../../../src/components/Popover/PopoverExample.tsx"],"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C7D;gBACD,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;aACvB;SACJ;KACJ;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC"}
|
|
@@ -49,9 +49,7 @@ export type ProgressBarProps = {
|
|
|
49
49
|
* @example
|
|
50
50
|
* import { ProgressBar } from '@bspk/ui/ProgressBar';
|
|
51
51
|
*
|
|
52
|
-
*
|
|
53
|
-
* return <ProgressBar label="Example label" completion={50} />;
|
|
54
|
-
* }
|
|
52
|
+
* <ProgressBar label="Example label" completion={50} />;
|
|
55
53
|
*
|
|
56
54
|
* @name ProgressBar
|
|
57
55
|
* @phase UXReview
|
|
@@ -9,9 +9,7 @@ import { cssWithVars } from '../../utils/cwv';
|
|
|
9
9
|
* @example
|
|
10
10
|
* import { ProgressBar } from '@bspk/ui/ProgressBar';
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* return <ProgressBar label="Example label" completion={50} />;
|
|
14
|
-
* }
|
|
12
|
+
* <ProgressBar label="Example label" completion={50} />;
|
|
15
13
|
*
|
|
16
14
|
* @name ProgressBar
|
|
17
15
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA8C1C
|
|
1
|
+
{"version":3,"file":"ProgressBar.js","sourceRoot":"","sources":["../../../src/components/ProgressBar/ProgressBar.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AA8C1C;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,WAAW,CAAC,EACxB,IAAI,GAAG,OAAO,EACd,UAAU,EAAE,cAAc,GAAG,CAAC,EAC9B,KAAK,GAAG,QAAQ,EAChB,KAAK,EACL,YAAY,GAAG,KAAK,EACpB,aAAa,GAAG,KAAK,GACN;IACf,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,MAAM,UAAU,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,GAAG,CAAC,GAAG,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,yCAAyC;IAEpH,IAAI,aAAa,IAAI,UAAU,KAAK,GAAG;QAAE,OAAO,IAAI,CAAC;IAErD,OAAO,CACH,6BACgB,KAAK,eACP,cAAc,eACb,IAAI,kBACD,YAAY,IAAI,UAAU,KAAK,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,aAEtE,iCACe,UAAU,GAAG,GAAG,gBAChB,sCAAsC,mBAClC,GAAG,mBACH,CAAC,mBACD,UAAU,EACzB,EAAE,EAAE,EAAE,EACN,GAAG,EAAC,KAAK,EACT,KAAK,EAAE,UAAU,aAEhB,UAAU,SACJ,EACX,qDAA0B,KAAK,EAAE,WAAW,CAAC,EAAE,SAAS,EAAE,GAAG,UAAU,GAAG,EAAE,CAAC,GAAI,EACjF,gBAAO,OAAO,EAAE,EAAE,YAAG,KAAK,GAAS,IACjC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -21,9 +21,7 @@ export type ProgressCircleProps = {
|
|
|
21
21
|
* @example
|
|
22
22
|
* import { ProgressCircle } from '@bspk/ui/ProgressCircle';
|
|
23
23
|
*
|
|
24
|
-
*
|
|
25
|
-
* return <ProgressCircle label="Example label" />;
|
|
26
|
-
* }
|
|
24
|
+
* <ProgressCircle label="Example label" />;
|
|
27
25
|
*
|
|
28
26
|
* @name ProgressCircle
|
|
29
27
|
* @phase UXReview
|
|
@@ -9,9 +9,7 @@ import { useId } from '../../hooks/useId';
|
|
|
9
9
|
* @example
|
|
10
10
|
* import { ProgressCircle } from '@bspk/ui/ProgressCircle';
|
|
11
11
|
*
|
|
12
|
-
*
|
|
13
|
-
* return <ProgressCircle label="Example label" />;
|
|
14
|
-
* }
|
|
12
|
+
* <ProgressCircle label="Example label" />;
|
|
15
13
|
*
|
|
16
14
|
* @name ProgressCircle
|
|
17
15
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressCircle.js","sourceRoot":"","sources":["../../../src/components/ProgressCircle/ProgressCircle.tsx"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAoBtC
|
|
1
|
+
{"version":3,"file":"ProgressCircle.js","sourceRoot":"","sources":["../../../src/components/ProgressCircle/ProgressCircle.tsx"],"names":[],"mappings":";AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAoBtC;;;;;;;;;;GAUG;AACH,SAAS,cAAc,CAAC,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,GAAG,QAAQ,EAAuB;IAClF,IAAI,OAAO,GAAe,aAAa,CAAC;IAExC,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,GAAG,cAAc,CAAC;SAC1C,IAAI,IAAI,KAAK,OAAO;QAAE,OAAO,GAAG,cAAc,CAAC;IAEpD,MAAM,OAAO,GAAG,KAAK,EAAE,CAAC;IAExB,OAAO,CACH,kCACqB,OAAO,eACd,iBAAiB,yBACN,aAAa,eACvB,IAAI,EACf,IAAI,EAAC,aAAa,aAElB,KAAC,cAAc,CAAC,GAAG,KAAG,EACtB,KAAC,GAAG,IAAC,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,YAC7B,KAAK,IAAI,aAAa,GACrB,IACJ,CACT,CAAC;AACN,CAAC;AAED,cAAc,CAAC,GAAG,GAAG,iBAAiB,CAAC;AAEvC,OAAO,EAAE,cAAc,EAAE,CAAC"}
|
|
@@ -58,9 +58,7 @@ export type ProgressionStepperProps = {
|
|
|
58
58
|
* @example
|
|
59
59
|
* import { ProgressionStepper } from '@bspk/ui/ProgressionStepper';
|
|
60
60
|
*
|
|
61
|
-
*
|
|
62
|
-
* return <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
63
|
-
* }
|
|
61
|
+
* <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
64
62
|
*
|
|
65
63
|
* @name ProgressionStepper
|
|
66
64
|
* @phase UXReview
|
|
@@ -7,9 +7,7 @@ import { SvgCheck } from '@bspk/icons/Check';
|
|
|
7
7
|
* @example
|
|
8
8
|
* import { ProgressionStepper } from '@bspk/ui/ProgressionStepper';
|
|
9
9
|
*
|
|
10
|
-
*
|
|
11
|
-
* return <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
12
|
-
* }
|
|
10
|
+
* <ProgressionStepper steps={[{ name: 'Step 1' }, { name: 'Step 2' }, { name: 'Step 3' }]} />;
|
|
13
11
|
*
|
|
14
12
|
* @name ProgressionStepper
|
|
15
13
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProgressionStepper.js","sourceRoot":"","sources":["../../../src/components/ProgressionStepper/ProgressionStepper.tsx"],"names":[],"mappings":";AAAA,OAAO,4BAA4B,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAsD7C
|
|
1
|
+
{"version":3,"file":"ProgressionStepper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mBAAmB,IAAI,OAAO;wBAAE,MAAM,GAAG,UAAU,CAAC;yBACnD,IAAI,mBAAmB,GAAG,CAAC,KAAK,OAAO;wBAAE,MAAM,GAAG,SAAS,CAAC;oBAEjE,OAAO,CACH,8BACkB,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,SAAS,iBAC1C,MAAM,eACR,OAAO,aAGlB,qDACI,4BAAgB,QAAQ,GAAG,EAC3B,8CACK,MAAM,KAAK,UAAU,CAAC,CAAC,CAAC,CACrB,KAAC,QAAQ,mBAAc,IAAI,GAAI,CAClC,CAAC,CAAC,CAAC,CACA,CAAC,OAAO,KAAK,QAAQ,IAAI,MAAM,KAAK,SAAS,CAAC,IAAI,yBAAO,OAAO,GAAQ,CAC3E,GACE,EACP,4BAAgB,OAAO,GAAG,IACvB,EACN,OAAO,KAAK,QAAQ,IAAI,CACrB,iDACI,4CAAiB,IAAI,GAAQ,EAC5B,OAAO,IAAI,+CAAoB,OAAO,GAAQ,IAC5C,CACV,KAlBI,QAAQ,KAAK,EAAE,CAmBnB,CACR,CAAC;gBACN,CAAC,CAAC,GACD,IACH,CACT,CAAC;AACN,CAAC"}
|
|
@@ -35,7 +35,7 @@ export type RadioGroupProps = Omit<FieldControlProps, 'readOnly'> & {
|
|
|
35
35
|
* import { useState } from 'react';
|
|
36
36
|
* import { RadioGroup } from '@bspk/ui/RadioGroup';
|
|
37
37
|
*
|
|
38
|
-
*
|
|
38
|
+
* () => {
|
|
39
39
|
* const [selectedOption, setSelectedOption] = useState<string>('1');
|
|
40
40
|
*
|
|
41
41
|
* return (
|
|
@@ -54,7 +54,7 @@ export type RadioGroupProps = Omit<FieldControlProps, 'readOnly'> & {
|
|
|
54
54
|
* value={selectedOption}
|
|
55
55
|
* />
|
|
56
56
|
* );
|
|
57
|
-
* }
|
|
57
|
+
* };
|
|
58
58
|
*
|
|
59
59
|
* @name RadioGroup
|
|
60
60
|
* @phase UXReview
|
|
@@ -11,7 +11,7 @@ import { RadioOption } from '../RadioOption';
|
|
|
11
11
|
* import { useState } from 'react';
|
|
12
12
|
* import { RadioGroup } from '@bspk/ui/RadioGroup';
|
|
13
13
|
*
|
|
14
|
-
*
|
|
14
|
+
* () => {
|
|
15
15
|
* const [selectedOption, setSelectedOption] = useState<string>('1');
|
|
16
16
|
*
|
|
17
17
|
* return (
|
|
@@ -30,7 +30,7 @@ import { RadioOption } from '../RadioOption';
|
|
|
30
30
|
* value={selectedOption}
|
|
31
31
|
* />
|
|
32
32
|
* );
|
|
33
|
-
* }
|
|
33
|
+
* };
|
|
34
34
|
*
|
|
35
35
|
* @name RadioGroup
|
|
36
36
|
* @phase UXReview
|
|
@@ -9,7 +9,7 @@ export type RatingProps = {
|
|
|
9
9
|
*/
|
|
10
10
|
value?: number;
|
|
11
11
|
/**
|
|
12
|
-
* If included the component is
|
|
12
|
+
* If included the component is interactive and this callback is fired when the user selects a new rating value.
|
|
13
13
|
*
|
|
14
14
|
* @param value - The new value of the rating.
|
|
15
15
|
*/
|
|
@@ -28,9 +28,7 @@ export type RatingProps = {
|
|
|
28
28
|
* @example
|
|
29
29
|
* import { Rating } from '@bspk/ui/Rating';
|
|
30
30
|
*
|
|
31
|
-
*
|
|
32
|
-
* return <Rating value={4.5} />;
|
|
33
|
-
* }
|
|
31
|
+
* <Rating value={4.5} size="large" />;
|
|
34
32
|
*
|
|
35
33
|
* @name Rating
|
|
36
34
|
* @phase UXReview
|
|
@@ -14,19 +14,21 @@ const iconWidths = {
|
|
|
14
14
|
* @example
|
|
15
15
|
* import { Rating } from '@bspk/ui/Rating';
|
|
16
16
|
*
|
|
17
|
-
*
|
|
18
|
-
* return <Rating value={4.5} />;
|
|
19
|
-
* }
|
|
17
|
+
* <Rating value={4.5} size="large" />;
|
|
20
18
|
*
|
|
21
19
|
* @name Rating
|
|
22
20
|
* @phase UXReview
|
|
23
21
|
*/
|
|
24
22
|
export function Rating({ size = 'medium', value, onChange }) {
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
if (!onChange)
|
|
24
|
+
return (_jsx("div", { "aria-label": value ? `${value} out of ${MAX_STARS} stars` : 'Rating', "data-bspk": "rating", "data-size": size, role: "img", children: Array.from({ length: MAX_STARS }, (_, index) => {
|
|
25
|
+
const fill = getFill(index + 1, value);
|
|
26
|
+
return (_jsxs("div", { "data-fill": fill, "data-star": true, role: "presentation", tabIndex: -1, children: [_jsx(SvgStarFill, { width: iconWidths[size] }), fill === 'half' && (_jsx("div", { "data-fill-half": true, children: _jsx("div", { "data-star": true, children: _jsx(SvgStarFill, { width: iconWidths[size] }) }) }))] }, index));
|
|
27
|
+
}) }));
|
|
28
|
+
return (_jsx("div", { "aria-label": value ? `${value} out of ${MAX_STARS} stars` : 'Select a star rating', "data-bspk": "rating", "data-size": size, role: "radiogroup", children: Array.from({ length: MAX_STARS }, (_, index) => {
|
|
27
29
|
const fill = getFill(index + 1, value);
|
|
28
30
|
const selected = value !== undefined && Math.floor(value) === index;
|
|
29
|
-
return (_jsxs(
|
|
31
|
+
return (_jsxs("button", { "aria-checked": selected, "aria-label": `Rate ${index + 1}`, "data-fill": fill, "data-star": true, onClick: () => onChange?.(index + 1), role: "radio", tabIndex: selected ? 0 : -1, type: "button", children: [_jsx(SvgStarFill, { width: iconWidths[size] }), fill === 'half' && (_jsx("div", { "data-fill-half": true, children: _jsx("div", { "data-star": true, children: _jsx(SvgStarFill, { width: iconWidths[size] }) }) }))] }, index));
|
|
30
32
|
}) }));
|
|
31
33
|
}
|
|
32
34
|
function getFill(num, value) {
|