@bspk/ui 1.1.34 → 1.2.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/build.ts +75 -27
- package/dist/components/Accordion/Accordion.d.ts +34 -0
- package/dist/components/Accordion/Accordion.js +42 -0
- package/dist/components/Accordion/Accordion.js.map +1 -0
- package/dist/components/Accordion/AccordionExample.d.ts +3 -0
- package/dist/components/Accordion/AccordionExample.js +72 -0
- package/dist/components/Accordion/AccordionExample.js.map +1 -0
- package/dist/components/Accordion/AccordionSection.d.ts +84 -0
- package/dist/components/Accordion/AccordionSection.js +27 -0
- package/dist/components/Accordion/AccordionSection.js.map +1 -0
- package/dist/components/Accordion/accordion.css +74 -0
- package/dist/components/Accordion/accordion.css.js +79 -0
- package/dist/components/Accordion/index.d.ts +1 -0
- package/dist/components/Accordion/index.js +2 -0
- package/dist/components/Accordion/index.js.map +1 -0
- package/dist/components/Avatar/Avatar.d.ts +16 -12
- package/dist/components/Avatar/Avatar.js +7 -9
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/AvatarExample.d.ts +1 -1
- package/dist/components/Avatar/AvatarExample.js +11 -2
- package/dist/components/Avatar/AvatarExample.js.map +1 -1
- package/dist/components/Avatar/avatar.css +27 -1
- package/dist/components/Avatar/avatar.css.js +27 -2
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +10 -12
- package/dist/components/AvatarGroup/AvatarGroup.js +6 -6
- package/dist/components/AvatarGroup/AvatarGroup.js.map +1 -1
- package/dist/components/AvatarGroup/AvatarGroupExample.d.ts +3 -0
- package/dist/components/AvatarGroup/AvatarGroupExample.js +31 -0
- package/dist/components/AvatarGroup/AvatarGroupExample.js.map +1 -0
- package/dist/components/AvatarGroup/avatar-group.css +12 -1
- package/dist/components/AvatarGroup/avatar-group.css.js +12 -2
- package/dist/components/Badge/Badge.d.ts +6 -12
- package/dist/components/Badge/Badge.js +8 -10
- package/dist/components/Badge/Badge.js.map +1 -1
- package/dist/components/Badge/BadgeExample.d.ts +1 -1
- package/dist/components/Badge/BadgeExample.js +7 -38
- package/dist/components/Badge/BadgeExample.js.map +1 -1
- package/dist/components/Badge/badge.css +15 -24
- package/dist/components/Badge/badge.css.js +15 -25
- package/dist/components/BadgeDot/BadgeDot.d.ts +47 -0
- package/dist/components/BadgeDot/BadgeDot.js +35 -0
- package/dist/components/BadgeDot/BadgeDot.js.map +1 -0
- package/dist/components/BadgeDot/BadgeDotExample.d.ts +3 -0
- package/dist/components/BadgeDot/BadgeDotExample.js +16 -0
- package/dist/components/BadgeDot/BadgeDotExample.js.map +1 -0
- package/dist/components/BadgeDot/badge-dot.css +22 -0
- package/dist/components/BadgeDot/badge-dot.css.js +27 -0
- package/dist/components/BadgeDot/index.d.ts +1 -0
- package/dist/components/BadgeDot/index.js +2 -0
- package/dist/components/BadgeDot/index.js.map +1 -0
- package/dist/components/BannerAlert/BannerAlert.d.ts +7 -7
- package/dist/components/BannerAlert/BannerAlert.js +7 -5
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlertExample.d.ts +1 -1
- package/dist/components/BannerAlert/BannerAlertExample.js +6 -6
- package/dist/components/BannerAlert/BannerAlertExample.js.map +1 -1
- package/dist/components/BannerAlert/banner-alert.css.js +0 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +6 -9
- package/dist/components/Breadcrumb/Breadcrumb.js +6 -8
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Breadcrumb/BreadcrumbExample.d.ts +1 -1
- package/dist/components/Breadcrumb/BreadcrumbExample.js +67 -0
- package/dist/components/Breadcrumb/BreadcrumbExample.js.map +1 -1
- package/dist/components/Breadcrumb/breadcrumb.css.js +0 -1
- package/dist/components/Button/Button.d.ts +11 -12
- package/dist/components/Button/Button.js +19 -19
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/ButtonExample.d.ts +1 -1
- package/dist/components/Button/ButtonExample.js +8 -1
- package/dist/components/Button/ButtonExample.js.map +1 -1
- package/dist/components/Button/button.css +1 -1
- package/dist/components/Button/button.css.js +1 -2
- package/dist/components/Card/Card.d.ts +2 -6
- package/dist/components/Card/Card.js +2 -4
- package/dist/components/Card/Card.js.map +1 -1
- package/dist/components/Card/CardExample.d.ts +1 -1
- package/dist/components/Card/card.css.js +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +6 -8
- package/dist/components/Checkbox/Checkbox.js +4 -6
- package/dist/components/Checkbox/Checkbox.js.map +1 -1
- package/dist/components/Checkbox/checkbox.css +0 -6
- package/dist/components/Checkbox/checkbox.css.js +0 -7
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +6 -10
- package/dist/components/CheckboxGroup/CheckboxGroup.js +3 -5
- package/dist/components/CheckboxGroup/CheckboxGroup.js.map +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js +23 -1
- package/dist/components/CheckboxGroup/CheckboxGroupExample.js.map +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +5 -17
- package/dist/components/CheckboxOption/CheckboxOption.js +4 -5
- package/dist/components/CheckboxOption/CheckboxOption.js.map +1 -1
- package/dist/components/ChipAssist/ChipAssist.d.ts +3 -7
- package/dist/components/ChipAssist/ChipAssist.js +3 -5
- package/dist/components/ChipAssist/ChipAssist.js.map +1 -1
- package/dist/components/ChipAssist/ChipAssistExample.d.ts +1 -1
- package/dist/components/ChipAssist/ChipAssistExample.js.map +1 -1
- package/dist/components/ChipFilter/ChipFilter.d.ts +3 -7
- package/dist/components/ChipFilter/ChipFilter.js +3 -5
- package/dist/components/ChipFilter/ChipFilter.js.map +1 -1
- package/dist/components/ChipFilter/ChipFilterExample.d.ts +2 -2
- package/dist/components/ChipFilter/ChipFilterExample.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +4 -8
- package/dist/components/ChipGroup/ChipGroup.js +3 -5
- package/dist/components/ChipGroup/ChipGroup.js.map +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.d.ts +2 -2
- package/dist/components/ChipGroup/ChipGroupExample.js +1 -1
- package/dist/components/ChipGroup/ChipGroupExample.js.map +1 -1
- package/dist/components/ChipGroup/chip-group.css.js +0 -1
- package/dist/components/ChipInput/ChipInput.d.ts +3 -7
- package/dist/components/ChipInput/ChipInput.js +3 -5
- package/dist/components/ChipInput/ChipInput.js.map +1 -1
- package/dist/components/ChipInput/ChipInputExample.d.ts +1 -1
- package/dist/components/ChipInput/ChipInputExample.js.map +1 -1
- package/dist/components/ChipSuggestion/ChipSuggestion.d.ts +3 -7
- package/dist/components/ChipSuggestion/ChipSuggestion.js +3 -5
- package/dist/components/ChipSuggestion/ChipSuggestion.js.map +1 -1
- package/dist/components/ChipSuggestion/ChipSuggestionExample.d.ts +1 -1
- package/dist/components/ChipSuggestion/ChipSuggestionExample.js.map +1 -1
- package/dist/components/ChipUtility/ChipUtility.d.ts +4 -8
- package/dist/components/ChipUtility/ChipUtility.js +2 -5
- package/dist/components/ChipUtility/ChipUtility.js.map +1 -1
- package/dist/components/ChipUtility/ChipUtilityExample.d.ts +1 -1
- package/dist/components/ChipUtility/ChipUtilityExample.js +2 -0
- package/dist/components/ChipUtility/ChipUtilityExample.js.map +1 -1
- package/dist/components/ChipUtility/chip-utility.css +10 -10
- package/dist/components/ChipUtility/chip-utility.css.js +10 -11
- package/dist/components/Combobox/Combobox.d.ts +7 -11
- package/dist/components/Combobox/Combobox.js +8 -33
- package/dist/components/Combobox/Combobox.js.map +1 -1
- package/dist/components/Combobox/ListItems.d.ts +26 -0
- package/dist/components/Combobox/ListItems.js +22 -0
- package/dist/components/Combobox/ListItems.js.map +1 -0
- package/dist/components/Dialog/Dialog.d.ts +4 -10
- package/dist/components/Dialog/Dialog.js +11 -48
- package/dist/components/Dialog/Dialog.js.map +1 -1
- package/dist/components/Dialog/DialogExample.d.ts +1 -1
- package/dist/components/Dialog/DialogExample.js +3 -4
- package/dist/components/Dialog/DialogExample.js.map +1 -1
- package/dist/components/Dialog/dialog.css +67 -37
- package/dist/components/Dialog/dialog.css.js +67 -38
- package/dist/components/Divider/Divider.d.ts +3 -7
- package/dist/components/Divider/Divider.js +3 -5
- package/dist/components/Divider/Divider.js.map +1 -1
- package/dist/components/Divider/DividerExample.d.ts +1 -1
- package/dist/components/Divider/divider.css +3 -7
- package/dist/components/Divider/divider.css.js +3 -8
- package/dist/components/EmptyState/EmptyState.d.ts +3 -7
- package/dist/components/EmptyState/EmptyState.js +2 -4
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateExample.d.ts +1 -1
- package/dist/components/EmptyState/EmptyStateExample.js +11 -6
- package/dist/components/EmptyState/EmptyStateExample.js.map +1 -1
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.d.ts +30 -11
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js +2 -4
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +6 -10
- package/dist/components/Fab/Fab.js +19 -13
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/FabExample.d.ts +1 -1
- package/dist/components/Fab/fab.css +1 -1
- package/dist/components/Fab/fab.css.js +1 -2
- package/dist/components/FileUpload/FileUpload.d.ts +87 -0
- package/dist/components/FileUpload/FileUpload.js +140 -0
- package/dist/components/FileUpload/FileUpload.js.map +1 -0
- package/dist/components/FileUpload/FileUploadExample.d.ts +3 -0
- package/dist/components/FileUpload/FileUploadExample.js +66 -0
- package/dist/components/FileUpload/FileUploadExample.js.map +1 -0
- package/dist/components/FileUpload/file-upload.css +20 -0
- package/dist/components/FileUpload/file-upload.css.js +25 -0
- package/dist/components/FileUpload/index.d.ts +1 -0
- package/dist/components/FileUpload/index.js +2 -0
- package/dist/components/FileUpload/index.js.map +1 -0
- package/dist/components/FileUploadItem/FileUploadItem.d.ts +40 -0
- package/dist/components/FileUploadItem/FileUploadItem.js +60 -0
- package/dist/components/FileUploadItem/FileUploadItem.js.map +1 -0
- package/dist/components/FileUploadItem/FileUploadItemExample.d.ts +3 -0
- package/dist/components/FileUploadItem/FileUploadItemExample.js +67 -0
- package/dist/components/FileUploadItem/FileUploadItemExample.js.map +1 -0
- package/dist/components/FileUploadItem/file-upload-item.css +40 -0
- package/dist/components/FileUploadItem/file-upload-item.css.js +45 -0
- package/dist/components/FileUploadItem/index.d.ts +1 -0
- package/dist/components/FileUploadItem/index.js +2 -0
- package/dist/components/FileUploadItem/index.js.map +1 -0
- package/dist/components/FormField/FormField.d.ts +10 -24
- package/dist/components/FormField/FormField.js +4 -7
- package/dist/components/FormField/FormField.js.map +1 -1
- package/dist/components/FormField/FormFieldExample.d.ts +4 -0
- package/dist/components/FormField/FormFieldExample.js +12 -0
- package/dist/components/FormField/FormFieldExample.js.map +1 -0
- package/dist/components/FormField/form-field.css.js +0 -1
- package/dist/components/Img/Img.d.ts +2 -6
- package/dist/components/Img/Img.js +1 -3
- package/dist/components/Img/Img.js.map +1 -1
- package/dist/components/InlineAlert/InlineAlert.d.ts +3 -7
- package/dist/components/InlineAlert/InlineAlert.js +4 -7
- package/dist/components/InlineAlert/InlineAlert.js.map +1 -1
- package/dist/components/InlineAlert/SvgWarningTwoTone.d.ts +1 -0
- package/dist/components/InlineAlert/SvgWarningTwoTone.js +5 -0
- package/dist/components/InlineAlert/SvgWarningTwoTone.js.map +1 -0
- package/dist/components/InlineAlert/inline-alert.css +1 -0
- package/dist/components/InlineAlert/inline-alert.css.js +1 -1
- package/dist/components/Layout/Layout.d.ts +4 -8
- package/dist/components/Layout/Layout.js +1 -3
- package/dist/components/Layout/Layout.js.map +1 -1
- package/dist/components/Layout/LayoutExample.d.ts +3 -0
- package/dist/components/Layout/LayoutExample.js +7 -0
- package/dist/components/Layout/LayoutExample.js.map +1 -0
- package/dist/components/Link/Link.d.ts +3 -7
- package/dist/components/Link/Link.js +2 -4
- package/dist/components/Link/Link.js.map +1 -1
- package/dist/components/Link/LinkExample.d.ts +1 -1
- package/dist/components/Link/LinkExample.js +7 -7
- package/dist/components/Link/LinkExample.js.map +1 -1
- package/dist/components/Link/link.css +1 -1
- package/dist/components/Link/link.css.js +1 -2
- package/dist/components/ListItem/ListItem.d.ts +9 -21
- package/dist/components/ListItem/ListItem.js +12 -66
- package/dist/components/ListItem/ListItem.js.map +1 -1
- package/dist/components/ListItem/ListItemButton.d.ts +2 -0
- package/dist/components/ListItem/ListItemButton.js +7 -0
- package/dist/components/ListItem/ListItemButton.js.map +1 -0
- package/dist/components/ListItem/ListItemExample.d.ts +2 -3
- package/dist/components/ListItem/ListItemExample.js +22 -41
- package/dist/components/ListItem/ListItemExample.js.map +1 -1
- package/dist/components/ListItem/list-item.css +11 -25
- package/dist/components/ListItem/list-item.css.js +12 -27
- package/dist/components/Listbox/Listbox.d.ts +7 -10
- package/dist/components/Listbox/Listbox.js +6 -8
- package/dist/components/Listbox/Listbox.js.map +1 -1
- package/dist/components/Menu/Menu.d.ts +27 -23
- package/dist/components/Menu/Menu.js +25 -32
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Menu/MenuExample.d.ts +2 -2
- package/dist/components/Menu/MenuExample.js +25 -2
- package/dist/components/Menu/MenuExample.js.map +1 -1
- package/dist/components/Menu/menu.css +5 -2
- package/dist/components/Menu/menu.css.js +5 -3
- package/dist/components/MenuButton/MenuButton.d.ts +3 -7
- package/dist/components/MenuButton/MenuButton.js +1 -3
- package/dist/components/MenuButton/MenuButton.js.map +1 -1
- package/dist/components/MenuButton/menu-button.css.js +0 -1
- package/dist/components/Modal/Modal.d.ts +6 -10
- package/dist/components/Modal/Modal.js +3 -5
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalExample.d.ts +1 -1
- package/dist/components/Modal/ModalExample.js +3 -3
- package/dist/components/Modal/ModalExample.js.map +1 -1
- package/dist/components/Modal/modal.css +6 -14
- package/dist/components/Modal/modal.css.js +6 -15
- package/dist/components/NumberField/NumberField.d.ts +5 -9
- package/dist/components/NumberField/NumberField.js +3 -6
- package/dist/components/NumberField/NumberField.js.map +1 -1
- package/dist/components/NumberInput/IncrementButton.d.ts +7 -0
- package/dist/components/NumberInput/IncrementButton.js +10 -0
- package/dist/components/NumberInput/IncrementButton.js.map +1 -0
- package/dist/components/NumberInput/NumberInput.d.ts +4 -11
- package/dist/components/NumberInput/NumberInput.js +22 -37
- package/dist/components/NumberInput/NumberInput.js.map +1 -1
- package/dist/components/NumberInput/NumberInputExample.d.ts +3 -0
- package/dist/components/NumberInput/NumberInputExample.js +5 -0
- package/dist/components/NumberInput/NumberInputExample.js.map +1 -0
- package/dist/components/NumberInput/number-input.css +8 -5
- package/dist/components/NumberInput/number-input.css.js +8 -6
- package/dist/components/OTPInput/OTPInput.d.ts +41 -0
- package/dist/components/OTPInput/OTPInput.js +57 -0
- package/dist/components/OTPInput/OTPInput.js.map +1 -0
- package/dist/components/OTPInput/OTPInputExample.d.ts +3 -0
- package/dist/components/OTPInput/OTPInputExample.js +25 -0
- package/dist/components/OTPInput/OTPInputExample.js.map +1 -0
- package/dist/components/OTPInput/index.d.ts +1 -0
- package/dist/components/OTPInput/index.js +2 -0
- package/dist/components/OTPInput/index.js.map +1 -0
- package/dist/components/OTPInput/otp-input.css +72 -0
- package/dist/components/OTPInput/otp-input.css.js +77 -0
- package/dist/components/PageControl/PageControl.d.ts +43 -0
- package/dist/components/PageControl/PageControl.js +46 -0
- package/dist/components/PageControl/PageControl.js.map +1 -0
- package/dist/components/PageControl/index.d.ts +1 -0
- package/dist/components/PageControl/index.js +2 -0
- package/dist/components/PageControl/index.js.map +1 -0
- package/dist/components/PageControl/page-control.css +33 -0
- package/dist/components/PageControl/page-control.css.js +38 -0
- package/dist/components/Pagination/PageInput.d.ts +5 -0
- package/dist/components/Pagination/PageInput.js +36 -0
- package/dist/components/Pagination/PageInput.js.map +1 -0
- package/dist/components/Pagination/PageList.d.ts +3 -0
- package/dist/components/Pagination/PageList.js +9 -0
- package/dist/components/Pagination/PageList.js.map +1 -0
- package/dist/components/Pagination/Pagination.d.ts +43 -0
- package/dist/components/Pagination/Pagination.js +49 -0
- package/dist/components/Pagination/Pagination.js.map +1 -0
- package/dist/components/Pagination/index.d.ts +1 -0
- package/dist/components/Pagination/index.js +2 -0
- package/dist/components/Pagination/index.js.map +1 -0
- package/dist/components/Pagination/pagination.css +31 -0
- package/dist/components/Pagination/pagination.css.js +36 -0
- package/dist/components/PasswordField/PasswordField.d.ts +31 -0
- package/dist/components/PasswordField/PasswordField.js +33 -0
- package/dist/components/PasswordField/PasswordField.js.map +1 -0
- package/dist/components/PasswordField/index.d.ts +1 -0
- package/dist/components/PasswordField/index.js +2 -0
- package/dist/components/PasswordField/index.js.map +1 -0
- package/dist/components/PasswordInput/PasswordInput.d.ts +21 -0
- package/dist/components/PasswordInput/PasswordInput.js +34 -0
- package/dist/components/PasswordInput/PasswordInput.js.map +1 -0
- package/dist/components/PasswordInput/index.d.ts +1 -0
- package/dist/components/PasswordInput/index.js +2 -0
- package/dist/components/PasswordInput/index.js.map +1 -0
- package/dist/components/PasswordInput/password-input.css +28 -0
- package/dist/components/PasswordInput/password-input.css.js +33 -0
- package/dist/components/PhoneNumberField/PhoneNumberField.d.ts +5 -9
- package/dist/components/PhoneNumberField/PhoneNumberField.js +3 -6
- package/dist/components/PhoneNumberField/PhoneNumberField.js.map +1 -1
- package/dist/components/PhoneNumberInput/PhoneNumberInput.d.ts +6 -10
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js +5 -9
- package/dist/components/PhoneNumberInput/PhoneNumberInput.js.map +1 -1
- package/dist/components/PhoneNumberInput/phone-number-input.css.js +0 -1
- package/dist/components/Popover/Popover.d.ts +11 -9
- package/dist/components/Popover/Popover.js +27 -11
- package/dist/components/Popover/Popover.js.map +1 -1
- package/dist/components/Popover/PopoverExample.d.ts +1 -1
- package/dist/components/Popover/PopoverExample.js +19 -3
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/Popover/popover.css +17 -22
- package/dist/components/Popover/popover.css.js +17 -23
- package/dist/components/Portal/Portal.d.ts +1 -5
- package/dist/components/Portal/Portal.js +5 -5
- package/dist/components/Portal/Portal.js.map +1 -1
- package/dist/components/ProgressBar/ProgressBar.d.ts +16 -6
- package/dist/components/ProgressBar/ProgressBar.js +7 -6
- package/dist/components/ProgressBar/ProgressBar.js.map +1 -1
- package/dist/components/ProgressBar/progress-bar.css +3 -0
- package/dist/components/ProgressBar/progress-bar.css.js +3 -1
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -2
- package/dist/components/ProgressCircle/ProgressCircle.js +4 -10
- package/dist/components/ProgressCircle/ProgressCircle.js.map +1 -1
- package/dist/components/ProgressCircle/ProgressCircleSVG.d.ts +3 -0
- package/dist/components/ProgressCircle/ProgressCircleSVG.js +9 -0
- package/dist/components/ProgressCircle/ProgressCircleSVG.js.map +1 -0
- package/dist/components/ProgressCircle/progress-circle.css.js +0 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +4 -12
- package/dist/components/ProgressionStepper/ProgressionStepper.js +6 -8
- package/dist/components/ProgressionStepper/ProgressionStepper.js.map +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.d.ts +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +2 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
- package/dist/components/ProgressionStepper/progression-stepper.css +11 -0
- package/dist/components/ProgressionStepper/progression-stepper.css.js +11 -1
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.d.ts +2 -6
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js +3 -5
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js.map +1 -1
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css +1 -1
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css.js +1 -2
- package/dist/components/Radio/Radio.d.ts +3 -7
- package/dist/components/Radio/Radio.js +3 -5
- package/dist/components/Radio/Radio.js.map +1 -1
- package/dist/components/Radio/RadioExample.d.ts +1 -1
- package/dist/components/Radio/radio.css +1 -1
- package/dist/components/Radio/radio.css.js +1 -2
- package/dist/components/RadioGroup/RadioGroup.d.ts +9 -13
- package/dist/components/RadioGroup/RadioGroup.js +6 -9
- package/dist/components/RadioGroup/RadioGroup.js.map +1 -1
- package/dist/components/RadioGroup/RadioGroupExample.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroupExample.js +2 -22
- package/dist/components/RadioGroup/RadioGroupExample.js.map +1 -1
- package/dist/components/RadioGroup/radio-group.css +0 -1
- package/dist/components/RadioGroup/radio-group.css.js +0 -2
- package/dist/components/RadioOption/RadioOption.d.ts +4 -17
- package/dist/components/RadioOption/RadioOption.js +3 -4
- package/dist/components/RadioOption/RadioOption.js.map +1 -1
- package/dist/components/RadioOption/RadioOptionExample.d.ts +1 -1
- package/dist/components/Rating/Rating.d.ts +39 -0
- package/dist/components/Rating/Rating.js +41 -0
- package/dist/components/Rating/Rating.js.map +1 -0
- package/dist/components/Rating/RatingExample.d.ts +3 -0
- package/dist/components/Rating/RatingExample.js +17 -0
- package/dist/components/Rating/RatingExample.js.map +1 -0
- package/dist/components/Rating/index.d.ts +1 -0
- package/dist/components/Rating/index.js +2 -0
- package/dist/components/Rating/index.js.map +1 -0
- package/dist/components/Rating/rating.css +65 -0
- package/dist/components/Rating/rating.css.js +70 -0
- package/dist/components/Scrim/Scrim.d.ts +3 -15
- package/dist/components/Scrim/Scrim.js +2 -4
- package/dist/components/Scrim/Scrim.js.map +1 -1
- package/dist/components/Scrim/scrim.css +12 -2
- package/dist/components/Scrim/scrim.css.js +12 -3
- package/dist/components/SearchBar/SearchBar.d.ts +5 -9
- package/dist/components/SearchBar/SearchBar.js +10 -11
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SearchBar/SearchBarExample.d.ts +1 -1
- package/dist/components/SearchBar/SearchBarExample.js +1 -1
- package/dist/components/SearchBar/SearchBarExample.js.map +1 -1
- package/dist/components/SearchBar/search-bar.css +1 -1
- package/dist/components/SearchBar/search-bar.css.js +1 -2
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +6 -86
- package/dist/components/SegmentedControl/SegmentedControl.js +5 -15
- package/dist/components/SegmentedControl/SegmentedControl.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControlExample.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControlExample.js +41 -20
- package/dist/components/SegmentedControl/SegmentedControlExample.js.map +1 -1
- package/dist/components/SegmentedControl/segmented-control.css +26 -73
- package/dist/components/SegmentedControl/segmented-control.css.js +26 -74
- package/dist/components/Select/Select.d.ts +5 -9
- package/dist/components/Select/Select.js +6 -8
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.d.ts +1 -1
- package/dist/components/Select/SelectExample.js +3 -3
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/Select/select.css +9 -8
- package/dist/components/Select/select.css.js +9 -9
- package/dist/components/SelectField/SelectField.d.ts +5 -9
- package/dist/components/SelectField/SelectField.js +5 -6
- package/dist/components/SelectField/SelectField.js.map +1 -1
- package/dist/components/Skeleton/Circular.d.ts +2 -0
- package/dist/components/Skeleton/Circular.js +6 -0
- package/dist/components/Skeleton/Circular.js.map +1 -0
- package/dist/components/Skeleton/Photo.d.ts +2 -0
- package/dist/components/Skeleton/Photo.js +6 -0
- package/dist/components/Skeleton/Photo.js.map +1 -0
- package/dist/components/Skeleton/Profile.d.ts +2 -0
- package/dist/components/Skeleton/Profile.js +6 -0
- package/dist/components/Skeleton/Profile.js.map +1 -0
- package/dist/components/Skeleton/Rectangular.d.ts +2 -0
- package/dist/components/Skeleton/Rectangular.js +6 -0
- package/dist/components/Skeleton/Rectangular.js.map +1 -0
- package/dist/components/Skeleton/Skeleton.d.ts +4 -12
- package/dist/components/Skeleton/Skeleton.js +2 -19
- package/dist/components/Skeleton/Skeleton.js.map +1 -1
- package/dist/components/Skeleton/SkeletonExample.d.ts +1 -1
- package/dist/components/Skeleton/SkeletonExample.js +13 -10
- package/dist/components/Skeleton/SkeletonExample.js.map +1 -1
- package/dist/components/Skeleton/Thumbnail.d.ts +2 -0
- package/dist/components/Skeleton/Thumbnail.js +6 -0
- package/dist/components/Skeleton/Thumbnail.js.map +1 -0
- package/dist/components/Skeleton/index.d.ts +5 -0
- package/dist/components/Skeleton/index.js +5 -0
- package/dist/components/Skeleton/index.js.map +1 -1
- package/dist/components/SkeletonText/SkeletonText.d.ts +3 -7
- package/dist/components/SkeletonText/SkeletonText.js +2 -4
- package/dist/components/SkeletonText/SkeletonText.js.map +1 -1
- package/dist/components/SkeletonText/SkeletonTextExample.d.ts +1 -1
- package/dist/components/SkeletonText/SkeletonTextExample.js.map +1 -1
- package/dist/components/Slider/Slider.d.ts +80 -0
- package/dist/components/Slider/Slider.js +131 -0
- package/dist/components/Slider/Slider.js.map +1 -0
- package/dist/components/Slider/SliderExample.d.ts +3 -0
- package/dist/components/Slider/SliderExample.js +59 -0
- package/dist/components/Slider/SliderExample.js.map +1 -0
- package/dist/components/Slider/SliderIntervalDots.d.ts +6 -0
- package/dist/components/Slider/SliderIntervalDots.js +20 -0
- package/dist/components/Slider/SliderIntervalDots.js.map +1 -0
- package/dist/components/Slider/index.d.ts +1 -0
- package/dist/components/Slider/index.js +2 -0
- package/dist/components/Slider/index.js.map +1 -0
- package/dist/components/Slider/slider.css +122 -0
- package/dist/components/Slider/slider.css.js +127 -0
- package/dist/components/Slider/useNormalizeSliderValue.d.ts +7 -0
- package/dist/components/Slider/useNormalizeSliderValue.js +12 -0
- package/dist/components/Slider/useNormalizeSliderValue.js.map +1 -0
- package/dist/components/StylesProviderAnywhere/StylesProviderAnywhere.d.ts +4 -6
- package/dist/components/StylesProviderAnywhere/StylesProviderAnywhere.js +4 -4
- package/dist/components/StylesProviderAnywhere/StylesProviderAnywhere.js.map +1 -1
- package/dist/components/StylesProviderBetterHomesGardens/StylesProviderBetterHomesGardens.d.ts +4 -6
- package/dist/components/StylesProviderBetterHomesGardens/StylesProviderBetterHomesGardens.js +4 -4
- package/dist/components/StylesProviderBetterHomesGardens/StylesProviderBetterHomesGardens.js.map +1 -1
- package/dist/components/StylesProviderCartus/StylesProviderCartus.d.ts +4 -6
- package/dist/components/StylesProviderCartus/StylesProviderCartus.js +4 -4
- package/dist/components/StylesProviderCartus/StylesProviderCartus.js.map +1 -1
- package/dist/components/StylesProviderCentury21/StylesProviderCentury21.d.ts +4 -6
- package/dist/components/StylesProviderCentury21/StylesProviderCentury21.js +4 -4
- package/dist/components/StylesProviderCentury21/StylesProviderCentury21.js.map +1 -1
- package/dist/components/StylesProviderColdwellBanker/StylesProviderColdwellBanker.d.ts +4 -6
- package/dist/components/StylesProviderColdwellBanker/StylesProviderColdwellBanker.js +4 -4
- package/dist/components/StylesProviderColdwellBanker/StylesProviderColdwellBanker.js.map +1 -1
- package/dist/components/StylesProviderCorcoran/StylesProviderCorcoran.d.ts +4 -6
- package/dist/components/StylesProviderCorcoran/StylesProviderCorcoran.js +4 -4
- package/dist/components/StylesProviderCorcoran/StylesProviderCorcoran.js.map +1 -1
- package/dist/components/StylesProviderDemo/StylesProviderDemo.d.ts +25 -0
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js +35 -0
- package/dist/components/StylesProviderDemo/StylesProviderDemo.js.map +1 -0
- package/dist/components/StylesProviderDemo/brandsCss.d.ts +2 -0
- package/dist/components/StylesProviderDemo/brandsCss.js +12 -0
- package/dist/components/StylesProviderDemo/brandsCss.js.map +1 -0
- package/dist/components/StylesProviderDemo/index.d.ts +1 -0
- package/dist/components/StylesProviderDemo/index.js +2 -0
- package/dist/components/StylesProviderDemo/index.js.map +1 -0
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.d.ts +4 -6
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.js +4 -4
- package/dist/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.js.map +1 -1
- package/dist/components/StylesProviderEra/StylesProviderEra.d.ts +4 -6
- package/dist/components/StylesProviderEra/StylesProviderEra.js +4 -4
- package/dist/components/StylesProviderEra/StylesProviderEra.js.map +1 -1
- package/dist/components/StylesProviderSothebys/StylesProviderSothebys.d.ts +4 -6
- package/dist/components/StylesProviderSothebys/StylesProviderSothebys.js +4 -4
- package/dist/components/StylesProviderSothebys/StylesProviderSothebys.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +3 -7
- package/dist/components/Switch/Switch.js +2 -4
- package/dist/components/Switch/Switch.js.map +1 -1
- package/dist/components/Switch/switch.css +1 -1
- package/dist/components/Switch/switch.css.js +1 -2
- package/dist/components/SwitchOption/SwitchOption.d.ts +5 -9
- package/dist/components/SwitchOption/SwitchOption.js +4 -5
- package/dist/components/SwitchOption/SwitchOption.js.map +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +5 -87
- package/dist/components/TabGroup/TabGroup.js +7 -22
- package/dist/components/TabGroup/TabGroup.js.map +1 -1
- package/dist/components/TabGroup/TabGroupExample.d.ts +1 -1
- package/dist/components/TabGroup/TabGroupExample.js +74 -70
- package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
- package/dist/components/TabGroup/tab-group.css +18 -54
- package/dist/components/TabGroup/tab-group.css.js +18 -55
- package/dist/components/TabList/TabList.d.ts +129 -0
- package/dist/components/TabList/TabList.js +80 -0
- package/dist/components/TabList/TabList.js.map +1 -0
- package/dist/components/TabList/TabListExample.d.ts +3 -0
- package/dist/components/TabList/TabListExample.js +6 -0
- package/dist/components/TabList/TabListExample.js.map +1 -0
- package/dist/components/TabList/index.d.ts +1 -0
- package/dist/components/TabList/index.js +2 -0
- package/dist/components/TabList/index.js.map +1 -0
- package/dist/components/TabList/tab-list.css +64 -0
- package/dist/components/TabList/tab-list.css.js +69 -0
- package/dist/components/Table/Footer.d.ts +8 -0
- package/dist/components/Table/Footer.js +8 -0
- package/dist/components/Table/Footer.js.map +1 -0
- package/dist/components/Table/Table.d.ts +46 -30
- package/dist/components/Table/Table.js +73 -12
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/TableExample.d.ts +4 -0
- package/dist/components/Table/TableExample.js +126 -0
- package/dist/components/Table/TableExample.js.map +1 -0
- package/dist/components/Table/table.css +167 -20
- package/dist/components/Table/table.css.js +167 -21
- package/dist/components/Table/utils.d.ts +81 -0
- package/dist/components/Table/utils.js +89 -0
- package/dist/components/Table/utils.js.map +1 -0
- package/dist/components/Tag/Tag.d.ts +7 -35
- package/dist/components/Tag/Tag.js +5 -11
- package/dist/components/Tag/Tag.js.map +1 -1
- package/dist/components/Tag/TagExample.d.ts +3 -0
- package/dist/components/Tag/TagExample.js +14 -0
- package/dist/components/Tag/TagExample.js.map +1 -0
- package/dist/components/Tag/tag.css +7 -11
- package/dist/components/Tag/tag.css.js +7 -12
- package/dist/components/TextField/TextField.d.ts +5 -9
- package/dist/components/TextField/TextField.js +3 -5
- package/dist/components/TextField/TextField.js.map +1 -1
- package/dist/components/TextInput/TextInput.d.ts +17 -11
- package/dist/components/TextInput/TextInput.js +4 -6
- package/dist/components/TextInput/TextInput.js.map +1 -1
- package/dist/components/TextInput/TextInputExample.d.ts +1 -1
- package/dist/components/TextInput/TextInputExample.js +2 -0
- package/dist/components/TextInput/TextInputExample.js.map +1 -1
- package/dist/components/TextInput/text-input.css +2 -2
- package/dist/components/TextInput/text-input.css.js +2 -3
- package/dist/components/Textarea/Textarea.d.ts +4 -8
- package/dist/components/Textarea/Textarea.js +3 -5
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/TextareaExample.d.ts +1 -1
- package/dist/components/Textarea/TextareaExample.js +4 -1
- package/dist/components/Textarea/TextareaExample.js.map +1 -1
- package/dist/components/Textarea/textarea.css.js +0 -1
- package/dist/components/TextareaField/TextareaField.d.ts +5 -9
- package/dist/components/TextareaField/TextareaField.js +9 -12
- package/dist/components/TextareaField/TextareaField.js.map +1 -1
- package/dist/components/TextareaField/TextareaFieldExample.d.ts +1 -1
- package/dist/components/TextareaField/TextareaFieldExample.js +2 -1
- package/dist/components/TextareaField/TextareaFieldExample.js.map +1 -1
- package/dist/components/TimeInput/Listbox.d.ts +10 -0
- package/dist/components/TimeInput/Listbox.js +66 -0
- package/dist/components/TimeInput/Listbox.js.map +1 -0
- package/dist/components/TimeInput/Segment.d.ts +21 -0
- package/dist/components/TimeInput/Segment.js +160 -0
- package/dist/components/TimeInput/Segment.js.map +1 -0
- package/dist/components/TimeInput/TimeInput.d.ts +26 -0
- package/dist/components/TimeInput/TimeInput.js +66 -0
- package/dist/components/TimeInput/TimeInput.js.map +1 -0
- package/dist/components/TimeInput/TimeInputExample.d.ts +3 -0
- package/dist/components/TimeInput/TimeInputExample.js +4 -0
- package/dist/components/TimeInput/TimeInputExample.js.map +1 -0
- package/dist/components/TimeInput/index.d.ts +1 -0
- package/dist/components/TimeInput/index.js +2 -0
- package/dist/components/TimeInput/index.js.map +1 -0
- package/dist/components/TimeInput/time-input.css +138 -0
- package/dist/components/TimeInput/time-input.css.js +143 -0
- package/dist/components/ToggleOption/ToggleOption.d.ts +7 -7
- package/dist/components/ToggleOption/ToggleOption.js +2 -4
- package/dist/components/ToggleOption/ToggleOption.js.map +1 -1
- package/dist/components/ToggleOption/toggle-option.css +17 -12
- package/dist/components/ToggleOption/toggle-option.css.js +17 -13
- package/dist/components/Tooltip/Tooltip.d.ts +12 -11
- package/dist/components/Tooltip/Tooltip.js +17 -15
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/TooltipExample.d.ts +3 -2
- package/dist/components/Tooltip/TooltipExample.js +1 -1
- package/dist/components/Tooltip/TooltipExample.js.map +1 -1
- package/dist/components/Tooltip/tooltip.css.js +0 -1
- package/dist/components/TopNavigation/TopNavigation.d.ts +1 -5
- package/dist/components/TopNavigation/TopNavigation.js +1 -3
- package/dist/components/TopNavigation/TopNavigation.js.map +1 -1
- package/dist/components/TopNavigation/top-navigation.css.js +0 -1
- package/dist/components/Truncated/Truncated.d.ts +7 -8
- package/dist/components/Truncated/Truncated.js +11 -6
- package/dist/components/Truncated/Truncated.js.map +1 -1
- package/dist/components/Txt/Txt.d.ts +4 -8
- package/dist/components/Txt/Txt.js +2 -4
- package/dist/components/Txt/Txt.js.map +1 -1
- package/dist/components/UIProvider/UIProvider.d.ts +1 -5
- package/dist/components/UIProvider/UIProvider.js +2 -4
- package/dist/components/UIProvider/UIProvider.js.map +1 -1
- package/dist/constants/brands.d.ts +7 -0
- package/dist/{index.js → constants/brands.js} +1 -9
- package/dist/{index.js.map → constants/brands.js.map} +1 -1
- package/dist/constants/phases.d.ts +3 -0
- package/dist/constants/phases.js +9 -0
- package/dist/constants/phases.js.map +1 -0
- package/dist/hooks/useCheckboxGroupState.d.ts +1 -1
- package/dist/hooks/useCheckboxState.d.ts +1 -1
- package/dist/hooks/useCombobox.d.ts +4 -3
- package/dist/hooks/useCombobox.js +7 -7
- package/dist/hooks/useCombobox.js.map +1 -1
- package/dist/hooks/useFloating.d.ts +1 -3
- package/dist/hooks/useFloating.js +4 -3
- package/dist/hooks/useFloating.js.map +1 -1
- package/dist/hooks/useId.js +5 -3
- package/dist/hooks/useId.js.map +1 -1
- package/dist/hooks/useKeyNavigation.d.ts +17 -0
- package/dist/hooks/useKeyNavigation.js +46 -0
- package/dist/hooks/useKeyNavigation.js.map +1 -0
- package/dist/hooks/useLongPress.d.ts +2 -1
- package/dist/hooks/useLongPress.js +2 -1
- package/dist/hooks/useLongPress.js.map +1 -1
- package/dist/hooks/useOutsideClick.d.ts +5 -1
- package/dist/hooks/useOutsideClick.js +1 -1
- package/dist/hooks/useOutsideClick.js.map +1 -1
- package/dist/hooks/usePaginationState.d.ts +4 -0
- package/dist/hooks/usePaginationState.js +22 -0
- package/dist/hooks/usePaginationState.js.map +1 -0
- package/dist/hooks/useRadioState.d.ts +2 -2
- package/dist/hooks/useTimeout.d.ts +8 -5
- package/dist/hooks/useTimeout.js +7 -23
- package/dist/hooks/useTimeout.js.map +1 -1
- package/dist/hooks/useUIContext.d.ts +1 -1
- package/dist/styles/anywhere.css +14 -14
- package/dist/styles/anywhere.css.js +14 -15
- package/dist/{base.css → styles/base.css} +27 -12
- package/dist/{base.css.js → styles/base.css.js} +27 -13
- package/dist/styles/better-homes-gardens.css +12 -12
- package/dist/styles/better-homes-gardens.css.js +12 -13
- package/dist/styles/cartus.css +13 -13
- package/dist/styles/cartus.css.js +13 -14
- package/dist/styles/century-21.css +14 -14
- package/dist/styles/century-21.css.js +14 -15
- package/dist/styles/coldwell-banker.css +12 -12
- package/dist/styles/coldwell-banker.css.js +12 -13
- package/dist/{colors.css.js → styles/colors.css.js} +0 -1
- package/dist/styles/corcoran.css +10 -10
- package/dist/styles/corcoran.css.js +10 -11
- package/dist/styles/denali-boss.css +13 -13
- package/dist/styles/denali-boss.css.js +13 -14
- package/dist/styles/era.css +13 -13
- package/dist/styles/era.css.js +13 -14
- package/dist/styles/sothebys.css +14 -14
- package/dist/styles/sothebys.css.js +14 -15
- package/dist/{index.d.ts → types/common.d.ts} +12 -22
- package/dist/types/common.js +10 -0
- package/dist/types/common.js.map +1 -0
- package/{meta-types.ts → dist/types/meta.d.ts} +7 -14
- package/dist/types/meta.js +47 -0
- package/dist/types/meta.js.map +1 -0
- package/dist/utils/bound.d.ts +18 -0
- package/dist/utils/bound.js +22 -0
- package/dist/utils/bound.js.map +1 -0
- package/dist/utils/createExampleChildElement.d.ts +17 -0
- package/dist/utils/createExampleChildElement.js +50 -0
- package/dist/utils/createExampleChildElement.js.map +1 -0
- package/dist/utils/demo.d.ts +29 -10
- package/dist/utils/demo.js.map +1 -1
- package/dist/utils/fileUploads.d.ts +51 -0
- package/dist/utils/fileUploads.js +2 -0
- package/dist/utils/fileUploads.js.map +1 -0
- package/dist/utils/handleKeyDown.d.ts +12 -0
- package/dist/utils/handleKeyDown.js +20 -0
- package/dist/utils/handleKeyDown.js.map +1 -0
- package/dist/utils/keyboard.js +2 -2
- package/dist/utils/keyboard.js.map +1 -1
- package/dist/utils/random.d.ts +15 -0
- package/dist/utils/random.js +26 -0
- package/dist/utils/random.js.map +1 -0
- package/dist/utils/scrollElementIntoView.d.ts +1 -1
- package/dist/utils/scrollElementIntoView.js +2 -0
- package/dist/utils/scrollElementIntoView.js.map +1 -1
- package/meta.ts +15 -28
- package/package.json +115 -91
- package/src/components/Accordion/Accordion.tsx +77 -0
- package/src/components/Accordion/AccordionExample.tsx +87 -0
- package/src/components/Accordion/AccordionSection.tsx +128 -0
- package/src/components/Accordion/accordion.scss +105 -0
- package/src/components/Accordion/index.tsx +1 -0
- package/src/components/Avatar/Avatar.tsx +37 -18
- package/src/components/Avatar/AvatarExample.tsx +12 -4
- package/src/components/Avatar/avatar.scss +34 -1
- package/src/components/AvatarGroup/AvatarGroup.tsx +20 -14
- package/src/components/AvatarGroup/AvatarGroupExample.tsx +33 -0
- package/src/components/AvatarGroup/avatar-group.scss +16 -1
- package/src/components/Badge/Badge.tsx +16 -16
- package/src/components/Badge/BadgeExample.tsx +11 -66
- package/src/components/Badge/badge.scss +18 -25
- package/src/components/BadgeDot/BadgeDot.tsx +83 -0
- package/src/components/BadgeDot/BadgeDotExample.tsx +25 -0
- package/src/components/BadgeDot/badge-dot.scss +26 -0
- package/src/components/BadgeDot/index.tsx +1 -0
- package/src/components/BannerAlert/BannerAlert.tsx +10 -9
- package/src/components/BannerAlert/BannerAlertExample.tsx +7 -8
- package/src/components/Breadcrumb/Breadcrumb.tsx +15 -17
- package/src/components/Breadcrumb/BreadcrumbExample.tsx +68 -2
- package/src/components/Button/Button.tsx +44 -29
- package/src/components/Button/ButtonExample.tsx +8 -3
- package/src/components/Button/button.scss +1 -1
- package/src/components/Card/Card.tsx +3 -6
- package/src/components/Checkbox/Checkbox.tsx +27 -25
- package/src/components/Checkbox/checkbox.scss +0 -7
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +65 -59
- package/src/components/CheckboxGroup/CheckboxGroupExample.tsx +24 -3
- package/src/components/CheckboxOption/CheckboxOption.tsx +7 -20
- package/src/components/ChipAssist/ChipAssist.tsx +11 -7
- package/src/components/ChipAssist/ChipAssistExample.tsx +1 -2
- package/src/components/ChipFilter/ChipFilter.tsx +10 -6
- package/src/components/ChipFilter/ChipFilterExample.tsx +1 -2
- package/src/components/ChipGroup/ChipGroup.tsx +4 -8
- package/src/components/ChipGroup/ChipGroupExample.tsx +6 -7
- package/src/components/ChipInput/ChipInput.tsx +3 -6
- package/src/components/ChipInput/ChipInputExample.tsx +1 -2
- package/src/components/ChipSuggestion/ChipSuggestion.tsx +3 -7
- package/src/components/ChipSuggestion/ChipSuggestionExample.tsx +1 -2
- package/src/components/ChipUtility/ChipUtility.tsx +7 -12
- package/src/components/ChipUtility/ChipUtilityExample.tsx +2 -2
- package/src/components/ChipUtility/chip-utility.scss +1 -1
- package/src/components/Combobox/Combobox.tsx +33 -123
- package/src/components/Combobox/ListItems.tsx +107 -0
- package/src/components/Dialog/Dialog.tsx +54 -95
- package/src/components/Dialog/DialogExample.tsx +4 -13
- package/src/components/Dialog/dialog.scss +81 -63
- package/src/components/Divider/Divider.tsx +5 -7
- package/src/components/Divider/divider.scss +3 -7
- package/src/components/EmptyState/EmptyState.tsx +3 -7
- package/src/components/EmptyState/EmptyStateExample.tsx +16 -18
- package/src/components/ExamplePlaceholder/ExamplePlaceholder.tsx +33 -15
- package/src/components/Fab/Fab.tsx +50 -40
- package/src/components/Fab/fab.scss +1 -1
- package/src/components/FileUpload/FileUpload.tsx +285 -0
- package/src/components/FileUpload/FileUploadExample.tsx +91 -0
- package/src/components/FileUpload/file-upload.scss +20 -0
- package/src/components/FileUpload/index.tsx +1 -0
- package/src/components/FileUploadItem/FileUploadItem.tsx +121 -0
- package/src/components/FileUploadItem/FileUploadItemExample.tsx +78 -0
- package/src/components/FileUploadItem/file-upload-item.scss +46 -0
- package/src/components/FileUploadItem/index.tsx +1 -0
- package/src/components/FormField/FormField.tsx +30 -42
- package/src/components/FormField/FormFieldExample.tsx +41 -0
- package/src/components/Img/Img.tsx +2 -6
- package/src/components/InlineAlert/InlineAlert.tsx +6 -27
- package/src/components/InlineAlert/SvgWarningTwoTone.tsx +18 -0
- package/src/components/InlineAlert/inline-alert.scss +1 -0
- package/src/components/Layout/Layout.tsx +4 -8
- package/src/components/Layout/LayoutExample.tsx +14 -0
- package/src/components/Link/Link.tsx +3 -7
- package/src/components/Link/LinkExample.tsx +7 -8
- package/src/components/Link/link.scss +1 -1
- package/src/components/ListItem/ListItem.tsx +40 -121
- package/src/components/ListItem/ListItemButton.tsx +6 -0
- package/src/components/ListItem/ListItemExample.tsx +26 -77
- package/src/components/ListItem/list-item.scss +11 -30
- package/src/components/Listbox/Listbox.tsx +14 -14
- package/src/components/Menu/Menu.tsx +83 -85
- package/src/components/Menu/MenuExample.tsx +28 -6
- package/src/components/Menu/menu.scss +6 -2
- package/src/components/MenuButton/MenuButton.tsx +3 -6
- package/src/components/Modal/Modal.tsx +12 -15
- package/src/components/Modal/ModalExample.tsx +3 -4
- package/src/components/Modal/modal.scss +8 -21
- package/src/components/NumberField/NumberField.tsx +18 -27
- package/src/components/NumberInput/IncrementButton.tsx +31 -0
- package/src/components/NumberInput/NumberInput.tsx +54 -68
- package/src/components/NumberInput/NumberInputExample.tsx +6 -0
- package/src/components/NumberInput/number-input.scss +9 -5
- package/src/components/OTPInput/OTPInput.tsx +121 -0
- package/src/components/OTPInput/OTPInputExample.tsx +26 -0
- package/src/components/OTPInput/index.tsx +1 -0
- package/src/components/OTPInput/otp-input.scss +87 -0
- package/src/components/PageControl/PageControl.tsx +98 -0
- package/src/components/PageControl/index.tsx +1 -0
- package/src/components/PageControl/page-control.scss +38 -0
- package/src/components/Pagination/PageInput.tsx +65 -0
- package/src/components/Pagination/PageList.tsx +21 -0
- package/src/components/Pagination/Pagination.tsx +104 -0
- package/src/components/Pagination/index.tsx +1 -0
- package/src/components/Pagination/pagination.scss +36 -0
- package/src/components/PasswordField/PasswordField.tsx +68 -0
- package/src/components/PasswordField/index.tsx +1 -0
- package/src/components/PasswordInput/PasswordInput.tsx +115 -0
- package/src/components/PasswordInput/index.tsx +1 -0
- package/src/components/PasswordInput/password-input.scss +36 -0
- package/src/components/PhoneNumberField/PhoneNumberField.tsx +10 -49
- package/src/components/PhoneNumberInput/PhoneNumberInput.tsx +20 -19
- package/src/components/Popover/Popover.tsx +94 -53
- package/src/components/Popover/PopoverExample.tsx +20 -4
- package/src/components/Popover/popover.scss +17 -29
- package/src/components/Portal/Portal.tsx +4 -6
- package/src/components/ProgressBar/ProgressBar.tsx +33 -9
- package/src/components/ProgressBar/progress-bar.scss +6 -0
- package/src/components/ProgressCircle/ProgressCircle.tsx +5 -43
- package/src/components/ProgressCircle/ProgressCircleSVG.tsx +38 -0
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +20 -19
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +3 -3
- package/src/components/ProgressionStepper/progression-stepper.scss +13 -0
- package/src/components/ProgressionStepperBar/ProgressionStepperBar.tsx +5 -8
- package/src/components/ProgressionStepperBar/progression-stepper-bar.scss +1 -1
- package/src/components/Radio/Radio.tsx +4 -10
- package/src/components/Radio/radio.scss +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +80 -82
- package/src/components/RadioGroup/RadioGroupExample.tsx +3 -24
- package/src/components/RadioGroup/radio-group.scss +0 -1
- package/src/components/RadioOption/RadioOption.tsx +6 -21
- package/src/components/Rating/Rating.tsx +100 -0
- package/src/components/Rating/RatingExample.tsx +18 -0
- package/src/components/Rating/index.tsx +1 -0
- package/src/components/Rating/rating.scss +85 -0
- package/src/components/Scrim/Scrim.tsx +5 -24
- package/src/components/Scrim/scrim.scss +15 -4
- package/src/components/SearchBar/SearchBar.tsx +18 -13
- package/src/components/SearchBar/SearchBarExample.tsx +9 -3
- package/src/components/SearchBar/search-bar.scss +1 -1
- package/src/components/SegmentedControl/SegmentedControl.tsx +19 -123
- package/src/components/SegmentedControl/SegmentedControlExample.tsx +42 -21
- package/src/components/SegmentedControl/segmented-control.scss +37 -89
- package/src/components/Select/Select.tsx +26 -34
- package/src/components/Select/SelectExample.tsx +4 -13
- package/src/components/Select/select.scss +13 -10
- package/src/components/SelectField/SelectField.tsx +20 -28
- package/src/components/Skeleton/Circular.tsx +5 -0
- package/src/components/Skeleton/Photo.tsx +5 -0
- package/src/components/Skeleton/Profile.tsx +5 -0
- package/src/components/Skeleton/Rectangular.tsx +5 -0
- package/src/components/Skeleton/Skeleton.tsx +6 -29
- package/src/components/Skeleton/SkeletonExample.tsx +21 -36
- package/src/components/Skeleton/Thumbnail.tsx +5 -0
- package/src/components/Skeleton/index.tsx +5 -0
- package/src/components/SkeletonText/SkeletonText.tsx +2 -6
- package/src/components/SkeletonText/SkeletonTextExample.tsx +1 -2
- package/src/components/Slider/Slider.tsx +281 -0
- package/src/components/Slider/SliderExample.tsx +63 -0
- package/src/components/Slider/SliderIntervalDots.tsx +35 -0
- package/src/components/Slider/index.tsx +1 -0
- package/src/components/Slider/slider.scss +121 -0
- package/src/components/Slider/useNormalizeSliderValue.ts +16 -0
- package/src/components/StylesProviderAnywhere/StylesProviderAnywhere.tsx +4 -6
- package/src/components/StylesProviderBetterHomesGardens/StylesProviderBetterHomesGardens.tsx +4 -6
- package/src/components/StylesProviderCartus/StylesProviderCartus.tsx +4 -6
- package/src/components/StylesProviderCentury21/StylesProviderCentury21.tsx +4 -6
- package/src/components/StylesProviderColdwellBanker/StylesProviderColdwellBanker.tsx +4 -6
- package/src/components/StylesProviderCorcoran/StylesProviderCorcoran.tsx +4 -6
- package/src/components/StylesProviderDemo/StylesProviderDemo.tsx +49 -0
- package/src/components/StylesProviderDemo/brandsCss.ts +20 -0
- package/src/components/StylesProviderDemo/index.tsx +1 -0
- package/src/components/StylesProviderDenaliBoss/StylesProviderDenaliBoss.tsx +4 -6
- package/src/components/StylesProviderEra/StylesProviderEra.tsx +4 -6
- package/src/components/StylesProviderSothebys/StylesProviderSothebys.tsx +4 -6
- package/src/components/Switch/Switch.tsx +3 -7
- package/src/components/Switch/switch.scss +1 -1
- package/src/components/SwitchOption/SwitchOption.tsx +6 -9
- package/src/components/TabGroup/TabGroup.tsx +17 -130
- package/src/components/TabGroup/TabGroupExample.tsx +78 -71
- package/src/components/TabGroup/tab-group.scss +33 -79
- package/src/components/TabList/TabList.tsx +239 -0
- package/src/components/TabList/TabListExample.tsx +7 -0
- package/src/components/TabList/index.tsx +1 -0
- package/src/components/TabList/tab-list.scss +76 -0
- package/src/components/Table/Footer.tsx +40 -0
- package/src/components/Table/Table.tsx +181 -53
- package/src/components/Table/TableExample.tsx +138 -0
- package/src/components/Table/table.scss +228 -26
- package/src/components/Table/utils.ts +179 -0
- package/src/components/Tag/Tag.tsx +11 -54
- package/src/components/Tag/TagExample.tsx +16 -0
- package/src/components/Tag/tag.scss +7 -12
- package/src/components/TextField/TextField.tsx +6 -27
- package/src/components/TextInput/TextInput.tsx +72 -54
- package/src/components/TextInput/TextInputExample.tsx +2 -2
- package/src/components/TextInput/text-input.scss +2 -1
- package/src/components/Textarea/Textarea.tsx +10 -11
- package/src/components/Textarea/TextareaExample.tsx +4 -3
- package/src/components/TextareaField/TextareaField.tsx +22 -39
- package/src/components/TextareaField/TextareaFieldExample.tsx +3 -9
- package/src/components/TimeInput/Listbox.tsx +95 -0
- package/src/components/TimeInput/Segment.tsx +221 -0
- package/src/components/TimeInput/TimeInput.tsx +192 -0
- package/src/components/TimeInput/TimeInputExample.tsx +6 -0
- package/src/components/TimeInput/index.tsx +1 -0
- package/src/components/TimeInput/time-input.scss +176 -0
- package/src/components/ToggleOption/ToggleOption.tsx +11 -12
- package/src/components/ToggleOption/toggle-option.scss +15 -11
- package/src/components/Tooltip/Tooltip.tsx +30 -27
- package/src/components/Tooltip/TooltipExample.tsx +10 -6
- package/src/components/TopNavigation/TopNavigation.tsx +1 -5
- package/src/components/Truncated/Truncated.tsx +24 -13
- package/src/components/Txt/Txt.tsx +3 -7
- package/src/components/UIProvider/UIProvider.tsx +2 -5
- package/src/constants/brands.ts +45 -0
- package/src/constants/phases.ts +11 -0
- package/src/global.d.ts +3 -0
- package/src/hooks/useCombobox.ts +9 -12
- package/src/hooks/useFloating.ts +5 -7
- package/src/hooks/useId.ts +5 -3
- package/src/hooks/useKeyNavigation.ts +66 -0
- package/src/hooks/useLongPress.ts +3 -2
- package/src/hooks/useOutsideClick.ts +9 -5
- package/src/hooks/usePaginationState.tsx +24 -0
- package/src/hooks/useTimeout.ts +14 -4
- package/src/{base.scss → styles/base.scss} +24 -8
- package/src/{index.ts → types/common.ts} +15 -62
- package/src/types/meta.ts +109 -0
- package/src/utils/bound.ts +30 -0
- package/src/utils/createExampleChildElement.tsx +83 -0
- package/src/utils/demo.ts +25 -17
- package/src/utils/fileUploads.ts +73 -0
- package/src/utils/handleKeyDown.ts +24 -0
- package/src/utils/keyboard.ts +2 -2
- package/src/utils/random.ts +25 -0
- package/src/utils/scrollElementIntoView.ts +3 -1
- package/tsconfig.json +12 -5
- package/dist/components/Chip/Chip.d.ts +0 -64
- package/dist/components/Chip/Chip.js +0 -33
- package/dist/components/Chip/Chip.js.map +0 -1
- package/dist/components/Chip/chip.css +0 -44
- package/dist/components/Chip/chip.css.js +0 -50
- package/dist/components/Chip/index.d.ts +0 -1
- package/dist/components/Chip/index.js +0 -2
- package/dist/components/Chip/index.js.map +0 -1
- package/dist/hooks/useOptionIconsInvalid.d.ts +0 -36
- package/dist/hooks/useOptionIconsInvalid.js +0 -21
- package/dist/hooks/useOptionIconsInvalid.js.map +0 -1
- package/dist/hooks/useValidChildren.d.ts +0 -6
- package/dist/hooks/useValidChildren.js +0 -30
- package/dist/hooks/useValidChildren.js.map +0 -1
- package/dist/utils/children.d.ts +0 -29
- package/dist/utils/children.js +0 -67
- package/dist/utils/children.js.map +0 -1
- package/dist/utils/srOnly.d.ts +0 -14
- package/dist/utils/srOnly.js +0 -13
- package/dist/utils/srOnly.js.map +0 -1
- package/src/components/Chip/Chip.tsx +0 -104
- package/src/components/Chip/chip.scss +0 -66
- package/src/components/Chip/index.tsx +0 -1
- package/src/hooks/useOptionIconsInvalid.ts +0 -58
- package/src/hooks/useValidChildren.ts +0 -54
- package/src/utils/children.ts +0 -80
- package/src/utils/srOnly.ts +0 -14
- /package/dist/{colors.css → styles/colors.css} +0 -0
- /package/src/{colors.scss → styles/colors.scss} +0 -0
|
@@ -1,45 +1,37 @@
|
|
|
1
|
-
import { CommonProps, ElementProps, InvalidPropsLibrary } from '-';
|
|
2
1
|
import { InlineAlert } from '-/components/InlineAlert';
|
|
3
2
|
import { Txt } from '-/components/Txt';
|
|
3
|
+
import { CommonProps, ElementProps, FormFieldControlProps } from '-/types/common';
|
|
4
|
+
|
|
4
5
|
import './form-field.scss';
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
// omits are usually a code smell, but in this case, we need to ensure we get all the props from child components
|
|
8
|
+
export type FormFieldWrapProps<T extends Record<string, unknown>> = Omit<FormFieldProps, keyof T | 'children'> &
|
|
9
|
+
Omit<T, 'aria-describedby' | 'aria-errormessage'>;
|
|
10
|
+
|
|
11
|
+
export type FormFieldProps = CommonProps<'invalid' | 'required'> & {
|
|
12
|
+
/** The error message to display when the field is invalid. */
|
|
13
|
+
errorMessage?: string;
|
|
14
|
+
/**
|
|
15
|
+
* The label of the field.
|
|
16
|
+
*
|
|
17
|
+
* @required
|
|
18
|
+
*/
|
|
19
|
+
label: string;
|
|
20
|
+
/** The id of the control. */
|
|
21
|
+
controlId: string;
|
|
7
22
|
/**
|
|
8
|
-
*
|
|
23
|
+
* The children of the form field. This should be a control such as TextInput, Select, DatePicker, or TimePicker.
|
|
9
24
|
*
|
|
10
|
-
* @
|
|
25
|
+
* @type (childProps: FormFieldControlProps) => JSX.Element
|
|
26
|
+
* @required
|
|
11
27
|
*/
|
|
12
|
-
|
|
13
|
-
/** The
|
|
14
|
-
|
|
15
|
-
/** The
|
|
16
|
-
|
|
28
|
+
children: (childProps: FormFieldControlProps) => JSX.Element;
|
|
29
|
+
/** The helperText of the field. */
|
|
30
|
+
helperText?: string;
|
|
31
|
+
/** The trailing element of the label. */
|
|
32
|
+
labelTrailing?: React.ReactNode;
|
|
17
33
|
};
|
|
18
34
|
|
|
19
|
-
export type FormFieldProps = CommonProps<'required'> &
|
|
20
|
-
InvalidPropsLibrary & {
|
|
21
|
-
/**
|
|
22
|
-
* The label of the field.
|
|
23
|
-
*
|
|
24
|
-
* @required
|
|
25
|
-
*/
|
|
26
|
-
label: string;
|
|
27
|
-
/** The id of the control. */
|
|
28
|
-
controlId: string;
|
|
29
|
-
/**
|
|
30
|
-
* The children of the form field. This should be a control such as TextInput, Select, DatePicker, or
|
|
31
|
-
* TimePicker.
|
|
32
|
-
*
|
|
33
|
-
* @type (childProps: FieldControlProps) => JSX.Element
|
|
34
|
-
* @required
|
|
35
|
-
*/
|
|
36
|
-
children: (childProps: FieldControlProps) => JSX.Element;
|
|
37
|
-
/** The helperText of the field. */
|
|
38
|
-
helperText?: string;
|
|
39
|
-
/** The trailing element of the label. */
|
|
40
|
-
labelTrailing?: React.ReactNode;
|
|
41
|
-
};
|
|
42
|
-
|
|
43
35
|
/**
|
|
44
36
|
* Wrapper component for form controls.
|
|
45
37
|
*
|
|
@@ -71,9 +63,9 @@ export type FormFieldProps = CommonProps<'required'> &
|
|
|
71
63
|
* }
|
|
72
64
|
*
|
|
73
65
|
* @name FormField
|
|
74
|
-
* @phase
|
|
66
|
+
* @phase Utility
|
|
75
67
|
*/
|
|
76
|
-
function FormField({
|
|
68
|
+
export function FormField({
|
|
77
69
|
label,
|
|
78
70
|
invalid,
|
|
79
71
|
errorMessage: errorMessageProp,
|
|
@@ -82,16 +74,17 @@ function FormField({
|
|
|
82
74
|
labelTrailing,
|
|
83
75
|
controlId,
|
|
84
76
|
required,
|
|
77
|
+
...props
|
|
85
78
|
}: ElementProps<FormFieldProps, 'div'>) {
|
|
86
79
|
const errorMessage = invalid && errorMessageProp ? errorMessageProp : undefined;
|
|
87
80
|
const errorMessageId = errorMessage ? `${controlId}-error-message` : undefined;
|
|
88
|
-
const helperText = !
|
|
81
|
+
const helperText = !errorMessage && helperTextProp ? helperTextProp : undefined;
|
|
89
82
|
const helperTextId = !errorMessage && helperText ? `${controlId}-helper-text` : undefined;
|
|
90
83
|
|
|
91
84
|
if (typeof children !== 'function') return null;
|
|
92
85
|
|
|
93
86
|
return (
|
|
94
|
-
<div data-bspk="form-field" data-invalid={invalid || undefined}>
|
|
87
|
+
<div {...props} data-bspk-utility="form-field" data-invalid={invalid || undefined}>
|
|
95
88
|
<header>
|
|
96
89
|
<label htmlFor={controlId}>
|
|
97
90
|
<Txt as="span" variant="labels-small">
|
|
@@ -106,7 +99,6 @@ function FormField({
|
|
|
106
99
|
{labelTrailing}
|
|
107
100
|
</header>
|
|
108
101
|
{children({
|
|
109
|
-
invalid,
|
|
110
102
|
'aria-describedby': helperTextId,
|
|
111
103
|
'aria-errormessage': errorMessageId,
|
|
112
104
|
})}
|
|
@@ -124,8 +116,4 @@ function FormField({
|
|
|
124
116
|
);
|
|
125
117
|
}
|
|
126
118
|
|
|
127
|
-
FormField.bspkName = 'FormField';
|
|
128
|
-
|
|
129
|
-
export { FormField };
|
|
130
|
-
|
|
131
119
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { FormFieldWrapProps, FormField } from './FormField';
|
|
2
|
+
import { TextInput, TextInputProps } from '-/components/TextInput';
|
|
3
|
+
import { ComponentExample } from '-/utils/demo';
|
|
4
|
+
|
|
5
|
+
export const FormFieldExample: ComponentExample<FormFieldWrapProps<TextInputProps>> = {
|
|
6
|
+
render: ({ props, setState }) => {
|
|
7
|
+
const {
|
|
8
|
+
invalid,
|
|
9
|
+
errorMessage,
|
|
10
|
+
label,
|
|
11
|
+
controlId = 'example-control-id',
|
|
12
|
+
helperText,
|
|
13
|
+
labelTrailing,
|
|
14
|
+
...inputProps
|
|
15
|
+
} = props;
|
|
16
|
+
|
|
17
|
+
return (
|
|
18
|
+
<FormField
|
|
19
|
+
controlId={controlId}
|
|
20
|
+
errorMessage={errorMessage}
|
|
21
|
+
helperText={helperText}
|
|
22
|
+
invalid={invalid}
|
|
23
|
+
label={label}
|
|
24
|
+
labelTrailing={labelTrailing}
|
|
25
|
+
>
|
|
26
|
+
{(fieldProps) => {
|
|
27
|
+
return (
|
|
28
|
+
<TextInput
|
|
29
|
+
{...inputProps}
|
|
30
|
+
{...fieldProps}
|
|
31
|
+
aria-label={label}
|
|
32
|
+
invalid={invalid}
|
|
33
|
+
onChange={(next: string) => setState({ value: next })}
|
|
34
|
+
value={props.value}
|
|
35
|
+
/>
|
|
36
|
+
);
|
|
37
|
+
}}
|
|
38
|
+
</FormField>
|
|
39
|
+
);
|
|
40
|
+
},
|
|
41
|
+
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ElementProps } from '
|
|
1
|
+
import { ElementProps } from '-/types/common';
|
|
2
2
|
|
|
3
3
|
export type ImgProps = {
|
|
4
4
|
/**
|
|
@@ -28,12 +28,8 @@ export type ImgProps = {
|
|
|
28
28
|
* @name Img
|
|
29
29
|
* @phase Backlog
|
|
30
30
|
*/
|
|
31
|
-
function Img({ alt, ...props }: ElementProps<ImgProps, 'img'>) {
|
|
31
|
+
export function Img({ alt, ...props }: ElementProps<ImgProps, 'img'>) {
|
|
32
32
|
return <img {...props} alt={alt} data-bspk="img" />;
|
|
33
33
|
}
|
|
34
34
|
|
|
35
|
-
Img.bspkName = 'Img';
|
|
36
|
-
|
|
37
|
-
export { Img };
|
|
38
|
-
|
|
39
35
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -2,9 +2,10 @@ import { SvgCheckCircleFill } from '@bspk/icons/CheckCircleFill';
|
|
|
2
2
|
import { SvgErrorFill } from '@bspk/icons/ErrorFill';
|
|
3
3
|
import { SvgInfoFill } from '@bspk/icons/InfoFill';
|
|
4
4
|
import { ReactNode } from 'react';
|
|
5
|
-
|
|
6
|
-
import { AlertVariant } from '-';
|
|
5
|
+
import { SvgWarningTwoTone } from './SvgWarningTwoTone';
|
|
7
6
|
import { Txt } from '-/components/Txt';
|
|
7
|
+
import { AlertVariant } from '-/types/common';
|
|
8
|
+
|
|
8
9
|
import './inline-alert.scss';
|
|
9
10
|
|
|
10
11
|
export type InlineAlertProps = {
|
|
@@ -37,39 +38,17 @@ export type InlineAlertProps = {
|
|
|
37
38
|
* }
|
|
38
39
|
*
|
|
39
40
|
* @name InlineAlert
|
|
40
|
-
* @phase
|
|
41
|
+
* @phase UXReview
|
|
41
42
|
*/
|
|
42
|
-
function InlineAlert({ children, variant = 'informational', id }: InlineAlertProps) {
|
|
43
|
+
export function InlineAlert({ children, variant = 'informational', id }: InlineAlertProps) {
|
|
43
44
|
return (
|
|
44
|
-
<div data-bspk="inline-alert" data-variant={variant} id={id}>
|
|
45
|
+
<div data-bspk="inline-alert" data-variant={variant} id={id} role="alert">
|
|
45
46
|
{VARIANT_ICON[variant]}
|
|
46
47
|
<Txt variant="body-small">{children}</Txt>
|
|
47
48
|
</div>
|
|
48
49
|
);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
InlineAlert.bspkName = 'InlineAlert';
|
|
52
|
-
|
|
53
|
-
export { InlineAlert };
|
|
54
|
-
|
|
55
|
-
// eslint-disable-next-line react/no-multi-comp
|
|
56
|
-
const SvgWarningTwoTone = () => (
|
|
57
|
-
<svg fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
58
|
-
<path
|
|
59
|
-
d="M2.72503 21C2.5417 21 2.37503 20.9542 2.22503 20.8625C2.07503 20.7708 1.95837 20.65 1.87503 20.5C1.7917 20.35 1.74587 20.1875 1.73753 20.0125C1.7292 19.8375 1.77503 19.6667 1.87503 19.5L11.125 3.5C11.225 3.33333 11.3542 3.20833 11.5125 3.125C11.6709 3.04167 11.8334 3 12 3C12.1667 3 12.3292 3.04167 12.4875 3.125C12.6459 3.20833 12.775 3.33333 12.875 3.5L22.125 19.5C22.225 19.6667 22.2709 19.8375 22.2625 20.0125C22.2542 20.1875 22.2084 20.35 22.125 20.5C22.0417 20.65 21.925 20.7708 21.775 20.8625C21.625 20.9542 21.4584 21 21.275 21H2.72503ZM12 18C12.2834 18 12.5209 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5209 16.0958 12.2834 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0959 16.4792 11 16.7167 11 17C11 17.2833 11.0959 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM12 15C12.2834 15 12.5209 14.9042 12.7125 14.7125C12.9042 14.5208 13 14.2833 13 14V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5209 10.0958 12.2834 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0959 10.4792 11 10.7167 11 11V14C11 14.2833 11.0959 14.5208 11.2875 14.7125C11.4792 14.9042 11.7167 15 12 15Z"
|
|
60
|
-
fill="currentColor"
|
|
61
|
-
/>
|
|
62
|
-
<path
|
|
63
|
-
d="M12.7125 17.7125C12.5208 17.9042 12.2833 18 12 18C11.7167 18 11.4792 17.9042 11.2875 17.7125C11.0958 17.5208 11 17.2833 11 17C11 16.7167 11.0958 16.4792 11.2875 16.2875C11.4792 16.0958 11.7167 16 12 16C12.2833 16 12.5208 16.0958 12.7125 16.2875C12.9042 16.4792 13 16.7167 13 17C13 17.2833 12.9042 17.5208 12.7125 17.7125Z"
|
|
64
|
-
data-second-tone
|
|
65
|
-
/>
|
|
66
|
-
<path
|
|
67
|
-
d="M12.7125 14.7125C12.5208 14.9042 12.2833 15 12 15C11.7167 15 11.4792 14.9042 11.2875 14.7125C11.0958 14.5208 11 14.2833 11 14V11C11 10.7167 11.0958 10.4792 11.2875 10.2875C11.4792 10.0958 11.7167 10 12 10C12.2833 10 12.5208 10.0958 12.7125 10.2875C12.9042 10.4792 13 10.7167 13 11V14C13 14.2833 12.9042 14.5208 12.7125 14.7125Z"
|
|
68
|
-
data-second-tone
|
|
69
|
-
/>
|
|
70
|
-
</svg>
|
|
71
|
-
);
|
|
72
|
-
|
|
73
52
|
const VARIANT_ICON: Record<AlertVariant, ReactNode> = {
|
|
74
53
|
error: <SvgErrorFill />,
|
|
75
54
|
informational: <SvgInfoFill />,
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export function SvgWarningTwoTone() {
|
|
2
|
+
return (
|
|
3
|
+
<svg fill="none" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<path
|
|
5
|
+
d="M2.72503 21C2.5417 21 2.37503 20.9542 2.22503 20.8625C2.07503 20.7708 1.95837 20.65 1.87503 20.5C1.7917 20.35 1.74587 20.1875 1.73753 20.0125C1.7292 19.8375 1.77503 19.6667 1.87503 19.5L11.125 3.5C11.225 3.33333 11.3542 3.20833 11.5125 3.125C11.6709 3.04167 11.8334 3 12 3C12.1667 3 12.3292 3.04167 12.4875 3.125C12.6459 3.20833 12.775 3.33333 12.875 3.5L22.125 19.5C22.225 19.6667 22.2709 19.8375 22.2625 20.0125C22.2542 20.1875 22.2084 20.35 22.125 20.5C22.0417 20.65 21.925 20.7708 21.775 20.8625C21.625 20.9542 21.4584 21 21.275 21H2.72503ZM12 18C12.2834 18 12.5209 17.9042 12.7125 17.7125C12.9042 17.5208 13 17.2833 13 17C13 16.7167 12.9042 16.4792 12.7125 16.2875C12.5209 16.0958 12.2834 16 12 16C11.7167 16 11.4792 16.0958 11.2875 16.2875C11.0959 16.4792 11 16.7167 11 17C11 17.2833 11.0959 17.5208 11.2875 17.7125C11.4792 17.9042 11.7167 18 12 18ZM12 15C12.2834 15 12.5209 14.9042 12.7125 14.7125C12.9042 14.5208 13 14.2833 13 14V11C13 10.7167 12.9042 10.4792 12.7125 10.2875C12.5209 10.0958 12.2834 10 12 10C11.7167 10 11.4792 10.0958 11.2875 10.2875C11.0959 10.4792 11 10.7167 11 11V14C11 14.2833 11.0959 14.5208 11.2875 14.7125C11.4792 14.9042 11.7167 15 12 15Z"
|
|
6
|
+
fill="currentColor"
|
|
7
|
+
/>
|
|
8
|
+
<path
|
|
9
|
+
d="M12.7125 17.7125C12.5208 17.9042 12.2833 18 12 18C11.7167 18 11.4792 17.9042 11.2875 17.7125C11.0958 17.5208 11 17.2833 11 17C11 16.7167 11.0958 16.4792 11.2875 16.2875C11.4792 16.0958 11.7167 16 12 16C12.2833 16 12.5208 16.0958 12.7125 16.2875C12.9042 16.4792 13 16.7167 13 17C13 17.2833 12.9042 17.5208 12.7125 17.7125Z"
|
|
10
|
+
data-second-tone
|
|
11
|
+
/>
|
|
12
|
+
<path
|
|
13
|
+
d="M12.7125 14.7125C12.5208 14.9042 12.2833 15 12 15C11.7167 15 11.4792 14.9042 11.2875 14.7125C11.0958 14.5208 11 14.2833 11 14V11C11 10.7167 11.0958 10.4792 11.2875 10.2875C11.4792 10.0958 11.7167 10 12 10C12.2833 10 12.5208 10.0958 12.7125 10.2875C12.9042 10.4792 13 10.7167 13 11V14C13 14.2833 12.9042 14.5208 12.7125 14.7125Z"
|
|
14
|
+
data-second-tone
|
|
15
|
+
/>
|
|
16
|
+
</svg>
|
|
17
|
+
);
|
|
18
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ElementType, ReactNode } from 'react';
|
|
2
2
|
|
|
3
|
-
import { ElementProps } from '
|
|
3
|
+
import { ElementProps } from '-/types/common';
|
|
4
4
|
|
|
5
5
|
export type LayoutProps<As extends ElementType = 'div'> = {
|
|
6
6
|
/**
|
|
@@ -25,13 +25,13 @@ export type LayoutProps<As extends ElementType = 'div'> = {
|
|
|
25
25
|
*/
|
|
26
26
|
as?: As;
|
|
27
27
|
/**
|
|
28
|
-
*
|
|
28
|
+
* The alignment style to apply to the Layout.
|
|
29
29
|
*
|
|
30
30
|
* @default flex-start
|
|
31
31
|
*/
|
|
32
32
|
align?: 'center' | 'flex-end' | 'flex-start' | 'stretch';
|
|
33
33
|
/**
|
|
34
|
-
*
|
|
34
|
+
* The justification style to apply to the Layout.
|
|
35
35
|
*
|
|
36
36
|
* @default flex-start
|
|
37
37
|
*/
|
|
@@ -51,7 +51,7 @@ export type LayoutProps<As extends ElementType = 'div'> = {
|
|
|
51
51
|
* @name Layout
|
|
52
52
|
* @phase Utility
|
|
53
53
|
*/
|
|
54
|
-
function Layout<As extends ElementType = 'div'>({
|
|
54
|
+
export function Layout<As extends ElementType = 'div'>({
|
|
55
55
|
children,
|
|
56
56
|
column,
|
|
57
57
|
gap = '16',
|
|
@@ -84,8 +84,4 @@ function Layout<As extends ElementType = 'div'>({
|
|
|
84
84
|
);
|
|
85
85
|
}
|
|
86
86
|
|
|
87
|
-
Layout.bspkName = 'Layout';
|
|
88
|
-
|
|
89
|
-
export { Layout };
|
|
90
|
-
|
|
91
87
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { LayoutProps } from './Layout';
|
|
2
|
+
import { ComponentExample } from '-/utils/demo';
|
|
3
|
+
|
|
4
|
+
export const LayoutExample: ComponentExample<LayoutProps> = {
|
|
5
|
+
render: ({ props, Component }) => {
|
|
6
|
+
return (
|
|
7
|
+
<Component {...props}>
|
|
8
|
+
<div>Alpha</div>
|
|
9
|
+
<div>Beta</div>
|
|
10
|
+
<div>Gamma</div>
|
|
11
|
+
</Component>
|
|
12
|
+
);
|
|
13
|
+
},
|
|
14
|
+
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { AnchorHTMLAttributes, ComponentType, lazy, LazyExoticComponent, Suspense } from 'react';
|
|
2
2
|
|
|
3
|
-
import { CommonPropsLibrary, ElementProps } from '
|
|
3
|
+
import { CommonPropsLibrary, ElementProps } from '-/types/common';
|
|
4
4
|
|
|
5
5
|
import './link.scss';
|
|
6
6
|
|
|
@@ -53,9 +53,9 @@ export type LinkProps = Pick<CommonPropsLibrary, 'disabled'> & {
|
|
|
53
53
|
* }
|
|
54
54
|
*
|
|
55
55
|
* @name Link
|
|
56
|
-
* @phase
|
|
56
|
+
* @phase UXReview
|
|
57
57
|
*/
|
|
58
|
-
function Link({ label, trailingIcon, size, variant, target = '_self', ...props }: ElementProps<LinkProps, 'a'>) {
|
|
58
|
+
export function Link({ label, trailingIcon, size, variant, target = '_self', ...props }: ElementProps<LinkProps, 'a'>) {
|
|
59
59
|
let LazyIcon: LazyExoticComponent<ComponentType<unknown>> | undefined = undefined;
|
|
60
60
|
|
|
61
61
|
if (trailingIcon === 'external')
|
|
@@ -89,8 +89,4 @@ function Link({ label, trailingIcon, size, variant, target = '_self', ...props }
|
|
|
89
89
|
);
|
|
90
90
|
}
|
|
91
91
|
|
|
92
|
-
Link.bspkName = 'Link';
|
|
93
|
-
|
|
94
|
-
export { Link };
|
|
95
|
-
|
|
96
92
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1,17 +1,15 @@
|
|
|
1
|
-
import { Fragment
|
|
1
|
+
import { Fragment } from 'react';
|
|
2
2
|
|
|
3
|
+
import { LinkProps, Link } from '.';
|
|
3
4
|
import { Txt } from '-/components/Txt';
|
|
5
|
+
import { useId } from '-/hooks/useId';
|
|
4
6
|
import { ComponentExample } from '-/utils/demo';
|
|
5
7
|
|
|
6
|
-
import { LinkProps, Link } from '.';
|
|
7
|
-
|
|
8
8
|
export const LinkExample: ComponentExample<LinkProps> = {
|
|
9
9
|
containerStyle: {
|
|
10
10
|
width: '100%',
|
|
11
11
|
},
|
|
12
|
-
render: ({ props,
|
|
13
|
-
if (preset?.label === 'Pseudo States') return <LinkDemo props={props} />;
|
|
14
|
-
|
|
12
|
+
render: ({ props, Component }) => {
|
|
15
13
|
return (
|
|
16
14
|
<div
|
|
17
15
|
style={{
|
|
@@ -26,9 +24,10 @@ export const LinkExample: ComponentExample<LinkProps> = {
|
|
|
26
24
|
</div>
|
|
27
25
|
);
|
|
28
26
|
},
|
|
29
|
-
|
|
27
|
+
sections: [
|
|
30
28
|
{
|
|
31
|
-
|
|
29
|
+
title: 'Variants with Pseudo States',
|
|
30
|
+
content: ({ props }) => <LinkDemo props={props} />,
|
|
32
31
|
},
|
|
33
32
|
],
|
|
34
33
|
};
|
|
@@ -1,27 +1,12 @@
|
|
|
1
|
-
import { AnchorHTMLAttributes, ElementType, ReactNode
|
|
2
|
-
|
|
3
|
-
import { CommonProps, ElementProps, SetRef } from '-';
|
|
4
|
-
import { ButtonProps, Button } from '-/components/Button';
|
|
1
|
+
import { AnchorHTMLAttributes, ElementType, ReactNode } from 'react';
|
|
2
|
+
import { ListItemButton } from './ListItemButton';
|
|
5
3
|
import { Truncated } from '-/components/Truncated';
|
|
6
|
-
import {
|
|
7
|
-
import { useErrorLogger } from '-/utils/errors';
|
|
8
|
-
import './list-item.scss';
|
|
4
|
+
import { CommonProps, ElementProps, SetRef } from '-/types/common';
|
|
9
5
|
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export const TRAILING_COMPONENTS = Object.freeze([
|
|
13
|
-
'ListItemButton',
|
|
14
|
-
'Checkbox',
|
|
15
|
-
'Icon',
|
|
16
|
-
'Radio',
|
|
17
|
-
'Switch',
|
|
18
|
-
'Tag',
|
|
19
|
-
'Txt',
|
|
20
|
-
'string',
|
|
21
|
-
]);
|
|
6
|
+
import './list-item.scss';
|
|
22
7
|
|
|
23
8
|
export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = CommonProps<
|
|
24
|
-
'active' | 'disabled' | 'readOnly'
|
|
9
|
+
'active' | 'disabled' | 'owner' | 'readOnly'
|
|
25
10
|
> & {
|
|
26
11
|
/**
|
|
27
12
|
* The element type to render as.
|
|
@@ -65,12 +50,10 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
65
50
|
href?: AnchorHTMLAttributes<unknown>['href'];
|
|
66
51
|
/** A ref to the list item div element. */
|
|
67
52
|
innerRef?: SetRef<T>;
|
|
68
|
-
/**
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
*/
|
|
73
|
-
selected?: boolean;
|
|
53
|
+
/** The ARIA role of the list item. */
|
|
54
|
+
role?: string;
|
|
55
|
+
/** Whether the aria-label should be included on the list item. */
|
|
56
|
+
includeAriaLabel?: boolean;
|
|
74
57
|
};
|
|
75
58
|
|
|
76
59
|
/**
|
|
@@ -102,132 +85,68 @@ export type ListItemProps<As extends ElementType = 'div', T = HTMLElement> = Com
|
|
|
102
85
|
* );
|
|
103
86
|
* }
|
|
104
87
|
*
|
|
105
|
-
* @subComponents ListItemButton
|
|
106
|
-
*
|
|
107
88
|
* @name ListItem
|
|
108
|
-
* @phase
|
|
89
|
+
* @phase UXReview
|
|
109
90
|
*/
|
|
110
91
|
function ListItem<As extends ElementType = 'div', T = HTMLElement>({
|
|
92
|
+
includeAriaLabel = true,
|
|
93
|
+
active,
|
|
111
94
|
as,
|
|
112
95
|
disabled,
|
|
113
|
-
|
|
114
|
-
trailing: trailingProp,
|
|
96
|
+
innerRef,
|
|
115
97
|
label,
|
|
116
|
-
|
|
117
|
-
active,
|
|
98
|
+
leading,
|
|
118
99
|
readOnly,
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
100
|
+
owner,
|
|
101
|
+
role,
|
|
102
|
+
subText,
|
|
103
|
+
trailing,
|
|
122
104
|
...props
|
|
123
105
|
}: ElementProps<ListItemProps<As, T>, As>) {
|
|
124
|
-
|
|
125
|
-
const role: AriaRole[] = ['option', roleProp || 'listitem'];
|
|
126
|
-
const AsInner: ElementType = 'span';
|
|
127
|
-
|
|
128
|
-
const { leading, trailing } = useChildren(leadingProp, trailingProp);
|
|
106
|
+
if (!label) return null;
|
|
129
107
|
|
|
130
|
-
|
|
108
|
+
let As = as || 'div';
|
|
131
109
|
|
|
132
|
-
if (
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
// if trailing is a ListItemButton and As is a button, change As to div
|
|
136
|
-
if (trailing?.name === 'ListItemButton') As = 'div';
|
|
137
|
-
|
|
138
|
-
if (['Checkbox', 'Radio', 'Switch'].includes(trailing.name)) {
|
|
139
|
-
As = 'div';
|
|
140
|
-
role.push('button');
|
|
141
|
-
}
|
|
110
|
+
if (!as) {
|
|
111
|
+
if (props.href) As = 'a';
|
|
112
|
+
else if (props.onClick) As = 'button';
|
|
142
113
|
}
|
|
143
114
|
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
const actionable = ('onClick' in props || 'href' in props) && !disabled && !readOnly;
|
|
115
|
+
const actionable = (As === 'a' || As === 'button') && !props.disabled && !props.readOnly;
|
|
147
116
|
|
|
148
117
|
return (
|
|
149
118
|
<As
|
|
150
119
|
{...props}
|
|
151
120
|
aria-disabled={disabled || undefined}
|
|
152
|
-
aria-label={
|
|
153
|
-
|
|
121
|
+
aria-label={
|
|
122
|
+
As === 'label' || As === 'span' || As === 'div' || includeAriaLabel === false ? undefined : label
|
|
123
|
+
}
|
|
124
|
+
as={As}
|
|
154
125
|
data-action={actionable || undefined}
|
|
155
126
|
data-active={active || undefined}
|
|
156
127
|
data-bspk="list-item"
|
|
157
|
-
data-
|
|
128
|
+
data-bspk-owner={owner || undefined}
|
|
158
129
|
data-readonly={readOnly || undefined}
|
|
159
130
|
ref={innerRef}
|
|
160
|
-
role=
|
|
161
|
-
tabIndex={0}
|
|
131
|
+
role={role || (As === 'button' ? 'option' : undefined)}
|
|
132
|
+
tabIndex={actionable ? 0 : undefined}
|
|
162
133
|
>
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
{leading.child}
|
|
167
|
-
</span>
|
|
168
|
-
)}
|
|
169
|
-
<span data-item-label>
|
|
170
|
-
<Truncated data-text>{label}</Truncated>
|
|
171
|
-
{subText && <span data-sub-text>{subText}</span>}
|
|
134
|
+
{leading && (
|
|
135
|
+
<span aria-hidden data-leading>
|
|
136
|
+
{leading}
|
|
172
137
|
</span>
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
</
|
|
138
|
+
)}
|
|
139
|
+
<span data-item-label>
|
|
140
|
+
<Truncated data-text>{label}</Truncated>
|
|
141
|
+
{subText && <span data-sub-text>{subText}</span>}
|
|
142
|
+
</span>
|
|
143
|
+
{trailing && <span data-trailing>{trailing}</span>}
|
|
179
144
|
</As>
|
|
180
145
|
);
|
|
181
146
|
}
|
|
182
|
-
ListItem.bspkName = 'ListItem';
|
|
183
147
|
|
|
184
|
-
/** A button that can be used as a trailing element in a ListItem. */
|
|
185
|
-
// eslint-disable-next-line react/no-multi-comp
|
|
186
|
-
function ListItemButton({ label, icon, ...buttonProps }: Pick<ButtonProps, 'icon' | 'label' | 'onClick'>) {
|
|
187
|
-
return <Button icon={icon} label={label} showLabel={false} {...buttonProps} size="large" variant="tertiary" />;
|
|
188
|
-
}
|
|
189
|
-
ListItemButton.bspkName = 'ListItemButton';
|
|
190
148
|
ListItem.Button = ListItemButton;
|
|
191
149
|
|
|
192
150
|
export { ListItem };
|
|
193
151
|
|
|
194
|
-
function useChildren(
|
|
195
|
-
leadingProp: ReactNode,
|
|
196
|
-
trailingProp: ReactNode,
|
|
197
|
-
): {
|
|
198
|
-
leading?: { child: ReactNode; name: string } | null;
|
|
199
|
-
trailing?: { child: ReactNode; name: string } | null;
|
|
200
|
-
} {
|
|
201
|
-
const { logError } = useErrorLogger();
|
|
202
|
-
|
|
203
|
-
let leading: ChildElement | null = getChildrenElements(leadingProp)[0] || null;
|
|
204
|
-
|
|
205
|
-
const trailingElements = getChildrenElements(trailingProp);
|
|
206
|
-
|
|
207
|
-
let trailing: ChildElement | null = trailingElements[0] || null;
|
|
208
|
-
|
|
209
|
-
if (leading) {
|
|
210
|
-
const valid = LEADING_COMPONENTS.includes(leading.name);
|
|
211
|
-
if (!valid) leading = null;
|
|
212
|
-
logError(
|
|
213
|
-
!valid,
|
|
214
|
-
`ListItem - Leading child is invalid. Must be one of:${LEADING_COMPONENTS} Elements: ${leading?.name || 'None'}`,
|
|
215
|
-
);
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
if (trailing) {
|
|
219
|
-
const valid = TRAILING_COMPONENTS.includes(trailing.name);
|
|
220
|
-
if (!valid) trailing = null;
|
|
221
|
-
logError(
|
|
222
|
-
!valid,
|
|
223
|
-
`ListItem - Trailing child is invalid. Must be one of:${TRAILING_COMPONENTS} Elements: ${trailing?.name || 'None'}`,
|
|
224
|
-
);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return {
|
|
228
|
-
leading,
|
|
229
|
-
trailing,
|
|
230
|
-
};
|
|
231
|
-
}
|
|
232
|
-
|
|
233
152
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonProps, Button } from '-/components/Button';
|
|
2
|
+
|
|
3
|
+
// A button that can be used as a trailing element in a ListItem.
|
|
4
|
+
export function ListItemButton({ label, icon, ...buttonProps }: Pick<ButtonProps, 'icon' | 'label' | 'onClick'>) {
|
|
5
|
+
return <Button icon={icon} iconOnly label={label} {...buttonProps} size="large" variant="tertiary" />;
|
|
6
|
+
}
|