@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,87 +1,100 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
1
|
+
import { numToPx } from '@ovotech/element-core';
|
|
2
|
+
import styled, { css } from '../../styled.native';
|
|
3
|
+
export const StyledTableContainer = styled.View(({ theme: { core, semantic } }) => css `
|
|
4
|
+
flex-grow: 1;
|
|
5
|
+
border-bottom-width: ${numToPx(core.borderWidth.small)};
|
|
6
|
+
border-bottom-color: ${semantic.border.differentiated};
|
|
7
|
+
`);
|
|
8
|
+
export const TableHeader = styled.View(({ theme: { core }, cellWidth, smallAndUp }) => css `
|
|
9
|
+
padding-top: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
10
|
+
padding-bottom: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
11
|
+
padding-left: ${numToPx(core.space[1])};
|
|
12
|
+
padding-right: ${numToPx(core.space[1])};
|
|
13
|
+
flex: ${cellWidth === 'auto' ? 1 : 0};
|
|
14
|
+
align-self: stretch;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
width: ${cellWidth};
|
|
17
|
+
`);
|
|
18
|
+
export const TableHeaderText = styled.Text(({ theme: { semantic, core }, smallAndUp }) => css `
|
|
19
|
+
font-family: ${core.fontFamily.bodyBold.native};
|
|
20
|
+
line-height: ${numToPx(core.lineHeight.body[smallAndUp ? 'large' : 'small'])};
|
|
21
|
+
font-size: ${numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small'])};
|
|
22
|
+
color: ${semantic.message.base};
|
|
23
|
+
text-align: left;
|
|
24
|
+
flex-wrap: wrap;
|
|
25
|
+
`);
|
|
26
|
+
export const TableCaptionText = styled.Text(({ theme: { core, semantic }, smallAndUp }) => css `
|
|
27
|
+
font-family: ${core.fontFamily.bodyBold.native};
|
|
28
|
+
font-size: ${numToPx(core.fontSize.heading4[smallAndUp ? 'large' : 'small'])};
|
|
29
|
+
line-height: ${numToPx(core.lineHeight.heading4[smallAndUp ? 'large' : 'small'])};
|
|
30
|
+
color: ${semantic.message.branded};
|
|
31
|
+
text-align: left;
|
|
32
|
+
flex-wrap: wrap;
|
|
33
|
+
`);
|
|
34
|
+
export const CellText = styled.Text(({ theme: { core }, smallAndUp }) => css `
|
|
35
|
+
font-family: ${core.fontFamily.body.native};
|
|
36
|
+
line-height: ${numToPx(core.lineHeight.body.large)};
|
|
37
|
+
font-size: ${numToPx(core.fontSize.body[smallAndUp ? 'large' : 'small'])};
|
|
38
|
+
`);
|
|
39
|
+
export const TableCaption = styled.View(({ theme: { core } }) => css `
|
|
40
|
+
padding: ${numToPx(core.space[4])} ${numToPx(core.space[2])};
|
|
41
|
+
`);
|
|
42
|
+
export const TableRow = styled.View(({ theme: { semantic, core }, stripe }) => css `
|
|
43
|
+
background-color: ${stripe
|
|
44
|
+
? semantic.surface.cutout
|
|
45
|
+
: semantic.surface.base};
|
|
46
|
+
flex-direction: row;
|
|
47
|
+
align-items: stretch;
|
|
48
|
+
border-bottom-width: ${stripe ? '0px' : numToPx(core.borderWidth.small)};
|
|
49
|
+
border-bottom-color: ${stripe
|
|
50
|
+
? 'transparent'
|
|
51
|
+
: `${semantic.border.differentiated}`};
|
|
52
|
+
`);
|
|
53
|
+
export const TableRowHeading = styled.View(({ theme: { semantic, core } }) => css `
|
|
54
|
+
background-color: ${semantic.surface.base};
|
|
55
|
+
border-bottom-width: ${numToPx(core.borderWidth.small)};
|
|
56
|
+
border-bottom-color: ${semantic.border.functional};
|
|
57
|
+
flex-direction: row;
|
|
58
|
+
align-items: stretch;
|
|
59
|
+
`);
|
|
60
|
+
export const TableBody = styled.View `
|
|
61
|
+
flex-direction: column;
|
|
62
|
+
flex-wrap: nowrap;
|
|
63
|
+
`;
|
|
64
|
+
export const TableCell = styled.View(({ theme: { core }, cellWidth, smallAndUp }) => {
|
|
65
|
+
return css `
|
|
66
|
+
padding-top: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
67
|
+
padding-bottom: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
68
|
+
padding-left: ${numToPx(core.space[2])};
|
|
69
|
+
padding-right: ${numToPx(core.space[2])};
|
|
70
|
+
width: ${cellWidth};
|
|
71
|
+
flex: ${cellWidth === 'auto' ? 1 : 0};
|
|
72
|
+
`;
|
|
21
73
|
});
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
};
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
var element_core_1 = require("@ovotech/element-core");
|
|
32
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
33
|
-
exports.StyledTableContainer = styled_native_1.default.View(function (_a) {
|
|
34
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic;
|
|
35
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n flex-grow: 1;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), (0, element_core_1.numToPx)(core.borderWidth.small), semantic.border.differentiated);
|
|
74
|
+
export const RowHeading = styled.View(({ theme: { core }, cellWidth, smallAndUp }) => {
|
|
75
|
+
return css `
|
|
76
|
+
padding-top: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
77
|
+
padding-bottom: ${numToPx(core.space[smallAndUp ? 3 : 2])};
|
|
78
|
+
padding-left: ${numToPx(core.space[2])};
|
|
79
|
+
padding-right: ${numToPx(core.space[2])};
|
|
80
|
+
width: ${cellWidth};
|
|
81
|
+
flex: ${cellWidth === 'auto' ? 1 : 0};
|
|
82
|
+
`;
|
|
36
83
|
});
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
return
|
|
84
|
+
export const StyledSeparatorRow = styled.View(({ theme: { core, semantic }, width }) => {
|
|
85
|
+
const minWidth = width ? `${width - core.space[2] * 2}px` : '100%';
|
|
86
|
+
return `
|
|
87
|
+
min-width: ${minWidth};
|
|
88
|
+
flex: 1;
|
|
89
|
+
flex-direction: row;
|
|
90
|
+
background-color: ${semantic.surface.elevated};
|
|
91
|
+
padding: ${numToPx(core.space[1])} ${numToPx(core.space[2])};
|
|
92
|
+
`;
|
|
40
93
|
});
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
});
|
|
49
|
-
exports.CellText = styled_native_1.default.Text(function (_a) {
|
|
50
|
-
var core = _a.theme.core, smallAndUp = _a.smallAndUp;
|
|
51
|
-
return (0, styled_native_1.css)(templateObject_5 || (templateObject_5 = __makeTemplateObject(["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "], ["\n font-family: ", ";\n line-height: ", ";\n font-size: ", ";\n "])), core.fontFamily.body.native, (0, element_core_1.numToPx)(core.lineHeight.body.large), (0, element_core_1.numToPx)(core.fontSize.body[smallAndUp ? 'large' : 'small']));
|
|
52
|
-
});
|
|
53
|
-
exports.TableCaption = styled_native_1.default.View(function (_a) {
|
|
54
|
-
var core = _a.theme.core;
|
|
55
|
-
return (0, styled_native_1.css)(templateObject_6 || (templateObject_6 = __makeTemplateObject(["\n padding: ", " ", ";\n "], ["\n padding: ", " ", ";\n "])), (0, element_core_1.numToPx)(core.space[4]), (0, element_core_1.numToPx)(core.space[2]));
|
|
56
|
-
});
|
|
57
|
-
exports.TableRow = styled_native_1.default.View(function (_a) {
|
|
58
|
-
var _b = _a.theme, semantic = _b.semantic, core = _b.core, stripe = _a.stripe;
|
|
59
|
-
return (0, styled_native_1.css)(templateObject_7 || (templateObject_7 = __makeTemplateObject(["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "], ["\n background-color: ", ";\n flex-direction: row;\n align-items: stretch;\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n "])), stripe
|
|
60
|
-
? semantic.surface.cutout
|
|
61
|
-
: semantic.surface.base, stripe ? '0px' : (0, element_core_1.numToPx)(core.borderWidth.small), stripe
|
|
62
|
-
? 'transparent'
|
|
63
|
-
: "".concat(semantic.border.differentiated));
|
|
64
|
-
});
|
|
65
|
-
exports.TableRowHeading = styled_native_1.default.View(function (_a) {
|
|
66
|
-
var _b = _a.theme, semantic = _b.semantic, core = _b.core;
|
|
67
|
-
return (0, styled_native_1.css)(templateObject_8 || (templateObject_8 = __makeTemplateObject(["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "], ["\n background-color: ", ";\n border-bottom-width: ", ";\n border-bottom-color: ", ";\n flex-direction: row;\n align-items: stretch;\n "])), semantic.surface.base, (0, element_core_1.numToPx)(core.borderWidth.small), semantic.border.functional);
|
|
68
|
-
});
|
|
69
|
-
exports.TableBody = styled_native_1.default.View(templateObject_9 || (templateObject_9 = __makeTemplateObject(["\n flex-direction: column;\n flex-wrap: nowrap;\n"], ["\n flex-direction: column;\n flex-wrap: nowrap;\n"])));
|
|
70
|
-
exports.TableCell = styled_native_1.default.View(function (_a) {
|
|
71
|
-
var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
|
|
72
|
-
return (0, styled_native_1.css)(templateObject_10 || (templateObject_10 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), (0, element_core_1.numToPx)(core.space[smallAndUp ? 3 : 2]), (0, element_core_1.numToPx)(core.space[smallAndUp ? 3 : 2]), (0, element_core_1.numToPx)(core.space[2]), (0, element_core_1.numToPx)(core.space[2]), cellWidth, cellWidth === 'auto' ? 1 : 0);
|
|
73
|
-
});
|
|
74
|
-
exports.RowHeading = styled_native_1.default.View(function (_a) {
|
|
75
|
-
var core = _a.theme.core, cellWidth = _a.cellWidth, smallAndUp = _a.smallAndUp;
|
|
76
|
-
return (0, styled_native_1.css)(templateObject_11 || (templateObject_11 = __makeTemplateObject(["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "], ["\n padding-top: ", ";\n padding-bottom: ", ";\n padding-left: ", ";\n padding-right: ", ";\n width: ", ";\n flex: ", ";\n "])), (0, element_core_1.numToPx)(core.space[smallAndUp ? 3 : 2]), (0, element_core_1.numToPx)(core.space[smallAndUp ? 3 : 2]), (0, element_core_1.numToPx)(core.space[2]), (0, element_core_1.numToPx)(core.space[2]), cellWidth, cellWidth === 'auto' ? 1 : 0);
|
|
77
|
-
});
|
|
78
|
-
exports.StyledSeparatorRow = styled_native_1.default.View(function (_a) {
|
|
79
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, width = _a.width;
|
|
80
|
-
var minWidth = width ? "".concat(width - core.space[2] * 2, "px") : '100%';
|
|
81
|
-
return "\n min-width: ".concat(minWidth, ";\n flex: 1;\n flex-direction: row;\n background-color: ").concat(semantic.surface.elevated, ";\n padding: ").concat((0, element_core_1.numToPx)(core.space[1]), " ").concat((0, element_core_1.numToPx)(core.space[2]), ";\n ");
|
|
82
|
-
});
|
|
83
|
-
exports.SeparatorRowText = styled_native_1.default.Text(function (_a) {
|
|
84
|
-
var _b = _a.theme, core = _b.core, semantic = _b.semantic, smallAndUp = _a.smallAndUp;
|
|
85
|
-
return "\n flex: 1;\n font-family: ".concat(core.fontFamily.body.native, ";\n font-size: ").concat((0, element_core_1.numToPx)(core.fontSize.small[smallAndUp ? 'large' : 'small']), ";\n line-height: ").concat((0, element_core_1.numToPx)(core.lineHeight.small[smallAndUp ? 'large' : 'small']), ";\n color: ").concat(semantic.message.secondary, ";\n");
|
|
86
|
-
});
|
|
87
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6, templateObject_7, templateObject_8, templateObject_9, templateObject_10, templateObject_11;
|
|
94
|
+
export const SeparatorRowText = styled.Text(({ theme: { core, semantic }, smallAndUp }) => `
|
|
95
|
+
flex: 1;
|
|
96
|
+
font-family: ${core.fontFamily.body.native};
|
|
97
|
+
font-size: ${numToPx(core.fontSize.small[smallAndUp ? 'large' : 'small'])};
|
|
98
|
+
line-height: ${numToPx(core.lineHeight.small[smallAndUp ? 'large' : 'small'])};
|
|
99
|
+
color: ${semantic.message.secondary};
|
|
100
|
+
`);
|
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { ReactNode, RefObject } from 'react';
|
|
2
2
|
import { TextInput } from 'react-native';
|
|
3
3
|
export type DateFormat = {
|
|
4
4
|
day: string;
|
|
@@ -7,14 +7,16 @@ export type DateFormat = {
|
|
|
7
7
|
};
|
|
8
8
|
type Props = {
|
|
9
9
|
label: string;
|
|
10
|
-
|
|
10
|
+
value: DateFormat;
|
|
11
|
+
autoFocusNext?: boolean;
|
|
12
|
+
editable?: boolean;
|
|
11
13
|
error?: ReactNode;
|
|
14
|
+
fullWidth?: boolean;
|
|
15
|
+
hint?: ReactNode;
|
|
12
16
|
optional?: boolean;
|
|
13
17
|
onChange: (date: DateFormat) => void;
|
|
14
|
-
|
|
15
|
-
fullWidth?: boolean;
|
|
18
|
+
ref?: RefObject<TextInput>;
|
|
16
19
|
testID?: string;
|
|
17
|
-
editable?: boolean;
|
|
18
20
|
};
|
|
19
|
-
export declare const DateField:
|
|
21
|
+
export declare const DateField: ({ autoFocusNext, label, hint, error, optional, fullWidth, onChange, value, testID, editable, ref, }: Props) => import("react/jsx-runtime").JSX.Element;
|
|
20
22
|
export {};
|
|
@@ -1,89 +1,68 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
};
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
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
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
41
|
-
exports.DateField = void 0;
|
|
42
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
43
|
-
var element_core_1 = require("@ovotech/element-core");
|
|
44
|
-
var react_1 = require("react");
|
|
45
|
-
var react_native_1 = require("react-native");
|
|
46
|
-
var styled_native_1 = __importStar(require("../../styled.native"));
|
|
47
|
-
var utils_1 = require("../../utils");
|
|
48
|
-
var ErrorText_1 = require("../ErrorText");
|
|
49
|
-
var FormGroup_1 = require("../FormGroup");
|
|
50
|
-
var HintText_1 = require("../HintText");
|
|
51
|
-
var LabelText_1 = require("../LabelText");
|
|
52
|
-
var NumberInput_1 = require("../NumberInput");
|
|
53
|
-
var Stack_1 = require("../Stack");
|
|
54
|
-
var SubLabelText_1 = require("../SubLabelText");
|
|
55
|
-
var InlineFields = styled_native_1.default.View(function (_a) {
|
|
56
|
-
var stretch = _a.stretch, core = _a.theme.core;
|
|
57
|
-
var margin = (0, element_core_1.numToPx)(core.space[1]);
|
|
58
|
-
return (0, styled_native_1.css)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "], ["\n margin-left: -", ";\n margin-right: -", ";\n flex-direction: row;\n ", "\n "])), margin, margin, stretch ? '' : "width: 265px;");
|
|
1
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { numToPx } from '@ovotech/element-core';
|
|
3
|
+
import { useRef } from 'react';
|
|
4
|
+
import { TouchableWithoutFeedback, View } from 'react-native';
|
|
5
|
+
import styled, { css } from '../../styled.native';
|
|
6
|
+
import { mergeRefs, getText } from '../../utils';
|
|
7
|
+
import { ErrorText } from '../ErrorText';
|
|
8
|
+
import { FormGroup } from '../FormGroup';
|
|
9
|
+
import { HintText } from '../HintText';
|
|
10
|
+
import { LabelText } from '../LabelText';
|
|
11
|
+
import { NumberInput } from '../NumberInput';
|
|
12
|
+
import { Stack } from '../Stack';
|
|
13
|
+
import { SubLabelText } from '../SubLabelText';
|
|
14
|
+
const InlineFields = styled.View(({ stretch, theme: { core } }) => {
|
|
15
|
+
const margin = numToPx(core.space[1]);
|
|
16
|
+
return css `
|
|
17
|
+
margin-left: -${margin};
|
|
18
|
+
margin-right: -${margin};
|
|
19
|
+
flex-direction: row;
|
|
20
|
+
${stretch ? '' : `width: 265px;`}
|
|
21
|
+
`;
|
|
59
22
|
});
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
23
|
+
const SubField = styled(Stack)(({ theme: { core } }) => {
|
|
24
|
+
const padding = numToPx(core.space[1]);
|
|
25
|
+
return css `
|
|
26
|
+
padding-right: ${padding};
|
|
27
|
+
padding-left: ${padding};
|
|
28
|
+
`;
|
|
64
29
|
});
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
30
|
+
const DayField = styled(SubField) `
|
|
31
|
+
width: 25%;
|
|
32
|
+
`;
|
|
33
|
+
const MonthField = styled(SubField) `
|
|
34
|
+
width: 25%;
|
|
35
|
+
`;
|
|
36
|
+
const YearField = styled(SubField) `
|
|
37
|
+
width: 50%;
|
|
38
|
+
`;
|
|
39
|
+
export const DateField = ({ autoFocusNext = false, label, hint, error, optional = false, fullWidth = false, onChange, value, testID, editable = true, ref, }) => {
|
|
40
|
+
const hasError = !!error;
|
|
41
|
+
const dayRef = useRef(null);
|
|
42
|
+
const monthRef = useRef(null);
|
|
43
|
+
const yearRef = useRef(null);
|
|
44
|
+
const nextFieldRef = {
|
|
45
|
+
day: monthRef,
|
|
46
|
+
month: yearRef,
|
|
47
|
+
};
|
|
48
|
+
const handleChange = (key) => (datePartValue) => {
|
|
73
49
|
onChange &&
|
|
74
|
-
onChange(
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
50
|
+
onChange({
|
|
51
|
+
...value,
|
|
52
|
+
[key]: datePartValue,
|
|
53
|
+
});
|
|
54
|
+
if (key !== 'year' && autoFocusNext) {
|
|
55
|
+
const nextField = nextFieldRef[key].current;
|
|
56
|
+
if (nextField && datePartValue.length === 2) {
|
|
57
|
+
nextField.focus();
|
|
58
|
+
}
|
|
59
|
+
}
|
|
81
60
|
};
|
|
82
|
-
|
|
61
|
+
const accessibilityLabel = (labelText) => [labelText, getText(hint), getText(error)].filter(Boolean).join(', ');
|
|
62
|
+
const focusRef = (internalRef) => () => {
|
|
83
63
|
if (internalRef.current) {
|
|
84
64
|
internalRef.current.focus();
|
|
85
65
|
}
|
|
86
|
-
};
|
|
87
|
-
return ((
|
|
88
|
-
}
|
|
89
|
-
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5;
|
|
66
|
+
};
|
|
67
|
+
return (_jsx(FormGroup, { error: hasError, children: _jsxs(Stack, { spaceBetween: 1, children: [_jsxs(View, { children: [_jsxs(LabelText, { children: [label, optional ? ' (optional)' : null] }), hint ? _jsx(HintText, { children: hint }) : null, error ? _jsx(ErrorText, { children: error }) : null] }), _jsxs(InlineFields, { stretch: fullWidth, children: [_jsxs(DayField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(dayRef), accessible: false, children: _jsx(SubLabelText, { children: "Day" }) }), _jsx(NumberInput, { ref: mergeRefs(dayRef, ref), accessibilityLabel: accessibilityLabel('Day'), invalid: hasError, value: value.day, onChangeText: handleChange('day'), testID: testID, stretch: true, editable: editable })] }), _jsxs(MonthField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(monthRef), accessible: false, children: _jsx(SubLabelText, { children: "Month" }) }), _jsx(NumberInput, { ref: monthRef, accessibilityLabel: accessibilityLabel('Month'), invalid: hasError, value: value.month, onChangeText: handleChange('month'), testID: `${testID}-month`, stretch: true, editable: editable })] }), _jsxs(YearField, { spaceBetween: 1, children: [_jsx(TouchableWithoutFeedback, { onPress: focusRef(yearRef), accessible: false, children: _jsx(SubLabelText, { children: "Year" }) }), _jsx(NumberInput, { ref: yearRef, accessibilityLabel: accessibilityLabel('Year'), invalid: hasError, value: value.year, onChangeText: handleChange('year'), testID: `${testID}-year`, stretch: true, editable: editable, maxLength: 4 })] })] })] }) }));
|
|
68
|
+
};
|
|
@@ -1,5 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DateField = void 0;
|
|
4
|
-
var DateField_1 = require("./DateField");
|
|
5
|
-
Object.defineProperty(exports, "DateField", { enumerable: true, get: function () { return DateField_1.DateField; } });
|
|
1
|
+
export { DateField } from './DateField';
|
|
@@ -1,44 +1,12 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
14
|
-
var t = {};
|
|
15
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
16
|
-
t[p] = s[p];
|
|
17
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
18
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
19
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
20
|
-
t[p[i]] = s[p[i]];
|
|
21
|
-
}
|
|
22
|
-
return t;
|
|
23
|
-
};
|
|
24
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.DescriptionItem = exports.DescriptionList = void 0;
|
|
26
|
-
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
27
|
-
var react_1 = require("react");
|
|
28
|
-
var utils_1 = require("../../utils");
|
|
29
|
-
var styled_1 = require("./styled");
|
|
30
|
-
var DescriptionList = function (_a) {
|
|
31
|
-
var children = _a.children, rest = __rest(_a, ["children"]);
|
|
32
|
-
var validChildren = (0, utils_1.getValidChildren)(children);
|
|
33
|
-
return ((0, jsx_runtime_1.jsx)(styled_1.Dl, __assign({}, rest, { children: react_1.Children.map(validChildren, function (child, index) {
|
|
34
|
-
return (0, react_1.cloneElement)(child, {
|
|
35
|
-
index: index,
|
|
36
|
-
});
|
|
37
|
-
}) })));
|
|
38
|
-
};
|
|
39
|
-
exports.DescriptionList = DescriptionList;
|
|
40
|
-
var DescriptionItem = function (_a) {
|
|
41
|
-
var label = _a.label, children = _a.children, index = _a.index, rest = __rest(_a, ["label", "children", "index"]);
|
|
42
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styled_1.Dt, { style: index === 0 ? { marginTop: 0 } : undefined, children: label }), (0, jsx_runtime_1.jsx)(styled_1.Dd, __assign({}, rest, { children: children }))] }));
|
|
43
|
-
};
|
|
44
|
-
exports.DescriptionItem = DescriptionItem;
|
|
1
|
+
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Children, cloneElement, } from 'react';
|
|
3
|
+
import { getValidChildren } from '../../utils';
|
|
4
|
+
import { Dd, Dl, Dt } from './styled';
|
|
5
|
+
const DescriptionList = ({ children, ...rest }) => {
|
|
6
|
+
const validChildren = getValidChildren(children);
|
|
7
|
+
return (_jsx(Dl, { ...rest, children: Children.map(validChildren, (child, index) => cloneElement(child, {
|
|
8
|
+
index,
|
|
9
|
+
})) }));
|
|
10
|
+
};
|
|
11
|
+
const DescriptionItem = ({ label, children, index, ...rest }) => (_jsxs(_Fragment, { children: [_jsx(Dt, { style: index === 0 ? { marginTop: 0 } : undefined, children: label }), _jsx(Dd, { ...rest, children: children })] }));
|
|
12
|
+
export { DescriptionList, DescriptionItem };
|
|
@@ -1,6 +1 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.DescriptionItem = exports.DescriptionList = void 0;
|
|
4
|
-
var DescriptionList_1 = require("./DescriptionList");
|
|
5
|
-
Object.defineProperty(exports, "DescriptionList", { enumerable: true, get: function () { return DescriptionList_1.DescriptionList; } });
|
|
6
|
-
Object.defineProperty(exports, "DescriptionItem", { enumerable: true, get: function () { return DescriptionList_1.DescriptionItem; } });
|
|
1
|
+
export { DescriptionList, DescriptionItem } from './DescriptionList';
|
|
@@ -218,9 +218,9 @@ export declare const Dl: import("styled-components").StyledComponent<typeof impo
|
|
|
218
218
|
large: number;
|
|
219
219
|
};
|
|
220
220
|
customMediaQuery: {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
221
|
+
"small-and-up": number;
|
|
222
|
+
"medium-and-up": number;
|
|
223
|
+
"large-and-up": number;
|
|
224
224
|
};
|
|
225
225
|
opacity: {
|
|
226
226
|
solid: number;
|
|
@@ -234,22 +234,22 @@ export declare const Dl: import("styled-components").StyledComponent<typeof impo
|
|
|
234
234
|
max: number;
|
|
235
235
|
};
|
|
236
236
|
space: {
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
237
|
+
"0": number;
|
|
238
|
+
"1": number;
|
|
239
|
+
"2": number;
|
|
240
|
+
"3": number;
|
|
241
|
+
"4": number;
|
|
242
|
+
"5": number;
|
|
243
|
+
"6": number;
|
|
244
|
+
"7": number;
|
|
245
|
+
"8": number;
|
|
246
|
+
"9": number;
|
|
247
|
+
"10": number;
|
|
248
|
+
"11": number;
|
|
249
|
+
"12": number;
|
|
250
|
+
"13": number;
|
|
251
|
+
"14": number;
|
|
252
|
+
"15": number;
|
|
253
253
|
};
|
|
254
254
|
transition: {
|
|
255
255
|
slow: number;
|
|
@@ -305,22 +305,22 @@ export declare const Dl: import("styled-components").StyledComponent<typeof impo
|
|
|
305
305
|
};
|
|
306
306
|
data: {
|
|
307
307
|
branded: {
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
308
|
+
"1": string;
|
|
309
|
+
"2": string;
|
|
310
|
+
"3": string;
|
|
311
|
+
"4": string;
|
|
312
312
|
};
|
|
313
313
|
electric: {
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
314
|
+
"1": string;
|
|
315
|
+
"2": string;
|
|
316
|
+
"3": string;
|
|
317
|
+
"4": string;
|
|
318
318
|
};
|
|
319
319
|
gas: {
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
320
|
+
"1": string;
|
|
321
|
+
"2": string;
|
|
322
|
+
"3": string;
|
|
323
|
+
"4": string;
|
|
324
324
|
};
|
|
325
325
|
};
|
|
326
326
|
focus: {
|