@ovotech/element-native 2.0.0 → 2.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +5 -0
- package/dist/components/Accordion/Accordion.js +139 -0
- package/dist/components/Accordion/Group.d.ts +3 -0
- package/dist/components/Accordion/Group.js +41 -0
- package/dist/components/Accordion/Icon.d.ts +4 -0
- package/dist/components/Accordion/Icon.js +68 -0
- package/dist/components/Accordion/hooks.d.ts +6 -0
- package/dist/components/Accordion/hooks.js +43 -0
- package/dist/components/Accordion/index.d.ts +4 -0
- package/dist/components/Accordion/index.js +9 -0
- package/dist/components/Accordion/styles.d.ts +46 -0
- package/dist/components/Accordion/styles.js +52 -0
- package/dist/components/Accordion/types.d.ts +20 -0
- package/dist/components/Accordion/types.js +2 -0
- package/dist/components/Badge/Badge.d.ts +12 -0
- package/dist/components/Badge/Badge.js +79 -0
- package/dist/components/Badge/index.d.ts +1 -0
- package/dist/components/Badge/index.js +5 -0
- package/dist/components/CTAButton/CTAButton.d.ts +24 -0
- package/dist/components/CTAButton/CTAButton.js +107 -0
- package/dist/components/CTAButton/index.d.ts +1 -0
- package/dist/components/CTAButton/index.js +8 -0
- package/dist/components/CTALink/CTALink.d.ts +12 -0
- package/dist/components/CTALink/CTALink.js +45 -0
- package/dist/components/CTALink/index.d.ts +1 -0
- package/dist/components/CTALink/index.js +7 -0
- package/dist/components/Card/Card.d.ts +7 -0
- package/dist/components/Card/Card.js +33 -0
- package/dist/components/Card/index.d.ts +1 -0
- package/dist/components/Card/index.js +5 -0
- package/dist/components/Checkbox/Checkbox.d.ts +12 -0
- package/dist/components/Checkbox/Checkbox.js +121 -0
- package/dist/components/Checkbox/CheckboxField.d.ts +9 -0
- package/dist/components/Checkbox/CheckboxField.js +73 -0
- package/dist/components/Checkbox/index.d.ts +2 -0
- package/dist/components/Checkbox/index.js +7 -0
- package/dist/components/DataTable/DataTable.d.ts +13 -0
- package/dist/components/DataTable/DataTable.js +134 -0
- package/dist/components/DataTable/index.d.ts +1 -0
- package/dist/components/DataTable/index.js +5 -0
- package/dist/components/DateField/DateField.d.ts +21 -0
- package/dist/components/DateField/DateField.js +109 -0
- package/dist/components/DateField/index.d.ts +1 -0
- package/dist/components/DateField/index.js +5 -0
- package/dist/components/Disclosure/Disclosure.d.ts +8 -0
- package/dist/components/Disclosure/Disclosure.js +86 -0
- package/dist/components/Disclosure/index.d.ts +1 -0
- package/dist/components/Disclosure/index.js +17 -0
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +18 -0
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +73 -0
- package/dist/components/ErrorSummaryNotification/index.d.ts +1 -0
- package/dist/components/ErrorSummaryNotification/index.js +5 -0
- package/dist/components/ErrorText/ErrorText.d.ts +13 -0
- package/dist/components/ErrorText/ErrorText.js +41 -0
- package/dist/components/ErrorText/index.d.ts +1 -0
- package/dist/components/ErrorText/index.js +5 -0
- package/dist/components/Field/Field.d.ts +13 -0
- package/dist/components/Field/Field.js +94 -0
- package/dist/components/Field/index.d.ts +1 -0
- package/dist/components/Field/index.js +17 -0
- package/dist/components/FormGroup/FormGroup.d.ts +8 -0
- package/dist/components/FormGroup/FormGroup.js +43 -0
- package/dist/components/FormGroup/index.d.ts +1 -0
- package/dist/components/FormGroup/index.js +5 -0
- package/dist/components/Grid/Col.d.ts +12 -0
- package/dist/components/Grid/Col.js +58 -0
- package/dist/components/Grid/Row.d.ts +9 -0
- package/dist/components/Grid/Row.js +76 -0
- package/dist/components/Grid/index.d.ts +2 -0
- package/dist/components/Grid/index.js +7 -0
- package/dist/components/Heading/Heading.d.ts +6 -0
- package/dist/components/Heading/Heading.js +115 -0
- package/dist/components/Heading/index.d.ts +1 -0
- package/dist/components/Heading/index.js +8 -0
- package/dist/components/HintText/HintText.d.ts +13 -0
- package/dist/components/HintText/HintText.js +41 -0
- package/dist/components/HintText/index.d.ts +1 -0
- package/dist/components/HintText/index.js +5 -0
- package/dist/components/Icon/Icon.d.ts +11 -0
- package/dist/components/Icon/Icon.js +62 -0
- package/dist/components/Icon/index.d.ts +1 -0
- package/dist/components/Icon/index.js +5 -0
- package/dist/components/Input/CurrencyInput.d.ts +15 -0
- package/dist/components/Input/CurrencyInput.js +59 -0
- package/dist/components/Input/EmailInput.d.ts +9 -0
- package/dist/components/Input/EmailInput.js +41 -0
- package/dist/components/Input/Input.d.ts +16 -0
- package/dist/components/Input/Input.js +102 -0
- package/dist/components/Input/NumberInput.d.ts +9 -0
- package/dist/components/Input/NumberInput.js +41 -0
- package/dist/components/Input/PasswordInput.d.ts +9 -0
- package/dist/components/Input/PasswordInput.js +55 -0
- package/dist/components/Input/TelInput.d.ts +9 -0
- package/dist/components/Input/TelInput.js +41 -0
- package/dist/components/Input/TextInput.d.ts +9 -0
- package/dist/components/Input/TextInput.js +41 -0
- package/dist/components/Input/TextareaInput.d.ts +15 -0
- package/dist/components/Input/TextareaInput.js +64 -0
- package/dist/components/Input/index.d.ts +7 -0
- package/dist/components/Input/index.js +17 -0
- package/dist/components/LabelText/LabelText.d.ts +13 -0
- package/dist/components/LabelText/LabelText.js +41 -0
- package/dist/components/LabelText/index.d.ts +1 -0
- package/dist/components/LabelText/index.js +5 -0
- package/dist/components/List/List.d.ts +29 -0
- package/dist/components/List/List.js +169 -0
- package/dist/components/List/index.d.ts +1 -0
- package/dist/components/List/index.js +10 -0
- package/dist/components/Margin/Margin.d.ts +23 -0
- package/dist/components/Margin/Margin.js +53 -0
- package/dist/components/Margin/index.d.ts +1 -0
- package/dist/components/Margin/index.js +5 -0
- package/dist/components/NavHeader/NavHeader.d.ts +15 -0
- package/dist/components/NavHeader/NavHeader.js +93 -0
- package/dist/components/NavHeader/index.d.ts +1 -0
- package/dist/components/NavHeader/index.js +5 -0
- package/dist/components/Notification/Notification.d.ts +31 -0
- package/dist/components/Notification/Notification.js +118 -0
- package/dist/components/Notification/index.d.ts +1 -0
- package/dist/components/Notification/index.js +9 -0
- package/dist/components/Radio/Radio.d.ts +12 -0
- package/dist/components/Radio/Radio.js +114 -0
- package/dist/components/Radio/RadioField.d.ts +11 -0
- package/dist/components/Radio/RadioField.js +78 -0
- package/dist/components/Radio/index.d.ts +2 -0
- package/dist/components/Radio/index.js +7 -0
- package/dist/components/SkeletonLoading/Skeleton.d.ts +1 -0
- package/dist/components/SkeletonLoading/Skeleton.js +13 -0
- package/dist/components/SkeletonLoading/SkeletonCTA.d.ts +6 -0
- package/dist/components/SkeletonLoading/SkeletonCTA.js +41 -0
- package/dist/components/SkeletonLoading/SkeletonCircle.d.ts +6 -0
- package/dist/components/SkeletonLoading/SkeletonCircle.js +46 -0
- package/dist/components/SkeletonLoading/SkeletonHeading.d.ts +8 -0
- package/dist/components/SkeletonLoading/SkeletonHeading.js +41 -0
- package/dist/components/SkeletonLoading/SkeletonText.d.ts +6 -0
- package/dist/components/SkeletonLoading/SkeletonText.js +49 -0
- package/dist/components/SkeletonLoading/index.d.ts +5 -0
- package/dist/components/SkeletonLoading/index.js +21 -0
- package/dist/components/Stack/Stack.d.ts +10 -0
- package/dist/components/Stack/Stack.js +75 -0
- package/dist/components/Stack/index.d.ts +1 -0
- package/dist/components/Stack/index.js +5 -0
- package/dist/components/Stretch/Stretch.d.ts +7 -0
- package/dist/components/Stretch/Stretch.js +31 -0
- package/dist/components/Stretch/index.d.ts +1 -0
- package/dist/components/Stretch/index.js +17 -0
- package/dist/components/SubLabelText/SubLabelText.d.ts +13 -0
- package/dist/components/SubLabelText/SubLabelText.js +41 -0
- package/dist/components/SubLabelText/index.d.ts +1 -0
- package/dist/components/SubLabelText/index.js +5 -0
- package/dist/components/SummaryList/SummaryList.d.ts +10 -0
- package/dist/components/SummaryList/SummaryList.js +66 -0
- package/dist/components/SummaryList/index.d.ts +1 -0
- package/dist/components/SummaryList/index.js +6 -0
- package/dist/components/Tabs/Tab.d.ts +11 -0
- package/dist/components/Tabs/Tab.js +74 -0
- package/dist/components/Tabs/TabList.d.ts +1 -0
- package/dist/components/Tabs/TabList.js +74 -0
- package/dist/components/Tabs/TabPanel.d.ts +3 -0
- package/dist/components/Tabs/TabPanel.js +41 -0
- package/dist/components/Tabs/Tabs.d.ts +9 -0
- package/dist/components/Tabs/Tabs.js +95 -0
- package/dist/components/Tabs/index.d.ts +4 -0
- package/dist/components/Tabs/index.js +11 -0
- package/dist/components/Text/Text.d.ts +26 -0
- package/dist/components/Text/Text.js +96 -0
- package/dist/components/Text/index.d.ts +1 -0
- package/dist/components/Text/index.js +10 -0
- package/dist/components/TextField/CurrencyField.d.ts +11 -0
- package/dist/components/TextField/CurrencyField.js +56 -0
- package/dist/components/TextField/EmailField.d.ts +9 -0
- package/dist/components/TextField/EmailField.js +56 -0
- package/dist/components/TextField/NumberField.d.ts +9 -0
- package/dist/components/TextField/NumberField.js +56 -0
- package/dist/components/TextField/PasswordField.d.ts +9 -0
- package/dist/components/TextField/PasswordField.js +56 -0
- package/dist/components/TextField/TelField.d.ts +9 -0
- package/dist/components/TextField/TelField.js +56 -0
- package/dist/components/TextField/TextField.d.ts +9 -0
- package/dist/components/TextField/TextField.js +56 -0
- package/dist/components/TextField/TextareaField.d.ts +11 -0
- package/dist/components/TextField/TextareaField.js +56 -0
- package/dist/components/TextField/index.d.ts +7 -0
- package/dist/components/TextField/index.js +17 -0
- package/dist/components/TextLink/TextLink.d.ts +8 -0
- package/dist/components/TextLink/TextLink.js +75 -0
- package/dist/components/TextLink/index.d.ts +1 -0
- package/dist/components/TextLink/index.js +5 -0
- package/dist/components/index.d.ts +27 -0
- package/dist/components/index.js +43 -0
- package/dist/esm/components/Accordion/Accordion.js +111 -0
- package/dist/esm/components/Accordion/Group.js +14 -0
- package/dist/esm/components/Accordion/Icon.js +38 -0
- package/dist/esm/components/Accordion/hooks.js +16 -0
- package/dist/esm/components/Accordion/index.js +3 -0
- package/dist/esm/components/Accordion/styles.js +49 -0
- package/dist/esm/components/Accordion/types.js +1 -0
- package/dist/esm/components/Badge/Badge.js +49 -0
- package/dist/esm/components/Badge/index.js +1 -0
- package/dist/esm/components/CTAButton/CTAButton.js +78 -0
- package/dist/esm/components/CTAButton/index.js +1 -0
- package/dist/esm/components/CTALink/CTALink.js +17 -0
- package/dist/esm/components/CTALink/index.js +1 -0
- package/dist/esm/components/Card/Card.js +27 -0
- package/dist/esm/components/Card/index.js +1 -0
- package/dist/esm/components/Checkbox/Checkbox.js +95 -0
- package/dist/esm/components/Checkbox/CheckboxField.js +47 -0
- package/dist/esm/components/Checkbox/index.js +2 -0
- package/dist/esm/components/DataTable/DataTable.js +108 -0
- package/dist/esm/components/DataTable/index.js +1 -0
- package/dist/esm/components/DateField/DateField.js +83 -0
- package/dist/esm/components/DateField/index.js +1 -0
- package/dist/esm/components/Disclosure/Disclosure.js +60 -0
- package/dist/esm/components/Disclosure/index.js +1 -0
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +47 -0
- package/dist/esm/components/ErrorSummaryNotification/index.js +1 -0
- package/dist/esm/components/ErrorText/ErrorText.js +15 -0
- package/dist/esm/components/ErrorText/index.js +1 -0
- package/dist/esm/components/Field/Field.js +68 -0
- package/dist/esm/components/Field/index.js +1 -0
- package/dist/esm/components/FormGroup/FormGroup.js +37 -0
- package/dist/esm/components/FormGroup/index.js +1 -0
- package/dist/esm/components/Grid/Col.js +32 -0
- package/dist/esm/components/Grid/Row.js +47 -0
- package/dist/esm/components/Grid/index.js +2 -0
- package/dist/esm/components/Heading/Heading.js +82 -0
- package/dist/esm/components/Heading/index.js +1 -0
- package/dist/esm/components/HintText/HintText.js +15 -0
- package/dist/esm/components/HintText/index.js +1 -0
- package/dist/esm/components/Icon/Icon.js +35 -0
- package/dist/esm/components/Icon/index.js +1 -0
- package/dist/esm/components/Input/CurrencyInput.js +33 -0
- package/dist/esm/components/Input/EmailInput.js +15 -0
- package/dist/esm/components/Input/Input.js +76 -0
- package/dist/esm/components/Input/NumberInput.js +15 -0
- package/dist/esm/components/Input/PasswordInput.js +29 -0
- package/dist/esm/components/Input/TelInput.js +15 -0
- package/dist/esm/components/Input/TextInput.js +15 -0
- package/dist/esm/components/Input/TextareaInput.js +38 -0
- package/dist/esm/components/Input/index.js +7 -0
- package/dist/esm/components/LabelText/LabelText.js +15 -0
- package/dist/esm/components/LabelText/index.js +1 -0
- package/dist/esm/components/List/List.js +138 -0
- package/dist/esm/components/List/index.js +1 -0
- package/dist/esm/components/Margin/Margin.js +47 -0
- package/dist/esm/components/Margin/index.js +1 -0
- package/dist/esm/components/NavHeader/NavHeader.js +63 -0
- package/dist/esm/components/NavHeader/index.js +1 -0
- package/dist/esm/components/Notification/Notification.js +92 -0
- package/dist/esm/components/Notification/index.js +1 -0
- package/dist/esm/components/Radio/Radio.js +85 -0
- package/dist/esm/components/Radio/RadioField.js +52 -0
- package/dist/esm/components/Radio/index.js +2 -0
- package/dist/esm/components/SkeletonLoading/Skeleton.js +7 -0
- package/dist/esm/components/SkeletonLoading/SkeletonCTA.js +34 -0
- package/dist/esm/components/SkeletonLoading/SkeletonCircle.js +39 -0
- package/dist/esm/components/SkeletonLoading/SkeletonHeading.js +34 -0
- package/dist/esm/components/SkeletonLoading/SkeletonText.js +42 -0
- package/dist/esm/components/SkeletonLoading/index.js +5 -0
- package/dist/esm/components/Stack/Stack.js +46 -0
- package/dist/esm/components/Stack/index.js +1 -0
- package/dist/esm/components/Stretch/Stretch.js +24 -0
- package/dist/esm/components/Stretch/index.js +1 -0
- package/dist/esm/components/SubLabelText/SubLabelText.js +15 -0
- package/dist/esm/components/SubLabelText/index.js +1 -0
- package/dist/esm/components/SummaryList/SummaryList.js +39 -0
- package/dist/esm/components/SummaryList/index.js +1 -0
- package/dist/esm/components/Tabs/Tab.js +45 -0
- package/dist/esm/components/Tabs/TabList.js +48 -0
- package/dist/esm/components/Tabs/TabPanel.js +34 -0
- package/dist/esm/components/Tabs/Tabs.js +69 -0
- package/dist/esm/components/Tabs/index.js +4 -0
- package/dist/esm/components/Text/Text.js +69 -0
- package/dist/esm/components/Text/index.js +1 -0
- package/dist/esm/components/TextField/CurrencyField.js +30 -0
- package/dist/esm/components/TextField/EmailField.js +30 -0
- package/dist/esm/components/TextField/NumberField.js +30 -0
- package/dist/esm/components/TextField/PasswordField.js +30 -0
- package/dist/esm/components/TextField/TelField.js +30 -0
- package/dist/esm/components/TextField/TextField.js +30 -0
- package/dist/esm/components/TextField/TextareaField.js +30 -0
- package/dist/esm/components/TextField/index.js +7 -0
- package/dist/esm/components/TextLink/TextLink.js +49 -0
- package/dist/esm/components/TextLink/index.js +1 -0
- package/dist/esm/components/index.js +27 -0
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/use-breakpoint.js +12 -0
- package/dist/esm/hooks/use-full-width.js +16 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/providers/IconsProvider.js +65 -0
- package/dist/esm/providers/icons/ArrowDown.js +15 -0
- package/dist/esm/providers/icons/ArrowLeft.js +15 -0
- package/dist/esm/providers/icons/ArrowRight.js +15 -0
- package/dist/esm/providers/icons/ArrowUp.js +15 -0
- package/dist/esm/providers/icons/CaretDown.js +15 -0
- package/dist/esm/providers/icons/CaretLeft.js +15 -0
- package/dist/esm/providers/icons/CaretRight.js +15 -0
- package/dist/esm/providers/icons/CaretUp.js +15 -0
- package/dist/esm/providers/icons/Chart.js +15 -0
- package/dist/esm/providers/icons/Check.js +15 -0
- package/dist/esm/providers/icons/ChevronDown.js +15 -0
- package/dist/esm/providers/icons/ChevronLeft.js +15 -0
- package/dist/esm/providers/icons/ChevronLeftSmall.js +15 -0
- package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +15 -0
- package/dist/esm/providers/icons/ChevronRight.js +15 -0
- package/dist/esm/providers/icons/ChevronRightSmall.js +15 -0
- package/dist/esm/providers/icons/ChevronRightSmallLast.js +15 -0
- package/dist/esm/providers/icons/ChevronUp.js +15 -0
- package/dist/esm/providers/icons/Cross.js +15 -0
- package/dist/esm/providers/icons/Dollar.js +15 -0
- package/dist/esm/providers/icons/Download.js +15 -0
- package/dist/esm/providers/icons/Electricity.js +15 -0
- package/dist/esm/providers/icons/Euro.js +15 -0
- package/dist/esm/providers/icons/Gas.js +16 -0
- package/dist/esm/providers/icons/Help.js +15 -0
- package/dist/esm/providers/icons/Hide.js +15 -0
- package/dist/esm/providers/icons/Home.js +15 -0
- package/dist/esm/providers/icons/Info.js +15 -0
- package/dist/esm/providers/icons/Link.js +16 -0
- package/dist/esm/providers/icons/Logo.js +15 -0
- package/dist/esm/providers/icons/Minus.js +15 -0
- package/dist/esm/providers/icons/NewWindow.js +15 -0
- package/dist/esm/providers/icons/PaymentCard.js +15 -0
- package/dist/esm/providers/icons/Plus.js +15 -0
- package/dist/esm/providers/icons/Pound.js +15 -0
- package/dist/esm/providers/icons/Search.js +15 -0
- package/dist/esm/providers/icons/Show.js +15 -0
- package/dist/esm/providers/icons/User.js +15 -0
- package/dist/esm/providers/icons/index.js +38 -0
- package/dist/esm/providers/index.js +2 -0
- package/dist/esm/providers/types.js +1 -0
- package/dist/esm/styled.native.js +4 -0
- package/dist/esm/theme/create-theme.js +504 -0
- package/dist/esm/theme/index.js +8 -0
- package/dist/esm/theme/theme.js +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/utils.js +93 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/index.js +18 -0
- package/dist/hooks/use-breakpoint.d.ts +7 -0
- package/dist/hooks/use-breakpoint.js +16 -0
- package/dist/hooks/use-full-width.d.ts +2 -0
- package/dist/hooks/use-full-width.js +20 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +19 -0
- package/dist/providers/IconsProvider.d.ts +8 -0
- package/dist/providers/IconsProvider.js +93 -0
- package/dist/providers/icons/ArrowDown.d.ts +2 -0
- package/dist/providers/icons/ArrowDown.js +22 -0
- package/dist/providers/icons/ArrowLeft.d.ts +2 -0
- package/dist/providers/icons/ArrowLeft.js +22 -0
- package/dist/providers/icons/ArrowRight.d.ts +2 -0
- package/dist/providers/icons/ArrowRight.js +22 -0
- package/dist/providers/icons/ArrowUp.d.ts +2 -0
- package/dist/providers/icons/ArrowUp.js +22 -0
- package/dist/providers/icons/CaretDown.d.ts +2 -0
- package/dist/providers/icons/CaretDown.js +22 -0
- package/dist/providers/icons/CaretLeft.d.ts +2 -0
- package/dist/providers/icons/CaretLeft.js +22 -0
- package/dist/providers/icons/CaretRight.d.ts +2 -0
- package/dist/providers/icons/CaretRight.js +22 -0
- package/dist/providers/icons/CaretUp.d.ts +2 -0
- package/dist/providers/icons/CaretUp.js +22 -0
- package/dist/providers/icons/Chart.d.ts +2 -0
- package/dist/providers/icons/Chart.js +22 -0
- package/dist/providers/icons/Check.d.ts +2 -0
- package/dist/providers/icons/Check.js +22 -0
- package/dist/providers/icons/ChevronDown.d.ts +2 -0
- package/dist/providers/icons/ChevronDown.js +22 -0
- package/dist/providers/icons/ChevronLeft.d.ts +2 -0
- package/dist/providers/icons/ChevronLeft.js +22 -0
- package/dist/providers/icons/ChevronLeftSmall.d.ts +2 -0
- package/dist/providers/icons/ChevronLeftSmall.js +22 -0
- package/dist/providers/icons/ChevronLeftSmallFirst.d.ts +2 -0
- package/dist/providers/icons/ChevronLeftSmallFirst.js +22 -0
- package/dist/providers/icons/ChevronRight.d.ts +2 -0
- package/dist/providers/icons/ChevronRight.js +22 -0
- package/dist/providers/icons/ChevronRightSmall.d.ts +2 -0
- package/dist/providers/icons/ChevronRightSmall.js +22 -0
- package/dist/providers/icons/ChevronRightSmallLast.d.ts +2 -0
- package/dist/providers/icons/ChevronRightSmallLast.js +22 -0
- package/dist/providers/icons/ChevronUp.d.ts +2 -0
- package/dist/providers/icons/ChevronUp.js +22 -0
- package/dist/providers/icons/Cross.d.ts +2 -0
- package/dist/providers/icons/Cross.js +22 -0
- package/dist/providers/icons/Dollar.d.ts +2 -0
- package/dist/providers/icons/Dollar.js +22 -0
- package/dist/providers/icons/Download.d.ts +2 -0
- package/dist/providers/icons/Download.js +22 -0
- package/dist/providers/icons/Electricity.d.ts +2 -0
- package/dist/providers/icons/Electricity.js +22 -0
- package/dist/providers/icons/Euro.d.ts +2 -0
- package/dist/providers/icons/Euro.js +22 -0
- package/dist/providers/icons/Gas.d.ts +2 -0
- package/dist/providers/icons/Gas.js +23 -0
- package/dist/providers/icons/Help.d.ts +2 -0
- package/dist/providers/icons/Help.js +22 -0
- package/dist/providers/icons/Hide.d.ts +2 -0
- package/dist/providers/icons/Hide.js +22 -0
- package/dist/providers/icons/Home.d.ts +2 -0
- package/dist/providers/icons/Home.js +22 -0
- package/dist/providers/icons/Info.d.ts +2 -0
- package/dist/providers/icons/Info.js +22 -0
- package/dist/providers/icons/Link.d.ts +2 -0
- package/dist/providers/icons/Link.js +23 -0
- package/dist/providers/icons/Logo.d.ts +2 -0
- package/dist/providers/icons/Logo.js +22 -0
- package/dist/providers/icons/Minus.d.ts +2 -0
- package/dist/providers/icons/Minus.js +22 -0
- package/dist/providers/icons/NewWindow.d.ts +2 -0
- package/dist/providers/icons/NewWindow.js +22 -0
- package/dist/providers/icons/PaymentCard.d.ts +2 -0
- package/dist/providers/icons/PaymentCard.js +22 -0
- package/dist/providers/icons/Plus.d.ts +2 -0
- package/dist/providers/icons/Plus.js +22 -0
- package/dist/providers/icons/Pound.d.ts +2 -0
- package/dist/providers/icons/Pound.js +22 -0
- package/dist/providers/icons/Search.d.ts +2 -0
- package/dist/providers/icons/Search.js +22 -0
- package/dist/providers/icons/Show.d.ts +2 -0
- package/dist/providers/icons/Show.js +22 -0
- package/dist/providers/icons/User.d.ts +2 -0
- package/dist/providers/icons/User.js +22 -0
- package/dist/providers/icons/index.d.ts +38 -0
- package/dist/providers/icons/index.js +54 -0
- package/dist/providers/index.d.ts +2 -0
- package/dist/providers/index.js +18 -0
- package/dist/providers/types.d.ts +4 -0
- package/dist/providers/types.js +2 -0
- package/dist/styled.native.d.ts +6 -0
- package/dist/styled.native.js +33 -0
- package/dist/theme/create-theme.d.ts +18 -0
- package/dist/theme/create-theme.js +511 -0
- package/dist/theme/index.d.ts +5 -0
- package/dist/theme/index.js +26 -0
- package/dist/theme/theme.d.ts +302 -0
- package/dist/theme/theme.js +2 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.js +17 -0
- package/dist/utils/utils.d.ts +15 -0
- package/dist/utils/utils.js +126 -0
- package/package.json +1 -1
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { BadgeVariantName, BadgeVariant } from '../components/Badge/Badge';
|
|
2
|
+
import { CTAVariantName, CTAVariant } from '../components/CTAButton/CTAButton';
|
|
3
|
+
import { NotificationVariant, NotificationVariantName } from '../components/Notification/Notification';
|
|
4
|
+
import { IconName } from '../providers';
|
|
5
|
+
declare type Shadow = {
|
|
6
|
+
color: string;
|
|
7
|
+
offset: string;
|
|
8
|
+
opacity: number;
|
|
9
|
+
radius: string;
|
|
10
|
+
elevation: number;
|
|
11
|
+
};
|
|
12
|
+
declare type FontNames = 'body' | 'small' | 'label' | 'level1' | 'level2' | 'level3' | 'level4' | 'lead';
|
|
13
|
+
export declare type Theme = {
|
|
14
|
+
space: Record<1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12, string>;
|
|
15
|
+
colors: Record<'primary' | 'primaryAlt' | 'primaryContrast' | 'primaryMuted' | 'error' | 'errorAlt' | 'errorContrast' | 'errorMuted' | 'info' | 'infoAlt' | 'infoContrast' | 'infoMuted' | 'warning' | 'warningAlt' | 'warningContrast' | 'warningMuted' | 'success' | 'successAlt' | 'successContrast' | 'successMuted' | 'focus' | 'focusMuted' | 'body' | 'heading' | 'border' | 'borderMuted' | 'canvas' | 'canvasMuted' | 'mission' | 'missionMuted' | 'missionAlt' | 'missionContrast', string> & {
|
|
16
|
+
brand: Record<string, Record<string, string>>;
|
|
17
|
+
};
|
|
18
|
+
fonts: Record<'body' | 'bold' | 'heading', string>;
|
|
19
|
+
lineHeights: Record<'standard', number>;
|
|
20
|
+
fontSizes: string[];
|
|
21
|
+
responsiveFontSizes: Record<FontNames, string[]>;
|
|
22
|
+
responsiveLineHeights: Record<FontNames, string[]>;
|
|
23
|
+
breakpoints: Record<'small' | 'medium' | 'large', number>;
|
|
24
|
+
radii: Record<'small' | 'medium' | 'large', string>;
|
|
25
|
+
shadows: Record<'standard', Shadow>;
|
|
26
|
+
borderWidths: Record<'standard' | 'heavy' | 'heavier', string>;
|
|
27
|
+
fontWeights: Record<'normal' | 'bold' | 'semiBold' | 'heading', number>;
|
|
28
|
+
badge: {
|
|
29
|
+
fontWeight: number;
|
|
30
|
+
fontFamily: string;
|
|
31
|
+
lineHeight: number;
|
|
32
|
+
paddingHorizontal: string;
|
|
33
|
+
borderRadius: string;
|
|
34
|
+
fontSize: string[];
|
|
35
|
+
variants: Record<BadgeVariantName, BadgeVariant>;
|
|
36
|
+
};
|
|
37
|
+
cta: {
|
|
38
|
+
fontSize: string[];
|
|
39
|
+
fontWeight: number;
|
|
40
|
+
fontFamily: string;
|
|
41
|
+
lineHeight: number;
|
|
42
|
+
paddingVertical: string;
|
|
43
|
+
paddingHorizontal: string;
|
|
44
|
+
borderRadius: number | string;
|
|
45
|
+
borderWidth: string;
|
|
46
|
+
iconGap: string;
|
|
47
|
+
minHeight: string;
|
|
48
|
+
variants: Record<CTAVariantName, CTAVariant>;
|
|
49
|
+
};
|
|
50
|
+
text: {
|
|
51
|
+
fontFamily: string;
|
|
52
|
+
fontWeight: number;
|
|
53
|
+
lineHeight: number;
|
|
54
|
+
color: string;
|
|
55
|
+
p: {
|
|
56
|
+
fontSize: string[];
|
|
57
|
+
lineHeight: string[];
|
|
58
|
+
marginTop: string[];
|
|
59
|
+
marginBottom: string[];
|
|
60
|
+
};
|
|
61
|
+
small: {
|
|
62
|
+
fontSize: string[];
|
|
63
|
+
lineHeight: string[];
|
|
64
|
+
};
|
|
65
|
+
strong: {
|
|
66
|
+
fontWeight: number;
|
|
67
|
+
fontFamily: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
list: {
|
|
71
|
+
marginTop: string[];
|
|
72
|
+
marginBottom: string[];
|
|
73
|
+
marginLeft: string;
|
|
74
|
+
listItem: {
|
|
75
|
+
fontSize: string[];
|
|
76
|
+
lineHeight: string[];
|
|
77
|
+
marginVertical: keyof Theme['space'];
|
|
78
|
+
bulletGap: string;
|
|
79
|
+
bulletWidth: string;
|
|
80
|
+
};
|
|
81
|
+
descriptionTerm: {
|
|
82
|
+
fontWeight: number | string;
|
|
83
|
+
fontFamily: string;
|
|
84
|
+
color: string;
|
|
85
|
+
marginTop: string[];
|
|
86
|
+
marginBottom: string[];
|
|
87
|
+
};
|
|
88
|
+
};
|
|
89
|
+
textLink: {
|
|
90
|
+
color: string;
|
|
91
|
+
fontWeight: number;
|
|
92
|
+
};
|
|
93
|
+
heading: {
|
|
94
|
+
fontFamily: string;
|
|
95
|
+
fontWeight: number;
|
|
96
|
+
color: string;
|
|
97
|
+
heading1: {
|
|
98
|
+
fontSize: string[];
|
|
99
|
+
lineHeight: string[];
|
|
100
|
+
marginTop: string[];
|
|
101
|
+
marginBottom: string[];
|
|
102
|
+
fontWeight?: number;
|
|
103
|
+
};
|
|
104
|
+
heading2: {
|
|
105
|
+
fontSize: string[];
|
|
106
|
+
lineHeight: string[];
|
|
107
|
+
marginTop: string[];
|
|
108
|
+
marginBottom: string[];
|
|
109
|
+
fontWeight?: number;
|
|
110
|
+
};
|
|
111
|
+
heading3: {
|
|
112
|
+
fontSize: string[];
|
|
113
|
+
lineHeight: string[];
|
|
114
|
+
marginTop: string[];
|
|
115
|
+
marginBottom: string[];
|
|
116
|
+
fontWeight?: number;
|
|
117
|
+
};
|
|
118
|
+
heading4: {
|
|
119
|
+
fontSize: string[];
|
|
120
|
+
lineHeight: string[];
|
|
121
|
+
marginTop: string[];
|
|
122
|
+
marginBottom: string[];
|
|
123
|
+
fontWeight?: number;
|
|
124
|
+
};
|
|
125
|
+
};
|
|
126
|
+
notification: {
|
|
127
|
+
borderRadius: string;
|
|
128
|
+
borderWidth: string;
|
|
129
|
+
borderColor: string;
|
|
130
|
+
background: string;
|
|
131
|
+
paddingX: string[];
|
|
132
|
+
paddingY: string[];
|
|
133
|
+
variants: Record<NotificationVariantName, NotificationVariant>;
|
|
134
|
+
dismiss: {
|
|
135
|
+
icon: IconName;
|
|
136
|
+
size: string;
|
|
137
|
+
color: string;
|
|
138
|
+
touchSize: string;
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
radio: {
|
|
142
|
+
touchSize: string;
|
|
143
|
+
size: string;
|
|
144
|
+
dotSize: string;
|
|
145
|
+
gap: string;
|
|
146
|
+
paddingTop: string;
|
|
147
|
+
borderWidth: string;
|
|
148
|
+
borderColor: string;
|
|
149
|
+
background: string;
|
|
150
|
+
dotColor: string;
|
|
151
|
+
checkedBackground: string;
|
|
152
|
+
errorColor: string;
|
|
153
|
+
};
|
|
154
|
+
checkbox: {
|
|
155
|
+
touchSize: string;
|
|
156
|
+
size: string;
|
|
157
|
+
checkSize: string;
|
|
158
|
+
gap: string;
|
|
159
|
+
paddingTop: string;
|
|
160
|
+
borderWidth: string;
|
|
161
|
+
borderColor: string;
|
|
162
|
+
borderRadius: string;
|
|
163
|
+
background: string;
|
|
164
|
+
checkedBackground: string;
|
|
165
|
+
checkColor: string;
|
|
166
|
+
errorColor: string;
|
|
167
|
+
};
|
|
168
|
+
input: {
|
|
169
|
+
fontFamily: string;
|
|
170
|
+
fontSize: string[];
|
|
171
|
+
color: string;
|
|
172
|
+
lineHeight: number;
|
|
173
|
+
fontWeight: number;
|
|
174
|
+
height: string;
|
|
175
|
+
borderColor: string;
|
|
176
|
+
borderWidth: string;
|
|
177
|
+
background: string;
|
|
178
|
+
borderRadius: string;
|
|
179
|
+
padding: string;
|
|
180
|
+
error: {
|
|
181
|
+
borderWidth: string;
|
|
182
|
+
color: string;
|
|
183
|
+
};
|
|
184
|
+
icon: {
|
|
185
|
+
size: string;
|
|
186
|
+
};
|
|
187
|
+
};
|
|
188
|
+
focusRing: {
|
|
189
|
+
color: string;
|
|
190
|
+
width: string;
|
|
191
|
+
distance: string;
|
|
192
|
+
};
|
|
193
|
+
field: {
|
|
194
|
+
fontFamily: string;
|
|
195
|
+
fontSize: string[];
|
|
196
|
+
lineHeight: number;
|
|
197
|
+
dateWidth: string;
|
|
198
|
+
gap: string;
|
|
199
|
+
error: {
|
|
200
|
+
fontWeight: number;
|
|
201
|
+
fontFamily: string;
|
|
202
|
+
color: string;
|
|
203
|
+
};
|
|
204
|
+
hint: {
|
|
205
|
+
fontWeight: number;
|
|
206
|
+
color: string;
|
|
207
|
+
};
|
|
208
|
+
label: {
|
|
209
|
+
fontWeight: number;
|
|
210
|
+
fontFamily: string;
|
|
211
|
+
color: string;
|
|
212
|
+
};
|
|
213
|
+
subLabel: {
|
|
214
|
+
fontWeight: number;
|
|
215
|
+
color: string;
|
|
216
|
+
};
|
|
217
|
+
legend: {
|
|
218
|
+
marginBottom: string;
|
|
219
|
+
};
|
|
220
|
+
errorIndent: {
|
|
221
|
+
borderWidth: string;
|
|
222
|
+
borderRadius: string;
|
|
223
|
+
};
|
|
224
|
+
};
|
|
225
|
+
card: {
|
|
226
|
+
background: string;
|
|
227
|
+
borderWidth: string;
|
|
228
|
+
borderColor: string;
|
|
229
|
+
padding: string[];
|
|
230
|
+
};
|
|
231
|
+
disclosure: {
|
|
232
|
+
iconGap: string[];
|
|
233
|
+
panelGap: string[];
|
|
234
|
+
};
|
|
235
|
+
grid: {
|
|
236
|
+
maxWidth: string;
|
|
237
|
+
gutter: string[];
|
|
238
|
+
};
|
|
239
|
+
dataTable: {
|
|
240
|
+
borderWidth: string;
|
|
241
|
+
borderRadius: string;
|
|
242
|
+
borderColor: string;
|
|
243
|
+
responsivePadding: {
|
|
244
|
+
vertical: [string, string];
|
|
245
|
+
horizontal: [string, string];
|
|
246
|
+
};
|
|
247
|
+
tableHeader: {
|
|
248
|
+
color: string;
|
|
249
|
+
backgroundColor: string;
|
|
250
|
+
borderWidth: string;
|
|
251
|
+
borderColor: string;
|
|
252
|
+
fontWeight: number;
|
|
253
|
+
fontFamily: string;
|
|
254
|
+
};
|
|
255
|
+
tableCaption: {
|
|
256
|
+
color: string;
|
|
257
|
+
fontWeight: number;
|
|
258
|
+
fontFamily: string;
|
|
259
|
+
};
|
|
260
|
+
tableCell: {
|
|
261
|
+
color: string;
|
|
262
|
+
};
|
|
263
|
+
tableRow: {
|
|
264
|
+
backgroundColor: string;
|
|
265
|
+
stripeColor: string;
|
|
266
|
+
};
|
|
267
|
+
};
|
|
268
|
+
accordion: {
|
|
269
|
+
header: {
|
|
270
|
+
color: string;
|
|
271
|
+
iconSize: string;
|
|
272
|
+
iconGap: string;
|
|
273
|
+
paddingVertical: string[];
|
|
274
|
+
};
|
|
275
|
+
};
|
|
276
|
+
tabs: {
|
|
277
|
+
tab: {
|
|
278
|
+
fontSize: string[];
|
|
279
|
+
fontWeight: number;
|
|
280
|
+
fontFamily: string;
|
|
281
|
+
lineHeight: number;
|
|
282
|
+
borderTopWidth: string;
|
|
283
|
+
borderBottomWidth: string;
|
|
284
|
+
borderColor: string;
|
|
285
|
+
paddingVertical: string[];
|
|
286
|
+
paddingHorizontal: string[];
|
|
287
|
+
active: {
|
|
288
|
+
backgroundColor: string;
|
|
289
|
+
foregroundColor: string;
|
|
290
|
+
borderColor: string;
|
|
291
|
+
};
|
|
292
|
+
inactive: {
|
|
293
|
+
backgroundColor: string;
|
|
294
|
+
foregroundColor: string;
|
|
295
|
+
};
|
|
296
|
+
hover: {
|
|
297
|
+
foregroundColor: string;
|
|
298
|
+
};
|
|
299
|
+
};
|
|
300
|
+
};
|
|
301
|
+
};
|
|
302
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './utils';
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./utils"), exports);
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React, { Ref, ReactNode, ComponentType } from 'react';
|
|
2
|
+
import { ViewProps, View } from 'react-native';
|
|
3
|
+
import { BreakpointNames, Breakpoints } from '../hooks';
|
|
4
|
+
declare function mergeRefs<T>(ref1: undefined | Ref<T>, ref2: undefined | Ref<T>): (element: T) => void;
|
|
5
|
+
declare function getText(children: ReactNode): string;
|
|
6
|
+
declare function pxToNumber(px: string): number;
|
|
7
|
+
declare function styledComponentWithBreakpoints<T = ViewProps, C = View>(Component: ComponentType<T>): React.ForwardRefExoticComponent<React.PropsWithoutRef<Omit<T, BreakpointNames>> & React.RefAttributes<C>>;
|
|
8
|
+
declare function responsiveStyle(property: string, value: any, breakpoints: Breakpoints, formatter?: (v: any) => string): any;
|
|
9
|
+
declare function getErrorMessage(id: string, errors: Array<{
|
|
10
|
+
id: string;
|
|
11
|
+
message: ReactNode;
|
|
12
|
+
}>): null | ReactNode;
|
|
13
|
+
declare function callAll(...fns: Array<Function | undefined>): (...args: any[]) => void;
|
|
14
|
+
declare function filterChildrenByType(children: ReactNode, type: ComponentType): React.ReactElement<any, string | React.JSXElementConstructor<any>>[];
|
|
15
|
+
export { styledComponentWithBreakpoints, responsiveStyle, pxToNumber, mergeRefs, getText, getErrorMessage, callAll, filterChildrenByType, };
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
16
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
17
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
|
+
}
|
|
19
|
+
Object.defineProperty(o, k2, desc);
|
|
20
|
+
}) : (function(o, m, k, k2) {
|
|
21
|
+
if (k2 === undefined) k2 = k;
|
|
22
|
+
o[k2] = m[k];
|
|
23
|
+
}));
|
|
24
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
25
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
26
|
+
}) : function(o, v) {
|
|
27
|
+
o["default"] = v;
|
|
28
|
+
});
|
|
29
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
30
|
+
if (mod && mod.__esModule) return mod;
|
|
31
|
+
var result = {};
|
|
32
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
33
|
+
__setModuleDefault(result, mod);
|
|
34
|
+
return result;
|
|
35
|
+
};
|
|
36
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37
|
+
exports.filterChildrenByType = exports.callAll = exports.getErrorMessage = exports.getText = exports.mergeRefs = exports.pxToNumber = exports.responsiveStyle = exports.styledComponentWithBreakpoints = void 0;
|
|
38
|
+
var react_1 = __importStar(require("react"));
|
|
39
|
+
var hooks_1 = require("../hooks");
|
|
40
|
+
function mergeRefs(ref1, ref2) {
|
|
41
|
+
return function (element) {
|
|
42
|
+
assignRef(ref1, element);
|
|
43
|
+
assignRef(ref2, element);
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
exports.mergeRefs = mergeRefs;
|
|
47
|
+
function assignRef(ref, element) {
|
|
48
|
+
if (typeof ref === 'function') {
|
|
49
|
+
ref(element);
|
|
50
|
+
}
|
|
51
|
+
else if (ref) {
|
|
52
|
+
// @ts-ignore
|
|
53
|
+
ref.current = element;
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
function getText(children) {
|
|
57
|
+
if (!Boolean(children) && typeof children !== 'number') {
|
|
58
|
+
return '';
|
|
59
|
+
}
|
|
60
|
+
if (typeof children === 'object' && children.props) {
|
|
61
|
+
return react_1.Children.map(children.props.children, function (child) {
|
|
62
|
+
return getText(child);
|
|
63
|
+
}).join('');
|
|
64
|
+
}
|
|
65
|
+
return String(children);
|
|
66
|
+
}
|
|
67
|
+
exports.getText = getText;
|
|
68
|
+
function pxToNumber(px) {
|
|
69
|
+
return parseFloat(px);
|
|
70
|
+
}
|
|
71
|
+
exports.pxToNumber = pxToNumber;
|
|
72
|
+
function styledComponentWithBreakpoints(Component) {
|
|
73
|
+
return (0, react_1.forwardRef)(function (props, ref) {
|
|
74
|
+
var breakpoints = (0, hooks_1.useBreakpoint)();
|
|
75
|
+
// @ts-ignore.
|
|
76
|
+
return react_1.default.createElement(Component, __assign({}, props, breakpoints, { ref: ref }));
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
exports.styledComponentWithBreakpoints = styledComponentWithBreakpoints;
|
|
80
|
+
function responsiveStyle(property, value, breakpoints, formatter) {
|
|
81
|
+
var values;
|
|
82
|
+
if (Array.isArray(value)) {
|
|
83
|
+
values = value;
|
|
84
|
+
}
|
|
85
|
+
else {
|
|
86
|
+
values = [value];
|
|
87
|
+
}
|
|
88
|
+
var ascMediaQueries = [
|
|
89
|
+
breakpoints.smallAndUp,
|
|
90
|
+
breakpoints.mediumAndUp,
|
|
91
|
+
breakpoints.largeAndUp,
|
|
92
|
+
];
|
|
93
|
+
var base = values[0], rest = values.slice(1);
|
|
94
|
+
return rest.reduce(function (acc, val, i) {
|
|
95
|
+
return ascMediaQueries[i]
|
|
96
|
+
? "".concat(property, ": ").concat(formatter ? formatter(val) : val, ";")
|
|
97
|
+
: acc;
|
|
98
|
+
}, "".concat(property, ": ").concat(formatter ? formatter(base) : base, ";"));
|
|
99
|
+
}
|
|
100
|
+
exports.responsiveStyle = responsiveStyle;
|
|
101
|
+
function getErrorMessage(id, errors) {
|
|
102
|
+
return (errors.find(function (_a) {
|
|
103
|
+
var errorId = _a.id;
|
|
104
|
+
return id === errorId;
|
|
105
|
+
}) || { message: null })
|
|
106
|
+
.message;
|
|
107
|
+
}
|
|
108
|
+
exports.getErrorMessage = getErrorMessage;
|
|
109
|
+
function callAll() {
|
|
110
|
+
var fns = [];
|
|
111
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
112
|
+
fns[_i] = arguments[_i];
|
|
113
|
+
}
|
|
114
|
+
return function () {
|
|
115
|
+
var args = [];
|
|
116
|
+
for (var _i = 0; _i < arguments.length; _i++) {
|
|
117
|
+
args[_i] = arguments[_i];
|
|
118
|
+
}
|
|
119
|
+
return fns.forEach(function (fn) { return fn && fn.apply(void 0, args); });
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
exports.callAll = callAll;
|
|
123
|
+
function filterChildrenByType(children, type) {
|
|
124
|
+
return react_1.Children.toArray(children).filter(function (child) { return (child === null || child === void 0 ? void 0 : child.type) === type; });
|
|
125
|
+
}
|
|
126
|
+
exports.filterChildrenByType = filterChildrenByType;
|