@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
package/Button.js
ADDED
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
import { jsx, jsxs, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
import { isValidElement } from 'react';
|
|
4
|
+
import { Tooltip } from './Tooltip.js';
|
|
5
|
+
import { isValidIcon } from './utils/children.js';
|
|
6
|
+
import { useErrorLogger } from './utils/errors.js';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* A clickable component that allows users to perform an action, make a choice or trigger a change in state.
|
|
10
|
+
*
|
|
11
|
+
* @name Button
|
|
12
|
+
*/
|
|
13
|
+
function Button(props) {
|
|
14
|
+
const { size = 'medium', variant = 'primary', destructive = false, width = 'hug', as: As = 'button', disabled = false, label: labelProp, icon, showLabel: showLabelProp = true, toolTip: toolTipProp, children, ...containerProps } = props;
|
|
15
|
+
const label = typeof children === 'string' ? children : labelProp || '';
|
|
16
|
+
// ignore showLabel=false if there is no icon
|
|
17
|
+
const hideLabel = showLabelProp === false && icon;
|
|
18
|
+
const toolTip = toolTipProp || hideLabel ? label : undefined;
|
|
19
|
+
const { logError } = useErrorLogger();
|
|
20
|
+
logError(!!icon && !isValidIcon(icon), 'Button - The icon prop must be a valid icon element.');
|
|
21
|
+
logError(!label, 'Button - The button must have a label.');
|
|
22
|
+
const button = (jsx(As, { ...containerProps, "aria-label": label, css: style, "data-button": "", "data-destructive": destructive || undefined, "data-size": size, "data-variant": variant, "data-width": width, disabled: disabled || undefined, children: children && typeof children !== 'string' ? (children) : (jsxs(Fragment, { children: [jsx("span", { "data-touch-target": true }), !!icon && isValidElement(icon) && jsx("span", { "data-button-icon": true, children: icon }), !hideLabel && jsx("span", { "data-button-label": true, children: label })] })) }));
|
|
23
|
+
if (toolTip) {
|
|
24
|
+
return (jsx(Tooltip, { label: toolTip, placement: "top", children: button }));
|
|
25
|
+
}
|
|
26
|
+
return button;
|
|
27
|
+
}
|
|
28
|
+
Button.bspkName = 'Button';
|
|
29
|
+
const style = css `
|
|
30
|
+
&,
|
|
31
|
+
&:is(a) {
|
|
32
|
+
display: flex;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: center;
|
|
36
|
+
gap: var(--spacing-sizing-02);
|
|
37
|
+
border: none;
|
|
38
|
+
cursor: pointer;
|
|
39
|
+
box-sizing: border-box;
|
|
40
|
+
background: transparent;
|
|
41
|
+
text-decoration: none;
|
|
42
|
+
width: fit-content;
|
|
43
|
+
position: relative;
|
|
44
|
+
|
|
45
|
+
[data-touch-target] {
|
|
46
|
+
min-width: var(--spacing-sizing-12);
|
|
47
|
+
min-height: var(--spacing-sizing-12);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
&[data-width='hug'] {
|
|
51
|
+
width: fit-content;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
&[data-width='fill'] {
|
|
55
|
+
width: 100%;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
&[data-size='x-small'] {
|
|
59
|
+
font-size: var(--typography-size-xs);
|
|
60
|
+
line-height: var(--typography-line-height-lh-1);
|
|
61
|
+
height: var(--spacing-sizing-06);
|
|
62
|
+
min-width: var(--spacing-sizing-06);
|
|
63
|
+
gap: var(--spacing-sizing-02);
|
|
64
|
+
|
|
65
|
+
&:has([data-button-label]),
|
|
66
|
+
&[data-override] {
|
|
67
|
+
padding: 0 var(--spacing-sizing-02);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
> [data-button-icon] {
|
|
71
|
+
width: var(--spacing-sizing-04);
|
|
72
|
+
height: var(--spacing-sizing-04);
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
&[data-size='small'] {
|
|
77
|
+
font-size: var(--typography-size-sm);
|
|
78
|
+
line-height: var(--typography-line-height-lh-2);
|
|
79
|
+
height: var(--spacing-sizing-08);
|
|
80
|
+
min-width: var(--spacing-sizing-08);
|
|
81
|
+
|
|
82
|
+
&:has([data-button-label]),
|
|
83
|
+
&[data-override] {
|
|
84
|
+
padding: 6px var(--spacing-sizing-04);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
> [data-button-icon] {
|
|
88
|
+
width: var(--spacing-sizing-05);
|
|
89
|
+
height: var(--spacing-sizing-05);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
&[data-size='medium'] {
|
|
94
|
+
font-size: var(--typography-size-base);
|
|
95
|
+
line-height: var(--typography-line-height-lh-2);
|
|
96
|
+
height: var(--spacing-sizing-10);
|
|
97
|
+
min-width: var(--spacing-sizing-10);
|
|
98
|
+
|
|
99
|
+
&:has([data-button-label]),
|
|
100
|
+
&[data-override] {
|
|
101
|
+
padding: var(--spacing-sizing-02) var(--spacing-sizing-04);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
> [data-button-icon] {
|
|
105
|
+
width: var(--spacing-sizing-05);
|
|
106
|
+
height: var(--spacing-sizing-05);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
&[data-size='large'] {
|
|
110
|
+
font-size: var(--typography-size-bp-md);
|
|
111
|
+
line-height: var(--typography-line-height-lh-4);
|
|
112
|
+
height: var(--spacing-sizing-12);
|
|
113
|
+
min-width: var(--spacing-sizing-12);
|
|
114
|
+
|
|
115
|
+
&:has([data-button-label]),
|
|
116
|
+
&[data-override] {
|
|
117
|
+
padding: var(--spacing-sizing-03) var(--spacing-sizing-04);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
> [data-button-icon] {
|
|
121
|
+
width: var(--spacing-sizing-06);
|
|
122
|
+
height: var(--spacing-sizing-06);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&[disabled] {
|
|
127
|
+
cursor: not-allowed;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
> [data-button-icon] {
|
|
131
|
+
display: flex;
|
|
132
|
+
flex-direction: column;
|
|
133
|
+
align-items: center;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
> [data-button-label] {
|
|
137
|
+
display: flex;
|
|
138
|
+
flex-direction: row;
|
|
139
|
+
align-items: center;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
&[data-variant='primary'] {
|
|
143
|
+
--primary-background: var(--surface-brand-primary);
|
|
144
|
+
|
|
145
|
+
background: linear-gradient(var(--primary-background), var(--primary-background));
|
|
146
|
+
color: var(--foreground-brand-on-primary);
|
|
147
|
+
border-radius: var(--radius-small);
|
|
148
|
+
|
|
149
|
+
&[disabled] {
|
|
150
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
151
|
+
background: var(--interactions-disabled-opacity);
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&:not([disabled]) {
|
|
155
|
+
[data-pseudo='hover'] > &,
|
|
156
|
+
&:hover {
|
|
157
|
+
background:
|
|
158
|
+
linear-gradient(
|
|
159
|
+
var(--interactions-brand-hover-opacity),
|
|
160
|
+
var(--interactions-brand-hover-opacity)
|
|
161
|
+
),
|
|
162
|
+
linear-gradient(var(--primary-background), var(--primary-background));
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
[data-pseudo='active'] > &,
|
|
166
|
+
&:active {
|
|
167
|
+
background:
|
|
168
|
+
linear-gradient(
|
|
169
|
+
var(--interactions-brand-press-opacity),
|
|
170
|
+
var(--interactions-brand-press-opacity)
|
|
171
|
+
),
|
|
172
|
+
linear-gradient(var(--primary-background), var(--primary-background));
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
[data-pseudo='focus'] > &,
|
|
176
|
+
&:focus-visible {
|
|
177
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
&[data-destructive] {
|
|
182
|
+
--primary-background: var(--status-error);
|
|
183
|
+
color: var(--foreground-brand-on-primary);
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
&[data-variant='secondary'] {
|
|
188
|
+
border: solid 1px var(--stroke-neutral-base);
|
|
189
|
+
border-radius: var(--radius-small);
|
|
190
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
191
|
+
|
|
192
|
+
&[disabled] {
|
|
193
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
194
|
+
border: solid 1px var(--stroke-neutral-disabled-light);
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
&:not([disabled]) {
|
|
198
|
+
[data-pseudo='hover'] > &,
|
|
199
|
+
&:hover {
|
|
200
|
+
background-color: var(--interactions-neutral-hover-opacity);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
[data-pseudo='active'] > &,
|
|
204
|
+
&:active {
|
|
205
|
+
background-color: var(--interactions-neutral-press-opacity);
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
[data-pseudo='focus'] > &,
|
|
209
|
+
&:focus-visible {
|
|
210
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
211
|
+
}
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
&[data-destructive] {
|
|
215
|
+
background: transparent;
|
|
216
|
+
color: var(--status-error);
|
|
217
|
+
border: solid 1px var(--status-error);
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
&[data-variant='tertiary'] {
|
|
222
|
+
background: transparent;
|
|
223
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
224
|
+
|
|
225
|
+
&[disabled] {
|
|
226
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
&:not([disabled]) {
|
|
230
|
+
[data-pseudo='hover'] > &,
|
|
231
|
+
&:hover {
|
|
232
|
+
background: var(--interactions-neutral-hover-opacity);
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
[data-pseudo='active'] > &,
|
|
236
|
+
&:active {
|
|
237
|
+
background: var(--interactions-neutral-press-opacity);
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
[data-pseudo='focus'] > &,
|
|
241
|
+
&:focus-visible {
|
|
242
|
+
outline: solid 2px var(--stroke-neutral-focus);
|
|
243
|
+
}
|
|
244
|
+
}
|
|
245
|
+
|
|
246
|
+
&[data-destructive] {
|
|
247
|
+
color: var(--status-error);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
`;
|
|
252
|
+
|
|
253
|
+
export { Button, style };
|
|
254
|
+
//# sourceMappingURL=Button.js.map
|
package/Button.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["src/Button.tsx"],"sourcesContent":[null],"names":["_jsx","_jsxs"],"mappings":";;;;;;;AA+DA;;;;AAIG;AACH,SAAS,MAAM,CAAoC,KAAwC,EAAA;IACvF,MAAM,EACF,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,SAAS,EACnB,WAAW,GAAG,KAAK,EACnB,KAAK,GAAG,KAAK,EACb,EAAE,EAAE,EAAE,GAAG,QAAQ,EACjB,QAAQ,GAAG,KAAK,EAChB,KAAK,EAAE,SAAS,EAChB,IAAI,EACJ,SAAS,EAAE,aAAa,GAAG,IAAI,EAC/B,OAAO,EAAE,WAAW,EACpB,QAAQ,EACR,GAAG,cAAc,EACpB,GAAG,KAAK,CAAC;AACV,IAAA,MAAM,KAAK,GAAG,OAAO,QAAQ,KAAK,QAAQ,GAAG,QAAQ,GAAG,SAAS,IAAI,EAAE,CAAC;;AAGxE,IAAA,MAAM,SAAS,GAAG,aAAa,KAAK,KAAK,IAAI,IAAI,CAAC;AAElD,IAAA,MAAM,OAAO,GAAG,WAAW,IAAI,SAAS,GAAG,KAAK,GAAG,SAAS,CAAC;AAE7D,IAAA,MAAM,EAAE,QAAQ,EAAE,GAAG,cAAc,EAAE,CAAC;AACtC,IAAA,QAAQ,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,EAAE,sDAAsD,CAAC,CAAC;AAC/F,IAAA,QAAQ,CAAC,CAAC,KAAK,EAAE,wCAAwC,CAAC,CAAC;AAE3D,IAAA,MAAM,MAAM,IACRA,GAAA,CAAC,EAAE,EACK,EAAA,GAAA,cAAc,EACN,YAAA,EAAA,KAAK,EACjB,GAAG,EAAE,KAAK,EAAA,aAAA,EACE,EAAE,EACI,kBAAA,EAAA,WAAW,IAAI,SAAS,eAC/B,IAAI,EAAA,cAAA,EACD,OAAO,EAAA,YAAA,EACT,KAAK,EACjB,QAAQ,EAAE,QAAQ,IAAI,SAAS,EAAA,QAAA,EAE9B,QAAQ,IAAI,OAAO,QAAQ,KAAK,QAAQ,IACrC,QAAQ,KAERC,4BACID,GAA0B,CAAA,MAAA,EAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,CAAA,EACzB,CAAC,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAA,kBAAA,EAAA,IAAA,EAAA,QAAA,EAAwB,IAAI,EAAA,CAAQ,EACtE,CAAC,SAAS,IAAIA,GAAA,CAAA,MAAA,EAAA,EAAA,mBAAA,EAAA,IAAA,EAAA,QAAA,EAAyB,KAAK,EAAQ,CAAA,CAAA,EAAA,CACtD,CACN,EAAA,CACA,CACR,CAAC;IAEF,IAAI,OAAO,EAAE;AACT,QAAA,QACIA,GAAA,CAAC,OAAO,EAAA,EAAC,KAAK,EAAE,OAAO,EAAE,SAAS,EAAC,KAAK,EAAA,QAAA,EACnC,MAAM,EAAA,CACD,EACZ;KACL;AAED,IAAA,OAAO,MAAM,CAAC;AAClB,CAAC;AAED,MAAM,CAAC,QAAQ,GAAG,QAAQ,CAAC;AAIpB,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/ButtonDock.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ButtonDockProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the button dock.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name ButtonDock
|
|
13
|
+
*/
|
|
14
|
+
declare function ButtonDock({ children }: ButtonDockProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace ButtonDock {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { ButtonDock };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/ButtonDock.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component description coming soon.
|
|
6
|
+
*
|
|
7
|
+
* @name ButtonDock
|
|
8
|
+
*/
|
|
9
|
+
function ButtonDock({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-button-dock": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
ButtonDock.bspkName = 'ButtonDock';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { ButtonDock, style };
|
|
18
|
+
//# sourceMappingURL=ButtonDock.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ButtonDock.js","sources":["src/ButtonDock.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,UAAU,CAAC,EAAE,QAAQ,EAAmB,EAAA;IAC7C,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,kBAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,UAAU,CAAC,QAAQ,GAAG,YAAY,CAAC;AAI5B,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our
|
|
6
|
+
community a harassment-free experience for everyone, regardless of age, body
|
|
7
|
+
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
|
8
|
+
identity and expression, level of experience, education, socio-economic status,
|
|
9
|
+
nationality, personal appearance, race, caste, color, religion, or sexual
|
|
10
|
+
identity and orientation.
|
|
11
|
+
|
|
12
|
+
We pledge to act and interact in ways that contribute to an open, welcoming,
|
|
13
|
+
diverse, inclusive, and healthy community.
|
|
14
|
+
|
|
15
|
+
## Our Standards
|
|
16
|
+
|
|
17
|
+
Examples of behavior that contributes to a positive environment for our
|
|
18
|
+
community include:
|
|
19
|
+
|
|
20
|
+
- Demonstrating empathy and kindness toward other people
|
|
21
|
+
- Being respectful of differing opinions, viewpoints, and experiences
|
|
22
|
+
- Giving and gracefully accepting constructive feedback
|
|
23
|
+
- Accepting responsibility and apologizing to those affected by our mistakes,
|
|
24
|
+
and learning from the experience
|
|
25
|
+
- Focusing on what is best not just for us as individuals, but for the overall
|
|
26
|
+
community
|
|
27
|
+
|
|
28
|
+
Examples of unacceptable behavior include:
|
|
29
|
+
|
|
30
|
+
- The use of sexualized language or imagery, and sexual attention or advances of
|
|
31
|
+
any kind
|
|
32
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
33
|
+
- Public or private harassment
|
|
34
|
+
- Publishing others' private information, such as a physical or email address,
|
|
35
|
+
without their explicit permission
|
|
36
|
+
- Other conduct which could reasonably be considered inappropriate in a
|
|
37
|
+
professional setting
|
|
38
|
+
|
|
39
|
+
## Enforcement Responsibilities
|
|
40
|
+
|
|
41
|
+
Community leaders are responsible for clarifying and enforcing our standards of
|
|
42
|
+
acceptable behavior and will take appropriate and fair corrective action in
|
|
43
|
+
response to any behavior that they deem inappropriate, threatening, offensive,
|
|
44
|
+
or harmful.
|
|
45
|
+
|
|
46
|
+
Community leaders have the right and responsibility to remove, edit, or reject
|
|
47
|
+
comments, commits, code, wiki edits, issues, and other contributions that are
|
|
48
|
+
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
|
49
|
+
decisions when appropriate.
|
|
50
|
+
|
|
51
|
+
## Scope
|
|
52
|
+
|
|
53
|
+
This Code of Conduct applies within all community spaces, and also applies when
|
|
54
|
+
an individual is officially representing the community in public spaces.
|
|
55
|
+
Examples of representing our community include using an official e-mail address,
|
|
56
|
+
posting via an official social media account, or acting as an appointed
|
|
57
|
+
representative at an online or offline event.
|
|
58
|
+
|
|
59
|
+
## Enforcement
|
|
60
|
+
|
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
|
62
|
+
reported to the community leaders responsible for enforcement at
|
|
63
|
+
[maintainer_email].
|
|
64
|
+
All complaints will be reviewed and investigated promptly and fairly.
|
|
65
|
+
|
|
66
|
+
All community leaders are obligated to respect the privacy and security of the
|
|
67
|
+
reporter of any incident.
|
|
68
|
+
|
|
69
|
+
## Enforcement Guidelines
|
|
70
|
+
|
|
71
|
+
Community leaders will follow these Community Impact Guidelines in determining
|
|
72
|
+
the consequences for any action they deem in violation of this Code of Conduct:
|
|
73
|
+
|
|
74
|
+
### 1. Correction
|
|
75
|
+
|
|
76
|
+
**Community Impact**: Use of inappropriate language or other behavior deemed
|
|
77
|
+
unprofessional or unwelcome in the community.
|
|
78
|
+
|
|
79
|
+
**Consequence**: A private, written warning from community leaders, providing
|
|
80
|
+
clarity around the nature of the violation and an explanation of why the
|
|
81
|
+
behavior was inappropriate. A public apology may be requested.
|
|
82
|
+
|
|
83
|
+
### 2. Warning
|
|
84
|
+
|
|
85
|
+
**Community Impact**: A violation through a single incident or series of
|
|
86
|
+
actions.
|
|
87
|
+
|
|
88
|
+
**Consequence**: A warning with consequences for continued behavior.
|
|
89
|
+
|
|
90
|
+
### 3. Temporary Ban
|
|
91
|
+
|
|
92
|
+
**Community Impact**: A serious violation of community standards, including
|
|
93
|
+
sustained inappropriate behavior.
|
|
94
|
+
|
|
95
|
+
**Consequence**: A temporary ban from any sort of interaction or public
|
|
96
|
+
communication with the community for a specified period of time. No public or
|
|
97
|
+
private interaction with the people involved, including unsolicited interaction
|
|
98
|
+
with those enforcing the Code of Conduct, is allowed during this period.
|
|
99
|
+
Violating these terms may lead to a permanent ban.
|
|
100
|
+
|
|
101
|
+
### 4. Permanent Ban
|
|
102
|
+
|
|
103
|
+
**Community Impact**: Demonstrating a pattern of violation of community
|
|
104
|
+
standards, including sustained inappropriate behavior, harassment of an
|
|
105
|
+
individual, or aggression toward or disparagement of classes of individuals.
|
|
106
|
+
|
|
107
|
+
**Consequence**: A permanent ban from any sort of public interaction within the
|
|
108
|
+
community.
|
|
109
|
+
|
|
110
|
+
### 5. Appeal
|
|
111
|
+
|
|
112
|
+
If you are banned you may contest the decision. To do so email [maintainer_email] with the subject line "Repeal Ban for {{your name here}} from {Project Name}" and body with the responses to the following:
|
|
113
|
+
|
|
114
|
+
- Why do you believe you did not violate the Code of Conduct?
|
|
115
|
+
- Were other factors involved in this situation the leadership team may have been unaware of?
|
|
116
|
+
- Why do you wish to be a part of the [Project Name] community?
|
|
117
|
+
|
|
118
|
+
## Attribution
|
|
119
|
+
|
|
120
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
|
121
|
+
version 2.1, available at
|
|
122
|
+
[https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
|
|
123
|
+
|
|
124
|
+
Community Impact Guidelines were inspired by
|
|
125
|
+
[Mozilla's code of conduct enforcement ladder][Mozilla CoC].
|
|
126
|
+
|
|
127
|
+
For answers to common questions about this code of conduct, see the FAQ at
|
|
128
|
+
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
|
|
129
|
+
[https://www.contributor-covenant.org/translations][translations].
|
|
130
|
+
|
|
131
|
+
[homepage]: https://www.contributor-covenant.org
|
|
132
|
+
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
|
|
133
|
+
[Mozilla CoC]: https://github.com/mozilla/diversity
|
|
134
|
+
[FAQ]: https://www.contributor-covenant.org/faq
|
|
135
|
+
[translations]: https://www.contributor-covenant.org/translations
|
|
136
|
+
|
|
137
|
+
<!--- Copyright 2025 Anywhere Real Estate - CC BY 4.0 -->
|
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Contributing to @bspk/ui
|
|
2
|
+
|
|
3
|
+
Thank you for considering contributing to @bspk/ui! We appreciate your help in improving our React component library.
|
|
4
|
+
|
|
5
|
+
## How to Contribute
|
|
6
|
+
|
|
7
|
+
1. **Clone the repository**:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
git clone https://gitlab.com/realogy/experience-pods/shared-packages/bspk-ui.git
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
2. **Create a new branch**:
|
|
14
|
+
|
|
15
|
+
```bash
|
|
16
|
+
git checkout -b feature/your-feature-name
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
3. **Make your changes**: Implement your feature or bug fix.
|
|
20
|
+
|
|
21
|
+
4. **Stage and commit your changes**: Use [semantic versioning](https://semver.org/) for your commit messages.
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
git add .
|
|
25
|
+
git commit -m "feat: Description of your feature"
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
5. **Push to your branch**:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
git push origin feature/your-feature-name
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
6. **Create a Pull Request**: Go to the @bspk/ui repository and click "New Pull Request". Provide a clear description of your changes.
|
|
35
|
+
|
|
36
|
+
## Reporting Issues
|
|
37
|
+
|
|
38
|
+
If you find a bug or have a feature request, please open an issue on the [issue tracker](https://gitlab.com/realogy/experience-pods/shared-packages/bspk-ui/-/issues).
|
|
39
|
+
|
|
40
|
+
Thank you for your contributions!
|
|
41
|
+
|
|
42
|
+
<!--- Copyright 2025 Anywhere Real Estate - CC BY 4.0 -->
|
package/Card.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type CardProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The content of the card.
|
|
5
|
+
*
|
|
6
|
+
* @required
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Determines if the padding should be hidden.
|
|
11
|
+
*
|
|
12
|
+
* @default true
|
|
13
|
+
*/
|
|
14
|
+
showPadding?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Determines how the card border will appear.
|
|
17
|
+
*
|
|
18
|
+
* @default elevated
|
|
19
|
+
*/
|
|
20
|
+
variant?: 'elevated' | 'filled' | 'outlined';
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Cards are often rectangular and contain various content, such as text, images, icons, multimedia, and interactive
|
|
24
|
+
* elements.
|
|
25
|
+
*
|
|
26
|
+
* They are similar in size and shape to playing cards and are intended to encourage users to click or tap to view more
|
|
27
|
+
* details.
|
|
28
|
+
*
|
|
29
|
+
* @name Card
|
|
30
|
+
*/
|
|
31
|
+
declare function Card({ children, showPadding, variant }: CardProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
32
|
+
declare namespace Card {
|
|
33
|
+
var bspkName: string;
|
|
34
|
+
}
|
|
35
|
+
export { Card };
|
|
36
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
37
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/Card.js
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Cards are often rectangular and contain various content, such as text, images, icons, multimedia, and interactive
|
|
6
|
+
* elements.
|
|
7
|
+
*
|
|
8
|
+
* They are similar in size and shape to playing cards and are intended to encourage users to click or tap to view more
|
|
9
|
+
* details.
|
|
10
|
+
*
|
|
11
|
+
* @name Card
|
|
12
|
+
*/
|
|
13
|
+
function Card({ children, showPadding, variant = 'elevated' }) {
|
|
14
|
+
return (jsx("div", { css: style, "data-card": true, "data-hide-padding": showPadding === false || undefined, "data-variant": variant, children: children }));
|
|
15
|
+
}
|
|
16
|
+
Card.bspkName = 'Card';
|
|
17
|
+
const style = css `
|
|
18
|
+
display: block;
|
|
19
|
+
background: var(--surface-neutral-t1-base);
|
|
20
|
+
padding: var(--spacing-sizing-03);
|
|
21
|
+
border-radius: var(--radius-medium);
|
|
22
|
+
overflow: hidden;
|
|
23
|
+
|
|
24
|
+
&[data-hide-padding] {
|
|
25
|
+
padding: 0;
|
|
26
|
+
}
|
|
27
|
+
&[data-variant='outlined'] {
|
|
28
|
+
border: solid 1px var(--stroke-neutral-low);
|
|
29
|
+
}
|
|
30
|
+
&[data-variant='elevated'] {
|
|
31
|
+
box-shadow:
|
|
32
|
+
0 1px 2px 0 var(--shadow-32),
|
|
33
|
+
0 1px 3px 1px var(--shadow-15);
|
|
34
|
+
}
|
|
35
|
+
`;
|
|
36
|
+
|
|
37
|
+
export { Card, style };
|
|
38
|
+
//# sourceMappingURL=Card.js.map
|
package/Card.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Card.js","sources":["src/Card.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAwBA;;;;;;;;AAQG;AACH,SAAS,IAAI,CAAC,EAAE,QAAQ,EAAE,WAAW,EAAE,OAAO,GAAG,UAAU,EAAa,EAAA;AACpE,IAAA,QACIA,GAAK,CAAA,KAAA,EAAA,EAAA,GAAG,EAAE,KAAK,0CAA+B,WAAW,KAAK,KAAK,IAAI,SAAS,EAAgB,cAAA,EAAA,OAAO,YAClG,QAAQ,EAAA,CACP,EACR;AACN,CAAC;AAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC;AAIhB,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;"}
|
package/Chart.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type ChartProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the chart.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name Chart
|
|
13
|
+
*/
|
|
14
|
+
declare function Chart({ children }: ChartProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace Chart {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { Chart };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/Chart.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { css } from '@emotion/react';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Component description coming soon.
|
|
6
|
+
*
|
|
7
|
+
* @name Chart
|
|
8
|
+
*/
|
|
9
|
+
function Chart({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-chart": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
Chart.bspkName = 'Chart';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { Chart, style };
|
|
18
|
+
//# sourceMappingURL=Chart.js.map
|
package/Chart.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Chart.js","sources":["src/Chart.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,KAAK,CAAC,EAAE,QAAQ,EAAc,EAAA;IACnC,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,YAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;AAIlB,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
package/Checkbox.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { ToggleControlProps, ElementProps } from './';
|
|
2
|
+
export type CheckboxProps = ToggleControlProps<HTMLInputElement> & {
|
|
3
|
+
/**
|
|
4
|
+
* If the checkbox is partially checked or
|
|
5
|
+
* [indeterminate](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/checkbox#indeterminate_state_checkboxes).
|
|
6
|
+
*
|
|
7
|
+
* @default false
|
|
8
|
+
*/
|
|
9
|
+
indeterminate?: boolean;
|
|
10
|
+
};
|
|
11
|
+
/**
|
|
12
|
+
* A control that allows users to choose one or more items from a list or turn an feature on or off. This is the base
|
|
13
|
+
* element and if used directly you must wrap it with a label. This will more often be used in the CheckboxOption or
|
|
14
|
+
* CheckboxGroup component.
|
|
15
|
+
*
|
|
16
|
+
* @element
|
|
17
|
+
*
|
|
18
|
+
* @name Checkbox
|
|
19
|
+
*/
|
|
20
|
+
declare function Checkbox({ checked: checkedProp, indeterminate: indeterminateProp, invalid, disabled, ...props }: ElementProps<CheckboxProps, 'input'>): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
21
|
+
declare namespace Checkbox {
|
|
22
|
+
var bspkName: string;
|
|
23
|
+
}
|
|
24
|
+
export { Checkbox };
|
|
25
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
26
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|