@bspk/ui 1.3.11 → 1.3.17
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 +31 -25
- 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
|
@@ -1,9 +1,6 @@
|
|
|
1
|
-
import { jsx as _jsx
|
|
2
|
-
import { Button } from '../Button';
|
|
3
|
-
import { useUIContext } from '../../hooks/useUIContext';
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
4
2
|
export const presets = [];
|
|
5
3
|
export const UIProviderExample = {
|
|
6
|
-
containerStyle: { width: '100%' },
|
|
7
4
|
defaultState: {},
|
|
8
5
|
disableProps: [],
|
|
9
6
|
presets,
|
|
@@ -44,49 +41,7 @@ export function ResponsiveComponent() {
|
|
|
44
41
|
);
|
|
45
42
|
}`, language: "typescript" }) })),
|
|
46
43
|
},
|
|
47
|
-
{
|
|
48
|
-
title: 'ARIA Live Messages',
|
|
49
|
-
content: ({ Syntax }) => (_jsxs("div", { style: {}, children: [_jsx("p", { children: "Example usage of sending ARIA live messages. This allows for dynamic updates to assistive technologies, such as screen readers." }), _jsx(AriaLiveExample, {}), _jsx(Syntax, { code: `// Example usage of sending ARIA live messages
|
|
50
|
-
import { useContext } from 'react';
|
|
51
|
-
import { useUIContext } from '../../hooks/useUIContext';
|
|
52
|
-
|
|
53
|
-
export function AriaLiveExample() {
|
|
54
|
-
const {sendAriaLiveMessage} = useUIContext();
|
|
55
|
-
|
|
56
|
-
const handleClick = () => {
|
|
57
|
-
sendAriaLiveMessage('Action completed successfully', 'polite');
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
return (
|
|
61
|
-
<div>
|
|
62
|
-
<button onClick={handleClick}>Perform Action</button>
|
|
63
|
-
</div>
|
|
64
|
-
);
|
|
65
|
-
}`, language: "typescript" })] })),
|
|
66
|
-
},
|
|
67
44
|
],
|
|
68
45
|
variants: {},
|
|
69
46
|
};
|
|
70
|
-
export function AriaLiveExample() {
|
|
71
|
-
const { sendAriaLiveMessage } = useUIContext();
|
|
72
|
-
return (_jsxs("p", { children: [_jsx(Button, { "data-bspk": "link", label: "Send a polite ARIA Live Message ", onClick: () => {
|
|
73
|
-
sendAriaLiveMessage?.(`Action completed successfully at ${new Date().toLocaleTimeString()}`, 'polite');
|
|
74
|
-
}, style: {
|
|
75
|
-
padding: 0,
|
|
76
|
-
margin: 0,
|
|
77
|
-
border: 'none',
|
|
78
|
-
background: 'none',
|
|
79
|
-
color: 'inherit',
|
|
80
|
-
cursor: 'pointer',
|
|
81
|
-
}, variant: "tertiary" }), _jsx(Button, { "data-bspk": "link", label: "Send an assertive ARIA Live Message ", onClick: () => {
|
|
82
|
-
sendAriaLiveMessage?.(`Critical update occurred at ${new Date().toLocaleTimeString()}`, 'assertive');
|
|
83
|
-
}, style: {
|
|
84
|
-
padding: 0,
|
|
85
|
-
margin: 0,
|
|
86
|
-
border: 'none',
|
|
87
|
-
background: 'none',
|
|
88
|
-
color: 'inherit',
|
|
89
|
-
cursor: 'pointer',
|
|
90
|
-
}, variant: "tertiary" })] }));
|
|
91
|
-
}
|
|
92
47
|
//# sourceMappingURL=UIProviderExample.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UIProviderExample.js","sourceRoot":"","sources":["../../../src/components/UIProvider/UIProviderExample.tsx"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"UIProviderExample.js","sourceRoot":"","sources":["../../../src/components/UIProvider/UIProviderExample.tsx"],"names":[],"mappings":";AAGA,MAAM,CAAC,MAAM,OAAO,GAA8B,EAAE,CAAC;AAErD,MAAM,CAAC,MAAM,iBAAiB,GAAsC;IAChE,YAAY,EAAE,EAAE;IAChB,YAAY,EAAE,EAAE;IAChB,OAAO;IACP,QAAQ,EAAE;QACN;YACI,KAAK,EAAE,iBAAiB;YACxB,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACrB,cAAK,KAAK,EAAE,EAAE,YACV,KAAC,MAAM,IACH,IAAI,EAAE;;;;;;;;;;;;;;EAc5B,EACsB,QAAQ,EAAC,YAAY,GACvB,GACA,CACT;SACJ;QACD;YACI,KAAK,EAAE,oBAAoB;YAC3B,OAAO,EAAE,CAAC,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CACrB,cAAK,KAAK,EAAE,EAAE,YACV,KAAC,MAAM,IACH,IAAI,EAAE;;;;;;;;;;;;;;EAc5B,EACsB,QAAQ,EAAC,YAAY,GACvB,GACA,CACT;SACJ;KACJ;IACD,QAAQ,EAAE,EAAE;CACf,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A custom hook to manage controlled and uncontrolled state.
|
|
3
|
+
*
|
|
4
|
+
* Allows a component to either be controlled by an external value or manage its own internal state. This is helpful for
|
|
5
|
+
* components that should operate in both controlled and uncontrolled modes.
|
|
6
|
+
*/
|
|
7
|
+
export declare function useControlledState<T>(initialValue: T, onChange?: (value: T) => void): [T, (value: T | ((prev: T) => T)) => void];
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useState, useRef, useCallback } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* A custom hook to manage controlled and uncontrolled state.
|
|
4
|
+
*
|
|
5
|
+
* Allows a component to either be controlled by an external value or manage its own internal state. This is helpful for
|
|
6
|
+
* components that should operate in both controlled and uncontrolled modes.
|
|
7
|
+
*/
|
|
8
|
+
export function useControlledState(initialValue, onChange) {
|
|
9
|
+
const [internalValue, setInternalValue] = useState(initialValue);
|
|
10
|
+
const stateRef = useRef(initialValue);
|
|
11
|
+
return [
|
|
12
|
+
internalValue,
|
|
13
|
+
useCallback((next) => {
|
|
14
|
+
const nextValue = typeof next === 'function' ? next(stateRef.current) : next;
|
|
15
|
+
setInternalValue(nextValue);
|
|
16
|
+
onChange?.(nextValue);
|
|
17
|
+
stateRef.current = nextValue;
|
|
18
|
+
}, [onChange]),
|
|
19
|
+
];
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=useControlledState.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useControlledState.js","sourceRoot":"","sources":["../../src/hooks/useControlledState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEtD;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAC9B,YAAe,EACf,QAA6B;IAE7B,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAC,YAAY,CAAC,CAAC;IAEjE,MAAM,QAAQ,GAAG,MAAM,CAAI,YAAY,CAAC,CAAC;IAEzC,OAAO;QACH,aAAa;QACb,WAAW,CACP,CAAC,IAA0B,EAAE,EAAE;YAC3B,MAAM,SAAS,GAAG,OAAO,IAAI,KAAK,UAAU,CAAC,CAAC,CAAE,IAAoB,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;YAE9F,gBAAgB,CAAC,SAAS,CAAC,CAAC;YAC5B,QAAQ,EAAE,CAAC,SAAS,CAAC,CAAC;YAEtB,QAAQ,CAAC,OAAO,GAAG,SAAS,CAAC;QACjC,CAAC,EACD,CAAC,QAAQ,CAAC,CACb;KACK,CAAC;AACf,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEventListener.js","sourceRoot":"","sources":["../../src/hooks/useEventListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAE5D,MAAM,UAAU,gBAAgB,CAM5B,SAAgC,EAChC,OAOS,EACT,OAAW,EACX,QAAkB,EAClB,OAA2C;IAE3C,mCAAmC;IACnC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CAAC,CAAC;IAErC,mBAAmB,CAAC,GAAG,EAAE;QACrB,YAAY,CAAC,OAAO,GAAG,OAAO,CAAC;IACnC,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC;IAEd,mBAAmB,CAAC,GAAG,EAAE;QACrB,IAAI,QAAQ;YAAE,OAAO;QAErB,8BAA8B;QAC9B,MAAM,aAAa,GAAe,OAAO,IAAI,MAAM,CAAC;QAEpD,IAAI,CAAC,CAAC,aAAa,IAAI,aAAa,CAAC,gBAAgB,CAAC;YAAE,OAAO;QAE/D,kEAAkE;QAClE,MAAM,QAAQ,GAAmB,CAAC,KAAK,EAAE,EAAE;YACvC,YAAY,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;QAChC,CAAC,CAAC;QAEF,aAAa,CAAC,gBAAgB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAE7D,mCAAmC;QACnC,OAAO,GAAG,EAAE;YACR,aAAa,CAAC,mBAAmB,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QACpE,CAAC,CAAC;IACN,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC;AACtC,CAAC"}
|
package/dist/types/meta.d.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* This file is used to build the meta types for the project. It's used in the build-meta.ts file and also copied in to
|
|
3
3
|
* the meta output file.
|
|
4
4
|
*/
|
|
5
|
-
export declare const COMPONENT_PHASE_ORDER: ComponentPhase[];
|
|
6
5
|
export declare const COMPONENT_PHASES: Record<ComponentPhase, {
|
|
7
6
|
title: string;
|
|
8
7
|
id: ComponentPhase;
|
package/dist/types/meta.js
CHANGED
|
@@ -2,13 +2,6 @@
|
|
|
2
2
|
* This file is used to build the meta types for the project. It's used in the build-meta.ts file and also copied in to
|
|
3
3
|
* the meta output file.
|
|
4
4
|
*/
|
|
5
|
-
export const COMPONENT_PHASE_ORDER = [
|
|
6
|
-
'Utility', // Utility components are not tracked in the progress
|
|
7
|
-
'Backlog', // components that are not actively being worked on
|
|
8
|
-
'Dev', // components that are actively being developed
|
|
9
|
-
'UXReview', // components that are in UX Review
|
|
10
|
-
'Stable', // production ready
|
|
11
|
-
];
|
|
12
5
|
export const COMPONENT_PHASES = {
|
|
13
6
|
Backlog: {
|
|
14
7
|
title: 'Backlog',
|
package/dist/types/meta.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"meta.js","sourceRoot":"","sources":["../../src/types/meta.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,CAAC,MAAM,gBAAgB,GAOzB;IACA,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EACP,4IAA4I;KACnJ;IACD,GAAG,EAAE;QACD,KAAK,EAAE,aAAa;QACpB,EAAE,EAAE,KAAK;QACT,WAAW,EACP,+JAA+J;KACtK;IACD,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,EAAE,EAAE,UAAU;QACd,WAAW,EACP,+LAA+L;KACtM;IACD,MAAM,EAAE;QACJ,KAAK,EAAE,QAAQ;QACf,EAAE,EAAE,QAAQ;QACZ,WAAW,EACP,sJAAsJ;KAC7J;IACD,OAAO,EAAE;QACL,KAAK,EAAE,SAAS;QAChB,EAAE,EAAE,SAAS;QACb,WAAW,EAAE,mEAAmE;KACnF;CACJ,CAAC;AAoDF,sDAAsD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createCustomEvent.js","sourceRoot":"","sources":["../../src/utils/createCustomEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"createCustomEvent.js","sourceRoot":"","sources":["../../src/utils/createCustomEvent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAe5D;;;;;;GAMG;AACH,MAAM,UAAU,iBAAiB;AAC7B,sFAAsF;AACtF,SAAiB;IAEjB,OAAO;QACH,IAAI,CAAC,MAAe;YAChB,QAAQ,CAAC,aAAa,CAAC,IAAI,WAAW,CAAU,SAAS,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;QAC5E,CAAC;QACD,gBAAgB,CAAC,QAAqC;YAClD,gBAAgB,CAAC,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAE,KAA8B,CAAC,MAAM,CAAC,EAAE,QAAQ,CAAC,CAAC;QACvG,CAAC;KACJ,CAAC;AACN,CAAC"}
|
package/dist/utils/demo.d.ts
CHANGED
|
@@ -88,6 +88,18 @@ export type ComponentExample<Props = Record<string, unknown>, PropName extends k
|
|
|
88
88
|
disableProps?: PropName[] | true;
|
|
89
89
|
/** The sections of the example. */
|
|
90
90
|
sections?: ComponentPageSection<Props>[];
|
|
91
|
+
/**
|
|
92
|
+
* Whether to render the example in a full page layout.
|
|
93
|
+
*
|
|
94
|
+
* @default false
|
|
95
|
+
*/
|
|
96
|
+
fullPage?: boolean;
|
|
97
|
+
/**
|
|
98
|
+
* Hide the demo entirely.
|
|
99
|
+
*
|
|
100
|
+
* @default false
|
|
101
|
+
*/
|
|
102
|
+
hideDemo?: boolean;
|
|
91
103
|
};
|
|
92
104
|
export type Syntax = (params: {
|
|
93
105
|
code: string;
|
|
@@ -116,12 +128,17 @@ export type Preset<Props> = {
|
|
|
116
128
|
* A description of the design pattern this preset demonstrates. When applied, it showcases the specific use case or
|
|
117
129
|
* behavior of the component.
|
|
118
130
|
*/
|
|
119
|
-
designPattern?: string;
|
|
131
|
+
designPattern?: boolean | string;
|
|
120
132
|
/** The name of the preset. This is used to display the preset in the UI. */
|
|
121
133
|
label: string;
|
|
122
134
|
/** The props of the component. This is used to set props of the component. These values can't be changed in the UI. */
|
|
123
135
|
propState: Omit<Props, OnHandlers> & Record<OnHandlers, unknown>;
|
|
124
|
-
|
|
136
|
+
/**
|
|
137
|
+
* Hide the demo for this preset.
|
|
138
|
+
*
|
|
139
|
+
* @default false
|
|
140
|
+
*/
|
|
141
|
+
hideDemo?: boolean;
|
|
125
142
|
};
|
|
126
143
|
export type DemoPreset<P = Record<string, unknown>> = Preset<P> & {
|
|
127
144
|
value: string;
|
package/dist/utils/demo.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../../src/utils/demo.ts"],"names":[],"mappings":"AAAA,uDAAuD;
|
|
1
|
+
{"version":3,"file":"demo.js","sourceRoot":"","sources":["../../src/utils/demo.ts"],"names":[],"mappings":"AAAA,uDAAuD;AA+KvD,MAAM,UAAU,SAAS,CAAC,SAAiB,KAAK;IAC5C,OAAO,GAAG,MAAM,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,SAAS,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;AACrE,CAAC"}
|
package/dist/utils/dom.d.ts
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
1
|
/** A safe way to get an element by ID that works in SSR environments or when the ID value is not considered valid. */
|
|
2
2
|
export declare function getElementById<T extends HTMLElement = HTMLElement>(id?: string | null): T | null;
|
|
3
|
+
export declare function getElement<T extends HTMLElement = HTMLElement>(selector: string, parent?: HTMLElement | ParentNode): T | null;
|
package/dist/utils/dom.js
CHANGED
|
@@ -6,4 +6,9 @@ export function getElementById(id) {
|
|
|
6
6
|
return null;
|
|
7
7
|
return document.querySelector(`[id="${id}"]`);
|
|
8
8
|
}
|
|
9
|
+
export function getElement(selector, parent = document) {
|
|
10
|
+
if (typeof parent === 'undefined')
|
|
11
|
+
return null;
|
|
12
|
+
return parent.querySelector(selector);
|
|
13
|
+
}
|
|
9
14
|
//# sourceMappingURL=dom.js.map
|
package/dist/utils/dom.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,MAAM,UAAU,cAAc,CAAsC,EAAkB;IAClF,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,OAAO,QAAQ,CAAC,aAAa,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC"}
|
|
1
|
+
{"version":3,"file":"dom.js","sourceRoot":"","sources":["../../src/utils/dom.ts"],"names":[],"mappings":"AAAA,sHAAsH;AACtH,MAAM,UAAU,cAAc,CAAsC,EAAkB;IAClF,IAAI,OAAO,QAAQ,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IACjD,IAAI,CAAC,EAAE;QAAE,OAAO,IAAI,CAAC;IACrB,OAAO,QAAQ,CAAC,aAAa,CAAI,QAAQ,EAAE,IAAI,CAAC,CAAC;AACrD,CAAC;AAED,MAAM,UAAU,UAAU,CACtB,QAAgB,EAChB,SAAmC,QAAQ;IAE3C,IAAI,OAAO,MAAM,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC/C,OAAO,MAAM,CAAC,aAAa,CAAI,QAAQ,CAAC,CAAC;AAC7C,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { KeyboardEvent } from 'react';
|
|
2
2
|
import { KeyboardEventCode } from './keyboard';
|
|
3
3
|
export type KeysCallback = Partial<Record<KeyboardEventCode, ((event: KeyboardEvent) => void) | null>>;
|
|
4
|
+
export declare const getEventCode: (event: KeyboardEvent) => KeyboardEventCode;
|
|
4
5
|
/**
|
|
5
6
|
* Handles multiple keydown events with specific callbacks for each key.
|
|
6
7
|
*
|
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
export const getEventCode = (event) => {
|
|
2
|
+
let eventCode = event.code;
|
|
3
|
+
if (event.ctrlKey && event.altKey && event.code === 'Space')
|
|
4
|
+
eventCode = 'Ctrl+Option+Space';
|
|
5
|
+
if (event.shiftKey && !eventCode.startsWith('Shift'))
|
|
6
|
+
eventCode = `Shift+${event.code}`;
|
|
7
|
+
return eventCode;
|
|
8
|
+
};
|
|
1
9
|
/**
|
|
2
10
|
* Handles multiple keydown events with specific callbacks for each key.
|
|
3
11
|
*
|
|
@@ -6,9 +14,7 @@
|
|
|
6
14
|
*/
|
|
7
15
|
export function handleKeyDown(keysCallback = {}, { stopPropagation = false, preventDefault = false } = {}) {
|
|
8
16
|
return (event) => {
|
|
9
|
-
|
|
10
|
-
if (event.ctrlKey && event.altKey && event.code === 'Space')
|
|
11
|
-
eventCode = 'Ctrl+Option+Space';
|
|
17
|
+
const eventCode = getEventCode(event);
|
|
12
18
|
const callback = keysCallback[eventCode];
|
|
13
19
|
if (callback) {
|
|
14
20
|
callback(event);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handleKeyDown.js","sourceRoot":"","sources":["../../src/utils/handleKeyDown.ts"],"names":[],"mappings":"AAKA
|
|
1
|
+
{"version":3,"file":"handleKeyDown.js","sourceRoot":"","sources":["../../src/utils/handleKeyDown.ts"],"names":[],"mappings":"AAKA,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,KAAoB,EAAE,EAAE;IACjD,IAAI,SAAS,GAAG,KAAK,CAAC,IAAyB,CAAC;IAChD,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,IAAI,KAAK,OAAO;QAAE,SAAS,GAAG,mBAAmB,CAAC;IAC7F,IAAI,KAAK,CAAC,QAAQ,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,OAAO,CAAC;QAAE,SAAS,GAAG,SAAS,KAAK,CAAC,IAAI,EAAuB,CAAC;IAE7G,OAAO,SAAS,CAAC;AACrB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CACzB,eAA6B,EAAE,EAC/B,EAAE,eAAe,GAAG,KAAK,EAAE,cAAc,GAAG,KAAK,KAA8D,EAAE;IAEjH,OAAO,CAAC,KAAoB,EAAE,EAAE;QAC5B,MAAM,SAAS,GAAG,YAAY,CAAC,KAAK,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG,YAAY,CAAC,SAAS,CAAC,CAAC;QAEzC,IAAI,QAAQ,EAAE,CAAC;YACX,QAAQ,CAAC,KAAK,CAAC,CAAC;YAChB,IAAI,eAAe;gBAAE,KAAK,CAAC,eAAe,EAAE,CAAC;YAC7C,IAAI,cAAc;gBAAE,KAAK,CAAC,cAAc,EAAE,CAAC;QAC/C,CAAC;QACD,OAAO,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;IACvC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/utils/keyboard.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
export type KeyboardEventKey = ' ' | '_' | '-' | ';' | ':' | '!' | '?' | '.' | '' | '"' | '(' | ')' | '[' | ']' | '{' | '}' | '@' | '*' | '/' | '\\' | '&' | '#' | '%' | '`' | '^' | '+' | '<' | '=' | '>' | '|' | '~' | '$' | '0' | '1' | '2' | '3' | '4' | '5' | '6' | '7' | '8' | '9' | 'A' | 'a' | 'Alt' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'AudioVolumeDown' | 'AudioVolumeMute' | 'AudioVolumeUp' | 'B' | 'b' | 'Backspace' | 'C' | 'c' | 'CapsLock' | 'ContextMenu' | 'Control' | 'D' | 'd' | 'Delete' | 'E' | 'e' | 'End' | 'Enter' | 'Escape' | 'F' | 'f' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'G' | 'g' | 'H' | 'h' | 'Home' | 'I' | 'i' | 'Insert' | 'J' | 'j' | 'K' | 'k' | 'L' | 'l' | 'M' | 'm' | 'Meta' | 'N' | 'n' | 'NumLock' | 'O' | 'o' | 'P' | 'p' | 'PageDown' | 'PageUp' | 'Pause' | 'PrintScreen' | 'Q' | 'q' | 'R' | 'r' | 'S' | 's' | 'ScrollLock' | 'Shift' | 'T' | 't' | 'Tab' | 'U' | 'u' | 'V' | 'v' | 'W' | 'w' | 'X' | 'x' | 'Y' | 'y' | 'Z' | 'z' | "'";
|
|
2
2
|
export type KeyboardEventCodeCustom = 'Ctrl+Option+Space';
|
|
3
|
-
export type
|
|
3
|
+
export type KeyboardEventCodeShift = `Shift+${KeyboardEventCodeBase}`;
|
|
4
|
+
export type KeyboardEventCode = KeyboardEventCodeBase | KeyboardEventCodeCustom | KeyboardEventCodeShift;
|
|
5
|
+
export type KeyboardEventCodeBase = 'AltLeft' | 'AltRight' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'ArrowUp' | 'AudioVolumeDown' | 'AudioVolumeMute' | 'AudioVolumeUp' | 'Backquote' | 'Backslash' | 'Backspace' | 'BracketLeft' | 'BracketRight' | 'CapsLock' | 'Comma' | 'ContextMenu' | 'ControlLeft' | 'ControlRight' | 'Delete' | 'Digit0' | 'Digit1' | 'Digit2' | 'Digit3' | 'Digit4' | 'Digit5' | 'Digit6' | 'Digit7' | 'Digit8' | 'Digit9' | 'End' | 'Enter' | 'Equal' | 'Escape' | 'F1' | 'F2' | 'F3' | 'F4' | 'F5' | 'F6' | 'F7' | 'F8' | 'F9' | 'F10' | 'F11' | 'F12' | 'Home' | 'Insert' | 'KeyA' | 'KeyB' | 'KeyC' | 'KeyD' | 'KeyE' | 'KeyF' | 'KeyG' | 'KeyH' | 'KeyI' | 'KeyJ' | 'KeyK' | 'KeyL' | 'KeyM' | 'KeyN' | 'KeyO' | 'KeyP' | 'KeyQ' | 'KeyR' | 'KeyS' | 'KeyT' | 'KeyU' | 'KeyV' | 'KeyW' | 'KeyX' | 'KeyY' | 'KeyZ' | 'MetaLeft' | 'MetaRight' | 'Minus' | 'NumLock' | 'Numpad0' | 'Numpad1' | 'Numpad2' | 'Numpad3' | 'Numpad4' | 'Numpad5' | 'Numpad6' | 'Numpad7' | 'Numpad8' | 'Numpad9' | 'NumpadAdd' | 'NumpadDecimal' | 'NumpadDivide' | 'NumpadMultiply' | 'NumpadSubtract' | 'PageDown' | 'PageUp' | 'Pause' | 'Period' | 'PrintScreen' | 'Quote' | 'ScrollLock' | 'Semicolon' | 'ShiftLeft' | 'ShiftRight' | 'Slash' | 'Space' | 'Tab';
|
|
4
6
|
export declare const EVENT_KEY: Record<KeyboardEventKey, KeyboardEventKey>;
|
|
5
7
|
/** Copyright 2025 Anywhere Real Estate - CC BY 4.0 */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../src/utils/keyboard.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"keyboard.js","sourceRoot":"","sources":["../../src/utils/keyboard.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This utility function sends an ARIA live message to assistive technologies by dynamically creating a live region
|
|
3
|
+
* element in the DOM.
|
|
4
|
+
*
|
|
5
|
+
* @param message The message to be announced by screen readers.
|
|
6
|
+
* @param live The ARIA live attribute value, either 'assertive' or 'polite'. Defaults to 'polite'.
|
|
7
|
+
*/
|
|
8
|
+
export declare function sendAriaLiveMessage(message: string, live?: 'assertive' | 'polite'): void;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This utility function sends an ARIA live message to assistive technologies by dynamically creating a live region
|
|
3
|
+
* element in the DOM.
|
|
4
|
+
*
|
|
5
|
+
* @param message The message to be announced by screen readers.
|
|
6
|
+
* @param live The ARIA live attribute value, either 'assertive' or 'polite'. Defaults to 'polite'.
|
|
7
|
+
*/
|
|
8
|
+
export function sendAriaLiveMessage(message, live = 'polite') {
|
|
9
|
+
// remove existing AriaLiveMessage element from dom
|
|
10
|
+
document.querySelectorAll('[data-bspk-aria-live]').forEach((el) => el.remove());
|
|
11
|
+
// add new AriaLiveMessage element to dom
|
|
12
|
+
document.body.insertAdjacentHTML('beforeend', `<div data-bspk-aria-live aria-live=${live || 'polite'} data-sr-only role="alert">${message}</div>`);
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=sendAriaLiveMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sendAriaLiveMessage.js","sourceRoot":"","sources":["../../src/utils/sendAriaLiveMessage.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,UAAU,mBAAmB,CAAC,OAAe,EAAE,OAA+B,QAAQ;IACxF,mDAAmD;IACnD,QAAQ,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,EAAE,CAAC,MAAM,EAAE,CAAC,CAAC;IAEhF,yCAAyC;IACzC,QAAQ,CAAC,IAAI,CAAC,kBAAkB,CAC5B,WAAW,EACX,sCAAsC,IAAI,IAAI,QAAQ,8BAA8B,OAAO,QAAQ,CACtG,CAAC;AACN,CAAC"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export declare const SIZING_VALUES: readonly ["0", "4", "8", "12", "16", "20", "24", "28", "32", "40", "44", "48", "52", "56", "60", "64", "68", "72"];
|
|
2
|
+
export type SizingPixels = `${(typeof SIZING_VALUES)[number]}`;
|
|
3
|
+
export declare function numToSizingVar(numStr?: string): string | undefined;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export const SIZING_VALUES = [
|
|
2
|
+
'0',
|
|
3
|
+
'4',
|
|
4
|
+
'8',
|
|
5
|
+
'12',
|
|
6
|
+
'16',
|
|
7
|
+
'20',
|
|
8
|
+
'24',
|
|
9
|
+
'28',
|
|
10
|
+
'32',
|
|
11
|
+
'40',
|
|
12
|
+
'44',
|
|
13
|
+
'48',
|
|
14
|
+
'52',
|
|
15
|
+
'56',
|
|
16
|
+
'60',
|
|
17
|
+
'64',
|
|
18
|
+
'68',
|
|
19
|
+
'72',
|
|
20
|
+
];
|
|
21
|
+
export function numToSizingVar(numStr) {
|
|
22
|
+
if (numStr === undefined || ['auto', '0'].includes(numStr))
|
|
23
|
+
return numStr;
|
|
24
|
+
if (!SIZING_VALUES.includes(numStr))
|
|
25
|
+
return undefined;
|
|
26
|
+
return `var(--spacing-sizing-${(Number(numStr) / 4).toString().padStart(2, '0')})`;
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=sizing.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sizing.js","sourceRoot":"","sources":["../../src/utils/sizing.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,aAAa,GAAG;IACzB,GAAG;IACH,GAAG;IACH,GAAG;IACH,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;IACJ,IAAI;CACE,CAAC;AAIX,MAAM,UAAU,cAAc,CAAC,MAAe;IAC1C,IAAI,MAAM,KAAK,SAAS,IAAI,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,MAAM,CAAC;IAE1E,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,MAAsB,CAAC;QAAE,OAAO,SAAS,CAAC;IAEtE,OAAO,wBAAwB,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAG,CAAC;AACvF,CAAC"}
|
|
@@ -11,6 +11,5 @@ export type UIContextProps = {
|
|
|
11
11
|
isMobile: boolean;
|
|
12
12
|
isTablet: boolean;
|
|
13
13
|
isDesktop: boolean;
|
|
14
|
-
sendAriaLiveMessage: (message: string, live?: AriaLiveMessage['live']) => void;
|
|
15
14
|
};
|
|
16
15
|
export declare const UIContext: import("react").Context<UIContextProps | undefined>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uiContext.js","sourceRoot":"","sources":["../../src/utils/uiContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"uiContext.js","sourceRoot":"","sources":["../../src/utils/uiContext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkB,aAAa,EAAE,MAAM,OAAO,CAAC;AAEtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,OAAO,EAAE,MAAM,CAAU,CAAC;AAcvD,MAAM,CAAC,MAAM,SAAS,GAAG,aAAa,CAA6B,SAAS,CAAC,CAAC"}
|
package/meta.ts
CHANGED
|
@@ -14,14 +14,15 @@ import { fileURLToPath } from 'url';
|
|
|
14
14
|
|
|
15
15
|
import * as TJS from 'typescript-json-schema';
|
|
16
16
|
|
|
17
|
-
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
17
|
+
import { ComponentMeta, TypeProperty, UtilityMeta, TypeMeta, ComponentPhase } from './src/types/meta';
|
|
18
|
+
|
|
19
|
+
const COMPONENT_PHASE_ORDER: ComponentPhase[] = [
|
|
20
|
+
'Utility', // Utility components are not tracked in the progress
|
|
21
|
+
'Backlog', // components that are not actively being worked on
|
|
22
|
+
'Dev', // components that are actively being developed
|
|
23
|
+
'UXReview', // components that are in UX Review
|
|
24
|
+
'Stable', // production ready
|
|
25
|
+
];
|
|
25
26
|
|
|
26
27
|
const RESET = '\x1b[0m';
|
|
27
28
|
const BLUE = '\x1b[34m';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bspk/ui",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.17",
|
|
4
4
|
"license": "CC-BY-4.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -13,8 +13,16 @@
|
|
|
13
13
|
"tsconfig.json",
|
|
14
14
|
"tsconfig.build.json"
|
|
15
15
|
],
|
|
16
|
-
"
|
|
17
|
-
"
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"access": "public",
|
|
18
|
+
"provenance": true
|
|
19
|
+
},
|
|
20
|
+
"repository": {
|
|
21
|
+
"type": "git",
|
|
22
|
+
"url": "git+https://github.com/Anywhererealestate/bspk-ui"
|
|
23
|
+
},
|
|
24
|
+
"engines": {
|
|
25
|
+
"node": ">=22"
|
|
18
26
|
},
|
|
19
27
|
"scripts": {
|
|
20
28
|
"sass": "npx sass --no-source-map --silence-deprecation=mixed-decls src:dist",
|
|
@@ -99,8 +107,12 @@
|
|
|
99
107
|
"./FileUpload/*": "./dist/components/FileUpload/*.js",
|
|
100
108
|
"./FileUploadItem": "./dist/components/FileUploadItem/index.js",
|
|
101
109
|
"./FileUploadItem/*": "./dist/components/FileUploadItem/*.js",
|
|
110
|
+
"./Flex": "./dist/components/Flex/index.js",
|
|
111
|
+
"./Flex/*": "./dist/components/Flex/*.js",
|
|
102
112
|
"./FormField": "./dist/components/FormField/index.js",
|
|
103
113
|
"./FormField/*": "./dist/components/FormField/*.js",
|
|
114
|
+
"./Grid": "./dist/components/Grid/index.js",
|
|
115
|
+
"./Grid/*": "./dist/components/Grid/*.js",
|
|
104
116
|
"./Img": "./dist/components/Img/index.js",
|
|
105
117
|
"./Img/*": "./dist/components/Img/*.js",
|
|
106
118
|
"./InlineAlert": "./dist/components/InlineAlert/index.js",
|
|
@@ -117,8 +129,6 @@
|
|
|
117
129
|
"./InputPhone/*": "./dist/components/InputPhone/*.js",
|
|
118
130
|
"./InputPhoneField": "./dist/components/InputPhoneField/index.js",
|
|
119
131
|
"./InputPhoneField/*": "./dist/components/InputPhoneField/*.js",
|
|
120
|
-
"./Layout": "./dist/components/Layout/index.js",
|
|
121
|
-
"./Layout/*": "./dist/components/Layout/*.js",
|
|
122
132
|
"./Link": "./dist/components/Link/index.js",
|
|
123
133
|
"./Link/*": "./dist/components/Link/*.js",
|
|
124
134
|
"./ListItem": "./dist/components/ListItem/index.js",
|
|
@@ -131,6 +141,8 @@
|
|
|
131
141
|
"./OTPInput/*": "./dist/components/OTPInput/*.js",
|
|
132
142
|
"./PageControl": "./dist/components/PageControl/index.js",
|
|
133
143
|
"./PageControl/*": "./dist/components/PageControl/*.js",
|
|
144
|
+
"./PageHeader": "./dist/components/PageHeader/index.js",
|
|
145
|
+
"./PageHeader/*": "./dist/components/PageHeader/*.js",
|
|
134
146
|
"./Pagination": "./dist/components/Pagination/index.js",
|
|
135
147
|
"./Pagination/*": "./dist/components/Pagination/*.js",
|
|
136
148
|
"./Password": "./dist/components/Password/index.js",
|
|
@@ -230,12 +242,6 @@
|
|
|
230
242
|
"./UIProvider": "./dist/components/UIProvider/index.js",
|
|
231
243
|
"./UIProvider/*": "./dist/components/UIProvider/*.js"
|
|
232
244
|
},
|
|
233
|
-
"publishConfig": {
|
|
234
|
-
"access": "public"
|
|
235
|
-
},
|
|
236
|
-
"engines": {
|
|
237
|
-
"node": ">=20"
|
|
238
|
-
},
|
|
239
245
|
"dependencies": {
|
|
240
246
|
"@bspk/icons": "^1.0.5",
|
|
241
247
|
"@bspk/styles": "^1.0.2",
|
|
@@ -249,31 +255,31 @@
|
|
|
249
255
|
"react-dom": "^18.3.1"
|
|
250
256
|
},
|
|
251
257
|
"devDependencies": {
|
|
252
|
-
"@cspell/eslint-plugin": "^
|
|
253
|
-
"@eslint/css": "^0.
|
|
254
|
-
"@eslint/js": "^9.
|
|
258
|
+
"@cspell/eslint-plugin": "^9.4.0",
|
|
259
|
+
"@eslint/css": "^0.14.1",
|
|
260
|
+
"@eslint/js": "^9.39.1",
|
|
255
261
|
"@playwright/test": "^1.52.0",
|
|
256
262
|
"@semantic-release/git": "^10.0.1",
|
|
257
|
-
"@semantic-release/github": "^
|
|
258
|
-
"@semantic-release/npm": "^
|
|
263
|
+
"@semantic-release/github": "^12.0.2",
|
|
264
|
+
"@semantic-release/npm": "^13.1.2",
|
|
259
265
|
"@testing-library/jest-dom": "^6.8.0",
|
|
260
266
|
"@testing-library/react": "^16.3.0",
|
|
261
267
|
"@testing-library/user-event": "^14.6.1",
|
|
262
268
|
"@types/eslint-config-prettier": "^6.11.3",
|
|
263
|
-
"@types/eslint-plugin-jsx-a11y": "^6.10.
|
|
269
|
+
"@types/eslint-plugin-jsx-a11y": "^6.10.1",
|
|
264
270
|
"@types/jest": "^29.5.14",
|
|
265
271
|
"@types/jest-axe": "^3.5.9",
|
|
266
272
|
"@types/node": "^22.10.2",
|
|
267
273
|
"@types/react": "^18.3.12",
|
|
268
274
|
"@types/react-dom": "^18.3.5",
|
|
269
275
|
"chokidar": "^4.0.3",
|
|
270
|
-
"eslint": "9.
|
|
271
|
-
"eslint-config-prettier": "^
|
|
272
|
-
"eslint-import-resolver-typescript": "^
|
|
273
|
-
"eslint-plugin-import": "^2.
|
|
276
|
+
"eslint": "^9.39.1",
|
|
277
|
+
"eslint-config-prettier": "^10.1.8",
|
|
278
|
+
"eslint-import-resolver-typescript": "^4.4.4",
|
|
279
|
+
"eslint-plugin-import": "^2.32.0",
|
|
274
280
|
"eslint-plugin-jsx-a11y": "^6.10.2",
|
|
275
|
-
"eslint-plugin-react": "^7.37.
|
|
276
|
-
"eslint-plugin-react-hooks": "^
|
|
281
|
+
"eslint-plugin-react": "^7.37.5",
|
|
282
|
+
"eslint-plugin-react-hooks": "^7.0.1",
|
|
277
283
|
"globals": "^15.12.0",
|
|
278
284
|
"husky": "^9.1.7",
|
|
279
285
|
"identity-obj-proxy": "^3.0.0",
|
|
@@ -283,7 +289,7 @@
|
|
|
283
289
|
"jest-environment-jsdom": "^30.1.2",
|
|
284
290
|
"prettier-plugin-jsdoc": "^1.3.0",
|
|
285
291
|
"sass": "^1.89.2",
|
|
286
|
-
"semantic-release": "^
|
|
292
|
+
"semantic-release": "^25.0.2",
|
|
287
293
|
"stylelint": "^16.19.1",
|
|
288
294
|
"stylelint-config-standard": "^38.0.0",
|
|
289
295
|
"stylelint-config-standard-scss": "^14.0.0",
|
|
@@ -291,7 +297,7 @@
|
|
|
291
297
|
"tslib": "^2.8.1",
|
|
292
298
|
"tsx": "^4.19.4",
|
|
293
299
|
"typescript": "5.6.3",
|
|
294
|
-
"typescript-eslint": "8.
|
|
300
|
+
"typescript-eslint": "^8.49.0",
|
|
295
301
|
"typescript-json-schema": "^0.65.1"
|
|
296
302
|
},
|
|
297
303
|
"brands": [
|
|
@@ -69,28 +69,30 @@ export type AccordionProps = {
|
|
|
69
69
|
* @example
|
|
70
70
|
* import { Accordion } from '@bspk/ui/Accordion';
|
|
71
71
|
*
|
|
72
|
-
* <
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* {
|
|
76
|
-
*
|
|
77
|
-
*
|
|
78
|
-
*
|
|
79
|
-
*
|
|
80
|
-
*
|
|
81
|
-
*
|
|
82
|
-
*
|
|
83
|
-
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
*
|
|
90
|
-
*
|
|
72
|
+
* <div style={{ width: 400 }}>
|
|
73
|
+
* <Accordion
|
|
74
|
+
* singleOpen={true}
|
|
75
|
+
* items={[
|
|
76
|
+
* {
|
|
77
|
+
* id: 1,
|
|
78
|
+
* title: 'Lawrence Welk',
|
|
79
|
+
* subtitle: 'The Champagne Music Maker',
|
|
80
|
+
* children:
|
|
81
|
+
* 'Lawrence Welk was an American accordionist, bandleader, and television impresario, who hosted The Lawrence Welk Show from 1951 to 1982.',
|
|
82
|
+
* },
|
|
83
|
+
* {
|
|
84
|
+
* id: 2,
|
|
85
|
+
* title: 'Myron Floren',
|
|
86
|
+
* subtitle: 'The Happy Norwegian',
|
|
87
|
+
* children:
|
|
88
|
+
* 'Myron Floren was an American accordionist best known as the featured accordionist on The Lawrence Welk Show.',
|
|
89
|
+
* },
|
|
90
|
+
* ]}
|
|
91
|
+
* />
|
|
92
|
+
* </div>;
|
|
91
93
|
*
|
|
92
94
|
* @name Accordion
|
|
93
|
-
* @phase
|
|
95
|
+
* @phase Stable
|
|
94
96
|
*/
|
|
95
97
|
export function Accordion({ items: itemsProp, singleOpen = true }: AccordionProps) {
|
|
96
98
|
const items = useMemo(
|