@bspk/ui 1.0.0
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/Accordion.d.ts +20 -0
- package/Accordion.js +18 -0
- package/Accordion.js.map +1 -0
- package/Badge.d.ts +33 -0
- package/Badge.js +43 -0
- package/Badge.js.map +1 -0
- package/BannerAlert.d.ts +53 -0
- package/BannerAlert.js +133 -0
- package/BannerAlert.js.map +1 -0
- package/BottomNavigation.d.ts +20 -0
- package/BottomNavigation.js +18 -0
- package/BottomNavigation.js.map +1 -0
- package/BottomSheet.d.ts +20 -0
- package/BottomSheet.js +18 -0
- package/BottomSheet.js.map +1 -0
- package/Breadcrumb.d.ts +20 -0
- package/Breadcrumb.js +18 -0
- package/Breadcrumb.js.map +1 -0
- package/Button.d.ts +66 -0
- package/Button.js +254 -0
- package/Button.js.map +1 -0
- package/ButtonDock.d.ts +20 -0
- package/ButtonDock.js +18 -0
- package/ButtonDock.js.map +1 -0
- package/CODE_OF_CONDUCT.md +137 -0
- package/CONTRIBUTING.md +42 -0
- package/Card.d.ts +37 -0
- package/Card.js +38 -0
- package/Card.js.map +1 -0
- package/Chart.d.ts +20 -0
- package/Chart.js +18 -0
- package/Chart.js.map +1 -0
- package/Checkbox.d.ts +26 -0
- package/Checkbox.js +123 -0
- package/Checkbox.js.map +1 -0
- package/CheckboxGroup.d.ts +49 -0
- package/CheckboxGroup.js +18 -0
- package/CheckboxGroup.js.map +1 -0
- package/CheckboxOption.d.ts +14 -0
- package/CheckboxOption.js +16 -0
- package/CheckboxOption.js.map +1 -0
- package/Chip.d.ts +50 -0
- package/Chip.js +87 -0
- package/Chip.js.map +1 -0
- package/DatePicker.d.ts +20 -0
- package/DatePicker.js +18 -0
- package/DatePicker.js.map +1 -0
- package/Dialog.d.ts +46 -0
- package/Dialog.js +221 -0
- package/Dialog.js.map +1 -0
- package/Divider.d.ts +44 -0
- package/Divider.js +76 -0
- package/Divider.js.map +1 -0
- package/Drawer.d.ts +20 -0
- package/Drawer.js +18 -0
- package/Drawer.js.map +1 -0
- package/Dropdown.d.ts +50 -0
- package/Dropdown.js +153 -0
- package/Dropdown.js.map +1 -0
- package/DropdownField.d.ts +16 -0
- package/DropdownField.js +19 -0
- package/DropdownField.js.map +1 -0
- package/EmptyState.d.ts +35 -0
- package/EmptyState.js +20 -0
- package/EmptyState.js.map +1 -0
- package/Fab.d.ts +43 -0
- package/Fab.js +146 -0
- package/Fab.js.map +1 -0
- package/FileUpload.d.ts +20 -0
- package/FileUpload.js +18 -0
- package/FileUpload.js.map +1 -0
- package/FormField.d.ts +48 -0
- package/FormField.js +39 -0
- package/FormField.js.map +1 -0
- package/GUIDELINES.md +41 -0
- package/Image.d.ts +20 -0
- package/Image.js +18 -0
- package/Image.js.map +1 -0
- package/Img.d.ts +26 -0
- package/Img.js +20 -0
- package/Img.js.map +1 -0
- package/InlineAlert.d.ts +31 -0
- package/InlineAlert.js +73 -0
- package/InlineAlert.js.map +1 -0
- package/LICENSE +395 -0
- package/Layout.d.ts +48 -0
- package/Layout.js +24 -0
- package/Layout.js.map +1 -0
- package/Link.d.ts +38 -0
- package/Link.js +37 -0
- package/Link.js.map +1 -0
- package/ListItem.d.ts +68 -0
- package/ListItem.js +207 -0
- package/ListItem.js.map +1 -0
- package/Menu.d.ts +86 -0
- package/Menu.js +98 -0
- package/Menu.js.map +1 -0
- package/MenuButton.d.ts +16 -0
- package/MenuButton.js +30 -0
- package/MenuButton.js.map +1 -0
- package/Modal.d.ts +31 -0
- package/Modal.js +53 -0
- package/Modal.js.map +1 -0
- package/MultiSelection.d.ts +20 -0
- package/MultiSelection.js +18 -0
- package/MultiSelection.js.map +1 -0
- package/NavigationRail.d.ts +20 -0
- package/NavigationRail.js +18 -0
- package/NavigationRail.js.map +1 -0
- package/NumberField.d.ts +17 -0
- package/NumberField.js +20 -0
- package/NumberField.js.map +1 -0
- package/NumberInput.d.ts +34 -0
- package/NumberInput.js +188 -0
- package/NumberInput.js.map +1 -0
- package/OTPInput.d.ts +20 -0
- package/OTPInput.js +18 -0
- package/OTPInput.js.map +1 -0
- package/PageControl.d.ts +20 -0
- package/PageControl.js +18 -0
- package/PageControl.js.map +1 -0
- package/PasswordInput.d.ts +20 -0
- package/PasswordInput.js +18 -0
- package/PasswordInput.js.map +1 -0
- package/PhoneNumberInput.d.ts +20 -0
- package/PhoneNumberInput.js +18 -0
- package/PhoneNumberInput.js.map +1 -0
- package/Popover.d.ts +44 -0
- package/Popover.js +152 -0
- package/Popover.js.map +1 -0
- package/Portal.d.ts +24 -0
- package/Portal.js +23 -0
- package/Portal.js.map +1 -0
- package/Profile.d.ts +41 -0
- package/Profile.js +83 -0
- package/Profile.js.map +1 -0
- package/ProgressBar.d.ts +38 -0
- package/ProgressBar.js +64 -0
- package/ProgressBar.js.map +1 -0
- package/ProgressCircle.d.ts +31 -0
- package/ProgressCircle.js +82 -0
- package/ProgressCircle.js.map +1 -0
- package/ProgressionStepper.d.ts +66 -0
- package/ProgressionStepper.js +197 -0
- package/ProgressionStepper.js.map +1 -0
- package/ProgressionStepperBar.d.ts +31 -0
- package/ProgressionStepperBar.js +51 -0
- package/ProgressionStepperBar.js.map +1 -0
- package/README.md +13 -0
- package/Radio.d.ts +17 -0
- package/Radio.js +97 -0
- package/Radio.js.map +1 -0
- package/RadioGroup.d.ts +31 -0
- package/RadioGroup.js +18 -0
- package/RadioGroup.js.map +1 -0
- package/RadioOption.d.ts +14 -0
- package/RadioOption.js +16 -0
- package/RadioOption.js.map +1 -0
- package/Rating.d.ts +16 -0
- package/Rating.js +18 -0
- package/Rating.js.map +1 -0
- package/SearchBar.d.ts +26 -0
- package/SearchBar.js +49 -0
- package/SearchBar.js.map +1 -0
- package/SegmentedControl.d.ts +69 -0
- package/SegmentedControl.js +136 -0
- package/SegmentedControl.js.map +1 -0
- package/Skeleton.d.ts +28 -0
- package/Skeleton.js +57 -0
- package/Skeleton.js.map +1 -0
- package/SliderInput.d.ts +16 -0
- package/SliderInput.js +18 -0
- package/SliderInput.js.map +1 -0
- package/Snackbar.d.ts +16 -0
- package/Snackbar.js +18 -0
- package/Snackbar.js.map +1 -0
- package/StylesProviderAnywhere.d.ts +10 -0
- package/StylesProviderAnywhere.js +29 -0
- package/StylesProviderAnywhere.js.map +1 -0
- package/StylesProviderBetterHomesGardens.d.ts +10 -0
- package/StylesProviderBetterHomesGardens.js +29 -0
- package/StylesProviderBetterHomesGardens.js.map +1 -0
- package/StylesProviderCartus.d.ts +10 -0
- package/StylesProviderCartus.js +29 -0
- package/StylesProviderCartus.js.map +1 -0
- package/StylesProviderCentury21.d.ts +10 -0
- package/StylesProviderCentury21.js +29 -0
- package/StylesProviderCentury21.js.map +1 -0
- package/StylesProviderColdwellBanker.d.ts +10 -0
- package/StylesProviderColdwellBanker.js +29 -0
- package/StylesProviderColdwellBanker.js.map +1 -0
- package/StylesProviderCorcoran.d.ts +10 -0
- package/StylesProviderCorcoran.js +29 -0
- package/StylesProviderCorcoran.js.map +1 -0
- package/StylesProviderDenaliBoss.d.ts +10 -0
- package/StylesProviderDenaliBoss.js +29 -0
- package/StylesProviderDenaliBoss.js.map +1 -0
- package/StylesProviderEra.d.ts +10 -0
- package/StylesProviderEra.js +29 -0
- package/StylesProviderEra.js.map +1 -0
- package/StylesProviderSothebys.d.ts +10 -0
- package/StylesProviderSothebys.js +29 -0
- package/StylesProviderSothebys.js.map +1 -0
- package/Switch.d.ts +33 -0
- package/Switch.js +85 -0
- package/Switch.js.map +1 -0
- package/SwitchGroup.d.ts +35 -0
- package/SwitchGroup.js +18 -0
- package/SwitchGroup.js.map +1 -0
- package/SwitchOption.d.ts +14 -0
- package/SwitchOption.js +16 -0
- package/SwitchOption.js.map +1 -0
- package/TabGroup.d.ts +73 -0
- package/TabGroup.js +119 -0
- package/TabGroup.js.map +1 -0
- package/Table.d.ts +45 -0
- package/Table.js +66 -0
- package/Table.js.map +1 -0
- package/Tag.d.ts +56 -0
- package/Tag.js +77 -0
- package/Tag.js.map +1 -0
- package/TextField.d.ts +16 -0
- package/TextField.js +19 -0
- package/TextField.js.map +1 -0
- package/TextInput.d.ts +45 -0
- package/TextInput.js +172 -0
- package/TextInput.js.map +1 -0
- package/Textarea.d.ts +63 -0
- package/Textarea.js +113 -0
- package/Textarea.js.map +1 -0
- package/TextareaField.d.ts +16 -0
- package/TextareaField.js +26 -0
- package/TextareaField.js.map +1 -0
- package/TimePicker.d.ts +16 -0
- package/TimePicker.js +18 -0
- package/TimePicker.js.map +1 -0
- package/ToggleOption.d.ts +27 -0
- package/ToggleOption.js +91 -0
- package/ToggleOption.js.map +1 -0
- package/Tooltip.d.ts +39 -0
- package/Tooltip.js +104 -0
- package/Tooltip.js.map +1 -0
- package/TopNavigation.d.ts +16 -0
- package/TopNavigation.js +18 -0
- package/TopNavigation.js.map +1 -0
- package/Txt.d.ts +38 -0
- package/Txt.js +21 -0
- package/Txt.js.map +1 -0
- package/hooks/useCheckboxGroupState.d.ts +37 -0
- package/hooks/useCheckboxGroupState.js +61 -0
- package/hooks/useCheckboxGroupState.js.map +1 -0
- package/hooks/useCheckboxState.d.ts +23 -0
- package/hooks/useCheckboxState.js +40 -0
- package/hooks/useCheckboxState.js.map +1 -0
- package/hooks/useFloating.d.ts +38 -0
- package/hooks/useFloating.js +156 -0
- package/hooks/useFloating.js.map +1 -0
- package/hooks/useFloatingMenu.d.ts +35 -0
- package/hooks/useFloatingMenu.js +71 -0
- package/hooks/useFloatingMenu.js.map +1 -0
- package/hooks/useId.d.ts +8 -0
- package/hooks/useId.js +16 -0
- package/hooks/useId.js.map +1 -0
- package/hooks/useKeyboardNavigation.d.ts +35 -0
- package/hooks/useKeyboardNavigation.js +79 -0
- package/hooks/useKeyboardNavigation.js.map +1 -0
- package/hooks/useLongPress.d.ts +11 -0
- package/hooks/useLongPress.js +49 -0
- package/hooks/useLongPress.js.map +1 -0
- package/hooks/useModalState.d.ts +22 -0
- package/hooks/useModalState.js +37 -0
- package/hooks/useModalState.js.map +1 -0
- package/hooks/useNavOptions.d.ts +28 -0
- package/hooks/useNavOptions.js +46 -0
- package/hooks/useNavOptions.js.map +1 -0
- package/hooks/useOutsideClick.d.ts +31 -0
- package/hooks/useOutsideClick.js +50 -0
- package/hooks/useOutsideClick.js.map +1 -0
- package/hooks/useRadioState.d.ts +23 -0
- package/hooks/useRadioState.js +38 -0
- package/hooks/useRadioState.js.map +1 -0
- package/hooks/useSwitchGroupState.d.ts +37 -0
- package/hooks/useSwitchGroupState.js +60 -0
- package/hooks/useSwitchGroupState.js.map +1 -0
- package/hooks/useTimeout.d.ts +26 -0
- package/hooks/useTimeout.js +45 -0
- package/hooks/useTimeout.js.map +1 -0
- package/hooks/useValidChildren.d.ts +6 -0
- package/hooks/useValidChildren.js +33 -0
- package/hooks/useValidChildren.js.map +1 -0
- package/index.d.ts +125 -0
- package/index.js +20 -0
- package/index.js.map +1 -0
- package/meta.d.ts +44 -0
- package/meta.js +5789 -0
- package/meta.js.map +1 -0
- package/package.json +73 -0
- package/src/Accordion.tsx +33 -0
- package/src/Badge.tsx +75 -0
- package/src/BannerAlert.tsx +211 -0
- package/src/BottomNavigation.tsx +33 -0
- package/src/BottomSheet.tsx +33 -0
- package/src/Breadcrumb.tsx +33 -0
- package/src/Button.tsx +358 -0
- package/src/ButtonDock.tsx +33 -0
- package/src/Card.tsx +66 -0
- package/src/Chart.tsx +33 -0
- package/src/Checkbox.tsx +174 -0
- package/src/CheckboxGroup.tsx +95 -0
- package/src/CheckboxOption.tsx +27 -0
- package/src/Chip.tsx +155 -0
- package/src/DatePicker.tsx +33 -0
- package/src/Dialog.tsx +304 -0
- package/src/Divider.tsx +129 -0
- package/src/Drawer.tsx +33 -0
- package/src/Dropdown.tsx +251 -0
- package/src/DropdownField.tsx +57 -0
- package/src/EmptyState.tsx +73 -0
- package/src/Fab.tsx +222 -0
- package/src/FileUpload.tsx +33 -0
- package/src/FormField.tsx +107 -0
- package/src/Image.tsx +33 -0
- package/src/Img.tsx +39 -0
- package/src/InlineAlert.tsx +119 -0
- package/src/Layout.tsx +82 -0
- package/src/Link.tsx +82 -0
- package/src/ListItem.tsx +316 -0
- package/src/Menu.tsx +263 -0
- package/src/MenuButton.tsx +45 -0
- package/src/Modal.tsx +104 -0
- package/src/MultiSelection.tsx +33 -0
- package/src/NavigationRail.tsx +33 -0
- package/src/NumberField.tsx +47 -0
- package/src/NumberInput.tsx +282 -0
- package/src/OTPInput.tsx +33 -0
- package/src/PageControl.tsx +33 -0
- package/src/PasswordInput.tsx +33 -0
- package/src/PhoneNumberInput.tsx +33 -0
- package/src/Popover.tsx +237 -0
- package/src/Portal.tsx +36 -0
- package/src/Profile.tsx +140 -0
- package/src/ProgressBar.tsx +110 -0
- package/src/ProgressCircle.tsx +153 -0
- package/src/ProgressionStepper.tsx +294 -0
- package/src/ProgressionStepperBar.tsx +95 -0
- package/src/Radio.tsx +119 -0
- package/src/RadioGroup.tsx +62 -0
- package/src/RadioOption.tsx +24 -0
- package/src/Rating.tsx +29 -0
- package/src/SearchBar.tsx +121 -0
- package/src/SegmentedControl.tsx +233 -0
- package/src/Skeleton.tsx +90 -0
- package/src/SliderInput.tsx +29 -0
- package/src/Snackbar.tsx +29 -0
- package/src/StylesProviderAnywhere.tsx +31 -0
- package/src/StylesProviderBetterHomesGardens.tsx +31 -0
- package/src/StylesProviderCartus.tsx +31 -0
- package/src/StylesProviderCentury21.tsx +31 -0
- package/src/StylesProviderColdwellBanker.tsx +31 -0
- package/src/StylesProviderCorcoran.tsx +31 -0
- package/src/StylesProviderDenaliBoss.tsx +31 -0
- package/src/StylesProviderEra.tsx +31 -0
- package/src/StylesProviderSothebys.tsx +31 -0
- package/src/Switch.tsx +122 -0
- package/src/SwitchGroup.tsx +60 -0
- package/src/SwitchOption.tsx +24 -0
- package/src/TabGroup.tsx +219 -0
- package/src/Table.tsx +126 -0
- package/src/Tag.tsx +149 -0
- package/src/TextField.tsx +61 -0
- package/src/TextInput.tsx +265 -0
- package/src/Textarea.tsx +205 -0
- package/src/TextareaField.tsx +67 -0
- package/src/TimePicker.tsx +29 -0
- package/src/ToggleOption.tsx +117 -0
- package/src/Tooltip.tsx +170 -0
- package/src/TopNavigation.tsx +29 -0
- package/src/Txt.tsx +69 -0
- package/src/hooks/useCheckboxGroupState.ts +79 -0
- package/src/hooks/useCheckboxState.ts +48 -0
- package/src/hooks/useFloating.ts +202 -0
- package/src/hooks/useFloatingMenu.ts +110 -0
- package/src/hooks/useId.ts +14 -0
- package/src/hooks/useKeyboardNavigation.ts +98 -0
- package/src/hooks/useLongPress.ts +53 -0
- package/src/hooks/useModalState.ts +37 -0
- package/src/hooks/useNavOptions.ts +76 -0
- package/src/hooks/useOutsideClick.ts +51 -0
- package/src/hooks/useRadioState.ts +42 -0
- package/src/hooks/useSwitchGroupState.ts +75 -0
- package/src/hooks/useTimeout.ts +45 -0
- package/src/hooks/useValidChildren.ts +54 -0
- package/src/index.ts +160 -0
- package/src/meta.ts +6238 -0
- package/src/package.json +3 -0
- package/src/styles/anywhere.css +1693 -0
- package/src/styles/anywhere.ts +1694 -0
- package/src/styles/base.css +160 -0
- package/src/styles/base.ts +161 -0
- package/src/styles/better-homes-gardens.css +1693 -0
- package/src/styles/better-homes-gardens.ts +1694 -0
- package/src/styles/cartus.css +1691 -0
- package/src/styles/cartus.ts +1692 -0
- package/src/styles/century-21.css +1689 -0
- package/src/styles/century-21.ts +1690 -0
- package/src/styles/coldwell-banker.css +1691 -0
- package/src/styles/coldwell-banker.ts +1692 -0
- package/src/styles/corcoran.css +1685 -0
- package/src/styles/corcoran.ts +1686 -0
- package/src/styles/denali-boss.css +1681 -0
- package/src/styles/denali-boss.ts +1682 -0
- package/src/styles/era.css +1685 -0
- package/src/styles/era.ts +1686 -0
- package/src/styles/sothebys.css +1677 -0
- package/src/styles/sothebys.ts +1678 -0
- package/src/utils/children.ts +80 -0
- package/src/utils/colorVariants.ts +74 -0
- package/src/utils/errors.tsx +104 -0
- package/src/utils/getValidNode.ts +7 -0
- package/src/utils/keyboard.ts +382 -0
- package/src/utils/placeholder.test.ts +7 -0
- package/src/utils/ref.ts +11 -0
- package/src/utils/scrollElementIntoView.ts +29 -0
- package/src/utils/srOnly.ts +14 -0
- package/src/utils/tryIntPsrse.ts +7 -0
- package/src/utils/txtVariants.ts +53 -0
- package/styles/anywhere.css +1693 -0
- package/styles/anywhere.d.ts +2 -0
- package/styles/anywhere.js +1697 -0
- package/styles/anywhere.js.map +1 -0
- package/styles/anywhere.ts +1694 -0
- package/styles/base.css +160 -0
- package/styles/base.d.ts +2 -0
- package/styles/base.js +164 -0
- package/styles/base.js.map +1 -0
- package/styles/base.ts +161 -0
- package/styles/better-homes-gardens.css +1693 -0
- package/styles/better-homes-gardens.d.ts +2 -0
- package/styles/better-homes-gardens.js +1697 -0
- package/styles/better-homes-gardens.js.map +1 -0
- package/styles/better-homes-gardens.ts +1694 -0
- package/styles/cartus.css +1691 -0
- package/styles/cartus.d.ts +2 -0
- package/styles/cartus.js +1695 -0
- package/styles/cartus.js.map +1 -0
- package/styles/cartus.ts +1692 -0
- package/styles/century-21.css +1689 -0
- package/styles/century-21.d.ts +2 -0
- package/styles/century-21.js +1693 -0
- package/styles/century-21.js.map +1 -0
- package/styles/century-21.ts +1690 -0
- package/styles/coldwell-banker.css +1691 -0
- package/styles/coldwell-banker.d.ts +2 -0
- package/styles/coldwell-banker.js +1695 -0
- package/styles/coldwell-banker.js.map +1 -0
- package/styles/coldwell-banker.ts +1692 -0
- package/styles/corcoran.css +1685 -0
- package/styles/corcoran.d.ts +2 -0
- package/styles/corcoran.js +1689 -0
- package/styles/corcoran.js.map +1 -0
- package/styles/corcoran.ts +1686 -0
- package/styles/denali-boss.css +1681 -0
- package/styles/denali-boss.d.ts +2 -0
- package/styles/denali-boss.js +1685 -0
- package/styles/denali-boss.js.map +1 -0
- package/styles/denali-boss.ts +1682 -0
- package/styles/era.css +1685 -0
- package/styles/era.d.ts +2 -0
- package/styles/era.js +1689 -0
- package/styles/era.js.map +1 -0
- package/styles/era.ts +1686 -0
- package/styles/sothebys.css +1677 -0
- package/styles/sothebys.d.ts +2 -0
- package/styles/sothebys.js +1681 -0
- package/styles/sothebys.js.map +1 -0
- package/styles/sothebys.ts +1678 -0
- package/utils/children.d.ts +29 -0
- package/utils/children.js +70 -0
- package/utils/children.js.map +1 -0
- package/utils/colorVariants.d.ts +5 -0
- package/utils/colorVariants.js +61 -0
- package/utils/colorVariants.js.map +1 -0
- package/utils/errors.d.ts +36 -0
- package/utils/errors.js +65 -0
- package/utils/errors.js.map +1 -0
- package/utils/getValidNode.d.ts +2 -0
- package/utils/getValidNode.js +9 -0
- package/utils/getValidNode.js.map +1 -0
- package/utils/keyboard.d.ts +4 -0
- package/utils/keyboard.js +140 -0
- package/utils/keyboard.js.map +1 -0
- package/utils/ref.d.ts +5 -0
- package/utils/ref.js +10 -0
- package/utils/ref.js.map +1 -0
- package/utils/scrollElementIntoView.d.ts +8 -0
- package/utils/scrollElementIntoView.js +30 -0
- package/utils/scrollElementIntoView.js.map +1 -0
- package/utils/srOnly.d.ts +14 -0
- package/utils/srOnly.js +15 -0
- package/utils/srOnly.js.map +1 -0
- package/utils/tryIntPsrse.d.ts +2 -0
- package/utils/tryIntPsrse.js +10 -0
- package/utils/tryIntPsrse.js.map +1 -0
- package/utils/txtVariants.d.ts +2 -0
- package/utils/txtVariants.js +30 -0
- package/utils/txtVariants.js.map +1 -0
|
@@ -0,0 +1,211 @@
|
|
|
1
|
+
import { SvgCheckCircleFill } from '@bspk/icons/CheckCircleFill';
|
|
2
|
+
import { SvgClose } from '@bspk/icons/Close';
|
|
3
|
+
import { SvgErrorFill } from '@bspk/icons/ErrorFill';
|
|
4
|
+
import { SvgInfoFill } from '@bspk/icons/InfoFill';
|
|
5
|
+
import { SvgWarningFill } from '@bspk/icons/WarningFill';
|
|
6
|
+
import { css } from '@emotion/react';
|
|
7
|
+
|
|
8
|
+
import { ElementProps, AlertVariant, CallToActionButton } from './';
|
|
9
|
+
|
|
10
|
+
export type BannerAlertProps = {
|
|
11
|
+
/**
|
|
12
|
+
* The color variant of the banner alert.
|
|
13
|
+
*
|
|
14
|
+
* @default informational
|
|
15
|
+
*/
|
|
16
|
+
variant?: AlertVariant;
|
|
17
|
+
/**
|
|
18
|
+
* The function to call when the banner alert is closed. If not included the close button will not be displayed.
|
|
19
|
+
*
|
|
20
|
+
* @type () => void
|
|
21
|
+
*/
|
|
22
|
+
onClose?: () => void;
|
|
23
|
+
/**
|
|
24
|
+
* The header of the banner alert.
|
|
25
|
+
*
|
|
26
|
+
* @required
|
|
27
|
+
*/
|
|
28
|
+
header: string;
|
|
29
|
+
/**
|
|
30
|
+
* The children of the banner alert.
|
|
31
|
+
*
|
|
32
|
+
* @type multiline
|
|
33
|
+
* @required
|
|
34
|
+
*/
|
|
35
|
+
children: string;
|
|
36
|
+
/**
|
|
37
|
+
* This property may be undefined or an object containing required CallToActionButton properties.
|
|
38
|
+
*
|
|
39
|
+
* @type CallToActionButton
|
|
40
|
+
*/
|
|
41
|
+
callToAction?: CallToActionButton;
|
|
42
|
+
/**
|
|
43
|
+
* Is the alert elevated. If true a drop shadow is added.
|
|
44
|
+
*
|
|
45
|
+
* @default false
|
|
46
|
+
*/
|
|
47
|
+
elevated?: boolean;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
/**
|
|
51
|
+
* A visual and contextual message used to communicate an important message or notification to users relating to a
|
|
52
|
+
* status or the body content of a page.
|
|
53
|
+
*
|
|
54
|
+
* @name BannerAlert
|
|
55
|
+
*/
|
|
56
|
+
function BannerAlert({
|
|
57
|
+
variant = 'informational',
|
|
58
|
+
onClose,
|
|
59
|
+
header,
|
|
60
|
+
callToAction,
|
|
61
|
+
children,
|
|
62
|
+
elevated = false,
|
|
63
|
+
}: ElementProps<BannerAlertProps, 'div'>) {
|
|
64
|
+
return (
|
|
65
|
+
<article css={style} data-banner-alert data-elevated={elevated || undefined} data-variant={variant}>
|
|
66
|
+
<div data-icon-bar>
|
|
67
|
+
{variant === 'error' && <SvgErrorFill />}
|
|
68
|
+
{variant === 'informational' && <SvgInfoFill />}
|
|
69
|
+
{variant === 'success' && <SvgCheckCircleFill />}
|
|
70
|
+
{variant === 'warning' && <SvgWarningFill />}
|
|
71
|
+
</div>
|
|
72
|
+
<div data-content>
|
|
73
|
+
{(header || onClose) && (
|
|
74
|
+
<header>
|
|
75
|
+
<span>{header}</span>
|
|
76
|
+
{typeof onClose === 'function' && (
|
|
77
|
+
<button aria-label="Close" onClick={onClose} type="button">
|
|
78
|
+
<SvgClose />
|
|
79
|
+
</button>
|
|
80
|
+
)}
|
|
81
|
+
</header>
|
|
82
|
+
)}
|
|
83
|
+
<div data-body>
|
|
84
|
+
<span>{children}</span>
|
|
85
|
+
{callToAction?.label && callToAction?.onClick && (
|
|
86
|
+
<button onClick={callToAction.onClick}>{callToAction.label}</button>
|
|
87
|
+
)}
|
|
88
|
+
</div>
|
|
89
|
+
</div>
|
|
90
|
+
</article>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
BannerAlert.bspkName = 'BannerAlert';
|
|
95
|
+
|
|
96
|
+
export { BannerAlert };
|
|
97
|
+
|
|
98
|
+
export const style = css`
|
|
99
|
+
--color: var(--status-information);
|
|
100
|
+
--on-color: var(--status-on-information);
|
|
101
|
+
display: flex;
|
|
102
|
+
flex-direction: row;
|
|
103
|
+
border: 2px solid var(--color);
|
|
104
|
+
border-radius: var(--radius-medium);
|
|
105
|
+
box-sizing: border-box;
|
|
106
|
+
background-color: var(--surface-neutral-t1-base);
|
|
107
|
+
width: 100%;
|
|
108
|
+
|
|
109
|
+
&[data-variant='error'] {
|
|
110
|
+
--color: var(--status-error);
|
|
111
|
+
--on-color: var(--status-on-error);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
&[data-variant='success'] {
|
|
115
|
+
--color: var(--status-success);
|
|
116
|
+
--on-color: var(--status-on-success);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
&[data-variant='warning'] {
|
|
120
|
+
--color: var(--status-warning);
|
|
121
|
+
--on-color: var(--status-on-warning);
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
&[data-elevated] {
|
|
125
|
+
box-shadow: var(--drop-shadow-raise);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
[data-icon-bar] {
|
|
129
|
+
flex: 1;
|
|
130
|
+
padding: var(--spacing-sizing-04) var(--spacing-sizing-03);
|
|
131
|
+
background: var(--color);
|
|
132
|
+
color: var(--on-color);
|
|
133
|
+
svg {
|
|
134
|
+
width: var(--spacing-sizing-06);
|
|
135
|
+
height: var(--spacing-sizing-06);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[data-content] {
|
|
140
|
+
flex: 100%;
|
|
141
|
+
display: flex;
|
|
142
|
+
flex-direction: column;
|
|
143
|
+
padding: var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-02) var(--spacing-sizing-04);
|
|
144
|
+
|
|
145
|
+
header {
|
|
146
|
+
display: flex;
|
|
147
|
+
flex-direction: row;
|
|
148
|
+
gap: var(--spacing-sizing-03);
|
|
149
|
+
height: var(--spacing-sizing-12);
|
|
150
|
+
align-items: center;
|
|
151
|
+
|
|
152
|
+
span {
|
|
153
|
+
flex: 1;
|
|
154
|
+
display: flex;
|
|
155
|
+
align-items: center;
|
|
156
|
+
color: var(--foreground-neutral-on-surface);
|
|
157
|
+
font: var(--heading-h6);
|
|
158
|
+
|
|
159
|
+
@media (any-pointer: coarse) {
|
|
160
|
+
font: var(--heading-h6);
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
// close button
|
|
165
|
+
button {
|
|
166
|
+
background: none;
|
|
167
|
+
border: none;
|
|
168
|
+
cursor: pointer;
|
|
169
|
+
padding: 0;
|
|
170
|
+
margin: 0 0 0 auto;
|
|
171
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
172
|
+
|
|
173
|
+
height: var(--spacing-sizing-08);
|
|
174
|
+
width: var(--spacing-sizing-08);
|
|
175
|
+
|
|
176
|
+
@media (any-pointer: coarse) {
|
|
177
|
+
height: var(--spacing-sizing-12);
|
|
178
|
+
width: var(--spacing-sizing-12);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
svg {
|
|
182
|
+
width: var(--spacing-sizing-04);
|
|
183
|
+
height: var(--spacing-sizing-04);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
[data-body] {
|
|
189
|
+
display: flex;
|
|
190
|
+
flex-direction: column;
|
|
191
|
+
gap: var(--spacing-sizing-02);
|
|
192
|
+
padding: 0 var(--spacing-sizing-02) var(--spacing-sizing-02) 0;
|
|
193
|
+
|
|
194
|
+
span {
|
|
195
|
+
font: var(--body-base);
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
button {
|
|
199
|
+
margin-left: auto;
|
|
200
|
+
background: none;
|
|
201
|
+
border: none;
|
|
202
|
+
cursor: pointer;
|
|
203
|
+
padding: 0 var(--spacing-sizing-03);
|
|
204
|
+
height: var(--spacing-sizing-12);
|
|
205
|
+
font: var(--labels-small);
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
`;
|
|
210
|
+
|
|
211
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export type BottomNavigationProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the bottom navigation.
|
|
6
|
+
*
|
|
7
|
+
* @required
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Component description coming soon.
|
|
14
|
+
*
|
|
15
|
+
* @name BottomNavigation
|
|
16
|
+
*/
|
|
17
|
+
function BottomNavigation({ children }: BottomNavigationProps) {
|
|
18
|
+
return (
|
|
19
|
+
<div css={style} data-bottom-navigation>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
BottomNavigation.bspkName = 'BottomNavigation';
|
|
26
|
+
|
|
27
|
+
export { BottomNavigation };
|
|
28
|
+
|
|
29
|
+
export const style = css`
|
|
30
|
+
display: flex;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export type BottomSheetProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the bottom sheet.
|
|
6
|
+
*
|
|
7
|
+
* @required
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Component description coming soon.
|
|
14
|
+
*
|
|
15
|
+
* @name BottomSheet
|
|
16
|
+
*/
|
|
17
|
+
function BottomSheet({ children }: BottomSheetProps) {
|
|
18
|
+
return (
|
|
19
|
+
<div css={style} data-bottom-sheet>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
BottomSheet.bspkName = 'BottomSheet';
|
|
26
|
+
|
|
27
|
+
export { BottomSheet };
|
|
28
|
+
|
|
29
|
+
export const style = css`
|
|
30
|
+
display: flex;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export type BreadcrumbProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the breadcrumb.
|
|
6
|
+
*
|
|
7
|
+
* @required
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Component description coming soon.
|
|
14
|
+
*
|
|
15
|
+
* @name Breadcrumb
|
|
16
|
+
*/
|
|
17
|
+
function Breadcrumb({ children }: BreadcrumbProps) {
|
|
18
|
+
return (
|
|
19
|
+
<div css={style} data-breadcrumb>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
Breadcrumb.bspkName = 'Breadcrumb';
|
|
26
|
+
|
|
27
|
+
export { Breadcrumb };
|
|
28
|
+
|
|
29
|
+
export const style = css`
|
|
30
|
+
display: flex;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/src/Button.tsx
ADDED
|
@@ -0,0 +1,358 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
import { ElementType, isValidElement, ReactNode } from 'react';
|
|
3
|
+
|
|
4
|
+
import { Tooltip } from './Tooltip';
|
|
5
|
+
import { isValidIcon } from './utils/children';
|
|
6
|
+
import { useErrorLogger } from './utils/errors';
|
|
7
|
+
|
|
8
|
+
import { ButtonSize, CommonProps, ElementProps } from './';
|
|
9
|
+
|
|
10
|
+
export type ButtonVariant = 'primary' | 'secondary' | 'tertiary';
|
|
11
|
+
|
|
12
|
+
export type ButtonProps<As extends ElementType = 'button'> = CommonProps<'disabled' | 'onClick'> & {
|
|
13
|
+
/** The label of the button. */
|
|
14
|
+
label?: string;
|
|
15
|
+
/** The icon of the button. */
|
|
16
|
+
icon?: ReactNode;
|
|
17
|
+
/**
|
|
18
|
+
* Shows the button label. When label isn't showing it is used in a tooltip and as the aria-label prop.
|
|
19
|
+
*
|
|
20
|
+
* @default true
|
|
21
|
+
*/
|
|
22
|
+
showLabel?: boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The element type to render as.
|
|
25
|
+
*
|
|
26
|
+
* @default button
|
|
27
|
+
* @type ElementType
|
|
28
|
+
*/
|
|
29
|
+
as?: As;
|
|
30
|
+
/**
|
|
31
|
+
* The function of the button is destructive.
|
|
32
|
+
*
|
|
33
|
+
* @default false
|
|
34
|
+
*/
|
|
35
|
+
destructive?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The size of the button.
|
|
38
|
+
*
|
|
39
|
+
* @default medium
|
|
40
|
+
*/
|
|
41
|
+
size?: ButtonSize;
|
|
42
|
+
/**
|
|
43
|
+
* The color variant of the button.
|
|
44
|
+
*
|
|
45
|
+
* @default primary
|
|
46
|
+
*/
|
|
47
|
+
variant?: ButtonVariant;
|
|
48
|
+
/**
|
|
49
|
+
* The width of the button.
|
|
50
|
+
*
|
|
51
|
+
* @default hug
|
|
52
|
+
*/
|
|
53
|
+
width?: 'fill' | 'hug';
|
|
54
|
+
/**
|
|
55
|
+
* If `string` is passed, it will be used as the label.
|
|
56
|
+
*
|
|
57
|
+
* If `ReactNode` is passed, it will override the default button content. (Not recommended)
|
|
58
|
+
*/
|
|
59
|
+
children?: ReactNode;
|
|
60
|
+
/** The tool tip text that appears when hovered. */
|
|
61
|
+
toolTip?: string;
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* A clickable component that allows users to perform an action, make a choice or trigger a change in state.
|
|
66
|
+
*
|
|
67
|
+
* @name Button
|
|
68
|
+
*/
|
|
69
|
+
function Button<As extends ElementType = 'button'>(props: ElementProps<ButtonProps<As>, As>): JSX.Element {
|
|
70
|
+
const {
|
|
71
|
+
size = 'medium',
|
|
72
|
+
variant = 'primary',
|
|
73
|
+
destructive = false,
|
|
74
|
+
width = 'hug',
|
|
75
|
+
as: As = 'button',
|
|
76
|
+
disabled = false,
|
|
77
|
+
label: labelProp,
|
|
78
|
+
icon,
|
|
79
|
+
showLabel: showLabelProp = true,
|
|
80
|
+
toolTip: toolTipProp,
|
|
81
|
+
children,
|
|
82
|
+
...containerProps
|
|
83
|
+
} = props;
|
|
84
|
+
const label = typeof children === 'string' ? children : labelProp || '';
|
|
85
|
+
|
|
86
|
+
// ignore showLabel=false if there is no icon
|
|
87
|
+
const hideLabel = showLabelProp === false && icon;
|
|
88
|
+
|
|
89
|
+
const toolTip = toolTipProp || hideLabel ? label : undefined;
|
|
90
|
+
|
|
91
|
+
const { logError } = useErrorLogger();
|
|
92
|
+
logError(!!icon && !isValidIcon(icon), 'Button - The icon prop must be a valid icon element.');
|
|
93
|
+
logError(!label, 'Button - The button must have a label.');
|
|
94
|
+
|
|
95
|
+
const button = (
|
|
96
|
+
<As
|
|
97
|
+
{...containerProps}
|
|
98
|
+
aria-label={label}
|
|
99
|
+
css={style}
|
|
100
|
+
data-button=""
|
|
101
|
+
data-destructive={destructive || undefined}
|
|
102
|
+
data-size={size}
|
|
103
|
+
data-variant={variant}
|
|
104
|
+
data-width={width}
|
|
105
|
+
disabled={disabled || undefined}
|
|
106
|
+
>
|
|
107
|
+
{children && typeof children !== 'string' ? (
|
|
108
|
+
children
|
|
109
|
+
) : (
|
|
110
|
+
<>
|
|
111
|
+
<span data-touch-target />
|
|
112
|
+
{!!icon && isValidElement(icon) && <span data-button-icon>{icon}</span>}
|
|
113
|
+
{!hideLabel && <span data-button-label>{label}</span>}
|
|
114
|
+
</>
|
|
115
|
+
)}
|
|
116
|
+
</As>
|
|
117
|
+
);
|
|
118
|
+
|
|
119
|
+
if (toolTip) {
|
|
120
|
+
return (
|
|
121
|
+
<Tooltip label={toolTip} placement="top">
|
|
122
|
+
{button}
|
|
123
|
+
</Tooltip>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return button;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
Button.bspkName = 'Button';
|
|
131
|
+
|
|
132
|
+
export { Button };
|
|
133
|
+
|
|
134
|
+
export const style = css`
|
|
135
|
+
&,
|
|
136
|
+
&:is(a) {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: row;
|
|
139
|
+
align-items: center;
|
|
140
|
+
justify-content: center;
|
|
141
|
+
gap: var(--spacing-sizing-02);
|
|
142
|
+
border: none;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
box-sizing: border-box;
|
|
145
|
+
background: transparent;
|
|
146
|
+
text-decoration: none;
|
|
147
|
+
width: fit-content;
|
|
148
|
+
position: relative;
|
|
149
|
+
|
|
150
|
+
[data-touch-target] {
|
|
151
|
+
min-width: var(--spacing-sizing-12);
|
|
152
|
+
min-height: var(--spacing-sizing-12);
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
&[data-width='hug'] {
|
|
156
|
+
width: fit-content;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
&[data-width='fill'] {
|
|
160
|
+
width: 100%;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
&[data-size='x-small'] {
|
|
164
|
+
font-size: var(--typography-size-xs);
|
|
165
|
+
line-height: var(--typography-line-height-lh-1);
|
|
166
|
+
height: var(--spacing-sizing-06);
|
|
167
|
+
min-width: var(--spacing-sizing-06);
|
|
168
|
+
gap: var(--spacing-sizing-02);
|
|
169
|
+
|
|
170
|
+
&:has([data-button-label]),
|
|
171
|
+
&[data-override] {
|
|
172
|
+
padding: 0 var(--spacing-sizing-02);
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
> [data-button-icon] {
|
|
176
|
+
width: var(--spacing-sizing-04);
|
|
177
|
+
height: var(--spacing-sizing-04);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&[data-size='small'] {
|
|
182
|
+
font-size: var(--typography-size-sm);
|
|
183
|
+
line-height: var(--typography-line-height-lh-2);
|
|
184
|
+
height: var(--spacing-sizing-08);
|
|
185
|
+
min-width: var(--spacing-sizing-08);
|
|
186
|
+
|
|
187
|
+
&:has([data-button-label]),
|
|
188
|
+
&[data-override] {
|
|
189
|
+
padding: 6px var(--spacing-sizing-04);
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
> [data-button-icon] {
|
|
193
|
+
width: var(--spacing-sizing-05);
|
|
194
|
+
height: var(--spacing-sizing-05);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
&[data-size='medium'] {
|
|
199
|
+
font-size: var(--typography-size-base);
|
|
200
|
+
line-height: var(--typography-line-height-lh-2);
|
|
201
|
+
height: var(--spacing-sizing-10);
|
|
202
|
+
min-width: var(--spacing-sizing-10);
|
|
203
|
+
|
|
204
|
+
&:has([data-button-label]),
|
|
205
|
+
&[data-override] {
|
|
206
|
+
padding: var(--spacing-sizing-02) var(--spacing-sizing-04);
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
> [data-button-icon] {
|
|
210
|
+
width: var(--spacing-sizing-05);
|
|
211
|
+
height: var(--spacing-sizing-05);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
&[data-size='large'] {
|
|
215
|
+
font-size: var(--typography-size-bp-md);
|
|
216
|
+
line-height: var(--typography-line-height-lh-4);
|
|
217
|
+
height: var(--spacing-sizing-12);
|
|
218
|
+
min-width: var(--spacing-sizing-12);
|
|
219
|
+
|
|
220
|
+
&:has([data-button-label]),
|
|
221
|
+
&[data-override] {
|
|
222
|
+
padding: var(--spacing-sizing-03) var(--spacing-sizing-04);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
> [data-button-icon] {
|
|
226
|
+
width: var(--spacing-sizing-06);
|
|
227
|
+
height: var(--spacing-sizing-06);
|
|
228
|
+
}
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
&[disabled] {
|
|
232
|
+
cursor: not-allowed;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
> [data-button-icon] {
|
|
236
|
+
display: flex;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
align-items: center;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
> [data-button-label] {
|
|
242
|
+
display: flex;
|
|
243
|
+
flex-direction: row;
|
|
244
|
+
align-items: center;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
&[data-variant='primary'] {
|
|
248
|
+
--primary-background: var(--surface-brand-primary);
|
|
249
|
+
|
|
250
|
+
background: linear-gradient(var(--primary-background), var(--primary-background));
|
|
251
|
+
color: var(--foreground-brand-on-primary);
|
|
252
|
+
border-radius: var(--radius-small);
|
|
253
|
+
|
|
254
|
+
&[disabled] {
|
|
255
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
256
|
+
background: var(--interactions-disabled-opacity);
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
&:not([disabled]) {
|
|
260
|
+
[data-pseudo='hover'] > &,
|
|
261
|
+
&:hover {
|
|
262
|
+
background:
|
|
263
|
+
linear-gradient(
|
|
264
|
+
var(--interactions-brand-hover-opacity),
|
|
265
|
+
var(--interactions-brand-hover-opacity)
|
|
266
|
+
),
|
|
267
|
+
linear-gradient(var(--primary-background), var(--primary-background));
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
[data-pseudo='active'] > &,
|
|
271
|
+
&:active {
|
|
272
|
+
background:
|
|
273
|
+
linear-gradient(
|
|
274
|
+
var(--interactions-brand-press-opacity),
|
|
275
|
+
var(--interactions-brand-press-opacity)
|
|
276
|
+
),
|
|
277
|
+
linear-gradient(var(--primary-background), var(--primary-background));
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
[data-pseudo='focus'] > &,
|
|
281
|
+
&:focus-visible {
|
|
282
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
283
|
+
}
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
&[data-destructive] {
|
|
287
|
+
--primary-background: var(--status-error);
|
|
288
|
+
color: var(--foreground-brand-on-primary);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
&[data-variant='secondary'] {
|
|
293
|
+
border: solid 1px var(--stroke-neutral-base);
|
|
294
|
+
border-radius: var(--radius-small);
|
|
295
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
296
|
+
|
|
297
|
+
&[disabled] {
|
|
298
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
299
|
+
border: solid 1px var(--stroke-neutral-disabled-light);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
&:not([disabled]) {
|
|
303
|
+
[data-pseudo='hover'] > &,
|
|
304
|
+
&:hover {
|
|
305
|
+
background-color: var(--interactions-neutral-hover-opacity);
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
[data-pseudo='active'] > &,
|
|
309
|
+
&:active {
|
|
310
|
+
background-color: var(--interactions-neutral-press-opacity);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
[data-pseudo='focus'] > &,
|
|
314
|
+
&:focus-visible {
|
|
315
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
316
|
+
}
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
&[data-destructive] {
|
|
320
|
+
background: transparent;
|
|
321
|
+
color: var(--status-error);
|
|
322
|
+
border: solid 1px var(--status-error);
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
&[data-variant='tertiary'] {
|
|
327
|
+
background: transparent;
|
|
328
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
329
|
+
|
|
330
|
+
&[disabled] {
|
|
331
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
&:not([disabled]) {
|
|
335
|
+
[data-pseudo='hover'] > &,
|
|
336
|
+
&:hover {
|
|
337
|
+
background: var(--interactions-neutral-hover-opacity);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
[data-pseudo='active'] > &,
|
|
341
|
+
&:active {
|
|
342
|
+
background: var(--interactions-neutral-press-opacity);
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
[data-pseudo='focus'] > &,
|
|
346
|
+
&:focus-visible {
|
|
347
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
&[data-destructive] {
|
|
352
|
+
color: var(--status-error);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
`;
|
|
357
|
+
|
|
358
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { css } from '@emotion/react';
|
|
2
|
+
|
|
3
|
+
export type ButtonDockProps = {
|
|
4
|
+
/**
|
|
5
|
+
* The content of the button dock.
|
|
6
|
+
*
|
|
7
|
+
* @required
|
|
8
|
+
*/
|
|
9
|
+
children: string;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Component description coming soon.
|
|
14
|
+
*
|
|
15
|
+
* @name ButtonDock
|
|
16
|
+
*/
|
|
17
|
+
function ButtonDock({ children }: ButtonDockProps) {
|
|
18
|
+
return (
|
|
19
|
+
<div css={style} data-button-dock>
|
|
20
|
+
{children}
|
|
21
|
+
</div>
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
ButtonDock.bspkName = 'ButtonDock';
|
|
26
|
+
|
|
27
|
+
export { ButtonDock };
|
|
28
|
+
|
|
29
|
+
export const style = css`
|
|
30
|
+
display: flex;
|
|
31
|
+
`;
|
|
32
|
+
|
|
33
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|