@utilitywarehouse/hearth-react-native 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.storybook/main.ts +55 -0
- package/.storybook/manager.ts +8 -0
- package/.storybook/preview.tsx +159 -0
- package/.storybook/vitest.setup.ts +7 -0
- package/.turbo/turbo-build.log +4 -0
- package/.turbo/turbo-lint.log +6 -0
- package/CHANGELOG.md +7 -0
- package/build/components/Accordion/Accordion.context.d.ts +13 -0
- package/build/components/Accordion/Accordion.context.js +5 -0
- package/build/components/Accordion/Accordion.d.ts +25 -0
- package/build/components/Accordion/Accordion.js +61 -0
- package/build/components/Accordion/Accordion.props.d.ts +42 -0
- package/build/components/Accordion/Accordion.props.js +1 -0
- package/build/components/Accordion/AccordionContent.d.ts +6 -0
- package/build/components/Accordion/AccordionContent.js +36 -0
- package/build/components/Accordion/AccordionContentText.d.ts +6 -0
- package/build/components/Accordion/AccordionContentText.js +7 -0
- package/build/components/Accordion/AccordionHeader.d.ts +6 -0
- package/build/components/Accordion/AccordionHeader.js +11 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.js +16 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.props.d.ts +14 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeading.props.js +1 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingHelperText.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingHelperText.js +13 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTextContent.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTextContent.js +14 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTitle.d.ts +6 -0
- package/build/components/Accordion/AccordionHeading/AccordionHeadingTitle.js +7 -0
- package/build/components/Accordion/AccordionHeading/index.d.ts +4 -0
- package/build/components/Accordion/AccordionHeading/index.js +4 -0
- package/build/components/Accordion/AccordionIcon.d.ts +6 -0
- package/build/components/Accordion/AccordionIcon.js +9 -0
- package/build/components/Accordion/AccordionItem.context.d.ts +9 -0
- package/build/components/Accordion/AccordionItem.context.js +5 -0
- package/build/components/Accordion/AccordionItem.props.d.ts +19 -0
- package/build/components/Accordion/AccordionItem.props.js +1 -0
- package/build/components/Accordion/AccordionItemRoot.d.ts +6 -0
- package/build/components/Accordion/AccordionItemRoot.js +17 -0
- package/build/components/Accordion/AccordionRoot.d.ts +6 -0
- package/build/components/Accordion/AccordionRoot.js +16 -0
- package/build/components/Accordion/AccordionTitleText.d.ts +6 -0
- package/build/components/Accordion/AccordionTitleText.js +11 -0
- package/build/components/Accordion/AccordionTrigger.d.ts +10 -0
- package/build/components/Accordion/AccordionTrigger.js +47 -0
- package/build/components/Accordion/index.d.ts +2 -0
- package/build/components/Accordion/index.js +2 -0
- package/build/components/Alert/Alert.context.d.ts +7 -0
- package/build/components/Alert/Alert.context.js +3 -0
- package/build/components/Alert/Alert.d.ts +6 -0
- package/build/components/Alert/Alert.js +56 -0
- package/build/components/Alert/Alert.props.d.ts +55 -0
- package/build/components/Alert/Alert.props.js +1 -0
- package/build/components/Alert/AlertCloseButton.d.ts +9 -0
- package/build/components/Alert/AlertCloseButton.js +15 -0
- package/build/components/Alert/AlertContent.d.ts +6 -0
- package/build/components/Alert/AlertContent.js +15 -0
- package/build/components/Alert/AlertIcon.d.ts +6 -0
- package/build/components/Alert/AlertIcon.js +30 -0
- package/build/components/Alert/AlertIconButton.d.ts +9 -0
- package/build/components/Alert/AlertIconButton.js +6 -0
- package/build/components/Alert/AlertLink.d.ts +6 -0
- package/build/components/Alert/AlertLink.js +7 -0
- package/build/components/Alert/AlertText.d.ts +8 -0
- package/build/components/Alert/AlertText.js +7 -0
- package/build/components/Alert/AlertTitle.d.ts +6 -0
- package/build/components/Alert/AlertTitle.js +7 -0
- package/build/components/Alert/index.d.ts +8 -0
- package/build/components/Alert/index.js +8 -0
- package/build/components/Badge/Badge.context.d.ts +10 -0
- package/build/components/Badge/Badge.context.js +3 -0
- package/build/components/Badge/Badge.d.ts +6 -0
- package/build/components/Badge/Badge.js +122 -0
- package/build/components/Badge/Badge.props.d.ts +9 -0
- package/build/components/Badge/Badge.props.js +1 -0
- package/build/components/Badge/BadgeIcon.d.ts +6 -0
- package/build/components/Badge/BadgeIcon.js +72 -0
- package/build/components/Badge/BadgeText.d.ts +6 -0
- package/build/components/Badge/BadgeText.js +68 -0
- package/build/components/Badge/index.d.ts +3 -0
- package/build/components/Badge/index.js +3 -0
- package/build/components/BodyText/BodyText.d.ts +6 -0
- package/build/components/BodyText/BodyText.js +95 -0
- package/build/components/BodyText/BodyText.props.d.ts +22 -0
- package/build/components/BodyText/BodyText.props.js +1 -0
- package/build/components/BodyText/index.d.ts +1 -0
- package/build/components/BodyText/index.js +1 -0
- package/build/components/BottomSheet/BottomSheet.context.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheet.context.js +6 -0
- package/build/components/BottomSheet/BottomSheet.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheet.js +31 -0
- package/build/components/BottomSheet/BottomSheet.props.d.ts +34 -0
- package/build/components/BottomSheet/BottomSheet.props.js +1 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheetBackdrop.js +20 -0
- package/build/components/BottomSheet/BottomSheetFlatList.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetFlatList.js +38 -0
- package/build/components/BottomSheet/BottomSheetHandle.d.ts +6 -0
- package/build/components/BottomSheet/BottomSheetHandle.js +29 -0
- package/build/components/BottomSheet/BottomSheetModal.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetModal.js +32 -0
- package/build/components/BottomSheet/BottomSheetScrollView.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetScrollView.js +34 -0
- package/build/components/BottomSheet/BottomSheetView.d.ts +8 -0
- package/build/components/BottomSheet/BottomSheetView.js +36 -0
- package/build/components/BottomSheet/index.d.ts +7 -0
- package/build/components/BottomSheet/index.js +6 -0
- package/build/components/BottomSheet/useBottomSheetLogic.d.ts +15 -0
- package/build/components/BottomSheet/useBottomSheetLogic.js +30 -0
- package/build/components/Box/Box.d.ts +6 -0
- package/build/components/Box/Box.js +53 -0
- package/build/components/Box/Box.props.d.ts +99 -0
- package/build/components/Box/Box.props.js +1 -0
- package/build/components/Box/index.d.ts +1 -0
- package/build/components/Box/index.js +1 -0
- package/build/components/Button/Button.context.d.ts +17 -0
- package/build/components/Button/Button.context.js +3 -0
- package/build/components/Button/Button.d.ts +20 -0
- package/build/components/Button/Button.js +60 -0
- package/build/components/Button/Button.props.d.ts +62 -0
- package/build/components/Button/Button.props.js +1 -0
- package/build/components/Button/ButtonGroup.context.d.ts +8 -0
- package/build/components/Button/ButtonGroup.context.js +3 -0
- package/build/components/Button/ButtonGroup.d.ts +11 -0
- package/build/components/Button/ButtonGroup.js +10 -0
- package/build/components/Button/ButtonGroupRoot.d.ts +11 -0
- package/build/components/Button/ButtonGroupRoot.js +52 -0
- package/build/components/Button/ButtonIcon.d.ts +6 -0
- package/build/components/Button/ButtonIcon.js +126 -0
- package/build/components/Button/ButtonRoot.d.ts +11 -0
- package/build/components/Button/ButtonRoot.js +426 -0
- package/build/components/Button/ButtonSpinner.d.ts +6 -0
- package/build/components/Button/ButtonSpinner.js +58 -0
- package/build/components/Button/ButtonText.d.ts +6 -0
- package/build/components/Button/ButtonText.js +109 -0
- package/build/components/Button/index.d.ts +3 -0
- package/build/components/Button/index.js +2 -0
- package/build/components/Card/Card.context.d.ts +6 -0
- package/build/components/Card/Card.context.js +6 -0
- package/build/components/Card/Card.d.ts +17 -0
- package/build/components/Card/Card.js +7 -0
- package/build/components/Card/Card.props.d.ts +17 -0
- package/build/components/Card/Card.props.js +1 -0
- package/build/components/Card/CardAction.context.d.ts +6 -0
- package/build/components/Card/CardAction.context.js +6 -0
- package/build/components/Card/CardAction.d.ts +8 -0
- package/build/components/Card/CardAction.js +13 -0
- package/build/components/Card/CardRoot.d.ts +11 -0
- package/build/components/Card/CardRoot.js +244 -0
- package/build/components/Card/index.d.ts +4 -0
- package/build/components/Card/index.js +4 -0
- package/build/components/Center/Center.d.ts +6 -0
- package/build/components/Center/Center.js +5 -0
- package/build/components/Center/index.d.ts +1 -0
- package/build/components/Center/index.js +1 -0
- package/build/components/Checkbox/Checkbox.context.d.ts +10 -0
- package/build/components/Checkbox/Checkbox.context.js +3 -0
- package/build/components/Checkbox/Checkbox.d.ts +21 -0
- package/build/components/Checkbox/Checkbox.js +44 -0
- package/build/components/Checkbox/Checkbox.props.d.ts +34 -0
- package/build/components/Checkbox/Checkbox.props.js +1 -0
- package/build/components/Checkbox/CheckboxGroup.context.d.ts +10 -0
- package/build/components/Checkbox/CheckboxGroup.context.js +3 -0
- package/build/components/Checkbox/CheckboxGroup.d.ts +6 -0
- package/build/components/Checkbox/CheckboxGroup.js +49 -0
- package/build/components/Checkbox/CheckboxGroup.props.d.ts +20 -0
- package/build/components/Checkbox/CheckboxGroup.props.js +1 -0
- package/build/components/Checkbox/CheckboxGroupRoot.d.ts +8 -0
- package/build/components/Checkbox/CheckboxGroupRoot.js +23 -0
- package/build/components/Checkbox/CheckboxGroupTextContent.d.ts +6 -0
- package/build/components/Checkbox/CheckboxGroupTextContent.js +7 -0
- package/build/components/Checkbox/CheckboxIcon.d.ts +6 -0
- package/build/components/Checkbox/CheckboxIcon.js +17 -0
- package/build/components/Checkbox/CheckboxIndicator.d.ts +6 -0
- package/build/components/Checkbox/CheckboxIndicator.js +56 -0
- package/build/components/Checkbox/CheckboxLabel.d.ts +6 -0
- package/build/components/Checkbox/CheckboxLabel.js +7 -0
- package/build/components/Checkbox/CheckboxRoot.d.ts +12 -0
- package/build/components/Checkbox/CheckboxRoot.js +42 -0
- package/build/components/Checkbox/CheckboxTextContent.d.ts +6 -0
- package/build/components/Checkbox/CheckboxTextContent.js +7 -0
- package/build/components/Checkbox/CheckboxTileRoot.d.ts +8 -0
- package/build/components/Checkbox/CheckboxTileRoot.js +36 -0
- package/build/components/Checkbox/index.d.ts +5 -0
- package/build/components/Checkbox/index.js +4 -0
- package/build/components/DetailText/DetailText.d.ts +6 -0
- package/build/components/DetailText/DetailText.js +115 -0
- package/build/components/DetailText/DetailText.props.d.ts +19 -0
- package/build/components/DetailText/DetailText.props.js +1 -0
- package/build/components/DetailText/index.d.ts +1 -0
- package/build/components/DetailText/index.js +1 -0
- package/build/components/Divider/Divider.d.ts +6 -0
- package/build/components/Divider/Divider.js +176 -0
- package/build/components/Divider/Divider.props.d.ts +11 -0
- package/build/components/Divider/Divider.props.js +1 -0
- package/build/components/Divider/index.d.ts +1 -0
- package/build/components/Divider/index.js +1 -0
- package/build/components/Flex/Flex.d.ts +6 -0
- package/build/components/Flex/Flex.js +23 -0
- package/build/components/Flex/Flex.props.d.ts +9 -0
- package/build/components/Flex/Flex.props.js +1 -0
- package/build/components/Flex/index.d.ts +1 -0
- package/build/components/Flex/index.js +1 -0
- package/build/components/FormField/FormFielInvalidIcon.d.ts +6 -0
- package/build/components/FormField/FormFielInvalidIcon.js +6 -0
- package/build/components/FormField/FormField.context.d.ts +3 -0
- package/build/components/FormField/FormField.context.js +3 -0
- package/build/components/FormField/FormField.d.ts +29 -0
- package/build/components/FormField/FormField.js +42 -0
- package/build/components/FormField/FormField.props.d.ts +16 -0
- package/build/components/FormField/FormField.props.js +1 -0
- package/build/components/FormField/FormFieldHelper.d.ts +6 -0
- package/build/components/FormField/FormFieldHelper.js +9 -0
- package/build/components/FormField/FormFieldInvalid.d.ts +6 -0
- package/build/components/FormField/FormFieldInvalid.js +10 -0
- package/build/components/FormField/FormFieldLabel.d.ts +6 -0
- package/build/components/FormField/FormFieldLabel.js +9 -0
- package/build/components/FormField/FormFieldRoot.d.ts +6 -0
- package/build/components/FormField/FormFieldRoot.js +14 -0
- package/build/components/FormField/FormFieldValid.d.ts +6 -0
- package/build/components/FormField/FormFieldValid.js +10 -0
- package/build/components/FormField/FormFieldValidIcon.d.ts +6 -0
- package/build/components/FormField/FormFieldValidIcon.js +6 -0
- package/build/components/FormField/index.d.ts +6 -0
- package/build/components/FormField/index.js +6 -0
- package/build/components/Grid/Grid.d.ts +6 -0
- package/build/components/Grid/Grid.js +97 -0
- package/build/components/Grid/Grid.props.d.ts +45 -0
- package/build/components/Grid/Grid.props.js +1 -0
- package/build/components/Grid/index.d.ts +2 -0
- package/build/components/Grid/index.js +1 -0
- package/build/components/HTMLElements/ListItem.d.ts +9 -0
- package/build/components/HTMLElements/ListItem.js +14 -0
- package/build/components/HTMLElements/OrderedList.d.ts +12 -0
- package/build/components/HTMLElements/OrderedList.js +28 -0
- package/build/components/HTMLElements/UnorderedList.d.ts +12 -0
- package/build/components/HTMLElements/UnorderedList.js +26 -0
- package/build/components/HTMLElements/index.d.ts +3 -0
- package/build/components/HTMLElements/index.js +3 -0
- package/build/components/Heading/Heading.d.ts +6 -0
- package/build/components/Heading/Heading.js +137 -0
- package/build/components/Heading/Heading.props.d.ts +18 -0
- package/build/components/Heading/Heading.props.js +1 -0
- package/build/components/Heading/index.d.ts +1 -0
- package/build/components/Heading/index.js +1 -0
- package/build/components/Helper/Helper.d.ts +6 -0
- package/build/components/Helper/Helper.js +36 -0
- package/build/components/Helper/Helper.props.d.ts +19 -0
- package/build/components/Helper/Helper.props.js +1 -0
- package/build/components/Helper/HelperContext.d.ts +3 -0
- package/build/components/Helper/HelperContext.js +3 -0
- package/build/components/Helper/HelperIcon.d.ts +6 -0
- package/build/components/Helper/HelperIcon.js +31 -0
- package/build/components/Helper/HelperText.d.ts +6 -0
- package/build/components/Helper/HelperText.js +32 -0
- package/build/components/Helper/index.d.ts +3 -0
- package/build/components/Helper/index.js +3 -0
- package/build/components/Icon/Icon.d.ts +8 -0
- package/build/components/Icon/Icon.js +44 -0
- package/build/components/Icon/Icon.props.d.ts +17 -0
- package/build/components/Icon/Icon.props.js +1 -0
- package/build/components/Icon/index.d.ts +2 -0
- package/build/components/Icon/index.js +1 -0
- package/build/components/IconButton/IconButton.context.d.ts +17 -0
- package/build/components/IconButton/IconButton.context.js +3 -0
- package/build/components/IconButton/IconButton.d.ts +6 -0
- package/build/components/IconButton/IconButton.js +26 -0
- package/build/components/IconButton/IconButton.props.d.ts +12 -0
- package/build/components/IconButton/IconButton.props.js +1 -0
- package/build/components/IconButton/IconButtonIcon.d.ts +6 -0
- package/build/components/IconButton/IconButtonIcon.js +142 -0
- package/build/components/IconButton/IconButtonRoot.d.ts +11 -0
- package/build/components/IconButton/IconButtonRoot.js +392 -0
- package/build/components/IconButton/IconButtonSpinner.d.ts +6 -0
- package/build/components/IconButton/IconButtonSpinner.js +59 -0
- package/build/components/IconButton/index.d.ts +2 -0
- package/build/components/IconButton/index.js +1 -0
- package/build/components/Icons/CircleIcon.d.ts +5 -0
- package/build/components/Icons/CircleIcon.js +10 -0
- package/build/components/Icons/index.d.ts +1 -0
- package/build/components/Icons/index.js +1 -0
- package/build/components/InlineLink/InlineLink.context.d.ts +11 -0
- package/build/components/InlineLink/InlineLink.context.js +3 -0
- package/build/components/InlineLink/InlineLink.d.ts +6 -0
- package/build/components/InlineLink/InlineLink.js +13 -0
- package/build/components/InlineLink/InlineLink.props.d.ts +8 -0
- package/build/components/InlineLink/InlineLink.props.js +1 -0
- package/build/components/InlineLink/InlineLinkRoot.d.ts +11 -0
- package/build/components/InlineLink/InlineLinkRoot.js +72 -0
- package/build/components/InlineLink/index.d.ts +3 -0
- package/build/components/InlineLink/index.js +2 -0
- package/build/components/Input/Input.context.d.ts +3 -0
- package/build/components/Input/Input.context.js +3 -0
- package/build/components/Input/Input.d.ts +23 -0
- package/build/components/Input/Input.js +81 -0
- package/build/components/Input/Input.props.d.ts +100 -0
- package/build/components/Input/Input.props.js +1 -0
- package/build/components/Input/InputField.d.ts +6 -0
- package/build/components/Input/InputField.js +82 -0
- package/build/components/Input/InputIcon.d.ts +9 -0
- package/build/components/Input/InputIcon.js +16 -0
- package/build/components/Input/InputRoot.d.ts +12 -0
- package/build/components/Input/InputRoot.js +67 -0
- package/build/components/Input/InputSlot.d.ts +6 -0
- package/build/components/Input/InputSlot.js +14 -0
- package/build/components/Input/index.d.ts +1 -0
- package/build/components/Input/index.js +1 -0
- package/build/components/Label/Label.d.ts +6 -0
- package/build/components/Label/Label.js +21 -0
- package/build/components/Label/Label.props.d.ts +6 -0
- package/build/components/Label/Label.props.js +1 -0
- package/build/components/Label/index.d.ts +1 -0
- package/build/components/Label/index.js +1 -0
- package/build/components/Link/Link.context.d.ts +11 -0
- package/build/components/Link/Link.context.js +3 -0
- package/build/components/Link/Link.d.ts +7 -0
- package/build/components/Link/Link.js +18 -0
- package/build/components/Link/Link.props.d.ts +13 -0
- package/build/components/Link/Link.props.js +1 -0
- package/build/components/Link/LinkIcon.d.ts +6 -0
- package/build/components/Link/LinkIcon.js +45 -0
- package/build/components/Link/LinkRoot.d.ts +11 -0
- package/build/components/Link/LinkRoot.js +50 -0
- package/build/components/Link/LinkText.d.ts +6 -0
- package/build/components/Link/LinkText.js +51 -0
- package/build/components/Link/index.d.ts +4 -0
- package/build/components/Link/index.js +3 -0
- package/build/components/List/List.context.d.ts +13 -0
- package/build/components/List/List.context.js +6 -0
- package/build/components/List/List.d.ts +6 -0
- package/build/components/List/List.js +64 -0
- package/build/components/List/List.props.d.ts +19 -0
- package/build/components/List/List.props.js +1 -0
- package/build/components/List/ListHeading/ListHeading.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeading.js +20 -0
- package/build/components/List/ListHeading/ListHeading.props.d.ts +33 -0
- package/build/components/List/ListHeading/ListHeading.props.js +1 -0
- package/build/components/List/ListHeading/ListHeadingHelperText.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingHelperText.js +13 -0
- package/build/components/List/ListHeading/ListHeadingTextContent.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingTextContent.js +14 -0
- package/build/components/List/ListHeading/ListHeadingTitle.d.ts +6 -0
- package/build/components/List/ListHeading/ListHeadingTitle.js +7 -0
- package/build/components/List/ListHeading/index.d.ts +4 -0
- package/build/components/List/ListHeading/index.js +4 -0
- package/build/components/List/ListItem/ListItem.context.d.ts +7 -0
- package/build/components/List/ListItem/ListItem.context.js +3 -0
- package/build/components/List/ListItem/ListItem.d.ts +17 -0
- package/build/components/List/ListItem/ListItem.js +7 -0
- package/build/components/List/ListItem/ListItem.props.d.ts +26 -0
- package/build/components/List/ListItem/ListItem.props.js +1 -0
- package/build/components/List/ListItem/ListItemContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemContent.js +14 -0
- package/build/components/List/ListItem/ListItemHelperText.d.ts +6 -0
- package/build/components/List/ListItem/ListItemHelperText.js +13 -0
- package/build/components/List/ListItem/ListItemIcon.d.ts +9 -0
- package/build/components/List/ListItem/ListItemIcon.js +18 -0
- package/build/components/List/ListItem/ListItemLeadingContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemLeadingContent.js +5 -0
- package/build/components/List/ListItem/ListItemRoot.d.ts +11 -0
- package/build/components/List/ListItem/ListItemRoot.js +126 -0
- package/build/components/List/ListItem/ListItemText.d.ts +6 -0
- package/build/components/List/ListItem/ListItemText.js +7 -0
- package/build/components/List/ListItem/ListItemTrailingContent.d.ts +6 -0
- package/build/components/List/ListItem/ListItemTrailingContent.js +5 -0
- package/build/components/List/ListItem/ListItemTrailingIcon.d.ts +9 -0
- package/build/components/List/ListItem/ListItemTrailingIcon.js +18 -0
- package/build/components/List/ListItem/index.d.ts +9 -0
- package/build/components/List/ListItem/index.js +8 -0
- package/build/components/List/index.d.ts +4 -0
- package/build/components/List/index.js +4 -0
- package/build/components/Radio/Radio.context.d.ts +10 -0
- package/build/components/Radio/Radio.context.js +3 -0
- package/build/components/Radio/Radio.d.ts +21 -0
- package/build/components/Radio/Radio.js +40 -0
- package/build/components/Radio/Radio.props.d.ts +29 -0
- package/build/components/Radio/Radio.props.js +1 -0
- package/build/components/Radio/RadioGroup.context.d.ts +10 -0
- package/build/components/Radio/RadioGroup.context.js +3 -0
- package/build/components/Radio/RadioGroup.d.ts +6 -0
- package/build/components/Radio/RadioGroup.js +49 -0
- package/build/components/Radio/RadioGroup.props.d.ts +20 -0
- package/build/components/Radio/RadioGroup.props.js +1 -0
- package/build/components/Radio/RadioGroupRoot.d.ts +8 -0
- package/build/components/Radio/RadioGroupRoot.js +23 -0
- package/build/components/Radio/RadioGroupTextContent.d.ts +6 -0
- package/build/components/Radio/RadioGroupTextContent.js +7 -0
- package/build/components/Radio/RadioIcon.d.ts +6 -0
- package/build/components/Radio/RadioIcon.js +20 -0
- package/build/components/Radio/RadioIndicator.d.ts +6 -0
- package/build/components/Radio/RadioIndicator.js +56 -0
- package/build/components/Radio/RadioLabel.d.ts +6 -0
- package/build/components/Radio/RadioLabel.js +7 -0
- package/build/components/Radio/RadioRoot.d.ts +12 -0
- package/build/components/Radio/RadioRoot.js +42 -0
- package/build/components/Radio/RadioTextContent.d.ts +6 -0
- package/build/components/Radio/RadioTextContent.js +7 -0
- package/build/components/Radio/RadioTileRoot.d.ts +8 -0
- package/build/components/Radio/RadioTileRoot.js +36 -0
- package/build/components/Radio/index.d.ts +5 -0
- package/build/components/Radio/index.js +4 -0
- package/build/components/RadioCard/RadioCard.context.d.ts +8 -0
- package/build/components/RadioCard/RadioCard.context.js +3 -0
- package/build/components/RadioCard/RadioCard.d.ts +36 -0
- package/build/components/RadioCard/RadioCard.js +38 -0
- package/build/components/RadioCard/RadioCard.props.d.ts +16 -0
- package/build/components/RadioCard/RadioCard.props.js +1 -0
- package/build/components/RadioCard/RadioCardGroup.d.ts +6 -0
- package/build/components/RadioCard/RadioCardGroup.js +23 -0
- package/build/components/RadioCard/RadioCardGroup.props.d.ts +26 -0
- package/build/components/RadioCard/RadioCardGroup.props.js +1 -0
- package/build/components/RadioCard/RadioCardIcon.d.ts +6 -0
- package/build/components/RadioCard/RadioCardIcon.js +20 -0
- package/build/components/RadioCard/RadioCardIndicator.d.ts +6 -0
- package/build/components/RadioCard/RadioCardIndicator.js +56 -0
- package/build/components/RadioCard/RadioCardLabel.d.ts +6 -0
- package/build/components/RadioCard/RadioCardLabel.js +5 -0
- package/build/components/RadioCard/RadioCardRoot.d.ts +12 -0
- package/build/components/RadioCard/RadioCardRoot.js +48 -0
- package/build/components/RadioCard/index.d.ts +2 -0
- package/build/components/RadioCard/index.js +1 -0
- package/build/components/Select/Select.context.d.ts +8 -0
- package/build/components/Select/Select.context.js +7 -0
- package/build/components/Select/Select.d.ts +6 -0
- package/build/components/Select/Select.js +167 -0
- package/build/components/Select/Select.props.d.ts +126 -0
- package/build/components/Select/Select.props.js +1 -0
- package/build/components/Select/SelectOption.d.ts +6 -0
- package/build/components/Select/SelectOption.js +65 -0
- package/build/components/Select/index.d.ts +3 -0
- package/build/components/Select/index.js +2 -0
- package/build/components/Skeleton/Skeleton.d.ts +6 -0
- package/build/components/Skeleton/Skeleton.js +43 -0
- package/build/components/Skeleton/Skeleton.props.d.ts +9 -0
- package/build/components/Skeleton/Skeleton.props.js +1 -0
- package/build/components/Skeleton/index.d.ts +1 -0
- package/build/components/Skeleton/index.js +1 -0
- package/build/components/Spinner/Spinner.d.ts +3 -0
- package/build/components/Spinner/Spinner.js +85 -0
- package/build/components/Spinner/Spinner.props.d.ts +8 -0
- package/build/components/Spinner/Spinner.props.js +1 -0
- package/build/components/Spinner/Spinner.web.d.ts +3 -0
- package/build/components/Spinner/Spinner.web.js +81 -0
- package/build/components/Spinner/index.d.ts +2 -0
- package/build/components/Spinner/index.js +1 -0
- package/build/components/Switch/Switch.d.ts +3 -0
- package/build/components/Switch/Switch.js +140 -0
- package/build/components/Switch/Switch.props.d.ts +8 -0
- package/build/components/Switch/Switch.props.js +1 -0
- package/build/components/Switch/Switch.web.d.ts +3 -0
- package/build/components/Switch/Switch.web.js +142 -0
- package/build/components/Switch/index.d.ts +1 -0
- package/build/components/Switch/index.js +1 -0
- package/build/components/Textarea/Textarea.context.d.ts +3 -0
- package/build/components/Textarea/Textarea.context.js +3 -0
- package/build/components/Textarea/Textarea.d.ts +11 -0
- package/build/components/Textarea/Textarea.js +17 -0
- package/build/components/Textarea/Textarea.props.d.ts +39 -0
- package/build/components/Textarea/Textarea.props.js +1 -0
- package/build/components/Textarea/TextareaField.d.ts +6 -0
- package/build/components/Textarea/TextareaField.js +31 -0
- package/build/components/Textarea/TextareaRoot.d.ts +12 -0
- package/build/components/Textarea/TextareaRoot.js +58 -0
- package/build/components/Textarea/index.d.ts +1 -0
- package/build/components/Textarea/index.js +1 -0
- package/build/components/ToggleButton/ToggleButton.d.ts +16 -0
- package/build/components/ToggleButton/ToggleButton.js +21 -0
- package/build/components/ToggleButton/ToggleButton.props.d.ts +6 -0
- package/build/components/ToggleButton/ToggleButton.props.js +1 -0
- package/build/components/ToggleButton/ToggleButtonIcon.d.ts +8 -0
- package/build/components/ToggleButton/ToggleButtonIcon.js +26 -0
- package/build/components/ToggleButton/ToggleButtonRoot.d.ts +11 -0
- package/build/components/ToggleButton/ToggleButtonRoot.js +77 -0
- package/build/components/ToggleButton/ToggleButtonText.d.ts +8 -0
- package/build/components/ToggleButton/ToggleButtonText.js +21 -0
- package/build/components/ToggleButton/index.d.ts +2 -0
- package/build/components/ToggleButton/index.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.context.d.ts +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.context.js +3 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.d.ts +8 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.js +22 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.props.d.ts +15 -0
- package/build/components/ToggleButtonCard/ToggleButtonCard.props.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.d.ts +6 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.js +23 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.d.ts +24 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardGroup.props.js +1 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.d.ts +12 -0
- package/build/components/ToggleButtonCard/ToggleButtonCardRoot.js +63 -0
- package/build/components/ToggleButtonCard/index.d.ts +2 -0
- package/build/components/ToggleButtonCard/index.js +1 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.context.d.ts +13 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.context.js +3 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.js +26 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.d.ts +11 -0
- package/build/components/UnstyledIconButton/UnstyledIconButton.props.js +1 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonIcon.js +60 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.d.ts +11 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonRoot.js +41 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonSpinner.d.ts +6 -0
- package/build/components/UnstyledIconButton/UnstyledIconButtonSpinner.js +25 -0
- package/build/components/UnstyledIconButton/index.d.ts +2 -0
- package/build/components/UnstyledIconButton/index.js +1 -0
- package/build/components/index.d.ts +36 -0
- package/build/components/index.js +37 -0
- package/build/core/breakpoints.d.ts +10 -0
- package/build/core/breakpoints.js +10 -0
- package/build/core/index.d.ts +5 -0
- package/build/core/index.js +14 -0
- package/build/core/themes.d.ts +3760 -0
- package/build/core/themes.js +247 -0
- package/build/hooks/index.d.ts +6 -0
- package/build/hooks/index.js +6 -0
- package/build/hooks/useBreakpointValue.d.ts +9 -0
- package/build/hooks/useBreakpointValue.js +34 -0
- package/build/hooks/useColorMode.d.ts +2 -0
- package/build/hooks/useColorMode.js +13 -0
- package/build/hooks/useMedia.d.ts +2 -0
- package/build/hooks/useMedia.js +22 -0
- package/build/hooks/useStyleProps.d.ts +16 -0
- package/build/hooks/useStyleProps.js +44 -0
- package/build/hooks/useTheme.d.ts +2 -0
- package/build/hooks/useTheme.js +6 -0
- package/build/hooks/useToken.d.ts +52 -0
- package/build/hooks/useToken.js +13 -0
- package/build/index.d.ts +3 -0
- package/build/index.js +4 -0
- package/build/tokens/border-radius.d.ts +13 -0
- package/build/tokens/border-radius.js +12 -0
- package/build/tokens/border-width.d.ts +8 -0
- package/build/tokens/border-width.js +7 -0
- package/build/tokens/color.d.ts +496 -0
- package/build/tokens/color.js +267 -0
- package/build/tokens/components/dark/accordion.d.ts +29 -0
- package/build/tokens/components/dark/accordion.js +28 -0
- package/build/tokens/components/dark/alert.d.ts +27 -0
- package/build/tokens/components/dark/alert.js +26 -0
- package/build/tokens/components/dark/badge.d.ts +51 -0
- package/build/tokens/components/dark/badge.js +50 -0
- package/build/tokens/components/dark/banner.d.ts +43 -0
- package/build/tokens/components/dark/banner.js +42 -0
- package/build/tokens/components/dark/bottom-navigation.d.ts +35 -0
- package/build/tokens/components/dark/bottom-navigation.js +34 -0
- package/build/tokens/components/dark/bottom-sheet.d.ts +17 -0
- package/build/tokens/components/dark/bottom-sheet.js +16 -0
- package/build/tokens/components/dark/breadcrumb.d.ts +8 -0
- package/build/tokens/components/dark/breadcrumb.js +7 -0
- package/build/tokens/components/dark/button.d.ts +104 -0
- package/build/tokens/components/dark/button.js +103 -0
- package/build/tokens/components/dark/card.d.ts +63 -0
- package/build/tokens/components/dark/card.js +62 -0
- package/build/tokens/components/dark/carousel-control.d.ts +19 -0
- package/build/tokens/components/dark/carousel-control.js +18 -0
- package/build/tokens/components/dark/checkbox.d.ts +45 -0
- package/build/tokens/components/dark/checkbox.js +44 -0
- package/build/tokens/components/dark/date-picker.d.ts +55 -0
- package/build/tokens/components/dark/date-picker.js +54 -0
- package/build/tokens/components/dark/dialog.d.ts +25 -0
- package/build/tokens/components/dark/dialog.js +24 -0
- package/build/tokens/components/dark/divider.d.ts +8 -0
- package/build/tokens/components/dark/divider.js +7 -0
- package/build/tokens/components/dark/focus.d.ts +8 -0
- package/build/tokens/components/dark/focus.js +7 -0
- package/build/tokens/components/dark/footer.d.ts +12 -0
- package/build/tokens/components/dark/footer.js +11 -0
- package/build/tokens/components/dark/form-field.d.ts +10 -0
- package/build/tokens/components/dark/form-field.js +9 -0
- package/build/tokens/components/dark/icon-button.d.ts +39 -0
- package/build/tokens/components/dark/icon-button.js +38 -0
- package/build/tokens/components/dark/icon-container.d.ts +42 -0
- package/build/tokens/components/dark/icon-container.js +41 -0
- package/build/tokens/components/dark/icon.d.ts +15 -0
- package/build/tokens/components/dark/icon.js +14 -0
- package/build/tokens/components/dark/index.d.ts +43 -0
- package/build/tokens/components/dark/index.js +43 -0
- package/build/tokens/components/dark/inline-link.d.ts +14 -0
- package/build/tokens/components/dark/inline-link.js +13 -0
- package/build/tokens/components/dark/input.d.ts +42 -0
- package/build/tokens/components/dark/input.js +41 -0
- package/build/tokens/components/dark/link.d.ts +15 -0
- package/build/tokens/components/dark/link.js +14 -0
- package/build/tokens/components/dark/list.d.ts +45 -0
- package/build/tokens/components/dark/list.js +44 -0
- package/build/tokens/components/dark/menu.d.ts +46 -0
- package/build/tokens/components/dark/menu.js +45 -0
- package/build/tokens/components/dark/modal.d.ts +28 -0
- package/build/tokens/components/dark/modal.js +27 -0
- package/build/tokens/components/dark/navigation.d.ts +24 -0
- package/build/tokens/components/dark/navigation.js +23 -0
- package/build/tokens/components/dark/overlay.d.ts +8 -0
- package/build/tokens/components/dark/overlay.js +7 -0
- package/build/tokens/components/dark/parts.d.ts +23 -0
- package/build/tokens/components/dark/parts.js +22 -0
- package/build/tokens/components/dark/pill.d.ts +26 -0
- package/build/tokens/components/dark/pill.js +25 -0
- package/build/tokens/components/dark/progress-stepper.d.ts +32 -0
- package/build/tokens/components/dark/progress-stepper.js +31 -0
- package/build/tokens/components/dark/radio.d.ts +43 -0
- package/build/tokens/components/dark/radio.js +42 -0
- package/build/tokens/components/dark/segmented-control.d.ts +27 -0
- package/build/tokens/components/dark/segmented-control.js +26 -0
- package/build/tokens/components/dark/select.d.ts +55 -0
- package/build/tokens/components/dark/select.js +54 -0
- package/build/tokens/components/dark/skeleton.d.ts +7 -0
- package/build/tokens/components/dark/skeleton.js +6 -0
- package/build/tokens/components/dark/spinner.d.ts +24 -0
- package/build/tokens/components/dark/spinner.js +23 -0
- package/build/tokens/components/dark/switch.d.ts +35 -0
- package/build/tokens/components/dark/switch.js +34 -0
- package/build/tokens/components/dark/text.d.ts +11 -0
- package/build/tokens/components/dark/text.js +10 -0
- package/build/tokens/components/dark/toggle-button.d.ts +24 -0
- package/build/tokens/components/dark/toggle-button.js +23 -0
- package/build/tokens/components/dark/top-navigation.d.ts +26 -0
- package/build/tokens/components/dark/top-navigation.js +25 -0
- package/build/tokens/components/index.d.ts +5 -0
- package/build/tokens/components/index.js +5 -0
- package/build/tokens/components/light/accordion.d.ts +29 -0
- package/build/tokens/components/light/accordion.js +28 -0
- package/build/tokens/components/light/alert.d.ts +27 -0
- package/build/tokens/components/light/alert.js +26 -0
- package/build/tokens/components/light/badge.d.ts +51 -0
- package/build/tokens/components/light/badge.js +50 -0
- package/build/tokens/components/light/banner.d.ts +43 -0
- package/build/tokens/components/light/banner.js +42 -0
- package/build/tokens/components/light/bottom-navigation.d.ts +35 -0
- package/build/tokens/components/light/bottom-navigation.js +34 -0
- package/build/tokens/components/light/bottom-sheet.d.ts +17 -0
- package/build/tokens/components/light/bottom-sheet.js +16 -0
- package/build/tokens/components/light/breadcrumb.d.ts +8 -0
- package/build/tokens/components/light/breadcrumb.js +7 -0
- package/build/tokens/components/light/button.d.ts +104 -0
- package/build/tokens/components/light/button.js +103 -0
- package/build/tokens/components/light/card.d.ts +63 -0
- package/build/tokens/components/light/card.js +62 -0
- package/build/tokens/components/light/carousel-control.d.ts +19 -0
- package/build/tokens/components/light/carousel-control.js +18 -0
- package/build/tokens/components/light/checkbox.d.ts +45 -0
- package/build/tokens/components/light/checkbox.js +44 -0
- package/build/tokens/components/light/date-picker.d.ts +55 -0
- package/build/tokens/components/light/date-picker.js +54 -0
- package/build/tokens/components/light/dialog.d.ts +25 -0
- package/build/tokens/components/light/dialog.js +24 -0
- package/build/tokens/components/light/divider.d.ts +8 -0
- package/build/tokens/components/light/divider.js +7 -0
- package/build/tokens/components/light/focus.d.ts +8 -0
- package/build/tokens/components/light/focus.js +7 -0
- package/build/tokens/components/light/footer.d.ts +12 -0
- package/build/tokens/components/light/footer.js +11 -0
- package/build/tokens/components/light/form-field.d.ts +10 -0
- package/build/tokens/components/light/form-field.js +9 -0
- package/build/tokens/components/light/icon-button.d.ts +39 -0
- package/build/tokens/components/light/icon-button.js +38 -0
- package/build/tokens/components/light/icon-container.d.ts +42 -0
- package/build/tokens/components/light/icon-container.js +41 -0
- package/build/tokens/components/light/icon.d.ts +15 -0
- package/build/tokens/components/light/icon.js +14 -0
- package/build/tokens/components/light/index.d.ts +43 -0
- package/build/tokens/components/light/index.js +43 -0
- package/build/tokens/components/light/inline-link.d.ts +14 -0
- package/build/tokens/components/light/inline-link.js +13 -0
- package/build/tokens/components/light/input.d.ts +42 -0
- package/build/tokens/components/light/input.js +41 -0
- package/build/tokens/components/light/link.d.ts +15 -0
- package/build/tokens/components/light/link.js +14 -0
- package/build/tokens/components/light/list.d.ts +45 -0
- package/build/tokens/components/light/list.js +44 -0
- package/build/tokens/components/light/menu.d.ts +46 -0
- package/build/tokens/components/light/menu.js +45 -0
- package/build/tokens/components/light/modal.d.ts +28 -0
- package/build/tokens/components/light/modal.js +27 -0
- package/build/tokens/components/light/navigation.d.ts +24 -0
- package/build/tokens/components/light/navigation.js +23 -0
- package/build/tokens/components/light/overlay.d.ts +8 -0
- package/build/tokens/components/light/overlay.js +7 -0
- package/build/tokens/components/light/parts.d.ts +23 -0
- package/build/tokens/components/light/parts.js +22 -0
- package/build/tokens/components/light/pill.d.ts +26 -0
- package/build/tokens/components/light/pill.js +25 -0
- package/build/tokens/components/light/progress-stepper.d.ts +32 -0
- package/build/tokens/components/light/progress-stepper.js +31 -0
- package/build/tokens/components/light/radio.d.ts +43 -0
- package/build/tokens/components/light/radio.js +42 -0
- package/build/tokens/components/light/segmented-control.d.ts +27 -0
- package/build/tokens/components/light/segmented-control.js +26 -0
- package/build/tokens/components/light/select.d.ts +55 -0
- package/build/tokens/components/light/select.js +54 -0
- package/build/tokens/components/light/skeleton.d.ts +7 -0
- package/build/tokens/components/light/skeleton.js +6 -0
- package/build/tokens/components/light/spinner.d.ts +24 -0
- package/build/tokens/components/light/spinner.js +23 -0
- package/build/tokens/components/light/switch.d.ts +35 -0
- package/build/tokens/components/light/switch.js +34 -0
- package/build/tokens/components/light/text.d.ts +11 -0
- package/build/tokens/components/light/text.js +10 -0
- package/build/tokens/components/light/toggle-button.d.ts +24 -0
- package/build/tokens/components/light/toggle-button.js +23 -0
- package/build/tokens/components/light/top-navigation.d.ts +26 -0
- package/build/tokens/components/light/top-navigation.js +25 -0
- package/build/tokens/font.d.ts +35 -0
- package/build/tokens/font.js +34 -0
- package/build/tokens/index.d.ts +17 -0
- package/build/tokens/index.js +17 -0
- package/build/tokens/layout.d.ts +162 -0
- package/build/tokens/layout.js +83 -0
- package/build/tokens/letter-spacing.d.ts +22 -0
- package/build/tokens/letter-spacing.js +21 -0
- package/build/tokens/line-height.d.ts +21 -0
- package/build/tokens/line-height.js +20 -0
- package/build/tokens/primitive.d.ts +105 -0
- package/build/tokens/primitive.js +104 -0
- package/build/tokens/semantic-dark.d.ts +25 -0
- package/build/tokens/semantic-dark.js +24 -0
- package/build/tokens/semantic-light.d.ts +25 -0
- package/build/tokens/semantic-light.js +24 -0
- package/build/tokens/shadow.d.ts +90 -0
- package/build/tokens/shadow.js +47 -0
- package/build/tokens/space.d.ts +24 -0
- package/build/tokens/space.js +23 -0
- package/build/tokens/typography.d.ts +516 -0
- package/build/tokens/typography.js +260 -0
- package/build/types/index.d.ts +4 -0
- package/build/types/index.js +4 -0
- package/build/types/refs.d.ts +7 -0
- package/build/types/refs.js +1 -0
- package/build/types/states.d.ts +11 -0
- package/build/types/states.js +1 -0
- package/build/types/unistyles.d.ts +10 -0
- package/build/types/unistyles.js +1 -0
- package/build/types/values.d.ts +25 -0
- package/build/types/values.js +1 -0
- package/build/utils/coloursAsArray.d.ts +2 -0
- package/build/utils/coloursAsArray.js +12 -0
- package/build/utils/getFlattenedColorValue.d.ts +4 -0
- package/build/utils/getFlattenedColorValue.js +23 -0
- package/build/utils/getStyleValue.d.ts +2 -0
- package/build/utils/getStyleValue.js +8 -0
- package/build/utils/hasChildrenByDisplayName.d.ts +3 -0
- package/build/utils/hasChildrenByDisplayName.js +30 -0
- package/build/utils/index.d.ts +4 -0
- package/build/utils/index.js +4 -0
- package/build/utils/styleUtils.d.ts +21 -0
- package/build/utils/styleUtils.js +238 -0
- package/docs/all-components.mdx +19 -0
- package/docs/assets/react-native-pig.png +0 -0
- package/docs/components/AdvancedInputExample.tsx +39 -0
- package/docs/components/AdvancedRadioExample.tsx +126 -0
- package/docs/components/AllComponents.web.tsx +442 -0
- package/docs/components/BackToTopButton.tsx +58 -0
- package/docs/components/BadgeList.tsx +66 -0
- package/docs/components/DocComponentWrap.tsx +7 -0
- package/docs/components/NextPrevPage.tsx +62 -0
- package/docs/components/SwitchExample.tsx +13 -0
- package/docs/components/SwitchList.tsx +56 -0
- package/docs/components/UsageWrap.tsx +24 -0
- package/docs/components/VariantTitle.tsx +30 -0
- package/docs/components/ViewFigmaButton.tsx +43 -0
- package/docs/components/index.ts +11 -0
- package/docs/getting-started.mdx +50 -0
- package/docs/hooks.mdx +526 -0
- package/docs/introduction.mdx +173 -0
- package/docs/layout-components.docs.mdx +81 -0
- package/docs/llm-docs/unistyles-llms-full.txt +8537 -0
- package/docs/llm-docs/unistyles-llms-small.txt +247 -0
- package/docs/styling.mdx +883 -0
- package/docs/theme-tokens.mdx +524 -0
- package/eslint.config.js +30 -0
- package/figma.config.json +11 -0
- package/package.json +82 -0
- package/scripts/copyTokens.js +96 -0
- package/src/components/Accordion/Accordion.context.tsx +13 -0
- package/src/components/Accordion/Accordion.docs.mdx +306 -0
- package/src/components/Accordion/Accordion.props.ts +43 -0
- package/src/components/Accordion/Accordion.stories.tsx +118 -0
- package/src/components/Accordion/Accordion.tsx +127 -0
- package/src/components/Accordion/AccordionContent.tsx +44 -0
- package/src/components/Accordion/AccordionContentText.tsx +10 -0
- package/src/components/Accordion/AccordionHeader.tsx +18 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeading.props.ts +19 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeading.tsx +38 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingHelperText.tsx +22 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingTextContent.tsx +21 -0
- package/src/components/Accordion/AccordionHeading/AccordionHeadingTitle.tsx +14 -0
- package/src/components/Accordion/AccordionHeading/index.ts +4 -0
- package/src/components/Accordion/AccordionIcon.tsx +11 -0
- package/src/components/Accordion/AccordionItem.context.tsx +11 -0
- package/src/components/Accordion/AccordionItem.props.ts +20 -0
- package/src/components/Accordion/AccordionItemRoot.tsx +27 -0
- package/src/components/Accordion/AccordionRoot.tsx +35 -0
- package/src/components/Accordion/AccordionTitleText.tsx +19 -0
- package/src/components/Accordion/AccordionTrigger.tsx +54 -0
- package/src/components/Accordion/index.ts +11 -0
- package/src/components/Alert/Alert.context.ts +8 -0
- package/src/components/Alert/Alert.docs.mdx +132 -0
- package/src/components/Alert/Alert.props.ts +67 -0
- package/src/components/Alert/Alert.stories.tsx +87 -0
- package/src/components/Alert/Alert.tsx +109 -0
- package/src/components/Alert/AlertCloseButton.tsx +26 -0
- package/src/components/Alert/AlertContent.tsx +22 -0
- package/src/components/Alert/AlertIcon.tsx +38 -0
- package/src/components/Alert/AlertIconButton.tsx +16 -0
- package/src/components/Alert/AlertLink.tsx +9 -0
- package/src/components/Alert/AlertText.tsx +14 -0
- package/src/components/Alert/AlertTitle.tsx +14 -0
- package/src/components/Alert/index.ts +8 -0
- package/src/components/Badge/Badge.context.ts +9 -0
- package/src/components/Badge/Badge.docs.mdx +101 -0
- package/src/components/Badge/Badge.figma.tsx +32 -0
- package/src/components/Badge/Badge.props.ts +11 -0
- package/src/components/Badge/Badge.stories.tsx +137 -0
- package/src/components/Badge/Badge.tsx +140 -0
- package/src/components/Badge/BadgeIcon.tsx +76 -0
- package/src/components/Badge/BadgeText.tsx +77 -0
- package/src/components/Badge/index.ts +3 -0
- package/src/components/BodyText/BodyText.docs.mdx +74 -0
- package/src/components/BodyText/BodyText.props.ts +24 -0
- package/src/components/BodyText/BodyText.stories.tsx +141 -0
- package/src/components/BodyText/BodyText.tsx +129 -0
- package/src/components/BodyText/index.ts +1 -0
- package/src/components/BottomSheet/BottomSheet.context.ts +12 -0
- package/src/components/BottomSheet/BottomSheet.docs.mdx +172 -0
- package/src/components/BottomSheet/BottomSheet.props.ts +49 -0
- package/src/components/BottomSheet/BottomSheet.stories.tsx +335 -0
- package/src/components/BottomSheet/BottomSheet.tsx +64 -0
- package/src/components/BottomSheet/BottomSheetBackdrop.tsx +30 -0
- package/src/components/BottomSheet/BottomSheetFlatList.tsx +53 -0
- package/src/components/BottomSheet/BottomSheetHandle.tsx +37 -0
- package/src/components/BottomSheet/BottomSheetModal.tsx +62 -0
- package/src/components/BottomSheet/BottomSheetScrollView.tsx +56 -0
- package/src/components/BottomSheet/BottomSheetView.tsx +52 -0
- package/src/components/BottomSheet/index.ts +17 -0
- package/src/components/BottomSheet/useBottomSheetLogic.tsx +53 -0
- package/src/components/Box/Box.docs.mdx +75 -0
- package/src/components/Box/Box.props.ts +234 -0
- package/src/components/Box/Box.stories.tsx +70 -0
- package/src/components/Box/Box.tsx +78 -0
- package/src/components/Box/index.ts +1 -0
- package/src/components/Button/Button.context.ts +13 -0
- package/src/components/Button/Button.docs.mdx +288 -0
- package/src/components/Button/Button.figma.tsx +229 -0
- package/src/components/Button/Button.props.tsx +84 -0
- package/src/components/Button/Button.stories.tsx +257 -0
- package/src/components/Button/Button.tsx +83 -0
- package/src/components/Button/ButtonGroup.context.ts +5 -0
- package/src/components/Button/ButtonGroup.tsx +25 -0
- package/src/components/Button/ButtonGroupRoot.tsx +70 -0
- package/src/components/Button/ButtonIcon.tsx +140 -0
- package/src/components/Button/ButtonRoot.tsx +452 -0
- package/src/components/Button/ButtonSpinner.tsx +63 -0
- package/src/components/Button/ButtonText.tsx +117 -0
- package/src/components/Button/index.ts +3 -0
- package/src/components/Card/Card.context.ts +12 -0
- package/src/components/Card/Card.docs.mdx +107 -0
- package/src/components/Card/Card.figma.tsx +73 -0
- package/src/components/Card/Card.props.ts +28 -0
- package/src/components/Card/Card.stories.tsx +235 -0
- package/src/components/Card/Card.tsx +10 -0
- package/src/components/Card/CardAction.context.ts +12 -0
- package/src/components/Card/CardAction.tsx +18 -0
- package/src/components/Card/CardRoot.tsx +288 -0
- package/src/components/Card/index.ts +4 -0
- package/src/components/Center/Center.docs.mdx +39 -0
- package/src/components/Center/Center.stories.tsx +30 -0
- package/src/components/Center/Center.tsx +12 -0
- package/src/components/Center/index.ts +1 -0
- package/src/components/Checkbox/Checkbox.context.ts +9 -0
- package/src/components/Checkbox/Checkbox.docs.mdx +371 -0
- package/src/components/Checkbox/Checkbox.figma.tsx +44 -0
- package/src/components/Checkbox/Checkbox.props.ts +43 -0
- package/src/components/Checkbox/Checkbox.stories.tsx +149 -0
- package/src/components/Checkbox/Checkbox.tsx +101 -0
- package/src/components/Checkbox/CheckboxGroup.context.ts +9 -0
- package/src/components/Checkbox/CheckboxGroup.props.ts +22 -0
- package/src/components/Checkbox/CheckboxGroup.stories.tsx +82 -0
- package/src/components/Checkbox/CheckboxGroup.tsx +110 -0
- package/src/components/Checkbox/CheckboxGroupRoot.tsx +36 -0
- package/src/components/Checkbox/CheckboxGroupTextContent.tsx +14 -0
- package/src/components/Checkbox/CheckboxIcon.tsx +29 -0
- package/src/components/Checkbox/CheckboxIndicator.figma.tsx +19 -0
- package/src/components/Checkbox/CheckboxIndicator.tsx +63 -0
- package/src/components/Checkbox/CheckboxLabel.tsx +14 -0
- package/src/components/Checkbox/CheckboxRoot.tsx +64 -0
- package/src/components/Checkbox/CheckboxTextContent.tsx +14 -0
- package/src/components/Checkbox/CheckboxTileRoot.tsx +39 -0
- package/src/components/Checkbox/index.ts +11 -0
- package/src/components/DetailText/DetailText.docs.mdx +73 -0
- package/src/components/DetailText/DetailText.props.ts +21 -0
- package/src/components/DetailText/DetailText.stories.tsx +149 -0
- package/src/components/DetailText/DetailText.tsx +148 -0
- package/src/components/DetailText/index.ts +1 -0
- package/src/components/Divider/Divider.docs.mdx +64 -0
- package/src/components/Divider/Divider.figma.tsx +20 -0
- package/src/components/Divider/Divider.props.ts +13 -0
- package/src/components/Divider/Divider.stories.tsx +60 -0
- package/src/components/Divider/Divider.tsx +193 -0
- package/src/components/Divider/index.ts +1 -0
- package/src/components/Flex/Flex.docs.mdx +60 -0
- package/src/components/Flex/Flex.props.ts +11 -0
- package/src/components/Flex/Flex.stories.tsx +78 -0
- package/src/components/Flex/Flex.tsx +42 -0
- package/src/components/Flex/index.ts +1 -0
- package/src/components/FormField/FormFielInvalidIcon.tsx +11 -0
- package/src/components/FormField/FormField.context.ts +6 -0
- package/src/components/FormField/FormField.docs.mdx +330 -0
- package/src/components/FormField/FormField.props.ts +18 -0
- package/src/components/FormField/FormField.stories.tsx +128 -0
- package/src/components/FormField/FormField.tsx +88 -0
- package/src/components/FormField/FormFieldHelper.tsx +23 -0
- package/src/components/FormField/FormFieldInvalid.tsx +33 -0
- package/src/components/FormField/FormFieldLabel.tsx +12 -0
- package/src/components/FormField/FormFieldRoot.tsx +21 -0
- package/src/components/FormField/FormFieldValid.tsx +33 -0
- package/src/components/FormField/FormFieldValidIcon.tsx +11 -0
- package/src/components/FormField/index.ts +16 -0
- package/src/components/Grid/Grid.docs.mdx +194 -0
- package/src/components/Grid/Grid.props.ts +56 -0
- package/src/components/Grid/Grid.stories.tsx +199 -0
- package/src/components/Grid/Grid.tsx +145 -0
- package/src/components/Grid/index.ts +2 -0
- package/src/components/HTMLElements/ListItem.tsx +25 -0
- package/src/components/HTMLElements/Lists.docs.mdx +104 -0
- package/src/components/HTMLElements/OrderedList.stories.tsx +55 -0
- package/src/components/HTMLElements/OrderedList.tsx +47 -0
- package/src/components/HTMLElements/UnorderedList.stories.tsx +52 -0
- package/src/components/HTMLElements/UnorderedList.tsx +45 -0
- package/src/components/HTMLElements/index.ts +3 -0
- package/src/components/Heading/Heading.docs.mdx +62 -0
- package/src/components/Heading/Heading.props.ts +20 -0
- package/src/components/Heading/Heading.stories.tsx +127 -0
- package/src/components/Heading/Heading.tsx +170 -0
- package/src/components/Heading/index.ts +1 -0
- package/src/components/Helper/Helper.props.ts +24 -0
- package/src/components/Helper/Helper.tsx +66 -0
- package/src/components/Helper/HelperContext.ts +6 -0
- package/src/components/Helper/HelperIcon.tsx +43 -0
- package/src/components/Helper/HelperText.tsx +45 -0
- package/src/components/Helper/index.ts +3 -0
- package/src/components/Icon/Icon.docs.mdx +104 -0
- package/src/components/Icon/Icon.props.ts +17 -0
- package/src/components/Icon/Icon.stories.tsx +43 -0
- package/src/components/Icon/Icon.tsx +51 -0
- package/src/components/Icon/index.tsx +2 -0
- package/src/components/IconButton/IconButton.context.ts +13 -0
- package/src/components/IconButton/IconButton.docs.mdx +73 -0
- package/src/components/IconButton/IconButton.figma.tsx +161 -0
- package/src/components/IconButton/IconButton.props.ts +26 -0
- package/src/components/IconButton/IconButton.stories.tsx +215 -0
- package/src/components/IconButton/IconButton.tsx +37 -0
- package/src/components/IconButton/IconButtonIcon.tsx +155 -0
- package/src/components/IconButton/IconButtonRoot.tsx +419 -0
- package/src/components/IconButton/IconButtonSpinner.tsx +71 -0
- package/src/components/IconButton/index.tsx +2 -0
- package/src/components/Icons/CircleIcon.tsx +23 -0
- package/src/components/Icons/index.ts +1 -0
- package/src/components/InlineLink/InlineLink.context.ts +10 -0
- package/src/components/InlineLink/InlineLink.docs.mdx +64 -0
- package/src/components/InlineLink/InlineLink.props.ts +10 -0
- package/src/components/InlineLink/InlineLink.stories.tsx +91 -0
- package/src/components/InlineLink/InlineLink.tsx +26 -0
- package/src/components/InlineLink/InlineLinkRoot.tsx +87 -0
- package/src/components/InlineLink/index.ts +3 -0
- package/src/components/Input/Input.context.ts +6 -0
- package/src/components/Input/Input.docs.mdx +243 -0
- package/src/components/Input/Input.figma.tsx +115 -0
- package/src/components/Input/Input.props.ts +122 -0
- package/src/components/Input/Input.stories.tsx +159 -0
- package/src/components/Input/Input.tsx +182 -0
- package/src/components/Input/InputField.tsx +110 -0
- package/src/components/Input/InputIcon.tsx +29 -0
- package/src/components/Input/InputRoot.tsx +89 -0
- package/src/components/Input/InputSlot.tsx +21 -0
- package/src/components/Input/index.ts +1 -0
- package/src/components/Label/Label.props.ts +8 -0
- package/src/components/Label/Label.tsx +34 -0
- package/src/components/Label/index.ts +1 -0
- package/src/components/Link/Link.context.ts +10 -0
- package/src/components/Link/Link.docs.mdx +51 -0
- package/src/components/Link/Link.props.ts +15 -0
- package/src/components/Link/Link.stories.tsx +75 -0
- package/src/components/Link/Link.tsx +38 -0
- package/src/components/Link/LinkIcon.tsx +59 -0
- package/src/components/Link/LinkRoot.tsx +65 -0
- package/src/components/Link/LinkText.tsx +59 -0
- package/src/components/Link/index.ts +4 -0
- package/src/components/List/List.context.ts +15 -0
- package/src/components/List/List.docs.mdx +440 -0
- package/src/components/List/List.figma.tsx +110 -0
- package/src/components/List/List.props.ts +21 -0
- package/src/components/List/List.stories.tsx +183 -0
- package/src/components/List/List.tsx +121 -0
- package/src/components/List/ListHeading/ListHeading.figma.tsx +17 -0
- package/src/components/List/ListHeading/ListHeading.props.ts +38 -0
- package/src/components/List/ListHeading/ListHeading.tsx +64 -0
- package/src/components/List/ListHeading/ListHeadingHelperText.tsx +21 -0
- package/src/components/List/ListHeading/ListHeadingTextContent.tsx +21 -0
- package/src/components/List/ListHeading/ListHeadingTitle.tsx +14 -0
- package/src/components/List/ListHeading/index.ts +4 -0
- package/src/components/List/ListItem/ListItem.context.ts +11 -0
- package/src/components/List/ListItem/ListItem.figma.tsx +220 -0
- package/src/components/List/ListItem/ListItem.props.ts +31 -0
- package/src/components/List/ListItem/ListItem.tsx +10 -0
- package/src/components/List/ListItem/ListItemContent.tsx +21 -0
- package/src/components/List/ListItem/ListItemHelperText.tsx +21 -0
- package/src/components/List/ListItem/ListItemIcon.tsx +31 -0
- package/src/components/List/ListItem/ListItemLeadingContent.tsx +9 -0
- package/src/components/List/ListItem/ListItemRoot.tsx +193 -0
- package/src/components/List/ListItem/ListItemText.tsx +14 -0
- package/src/components/List/ListItem/ListItemTrailingContent.tsx +9 -0
- package/src/components/List/ListItem/ListItemTrailingIcon.tsx +32 -0
- package/src/components/List/ListItem/index.ts +9 -0
- package/src/components/List/index.ts +4 -0
- package/src/components/Radio/Radio.context.ts +9 -0
- package/src/components/Radio/Radio.docs.mdx +366 -0
- package/src/components/Radio/Radio.figma.tsx +45 -0
- package/src/components/Radio/Radio.props.ts +34 -0
- package/src/components/Radio/Radio.stories.tsx +157 -0
- package/src/components/Radio/Radio.tsx +94 -0
- package/src/components/Radio/RadioGroup.context.ts +9 -0
- package/src/components/Radio/RadioGroup.props.ts +22 -0
- package/src/components/Radio/RadioGroup.stories.tsx +107 -0
- package/src/components/Radio/RadioGroup.tsx +108 -0
- package/src/components/Radio/RadioGroupRoot.tsx +36 -0
- package/src/components/Radio/RadioGroupTextContent.tsx +14 -0
- package/src/components/Radio/RadioIcon.tsx +32 -0
- package/src/components/Radio/RadioIndicator.figma.tsx +21 -0
- package/src/components/Radio/RadioIndicator.tsx +63 -0
- package/src/components/Radio/RadioLabel.tsx +14 -0
- package/src/components/Radio/RadioRoot.tsx +65 -0
- package/src/components/Radio/RadioTextContent.tsx +14 -0
- package/src/components/Radio/RadioTileRoot.tsx +38 -0
- package/src/components/Radio/index.ts +5 -0
- package/src/components/RadioCard/RadioCard.context.ts +8 -0
- package/src/components/RadioCard/RadioCard.docs.mdx +125 -0
- package/src/components/RadioCard/RadioCard.props.ts +18 -0
- package/src/components/RadioCard/RadioCard.stories.tsx +45 -0
- package/src/components/RadioCard/RadioCard.tsx +56 -0
- package/src/components/RadioCard/RadioCardGroup.props.ts +36 -0
- package/src/components/RadioCard/RadioCardGroup.stories.tsx +70 -0
- package/src/components/RadioCard/RadioCardGroup.tsx +48 -0
- package/src/components/RadioCard/RadioCardIcon.tsx +32 -0
- package/src/components/RadioCard/RadioCardIndicator.tsx +63 -0
- package/src/components/RadioCard/RadioCardLabel.tsx +8 -0
- package/src/components/RadioCard/RadioCardRoot.tsx +70 -0
- package/src/components/RadioCard/index.ts +8 -0
- package/src/components/Select/Select.context.ts +15 -0
- package/src/components/Select/Select.docs.mdx +218 -0
- package/src/components/Select/Select.props.ts +131 -0
- package/src/components/Select/Select.stories.tsx +290 -0
- package/src/components/Select/Select.tsx +295 -0
- package/src/components/Select/SelectOption.tsx +107 -0
- package/src/components/Select/index.ts +7 -0
- package/src/components/Skeleton/Skeleton.docs.mdx +38 -0
- package/src/components/Skeleton/Skeleton.props.ts +11 -0
- package/src/components/Skeleton/Skeleton.stories.tsx +33 -0
- package/src/components/Skeleton/Skeleton.tsx +77 -0
- package/src/components/Skeleton/index.ts +1 -0
- package/src/components/Spinner/Spinner.docs.mdx +62 -0
- package/src/components/Spinner/Spinner.figma.tsx +19 -0
- package/src/components/Spinner/Spinner.props.ts +10 -0
- package/src/components/Spinner/Spinner.stories.tsx +56 -0
- package/src/components/Spinner/Spinner.tsx +157 -0
- package/src/components/Spinner/Spinner.web.tsx +149 -0
- package/src/components/Spinner/index.ts +2 -0
- package/src/components/Switch/Switch.docs.mdx +176 -0
- package/src/components/Switch/Switch.figma.tsx +29 -0
- package/src/components/Switch/Switch.props.ts +10 -0
- package/src/components/Switch/Switch.stories.tsx +80 -0
- package/src/components/Switch/Switch.tsx +201 -0
- package/src/components/Switch/Switch.web.tsx +208 -0
- package/src/components/Switch/index.ts +1 -0
- package/src/components/Textarea/Textarea.context.ts +6 -0
- package/src/components/Textarea/Textarea.docs.mdx +110 -0
- package/src/components/Textarea/Textarea.props.ts +46 -0
- package/src/components/Textarea/Textarea.stories.tsx +51 -0
- package/src/components/Textarea/Textarea.tsx +47 -0
- package/src/components/Textarea/TextareaField.tsx +45 -0
- package/src/components/Textarea/TextareaRoot.tsx +79 -0
- package/src/components/Textarea/index.ts +1 -0
- package/src/components/ToggleButton/ToggleButton.props.tsx +7 -0
- package/src/components/ToggleButton/ToggleButton.stories.tsx +35 -0
- package/src/components/ToggleButton/ToggleButton.tsx +32 -0
- package/src/components/ToggleButton/ToggleButtonIcon.tsx +46 -0
- package/src/components/ToggleButton/ToggleButtonRoot.tsx +100 -0
- package/src/components/ToggleButton/ToggleButtonText.tsx +29 -0
- package/src/components/ToggleButton/index.ts +2 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.context.ts +8 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.docs.mdx +146 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.props.ts +17 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.stories.tsx +45 -0
- package/src/components/ToggleButtonCard/ToggleButtonCard.tsx +32 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.props.ts +34 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.stories.tsx +85 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardGroup.tsx +48 -0
- package/src/components/ToggleButtonCard/ToggleButtonCardRoot.tsx +97 -0
- package/src/components/ToggleButtonCard/index.ts +2 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.context.ts +11 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.props.ts +32 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.stories.tsx +96 -0
- package/src/components/UnstyledIconButton/UnstyledIconButton.tsx +50 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonIcon.tsx +73 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonRoot.tsx +57 -0
- package/src/components/UnstyledIconButton/UnstyledIconButtonSpinner.tsx +39 -0
- package/src/components/UnstyledIconButton/index.tsx +2 -0
- package/src/components/index.ts +48 -0
- package/src/core/breakpoints.ts +10 -0
- package/src/core/index.ts +35 -0
- package/src/core/themes.ts +266 -0
- package/src/hooks/index.ts +6 -0
- package/src/hooks/useBreakpointValue.ts +62 -0
- package/src/hooks/useColorMode.ts +21 -0
- package/src/hooks/useMedia.ts +31 -0
- package/src/hooks/useStyleProps.ts +60 -0
- package/src/hooks/useTheme.ts +8 -0
- package/src/hooks/useToken.ts +40 -0
- package/src/index.ts +4 -0
- package/src/tokens/README.md +7 -0
- package/src/tokens/border-radius.ts +13 -0
- package/src/tokens/border-width.ts +8 -0
- package/src/tokens/color.ts +285 -0
- package/src/tokens/components/dark/accordion.ts +29 -0
- package/src/tokens/components/dark/alert.ts +27 -0
- package/src/tokens/components/dark/badge.ts +51 -0
- package/src/tokens/components/dark/banner.ts +43 -0
- package/src/tokens/components/dark/bottom-navigation.ts +35 -0
- package/src/tokens/components/dark/bottom-sheet.ts +17 -0
- package/src/tokens/components/dark/breadcrumb.ts +8 -0
- package/src/tokens/components/dark/button.ts +104 -0
- package/src/tokens/components/dark/card.ts +63 -0
- package/src/tokens/components/dark/carousel-control.ts +19 -0
- package/src/tokens/components/dark/checkbox.ts +45 -0
- package/src/tokens/components/dark/date-picker.ts +55 -0
- package/src/tokens/components/dark/dialog.ts +25 -0
- package/src/tokens/components/dark/divider.ts +8 -0
- package/src/tokens/components/dark/focus.ts +8 -0
- package/src/tokens/components/dark/footer.ts +12 -0
- package/src/tokens/components/dark/form-field.ts +10 -0
- package/src/tokens/components/dark/icon-button.ts +39 -0
- package/src/tokens/components/dark/icon-container.ts +42 -0
- package/src/tokens/components/dark/icon.ts +15 -0
- package/src/tokens/components/dark/index.ts +44 -0
- package/src/tokens/components/dark/inline-link.ts +14 -0
- package/src/tokens/components/dark/input.ts +42 -0
- package/src/tokens/components/dark/link.ts +15 -0
- package/src/tokens/components/dark/list.ts +45 -0
- package/src/tokens/components/dark/menu.ts +46 -0
- package/src/tokens/components/dark/modal.ts +28 -0
- package/src/tokens/components/dark/navigation.ts +24 -0
- package/src/tokens/components/dark/overlay.ts +8 -0
- package/src/tokens/components/dark/parts.ts +23 -0
- package/src/tokens/components/dark/pill.ts +26 -0
- package/src/tokens/components/dark/progress-stepper.ts +32 -0
- package/src/tokens/components/dark/radio.ts +43 -0
- package/src/tokens/components/dark/segmented-control.ts +27 -0
- package/src/tokens/components/dark/select.ts +55 -0
- package/src/tokens/components/dark/skeleton.ts +7 -0
- package/src/tokens/components/dark/spinner.ts +24 -0
- package/src/tokens/components/dark/switch.ts +35 -0
- package/src/tokens/components/dark/text.ts +11 -0
- package/src/tokens/components/dark/toggle-button.ts +24 -0
- package/src/tokens/components/dark/top-navigation.ts +26 -0
- package/src/tokens/components/index.ts +6 -0
- package/src/tokens/components/light/accordion.ts +29 -0
- package/src/tokens/components/light/alert.ts +27 -0
- package/src/tokens/components/light/badge.ts +51 -0
- package/src/tokens/components/light/banner.ts +43 -0
- package/src/tokens/components/light/bottom-navigation.ts +35 -0
- package/src/tokens/components/light/bottom-sheet.ts +17 -0
- package/src/tokens/components/light/breadcrumb.ts +8 -0
- package/src/tokens/components/light/button.ts +104 -0
- package/src/tokens/components/light/card.ts +63 -0
- package/src/tokens/components/light/carousel-control.ts +19 -0
- package/src/tokens/components/light/checkbox.ts +45 -0
- package/src/tokens/components/light/date-picker.ts +55 -0
- package/src/tokens/components/light/dialog.ts +25 -0
- package/src/tokens/components/light/divider.ts +8 -0
- package/src/tokens/components/light/focus.ts +8 -0
- package/src/tokens/components/light/footer.ts +12 -0
- package/src/tokens/components/light/form-field.ts +10 -0
- package/src/tokens/components/light/icon-button.ts +39 -0
- package/src/tokens/components/light/icon-container.ts +42 -0
- package/src/tokens/components/light/icon.ts +15 -0
- package/src/tokens/components/light/index.ts +44 -0
- package/src/tokens/components/light/inline-link.ts +14 -0
- package/src/tokens/components/light/input.ts +42 -0
- package/src/tokens/components/light/link.ts +15 -0
- package/src/tokens/components/light/list.ts +45 -0
- package/src/tokens/components/light/menu.ts +46 -0
- package/src/tokens/components/light/modal.ts +28 -0
- package/src/tokens/components/light/navigation.ts +24 -0
- package/src/tokens/components/light/overlay.ts +8 -0
- package/src/tokens/components/light/parts.ts +23 -0
- package/src/tokens/components/light/pill.ts +26 -0
- package/src/tokens/components/light/progress-stepper.ts +32 -0
- package/src/tokens/components/light/radio.ts +43 -0
- package/src/tokens/components/light/segmented-control.ts +27 -0
- package/src/tokens/components/light/select.ts +55 -0
- package/src/tokens/components/light/skeleton.ts +7 -0
- package/src/tokens/components/light/spinner.ts +24 -0
- package/src/tokens/components/light/switch.ts +35 -0
- package/src/tokens/components/light/text.ts +11 -0
- package/src/tokens/components/light/toggle-button.ts +24 -0
- package/src/tokens/components/light/top-navigation.ts +26 -0
- package/src/tokens/font.ts +35 -0
- package/src/tokens/index.ts +18 -0
- package/src/tokens/layout.ts +88 -0
- package/src/tokens/letter-spacing.ts +22 -0
- package/src/tokens/line-height.ts +21 -0
- package/src/tokens/primitive.ts +105 -0
- package/src/tokens/semantic-dark.ts +25 -0
- package/src/tokens/semantic-light.ts +25 -0
- package/src/tokens/shadow.ts +52 -0
- package/src/tokens/space.ts +24 -0
- package/src/tokens/typography.ts +265 -0
- package/src/types/index.ts +4 -0
- package/src/types/refs.ts +8 -0
- package/src/types/states.ts +11 -0
- package/src/types/unistyles.ts +12 -0
- package/src/types/values.ts +60 -0
- package/src/utils/coloursAsArray.ts +17 -0
- package/src/utils/getFlattenedColorValue.ts +32 -0
- package/src/utils/getStyleValue.ts +12 -0
- package/src/utils/hasChildrenByDisplayName.ts +43 -0
- package/src/utils/index.ts +4 -0
- package/src/utils/styleUtils.ts +252 -0
- package/src/vite-env.d.ts +1 -0
- package/tsconfig.json +41 -0
- package/vercel.json +21 -0
- package/vitest.config.js +37 -0
|
@@ -0,0 +1,234 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ViewProps, ViewStyle } from 'react-native';
|
|
3
|
+
import type {
|
|
4
|
+
BorderRadiusValue,
|
|
5
|
+
BordeWidthValue,
|
|
6
|
+
ColorValue,
|
|
7
|
+
OpacityValue,
|
|
8
|
+
SpaceValue,
|
|
9
|
+
} from '../../types';
|
|
10
|
+
|
|
11
|
+
export type OmittedStyles = Omit<
|
|
12
|
+
ViewStyle,
|
|
13
|
+
| 'backgroundColor'
|
|
14
|
+
| 'borderBlockColor'
|
|
15
|
+
| 'borderBlockEndColor'
|
|
16
|
+
| 'borderBlockStartColor'
|
|
17
|
+
| 'borderBottomColor'
|
|
18
|
+
| 'borderBottomEndRadius'
|
|
19
|
+
| 'borderBottomLeftRadius'
|
|
20
|
+
| 'borderBottomRightRadius'
|
|
21
|
+
| 'borderBottomStartRadius'
|
|
22
|
+
| 'borderBottomWidth'
|
|
23
|
+
| 'borderColor'
|
|
24
|
+
| 'borderEndColor'
|
|
25
|
+
| 'borderEndEndRadius'
|
|
26
|
+
| 'borderEndStartRadius'
|
|
27
|
+
| 'borderEndWidth'
|
|
28
|
+
| 'borderLeftColor'
|
|
29
|
+
| 'borderLeftWidth'
|
|
30
|
+
| 'borderRadius'
|
|
31
|
+
| 'borderRightColor'
|
|
32
|
+
| 'borderRightWidth'
|
|
33
|
+
| 'borderStartColor'
|
|
34
|
+
| 'borderStartEndRadius'
|
|
35
|
+
| 'borderStartStartRadius'
|
|
36
|
+
| 'borderStartWidth'
|
|
37
|
+
| 'borderTopColor'
|
|
38
|
+
| 'borderTopEndRadius'
|
|
39
|
+
| 'borderTopLeftRadius'
|
|
40
|
+
| 'borderTopRightRadius'
|
|
41
|
+
| 'borderTopStartRadius'
|
|
42
|
+
| 'borderTopWidth'
|
|
43
|
+
| 'borderWidth'
|
|
44
|
+
| 'bottom'
|
|
45
|
+
| 'columnGap'
|
|
46
|
+
| 'end'
|
|
47
|
+
| 'gap'
|
|
48
|
+
| 'height'
|
|
49
|
+
| 'left'
|
|
50
|
+
| 'margin'
|
|
51
|
+
| 'marginBottom'
|
|
52
|
+
| 'marginEnd'
|
|
53
|
+
| 'marginHorizontal'
|
|
54
|
+
| 'marginLeft'
|
|
55
|
+
| 'marginRight'
|
|
56
|
+
| 'marginStart'
|
|
57
|
+
| 'marginTop'
|
|
58
|
+
| 'marginVertical'
|
|
59
|
+
| 'maxHeight'
|
|
60
|
+
| 'maxWidth'
|
|
61
|
+
| 'minHeight'
|
|
62
|
+
| 'minWidth'
|
|
63
|
+
| 'opacity'
|
|
64
|
+
| 'outlineColor'
|
|
65
|
+
| 'padding'
|
|
66
|
+
| 'paddingBottom'
|
|
67
|
+
| 'paddingEnd'
|
|
68
|
+
| 'paddingHorizontal'
|
|
69
|
+
| 'paddingLeft'
|
|
70
|
+
| 'paddingRight'
|
|
71
|
+
| 'paddingStart'
|
|
72
|
+
| 'paddingTop'
|
|
73
|
+
| 'paddingVertical'
|
|
74
|
+
| 'right'
|
|
75
|
+
| 'rowGap'
|
|
76
|
+
| 'shadowColor'
|
|
77
|
+
| 'start'
|
|
78
|
+
| 'top'
|
|
79
|
+
| 'width'
|
|
80
|
+
// deprecated
|
|
81
|
+
| 'rotation'
|
|
82
|
+
| 'scaleX'
|
|
83
|
+
| 'scaleY'
|
|
84
|
+
| 'transformMatrix'
|
|
85
|
+
| 'translateX'
|
|
86
|
+
| 'translateY'
|
|
87
|
+
>;
|
|
88
|
+
|
|
89
|
+
export type OtherBoxViewStyles = Pick<
|
|
90
|
+
OmittedStyles,
|
|
91
|
+
// List of other styles to include
|
|
92
|
+
| 'alignContent'
|
|
93
|
+
| 'alignItems'
|
|
94
|
+
| 'alignSelf'
|
|
95
|
+
| 'aspectRatio'
|
|
96
|
+
| 'backfaceVisibility'
|
|
97
|
+
| 'borderCurve'
|
|
98
|
+
| 'borderStyle'
|
|
99
|
+
| 'cursor'
|
|
100
|
+
| 'direction'
|
|
101
|
+
| 'display'
|
|
102
|
+
| 'elevation'
|
|
103
|
+
| 'flex'
|
|
104
|
+
| 'flexBasis'
|
|
105
|
+
| 'flexDirection'
|
|
106
|
+
| 'flexGrow'
|
|
107
|
+
| 'flexShrink'
|
|
108
|
+
| 'flexWrap'
|
|
109
|
+
| 'justifyContent'
|
|
110
|
+
| 'boxShadow'
|
|
111
|
+
| 'outlineOffset'
|
|
112
|
+
| 'outlineStyle'
|
|
113
|
+
| 'outlineWidth'
|
|
114
|
+
| 'overflow'
|
|
115
|
+
| 'pointerEvents'
|
|
116
|
+
| 'position'
|
|
117
|
+
| 'shadowOffset'
|
|
118
|
+
| 'shadowOpacity'
|
|
119
|
+
| 'shadowRadius'
|
|
120
|
+
| 'transform'
|
|
121
|
+
| 'transformOrigin'
|
|
122
|
+
| 'zIndex'
|
|
123
|
+
>;
|
|
124
|
+
|
|
125
|
+
export interface BoxStyleMappingValues {
|
|
126
|
+
// Style Mapping
|
|
127
|
+
// - Colors
|
|
128
|
+
bg?: ColorValue;
|
|
129
|
+
bgColor?: ColorValue;
|
|
130
|
+
// - Space
|
|
131
|
+
h?: SpaceValue;
|
|
132
|
+
w?: SpaceValue;
|
|
133
|
+
p?: SpaceValue;
|
|
134
|
+
px?: SpaceValue;
|
|
135
|
+
py?: SpaceValue;
|
|
136
|
+
pt?: SpaceValue;
|
|
137
|
+
pb?: SpaceValue;
|
|
138
|
+
pr?: SpaceValue;
|
|
139
|
+
pl?: SpaceValue;
|
|
140
|
+
m?: SpaceValue;
|
|
141
|
+
mx?: SpaceValue;
|
|
142
|
+
my?: SpaceValue;
|
|
143
|
+
mt?: SpaceValue;
|
|
144
|
+
mb?: SpaceValue;
|
|
145
|
+
mr?: SpaceValue;
|
|
146
|
+
ml?: SpaceValue;
|
|
147
|
+
// - Radii
|
|
148
|
+
rounded?: BorderRadiusValue;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
export interface ThemedBoxViewStyleProps {
|
|
152
|
+
// - Space
|
|
153
|
+
top?: SpaceValue;
|
|
154
|
+
bottom?: SpaceValue;
|
|
155
|
+
left?: SpaceValue;
|
|
156
|
+
right?: SpaceValue;
|
|
157
|
+
padding?: SpaceValue;
|
|
158
|
+
paddingHorizontal?: SpaceValue;
|
|
159
|
+
paddingVertical?: SpaceValue;
|
|
160
|
+
paddingTop?: SpaceValue;
|
|
161
|
+
paddingBottom?: SpaceValue;
|
|
162
|
+
paddingLeft?: SpaceValue;
|
|
163
|
+
paddingRight?: SpaceValue;
|
|
164
|
+
paddingEnd?: SpaceValue;
|
|
165
|
+
paddingStart?: SpaceValue;
|
|
166
|
+
margin?: SpaceValue;
|
|
167
|
+
marginHorizontal?: SpaceValue;
|
|
168
|
+
marginVertical?: SpaceValue;
|
|
169
|
+
marginTop?: SpaceValue;
|
|
170
|
+
marginBottom?: SpaceValue;
|
|
171
|
+
marginLeft?: SpaceValue;
|
|
172
|
+
marginRight?: SpaceValue;
|
|
173
|
+
marginEnd?: SpaceValue;
|
|
174
|
+
marginStart?: SpaceValue;
|
|
175
|
+
columnGap?: SpaceValue;
|
|
176
|
+
gap?: SpaceValue;
|
|
177
|
+
rowGap?: SpaceValue;
|
|
178
|
+
height?: SpaceValue;
|
|
179
|
+
width?: SpaceValue;
|
|
180
|
+
minHeight?: SpaceValue;
|
|
181
|
+
minWidth?: SpaceValue;
|
|
182
|
+
maxWidth?: SpaceValue;
|
|
183
|
+
maxHeight?: SpaceValue;
|
|
184
|
+
start?: SpaceValue;
|
|
185
|
+
end?: SpaceValue;
|
|
186
|
+
// - Colors
|
|
187
|
+
backgroundColor?: ColorValue;
|
|
188
|
+
borderColor?: ColorValue;
|
|
189
|
+
borderBottomColor?: ColorValue;
|
|
190
|
+
borderLeftColor?: ColorValue;
|
|
191
|
+
borderRightColor?: ColorValue;
|
|
192
|
+
borderTopColor?: ColorValue;
|
|
193
|
+
borderBlockColor?: ColorValue;
|
|
194
|
+
borderBlockEndColor?: ColorValue;
|
|
195
|
+
borderBlockStartColor?: ColorValue;
|
|
196
|
+
borderEndColor?: ColorValue;
|
|
197
|
+
borderStartColor?: ColorValue;
|
|
198
|
+
outlineColor?: ColorValue;
|
|
199
|
+
shadowColor?: ColorValue;
|
|
200
|
+
// - Radii
|
|
201
|
+
borderRadius?: BorderRadiusValue;
|
|
202
|
+
borderBottomEndRadius?: BorderRadiusValue;
|
|
203
|
+
borderBottomLeftRadius?: BorderRadiusValue;
|
|
204
|
+
borderBottomRightRadius?: BorderRadiusValue;
|
|
205
|
+
borderBottomStartRadius?: BorderRadiusValue;
|
|
206
|
+
borderTopEndRadius?: BorderRadiusValue;
|
|
207
|
+
borderTopLeftRadius?: BorderRadiusValue;
|
|
208
|
+
borderTopRightRadius?: BorderRadiusValue;
|
|
209
|
+
borderTopStartRadius?: BorderRadiusValue;
|
|
210
|
+
borderEndEndRadius?: BorderRadiusValue;
|
|
211
|
+
borderEndStartRadius?: BorderRadiusValue;
|
|
212
|
+
borderStartEndRadius?: BorderRadiusValue;
|
|
213
|
+
borderStartStartRadius?: BorderRadiusValue;
|
|
214
|
+
// - Opacity
|
|
215
|
+
opacity?: OpacityValue;
|
|
216
|
+
// - Border Width
|
|
217
|
+
borderBottomWidth?: BordeWidthValue;
|
|
218
|
+
borderEndWidth?: BordeWidthValue;
|
|
219
|
+
borderLeftWidth?: BordeWidthValue;
|
|
220
|
+
borderRightWidth?: BordeWidthValue;
|
|
221
|
+
borderStartWidth?: BordeWidthValue;
|
|
222
|
+
borderTopWidth?: BordeWidthValue;
|
|
223
|
+
borderWidth?: BordeWidthValue;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface BoxProps
|
|
227
|
+
extends BoxStyleMappingValues,
|
|
228
|
+
ThemedBoxViewStyleProps,
|
|
229
|
+
OtherBoxViewStyles,
|
|
230
|
+
ViewProps {
|
|
231
|
+
as?: React.ElementType;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
export default BoxProps;
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { Box } from '.';
|
|
3
|
+
import { BodyText } from '../BodyText';
|
|
4
|
+
import { coloursAsArray } from '../../utils';
|
|
5
|
+
import { primitive } from '@utilitywarehouse/hearth-tokens/js';
|
|
6
|
+
import { InputType } from 'storybook/internal/types';
|
|
7
|
+
|
|
8
|
+
const backgroundColor: InputType = {
|
|
9
|
+
options: coloursAsArray(),
|
|
10
|
+
control: 'select',
|
|
11
|
+
description: 'Background color of the box.',
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
const height: InputType = {
|
|
15
|
+
control: 'number',
|
|
16
|
+
description: 'Height of the box.',
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
const width: InputType = {
|
|
20
|
+
control: 'number',
|
|
21
|
+
description: 'Width of the box.',
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
// More on how to set up stories at: https://storybook.js.org/docs/writing-stories#default-export
|
|
25
|
+
const meta = {
|
|
26
|
+
title: 'Stories / Box',
|
|
27
|
+
component: Box,
|
|
28
|
+
parameters: {
|
|
29
|
+
// Optional parameter to Box the component in the Canvas. More info: https://storybook.js.org/docs/configure/story-layout
|
|
30
|
+
layout: 'centered',
|
|
31
|
+
},
|
|
32
|
+
// More on argTypes: https://storybook.js.org/docs/api/argtypes
|
|
33
|
+
argTypes: {
|
|
34
|
+
children: { control: 'text' },
|
|
35
|
+
backgroundColor,
|
|
36
|
+
bg: backgroundColor,
|
|
37
|
+
bgColor: backgroundColor,
|
|
38
|
+
padding: {
|
|
39
|
+
options: Object.keys(primitive.space),
|
|
40
|
+
control: 'select',
|
|
41
|
+
description: 'Padding of the box.',
|
|
42
|
+
},
|
|
43
|
+
height,
|
|
44
|
+
h: height,
|
|
45
|
+
width,
|
|
46
|
+
w: width,
|
|
47
|
+
},
|
|
48
|
+
// Use `fn` to spy on the onClick arg, which will appear in the actions panel once invoked: https://storybook.js.org/docs/essentials/actions#action-args
|
|
49
|
+
args: {
|
|
50
|
+
children: "Hello there, I'm in a box!",
|
|
51
|
+
backgroundColor: 'orange400',
|
|
52
|
+
padding: '200',
|
|
53
|
+
width: 300,
|
|
54
|
+
height: 200,
|
|
55
|
+
},
|
|
56
|
+
} satisfies Meta<typeof Box>;
|
|
57
|
+
|
|
58
|
+
export default meta;
|
|
59
|
+
type Story = StoryObj<typeof meta>;
|
|
60
|
+
|
|
61
|
+
export const Playground: Story = {
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
63
|
+
render: ({ as, ...args }) => {
|
|
64
|
+
return (
|
|
65
|
+
<Box {...args}>
|
|
66
|
+
<BodyText>{args.children}</BodyText>
|
|
67
|
+
</Box>
|
|
68
|
+
);
|
|
69
|
+
},
|
|
70
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { View, ViewStyle } from 'react-native';
|
|
4
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
5
|
+
import type BoxProps from './Box.props';
|
|
6
|
+
import {
|
|
7
|
+
propStyleMapping,
|
|
8
|
+
resolveThemeValue,
|
|
9
|
+
themeStyleMapping,
|
|
10
|
+
viewStyleProps,
|
|
11
|
+
} from '../../utils';
|
|
12
|
+
|
|
13
|
+
// --- Box component definition ---
|
|
14
|
+
const BoxComponent = ({ as, style, children, ...props }: BoxProps) => {
|
|
15
|
+
const { computedProps } = useMemo(() => {
|
|
16
|
+
const computedProps: Record<string, any> = {};
|
|
17
|
+
|
|
18
|
+
Object.entries(props).forEach(([propName, propValue]) => {
|
|
19
|
+
if (propValue === undefined) return;
|
|
20
|
+
|
|
21
|
+
if (propStyleMapping[propName] || viewStyleProps.has(propName)) {
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
computedProps[propName] = propValue;
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
return { computedProps };
|
|
29
|
+
}, [props]);
|
|
30
|
+
|
|
31
|
+
const Component: React.ComponentType<any> = (as as React.ComponentType<any>) || View;
|
|
32
|
+
|
|
33
|
+
return (
|
|
34
|
+
<Component style={[styles.computedStyles(props), style]} {...computedProps}>
|
|
35
|
+
{children}
|
|
36
|
+
</Component>
|
|
37
|
+
);
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
const styles = StyleSheet.create(theme => ({
|
|
41
|
+
computedStyles: (props: Record<string, any>) => {
|
|
42
|
+
const computedStyles: Record<string, any> = {};
|
|
43
|
+
|
|
44
|
+
Object.entries(props).forEach(([propName, propValue]) => {
|
|
45
|
+
if (propValue === undefined) return;
|
|
46
|
+
|
|
47
|
+
let stylePropName: keyof ViewStyle | undefined;
|
|
48
|
+
|
|
49
|
+
// Handle shorthand props
|
|
50
|
+
if (propStyleMapping[propName]) {
|
|
51
|
+
stylePropName = propStyleMapping[propName];
|
|
52
|
+
}
|
|
53
|
+
// Handle direct style props
|
|
54
|
+
else if (viewStyleProps.has(propName)) {
|
|
55
|
+
stylePropName = propName as keyof ViewStyle;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
if (!stylePropName) return;
|
|
59
|
+
|
|
60
|
+
// Resolve theme value if needed
|
|
61
|
+
const themeKey: keyof typeof theme | undefined = themeStyleMapping[
|
|
62
|
+
stylePropName
|
|
63
|
+
] as keyof typeof theme;
|
|
64
|
+
|
|
65
|
+
if (themeKey && theme[themeKey]) {
|
|
66
|
+
computedStyles[stylePropName] = resolveThemeValue(propValue, theme[themeKey]);
|
|
67
|
+
} else {
|
|
68
|
+
computedStyles[stylePropName] = propValue;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
|
|
72
|
+
return computedStyles;
|
|
73
|
+
},
|
|
74
|
+
}));
|
|
75
|
+
|
|
76
|
+
BoxComponent.displayName = 'Box';
|
|
77
|
+
|
|
78
|
+
export default BoxComponent;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default as Box } from './Box';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createContext, useContext } from 'react';
|
|
2
|
+
import type { ButtonProps } from './Button.props';
|
|
3
|
+
|
|
4
|
+
export const ButtonContext = createContext<{
|
|
5
|
+
colorScheme?: ButtonProps['colorScheme'];
|
|
6
|
+
variant?: ButtonProps['variant'];
|
|
7
|
+
size?: ButtonProps['size'];
|
|
8
|
+
inverted?: ButtonProps['inverted'];
|
|
9
|
+
disabled?: ButtonProps['disabled'];
|
|
10
|
+
active?: boolean;
|
|
11
|
+
}>({});
|
|
12
|
+
|
|
13
|
+
export const useButtonContext = () => useContext(ButtonContext);
|
|
@@ -0,0 +1,288 @@
|
|
|
1
|
+
import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as Stories from './Button.stories';
|
|
3
|
+
import { ButtonGroup, Button, ButtonIcon, ButtonSpinner, ButtonText, Box, Center } from '../../';
|
|
4
|
+
import { AddSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
5
|
+
import { ViewFigmaButton, BackToTopButton, UsageWrap } from '../../../docs/components';
|
|
6
|
+
|
|
7
|
+
<Meta title="Components / Button" />
|
|
8
|
+
|
|
9
|
+
<ViewFigmaButton url="https://www.figma.com/design/6NKZXZhFSExXrcbBgc6zTR/Hearth-Components?node-id=1-149" />
|
|
10
|
+
|
|
11
|
+
<BackToTopButton />
|
|
12
|
+
|
|
13
|
+
# Button
|
|
14
|
+
|
|
15
|
+
The `Button` component is used to trigger an action or event, such as submitting a form, opening a dialog, canceling an action, or performing a delete operation.
|
|
16
|
+
|
|
17
|
+
- [Playground](#playground)
|
|
18
|
+
- [Usage](#usage)
|
|
19
|
+
- [Props](#props)
|
|
20
|
+
- [Variants](#variants)
|
|
21
|
+
- [Advanced Usage](#advanced-usage)
|
|
22
|
+
- [Components](#components)
|
|
23
|
+
- [`ButtonGroup`](#buttongroup)
|
|
24
|
+
- [`ButtonIcon`](#buttonicon)
|
|
25
|
+
- [`ButtonText`](#buttontext)
|
|
26
|
+
- [`ButtonSpinner`](#buttonspinner)
|
|
27
|
+
- [Examples](#examples)
|
|
28
|
+
- [Padding None](#padding-none)
|
|
29
|
+
|
|
30
|
+
## Playground
|
|
31
|
+
|
|
32
|
+
<Canvas of={Stories.Playground} />
|
|
33
|
+
|
|
34
|
+
<Controls of={Stories.Playground} />
|
|
35
|
+
|
|
36
|
+
## Usage
|
|
37
|
+
|
|
38
|
+
<UsageWrap>
|
|
39
|
+
<Center>
|
|
40
|
+
<Button colorScheme="green" variant="solid" children="Button" />
|
|
41
|
+
</Center>
|
|
42
|
+
</UsageWrap>
|
|
43
|
+
|
|
44
|
+
```tsx
|
|
45
|
+
import { Button } from '@utilitywarehouse/hearth-react-native';
|
|
46
|
+
|
|
47
|
+
const MyComponent = () => {
|
|
48
|
+
const handlePress = () => {
|
|
49
|
+
console.log('Button pressed');
|
|
50
|
+
};
|
|
51
|
+
return (
|
|
52
|
+
<Button onPress={handlePress} colorScheme="green">
|
|
53
|
+
Button
|
|
54
|
+
</Button>
|
|
55
|
+
);
|
|
56
|
+
};
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
## Props
|
|
60
|
+
|
|
61
|
+
| Property | Type | Description | Default |
|
|
62
|
+
| -------------- | ----------------------------------------- | --------------------------------------------------------------------------------------------------- | -------- |
|
|
63
|
+
| `onPress` | `() => void` | Callback function to be called when the button is pressed. | - |
|
|
64
|
+
| `variant` | `'solid' \| 'outline' \| 'ghost'` | The variant of the button. | 'solid' |
|
|
65
|
+
| `size` | `'sm' \| 'md'` | The size of the button. | 'medium' |
|
|
66
|
+
| `colorScheme` | `'yellow' \| 'green' \| 'red' \| 'grey' ` | The colour scheme of the button. | 'yellow' |
|
|
67
|
+
| `icon` | `ReactNode` | The icon to be displayed in the button. _Note: Can't use with advanced usage._ | - |
|
|
68
|
+
| `iconPosition` | `'left' \| 'right'` | The position of the icon in the button. _Note: Can't use with advanced usage._ | 'left' |
|
|
69
|
+
| `inverted` | `boolean` | Changes the button to an inverted state. (To only be used on `midnight` or `purple` backgrounds). | `false` |
|
|
70
|
+
| `loading` | `boolean` | Shows a loading spinner in the button. _Note: Can't use with advanced usage._ | `false` |
|
|
71
|
+
| `disabled` | `boolean` | Disables the button. | `false` |
|
|
72
|
+
| `paddingNone` | `boolean` | Removes the horizontal padding from the button (only applies to `sm` size `ghost` variant buttons). | `false` |
|
|
73
|
+
| `pressed` | `boolean` | Changes the button to a pressed state. | `false` |
|
|
74
|
+
|
|
75
|
+
## Variants
|
|
76
|
+
|
|
77
|
+
<Canvas of={Stories.KitchenSink} />
|
|
78
|
+
|
|
79
|
+
## Advanced Usage
|
|
80
|
+
|
|
81
|
+
For more advanced usage, you can use the `ButtonText`, `ButtonIcon` and `ButtonSpinner` components to customise the button.
|
|
82
|
+
|
|
83
|
+
<UsageWrap>
|
|
84
|
+
<Center>
|
|
85
|
+
<Button colorScheme="yellow">
|
|
86
|
+
<ButtonIcon as={AddSmallIcon} />
|
|
87
|
+
<ButtonText>Button</ButtonText>
|
|
88
|
+
</Button>
|
|
89
|
+
</Center>
|
|
90
|
+
</UsageWrap>
|
|
91
|
+
|
|
92
|
+
```tsx
|
|
93
|
+
import {
|
|
94
|
+
Button,
|
|
95
|
+
ButtonIcon,
|
|
96
|
+
ButtonText,
|
|
97
|
+
ButtonSpinner,
|
|
98
|
+
} from '@utilitywarehouse/hearth-react-native';
|
|
99
|
+
import { AddSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
100
|
+
|
|
101
|
+
const MyComponent = ({ doSomething }) => {
|
|
102
|
+
const [loading, setLoading] = useState(false);
|
|
103
|
+
const handleClick = () => {
|
|
104
|
+
setLoading(true);
|
|
105
|
+
doSomething();
|
|
106
|
+
};
|
|
107
|
+
return (
|
|
108
|
+
<Button colorScheme="yellow" disabled={loading}>
|
|
109
|
+
{loading ? <ButtonSpinner /> : <ButtonIcon as={AddSmallIcon} />}
|
|
110
|
+
<ButtonText onPress={handleClick}>Button</ButtonText>
|
|
111
|
+
</Button>
|
|
112
|
+
);
|
|
113
|
+
};
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
## Components
|
|
117
|
+
|
|
118
|
+
The `Button` component is composed of the following components under the hood and can be used to customise the button further:
|
|
119
|
+
|
|
120
|
+
- [ButtonGroup](#buttongroup)
|
|
121
|
+
- [ButtonText](#buttontext) (Advanced usage only)
|
|
122
|
+
- [ButtonIcon](#buttonicon) (Advanced usage only)
|
|
123
|
+
- [ButtonSpinner](#buttonspinner) (Advanced usage only)
|
|
124
|
+
|
|
125
|
+
### `ButtonGroup`
|
|
126
|
+
|
|
127
|
+
The `ButtonGroup` component is used to group multiple buttons together.
|
|
128
|
+
|
|
129
|
+
<UsageWrap>
|
|
130
|
+
<Center>
|
|
131
|
+
<ButtonGroup flexDirection="column">
|
|
132
|
+
<Button colorScheme="yellow">
|
|
133
|
+
<ButtonText>Button 1</ButtonText>
|
|
134
|
+
</Button>
|
|
135
|
+
<Button colorScheme="grey" variant="outline">
|
|
136
|
+
<ButtonText>Button 2</ButtonText>
|
|
137
|
+
</Button>
|
|
138
|
+
<Button colorScheme="red" variant="ghost">
|
|
139
|
+
<ButtonText>Button 3</ButtonText>
|
|
140
|
+
</Button>
|
|
141
|
+
</ButtonGroup>
|
|
142
|
+
</Center>
|
|
143
|
+
</UsageWrap>
|
|
144
|
+
|
|
145
|
+
```tsx
|
|
146
|
+
import { ButtonGroup, Button } from '@utilitywarehouse/hearth-react-native';
|
|
147
|
+
|
|
148
|
+
const MyComponent = () => {
|
|
149
|
+
return (
|
|
150
|
+
<ButtonGroup flexDirection="column">
|
|
151
|
+
<Button colorScheme="yellow">Button 1</Button>
|
|
152
|
+
<Button colorScheme="grey" variant="outline">
|
|
153
|
+
Button 2
|
|
154
|
+
</Button>
|
|
155
|
+
<Button colorScheme="red" variant="ghost">
|
|
156
|
+
Button 3
|
|
157
|
+
</Button>
|
|
158
|
+
</ButtonGroup>
|
|
159
|
+
);
|
|
160
|
+
};
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
#### Props
|
|
164
|
+
|
|
165
|
+
| Property | Type | Description | Default |
|
|
166
|
+
| --------------- | -------------------------------------------------------- | -------------------------------------------------------------- | ------- |
|
|
167
|
+
| `flexDirection` | `'row' \| 'column' \| 'row-reverse' \| 'column-reverse'` | Set the direction of Button group to vertical or horizontal | 'row' |
|
|
168
|
+
| `disabled` | `boolean` | When true, this will disable all the buttons in a ButtonGroup. | `false` |
|
|
169
|
+
| `loading` | `boolean` | When true, this will show a loading spinner in all buttons. | `false` |
|
|
170
|
+
| `attached` | `boolean` | When attached, all buttons will be attached to each other. | `false` |
|
|
171
|
+
| `reversed` | `boolean` | To reverse the order of components. | `false` |
|
|
172
|
+
| `space` | `string` | It sets the space between different buttons. | 'md' |
|
|
173
|
+
|
|
174
|
+
### `ButtonIcon`
|
|
175
|
+
|
|
176
|
+
The `ButtonIcon` component is used to add an icon to the button.
|
|
177
|
+
|
|
178
|
+
**Note:** The `ButtonIcon` component should be used only when utilising [advanced usage](#advanced-usage) with the `Button` component.
|
|
179
|
+
We recommend using the `icon` prop on the `Button` component for simpler usage.
|
|
180
|
+
|
|
181
|
+
<UsageWrap>
|
|
182
|
+
<Center>
|
|
183
|
+
<Button colorScheme="yellow">
|
|
184
|
+
<ButtonIcon as={AddSmallIcon} />
|
|
185
|
+
<ButtonText>Button</ButtonText>
|
|
186
|
+
</Button>
|
|
187
|
+
</Center>
|
|
188
|
+
</UsageWrap>
|
|
189
|
+
|
|
190
|
+
```tsx
|
|
191
|
+
import { Button, ButtonIcon, ButtonText } from '@utilitywarehouse/hearth-react-native';
|
|
192
|
+
import { AddSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
193
|
+
|
|
194
|
+
const MyComponent = () => {
|
|
195
|
+
return (
|
|
196
|
+
<Button colorScheme="yellow">
|
|
197
|
+
<ButtonIcon as={AddSmallIcon} />
|
|
198
|
+
<ButtonText>Button</ButtonText>
|
|
199
|
+
</Button>
|
|
200
|
+
);
|
|
201
|
+
};
|
|
202
|
+
```
|
|
203
|
+
|
|
204
|
+
### `ButtonText`
|
|
205
|
+
|
|
206
|
+
The `ButtonText` component is used to add text to the button.
|
|
207
|
+
|
|
208
|
+
**Note:** The `ButtonText` component should be used only when utilising [advanced usage](#advanced-usage) with the `Button` component.
|
|
209
|
+
We recommend using the children prop on the `Button` component for simpler usage.
|
|
210
|
+
|
|
211
|
+
<UsageWrap>
|
|
212
|
+
<Center>
|
|
213
|
+
<Button colorScheme="yellow">
|
|
214
|
+
<ButtonText>Button</ButtonText>
|
|
215
|
+
</Button>
|
|
216
|
+
</Center>
|
|
217
|
+
</UsageWrap>
|
|
218
|
+
|
|
219
|
+
```tsx
|
|
220
|
+
import { Button, ButtonText } from '@utilitywarehouse/hearth-react-native';
|
|
221
|
+
|
|
222
|
+
const MyComponent = () => {
|
|
223
|
+
return (
|
|
224
|
+
<Button colorScheme="yellow">
|
|
225
|
+
<ButtonText>Button</ButtonText>
|
|
226
|
+
</Button>
|
|
227
|
+
);
|
|
228
|
+
};
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
### `ButtonSpinner`
|
|
232
|
+
|
|
233
|
+
The `ButtonSpinner` component is used to add a spinner to the button and show loading state.
|
|
234
|
+
|
|
235
|
+
> This component is used for buttons that trigger long-running actions, like form submissions or data loading.
|
|
236
|
+
> The Button's appearance resembles a disabled state, as user interaction is prevented during the loading process.
|
|
237
|
+
|
|
238
|
+
**Note:** The `ButtonSpinner` component should be used only when utilising [advanced usage](#advanced-usage) with the `Button` component and
|
|
239
|
+
should inlude the `disabled` prop. We recommend using the `loading` prop on the `Button` component for simpler usage.
|
|
240
|
+
|
|
241
|
+
<UsageWrap>
|
|
242
|
+
<Center>
|
|
243
|
+
<Button colorScheme="yellow" disabled>
|
|
244
|
+
<ButtonSpinner />
|
|
245
|
+
<ButtonText>Button</ButtonText>
|
|
246
|
+
</Button>
|
|
247
|
+
</Center>
|
|
248
|
+
</UsageWrap>
|
|
249
|
+
|
|
250
|
+
```tsx
|
|
251
|
+
import { Button, ButtonSpinner, ButtonText } from '@utilitywarehouse/hearth-react-native';
|
|
252
|
+
|
|
253
|
+
const MyComponent = ({ loading }) => {
|
|
254
|
+
return (
|
|
255
|
+
<Button colorScheme="yellow" disabled>
|
|
256
|
+
{loading ? <ButtonSpinner /> : null}
|
|
257
|
+
<ButtonText>Button</ButtonText>
|
|
258
|
+
</Button>
|
|
259
|
+
);
|
|
260
|
+
};
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
## Examples
|
|
264
|
+
|
|
265
|
+
### Padding None
|
|
266
|
+
|
|
267
|
+
Similar to the `UnstyledIconButton`, the `paddingNone` prop can be used to remove the horizontal padding from the `sm` size `ghost` variant button.
|
|
268
|
+
This is useful when you want to create a button that looks like a link or a text button without any padding around it.
|
|
269
|
+
|
|
270
|
+
<UsageWrap>
|
|
271
|
+
<Center>
|
|
272
|
+
<Button variant="ghost" colorScheme="grey" size="sm" paddingNone>
|
|
273
|
+
{`No Padding`}
|
|
274
|
+
</Button>
|
|
275
|
+
</Center>
|
|
276
|
+
</UsageWrap>
|
|
277
|
+
|
|
278
|
+
```tsx
|
|
279
|
+
import { Button } from '@utilitywarehouse/hearth-react-native';
|
|
280
|
+
|
|
281
|
+
const MyComponent = () => {
|
|
282
|
+
return (
|
|
283
|
+
<Button variant="ghost" colorScheme="grey" size="sm" paddingNone>
|
|
284
|
+
No Padding
|
|
285
|
+
</Button>
|
|
286
|
+
);
|
|
287
|
+
};
|
|
288
|
+
```
|