@ovotech/element-native 4.4.8 → 4.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/Accordion/Accordion.d.ts +2 -1
- package/dist/components/Accordion/Accordion.js +47 -116
- package/dist/components/Accordion/Group.d.ts +1 -1
- package/dist/components/Accordion/Group.js +12 -19
- package/dist/components/Accordion/Icon.js +20 -48
- package/dist/components/Accordion/index.js +3 -9
- package/dist/components/Accordion/styles.d.ts +95 -96
- package/dist/components/Accordion/styles.js +44 -59
- package/dist/components/Accordion/types.js +1 -2
- package/dist/components/ActionCard/ActionCard.d.ts +1 -1
- package/dist/components/ActionCard/ActionCard.js +59 -87
- package/dist/components/ActionCard/CloseIconShape.d.ts +1 -1
- package/dist/components/ActionCard/CloseIconShape.js +7 -41
- package/dist/components/ActionCard/IndicatorIconShape.d.ts +1 -1
- package/dist/components/ActionCard/IndicatorIconShape.js +7 -41
- package/dist/components/ActionCard/index.js +1 -5
- package/dist/components/ActionList/ActionList.d.ts +9 -7
- package/dist/components/ActionList/ActionList.js +22 -56
- package/dist/components/ActionList/index.js +1 -6
- package/dist/components/ActionList/styled.d.ts +228 -229
- package/dist/components/ActionList/styled.js +52 -60
- package/dist/components/Badge/Badge.d.ts +34 -34
- package/dist/components/Badge/Badge.js +27 -72
- package/dist/components/Badge/index.js +1 -5
- package/dist/components/CTAButton/CTAButton.d.ts +9 -11
- package/dist/components/CTAButton/CTAButton.js +62 -100
- package/dist/components/CTAButton/index.js +1 -8
- package/dist/components/CTALink/CTALink.d.ts +5 -8
- package/dist/components/CTALink/CTALink.js +6 -23
- package/dist/components/CTALink/index.js +1 -7
- package/dist/components/Card/Card.js +14 -43
- package/dist/components/Card/index.js +1 -5
- package/dist/components/Checkbox/Checkbox.d.ts +9 -7
- package/dist/components/Checkbox/Checkbox.js +50 -72
- package/dist/components/Checkbox/CheckboxField.js +16 -44
- package/dist/components/Checkbox/index.js +2 -7
- package/dist/components/CurrencyField/CurrencyField.d.ts +4 -11
- package/dist/components/CurrencyField/CurrencyField.js +5 -32
- package/dist/components/CurrencyField/index.js +1 -5
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +4 -11
- package/dist/components/CurrencyInput/CurrencyInput.js +10 -36
- package/dist/components/CurrencyInput/index.js +1 -5
- package/dist/components/DataTable/DataTable.d.ts +1 -3
- package/dist/components/DataTable/DataTable.js +17 -44
- package/dist/components/DataTable/TableRow.js +15 -31
- package/dist/components/DataTable/index.js +3 -21
- package/dist/components/DataTable/styles.d.ts +404 -404
- package/dist/components/DataTable/styles.js +97 -84
- package/dist/components/DataTable/types.d.ts +1 -1
- package/dist/components/DataTable/types.js +1 -2
- package/dist/components/DateField/DateField.d.ts +8 -6
- package/dist/components/DateField/DateField.js +61 -82
- package/dist/components/DateField/index.js +1 -5
- package/dist/components/DescriptionList/DescriptionList.js +12 -44
- package/dist/components/DescriptionList/index.js +1 -6
- package/dist/components/DescriptionList/styled.d.ts +31 -31
- package/dist/components/DescriptionList/styled.js +34 -85
- package/dist/components/Disclosure/Disclosure.d.ts +574 -6
- package/dist/components/Disclosure/Disclosure.js +34 -79
- package/dist/components/Disclosure/index.js +1 -17
- package/dist/components/Display0/Display0.js +19 -69
- package/dist/components/Display0/index.js +1 -5
- package/dist/components/Display1/Display1.js +19 -69
- package/dist/components/Display1/index.js +1 -5
- package/dist/components/Display2/Display2.js +19 -69
- package/dist/components/Display2/index.js +1 -5
- package/dist/components/Display3/Display3.js +19 -69
- package/dist/components/Display3/index.js +1 -5
- package/dist/components/Divider/Divider.js +11 -41
- package/dist/components/Divider/index.js +1 -5
- package/dist/components/Em/Em.d.ts +31 -31
- package/dist/components/Em/Em.js +6 -13
- package/dist/components/Em/index.js +1 -5
- package/dist/components/EmailField/EmailField.d.ts +4 -9
- package/dist/components/EmailField/EmailField.js +5 -32
- package/dist/components/EmailField/index.js +1 -5
- package/dist/components/EmailInput/EmailInput.d.ts +2 -9
- package/dist/components/EmailInput/EmailInput.js +4 -19
- package/dist/components/EmailInput/index.js +1 -5
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +1 -1
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +14 -43
- package/dist/components/ErrorSummaryNotification/index.js +1 -5
- package/dist/components/ErrorText/ErrorText.d.ts +33 -35
- package/dist/components/ErrorText/ErrorText.js +15 -40
- package/dist/components/ErrorText/index.js +1 -5
- package/dist/components/Field/Field.d.ts +9 -8
- package/dist/components/Field/Field.js +25 -48
- package/dist/components/Field/index.js +1 -17
- package/dist/components/FilterSelect/FilterSelect.js +55 -76
- package/dist/components/FilterSelect/index.js +1 -5
- package/dist/components/FormGroup/FormGroup.js +8 -42
- package/dist/components/FormGroup/index.js +1 -5
- package/dist/components/Grid/Col.d.ts +33 -34
- package/dist/components/Grid/Col.js +24 -48
- package/dist/components/Grid/Row.d.ts +6 -572
- package/dist/components/Grid/Row.js +34 -72
- package/dist/components/Grid/index.d.ts +1 -1
- package/dist/components/Grid/index.js +2 -7
- package/dist/components/Heading1/Heading1.js +19 -69
- package/dist/components/Heading1/index.js +1 -5
- package/dist/components/Heading2/Heading2.js +19 -69
- package/dist/components/Heading2/index.js +1 -5
- package/dist/components/Heading3/Heading3.js +19 -69
- package/dist/components/Heading3/index.js +1 -5
- package/dist/components/Heading4/Heading4.js +19 -69
- package/dist/components/Heading4/index.js +1 -5
- package/dist/components/HintText/HintText.d.ts +33 -35
- package/dist/components/HintText/HintText.js +15 -40
- package/dist/components/HintText/index.js +1 -5
- package/dist/components/Icon/Icon.d.ts +0 -1
- package/dist/components/Icon/Icon.js +10 -37
- package/dist/components/Icon/index.js +1 -5
- package/dist/components/Input/Input.d.ts +3 -8
- package/dist/components/Input/Input.js +64 -86
- package/dist/components/Label/Label.d.ts +7 -6
- package/dist/components/Label/Label.js +10 -51
- package/dist/components/Label/index.js +1 -5
- package/dist/components/LabelText/LabelText.d.ts +33 -35
- package/dist/components/LabelText/LabelText.js +13 -40
- package/dist/components/LabelText/index.js +1 -5
- package/dist/components/Lead/Lead.d.ts +7 -6
- package/dist/components/Lead/Lead.js +12 -53
- package/dist/components/Lead/index.js +1 -5
- package/dist/components/LineThrough/LineThrough.d.ts +31 -31
- package/dist/components/LineThrough/LineThrough.js +4 -13
- package/dist/components/LineThrough/index.js +1 -5
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +21 -29
- package/dist/components/List/index.js +1 -7
- package/dist/components/List/styled.d.ts +126 -127
- package/dist/components/List/styled.js +32 -45
- package/dist/components/Margin/Margin.d.ts +31 -31
- package/dist/components/Margin/Margin.js +34 -50
- package/dist/components/Margin/index.js +1 -5
- package/dist/components/NavHeader/IconButton.js +10 -18
- package/dist/components/NavHeader/NavHeader.js +21 -49
- package/dist/components/NavHeader/NavHeader.styles.d.ts +283 -284
- package/dist/components/NavHeader/NavHeader.styles.js +82 -78
- package/dist/components/NavHeader/index.js +1 -5
- package/dist/components/Notification/Notification.d.ts +79 -77
- package/dist/components/Notification/Notification.js +69 -92
- package/dist/components/Notification/index.js +1 -9
- package/dist/components/NumberField/NumberField.d.ts +4 -9
- package/dist/components/NumberField/NumberField.js +5 -32
- package/dist/components/NumberField/index.js +1 -5
- package/dist/components/NumberInput/NumberInput.d.ts +2 -9
- package/dist/components/NumberInput/NumberInput.js +4 -19
- package/dist/components/NumberInput/index.js +1 -5
- package/dist/components/P/P.d.ts +8 -7
- package/dist/components/P/P.js +13 -54
- package/dist/components/P/index.js +1 -5
- package/dist/components/PasswordField/PasswordField.d.ts +6 -11
- package/dist/components/PasswordField/PasswordField.js +5 -32
- package/dist/components/PasswordField/index.js +1 -5
- package/dist/components/PasswordInput/PasswordInput.d.ts +5 -11
- package/dist/components/PasswordInput/PasswordInput.js +7 -34
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +31 -32
- package/dist/components/PasswordInput/PasswordInput.styled.js +13 -37
- package/dist/components/PasswordInput/PasswordVisibilityToggle.js +14 -20
- package/dist/components/PasswordInput/index.js +1 -5
- package/dist/components/PhoneField/PhoneField.d.ts +4 -9
- package/dist/components/PhoneField/PhoneField.js +5 -32
- package/dist/components/PhoneField/index.js +1 -5
- package/dist/components/PhoneInput/PhoneInput.d.ts +2 -9
- package/dist/components/PhoneInput/PhoneInput.js +3 -18
- package/dist/components/PhoneInput/index.js +1 -5
- package/dist/components/ProductCarousel/NavigationDots.js +32 -61
- package/dist/components/ProductCarousel/ProductCarousel.d.ts +1 -0
- package/dist/components/ProductCarousel/ProductCarousel.js +54 -101
- package/dist/components/ProductCarousel/anchor-point.d.ts +198 -1
- package/dist/components/ProductCarousel/anchor-point.js +11 -21
- package/dist/components/ProductCarousel/index.js +1 -5
- package/dist/components/Radio/Radio.d.ts +10 -8
- package/dist/components/Radio/Radio.js +45 -61
- package/dist/components/Radio/RadioField.js +20 -48
- package/dist/components/Radio/index.js +2 -7
- package/dist/components/RadioCard/RadioCard.d.ts +11 -8
- package/dist/components/RadioCard/RadioCard.js +50 -65
- package/dist/components/RadioCard/index.js +1 -5
- package/dist/components/SegmentedControls/SegmentedControls.d.ts +1 -0
- package/dist/components/SegmentedControls/SegmentedControls.js +37 -89
- package/dist/components/SegmentedControls/components/SegmentButton.d.ts +1 -0
- package/dist/components/SegmentedControls/components/SegmentButton.js +41 -82
- package/dist/components/SegmentedControls/index.js +2 -5
- package/dist/components/SelectField/Select.d.ts +31 -31
- package/dist/components/SelectField/Select.js +84 -87
- package/dist/components/SelectField/SelectField.js +4 -33
- package/dist/components/SelectField/index.js +1 -5
- package/dist/components/SkeletonAnimation/SkeletonAnimation.d.ts +2 -2
- package/dist/components/SkeletonAnimation/SkeletonAnimation.js +12 -17
- package/dist/components/SkeletonAnimation/index.js +1 -5
- package/dist/components/SkeletonCTA/SkeletonCTA.js +11 -42
- package/dist/components/SkeletonCTA/index.js +1 -5
- package/dist/components/SkeletonCircle/SkeletonCircle.js +12 -45
- package/dist/components/SkeletonCircle/index.js +1 -5
- package/dist/components/SkeletonHeading/SkeletonHeading.js +9 -41
- package/dist/components/SkeletonHeading/index.js +1 -5
- package/dist/components/SkeletonText/SkeletonText.js +22 -47
- package/dist/components/SkeletonText/index.js +1 -5
- package/dist/components/Small/Small.d.ts +33 -35
- package/dist/components/Small/Small.js +8 -39
- package/dist/components/Small/index.js +1 -5
- package/dist/components/Spinner/Spinner.js +35 -63
- package/dist/components/Spinner/index.js +1 -5
- package/dist/components/Stack/Stack.js +15 -47
- package/dist/components/Stack/index.js +1 -5
- package/dist/components/Stretch/Stretch.js +11 -54
- package/dist/components/Stretch/index.js +1 -17
- package/dist/components/Strong/Strong.d.ts +31 -31
- package/dist/components/Strong/Strong.js +4 -11
- package/dist/components/Strong/index.js +1 -5
- package/dist/components/SubLabelText/SubLabelText.d.ts +33 -35
- package/dist/components/SubLabelText/SubLabelText.js +13 -40
- package/dist/components/SubLabelText/index.js +1 -5
- package/dist/components/Tabs/Tab.d.ts +582 -10
- package/dist/components/Tabs/Tab.js +64 -76
- package/dist/components/Tabs/TabList.d.ts +0 -1
- package/dist/components/Tabs/TabList.js +20 -77
- package/dist/components/Tabs/TabPanel.js +12 -64
- package/dist/components/Tabs/Tabs.js +32 -89
- package/dist/components/Tabs/index.js +4 -11
- package/dist/components/TextField/TextField.d.ts +4 -9
- package/dist/components/TextField/TextField.js +5 -32
- package/dist/components/TextField/index.js +1 -5
- package/dist/components/TextGroup/TextGroup.js +16 -39
- package/dist/components/TextGroup/index.js +1 -5
- package/dist/components/TextInput/TextInput.d.ts +6 -8
- package/dist/components/TextInput/TextInput.js +4 -19
- package/dist/components/TextInput/index.js +1 -5
- package/dist/components/TextLink/TextLink.d.ts +6 -6
- package/dist/components/TextLink/TextLink.js +20 -74
- package/dist/components/TextLink/index.js +1 -5
- package/dist/components/TextareaField/TextareaField.d.ts +4 -11
- package/dist/components/TextareaField/TextareaField.js +5 -32
- package/dist/components/TextareaField/index.js +1 -5
- package/dist/components/TextareaInput/TextareaInput.d.ts +1 -11
- package/dist/components/TextareaInput/TextareaInput.js +13 -67
- package/dist/components/TextareaInput/index.js +1 -5
- package/dist/components/Toast/Toast.d.ts +5 -5
- package/dist/components/Toast/Toast.js +88 -131
- package/dist/components/Toast/index.js +1 -6
- package/dist/components/Toggle/Toggle.d.ts +10 -7
- package/dist/components/Toggle/Toggle.js +18 -49
- package/dist/components/Toggle/index.js +1 -5
- package/dist/components/Toggle/styles.d.ts +130 -130
- package/dist/components/Toggle/styles.js +32 -24
- package/dist/components/index.js +67 -83
- package/dist/esm/components/Accordion/Accordion.js +35 -76
- package/dist/esm/components/Accordion/Group.js +9 -12
- package/dist/esm/components/Accordion/Icon.js +12 -13
- package/dist/esm/components/Accordion/styles.js +42 -28
- package/dist/esm/components/ActionCard/ActionCard.js +48 -46
- package/dist/esm/components/ActionCard/CloseIconShape.js +4 -8
- package/dist/esm/components/ActionCard/IndicatorIconShape.js +4 -8
- package/dist/esm/components/ActionList/ActionList.js +17 -47
- package/dist/esm/components/ActionList/styled.js +48 -30
- package/dist/esm/components/Badge/Badge.js +24 -42
- package/dist/esm/components/CTAButton/CTAButton.js +56 -65
- package/dist/esm/components/CTALink/CTALink.js +3 -15
- package/dist/esm/components/Card/Card.js +10 -32
- package/dist/esm/components/Checkbox/Checkbox.js +39 -55
- package/dist/esm/components/Checkbox/CheckboxField.js +7 -32
- package/dist/esm/components/CurrencyField/CurrencyField.js +3 -27
- package/dist/esm/components/CurrencyInput/CurrencyInput.js +7 -30
- package/dist/esm/components/DataTable/DataTable.js +8 -32
- package/dist/esm/components/DataTable/TableRow.js +8 -20
- package/dist/esm/components/DataTable/styles.js +95 -56
- package/dist/esm/components/DateField/DateField.js +49 -44
- package/dist/esm/components/DescriptionList/DescriptionList.js +7 -35
- package/dist/esm/components/DescriptionList/styled.js +29 -52
- package/dist/esm/components/Disclosure/Disclosure.js +29 -48
- package/dist/esm/components/Display0/Display0.js +14 -37
- package/dist/esm/components/Display1/Display1.js +14 -37
- package/dist/esm/components/Display2/Display2.js +14 -37
- package/dist/esm/components/Display3/Display3.js +14 -37
- package/dist/esm/components/Divider/Divider.js +8 -11
- package/dist/esm/components/Em/Em.js +5 -6
- package/dist/esm/components/EmailField/EmailField.js +3 -27
- package/dist/esm/components/EmailInput/EmailInput.js +1 -13
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +6 -32
- package/dist/esm/components/ErrorText/ErrorText.js +11 -10
- package/dist/esm/components/Field/Field.js +16 -36
- package/dist/esm/components/FilterSelect/FilterSelect.js +43 -37
- package/dist/esm/components/FormGroup/FormGroup.js +4 -32
- package/dist/esm/components/Grid/Col.js +20 -18
- package/dist/esm/components/Grid/Row.js +29 -41
- package/dist/esm/components/Grid/index.js +1 -1
- package/dist/esm/components/Heading1/Heading1.js +14 -37
- package/dist/esm/components/Heading2/Heading2.js +14 -37
- package/dist/esm/components/Heading3/Heading3.js +14 -37
- package/dist/esm/components/Heading4/Heading4.js +14 -37
- package/dist/esm/components/HintText/HintText.js +11 -10
- package/dist/esm/components/Icon/Icon.js +6 -29
- package/dist/esm/components/Input/Input.js +58 -54
- package/dist/esm/components/Label/Label.js +7 -22
- package/dist/esm/components/LabelText/LabelText.js +9 -10
- package/dist/esm/components/Lead/Lead.js +9 -24
- package/dist/esm/components/LineThrough/LineThrough.js +3 -6
- package/dist/esm/components/List/List.js +11 -14
- package/dist/esm/components/List/styled.js +30 -17
- package/dist/esm/components/Margin/Margin.js +26 -36
- package/dist/esm/components/NavHeader/IconButton.js +5 -9
- package/dist/esm/components/NavHeader/NavHeader.js +10 -11
- package/dist/esm/components/NavHeader/NavHeader.styles.js +79 -46
- package/dist/esm/components/Notification/Notification.js +63 -60
- package/dist/esm/components/NumberField/NumberField.js +3 -27
- package/dist/esm/components/NumberInput/NumberInput.js +1 -13
- package/dist/esm/components/P/P.js +10 -25
- package/dist/esm/components/PasswordField/PasswordField.js +3 -27
- package/dist/esm/components/PasswordInput/PasswordInput.js +4 -28
- package/dist/esm/components/PasswordInput/PasswordInput.styled.js +10 -8
- package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +9 -10
- package/dist/esm/components/PhoneField/PhoneField.js +3 -27
- package/dist/esm/components/PhoneInput/PhoneInput.js +1 -13
- package/dist/esm/components/ProductCarousel/NavigationDots.js +28 -30
- package/dist/esm/components/ProductCarousel/ProductCarousel.js +40 -57
- package/dist/esm/components/ProductCarousel/anchor-point.js +11 -17
- package/dist/esm/components/Radio/Radio.js +38 -48
- package/dist/esm/components/Radio/RadioField.js +10 -35
- package/dist/esm/components/RadioCard/RadioCard.js +44 -53
- package/dist/esm/components/SegmentedControls/SegmentedControls.js +33 -58
- package/dist/esm/components/SegmentedControls/components/SegmentButton.js +33 -44
- package/dist/esm/components/SelectField/Select.js +76 -49
- package/dist/esm/components/SelectField/SelectField.js +1 -26
- package/dist/esm/components/SkeletonAnimation/SkeletonAnimation.js +4 -5
- package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +6 -30
- package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +8 -34
- package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +5 -30
- package/dist/esm/components/SkeletonText/SkeletonText.js +15 -33
- package/dist/esm/components/Small/Small.js +5 -10
- package/dist/esm/components/Spinner/Spinner.js +30 -31
- package/dist/esm/components/Stack/Stack.js +7 -33
- package/dist/esm/components/Stretch/Stretch.js +8 -24
- package/dist/esm/components/Strong/Strong.js +3 -4
- package/dist/esm/components/SubLabelText/SubLabelText.js +9 -10
- package/dist/esm/components/Tabs/Tab.js +60 -46
- package/dist/esm/components/Tabs/TabList.js +15 -45
- package/dist/esm/components/Tabs/TabPanel.js +9 -34
- package/dist/esm/components/Tabs/Tabs.js +24 -54
- package/dist/esm/components/TextField/TextField.js +3 -27
- package/dist/esm/components/TextGroup/TextGroup.js +11 -30
- package/dist/esm/components/TextInput/TextInput.js +1 -13
- package/dist/esm/components/TextLink/TextLink.js +14 -42
- package/dist/esm/components/TextareaField/TextareaField.js +3 -27
- package/dist/esm/components/TextareaInput/TextareaInput.js +8 -36
- package/dist/esm/components/Toast/Toast.js +67 -82
- package/dist/esm/components/Toggle/Toggle.js +13 -41
- package/dist/esm/components/Toggle/styles.js +29 -15
- package/dist/esm/hooks/use-breakpoint.js +3 -3
- package/dist/esm/hooks/use-full-width.js +5 -6
- package/dist/esm/hooks/use-layout.js +6 -6
- package/dist/esm/providers/IconsProvider.js +9 -18
- package/dist/esm/providers/icons/Address.js +1 -12
- package/dist/esm/providers/icons/Advice.js +1 -12
- package/dist/esm/providers/icons/Archive.js +1 -12
- package/dist/esm/providers/icons/ArrowDown.js +1 -12
- package/dist/esm/providers/icons/ArrowLeft.js +1 -12
- package/dist/esm/providers/icons/ArrowRight.js +1 -12
- package/dist/esm/providers/icons/ArrowUp.js +1 -12
- package/dist/esm/providers/icons/Award.js +1 -12
- package/dist/esm/providers/icons/Battery.js +1 -12
- package/dist/esm/providers/icons/Cal.js +1 -12
- package/dist/esm/providers/icons/CalBook.js +1 -12
- package/dist/esm/providers/icons/CaretArrowDown.js +1 -12
- package/dist/esm/providers/icons/CaretArrowLeft.js +1 -12
- package/dist/esm/providers/icons/CaretArrowRight.js +1 -12
- package/dist/esm/providers/icons/CaretArrowUp.js +1 -12
- package/dist/esm/providers/icons/CaretDown.js +1 -12
- package/dist/esm/providers/icons/CaretLeft.js +1 -12
- package/dist/esm/providers/icons/CaretRight.js +1 -12
- package/dist/esm/providers/icons/CaretUp.js +1 -12
- package/dist/esm/providers/icons/Chart.js +1 -12
- package/dist/esm/providers/icons/ChartFilled.js +1 -12
- package/dist/esm/providers/icons/Check.js +1 -12
- package/dist/esm/providers/icons/CheckCircle.js +1 -12
- package/dist/esm/providers/icons/ChevronDown.js +1 -12
- package/dist/esm/providers/icons/ChevronLeft.js +1 -12
- package/dist/esm/providers/icons/ChevronLeftSmall.js +1 -12
- package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +1 -12
- package/dist/esm/providers/icons/ChevronRight.js +1 -12
- package/dist/esm/providers/icons/ChevronRightSmall.js +1 -12
- package/dist/esm/providers/icons/ChevronRightSmallLast.js +1 -12
- package/dist/esm/providers/icons/ChevronUp.js +1 -12
- package/dist/esm/providers/icons/Circle.js +1 -12
- package/dist/esm/providers/icons/CloseCircle.js +1 -12
- package/dist/esm/providers/icons/Cross.js +1 -12
- package/dist/esm/providers/icons/Doc.js +1 -12
- package/dist/esm/providers/icons/Dollar.js +1 -12
- package/dist/esm/providers/icons/Download.js +1 -12
- package/dist/esm/providers/icons/Eco.js +1 -12
- package/dist/esm/providers/icons/EcoHome.js +1 -12
- package/dist/esm/providers/icons/Edit.js +1 -12
- package/dist/esm/providers/icons/ElectricCar.js +1 -12
- package/dist/esm/providers/icons/ElectricHome.js +1 -12
- package/dist/esm/providers/icons/Electricity.js +1 -12
- package/dist/esm/providers/icons/EnergyAdvice.js +1 -12
- package/dist/esm/providers/icons/Equals.js +1 -12
- package/dist/esm/providers/icons/Euro.js +1 -12
- package/dist/esm/providers/icons/Gas.js +1 -12
- package/dist/esm/providers/icons/GlobeAddress.js +1 -12
- package/dist/esm/providers/icons/Help.js +1 -12
- package/dist/esm/providers/icons/HelpFilled.js +1 -12
- package/dist/esm/providers/icons/Hide.js +1 -12
- package/dist/esm/providers/icons/Home.js +1 -12
- package/dist/esm/providers/icons/HomeFilled.js +1 -12
- package/dist/esm/providers/icons/HydroPower.js +1 -12
- package/dist/esm/providers/icons/Info.js +1 -12
- package/dist/esm/providers/icons/Link.js +1 -12
- package/dist/esm/providers/icons/Logo.js +1 -12
- package/dist/esm/providers/icons/Mail.js +1 -12
- package/dist/esm/providers/icons/MailOpen.js +1 -12
- package/dist/esm/providers/icons/Menu.js +1 -12
- package/dist/esm/providers/icons/Message.js +1 -12
- package/dist/esm/providers/icons/MessageFilled.js +1 -12
- package/dist/esm/providers/icons/Minus.js +1 -12
- package/dist/esm/providers/icons/Mobile.js +1 -12
- package/dist/esm/providers/icons/NewWindow.js +1 -12
- package/dist/esm/providers/icons/PaymentCard.js +1 -12
- package/dist/esm/providers/icons/PaymentCardFilled.js +1 -12
- package/dist/esm/providers/icons/Phone.js +1 -12
- package/dist/esm/providers/icons/Plus.js +1 -12
- package/dist/esm/providers/icons/Pound.js +1 -12
- package/dist/esm/providers/icons/Pricing.js +1 -12
- package/dist/esm/providers/icons/PricingFilled.js +1 -12
- package/dist/esm/providers/icons/Search.js +1 -12
- package/dist/esm/providers/icons/Security.js +1 -12
- package/dist/esm/providers/icons/Shop.js +1 -12
- package/dist/esm/providers/icons/ShopFilled.js +1 -12
- package/dist/esm/providers/icons/Show.js +1 -12
- package/dist/esm/providers/icons/SmartHome.js +1 -12
- package/dist/esm/providers/icons/SmartMeter.js +1 -12
- package/dist/esm/providers/icons/Solar.js +1 -12
- package/dist/esm/providers/icons/Star.js +1 -12
- package/dist/esm/providers/icons/StarFilled.js +1 -12
- package/dist/esm/providers/icons/Sun.js +1 -12
- package/dist/esm/providers/icons/Torch.js +1 -12
- package/dist/esm/providers/icons/Trees.js +1 -12
- package/dist/esm/providers/icons/Tune.js +1 -12
- package/dist/esm/providers/icons/User.js +1 -12
- package/dist/esm/providers/icons/UserFilled.js +1 -12
- package/dist/esm/providers/icons/Wallet.js +1 -12
- package/dist/esm/providers/icons/WalletFilled.js +1 -12
- package/dist/esm/providers/icons/WarmHome.js +1 -12
- package/dist/esm/providers/icons/Warning.js +1 -12
- package/dist/esm/providers/icons/WebAddress.js +1 -12
- package/dist/esm/providers/icons/WindPower.js +1 -12
- package/dist/esm/styled.native.js +1 -1
- package/dist/esm/utils/utils.js +23 -50
- package/dist/hooks/index.js +2 -18
- package/dist/hooks/use-breakpoint.js +6 -10
- package/dist/hooks/use-full-width.js +7 -12
- package/dist/hooks/use-layout.js +7 -11
- package/dist/index.js +3 -19
- package/dist/providers/IconsProvider.js +107 -121
- package/dist/providers/icons/Address.js +3 -41
- package/dist/providers/icons/Advice.js +3 -41
- package/dist/providers/icons/Archive.js +3 -41
- package/dist/providers/icons/ArrowDown.js +3 -41
- package/dist/providers/icons/ArrowLeft.js +3 -41
- package/dist/providers/icons/ArrowRight.js +3 -41
- package/dist/providers/icons/ArrowUp.js +3 -41
- package/dist/providers/icons/Award.js +3 -41
- package/dist/providers/icons/Battery.js +3 -41
- package/dist/providers/icons/Cal.js +3 -41
- package/dist/providers/icons/CalBook.js +3 -41
- package/dist/providers/icons/CaretArrowDown.js +3 -41
- package/dist/providers/icons/CaretArrowLeft.js +3 -41
- package/dist/providers/icons/CaretArrowRight.js +3 -41
- package/dist/providers/icons/CaretArrowUp.js +3 -41
- package/dist/providers/icons/CaretDown.js +3 -41
- package/dist/providers/icons/CaretLeft.js +3 -41
- package/dist/providers/icons/CaretRight.js +3 -41
- package/dist/providers/icons/CaretUp.js +3 -41
- package/dist/providers/icons/Chart.js +3 -41
- package/dist/providers/icons/ChartFilled.js +3 -41
- package/dist/providers/icons/Check.js +3 -41
- package/dist/providers/icons/CheckCircle.js +3 -41
- package/dist/providers/icons/ChevronDown.js +3 -41
- package/dist/providers/icons/ChevronLeft.js +3 -41
- package/dist/providers/icons/ChevronLeftSmall.js +3 -41
- package/dist/providers/icons/ChevronLeftSmallFirst.js +3 -41
- package/dist/providers/icons/ChevronRight.js +3 -41
- package/dist/providers/icons/ChevronRightSmall.js +3 -41
- package/dist/providers/icons/ChevronRightSmallLast.js +3 -41
- package/dist/providers/icons/ChevronUp.js +3 -41
- package/dist/providers/icons/Circle.js +3 -41
- package/dist/providers/icons/CloseCircle.js +3 -41
- package/dist/providers/icons/Cross.js +3 -41
- package/dist/providers/icons/Doc.js +3 -41
- package/dist/providers/icons/Dollar.js +3 -41
- package/dist/providers/icons/Download.js +3 -41
- package/dist/providers/icons/Eco.js +3 -41
- package/dist/providers/icons/EcoHome.js +3 -41
- package/dist/providers/icons/Edit.js +3 -41
- package/dist/providers/icons/ElectricCar.js +3 -41
- package/dist/providers/icons/ElectricHome.js +3 -41
- package/dist/providers/icons/Electricity.js +3 -41
- package/dist/providers/icons/EnergyAdvice.js +3 -41
- package/dist/providers/icons/Equals.js +3 -41
- package/dist/providers/icons/Euro.js +3 -41
- package/dist/providers/icons/Gas.js +3 -41
- package/dist/providers/icons/GlobeAddress.js +3 -41
- package/dist/providers/icons/Help.js +3 -41
- package/dist/providers/icons/HelpFilled.js +3 -41
- package/dist/providers/icons/Hide.js +3 -41
- package/dist/providers/icons/Home.js +3 -41
- package/dist/providers/icons/HomeFilled.js +3 -41
- package/dist/providers/icons/HydroPower.js +3 -41
- package/dist/providers/icons/Info.js +3 -41
- package/dist/providers/icons/Link.js +3 -41
- package/dist/providers/icons/Logo.js +3 -41
- package/dist/providers/icons/Mail.js +3 -41
- package/dist/providers/icons/MailOpen.js +3 -41
- package/dist/providers/icons/Menu.js +3 -41
- package/dist/providers/icons/Message.js +3 -41
- package/dist/providers/icons/MessageFilled.js +3 -41
- package/dist/providers/icons/Minus.js +3 -41
- package/dist/providers/icons/Mobile.js +3 -41
- package/dist/providers/icons/NewWindow.js +3 -41
- package/dist/providers/icons/PaymentCard.js +3 -41
- package/dist/providers/icons/PaymentCardFilled.js +3 -41
- package/dist/providers/icons/Phone.js +3 -41
- package/dist/providers/icons/Plus.js +3 -41
- package/dist/providers/icons/Pound.js +3 -41
- package/dist/providers/icons/Pricing.js +3 -41
- package/dist/providers/icons/PricingFilled.js +3 -41
- package/dist/providers/icons/Search.js +3 -41
- package/dist/providers/icons/Security.js +3 -41
- package/dist/providers/icons/Shop.js +3 -41
- package/dist/providers/icons/ShopFilled.js +3 -41
- package/dist/providers/icons/Show.js +3 -41
- package/dist/providers/icons/SmartHome.js +3 -41
- package/dist/providers/icons/SmartMeter.js +3 -41
- package/dist/providers/icons/Solar.js +3 -41
- package/dist/providers/icons/Star.js +3 -41
- package/dist/providers/icons/StarFilled.js +3 -41
- package/dist/providers/icons/Sun.js +3 -41
- package/dist/providers/icons/Torch.js +3 -41
- package/dist/providers/icons/Trees.js +3 -41
- package/dist/providers/icons/Tune.js +3 -41
- package/dist/providers/icons/User.js +3 -41
- package/dist/providers/icons/UserFilled.js +3 -41
- package/dist/providers/icons/Wallet.js +3 -41
- package/dist/providers/icons/WalletFilled.js +3 -41
- package/dist/providers/icons/WarmHome.js +3 -41
- package/dist/providers/icons/Warning.js +3 -41
- package/dist/providers/icons/WebAddress.js +3 -41
- package/dist/providers/icons/WindPower.js +3 -41
- package/dist/providers/icons/index.js +93 -109
- package/dist/providers/index.js +2 -18
- package/dist/providers/types.js +1 -2
- package/dist/styled.native.d.ts +186 -188
- package/dist/styled.native.js +4 -33
- package/dist/theme/index.js +1 -17
- package/dist/utils/index.js +1 -17
- package/dist/utils/utils.d.ts +3 -3
- package/dist/utils/utils.js +27 -64
- package/package.json +37 -34
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ComponentType } from 'react';
|
|
2
|
+
import { AnimatedProps } from 'react-native-reanimated';
|
|
2
3
|
import { AccordionProps } from './types';
|
|
3
|
-
export declare function withAnimated<T extends object>(WrappedComponent: ComponentType<T>):
|
|
4
|
+
export declare function withAnimated<T extends object>(WrappedComponent: ComponentType<T>): ComponentType<AnimatedProps<T>>;
|
|
4
5
|
export declare const Accordion: ({ expanded, first, last, title, children, onToggle, }: AccordionProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,126 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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]; } };
|
|
33
|
-
}
|
|
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';
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Component, useCallback, useContext, useEffect, useMemo, useState, } from 'react';
|
|
3
|
+
import Animated, { interpolateColor, useAnimatedStyle, useDerivedValue, useSharedValue, withTiming, } from 'react-native-reanimated';
|
|
4
|
+
import { useLayout } from '../../hooks/use-layout';
|
|
5
|
+
import { useTheme } from '../../styled.native';
|
|
6
|
+
import { Heading4 } from '../Heading4';
|
|
7
|
+
import { AccordionGroupContext } from './Group';
|
|
8
|
+
import { AccordionIcon } from './Icon';
|
|
9
|
+
import { StyledAccordion, StyledAccordionHeader, StyledContainer, } from './styles';
|
|
10
|
+
export function withAnimated(WrappedComponent) {
|
|
11
|
+
const displayName = WrappedComponent.displayName || WrappedComponent.name || 'Component';
|
|
64
12
|
// eslint-disable-next-line react/prefer-stateless-function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
13
|
+
class WithAnimated extends Component {
|
|
14
|
+
render() {
|
|
15
|
+
return _jsx(WrappedComponent, { ...this.props });
|
|
69
16
|
}
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
WithAnimated.displayName = "WithAnimated(".concat(displayName, ")");
|
|
74
|
-
return WithAnimated;
|
|
75
|
-
}(react_1.Component));
|
|
76
|
-
return react_native_reanimated_1.default.createAnimatedComponent(WithAnimated);
|
|
17
|
+
}
|
|
18
|
+
WithAnimated.displayName = `WithAnimated(${displayName})`;
|
|
19
|
+
return Animated.createAnimatedComponent(WithAnimated);
|
|
77
20
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
'worklet';
|
|
92
|
-
if (expanded && handleHeightContent) {
|
|
93
|
-
size.value = handleHeightContent;
|
|
94
|
-
}
|
|
95
|
-
})();
|
|
21
|
+
export const Accordion = ({ expanded = false, first, last, title, children, onToggle, }) => {
|
|
22
|
+
const { core, semantic } = useTheme();
|
|
23
|
+
const { Header } = useContext(AccordionGroupContext);
|
|
24
|
+
const AccordionHeading = Header ?? Heading4;
|
|
25
|
+
const AnimatedHeading = useMemo(() => withAnimated(AccordionHeading), [AccordionHeading]);
|
|
26
|
+
const [layout, onLayout] = useLayout(0);
|
|
27
|
+
const [open, setOpen] = useState(expanded);
|
|
28
|
+
const handleHeightContent = useMemo(() => layout.height || 100, [layout.height]);
|
|
29
|
+
const size = useSharedValue(handleHeightContent);
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
if (expanded && handleHeightContent) {
|
|
32
|
+
size.value = handleHeightContent;
|
|
33
|
+
}
|
|
96
34
|
}, [handleHeightContent, expanded, size]);
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
size.value = handleHeightContent;
|
|
102
|
-
}
|
|
103
|
-
})();
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (handleHeightContent) {
|
|
37
|
+
size.value = handleHeightContent;
|
|
38
|
+
}
|
|
104
39
|
}, [handleHeightContent, size]);
|
|
105
|
-
|
|
106
|
-
|
|
40
|
+
const progress = useDerivedValue(() => withTiming(open ? 1 : 0));
|
|
41
|
+
const style = useAnimatedStyle(() => ({
|
|
107
42
|
height: size.value * progress.value + 1,
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
onToggle
|
|
43
|
+
}), [progress, size]);
|
|
44
|
+
const toggleOpen = useCallback(() => {
|
|
45
|
+
onToggle?.(!open);
|
|
111
46
|
if (size.value === 0) {
|
|
112
|
-
|
|
113
|
-
'worklet';
|
|
114
|
-
size.value = handleHeightContent;
|
|
115
|
-
})();
|
|
47
|
+
size.value = handleHeightContent;
|
|
116
48
|
}
|
|
117
|
-
setOpen(
|
|
49
|
+
setOpen(o => !o);
|
|
118
50
|
}, [handleHeightContent, open, size]);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
color:
|
|
122
|
-
})
|
|
123
|
-
return ((
|
|
51
|
+
const containerAnimatedStyle = useMemo(() => [{ overflow: 'hidden' }, style], [style]);
|
|
52
|
+
const headerStyle = useAnimatedStyle(() => ({
|
|
53
|
+
color: interpolateColor(progress.value, [0, 1], [semantic.message.branded, semantic.message.base]),
|
|
54
|
+
}), [progress]);
|
|
55
|
+
return (_jsxs(StyledAccordion, { first: first, last: last, isExpanded: open, children: [_jsxs(StyledAccordionHeader, { accessibilityState: { expanded: open }, onPress: toggleOpen, testID: "accordionTitle", children: [_jsx(AnimatedHeading, { style: [
|
|
124
56
|
headerStyle,
|
|
125
57
|
{
|
|
126
58
|
paddingTop: core.space[1],
|
|
@@ -129,6 +61,5 @@ var Accordion = function (_a) {
|
|
|
129
61
|
marginBottom: 0,
|
|
130
62
|
flexShrink: 1,
|
|
131
63
|
},
|
|
132
|
-
], children: title }), (
|
|
64
|
+
], children: title }), _jsx(AccordionIcon, { animationTiming: progress })] }), _jsx(Animated.View, { style: containerAnimatedStyle, children: _jsx(StyledContainer, { onLayout: onLayout, children: children }) })] }));
|
|
133
65
|
};
|
|
134
|
-
exports.Accordion = Accordion;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PropsWithChildren } from 'react';
|
|
2
2
|
import { AccordionGroupProps } from './types';
|
|
3
3
|
export declare const AccordionGroupContext: import("react").Context<{
|
|
4
|
-
Header?: AccordionGroupProps[
|
|
4
|
+
Header?: AccordionGroupProps["headingComponent"];
|
|
5
5
|
}>;
|
|
6
6
|
export declare const AccordionGroup: ({ children, headingComponent, }: PropsWithChildren<AccordionGroupProps>) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,22 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var react_1 = require("react");
|
|
6
|
-
var react_native_1 = require("react-native");
|
|
7
|
-
exports.AccordionGroupContext = (0, react_1.createContext)({
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { Children, cloneElement, createContext, isValidElement, } from 'react';
|
|
3
|
+
import { View } from 'react-native';
|
|
4
|
+
export const AccordionGroupContext = createContext({
|
|
8
5
|
Header: undefined,
|
|
9
6
|
});
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
})
|
|
19
|
-
: child;
|
|
20
|
-
}) }) }));
|
|
7
|
+
export const AccordionGroup = ({ children, headingComponent, }) => {
|
|
8
|
+
const childCount = Children.count(children);
|
|
9
|
+
return (_jsx(AccordionGroupContext.Provider, { value: { Header: headingComponent }, children: _jsx(View, { children: Children.map(children, (child, i) => isValidElement(child)
|
|
10
|
+
? cloneElement(child, {
|
|
11
|
+
first: i === 0,
|
|
12
|
+
last: i === childCount - 1,
|
|
13
|
+
})
|
|
14
|
+
: child) }) }));
|
|
21
15
|
};
|
|
22
|
-
exports.AccordionGroup = AccordionGroup;
|
|
@@ -1,55 +1,28 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
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;
|
|
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]),
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useContext } from 'react';
|
|
3
|
+
import Animated, { interpolateColor, useAnimatedProps, useAnimatedStyle, } from 'react-native-reanimated';
|
|
4
|
+
import { Path, Svg } from 'react-native-svg';
|
|
5
|
+
import { ThemeContext } from '../../styled.native';
|
|
6
|
+
const OVO_LOGO_ANGLE = 105;
|
|
7
|
+
const AnimatedPath = Animated.createAnimatedComponent(Path);
|
|
8
|
+
export function AccordionIcon({ animationTiming, }) {
|
|
9
|
+
const { core, semantic } = useContext(ThemeContext);
|
|
10
|
+
const outerAnimatedStyles = useAnimatedStyle(() => ({
|
|
11
|
+
backgroundColor: interpolateColor(animationTiming.value, [0, 1], [semantic.surface.cutout, semantic.message.branded]),
|
|
39
12
|
height: 36 - animationTiming.value * 4,
|
|
40
13
|
margin: 2 * animationTiming.value,
|
|
41
14
|
transform: [{ rotateZ: animationTiming.value * -OVO_LOGO_ANGLE + 'deg' }],
|
|
42
|
-
})
|
|
43
|
-
|
|
15
|
+
}), [animationTiming]);
|
|
16
|
+
const innerAnimatedStyles = useAnimatedStyle(() => ({
|
|
44
17
|
transform: [{ rotateZ: animationTiming.value * OVO_LOGO_ANGLE + 'deg' }],
|
|
45
|
-
})
|
|
46
|
-
|
|
18
|
+
}), [animationTiming]);
|
|
19
|
+
const plusAnimatedProps = useAnimatedProps(() => ({
|
|
47
20
|
opacity: 1 - animationTiming.value,
|
|
48
|
-
})
|
|
49
|
-
|
|
21
|
+
}), [animationTiming]);
|
|
22
|
+
const minusAnimatedProps = useAnimatedProps(() => ({
|
|
50
23
|
opacity: animationTiming.value,
|
|
51
|
-
})
|
|
52
|
-
return ((
|
|
24
|
+
}), [animationTiming]);
|
|
25
|
+
return (_jsx(Animated.View, { style: [
|
|
53
26
|
{
|
|
54
27
|
backgroundColor: semantic.surface.cutout,
|
|
55
28
|
aspectRatio: 1,
|
|
@@ -57,6 +30,5 @@ function AccordionIcon(_a) {
|
|
|
57
30
|
justifyContent: 'center',
|
|
58
31
|
},
|
|
59
32
|
outerAnimatedStyles,
|
|
60
|
-
], children: (
|
|
33
|
+
], children: _jsx(Animated.View, { style: innerAnimatedStyles, children: _jsxs(Svg, { width: "16", height: "16", viewBox: "0 0 16 16", children: [_jsx(AnimatedPath, { animatedProps: plusAnimatedProps, d: "M9 9H16V6.99H9V0H6.99V7H0V9.01H7V16.01H9.01V9.01L9 9Z", fill: semantic.message.secondary }), _jsx(AnimatedPath, { animatedProps: minusAnimatedProps, d: "M16.3826 9.66663V7.66663H0.462646V9.66663H16.3826Z", fill: core.color.brand.white })] }) }) }));
|
|
61
34
|
}
|
|
62
|
-
exports.AccordionIcon = AccordionIcon;
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
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
|
+
export { Accordion } from './Accordion';
|
|
2
|
+
export { AccordionGroup } from './Group';
|
|
3
|
+
export { AccordionIcon } from './Icon';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
/// <reference types="react" />
|
|
2
1
|
export declare const StyledAccordion: import("styled-components").StyledComponent<import("react").ComponentClass<import("react-native-reanimated").AnimateProps<import("react-native").ViewProps>, any>, {
|
|
3
2
|
core: {
|
|
4
3
|
color: {
|
|
@@ -216,9 +215,9 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
216
215
|
large: number;
|
|
217
216
|
};
|
|
218
217
|
customMediaQuery: {
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
218
|
+
"small-and-up": number;
|
|
219
|
+
"medium-and-up": number;
|
|
220
|
+
"large-and-up": number;
|
|
222
221
|
};
|
|
223
222
|
opacity: {
|
|
224
223
|
solid: number;
|
|
@@ -232,22 +231,22 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
232
231
|
max: number;
|
|
233
232
|
};
|
|
234
233
|
space: {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
234
|
+
"0": number;
|
|
235
|
+
"1": number;
|
|
236
|
+
"2": number;
|
|
237
|
+
"3": number;
|
|
238
|
+
"4": number;
|
|
239
|
+
"5": number;
|
|
240
|
+
"6": number;
|
|
241
|
+
"7": number;
|
|
242
|
+
"8": number;
|
|
243
|
+
"9": number;
|
|
244
|
+
"10": number;
|
|
245
|
+
"11": number;
|
|
246
|
+
"12": number;
|
|
247
|
+
"13": number;
|
|
248
|
+
"14": number;
|
|
249
|
+
"15": number;
|
|
251
250
|
};
|
|
252
251
|
transition: {
|
|
253
252
|
slow: number;
|
|
@@ -303,22 +302,22 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
303
302
|
};
|
|
304
303
|
data: {
|
|
305
304
|
branded: {
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
305
|
+
"1": string;
|
|
306
|
+
"2": string;
|
|
307
|
+
"3": string;
|
|
308
|
+
"4": string;
|
|
310
309
|
};
|
|
311
310
|
electric: {
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
311
|
+
"1": string;
|
|
312
|
+
"2": string;
|
|
313
|
+
"3": string;
|
|
314
|
+
"4": string;
|
|
316
315
|
};
|
|
317
316
|
gas: {
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
317
|
+
"1": string;
|
|
318
|
+
"2": string;
|
|
319
|
+
"3": string;
|
|
320
|
+
"4": string;
|
|
322
321
|
};
|
|
323
322
|
};
|
|
324
323
|
focus: {
|
|
@@ -564,8 +563,8 @@ export declare const StyledAccordion: import("styled-components").StyledComponen
|
|
|
564
563
|
};
|
|
565
564
|
};
|
|
566
565
|
}, {
|
|
567
|
-
first?: boolean
|
|
568
|
-
last?: boolean
|
|
566
|
+
first?: boolean;
|
|
567
|
+
last?: boolean;
|
|
569
568
|
isExpanded: boolean;
|
|
570
569
|
}, never>;
|
|
571
570
|
export declare const StyledAccordionHeader: import("styled-components").StyledComponent<typeof import("react-native").TouchableOpacity, {
|
|
@@ -785,9 +784,9 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
785
784
|
large: number;
|
|
786
785
|
};
|
|
787
786
|
customMediaQuery: {
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
787
|
+
"small-and-up": number;
|
|
788
|
+
"medium-and-up": number;
|
|
789
|
+
"large-and-up": number;
|
|
791
790
|
};
|
|
792
791
|
opacity: {
|
|
793
792
|
solid: number;
|
|
@@ -801,22 +800,22 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
801
800
|
max: number;
|
|
802
801
|
};
|
|
803
802
|
space: {
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
803
|
+
"0": number;
|
|
804
|
+
"1": number;
|
|
805
|
+
"2": number;
|
|
806
|
+
"3": number;
|
|
807
|
+
"4": number;
|
|
808
|
+
"5": number;
|
|
809
|
+
"6": number;
|
|
810
|
+
"7": number;
|
|
811
|
+
"8": number;
|
|
812
|
+
"9": number;
|
|
813
|
+
"10": number;
|
|
814
|
+
"11": number;
|
|
815
|
+
"12": number;
|
|
816
|
+
"13": number;
|
|
817
|
+
"14": number;
|
|
818
|
+
"15": number;
|
|
820
819
|
};
|
|
821
820
|
transition: {
|
|
822
821
|
slow: number;
|
|
@@ -872,22 +871,22 @@ export declare const StyledAccordionHeader: import("styled-components").StyledCo
|
|
|
872
871
|
};
|
|
873
872
|
data: {
|
|
874
873
|
branded: {
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
874
|
+
"1": string;
|
|
875
|
+
"2": string;
|
|
876
|
+
"3": string;
|
|
877
|
+
"4": string;
|
|
879
878
|
};
|
|
880
879
|
electric: {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
880
|
+
"1": string;
|
|
881
|
+
"2": string;
|
|
882
|
+
"3": string;
|
|
883
|
+
"4": string;
|
|
885
884
|
};
|
|
886
885
|
gas: {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
886
|
+
"1": string;
|
|
887
|
+
"2": string;
|
|
888
|
+
"3": string;
|
|
889
|
+
"4": string;
|
|
891
890
|
};
|
|
892
891
|
};
|
|
893
892
|
focus: {
|
|
@@ -1350,9 +1349,9 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1350
1349
|
large: number;
|
|
1351
1350
|
};
|
|
1352
1351
|
customMediaQuery: {
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1352
|
+
"small-and-up": number;
|
|
1353
|
+
"medium-and-up": number;
|
|
1354
|
+
"large-and-up": number;
|
|
1356
1355
|
};
|
|
1357
1356
|
opacity: {
|
|
1358
1357
|
solid: number;
|
|
@@ -1366,22 +1365,22 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1366
1365
|
max: number;
|
|
1367
1366
|
};
|
|
1368
1367
|
space: {
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1368
|
+
"0": number;
|
|
1369
|
+
"1": number;
|
|
1370
|
+
"2": number;
|
|
1371
|
+
"3": number;
|
|
1372
|
+
"4": number;
|
|
1373
|
+
"5": number;
|
|
1374
|
+
"6": number;
|
|
1375
|
+
"7": number;
|
|
1376
|
+
"8": number;
|
|
1377
|
+
"9": number;
|
|
1378
|
+
"10": number;
|
|
1379
|
+
"11": number;
|
|
1380
|
+
"12": number;
|
|
1381
|
+
"13": number;
|
|
1382
|
+
"14": number;
|
|
1383
|
+
"15": number;
|
|
1385
1384
|
};
|
|
1386
1385
|
transition: {
|
|
1387
1386
|
slow: number;
|
|
@@ -1437,22 +1436,22 @@ export declare const StyledContainer: import("styled-components").StyledComponen
|
|
|
1437
1436
|
};
|
|
1438
1437
|
data: {
|
|
1439
1438
|
branded: {
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1439
|
+
"1": string;
|
|
1440
|
+
"2": string;
|
|
1441
|
+
"3": string;
|
|
1442
|
+
"4": string;
|
|
1444
1443
|
};
|
|
1445
1444
|
electric: {
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1445
|
+
"1": string;
|
|
1446
|
+
"2": string;
|
|
1447
|
+
"3": string;
|
|
1448
|
+
"4": string;
|
|
1450
1449
|
};
|
|
1451
1450
|
gas: {
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1451
|
+
"1": string;
|
|
1452
|
+
"2": string;
|
|
1453
|
+
"3": string;
|
|
1454
|
+
"4": string;
|
|
1456
1455
|
};
|
|
1457
1456
|
};
|
|
1458
1457
|
focus: {
|