td-stylekit 24.8.0 → 25.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.babelrc.js +8 -23
- package/CHANGELOG.md +35 -0
- package/dist/es/ActionBar/ActionBar.js +42 -18
- package/dist/es/ActionBar/components/ActionMenu.js +41 -17
- package/dist/es/ActionBar/components/Container.d.ts +4 -126
- package/dist/es/ActionBar/components/Container.js +20 -5
- package/dist/es/ActionBar/components/IconButton.d.ts +7 -133
- package/dist/es/ActionBar/components/IconButton.js +22 -6
- package/dist/es/ActionBar/components/Prefix.js +24 -8
- package/dist/es/ActionBar/components/index.js +58 -5
- package/dist/es/ActionBar/index.js +17 -2
- package/dist/es/ActionBar/types.js +5 -0
- package/dist/es/Badge/Badge.d.ts +4 -126
- package/dist/es/Badge/Badge.js +42 -26
- package/dist/es/Badge/constants.js +9 -2
- package/dist/es/Badge/index.js +25 -3
- package/dist/es/BarChart/BarChart.d.ts +6 -7
- package/dist/es/BarChart/BarChart.js +67 -39
- package/dist/es/BarChart/index.js +17 -2
- package/dist/es/Box/Box.d.ts +4 -126
- package/dist/es/Box/Box.js +37 -12
- package/dist/es/Box/index.js +17 -2
- package/dist/es/Button/Button.js +130 -79
- package/dist/es/Button/elements.d.ts +4 -126
- package/dist/es/Button/elements.js +17 -3
- package/dist/es/Button/index.js +35 -3
- package/dist/es/Canvas/Canvas.js +31 -12
- package/dist/es/Canvas/elements.d.ts +55 -2537
- package/dist/es/Canvas/elements.js +84 -33
- package/dist/es/Canvas/index.js +17 -2
- package/dist/es/Card/Card.d.ts +4 -126
- package/dist/es/Card/Card.js +20 -7
- package/dist/es/Card/index.js +17 -2
- package/dist/es/ChartPrimitives/ChartLegend.d.ts +22 -635
- package/dist/es/ChartPrimitives/ChartLegend.js +62 -25
- package/dist/es/ChartPrimitives/Container.d.ts +4 -126
- package/dist/es/ChartPrimitives/Container.js +17 -5
- package/dist/es/ChartPrimitives/Defs.js +73 -41
- package/dist/es/ChartPrimitives/Noop.js +8 -1
- package/dist/es/ChartPrimitives/Tooltip.d.ts +2 -3
- package/dist/es/ChartPrimitives/Tooltip.js +96 -32
- package/dist/es/ChartPrimitives/index.d.ts +6 -126
- package/dist/es/ChartPrimitives/index.js +67 -14
- package/dist/es/ChartPrimitives/utils.d.ts +26 -277
- package/dist/es/ChartPrimitives/utils.js +112 -69
- package/dist/es/Checkbox/Checkbox.js +104 -48
- package/dist/es/Checkbox/index.js +17 -2
- package/dist/es/CheckboxField/CheckboxField.js +57 -26
- package/dist/es/CheckboxField/index.js +17 -2
- package/dist/es/CollapsibleToggle/CollapsibleToggle.js +53 -28
- package/dist/es/CollapsibleToggle/constants.js +8 -1
- package/dist/es/CollapsibleToggle/index.js +17 -2
- package/dist/es/Column/Column.js +30 -10
- package/dist/es/Column/index.js +17 -2
- package/dist/es/ComparisonChart/ComparisonChart.d.ts +41 -1
- package/dist/es/ComparisonChart/ComparisonChart.js +74 -44
- package/dist/es/ComparisonChart/constants.js +9 -2
- package/dist/es/ComparisonChart/index.js +17 -2
- package/dist/es/ComponentGroup/ComponentGroup.js +28 -7
- package/dist/es/ComponentGroup/index.js +17 -2
- package/dist/es/DataGrid/DataGrid.js +127 -67
- package/dist/es/DataGrid/components/BasicColumn.js +43 -21
- package/dist/es/DataGrid/components/CategoryFilter.js +42 -16
- package/dist/es/DataGrid/components/CollapsibleCell.d.ts +5 -128
- package/dist/es/DataGrid/components/CollapsibleCell.js +81 -33
- package/dist/es/DataGrid/components/ColumnHeader.js +73 -39
- package/dist/es/DataGrid/components/ColumnHeaderActions.js +71 -37
- package/dist/es/DataGrid/components/FocusableRow.js +53 -20
- package/dist/es/DataGrid/components/InputCell.js +63 -31
- package/dist/es/DataGrid/components/ScrollableTable.d.ts +7 -7
- package/dist/es/DataGrid/components/ScrollableTable.js +95 -56
- package/dist/es/DataGrid/components/index.js +73 -9
- package/dist/es/DataGrid/constants.js +15 -4
- package/dist/es/DataGrid/elements.d.ts +352 -2543
- package/dist/es/DataGrid/elements.js +214 -92
- package/dist/es/DataGrid/index.js +17 -2
- package/dist/es/DataGrid/renderers.js +138 -96
- package/dist/es/DataGrid/sampleData.js +24 -9
- package/dist/es/DataGrid/utils.js +43 -24
- package/dist/es/DateControl/DateControl.js +113 -60
- package/dist/es/DateControl/elements.d.ts +180 -887
- package/dist/es/DateControl/elements.js +58 -22
- package/dist/es/DateControl/index.js +17 -2
- package/dist/es/DateField/DateField.js +105 -53
- package/dist/es/DateField/elements.d.ts +9 -251
- package/dist/es/DateField/elements.js +34 -12
- package/dist/es/DateField/index.js +17 -2
- package/dist/es/DatePicker/DatePicker.js +97 -56
- package/dist/es/DatePicker/index.js +28 -4
- package/dist/es/DatePicker/utils.js +47 -19
- package/dist/es/DetailPanel/DetailPanel.js +31 -17
- package/dist/es/DetailPanel/elements.d.ts +20 -505
- package/dist/es/DetailPanel/elements.js +92 -50
- package/dist/es/DetailPanel/index.js +17 -2
- package/dist/es/DistributionChart/DistributionChart.js +36 -14
- package/dist/es/DistributionChart/index.js +21 -3
- package/dist/es/DistributionChart/utils.js +10 -2
- package/dist/es/Drawer/Drawer.js +37 -17
- package/dist/es/Drawer/elements.d.ts +30 -1015
- package/dist/es/Drawer/elements.js +120 -67
- package/dist/es/Drawer/index.js +17 -2
- package/dist/es/DropdownButton/DropdownButton.d.ts +1 -125
- package/dist/es/DropdownButton/DropdownButton.js +90 -44
- package/dist/es/DropdownButton/DropdownButtonElements.d.ts +22 -776
- package/dist/es/DropdownButton/DropdownButtonElements.js +129 -59
- package/dist/es/DropdownButton/DropdownButtonUtils.js +19 -4
- package/dist/es/DropdownButton/index.js +17 -2
- package/dist/es/FileInput/FileInput.js +66 -26
- package/dist/es/FileInput/index.js +17 -2
- package/dist/es/FormControl/FormControl.d.ts +4 -17
- package/dist/es/FormControl/FormControl.js +105 -63
- package/dist/es/FormControl/components/CheckboxGroup.js +43 -17
- package/dist/es/FormControl/components/RadioGroup.js +31 -16
- package/dist/es/FormControl/components/Textarea.js +24 -7
- package/dist/es/FormControl/components/index.js +31 -4
- package/dist/es/FormControl/elements.d.ts +57 -1770
- package/dist/es/FormControl/elements.js +107 -46
- package/dist/es/FormControl/index.js +17 -2
- package/dist/es/FormField/FormField.d.ts +1 -11
- package/dist/es/FormField/FormField.js +112 -67
- package/dist/es/FormField/elements.d.ts +13 -377
- package/dist/es/FormField/elements.js +54 -20
- package/dist/es/FormField/index.js +31 -3
- package/dist/es/FormField/utils.js +29 -5
- package/dist/es/FormFieldAddon/FormFieldAddon.js +65 -28
- package/dist/es/FormFieldAddon/FormFieldAddonElements.d.ts +15 -1266
- package/dist/es/FormFieldAddon/FormFieldAddonElements.js +47 -16
- package/dist/es/FormFieldAddon/index.js +17 -2
- package/dist/es/FormLabel/FormLabel.js +18 -5
- package/dist/es/FormLabel/elements.d.ts +5 -127
- package/dist/es/FormLabel/elements.js +19 -4
- package/dist/es/FormLabel/index.js +17 -2
- package/dist/es/FormModal/FormModal.js +47 -22
- package/dist/es/FormModal/index.js +17 -2
- package/dist/es/Grid/Grid.d.ts +4 -126
- package/dist/es/Grid/Grid.js +17 -4
- package/dist/es/Grid/GridItem.d.ts +4 -126
- package/dist/es/Grid/GridItem.js +17 -5
- package/dist/es/Grid/index.js +25 -4
- package/dist/es/GrowthRateChart/GrowthRateChart.d.ts +2 -2
- package/dist/es/GrowthRateChart/GrowthRateChart.js +40 -18
- package/dist/es/GrowthRateChart/index.js +17 -2
- package/dist/es/Heading/Heading.js +37 -11
- package/dist/es/Heading/index.js +17 -2
- package/dist/es/Highlighter/Highlighter.js +25 -11
- package/dist/es/Highlighter/index.js +17 -2
- package/dist/es/Histogram/Data.js +9 -2
- package/dist/es/Histogram/Histogram.js +85 -46
- package/dist/es/Histogram/index.js +17 -2
- package/dist/es/Icon/Icon.js +68 -30
- package/dist/es/Icon/index.js +33 -2
- package/dist/es/Icon/staticTypes.d.ts +4 -2
- package/dist/es/Icon/staticTypes.js +5 -0
- package/dist/es/Icon/types.js +7 -0
- package/dist/es/IconBar/IconBar.d.ts +33 -1272
- package/dist/es/IconBar/IconBar.js +74 -45
- package/dist/es/IconBar/IconItem.d.ts +16 -507
- package/dist/es/IconBar/IconItem.js +64 -31
- package/dist/es/IconBar/LogoItem.js +27 -14
- package/dist/es/IconBar/index.js +17 -2
- package/dist/es/IconBar/variants.js +24 -7
- package/dist/es/InfiniteList/InfiniteList.js +65 -24
- package/dist/es/InfiniteList/index.js +17 -2
- package/dist/es/Input/Input.d.ts +15 -391
- package/dist/es/Input/Input.js +139 -72
- package/dist/es/Input/index.js +17 -2
- package/dist/es/LeftTruncatedText/LeftTruncatedText.js +43 -22
- package/dist/es/LeftTruncatedText/index.js +17 -2
- package/dist/es/Link/Link.d.ts +8 -126
- package/dist/es/Link/Link.js +31 -7
- package/dist/es/Link/index.js +17 -2
- package/dist/es/Loader/Loader.js +21 -7
- package/dist/es/Loader/LoaderDiamond.js +96 -73
- package/dist/es/Loader/LoaderDots.js +41 -21
- package/dist/es/Loader/index.js +17 -2
- package/dist/es/Logo/Logo.d.ts +9 -2
- package/dist/es/Logo/Logo.js +79 -248
- package/dist/es/Logo/LogoDark.d.ts +11 -0
- package/dist/es/Logo/LogoDark.js +126 -0
- package/dist/es/Logo/LogoLight.d.ts +11 -0
- package/dist/es/Logo/LogoLight.js +123 -0
- package/dist/es/Logo/LogoV4.d.ts +11 -0
- package/dist/es/Logo/LogoV4.js +168 -0
- package/dist/es/Logo/index.js +17 -2
- package/dist/es/Menu/Menu.js +104 -74
- package/dist/es/Menu/MenuElements.d.ts +1 -126
- package/dist/es/Menu/MenuElements.js +87 -32
- package/dist/es/Menu/index.js +17 -2
- package/dist/es/MiddleTruncatedText/MiddleTruncatedText.js +34 -25
- package/dist/es/MiddleTruncatedText/index.js +17 -2
- package/dist/es/Modal/Modal.d.ts +9 -254
- package/dist/es/Modal/Modal.js +78 -35
- package/dist/es/Modal/components/Body.js +27 -8
- package/dist/es/Modal/components/Footer.d.ts +3 -125
- package/dist/es/Modal/components/Footer.js +34 -16
- package/dist/es/Modal/components/FooterConfirmation.js +30 -10
- package/dist/es/Modal/components/Header.js +37 -19
- package/dist/es/Modal/components/MenuBody.d.ts +16 -638
- package/dist/es/Modal/components/MenuBody.js +146 -75
- package/dist/es/Modal/components/ModalMessage.d.ts +37 -1026
- package/dist/es/Modal/components/ModalMessage.js +125 -45
- package/dist/es/Modal/components/ModalOverlay.js +26 -11
- package/dist/es/Modal/components/elements.d.ts +50 -1765
- package/dist/es/Modal/components/elements.js +142 -60
- package/dist/es/Modal/components/index.js +79 -9
- package/dist/es/Modal/constants.js +17 -5
- package/dist/es/Modal/context.js +12 -3
- package/dist/es/Modal/index.js +13 -2
- package/dist/es/MultiSelect/MultiSelect.d.ts +5 -2
- package/dist/es/MultiSelect/MultiSelect.js +86 -38
- package/dist/es/MultiSelect/elements.d.ts +25 -1762
- package/dist/es/MultiSelect/elements.js +136 -58
- package/dist/es/MultiSelect/index.js +35 -3
- package/dist/es/NavigationBar/LogoItem.js +21 -10
- package/dist/es/NavigationBar/NavigationBar.d.ts +16 -379
- package/dist/es/NavigationBar/NavigationBar.js +49 -24
- package/dist/es/NavigationBar/NavigationItem.d.ts +8 -254
- package/dist/es/NavigationBar/NavigationItem.js +81 -32
- package/dist/es/NavigationBar/index.js +17 -2
- package/dist/es/NavigationPopover/NavigationPopover.d.ts +16 -632
- package/dist/es/NavigationPopover/NavigationPopover.js +50 -28
- package/dist/es/NavigationPopover/index.js +17 -2
- package/dist/es/Overlay/Overlay.js +30 -13
- package/dist/es/Overlay/OverlayBody.d.ts +8 -382
- package/dist/es/Overlay/OverlayBody.js +28 -9
- package/dist/es/Overlay/OverlayHeader.d.ts +37 -508
- package/dist/es/Overlay/OverlayHeader.js +94 -52
- package/dist/es/Overlay/index.js +33 -4
- package/dist/es/Paragraph/Paragraph.d.ts +4 -126
- package/dist/es/Paragraph/Paragraph.js +22 -8
- package/dist/es/Paragraph/index.js +17 -2
- package/dist/es/PieChart/PieChart.js +77 -43
- package/dist/es/PieChart/index.js +15 -2
- package/dist/es/Popover/Popover.d.ts +9 -252
- package/dist/es/Popover/Popover.js +57 -22
- package/dist/es/Popover/index.js +17 -2
- package/dist/es/PositiveNegativeBarChart/PositiveNegativeBarChart.js +65 -41
- package/dist/es/PositiveNegativeBarChart/index.js +23 -3
- package/dist/es/PositiveNegativeBarChart/utils.js +10 -2
- package/dist/es/Radio/Radio.js +85 -40
- package/dist/es/Radio/index.js +17 -2
- package/dist/es/RatioPieChart/RatioPieChart.js +20 -6
- package/dist/es/RatioPieChart/index.js +15 -2
- package/dist/es/RightTruncatedText/RightTruncatedText.js +30 -12
- package/dist/es/RightTruncatedText/index.js +17 -2
- package/dist/es/Row/Row.js +23 -8
- package/dist/es/Row/index.js +17 -2
- package/dist/es/SecondaryNavigation/SecondaryNavigation.js +48 -22
- package/dist/es/SecondaryNavigation/elements/Item.d.ts +4 -126
- package/dist/es/SecondaryNavigation/elements/Item.js +17 -5
- package/dist/es/SecondaryNavigation/elements/Section.js +53 -22
- package/dist/es/SecondaryNavigation/elements/Title.d.ts +4 -126
- package/dist/es/SecondaryNavigation/elements/Title.js +17 -5
- package/dist/es/SecondaryNavigation/elements/Wrapper.d.ts +5 -127
- package/dist/es/SecondaryNavigation/elements/Wrapper.js +17 -5
- package/dist/es/SecondaryNavigation/index.d.ts +9 -251
- package/dist/es/SecondaryNavigation/index.js +24 -10
- package/dist/es/Section/Section.js +67 -27
- package/dist/es/Section/elements.d.ts +193 -1046
- package/dist/es/Section/elements.js +73 -30
- package/dist/es/Section/index.js +17 -2
- package/dist/es/Select/Select.d.ts +1 -1
- package/dist/es/Select/Select.js +110 -57
- package/dist/es/Select/components/CreatableSelect.js +41 -11
- package/dist/es/Select/components/MenuList.js +65 -26
- package/dist/es/Select/components/MenuPortal.js +27 -18
- package/dist/es/Select/components/Option.d.ts +2 -2
- package/dist/es/Select/components/Option.js +59 -18
- package/dist/es/Select/components/OptionTypes.js +5 -0
- package/dist/es/Select/components/index.js +41 -5
- package/dist/es/Select/elements.d.ts +10 -503
- package/dist/es/Select/elements.js +45 -16
- package/dist/es/Select/index.js +42 -4
- package/dist/es/Select/types.js +5 -0
- package/dist/es/Select/utils.js +82 -52
- package/dist/es/Select/variantProps.js +78 -37
- package/dist/es/Shuttle/Shuttle.js +70 -33
- package/dist/es/Shuttle/elements.d.ts +21 -751
- package/dist/es/Shuttle/elements.js +78 -36
- package/dist/es/Shuttle/index.js +17 -2
- package/dist/es/SimpleModal/SimpleModal.js +30 -11
- package/dist/es/SimpleModal/index.js +17 -2
- package/dist/es/Slider/Slider.js +60 -29
- package/dist/es/Slider/elements.d.ts +39 -388
- package/dist/es/Slider/elements.js +34 -10
- package/dist/es/Slider/index.js +17 -2
- package/dist/es/StatCard/StatCard.js +46 -26
- package/dist/es/StatCard/elements.d.ts +47 -1513
- package/dist/es/StatCard/elements.js +74 -24
- package/dist/es/StatCard/index.js +17 -2
- package/dist/es/Tabs/Tabs.js +36 -15
- package/dist/es/Tabs/elements.d.ts +34 -508
- package/dist/es/Tabs/elements.js +52 -17
- package/dist/es/Tabs/index.js +17 -2
- package/dist/es/Tagger/Tagger.d.ts +8 -126
- package/dist/es/Tagger/Tagger.js +77 -34
- package/dist/es/Tagger/TaggerElements.d.ts +22 -757
- package/dist/es/Tagger/TaggerElements.js +74 -33
- package/dist/es/Tagger/components/PopupSelector.js +124 -75
- package/dist/es/Tagger/components/PopupSelectorElements.d.ts +66 -2081
- package/dist/es/Tagger/components/PopupSelectorElements.js +108 -43
- package/dist/es/Tagger/components/constants.js +10 -2
- package/dist/es/Tagger/index.js +17 -2
- package/dist/es/Tagger/variantProps.js +116 -82
- package/dist/es/Text/Text.d.ts +4 -126
- package/dist/es/Text/Text.js +38 -10
- package/dist/es/Text/index.js +17 -2
- package/dist/es/ThemeProvider/ThemeProvider.d.ts +3403 -220
- package/dist/es/ThemeProvider/ThemeProvider.js +47 -24
- package/dist/es/ThemeProvider/accessibility.js +21 -11
- package/dist/es/ThemeProvider/icons.js +13 -4
- package/dist/es/ThemeProvider/index.js +80 -7
- package/dist/es/ThemeProvider/overridable.js +8 -1
- package/dist/es/ThemeProvider/theme.js +18 -6
- package/dist/es/ThemeProvider/types.d.ts +8 -29
- package/dist/es/ThemeProvider/types.js +5 -0
- package/dist/es/ThemeProvider/utils/themeUtils.js +8 -1
- package/dist/es/ThemeProvider/v4/Badge.js +18 -5
- package/dist/es/ThemeProvider/v4/Button.js +24 -9
- package/dist/es/ThemeProvider/v4/Card.js +19 -5
- package/dist/es/ThemeProvider/v4/Checkbox.js +18 -5
- package/dist/es/ThemeProvider/v4/CollapsibleToggle.js +18 -5
- package/dist/es/ThemeProvider/v4/Color.d.ts +1 -1
- package/dist/es/ThemeProvider/v4/Color.js +16 -4
- package/dist/es/ThemeProvider/v4/DataGrid.d.ts +2 -8
- package/dist/es/ThemeProvider/v4/DataGrid.js +18 -5
- package/dist/es/ThemeProvider/v4/DatePicker.js +29 -16
- package/dist/es/ThemeProvider/v4/DropdownButton.js +21 -7
- package/dist/es/ThemeProvider/v4/FormFieldAddon.js +18 -5
- package/dist/es/ThemeProvider/v4/FormLabel.d.ts +1 -5
- package/dist/es/ThemeProvider/v4/FormLabel.js +19 -5
- package/dist/es/ThemeProvider/v4/Icon.js +19 -5
- package/dist/es/ThemeProvider/v4/Input.d.ts +1 -1
- package/dist/es/ThemeProvider/v4/Input.js +17 -6
- package/dist/es/ThemeProvider/v4/Link.js +19 -5
- package/dist/es/ThemeProvider/v4/Menu.d.ts +1 -5
- package/dist/es/ThemeProvider/v4/Menu.js +21 -7
- package/dist/es/ThemeProvider/v4/Modal.d.ts +14 -42
- package/dist/es/ThemeProvider/v4/Modal.js +21 -7
- package/dist/es/ThemeProvider/v4/MultiSelect.d.ts +2 -24
- package/dist/es/ThemeProvider/v4/MultiSelect.js +18 -5
- package/dist/es/ThemeProvider/v4/Popover.js +15 -4
- package/dist/es/ThemeProvider/v4/Radio.d.ts +2 -30
- package/dist/es/ThemeProvider/v4/Radio.js +18 -5
- package/dist/es/ThemeProvider/v4/Section.d.ts +3 -39
- package/dist/es/ThemeProvider/v4/Section.js +18 -5
- package/dist/es/ThemeProvider/v4/Select.d.ts +1 -4
- package/dist/es/ThemeProvider/v4/Select.js +18 -5
- package/dist/es/ThemeProvider/v4/Shuttle.js +18 -5
- package/dist/es/ThemeProvider/v4/Tagger.d.ts +1 -12
- package/dist/es/ThemeProvider/v4/Tagger.js +18 -5
- package/dist/es/ThemeProvider/v4/Toast.js +18 -5
- package/dist/es/ThemeProvider/v4/Toggle.d.ts +4 -38
- package/dist/es/ThemeProvider/v4/Toggle.js +18 -5
- package/dist/es/ThemeProvider/v4/UserAvatar.js +18 -5
- package/dist/es/ThemeProvider/v4/View.js +19 -5
- package/dist/es/ThemeProvider/v4/index.d.ts +3403 -220
- package/dist/es/ThemeProvider/v4/index.js +69 -33
- package/dist/es/TimeControl/TimeControl.js +63 -26
- package/dist/es/TimeControl/elements.d.ts +186 -378
- package/dist/es/TimeControl/elements.js +41 -14
- package/dist/es/TimeControl/index.js +17 -2
- package/dist/es/TimeControl/utils.js +41 -18
- package/dist/es/TimeField/TimeField.d.ts +5 -1
- package/dist/es/TimeField/TimeField.js +40 -14
- package/dist/es/TimeField/index.js +17 -2
- package/dist/es/TimePicker/TimePicker.js +60 -30
- package/dist/es/TimePicker/components/Container.d.ts +5 -127
- package/dist/es/TimePicker/components/Container.js +20 -5
- package/dist/es/TimePicker/components/PeriodSelector.js +68 -38
- package/dist/es/TimePicker/components/Separator.d.ts +4 -126
- package/dist/es/TimePicker/components/Separator.js +17 -3
- package/dist/es/TimePicker/components/Spinner.d.ts +4 -126
- package/dist/es/TimePicker/components/Spinner.js +60 -26
- package/dist/es/TimePicker/components/index.js +58 -5
- package/dist/es/TimePicker/index.js +17 -2
- package/dist/es/TimePicker/utils.js +38 -14
- package/dist/es/Toast/Toast.js +71 -36
- package/dist/es/Toast/constants.js +9 -2
- package/dist/es/Toast/elements.d.ts +39 -1512
- package/dist/es/Toast/elements.js +118 -53
- package/dist/es/Toast/index.js +21 -3
- package/dist/es/Toggle/Toggle.d.ts +10 -252
- package/dist/es/Toggle/Toggle.js +87 -32
- package/dist/es/Toggle/index.js +17 -2
- package/dist/es/TooltipPopover/TooltipPopover.js +59 -22
- package/dist/es/TooltipPopover/index.js +17 -2
- package/dist/es/TooltipPopover/useWaitForDOMRef.js +25 -9
- package/dist/es/Tree/NodeContent.js +43 -23
- package/dist/es/Tree/NodeContextMenu.js +29 -11
- package/dist/es/Tree/Tree.js +66 -26
- package/dist/es/Tree/TreeNode.js +40 -16
- package/dist/es/Tree/elements.d.ts +40 -1268
- package/dist/es/Tree/elements.js +80 -31
- package/dist/es/Tree/index.js +38 -20
- package/dist/es/Tree/mockData.js +9 -2
- package/dist/es/UserAvatar/UserAvatar.d.ts +8 -254
- package/dist/es/UserAvatar/UserAvatar.js +62 -30
- package/dist/es/UserAvatar/index.js +17 -2
- package/dist/es/View/View.d.ts +4 -126
- package/dist/es/View/View.js +38 -10
- package/dist/es/View/index.js +17 -2
- package/dist/es/VisuallyHidden/VisuallyHidden.js +60 -19
- package/dist/es/VisuallyHidden/index.js +17 -2
- package/dist/es/VolumeChart/VolumeChart.d.ts +7 -6
- package/dist/es/VolumeChart/VolumeChart.js +55 -34
- package/dist/es/VolumeChart/index.js +17 -2
- package/dist/es/index.d.ts +3 -3
- package/dist/es/index.js +727 -86
- package/dist/es/mixins/border.js +15 -5
- package/dist/es/mixins/color.js +8 -1
- package/dist/es/mixins/index.js +33 -4
- package/dist/es/mixins/spacing.js +8 -1
- package/dist/es/utils/CloseWrapper.js +21 -7
- package/dist/es/utils/cloneElementWithCss.js +14 -6
- package/dist/es/utils/comparison.js +8 -1
- package/dist/es/utils/createChainedFunction.js +7 -1
- package/dist/es/utils/css.d.ts +2 -2
- package/dist/es/utils/css.js +33 -8
- package/dist/es/utils/enzyme.d.ts +0 -1
- package/dist/es/utils/enzyme.js +54 -31
- package/dist/es/utils/form.js +21 -2
- package/dist/es/utils/globalcss.d.ts +1 -1
- package/dist/es/utils/globalcss.js +12 -3
- package/dist/es/utils/hooks.js +33 -11
- package/dist/es/utils/isPropValid.js +14 -4
- package/dist/es/utils/resetcss.d.ts +1 -1
- package/dist/es/utils/resetcss.js +18 -7
- package/package.json +13 -12
- package/types/@emotion/styled.d.ts +0 -8
package/dist/es/mixins/border.js
CHANGED
|
@@ -1,15 +1,24 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
2
7
|
|
|
3
8
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
4
9
|
|
|
5
10
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
11
|
|
|
12
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
13
|
+
|
|
14
|
+
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
15
|
+
|
|
7
16
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
8
17
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
9
18
|
|
|
10
19
|
function getBorderStyle(propName, styles, defaultBorder) {
|
|
11
|
-
if (
|
|
12
|
-
var _defaultBorder = _objectSpread({}, defaultBorder,
|
|
20
|
+
if (_typeof(styles) === 'object' || styles === true) {
|
|
21
|
+
var _defaultBorder = _objectSpread(_objectSpread({}, defaultBorder), styles === true ? {} : styles),
|
|
13
22
|
width = _defaultBorder.width,
|
|
14
23
|
style = _defaultBorder.style,
|
|
15
24
|
borderColor = _defaultBorder.color;
|
|
@@ -41,8 +50,9 @@ function border(_ref4) {
|
|
|
41
50
|
style: 'solid',
|
|
42
51
|
color: color.LightDivider
|
|
43
52
|
};
|
|
44
|
-
return _objectSpread({}, getBorderStyle('border', border, defaultBorder),
|
|
53
|
+
return _objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread(_objectSpread({}, getBorderStyle('border', border, defaultBorder)), getBorderStyle('borderLeft', borderLeft, defaultBorder)), getBorderStyle('borderTop', borderTop, defaultBorder)), getBorderStyle('borderRight', borderRight, defaultBorder)), getBorderStyle('borderBottom', borderBottom, defaultBorder)), getBorderStyle('borderTopLeftRadius', borderTopLeftRadius || borderRadius, defaultBorder)), getBorderStyle('borderTopRightRadius', borderTopRightRadius || borderRadius, defaultBorder)), getBorderStyle('borderBottomLeftRadius', borderBottomLeftRadius || borderRadius, defaultBorder)), getBorderStyle('borderBottomRightRadius', borderBottomRightRadius || borderRadius, defaultBorder));
|
|
45
54
|
}
|
|
46
55
|
|
|
47
56
|
border.props = ['border', 'borderLeft', 'borderTop', 'borderRight', 'borderBottom'];
|
|
48
|
-
|
|
57
|
+
var _default = border;
|
|
58
|
+
exports["default"] = _default;
|
package/dist/es/mixins/color.js
CHANGED
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
1
7
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
8
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
9
|
|
|
@@ -38,4 +44,5 @@ function color(_ref) {
|
|
|
38
44
|
}
|
|
39
45
|
|
|
40
46
|
color.props = ['primary', 'secondary', 'disabled', 'error'];
|
|
41
|
-
|
|
47
|
+
var _default = color;
|
|
48
|
+
exports["default"] = _default;
|
package/dist/es/mixins/index.js
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "border", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _border["default"];
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "color", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function get() {
|
|
15
|
+
return _color["default"];
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "spacing", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function get() {
|
|
21
|
+
return _spacing["default"];
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
var _border = _interopRequireDefault(require("./border"));
|
|
26
|
+
|
|
27
|
+
var _spacing = _interopRequireDefault(require("./spacing"));
|
|
28
|
+
|
|
29
|
+
var _color = _interopRequireDefault(require("./color"));
|
|
30
|
+
|
|
31
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
32
|
+
|
|
1
33
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
|
-
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
|
-
export { default as border } from './border';
|
|
4
|
-
export { default as spacing } from './spacing';
|
|
5
|
-
export { default as color } from './color';
|
|
34
|
+
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = void 0;
|
|
1
7
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
8
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
9
|
|
|
@@ -21,4 +27,5 @@ function spacing(_ref) {
|
|
|
21
27
|
}
|
|
22
28
|
|
|
23
29
|
spacing.props = ['marginHorizontal', 'marginVertical', 'paddingHorizontal', 'paddingVertical'];
|
|
24
|
-
|
|
30
|
+
var _default = spacing;
|
|
31
|
+
exports["default"] = _default;
|
|
@@ -1,12 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = CloseWrapper;
|
|
7
|
+
|
|
8
|
+
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
|
|
10
|
+
var _useOnclickoutside = _interopRequireDefault(require("use-onclickoutside"));
|
|
11
|
+
|
|
12
|
+
var _react2 = require("@emotion/react");
|
|
13
|
+
|
|
14
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
15
|
+
|
|
2
16
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
3
17
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
return
|
|
18
|
+
|
|
19
|
+
function CloseWrapper(props) {
|
|
20
|
+
var ref = _react["default"].useRef(null);
|
|
21
|
+
|
|
22
|
+
(0, _useOnclickoutside["default"])(ref, !props.disabled ? props.onClose : function () {});
|
|
23
|
+
return (0, _react2.jsx)("div", {
|
|
10
24
|
"data-gs-c": gsC(props.children),
|
|
11
25
|
"data-gs": gs("src", "utils", "closewrapper.tsx", "close-wrapper", "div"),
|
|
12
26
|
ref: ref,
|
|
@@ -1,21 +1,29 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = _default;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
2
9
|
|
|
3
10
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
4
11
|
|
|
5
12
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
6
13
|
|
|
14
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
15
|
+
|
|
7
16
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
8
17
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
9
|
-
|
|
18
|
+
|
|
10
19
|
/**
|
|
11
20
|
* Necessary to use this instead of React.cloneElement when adding the `css` prop.
|
|
12
21
|
*
|
|
13
22
|
* https://github.com/emotion-js/emotion/issues/1102#issuecomment-446887725
|
|
14
23
|
*/
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
return jsx(element.type, _objectSpread({
|
|
24
|
+
function _default(element, props) {
|
|
25
|
+
return (0, _react.jsx)(element.type, _objectSpread(_objectSpread({
|
|
18
26
|
key: element.key,
|
|
19
27
|
ref: element.ref
|
|
20
|
-
}, element.props,
|
|
28
|
+
}, element.props), props));
|
|
21
29
|
}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.isOneOf = isOneOf;
|
|
1
7
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
8
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
|
-
|
|
9
|
+
|
|
10
|
+
function isOneOf(one, of) {
|
|
4
11
|
if (Array.isArray(of)) {
|
|
5
12
|
return of.includes(one);
|
|
6
13
|
}
|
|
@@ -1,3 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = createChainedFunction;
|
|
1
7
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
8
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
9
|
|
|
@@ -10,7 +16,7 @@ if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
|
10
16
|
* @param {function|null|undefined} functions to chain
|
|
11
17
|
* @returns {function|null}
|
|
12
18
|
*/
|
|
13
|
-
|
|
19
|
+
function createChainedFunction() {
|
|
14
20
|
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
15
21
|
funcs[_key] = arguments[_key];
|
|
16
22
|
}
|
package/dist/es/utils/css.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare type Value = string | number;
|
|
2
|
-
export declare function multiply(...values: Array<Value>):
|
|
3
|
-
export declare function add(...values: Array<Value>):
|
|
2
|
+
export declare function multiply(...values: Array<Value>): Value;
|
|
3
|
+
export declare function add(...values: Array<Value>): Value;
|
|
4
4
|
export declare function remToPx(rem: string | number): number;
|
|
5
5
|
export {};
|
|
6
6
|
//# sourceMappingURL=css.d.ts.map
|
package/dist/es/utils/css.js
CHANGED
|
@@ -1,7 +1,30 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.add = add;
|
|
7
|
+
exports.multiply = multiply;
|
|
8
|
+
exports.remToPx = remToPx;
|
|
9
|
+
|
|
10
|
+
var _parseUnit7 = _interopRequireDefault(require("parse-unit"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
13
|
+
|
|
14
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
15
|
+
|
|
16
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
17
|
+
|
|
18
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
19
|
+
|
|
20
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
21
|
+
|
|
22
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
23
|
+
|
|
24
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
25
|
+
|
|
2
26
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
3
27
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
4
|
-
import parseUnit from 'parse-unit';
|
|
5
28
|
var operations = {
|
|
6
29
|
multiply: function multiply(val1, val2) {
|
|
7
30
|
return val1 * val2;
|
|
@@ -13,12 +36,12 @@ var operations = {
|
|
|
13
36
|
|
|
14
37
|
function createOperation(operation) {
|
|
15
38
|
return function (value1, value2) {
|
|
16
|
-
var _parseUnit =
|
|
39
|
+
var _parseUnit = (0, _parseUnit7["default"])(value1),
|
|
17
40
|
_parseUnit2 = _slicedToArray(_parseUnit, 2),
|
|
18
41
|
val1 = _parseUnit2[0],
|
|
19
42
|
unit1 = _parseUnit2[1];
|
|
20
43
|
|
|
21
|
-
var _parseUnit3 =
|
|
44
|
+
var _parseUnit3 = (0, _parseUnit7["default"])(value2),
|
|
22
45
|
_parseUnit4 = _slicedToArray(_parseUnit3, 2),
|
|
23
46
|
val2 = _parseUnit4[0],
|
|
24
47
|
unit2 = _parseUnit4[1];
|
|
@@ -32,26 +55,28 @@ function createOperation(operation) {
|
|
|
32
55
|
};
|
|
33
56
|
}
|
|
34
57
|
|
|
35
|
-
|
|
58
|
+
function multiply() {
|
|
36
59
|
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
37
60
|
values[_key] = arguments[_key];
|
|
38
61
|
}
|
|
39
62
|
|
|
40
63
|
return values.reduce(createOperation(operations.multiply), 1);
|
|
41
64
|
}
|
|
42
|
-
|
|
65
|
+
|
|
66
|
+
function add() {
|
|
43
67
|
for (var _len2 = arguments.length, values = new Array(_len2), _key2 = 0; _key2 < _len2; _key2++) {
|
|
44
68
|
values[_key2] = arguments[_key2];
|
|
45
69
|
}
|
|
46
70
|
|
|
47
71
|
return values.reduce(createOperation(operations.add), 0);
|
|
48
72
|
}
|
|
49
|
-
|
|
73
|
+
|
|
74
|
+
function remToPx(rem) {
|
|
50
75
|
var BASE = 16;
|
|
51
76
|
var value = rem;
|
|
52
77
|
|
|
53
78
|
if (typeof value === 'string') {
|
|
54
|
-
var _parseUnit5 =
|
|
79
|
+
var _parseUnit5 = (0, _parseUnit7["default"])(rem),
|
|
55
80
|
_parseUnit6 = _slicedToArray(_parseUnit5, 2),
|
|
56
81
|
parsedValue = _parseUnit6[0],
|
|
57
82
|
unit = _parseUnit6[1];
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { RenderOptions, RenderResult } from '@testing-library/react';
|
|
3
|
-
export declare const shallowWithTheme: (tree: any) => any;
|
|
4
3
|
export declare const mountWithTheme: (tree: any) => any;
|
|
5
4
|
export declare const mountWithV5Theme: (tree: any) => any;
|
|
6
5
|
/**
|
package/dist/es/utils/enzyme.js
CHANGED
|
@@ -1,49 +1,69 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.mountWithV5Theme = exports.mountWithTheme = void 0;
|
|
7
|
+
exports.render = customRender;
|
|
8
|
+
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
|
|
13
|
+
var _enzyme = require("enzyme");
|
|
14
|
+
|
|
15
|
+
var _src = require("../../src");
|
|
16
|
+
|
|
17
|
+
var _react3 = require("@testing-library/react");
|
|
18
|
+
|
|
19
|
+
var _excluded = ["theme"];
|
|
20
|
+
|
|
21
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4
22
|
|
|
5
23
|
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
|
|
6
24
|
|
|
7
25
|
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
|
|
8
26
|
|
|
27
|
+
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
28
|
+
|
|
29
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
30
|
+
|
|
31
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
32
|
+
|
|
9
33
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
10
34
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
11
|
-
import React from 'react';
|
|
12
|
-
import { ThemeProvider as EmotionThemeProvider } from 'emotion-theming';
|
|
13
|
-
import { shallow, mount } from 'enzyme';
|
|
14
|
-
import { ThemeProvider } from '../../src';
|
|
15
|
-
import { render } from '@testing-library/react';
|
|
16
35
|
|
|
17
36
|
var ThemeProviderWrapper = function ThemeProviderWrapper(_ref) {
|
|
18
37
|
var children = _ref.children;
|
|
19
|
-
return
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
38
|
+
return (// types for v4 overrides are not correct
|
|
39
|
+
// @ts-ignore
|
|
40
|
+
(0, _react2.jsx)(_react2.ThemeProvider, {
|
|
41
|
+
"data-gs-c": gsC(children),
|
|
42
|
+
"data-gs": gs("src", "utils", "enzyme.tsx", "emotion-theme-provider"),
|
|
43
|
+
theme: _src.ThemeProvider.v4Theme
|
|
44
|
+
}, children)
|
|
45
|
+
);
|
|
24
46
|
};
|
|
25
47
|
|
|
26
48
|
var ThemeProviderWrapperV5 = function ThemeProviderWrapperV5(_ref2) {
|
|
27
49
|
var children = _ref2.children;
|
|
28
|
-
return
|
|
50
|
+
return (0, _react2.jsx)(_react2.ThemeProvider, {
|
|
29
51
|
"data-gs-c": gsC(children),
|
|
30
52
|
"data-gs": gs("src", "utils", "enzyme.tsx", "emotion-theme-provider"),
|
|
31
|
-
theme: ThemeProvider.v5Theme
|
|
53
|
+
theme: _src.ThemeProvider.v5Theme
|
|
32
54
|
}, children);
|
|
33
55
|
};
|
|
34
56
|
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
-
wrappingComponent: ThemeProviderWrapper
|
|
38
|
-
});
|
|
39
|
-
};
|
|
40
|
-
export var mountWithTheme = function mountWithTheme(tree) {
|
|
41
|
-
return mount(tree, {
|
|
57
|
+
var mountWithTheme = function mountWithTheme(tree) {
|
|
58
|
+
return (0, _enzyme.mount)(tree, {
|
|
42
59
|
wrappingComponent: ThemeProviderWrapper
|
|
43
60
|
});
|
|
44
61
|
};
|
|
45
|
-
|
|
46
|
-
|
|
62
|
+
|
|
63
|
+
exports.mountWithTheme = mountWithTheme;
|
|
64
|
+
|
|
65
|
+
var mountWithV5Theme = function mountWithV5Theme(tree) {
|
|
66
|
+
return (0, _enzyme.mount)(tree, {
|
|
47
67
|
wrappingComponent: ThemeProviderWrapperV5
|
|
48
68
|
});
|
|
49
69
|
};
|
|
@@ -56,24 +76,27 @@ export var mountWithV5Theme = function mountWithV5Theme(tree) {
|
|
|
56
76
|
* @return {RenderResult} testing library render result
|
|
57
77
|
*/
|
|
58
78
|
|
|
79
|
+
|
|
80
|
+
exports.mountWithV5Theme = mountWithV5Theme;
|
|
81
|
+
|
|
59
82
|
function customRender(ui, options) {
|
|
60
83
|
var _ref3 = options || {},
|
|
61
84
|
_ref3$theme = _ref3.theme,
|
|
62
85
|
theme = _ref3$theme === void 0 ? 'v4' : _ref3$theme,
|
|
63
|
-
rest = _objectWithoutProperties(_ref3,
|
|
86
|
+
rest = _objectWithoutProperties(_ref3, _excluded);
|
|
64
87
|
|
|
65
88
|
var Providers = function Providers(_ref4) {
|
|
66
89
|
var children = _ref4.children;
|
|
67
|
-
return
|
|
90
|
+
return (0, _react2.jsx)(_react2.ThemeProvider // types for v4 overrides are not correct
|
|
91
|
+
// @ts-ignore
|
|
92
|
+
, {
|
|
68
93
|
"data-gs-c": gsC(children),
|
|
69
94
|
"data-gs": gs("src", "utils", "enzyme.tsx", "custom-render", "emotion-theme-provider"),
|
|
70
|
-
theme: theme === 'v5' ? ThemeProvider.v5Theme : ThemeProvider.v4Theme
|
|
95
|
+
theme: theme === 'v5' ? _src.ThemeProvider.v5Theme : _src.ThemeProvider.v4Theme
|
|
71
96
|
}, children);
|
|
72
97
|
};
|
|
73
98
|
|
|
74
|
-
return render(ui, _objectSpread({
|
|
99
|
+
return (0, _react3.render)(ui, _objectSpread({
|
|
75
100
|
wrapper: Providers
|
|
76
101
|
}, rest));
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
export { customRender as render };
|
|
102
|
+
}
|
package/dist/es/utils/form.js
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getErrorList = getErrorList;
|
|
7
|
+
|
|
8
|
+
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
9
|
+
|
|
10
|
+
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
11
|
+
|
|
12
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
13
|
+
|
|
14
|
+
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); }
|
|
15
|
+
|
|
16
|
+
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
|
|
17
|
+
|
|
18
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
19
|
+
|
|
2
20
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
3
21
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
4
|
-
|
|
22
|
+
|
|
23
|
+
function getErrorList(error) {
|
|
5
24
|
if (error != null) {
|
|
6
25
|
if (typeof error === 'string') {
|
|
7
26
|
return [error];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Theme } from '../ThemeProvider';
|
|
2
|
-
import type { SerializedStyles } from '@emotion/
|
|
2
|
+
import type { SerializedStyles } from '@emotion/react';
|
|
3
3
|
export default function globalCSS(theme: Theme): SerializedStyles;
|
|
4
4
|
//# sourceMappingURL=globalcss.d.ts.map
|
|
@@ -1,6 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = globalCSS;
|
|
7
|
+
|
|
8
|
+
var _react = require("@emotion/react");
|
|
9
|
+
|
|
1
10
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
11
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
return /*#__PURE__*/css(":root{--reach-tabs:1;--reach-dialog:1;}html{font-family:", theme.fontFamily.body, ";font-weight:400;font-size:100%;line-height:1.25;}/* @TODO:Evaluate usefulness */
|
|
12
|
+
|
|
13
|
+
function globalCSS(theme) {
|
|
14
|
+
return /*#__PURE__*/(0, _react.css)(":root{--reach-tabs:1;--reach-dialog:1;}html{font-family:", theme.fontFamily.body, ";font-weight:400;font-size:100%;line-height:1.25;}/* @TODO: Evaluate usefulness */body{color:", theme.name === 'v4' ? theme.color.LightPrimary : theme.palette.neutral[11], ";text-rendering:optimizeLegibility;-webkit-font-smoothing:antialiased;}body,#app{width:100%;min-height:100%;}h1,h2,h3,h4,h5,h6,p{margin:0;padding:0;}pre{margin:0;}a{text-decoration:none;}[tabindex='-1']:focus{outline:none!important;}button:focus{outline:1px dotted;outline:5px auto -webkit-focus-ring-color;}input,button,select,textarea{margin:0;line-height:inherit;border-radius:0;}textarea{resize:vertical;}@keyframes stylekit-spin{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}" + (process.env.NODE_ENV === "production" ? "" : ";label:globalCSS;"), process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uL3NyYy91dGlscy9nbG9iYWxjc3MudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBS1kiLCJmaWxlIjoiLi4vLi4vLi4vc3JjL3V0aWxzL2dsb2JhbGNzcy50cyIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB0eXBlIHsgVGhlbWUgfSBmcm9tICcuLi9UaGVtZVByb3ZpZGVyJ1xuaW1wb3J0IHsgY3NzIH0gZnJvbSAnQGVtb3Rpb24vcmVhY3QnXG5pbXBvcnQgdHlwZSB7IFNlcmlhbGl6ZWRTdHlsZXMgfSBmcm9tICdAZW1vdGlvbi9yZWFjdCdcblxuZXhwb3J0IGRlZmF1bHQgZnVuY3Rpb24gZ2xvYmFsQ1NTKHRoZW1lOiBUaGVtZSk6IFNlcmlhbGl6ZWRTdHlsZXMge1xuICByZXR1cm4gY3NzYFxuICAgIC8qIHRvIHNraXAgaW5jbHVkaW5nIHN0eWxlcyBmb3IgcmVhY2ggY29tcG9uZW50cy4gRG9jdW1lbnRhdGlvbjogaHR0cHM6Ly9yZWFjaC50ZWNoL3N0eWxpbmcgKi9cbiAgICA6cm9vdCB7XG4gICAgICAtLXJlYWNoLXRhYnM6IDE7XG4gICAgICAtLXJlYWNoLWRpYWxvZzogMTtcbiAgICB9XG4gICAgaHRtbCB7XG4gICAgICBmb250LWZhbWlseTogJHt0aGVtZS5mb250RmFtaWx5LmJvZHl9O1xuICAgICAgZm9udC13ZWlnaHQ6IDQwMDtcbiAgICAgIGZvbnQtc2l6ZTogMTAwJTsgLyogMTZweCAqL1xuICAgICAgbGluZS1oZWlnaHQ6IDEuMjU7IC8qIDIwcHggKi9cbiAgICB9XG5cbiAgICAvKiBAVE9ETzogRXZhbHVhdGUgdXNlZnVsbmVzcyAqL1xuICAgIC8qIE9TIFggc3VicGl4ZWwgQUEgYmxlZWQgYnVnICovXG4gICAgYm9keSB7XG4gICAgICBjb2xvcjogJHt0aGVtZS5uYW1lID09PSAndjQnXG4gICAgICAgID8gdGhlbWUuY29sb3IuTGlnaHRQcmltYXJ5XG4gICAgICAgIDogdGhlbWUucGFsZXR0ZS5uZXV0cmFsWzExXX07XG4gICAgICB0ZXh0LXJlbmRlcmluZzogb3B0aW1pemVMZWdpYmlsaXR5O1xuICAgICAgLXdlYmtpdC1mb250LXNtb290aGluZzogYW50aWFsaWFzZWQ7XG4gICAgfVxuXG4gICAgLypcbiAgICogTWFrZSBib2R5IHRha2UgdXAgdGhlIGVudGlyZSBzY3JlZW5cbiAgICogUmVtb3ZlIGJvZHkgbWFyZ2luIHNvIGxheW91dCBjb250YWluZXJzIGRvbid0IGNhdXNlIGV4dHJhIG92ZXJmbG93LlxuICAgKi9cbiAgICBib2R5LFxuICAgICNhcHAge1xuICAgICAgd2lkdGg6IDEwMCU7XG4gICAgICBtaW4taGVpZ2h0OiAxMDAlO1xuICAgIH1cblxuICAgIGgxLFxuICAgIGgyLFxuICAgIGgzLFxuICAgIGg0LFxuICAgIGg1LFxuICAgIGg2LFxuICAgIHAge1xuICAgICAgbWFyZ2luOiAwO1xuICAgICAgcGFkZGluZzogMDtcbiAgICB9XG5cbiAgICBwcmUge1xuICAgICAgbWFyZ2luOiAwO1xuICAgIH1cblxuICAgIGEge1xuICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lO1xuICAgIH1cblxuICAgIC8qXG4gIC8vIFN1cHByZXNzIHRoZSBmb2N1cyBvdXRsaW5lIG9uIGVsZW1lbnRzIHRoYXQgY2Fubm90IGJlIGFjY2Vzc2VkIHZpYSBrZXlib2FyZC5cbiAgLy8gVGhpcyBwcmV2ZW50cyBhbiB1bndhbnRlZCBmb2N1cyBvdXRsaW5lIGZyb20gYXBwZWFyaW5nIGFyb3VuZCBlbGVtZW50cyB0aGF0XG4gIC8vIG1pZ2h0IHN0aWxsIHJlc3BvbmQgdG8gcG9pbnRlciBldmVudHMuXG4gIC8vXG4gIC8vIENyZWRpdDogaHR0cHM6Ly9naXRodWIuY29tL3N1aXRjc3MvYmFzZVxuICAqL1xuXG4gICAgW3RhYmluZGV4PSctMSddOmZvY3VzIHtcbiAgICAgIG91dGxpbmU6IG5vbmUgIWltcG9ydGFudDtcbiAgICB9XG5cbiAgICAvKlxuICAvLyBXb3JrIGFyb3VuZCBhIEZpcmVmb3gvSUUgYnVnIHdoZXJlIHRoZSB0cmFuc3BhcmVudCBidXR0b24gYmFja2dyb3VuZFxuICAvLyByZXN1bHRzIGluIGEgbG9zcyBvZiB0aGUgZGVmYXVsdCBidXR0b24gZm9jdXMgc3R5bGVzLlxuICAvL1xuICAvLyBDcmVkaXQ6IGh0dHBzOi8vZ2l0aHViLmNvbS9zdWl0Y3NzL2Jhc2UvXG4gICovXG5cbiAgICBidXR0b246Zm9jdXMge1xuICAgICAgb3V0bGluZTogMXB4IGRvdHRlZDtcbiAgICAgIG91dGxpbmU6IDVweCBhdXRvIC13ZWJraXQtZm9jdXMtcmluZy1jb2xvcjtcbiAgICB9XG5cbiAgICAvKiBSZW1vdmUgYWxsIG1hcmdpbnMgc28gb3VyIGNsYXNzZXMgZG9uJ3QgaGF2ZSB0byBkbyBpdCB0aGVtc2VsdmVzLiAqL1xuICAgIC8qKlxuICAgKiBOb3JtYWxpemUgaW5jbHVkZXMgZm9udDogaW5oZXJpdDssIHNvIGZvbnQtZmFtaWx5LiBmb250LXNpemUsIGV0YyBhcmVcbiAgICogcHJvcGVybHkgaW5oZXJpdGVkLiBIb3dldmVyLCBsaW5lLWhlaWdodCBpc24ndCBhZGRyZXNzZWQgdGhlcmUuIFVzaW5nIHRoaXNcbiAgICogZW5zdXJlcyB3ZSBkb24ndCBuZWVkIHRvIHVubmVjZXNzYXJpbHkgcmVkZWNsYXJlIHRoZSBnbG9iYWwgZm9udCBzdGFjay5cbiAgICovXG4gICAgLyogaU9TIGFkZHMgcm91bmRlZCBib3JkZXJzIGJ5IGRlZmF1bHQgKi9cblxuICAgIGlucHV0LFxuICAgIGJ1dHRvbixcbiAgICBzZWxlY3QsXG4gICAgdGV4dGFyZWEge1xuICAgICAgbWFyZ2luOiAwO1xuICAgICAgbGluZS1oZWlnaHQ6IGluaGVyaXQ7XG4gICAgICBib3JkZXItcmFkaXVzOiAwO1xuICAgIH1cblxuICAgIC8qIFRleHRhcmVhcyBzaG91bGQgcmVhbGx5IG9ubHkgcmVzaXplIHZlcnRpY2FsbHkgc28gdGhleSBkb24ndCBicmVhayB0aGVpciAoaG9yaXpvbnRhbCkgY29udGFpbmVycy4gKi9cblxuICAgIHRleHRhcmVhIHtcbiAgICAgIHJlc2l6ZTogdmVydGljYWw7XG4gICAgfVxuXG4gICAgLyogW0NPTi00MzExXSBLZXlmcmFtZSBzdHlsZSBuZXZlciBnZXRzIGNyZWF0ZWQgaW4gY29uc29sZSAobm9uLWxvY2FsIGVudikgdW5sZXNzIHdlIGltcG9ydCBpdCB0aGlzIHdheSBmb3IgcmVhc29ucyB1bmtub3duLiAqL1xuXG4gICAgQGtleWZyYW1lcyBzdHlsZWtpdC1zcGluIHtcbiAgICAgIDAlIHtcbiAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMGRlZyk7XG4gICAgICB9XG4gICAgICAxMDAlIHtcbiAgICAgICAgdHJhbnNmb3JtOiByb3RhdGUoMzYwZGVnKTtcbiAgICAgIH1cbiAgICB9XG4gIGBcbn1cbiJdfQ== */");
|
|
6
15
|
}
|
package/dist/es/utils/hooks.js
CHANGED
|
@@ -1,34 +1,56 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useDebouncedState = useDebouncedState;
|
|
7
|
+
exports.useDisposed = useDisposed;
|
|
8
|
+
|
|
9
|
+
var _react = require("react");
|
|
10
|
+
|
|
11
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
12
|
+
|
|
13
|
+
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
14
|
+
|
|
15
|
+
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
16
|
+
|
|
17
|
+
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
18
|
+
|
|
19
|
+
function _iterableToArrayLimit(arr, i) { if (typeof Symbol === "undefined" || !(Symbol.iterator in Object(arr))) return; var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
20
|
+
|
|
21
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
22
|
+
|
|
2
23
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
3
24
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
4
|
-
import { useRef, useCallback, useEffect, useState } from 'react'; // NOTE: these hooks are currently for INTERNAL USE only
|
|
5
25
|
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
26
|
+
// NOTE: these hooks are currently for INTERNAL USE only
|
|
27
|
+
function useDisposed() {
|
|
28
|
+
var disposed = (0, _react.useRef)(false);
|
|
29
|
+
(0, _react.useEffect)(function () {
|
|
9
30
|
return function () {
|
|
10
31
|
disposed.current = true;
|
|
11
32
|
};
|
|
12
33
|
}, []);
|
|
13
34
|
return disposed;
|
|
14
35
|
}
|
|
15
|
-
|
|
36
|
+
|
|
37
|
+
function useDebouncedState(initialValue) {
|
|
16
38
|
var wait = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 100;
|
|
17
39
|
var disposed = useDisposed();
|
|
18
40
|
|
|
19
|
-
var _useState = useState(initialValue),
|
|
41
|
+
var _useState = (0, _react.useState)(initialValue),
|
|
20
42
|
_useState2 = _slicedToArray(_useState, 2),
|
|
21
43
|
value = _useState2[0],
|
|
22
44
|
setValue = _useState2[1];
|
|
23
45
|
|
|
24
|
-
var pendingValue = useRef();
|
|
25
|
-
var timer = useRef();
|
|
26
|
-
useEffect(function () {
|
|
46
|
+
var pendingValue = (0, _react.useRef)();
|
|
47
|
+
var timer = (0, _react.useRef)();
|
|
48
|
+
(0, _react.useEffect)(function () {
|
|
27
49
|
return function () {
|
|
28
50
|
return window.clearTimeout(timer.current);
|
|
29
51
|
};
|
|
30
52
|
}, []);
|
|
31
|
-
var setDebouncedValue = useCallback(function (newValue) {
|
|
53
|
+
var setDebouncedValue = (0, _react.useCallback)(function (newValue) {
|
|
32
54
|
pendingValue.current = newValue;
|
|
33
55
|
|
|
34
56
|
if (timer.current === undefined) {
|
|
@@ -1,6 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports["default"] = _default;
|
|
7
|
+
|
|
8
|
+
var _isPropValid = _interopRequireDefault(require("@emotion/is-prop-valid"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
11
|
+
|
|
1
12
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
2
13
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
3
|
-
|
|
14
|
+
|
|
4
15
|
/**
|
|
5
16
|
* Used with emotion to exclude props that actually are valid, but we're using
|
|
6
17
|
* them for different purposes. Take this error for example:
|
|
@@ -11,12 +22,11 @@ import isPropValid from '@emotion/is-prop-valid';
|
|
|
11
22
|
*
|
|
12
23
|
* shouldForwardProp: prop => isPropValid(prop, {exclude: ['label']})
|
|
13
24
|
*/
|
|
14
|
-
|
|
15
|
-
export default function (prop) {
|
|
25
|
+
function _default(prop) {
|
|
16
26
|
var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {
|
|
17
27
|
exclude: []
|
|
18
28
|
},
|
|
19
29
|
exclude = _ref.exclude;
|
|
20
30
|
|
|
21
|
-
return
|
|
31
|
+
return (0, _isPropValid["default"])(prop) && !exclude.includes(prop);
|
|
22
32
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export default function resetCSS(): import("@emotion/
|
|
1
|
+
export default function resetCSS(): import("@emotion/react").SerializedStyles;
|
|
2
2
|
//# sourceMappingURL=resetcss.d.ts.map
|