@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/NumberField.js
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { FormField } from './FormField.js';
|
|
3
|
+
import { NumberInput } from './NumberInput.js';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
7
|
+
* pressing the (+) or (-).
|
|
8
|
+
*
|
|
9
|
+
* This component takes properties from the FormField and NumberInput components.
|
|
10
|
+
*
|
|
11
|
+
* @name NumberField
|
|
12
|
+
*/
|
|
13
|
+
function NumberField({ label, errorMessage: errorMessageProp, helperText, controlId, labelTrailing, required, ...inputProps }) {
|
|
14
|
+
const errorMessage = (!inputProps.readOnly && !inputProps.disabled && errorMessageProp) || undefined;
|
|
15
|
+
return (jsx(FormField, { controlId: controlId, errorMessage: errorMessage, helperText: helperText, label: label, labelTrailing: labelTrailing, required: required, children: (fieldProps) => jsx(NumberInput, { ...inputProps, ...fieldProps, "aria-label": label, id: controlId }) }));
|
|
16
|
+
}
|
|
17
|
+
NumberField.bspkName = 'NumberField';
|
|
18
|
+
|
|
19
|
+
export { NumberField };
|
|
20
|
+
//# sourceMappingURL=NumberField.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NumberField.js","sources":["src/NumberField.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;;AASA;;;;;;;AAOG;AACH,SAAS,WAAW,CAAC,EACjB,KAAK,EACL,YAAY,EAAE,gBAAgB,EAC9B,UAAU,EACV,SAAS,EACT,aAAa,EACb,QAAQ,EACR,GAAG,UAAU,EACE,EAAA;AACf,IAAA,MAAM,YAAY,GAAG,CAAC,CAAC,UAAU,CAAC,QAAQ,IAAI,CAAC,UAAU,CAAC,QAAQ,IAAI,gBAAgB,KAAK,SAAS,CAAC;IAErG,QACIA,IAAC,SAAS,EAAA,EACN,SAAS,EAAE,SAAS,EACpB,YAAY,EAAE,YAAY,EAC1B,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,KAAK,EACZ,aAAa,EAAE,aAAa,EAC5B,QAAQ,EAAE,QAAQ,YAEjB,CAAC,UAAU,KAAKA,GAAC,CAAA,WAAW,EAAK,EAAA,GAAA,UAAU,KAAM,UAAU,EAAA,YAAA,EAAc,KAAK,EAAE,EAAE,EAAE,SAAS,EAAA,CAAI,EAC1F,CAAA,EACd;AACN,CAAC;AAED,WAAW,CAAC,QAAQ,GAAG,aAAa;;;;"}
|
package/NumberInput.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { CommonProps } from '.';
|
|
2
|
+
export type NumberInputProps = CommonProps<'aria-label' | 'disabled' | 'id' | 'invalid' | 'name' | 'readOnly' | 'size'> & {
|
|
3
|
+
/**
|
|
4
|
+
* The value of the control.
|
|
5
|
+
*
|
|
6
|
+
* @required
|
|
7
|
+
*/
|
|
8
|
+
value?: number;
|
|
9
|
+
/** Callback when the value changes. */
|
|
10
|
+
onChange: (value: number) => void;
|
|
11
|
+
/**
|
|
12
|
+
* If the value should be centered between the up & down buttons.
|
|
13
|
+
*
|
|
14
|
+
* @default false
|
|
15
|
+
*/
|
|
16
|
+
centered?: boolean;
|
|
17
|
+
/** Defines the [maximum](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/max) value that is accepted. */
|
|
18
|
+
max?: number;
|
|
19
|
+
/** Defines the [minimum](https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/min) value that is accepted. */
|
|
20
|
+
min?: number;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
24
|
+
* pressing the (+) or (-).
|
|
25
|
+
*
|
|
26
|
+
* @name NumberInput
|
|
27
|
+
*/
|
|
28
|
+
declare function NumberInput({ value, onChange, centered, size, disabled, readOnly, name, id: inputIdProp, invalid, 'aria-label': ariaLabel, max: maxProp, min: minProp, }: NumberInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
29
|
+
declare namespace NumberInput {
|
|
30
|
+
var bspkName: string;
|
|
31
|
+
}
|
|
32
|
+
export { NumberInput };
|
|
33
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
34
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/NumberInput.js
ADDED
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
import { jsxs, jsx, Fragment } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { SvgAdd } from '@bspk/icons/Add';
|
|
3
|
+
import { SvgRemove } from '@bspk/icons/Remove';
|
|
4
|
+
import { css } from '@emotion/react';
|
|
5
|
+
import { useId } from './hooks/useId.js';
|
|
6
|
+
import { useLongPress } from './hooks/useLongPress.js';
|
|
7
|
+
|
|
8
|
+
function isNumber(value) {
|
|
9
|
+
if (typeof value === 'number')
|
|
10
|
+
return value;
|
|
11
|
+
if (typeof value !== 'string')
|
|
12
|
+
return undefined;
|
|
13
|
+
const num = Number(value);
|
|
14
|
+
return isNaN(num) ? undefined : num;
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* A input element that allows users to either input a numerical value or singularly increase or decrease the values by
|
|
18
|
+
* pressing the (+) or (-).
|
|
19
|
+
*
|
|
20
|
+
* @name NumberInput
|
|
21
|
+
*/
|
|
22
|
+
function NumberInput({
|
|
23
|
+
//
|
|
24
|
+
value = 1, onChange, centered = false, size = 'medium', disabled = false, readOnly = false, name, id: inputIdProp, invalid, 'aria-label': ariaLabel, max: maxProp, min: minProp, }) {
|
|
25
|
+
const inputId = useId(inputIdProp);
|
|
26
|
+
const max = isNumber(maxProp);
|
|
27
|
+
const min = isNumber(minProp);
|
|
28
|
+
const fix = (next = value) => {
|
|
29
|
+
let fixValue = next;
|
|
30
|
+
if (typeof min !== 'undefined' && next < min)
|
|
31
|
+
fixValue = min;
|
|
32
|
+
if (typeof max !== 'undefined' && next > max)
|
|
33
|
+
fixValue = max;
|
|
34
|
+
if (fixValue !== value)
|
|
35
|
+
onChange(fixValue);
|
|
36
|
+
};
|
|
37
|
+
const buttonProps = {
|
|
38
|
+
min,
|
|
39
|
+
max,
|
|
40
|
+
disabled,
|
|
41
|
+
readOnly,
|
|
42
|
+
onChange: fix,
|
|
43
|
+
value,
|
|
44
|
+
};
|
|
45
|
+
return (jsxs("div", { "aria-valuemax": max || undefined, "aria-valuemin": min || undefined, css: style, "data-centered": centered || undefined, "data-disabled": disabled || undefined, "data-invalid": invalid || undefined, "data-readonly": readOnly || undefined, "data-size": size, "data-stepper-input": true, children: [!!centered && jsx(IncrementButton, { ...buttonProps, increment: -1 }), jsx("input", { "aria-label": ariaLabel, disabled: disabled, id: inputId, name: name, onBlur: () => {
|
|
46
|
+
fix();
|
|
47
|
+
}, onChange: (event) => {
|
|
48
|
+
onChange(event.target.value);
|
|
49
|
+
}, readOnly: readOnly, type: "number", value: value }), !centered && (jsxs(Fragment, { children: [jsx("div", { "aria-hidden": true, "data-divider": true }), jsx(IncrementButton, { ...buttonProps, increment: -1 })] })), jsx(IncrementButton, { ...buttonProps, increment: 1 })] }));
|
|
50
|
+
}
|
|
51
|
+
// eslint-disable-next-line react/no-multi-comp
|
|
52
|
+
function IncrementButton({ increment, min, max, readOnly, disabled, onChange, value, }) {
|
|
53
|
+
const add = increment === 1;
|
|
54
|
+
const prevValue = isNumber(value) || 0;
|
|
55
|
+
const isDisabled = readOnly ||
|
|
56
|
+
disabled ||
|
|
57
|
+
(typeof min !== 'undefined' && prevValue + increment < min) ||
|
|
58
|
+
(typeof max !== 'undefined' && prevValue + increment > max);
|
|
59
|
+
const longPress = useLongPress((pressCounter) => onChange(prevValue + increment * pressCounter), 2000, isDisabled);
|
|
60
|
+
return (jsx("button", { "aria-label": `${add ? 'Increase' : 'Decrease'} value`, "data-increment": increment, disabled: isDisabled, type: "button", ...longPress.buttonProps, children: add ? jsx(SvgAdd, {}) : jsx(SvgRemove, {}) }));
|
|
61
|
+
}
|
|
62
|
+
NumberInput.bspkName = 'NumberInput';
|
|
63
|
+
const style = css `
|
|
64
|
+
// medium
|
|
65
|
+
--font: var(--body-base);
|
|
66
|
+
--height: var(--spacing-sizing-10);
|
|
67
|
+
--svg-width: var(--spacing-sizing-05);
|
|
68
|
+
--color: var(--foreground-neutral-on-surface);
|
|
69
|
+
width: 100%;
|
|
70
|
+
|
|
71
|
+
display: flex;
|
|
72
|
+
flex-flow: row nowrap;
|
|
73
|
+
font: var(--font);
|
|
74
|
+
height: var(--height);
|
|
75
|
+
border: 1px solid var(--stroke-neutral-base);
|
|
76
|
+
border-radius: var(--radius-small);
|
|
77
|
+
background: var(--surface-neutral-t1-base);
|
|
78
|
+
|
|
79
|
+
&:focus-within {
|
|
80
|
+
border-color: var(--stroke-brand-primary);
|
|
81
|
+
outline: 1px solid var(--stroke-brand-primary);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
[data-divider] {
|
|
85
|
+
width: 4px;
|
|
86
|
+
border-right: 1px solid var(--stroke-neutral-base);
|
|
87
|
+
// account for border - 3(margin) * 2 + 2(border)
|
|
88
|
+
height: calc(var(--height) - 8px);
|
|
89
|
+
margin: 3px 0;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
button {
|
|
93
|
+
min-width: var(--height);
|
|
94
|
+
background: none;
|
|
95
|
+
border: none;
|
|
96
|
+
cursor: pointer;
|
|
97
|
+
font: var(--font);
|
|
98
|
+
svg {
|
|
99
|
+
width: var(--svg-width);
|
|
100
|
+
}
|
|
101
|
+
display: flex;
|
|
102
|
+
justify-content: center;
|
|
103
|
+
align-items: center;
|
|
104
|
+
color: var(--color);
|
|
105
|
+
|
|
106
|
+
&:disabled {
|
|
107
|
+
cursor: not-allowed;
|
|
108
|
+
color: var(--foreground-neutral-disabled-on-surface);
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
input {
|
|
113
|
+
color: var(--color);
|
|
114
|
+
min-width: 0;
|
|
115
|
+
display: block;
|
|
116
|
+
font: var(--font);
|
|
117
|
+
text-align: center;
|
|
118
|
+
padding: 0 var(--spacing-sizing-03);
|
|
119
|
+
background: transparent;
|
|
120
|
+
border: none;
|
|
121
|
+
|
|
122
|
+
&:focus {
|
|
123
|
+
outline: none;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
&::-webkit-outer-spin-button,
|
|
127
|
+
&::-webkit-inner-spin-button {
|
|
128
|
+
-webkit-appearance: none;
|
|
129
|
+
margin: 0;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
&[type='number'] {
|
|
133
|
+
appearance: textfield;
|
|
134
|
+
-moz-appearance: textfield;
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
&:not([data-disabled], [data-readonly]) {
|
|
139
|
+
input,
|
|
140
|
+
button:not(:disabled) {
|
|
141
|
+
&:hover {
|
|
142
|
+
background-color: var(--interactions-hover-opacity);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&:active {
|
|
146
|
+
background-color: var(--interactions-press-opacity);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&[data-invalid] {
|
|
151
|
+
border-color: var(--status-error);
|
|
152
|
+
outline-color: var(--status-error);
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
&[data-disabled],
|
|
157
|
+
&[data-readonly] {
|
|
158
|
+
--color: var(--foreground-neutral-disabled-on-surface);
|
|
159
|
+
border-color: var(--stroke-neutral-disabled-light);
|
|
160
|
+
background:
|
|
161
|
+
linear-gradient(var(--interactions-disabled-opacity), var(--interactions-disabled-opacity)),
|
|
162
|
+
linear-gradient(var(--surface-neutral-t1-base), var(--surface-neutral-t1-base));
|
|
163
|
+
|
|
164
|
+
[data-divider] {
|
|
165
|
+
border-color: var(--stroke-neutral-disabled-light);
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
&[data-readonly] {
|
|
170
|
+
input {
|
|
171
|
+
color: var(--foreground-neutral-on-surface) !important;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
&[data-size='small'] {
|
|
176
|
+
--font: var(--body-small);
|
|
177
|
+
--height: var(--spacing-sizing-08);
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
&[data-size='large'] {
|
|
181
|
+
--font: var(--body-large);
|
|
182
|
+
--height: var(--spacing-sizing-12);
|
|
183
|
+
--svg-width: var(--spacing-sizing-06);
|
|
184
|
+
}
|
|
185
|
+
`;
|
|
186
|
+
|
|
187
|
+
export { NumberInput, style };
|
|
188
|
+
//# sourceMappingURL=NumberInput.js.map
|
|
@@ -0,0 +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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/OTPInput.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type OTPInputProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the otp input.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name OTPInput
|
|
13
|
+
*/
|
|
14
|
+
declare function OTPInput({ children }: OTPInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace OTPInput {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { OTPInput };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/OTPInput.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 OTPInput
|
|
8
|
+
*/
|
|
9
|
+
function OTPInput({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-otp-input": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
OTPInput.bspkName = 'OTPInput';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { OTPInput, style };
|
|
18
|
+
//# sourceMappingURL=OTPInput.js.map
|
package/OTPInput.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OTPInput.js","sources":["src/OTPInput.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,QAAQ,CAAC,EAAE,QAAQ,EAAiB,EAAA;IACzC,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,gBAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,QAAQ,CAAC,QAAQ,GAAG,UAAU,CAAC;AAIxB,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
package/PageControl.d.ts
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type PageControlProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the page control.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name PageControl
|
|
13
|
+
*/
|
|
14
|
+
declare function PageControl({ children }: PageControlProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace PageControl {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { PageControl };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/PageControl.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 PageControl
|
|
8
|
+
*/
|
|
9
|
+
function PageControl({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-page-control": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
PageControl.bspkName = 'PageControl';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { PageControl, style };
|
|
18
|
+
//# sourceMappingURL=PageControl.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageControl.js","sources":["src/PageControl.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,WAAW,CAAC,EAAE,QAAQ,EAAoB,EAAA;IAC/C,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,mBAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,WAAW,CAAC,QAAQ,GAAG,aAAa,CAAC;AAI9B,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type PasswordInputProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the password input.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name PasswordInput
|
|
13
|
+
*/
|
|
14
|
+
declare function PasswordInput({ children }: PasswordInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace PasswordInput {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { PasswordInput };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/PasswordInput.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 PasswordInput
|
|
8
|
+
*/
|
|
9
|
+
function PasswordInput({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-password-input": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
PasswordInput.bspkName = 'PasswordInput';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { PasswordInput, style };
|
|
18
|
+
//# sourceMappingURL=PasswordInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PasswordInput.js","sources":["src/PasswordInput.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,aAAa,CAAC,EAAE,QAAQ,EAAsB,EAAA;IACnD,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,qBAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,aAAa,CAAC,QAAQ,GAAG,eAAe,CAAC;AAIlC,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export type PhoneNumberInputProps = {
|
|
2
|
+
/**
|
|
3
|
+
* The content of the phone number input.
|
|
4
|
+
*
|
|
5
|
+
* @required
|
|
6
|
+
*/
|
|
7
|
+
children: string;
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* Component description coming soon.
|
|
11
|
+
*
|
|
12
|
+
* @name PhoneNumberInput
|
|
13
|
+
*/
|
|
14
|
+
declare function PhoneNumberInput({ children }: PhoneNumberInputProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
15
|
+
declare namespace PhoneNumberInput {
|
|
16
|
+
var bspkName: string;
|
|
17
|
+
}
|
|
18
|
+
export { PhoneNumberInput };
|
|
19
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
20
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -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 PhoneNumberInput
|
|
8
|
+
*/
|
|
9
|
+
function PhoneNumberInput({ children }) {
|
|
10
|
+
return (jsx("div", { css: style, "data-phone-number-input": true, children: children }));
|
|
11
|
+
}
|
|
12
|
+
PhoneNumberInput.bspkName = 'PhoneNumberInput';
|
|
13
|
+
const style = css `
|
|
14
|
+
display: flex;
|
|
15
|
+
`;
|
|
16
|
+
|
|
17
|
+
export { PhoneNumberInput, style };
|
|
18
|
+
//# sourceMappingURL=PhoneNumberInput.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PhoneNumberInput.js","sources":["src/PhoneNumberInput.tsx"],"sourcesContent":[null],"names":["_jsx"],"mappings":";;;AAWA;;;;AAIG;AACH,SAAS,gBAAgB,CAAC,EAAE,QAAQ,EAAyB,EAAA;IACzD,QACIA,aAAK,GAAG,EAAE,KAAK,EACV,yBAAA,EAAA,IAAA,EAAA,QAAA,EAAA,QAAQ,EACP,CAAA,EACR;AACN,CAAC;AAED,gBAAgB,CAAC,QAAQ,GAAG,kBAAkB,CAAC;AAIxC,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;"}
|
package/Popover.d.ts
ADDED
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { Placement } from './hooks/useFloating';
|
|
3
|
+
import { CallToActionButton, CommonProps } from './';
|
|
4
|
+
export type PopoverProps = CommonProps<'disabled'> & {
|
|
5
|
+
/**
|
|
6
|
+
* The placement of the popover.
|
|
7
|
+
*
|
|
8
|
+
* @default top
|
|
9
|
+
*/
|
|
10
|
+
placement?: Placement;
|
|
11
|
+
/** The popover header. */
|
|
12
|
+
header: string;
|
|
13
|
+
/**
|
|
14
|
+
* The content of the popover.
|
|
15
|
+
*
|
|
16
|
+
* @type multiline
|
|
17
|
+
*/
|
|
18
|
+
content: string;
|
|
19
|
+
/**
|
|
20
|
+
* The call to action button properties.
|
|
21
|
+
*
|
|
22
|
+
* @type CallToActionButton
|
|
23
|
+
*/
|
|
24
|
+
callToAction?: CallToActionButton;
|
|
25
|
+
/**
|
|
26
|
+
* A single element that will trigger the popover when clicked.
|
|
27
|
+
*
|
|
28
|
+
* @type ReactElement
|
|
29
|
+
* @required
|
|
30
|
+
*/
|
|
31
|
+
children: ReactElement;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Brief message that provide additional guidance and helps users perform an action if needed.
|
|
35
|
+
*
|
|
36
|
+
* @name Popover
|
|
37
|
+
*/
|
|
38
|
+
declare function Popover({ placement, header, content, callToAction, children, disabled }: PopoverProps): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
39
|
+
declare namespace Popover {
|
|
40
|
+
var bspkName: string;
|
|
41
|
+
}
|
|
42
|
+
export { Popover };
|
|
43
|
+
export declare const style: import("@emotion/react").SerializedStyles;
|
|
44
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
package/Popover.js
ADDED
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { jsxs, Fragment, jsx } from '@emotion/react/jsx-runtime';
|
|
2
|
+
import { SvgClose } from '@bspk/icons/Close';
|
|
3
|
+
import { css } from '@emotion/react';
|
|
4
|
+
import { useId, useState, useRef, useMemo, cloneElement } from 'react';
|
|
5
|
+
import { Button } from './Button.js';
|
|
6
|
+
import { Portal } from './Portal.js';
|
|
7
|
+
import { Txt } from './Txt.js';
|
|
8
|
+
import { useFloating } from './hooks/useFloating.js';
|
|
9
|
+
import { useOutsideClick } from './hooks/useOutsideClick.js';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* Brief message that provide additional guidance and helps users perform an action if needed.
|
|
13
|
+
*
|
|
14
|
+
* @name Popover
|
|
15
|
+
*/
|
|
16
|
+
function Popover({ placement = 'top', header, content, callToAction, children, disabled = false }) {
|
|
17
|
+
const id = useId();
|
|
18
|
+
const [show, setShow] = useState(false);
|
|
19
|
+
const arrowRef = useRef(null);
|
|
20
|
+
const { elements, floatingStyles, middlewareData } = useFloating({
|
|
21
|
+
placement: placement,
|
|
22
|
+
strategy: 'absolute',
|
|
23
|
+
offsetOptions: 22,
|
|
24
|
+
arrowRef,
|
|
25
|
+
hide: !show,
|
|
26
|
+
});
|
|
27
|
+
useOutsideClick([elements.floating], () => setShow(false));
|
|
28
|
+
const child = useMemo(() => !disabled &&
|
|
29
|
+
children &&
|
|
30
|
+
cloneElement(children, {
|
|
31
|
+
onClick: () => setShow((prev) => !prev),
|
|
32
|
+
'aria-describedby': id,
|
|
33
|
+
}), [children, disabled, id]);
|
|
34
|
+
return disabled ? (children) : (jsxs(Fragment, { children: [child, jsx(Portal, { children: jsxs("div", { css: style, "data-placement": middlewareData?.offset?.placement, "data-popover": "", id: id, ref: (node) => {
|
|
35
|
+
elements.setFloating(node);
|
|
36
|
+
elements.setTrigger(document.querySelector(`[aria-describedby="${id}"]`));
|
|
37
|
+
}, style: floatingStyles, children: [jsxs("header", { children: [jsx(Txt, { variant: "heading-h6", children: header }), jsx("button", { "aria-label": "Close", onClick: () => setShow(false), children: jsx(SvgClose, {}) })] }), jsxs("div", { "data-content": true, children: [jsx(Txt, { as: "div", variant: "body-small", children: content }), callToAction?.label && callToAction?.onClick && (jsx(Button, { "data-call-to-action": true, label: callToAction.label, onClick: callToAction.onClick, size: "small", variant: "secondary" }))] }), jsx("div", { "data-arrow": true, ref: (node) => {
|
|
38
|
+
arrowRef.current = node;
|
|
39
|
+
}, style: {
|
|
40
|
+
left: `${middlewareData?.arrow?.x}px`,
|
|
41
|
+
top: `${middlewareData?.arrow?.y}px`,
|
|
42
|
+
} })] }) })] }));
|
|
43
|
+
}
|
|
44
|
+
Popover.bspkName = 'Popover';
|
|
45
|
+
const style = css `
|
|
46
|
+
position: absolute;
|
|
47
|
+
z-index: var(--z-index-tooltip-popover);
|
|
48
|
+
background: var(--surface-neutral-t1-base);
|
|
49
|
+
box-shadow: var(--drop-shadow-float);
|
|
50
|
+
padding: var(--spacing-sizing-04);
|
|
51
|
+
width: 300px;
|
|
52
|
+
border-radius: var(--radius-large);
|
|
53
|
+
display: flex;
|
|
54
|
+
flex-direction: column;
|
|
55
|
+
|
|
56
|
+
header {
|
|
57
|
+
display: flex;
|
|
58
|
+
justify-content: space-between;
|
|
59
|
+
align-items: center;
|
|
60
|
+
margin-bottom: var(--spacing-sizing-02);
|
|
61
|
+
gap: var(--spacing-sizing-04);
|
|
62
|
+
|
|
63
|
+
button {
|
|
64
|
+
background: none;
|
|
65
|
+
border: none;
|
|
66
|
+
cursor: pointer;
|
|
67
|
+
padding: 0;
|
|
68
|
+
margin: 0 0 0 auto;
|
|
69
|
+
color: var(--foreground-neutral-on-surface-variant-01);
|
|
70
|
+
height: var(--spacing-sizing-06);
|
|
71
|
+
width: var(--spacing-sizing-06);
|
|
72
|
+
|
|
73
|
+
svg {
|
|
74
|
+
width: var(--spacing-sizing-06);
|
|
75
|
+
height: var(--spacing-sizing-06);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
--arrow-size: var(--spacing-sizing-02);
|
|
81
|
+
--arrow-offset: calc(var(--arrow-size) * -2);
|
|
82
|
+
--arrow-background-color: var(--surface-neutral-t1-base);
|
|
83
|
+
|
|
84
|
+
[data-arrow] {
|
|
85
|
+
z-index: 1;
|
|
86
|
+
position: absolute;
|
|
87
|
+
width: 0;
|
|
88
|
+
height: 0;
|
|
89
|
+
border-style: solid;
|
|
90
|
+
border-width: var(--arrow-size) var(--arrow-size) var(--arrow-size) var(--arrow-size);
|
|
91
|
+
border-color: transparent transparent transparent transparent;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
&[data-placement^='top'] {
|
|
95
|
+
[data-arrow] {
|
|
96
|
+
bottom: var(--arrow-offset);
|
|
97
|
+
border-top-color: var(--arrow-background-color);
|
|
98
|
+
filter: drop-shadow(0 2px 1px var(--shadow-10));
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
&[data-placement^='right'] {
|
|
102
|
+
[data-arrow] {
|
|
103
|
+
margin-left: calc(var(--arrow-offset) * 2);
|
|
104
|
+
border-right-color: var(--arrow-background-color);
|
|
105
|
+
filter: drop-shadow(-2px 0 1px var(--shadow-10));
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
&[data-placement^='bottom'] {
|
|
109
|
+
[data-arrow] {
|
|
110
|
+
top: var(--arrow-offset);
|
|
111
|
+
border-bottom-color: var(--arrow-background-color);
|
|
112
|
+
filter: drop-shadow(0 -2px 1px var(--shadow-10));
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
&[data-placement='bottom-start'] {
|
|
116
|
+
[data-arrow] {
|
|
117
|
+
margin-left: var(--arrow-offset);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
&[data-placement='bottom-end'] {
|
|
121
|
+
[data-arrow] {
|
|
122
|
+
margin-left: calc(var(--arrow-offset) * -1);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
&[data-placement^='left'] {
|
|
126
|
+
[data-arrow] {
|
|
127
|
+
right: var(--arrow-offset);
|
|
128
|
+
border-left-color: var(--arrow-background-color);
|
|
129
|
+
filter: drop-shadow(2px 0 1px var(--shadow-10));
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
[data-content] {
|
|
134
|
+
gap: var(--spacing-sizing-04);
|
|
135
|
+
display: flex;
|
|
136
|
+
flex-direction: column;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
[data-call-to-action] {
|
|
140
|
+
margin: 0 0 0 auto;
|
|
141
|
+
/* background: none;
|
|
142
|
+
border: none;
|
|
143
|
+
cursor: pointer;
|
|
144
|
+
padding: 0 var(--spacing-sizing-03);
|
|
145
|
+
height: var(--spacing-sizing-12);
|
|
146
|
+
font: var(--labels-small);
|
|
147
|
+
color: var(--foreground-brand-primary); */
|
|
148
|
+
}
|
|
149
|
+
`;
|
|
150
|
+
|
|
151
|
+
export { Popover, style };
|
|
152
|
+
//# sourceMapp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V,gCAAA,QAAQ,CAAC,OAAO,GAAG,IAAI,CAAC;6BAC3B,EACD,KAAK,EAAE;AACH,gCAAA,IAAI,EAAE,CAAG,EAAA,cAAc,EAAE,KAAK,EAAE,CAAC,CAAI,EAAA,CAAA;AACrC,gCAAA,GAAG,EAAE,CAAG,EAAA,cAAc,EAAE,KAAK,EAAE,CAAC,CAAI,EAAA,CAAA;AACvC,6BAAA,EAAA,CACH,CACA,EAAA,CAAA,EAAA,CACD,CACV,EAAA,CAAA,CACN,CAAC;AACN,CAAC;AAED,OAAO,CAAC,QAAQ,GAAG,SAAS,CAAC;AAItB,MAAM,KAAK,GAAG,GAAG,CAAA,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/Portal.d.ts
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export type PortalProps = {
|
|
3
|
+
/**
|
|
4
|
+
* The content to render in the portal.
|
|
5
|
+
*
|
|
6
|
+
* @required
|
|
7
|
+
*/
|
|
8
|
+
children: ReactNode;
|
|
9
|
+
/** The container to render the portal in. */
|
|
10
|
+
container?: HTMLElement;
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* Utility component to render children in the portals container provided by the BaseProvider.
|
|
14
|
+
*
|
|
15
|
+
* Initial SRR is supported.
|
|
16
|
+
*
|
|
17
|
+
* @name Portal
|
|
18
|
+
*/
|
|
19
|
+
declare function Portal({ children, container }: PortalProps): import("react").ReactPortal | null;
|
|
20
|
+
declare namespace Portal {
|
|
21
|
+
var bspkName: string;
|
|
22
|
+
}
|
|
23
|
+
export { Portal };
|
|
24
|
+
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|