@koine/react 1.1.10 → 1.1.12
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 +12 -8
- package/Alert/Alert.mjs +10 -0
- package/Alert/index.js +4 -1
- package/Alert/index.mjs +1 -0
- package/Alert/package.json +2 -2
- package/Animations/Reveal.js +18 -14
- package/Animations/Reveal.mjs +17 -0
- package/Animations/Underline.js +7 -4
- package/Animations/Underline.mjs +5 -0
- package/Animations/index.js +6 -3
- package/Animations/index.mjs +3 -0
- package/Animations/package.json +2 -2
- package/Animations/useReveal.js +11 -7
- package/{node/Animations/useReveal.js → Animations/useReveal.mjs} +7 -11
- package/Autocomplete/AutocompleteDownshift.js +4 -1
- package/{node/Autocomplete/AutocompleteDownshift.js → Autocomplete/AutocompleteDownshift.mjs} +1 -4
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +4 -1
- package/{node/Autocomplete/AutocompleteDownshiftMultiselect.js → Autocomplete/AutocompleteDownshiftMultiselect.mjs} +1 -4
- package/Autocomplete/AutocompleteMui.js +33 -35
- package/{node/Autocomplete/AutocompleteMui.js → Autocomplete/AutocompleteMui.mjs} +35 -33
- package/Autocomplete/AutocompleteReach.js +4 -1
- package/{node/Autocomplete/AutocompleteReach.js → Autocomplete/AutocompleteReach.mjs} +1 -4
- package/Autocomplete/components.js +25 -22
- package/Autocomplete/components.mjs +34 -0
- package/Autocomplete/helpers.js +11 -6
- package/{node/Autocomplete/helpers.js → Autocomplete/helpers.mjs} +6 -11
- package/Autocomplete/index.js +5 -1
- package/Autocomplete/index.mjs +3 -0
- package/Autocomplete/package.json +2 -2
- package/Bg/BgColor.js +14 -10
- package/Bg/BgColor.mjs +21 -0
- package/Bg/BgPhoto.js +13 -9
- package/Bg/BgPhoto.mjs +16 -0
- package/Bg/BgSvg.js +10 -6
- package/Bg/BgSvg.mjs +12 -0
- package/Bg/index.js +6 -3
- package/Bg/index.mjs +3 -0
- package/Bg/package.json +2 -2
- package/Breadcrumbs/Breadcrumbs.js +22 -18
- package/Breadcrumbs/Breadcrumbs.mjs +27 -0
- package/Breadcrumbs/index.js +4 -1
- package/Breadcrumbs/index.mjs +1 -0
- package/Breadcrumbs/package.json +2 -2
- package/Buttons/Button.js +12 -9
- package/Buttons/Button.mjs +14 -0
- package/Buttons/ButtonComposite.js +20 -16
- package/Buttons/ButtonComposite.mjs +28 -0
- package/Buttons/ButtonFab.js +8 -5
- package/Buttons/ButtonFab.mjs +6 -0
- package/Buttons/ButtonLink.js +12 -8
- package/Buttons/ButtonLink.mjs +11 -0
- package/Buttons/IconButton.js +9 -6
- package/Buttons/IconButton.mjs +7 -0
- package/Buttons/index.js +8 -5
- package/Buttons/index.mjs +5 -0
- package/Buttons/package.json +2 -2
- package/Calendar/CalendarDaygridCell.js +16 -12
- package/{node/Calendar/CalendarDaygridCell.js → Calendar/CalendarDaygridCell.mjs} +12 -16
- package/Calendar/CalendarDaygridNav.js +14 -9
- package/Calendar/CalendarDaygridNav.mjs +23 -0
- package/Calendar/CalendarDaygridTable.js +23 -19
- package/{node/Calendar/CalendarDaygridTable.js → Calendar/CalendarDaygridTable.mjs} +19 -23
- package/Calendar/CalendarLegend.js +9 -5
- package/Calendar/CalendarLegend.mjs +16 -0
- package/Calendar/calendar-api-google.js +27 -23
- package/{node/Calendar/calendar-api-google.js → Calendar/calendar-api-google.mjs} +23 -27
- package/Calendar/index.js +9 -6
- package/Calendar/index.mjs +6 -0
- package/Calendar/package.json +2 -2
- package/Calendar/types.js +2 -1
- package/Calendar/types.mjs +1 -0
- package/Calendar/useCalendar.js +43 -39
- package/{node/Calendar/useCalendar.js → Calendar/useCalendar.mjs} +39 -43
- package/Calendar/utils.js +44 -31
- package/{node/Calendar/utils.js → Calendar/utils.mjs} +31 -44
- package/Carousel/Carousel.js +4 -1
- package/{node/Carousel/Carousel.js → Carousel/Carousel.mjs} +1 -4
- package/Carousel/CarouselCss.d.ts +6 -1
- package/Carousel/CarouselCss.js +17 -13
- package/Carousel/CarouselCss.mjs +22 -0
- package/Carousel/index.js +4 -1
- package/Carousel/index.mjs +1 -0
- package/Carousel/package.json +2 -2
- package/Collapsable/Collapsable.js +4 -1
- package/Collapsable/Collapsable.mjs +1 -0
- package/{node/Collapsable/CollapsableReach.js → Collapsable/CollapsableReach.mjs} +0 -0
- package/Collapsable/index.js +4 -1
- package/Collapsable/index.mjs +2 -0
- package/Collapsable/package.json +2 -2
- package/Debug/Debug.js +10 -6
- package/Debug/Debug.mjs +9 -0
- package/Debug/index.js +4 -1
- package/Debug/index.mjs +1 -0
- package/Debug/package.json +2 -2
- package/Details/Details.d.ts +298 -13
- package/Details/Details.js +30 -27
- package/Details/Details.mjs +63 -0
- package/Details/index.js +4 -1
- package/Details/index.mjs +1 -0
- package/Details/package.json +2 -2
- package/Dialog/DialogMui.d.ts +328 -19
- package/Dialog/DialogMui.js +28 -25
- package/{node/Dialog/DialogMui.js → Dialog/DialogMui.mjs} +25 -28
- package/Dialog/css/bare.d.ts +352 -43
- package/Dialog/css/bare.js +21 -18
- package/Dialog/css/bare.mjs +21 -0
- package/Dialog/index.js +5 -1
- package/Dialog/index.mjs +1 -0
- package/Dialog/m/bare.d.ts +322 -13
- package/Dialog/m/bare.js +26 -23
- package/Dialog/m/bare.mjs +52 -0
- package/Dialog/m/basic.js +7 -3
- package/{node/Dialog/m/basic.js → Dialog/m/basic.mjs} +3 -7
- package/Dialog/m/index.js +7 -3
- package/Dialog/m/index.mjs +4 -0
- package/Dialog/m/package.json +2 -2
- package/Dialog/package.json +2 -2
- package/Dialog/sc/bare.d.ts +325 -17
- package/Dialog/sc/bare.js +24 -21
- package/Dialog/sc/bare.mjs +43 -0
- package/Dialog/sc/framer.d.ts +316 -7
- package/Dialog/sc/framer.js +18 -15
- package/Dialog/sc/framer.mjs +16 -0
- package/Dialog/sc/framerMaterial.d.ts +316 -7
- package/Dialog/sc/framerMaterial.js +18 -15
- package/Dialog/sc/framerMaterial.mjs +16 -0
- package/Dialog/sc/material.d.ts +325 -16
- package/Dialog/sc/material.js +22 -19
- package/Dialog/sc/material.mjs +21 -0
- package/Dialog/tw/bare.d.ts +358 -49
- package/Dialog/tw/bare.js +21 -18
- package/Dialog/tw/bare.mjs +42 -0
- package/Dialog/tw/elegant.d.ts +379 -70
- package/Dialog/tw/elegant.js +21 -18
- package/Dialog/tw/elegant.mjs +20 -0
- package/Dialog/tw/framer.d.ts +340 -31
- package/Dialog/tw/framer.js +18 -15
- package/Dialog/tw/framer.mjs +16 -0
- package/Dialog/tw/framerMaterial.d.ts +356 -47
- package/Dialog/tw/framerMaterial.js +18 -15
- package/Dialog/tw/framerMaterial.mjs +16 -0
- package/Dialog/tw/material.d.ts +379 -70
- package/Dialog/tw/material.js +21 -18
- package/Dialog/tw/material.mjs +20 -0
- package/Editor/Editor--tiptap.js +20 -15
- package/Editor/Editor--tiptap.mjs +26 -0
- package/Editor/components.js +14 -9
- package/Editor/components.mjs +10 -0
- package/Editor/index.js +4 -1
- package/Editor/index.mjs +1 -0
- package/Editor/package.json +2 -2
- package/FaviconTags/FaviconTags.js +8 -4
- package/FaviconTags/FaviconTags.mjs +16 -0
- package/FaviconTags/index.js +7 -2
- package/FaviconTags/index.mjs +2 -0
- package/FaviconTags/package.json +2 -2
- package/Form/Form.d.ts +45 -19
- package/Form/Form.js +27 -23
- package/Form/Form.mjs +61 -0
- package/Form/index.js +4 -1
- package/Form/index.mjs +1 -0
- package/Form/package.json +2 -2
- package/Form/sc/bare.d.ts +33 -8
- package/Form/sc/bare.js +21 -18
- package/Form/sc/bare.mjs +20 -0
- package/Forms/Checkbox/Checkbox.d.ts +1 -1
- package/Forms/Checkbox/Checkbox.js +16 -13
- package/Forms/Checkbox/Checkbox.mjs +18 -0
- package/Forms/Checkbox/index.js +4 -1
- package/Forms/Checkbox/index.mjs +1 -0
- package/Forms/Checkbox/package.json +2 -2
- package/Forms/Feedback/Feedback.js +10 -6
- package/Forms/Feedback/Feedback.mjs +9 -0
- package/Forms/Feedback/index.js +4 -1
- package/Forms/Feedback/index.mjs +1 -0
- package/Forms/Feedback/package.json +2 -2
- package/Forms/Field/Field.js +14 -10
- package/Forms/Field/Field.mjs +31 -0
- package/Forms/Field/FieldControl.js +18 -14
- package/Forms/Field/FieldControl.mjs +47 -0
- package/Forms/Field/FieldHint.js +6 -3
- package/Forms/Field/FieldHint.mjs +4 -0
- package/Forms/Field/index.js +5 -2
- package/Forms/Field/index.mjs +2 -0
- package/Forms/Field/package.json +2 -2
- package/Forms/Input/Input.d.ts +1 -1
- package/Forms/Input/Input.js +17 -14
- package/Forms/Input/Input.mjs +17 -0
- package/Forms/Input/index.js +4 -1
- package/Forms/Input/index.mjs +1 -0
- package/Forms/Input/package.json +2 -2
- package/Forms/InputGroup/InputGroup.js +17 -13
- package/Forms/InputGroup/InputGroup.mjs +15 -0
- package/Forms/InputGroup/index.js +4 -1
- package/Forms/InputGroup/index.mjs +1 -0
- package/Forms/InputGroup/package.json +2 -2
- package/Forms/Label/Label.js +8 -5
- package/Forms/Label/Label.mjs +6 -0
- package/Forms/Label/index.js +4 -1
- package/Forms/Label/index.mjs +1 -0
- package/Forms/Label/package.json +2 -2
- package/Forms/Password/Password.d.ts +1 -1
- package/Forms/Password/Password.js +17 -14
- package/Forms/Password/Password.mjs +17 -0
- package/Forms/Password/index.js +4 -1
- package/Forms/Password/index.mjs +1 -0
- package/Forms/Password/package.json +2 -2
- package/Forms/Radio/Radio.d.ts +1 -1
- package/Forms/Radio/Radio.js +22 -19
- package/Forms/Radio/Radio.mjs +25 -0
- package/Forms/Radio/index.js +4 -1
- package/Forms/Radio/index.mjs +1 -0
- package/Forms/Radio/package.json +2 -2
- package/Forms/Switch/Switch.d.ts +1 -1
- package/Forms/Switch/Switch.js +16 -13
- package/Forms/Switch/Switch.mjs +20 -0
- package/Forms/Switch/index.js +4 -1
- package/Forms/Switch/index.mjs +1 -0
- package/Forms/Switch/package.json +2 -2
- package/Forms/Textarea/Textarea.d.ts +1 -1
- package/Forms/Textarea/Textarea.js +13 -10
- package/Forms/Textarea/Textarea.mjs +12 -0
- package/Forms/Textarea/TextareaRich.d.ts +1 -1
- package/Forms/Textarea/TextareaRich.js +15 -12
- package/Forms/Textarea/TextareaRich.mjs +28 -0
- package/Forms/Textarea/index.js +5 -2
- package/Forms/Textarea/index.mjs +2 -0
- package/Forms/Textarea/package.json +2 -2
- package/{node/Forms/Toggle/Toggle-tailwind.js → Forms/Toggle/Toggle-tailwind.mjs} +0 -0
- package/Forms/Toggle/Toggle.js +26 -21
- package/Forms/Toggle/Toggle.mjs +31 -0
- package/Forms/Toggle/index.js +4 -1
- package/Forms/Toggle/index.mjs +1 -0
- package/Forms/Toggle/package.json +2 -2
- package/{node/Forms/Toggle/useToggle-tailwind.js → Forms/Toggle/useToggle-tailwind.mjs} +0 -0
- package/Forms/Toggle/useToggle.js +19 -15
- package/{node/Forms/Toggle/useToggle.js → Forms/Toggle/useToggle.mjs} +15 -19
- package/Forms/antispam.js +16 -10
- package/{node/Forms/antispam.js → Forms/antispam.mjs} +10 -16
- package/Forms/helpers.js +16 -8
- package/{node/Forms/helpers.js → Forms/helpers.mjs} +8 -16
- package/Forms/index.js +18 -15
- package/Forms/index.mjs +16 -0
- package/Forms/package.json +2 -2
- package/Forms/styles.js +19 -16
- package/Forms/styles.mjs +29 -0
- package/Gauge/Gauge.js +5 -1
- package/{node/Gauge/Gauge.js → Gauge/Gauge.mjs} +1 -5
- package/Grid/Grid.js +13 -10
- package/Grid/Grid.mjs +53 -0
- package/Grid/index.js +4 -1
- package/Grid/index.mjs +1 -0
- package/Grid/package.json +2 -2
- package/Hamburger/Hamburger.js +11 -7
- package/Hamburger/Hamburger.mjs +52 -0
- package/Hamburger/index.js +4 -1
- package/Hamburger/index.mjs +1 -0
- package/Hamburger/package.json +2 -2
- package/Header/index.js +4 -1
- package/Header/index.mjs +1 -0
- package/Header/package.json +2 -2
- package/Header/useHeader.js +18 -14
- package/Header/useHeader.mjs +31 -0
- package/Hidden/Hidden.js +6 -3
- package/Hidden/Hidden.mjs +10 -0
- package/Hidden/index.js +4 -1
- package/Hidden/index.mjs +1 -0
- package/Hidden/package.json +2 -2
- package/Img/index.js +4 -1
- package/Img/index.mjs +1 -0
- package/Img/package.json +2 -2
- package/Img/sc/bare.js +6 -3
- package/{node/Img/sc/bare.js → Img/sc/bare.mjs} +3 -6
- package/Img/types.js +2 -1
- package/Img/types.mjs +1 -0
- package/Link/Link.d.ts +1 -1
- package/Link/Link.js +6 -3
- package/Link/Link.mjs +4 -0
- package/Link/LinkBlank.js +15 -11
- package/Link/LinkBlank.mjs +17 -0
- package/Link/index.js +5 -2
- package/Link/index.mjs +2 -0
- package/Link/package.json +2 -2
- package/Menu/Menu.js +6 -3
- package/Menu/Menu.mjs +4 -0
- package/Menu/MenuMui.d.ts +0 -35
- package/Menu/MenuMui.js +165 -75
- package/Menu/MenuMui.mjs +165 -0
- package/Menu/index.js +4 -1
- package/Menu/index.mjs +1 -0
- package/Menu/package.json +2 -2
- package/MenuItem/MenuItem.js +6 -3
- package/MenuItem/MenuItem.mjs +4 -0
- package/MenuItem/MenuItemMui.d.ts +0 -6
- package/MenuItem/MenuItemMui.js +32 -15
- package/MenuItem/MenuItemMui.mjs +32 -0
- package/MenuItem/index.js +4 -1
- package/MenuItem/index.mjs +1 -0
- package/MenuItem/package.json +2 -2
- package/MenuItem/useMenuItem.js +20 -16
- package/{node/MenuItem/useMenuItem.js → MenuItem/useMenuItem.mjs} +16 -20
- package/Meta/Meta.js +8 -4
- package/Meta/Meta.mjs +6 -0
- package/Meta/index.js +7 -2
- package/Meta/index.mjs +2 -0
- package/Meta/package.json +2 -2
- package/NoJs/NoJs.js +8 -4
- package/NoJs/NoJs.mjs +7 -0
- package/NoJs/index.js +7 -2
- package/NoJs/index.mjs +2 -0
- package/NoJs/package.json +2 -2
- package/Pagination/PaginationNav.js +22 -18
- package/Pagination/PaginationNav.mjs +61 -0
- package/Pagination/PaginationResults.js +12 -8
- package/Pagination/PaginationResults.mjs +11 -0
- package/Pagination/index.js +5 -2
- package/Pagination/index.mjs +2 -0
- package/Pagination/package.json +2 -2
- package/Pill/Pill.js +9 -6
- package/Pill/Pill.mjs +7 -0
- package/Pill/index.js +4 -1
- package/Pill/index.mjs +1 -0
- package/Pill/package.json +2 -2
- package/Progress/ProgressCircular.js +14 -10
- package/Progress/ProgressCircular.mjs +15 -0
- package/Progress/ProgressLinear.js +13 -9
- package/Progress/ProgressLinear.mjs +24 -0
- package/Progress/ProgressOverlay.js +20 -16
- package/Progress/ProgressOverlay.mjs +24 -0
- package/Progress/index.js +6 -3
- package/Progress/index.mjs +3 -0
- package/Progress/package.json +2 -2
- package/Rating/Rating.js +26 -21
- package/Rating/Rating.mjs +70 -0
- package/Rating/index.js +13 -5
- package/{node/Rating/index.js → Rating/index.mjs} +5 -13
- package/Rating/package.json +2 -2
- package/Select/SelectDownshift.js +4 -1
- package/{node/Select/SelectDownshift.js → Select/SelectDownshift.mjs} +1 -4
- package/Select/components.js +13 -10
- package/Select/components.mjs +12 -0
- package/Select/index.js +5 -1
- package/Select/index.mjs +3 -0
- package/Select/package.json +2 -2
- package/Sidebar/Sidebar.js +21 -17
- package/Sidebar/Sidebar.mjs +23 -0
- package/Sidebar/index.js +4 -1
- package/Sidebar/index.mjs +1 -0
- package/Sidebar/package.json +2 -2
- package/Spacing/Spacing.js +15 -11
- package/Spacing/Spacing.mjs +45 -0
- package/Spacing/index.js +4 -1
- package/Spacing/index.mjs +1 -0
- package/Spacing/package.json +2 -2
- package/Sticky/Sticky.js +4 -1
- package/{node/Sticky/Sticky.js → Sticky/Sticky.mjs} +1 -4
- package/Sticky/StickyCss.js +9 -5
- package/Sticky/StickyCss.mjs +6 -0
- package/Sticky/index.js +4 -1
- package/Sticky/index.mjs +1 -0
- package/Sticky/package.json +2 -2
- package/Tabs/TabsMui.d.ts +287 -55
- package/Tabs/TabsMui.js +28 -25
- package/Tabs/TabsMui.mjs +46 -0
- package/Tabs/index.js +4 -1
- package/Tabs/index.mjs +1 -0
- package/Tabs/package.json +2 -2
- package/{node/Tabs/sc/bare.js → Tabs/sc/bare.mjs} +0 -0
- package/Tabs/tw/bare.d.ts +311 -80
- package/Tabs/tw/bare.js +17 -14
- package/Tabs/tw/bare.mjs +17 -0
- package/Tabs/tw/material.d.ts +326 -136
- package/Tabs/tw/material.js +17 -14
- package/Tabs/tw/material.mjs +18 -0
- package/Tabs/useTabs.js +12 -8
- package/{node/Tabs/useTabs.js → Tabs/useTabs.mjs} +8 -12
- package/Typography/CopyPasteVisible.js +6 -3
- package/Typography/CopyPasteVisible.mjs +4 -0
- package/Typography/Native.js +16 -13
- package/Typography/Native.mjs +14 -0
- package/Typography/ReadMore.js +28 -24
- package/Typography/ReadMore.mjs +43 -0
- package/Typography/TextLoop.js +21 -16
- package/{node/Typography/TextLoop.js → Typography/TextLoop.mjs} +16 -21
- package/Typography/TypeStairs.js +11 -8
- package/{node/Typography/TypeStairs.js → Typography/TypeStairs.mjs} +8 -11
- package/Typography/index.js +8 -5
- package/Typography/index.mjs +5 -0
- package/Typography/package.json +2 -2
- package/css/index.js +7 -2
- package/{node/tw/index.js → css/index.mjs} +2 -7
- package/css/package.json +2 -2
- package/helpers/classed.js +10 -6
- package/{node/helpers/classed.js → helpers/classed.mjs} +6 -10
- package/helpers/createUseMediaQueryWidth.js +16 -11
- package/{node/helpers/createUseMediaQueryWidth.js → helpers/createUseMediaQueryWidth.mjs} +11 -16
- package/helpers/extend-component.js +10 -6
- package/helpers/extend-component.mjs +13 -0
- package/helpers/index.js +7 -4
- package/helpers/index.mjs +4 -0
- package/helpers/mergeRefs.js +6 -2
- package/{node/helpers/mergeRefs.js → helpers/mergeRefs.mjs} +2 -6
- package/helpers/package.json +2 -2
- package/hooks/index.js +24 -21
- package/hooks/index.mjs +22 -0
- package/hooks/package.json +2 -2
- package/hooks/types.js +2 -1
- package/hooks/types.mjs +1 -0
- package/hooks/useAsyncFn.js +14 -10
- package/{node/hooks/useAsyncFn.js → hooks/useAsyncFn.mjs} +10 -14
- package/hooks/useDateLocale.js +14 -12
- package/{node/hooks/useDateLocale.js → hooks/useDateLocale.mjs} +10 -17
- package/hooks/useEffectOnce.js +8 -4
- package/hooks/useEffectOnce.mjs +9 -0
- package/hooks/useFirstMountState.js +8 -4
- package/hooks/useFirstMountState.mjs +13 -0
- package/hooks/useFixedOffset.js +21 -16
- package/hooks/useFixedOffset.mjs +57 -0
- package/hooks/useFocus.js +8 -4
- package/hooks/useFocus.mjs +12 -0
- package/hooks/useInterval.js +14 -10
- package/{node/hooks/useInterval.js → hooks/useInterval.mjs} +10 -14
- package/hooks/useIsomorphicLayoutEffect.js +10 -6
- package/hooks/useIsomorphicLayoutEffect.mjs +9 -0
- package/hooks/useKeyUp.js +12 -8
- package/{node/hooks/useKeyUp.js → hooks/useKeyUp.mjs} +8 -12
- package/hooks/useMeasure.js +30 -26
- package/{node/hooks/useMeasure.js → hooks/useMeasure.mjs} +26 -30
- package/hooks/useMount.js +8 -4
- package/hooks/useMount.mjs +10 -0
- package/hooks/useMountedState.js +10 -6
- package/hooks/useMountedState.mjs +16 -0
- package/hooks/useNavigateAway.js +13 -8
- package/{node/hooks/useNavigateAway.js → hooks/useNavigateAway.mjs} +8 -13
- package/hooks/usePrevious.js +8 -4
- package/hooks/usePrevious.mjs +12 -0
- package/hooks/usePreviousRef.js +9 -5
- package/hooks/usePreviousRef.mjs +9 -0
- package/hooks/useScrollPosition.js +16 -11
- package/{node/hooks/useScrollPosition.js → hooks/useScrollPosition.mjs} +11 -16
- package/hooks/useScrollThreshold.js +15 -10
- package/hooks/useScrollThreshold.mjs +28 -0
- package/hooks/useScrollTo.js +11 -6
- package/hooks/useScrollTo.mjs +22 -0
- package/hooks/useSmoothScroll.js +18 -13
- package/hooks/useSmoothScroll.mjs +39 -0
- package/hooks/useTraceUpdate.js +9 -5
- package/{node/hooks/useTraceUpdate.js → hooks/useTraceUpdate.mjs} +5 -9
- package/hooks/useUpdateEffect.js +10 -6
- package/hooks/useUpdateEffect.mjs +15 -0
- package/hooks/useWindowSize.js +15 -10
- package/hooks/useWindowSize.mjs +29 -0
- package/index.js +4 -1
- package/{node/index.js → index.mjs} +1 -4
- package/m/MotionProvider.js +10 -6
- package/{node/m/MotionProvider.js → m/MotionProvider.mjs} +6 -10
- package/m/index.js +4 -1
- package/m/index.mjs +6 -0
- package/m/lite.js +4 -2
- package/m/lite.mjs +2 -0
- package/m/max.js +4 -2
- package/m/max.mjs +2 -0
- package/m/package.json +2 -2
- package/package.json +26 -22
- package/sc/index.js +36 -30
- package/sc/index.mjs +31 -0
- package/sc/package.json +2 -2
- package/scm/index.js +34 -29
- package/scm/index.mjs +31 -0
- package/scm/package.json +2 -2
- package/shared/index.js +11 -8
- package/shared/index.mjs +8 -0
- package/shared/package.json +2 -2
- package/styles/Body.js +7 -4
- package/styles/Body.mjs +13 -0
- package/styles/Global.js +7 -4
- package/styles/Global.mjs +18 -0
- package/styles/index.js +10 -7
- package/styles/index.mjs +7 -0
- package/styles/media.js +13 -8
- package/{node/styles/media.js → styles/media.mjs} +8 -13
- package/styles/package.json +2 -2
- package/styles/spacing.js +11 -4
- package/{node/styles/spacing.js → styles/spacing.mjs} +4 -11
- package/styles/styled.js +11 -7
- package/styles/styled.mjs +13 -0
- package/styles/theme--vanilla.js +32 -26
- package/styles/theme--vanilla.mjs +58 -0
- package/styles/theme.js +12 -8
- package/{node/styles/theme.js → styles/theme.mjs} +8 -12
- package/tw/index.js +7 -2
- package/{node/css/index.js → tw/index.mjs} +2 -7
- package/tw/package.json +2 -2
- package/twm/index.js +7 -2
- package/{node/twm/index.js → twm/index.mjs} +2 -7
- package/twm/package.json +2 -2
- package/types.js +2 -1
- package/types.mjs +1 -0
- package/node/Alert/Alert.js +0 -14
- package/node/Alert/index.js +0 -4
- package/node/Animations/Reveal.js +0 -21
- package/node/Animations/Underline.js +0 -8
- package/node/Animations/index.js +0 -6
- package/node/Autocomplete/components.js +0 -37
- package/node/Autocomplete/index.js +0 -7
- package/node/Bg/BgColor.js +0 -25
- package/node/Bg/BgPhoto.js +0 -20
- package/node/Bg/BgSvg.js +0 -16
- package/node/Bg/index.js +0 -6
- package/node/Breadcrumbs/Breadcrumbs.js +0 -31
- package/node/Breadcrumbs/index.js +0 -4
- package/node/Buttons/Button.js +0 -17
- package/node/Buttons/ButtonComposite.js +0 -32
- package/node/Buttons/ButtonFab.js +0 -9
- package/node/Buttons/ButtonLink.js +0 -15
- package/node/Buttons/IconButton.js +0 -10
- package/node/Buttons/index.js +0 -8
- package/node/Calendar/CalendarDaygridNav.js +0 -28
- package/node/Calendar/CalendarLegend.js +0 -20
- package/node/Calendar/index.js +0 -9
- package/node/Calendar/types.js +0 -2
- package/node/Carousel/CarouselCss.js +0 -26
- package/node/Carousel/index.js +0 -4
- package/node/Collapsable/Collapsable.js +0 -4
- package/node/Collapsable/index.js +0 -5
- package/node/Debug/Debug.js +0 -13
- package/node/Debug/index.js +0 -4
- package/node/Details/Details.js +0 -66
- package/node/Details/index.js +0 -4
- package/node/Dialog/css/bare.js +0 -24
- package/node/Dialog/index.js +0 -5
- package/node/Dialog/m/bare.js +0 -55
- package/node/Dialog/m/index.js +0 -8
- package/node/Dialog/sc/bare.js +0 -46
- package/node/Dialog/sc/framer.js +0 -19
- package/node/Dialog/sc/framerMaterial.js +0 -19
- package/node/Dialog/sc/material.js +0 -24
- package/node/Dialog/tw/bare.js +0 -45
- package/node/Dialog/tw/elegant.js +0 -23
- package/node/Dialog/tw/framer.js +0 -19
- package/node/Dialog/tw/framerMaterial.js +0 -19
- package/node/Dialog/tw/material.js +0 -23
- package/node/Editor/Editor--tiptap.js +0 -31
- package/node/Editor/components.js +0 -15
- package/node/Editor/index.js +0 -4
- package/node/FaviconTags/FaviconTags.js +0 -20
- package/node/FaviconTags/index.js +0 -7
- package/node/Form/Form.js +0 -65
- package/node/Form/index.js +0 -4
- package/node/Form/sc/bare.js +0 -23
- package/node/Forms/Checkbox/Checkbox.js +0 -21
- package/node/Forms/Checkbox/index.js +0 -4
- package/node/Forms/Feedback/Feedback.js +0 -13
- package/node/Forms/Feedback/index.js +0 -4
- package/node/Forms/Field/Field.js +0 -35
- package/node/Forms/Field/FieldControl.js +0 -51
- package/node/Forms/Field/FieldHint.js +0 -7
- package/node/Forms/Field/index.js +0 -5
- package/node/Forms/Input/Input.js +0 -20
- package/node/Forms/Input/index.js +0 -4
- package/node/Forms/InputGroup/InputGroup.js +0 -19
- package/node/Forms/InputGroup/index.js +0 -4
- package/node/Forms/Label/Label.js +0 -9
- package/node/Forms/Label/index.js +0 -4
- package/node/Forms/Password/Password.js +0 -20
- package/node/Forms/Password/index.js +0 -4
- package/node/Forms/Radio/Radio.js +0 -28
- package/node/Forms/Radio/index.js +0 -4
- package/node/Forms/Switch/Switch.js +0 -23
- package/node/Forms/Switch/index.js +0 -4
- package/node/Forms/Textarea/Textarea.js +0 -15
- package/node/Forms/Textarea/TextareaRich.js +0 -31
- package/node/Forms/Textarea/index.js +0 -5
- package/node/Forms/Toggle/Toggle.js +0 -36
- package/node/Forms/Toggle/index.js +0 -4
- package/node/Forms/index.js +0 -19
- package/node/Forms/styles.js +0 -32
- package/node/Grid/Grid.js +0 -56
- package/node/Grid/index.js +0 -4
- package/node/Hamburger/Hamburger.js +0 -56
- package/node/Hamburger/index.js +0 -4
- package/node/Header/index.js +0 -4
- package/node/Header/useHeader.js +0 -35
- package/node/Hidden/Hidden.js +0 -13
- package/node/Hidden/index.js +0 -4
- package/node/Img/index.js +0 -4
- package/node/Img/types.js +0 -2
- package/node/Link/Link.js +0 -7
- package/node/Link/LinkBlank.js +0 -21
- package/node/Link/index.js +0 -5
- package/node/Menu/Menu.js +0 -7
- package/node/Menu/MenuMui.js +0 -78
- package/node/Menu/index.js +0 -4
- package/node/MenuItem/MenuItem.js +0 -7
- package/node/MenuItem/MenuItemMui.js +0 -18
- package/node/MenuItem/index.js +0 -4
- package/node/Meta/Meta.js +0 -10
- package/node/Meta/index.js +0 -7
- package/node/NoJs/NoJs.js +0 -11
- package/node/NoJs/index.js +0 -7
- package/node/Pagination/PaginationNav.js +0 -65
- package/node/Pagination/PaginationResults.js +0 -15
- package/node/Pagination/index.js +0 -5
- package/node/Pill/Pill.js +0 -10
- package/node/Pill/index.js +0 -4
- package/node/Progress/ProgressCircular.js +0 -19
- package/node/Progress/ProgressLinear.js +0 -28
- package/node/Progress/ProgressOverlay.js +0 -28
- package/node/Progress/index.js +0 -6
- package/node/Rating/Rating.js +0 -75
- package/node/Select/components.js +0 -15
- package/node/Select/index.js +0 -7
- package/node/Sidebar/Sidebar.js +0 -27
- package/node/Sidebar/index.js +0 -4
- package/node/Spacing/Spacing.js +0 -49
- package/node/Spacing/index.js +0 -4
- package/node/Sticky/StickyCss.js +0 -10
- package/node/Sticky/index.js +0 -4
- package/node/Tabs/TabsMui.js +0 -49
- package/node/Tabs/index.js +0 -4
- package/node/Tabs/tw/bare.js +0 -20
- package/node/Tabs/tw/material.js +0 -21
- package/node/Typography/CopyPasteVisible.js +0 -7
- package/node/Typography/Native.js +0 -17
- package/node/Typography/ReadMore.js +0 -47
- package/node/Typography/index.js +0 -8
- package/node/helpers/extend-component.js +0 -17
- package/node/helpers/index.js +0 -7
- package/node/hooks/index.js +0 -25
- package/node/hooks/types.js +0 -2
- package/node/hooks/useEffectOnce.js +0 -13
- package/node/hooks/useFirstMountState.js +0 -17
- package/node/hooks/useFixedOffset.js +0 -62
- package/node/hooks/useFocus.js +0 -16
- package/node/hooks/useIsomorphicLayoutEffect.js +0 -13
- package/node/hooks/useMount.js +0 -14
- package/node/hooks/useMountedState.js +0 -20
- package/node/hooks/usePrevious.js +0 -16
- package/node/hooks/usePreviousRef.js +0 -13
- package/node/hooks/useScrollThreshold.js +0 -33
- package/node/hooks/useScrollTo.js +0 -27
- package/node/hooks/useSmoothScroll.js +0 -44
- package/node/hooks/useUpdateEffect.js +0 -19
- package/node/hooks/useWindowSize.js +0 -34
- package/node/m/index.js +0 -9
- package/node/m/lite.js +0 -4
- package/node/m/max.js +0 -4
- package/node/sc/index.js +0 -37
- package/node/scm/index.js +0 -36
- package/node/shared/index.js +0 -11
- package/node/styles/Body.js +0 -16
- package/node/styles/Global.js +0 -21
- package/node/styles/index.js +0 -10
- package/node/styles/styled.js +0 -17
- package/node/styles/theme--vanilla.js +0 -64
- package/node/types.js +0 -2
package/Menu/MenuMui.mjs
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React, { forwardRef, useId, useMemo, useRef, useState } from "react";
|
|
3
|
+
// import { unstable_useEventCallback as useEventCallback } from "@mui/utils";
|
|
4
|
+
// import {
|
|
5
|
+
// motion as m,
|
|
6
|
+
// AnimatePresence,
|
|
7
|
+
// type HTMLMotionProps,
|
|
8
|
+
// } from "framer-motion";
|
|
9
|
+
// import {
|
|
10
|
+
// useMenu,
|
|
11
|
+
// MenuUnstyledContext,
|
|
12
|
+
// type MenuUnstyledContextType,
|
|
13
|
+
// type MenuUnstyledActions,
|
|
14
|
+
// } from "@mui/base/MenuUnstyled";
|
|
15
|
+
// import ModalUnstyled from "@mui/base/ModalUnstyled";
|
|
16
|
+
// import ClickAwayListener from "@mui/base/ClickAwayListener";
|
|
17
|
+
// import { usePopper, type PopperChildrenProps } from "react-popper";
|
|
18
|
+
// import clsx from "@koine/utils/clsx";
|
|
19
|
+
// const MenuRoot = m.div;
|
|
20
|
+
// const MenuBackdrop = () => <div className="fixed inset-0" />;
|
|
21
|
+
// /**
|
|
22
|
+
// * Props we control, cannot be overriden from implementers
|
|
23
|
+
// */
|
|
24
|
+
// type MenuButtonOwnProps = {
|
|
25
|
+
// "aria-controls"?: string;
|
|
26
|
+
// "aria-haspopup": true | "true";
|
|
27
|
+
// "aria-expanded"?: true | "true";
|
|
28
|
+
// onClick: (event: React.MouseEvent<HTMLButtonElement>) => unknown;
|
|
29
|
+
// onKeyDown: (event: React.KeyboardEvent<HTMLButtonElement>) => unknown;
|
|
30
|
+
// };
|
|
31
|
+
// type MenuButtonProps = Omit<
|
|
32
|
+
// React.ComponentPropsWithRef<"button">,
|
|
33
|
+
// keyof MenuButtonOwnProps
|
|
34
|
+
// > &
|
|
35
|
+
// MenuButtonOwnProps;
|
|
36
|
+
// export type MenuItemsProps = {
|
|
37
|
+
// /**
|
|
38
|
+
// * Closes the parent menu
|
|
39
|
+
// */
|
|
40
|
+
// close: () => unknown;
|
|
41
|
+
// };
|
|
42
|
+
// /**
|
|
43
|
+
// * Props we control, cannot be overriden from implementers
|
|
44
|
+
// */
|
|
45
|
+
// type MenuOwnProps = ReturnType<typeof useMenu>["getListboxProps"] & {
|
|
46
|
+
// onKeyDown: (event: React.KeyboardEvent) => unknown;
|
|
47
|
+
// style: React.StyleHTMLAttributes<HTMLDivElement>;
|
|
48
|
+
// };
|
|
49
|
+
// export type MenuProps = Omit<
|
|
50
|
+
// Omit<HTMLMotionProps<"div">, "children"> & {
|
|
51
|
+
// placement?: PopperChildrenProps["placement"];
|
|
52
|
+
// Button: (props: MenuButtonProps) => JSX.Element;
|
|
53
|
+
// children: (props: MenuItemsProps) => React.ReactNode;
|
|
54
|
+
// },
|
|
55
|
+
// keyof MenuOwnProps
|
|
56
|
+
// >;
|
|
57
|
+
// export const Menu = forwardRef(function Menu(props: MenuProps, ref) {
|
|
58
|
+
// const { Button, placement, children, className, ...htmlAttributes } = props;
|
|
59
|
+
// const id = useId();
|
|
60
|
+
// const buttonRef = useRef<HTMLButtonElement>(null);
|
|
61
|
+
// const menuActions = useRef<MenuUnstyledActions>(null);
|
|
62
|
+
// const [popperElement, setPopperElement] = useState(null);
|
|
63
|
+
// const [anchorEl, setAnchorEl] = useState<HTMLButtonElement | null>(null);
|
|
64
|
+
// const open = Boolean(anchorEl);
|
|
65
|
+
// const { styles } = usePopper(anchorEl, popperElement, {
|
|
66
|
+
// placement,
|
|
67
|
+
// // strategy: "absolute",
|
|
68
|
+
// });
|
|
69
|
+
// const {
|
|
70
|
+
// registerItem,
|
|
71
|
+
// unregisterItem,
|
|
72
|
+
// getListboxProps,
|
|
73
|
+
// getItemProps,
|
|
74
|
+
// getItemState,
|
|
75
|
+
// } = useMenu({
|
|
76
|
+
// listboxId: id,
|
|
77
|
+
// listboxRef: setPopperElement,
|
|
78
|
+
// // these two make the Tab key behaviour correct, closing the menu on Tab
|
|
79
|
+
// // press and re-focusing the Button trigger element
|
|
80
|
+
// open,
|
|
81
|
+
// onClose: () => setAnchorEl(null),
|
|
82
|
+
// });
|
|
83
|
+
// const contextValue: MenuUnstyledContextType = {
|
|
84
|
+
// registerItem,
|
|
85
|
+
// unregisterItem,
|
|
86
|
+
// getItemState,
|
|
87
|
+
// getItemProps,
|
|
88
|
+
// open,
|
|
89
|
+
// };
|
|
90
|
+
// const handleButtonClick = (event: React.MouseEvent<HTMLButtonElement>) => {
|
|
91
|
+
// if (open) {
|
|
92
|
+
// setAnchorEl(null);
|
|
93
|
+
// } else {
|
|
94
|
+
// setAnchorEl(event.currentTarget);
|
|
95
|
+
// }
|
|
96
|
+
// };
|
|
97
|
+
// const handleButtonKeyDown = (
|
|
98
|
+
// event: React.KeyboardEvent<HTMLButtonElement>
|
|
99
|
+
// ) => {
|
|
100
|
+
// if (event.key === "ArrowDown" || event.key === "ArrowUp") {
|
|
101
|
+
// event.preventDefault();
|
|
102
|
+
// setAnchorEl(event.currentTarget);
|
|
103
|
+
// if (event.key === "ArrowUp") {
|
|
104
|
+
// menuActions.current?.highlightLastItem();
|
|
105
|
+
// }
|
|
106
|
+
// }
|
|
107
|
+
// };
|
|
108
|
+
// const close = useEventCallback(() => {
|
|
109
|
+
// setAnchorEl(null);
|
|
110
|
+
// buttonRef.current?.focus();
|
|
111
|
+
// });
|
|
112
|
+
// const renderChildren = useMemo(() => {
|
|
113
|
+
// const childrenProps: MenuItemsProps = { close };
|
|
114
|
+
// return children(childrenProps);
|
|
115
|
+
// }, [children, close]);
|
|
116
|
+
// return (
|
|
117
|
+
// <>
|
|
118
|
+
// <Button
|
|
119
|
+
// ref={buttonRef}
|
|
120
|
+
// id={id}
|
|
121
|
+
// aria-haspopup="true"
|
|
122
|
+
// aria-controls={open ? id : undefined}
|
|
123
|
+
// aria-expanded={open ? "true" : undefined}
|
|
124
|
+
// onClick={handleButtonClick}
|
|
125
|
+
// onKeyDown={handleButtonKeyDown}
|
|
126
|
+
// />
|
|
127
|
+
// <AnimatePresence>
|
|
128
|
+
// {open && (
|
|
129
|
+
// <ModalUnstyled
|
|
130
|
+
// slots={{ backdrop: MenuBackdrop }}
|
|
131
|
+
// onClose={close}
|
|
132
|
+
// onBackdropClick={close}
|
|
133
|
+
// open={open}
|
|
134
|
+
// >
|
|
135
|
+
// <div>
|
|
136
|
+
// <ClickAwayListener onClickAway={close}>
|
|
137
|
+
// <MenuRoot
|
|
138
|
+
// initial={{
|
|
139
|
+
// opacity: 0,
|
|
140
|
+
// }}
|
|
141
|
+
// animate={{
|
|
142
|
+
// opacity: 1,
|
|
143
|
+
// }}
|
|
144
|
+
// exit={{
|
|
145
|
+
// opacity: 0,
|
|
146
|
+
// }}
|
|
147
|
+
// className={clsx(className)}
|
|
148
|
+
// style={styles["popper"]}
|
|
149
|
+
// {...htmlAttributes}
|
|
150
|
+
// {...getListboxProps()}
|
|
151
|
+
// aria-labelledby={id}
|
|
152
|
+
// >
|
|
153
|
+
// <MenuUnstyledContext.Provider value={contextValue}>
|
|
154
|
+
// {renderChildren}
|
|
155
|
+
// </MenuUnstyledContext.Provider>
|
|
156
|
+
// </MenuRoot>
|
|
157
|
+
// </ClickAwayListener>
|
|
158
|
+
// </div>
|
|
159
|
+
// </ModalUnstyled>
|
|
160
|
+
// )}
|
|
161
|
+
// </AnimatePresence>
|
|
162
|
+
// </>
|
|
163
|
+
// );
|
|
164
|
+
// });
|
|
165
|
+
// export default Menu;
|
package/Menu/index.js
CHANGED
package/Menu/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Menu";
|
package/Menu/package.json
CHANGED
package/MenuItem/MenuItem.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MenuItem = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
+
exports.MenuItem = styled_components_1.default.li(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"], ["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"])));
|
|
4
7
|
var templateObject_1;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
export var MenuItem = styled.li(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"], ["\n padding: 8px 16px;\n\n &[aria-selected=\"true\"] {\n background: var(--accent400);\n }\n\n /** DEP: this is just for MultiselectMui? */\n &.Mui-focused,\n &[data-focus=\"true\"] {\n background: var(--accent300);\n color: white;\n }\n\n &:not([disabled]):hover {\n cursor: pointer;\n background: var(--accent300);\n }\n"])));
|
|
4
|
+
var templateObject_1;
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { type MenuItemsProps } from "../Menu/MenuMui";
|
|
3
|
-
import { Polymorphic } from "../typings";
|
|
4
|
-
export type MenuItemProps = React.PropsWithChildren<Partial<MenuItemsProps>>;
|
|
5
|
-
export declare const MenuItem: Polymorphic.ComponentForwarded<"button", MenuItemProps>;
|
|
6
|
-
export default MenuItem;
|
package/MenuItem/MenuItemMui.js
CHANGED
|
@@ -1,15 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import { useMenuItem } from "
|
|
5
|
-
// import
|
|
6
|
-
import
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React, { forwardRef } from "react";
|
|
3
|
+
// import { useMenuItem } from "@mui/base/MenuItemUnstyled";
|
|
4
|
+
// // import { useMenuItem } from "./useMenuItem";
|
|
5
|
+
// import clsx from "@koine/utils/clsx";
|
|
6
|
+
// import { type MenuItemsProps } from "../Menu/MenuMui";
|
|
7
|
+
// import { Polymorphic } from "../typings";
|
|
8
|
+
// export type MenuItemProps = React.PropsWithChildren<Partial<MenuItemsProps>>;
|
|
9
|
+
// export const MenuItem = forwardRef(function MenuItem<
|
|
10
|
+
// T extends React.ElementType = "button"
|
|
11
|
+
// >(props: Polymorphic.Props<T, MenuItemProps>, ref: Polymorphic.Ref<T>) {
|
|
12
|
+
// const {
|
|
13
|
+
// as: As = "button",
|
|
14
|
+
// children,
|
|
15
|
+
// className,
|
|
16
|
+
// disabled: disabledProp,
|
|
17
|
+
// ...other
|
|
18
|
+
// } = props;
|
|
19
|
+
// const { getRootProps, disabled, focusVisible } = useMenuItem({
|
|
20
|
+
// ref,
|
|
21
|
+
// disabled: disabledProp,
|
|
22
|
+
// });
|
|
23
|
+
// return (
|
|
24
|
+
// <As
|
|
25
|
+
// className={clsx(focusVisible && "", disabled && "", className)}
|
|
26
|
+
// {...getRootProps(other)}
|
|
27
|
+
// >
|
|
28
|
+
// {children}
|
|
29
|
+
// </As>
|
|
30
|
+
// );
|
|
31
|
+
// }) as Polymorphic.ComponentForwarded<"button", MenuItemProps>;
|
|
32
|
+
// export default MenuItem;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React, { forwardRef } from "react";
|
|
3
|
+
// import { useMenuItem } from "@mui/base/MenuItemUnstyled";
|
|
4
|
+
// // import { useMenuItem } from "./useMenuItem";
|
|
5
|
+
// import clsx from "@koine/utils/clsx";
|
|
6
|
+
// import { type MenuItemsProps } from "../Menu/MenuMui";
|
|
7
|
+
// import { Polymorphic } from "../typings";
|
|
8
|
+
// export type MenuItemProps = React.PropsWithChildren<Partial<MenuItemsProps>>;
|
|
9
|
+
// export const MenuItem = forwardRef(function MenuItem<
|
|
10
|
+
// T extends React.ElementType = "button"
|
|
11
|
+
// >(props: Polymorphic.Props<T, MenuItemProps>, ref: Polymorphic.Ref<T>) {
|
|
12
|
+
// const {
|
|
13
|
+
// as: As = "button",
|
|
14
|
+
// children,
|
|
15
|
+
// className,
|
|
16
|
+
// disabled: disabledProp,
|
|
17
|
+
// ...other
|
|
18
|
+
// } = props;
|
|
19
|
+
// const { getRootProps, disabled, focusVisible } = useMenuItem({
|
|
20
|
+
// ref,
|
|
21
|
+
// disabled: disabledProp,
|
|
22
|
+
// });
|
|
23
|
+
// return (
|
|
24
|
+
// <As
|
|
25
|
+
// className={clsx(focusVisible && "", disabled && "", className)}
|
|
26
|
+
// {...getRootProps(other)}
|
|
27
|
+
// >
|
|
28
|
+
// {children}
|
|
29
|
+
// </As>
|
|
30
|
+
// );
|
|
31
|
+
// }) as Polymorphic.ComponentForwarded<"button", MenuItemProps>;
|
|
32
|
+
// export default MenuItem;
|
package/MenuItem/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./MenuItem";
|
package/MenuItem/package.json
CHANGED
package/MenuItem/useMenuItem.js
CHANGED
|
@@ -1,20 +1,23 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useMenuItem = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var react_1 = require("react");
|
|
6
|
+
var utils_1 = require("@mui/utils");
|
|
7
|
+
var MenuUnstyled_1 = require("@mui/base/MenuUnstyled");
|
|
5
8
|
// import { unstable_useIsFocusVisible as useIsFocusVisible } from "@mui/utils";
|
|
6
|
-
|
|
9
|
+
function useMenuItem(props) {
|
|
7
10
|
var _a;
|
|
8
11
|
var _b = props.disabled, disabled = _b === void 0 ? false : _b, ref = props.ref, label = props.label;
|
|
9
|
-
var id = useId();
|
|
10
|
-
var menuContext = useContext(MenuUnstyledContext);
|
|
11
|
-
var itemRef = useRef(null);
|
|
12
|
-
var handleRef =
|
|
12
|
+
var id = (0, react_1.useId)();
|
|
13
|
+
var menuContext = (0, react_1.useContext)(MenuUnstyled_1.MenuUnstyledContext);
|
|
14
|
+
var itemRef = (0, react_1.useRef)(null);
|
|
15
|
+
var handleRef = (0, utils_1.unstable_useForkRef)(itemRef, ref);
|
|
13
16
|
if (menuContext === null) {
|
|
14
17
|
throw new Error("MenuItemUnstyled must be used within a MenuUnstyled");
|
|
15
18
|
}
|
|
16
19
|
var registerItem = menuContext.registerItem, unregisterItem = menuContext.unregisterItem, open = menuContext.open;
|
|
17
|
-
useEffect(function () {
|
|
20
|
+
(0, react_1.useEffect)(function () {
|
|
18
21
|
registerItem(id, { disabled: disabled, id: id, ref: itemRef, label: label });
|
|
19
22
|
return function () { return unregisterItem(id); };
|
|
20
23
|
}, [id, registerItem, unregisterItem, disabled, ref, label]);
|
|
@@ -24,26 +27,26 @@ export function useMenuItem(props) {
|
|
|
24
27
|
// ref: handleRef,
|
|
25
28
|
// });
|
|
26
29
|
// Ensure the menu item is focused when highlighted
|
|
27
|
-
var _c = useState(false), focusRequested = _c[0], requestFocus = _c[1];
|
|
28
|
-
var focusIfRequested = useCallback(function () {
|
|
30
|
+
var _c = (0, react_1.useState)(false), focusRequested = _c[0], requestFocus = _c[1];
|
|
31
|
+
var focusIfRequested = (0, react_1.useCallback)(function () {
|
|
29
32
|
if (focusRequested && itemRef.current != null) {
|
|
30
33
|
itemRef.current.focus();
|
|
31
34
|
requestFocus(false);
|
|
32
35
|
}
|
|
33
36
|
}, [focusRequested]);
|
|
34
|
-
useEffect(function () {
|
|
37
|
+
(0, react_1.useEffect)(function () {
|
|
35
38
|
focusIfRequested();
|
|
36
39
|
});
|
|
37
40
|
// useDebugValue({ id, disabled, label });
|
|
38
41
|
var itemState = menuContext.getItemState(id !== null && id !== void 0 ? id : "");
|
|
39
42
|
var highlighted = (itemState !== null && itemState !== void 0 ? itemState : { highlighted: false }).highlighted;
|
|
40
|
-
useEffect(function () {
|
|
43
|
+
(0, react_1.useEffect)(function () {
|
|
41
44
|
requestFocus(highlighted && open);
|
|
42
45
|
}, [highlighted, open]);
|
|
43
46
|
return {
|
|
44
47
|
getRootProps: function (other) {
|
|
45
48
|
var optionProps = menuContext.getItemProps(id, other);
|
|
46
|
-
return __assign(__assign({}, other), {
|
|
49
|
+
return tslib_1.__assign(tslib_1.__assign({}, other), {
|
|
47
50
|
// ...getButtonProps(other),
|
|
48
51
|
// @ts-expect-error type from @mui/base is not specific
|
|
49
52
|
tabIndex: optionProps.tabIndex,
|
|
@@ -55,4 +58,5 @@ export function useMenuItem(props) {
|
|
|
55
58
|
ref: handleRef,
|
|
56
59
|
};
|
|
57
60
|
}
|
|
58
|
-
|
|
61
|
+
exports.useMenuItem = useMenuItem;
|
|
62
|
+
exports.default = useMenuItem;
|
|
@@ -1,23 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var react_1 = require("react");
|
|
6
|
-
var utils_1 = require("@mui/utils");
|
|
7
|
-
var MenuUnstyled_1 = require("@mui/base/MenuUnstyled");
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import { useCallback, useContext, useEffect, useId, useRef, useState, } from "react";
|
|
3
|
+
import { unstable_useForkRef as useForkRef } from "@mui/utils";
|
|
4
|
+
import { MenuUnstyledContext } from "@mui/base/MenuUnstyled";
|
|
8
5
|
// import { unstable_useIsFocusVisible as useIsFocusVisible } from "@mui/utils";
|
|
9
|
-
function useMenuItem(props) {
|
|
6
|
+
export function useMenuItem(props) {
|
|
10
7
|
var _a;
|
|
11
8
|
var _b = props.disabled, disabled = _b === void 0 ? false : _b, ref = props.ref, label = props.label;
|
|
12
|
-
var id =
|
|
13
|
-
var menuContext =
|
|
14
|
-
var itemRef =
|
|
15
|
-
var handleRef = (
|
|
9
|
+
var id = useId();
|
|
10
|
+
var menuContext = useContext(MenuUnstyledContext);
|
|
11
|
+
var itemRef = useRef(null);
|
|
12
|
+
var handleRef = useForkRef(itemRef, ref);
|
|
16
13
|
if (menuContext === null) {
|
|
17
14
|
throw new Error("MenuItemUnstyled must be used within a MenuUnstyled");
|
|
18
15
|
}
|
|
19
16
|
var registerItem = menuContext.registerItem, unregisterItem = menuContext.unregisterItem, open = menuContext.open;
|
|
20
|
-
|
|
17
|
+
useEffect(function () {
|
|
21
18
|
registerItem(id, { disabled: disabled, id: id, ref: itemRef, label: label });
|
|
22
19
|
return function () { return unregisterItem(id); };
|
|
23
20
|
}, [id, registerItem, unregisterItem, disabled, ref, label]);
|
|
@@ -27,26 +24,26 @@ function useMenuItem(props) {
|
|
|
27
24
|
// ref: handleRef,
|
|
28
25
|
// });
|
|
29
26
|
// Ensure the menu item is focused when highlighted
|
|
30
|
-
var _c =
|
|
31
|
-
var focusIfRequested =
|
|
27
|
+
var _c = useState(false), focusRequested = _c[0], requestFocus = _c[1];
|
|
28
|
+
var focusIfRequested = useCallback(function () {
|
|
32
29
|
if (focusRequested && itemRef.current != null) {
|
|
33
30
|
itemRef.current.focus();
|
|
34
31
|
requestFocus(false);
|
|
35
32
|
}
|
|
36
33
|
}, [focusRequested]);
|
|
37
|
-
|
|
34
|
+
useEffect(function () {
|
|
38
35
|
focusIfRequested();
|
|
39
36
|
});
|
|
40
37
|
// useDebugValue({ id, disabled, label });
|
|
41
38
|
var itemState = menuContext.getItemState(id !== null && id !== void 0 ? id : "");
|
|
42
39
|
var highlighted = (itemState !== null && itemState !== void 0 ? itemState : { highlighted: false }).highlighted;
|
|
43
|
-
|
|
40
|
+
useEffect(function () {
|
|
44
41
|
requestFocus(highlighted && open);
|
|
45
42
|
}, [highlighted, open]);
|
|
46
43
|
return {
|
|
47
44
|
getRootProps: function (other) {
|
|
48
45
|
var optionProps = menuContext.getItemProps(id, other);
|
|
49
|
-
return
|
|
46
|
+
return __assign(__assign({}, other), {
|
|
50
47
|
// ...getButtonProps(other),
|
|
51
48
|
// @ts-expect-error type from @mui/base is not specific
|
|
52
49
|
tabIndex: optionProps.tabIndex,
|
|
@@ -58,5 +55,4 @@ function useMenuItem(props) {
|
|
|
58
55
|
ref: handleRef,
|
|
59
56
|
};
|
|
60
57
|
}
|
|
61
|
-
|
|
62
|
-
exports.default = useMenuItem;
|
|
58
|
+
export default useMenuItem;
|
package/Meta/Meta.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Meta = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var Meta = function (_a) {
|
|
3
6
|
var zoom = _a.zoom;
|
|
4
|
-
return (
|
|
7
|
+
return ((0, jsx_runtime_1.jsx)("meta", { name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1".concat(zoom ? "" : ", user-scalable=0") }));
|
|
5
8
|
};
|
|
6
|
-
|
|
9
|
+
exports.Meta = Meta;
|
|
10
|
+
exports.default = exports.Meta;
|
package/Meta/Meta.mjs
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export var Meta = function (_a) {
|
|
3
|
+
var zoom = _a.zoom;
|
|
4
|
+
return (_jsx("meta", { name: "viewport", content: "width=device-width, initial-scale=1, maximum-scale=1".concat(zoom ? "" : ", user-scalable=0") }));
|
|
5
|
+
};
|
|
6
|
+
export default Meta;
|
package/Meta/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./Meta"), exports);
|
|
6
|
+
var Meta_1 = require("./Meta");
|
|
7
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return Meta_1.Meta; } });
|
package/Meta/index.mjs
ADDED
package/Meta/package.json
CHANGED
package/NoJs/NoJs.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NoJs = void 0;
|
|
4
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
+
var NoJs = function (_props) {
|
|
6
|
+
return ((0, jsx_runtime_1.jsx)("script", { id: "no-js", dangerouslySetInnerHTML: {
|
|
4
7
|
__html: "document.querySelector(\"html\").className=document.querySelector(\"html\").className.replace(/no-js/,\"\") + \"js\";",
|
|
5
8
|
} }));
|
|
6
9
|
};
|
|
7
|
-
|
|
10
|
+
exports.NoJs = NoJs;
|
|
11
|
+
exports.default = exports.NoJs;
|
package/NoJs/NoJs.mjs
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
export var NoJs = function (_props) {
|
|
3
|
+
return (_jsx("script", { id: "no-js", dangerouslySetInnerHTML: {
|
|
4
|
+
__html: "document.querySelector(\"html\").className=document.querySelector(\"html\").className.replace(/no-js/,\"\") + \"js\";",
|
|
5
|
+
} }));
|
|
6
|
+
};
|
|
7
|
+
export default NoJs;
|
package/NoJs/index.js
CHANGED
|
@@ -1,2 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.default = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
tslib_1.__exportStar(require("./NoJs"), exports);
|
|
6
|
+
var NoJs_1 = require("./NoJs");
|
|
7
|
+
Object.defineProperty(exports, "default", { enumerable: true, get: function () { return NoJs_1.NoJs; } });
|
package/NoJs/index.mjs
ADDED
package/NoJs/package.json
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
var
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KoinePaginationNav = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
+
var cg_1 = require("react-icons/cg");
|
|
8
|
+
var ensureInt_1 = tslib_1.__importDefault(require("@koine/utils/ensureInt"));
|
|
9
|
+
var Root = styled_components_1.default.nav(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"], ["\n display: flex;\n align-items: center;\n justify-content: center;\n padding: 20px 0 40px;\n font-weight: 600;\n\n & a {\n text-decoration: none;\n }\n"])));
|
|
7
10
|
var item = "\n display: block;\n padding: 5px 10px;\n";
|
|
8
|
-
var ItemCurrent =
|
|
9
|
-
var ItemLink =
|
|
10
|
-
var DotsSeparator =
|
|
11
|
+
var ItemCurrent = styled_components_1.default.span(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"], ["\n ", "\n background: var(--accent400);\n border-radius: 2px;\n"])), item);
|
|
12
|
+
var ItemLink = styled_components_1.default.a(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n ", "\n\n ", "\n"], ["\n ", "\n\n ", "\n"])), item, function (props) { return (props.prev ? "color: var(--grey100);" : ""); });
|
|
13
|
+
var DotsSeparator = styled_components_1.default.span(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n color: var(--grey100);\n"], ["\n color: var(--grey100);\n"])));
|
|
11
14
|
var arrow = "display: flex; font-size: 20px;";
|
|
12
|
-
var ItemPrev =
|
|
13
|
-
var ItemNext =
|
|
15
|
+
var ItemPrev = styled_components_1.default.a(templateObject_5 || (templateObject_5 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
|
|
16
|
+
var ItemNext = styled_components_1.default.a(templateObject_6 || (templateObject_6 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), arrow);
|
|
14
17
|
/*
|
|
15
18
|
* Possible outcomes:
|
|
16
19
|
* [1] 2 3 ... 78 >
|
|
@@ -19,11 +22,11 @@ var ItemNext = styled.a(templateObject_6 || (templateObject_6 = __makeTemplateOb
|
|
|
19
22
|
* < 1 ... 75 76 [77] 78 >
|
|
20
23
|
* < 1 ... 76 77 [78]
|
|
21
24
|
*/
|
|
22
|
-
|
|
25
|
+
var KoinePaginationNav = function (_a) {
|
|
23
26
|
var total = _a.total, perPage = _a.perPage, currentPage = _a.currentPage, baseUrl = _a.baseUrl, _b = _a.showOffset, showOffset = _b === void 0 ? 2 : _b, _c = _a.currentUrl, currentUrl = _c === void 0 ? "/" : _c, _d = _a.Link, Link = _d === void 0 ? "a" : _d;
|
|
24
|
-
total =
|
|
25
|
-
currentPage =
|
|
26
|
-
perPage =
|
|
27
|
+
total = (0, ensureInt_1.default)(total);
|
|
28
|
+
currentPage = (0, ensureInt_1.default)(currentPage);
|
|
29
|
+
perPage = (0, ensureInt_1.default)(perPage);
|
|
27
30
|
// page 0 means 1
|
|
28
31
|
currentPage = currentPage || 1;
|
|
29
32
|
baseUrl = baseUrl || currentUrl;
|
|
@@ -54,8 +57,9 @@ export var KoinePaginationNav = function (_a) {
|
|
|
54
57
|
}
|
|
55
58
|
var prevDots = pages[0] > firstPage + 1;
|
|
56
59
|
var nextDots = pages[pages.length - 1] < lastPage - 1;
|
|
57
|
-
return (
|
|
58
|
-
return page === currentPage ? (
|
|
59
|
-
}), nextDots &&
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(Root, { children: [prevArrow && ((0, jsx_runtime_1.jsx)(ItemPrev, tslib_1.__assign({ as: Link, href: "".concat(baseUrl, "/").concat(prevPage) }, { children: (0, jsx_runtime_1.jsx)(cg_1.CgArrowLeftR, {}) }))), firstPage !== currentPage && ((0, jsx_runtime_1.jsx)(ItemLink, tslib_1.__assign({ as: Link, href: "".concat(baseUrl), prev: true }, { children: firstPage }))), prevDots && (0, jsx_runtime_1.jsx)(DotsSeparator, { children: "..." }), pages.map(function (page) {
|
|
61
|
+
return page === currentPage ? ((0, jsx_runtime_1.jsx)(ItemCurrent, { children: page }, page)) : ((0, jsx_runtime_1.jsx)(ItemLink, tslib_1.__assign({ as: Link, href: "".concat(baseUrl, "/").concat(page), prev: page < currentPage, next: page > currentPage }, { children: page }), "pagination-".concat(page)));
|
|
62
|
+
}), nextDots && (0, jsx_runtime_1.jsx)(DotsSeparator, { children: "..." }), lastPage !== currentPage && ((0, jsx_runtime_1.jsx)(ItemLink, tslib_1.__assign({ as: Link, href: "".concat(baseUrl, "/").concat(lastPage), next: true }, { children: lastPage }))), nextArrow && ((0, jsx_runtime_1.jsx)(ItemNext, tslib_1.__assign({ as: Link, href: "".concat(baseUrl, "/").concat(nextPage) }, { children: (0, jsx_runtime_1.jsx)(cg_1.CgArrowRightR, {}) })))] }));
|
|
60
63
|
};
|
|
64
|
+
exports.KoinePaginationNav = KoinePaginationNav;
|
|
61
65
|
var templateObject_1, templateObject_2, templateObject_3, templateObject_4, templateObject_5, templateObject_6;
|