@ovotech/element-native 3.8.1 → 4.0.0-canary-f95ccc0-247
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
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { AnimateProps } from 'react-native-reanimated';
|
|
1
|
+
import { ComponentType } from 'react';
|
|
3
2
|
import { AccordionProps } from './types';
|
|
4
|
-
export declare function withAnimated<T extends object>(WrappedComponent: ComponentType<T>):
|
|
3
|
+
export declare function withAnimated<T extends object>(WrappedComponent: ComponentType<T>): any;
|
|
5
4
|
export declare const Accordion: ({ expanded, first, last, title, children, onToggle, }: AccordionProps) => JSX.Element;
|
|
@@ -1,101 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __assign = (this && this.__assign) || function () {
|
|
18
|
+
__assign = Object.assign || function(t) {
|
|
19
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
+
s = arguments[i];
|
|
21
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
+
t[p] = s[p];
|
|
23
|
+
}
|
|
24
|
+
return t;
|
|
25
|
+
};
|
|
26
|
+
return __assign.apply(this, arguments);
|
|
27
|
+
};
|
|
28
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
29
|
+
if (k2 === undefined) k2 = k;
|
|
30
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
31
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
32
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
18
33
|
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
34
|
+
Object.defineProperty(o, k2, desc);
|
|
35
|
+
}) : (function(o, m, k, k2) {
|
|
36
|
+
if (k2 === undefined) k2 = k;
|
|
37
|
+
o[k2] = m[k];
|
|
38
|
+
}));
|
|
39
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
40
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
41
|
+
}) : function(o, v) {
|
|
42
|
+
o["default"] = v;
|
|
43
|
+
});
|
|
44
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
45
|
+
if (mod && mod.__esModule) return mod;
|
|
46
|
+
var result = {};
|
|
47
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
48
|
+
__setModuleDefault(result, mod);
|
|
49
|
+
return result;
|
|
50
|
+
};
|
|
51
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
+
exports.Accordion = exports.withAnimated = void 0;
|
|
53
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
+
var react_1 = require("react");
|
|
55
|
+
var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
56
|
+
var use_layout_1 = require("../../hooks/use-layout");
|
|
57
|
+
var styled_native_1 = require("../../styled.native");
|
|
58
|
+
var Heading4_1 = require("../Heading4");
|
|
59
|
+
var Group_1 = require("./Group");
|
|
60
|
+
var Icon_1 = require("./Icon");
|
|
61
|
+
var styles_1 = require("./styles");
|
|
62
|
+
function withAnimated(WrappedComponent) {
|
|
63
|
+
var displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
64
|
+
// eslint-disable-next-line react/prefer-stateless-function
|
|
65
|
+
var WithAnimated = /** @class */ (function (_super) {
|
|
66
|
+
__extends(WithAnimated, _super);
|
|
67
|
+
function WithAnimated() {
|
|
68
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
69
|
+
}
|
|
70
|
+
WithAnimated.prototype.render = function () {
|
|
71
|
+
return (0, jsx_runtime_1.jsx)(WrappedComponent, __assign({}, this.props));
|
|
72
|
+
};
|
|
73
|
+
WithAnimated.displayName = "WithAnimated(".concat(displayName, ")");
|
|
74
|
+
return WithAnimated;
|
|
75
|
+
}(react_1.Component));
|
|
76
|
+
return react_native_reanimated_1.default.createAnimatedComponent(WithAnimated);
|
|
23
77
|
}
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
()
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
l(() => {
|
|
41
|
-
"worklet";
|
|
42
|
-
o && e && (t.value = e);
|
|
43
|
-
})();
|
|
44
|
-
}, [e, o, t]), S(() => {
|
|
45
|
-
l(() => {
|
|
46
|
-
"worklet";
|
|
47
|
-
e && (t.value = e);
|
|
48
|
-
})();
|
|
49
|
-
}, [e, t]);
|
|
50
|
-
const m = L(() => z(r ? 1 : 0)), y = v(() => ({
|
|
51
|
-
height: t.value * m.value + 1
|
|
52
|
-
})), I = D(() => {
|
|
53
|
-
c == null || c(!r), t.value === 0 && l(() => {
|
|
54
|
-
"worklet";
|
|
55
|
-
t.value = e;
|
|
56
|
-
})(), b((T) => !T);
|
|
57
|
-
}, [e, r, t]), N = d(
|
|
58
|
-
() => [{ overflow: "hidden" }, y],
|
|
59
|
-
[y]
|
|
60
|
-
), O = v(() => ({
|
|
61
|
-
color: B(
|
|
62
|
-
m.value,
|
|
63
|
-
[0, 1],
|
|
64
|
-
[u.message.branded, u.message.base]
|
|
65
|
-
)
|
|
66
|
-
}));
|
|
67
|
-
return /* @__PURE__ */ g($, { first: a, last: i, isExpanded: r, children: [
|
|
68
|
-
/* @__PURE__ */ g(
|
|
69
|
-
q,
|
|
70
|
-
{
|
|
71
|
-
accessibilityState: { expanded: r },
|
|
72
|
-
onPress: I,
|
|
73
|
-
testID: "accordionTitle",
|
|
74
|
-
children: [
|
|
75
|
-
/* @__PURE__ */ s(
|
|
76
|
-
H,
|
|
77
|
-
{
|
|
78
|
-
style: [
|
|
79
|
-
O,
|
|
80
|
-
{
|
|
81
|
-
paddingTop: p.space[1],
|
|
82
|
-
paddingRight: p.space[3],
|
|
83
|
-
marginTop: 0,
|
|
84
|
-
marginBottom: 0,
|
|
85
|
-
flexShrink: 1
|
|
86
|
-
}
|
|
87
|
-
],
|
|
88
|
-
children: n
|
|
78
|
+
exports.withAnimated = withAnimated;
|
|
79
|
+
var Accordion = function (_a) {
|
|
80
|
+
var _b = _a.expanded, expanded = _b === void 0 ? false : _b, first = _a.first, last = _a.last, title = _a.title, children = _a.children, onToggle = _a.onToggle;
|
|
81
|
+
var _c = (0, react_1.useContext)(styled_native_1.ThemeContext), core = _c.core, semantic = _c.semantic;
|
|
82
|
+
var Header = (0, react_1.useContext)(Group_1.AccordionGroupContext).Header;
|
|
83
|
+
var AccordionHeading = Header !== null && Header !== void 0 ? Header : Heading4_1.Heading4;
|
|
84
|
+
var AnimatedHeading = (0, react_1.useMemo)(function () { return withAnimated(AccordionHeading); }, [AccordionHeading]);
|
|
85
|
+
var _d = (0, use_layout_1.useLayout)(0), layout = _d[0], onLayout = _d[1];
|
|
86
|
+
var _e = (0, react_1.useState)(expanded), open = _e[0], setOpen = _e[1];
|
|
87
|
+
var handleHeightContent = (0, react_1.useMemo)(function () { return layout.height || 100; }, [layout.height]);
|
|
88
|
+
var size = (0, react_native_reanimated_1.useSharedValue)(handleHeightContent);
|
|
89
|
+
(0, react_1.useEffect)(function () {
|
|
90
|
+
(0, react_native_reanimated_1.runOnUI)(function () {
|
|
91
|
+
'worklet';
|
|
92
|
+
if (expanded && handleHeightContent) {
|
|
93
|
+
size.value = handleHeightContent;
|
|
89
94
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
95
|
+
})();
|
|
96
|
+
}, [handleHeightContent, expanded, size]);
|
|
97
|
+
(0, react_1.useEffect)(function () {
|
|
98
|
+
(0, react_native_reanimated_1.runOnUI)(function () {
|
|
99
|
+
'worklet';
|
|
100
|
+
if (handleHeightContent) {
|
|
101
|
+
size.value = handleHeightContent;
|
|
102
|
+
}
|
|
103
|
+
})();
|
|
104
|
+
}, [handleHeightContent, size]);
|
|
105
|
+
var progress = (0, react_native_reanimated_1.useDerivedValue)(function () { return (0, react_native_reanimated_1.withTiming)(open ? 1 : 0); });
|
|
106
|
+
var style = (0, react_native_reanimated_1.useAnimatedStyle)(function () { return ({
|
|
107
|
+
height: size.value * progress.value + 1,
|
|
108
|
+
}); }, [progress, size]);
|
|
109
|
+
var toggleOpen = (0, react_1.useCallback)(function () {
|
|
110
|
+
onToggle === null || onToggle === void 0 ? void 0 : onToggle(!open);
|
|
111
|
+
if (size.value === 0) {
|
|
112
|
+
(0, react_native_reanimated_1.runOnUI)(function () {
|
|
113
|
+
'worklet';
|
|
114
|
+
size.value = handleHeightContent;
|
|
115
|
+
})();
|
|
116
|
+
}
|
|
117
|
+
setOpen(function (o) { return !o; });
|
|
118
|
+
}, [handleHeightContent, open, size]);
|
|
119
|
+
var containerAnimatedStyle = (0, react_1.useMemo)(function () { return [{ overflow: 'hidden' }, style]; }, [style]);
|
|
120
|
+
var headerStyle = (0, react_native_reanimated_1.useAnimatedStyle)(function () { return ({
|
|
121
|
+
color: (0, react_native_reanimated_1.interpolateColor)(progress.value, [0, 1], [semantic.message.branded, semantic.message.base]),
|
|
122
|
+
}); }, [progress]);
|
|
123
|
+
return ((0, jsx_runtime_1.jsxs)(styles_1.StyledAccordion, { first: first, last: last, isExpanded: open, children: [(0, jsx_runtime_1.jsxs)(styles_1.StyledAccordionHeader, { accessibilityState: { expanded: open }, onPress: toggleOpen, testID: "accordionTitle", children: [(0, jsx_runtime_1.jsx)(AnimatedHeading, { style: [
|
|
124
|
+
headerStyle,
|
|
125
|
+
{
|
|
126
|
+
paddingTop: core.space[1],
|
|
127
|
+
paddingRight: core.space[3],
|
|
128
|
+
marginTop: 0,
|
|
129
|
+
marginBottom: 0,
|
|
130
|
+
flexShrink: 1,
|
|
131
|
+
},
|
|
132
|
+
], children: title }), (0, jsx_runtime_1.jsx)(Icon_1.AccordionIcon, { animationTiming: progress })] }), (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: containerAnimatedStyle, children: (0, jsx_runtime_1.jsx)(styles_1.StyledContainer, { onLayout: onLayout, children: children }) })] }));
|
|
101
133
|
};
|
|
134
|
+
exports.Accordion = Accordion;
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
})
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
p as AccordionGroupContext
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccordionGroup = exports.AccordionGroupContext = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var react_native_1 = require("react-native");
|
|
7
|
+
exports.AccordionGroupContext = (0, react_1.createContext)({
|
|
8
|
+
Header: undefined,
|
|
9
|
+
});
|
|
10
|
+
var AccordionGroup = function (_a) {
|
|
11
|
+
var children = _a.children, headingComponent = _a.headingComponent;
|
|
12
|
+
var childCount = react_1.Children.count(children);
|
|
13
|
+
return ((0, jsx_runtime_1.jsx)(exports.AccordionGroupContext.Provider, { value: { Header: headingComponent }, children: (0, jsx_runtime_1.jsx)(react_native_1.View, { children: react_1.Children.map(children, function (child, i) {
|
|
14
|
+
return (0, react_1.isValidElement)(child)
|
|
15
|
+
? (0, react_1.cloneElement)(child, {
|
|
16
|
+
first: i === 0,
|
|
17
|
+
last: i === childCount - 1,
|
|
18
|
+
})
|
|
19
|
+
: child;
|
|
20
|
+
}) }) }));
|
|
22
21
|
};
|
|
22
|
+
exports.AccordionGroup = AccordionGroup;
|
|
@@ -1,61 +1,62 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
function g({
|
|
8
|
-
animationTiming: e
|
|
9
|
-
}) {
|
|
10
|
-
const { core: d, semantic: t } = f(v), l = s(() => ({
|
|
11
|
-
backgroundColor: h(
|
|
12
|
-
e.value,
|
|
13
|
-
[0, 1],
|
|
14
|
-
[t.surface.cutout, t.message.branded]
|
|
15
|
-
),
|
|
16
|
-
height: 36 - e.value * 4,
|
|
17
|
-
margin: 2 * e.value,
|
|
18
|
-
transform: [{ rotateZ: e.value * -c + "deg" }]
|
|
19
|
-
})), u = s(() => ({
|
|
20
|
-
transform: [{ rotateZ: e.value * c + "deg" }]
|
|
21
|
-
})), m = a(() => ({
|
|
22
|
-
opacity: 1 - e.value
|
|
23
|
-
})), p = a(() => ({
|
|
24
|
-
opacity: e.value
|
|
25
|
-
}));
|
|
26
|
-
return /* @__PURE__ */ o(
|
|
27
|
-
r.View,
|
|
28
|
-
{
|
|
29
|
-
style: [
|
|
30
|
-
{
|
|
31
|
-
backgroundColor: t.surface.cutout,
|
|
32
|
-
aspectRatio: 1,
|
|
33
|
-
alignItems: "center",
|
|
34
|
-
justifyContent: "center"
|
|
35
|
-
},
|
|
36
|
-
l
|
|
37
|
-
],
|
|
38
|
-
children: /* @__PURE__ */ o(r.View, { style: u, children: /* @__PURE__ */ i(V, { width: "16", height: "16", viewBox: "0 0 16 16", children: [
|
|
39
|
-
/* @__PURE__ */ o(
|
|
40
|
-
n,
|
|
41
|
-
{
|
|
42
|
-
animatedProps: m,
|
|
43
|
-
d: "M9 9H16V6.99H9V0H6.99V7H0V9.01H7V16.01H9.01V9.01L9 9Z",
|
|
44
|
-
fill: t.message.secondary
|
|
45
|
-
}
|
|
46
|
-
),
|
|
47
|
-
/* @__PURE__ */ o(
|
|
48
|
-
n,
|
|
49
|
-
{
|
|
50
|
-
animatedProps: p,
|
|
51
|
-
d: "M16.3826 9.66663V7.66663H0.462646V9.66663H16.3826Z",
|
|
52
|
-
fill: d.color.brand.white
|
|
53
|
-
}
|
|
54
|
-
)
|
|
55
|
-
] }) })
|
|
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]; } };
|
|
56
7
|
}
|
|
57
|
-
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
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 __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
61
24
|
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
exports.AccordionIcon = void 0;
|
|
27
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
28
|
+
var react_1 = require("react");
|
|
29
|
+
var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
30
|
+
var react_native_svg_1 = require("react-native-svg");
|
|
31
|
+
var styled_native_1 = require("../../styled.native");
|
|
32
|
+
var OVO_LOGO_ANGLE = 105;
|
|
33
|
+
var AnimatedPath = react_native_reanimated_1.default.createAnimatedComponent(react_native_svg_1.Path);
|
|
34
|
+
function AccordionIcon(_a) {
|
|
35
|
+
var animationTiming = _a.animationTiming;
|
|
36
|
+
var _b = (0, react_1.useContext)(styled_native_1.ThemeContext), core = _b.core, semantic = _b.semantic;
|
|
37
|
+
var outerAnimatedStyles = (0, react_native_reanimated_1.useAnimatedStyle)(function () { return ({
|
|
38
|
+
backgroundColor: (0, react_native_reanimated_1.interpolateColor)(animationTiming.value, [0, 1], [semantic.surface.cutout, semantic.message.branded]),
|
|
39
|
+
height: 36 - animationTiming.value * 4,
|
|
40
|
+
margin: 2 * animationTiming.value,
|
|
41
|
+
transform: [{ rotateZ: animationTiming.value * -OVO_LOGO_ANGLE + 'deg' }],
|
|
42
|
+
}); }, [animationTiming]);
|
|
43
|
+
var innerAnimatedStyles = (0, react_native_reanimated_1.useAnimatedStyle)(function () { return ({
|
|
44
|
+
transform: [{ rotateZ: animationTiming.value * OVO_LOGO_ANGLE + 'deg' }],
|
|
45
|
+
}); }, [animationTiming]);
|
|
46
|
+
var plusAnimatedProps = (0, react_native_reanimated_1.useAnimatedProps)(function () { return ({
|
|
47
|
+
opacity: 1 - animationTiming.value,
|
|
48
|
+
}); }, [animationTiming]);
|
|
49
|
+
var minusAnimatedProps = (0, react_native_reanimated_1.useAnimatedProps)(function () { return ({
|
|
50
|
+
opacity: animationTiming.value,
|
|
51
|
+
}); }, [animationTiming]);
|
|
52
|
+
return ((0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: [
|
|
53
|
+
{
|
|
54
|
+
backgroundColor: semantic.surface.cutout,
|
|
55
|
+
aspectRatio: 1,
|
|
56
|
+
alignItems: 'center',
|
|
57
|
+
justifyContent: 'center',
|
|
58
|
+
},
|
|
59
|
+
outerAnimatedStyles,
|
|
60
|
+
], children: (0, jsx_runtime_1.jsx)(react_native_reanimated_1.default.View, { style: innerAnimatedStyles, children: (0, jsx_runtime_1.jsxs)(react_native_svg_1.Svg, { width: "16", height: "16", viewBox: "0 0 16 16", children: [(0, jsx_runtime_1.jsx)(AnimatedPath, { animatedProps: plusAnimatedProps, d: "M9 9H16V6.99H9V0H6.99V7H0V9.01H7V16.01H9.01V9.01L9 9Z", fill: semantic.message.secondary }), (0, jsx_runtime_1.jsx)(AnimatedPath, { animatedProps: minusAnimatedProps, d: "M16.3826 9.66663V7.66663H0.462646V9.66663H16.3826Z", fill: core.color.brand.white })] }) }) }));
|
|
61
|
+
}
|
|
62
|
+
exports.AccordionIcon = AccordionIcon;
|
|
@@ -1,19 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
import "../../utils-HsZygzDh.js";
|
|
11
|
-
import "../../hooks/use-breakpoint.js";
|
|
12
|
-
import "react-native";
|
|
13
|
-
import "./styles.js";
|
|
14
|
-
import "react-native-svg";
|
|
15
|
-
export {
|
|
16
|
-
u as Accordion,
|
|
17
|
-
I as AccordionGroup,
|
|
18
|
-
b as AccordionIcon
|
|
19
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AccordionIcon = exports.AccordionGroup = exports.Accordion = void 0;
|
|
4
|
+
var Accordion_1 = require("./Accordion");
|
|
5
|
+
Object.defineProperty(exports, "Accordion", { enumerable: true, get: function () { return Accordion_1.Accordion; } });
|
|
6
|
+
var Group_1 = require("./Group");
|
|
7
|
+
Object.defineProperty(exports, "AccordionGroup", { enumerable: true, get: function () { return Group_1.AccordionGroup; } });
|
|
8
|
+
var Icon_1 = require("./Icon");
|
|
9
|
+
Object.defineProperty(exports, "AccordionIcon", { enumerable: true, get: function () { return Icon_1.AccordionIcon; } });
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare const StyledAccordion: import("styled-components").StyledComponent<
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export declare const StyledAccordion: import("styled-components").StyledComponent<import("react").ComponentClass<import("react-native-reanimated").AnimateProps<import("react-native").ViewProps>, any>, {
|
|
3
3
|
core: {
|
|
4
4
|
color: {
|
|
5
5
|
brand: {
|
|
@@ -358,6 +358,8 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
358
358
|
surfaceFocused: string;
|
|
359
359
|
outlineFocused: string;
|
|
360
360
|
backgroundFocused: string;
|
|
361
|
+
messageInverted: string;
|
|
362
|
+
surfaceInverted: string;
|
|
361
363
|
};
|
|
362
364
|
secondary: {
|
|
363
365
|
message: string;
|
|
@@ -368,6 +370,8 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
368
370
|
surfaceFocused: string;
|
|
369
371
|
outlineFocused: string;
|
|
370
372
|
backgroundFocused: string;
|
|
373
|
+
messageInverted: string;
|
|
374
|
+
surfaceInverted: string;
|
|
371
375
|
};
|
|
372
376
|
destructive: {
|
|
373
377
|
message: string;
|
|
@@ -378,6 +382,8 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
378
382
|
surfaceFocused: string;
|
|
379
383
|
outlineFocused: string;
|
|
380
384
|
backgroundFocused: string;
|
|
385
|
+
messageInverted: string;
|
|
386
|
+
surfaceInverted: string;
|
|
381
387
|
};
|
|
382
388
|
};
|
|
383
389
|
heading1: {
|
|
@@ -841,6 +847,8 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
841
847
|
surfaceFocused: string;
|
|
842
848
|
outlineFocused: string;
|
|
843
849
|
backgroundFocused: string;
|
|
850
|
+
messageInverted: string;
|
|
851
|
+
surfaceInverted: string;
|
|
844
852
|
};
|
|
845
853
|
secondary: {
|
|
846
854
|
message: string;
|
|
@@ -851,6 +859,8 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
851
859
|
surfaceFocused: string;
|
|
852
860
|
outlineFocused: string;
|
|
853
861
|
backgroundFocused: string;
|
|
862
|
+
messageInverted: string;
|
|
863
|
+
surfaceInverted: string;
|
|
854
864
|
};
|
|
855
865
|
destructive: {
|
|
856
866
|
message: string;
|
|
@@ -861,6 +871,8 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
861
871
|
surfaceFocused: string;
|
|
862
872
|
outlineFocused: string;
|
|
863
873
|
backgroundFocused: string;
|
|
874
|
+
messageInverted: string;
|
|
875
|
+
surfaceInverted: string;
|
|
864
876
|
};
|
|
865
877
|
};
|
|
866
878
|
heading1: {
|
|
@@ -1320,6 +1332,8 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1320
1332
|
surfaceFocused: string;
|
|
1321
1333
|
outlineFocused: string;
|
|
1322
1334
|
backgroundFocused: string;
|
|
1335
|
+
messageInverted: string;
|
|
1336
|
+
surfaceInverted: string;
|
|
1323
1337
|
};
|
|
1324
1338
|
secondary: {
|
|
1325
1339
|
message: string;
|
|
@@ -1330,6 +1344,8 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1330
1344
|
surfaceFocused: string;
|
|
1331
1345
|
outlineFocused: string;
|
|
1332
1346
|
backgroundFocused: string;
|
|
1347
|
+
messageInverted: string;
|
|
1348
|
+
surfaceInverted: string;
|
|
1333
1349
|
};
|
|
1334
1350
|
destructive: {
|
|
1335
1351
|
message: string;
|
|
@@ -1340,6 +1356,8 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1340
1356
|
surfaceFocused: string;
|
|
1341
1357
|
outlineFocused: string;
|
|
1342
1358
|
backgroundFocused: string;
|
|
1359
|
+
messageInverted: string;
|
|
1360
|
+
surfaceInverted: string;
|
|
1343
1361
|
};
|
|
1344
1362
|
};
|
|
1345
1363
|
heading1: {
|
|
@@ -1,51 +1,60 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const g = i(n.View)(
|
|
6
|
-
({ theme: { semantic: t, core: d }, first: r, last: e, isExpanded: s }) => a`
|
|
7
|
-
width: 100%;
|
|
8
|
-
border-width: ${o(d.borderWidth.small)};
|
|
9
|
-
border-color: ${t.border.differentiated};
|
|
10
|
-
border-bottom-width: 0;
|
|
11
|
-
background-color: ${s ? d.color.brand.white : "transparent"};
|
|
12
|
-
transition: background-color ${d.transition.fast};
|
|
13
|
-
|
|
14
|
-
${r ? {
|
|
15
|
-
borderTopLeftRadius: d.radius.small,
|
|
16
|
-
borderTopRightRadius: d.radius.small
|
|
17
|
-
} : null}
|
|
18
|
-
|
|
19
|
-
${e ? {
|
|
20
|
-
borderBottomLeftRadius: d.radius.small,
|
|
21
|
-
borderBottomRightRadius: d.radius.small,
|
|
22
|
-
borderBottomWidth: d.borderWidth.small
|
|
23
|
-
} : null}
|
|
24
|
-
`
|
|
25
|
-
), h = i.TouchableOpacity(
|
|
26
|
-
({ theme: { core: t } }) => a`
|
|
27
|
-
padding-top: ${o(t.space[5])};
|
|
28
|
-
padding-left: ${o(t.space[3])};
|
|
29
|
-
padding-right: 18px;
|
|
30
|
-
padding-bottom: 18px;
|
|
31
|
-
flex-direction: row;
|
|
32
|
-
align-items: flex-start;
|
|
33
|
-
justify-content: space-between;
|
|
34
|
-
`
|
|
35
|
-
), u = i.View(
|
|
36
|
-
({ theme: { core: t } }) => a`
|
|
37
|
-
position: absolute;
|
|
38
|
-
top: 0;
|
|
39
|
-
left: 0;
|
|
40
|
-
right: 0;
|
|
41
|
-
padding-top: 0;
|
|
42
|
-
padding-right: ${o(t.space[12])};
|
|
43
|
-
padding-bottom: ${o(t.space[6])};
|
|
44
|
-
padding-left: ${o(t.space[3])};
|
|
45
|
-
`
|
|
46
|
-
);
|
|
47
|
-
export {
|
|
48
|
-
g as StyledAccordion,
|
|
49
|
-
h as StyledAccordionHeader,
|
|
50
|
-
u as StyledContainer
|
|
1
|
+
"use strict";
|
|
2
|
+
var __makeTemplateObject = (this && this.__makeTemplateObject) || function (cooked, raw) {
|
|
3
|
+
if (Object.defineProperty) { Object.defineProperty(cooked, "raw", { value: raw }); } else { cooked.raw = raw; }
|
|
4
|
+
return cooked;
|
|
51
5
|
};
|
|
6
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
7
|
+
if (k2 === undefined) k2 = k;
|
|
8
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
9
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
10
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
11
|
+
}
|
|
12
|
+
Object.defineProperty(o, k2, desc);
|
|
13
|
+
}) : (function(o, m, k, k2) {
|
|
14
|
+
if (k2 === undefined) k2 = k;
|
|
15
|
+
o[k2] = m[k];
|
|
16
|
+
}));
|
|
17
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
18
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
19
|
+
}) : function(o, v) {
|
|
20
|
+
o["default"] = v;
|
|
21
|
+
});
|
|
22
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
23
|
+
if (mod && mod.__esModule) return mod;
|
|
24
|
+
var result = {};
|
|
25
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
26
|
+
__setModuleDefault(result, mod);
|
|
27
|
+
return result;
|
|
28
|
+
};
|
|
29
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
30
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
31
|
+
};
|
|
32
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
33
|
+
exports.StyledContainer = exports.StyledAccordionHeader = exports.StyledAccordion = void 0;
|
|
34
|
+
var element_core_1 = require("@ovotech/element-core");
|
|
35
|
+
var react_native_reanimated_1 = __importDefault(require("react-native-reanimated"));
|
|
36
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
37
|
+
exports.StyledAccordion = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(function (_a) {
|
|
38
|
+
var _b = _a.theme, semantic = _b.semantic, core = _b.core, first = _a.first, last = _a.last, isExpanded = _a.isExpanded;
|
|
39
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "], ["\n width: 100%;\n border-width: ", ";\n border-color: ", ";\n border-bottom-width: 0;\n background-color: ", ";\n transition: background-color ", ";\n\n ", "\n\n ", "\n "])), (0, element_core_1.numToPx)(core.borderWidth.small), semantic.border.differentiated, isExpanded ? core.color.brand.white : 'transparent', core.transition.fast, first
|
|
40
|
+
? {
|
|
41
|
+
borderTopLeftRadius: core.radius.small,
|
|
42
|
+
borderTopRightRadius: core.radius.small,
|
|
43
|
+
}
|
|
44
|
+
: null, last
|
|
45
|
+
? {
|
|
46
|
+
borderBottomLeftRadius: core.radius.small,
|
|
47
|
+
borderBottomRightRadius: core.radius.small,
|
|
48
|
+
borderBottomWidth: core.borderWidth.small,
|
|
49
|
+
}
|
|
50
|
+
: null);
|
|
51
|
+
});
|
|
52
|
+
exports.StyledAccordionHeader = styled_native_1.default.TouchableOpacity(function (_a) {
|
|
53
|
+
var core = _a.theme.core;
|
|
54
|
+
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "], ["\n padding-top: ", ";\n padding-left: ", ";\n padding-right: 18px;\n padding-bottom: 18px;\n flex-direction: row;\n align-items: flex-start;\n justify-content: space-between;\n "])), (0, element_core_1.numToPx)(core.space[5]), (0, element_core_1.numToPx)(core.space[3]));
|
|
55
|
+
});
|
|
56
|
+
exports.StyledContainer = styled_native_1.default.View(function (_a) {
|
|
57
|
+
var core = _a.theme.core;
|
|
58
|
+
return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "], ["\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n padding-top: 0;\n padding-right: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n "])), (0, element_core_1.numToPx)(core.space[12]), (0, element_core_1.numToPx)(core.space[6]), (0, element_core_1.numToPx)(core.space[3]));
|
|
59
|
+
});
|
|
60
|
+
var templateObject_1, templateObject_2, templateObject_3;
|