@bspk/ui 1.3.10 → 1.3.16
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 +22 -20
- package/dist/components/Accordion/Accordion.js +22 -20
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionExample.js +5 -4
- package/dist/components/Accordion/AccordionExample.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -2
- package/dist/components/Avatar/Avatar.js +2 -3
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/avatar.css +13 -8
- package/dist/components/Avatar/avatar.css.js +13 -8
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/BadgeExample.js +0 -1
- package/dist/components/Badge/BadgeExample.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDot.d.ts +1 -1
- package/dist/components/BadgeDot/BadgeDot.js +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js +0 -1
- package/dist/components/BadgeDot/BadgeDotExample.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.ts +14 -12
- package/dist/components/BannerAlert/BannerAlert.js +14 -12
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlertExample.js +0 -1
- package/dist/components/BannerAlert/BannerAlertExample.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +20 -18
- package/dist/components/Breadcrumb/Breadcrumb.js +20 -18
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +29 -4
- package/dist/components/Button/Button.js +33 -8
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/button.css +4 -3
- package/dist/components/Button/button.css.js +4 -3
- package/dist/components/Calendar/Calendar.d.ts +5 -41
- package/dist/components/Calendar/Calendar.js +61 -185
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/CalendarExample.js +0 -1
- package/dist/components/Calendar/CalendarExample.js.map +1 -1
- package/dist/components/Calendar/calendar.css +35 -28
- package/dist/components/Calendar/calendar.css.js +35 -28
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/index.js +1 -0
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/utils.d.ts +11 -0
- package/dist/components/Calendar/utils.js +76 -0
- package/dist/components/Calendar/utils.js.map +1 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Carousel/Carousel.d.ts +8 -8
- package/dist/components/Carousel/Carousel.js +8 -8
- package/dist/components/Carousel/carousel.css +0 -1
- package/dist/components/Carousel/carousel.css.js +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/checkbox.css +3 -1
- package/dist/components/Checkbox/checkbox.css.js +3 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css.js +1 -1
- package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.js +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +16 -29
- package/dist/components/ChipGroup/ChipGroup.js +13 -23
- package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.js +61 -6
- package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
- package/dist/components/ChipGroup/chip-group.css +5 -3
- package/dist/components/ChipGroup/chip-group.css.js +5 -3
- package/dist/components/DatePicker/DatePicker.d.ts +23 -11
- package/dist/components/DatePicker/DatePicker.js +20 -83
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/DatePickerExample.d.ts +1 -0
- package/dist/components/DatePicker/DatePickerExample.js +10 -2
- package/dist/components/DatePicker/DatePickerExample.js.map +1 -1
- package/dist/components/DatePicker/date-picker.css +9 -0
- package/dist/components/DatePicker/date-picker.css.js +9 -0
- package/dist/components/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/DatePickerField/DatePickerField.js +1 -1
- package/dist/components/Divider/Divider.d.ts +4 -4
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Divider/DividerExample.js +17 -20
- package/dist/components/Divider/DividerExample.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +8 -10
- package/dist/components/Drawer/Drawer.js +9 -12
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/DrawerExample.d.ts +1 -0
- package/dist/components/Drawer/DrawerExample.js +10 -4
- package/dist/components/Drawer/DrawerExample.js.map +1 -1
- package/dist/components/Drawer/drawer.css +6 -0
- package/dist/components/Drawer/drawer.css.js +6 -0
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.js +4 -7
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateExample.js +5 -6
- package/dist/components/EmptyState/EmptyStateExample.js.map +1 -1
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.d.ts +6 -13
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js +12 -7
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +5 -3
- package/dist/components/Fab/Fab.js +8 -6
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/FabExample.d.ts +1 -0
- package/dist/components/Fab/FabExample.js +6 -0
- package/dist/components/Fab/FabExample.js.map +1 -1
- package/dist/components/Fab/fab.css +5 -3
- package/dist/components/Fab/fab.css.js +5 -3
- package/dist/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.d.ts +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js +1 -1
- package/dist/components/Flex/Flex.d.ts +55 -0
- package/dist/components/Flex/Flex.js +38 -0
- package/dist/components/Flex/Flex.js.map +1 -0
- package/dist/components/Flex/FlexExample.d.ts +5 -0
- package/dist/components/Flex/FlexExample.js +13 -0
- package/dist/components/Flex/FlexExample.js.map +1 -0
- package/dist/components/Flex/index.d.ts +1 -0
- package/dist/components/Flex/index.js +2 -0
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/FormField/FormFieldExample.js +0 -1
- package/dist/components/FormField/FormFieldExample.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +48 -0
- package/dist/components/Grid/Grid.js +36 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/GridExample.d.ts +3 -0
- package/dist/components/Grid/GridExample.js +28 -0
- package/dist/components/Grid/GridExample.js.map +1 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +2 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.d.ts +1 -1
- package/dist/components/InlineAlert/InlineAlert.js +1 -1
- package/dist/components/Input/Input.d.ts +5 -9
- package/dist/components/Input/Input.js +5 -9
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/InputElement.js +3 -6
- package/dist/components/Input/InputElement.js.map +1 -1
- package/dist/components/Input/InputExample.d.ts +1 -0
- package/dist/components/Input/InputExample.js +10 -1
- package/dist/components/Input/InputExample.js.map +1 -1
- package/dist/components/Input/input.css +6 -1
- package/dist/components/Input/input.css.js +6 -1
- package/dist/components/InputField/InputField.d.ts +1 -1
- package/dist/components/InputField/InputField.js +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +6 -15
- package/dist/components/InputNumber/InputNumber.js +6 -15
- package/dist/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/components/InputNumber/InputNumberExample.d.ts +1 -0
- package/dist/components/InputNumber/InputNumberExample.js +10 -1
- package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
- package/dist/components/InputNumber/input-number.css +6 -4
- package/dist/components/InputNumber/input-number.css.js +6 -4
- package/dist/components/InputNumberField/InputNumberField.d.ts +1 -1
- package/dist/components/InputNumberField/InputNumberField.js +1 -1
- package/dist/components/InputPhone/InputPhone.d.ts +7 -9
- package/dist/components/InputPhone/InputPhone.js +19 -19
- package/dist/components/InputPhone/InputPhone.js.map +1 -1
- package/dist/components/InputPhone/InputPhoneExample.d.ts +2 -1
- package/dist/components/InputPhone/InputPhoneExample.js +9 -1
- package/dist/components/InputPhone/InputPhoneExample.js.map +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.d.ts +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.js +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/ListItem/ListItem.js +1 -1
- package/dist/components/Menu/Menu.d.ts +1 -3
- package/dist/components/Menu/Menu.js +1 -3
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -3
- package/dist/components/Modal/Modal.js +2 -4
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/OTPInput/OTPInput.d.ts +10 -4
- package/dist/components/OTPInput/OTPInput.js +8 -40
- package/dist/components/OTPInput/OTPInput.js.map +1 -1
- package/dist/components/OTPInput/OTPInputExample.js +6 -2
- package/dist/components/OTPInput/OTPInputExample.js.map +1 -1
- package/dist/components/OTPInput/otp-input.css +18 -17
- package/dist/components/OTPInput/otp-input.css.js +18 -17
- package/dist/components/PageControl/PageControl.d.ts +1 -1
- package/dist/components/PageControl/PageControl.js +1 -1
- package/dist/components/PageControl/PageControlExample.js +0 -1
- package/dist/components/PageControl/PageControlExample.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +57 -0
- package/dist/components/PageHeader/PageHeader.js +28 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/PageHeader/PageHeaderExample.d.ts +4 -0
- package/dist/components/PageHeader/PageHeaderExample.js +56 -0
- package/dist/components/PageHeader/PageHeaderExample.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PageHeader/index.js +2 -0
- package/dist/components/PageHeader/index.js.map +1 -0
- package/dist/components/PageHeader/page-header.css +35 -0
- package/dist/components/PageHeader/page-header.css.js +40 -0
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/Pagination.js +8 -3
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/pagination.css +8 -2
- package/dist/components/Pagination/pagination.css.js +8 -2
- package/dist/components/Password/Password.d.ts +11 -16
- package/dist/components/Password/Password.js +11 -16
- package/dist/components/Password/Password.js.map +1 -1
- package/dist/components/Password/PasswordExample.d.ts +1 -0
- package/dist/components/Password/PasswordExample.js +9 -0
- package/dist/components/Password/PasswordExample.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverExample.js +0 -1
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/Popover/popover.css +7 -5
- package/dist/components/Popover/popover.css.js +7 -5
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.js +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +0 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
- package/dist/components/ProgressionStepper/progression-stepper.css +5 -3
- package/dist/components/ProgressionStepper/progression-stepper.css.js +5 -3
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.d.ts +1 -1
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js +1 -1
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css +6 -6
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css.js +7 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/radio-group.css +1 -1
- package/dist/components/RadioGroup/radio-group.css.js +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.js +1 -1
- package/dist/components/Rating/Rating.d.ts +3 -2
- package/dist/components/Rating/Rating.js +5 -3
- package/dist/components/Rating/Rating.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +3 -4
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl/segmented-control.css +3 -1
- package/dist/components/SegmentedControl/segmented-control.css.js +3 -1
- package/dist/components/Select/Select.d.ts +11 -24
- package/dist/components/Select/Select.js +11 -24
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.d.ts +1 -0
- package/dist/components/Select/SelectExample.js +18 -1
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/SelectField/SelectField.d.ts +1 -1
- package/dist/components/SelectField/SelectField.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/dist/components/SkeletonText/SkeletonText.js +1 -1
- package/dist/components/Slider/Slider.d.ts +18 -3
- package/dist/components/Slider/Slider.js +20 -4
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider/SliderExample.d.ts +1 -0
- package/dist/components/Slider/SliderExample.js +7 -2
- package/dist/components/Slider/SliderExample.js.map +1 -1
- package/dist/components/Snackbar/Manager.d.ts +1 -1
- package/dist/components/Snackbar/Manager.js +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +1 -1
- package/dist/components/Snackbar/SnackbarExample.js +0 -1
- package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/switch.css +11 -9
- package/dist/components/Switch/switch.css.js +11 -9
- package/dist/components/SwitchOption/SwitchOption.d.ts +1 -1
- package/dist/components/SwitchOption/SwitchOption.js +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +1 -1
- package/dist/components/TabGroup/TabGroup.js +1 -1
- package/dist/components/TabGroup/TabGroupExample.js +0 -1
- package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
- package/dist/components/TabList/TabListExample.js +0 -1
- package/dist/components/TabList/TabListExample.js.map +1 -1
- package/dist/components/TabList/tab-list.css +5 -3
- package/dist/components/TabList/tab-list.css.js +5 -3
- package/dist/components/Table/Table.d.ts +2 -2
- package/dist/components/Table/Table.js +8 -8
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/TableExample.js +56 -54
- package/dist/components/Table/TableExample.js.map +1 -1
- package/dist/components/Table/utils.d.ts +2 -2
- package/dist/components/Table/utils.js +27 -22
- package/dist/components/Table/utils.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +5 -8
- package/dist/components/Textarea/Textarea.js +5 -8
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/TextareaExample.d.ts +1 -0
- package/dist/components/Textarea/TextareaExample.js +12 -1
- package/dist/components/Textarea/TextareaExample.js.map +1 -1
- package/dist/components/Textarea/textarea.css +5 -3
- package/dist/components/Textarea/textarea.css.js +5 -3
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +5 -9
- package/dist/components/TimePicker/TimePicker.js +5 -9
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePicker/TimePickerExample.d.ts +1 -0
- package/dist/components/TimePicker/TimePickerExample.js +9 -1
- package/dist/components/TimePicker/TimePickerExample.js.map +1 -1
- package/dist/components/TimePickerField/TimePickerField.d.ts +1 -1
- package/dist/components/TimePickerField/TimePickerField.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/tooltip.css +7 -3
- package/dist/components/Tooltip/tooltip.css.js +7 -3
- package/dist/components/Txt/Txt.d.ts +1 -1
- package/dist/components/Txt/Txt.js +1 -1
- package/dist/components/UIProvider/UIProvider.js +4 -6
- package/dist/components/UIProvider/UIProvider.js.map +1 -1
- package/dist/components/UIProvider/UIProviderExample.d.ts +0 -1
- package/dist/components/UIProvider/UIProviderExample.js +1 -46
- package/dist/components/UIProvider/UIProviderExample.js.map +1 -1
- package/dist/hooks/useControlledState.d.ts +7 -0
- package/dist/hooks/useControlledState.js +21 -0
- package/dist/hooks/useControlledState.js.map +1 -0
- package/dist/hooks/{useAddEventListener.js → useEventListener.js} +1 -1
- package/dist/hooks/useEventListener.js.map +1 -0
- package/dist/types/meta.d.ts +0 -1
- package/dist/types/meta.js +0 -7
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/createCustomEvent.js +1 -1
- package/dist/utils/createCustomEvent.js.map +1 -1
- package/dist/utils/demo.d.ts +19 -2
- package/dist/utils/demo.js.map +1 -1
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.js +5 -0
- package/dist/utils/dom.js.map +1 -1
- package/dist/utils/handleKeyDown.d.ts +1 -0
- package/dist/utils/handleKeyDown.js +9 -3
- package/dist/utils/handleKeyDown.js.map +1 -1
- package/dist/utils/keyboard.d.ts +3 -1
- package/dist/utils/keyboard.js.map +1 -1
- package/dist/utils/sendAriaLiveMessage.d.ts +8 -0
- package/dist/utils/sendAriaLiveMessage.js +14 -0
- package/dist/utils/sendAriaLiveMessage.js.map +1 -0
- package/dist/utils/sizing.d.ts +3 -0
- package/dist/utils/sizing.js +28 -0
- package/dist/utils/sizing.js.map +1 -0
- package/dist/utils/uiContext.d.ts +0 -1
- package/dist/utils/uiContext.js.map +1 -1
- package/meta.ts +9 -8
- package/package.json +28 -22
- package/src/components/Accordion/Accordion.tsx +22 -20
- package/src/components/Accordion/AccordionExample.tsx +5 -4
- package/src/components/Avatar/Avatar.tsx +2 -3
- package/src/components/Avatar/avatar.scss +9 -6
- package/src/components/AvatarGroup/AvatarGroup.tsx +1 -1
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Badge/BadgeExample.tsx +0 -1
- package/src/components/BadgeDot/BadgeDot.tsx +1 -1
- package/src/components/BadgeDot/BadgeDotExample.tsx +0 -1
- package/src/components/BannerAlert/BannerAlert.tsx +14 -12
- package/src/components/BannerAlert/BannerAlertExample.tsx +0 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +20 -18
- package/src/components/Button/Button.tsx +36 -10
- package/src/components/Button/button.scss +13 -6
- package/src/components/Calendar/Calendar.rtl.test.tsx +1 -1
- package/src/components/Calendar/Calendar.tsx +156 -371
- package/src/components/Calendar/CalendarExample.tsx +0 -1
- package/src/components/Calendar/calendar.scss +46 -40
- package/src/components/Calendar/index.tsx +1 -0
- package/src/components/Calendar/utils.tsx +98 -0
- package/src/components/Card/Card.tsx +1 -1
- package/src/components/Carousel/Carousel.tsx +8 -8
- package/src/components/Carousel/carousel.scss +0 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +1 -1
- package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +1 -1
- package/src/components/CheckboxOption/CheckboxOption.tsx +1 -1
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/ChipGroup/ChipGroup.rtl.test.tsx +16 -11
- package/src/components/ChipGroup/ChipGroup.tsx +19 -37
- package/src/components/ChipGroup/ChipGroupExample.tsx +64 -36
- package/src/components/ChipGroup/chip-group.scss +5 -3
- package/src/components/DatePicker/DatePicker.rtl.test.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +51 -106
- package/src/components/DatePicker/DatePickerExample.tsx +20 -3
- package/src/components/DatePicker/date-picker.scss +11 -0
- package/src/components/DatePickerField/DatePickerField.tsx +1 -1
- package/src/components/Divider/Divider.tsx +4 -4
- package/src/components/Divider/DividerExample.tsx +22 -23
- package/src/components/Drawer/Drawer.tsx +9 -16
- package/src/components/Drawer/DrawerExample.tsx +28 -4
- package/src/components/Drawer/drawer.scss +7 -0
- package/src/components/EmptyState/EmptyState.rtl.test.tsx +1 -1
- package/src/components/EmptyState/EmptyState.tsx +14 -21
- package/src/components/EmptyState/EmptyStateExample.tsx +5 -5
- package/src/components/ExamplePlaceholder/ExamplePlaceholder.tsx +17 -22
- package/src/components/Fab/Fab.tsx +10 -7
- package/src/components/Fab/FabExample.tsx +10 -1
- package/src/components/FileUpload/FileUpload.tsx +1 -1
- package/src/components/FileUploadItem/FileUploadItem.tsx +1 -1
- package/src/components/{Layout/Layout.rtl.test.tsx → Flex/Flex.rtl.test.tsx} +3 -3
- package/src/components/Flex/Flex.tsx +100 -0
- package/src/components/Flex/FlexExample.tsx +27 -0
- package/src/components/Flex/index.tsx +1 -0
- package/src/components/FormField/FormFieldExample.tsx +1 -2
- package/src/components/Grid/Grid.rtl.test.tsx +19 -0
- package/src/components/Grid/Grid.tsx +75 -0
- package/src/components/Grid/GridExample.tsx +42 -0
- package/src/components/Grid/index.tsx +1 -0
- package/src/components/InlineAlert/InlineAlert.tsx +1 -1
- package/src/components/Input/Input.tsx +5 -9
- package/src/components/Input/InputElement.tsx +4 -7
- package/src/components/Input/InputExample.tsx +19 -1
- package/src/components/Input/input.scss +9 -1
- package/src/components/InputField/InputField.tsx +1 -1
- package/src/components/InputNumber/InputNumber.tsx +6 -15
- package/src/components/InputNumber/InputNumberExample.tsx +24 -1
- package/src/components/InputNumberField/InputNumberField.tsx +1 -1
- package/src/components/InputPhone/InputPhone.tsx +18 -17
- package/src/components/InputPhone/InputPhoneExample.tsx +27 -2
- package/src/components/InputPhoneField/InputPhoneField.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/ListItem/ListItem.tsx +1 -1
- package/src/components/Menu/Menu.tsx +1 -3
- package/src/components/Modal/Modal.tsx +2 -4
- package/src/components/OTPInput/OTPInput.rtl.test.tsx +4 -2
- package/src/components/OTPInput/OTPInput.tsx +31 -64
- package/src/components/OTPInput/OTPInputExample.tsx +6 -2
- package/src/components/OTPInput/otp-input.scss +50 -45
- package/src/components/PageControl/PageControl.tsx +1 -1
- package/src/components/PageControl/PageControlExample.tsx +0 -1
- package/src/components/PageHeader/PageHeader.rtl.test.tsx +18 -0
- package/src/components/PageHeader/PageHeader.tsx +78 -0
- package/src/components/PageHeader/PageHeaderExample.tsx +58 -0
- package/src/components/PageHeader/index.tsx +1 -0
- package/src/components/PageHeader/page-header.scss +41 -0
- package/src/components/Pagination/Pagination.tsx +14 -3
- package/src/components/Pagination/pagination.scss +12 -5
- package/src/components/Password/Password.tsx +11 -16
- package/src/components/Password/PasswordExample.tsx +18 -1
- package/src/components/PasswordField/PasswordField.tsx +1 -1
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/Popover/PopoverExample.tsx +0 -1
- package/src/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/components/ProgressCircle/ProgressCircle.tsx +1 -1
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +1 -1
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +0 -1
- package/src/components/ProgressionStepperBar/ProgressionStepperBar.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +1 -1
- package/src/components/RadioGroupField/RadioGroupField.tsx +1 -1
- package/src/components/Rating/Rating.tsx +7 -3
- package/src/components/SearchBar/SearchBar.tsx +3 -5
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/components/Select/Select.tsx +11 -24
- package/src/components/Select/SelectExample.tsx +36 -1
- package/src/components/SelectField/SelectField.tsx +1 -1
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/SkeletonText/SkeletonText.tsx +1 -1
- package/src/components/Slider/Slider.tsx +21 -4
- package/src/components/Slider/SliderExample.tsx +16 -2
- package/src/components/Snackbar/Manager.tsx +1 -1
- package/src/components/Snackbar/Snackbar.tsx +1 -1
- package/src/components/Snackbar/SnackbarExample.tsx +0 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/SwitchOption/SwitchOption.tsx +1 -1
- package/src/components/TabGroup/TabGroup.tsx +1 -1
- package/src/components/TabGroup/TabGroupExample.tsx +0 -1
- package/src/components/TabList/TabListExample.tsx +0 -1
- package/src/components/Table/Table.tsx +11 -16
- package/src/components/Table/TableExample.tsx +56 -54
- package/src/components/Table/utils.ts +31 -20
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +5 -8
- package/src/components/Textarea/TextareaExample.tsx +21 -1
- package/src/components/TextareaField/TextareaField.tsx +1 -1
- package/src/components/TimePicker/TimePicker.tsx +5 -9
- package/src/components/TimePicker/TimePickerExample.tsx +18 -1
- package/src/components/TimePickerField/TimePickerField.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/tooltip.scss +2 -0
- package/src/components/Txt/Txt.tsx +1 -1
- package/src/components/UIProvider/UIProvider.tsx +1 -4
- package/src/components/UIProvider/UIProviderExample.tsx +0 -83
- package/src/hooks/useControlledState.ts +31 -0
- package/src/types/meta.ts +0 -8
- package/src/utils/createCustomEvent.ts +1 -1
- package/src/utils/demo.ts +19 -2
- package/src/utils/dom.ts +8 -0
- package/src/utils/handleKeyDown.ts +9 -3
- package/src/utils/keyboard.ts +5 -2
- package/src/utils/sendAriaLiveMessage.ts +17 -0
- package/src/utils/sizing.ts +30 -0
- package/src/utils/uiContext.ts +0 -1
- package/.scripts/index.ts +0 -110
- package/dist/components/Layout/Layout.d.ts +0 -50
- package/dist/components/Layout/Layout.js +0 -28
- package/dist/components/Layout/Layout.js.map +0 -1
- package/dist/components/Layout/LayoutExample.d.ts +0 -4
- package/dist/components/Layout/LayoutExample.js +0 -9
- package/dist/components/Layout/LayoutExample.js.map +0 -1
- package/dist/components/Layout/index.d.ts +0 -1
- package/dist/components/Layout/index.js +0 -2
- package/dist/components/Layout/index.js.map +0 -1
- package/dist/components/UIProvider/AriaLiveMessageHandler.d.ts +0 -13
- package/dist/components/UIProvider/AriaLiveMessageHandler.js +0 -31
- package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +0 -1
- package/dist/hooks/useAddEventListener.js.map +0 -1
- package/src/components/Layout/Layout.tsx +0 -85
- package/src/components/Layout/LayoutExample.tsx +0 -17
- package/src/components/Layout/index.tsx +0 -1
- package/src/components/UIProvider/AriaLiveMessageHandler.tsx +0 -46
- /package/dist/hooks/{useAddEventListener.d.ts → useEventListener.d.ts} +0 -0
- /package/src/hooks/{useAddEventListener.ts → useEventListener.ts} +0 -0
|
@@ -42,8 +42,6 @@ export type DrawerProps = Pick<DialogProps, 'container' | 'disableFocusTrap' | '
|
|
|
42
42
|
* content or actions without navigating away from the current view.
|
|
43
43
|
*
|
|
44
44
|
* @example
|
|
45
|
-
* import React from 'react';
|
|
46
|
-
*
|
|
47
45
|
* import { Button } from '@bspk/ui/Button';
|
|
48
46
|
* import { Drawer } from '@bspk/ui/Drawer';
|
|
49
47
|
*
|
|
@@ -51,25 +49,25 @@ export type DrawerProps = Pick<DialogProps, 'container' | 'disableFocusTrap' | '
|
|
|
51
49
|
* const [open, setOpen] = useState(false);
|
|
52
50
|
*
|
|
53
51
|
* return (
|
|
54
|
-
*
|
|
55
|
-
* <Button label="
|
|
52
|
+
* <div style={{ width: '100%', height: 180 }}>
|
|
53
|
+
* <Button label="Toggle Drawer" onClick={() => setOpen(!open)} />
|
|
56
54
|
* <Drawer
|
|
55
|
+
* closeButton={true}
|
|
56
|
+
* header="Example Drawer"
|
|
57
57
|
* id="exampleId"
|
|
58
|
+
* modal={false}
|
|
58
59
|
* onClose={() => setOpen(false)}
|
|
59
60
|
* open={open}
|
|
60
61
|
* placement="right"
|
|
61
|
-
* modal={false}
|
|
62
|
-
* header="Example Drawer"
|
|
63
|
-
* closeButton={true}
|
|
64
62
|
* >
|
|
65
|
-
*
|
|
63
|
+
* <ExamplePlaceholder label="Drawer Content" style={{ flexGrow: 1 }} />
|
|
66
64
|
* </Drawer>
|
|
67
|
-
*
|
|
65
|
+
* </div>
|
|
68
66
|
* );
|
|
69
67
|
* };
|
|
70
68
|
*
|
|
71
69
|
* @name Drawer
|
|
72
|
-
* @phase
|
|
70
|
+
* @phase Stable
|
|
73
71
|
*/
|
|
74
72
|
export declare function Drawer({ header, children, open, modal, closeButton, placement, onClose, disableFocusTrap, ...dialogProps }: DrawerProps): import("react/jsx-runtime").JSX.Element | null;
|
|
75
73
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -3,14 +3,11 @@ import './drawer.css.js';
|
|
|
3
3
|
import { SvgClose } from '@bspk/icons/Close';
|
|
4
4
|
import { Button } from '../Button';
|
|
5
5
|
import { Dialog } from '../Dialog';
|
|
6
|
-
import { Txt } from '../Txt';
|
|
7
6
|
/**
|
|
8
7
|
* Drawer component displays a panel that slides in from the edge of the screen. It can be used to show additional
|
|
9
8
|
* content or actions without navigating away from the current view.
|
|
10
9
|
*
|
|
11
10
|
* @example
|
|
12
|
-
* import React from 'react';
|
|
13
|
-
*
|
|
14
11
|
* import { Button } from '@bspk/ui/Button';
|
|
15
12
|
* import { Drawer } from '@bspk/ui/Drawer';
|
|
16
13
|
*
|
|
@@ -18,30 +15,30 @@ import { Txt } from '../Txt';
|
|
|
18
15
|
* const [open, setOpen] = useState(false);
|
|
19
16
|
*
|
|
20
17
|
* return (
|
|
21
|
-
*
|
|
22
|
-
* <Button label="
|
|
18
|
+
* <div style={{ width: '100%', height: 180 }}>
|
|
19
|
+
* <Button label="Toggle Drawer" onClick={() => setOpen(!open)} />
|
|
23
20
|
* <Drawer
|
|
21
|
+
* closeButton={true}
|
|
22
|
+
* header="Example Drawer"
|
|
24
23
|
* id="exampleId"
|
|
24
|
+
* modal={false}
|
|
25
25
|
* onClose={() => setOpen(false)}
|
|
26
26
|
* open={open}
|
|
27
27
|
* placement="right"
|
|
28
|
-
* modal={false}
|
|
29
|
-
* header="Example Drawer"
|
|
30
|
-
* closeButton={true}
|
|
31
28
|
* >
|
|
32
|
-
*
|
|
29
|
+
* <ExamplePlaceholder label="Drawer Content" style={{ flexGrow: 1 }} />
|
|
33
30
|
* </Drawer>
|
|
34
|
-
*
|
|
31
|
+
* </div>
|
|
35
32
|
* );
|
|
36
33
|
* };
|
|
37
34
|
*
|
|
38
35
|
* @name Drawer
|
|
39
|
-
* @phase
|
|
36
|
+
* @phase Stable
|
|
40
37
|
*/
|
|
41
38
|
export function Drawer({ header, children, open = false, modal = true, closeButton = false, placement = 'right', onClose, disableFocusTrap, ...dialogProps }) {
|
|
42
39
|
if (!open)
|
|
43
40
|
return null;
|
|
44
|
-
const drawerContent = (_jsxs("section", { "aria-modal": modal ? 'true' : undefined, "data-bspk": "drawer", "data-no-portal": modal ? null : true, "data-persistent-placement": modal ? null : placement, role: modal ? 'dialog' : 'complementary', children: [(header || closeButton) && (_jsxs("div", { "data-drawer-close-only": !header, "data-drawer-header": true, children: [header &&
|
|
41
|
+
const drawerContent = (_jsxs("section", { "aria-modal": modal ? 'true' : undefined, "data-bspk": "drawer", "data-no-portal": modal ? null : true, "data-persistent-placement": modal ? null : placement, role: modal ? 'dialog' : 'complementary', children: [(header || closeButton) && (_jsxs("div", { "data-drawer-close-only": !header, "data-drawer-header": true, children: [header && _jsx("div", { "data-drawer-title": true, children: header }), closeButton && (_jsx(Button, { icon: _jsx(SvgClose, {}), iconOnly: true, label: "close", onClick: onClose, variant: "tertiary" }))] })), children] }));
|
|
45
42
|
if (!modal)
|
|
46
43
|
return drawerContent;
|
|
47
44
|
return (_jsx(Dialog, { ...dialogProps, disableFocusTrap: disableFocusTrap, onClose: onClose || (() => { }), open: open, placement: placement, showScrim: true, widthFull: placement === 'bottom' || placement === 'top', children: drawerContent }));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"Drawer.js","sourceRoot":"","sources":["../../../src/components/Drawer/Drawer.tsx"],"names":[],"mappings":";AAAA,OAAO,eAAe,CAAC;AACvB,OAAO,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAE7C,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,MAAM,EAAe,MAAM,qBAAqB,CAAC;AAuC1D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;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@ -2,3 +2,4 @@ import { DrawerProps } from '.';
|
|
|
2
2
|
import { ComponentExampleFn, Preset } from '-/utils/demo';
|
|
3
3
|
export declare const presets: Preset<DrawerProps>[];
|
|
4
4
|
export declare const DrawerExample: ComponentExampleFn<DrawerProps>;
|
|
5
|
+
export declare const Usage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { Drawer } from '.';
|
|
3
4
|
import { Button } from '../Button';
|
|
5
|
+
import { ExamplePlaceholder } from '../ExamplePlaceholder';
|
|
4
6
|
export const presets = [
|
|
5
7
|
{
|
|
6
8
|
label: 'Left Responsive',
|
|
@@ -22,26 +24,30 @@ export const DrawerExample = ({ action }) => ({
|
|
|
22
24
|
render: ({ props, preset, setState, Component }) => {
|
|
23
25
|
if (!preset)
|
|
24
26
|
return null;
|
|
25
|
-
const label = 'Open Drawer';
|
|
26
27
|
const handleOnClose = () => {
|
|
27
28
|
action('Drawer closed');
|
|
28
29
|
setState({ open: false });
|
|
29
30
|
};
|
|
31
|
+
const toggleButton = _jsx(Button, { label: "Toggle Drawer", onClick: () => setState({ open: !props.open }) });
|
|
30
32
|
switch (preset.label) {
|
|
31
33
|
case 'Left Responsive':
|
|
32
34
|
return (_jsxs(_Fragment, { children: [_jsx(Drawer, { ...props, onClose: handleOnClose, children: _jsxs("div", { style: { width: '280px' }, children: ["Hello, ", _jsx("br", {}), " I am a ", props.placement, ", responsive drawer!"] }) }), _jsx("div", { style: {
|
|
33
35
|
transition: 'margin 0.5s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
34
36
|
marginLeft: props.open ? `280px` : 0,
|
|
35
|
-
}, children:
|
|
37
|
+
}, children: toggleButton })] }));
|
|
36
38
|
case 'Right Responsive':
|
|
37
39
|
return (_jsxs(_Fragment, { children: [_jsx("div", { style: {
|
|
38
40
|
transition: 'margin 0.5s cubic-bezier(0.4, 0, 0.2, 1)',
|
|
39
41
|
marginRight: props.open ? `280px` : 0,
|
|
40
|
-
}, children:
|
|
42
|
+
}, children: toggleButton }), _jsx(Drawer, { ...props, onClose: handleOnClose, children: _jsxs("div", { style: { width: '280px' }, children: ["Hello, ", _jsx("br", {}), " I am a ", props.placement, ", responsive drawer!"] }) })] }));
|
|
41
43
|
default:
|
|
42
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { display: 'flex', justifyContent: 'center', padding: 'var(--spacing-sizing-04)' }, children:
|
|
44
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { style: { display: 'flex', justifyContent: 'center', padding: 'var(--spacing-sizing-04)' }, children: toggleButton }), _jsx(Component, { "data-example-component": true, ...props, closeButton: props.closeButton ?? false, id: "exampleId", modal: props.modal ?? true, onClose: handleOnClose, open: props.open ?? false, placement: props.placement ?? 'right', children: _jsxs("div", { style: {}, children: ["Hello, I am a (", props.placement, ") drawer!"] }) })] }));
|
|
43
45
|
}
|
|
44
46
|
},
|
|
45
47
|
variants: false,
|
|
46
48
|
});
|
|
49
|
+
export const Usage = () => {
|
|
50
|
+
const [open, setOpen] = useState(false);
|
|
51
|
+
return (_jsxs("div", { style: { width: '100%', height: 180 }, children: [_jsx(Button, { label: "Toggle Drawer", onClick: () => setOpen(!open) }), _jsx(Drawer, { closeButton: true, header: "Example Drawer", id: "exampleId", modal: false, onClose: () => setOpen(false), open: open, placement: "right", children: _jsx(ExamplePlaceholder, { label: "Drawer Content", style: { flexGrow: 1 } }) })] }));
|
|
52
|
+
};
|
|
47
53
|
//# sourceMappingURL=DrawerExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DrawerExample.js","sourceRoot":"","sources":["../../../src/components/Drawer/DrawerExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,MAAM,EAAe,MAAM,GAAG,CAAC;AACxC,OAAO,EAAE,MAAM,EAAE,MAAM,qB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AAE,aAAa,EACtB,IAAI,EAAE,KAAK,CAAC,IAAI,IAAI,KAAK,EACzB,SAAS,EAAE,KAAK,CAAC,SAAS,IAAI,OAAO,YAErC,eAAK,KAAK,EAAE,EAAE,gCAAkB,KAAK,CAAC,SAAS,iBAAgB,GACvD,IACb,CACN,CAAC;QACV,CAAC;IACL,CAAC;IACD,QAAQ,EAAE,KAAK;CAClB,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACtB,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAExC,OAAO,CACH,eAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,aACtC,KAAC,MAAM,IAAC,KAAK,EAAC,eAAe,EAAC,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAI,EAC/D,KAAC,MAAM,IACH,WAAW,EAAE,IAAI,EACjB,MAAM,EAAC,gBAAgB,EACvB,EAAE,EAAC,WAAW,EACd,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,EAC7B,IAAI,EAAE,IAAI,EACV,SAAS,EAAC,OAAO,YAEjB,KAAC,kBAAkB,IAAC,KAAK,EAAC,gBAAgB,EAAC,KAAK,EAAE,EAAE,QAAQ,EAAE,CAAC,EAAE,GAAI,GAChE,IACP,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
padding: var(--spacing-sizing-03);
|
|
3
3
|
color: var(--foreground-neutral-on-surface);
|
|
4
4
|
background: var(--surface-neutral-t1-base);
|
|
5
|
+
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
5
7
|
}
|
|
6
8
|
[data-bspk=drawer][data-no-portal] {
|
|
7
9
|
box-shadow: var(--drop-shadow-float);
|
|
@@ -22,6 +24,7 @@
|
|
|
22
24
|
--box-animation-name: placement-right;
|
|
23
25
|
position: absolute;
|
|
24
26
|
right: 0;
|
|
27
|
+
top: 0;
|
|
25
28
|
height: 100%;
|
|
26
29
|
border-top-left-radius: var(--radius-lg);
|
|
27
30
|
border-bottom-left-radius: var(--radius-lg);
|
|
@@ -52,5 +55,8 @@
|
|
|
52
55
|
[data-bspk=drawer] [data-drawer-header][data-drawer-close-only=true] {
|
|
53
56
|
justify-content: flex-end;
|
|
54
57
|
}
|
|
58
|
+
[data-bspk=drawer] [data-drawer-header] [data-drawer-title] {
|
|
59
|
+
font: var(--heading-h4);
|
|
60
|
+
}
|
|
55
61
|
|
|
56
62
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -5,6 +5,8 @@ style.appendChild(document.createTextNode(`[data-bspk=drawer] {
|
|
|
5
5
|
padding: var(--spacing-sizing-03);
|
|
6
6
|
color: var(--foreground-neutral-on-surface);
|
|
7
7
|
background: var(--surface-neutral-t1-base);
|
|
8
|
+
display: flex;
|
|
9
|
+
flex-direction: column;
|
|
8
10
|
}
|
|
9
11
|
[data-bspk=drawer][data-no-portal] {
|
|
10
12
|
box-shadow: var(--drop-shadow-float);
|
|
@@ -25,6 +27,7 @@ style.appendChild(document.createTextNode(`[data-bspk=drawer] {
|
|
|
25
27
|
--box-animation-name: placement-right;
|
|
26
28
|
position: absolute;
|
|
27
29
|
right: 0;
|
|
30
|
+
top: 0;
|
|
28
31
|
height: 100%;
|
|
29
32
|
border-top-left-radius: var(--radius-lg);
|
|
30
33
|
border-bottom-left-radius: var(--radius-lg);
|
|
@@ -55,6 +58,9 @@ style.appendChild(document.createTextNode(`[data-bspk=drawer] {
|
|
|
55
58
|
[data-bspk=drawer] [data-drawer-header][data-drawer-close-only=true] {
|
|
56
59
|
justify-content: flex-end;
|
|
57
60
|
}
|
|
61
|
+
[data-bspk=drawer] [data-drawer-header] [data-drawer-title] {
|
|
62
|
+
font: var(--heading-h4);
|
|
63
|
+
}
|
|
58
64
|
|
|
59
65
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
60
66
|
`));
|
|
@@ -36,11 +36,11 @@ export type EmptyStateProps = {
|
|
|
36
36
|
* import { EmptyState } from '@bspk/ui/EmptyState';
|
|
37
37
|
*
|
|
38
38
|
* <EmptyState body="Example body" header="Example header">
|
|
39
|
-
*
|
|
39
|
+
* <ExamplePlaceholder height="200px" width="200px" label="Illustration slot or icon slot" />
|
|
40
40
|
* </EmptyState>;
|
|
41
41
|
*
|
|
42
42
|
* @name EmptyState
|
|
43
|
-
* @phase
|
|
43
|
+
* @phase Stable
|
|
44
44
|
*/
|
|
45
45
|
export declare function EmptyState({ children, header, body, callToAction, bodyAlign }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
|
|
46
46
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { Button } from '../Button';
|
|
3
|
-
import {
|
|
3
|
+
import { Flex } from '../Flex';
|
|
4
4
|
import { Txt } from '../Txt';
|
|
5
5
|
/**
|
|
6
6
|
* A design pattern component that indicates to users that system has no content to display.
|
|
@@ -9,16 +9,13 @@ import { Txt } from '../Txt';
|
|
|
9
9
|
* import { EmptyState } from '@bspk/ui/EmptyState';
|
|
10
10
|
*
|
|
11
11
|
* <EmptyState body="Example body" header="Example header">
|
|
12
|
-
*
|
|
12
|
+
* <ExamplePlaceholder height="200px" width="200px" label="Illustration slot or icon slot" />
|
|
13
13
|
* </EmptyState>;
|
|
14
14
|
*
|
|
15
15
|
* @name EmptyState
|
|
16
|
-
* @phase
|
|
16
|
+
* @phase Stable
|
|
17
17
|
*/
|
|
18
18
|
export function EmptyState({ children, header, body, callToAction, bodyAlign = 'center' }) {
|
|
19
|
-
return (_jsxs(
|
|
20
|
-
margin: 'var(--spacing-sizing-04)',
|
|
21
|
-
maxWidth: '500px',
|
|
22
|
-
}, children: [children, _jsxs(Layout, { align: "center", column: true, gap: "4", children: [_jsx(Txt, { as: "header", variant: "heading-h5", children: header }), _jsx(Txt, { as: "p", style: { textAlign: bodyAlign }, variant: "body-base", children: body })] }), callToAction && (_jsx(Button, { label: callToAction.label, onClick: callToAction.onClick, size: callToAction.size || 'medium', variant: "primary" }))] }));
|
|
19
|
+
return (_jsxs(Flex, { align: "center", "data-bspk": "empty-state", direction: "column", gap: "16", children: [children, _jsxs(Flex, { align: bodyAlign === 'left' ? 'flex-start' : 'center', direction: "column", gap: "4", style: { textAlign: bodyAlign }, children: [_jsx(Txt, { variant: "heading-h5", children: header }), _jsx(Txt, { variant: "body-base", children: body })] }), callToAction && (_jsx(Button, { label: callToAction.label, onClick: callToAction.onClick, size: callToAction.size || 'medium', variant: "primary" }))] }));
|
|
23
20
|
}
|
|
24
21
|
//# sourceMappingURL=EmptyState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"EmptyState.js","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyState.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC7C,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAiCvC;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,UAAU,CAAC,EAAE,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,SAAS,GAAG,QAAQ,EAAmB;IACtG,OAAO,CACH,MAAC,IAAI,IAAC,KAAK,EAAC,QAAQ,eAAW,aAAa,EAAC,SAAS,EAAC,QAAQ,EAAC,GAAG,EAAC,IAAI,aACnE,QAAQ,EACT,MAAC,IAAI,IACD,KAAK,EAAE,SAAS,KAAK,MAAM,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,QAAQ,EACrD,SAAS,EAAC,QAAQ,EAClB,GAAG,EAAC,GAAG,EACP,KAAK,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,aAE/B,KAAC,GAAG,IAAC,OAAO,EAAC,YAAY,YAAE,MAAM,GAAO,EACxC,KAAC,GAAG,IAAC,OAAO,EAAC,WAAW,YAAE,IAAI,GAAO,IAClC,EACN,YAAY,IAAI,CACb,KAAC,MAAM,IACH,KAAK,EAAE,YAAY,CAAC,KAAK,EACzB,OAAO,EAAE,YAAY,CAAC,OAAO,EAC7B,IAAI,EAAE,YAAY,CAAC,IAAI,IAAI,QAAQ,EACnC,OAAO,EAAC,SAAS,GACnB,CACL,IACE,CACV,CAAC;AACN,CAAC"}
|
|
@@ -5,18 +5,17 @@ export const presets = [
|
|
|
5
5
|
label: 'With Custom Content',
|
|
6
6
|
propState: {
|
|
7
7
|
callToAction: undefined,
|
|
8
|
-
body: '
|
|
9
|
-
header: '
|
|
10
|
-
children: (_jsx(ExamplePlaceholder, { style: {
|
|
8
|
+
body: 'No results found',
|
|
9
|
+
header: 'We couldn’t find any matching results. Try changing your search.',
|
|
10
|
+
children: (_jsx(ExamplePlaceholder, { label: "Illustration slot or icon slot", style: {
|
|
11
11
|
height: '200px',
|
|
12
|
-
width: '
|
|
13
|
-
minWidth: '250px',
|
|
12
|
+
width: '200px',
|
|
14
13
|
} })),
|
|
15
14
|
},
|
|
16
15
|
},
|
|
17
16
|
];
|
|
18
17
|
export const EmptyStateExample = ({ action }) => ({
|
|
19
|
-
containerStyle: { width: '
|
|
18
|
+
containerStyle: { width: '400px' },
|
|
20
19
|
render: ({ props: { children, ...props }, Component }) => _jsx(Component, { ...props, children: children }),
|
|
21
20
|
presets: [
|
|
22
21
|
{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EmptyStateExample.js","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyStateExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,MAAM,CAAC,MAAM,OAAO,GAA8B;IAC9C;QACI,KAAK,EAAE,qBAAqB;QAC5B,SAAS,EAAE;YACP,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,
|
|
1
|
+
{"version":3,"file":"EmptyStateExample.js","sourceRoot":"","sources":["../../../src/components/EmptyState/EmptyStateExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,MAAM,CAAC,MAAM,OAAO,GAA8B;IAC9C;QACI,KAAK,EAAE,qBAAqB;QAC5B,SAAS,EAAE;YACP,YAAY,EAAE,SAAS;YACvB,IAAI,EAAE,kBAAkB;YACxB,MAAM,EAAE,kEAAkE;YAC1E,QAAQ,EAAE,CACN,KAAC,kBAAkB,IACf,KAAK,EAAC,gCAAgC,EACtC,KAAK,EAAE;oBACH,MAAM,EAAE,OAAO;oBACf,KAAK,EAAE,OAAO;iBACjB,GACH,CACL;SACJ;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,iBAAiB,GAAwC,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;IACnF,cAAc,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;IAClC,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,YAAG,QAAQ,GAAa;IACtG,OAAO,EAAE;QACL;YACI,KAAK,EAAE,mBAAmB;YAC1B,SAAS,EAAE;gBACP,IAAI,EAAE,cAAc;gBACpB,MAAM,EAAE,gBAAgB;gBACxB,YAAY,EAAE;oBACV,KAAK,EAAE,oBAAoB;oBAC3B,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,6BAA6B,CAAC;iBACvD;gBACD,QAAQ,EAAE,SAAS;aACtB;SACJ;QACD,GAAG,OAAO;KACb;CACJ,CAAC,CAAC"}
|
|
@@ -1,11 +1,6 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { ElementProps } from '-/types/common';
|
|
2
3
|
export type ExamplePlaceholderProps = {
|
|
3
|
-
/**
|
|
4
|
-
* Whether to hide the size text.
|
|
5
|
-
*
|
|
6
|
-
* @default false
|
|
7
|
-
*/
|
|
8
|
-
hideSize?: boolean;
|
|
9
4
|
/**
|
|
10
5
|
* The height of the placeholder.
|
|
11
6
|
*
|
|
@@ -20,12 +15,10 @@ export type ExamplePlaceholderProps = {
|
|
|
20
15
|
* @type string
|
|
21
16
|
*/
|
|
22
17
|
width?: number | string;
|
|
23
|
-
/**
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
*/
|
|
28
|
-
direction?: 'column' | 'row';
|
|
18
|
+
/** An optional label for the placeholder. */
|
|
19
|
+
label?: string;
|
|
20
|
+
/** Optional children to display inside the placeholder instead of the label. */
|
|
21
|
+
children?: ReactNode;
|
|
29
22
|
};
|
|
30
23
|
/**
|
|
31
24
|
* A utility component that serves as a placeholder for examples.
|
|
@@ -33,4 +26,4 @@ export type ExamplePlaceholderProps = {
|
|
|
33
26
|
* @name ExamplePlaceholder
|
|
34
27
|
* @phase Utility
|
|
35
28
|
*/
|
|
36
|
-
export declare function ExamplePlaceholder({
|
|
29
|
+
export declare function ExamplePlaceholder({ height, width, label, children, ...props }: ElementProps<ExamplePlaceholderProps, 'div'>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { useRef } from 'react';
|
|
3
2
|
import { Txt } from '../Txt';
|
|
4
3
|
const dimension = (value) => (typeof value === 'number' ? `${value}px` : `${value}`);
|
|
5
4
|
/**
|
|
@@ -8,13 +7,19 @@ const dimension = (value) => (typeof value === 'number' ? `${value}px` : `${valu
|
|
|
8
7
|
* @name ExamplePlaceholder
|
|
9
8
|
* @phase Utility
|
|
10
9
|
*/
|
|
11
|
-
export function ExamplePlaceholder({
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
10
|
+
export function ExamplePlaceholder({ height = 100, width = '100%', label, children, ...props }) {
|
|
11
|
+
return (_jsx("div", { ...props, "data-bspk-utility": "example-placeholder", style: {
|
|
12
|
+
flexDirection: 'column',
|
|
13
|
+
gap: 'var(--spacing-sizing-01)',
|
|
15
14
|
width: dimension(width),
|
|
16
15
|
height: dimension(height),
|
|
17
|
-
|
|
18
|
-
|
|
16
|
+
background: 'var(--surface-neutral-t3-low)',
|
|
17
|
+
display: 'flex',
|
|
18
|
+
alignItems: 'center',
|
|
19
|
+
justifyContent: 'center',
|
|
20
|
+
textAlign: 'center',
|
|
21
|
+
font: 'var(--body-x-small)',
|
|
22
|
+
...props.style,
|
|
23
|
+
}, children: children || label || (_jsxs(_Fragment, { children: [_jsx(Txt, { variant: "labels-large", children: dimension(width) }), _jsx(Txt, { children: "\u00D7" }), _jsx(Txt, { variant: "labels-large", children: dimension(height) })] })) }));
|
|
19
24
|
}
|
|
20
25
|
//# sourceMappingURL=ExamplePlaceholder.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExamplePlaceholder.js","sourceRoot":"","sources":["../../../src/components/ExamplePlaceholder/ExamplePlaceholder.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"ExamplePlaceholder.js","sourceRoot":"","sources":["../../../src/components/ExamplePlaceholder/ExamplePlaceholder.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,GAAG,EAAE,MAAM,kBAAkB,CAAC;AAGvC,MAAM,SAAS,GAAG,CAAC,KAAsB,EAAE,EAAE,CAAC,CAAC,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,KAAK,IAAI,CAAC,CAAC,CAAC,GAAG,KAAK,EAAE,CAAC,CAAC;AAuBtG;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EAC/B,MAAM,GAAG,GAAG,EACZ,KAAK,GAAG,MAAM,EACd,KAAK,EACL,QAAQ,EACR,GAAG,KAAK,EACmC;IAC3C,OAAO,CACH,iBACQ,KAAK,uBACS,qBAAqB,EACvC,KAAK,EAAE;YACH,aAAa,EAAE,QAAQ;YACvB,GAAG,EAAE,0BAA0B;YAC/B,KAAK,EAAE,SAAS,CAAC,KAAK,CAAC;YACvB,MAAM,EAAE,SAAS,CAAC,MAAM,CAAC;YACzB,UAAU,EAAE,+BAA+B;YAC3C,OAAO,EAAE,MAAM;YACf,UAAU,EAAE,QAAQ;YACpB,cAAc,EAAE,QAAQ;YACxB,SAAS,EAAE,QAAQ;YACnB,IAAI,EAAE,qBAAqB;YAC3B,GAAG,KAAK,CAAC,KAAK;SACjB,YAEA,QAAQ,IAAI,KAAK,IAAI,CAClB,8BACI,KAAC,GAAG,IAAC,OAAO,EAAC,cAAc,YAAE,SAAS,CAAC,KAAK,CAAC,GAAO,EACpD,KAAC,GAAG,yBAAc,EAClB,KAAC,GAAG,IAAC,OAAO,EAAC,cAAc,YAAE,SAAS,CAAC,MAAM,CAAC,GAAO,IACtD,CACN,GACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -4,7 +4,7 @@ import { ButtonProps } from '-/components/Button';
|
|
|
4
4
|
import { ElementProps } from '-/types/common';
|
|
5
5
|
export type FabSize = 'medium' | 'small';
|
|
6
6
|
export type FabVariant = 'neutral' | 'primary' | 'secondary';
|
|
7
|
-
export type FabProps<As extends ElementType = ElementType> = Pick<ButtonProps<As>, 'as' | 'icon' | 'iconOnly' | 'innerRef' | 'onClick' | '
|
|
7
|
+
export type FabProps<As extends ElementType = ElementType> = Pick<ButtonProps<As>, 'aria-label' | 'as' | 'icon' | 'iconOnly' | 'innerRef' | 'onClick' | 'tooltip'> & Required<Pick<ButtonProps<As>, 'label'>> & {
|
|
8
8
|
/**
|
|
9
9
|
* The size of the button.
|
|
10
10
|
*
|
|
@@ -38,10 +38,12 @@ export type FabProps<As extends ElementType = ElementType> = Pick<ButtonProps<As
|
|
|
38
38
|
* import { SvgBolt } from '@bspk/icons/Bolt';
|
|
39
39
|
* import { Fab } from '@bspk/ui/Fab';
|
|
40
40
|
*
|
|
41
|
-
* <
|
|
41
|
+
* <div style={{ width: '100%', height: 100 }}>
|
|
42
|
+
* <Fab icon={<SvgBolt />} label="Example label" placement="bottom-right" variant="neutral" />
|
|
43
|
+
* </div>;
|
|
42
44
|
*
|
|
43
45
|
* @name Fab
|
|
44
|
-
* @phase
|
|
46
|
+
* @phase Stable
|
|
45
47
|
*/
|
|
46
48
|
export declare function Fab<As extends ElementType = ElementType>(props: AriaAttributes & ElementProps<FabProps<As>, As>): import("react/jsx-runtime").JSX.Element;
|
|
47
49
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -10,16 +10,18 @@ import { Tooltip } from '../Tooltip';
|
|
|
10
10
|
* import { SvgBolt } from '@bspk/icons/Bolt';
|
|
11
11
|
* import { Fab } from '@bspk/ui/Fab';
|
|
12
12
|
*
|
|
13
|
-
* <
|
|
13
|
+
* <div style={{ width: '100%', height: 100 }}>
|
|
14
|
+
* <Fab icon={<SvgBolt />} label="Example label" placement="bottom-right" variant="neutral" />
|
|
15
|
+
* </div>;
|
|
14
16
|
*
|
|
15
17
|
* @name Fab
|
|
16
|
-
* @phase
|
|
18
|
+
* @phase Stable
|
|
17
19
|
*/
|
|
18
20
|
export function Fab(props) {
|
|
19
|
-
const { size = 'small', variant = 'primary', iconOnly: iconOnlyProp = false, as: As = 'button', placement = 'bottom-right', container = 'local', label, icon,
|
|
21
|
+
const { 'aria-label': ariaLabel, size = 'small', variant = 'primary', iconOnly: iconOnlyProp = false, as: As = 'button', placement = 'bottom-right', container = 'local', label, icon, tooltip, innerRef, ...otherProps } = props;
|
|
20
22
|
// ignore iconOnly=true if there is no icon
|
|
21
23
|
const iconOnly = iconOnlyProp === true && !!icon;
|
|
22
|
-
const button = (triggerProps) => (_jsxs(As, { ...otherProps, ...triggerProps, "aria-label": label, "data-bspk": "fab", "data-container": container, "data-placement": placement, "data-position": container === 'page' ? 'fixed' : 'absolute', "data-round": iconOnly || undefined, "data-size": size, "data-variant": variant, onBlur: (e) => {
|
|
24
|
+
const button = (triggerProps) => (_jsxs(As, { ...otherProps, ...triggerProps, "aria-label": ariaLabel || label, "data-bspk": "fab", "data-container": container, "data-placement": placement, "data-position": container === 'page' ? 'fixed' : 'absolute', "data-round": iconOnly || undefined, "data-size": size, "data-variant": variant, onBlur: (e) => {
|
|
23
25
|
triggerProps.onBlur?.();
|
|
24
26
|
otherProps.onBlur?.(e);
|
|
25
27
|
}, onFocus: (e) => {
|
|
@@ -32,8 +34,8 @@ export function Fab(props) {
|
|
|
32
34
|
triggerProps.onMouseOver?.();
|
|
33
35
|
otherProps.onMouseOver?.(e);
|
|
34
36
|
}, ref: innerRef, children: [!!icon && isValidElement(icon) && (_jsx("span", { "aria-hidden": true, "data-fab-icon": true, children: icon })), !iconOnly && _jsx("span", { "data-fab-label": true, children: label })] }));
|
|
35
|
-
if (
|
|
36
|
-
return (_jsx(Tooltip, { label:
|
|
37
|
+
if (tooltip || iconOnly)
|
|
38
|
+
return (_jsx(Tooltip, { label: tooltip || label, placement: "top", children: button }));
|
|
37
39
|
return button({});
|
|
38
40
|
}
|
|
39
41
|
//# sourceMappingURL=Fab.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Fab.js","sourceRoot":"","sources":["../../../src/components/Fab/Fab.tsx"],"names":[],"mappings":";AAAA,OAAO,YAAY,CAAC;AACpB,OAAO,EAA+B,cAAc,EAAE,MAAM,OAAO,CAAC;AAEpE,OAAO,EAAE,OAAO,EAAuB,MAAM,sBAAsB,CAAC;AAsC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C;QAC5B,CAAC,EACD,YAAY,EAAE,CAAC,CAAC,EAAE,EAAE;YAChB,YAAY,CAAC,YAAY,EAAE,EAAE,CAAC;YAC9B,UAAU,CAAC,YAAY,EAAE,CAAC,CAAC,CAAC,CAAC;QACjC,CAAC,EACD,WAAW,EAAE,CAAC,CAAC,EAAE,EAAE;YACf,YAAY,CAAC,WAAW,EAAE,EAAE,CAAC;YAC7B,UAAU,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC;QAChC,CAAC,EACD,GAAG,EAAE,QAAQ,aAEZ,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,IAAI,CAC/B,8BAAmB,IAAI,mCAClB,IAAI,GACF,CACV,EACA,CAAC,QAAQ,IAAI,iDAAsB,KAAK,GAAQ,IAChD,CACR,CAAC;IAEF,IAAI,OAAO,IAAI,QAAQ;QACnB,OAAO,CACH,KAAC,OAAO,IAAC,KAAK,EAAE,OAAO,IAAI,KAAK,EAAE,SAAS,EAAC,KAAK,YAC5C,MAAM,GACD,CACb,CAAC;IAEN,OAAO,MAAM,CAAC,EAAE,CAAC,CAAC;AACtB,CAAC"}
|
|
@@ -2,3 +2,4 @@ import { FabProps } from './Fab';
|
|
|
2
2
|
import { ComponentExample } from '-/utils/demo';
|
|
3
3
|
export declare const presets: import("-/utils/demo").Preset<import("../Button").ButtonProps>[];
|
|
4
4
|
export declare const FabExample: ComponentExample<FabProps>;
|
|
5
|
+
export declare const Usage: () => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { SvgBolt } from '@bspk/icons/Bolt';
|
|
3
|
+
import { Fab } from './Fab';
|
|
1
4
|
import { ButtonExample } from '../Button/ButtonExample';
|
|
2
5
|
export const presets = ButtonExample.presets || [];
|
|
3
6
|
export const FabExample = {
|
|
@@ -23,4 +26,7 @@ export const FabExample = {
|
|
|
23
26
|
},
|
|
24
27
|
},
|
|
25
28
|
};
|
|
29
|
+
export const Usage = () => {
|
|
30
|
+
return (_jsx("div", { style: { width: '100%', height: 100 }, children: _jsx(Fab, { icon: _jsx(SvgBolt, {}), label: "Example label", placement: "bottom-right", variant: "neutral" }) }));
|
|
31
|
+
};
|
|
26
32
|
//# sourceMappingURL=FabExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FabExample.js","sourceRoot":"","sources":["../../../src/components/Fab/FabExample.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FabExample.js","sourceRoot":"","sources":["../../../src/components/Fab/FabExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,GAAG,EAAY,MAAM,OAAO,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAC;AAGlE,MAAM,CAAC,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,IAAI,EAAE,CAAC;AAEnD,MAAM,CAAC,MAAM,UAAU,GAA+B;IAClD,cAAc,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE;IACpE,OAAO,EAAE,aAAa,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QAC7C,GAAG,MAAM;QACT,SAAS,EAAE;YACP,GAAG,MAAM,CAAC,SAAS;YACnB,IAAI,EAAE,SAAS;YACf,OAAO,EAAE,SAAS;SACrB;KACJ,CAAC,CAAC;IACH,YAAY,EAAE;QACV,SAAS,EAAE,OAAO;QAClB,SAAS,EAAE,cAAc;KAC5B;IACD,QAAQ,EAAE;QACN,SAAS,EAAE,KAAK;QAChB,SAAS,EAAE,KAAK;QAChB,QAAQ,EAAE;YACN,IAAI,EAAE,UAAU;YAChB,KAAK,EAAE,WAAW;SACrB;KACJ;CACJ,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACtB,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,YACtC,KAAC,GAAG,IAAC,IAAI,EAAE,KAAC,OAAO,KAAG,EAAE,KAAK,EAAC,eAAe,EAAC,SAAS,EAAC,cAAc,EAAC,OAAO,EAAC,SAAS,GAAG,GACzF,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -11,9 +11,6 @@
|
|
|
11
11
|
z-index: var(--z-index-fab);
|
|
12
12
|
box-shadow: var(--drop-shadow-float);
|
|
13
13
|
border-radius: var(--radius-sm);
|
|
14
|
-
background: var(--variant-background);
|
|
15
|
-
color: var(--variant-foreground);
|
|
16
|
-
--variant-gradient: linear-gradient(var(--variant-background), var(--variant-background));
|
|
17
14
|
}
|
|
18
15
|
[data-bspk=fab][data-container=page] {
|
|
19
16
|
position: fixed;
|
|
@@ -75,6 +72,11 @@
|
|
|
75
72
|
--variant-background: var(--surface-neutral-t1-base);
|
|
76
73
|
--variant-foreground: var(--foreground-neutral-on-surface-variant-01);
|
|
77
74
|
}
|
|
75
|
+
[data-bspk=fab] {
|
|
76
|
+
background: var(--variant-background);
|
|
77
|
+
color: var(--variant-foreground);
|
|
78
|
+
--variant-gradient: linear-gradient(var(--variant-background), var(--variant-background));
|
|
79
|
+
}
|
|
78
80
|
[data-pseudo=hover] > [data-bspk=fab], [data-bspk=fab]:hover {
|
|
79
81
|
background: linear-gradient(var(--interactions-brand-hover-opacity), var(--interactions-brand-hover-opacity)), var(--variant-gradient);
|
|
80
82
|
}
|
|
@@ -14,9 +14,6 @@ style.appendChild(document.createTextNode(`[data-bspk=fab] {
|
|
|
14
14
|
z-index: var(--z-index-fab);
|
|
15
15
|
box-shadow: var(--drop-shadow-float);
|
|
16
16
|
border-radius: var(--radius-sm);
|
|
17
|
-
background: var(--variant-background);
|
|
18
|
-
color: var(--variant-foreground);
|
|
19
|
-
--variant-gradient: linear-gradient(var(--variant-background), var(--variant-background));
|
|
20
17
|
}
|
|
21
18
|
[data-bspk=fab][data-container=page] {
|
|
22
19
|
position: fixed;
|
|
@@ -78,6 +75,11 @@ style.appendChild(document.createTextNode(`[data-bspk=fab] {
|
|
|
78
75
|
--variant-background: var(--surface-neutral-t1-base);
|
|
79
76
|
--variant-foreground: var(--foreground-neutral-on-surface-variant-01);
|
|
80
77
|
}
|
|
78
|
+
[data-bspk=fab] {
|
|
79
|
+
background: var(--variant-background);
|
|
80
|
+
color: var(--variant-foreground);
|
|
81
|
+
--variant-gradient: linear-gradient(var(--variant-background), var(--variant-background));
|
|
82
|
+
}
|
|
81
83
|
[data-pseudo=hover] > [data-bspk=fab], [data-bspk=fab]:hover {
|
|
82
84
|
background: linear-gradient(var(--interactions-brand-hover-opacity), var(--interactions-brand-hover-opacity)), var(--variant-gradient);
|
|
83
85
|
}
|
|
@@ -81,7 +81,7 @@ export type FileUploadProps = Pick<FileUploadItemProps, 'cancelButtonLabel' | 'o
|
|
|
81
81
|
* };
|
|
82
82
|
*
|
|
83
83
|
* @name FileUpload
|
|
84
|
-
* @phase
|
|
84
|
+
* @phase Stable
|
|
85
85
|
*/
|
|
86
86
|
export declare function FileUpload({ dragAndDrop, multipleFiles, uploadSubtitle, maxFileSize, acceptedFileTypes, files, onUpload, onError, onCancel, cancelButtonLabel, }: FileUploadProps): import("react/jsx-runtime").JSX.Element;
|
|
87
87
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -32,7 +32,7 @@ const MB = 1048576;
|
|
|
32
32
|
* };
|
|
33
33
|
*
|
|
34
34
|
* @name FileUpload
|
|
35
|
-
* @phase
|
|
35
|
+
* @phase Stable
|
|
36
36
|
*/
|
|
37
37
|
export function FileUpload({ dragAndDrop = false, multipleFiles = false, uploadSubtitle, maxFileSize = 2, acceptedFileTypes = [], files = [], onUpload, onError, onCancel, cancelButtonLabel = 'Cancel', }) {
|
|
38
38
|
const fileInputRef = useRef(null);
|
|
@@ -30,7 +30,7 @@ export type FileUploadItemProps = FileEntry & {
|
|
|
30
30
|
* />;
|
|
31
31
|
*
|
|
32
32
|
* @name FileUploadItem
|
|
33
|
-
* @phase
|
|
33
|
+
* @phase Stable
|
|
34
34
|
*/
|
|
35
35
|
export declare function FileUploadItem({ fileName, status, fileSize, onCancel, cancelButtonLabel: onCancelToolTip, progress, errorMessage, }: FileUploadItemProps): import("react/jsx-runtime").JSX.Element;
|
|
36
36
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -23,7 +23,7 @@ import { DEFAULT_ERROR_MESSAGE } from '../../utils/fileUploads';
|
|
|
23
23
|
* />;
|
|
24
24
|
*
|
|
25
25
|
* @name FileUploadItem
|
|
26
|
-
* @phase
|
|
26
|
+
* @phase Stable
|
|
27
27
|
*/
|
|
28
28
|
export function FileUploadItem({ fileName = '', status, fileSize, onCancel, cancelButtonLabel: onCancelToolTip = 'Cancel', progress = 0, errorMessage = DEFAULT_ERROR_MESSAGE, }) {
|
|
29
29
|
const subText = [fileSizeFormat(fileSize), status].filter(Boolean).join(' • ');
|