@trilogy-ds/react 4.0.6-SC-beta-4 → 4.0.6-beta-2
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 +6 -4
- package/lib/components/accordion/Accordion.native.d.ts +2 -2
- package/lib/components/accordion/Accordion.native.js +5 -5
- package/lib/components/accordion/AccordionProps.d.ts +3 -0
- package/lib/components/accordion/index.d.ts +5 -5
- package/lib/components/accordion/index.js +6 -6
- package/lib/components/accordion/item/AccordionItem.d.ts +1 -1
- package/lib/components/accordion/item/AccordionItem.js +10 -6
- package/lib/components/accordion/item/body/AccordionBody.d.ts +2 -2
- package/lib/components/accordion/item/body/AccordionBody.js +8 -6
- package/lib/components/accordion/item/body/AccordionBody.native.d.ts +2 -2
- package/lib/components/accordion/item/body/AccordionBody.native.js +4 -4
- package/lib/components/accordion/item/body/AccordionBodyProps.d.ts +1 -1
- package/lib/components/accordion/item/body/index.d.ts +1 -1
- package/lib/components/accordion/item/body/index.js +2 -2
- package/lib/components/accordion/item/header/AccordionHeader.d.ts +2 -2
- package/lib/components/accordion/item/header/AccordionHeader.js +6 -4
- package/lib/components/accordion/item/header/AccordionHeader.native.d.ts +2 -2
- package/lib/components/accordion/item/header/AccordionHeader.native.js +7 -7
- package/lib/components/accordion/item/header/index.d.ts +1 -1
- package/lib/components/accordion/item/header/index.js +2 -2
- 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 +1 -1
- package/lib/components/alert/Alert.js +43 -17
- package/lib/components/alert/context/ToasterContext.js +2 -6
- package/lib/components/autocomplete/AutoComplete.d.ts +1 -1
- package/lib/components/autocomplete/AutoComplete.js +127 -26
- package/lib/components/autocomplete/AutoComplete.native.d.ts +1 -1
- package/lib/components/autocomplete/AutoComplete.native.js +5 -5
- 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 +3 -3
- package/lib/components/autocomplete/index.js +4 -4
- package/lib/components/autocomplete/item/AutoCompleteIem.native.d.ts +1 -1
- package/lib/components/autocomplete/item/AutoCompleteIem.native.js +4 -4
- package/lib/components/autocomplete/item/AutoCompleteItem.d.ts +2 -2
- package/lib/components/autocomplete/item/AutoCompleteItem.js +8 -6
- package/lib/components/autocomplete/item/AutoCompleteItemProps.d.ts +1 -1
- 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 +2 -2
- package/lib/components/autocomplete/menu/AutoCompleteMenu.js +7 -5
- package/lib/components/autocomplete/menu/AutoCompleteMenu.native.js +4 -4
- package/lib/components/autocomplete/menu/index.d.ts +1 -1
- package/lib/components/autocomplete/menu/index.js +2 -2
- package/lib/components/badge/Badge.d.ts +1 -1
- package/lib/components/badge/Badge.js +13 -10
- package/lib/components/badge/BadgeProps.d.ts +2 -2
- package/lib/components/badge/index.d.ts +1 -2
- package/lib/components/badge/index.js +2 -3
- package/lib/components/box/Box.js +16 -8
- package/lib/components/box/content/BoxContent.js +7 -5
- package/lib/components/box/footer/BoxFooter.js +6 -4
- package/lib/components/box/header/BoxHeader.js +7 -5
- package/lib/components/box/item/BoxItem.js +6 -4
- package/lib/components/box/table-container/BoxTableContainer.d.ts +1 -1
- package/lib/components/box/table-container/BoxTableContainer.js +7 -5
- package/lib/components/breadcrumb/Breadcrumb.js +6 -4
- package/lib/components/breadcrumb/item/BreadcrumbItem.js +8 -6
- package/lib/components/button/Button.js +19 -7
- package/lib/components/button/list/ButtonList.js +7 -5
- package/lib/components/card/Card.d.ts +4 -1
- package/lib/components/card/Card.js +15 -8
- package/lib/components/card/CardProps.d.ts +1 -3
- package/lib/components/card/content/CardContent.d.ts +1 -1
- package/lib/components/card/content/CardContent.js +6 -4
- package/lib/components/card/content/CardContentProps.d.ts +1 -1
- 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 +1 -1
- package/lib/components/card/image/CardImage.js +13 -7
- package/lib/components/card/index.d.ts +5 -5
- package/lib/components/card/index.js +6 -6
- package/lib/components/checkbox/Checkbox.js +17 -17
- package/lib/components/checkbox/CheckboxProps.d.ts +2 -1
- package/lib/components/checkbox/tiles/CheckboxTiles.js +6 -4
- package/lib/components/checkbox/tiles/tile/CheckboxTile.js +22 -22
- package/lib/components/chips/Chips.d.ts +1 -1
- package/lib/components/chips/Chips.js +11 -7
- package/lib/components/chips/index.d.ts +2 -2
- package/lib/components/chips/index.js +3 -3
- package/lib/components/chips/list/ChipsList.d.ts +2 -2
- package/lib/components/chips/list/ChipsList.js +7 -5
- package/lib/components/chips/list/index.d.ts +1 -1
- package/lib/components/chips/list/index.js +2 -2
- package/lib/components/columns/Columns.js +4 -2
- package/lib/components/columns/column/Column.js +4 -2
- package/lib/components/container/Container.js +4 -2
- package/lib/components/countdown/Countdown.d.ts +1 -1
- package/lib/components/countdown/Countdown.js +77 -17
- package/lib/components/countdown/CountdownProps.d.ts +1 -1
- package/lib/components/countdown/index.d.ts +2 -2
- package/lib/components/countdown/index.js +3 -3
- package/lib/components/divider/Divider.js +5 -3
- package/lib/components/fab/Fab.d.ts +1 -1
- package/lib/components/fab/Fab.js +16 -7
- package/lib/components/fab/FabProps.d.ts +3 -5
- package/lib/components/fab/index.d.ts +1 -1
- package/lib/components/fab/index.js +2 -2
- package/lib/components/hero/Hero.js +5 -3
- package/lib/components/icon/Icon.js +8 -6
- package/lib/components/image/Image.d.ts +1 -1
- package/lib/components/image/Image.js +12 -7
- package/lib/components/image/ImageProps.d.ts +2 -3
- package/lib/components/image/ImageProps.js +1 -1
- package/lib/components/image/index.d.ts +1 -1
- package/lib/components/image/index.js +2 -2
- package/lib/components/input/Input.d.ts +2 -2
- package/lib/components/input/Input.js +124 -40
- package/lib/components/input/Input.native.d.ts +1 -1
- package/lib/components/input/Input.native.js +6 -6
- package/lib/components/input/InputProps.d.ts +3 -3
- package/lib/components/input/gauge/InputGauge.d.ts +3 -2
- package/lib/components/input/gauge/InputGauge.js +15 -15
- package/lib/components/input/gauge/hook/useGauge.d.ts +1 -1
- package/lib/components/input/gauge/hook/useGauge.js +74 -89
- package/lib/components/input/index.d.ts +3 -3
- package/lib/components/input/index.js +4 -4
- package/lib/components/link/Link.js +8 -6
- package/lib/components/list/List.js +6 -4
- package/lib/components/list/item/ListItem.js +8 -6
- package/lib/components/list/item/description/ListItemDescription.d.ts +2 -2
- package/lib/components/list/item/description/ListItemDescription.js +7 -5
- package/lib/components/modal/Modal.d.ts +1 -1
- package/lib/components/modal/Modal.js +74 -14
- package/lib/components/modal/ModalProps.d.ts +2 -3
- package/lib/components/modal/body/ModalBody.d.ts +1 -1
- package/lib/components/modal/body/ModalBody.js +5 -3
- package/lib/components/modal/footer/ModalFooter.d.ts +1 -1
- package/lib/components/modal/footer/ModalFooter.js +6 -4
- package/lib/components/modal/index.d.ts +4 -4
- package/lib/components/modal/index.js +5 -5
- package/lib/components/otp/Otp.d.ts +1 -1
- package/lib/components/otp/Otp.js +98 -22
- package/lib/components/otp/index.d.ts +1 -1
- package/lib/components/otp/index.js +2 -2
- package/lib/components/pagination/Pagination.d.ts +1 -1
- package/lib/components/pagination/Pagination.js +66 -17
- package/lib/components/pagination/PaginationProps.d.ts +2 -3
- package/lib/components/pagination/index.d.ts +2 -2
- package/lib/components/pagination/index.js +3 -3
- package/lib/components/popover/Popover.js +7 -5
- package/lib/components/price/Price.js +17 -15
- package/lib/components/product-tour/ProductTour.js +17 -13
- package/lib/components/progress/Progress.d.ts +2 -2
- package/lib/components/progress/Progress.js +13 -11
- package/lib/components/progress/ProgressProps.d.ts +1 -1
- package/lib/components/progress/index.d.ts +3 -3
- package/lib/components/progress/index.js +4 -4
- package/lib/components/progress/radial/ProgressRadial.d.ts +1 -1
- package/lib/components/progress/radial/ProgressRadial.js +52 -11
- package/lib/components/progress/radial/ProgressRadialProps.d.ts +3 -5
- 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 +1 -1
- package/lib/components/progress/radial/item/ProgressRadialtem.js +6 -4
- 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.js +8 -6
- package/lib/components/radio/RadioProps.d.ts +1 -1
- package/lib/components/radio/index.d.ts +5 -5
- package/lib/components/radio/index.js +6 -6
- package/lib/components/radio/list/RadioList.d.ts +1 -1
- package/lib/components/radio/list/RadioList.js +7 -5
- package/lib/components/radio/list/RadioListProps.d.ts +1 -1
- package/lib/components/radio/list/index.d.ts +1 -1
- package/lib/components/radio/list/index.js +2 -2
- package/lib/components/radio/tiles/RadioTiles.js +7 -5
- package/lib/components/radio/tiles/RadioTilesProps.d.ts +1 -1
- package/lib/components/radio/tiles/index.d.ts +1 -1
- package/lib/components/radio/tiles/index.js +2 -2
- package/lib/components/radio/tiles/tile/RadioTile.js +12 -10
- package/lib/components/radio/tiles/tile/index.d.ts +1 -1
- package/lib/components/radio/tiles/tile/index.js +2 -2
- package/lib/components/range/Range.d.ts +1 -1
- package/lib/components/range/Range.js +57 -15
- package/lib/components/range/RangeProps.d.ts +1 -2
- package/lib/components/range/index.d.ts +1 -1
- package/lib/components/range/index.js +2 -2
- package/lib/components/rows/Rows.js +6 -4
- package/lib/components/rows/row/Row.js +6 -4
- package/lib/components/scroll-view/ScrollView.d.ts +2 -2
- package/lib/components/scroll-view/ScrollView.js +13 -11
- package/lib/components/section/Section.js +7 -5
- package/lib/components/segment-control/SegmentControl.d.ts +2 -8
- package/lib/components/segment-control/SegmentControl.js +28 -16
- package/lib/components/segment-control/SegmentControlProps.d.ts +1 -1
- package/lib/components/segment-control/item/SegmentControlItem.d.ts +2 -6
- package/lib/components/segment-control/item/SegmentControlItem.js +18 -8
- package/lib/components/segment-control/item/SegmentControlItemProps.d.ts +1 -1
- 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 +1 -1
- package/lib/components/select/Select.js +3 -3
- package/lib/components/select/SelectProps.d.ts +2 -3
- package/lib/components/select/index.d.ts +2 -2
- package/lib/components/select/index.js +3 -3
- package/lib/components/select/option/SelectOption.d.ts +2 -2
- package/lib/components/select/option/SelectOption.js +9 -7
- 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 +1 -1
- package/lib/components/select/web/SelectDynamic.js +131 -15
- package/lib/components/select/web/SelectNative.js +35 -15
- package/lib/components/select/web/index.d.ts +2 -2
- package/lib/components/select/web/index.js +3 -3
- package/lib/components/spacer/Spacer.js +5 -3
- package/lib/components/stepper/Stepper.d.ts +2 -2
- package/lib/components/stepper/Stepper.js +36 -9
- package/lib/components/stepper/Stepper.native.js +3 -3
- package/lib/components/stepper/step/Step.d.ts +1 -1
- package/lib/components/stepper/step/Step.js +10 -8
- package/lib/components/stepper/step/index.d.ts +1 -1
- package/lib/components/stepper/step/index.js +2 -2
- package/lib/components/sticker/Sticker.js +9 -7
- package/lib/components/switch/Switch.d.ts +1 -1
- package/lib/components/switch/Switch.js +43 -11
- package/lib/components/switch/SwitchProps.d.ts +3 -2
- package/lib/components/switch/index.d.ts +1 -1
- package/lib/components/switch/index.js +2 -2
- package/lib/components/table/Table.js +7 -5
- package/lib/components/table/body/TableBody.js +7 -5
- package/lib/components/table/head/TableHead.js +7 -5
- package/lib/components/table/td/TableTd.js +6 -4
- package/lib/components/table/th/TableTh.js +6 -4
- package/lib/components/table/tr/TableTr.d.ts +1 -1
- package/lib/components/table/tr/TableTr.js +9 -7
- package/lib/components/tabs/Tabs.js +18 -6
- package/lib/components/tabs/TabsProps.d.ts +1 -4
- package/lib/components/tabs/context/index.js +1 -2
- package/lib/components/tabs/tab-list/TabList.js +4 -2
- package/lib/components/tabs/tab-list/tab/Tab.js +19 -4
- package/lib/components/tabs/tab-list/tab/TabProps.d.ts +1 -3
- package/lib/components/tabs/tab-panels/TabPanels.js +4 -2
- package/lib/components/tabs/tab-panels/tab-panel/TabPanel.js +6 -4
- package/lib/components/tabs/tab-panels/tab-panel/TabPanelProps.d.ts +1 -1
- package/lib/components/tag/Tag.js +5 -3
- package/lib/components/tag/list/TagList.js +7 -5
- package/lib/components/text/Text.js +7 -5
- package/lib/components/textarea/Textarea.d.ts +1 -1
- package/lib/components/textarea/Textarea.js +27 -15
- package/lib/components/textarea/TextareaProps.d.ts +3 -4
- package/lib/components/timeline/Timeline.js +6 -4
- package/lib/components/timeline/content/TimelineContent.js +7 -5
- package/lib/components/timeline/item/TimelineItem.js +6 -4
- package/lib/components/timeline/marker/TimelineMarker.js +7 -5
- package/lib/components/title/Title.js +9 -7
- package/lib/components/view/View.d.ts +1 -1
- package/lib/components/view/View.js +15 -12
- package/lib/context/index.d.ts +1 -1
- package/lib/context/index.js +2 -3
- package/lib/context/providerStates.js +2 -3
- package/lib/context/providerTheme.js +1 -2
- package/lib/helpers/hashClassesHelpers.d.ts +3 -1
- package/lib/helpers/hashClassesHelpers.js +15 -18
- package/lib/objects/Typography/TypographyBold.js +2 -3
- package/lib/version.d.ts +1 -1
- package/lib/version.js +2 -2
- package/package.json +1 -1
- package/lib/components/accordion/item/body/hooks/useAccordionBoy.d.ts +0 -6
- package/lib/components/accordion/item/body/hooks/useAccordionBoy.js +0 -14
- package/lib/components/alert/hooks/useAlert.d.ts +0 -23
- package/lib/components/alert/hooks/useAlert.js +0 -48
- package/lib/components/autocomplete/hooks/useAutocomplete.d.ts +0 -40
- package/lib/components/autocomplete/hooks/useAutocomplete.js +0 -144
- package/lib/components/autocomplete/item/hooks/useAutocompleteItem.d.ts +0 -9
- package/lib/components/autocomplete/item/hooks/useAutocompleteItem.js +0 -20
- package/lib/components/button/hooks/useButton.d.ts +0 -12
- package/lib/components/button/hooks/useButton.js +0 -16
- package/lib/components/countdown/hooks/useCountdown.d.ts +0 -16
- package/lib/components/countdown/hooks/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/hooks/useModal.d.ts +0 -26
- package/lib/components/modal/hooks/useModal.js +0 -86
- package/lib/components/otp/hooks/useOtp.d.ts +0 -20
- package/lib/components/otp/hooks/useOtp.js +0 -101
- package/lib/components/pagination/hooks/usePagination.d.ts +0 -25
- package/lib/components/pagination/hooks/usePagination.js +0 -77
- package/lib/components/product-tour/hooks/useProductTour.d.ts +0 -11
- package/lib/components/product-tour/hooks/useProductTour.js +0 -22
- package/lib/components/progress/radial/hooks/useProgressRadial.d.ts +0 -15
- package/lib/components/progress/radial/hooks/useProgressRadial.js +0 -57
- package/lib/components/range/hooks/useRange.d.ts +0 -30
- package/lib/components/range/hooks/useRange.js +0 -63
- package/lib/components/segment-control/hooks/useSegmentControl.d.ts +0 -14
- package/lib/components/segment-control/hooks/useSegmentControl.js +0 -31
- package/lib/components/segment-control/item/hooks/useSegmentControlItem.d.ts +0 -14
- package/lib/components/segment-control/item/hooks/useSegmentControlItem.js +0 -24
- package/lib/components/select/web/hooks/useSelectDynamic.d.ts +0 -27
- package/lib/components/select/web/hooks/useSelectDynamic.js +0 -156
- 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/hooks/useStepper.d.ts +0 -9
- package/lib/components/stepper/hooks/useStepper.js +0 -55
- package/lib/components/switch/hooks/useSwitch.d.ts +0 -18
- package/lib/components/switch/hooks/useSwitch.js +0 -46
- package/lib/components/tabs/hooks/useTabs.d.ts +0 -12
- package/lib/components/tabs/hooks/useTabs.js +0 -33
- package/lib/components/tabs/tab-list/tab/hooks/useTab.d.ts +0 -17
- package/lib/components/tabs/tab-list/tab/hooks/useTab.js +0 -28
- package/lib/components/tabs/tab-panels/tab-panel/hooks/useTabPanel.d.ts +0 -3
- package/lib/components/tabs/tab-panels/tab-panel/hooks/useTabPanel.js +0 -14
- package/lib/components/textarea/hooks/useTextarea.d.ts +0 -15
- package/lib/components/textarea/hooks/useTextarea.js +0 -30
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ClickEvent } from '../../../../../events/OnClickEvent';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
interface IParams {
|
|
4
|
-
index: number;
|
|
5
|
-
active?: boolean;
|
|
6
|
-
routerLink?: React.ElementType;
|
|
7
|
-
disabled?: boolean;
|
|
8
|
-
onClick?: ClickEvent;
|
|
9
|
-
}
|
|
10
|
-
export declare const useTab: ({ index, disabled, routerLink, onClick, active }: IParams) => {
|
|
11
|
-
handleClick: (e: React.MouseEvent) => void;
|
|
12
|
-
isActive: boolean;
|
|
13
|
-
} | {
|
|
14
|
-
isActive: boolean;
|
|
15
|
-
handleClick?: undefined;
|
|
16
|
-
};
|
|
17
|
-
export {};
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { TabsContext } from '../../../../../components/tabs/context';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export var useTab = function (_a) {
|
|
4
|
-
var index = _a.index, disabled = _a.disabled, routerLink = _a.routerLink, onClick = _a.onClick, active = _a.active;
|
|
5
|
-
try {
|
|
6
|
-
var _b = React.useContext(TabsContext), activeIndex_1 = _b.activeIndex, setActiveIndex_1 = _b.setActiveIndex;
|
|
7
|
-
var isActive = React.useMemo(function () { return activeIndex_1 === index; }, [activeIndex_1, index]);
|
|
8
|
-
var handleClick = React.useCallback(function (e) {
|
|
9
|
-
if (!disabled) {
|
|
10
|
-
if (!routerLink)
|
|
11
|
-
setActiveIndex_1(index);
|
|
12
|
-
if (onClick)
|
|
13
|
-
onClick(e);
|
|
14
|
-
}
|
|
15
|
-
}, [disabled, onClick, index, setActiveIndex_1, routerLink]);
|
|
16
|
-
React.useEffect(function () {
|
|
17
|
-
if (active)
|
|
18
|
-
setActiveIndex_1(index);
|
|
19
|
-
}, [active, setActiveIndex_1, index]);
|
|
20
|
-
return { handleClick: handleClick, isActive: isActive };
|
|
21
|
-
}
|
|
22
|
-
catch (_c) {
|
|
23
|
-
return {
|
|
24
|
-
isActive: 0 === index,
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
};
|
|
28
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVGFiLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vY29tcG9uZW50cy90YWJzL3RhYi1saXN0L3RhYi9ob29rcy91c2VUYWIudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTtBQUV2RCxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFVekIsTUFBTSxDQUFDLElBQU0sTUFBTSxHQUFHLFVBQUMsRUFBeUQ7UUFBdkQsS0FBSyxXQUFBLEVBQUUsUUFBUSxjQUFBLEVBQUUsVUFBVSxnQkFBQSxFQUFFLE9BQU8sYUFBQSxFQUFFLE1BQU0sWUFBQTtJQUNuRSxJQUFJO1FBQ0ksSUFBQSxLQUFrQyxLQUFLLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxFQUE3RCxhQUFXLGlCQUFBLEVBQUUsZ0JBQWMsb0JBQWtDLENBQUE7UUFDckUsSUFBTSxRQUFRLEdBQUcsS0FBSyxDQUFDLE9BQU8sQ0FBQyxjQUFNLE9BQUEsYUFBVyxLQUFLLEtBQUssRUFBckIsQ0FBcUIsRUFBRSxDQUFDLGFBQVcsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFBO1FBRWpGLElBQU0sV0FBVyxHQUFHLEtBQUssQ0FBQyxXQUFXLENBQ25DLFVBQUMsQ0FBbUI7WUFDbEIsSUFBSSxDQUFDLFFBQVEsRUFBRTtnQkFDYixJQUFJLENBQUMsVUFBVTtvQkFBRSxnQkFBYyxDQUFDLEtBQUssQ0FBQyxDQUFBO2dCQUN0QyxJQUFJLE9BQU87b0JBQUUsT0FBTyxDQUFDLENBQUMsQ0FBQyxDQUFBO2FBQ3hCO1FBQ0gsQ0FBQyxFQUNELENBQUMsUUFBUSxFQUFFLE9BQU8sRUFBRSxLQUFLLEVBQUUsZ0JBQWMsRUFBRSxVQUFVLENBQUMsQ0FDdkQsQ0FBQTtRQUVELEtBQUssQ0FBQyxTQUFTLENBQUM7WUFDZCxJQUFJLE1BQU07Z0JBQUUsZ0JBQWMsQ0FBQyxLQUFLLENBQUMsQ0FBQTtRQUNuQyxDQUFDLEVBQUUsQ0FBQyxNQUFNLEVBQUUsZ0JBQWMsRUFBRSxLQUFLLENBQUMsQ0FBQyxDQUFBO1FBRW5DLE9BQU8sRUFBRSxXQUFXLGFBQUEsRUFBRSxRQUFRLFVBQUEsRUFBRSxDQUFBO0tBQ2pDO0lBQUMsV0FBTTtRQUNOLE9BQU87WUFDTCxRQUFRLEVBQUUsQ0FBQyxLQUFLLEtBQUs7U0FDdEIsQ0FBQTtLQUNGO0FBQ0gsQ0FBQyxDQUFBIn0=
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { TabsContext } from '../../../../../components/tabs/context';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export var useTabPanel = function () {
|
|
4
|
-
try {
|
|
5
|
-
var activeIndex = React.useContext(TabsContext).activeIndex;
|
|
6
|
-
return { activeIndex: activeIndex };
|
|
7
|
-
}
|
|
8
|
-
catch (_a) {
|
|
9
|
-
return {
|
|
10
|
-
activeIndex: 0,
|
|
11
|
-
};
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVGFiUGFuZWwuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi9jb21wb25lbnRzL3RhYnMvdGFiLXBhbmVscy90YWItcGFuZWwvaG9va3MvdXNlVGFiUGFuZWwudHN4Il0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxXQUFXLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQTtBQUN2RCxPQUFPLEtBQUssTUFBTSxPQUFPLENBQUE7QUFFekIsTUFBTSxDQUFDLElBQU0sV0FBVyxHQUFHO0lBQ3pCLElBQUk7UUFDTSxJQUFBLFdBQVcsR0FBSyxLQUFLLENBQUMsVUFBVSxDQUFDLFdBQVcsQ0FBQyxZQUFsQyxDQUFrQztRQUNyRCxPQUFPLEVBQUUsV0FBVyxhQUFBLEVBQUUsQ0FBQTtLQUN2QjtJQUFDLFdBQU07UUFDTixPQUFPO1lBQ0wsV0FBVyxFQUFFLENBQUM7U0FDZixDQUFBO0tBQ0Y7QUFDSCxDQUFDLENBQUEifQ==
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { TextareaChangeEventHandler } from '../TextareaProps';
|
|
3
|
-
interface IParams {
|
|
4
|
-
value?: string;
|
|
5
|
-
onChange?: TextareaChangeEventHandler;
|
|
6
|
-
defaultValue?: string;
|
|
7
|
-
}
|
|
8
|
-
export declare const useTextarea: ({ onChange, defaultValue }: IParams) => {
|
|
9
|
-
value: string;
|
|
10
|
-
handleChange: (e: React.ChangeEvent<HTMLTextAreaElement>) => void;
|
|
11
|
-
} | {
|
|
12
|
-
value: string | undefined;
|
|
13
|
-
handleChange?: undefined;
|
|
14
|
-
};
|
|
15
|
-
export {};
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { __read } from "tslib";
|
|
2
|
-
import React from 'react';
|
|
3
|
-
export var useTextarea = function (_a) {
|
|
4
|
-
var onChange = _a.onChange, defaultValue = _a.defaultValue;
|
|
5
|
-
try {
|
|
6
|
-
var _b = __read(React.useState(defaultValue || ''), 2), value = _b[0], setValue_1 = _b[1];
|
|
7
|
-
var handleChange = React.useCallback(function (e) {
|
|
8
|
-
setValue_1(e.target.value);
|
|
9
|
-
if (onChange) {
|
|
10
|
-
onChange({
|
|
11
|
-
textareaName: e.target.name,
|
|
12
|
-
textareaValue: e.target.value,
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
}, [onChange]);
|
|
16
|
-
React.useEffect(function () {
|
|
17
|
-
setValue_1(defaultValue || '');
|
|
18
|
-
}, [defaultValue]);
|
|
19
|
-
return {
|
|
20
|
-
value: value,
|
|
21
|
-
handleChange: handleChange,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
catch (_c) {
|
|
25
|
-
return {
|
|
26
|
-
value: defaultValue,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlVGV4dGFyZWEuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9jb21wb25lbnRzL3RleHRhcmVhL2hvb2tzL3VzZVRleHRhcmVhLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO0FBQUEsT0FBTyxLQUFLLE1BQU0sT0FBTyxDQUFBO0FBU3pCLE1BQU0sQ0FBQyxJQUFNLFdBQVcsR0FBRyxVQUFDLEVBQW1DO1FBQWpDLFFBQVEsY0FBQSxFQUFFLFlBQVksa0JBQUE7SUFDbEQsSUFBSTtRQUNJLElBQUEsS0FBQSxPQUFvQixLQUFLLENBQUMsUUFBUSxDQUFDLFlBQVksSUFBSSxFQUFFLENBQUMsSUFBQSxFQUFyRCxLQUFLLFFBQUEsRUFBRSxVQUFRLFFBQXNDLENBQUE7UUFFNUQsSUFBTSxZQUFZLEdBQUcsS0FBSyxDQUFDLFdBQVcsQ0FDcEMsVUFBQyxDQUF5QztZQUN4QyxVQUFRLENBQUMsQ0FBQyxDQUFDLE1BQU0sQ0FBQyxLQUFLLENBQUMsQ0FBQTtZQUN4QixJQUFJLFFBQVEsRUFBRTtnQkFDWixRQUFRLENBQUM7b0JBQ1AsWUFBWSxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsSUFBSTtvQkFDM0IsYUFBYSxFQUFFLENBQUMsQ0FBQyxNQUFNLENBQUMsS0FBSztpQkFDOUIsQ0FBQyxDQUFBO2FBQ0g7UUFDSCxDQUFDLEVBQ0QsQ0FBQyxRQUFRLENBQUMsQ0FDWCxDQUFBO1FBRUQsS0FBSyxDQUFDLFNBQVMsQ0FBQztZQUNkLFVBQVEsQ0FBQyxZQUFZLElBQUksRUFBRSxDQUFDLENBQUE7UUFDOUIsQ0FBQyxFQUFFLENBQUMsWUFBWSxDQUFDLENBQUMsQ0FBQTtRQUVsQixPQUFPO1lBQ0wsS0FBSyxPQUFBO1lBQ0wsWUFBWSxjQUFBO1NBQ2IsQ0FBQTtLQUNGO0lBQUMsV0FBTTtRQUNOLE9BQU87WUFDTCxLQUFLLEVBQUUsWUFBWTtTQUNwQixDQUFBO0tBQ0Y7QUFDSCxDQUFDLENBQUEifQ==
|