@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,52 +1,5 @@
|
|
|
1
|
-
[data-bspk=toggle-option] {
|
|
2
|
-
|
|
3
|
-
width: 100%;
|
|
4
|
-
grid-template-columns: auto 1fr;
|
|
5
|
-
grid-column-gap: var(--spacing-sizing-02);
|
|
6
|
-
user-select: none;
|
|
7
|
-
background: unset;
|
|
8
|
-
border: unset;
|
|
9
|
-
cursor: pointer;
|
|
10
|
-
min-height: var(--spacing-sizing-08);
|
|
11
|
-
max-width: 100%;
|
|
12
|
-
padding: var(--spacing-sizing-01);
|
|
13
|
-
}
|
|
14
|
-
[data-bspk=toggle-option]:has([data-description]) {
|
|
15
|
-
align-items: unset;
|
|
16
|
-
}
|
|
17
|
-
@media (any-pointer: coarse) {
|
|
18
|
-
[data-bspk=toggle-option] {
|
|
19
|
-
min-height: var(--spacing-sizing-12);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
[data-bspk=toggle-option] [data-control],
|
|
23
|
-
[data-bspk=toggle-option] [data-label],
|
|
24
|
-
[data-bspk=toggle-option] [data-description] {
|
|
25
|
-
display: flex;
|
|
26
|
-
flex-direction: row;
|
|
27
|
-
align-items: center;
|
|
28
|
-
justify-content: start;
|
|
29
|
-
}
|
|
30
|
-
[data-bspk=toggle-option] [data-label] {
|
|
31
|
-
color: var(--foreground-neutral-on-surface);
|
|
32
|
-
font: var(--labels-base);
|
|
33
|
-
}
|
|
34
|
-
[data-bspk=toggle-option] [data-description] {
|
|
35
|
-
grid-column-start: 2;
|
|
36
|
-
font: var(--body-small);
|
|
37
|
-
color: var(--foreground-neutral-on-surface-variant-01);
|
|
38
|
-
}
|
|
39
|
-
[data-pseudo=focus] [data-bspk=toggle-option]:not([aria-disabled]), [data-bspk=toggle-option]:not([aria-disabled]):focus-visible, [data-bspk=toggle-option]:not([aria-disabled]):has(*:focus-visible) {
|
|
40
|
-
outline: var(--stroke-neutral-focus) 2px solid;
|
|
41
|
-
}
|
|
42
|
-
[data-bspk=toggle-option][aria-disabled] {
|
|
43
|
-
cursor: not-allowed;
|
|
44
|
-
}
|
|
45
|
-
[data-bspk=toggle-option][aria-disabled] [data-label] {
|
|
46
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
47
|
-
}
|
|
48
|
-
[data-bspk=toggle-option][aria-disabled] [data-description] {
|
|
49
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
1
|
+
[data-bspk-owner=toggle-option] {
|
|
2
|
+
align-items: start;
|
|
50
3
|
}
|
|
51
4
|
|
|
52
5
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,55 +1,8 @@
|
|
|
1
1
|
/** * This file is generated by the build script.
|
|
2
2
|
* Do not edit this file directly. */
|
|
3
3
|
const style = document.createElement('style');
|
|
4
|
-
style.appendChild(document.createTextNode(`[data-bspk=toggle-option] {
|
|
5
|
-
|
|
6
|
-
width: 100%;
|
|
7
|
-
grid-template-columns: auto 1fr;
|
|
8
|
-
grid-column-gap: var(--spacing-sizing-02);
|
|
9
|
-
user-select: none;
|
|
10
|
-
background: unset;
|
|
11
|
-
border: unset;
|
|
12
|
-
cursor: pointer;
|
|
13
|
-
min-height: var(--spacing-sizing-08);
|
|
14
|
-
max-width: 100%;
|
|
15
|
-
padding: var(--spacing-sizing-01);
|
|
16
|
-
}
|
|
17
|
-
[data-bspk=toggle-option]:has([data-description]) {
|
|
18
|
-
align-items: unset;
|
|
19
|
-
}
|
|
20
|
-
@media (any-pointer: coarse) {
|
|
21
|
-
[data-bspk=toggle-option] {
|
|
22
|
-
min-height: var(--spacing-sizing-12);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
[data-bspk=toggle-option] [data-control],
|
|
26
|
-
[data-bspk=toggle-option] [data-label],
|
|
27
|
-
[data-bspk=toggle-option] [data-description] {
|
|
28
|
-
display: flex;
|
|
29
|
-
flex-direction: row;
|
|
30
|
-
align-items: center;
|
|
31
|
-
justify-content: start;
|
|
32
|
-
}
|
|
33
|
-
[data-bspk=toggle-option] [data-label] {
|
|
34
|
-
color: var(--foreground-neutral-on-surface);
|
|
35
|
-
font: var(--labels-base);
|
|
36
|
-
}
|
|
37
|
-
[data-bspk=toggle-option] [data-description] {
|
|
38
|
-
grid-column-start: 2;
|
|
39
|
-
font: var(--body-small);
|
|
40
|
-
color: var(--foreground-neutral-on-surface-variant-01);
|
|
41
|
-
}
|
|
42
|
-
[data-pseudo=focus] [data-bspk=toggle-option]:not([aria-disabled]), [data-bspk=toggle-option]:not([aria-disabled]):focus-visible, [data-bspk=toggle-option]:not([aria-disabled]):has(*:focus-visible) {
|
|
43
|
-
outline: var(--stroke-neutral-focus) 2px solid;
|
|
44
|
-
}
|
|
45
|
-
[data-bspk=toggle-option][aria-disabled] {
|
|
46
|
-
cursor: not-allowed;
|
|
47
|
-
}
|
|
48
|
-
[data-bspk=toggle-option][aria-disabled] [data-label] {
|
|
49
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
50
|
-
}
|
|
51
|
-
[data-bspk=toggle-option][aria-disabled] [data-description] {
|
|
52
|
-
color: var(--foreground-neutral-disabled-on-surface);
|
|
4
|
+
style.appendChild(document.createTextNode(`[data-bspk-owner=toggle-option] {
|
|
5
|
+
align-items: start;
|
|
53
6
|
}
|
|
54
7
|
|
|
55
8
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -39,13 +39,9 @@ export type TooltipProps = {
|
|
|
39
39
|
* import { Tooltip } from '@bspk/ui/Tooltip';
|
|
40
40
|
* import { Button } from '@bspk/ui/Button';
|
|
41
41
|
*
|
|
42
|
-
*
|
|
43
|
-
*
|
|
44
|
-
*
|
|
45
|
-
* {(triggerProps) => <Button {...triggerProps}>Click me</Button>}
|
|
46
|
-
* </Tooltip>
|
|
47
|
-
* );
|
|
48
|
-
* }
|
|
42
|
+
* <Tooltip label="I explain what this button does" placement="top">
|
|
43
|
+
* {(triggerProps) => <Button {...triggerProps}>Click me</Button>}
|
|
44
|
+
* </Tooltip>;
|
|
49
45
|
*
|
|
50
46
|
* @name Tooltip
|
|
51
47
|
* @phase UXReview
|
|
@@ -11,13 +11,9 @@ import { useId } from '../../hooks/useId';
|
|
|
11
11
|
* import { Tooltip } from '@bspk/ui/Tooltip';
|
|
12
12
|
* import { Button } from '@bspk/ui/Button';
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
* {(triggerProps) => <Button {...triggerProps}>Click me</Button>}
|
|
18
|
-
* </Tooltip>
|
|
19
|
-
* );
|
|
20
|
-
* }
|
|
14
|
+
* <Tooltip label="I explain what this button does" placement="top">
|
|
15
|
+
* {(triggerProps) => <Button {...triggerProps}>Click me</Button>}
|
|
16
|
+
* </Tooltip>;
|
|
21
17
|
*
|
|
22
18
|
* @name Tooltip
|
|
23
19
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAgB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAa,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAmCtC
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sourceRoot":"","sources":["../../../src/components/Tooltip/Tooltip.tsx"],"names":[],"mappings":";AAAA,OAAO,gBAAgB,CAAC;AACxB,OAAO,EAAgB,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAa,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAmCtC;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,OAAO,CAAC,EAAE,SAAS,GAAG,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,GAAG,KAAK,EAAE,QAAQ,GAAG,IAAI,EAAgB;IAC3G,MAAM,EAAE,GAAG,KAAK,EAAE,CAAC;IACnB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,MAAM,QAAQ,GAAG,MAAM,CAAqB,IAAI,CAAC,CAAC;IAElD,MAAM,EAAE,cAAc,EAAE,cAAc,EAAE,QAAQ,EAAE,GAAG,WAAW,CAAC;QAC7D,SAAS;QACT,QAAQ,EAAE,OAAO;QACjB,aAAa,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAC/B,QAAQ;QACR,IAAI,EAAE,CAAC,IAAI;QACX,QAAQ,EAAE,KAAK;KAClB,CAAC,CAAC;IAEH,IAAI,QAAQ;QAAE,OAAO,QAAQ,CAAC,EAAE,CAAC,CAAC;IAElC,OAAO,CACH,8BACK,QAAQ,CAAC;gBACN,WAAW,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;gBAChC,YAAY,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;gBAClC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;gBAC5B,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;gBAC5B,iBAAiB,EAAE,EAAE;aACxB,CAAC,EACD,KAAK,IAAI,CACN,KAAC,MAAM,cACH,4BACc,SAAS,oBACH,cAAc,EAAE,MAAM,EAAE,SAAS,EACjD,EAAE,EAAE,EAAE,EACN,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;wBACV,QAAQ,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC;wBAC3B,QAAQ,CAAC,YAAY,CAAC,QAAQ,CAAC,aAAa,CAAc,qBAAqB,EAAE,IAAI,CAAC,CAAC,CAAC;oBAC5F,CAAC,EACD,IAAI,EAAC,SAAS,EACd,KAAK,EAAE,cAAc,aAErB,4CAAiB,KAAK,GAAQ,EAC9B,wDAGI,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE;gCACV,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;4BAC5B,CAAC,EACD,KAAK,EAAE;gCACH,MAAM,EAAE,gCAAgC;gCACxC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;gCACzB,IAAI,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;gCAC3E,GAAG,EAAE,cAAc,CAAC,KAAK,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,GAAG,cAAc,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE;6BAC7E,GACH,IACA,GACD,CACZ,IACF,CACN,CAAC;AACN,CAAC"}
|
|
@@ -1,8 +1,28 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { Button } from '../Button';
|
|
3
2
|
export const TooltipExample = {
|
|
4
|
-
|
|
5
|
-
|
|
3
|
+
defaultState: {
|
|
4
|
+
children: (triggerProps) => _jsx("span", { ...triggerProps, children: "Hover me" }),
|
|
5
|
+
},
|
|
6
|
+
presets: [
|
|
7
|
+
{
|
|
8
|
+
label: 'Long Label Tooltip',
|
|
9
|
+
propState: {
|
|
10
|
+
label: 'This is a longer tooltip label to demonstrate how the tooltip handles more content.',
|
|
11
|
+
placement: 'top',
|
|
12
|
+
children: (triggerProps) => _jsx("span", { ...triggerProps, children: "Long Tooltip Label" }),
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
label: 'No Label',
|
|
17
|
+
propState: {
|
|
18
|
+
label: '',
|
|
19
|
+
placement: 'top',
|
|
20
|
+
children: (triggerProps) => _jsx("span", { ...triggerProps, children: "No Label" }),
|
|
21
|
+
},
|
|
22
|
+
},
|
|
23
|
+
],
|
|
24
|
+
render: ({ props, Component }) => {
|
|
25
|
+
return _jsx(Component, { ...props, children: props.children || (() => _jsx("span", { children: "No Hover" })) });
|
|
6
26
|
},
|
|
7
27
|
};
|
|
8
28
|
//# sourceMappingURL=TooltipExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TooltipExample.js","sourceRoot":"","sources":["../../../src/components/Tooltip/TooltipExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"TooltipExample.js","sourceRoot":"","sources":["../../../src/components/Tooltip/TooltipExample.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,cAAc,GAAmC;IAC1D,YAAY,EAAE;QACV,QAAQ,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,kBAAU,YAAY,yBAAiB;KACtE;IACD,OAAO,EAAE;QACL;YACI,KAAK,EAAE,oBAAoB;YAC3B,SAAS,EAAE;gBACP,KAAK,EAAE,qFAAqF;gBAC5F,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,kBAAU,YAAY,mCAA2B;aAChF;SACJ;QACD;YACI,KAAK,EAAE,UAAU;YACjB,SAAS,EAAE;gBACP,KAAK,EAAE,EAAE;gBACT,SAAS,EAAE,KAAK;gBAChB,QAAQ,EAAE,CAAC,YAAY,EAAE,EAAE,CAAC,kBAAU,YAAY,yBAAiB;aACtE;SACJ;KACJ;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE;QAC7B,OAAO,KAAC,SAAS,OAAK,KAAK,YAAG,KAAK,CAAC,QAAQ,IAAI,CAAC,GAAG,EAAE,CAAC,sCAAqB,CAAC,GAAa,CAAC;IAC/F,CAAC;CACJ,CAAC"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import './truncated.css.js';
|
|
3
2
|
import { Tooltip } from '../Tooltip';
|
|
4
3
|
import { useTruncatedText } from '../../hooks/useTruncatedText';
|
|
5
4
|
/**
|
|
@@ -10,7 +9,7 @@ import { useTruncatedText } from '../../hooks/useTruncatedText';
|
|
|
10
9
|
*/
|
|
11
10
|
export function Truncated({ children, label, ...props }) {
|
|
12
11
|
const { setElement, isTruncated } = useTruncatedText();
|
|
13
|
-
const span = (triggerProps) => (_jsx("span", { ...props, "data-
|
|
12
|
+
const span = (triggerProps) => (_jsx("span", { ...props, "data-truncated": true, ref: (node) => setElement(node), ...triggerProps, role: isTruncated ? 'note' : props.role, children: children }));
|
|
14
13
|
return isTruncated ? _jsx(Tooltip, { label: label || children, children: span }) : span({});
|
|
15
14
|
}
|
|
16
15
|
//# sourceMappingURL=Truncated.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Truncated.js","sourceRoot":"","sources":["../../../src/components/Truncated/Truncated.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"Truncated.js","sourceRoot":"","sources":["../../../src/components/Truncated/Truncated.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AA4B5D;;;;;GAKG;AACH,MAAM,UAAU,SAAS,CAAuC,EAC5D,QAAQ,EACR,KAAK,EACL,GAAG,KAAK,EACmD;IAC3D,MAAM,EAAE,UAAU,EAAE,WAAW,EAAE,GAAG,gBAAgB,EAAE,CAAC;IAEvD,MAAM,IAAI,GAAG,CAAC,YAAiC,EAAE,EAAE,CAAC,CAChD,kBACQ,KAAK,0BAET,GAAG,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,CAAC,KAC3B,YAAY,EAChB,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,IAAI,YAEtC,QAAQ,GACN,CACV,CAAC;IAEF,OAAO,WAAW,CAAC,CAAC,CAAC,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,IAAI,QAAQ,YAAG,IAAI,GAAW,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AACxF,CAAC"}
|
|
@@ -45,9 +45,7 @@ export type TxtProps<As extends ElementType = ElementType> = {
|
|
|
45
45
|
* @example
|
|
46
46
|
* import { Txt } from '@bspk/ui/Txt';
|
|
47
47
|
*
|
|
48
|
-
*
|
|
49
|
-
* return <Txt>Example Txt</Txt>;
|
|
50
|
-
* }
|
|
48
|
+
* <Txt>Example Txt</Txt>;
|
|
51
49
|
*
|
|
52
50
|
* @name Txt
|
|
53
51
|
* @phase UXReview
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Txt.js","sourceRoot":"","sources":["../../../src/components/Txt/Txt.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AA2CzD
|
|
1
|
+
{"version":3,"file":"Txt.js","sourceRoot":"","sources":["../../../src/components/Txt/Txt.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AA2CzD;;;;;;;;;;GAUG;AACH,MAAM,UAAU,GAAG,CAAuC,EACtD,QAAQ,EACR,EAAE,EACF,OAAO,GAAG,WAAW,EACrB,KAAK,EAAE,SAAS,EAChB,aAAa,GAAG,CAAC,EACjB,OAAO,EACP,GAAG,cAAc,EACY;IAC7B,MAAM,OAAO,GAAG,QAAQ,EAAE,QAAQ,EAAE,CAAC;IAErC,IAAI,CAAC,OAAO;QAAE,OAAO,aAAa,CAAC,CAAC,CAAC,KAAC,YAAY,IAAC,KAAK,EAAE,aAAa,EAAE,OAAO,EAAE,OAAO,GAAI,CAAC,CAAC,CAAC,IAAI,CAAC;IAErG,MAAM,EAAE,GAAgB,EAAE,IAAI,MAAM,CAAC;IAErC,OAAO,CACH,KAAC,EAAE,OACK,cAAc,eACR,KAAK,EACf,KAAK,EAAE;YACH,GAAG,SAAS;YACZ,IAAI,EAAE,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS,OAAO,GAAG;SAClD,YAEA,OAAO,GACP,CACR,CAAC;AACN,CAAC"}
|
|
@@ -2,8 +2,9 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { useEventListener } from '../../hooks/useAddEventListener';
|
|
4
4
|
import { useTimeout } from '../../hooks/useTimeout';
|
|
5
|
+
const CUSTOM_EVENT_NAME = 'bspk-aria-live';
|
|
5
6
|
export function sendAriaLiveMessage(message, live = 'polite') {
|
|
6
|
-
document.dispatchEvent(new CustomEvent(
|
|
7
|
+
document.dispatchEvent(new CustomEvent(CUSTOM_EVENT_NAME, { detail: { message, live } }));
|
|
7
8
|
}
|
|
8
9
|
/**
|
|
9
10
|
* AriaLiveMessageHandler is a single use component that listens for aria-live messages and displays them to the user.
|
|
@@ -19,7 +20,7 @@ export function sendAriaLiveMessage(message, live = 'polite') {
|
|
|
19
20
|
export function AriaLiveMessageHandler() {
|
|
20
21
|
const [ariaLiveMessage, setAriaLiveMessage] = useState(undefined);
|
|
21
22
|
const timeout = useTimeout();
|
|
22
|
-
useEventListener(
|
|
23
|
+
useEventListener(CUSTOM_EVENT_NAME, (event) => {
|
|
23
24
|
const { message, live } = event.detail;
|
|
24
25
|
// Clear any existing message to ensure that screen readers read the new message
|
|
25
26
|
setAriaLiveMessage(undefined);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AriaLiveMessageHandler.js","sourceRoot":"","sources":["../../../src/components/UIProvider/AriaLiveMessageHandler.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAA+B,QAAQ;IACxF,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,
|
|
1
|
+
{"version":3,"file":"AriaLiveMessageHandler.js","sourceRoot":"","sources":["../../../src/components/UIProvider/AriaLiveMessageHandler.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGhD,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAE3C,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAA+B,QAAQ;IACxF,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAC,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC;AAC9F,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,sBAAsB;IAClC,MAAM,CAAC,eAAe,EAAE,kBAAkB,CAAC,GAAG,QAAQ,CAA8B,SAAS,CAAC,CAAC;IAE/F,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAE7B,gBAAgB,CACZ,iBAAiB,EACjB,CAAC,KAAkB,EAAE,EAAE;QACnB,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC,MAAM,CAAC;QACvC,gFAAgF;QAChF,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC9B,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE,CAAC,kBAAkB,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,IAAI,QAAQ,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC;IACnF,CAAC,EACD,QAAQ,CACX,CAAC;IAEF,OAAO,CACH,eAAe,IAAI,CACf,2BAAgB,eAAe,EAAE,IAAI,IAAI,QAAQ,wBAAe,IAAI,EAAC,OAAO,YACvE,eAAe,EAAE,OAAO,GACvB,CACT,CACJ,CAAC;AACN,CAAC"}
|
|
@@ -15,7 +15,6 @@ export type UIProviderProps = {
|
|
|
15
15
|
* This provider should wrap the root of your application to ensure that all components have access to the UI context.
|
|
16
16
|
*
|
|
17
17
|
* @name UIProvider
|
|
18
|
-
*
|
|
19
18
|
* @phase Utility
|
|
20
19
|
*/
|
|
21
20
|
export declare function UIProvider({ children }: UIProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -13,7 +13,6 @@ import { UIContext } from '../../utils/uiContext';
|
|
|
13
13
|
* This provider should wrap the root of your application to ensure that all components have access to the UI context.
|
|
14
14
|
*
|
|
15
15
|
* @name UIProvider
|
|
16
|
-
*
|
|
17
16
|
* @phase Utility
|
|
18
17
|
*/
|
|
19
18
|
export function UIProvider({ children }) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIProvider.js","sourceRoot":"","sources":["../../../src/components/UIProvider/UIProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAW1D
|
|
1
|
+
{"version":3,"file":"UIProvider.js","sourceRoot":"","sources":["../../../src/components/UIProvider/UIProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAa,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AACvF,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AAClE,OAAO,EAAE,SAAS,EAAc,MAAM,mBAAmB,CAAC;AAW1D;;;;;;;;;GASG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAmB;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAa,OAAO,CAAC,CAAC;IACxD,uFAAuF;IAEvF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,gBAAgB,CAAC,GAAG,EAAE;QACxD,OAAO,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC;IACjE,CAAC,EAAE,GAAG,CAAC,CAAC;IAER,mBAAmB,CAAC,GAAG,EAAE;QACrB,QAAQ,CAAC,eAAe,CAAC,OAAO,CAAC,KAAK,GAAG,KAAK,CAAC;QAC/C,QAAQ,CAAC,eAAe,CAAC,KAAK,CAAC,WAAW,CACtC,mBAAmB,EACnB,GAAG,MAAM,CAAC,UAAU,GAAG,QAAQ,CAAC,eAAe,CAAC,WAAW,IAAI,CAClE,CAAC;IACN,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IAEZ,gBAAgB,CAAC,QAAQ,EAAE,GAAG,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC;IAEpE,OAAO,CACH,MAAC,SAAS,CAAC,QAAQ,yBACG,aAAa,EAC/B,KAAK,EAAE;YACH,KAAK;YACL,QAAQ;YACR,QAAQ,EAAE,WAAW,GAAG,GAAG;YAC3B,QAAQ,EAAE,WAAW,GAAG,GAAG,IAAI,WAAW,GAAG,IAAI;YACjD,SAAS,EAAE,WAAW,IAAI,IAAI;YAC9B,mBAAmB;SACtB,aAEA,QAAQ,EACT,KAAC,sBAAsB,KAAG,IACT,CACxB,CAAC;AACN,CAAC"}
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
export declare function useEventListener<KW extends keyof WindowEventMap, KH extends keyof HTMLElementEventMap & keyof SVGElementEventMap, KM extends keyof MediaQueryListEventMap, T extends Document | HTMLElement | MediaQueryList | SVGAElement | Window = HTMLElement>(eventName: CustomEventName | KH | KM | KW, handler: (event: Event | HTMLElementEventMap[KH] | MediaQueryListEventMap[KM] | SVGElementEventMap[KH] | WindowEventMap[KW]) => void, element?: T, disabled?: boolean, options?: AddEventListenerOptions | boolean): void;
|
|
1
|
+
export declare function useEventListener<KW extends keyof WindowEventMap, KH extends keyof HTMLElementEventMap & keyof SVGElementEventMap, KM extends keyof MediaQueryListEventMap, T extends Document | HTMLElement | MediaQueryList | SVGAElement | Window = HTMLElement>(eventName: KH | KM | KW | string, handler: (event: Event | HTMLElementEventMap[KH] | MediaQueryListEventMap[KM] | SVGElementEventMap[KH] | WindowEventMap[KW]) => void, element?: T, disabled?: boolean, options?: AddEventListenerOptions | boolean): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useAddEventListener.js","sourceRoot":"","sources":["../../src/hooks/useAddEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"useAddEventListener.js","sourceRoot":"","sources":["../../src/hooks/useAddEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,gBAAgB,CAM5B,SAAgC,EAChC,OAOS,EACT,OAAW,EACX,QAAkB,EAClB,OAA2C;IAE3C,mCAAmC;IACnC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAErC,mBAAmB,CAAC,GAAG,EAAE;QACrB,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IACnC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,mBAAmB,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ;YAAE,OAAO;QAErB,8BAA8B;QAC9B,MAAM,aAAa,GAAe,OAAO,IAAI,MAAM,CAAC;QAEpD,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,gBAAgB,CAAC;YAAE,OAAO;QAE/D,kEAAkE;QAClE,MAAM,QAAQ,GAAmB,CAAC,KAAK,EAAE,EAAE;YACvC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAE7D,mCAAmC;QACnC,OAAO,GAAG,EAAE;YACR,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -1,16 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
1
|
+
export type LongPressProps = {
|
|
2
|
+
/** The callback to be invoked on long press. If false is returned, the repeating will stop. */
|
|
3
|
+
callback: () => boolean;
|
|
4
|
+
/**
|
|
5
|
+
* The initial delay (in ms) before repeating starts. Default is 750ms.
|
|
6
|
+
*
|
|
7
|
+
* @default 750
|
|
8
|
+
*/
|
|
9
|
+
delay?: number;
|
|
10
|
+
/**
|
|
11
|
+
* The amount (in percent) to decrement the delay after each repeat. Default is 15%.
|
|
12
|
+
*
|
|
13
|
+
* @default 15
|
|
14
|
+
*/
|
|
15
|
+
delayDecrement?: number;
|
|
16
|
+
/**
|
|
17
|
+
* The minimum delay (in ms) between repeats. Default is 100ms.
|
|
18
|
+
*
|
|
19
|
+
* @default 100
|
|
20
|
+
*/
|
|
21
|
+
delayMin?: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* A hook that provides long press functionality. The provided callback will be invoked once immediately on press, and
|
|
25
|
+
* then repeatedly after a delay, with the delay decreasing by a specified amount after each repeat.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useLongPress({ callback, delay: initialDelay, delayDecrement, delayMin, }: LongPressProps): {
|
|
28
|
+
onPointerDown: () => void;
|
|
29
|
+
onPointerLeave: () => void;
|
|
30
|
+
onPointerUp: () => void;
|
|
15
31
|
};
|
|
16
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,50 +1,34 @@
|
|
|
1
|
-
import { useRef
|
|
1
|
+
import { useRef } from 'react';
|
|
2
2
|
import { useTimeout } from './useTimeout';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
element.getAttribute('disabled') === 'true' ||
|
|
9
|
-
element.getAttribute('aria-disabled') === 'true' ||
|
|
10
|
-
element.getAttribute('data-disabled') === 'true' ||
|
|
11
|
-
!element.isConnected ||
|
|
12
|
-
!element.offsetParent;
|
|
13
|
-
export function useLongPress(callback, disabled) {
|
|
3
|
+
/**
|
|
4
|
+
* A hook that provides long press functionality. The provided callback will be invoked once immediately on press, and
|
|
5
|
+
* then repeatedly after a delay, with the delay decreasing by a specified amount after each repeat.
|
|
6
|
+
*/
|
|
7
|
+
export function useLongPress({ callback, delay: initialDelay = 750, delayDecrement = 15, delayMin = 100, }) {
|
|
14
8
|
const timeout = useTimeout();
|
|
15
|
-
const
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
9
|
+
const isPressing = useRef(false);
|
|
10
|
+
const delay = useRef(initialDelay);
|
|
11
|
+
const setPressing = (pressing) => {
|
|
12
|
+
isPressing.current = pressing;
|
|
13
|
+
if (pressing) {
|
|
14
|
+
if (!callback())
|
|
15
|
+
return setPressing(false);
|
|
16
|
+
timeout.set(() => {
|
|
17
|
+
if (!isPressing.current)
|
|
18
|
+
return setPressing(false);
|
|
19
|
+
const decrementMs = (delay.current * delayDecrement) / 100;
|
|
20
|
+
delay.current = delay.current <= delayMin ? delayMin : delay.current - decrementMs;
|
|
21
|
+
setPressing(true);
|
|
22
|
+
}, delay.current);
|
|
26
23
|
return;
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
intervalRef.current = intervalRef.current * INTERVAL_DECREASE_FACTOR;
|
|
31
|
-
timeout.set(run, intervalRef.current);
|
|
24
|
+
}
|
|
25
|
+
delay.current = initialDelay;
|
|
26
|
+
timeout.clear();
|
|
32
27
|
};
|
|
33
28
|
return {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
callback();
|
|
38
|
-
timeout.set(run, intervalRef.current);
|
|
39
|
-
},
|
|
40
|
-
onMouseUp: () => {
|
|
41
|
-
timeout.clear();
|
|
42
|
-
},
|
|
43
|
-
onMouseLeave: () => {
|
|
44
|
-
timeout.clear();
|
|
45
|
-
},
|
|
46
|
-
setTriggerElement,
|
|
29
|
+
onPointerDown: () => setPressing(true),
|
|
30
|
+
onPointerLeave: () => setPressing(false),
|
|
31
|
+
onPointerUp: () => setPressing(false),
|
|
47
32
|
};
|
|
48
33
|
}
|
|
49
|
-
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
50
34
|
//# sourceMappingURL=useLongPress.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLongPress.js","sourceRoot":"","sources":["../../src/hooks/useLongPress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"useLongPress.js","sourceRoot":"","sources":["../../src/hooks/useLongPress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAyB1C;;;GAGG;AACH,MAAM,UAAU,YAAY,CAAC,EACzB,QAAQ,EACR,KAAK,EAAE,YAAY,GAAG,GAAG,EACzB,cAAc,GAAG,EAAE,EACnB,QAAQ,GAAG,GAAG,GACD;IACb,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,UAAU,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IACjC,MAAM,KAAK,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;IAEnC,MAAM,WAAW,GAAG,CAAC,QAAiB,EAAE,EAAE;QACtC,UAAU,CAAC,OAAO,GAAG,QAAQ,CAAC;QAE9B,IAAI,QAAQ,EAAE,CAAC;YACX,IAAI,CAAC,QAAQ,EAAE;gBAAE,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;YAE3C,OAAO,CAAC,GAAG,CAAC,GAAG,EAAE;gBACb,IAAI,CAAC,UAAU,CAAC,OAAO;oBAAE,OAAO,WAAW,CAAC,KAAK,CAAC,CAAC;gBAEnD,MAAM,WAAW,GAAG,CAAC,KAAK,CAAC,OAAO,GAAG,cAAc,CAAC,GAAG,GAAG,CAAC;gBAC3D,KAAK,CAAC,OAAO,GAAG,KAAK,CAAC,OAAO,IAAI,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,GAAG,WAAW,CAAC;gBAEnF,WAAW,CAAC,IAAI,CAAC,CAAC;YACtB,CAAC,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;YAClB,OAAO;QACX,CAAC;QAED,KAAK,CAAC,OAAO,GAAG,YAAY,CAAC;QAC7B,OAAO,CAAC,KAAK,EAAE,CAAC;IACpB,CAAC,CAAC;IAEF,OAAO;QACH,aAAa,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC;QACtC,cAAc,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;QACxC,WAAW,EAAE,GAAG,EAAE,CAAC,WAAW,CAAC,KAAK,CAAC;KACxC,CAAC;AACN,CAAC"}
|
|
@@ -18,6 +18,6 @@ import { RadioProps } from '-/components/Radio';
|
|
|
18
18
|
export declare function useRadioState(name: string, externalState?: [value: string | undefined, onChange: (next: string) => void]): {
|
|
19
19
|
radioProps: (radioValue: string) => Pick<RadioProps, "checked" | "name" | "onChange" | "value">;
|
|
20
20
|
value: string | undefined;
|
|
21
|
-
setValue: (
|
|
21
|
+
setValue: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
22
22
|
};
|
|
23
23
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -22,6 +22,5 @@ export type TimeoutHook = {
|
|
|
22
22
|
*
|
|
23
23
|
* @returns A ref object that can be used to store a timeout id.
|
|
24
24
|
*/
|
|
25
|
-
export declare function useTimeout(): TimeoutHook;
|
|
26
|
-
export declare function useTimeout(initialCallback: () => void, durationMs: number): TimeoutHook;
|
|
25
|
+
export declare function useTimeout(durationMs?: number): TimeoutHook;
|
|
27
26
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/dist/hooks/useTimeout.js
CHANGED
|
@@ -1,12 +1,28 @@
|
|
|
1
1
|
import { useRef, useEffect, useMemo } from 'react';
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* A hook that creates a timeout that is automatically cleared when the component is unmounted.
|
|
4
|
+
*
|
|
5
|
+
* @example
|
|
6
|
+
* import { useTimeout } from '@bspk/ui/hooks/useTimeout';
|
|
7
|
+
* import { useEffect } from 'react';
|
|
8
|
+
*
|
|
9
|
+
* function MyComponent() {
|
|
10
|
+
* const timeout = useTimeout();
|
|
11
|
+
*
|
|
12
|
+
* const handleClick = () => {
|
|
13
|
+
* timeout.set(() => console.log('Timeout triggered'), 1000);
|
|
14
|
+
* };
|
|
15
|
+
*
|
|
16
|
+
* return <Button onClick={handleClick}>Click here then check the console.</Button>;
|
|
17
|
+
* }
|
|
18
|
+
*
|
|
19
|
+
* @returns A ref object that can be used to store a timeout id.
|
|
20
|
+
*/
|
|
21
|
+
export function useTimeout(durationMs = 1000) {
|
|
3
22
|
const timeoutRef = useRef(null);
|
|
4
23
|
useEffect(() => {
|
|
5
24
|
if (timeoutRef.current)
|
|
6
25
|
clearTimeout(timeoutRef.current);
|
|
7
|
-
if (initialCallback)
|
|
8
|
-
timeoutRef.current = setTimeout(initialCallback, durationMs);
|
|
9
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps -- only run at mount
|
|
10
26
|
}, []);
|
|
11
27
|
return useMemo(() => ({
|
|
12
28
|
clear: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTimeout.js","sourceRoot":"","sources":["../../src/hooks/useTimeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"useTimeout.js","sourceRoot":"","sources":["../../src/hooks/useTimeout.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAQnD;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,UAAU,UAAU,CAAC,UAAU,GAAG,IAAI;IACxC,MAAM,UAAU,GAAG,MAAM,CAAuC,IAAI,CAAC,CAAC;IAEtE,SAAS,CAAC,GAAG,EAAE;QACX,IAAI,UAAU,CAAC,OAAO;YAAE,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;IAC7D,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,OAAO,CACV,GAAG,EAAE,CAAC,CAAC;QACH,KAAK,EAAE,GAAG,EAAE;YACR,IAAI,UAAU,CAAC,OAAO;gBAAE,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;QAC7D,CAAC;QACD,GAAG,EAAE,CAAC,QAAoB,EAAE,EAAE,GAAG,UAAU,EAAE,EAAE;YAC3C,IAAI,UAAU,CAAC,OAAO;gBAAE,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC;YACzD,UAAU,CAAC,OAAO,GAAG,UAAU,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC;QAClD,CAAC;QACD,GAAG,EAAE,UAAU;KAClB,CAAC,EACF,CAAC,UAAU,CAAC,CACf,CAAC;AACN,CAAC;AAED,sDAAsD"}
|
package/dist/styles/base.css
CHANGED
|
@@ -241,6 +241,15 @@ body[data-bspk] [data-bspk=link][data-subtle-inverse][disabled] {
|
|
|
241
241
|
left: auto;
|
|
242
242
|
}
|
|
243
243
|
|
|
244
|
+
[data-truncated] {
|
|
245
|
+
max-width: 100%;
|
|
246
|
+
display: inline-block;
|
|
247
|
+
overflow: hidden;
|
|
248
|
+
text-overflow: ellipsis;
|
|
249
|
+
white-space: nowrap;
|
|
250
|
+
background-color: transparent;
|
|
251
|
+
}
|
|
252
|
+
|
|
244
253
|
[data-sr-only] {
|
|
245
254
|
height: 1px;
|
|
246
255
|
overflow: hidden;
|
package/dist/styles/base.css.js
CHANGED
|
@@ -244,6 +244,15 @@ body[data-bspk] [data-bspk=link][data-subtle-inverse][disabled] {
|
|
|
244
244
|
left: auto;
|
|
245
245
|
}
|
|
246
246
|
|
|
247
|
+
[data-truncated] {
|
|
248
|
+
max-width: 100%;
|
|
249
|
+
display: inline-block;
|
|
250
|
+
overflow: hidden;
|
|
251
|
+
text-overflow: ellipsis;
|
|
252
|
+
white-space: nowrap;
|
|
253
|
+
background-color: transparent;
|
|
254
|
+
}
|
|
255
|
+
|
|
247
256
|
[data-sr-only] {
|
|
248
257
|
height: 1px;
|
|
249
258
|
overflow: hidden;
|
package/dist/types/common.d.ts
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
*
|
|
6
6
|
* @bspk/ui/Txt".
|
|
7
7
|
*/
|
|
8
|
+
import { IconName } from '@bspk/icons';
|
|
8
9
|
import { JSXElementConstructor, ReactNode, ComponentPropsWithoutRef, AriaRole, ChangeEvent, KeyboardEvent, CSSProperties } from 'react';
|
|
9
10
|
export type AlertVariant = 'error' | 'informational' | 'success' | 'warning';
|
|
10
11
|
/** Sets a ref to the given element. */
|
|
@@ -17,6 +18,8 @@ export type CSSWithVariables = CSSProperties | (CSSProperties & {
|
|
|
17
18
|
});
|
|
18
19
|
export type DataProps = Record<`data-${string}`, string>;
|
|
19
20
|
export type ButtonSize = 'large' | 'medium' | 'small' | 'x-small';
|
|
21
|
+
/** The name of an icon in the Bspk icon library. */
|
|
22
|
+
export type BspkIcon = IconName;
|
|
20
23
|
export type CallToActionButton = {
|
|
21
24
|
/**
|
|
22
25
|
* The label of the call to action button.
|
package/dist/types/common.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;;AA6KH,sDAAsD"}
|
package/dist/types/meta.d.ts
CHANGED
package/dist/types/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACnD,SAAS,EAAE,qDAAqD;IAChE,SAAS,EAAE,mDAAmD;IAC9D,KAAK,EAAE,+CAA+C;IACtD,UAAU,EAAE,mCAAmC;IAC/C,QAAQ,EAAE,mBAAmB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAOzB;IACA,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EACP,4IAA4I;KACnJ;IACD,GAAG,EAAE;QACD,KAAK,EAAE,aAAa;QACpB,EAAE,EAAE,KAAK;QACT,WAAW,EACP,+JAA+J;KACtK;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,WAAW,EACP,+LAA+L;KACtM;IACD,MAAM,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,EAAE,EAAE,QAAQ;QACZ,WAAW,EACP,sJAAsJ;KAC7J;IACD,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,mEAAmE;KACnF;CACJ,CAAC;
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,qBAAqB,GAAqB;IACnD,SAAS,EAAE,qDAAqD;IAChE,SAAS,EAAE,mDAAmD;IAC9D,KAAK,EAAE,+CAA+C;IACtD,UAAU,EAAE,mCAAmC;IAC/C,QAAQ,EAAE,mBAAmB;CAChC,CAAC;AAEF,MAAM,CAAC,MAAM,gBAAgB,GAOzB;IACA,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EACP,4IAA4I;KACnJ;IACD,GAAG,EAAE;QACD,KAAK,EAAE,aAAa;QACpB,EAAE,EAAE,KAAK;QACT,WAAW,EACP,+JAA+J;KACtK;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,WAAW,EACP,+LAA+L;KACtM;IACD,MAAM,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,EAAE,EAAE,QAAQ;QACZ,WAAW,EACP,sJAAsJ;KAC7J;IACD,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,mEAAmE;KACnF;CACJ,CAAC;AAoDF,sDAAsD"}
|