@koine/react 1.1.10 → 1.1.11
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.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.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.js +28 -25
- package/{node/Dialog/DialogMui.js → Dialog/DialogMui.mjs} +25 -28
- 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.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.js +24 -21
- package/Dialog/sc/bare.mjs +43 -0
- package/Dialog/sc/framer.js +18 -15
- package/Dialog/sc/framer.mjs +16 -0
- package/Dialog/sc/framerMaterial.js +18 -15
- package/Dialog/sc/framerMaterial.mjs +16 -0
- package/Dialog/sc/material.js +22 -19
- package/Dialog/sc/material.mjs +21 -0
- package/Dialog/tw/bare.js +21 -18
- package/Dialog/tw/bare.mjs +42 -0
- package/Dialog/tw/elegant.js +21 -18
- package/Dialog/tw/elegant.mjs +20 -0
- package/Dialog/tw/framer.js +18 -15
- package/Dialog/tw/framer.mjs +16 -0
- package/Dialog/tw/framerMaterial.js +18 -15
- package/Dialog/tw/framerMaterial.mjs +16 -0
- 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.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.js +21 -18
- package/Form/sc/bare.mjs +20 -0
- 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.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.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.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.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.js +13 -10
- package/Forms/Textarea/Textarea.mjs +12 -0
- 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.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.js +29 -26
- package/Menu/MenuMui.mjs +75 -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.js +13 -10
- package/MenuItem/MenuItemMui.mjs +15 -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.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.js +17 -14
- package/Tabs/tw/bare.mjs +17 -0
- 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 +5 -4
- 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/Calendar/utils.js
CHANGED
|
@@ -1,73 +1,85 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.processEventsInView = exports.addCalendarEvents = exports.mergeCalendarEvents = exports.isTodayInView = exports.getNextDate = exports.getPrevDate = exports.getEndDate = exports.getStartDate = exports.getDisplayTime = exports.getEventTimestamp = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var isWithinInterval_1 = tslib_1.__importDefault(require("date-fns/isWithinInterval"));
|
|
6
|
+
var endOfMonth_1 = tslib_1.__importDefault(require("date-fns/endOfMonth"));
|
|
7
|
+
var startOfWeek_1 = tslib_1.__importDefault(require("date-fns/startOfWeek"));
|
|
8
|
+
var endOfWeek_1 = tslib_1.__importDefault(require("date-fns/endOfWeek"));
|
|
9
|
+
var subMonths_1 = tslib_1.__importDefault(require("date-fns/subMonths"));
|
|
10
|
+
var addMonths_1 = tslib_1.__importDefault(require("date-fns/addMonths"));
|
|
11
|
+
var subWeeks_1 = tslib_1.__importDefault(require("date-fns/subWeeks"));
|
|
12
|
+
var addWeeks_1 = tslib_1.__importDefault(require("date-fns/addWeeks"));
|
|
13
|
+
var addDays_1 = tslib_1.__importDefault(require("date-fns/addDays"));
|
|
14
|
+
function getEventTimestamp(dateLike) {
|
|
12
15
|
var date = new Date(dateLike);
|
|
13
16
|
date.setHours(0, 0, 0, 0);
|
|
14
17
|
return date.valueOf() / 1000;
|
|
15
18
|
}
|
|
16
|
-
|
|
19
|
+
exports.getEventTimestamp = getEventTimestamp;
|
|
20
|
+
function getDisplayTime(date) {
|
|
17
21
|
return (date.getHours() +
|
|
18
22
|
":" +
|
|
19
23
|
"0".repeat(2 - date.getMinutes().toString().length) +
|
|
20
24
|
date.getMinutes());
|
|
21
25
|
}
|
|
22
|
-
|
|
26
|
+
exports.getDisplayTime = getDisplayTime;
|
|
27
|
+
function getStartDate(date, view) {
|
|
23
28
|
date.setHours(0, 0, 0);
|
|
24
29
|
if (view === "month") {
|
|
25
30
|
date.setDate(1);
|
|
26
31
|
}
|
|
27
32
|
else if (view === "week") {
|
|
28
|
-
date =
|
|
33
|
+
date = (0, startOfWeek_1.default)(date, { weekStartsOn: 1 });
|
|
29
34
|
}
|
|
30
35
|
return date;
|
|
31
36
|
}
|
|
32
|
-
|
|
37
|
+
exports.getStartDate = getStartDate;
|
|
38
|
+
function getEndDate(start, view) {
|
|
33
39
|
var end = start;
|
|
34
40
|
if (view === "month") {
|
|
35
|
-
end =
|
|
41
|
+
end = (0, endOfMonth_1.default)(start);
|
|
36
42
|
}
|
|
37
43
|
else if (view === "week") {
|
|
38
|
-
end =
|
|
44
|
+
end = (0, endOfWeek_1.default)(start, { weekStartsOn: 1 });
|
|
39
45
|
}
|
|
40
46
|
end.setHours(23, 59, 59);
|
|
41
47
|
return end;
|
|
42
48
|
}
|
|
43
|
-
|
|
49
|
+
exports.getEndDate = getEndDate;
|
|
50
|
+
function getPrevDate(date, view) {
|
|
44
51
|
if (view === "month") {
|
|
45
|
-
return
|
|
52
|
+
return (0, subMonths_1.default)(date, 1);
|
|
46
53
|
}
|
|
47
|
-
return
|
|
54
|
+
return (0, subWeeks_1.default)(date, 1);
|
|
48
55
|
}
|
|
49
|
-
|
|
56
|
+
exports.getPrevDate = getPrevDate;
|
|
57
|
+
function getNextDate(date, view) {
|
|
50
58
|
if (view === "month") {
|
|
51
|
-
return
|
|
59
|
+
return (0, addMonths_1.default)(date, 1);
|
|
52
60
|
}
|
|
53
|
-
return
|
|
61
|
+
return (0, addWeeks_1.default)(date, 1);
|
|
54
62
|
}
|
|
55
|
-
|
|
56
|
-
|
|
63
|
+
exports.getNextDate = getNextDate;
|
|
64
|
+
function isTodayInView(start, end) {
|
|
65
|
+
return (0, isWithinInterval_1.default)(new Date(), { start: start, end: end });
|
|
57
66
|
}
|
|
58
|
-
|
|
67
|
+
exports.isTodayInView = isTodayInView;
|
|
68
|
+
function mergeCalendarEvents(first, second) {
|
|
59
69
|
var all = {};
|
|
60
70
|
addCalendarEvents(first, all);
|
|
61
71
|
addCalendarEvents(second, all);
|
|
62
72
|
return all;
|
|
63
73
|
}
|
|
64
|
-
|
|
74
|
+
exports.mergeCalendarEvents = mergeCalendarEvents;
|
|
75
|
+
function addCalendarEvents(toAdd, toExtend) {
|
|
65
76
|
for (var id in toAdd) {
|
|
66
77
|
var event_1 = toAdd[id];
|
|
67
78
|
toExtend[id] = event_1;
|
|
68
79
|
}
|
|
69
80
|
return toExtend;
|
|
70
81
|
}
|
|
82
|
+
exports.addCalendarEvents = addCalendarEvents;
|
|
71
83
|
function getEventsByTimestamp(events) {
|
|
72
84
|
var output = {};
|
|
73
85
|
var _loop_1 = function (uid) {
|
|
@@ -99,7 +111,7 @@ function getSortedEvents(events) {
|
|
|
99
111
|
}
|
|
100
112
|
var FREE_SLOT = 0;
|
|
101
113
|
var BUSY_SLOT = 1;
|
|
102
|
-
|
|
114
|
+
function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
103
115
|
var eventsByTimestamp = getEventsByTimestamp(eventsMap);
|
|
104
116
|
var eventsList = getSortedEvents(eventsMap);
|
|
105
117
|
var todayDate = new Date();
|
|
@@ -114,7 +126,7 @@ export function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
114
126
|
var weekStartDate = weeks[weekIdx];
|
|
115
127
|
var weekStartDay = weekStartDate.getDate();
|
|
116
128
|
var weekStartTimestamp = getEventTimestamp(new Date(weekStartDate));
|
|
117
|
-
var weekEndTimestamp = getEventTimestamp(
|
|
129
|
+
var weekEndTimestamp = getEventTimestamp((0, addDays_1.default)(new Date(weekStartDate), 6));
|
|
118
130
|
for (var dayNumber = 0; dayNumber < 7; dayNumber++) {
|
|
119
131
|
var dayDate = new Date(new Date(weekStartDate).setDate(weekStartDay + dayNumber));
|
|
120
132
|
var dayTimestamp = getEventTimestamp(dayDate);
|
|
@@ -125,7 +137,7 @@ export function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
125
137
|
$isOutOfRange: $isOutOfRange,
|
|
126
138
|
};
|
|
127
139
|
var viewDay = {
|
|
128
|
-
props: __assign({ key: "day.".concat(dayTimestamp) }, contextualProps),
|
|
140
|
+
props: tslib_1.__assign({ key: "day.".concat(dayTimestamp) }, contextualProps),
|
|
129
141
|
timestamp: dayTimestamp + "",
|
|
130
142
|
label: dayDate.getDate() + "",
|
|
131
143
|
events: [],
|
|
@@ -176,7 +188,7 @@ export function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
176
188
|
startedAtTopMap[event_3.uid] = top_1;
|
|
177
189
|
}
|
|
178
190
|
// push the event, they will be sorted later
|
|
179
|
-
viewDay.events.push(__assign(__assign(__assign({ key: "event.".concat(dayTimestamp, "-").concat(top_1) }, contextualProps), event_3), { isPast: todayDate > event_3.end, firstOfMulti: firstOfMulti, top: top_1, width: width }));
|
|
191
|
+
viewDay.events.push(tslib_1.__assign(tslib_1.__assign(tslib_1.__assign({ key: "event.".concat(dayTimestamp, "-").concat(top_1) }, contextualProps), event_3), { isPast: todayDate > event_3.end, firstOfMulti: firstOfMulti, top: top_1, width: width }));
|
|
180
192
|
}
|
|
181
193
|
// fill the empty slots with events' placeholders
|
|
182
194
|
for (var i = 0; i < verticalSlots.length; i++) {
|
|
@@ -200,3 +212,4 @@ export function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
200
212
|
}
|
|
201
213
|
return viewWeeks;
|
|
202
214
|
}
|
|
215
|
+
exports.processEventsInView = processEventsInView;
|
|
@@ -1,85 +1,73 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var addWeeks_1 = tslib_1.__importDefault(require("date-fns/addWeeks"));
|
|
13
|
-
var addDays_1 = tslib_1.__importDefault(require("date-fns/addDays"));
|
|
14
|
-
function getEventTimestamp(dateLike) {
|
|
1
|
+
import { __assign } from "tslib";
|
|
2
|
+
import isWithinInterval from "date-fns/isWithinInterval";
|
|
3
|
+
import endOfMonth from "date-fns/endOfMonth";
|
|
4
|
+
import startOfWeek from "date-fns/startOfWeek";
|
|
5
|
+
import endOfWeek from "date-fns/endOfWeek";
|
|
6
|
+
import subMonths from "date-fns/subMonths";
|
|
7
|
+
import addMonths from "date-fns/addMonths";
|
|
8
|
+
import subWeeks from "date-fns/subWeeks";
|
|
9
|
+
import addWeeks from "date-fns/addWeeks";
|
|
10
|
+
import addDays from "date-fns/addDays";
|
|
11
|
+
export function getEventTimestamp(dateLike) {
|
|
15
12
|
var date = new Date(dateLike);
|
|
16
13
|
date.setHours(0, 0, 0, 0);
|
|
17
14
|
return date.valueOf() / 1000;
|
|
18
15
|
}
|
|
19
|
-
|
|
20
|
-
function getDisplayTime(date) {
|
|
16
|
+
export function getDisplayTime(date) {
|
|
21
17
|
return (date.getHours() +
|
|
22
18
|
":" +
|
|
23
19
|
"0".repeat(2 - date.getMinutes().toString().length) +
|
|
24
20
|
date.getMinutes());
|
|
25
21
|
}
|
|
26
|
-
|
|
27
|
-
function getStartDate(date, view) {
|
|
22
|
+
export function getStartDate(date, view) {
|
|
28
23
|
date.setHours(0, 0, 0);
|
|
29
24
|
if (view === "month") {
|
|
30
25
|
date.setDate(1);
|
|
31
26
|
}
|
|
32
27
|
else if (view === "week") {
|
|
33
|
-
date = (
|
|
28
|
+
date = startOfWeek(date, { weekStartsOn: 1 });
|
|
34
29
|
}
|
|
35
30
|
return date;
|
|
36
31
|
}
|
|
37
|
-
|
|
38
|
-
function getEndDate(start, view) {
|
|
32
|
+
export function getEndDate(start, view) {
|
|
39
33
|
var end = start;
|
|
40
34
|
if (view === "month") {
|
|
41
|
-
end = (
|
|
35
|
+
end = endOfMonth(start);
|
|
42
36
|
}
|
|
43
37
|
else if (view === "week") {
|
|
44
|
-
end = (
|
|
38
|
+
end = endOfWeek(start, { weekStartsOn: 1 });
|
|
45
39
|
}
|
|
46
40
|
end.setHours(23, 59, 59);
|
|
47
41
|
return end;
|
|
48
42
|
}
|
|
49
|
-
|
|
50
|
-
function getPrevDate(date, view) {
|
|
43
|
+
export function getPrevDate(date, view) {
|
|
51
44
|
if (view === "month") {
|
|
52
|
-
return (
|
|
45
|
+
return subMonths(date, 1);
|
|
53
46
|
}
|
|
54
|
-
return (
|
|
47
|
+
return subWeeks(date, 1);
|
|
55
48
|
}
|
|
56
|
-
|
|
57
|
-
function getNextDate(date, view) {
|
|
49
|
+
export function getNextDate(date, view) {
|
|
58
50
|
if (view === "month") {
|
|
59
|
-
return (
|
|
51
|
+
return addMonths(date, 1);
|
|
60
52
|
}
|
|
61
|
-
return (
|
|
53
|
+
return addWeeks(date, 1);
|
|
62
54
|
}
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
return (0, isWithinInterval_1.default)(new Date(), { start: start, end: end });
|
|
55
|
+
export function isTodayInView(start, end) {
|
|
56
|
+
return isWithinInterval(new Date(), { start: start, end: end });
|
|
66
57
|
}
|
|
67
|
-
|
|
68
|
-
function mergeCalendarEvents(first, second) {
|
|
58
|
+
export function mergeCalendarEvents(first, second) {
|
|
69
59
|
var all = {};
|
|
70
60
|
addCalendarEvents(first, all);
|
|
71
61
|
addCalendarEvents(second, all);
|
|
72
62
|
return all;
|
|
73
63
|
}
|
|
74
|
-
|
|
75
|
-
function addCalendarEvents(toAdd, toExtend) {
|
|
64
|
+
export function addCalendarEvents(toAdd, toExtend) {
|
|
76
65
|
for (var id in toAdd) {
|
|
77
66
|
var event_1 = toAdd[id];
|
|
78
67
|
toExtend[id] = event_1;
|
|
79
68
|
}
|
|
80
69
|
return toExtend;
|
|
81
70
|
}
|
|
82
|
-
exports.addCalendarEvents = addCalendarEvents;
|
|
83
71
|
function getEventsByTimestamp(events) {
|
|
84
72
|
var output = {};
|
|
85
73
|
var _loop_1 = function (uid) {
|
|
@@ -111,7 +99,7 @@ function getSortedEvents(events) {
|
|
|
111
99
|
}
|
|
112
100
|
var FREE_SLOT = 0;
|
|
113
101
|
var BUSY_SLOT = 1;
|
|
114
|
-
function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
102
|
+
export function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
115
103
|
var eventsByTimestamp = getEventsByTimestamp(eventsMap);
|
|
116
104
|
var eventsList = getSortedEvents(eventsMap);
|
|
117
105
|
var todayDate = new Date();
|
|
@@ -126,7 +114,7 @@ function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
126
114
|
var weekStartDate = weeks[weekIdx];
|
|
127
115
|
var weekStartDay = weekStartDate.getDate();
|
|
128
116
|
var weekStartTimestamp = getEventTimestamp(new Date(weekStartDate));
|
|
129
|
-
var weekEndTimestamp = getEventTimestamp((
|
|
117
|
+
var weekEndTimestamp = getEventTimestamp(addDays(new Date(weekStartDate), 6));
|
|
130
118
|
for (var dayNumber = 0; dayNumber < 7; dayNumber++) {
|
|
131
119
|
var dayDate = new Date(new Date(weekStartDate).setDate(weekStartDay + dayNumber));
|
|
132
120
|
var dayTimestamp = getEventTimestamp(dayDate);
|
|
@@ -137,7 +125,7 @@ function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
137
125
|
$isOutOfRange: $isOutOfRange,
|
|
138
126
|
};
|
|
139
127
|
var viewDay = {
|
|
140
|
-
props:
|
|
128
|
+
props: __assign({ key: "day.".concat(dayTimestamp) }, contextualProps),
|
|
141
129
|
timestamp: dayTimestamp + "",
|
|
142
130
|
label: dayDate.getDate() + "",
|
|
143
131
|
events: [],
|
|
@@ -188,7 +176,7 @@ function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
188
176
|
startedAtTopMap[event_3.uid] = top_1;
|
|
189
177
|
}
|
|
190
178
|
// push the event, they will be sorted later
|
|
191
|
-
viewDay.events.push(
|
|
179
|
+
viewDay.events.push(__assign(__assign(__assign({ key: "event.".concat(dayTimestamp, "-").concat(top_1) }, contextualProps), event_3), { isPast: todayDate > event_3.end, firstOfMulti: firstOfMulti, top: top_1, width: width }));
|
|
192
180
|
}
|
|
193
181
|
// fill the empty slots with events' placeholders
|
|
194
182
|
for (var i = 0; i < verticalSlots.length; i++) {
|
|
@@ -212,4 +200,3 @@ function processEventsInView(eventsMap, calendarView, month, weeks) {
|
|
|
212
200
|
}
|
|
213
201
|
return viewWeeks;
|
|
214
202
|
}
|
|
215
|
-
exports.processEventsInView = processEventsInView;
|
package/Carousel/Carousel.js
CHANGED
|
@@ -1,4 +1,7 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KoineCarousel = void 0;
|
|
4
|
+
exports.KoineCarousel = null;
|
|
2
5
|
// import React, { useEffect, useState, useRef } from 'react';
|
|
3
6
|
// import Slide from './slide';
|
|
4
7
|
// import { getSliderListStyles } from './slider-list';
|
|
@@ -1,7 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.KoineCarousel = void 0;
|
|
4
|
-
exports.KoineCarousel = null;
|
|
1
|
+
export var KoineCarousel = null;
|
|
5
2
|
// import React, { useEffect, useState, useRef } from 'react';
|
|
6
3
|
// import Slide from './slide';
|
|
7
4
|
// import { getSliderListStyles } from './slider-list';
|
package/Carousel/CarouselCss.js
CHANGED
|
@@ -1,22 +1,26 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KoineCarouselCss = exports.CarouselCssCol = exports.CarouselCssRow = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
+
var Grid_1 = require("../Grid");
|
|
9
|
+
exports.CarouselCssRow = (0, styled_components_1.default)(Grid_1.Row)(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])), function (_a) {
|
|
7
10
|
var cs = _a.$gutter, gutter = _a.theme.gutter;
|
|
8
|
-
return "\n margin-left: -".concat(cs ===
|
|
11
|
+
return "\n margin-left: -".concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : (gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2, "px;\n margin-right: -").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : (gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs]) * 2, "px;\n padding-left: ").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs], "px;\n padding-right: ").concat(cs === Grid_1.GRID_GUTTER_DEFAULT ? gutter[Grid_1.GRID_GUTTER_DEFAULT] : gutter[Grid_1.GRID_GUTTER_DEFAULT] - gutter[cs], "px;\n ");
|
|
9
12
|
});
|
|
10
|
-
|
|
13
|
+
exports.CarouselCssCol = (0, styled_components_1.default)(Grid_1.Col)(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"], ["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"])), function (p) { return p.$width && "flex-basis: ".concat(p.$width, "px; min-width: ").concat(p.$width, "px;"); }, function (p) { return p.$snap; });
|
|
11
14
|
/**
|
|
12
15
|
* For programmatic usage an example here @see https://stackoverflow.com/a/65902068/9122820
|
|
13
16
|
*/
|
|
14
|
-
|
|
15
|
-
var items = _a.items, $gutterRow = _a.$gutterRow, $gutterCol = _a.$gutterCol, _b = _a.$gutter, $gutter = _b === void 0 ? "quarter" : _b, $proportion = _a.$proportion, _c = _a.$snap, $snap = _c === void 0 ? "center" : _c, width = _a.width, children = _a.children, colProps = __rest(_a, ["items", "$gutterRow", "$gutterCol", "$gutter", "$proportion", "$snap", "width", "children"]);
|
|
16
|
-
var slides = children ? Children.toArray(children) : items;
|
|
17
|
-
var id = useId();
|
|
17
|
+
var KoineCarouselCss = function (_a) {
|
|
18
|
+
var items = _a.items, $gutterRow = _a.$gutterRow, $gutterCol = _a.$gutterCol, _b = _a.$gutter, $gutter = _b === void 0 ? "quarter" : _b, $proportion = _a.$proportion, _c = _a.$snap, $snap = _c === void 0 ? "center" : _c, width = _a.width, children = _a.children, colProps = tslib_1.__rest(_a, ["items", "$gutterRow", "$gutterCol", "$gutter", "$proportion", "$snap", "width", "children"]);
|
|
19
|
+
var slides = children ? react_1.Children.toArray(children) : items;
|
|
20
|
+
var id = (0, react_1.useId)();
|
|
18
21
|
if (!slides)
|
|
19
22
|
return null;
|
|
20
|
-
return (
|
|
23
|
+
return ((0, jsx_runtime_1.jsx)(exports.CarouselCssRow, tslib_1.__assign({ "$noWrap": true, "$gutter": $gutterRow || $gutter }, { children: slides.map(function (_slide, idx) { return ((0, jsx_runtime_1.jsx)(exports.CarouselCssCol, tslib_1.__assign({}, colProps, { "$gutter": $gutterCol || $gutter, "$width": width }, { children: slides[idx] }), "CarouselCssCol-".concat(id, "-").concat(idx))); }) })));
|
|
21
24
|
};
|
|
25
|
+
exports.KoineCarouselCss = KoineCarouselCss;
|
|
22
26
|
var templateObject_1, templateObject_2;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Children, useId } from "react";
|
|
4
|
+
import styled from "styled-components";
|
|
5
|
+
import { Row, Col, GRID_GUTTER_DEFAULT as DF, } from "../Grid";
|
|
6
|
+
export var CarouselCssRow = styled(Row)(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"], ["\n ", "\n\n scroll-behavior: smooth;\n scroll-snap-type: x;\n -ms-overflow-style: none;\n scrollbar-width: none;\n\n &::-webkit-scrollbar {\n display: none;\n }\n"])), function (_a) {
|
|
7
|
+
var cs = _a.$gutter, gutter = _a.theme.gutter;
|
|
8
|
+
return "\n margin-left: -".concat(cs === DF ? gutter[DF] : (gutter[DF] - gutter[cs]) * 2, "px;\n margin-right: -").concat(cs === DF ? gutter[DF] : (gutter[DF] - gutter[cs]) * 2, "px;\n padding-left: ").concat(cs === DF ? gutter[DF] : gutter[DF] - gutter[cs], "px;\n padding-right: ").concat(cs === DF ? gutter[DF] : gutter[DF] - gutter[cs], "px;\n ");
|
|
9
|
+
});
|
|
10
|
+
export var CarouselCssCol = styled(Col)(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"], ["\n ", "\n position: relative;\n scroll-snap-align: ", ";\n"])), function (p) { return p.$width && "flex-basis: ".concat(p.$width, "px; min-width: ").concat(p.$width, "px;"); }, function (p) { return p.$snap; });
|
|
11
|
+
/**
|
|
12
|
+
* For programmatic usage an example here @see https://stackoverflow.com/a/65902068/9122820
|
|
13
|
+
*/
|
|
14
|
+
export var KoineCarouselCss = function (_a) {
|
|
15
|
+
var items = _a.items, $gutterRow = _a.$gutterRow, $gutterCol = _a.$gutterCol, _b = _a.$gutter, $gutter = _b === void 0 ? "quarter" : _b, $proportion = _a.$proportion, _c = _a.$snap, $snap = _c === void 0 ? "center" : _c, width = _a.width, children = _a.children, colProps = __rest(_a, ["items", "$gutterRow", "$gutterCol", "$gutter", "$proportion", "$snap", "width", "children"]);
|
|
16
|
+
var slides = children ? Children.toArray(children) : items;
|
|
17
|
+
var id = useId();
|
|
18
|
+
if (!slides)
|
|
19
|
+
return null;
|
|
20
|
+
return (_jsx(CarouselCssRow, __assign({ "$noWrap": true, "$gutter": $gutterRow || $gutter }, { children: slides.map(function (_slide, idx) { return (_jsx(CarouselCssCol, __assign({}, colProps, { "$gutter": $gutterCol || $gutter, "$width": width }, { children: slides[idx] }), "CarouselCssCol-".concat(id, "-").concat(idx))); }) })));
|
|
21
|
+
};
|
|
22
|
+
var templateObject_1, templateObject_2;
|
package/Carousel/index.js
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./CarouselCss";
|
package/Carousel/package.json
CHANGED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export var Collapsable = null;
|
|
File without changes
|
package/Collapsable/index.js
CHANGED
package/Collapsable/package.json
CHANGED
package/Debug/Debug.js
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var
|
|
5
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Debug = 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 Root = styled_components_1.default.div(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n background: #f4f4f4;\n border: 1px solid #ddd;\n border-left: 3px solid #f36d33;\n color: #666;\n page-break-inside: avoid;\n font-family: monospace;\n font-size: small;\n line-height: 1.6;\n margin-bottom: 1.6em;\n max-width: 100%;\n overflow: auto;\n padding: 1em 1.5em;\n display: block;\n word-wrap: break-word;\n"], ["\n background: #f4f4f4;\n border: 1px solid #ddd;\n border-left: 3px solid #f36d33;\n color: #666;\n page-break-inside: avoid;\n font-family: monospace;\n font-size: small;\n line-height: 1.6;\n margin-bottom: 1.6em;\n max-width: 100%;\n overflow: auto;\n padding: 1em 1.5em;\n display: block;\n word-wrap: break-word;\n"])));
|
|
8
|
+
var Debug = function (_a) {
|
|
6
9
|
var data = _a.data;
|
|
7
|
-
return
|
|
10
|
+
return (0, jsx_runtime_1.jsx)(Root, { children: JSON.stringify(data, undefined, 2) });
|
|
8
11
|
};
|
|
12
|
+
exports.Debug = Debug;
|
|
9
13
|
var templateObject_1;
|
package/Debug/Debug.mjs
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
var Root = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n background: #f4f4f4;\n border: 1px solid #ddd;\n border-left: 3px solid #f36d33;\n color: #666;\n page-break-inside: avoid;\n font-family: monospace;\n font-size: small;\n line-height: 1.6;\n margin-bottom: 1.6em;\n max-width: 100%;\n overflow: auto;\n padding: 1em 1.5em;\n display: block;\n word-wrap: break-word;\n"], ["\n background: #f4f4f4;\n border: 1px solid #ddd;\n border-left: 3px solid #f36d33;\n color: #666;\n page-break-inside: avoid;\n font-family: monospace;\n font-size: small;\n line-height: 1.6;\n margin-bottom: 1.6em;\n max-width: 100%;\n overflow: auto;\n padding: 1em 1.5em;\n display: block;\n word-wrap: break-word;\n"])));
|
|
5
|
+
export var Debug = function (_a) {
|
|
6
|
+
var data = _a.data;
|
|
7
|
+
return _jsx(Root, { children: JSON.stringify(data, undefined, 2) });
|
|
8
|
+
};
|
|
9
|
+
var templateObject_1;
|
package/Debug/index.js
CHANGED
package/Debug/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Debug";
|
package/Debug/package.json
CHANGED
package/Details/Details.js
CHANGED
|
@@ -1,30 +1,33 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.KoineDetails = exports.Content = exports.Body = exports.Summary = exports.Root = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
+
var react_1 = require("react");
|
|
7
|
+
var useWindowSize_1 = require("../hooks/useWindowSize");
|
|
8
|
+
var helpers_1 = require("../helpers");
|
|
9
|
+
exports.Root = "details";
|
|
10
|
+
exports.Summary = "summary";
|
|
11
|
+
exports.Body = "div";
|
|
12
|
+
exports.Content = "div";
|
|
10
13
|
/**
|
|
11
14
|
* FIXME: it actually works even without forwardRef, check if we do need it
|
|
12
15
|
*
|
|
13
16
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/details
|
|
14
17
|
*/
|
|
15
|
-
var DetailsWithRef = forwardRef(function Details(_a, ref) {
|
|
16
|
-
var id = _a.id, propOpen = _a.open, recalc = _a.recalc, summary = _a.summary, children = _a.children, _Root = _a.Root, _Summary = _a.Summary, _Body = _a.Body, _Content = _a.Content, onChange = _a.onChange, props = __rest(_a, ["id", "open", "recalc", "summary", "children", "Root", "Summary", "Body", "Content", "onChange"]);
|
|
18
|
+
var DetailsWithRef = (0, react_1.forwardRef)(function Details(_a, ref) {
|
|
19
|
+
var id = _a.id, propOpen = _a.open, recalc = _a.recalc, summary = _a.summary, children = _a.children, _Root = _a.Root, _Summary = _a.Summary, _Body = _a.Body, _Content = _a.Content, onChange = _a.onChange, props = tslib_1.__rest(_a, ["id", "open", "recalc", "summary", "children", "Root", "Summary", "Body", "Content", "onChange"]);
|
|
17
20
|
var isControlled = typeof propOpen !== "undefined";
|
|
18
|
-
var _b = useState(propOpen), stateOpen = _b[0], setStateOpen = _b[1];
|
|
19
|
-
var _c = useState(0), height = _c[0], setHeight = _c[1];
|
|
21
|
+
var _b = (0, react_1.useState)(propOpen), stateOpen = _b[0], setStateOpen = _b[1];
|
|
22
|
+
var _c = (0, react_1.useState)(0), height = _c[0], setHeight = _c[1];
|
|
20
23
|
var hash = id ? "#".concat(id) : "";
|
|
21
|
-
var winSize = useWindowSize();
|
|
24
|
+
var winSize = (0, useWindowSize_1.useWindowSize)();
|
|
22
25
|
var open = isControlled ? propOpen : stateOpen;
|
|
23
|
-
var _d = useState(open ? "unset" : "hidden"), overflow = _d[0], setOverflow = _d[1];
|
|
24
|
-
var content = useRef(null);
|
|
25
|
-
var defaultId = useId();
|
|
26
|
+
var _d = (0, react_1.useState)(open ? "unset" : "hidden"), overflow = _d[0], setOverflow = _d[1];
|
|
27
|
+
var content = (0, react_1.useRef)(null);
|
|
28
|
+
var defaultId = (0, react_1.useId)();
|
|
26
29
|
id = id || defaultId;
|
|
27
|
-
var handleClick = useCallback(function () {
|
|
30
|
+
var handleClick = (0, react_1.useCallback)(function () {
|
|
28
31
|
if (hash) {
|
|
29
32
|
window.history.replaceState(null, "", open ? window.location.pathname + window.location.search : hash);
|
|
30
33
|
}
|
|
@@ -35,29 +38,29 @@ var DetailsWithRef = forwardRef(function Details(_a, ref) {
|
|
|
35
38
|
setStateOpen(function (prevOpen) { return !prevOpen; });
|
|
36
39
|
}
|
|
37
40
|
}, [open, hash, onChange, isControlled]);
|
|
38
|
-
useEffect(function () {
|
|
41
|
+
(0, react_1.useEffect)(function () {
|
|
39
42
|
if (content.current) {
|
|
40
43
|
setHeight(Math.ceil(content.current.offsetHeight));
|
|
41
44
|
}
|
|
42
45
|
}, [winSize, recalc]);
|
|
43
46
|
// deeplink on mount
|
|
44
|
-
useEffect(function () {
|
|
47
|
+
(0, react_1.useEffect)(function () {
|
|
45
48
|
if (!isControlled && hash && window.location.hash === hash) {
|
|
46
49
|
setStateOpen(true);
|
|
47
50
|
}
|
|
48
51
|
}, [hash, isControlled]);
|
|
49
|
-
return (
|
|
52
|
+
return ((0, jsx_runtime_1.jsxs)(exports.Root, tslib_1.__assign({}, props, { open: open || false }, { children: [(0, jsx_runtime_1.jsx)(exports.Summary, tslib_1.__assign({ "$open": open, onClick: handleClick }, { children: summary || " " })), (0, jsx_runtime_1.jsx)(exports.Body, tslib_1.__assign({ "$open": open, style: { overflow: overflow } }, { children: (0, jsx_runtime_1.jsx)(exports.Content
|
|
50
53
|
// ref={content}
|
|
51
|
-
, __assign({ "$open": open,
|
|
54
|
+
, tslib_1.__assign({ "$open": open,
|
|
52
55
|
// aria-expanded={open}
|
|
53
56
|
// aria-label={open ? ariaCollapse : ariaExpand}
|
|
54
57
|
style: {
|
|
55
58
|
pointerEvents: open ? "all" : "none",
|
|
56
59
|
} }, { children: children })) }))] })));
|
|
57
60
|
});
|
|
58
|
-
|
|
59
|
-
Root: Root,
|
|
60
|
-
Summary: Summary,
|
|
61
|
-
Body: Body,
|
|
62
|
-
Content: Content,
|
|
61
|
+
exports.KoineDetails = (0, helpers_1.extendComponent)(DetailsWithRef, {
|
|
62
|
+
Root: exports.Root,
|
|
63
|
+
Summary: exports.Summary,
|
|
64
|
+
Body: exports.Body,
|
|
65
|
+
Content: exports.Content,
|
|
63
66
|
});
|