@ovotech/element-native 3.8.1 → 4.0.0-canary-a872093-246
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/components/package.json +6 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -3
- package/dist/components/Accordion/Accordion.js +130 -97
- package/dist/components/Accordion/Group.js +21 -21
- package/dist/components/Accordion/Icon.js +60 -59
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Accordion/index.js +9 -19
- package/dist/components/Accordion/styles.d.ts +20 -2
- package/dist/components/Accordion/styles.js +59 -50
- package/dist/components/Accordion/types.d.ts +2 -2
- package/dist/components/Accordion/types.js +2 -1
- package/dist/components/ActionCard/ActionCard.d.ts +1 -1
- package/dist/components/ActionCard/ActionCard.js +104 -376
- package/dist/components/ActionCard/CloseIconShape.js +40 -14
- package/dist/components/ActionCard/IndicatorIconShape.js +40 -11
- package/dist/components/ActionCard/index.js +5 -185
- package/dist/components/ActionList/ActionList.d.ts +3 -4
- package/dist/components/ActionList/ActionList.js +56 -202
- package/dist/components/ActionList/index.js +6 -100
- package/dist/components/ActionList/styled.d.ts +523 -5
- package/dist/components/ActionList/styled.js +65 -152
- package/dist/components/Badge/Badge.d.ts +9 -3
- package/dist/components/Badge/Badge.js +96 -39
- package/dist/components/Badge/index.js +5 -8
- package/dist/components/CTAButton/CTAButton.d.ts +9 -8
- package/dist/components/CTAButton/CTAButton.js +118 -181
- package/dist/components/CTAButton/index.js +8 -100
- package/dist/components/CTALink/CTALink.d.ts +5 -5
- package/dist/components/CTALink/CTALink.js +22 -105
- package/dist/components/CTALink/index.js +7 -100
- package/dist/components/Card/Card.d.ts +7 -483
- package/dist/components/Card/Card.js +43 -17
- package/dist/components/Card/index.js +5 -7
- package/dist/components/Checkbox/Checkbox.js +78 -173
- package/dist/components/Checkbox/CheckboxField.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxField.js +43 -39
- package/dist/components/Checkbox/index.js +7 -105
- package/dist/components/CurrencyField/CurrencyField.d.ts +1 -1
- package/dist/components/CurrencyField/CurrencyField.js +32 -109
- package/dist/components/CurrencyField/index.js +5 -108
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/dist/components/CurrencyInput/CurrencyInput.js +36 -118
- package/dist/components/CurrencyInput/index.d.ts +1 -1
- package/dist/components/CurrencyInput/index.js +5 -100
- package/dist/components/DataTable/DataTable.js +45 -62
- package/dist/components/DataTable/TableRow.js +35 -44
- package/dist/components/DataTable/index.js +20 -25
- package/dist/components/DataTable/styles.d.ts +78 -0
- package/dist/components/DataTable/styles.js +86 -119
- package/dist/components/DataTable/types.d.ts +4 -4
- package/dist/components/DataTable/types.js +2 -1
- package/dist/components/DateField/DateField.d.ts +3 -4
- package/dist/components/DateField/DateField.js +87 -229
- package/dist/components/DateField/index.js +5 -107
- package/dist/components/DescriptionList/DescriptionList.d.ts +2 -2
- package/dist/components/DescriptionList/DescriptionList.js +43 -25
- package/dist/components/DescriptionList/index.js +6 -13
- package/dist/components/DescriptionList/styled.d.ts +6 -0
- package/dist/components/DescriptionList/styled.js +85 -42
- package/dist/components/Disclosure/Disclosure.js +79 -153
- package/dist/components/Disclosure/index.js +16 -96
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +43 -12
- package/dist/components/Divider/index.js +5 -7
- package/dist/components/Em/Em.d.ts +6 -0
- package/dist/components/Em/Em.js +12 -8
- package/dist/components/Em/index.js +5 -6
- package/dist/components/EmailField/EmailField.d.ts +1 -1
- package/dist/components/EmailField/EmailField.js +32 -108
- package/dist/components/EmailField/index.js +5 -107
- package/dist/components/EmailInput/EmailInput.d.ts +1 -1
- package/dist/components/EmailInput/EmailInput.js +18 -106
- package/dist/components/EmailInput/index.js +5 -98
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +2 -2
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +50 -115
- package/dist/components/ErrorSummaryNotification/index.js +5 -104
- package/dist/components/ErrorText/ErrorText.d.ts +6 -0
- package/dist/components/ErrorText/ErrorText.js +42 -22
- package/dist/components/ErrorText/index.js +5 -11
- package/dist/components/Field/Field.d.ts +2 -2
- package/dist/components/Field/Field.js +58 -62
- package/dist/components/Field/index.js +16 -16
- package/dist/components/FilterSelect/FilterSelect.d.ts +2 -2
- package/dist/components/FilterSelect/FilterSelect.js +77 -201
- package/dist/components/FilterSelect/index.js +5 -102
- package/dist/components/FormGroup/FormGroup.d.ts +1 -1
- package/dist/components/FormGroup/FormGroup.js +42 -9
- package/dist/components/FormGroup/index.js +5 -8
- package/dist/components/Grid/Col.d.ts +7 -1
- package/dist/components/Grid/Col.js +58 -32
- package/dist/components/Grid/Row.d.ts +6 -0
- package/dist/components/Grid/Row.js +72 -34
- package/dist/components/Grid/index.js +7 -13
- package/dist/components/Heading1/Heading1.js +70 -36
- package/dist/components/Heading1/index.js +5 -10
- package/dist/components/Heading2/Heading2.js +70 -36
- package/dist/components/Heading2/index.js +5 -10
- package/dist/components/Heading3/Heading3.js +70 -36
- package/dist/components/Heading3/index.js +5 -10
- package/dist/components/Heading4/Heading4.js +70 -36
- package/dist/components/Heading4/index.js +5 -10
- package/dist/components/HintText/HintText.d.ts +6 -0
- package/dist/components/HintText/HintText.js +42 -22
- package/dist/components/HintText/index.js +5 -11
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.js +38 -103
- package/dist/components/Icon/index.js +5 -93
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +97 -198
- package/dist/components/Label/Label.js +50 -18
- package/dist/components/Label/index.js +5 -8
- package/dist/components/LabelText/LabelText.d.ts +6 -0
- package/dist/components/LabelText/LabelText.js +42 -20
- package/dist/components/LabelText/index.js +5 -11
- package/dist/components/Lead/Lead.js +52 -18
- package/dist/components/Lead/index.js +5 -8
- package/dist/components/LineThrough/LineThrough.d.ts +6 -0
- package/dist/components/LineThrough/LineThrough.js +12 -7
- package/dist/components/LineThrough/index.js +5 -6
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +32 -38
- package/dist/components/List/index.js +7 -16
- package/dist/components/List/styled.d.ts +25 -0
- package/dist/components/List/styled.js +52 -37
- package/dist/components/Margin/Margin.d.ts +8 -2
- package/dist/components/Margin/Margin.js +50 -68
- package/dist/components/Margin/index.js +5 -11
- package/dist/components/NavHeader/IconButton.d.ts +2 -2
- package/dist/components/NavHeader/IconButton.js +18 -119
- package/dist/components/NavHeader/NavHeader.d.ts +11 -3
- package/dist/components/NavHeader/NavHeader.js +65 -181
- package/dist/components/NavHeader/NavHeader.styles.d.ts +543 -7
- package/dist/components/NavHeader/NavHeader.styles.js +72 -81
- package/dist/components/NavHeader/index.d.ts +1 -1
- package/dist/components/NavHeader/index.js +5 -104
- package/dist/components/Notification/Notification.d.ts +14 -2
- package/dist/components/Notification/Notification.js +103 -190
- package/dist/components/Notification/index.js +9 -100
- package/dist/components/NumberField/NumberField.d.ts +1 -1
- package/dist/components/NumberField/NumberField.js +32 -108
- package/dist/components/NumberField/index.js +5 -107
- package/dist/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.js +18 -106
- package/dist/components/NumberInput/index.js +5 -98
- package/dist/components/P/P.js +54 -23
- package/dist/components/P/index.js +5 -10
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +32 -110
- package/dist/components/PasswordField/index.js +5 -109
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +33 -123
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +7 -1
- package/dist/components/PasswordInput/PasswordInput.styled.js +37 -18
- package/dist/components/PasswordInput/PasswordVisibilityToggle.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordVisibilityToggle.js +26 -128
- package/dist/components/PasswordInput/index.js +5 -100
- package/dist/components/PhoneField/PhoneField.d.ts +1 -1
- package/dist/components/PhoneField/PhoneField.js +32 -108
- package/dist/components/PhoneField/index.js +5 -107
- package/dist/components/PhoneInput/PhoneInput.d.ts +1 -1
- package/dist/components/PhoneInput/PhoneInput.js +17 -106
- package/dist/components/PhoneInput/index.js +5 -98
- package/dist/components/ProductCarousel/NavigationDots.js +74 -57
- package/dist/components/ProductCarousel/ProductCarousel.js +126 -2174
- package/dist/components/ProductCarousel/anchor-point.js +51 -31
- package/dist/components/ProductCarousel/index.js +5 -101
- package/dist/components/Radio/Radio.js +67 -69
- package/dist/components/Radio/RadioField.d.ts +1 -1
- package/dist/components/Radio/RadioField.js +47 -46
- package/dist/components/Radio/index.js +7 -18
- package/dist/components/RadioCard/RadioCard.js +71 -68
- package/dist/components/RadioCard/index.js +5 -13
- package/dist/components/SelectField/Select.d.ts +8 -2
- package/dist/components/SelectField/Select.js +93 -852
- package/dist/components/SelectField/SelectField.d.ts +1 -1
- package/dist/components/SelectField/SelectField.js +32 -125
- package/dist/components/SelectField/index.js +5 -108
- package/dist/components/SkeletonAnimation/SkeletonAnimation.js +34 -47
- package/dist/components/SkeletonAnimation/index.js +5 -7
- package/dist/components/SkeletonCTA/SkeletonCTA.d.ts +1 -1
- package/dist/components/SkeletonCTA/SkeletonCTA.js +41 -17
- package/dist/components/SkeletonCTA/index.js +5 -12
- package/dist/components/SkeletonCircle/SkeletonCircle.d.ts +1 -1
- package/dist/components/SkeletonCircle/SkeletonCircle.js +44 -16
- package/dist/components/SkeletonCircle/index.js +5 -10
- package/dist/components/SkeletonHeading/SkeletonHeading.d.ts +1 -1
- package/dist/components/SkeletonHeading/SkeletonHeading.js +40 -29
- package/dist/components/SkeletonHeading/index.js +5 -12
- package/dist/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/dist/components/SkeletonText/SkeletonText.js +50 -33
- package/dist/components/SkeletonText/index.js +5 -12
- package/dist/components/Small/Small.d.ts +6 -0
- package/dist/components/Small/Small.js +38 -17
- package/dist/components/Small/index.js +5 -11
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.js +68 -61
- package/dist/components/Spinner/index.js +5 -9
- package/dist/components/Stack/Stack.d.ts +1 -1
- package/dist/components/Stack/Stack.js +48 -30
- package/dist/components/Stack/index.js +5 -11
- package/dist/components/Stretch/Stretch.d.ts +1 -1
- package/dist/components/Stretch/Stretch.js +55 -11
- package/dist/components/Stretch/index.js +16 -8
- package/dist/components/Strong/Strong.d.ts +6 -0
- package/dist/components/Strong/Strong.js +10 -9
- package/dist/components/Strong/index.js +5 -6
- package/dist/components/SubLabelText/SubLabelText.d.ts +6 -0
- package/dist/components/SubLabelText/SubLabelText.js +42 -20
- package/dist/components/SubLabelText/index.js +5 -11
- package/dist/components/Tabs/Tab.d.ts +1 -2
- package/dist/components/Tabs/Tab.js +76 -60
- package/dist/components/Tabs/TabList.d.ts +2 -2
- package/dist/components/Tabs/TabList.js +77 -37
- package/dist/components/Tabs/TabPanel.js +64 -15
- package/dist/components/Tabs/Tabs.d.ts +2 -3
- package/dist/components/Tabs/Tabs.js +97 -46
- package/dist/components/Tabs/index.js +11 -19
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +32 -108
- package/dist/components/TextField/index.js +5 -107
- package/dist/components/TextGroup/TextGroup.js +40 -23
- package/dist/components/TextGroup/index.js +5 -7
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/TextInput/TextInput.js +18 -97
- package/dist/components/TextInput/index.js +5 -98
- package/dist/components/TextLink/TextLink.js +74 -118
- package/dist/components/TextLink/index.js +5 -97
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +32 -108
- package/dist/components/TextareaField/index.js +5 -107
- package/dist/components/TextareaInput/TextareaInput.d.ts +2 -2
- package/dist/components/TextareaInput/TextareaInput.js +65 -114
- package/dist/components/TextareaInput/index.d.ts +1 -1
- package/dist/components/TextareaInput/index.js +5 -98
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +159 -730
- package/dist/components/Toast/index.js +6 -105
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +55 -73
- package/dist/components/Toggle/index.js +5 -14
- package/dist/components/Toggle/styles.d.ts +25 -1
- package/dist/components/Toggle/styles.js +28 -38
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +77 -296
- package/dist/esm/components/Accordion/Accordion.js +106 -0
- package/dist/esm/components/Accordion/Group.js +18 -0
- package/dist/esm/components/Accordion/Icon.js +35 -0
- package/dist/esm/components/Accordion/index.js +3 -0
- package/dist/esm/components/Accordion/styles.js +31 -0
- package/dist/esm/components/ActionCard/ActionCard.js +77 -0
- package/dist/esm/components/ActionCard/CloseIconShape.js +11 -0
- package/dist/esm/components/ActionCard/IndicatorIconShape.js +11 -0
- package/dist/esm/components/ActionCard/index.js +1 -0
- package/dist/esm/components/ActionList/ActionList.js +54 -0
- package/dist/esm/components/ActionList/index.js +1 -0
- package/dist/esm/components/ActionList/styled.js +40 -0
- package/dist/esm/components/Badge/Badge.js +70 -0
- package/dist/esm/components/Badge/index.js +1 -0
- package/dist/esm/components/CTAButton/CTAButton.js +90 -0
- package/dist/esm/components/CTAButton/index.js +1 -0
- package/dist/esm/components/CTALink/CTALink.js +18 -0
- package/dist/esm/components/CTALink/index.js +1 -0
- package/dist/esm/components/Card/Card.js +37 -0
- package/dist/esm/components/Card/index.js +1 -0
- package/dist/esm/components/Checkbox/Checkbox.js +74 -0
- package/dist/esm/components/Checkbox/CheckboxField.js +42 -0
- package/dist/esm/components/Checkbox/index.js +2 -0
- package/dist/esm/components/CurrencyField/CurrencyField.js +30 -0
- package/dist/esm/components/CurrencyField/index.js +1 -0
- package/dist/esm/components/CurrencyInput/CurrencyInput.js +34 -0
- package/dist/esm/components/CurrencyInput/index.js +1 -0
- package/dist/esm/components/DataTable/DataTable.js +43 -0
- package/dist/esm/components/DataTable/TableRow.js +33 -0
- package/dist/esm/components/DataTable/index.js +3 -0
- package/dist/esm/components/DataTable/styles.js +61 -0
- package/dist/esm/components/DataTable/types.js +1 -0
- package/dist/esm/components/DateField/DateField.js +63 -0
- package/dist/esm/components/DateField/index.js +1 -0
- package/dist/esm/components/DescriptionList/DescriptionList.js +40 -0
- package/dist/esm/components/DescriptionList/index.js +1 -0
- package/dist/esm/components/DescriptionList/styled.js +58 -0
- package/dist/esm/components/Disclosure/Disclosure.js +55 -0
- package/dist/esm/components/Disclosure/index.js +1 -0
- package/dist/esm/components/Divider/Divider.js +17 -0
- package/dist/esm/components/Divider/index.js +1 -0
- package/dist/esm/components/Em/Em.js +7 -0
- package/dist/esm/components/Em/index.js +1 -0
- package/dist/esm/components/EmailField/EmailField.js +30 -0
- package/dist/esm/components/EmailField/index.js +1 -0
- package/dist/esm/components/EmailInput/EmailInput.js +16 -0
- package/dist/esm/components/EmailInput/index.js +1 -0
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +49 -0
- package/dist/esm/components/ErrorSummaryNotification/index.js +1 -0
- package/dist/esm/components/ErrorText/ErrorText.js +17 -0
- package/dist/esm/components/ErrorText/index.js +1 -0
- package/dist/esm/components/Field/Field.js +58 -0
- package/dist/esm/components/Field/index.js +1 -0
- package/dist/esm/components/FilterSelect/FilterSelect.js +52 -0
- package/dist/esm/components/FilterSelect/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 +33 -0
- package/dist/esm/components/Grid/Row.js +47 -0
- package/dist/esm/components/Grid/index.js +2 -0
- package/dist/esm/components/Heading1/Heading1.js +46 -0
- package/dist/esm/components/Heading1/index.js +1 -0
- package/dist/esm/components/Heading2/Heading2.js +46 -0
- package/dist/esm/components/Heading2/index.js +1 -0
- package/dist/esm/components/Heading3/Heading3.js +46 -0
- package/dist/esm/components/Heading3/index.js +1 -0
- package/dist/esm/components/Heading4/Heading4.js +46 -0
- package/dist/esm/components/Heading4/index.js +1 -0
- package/dist/esm/components/HintText/HintText.js +17 -0
- package/dist/esm/components/HintText/index.js +1 -0
- package/dist/esm/components/Icon/Icon.js +36 -0
- package/dist/esm/components/Icon/index.js +1 -0
- package/dist/esm/components/Input/Input.js +74 -0
- package/dist/esm/components/Label/Label.js +25 -0
- package/dist/esm/components/Label/index.js +1 -0
- package/dist/esm/components/LabelText/LabelText.js +17 -0
- package/dist/esm/components/LabelText/index.js +1 -0
- package/dist/esm/components/Lead/Lead.js +27 -0
- package/dist/esm/components/Lead/index.js +1 -0
- package/dist/esm/components/LineThrough/LineThrough.js +7 -0
- package/dist/esm/components/LineThrough/index.js +1 -0
- package/dist/esm/components/List/List.js +29 -0
- package/dist/esm/components/List/index.js +1 -0
- package/dist/esm/components/List/styled.js +27 -0
- package/dist/esm/components/Margin/Margin.js +46 -0
- package/dist/esm/components/Margin/index.js +1 -0
- package/dist/esm/components/NavHeader/IconButton.js +16 -0
- package/dist/esm/components/NavHeader/NavHeader.js +42 -0
- package/dist/esm/components/NavHeader/NavHeader.styles.js +44 -0
- package/dist/esm/components/NavHeader/index.js +1 -0
- package/dist/esm/components/Notification/Notification.js +78 -0
- package/dist/esm/components/Notification/index.js +1 -0
- package/dist/esm/components/NumberField/NumberField.js +30 -0
- package/dist/esm/components/NumberField/index.js +1 -0
- package/dist/esm/components/NumberInput/NumberInput.js +16 -0
- package/dist/esm/components/NumberInput/index.js +1 -0
- package/dist/esm/components/P/P.js +29 -0
- package/dist/esm/components/P/index.js +1 -0
- package/dist/esm/components/PasswordField/PasswordField.js +30 -0
- package/dist/esm/components/PasswordField/index.js +1 -0
- package/dist/esm/components/PasswordInput/PasswordInput.js +32 -0
- package/dist/esm/components/PasswordInput/PasswordInput.styled.js +12 -0
- package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +23 -0
- package/dist/esm/components/PasswordInput/index.js +1 -0
- package/dist/esm/components/PhoneField/PhoneField.js +30 -0
- package/dist/esm/components/PhoneField/index.js +1 -0
- package/dist/esm/components/PhoneInput/PhoneInput.js +15 -0
- package/dist/esm/components/PhoneInput/index.js +1 -0
- package/dist/esm/components/ProductCarousel/NavigationDots.js +50 -0
- package/dist/esm/components/ProductCarousel/ProductCarousel.js +98 -0
- package/dist/esm/components/ProductCarousel/anchor-point.js +49 -0
- package/dist/esm/components/ProductCarousel/index.js +1 -0
- package/dist/esm/components/Radio/Radio.js +62 -0
- package/dist/esm/components/Radio/RadioField.js +46 -0
- package/dist/esm/components/Radio/index.js +2 -0
- package/dist/esm/components/RadioCard/RadioCard.js +66 -0
- package/dist/esm/components/RadioCard/index.js +1 -0
- package/dist/esm/components/SelectField/Select.js +66 -0
- package/dist/esm/components/SelectField/SelectField.js +29 -0
- package/dist/esm/components/SelectField/index.js +1 -0
- package/dist/esm/components/SkeletonAnimation/SkeletonAnimation.js +31 -0
- package/dist/esm/components/SkeletonAnimation/index.js +1 -0
- package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +35 -0
- package/dist/esm/components/SkeletonCTA/index.js +1 -0
- package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +38 -0
- package/dist/esm/components/SkeletonCircle/index.js +1 -0
- package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +34 -0
- package/dist/esm/components/SkeletonHeading/index.js +1 -0
- package/dist/esm/components/SkeletonText/SkeletonText.js +45 -0
- package/dist/esm/components/SkeletonText/index.js +1 -0
- package/dist/esm/components/Small/Small.js +13 -0
- package/dist/esm/components/Small/index.js +1 -0
- package/dist/esm/components/Spinner/Spinner.js +44 -0
- package/dist/esm/components/Spinner/index.js +1 -0
- package/dist/esm/components/Stack/Stack.js +43 -0
- package/dist/esm/components/Stack/index.js +1 -0
- package/dist/esm/components/Stretch/Stretch.js +29 -0
- package/dist/esm/components/Stretch/index.js +1 -0
- package/dist/esm/components/Strong/Strong.js +5 -0
- package/dist/esm/components/Strong/index.js +1 -0
- package/dist/esm/components/SubLabelText/SubLabelText.js +17 -0
- package/dist/esm/components/SubLabelText/index.js +1 -0
- package/dist/esm/components/Tabs/Tab.js +53 -0
- package/dist/esm/components/Tabs/TabList.js +51 -0
- package/dist/esm/components/Tabs/TabPanel.js +38 -0
- package/dist/esm/components/Tabs/Tabs.js +72 -0
- package/dist/esm/components/Tabs/index.js +4 -0
- package/dist/esm/components/TextField/TextField.js +30 -0
- package/dist/esm/components/TextField/index.js +1 -0
- package/dist/esm/components/TextGroup/TextGroup.js +39 -0
- package/dist/esm/components/TextGroup/index.js +1 -0
- package/dist/esm/components/TextInput/TextInput.js +16 -0
- package/dist/esm/components/TextInput/index.js +1 -0
- package/dist/esm/components/TextLink/TextLink.js +49 -0
- package/dist/esm/components/TextLink/index.js +1 -0
- package/dist/esm/components/TextareaField/TextareaField.js +30 -0
- package/dist/esm/components/TextareaField/index.js +1 -0
- package/dist/esm/components/TextareaInput/TextareaInput.js +41 -0
- package/dist/esm/components/TextareaInput/index.js +1 -0
- package/dist/esm/components/Toast/Toast.js +141 -0
- package/dist/esm/components/Toast/index.js +1 -0
- package/dist/esm/components/Toggle/Toggle.js +53 -0
- package/dist/esm/components/Toggle/index.js +1 -0
- package/dist/esm/components/Toggle/styles.js +23 -0
- package/dist/esm/components/index.js +62 -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/hooks/use-layout.js +16 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/providers/IconsProvider.js +115 -0
- package/dist/esm/providers/icons/Address.js +14 -0
- package/dist/esm/providers/icons/Advice.js +14 -0
- package/dist/esm/providers/icons/Archive.js +14 -0
- package/dist/esm/providers/icons/ArrowDown.js +14 -0
- package/dist/esm/providers/icons/ArrowLeft.js +14 -0
- package/dist/esm/providers/icons/ArrowRight.js +14 -0
- package/dist/esm/providers/icons/ArrowUp.js +14 -0
- package/dist/esm/providers/icons/Award.js +14 -0
- package/dist/esm/providers/icons/Battery.js +14 -0
- package/dist/esm/providers/icons/Cal.js +14 -0
- package/dist/esm/providers/icons/CalBook.js +14 -0
- package/dist/esm/providers/icons/CaretDown.js +14 -0
- package/dist/esm/providers/icons/CaretLeft.js +14 -0
- package/dist/esm/providers/icons/CaretRight.js +14 -0
- package/dist/esm/providers/icons/CaretUp.js +14 -0
- package/dist/esm/providers/icons/Chart.js +14 -0
- package/dist/esm/providers/icons/ChartFilled.js +14 -0
- package/dist/esm/providers/icons/Check.js +14 -0
- package/dist/esm/providers/icons/CheckCircle.js +14 -0
- package/dist/esm/providers/icons/ChevronDown.js +14 -0
- package/dist/esm/providers/icons/ChevronLeft.js +14 -0
- package/dist/esm/providers/icons/ChevronLeftSmall.js +14 -0
- package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +14 -0
- package/dist/esm/providers/icons/ChevronRight.js +14 -0
- package/dist/esm/providers/icons/ChevronRightSmall.js +14 -0
- package/dist/esm/providers/icons/ChevronRightSmallLast.js +14 -0
- package/dist/esm/providers/icons/ChevronUp.js +14 -0
- package/dist/esm/providers/icons/Circle.js +14 -0
- package/dist/esm/providers/icons/CloseCircle.js +14 -0
- package/dist/esm/providers/icons/Cross.js +14 -0
- package/dist/esm/providers/icons/Doc.js +14 -0
- package/dist/esm/providers/icons/Dollar.js +14 -0
- package/dist/esm/providers/icons/Download.js +14 -0
- package/dist/esm/providers/icons/Eco.js +14 -0
- package/dist/esm/providers/icons/EcoHome.js +14 -0
- package/dist/esm/providers/icons/Edit.js +14 -0
- package/dist/esm/providers/icons/ElectricCar.js +14 -0
- package/dist/esm/providers/icons/ElectricHome.js +14 -0
- package/dist/esm/providers/icons/Electricity.js +14 -0
- package/dist/esm/providers/icons/EnergyAdvice.js +14 -0
- package/dist/esm/providers/icons/Equals.js +14 -0
- package/dist/esm/providers/icons/Euro.js +14 -0
- package/dist/esm/providers/icons/Gas.js +14 -0
- package/dist/esm/providers/icons/GlobeAddress.js +14 -0
- package/dist/esm/providers/icons/Help.js +14 -0
- package/dist/esm/providers/icons/HelpFilled.js +14 -0
- package/dist/esm/providers/icons/Hide.js +14 -0
- package/dist/esm/providers/icons/Home.js +14 -0
- package/dist/esm/providers/icons/HomeFilled.js +14 -0
- package/dist/esm/providers/icons/HydroPower.js +14 -0
- package/dist/esm/providers/icons/Info.js +14 -0
- package/dist/esm/providers/icons/Link.js +14 -0
- package/dist/esm/providers/icons/Logo.js +14 -0
- package/dist/esm/providers/icons/Mail.js +14 -0
- package/dist/esm/providers/icons/MailOpen.js +14 -0
- package/dist/esm/providers/icons/Menu.js +14 -0
- package/dist/esm/providers/icons/Message.js +14 -0
- package/dist/esm/providers/icons/MessageFilled.js +14 -0
- package/dist/esm/providers/icons/Minus.js +14 -0
- package/dist/esm/providers/icons/Mobile.js +14 -0
- package/dist/esm/providers/icons/NewWindow.js +14 -0
- package/dist/esm/providers/icons/PaymentCard.js +14 -0
- package/dist/esm/providers/icons/PaymentCardFilled.js +14 -0
- package/dist/esm/providers/icons/Phone.js +14 -0
- package/dist/esm/providers/icons/Plus.js +14 -0
- package/dist/esm/providers/icons/Pound.js +14 -0
- package/dist/esm/providers/icons/Pricing.js +14 -0
- package/dist/esm/providers/icons/Search.js +14 -0
- package/dist/esm/providers/icons/Security.js +14 -0
- package/dist/esm/providers/icons/Show.js +14 -0
- package/dist/esm/providers/icons/SmartHome.js +14 -0
- package/dist/esm/providers/icons/SmartMeter.js +14 -0
- package/dist/esm/providers/icons/Solar.js +14 -0
- package/dist/esm/providers/icons/Star.js +14 -0
- package/dist/esm/providers/icons/StarFilled.js +14 -0
- package/dist/esm/providers/icons/Sun.js +14 -0
- package/dist/esm/providers/icons/Torch.js +14 -0
- package/dist/esm/providers/icons/Trees.js +14 -0
- package/dist/esm/providers/icons/Tune.js +14 -0
- package/dist/esm/providers/icons/User.js +14 -0
- package/dist/esm/providers/icons/UserFilled.js +14 -0
- package/dist/esm/providers/icons/Wallet.js +14 -0
- package/dist/esm/providers/icons/WalletFilled.js +14 -0
- package/dist/esm/providers/icons/WarmHome.js +14 -0
- package/dist/esm/providers/icons/Warning.js +14 -0
- package/dist/esm/providers/icons/WebAddress.js +14 -0
- package/dist/esm/providers/icons/WindPower.js +14 -0
- package/dist/esm/providers/icons/index.js +87 -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/index.js +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/utils.js +95 -0
- package/dist/hooks/index.js +17 -8
- package/dist/hooks/use-breakpoint.d.ts +2 -2
- package/dist/hooks/use-breakpoint.js +15 -15
- package/dist/hooks/use-full-width.d.ts +1 -1
- package/dist/hooks/use-full-width.js +19 -16
- package/dist/hooks/use-layout.js +19 -17
- package/dist/index.d.ts +0 -2
- package/dist/index.js +18 -320
- package/dist/providers/IconsProvider.js +118 -189
- package/dist/providers/icons/Address.js +40 -13
- package/dist/providers/icons/Advice.js +40 -11
- package/dist/providers/icons/Archive.js +40 -13
- package/dist/providers/icons/ArrowDown.js +40 -11
- package/dist/providers/icons/ArrowLeft.js +40 -11
- package/dist/providers/icons/ArrowRight.js +40 -11
- package/dist/providers/icons/ArrowUp.js +40 -11
- package/dist/providers/icons/Award.js +40 -13
- package/dist/providers/icons/Battery.js +40 -13
- package/dist/providers/icons/Cal.js +40 -11
- package/dist/providers/icons/CalBook.js +40 -13
- package/dist/providers/icons/CaretDown.js +40 -5
- package/dist/providers/icons/CaretLeft.js +40 -5
- package/dist/providers/icons/CaretRight.js +40 -5
- package/dist/providers/icons/CaretUp.js +40 -5
- package/dist/providers/icons/Chart.js +40 -13
- package/dist/providers/icons/ChartFilled.js +40 -11
- package/dist/providers/icons/Check.js +40 -11
- package/dist/providers/icons/CheckCircle.js +40 -13
- package/dist/providers/icons/ChevronDown.js +40 -11
- package/dist/providers/icons/ChevronLeft.js +40 -11
- package/dist/providers/icons/ChevronLeftSmall.js +40 -11
- package/dist/providers/icons/ChevronLeftSmallFirst.js +40 -13
- package/dist/providers/icons/ChevronRight.js +40 -11
- package/dist/providers/icons/ChevronRightSmall.js +40 -11
- package/dist/providers/icons/ChevronRightSmallLast.js +40 -13
- package/dist/providers/icons/ChevronUp.js +40 -11
- package/dist/providers/icons/Circle.js +17 -5
- package/dist/providers/icons/CloseCircle.js +40 -13
- package/dist/providers/icons/Cross.js +40 -11
- package/dist/providers/icons/Doc.js +40 -11
- package/dist/providers/icons/Dollar.js +40 -13
- package/dist/providers/icons/Download.js +40 -13
- package/dist/providers/icons/Eco.js +40 -11
- package/dist/providers/icons/EcoHome.js +40 -13
- package/dist/providers/icons/Edit.js +40 -13
- package/dist/providers/icons/ElectricCar.js +40 -13
- package/dist/providers/icons/ElectricHome.js +40 -13
- package/dist/providers/icons/Electricity.js +40 -11
- package/dist/providers/icons/EnergyAdvice.js +40 -13
- package/dist/providers/icons/Equals.js +40 -13
- package/dist/providers/icons/Euro.js +40 -13
- package/dist/providers/icons/Gas.js +40 -11
- package/dist/providers/icons/GlobeAddress.js +40 -11
- package/dist/providers/icons/Help.js +40 -13
- package/dist/providers/icons/HelpFilled.d.ts +2 -0
- package/dist/providers/icons/HelpFilled.js +41 -0
- package/dist/providers/icons/Hide.js +40 -11
- package/dist/providers/icons/Home.js +40 -11
- package/dist/providers/icons/HomeFilled.js +40 -11
- package/dist/providers/icons/HydroPower.js +40 -13
- package/dist/providers/icons/Info.js +40 -13
- package/dist/providers/icons/Link.js +39 -40
- package/dist/providers/icons/Logo.js +17 -11
- package/dist/providers/icons/Mail.js +40 -11
- package/dist/providers/icons/MailOpen.js +40 -11
- package/dist/providers/icons/Menu.js +40 -13
- package/dist/providers/icons/Message.js +40 -11
- package/dist/providers/icons/MessageFilled.js +40 -11
- package/dist/providers/icons/Minus.js +40 -5
- package/dist/providers/icons/Mobile.js +40 -13
- package/dist/providers/icons/NewWindow.js +39 -22
- package/dist/providers/icons/PaymentCard.js +40 -13
- package/dist/providers/icons/PaymentCardFilled.d.ts +2 -0
- package/dist/providers/icons/PaymentCardFilled.js +41 -0
- package/dist/providers/icons/Phone.js +40 -11
- package/dist/providers/icons/Plus.js +40 -11
- package/dist/providers/icons/Pound.js +40 -13
- package/dist/providers/icons/Pricing.js +40 -11
- package/dist/providers/icons/Search.js +40 -11
- package/dist/providers/icons/Security.js +40 -13
- package/dist/providers/icons/Show.js +40 -13
- package/dist/providers/icons/SmartHome.js +40 -13
- package/dist/providers/icons/SmartMeter.js +40 -13
- package/dist/providers/icons/Solar.js +40 -11
- package/dist/providers/icons/Star.js +40 -11
- package/dist/providers/icons/StarFilled.d.ts +2 -0
- package/dist/providers/icons/StarFilled.js +41 -0
- package/dist/providers/icons/Sun.js +40 -13
- package/dist/providers/icons/Torch.js +39 -13
- package/dist/providers/icons/Trees.js +40 -13
- package/dist/providers/icons/Tune.js +40 -13
- package/dist/providers/icons/User.js +40 -13
- package/dist/providers/icons/UserFilled.js +40 -11
- package/dist/providers/icons/Wallet.js +40 -13
- package/dist/providers/icons/WalletFilled.js +40 -11
- package/dist/providers/icons/WarmHome.js +40 -13
- package/dist/providers/icons/Warning.js +40 -13
- package/dist/providers/icons/WebAddress.js +40 -11
- package/dist/providers/icons/WindPower.js +40 -11
- package/dist/providers/icons/index.d.ts +3 -0
- package/dist/providers/icons/index.js +102 -171
- package/dist/providers/index.js +17 -92
- package/dist/providers/types.d.ts +3 -3
- package/dist/providers/types.js +2 -1
- package/dist/styled.native.d.ts +36 -0
- package/dist/styled.native.js +32 -8
- package/dist/theme/index.js +15 -970
- package/dist/utils/index.js +16 -14
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +104 -57
- package/package.json +13 -21
- package/dist/components/components.spec.native.js +0 -199
- package/dist/index-zQHKJ0fC.js +0 -180
- package/dist/styled.native-KEscfVp7.js +0 -3872
- package/dist/test/utils.d.ts +0 -4
- package/dist/test/utils.js +0 -16127
- package/dist/theme-native--5aKgQLJ.js +0 -482
- package/dist/theme-web-MrdqV6Ln.js +0 -482
- package/dist/utils-HsZygzDh.js +0 -26
- /package/dist/{components/components.spec.native.d.ts → esm/components/Accordion/types.js} +0 -0
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
import { getValidChildren } from '../../utils';
|
|
5
|
+
import { Margin } from '../Margin';
|
|
6
|
+
import { Stack } from '../Stack';
|
|
7
|
+
import { FlexRow, LiContent, SquareBullet, TextBullet } from './styled';
|
|
8
|
+
var ListItem = function (_a) {
|
|
9
|
+
var children = _a.children, _b = _a.showBullets, showBullets = _b === void 0 ? true : _b, prefix = _a.prefix;
|
|
10
|
+
return (_jsxs(FlexRow, { children: [prefix ? (_jsx(TextBullet, { children: prefix })) : (_jsx(SquareBullet, { visible: showBullets })), _jsx(LiContent, { children: children })] }));
|
|
11
|
+
};
|
|
12
|
+
var renderList = function (_a) {
|
|
13
|
+
var children = _a.children, listType = _a.listType, showBullets = _a.showBullets;
|
|
14
|
+
var validChildren = getValidChildren(children);
|
|
15
|
+
return Children.map(validChildren, function (child, index) { return (_jsx(ListItem, { prefix: listType === 'ol' ? "".concat(index + 1, ".") : undefined, showBullets: showBullets, children: child })); });
|
|
16
|
+
};
|
|
17
|
+
var Li = function (_a) {
|
|
18
|
+
var children = _a.children;
|
|
19
|
+
return _jsx(View, { style: { flexDirection: 'column' }, children: children });
|
|
20
|
+
};
|
|
21
|
+
var Ul = function (props) {
|
|
22
|
+
var children = props.children, showBullets = props.showBullets;
|
|
23
|
+
return (_jsx(Margin, { top: 2, children: _jsx(Stack, { spaceBetween: 2, children: renderList({ children: children, listType: 'ul', showBullets: showBullets }) }) }));
|
|
24
|
+
};
|
|
25
|
+
var Ol = function (props) {
|
|
26
|
+
var children = props.children;
|
|
27
|
+
return (_jsx(Margin, { top: 2, children: _jsx(Stack, { spaceBetween: 2, children: renderList({ children: children, listType: 'ol' }) }) }));
|
|
28
|
+
};
|
|
29
|
+
export { Li, Ol, Ul };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Ol, Ul, Li } from './List';
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { numToPx } from '@ovotech/element-core';
|
|
6
|
+
import styled, { css } from '../../styled.native';
|
|
7
|
+
export var SquareBullet = styled.View(function (_a) {
|
|
8
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, visible = _a.visible, smallAndUp = _a.smallAndUp;
|
|
9
|
+
var lineHeight = smallAndUp
|
|
10
|
+
? core.lineHeight.body.large
|
|
11
|
+
: core.lineHeight.body.small;
|
|
12
|
+
var topMargin = (lineHeight - core.space[2]) / 2;
|
|
13
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-self: flex-start;\n width: ", ";\n height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n background-color: ", ";\n "], ["\n align-self: flex-start;\n width: ", ";\n height: ", ";\n margin-right: ", ";\n margin-top: ", ";\n background-color: ", ";\n "])), numToPx(core.space[2]), numToPx(core.space[2]), numToPx(core.space[2]), numToPx(topMargin), visible ? semantic.message.base : 'transparent');
|
|
14
|
+
});
|
|
15
|
+
export var TextBullet = styled.Text(function (_a) {
|
|
16
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
17
|
+
var fontSize = smallAndUp
|
|
18
|
+
? core.fontSize.body.large
|
|
19
|
+
: core.fontSize.body.small;
|
|
20
|
+
var lineHeight = smallAndUp
|
|
21
|
+
? core.lineHeight.body.large
|
|
22
|
+
: core.lineHeight.body.small;
|
|
23
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n margin-right: ", ";\n min-width: ", ";\n min-height: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: left;\n color: ", ";\n "], ["\n margin-right: ", ";\n min-width: ", ";\n min-height: ", ";\n font-size: ", ";\n line-height: ", ";\n text-align: left;\n color: ", ";\n "])), numToPx(core.space[1]), numToPx(core.space[3]), numToPx(core.space[3]), numToPx(fontSize), numToPx(lineHeight), semantic.message.base);
|
|
24
|
+
});
|
|
25
|
+
export var FlexRow = styled.View(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n"], ["\n flex-direction: row;\n"])));
|
|
26
|
+
export var LiContent = styled.View(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n flex-direction: column;\n flex: 1;\n"], ["\n flex-direction: column;\n flex: 1;\n"])));
|
|
27
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { numToPx } from '@ovotech/element-core';
|
|
25
|
+
import { useBreakpoint } from '../../hooks';
|
|
26
|
+
import styled from '../../styled.native';
|
|
27
|
+
import { responsiveStyle } from '../../utils';
|
|
28
|
+
var StyledMargin = styled.View(function (_a) {
|
|
29
|
+
var space = _a.theme.core.space, mTop = _a.mTop, mBottom = _a.mBottom, mLeft = _a.mLeft, mRight = _a.mRight, horizontal = _a.horizontal, vertical = _a.vertical, all = _a.all, breakpoints = _a.breakpoints;
|
|
30
|
+
var formatter = function (spaceKey) { return numToPx(space[spaceKey]); };
|
|
31
|
+
return "\n ".concat(horizontal
|
|
32
|
+
? "\n ".concat(responsiveStyle('margin-left', horizontal, breakpoints, formatter), "\n ").concat(responsiveStyle('margin-right', horizontal, breakpoints, formatter), "\n ")
|
|
33
|
+
: '', "\n ").concat(vertical
|
|
34
|
+
? "\n ".concat(responsiveStyle('margin-top', vertical, breakpoints, formatter), "\n ").concat(responsiveStyle('margin-bottom', vertical, breakpoints, formatter), "\n ")
|
|
35
|
+
: '', "\n ").concat(mTop ? responsiveStyle('margin-top', mTop, breakpoints, formatter) : '', "\n ").concat(mBottom
|
|
36
|
+
? responsiveStyle('margin-bottom', mBottom, breakpoints, formatter)
|
|
37
|
+
: '', "\n ").concat(mLeft ? responsiveStyle('margin-left', mLeft, breakpoints, formatter) : '', "\n ").concat(mRight
|
|
38
|
+
? responsiveStyle('margin-right', mRight, breakpoints, formatter)
|
|
39
|
+
: '', "\n ").concat(all ? responsiveStyle('margin', all, breakpoints, formatter) : '', "\n ");
|
|
40
|
+
});
|
|
41
|
+
var Margin = function (_a) {
|
|
42
|
+
var top = _a.top, bottom = _a.bottom, left = _a.left, right = _a.right, rest = __rest(_a, ["top", "bottom", "left", "right"]);
|
|
43
|
+
var breakpoints = useBreakpoint();
|
|
44
|
+
return (_jsx(StyledMargin, __assign({}, rest, { breakpoints: breakpoints, mTop: top, mBottom: bottom, mLeft: left, mRight: right })));
|
|
45
|
+
};
|
|
46
|
+
export { Margin };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Margin } from './Margin';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from '@ovotech/element-core';
|
|
3
|
+
import { Pressable } from 'react-native';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
import { StyledIconButtonL, StyledIconButtonS } from './NavHeader.styles';
|
|
6
|
+
export var IconButton = function (_a) {
|
|
7
|
+
var size = _a.size, animation = _a.animation, rightActionConfig = _a.rightActionConfig;
|
|
8
|
+
var ButtonStyled = size === 'small' ? StyledIconButtonS : StyledIconButtonL;
|
|
9
|
+
if (!rightActionConfig || !(rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.iconName)) {
|
|
10
|
+
return null;
|
|
11
|
+
}
|
|
12
|
+
return (_jsx(Pressable, { hitSlop: 44, pressRetentionOffset: 44, onPress: rightActionConfig === null || rightActionConfig === void 0 ? void 0 : rightActionConfig.onActionPress, children: function (_a) {
|
|
13
|
+
var pressed = _a.pressed;
|
|
14
|
+
return (_jsx(ButtonStyled, { entering: animation, "$pressed": pressed, children: _jsx(Icon, { name: rightActionConfig.iconName, size: size === 'small' ? 16 : 18, color: theme.semantic.inverted.message.base }) }));
|
|
15
|
+
} }));
|
|
16
|
+
};
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { theme } from '@ovotech/element-core';
|
|
3
|
+
import Animated, { Easing, FadeInDown, FadeInUp, FadeOutDown, FadeOutUp, useAnimatedStyle, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { Action } from '../ActionList';
|
|
5
|
+
import { IconButton } from './IconButton';
|
|
6
|
+
import { ActionWrapper, CollapsedTitle, CollapsedTitleWrapper, ExpandedTitle, IconButtonWrapper, NavContainer, NavWrapper, } from './NavHeader.styles';
|
|
7
|
+
var FADE_ANIMATION_DURATION = 200;
|
|
8
|
+
export var NavHeader = function (_a) {
|
|
9
|
+
var title = _a.title, scrolled = _a.scrolled, canGoBack = _a.canGoBack, rightActionConfig = _a.rightActionConfig, _b = _a.topOffset, topOffset = _b === void 0 ? 0 : _b, _c = _a.backButtonText, backButtonText = _c === void 0 ? 'Back' : _c, onHeaderHeightChange = _a.onHeaderHeightChange, onBackButtonPress = _a.onBackButtonPress;
|
|
10
|
+
var hasRightAction = !!rightActionConfig;
|
|
11
|
+
var layoutHeight = useSharedValue(0);
|
|
12
|
+
var animatedHeightStyle = useAnimatedStyle(function () {
|
|
13
|
+
return {
|
|
14
|
+
height: layoutHeight.value,
|
|
15
|
+
};
|
|
16
|
+
});
|
|
17
|
+
var onLayout = function (e) {
|
|
18
|
+
var height = e.nativeEvent.layout.height;
|
|
19
|
+
if (height === layoutHeight.value) {
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
22
|
+
// we want to only update height of the expanded header to set content offset on the client side
|
|
23
|
+
if (!scrolled) {
|
|
24
|
+
onHeaderHeightChange === null || onHeaderHeightChange === void 0 ? void 0 : onHeaderHeightChange(height);
|
|
25
|
+
}
|
|
26
|
+
layoutHeight.value = withTiming(height, {
|
|
27
|
+
duration: FADE_ANIMATION_DURATION,
|
|
28
|
+
easing: Easing.linear,
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
// NavWrapper will recieve height of the NavContainer and animate it
|
|
32
|
+
// content inside NavContainer is the only dynamic part of NavHeader
|
|
33
|
+
return (_jsx(NavWrapper, { collapsed: scrolled, style: animatedHeightStyle, children: _jsxs(NavContainer, { topOffset: topOffset, onLayout: onLayout, children: [_jsx(Animated.View, { style: {
|
|
34
|
+
width: scrolled ? '33.3%' : '100%',
|
|
35
|
+
// when back button is off we have small margin top for title, to write less code we can just set height
|
|
36
|
+
height: !canGoBack ? parseInt(theme.core.space[10]) : undefined,
|
|
37
|
+
}, children: canGoBack && (_jsx(ActionWrapper, { collapsed: scrolled, children: _jsx(Action, { iconLeft: "chevron-left-small", inline: true, onPress: onBackButtonPress, children: backButtonText }) })) }), scrolled ? (_jsxs(_Fragment, { children: [_jsx(CollapsedTitleWrapper, { children: _jsx(CollapsedTitle, { numberOfLines: 1, ellipsizeMode: "tail", entering: FadeInDown.delay(FADE_ANIMATION_DURATION), exiting: FadeOutDown.duration(FADE_ANIMATION_DURATION), children: title }) }), _jsx(IconButtonWrapper, { children: _jsx(IconButton, { rightActionConfig: rightActionConfig, size: "small", animation: FadeInDown.delay(FADE_ANIMATION_DURATION) }) })] })) : (_jsxs(_Fragment, { children: [_jsx(ExpandedTitle
|
|
38
|
+
// if we don't have right action leave more space for the title text in expanded state
|
|
39
|
+
, {
|
|
40
|
+
// if we don't have right action leave more space for the title text in expanded state
|
|
41
|
+
fullWidth: !scrolled && !hasRightAction, numberOfLines: 2, ellipsizeMode: "tail", hasBackButton: canGoBack, entering: FadeInUp.delay(FADE_ANIMATION_DURATION), exiting: FadeOutUp.duration(FADE_ANIMATION_DURATION), children: title }), _jsx(IconButtonWrapper, { children: _jsx(IconButton, { rightActionConfig: rightActionConfig, size: "large", animation: FadeInUp.delay(FADE_ANIMATION_DURATION) }) })] }))] }) }));
|
|
42
|
+
};
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { numToPx } from '@ovotech/element-core';
|
|
6
|
+
import Animated from 'react-native-reanimated';
|
|
7
|
+
import styled, { css } from '../../styled.native';
|
|
8
|
+
var Z_INDEX = 1000;
|
|
9
|
+
export var NavWrapper = styled(Animated.View)(function (_a) {
|
|
10
|
+
var _b = _a.theme, semantic = _b.semantic, core = _b.core, collapsed = _a.collapsed;
|
|
11
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n width: 100%;\n position: absolute;\n\n /* yes, it is not a good move, but we want header to be the topmost element on the screen and we can't control app zIndex */\n z-index: ", ";\n background-color: ", ";\n\n ", "\n "], ["\n width: 100%;\n position: absolute;\n\n /* yes, it is not a good move, but we want header to be the topmost element on the screen and we can't control app zIndex */\n z-index: ", ";\n background-color: ", ";\n\n ", "\n "])), Z_INDEX, semantic.surface.base, collapsed
|
|
12
|
+
? css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "], ["\n border-bottom-width: ", ";\n border-bottom-style: solid;\n border-bottom-color: ", ";\n "])), numToPx(core.borderWidth.small), semantic.border.differentiated) : '');
|
|
13
|
+
});
|
|
14
|
+
export var NavContainer = styled.View(function (_a) {
|
|
15
|
+
var core = _a.theme.core, topOffset = _a.topOffset;
|
|
16
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: 100%;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding: ", " ", ";\n padding-top: ", ";\n "], ["\n position: absolute;\n\n /* NavWrapper zIndex + 1 so it is always on top of the wrapper */\n z-index: ", ";\n width: 100%;\n flex-direction: row;\n justify-content: space-between;\n align-items: center;\n flex-wrap: wrap;\n padding: ", " ", ";\n padding-top: ", ";\n "])), Z_INDEX + 1, numToPx(core.space[2]), numToPx(core.space[4]), numToPx(topOffset ? topOffset : core.space[2]));
|
|
17
|
+
});
|
|
18
|
+
export var ExpandedTitle = styled(Animated.Text)(function (_a) {
|
|
19
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBackButton = _a.hasBackButton, fullWidth = _a.fullWidth;
|
|
20
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n width: ", ";\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), fullWidth ? '100%' : '65%', core.fontFamily.heading.native, numToPx(core.fontSize.heading1[hasBackButton ? 'small' : 'large']), numToPx(hasBackButton ? core.lineHeight.heading1.small : core.space[13]), semantic.message.branded);
|
|
21
|
+
});
|
|
22
|
+
export var CollapsedTitleWrapper = styled(Animated.View)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n width: 33.3%;\n align-items: center;\n justify-content: center;\n"], ["\n width: 33.3%;\n align-items: center;\n justify-content: center;\n"])));
|
|
23
|
+
export var CollapsedTitle = styled(Animated.Text)(function (_a) {
|
|
24
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
25
|
+
return css(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.heading.native, numToPx(core.fontSize.heading4.small), numToPx(core.lineHeight.heading4.small), semantic.message.branded);
|
|
26
|
+
});
|
|
27
|
+
export var IconButtonWrapper = styled.View(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"], ["\n width: 33.3%;\n flex-direction: row;\n justify-content: flex-end;\n"])));
|
|
28
|
+
var iconButtonSharedStyles = css(function (_a) {
|
|
29
|
+
var semantic = _a.theme.semantic;
|
|
30
|
+
return "\n border-radius: 100px;\n background-color: ".concat(semantic.inverted.surface, ";\n align-items: center;\n justify-content: center;\n");
|
|
31
|
+
});
|
|
32
|
+
export var StyledIconButtonS = styled(Animated.View)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"], ["\n width: 28px;\n height: 28px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
|
|
33
|
+
var $pressed = _a.$pressed;
|
|
34
|
+
return ($pressed ? 0.8 : 1);
|
|
35
|
+
}, iconButtonSharedStyles);
|
|
36
|
+
export var StyledIconButtonL = styled(Animated.View)(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"], ["\n width: 36px;\n height: 36px;\n opacity: ", ";\n ", ";\n"])), function (_a) {
|
|
37
|
+
var $pressed = _a.$pressed;
|
|
38
|
+
return ($pressed ? 0.8 : 1);
|
|
39
|
+
}, iconButtonSharedStyles);
|
|
40
|
+
export var ActionWrapper = styled.View(function (_a) {
|
|
41
|
+
var core = _a.theme.core, collapsed = _a.collapsed;
|
|
42
|
+
return css(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n margin-bottom: ", ";\n "], ["\n margin-bottom: ", ";\n "])), collapsed ? '0' : numToPx(core.space[2]));
|
|
43
|
+
});
|
|
44
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NavHeader } from './NavHeader';
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
17
|
+
var t = {};
|
|
18
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
19
|
+
t[p] = s[p];
|
|
20
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
21
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
22
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
23
|
+
t[p[i]] = s[p[i]];
|
|
24
|
+
}
|
|
25
|
+
return t;
|
|
26
|
+
};
|
|
27
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
28
|
+
import { numToPx } from '@ovotech/element-core';
|
|
29
|
+
import { forwardRef, useState } from 'react';
|
|
30
|
+
import { View } from 'react-native';
|
|
31
|
+
import styled, { css } from '../../styled.native';
|
|
32
|
+
import { Icon } from '../Icon';
|
|
33
|
+
var NotificationBox = styled.View(function (_a) {
|
|
34
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, noMargin = _a.noMargin;
|
|
35
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n overflow: hidden;\n "], ["\n position: relative;\n margin-bottom: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n overflow: hidden;\n "])), noMargin ? 0 : numToPx(core.space[4]), numToPx(core.borderWidth.small), semantic.surface.elevated, numToPx(core.radius.max));
|
|
36
|
+
});
|
|
37
|
+
export var NotificationContentBox = styled.View(function (_a) {
|
|
38
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
39
|
+
return css(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "], ["\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n "])), semantic.surface.elevated, numToPx(core.space[2]), numToPx(core.space[3]), numToPx(core.space[4]), numToPx(core.space[4]));
|
|
40
|
+
});
|
|
41
|
+
export var NotificationTitleBox = styled.View(function (_a) {
|
|
42
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant, dismissible = _a.dismissible;
|
|
43
|
+
var currentVariant = semantic[variant];
|
|
44
|
+
return css(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "], ["\n flex-direction: row;\n align-items: center;\n justify-content: space-between;\n background-color: ", ";\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n min-height: 44px;\n "])), currentVariant.surface, numToPx(core.space[2]), numToPx(core.space[2]), numToPx(core.space[4]), dismissible
|
|
45
|
+
? numToPx(core.space[3])
|
|
46
|
+
: numToPx(core.space[4]));
|
|
47
|
+
});
|
|
48
|
+
var NotificationTitleText = styled.Text(function (_a) {
|
|
49
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, variant = _a.variant;
|
|
50
|
+
var currentVariant = semantic[variant];
|
|
51
|
+
return css(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "], ["\n font-size: ", ";\n font-family: ", ";\n color: ", ";\n "])), numToPx(core.fontSize.body.small), core.fontFamily.bodyBold.native, currentVariant.message);
|
|
52
|
+
});
|
|
53
|
+
var DismissButton = styled.TouchableOpacity(function (_a) {
|
|
54
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
55
|
+
return css(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n "], ["\n display: flex;\n justify-content: center;\n align-items: center;\n width: 28px;\n height: 28px;\n background: ", ";\n border: ", " solid\n ", ";\n border-radius: ", ";\n "])), semantic.inverted.surface, numToPx(core.borderWidth.small), core.color.brand.forest, numToPx(core.radius.max));
|
|
56
|
+
});
|
|
57
|
+
var StyledIcon = styled(Icon)(function (_a) {
|
|
58
|
+
var semantic = _a.theme.semantic;
|
|
59
|
+
return "\n color: ".concat(semantic.inverted.message.base, ";\n ");
|
|
60
|
+
});
|
|
61
|
+
export var Notification = forwardRef(function (_a, ref) {
|
|
62
|
+
var _b = _a.variant, variant = _b === void 0 ? 'neutral' : _b, children = _a.children, title = _a.title, noMargin = _a.noMargin, dismissible = _a.dismissible, onDismiss = _a.onDismiss, rest = __rest(_a, ["variant", "children", "title", "noMargin", "dismissible", "onDismiss"]);
|
|
63
|
+
var _c = useState(false), dismissed = _c[0], setDismissed = _c[1];
|
|
64
|
+
if (dismissed || (!title && !children)) {
|
|
65
|
+
return null;
|
|
66
|
+
}
|
|
67
|
+
return (_jsx(View, __assign({ ref: ref }, rest, { children: _jsxs(NotificationBox, { noMargin: noMargin, testID: "nb-notification", children: [_jsxs(NotificationTitleBox, { variant: variant, dismissible: dismissible, children: [_jsx(NotificationTitleText, { variant: variant, children: title }), dismissible ? (_jsx(DismissButton, { accessible: true, accessibilityLabel: "Dismiss", testID: "nb-notification-dismiss", onPress: function () {
|
|
68
|
+
setDismissed(true);
|
|
69
|
+
if (onDismiss) {
|
|
70
|
+
onDismiss();
|
|
71
|
+
}
|
|
72
|
+
}, children: _jsx(StyledIcon, { name: "cross", size: "16" }) })) : null] }), children ? (_jsx(NotificationContentBox, { "data-testid": "el-notification-box", children: children })) : null] }) })));
|
|
73
|
+
});
|
|
74
|
+
export var ErrorNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "error" }, props)); });
|
|
75
|
+
export var SuccessNotification = forwardRef(function (props, ref) { return (_jsx(Notification, __assign({ ref: ref, variant: "success" }, props))); });
|
|
76
|
+
export var InfoNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "info" }, props)); });
|
|
77
|
+
export var WarningNotification = forwardRef(function (props, ref) { return _jsx(Notification, __assign({ ref: ref, variant: "warning" }, props)); });
|
|
78
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { Notification, ErrorNotification, InfoNotification, WarningNotification, SuccessNotification, } from './Notification';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { forwardRef } from 'react';
|
|
25
|
+
import { Field } from '../Field';
|
|
26
|
+
import { NumberInput } from '../NumberInput';
|
|
27
|
+
export var NumberField = forwardRef(function (_a, ref) {
|
|
28
|
+
var rest = __rest(_a, []);
|
|
29
|
+
return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(NumberInput, {}) })));
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumberField } from './NumberField';
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { forwardRef } from 'react';
|
|
14
|
+
import { Input } from '../Input/Input';
|
|
15
|
+
var NumberInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "numeric", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
|
|
16
|
+
export { NumberInput };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { NumberInput } from './NumberInput';
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
var __assign = (this && this.__assign) || function () {
|
|
6
|
+
__assign = Object.assign || function(t) {
|
|
7
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
8
|
+
s = arguments[i];
|
|
9
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
10
|
+
t[p] = s[p];
|
|
11
|
+
}
|
|
12
|
+
return t;
|
|
13
|
+
};
|
|
14
|
+
return __assign.apply(this, arguments);
|
|
15
|
+
};
|
|
16
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
17
|
+
import { numToPx } from '@ovotech/element-core';
|
|
18
|
+
import { forwardRef } from 'react';
|
|
19
|
+
import { useBreakpoint } from '../../hooks';
|
|
20
|
+
import styled, { css } from '../../styled.native';
|
|
21
|
+
var StyledP = styled.Text(function (_a) {
|
|
22
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, inverted = _a.inverted;
|
|
23
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "], ["\n font-family: ", ";\n font-size: ", ";\n line-height: ", ";\n color: ", ";\n "])), core.fontFamily.body.native, numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small']), numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small']), inverted ? semantic.inverted.message.base : semantic.message.base);
|
|
24
|
+
});
|
|
25
|
+
export var P = forwardRef(function (props, ref) {
|
|
26
|
+
var breakpoints = useBreakpoint();
|
|
27
|
+
return _jsx(StyledP, __assign({}, props, breakpoints, { ref: ref }));
|
|
28
|
+
});
|
|
29
|
+
var templateObject_1;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { P } from './P';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { forwardRef } from 'react';
|
|
25
|
+
import { Field } from '../Field';
|
|
26
|
+
import { PasswordInput } from '../PasswordInput';
|
|
27
|
+
export var PasswordField = forwardRef(function (_a, ref) {
|
|
28
|
+
var hasVisibilityToggle = _a.hasVisibilityToggle, rest = __rest(_a, ["hasVisibilityToggle"]);
|
|
29
|
+
return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(PasswordInput, { hasVisibilityToggle: hasVisibilityToggle }) })));
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PasswordField } from './PasswordField';
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { forwardRef } from 'react';
|
|
25
|
+
import { Input } from '../Input/Input';
|
|
26
|
+
import { PasswordVisibilityToggle, useTogglePasswordVisibility, } from './PasswordVisibilityToggle';
|
|
27
|
+
var PasswordInput = forwardRef(function (_a, ref) {
|
|
28
|
+
var props = __rest(_a, []);
|
|
29
|
+
var _b = useTogglePasswordVisibility(), isPasswordVisible = _b.isPasswordVisible, handlePasswordVisibility = _b.handlePasswordVisibility;
|
|
30
|
+
return (_jsx(Input, __assign({}, props, { rightSlot: props.hasVisibilityToggle ? (_jsx(PasswordVisibilityToggle, { iconName: isPasswordVisible ? 'hide' : 'show', visibilityToggleLabel: isPasswordVisible ? 'Hide password' : 'Show password', handlePasswordVisibility: handlePasswordVisibility })) : null, keyboardType: "default", autoCapitalize: "none", autoCorrect: false, blurOnSubmit: false, secureTextEntry: !isPasswordVisible, ref: ref })));
|
|
31
|
+
});
|
|
32
|
+
export { PasswordInput };
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { numToPx } from '@ovotech/element-core';
|
|
6
|
+
import { Pressable } from 'react-native';
|
|
7
|
+
import styled, { css } from '../../styled.native';
|
|
8
|
+
export var StyledPressable = styled(Pressable)(function (_a) {
|
|
9
|
+
var core = _a.theme.core, focused = _a.focused;
|
|
10
|
+
return css(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "], ["\n display: flex;\n align-items: center;\n position: absolute;\n width: ", ";\n z-index: 1;\n top: ", ";\n right: ", ";\n "])), numToPx(core.space[4]), focused ? '16px' : '14px', numToPx(core.space[3]));
|
|
11
|
+
});
|
|
12
|
+
var templateObject_1;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
3
|
+
import { Icon } from '../Icon';
|
|
4
|
+
import { StyledPressable } from './PasswordInput.styled';
|
|
5
|
+
export var useTogglePasswordVisibility = function () {
|
|
6
|
+
var _a = useState(false), isPasswordVisible = _a[0], setIsPasswordVisible = _a[1];
|
|
7
|
+
var handlePasswordVisibility = function () {
|
|
8
|
+
setIsPasswordVisible(!isPasswordVisible);
|
|
9
|
+
};
|
|
10
|
+
return {
|
|
11
|
+
isPasswordVisible: isPasswordVisible,
|
|
12
|
+
handlePasswordVisibility: handlePasswordVisibility,
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
export var PasswordVisibilityToggle = function (_a) {
|
|
16
|
+
var iconName = _a.iconName, visibilityToggleLabel = _a.visibilityToggleLabel, handlePasswordVisibility = _a.handlePasswordVisibility;
|
|
17
|
+
var _b = useState(false), focused = _b[0], setFocused = _b[1];
|
|
18
|
+
return (_jsx(StyledPressable, { testID: "password-input-visibility-toggle", focused: focused, accessibilityRole: "button", accessibilityLabel: visibilityToggleLabel, onPress: handlePasswordVisibility, hitSlop: 16, onFocus: function () {
|
|
19
|
+
setFocused(true);
|
|
20
|
+
}, onBlur: function () {
|
|
21
|
+
setFocused(false);
|
|
22
|
+
}, children: _jsx(Icon, { name: iconName, size: 16, pointerEvents: "none" }) }));
|
|
23
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PasswordInput } from './PasswordInput';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
13
|
+
var t = {};
|
|
14
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
15
|
+
t[p] = s[p];
|
|
16
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
17
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
18
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
19
|
+
t[p[i]] = s[p[i]];
|
|
20
|
+
}
|
|
21
|
+
return t;
|
|
22
|
+
};
|
|
23
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
24
|
+
import { forwardRef } from 'react';
|
|
25
|
+
import { Field } from '../Field';
|
|
26
|
+
import { PhoneInput } from '../PhoneInput';
|
|
27
|
+
export var PhoneField = forwardRef(function (_a, ref) {
|
|
28
|
+
var rest = __rest(_a, []);
|
|
29
|
+
return (_jsx(Field, __assign({}, rest, { ref: ref, children: _jsx(PhoneInput, {}) })));
|
|
30
|
+
});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PhoneField } from './PhoneField';
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
|
+
import { forwardRef } from 'react';
|
|
14
|
+
import { Input } from '../Input/Input';
|
|
15
|
+
export var PhoneInput = forwardRef(function (props, ref) { return (_jsx(Input, __assign({}, props, { keyboardType: "phone-pad", autoCapitalize: "none", autoCorrect: false, ref: ref }))); });
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { PhoneInput } from './PhoneInput';
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
2
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
3
|
+
return cooked;
|
|
4
|
+
};
|
|
5
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
6
|
+
import Animated, { Extrapolate, interpolate, interpolateColor, useAnimatedStyle, } from 'react-native-reanimated';
|
|
7
|
+
import styled, { useTheme } from '../../styled.native';
|
|
8
|
+
export function NavigationDots(_a) {
|
|
9
|
+
var data = _a.data, animatedValue = _a.animatedValue;
|
|
10
|
+
return (_jsx(SDotsContainer, { children: data.map(function (_, index) { return (_jsx(Dot, { index: index, length: data.length, animatedValue: animatedValue }, index)); }) }));
|
|
11
|
+
}
|
|
12
|
+
var Dot = function (_a) {
|
|
13
|
+
var animatedValue = _a.animatedValue, index = _a.index, length = _a.length, _b = _a.width, width = _b === void 0 ? 10 : _b;
|
|
14
|
+
var theme = useTheme();
|
|
15
|
+
var animatedStyle = useAnimatedStyle(function () {
|
|
16
|
+
var inputRange = [index - 1, index, index + 1];
|
|
17
|
+
var outputRange = [-width, 0, width];
|
|
18
|
+
if (index === 0 && (animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value) > length - 1) {
|
|
19
|
+
inputRange = [length - 1, length, length + 1];
|
|
20
|
+
outputRange = [-width, 0, width];
|
|
21
|
+
}
|
|
22
|
+
var backgroundColor = interpolateColor(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, [
|
|
23
|
+
theme.core.color.brand.forest,
|
|
24
|
+
theme.core.color.brand.energised,
|
|
25
|
+
theme.core.color.brand.forest,
|
|
26
|
+
]);
|
|
27
|
+
return {
|
|
28
|
+
transform: [
|
|
29
|
+
{
|
|
30
|
+
translateX: interpolate(animatedValue === null || animatedValue === void 0 ? void 0 : animatedValue.value, inputRange, outputRange, Extrapolate.CLAMP),
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
backgroundColor: backgroundColor,
|
|
34
|
+
};
|
|
35
|
+
}, [animatedValue, index, length]);
|
|
36
|
+
return (_jsx(SDot, { "$width": width, children: _jsx(SAnimatedDot, { style: animatedStyle }) }));
|
|
37
|
+
};
|
|
38
|
+
var SDotsContainer = styled.View(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"], ["\n position: absolute;\n bottom: 20px;\n flex-direction: row;\n gap: 10px;\n"])));
|
|
39
|
+
var SDot = styled.View(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"], ["\n background-color: ", ";\n width: ", "px;\n height: ", "px;\n border-radius: 50px;\n overflow: hidden;\n"])), function (_a) {
|
|
40
|
+
var theme = _a.theme;
|
|
41
|
+
return theme.core.color.brand.forest;
|
|
42
|
+
}, function (_a) {
|
|
43
|
+
var $width = _a.$width;
|
|
44
|
+
return $width;
|
|
45
|
+
}, function (_a) {
|
|
46
|
+
var $width = _a.$width;
|
|
47
|
+
return $width;
|
|
48
|
+
});
|
|
49
|
+
var SAnimatedDot = styled(Animated.View)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n border-radius: 20px;\n flex: 1;\n"], ["\n border-radius: 20px;\n flex: 1;\n"])));
|
|
50
|
+
var templateObject_1, templateObject_2, templateObject_3;
|