@onepercentio/one-ui 0.19.2 → 0.19.4
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 +17 -0
- package/.prod.babelrc +22 -0
- package/dist/assets/styles/variables.scss +1 -0
- package/dist/components/AdaptiveButton/AdaptiveButton.js +24 -25
- package/dist/components/AdaptiveButton/index.js +12 -8
- package/dist/components/AdaptiveContainer/AdaptiveContainer.js +95 -114
- package/dist/components/AdaptiveContainer/index.js +12 -8
- package/dist/components/AdaptiveDialog/AdaptiveDialog.js +85 -65
- package/dist/components/AdaptiveDialog/index.js +12 -8
- package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js +84 -76
- package/dist/components/AdaptiveSidebar/index.js +12 -8
- package/dist/components/AnchoredTooltip/AnchoredTooltip.js +155 -160
- package/dist/components/AnchoredTooltip/index.js +12 -8
- package/dist/components/AnimatedEntrance/AnimatedEntrance.js +172 -139
- package/dist/components/AnimatedEntrance/index.js +26 -10
- package/dist/components/AsyncWrapper/AsyncWrapper.js +33 -21
- package/dist/components/AsyncWrapper/index.js +12 -8
- package/dist/components/Avatar/Avatar.js +34 -40
- package/dist/components/Avatar/index.js +12 -8
- package/dist/components/BucketFill/BucketFill.js +47 -58
- package/dist/components/BucketFill/index.js +12 -8
- package/dist/components/Button/Button.js +32 -49
- package/dist/components/Button/README.md +8 -0
- package/dist/components/Button/index.js +12 -8
- package/dist/components/Card/Card.js +16 -11
- package/dist/components/Card/index.js +12 -8
- package/dist/components/Chart/Chart.logic.js +10 -10
- package/dist/components/Chart/Chart.types.js +4 -2
- package/dist/components/Chart/Chart.view.js +212 -131
- package/dist/components/Chart/index.js +12 -8
- package/dist/components/CheckBox/CheckBox.d.ts +3 -1
- package/dist/components/CheckBox/CheckBox.js +43 -30
- package/dist/components/CheckBox/CheckBox.module.scss +6 -0
- package/dist/components/CheckBox/index.js +12 -8
- package/dist/components/Collapsable/Collapsable.d.ts +26 -27
- package/dist/components/Collapsable/Collapsable.js +173 -143
- package/dist/components/Collapsable/index.js +12 -8
- package/dist/components/Countdown/Countdown.js +87 -100
- package/dist/components/Countdown/index.js +12 -8
- package/dist/components/Divider/Divider.js +15 -12
- package/dist/components/Divider/index.js +12 -8
- package/dist/components/EmailInput/EmailInput.d.ts +4 -3
- package/dist/components/EmailInput/EmailInput.js +45 -43
- package/dist/components/EmailInput/README.md +10 -0
- package/dist/components/EmailInput/index.js +20 -9
- package/dist/components/FadeIn/FadeIn.js +62 -69
- package/dist/components/FadeIn/index.js +12 -8
- package/dist/components/FileInput/FileInput.d.ts +25 -9
- package/dist/components/FileInput/FileInput.js +41 -70
- package/dist/components/FileInput/FileInput.module.scss +0 -21
- package/dist/components/FileInput/View/BigFactory/BigFactory.d.ts +6 -0
- package/dist/components/FileInput/View/BigFactory/BigFactory.js +46 -0
- package/dist/components/FileInput/View/BigFactory/BigFactory.module.scss +20 -0
- package/dist/components/FileInput/View/BigFactory/index.d.ts +1 -0
- package/dist/components/FileInput/View/BigFactory/index.js +13 -0
- package/dist/components/FileInput/View/Compact/Compact.d.ts +5 -0
- package/dist/components/FileInput/View/Compact/Compact.js +88 -0
- package/dist/components/FileInput/View/Compact/Compact.module.scss +59 -0
- package/dist/components/FileInput/View/Compact/index.d.ts +1 -0
- package/dist/components/FileInput/View/Compact/index.js +13 -0
- package/dist/components/FileInput/View/View.types.d.ts +8 -0
- package/dist/components/FileInput/View/View.types.js +5 -0
- package/dist/components/FileInput/index.js +12 -8
- package/dist/components/FlowController/FlowController.js +60 -29
- package/dist/components/FlowController/README.md +13 -0
- package/dist/components/FlowController/index.js +12 -8
- package/dist/components/Form/Form.js +157 -96
- package/dist/components/Form/index.js +12 -8
- package/dist/components/Freeze/Freeze.js +11 -10
- package/dist/components/Freeze/index.js +12 -8
- package/dist/components/HSForms/HSForms.js +48 -68
- package/dist/components/HSForms/index.js +12 -8
- package/dist/components/Header/Header.js +100 -69
- package/dist/components/Header/index.js +12 -8
- package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js +17 -13
- package/dist/components/HeaderCloseBtn/index.js +12 -8
- package/dist/components/InfinityScroll/InfinityScroll.js +137 -117
- package/dist/components/InfinityScroll/index.js +12 -8
- package/dist/components/Input/Input.d.ts +8 -6
- package/dist/components/Input/Input.js +105 -90
- package/dist/components/Input/Input.module.scss +4 -2
- package/dist/components/Input/README.md +10 -0
- package/dist/components/Input/index.js +12 -8
- package/dist/components/InstantCounter/InstantCounter.js +61 -52
- package/dist/components/InstantCounter/index.js +12 -8
- package/dist/components/LavaLamp/LavaLamp.data.js +95 -87
- package/dist/components/LavaLamp/LavaLamp.js +107 -70
- package/dist/components/LavaLamp/index.js +12 -8
- package/dist/components/LavaLamp/v2/LavaLamp.js +200 -182
- package/dist/components/LinkToId/LinkToId.js +42 -28
- package/dist/components/LinkToId/index.js +20 -9
- package/dist/components/Loader/Loader.js +20 -26
- package/dist/components/Loader/index.js +12 -8
- package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js +34 -37
- package/dist/components/LoaderDotsIndicator/index.js +12 -8
- package/dist/components/LoopableVideo/LoopableVideo.js +29 -30
- package/dist/components/LoopableVideo/index.js +12 -8
- package/dist/components/MainGrid/MainGrid.js +44 -50
- package/dist/components/MainGrid/index.js +12 -8
- package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js +26 -26
- package/dist/components/MutableHamburgerButton/index.js +12 -8
- package/dist/components/Notification/Notification.js +16 -12
- package/dist/components/Notification/index.js +12 -8
- package/dist/components/OrderableList/OrderableList.js +406 -374
- package/dist/components/OrderableList/index.js +12 -8
- package/dist/components/PaginationIndicator/PaginationIndicator.js +230 -196
- package/dist/components/PaginationIndicator/index.js +12 -8
- package/dist/components/Parallax/Parallax.js +164 -161
- package/dist/components/Parallax/index.js +12 -8
- package/dist/components/Parallax/math/helpers.js +128 -217
- package/dist/components/PasswordInput/PasswordInput.d.ts +4 -3
- package/dist/components/PasswordInput/PasswordInput.js +120 -97
- package/dist/components/PasswordInput/index.js +12 -8
- package/dist/components/PingPongText/PingPongText.d.ts +6 -0
- package/dist/components/PingPongText/PingPongText.js +69 -0
- package/dist/components/PingPongText/PingPongText.module.scss +4 -0
- package/dist/components/PingPongText/index.d.ts +1 -0
- package/dist/components/PingPongText/index.js +13 -0
- package/dist/components/PixelatedScan/PixelatedScan.js +140 -97
- package/dist/components/PixelatedScan/index.js +12 -8
- package/dist/components/Portal/Portal.js +54 -64
- package/dist/components/Portal/index.js +20 -9
- package/dist/components/ProgressBar/ProgressBar.js +48 -45
- package/dist/components/ProgressBar/ProgressBar.module.scss +4 -0
- package/dist/components/ProgressBar/index.js +20 -9
- package/dist/components/ProgressTexts/ProgressTexts.js +42 -34
- package/dist/components/ProgressTexts/README.md +12 -0
- package/dist/components/ProgressTexts/index.js +12 -8
- package/dist/components/Radio/Radio.d.ts +13 -0
- package/dist/components/Radio/Radio.js +47 -0
- package/dist/components/Radio/Radio.module.scss +34 -0
- package/dist/components/Radio/index.d.ts +1 -0
- package/dist/components/Radio/index.js +13 -0
- package/dist/components/SectionContainer/SectionContainer.js +35 -39
- package/dist/components/SectionContainer/index.js +12 -8
- package/dist/components/Select/Select.d.ts +2 -1
- package/dist/components/Select/Select.js +133 -82
- package/dist/components/Select/Select.module.scss +14 -2
- package/dist/components/Select/index.js +12 -8
- package/dist/components/Skeleton/Skeleton.js +21 -15
- package/dist/components/Skeleton/index.js +12 -8
- package/dist/components/Spacing/Spacing.js +14 -11
- package/dist/components/Spacing/index.js +12 -8
- package/dist/components/StaticScroller/StaticScroller.js +61 -81
- package/dist/components/StaticScroller/index.js +12 -8
- package/dist/components/Switch/Switch.js +29 -25
- package/dist/components/Switch/index.js +12 -8
- package/dist/components/Table/Table.js +111 -80
- package/dist/components/Table/index.js +12 -8
- package/dist/components/Tabs/Tabs.js +42 -52
- package/dist/components/Tabs/index.js +12 -8
- package/dist/components/Text/Text.js +31 -50
- package/dist/components/Text/index.js +12 -8
- package/dist/components/Transition/MasksFactory/DiagonalReveal.js +46 -22
- package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js +71 -57
- package/dist/components/Transition/MasksFactory/PhysicsSquares.js +97 -80
- package/dist/components/Transition/MasksFactory/SquareToBalls.js +59 -50
- package/dist/components/Transition/MasksFactory/utils.js +25 -28
- package/dist/components/Transition/Transition.js +316 -309
- package/dist/components/Transition/index.js +20 -9
- package/dist/components/UncontrolledTransition/UncontrolledTransition.js +110 -86
- package/dist/components/UncontrolledTransition/index.js +12 -8
- package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js +116 -105
- package/dist/components/WalletConnectionWrapper/index.js +20 -9
- package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js +51 -69
- package/dist/components/utilitary/ScrollAndFocusLock/index.js +12 -8
- package/dist/context/AsyncProcess.js +77 -63
- package/dist/context/CustomBrowserRouter.js +40 -52
- package/dist/context/OneUIProvider.d.ts +8 -2
- package/dist/context/OneUIProvider.js +90 -104
- package/dist/hooks/logs/README.md +3 -0
- package/dist/hooks/logs/useDependencyChangeDetection.js +17 -17
- package/dist/hooks/logs/useIsMounting.js +10 -8
- package/dist/hooks/persistence/useLocalStorage.js +40 -30
- package/dist/hooks/shims/ObjectWatchShim.d.ts +1 -0
- package/dist/hooks/shims/ObjectWatchShim.js +49 -46
- package/dist/hooks/ui/useAdaptiveImage.js +43 -35
- package/dist/hooks/ui/useBreakpoint.js +34 -19
- package/dist/hooks/ui/useCustomScrollbar.js +26 -21
- package/dist/hooks/ui/useMouseHover.js +29 -16
- package/dist/hooks/ui/usePaginationControls.d.ts +0 -4
- package/dist/hooks/ui/usePaginationControls.e2e.d.ts +4 -0
- package/dist/hooks/ui/usePaginationControls.js +125 -153
- package/dist/hooks/ui/useTilt.js +156 -128
- package/dist/hooks/ui/useZoomable.js +114 -138
- package/dist/hooks/useAsyncControl.js +82 -47
- package/dist/hooks/useContainedRepositioning.js +75 -72
- package/dist/hooks/useCustomHistory.js +21 -13
- package/dist/hooks/useElementFit.js +42 -34
- package/dist/hooks/useFirestoreWatch.js +54 -35
- package/dist/hooks/useForm.js +47 -22
- package/dist/hooks/useFreeze.js +11 -9
- package/dist/hooks/useHero.d.ts +4 -0
- package/dist/hooks/useHero.js +171 -159
- package/dist/hooks/useIntersection.js +33 -27
- package/dist/hooks/useMergeRefs.js +26 -23
- package/dist/hooks/useObserve.js +28 -15
- package/dist/hooks/usePagination.js +151 -129
- package/dist/hooks/usePooledOperation.js +43 -58
- package/dist/hooks/usePooling.js +62 -48
- package/dist/hooks/useRebound.js +36 -22
- package/dist/hooks/useShortIntl.js +79 -51
- package/dist/hooks/utility/useEvents.js +28 -22
- package/dist/hooks/utility/useModule.js +21 -10
- package/dist/hooks/utility/useQuery.js +14 -8
- package/dist/models/DebugLogger.js +7 -6
- package/dist/models/GenericContract.js +39 -12
- package/dist/reac-app-env.d.js +1 -0
- package/dist/storybook/assets/video/txt-reversed.mp4 +0 -0
- package/dist/storybookUtils/index.js +42 -24
- package/dist/type-utils.js +4 -2
- package/dist/types.js +4 -2
- package/dist/utility.d.js +17 -0
- package/dist/utils/blockchain.js +60 -54
- package/dist/utils/flatten.js +23 -13
- package/dist/utils/html.utils.js +9 -6
- package/dist/utils/ownEvent.js +9 -8
- package/package.json +14 -9
- package/tsconfig.json +3 -2
- package/cypress/support/commands.ts +0 -49
- package/cypress/support/component-index.html +0 -30
- package/cypress/support/component.ts +0 -39
- package/cypress/support/e2e.js +0 -49
- package/dist/components/AdaptiveButton/AdaptiveButton.js.map +0 -1
- package/dist/components/AdaptiveButton/index.js.map +0 -1
- package/dist/components/AdaptiveContainer/AdaptiveContainer.js.map +0 -1
- package/dist/components/AdaptiveContainer/index.js.map +0 -1
- package/dist/components/AdaptiveDialog/AdaptiveDialog.js.map +0 -1
- package/dist/components/AdaptiveDialog/index.js.map +0 -1
- package/dist/components/AdaptiveSidebar/AdaptiveSidebar.js.map +0 -1
- package/dist/components/AdaptiveSidebar/index.js.map +0 -1
- package/dist/components/AnchoredTooltip/AnchoredTooltip.js.map +0 -1
- package/dist/components/AnchoredTooltip/index.js.map +0 -1
- package/dist/components/AnimatedEntrance/AnimatedEntrance.js.map +0 -1
- package/dist/components/AnimatedEntrance/index.js.map +0 -1
- package/dist/components/AsyncWrapper/AsyncWrapper.js.map +0 -1
- package/dist/components/AsyncWrapper/index.js.map +0 -1
- package/dist/components/Avatar/Avatar.js.map +0 -1
- package/dist/components/Avatar/index.js.map +0 -1
- package/dist/components/BucketFill/BucketFill.js.map +0 -1
- package/dist/components/BucketFill/index.js.map +0 -1
- package/dist/components/Button/Button.js.map +0 -1
- package/dist/components/Button/index.js.map +0 -1
- package/dist/components/Card/Card.js.map +0 -1
- package/dist/components/Card/index.js.map +0 -1
- package/dist/components/Chart/Chart.e2e.js +0 -9
- package/dist/components/Chart/Chart.e2e.js.map +0 -1
- package/dist/components/Chart/Chart.logic.js.map +0 -1
- package/dist/components/Chart/Chart.types.js.map +0 -1
- package/dist/components/Chart/Chart.view.js.map +0 -1
- package/dist/components/Chart/index.js.map +0 -1
- package/dist/components/CheckBox/CheckBox.js.map +0 -1
- package/dist/components/CheckBox/index.js.map +0 -1
- package/dist/components/Collapsable/Collapsable.js.map +0 -1
- package/dist/components/Collapsable/index.js.map +0 -1
- package/dist/components/Countdown/Countdown.js.map +0 -1
- package/dist/components/Countdown/index.js.map +0 -1
- package/dist/components/Divider/Divider.js.map +0 -1
- package/dist/components/Divider/index.js.map +0 -1
- package/dist/components/EmailInput/EmailInput.js.map +0 -1
- package/dist/components/EmailInput/index.js.map +0 -1
- package/dist/components/FadeIn/FadeIn.js.map +0 -1
- package/dist/components/FadeIn/index.js.map +0 -1
- package/dist/components/FileInput/FileInput.js.map +0 -1
- package/dist/components/FileInput/index.js.map +0 -1
- package/dist/components/FlowController/FlowController.js.map +0 -1
- package/dist/components/FlowController/index.js.map +0 -1
- package/dist/components/Form/Form.js.map +0 -1
- package/dist/components/Form/index.js.map +0 -1
- package/dist/components/Freeze/Freeze.js.map +0 -1
- package/dist/components/Freeze/index.js.map +0 -1
- package/dist/components/HSForms/HSForms.js.map +0 -1
- package/dist/components/HSForms/index.js.map +0 -1
- package/dist/components/Header/Header.js.map +0 -1
- package/dist/components/Header/index.js.map +0 -1
- package/dist/components/HeaderCloseBtn/HeaderCloseBtn.js.map +0 -1
- package/dist/components/HeaderCloseBtn/index.js.map +0 -1
- package/dist/components/InfinityScroll/InfinityScroll.js.map +0 -1
- package/dist/components/InfinityScroll/index.js.map +0 -1
- package/dist/components/Input/Input.js.map +0 -1
- package/dist/components/Input/index.js.map +0 -1
- package/dist/components/InstantCounter/InstantCounter.js.map +0 -1
- package/dist/components/InstantCounter/index.js.map +0 -1
- package/dist/components/LavaLamp/LavaLamp.data.js.map +0 -1
- package/dist/components/LavaLamp/LavaLamp.js.map +0 -1
- package/dist/components/LavaLamp/index.js.map +0 -1
- package/dist/components/LavaLamp/v2/LavaLamp.js.map +0 -1
- package/dist/components/LinkToId/LinkToId.js.map +0 -1
- package/dist/components/LinkToId/index.js.map +0 -1
- package/dist/components/Loader/Loader.js.map +0 -1
- package/dist/components/Loader/index.js.map +0 -1
- package/dist/components/LoaderDotsIndicator/LoaderDotsIndicator.js.map +0 -1
- package/dist/components/LoaderDotsIndicator/index.js.map +0 -1
- package/dist/components/LoopableVideo/LoopableVideo.js.map +0 -1
- package/dist/components/LoopableVideo/index.js.map +0 -1
- package/dist/components/MainGrid/MainGrid.js.map +0 -1
- package/dist/components/MainGrid/index.js.map +0 -1
- package/dist/components/MutableHamburgerButton/MutableHamburgerButton.js.map +0 -1
- package/dist/components/MutableHamburgerButton/index.js.map +0 -1
- package/dist/components/Notification/Notification.js.map +0 -1
- package/dist/components/Notification/index.js.map +0 -1
- package/dist/components/OrderableList/OrderableList.js.map +0 -1
- package/dist/components/OrderableList/index.js.map +0 -1
- package/dist/components/PaginationIndicator/PaginationIndicator.js.map +0 -1
- package/dist/components/PaginationIndicator/index.js.map +0 -1
- package/dist/components/Parallax/Parallax.js.map +0 -1
- package/dist/components/Parallax/index.js.map +0 -1
- package/dist/components/Parallax/math/helpers.js.map +0 -1
- package/dist/components/PasswordInput/PasswordInput.js.map +0 -1
- package/dist/components/PasswordInput/index.js.map +0 -1
- package/dist/components/PixelatedScan/PixelatedScan.js.map +0 -1
- package/dist/components/PixelatedScan/index.js.map +0 -1
- package/dist/components/Portal/Portal.js.map +0 -1
- package/dist/components/Portal/index.js.map +0 -1
- package/dist/components/ProgressBar/ProgressBar.js.map +0 -1
- package/dist/components/ProgressBar/index.js.map +0 -1
- package/dist/components/ProgressTexts/ProgressTexts.js.map +0 -1
- package/dist/components/ProgressTexts/index.js.map +0 -1
- package/dist/components/SectionContainer/SectionContainer.js.map +0 -1
- package/dist/components/SectionContainer/index.js.map +0 -1
- package/dist/components/Select/Select.js.map +0 -1
- package/dist/components/Select/index.js.map +0 -1
- package/dist/components/Skeleton/Skeleton.js.map +0 -1
- package/dist/components/Skeleton/index.js.map +0 -1
- package/dist/components/Spacing/Spacing.js.map +0 -1
- package/dist/components/Spacing/index.js.map +0 -1
- package/dist/components/StaticScroller/StaticScroller.js.map +0 -1
- package/dist/components/StaticScroller/index.js.map +0 -1
- package/dist/components/Switch/Switch.js.map +0 -1
- package/dist/components/Switch/index.js.map +0 -1
- package/dist/components/Table/Table.js.map +0 -1
- package/dist/components/Table/index.js.map +0 -1
- package/dist/components/Tabs/Tabs.js.map +0 -1
- package/dist/components/Tabs/index.js.map +0 -1
- package/dist/components/Text/Text.js.map +0 -1
- package/dist/components/Text/index.js.map +0 -1
- package/dist/components/Transition/MasksFactory/DiagonalReveal.js.map +0 -1
- package/dist/components/Transition/MasksFactory/DiagonalSquareToBalls.js.map +0 -1
- package/dist/components/Transition/MasksFactory/PhysicsSquares.js.map +0 -1
- package/dist/components/Transition/MasksFactory/SquareToBalls.js.map +0 -1
- package/dist/components/Transition/MasksFactory/utils.js.map +0 -1
- package/dist/components/Transition/Transition.js.map +0 -1
- package/dist/components/Transition/index.js.map +0 -1
- package/dist/components/UncontrolledTransition/UncontrolledTransition.js.map +0 -1
- package/dist/components/UncontrolledTransition/index.js.map +0 -1
- package/dist/components/WalletConnectionWrapper/WalletConnectionWrapper.js.map +0 -1
- package/dist/components/WalletConnectionWrapper/index.js.map +0 -1
- package/dist/components/utilitary/ScrollAndFocusLock/ScrollAndFocusLock.js.map +0 -1
- package/dist/components/utilitary/ScrollAndFocusLock/index.js.map +0 -1
- package/dist/context/AsyncProcess.js.map +0 -1
- package/dist/context/CustomBrowserRouter.js.map +0 -1
- package/dist/context/OneUIProvider.js.map +0 -1
- package/dist/hooks/logs/useDependencyChangeDetection.js.map +0 -1
- package/dist/hooks/logs/useIsMounting.js.map +0 -1
- package/dist/hooks/persistence/useLocalStorage.js.map +0 -1
- package/dist/hooks/shims/ObjectWatchShim.js.map +0 -1
- package/dist/hooks/ui/useAdaptiveImage.js.map +0 -1
- package/dist/hooks/ui/useBreakpoint.js.map +0 -1
- package/dist/hooks/ui/useCustomScrollbar.js.map +0 -1
- package/dist/hooks/ui/useMouseHover.js.map +0 -1
- package/dist/hooks/ui/usePaginationControls.js.map +0 -1
- package/dist/hooks/ui/useTilt.js.map +0 -1
- package/dist/hooks/ui/useZoomable.js.map +0 -1
- package/dist/hooks/useAsyncControl.js.map +0 -1
- package/dist/hooks/useContainedRepositioning.js.map +0 -1
- package/dist/hooks/useCustomHistory.js.map +0 -1
- package/dist/hooks/useElementFit.js.map +0 -1
- package/dist/hooks/useFirestoreWatch.js.map +0 -1
- package/dist/hooks/useForm.js.map +0 -1
- package/dist/hooks/useFreeze.js.map +0 -1
- package/dist/hooks/useHero.js.map +0 -1
- package/dist/hooks/useHero.module.scss +0 -5
- package/dist/hooks/useIntersection.js.map +0 -1
- package/dist/hooks/useMergeRefs.js.map +0 -1
- package/dist/hooks/useObserve.js.map +0 -1
- package/dist/hooks/usePagination.js.map +0 -1
- package/dist/hooks/usePooledOperation.js.map +0 -1
- package/dist/hooks/usePooling.js.map +0 -1
- package/dist/hooks/useRebound.js.map +0 -1
- package/dist/hooks/useShortIntl.js.map +0 -1
- package/dist/hooks/utility/useEvents.js.map +0 -1
- package/dist/hooks/utility/useModule.js.map +0 -1
- package/dist/hooks/utility/useQuery.js.map +0 -1
- package/dist/models/DebugLogger.js.map +0 -1
- package/dist/models/GenericContract.js.map +0 -1
- package/dist/storybookUtils/index.js.map +0 -1
- package/dist/type-utils.js.map +0 -1
- package/dist/types.js.map +0 -1
- package/dist/utils/blockchain.js.map +0 -1
- package/dist/utils/flatten.js.map +0 -1
- package/dist/utils/html.utils.js.map +0 -1
- package/dist/utils/ownEvent.js.map +0 -1
|
@@ -1,140 +1,221 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
17
6
|
});
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
};
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
Object.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
const AnchoredTooltip_1 = __importDefault(require("../AnchoredTooltip"));
|
|
7
|
+
exports.default = ChartView;
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _ChartModule = _interopRequireDefault(require("./Chart.module.scss"));
|
|
10
|
+
var _AnchoredTooltip = _interopRequireDefault(require("../AnchoredTooltip"));
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
13
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
15
|
+
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
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
|
+
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); }
|
|
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
|
+
function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i.return && (_r = _i.return(), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
|
|
20
|
+
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
33
21
|
const DEFAULT_STYLE = {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
22
|
+
lineColor: "#000",
|
|
23
|
+
pointColor: "#000",
|
|
24
|
+
textColor: "#fff"
|
|
37
25
|
};
|
|
38
|
-
function FloatingTooltip(
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
26
|
+
function FloatingTooltip(_ref) {
|
|
27
|
+
let children = _ref.children,
|
|
28
|
+
x = _ref.x,
|
|
29
|
+
y = _ref.y,
|
|
30
|
+
hoverOnly = _ref.hoverOnly,
|
|
31
|
+
height = _ref.height,
|
|
32
|
+
style = _ref.style;
|
|
33
|
+
const _useState = (0, _react.useState)(function () {
|
|
34
|
+
return hoverOnly ? false : true;
|
|
35
|
+
}),
|
|
36
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
37
|
+
ope = _useState2[0],
|
|
38
|
+
setOpen = _useState2[1];
|
|
39
|
+
const ref = (0, _react.useRef)(null);
|
|
40
|
+
const circleRef = (0, _react.useRef)(null);
|
|
41
|
+
(0, _react.useEffect)(function () {
|
|
42
|
+
const animateEl = circleRef.current.children.item(0);
|
|
43
|
+
let interval;
|
|
44
|
+
animateEl.addEventListener("beginEvent", function () {
|
|
45
|
+
interval = setInterval(function () {
|
|
46
|
+
return ref.current.updatePosition();
|
|
47
|
+
}, 1000 / 24);
|
|
48
|
+
});
|
|
49
|
+
animateEl.addEventListener("endEvent", function () {
|
|
50
|
+
clearInterval(interval);
|
|
51
|
+
ref.current.updatePosition();
|
|
52
|
+
});
|
|
53
|
+
}, []);
|
|
54
|
+
const actions = (0, _react.useMemo)(function () {
|
|
55
|
+
return hoverOnly ? {
|
|
56
|
+
onMouseEnter: function onMouseEnter() {
|
|
57
|
+
return setOpen(true);
|
|
58
|
+
},
|
|
59
|
+
onMouseOut: function onMouseOut() {
|
|
60
|
+
return setOpen(false);
|
|
61
|
+
}
|
|
62
|
+
} : {};
|
|
63
|
+
}, [hoverOnly]);
|
|
64
|
+
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("circle", _extends({
|
|
65
|
+
ref: circleRef,
|
|
66
|
+
r: height * 0.01,
|
|
67
|
+
cx: x,
|
|
68
|
+
cy: y,
|
|
69
|
+
style: {
|
|
70
|
+
"--point-color": style.pointColor
|
|
71
|
+
}
|
|
72
|
+
}, actions), /*#__PURE__*/_react.default.createElement("animate", {
|
|
73
|
+
attributeName: "cy",
|
|
74
|
+
values: "".concat(height, ";").concat(y),
|
|
75
|
+
dur: "1s"
|
|
76
|
+
})), /*#__PURE__*/_react.default.createElement(_AnchoredTooltip.default, {
|
|
77
|
+
ref: ref,
|
|
78
|
+
containInViewport: false,
|
|
79
|
+
anchorRef: circleRef,
|
|
80
|
+
open: ope,
|
|
81
|
+
className: _ChartModule.default.tooltipContainer,
|
|
82
|
+
style: {
|
|
83
|
+
"--line-color": style.lineColor,
|
|
84
|
+
"--text-color": style.textColor
|
|
85
|
+
}
|
|
86
|
+
}, children));
|
|
68
87
|
}
|
|
88
|
+
|
|
69
89
|
/**
|
|
70
90
|
* Draws a simple line chart with some animation
|
|
71
91
|
**/
|
|
72
|
-
function ChartView(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
92
|
+
function ChartView(_ref2) {
|
|
93
|
+
let _ref2$bounds = _slicedToArray(_ref2.bounds, 2),
|
|
94
|
+
_ref2$bounds$ = _slicedToArray(_ref2$bounds[0], 3),
|
|
95
|
+
startX = _ref2$bounds$[0],
|
|
96
|
+
endX = _ref2$bounds$[1],
|
|
97
|
+
stepsX = _ref2$bounds$[2],
|
|
98
|
+
_ref2$bounds$2 = _slicedToArray(_ref2$bounds[1], 3),
|
|
99
|
+
startY = _ref2$bounds$2[0],
|
|
100
|
+
endY = _ref2$bounds$2[1],
|
|
101
|
+
stepsY = _ref2$bounds$2[2],
|
|
102
|
+
_ref2$data = _ref2.data,
|
|
103
|
+
data = _ref2$data === void 0 ? [] : _ref2$data,
|
|
104
|
+
_ref2$points = _ref2.points,
|
|
105
|
+
points = _ref2$points === void 0 ? [] : _ref2$points,
|
|
106
|
+
label = _ref2.label,
|
|
107
|
+
_ref2$style = _ref2.style,
|
|
108
|
+
groupStyle = _ref2$style === void 0 ? [] : _ref2$style;
|
|
109
|
+
const _useState3 = (0, _react.useState)(),
|
|
110
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
111
|
+
dim = _useState4[0],
|
|
112
|
+
setDIm = _useState4[1];
|
|
113
|
+
const chartRef = (0, _react.useRef)(null);
|
|
114
|
+
(0, _react.useLayoutEffect)(function () {
|
|
115
|
+
setDIm({
|
|
116
|
+
width: chartRef.current.clientWidth,
|
|
117
|
+
height: chartRef.current.clientHeight
|
|
118
|
+
});
|
|
119
|
+
}, []);
|
|
120
|
+
const _ref3 = dim || {},
|
|
121
|
+
width = _ref3.width,
|
|
122
|
+
height = _ref3.height;
|
|
123
|
+
const howMuchStepsY = (0, _react.useMemo)(function () {
|
|
124
|
+
return (endY - startY) / stepsY + 1;
|
|
125
|
+
}, [endY, startY, stepsY]);
|
|
126
|
+
const yAxis = (0, _react.useMemo)(function () {
|
|
127
|
+
return new Array(howMuchStepsY).fill(undefined).map(function (_, i) {
|
|
128
|
+
return /*#__PURE__*/_react.default.createElement("span", null, label.y(endY - i * stepsY));
|
|
129
|
+
});
|
|
130
|
+
}, [startY, endY, stepsY, howMuchStepsY]);
|
|
131
|
+
const howMuchStepsX = (0, _react.useMemo)(function () {
|
|
132
|
+
return (endX - startX) / stepsX + 1;
|
|
133
|
+
}, [endX, startX, stepsX]);
|
|
134
|
+
const xAxis = (0, _react.useMemo)(function () {
|
|
135
|
+
return new Array(howMuchStepsX).fill(undefined).map(function (_, i) {
|
|
136
|
+
return /*#__PURE__*/_react.default.createElement("span", null, label.x(startX + i * stepsX));
|
|
137
|
+
});
|
|
138
|
+
}, [startX, endX, stepsX]);
|
|
139
|
+
const _useMemo = (0, _react.useMemo)(function () {
|
|
140
|
+
const calculate = function calculate(end, start) {
|
|
141
|
+
let overrideScale = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 100;
|
|
142
|
+
return function (point) {
|
|
143
|
+
const max = end - start;
|
|
144
|
+
const current = point - start;
|
|
145
|
+
return current * overrideScale / max;
|
|
121
146
|
};
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
147
|
+
};
|
|
148
|
+
const calculateX = calculate(endX, startX, width);
|
|
149
|
+
const calculateY = calculate(endY, startY, height);
|
|
150
|
+
return {
|
|
151
|
+
tooltips: points.map(function (pointsCategory, i) {
|
|
152
|
+
const style = groupStyle[i] || DEFAULT_STYLE;
|
|
153
|
+
return pointsCategory.map(function (_ref4) {
|
|
154
|
+
let _ref5 = _slicedToArray(_ref4, 4),
|
|
155
|
+
x = _ref5[0],
|
|
156
|
+
y = _ref5[1],
|
|
157
|
+
label = _ref5[2],
|
|
158
|
+
_ref5$ = _ref5[3],
|
|
159
|
+
onlyOnHover = _ref5$ === void 0 ? false : _ref5$;
|
|
160
|
+
return /*#__PURE__*/_react.default.createElement(FloatingTooltip, {
|
|
161
|
+
x: calculateX(x),
|
|
162
|
+
y: height - calculateY(y),
|
|
163
|
+
height: height,
|
|
164
|
+
style: style,
|
|
165
|
+
hoverOnly: onlyOnHover
|
|
166
|
+
}, label);
|
|
167
|
+
});
|
|
168
|
+
}),
|
|
169
|
+
polylines: data.map(function (lineData, i) {
|
|
170
|
+
const style = groupStyle[i] || DEFAULT_STYLE;
|
|
171
|
+
const calculateLines = function calculateLines(yOverride) {
|
|
172
|
+
return lineData.map(function (_ref6) {
|
|
173
|
+
let _ref7 = _slicedToArray(_ref6, 2),
|
|
174
|
+
x = _ref7[0],
|
|
175
|
+
y = _ref7[1];
|
|
176
|
+
return "".concat(calculateX(x), ",").concat(yOverride === undefined ? height - calculateY(y) : yOverride);
|
|
177
|
+
}).join(" ");
|
|
178
|
+
};
|
|
179
|
+
return /*#__PURE__*/_react.default.createElement("polyline", {
|
|
180
|
+
strokeLinejoin: "round",
|
|
181
|
+
strokeLinecap: "round",
|
|
182
|
+
points: calculateLines(),
|
|
183
|
+
fill: "none",
|
|
184
|
+
strokeWidth: 5,
|
|
185
|
+
style: {
|
|
186
|
+
"--line-color": style.lineColor
|
|
187
|
+
}
|
|
188
|
+
}, /*#__PURE__*/_react.default.createElement("animate", {
|
|
189
|
+
attributeName: "points",
|
|
190
|
+
attributeType: "XML",
|
|
191
|
+
values: [calculateLines(height), calculateLines()].join("; "),
|
|
192
|
+
dur: "1s"
|
|
193
|
+
}));
|
|
194
|
+
})
|
|
195
|
+
};
|
|
196
|
+
}, [data, width, height]),
|
|
197
|
+
polylines = _useMemo.polylines,
|
|
198
|
+
tooltips = _useMemo.tooltips;
|
|
199
|
+
const paddingY = (0, _react.useMemo)(function () {
|
|
200
|
+
const stepSizeY = height / (howMuchStepsY - 1);
|
|
201
|
+
return stepSizeY / 2;
|
|
202
|
+
}, [howMuchStepsY, height]);
|
|
203
|
+
const paddingX = (0, _react.useMemo)(function () {
|
|
204
|
+
const stepSizeX = width / (howMuchStepsX - 1);
|
|
205
|
+
return stepSizeX / 2;
|
|
206
|
+
}, [howMuchStepsX, width]);
|
|
207
|
+
return /*#__PURE__*/_react.default.createElement("div", {
|
|
208
|
+
className: _ChartModule.default.chartRoot
|
|
209
|
+
}, /*#__PURE__*/_react.default.createElement("div", {
|
|
210
|
+
className: _ChartModule.default.yAxis
|
|
211
|
+
}, yAxis), /*#__PURE__*/_react.default.createElement("div", {
|
|
212
|
+
ref: chartRef,
|
|
213
|
+
className: _ChartModule.default.chartContainer
|
|
214
|
+
}, width && /*#__PURE__*/_react.default.createElement("svg", {
|
|
215
|
+
className: _ChartModule.default.chart,
|
|
216
|
+
viewBox: "".concat(-paddingX, " ").concat(-paddingY, " ").concat(width + paddingX * 2, " ").concat(height + paddingY * 2),
|
|
217
|
+
preserveAspectRatio: "none"
|
|
218
|
+
}, polylines, tooltips)), "\xA0", /*#__PURE__*/_react.default.createElement("div", {
|
|
219
|
+
className: _ChartModule.default.xAxis
|
|
220
|
+
}, xAxis));
|
|
221
|
+
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _Chart.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _Chart = _interopRequireDefault(require("./Chart.logic"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -2,10 +2,12 @@ import React, { PropsWithChildren } from "react";
|
|
|
2
2
|
/**
|
|
3
3
|
* A simple checkbox with nissan guidelines
|
|
4
4
|
**/
|
|
5
|
-
export default function CheckBox({ checked, onToggle, label, className, size, ...props }: PropsWithChildren<{
|
|
5
|
+
export default function CheckBox({ checked, onToggle, label, className, size, groupId, value, ...props }: PropsWithChildren<{
|
|
6
6
|
checked: boolean;
|
|
7
7
|
onToggle: (checked: boolean) => void;
|
|
8
8
|
label: React.ReactNode;
|
|
9
9
|
className?: string;
|
|
10
10
|
size?: number;
|
|
11
|
+
groupId: string;
|
|
12
|
+
value: string;
|
|
11
13
|
}> & React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>): JSX.Element;
|
|
@@ -1,34 +1,47 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
};
|
|
13
|
-
var
|
|
14
|
-
|
|
15
|
-
};
|
|
16
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
const react_1 = __importDefault(require("react"));
|
|
18
|
-
const OneUIProvider_1 = require("../../context/OneUIProvider");
|
|
19
|
-
const CheckBox_module_scss_1 = __importDefault(require("./CheckBox.module.scss"));
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = CheckBox;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _OneUIProvider = require("../../context/OneUIProvider");
|
|
9
|
+
var _CheckBoxModule = _interopRequireDefault(require("./CheckBox.module.scss"));
|
|
10
|
+
const _excluded = ["checked", "onToggle", "label", "className", "size", "groupId", "value"];
|
|
11
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
13
|
+
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; }
|
|
14
|
+
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; }
|
|
20
15
|
/**
|
|
21
16
|
* A simple checkbox with nissan guidelines
|
|
22
17
|
**/
|
|
23
|
-
function CheckBox(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
18
|
+
function CheckBox(_ref) {
|
|
19
|
+
let checked = _ref.checked,
|
|
20
|
+
onToggle = _ref.onToggle,
|
|
21
|
+
label = _ref.label,
|
|
22
|
+
_ref$className = _ref.className,
|
|
23
|
+
className = _ref$className === void 0 ? "" : _ref$className,
|
|
24
|
+
_ref$size = _ref.size,
|
|
25
|
+
size = _ref$size === void 0 ? undefined : _ref$size,
|
|
26
|
+
groupId = _ref.groupId,
|
|
27
|
+
value = _ref.value,
|
|
28
|
+
props = _objectWithoutProperties(_ref, _excluded);
|
|
29
|
+
const Checkbox = (0, _OneUIProvider.useOneUIConfig)("component.checkbox.Component", "span");
|
|
30
|
+
return /*#__PURE__*/_react.default.createElement("label", {
|
|
31
|
+
className: "".concat(_CheckBoxModule.default.container, " ").concat(className),
|
|
32
|
+
style: {
|
|
33
|
+
fontSize: size
|
|
34
|
+
},
|
|
35
|
+
onClick: function onClick(e) {
|
|
36
|
+
onToggle(!checked);
|
|
37
|
+
e.preventDefault();
|
|
38
|
+
}
|
|
39
|
+
}, /*#__PURE__*/_react.default.createElement(Checkbox, _extends({}, props, {
|
|
40
|
+
className: "".concat(checked ? _CheckBoxModule.default.checked : "", " ").concat(label ? _CheckBoxModule.default.wContent : "")
|
|
41
|
+
})), /*#__PURE__*/_react.default.createElement("input", {
|
|
42
|
+
type: "checkbox",
|
|
43
|
+
name: groupId,
|
|
44
|
+
id: value,
|
|
45
|
+
checked: checked
|
|
46
|
+
}), label);
|
|
47
|
+
}
|
|
@@ -4,6 +4,10 @@
|
|
|
4
4
|
display: flex;
|
|
5
5
|
line-height: 1.5em;
|
|
6
6
|
vertical-align: middle;
|
|
7
|
+
input {
|
|
8
|
+
max-width: 0px;
|
|
9
|
+
max-height: 0px;
|
|
10
|
+
}
|
|
7
11
|
|
|
8
12
|
> span:first-child {
|
|
9
13
|
visibility: visible;
|
|
@@ -15,6 +19,8 @@
|
|
|
15
19
|
transition: background-color 250ms, border 250ms, box-shadow 250ms;
|
|
16
20
|
border: 1px solid rgb(40, 43, 53);
|
|
17
21
|
box-shadow: 0px 0px 0px -4px $digitalBlue;
|
|
22
|
+
flex-shrink: 0;
|
|
23
|
+
|
|
18
24
|
&.wContent {
|
|
19
25
|
margin-right: 0.45em;
|
|
20
26
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
exports
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "default", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function get() {
|
|
9
|
+
return _CheckBox.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
var _CheckBox = _interopRequireDefault(require("./CheckBox"));
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,46 +1,45 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from "react";
|
|
2
2
|
import { AnchoredTooltipAlignment } from "../AnchoredTooltip/AnchoredTooltip";
|
|
3
|
+
declare class _CollapsableInterface {
|
|
4
|
+
_id: string;
|
|
5
|
+
constructor(id: string);
|
|
6
|
+
_getElements(): {
|
|
7
|
+
header: HTMLElement | null;
|
|
8
|
+
content: HTMLElement | null;
|
|
9
|
+
};
|
|
10
|
+
open(onOpened: () => void): void;
|
|
11
|
+
getElement(type: "header" | "content"): HTMLDivElement | null;
|
|
12
|
+
}
|
|
3
13
|
/**
|
|
4
|
-
*
|
|
5
|
-
|
|
6
|
-
export
|
|
14
|
+
* A helper function for interacting with collapsables without a reference
|
|
15
|
+
*/
|
|
16
|
+
export declare function CollapsableInterface(id: string): _CollapsableInterface;
|
|
17
|
+
declare const _default: React.ForwardRefExoticComponent<(React.PropsWithChildren<{
|
|
7
18
|
title: React.ReactNode;
|
|
8
|
-
className?: string;
|
|
9
|
-
contentClassName?: string;
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
contentClassName?: string | undefined;
|
|
10
21
|
onToggleOpen: (isOpen: boolean) => void;
|
|
11
22
|
open: boolean;
|
|
12
23
|
id?: string | undefined;
|
|
13
|
-
"data-testid"?: string;
|
|
14
|
-
onContentClick?:
|
|
24
|
+
"data-testid"?: string | undefined;
|
|
25
|
+
onContentClick?: React.MouseEventHandler<HTMLInputElement> | undefined;
|
|
15
26
|
/**
|
|
16
27
|
* This flag indicates if the collapsable content should be kept in HTML while it's collapsed
|
|
17
28
|
*
|
|
18
29
|
* Usefull for responsive layouts where the collapsable should not "behave" as a collapsable content
|
|
19
30
|
*/
|
|
20
|
-
keepUnderlayingElement?: boolean;
|
|
31
|
+
keepUnderlayingElement?: boolean | undefined;
|
|
21
32
|
/**
|
|
22
33
|
* To detect when the user clicks out of the container
|
|
23
34
|
*/
|
|
24
|
-
onClickOut?: () => void;
|
|
35
|
+
onClickOut?: (() => void) | undefined;
|
|
25
36
|
} & ({
|
|
26
37
|
/** This will define if the content will be floating under the title or will expand all the container as one */
|
|
27
|
-
mode?: "block";
|
|
38
|
+
mode?: "block" | undefined;
|
|
28
39
|
} | {
|
|
29
40
|
mode: "float";
|
|
30
41
|
alignTo: AnchoredTooltipAlignment;
|
|
31
|
-
})> & Omit<HTMLAttributes<HTMLDivElement>, "title">)
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
_getElements(): {
|
|
36
|
-
header: HTMLElement | null;
|
|
37
|
-
content: HTMLElement | null;
|
|
38
|
-
};
|
|
39
|
-
open(onOpened: () => void): void;
|
|
40
|
-
getElement(type: "header" | "content"): HTMLDivElement | null;
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* A helper function for interacting with collapsables without a reference
|
|
44
|
-
*/
|
|
45
|
-
export declare function CollapsableInterface(id: string): _CollapsableInterface;
|
|
46
|
-
export {};
|
|
42
|
+
})> & Omit<React.HTMLAttributes<HTMLDivElement>, "title">) & React.RefAttributes<{
|
|
43
|
+
redimension: () => void;
|
|
44
|
+
}>>;
|
|
45
|
+
export default _default;
|