@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
package/docs/hooks.mdx
ADDED
|
@@ -0,0 +1,526 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import { BackToTopButton, NextPrevPage } from './components';
|
|
3
|
+
|
|
4
|
+
<Meta title="Hooks" />
|
|
5
|
+
<BackToTopButton />
|
|
6
|
+
|
|
7
|
+
# Hooks
|
|
8
|
+
|
|
9
|
+
Hearth React Native provides a set of powerful hooks that help you build responsive, themeable, and accessible applications. These hooks integrate seamlessly with the Unistyles theming system and provide utilities for responsive design, color mode management, and design token access.
|
|
10
|
+
|
|
11
|
+
- [useTheme](#usetheme)
|
|
12
|
+
- [useToken](#usetoken)
|
|
13
|
+
- [useColorMode](#usecolormode)
|
|
14
|
+
- [useBreakpointValue](#usebreakpointvalue)
|
|
15
|
+
- [useMedia](#usemedia)
|
|
16
|
+
|
|
17
|
+
## useTheme
|
|
18
|
+
|
|
19
|
+
`useTheme` is a custom hook that returns the current theme object with all design tokens and theme values. This is the primary way to access theme values in your components.
|
|
20
|
+
|
|
21
|
+
```tsx
|
|
22
|
+
import { useTheme } from '@utilitywarehouse/hearth-react-native';
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Basic Usage
|
|
26
|
+
|
|
27
|
+
```tsx
|
|
28
|
+
import { View, Text } from 'react-native';
|
|
29
|
+
import { useTheme } from '@utilitywarehouse/hearth-react-native';
|
|
30
|
+
|
|
31
|
+
function ThemedComponent() {
|
|
32
|
+
const theme = useTheme();
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<View
|
|
36
|
+
style={{
|
|
37
|
+
backgroundColor: theme.color.background.primary,
|
|
38
|
+
padding: theme.space[200],
|
|
39
|
+
borderRadius: theme.borderRadius.lg,
|
|
40
|
+
}}
|
|
41
|
+
>
|
|
42
|
+
<Text
|
|
43
|
+
style={{
|
|
44
|
+
color: theme.color.text.primary,
|
|
45
|
+
fontSize: theme.font.size[200],
|
|
46
|
+
fontFamily: theme.font.family.body,
|
|
47
|
+
}}
|
|
48
|
+
>
|
|
49
|
+
Themed Component
|
|
50
|
+
</Text>
|
|
51
|
+
</View>
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Accessing Different Token Categories
|
|
57
|
+
|
|
58
|
+
```tsx
|
|
59
|
+
function ExampleComponent() {
|
|
60
|
+
const theme = useTheme();
|
|
61
|
+
|
|
62
|
+
// Colors
|
|
63
|
+
const backgroundColor = theme.color.surface.brand.default;
|
|
64
|
+
const textColor = theme.color.text.primary;
|
|
65
|
+
|
|
66
|
+
// Spacing
|
|
67
|
+
const padding = theme.space[300];
|
|
68
|
+
const margin = theme.space[150];
|
|
69
|
+
|
|
70
|
+
// Typography
|
|
71
|
+
const fontSize = theme.font.size[200];
|
|
72
|
+
const fontWeight = theme.font.weight.bold;
|
|
73
|
+
const fontFamily = theme.font.family.heading;
|
|
74
|
+
|
|
75
|
+
// Border
|
|
76
|
+
const borderRadius = theme.borderRadius.md;
|
|
77
|
+
const borderWidth = theme.borderWidth[1];
|
|
78
|
+
|
|
79
|
+
// Shadows
|
|
80
|
+
const shadow = theme.shadow.md;
|
|
81
|
+
|
|
82
|
+
return (
|
|
83
|
+
<View
|
|
84
|
+
style={{
|
|
85
|
+
backgroundColor,
|
|
86
|
+
padding,
|
|
87
|
+
margin,
|
|
88
|
+
borderRadius,
|
|
89
|
+
borderWidth,
|
|
90
|
+
...shadow,
|
|
91
|
+
}}
|
|
92
|
+
>
|
|
93
|
+
<Text
|
|
94
|
+
style={{
|
|
95
|
+
color: textColor,
|
|
96
|
+
fontSize,
|
|
97
|
+
fontWeight,
|
|
98
|
+
fontFamily,
|
|
99
|
+
}}
|
|
100
|
+
>
|
|
101
|
+
Complete theme access
|
|
102
|
+
</Text>
|
|
103
|
+
</View>
|
|
104
|
+
);
|
|
105
|
+
}
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
## useToken
|
|
109
|
+
|
|
110
|
+
`useToken` is a custom hook that resolves specific design tokens from the theme. It provides a convenient way to access individual token values without importing the entire theme.
|
|
111
|
+
|
|
112
|
+
```tsx
|
|
113
|
+
import { useToken } from '@utilitywarehouse/hearth-react-native';
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
### Basic Usage
|
|
117
|
+
|
|
118
|
+
```tsx
|
|
119
|
+
import { View, Text } from 'react-native';
|
|
120
|
+
import { useToken } from '@utilitywarehouse/hearth-react-native';
|
|
121
|
+
|
|
122
|
+
function TokenExample() {
|
|
123
|
+
const primaryColor = useToken('colors', 'purple500');
|
|
124
|
+
const mediumSpacing = useToken('space', '200');
|
|
125
|
+
const headingFont = useToken('fonts', 'heading');
|
|
126
|
+
|
|
127
|
+
return (
|
|
128
|
+
<View
|
|
129
|
+
style={{
|
|
130
|
+
backgroundColor: primaryColor,
|
|
131
|
+
padding: mediumSpacing,
|
|
132
|
+
}}
|
|
133
|
+
>
|
|
134
|
+
<Text
|
|
135
|
+
style={{
|
|
136
|
+
fontFamily: headingFont,
|
|
137
|
+
color: 'white',
|
|
138
|
+
}}
|
|
139
|
+
>
|
|
140
|
+
Token-based styling
|
|
141
|
+
</Text>
|
|
142
|
+
</View>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
## useColorMode
|
|
148
|
+
|
|
149
|
+
`useColorMode` is a custom hook that provides access to the current color mode and allows you to programmatically change between light and dark themes.
|
|
150
|
+
|
|
151
|
+
```tsx
|
|
152
|
+
import { useColorMode } from '@utilitywarehouse/hearth-react-native';
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
### Basic Usage
|
|
156
|
+
|
|
157
|
+
```tsx
|
|
158
|
+
import { View, Text, TouchableOpacity } from 'react-native';
|
|
159
|
+
import { useColorMode } from '@utilitywarehouse/hearth-react-native';
|
|
160
|
+
|
|
161
|
+
function ColorModeToggle() {
|
|
162
|
+
const [colorMode, setColorMode] = useColorMode();
|
|
163
|
+
|
|
164
|
+
const toggleColorMode = () => {
|
|
165
|
+
setColorMode(colorMode === 'light' ? 'dark' : 'light');
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
return (
|
|
169
|
+
<View
|
|
170
|
+
style={{
|
|
171
|
+
backgroundColor: colorMode === 'light' ? '#ffffff' : '#222222',
|
|
172
|
+
padding: 20,
|
|
173
|
+
}}
|
|
174
|
+
>
|
|
175
|
+
<Text
|
|
176
|
+
style={{
|
|
177
|
+
color: colorMode === 'light' ? '#000000' : '#ffffff',
|
|
178
|
+
marginBottom: 10,
|
|
179
|
+
}}
|
|
180
|
+
>
|
|
181
|
+
Current mode: {colorMode}
|
|
182
|
+
</Text>
|
|
183
|
+
<TouchableOpacity
|
|
184
|
+
onPress={toggleColorMode}
|
|
185
|
+
style={{
|
|
186
|
+
backgroundColor: colorMode === 'light' ? '#7a42c8' : '#a782db',
|
|
187
|
+
padding: 10,
|
|
188
|
+
borderRadius: 8,
|
|
189
|
+
}}
|
|
190
|
+
>
|
|
191
|
+
<Text style={{ color: 'white', textAlign: 'center' }}>
|
|
192
|
+
Switch to {colorMode === 'light' ? 'dark' : 'light'} mode
|
|
193
|
+
</Text>
|
|
194
|
+
</TouchableOpacity>
|
|
195
|
+
</View>
|
|
196
|
+
);
|
|
197
|
+
}
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
### Conditional Styling Based on Color Mode
|
|
201
|
+
|
|
202
|
+
```tsx
|
|
203
|
+
function AdaptiveComponent() {
|
|
204
|
+
const [colorMode] = useColorMode();
|
|
205
|
+
|
|
206
|
+
const isDark = colorMode === 'dark';
|
|
207
|
+
|
|
208
|
+
return (
|
|
209
|
+
<View
|
|
210
|
+
style={{
|
|
211
|
+
backgroundColor: isDark ? '#222222' : '#ffffff',
|
|
212
|
+
borderColor: isDark ? '#464444' : '#d1d0d0',
|
|
213
|
+
borderWidth: 1,
|
|
214
|
+
padding: 16,
|
|
215
|
+
borderRadius: 8,
|
|
216
|
+
}}
|
|
217
|
+
>
|
|
218
|
+
<Text
|
|
219
|
+
style={{
|
|
220
|
+
color: isDark ? '#e7e6e6' : '#101010',
|
|
221
|
+
fontSize: 16,
|
|
222
|
+
}}
|
|
223
|
+
>
|
|
224
|
+
This component adapts to {colorMode} mode
|
|
225
|
+
</Text>
|
|
226
|
+
|
|
227
|
+
{/* Status indicator */}
|
|
228
|
+
<View
|
|
229
|
+
style={{
|
|
230
|
+
width: 12,
|
|
231
|
+
height: 12,
|
|
232
|
+
borderRadius: 6,
|
|
233
|
+
backgroundColor: isDark ? '#58ca93' : '#0f834a',
|
|
234
|
+
marginTop: 8,
|
|
235
|
+
}}
|
|
236
|
+
/>
|
|
237
|
+
</View>
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
```
|
|
241
|
+
|
|
242
|
+
## useBreakpointValue
|
|
243
|
+
|
|
244
|
+
`useBreakpointValue` is a custom hook that returns different values based on the current screen breakpoint. It's perfect for creating responsive designs that adapt to different screen sizes.
|
|
245
|
+
|
|
246
|
+
```tsx
|
|
247
|
+
import { useBreakpointValue } from '@utilitywarehouse/hearth-react-native';
|
|
248
|
+
```
|
|
249
|
+
|
|
250
|
+
### Basic Usage
|
|
251
|
+
|
|
252
|
+
```tsx
|
|
253
|
+
import { View, Text } from 'react-native';
|
|
254
|
+
import { useBreakpointValue } from '@utilitywarehouse/hearth-react-native';
|
|
255
|
+
|
|
256
|
+
function ResponsiveLayout() {
|
|
257
|
+
const flexDirection = useBreakpointValue({
|
|
258
|
+
default: 'column',
|
|
259
|
+
md: 'row',
|
|
260
|
+
});
|
|
261
|
+
|
|
262
|
+
const padding = useBreakpointValue({
|
|
263
|
+
default: 16,
|
|
264
|
+
md: 24,
|
|
265
|
+
lg: 32,
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
return (
|
|
269
|
+
<View
|
|
270
|
+
style={{
|
|
271
|
+
flexDirection,
|
|
272
|
+
padding,
|
|
273
|
+
gap: 12,
|
|
274
|
+
}}
|
|
275
|
+
>
|
|
276
|
+
<View style={{ flex: 1, backgroundColor: '#7a42c8', padding: 16 }}>
|
|
277
|
+
<Text style={{ color: 'white' }}>Item 1</Text>
|
|
278
|
+
</View>
|
|
279
|
+
<View style={{ flex: 1, backgroundColor: '#0f834a', padding: 16 }}>
|
|
280
|
+
<Text style={{ color: 'white' }}>Item 2</Text>
|
|
281
|
+
</View>
|
|
282
|
+
<View style={{ flex: 1, backgroundColor: '#de2612', padding: 16 }}>
|
|
283
|
+
<Text style={{ color: 'white' }}>Item 3</Text>
|
|
284
|
+
</View>
|
|
285
|
+
</View>
|
|
286
|
+
);
|
|
287
|
+
}
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Responsive Typography
|
|
291
|
+
|
|
292
|
+
```tsx
|
|
293
|
+
function ResponsiveText() {
|
|
294
|
+
const fontSize = useBreakpointValue({
|
|
295
|
+
default: 16,
|
|
296
|
+
md: 20,
|
|
297
|
+
lg: 24,
|
|
298
|
+
xl: 28,
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
const lineHeight = useBreakpointValue({
|
|
302
|
+
default: 22,
|
|
303
|
+
md: 28,
|
|
304
|
+
lg: 32,
|
|
305
|
+
xl: 36,
|
|
306
|
+
});
|
|
307
|
+
|
|
308
|
+
return (
|
|
309
|
+
<Text
|
|
310
|
+
style={{
|
|
311
|
+
fontSize,
|
|
312
|
+
lineHeight,
|
|
313
|
+
textAlign: 'center',
|
|
314
|
+
padding: 16,
|
|
315
|
+
}}
|
|
316
|
+
>
|
|
317
|
+
This text scales with screen size
|
|
318
|
+
</Text>
|
|
319
|
+
);
|
|
320
|
+
}
|
|
321
|
+
```
|
|
322
|
+
|
|
323
|
+
### Complex Responsive Values
|
|
324
|
+
|
|
325
|
+
```tsx
|
|
326
|
+
function ResponsiveCard() {
|
|
327
|
+
const cardStyle = useBreakpointValue({
|
|
328
|
+
default: {
|
|
329
|
+
width: '100%',
|
|
330
|
+
margin: 8,
|
|
331
|
+
},
|
|
332
|
+
md: {
|
|
333
|
+
width: '48%',
|
|
334
|
+
margin: 12,
|
|
335
|
+
},
|
|
336
|
+
lg: {
|
|
337
|
+
width: '31%',
|
|
338
|
+
margin: 16,
|
|
339
|
+
},
|
|
340
|
+
});
|
|
341
|
+
|
|
342
|
+
const imageHeight = useBreakpointValue({
|
|
343
|
+
default: 150,
|
|
344
|
+
md: 200,
|
|
345
|
+
lg: 250,
|
|
346
|
+
});
|
|
347
|
+
|
|
348
|
+
return (
|
|
349
|
+
<View style={cardStyle}>
|
|
350
|
+
<View
|
|
351
|
+
style={{
|
|
352
|
+
height: imageHeight,
|
|
353
|
+
backgroundColor: '#d1d0d0',
|
|
354
|
+
borderRadius: 8,
|
|
355
|
+
marginBottom: 12,
|
|
356
|
+
}}
|
|
357
|
+
/>
|
|
358
|
+
<Text style={{ fontSize: 16, fontWeight: 'bold' }}>Card Title</Text>
|
|
359
|
+
<Text style={{ fontSize: 14, color: '#6f6c6b', marginTop: 4 }}>
|
|
360
|
+
Card description that adapts to screen size
|
|
361
|
+
</Text>
|
|
362
|
+
</View>
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## useMedia
|
|
368
|
+
|
|
369
|
+
`useMedia` is a custom hook that returns an object with boolean values for each breakpoint, indicating whether the current screen size matches that breakpoint. It's useful for conditional rendering based on screen size.
|
|
370
|
+
|
|
371
|
+
```tsx
|
|
372
|
+
import { useMedia } from '@utilitywarehouse/hearth-react-native';
|
|
373
|
+
```
|
|
374
|
+
|
|
375
|
+
### Basic Usage
|
|
376
|
+
|
|
377
|
+
```tsx
|
|
378
|
+
import { View, Text } from 'react-native';
|
|
379
|
+
import { useMedia } from '@utilitywarehouse/hearth-react-native';
|
|
380
|
+
|
|
381
|
+
function MediaExample() {
|
|
382
|
+
const media = useMedia();
|
|
383
|
+
|
|
384
|
+
return (
|
|
385
|
+
<View style={{ padding: 16 }}>
|
|
386
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold', marginBottom: 12 }}>
|
|
387
|
+
Current Breakpoints:
|
|
388
|
+
</Text>
|
|
389
|
+
|
|
390
|
+
{Object.entries(media).map(([breakpoint, isActive]) => (
|
|
391
|
+
<Text
|
|
392
|
+
key={breakpoint}
|
|
393
|
+
style={{
|
|
394
|
+
color: isActive ? '#0f834a' : '#6f6c6b',
|
|
395
|
+
fontSize: 14,
|
|
396
|
+
marginBottom: 4,
|
|
397
|
+
}}
|
|
398
|
+
>
|
|
399
|
+
{breakpoint}: {isActive ? '✅ Active' : '❌ Inactive'}
|
|
400
|
+
</Text>
|
|
401
|
+
))}
|
|
402
|
+
</View>
|
|
403
|
+
);
|
|
404
|
+
}
|
|
405
|
+
```
|
|
406
|
+
|
|
407
|
+
### Conditional Components
|
|
408
|
+
|
|
409
|
+
```tsx
|
|
410
|
+
function ConditionalLayout() {
|
|
411
|
+
const media = useMedia();
|
|
412
|
+
|
|
413
|
+
return (
|
|
414
|
+
<View style={{ flex: 1, padding: 16 }}>
|
|
415
|
+
{/* Mobile-only sidebar */}
|
|
416
|
+
{media.base && (
|
|
417
|
+
<View
|
|
418
|
+
style={{
|
|
419
|
+
backgroundColor: '#7a42c8',
|
|
420
|
+
padding: 16,
|
|
421
|
+
marginBottom: 16,
|
|
422
|
+
borderRadius: 8,
|
|
423
|
+
}}
|
|
424
|
+
>
|
|
425
|
+
<Text style={{ color: 'white', textAlign: 'center' }}>Mobile Navigation</Text>
|
|
426
|
+
</View>
|
|
427
|
+
)}
|
|
428
|
+
|
|
429
|
+
<View style={{ flexDirection: media.md ? 'row' : 'column', flex: 1 }}>
|
|
430
|
+
{/* Desktop sidebar */}
|
|
431
|
+
{media.md && (
|
|
432
|
+
<View
|
|
433
|
+
style={{
|
|
434
|
+
width: 250,
|
|
435
|
+
backgroundColor: '#f6f5f5',
|
|
436
|
+
padding: 16,
|
|
437
|
+
marginRight: 16,
|
|
438
|
+
borderRadius: 8,
|
|
439
|
+
}}
|
|
440
|
+
>
|
|
441
|
+
<Text style={{ fontWeight: 'bold', marginBottom: 8 }}>Desktop Sidebar</Text>
|
|
442
|
+
<Text style={{ fontSize: 14, color: '#6f6c6b' }}>
|
|
443
|
+
This only appears on medium screens and above
|
|
444
|
+
</Text>
|
|
445
|
+
</View>
|
|
446
|
+
)}
|
|
447
|
+
|
|
448
|
+
{/* Main content */}
|
|
449
|
+
<View style={{ flex: 1, backgroundColor: '#ffffff', padding: 16, borderRadius: 8 }}>
|
|
450
|
+
<Text style={{ fontSize: 18, fontWeight: 'bold' }}>Main Content</Text>
|
|
451
|
+
<Text style={{ marginTop: 8, color: '#6f6c6b' }}>
|
|
452
|
+
Layout changes based on screen size
|
|
453
|
+
</Text>
|
|
454
|
+
</View>
|
|
455
|
+
</View>
|
|
456
|
+
|
|
457
|
+
{/* Large screen only footer */}
|
|
458
|
+
{media.lg && (
|
|
459
|
+
<View
|
|
460
|
+
style={{
|
|
461
|
+
backgroundColor: '#0f834a',
|
|
462
|
+
padding: 16,
|
|
463
|
+
marginTop: 16,
|
|
464
|
+
borderRadius: 8,
|
|
465
|
+
}}
|
|
466
|
+
>
|
|
467
|
+
<Text style={{ color: 'white', textAlign: 'center' }}>Large Screen Footer</Text>
|
|
468
|
+
</View>
|
|
469
|
+
)}
|
|
470
|
+
</View>
|
|
471
|
+
);
|
|
472
|
+
}
|
|
473
|
+
```
|
|
474
|
+
|
|
475
|
+
### Responsive Grid
|
|
476
|
+
|
|
477
|
+
```tsx
|
|
478
|
+
function ResponsiveGrid({ items }) {
|
|
479
|
+
const media = useMedia();
|
|
480
|
+
|
|
481
|
+
const getColumns = () => {
|
|
482
|
+
if (media.xl) return 4;
|
|
483
|
+
if (media.lg) return 3;
|
|
484
|
+
if (media.md) return 2;
|
|
485
|
+
return 1;
|
|
486
|
+
};
|
|
487
|
+
|
|
488
|
+
const columns = getColumns();
|
|
489
|
+
const itemWidth = `${100 / columns - 2}%`;
|
|
490
|
+
|
|
491
|
+
return (
|
|
492
|
+
<View
|
|
493
|
+
style={{
|
|
494
|
+
flexDirection: 'row',
|
|
495
|
+
flexWrap: 'wrap',
|
|
496
|
+
justifyContent: 'space-between',
|
|
497
|
+
padding: 16,
|
|
498
|
+
}}
|
|
499
|
+
>
|
|
500
|
+
{items.map((item, index) => (
|
|
501
|
+
<View
|
|
502
|
+
key={index}
|
|
503
|
+
style={{
|
|
504
|
+
width: itemWidth,
|
|
505
|
+
backgroundColor: '#ffffff',
|
|
506
|
+
padding: 16,
|
|
507
|
+
marginBottom: 16,
|
|
508
|
+
borderRadius: 8,
|
|
509
|
+
borderWidth: 1,
|
|
510
|
+
borderColor: '#d1d0d0',
|
|
511
|
+
}}
|
|
512
|
+
>
|
|
513
|
+
<Text>{item.title}</Text>
|
|
514
|
+
</View>
|
|
515
|
+
))}
|
|
516
|
+
</View>
|
|
517
|
+
);
|
|
518
|
+
}
|
|
519
|
+
```
|
|
520
|
+
|
|
521
|
+
<NextPrevPage
|
|
522
|
+
prevLink="/?path=/docs/theme-tokens--docs"
|
|
523
|
+
prevTitle="Theme Tokens"
|
|
524
|
+
nextLink="/?path=/docs/layout-components--docs"
|
|
525
|
+
nextTitle="Layout Components"
|
|
526
|
+
/>
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { Meta } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import { version } from '../package.json';
|
|
3
|
+
import { Box } from '../src';
|
|
4
|
+
import pig from './assets/react-native-pig.png';
|
|
5
|
+
import { BackToTopButton, NextPrevPage } from './components';
|
|
6
|
+
|
|
7
|
+
<Meta title="Introduction" />
|
|
8
|
+
|
|
9
|
+
<BackToTopButton />
|
|
10
|
+
|
|
11
|
+
<Box alignItems='center' style={{textAlign:"center"}}>
|
|
12
|
+
|
|
13
|
+
<img src={pig} alt="React Native Package" width={240} height={240} />
|
|
14
|
+
|
|
15
|
+
# Hearth React Native
|
|
16
|
+
|
|
17
|
+
React Native component library for building UIs at Utility Warehouse.<br/>
|
|
18
|
+
Current version: v{version}
|
|
19
|
+
|
|
20
|
+
</Box>
|
|
21
|
+
|
|
22
|
+
Hearth React Native is a comprehensive design system library for React Native, providing reusable components, consistent styling, and tools to streamline UI development. It is built to enhance productivity and maintain design consistency across projects.
|
|
23
|
+
|
|
24
|
+
- [Installation](#installation)
|
|
25
|
+
- [Additional packages](#additional-packages)
|
|
26
|
+
- [Linking the fonts to be used in your project](#linking-the-fonts-to-be-used-in-your-project)
|
|
27
|
+
- [Using Expo](#using-expo)
|
|
28
|
+
- [Babel configuration](#babel-configuration)
|
|
29
|
+
- [Jest configuration](#jest-configuration)
|
|
30
|
+
|
|
31
|
+
## Installation
|
|
32
|
+
|
|
33
|
+
Assuming you already have React Native installed and your project set up, to get started install the library and it's peer dependencies.
|
|
34
|
+
|
|
35
|
+
```console
|
|
36
|
+
npm install @utilitywarehouse/hearth-react-native
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
To install the peer dependencies, you can run the following command:
|
|
40
|
+
|
|
41
|
+
```console
|
|
42
|
+
npm install react-native-unistyles react-native-edge-to-edge react-native-nitro-modules@0.26.4 react-native-svg react-native-reanimated react-native-gesture-handler
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
For more information on how to install and configure `react-native-svg`, `react-native-gesture-handler` and `react-native-reanimated`,
|
|
46
|
+
please refer to the [react-native-svg](https://github.com/software-mansion/react-native-svg?tab=readme-ov-file#installation),
|
|
47
|
+
[react-native-gesture-handler](https://docs.swmansion.com/react-native-gesture-handler/docs/) and
|
|
48
|
+
[react-native-reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started) documentation.
|
|
49
|
+
|
|
50
|
+
Why so many dependencies? The `@utilitywarehouse/hearth-react-native` library is built on top of the following libraries:
|
|
51
|
+
|
|
52
|
+
- [React Native Unistyles](https://www.unistyl.es/)
|
|
53
|
+
- [React Native SVG](https://github.com/software-mansion/react-native-svg)
|
|
54
|
+
- [React Native Reanimated](https://docs.swmansion.com/react-native-reanimated/)
|
|
55
|
+
- [React Native Gesture Handler](https://docs.swmansion.com/react-native-gesture-handler/docs/)
|
|
56
|
+
|
|
57
|
+
So why do we need to install `react-native-nitro-module`? It's because of React Native autolinking and transitive dependencies,
|
|
58
|
+
read more about it [here](https://shift.infinite.red/transitive-dependencies-and-react-native-autolinking-d4d4b7a651cf).
|
|
59
|
+
|
|
60
|
+
## Additional packages
|
|
61
|
+
|
|
62
|
+
The `@utilitywarehouse/hearth-react-native` library uses a few packages under the hood for tokens; including colours, space and more,
|
|
63
|
+
as well as fonts and icons. Feel free to additionally install these packages if you need to use them in your project.
|
|
64
|
+
|
|
65
|
+
```console
|
|
66
|
+
npm install @utilitywarehouse/hearth-tokens @utilitywarehouse/hearth-react-native-icons
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
You will need to include the **Comic Hams**, **DM Mono** and **DM Sans** fonts.
|
|
70
|
+
The easiest way to do this is to use the `@utilitywarehouse/hearth-fonts` package.
|
|
71
|
+
|
|
72
|
+
```console
|
|
73
|
+
npm install @utilitywarehouse/hearth-fonts
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Next, create or update your `react-native.config.js` file in the root directory and paste the code below inside it:
|
|
77
|
+
|
|
78
|
+
```js
|
|
79
|
+
module.exports = {
|
|
80
|
+
project: {
|
|
81
|
+
ios: {},
|
|
82
|
+
android: {},
|
|
83
|
+
},
|
|
84
|
+
assets: ['./node_modules/@utilitywarehouse/hearth-fornts/files/ttf'],
|
|
85
|
+
};
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
### Linking the fonts to be used in your project
|
|
89
|
+
|
|
90
|
+
Now we need to link them so we'll be able to use them in any files inside the project. To do that, run the following command:
|
|
91
|
+
|
|
92
|
+
```console
|
|
93
|
+
npx react-native-asset
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
#### Using Expo
|
|
97
|
+
|
|
98
|
+
If you are using Expo, you can use the `expo-font` and [`expo-xml-font`](https://github.com/Armster15/expo-xml-font) packages to load the fonts.
|
|
99
|
+
Here is an example of how to load the fonts in your `App.tsx` file:
|
|
100
|
+
|
|
101
|
+
```tsx
|
|
102
|
+
import { useFonts } from 'expo-font';
|
|
103
|
+
import App from './src/App';
|
|
104
|
+
|
|
105
|
+
export default () => {
|
|
106
|
+
const [loaded] = useFonts({
|
|
107
|
+
'ComicHams-BoldFlare': require('./assets/fonts/comichams_boldflare.ttf'),
|
|
108
|
+
'ComicHams-HeavyFlare': require('./assets/fonts/comichams_heavyflare.ttf'),
|
|
109
|
+
'ComicHams-SemiBoldFlare': require('./assets/fonts/comichams_semiboldflare.ttf'),
|
|
110
|
+
'DM Mono': require('./assets/fonts/dmmono_medium.ttf'),
|
|
111
|
+
'DMMono-MediumItalic': require('./assets/fonts/dmmono_mediumitalic.ttf'),
|
|
112
|
+
'DMSans-Bold': require('./assets/fonts/dmsans_bold.ttf'),
|
|
113
|
+
'DMSans-BoldItalic': require('./assets/fonts/dmsans_bolditalic.ttf'),
|
|
114
|
+
'DMSans-Italic': require('./assets/fonts/dmsans_italic.ttf'),
|
|
115
|
+
'DMSans-Regular': require('./assets/fonts/dmsans_regular.ttf'),
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
if (!loaded) return null;
|
|
119
|
+
|
|
120
|
+
return <App />;
|
|
121
|
+
};
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
Follow the [expo-xml-font](https://github.com/Armster15/expo-xml-font) documentation to learn how to use the `expo-xml-font` package.
|
|
125
|
+
|
|
126
|
+
## Babel configuration
|
|
127
|
+
|
|
128
|
+
You will need to add the following Babel plugin to your `babel.config.js` file:
|
|
129
|
+
|
|
130
|
+
```js
|
|
131
|
+
const unistylesPluginOptions = {
|
|
132
|
+
autoProcessImports: ['@utilitywarehouse/hearth-react-native'],
|
|
133
|
+
autoProcessPaths: ['@utilitywarehouse/hearth-react-native'],
|
|
134
|
+
autoProcessRoot: 'src', // Adjust this to your project's structure
|
|
135
|
+
debug: false, // Set to true for debugging purposes
|
|
136
|
+
};
|
|
137
|
+
|
|
138
|
+
module.exports = {
|
|
139
|
+
presets: ['module:metro-react-native-babel-preset'],
|
|
140
|
+
plugins: [
|
|
141
|
+
// other plugins...
|
|
142
|
+
'react-native-reanimated/plugin',
|
|
143
|
+
['react-native-unistyles/plugin', unistylesPluginOptions],
|
|
144
|
+
],
|
|
145
|
+
};
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Jest configuration
|
|
149
|
+
|
|
150
|
+
If you are using Jest for testing, you will need to add the following configuration to your `jest.config.js` file:
|
|
151
|
+
|
|
152
|
+
```js
|
|
153
|
+
module.exports = {
|
|
154
|
+
// other Jest configurations...
|
|
155
|
+
setupFiles: ['react-native-unistyles/mocks'],
|
|
156
|
+
// other Jest configurations...
|
|
157
|
+
};
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
You'll also need to add the following to your `jest.setup.js` file:
|
|
161
|
+
|
|
162
|
+
```js
|
|
163
|
+
import { StyleSheet, themes, breakpoints } from '@utilitywarehouse/hearth-react-native';
|
|
164
|
+
|
|
165
|
+
StyleSheet.configure({
|
|
166
|
+
themes,
|
|
167
|
+
breakpoints,
|
|
168
|
+
});
|
|
169
|
+
|
|
170
|
+
// rest of your setup...
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
<NextPrevPage nextLink="/?path=/docs/getting-started--docs" nextTitle="Getting Started" />
|