@ovotech/element-native 3.8.1 → 4.0.0-canary-a872093-246
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/package.json +6 -0
- package/dist/components/Accordion/Accordion.d.ts +2 -3
- package/dist/components/Accordion/Accordion.js +130 -97
- package/dist/components/Accordion/Group.js +21 -21
- package/dist/components/Accordion/Icon.js +60 -59
- package/dist/components/Accordion/index.d.ts +1 -1
- package/dist/components/Accordion/index.js +9 -19
- package/dist/components/Accordion/styles.d.ts +20 -2
- package/dist/components/Accordion/styles.js +59 -50
- package/dist/components/Accordion/types.d.ts +2 -2
- package/dist/components/Accordion/types.js +2 -1
- package/dist/components/ActionCard/ActionCard.d.ts +1 -1
- package/dist/components/ActionCard/ActionCard.js +104 -376
- package/dist/components/ActionCard/CloseIconShape.js +40 -14
- package/dist/components/ActionCard/IndicatorIconShape.js +40 -11
- package/dist/components/ActionCard/index.js +5 -185
- package/dist/components/ActionList/ActionList.d.ts +3 -4
- package/dist/components/ActionList/ActionList.js +56 -202
- package/dist/components/ActionList/index.js +6 -100
- package/dist/components/ActionList/styled.d.ts +523 -5
- package/dist/components/ActionList/styled.js +65 -152
- package/dist/components/Badge/Badge.d.ts +9 -3
- package/dist/components/Badge/Badge.js +96 -39
- package/dist/components/Badge/index.js +5 -8
- package/dist/components/CTAButton/CTAButton.d.ts +9 -8
- package/dist/components/CTAButton/CTAButton.js +118 -181
- package/dist/components/CTAButton/index.js +8 -100
- package/dist/components/CTALink/CTALink.d.ts +5 -5
- package/dist/components/CTALink/CTALink.js +22 -105
- package/dist/components/CTALink/index.js +7 -100
- package/dist/components/Card/Card.d.ts +7 -483
- package/dist/components/Card/Card.js +43 -17
- package/dist/components/Card/index.js +5 -7
- package/dist/components/Checkbox/Checkbox.js +78 -173
- package/dist/components/Checkbox/CheckboxField.d.ts +1 -1
- package/dist/components/Checkbox/CheckboxField.js +43 -39
- package/dist/components/Checkbox/index.js +7 -105
- package/dist/components/CurrencyField/CurrencyField.d.ts +1 -1
- package/dist/components/CurrencyField/CurrencyField.js +32 -109
- package/dist/components/CurrencyField/index.js +5 -108
- package/dist/components/CurrencyInput/CurrencyInput.d.ts +2 -2
- package/dist/components/CurrencyInput/CurrencyInput.js +36 -118
- package/dist/components/CurrencyInput/index.d.ts +1 -1
- package/dist/components/CurrencyInput/index.js +5 -100
- package/dist/components/DataTable/DataTable.js +45 -62
- package/dist/components/DataTable/TableRow.js +35 -44
- package/dist/components/DataTable/index.js +20 -25
- package/dist/components/DataTable/styles.d.ts +78 -0
- package/dist/components/DataTable/styles.js +86 -119
- package/dist/components/DataTable/types.d.ts +4 -4
- package/dist/components/DataTable/types.js +2 -1
- package/dist/components/DateField/DateField.d.ts +3 -4
- package/dist/components/DateField/DateField.js +87 -229
- package/dist/components/DateField/index.js +5 -107
- package/dist/components/DescriptionList/DescriptionList.d.ts +2 -2
- package/dist/components/DescriptionList/DescriptionList.js +43 -25
- package/dist/components/DescriptionList/index.js +6 -13
- package/dist/components/DescriptionList/styled.d.ts +6 -0
- package/dist/components/DescriptionList/styled.js +85 -42
- package/dist/components/Disclosure/Disclosure.js +79 -153
- package/dist/components/Disclosure/index.js +16 -96
- package/dist/components/Divider/Divider.d.ts +1 -1
- package/dist/components/Divider/Divider.js +43 -12
- package/dist/components/Divider/index.js +5 -7
- package/dist/components/Em/Em.d.ts +6 -0
- package/dist/components/Em/Em.js +12 -8
- package/dist/components/Em/index.js +5 -6
- package/dist/components/EmailField/EmailField.d.ts +1 -1
- package/dist/components/EmailField/EmailField.js +32 -108
- package/dist/components/EmailField/index.js +5 -107
- package/dist/components/EmailInput/EmailInput.d.ts +1 -1
- package/dist/components/EmailInput/EmailInput.js +18 -106
- package/dist/components/EmailInput/index.js +5 -98
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.d.ts +2 -2
- package/dist/components/ErrorSummaryNotification/ErrorSummaryNotification.js +50 -115
- package/dist/components/ErrorSummaryNotification/index.js +5 -104
- package/dist/components/ErrorText/ErrorText.d.ts +6 -0
- package/dist/components/ErrorText/ErrorText.js +42 -22
- package/dist/components/ErrorText/index.js +5 -11
- package/dist/components/Field/Field.d.ts +2 -2
- package/dist/components/Field/Field.js +58 -62
- package/dist/components/Field/index.js +16 -16
- package/dist/components/FilterSelect/FilterSelect.d.ts +2 -2
- package/dist/components/FilterSelect/FilterSelect.js +77 -201
- package/dist/components/FilterSelect/index.js +5 -102
- package/dist/components/FormGroup/FormGroup.d.ts +1 -1
- package/dist/components/FormGroup/FormGroup.js +42 -9
- package/dist/components/FormGroup/index.js +5 -8
- package/dist/components/Grid/Col.d.ts +7 -1
- package/dist/components/Grid/Col.js +58 -32
- package/dist/components/Grid/Row.d.ts +6 -0
- package/dist/components/Grid/Row.js +72 -34
- package/dist/components/Grid/index.js +7 -13
- package/dist/components/Heading1/Heading1.js +70 -36
- package/dist/components/Heading1/index.js +5 -10
- package/dist/components/Heading2/Heading2.js +70 -36
- package/dist/components/Heading2/index.js +5 -10
- package/dist/components/Heading3/Heading3.js +70 -36
- package/dist/components/Heading3/index.js +5 -10
- package/dist/components/Heading4/Heading4.js +70 -36
- package/dist/components/Heading4/index.js +5 -10
- package/dist/components/HintText/HintText.d.ts +6 -0
- package/dist/components/HintText/HintText.js +42 -22
- package/dist/components/HintText/index.js +5 -11
- package/dist/components/Icon/Icon.d.ts +2 -2
- package/dist/components/Icon/Icon.js +38 -103
- package/dist/components/Icon/index.js +5 -93
- package/dist/components/Input/Input.d.ts +1 -1
- package/dist/components/Input/Input.js +97 -198
- package/dist/components/Label/Label.js +50 -18
- package/dist/components/Label/index.js +5 -8
- package/dist/components/LabelText/LabelText.d.ts +6 -0
- package/dist/components/LabelText/LabelText.js +42 -20
- package/dist/components/LabelText/index.js +5 -11
- package/dist/components/Lead/Lead.js +52 -18
- package/dist/components/Lead/index.js +5 -8
- package/dist/components/LineThrough/LineThrough.d.ts +6 -0
- package/dist/components/LineThrough/LineThrough.js +12 -7
- package/dist/components/LineThrough/index.js +5 -6
- package/dist/components/List/List.d.ts +1 -1
- package/dist/components/List/List.js +32 -38
- package/dist/components/List/index.js +7 -16
- package/dist/components/List/styled.d.ts +25 -0
- package/dist/components/List/styled.js +52 -37
- package/dist/components/Margin/Margin.d.ts +8 -2
- package/dist/components/Margin/Margin.js +50 -68
- package/dist/components/Margin/index.js +5 -11
- package/dist/components/NavHeader/IconButton.d.ts +2 -2
- package/dist/components/NavHeader/IconButton.js +18 -119
- package/dist/components/NavHeader/NavHeader.d.ts +11 -3
- package/dist/components/NavHeader/NavHeader.js +65 -181
- package/dist/components/NavHeader/NavHeader.styles.d.ts +543 -7
- package/dist/components/NavHeader/NavHeader.styles.js +72 -81
- package/dist/components/NavHeader/index.d.ts +1 -1
- package/dist/components/NavHeader/index.js +5 -104
- package/dist/components/Notification/Notification.d.ts +14 -2
- package/dist/components/Notification/Notification.js +103 -190
- package/dist/components/Notification/index.js +9 -100
- package/dist/components/NumberField/NumberField.d.ts +1 -1
- package/dist/components/NumberField/NumberField.js +32 -108
- package/dist/components/NumberField/index.js +5 -107
- package/dist/components/NumberInput/NumberInput.d.ts +1 -1
- package/dist/components/NumberInput/NumberInput.js +18 -106
- package/dist/components/NumberInput/index.js +5 -98
- package/dist/components/P/P.js +54 -23
- package/dist/components/P/index.js +5 -10
- package/dist/components/PasswordField/PasswordField.d.ts +1 -1
- package/dist/components/PasswordField/PasswordField.js +32 -110
- package/dist/components/PasswordField/index.js +5 -109
- package/dist/components/PasswordInput/PasswordInput.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordInput.js +33 -123
- package/dist/components/PasswordInput/PasswordInput.styled.d.ts +7 -1
- package/dist/components/PasswordInput/PasswordInput.styled.js +37 -18
- package/dist/components/PasswordInput/PasswordVisibilityToggle.d.ts +1 -1
- package/dist/components/PasswordInput/PasswordVisibilityToggle.js +26 -128
- package/dist/components/PasswordInput/index.js +5 -100
- package/dist/components/PhoneField/PhoneField.d.ts +1 -1
- package/dist/components/PhoneField/PhoneField.js +32 -108
- package/dist/components/PhoneField/index.js +5 -107
- package/dist/components/PhoneInput/PhoneInput.d.ts +1 -1
- package/dist/components/PhoneInput/PhoneInput.js +17 -106
- package/dist/components/PhoneInput/index.js +5 -98
- package/dist/components/ProductCarousel/NavigationDots.js +74 -57
- package/dist/components/ProductCarousel/ProductCarousel.js +126 -2174
- package/dist/components/ProductCarousel/anchor-point.js +51 -31
- package/dist/components/ProductCarousel/index.js +5 -101
- package/dist/components/Radio/Radio.js +67 -69
- package/dist/components/Radio/RadioField.d.ts +1 -1
- package/dist/components/Radio/RadioField.js +47 -46
- package/dist/components/Radio/index.js +7 -18
- package/dist/components/RadioCard/RadioCard.js +71 -68
- package/dist/components/RadioCard/index.js +5 -13
- package/dist/components/SelectField/Select.d.ts +8 -2
- package/dist/components/SelectField/Select.js +93 -852
- package/dist/components/SelectField/SelectField.d.ts +1 -1
- package/dist/components/SelectField/SelectField.js +32 -125
- package/dist/components/SelectField/index.js +5 -108
- package/dist/components/SkeletonAnimation/SkeletonAnimation.js +34 -47
- package/dist/components/SkeletonAnimation/index.js +5 -7
- package/dist/components/SkeletonCTA/SkeletonCTA.d.ts +1 -1
- package/dist/components/SkeletonCTA/SkeletonCTA.js +41 -17
- package/dist/components/SkeletonCTA/index.js +5 -12
- package/dist/components/SkeletonCircle/SkeletonCircle.d.ts +1 -1
- package/dist/components/SkeletonCircle/SkeletonCircle.js +44 -16
- package/dist/components/SkeletonCircle/index.js +5 -10
- package/dist/components/SkeletonHeading/SkeletonHeading.d.ts +1 -1
- package/dist/components/SkeletonHeading/SkeletonHeading.js +40 -29
- package/dist/components/SkeletonHeading/index.js +5 -12
- package/dist/components/SkeletonText/SkeletonText.d.ts +1 -1
- package/dist/components/SkeletonText/SkeletonText.js +50 -33
- package/dist/components/SkeletonText/index.js +5 -12
- package/dist/components/Small/Small.d.ts +6 -0
- package/dist/components/Small/Small.js +38 -17
- package/dist/components/Small/index.js +5 -11
- package/dist/components/Spinner/Spinner.d.ts +2 -2
- package/dist/components/Spinner/Spinner.js +68 -61
- package/dist/components/Spinner/index.js +5 -9
- package/dist/components/Stack/Stack.d.ts +1 -1
- package/dist/components/Stack/Stack.js +48 -30
- package/dist/components/Stack/index.js +5 -11
- package/dist/components/Stretch/Stretch.d.ts +1 -1
- package/dist/components/Stretch/Stretch.js +55 -11
- package/dist/components/Stretch/index.js +16 -8
- package/dist/components/Strong/Strong.d.ts +6 -0
- package/dist/components/Strong/Strong.js +10 -9
- package/dist/components/Strong/index.js +5 -6
- package/dist/components/SubLabelText/SubLabelText.d.ts +6 -0
- package/dist/components/SubLabelText/SubLabelText.js +42 -20
- package/dist/components/SubLabelText/index.js +5 -11
- package/dist/components/Tabs/Tab.d.ts +1 -2
- package/dist/components/Tabs/Tab.js +76 -60
- package/dist/components/Tabs/TabList.d.ts +2 -2
- package/dist/components/Tabs/TabList.js +77 -37
- package/dist/components/Tabs/TabPanel.js +64 -15
- package/dist/components/Tabs/Tabs.d.ts +2 -3
- package/dist/components/Tabs/Tabs.js +97 -46
- package/dist/components/Tabs/index.js +11 -19
- package/dist/components/TextField/TextField.d.ts +1 -1
- package/dist/components/TextField/TextField.js +32 -108
- package/dist/components/TextField/index.js +5 -107
- package/dist/components/TextGroup/TextGroup.js +40 -23
- package/dist/components/TextGroup/index.js +5 -7
- package/dist/components/TextInput/TextInput.d.ts +1 -1
- package/dist/components/TextInput/TextInput.js +18 -97
- package/dist/components/TextInput/index.js +5 -98
- package/dist/components/TextLink/TextLink.js +74 -118
- package/dist/components/TextLink/index.js +5 -97
- package/dist/components/TextareaField/TextareaField.d.ts +1 -1
- package/dist/components/TextareaField/TextareaField.js +32 -108
- package/dist/components/TextareaField/index.js +5 -107
- package/dist/components/TextareaInput/TextareaInput.d.ts +2 -2
- package/dist/components/TextareaInput/TextareaInput.js +65 -114
- package/dist/components/TextareaInput/index.d.ts +1 -1
- package/dist/components/TextareaInput/index.js +5 -98
- package/dist/components/Toast/Toast.d.ts +1 -1
- package/dist/components/Toast/Toast.js +159 -730
- package/dist/components/Toast/index.js +6 -105
- package/dist/components/Toggle/Toggle.d.ts +1 -1
- package/dist/components/Toggle/Toggle.js +55 -73
- package/dist/components/Toggle/index.js +5 -14
- package/dist/components/Toggle/styles.d.ts +25 -1
- package/dist/components/Toggle/styles.js +28 -38
- package/dist/components/index.d.ts +0 -3
- package/dist/components/index.js +77 -296
- package/dist/esm/components/Accordion/Accordion.js +106 -0
- package/dist/esm/components/Accordion/Group.js +18 -0
- package/dist/esm/components/Accordion/Icon.js +35 -0
- package/dist/esm/components/Accordion/index.js +3 -0
- package/dist/esm/components/Accordion/styles.js +31 -0
- package/dist/esm/components/ActionCard/ActionCard.js +77 -0
- package/dist/esm/components/ActionCard/CloseIconShape.js +11 -0
- package/dist/esm/components/ActionCard/IndicatorIconShape.js +11 -0
- package/dist/esm/components/ActionCard/index.js +1 -0
- package/dist/esm/components/ActionList/ActionList.js +54 -0
- package/dist/esm/components/ActionList/index.js +1 -0
- package/dist/esm/components/ActionList/styled.js +40 -0
- package/dist/esm/components/Badge/Badge.js +70 -0
- package/dist/esm/components/Badge/index.js +1 -0
- package/dist/esm/components/CTAButton/CTAButton.js +90 -0
- package/dist/esm/components/CTAButton/index.js +1 -0
- package/dist/esm/components/CTALink/CTALink.js +18 -0
- package/dist/esm/components/CTALink/index.js +1 -0
- package/dist/esm/components/Card/Card.js +37 -0
- package/dist/esm/components/Card/index.js +1 -0
- package/dist/esm/components/Checkbox/Checkbox.js +74 -0
- package/dist/esm/components/Checkbox/CheckboxField.js +42 -0
- package/dist/esm/components/Checkbox/index.js +2 -0
- package/dist/esm/components/CurrencyField/CurrencyField.js +30 -0
- package/dist/esm/components/CurrencyField/index.js +1 -0
- package/dist/esm/components/CurrencyInput/CurrencyInput.js +34 -0
- package/dist/esm/components/CurrencyInput/index.js +1 -0
- package/dist/esm/components/DataTable/DataTable.js +43 -0
- package/dist/esm/components/DataTable/TableRow.js +33 -0
- package/dist/esm/components/DataTable/index.js +3 -0
- package/dist/esm/components/DataTable/styles.js +61 -0
- package/dist/esm/components/DataTable/types.js +1 -0
- package/dist/esm/components/DateField/DateField.js +63 -0
- package/dist/esm/components/DateField/index.js +1 -0
- package/dist/esm/components/DescriptionList/DescriptionList.js +40 -0
- package/dist/esm/components/DescriptionList/index.js +1 -0
- package/dist/esm/components/DescriptionList/styled.js +58 -0
- package/dist/esm/components/Disclosure/Disclosure.js +55 -0
- package/dist/esm/components/Disclosure/index.js +1 -0
- package/dist/esm/components/Divider/Divider.js +17 -0
- package/dist/esm/components/Divider/index.js +1 -0
- package/dist/esm/components/Em/Em.js +7 -0
- package/dist/esm/components/Em/index.js +1 -0
- package/dist/esm/components/EmailField/EmailField.js +30 -0
- package/dist/esm/components/EmailField/index.js +1 -0
- package/dist/esm/components/EmailInput/EmailInput.js +16 -0
- package/dist/esm/components/EmailInput/index.js +1 -0
- package/dist/esm/components/ErrorSummaryNotification/ErrorSummaryNotification.js +49 -0
- package/dist/esm/components/ErrorSummaryNotification/index.js +1 -0
- package/dist/esm/components/ErrorText/ErrorText.js +17 -0
- package/dist/esm/components/ErrorText/index.js +1 -0
- package/dist/esm/components/Field/Field.js +58 -0
- package/dist/esm/components/Field/index.js +1 -0
- package/dist/esm/components/FilterSelect/FilterSelect.js +52 -0
- package/dist/esm/components/FilterSelect/index.js +1 -0
- package/dist/esm/components/FormGroup/FormGroup.js +37 -0
- package/dist/esm/components/FormGroup/index.js +1 -0
- package/dist/esm/components/Grid/Col.js +33 -0
- package/dist/esm/components/Grid/Row.js +47 -0
- package/dist/esm/components/Grid/index.js +2 -0
- package/dist/esm/components/Heading1/Heading1.js +46 -0
- package/dist/esm/components/Heading1/index.js +1 -0
- package/dist/esm/components/Heading2/Heading2.js +46 -0
- package/dist/esm/components/Heading2/index.js +1 -0
- package/dist/esm/components/Heading3/Heading3.js +46 -0
- package/dist/esm/components/Heading3/index.js +1 -0
- package/dist/esm/components/Heading4/Heading4.js +46 -0
- package/dist/esm/components/Heading4/index.js +1 -0
- package/dist/esm/components/HintText/HintText.js +17 -0
- package/dist/esm/components/HintText/index.js +1 -0
- package/dist/esm/components/Icon/Icon.js +36 -0
- package/dist/esm/components/Icon/index.js +1 -0
- package/dist/esm/components/Input/Input.js +74 -0
- package/dist/esm/components/Label/Label.js +25 -0
- package/dist/esm/components/Label/index.js +1 -0
- package/dist/esm/components/LabelText/LabelText.js +17 -0
- package/dist/esm/components/LabelText/index.js +1 -0
- package/dist/esm/components/Lead/Lead.js +27 -0
- package/dist/esm/components/Lead/index.js +1 -0
- package/dist/esm/components/LineThrough/LineThrough.js +7 -0
- package/dist/esm/components/LineThrough/index.js +1 -0
- package/dist/esm/components/List/List.js +29 -0
- package/dist/esm/components/List/index.js +1 -0
- package/dist/esm/components/List/styled.js +27 -0
- package/dist/esm/components/Margin/Margin.js +46 -0
- package/dist/esm/components/Margin/index.js +1 -0
- package/dist/esm/components/NavHeader/IconButton.js +16 -0
- package/dist/esm/components/NavHeader/NavHeader.js +42 -0
- package/dist/esm/components/NavHeader/NavHeader.styles.js +44 -0
- package/dist/esm/components/NavHeader/index.js +1 -0
- package/dist/esm/components/Notification/Notification.js +78 -0
- package/dist/esm/components/Notification/index.js +1 -0
- package/dist/esm/components/NumberField/NumberField.js +30 -0
- package/dist/esm/components/NumberField/index.js +1 -0
- package/dist/esm/components/NumberInput/NumberInput.js +16 -0
- package/dist/esm/components/NumberInput/index.js +1 -0
- package/dist/esm/components/P/P.js +29 -0
- package/dist/esm/components/P/index.js +1 -0
- package/dist/esm/components/PasswordField/PasswordField.js +30 -0
- package/dist/esm/components/PasswordField/index.js +1 -0
- package/dist/esm/components/PasswordInput/PasswordInput.js +32 -0
- package/dist/esm/components/PasswordInput/PasswordInput.styled.js +12 -0
- package/dist/esm/components/PasswordInput/PasswordVisibilityToggle.js +23 -0
- package/dist/esm/components/PasswordInput/index.js +1 -0
- package/dist/esm/components/PhoneField/PhoneField.js +30 -0
- package/dist/esm/components/PhoneField/index.js +1 -0
- package/dist/esm/components/PhoneInput/PhoneInput.js +15 -0
- package/dist/esm/components/PhoneInput/index.js +1 -0
- package/dist/esm/components/ProductCarousel/NavigationDots.js +50 -0
- package/dist/esm/components/ProductCarousel/ProductCarousel.js +98 -0
- package/dist/esm/components/ProductCarousel/anchor-point.js +49 -0
- package/dist/esm/components/ProductCarousel/index.js +1 -0
- package/dist/esm/components/Radio/Radio.js +62 -0
- package/dist/esm/components/Radio/RadioField.js +46 -0
- package/dist/esm/components/Radio/index.js +2 -0
- package/dist/esm/components/RadioCard/RadioCard.js +66 -0
- package/dist/esm/components/RadioCard/index.js +1 -0
- package/dist/esm/components/SelectField/Select.js +66 -0
- package/dist/esm/components/SelectField/SelectField.js +29 -0
- package/dist/esm/components/SelectField/index.js +1 -0
- package/dist/esm/components/SkeletonAnimation/SkeletonAnimation.js +31 -0
- package/dist/esm/components/SkeletonAnimation/index.js +1 -0
- package/dist/esm/components/SkeletonCTA/SkeletonCTA.js +35 -0
- package/dist/esm/components/SkeletonCTA/index.js +1 -0
- package/dist/esm/components/SkeletonCircle/SkeletonCircle.js +38 -0
- package/dist/esm/components/SkeletonCircle/index.js +1 -0
- package/dist/esm/components/SkeletonHeading/SkeletonHeading.js +34 -0
- package/dist/esm/components/SkeletonHeading/index.js +1 -0
- package/dist/esm/components/SkeletonText/SkeletonText.js +45 -0
- package/dist/esm/components/SkeletonText/index.js +1 -0
- package/dist/esm/components/Small/Small.js +13 -0
- package/dist/esm/components/Small/index.js +1 -0
- package/dist/esm/components/Spinner/Spinner.js +44 -0
- package/dist/esm/components/Spinner/index.js +1 -0
- package/dist/esm/components/Stack/Stack.js +43 -0
- package/dist/esm/components/Stack/index.js +1 -0
- package/dist/esm/components/Stretch/Stretch.js +29 -0
- package/dist/esm/components/Stretch/index.js +1 -0
- package/dist/esm/components/Strong/Strong.js +5 -0
- package/dist/esm/components/Strong/index.js +1 -0
- package/dist/esm/components/SubLabelText/SubLabelText.js +17 -0
- package/dist/esm/components/SubLabelText/index.js +1 -0
- package/dist/esm/components/Tabs/Tab.js +53 -0
- package/dist/esm/components/Tabs/TabList.js +51 -0
- package/dist/esm/components/Tabs/TabPanel.js +38 -0
- package/dist/esm/components/Tabs/Tabs.js +72 -0
- package/dist/esm/components/Tabs/index.js +4 -0
- package/dist/esm/components/TextField/TextField.js +30 -0
- package/dist/esm/components/TextField/index.js +1 -0
- package/dist/esm/components/TextGroup/TextGroup.js +39 -0
- package/dist/esm/components/TextGroup/index.js +1 -0
- package/dist/esm/components/TextInput/TextInput.js +16 -0
- package/dist/esm/components/TextInput/index.js +1 -0
- package/dist/esm/components/TextLink/TextLink.js +49 -0
- package/dist/esm/components/TextLink/index.js +1 -0
- package/dist/esm/components/TextareaField/TextareaField.js +30 -0
- package/dist/esm/components/TextareaField/index.js +1 -0
- package/dist/esm/components/TextareaInput/TextareaInput.js +41 -0
- package/dist/esm/components/TextareaInput/index.js +1 -0
- package/dist/esm/components/Toast/Toast.js +141 -0
- package/dist/esm/components/Toast/index.js +1 -0
- package/dist/esm/components/Toggle/Toggle.js +53 -0
- package/dist/esm/components/Toggle/index.js +1 -0
- package/dist/esm/components/Toggle/styles.js +23 -0
- package/dist/esm/components/index.js +62 -0
- package/dist/esm/hooks/index.js +2 -0
- package/dist/esm/hooks/use-breakpoint.js +12 -0
- package/dist/esm/hooks/use-full-width.js +16 -0
- package/dist/esm/hooks/use-layout.js +16 -0
- package/dist/esm/index.js +3 -0
- package/dist/esm/providers/IconsProvider.js +115 -0
- package/dist/esm/providers/icons/Address.js +14 -0
- package/dist/esm/providers/icons/Advice.js +14 -0
- package/dist/esm/providers/icons/Archive.js +14 -0
- package/dist/esm/providers/icons/ArrowDown.js +14 -0
- package/dist/esm/providers/icons/ArrowLeft.js +14 -0
- package/dist/esm/providers/icons/ArrowRight.js +14 -0
- package/dist/esm/providers/icons/ArrowUp.js +14 -0
- package/dist/esm/providers/icons/Award.js +14 -0
- package/dist/esm/providers/icons/Battery.js +14 -0
- package/dist/esm/providers/icons/Cal.js +14 -0
- package/dist/esm/providers/icons/CalBook.js +14 -0
- package/dist/esm/providers/icons/CaretDown.js +14 -0
- package/dist/esm/providers/icons/CaretLeft.js +14 -0
- package/dist/esm/providers/icons/CaretRight.js +14 -0
- package/dist/esm/providers/icons/CaretUp.js +14 -0
- package/dist/esm/providers/icons/Chart.js +14 -0
- package/dist/esm/providers/icons/ChartFilled.js +14 -0
- package/dist/esm/providers/icons/Check.js +14 -0
- package/dist/esm/providers/icons/CheckCircle.js +14 -0
- package/dist/esm/providers/icons/ChevronDown.js +14 -0
- package/dist/esm/providers/icons/ChevronLeft.js +14 -0
- package/dist/esm/providers/icons/ChevronLeftSmall.js +14 -0
- package/dist/esm/providers/icons/ChevronLeftSmallFirst.js +14 -0
- package/dist/esm/providers/icons/ChevronRight.js +14 -0
- package/dist/esm/providers/icons/ChevronRightSmall.js +14 -0
- package/dist/esm/providers/icons/ChevronRightSmallLast.js +14 -0
- package/dist/esm/providers/icons/ChevronUp.js +14 -0
- package/dist/esm/providers/icons/Circle.js +14 -0
- package/dist/esm/providers/icons/CloseCircle.js +14 -0
- package/dist/esm/providers/icons/Cross.js +14 -0
- package/dist/esm/providers/icons/Doc.js +14 -0
- package/dist/esm/providers/icons/Dollar.js +14 -0
- package/dist/esm/providers/icons/Download.js +14 -0
- package/dist/esm/providers/icons/Eco.js +14 -0
- package/dist/esm/providers/icons/EcoHome.js +14 -0
- package/dist/esm/providers/icons/Edit.js +14 -0
- package/dist/esm/providers/icons/ElectricCar.js +14 -0
- package/dist/esm/providers/icons/ElectricHome.js +14 -0
- package/dist/esm/providers/icons/Electricity.js +14 -0
- package/dist/esm/providers/icons/EnergyAdvice.js +14 -0
- package/dist/esm/providers/icons/Equals.js +14 -0
- package/dist/esm/providers/icons/Euro.js +14 -0
- package/dist/esm/providers/icons/Gas.js +14 -0
- package/dist/esm/providers/icons/GlobeAddress.js +14 -0
- package/dist/esm/providers/icons/Help.js +14 -0
- package/dist/esm/providers/icons/HelpFilled.js +14 -0
- package/dist/esm/providers/icons/Hide.js +14 -0
- package/dist/esm/providers/icons/Home.js +14 -0
- package/dist/esm/providers/icons/HomeFilled.js +14 -0
- package/dist/esm/providers/icons/HydroPower.js +14 -0
- package/dist/esm/providers/icons/Info.js +14 -0
- package/dist/esm/providers/icons/Link.js +14 -0
- package/dist/esm/providers/icons/Logo.js +14 -0
- package/dist/esm/providers/icons/Mail.js +14 -0
- package/dist/esm/providers/icons/MailOpen.js +14 -0
- package/dist/esm/providers/icons/Menu.js +14 -0
- package/dist/esm/providers/icons/Message.js +14 -0
- package/dist/esm/providers/icons/MessageFilled.js +14 -0
- package/dist/esm/providers/icons/Minus.js +14 -0
- package/dist/esm/providers/icons/Mobile.js +14 -0
- package/dist/esm/providers/icons/NewWindow.js +14 -0
- package/dist/esm/providers/icons/PaymentCard.js +14 -0
- package/dist/esm/providers/icons/PaymentCardFilled.js +14 -0
- package/dist/esm/providers/icons/Phone.js +14 -0
- package/dist/esm/providers/icons/Plus.js +14 -0
- package/dist/esm/providers/icons/Pound.js +14 -0
- package/dist/esm/providers/icons/Pricing.js +14 -0
- package/dist/esm/providers/icons/Search.js +14 -0
- package/dist/esm/providers/icons/Security.js +14 -0
- package/dist/esm/providers/icons/Show.js +14 -0
- package/dist/esm/providers/icons/SmartHome.js +14 -0
- package/dist/esm/providers/icons/SmartMeter.js +14 -0
- package/dist/esm/providers/icons/Solar.js +14 -0
- package/dist/esm/providers/icons/Star.js +14 -0
- package/dist/esm/providers/icons/StarFilled.js +14 -0
- package/dist/esm/providers/icons/Sun.js +14 -0
- package/dist/esm/providers/icons/Torch.js +14 -0
- package/dist/esm/providers/icons/Trees.js +14 -0
- package/dist/esm/providers/icons/Tune.js +14 -0
- package/dist/esm/providers/icons/User.js +14 -0
- package/dist/esm/providers/icons/UserFilled.js +14 -0
- package/dist/esm/providers/icons/Wallet.js +14 -0
- package/dist/esm/providers/icons/WalletFilled.js +14 -0
- package/dist/esm/providers/icons/WarmHome.js +14 -0
- package/dist/esm/providers/icons/Warning.js +14 -0
- package/dist/esm/providers/icons/WebAddress.js +14 -0
- package/dist/esm/providers/icons/WindPower.js +14 -0
- package/dist/esm/providers/icons/index.js +87 -0
- package/dist/esm/providers/index.js +2 -0
- package/dist/esm/providers/types.js +1 -0
- package/dist/esm/styled.native.js +4 -0
- package/dist/esm/theme/index.js +1 -0
- package/dist/esm/utils/index.js +1 -0
- package/dist/esm/utils/utils.js +95 -0
- package/dist/hooks/index.js +17 -8
- package/dist/hooks/use-breakpoint.d.ts +2 -2
- package/dist/hooks/use-breakpoint.js +15 -15
- package/dist/hooks/use-full-width.d.ts +1 -1
- package/dist/hooks/use-full-width.js +19 -16
- package/dist/hooks/use-layout.js +19 -17
- package/dist/index.d.ts +0 -2
- package/dist/index.js +18 -320
- package/dist/providers/IconsProvider.js +118 -189
- package/dist/providers/icons/Address.js +40 -13
- package/dist/providers/icons/Advice.js +40 -11
- package/dist/providers/icons/Archive.js +40 -13
- package/dist/providers/icons/ArrowDown.js +40 -11
- package/dist/providers/icons/ArrowLeft.js +40 -11
- package/dist/providers/icons/ArrowRight.js +40 -11
- package/dist/providers/icons/ArrowUp.js +40 -11
- package/dist/providers/icons/Award.js +40 -13
- package/dist/providers/icons/Battery.js +40 -13
- package/dist/providers/icons/Cal.js +40 -11
- package/dist/providers/icons/CalBook.js +40 -13
- package/dist/providers/icons/CaretDown.js +40 -5
- package/dist/providers/icons/CaretLeft.js +40 -5
- package/dist/providers/icons/CaretRight.js +40 -5
- package/dist/providers/icons/CaretUp.js +40 -5
- package/dist/providers/icons/Chart.js +40 -13
- package/dist/providers/icons/ChartFilled.js +40 -11
- package/dist/providers/icons/Check.js +40 -11
- package/dist/providers/icons/CheckCircle.js +40 -13
- package/dist/providers/icons/ChevronDown.js +40 -11
- package/dist/providers/icons/ChevronLeft.js +40 -11
- package/dist/providers/icons/ChevronLeftSmall.js +40 -11
- package/dist/providers/icons/ChevronLeftSmallFirst.js +40 -13
- package/dist/providers/icons/ChevronRight.js +40 -11
- package/dist/providers/icons/ChevronRightSmall.js +40 -11
- package/dist/providers/icons/ChevronRightSmallLast.js +40 -13
- package/dist/providers/icons/ChevronUp.js +40 -11
- package/dist/providers/icons/Circle.js +17 -5
- package/dist/providers/icons/CloseCircle.js +40 -13
- package/dist/providers/icons/Cross.js +40 -11
- package/dist/providers/icons/Doc.js +40 -11
- package/dist/providers/icons/Dollar.js +40 -13
- package/dist/providers/icons/Download.js +40 -13
- package/dist/providers/icons/Eco.js +40 -11
- package/dist/providers/icons/EcoHome.js +40 -13
- package/dist/providers/icons/Edit.js +40 -13
- package/dist/providers/icons/ElectricCar.js +40 -13
- package/dist/providers/icons/ElectricHome.js +40 -13
- package/dist/providers/icons/Electricity.js +40 -11
- package/dist/providers/icons/EnergyAdvice.js +40 -13
- package/dist/providers/icons/Equals.js +40 -13
- package/dist/providers/icons/Euro.js +40 -13
- package/dist/providers/icons/Gas.js +40 -11
- package/dist/providers/icons/GlobeAddress.js +40 -11
- package/dist/providers/icons/Help.js +40 -13
- package/dist/providers/icons/HelpFilled.d.ts +2 -0
- package/dist/providers/icons/HelpFilled.js +41 -0
- package/dist/providers/icons/Hide.js +40 -11
- package/dist/providers/icons/Home.js +40 -11
- package/dist/providers/icons/HomeFilled.js +40 -11
- package/dist/providers/icons/HydroPower.js +40 -13
- package/dist/providers/icons/Info.js +40 -13
- package/dist/providers/icons/Link.js +39 -40
- package/dist/providers/icons/Logo.js +17 -11
- package/dist/providers/icons/Mail.js +40 -11
- package/dist/providers/icons/MailOpen.js +40 -11
- package/dist/providers/icons/Menu.js +40 -13
- package/dist/providers/icons/Message.js +40 -11
- package/dist/providers/icons/MessageFilled.js +40 -11
- package/dist/providers/icons/Minus.js +40 -5
- package/dist/providers/icons/Mobile.js +40 -13
- package/dist/providers/icons/NewWindow.js +39 -22
- package/dist/providers/icons/PaymentCard.js +40 -13
- package/dist/providers/icons/PaymentCardFilled.d.ts +2 -0
- package/dist/providers/icons/PaymentCardFilled.js +41 -0
- package/dist/providers/icons/Phone.js +40 -11
- package/dist/providers/icons/Plus.js +40 -11
- package/dist/providers/icons/Pound.js +40 -13
- package/dist/providers/icons/Pricing.js +40 -11
- package/dist/providers/icons/Search.js +40 -11
- package/dist/providers/icons/Security.js +40 -13
- package/dist/providers/icons/Show.js +40 -13
- package/dist/providers/icons/SmartHome.js +40 -13
- package/dist/providers/icons/SmartMeter.js +40 -13
- package/dist/providers/icons/Solar.js +40 -11
- package/dist/providers/icons/Star.js +40 -11
- package/dist/providers/icons/StarFilled.d.ts +2 -0
- package/dist/providers/icons/StarFilled.js +41 -0
- package/dist/providers/icons/Sun.js +40 -13
- package/dist/providers/icons/Torch.js +39 -13
- package/dist/providers/icons/Trees.js +40 -13
- package/dist/providers/icons/Tune.js +40 -13
- package/dist/providers/icons/User.js +40 -13
- package/dist/providers/icons/UserFilled.js +40 -11
- package/dist/providers/icons/Wallet.js +40 -13
- package/dist/providers/icons/WalletFilled.js +40 -11
- package/dist/providers/icons/WarmHome.js +40 -13
- package/dist/providers/icons/Warning.js +40 -13
- package/dist/providers/icons/WebAddress.js +40 -11
- package/dist/providers/icons/WindPower.js +40 -11
- package/dist/providers/icons/index.d.ts +3 -0
- package/dist/providers/icons/index.js +102 -171
- package/dist/providers/index.js +17 -92
- package/dist/providers/types.d.ts +3 -3
- package/dist/providers/types.js +2 -1
- package/dist/styled.native.d.ts +36 -0
- package/dist/styled.native.js +32 -8
- package/dist/theme/index.js +15 -970
- package/dist/utils/index.js +16 -14
- package/dist/utils/utils.d.ts +2 -1
- package/dist/utils/utils.js +104 -57
- package/package.json +13 -21
- package/dist/components/components.spec.native.js +0 -199
- package/dist/index-zQHKJ0fC.js +0 -180
- package/dist/styled.native-KEscfVp7.js +0 -3872
- package/dist/test/utils.d.ts +0 -4
- package/dist/test/utils.js +0 -16127
- package/dist/theme-native--5aKgQLJ.js +0 -482
- package/dist/theme-web-MrdqV6Ln.js +0 -482
- package/dist/utils-HsZygzDh.js +0 -26
- /package/dist/{components/components.spec.native.d.ts → esm/components/Accordion/types.js} +0 -0
|
@@ -1,740 +1,169 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
import { useSafeAreaInsets as pt } from "react-native-safe-area-context";
|
|
6
|
-
import { Gesture as X, Directions as dt, GestureDetector as xt } from "react-native-gesture-handler";
|
|
7
|
-
import { n as w } from "../../utils-HsZygzDh.js";
|
|
8
|
-
import { s as $, c as L } from "../../styled.native-KEscfVp7.js";
|
|
9
|
-
import { Action as It } from "../ActionList/ActionList.js";
|
|
10
|
-
import { Icon as Ht } from "../Icon/Icon.js";
|
|
11
|
-
import { P as Rt } from "../P/P.js";
|
|
12
|
-
import "../../hooks/use-breakpoint.js";
|
|
13
|
-
import "../ActionList/styled.js";
|
|
14
|
-
import "../../utils/utils.js";
|
|
15
|
-
import "../../providers/IconsProvider.js";
|
|
16
|
-
import "../../providers/icons/Address.js";
|
|
17
|
-
import "react-native-svg";
|
|
18
|
-
import "../../providers/icons/Advice.js";
|
|
19
|
-
import "../../providers/icons/Archive.js";
|
|
20
|
-
import "../../providers/icons/ArrowDown.js";
|
|
21
|
-
import "../../providers/icons/ArrowLeft.js";
|
|
22
|
-
import "../../providers/icons/ArrowRight.js";
|
|
23
|
-
import "../../providers/icons/ArrowUp.js";
|
|
24
|
-
import "../../providers/icons/Award.js";
|
|
25
|
-
import "../../providers/icons/Battery.js";
|
|
26
|
-
import "../../providers/icons/Cal.js";
|
|
27
|
-
import "../../providers/icons/CalBook.js";
|
|
28
|
-
import "../../providers/icons/CaretDown.js";
|
|
29
|
-
import "../../providers/icons/CaretLeft.js";
|
|
30
|
-
import "../../providers/icons/CaretRight.js";
|
|
31
|
-
import "../../providers/icons/CaretUp.js";
|
|
32
|
-
import "../../providers/icons/Chart.js";
|
|
33
|
-
import "../../providers/icons/ChartFilled.js";
|
|
34
|
-
import "../../providers/icons/Check.js";
|
|
35
|
-
import "../../providers/icons/CheckCircle.js";
|
|
36
|
-
import "../../providers/icons/ChevronDown.js";
|
|
37
|
-
import "../../providers/icons/ChevronLeft.js";
|
|
38
|
-
import "../../providers/icons/ChevronLeftSmall.js";
|
|
39
|
-
import "../../providers/icons/ChevronLeftSmallFirst.js";
|
|
40
|
-
import "../../providers/icons/ChevronRight.js";
|
|
41
|
-
import "../../providers/icons/ChevronRightSmall.js";
|
|
42
|
-
import "../../providers/icons/ChevronRightSmallLast.js";
|
|
43
|
-
import "../../providers/icons/ChevronUp.js";
|
|
44
|
-
import "../../providers/icons/Circle.js";
|
|
45
|
-
import "../../providers/icons/CloseCircle.js";
|
|
46
|
-
import "../../providers/icons/Cross.js";
|
|
47
|
-
import "../../providers/icons/Doc.js";
|
|
48
|
-
import "../../providers/icons/Dollar.js";
|
|
49
|
-
import "../../providers/icons/Download.js";
|
|
50
|
-
import "../../providers/icons/Eco.js";
|
|
51
|
-
import "../../providers/icons/EcoHome.js";
|
|
52
|
-
import "../../providers/icons/Edit.js";
|
|
53
|
-
import "../../providers/icons/ElectricCar.js";
|
|
54
|
-
import "../../providers/icons/ElectricHome.js";
|
|
55
|
-
import "../../providers/icons/Electricity.js";
|
|
56
|
-
import "../../providers/icons/EnergyAdvice.js";
|
|
57
|
-
import "../../providers/icons/Equals.js";
|
|
58
|
-
import "../../providers/icons/Euro.js";
|
|
59
|
-
import "../../providers/icons/Gas.js";
|
|
60
|
-
import "../../providers/icons/GlobeAddress.js";
|
|
61
|
-
import "../../providers/icons/Help.js";
|
|
62
|
-
import "../../providers/icons/Hide.js";
|
|
63
|
-
import "../../providers/icons/Home.js";
|
|
64
|
-
import "../../providers/icons/HomeFilled.js";
|
|
65
|
-
import "../../providers/icons/HydroPower.js";
|
|
66
|
-
import "../../providers/icons/Info.js";
|
|
67
|
-
import "../../providers/icons/Link.js";
|
|
68
|
-
import "../../providers/icons/Logo.js";
|
|
69
|
-
import "../../providers/icons/Mail.js";
|
|
70
|
-
import "../../providers/icons/MailOpen.js";
|
|
71
|
-
import "../../providers/icons/Menu.js";
|
|
72
|
-
import "../../providers/icons/Message.js";
|
|
73
|
-
import "../../providers/icons/MessageFilled.js";
|
|
74
|
-
import "../../providers/icons/Minus.js";
|
|
75
|
-
import "../../providers/icons/Mobile.js";
|
|
76
|
-
import "../../providers/icons/NewWindow.js";
|
|
77
|
-
import "../../providers/icons/PaymentCard.js";
|
|
78
|
-
import "../../providers/icons/Phone.js";
|
|
79
|
-
import "../../providers/icons/Plus.js";
|
|
80
|
-
import "../../providers/icons/Pound.js";
|
|
81
|
-
import "../../providers/icons/Pricing.js";
|
|
82
|
-
import "../../providers/icons/Search.js";
|
|
83
|
-
import "../../providers/icons/Security.js";
|
|
84
|
-
import "../../providers/icons/Show.js";
|
|
85
|
-
import "../../providers/icons/SmartHome.js";
|
|
86
|
-
import "../../providers/icons/SmartMeter.js";
|
|
87
|
-
import "../../providers/icons/Solar.js";
|
|
88
|
-
import "../../providers/icons/Star.js";
|
|
89
|
-
import "../../providers/icons/Sun.js";
|
|
90
|
-
import "../../providers/icons/Torch.js";
|
|
91
|
-
import "../../providers/icons/Trees.js";
|
|
92
|
-
import "../../providers/icons/Tune.js";
|
|
93
|
-
import "../../providers/icons/User.js";
|
|
94
|
-
import "../../providers/icons/UserFilled.js";
|
|
95
|
-
import "../../providers/icons/Wallet.js";
|
|
96
|
-
import "../../providers/icons/WalletFilled.js";
|
|
97
|
-
import "../../providers/icons/WarmHome.js";
|
|
98
|
-
import "../../providers/icons/Warning.js";
|
|
99
|
-
import "../../providers/icons/WebAddress.js";
|
|
100
|
-
import "../../providers/icons/WindPower.js";
|
|
101
|
-
const Mt = 20;
|
|
102
|
-
let l;
|
|
103
|
-
(function(t) {
|
|
104
|
-
t[t.ADD_TOAST = 0] = "ADD_TOAST", t[t.UPDATE_TOAST = 1] = "UPDATE_TOAST", t[t.UPSERT_TOAST = 2] = "UPSERT_TOAST", t[t.DISMISS_TOAST = 3] = "DISMISS_TOAST", t[t.REMOVE_TOAST = 4] = "REMOVE_TOAST", t[t.START_PAUSE = 5] = "START_PAUSE", t[t.END_PAUSE = 6] = "END_PAUSE";
|
|
105
|
-
})(l || (l = {}));
|
|
106
|
-
const F = /* @__PURE__ */ new Map(), at = (t) => {
|
|
107
|
-
if (F.has(t))
|
|
108
|
-
return;
|
|
109
|
-
const o = setTimeout(() => {
|
|
110
|
-
F.delete(t), x({
|
|
111
|
-
type: l.REMOVE_TOAST,
|
|
112
|
-
toastId: t
|
|
113
|
-
});
|
|
114
|
-
}, 1e3);
|
|
115
|
-
F.set(t, o);
|
|
116
|
-
}, Ct = (t) => {
|
|
117
|
-
const o = F.get(t);
|
|
118
|
-
o && clearTimeout(o);
|
|
119
|
-
}, tt = (t, o) => {
|
|
120
|
-
switch (o.type) {
|
|
121
|
-
case l.ADD_TOAST:
|
|
122
|
-
return {
|
|
123
|
-
...t,
|
|
124
|
-
toasts: [o.toast, ...t.toasts].slice(0, Mt)
|
|
125
|
-
};
|
|
126
|
-
case l.UPDATE_TOAST:
|
|
127
|
-
return o.toast.id && Ct(o.toast.id), {
|
|
128
|
-
...t,
|
|
129
|
-
toasts: t.toasts.map((e) => e.id === o.toast.id ? {
|
|
130
|
-
...e,
|
|
131
|
-
...o.toast
|
|
132
|
-
} : e)
|
|
133
|
-
};
|
|
134
|
-
case l.UPSERT_TOAST:
|
|
135
|
-
const {
|
|
136
|
-
toast: i
|
|
137
|
-
} = o;
|
|
138
|
-
return t.toasts.find((e) => e.id === i.id) ? tt(t, {
|
|
139
|
-
type: l.UPDATE_TOAST,
|
|
140
|
-
toast: i
|
|
141
|
-
}) : tt(t, {
|
|
142
|
-
type: l.ADD_TOAST,
|
|
143
|
-
toast: i
|
|
144
|
-
});
|
|
145
|
-
case l.DISMISS_TOAST:
|
|
146
|
-
const {
|
|
147
|
-
toastId: r
|
|
148
|
-
} = o;
|
|
149
|
-
return r ? at(r) : t.toasts.forEach((e) => {
|
|
150
|
-
at(e.id);
|
|
151
|
-
}), {
|
|
152
|
-
...t,
|
|
153
|
-
toasts: t.toasts.map((e) => e.id === r || r === void 0 ? {
|
|
154
|
-
...e,
|
|
155
|
-
visible: !1
|
|
156
|
-
} : e)
|
|
157
|
-
};
|
|
158
|
-
case l.REMOVE_TOAST:
|
|
159
|
-
return o.toastId === void 0 ? {
|
|
160
|
-
...t,
|
|
161
|
-
toasts: []
|
|
162
|
-
} : {
|
|
163
|
-
...t,
|
|
164
|
-
toasts: t.toasts.filter((e) => e.id !== o.toastId)
|
|
165
|
-
};
|
|
166
|
-
case l.START_PAUSE:
|
|
167
|
-
return {
|
|
168
|
-
...t,
|
|
169
|
-
pausedAt: o.time
|
|
170
|
-
};
|
|
171
|
-
case l.END_PAUSE:
|
|
172
|
-
const s = o.time - (t.pausedAt || 0);
|
|
173
|
-
return {
|
|
174
|
-
...t,
|
|
175
|
-
pausedAt: void 0,
|
|
176
|
-
toasts: t.toasts.map((e) => ({
|
|
177
|
-
...e,
|
|
178
|
-
pauseDuration: e.pauseDuration + s
|
|
179
|
-
}))
|
|
180
|
-
};
|
|
181
|
-
}
|
|
182
|
-
}, j = [];
|
|
183
|
-
let G = {
|
|
184
|
-
toasts: [],
|
|
185
|
-
pausedAt: void 0
|
|
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;
|
|
186
5
|
};
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
loading: 1 / 0
|
|
196
|
-
}, $t = function() {
|
|
197
|
-
let t = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : {};
|
|
198
|
-
const [o, i] = v(G);
|
|
199
|
-
E(() => (j.push(i), () => {
|
|
200
|
-
const s = j.indexOf(i);
|
|
201
|
-
s > -1 && j.splice(s, 1);
|
|
202
|
-
}), [o]);
|
|
203
|
-
const r = o.toasts.filter((s) => (t == null ? void 0 : t.providerKey) === void 0 || s.providerKey === (t == null ? void 0 : t.providerKey) || s.providerKey === "PERSISTS").map((s) => {
|
|
204
|
-
var e;
|
|
205
|
-
return {
|
|
206
|
-
...t,
|
|
207
|
-
...t[s.type],
|
|
208
|
-
...s,
|
|
209
|
-
duration: s.duration || ((e = t[s.type]) === null || e === void 0 ? void 0 : e.duration) || (t == null ? void 0 : t.duration) || Ut[s.type],
|
|
210
|
-
styles: {
|
|
211
|
-
...(s == null ? void 0 : s.styles) ?? {}
|
|
212
|
-
}
|
|
6
|
+
var __assign = (this && this.__assign) || function () {
|
|
7
|
+
__assign = Object.assign || function(t) {
|
|
8
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
9
|
+
s = arguments[i];
|
|
10
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
11
|
+
t[p] = s[p];
|
|
12
|
+
}
|
|
13
|
+
return t;
|
|
213
14
|
};
|
|
214
|
-
|
|
215
|
-
return {
|
|
216
|
-
...o,
|
|
217
|
-
toasts: r
|
|
218
|
-
};
|
|
219
|
-
};
|
|
220
|
-
let A;
|
|
221
|
-
(function(t) {
|
|
222
|
-
t[t.TOP = 1] = "TOP", t[t.BOTTOM = 2] = "BOTTOM";
|
|
223
|
-
})(A || (A = {}));
|
|
224
|
-
const Lt = (t) => typeof t == "function", et = (t, o) => Lt(t) ? t(o) : t, Vt = /* @__PURE__ */ (() => {
|
|
225
|
-
let t = 0;
|
|
226
|
-
return () => (++t).toString();
|
|
227
|
-
})(), Wt = function(t) {
|
|
228
|
-
let o = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "blank", i = arguments.length > 2 ? arguments[2] : void 0;
|
|
229
|
-
return {
|
|
230
|
-
createdAt: Date.now(),
|
|
231
|
-
visible: !0,
|
|
232
|
-
type: o,
|
|
233
|
-
message: t,
|
|
234
|
-
pauseDuration: 0,
|
|
235
|
-
position: A.TOP,
|
|
236
|
-
providerKey: "DEFAULT",
|
|
237
|
-
...i,
|
|
238
|
-
id: (i == null ? void 0 : i.id) || Vt()
|
|
239
|
-
};
|
|
240
|
-
}, Y = (t) => (o, i) => {
|
|
241
|
-
const r = Wt(o, t, i);
|
|
242
|
-
return x({
|
|
243
|
-
type: l.UPSERT_TOAST,
|
|
244
|
-
toast: r
|
|
245
|
-
}), r.id;
|
|
246
|
-
}, c = (t, o) => Y("blank")(t, o);
|
|
247
|
-
c.error = Y("error");
|
|
248
|
-
c.success = Y("success");
|
|
249
|
-
c.loading = Y("loading");
|
|
250
|
-
c.dismiss = (t) => {
|
|
251
|
-
x({
|
|
252
|
-
type: l.DISMISS_TOAST,
|
|
253
|
-
toastId: t
|
|
254
|
-
});
|
|
15
|
+
return __assign.apply(this, arguments);
|
|
255
16
|
};
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
17
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
18
|
+
if (k2 === undefined) k2 = k;
|
|
19
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
20
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
21
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
22
|
+
}
|
|
23
|
+
Object.defineProperty(o, k2, desc);
|
|
24
|
+
}) : (function(o, m, k, k2) {
|
|
25
|
+
if (k2 === undefined) k2 = k;
|
|
26
|
+
o[k2] = m[k];
|
|
27
|
+
}));
|
|
28
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
29
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
30
|
+
}) : function(o, v) {
|
|
31
|
+
o["default"] = v;
|
|
259
32
|
});
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
id: r,
|
|
267
|
-
...i,
|
|
268
|
-
...i == null ? void 0 : i.success
|
|
269
|
-
}), s)).catch((s) => {
|
|
270
|
-
c.error(et(o.error, s), {
|
|
271
|
-
id: r,
|
|
272
|
-
...i,
|
|
273
|
-
...i == null ? void 0 : i.error
|
|
274
|
-
});
|
|
275
|
-
}), t;
|
|
33
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
34
|
+
if (mod && mod.__esModule) return mod;
|
|
35
|
+
var result = {};
|
|
36
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
37
|
+
__setModuleDefault(result, mod);
|
|
38
|
+
return result;
|
|
276
39
|
};
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
}
|
|
293
|
-
return setTimeout(() => c.dismiss(n.id), u);
|
|
294
|
-
});
|
|
295
|
-
return () => {
|
|
296
|
-
e.forEach((n) => n && clearTimeout(n));
|
|
297
|
-
};
|
|
298
|
-
}, [o, i]);
|
|
299
|
-
const r = q(() => ({
|
|
300
|
-
startPause: () => {
|
|
301
|
-
x({
|
|
302
|
-
type: l.START_PAUSE,
|
|
303
|
-
time: Date.now()
|
|
304
|
-
});
|
|
305
|
-
},
|
|
306
|
-
endPause: () => {
|
|
307
|
-
i && x({
|
|
308
|
-
type: l.END_PAUSE,
|
|
309
|
-
time: Date.now()
|
|
310
|
-
});
|
|
311
|
-
},
|
|
312
|
-
updateHeight: (s, e) => x({
|
|
313
|
-
type: l.UPDATE_TOAST,
|
|
314
|
-
toast: {
|
|
315
|
-
id: s,
|
|
316
|
-
height: e
|
|
317
|
-
}
|
|
318
|
-
}),
|
|
319
|
-
calculateOffset: (s, e) => {
|
|
320
|
-
const {
|
|
321
|
-
reverseOrder: n = !1,
|
|
322
|
-
gutter: u = 8,
|
|
323
|
-
defaultPosition: a
|
|
324
|
-
} = e || {}, p = o.filter((d) => (d.position || a) === (s.position || a) && d.height), h = p.findIndex((d) => d.id === s.id), m = p.filter((d, f) => f < h && d.visible).length;
|
|
325
|
-
return p.filter((d) => d.visible).slice(...n ? [m + 1] : [0, m]).reduce((d, f) => d + (f.height || 0) + u, 0);
|
|
326
|
-
}
|
|
327
|
-
}), [o, i]);
|
|
328
|
-
return {
|
|
329
|
-
toasts: o,
|
|
330
|
-
handlers: r
|
|
331
|
-
};
|
|
332
|
-
}, lt = Object.freeze({
|
|
333
|
-
screenX: 0,
|
|
334
|
-
screenY: 0,
|
|
335
|
-
width: 0,
|
|
336
|
-
height: 0
|
|
337
|
-
}), ut = {
|
|
338
|
-
start: lt,
|
|
339
|
-
end: lt
|
|
40
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
+
exports.showToast = exports.ToastsContainer = void 0;
|
|
42
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
+
var react_native_toast_1 = require("@backpackapp-io/react-native-toast");
|
|
44
|
+
var element_core_1 = require("@ovotech/element-core");
|
|
45
|
+
var react_1 = require("react");
|
|
46
|
+
var react_native_1 = require("react-native");
|
|
47
|
+
var react_native_reanimated_1 = __importStar(require("react-native-reanimated"));
|
|
48
|
+
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
49
|
+
var ActionList_1 = require("../ActionList");
|
|
50
|
+
var Icon_1 = require("../Icon");
|
|
51
|
+
var P_1 = require("../P");
|
|
52
|
+
var ToastsContainer = function (_a) {
|
|
53
|
+
var _b = _a.top, top = _b === void 0 ? -80 : _b;
|
|
54
|
+
return ((0, jsx_runtime_1.jsx)(react_native_toast_1.Toasts, { extraInsets: { top: top } }));
|
|
340
55
|
};
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
}
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
width: O,
|
|
403
|
-
height: g
|
|
404
|
-
} = Ot(), {
|
|
405
|
-
keyboardShown: R,
|
|
406
|
-
keyboardHeight: M
|
|
407
|
-
} = Kt();
|
|
408
|
-
jt(() => {
|
|
409
|
-
f == null || f(e);
|
|
410
|
-
}, () => {
|
|
411
|
-
m == null || m(e);
|
|
412
|
-
}, e.visible);
|
|
413
|
-
const z = Pt() === "dark", _ = h !== void 0 ? h : z, [I, gt] = v(e != null && e.height ? e.height : ct), [Q, Tt] = v(e != null && e.width ? e.width : O - 32 > 360 ? 360 : O - 32), y = q(() => e.position === A.TOP ? -50 : g - D.bottom - At.select({
|
|
414
|
-
ios: 0,
|
|
415
|
-
default: 32
|
|
416
|
-
}), [g, e.position, D.bottom]), J = K(0), C = K(y), k = K(y), vt = () => d == null ? void 0 : d(e), yt = it((S) => {
|
|
417
|
-
c.dismiss(S);
|
|
418
|
-
}, [c.dismiss]), V = it(() => {
|
|
419
|
-
if (e.position === A.TOP)
|
|
420
|
-
k.value = U(e.visible ? u : y), C.value = U(e.visible ? u : y);
|
|
421
|
-
else {
|
|
422
|
-
let S = R ? M : 0;
|
|
423
|
-
const W = e.visible ? y - I - u - S - D.bottom - 24 : y;
|
|
424
|
-
k.value = rt(W, {
|
|
425
|
-
stiffness: 80
|
|
426
|
-
}), C.value = rt(W, {
|
|
427
|
-
stiffness: 80
|
|
428
|
-
});
|
|
429
|
-
}
|
|
430
|
-
}, [u, e.visible, R, M, I, D.bottom, C, y, e.position, k]), St = q(() => {
|
|
431
|
-
const S = X.Pan().onUpdate((wt) => {
|
|
432
|
-
k.value = wt.translationY / 4 + C.value;
|
|
433
|
-
}).onEnd(() => {
|
|
434
|
-
nt(V)();
|
|
435
|
-
}), W = X.Fling().direction(e.position === A.TOP ? dt.UP : dt.DOWN).onEnd(() => {
|
|
436
|
-
k.value = U(y, {
|
|
437
|
-
duration: 40
|
|
438
|
-
}), nt(yt)(e.id);
|
|
439
|
-
});
|
|
440
|
-
return X.Simultaneous(W, S);
|
|
441
|
-
}, [k, y, C, V, e.position, e.id]);
|
|
442
|
-
E(() => {
|
|
443
|
-
gt(e != null && e.height ? e.height : ct);
|
|
444
|
-
}, [e.height]), E(() => {
|
|
445
|
-
Tt(e != null && e.width ? e.width : O - 32);
|
|
446
|
-
}, [e.width, O]), E(() => {
|
|
447
|
-
J.value = U(e.visible ? 1 : 0, {
|
|
448
|
-
duration: 300
|
|
56
|
+
exports.ToastsContainer = ToastsContainer;
|
|
57
|
+
var StyledView = styled_native_1.default.View(function (_a) {
|
|
58
|
+
var core = _a.theme.core, variant = _a.variant;
|
|
59
|
+
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background-color: ", ";\n overflow: hidden;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: ", ";\n padding-left: ", ";\n border-radius: ", ";\n flex-direction: row;\n "], ["\n background-color: ", ";\n overflow: hidden;\n padding-top: ", ";\n padding-bottom: ", ";\n padding-right: ", ";\n padding-left: ", ";\n border-radius: ", ";\n flex-direction: row;\n "])), variant === 'default'
|
|
60
|
+
? core.color.brand.forest
|
|
61
|
+
: core.color.red.darkest, (0, element_core_1.numToPx)(core.space[2]), (0, element_core_1.numToPx)(core.space[3]), (0, element_core_1.numToPx)(core.space[2]), (0, element_core_1.numToPx)(core.space[4]), (0, element_core_1.numToPx)(core.radius.max));
|
|
62
|
+
});
|
|
63
|
+
var StyledP = (0, styled_native_1.default)(P_1.P)(function (_a) {
|
|
64
|
+
var semantic = _a.theme.semantic;
|
|
65
|
+
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n color: ", ";\n "], ["\n color: ", ";\n "])), semantic.inverted.message.base);
|
|
66
|
+
});
|
|
67
|
+
var StyledThinBorder = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(function (_a) {
|
|
68
|
+
var core = _a.theme.core, variant = _a.variant;
|
|
69
|
+
return (0, styled_native_1.css)(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n background-color: ", ";\n height: 1px;\n "], ["\n background-color: ", ";\n height: 1px;\n "])), variant === 'default'
|
|
70
|
+
? core.color.brand.energised
|
|
71
|
+
: core.color.red.light);
|
|
72
|
+
});
|
|
73
|
+
var StyledThickBorder = (0, styled_native_1.default)(react_native_reanimated_1.default.View)(function (_a) {
|
|
74
|
+
var core = _a.theme.core, variant = _a.variant;
|
|
75
|
+
return (0, styled_native_1.css)(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n background-color: ", ";\n height: 3px;\n "], ["\n background-color: ", ";\n height: 3px;\n "])), variant === 'default'
|
|
76
|
+
? core.color.brand.leaf
|
|
77
|
+
: core.color.red.base);
|
|
78
|
+
});
|
|
79
|
+
var StyledCloseIcon = (0, styled_native_1.default)(react_native_1.TouchableOpacity)(function (_a) {
|
|
80
|
+
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
81
|
+
return (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n background-color: ", ";\n border-radius: ", ";\n width: ", ";\n height: ", ";\n padding: ", ";\n align-items: center;\n justify-content: center;\n "], ["\n background-color: ", ";\n border-radius: ", ";\n width: ", ";\n height: ", ";\n padding: ", ";\n align-items: center;\n justify-content: center;\n "])), semantic.inverted.surface, (0, element_core_1.numToPx)(core.radius.max), (0, element_core_1.numToPx)(core.space[7]), (0, element_core_1.numToPx)(core.space[7]), (0, element_core_1.numToPx)(core.space[2]));
|
|
82
|
+
});
|
|
83
|
+
var showToast = function (_a) {
|
|
84
|
+
var message = _a.message, _b = _a.dismissible, dismissible = _b === void 0 ? false : _b, action = _a.action, actionTitle = _a.actionTitle, _c = _a.variant, variant = _c === void 0 ? 'default' : _c, _d = _a.duration, duration = _d === void 0 ? 5000 : _d;
|
|
85
|
+
return action || dismissible
|
|
86
|
+
? react_native_toast_1.toast.loading(message, {
|
|
87
|
+
id: 'clipboard',
|
|
88
|
+
position: react_native_toast_1.ToastPosition.BOTTOM,
|
|
89
|
+
disableShadow: true,
|
|
90
|
+
customToast: function (t) { return ((0, jsx_runtime_1.jsx)(CustomToast, __assign({}, t, { dismissible: dismissible, action: action, actionTitle: actionTitle, variant: variant }), message)); },
|
|
91
|
+
})
|
|
92
|
+
: (0, react_native_toast_1.toast)(message, {
|
|
93
|
+
id: 'clipboard',
|
|
94
|
+
position: react_native_toast_1.ToastPosition.BOTTOM,
|
|
95
|
+
duration: duration,
|
|
96
|
+
disableShadow: true,
|
|
97
|
+
customToast: function (t) { return ((0, jsx_runtime_1.jsx)(CustomToastWithTimeIndicator, __assign({}, t, { variant: variant }), message)); },
|
|
98
|
+
});
|
|
99
|
+
};
|
|
100
|
+
exports.showToast = showToast;
|
|
101
|
+
var CustomToastWithTimeIndicator = function (_a) {
|
|
102
|
+
var message = _a.message, _b = _a.duration, duration = _b === void 0 ? 5000 : _b, variant = _a.variant;
|
|
103
|
+
var toastPadding = 20;
|
|
104
|
+
var textRef = (0, react_1.useRef)(null);
|
|
105
|
+
var _c = (0, react_1.useState)(0), textHeight = _c[0], setTextHeight = _c[1];
|
|
106
|
+
var windowWidth = react_native_1.Dimensions.get('window').width;
|
|
107
|
+
var screenPadding = 32;
|
|
108
|
+
var toastWidth = windowWidth - screenPadding;
|
|
109
|
+
var sharedWidth = (0, react_native_reanimated_1.useSharedValue)(toastWidth);
|
|
110
|
+
var style = (0, react_native_reanimated_1.useAnimatedStyle)(function () {
|
|
111
|
+
return {
|
|
112
|
+
width: (0, react_native_reanimated_1.withTiming)(sharedWidth.value, {
|
|
113
|
+
duration: duration,
|
|
114
|
+
easing: react_native_reanimated_1.Easing.linear,
|
|
115
|
+
}),
|
|
116
|
+
};
|
|
449
117
|
});
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
gesture: St
|
|
462
|
-
}, /* @__PURE__ */ b.createElement(Gt, {
|
|
463
|
-
onPressIn: a,
|
|
464
|
-
onPressOut: () => {
|
|
465
|
-
p();
|
|
466
|
-
},
|
|
467
|
-
onPress: vt,
|
|
468
|
-
style: [{
|
|
469
|
-
backgroundColor: e.customToast ? void 0 : _ ? P.backgroundDark : P.backgroundLight,
|
|
470
|
-
borderRadius: 8,
|
|
471
|
-
position: "absolute",
|
|
472
|
-
maxHeight: I,
|
|
473
|
-
left: (O - Q) / 2,
|
|
474
|
-
zIndex: e.visible ? 9999 : void 0,
|
|
475
|
-
alignItems: "center",
|
|
476
|
-
justifyContent: "center"
|
|
477
|
-
}, bt, !e.disableShadow && Ft("#181821", 0.15, !1), (o = e.styles) === null || o === void 0 ? void 0 : o.pressable]
|
|
478
|
-
}, e.customToast ? /* @__PURE__ */ b.createElement(H, {
|
|
479
|
-
onLayout: (S) => n(e.id, S.nativeEvent.layout.height),
|
|
480
|
-
key: e.id
|
|
481
|
-
}, e.customToast({
|
|
482
|
-
...e,
|
|
483
|
-
height: I,
|
|
484
|
-
width: Q
|
|
485
|
-
})) : /* @__PURE__ */ b.createElement(H, {
|
|
486
|
-
onLayout: (S) => n(e.id, S.nativeEvent.layout.height),
|
|
487
|
-
style: [{
|
|
488
|
-
height: I,
|
|
489
|
-
width: Q,
|
|
490
|
-
flexDirection: "row",
|
|
491
|
-
alignItems: "center",
|
|
492
|
-
paddingVertical: 12,
|
|
493
|
-
paddingHorizontal: 16
|
|
494
|
-
}, (i = e.styles) === null || i === void 0 ? void 0 : i.view],
|
|
495
|
-
key: e.id
|
|
496
|
-
}, (e.type === "error" || e.type === "success") && /* @__PURE__ */ b.createElement(H, {
|
|
497
|
-
style: [{
|
|
498
|
-
backgroundColor: e.type === "error" ? P.error : e.type === "success" ? P.success : _ ? P.backgroundDark : P.backgroundLight,
|
|
499
|
-
width: 3,
|
|
500
|
-
height: "100%",
|
|
501
|
-
borderRadius: 12,
|
|
502
|
-
marginRight: 12
|
|
503
|
-
}, e == null || (r = e.styles) === null || r === void 0 ? void 0 : r.indicator]
|
|
504
|
-
}), typeof e.icon == "string" ? /* @__PURE__ */ b.createElement(st, null, e.icon) : e.icon, /* @__PURE__ */ b.createElement(st, {
|
|
505
|
-
numberOfLines: 1,
|
|
506
|
-
style: [{
|
|
507
|
-
color: _ ? P.textLight : P.textDark,
|
|
508
|
-
padding: 4,
|
|
509
|
-
flex: 1
|
|
510
|
-
}, e == null || (s = e.styles) === null || s === void 0 ? void 0 : s.text]
|
|
511
|
-
}, et(e.message, e)))));
|
|
512
|
-
}, Yt = (t) => {
|
|
513
|
-
let {
|
|
514
|
-
overrideDarkMode: o,
|
|
515
|
-
extraInsets: i,
|
|
516
|
-
onToastHide: r,
|
|
517
|
-
onToastPress: s,
|
|
518
|
-
onToastShow: e,
|
|
519
|
-
providerKey: n = "DEFAULT"
|
|
520
|
-
} = t;
|
|
521
|
-
const {
|
|
522
|
-
toasts: u,
|
|
523
|
-
handlers: a
|
|
524
|
-
} = Bt({
|
|
525
|
-
providerKey: n
|
|
526
|
-
}), {
|
|
527
|
-
startPause: p,
|
|
528
|
-
endPause: h
|
|
529
|
-
} = a, m = pt();
|
|
530
|
-
return /* @__PURE__ */ b.createElement(H, {
|
|
531
|
-
style: {
|
|
532
|
-
position: "absolute",
|
|
533
|
-
top: m.top + ((i == null ? void 0 : i.top) ?? 0) + 16,
|
|
534
|
-
left: m.left + ((i == null ? void 0 : i.left) ?? 0),
|
|
535
|
-
right: m.right + ((i == null ? void 0 : i.right) ?? 0),
|
|
536
|
-
bottom: m.bottom + ((i == null ? void 0 : i.bottom) ?? 0) + 16
|
|
537
|
-
},
|
|
538
|
-
pointerEvents: "box-none"
|
|
539
|
-
}, u.map((d) => /* @__PURE__ */ b.createElement(Nt, {
|
|
540
|
-
key: d.id,
|
|
541
|
-
toast: d,
|
|
542
|
-
startPause: p,
|
|
543
|
-
endPause: h,
|
|
544
|
-
updateHeight: a.updateHeight,
|
|
545
|
-
offset: a.calculateOffset(d, {
|
|
546
|
-
reverseOrder: !0
|
|
547
|
-
}),
|
|
548
|
-
overrideDarkMode: o,
|
|
549
|
-
onToastHide: r,
|
|
550
|
-
onToastPress: s,
|
|
551
|
-
onToastShow: e
|
|
552
|
-
})));
|
|
553
|
-
}, No = ({ top: t = -80 }) => /* @__PURE__ */ T(Yt, { extraInsets: { top: t } }), ht = $.View(
|
|
554
|
-
({ theme: { core: t }, variant: o }) => L`
|
|
555
|
-
background-color: ${o === "default" ? t.color.brand.forest : t.color.red.darkest};
|
|
556
|
-
overflow: hidden;
|
|
557
|
-
padding-top: ${w(t.space[2])};
|
|
558
|
-
padding-bottom: ${w(t.space[3])};
|
|
559
|
-
padding-right: ${w(t.space[2])};
|
|
560
|
-
padding-left: ${w(t.space[4])};
|
|
561
|
-
border-radius: ${w(t.radius.max)};
|
|
562
|
-
flex-direction: row;
|
|
563
|
-
`
|
|
564
|
-
), ft = $(Rt)(
|
|
565
|
-
({ theme: { semantic: t } }) => L`
|
|
566
|
-
color: ${t.inverted.message.base};
|
|
567
|
-
`
|
|
568
|
-
), zt = $(ot.View)(
|
|
569
|
-
({ theme: { core: t }, variant: o }) => L`
|
|
570
|
-
background-color: ${o === "default" ? t.color.brand.energised : t.color.red.light};
|
|
571
|
-
height: 1px;
|
|
572
|
-
`
|
|
573
|
-
), Qt = $(ot.View)(
|
|
574
|
-
({ theme: { core: t }, variant: o }) => L`
|
|
575
|
-
background-color: ${o === "default" ? t.color.brand.leaf : t.color.red.base};
|
|
576
|
-
height: 3px;
|
|
577
|
-
`
|
|
578
|
-
), Jt = $(Dt)(
|
|
579
|
-
({ theme: { core: t, semantic: o } }) => L`
|
|
580
|
-
background-color: ${o.inverted.surface};
|
|
581
|
-
border-radius: ${w(t.radius.max)};
|
|
582
|
-
width: ${w(t.space[7])};
|
|
583
|
-
height: ${w(t.space[7])};
|
|
584
|
-
padding: ${w(t.space[2])};
|
|
585
|
-
align-items: center;
|
|
586
|
-
justify-content: center;
|
|
587
|
-
`
|
|
588
|
-
), Yo = ({
|
|
589
|
-
message: t,
|
|
590
|
-
dismissible: o = !1,
|
|
591
|
-
action: i,
|
|
592
|
-
actionTitle: r,
|
|
593
|
-
variant: s = "default",
|
|
594
|
-
duration: e = 5e3
|
|
595
|
-
}) => i || o ? c.loading(t, {
|
|
596
|
-
id: "clipboard",
|
|
597
|
-
position: A.BOTTOM,
|
|
598
|
-
disableShadow: !0,
|
|
599
|
-
customToast: (n) => /* @__PURE__ */ T(
|
|
600
|
-
qt,
|
|
601
|
-
{
|
|
602
|
-
...n,
|
|
603
|
-
dismissible: o,
|
|
604
|
-
action: i,
|
|
605
|
-
actionTitle: r,
|
|
606
|
-
variant: s
|
|
607
|
-
},
|
|
608
|
-
t
|
|
609
|
-
)
|
|
610
|
-
}) : c(t, {
|
|
611
|
-
id: "clipboard",
|
|
612
|
-
position: A.BOTTOM,
|
|
613
|
-
duration: e,
|
|
614
|
-
disableShadow: !0,
|
|
615
|
-
customToast: (n) => /* @__PURE__ */ T(
|
|
616
|
-
Xt,
|
|
617
|
-
{
|
|
618
|
-
...n,
|
|
619
|
-
variant: s
|
|
620
|
-
},
|
|
621
|
-
t
|
|
622
|
-
)
|
|
623
|
-
}), Xt = ({
|
|
624
|
-
message: t,
|
|
625
|
-
duration: o = 5e3,
|
|
626
|
-
variant: i
|
|
627
|
-
}) => {
|
|
628
|
-
const s = Z(null), [e, n] = v(0), p = _t.get("window").width - 32, h = K(p), m = mt(() => ({
|
|
629
|
-
width: U(h.value, {
|
|
630
|
-
duration: o,
|
|
631
|
-
easing: kt.linear
|
|
632
|
-
})
|
|
633
|
-
}));
|
|
634
|
-
return E(() => {
|
|
635
|
-
h.value = 0;
|
|
636
|
-
}, []), /* @__PURE__ */ N(
|
|
637
|
-
ht,
|
|
638
|
-
{
|
|
639
|
-
variant: i,
|
|
640
|
-
style: {
|
|
641
|
-
width: p,
|
|
642
|
-
height: e + 20,
|
|
643
|
-
flexWrap: "wrap"
|
|
644
|
-
},
|
|
645
|
-
children: [
|
|
646
|
-
/* @__PURE__ */ T(
|
|
647
|
-
ft,
|
|
648
|
-
{
|
|
649
|
-
ref: s,
|
|
650
|
-
onLayout: () => {
|
|
651
|
-
var d;
|
|
652
|
-
(d = s.current) == null || d.measureInWindow((f, D, O, g) => {
|
|
653
|
-
n(g);
|
|
654
|
-
});
|
|
655
|
-
},
|
|
656
|
-
children: t
|
|
657
|
-
}
|
|
658
|
-
),
|
|
659
|
-
/* @__PURE__ */ N(H, { style: { position: "absolute", bottom: 0 }, children: [
|
|
660
|
-
/* @__PURE__ */ T(zt, { variant: i, style: m }),
|
|
661
|
-
/* @__PURE__ */ T(Qt, { variant: i, style: m })
|
|
662
|
-
] })
|
|
663
|
-
]
|
|
664
|
-
}
|
|
665
|
-
);
|
|
666
|
-
}, qt = ({
|
|
667
|
-
id: t,
|
|
668
|
-
message: o,
|
|
669
|
-
dismissible: i,
|
|
670
|
-
action: r,
|
|
671
|
-
actionTitle: s,
|
|
672
|
-
width: e,
|
|
673
|
-
variant: n
|
|
674
|
-
}) => {
|
|
675
|
-
const a = Z(null), p = Z(null), [h, m] = v(0), [d, f] = v(0), D = Math.floor(h) === Math.floor(d) && !i ? h : h + d, O = () => {
|
|
676
|
-
r && s && (r(), c.dismiss(t));
|
|
677
|
-
};
|
|
678
|
-
return /* @__PURE__ */ N(
|
|
679
|
-
ht,
|
|
680
|
-
{
|
|
681
|
-
variant: n,
|
|
682
|
-
style: {
|
|
683
|
-
width: e,
|
|
684
|
-
height: D + 20,
|
|
685
|
-
alignItems: r ? "flex-start" : "center"
|
|
686
|
-
},
|
|
687
|
-
children: [
|
|
688
|
-
/* @__PURE__ */ N(
|
|
689
|
-
H,
|
|
690
|
-
{
|
|
691
|
-
style: {
|
|
692
|
-
flexDirection: "row",
|
|
693
|
-
flexWrap: "wrap",
|
|
694
|
-
justifyContent: "space-between",
|
|
695
|
-
flex: 1
|
|
696
|
-
},
|
|
697
|
-
children: [
|
|
698
|
-
/* @__PURE__ */ T(
|
|
699
|
-
ft,
|
|
700
|
-
{
|
|
701
|
-
ref: a,
|
|
702
|
-
onLayout: () => {
|
|
703
|
-
var g;
|
|
704
|
-
(g = a.current) == null || g.measureInWindow((R, M, z, _) => {
|
|
705
|
-
m(_);
|
|
706
|
-
});
|
|
707
|
-
},
|
|
708
|
-
children: o
|
|
709
|
-
}
|
|
710
|
-
),
|
|
711
|
-
r && s ? /* @__PURE__ */ T(
|
|
712
|
-
It,
|
|
713
|
-
{
|
|
714
|
-
ref: p,
|
|
715
|
-
style: { width: "auto" },
|
|
716
|
-
inverted: !0,
|
|
717
|
-
inline: !0,
|
|
718
|
-
iconRight: "chevron-right-small",
|
|
719
|
-
onPress: O,
|
|
720
|
-
onLayout: () => {
|
|
721
|
-
var g;
|
|
722
|
-
(g = p.current) == null || g.measureInWindow((R, M, z, _) => {
|
|
723
|
-
f(_);
|
|
118
|
+
(0, react_1.useEffect)(function () {
|
|
119
|
+
sharedWidth.value = 0;
|
|
120
|
+
}, []);
|
|
121
|
+
return ((0, jsx_runtime_1.jsxs)(StyledView, { variant: variant, style: {
|
|
122
|
+
width: toastWidth,
|
|
123
|
+
height: textHeight + toastPadding,
|
|
124
|
+
flexWrap: 'wrap',
|
|
125
|
+
}, children: [(0, jsx_runtime_1.jsx)(StyledP, { ref: textRef, onLayout: function () {
|
|
126
|
+
var _a;
|
|
127
|
+
(_a = textRef.current) === null || _a === void 0 ? void 0 : _a.measureInWindow(function (_x, _y, _width, height) {
|
|
128
|
+
setTextHeight(height);
|
|
724
129
|
});
|
|
725
|
-
|
|
726
|
-
children: s
|
|
727
|
-
}
|
|
728
|
-
) : null
|
|
729
|
-
]
|
|
730
|
-
}
|
|
731
|
-
),
|
|
732
|
-
i ? /* @__PURE__ */ T(Jt, { onPress: () => c.dismiss(t), children: /* @__PURE__ */ T(Ht, { name: "cross", color: "#fff", size: 14 }) }) : null
|
|
733
|
-
]
|
|
734
|
-
}
|
|
735
|
-
);
|
|
130
|
+
}, children: message }), (0, jsx_runtime_1.jsxs)(react_native_1.View, { style: { position: 'absolute', bottom: 0 }, children: [(0, jsx_runtime_1.jsx)(StyledThinBorder, { variant: variant, style: style }), (0, jsx_runtime_1.jsx)(StyledThickBorder, { variant: variant, style: style })] })] }));
|
|
736
131
|
};
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
132
|
+
var CustomToast = function (_a) {
|
|
133
|
+
var id = _a.id, message = _a.message, dismissible = _a.dismissible, action = _a.action, actionTitle = _a.actionTitle, width = _a.width, variant = _a.variant;
|
|
134
|
+
var toastPadding = 20;
|
|
135
|
+
var textRef = (0, react_1.useRef)(null);
|
|
136
|
+
var actionRef = (0, react_1.useRef)(null);
|
|
137
|
+
var _b = (0, react_1.useState)(0), textHeight = _b[0], setTextHeight = _b[1];
|
|
138
|
+
var _c = (0, react_1.useState)(0), actionHeight = _c[0], setActionHeight = _c[1];
|
|
139
|
+
var toastHeight = Math.floor(textHeight) === Math.floor(actionHeight) && !dismissible // handling multiline
|
|
140
|
+
? textHeight
|
|
141
|
+
: textHeight + actionHeight;
|
|
142
|
+
var handleAction = function () {
|
|
143
|
+
if (action && actionTitle) {
|
|
144
|
+
action();
|
|
145
|
+
react_native_toast_1.toast.dismiss(id);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
return ((0, jsx_runtime_1.jsxs)(StyledView, { variant: variant, style: {
|
|
149
|
+
width: width,
|
|
150
|
+
height: toastHeight + toastPadding,
|
|
151
|
+
alignItems: action ? 'flex-start' : 'center',
|
|
152
|
+
}, children: [(0, jsx_runtime_1.jsxs)(react_native_1.View, { style: {
|
|
153
|
+
flexDirection: 'row',
|
|
154
|
+
flexWrap: 'wrap',
|
|
155
|
+
justifyContent: 'space-between',
|
|
156
|
+
flex: 1,
|
|
157
|
+
}, children: [(0, jsx_runtime_1.jsx)(StyledP, { ref: textRef, onLayout: function () {
|
|
158
|
+
var _a;
|
|
159
|
+
(_a = textRef.current) === null || _a === void 0 ? void 0 : _a.measureInWindow(function (_x, _y, _width, height) {
|
|
160
|
+
setTextHeight(height);
|
|
161
|
+
});
|
|
162
|
+
}, children: message }), action && actionTitle ? ((0, jsx_runtime_1.jsx)(ActionList_1.Action, { ref: actionRef, style: { width: 'auto' }, inverted: true, inline: true, iconRight: "chevron-right-small", onPress: handleAction, onLayout: function () {
|
|
163
|
+
var _a;
|
|
164
|
+
(_a = actionRef.current) === null || _a === void 0 ? void 0 : _a.measureInWindow(function (_x, _y, _width, height) {
|
|
165
|
+
setActionHeight(height);
|
|
166
|
+
});
|
|
167
|
+
}, children: actionTitle })) : null] }), dismissible ? ((0, jsx_runtime_1.jsx)(StyledCloseIcon, { onPress: function () { return react_native_toast_1.toast.dismiss(id); }, children: (0, jsx_runtime_1.jsx)(Icon_1.Icon, { name: "cross", color: "#fff", size: 14 }) })) : null] }));
|
|
740
168
|
};
|
|
169
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|