@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,66 +1,58 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
return result;
|
|
28
|
-
};
|
|
29
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
30
|
-
exports.StyledLeftIcon = exports.StyledRightIcon = exports.StyledActionNodeWrapper = exports.StyledActionText = exports.StyledActionInner = exports.StyledActionWrapper = exports.StyledActionList = void 0;
|
|
31
|
-
var element_core_1 = require("@ovotech/element-core");
|
|
32
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
33
|
-
var utils_1 = require("../../utils");
|
|
34
|
-
var Icon_1 = require("../Icon");
|
|
35
|
-
var StyledList = styled_native_1.default.View(function (_a) {
|
|
36
|
-
var core = _a.theme.core, smallAndUp = _a.smallAndUp;
|
|
37
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "], ["\n flex-direction: column;\n margin-top: ", ";\n margin-bottom: ", ";\n "])), (0, element_core_1.numToPx)(smallAndUp ? core.space[3] : core.space[2]), (0, element_core_1.numToPx)(smallAndUp ? core.space[3] : core.space[2]));
|
|
38
|
-
});
|
|
39
|
-
exports.StyledActionList = (0, utils_1.styledComponentWithBreakpoints)(StyledList);
|
|
40
|
-
exports.StyledActionWrapper = styled_native_1.default.View(function (_a) {
|
|
41
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, hasBorder = _a.hasBorder, inverted = _a.inverted;
|
|
42
|
-
return "\n width: 100%;\n align-self: flex-start;\n border-bottom-width: ".concat(hasBorder ? (0, element_core_1.numToPx)(core.borderWidth.small) : 0, ";\n border-bottom-style: solid;\n border-bottom-color: ").concat(inverted ? semantic.inverted.border : semantic.border.graphic, ";\n");
|
|
43
|
-
});
|
|
44
|
-
exports.StyledActionInner = styled_native_1.default.View(function (_a) {
|
|
45
|
-
var fullWidth = _a.fullWidth, inline = _a.inline, standalone = _a.standalone;
|
|
46
|
-
return (0, styled_native_1.css)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "], ["\n display: flex;\n flex-direction: row;\n justify-content: ", ";\n align-items: center;\n min-height: ", ";\n "])), fullWidth ? 'space-between' : 'flex-start', inline || standalone ? '' : '44px');
|
|
47
|
-
});
|
|
48
|
-
exports.StyledActionText = styled_native_1.default.Text(function (_a) {
|
|
49
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp, _c = _a.inverted, inverted = _c === void 0 ? false : _c, _d = _a.inList, inList = _d === void 0 ? false : _d;
|
|
50
|
-
var fontSize = smallAndUp
|
|
1
|
+
import { numToPx } from '@ovotech/element-core';
|
|
2
|
+
import styled, { css } from '../../styled.native';
|
|
3
|
+
import { styledComponentWithBreakpoints } from '../../utils';
|
|
4
|
+
import { Icon } from '../Icon';
|
|
5
|
+
const StyledList = styled.View(({ theme: { core }, smallAndUp }) => css `
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
margin-top: ${numToPx(smallAndUp ? core.space[3] : core.space[2])};
|
|
8
|
+
margin-bottom: ${numToPx(smallAndUp ? core.space[3] : core.space[2])};
|
|
9
|
+
`);
|
|
10
|
+
export const StyledActionList = styledComponentWithBreakpoints(StyledList);
|
|
11
|
+
export const StyledActionWrapper = styled.View(({ theme: { core, semantic }, hasBorder, inverted }) => `
|
|
12
|
+
width: 100%;
|
|
13
|
+
align-self: flex-start;
|
|
14
|
+
border-bottom-width: ${hasBorder ? numToPx(core.borderWidth.small) : 0};
|
|
15
|
+
border-bottom-style: solid;
|
|
16
|
+
border-bottom-color: ${inverted ? semantic.inverted.border : semantic.border.graphic};
|
|
17
|
+
`);
|
|
18
|
+
export const StyledActionInner = styled.View(({ fullWidth, inline, standalone }) => css `
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row;
|
|
21
|
+
justify-content: ${fullWidth ? 'space-between' : 'flex-start'};
|
|
22
|
+
align-items: center;
|
|
23
|
+
min-height: ${inline || standalone ? '' : '44px'};
|
|
24
|
+
`);
|
|
25
|
+
export const StyledActionText = styled.Text(({ theme: { core, semantic }, smallAndUp, inverted = false, inList = false, }) => {
|
|
26
|
+
const fontSize = smallAndUp
|
|
51
27
|
? core.fontSize.body.large
|
|
52
28
|
: core.fontSize.body.small;
|
|
53
|
-
return
|
|
29
|
+
return css `
|
|
30
|
+
color: ${inverted
|
|
54
31
|
? semantic.inverted.message.base
|
|
55
|
-
: semantic.message.base
|
|
32
|
+
: semantic.message.base};
|
|
33
|
+
font-family: ${core.fontFamily.bodyBold.native};
|
|
34
|
+
font-size: ${numToPx(fontSize)};
|
|
35
|
+
line-height: ${numToPx(core.lineHeight.body.small)};
|
|
36
|
+
flex: ${inList ? 1 : 'none'};
|
|
37
|
+
`;
|
|
56
38
|
});
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
39
|
+
export const StyledActionNodeWrapper = styled.View `
|
|
40
|
+
display: flex;
|
|
41
|
+
flex: 1;
|
|
42
|
+
flex-direction: row;
|
|
43
|
+
`;
|
|
44
|
+
export const StyledRightIcon = styled(Icon)(({ theme: { core, semantic }, inverted }) => {
|
|
45
|
+
return css `
|
|
46
|
+
color: ${inverted ? semantic.inverted.message.base : semantic.message.base};
|
|
47
|
+
margin-left: ${numToPx(core.space[1])};
|
|
48
|
+
margin-top: 2px; /* compensation for the line-height of the text */
|
|
49
|
+
`;
|
|
61
50
|
});
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
51
|
+
export const StyledLeftIcon = styled(Icon)(({ theme: { core, semantic }, inverted, }) => {
|
|
52
|
+
return css `
|
|
53
|
+
color: ${inverted ? semantic.inverted.message.base : semantic.message.base};
|
|
54
|
+
margin-right: ${numToPx(core.space[1])};
|
|
55
|
+
margin-top: ${numToPx(core.space[1])};
|
|
56
|
+
align-self: flex-start;
|
|
57
|
+
`;
|
|
65
58
|
});
|
|
66
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|
|
@@ -219,9 +219,9 @@ declare const StyledBadge: import("styled-components").StyledComponent<typeof im
|
|
|
219
219
|
large: number;
|
|
220
220
|
};
|
|
221
221
|
customMediaQuery: {
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
222
|
+
"small-and-up": number;
|
|
223
|
+
"medium-and-up": number;
|
|
224
|
+
"large-and-up": number;
|
|
225
225
|
};
|
|
226
226
|
opacity: {
|
|
227
227
|
solid: number;
|
|
@@ -235,22 +235,22 @@ declare const StyledBadge: import("styled-components").StyledComponent<typeof im
|
|
|
235
235
|
max: number;
|
|
236
236
|
};
|
|
237
237
|
space: {
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
238
|
+
"0": number;
|
|
239
|
+
"1": number;
|
|
240
|
+
"2": number;
|
|
241
|
+
"3": number;
|
|
242
|
+
"4": number;
|
|
243
|
+
"5": number;
|
|
244
|
+
"6": number;
|
|
245
|
+
"7": number;
|
|
246
|
+
"8": number;
|
|
247
|
+
"9": number;
|
|
248
|
+
"10": number;
|
|
249
|
+
"11": number;
|
|
250
|
+
"12": number;
|
|
251
|
+
"13": number;
|
|
252
|
+
"14": number;
|
|
253
|
+
"15": number;
|
|
254
254
|
};
|
|
255
255
|
transition: {
|
|
256
256
|
slow: number;
|
|
@@ -306,22 +306,22 @@ declare const StyledBadge: import("styled-components").StyledComponent<typeof im
|
|
|
306
306
|
};
|
|
307
307
|
data: {
|
|
308
308
|
branded: {
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
309
|
+
"1": string;
|
|
310
|
+
"2": string;
|
|
311
|
+
"3": string;
|
|
312
|
+
"4": string;
|
|
313
313
|
};
|
|
314
314
|
electric: {
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
315
|
+
"1": string;
|
|
316
|
+
"2": string;
|
|
317
|
+
"3": string;
|
|
318
|
+
"4": string;
|
|
319
319
|
};
|
|
320
320
|
gas: {
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
321
|
+
"1": string;
|
|
322
|
+
"2": string;
|
|
323
|
+
"3": string;
|
|
324
|
+
"4": string;
|
|
325
325
|
};
|
|
326
326
|
};
|
|
327
327
|
focus: {
|
|
@@ -570,9 +570,9 @@ declare const StyledBadge: import("styled-components").StyledComponent<typeof im
|
|
|
570
570
|
customVariant?: {
|
|
571
571
|
backgroundColor: string;
|
|
572
572
|
foregroundColor: string;
|
|
573
|
-
}
|
|
574
|
-
inverted?: boolean
|
|
575
|
-
variant?: BadgeVariantName
|
|
573
|
+
};
|
|
574
|
+
inverted?: boolean;
|
|
575
|
+
variant?: BadgeVariantName;
|
|
576
576
|
}, never>;
|
|
577
577
|
type BadgeProps = ComponentProps<typeof StyledBadge>;
|
|
578
578
|
export declare const Badge: ({ children, variant, inverted, ...rest }: BadgeProps) => import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,62 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
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;
|
|
14
|
-
};
|
|
15
|
-
return __assign.apply(this, arguments);
|
|
16
|
-
};
|
|
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;
|
|
32
|
-
});
|
|
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;
|
|
39
|
-
};
|
|
40
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
-
var t = {};
|
|
42
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
-
t[p[i]] = s[p[i]];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.Badge = void 0;
|
|
53
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
-
var element_core_1 = require("@ovotech/element-core");
|
|
55
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
56
|
-
var StyledBadge = styled_native_1.default.View(function (_a) {
|
|
57
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, component = _b.component, _c = _a.variant, variant = _c === void 0 ? 'info' : _c, _d = _a.inverted, inverted = _d === void 0 ? false : _d, customVariant = _a.customVariant;
|
|
58
|
-
var surface;
|
|
59
|
-
var message;
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { numToPx } from '@ovotech/element-core';
|
|
3
|
+
import styled, { css } from '../../styled.native';
|
|
4
|
+
const StyledBadge = styled.View(({ theme: { core, semantic, component }, variant = 'info', inverted = false, customVariant, }) => {
|
|
5
|
+
let surface;
|
|
6
|
+
let message;
|
|
60
7
|
if (variant in semantic) {
|
|
61
8
|
surface = semantic[variant].surface;
|
|
62
9
|
message = semantic[variant].message;
|
|
@@ -65,16 +12,22 @@ var StyledBadge = styled_native_1.default.View(function (_a) {
|
|
|
65
12
|
surface = component.badge.variants[variant].background;
|
|
66
13
|
message = component.badge.variants[variant].foreground;
|
|
67
14
|
}
|
|
68
|
-
if (
|
|
15
|
+
if (customVariant?.foregroundColor && customVariant?.backgroundColor) {
|
|
69
16
|
surface = customVariant.backgroundColor;
|
|
70
17
|
message = customVariant.foregroundColor;
|
|
71
18
|
}
|
|
72
|
-
return
|
|
19
|
+
return css `
|
|
20
|
+
padding: 2px ${numToPx(core.space[2])};
|
|
21
|
+
border-radius: 16px;
|
|
22
|
+
border: ${numToPx(core.borderWidth.medium)} solid
|
|
23
|
+
${core.color.brand.white};
|
|
24
|
+
background-color: ${inverted ? message : surface};
|
|
25
|
+
align-self: flex-start;
|
|
26
|
+
`;
|
|
73
27
|
});
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
var message;
|
|
28
|
+
const StyledBadgeText = styled.Text(({ theme: { core, semantic, component }, variant = 'info', inverted = false, customVariant, }) => {
|
|
29
|
+
let surface;
|
|
30
|
+
let message;
|
|
78
31
|
if (variant in semantic) {
|
|
79
32
|
surface = semantic[variant].surface;
|
|
80
33
|
message = semantic[variant].message;
|
|
@@ -83,15 +36,17 @@ var StyledBadgeText = styled_native_1.default.Text(function (_a) {
|
|
|
83
36
|
surface = component.badge.variants[variant].background;
|
|
84
37
|
message = component.badge.variants[variant].foreground;
|
|
85
38
|
}
|
|
86
|
-
if (
|
|
39
|
+
if (customVariant?.foregroundColor && customVariant?.backgroundColor) {
|
|
87
40
|
surface = customVariant.backgroundColor;
|
|
88
41
|
message = customVariant.foregroundColor;
|
|
89
42
|
}
|
|
90
|
-
return
|
|
43
|
+
return css `
|
|
44
|
+
font-family: ${core.fontFamily.bodyBold.native};
|
|
45
|
+
line-height: ${numToPx(core.lineHeight.body.small)};
|
|
46
|
+
color: ${inverted ? surface : message};
|
|
47
|
+
font-size: ${numToPx(core.fontSize.body.small)};
|
|
48
|
+
`;
|
|
91
49
|
});
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
return ((0, jsx_runtime_1.jsx)(StyledBadge, __assign({ variant: variant, inverted: inverted }, rest, { children: (0, jsx_runtime_1.jsx)(StyledBadgeText, { variant: variant, inverted: inverted, children: children }) })));
|
|
50
|
+
export const Badge = ({ children, variant, inverted, ...rest }) => {
|
|
51
|
+
return (_jsx(StyledBadge, { variant: variant, inverted: inverted, ...rest, children: _jsx(StyledBadgeText, { variant: variant, inverted: inverted, children: children }) }));
|
|
95
52
|
};
|
|
96
|
-
exports.Badge = Badge;
|
|
97
|
-
var templateObject_1, templateObject_2;
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Badge = void 0;
|
|
4
|
-
var Badge_1 = require("./Badge");
|
|
5
|
-
Object.defineProperty(exports, "Badge", { enumerable: true, get: function () { return Badge_1.Badge; } });
|
|
1
|
+
export { Badge } from './Badge';
|
|
@@ -1,20 +1,18 @@
|
|
|
1
|
-
import { ComponentProps, PropsWithChildren,
|
|
1
|
+
import { ComponentProps, PropsWithChildren, RefObject } from 'react';
|
|
2
2
|
import { TouchableOpacity, TouchableOpacityProps } from 'react-native';
|
|
3
3
|
import { IconName } from '../../providers/types';
|
|
4
4
|
export type CTAVariantName = 'primary' | 'secondary' | 'destructive';
|
|
5
5
|
type CTAButtonProps = PropsWithChildren<TouchableOpacityProps & {
|
|
6
|
+
fullWidth?: boolean;
|
|
6
7
|
iconLeft?: IconName | 'off';
|
|
7
8
|
iconRight?: IconName | 'off';
|
|
8
|
-
fullWidth?: boolean;
|
|
9
|
-
variant?: CTAVariantName;
|
|
10
|
-
ref?: Ref<TouchableOpacity>;
|
|
11
9
|
inverted?: boolean;
|
|
10
|
+
ref?: RefObject<typeof TouchableOpacity>;
|
|
11
|
+
variant?: CTAVariantName;
|
|
12
12
|
}>;
|
|
13
|
-
declare const CTAButton: ({ iconLeft, iconRight, children, fullWidth, variant, inverted, ...rest }: CTAButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
-
type CTAProps = Omit<ComponentProps<typeof CTAButton>, 'variant'
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
declare const
|
|
18
|
-
declare const SecondaryCTAButton: import("react").ForwardRefExoticComponent<Omit<CTAProps, "ref"> & import("react").RefAttributes<TouchableOpacity>>;
|
|
19
|
-
declare const DestructiveCTAButton: import("react").ForwardRefExoticComponent<Omit<CTAProps, "ref"> & import("react").RefAttributes<TouchableOpacity>>;
|
|
13
|
+
declare const CTAButton: ({ iconLeft, iconRight, children, fullWidth, variant, inverted, accessibilityRole, activeOpacity, ref, ...rest }: CTAButtonProps) => import("react/jsx-runtime").JSX.Element;
|
|
14
|
+
type CTAProps = Omit<ComponentProps<typeof CTAButton>, 'variant'>;
|
|
15
|
+
declare const PrimaryCTAButton: (props: CTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
declare const SecondaryCTAButton: (props: CTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
declare const DestructiveCTAButton: (props: CTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
20
18
|
export { CTAButton, PrimaryCTAButton, SecondaryCTAButton, DestructiveCTAButton, };
|
|
@@ -1,119 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
};
|
|
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;
|
|
32
|
-
});
|
|
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;
|
|
39
|
-
};
|
|
40
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
41
|
-
var t = {};
|
|
42
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
43
|
-
t[p] = s[p];
|
|
44
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
45
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
46
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
47
|
-
t[p[i]] = s[p[i]];
|
|
48
|
-
}
|
|
49
|
-
return t;
|
|
50
|
-
};
|
|
51
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
52
|
-
exports.DestructiveCTAButton = exports.SecondaryCTAButton = exports.PrimaryCTAButton = exports.CTAButton = void 0;
|
|
53
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
54
|
-
var element_core_1 = require("@ovotech/element-core");
|
|
55
|
-
var react_1 = require("react");
|
|
56
|
-
var hooks_1 = require("../../hooks");
|
|
57
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
58
|
-
var Icon_1 = require("../Icon/Icon");
|
|
59
|
-
var StyledCTAWrapper = styled_native_1.default.TouchableOpacity(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n align-self: flex-start;\n flex-direction: row;\n align-items: flex-start;\n"], ["\n align-self: flex-start;\n flex-direction: row;\n align-items: flex-start;\n"])));
|
|
60
|
-
var CTAButtonWrapper = function (_a) {
|
|
61
|
-
var children = _a.children, _b = _a.accessibilityRole, accessibilityRole = _b === void 0 ? 'button' : _b, _c = _a.activeOpacity, activeOpacity = _c === void 0 ? 0.8 : _c, rest = __rest(_a, ["children", "accessibilityRole", "activeOpacity"]);
|
|
62
|
-
return ((0, jsx_runtime_1.jsx)(StyledCTAWrapper, __assign({ accessible: true, accessibilityRole: accessibilityRole, activeOpacity: activeOpacity }, rest, { children: children })));
|
|
63
|
-
};
|
|
64
|
-
var StyledInner = styled_native_1.default.View(function (_a) {
|
|
65
|
-
var _b = _a.theme, core = _b.core, component = _b.component, fullWidth = _a.fullWidth, variant = _a.variant, inverted = _a.inverted;
|
|
66
|
-
var currentVariant = component.cta[variant];
|
|
67
|
-
var borderRadius = core.space[11] / 2 + 'px';
|
|
68
|
-
var backgroundColor = variant === 'secondary'
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { numToPx } from '@ovotech/element-core';
|
|
3
|
+
import { useBreakpoint } from '../../hooks';
|
|
4
|
+
import styled, { css } from '../../styled.native';
|
|
5
|
+
import { Icon } from '../Icon/Icon';
|
|
6
|
+
const StyledCTAWrapper = styled.TouchableOpacity `
|
|
7
|
+
align-self: flex-start;
|
|
8
|
+
flex-direction: row;
|
|
9
|
+
align-items: flex-start;
|
|
10
|
+
`;
|
|
11
|
+
const CTAButtonWrapper = ({ children, accessibilityRole = 'button', activeOpacity = 0.8, ...rest }) => (_jsx(StyledCTAWrapper, { accessible: true, accessibilityRole: accessibilityRole, activeOpacity: activeOpacity, ...rest, children: children }));
|
|
12
|
+
const StyledInner = styled.View(({ theme: { core, component }, fullWidth, variant, inverted }) => {
|
|
13
|
+
const currentVariant = component.cta[variant];
|
|
14
|
+
const borderRadius = core.space[11] / 2 + 'px';
|
|
15
|
+
const backgroundColor = variant === 'secondary'
|
|
69
16
|
? 'transparent'
|
|
70
17
|
: inverted
|
|
71
18
|
? currentVariant.surfaceInverted
|
|
72
19
|
: currentVariant.surface;
|
|
73
|
-
|
|
20
|
+
const borderColor = inverted
|
|
74
21
|
? core.color.brand.white
|
|
75
22
|
: core.color.brand.forest;
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
-
|
|
23
|
+
return css `
|
|
24
|
+
padding: ${numToPx(core.space[2])} ${numToPx(core.space[4])};
|
|
25
|
+
background-color: ${backgroundColor};
|
|
26
|
+
border-radius: ${borderRadius};
|
|
27
|
+
min-height: ${numToPx(core.space[11])};
|
|
28
|
+
border: ${variant === 'secondary'
|
|
29
|
+
? `solid ${numToPx(core.borderWidth.small)} ${borderColor}`
|
|
30
|
+
: 'none'};
|
|
31
|
+
justify-content: center;
|
|
32
|
+
align-items: center;
|
|
33
|
+
flex-direction: row;
|
|
34
|
+
flex-grow: ${fullWidth ? '1' : '0'};
|
|
35
|
+
`;
|
|
79
36
|
});
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
var color = inverted
|
|
37
|
+
const StyledRightIcon = styled(Icon)(({ theme: { core, component }, variant, inverted }) => {
|
|
38
|
+
const currentVariant = component.cta[variant];
|
|
39
|
+
const color = inverted
|
|
84
40
|
? currentVariant.messageInverted
|
|
85
41
|
: currentVariant.message;
|
|
86
|
-
return
|
|
42
|
+
return css `
|
|
43
|
+
margin-left: ${numToPx(core.space[1])};
|
|
44
|
+
color: ${color};
|
|
45
|
+
`;
|
|
87
46
|
});
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
var color = inverted
|
|
47
|
+
const StyledLeftIcon = styled(Icon)(({ theme: { core, component }, variant, inverted }) => {
|
|
48
|
+
const currentVariant = component.cta[variant];
|
|
49
|
+
const color = inverted
|
|
92
50
|
? currentVariant.messageInverted
|
|
93
51
|
: currentVariant.message;
|
|
94
|
-
return
|
|
52
|
+
return css `
|
|
53
|
+
margin-right: ${numToPx(core.space[1])};
|
|
54
|
+
color: ${color};
|
|
55
|
+
`;
|
|
95
56
|
});
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
var fontSize = smallAndUp
|
|
57
|
+
const StyledCTAButtonText = styled.Text(({ theme: { core, component }, smallAndUp, variant, inverted }) => {
|
|
58
|
+
const fontSize = smallAndUp
|
|
99
59
|
? core.fontSize.body.large
|
|
100
60
|
: core.fontSize.body.small;
|
|
101
|
-
|
|
102
|
-
|
|
61
|
+
const currentVariant = component.cta[variant];
|
|
62
|
+
const color = inverted
|
|
103
63
|
? currentVariant.messageInverted
|
|
104
64
|
: currentVariant.message;
|
|
105
|
-
return
|
|
65
|
+
return css `
|
|
66
|
+
color: ${color};
|
|
67
|
+
font-family: ${core.fontFamily.bodyBold.native};
|
|
68
|
+
font-size: ${numToPx(fontSize)};
|
|
69
|
+
line-height: ${numToPx(core.lineHeight.body.small)};
|
|
70
|
+
text-align: center;
|
|
71
|
+
flex-shrink: 2;
|
|
72
|
+
`;
|
|
106
73
|
});
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
return ((0, jsx_runtime_1.jsx)(CTAButtonWrapper, __assign({}, rest, { children: (0, jsx_runtime_1.jsxs)(StyledInner, { fullWidth: fullWidth, variant: variant, inverted: inverted, children: [iconLeft !== 'off' ? ((0, jsx_runtime_1.jsx)(StyledLeftIcon, { name: iconLeft, size: 16, variant: variant, inverted: inverted })) : null, (0, jsx_runtime_1.jsx)(StyledCTAButtonText, { smallAndUp: smallAndUp, variant: variant, inverted: inverted, children: children }), iconRight !== 'off' ? ((0, jsx_runtime_1.jsx)(StyledRightIcon, { name: iconRight, size: 16, variant: variant, inverted: inverted })) : null] }) })));
|
|
74
|
+
const CTAButton = ({ iconLeft = 'off', iconRight = 'off', children, fullWidth = false, variant = 'primary', inverted = false, accessibilityRole = 'button', activeOpacity = 0.8, ref, ...rest }) => {
|
|
75
|
+
const { smallAndUp } = useBreakpoint();
|
|
76
|
+
return (_jsx(CTAButtonWrapper, { accessible: true, accessibilityRole: accessibilityRole, activeOpacity: activeOpacity, ref: ref, ...rest, children: _jsxs(StyledInner, { fullWidth: fullWidth, variant: variant, inverted: inverted, children: [iconLeft !== 'off' ? (_jsx(StyledLeftIcon, { name: iconLeft, size: 16, variant: variant, inverted: inverted })) : null, _jsx(StyledCTAButtonText, { smallAndUp: smallAndUp, variant: variant, inverted: inverted, children: children }), iconRight !== 'off' ? (_jsx(StyledRightIcon, { name: iconRight, size: 16, variant: variant, inverted: inverted })) : null] }) }));
|
|
111
77
|
};
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
exports.SecondaryCTAButton = SecondaryCTAButton;
|
|
117
|
-
var DestructiveCTAButton = (0, react_1.forwardRef)(function (props, ref) { return ((0, jsx_runtime_1.jsx)(CTAButton, __assign({ variant: "destructive" }, props, { ref: ref }))); });
|
|
118
|
-
exports.DestructiveCTAButton = DestructiveCTAButton;
|
|
119
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
78
|
+
const PrimaryCTAButton = (props) => (_jsx(CTAButton, { variant: "primary", ...props }));
|
|
79
|
+
const SecondaryCTAButton = (props) => (_jsx(CTAButton, { variant: "secondary", ...props }));
|
|
80
|
+
const DestructiveCTAButton = (props) => (_jsx(CTAButton, { variant: "destructive", ...props }));
|
|
81
|
+
export { CTAButton, PrimaryCTAButton, SecondaryCTAButton, DestructiveCTAButton, };
|
|
@@ -1,8 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SecondaryCTAButton = exports.PrimaryCTAButton = exports.DestructiveCTAButton = exports.CTAButton = void 0;
|
|
4
|
-
var CTAButton_1 = require("./CTAButton");
|
|
5
|
-
Object.defineProperty(exports, "CTAButton", { enumerable: true, get: function () { return CTAButton_1.CTAButton; } });
|
|
6
|
-
Object.defineProperty(exports, "DestructiveCTAButton", { enumerable: true, get: function () { return CTAButton_1.DestructiveCTAButton; } });
|
|
7
|
-
Object.defineProperty(exports, "PrimaryCTAButton", { enumerable: true, get: function () { return CTAButton_1.PrimaryCTAButton; } });
|
|
8
|
-
Object.defineProperty(exports, "SecondaryCTAButton", { enumerable: true, get: function () { return CTAButton_1.SecondaryCTAButton; } });
|
|
1
|
+
export { CTAButton, DestructiveCTAButton, PrimaryCTAButton, SecondaryCTAButton, } from './CTAButton';
|
|
@@ -1,11 +1,8 @@
|
|
|
1
|
-
import { ComponentProps
|
|
2
|
-
import { TouchableOpacity } from 'react-native';
|
|
1
|
+
import { ComponentProps } from 'react';
|
|
3
2
|
import { CTAButton } from '../CTAButton';
|
|
4
|
-
type CTALinkProps =
|
|
5
|
-
|
|
6
|
-
};
|
|
7
|
-
declare const CTALink: import("react").ForwardRefExoticComponent<Omit<CTALinkProps, "ref"> & import("react").RefAttributes<TouchableOpacity>>;
|
|
3
|
+
type CTALinkProps = ComponentProps<typeof CTAButton>;
|
|
4
|
+
declare const CTALink: (props: CTALinkProps) => import("react/jsx-runtime").JSX.Element;
|
|
8
5
|
type CTAProps = Omit<ComponentProps<typeof CTALink>, 'variant'>;
|
|
9
|
-
declare const PrimaryCTALink:
|
|
10
|
-
declare const SecondaryCTALink:
|
|
6
|
+
declare const PrimaryCTALink: (props: CTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare const SecondaryCTALink: (props: CTAProps) => import("react/jsx-runtime").JSX.Element;
|
|
11
8
|
export { CTALink, PrimaryCTALink, SecondaryCTALink };
|