@trilogy-ds/react 0.0.1-beta-sc-2 → 0.0.1-beta-149
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/lib/components/accordion/Accordion.d.ts +2 -2
- package/lib/components/accordion/Accordion.js +9 -9
- package/lib/components/accordion/Accordion.native.d.ts +7 -4
- package/lib/components/accordion/Accordion.native.js +14 -14
- package/lib/components/accordion/AccordionProps.d.ts +1 -1
- package/lib/components/accordion/body/AccordionBody.d.ts +3 -3
- package/lib/components/accordion/body/AccordionBody.js +12 -10
- package/lib/components/accordion/body/AccordionBody.native.d.ts +7 -4
- package/lib/components/accordion/body/AccordionBody.native.js +10 -7
- package/lib/components/accordion/body/AccordionBodyProps.d.ts +1 -1
- package/lib/components/accordion/body/index.d.ts +1 -1
- package/lib/components/accordion/body/index.js +2 -2
- package/lib/components/accordion/header/AccordionHeader.d.ts +3 -3
- package/lib/components/accordion/header/AccordionHeader.js +9 -9
- package/lib/components/accordion/header/AccordionHeader.native.d.ts +7 -4
- package/lib/components/accordion/header/AccordionHeader.native.js +10 -10
- package/lib/components/accordion/header/AccordionHeaderProps.d.ts +1 -1
- package/lib/components/accordion/header/index.d.ts +1 -1
- package/lib/components/accordion/header/index.js +2 -2
- package/lib/components/accordion/index.d.ts +5 -4
- package/lib/components/accordion/index.js +6 -5
- package/lib/components/accordion/item/AccordionItem.d.ts +3 -3
- package/lib/components/accordion/item/AccordionItem.js +51 -23
- package/lib/components/accordion/item/AccordionItem.native.d.ts +7 -4
- package/lib/components/accordion/item/AccordionItem.native.js +42 -48
- package/lib/components/accordion/item/index.d.ts +1 -1
- package/lib/components/accordion/item/index.js +2 -2
- package/lib/components/alert/Alert.d.ts +11 -3
- package/lib/components/alert/Alert.js +107 -20
- package/lib/components/alert/Alert.native.d.ts +27 -4
- package/lib/components/alert/Alert.native.js +107 -25
- package/lib/components/alert/context/ToasterContext.d.ts +1 -1
- package/lib/components/alert/context/ToasterContext.js +2 -6
- package/lib/components/alert/context/ToasterContextProps.d.ts +2 -3
- package/lib/components/alert/context/index.d.ts +1 -1
- package/lib/components/alert/context/index.js +2 -2
- package/lib/components/alert/index.d.ts +3 -3
- package/lib/components/alert/index.js +4 -4
- package/lib/components/autocomplete/AutoComplete.d.ts +3 -32
- package/lib/components/autocomplete/AutoComplete.js +129 -32
- package/lib/components/autocomplete/AutoComplete.native.d.ts +3 -4
- package/lib/components/autocomplete/AutoComplete.native.js +8 -10
- package/lib/components/autocomplete/AutoCompleteProps.d.ts +1 -1
- package/lib/components/autocomplete/Autocomplete.helpers.d.ts +1 -1
- package/lib/components/autocomplete/index.d.ts +5 -4
- package/lib/components/autocomplete/index.js +6 -5
- package/lib/components/autocomplete/item/AutoCompleteIem.native.d.ts +1 -1
- package/lib/components/autocomplete/item/AutoCompleteIem.native.js +3 -3
- package/lib/components/autocomplete/item/AutoCompleteItem.d.ts +2 -2
- package/lib/components/autocomplete/item/AutoCompleteItem.js +5 -5
- package/lib/components/autocomplete/item/index.d.ts +1 -1
- package/lib/components/autocomplete/item/index.js +2 -2
- package/lib/components/autocomplete/menu/AutoCompleteMenu.d.ts +1 -1
- package/lib/components/autocomplete/menu/AutoCompleteMenu.js +6 -4
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.d.ts +1 -1
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.js +3 -3
- package/lib/components/autocomplete/menu/index.d.ts +1 -1
- package/lib/components/autocomplete/menu/index.js +2 -2
- package/lib/components/autocomplete/utils/index.d.ts +1 -1
- package/lib/components/autocomplete/utils/index.js +2 -2
- package/lib/components/autolayout/AutoLayout.d.ts +2 -2
- package/lib/components/autolayout/AutoLayout.helpers.d.ts +6 -6
- package/lib/components/autolayout/AutoLayout.helpers.js +25 -29
- package/lib/components/autolayout/AutoLayout.js +3 -3
- package/lib/components/autolayout/AutoLayout.native.d.ts +2 -2
- package/lib/components/autolayout/AutoLayout.native.js +11 -9
- package/lib/components/autolayout/AutoLayoutProps.d.ts +5 -5
- package/lib/components/autolayout/AutoLayoutWrapper.d.ts +2 -2
- package/lib/components/autolayout/AutoLayoutWrapper.js +3 -3
- package/lib/components/autolayout/DefaultSpacingMatrix.d.ts +1 -1
- package/lib/components/autolayout/DefaultSpacingMatrix.js +2 -2
- package/lib/components/autolayout/index.d.ts +3 -2
- package/lib/components/autolayout/index.js +4 -3
- package/lib/components/badge/Badge.d.ts +3 -3
- package/lib/components/badge/Badge.js +23 -17
- package/lib/components/badge/Badge.native.d.ts +7 -4
- package/lib/components/badge/Badge.native.js +15 -15
- package/lib/components/badge/BadgeProps.d.ts +1 -2
- package/lib/components/badge/index.d.ts +3 -2
- package/lib/components/badge/index.js +4 -3
- package/lib/components/box/Box.d.ts +3 -3
- package/lib/components/box/Box.js +29 -19
- package/lib/components/box/Box.native.d.ts +7 -4
- package/lib/components/box/Box.native.js +35 -29
- package/lib/components/box/BoxProps.d.ts +1 -4
- package/lib/components/box/BoxProps.js +1 -1
- package/lib/components/box/content/BoxContent.d.ts +3 -3
- package/lib/components/box/content/BoxContent.js +12 -12
- package/lib/components/box/content/BoxContent.native.d.ts +7 -4
- package/lib/components/box/content/BoxContent.native.js +10 -10
- package/lib/components/box/content/BoxContentProps.d.ts +1 -2
- package/lib/components/box/content/index.d.ts +1 -1
- package/lib/components/box/content/index.js +2 -2
- package/lib/components/box/footer/BoxFooter.d.ts +3 -3
- package/lib/components/box/footer/BoxFooter.js +11 -11
- package/lib/components/box/footer/BoxFooter.native.d.ts +7 -4
- package/lib/components/box/footer/BoxFooter.native.js +12 -10
- package/lib/components/box/footer/BoxFooterProps.d.ts +1 -1
- package/lib/components/box/footer/index.d.ts +1 -1
- package/lib/components/box/footer/index.js +2 -2
- package/lib/components/box/header/BoxHeader.d.ts +3 -3
- package/lib/components/box/header/BoxHeader.js +14 -14
- package/lib/components/box/header/BoxHeader.native.d.ts +7 -4
- package/lib/components/box/header/BoxHeader.native.js +22 -19
- package/lib/components/box/header/BoxHeaderProps.d.ts +1 -1
- package/lib/components/box/header/index.d.ts +1 -1
- package/lib/components/box/header/index.js +2 -2
- package/lib/components/box/index.d.ts +9 -8
- package/lib/components/box/index.js +10 -9
- package/lib/components/box/item/BoxItem.d.ts +3 -3
- package/lib/components/box/item/BoxItem.js +9 -9
- package/lib/components/box/item/BoxItem.native.d.ts +7 -4
- package/lib/components/box/item/BoxItem.native.js +10 -10
- package/lib/components/box/item/BoxItemProps.d.ts +1 -1
- package/lib/components/box/item/index.d.ts +2 -2
- package/lib/components/box/item/index.js +3 -3
- package/lib/components/box/table-container/BoxTableContainer.d.ts +3 -3
- package/lib/components/box/table-container/BoxTableContainer.js +9 -9
- package/lib/components/box/table-container/BoxTableContainer.native.d.ts +8 -5
- package/lib/components/box/table-container/BoxTableContainer.native.js +9 -9
- package/lib/components/box/table-container/BoxTableContainerProps.d.ts +1 -2
- package/lib/components/box/table-container/index.d.ts +1 -1
- package/lib/components/box/table-container/index.js +2 -2
- package/lib/components/breadcrumb/Breadcrumb.d.ts +2 -2
- package/lib/components/breadcrumb/Breadcrumb.js +9 -9
- package/lib/components/breadcrumb/Breadcrumb.native.d.ts +7 -4
- package/lib/components/breadcrumb/Breadcrumb.native.js +10 -10
- package/lib/components/breadcrumb/BreadcrumbProps.d.ts +1 -2
- package/lib/components/breadcrumb/index.d.ts +3 -2
- package/lib/components/breadcrumb/index.js +4 -3
- package/lib/components/breadcrumb/item/BreadcrumbItem.d.ts +3 -3
- package/lib/components/breadcrumb/item/BreadcrumbItem.js +14 -14
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.d.ts +7 -4
- package/lib/components/breadcrumb/item/BreadcrumbItem.native.js +11 -12
- package/lib/components/breadcrumb/item/BreadcrumbItemProps.d.ts +1 -3
- package/lib/components/breadcrumb/item/index.d.ts +1 -1
- package/lib/components/breadcrumb/item/index.js +2 -2
- package/lib/components/button/Button.d.ts +3 -3
- package/lib/components/button/Button.js +39 -26
- package/lib/components/button/Button.native.d.ts +7 -4
- package/lib/components/button/Button.native.js +100 -68
- package/lib/components/button/ButtonProps.d.ts +3 -3
- package/lib/components/button/index.d.ts +4 -3
- package/lib/components/button/index.js +5 -4
- package/lib/components/button/list/ButtonList.d.ts +3 -3
- package/lib/components/button/list/ButtonList.js +10 -10
- package/lib/components/button/list/ButtonList.native.d.ts +7 -4
- package/lib/components/button/list/ButtonList.native.js +6 -6
- package/lib/components/button/list/ButtonListProps.d.ts +2 -2
- package/lib/components/button/list/index.d.ts +2 -1
- package/lib/components/button/list/index.js +3 -2
- package/lib/components/card/Card.d.ts +5 -2
- package/lib/components/card/Card.js +25 -16
- package/lib/components/card/Card.native.d.ts +8 -5
- package/lib/components/card/Card.native.js +27 -27
- package/lib/components/card/CardProps.d.ts +1 -5
- package/lib/components/card/CardProps.js +1 -1
- package/lib/components/card/content/CardContent.d.ts +3 -3
- package/lib/components/card/content/CardContent.js +19 -15
- package/lib/components/card/content/CardContent.native.d.ts +7 -4
- package/lib/components/card/content/CardContent.native.js +18 -18
- package/lib/components/card/content/CardContentProps.d.ts +1 -4
- package/lib/components/card/content/index.d.ts +1 -1
- package/lib/components/card/content/index.js +2 -2
- package/lib/components/card/image/CardImage.d.ts +3 -3
- package/lib/components/card/image/CardImage.js +17 -13
- package/lib/components/card/image/CardImage.native.d.ts +7 -4
- package/lib/components/card/image/CardImage.native.js +5 -5
- package/lib/components/card/image/CardImageProps.d.ts +2 -2
- package/lib/components/card/image/index.d.ts +1 -1
- package/lib/components/card/image/index.js +2 -2
- package/lib/components/card/index.d.ts +5 -4
- package/lib/components/card/index.js +6 -5
- package/lib/components/checkbox/Checkbox.d.ts +3 -3
- package/lib/components/checkbox/Checkbox.js +50 -21
- package/lib/components/checkbox/Checkbox.native.d.ts +7 -4
- package/lib/components/checkbox/Checkbox.native.js +71 -58
- package/lib/components/checkbox/CheckboxProps.d.ts +2 -3
- package/lib/components/checkbox/index.d.ts +2 -1
- package/lib/components/checkbox/index.js +3 -2
- package/lib/components/chips/Chips.d.ts +3 -3
- package/lib/components/chips/Chips.js +13 -11
- package/lib/components/chips/Chips.native.d.ts +7 -4
- package/lib/components/chips/Chips.native.js +15 -15
- package/lib/components/chips/ChipsProps.d.ts +1 -3
- package/lib/components/chips/index.d.ts +3 -2
- package/lib/components/chips/index.js +4 -3
- package/lib/components/chips/list/ChipsList.d.ts +2 -2
- package/lib/components/chips/list/ChipsList.js +10 -10
- package/lib/components/chips/list/ChipsList.native.d.ts +6 -3
- package/lib/components/chips/list/ChipsList.native.js +4 -4
- package/lib/components/chips/list/index.d.ts +1 -1
- package/lib/components/chips/list/index.js +2 -2
- package/lib/components/columns/Columns.d.ts +2 -2
- package/lib/components/columns/Columns.js +11 -11
- package/lib/components/columns/Columns.native.d.ts +7 -4
- package/lib/components/columns/Columns.native.js +34 -41
- package/lib/components/columns/ColumnsProps.d.ts +2 -2
- package/lib/components/columns/index.d.ts +3 -2
- package/lib/components/columns/index.js +4 -3
- package/lib/components/columns/item/ColumnsItem.d.ts +2 -2
- package/lib/components/columns/item/ColumnsItem.js +10 -10
- package/lib/components/columns/item/ColumnsItem.native.d.ts +7 -4
- package/lib/components/columns/item/ColumnsItem.native.js +5 -5
- package/lib/components/columns/item/index.d.ts +1 -1
- package/lib/components/columns/item/index.js +2 -2
- package/lib/components/container/Container.d.ts +3 -3
- package/lib/components/container/Container.js +11 -11
- package/lib/components/container/Container.native.d.ts +7 -4
- package/lib/components/container/Container.native.js +10 -10
- package/lib/components/container/ContainerProps.d.ts +1 -1
- package/lib/components/container/ContainerProps.js +1 -4
- package/lib/components/container/index.d.ts +2 -1
- package/lib/components/container/index.js +3 -2
- package/lib/components/countdown/Countdown.d.ts +3 -3
- package/lib/components/countdown/Countdown.js +80 -22
- package/lib/components/countdown/Countdown.native.d.ts +7 -4
- package/lib/components/countdown/Countdown.native.js +11 -11
- package/lib/components/countdown/CountdownProps.d.ts +1 -1
- package/lib/components/countdown/index.d.ts +3 -2
- package/lib/components/countdown/index.js +4 -3
- package/lib/components/divider/Divider.d.ts +3 -3
- package/lib/components/divider/Divider.js +17 -17
- package/lib/components/divider/Divider.native.d.ts +7 -4
- package/lib/components/divider/Divider.native.js +28 -24
- package/lib/components/divider/DividerProps.d.ts +1 -2
- package/lib/components/divider/index.d.ts +2 -1
- package/lib/components/divider/index.js +3 -2
- package/lib/components/enums.d.ts +3 -3
- package/lib/components/enums.js +4 -4
- package/lib/components/fab/Fab.d.ts +3 -3
- package/lib/components/fab/Fab.js +26 -19
- package/lib/components/fab/Fab.native.d.ts +7 -4
- package/lib/components/fab/Fab.native.js +23 -25
- package/lib/components/fab/FabProps.d.ts +3 -5
- package/lib/components/fab/index.d.ts +2 -1
- package/lib/components/fab/index.js +3 -2
- package/lib/components/hero/Hero.d.ts +3 -3
- package/lib/components/hero/Hero.js +13 -14
- package/lib/components/hero/Hero.native.d.ts +7 -4
- package/lib/components/hero/Hero.native.js +34 -24
- package/lib/components/hero/HeroProps.d.ts +5 -5
- package/lib/components/hero/index.d.ts +2 -1
- package/lib/components/hero/index.js +3 -2
- package/lib/components/icon/Icon.d.ts +3 -3
- package/lib/components/icon/Icon.js +51 -47
- package/lib/components/icon/Icon.native.d.ts +7 -4
- package/lib/components/icon/Icon.native.js +39 -35
- package/lib/components/icon/IconProps.d.ts +3 -3
- package/lib/components/icon/circle/CircleIcon.d.ts +3 -3
- package/lib/components/icon/circle/CircleIcon.js +15 -16
- package/lib/components/icon/circle/CircleIcon.native.d.ts +7 -4
- package/lib/components/icon/circle/CircleIcon.native.js +25 -23
- package/lib/components/icon/circle/CircleIconProps.d.ts +1 -1
- package/lib/components/icon/circle/index.d.ts +1 -1
- package/lib/components/icon/circle/index.js +2 -2
- package/lib/components/icon/index.d.ts +4 -3
- package/lib/components/icon/index.js +5 -4
- package/lib/components/icon/status/StatusIcon.d.ts +3 -3
- package/lib/components/icon/status/StatusIcon.js +16 -16
- package/lib/components/icon/status/StatusIcon.native.d.ts +7 -4
- package/lib/components/icon/status/StatusIcon.native.js +8 -8
- package/lib/components/icon/status/index.d.ts +1 -1
- package/lib/components/icon/status/index.js +2 -2
- package/lib/components/icon/text/TextIcon.d.ts +2 -2
- package/lib/components/icon/text/TextIcon.js +14 -14
- package/lib/components/icon/text/TextIcon.native.d.ts +7 -4
- package/lib/components/icon/text/TextIcon.native.js +9 -9
- package/lib/components/icon/text/index.d.ts +1 -1
- package/lib/components/icon/text/index.js +2 -2
- package/lib/components/image/Image.d.ts +3 -3
- package/lib/components/image/Image.js +15 -12
- package/lib/components/image/Image.native.d.ts +7 -4
- package/lib/components/image/Image.native.js +11 -11
- package/lib/components/image/ImageProps.d.ts +2 -2
- package/lib/components/image/index.d.ts +2 -1
- package/lib/components/image/index.js +3 -2
- package/lib/components/index.d.ts +48 -48
- package/lib/components/index.js +49 -49
- package/lib/components/input/Input.d.ts +3 -50
- package/lib/components/input/Input.js +127 -46
- package/lib/components/input/Input.native.d.ts +7 -4
- package/lib/components/input/Input.native.js +10 -10
- package/lib/components/input/InputProps.d.ts +5 -6
- package/lib/components/input/gauge/InputGauge.d.ts +2 -1
- package/lib/components/input/gauge/InputGauge.js +15 -15
- package/lib/components/input/gauge/InputGauge.native.js +4 -4
- package/lib/components/input/gauge/hook/useGauge.d.ts +1 -1
- package/lib/components/input/gauge/hook/useGauge.js +75 -89
- package/lib/components/input/index.d.ts +4 -3
- package/lib/components/input/index.js +5 -4
- package/lib/components/link/Link.d.ts +3 -3
- package/lib/components/link/Link.js +20 -20
- package/lib/components/link/Link.native.d.ts +7 -4
- package/lib/components/link/Link.native.js +69 -39
- package/lib/components/link/LinkProps.d.ts +2 -4
- package/lib/components/link/index.d.ts +2 -1
- package/lib/components/link/index.js +3 -2
- package/lib/components/list/List.d.ts +2 -2
- package/lib/components/list/List.js +9 -9
- package/lib/components/list/List.native.d.ts +7 -4
- package/lib/components/list/List.native.js +7 -7
- package/lib/components/list/ListProps.d.ts +1 -1
- package/lib/components/list/index.d.ts +4 -3
- package/lib/components/list/index.js +5 -4
- package/lib/components/list/item/ListItem.d.ts +4 -4
- package/lib/components/list/item/ListItem.js +15 -15
- package/lib/components/list/item/ListItem.native.d.ts +7 -4
- package/lib/components/list/item/ListItem.native.js +13 -15
- package/lib/components/list/item/ListItemProps.d.ts +5 -3
- package/lib/components/list/item/ListItemProps.js +1 -1
- package/lib/components/list/item/description/ListItemDescription.d.ts +3 -3
- package/lib/components/list/item/description/ListItemDescription.js +9 -9
- package/lib/components/list/item/description/ListItemDescription.native.d.ts +7 -4
- package/lib/components/list/item/description/ListItemDescription.native.js +10 -10
- package/lib/components/list/item/description/index.d.ts +3 -2
- package/lib/components/list/item/description/index.js +4 -3
- package/lib/components/list/item/index.d.ts +4 -3
- package/lib/components/list/item/index.js +5 -4
- package/lib/components/modal/Modal.d.ts +1 -1
- package/lib/components/modal/Modal.js +91 -37
- package/lib/components/modal/Modal.native.d.ts +2 -2
- package/lib/components/modal/Modal.native.js +52 -47
- package/lib/components/modal/ModalProps.d.ts +2 -2
- package/lib/components/modal/footer/ModalFooter.d.ts +2 -2
- package/lib/components/modal/footer/ModalFooter.js +7 -5
- package/lib/components/modal/footer/ModalFooter.native.d.ts +2 -2
- package/lib/components/modal/footer/ModalFooter.native.js +8 -9
- package/lib/components/modal/index.d.ts +5 -4
- package/lib/components/modal/index.js +6 -5
- package/lib/components/modal/title/ModalTitle.d.ts +1 -1
- package/lib/components/modal/title/ModalTitle.js +7 -5
- package/lib/components/modal/title/ModalTitle.native.d.ts +2 -2
- package/lib/components/modal/title/ModalTitle.native.js +12 -13
- package/lib/components/otp/Otp.d.ts +3 -3
- package/lib/components/otp/Otp.js +106 -24
- package/lib/components/otp/Otp.native.d.ts +7 -4
- package/lib/components/otp/Otp.native.js +32 -32
- package/lib/components/otp/index.d.ts +2 -1
- package/lib/components/otp/index.js +3 -2
- package/lib/components/pagination/Pagination.d.ts +3 -3
- package/lib/components/pagination/Pagination.js +73 -25
- package/lib/components/pagination/Pagination.native.d.ts +7 -4
- package/lib/components/pagination/Pagination.native.js +18 -18
- package/lib/components/pagination/PaginationProps.d.ts +2 -3
- package/lib/components/pagination/index.d.ts +3 -2
- package/lib/components/pagination/index.js +4 -3
- package/lib/components/popover/Popover.d.ts +3 -3
- package/lib/components/popover/Popover.js +12 -12
- package/lib/components/popover/Popover.native.d.ts +7 -4
- package/lib/components/popover/Popover.native.js +40 -33
- package/lib/components/popover/PopoverProps.d.ts +2 -3
- package/lib/components/popover/index.d.ts +3 -2
- package/lib/components/popover/index.js +4 -3
- package/lib/components/price/Price.d.ts +3 -3
- package/lib/components/price/Price.js +46 -44
- package/lib/components/price/Price.native.d.ts +7 -4
- package/lib/components/price/Price.native.js +79 -82
- package/lib/components/price/PriceProps.d.ts +2 -4
- package/lib/components/price/index.d.ts +3 -2
- package/lib/components/price/index.js +4 -3
- package/lib/components/product-tour/ProductTour.d.ts +3 -3
- package/lib/components/product-tour/ProductTour.js +21 -19
- package/lib/components/product-tour/ProductTour.native.d.ts +7 -4
- package/lib/components/product-tour/ProductTour.native.js +7 -7
- package/lib/components/product-tour/index.d.ts +3 -2
- package/lib/components/product-tour/index.js +4 -3
- package/lib/components/progress/Progress.d.ts +2 -2
- package/lib/components/progress/Progress.js +15 -15
- package/lib/components/progress/Progress.native.d.ts +7 -4
- package/lib/components/progress/Progress.native.js +32 -31
- package/lib/components/progress/index.d.ts +5 -4
- package/lib/components/progress/index.js +6 -5
- package/lib/components/progress/item/ProgressItem.d.ts +2 -2
- package/lib/components/progress/item/ProgressItem.js +11 -11
- package/lib/components/progress/item/ProgressItem.native.d.ts +7 -4
- package/lib/components/progress/item/ProgressItem.native.js +7 -7
- package/lib/components/progress/item/index.d.ts +1 -1
- package/lib/components/progress/item/index.js +2 -2
- package/lib/components/progress/radial/ProgressRadial.d.ts +3 -3
- package/lib/components/progress/radial/ProgressRadial.js +58 -19
- package/lib/components/progress/radial/ProgressRadial.native.d.ts +7 -4
- package/lib/components/progress/radial/ProgressRadial.native.js +30 -30
- package/lib/components/progress/radial/ProgressRadialProps.d.ts +2 -3
- package/lib/components/progress/radial/index.d.ts +1 -1
- package/lib/components/progress/radial/index.js +2 -2
- package/lib/components/progress/radial/item/ProgressRadialItemProps.d.ts +1 -1
- package/lib/components/progress/radial/item/ProgressRadialtem.d.ts +3 -3
- package/lib/components/progress/radial/item/ProgressRadialtem.js +10 -10
- package/lib/components/progress/radial/item/index.d.ts +1 -1
- package/lib/components/progress/radial/item/index.js +2 -2
- package/lib/components/radio/Radio.d.ts +3 -3
- package/lib/components/radio/Radio.js +52 -21
- package/lib/components/radio/Radio.native.d.ts +7 -4
- package/lib/components/radio/Radio.native.js +67 -57
- package/lib/components/radio/RadioProps.d.ts +5 -5
- package/lib/components/radio/index.d.ts +3 -2
- package/lib/components/radio/index.js +4 -3
- package/lib/components/radio/list/RadioList.d.ts +3 -3
- package/lib/components/radio/list/RadioList.js +10 -10
- package/lib/components/radio/list/RadioList.native.d.ts +3 -3
- package/lib/components/radio/list/RadioList.native.js +9 -9
- package/lib/components/radio/list/RadioListProps.d.ts +1 -2
- package/lib/components/radio/list/index.d.ts +2 -1
- package/lib/components/radio/list/index.js +3 -2
- package/lib/components/range/Range.d.ts +3 -3
- package/lib/components/range/Range.js +57 -18
- package/lib/components/range/Range.native.d.ts +7 -4
- package/lib/components/range/Range.native.js +18 -19
- package/lib/components/range/RangeProps.d.ts +1 -2
- package/lib/components/range/index.d.ts +2 -1
- package/lib/components/range/index.js +3 -2
- package/lib/components/rows/Rows.d.ts +2 -2
- package/lib/components/rows/Rows.js +10 -10
- package/lib/components/rows/Rows.native.d.ts +7 -4
- package/lib/components/rows/Rows.native.js +9 -9
- package/lib/components/rows/index.d.ts +3 -2
- package/lib/components/rows/index.js +4 -3
- package/lib/components/rows/item/RowItem.d.ts +2 -2
- package/lib/components/rows/item/RowItem.js +10 -10
- package/lib/components/rows/item/RowItem.native.d.ts +7 -4
- package/lib/components/rows/item/RowItem.native.js +8 -8
- package/lib/components/rows/item/index.d.ts +1 -1
- package/lib/components/rows/item/index.js +2 -2
- package/lib/components/scroll-view/ScrollView.d.ts +2 -2
- package/lib/components/scroll-view/ScrollView.js +13 -12
- package/lib/components/scroll-view/ScrollView.native.d.ts +3 -15
- package/lib/components/scroll-view/ScrollView.native.js +12 -25
- package/lib/components/scroll-view/ScrollViewProps.d.ts +1 -2
- package/lib/components/scroll-view/index.d.ts +2 -1
- package/lib/components/scroll-view/index.js +3 -2
- package/lib/components/section/Section.d.ts +1 -1
- package/lib/components/section/Section.js +15 -11
- package/lib/components/section/Section.native.d.ts +7 -4
- package/lib/components/section/Section.native.js +14 -12
- package/lib/components/section/SectionProps.d.ts +1 -6
- package/lib/components/section/index.d.ts +2 -1
- package/lib/components/section/index.js +3 -2
- package/lib/components/segment-control/SegmentControl.d.ts +3 -3
- package/lib/components/segment-control/SegmentControl.js +32 -16
- package/lib/components/segment-control/SegmentControl.native.d.ts +7 -4
- package/lib/components/segment-control/SegmentControl.native.js +18 -16
- package/lib/components/segment-control/index.d.ts +3 -2
- package/lib/components/segment-control/index.js +4 -3
- package/lib/components/segment-control/item/SegmentControlItem.d.ts +3 -3
- package/lib/components/segment-control/item/SegmentControlItem.js +20 -10
- package/lib/components/segment-control/item/SegmentControlItem.native.d.ts +7 -4
- package/lib/components/segment-control/item/SegmentControlItem.native.js +18 -15
- package/lib/components/segment-control/item/SegmentControlItemProps.d.ts +2 -2
- package/lib/components/segment-control/item/SegmentControlItemPropsDefaults.js +1 -7
- package/lib/components/segment-control/item/index.d.ts +1 -1
- package/lib/components/segment-control/item/index.js +2 -2
- package/lib/components/select/Select.d.ts +3 -3
- package/lib/components/select/Select.js +7 -9
- package/lib/components/select/Select.native.d.ts +7 -4
- package/lib/components/select/Select.native.js +8 -8
- package/lib/components/select/SelectProps.d.ts +2 -3
- package/lib/components/select/index.d.ts +3 -2
- package/lib/components/select/index.js +4 -3
- package/lib/components/select/option/SelectOption.d.ts +3 -3
- package/lib/components/select/option/SelectOption.js +7 -8
- package/lib/components/select/option/SelectOption.native.d.ts +7 -4
- package/lib/components/select/option/SelectOption.native.js +11 -11
- package/lib/components/select/option/SelectOptionProps.d.ts +2 -3
- package/lib/components/select/option/index.d.ts +1 -1
- package/lib/components/select/option/index.js +2 -2
- package/lib/components/select/web/SelectDynamic.d.ts +3 -5
- package/lib/components/select/web/SelectDynamic.js +196 -16
- package/lib/components/select/web/SelectNative.d.ts +3 -3
- package/lib/components/select/web/SelectNative.js +37 -16
- package/lib/components/select/web/index.d.ts +2 -2
- package/lib/components/select/web/index.js +3 -3
- package/lib/components/spacer/Spacer.d.ts +3 -3
- package/lib/components/spacer/Spacer.js +7 -9
- package/lib/components/spacer/Spacer.native.d.ts +7 -4
- package/lib/components/spacer/Spacer.native.js +7 -7
- package/lib/components/spacer/SpacerProps.d.ts +1 -1
- package/lib/components/spacer/index.d.ts +3 -2
- package/lib/components/spacer/index.js +4 -3
- package/lib/components/stepper/Stepper.d.ts +2 -2
- package/lib/components/stepper/Stepper.js +39 -14
- package/lib/components/stepper/Stepper.native.d.ts +7 -4
- package/lib/components/stepper/Stepper.native.js +22 -19
- package/lib/components/stepper/index.d.ts +4 -3
- package/lib/components/stepper/index.js +5 -4
- package/lib/components/stepper/step/StepperStep.d.ts +2 -2
- package/lib/components/stepper/step/StepperStep.js +17 -14
- package/lib/components/stepper/step/StepperStep.native.d.ts +7 -4
- package/lib/components/stepper/step/StepperStep.native.js +13 -9
- package/lib/components/stepper/step/StepperStepProps.d.ts +2 -2
- package/lib/components/stepper/step/index.d.ts +1 -1
- package/lib/components/stepper/step/index.js +2 -2
- package/lib/components/sticker/Sticker.d.ts +3 -3
- package/lib/components/sticker/Sticker.js +16 -15
- package/lib/components/sticker/Sticker.native.d.ts +7 -4
- package/lib/components/sticker/Sticker.native.js +20 -19
- package/lib/components/sticker/StickerProps.d.ts +4 -4
- package/lib/components/sticker/index.d.ts +3 -2
- package/lib/components/sticker/index.js +4 -3
- package/lib/components/styleComponent/default/index.d.ts +1 -1
- package/lib/components/styleComponent/default/index.js +2 -2
- package/lib/components/styleComponent/default/styleComponent.d.ts +1 -1
- package/lib/components/styleComponent/default/styleComponent.js +2 -2
- package/lib/components/styleComponent/index.d.ts +2 -2
- package/lib/components/styleComponent/index.js +3 -3
- package/lib/components/styleComponent/mangled/index.d.ts +1 -1
- package/lib/components/styleComponent/mangled/index.js +2 -2
- package/lib/components/styleComponent/mangled/styleComponentMangled.d.ts +1 -1
- package/lib/components/styleComponent/mangled/styleComponentMangled.js +2 -2
- package/lib/components/switch/Switch.d.ts +3 -3
- package/lib/components/switch/Switch.js +46 -16
- package/lib/components/switch/Switch.native.d.ts +7 -4
- package/lib/components/switch/Switch.native.js +14 -12
- package/lib/components/switch/SwitchProps.d.ts +3 -2
- package/lib/components/switch/index.d.ts +2 -1
- package/lib/components/switch/index.js +3 -2
- package/lib/components/table/Table.d.ts +3 -3
- package/lib/components/table/Table.js +11 -11
- package/lib/components/table/Table.native.d.ts +7 -4
- package/lib/components/table/Table.native.js +15 -11
- package/lib/components/table/body/TableBody.d.ts +3 -3
- package/lib/components/table/body/TableBody.js +13 -13
- package/lib/components/table/body/TableBody.native.d.ts +12 -5
- package/lib/components/table/body/TableBody.native.js +9 -9
- package/lib/components/table/body/TableBodyProps.d.ts +1 -1
- package/lib/components/table/body/index.d.ts +1 -1
- package/lib/components/table/body/index.js +2 -2
- package/lib/components/table/head/TableHead.d.ts +3 -3
- package/lib/components/table/head/TableHead.js +13 -13
- package/lib/components/table/head/TableHead.native.d.ts +7 -4
- package/lib/components/table/head/TableHead.native.js +9 -9
- package/lib/components/table/head/TableHeadProps.d.ts +1 -1
- package/lib/components/table/head/index.d.ts +1 -1
- package/lib/components/table/head/index.js +2 -2
- package/lib/components/table/index.d.ts +7 -6
- package/lib/components/table/index.js +8 -7
- package/lib/components/table/td/TableTd.d.ts +3 -3
- package/lib/components/table/td/TableTd.js +10 -10
- package/lib/components/table/td/TableTd.native.d.ts +7 -4
- package/lib/components/table/td/TableTd.native.js +9 -9
- package/lib/components/table/td/TableTdProps.d.ts +1 -1
- package/lib/components/table/td/index.d.ts +1 -1
- package/lib/components/table/td/index.js +2 -2
- package/lib/components/table/th/TableTh.d.ts +3 -3
- package/lib/components/table/th/TableTh.js +10 -10
- package/lib/components/table/th/TableTh.native.d.ts +7 -4
- package/lib/components/table/th/TableTh.native.js +12 -13
- package/lib/components/table/th/TableThProps.d.ts +1 -1
- package/lib/components/table/th/index.d.ts +1 -1
- package/lib/components/table/th/index.js +2 -2
- package/lib/components/table/tr/TableTr.d.ts +3 -3
- package/lib/components/table/tr/TableTr.js +12 -12
- package/lib/components/table/tr/TableTr.native.d.ts +7 -4
- package/lib/components/table/tr/TableTr.native.js +11 -11
- package/lib/components/table/tr/TableTrProps.d.ts +1 -3
- package/lib/components/table/tr/index.d.ts +1 -1
- package/lib/components/table/tr/index.js +2 -2
- package/lib/components/tabs/Tabs.d.ts +1 -1
- package/lib/components/tabs/Tabs.js +43 -14
- package/lib/components/tabs/Tabs.native.d.ts +7 -4
- package/lib/components/tabs/Tabs.native.js +9 -9
- package/lib/components/tabs/TabsProps.d.ts +1 -4
- package/lib/components/tabs/index.d.ts +3 -2
- package/lib/components/tabs/index.js +4 -3
- package/lib/components/tabs/item/TabsItem.d.ts +3 -3
- package/lib/components/tabs/item/TabsItem.js +40 -20
- package/lib/components/tabs/item/TabsItem.native.d.ts +7 -4
- package/lib/components/tabs/item/TabsItem.native.js +19 -19
- package/lib/components/tabs/item/TabsItemProps.d.ts +1 -3
- package/lib/components/tabs/item/index.d.ts +1 -1
- package/lib/components/tabs/item/index.js +2 -2
- package/lib/components/tag/Tag.d.ts +3 -3
- package/lib/components/tag/Tag.js +12 -12
- package/lib/components/tag/Tag.native.d.ts +7 -4
- package/lib/components/tag/Tag.native.js +6 -6
- package/lib/components/tag/TagProps.d.ts +3 -4
- package/lib/components/tag/index.d.ts +4 -3
- package/lib/components/tag/index.js +5 -4
- package/lib/components/tag/list/TagList.d.ts +2 -2
- package/lib/components/tag/list/TagList.js +8 -8
- package/lib/components/tag/list/TagList.native.d.ts +7 -4
- package/lib/components/tag/list/TagList.native.js +15 -11
- package/lib/components/tag/list/TagListProps.d.ts +1 -1
- package/lib/components/tag/list/index.d.ts +1 -1
- package/lib/components/tag/list/index.js +2 -2
- package/lib/components/text/Text.d.ts +3 -3
- package/lib/components/text/Text.js +19 -18
- package/lib/components/text/Text.native.d.ts +7 -4
- package/lib/components/text/Text.native.js +34 -31
- package/lib/components/text/TextProps.d.ts +1 -1
- package/lib/components/text/index.d.ts +3 -2
- package/lib/components/text/index.js +4 -3
- package/lib/components/textarea/Textarea.d.ts +3 -30
- package/lib/components/textarea/Textarea.js +34 -23
- package/lib/components/textarea/Textarea.native.d.ts +3 -60
- package/lib/components/textarea/Textarea.native.js +13 -11
- package/lib/components/textarea/TextareaProps.d.ts +5 -3
- package/lib/components/textarea/index.d.ts +2 -1
- package/lib/components/textarea/index.js +3 -2
- package/lib/components/timeline/Timeline.d.ts +2 -2
- package/lib/components/timeline/Timeline.js +8 -8
- package/lib/components/timeline/Timeline.native.d.ts +7 -4
- package/lib/components/timeline/Timeline.native.js +8 -8
- package/lib/components/timeline/content/TimelineContent.d.ts +3 -3
- package/lib/components/timeline/content/TimelineContent.js +16 -13
- package/lib/components/timeline/content/TimelineContent.native.d.ts +7 -4
- package/lib/components/timeline/content/TimelineContent.native.js +14 -14
- package/lib/components/timeline/content/TimelineContentProps.d.ts +1 -1
- package/lib/components/timeline/content/index.d.ts +1 -1
- package/lib/components/timeline/content/index.js +2 -2
- package/lib/components/timeline/index.d.ts +5 -4
- package/lib/components/timeline/index.js +6 -5
- package/lib/components/timeline/item/TimelineItem.d.ts +2 -2
- package/lib/components/timeline/item/TimelineItem.js +7 -7
- package/lib/components/timeline/item/TimelineItem.native.d.ts +6 -3
- package/lib/components/timeline/item/TimelineItem.native.js +5 -5
- package/lib/components/timeline/item/index.d.ts +1 -1
- package/lib/components/timeline/item/index.js +2 -2
- package/lib/components/timeline/marker/TimelineMarker.d.ts +3 -3
- package/lib/components/timeline/marker/TimelineMarker.js +12 -12
- package/lib/components/timeline/marker/TimelineMarker.native.d.ts +7 -4
- package/lib/components/timeline/marker/TimelineMarker.native.js +19 -19
- package/lib/components/timeline/marker/index.d.ts +1 -1
- package/lib/components/timeline/marker/index.js +2 -2
- package/lib/components/title/Title.d.ts +3 -3
- package/lib/components/title/Title.js +18 -14
- package/lib/components/title/Title.native.d.ts +7 -4
- package/lib/components/title/Title.native.js +37 -29
- package/lib/components/title/TitleProps.d.ts +1 -1
- package/lib/components/title/index.d.ts +3 -2
- package/lib/components/title/index.js +4 -3
- package/lib/components/view/View.d.ts +3 -3
- package/lib/components/view/View.js +18 -20
- package/lib/components/view/View.native.d.ts +7 -4
- package/lib/components/view/View.native.js +17 -16
- package/lib/components/view/ViewProps.d.ts +1 -7
- package/lib/components/view/ViewProps.js +1 -1
- package/lib/components/view/index.d.ts +3 -2
- package/lib/components/view/index.js +4 -3
- package/lib/context/index.js +1 -2
- package/lib/context/provider.d.ts +1 -1
- package/lib/context/provider.js +7 -7
- package/lib/context/providerStates.js +2 -3
- package/lib/context/providerStyled.d.ts +3 -3
- package/lib/context/providerStyled.js +3 -3
- package/lib/context/providerTheme.d.ts +1 -1
- package/lib/context/providerTheme.js +1 -2
- package/lib/context/providerTheme.native.d.ts +3 -3
- package/lib/context/providerTheme.native.js +4 -4
- package/lib/helpers/WrapperReactNativeTesting.d.ts +1 -1
- package/lib/helpers/WrapperReactNativeTesting.js +3 -3
- package/lib/helpers/hashClassesHelpers.d.ts +3 -1
- package/lib/helpers/hashClassesHelpers.js +15 -18
- package/lib/helpers/index.d.ts +4 -4
- package/lib/helpers/index.js +5 -5
- package/lib/index.d.ts +3 -1
- package/lib/index.js +4 -2
- package/lib/objects/Typography/TypographyBold.js +2 -2
- package/lib/objects/Typography/index.d.ts +4 -4
- package/lib/objects/Typography/index.js +5 -5
- package/lib/objects/atoms/index.d.ts +2 -2
- package/lib/objects/atoms/index.js +3 -3
- package/lib/objects/facets/Color.js +10 -15
- package/lib/objects/facets/Status.d.ts +1 -1
- package/lib/objects/facets/Status.js +2 -2
- package/lib/objects/facets/Variant.js +22 -22
- package/lib/objects/facets/index.d.ts +29 -29
- package/lib/objects/facets/index.js +30 -30
- package/lib/objects/index.d.ts +3 -3
- package/lib/objects/index.js +4 -4
- package/lib/services/index.d.ts +1 -1
- package/lib/services/index.js +2 -2
- package/lib/tsconfig.json +1 -0
- package/lib/version.d.ts +1 -1
- package/lib/version.js +2 -2
- package/package.json +2 -2
- package/lib/components/accordion/item/hook/useAccordionItem.d.ts +0 -23
- package/lib/components/accordion/item/hook/useAccordionItem.js +0 -47
- package/lib/components/alert/toaster/ToasterAlertProvider.d.ts +0 -10
- package/lib/components/alert/toaster/ToasterAlertProvider.js +0 -83
- package/lib/components/alert/toaster/ToasterAlertProvider.native.d.ts +0 -22
- package/lib/components/alert/toaster/ToasterAlertProvider.native.js +0 -91
- package/lib/components/alert/toaster/index.d.ts +0 -1
- package/lib/components/alert/toaster/index.js +0 -2
- package/lib/components/autocomplete/hook/useAutocomplete.d.ts +0 -40
- package/lib/components/autocomplete/hook/useAutocomplete.js +0 -138
- package/lib/components/card/context/CardContext.d.ts +0 -4
- package/lib/components/card/context/CardContext.js +0 -4
- package/lib/components/checkbox/hook/useCheckbox.d.ts +0 -19
- package/lib/components/checkbox/hook/useCheckbox.js +0 -49
- package/lib/components/countdown/hook/useCountdown.d.ts +0 -16
- package/lib/components/countdown/hook/useCountdown.js +0 -77
- package/lib/components/input/hook/useInput.d.ts +0 -68
- package/lib/components/input/hook/useInput.js +0 -151
- package/lib/components/modal/hook/useModal.d.ts +0 -25
- package/lib/components/modal/hook/useModal.js +0 -76
- package/lib/components/otp/hook/useOtp.d.ts +0 -24
- package/lib/components/otp/hook/useOtp.js +0 -112
- package/lib/components/pagination/hook/usePagination.d.ts +0 -33
- package/lib/components/pagination/hook/usePagination.js +0 -69
- package/lib/components/product-tour/hook/useProductTour.d.ts +0 -11
- package/lib/components/product-tour/hook/useProductTour.js +0 -19
- package/lib/components/progress/radial/hook/useProgressRadial.d.ts +0 -15
- package/lib/components/progress/radial/hook/useProgressRadial.js +0 -57
- package/lib/components/radio/hook/useRadio.d.ts +0 -23
- package/lib/components/radio/hook/useRadio.js +0 -52
- package/lib/components/range/hook/useRange.d.ts +0 -30
- package/lib/components/range/hook/useRange.js +0 -60
- package/lib/components/segment-control/hook/useSegmentControl.d.ts +0 -15
- package/lib/components/segment-control/hook/useSegmentControl.js +0 -33
- package/lib/components/segment-control/item/hook/useSegmentControlItem.d.ts +0 -14
- package/lib/components/segment-control/item/hook/useSegmentControlItem.js +0 -24
- package/lib/components/select/web/hooks/useSelectDynamic.d.ts +0 -20
- package/lib/components/select/web/hooks/useSelectDynamic.js +0 -233
- package/lib/components/select/web/hooks/useSelectNative.d.ts +0 -22
- package/lib/components/select/web/hooks/useSelectNative.js +0 -38
- package/lib/components/stepper/hook/useStepper.d.ts +0 -9
- package/lib/components/stepper/hook/useStepper.js +0 -50
- package/lib/components/switch/hook/ueSwitch.d.ts +0 -18
- package/lib/components/switch/hook/ueSwitch.js +0 -35
- package/lib/components/tabs/hook/useTabs.d.ts +0 -15
- package/lib/components/tabs/hook/useTabs.js +0 -46
- package/lib/components/tabs/item/hook/useTabsItem.d.ts +0 -15
- package/lib/components/tabs/item/hook/useTabsItem.js +0 -29
- package/lib/components/textarea/hook/useTextarea.d.ts +0 -14
- package/lib/components/textarea/hook/useTextarea.js +0 -25
- package/lib/helpers/mergeRefs.d.ts +0 -2
- package/lib/helpers/mergeRefs.js +0 -13
- package/lib/objects/facets/ClientRendering.d.ts +0 -3
- package/lib/objects/facets/ClientRendering.js +0 -2
- package/lib/tsconfig.build.json +0 -13
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { __assign, __rest } from "tslib";
|
|
1
|
+
import { __assign, __read, __rest } from "tslib";
|
|
2
|
+
import React, { useEffect, useState } from 'react';
|
|
3
|
+
import { has, is } from '../../services';
|
|
4
|
+
import { getBackgroundClassName } from '../../objects';
|
|
2
5
|
import clsx from 'clsx';
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import { hashClass } from '../../helpers/hashClassesHelpers';
|
|
6
|
-
import { getBackgroundClassName } from '../../objects/atoms/Background';
|
|
7
|
-
import { has, is } from '../../services/classify';
|
|
6
|
+
import { hashClass } from '../../helpers';
|
|
7
|
+
import { useTrilogyContext } from '../../context';
|
|
8
8
|
/**
|
|
9
9
|
* Section Component - Manages the main margins of the page and takes up all the available width.
|
|
10
10
|
* @param children {React.ReactNode}
|
|
@@ -20,13 +20,17 @@ import { has, is } from '../../services/classify';
|
|
|
20
20
|
* - -------------- NATIVE PROPERTIES ---------------
|
|
21
21
|
* @param autolayout {boolean} Apply auto-layout rules
|
|
22
22
|
**/
|
|
23
|
-
var Section = React.forwardRef(function (
|
|
24
|
-
var className =
|
|
25
|
-
var
|
|
23
|
+
var Section = React.forwardRef(function (props, ref) {
|
|
24
|
+
var className = props.className, skeleton = props.skeleton, backgroundColor = props.backgroundColor, backgroundSrc = props.backgroundSrc, inverted = props.inverted, paddingless = props.paddingless, verticalPaddingless = props.verticalPaddingless, fullwidth = props.fullwidth, others = __rest(props, ["className", "skeleton", "backgroundColor", "backgroundSrc", "inverted", "paddingless", "verticalPaddingless", "fullwidth"]);
|
|
25
|
+
var styled = useTrilogyContext().styled;
|
|
26
|
+
var _a = __read(useState(skeleton || false), 2), isLoading = _a[0], setIsLoading = _a[1];
|
|
27
|
+
useEffect(function () {
|
|
28
|
+
setIsLoading(skeleton || false);
|
|
29
|
+
}, [skeleton]);
|
|
30
|
+
var _className = hashClass(styled, clsx('section', className, backgroundColor && has(getBackgroundClassName(backgroundColor)), backgroundSrc && has('background'), inverted && is('inverted'), isLoading ? is('loading') : is('loaded'), fullwidth && is('fullwidth'), paddingless && is('paddingless'), verticalPaddingless && is('vertical-paddingless')));
|
|
26
31
|
return (React.createElement("section", __assign({ ref: ref }, (backgroundSrc && {
|
|
27
32
|
style: { backgroundImage: "url(".concat(backgroundSrc, ")") },
|
|
28
33
|
}), { className: _className }, others)));
|
|
29
34
|
});
|
|
30
|
-
Section.displayName = ComponentName.Section;
|
|
31
35
|
export default Section;
|
|
32
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
36
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VjdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uL2NvbXBvbmVudHMvc2VjdGlvbi9TZWN0aW9uLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxTQUFTLEVBQUUsUUFBUSxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBRWxELE9BQU8sRUFBRSxHQUFHLEVBQUUsRUFBRSxFQUFFLE1BQU0sWUFBWSxDQUFBO0FBQ3BDLE9BQU8sRUFBRSxzQkFBc0IsRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUNsRCxPQUFPLElBQUksTUFBTSxNQUFNLENBQUE7QUFDdkIsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUNyQyxPQUFPLEVBQUUsaUJBQWlCLEVBQUUsTUFBTSxXQUFXLENBQUE7QUFFN0M7Ozs7Ozs7Ozs7Ozs7O0lBY0k7QUFDSixJQUFNLE9BQU8sR0FBRyxLQUFLLENBQUMsVUFBVSxDQUFDLFVBQUMsS0FBbUIsRUFBRSxHQUFvQztJQUV2RixJQUFBLFNBQVMsR0FTUCxLQUFLLFVBVEUsRUFDVCxRQUFRLEdBUU4sS0FBSyxTQVJDLEVBQ1IsZUFBZSxHQU9iLEtBQUssZ0JBUFEsRUFDZixhQUFhLEdBTVgsS0FBSyxjQU5NLEVBQ2IsUUFBUSxHQUtOLEtBQUssU0FMQyxFQUNSLFdBQVcsR0FJVCxLQUFLLFlBSkksRUFDWCxtQkFBbUIsR0FHakIsS0FBSyxvQkFIW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VBQUUsZUFBZSxFQUFFLGNBQU8sYUFBYSxNQUFHLEVBQUU7S0FDcEQsQ0FBQyxJQUNGLFNBQVMsRUFBRSxVQUFVLElBQ2pCLE1BQU0sRUFDVixDQUNILENBQUE7QUFDSCxDQUFDLENBQUMsQ0FBQTtBQUVGLGVBQWUsT0FBTyxDQUFBIn0=
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SectionProps } from "./SectionProps";
|
|
3
|
+
import { ComponentName } from "../../components/enumsComponentsName";
|
|
4
4
|
/**
|
|
5
5
|
* Section Component - Manages the main margins of the page and takes up all the available width.
|
|
6
6
|
* @param children {React.ReactNode}
|
|
@@ -11,5 +11,8 @@ import { SectionProps } from '../../components/section/SectionProps';
|
|
|
11
11
|
* @param fullwidth {boolean} Fullwidth section
|
|
12
12
|
* @param autolayout {boolean} Apply auto-layout rules
|
|
13
13
|
**/
|
|
14
|
-
declare const Section:
|
|
14
|
+
declare const Section: {
|
|
15
|
+
({ autolayout, backgroundColor, backgroundSrc, children, paddingless, verticalPaddingless, fullwidth, }: SectionProps): JSX.Element;
|
|
16
|
+
displayName: ComponentName;
|
|
17
|
+
};
|
|
15
18
|
export default Section;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { __assign } from "tslib";
|
|
2
|
-
import React from
|
|
3
|
-
import { ImageBackground, StyleSheet, View } from
|
|
4
|
-
import { AutoLayoutWrapper } from
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
2
|
+
import * as React from "react";
|
|
3
|
+
import { ImageBackground, StyleSheet, View } from "react-native";
|
|
4
|
+
import { AutoLayoutWrapper } from "../../components/autolayout";
|
|
5
|
+
import { getColorStyle, TrilogyColor } from "../../objects";
|
|
6
|
+
import { ComponentName } from "../../components/enumsComponentsName";
|
|
7
7
|
/**
|
|
8
8
|
* Section Component - Manages the main margins of the page and takes up all the available width.
|
|
9
9
|
* @param children {React.ReactNode}
|
|
@@ -14,7 +14,7 @@ import { getColorStyle, TrilogyColor } from '../../objects/facets/Color';
|
|
|
14
14
|
* @param fullwidth {boolean} Fullwidth section
|
|
15
15
|
* @param autolayout {boolean} Apply auto-layout rules
|
|
16
16
|
**/
|
|
17
|
-
var Section =
|
|
17
|
+
var Section = function (_a) {
|
|
18
18
|
var _b = _a.autolayout, autolayout = _b === void 0 ? true : _b, backgroundColor = _a.backgroundColor, backgroundSrc = _a.backgroundSrc, children = _a.children, paddingless = _a.paddingless, verticalPaddingless = _a.verticalPaddingless, fullwidth = _a.fullwidth;
|
|
19
19
|
var colorBgc = getColorStyle(TrilogyColor.BACKGROUND);
|
|
20
20
|
var styles = StyleSheet.create({
|
|
@@ -24,17 +24,19 @@ var Section = React.forwardRef(function (_a, ref) {
|
|
|
24
24
|
paddingBottom: paddingless || verticalPaddingless ? 0 : 32,
|
|
25
25
|
paddingRight: paddingless ? 0 : 24,
|
|
26
26
|
paddingLeft: paddingless ? 0 : 24,
|
|
27
|
-
width: fullwidth ?
|
|
27
|
+
width: fullwidth ? "100%" : "auto",
|
|
28
28
|
},
|
|
29
29
|
sectionImage: {
|
|
30
|
-
width:
|
|
30
|
+
width: "100%",
|
|
31
31
|
minHeight: 100,
|
|
32
|
-
height:
|
|
32
|
+
height: "auto",
|
|
33
33
|
},
|
|
34
34
|
});
|
|
35
|
-
return (React.createElement(View, { style: styles.section
|
|
35
|
+
return (React.createElement(View, { style: styles.section }, backgroundSrc ? (React.createElement(ImageBackground, { style: styles.sectionImage, source: typeof backgroundSrc === "number"
|
|
36
|
+
? backgroundSrc
|
|
37
|
+
: { uri: backgroundSrc } },
|
|
36
38
|
React.createElement(AutoLayoutWrapper, __assign({}, { autolayout: autolayout }), children))) : (React.createElement(AutoLayoutWrapper, __assign({}, { autolayout: autolayout }), children))));
|
|
37
|
-
}
|
|
39
|
+
};
|
|
38
40
|
Section.displayName = ComponentName.Section;
|
|
39
41
|
export default Section;
|
|
40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VBQVUsWUFBQSxFQUFFLEdBQUcsUUFBUSxDQUFxQixDQUN0RSxDQUNJLENBQ1IsQ0FBQTtBQUNILENBQUMsQ0FBQTtBQUVELE9BQU8sQ0FBQyxXQUFXLEdBQUcsYUFBYSxDQUFDLE9BQU8sQ0FBQTtBQUUzQyxlQUFlLE9BQU8sQ0FBQSJ9
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import { BackgroundProps } from '../../objects
|
|
2
|
-
import { ChildrenWithNoText } from '../../objects/facets/ChildrenWithNoText';
|
|
3
|
-
import { Fullwidth } from '../../objects/facets/Fullwidth';
|
|
4
|
-
import { Layout } from '../../objects/facets/Layout';
|
|
5
|
-
import { Paddingless } from '../../objects/facets/Paddingless';
|
|
6
|
-
import { VerticalPaddingless } from '../../objects/facets/VerticalPaddingless';
|
|
1
|
+
import type { BackgroundProps, Fullwidth, Layout, Paddingless, VerticalPaddingless, ChildrenWithNoText } from '../../objects';
|
|
7
2
|
/**
|
|
8
3
|
* Section Interface
|
|
9
4
|
*/
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import Section from './Section';
|
|
2
|
+
export { Section };
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
import Section from './Section';
|
|
2
|
+
export { Section };
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21wb25lbnRzL3NlY3Rpb24vaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxPQUFPLE1BQU0sV0FBVyxDQUFBO0FBRS9CLE9BQU8sRUFBRSxPQUFPLEVBQUUsQ0FBQSJ9
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { SegmentControlProps } from '
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SegmentControlProps } from './SegmentControlProps';
|
|
3
3
|
/**
|
|
4
4
|
* SegmentControl Component
|
|
5
5
|
* @param children {ReactNode} Children for SegmentControl
|
|
@@ -12,5 +12,5 @@ import { SegmentControlProps } from '../../components/segment-control/SegmentCon
|
|
|
12
12
|
* - -------------- NATIVE PROPERTIES ---------------
|
|
13
13
|
* @param inverted {boolean} invert color SegmentControl
|
|
14
14
|
*/
|
|
15
|
-
declare const SegmentControl:
|
|
15
|
+
declare const SegmentControl: ({ className, onClick, disabled, marginless, children, activeIndex, }: SegmentControlProps) => JSX.Element;
|
|
16
16
|
export default SegmentControl;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { __read } from "tslib";
|
|
2
|
+
import React, { useState } from 'react';
|
|
3
|
+
import { is } from '../../services';
|
|
4
|
+
import SegmentControlItem from './item';
|
|
5
|
+
import { hashClass } from '../../helpers';
|
|
1
6
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
-
import { ComponentName } from '../../components/enumsComponentsName';
|
|
4
|
-
import { useSegmentControl } from '../../components/segment-control/hook/useSegmentControl';
|
|
5
|
-
import SegmentControlItem from '../../components/segment-control/item';
|
|
6
|
-
import { hashClass } from '../../helpers/hashClassesHelpers';
|
|
7
|
-
import { is } from '../../services/classify';
|
|
7
|
+
import { useTrilogyContext } from '../../context';
|
|
8
8
|
/**
|
|
9
9
|
* SegmentControl Component
|
|
10
10
|
* @param children {ReactNode} Children for SegmentControl
|
|
@@ -17,10 +17,11 @@ import { is } from '../../services/classify';
|
|
|
17
17
|
* - -------------- NATIVE PROPERTIES ---------------
|
|
18
18
|
* @param inverted {boolean} invert color SegmentControl
|
|
19
19
|
*/
|
|
20
|
-
var SegmentControl =
|
|
20
|
+
var SegmentControl = function (_a) {
|
|
21
21
|
var className = _a.className, onClick = _a.onClick, disabled = _a.disabled, marginless = _a.marginless, children = _a.children, activeIndex = _a.activeIndex;
|
|
22
|
-
var
|
|
23
|
-
var
|
|
22
|
+
var styled = useTrilogyContext().styled;
|
|
23
|
+
var classes = hashClass(styled, clsx('segmented-control', marginless && is('marginless'), className));
|
|
24
|
+
var _b = __read(useState(activeIndex || 0), 2), activateIndex = _b[0], setActivateIndex = _b[1];
|
|
24
25
|
var isActive = function (index, childPropsActive) {
|
|
25
26
|
if (typeof childPropsActive !== 'undefined' && !activateIndex) {
|
|
26
27
|
return childPropsActive;
|
|
@@ -29,20 +30,35 @@ var SegmentControl = React.forwardRef(function (_a, ref) {
|
|
|
29
30
|
return true;
|
|
30
31
|
}
|
|
31
32
|
};
|
|
32
|
-
|
|
33
|
+
var toggleActive = function (e, index) {
|
|
34
|
+
if (disabled)
|
|
35
|
+
return false;
|
|
36
|
+
setActivateIndex(index);
|
|
37
|
+
if (onClick)
|
|
38
|
+
onClick(e);
|
|
39
|
+
};
|
|
40
|
+
React.useEffect(function () {
|
|
41
|
+
setActivateIndex(activateIndex);
|
|
42
|
+
}, [activateIndex]);
|
|
43
|
+
return (React.createElement("div", { className: classes }, children &&
|
|
33
44
|
Array.isArray(children) &&
|
|
45
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
34
46
|
children.map(function (child, index) {
|
|
35
47
|
var props = {
|
|
36
48
|
active: Boolean(isActive(index, child.props.active)) || false,
|
|
37
49
|
disabled: child.props.disabled,
|
|
38
50
|
key: index,
|
|
39
|
-
onClick:
|
|
40
|
-
|
|
41
|
-
|
|
51
|
+
onClick: function (event) {
|
|
52
|
+
toggleActive(event, index);
|
|
53
|
+
if (child) {
|
|
54
|
+
if (child.props.onClick) {
|
|
55
|
+
child.props.onClick(event);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
},
|
|
42
59
|
};
|
|
43
60
|
return child && typeof child.valueOf() === 'string' ? (React.createElement(SegmentControlItem, { disabled: props.disabled, active: props.active, key: props.key, onClick: function (e) { return onClick === null || onClick === void 0 ? void 0 : onClick(e); } }, child)) : (React.cloneElement(child, props));
|
|
44
61
|
})));
|
|
45
|
-
}
|
|
46
|
-
SegmentControl.displayName = ComponentName.SegmentControl;
|
|
62
|
+
};
|
|
47
63
|
export default SegmentControl;
|
|
48
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
64
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VnbWVudENvbnRyb2wuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21wb25lbnRzL3NlZ21lbnQtY29udHJvbC9TZWdtZW50Q29udHJvbC50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8sS0FBSyxFQUFFLEVBQUUsUUFBUSxFQUFFLE1BQU0sT0FBTyxDQUFBO0FBQ3ZDLE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSxZQUFZLENBQUE7QUFDL0IsT0FBTyxrQkFBa0IsTUFBTSxRQUFRLENBQUE7QUFFdkMsT0FBTyxFQUFFLFNBQVMsRUFBRSxNQUFNLFdBQVcsQ0FBQTtBQUNyQyxPQUFPLElBQUksTUFBTSxNQUFNLENBQUE7QUFDdkIsT0FBTyxFQUFFLGlCQUFpQixFQUFFLE1BQU0sV0FBVyxDQUFBO0FBRTdDOzs7Ozs7Ozs7OztHQVdHO0FBQ0gsSUFBTSxjQUFjLEdBQUcsVUFBQyxFQU9GO1FBTnBCLFNBQVMsZUFBQSxFQUNULE9BQU8sYUFBQSxFQUNQLFFBQVEsY0FBQSxFQUNSLFVBQVUsZ0JBQUEsRUFDVixRQUFRLGNBQUEsRUFDUixXQUFXLGlCQUFBO0lBRUgsSUFBQSxNQUFNLEdBQUssaUJBQWlCLEVBQUUsT0FBeEIsQ0FBd0I7SUFFdEMsSUFBTSxPQUFPLEdBQUcsU0FBUyxDQUFDLE1BQU0sRUFBRSxJQUFJLENBQUMsbUJBQW1CLEVBQUUsVUFBVSxJQUFJLEVBQUUsQ0FBQyxZQUFZLENBQUMsRUFBRSxTQUFTLENBQUMsQ0FB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|
|
3
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SegmentControlProps } from "./SegmentControlProps";
|
|
3
|
+
import { ComponentName } from "../../components/enumsComponentsName";
|
|
4
4
|
/**
|
|
5
5
|
* SegmentControl Component
|
|
6
6
|
* @param children {ReactNode} Children for SegmentControl
|
|
@@ -10,5 +10,8 @@ import { SegmentControlProps } from '../../components/segment-control/SegmentCon
|
|
|
10
10
|
* @param marginless {boolean} delete margin
|
|
11
11
|
* @param inverted {boolean} invert color SegmentControl
|
|
12
12
|
*/
|
|
13
|
-
declare const SegmentControl:
|
|
13
|
+
declare const SegmentControl: {
|
|
14
|
+
({ children, onClick, activeIndex, disabled, marginless, inverted, ...others }: SegmentControlProps): JSX.Element;
|
|
15
|
+
displayName: ComponentName;
|
|
16
|
+
};
|
|
14
17
|
export default SegmentControl;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
|
-
import React, { useState } from
|
|
3
|
-
import { StyleSheet } from
|
|
4
|
-
import {
|
|
5
|
-
import
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { StyleSheet } from "react-native";
|
|
4
|
+
import { View } from "../../components/view";
|
|
5
|
+
import { Text, TextLevels } from "../../components/text";
|
|
6
|
+
import SegmentedControlItem from "./item";
|
|
7
|
+
import { getColorStyle, TrilogyColor } from "../../objects/facets/Color";
|
|
8
|
+
import { ComponentName } from "../../components/enumsComponentsName";
|
|
9
9
|
/**
|
|
10
10
|
* SegmentControl Component
|
|
11
11
|
* @param children {ReactNode} Children for SegmentControl
|
|
@@ -15,11 +15,11 @@ import { getColorStyle, TrilogyColor } from '../../objects/facets/Color';
|
|
|
15
15
|
* @param marginless {boolean} delete margin
|
|
16
16
|
* @param inverted {boolean} invert color SegmentControl
|
|
17
17
|
*/
|
|
18
|
-
var SegmentControl =
|
|
18
|
+
var SegmentControl = function (_a) {
|
|
19
19
|
var children = _a.children, onClick = _a.onClick, activeIndex = _a.activeIndex, disabled = _a.disabled, marginless = _a.marginless, inverted = _a.inverted, others = __rest(_a, ["children", "onClick", "activeIndex", "disabled", "marginless", "inverted"]);
|
|
20
20
|
var _b = __read(useState(activeIndex || 0), 2), activateIndex = _b[0], setActivateIndex = _b[1];
|
|
21
21
|
var isActive = function (index, childPropsActive) {
|
|
22
|
-
if (typeof childPropsActive !==
|
|
22
|
+
if (typeof childPropsActive !== "undefined" && !activateIndex) {
|
|
23
23
|
return childPropsActive;
|
|
24
24
|
}
|
|
25
25
|
if (index === activateIndex) {
|
|
@@ -41,20 +41,22 @@ var SegmentControl = React.forwardRef(function (_a, ref) {
|
|
|
41
41
|
paddingRight: marginless ? 0 : 10,
|
|
42
42
|
},
|
|
43
43
|
segmentedControl: {
|
|
44
|
-
flexDirection:
|
|
45
|
-
width:
|
|
44
|
+
flexDirection: "row",
|
|
45
|
+
width: "100%",
|
|
46
46
|
backgroundColor: getColorStyle(TrilogyColor.NEUTRAL_FADE),
|
|
47
47
|
borderRadius: 4,
|
|
48
48
|
padding: 4,
|
|
49
49
|
paddingRight: -4,
|
|
50
50
|
},
|
|
51
51
|
});
|
|
52
|
-
return (React.createElement(View, { style: styles.padding
|
|
52
|
+
return (React.createElement(View, { style: styles.padding },
|
|
53
53
|
React.createElement(View, __assign({ style: styles.segmentedControl }, others), children &&
|
|
54
54
|
Array.isArray(children) &&
|
|
55
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
55
56
|
children.map(function (child, index) {
|
|
56
57
|
var props = {
|
|
57
|
-
inverted: Boolean(isActive(index, child.props.active) && inverted) ||
|
|
58
|
+
inverted: Boolean(isActive(index, child.props.active) && inverted) ||
|
|
59
|
+
false,
|
|
58
60
|
active: Boolean(isActive(index, child.props.active)) || false,
|
|
59
61
|
disabled: child.props.disabled,
|
|
60
62
|
key: index,
|
|
@@ -69,11 +71,11 @@ var SegmentControl = React.forwardRef(function (_a, ref) {
|
|
|
69
71
|
},
|
|
70
72
|
};
|
|
71
73
|
if (index < 5) {
|
|
72
|
-
return typeof child.valueOf() ===
|
|
74
|
+
return typeof child.valueOf() === "string" ? (React.createElement(SegmentedControlItem, { disabled: props.disabled, active: props.active, onClick: function (e) { return onClick === null || onClick === void 0 ? void 0 : onClick(e); } },
|
|
73
75
|
React.createElement(Text, { level: TextLevels.ONE }, String(child)))) : (React.cloneElement(child, props));
|
|
74
76
|
}
|
|
75
77
|
}))));
|
|
76
|
-
}
|
|
78
|
+
};
|
|
77
79
|
SegmentControl.displayName = ComponentName.SegmentControl;
|
|
78
80
|
export default SegmentControl;
|
|
79
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
81
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VnbWVudENvbnRyb2wubmF0aXZlLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vY29tcG9uZW50cy9zZWdtZW50LWNvbnRyb2wvU2VnbWVudENvbnRyb2wubmF0aXZlLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLEVBQUUsRUFBRSxRQUFRLEVBQUUsTUFBTSxPQUFPLENBQUE7QUFDdkMsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLGNBQWMsQ0FBQTtBQUV6QyxPQUFPLEVBQUUsSUFBSSxFQUFFLE1BQU0sbUJBQW1CLENBQUE7QUFDeEMsT0FBTyxFQUFFLElBQUksRUFBRSxVQUFVLEVBQUUsTUFBTSxtQkFBbUIsQ0FBQTtBQUNwRCxPQUFPLG9CQUFvQixNQUFNLFFBQVEsQ0FBQTtBQUN6QyxPQUFPLEVBQUUsYUFBYSxFQUFFLFlBQVksRUFBRSxNQUFNLHdCQUF3QixDQUFBO0FBQ3BFLE9BQU8sRUFBRSxhQUFhLEVBQUUsTUFBTSxrQ0FBa0MsQ0FBQTt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-
|
|
2
|
-
|
|
1
|
+
import SegmentControl from './SegmentControl';
|
|
2
|
+
import SegmentControlItem from './item';
|
|
3
|
+
export { SegmentControl, SegmentControlItem };
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import SegmentControl from './SegmentControl';
|
|
2
|
+
import SegmentControlItem from './item';
|
|
3
|
+
export { SegmentControl, SegmentControlItem };
|
|
4
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi9jb21wb25lbnRzL3NlZ21lbnQtY29udHJvbC9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLGNBQWMsTUFBTSxrQkFBa0IsQ0FBQTtBQUM3QyxPQUFPLGtCQUFrQixNQUFNLFFBQVEsQ0FBQTtBQUV2QyxPQUFPLEVBQUUsY0FBYyxFQUFFLGtCQUFrQixFQUFFLENBQUEifQ==
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { SegmentControlItemProps } from '
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SegmentControlItemProps } from './SegmentControlItemProps';
|
|
3
3
|
/**
|
|
4
4
|
* SegmentControl Item Component
|
|
5
5
|
* @param active {boolean} active segmentedControl item
|
|
@@ -10,5 +10,5 @@ import { SegmentControlItemProps } from '../../../components/segment-control/ite
|
|
|
10
10
|
* - -------------- WEB PROPERTIES ---------------
|
|
11
11
|
* @param className {string} Additionnal CSS Classes
|
|
12
12
|
*/
|
|
13
|
-
declare const SegmentControlItem:
|
|
13
|
+
declare const SegmentControlItem: ({ active, onClick, disabled, className, children, }: SegmentControlItemProps) => JSX.Element;
|
|
14
14
|
export default SegmentControlItem;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { __read } from "tslib";
|
|
2
|
+
import React, { useState, useEffect } from 'react';
|
|
3
|
+
import { hashClass } from '../../../helpers';
|
|
1
4
|
import clsx from 'clsx';
|
|
2
|
-
import
|
|
3
|
-
import { ComponentName } from '../../../components/enumsComponentsName';
|
|
4
|
-
import { useSegmentControlItem } from '../../../components/segment-control/item/hook/useSegmentControlItem';
|
|
5
|
-
import { hashClass } from '../../../helpers/hashClassesHelpers';
|
|
5
|
+
import { useTrilogyContext } from '../../../context';
|
|
6
6
|
/**
|
|
7
7
|
* SegmentControl Item Component
|
|
8
8
|
* @param active {boolean} active segmentedControl item
|
|
@@ -13,11 +13,21 @@ import { hashClass } from '../../../helpers/hashClassesHelpers';
|
|
|
13
13
|
* - -------------- WEB PROPERTIES ---------------
|
|
14
14
|
* @param className {string} Additionnal CSS Classes
|
|
15
15
|
*/
|
|
16
|
-
var SegmentControlItem =
|
|
16
|
+
var SegmentControlItem = function (_a) {
|
|
17
17
|
var active = _a.active, onClick = _a.onClick, disabled = _a.disabled, className = _a.className, children = _a.children;
|
|
18
|
-
var _b =
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
18
|
+
var _b = __read(useState(active || false), 2), activeItem = _b[0], setActiveItem = _b[1];
|
|
19
|
+
var styled = useTrilogyContext().styled;
|
|
20
|
+
useEffect(function () {
|
|
21
|
+
setActiveItem(active || false);
|
|
22
|
+
}, [active]);
|
|
23
|
+
return (React.createElement("button", { disabled: disabled, className: hashClass(styled, clsx('segmented-control-item', className, { 'is-active': activeItem })), onClick: function (e) {
|
|
24
|
+
var target = e.target;
|
|
25
|
+
setActiveItem(active || false);
|
|
26
|
+
target.active = active;
|
|
27
|
+
if (onClick) {
|
|
28
|
+
onClick(e);
|
|
29
|
+
}
|
|
30
|
+
} }, children));
|
|
31
|
+
};
|
|
22
32
|
export default SegmentControlItem;
|
|
23
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
33
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VnbWVud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QVcsRUFBRSxVQUFVLEVBQUUsQ0FBQyxDQUFDLEVBQ3BHLE9BQU8sRUFBRSxVQUFDLENBQW1CO1lBQzNCLElBQU0sTUFBTSxHQUFHLENBQUMsQ0FBQyxNQUF5QixDQUFBO1lBQzFDLGFBQWEsQ0FBQyxNQUFNLElBQUksS0FBSyxDQUFDLENBQUE7WUFDOUIsTUFBTSxDQUFDLE1BQU0sR0FBRyxNQUFNLENBQUE7WUFDdEIsSUFBSSxPQUFPLEVBQUU7Z0JBQ1gsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFBO2FBQ1g7UUFDSCxDQUFDLElBRUEsUUFBUSxDQUNGLENBQ1YsQ0FBQTtBQUNILENBQUMsQ0FBQTtBQUVELGVBQWUsa0JBQWtCLENBQUEifQ==
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { SegmentControlItemProps } from "./SegmentControlItemProps";
|
|
3
|
+
import { ComponentName } from "../../../components/enumsComponentsName";
|
|
4
4
|
/**
|
|
5
5
|
* SegmentControlItem Item Component
|
|
6
6
|
* @param active {boolean} active Segment Control item
|
|
@@ -9,5 +9,8 @@ import { SegmentControlItemProps } from '../../../components/segment-control/ite
|
|
|
9
9
|
* @param disabled {boolean} disable onClick on item
|
|
10
10
|
* @param inverted {boolean} invert color of active item
|
|
11
11
|
*/
|
|
12
|
-
declare const SegmentControlItem:
|
|
12
|
+
declare const SegmentControlItem: {
|
|
13
|
+
({ active, children, onClick, inverted, disabled, ...others }: SegmentControlItemProps): JSX.Element;
|
|
14
|
+
displayName: ComponentName;
|
|
15
|
+
};
|
|
13
16
|
export default SegmentControlItem;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { __assign, __read, __rest } from "tslib";
|
|
2
|
-
import React, { useEffect, useState } from
|
|
3
|
-
import { StyleSheet, Text, TouchableOpacity } from
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
2
|
+
import React, { useEffect, useState } from "react";
|
|
3
|
+
import { StyleSheet, Text, TouchableOpacity } from "react-native";
|
|
4
|
+
import { getColorStyle, TrilogyColor } from "../../../objects/facets/Color";
|
|
5
|
+
import { ComponentName } from "../../../components/enumsComponentsName";
|
|
6
6
|
/**
|
|
7
7
|
* SegmentControlItem Item Component
|
|
8
8
|
* @param active {boolean} active Segment Control item
|
|
@@ -11,16 +11,16 @@ import { getColorStyle, TrilogyColor } from '../../../objects/facets/Color';
|
|
|
11
11
|
* @param disabled {boolean} disable onClick on item
|
|
12
12
|
* @param inverted {boolean} invert color of active item
|
|
13
13
|
*/
|
|
14
|
-
var SegmentControlItem =
|
|
14
|
+
var SegmentControlItem = function (_a) {
|
|
15
15
|
var active = _a.active, children = _a.children, onClick = _a.onClick, inverted = _a.inverted, disabled = _a.disabled, others = __rest(_a, ["active", "children", "onClick", "inverted", "disabled"]);
|
|
16
16
|
var _b = __read(useState(active || false), 2), activeItem = _b[0], setActiveItem = _b[1];
|
|
17
17
|
var styles = StyleSheet.create({
|
|
18
18
|
tabsItem: {
|
|
19
|
-
flexDirection:
|
|
19
|
+
flexDirection: "column",
|
|
20
20
|
flex: 1,
|
|
21
21
|
marginRight: 4,
|
|
22
22
|
borderRadius: 4,
|
|
23
|
-
alignItems:
|
|
23
|
+
alignItems: "center",
|
|
24
24
|
backgroundColor: (activeItem && getColorStyle(TrilogyColor.MAIN)) ||
|
|
25
25
|
(inverted && getColorStyle(TrilogyColor.BACKGROUND)) ||
|
|
26
26
|
(disabled && getColorStyle(TrilogyColor.DISABLED_FADE)) ||
|
|
@@ -29,27 +29,30 @@ var SegmentControlItem = React.forwardRef(function (_a, ref) {
|
|
|
29
29
|
text: {
|
|
30
30
|
paddingHorizontal: 16,
|
|
31
31
|
color: (activeItem && !inverted && getColorStyle(TrilogyColor.BACKGROUND)) ||
|
|
32
|
-
(!activeItem &&
|
|
32
|
+
(!activeItem &&
|
|
33
|
+
!inverted &&
|
|
34
|
+
disabled &&
|
|
35
|
+
getColorStyle(TrilogyColor.DISABLED)) ||
|
|
33
36
|
getColorStyle(TrilogyColor.MAIN),
|
|
34
37
|
marginVertical: 10,
|
|
35
38
|
fontSize: 16,
|
|
36
|
-
textAlign:
|
|
37
|
-
textAlignVertical:
|
|
38
|
-
fontWeight: activeItem ?
|
|
39
|
+
textAlign: "center",
|
|
40
|
+
textAlignVertical: "center",
|
|
41
|
+
fontWeight: activeItem ? "600" : "normal",
|
|
39
42
|
},
|
|
40
43
|
});
|
|
41
44
|
useEffect(function () {
|
|
42
45
|
setActiveItem(active || false);
|
|
43
46
|
}, [active]);
|
|
44
|
-
return (React.createElement(TouchableOpacity, __assign({
|
|
47
|
+
return (React.createElement(TouchableOpacity, __assign({ disabled: disabled, style: [styles.tabsItem], onPress: function (e) {
|
|
45
48
|
if (!disabled) {
|
|
46
49
|
setActiveItem(active || false);
|
|
47
50
|
if (onClick) {
|
|
48
51
|
onClick(e);
|
|
49
52
|
}
|
|
50
53
|
}
|
|
51
|
-
} }, others), children && typeof children.valueOf() ===
|
|
52
|
-
}
|
|
54
|
+
} }, others), children && typeof children.valueOf() === "string" && (React.createElement(Text, { style: styles.text, ellipsizeMode: "tail", numberOfLines: 1 }, String(children)))));
|
|
55
|
+
};
|
|
53
56
|
SegmentControlItem.displayName = ComponentName.SegmentControlItem;
|
|
54
57
|
export default SegmentControlItem;
|
|
55
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
58
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiU2VnbWVudENvbnRyb2xJdGVtLm5hdGl2ZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL2NvbXBvbmVudHMvc2VnbWVudC1jb250cm9sL2l0ZW0vU2VnbWVudENvbnRyb2xJdGVtLm5hdGl2ZS50c3giXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtBQUFBLE9BQU8s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FBRTtvQkFDWCxPQUFPLENBQUMsQ0FBQyxDQUFDLENBQUE7aUJBQ1g7YUFDRjtRQUNILENBQUMsSUFDRyxNQUFNLEdBRVQsUUFBUSxJQUFJLE9BQU8sUUFBUSxDQUFDLE9BQU8sRUFBRSxLQUFLLFFBQVEsSUFBSSxDQUNyRCxvQkFBQyxJQUFJLElBQUMsS0FBSyxFQUFFLE1BQU0sQ0FBQyxJQUFJLEVBQUUsYUFBYSxFQUFFLE1BQU0sRUFBRSxhQUFhLEVBQUUsQ0FBQyxJQUM5RCxNQUFNLENBQUMsUUFBUSxDQUFDLENBQ1osQ0FDUixDQUNnQixDQUNwQixDQUFBO0FBQ0gsQ0FBQyxDQUFBO0FBRUQsa0JBQWtCLENBQUMsV0FBVyxHQUFHLGFBQWEsQ0FBQyxrQkFBa0IsQ0FBQTtBQUVqRSxlQUFlLGtCQUFrQixDQUFBIn0=
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
|
-
import { Clickable } from '../../../objects
|
|
2
|
+
import { Clickable } from '../../../objects';
|
|
3
3
|
/**
|
|
4
4
|
* SegmentedControl Item Interface
|
|
5
5
|
*/
|
|
6
6
|
export interface SegmentControlItemProps extends Clickable {
|
|
7
|
-
children: React.
|
|
7
|
+
children: React.ReactChild;
|
|
8
8
|
active?: boolean;
|
|
9
9
|
disabled?: boolean;
|
|
10
10
|
inverted?: boolean;
|
|
@@ -2,15 +2,9 @@ export default {
|
|
|
2
2
|
"children": {
|
|
3
3
|
"type": "react",
|
|
4
4
|
"values": [
|
|
5
|
-
"undefined",
|
|
6
|
-
"null",
|
|
7
5
|
"string",
|
|
8
6
|
"number",
|
|
9
|
-
"
|
|
10
|
-
"true",
|
|
11
|
-
"JSXElementConstructor<any>>",
|
|
12
|
-
"ReactNode>",
|
|
13
|
-
"ReactPortal"
|
|
7
|
+
"JSXElementConstructor<any>>"
|
|
14
8
|
]
|
|
15
9
|
},
|
|
16
10
|
"active": {
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import SegmentControlItem from '
|
|
1
|
+
import SegmentControlItem from './SegmentControlItem';
|
|
2
2
|
export default SegmentControlItem;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import SegmentControlItem from '
|
|
1
|
+
import SegmentControlItem from './SegmentControlItem';
|
|
2
2
|
export default SegmentControlItem;
|
|
3
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
3
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb21wb25lbnRzL3NlZ21lbnQtY29udHJvbC9pdGVtL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sa0JBQWtCLE1BQU0sc0JBQXNCLENBQUE7QUFFckQsZUFBZSxrQkFBa0IsQ0FBQSJ9
|