@utilitywarehouse/hearth-react-native 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +55 -0
- package/.storybook/manager.ts +8 -0
- package/.storybook/preview.tsx +159 -0
- package/.storybook/vitest.setup.ts +7 -0
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-lint.log +6 -0
- package/CHANGELOG.md +7 -0
- package/build/components/Accordion/Accordion.context.d.ts +13 -0
- package/build/components/Accordion/Accordion.context.js +5 -0
- package/build/components/Accordion/Accordion.d.ts +25 -0
- package/build/components/Accordion/Accordion.js +61 -0
- package/build/components/Accordion/Accordion.props.d.ts +42 -0
- package/build/components/Accordion/Accordion.props.js +1 -0
- package/build/components/Accordion/AccordionContent.d.ts +6 -0
- package/build/components/Accordion/AccordionContent.js +36 -0
- package/build/components/Accordion/AccordionContentText.d.ts +6 -0
- package/build/components/Accordion/AccordionContentText.js +7 -0
- package/build/components/Accordion/AccordionHeader.d.ts +6 -0
- package/build/components/Accordion/AccordionHeader.js +11 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.js +16 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.props.d.ts +14 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.props.js +1 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingHelperText.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingHelperText.js +13 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTextContent.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTextContent.js +14 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTitle.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTitle.js +7 -0
- package/build/components/Accordion/AccordionHeading/index.d.ts +4 -0
- package/build/components/Accordion/AccordionHeading/index.js +4 -0
- package/build/components/Accordion/AccordionIcon.d.ts +6 -0
- package/build/components/Accordion/AccordionIcon.js +9 -0
- package/build/components/Accordion/AccordionItem.context.d.ts +9 -0
- package/build/components/Accordion/AccordionItem.context.js +5 -0
- package/build/components/Accordion/AccordionItem.props.d.ts +19 -0
- package/build/components/Accordion/AccordionItem.props.js +1 -0
- package/build/components/Accordion/AccordionItemRoot.d.ts +6 -0
- package/build/components/Accordion/AccordionItemRoot.js +17 -0
- package/build/components/Accordion/AccordionRoot.d.ts +6 -0
- package/build/components/Accordion/AccordionRoot.js +16 -0
- package/build/components/Accordion/AccordionTitleText.d.ts +6 -0
- package/build/components/Accordion/AccordionTitleText.js +11 -0
- package/build/components/Accordion/AccordionTrigger.d.ts +10 -0
- package/build/components/Accordion/AccordionTrigger.js +47 -0
- package/build/components/Accordion/index.d.ts +2 -0
- package/build/components/Accordion/index.js +2 -0
- package/build/components/Alert/Alert.context.d.ts +7 -0
- package/build/components/Alert/Alert.context.js +3 -0
- package/build/components/Alert/Alert.d.ts +6 -0
- package/build/components/Alert/Alert.js +56 -0
- package/build/components/Alert/Alert.props.d.ts +55 -0
- package/build/components/Alert/Alert.props.js +1 -0
- package/build/components/Alert/AlertCloseButton.d.ts +9 -0
- package/build/components/Alert/AlertCloseButton.js +15 -0
- package/build/components/Alert/AlertContent.d.ts +6 -0
- package/build/components/Alert/AlertContent.js +15 -0
- package/build/components/Alert/AlertIcon.d.ts +6 -0
- package/build/components/Alert/AlertIcon.js +30 -0
- package/build/components/Alert/AlertIconButton.d.ts +9 -0
- package/build/components/Alert/AlertIconButton.js +6 -0
- package/build/components/Alert/AlertLink.d.ts +6 -0
- package/build/components/Alert/AlertLink.js +7 -0
- package/build/components/Alert/AlertText.d.ts +8 -0
- package/build/components/Alert/AlertText.js +7 -0
- package/build/components/Alert/AlertTitle.d.ts +6 -0
- package/build/components/Alert/AlertTitle.js +7 -0
- package/build/components/Alert/index.d.ts +8 -0
- package/build/components/Alert/index.js +8 -0
- package/build/components/Badge/Badge.context.d.ts +10 -0
- package/build/components/Badge/Badge.context.js +3 -0
- package/build/components/Badge/Badge.d.ts +6 -0
- package/build/components/Badge/Badge.js +122 -0
- package/build/components/Badge/Badge.props.d.ts +9 -0
- package/build/components/Badge/Badge.props.js +1 -0
- package/build/components/Badge/BadgeIcon.d.ts +6 -0
- package/build/components/Badge/BadgeIcon.js +72 -0
- package/build/components/Badge/BadgeText.d.ts +6 -0
- package/build/components/Badge/BadgeText.js +68 -0
- package/build/components/Badge/index.d.ts +3 -0
- package/build/components/Badge/index.js +3 -0
- package/build/components/BodyText/BodyText.d.ts +6 -0
- package/build/components/BodyText/BodyText.js +95 -0
- package/build/components/BodyText/BodyText.props.d.ts +22 -0
- package/build/components/BodyText/BodyText.props.js +1 -0
- package/build/components/BodyText/index.d.ts +1 -0
- package/build/components/BodyText/index.js +1 -0
- package/build/components/BottomSheet/BottomSheet.context.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheet.context.js +6 -0
- package/build/components/BottomSheet/BottomSheet.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheet.js +31 -0
- package/build/components/BottomSheet/BottomSheet.props.d.ts +34 -0
- package/build/components/BottomSheet/BottomSheet.props.js +1 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +20 -0
- package/build/components/BottomSheet/BottomSheetFlatList.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetFlatList.js +38 -0
- package/build/components/BottomSheet/BottomSheetHandle.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheetHandle.js +29 -0
- package/build/components/BottomSheet/BottomSheetModal.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetModal.js +32 -0
- package/build/components/BottomSheet/BottomSheetScrollView.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetScrollView.js +34 -0
- package/build/components/BottomSheet/BottomSheetView.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetView.js +36 -0
- package/build/components/BottomSheet/index.d.ts +7 -0
- package/build/components/BottomSheet/index.js +6 -0
- package/build/components/BottomSheet/useBottomSheetLogic.d.ts +15 -0
- package/build/components/BottomSheet/useBottomSheetLogic.js +30 -0
- package/build/components/Box/Box.d.ts +6 -0
- package/build/components/Box/Box.js +53 -0
- package/build/components/Box/Box.props.d.ts +99 -0
- package/build/components/Box/Box.props.js +1 -0
- package/build/components/Box/index.d.ts +1 -0
- package/build/components/Box/index.js +1 -0
- package/build/components/Button/Button.context.d.ts +17 -0
- package/build/components/Button/Button.context.js +3 -0
- package/build/components/Button/Button.d.ts +20 -0
- package/build/components/Button/Button.js +60 -0
- package/build/components/Button/Button.props.d.ts +62 -0
- package/build/components/Button/Button.props.js +1 -0
- package/build/components/Button/ButtonGroup.context.d.ts +8 -0
- package/build/components/Button/ButtonGroup.context.js +3 -0
- package/build/components/Button/ButtonGroup.d.ts +11 -0
- package/build/components/Button/ButtonGroup.js +10 -0
- package/build/components/Button/ButtonGroupRoot.d.ts +11 -0
- package/build/components/Button/ButtonGroupRoot.js +52 -0
- package/build/components/Button/ButtonIcon.d.ts +6 -0
- package/build/components/Button/ButtonIcon.js +126 -0
- package/build/components/Button/ButtonRoot.d.ts +11 -0
- package/build/components/Button/ButtonRoot.js +426 -0
- package/build/components/Button/ButtonSpinner.d.ts +6 -0
- package/build/components/Button/ButtonSpinner.js +58 -0
- package/build/components/Button/ButtonText.d.ts +6 -0
- package/build/components/Button/ButtonText.js +109 -0
- package/build/components/Button/index.d.ts +3 -0
- package/build/components/Button/index.js +2 -0
- package/build/components/Card/Card.context.d.ts +6 -0
- package/build/components/Card/Card.context.js +6 -0
- package/build/components/Card/Card.d.ts +17 -0
- package/build/components/Card/Card.js +7 -0
- package/build/components/Card/Card.props.d.ts +17 -0
- package/build/components/Card/Card.props.js +1 -0
- package/build/components/Card/CardAction.context.d.ts +6 -0
- package/build/components/Card/CardAction.context.js +6 -0
- package/build/components/Card/CardAction.d.ts +8 -0
- package/build/components/Card/CardAction.js +13 -0
- package/build/components/Card/CardRoot.d.ts +11 -0
- package/build/components/Card/CardRoot.js +244 -0
- package/build/components/Card/index.d.ts +4 -0
- package/build/components/Card/index.js +4 -0
- package/build/components/Center/Center.d.ts +6 -0
- package/build/components/Center/Center.js +5 -0
- package/build/components/Center/index.d.ts +1 -0
- package/build/components/Center/index.js +1 -0
- package/build/components/Checkbox/Checkbox.context.d.ts +10 -0
- package/build/components/Checkbox/Checkbox.context.js +3 -0
- package/build/components/Checkbox/Checkbox.d.ts +21 -0
- package/build/components/Checkbox/Checkbox.js +44 -0
- package/build/components/Checkbox/Checkbox.props.d.ts +34 -0
- package/build/components/Checkbox/Checkbox.props.js +1 -0
- package/build/components/Checkbox/CheckboxGroup.context.d.ts +10 -0
- package/build/components/Checkbox/CheckboxGroup.context.js +3 -0
- package/build/components/Checkbox/CheckboxGroup.d.ts +6 -0
- package/build/components/Checkbox/CheckboxGroup.js +49 -0
- package/build/components/Checkbox/CheckboxGroup.props.d.ts +20 -0
- package/build/components/Checkbox/CheckboxGroup.props.js +1 -0
- package/build/components/Checkbox/CheckboxGroupRoot.d.ts +8 -0
- package/build/components/Checkbox/CheckboxGroupRoot.js +23 -0
- package/build/components/Checkbox/CheckboxGroupTextContent.d.ts +6 -0
- package/build/components/Checkbox/CheckboxGroupTextContent.js +7 -0
- package/build/components/Checkbox/CheckboxIcon.d.ts +6 -0
- package/build/components/Checkbox/CheckboxIcon.js +17 -0
- package/build/components/Checkbox/CheckboxIndicator.d.ts +6 -0
- package/build/components/Checkbox/CheckboxIndicator.js +56 -0
- package/build/components/Checkbox/CheckboxLabel.d.ts +6 -0
- package/build/components/Checkbox/CheckboxLabel.js +7 -0
- package/build/components/Checkbox/CheckboxRoot.d.ts +12 -0
- package/build/components/Checkbox/CheckboxRoot.js +42 -0
- package/build/components/Checkbox/CheckboxTextContent.d.ts +6 -0
- package/build/components/Checkbox/CheckboxTextContent.js +7 -0
- package/build/components/Checkbox/CheckboxTileRoot.d.ts +8 -0
- package/build/components/Checkbox/CheckboxTileRoot.js +36 -0
- package/build/components/Checkbox/index.d.ts +5 -0
- package/build/components/Checkbox/index.js +4 -0
- package/build/components/DetailText/DetailText.d.ts +6 -0
- package/build/components/DetailText/DetailText.js +115 -0
- package/build/components/DetailText/DetailText.props.d.ts +19 -0
- package/build/components/DetailText/DetailText.props.js +1 -0
- package/build/components/DetailText/index.d.ts +1 -0
- package/build/components/DetailText/index.js +1 -0
- package/build/components/Divider/Divider.d.ts +6 -0
- package/build/components/Divider/Divider.js +176 -0
- package/build/components/Divider/Divider.props.d.ts +11 -0
- package/build/components/Divider/Divider.props.js +1 -0
- package/build/components/Divider/index.d.ts +1 -0
- package/build/components/Divider/index.js +1 -0
- package/build/components/Flex/Flex.d.ts +6 -0
- package/build/components/Flex/Flex.js +23 -0
- package/build/components/Flex/Flex.props.d.ts +9 -0
- package/build/components/Flex/Flex.props.js +1 -0
- package/build/components/Flex/index.d.ts +1 -0
- package/build/components/Flex/index.js +1 -0
- package/build/components/FormField/FormFielInvalidIcon.d.ts +6 -0
- package/build/components/FormField/FormFielInvalidIcon.js +6 -0
- package/build/components/FormField/FormField.context.d.ts +3 -0
- package/build/components/FormField/FormField.context.js +3 -0
- package/build/components/FormField/FormField.d.ts +29 -0
- package/build/components/FormField/FormField.js +42 -0
- package/build/components/FormField/FormField.props.d.ts +16 -0
- package/build/components/FormField/FormField.props.js +1 -0
- package/build/components/FormField/FormFieldHelper.d.ts +6 -0
- package/build/components/FormField/FormFieldHelper.js +9 -0
- package/build/components/FormField/FormFieldInvalid.d.ts +6 -0
- package/build/components/FormField/FormFieldInvalid.js +10 -0
- package/build/components/FormField/FormFieldLabel.d.ts +6 -0
- package/build/components/FormField/FormFieldLabel.js +9 -0
- package/build/components/FormField/FormFieldRoot.d.ts +6 -0
- package/build/components/FormField/FormFieldRoot.js +14 -0
- package/build/components/FormField/FormFieldValid.d.ts +6 -0
- package/build/components/FormField/FormFieldValid.js +10 -0
- package/build/components/FormField/FormFieldValidIcon.d.ts +6 -0
- package/build/components/FormField/FormFieldValidIcon.js +6 -0
- package/build/components/FormField/index.d.ts +6 -0
- package/build/components/FormField/index.js +6 -0
- package/build/components/Grid/Grid.d.ts +6 -0
- package/build/components/Grid/Grid.js +97 -0
- package/build/components/Grid/Grid.props.d.ts +45 -0
- package/build/components/Grid/Grid.props.js +1 -0
- package/build/components/Grid/index.d.ts +2 -0
- package/build/components/Grid/index.js +1 -0
- package/build/components/HTMLElements/ListItem.d.ts +9 -0
- package/build/components/HTMLElements/ListItem.js +14 -0
- package/build/components/HTMLElements/OrderedList.d.ts +12 -0
- package/build/components/HTMLElements/OrderedList.js +28 -0
- package/build/components/HTMLElements/UnorderedList.d.ts +12 -0
- package/build/components/HTMLElements/UnorderedList.js +26 -0
- package/build/components/HTMLElements/index.d.ts +3 -0
- package/build/components/HTMLElements/index.js +3 -0
- package/build/components/Heading/Heading.d.ts +6 -0
- package/build/components/Heading/Heading.js +137 -0
- package/build/components/Heading/Heading.props.d.ts +18 -0
- package/build/components/Heading/Heading.props.js +1 -0
- package/build/components/Heading/index.d.ts +1 -0
- package/build/components/Heading/index.js +1 -0
- package/build/components/Helper/Helper.d.ts +6 -0
- package/build/components/Helper/Helper.js +36 -0
- package/build/components/Helper/Helper.props.d.ts +19 -0
- package/build/components/Helper/Helper.props.js +1 -0
- package/build/components/Helper/HelperContext.d.ts +3 -0
- package/build/components/Helper/HelperContext.js +3 -0
- package/build/components/Helper/HelperIcon.d.ts +6 -0
- package/build/components/Helper/HelperIcon.js +31 -0
- package/build/components/Helper/HelperText.d.ts +6 -0
- package/build/components/Helper/HelperText.js +32 -0
- package/build/components/Helper/index.d.ts +3 -0
- package/build/components/Helper/index.js +3 -0
- package/build/components/Icon/Icon.d.ts +8 -0
- package/build/components/Icon/Icon.js +44 -0
- package/build/components/Icon/Icon.props.d.ts +17 -0
- package/build/components/Icon/Icon.props.js +1 -0
- package/build/components/Icon/index.d.ts +2 -0
- package/build/components/Icon/index.js +1 -0
- package/build/components/IconButton/IconButton.context.d.ts +17 -0
- package/build/components/IconButton/IconButton.context.js +3 -0
- package/build/components/IconButton/IconButton.d.ts +6 -0
- package/build/components/IconButton/IconButton.js +26 -0
- package/build/components/IconButton/IconButton.props.d.ts +12 -0
- package/build/components/IconButton/IconButton.props.js +1 -0
- package/build/components/IconButton/IconButtonIcon.d.ts +6 -0
- package/build/components/IconButton/IconButtonIcon.js +142 -0
- package/build/components/IconButton/IconButtonRoot.d.ts +11 -0
- package/build/components/IconButton/IconButtonRoot.js +392 -0
- package/build/components/IconButton/IconButtonSpinner.d.ts +6 -0
- package/build/components/IconButton/IconButtonSpinner.js +59 -0
- package/build/components/IconButton/index.d.ts +2 -0
- package/build/components/IconButton/index.js +1 -0
- package/build/components/Icons/CircleIcon.d.ts +5 -0
- package/build/components/Icons/CircleIcon.js +10 -0
- package/build/components/Icons/index.d.ts +1 -0
- package/build/components/Icons/index.js +1 -0
- package/build/components/InlineLink/InlineLink.context.d.ts +11 -0
- package/build/components/InlineLink/InlineLink.context.js +3 -0
- package/build/components/InlineLink/InlineLink.d.ts +6 -0
- package/build/components/InlineLink/InlineLink.js +13 -0
- package/build/components/InlineLink/InlineLink.props.d.ts +8 -0
- package/build/components/InlineLink/InlineLink.props.js +1 -0
- package/build/components/InlineLink/InlineLinkRoot.d.ts +11 -0
- package/build/components/InlineLink/InlineLinkRoot.js +72 -0
- package/build/components/InlineLink/index.d.ts +3 -0
- package/build/components/InlineLink/index.js +2 -0
- package/build/components/Input/Input.context.d.ts +3 -0
- package/build/components/Input/Input.context.js +3 -0
- package/build/components/Input/Input.d.ts +23 -0
- package/build/components/Input/Input.js +81 -0
- package/build/components/Input/Input.props.d.ts +100 -0
- package/build/components/Input/Input.props.js +1 -0
- package/build/components/Input/InputField.d.ts +6 -0
- package/build/components/Input/InputField.js +82 -0
- package/build/components/Input/InputIcon.d.ts +9 -0
- package/build/components/Input/InputIcon.js +16 -0
- package/build/components/Input/InputRoot.d.ts +12 -0
- package/build/components/Input/InputRoot.js +67 -0
- package/build/components/Input/InputSlot.d.ts +6 -0
- package/build/components/Input/InputSlot.js +14 -0
- package/build/components/Input/index.d.ts +1 -0
- package/build/components/Input/index.js +1 -0
- package/build/components/Label/Label.d.ts +6 -0
- package/build/components/Label/Label.js +21 -0
- package/build/components/Label/Label.props.d.ts +6 -0
- package/build/components/Label/Label.props.js +1 -0
- package/build/components/Label/index.d.ts +1 -0
- package/build/components/Label/index.js +1 -0
- package/build/components/Link/Link.context.d.ts +11 -0
- package/build/components/Link/Link.context.js +3 -0
- package/build/components/Link/Link.d.ts +7 -0
- package/build/components/Link/Link.js +18 -0
- package/build/components/Link/Link.props.d.ts +13 -0
- package/build/components/Link/Link.props.js +1 -0
- package/build/components/Link/LinkIcon.d.ts +6 -0
- package/build/components/Link/LinkIcon.js +45 -0
- package/build/components/Link/LinkRoot.d.ts +11 -0
- package/build/components/Link/LinkRoot.js +50 -0
- package/build/components/Link/LinkText.d.ts +6 -0
- package/build/components/Link/LinkText.js +51 -0
- package/build/components/Link/index.d.ts +4 -0
- package/build/components/Link/index.js +3 -0
- package/build/components/List/List.context.d.ts +13 -0
- package/build/components/List/List.context.js +6 -0
- package/build/components/List/List.d.ts +6 -0
- package/build/components/List/List.js +64 -0
- package/build/components/List/List.props.d.ts +19 -0
- package/build/components/List/List.props.js +1 -0
- package/build/components/List/ListHeading/ListHeading.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeading.js +20 -0
- package/build/components/List/ListHeading/ListHeading.props.d.ts +33 -0
- package/build/components/List/ListHeading/ListHeading.props.js +1 -0
- package/build/components/List/ListHeading/ListHeadingHelperText.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingHelperText.js +13 -0
- package/build/components/List/ListHeading/ListHeadingTextContent.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingTextContent.js +14 -0
- package/build/components/List/ListHeading/ListHeadingTitle.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingTitle.js +7 -0
- package/build/components/List/ListHeading/index.d.ts +4 -0
- package/build/components/List/ListHeading/index.js +4 -0
- package/build/components/List/ListItem/ListItem.context.d.ts +7 -0
- package/build/components/List/ListItem/ListItem.context.js +3 -0
- package/build/components/List/ListItem/ListItem.d.ts +17 -0
- package/build/components/List/ListItem/ListItem.js +7 -0
- package/build/components/List/ListItem/ListItem.props.d.ts +26 -0
- package/build/components/List/ListItem/ListItem.props.js +1 -0
- package/build/components/List/ListItem/ListItemContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemContent.js +14 -0
- package/build/components/List/ListItem/ListItemHelperText.d.ts +6 -0
- package/build/components/List/ListItem/ListItemHelperText.js +13 -0
- package/build/components/List/ListItem/ListItemIcon.d.ts +9 -0
- package/build/components/List/ListItem/ListItemIcon.js +18 -0
- package/build/components/List/ListItem/ListItemLeadingContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemLeadingContent.js +5 -0
- package/build/components/List/ListItem/ListItemRoot.d.ts +11 -0
- package/build/components/List/ListItem/ListItemRoot.js +126 -0
- package/build/components/List/ListItem/ListItemText.d.ts +6 -0
- package/build/components/List/ListItem/ListItemText.js +7 -0
- package/build/components/List/ListItem/ListItemTrailingContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemTrailingContent.js +5 -0
- package/build/components/List/ListItem/ListItemTrailingIcon.d.ts +9 -0
- package/build/components/List/ListItem/ListItemTrailingIcon.js +18 -0
- package/build/components/List/ListItem/index.d.ts +9 -0
- package/build/components/List/ListItem/index.js +8 -0
- package/build/components/List/index.d.ts +4 -0
- package/build/components/List/index.js +4 -0
- package/build/components/Radio/Radio.context.d.ts +10 -0
- package/build/components/Radio/Radio.context.js +3 -0
- package/build/components/Radio/Radio.d.ts +21 -0
- package/build/components/Radio/Radio.js +40 -0
- package/build/components/Radio/Radio.props.d.ts +29 -0
- package/build/components/Radio/Radio.props.js +1 -0
- package/build/components/Radio/RadioGroup.context.d.ts +10 -0
- package/build/components/Radio/RadioGroup.context.js +3 -0
- package/build/components/Radio/RadioGroup.d.ts +6 -0
- package/build/components/Radio/RadioGroup.js +49 -0
- package/build/components/Radio/RadioGroup.props.d.ts +20 -0
- package/build/components/Radio/RadioGroup.props.js +1 -0
- package/build/components/Radio/RadioGroupRoot.d.ts +8 -0
- package/build/components/Radio/RadioGroupRoot.js +23 -0
- package/build/components/Radio/RadioGroupTextContent.d.ts +6 -0
- package/build/components/Radio/RadioGroupTextContent.js +7 -0
- package/build/components/Radio/RadioIcon.d.ts +6 -0
- package/build/components/Radio/RadioIcon.js +20 -0
- package/build/components/Radio/RadioIndicator.d.ts +6 -0
- package/build/components/Radio/RadioIndicator.js +56 -0
- package/build/components/Radio/RadioLabel.d.ts +6 -0
- package/build/components/Radio/RadioLabel.js +7 -0
- package/build/components/Radio/RadioRoot.d.ts +12 -0
- package/build/components/Radio/RadioRoot.js +42 -0
- package/build/components/Radio/RadioTextContent.d.ts +6 -0
- package/build/components/Radio/RadioTextContent.js +7 -0
- package/build/components/Radio/RadioTileRoot.d.ts +8 -0
- package/build/components/Radio/RadioTileRoot.js +36 -0
- package/build/components/Radio/index.d.ts +5 -0
- package/build/components/Radio/index.js +4 -0
- package/build/components/RadioCard/RadioCard.context.d.ts +8 -0
- package/build/components/RadioCard/RadioCard.context.js +3 -0
- package/build/components/RadioCard/RadioCard.d.ts +36 -0
- package/build/components/RadioCard/RadioCard.js +38 -0
- package/build/components/RadioCard/RadioCard.props.d.ts +16 -0
- package/build/components/RadioCard/RadioCard.props.js +1 -0
- package/build/components/RadioCard/RadioCardGroup.d.ts +6 -0
- package/build/components/RadioCard/RadioCardGroup.js +23 -0
- package/build/components/RadioCard/RadioCardGroup.props.d.ts +26 -0
- package/build/components/RadioCard/RadioCardGroup.props.js +1 -0
- package/build/components/RadioCard/RadioCardIcon.d.ts +6 -0
- package/build/components/RadioCard/RadioCardIcon.js +20 -0
- package/build/components/RadioCard/RadioCardIndicator.d.ts +6 -0
- package/build/components/RadioCard/RadioCardIndicator.js +56 -0
- package/build/components/RadioCard/RadioCardLabel.d.ts +6 -0
- package/build/components/RadioCard/RadioCardLabel.js +5 -0
- package/build/components/RadioCard/RadioCardRoot.d.ts +12 -0
- package/build/components/RadioCard/RadioCardRoot.js +48 -0
- package/build/components/RadioCard/index.d.ts +2 -0
- package/build/components/RadioCard/index.js +1 -0
- package/build/components/Select/Select.context.d.ts +8 -0
- package/build/components/Select/Select.context.js +7 -0
- package/build/components/Select/Select.d.ts +6 -0
- package/build/components/Select/Select.js +167 -0
- package/build/components/Select/Select.props.d.ts +126 -0
- package/build/components/Select/Select.props.js +1 -0
- package/build/components/Select/SelectOption.d.ts +6 -0
- package/build/components/Select/SelectOption.js +65 -0
- package/build/components/Select/index.d.ts +3 -0
- package/build/components/Select/index.js +2 -0
- package/build/components/Skeleton/Skeleton.d.ts +6 -0
- package/build/components/Skeleton/Skeleton.js +43 -0
- package/build/components/Skeleton/Skeleton.props.d.ts +9 -0
- package/build/components/Skeleton/Skeleton.props.js +1 -0
- package/build/components/Skeleton/index.d.ts +1 -0
- package/build/components/Skeleton/index.js +1 -0
- package/build/components/Spinner/Spinner.d.ts +3 -0
- package/build/components/Spinner/Spinner.js +85 -0
- package/build/components/Spinner/Spinner.props.d.ts +8 -0
- package/build/components/Spinner/Spinner.props.js +1 -0
- package/build/components/Spinner/Spinner.web.d.ts +3 -0
- package/build/components/Spinner/Spinner.web.js +81 -0
- package/build/components/Spinner/index.d.ts +2 -0
- package/build/components/Spinner/index.js +1 -0
- package/build/components/Switch/Switch.d.ts +3 -0
- package/build/components/Switch/Switch.js +140 -0
- package/build/components/Switch/Switch.props.d.ts +8 -0
- package/build/components/Switch/Switch.props.js +1 -0
- package/build/components/Switch/Switch.web.d.ts +3 -0
- package/build/components/Switch/Switch.web.js +142 -0
- package/build/components/Switch/index.d.ts +1 -0
- package/build/components/Switch/index.js +1 -0
- package/build/components/Textarea/Textarea.context.d.ts +3 -0
- package/build/components/Textarea/Textarea.context.js +3 -0
- package/build/components/Textarea/Textarea.d.ts +11 -0
- package/build/components/Textarea/Textarea.js +17 -0
- package/build/components/Textarea/Textarea.props.d.ts +39 -0
- package/build/components/Textarea/Textarea.props.js +1 -0
- package/build/components/Textarea/TextareaField.d.ts +6 -0
- package/build/components/Textarea/TextareaField.js +31 -0
- package/build/components/Textarea/TextareaRoot.d.ts +12 -0
- package/build/components/Textarea/TextareaRoot.js +58 -0
- package/build/components/Textarea/index.d.ts +1 -0
- package/build/components/Textarea/index.js +1 -0
- package/build/components/ToggleButton/ToggleButton.d.ts +16 -0
- package/build/components/ToggleButton/ToggleButton.js +21 -0
- package/build/components/ToggleButton/ToggleButton.props.d.ts +6 -0
- package/build/components/ToggleButton/ToggleButton.props.js +1 -0
- package/build/components/ToggleButton/ToggleButtonIcon.d.ts +8 -0
- package/build/components/ToggleButton/ToggleButtonIcon.js +26 -0
- package/build/components/ToggleButton/ToggleButtonRoot.d.ts +11 -0
- package/build/components/ToggleButton/ToggleButtonRoot.js +77 -0
- package/build/components/ToggleButton/ToggleButtonText.d.ts +8 -0
- package/build/components/ToggleButton/ToggleButtonText.js +21 -0
- package/build/components/ToggleButton/index.d.ts +2 -0
- package/build/components/ToggleButton/index.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.context.d.ts +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.context.js +3 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.d.ts +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.js +22 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.props.d.ts +15 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.props.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.d.ts +6 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.js +23 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.d.ts +24 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.d.ts +12 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +63 -0
- package/build/components/ToggleButtonCard/index.d.ts +2 -0
- package/build/components/ToggleButtonCard/index.js +1 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.context.d.ts +13 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.context.js +3 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.js +26 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +11 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.js +1 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +60 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.d.ts +11 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +41 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonSpinner.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonSpinner.js +25 -0
- package/build/components/UnstyledIconButton/index.d.ts +2 -0
- package/build/components/UnstyledIconButton/index.js +1 -0
- package/build/components/index.d.ts +36 -0
- package/build/components/index.js +37 -0
- package/build/core/breakpoints.d.ts +10 -0
- package/build/core/breakpoints.js +10 -0
- package/build/core/index.d.ts +5 -0
- package/build/core/index.js +14 -0
- package/build/core/themes.d.ts +3760 -0
- package/build/core/themes.js +247 -0
- package/build/hooks/index.d.ts +6 -0
- package/build/hooks/index.js +6 -0
- package/build/hooks/useBreakpointValue.d.ts +9 -0
- package/build/hooks/useBreakpointValue.js +34 -0
- package/build/hooks/useColorMode.d.ts +2 -0
- package/build/hooks/useColorMode.js +13 -0
- package/build/hooks/useMedia.d.ts +2 -0
- package/build/hooks/useMedia.js +22 -0
- package/build/hooks/useStyleProps.d.ts +16 -0
- package/build/hooks/useStyleProps.js +44 -0
- package/build/hooks/useTheme.d.ts +2 -0
- package/build/hooks/useTheme.js +6 -0
- package/build/hooks/useToken.d.ts +52 -0
- package/build/hooks/useToken.js +13 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +4 -0
- package/build/tokens/border-radius.d.ts +13 -0
- package/build/tokens/border-radius.js +12 -0
- package/build/tokens/border-width.d.ts +8 -0
- package/build/tokens/border-width.js +7 -0
- package/build/tokens/color.d.ts +496 -0
- package/build/tokens/color.js +267 -0
- package/build/tokens/components/dark/accordion.d.ts +29 -0
- package/build/tokens/components/dark/accordion.js +28 -0
- package/build/tokens/components/dark/alert.d.ts +27 -0
- package/build/tokens/components/dark/alert.js +26 -0
- package/build/tokens/components/dark/badge.d.ts +51 -0
- package/build/tokens/components/dark/badge.js +50 -0
- package/build/tokens/components/dark/banner.d.ts +43 -0
- package/build/tokens/components/dark/banner.js +42 -0
- package/build/tokens/components/dark/bottom-navigation.d.ts +35 -0
- package/build/tokens/components/dark/bottom-navigation.js +34 -0
- package/build/tokens/components/dark/bottom-sheet.d.ts +17 -0
- package/build/tokens/components/dark/bottom-sheet.js +16 -0
- package/build/tokens/components/dark/breadcrumb.d.ts +8 -0
- package/build/tokens/components/dark/breadcrumb.js +7 -0
- package/build/tokens/components/dark/button.d.ts +104 -0
- package/build/tokens/components/dark/button.js +103 -0
- package/build/tokens/components/dark/card.d.ts +63 -0
- package/build/tokens/components/dark/card.js +62 -0
- package/build/tokens/components/dark/carousel-control.d.ts +19 -0
- package/build/tokens/components/dark/carousel-control.js +18 -0
- package/build/tokens/components/dark/checkbox.d.ts +45 -0
- package/build/tokens/components/dark/checkbox.js +44 -0
- package/build/tokens/components/dark/date-picker.d.ts +55 -0
- package/build/tokens/components/dark/date-picker.js +54 -0
- package/build/tokens/components/dark/dialog.d.ts +25 -0
- package/build/tokens/components/dark/dialog.js +24 -0
- package/build/tokens/components/dark/divider.d.ts +8 -0
- package/build/tokens/components/dark/divider.js +7 -0
- package/build/tokens/components/dark/focus.d.ts +8 -0
- package/build/tokens/components/dark/focus.js +7 -0
- package/build/tokens/components/dark/footer.d.ts +12 -0
- package/build/tokens/components/dark/footer.js +11 -0
- package/build/tokens/components/dark/form-field.d.ts +10 -0
- package/build/tokens/components/dark/form-field.js +9 -0
- package/build/tokens/components/dark/icon-button.d.ts +39 -0
- package/build/tokens/components/dark/icon-button.js +38 -0
- package/build/tokens/components/dark/icon-container.d.ts +42 -0
- package/build/tokens/components/dark/icon-container.js +41 -0
- package/build/tokens/components/dark/icon.d.ts +15 -0
- package/build/tokens/components/dark/icon.js +14 -0
- package/build/tokens/components/dark/index.d.ts +43 -0
- package/build/tokens/components/dark/index.js +43 -0
- package/build/tokens/components/dark/inline-link.d.ts +14 -0
- package/build/tokens/components/dark/inline-link.js +13 -0
- package/build/tokens/components/dark/input.d.ts +42 -0
- package/build/tokens/components/dark/input.js +41 -0
- package/build/tokens/components/dark/link.d.ts +15 -0
- package/build/tokens/components/dark/link.js +14 -0
- package/build/tokens/components/dark/list.d.ts +45 -0
- package/build/tokens/components/dark/list.js +44 -0
- package/build/tokens/components/dark/menu.d.ts +46 -0
- package/build/tokens/components/dark/menu.js +45 -0
- package/build/tokens/components/dark/modal.d.ts +28 -0
- package/build/tokens/components/dark/modal.js +27 -0
- package/build/tokens/components/dark/navigation.d.ts +24 -0
- package/build/tokens/components/dark/navigation.js +23 -0
- package/build/tokens/components/dark/overlay.d.ts +8 -0
- package/build/tokens/components/dark/overlay.js +7 -0
- package/build/tokens/components/dark/parts.d.ts +23 -0
- package/build/tokens/components/dark/parts.js +22 -0
- package/build/tokens/components/dark/pill.d.ts +26 -0
- package/build/tokens/components/dark/pill.js +25 -0
- package/build/tokens/components/dark/progress-stepper.d.ts +32 -0
- package/build/tokens/components/dark/progress-stepper.js +31 -0
- package/build/tokens/components/dark/radio.d.ts +43 -0
- package/build/tokens/components/dark/radio.js +42 -0
- package/build/tokens/components/dark/segmented-control.d.ts +27 -0
- package/build/tokens/components/dark/segmented-control.js +26 -0
- package/build/tokens/components/dark/select.d.ts +55 -0
- package/build/tokens/components/dark/select.js +54 -0
- package/build/tokens/components/dark/skeleton.d.ts +7 -0
- package/build/tokens/components/dark/skeleton.js +6 -0
- package/build/tokens/components/dark/spinner.d.ts +24 -0
- package/build/tokens/components/dark/spinner.js +23 -0
- package/build/tokens/components/dark/switch.d.ts +35 -0
- package/build/tokens/components/dark/switch.js +34 -0
- package/build/tokens/components/dark/text.d.ts +11 -0
- package/build/tokens/components/dark/text.js +10 -0
- package/build/tokens/components/dark/toggle-button.d.ts +24 -0
- package/build/tokens/components/dark/toggle-button.js +23 -0
- package/build/tokens/components/dark/top-navigation.d.ts +26 -0
- package/build/tokens/components/dark/top-navigation.js +25 -0
- package/build/tokens/components/index.d.ts +5 -0
- package/build/tokens/components/index.js +5 -0
- package/build/tokens/components/light/accordion.d.ts +29 -0
- package/build/tokens/components/light/accordion.js +28 -0
- package/build/tokens/components/light/alert.d.ts +27 -0
- package/build/tokens/components/light/alert.js +26 -0
- package/build/tokens/components/light/badge.d.ts +51 -0
- package/build/tokens/components/light/badge.js +50 -0
- package/build/tokens/components/light/banner.d.ts +43 -0
- package/build/tokens/components/light/banner.js +42 -0
- package/build/tokens/components/light/bottom-navigation.d.ts +35 -0
- package/build/tokens/components/light/bottom-navigation.js +34 -0
- package/build/tokens/components/light/bottom-sheet.d.ts +17 -0
- package/build/tokens/components/light/bottom-sheet.js +16 -0
- package/build/tokens/components/light/breadcrumb.d.ts +8 -0
- package/build/tokens/components/light/breadcrumb.js +7 -0
- package/build/tokens/components/light/button.d.ts +104 -0
- package/build/tokens/components/light/button.js +103 -0
- package/build/tokens/components/light/card.d.ts +63 -0
- package/build/tokens/components/light/card.js +62 -0
- package/build/tokens/components/light/carousel-control.d.ts +19 -0
- package/build/tokens/components/light/carousel-control.js +18 -0
- package/build/tokens/components/light/checkbox.d.ts +45 -0
- package/build/tokens/components/light/checkbox.js +44 -0
- package/build/tokens/components/light/date-picker.d.ts +55 -0
- package/build/tokens/components/light/date-picker.js +54 -0
- package/build/tokens/components/light/dialog.d.ts +25 -0
- package/build/tokens/components/light/dialog.js +24 -0
- package/build/tokens/components/light/divider.d.ts +8 -0
- package/build/tokens/components/light/divider.js +7 -0
- package/build/tokens/components/light/focus.d.ts +8 -0
- package/build/tokens/components/light/focus.js +7 -0
- package/build/tokens/components/light/footer.d.ts +12 -0
- package/build/tokens/components/light/footer.js +11 -0
- package/build/tokens/components/light/form-field.d.ts +10 -0
- package/build/tokens/components/light/form-field.js +9 -0
- package/build/tokens/components/light/icon-button.d.ts +39 -0
- package/build/tokens/components/light/icon-button.js +38 -0
- package/build/tokens/components/light/icon-container.d.ts +42 -0
- package/build/tokens/components/light/icon-container.js +41 -0
- package/build/tokens/components/light/icon.d.ts +15 -0
- package/build/tokens/components/light/icon.js +14 -0
- package/build/tokens/components/light/index.d.ts +43 -0
- package/build/tokens/components/light/index.js +43 -0
- package/build/tokens/components/light/inline-link.d.ts +14 -0
- package/build/tokens/components/light/inline-link.js +13 -0
- package/build/tokens/components/light/input.d.ts +42 -0
- package/build/tokens/components/light/input.js +41 -0
- package/build/tokens/components/light/link.d.ts +15 -0
- package/build/tokens/components/light/link.js +14 -0
- package/build/tokens/components/light/list.d.ts +45 -0
- package/build/tokens/components/light/list.js +44 -0
- package/build/tokens/components/light/menu.d.ts +46 -0
- package/build/tokens/components/light/menu.js +45 -0
- package/build/tokens/components/light/modal.d.ts +28 -0
- package/build/tokens/components/light/modal.js +27 -0
- package/build/tokens/components/light/navigation.d.ts +24 -0
- package/build/tokens/components/light/navigation.js +23 -0
- package/build/tokens/components/light/overlay.d.ts +8 -0
- package/build/tokens/components/light/overlay.js +7 -0
- package/build/tokens/components/light/parts.d.ts +23 -0
- package/build/tokens/components/light/parts.js +22 -0
- package/build/tokens/components/light/pill.d.ts +26 -0
- package/build/tokens/components/light/pill.js +25 -0
- package/build/tokens/components/light/progress-stepper.d.ts +32 -0
- package/build/tokens/components/light/progress-stepper.js +31 -0
- package/build/tokens/components/light/radio.d.ts +43 -0
- package/build/tokens/components/light/radio.js +42 -0
- package/build/tokens/components/light/segmented-control.d.ts +27 -0
- package/build/tokens/components/light/segmented-control.js +26 -0
- package/build/tokens/components/light/select.d.ts +55 -0
- package/build/tokens/components/light/select.js +54 -0
- package/build/tokens/components/light/skeleton.d.ts +7 -0
- package/build/tokens/components/light/skeleton.js +6 -0
- package/build/tokens/components/light/spinner.d.ts +24 -0
- package/build/tokens/components/light/spinner.js +23 -0
- package/build/tokens/components/light/switch.d.ts +35 -0
- package/build/tokens/components/light/switch.js +34 -0
- package/build/tokens/components/light/text.d.ts +11 -0
- package/build/tokens/components/light/text.js +10 -0
- package/build/tokens/components/light/toggle-button.d.ts +24 -0
- package/build/tokens/components/light/toggle-button.js +23 -0
- package/build/tokens/components/light/top-navigation.d.ts +26 -0
- package/build/tokens/components/light/top-navigation.js +25 -0
- package/build/tokens/font.d.ts +35 -0
- package/build/tokens/font.js +34 -0
- package/build/tokens/index.d.ts +17 -0
- package/build/tokens/index.js +17 -0
- package/build/tokens/layout.d.ts +162 -0
- package/build/tokens/layout.js +83 -0
- package/build/tokens/letter-spacing.d.ts +22 -0
- package/build/tokens/letter-spacing.js +21 -0
- package/build/tokens/line-height.d.ts +21 -0
- package/build/tokens/line-height.js +20 -0
- package/build/tokens/primitive.d.ts +105 -0
- package/build/tokens/primitive.js +104 -0
- package/build/tokens/semantic-dark.d.ts +25 -0
- package/build/tokens/semantic-dark.js +24 -0
- package/build/tokens/semantic-light.d.ts +25 -0
- package/build/tokens/semantic-light.js +24 -0
- package/build/tokens/shadow.d.ts +90 -0
- package/build/tokens/shadow.js +47 -0
- package/build/tokens/space.d.ts +24 -0
- package/build/tokens/space.js +23 -0
- package/build/tokens/typography.d.ts +516 -0
- package/build/tokens/typography.js +260 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.js +4 -0
- package/build/types/refs.d.ts +7 -0
- package/build/types/refs.js +1 -0
- package/build/types/states.d.ts +11 -0
- package/build/types/states.js +1 -0
- package/build/types/unistyles.d.ts +10 -0
- package/build/types/unistyles.js +1 -0
- package/build/types/values.d.ts +25 -0
- package/build/types/values.js +1 -0
- package/build/utils/coloursAsArray.d.ts +2 -0
- package/build/utils/coloursAsArray.js +12 -0
- package/build/utils/getFlattenedColorValue.d.ts +4 -0
- package/build/utils/getFlattenedColorValue.js +23 -0
- package/build/utils/getStyleValue.d.ts +2 -0
- package/build/utils/getStyleValue.js +8 -0
- package/build/utils/hasChildrenByDisplayName.d.ts +3 -0
- package/build/utils/hasChildrenByDisplayName.js +30 -0
- package/build/utils/index.d.ts +4 -0
- package/build/utils/index.js +4 -0
- package/build/utils/styleUtils.d.ts +21 -0
- package/build/utils/styleUtils.js +238 -0
- package/docs/all-components.mdx +19 -0
- package/docs/assets/react-native-pig.png +0 -0
- package/docs/components/AdvancedInputExample.tsx +39 -0
- package/docs/components/AdvancedRadioExample.tsx +126 -0
- package/docs/components/AllComponents.web.tsx +442 -0
- package/docs/components/BackToTopButton.tsx +58 -0
- package/docs/components/BadgeList.tsx +66 -0
- package/docs/components/DocComponentWrap.tsx +7 -0
- package/docs/components/NextPrevPage.tsx +62 -0
- package/docs/components/SwitchExample.tsx +13 -0
- package/docs/components/SwitchList.tsx +56 -0
- package/docs/components/UsageWrap.tsx +24 -0
- package/docs/components/VariantTitle.tsx +30 -0
- package/docs/components/ViewFigmaButton.tsx +43 -0
- package/docs/components/index.ts +11 -0
- package/docs/getting-started.mdx +50 -0
- package/docs/hooks.mdx +526 -0
- package/docs/introduction.mdx +173 -0
- package/docs/layout-components.docs.mdx +81 -0
- package/docs/llm-docs/unistyles-llms-full.txt +8537 -0
- package/docs/llm-docs/unistyles-llms-small.txt +247 -0
- package/docs/styling.mdx +883 -0
- package/docs/theme-tokens.mdx +524 -0
- package/eslint.config.js +30 -0
- package/figma.config.json +11 -0
- package/package.json +82 -0
- package/scripts/copyTokens.js +96 -0
- package/src/components/Accordion/Accordion.context.tsx +13 -0
- package/src/components/Accordion/Accordion.docs.mdx +306 -0
- package/src/components/Accordion/Accordion.props.ts +43 -0
- package/src/components/Accordion/Accordion.stories.tsx +118 -0
- package/src/components/Accordion/Accordion.tsx +127 -0
- package/src/components/Accordion/AccordionContent.tsx +44 -0
- package/src/components/Accordion/AccordionContentText.tsx +10 -0
- package/src/components/Accordion/AccordionHeader.tsx +18 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeading.props.ts +19 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeading.tsx +38 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingHelperText.tsx +22 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingTextContent.tsx +21 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingTitle.tsx +14 -0
- package/src/components/Accordion/AccordionHeading/index.ts +4 -0
- package/src/components/Accordion/AccordionIcon.tsx +11 -0
- package/src/components/Accordion/AccordionItem.context.tsx +11 -0
- package/src/components/Accordion/AccordionItem.props.ts +20 -0
- package/src/components/Accordion/AccordionItemRoot.tsx +27 -0
- package/src/components/Accordion/AccordionRoot.tsx +35 -0
- package/src/components/Accordion/AccordionTitleText.tsx +19 -0
- package/src/components/Accordion/AccordionTrigger.tsx +54 -0
- package/src/components/Accordion/index.ts +11 -0
- package/src/components/Alert/Alert.context.ts +8 -0
- package/src/components/Alert/Alert.docs.mdx +132 -0
- package/src/components/Alert/Alert.props.ts +67 -0
- package/src/components/Alert/Alert.stories.tsx +87 -0
- package/src/components/Alert/Alert.tsx +109 -0
- package/src/components/Alert/AlertCloseButton.tsx +26 -0
- package/src/components/Alert/AlertContent.tsx +22 -0
- package/src/components/Alert/AlertIcon.tsx +38 -0
- package/src/components/Alert/AlertIconButton.tsx +16 -0
- package/src/components/Alert/AlertLink.tsx +9 -0
- package/src/components/Alert/AlertText.tsx +14 -0
- package/src/components/Alert/AlertTitle.tsx +14 -0
- package/src/components/Alert/index.ts +8 -0
- package/src/components/Badge/Badge.context.ts +9 -0
- package/src/components/Badge/Badge.docs.mdx +101 -0
- package/src/components/Badge/Badge.figma.tsx +32 -0
- package/src/components/Badge/Badge.props.ts +11 -0
- package/src/components/Badge/Badge.stories.tsx +137 -0
- package/src/components/Badge/Badge.tsx +140 -0
- package/src/components/Badge/BadgeIcon.tsx +76 -0
- package/src/components/Badge/BadgeText.tsx +77 -0
- package/src/components/Badge/index.ts +3 -0
- package/src/components/BodyText/BodyText.docs.mdx +74 -0
- package/src/components/BodyText/BodyText.props.ts +24 -0
- package/src/components/BodyText/BodyText.stories.tsx +141 -0
- package/src/components/BodyText/BodyText.tsx +129 -0
- package/src/components/BodyText/index.ts +1 -0
- package/src/components/BottomSheet/BottomSheet.context.ts +12 -0
- package/src/components/BottomSheet/BottomSheet.docs.mdx +172 -0
- package/src/components/BottomSheet/BottomSheet.props.ts +49 -0
- package/src/components/BottomSheet/BottomSheet.stories.tsx +335 -0
- package/src/components/BottomSheet/BottomSheet.tsx +64 -0
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +30 -0
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +53 -0
- package/src/components/BottomSheet/BottomSheetHandle.tsx +37 -0
- package/src/components/BottomSheet/BottomSheetModal.tsx +62 -0
- package/src/components/BottomSheet/BottomSheetScrollView.tsx +56 -0
- package/src/components/BottomSheet/BottomSheetView.tsx +52 -0
- package/src/components/BottomSheet/index.ts +17 -0
- package/src/components/BottomSheet/useBottomSheetLogic.tsx +53 -0
- package/src/components/Box/Box.docs.mdx +75 -0
- package/src/components/Box/Box.props.ts +234 -0
- package/src/components/Box/Box.stories.tsx +70 -0
- package/src/components/Box/Box.tsx +78 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Button/Button.context.ts +13 -0
- package/src/components/Button/Button.docs.mdx +288 -0
- package/src/components/Button/Button.figma.tsx +229 -0
- package/src/components/Button/Button.props.tsx +84 -0
- package/src/components/Button/Button.stories.tsx +257 -0
- package/src/components/Button/Button.tsx +83 -0
- package/src/components/Button/ButtonGroup.context.ts +5 -0
- package/src/components/Button/ButtonGroup.tsx +25 -0
- package/src/components/Button/ButtonGroupRoot.tsx +70 -0
- package/src/components/Button/ButtonIcon.tsx +140 -0
- package/src/components/Button/ButtonRoot.tsx +452 -0
- package/src/components/Button/ButtonSpinner.tsx +63 -0
- package/src/components/Button/ButtonText.tsx +117 -0
- package/src/components/Button/index.ts +3 -0
- package/src/components/Card/Card.context.ts +12 -0
- package/src/components/Card/Card.docs.mdx +107 -0
- package/src/components/Card/Card.figma.tsx +73 -0
- package/src/components/Card/Card.props.ts +28 -0
- package/src/components/Card/Card.stories.tsx +235 -0
- package/src/components/Card/Card.tsx +10 -0
- package/src/components/Card/CardAction.context.ts +12 -0
- package/src/components/Card/CardAction.tsx +18 -0
- package/src/components/Card/CardRoot.tsx +288 -0
- package/src/components/Card/index.ts +4 -0
- package/src/components/Center/Center.docs.mdx +39 -0
- package/src/components/Center/Center.stories.tsx +30 -0
- package/src/components/Center/Center.tsx +12 -0
- package/src/components/Center/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.context.ts +9 -0
- package/src/components/Checkbox/Checkbox.docs.mdx +371 -0
- package/src/components/Checkbox/Checkbox.figma.tsx +44 -0
- package/src/components/Checkbox/Checkbox.props.ts +43 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +149 -0
- package/src/components/Checkbox/Checkbox.tsx +101 -0
- package/src/components/Checkbox/CheckboxGroup.context.ts +9 -0
- package/src/components/Checkbox/CheckboxGroup.props.ts +22 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +82 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +110 -0
- package/src/components/Checkbox/CheckboxGroupRoot.tsx +36 -0
- package/src/components/Checkbox/CheckboxGroupTextContent.tsx +14 -0
- package/src/components/Checkbox/CheckboxIcon.tsx +29 -0
- package/src/components/Checkbox/CheckboxIndicator.figma.tsx +19 -0
- package/src/components/Checkbox/CheckboxIndicator.tsx +63 -0
- package/src/components/Checkbox/CheckboxLabel.tsx +14 -0
- package/src/components/Checkbox/CheckboxRoot.tsx +64 -0
- package/src/components/Checkbox/CheckboxTextContent.tsx +14 -0
- package/src/components/Checkbox/CheckboxTileRoot.tsx +39 -0
- package/src/components/Checkbox/index.ts +11 -0
- package/src/components/DetailText/DetailText.docs.mdx +73 -0
- package/src/components/DetailText/DetailText.props.ts +21 -0
- package/src/components/DetailText/DetailText.stories.tsx +149 -0
- package/src/components/DetailText/DetailText.tsx +148 -0
- package/src/components/DetailText/index.ts +1 -0
- package/src/components/Divider/Divider.docs.mdx +64 -0
- package/src/components/Divider/Divider.figma.tsx +20 -0
- package/src/components/Divider/Divider.props.ts +13 -0
- package/src/components/Divider/Divider.stories.tsx +60 -0
- package/src/components/Divider/Divider.tsx +193 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Flex/Flex.docs.mdx +60 -0
- package/src/components/Flex/Flex.props.ts +11 -0
- package/src/components/Flex/Flex.stories.tsx +78 -0
- package/src/components/Flex/Flex.tsx +42 -0
- package/src/components/Flex/index.ts +1 -0
- package/src/components/FormField/FormFielInvalidIcon.tsx +11 -0
- package/src/components/FormField/FormField.context.ts +6 -0
- package/src/components/FormField/FormField.docs.mdx +330 -0
- package/src/components/FormField/FormField.props.ts +18 -0
- package/src/components/FormField/FormField.stories.tsx +128 -0
- package/src/components/FormField/FormField.tsx +88 -0
- package/src/components/FormField/FormFieldHelper.tsx +23 -0
- package/src/components/FormField/FormFieldInvalid.tsx +33 -0
- package/src/components/FormField/FormFieldLabel.tsx +12 -0
- package/src/components/FormField/FormFieldRoot.tsx +21 -0
- package/src/components/FormField/FormFieldValid.tsx +33 -0
- package/src/components/FormField/FormFieldValidIcon.tsx +11 -0
- package/src/components/FormField/index.ts +16 -0
- package/src/components/Grid/Grid.docs.mdx +194 -0
- package/src/components/Grid/Grid.props.ts +56 -0
- package/src/components/Grid/Grid.stories.tsx +199 -0
- package/src/components/Grid/Grid.tsx +145 -0
- package/src/components/Grid/index.ts +2 -0
- package/src/components/HTMLElements/ListItem.tsx +25 -0
- package/src/components/HTMLElements/Lists.docs.mdx +104 -0
- package/src/components/HTMLElements/OrderedList.stories.tsx +55 -0
- package/src/components/HTMLElements/OrderedList.tsx +47 -0
- package/src/components/HTMLElements/UnorderedList.stories.tsx +52 -0
- package/src/components/HTMLElements/UnorderedList.tsx +45 -0
- package/src/components/HTMLElements/index.ts +3 -0
- package/src/components/Heading/Heading.docs.mdx +62 -0
- package/src/components/Heading/Heading.props.ts +20 -0
- package/src/components/Heading/Heading.stories.tsx +127 -0
- package/src/components/Heading/Heading.tsx +170 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/Helper/Helper.props.ts +24 -0
- package/src/components/Helper/Helper.tsx +66 -0
- package/src/components/Helper/HelperContext.ts +6 -0
- package/src/components/Helper/HelperIcon.tsx +43 -0
- package/src/components/Helper/HelperText.tsx +45 -0
- package/src/components/Helper/index.ts +3 -0
- package/src/components/Icon/Icon.docs.mdx +104 -0
- package/src/components/Icon/Icon.props.ts +17 -0
- package/src/components/Icon/Icon.stories.tsx +43 -0
- package/src/components/Icon/Icon.tsx +51 -0
- package/src/components/Icon/index.tsx +2 -0
- package/src/components/IconButton/IconButton.context.ts +13 -0
- package/src/components/IconButton/IconButton.docs.mdx +73 -0
- package/src/components/IconButton/IconButton.figma.tsx +161 -0
- package/src/components/IconButton/IconButton.props.ts +26 -0
- package/src/components/IconButton/IconButton.stories.tsx +215 -0
- package/src/components/IconButton/IconButton.tsx +37 -0
- package/src/components/IconButton/IconButtonIcon.tsx +155 -0
- package/src/components/IconButton/IconButtonRoot.tsx +419 -0
- package/src/components/IconButton/IconButtonSpinner.tsx +71 -0
- package/src/components/IconButton/index.tsx +2 -0
- package/src/components/Icons/CircleIcon.tsx +23 -0
- package/src/components/Icons/index.ts +1 -0
- package/src/components/InlineLink/InlineLink.context.ts +10 -0
- package/src/components/InlineLink/InlineLink.docs.mdx +64 -0
- package/src/components/InlineLink/InlineLink.props.ts +10 -0
- package/src/components/InlineLink/InlineLink.stories.tsx +91 -0
- package/src/components/InlineLink/InlineLink.tsx +26 -0
- package/src/components/InlineLink/InlineLinkRoot.tsx +87 -0
- package/src/components/InlineLink/index.ts +3 -0
- package/src/components/Input/Input.context.ts +6 -0
- package/src/components/Input/Input.docs.mdx +243 -0
- package/src/components/Input/Input.figma.tsx +115 -0
- package/src/components/Input/Input.props.ts +122 -0
- package/src/components/Input/Input.stories.tsx +159 -0
- package/src/components/Input/Input.tsx +182 -0
- package/src/components/Input/InputField.tsx +110 -0
- package/src/components/Input/InputIcon.tsx +29 -0
- package/src/components/Input/InputRoot.tsx +89 -0
- package/src/components/Input/InputSlot.tsx +21 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Label/Label.props.ts +8 -0
- package/src/components/Label/Label.tsx +34 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.context.ts +10 -0
- package/src/components/Link/Link.docs.mdx +51 -0
- package/src/components/Link/Link.props.ts +15 -0
- package/src/components/Link/Link.stories.tsx +75 -0
- package/src/components/Link/Link.tsx +38 -0
- package/src/components/Link/LinkIcon.tsx +59 -0
- package/src/components/Link/LinkRoot.tsx +65 -0
- package/src/components/Link/LinkText.tsx +59 -0
- package/src/components/Link/index.ts +4 -0
- package/src/components/List/List.context.ts +15 -0
- package/src/components/List/List.docs.mdx +440 -0
- package/src/components/List/List.figma.tsx +110 -0
- package/src/components/List/List.props.ts +21 -0
- package/src/components/List/List.stories.tsx +183 -0
- package/src/components/List/List.tsx +121 -0
- package/src/components/List/ListHeading/ListHeading.figma.tsx +17 -0
- package/src/components/List/ListHeading/ListHeading.props.ts +38 -0
- package/src/components/List/ListHeading/ListHeading.tsx +64 -0
- package/src/components/List/ListHeading/ListHeadingHelperText.tsx +21 -0
- package/src/components/List/ListHeading/ListHeadingTextContent.tsx +21 -0
- package/src/components/List/ListHeading/ListHeadingTitle.tsx +14 -0
- package/src/components/List/ListHeading/index.ts +4 -0
- package/src/components/List/ListItem/ListItem.context.ts +11 -0
- package/src/components/List/ListItem/ListItem.figma.tsx +220 -0
- package/src/components/List/ListItem/ListItem.props.ts +31 -0
- package/src/components/List/ListItem/ListItem.tsx +10 -0
- package/src/components/List/ListItem/ListItemContent.tsx +21 -0
- package/src/components/List/ListItem/ListItemHelperText.tsx +21 -0
- package/src/components/List/ListItem/ListItemIcon.tsx +31 -0
- package/src/components/List/ListItem/ListItemLeadingContent.tsx +9 -0
- package/src/components/List/ListItem/ListItemRoot.tsx +193 -0
- package/src/components/List/ListItem/ListItemText.tsx +14 -0
- package/src/components/List/ListItem/ListItemTrailingContent.tsx +9 -0
- package/src/components/List/ListItem/ListItemTrailingIcon.tsx +32 -0
- package/src/components/List/ListItem/index.ts +9 -0
- package/src/components/List/index.ts +4 -0
- package/src/components/Radio/Radio.context.ts +9 -0
- package/src/components/Radio/Radio.docs.mdx +366 -0
- package/src/components/Radio/Radio.figma.tsx +45 -0
- package/src/components/Radio/Radio.props.ts +34 -0
- package/src/components/Radio/Radio.stories.tsx +157 -0
- package/src/components/Radio/Radio.tsx +94 -0
- package/src/components/Radio/RadioGroup.context.ts +9 -0
- package/src/components/Radio/RadioGroup.props.ts +22 -0
- package/src/components/Radio/RadioGroup.stories.tsx +107 -0
- package/src/components/Radio/RadioGroup.tsx +108 -0
- package/src/components/Radio/RadioGroupRoot.tsx +36 -0
- package/src/components/Radio/RadioGroupTextContent.tsx +14 -0
- package/src/components/Radio/RadioIcon.tsx +32 -0
- package/src/components/Radio/RadioIndicator.figma.tsx +21 -0
- package/src/components/Radio/RadioIndicator.tsx +63 -0
- package/src/components/Radio/RadioLabel.tsx +14 -0
- package/src/components/Radio/RadioRoot.tsx +65 -0
- package/src/components/Radio/RadioTextContent.tsx +14 -0
- package/src/components/Radio/RadioTileRoot.tsx +38 -0
- package/src/components/Radio/index.ts +5 -0
- package/src/components/RadioCard/RadioCard.context.ts +8 -0
- package/src/components/RadioCard/RadioCard.docs.mdx +125 -0
- package/src/components/RadioCard/RadioCard.props.ts +18 -0
- package/src/components/RadioCard/RadioCard.stories.tsx +45 -0
- package/src/components/RadioCard/RadioCard.tsx +56 -0
- package/src/components/RadioCard/RadioCardGroup.props.ts +36 -0
- package/src/components/RadioCard/RadioCardGroup.stories.tsx +70 -0
- package/src/components/RadioCard/RadioCardGroup.tsx +48 -0
- package/src/components/RadioCard/RadioCardIcon.tsx +32 -0
- package/src/components/RadioCard/RadioCardIndicator.tsx +63 -0
- package/src/components/RadioCard/RadioCardLabel.tsx +8 -0
- package/src/components/RadioCard/RadioCardRoot.tsx +70 -0
- package/src/components/RadioCard/index.ts +8 -0
- package/src/components/Select/Select.context.ts +15 -0
- package/src/components/Select/Select.docs.mdx +218 -0
- package/src/components/Select/Select.props.ts +131 -0
- package/src/components/Select/Select.stories.tsx +290 -0
- package/src/components/Select/Select.tsx +295 -0
- package/src/components/Select/SelectOption.tsx +107 -0
- package/src/components/Select/index.ts +7 -0
- package/src/components/Skeleton/Skeleton.docs.mdx +38 -0
- package/src/components/Skeleton/Skeleton.props.ts +11 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +33 -0
- package/src/components/Skeleton/Skeleton.tsx +77 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Spinner/Spinner.docs.mdx +62 -0
- package/src/components/Spinner/Spinner.figma.tsx +19 -0
- package/src/components/Spinner/Spinner.props.ts +10 -0
- package/src/components/Spinner/Spinner.stories.tsx +56 -0
- package/src/components/Spinner/Spinner.tsx +157 -0
- package/src/components/Spinner/Spinner.web.tsx +149 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Switch/Switch.docs.mdx +176 -0
- package/src/components/Switch/Switch.figma.tsx +29 -0
- package/src/components/Switch/Switch.props.ts +10 -0
- package/src/components/Switch/Switch.stories.tsx +80 -0
- package/src/components/Switch/Switch.tsx +201 -0
- package/src/components/Switch/Switch.web.tsx +208 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Textarea/Textarea.context.ts +6 -0
- package/src/components/Textarea/Textarea.docs.mdx +110 -0
- package/src/components/Textarea/Textarea.props.ts +46 -0
- package/src/components/Textarea/Textarea.stories.tsx +51 -0
- package/src/components/Textarea/Textarea.tsx +47 -0
- package/src/components/Textarea/TextareaField.tsx +45 -0
- package/src/components/Textarea/TextareaRoot.tsx +79 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/ToggleButton/ToggleButton.props.tsx +7 -0
- package/src/components/ToggleButton/ToggleButton.stories.tsx +35 -0
- package/src/components/ToggleButton/ToggleButton.tsx +32 -0
- package/src/components/ToggleButton/ToggleButtonIcon.tsx +46 -0
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +100 -0
- package/src/components/ToggleButton/ToggleButtonText.tsx +29 -0
- package/src/components/ToggleButton/index.ts +2 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.context.ts +8 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.docs.mdx +146 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.props.ts +17 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.stories.tsx +45 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.tsx +32 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.props.ts +34 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.stories.tsx +85 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.tsx +48 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +97 -0
- package/src/components/ToggleButtonCard/index.ts +2 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.context.ts +11 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +32 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.stories.tsx +96 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.tsx +50 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +73 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +57 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonSpinner.tsx +39 -0
- package/src/components/UnstyledIconButton/index.tsx +2 -0
- package/src/components/index.ts +48 -0
- package/src/core/breakpoints.ts +10 -0
- package/src/core/index.ts +35 -0
- package/src/core/themes.ts +266 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useBreakpointValue.ts +62 -0
- package/src/hooks/useColorMode.ts +21 -0
- package/src/hooks/useMedia.ts +31 -0
- package/src/hooks/useStyleProps.ts +60 -0
- package/src/hooks/useTheme.ts +8 -0
- package/src/hooks/useToken.ts +40 -0
- package/src/index.ts +4 -0
- package/src/tokens/README.md +7 -0
- package/src/tokens/border-radius.ts +13 -0
- package/src/tokens/border-width.ts +8 -0
- package/src/tokens/color.ts +285 -0
- package/src/tokens/components/dark/accordion.ts +29 -0
- package/src/tokens/components/dark/alert.ts +27 -0
- package/src/tokens/components/dark/badge.ts +51 -0
- package/src/tokens/components/dark/banner.ts +43 -0
- package/src/tokens/components/dark/bottom-navigation.ts +35 -0
- package/src/tokens/components/dark/bottom-sheet.ts +17 -0
- package/src/tokens/components/dark/breadcrumb.ts +8 -0
- package/src/tokens/components/dark/button.ts +104 -0
- package/src/tokens/components/dark/card.ts +63 -0
- package/src/tokens/components/dark/carousel-control.ts +19 -0
- package/src/tokens/components/dark/checkbox.ts +45 -0
- package/src/tokens/components/dark/date-picker.ts +55 -0
- package/src/tokens/components/dark/dialog.ts +25 -0
- package/src/tokens/components/dark/divider.ts +8 -0
- package/src/tokens/components/dark/focus.ts +8 -0
- package/src/tokens/components/dark/footer.ts +12 -0
- package/src/tokens/components/dark/form-field.ts +10 -0
- package/src/tokens/components/dark/icon-button.ts +39 -0
- package/src/tokens/components/dark/icon-container.ts +42 -0
- package/src/tokens/components/dark/icon.ts +15 -0
- package/src/tokens/components/dark/index.ts +44 -0
- package/src/tokens/components/dark/inline-link.ts +14 -0
- package/src/tokens/components/dark/input.ts +42 -0
- package/src/tokens/components/dark/link.ts +15 -0
- package/src/tokens/components/dark/list.ts +45 -0
- package/src/tokens/components/dark/menu.ts +46 -0
- package/src/tokens/components/dark/modal.ts +28 -0
- package/src/tokens/components/dark/navigation.ts +24 -0
- package/src/tokens/components/dark/overlay.ts +8 -0
- package/src/tokens/components/dark/parts.ts +23 -0
- package/src/tokens/components/dark/pill.ts +26 -0
- package/src/tokens/components/dark/progress-stepper.ts +32 -0
- package/src/tokens/components/dark/radio.ts +43 -0
- package/src/tokens/components/dark/segmented-control.ts +27 -0
- package/src/tokens/components/dark/select.ts +55 -0
- package/src/tokens/components/dark/skeleton.ts +7 -0
- package/src/tokens/components/dark/spinner.ts +24 -0
- package/src/tokens/components/dark/switch.ts +35 -0
- package/src/tokens/components/dark/text.ts +11 -0
- package/src/tokens/components/dark/toggle-button.ts +24 -0
- package/src/tokens/components/dark/top-navigation.ts +26 -0
- package/src/tokens/components/index.ts +6 -0
- package/src/tokens/components/light/accordion.ts +29 -0
- package/src/tokens/components/light/alert.ts +27 -0
- package/src/tokens/components/light/badge.ts +51 -0
- package/src/tokens/components/light/banner.ts +43 -0
- package/src/tokens/components/light/bottom-navigation.ts +35 -0
- package/src/tokens/components/light/bottom-sheet.ts +17 -0
- package/src/tokens/components/light/breadcrumb.ts +8 -0
- package/src/tokens/components/light/button.ts +104 -0
- package/src/tokens/components/light/card.ts +63 -0
- package/src/tokens/components/light/carousel-control.ts +19 -0
- package/src/tokens/components/light/checkbox.ts +45 -0
- package/src/tokens/components/light/date-picker.ts +55 -0
- package/src/tokens/components/light/dialog.ts +25 -0
- package/src/tokens/components/light/divider.ts +8 -0
- package/src/tokens/components/light/focus.ts +8 -0
- package/src/tokens/components/light/footer.ts +12 -0
- package/src/tokens/components/light/form-field.ts +10 -0
- package/src/tokens/components/light/icon-button.ts +39 -0
- package/src/tokens/components/light/icon-container.ts +42 -0
- package/src/tokens/components/light/icon.ts +15 -0
- package/src/tokens/components/light/index.ts +44 -0
- package/src/tokens/components/light/inline-link.ts +14 -0
- package/src/tokens/components/light/input.ts +42 -0
- package/src/tokens/components/light/link.ts +15 -0
- package/src/tokens/components/light/list.ts +45 -0
- package/src/tokens/components/light/menu.ts +46 -0
- package/src/tokens/components/light/modal.ts +28 -0
- package/src/tokens/components/light/navigation.ts +24 -0
- package/src/tokens/components/light/overlay.ts +8 -0
- package/src/tokens/components/light/parts.ts +23 -0
- package/src/tokens/components/light/pill.ts +26 -0
- package/src/tokens/components/light/progress-stepper.ts +32 -0
- package/src/tokens/components/light/radio.ts +43 -0
- package/src/tokens/components/light/segmented-control.ts +27 -0
- package/src/tokens/components/light/select.ts +55 -0
- package/src/tokens/components/light/skeleton.ts +7 -0
- package/src/tokens/components/light/spinner.ts +24 -0
- package/src/tokens/components/light/switch.ts +35 -0
- package/src/tokens/components/light/text.ts +11 -0
- package/src/tokens/components/light/toggle-button.ts +24 -0
- package/src/tokens/components/light/top-navigation.ts +26 -0
- package/src/tokens/font.ts +35 -0
- package/src/tokens/index.ts +18 -0
- package/src/tokens/layout.ts +88 -0
- package/src/tokens/letter-spacing.ts +22 -0
- package/src/tokens/line-height.ts +21 -0
- package/src/tokens/primitive.ts +105 -0
- package/src/tokens/semantic-dark.ts +25 -0
- package/src/tokens/semantic-light.ts +25 -0
- package/src/tokens/shadow.ts +52 -0
- package/src/tokens/space.ts +24 -0
- package/src/tokens/typography.ts +265 -0
- package/src/types/index.ts +4 -0
- package/src/types/refs.ts +8 -0
- package/src/types/states.ts +11 -0
- package/src/types/unistyles.ts +12 -0
- package/src/types/values.ts +60 -0
- package/src/utils/coloursAsArray.ts +17 -0
- package/src/utils/getFlattenedColorValue.ts +32 -0
- package/src/utils/getStyleValue.ts +12 -0
- package/src/utils/hasChildrenByDisplayName.ts +43 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/styleUtils.ts +252 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +41 -0
- package/vercel.json +21 -0
- package/vitest.config.js +37 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import { Text } from 'react-native';
|
|
2
|
+
import type BodyTextProps from './BodyText.props';
|
|
3
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
4
|
+
|
|
5
|
+
import { getFlattenedColorValue } from '../../utils';
|
|
6
|
+
|
|
7
|
+
const BodyText = ({
|
|
8
|
+
children,
|
|
9
|
+
color,
|
|
10
|
+
size = 'md',
|
|
11
|
+
truncated,
|
|
12
|
+
weight = 'regular',
|
|
13
|
+
underline,
|
|
14
|
+
strikeThrough,
|
|
15
|
+
italic,
|
|
16
|
+
textTransform,
|
|
17
|
+
textAlign,
|
|
18
|
+
textAlignVertical,
|
|
19
|
+
textDecorationColor,
|
|
20
|
+
textDecorationLine,
|
|
21
|
+
textDecorationStyle,
|
|
22
|
+
userSelect,
|
|
23
|
+
inverted,
|
|
24
|
+
...props
|
|
25
|
+
}: BodyTextProps) => {
|
|
26
|
+
styles.useVariants({
|
|
27
|
+
size,
|
|
28
|
+
weight,
|
|
29
|
+
underline,
|
|
30
|
+
strikeThrough,
|
|
31
|
+
italic,
|
|
32
|
+
inverted,
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
return (
|
|
36
|
+
<Text
|
|
37
|
+
{...props}
|
|
38
|
+
{...(truncated
|
|
39
|
+
? {
|
|
40
|
+
numberOfLines: 1,
|
|
41
|
+
ellipsizeMode: 'tail',
|
|
42
|
+
}
|
|
43
|
+
: {})}
|
|
44
|
+
style={[
|
|
45
|
+
styles.text,
|
|
46
|
+
styles.getColours(color, textDecorationColor),
|
|
47
|
+
{
|
|
48
|
+
...(textTransform && { textTransform }),
|
|
49
|
+
...(textAlign && { textAlign }),
|
|
50
|
+
|
|
51
|
+
...(textDecorationLine && { textDecorationLine }),
|
|
52
|
+
...(textDecorationStyle && { textDecorationStyle }),
|
|
53
|
+
...(userSelect && { userSelect }),
|
|
54
|
+
...(textAlignVertical && { textAlignVertical }),
|
|
55
|
+
},
|
|
56
|
+
props.style,
|
|
57
|
+
]}
|
|
58
|
+
>
|
|
59
|
+
{children}
|
|
60
|
+
</Text>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
BodyText.displayName = 'BodyText';
|
|
65
|
+
|
|
66
|
+
const styles = StyleSheet.create(theme => ({
|
|
67
|
+
text: {
|
|
68
|
+
color: theme.components.text.color,
|
|
69
|
+
fontFamily: theme.typography.mobile.bodyText.fontFamily,
|
|
70
|
+
fontStyle: 'normal',
|
|
71
|
+
variants: {
|
|
72
|
+
size: {
|
|
73
|
+
lg: {
|
|
74
|
+
fontSize: theme.typography.mobile.bodyText.lg.fontSize,
|
|
75
|
+
lineHeight: theme.typography.mobile.bodyText.lg.lineHeight,
|
|
76
|
+
},
|
|
77
|
+
md: {
|
|
78
|
+
fontSize: theme.typography.mobile.bodyText.md.fontSize,
|
|
79
|
+
lineHeight: theme.typography.mobile.bodyText.md.lineHeight,
|
|
80
|
+
},
|
|
81
|
+
sm: {
|
|
82
|
+
fontSize: theme.typography.mobile.bodyText.sm.fontSize,
|
|
83
|
+
lineHeight: theme.typography.mobile.bodyText.sm.lineHeight,
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
weight: {
|
|
87
|
+
regular: {
|
|
88
|
+
fontWeight: theme.fontWeight.regular,
|
|
89
|
+
},
|
|
90
|
+
semibold: {
|
|
91
|
+
fontWeight: theme.fontWeight.semibold,
|
|
92
|
+
},
|
|
93
|
+
bold: {
|
|
94
|
+
fontWeight: theme.fontWeight.bold,
|
|
95
|
+
},
|
|
96
|
+
},
|
|
97
|
+
underline: {
|
|
98
|
+
true: {
|
|
99
|
+
textDecorationLine: 'underline',
|
|
100
|
+
},
|
|
101
|
+
},
|
|
102
|
+
strikeThrough: {
|
|
103
|
+
true: {
|
|
104
|
+
textDecorationLine: 'line-through',
|
|
105
|
+
},
|
|
106
|
+
},
|
|
107
|
+
italic: {
|
|
108
|
+
true: {
|
|
109
|
+
fontStyle: 'italic',
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
inverted: {
|
|
113
|
+
true: {
|
|
114
|
+
color: theme.components.text.colorInverted,
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
},
|
|
118
|
+
},
|
|
119
|
+
getColours: (color, textDecorationColor) => ({
|
|
120
|
+
...(color ? { color: getFlattenedColorValue(color, theme.color) } : {}),
|
|
121
|
+
...(textDecorationColor
|
|
122
|
+
? { textDecorationColor: getFlattenedColorValue(textDecorationColor, theme.color) }
|
|
123
|
+
: {}),
|
|
124
|
+
}),
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
BodyText.displayName = 'BodyText';
|
|
128
|
+
|
|
129
|
+
export default BodyText;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as BodyText } from './BodyText';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
|
|
3
|
+
interface BottomSheetContextProps {
|
|
4
|
+
handle?: boolean;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
export const BottomSheetContext = createContext<BottomSheetContextProps>({});
|
|
8
|
+
|
|
9
|
+
export const useBottomSheetContext = (): BottomSheetContextProps => {
|
|
10
|
+
const context = useContext(BottomSheetContext);
|
|
11
|
+
return context;
|
|
12
|
+
};
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as Stories from './BottomSheet.stories';
|
|
3
|
+
import {
|
|
4
|
+
Box,
|
|
5
|
+
BottomSheet,
|
|
6
|
+
BottomSheetModal,
|
|
7
|
+
BottomSheetScrollView,
|
|
8
|
+
BottomSheetView,
|
|
9
|
+
Button,
|
|
10
|
+
Center,
|
|
11
|
+
BodyText,
|
|
12
|
+
} from '../../';
|
|
13
|
+
import { UsageWrap, BackToTopButton, ViewFigmaButton } from '../../../docs/components';
|
|
14
|
+
|
|
15
|
+
<Meta title="Components / Bottom Sheet" />
|
|
16
|
+
|
|
17
|
+
<ViewFigmaButton url="https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components---Tokens?node-id=4084-33370" />
|
|
18
|
+
|
|
19
|
+
<BackToTopButton />
|
|
20
|
+
|
|
21
|
+
# Bottom Sheet
|
|
22
|
+
|
|
23
|
+
The `BottomSheet` component provides a drawer-like interface that slides up from the bottom of the screen. It's commonly used for displaying additional content or actions without navigating away from the current screen.
|
|
24
|
+
|
|
25
|
+
> **Important:** For most use cases, we recommend using the `BottomSheetModal` component instead of `BottomSheet`. The modal version appears over the page content, whereas the standard `BottomSheet` is rendered inline with other page content.
|
|
26
|
+
|
|
27
|
+
- [Playground](#playground)
|
|
28
|
+
- [Usage](#usage)
|
|
29
|
+
- [Props](#props)
|
|
30
|
+
- [Components](#components)
|
|
31
|
+
- [`BottomSheetModal`](#bottomsheetmodal)
|
|
32
|
+
- [`BottomSheetScrollView`](#bottomsheetscrollview)
|
|
33
|
+
- [`BottomSheetModalProvider`](#bottomsheetmodalprovider)
|
|
34
|
+
|
|
35
|
+
## Playground
|
|
36
|
+
|
|
37
|
+
<Canvas of={Stories.Playground} />
|
|
38
|
+
|
|
39
|
+
<Controls of={Stories.Playground} />
|
|
40
|
+
|
|
41
|
+
## Usage
|
|
42
|
+
|
|
43
|
+
### Basic Usage
|
|
44
|
+
|
|
45
|
+
<UsageWrap>
|
|
46
|
+
<Center>
|
|
47
|
+
<Button onPress={() => {}}>Open Bottom Sheet</Button>
|
|
48
|
+
</Center>
|
|
49
|
+
</UsageWrap>
|
|
50
|
+
|
|
51
|
+
```tsx
|
|
52
|
+
import { useRef, useCallback } from 'react';
|
|
53
|
+
import {
|
|
54
|
+
BottomSheetModal,
|
|
55
|
+
BottomSheetView,
|
|
56
|
+
Button,
|
|
57
|
+
Box,
|
|
58
|
+
BodyText,
|
|
59
|
+
} from '@utilitywarehouse/hearth-react-native';
|
|
60
|
+
|
|
61
|
+
const MyComponent = () => {
|
|
62
|
+
const bottomSheetRef = useRef(null);
|
|
63
|
+
|
|
64
|
+
const handleOpenPress = useCallback(() => {
|
|
65
|
+
bottomSheetRef.current?.present();
|
|
66
|
+
}, []);
|
|
67
|
+
|
|
68
|
+
return (
|
|
69
|
+
<>
|
|
70
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
71
|
+
|
|
72
|
+
<BottomSheetModal ref={bottomSheetRef} snapPoints={['25%', '50%']}>
|
|
73
|
+
<BottomSheetView>
|
|
74
|
+
<Box gap="200" padding="100">
|
|
75
|
+
<BodyText>This is a bottom sheet modal that appears over your content.</BodyText>
|
|
76
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
77
|
+
</Box>
|
|
78
|
+
</BottomSheetView>
|
|
79
|
+
</BottomSheetModal>
|
|
80
|
+
</>
|
|
81
|
+
);
|
|
82
|
+
};
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
## Props
|
|
86
|
+
|
|
87
|
+
The BottomSheet component is built on top of [react-native-bottom-sheet](https://gorhom.dev/react-native-bottom-sheet/), and accepts all of its props, plus the following additional props:
|
|
88
|
+
|
|
89
|
+
| Property | Type | Description | Default |
|
|
90
|
+
| --------------------------- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------- | --------------- |
|
|
91
|
+
| children | `ReactNode` | The content to display within the bottom sheet | - |
|
|
92
|
+
| backdrop | `boolean \| React.FC<BottomSheetBackdropProps>` | Whether to show a backdrop overlay when the sheet is open or provide a custom backdrop component | `true` |
|
|
93
|
+
| showHandle | `boolea` | Whether to show the handle at the top of the sheet | `true` |
|
|
94
|
+
| containerStyle | `ViewStyle` | Style for the bottom sheet container | - |
|
|
95
|
+
| handleStyle | `ViewStyle` | Style for the bottom sheet handle | - |
|
|
96
|
+
| contentStyle | `ViewStyle` | Style for the bottom sheet content container | - |
|
|
97
|
+
| snapPoints | `(string \| number)[]` | Points for the bottom sheet to snap to, specified as an array of percentages (e.g., ['25%', '50%']) or numbers | `[]` |
|
|
98
|
+
| index | `number` | The initial snap point index | `-1` (closed) |
|
|
99
|
+
| enablePanDownToClose | `boolean` | Whether to allow swiping down to close the sheet | `true` |
|
|
100
|
+
| onChange | `(index: number) => void` | Callback when the sheet changes position | - |
|
|
101
|
+
| enableContentPanningGesture | `boolean` | Whether to allow panning gestures on the content | `true` |
|
|
102
|
+
| enableHandlePanningGesture | `boolean` | Whether to allow panning gestures on the handle | `true` |
|
|
103
|
+
| keyboardBehavior | `'interactive' \| 'extend' \| 'fillParent'` | Defines how the bottom sheet interacts with the keyboard | `'interactive'` |
|
|
104
|
+
| animateOnMount | `boolean` | Whether to animate on mounting | `false` |
|
|
105
|
+
|
|
106
|
+
For a comprehensive list of props, refer to the [official documentation](https://gorhom.github.io/react-native-bottom-sheet/props).
|
|
107
|
+
|
|
108
|
+
## Components
|
|
109
|
+
|
|
110
|
+
### `BottomSheetModal`
|
|
111
|
+
|
|
112
|
+
The `BottomSheetModal` component is the recommended way to use bottom sheets in most applications. It appears over the current content rather than being rendered inline.
|
|
113
|
+
|
|
114
|
+
```tsx
|
|
115
|
+
import { BottomSheetModal } from '@utilitywarehouse/hearth-react-native';
|
|
116
|
+
|
|
117
|
+
// See usage example above
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
**Important:** When using `BottomSheetModal`, you need to wrap your app with `BottomSheetModalProvider`:
|
|
121
|
+
|
|
122
|
+
```tsx
|
|
123
|
+
import { BottomSheetModalProvider } from '@utilitywarehouse/hearth-react-native';
|
|
124
|
+
|
|
125
|
+
const App = () => {
|
|
126
|
+
return <BottomSheetModalProvider>{/* Your app content */}</BottomSheetModalProvider>;
|
|
127
|
+
};
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### `BottomSheetScrollView`
|
|
131
|
+
|
|
132
|
+
For scrollable content within a bottom sheet, use the `BottomSheetScrollView` component instead of the standard ScrollView:
|
|
133
|
+
|
|
134
|
+
```tsx
|
|
135
|
+
import {
|
|
136
|
+
BottomSheetModal,
|
|
137
|
+
BottomSheetScrollView,
|
|
138
|
+
Box,
|
|
139
|
+
BodyText,
|
|
140
|
+
} from '@utilitywarehouse/hearth-react-native';
|
|
141
|
+
|
|
142
|
+
const MyComponent = () => {
|
|
143
|
+
const bottomSheetRef = useRef(null);
|
|
144
|
+
|
|
145
|
+
return (
|
|
146
|
+
<BottomSheetModal ref={bottomSheetRef} snapPoints={['50%', '90%']}>
|
|
147
|
+
<BottomSheetScrollView>
|
|
148
|
+
<Box gap="200" padding="100">
|
|
149
|
+
<BodyText>This is scrollable content inside the bottom sheet.</BodyText>
|
|
150
|
+
{/* Add more content here */}
|
|
151
|
+
</Box>
|
|
152
|
+
</BottomSheetScrollView>
|
|
153
|
+
</BottomSheetModal>
|
|
154
|
+
);
|
|
155
|
+
};
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
### `BottomSheetModalProvider`
|
|
159
|
+
|
|
160
|
+
As mentioned above, when using `BottomSheetModal`, you need to wrap your app with `BottomSheetModalProvider`:
|
|
161
|
+
|
|
162
|
+
```tsx
|
|
163
|
+
import { BottomSheetModalProvider } from '@utilitywarehouse/hearth-react-native';
|
|
164
|
+
|
|
165
|
+
const App = () => {
|
|
166
|
+
return <BottomSheetModalProvider>{/* Your app content */}</BottomSheetModalProvider>;
|
|
167
|
+
};
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## External Resources
|
|
171
|
+
|
|
172
|
+
This component is built on top of [@gorhom/bottom-sheet](https://gorhom.github.io/react-native-bottom-sheet/) (v5). For more information about advanced usage and additional features, please refer to the [official documentation](https://gorhom.dev/react-native-bottom-sheet/).
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
import { ReactNode, Ref } from 'react';
|
|
3
|
+
import { ViewStyle } from 'react-native';
|
|
4
|
+
import {
|
|
5
|
+
BottomSheetProps as GorhomBottomSheetProps,
|
|
6
|
+
BottomSheetBackdropProps,
|
|
7
|
+
} from '@gorhom/bottom-sheet';
|
|
8
|
+
import {
|
|
9
|
+
BottomSheetMethods,
|
|
10
|
+
BottomSheetModalMethods,
|
|
11
|
+
} from '@gorhom/bottom-sheet/lib/typescript/types';
|
|
12
|
+
|
|
13
|
+
interface BottomSheetProps extends Omit<GorhomBottomSheetProps, 'handleComponent'> {
|
|
14
|
+
/**
|
|
15
|
+
* The content to be displayed within the bottom sheet.
|
|
16
|
+
*/
|
|
17
|
+
children: ReactNode;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* The backdrop component for the bottom sheet.
|
|
21
|
+
* When true, default backdrop will be used.
|
|
22
|
+
* When false, no backdrop will be displayed.
|
|
23
|
+
* You can also provide a custom backdrop component.
|
|
24
|
+
* @default true
|
|
25
|
+
*/
|
|
26
|
+
backdrop?: boolean | React.FC<BottomSheetBackdropProps>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Style for the bottom sheet container.
|
|
30
|
+
*/
|
|
31
|
+
containerStyle?: ViewStyle;
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Style for the bottom sheet handle.
|
|
35
|
+
*/
|
|
36
|
+
handleStyle?: ViewStyle;
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Whether to show the handle component.
|
|
40
|
+
* @default true
|
|
41
|
+
*/
|
|
42
|
+
showHandle?: boolean;
|
|
43
|
+
|
|
44
|
+
contentStyle?: ViewStyle;
|
|
45
|
+
|
|
46
|
+
ref?: Ref<BottomSheetMethods> | Ref<BottomSheetModalMethods<any>>;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export default BottomSheetProps;
|
|
@@ -0,0 +1,335 @@
|
|
|
1
|
+
import React, { useCallback, useRef } from 'react';
|
|
2
|
+
import { BottomSheet, BottomSheetModal, BottomSheetView } from '.';
|
|
3
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
4
|
+
import { Box } from '../Box';
|
|
5
|
+
import { Button } from '../Button';
|
|
6
|
+
import { BodyText } from '../BodyText';
|
|
7
|
+
import { Heading } from '../Heading';
|
|
8
|
+
import { Divider } from '../Divider';
|
|
9
|
+
import { Dimensions, Platform, View } from 'react-native';
|
|
10
|
+
import { UnistylesRuntime } from 'react-native-unistyles';
|
|
11
|
+
import { Input } from '../Input';
|
|
12
|
+
import { FormField } from '../FormField';
|
|
13
|
+
|
|
14
|
+
const meta = {
|
|
15
|
+
title: 'Stories / BottomSheet',
|
|
16
|
+
component: BottomSheet,
|
|
17
|
+
parameters: {
|
|
18
|
+
layout: 'centered',
|
|
19
|
+
noScroll: true,
|
|
20
|
+
},
|
|
21
|
+
argTypes: {
|
|
22
|
+
backdrop: {
|
|
23
|
+
control: 'boolean',
|
|
24
|
+
description: 'Whether to show a backdrop overlay when the sheet is open',
|
|
25
|
+
},
|
|
26
|
+
showHandle: {
|
|
27
|
+
control: 'boolean',
|
|
28
|
+
description: 'Whether to show the handle at the top of the sheet',
|
|
29
|
+
},
|
|
30
|
+
enablePanDownToClose: {
|
|
31
|
+
control: 'boolean',
|
|
32
|
+
description: 'Whether to allow swiping down to close the sheet',
|
|
33
|
+
},
|
|
34
|
+
snapPoints: {
|
|
35
|
+
control: 'object',
|
|
36
|
+
description: 'An array of snap points for the bottom sheet',
|
|
37
|
+
},
|
|
38
|
+
index: {
|
|
39
|
+
control: 'number',
|
|
40
|
+
description: 'The initial index of the bottom sheet',
|
|
41
|
+
},
|
|
42
|
+
enableContentPanningGesture: {
|
|
43
|
+
control: 'boolean',
|
|
44
|
+
description: 'Whether to allow panning gestures on the content',
|
|
45
|
+
},
|
|
46
|
+
enableHandlePanningGesture: {
|
|
47
|
+
control: 'boolean',
|
|
48
|
+
description: 'Whether to allow panning gestures on the handle',
|
|
49
|
+
},
|
|
50
|
+
enableOverDrag: {
|
|
51
|
+
control: 'boolean',
|
|
52
|
+
description: 'Whether to allow over-dragging the bottom sheet',
|
|
53
|
+
},
|
|
54
|
+
animateOnMount: {
|
|
55
|
+
control: 'boolean',
|
|
56
|
+
description: 'Whether to animate the bottom sheet on mount',
|
|
57
|
+
},
|
|
58
|
+
},
|
|
59
|
+
args: {
|
|
60
|
+
backdrop: true,
|
|
61
|
+
showHandle: true,
|
|
62
|
+
enablePanDownToClose: true,
|
|
63
|
+
index: -1,
|
|
64
|
+
enableContentPanningGesture: true,
|
|
65
|
+
enableHandlePanningGesture: true,
|
|
66
|
+
enableOverDrag: true,
|
|
67
|
+
animateOnMount: true,
|
|
68
|
+
},
|
|
69
|
+
} satisfies Meta<typeof BottomSheet>;
|
|
70
|
+
|
|
71
|
+
export default meta;
|
|
72
|
+
type Story = StoryObj<typeof meta>;
|
|
73
|
+
|
|
74
|
+
const ViewWrap = ({ children }: { children: React.ReactNode }) => (
|
|
75
|
+
<View
|
|
76
|
+
style={{
|
|
77
|
+
width: Platform.OS === 'web' ? '100%' : Dimensions.get('window').width,
|
|
78
|
+
height:
|
|
79
|
+
Platform.OS === 'web'
|
|
80
|
+
? '100%'
|
|
81
|
+
: Dimensions.get('window').height -
|
|
82
|
+
UnistylesRuntime.insets.top -
|
|
83
|
+
UnistylesRuntime.insets.bottom -
|
|
84
|
+
33,
|
|
85
|
+
|
|
86
|
+
position: 'absolute',
|
|
87
|
+
top: 0,
|
|
88
|
+
left: 0,
|
|
89
|
+
right: 0,
|
|
90
|
+
bottom: 0,
|
|
91
|
+
flex: 1,
|
|
92
|
+
marginVertical: Platform.OS === 'web' ? 0 : -8,
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
alignItems: 'center',
|
|
95
|
+
padding: 16,
|
|
96
|
+
}}
|
|
97
|
+
>
|
|
98
|
+
{children}
|
|
99
|
+
</View>
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
export const Playground: Story = {
|
|
103
|
+
args: {
|
|
104
|
+
children: [],
|
|
105
|
+
},
|
|
106
|
+
render: ({ ...args }) => {
|
|
107
|
+
const bottomSheetRef = useRef<BottomSheet>(null);
|
|
108
|
+
const handleOpenPress = useCallback(() => {
|
|
109
|
+
bottomSheetRef.current?.expand();
|
|
110
|
+
}, []);
|
|
111
|
+
|
|
112
|
+
return (
|
|
113
|
+
<View style={Platform.OS === 'web' ? { width: 400, height: 400 } : {}}>
|
|
114
|
+
<ViewWrap>
|
|
115
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
116
|
+
|
|
117
|
+
<BottomSheet ref={bottomSheetRef} {...args}>
|
|
118
|
+
<BottomSheetView>
|
|
119
|
+
<Box gap="200">
|
|
120
|
+
<BodyText>This is a bottom sheet with content.</BodyText>
|
|
121
|
+
<BodyText>You can swipe it up and down to close.</BodyText>
|
|
122
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
123
|
+
</Box>
|
|
124
|
+
</BottomSheetView>
|
|
125
|
+
</BottomSheet>
|
|
126
|
+
</ViewWrap>
|
|
127
|
+
</View>
|
|
128
|
+
);
|
|
129
|
+
},
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
export const WithSnapPoints: Story = {
|
|
133
|
+
args: {
|
|
134
|
+
children: [],
|
|
135
|
+
},
|
|
136
|
+
render: () => {
|
|
137
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
138
|
+
const handleOpenPress = useCallback(() => {
|
|
139
|
+
bottomSheetRef.current?.present();
|
|
140
|
+
}, []);
|
|
141
|
+
|
|
142
|
+
return (
|
|
143
|
+
<ViewWrap>
|
|
144
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
145
|
+
|
|
146
|
+
<BottomSheetModal ref={bottomSheetRef} snapPoints={['25%', '50%', '75%']}>
|
|
147
|
+
<BottomSheetView>
|
|
148
|
+
<Box gap="200">
|
|
149
|
+
<BodyText>This bottom sheet has multiple snap points.</BodyText>
|
|
150
|
+
<BodyText>Try swiping to see 25%, 50% and 75% heights.</BodyText>
|
|
151
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
152
|
+
</Box>
|
|
153
|
+
</BottomSheetView>
|
|
154
|
+
</BottomSheetModal>
|
|
155
|
+
</ViewWrap>
|
|
156
|
+
);
|
|
157
|
+
},
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
export const DynamicHeight: Story = {
|
|
161
|
+
args: {
|
|
162
|
+
children: [],
|
|
163
|
+
},
|
|
164
|
+
render: () => {
|
|
165
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
166
|
+
const handleOpenPress = useCallback(() => {
|
|
167
|
+
bottomSheetRef.current?.present();
|
|
168
|
+
}, []);
|
|
169
|
+
|
|
170
|
+
return (
|
|
171
|
+
<ViewWrap>
|
|
172
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
173
|
+
|
|
174
|
+
<BottomSheetModal ref={bottomSheetRef}>
|
|
175
|
+
<BottomSheetView>
|
|
176
|
+
<Box gap="200" padding="100">
|
|
177
|
+
<BodyText>This bottom sheet will resize based on its content height.</BodyText>
|
|
178
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
179
|
+
</Box>
|
|
180
|
+
</BottomSheetView>
|
|
181
|
+
</BottomSheetModal>
|
|
182
|
+
</ViewWrap>
|
|
183
|
+
);
|
|
184
|
+
},
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
export const WithoutHandle: Story = {
|
|
188
|
+
args: {
|
|
189
|
+
children: [],
|
|
190
|
+
},
|
|
191
|
+
render: () => {
|
|
192
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
193
|
+
const handleOpenPress = useCallback(() => {
|
|
194
|
+
bottomSheetRef.current?.present();
|
|
195
|
+
}, []);
|
|
196
|
+
|
|
197
|
+
return (
|
|
198
|
+
<ViewWrap>
|
|
199
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
200
|
+
|
|
201
|
+
<BottomSheetModal ref={bottomSheetRef} showHandle={false} snapPoints={['25%', '50%']}>
|
|
202
|
+
<BottomSheetView>
|
|
203
|
+
<Box gap="200">
|
|
204
|
+
<BodyText>This bottom sheet doesn't show the handle at the top.</BodyText>
|
|
205
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
206
|
+
</Box>
|
|
207
|
+
</BottomSheetView>
|
|
208
|
+
</BottomSheetModal>
|
|
209
|
+
</ViewWrap>
|
|
210
|
+
);
|
|
211
|
+
},
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export const WithoutBackdrop: Story = {
|
|
215
|
+
args: {
|
|
216
|
+
children: [],
|
|
217
|
+
},
|
|
218
|
+
render: () => {
|
|
219
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
220
|
+
const handleOpenPress = useCallback(() => {
|
|
221
|
+
bottomSheetRef.current?.present();
|
|
222
|
+
}, []);
|
|
223
|
+
|
|
224
|
+
return (
|
|
225
|
+
<ViewWrap>
|
|
226
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
227
|
+
|
|
228
|
+
<BottomSheetModal ref={bottomSheetRef} backdrop={false} snapPoints={['25%', '50%']}>
|
|
229
|
+
<BottomSheetView>
|
|
230
|
+
<Box gap="200">
|
|
231
|
+
<BodyText>This bottom sheet doesn't show a backdrop overlay.</BodyText>
|
|
232
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Close Bottom Sheet</Button>
|
|
233
|
+
</Box>
|
|
234
|
+
</BottomSheetView>
|
|
235
|
+
</BottomSheetModal>
|
|
236
|
+
</ViewWrap>
|
|
237
|
+
);
|
|
238
|
+
},
|
|
239
|
+
};
|
|
240
|
+
|
|
241
|
+
export const ComplexContent: Story = {
|
|
242
|
+
args: {
|
|
243
|
+
children: [],
|
|
244
|
+
},
|
|
245
|
+
render: () => {
|
|
246
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
247
|
+
const handleOpenPress = useCallback(() => {
|
|
248
|
+
bottomSheetRef.current?.present();
|
|
249
|
+
}, []);
|
|
250
|
+
|
|
251
|
+
return (
|
|
252
|
+
<ViewWrap>
|
|
253
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
254
|
+
|
|
255
|
+
<BottomSheetModal ref={bottomSheetRef} snapPoints={['50%', '90%']}>
|
|
256
|
+
<BottomSheetView>
|
|
257
|
+
<Box gap="200">
|
|
258
|
+
<Heading size="lg">Bottom Sheet with Complex Content</Heading>
|
|
259
|
+
<Divider />
|
|
260
|
+
<BodyText>
|
|
261
|
+
This is a more complex bottom sheet with various content sections.
|
|
262
|
+
</BodyText>
|
|
263
|
+
|
|
264
|
+
<Box gap="100">
|
|
265
|
+
<BodyText weight="semibold">Features:</BodyText>
|
|
266
|
+
<BodyText>• Multiple snap points</BodyText>
|
|
267
|
+
<BodyText>• Custom styling</BodyText>
|
|
268
|
+
<BodyText>• Complex layout</BodyText>
|
|
269
|
+
<BodyText>• Custom handle and backdrop</BodyText>
|
|
270
|
+
</Box>
|
|
271
|
+
|
|
272
|
+
<Divider />
|
|
273
|
+
|
|
274
|
+
<Box flexDirection="row" justifyContent="space-between">
|
|
275
|
+
<Button
|
|
276
|
+
colorScheme="grey"
|
|
277
|
+
variant="outline"
|
|
278
|
+
onPress={() => bottomSheetRef.current?.close()}
|
|
279
|
+
>
|
|
280
|
+
Cancel
|
|
281
|
+
</Button>
|
|
282
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Confirm</Button>
|
|
283
|
+
</Box>
|
|
284
|
+
</Box>
|
|
285
|
+
</BottomSheetView>
|
|
286
|
+
</BottomSheetModal>
|
|
287
|
+
</ViewWrap>
|
|
288
|
+
);
|
|
289
|
+
},
|
|
290
|
+
};
|
|
291
|
+
|
|
292
|
+
export const WithInput: Story = {
|
|
293
|
+
args: {
|
|
294
|
+
children: [],
|
|
295
|
+
},
|
|
296
|
+
render: () => {
|
|
297
|
+
const bottomSheetRef = useRef<BottomSheetModal>(null);
|
|
298
|
+
const handleOpenPress = useCallback(() => {
|
|
299
|
+
bottomSheetRef.current?.present();
|
|
300
|
+
}, []);
|
|
301
|
+
|
|
302
|
+
return (
|
|
303
|
+
<ViewWrap>
|
|
304
|
+
<Button onPress={handleOpenPress}>Open Bottom Sheet</Button>
|
|
305
|
+
|
|
306
|
+
<BottomSheetModal ref={bottomSheetRef}>
|
|
307
|
+
<BottomSheetView>
|
|
308
|
+
<Box gap="200">
|
|
309
|
+
<Heading size="lg">Bottom Sheet with Input</Heading>
|
|
310
|
+
<Divider />
|
|
311
|
+
<BodyText>This bottom sheet contains an input field.</BodyText>
|
|
312
|
+
|
|
313
|
+
<FormField label="Input Field">
|
|
314
|
+
<Input placeholder="Type something..." />
|
|
315
|
+
</FormField>
|
|
316
|
+
|
|
317
|
+
<Divider />
|
|
318
|
+
|
|
319
|
+
<Box flexDirection="row" justifyContent="space-between">
|
|
320
|
+
<Button
|
|
321
|
+
colorScheme="grey"
|
|
322
|
+
variant="outline"
|
|
323
|
+
onPress={() => bottomSheetRef.current?.close()}
|
|
324
|
+
>
|
|
325
|
+
Cancel
|
|
326
|
+
</Button>
|
|
327
|
+
<Button onPress={() => bottomSheetRef.current?.close()}>Submit</Button>
|
|
328
|
+
</Box>
|
|
329
|
+
</Box>
|
|
330
|
+
</BottomSheetView>
|
|
331
|
+
</BottomSheetModal>
|
|
332
|
+
</ViewWrap>
|
|
333
|
+
);
|
|
334
|
+
},
|
|
335
|
+
};
|