@koine/react 1.1.9 → 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 +5 -2
- package/{node/Autocomplete/AutocompleteDownshift.js → Autocomplete/AutocompleteDownshift.mjs} +2 -5
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +5 -2
- package/{node/Autocomplete/AutocompleteDownshiftMultiselect.js → Autocomplete/AutocompleteDownshiftMultiselect.mjs} +2 -5
- package/Autocomplete/AutocompleteMui.js +33 -35
- package/{node/Autocomplete/AutocompleteMui.js → Autocomplete/AutocompleteMui.mjs} +35 -33
- package/Autocomplete/AutocompleteReach.js +5 -2
- package/{node/Autocomplete/AutocompleteReach.js → Autocomplete/AutocompleteReach.mjs} +2 -5
- package/Autocomplete/components.js +25 -22
- package/Autocomplete/components.mjs +34 -0
- package/Autocomplete/helpers.js +11 -5
- package/{node/Autocomplete/helpers.js → Autocomplete/helpers.mjs} +6 -9
- 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 -21
- package/{node/Calendar/calendar-api-google.js → Calendar/calendar-api-google.mjs} +23 -25
- 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.d.ts +1 -1
- 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 +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.d.ts +6 -6
- package/Dialog/tw/bare.js +21 -18
- package/Dialog/tw/bare.mjs +42 -0
- package/Dialog/tw/elegant.d.ts +6 -6
- package/Dialog/tw/elegant.js +21 -18
- package/Dialog/tw/elegant.mjs +20 -0
- package/Dialog/tw/framer.d.ts +2 -2
- package/Dialog/tw/framer.js +18 -15
- package/Dialog/tw/framer.mjs +16 -0
- package/Dialog/tw/framerMaterial.d.ts +4 -4
- package/Dialog/tw/framerMaterial.js +18 -15
- package/Dialog/tw/framerMaterial.mjs +16 -0
- package/Dialog/tw/material.d.ts +6 -6
- 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 +1 -1
- package/Form/Form.js +28 -24
- 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.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.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.d.ts +1 -1
- package/Forms/antispam.js +16 -8
- package/{node/Forms/antispam.js → Forms/antispam.mjs} +10 -13
- package/Forms/helpers.js +16 -7
- package/{node/Forms/helpers.js → Forms/helpers.mjs} +8 -14
- 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.d.ts +1 -1
- package/Header/useHeader.js +18 -13
- 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.d.ts +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.d.ts +6 -6
- 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.d.ts +1 -1
- package/helpers/createUseMediaQueryWidth.js +18 -11
- package/{node/helpers/createUseMediaQueryWidth.js → helpers/createUseMediaQueryWidth.mjs} +13 -15
- 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 -13
- package/{node/hooks/useFixedOffset.js → hooks/useFixedOffset.mjs} +16 -17
- 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 -22
- package/{node/hooks/useMeasure.js → hooks/useMeasure.mjs} +26 -26
- 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 -12
- 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 -15
- package/hooks/useScrollThreshold.js +15 -10
- package/hooks/useScrollThreshold.mjs +28 -0
- package/hooks/useScrollTo.js +11 -6
- package/{node/hooks/useScrollTo.js → hooks/useScrollTo.mjs} +6 -10
- package/hooks/useSmoothScroll.js +18 -12
- 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.d.ts +1 -1
- package/hooks/useWindowSize.js +15 -9
- package/hooks/useWindowSize.mjs +29 -0
- package/index.js +4 -1
- package/{node/index.js → index.mjs} +1 -4
- package/m/MotionProvider.d.ts +1 -1
- 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 +8 -7
- 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 -23
- 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 -34
- 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/useFocus.js +0 -16
- package/node/hooks/useIsomorphicLayoutEffect.js +0 -12
- 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 -32
- package/node/hooks/useSmoothScroll.js +0 -42
- package/node/hooks/useUpdateEffect.js +0 -19
- package/node/hooks/useWindowSize.js +0 -32
- 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 -61
- package/node/types.js +0 -2
package/Forms/antispam.js
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeForm = exports.encodeForm = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var yup_1 = require("@kuus/yup");
|
|
6
|
+
var encode_1 = tslib_1.__importDefault(require("@koine/utils/encode"));
|
|
7
|
+
var decode_1 = tslib_1.__importDefault(require("@koine/utils/decode"));
|
|
8
|
+
var isUndefined_1 = tslib_1.__importDefault(require("@koine/utils/isUndefined"));
|
|
3
9
|
/**
|
|
4
10
|
* Encode form
|
|
5
11
|
*
|
|
@@ -11,21 +17,22 @@ import { encode, decode, isUndefined } from "@koine/utils";
|
|
|
11
17
|
*
|
|
12
18
|
* FIXME: types https://github.com/jquense/yup/issues/1700
|
|
13
19
|
*/
|
|
14
|
-
|
|
20
|
+
function encodeForm(validationRules) {
|
|
15
21
|
var encoded = {};
|
|
16
22
|
var encodedNames = {};
|
|
17
23
|
for (var name_1 in validationRules) {
|
|
18
24
|
if (!name_1.startsWith("_")) {
|
|
19
|
-
var encodedName =
|
|
25
|
+
var encodedName = (0, encode_1.default)(name_1);
|
|
20
26
|
encoded[encodedName] = validationRules[name_1];
|
|
21
27
|
encodedNames[name_1] = encodedName;
|
|
22
28
|
}
|
|
23
29
|
}
|
|
24
30
|
// we need `.required()` to correctly infer the type @see
|
|
25
31
|
// https://github.com/jquense/yup/issues/946
|
|
26
|
-
var encodedSchema = object(encoded).required();
|
|
32
|
+
var encodedSchema = (0, yup_1.object)(encoded).required();
|
|
27
33
|
return { encodedSchema: encodedSchema, encodedNames: encodedNames };
|
|
28
34
|
}
|
|
35
|
+
exports.encodeForm = encodeForm;
|
|
29
36
|
/**
|
|
30
37
|
* Decode form data
|
|
31
38
|
*
|
|
@@ -35,10 +42,10 @@ export function encodeForm(validationRules) {
|
|
|
35
42
|
* Here too we skip encoding/decoding process for names prefixed wth an underscore
|
|
36
43
|
* which are considered programmatic form data not created by user input.
|
|
37
44
|
*/
|
|
38
|
-
|
|
45
|
+
function decodeForm(formData) {
|
|
39
46
|
var json = {};
|
|
40
47
|
for (var encodedName in formData) {
|
|
41
|
-
var decodedName =
|
|
48
|
+
var decodedName = (0, decode_1.default)(encodedName);
|
|
42
49
|
// always add underscore prefixed names as they are treated as internal
|
|
43
50
|
// private inputs outside of the honeypot system, normalise them here removing
|
|
44
51
|
// the underscore prefix
|
|
@@ -47,7 +54,7 @@ export function decodeForm(formData) {
|
|
|
47
54
|
json[encodedName.substring(1)] = formData[encodedName];
|
|
48
55
|
}
|
|
49
56
|
// if the decoded `name` is empty and the encoded `name` is defined honeypot passed
|
|
50
|
-
else if (!
|
|
57
|
+
else if (!(0, isUndefined_1.default)(formData[encodedName]) &&
|
|
51
58
|
formData[decodedName] === "") {
|
|
52
59
|
// @ts-expect-error nevermind
|
|
53
60
|
json[decodedName] = formData[encodedName];
|
|
@@ -56,3 +63,4 @@ export function decodeForm(formData) {
|
|
|
56
63
|
// console.log(formData, decoded, json);
|
|
57
64
|
return json;
|
|
58
65
|
}
|
|
66
|
+
exports.decodeForm = decodeForm;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
var utils_1 = require("@koine/utils");
|
|
1
|
+
import { object } from "@kuus/yup";
|
|
2
|
+
import encode from "@koine/utils/encode";
|
|
3
|
+
import decode from "@koine/utils/decode";
|
|
4
|
+
import isUndefined from "@koine/utils/isUndefined";
|
|
6
5
|
/**
|
|
7
6
|
* Encode form
|
|
8
7
|
*
|
|
@@ -14,22 +13,21 @@ var utils_1 = require("@koine/utils");
|
|
|
14
13
|
*
|
|
15
14
|
* FIXME: types https://github.com/jquense/yup/issues/1700
|
|
16
15
|
*/
|
|
17
|
-
function encodeForm(validationRules) {
|
|
16
|
+
export function encodeForm(validationRules) {
|
|
18
17
|
var encoded = {};
|
|
19
18
|
var encodedNames = {};
|
|
20
19
|
for (var name_1 in validationRules) {
|
|
21
20
|
if (!name_1.startsWith("_")) {
|
|
22
|
-
var encodedName =
|
|
21
|
+
var encodedName = encode(name_1);
|
|
23
22
|
encoded[encodedName] = validationRules[name_1];
|
|
24
23
|
encodedNames[name_1] = encodedName;
|
|
25
24
|
}
|
|
26
25
|
}
|
|
27
26
|
// we need `.required()` to correctly infer the type @see
|
|
28
27
|
// https://github.com/jquense/yup/issues/946
|
|
29
|
-
var encodedSchema =
|
|
28
|
+
var encodedSchema = object(encoded).required();
|
|
30
29
|
return { encodedSchema: encodedSchema, encodedNames: encodedNames };
|
|
31
30
|
}
|
|
32
|
-
exports.encodeForm = encodeForm;
|
|
33
31
|
/**
|
|
34
32
|
* Decode form data
|
|
35
33
|
*
|
|
@@ -39,10 +37,10 @@ exports.encodeForm = encodeForm;
|
|
|
39
37
|
* Here too we skip encoding/decoding process for names prefixed wth an underscore
|
|
40
38
|
* which are considered programmatic form data not created by user input.
|
|
41
39
|
*/
|
|
42
|
-
function decodeForm(formData) {
|
|
40
|
+
export function decodeForm(formData) {
|
|
43
41
|
var json = {};
|
|
44
42
|
for (var encodedName in formData) {
|
|
45
|
-
var decodedName =
|
|
43
|
+
var decodedName = decode(encodedName);
|
|
46
44
|
// always add underscore prefixed names as they are treated as internal
|
|
47
45
|
// private inputs outside of the honeypot system, normalise them here removing
|
|
48
46
|
// the underscore prefix
|
|
@@ -51,7 +49,7 @@ function decodeForm(formData) {
|
|
|
51
49
|
json[encodedName.substring(1)] = formData[encodedName];
|
|
52
50
|
}
|
|
53
51
|
// if the decoded `name` is empty and the encoded `name` is defined honeypot passed
|
|
54
|
-
else if (!
|
|
52
|
+
else if (!isUndefined(formData[encodedName]) &&
|
|
55
53
|
formData[decodedName] === "") {
|
|
56
54
|
// @ts-expect-error nevermind
|
|
57
55
|
json[decodedName] = formData[encodedName];
|
|
@@ -60,4 +58,3 @@ function decodeForm(formData) {
|
|
|
60
58
|
// console.log(formData, decoded, json);
|
|
61
59
|
return json;
|
|
62
60
|
}
|
|
63
|
-
exports.decodeForm = decodeForm;
|
package/Forms/helpers.js
CHANGED
|
@@ -1,8 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.triggerChange = exports.triggerOnChange = exports.defaultOptionsFilterFn = exports.normaliseOptions = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var isString_1 = tslib_1.__importDefault(require("@koine/utils/isString"));
|
|
6
|
+
var matchSorter_1 = tslib_1.__importDefault(require("@koine/utils/matchSorter"));
|
|
7
|
+
var normaliseOptions = function (options) {
|
|
3
8
|
if (options === void 0) { options = []; }
|
|
4
9
|
return options.map(function (option) {
|
|
5
|
-
return
|
|
10
|
+
return (0, isString_1.default)(option)
|
|
6
11
|
? {
|
|
7
12
|
label: option,
|
|
8
13
|
value: option,
|
|
@@ -10,25 +15,28 @@ export var normaliseOptions = function (options) {
|
|
|
10
15
|
: option;
|
|
11
16
|
});
|
|
12
17
|
};
|
|
13
|
-
|
|
18
|
+
exports.normaliseOptions = normaliseOptions;
|
|
19
|
+
function defaultOptionsFilterFn(options, inputValue) {
|
|
14
20
|
if (!inputValue) {
|
|
15
21
|
return options;
|
|
16
22
|
}
|
|
17
|
-
return
|
|
23
|
+
return (0, matchSorter_1.default)(options, inputValue, { keys: ["value", "label"] });
|
|
18
24
|
}
|
|
25
|
+
exports.defaultOptionsFilterFn = defaultOptionsFilterFn;
|
|
19
26
|
/**
|
|
20
27
|
* We are faking the native input `onChange` event
|
|
21
28
|
*/
|
|
22
|
-
|
|
29
|
+
function triggerOnChange(onChange, name, value) {
|
|
23
30
|
// @ts-expect-error nevermind
|
|
24
31
|
if (onChange)
|
|
25
32
|
onChange({ target: { name: name, value: value } });
|
|
26
33
|
}
|
|
34
|
+
exports.triggerOnChange = triggerOnChange;
|
|
27
35
|
/**
|
|
28
36
|
* @see https://hustle.bizongo.in/simulate-react-on-change-on-controlled-components-baa336920e04
|
|
29
37
|
* @deprecated
|
|
30
38
|
*/
|
|
31
|
-
|
|
39
|
+
function triggerChange(input, value) {
|
|
32
40
|
var obj = window.Object;
|
|
33
41
|
if (!obj) {
|
|
34
42
|
if (process.env["NODE_ENV"] !== "production") {
|
|
@@ -43,3 +51,4 @@ export function triggerChange(input, value) {
|
|
|
43
51
|
var inputEvent = new Event("input", { bubbles: true });
|
|
44
52
|
input.dispatchEvent(inputEvent);
|
|
45
53
|
}
|
|
54
|
+
exports.triggerChange = triggerChange;
|
|
@@ -1,11 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
var utils_1 = require("@koine/utils");
|
|
5
|
-
var normaliseOptions = function (options) {
|
|
1
|
+
import isString from "@koine/utils/isString";
|
|
2
|
+
import matchSorter from "@koine/utils/matchSorter";
|
|
3
|
+
export var normaliseOptions = function (options) {
|
|
6
4
|
if (options === void 0) { options = []; }
|
|
7
5
|
return options.map(function (option) {
|
|
8
|
-
return
|
|
6
|
+
return isString(option)
|
|
9
7
|
? {
|
|
10
8
|
label: option,
|
|
11
9
|
value: option,
|
|
@@ -13,28 +11,25 @@ var normaliseOptions = function (options) {
|
|
|
13
11
|
: option;
|
|
14
12
|
});
|
|
15
13
|
};
|
|
16
|
-
|
|
17
|
-
function defaultOptionsFilterFn(options, inputValue) {
|
|
14
|
+
export function defaultOptionsFilterFn(options, inputValue) {
|
|
18
15
|
if (!inputValue) {
|
|
19
16
|
return options;
|
|
20
17
|
}
|
|
21
|
-
return
|
|
18
|
+
return matchSorter(options, inputValue, { keys: ["value", "label"] });
|
|
22
19
|
}
|
|
23
|
-
exports.defaultOptionsFilterFn = defaultOptionsFilterFn;
|
|
24
20
|
/**
|
|
25
21
|
* We are faking the native input `onChange` event
|
|
26
22
|
*/
|
|
27
|
-
function triggerOnChange(onChange, name, value) {
|
|
23
|
+
export function triggerOnChange(onChange, name, value) {
|
|
28
24
|
// @ts-expect-error nevermind
|
|
29
25
|
if (onChange)
|
|
30
26
|
onChange({ target: { name: name, value: value } });
|
|
31
27
|
}
|
|
32
|
-
exports.triggerOnChange = triggerOnChange;
|
|
33
28
|
/**
|
|
34
29
|
* @see https://hustle.bizongo.in/simulate-react-on-change-on-controlled-components-baa336920e04
|
|
35
30
|
* @deprecated
|
|
36
31
|
*/
|
|
37
|
-
function triggerChange(input, value) {
|
|
32
|
+
export function triggerChange(input, value) {
|
|
38
33
|
var obj = window.Object;
|
|
39
34
|
if (!obj) {
|
|
40
35
|
if (process.env["NODE_ENV"] !== "production") {
|
|
@@ -49,4 +44,3 @@ function triggerChange(input, value) {
|
|
|
49
44
|
var inputEvent = new Event("input", { bubbles: true });
|
|
50
45
|
input.dispatchEvent(inputEvent);
|
|
51
46
|
}
|
|
52
|
-
exports.triggerChange = triggerChange;
|
package/Forms/index.js
CHANGED
|
@@ -1,16 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var tslib_1 = require("tslib");
|
|
4
|
+
tslib_1.__exportStar(require("./antispam"), exports);
|
|
5
|
+
tslib_1.__exportStar(require("./Checkbox"), exports);
|
|
6
|
+
tslib_1.__exportStar(require("./Input"), exports);
|
|
7
|
+
tslib_1.__exportStar(require("./InputGroup"), exports);
|
|
8
|
+
tslib_1.__exportStar(require("./Feedback"), exports);
|
|
9
|
+
tslib_1.__exportStar(require("./Field"), exports);
|
|
10
|
+
tslib_1.__exportStar(require("./InputGroup"), exports);
|
|
11
|
+
tslib_1.__exportStar(require("./Label"), exports);
|
|
12
|
+
tslib_1.__exportStar(require("./Password"), exports);
|
|
13
|
+
tslib_1.__exportStar(require("./Radio"), exports);
|
|
11
14
|
// export * from "./Select";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
tslib_1.__exportStar(require("./Switch"), exports);
|
|
16
|
+
tslib_1.__exportStar(require("./Textarea"), exports);
|
|
17
|
+
tslib_1.__exportStar(require("./Toggle"), exports);
|
|
18
|
+
tslib_1.__exportStar(require("./helpers"), exports);
|
|
19
|
+
tslib_1.__exportStar(require("./styles"), exports);
|
package/Forms/index.mjs
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export * from "./antispam";
|
|
2
|
+
export * from "./Checkbox";
|
|
3
|
+
export * from "./Input";
|
|
4
|
+
export * from "./InputGroup";
|
|
5
|
+
export * from "./Feedback";
|
|
6
|
+
export * from "./Field";
|
|
7
|
+
export * from "./InputGroup";
|
|
8
|
+
export * from "./Label";
|
|
9
|
+
export * from "./Password";
|
|
10
|
+
export * from "./Radio";
|
|
11
|
+
// export * from "./Select";
|
|
12
|
+
export * from "./Switch";
|
|
13
|
+
export * from "./Textarea";
|
|
14
|
+
export * from "./Toggle";
|
|
15
|
+
export * from "./helpers";
|
|
16
|
+
export * from "./styles";
|
package/Forms/package.json
CHANGED
package/Forms/styles.js
CHANGED
|
@@ -1,29 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inputFocus = exports.inputBase = exports.inputReset = exports.inputPadding = exports.inputBorder = exports.inputResetAutofill = exports.InputProgress = exports.InputHoneypot = exports.InputInvisible = 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 styled_1 = require("../styles/styled");
|
|
8
|
+
var ProgressLinear_1 = require("../Progress/ProgressLinear");
|
|
9
|
+
var styled_2 = require("../styles/styled");
|
|
10
|
+
exports.InputInvisible = styled_components_1.default.input(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), styled_2.invisible);
|
|
11
|
+
exports.InputHoneypot = (0, styled_components_1.default)(exports.InputInvisible).attrs({
|
|
9
12
|
type: "text",
|
|
10
13
|
autoComplete: "new-password",
|
|
11
14
|
tabIndex: -1,
|
|
12
|
-
})(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
|
|
13
|
-
|
|
15
|
+
})(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject([""], [""])));
|
|
16
|
+
exports.InputProgress = (0, styled_components_1.default)(function (p) { return ((0, jsx_runtime_1.jsx)(ProgressLinear_1.ProgressLinear, tslib_1.__assign({ fg: "var(--accent300)", bg: "var(--accent400)" }, p))); })(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"], ["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"])));
|
|
14
17
|
/**
|
|
15
18
|
* Remove the default light blue background on autofilled inputs. To be used as
|
|
16
19
|
* a function that outputs a CSS string.
|
|
17
20
|
*
|
|
18
21
|
* @see https://stackoverflow.com/a/62624824/1938970
|
|
19
22
|
*/
|
|
20
|
-
|
|
23
|
+
exports.inputResetAutofill = "\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-background-clip: text;\n }\n";
|
|
21
24
|
/* FIXME: find a nice way to override this styling from implementation */
|
|
22
25
|
// border-bottom: 1px solid var(--forms-border-color);
|
|
23
26
|
// border: 0;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
27
|
+
exports.inputBorder = "\n border: 1px solid var(--forms-border-color);\n";
|
|
28
|
+
exports.inputPadding = "\n padding: var(--forms-gutter-y) var(--forms-gutter-x);\n";
|
|
29
|
+
exports.inputReset = "\n width: 100%;\n min-height: 44px;\n ".concat(exports.inputBorder, "\n ").concat(exports.inputPadding, "\n");
|
|
30
|
+
exports.inputBase = "\n ".concat(exports.inputReset, "\n ").concat(exports.inputResetAutofill, "\n background: transparent;\n");
|
|
31
|
+
exports.inputFocus = "\n &:focus {\n outline: 0px;\n appearance: none;\n ".concat(styled_1.stateFocus, "\n }\n");
|
|
29
32
|
var templateObject_1, templateObject_2, templateObject_3;
|
package/Forms/styles.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject } from "tslib";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import styled from "styled-components";
|
|
4
|
+
import { stateFocus } from "../styles/styled";
|
|
5
|
+
import { ProgressLinear } from "../Progress/ProgressLinear";
|
|
6
|
+
import { invisible } from "../styles/styled";
|
|
7
|
+
export var InputInvisible = styled.input(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n ", "\n"], ["\n ", "\n"])), invisible);
|
|
8
|
+
export var InputHoneypot = styled(InputInvisible).attrs({
|
|
9
|
+
type: "text",
|
|
10
|
+
autoComplete: "new-password",
|
|
11
|
+
tabIndex: -1,
|
|
12
|
+
})(templateObject_2 || (templateObject_2 = __makeTemplateObject([""], [""])));
|
|
13
|
+
export var InputProgress = styled(function (p) { return (_jsx(ProgressLinear, __assign({ fg: "var(--accent300)", bg: "var(--accent400)" }, p))); })(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"], ["\n position: absolute;\n bottom: 0;\n left: 0;\n width: 100%;\n"])));
|
|
14
|
+
/**
|
|
15
|
+
* Remove the default light blue background on autofilled inputs. To be used as
|
|
16
|
+
* a function that outputs a CSS string.
|
|
17
|
+
*
|
|
18
|
+
* @see https://stackoverflow.com/a/62624824/1938970
|
|
19
|
+
*/
|
|
20
|
+
export var inputResetAutofill = "\n &:-webkit-autofill,\n &:-webkit-autofill:hover,\n &:-webkit-autofill:focus,\n &:-webkit-autofill:active {\n -webkit-background-clip: text;\n }\n";
|
|
21
|
+
/* FIXME: find a nice way to override this styling from implementation */
|
|
22
|
+
// border-bottom: 1px solid var(--forms-border-color);
|
|
23
|
+
// border: 0;
|
|
24
|
+
export var inputBorder = "\n border: 1px solid var(--forms-border-color);\n";
|
|
25
|
+
export var inputPadding = "\n padding: var(--forms-gutter-y) var(--forms-gutter-x);\n";
|
|
26
|
+
export var inputReset = "\n width: 100%;\n min-height: 44px;\n ".concat(inputBorder, "\n ").concat(inputPadding, "\n");
|
|
27
|
+
export var inputBase = "\n ".concat(inputReset, "\n ").concat(inputResetAutofill, "\n background: transparent;\n");
|
|
28
|
+
export var inputFocus = "\n &:focus {\n outline: 0px;\n appearance: none;\n ".concat(stateFocus, "\n }\n");
|
|
29
|
+
var templateObject_1, templateObject_2, templateObject_3;
|
package/Gauge/Gauge.js
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
// import styled, { keyframes } from "styled-components";
|
|
2
3
|
// import { m } from "framer-motion";
|
|
3
|
-
|
|
4
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
+
exports.Gauge = void 0;
|
|
6
|
+
var Gauge = function (_props) { return null; };
|
|
7
|
+
exports.Gauge = Gauge;
|
|
4
8
|
// export type GaugeProps = {
|
|
5
9
|
// /** In percentage */
|
|
6
10
|
// value: number;
|
|
@@ -1,10 +1,6 @@
|
|
|
1
|
-
"use strict";
|
|
2
1
|
// import styled, { keyframes } from "styled-components";
|
|
3
2
|
// import { m } from "framer-motion";
|
|
4
|
-
|
|
5
|
-
exports.Gauge = void 0;
|
|
6
|
-
var Gauge = function (_props) { return null; };
|
|
7
|
-
exports.Gauge = Gauge;
|
|
3
|
+
export var Gauge = function (_props) { return null; };
|
|
8
4
|
// export type GaugeProps = {
|
|
9
5
|
// /** In percentage */
|
|
10
6
|
// value: number;
|
package/Grid/Grid.js
CHANGED
|
@@ -1,17 +1,20 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Col = exports.Row = exports.ContainerFluid = exports.Container = exports.GRID_GUTTER_DEFAULT = exports.GRID_COLUMNS = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
6
|
+
exports.GRID_COLUMNS = 12;
|
|
7
|
+
exports.GRID_GUTTER_DEFAULT = "half";
|
|
8
|
+
exports.Container = styled_components_1.default.div(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"], ["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"])), function (p) { return p.theme.breakpoints[p.size]; }, function (p) { return p.theme.gutter[p.$gutter || exports.GRID_GUTTER_DEFAULT]; }, function (p) { return (p.clamp ? "overflow: hidden;" : ""); });
|
|
9
|
+
exports.ContainerFluid = styled_components_1.default.div(templateObject_2 || (templateObject_2 = tslib_1.__makeTemplateObject(["\n padding: 0 ", "px;\n"], ["\n padding: 0 ", "px;\n"])), function (p) { return p.theme.gutter[p.$gutter || exports.GRID_GUTTER_DEFAULT]; });
|
|
10
|
+
exports.Row = styled_components_1.default.div(templateObject_3 || (templateObject_3 = tslib_1.__makeTemplateObject(["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"], ["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"])), function (p) { return p.theme.gutter[p.$gutter || exports.GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;"); }, function (p) { return (p.$valign ? "align-items: ".concat(p.$valign) : ""); }, function (p) {
|
|
8
11
|
return p.$reverse &&
|
|
9
12
|
"@media (".concat(p.$reverse.split(":")[0], "-width: ").concat(p.$reverse.split(":")[1], "px) {\n flex-direction: row-reverse;\n }");
|
|
10
13
|
});
|
|
11
|
-
|
|
14
|
+
exports.Col = styled_components_1.default.div(templateObject_4 || (templateObject_4 = tslib_1.__makeTemplateObject(["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"], ["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"])), function (p) { return p.theme.gutter[p.$gutter || exports.GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$flex ? "flex" : "block"); }, function (p) { return (p.$valign ? "align-items: " + p.$valign : ""); }, function (p) { return getColCss(p); });
|
|
12
15
|
function getColWidth(breakpoints, breakpoint, value) {
|
|
13
16
|
var breakpointValue = breakpoints[breakpoint] + "px";
|
|
14
|
-
var width = (value * 100) / GRID_COLUMNS;
|
|
17
|
+
var width = (value * 100) / exports.GRID_COLUMNS;
|
|
15
18
|
var cssValue = "\n min-width: ".concat(width, "%;\n flex: 0 0 ").concat(width, "%;\n");
|
|
16
19
|
if (breakpoint === Object.keys(breakpoints)[0]) {
|
|
17
20
|
return cssValue;
|
|
@@ -27,7 +30,7 @@ function getColCss(props) {
|
|
|
27
30
|
for (var i = 0; i <= offsets.length; i++) {
|
|
28
31
|
if (offsets[i]) {
|
|
29
32
|
var _a = offsets[i].split(":"), offsetBreakpoint = _a[0], offsetSize = _a[1];
|
|
30
|
-
css += " \n @media(min-width: ".concat(breakpoints[offsetBreakpoint], "px){\n margin-left: ").concat((100 * offsetSize) / GRID_COLUMNS, "%;\n }\n ");
|
|
33
|
+
css += " \n @media(min-width: ".concat(breakpoints[offsetBreakpoint], "px){\n margin-left: ").concat((100 * offsetSize) / exports.GRID_COLUMNS, "%;\n }\n ");
|
|
31
34
|
}
|
|
32
35
|
}
|
|
33
36
|
}
|
package/Grid/Grid.mjs
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { __makeTemplateObject } from "tslib";
|
|
2
|
+
import styled from "styled-components";
|
|
3
|
+
export var GRID_COLUMNS = 12;
|
|
4
|
+
export var GRID_GUTTER_DEFAULT = "half";
|
|
5
|
+
export var Container = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"], ["\n max-width: ", "px;\n margin: 0 auto;\n padding: 0 ", "px;\n ", "\n"])), function (p) { return p.theme.breakpoints[p.size]; }, function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.clamp ? "overflow: hidden;" : ""); });
|
|
6
|
+
export var ContainerFluid = styled.div(templateObject_2 || (templateObject_2 = __makeTemplateObject(["\n padding: 0 ", "px;\n"], ["\n padding: 0 ", "px;\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; });
|
|
7
|
+
export var Row = styled.div(templateObject_3 || (templateObject_3 = __makeTemplateObject(["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"], ["\n margin: 0 -", "px;\n display: flex;\n ", "\n ", ";\n ", "\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$noWrap ? "overflow: auto;" : "flex-wrap: wrap;"); }, function (p) { return (p.$valign ? "align-items: ".concat(p.$valign) : ""); }, function (p) {
|
|
8
|
+
return p.$reverse &&
|
|
9
|
+
"@media (".concat(p.$reverse.split(":")[0], "-width: ").concat(p.$reverse.split(":")[1], "px) {\n flex-direction: row-reverse;\n }");
|
|
10
|
+
});
|
|
11
|
+
export var Col = styled.div(templateObject_4 || (templateObject_4 = __makeTemplateObject(["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"], ["\n padding: 0 ", "px;\n display: ", ";\n ", ";\n ", ";\n"])), function (p) { return p.theme.gutter[p.$gutter || GRID_GUTTER_DEFAULT]; }, function (p) { return (p.$flex ? "flex" : "block"); }, function (p) { return (p.$valign ? "align-items: " + p.$valign : ""); }, function (p) { return getColCss(p); });
|
|
12
|
+
function getColWidth(breakpoints, breakpoint, value) {
|
|
13
|
+
var breakpointValue = breakpoints[breakpoint] + "px";
|
|
14
|
+
var width = (value * 100) / GRID_COLUMNS;
|
|
15
|
+
var cssValue = "\n min-width: ".concat(width, "%;\n flex: 0 0 ").concat(width, "%;\n");
|
|
16
|
+
if (breakpoint === Object.keys(breakpoints)[0]) {
|
|
17
|
+
return cssValue;
|
|
18
|
+
}
|
|
19
|
+
return "\n @media (min-width: ".concat(breakpointValue, "){\n ").concat(cssValue, "\n }");
|
|
20
|
+
}
|
|
21
|
+
function getColCss(props) {
|
|
22
|
+
var $auto = props.$auto, $offset = props.$offset, $width = props.$width;
|
|
23
|
+
var breakpoints = props.theme.breakpoints;
|
|
24
|
+
var css = "";
|
|
25
|
+
if ($offset) {
|
|
26
|
+
var offsets = $offset.split(",");
|
|
27
|
+
for (var i = 0; i <= offsets.length; i++) {
|
|
28
|
+
if (offsets[i]) {
|
|
29
|
+
var _a = offsets[i].split(":"), offsetBreakpoint = _a[0], offsetSize = _a[1];
|
|
30
|
+
css += " \n @media(min-width: ".concat(breakpoints[offsetBreakpoint], "px){\n margin-left: ").concat((100 * offsetSize) / GRID_COLUMNS, "%;\n }\n ");
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if ($width) {
|
|
35
|
+
// do nothing, width is set explicitly
|
|
36
|
+
}
|
|
37
|
+
else if ($auto) {
|
|
38
|
+
css += "flex: 0 0 auto; width: auto; max-width: none;";
|
|
39
|
+
}
|
|
40
|
+
else {
|
|
41
|
+
for (var breakpoint in breakpoints) {
|
|
42
|
+
var value = props[breakpoint];
|
|
43
|
+
if (typeof value !== "undefined") {
|
|
44
|
+
css += getColWidth(breakpoints, breakpoint, value);
|
|
45
|
+
}
|
|
46
|
+
else if (breakpoint === "xs") {
|
|
47
|
+
css += getColWidth(breakpoints, breakpoint, 12);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
return css;
|
|
52
|
+
}
|
|
53
|
+
var templateObject_1, templateObject_2, templateObject_3, templateObject_4;
|
package/Grid/index.js
CHANGED
package/Grid/index.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Grid";
|
package/Grid/package.json
CHANGED
package/Hamburger/Hamburger.js
CHANGED
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Hamburger = void 0;
|
|
4
|
+
var tslib_1 = require("tslib");
|
|
5
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
3
6
|
/**
|
|
4
7
|
* @file
|
|
5
8
|
*
|
|
6
9
|
* Simplified from https://github.com/luukdv/hamburger-react
|
|
7
10
|
*/
|
|
8
|
-
|
|
9
|
-
var HamburgerLabel =
|
|
11
|
+
var styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
12
|
+
var HamburgerLabel = styled_components_1.default.div(templateObject_1 || (templateObject_1 = tslib_1.__makeTemplateObject(["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"], ["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"])), function (_a) {
|
|
10
13
|
var $toggled = _a.$toggled;
|
|
11
14
|
return ($toggled ? "0" : "9px");
|
|
12
15
|
});
|
|
@@ -45,8 +48,9 @@ var barStyles = {
|
|
|
45
48
|
background: "currentColor",
|
|
46
49
|
transition: transition,
|
|
47
50
|
};
|
|
48
|
-
|
|
49
|
-
var toggled = _a.toggled, props = __rest(_a, ["toggled"]);
|
|
50
|
-
return (
|
|
51
|
+
var Hamburger = function (_a) {
|
|
52
|
+
var toggled = _a.toggled, props = tslib_1.__rest(_a, ["toggled"]);
|
|
53
|
+
return ((0, jsx_runtime_1.jsxs)("div", tslib_1.__assign({ style: tslib_1.__assign(tslib_1.__assign({}, burgerStyles), { transform: "".concat(toggled ? "rotate(90deg)" : "none") }), tabIndex: 0 }, props, { children: [(0, jsx_runtime_1.jsx)("div", { style: tslib_1.__assign(tslib_1.__assign({}, barStyles), { top: "".concat(topOffset, "px"), transform: "".concat(toggled ? "rotate(-45deg) translate(0px, ".concat(move, "px)") : "none") }) }), (0, jsx_runtime_1.jsx)("div", { style: tslib_1.__assign(tslib_1.__assign({}, barStyles), { top: "".concat(topOffset + barHeight + margin, "px"), transform: "".concat(toggled ? "rotate(45deg) translate(0, -".concat(move, "px)") : "none") }) }), (0, jsx_runtime_1.jsx)(HamburgerLabel, tslib_1.__assign({ "$toggled": toggled }, { children: "Menu" }))] })));
|
|
51
54
|
};
|
|
55
|
+
exports.Hamburger = Hamburger;
|
|
52
56
|
var templateObject_1;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { __assign, __makeTemplateObject, __rest } from "tslib";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
/**
|
|
4
|
+
* @file
|
|
5
|
+
*
|
|
6
|
+
* Simplified from https://github.com/luukdv/hamburger-react
|
|
7
|
+
*/
|
|
8
|
+
import styled from "styled-components";
|
|
9
|
+
var HamburgerLabel = styled.div(templateObject_1 || (templateObject_1 = __makeTemplateObject(["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"], ["\n position: absolute;\n top: 30px;\n font-size: ", ";\n text-transform: uppercase;\n left: 7px;\n letter-spacing: 3px;\n"])), function (_a) {
|
|
10
|
+
var $toggled = _a.$toggled;
|
|
11
|
+
return ($toggled ? "0" : "9px");
|
|
12
|
+
});
|
|
13
|
+
var area = 48;
|
|
14
|
+
var lines = 3;
|
|
15
|
+
var width = 32;
|
|
16
|
+
var room = Math.round((area - width) / 2);
|
|
17
|
+
var barHeightRaw = width / 12;
|
|
18
|
+
var barHeight = Math.round(barHeightRaw);
|
|
19
|
+
var space = 0.5;
|
|
20
|
+
var marginRaw = width / (lines * (space + (lines === 3 ? 1 : 1.25)));
|
|
21
|
+
var margin = Math.round(marginRaw);
|
|
22
|
+
var height = barHeight * lines + margin * (lines - 1);
|
|
23
|
+
var topOffset = Math.round((area - height) / 2);
|
|
24
|
+
var translate = 4.6325;
|
|
25
|
+
var deviation = (barHeightRaw - barHeight + (marginRaw - margin)) / (lines === 3 ? 1 : 2);
|
|
26
|
+
var move = parseFloat((width / translate - deviation / (4 / 3)).toFixed(2));
|
|
27
|
+
var time = 0.4;
|
|
28
|
+
var easing = "cubic-bezier(0, 0, 0, 1)";
|
|
29
|
+
var transition = "".concat(time, "s ").concat(easing);
|
|
30
|
+
var burgerStyles = {
|
|
31
|
+
marginRight: "-8px",
|
|
32
|
+
position: "relative",
|
|
33
|
+
width: "".concat(area, "px"),
|
|
34
|
+
height: "".concat(area, "px"),
|
|
35
|
+
userSelect: "none",
|
|
36
|
+
outline: "0px",
|
|
37
|
+
cursor: "pointer",
|
|
38
|
+
transition: transition,
|
|
39
|
+
};
|
|
40
|
+
var barStyles = {
|
|
41
|
+
position: "absolute",
|
|
42
|
+
width: "".concat(width, "px"),
|
|
43
|
+
height: "".concat(barHeight, "px"),
|
|
44
|
+
left: "".concat(room, "px"),
|
|
45
|
+
background: "currentColor",
|
|
46
|
+
transition: transition,
|
|
47
|
+
};
|
|
48
|
+
export var Hamburger = function (_a) {
|
|
49
|
+
var toggled = _a.toggled, props = __rest(_a, ["toggled"]);
|
|
50
|
+
return (_jsxs("div", __assign({ style: __assign(__assign({}, burgerStyles), { transform: "".concat(toggled ? "rotate(90deg)" : "none") }), tabIndex: 0 }, props, { children: [_jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset, "px"), transform: "".concat(toggled ? "rotate(-45deg) translate(0px, ".concat(move, "px)") : "none") }) }), _jsx("div", { style: __assign(__assign({}, barStyles), { top: "".concat(topOffset + barHeight + margin, "px"), transform: "".concat(toggled ? "rotate(45deg) translate(0, -".concat(move, "px)") : "none") }) }), _jsx(HamburgerLabel, __assign({ "$toggled": toggled }, { children: "Menu" }))] })));
|
|
51
|
+
};
|
|
52
|
+
var templateObject_1;
|