@bspk/ui 1.3.11 → 1.3.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +22 -20
- package/dist/components/Accordion/Accordion.js +22 -20
- package/dist/components/Accordion/Accordion.js.map +1 -1
- package/dist/components/Accordion/AccordionExample.js +5 -4
- package/dist/components/Accordion/AccordionExample.js.map +1 -1
- package/dist/components/Avatar/Avatar.d.ts +1 -2
- package/dist/components/Avatar/Avatar.js +2 -3
- package/dist/components/Avatar/Avatar.js.map +1 -1
- package/dist/components/Avatar/avatar.css +13 -8
- package/dist/components/Avatar/avatar.css.js +13 -8
- package/dist/components/AvatarGroup/AvatarGroup.d.ts +1 -1
- package/dist/components/AvatarGroup/AvatarGroup.js +1 -1
- package/dist/components/Badge/Badge.d.ts +1 -1
- package/dist/components/Badge/Badge.js +1 -1
- package/dist/components/Badge/BadgeExample.js +0 -1
- package/dist/components/Badge/BadgeExample.js.map +1 -1
- package/dist/components/BadgeDot/BadgeDot.d.ts +1 -1
- package/dist/components/BadgeDot/BadgeDot.js +1 -1
- package/dist/components/BadgeDot/BadgeDotExample.js +0 -1
- package/dist/components/BadgeDot/BadgeDotExample.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlert.d.ts +14 -12
- package/dist/components/BannerAlert/BannerAlert.js +14 -12
- package/dist/components/BannerAlert/BannerAlert.js.map +1 -1
- package/dist/components/BannerAlert/BannerAlertExample.js +0 -1
- package/dist/components/BannerAlert/BannerAlertExample.js.map +1 -1
- package/dist/components/Breadcrumb/Breadcrumb.d.ts +20 -18
- package/dist/components/Breadcrumb/Breadcrumb.js +20 -18
- package/dist/components/Breadcrumb/Breadcrumb.js.map +1 -1
- package/dist/components/Button/Button.d.ts +29 -4
- package/dist/components/Button/Button.js +33 -8
- package/dist/components/Button/Button.js.map +1 -1
- package/dist/components/Button/button.css +4 -3
- package/dist/components/Button/button.css.js +4 -3
- package/dist/components/Calendar/Calendar.d.ts +5 -41
- package/dist/components/Calendar/Calendar.js +61 -185
- package/dist/components/Calendar/Calendar.js.map +1 -1
- package/dist/components/Calendar/CalendarExample.js +0 -1
- package/dist/components/Calendar/CalendarExample.js.map +1 -1
- package/dist/components/Calendar/calendar.css +35 -28
- package/dist/components/Calendar/calendar.css.js +35 -28
- package/dist/components/Calendar/index.d.ts +1 -0
- package/dist/components/Calendar/index.js +1 -0
- package/dist/components/Calendar/index.js.map +1 -1
- package/dist/components/Calendar/utils.d.ts +11 -0
- package/dist/components/Calendar/utils.js +76 -0
- package/dist/components/Calendar/utils.js.map +1 -0
- package/dist/components/Card/Card.d.ts +1 -1
- package/dist/components/Card/Card.js +1 -1
- package/dist/components/Carousel/Carousel.d.ts +8 -8
- package/dist/components/Carousel/Carousel.js +8 -8
- package/dist/components/Carousel/carousel.css +0 -1
- package/dist/components/Carousel/carousel.css.js +0 -1
- package/dist/components/Checkbox/Checkbox.d.ts +1 -1
- package/dist/components/Checkbox/Checkbox.js +1 -1
- package/dist/components/Checkbox/checkbox.css +3 -1
- package/dist/components/Checkbox/checkbox.css.js +3 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.d.ts +1 -1
- package/dist/components/CheckboxGroup/CheckboxGroup.js +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css +1 -1
- package/dist/components/CheckboxGroup/checkbox-group.css.js +1 -1
- package/dist/components/CheckboxGroupField/CheckboxGroupField.d.ts +1 -1
- package/dist/components/CheckboxGroupField/CheckboxGroupField.js +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.d.ts +1 -1
- package/dist/components/CheckboxOption/CheckboxOption.js +1 -1
- package/dist/components/Chip/Chip.d.ts +1 -1
- package/dist/components/Chip/Chip.js +1 -1
- package/dist/components/ChipGroup/ChipGroup.d.ts +1 -1
- package/dist/components/ChipGroup/ChipGroup.js +1 -1
- package/dist/components/DatePicker/DatePicker.d.ts +23 -11
- package/dist/components/DatePicker/DatePicker.js +20 -83
- package/dist/components/DatePicker/DatePicker.js.map +1 -1
- package/dist/components/DatePicker/DatePickerExample.d.ts +1 -0
- package/dist/components/DatePicker/DatePickerExample.js +10 -2
- package/dist/components/DatePicker/DatePickerExample.js.map +1 -1
- package/dist/components/DatePicker/date-picker.css +9 -0
- package/dist/components/DatePicker/date-picker.css.js +9 -0
- package/dist/components/DatePickerField/DatePickerField.d.ts +1 -1
- package/dist/components/DatePickerField/DatePickerField.js +1 -1
- package/dist/components/Divider/Divider.d.ts +4 -4
- package/dist/components/Divider/Divider.js +4 -4
- package/dist/components/Divider/DividerExample.js +17 -20
- package/dist/components/Divider/DividerExample.js.map +1 -1
- package/dist/components/Drawer/Drawer.d.ts +8 -10
- package/dist/components/Drawer/Drawer.js +9 -12
- package/dist/components/Drawer/Drawer.js.map +1 -1
- package/dist/components/Drawer/DrawerExample.d.ts +1 -0
- package/dist/components/Drawer/DrawerExample.js +10 -4
- package/dist/components/Drawer/DrawerExample.js.map +1 -1
- package/dist/components/Drawer/drawer.css +6 -0
- package/dist/components/Drawer/drawer.css.js +6 -0
- package/dist/components/EmptyState/EmptyState.d.ts +2 -2
- package/dist/components/EmptyState/EmptyState.js +4 -7
- package/dist/components/EmptyState/EmptyState.js.map +1 -1
- package/dist/components/EmptyState/EmptyStateExample.js +5 -6
- package/dist/components/EmptyState/EmptyStateExample.js.map +1 -1
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.d.ts +6 -13
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js +12 -7
- package/dist/components/ExamplePlaceholder/ExamplePlaceholder.js.map +1 -1
- package/dist/components/Fab/Fab.d.ts +5 -3
- package/dist/components/Fab/Fab.js +8 -6
- package/dist/components/Fab/Fab.js.map +1 -1
- package/dist/components/Fab/FabExample.d.ts +1 -0
- package/dist/components/Fab/FabExample.js +6 -0
- package/dist/components/Fab/FabExample.js.map +1 -1
- package/dist/components/Fab/fab.css +5 -3
- package/dist/components/Fab/fab.css.js +5 -3
- package/dist/components/FileUpload/FileUpload.d.ts +1 -1
- package/dist/components/FileUpload/FileUpload.js +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.d.ts +1 -1
- package/dist/components/FileUploadItem/FileUploadItem.js +1 -1
- package/dist/components/Flex/Flex.d.ts +55 -0
- package/dist/components/Flex/Flex.js +38 -0
- package/dist/components/Flex/Flex.js.map +1 -0
- package/dist/components/Flex/FlexExample.d.ts +5 -0
- package/dist/components/Flex/FlexExample.js +13 -0
- package/dist/components/Flex/FlexExample.js.map +1 -0
- package/dist/components/Flex/index.d.ts +1 -0
- package/dist/components/Flex/index.js +2 -0
- package/dist/components/Flex/index.js.map +1 -0
- package/dist/components/FormField/FormFieldExample.js +0 -1
- package/dist/components/FormField/FormFieldExample.js.map +1 -1
- package/dist/components/Grid/Grid.d.ts +48 -0
- package/dist/components/Grid/Grid.js +36 -0
- package/dist/components/Grid/Grid.js.map +1 -0
- package/dist/components/Grid/GridExample.d.ts +3 -0
- package/dist/components/Grid/GridExample.js +28 -0
- package/dist/components/Grid/GridExample.js.map +1 -0
- package/dist/components/Grid/index.d.ts +1 -0
- package/dist/components/Grid/index.js +2 -0
- package/dist/components/Grid/index.js.map +1 -0
- package/dist/components/InlineAlert/InlineAlert.d.ts +1 -1
- package/dist/components/InlineAlert/InlineAlert.js +1 -1
- package/dist/components/Input/Input.d.ts +5 -9
- package/dist/components/Input/Input.js +5 -9
- package/dist/components/Input/Input.js.map +1 -1
- package/dist/components/Input/InputElement.js +3 -6
- package/dist/components/Input/InputElement.js.map +1 -1
- package/dist/components/Input/InputExample.d.ts +1 -0
- package/dist/components/Input/InputExample.js +10 -1
- package/dist/components/Input/InputExample.js.map +1 -1
- package/dist/components/Input/input.css +6 -1
- package/dist/components/Input/input.css.js +6 -1
- package/dist/components/InputField/InputField.d.ts +1 -1
- package/dist/components/InputField/InputField.js +1 -1
- package/dist/components/InputNumber/InputNumber.d.ts +6 -15
- package/dist/components/InputNumber/InputNumber.js +6 -15
- package/dist/components/InputNumber/InputNumber.js.map +1 -1
- package/dist/components/InputNumber/InputNumberExample.d.ts +1 -0
- package/dist/components/InputNumber/InputNumberExample.js +10 -1
- package/dist/components/InputNumber/InputNumberExample.js.map +1 -1
- package/dist/components/InputNumber/input-number.css +6 -4
- package/dist/components/InputNumber/input-number.css.js +6 -4
- package/dist/components/InputNumberField/InputNumberField.d.ts +1 -1
- package/dist/components/InputNumberField/InputNumberField.js +1 -1
- package/dist/components/InputPhone/InputPhone.d.ts +7 -9
- package/dist/components/InputPhone/InputPhone.js +19 -19
- package/dist/components/InputPhone/InputPhone.js.map +1 -1
- package/dist/components/InputPhone/InputPhoneExample.d.ts +2 -1
- package/dist/components/InputPhone/InputPhoneExample.js +9 -1
- package/dist/components/InputPhone/InputPhoneExample.js.map +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.d.ts +1 -1
- package/dist/components/InputPhoneField/InputPhoneField.js +1 -1
- package/dist/components/Link/Link.d.ts +1 -1
- package/dist/components/Link/Link.js +1 -1
- package/dist/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/ListItem/ListItem.js +1 -1
- package/dist/components/Menu/Menu.d.ts +1 -3
- package/dist/components/Menu/Menu.js +1 -3
- package/dist/components/Menu/Menu.js.map +1 -1
- package/dist/components/Modal/Modal.d.ts +1 -3
- package/dist/components/Modal/Modal.js +2 -4
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/OTPInput/OTPInput.d.ts +1 -1
- package/dist/components/OTPInput/OTPInput.js +1 -1
- package/dist/components/OTPInput/OTPInputExample.js +0 -1
- package/dist/components/OTPInput/OTPInputExample.js.map +1 -1
- package/dist/components/PageControl/PageControl.d.ts +1 -1
- package/dist/components/PageControl/PageControl.js +1 -1
- package/dist/components/PageControl/PageControlExample.js +0 -1
- package/dist/components/PageControl/PageControlExample.js.map +1 -1
- package/dist/components/PageHeader/PageHeader.d.ts +57 -0
- package/dist/components/PageHeader/PageHeader.js +28 -0
- package/dist/components/PageHeader/PageHeader.js.map +1 -0
- package/dist/components/PageHeader/PageHeaderExample.d.ts +4 -0
- package/dist/components/PageHeader/PageHeaderExample.js +56 -0
- package/dist/components/PageHeader/PageHeaderExample.js.map +1 -0
- package/dist/components/PageHeader/index.d.ts +1 -0
- package/dist/components/PageHeader/index.js +2 -0
- package/dist/components/PageHeader/index.js.map +1 -0
- package/dist/components/PageHeader/page-header.css +35 -0
- package/dist/components/PageHeader/page-header.css.js +40 -0
- package/dist/components/Pagination/Pagination.d.ts +2 -2
- package/dist/components/Pagination/Pagination.js +8 -3
- package/dist/components/Pagination/Pagination.js.map +1 -1
- package/dist/components/Pagination/pagination.css +8 -2
- package/dist/components/Pagination/pagination.css.js +8 -2
- package/dist/components/Password/Password.d.ts +11 -16
- package/dist/components/Password/Password.js +11 -16
- package/dist/components/Password/Password.js.map +1 -1
- package/dist/components/Password/PasswordExample.d.ts +1 -0
- package/dist/components/Password/PasswordExample.js +9 -0
- package/dist/components/Password/PasswordExample.js.map +1 -1
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +1 -1
- package/dist/components/Popover/Popover.d.ts +1 -1
- package/dist/components/Popover/Popover.js +1 -1
- package/dist/components/Popover/PopoverExample.js +0 -1
- package/dist/components/Popover/PopoverExample.js.map +1 -1
- package/dist/components/Popover/popover.css +7 -5
- package/dist/components/Popover/popover.css.js +7 -5
- package/dist/components/ProgressBar/ProgressBar.d.ts +1 -1
- package/dist/components/ProgressBar/ProgressBar.js +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.d.ts +1 -1
- package/dist/components/ProgressCircle/ProgressCircle.js +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.d.ts +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepper.js +1 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js +0 -1
- package/dist/components/ProgressionStepper/ProgressionStepperExample.js.map +1 -1
- package/dist/components/ProgressionStepper/progression-stepper.css +5 -3
- package/dist/components/ProgressionStepper/progression-stepper.css.js +5 -3
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.d.ts +1 -1
- package/dist/components/ProgressionStepperBar/ProgressionStepperBar.js +1 -1
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css +6 -6
- package/dist/components/ProgressionStepperBar/progression-stepper-bar.css.js +7 -7
- package/dist/components/RadioGroup/RadioGroup.d.ts +1 -1
- package/dist/components/RadioGroup/RadioGroup.js +1 -1
- package/dist/components/RadioGroup/radio-group.css +1 -1
- package/dist/components/RadioGroup/radio-group.css.js +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.d.ts +1 -1
- package/dist/components/RadioGroupField/RadioGroupField.js +1 -1
- package/dist/components/Rating/Rating.d.ts +3 -2
- package/dist/components/Rating/Rating.js +5 -3
- package/dist/components/Rating/Rating.js.map +1 -1
- package/dist/components/SearchBar/SearchBar.d.ts +1 -1
- package/dist/components/SearchBar/SearchBar.js +3 -4
- package/dist/components/SearchBar/SearchBar.js.map +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.d.ts +1 -1
- package/dist/components/SegmentedControl/SegmentedControl.js +1 -1
- package/dist/components/SegmentedControl/segmented-control.css +3 -1
- package/dist/components/SegmentedControl/segmented-control.css.js +3 -1
- package/dist/components/Select/Select.d.ts +11 -24
- package/dist/components/Select/Select.js +11 -24
- package/dist/components/Select/Select.js.map +1 -1
- package/dist/components/Select/SelectExample.d.ts +1 -0
- package/dist/components/Select/SelectExample.js +18 -1
- package/dist/components/Select/SelectExample.js.map +1 -1
- package/dist/components/SelectField/SelectField.d.ts +1 -1
- package/dist/components/SelectField/SelectField.js +1 -1
- package/dist/components/Skeleton/Skeleton.d.ts +1 -1
- package/dist/components/Skeleton/Skeleton.js +1 -1
- package/dist/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/dist/components/SkeletonText/SkeletonText.js +1 -1
- package/dist/components/Slider/Slider.d.ts +18 -3
- package/dist/components/Slider/Slider.js +20 -4
- package/dist/components/Slider/Slider.js.map +1 -1
- package/dist/components/Slider/SliderExample.d.ts +1 -0
- package/dist/components/Slider/SliderExample.js +7 -2
- package/dist/components/Slider/SliderExample.js.map +1 -1
- package/dist/components/Snackbar/Manager.d.ts +1 -1
- package/dist/components/Snackbar/Manager.js +1 -1
- package/dist/components/Snackbar/Snackbar.d.ts +1 -1
- package/dist/components/Snackbar/Snackbar.js +1 -1
- package/dist/components/Snackbar/SnackbarExample.js +0 -1
- package/dist/components/Snackbar/SnackbarExample.js.map +1 -1
- package/dist/components/Switch/Switch.d.ts +1 -1
- package/dist/components/Switch/Switch.js +1 -1
- package/dist/components/Switch/switch.css +11 -9
- package/dist/components/Switch/switch.css.js +11 -9
- package/dist/components/SwitchOption/SwitchOption.d.ts +1 -1
- package/dist/components/SwitchOption/SwitchOption.js +1 -1
- package/dist/components/TabGroup/TabGroup.d.ts +1 -1
- package/dist/components/TabGroup/TabGroup.js +1 -1
- package/dist/components/TabGroup/TabGroupExample.js +0 -1
- package/dist/components/TabGroup/TabGroupExample.js.map +1 -1
- package/dist/components/TabList/TabListExample.js +0 -1
- package/dist/components/TabList/TabListExample.js.map +1 -1
- package/dist/components/TabList/tab-list.css +5 -3
- package/dist/components/TabList/tab-list.css.js +5 -3
- package/dist/components/Table/Table.d.ts +2 -2
- package/dist/components/Table/Table.js +8 -8
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/TableExample.js +56 -54
- package/dist/components/Table/TableExample.js.map +1 -1
- package/dist/components/Table/utils.d.ts +2 -2
- package/dist/components/Table/utils.js +27 -22
- package/dist/components/Table/utils.js.map +1 -1
- package/dist/components/Tag/Tag.d.ts +1 -1
- package/dist/components/Tag/Tag.js +1 -1
- package/dist/components/Textarea/Textarea.d.ts +5 -8
- package/dist/components/Textarea/Textarea.js +5 -8
- package/dist/components/Textarea/Textarea.js.map +1 -1
- package/dist/components/Textarea/TextareaExample.d.ts +1 -0
- package/dist/components/Textarea/TextareaExample.js +12 -1
- package/dist/components/Textarea/TextareaExample.js.map +1 -1
- package/dist/components/Textarea/textarea.css +5 -3
- package/dist/components/Textarea/textarea.css.js +5 -3
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +1 -1
- package/dist/components/TimePicker/TimePicker.d.ts +5 -9
- package/dist/components/TimePicker/TimePicker.js +5 -9
- package/dist/components/TimePicker/TimePicker.js.map +1 -1
- package/dist/components/TimePicker/TimePickerExample.d.ts +1 -0
- package/dist/components/TimePicker/TimePickerExample.js +9 -1
- package/dist/components/TimePicker/TimePickerExample.js.map +1 -1
- package/dist/components/TimePickerField/TimePickerField.d.ts +1 -1
- package/dist/components/TimePickerField/TimePickerField.js +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.js +2 -2
- package/dist/components/Tooltip/Tooltip.js.map +1 -1
- package/dist/components/Tooltip/tooltip.css +7 -3
- package/dist/components/Tooltip/tooltip.css.js +7 -3
- package/dist/components/Txt/Txt.d.ts +1 -1
- package/dist/components/Txt/Txt.js +1 -1
- package/dist/components/UIProvider/UIProvider.js +4 -6
- package/dist/components/UIProvider/UIProvider.js.map +1 -1
- package/dist/components/UIProvider/UIProviderExample.d.ts +0 -1
- package/dist/components/UIProvider/UIProviderExample.js +1 -46
- package/dist/components/UIProvider/UIProviderExample.js.map +1 -1
- package/dist/hooks/useControlledState.d.ts +7 -0
- package/dist/hooks/useControlledState.js +21 -0
- package/dist/hooks/useControlledState.js.map +1 -0
- package/dist/hooks/{useAddEventListener.js → useEventListener.js} +1 -1
- package/dist/hooks/useEventListener.js.map +1 -0
- package/dist/types/meta.d.ts +0 -1
- package/dist/types/meta.js +0 -7
- package/dist/types/meta.js.map +1 -1
- package/dist/utils/createCustomEvent.js +1 -1
- package/dist/utils/createCustomEvent.js.map +1 -1
- package/dist/utils/demo.d.ts +19 -2
- package/dist/utils/demo.js.map +1 -1
- package/dist/utils/dom.d.ts +1 -0
- package/dist/utils/dom.js +5 -0
- package/dist/utils/dom.js.map +1 -1
- package/dist/utils/handleKeyDown.d.ts +1 -0
- package/dist/utils/handleKeyDown.js +9 -3
- package/dist/utils/handleKeyDown.js.map +1 -1
- package/dist/utils/keyboard.d.ts +3 -1
- package/dist/utils/keyboard.js.map +1 -1
- package/dist/utils/sendAriaLiveMessage.d.ts +8 -0
- package/dist/utils/sendAriaLiveMessage.js +14 -0
- package/dist/utils/sendAriaLiveMessage.js.map +1 -0
- package/dist/utils/sizing.d.ts +3 -0
- package/dist/utils/sizing.js +28 -0
- package/dist/utils/sizing.js.map +1 -0
- package/dist/utils/uiContext.d.ts +0 -1
- package/dist/utils/uiContext.js.map +1 -1
- package/meta.ts +9 -8
- package/package.json +28 -22
- package/src/components/Accordion/Accordion.tsx +22 -20
- package/src/components/Accordion/AccordionExample.tsx +5 -4
- package/src/components/Avatar/Avatar.tsx +2 -3
- package/src/components/Avatar/avatar.scss +9 -6
- package/src/components/AvatarGroup/AvatarGroup.tsx +1 -1
- package/src/components/Badge/Badge.tsx +1 -1
- package/src/components/Badge/BadgeExample.tsx +0 -1
- package/src/components/BadgeDot/BadgeDot.tsx +1 -1
- package/src/components/BadgeDot/BadgeDotExample.tsx +0 -1
- package/src/components/BannerAlert/BannerAlert.tsx +14 -12
- package/src/components/BannerAlert/BannerAlertExample.tsx +0 -1
- package/src/components/Breadcrumb/Breadcrumb.tsx +20 -18
- package/src/components/Button/Button.tsx +36 -10
- package/src/components/Button/button.scss +13 -6
- package/src/components/Calendar/Calendar.rtl.test.tsx +1 -1
- package/src/components/Calendar/Calendar.tsx +156 -371
- package/src/components/Calendar/CalendarExample.tsx +0 -1
- package/src/components/Calendar/calendar.scss +46 -40
- package/src/components/Calendar/index.tsx +1 -0
- package/src/components/Calendar/utils.tsx +98 -0
- package/src/components/Card/Card.tsx +1 -1
- package/src/components/Carousel/Carousel.tsx +8 -8
- package/src/components/Carousel/carousel.scss +0 -1
- package/src/components/Checkbox/Checkbox.tsx +1 -1
- package/src/components/CheckboxGroup/CheckboxGroup.tsx +1 -1
- package/src/components/CheckboxGroupField/CheckboxGroupField.tsx +1 -1
- package/src/components/CheckboxOption/CheckboxOption.tsx +1 -1
- package/src/components/Chip/Chip.tsx +1 -1
- package/src/components/ChipGroup/ChipGroup.tsx +1 -1
- package/src/components/DatePicker/DatePicker.rtl.test.tsx +1 -1
- package/src/components/DatePicker/DatePicker.tsx +51 -106
- package/src/components/DatePicker/DatePickerExample.tsx +20 -3
- package/src/components/DatePicker/date-picker.scss +11 -0
- package/src/components/DatePickerField/DatePickerField.tsx +1 -1
- package/src/components/Divider/Divider.tsx +4 -4
- package/src/components/Divider/DividerExample.tsx +22 -23
- package/src/components/Drawer/Drawer.tsx +9 -16
- package/src/components/Drawer/DrawerExample.tsx +28 -4
- package/src/components/Drawer/drawer.scss +7 -0
- package/src/components/EmptyState/EmptyState.rtl.test.tsx +1 -1
- package/src/components/EmptyState/EmptyState.tsx +14 -21
- package/src/components/EmptyState/EmptyStateExample.tsx +5 -5
- package/src/components/ExamplePlaceholder/ExamplePlaceholder.tsx +17 -22
- package/src/components/Fab/Fab.tsx +10 -7
- package/src/components/Fab/FabExample.tsx +10 -1
- package/src/components/FileUpload/FileUpload.tsx +1 -1
- package/src/components/FileUploadItem/FileUploadItem.tsx +1 -1
- package/src/components/{Layout/Layout.rtl.test.tsx → Flex/Flex.rtl.test.tsx} +3 -3
- package/src/components/Flex/Flex.tsx +100 -0
- package/src/components/Flex/FlexExample.tsx +27 -0
- package/src/components/Flex/index.tsx +1 -0
- package/src/components/FormField/FormFieldExample.tsx +1 -2
- package/src/components/Grid/Grid.rtl.test.tsx +19 -0
- package/src/components/Grid/Grid.tsx +75 -0
- package/src/components/Grid/GridExample.tsx +42 -0
- package/src/components/Grid/index.tsx +1 -0
- package/src/components/InlineAlert/InlineAlert.tsx +1 -1
- package/src/components/Input/Input.tsx +5 -9
- package/src/components/Input/InputElement.tsx +4 -7
- package/src/components/Input/InputExample.tsx +19 -1
- package/src/components/Input/input.scss +9 -1
- package/src/components/InputField/InputField.tsx +1 -1
- package/src/components/InputNumber/InputNumber.tsx +6 -15
- package/src/components/InputNumber/InputNumberExample.tsx +24 -1
- package/src/components/InputNumberField/InputNumberField.tsx +1 -1
- package/src/components/InputPhone/InputPhone.tsx +18 -17
- package/src/components/InputPhone/InputPhoneExample.tsx +27 -2
- package/src/components/InputPhoneField/InputPhoneField.tsx +1 -1
- package/src/components/Link/Link.tsx +1 -1
- package/src/components/ListItem/ListItem.tsx +1 -1
- package/src/components/Menu/Menu.tsx +1 -3
- package/src/components/Modal/Modal.tsx +2 -4
- package/src/components/OTPInput/OTPInput.tsx +1 -1
- package/src/components/OTPInput/OTPInputExample.tsx +0 -1
- package/src/components/PageControl/PageControl.tsx +1 -1
- package/src/components/PageControl/PageControlExample.tsx +0 -1
- package/src/components/PageHeader/PageHeader.rtl.test.tsx +18 -0
- package/src/components/PageHeader/PageHeader.tsx +78 -0
- package/src/components/PageHeader/PageHeaderExample.tsx +58 -0
- package/src/components/PageHeader/index.tsx +1 -0
- package/src/components/PageHeader/page-header.scss +41 -0
- package/src/components/Pagination/Pagination.tsx +14 -3
- package/src/components/Pagination/pagination.scss +12 -5
- package/src/components/Password/Password.tsx +11 -16
- package/src/components/Password/PasswordExample.tsx +18 -1
- package/src/components/PasswordField/PasswordField.tsx +1 -1
- package/src/components/Popover/Popover.tsx +1 -1
- package/src/components/Popover/PopoverExample.tsx +0 -1
- package/src/components/ProgressBar/ProgressBar.tsx +1 -1
- package/src/components/ProgressCircle/ProgressCircle.tsx +1 -1
- package/src/components/ProgressionStepper/ProgressionStepper.tsx +1 -1
- package/src/components/ProgressionStepper/ProgressionStepperExample.tsx +0 -1
- package/src/components/ProgressionStepperBar/ProgressionStepperBar.tsx +1 -1
- package/src/components/RadioGroup/RadioGroup.tsx +1 -1
- package/src/components/RadioGroupField/RadioGroupField.tsx +1 -1
- package/src/components/Rating/Rating.tsx +7 -3
- package/src/components/SearchBar/SearchBar.tsx +3 -5
- package/src/components/SegmentedControl/SegmentedControl.tsx +1 -1
- package/src/components/Select/Select.tsx +11 -24
- package/src/components/Select/SelectExample.tsx +36 -1
- package/src/components/SelectField/SelectField.tsx +1 -1
- package/src/components/Skeleton/Skeleton.tsx +1 -1
- package/src/components/SkeletonText/SkeletonText.tsx +1 -1
- package/src/components/Slider/Slider.tsx +21 -4
- package/src/components/Slider/SliderExample.tsx +16 -2
- package/src/components/Snackbar/Manager.tsx +1 -1
- package/src/components/Snackbar/Snackbar.tsx +1 -1
- package/src/components/Snackbar/SnackbarExample.tsx +0 -1
- package/src/components/Switch/Switch.tsx +1 -1
- package/src/components/SwitchOption/SwitchOption.tsx +1 -1
- package/src/components/TabGroup/TabGroup.tsx +1 -1
- package/src/components/TabGroup/TabGroupExample.tsx +0 -1
- package/src/components/TabList/TabListExample.tsx +0 -1
- package/src/components/Table/Table.tsx +11 -16
- package/src/components/Table/TableExample.tsx +56 -54
- package/src/components/Table/utils.ts +31 -20
- package/src/components/Tag/Tag.tsx +1 -1
- package/src/components/Textarea/Textarea.tsx +5 -8
- package/src/components/Textarea/TextareaExample.tsx +21 -1
- package/src/components/TextareaField/TextareaField.tsx +1 -1
- package/src/components/TimePicker/TimePicker.tsx +5 -9
- package/src/components/TimePicker/TimePickerExample.tsx +18 -1
- package/src/components/TimePickerField/TimePickerField.tsx +1 -1
- package/src/components/Tooltip/Tooltip.tsx +2 -2
- package/src/components/Tooltip/tooltip.scss +2 -0
- package/src/components/Txt/Txt.tsx +1 -1
- package/src/components/UIProvider/UIProvider.tsx +1 -4
- package/src/components/UIProvider/UIProviderExample.tsx +0 -83
- package/src/hooks/useControlledState.ts +31 -0
- package/src/types/meta.ts +0 -8
- package/src/utils/createCustomEvent.ts +1 -1
- package/src/utils/demo.ts +19 -2
- package/src/utils/dom.ts +8 -0
- package/src/utils/handleKeyDown.ts +9 -3
- package/src/utils/keyboard.ts +5 -2
- package/src/utils/sendAriaLiveMessage.ts +17 -0
- package/src/utils/sizing.ts +30 -0
- package/src/utils/uiContext.ts +0 -1
- package/.scripts/index.ts +0 -110
- package/dist/components/Layout/Layout.d.ts +0 -50
- package/dist/components/Layout/Layout.js +0 -28
- package/dist/components/Layout/Layout.js.map +0 -1
- package/dist/components/Layout/LayoutExample.d.ts +0 -4
- package/dist/components/Layout/LayoutExample.js +0 -9
- package/dist/components/Layout/LayoutExample.js.map +0 -1
- package/dist/components/Layout/index.d.ts +0 -1
- package/dist/components/Layout/index.js +0 -2
- package/dist/components/Layout/index.js.map +0 -1
- package/dist/components/UIProvider/AriaLiveMessageHandler.d.ts +0 -13
- package/dist/components/UIProvider/AriaLiveMessageHandler.js +0 -31
- package/dist/components/UIProvider/AriaLiveMessageHandler.js.map +0 -1
- package/dist/hooks/useAddEventListener.js.map +0 -1
- package/src/components/Layout/Layout.tsx +0 -85
- package/src/components/Layout/LayoutExample.tsx +0 -17
- package/src/components/Layout/index.tsx +0 -1
- package/src/components/UIProvider/AriaLiveMessageHandler.tsx +0 -46
- /package/dist/hooks/{useAddEventListener.d.ts → useEventListener.d.ts} +0 -0
- /package/src/hooks/{useAddEventListener.ts → useEventListener.ts} +0 -0
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { ExamplePlaceholder } from '../ExamplePlaceholder';
|
|
3
|
+
export const GridExample = {
|
|
4
|
+
defaultState: {
|
|
5
|
+
children: (_jsxs(_Fragment, { children: [_jsx("div", { children: "Cell 1" }), _jsx("div", { children: "Cell 2" })] })),
|
|
6
|
+
columns: [1, 2],
|
|
7
|
+
},
|
|
8
|
+
render: ({ Component, props }) => {
|
|
9
|
+
const columns = convertColumns(`${props.columns}`);
|
|
10
|
+
return (_jsx(Component, { ...props, columns: columns.value, children: [...Array(columns.count)].map((_, index) => (_jsxs(ExamplePlaceholder, { children: ["Cell ", index + 1] }, index))) }));
|
|
11
|
+
},
|
|
12
|
+
};
|
|
13
|
+
const convertColumns = (columns) => {
|
|
14
|
+
let value = 1;
|
|
15
|
+
if (columns.includes(','))
|
|
16
|
+
value = columns
|
|
17
|
+
.split(',')
|
|
18
|
+
.filter((col) => !!col.trim())
|
|
19
|
+
.map((col) => {
|
|
20
|
+
if (/^\d+$/.test(col.trim()))
|
|
21
|
+
return parseInt(col.trim(), 10) || 1;
|
|
22
|
+
return col.trim();
|
|
23
|
+
});
|
|
24
|
+
else
|
|
25
|
+
value = parseInt(columns, 10) || 1;
|
|
26
|
+
return { value, count: Array.isArray(value) ? value.length : value };
|
|
27
|
+
};
|
|
28
|
+
//# sourceMappingURL=GridExample.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GridExample.js","sourceRoot":"","sources":["../../../src/components/Grid/GridExample.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AAGrE,MAAM,CAAC,MAAM,WAAW,GAAgC;IACpD,YAAY,EAAE;QACV,QAAQ,EAAE,CACN,8BACI,mCAAiB,EACjB,mCAAiB,IAClB,CACN;QACD,OAAO,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;KAClB;IACD,MAAM,EAAE,CAAC,EAAE,SAAS,EAAE,KAAK,EAAE,EAAE,EAAE;QAC7B,MAAM,OAAO,GAAG,cAAc,CAAC,GAAG,KAAK,CAAC,OAAO,EAAE,CAAC,CAAC;QAEnD,OAAO,CACH,KAAC,SAAS,OAAK,KAAK,EAAE,OAAO,EAAE,OAAO,CAAC,KAAK,YACvC,CAAC,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,EAAE,CAAC,CACzC,MAAC,kBAAkB,wBAAmB,KAAK,GAAG,CAAC,KAAtB,KAAK,CAAuC,CACxE,CAAC,GACM,CACf,CAAC;IACN,CAAC;CACJ,CAAC;AAEF,MAAM,cAAc,GAAG,CAAC,OAAe,EAA0D,EAAE;IAC/F,IAAI,KAAK,GAAiC,CAAC,CAAC;IAE5C,IAAI,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC;QACrB,KAAK,GAAG,OAAO;aACV,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;aAC7B,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE;YACT,IAAI,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;gBAAE,OAAO,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;YACnE,OAAO,GAAG,CAAC,IAAI,EAAE,CAAC;QACtB,CAAC,CAAC,CAAC;;QACN,KAAK,GAAG,QAAQ,CAAC,OAAO,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC;IAExC,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC;AACzE,CAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './Grid';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Grid/index.tsx"],"names":[],"mappings":"AAAA,cAAc,QAAQ,CAAC"}
|
|
@@ -27,7 +27,7 @@ export type InlineAlertProps = CommonProps<'owner'> & {
|
|
|
27
27
|
* <InlineAlert variant="informational">Example informational inline alert</InlineAlert>;
|
|
28
28
|
*
|
|
29
29
|
* @name InlineAlert
|
|
30
|
-
* @phase
|
|
30
|
+
* @phase Stable
|
|
31
31
|
*/
|
|
32
32
|
export declare function InlineAlert({ children, variant, id, owner }: InlineAlertProps): import("react/jsx-runtime").JSX.Element;
|
|
33
33
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -15,7 +15,7 @@ import { Txt } from '../Txt';
|
|
|
15
15
|
* <InlineAlert variant="informational">Example informational inline alert</InlineAlert>;
|
|
16
16
|
*
|
|
17
17
|
* @name InlineAlert
|
|
18
|
-
* @phase
|
|
18
|
+
* @phase Stable
|
|
19
19
|
*/
|
|
20
20
|
export function InlineAlert({ children, variant = 'informational', id, owner }) {
|
|
21
21
|
return (_jsxs("div", { "data-bspk": "inline-alert", "data-bspk-owner": owner || undefined, "data-variant": variant, id: id, role: "alert", children: [VARIANT_ICON[variant], _jsx(Txt, { variant: "body-small", children: children })] }));
|
|
@@ -10,23 +10,19 @@ export type InputProps = Omit<InputElementProps, 'ariaDescribedBy' | 'ariaErrorM
|
|
|
10
10
|
* @example
|
|
11
11
|
* import { useState } from 'react';
|
|
12
12
|
* import { Input } from '@bspk/ui/Input';
|
|
13
|
-
* import { Field, FieldLabel } from '@bspk/ui/Field';
|
|
13
|
+
* import { Field, FieldLabel, FieldDescription } from '@bspk/ui/Field';
|
|
14
14
|
*
|
|
15
15
|
* () => {
|
|
16
|
-
* const [
|
|
16
|
+
* const [fieldDate, setFieldDate] = useState<string>();
|
|
17
17
|
*
|
|
18
18
|
* return (
|
|
19
|
-
*
|
|
20
|
-
* // standalone input example
|
|
21
|
-
* <Input aria-label="Example Input" name="example-name" onChange={setValue} value={value} />
|
|
22
|
-
* <br />
|
|
23
|
-
* // input used within a field
|
|
19
|
+
* <div style={{ width: 320 }}>
|
|
24
20
|
* <Field>
|
|
25
21
|
* <FieldLabel>Example Label</FieldLabel>
|
|
26
|
-
* <Input name="example-name" onChange={
|
|
22
|
+
* <Input name="example-name" onChange={setFieldDate} value={fieldDate} />
|
|
27
23
|
* <FieldDescription>This is an example input field.</FieldDescription>
|
|
28
24
|
* </Field>
|
|
29
|
-
*
|
|
25
|
+
* </div>
|
|
30
26
|
* );
|
|
31
27
|
* };
|
|
32
28
|
*
|
|
@@ -10,23 +10,19 @@ import { useFieldInit } from '../Field';
|
|
|
10
10
|
* @example
|
|
11
11
|
* import { useState } from 'react';
|
|
12
12
|
* import { Input } from '@bspk/ui/Input';
|
|
13
|
-
* import { Field, FieldLabel } from '@bspk/ui/Field';
|
|
13
|
+
* import { Field, FieldLabel, FieldDescription } from '@bspk/ui/Field';
|
|
14
14
|
*
|
|
15
15
|
* () => {
|
|
16
|
-
* const [
|
|
16
|
+
* const [fieldDate, setFieldDate] = useState<string>();
|
|
17
17
|
*
|
|
18
18
|
* return (
|
|
19
|
-
*
|
|
20
|
-
* // standalone input example
|
|
21
|
-
* <Input aria-label="Example Input" name="example-name" onChange={setValue} value={value} />
|
|
22
|
-
* <br />
|
|
23
|
-
* // input used within a field
|
|
19
|
+
* <div style={{ width: 320 }}>
|
|
24
20
|
* <Field>
|
|
25
21
|
* <FieldLabel>Example Label</FieldLabel>
|
|
26
|
-
* <Input name="example-name" onChange={
|
|
22
|
+
* <Input name="example-name" onChange={setFieldDate} value={fieldDate} />
|
|
27
23
|
* <FieldDescription>This is an example input field.</FieldDescription>
|
|
28
24
|
* </Field>
|
|
29
|
-
*
|
|
25
|
+
* </div>
|
|
30
26
|
* );
|
|
31
27
|
* };
|
|
32
28
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD
|
|
1
|
+
{"version":3,"file":"Input.js","sourceRoot":"","sources":["../../../src/components/Input/Input.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,OAAO,EAAE,YAAY,EAAqB,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAKlD;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,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@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import './input.css.js';
|
|
3
3
|
import { SvgCancel } from '@bspk/icons/Cancel';
|
|
4
|
-
import { useMemo, useRef
|
|
4
|
+
import { useMemo, useRef } from 'react';
|
|
5
5
|
import { Button } from '../Button';
|
|
6
6
|
import { useTimeout } from '../../hooks/useTimeout';
|
|
7
7
|
export const DEFAULT = {
|
|
@@ -40,24 +40,21 @@ export const DEFAULT = {
|
|
|
40
40
|
* @phase Utility
|
|
41
41
|
*/
|
|
42
42
|
export function InputElement({ invalid, onChange, size = DEFAULT.size, value = DEFAULT.value, name, 'aria-label': ariaLabel = 'Input', inputRef, required = false, placeholder, id, leading, trailing, type = DEFAULT.type, readOnly, disabled, autoComplete = DEFAULT.autoComplete, containerRef, showClearButton: showClearButtonProp = true, owner, inputProps, ariaDescribedBy, ariaErrorMessage, ...props }) {
|
|
43
|
-
const
|
|
44
|
-
const showClearButton = useMemo(() => !!(showClearButtonProp !== false && !readOnly && !disabled && value?.toString().length && focused), [showClearButtonProp, readOnly, disabled, value, focused]);
|
|
43
|
+
const showClearButton = useMemo(() => showClearButtonProp !== false && !readOnly && !disabled && !!value?.toString().length, [showClearButtonProp, readOnly, disabled, value]);
|
|
45
44
|
const inputRefInternal = useRef(null);
|
|
46
45
|
const focusTimeout = useTimeout();
|
|
47
46
|
return (_jsxs("div", { ...props, "data-bspk": "input", "data-bspk-owner": owner || undefined, "data-disabled": disabled || undefined, "data-empty": !value.toString().length || undefined, "data-invalid": invalid || undefined, "data-readonly": readOnly || undefined, "data-show-clear-button": showClearButton || undefined, "data-size": size, ref: containerRef, children: [leading && _jsx("span", { "data-leading": true, children: leading }), _jsx("input", { ...inputProps, "aria-describedby": ariaDescribedBy || undefined, "aria-errormessage": ariaErrorMessage || undefined, "aria-invalid": invalid || undefined, "aria-label": ariaLabel, autoComplete: autoComplete, "data-main-input": true, disabled: disabled || undefined, id: id, name: name, onBlur: (event) => {
|
|
48
|
-
focusTimeout.set(() => setFocused(false), 750);
|
|
49
47
|
inputProps?.onBlur?.(event);
|
|
50
48
|
}, onChange: (event) => {
|
|
51
49
|
onChange(event.target.value, event);
|
|
52
50
|
}, onFocus: (event) => {
|
|
53
|
-
focusTimeout.set(() => setFocused(true), 0);
|
|
54
51
|
inputProps?.onFocus?.(event);
|
|
55
52
|
}, placeholder: placeholder || ' ', readOnly: readOnly || undefined, ref: (node) => {
|
|
56
53
|
if (!node)
|
|
57
54
|
return;
|
|
58
55
|
inputRef?.(node);
|
|
59
56
|
inputRefInternal.current = node;
|
|
60
|
-
}, required: required || undefined, type: type, value: value || '' }), trailing && _jsx("span", { "data-trailing": true, children: trailing }), showClearButton && (_jsx(Button, { icon: _jsx(SvgCancel, {}), iconOnly: true, label: "Clear", onClick: () => {
|
|
57
|
+
}, required: required || undefined, type: type, value: value || '' }), trailing && _jsx("span", { "data-trailing": true, children: trailing }), showClearButton && (_jsx(Button, { "data-clear-button": true, icon: _jsx(SvgCancel, {}), iconOnly: true, label: "Clear", onClick: () => {
|
|
61
58
|
onChange('');
|
|
62
59
|
inputRefInternal.current?.focus();
|
|
63
60
|
}, onFocus: () => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputElement.js","sourceRoot":"","sources":["../../../src/components/Input/InputElement.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAqC,OAAO,EAAE,MAAM,EAAE,
|
|
1
|
+
{"version":3,"file":"InputElement.js","sourceRoot":"","sources":["../../../src/components/Input/InputElement.tsx"],"names":[],"mappings":";AAAA,OAAO,cAAc,CAAC;AACtB,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAqC,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC3E,OAAO,EAAE,MAAM,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,KAAK,EAAC,OAAO,EACb,OAAO,EAAE,GAAG,EAAE;oBACV,QAAQ,CAAC,EAAE,CAAC,CAAC;oBACb,gBAAgB,CAAC,OAAO,EAAE,KAAK,EAAE,CAAC;gBACtC,CAAC,EACD,OAAO,EAAE,GAAG,EAAE;oBACV,YAAY,CAAC,KAAK,EAAE,CAAC;gBACzB,CAAC,EACD,IAAI,EAAE,IAAI,EACV,OAAO,EAAC,UAAU,GACpB,CACL,IACC,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Input } from '.';
|
|
4
|
+
import { Field, FieldLabel, FieldDescription } from '../Field';
|
|
2
5
|
export const InputExample = {
|
|
6
|
+
containerStyle: { width: 320, padding: 0 },
|
|
3
7
|
defaultState: {
|
|
4
8
|
label: 'Property Description',
|
|
5
9
|
'aria-label': 'input aria-label',
|
|
@@ -51,5 +55,10 @@ export const InputExample = {
|
|
|
51
55
|
variants: {
|
|
52
56
|
type: false,
|
|
53
57
|
},
|
|
58
|
+
sections: [],
|
|
59
|
+
};
|
|
60
|
+
export const Usage = () => {
|
|
61
|
+
const [fieldDate, setFieldDate] = useState();
|
|
62
|
+
return (_jsx("div", { style: { width: 320 }, children: _jsxs(Field, { children: [_jsx(FieldLabel, { children: "Example Label" }), _jsx(Input, { name: "example-name", onChange: setFieldDate, value: fieldDate }), _jsx(FieldDescription, { children: "This is an example input field." })] }) }));
|
|
54
63
|
};
|
|
55
64
|
//# sourceMappingURL=InputExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputExample.js","sourceRoot":"","sources":["../../../src/components/Input/InputExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputExample.js","sourceRoot":"","sources":["../../../src/components/Input/InputExample.tsx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,EAAE,SAAS;gBACnB,IAAI,EAAE,WAAW;gBACjB,KAAK,EAAE,WAAW;gBAClB,WAAW,EAAE,4BAA4B;aAC5C;SACJ;KACJ;IACD,QAAQ,EAAE;QACN,IAAI,EAAE,KAAK;KACd;IACD,QAAQ,EAAE,EAAE;CACf,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACtB,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,QAAQ,EAAU,CAAC;IAErD,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,YACtB,MAAC,KAAK,eACF,KAAC,UAAU,gCAA2B,EACtC,KAAC,KAAK,IAAC,IAAI,EAAC,cAAc,EAAC,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS,GAAI,EACvE,KAAC,gBAAgB,kDAAmD,IAChE,GACN,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
--border-color: var(--stroke-neutral-base);
|
|
3
3
|
display: flex;
|
|
4
4
|
flex-flow: row nowrap;
|
|
5
|
+
justify-content: center;
|
|
6
|
+
align-items: center;
|
|
5
7
|
background-color: var(--surface-neutral-t1-base);
|
|
6
8
|
border: solid 1px var(--border-color);
|
|
7
9
|
height: var(--field-height);
|
|
@@ -10,7 +12,7 @@
|
|
|
10
12
|
gap: var(--spacing-sizing-01);
|
|
11
13
|
width: 100%;
|
|
12
14
|
}
|
|
13
|
-
[data-bspk=input][data-show-clear-button] {
|
|
15
|
+
[data-bspk=input][data-show-clear-button]:focus-within {
|
|
14
16
|
padding-right: 0;
|
|
15
17
|
}
|
|
16
18
|
[data-bspk=input] > * {
|
|
@@ -42,6 +44,9 @@
|
|
|
42
44
|
[data-bspk=input][data-invalid] {
|
|
43
45
|
--border-color: var(--status-error);
|
|
44
46
|
}
|
|
47
|
+
[data-bspk=input]:not(:focus-within) [data-clear-button] {
|
|
48
|
+
display: none;
|
|
49
|
+
}
|
|
45
50
|
[data-bspk=input]:focus-within {
|
|
46
51
|
--border-color: var(--stroke-neutral-focus);
|
|
47
52
|
outline: 1px solid var(--stroke-neutral-focus);
|
|
@@ -5,6 +5,8 @@ style.appendChild(document.createTextNode(`[data-bspk=input] {
|
|
|
5
5
|
--border-color: var(--stroke-neutral-base);
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-flow: row nowrap;
|
|
8
|
+
justify-content: center;
|
|
9
|
+
align-items: center;
|
|
8
10
|
background-color: var(--surface-neutral-t1-base);
|
|
9
11
|
border: solid 1px var(--border-color);
|
|
10
12
|
height: var(--field-height);
|
|
@@ -13,7 +15,7 @@ style.appendChild(document.createTextNode(`[data-bspk=input] {
|
|
|
13
15
|
gap: var(--spacing-sizing-01);
|
|
14
16
|
width: 100%;
|
|
15
17
|
}
|
|
16
|
-
[data-bspk=input][data-show-clear-button] {
|
|
18
|
+
[data-bspk=input][data-show-clear-button]:focus-within {
|
|
17
19
|
padding-right: 0;
|
|
18
20
|
}
|
|
19
21
|
[data-bspk=input] > * {
|
|
@@ -45,6 +47,9 @@ style.appendChild(document.createTextNode(`[data-bspk=input] {
|
|
|
45
47
|
[data-bspk=input][data-invalid] {
|
|
46
48
|
--border-color: var(--status-error);
|
|
47
49
|
}
|
|
50
|
+
[data-bspk=input]:not(:focus-within) [data-clear-button] {
|
|
51
|
+
display: none;
|
|
52
|
+
}
|
|
48
53
|
[data-bspk=input]:focus-within {
|
|
49
54
|
--border-color: var(--stroke-neutral-focus);
|
|
50
55
|
outline: 1px solid var(--stroke-neutral-focus);
|
|
@@ -38,37 +38,28 @@ export type InputNumberProps = CommonProps<'size'> & FieldControlProps<number> &
|
|
|
38
38
|
* import { InputNumber } from '@bspk/ui/InputNumber';
|
|
39
39
|
*
|
|
40
40
|
* () => {
|
|
41
|
-
* const [
|
|
41
|
+
* const [value, setValue] = useState<number | undefined>();
|
|
42
42
|
*
|
|
43
43
|
* return (
|
|
44
|
-
*
|
|
45
|
-
* // standalone input number example
|
|
46
|
-
* <InputNumber
|
|
47
|
-
* aria-label="Example aria-label"
|
|
48
|
-
* name="example-name"
|
|
49
|
-
* onChange={(nextValue) => setState(nextValue)}
|
|
50
|
-
* value={state}
|
|
51
|
-
* />
|
|
52
|
-
* <br />
|
|
53
|
-
* // input number used within a field
|
|
44
|
+
* <div style={{ width: 320 }}>
|
|
54
45
|
* <Field>
|
|
55
46
|
* <FieldLabel>Example Input Number</FieldLabel>
|
|
56
47
|
* <InputNumber
|
|
57
48
|
* aria-label="Example aria-label"
|
|
58
49
|
* name="example-name"
|
|
59
|
-
* onChange={(nextValue) =>
|
|
60
|
-
* value={
|
|
50
|
+
* onChange={(nextValue) => setValue(nextValue)}
|
|
51
|
+
* value={value}
|
|
61
52
|
* />
|
|
62
53
|
* <FieldDescription>
|
|
63
54
|
* The input number allows you to increment or decrement a value.
|
|
64
55
|
* </FieldDescription>
|
|
65
56
|
* </Field>
|
|
66
|
-
*
|
|
57
|
+
* </div>
|
|
67
58
|
* );
|
|
68
59
|
* };
|
|
69
60
|
*
|
|
70
61
|
* @name InputNumber
|
|
71
|
-
* @phase
|
|
62
|
+
* @phase Stable
|
|
72
63
|
*/
|
|
73
64
|
export declare function InputNumber({ value: valueProp, onChange, align, size, disabled, readOnly, name, id: idProp, 'aria-label': ariaLabel, max: maxProp, min, invalid: invalidProp, step, required, ...inputElementProps }: InputNumberProps): import("react/jsx-runtime").JSX.Element;
|
|
74
65
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -24,37 +24,28 @@ function isNumber(value, fallbackValue) {
|
|
|
24
24
|
* import { InputNumber } from '@bspk/ui/InputNumber';
|
|
25
25
|
*
|
|
26
26
|
* () => {
|
|
27
|
-
* const [
|
|
27
|
+
* const [value, setValue] = useState<number | undefined>();
|
|
28
28
|
*
|
|
29
29
|
* return (
|
|
30
|
-
*
|
|
31
|
-
* // standalone input number example
|
|
32
|
-
* <InputNumber
|
|
33
|
-
* aria-label="Example aria-label"
|
|
34
|
-
* name="example-name"
|
|
35
|
-
* onChange={(nextValue) => setState(nextValue)}
|
|
36
|
-
* value={state}
|
|
37
|
-
* />
|
|
38
|
-
* <br />
|
|
39
|
-
* // input number used within a field
|
|
30
|
+
* <div style={{ width: 320 }}>
|
|
40
31
|
* <Field>
|
|
41
32
|
* <FieldLabel>Example Input Number</FieldLabel>
|
|
42
33
|
* <InputNumber
|
|
43
34
|
* aria-label="Example aria-label"
|
|
44
35
|
* name="example-name"
|
|
45
|
-
* onChange={(nextValue) =>
|
|
46
|
-
* value={
|
|
36
|
+
* onChange={(nextValue) => setValue(nextValue)}
|
|
37
|
+
* value={value}
|
|
47
38
|
* />
|
|
48
39
|
* <FieldDescription>
|
|
49
40
|
* The input number allows you to increment or decrement a value.
|
|
50
41
|
* </FieldDescription>
|
|
51
42
|
* </Field>
|
|
52
|
-
*
|
|
43
|
+
* </div>
|
|
53
44
|
* );
|
|
54
45
|
* };
|
|
55
46
|
*
|
|
56
47
|
* @name InputNumber
|
|
57
|
-
* @phase
|
|
48
|
+
* @phase Stable
|
|
58
49
|
*/
|
|
59
50
|
export function InputNumber({ value: valueProp, onChange, align = 'center', size = 'medium', disabled = false, readOnly = false, name, id: idProp, 'aria-label': ariaLabel = 'Input number', max: maxProp, min = 0, invalid: invalidProp = false, step = 1, required = false, ...inputElementProps }) {
|
|
60
51
|
const { id, ariaDescribedBy, ariaErrorMessage, invalid } = useFieldInit({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumber.js","sourceRoot":"","sources":["../../../src/components/InputNumber/InputNumber.tsx"],"names":[],"mappings":";AAAA,OAAO,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,KAAK,EAAE,MAAM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CAAC,CAAC,CAAC,EAAE,GACzC,EACF,0DAAgC,EAChC,KAAC,eAAe,IACZ,QAAQ,EAAE,cAAc,EACxB,OAAO,EAAE,OAAO,EAChB,IAAI,EAAC,QAAQ,EACb,gBAAgB,EAAE,gBAAgB,GACpC,EACF,KAAC,eAAe,IAAC,QAAQ,EAAE,WAAW,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAC,KAAK,EAAC,gBAAgB,EAAE,gBAAgB,GAAI,IACzG,CACT,CAAC;AACN,CAAC"}
|
|
@@ -1,9 +1,18 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { InputNumber } from './InputNumber';
|
|
4
|
+
import { Field, FieldLabel, FieldDescription } from '../Field';
|
|
2
5
|
export const InputNumberExample = {
|
|
3
6
|
defaultState: {
|
|
4
7
|
'aria-label': 'input number aria-label',
|
|
5
8
|
},
|
|
6
9
|
render: ({ props, Component }) => _jsx(Component, { ...props }),
|
|
7
10
|
variants: false,
|
|
11
|
+
sections: [],
|
|
12
|
+
containerStyle: { width: 320, padding: 0 },
|
|
13
|
+
};
|
|
14
|
+
export const Usage = () => {
|
|
15
|
+
const [value, setValue] = useState();
|
|
16
|
+
return (_jsx("div", { style: { width: 320 }, children: _jsxs(Field, { children: [_jsx(FieldLabel, { children: "Example Input Number" }), _jsx(InputNumber, { "aria-label": "Example aria-label", name: "example-name", onChange: (nextValue) => setValue(nextValue), value: value }), _jsx(FieldDescription, { children: "The input number allows you to increment or decrement a value." })] }) }));
|
|
8
17
|
};
|
|
9
18
|
//# sourceMappingURL=InputNumberExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputNumberExample.js","sourceRoot":"","sources":["../../../src/components/InputNumber/InputNumberExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"InputNumberExample.js","sourceRoot":"","sources":["../../../src/components/InputNumber/InputNumberExample.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjC,OAAO,EAAE,WAAW,EAAoB,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGzE,MAAM,CAAC,MAAM,kBAAkB,GAAuC;IAClE,YAAY,EAAE;QACV,YAAY,EAAE,yBAAyB;KAC1C;IACD,MAAM,EAAE,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,EAAE,EAAE,CAAC,KAAC,SAAS,OAAK,KAAK,GAAI;IAC1D,QAAQ,EAAE,KAAK;IACf,QAAQ,EAAE,EAAE;IACZ,cAAc,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,OAAO,EAAE,CAAC,EAAE;CAC7C,CAAC;AAEF,MAAM,CAAC,MAAM,KAAK,GAAG,GAAG,EAAE;IACtB,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,EAAsB,CAAC;IAEzD,OAAO,CACH,cAAK,KAAK,EAAE,EAAE,KAAK,EAAE,GAAG,EAAE,YACtB,MAAC,KAAK,eACF,KAAC,UAAU,uCAAkC,EAC7C,KAAC,WAAW,kBACG,oBAAoB,EAC/B,IAAI,EAAC,cAAc,EACnB,QAAQ,EAAE,CAAC,SAAS,EAAE,EAAE,CAAC,QAAQ,CAAC,SAAS,CAAC,EAC5C,KAAK,EAAE,KAAK,GACd,EACF,KAAC,gBAAgB,iFAAkF,IAC/F,GACN,CACT,CAAC;AACN,CAAC,CAAC"}
|
|
@@ -29,10 +29,6 @@
|
|
|
29
29
|
cursor: pointer;
|
|
30
30
|
font: var(--font);
|
|
31
31
|
flex-shrink: 0;
|
|
32
|
-
display: flex;
|
|
33
|
-
justify-content: center;
|
|
34
|
-
align-items: center;
|
|
35
|
-
color: var(--color);
|
|
36
32
|
}
|
|
37
33
|
[data-bspk=input-number] button svg {
|
|
38
34
|
width: var(--svg-width);
|
|
@@ -40,6 +36,12 @@
|
|
|
40
36
|
[data-bspk=input-number] button:focus {
|
|
41
37
|
outline: none;
|
|
42
38
|
}
|
|
39
|
+
[data-bspk=input-number] button {
|
|
40
|
+
display: flex;
|
|
41
|
+
justify-content: center;
|
|
42
|
+
align-items: center;
|
|
43
|
+
color: var(--color);
|
|
44
|
+
}
|
|
43
45
|
[data-bspk=input-number] button:disabled {
|
|
44
46
|
cursor: not-allowed;
|
|
45
47
|
color: var(--foreground-neutral-disabled-on-surface);
|
|
@@ -32,10 +32,6 @@ style.appendChild(document.createTextNode(`[data-bspk=input-number] {
|
|
|
32
32
|
cursor: pointer;
|
|
33
33
|
font: var(--font);
|
|
34
34
|
flex-shrink: 0;
|
|
35
|
-
display: flex;
|
|
36
|
-
justify-content: center;
|
|
37
|
-
align-items: center;
|
|
38
|
-
color: var(--color);
|
|
39
35
|
}
|
|
40
36
|
[data-bspk=input-number] button svg {
|
|
41
37
|
width: var(--svg-width);
|
|
@@ -43,6 +39,12 @@ style.appendChild(document.createTextNode(`[data-bspk=input-number] {
|
|
|
43
39
|
[data-bspk=input-number] button:focus {
|
|
44
40
|
outline: none;
|
|
45
41
|
}
|
|
42
|
+
[data-bspk=input-number] button {
|
|
43
|
+
display: flex;
|
|
44
|
+
justify-content: center;
|
|
45
|
+
align-items: center;
|
|
46
|
+
color: var(--color);
|
|
47
|
+
}
|
|
46
48
|
[data-bspk=input-number] button:disabled {
|
|
47
49
|
cursor: not-allowed;
|
|
48
50
|
color: var(--foreground-neutral-disabled-on-surface);
|
|
@@ -29,34 +29,32 @@ export type InputPhoneProps = FieldControlProps<string, SupportedCountryCode> &
|
|
|
29
29
|
*
|
|
30
30
|
* @example
|
|
31
31
|
* import { InputPhone } from '@bspk/ui/InputPhone';
|
|
32
|
+
* import { Field, FieldDescription, FieldLabel } from '@bspk/ui/Field';
|
|
32
33
|
*
|
|
33
34
|
* () => {
|
|
34
|
-
* const [value, onChange] = useState<
|
|
35
|
+
* const [value, onChange] = useState<string | undefined>();
|
|
35
36
|
*
|
|
36
37
|
* return (
|
|
37
|
-
*
|
|
38
|
-
* // standalone input phone example
|
|
39
|
-
* <InputPhone aria-label="Phone Number" initialCountryCode="US" value={value} onChange={onChange} />;
|
|
40
|
-
* <br />
|
|
41
|
-
* // input phone used within a field
|
|
38
|
+
* <div style={{ width: 320 }}>
|
|
42
39
|
* <Field>
|
|
43
40
|
* <FieldLabel>Example Input Phone</FieldLabel>
|
|
44
41
|
* <InputPhone
|
|
45
42
|
* aria-label="Phone Number"
|
|
46
43
|
* initialCountryCode="US"
|
|
47
|
-
*
|
|
44
|
+
* name="example-name"
|
|
48
45
|
* onChange={onChange}
|
|
46
|
+
* value={value}
|
|
49
47
|
* />
|
|
50
48
|
* <FieldDescription>
|
|
51
49
|
* The phone input allows you to enter a phone number with country code.
|
|
52
50
|
* </FieldDescription>
|
|
53
51
|
* </Field>
|
|
54
|
-
*
|
|
52
|
+
* </div>
|
|
55
53
|
* );
|
|
56
54
|
* };
|
|
57
55
|
*
|
|
58
56
|
* @name InputPhone
|
|
59
|
-
* @phase
|
|
57
|
+
* @phase Stable
|
|
60
58
|
*/
|
|
61
59
|
export declare function InputPhone({ value, onChange, disableFormatting, initialCountryCode, disabled, readOnly, name, id: idProp, invalid: invalidProp, required, size, inputRef, scrollLimit, 'aria-label': ariaLabel, }: InputPhoneProps): import("react/jsx-runtime").JSX.Element;
|
|
62
60
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|