@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,366 @@
|
|
|
1
|
+
import { Meta, Canvas, Story, Controls } from '@storybook/addon-docs/blocks';
|
|
2
|
+
import * as Stories from './Radio.stories';
|
|
3
|
+
import {
|
|
4
|
+
Radio,
|
|
5
|
+
RadioGroup,
|
|
6
|
+
RadioIndicator,
|
|
7
|
+
RadioIcon,
|
|
8
|
+
RadioLabel,
|
|
9
|
+
Center,
|
|
10
|
+
Box,
|
|
11
|
+
RadioTile,
|
|
12
|
+
} from '../../';
|
|
13
|
+
import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
14
|
+
import {
|
|
15
|
+
ViewFigmaButton,
|
|
16
|
+
BackToTopButton,
|
|
17
|
+
UsageWrap,
|
|
18
|
+
AdvancedRadioExample,
|
|
19
|
+
} from '../../../docs/components';
|
|
20
|
+
|
|
21
|
+
<Meta title="Forms / Radio" />
|
|
22
|
+
|
|
23
|
+
<BackToTopButton />
|
|
24
|
+
|
|
25
|
+
<ViewFigmaButton url="https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=4454-2232" />
|
|
26
|
+
|
|
27
|
+
# Radio
|
|
28
|
+
|
|
29
|
+
The Radio component presents users with predefined choices and enables them to select only one option. It is commonly used for providing a single-choice selection in forms or surveys.
|
|
30
|
+
|
|
31
|
+
- [Playground](#playground)
|
|
32
|
+
- [Usage](#usage)
|
|
33
|
+
- [Props](#props)
|
|
34
|
+
- [Components](#components)
|
|
35
|
+
- [`Radio`](#radio)
|
|
36
|
+
- [`RadioTile`](#radiotile)
|
|
37
|
+
- [`RadioIndicator`](#radioindicator)
|
|
38
|
+
- [`RadioIcon`](#radioicon)
|
|
39
|
+
- [`RadioLabel`](#radiolabel)
|
|
40
|
+
- [`RadioGroup`](#radiogroup)
|
|
41
|
+
- [Variants](#variants)
|
|
42
|
+
- [Advanced Usage](#advanced-usage)
|
|
43
|
+
- [Examples](#examples)
|
|
44
|
+
- [`RadioTile` component](#radiotile-component)
|
|
45
|
+
- [`RadioGroup` component](#radiogroup-component)
|
|
46
|
+
|
|
47
|
+
## Playground
|
|
48
|
+
|
|
49
|
+
<Canvas of={Stories.Playground} />
|
|
50
|
+
|
|
51
|
+
<Controls of={Stories.Playground} />
|
|
52
|
+
|
|
53
|
+
## Usage
|
|
54
|
+
|
|
55
|
+
- A `Radio` component is composed of a `RadioGroup`, `RadioIndicator`, `RadioLabel`.
|
|
56
|
+
- `Radio` is used for a single selection
|
|
57
|
+
- `RadioGroup` is the building block for `Radio`
|
|
58
|
+
|
|
59
|
+
<UsageWrap>
|
|
60
|
+
<Center>
|
|
61
|
+
<RadioGroup aria-label="Radio Group" nativeID="Radio-group">
|
|
62
|
+
<Radio
|
|
63
|
+
value="Label 1"
|
|
64
|
+
aria-label="Label 1"
|
|
65
|
+
label="Option 1"
|
|
66
|
+
/>
|
|
67
|
+
<Radio
|
|
68
|
+
value="Label 2"
|
|
69
|
+
aria-label="Label 2"
|
|
70
|
+
label="Option 2"
|
|
71
|
+
/>
|
|
72
|
+
</RadioGroup>
|
|
73
|
+
|
|
74
|
+
</Center>
|
|
75
|
+
</UsageWrap>
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
import { Radio, RadioGroup, RadioLabel, RadioIndicator } from '@utilitywarehouse/native-ui';
|
|
79
|
+
|
|
80
|
+
const MyComponent = () => {
|
|
81
|
+
const [value, setValue] = React.useState('Option 1');
|
|
82
|
+
return (
|
|
83
|
+
<RadioGroup aria-label="Radio Group" value={value} onChange={setValue} nativeID="Radio-group">
|
|
84
|
+
<Radio value="Option 1" aria-label="Option 1" label="Option 1" />
|
|
85
|
+
<Radio value="Option 2" aria-label="Option 2" label="Option 2" />
|
|
86
|
+
</RadioGroup>
|
|
87
|
+
);
|
|
88
|
+
};
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Props
|
|
92
|
+
|
|
93
|
+
| Property | Type | Default | Description |
|
|
94
|
+
| -------------------- | ----------------------------------- | --------- | ---------------------------------------------------------------------------------------------------- |
|
|
95
|
+
| `value` | string | - | The value to be used in the radio input. This is the value that will be returned on form submission. |
|
|
96
|
+
| `onChange` | function | - | Function called when the state of the radio changes. |
|
|
97
|
+
| `disabled` | bool | false | To manually set disable to the radio. |
|
|
98
|
+
| `validationStatus` | `'valid' \| 'invalid' \| 'initial'` | - | The validation status of the radio. |
|
|
99
|
+
| `disabled` | `bool` | `false` | To manually set disable to the radio. |
|
|
100
|
+
| `label` | `string` | - | The label to be displayed next to the radio. |
|
|
101
|
+
| `helperText` | `string` | - | The helper text to be displayed below the radio. |
|
|
102
|
+
| `helperIcon` | `React.ComponentType` | - | The icon to be displayed next to the helper text. |
|
|
103
|
+
| `invalidText` | `string` | - | The invalid text to be displayed below the radio. |
|
|
104
|
+
| `validText` | `string` | - | The valid text to be displayed below the radio. |
|
|
105
|
+
| `showValidationIcon` | `boolean` | `true` | Whether to show the validation icon. |
|
|
106
|
+
| `type` | `'default' \| 'tile'` | `default` | The type of the radio. |
|
|
107
|
+
|
|
108
|
+
## Components
|
|
109
|
+
|
|
110
|
+
### `Radio`
|
|
111
|
+
|
|
112
|
+
Contains all Radio related layout style props and actions. It inherits all the properties of React Native's [View component](https://reactnative.dev/docs/view).
|
|
113
|
+
|
|
114
|
+
### `RadioTile`
|
|
115
|
+
|
|
116
|
+
Contains all Radio related layout style props and actions. It inherits all the properties of React Native's [View component](https://reactnative.dev/docs/view).
|
|
117
|
+
|
|
118
|
+
### `RadioIndicator`
|
|
119
|
+
|
|
120
|
+
Contains all Indicator related layout style props and actions. It inherits all the properties of React Native's [View component](https://reactnative.dev/docs/view).
|
|
121
|
+
|
|
122
|
+
### `RadioIcon`
|
|
123
|
+
|
|
124
|
+
Contains all Icon related layout style props and actions.
|
|
125
|
+
|
|
126
|
+
### `RadioLabel`
|
|
127
|
+
|
|
128
|
+
Contains all Label related layout style props and actions. It inherits all the properties of React Native's [Text component](https://reactnative.dev/docs/text).
|
|
129
|
+
|
|
130
|
+
### `RadioGroup`
|
|
131
|
+
|
|
132
|
+
Contains all Group related layout style props and actions. It inherits all the properties of React Native's [View component](https://reactnative.dev/docs/view).
|
|
133
|
+
|
|
134
|
+
| Property | Type | Default | Description |
|
|
135
|
+
| -------------------- | ----------------------------------- | --------- | ------------------------------------------------------------------- |
|
|
136
|
+
| `value` | string | - | The value of the radio group. |
|
|
137
|
+
| `onChange` | function | - | The callback fired when any children Radio is checked or unchecked. |
|
|
138
|
+
| `disabled` | bool | - | To manually set disable to the radio group. |
|
|
139
|
+
| `validationStatus` | `'valid' \| 'invalid' \| 'initial'` | - | The validation status of the radio group. |
|
|
140
|
+
| `label` | `string` | - | The label to be displayed above the radio group. |
|
|
141
|
+
| `helperText` | `string` | - | The helper text to be displayed below the radio group. |
|
|
142
|
+
| `helperIcon` | `React.ComponentType` | - | The icon to be displayed next to the helper text. |
|
|
143
|
+
| `invalidText` | `string` | - | The invalid text to be displayed below the radio group. |
|
|
144
|
+
| `validText` | `string` | - | The valid text to be displayed below the radio group. |
|
|
145
|
+
| `showValidationIcon` | `boolean` | `true` | Whether to show the validation icon. |
|
|
146
|
+
| `type` | `'default' \| 'tile'` | `default` | The type of the radio group. |
|
|
147
|
+
| `direction` | `'row' \| 'column'` | `column` | The direction of the radio group. |
|
|
148
|
+
| `gap` | `string` | - | The gap between the radio group items. |
|
|
149
|
+
|
|
150
|
+
## Variants
|
|
151
|
+
|
|
152
|
+
<Canvas of={Stories.Variants} />
|
|
153
|
+
|
|
154
|
+
## Advanced Usage
|
|
155
|
+
|
|
156
|
+
There may be cases where you need to customise the Radio component to fit your design requirements.
|
|
157
|
+
In this example, we will create a custom Radio component with a badge and bullet list.
|
|
158
|
+
|
|
159
|
+
<UsageWrap>
|
|
160
|
+
<Center>
|
|
161
|
+
<AdvancedRadioExample />
|
|
162
|
+
</Center>
|
|
163
|
+
</UsageWrap>
|
|
164
|
+
|
|
165
|
+
```tsx
|
|
166
|
+
import {
|
|
167
|
+
Badge,
|
|
168
|
+
Heading,
|
|
169
|
+
Radio,
|
|
170
|
+
RadioGroup,
|
|
171
|
+
RadioIcon,
|
|
172
|
+
RadioIndicator,
|
|
173
|
+
BodyText,
|
|
174
|
+
Box,
|
|
175
|
+
type RadioProps as NativeUIRadioProps,
|
|
176
|
+
} from '../../src';
|
|
177
|
+
import { TickSmallIcon } from '@utilitywarehouse/hearth-react-native-icons';
|
|
178
|
+
|
|
179
|
+
import { StyleSheet } from 'react-native-unistyles';
|
|
180
|
+
|
|
181
|
+
interface RadioProps {
|
|
182
|
+
currentValue: string;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
const styles = StyleSheet.create(({ colorMode, color, borderRadius, borderWidth, space }) => ({
|
|
186
|
+
radio: {
|
|
187
|
+
borderWidth: borderWidth[2],
|
|
188
|
+
borderColor: colorMode === 'light' ? color.grey[500] : color.grey[700],
|
|
189
|
+
borderRadius: borderRadius.xl,
|
|
190
|
+
padding: space[200],
|
|
191
|
+
variants: {
|
|
192
|
+
checked: {
|
|
193
|
+
true: {
|
|
194
|
+
borderColor: colorMode === 'light' ? color.green[500] : color.green[700],
|
|
195
|
+
},
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
indicator: {
|
|
200
|
+
variants: {
|
|
201
|
+
checked: {
|
|
202
|
+
true: {
|
|
203
|
+
backgroundColor: colorMode === 'light' ? color.green[500] : color.green[700],
|
|
204
|
+
borderColor: colorMode === 'light' ? color.green[500] : color.green[700],
|
|
205
|
+
},
|
|
206
|
+
},
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
heading: {
|
|
210
|
+
marginBottom: space[100],
|
|
211
|
+
},
|
|
212
|
+
badge: {
|
|
213
|
+
marginRight: space[200],
|
|
214
|
+
alignSelf: 'flex-end',
|
|
215
|
+
},
|
|
216
|
+
}));
|
|
217
|
+
|
|
218
|
+
const CustomRadio: React.FC<
|
|
219
|
+
RadioProps &
|
|
220
|
+
Omit<
|
|
221
|
+
NativeUIRadioProps,
|
|
222
|
+
'label' | 'helperText' | 'helperIcon' | 'invalidText' | 'validText' | 'showValidationIcon'
|
|
223
|
+
>
|
|
224
|
+
> = ({ children, currentValue, ...props }) => {
|
|
225
|
+
styles.useVariants({ checked: currentValue === props.value });
|
|
226
|
+
return (
|
|
227
|
+
<Radio style={styles.radio} {...props}>
|
|
228
|
+
<Box flexDirection="row" flex={1}>
|
|
229
|
+
<Box pr="200" flex={1}>
|
|
230
|
+
{children}
|
|
231
|
+
</Box>
|
|
232
|
+
<RadioIndicator style={styles.indicator}>
|
|
233
|
+
<RadioIcon as={TickSmallIcon} color="white" />
|
|
234
|
+
</RadioIndicator>
|
|
235
|
+
</Box>
|
|
236
|
+
</Radio>
|
|
237
|
+
);
|
|
238
|
+
};
|
|
239
|
+
|
|
240
|
+
const BulletListItem = ({ children }: { children: React.ReactNode }) => (
|
|
241
|
+
<BodyText>
|
|
242
|
+
{'\u2022'} {children}
|
|
243
|
+
</BodyText>
|
|
244
|
+
);
|
|
245
|
+
|
|
246
|
+
const BulletList = ({ children }: { children: React.ReactNode }) => (
|
|
247
|
+
<Box pl="200" gap="100">
|
|
248
|
+
{children}
|
|
249
|
+
</Box>
|
|
250
|
+
);
|
|
251
|
+
|
|
252
|
+
const AdvancedRadioExample: React.FC = () => {
|
|
253
|
+
const [value, setValue] = React.useState('Option 1');
|
|
254
|
+
|
|
255
|
+
const handleChange = (val: string) => setValue(val);
|
|
256
|
+
|
|
257
|
+
return (
|
|
258
|
+
<RadioGroup onChange={handleChange} value={value} gap="200">
|
|
259
|
+
<Box>
|
|
260
|
+
<Badge colorScheme={value === 'Option 1' ? 'green' : 'grey'} flatBase style={styles.badge}>
|
|
261
|
+
Recommended
|
|
262
|
+
</Badge>
|
|
263
|
+
<CustomRadio value="Option 1" currentValue={value}>
|
|
264
|
+
<Heading size="md" style={styles.heading}>
|
|
265
|
+
Instant bank transfer
|
|
266
|
+
</Heading>
|
|
267
|
+
<BulletList>
|
|
268
|
+
<BulletListItem>Receive your money instantly</BulletListItem>
|
|
269
|
+
<BulletListItem>No fees</BulletListItem>
|
|
270
|
+
<BulletListItem>Available 24/7</BulletListItem>
|
|
271
|
+
</BulletList>
|
|
272
|
+
</CustomRadio>
|
|
273
|
+
</Box>
|
|
274
|
+
<CustomRadio value="Option 2" currentValue={value}>
|
|
275
|
+
<Heading size="md" style={styles.heading}>
|
|
276
|
+
Debit card payment
|
|
277
|
+
</Heading>
|
|
278
|
+
<BulletList>
|
|
279
|
+
<BulletListItem>£0.35 fee</BulletListItem>
|
|
280
|
+
<BulletListItem>Available 24/7</BulletListItem>
|
|
281
|
+
</BulletList>
|
|
282
|
+
</CustomRadio>
|
|
283
|
+
</RadioGroup>
|
|
284
|
+
);
|
|
285
|
+
};
|
|
286
|
+
|
|
287
|
+
export default AdvancedRadioExample;
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
## Examples
|
|
291
|
+
|
|
292
|
+
### `RadioTile` component
|
|
293
|
+
|
|
294
|
+
The `RadioTile` component is a variant of the `Radio` component that displays the radio button as a card.
|
|
295
|
+
It is used to present options in a more visually appealing way.
|
|
296
|
+
|
|
297
|
+
<UsageWrap>
|
|
298
|
+
<Center>
|
|
299
|
+
<RadioGroup>
|
|
300
|
+
<RadioTile value="option-1" aria-label="Label 1" label="Option 1" />
|
|
301
|
+
<RadioTile value="option-2" aria-label="Label 2" label="Option 2" />
|
|
302
|
+
</RadioGroup>
|
|
303
|
+
</Center>
|
|
304
|
+
</UsageWrap>
|
|
305
|
+
|
|
306
|
+
```tsx
|
|
307
|
+
import { RadioTile, RadioGroup } from '@utilitywarehouse/native-ui';
|
|
308
|
+
|
|
309
|
+
const MyComponent = () => {
|
|
310
|
+
const [value, setValue] = React.useState('option-1');
|
|
311
|
+
return (
|
|
312
|
+
<RadioGroup value={value} onChange={setValue}>
|
|
313
|
+
<RadioTile value="option-1" aria-label="Label 1" label="Option 1" />
|
|
314
|
+
<RadioTile value="option-2" aria-label="Label 2" label="Option 2" />
|
|
315
|
+
</RadioGroup>
|
|
316
|
+
);
|
|
317
|
+
};
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### `RadioGroup` component
|
|
321
|
+
|
|
322
|
+
The `RadioGroup` component is used to group multiple `Radio` components together.
|
|
323
|
+
You can pass props like `label` and `helperText` to the `RadioGroup` component to provide context for the group of radios.
|
|
324
|
+
|
|
325
|
+
<UsageWrap>
|
|
326
|
+
<Center>
|
|
327
|
+
<RadioGroup
|
|
328
|
+
aria-label="Radio Group"
|
|
329
|
+
label="Radio Group Label"
|
|
330
|
+
helperText="This is the supporting text"
|
|
331
|
+
invalidText="This is an invalid text"
|
|
332
|
+
validText="This is a valid text"
|
|
333
|
+
validationStatus="invalid"
|
|
334
|
+
>
|
|
335
|
+
<Radio value="option-1" aria-label="Label 1" label="Option 1" />
|
|
336
|
+
<Radio value="option-2" aria-label="Label 2" label="Option 2" />
|
|
337
|
+
<Radio value="option-3" aria-label="Label 3" label="Option 3" />
|
|
338
|
+
<Radio value="option-4" aria-label="Label 4" label="Option 4" />
|
|
339
|
+
</RadioGroup>
|
|
340
|
+
|
|
341
|
+
</Center>
|
|
342
|
+
</UsageWrap>
|
|
343
|
+
|
|
344
|
+
```tsx
|
|
345
|
+
import { Radio, RadioGroup } from '@utilitywarehouse/native-ui';
|
|
346
|
+
|
|
347
|
+
const MyComponent = () => {
|
|
348
|
+
const [value, setValue] = React.useState('option-1');
|
|
349
|
+
return (
|
|
350
|
+
<RadioGroup
|
|
351
|
+
aria-label="Radio Group"
|
|
352
|
+
value={value}
|
|
353
|
+
onChange={setValue}
|
|
354
|
+
label="Radio Group Label"
|
|
355
|
+
helperText="This is the supporting text"
|
|
356
|
+
invalidText="This is an invalid text"
|
|
357
|
+
validText="This is a valid text"
|
|
358
|
+
>
|
|
359
|
+
<Radio value="option-1" aria-label="Label 1" label="Option 1" />
|
|
360
|
+
<Radio value="option-2" aria-label="Label 2" label="Option 2" />
|
|
361
|
+
<Radio value="option-3" aria-label="Label 3" label="Option 3" />
|
|
362
|
+
<Radio value="option-4" aria-label="Label 4" label="Option 4" />
|
|
363
|
+
</RadioGroup>
|
|
364
|
+
);
|
|
365
|
+
};
|
|
366
|
+
```
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import figma from '@figma/code-connect';
|
|
2
|
+
import { Radio, RadioGroup } from './';
|
|
3
|
+
|
|
4
|
+
const value = 'some-value';
|
|
5
|
+
const setValue = (value: string) => console.log(value);
|
|
6
|
+
|
|
7
|
+
figma.connect(
|
|
8
|
+
Radio,
|
|
9
|
+
'https://www.figma.com/design/3RY3OvLA88yZksRjOfjQJm/UW-App-UI?node-id=5626-1463&m=dev',
|
|
10
|
+
{
|
|
11
|
+
props: {
|
|
12
|
+
disabled: figma.boolean('disabled'),
|
|
13
|
+
label: figma.nestedProps('Label', {
|
|
14
|
+
text: figma.string('Label Text'),
|
|
15
|
+
}),
|
|
16
|
+
helperText: figma.nestedProps('Helper Text', {
|
|
17
|
+
text: figma.string('Text'),
|
|
18
|
+
}),
|
|
19
|
+
invalidText: figma.boolean('invalid', {
|
|
20
|
+
true: figma.nestedProps('Helper Text', {
|
|
21
|
+
text: figma.string('Text'),
|
|
22
|
+
showIcon: figma.boolean('showIcon?'),
|
|
23
|
+
}),
|
|
24
|
+
false: {
|
|
25
|
+
text: undefined,
|
|
26
|
+
showIcon: undefined,
|
|
27
|
+
},
|
|
28
|
+
}),
|
|
29
|
+
},
|
|
30
|
+
example: ({ disabled, label, helperText, invalidText }) => (
|
|
31
|
+
<RadioGroup value={value} onChange={setValue}>
|
|
32
|
+
<Radio
|
|
33
|
+
value="someValue"
|
|
34
|
+
disabled={disabled}
|
|
35
|
+
label={label.text}
|
|
36
|
+
helperText={helperText.text}
|
|
37
|
+
invalidText={invalidText.text}
|
|
38
|
+
showValidationIcon={invalidText.showIcon}
|
|
39
|
+
/>
|
|
40
|
+
</RadioGroup>
|
|
41
|
+
),
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
// TODO: Add variants with helperText when it's implemented
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { ComponentType } from 'react';
|
|
2
|
+
import type { PressableProps, ViewProps } from 'react-native';
|
|
3
|
+
|
|
4
|
+
interface RadioBaseProps extends Omit<PressableProps, 'children'> {
|
|
5
|
+
value: string;
|
|
6
|
+
onChange?: (isSelected: boolean) => void;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
validationStatus?: 'valid' | 'invalid' | 'initial';
|
|
9
|
+
type?: 'default' | 'tile';
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface RadioWithChildrenProps extends RadioBaseProps {
|
|
13
|
+
children: ViewProps['children'];
|
|
14
|
+
label?: never;
|
|
15
|
+
helperText?: never;
|
|
16
|
+
helperIcon?: never;
|
|
17
|
+
invalidText?: never;
|
|
18
|
+
validText?: never;
|
|
19
|
+
showValidationIcon?: never;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
interface RadioWithoutChildrenProps extends RadioBaseProps {
|
|
23
|
+
children?: never;
|
|
24
|
+
label?: string;
|
|
25
|
+
helperText?: string;
|
|
26
|
+
helperIcon?: ComponentType;
|
|
27
|
+
invalidText?: string;
|
|
28
|
+
validText?: string;
|
|
29
|
+
showValidationIcon?: boolean;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type RadioProps = RadioWithChildrenProps | RadioWithoutChildrenProps;
|
|
33
|
+
|
|
34
|
+
export default RadioProps;
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { Meta, StoryObj } from '@storybook/react-vite';
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Radio, RadioGroup } from '.';
|
|
4
|
+
import { VariantTitle } from '../../../docs/components';
|
|
5
|
+
import { Flex } from '../Flex';
|
|
6
|
+
|
|
7
|
+
const meta = {
|
|
8
|
+
title: 'Stories / Radio',
|
|
9
|
+
component: Radio,
|
|
10
|
+
parameters: {
|
|
11
|
+
layout: 'centered',
|
|
12
|
+
},
|
|
13
|
+
argTypes: {
|
|
14
|
+
disabled: {
|
|
15
|
+
type: 'boolean',
|
|
16
|
+
control: 'boolean',
|
|
17
|
+
description: 'To manually set disable to the radio.',
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
control: 'text',
|
|
22
|
+
description: 'The label component for the radio.',
|
|
23
|
+
},
|
|
24
|
+
helperText: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
control: 'text',
|
|
27
|
+
description: 'The helper text of the radio component',
|
|
28
|
+
defaultValue: 'Helper text',
|
|
29
|
+
},
|
|
30
|
+
validationStatus: {
|
|
31
|
+
control: 'select',
|
|
32
|
+
options: ['initial', 'valid', 'invalid'],
|
|
33
|
+
description: 'The validation status of the radio component',
|
|
34
|
+
defaultValue: 'initial',
|
|
35
|
+
},
|
|
36
|
+
showValidationIcon: {
|
|
37
|
+
control: 'boolean',
|
|
38
|
+
description: 'Show the validation icon.',
|
|
39
|
+
defaultValue: true,
|
|
40
|
+
},
|
|
41
|
+
invalidText: {
|
|
42
|
+
control: 'text',
|
|
43
|
+
description: 'The invalid text of the radio component',
|
|
44
|
+
defaultValue: 'Invalid text',
|
|
45
|
+
},
|
|
46
|
+
type: {
|
|
47
|
+
control: 'select',
|
|
48
|
+
options: ['default', 'tile'],
|
|
49
|
+
description: 'The type of the radio component',
|
|
50
|
+
defaultValue: 'default',
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
args: {
|
|
54
|
+
disabled: false,
|
|
55
|
+
label: '',
|
|
56
|
+
helperText: '',
|
|
57
|
+
validationStatus: 'initial',
|
|
58
|
+
showValidationIcon: true,
|
|
59
|
+
invalidText: 'Invalid text',
|
|
60
|
+
validText: 'Valid text',
|
|
61
|
+
type: 'default',
|
|
62
|
+
},
|
|
63
|
+
} satisfies Meta<typeof Radio>;
|
|
64
|
+
|
|
65
|
+
export default meta;
|
|
66
|
+
type Story = StoryObj<typeof meta>;
|
|
67
|
+
|
|
68
|
+
export const Playground: Story = {
|
|
69
|
+
args: {
|
|
70
|
+
value: 'Option 1',
|
|
71
|
+
label: 'Label',
|
|
72
|
+
},
|
|
73
|
+
render: args => (
|
|
74
|
+
<RadioGroup>
|
|
75
|
+
<Radio
|
|
76
|
+
aria-label="Label 1"
|
|
77
|
+
onChange={(checked: boolean) => {
|
|
78
|
+
console.log(checked, '###');
|
|
79
|
+
}}
|
|
80
|
+
nativeID="Radio-1"
|
|
81
|
+
{...args}
|
|
82
|
+
/>
|
|
83
|
+
</RadioGroup>
|
|
84
|
+
),
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
export const Variants: Story = {
|
|
88
|
+
parameters: {
|
|
89
|
+
controls: { exclude: ['value', 'label', 'disabled'] },
|
|
90
|
+
},
|
|
91
|
+
args: {
|
|
92
|
+
value: 'Option 1',
|
|
93
|
+
},
|
|
94
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
95
|
+
render: ({ value: _, children: __, label: ___, disabled: _____, onChange: ______, ...args }) => {
|
|
96
|
+
const [value, setValue] = useState('Option 1');
|
|
97
|
+
return (
|
|
98
|
+
<Flex space="lg">
|
|
99
|
+
<VariantTitle title="Default">
|
|
100
|
+
<RadioGroup
|
|
101
|
+
aria-label="Radio Group"
|
|
102
|
+
value={value}
|
|
103
|
+
onChange={setValue}
|
|
104
|
+
nativeID="Radio-group"
|
|
105
|
+
>
|
|
106
|
+
<Radio
|
|
107
|
+
value="Option 1"
|
|
108
|
+
aria-label="Option 1"
|
|
109
|
+
onChange={(checked: boolean) => {
|
|
110
|
+
console.log(checked, '###');
|
|
111
|
+
}}
|
|
112
|
+
nativeID="Radio-1"
|
|
113
|
+
label="Option 1"
|
|
114
|
+
{...args}
|
|
115
|
+
/>
|
|
116
|
+
<Radio
|
|
117
|
+
value="Option 2"
|
|
118
|
+
aria-label="Option 2"
|
|
119
|
+
onChange={(checked: boolean) => {
|
|
120
|
+
console.log(checked, '###');
|
|
121
|
+
}}
|
|
122
|
+
nativeID="Radio-2"
|
|
123
|
+
label="Option 2"
|
|
124
|
+
{...args}
|
|
125
|
+
/>
|
|
126
|
+
</RadioGroup>
|
|
127
|
+
</VariantTitle>
|
|
128
|
+
<VariantTitle title="Disabled">
|
|
129
|
+
<RadioGroup
|
|
130
|
+
aria-label="Radio Group"
|
|
131
|
+
value={value}
|
|
132
|
+
onChange={setValue}
|
|
133
|
+
nativeID="Radio-group"
|
|
134
|
+
disabled
|
|
135
|
+
>
|
|
136
|
+
<Radio
|
|
137
|
+
aria-label="Option 3"
|
|
138
|
+
value="Option 1"
|
|
139
|
+
onChange={(checked: boolean) => console.log(checked, '###')}
|
|
140
|
+
nativeID="Radio-3"
|
|
141
|
+
label="Option 1"
|
|
142
|
+
{...args}
|
|
143
|
+
/>
|
|
144
|
+
<Radio
|
|
145
|
+
aria-label="Option 4"
|
|
146
|
+
value="Option 2"
|
|
147
|
+
onChange={(checked: boolean) => console.log(checked, '###')}
|
|
148
|
+
nativeID="Radio-4"
|
|
149
|
+
label="Option 2"
|
|
150
|
+
{...args}
|
|
151
|
+
/>
|
|
152
|
+
</RadioGroup>
|
|
153
|
+
</VariantTitle>
|
|
154
|
+
</Flex>
|
|
155
|
+
);
|
|
156
|
+
},
|
|
157
|
+
};
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { createRadio } from '@gluestack-ui/radio';
|
|
2
|
+
import StyledRadio from './RadioRoot';
|
|
3
|
+
import StyledRadioIndicator from './RadioIndicator';
|
|
4
|
+
import StyledRadioIcon from './RadioIcon';
|
|
5
|
+
import StyledRadioLabel from './RadioLabel';
|
|
6
|
+
import StyledRadioGroup from './RadioGroupRoot';
|
|
7
|
+
import RadioProps from './Radio.props';
|
|
8
|
+
|
|
9
|
+
import { Helper } from '../Helper';
|
|
10
|
+
import { useRadioGroupContext } from './RadioGroup.context';
|
|
11
|
+
import { useFormFieldContext } from '../FormField';
|
|
12
|
+
import RadioTileRoot from './RadioTileRoot';
|
|
13
|
+
import RadioTextContent from './RadioTextContent';
|
|
14
|
+
|
|
15
|
+
const RadioComponent = createRadio({
|
|
16
|
+
Root: StyledRadio,
|
|
17
|
+
Group: StyledRadioGroup,
|
|
18
|
+
Indicator: StyledRadioIndicator,
|
|
19
|
+
Icon: StyledRadioIcon,
|
|
20
|
+
Label: StyledRadioLabel,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const RadioGroup = RadioComponent.Group;
|
|
24
|
+
const RadioIndicator = RadioComponent.Indicator;
|
|
25
|
+
const RadioIcon = RadioComponent.Icon;
|
|
26
|
+
const RadioLabel = RadioComponent.Label;
|
|
27
|
+
|
|
28
|
+
RadioGroup.displayName = 'RadioGroup';
|
|
29
|
+
RadioIndicator.displayName = 'RadioIndicator';
|
|
30
|
+
RadioIcon.displayName = 'RadioIcon';
|
|
31
|
+
RadioLabel.displayName = 'RadioLabel';
|
|
32
|
+
|
|
33
|
+
const Radio = ({
|
|
34
|
+
children,
|
|
35
|
+
label,
|
|
36
|
+
disabled,
|
|
37
|
+
helperIcon,
|
|
38
|
+
helperText,
|
|
39
|
+
invalidText,
|
|
40
|
+
validText,
|
|
41
|
+
validationStatus: validation,
|
|
42
|
+
showValidationIcon,
|
|
43
|
+
type = 'default',
|
|
44
|
+
...props
|
|
45
|
+
}: RadioProps) => {
|
|
46
|
+
const { validationStatus: fieldValidationStatus } = useFormFieldContext();
|
|
47
|
+
const { validationStatus: groupValidationStatus, type: groupType } = useRadioGroupContext();
|
|
48
|
+
const validationStatus =
|
|
49
|
+
fieldValidationStatus ?? groupValidationStatus ?? validation ?? 'initial';
|
|
50
|
+
const radioType = groupType ?? type;
|
|
51
|
+
const radioChildren = children ? (
|
|
52
|
+
children
|
|
53
|
+
) : (
|
|
54
|
+
<>
|
|
55
|
+
<RadioIndicator>
|
|
56
|
+
<RadioIcon />
|
|
57
|
+
</RadioIndicator>
|
|
58
|
+
<RadioTextContent>
|
|
59
|
+
{!!label && <RadioLabel>{label}</RadioLabel>}
|
|
60
|
+
{!!helperText && <Helper disabled={disabled} icon={helperIcon} text={helperText} />}
|
|
61
|
+
{validationStatus === 'invalid' && !!invalidText && (
|
|
62
|
+
<Helper
|
|
63
|
+
showIcon={showValidationIcon}
|
|
64
|
+
disabled={disabled}
|
|
65
|
+
validationStatus="invalid"
|
|
66
|
+
text={invalidText}
|
|
67
|
+
/>
|
|
68
|
+
)}
|
|
69
|
+
{validationStatus === 'valid' && !!validText && (
|
|
70
|
+
<Helper
|
|
71
|
+
disabled={disabled}
|
|
72
|
+
showIcon={showValidationIcon}
|
|
73
|
+
validationStatus="valid"
|
|
74
|
+
text={validText}
|
|
75
|
+
/>
|
|
76
|
+
)}
|
|
77
|
+
</RadioTextContent>
|
|
78
|
+
</>
|
|
79
|
+
);
|
|
80
|
+
return (
|
|
81
|
+
<RadioComponent {...props} isDisabled={disabled}>
|
|
82
|
+
{radioType === 'tile' ? <RadioTileRoot>{radioChildren}</RadioTileRoot> : radioChildren}
|
|
83
|
+
</RadioComponent>
|
|
84
|
+
);
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
const RadioTile = ({ type = 'tile', ...props }: RadioProps) => <Radio {...props} type={type} />;
|
|
88
|
+
|
|
89
|
+
RadioTile.displayName = 'RadioTile';
|
|
90
|
+
Radio.displayName = 'Radio';
|
|
91
|
+
|
|
92
|
+
export { Radio, RadioGroup, RadioIndicator, RadioIcon, RadioLabel, RadioTile };
|
|
93
|
+
|
|
94
|
+
export default Radio;
|