@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
|
@@ -83,17 +83,7 @@ export type ButtonProps<As extends ElementType = ElementType> = CommonProps<'dis
|
|
|
83
83
|
* import { Button } from '@bspk/ui/Button';
|
|
84
84
|
* import { SvgPerson } from '@bspk/icons/Person';
|
|
85
85
|
*
|
|
86
|
-
*
|
|
87
|
-
* return (
|
|
88
|
-
* <Button
|
|
89
|
-
* label="Click Me"
|
|
90
|
-
* size="medium"
|
|
91
|
-
* variant="primary"
|
|
92
|
-
* onClick={() => console.log('Button clicked')}
|
|
93
|
-
* icon={<SvgPerson />}
|
|
94
|
-
* />
|
|
95
|
-
* );
|
|
96
|
-
* }
|
|
86
|
+
* <Button label="Click Me" size="medium" onClick={() => action('Button clicked')} icon={<SvgPerson />} />;
|
|
97
87
|
*
|
|
98
88
|
* @name Button
|
|
99
89
|
* @phase UXReview
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { SvgPerson } from '@bspk/icons/Person';
|
|
2
1
|
import { ButtonProps } from '.';
|
|
3
2
|
import { ComponentExample, Preset } from '-/utils/demo';
|
|
4
3
|
|
|
@@ -32,6 +31,6 @@ export const presets: Preset<ButtonProps>[] = [
|
|
|
32
31
|
export const ButtonExample: ComponentExample<ButtonProps> = {
|
|
33
32
|
presets,
|
|
34
33
|
variants: {
|
|
35
|
-
iconOnly:
|
|
34
|
+
iconOnly: { icon: 'Person', label: 'Person' },
|
|
36
35
|
},
|
|
37
36
|
};
|
|
@@ -35,20 +35,16 @@ export type ButtonDockProps = {
|
|
|
35
35
|
* @example
|
|
36
36
|
* import { ButtonDock } from '@bspk/ui/ButtonDock';
|
|
37
37
|
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
* }}
|
|
49
|
-
* />
|
|
50
|
-
* );
|
|
51
|
-
* }
|
|
38
|
+
* <ButtonDock
|
|
39
|
+
* primaryButton={{
|
|
40
|
+
* children: 'Send',
|
|
41
|
+
* label: 'send',
|
|
42
|
+
* }}
|
|
43
|
+
* secondaryButton={{
|
|
44
|
+
* children: 'Cancel',
|
|
45
|
+
* label: 'cancel',
|
|
46
|
+
* }}
|
|
47
|
+
* />;
|
|
52
48
|
*
|
|
53
49
|
* @name ButtonDock
|
|
54
50
|
* @phase Dev
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import './card.scss';
|
|
2
2
|
import { ReactNode } from 'react';
|
|
3
|
-
import { ElementProps } from '-/types/common';
|
|
3
|
+
import { ElementProps, SetRef } from '-/types/common';
|
|
4
4
|
|
|
5
5
|
export type CardProps = {
|
|
6
6
|
/**
|
|
@@ -15,6 +15,8 @@ export type CardProps = {
|
|
|
15
15
|
* @default elevated
|
|
16
16
|
*/
|
|
17
17
|
variant?: 'elevated' | 'outlined';
|
|
18
|
+
/** A ref to the list item div element. */
|
|
19
|
+
innerRef?: SetRef<HTMLElement>;
|
|
18
20
|
};
|
|
19
21
|
|
|
20
22
|
/**
|
|
@@ -27,21 +29,17 @@ export type CardProps = {
|
|
|
27
29
|
* @example
|
|
28
30
|
* import { Card } from '@bspk/ui/card';
|
|
29
31
|
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* <p>This is some content inside the card.</p>
|
|
35
|
-
* </Card>
|
|
36
|
-
* );
|
|
37
|
-
* }
|
|
32
|
+
* <Card variant="elevated" style={{ padding: 'var(--spacing-sizing-04)', maxWidth: '100%', width: '400px' }}>
|
|
33
|
+
* <h3>Card Title</h3>
|
|
34
|
+
* <p>This is some content inside the card.</p>
|
|
35
|
+
* </Card>;
|
|
38
36
|
*
|
|
39
37
|
* @name Card
|
|
40
38
|
* @phase UXReview
|
|
41
39
|
*/
|
|
42
|
-
export function Card({ children, variant = 'elevated', ...props }: ElementProps<CardProps, 'div'>) {
|
|
40
|
+
export function Card({ children, variant = 'elevated', innerRef, ...props }: ElementProps<CardProps, 'div'>) {
|
|
43
41
|
return (
|
|
44
|
-
<div {...props} data-bspk="card" data-variant={variant}>
|
|
42
|
+
<div {...props} data-bspk="card" data-variant={variant} ref={innerRef}>
|
|
45
43
|
{children}
|
|
46
44
|
</div>
|
|
47
45
|
);
|
|
@@ -51,19 +51,15 @@ export type CarouselProps = {
|
|
|
51
51
|
* @example
|
|
52
52
|
* import { Carousel } from '@bspk/ui/Carousel';
|
|
53
53
|
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
* <div>child 7</div>
|
|
64
|
-
* </Carousel>
|
|
65
|
-
* );
|
|
66
|
-
* }
|
|
54
|
+
* <Carousel label="Example Carousel" width="1/2">
|
|
55
|
+
* <div>child 1</div>
|
|
56
|
+
* <div>child 2</div>
|
|
57
|
+
* <div>child 3</div>
|
|
58
|
+
* <div>child 4</div>
|
|
59
|
+
* <div>child 5</div>
|
|
60
|
+
* <div>child 6</div>
|
|
61
|
+
* <div>child 7</div>
|
|
62
|
+
* </Carousel>;
|
|
67
63
|
*
|
|
68
64
|
* @name Carousel
|
|
69
65
|
* @phase UXReview
|
|
@@ -4,37 +4,13 @@ import { Button } from '-/components/Button';
|
|
|
4
4
|
import { COLOR_VARIANTS } from '-/utils/colorVariants';
|
|
5
5
|
import { ComponentExampleFn } from '-/utils/demo';
|
|
6
6
|
|
|
7
|
-
function ExampleSlide({ number, onClick }: { number: number; onClick?: (message: string) => void }) {
|
|
8
|
-
return (
|
|
9
|
-
<div
|
|
10
|
-
data-color={COLOR_VARIANTS[(number + 3) % COLOR_VARIANTS.length]}
|
|
11
|
-
style={{
|
|
12
|
-
backgroundColor: 'var(--background)',
|
|
13
|
-
color: 'var(--foreground)',
|
|
14
|
-
borderRadius: '8px',
|
|
15
|
-
minHeight: '180px',
|
|
16
|
-
padding: 20,
|
|
17
|
-
display: 'flex',
|
|
18
|
-
flexDirection: 'column',
|
|
19
|
-
alignItems: 'center',
|
|
20
|
-
justifyContent: 'center',
|
|
21
|
-
}}
|
|
22
|
-
>
|
|
23
|
-
Slide {number}
|
|
24
|
-
{onClick && (
|
|
25
|
-
<Button label="Click me" onClick={() => onClick(`Slide ${number} clicked`)} variant="tertiary" />
|
|
26
|
-
)}
|
|
27
|
-
</div>
|
|
28
|
-
);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
7
|
export const CarouselExample: ComponentExampleFn<CarouselProps & { slideCount: number }> = ({ action }) => {
|
|
32
8
|
return {
|
|
33
9
|
containerStyle: { width: '100%', padding: '16px', overflow: 'hidden' },
|
|
34
10
|
render: ({ props, Component }) => (
|
|
35
11
|
<Component {...props}>
|
|
36
12
|
{Array.from({ length: props.slideCount || 7 }, (_, i) => i + 1).map((num) => (
|
|
37
|
-
<
|
|
13
|
+
<SlidePlaceholder key={num} number={num} onClick={action} />
|
|
38
14
|
))}
|
|
39
15
|
</Component>
|
|
40
16
|
),
|
|
@@ -80,3 +56,27 @@ export const CarouselExample: ComponentExampleFn<CarouselProps & { slideCount: n
|
|
|
80
56
|
],
|
|
81
57
|
};
|
|
82
58
|
};
|
|
59
|
+
|
|
60
|
+
function SlidePlaceholder({ number, onClick }: { number: number; onClick?: (message: string) => void }) {
|
|
61
|
+
return (
|
|
62
|
+
<div
|
|
63
|
+
data-color={COLOR_VARIANTS[(number + 3) % COLOR_VARIANTS.length]}
|
|
64
|
+
style={{
|
|
65
|
+
backgroundColor: 'var(--background)',
|
|
66
|
+
color: 'var(--foreground)',
|
|
67
|
+
borderRadius: '8px',
|
|
68
|
+
minHeight: '180px',
|
|
69
|
+
padding: 20,
|
|
70
|
+
display: 'flex',
|
|
71
|
+
flexDirection: 'column',
|
|
72
|
+
alignItems: 'center',
|
|
73
|
+
justifyContent: 'center',
|
|
74
|
+
}}
|
|
75
|
+
>
|
|
76
|
+
Slide {number}
|
|
77
|
+
{onClick && (
|
|
78
|
+
<Button label="Click me" onClick={() => onClick(`Slide ${number} clicked`)} variant="tertiary" />
|
|
79
|
+
)}
|
|
80
|
+
</div>
|
|
81
|
+
);
|
|
82
|
+
}
|
|
@@ -36,11 +36,14 @@ export type CheckboxProps = Omit<FieldControlProps, 'onChange' | 'readOnly' | 'v
|
|
|
36
36
|
* @example
|
|
37
37
|
* import { Checkbox } from '@bspk/ui/Checkbox';
|
|
38
38
|
*
|
|
39
|
-
*
|
|
40
|
-
* const [checked, setChecked] =
|
|
39
|
+
* () => {
|
|
40
|
+
* const [checked, setChecked] = useState(false);
|
|
41
41
|
*
|
|
42
42
|
* return (
|
|
43
|
-
* <label
|
|
43
|
+
* <label
|
|
44
|
+
* htmlFor="sample-checkbox"
|
|
45
|
+
* style={{ display: 'flex', alignItems: 'center', gap: 'var(--spacing-sizing-02)' }}
|
|
46
|
+
* >
|
|
44
47
|
* <Checkbox
|
|
45
48
|
* aria-label="Sample"
|
|
46
49
|
* checked={checked}
|
|
@@ -52,7 +55,7 @@ export type CheckboxProps = Omit<FieldControlProps, 'onChange' | 'readOnly' | 'v
|
|
|
52
55
|
* Checkbox Label
|
|
53
56
|
* </label>
|
|
54
57
|
* );
|
|
55
|
-
* }
|
|
58
|
+
* };
|
|
56
59
|
*
|
|
57
60
|
* @element
|
|
58
61
|
*
|
|
@@ -42,8 +42,8 @@ export type CheckboxGroupProps = Omit<FieldControlProps<string[]>, 'readOnly'> &
|
|
|
42
42
|
* @example
|
|
43
43
|
* import { CheckboxGroup } from '@bspk/ui/CheckboxGroup';
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
* const [value, setValue] =
|
|
45
|
+
* () => {
|
|
46
|
+
* const [value, setValue] = useState<string[]>([]);
|
|
47
47
|
*
|
|
48
48
|
* return (
|
|
49
49
|
* <CheckboxGroup
|
|
@@ -60,7 +60,7 @@ export type CheckboxGroupProps = Omit<FieldControlProps<string[]>, 'readOnly'> &
|
|
|
60
60
|
* }}
|
|
61
61
|
* />
|
|
62
62
|
* );
|
|
63
|
-
* }
|
|
63
|
+
* };
|
|
64
64
|
*
|
|
65
65
|
* @name CheckboxGroup
|
|
66
66
|
* @phase UXReview
|
|
@@ -58,6 +58,7 @@ export const presets: Preset<CheckboxGroupProps>[] = [
|
|
|
58
58
|
export const CheckboxGroupExample: ComponentExample<CheckboxGroupProps> = {
|
|
59
59
|
presets,
|
|
60
60
|
defaultState: {
|
|
61
|
+
selectAll: true,
|
|
61
62
|
options: [
|
|
62
63
|
{ label: 'Option 1', value: 'option1', description: 'Description for option 1' },
|
|
63
64
|
{
|
|
@@ -12,8 +12,9 @@ export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProp
|
|
|
12
12
|
* @example
|
|
13
13
|
* import { CheckboxOption } from '@bspk/ui/CheckboxOption';
|
|
14
14
|
*
|
|
15
|
-
*
|
|
16
|
-
* const [checked, setChecked] =
|
|
15
|
+
* () => {
|
|
16
|
+
* const [checked, setChecked] = useState(false);
|
|
17
|
+
*
|
|
17
18
|
* return (
|
|
18
19
|
* <CheckboxOption
|
|
19
20
|
* checked={checked}
|
|
@@ -22,12 +23,11 @@ export type CheckboxOptionProps = CommonProps<'style'> & ToggleOptionControlProp
|
|
|
22
23
|
* name="example-checkbox-name"
|
|
23
24
|
* onChange={(nextChecked, event) => {
|
|
24
25
|
* setChecked(nextChecked);
|
|
25
|
-
* console.log('Checkbox changed:', nextChecked, event);
|
|
26
26
|
* }}
|
|
27
27
|
* value="example-checkbox-value"
|
|
28
28
|
* />
|
|
29
29
|
* );
|
|
30
|
-
* }
|
|
30
|
+
* };
|
|
31
31
|
*
|
|
32
32
|
* @name CheckboxOption
|
|
33
33
|
* @phase UXReview
|
|
@@ -63,13 +63,9 @@ export type ChipProps = {
|
|
|
63
63
|
* @example
|
|
64
64
|
* import { Chip } from '@bspk/ui/Chip';
|
|
65
65
|
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
* Example Chip
|
|
70
|
-
* </Chip>
|
|
71
|
-
* );
|
|
72
|
-
* }
|
|
66
|
+
* <Chip label="Label" onClick={() => sendSnackbar('Chip clicked!')}>
|
|
67
|
+
* Example Chip
|
|
68
|
+
* </Chip>;
|
|
73
69
|
*
|
|
74
70
|
* @name Chip
|
|
75
71
|
* @phase UXReview
|
|
@@ -6,6 +6,9 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
6
6
|
label: 'Basic',
|
|
7
7
|
propState: {
|
|
8
8
|
label: 'chip',
|
|
9
|
+
leadingIcon: undefined,
|
|
10
|
+
trailingIcon: undefined,
|
|
11
|
+
trailingBadge: undefined,
|
|
9
12
|
},
|
|
10
13
|
},
|
|
11
14
|
{
|
|
@@ -13,15 +16,17 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
13
16
|
propState: {
|
|
14
17
|
label: 'chip',
|
|
15
18
|
leadingIcon: 'Add',
|
|
16
|
-
trailingIcon:
|
|
19
|
+
trailingIcon: undefined,
|
|
20
|
+
trailingBadge: undefined,
|
|
17
21
|
},
|
|
18
22
|
},
|
|
19
23
|
{
|
|
20
24
|
label: 'Trailing Icon',
|
|
21
25
|
propState: {
|
|
22
26
|
label: 'chip',
|
|
23
|
-
leadingIcon:
|
|
27
|
+
leadingIcon: undefined,
|
|
24
28
|
trailingIcon: 'Add',
|
|
29
|
+
trailingBadge: undefined,
|
|
25
30
|
},
|
|
26
31
|
},
|
|
27
32
|
{
|
|
@@ -30,6 +35,7 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
30
35
|
label: 'chip',
|
|
31
36
|
leadingIcon: 'Add',
|
|
32
37
|
trailingIcon: 'Add',
|
|
38
|
+
trailingBadge: undefined,
|
|
33
39
|
},
|
|
34
40
|
},
|
|
35
41
|
{
|
|
@@ -38,6 +44,7 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
38
44
|
label: 'chip',
|
|
39
45
|
leadingIcon: 'Bumblebee',
|
|
40
46
|
trailingIcon: 'Rabbit',
|
|
47
|
+
trailingBadge: undefined,
|
|
41
48
|
},
|
|
42
49
|
},
|
|
43
50
|
{
|
|
@@ -45,7 +52,7 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
45
52
|
propState: {
|
|
46
53
|
label: 'chip',
|
|
47
54
|
leadingIcon: 'Add',
|
|
48
|
-
trailingIcon:
|
|
55
|
+
trailingIcon: undefined,
|
|
49
56
|
trailingBadge: { count: 2, size: 'x-small' as BadgeItem['size'] },
|
|
50
57
|
},
|
|
51
58
|
},
|
|
@@ -57,6 +64,48 @@ export const presets: Preset<ChipProps>[] = [
|
|
|
57
64
|
trailingBadge: { count: 2, size: 'x-small' as BadgeItem['size'] },
|
|
58
65
|
},
|
|
59
66
|
},
|
|
67
|
+
{
|
|
68
|
+
label: 'Assist Chip',
|
|
69
|
+
propState: {
|
|
70
|
+
label: 'Assist Chip',
|
|
71
|
+
leadingIcon: 'Cloud',
|
|
72
|
+
trailingIcon: undefined,
|
|
73
|
+
trailingBadge: undefined,
|
|
74
|
+
},
|
|
75
|
+
designPattern:
|
|
76
|
+
'A dynamic action element that helps trigger and perform an action for the customer. A supplement option to buttons. ',
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
label: 'Filter Chip',
|
|
80
|
+
propState: {
|
|
81
|
+
label: 'Filter Chip',
|
|
82
|
+
leadingIcon: 'Cloud',
|
|
83
|
+
trailingIcon: 'KeyboardArrowDown',
|
|
84
|
+
trailingBadge: undefined,
|
|
85
|
+
},
|
|
86
|
+
designPattern: 'Short form descriptive words that filter out content or represent active filter setting.',
|
|
87
|
+
},
|
|
88
|
+
{
|
|
89
|
+
label: 'Input Chip',
|
|
90
|
+
propState: {
|
|
91
|
+
label: 'Input Chip',
|
|
92
|
+
leadingIcon: 'Cloud',
|
|
93
|
+
trailingIcon: 'Close',
|
|
94
|
+
trailingBadge: undefined,
|
|
95
|
+
},
|
|
96
|
+
designPattern:
|
|
97
|
+
'A range of short form key words or pieces of information a customer enters within multi entry field.',
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
label: 'Suggest Chip',
|
|
101
|
+
propState: {
|
|
102
|
+
label: 'Suggest Chip',
|
|
103
|
+
leadingIcon: undefined,
|
|
104
|
+
trailingIcon: undefined,
|
|
105
|
+
trailingBadge: undefined,
|
|
106
|
+
},
|
|
107
|
+
designPattern: 'Dynamically generated options that are suggested to the customer as responses or prompts. ',
|
|
108
|
+
},
|
|
60
109
|
];
|
|
61
110
|
|
|
62
111
|
export const ChipExample: ComponentExample<ChipProps> = {
|
|
@@ -23,18 +23,29 @@ export type ChipGroupProps = {
|
|
|
23
23
|
* A component that manages the layout of a group of chips.
|
|
24
24
|
*
|
|
25
25
|
* @example
|
|
26
|
-
* import { ChipGroup } from '@bspk/ui/ChipGroup';
|
|
27
26
|
* import { Chip } from '@bspk/ui/Chip';
|
|
27
|
+
* import { ChipGroup } from '@bspk/ui/ChipGroup';
|
|
28
28
|
*
|
|
29
|
-
*
|
|
30
|
-
*
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
29
|
+
* <ChipGroup wrap={false}>
|
|
30
|
+
* <Chip
|
|
31
|
+
* label="chip 1"
|
|
32
|
+
* leadingIcon={<SvgLightbulb />}
|
|
33
|
+
* onClick={() => action('Chip clicked!')}
|
|
34
|
+
* trailingIcon={<SvgChevronRight />}
|
|
35
|
+
* />
|
|
36
|
+
* <Chip
|
|
37
|
+
* label="chip 2"
|
|
38
|
+
* leadingIcon={<SvgIcecream />}
|
|
39
|
+
* onClick={() => action('Chip clicked!')}
|
|
40
|
+
* trailingIcon={<SvgChevronRight />}
|
|
41
|
+
* />
|
|
42
|
+
* <Chip
|
|
43
|
+
* label="chip 3"
|
|
44
|
+
* leadingIcon={<SvgSignLanguage />}
|
|
45
|
+
* onClick={() => action('Chip clicked!')}
|
|
46
|
+
* trailingIcon={<SvgClose />}
|
|
47
|
+
* />
|
|
48
|
+
* </ChipGroup>;
|
|
38
49
|
*
|
|
39
50
|
* @name ChipGroup
|
|
40
51
|
* @phase UXReview
|
|
@@ -17,10 +17,10 @@ export const presets: Preset<ChipGroupProps>[] = [
|
|
|
17
17
|
];
|
|
18
18
|
|
|
19
19
|
export const ChipGroupExample: ComponentExampleFn<ChipGroupProps> = ({ action }) => ({
|
|
20
|
+
containerStyle: { width: '600px' },
|
|
20
21
|
presets,
|
|
21
22
|
render: ({ props, Component }) => {
|
|
22
23
|
const handleChipInputClick = () => action('Chip clicked!');
|
|
23
|
-
|
|
24
24
|
return (
|
|
25
25
|
<Component {...props}>
|
|
26
26
|
<Chip
|
|
@@ -40,22 +40,23 @@ export type DatePickerProps = FieldControlProps<Date | undefined> &
|
|
|
40
40
|
* import { Field, FieldLabel } from '@bspk/ui/Field';
|
|
41
41
|
* import { useState } from 'react';
|
|
42
42
|
*
|
|
43
|
-
*
|
|
44
|
-
* const [date, setDate] = useState<Date | undefined>(new Date());
|
|
45
|
-
* return <DatePicker aria-label="Date" name="date2" value={date} onChange={setDate} />;
|
|
46
|
-
* }
|
|
47
|
-
*
|
|
48
|
-
* function ExampleWithField() {
|
|
43
|
+
* () => {
|
|
49
44
|
* const [date, setDate] = useState<Date | undefined>(new Date());
|
|
50
45
|
*
|
|
51
46
|
* return (
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* <DatePicker name="
|
|
55
|
-
* <
|
|
56
|
-
*
|
|
47
|
+
* <>
|
|
48
|
+
* // standalone date picker example
|
|
49
|
+
* <DatePicker aria-label="Date" name="date2" value={date} onChange={setDate} />
|
|
50
|
+
* <br />
|
|
51
|
+
* // date picker used within a field
|
|
52
|
+
* <Field>
|
|
53
|
+
* <FieldLabel>Date</FieldLabel>
|
|
54
|
+
* <DatePicker name="date1" value={date} onChange={setDate} />
|
|
55
|
+
* <FieldDescription>The date picker allows you to select a date.</FieldDescription>
|
|
56
|
+
* </Field>
|
|
57
|
+
* </>
|
|
57
58
|
* );
|
|
58
|
-
* }
|
|
59
|
+
* };
|
|
59
60
|
*
|
|
60
61
|
* @name DatePicker
|
|
61
62
|
* @phase UXReview
|
|
@@ -57,24 +57,29 @@ export type DialogProps = CommonProps<'id' | 'owner'> &
|
|
|
57
57
|
* Dialogs display important information that users need to acknowledge. They appear over the interface and block
|
|
58
58
|
* further interactions until an action is selected.
|
|
59
59
|
*
|
|
60
|
+
* This is a low-level component that provides the container and functionality for dialogs. You will typically want to
|
|
61
|
+
* use a higher-level component that provides a consistent UI and behavior for dialogs such as Modal.
|
|
62
|
+
*
|
|
60
63
|
* @example
|
|
61
64
|
* import { Dialog } from '@bspk/ui/Dialog';
|
|
62
65
|
* import { Button } from '@bspk/ui/Button';
|
|
63
66
|
*
|
|
64
|
-
*
|
|
65
|
-
* const [open, setOpen] =
|
|
67
|
+
* () => {
|
|
68
|
+
* const [open, setOpen] = useState(false);
|
|
66
69
|
*
|
|
67
70
|
* return (
|
|
68
71
|
* <>
|
|
69
72
|
* <Button label="Open Dialog" onClick={() => setOpen(true)} />
|
|
70
73
|
* <Dialog open={open} onClose={() => setOpen(false)}>
|
|
71
|
-
* <
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
+
* <div style={{ padding: 'var(--spacing-sizing-04)' }}>
|
|
75
|
+
* <h1>Dialog Title</h1>
|
|
76
|
+
* <p>This is the content of the dialog.</p>
|
|
77
|
+
* <Button label="Cancel" variant="secondary" onClick={() => setOpen(false)} />
|
|
78
|
+
* </div>
|
|
74
79
|
* </Dialog>
|
|
75
80
|
* </>
|
|
76
81
|
* );
|
|
77
|
-
* }
|
|
82
|
+
* };
|
|
78
83
|
*
|
|
79
84
|
* @name Dialog
|
|
80
85
|
* @phase Utility
|
|
@@ -46,15 +46,11 @@ const insetToVariable = (insetProp: number | string) => {
|
|
|
46
46
|
* @example
|
|
47
47
|
* import { Divider } from '@bspk/ui/Divider';
|
|
48
48
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
51
|
-
*
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
* <p>Content below the divider</p>
|
|
55
|
-
* </div>
|
|
56
|
-
* );
|
|
57
|
-
* }
|
|
49
|
+
* <div>
|
|
50
|
+
* <p>Content above the divider</p>
|
|
51
|
+
* <Divider orientation="horizontal" />
|
|
52
|
+
* <p>Content below the divider</p>
|
|
53
|
+
* </div>;
|
|
58
54
|
*
|
|
59
55
|
* @name Divider
|
|
60
56
|
* @phase UXReview
|
|
@@ -26,5 +26,22 @@ export const DividerExample: ComponentExample<DividerProps> = {
|
|
|
26
26
|
</div>
|
|
27
27
|
);
|
|
28
28
|
},
|
|
29
|
-
presets
|
|
29
|
+
presets: [
|
|
30
|
+
{
|
|
31
|
+
label: 'Divider - Horizontal',
|
|
32
|
+
designPattern:
|
|
33
|
+
'Horizontal thin line that separates grouped content in a list or other containers with the option to include a section/group label.',
|
|
34
|
+
propState: {
|
|
35
|
+
orientation: 'horizontal',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
label: 'Divider - Vertical',
|
|
40
|
+
designPattern:
|
|
41
|
+
'Vertical thin line that separates grouped content or other visual elements within a container.',
|
|
42
|
+
propState: {
|
|
43
|
+
orientation: 'vertical',
|
|
44
|
+
},
|
|
45
|
+
},
|
|
46
|
+
],
|
|
30
47
|
};
|
|
@@ -52,8 +52,8 @@ export type DrawerProps = Pick<DialogProps, 'container' | 'disableFocusTrap' | '
|
|
|
52
52
|
* import { Button } from '@bspk/ui/Button';
|
|
53
53
|
* import { Drawer } from '@bspk/ui/Drawer';
|
|
54
54
|
*
|
|
55
|
-
*
|
|
56
|
-
* const [open, setOpen] =
|
|
55
|
+
* () => {
|
|
56
|
+
* const [open, setOpen] = useState(false);
|
|
57
57
|
*
|
|
58
58
|
* return (
|
|
59
59
|
* <>
|
|
@@ -71,12 +71,11 @@ export type DrawerProps = Pick<DialogProps, 'container' | 'disableFocusTrap' | '
|
|
|
71
71
|
* </Drawer>
|
|
72
72
|
* </>
|
|
73
73
|
* );
|
|
74
|
-
* }
|
|
74
|
+
* };
|
|
75
75
|
*
|
|
76
76
|
* @name Drawer
|
|
77
77
|
* @phase UXReview
|
|
78
78
|
*/
|
|
79
|
-
|
|
80
79
|
export function Drawer({
|
|
81
80
|
header,
|
|
82
81
|
children,
|
|
@@ -41,13 +41,9 @@ export type EmptyStateProps = {
|
|
|
41
41
|
* @example
|
|
42
42
|
* import { EmptyState } from '@bspk/ui/EmptyState';
|
|
43
43
|
*
|
|
44
|
-
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
* Example EmptyState
|
|
48
|
-
* </EmptyState>
|
|
49
|
-
* );
|
|
50
|
-
* }
|
|
44
|
+
* <EmptyState body="Example body" header="Example header">
|
|
45
|
+
* Example EmptyState
|
|
46
|
+
* </EmptyState>;
|
|
51
47
|
*
|
|
52
48
|
* @name EmptyState
|
|
53
49
|
* @phase UXReview
|