@koine/react 2.0.0-beta.14 → 2.0.0-beta.16
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/Alert/Alert.js +10 -0
- package/Alert/index.d.ts +1 -1
- package/Alert/index.js +1 -0
- package/Animations/Reveal.d.ts +1 -2
- package/Animations/Reveal.js +16 -0
- package/Animations/Underline.js +5 -0
- package/Animations/index.d.ts +3 -3
- package/Animations/index.js +3 -0
- package/Animations/useReveal.d.ts +0 -21
- package/Animations/useReveal.js +42 -0
- package/Autocomplete/AutocompleteDownshift.js +1 -0
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +1 -0
- package/Autocomplete/AutocompleteMui.d.ts +2 -27
- package/Autocomplete/AutocompleteMui.js +93 -0
- package/Autocomplete/AutocompleteReach.js +1 -0
- package/Autocomplete/components.d.ts +0 -5
- package/Autocomplete/components.js +26 -0
- package/Autocomplete/helpers.d.ts +1 -1
- package/Autocomplete/helpers.js +16 -0
- package/Autocomplete/index.d.ts +2 -2
- package/Autocomplete/index.js +1 -0
- package/Bg/BgColor.d.ts +1 -20
- package/Bg/BgColor.js +16 -0
- package/Bg/BgPhoto.d.ts +1 -6
- package/Bg/BgPhoto.js +16 -0
- package/Bg/BgSvg.d.ts +0 -3
- package/Bg/BgSvg.js +9 -0
- package/Bg/index.d.ts +3 -3
- package/Bg/index.js +3 -0
- package/Breadcrumbs/Breadcrumbs.d.ts +1 -1
- package/Breadcrumbs/Breadcrumbs.js +27 -0
- package/Breadcrumbs/index.d.ts +1 -1
- package/Breadcrumbs/index.js +1 -0
- package/Buttons/Button.d.ts +0 -4
- package/Buttons/Button.js +10 -0
- package/Buttons/ButtonComposite.d.ts +3 -4
- package/Buttons/ButtonComposite.js +28 -0
- package/Buttons/ButtonFab.d.ts +1 -2
- package/Buttons/ButtonFab.js +6 -0
- package/Buttons/ButtonLink.d.ts +3 -3
- package/Buttons/ButtonLink.js +11 -0
- package/Buttons/IconButton.d.ts +1 -2
- package/Buttons/IconButton.js +7 -0
- package/Buttons/index.d.ts +5 -5
- package/Buttons/index.js +5 -0
- package/Calendar/CalendarDaygridCell.d.ts +3 -4
- package/Calendar/CalendarDaygridCell.js +46 -0
- package/Calendar/CalendarDaygridNav.d.ts +2 -2
- package/Calendar/CalendarDaygridNav.js +23 -0
- package/Calendar/CalendarDaygridTable.d.ts +3 -3
- package/Calendar/CalendarDaygridTable.js +45 -0
- package/Calendar/CalendarLegend.d.ts +2 -3
- package/Calendar/CalendarLegend.js +8 -0
- package/Calendar/calendar-api-google.d.ts +1 -9
- package/Calendar/calendar-api-google.js +124 -0
- package/Calendar/index.d.ts +6 -6
- package/Calendar/index.js +6 -0
- package/Calendar/types.d.ts +0 -19
- package/Calendar/types.js +1 -0
- package/Calendar/useCalendar.d.ts +4 -19
- package/Calendar/useCalendar.js +176 -0
- package/Calendar/utils.d.ts +1 -1
- package/Calendar/utils.js +185 -0
- package/Carousel/Carousel.js +1 -0
- package/Carousel/CarouselCss.d.ts +1 -23
- package/Carousel/CarouselCss.js +19 -0
- package/Carousel/index.d.ts +1 -1
- package/Carousel/index.js +1 -0
- package/Collapsable/Collapsable.js +1 -0
- package/Collapsable/CollapsableReach.d.ts +0 -6
- package/Collapsable/CollapsableReach.js +1 -0
- package/Collapsable/index.d.ts +1 -1
- package/Collapsable/index.js +1 -0
- package/Debug/Debug.js +9 -0
- package/Debug/index.d.ts +1 -1
- package/Debug/index.js +1 -0
- package/Details/Details.d.ts +60 -66
- package/Details/Details.js +52 -0
- package/Details/index.d.ts +1 -1
- package/Details/index.js +1 -0
- package/Dialog/DialogMui.d.ts +9 -11
- package/Dialog/DialogMui.js +39 -0
- package/Dialog/css/bare.d.ts +9 -10
- package/Dialog/css/bare.js +21 -0
- package/Dialog/index.d.ts +2 -2
- package/Dialog/index.js +1 -0
- package/Dialog/m/bare.js +3 -0
- package/Dialog/m/basic.d.ts +1 -1
- package/Dialog/m/basic.js +28 -0
- package/Dialog/m/index.d.ts +1 -2
- package/Dialog/m/index.js +4 -0
- package/Dialog/sc/bare.d.ts +4 -14
- package/Dialog/sc/bare.js +31 -0
- package/Dialog/sc/framer.d.ts +1 -2
- package/Dialog/sc/framer.js +16 -0
- package/Dialog/sc/framerMaterial.js +16 -0
- package/Dialog/sc/material.d.ts +3 -4
- package/Dialog/sc/material.js +21 -0
- package/Dialog/tw/bare.d.ts +7 -22
- package/Dialog/tw/bare.js +29 -0
- package/Dialog/tw/elegant.d.ts +6 -7
- package/Dialog/tw/elegant.js +21 -0
- package/Dialog/tw/framer.d.ts +3 -4
- package/Dialog/tw/framer.js +16 -0
- package/Dialog/tw/framerMaterial.d.ts +2 -2
- package/Dialog/tw/framerMaterial.js +16 -0
- package/Dialog/tw/material.d.ts +6 -7
- package/Dialog/tw/material.js +21 -0
- package/Editor/Editor--tiptap.js +26 -0
- package/Editor/components.js +10 -0
- package/Editor/index.d.ts +1 -1
- package/Editor/index.js +1 -0
- package/FaviconTags.d.ts +0 -10
- package/FaviconTags.js +6 -0
- package/Form/Form.d.ts +1 -14
- package/Form/Form.js +60 -0
- package/Form/index.d.ts +1 -1
- package/Form/index.js +1 -0
- package/Form/sc/bare.d.ts +1 -2
- package/Form/sc/bare.js +20 -0
- package/Forms/Checkbox/Checkbox.d.ts +1 -5
- package/Forms/Checkbox/Checkbox.js +15 -0
- package/Forms/Checkbox/index.d.ts +1 -1
- package/Forms/Checkbox/index.js +1 -0
- package/Forms/Feedback/Feedback.js +9 -0
- package/Forms/Feedback/index.d.ts +1 -1
- package/Forms/Feedback/index.js +1 -0
- package/Forms/Field/Field.d.ts +1 -19
- package/Forms/Field/Field.js +25 -0
- package/Forms/Field/FieldControl.d.ts +2 -14
- package/Forms/Field/FieldControl.js +35 -0
- package/Forms/Field/FieldHint.js +4 -0
- package/Forms/Field/index.d.ts +2 -2
- package/Forms/Field/index.js +2 -0
- package/Forms/Input/Input.d.ts +1 -2
- package/Forms/Input/Input.js +16 -0
- package/Forms/Input/index.d.ts +1 -1
- package/Forms/Input/index.js +1 -0
- package/Forms/InputGroup/InputGroup.d.ts +1 -2
- package/Forms/InputGroup/InputGroup.js +15 -0
- package/Forms/InputGroup/index.d.ts +1 -1
- package/Forms/InputGroup/index.js +1 -0
- package/Forms/Label/Label.js +6 -0
- package/Forms/Label/index.d.ts +1 -1
- package/Forms/Label/index.js +1 -0
- package/Forms/Password/Password.d.ts +1 -2
- package/Forms/Password/Password.js +17 -0
- package/Forms/Password/index.d.ts +1 -1
- package/Forms/Password/index.js +1 -0
- package/Forms/Radio/Radio.d.ts +1 -2
- package/Forms/Radio/Radio.js +25 -0
- package/Forms/Radio/index.d.ts +1 -1
- package/Forms/Radio/index.js +1 -0
- package/Forms/Switch/Switch.d.ts +1 -5
- package/Forms/Switch/Switch.js +17 -0
- package/Forms/Switch/index.d.ts +1 -1
- package/Forms/Switch/index.js +1 -0
- package/Forms/Textarea/Textarea.d.ts +1 -2
- package/Forms/Textarea/Textarea.js +12 -0
- package/Forms/Textarea/TextareaRich.d.ts +1 -2
- package/Forms/Textarea/TextareaRich.js +26 -0
- package/Forms/Textarea/index.d.ts +2 -2
- package/Forms/Textarea/index.js +2 -0
- package/Forms/Toggle/Toggle-tailwind.js +1 -0
- package/Forms/Toggle/Toggle.d.ts +0 -1
- package/Forms/Toggle/Toggle.js +25 -0
- package/Forms/Toggle/index.d.ts +1 -1
- package/Forms/Toggle/index.js +1 -0
- package/Forms/Toggle/useToggle-tailwind.js +1 -0
- package/Forms/Toggle/useToggle.d.ts +1 -31
- package/Forms/Toggle/useToggle.js +85 -0
- package/Forms/antispam.d.ts +0 -20
- package/Forms/antispam.js +29 -0
- package/Forms/helpers.d.ts +0 -8
- package/Forms/helpers.js +35 -0
- package/Forms/index.d.ts +15 -15
- package/Forms/index.js +15 -0
- package/Forms/styles.d.ts +0 -6
- package/Forms/styles.js +19 -0
- package/Gauge/Gauge.d.ts +0 -1
- package/Gauge/Gauge.js +1 -0
- package/Grid/Grid.d.ts +1 -10
- package/Grid/Grid.js +52 -0
- package/Grid/index.d.ts +1 -1
- package/Grid/index.js +1 -0
- package/Hamburger/Hamburger.d.ts +0 -1
- package/Hamburger/Hamburger.js +47 -0
- package/Hamburger/index.d.ts +1 -1
- package/Hamburger/index.js +1 -0
- package/Header/index.d.ts +1 -1
- package/Header/index.js +1 -0
- package/Header/useHeader.d.ts +0 -4
- package/Header/useHeader.js +31 -0
- package/Hidden/Hidden.d.ts +1 -1
- package/Hidden/Hidden.js +10 -0
- package/Hidden/index.d.ts +1 -1
- package/Hidden/index.js +1 -0
- package/Img/index.d.ts +1 -1
- package/Img/index.js +1 -0
- package/Img/sc/bare.js +4 -0
- package/Img/types.js +1 -0
- package/Link/Link.js +4 -0
- package/Link/LinkBlank.js +15 -0
- package/Link/index.d.ts +2 -2
- package/Link/index.js +2 -0
- package/Menu/Menu.js +4 -0
- package/Menu/MenuMui.js +1 -0
- package/Menu/index.d.ts +1 -1
- package/Menu/index.js +1 -0
- package/MenuItem/MenuItem.js +4 -0
- package/MenuItem/MenuItemMui.js +1 -0
- package/MenuItem/index.d.ts +1 -1
- package/MenuItem/index.js +1 -0
- package/MenuItem/useMenuItem.js +42 -0
- package/Meta.d.ts +5 -0
- package/Meta.js +6 -0
- package/NoJs.js +7 -0
- package/Pagination/PaginationNav.d.ts +1 -9
- package/Pagination/PaginationNav.js +48 -0
- package/Pagination/PaginationResults.js +11 -0
- package/Pagination/index.d.ts +2 -2
- package/Pagination/index.js +2 -0
- package/Pill/Pill.js +7 -0
- package/Pill/index.d.ts +1 -1
- package/Pill/index.js +1 -0
- package/Progress/ProgressCircular.d.ts +1 -7
- package/Progress/ProgressCircular.js +12 -0
- package/Progress/ProgressLinear.d.ts +1 -8
- package/Progress/ProgressLinear.js +21 -0
- package/Progress/ProgressOverlay.js +23 -0
- package/Progress/index.d.ts +3 -3
- package/Progress/index.js +3 -0
- package/Rating/Rating.d.ts +0 -8
- package/Rating/Rating.js +43 -0
- package/Rating/index.d.ts +1 -4
- package/Rating/index.js +45 -0
- package/Select/SelectDownshift.d.ts +1 -1
- package/Select/SelectDownshift.js +1 -0
- package/Select/components.js +12 -0
- package/Select/index.d.ts +2 -2
- package/Select/index.js +1 -0
- package/Sidebar/Sidebar.js +23 -0
- package/Sidebar/index.d.ts +1 -1
- package/Sidebar/index.js +1 -0
- package/Spacing/Spacing.d.ts +1 -14
- package/Spacing/Spacing.js +32 -0
- package/Spacing/index.d.ts +1 -1
- package/Spacing/index.js +1 -0
- package/Sticky/Sticky.js +1 -0
- package/Sticky/StickyCss.js +6 -0
- package/Sticky/index.d.ts +1 -1
- package/Sticky/index.js +1 -0
- package/Tabs/TabsMui.d.ts +6 -7
- package/Tabs/TabsMui.js +30 -0
- package/Tabs/index.d.ts +1 -1
- package/Tabs/index.js +1 -0
- package/Tabs/sc/bare.d.ts +0 -5
- package/Tabs/sc/bare.js +1 -0
- package/Tabs/tw/bare.d.ts +5 -6
- package/Tabs/tw/bare.js +17 -0
- package/Tabs/tw/material.d.ts +2 -3
- package/Tabs/tw/material.js +19 -0
- package/Tabs/useTabs.d.ts +0 -22
- package/Tabs/useTabs.js +43 -0
- package/Typography/CopyPasteVisible.js +4 -0
- package/Typography/Native.js +14 -0
- package/Typography/ReadMore.d.ts +0 -2
- package/Typography/ReadMore.js +42 -0
- package/Typography/TextLoop.js +45 -0
- package/Typography/TypeStairs.js +42 -0
- package/Typography/index.d.ts +5 -5
- package/Typography/index.js +5 -0
- package/classed.d.ts +8 -0
- package/classed.js +43 -0
- package/{helpers/createUseMediaQueryWidth.d.ts → createUseMediaQueryWidth.d.ts} +1 -7
- package/createUseMediaQueryWidth.js +38 -0
- package/css/index.d.ts +1 -2
- package/css/index.js +1 -0
- package/{helpers/extend-component.d.ts → extendComponent.d.ts} +0 -11
- package/extendComponent.js +9 -0
- package/index.d.ts +25 -1
- package/index.js +24 -0
- package/m/MotionProvider.d.ts +0 -32
- package/m/MotionProvider.js +7 -0
- package/m/index.d.ts +1 -6
- package/m/index.js +1 -0
- package/{helpers/mergeRefs.mjs → mergeRefs.js} +4 -3
- package/package.json +609 -22
- package/sc/index.d.ts +29 -30
- package/sc/index.js +29 -0
- package/scm/index.d.ts +28 -29
- package/scm/index.js +28 -0
- package/shared/index.d.ts +7 -8
- package/shared/index.js +7 -0
- package/styles/Body.d.ts +0 -8
- package/styles/Body.js +5 -0
- package/styles/Global.d.ts +0 -13
- package/styles/Global.js +5 -0
- package/styles/index.d.ts +7 -7
- package/styles/index.js +7 -0
- package/styles/media.d.ts +1 -50
- package/styles/media.js +74 -0
- package/styles/spacing.d.ts +1 -2
- package/styles/spacing.js +45 -0
- package/styles/styled.d.ts +0 -4
- package/styles/styled.js +9 -0
- package/styles/theme--vanilla.js +46 -0
- package/styles/theme.d.ts +0 -29
- package/styles/theme.js +30 -0
- package/tw/index.d.ts +1 -2
- package/tw/index.js +1 -0
- package/twm/index.d.ts +1 -2
- package/twm/index.js +1 -0
- package/types.d.ts +3 -2
- package/types.js +1 -0
- package/{hooks/useAsyncFn.d.ts → useAsyncFn.d.ts} +1 -4
- package/useAsyncFn.js +33 -0
- package/useDateLocale.d.ts +2 -0
- package/useDateLocale.js +28 -0
- package/useFirstMountState.d.ts +2 -0
- package/useFirstMountState.js +10 -0
- package/useFixedOffset.d.ts +3 -0
- package/useFixedOffset.js +42 -0
- package/{hooks/useFocus.d.ts → useFocus.d.ts} +0 -3
- package/useFocus.js +9 -0
- package/useInterval.d.ts +2 -0
- package/useInterval.js +22 -0
- package/useIsomorphicLayoutEffect.d.ts +3 -0
- package/useIsomorphicLayoutEffect.js +6 -0
- package/useKeyUp.js +18 -0
- package/{hooks/useMeasure.d.ts → useMeasure.d.ts} +0 -5
- package/useMeasure.js +130 -0
- package/useMountedState.d.ts +2 -0
- package/useMountedState.js +13 -0
- package/useNavigateAway.d.ts +3 -0
- package/useNavigateAway.js +25 -0
- package/usePrevious.d.ts +2 -0
- package/usePrevious.js +9 -0
- package/{hooks/usePreviousRef.mjs → usePreviousRef.js} +2 -2
- package/{hooks/useScrollPosition.d.ts → useScrollPosition.d.ts} +0 -7
- package/useScrollPosition.js +61 -0
- package/useScrollThreshold.js +26 -0
- package/useScrollTo.js +22 -0
- package/{hooks/useSmoothScroll.d.ts → useSmoothScroll.d.ts} +0 -6
- package/useSmoothScroll.js +32 -0
- package/useSpinDelay.d.ts +2 -0
- package/useSpinDelay.js +38 -0
- package/{hooks/useTraceUpdate.d.ts → useTraceUpdate.d.ts} +0 -3
- package/useTraceUpdate.js +18 -0
- package/{hooks/useUpdateEffect.d.ts → useUpdateEffect.d.ts} +0 -3
- package/useUpdateEffect.js +11 -0
- package/useWindowSize.d.ts +3 -0
- package/useWindowSize.js +19 -0
- package/Alert/Alert.mjs +0 -22
- package/Alert/Alert.stories.mjs +0 -18
- package/Alert/index.mjs +0 -1
- package/Animations/Reveal.mjs +0 -43
- package/Animations/Underline.mjs +0 -15
- package/Animations/index.mjs +0 -3
- package/Animations/useReveal.mjs +0 -73
- package/Autocomplete/AutocompleteDownshift.mjs +0 -157
- package/Autocomplete/AutocompleteDownshiftMultiselect.mjs +0 -352
- package/Autocomplete/AutocompleteMui.mjs +0 -219
- package/Autocomplete/AutocompleteReach.mjs +0 -111
- package/Autocomplete/components.mjs +0 -87
- package/Autocomplete/helpers.mjs +0 -35
- package/Autocomplete/index.mjs +0 -4
- package/Bg/BgColor.mjs +0 -42
- package/Bg/BgPhoto.mjs +0 -71
- package/Bg/BgSvg.mjs +0 -22
- package/Bg/index.mjs +0 -3
- package/Breadcrumbs/Breadcrumbs.mjs +0 -91
- package/Breadcrumbs/index.mjs +0 -1
- package/Buttons/Button.mjs +0 -78
- package/Buttons/ButtonComposite.mjs +0 -105
- package/Buttons/ButtonFab.mjs +0 -8
- package/Buttons/ButtonLink.mjs +0 -18
- package/Buttons/IconButton.mjs +0 -19
- package/Buttons/index.mjs +0 -5
- package/Calendar/CalendarDaygridCell.mjs +0 -95
- package/Calendar/CalendarDaygridNav.mjs +0 -52
- package/Calendar/CalendarDaygridTable.mjs +0 -115
- package/Calendar/CalendarLegend.mjs +0 -29
- package/Calendar/calendar-api-google.mjs +0 -99
- package/Calendar/index.mjs +0 -6
- package/Calendar/types.mjs +0 -1
- package/Calendar/useCalendar.mjs +0 -225
- package/Calendar/utils.mjs +0 -209
- package/Carousel/Carousel.mjs +0 -377
- package/Carousel/CarouselCss.mjs +0 -44
- package/Carousel/index.mjs +0 -1
- package/Collapsable/Collapsable.mjs +0 -1
- package/Collapsable/CollapsableReach.mjs +0 -250
- package/Collapsable/index.mjs +0 -1
- package/Debug/Debug.mjs +0 -23
- package/Debug/index.mjs +0 -1
- package/Details/Details.mjs +0 -90
- package/Details/Details.stories.mjs +0 -21
- package/Details/index.mjs +0 -1
- package/Dialog/DialogMui.mjs +0 -105
- package/Dialog/DialogMui.stories.mjs +0 -20
- package/Dialog/css/bare.mjs +0 -19
- package/Dialog/css/index.stories.mjs +0 -75
- package/Dialog/index.mjs +0 -1
- package/Dialog/m/bare.mjs +0 -115
- package/Dialog/m/basic.mjs +0 -31
- package/Dialog/m/index.mjs +0 -4
- package/Dialog/sc/bare.mjs +0 -54
- package/Dialog/sc/framer.mjs +0 -16
- package/Dialog/sc/framerMaterial.mjs +0 -16
- package/Dialog/sc/index.stories.mjs +0 -48
- package/Dialog/sc/material.mjs +0 -41
- package/Dialog/tw/bare.mjs +0 -29
- package/Dialog/tw/elegant.mjs +0 -18
- package/Dialog/tw/framer.mjs +0 -16
- package/Dialog/tw/framerMaterial.mjs +0 -16
- package/Dialog/tw/index.stories.mjs +0 -83
- package/Dialog/tw/material.mjs +0 -18
- package/Editor/Editor--tiptap.mjs +0 -53
- package/Editor/components.mjs +0 -28
- package/Editor/index.mjs +0 -1
- package/FaviconTags.mjs +0 -64
- package/Form/Form.mjs +0 -95
- package/Form/index.mjs +0 -1
- package/Form/sc/bare.mjs +0 -29
- package/Forms/Checkbox/Checkbox.mjs +0 -36
- package/Forms/Checkbox/index.mjs +0 -1
- package/Forms/Feedback/Feedback.mjs +0 -14
- package/Forms/Feedback/index.mjs +0 -1
- package/Forms/Field/Field.mjs +0 -50
- package/Forms/Field/FieldControl.mjs +0 -67
- package/Forms/Field/FieldHint.mjs +0 -6
- package/Forms/Field/index.mjs +0 -2
- package/Forms/Input/Input.mjs +0 -36
- package/Forms/Input/index.mjs +0 -1
- package/Forms/InputGroup/InputGroup.mjs +0 -57
- package/Forms/InputGroup/index.mjs +0 -1
- package/Forms/Label/Label.mjs +0 -24
- package/Forms/Label/index.mjs +0 -1
- package/Forms/Password/Password.mjs +0 -53
- package/Forms/Password/index.mjs +0 -1
- package/Forms/Radio/Radio.mjs +0 -57
- package/Forms/Radio/index.mjs +0 -1
- package/Forms/Switch/Switch.mjs +0 -60
- package/Forms/Switch/index.mjs +0 -1
- package/Forms/Textarea/Textarea.mjs +0 -26
- package/Forms/Textarea/TextareaRich.mjs +0 -48
- package/Forms/Textarea/index.mjs +0 -2
- package/Forms/Toggle/Toggle-tailwind.mjs +0 -98
- package/Forms/Toggle/Toggle.mjs +0 -123
- package/Forms/Toggle/index.mjs +0 -1
- package/Forms/Toggle/useToggle-tailwind.mjs +0 -201
- package/Forms/Toggle/useToggle.mjs +0 -163
- package/Forms/antispam.mjs +0 -58
- package/Forms/helpers.mjs +0 -52
- package/Forms/index.mjs +0 -16
- package/Forms/styles.mjs +0 -61
- package/Gauge/Gauge.mjs +0 -101
- package/Grid/Grid.mjs +0 -75
- package/Grid/index.mjs +0 -1
- package/Hamburger/Hamburger.mjs +0 -79
- package/Hamburger/index.mjs +0 -1
- package/Header/index.mjs +0 -1
- package/Header/useHeader.mjs +0 -36
- package/Hidden/Hidden.mjs +0 -10
- package/Hidden/index.mjs +0 -1
- package/Img/index.mjs +0 -1
- package/Img/sc/bare.mjs +0 -36
- package/Img/types.mjs +0 -1
- package/Link/Link.mjs +0 -2
- package/Link/LinkBlank.mjs +0 -32
- package/Link/index.mjs +0 -2
- package/Menu/Menu.mjs +0 -11
- package/Menu/MenuMui.mjs +0 -164
- package/Menu/index.mjs +0 -1
- package/MenuItem/MenuItem.mjs +0 -20
- package/MenuItem/MenuItemMui.mjs +0 -31
- package/MenuItem/index.mjs +0 -1
- package/MenuItem/useMenuItem.mjs +0 -78
- package/Meta/Meta.d.ts +0 -15
- package/Meta/Meta.mjs +0 -8
- package/Meta/index.d.ts +0 -2
- package/Meta/index.mjs +0 -2
- package/NoJs/NoJs.mjs +0 -10
- package/NoJs/index.d.ts +0 -2
- package/NoJs/index.mjs +0 -2
- package/Pagination/PaginationNav.mjs +0 -122
- package/Pagination/PaginationResults.mjs +0 -34
- package/Pagination/index.mjs +0 -2
- package/Pill/Pill.mjs +0 -37
- package/Pill/index.mjs +0 -1
- package/Progress/ProgressCircular.mjs +0 -53
- package/Progress/ProgressLinear.mjs +0 -44
- package/Progress/ProgressOverlay.mjs +0 -64
- package/Progress/index.mjs +0 -3
- package/README.md +0 -1
- package/Rating/Rating.mjs +0 -154
- package/Rating/index.mjs +0 -62
- package/Select/SelectDownshift.mjs +0 -37
- package/Select/components.mjs +0 -25
- package/Select/index.mjs +0 -2
- package/Sidebar/Sidebar.mjs +0 -63
- package/Sidebar/index.mjs +0 -1
- package/Spacing/Spacing.mjs +0 -55
- package/Spacing/index.mjs +0 -1
- package/Sticky/Sticky.mjs +0 -218
- package/Sticky/StickyCss.mjs +0 -10
- package/Sticky/index.mjs +0 -1
- package/Tabs/TabsMui.mjs +0 -61
- package/Tabs/TabsMui.stories.mjs +0 -20
- package/Tabs/index.mjs +0 -1
- package/Tabs/sc/bare.mjs +0 -85
- package/Tabs/sc/index.stories.mjs +0 -0
- package/Tabs/tw/bare.mjs +0 -15
- package/Tabs/tw/index.stories.mjs +0 -25
- package/Tabs/tw/material.mjs +0 -14
- package/Tabs/useTabs.mjs +0 -46
- package/Typography/CopyPasteVisible.mjs +0 -6
- package/Typography/Native.mjs +0 -47
- package/Typography/ReadMore.mjs +0 -114
- package/Typography/TextLoop.mjs +0 -90
- package/Typography/TypeStairs.mjs +0 -61
- package/Typography/index.mjs +0 -5
- package/css/index.mjs +0 -30
- package/helpers/classed.d.ts +0 -27
- package/helpers/classed.mjs +0 -65
- package/helpers/classed.stories.mjs +0 -121
- package/helpers/createUseMediaQueryWidth.mjs +0 -178
- package/helpers/extend-component.mjs +0 -13
- package/helpers/index.d.ts +0 -4
- package/helpers/index.mjs +0 -4
- package/hooks/index.d.ts +0 -20
- package/hooks/index.mjs +0 -21
- package/hooks/types.d.ts +0 -8
- package/hooks/types.mjs +0 -3
- package/hooks/useAsyncFn.mjs +0 -39
- package/hooks/useDateLocale.d.ts +0 -8
- package/hooks/useDateLocale.mjs +0 -37
- package/hooks/useFirstMountState.d.ts +0 -5
- package/hooks/useFirstMountState.mjs +0 -12
- package/hooks/useFixedOffset.d.ts +0 -12
- package/hooks/useFixedOffset.mjs +0 -56
- package/hooks/useFocus.mjs +0 -14
- package/hooks/useInterval.d.ts +0 -7
- package/hooks/useInterval.mjs +0 -29
- package/hooks/useIsomorphicLayoutEffect.d.ts +0 -6
- package/hooks/useIsomorphicLayoutEffect.mjs +0 -6
- package/hooks/useKeyUp.mjs +0 -21
- package/hooks/useMeasure.mjs +0 -174
- package/hooks/useMountedState.d.ts +0 -5
- package/hooks/useMountedState.mjs +0 -15
- package/hooks/useNavigateAway.d.ts +0 -32
- package/hooks/useNavigateAway.mjs +0 -69
- package/hooks/usePrevious.d.ts +0 -5
- package/hooks/usePrevious.mjs +0 -17
- package/hooks/useScrollPosition.mjs +0 -70
- package/hooks/useScrollThreshold.mjs +0 -33
- package/hooks/useScrollTo.mjs +0 -20
- package/hooks/useSmoothScroll.mjs +0 -35
- package/hooks/useSpinDelay.d.ts +0 -14
- package/hooks/useSpinDelay.mjs +0 -52
- package/hooks/useTraceUpdate.mjs +0 -23
- package/hooks/useUpdateEffect.mjs +0 -14
- package/hooks/useWindowSize.d.ts +0 -12
- package/hooks/useWindowSize.mjs +0 -32
- package/index.mjs +0 -4
- package/m/MotionProvider.mjs +0 -40
- package/m/index.mjs +0 -5
- package/sc/index.mjs +0 -31
- package/scm/index.mjs +0 -31
- package/shared/index.mjs +0 -43
- package/styles/Body.mjs +0 -16
- package/styles/Global.mjs +0 -49
- package/styles/index.mjs +0 -7
- package/styles/media.mjs +0 -151
- package/styles/spacing.mjs +0 -46
- package/styles/styled.mjs +0 -26
- package/styles/theme--vanilla.mjs +0 -65
- package/styles/theme.mjs +0 -38
- package/tw/index.mjs +0 -30
- package/twm/index.mjs +0 -30
- package/types.mjs +0 -1
- /package/{NoJs/NoJs.d.ts → NoJs.d.ts} +0 -0
- /package/m/{lite.mjs → lite.js} +0 -0
- /package/m/{max.mjs → max.js} +0 -0
- /package/{helpers/mergeRefs.d.ts → mergeRefs.d.ts} +0 -0
- /package/{hooks/useKeyUp.d.ts → useKeyUp.d.ts} +0 -0
- /package/{hooks/usePreviousRef.d.ts → usePreviousRef.d.ts} +0 -0
- /package/{hooks/useScrollThreshold.d.ts → useScrollThreshold.d.ts} +0 -0
- /package/{hooks/useScrollTo.d.ts → useScrollTo.d.ts} +0 -0
package/Sticky/Sticky.mjs
DELETED
|
@@ -1,218 +0,0 @@
|
|
|
1
|
-
export const Sticky = null; // import {
|
|
2
|
-
// Ref,
|
|
3
|
-
// CSSProperties,
|
|
4
|
-
// useState,
|
|
5
|
-
// useCallback,
|
|
6
|
-
// useEffect,
|
|
7
|
-
// useRef,
|
|
8
|
-
// } from "react";
|
|
9
|
-
// /**
|
|
10
|
-
// * Get current coordinates `left` and `top` of specific element.
|
|
11
|
-
// */
|
|
12
|
-
// const offsetRelative = (element: HTMLElement) => {
|
|
13
|
-
// var result = { l: 0, t: 0 };
|
|
14
|
-
// do {
|
|
15
|
-
// let offsetTop = element.offsetTop;
|
|
16
|
-
// let offsetLeft = element.offsetLeft;
|
|
17
|
-
// if (!isNaN(offsetTop)) result.t += offsetTop;
|
|
18
|
-
// if (!isNaN(offsetLeft)) result.l += offsetLeft;
|
|
19
|
-
// // @ts-expect-error just rething everyhting in this file
|
|
20
|
-
// element =
|
|
21
|
-
// "BODY" === element.tagName ? element.parentElement : element.offsetParent;
|
|
22
|
-
// } while (element);
|
|
23
|
-
// return result;
|
|
24
|
-
// };
|
|
25
|
-
// export type StickyElementProps = {
|
|
26
|
-
// ref: Ref<HTMLDivElement>;
|
|
27
|
-
// sticky?: boolean;
|
|
28
|
-
// style: CSSProperties;
|
|
29
|
-
// };
|
|
30
|
-
// /**
|
|
31
|
-
// * - `0`: "STATIC": Static position as nothing happened
|
|
32
|
-
// * - `1`: "VIEWPORT-TOP": Sticked to the top screen edge
|
|
33
|
-
// * - `2`: "VIEWPORT-BOTTOM": Sticked to the bottom screen edge
|
|
34
|
-
// * - `4`: "VIEWPORT-UNBOTTOM": ? Scrolling in the middle of the element, neither sticked nor static
|
|
35
|
-
// * - `3`: "CONTAINER-BOTTOM": ?
|
|
36
|
-
// */
|
|
37
|
-
// export type StickyStatus = 0 | 1 | 2 | 3;
|
|
38
|
-
// type DimensionsBasic = [
|
|
39
|
-
// /** containerTop */
|
|
40
|
-
// number,
|
|
41
|
-
// /** containerHeight */
|
|
42
|
-
// number,
|
|
43
|
-
// /** containerBottom */
|
|
44
|
-
// number,
|
|
45
|
-
// /** elementHeight */
|
|
46
|
-
// number,
|
|
47
|
-
// /** elementWidth */
|
|
48
|
-
// number,
|
|
49
|
-
// /** viewportHeight */
|
|
50
|
-
// number,
|
|
51
|
-
// /** maxTranslateY */
|
|
52
|
-
// number
|
|
53
|
-
// ];
|
|
54
|
-
// type DimensionsOnScroll = [
|
|
55
|
-
// /** elementLeft */
|
|
56
|
-
// number,
|
|
57
|
-
// /** viewportTop */
|
|
58
|
-
// number,
|
|
59
|
-
// /** viewportBottom */
|
|
60
|
-
// number,
|
|
61
|
-
// /** viewportLeft */
|
|
62
|
-
// number,
|
|
63
|
-
// /** topSpacing */
|
|
64
|
-
// number,
|
|
65
|
-
// /** bottomSpacing */
|
|
66
|
-
// number
|
|
67
|
-
// /** translateY */
|
|
68
|
-
// // number,
|
|
69
|
-
// /** lastTopSpacing */
|
|
70
|
-
// // number,
|
|
71
|
-
// /** lastBottomSpacing */
|
|
72
|
-
// // number,
|
|
73
|
-
// /** lastViewportTop */
|
|
74
|
-
// // number,
|
|
75
|
-
// ];
|
|
76
|
-
// type Dimensions = DimensionsBasic & DimensionsOnScroll;
|
|
77
|
-
// const getDimensionsBasic = (container: HTMLElement, inner: HTMLElement) => {
|
|
78
|
-
// const containerTop = offsetRelative(container).t;
|
|
79
|
-
// const containerHeight = container.clientHeight;
|
|
80
|
-
// const containerBottom = containerTop + containerHeight;
|
|
81
|
-
// const elementHeight = inner.offsetHeight;
|
|
82
|
-
// const elementWidth = inner.offsetWidth;
|
|
83
|
-
// const viewportHeight = window.innerHeight;
|
|
84
|
-
// const maxTranslateY = containerHeight - elementHeight;
|
|
85
|
-
// return [
|
|
86
|
-
// containerTop,
|
|
87
|
-
// containerHeight,
|
|
88
|
-
// containerBottom,
|
|
89
|
-
// elementHeight,
|
|
90
|
-
// elementWidth,
|
|
91
|
-
// viewportHeight,
|
|
92
|
-
// maxTranslateY,
|
|
93
|
-
// ] as DimensionsBasic;
|
|
94
|
-
// };
|
|
95
|
-
// const getDimensionsOnScroll = (
|
|
96
|
-
// wrapper: HTMLElement,
|
|
97
|
-
// container: HTMLElement,
|
|
98
|
-
// inner: HTMLElement
|
|
99
|
-
// ) => {
|
|
100
|
-
// const elementLeft = offsetRelative(wrapper).l;
|
|
101
|
-
// const viewportTop =
|
|
102
|
-
// document.documentElement.scrollTop || document.body.scrollTop;
|
|
103
|
-
// const viewportBottom = viewportTop + window.innerHeight;
|
|
104
|
-
// const viewportLeft =
|
|
105
|
-
// document.documentElement.scrollLeft || document.body.scrollLeft;
|
|
106
|
-
// const topSpacing = 0; // TODO: make it a prop?
|
|
107
|
-
// const bottomSpacing = 0; // TODO: make it a prop?
|
|
108
|
-
// // const lastTopSpacing = topSpacing;
|
|
109
|
-
// // const lastBottomSpacing = bottomSpacing;
|
|
110
|
-
// return [
|
|
111
|
-
// elementLeft,
|
|
112
|
-
// viewportTop,
|
|
113
|
-
// viewportBottom,
|
|
114
|
-
// viewportLeft,
|
|
115
|
-
// topSpacing,
|
|
116
|
-
// bottomSpacing,
|
|
117
|
-
// ] as DimensionsOnScroll;
|
|
118
|
-
// };
|
|
119
|
-
// // const getTranslateYonScroll = (dimensions: DimensionsOnScroll, status: StickyStatus) => {
|
|
120
|
-
// // if (status === 1) {
|
|
121
|
-
// // // Adjust translate Y in the case decrease top spacing value.
|
|
122
|
-
// // if (dimensions[5] < dims.lastTopSpacing) {
|
|
123
|
-
// // dims.translateY += dims.lastTopSpacing - dims.topSpacing;
|
|
124
|
-
// // this._reStyle = true;
|
|
125
|
-
// // }
|
|
126
|
-
// // } else if (status === 2) {
|
|
127
|
-
// // // Adjust translate Y in the case decrease bottom spacing value.
|
|
128
|
-
// // if (dims.bottomSpacing < dims.lastBottomSpacing) {
|
|
129
|
-
// // dims.translateY += dims.lastBottomSpacing - dims.bottomSpacing;
|
|
130
|
-
// // this._reStyle = true;
|
|
131
|
-
// // }
|
|
132
|
-
// // }
|
|
133
|
-
// // }
|
|
134
|
-
// export type StickyProps = {
|
|
135
|
-
// /** @default "div" */
|
|
136
|
-
// Wrapper?: FC<StickyElementProps>;
|
|
137
|
-
// /** @default "div" */
|
|
138
|
-
// Inner?: FC<StickyElementProps>;
|
|
139
|
-
// top: number;
|
|
140
|
-
// };
|
|
141
|
-
// export const Sticky: FC<StickyProps> = ({
|
|
142
|
-
// Wrapper = "div",
|
|
143
|
-
// Inner = "div",
|
|
144
|
-
// children,
|
|
145
|
-
// top,
|
|
146
|
-
// ...props
|
|
147
|
-
// }) => {
|
|
148
|
-
// const [sticky, setSticky] = useState(false);
|
|
149
|
-
// const [shouldRestyle, setShouldRestyle] = useState<boolean>();
|
|
150
|
-
// const stickyStatus = useRef<StickyStatus>(0);
|
|
151
|
-
// const [dimensionsBasic, setDimensionsBasic] = useState<DimensionsBasic>();
|
|
152
|
-
// const [dimensionsOnScroll, setDimensionsOnScroll] =
|
|
153
|
-
// useState<DimensionsOnScroll>();
|
|
154
|
-
// const [translateY, setTranslateY] = useState<number>(0);
|
|
155
|
-
// const [styleWrapper, setStyleWrapper] = useState({});
|
|
156
|
-
// const [styleInner, setStyleInner] = useState({});
|
|
157
|
-
// const [innerWidth, setInnerWidth] = useState<string>();
|
|
158
|
-
// const wrapperRef = useRef<HTMLDivElement>(null);
|
|
159
|
-
// const innerRef = useRef<HTMLDivElement>(null);
|
|
160
|
-
// const handleScroll = useCallback(() => {
|
|
161
|
-
// const wrapper = wrapperRef?.current;
|
|
162
|
-
// const container = wrapper?.parentElement || null;
|
|
163
|
-
// const inner = innerRef?.current;
|
|
164
|
-
// if (wrapper && inner && container) {
|
|
165
|
-
// const dimensions = getDimensionsOnScroll(wrapper, container, inner);
|
|
166
|
-
// setDimensionsOnScroll(dimensions);
|
|
167
|
-
// }
|
|
168
|
-
// }, []);
|
|
169
|
-
// const handleResize = useCallback(() => {
|
|
170
|
-
// const container = wrapperRef?.current?.parentElement || null;
|
|
171
|
-
// const inner = innerRef?.current;
|
|
172
|
-
// if (inner && container) {
|
|
173
|
-
// setDimensionsBasic(getDimensionsBasic(container, inner));
|
|
174
|
-
// // if (innerRef?.current) {
|
|
175
|
-
// // setInnerWidth(window.getComputedStyle(innerRef.current).width);
|
|
176
|
-
// // }
|
|
177
|
-
// // setSticky(wrapperRef.current.getBoundingClientRect().top <= top);
|
|
178
|
-
// }
|
|
179
|
-
// }, []);
|
|
180
|
-
// useEffect(() => {
|
|
181
|
-
// const container = wrapperRef?.current?.parentElement || null;
|
|
182
|
-
// const inner = innerRef?.current;
|
|
183
|
-
// if (inner && container) {
|
|
184
|
-
// setDimensionsBasic(getDimensionsBasic(container, inner));
|
|
185
|
-
// }
|
|
186
|
-
// window.addEventListener("scroll", handleScroll, { passive: true });
|
|
187
|
-
// window.addEventListener("resize", handleResize, { passive: true });
|
|
188
|
-
// return () => {
|
|
189
|
-
// window.removeEventListener("scroll", () => handleScroll);
|
|
190
|
-
// window.removeEventListener("resize", () => handleResize);
|
|
191
|
-
// };
|
|
192
|
-
// }, [wrapperRef, innerRef, handleScroll, handleResize]);
|
|
193
|
-
// // useEffect(() => {
|
|
194
|
-
// // if (sticky) {
|
|
195
|
-
// // setStyleInner({
|
|
196
|
-
// // position: "fixed",
|
|
197
|
-
// // zIndex: 1,
|
|
198
|
-
// // top,
|
|
199
|
-
// // width: innerWidth,
|
|
200
|
-
// // });
|
|
201
|
-
// // } else {
|
|
202
|
-
// // setStyleInner({});
|
|
203
|
-
// // }
|
|
204
|
-
// // }, [sticky, top, innerWidth]);
|
|
205
|
-
// return (
|
|
206
|
-
// <Wrapper
|
|
207
|
-
// ref={wrapperRef}
|
|
208
|
-
// sticky={Wrapper === "div" ? undefined : sticky}
|
|
209
|
-
// style={{
|
|
210
|
-
// position: "relative",
|
|
211
|
-
// }}
|
|
212
|
-
// >
|
|
213
|
-
// <Inner ref={innerRef} style={styleInner}>
|
|
214
|
-
// {children}
|
|
215
|
-
// </Inner>
|
|
216
|
-
// </Wrapper>
|
|
217
|
-
// );
|
|
218
|
-
// };
|
package/Sticky/StickyCss.mjs
DELETED
package/Sticky/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { StickyCss, StickyCssProps } from "./StickyCss";
|
package/Tabs/TabsMui.mjs
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import TabUnstyled from "@mui/base/Tab";
|
|
3
|
-
import TabPanelUnstyled from "@mui/base/TabPanel";
|
|
4
|
-
import TabsUnstyled from "@mui/base/Tabs";
|
|
5
|
-
import TabsListUnstyled from "@mui/base/TabsList";
|
|
6
|
-
import useTab from "@mui/base/useTab";
|
|
7
|
-
import { forwardRef } from "react";
|
|
8
|
-
import { extendComponent } from "../helpers";
|
|
9
|
-
export const Root = TabsUnstyled;
|
|
10
|
-
export const List = TabsListUnstyled;
|
|
11
|
-
// export const Tab = TabUnstyled as unknown as Props["Tab"];
|
|
12
|
-
export const Indicator = "span";
|
|
13
|
-
export const Panel = TabPanelUnstyled;
|
|
14
|
-
export const Tab = /*#__PURE__*/ forwardRef(function Tab({ children, // component,
|
|
15
|
-
slot, slotProps, slots, Indicator, ...props }, ref) {
|
|
16
|
-
const { active, /* disabled, */ selected } = useTab({
|
|
17
|
-
...props,
|
|
18
|
-
rootRef: ref
|
|
19
|
-
});
|
|
20
|
-
const indicatorProps = {
|
|
21
|
-
active,
|
|
22
|
-
/* disabled, */ selected
|
|
23
|
-
};
|
|
24
|
-
return /*#__PURE__*/ _jsxs(TabUnstyled, {
|
|
25
|
-
...props,
|
|
26
|
-
children: [
|
|
27
|
-
children,
|
|
28
|
-
Indicator && /*#__PURE__*/ _jsx(Indicator, {
|
|
29
|
-
...indicatorProps
|
|
30
|
-
})
|
|
31
|
-
]
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* Main differences from [Mui Tabs](https://mui.com/material-ui/react-dialog):
|
|
37
|
-
*
|
|
38
|
-
* @resources
|
|
39
|
-
* - [WAI-ARIA](https://www.w3.org/TR/wai-aria-practices/#tabpanel)
|
|
40
|
-
* - [WAI-ARIA example](https://www.w3.org/TR/wai-aria-practices/examples/tabs/tabs-1/tabs.html)
|
|
41
|
-
* - [[Proposal] New tags tabsection, tablist, tab, tabpanel](https://github.com/whatwg/html/issues/1809)
|
|
42
|
-
* - [Native <tab> elements](https://github.com/w3c/html/issues/1704)
|
|
43
|
-
* - [Let's talk about Native HTML Tabs](https://daverupert.com/2021/10/native-html-tabs/)
|
|
44
|
-
*
|
|
45
|
-
* @similar
|
|
46
|
-
* - [Zertz/react-headless-tabs](https://github.com/Zertz/react-headless-tabs)
|
|
47
|
-
*
|
|
48
|
-
* FIXME: it actually works even without forwardRef, check if we do need it
|
|
49
|
-
*/ const TabsWithRef = /*#__PURE__*/ forwardRef(function Tabs({ Root: _Root, List: _List, Tab: _Tab, Indicator: _Indicator, Panel: _Panel, ...props }, ref) {
|
|
50
|
-
return /*#__PURE__*/ _jsx(Root, {
|
|
51
|
-
...props,
|
|
52
|
-
ref: ref
|
|
53
|
-
});
|
|
54
|
-
});
|
|
55
|
-
export const KoineTabs = extendComponent(TabsWithRef, {
|
|
56
|
-
Root,
|
|
57
|
-
List,
|
|
58
|
-
Tab,
|
|
59
|
-
Indicator,
|
|
60
|
-
Panel
|
|
61
|
-
}); // export default Tabs;
|
package/Tabs/TabsMui.stories.mjs
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StoryTabs, storyTabsArgs, storyTabsMeta } from "@koine/stories";
|
|
3
|
-
import { KoineTabs } from "./TabsMui";
|
|
4
|
-
export default {
|
|
5
|
-
component: KoineTabs,
|
|
6
|
-
title: "Base/Tabs",
|
|
7
|
-
...storyTabsMeta
|
|
8
|
-
};
|
|
9
|
-
const BareTemplate = (args)=>{
|
|
10
|
-
// return <StoryTabs {...args} Tabs={KoineTabs} />;
|
|
11
|
-
return /*#__PURE__*/ _jsx(StoryTabs, {
|
|
12
|
-
...args,
|
|
13
|
-
Tabs: KoineTabs
|
|
14
|
-
});
|
|
15
|
-
// return <div><Tabs {...args} /></div>;
|
|
16
|
-
};
|
|
17
|
-
export const Bare = BareTemplate.bind({});
|
|
18
|
-
Bare.args = {
|
|
19
|
-
...storyTabsArgs
|
|
20
|
-
};
|
package/Tabs/index.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export * from "./TabsMui";
|
package/Tabs/sc/bare.mjs
DELETED
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// <reference types="@reach/utils/dist/declarations/src/polymorphic" />
|
|
2
|
-
/**
|
|
3
|
-
* @file
|
|
4
|
-
*
|
|
5
|
-
* Here we manage only "vertical" oriented tabs for now
|
|
6
|
-
*/ // import styled from "styled-components";
|
|
7
|
-
// import {
|
|
8
|
-
// Tabs as _Tabs,
|
|
9
|
-
// TabList as _TabList,
|
|
10
|
-
// Tab as _Tab,
|
|
11
|
-
// TabPanels as _TabPanels,
|
|
12
|
-
// TabPanel as _TabPanel,
|
|
13
|
-
// TabProps as _TabProps,
|
|
14
|
-
// TabsProps as _TabsProps,
|
|
15
|
-
// useTabsContext,
|
|
16
|
-
// } from "@reach/tabs";
|
|
17
|
-
// import { min } from "../../styles/media";
|
|
18
|
-
// import { UnderlineSkewed } from "../../Animations/Underline";
|
|
19
|
-
// import { btnStyleReset } from "../../Buttons/Button";
|
|
20
|
-
// export const Tabs = styled(_Tabs)<TabsProps>`
|
|
21
|
-
// ${min.sm} {
|
|
22
|
-
// display: flex;
|
|
23
|
-
// ${(p) => p.$vertical && "flex-direction: column;"}
|
|
24
|
-
// }
|
|
25
|
-
// `;
|
|
26
|
-
// export type TabsProps = React.PropsWithChildren<_TabsProps> & {
|
|
27
|
-
// $vertical?: boolean;
|
|
28
|
-
// };
|
|
29
|
-
// export const TabList = styled(_TabList)`
|
|
30
|
-
// display: flex;
|
|
31
|
-
// flex-direction: column;
|
|
32
|
-
// ${min.sm} {
|
|
33
|
-
// border-right: 1px solid var(--grey800);
|
|
34
|
-
// }
|
|
35
|
-
// `;
|
|
36
|
-
// export const TabWrap = styled(_Tab)<TabProps & TabStyledProps>`
|
|
37
|
-
// ${btnStyleReset}
|
|
38
|
-
// position: relative;
|
|
39
|
-
// justify-content: flex-end;
|
|
40
|
-
// padding: 0.7em;
|
|
41
|
-
// margin-bottom: 1em;
|
|
42
|
-
// font-weight: bold;
|
|
43
|
-
// color: ${(p) => (p.$active ? "var(--accent200)" : "var(--grey300)")};
|
|
44
|
-
// ${min.sm} {
|
|
45
|
-
// padding-right: var(--gutter-half);
|
|
46
|
-
// }
|
|
47
|
-
// &:hover {
|
|
48
|
-
// color: ${(p) => (p.$active ? "var(--accent200)" : "var(--accent300)")};
|
|
49
|
-
// }
|
|
50
|
-
// `;
|
|
51
|
-
// export const TabText = styled.span<TabStyledProps>`
|
|
52
|
-
// position: relative;
|
|
53
|
-
// z-index: 1;
|
|
54
|
-
// `;
|
|
55
|
-
// export const TabUnderline = styled(UnderlineSkewed)<TabStyledProps>``;
|
|
56
|
-
// export type TabStyledProps = {
|
|
57
|
-
// $active: boolean;
|
|
58
|
-
// $focused: boolean;
|
|
59
|
-
// };
|
|
60
|
-
// export type TabProps = _TabProps & {
|
|
61
|
-
// idx: number;
|
|
62
|
-
// };
|
|
63
|
-
// export const Tab = ({ children, ...props }: TabProps) => {
|
|
64
|
-
// const { selectedIndex, focusedIndex } = useTabsContext();
|
|
65
|
-
// const styledProps = {
|
|
66
|
-
// $active: props.idx === selectedIndex,
|
|
67
|
-
// $focused: props.idx === focusedIndex,
|
|
68
|
-
// };
|
|
69
|
-
// return (
|
|
70
|
-
// <TabWrap {...props} {...styledProps}>
|
|
71
|
-
// {styledProps.$active && (
|
|
72
|
-
// <TabUnderline {...styledProps} layoutId="Tab-underline" />
|
|
73
|
-
// )}
|
|
74
|
-
// <TabText {...styledProps}>{children}</TabText>
|
|
75
|
-
// </TabWrap>
|
|
76
|
-
// );
|
|
77
|
-
// };
|
|
78
|
-
// export const TabPanels = styled(_TabPanels)`
|
|
79
|
-
// flex: 1;
|
|
80
|
-
// `;
|
|
81
|
-
// export const TabPanel = styled(_TabPanel)`
|
|
82
|
-
// ${min.sm} {
|
|
83
|
-
// padding-left: var(--gutter-half);
|
|
84
|
-
// }
|
|
85
|
-
// `;
|
|
File without changes
|
package/Tabs/tw/bare.mjs
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { classed, extendComponent } from "../../helpers";
|
|
2
|
-
// import type { ComponentsProps } from "../TabsMui";
|
|
3
|
-
import * as _ from "../TabsMui";
|
|
4
|
-
export const Root = classed(_.Root)`< class="tabs`;
|
|
5
|
-
export const List = classed(_.List)`< class="tabsList flex`;
|
|
6
|
-
export const Tab = classed(_.Tab)`< class="tabsTab inline-flex items-center justify-center [-webkit-tap-highlight-color:transparent] appearance-none select-none`;
|
|
7
|
-
export const Indicator = classed(_.Indicator)`< class="tabsIndicator`;
|
|
8
|
-
export const Panel = classed(_.Panel)`< class="tabsPanel`;
|
|
9
|
-
export const KoineTabs = extendComponent(_.KoineTabs, {
|
|
10
|
-
Root,
|
|
11
|
-
List,
|
|
12
|
-
Tab,
|
|
13
|
-
Indicator,
|
|
14
|
-
Panel
|
|
15
|
-
});
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { StoryTabs, storyTabsArgs, storyTabsMeta } from "@koine/stories";
|
|
3
|
-
import { KoineTabs as bareComp } from "./bare";
|
|
4
|
-
import { KoineTabs as materialComp } from "./material";
|
|
5
|
-
// import { classed } from "../../helpers";
|
|
6
|
-
export default {
|
|
7
|
-
title: "Base/Tabs/Tailwind",
|
|
8
|
-
...storyTabsMeta
|
|
9
|
-
};
|
|
10
|
-
const bareTemplate = (args)=>{
|
|
11
|
-
return /*#__PURE__*/ _jsx(StoryTabs, {
|
|
12
|
-
...args,
|
|
13
|
-
Tabs: bareComp
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
export const bare = bareTemplate.bind({});
|
|
17
|
-
bare.args = storyTabsArgs;
|
|
18
|
-
const materialTemplate = (args)=>{
|
|
19
|
-
return /*#__PURE__*/ _jsx(StoryTabs, {
|
|
20
|
-
...args,
|
|
21
|
-
Tabs: materialComp
|
|
22
|
-
});
|
|
23
|
-
};
|
|
24
|
-
export const material = materialTemplate.bind({});
|
|
25
|
-
material.args = storyTabsArgs;
|
package/Tabs/tw/material.mjs
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { classed, extendComponent } from "../../helpers";
|
|
2
|
-
import { KoineTabs as _ } from "./bare";
|
|
3
|
-
export const Root = classed(_.Root)`< class="`;
|
|
4
|
-
export const List = classed(_.List)`< class="border-b-gray-200 border-b border-solid`;
|
|
5
|
-
export const Tab = classed(_.Tab)`< class="flex-col relative py-3 px-4 uppercase`; // ${p => p.selected ? "text-cyan-600" : ""}
|
|
6
|
-
export const Indicator = classed(_.Indicator)`< class="absolute bottom-0 w-full h-[2px] ${(p)=>p.selected ? "bg-current" : ""}`;
|
|
7
|
-
export const Panel = classed(_.Panel)`< class="tabsPanel`;
|
|
8
|
-
export const KoineTabs = extendComponent(_, {
|
|
9
|
-
Root,
|
|
10
|
-
List,
|
|
11
|
-
Tab,
|
|
12
|
-
Indicator,
|
|
13
|
-
Panel
|
|
14
|
-
});
|
package/Tabs/useTabs.mjs
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import useControlled from "@mui/utils/useControlled";
|
|
2
|
-
import React, { useCallback, useId, useMemo } from "react";
|
|
3
|
-
export const useTabs = (props)=>{
|
|
4
|
-
const { value: valueProp, defaultValue, onChange, orientation, direction, selectionFollowsFocus } = props;
|
|
5
|
-
const [value, setValue] = useControlled({
|
|
6
|
-
controlled: valueProp,
|
|
7
|
-
default: defaultValue,
|
|
8
|
-
name: "Tabs",
|
|
9
|
-
state: "value"
|
|
10
|
-
});
|
|
11
|
-
const idPrefix = useId();
|
|
12
|
-
const onSelected = useCallback((e, newValue)=>{
|
|
13
|
-
setValue(newValue);
|
|
14
|
-
if (onChange) {
|
|
15
|
-
onChange(e, newValue);
|
|
16
|
-
}
|
|
17
|
-
}, [
|
|
18
|
-
onChange,
|
|
19
|
-
setValue
|
|
20
|
-
]);
|
|
21
|
-
const getRootProps = ()=>{
|
|
22
|
-
return {};
|
|
23
|
-
};
|
|
24
|
-
const tabsContextValue = useMemo(()=>{
|
|
25
|
-
return {
|
|
26
|
-
idPrefix,
|
|
27
|
-
value,
|
|
28
|
-
onSelected,
|
|
29
|
-
orientation,
|
|
30
|
-
direction,
|
|
31
|
-
selectionFollowsFocus
|
|
32
|
-
};
|
|
33
|
-
}, [
|
|
34
|
-
idPrefix,
|
|
35
|
-
value,
|
|
36
|
-
onSelected,
|
|
37
|
-
orientation,
|
|
38
|
-
direction,
|
|
39
|
-
selectionFollowsFocus
|
|
40
|
-
]);
|
|
41
|
-
return {
|
|
42
|
-
getRootProps,
|
|
43
|
-
tabsContextValue
|
|
44
|
-
};
|
|
45
|
-
};
|
|
46
|
-
export default useTabs;
|
package/Typography/Native.mjs
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import styled from "styled-components";
|
|
2
|
-
import { min } from "../styles/media";
|
|
3
|
-
export const p = `
|
|
4
|
-
margin: 0 0 1em 0;
|
|
5
|
-
`;
|
|
6
|
-
export const h1 = `
|
|
7
|
-
margin: 0 0 10px 0;
|
|
8
|
-
font-size: 30px;
|
|
9
|
-
font-weight: 800;
|
|
10
|
-
line-height: var(--headingsLineHeight);
|
|
11
|
-
${min.md} {
|
|
12
|
-
font-size: 50px;
|
|
13
|
-
}
|
|
14
|
-
`;
|
|
15
|
-
export const h2 = `
|
|
16
|
-
margin: 0 0 1em 0;
|
|
17
|
-
font-size: 24px;
|
|
18
|
-
font-weight: 800;
|
|
19
|
-
line-height: var(--headingsLineHeight);
|
|
20
|
-
`;
|
|
21
|
-
export const h3 = `
|
|
22
|
-
margin: 0 0 1em 0;
|
|
23
|
-
font-size: 20px;
|
|
24
|
-
font-weight: 600;
|
|
25
|
-
line-height: var(--headingsLineHeight);
|
|
26
|
-
`;
|
|
27
|
-
export const h4 = `
|
|
28
|
-
margin: 0 0 1em 0;
|
|
29
|
-
font-size: 13px;
|
|
30
|
-
font-weight: 600;
|
|
31
|
-
line-height: var(--headingsLineHeight);
|
|
32
|
-
`;
|
|
33
|
-
export const P = styled.div`
|
|
34
|
-
${p}
|
|
35
|
-
`;
|
|
36
|
-
export const H1 = styled.div`
|
|
37
|
-
${h1}
|
|
38
|
-
`;
|
|
39
|
-
export const H2 = styled.div`
|
|
40
|
-
${h2}
|
|
41
|
-
`;
|
|
42
|
-
export const H3 = styled.div`
|
|
43
|
-
${h3}
|
|
44
|
-
`;
|
|
45
|
-
export const H4 = styled.div`
|
|
46
|
-
${h4}
|
|
47
|
-
`;
|
package/Typography/ReadMore.mjs
DELETED
|
@@ -1,114 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { m, useSpring } from "framer-motion";
|
|
3
|
-
import React, { useMemo, useRef, useState } from "react";
|
|
4
|
-
import styled from "styled-components";
|
|
5
|
-
// import { CgArrowsExpandDownRight as IconExpand } from "react-icons/cg";
|
|
6
|
-
import { useIsomorphicLayoutEffect } from "../hooks";
|
|
7
|
-
const Root = styled.div``;
|
|
8
|
-
const Content = styled.div`
|
|
9
|
-
& p:first-child {
|
|
10
|
-
margin-top: 0;
|
|
11
|
-
}
|
|
12
|
-
`;
|
|
13
|
-
const BtnWrap = styled.span`
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: flex-end;
|
|
16
|
-
transition: transform 0.18s ease-in-out;
|
|
17
|
-
text-align: right;
|
|
18
|
-
transform: translateY(${(p)=>p.$expanded ? "0" : "-100%"});
|
|
19
|
-
opacity: ${(p)=>p.$expanded ? 0 : 1};
|
|
20
|
-
`;
|
|
21
|
-
const BtnFader = styled.div`
|
|
22
|
-
width: 30%;
|
|
23
|
-
transition: transform 0.18s ease-in-out;
|
|
24
|
-
background: linear-gradient(45deg, transparent 50%, ${(p)=>p.$bg} 70%);
|
|
25
|
-
`;
|
|
26
|
-
const Btn = styled.span`
|
|
27
|
-
padding: 0 10px 0 10px;
|
|
28
|
-
line-height: ${(p)=>p.$lineHeight ? p.$lineHeight : "inherit"};
|
|
29
|
-
background: var(--bodyBg);
|
|
30
|
-
color: var(--grey600);
|
|
31
|
-
white-space: nowrap;
|
|
32
|
-
font-size: ${(p)=>p.$fontSize}px;
|
|
33
|
-
cursor: pointer;
|
|
34
|
-
`;
|
|
35
|
-
const BtnIcon = styled.span`
|
|
36
|
-
display: inline-block;
|
|
37
|
-
margin: 0 0 0 4px;
|
|
38
|
-
transition: transform 0.18s ease-in-out;
|
|
39
|
-
${(p)=>p.$expanded ? "transform: rotate(180deg);" : ""};
|
|
40
|
-
font-size: ${(p)=>p.$fontSize}px;
|
|
41
|
-
`;
|
|
42
|
-
export const ReadMore = ({ lines = 3, lineHeight = 1.6, fontSize = 14, bg = "var(--bodyBg)", expand = "Expand", collapse = "Collapse", ...props })=>{
|
|
43
|
-
const defaultMaxHeight = lines * (lineHeight * fontSize);
|
|
44
|
-
const [expanded, setExpanded] = useState(false);
|
|
45
|
-
const [maxHeight, setMaxHeight] = useState(defaultMaxHeight);
|
|
46
|
-
const [fullHeight, setFullHeight] = useState(0);
|
|
47
|
-
const [exceeds, setExceeds] = useState(false);
|
|
48
|
-
const content = useRef(null);
|
|
49
|
-
const height = useSpring(defaultMaxHeight);
|
|
50
|
-
const styles = useMemo(()=>exceeds ? {
|
|
51
|
-
height,
|
|
52
|
-
overflow: "hidden"
|
|
53
|
-
} : {}, [
|
|
54
|
-
exceeds,
|
|
55
|
-
height
|
|
56
|
-
]);
|
|
57
|
-
const handleExpandClick = ()=>{
|
|
58
|
-
setExpanded((prevExpanded)=>!prevExpanded);
|
|
59
|
-
};
|
|
60
|
-
useIsomorphicLayoutEffect(()=>{
|
|
61
|
-
if (content.current) {
|
|
62
|
-
const elementHeight = content.current.offsetHeight;
|
|
63
|
-
const newExceeds = elementHeight > maxHeight;
|
|
64
|
-
if (!newExceeds) {
|
|
65
|
-
setMaxHeight(elementHeight);
|
|
66
|
-
}
|
|
67
|
-
setExceeds(newExceeds);
|
|
68
|
-
setFullHeight(elementHeight);
|
|
69
|
-
}
|
|
70
|
-
}, [
|
|
71
|
-
content,
|
|
72
|
-
maxHeight
|
|
73
|
-
]);
|
|
74
|
-
useIsomorphicLayoutEffect(()=>{
|
|
75
|
-
height.set(expanded ? fullHeight : maxHeight);
|
|
76
|
-
}, [
|
|
77
|
-
expanded,
|
|
78
|
-
height,
|
|
79
|
-
fullHeight,
|
|
80
|
-
maxHeight
|
|
81
|
-
]);
|
|
82
|
-
return /*#__PURE__*/ _jsxs(Root, {
|
|
83
|
-
children: [
|
|
84
|
-
/*#__PURE__*/ _jsx(m.div, {
|
|
85
|
-
style: styles,
|
|
86
|
-
children: /*#__PURE__*/ _jsx(Content, {
|
|
87
|
-
ref: content,
|
|
88
|
-
...props
|
|
89
|
-
})
|
|
90
|
-
}),
|
|
91
|
-
exceeds && /*#__PURE__*/ _jsxs(BtnWrap, {
|
|
92
|
-
$expanded: expanded,
|
|
93
|
-
children: [
|
|
94
|
-
/*#__PURE__*/ _jsx(BtnFader, {
|
|
95
|
-
$bg: bg
|
|
96
|
-
}),
|
|
97
|
-
/*#__PURE__*/ _jsxs(Btn, {
|
|
98
|
-
$fontSize: fontSize,
|
|
99
|
-
$lineHeight: lineHeight,
|
|
100
|
-
onClick: handleExpandClick,
|
|
101
|
-
"aria-expanded": expanded,
|
|
102
|
-
"aria-label": expanded ? collapse : expand,
|
|
103
|
-
children: [
|
|
104
|
-
expanded ? collapse : expand,
|
|
105
|
-
/*#__PURE__*/ _jsx(BtnIcon, {
|
|
106
|
-
$expanded: expanded
|
|
107
|
-
})
|
|
108
|
-
]
|
|
109
|
-
})
|
|
110
|
-
]
|
|
111
|
-
})
|
|
112
|
-
]
|
|
113
|
-
});
|
|
114
|
-
};
|