@koine/react 1.0.9 → 1.0.10
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/package.json +22 -9
- package/Alert/Alert.d.ts +0 -5
- package/Alert/Alert.js +0 -16
- package/Alert/index.d.ts +0 -1
- package/Alert/index.js +0 -1
- package/Alert/package.json +0 -6
- package/Animations/Reveal.d.ts +0 -4
- package/Animations/Reveal.js +0 -15
- package/Animations/Underline.d.ts +0 -1
- package/Animations/Underline.js +0 -15
- package/Animations/index.d.ts +0 -3
- package/Animations/index.js +0 -3
- package/Animations/package.json +0 -6
- package/Animations/useReveal.d.ts +0 -33
- package/Animations/useReveal.js +0 -70
- package/Autocomplete/AutocompleteDownshift.d.ts +0 -1
- package/Autocomplete/AutocompleteDownshift.js +0 -158
- package/Autocomplete/AutocompleteDownshiftMultiselect.d.ts +0 -1
- package/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -353
- package/Autocomplete/AutocompleteMui.d.ts +0 -47
- package/Autocomplete/AutocompleteMui.js +0 -177
- package/Autocomplete/AutocompleteReach.d.ts +0 -1
- package/Autocomplete/AutocompleteReach.js +0 -112
- package/Autocomplete/components.d.ts +0 -21
- package/Autocomplete/components.js +0 -89
- package/Autocomplete/helpers.d.ts +0 -3
- package/Autocomplete/helpers.js +0 -28
- package/Autocomplete/index.d.ts +0 -2
- package/Autocomplete/index.js +0 -3
- package/Autocomplete/package.json +0 -6
- package/Bg/BgColor.d.ts +0 -36
- package/Bg/BgColor.js +0 -31
- package/Bg/BgPhoto.d.ts +0 -13
- package/Bg/BgPhoto.js +0 -59
- package/Bg/BgSvg.d.ts +0 -7
- package/Bg/BgSvg.js +0 -15
- package/Bg/index.d.ts +0 -3
- package/Bg/index.js +0 -3
- package/Bg/package.json +0 -6
- package/Breadcrumbs/Breadcrumbs.d.ts +0 -13
- package/Breadcrumbs/Breadcrumbs.js +0 -67
- package/Breadcrumbs/index.d.ts +0 -1
- package/Breadcrumbs/index.js +0 -1
- package/Breadcrumbs/package.json +0 -6
- package/Buttons/Button.d.ts +0 -18
- package/Buttons/Button.js +0 -79
- package/Buttons/ButtonComposite.d.ts +0 -23
- package/Buttons/ButtonComposite.js +0 -49
- package/Buttons/ButtonFab.d.ts +0 -7
- package/Buttons/ButtonFab.js +0 -8
- package/Buttons/ButtonLink.d.ts +0 -8
- package/Buttons/ButtonLink.js +0 -10
- package/Buttons/IconButton.d.ts +0 -11
- package/Buttons/IconButton.js +0 -19
- package/Buttons/index.d.ts +0 -5
- package/Buttons/index.js +0 -5
- package/Buttons/package.json +0 -6
- package/Calendar/CalendarDaygridCell.d.ts +0 -36
- package/Calendar/CalendarDaygridCell.js +0 -51
- package/Calendar/CalendarDaygridNav.d.ts +0 -27
- package/Calendar/CalendarDaygridNav.js +0 -22
- package/Calendar/CalendarDaygridTable.d.ts +0 -25
- package/Calendar/CalendarDaygridTable.js +0 -55
- package/Calendar/CalendarLegend.d.ts +0 -19
- package/Calendar/CalendarLegend.js +0 -11
- package/Calendar/calendar-api-google.d.ts +0 -18
- package/Calendar/calendar-api-google.js +0 -94
- package/Calendar/index.d.ts +0 -6
- package/Calendar/index.js +0 -6
- package/Calendar/package.json +0 -6
- package/Calendar/types.d.ts +0 -81
- package/Calendar/types.js +0 -1
- package/Calendar/useCalendar.d.ts +0 -49
- package/Calendar/useCalendar.js +0 -182
- package/Calendar/utils.d.ts +0 -11
- package/Calendar/utils.js +0 -203
- package/Carousel/Carousel.d.ts +0 -1
- package/Carousel/Carousel.js +0 -378
- package/Carousel/CarouselCss.d.ts +0 -47
- package/Carousel/CarouselCss.js +0 -36
- package/Carousel/index.d.ts +0 -1
- package/Carousel/index.js +0 -1
- package/Carousel/package.json +0 -6
- package/Collapsable/Collapsable.d.ts +0 -1
- package/Collapsable/Collapsable.js +0 -1
- package/Collapsable/CollapsableReach.d.ts +0 -66
- package/Collapsable/CollapsableReach.js +0 -135
- package/Collapsable/index.d.ts +0 -1
- package/Collapsable/index.js +0 -1
- package/Collapsable/package.json +0 -6
- package/Debug/Debug.d.ts +0 -4
- package/Debug/Debug.js +0 -21
- package/Debug/index.d.ts +0 -1
- package/Debug/index.js +0 -1
- package/Debug/package.json +0 -6
- package/Dialog/DialogMui.d.ts +0 -139
- package/Dialog/DialogMui.js +0 -78
- package/Dialog/css/bare.d.ts +0 -145
- package/Dialog/css/bare.js +0 -19
- package/Dialog/index.d.ts +0 -2
- package/Dialog/index.js +0 -1
- package/Dialog/m/bare.d.ts +0 -56
- package/Dialog/m/bare.js +0 -48
- package/Dialog/m/basic.d.ts +0 -4
- package/Dialog/m/basic.js +0 -31
- package/Dialog/m/index.d.ts +0 -2
- package/Dialog/m/index.js +0 -4
- package/Dialog/m/package.json +0 -6
- package/Dialog/package.json +0 -6
- package/Dialog/sc/bare.d.ts +0 -105
- package/Dialog/sc/bare.js +0 -61
- package/Dialog/sc/framer.d.ts +0 -80
- package/Dialog/sc/framer.js +0 -16
- package/Dialog/sc/framerMaterial.d.ts +0 -79
- package/Dialog/sc/framerMaterial.js +0 -16
- package/Dialog/sc/material.d.ts +0 -94
- package/Dialog/sc/material.js +0 -41
- package/Dialog/tw/bare.d.ts +0 -196
- package/Dialog/tw/bare.js +0 -36
- package/Dialog/tw/elegant.d.ts +0 -244
- package/Dialog/tw/elegant.js +0 -18
- package/Dialog/tw/framer.d.ts +0 -112
- package/Dialog/tw/framer.js +0 -16
- package/Dialog/tw/framerMaterial.d.ts +0 -167
- package/Dialog/tw/framerMaterial.js +0 -16
- package/Dialog/tw/material.d.ts +0 -244
- package/Dialog/tw/material.js +0 -18
- package/Editor/Editor--tiptap.d.ts +0 -9
- package/Editor/Editor--tiptap.js +0 -23
- package/Editor/components.d.ts +0 -7
- package/Editor/components.js +0 -28
- package/Editor/index.d.ts +0 -1
- package/Editor/index.js +0 -1
- package/Editor/package.json +0 -6
- package/Favicon/FaviconTags.d.ts +0 -18
- package/Favicon/FaviconTags.js +0 -14
- package/Favicon/index.d.ts +0 -1
- package/Favicon/index.js +0 -1
- package/Favicon/package.json +0 -6
- package/Forms/Checkbox/Checkbox.d.ts +0 -11
- package/Forms/Checkbox/Checkbox.js +0 -24
- package/Forms/Checkbox/index.d.ts +0 -1
- package/Forms/Checkbox/index.js +0 -1
- package/Forms/Checkbox/package.json +0 -6
- package/Forms/Feedback/Feedback.d.ts +0 -5
- package/Forms/Feedback/Feedback.js +0 -10
- package/Forms/Feedback/index.d.ts +0 -1
- package/Forms/Feedback/index.js +0 -1
- package/Forms/Feedback/package.json +0 -6
- package/Forms/Field/Field.d.ts +0 -15
- package/Forms/Field/Field.js +0 -59
- package/Forms/Field/FieldControl.d.ts +0 -26
- package/Forms/Field/FieldControl.js +0 -43
- package/Forms/Field/FieldHint.d.ts +0 -1
- package/Forms/Field/FieldHint.js +0 -6
- package/Forms/Field/index.d.ts +0 -2
- package/Forms/Field/index.js +0 -2
- package/Forms/Field/package.json +0 -6
- package/Forms/Form/Form.d.ts +0 -31
- package/Forms/Form/Form.js +0 -62
- package/Forms/Form/index.d.ts +0 -1
- package/Forms/Form/index.js +0 -1
- package/Forms/Form/package.json +0 -6
- package/Forms/Input/Input.d.ts +0 -9
- package/Forms/Input/Input.js +0 -23
- package/Forms/Input/index.d.ts +0 -1
- package/Forms/Input/index.js +0 -1
- package/Forms/Input/package.json +0 -6
- package/Forms/InputGroup/InputGroup.d.ts +0 -13
- package/Forms/InputGroup/InputGroup.js +0 -42
- package/Forms/InputGroup/index.d.ts +0 -1
- package/Forms/InputGroup/index.js +0 -1
- package/Forms/InputGroup/package.json +0 -6
- package/Forms/Label/Label.d.ts +0 -3
- package/Forms/Label/Label.js +0 -24
- package/Forms/Label/index.d.ts +0 -1
- package/Forms/Label/index.js +0 -1
- package/Forms/Label/package.json +0 -6
- package/Forms/Password/Password.d.ts +0 -5
- package/Forms/Password/Password.js +0 -30
- package/Forms/Password/index.d.ts +0 -1
- package/Forms/Password/index.js +0 -1
- package/Forms/Password/package.json +0 -6
- package/Forms/Radio/Radio.d.ts +0 -12
- package/Forms/Radio/Radio.js +0 -28
- package/Forms/Radio/index.d.ts +0 -1
- package/Forms/Radio/index.js +0 -1
- package/Forms/Radio/package.json +0 -6
- package/Forms/Switch/Switch.d.ts +0 -9
- package/Forms/Switch/Switch.js +0 -50
- package/Forms/Switch/index.d.ts +0 -1
- package/Forms/Switch/index.js +0 -1
- package/Forms/Switch/package.json +0 -6
- package/Forms/Textarea/Textarea.d.ts +0 -5
- package/Forms/Textarea/Textarea.js +0 -13
- package/Forms/Textarea/TextareaRich.d.ts +0 -6
- package/Forms/Textarea/TextareaRich.js +0 -42
- package/Forms/Textarea/index.d.ts +0 -2
- package/Forms/Textarea/index.js +0 -2
- package/Forms/Textarea/package.json +0 -6
- package/Forms/Toggle/Toggle.d.ts +0 -19
- package/Forms/Toggle/Toggle.js +0 -79
- package/Forms/Toggle/index.d.ts +0 -1
- package/Forms/Toggle/index.js +0 -1
- package/Forms/Toggle/package.json +0 -6
- package/Forms/Toggle/useToggle.d.ts +0 -46
- package/Forms/Toggle/useToggle.js +0 -145
- package/Forms/antispam.d.ts +0 -24
- package/Forms/antispam.js +0 -56
- package/Forms/helpers.d.ts +0 -26
- package/Forms/helpers.js +0 -44
- package/Forms/index.d.ts +0 -16
- package/Forms/index.js +0 -17
- package/Forms/package.json +0 -6
- package/Forms/styles.d.ts +0 -19
- package/Forms/styles.js +0 -60
- package/Gauge/Gauge.d.ts +0 -5
- package/Gauge/Gauge.js +0 -102
- package/Grid/Grid.d.ts +0 -64
- package/Grid/Grid.js +0 -79
- package/Grid/index.d.ts +0 -1
- package/Grid/index.js +0 -1
- package/Grid/package.json +0 -6
- package/Hamburger/Hamburger.d.ts +0 -6
- package/Hamburger/Hamburger.js +0 -64
- package/Hamburger/index.d.ts +0 -1
- package/Hamburger/index.js +0 -1
- package/Hamburger/package.json +0 -6
- package/Header/index.d.ts +0 -1
- package/Header/index.js +0 -1
- package/Header/package.json +0 -6
- package/Header/useHeader.d.ts +0 -24
- package/Header/useHeader.js +0 -30
- package/Hidden/Hidden.d.ts +0 -6
- package/Hidden/Hidden.js +0 -14
- package/Hidden/index.d.ts +0 -1
- package/Hidden/index.js +0 -1
- package/Hidden/package.json +0 -6
- package/Img/index.d.ts +0 -1
- package/Img/index.js +0 -1
- package/Img/package.json +0 -6
- package/Img/sc/bare.d.ts +0 -2
- package/Img/sc/bare.js +0 -37
- package/Img/types.d.ts +0 -9
- package/Img/types.js +0 -1
- package/Link/Link.d.ts +0 -5
- package/Link/Link.js +0 -2
- package/Link/LinkBlank.d.ts +0 -8
- package/Link/LinkBlank.js +0 -26
- package/Link/index.d.ts +0 -2
- package/Link/index.js +0 -2
- package/Link/package.json +0 -6
- package/Menu/Menu.d.ts +0 -1
- package/Menu/Menu.js +0 -11
- package/Menu/index.d.ts +0 -1
- package/Menu/index.js +0 -1
- package/Menu/package.json +0 -6
- package/MenuItem/MenuItem.d.ts +0 -4
- package/MenuItem/MenuItem.js +0 -20
- package/MenuItem/index.d.ts +0 -1
- package/MenuItem/index.js +0 -1
- package/MenuItem/package.json +0 -6
- package/Meta/Meta.d.ts +0 -14
- package/Meta/Meta.js +0 -4
- package/Meta/index.d.ts +0 -1
- package/Meta/index.js +0 -1
- package/Meta/package.json +0 -6
- package/NoJs/NoJs.d.ts +0 -2
- package/NoJs/NoJs.js +0 -6
- package/NoJs/index.d.ts +0 -1
- package/NoJs/index.js +0 -1
- package/NoJs/package.json +0 -6
- package/Pagination/PaginationNav.d.ts +0 -22
- package/Pagination/PaginationNav.js +0 -83
- package/Pagination/PaginationResults.d.ts +0 -3
- package/Pagination/PaginationResults.js +0 -10
- package/Pagination/index.d.ts +0 -2
- package/Pagination/index.js +0 -2
- package/Pagination/package.json +0 -6
- package/Pill/Pill.d.ts +0 -5
- package/Pill/Pill.js +0 -37
- package/Pill/index.d.ts +0 -1
- package/Pill/index.js +0 -1
- package/Pill/package.json +0 -6
- package/Progress/ProgressCircular.d.ts +0 -19
- package/Progress/ProgressCircular.js +0 -36
- package/Progress/ProgressLinear.d.ts +0 -22
- package/Progress/ProgressLinear.js +0 -32
- package/Progress/ProgressOverlay.d.ts +0 -4
- package/Progress/ProgressOverlay.js +0 -40
- package/Progress/index.d.ts +0 -3
- package/Progress/index.js +0 -3
- package/Progress/package.json +0 -6
- package/Rating/Rating.d.ts +0 -35
- package/Rating/Rating.js +0 -90
- package/Rating/index.d.ts +0 -11
- package/Rating/index.js +0 -45
- package/Rating/package.json +0 -6
- package/Select/SelectDownshift.d.ts +0 -5
- package/Select/SelectDownshift.js +0 -38
- package/Select/components.d.ts +0 -6
- package/Select/components.js +0 -18
- package/Select/index.d.ts +0 -2
- package/Select/index.js +0 -3
- package/Select/package.json +0 -6
- package/Sidebar/Sidebar.d.ts +0 -3
- package/Sidebar/Sidebar.js +0 -48
- package/Sidebar/index.d.ts +0 -1
- package/Sidebar/index.js +0 -1
- package/Sidebar/package.json +0 -6
- package/Spacing/Spacing.d.ts +0 -30
- package/Spacing/Spacing.js +0 -45
- package/Spacing/index.d.ts +0 -1
- package/Spacing/index.js +0 -1
- package/Spacing/package.json +0 -6
- package/Sticky/Sticky.d.ts +0 -2
- package/Sticky/Sticky.js +0 -219
- package/Sticky/StickyCss.d.ts +0 -5
- package/Sticky/StickyCss.js +0 -4
- package/Sticky/index.d.ts +0 -1
- package/Sticky/index.js +0 -1
- package/Sticky/package.json +0 -6
- package/Tabs/Tabs.d.ts +0 -27
- package/Tabs/Tabs.js +0 -62
- package/Tabs/index.d.ts +0 -1
- package/Tabs/index.js +0 -1
- package/Tabs/package.json +0 -6
- package/Typography/CopyPasteVisible.d.ts +0 -1
- package/Typography/CopyPasteVisible.js +0 -6
- package/Typography/Native.d.ts +0 -10
- package/Typography/Native.js +0 -47
- package/Typography/ReadMore.d.ts +0 -12
- package/Typography/ReadMore.js +0 -69
- package/Typography/TextLoop.d.ts +0 -16
- package/Typography/TextLoop.js +0 -49
- package/Typography/TypeStairs.d.ts +0 -6
- package/Typography/TypeStairs.js +0 -46
- package/Typography/index.d.ts +0 -5
- package/Typography/index.js +0 -5
- package/Typography/package.json +0 -6
- package/css/index.d.ts +0 -2
- package/css/index.js +0 -30
- package/css/package.json +0 -6
- package/helpers/classed.d.ts +0 -22
- package/helpers/classed.js +0 -64
- package/helpers/extend-component.d.ts +0 -28
- package/helpers/extend-component.js +0 -12
- package/helpers/index.d.ts +0 -3
- package/helpers/index.js +0 -2
- package/helpers/package.json +0 -6
- package/hooks/index.d.ts +0 -6
- package/hooks/index.js +0 -7
- package/hooks/package.json +0 -6
- package/hooks/useDateLocale.d.ts +0 -7
- package/hooks/useDateLocale.js +0 -29
- package/hooks/useFocus.d.ts +0 -4
- package/hooks/useFocus.js +0 -11
- package/hooks/usePrevious.d.ts +0 -1
- package/hooks/usePrevious.js +0 -8
- package/hooks/useScrollPosition.d.ts +0 -15
- package/hooks/useScrollPosition.js +0 -75
- package/hooks/useScrollTo.d.ts +0 -1
- package/hooks/useScrollTo.js +0 -19
- package/hooks/useTraceUpdate.d.ts +0 -4
- package/hooks/useTraceUpdate.js +0 -20
- package/hooks/useWindowSize.d.ts +0 -1
- package/hooks/useWindowSize.js +0 -13
- package/index.d.ts +0 -1
- package/index.js +0 -5
- package/m/MotionProvider.d.ts +0 -37
- package/m/MotionProvider.js +0 -37
- package/m/index.d.ts +0 -6
- package/m/index.js +0 -6
- package/m/lite.d.ts +0 -2
- package/m/lite.js +0 -2
- package/m/max.d.ts +0 -2
- package/m/max.js +0 -2
- package/m/package.json +0 -6
- package/node/Alert/Alert.js +0 -21
- package/node/Alert/index.js +0 -4
- package/node/Animations/Reveal.js +0 -19
- package/node/Animations/Underline.js +0 -19
- package/node/Animations/index.js +0 -6
- package/node/Animations/useReveal.js +0 -74
- package/node/Autocomplete/AutocompleteDownshift.js +0 -161
- package/node/Autocomplete/AutocompleteDownshiftMultiselect.js +0 -356
- package/node/Autocomplete/AutocompleteMui.js +0 -175
- package/node/Autocomplete/AutocompleteReach.js +0 -115
- package/node/Autocomplete/components.js +0 -93
- package/node/Autocomplete/helpers.js +0 -32
- package/node/Autocomplete/index.js +0 -7
- package/node/Bg/BgColor.js +0 -36
- package/node/Bg/BgPhoto.js +0 -64
- package/node/Bg/BgSvg.js +0 -20
- package/node/Bg/index.js +0 -6
- package/node/Breadcrumbs/Breadcrumbs.js +0 -72
- package/node/Breadcrumbs/index.js +0 -4
- package/node/Buttons/Button.js +0 -83
- package/node/Buttons/ButtonComposite.js +0 -54
- package/node/Buttons/ButtonFab.js +0 -12
- package/node/Buttons/ButtonLink.js +0 -15
- package/node/Buttons/IconButton.js +0 -23
- package/node/Buttons/index.js +0 -8
- package/node/Calendar/CalendarDaygridCell.js +0 -55
- package/node/Calendar/CalendarDaygridNav.js +0 -27
- package/node/Calendar/CalendarDaygridTable.js +0 -60
- package/node/Calendar/CalendarLegend.js +0 -15
- package/node/Calendar/calendar-api-google.js +0 -99
- package/node/Calendar/index.js +0 -9
- package/node/Calendar/types.js +0 -2
- package/node/Calendar/useCalendar.js +0 -186
- package/node/Calendar/utils.js +0 -217
- package/node/Carousel/Carousel.js +0 -381
- package/node/Carousel/CarouselCss.js +0 -41
- package/node/Carousel/index.js +0 -4
- package/node/Collapsable/Collapsable.js +0 -4
- package/node/Collapsable/CollapsableReach.js +0 -141
- package/node/Collapsable/index.js +0 -4
- package/node/Debug/Debug.js +0 -26
- package/node/Debug/index.js +0 -4
- package/node/Dialog/DialogMui.js +0 -82
- package/node/Dialog/css/bare.js +0 -23
- package/node/Dialog/index.js +0 -5
- package/node/Dialog/m/bare.js +0 -51
- package/node/Dialog/m/basic.js +0 -35
- package/node/Dialog/m/index.js +0 -8
- package/node/Dialog/sc/bare.js +0 -65
- package/node/Dialog/sc/framer.js +0 -19
- package/node/Dialog/sc/framerMaterial.js +0 -19
- package/node/Dialog/sc/material.js +0 -45
- package/node/Dialog/tw/bare.js +0 -40
- package/node/Dialog/tw/elegant.js +0 -21
- package/node/Dialog/tw/framer.js +0 -19
- package/node/Dialog/tw/framerMaterial.js +0 -19
- package/node/Dialog/tw/material.js +0 -21
- package/node/Editor/Editor--tiptap.js +0 -29
- package/node/Editor/components.js +0 -34
- package/node/Editor/index.js +0 -4
- package/node/Favicon/FaviconTags.js +0 -18
- package/node/Favicon/index.js +0 -4
- package/node/Forms/Checkbox/Checkbox.js +0 -28
- package/node/Forms/Checkbox/index.js +0 -4
- package/node/Forms/Feedback/Feedback.js +0 -15
- package/node/Forms/Feedback/index.js +0 -4
- package/node/Forms/Field/Field.js +0 -64
- package/node/Forms/Field/FieldControl.js +0 -47
- package/node/Forms/Field/FieldHint.js +0 -10
- package/node/Forms/Field/index.js +0 -5
- package/node/Forms/Form/Form.js +0 -67
- package/node/Forms/Form/index.js +0 -4
- package/node/Forms/Input/Input.js +0 -27
- package/node/Forms/Input/index.js +0 -4
- package/node/Forms/InputGroup/InputGroup.js +0 -47
- package/node/Forms/InputGroup/index.js +0 -4
- package/node/Forms/Label/Label.js +0 -28
- package/node/Forms/Label/index.js +0 -4
- package/node/Forms/Password/Password.js +0 -34
- package/node/Forms/Password/index.js +0 -4
- package/node/Forms/Radio/Radio.js +0 -32
- package/node/Forms/Radio/index.js +0 -4
- package/node/Forms/Switch/Switch.js +0 -54
- package/node/Forms/Switch/index.js +0 -4
- package/node/Forms/Textarea/Textarea.js +0 -17
- package/node/Forms/Textarea/TextareaRich.js +0 -46
- package/node/Forms/Textarea/index.js +0 -5
- package/node/Forms/Toggle/Toggle.js +0 -85
- package/node/Forms/Toggle/index.js +0 -4
- package/node/Forms/Toggle/useToggle.js +0 -149
- package/node/Forms/antispam.js +0 -61
- package/node/Forms/helpers.js +0 -51
- package/node/Forms/index.js +0 -20
- package/node/Forms/styles.js +0 -64
- package/node/Gauge/Gauge.js +0 -106
- package/node/Grid/Grid.js +0 -83
- package/node/Grid/index.js +0 -4
- package/node/Hamburger/Hamburger.js +0 -69
- 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 -18
- package/node/Hidden/index.js +0 -4
- package/node/Img/index.js +0 -4
- package/node/Img/sc/bare.js +0 -41
- package/node/Img/types.js +0 -2
- package/node/Link/Link.js +0 -6
- package/node/Link/LinkBlank.js +0 -31
- package/node/Link/index.js +0 -5
- package/node/Menu/Menu.js +0 -15
- package/node/Menu/index.js +0 -4
- package/node/MenuItem/MenuItem.js +0 -24
- package/node/MenuItem/index.js +0 -4
- package/node/Meta/Meta.js +0 -8
- package/node/Meta/index.js +0 -4
- package/node/NoJs/NoJs.js +0 -10
- package/node/NoJs/index.js +0 -4
- package/node/Pagination/PaginationNav.js +0 -88
- package/node/Pagination/PaginationResults.js +0 -15
- package/node/Pagination/index.js +0 -5
- package/node/Pill/Pill.js +0 -41
- package/node/Pill/index.js +0 -4
- package/node/Progress/ProgressCircular.js +0 -41
- package/node/Progress/ProgressLinear.js +0 -37
- package/node/Progress/ProgressOverlay.js +0 -45
- package/node/Progress/index.js +0 -6
- package/node/Rating/Rating.js +0 -96
- package/node/Rating/index.js +0 -53
- package/node/Select/SelectDownshift.js +0 -41
- package/node/Select/components.js +0 -22
- package/node/Select/index.js +0 -7
- package/node/Sidebar/Sidebar.js +0 -53
- package/node/Sidebar/index.js +0 -4
- package/node/Spacing/Spacing.js +0 -50
- package/node/Spacing/index.js +0 -4
- package/node/Sticky/Sticky.js +0 -222
- package/node/Sticky/StickyCss.js +0 -8
- package/node/Sticky/index.js +0 -4
- package/node/Tabs/Tabs.js +0 -67
- package/node/Tabs/index.js +0 -4
- package/node/Typography/CopyPasteVisible.js +0 -10
- package/node/Typography/Native.js +0 -51
- package/node/Typography/ReadMore.js +0 -74
- package/node/Typography/TextLoop.js +0 -54
- package/node/Typography/TypeStairs.js +0 -49
- package/node/Typography/index.js +0 -8
- package/node/css/index.js +0 -35
- package/node/helpers/classed.js +0 -68
- package/node/helpers/extend-component.js +0 -16
- package/node/helpers/index.js +0 -5
- package/node/hooks/index.js +0 -10
- package/node/hooks/useDateLocale.js +0 -56
- package/node/hooks/useFocus.js +0 -15
- package/node/hooks/usePrevious.js +0 -12
- package/node/hooks/useScrollPosition.js +0 -80
- package/node/hooks/useScrollTo.js +0 -23
- package/node/hooks/useTraceUpdate.js +0 -24
- package/node/hooks/useWindowSize.js +0 -17
- package/node/index.js +0 -8
- package/node/m/MotionProvider.js +0 -41
- 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 -35
- package/node/scm/index.js +0 -35
- package/node/shared/index.js +0 -11
- package/node/styles/Body.js +0 -21
- package/node/styles/Global.js +0 -53
- package/node/styles/index.js +0 -10
- package/node/styles/media.js +0 -156
- package/node/styles/spacing.js +0 -53
- package/node/styles/styled.js +0 -31
- package/node/styles/theme--vanilla.js +0 -59
- package/node/styles/theme.js +0 -45
- package/node/tw/index.js +0 -35
- package/node/twm/index.js +0 -35
- package/node/types.js +0 -2
- package/sc/index.d.ts +0 -29
- package/sc/index.js +0 -30
- package/sc/package.json +0 -6
- package/scm/index.d.ts +0 -29
- package/scm/index.js +0 -30
- package/scm/package.json +0 -6
- package/shared/index.d.ts +0 -8
- package/shared/index.js +0 -8
- package/shared/package.json +0 -6
- package/styles/Body.d.ts +0 -10
- package/styles/Body.js +0 -17
- package/styles/Global.d.ts +0 -15
- package/styles/Global.js +0 -50
- package/styles/index.d.ts +0 -7
- package/styles/index.js +0 -7
- package/styles/media.d.ts +0 -67
- package/styles/media.js +0 -150
- package/styles/package.json +0 -6
- package/styles/spacing.d.ts +0 -13
- package/styles/spacing.js +0 -46
- package/styles/styled.d.ts +0 -12
- package/styles/styled.js +0 -27
- package/styles/theme--vanilla.d.ts +0 -18
- package/styles/theme--vanilla.js +0 -53
- package/styles/theme.d.ts +0 -82
- package/styles/theme.js +0 -41
- package/tw/index.d.ts +0 -2
- package/tw/index.js +0 -30
- package/tw/package.json +0 -6
- package/twm/index.d.ts +0 -2
- package/twm/index.js +0 -30
- package/twm/package.json +0 -6
- package/types.d.ts +0 -10
- package/types.js +0 -1
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.Textarea = exports.TextareaNative = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
-
const Label_1 = require("../Label/Label");
|
|
9
|
-
const styles_1 = require("../styles");
|
|
10
|
-
exports.TextareaNative = styled_components_1.default.textarea `
|
|
11
|
-
${styles_1.inputBase}
|
|
12
|
-
${styles_1.inputFocus}
|
|
13
|
-
resize: vertical;
|
|
14
|
-
`;
|
|
15
|
-
exports.Textarea = (0, react_1.forwardRef)(function Textarea({ register, name, label, ...props }, ref) {
|
|
16
|
-
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [label && (0, jsx_runtime_1.jsx)(Label_1.Label, { children: label }), (0, jsx_runtime_1.jsx)(exports.TextareaNative, { ...(register ? register(name) : { name, ref }), ...props })] }));
|
|
17
|
-
});
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.TextareaRich = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
8
|
-
// import TextareaAutosize from "@mui/base/TextareaAutosize";
|
|
9
|
-
const Label_1 = require("../Label/Label");
|
|
10
|
-
const Editor_1 = require("../../Editor");
|
|
11
|
-
const helpers_1 = require("../helpers");
|
|
12
|
-
const Root = styled_components_1.default.div `
|
|
13
|
-
.ProseMirror {
|
|
14
|
-
max-height: 160px;
|
|
15
|
-
overflow: auto;
|
|
16
|
-
}
|
|
17
|
-
.EditorContent {
|
|
18
|
-
position: relative;
|
|
19
|
-
&:after {
|
|
20
|
-
position: absolute;
|
|
21
|
-
content: "";
|
|
22
|
-
bottom: 0;
|
|
23
|
-
left: 0;
|
|
24
|
-
right: 16px; /* scrollbar width? */
|
|
25
|
-
height: 3em;
|
|
26
|
-
background: linear-gradient(0deg, white, white 33%, transparent);
|
|
27
|
-
pointer-events: none;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
`;
|
|
31
|
-
exports.TextareaRich = (0, react_1.forwardRef)(function TextareaRich({ register, setValue, name, label, defaultValue = "", onChange, ...props }, ref) {
|
|
32
|
-
if (register)
|
|
33
|
-
register(name);
|
|
34
|
-
return ((0, jsx_runtime_1.jsxs)(Root, { children: [label && (0, jsx_runtime_1.jsx)(Label_1.Label, { children: label }), (0, jsx_runtime_1.jsx)(Editor_1.Editor, { options: {
|
|
35
|
-
// element: <TextareaAutosize />,
|
|
36
|
-
content: defaultValue,
|
|
37
|
-
onUpdate: (onChange || setValue) && name
|
|
38
|
-
? ({ editor }) => {
|
|
39
|
-
const value = editor.getHTML();
|
|
40
|
-
if (setValue)
|
|
41
|
-
setValue(name, value);
|
|
42
|
-
(0, helpers_1.triggerOnChange)(onChange, name, value);
|
|
43
|
-
}
|
|
44
|
-
: undefined,
|
|
45
|
-
}, ...props })] }));
|
|
46
|
-
});
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ToggleIndicatorRounded = exports.ToggleIndicatorSquared = exports.ToggleIndicatorFg = exports.ToggleIndicatorBgCircle = exports.ToggleIndicatorBgSquare = exports.ToggleIndicatorHolder = exports.ToggleLabelSub = exports.ToggleLabel = exports.Toggle = exports.toggleIndicatorFg = exports.toggleIndicatorBgShape = exports.toggleIndicatorBg = exports.toggleBase = void 0;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
/**
|
|
7
|
-
* @file
|
|
8
|
-
*
|
|
9
|
-
* About accessibility:
|
|
10
|
-
* - minimum target size of 44px https://www.w3.org/TR/WCAG21/#target-size
|
|
11
|
-
*/
|
|
12
|
-
const react_1 = require("react");
|
|
13
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
14
|
-
const styled_1 = require("../../styles/styled");
|
|
15
|
-
exports.toggleBase = `
|
|
16
|
-
border: 1px solid var(--forms-border-color);
|
|
17
|
-
`;
|
|
18
|
-
exports.toggleIndicatorBg = `
|
|
19
|
-
display: inline-block;
|
|
20
|
-
flex-shrink: 0;
|
|
21
|
-
width: 100%;
|
|
22
|
-
height: 100%;
|
|
23
|
-
`;
|
|
24
|
-
exports.toggleIndicatorBgShape = `
|
|
25
|
-
${exports.toggleIndicatorBg}
|
|
26
|
-
fill: none;
|
|
27
|
-
stroke-width: 2px;
|
|
28
|
-
stroke: var(--forms-border-color);
|
|
29
|
-
`;
|
|
30
|
-
exports.toggleIndicatorFg = `
|
|
31
|
-
position: absolute;
|
|
32
|
-
left: 0;
|
|
33
|
-
width: 100%;
|
|
34
|
-
height: 100%;
|
|
35
|
-
fill: currentcolor;
|
|
36
|
-
`;
|
|
37
|
-
exports.Toggle = styled_components_1.default.span `
|
|
38
|
-
position: relative;
|
|
39
|
-
display: inline-flex;
|
|
40
|
-
align-items: center;
|
|
41
|
-
justify-content: center;
|
|
42
|
-
width: 2em;
|
|
43
|
-
height: 2em;
|
|
44
|
-
margin: 0 -0.3em; /* rtl */
|
|
45
|
-
padding: 0.3em;
|
|
46
|
-
`;
|
|
47
|
-
exports.ToggleLabel = styled_components_1.default.span `
|
|
48
|
-
margin-left: 0.6em; /* rtl */
|
|
49
|
-
`;
|
|
50
|
-
exports.ToggleLabelSub = styled_components_1.default.small `
|
|
51
|
-
opacity: 0.7;
|
|
52
|
-
font-size: 0.7em; ;
|
|
53
|
-
`;
|
|
54
|
-
exports.ToggleIndicatorHolder = styled_components_1.default.span `
|
|
55
|
-
position: relative;
|
|
56
|
-
display: flex;
|
|
57
|
-
|
|
58
|
-
input:focus ~ & {
|
|
59
|
-
${styled_1.stateFocus}
|
|
60
|
-
}
|
|
61
|
-
`;
|
|
62
|
-
exports.ToggleIndicatorBgSquare = styled_components_1.default.svg `
|
|
63
|
-
${exports.toggleIndicatorBgShape}
|
|
64
|
-
`;
|
|
65
|
-
exports.ToggleIndicatorBgCircle = styled_components_1.default.svg `
|
|
66
|
-
${exports.toggleIndicatorBgShape}
|
|
67
|
-
`;
|
|
68
|
-
exports.ToggleIndicatorFg = styled_components_1.default.svg `
|
|
69
|
-
${exports.toggleIndicatorFg}
|
|
70
|
-
transform: scale(0);
|
|
71
|
-
transition: transform 0.18s ease;
|
|
72
|
-
|
|
73
|
-
input:checked + ${exports.ToggleIndicatorHolder} & {
|
|
74
|
-
transform: scale(1);
|
|
75
|
-
}
|
|
76
|
-
`;
|
|
77
|
-
const ToggleIndicatorSquared = (props) => {
|
|
78
|
-
return ((0, jsx_runtime_1.jsxs)(exports.ToggleIndicatorHolder, { children: [(0, jsx_runtime_1.jsx)(exports.ToggleIndicatorBgSquare, { viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("rect", { width: "24", height: "24" }) }), (0, jsx_runtime_1.jsx)(exports.ToggleIndicatorFg, { viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z" }) })] }));
|
|
79
|
-
};
|
|
80
|
-
exports.ToggleIndicatorSquared = ToggleIndicatorSquared;
|
|
81
|
-
const ToggleIndicatorRounded = ({ r = 6, }) => {
|
|
82
|
-
const id = (0, react_1.useId)();
|
|
83
|
-
return ((0, jsx_runtime_1.jsxs)(exports.ToggleIndicatorHolder, { children: [(0, jsx_runtime_1.jsxs)(exports.ToggleIndicatorBgCircle, { viewBox: "0 0 24 24", children: [(0, jsx_runtime_1.jsx)("circle", { cy: "12", cx: "12", r: "12", id: `r_${id}`, clipPath: `url(#c_${id})` }), (0, jsx_runtime_1.jsx)("clipPath", { id: `c_${id}`, children: (0, jsx_runtime_1.jsx)("use", { xlinkHref: `#r_${id}` }) })] }), (0, jsx_runtime_1.jsx)(exports.ToggleIndicatorFg, { viewBox: "0 0 24 24", children: (0, jsx_runtime_1.jsx)("circle", { r: r, cx: "12", cy: "12" }) })] }));
|
|
84
|
-
};
|
|
85
|
-
exports.ToggleIndicatorRounded = ToggleIndicatorRounded;
|
|
@@ -1,149 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useToggle = void 0;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("react");
|
|
6
|
-
const react_hook_form_1 = require("react-hook-form");
|
|
7
|
-
const styles_1 = require("../styles");
|
|
8
|
-
/**
|
|
9
|
-
* This hook is meant to powere Checkboxes, Switches and checkbox-like Radios
|
|
10
|
-
* components, it works in fact in two modes:
|
|
11
|
-
*
|
|
12
|
-
* 1: behaviour as standard checkbox
|
|
13
|
-
* yup validation would simply look like:
|
|
14
|
-
*
|
|
15
|
-
* ```ts
|
|
16
|
-
* privacy: boolean().required(),
|
|
17
|
-
* // add `.nullable()` if you do not provide a boolean `defaultValue`
|
|
18
|
-
* ```
|
|
19
|
-
*
|
|
20
|
-
* 2: beahviour as two radio for checkbox with custom true/false values as
|
|
21
|
-
* strings yup validation would look like:
|
|
22
|
-
*
|
|
23
|
-
* ```ts
|
|
24
|
-
* newsletter: string().oneOf(["yes", "no"]).required(),
|
|
25
|
-
* // add `.nullable()` if you do not provide a string `defaultValue`
|
|
26
|
-
*
|
|
27
|
-
* // to do not make it required and avoid triggering an error when the input is
|
|
28
|
-
* // untouched you need to set the default value of the input in the form
|
|
29
|
-
* // initialization's `defaultValues` as such:
|
|
30
|
-
*
|
|
31
|
-
* useForm({ defaultValues: { newsletter: "no" }})
|
|
32
|
-
* ```
|
|
33
|
-
*
|
|
34
|
-
* To enable this mode either pass the props `valueTrue` and `valueFalse` or
|
|
35
|
-
* an array of options with the shape of `Option`
|
|
36
|
-
*/
|
|
37
|
-
function useToggle(props, ref) {
|
|
38
|
-
const { name, control, register, label, options, value: propValue, ...restProps } = props;
|
|
39
|
-
let { id, valueTrue, valueFalse,
|
|
40
|
-
// defaultChecked,
|
|
41
|
-
// defaultValue,
|
|
42
|
-
// eslint-disable-next-line prefer-const
|
|
43
|
-
...remainingInputProps } = restProps;
|
|
44
|
-
// use options data convention to pass on the true/false values
|
|
45
|
-
if (options) {
|
|
46
|
-
valueTrue = options
|
|
47
|
-
.filter((opt) => opt.value === "true")[0]
|
|
48
|
-
.label.toString();
|
|
49
|
-
valueFalse = options
|
|
50
|
-
.filter((opt) => opt.value === "false")[0]
|
|
51
|
-
.label.toString();
|
|
52
|
-
}
|
|
53
|
-
id = `switch-${name}`;
|
|
54
|
-
const idTrue = `${id}-true`;
|
|
55
|
-
const idFalse = `${id}-false`;
|
|
56
|
-
const isRadio = !!(valueTrue && valueFalse);
|
|
57
|
-
// // manage default values for both toggle modes
|
|
58
|
-
// defaultChecked = isUndefined(defaultChecked) ? false : defaultChecked;
|
|
59
|
-
// // TODO: maybe throw an error if the defaultValue that arrives here is not
|
|
60
|
-
// // a valid value
|
|
61
|
-
// defaultValue =
|
|
62
|
-
// defaultValue === valueTrue || defaultValue === valueFalse
|
|
63
|
-
// ? defaultValue
|
|
64
|
-
// : valueFalse;
|
|
65
|
-
// get the value either from the uncontrolled watched input or from the given
|
|
66
|
-
// prop to control the component
|
|
67
|
-
let value = (0, react_hook_form_1.useWatch)({
|
|
68
|
-
name,
|
|
69
|
-
control,
|
|
70
|
-
// defaultValue: isRadio ? defaultValue : defaultChecked,
|
|
71
|
-
});
|
|
72
|
-
if (propValue) {
|
|
73
|
-
value = propValue;
|
|
74
|
-
}
|
|
75
|
-
// get the input props needed by react-hook-form, first check if we have
|
|
76
|
-
// a `register` function, then check if we have a `control` object or just
|
|
77
|
-
// rely on the `name` prop and `ref`, they probably would be passed alongside
|
|
78
|
-
// an `onChange` prop that is spreaded on the inputs
|
|
79
|
-
const inputProps = (0, react_1.useMemo)(() => {
|
|
80
|
-
return register
|
|
81
|
-
? register(name)
|
|
82
|
-
: control
|
|
83
|
-
? control.register(name)
|
|
84
|
-
: {
|
|
85
|
-
name,
|
|
86
|
-
ref,
|
|
87
|
-
};
|
|
88
|
-
}, [register, control, name, ref]);
|
|
89
|
-
/**
|
|
90
|
-
* Accessibility.
|
|
91
|
-
*
|
|
92
|
-
* Fake the spacebar keyboard behaviour on the radio mode of the checkbox.
|
|
93
|
-
* Without this *only* the arrow keys would change the checkbox state
|
|
94
|
-
*/
|
|
95
|
-
const handleKeyDown = (0, react_1.useCallback)((event) => {
|
|
96
|
-
if (event.key === " ") {
|
|
97
|
-
event.preventDefault();
|
|
98
|
-
event.stopPropagation();
|
|
99
|
-
const firstInput = event.target;
|
|
100
|
-
const next = firstInput.nextElementSibling;
|
|
101
|
-
const prev = firstInput.previousElementSibling;
|
|
102
|
-
const secondInput = next?.tagName === "INPUT" ? next : prev;
|
|
103
|
-
let target = firstInput;
|
|
104
|
-
if (firstInput.checked) {
|
|
105
|
-
target = secondInput;
|
|
106
|
-
}
|
|
107
|
-
else {
|
|
108
|
-
if (!secondInput.checked) {
|
|
109
|
-
target =
|
|
110
|
-
firstInput.value === valueTrue ? firstInput : secondInput;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
if (target)
|
|
114
|
-
target.click();
|
|
115
|
-
}
|
|
116
|
-
}, [valueTrue]);
|
|
117
|
-
// collect all the return values that are dependent on the current value
|
|
118
|
-
// of the input
|
|
119
|
-
const valueDependentProps = (0, react_1.useMemo)(() => ({
|
|
120
|
-
rootProps: {
|
|
121
|
-
htmlFor: isRadio
|
|
122
|
-
? !value || value === valueFalse
|
|
123
|
-
? idTrue
|
|
124
|
-
: idFalse
|
|
125
|
-
: id,
|
|
126
|
-
},
|
|
127
|
-
label: label ? label : value,
|
|
128
|
-
value,
|
|
129
|
-
}), [value, valueFalse, isRadio, id, idTrue, idFalse, label]);
|
|
130
|
-
const Inputs = (0, react_1.useMemo)(() => isRadio ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(styles_1.InputInvisible, { id: idFalse, ...inputProps, ...remainingInputProps, onKeyDown: handleKeyDown, type: "radio", value: valueFalse }), (0, jsx_runtime_1.jsx)(styles_1.InputInvisible, { id: idTrue, ...inputProps, ...remainingInputProps, onKeyDown: handleKeyDown, type: "radio", value: valueTrue })] })) : ((0, jsx_runtime_1.jsx)(styles_1.InputInvisible, { id: id, type: "checkbox", ...inputProps, ...remainingInputProps })), [
|
|
131
|
-
inputProps,
|
|
132
|
-
remainingInputProps,
|
|
133
|
-
handleKeyDown,
|
|
134
|
-
isRadio,
|
|
135
|
-
idFalse,
|
|
136
|
-
idTrue,
|
|
137
|
-
valueFalse,
|
|
138
|
-
valueTrue,
|
|
139
|
-
id,
|
|
140
|
-
// defaultChecked,
|
|
141
|
-
// defaultValue,
|
|
142
|
-
]);
|
|
143
|
-
// console.log("useToggle: render", value);
|
|
144
|
-
return {
|
|
145
|
-
...valueDependentProps,
|
|
146
|
-
Inputs,
|
|
147
|
-
};
|
|
148
|
-
}
|
|
149
|
-
exports.useToggle = useToggle;
|
package/node/Forms/antispam.js
DELETED
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.decodeForm = exports.encodeForm = void 0;
|
|
4
|
-
const yup_1 = require("yup");
|
|
5
|
-
const utils_1 = require("@koine/utils");
|
|
6
|
-
/**
|
|
7
|
-
* Encode form
|
|
8
|
-
*
|
|
9
|
-
* Takes a record of yup validations and outputs a `yup` schema with encoded
|
|
10
|
-
* names (antispam technique) and a record of the encoded/decoded input `name`s.
|
|
11
|
-
*
|
|
12
|
-
* We skip the names prefixed wth an underscore which are considered programmatic
|
|
13
|
-
* form data not created by user input.
|
|
14
|
-
*/
|
|
15
|
-
function encodeForm(validationRules) {
|
|
16
|
-
const encoded = {};
|
|
17
|
-
const encodedNames = {};
|
|
18
|
-
for (const name in validationRules) {
|
|
19
|
-
if (!name.startsWith("_")) {
|
|
20
|
-
const encodedName = (0, utils_1.encode)(name);
|
|
21
|
-
encoded[encodedName] = validationRules[name];
|
|
22
|
-
encodedNames[name] = encodedName;
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
// we need `.required()` to correctly infer the type @see
|
|
26
|
-
// https://github.com/jquense/yup/issues/946
|
|
27
|
-
const encodedSchema = (0, yup_1.object)(encoded).required();
|
|
28
|
-
return { encodedSchema, encodedNames };
|
|
29
|
-
}
|
|
30
|
-
exports.encodeForm = encodeForm;
|
|
31
|
-
/**
|
|
32
|
-
* Decode form data
|
|
33
|
-
*
|
|
34
|
-
* This function is meant to be used inside an api endpoint to gather an encoded
|
|
35
|
-
* form submit data and transform it to the decoded desired json data.
|
|
36
|
-
*
|
|
37
|
-
* Here too we skip encoding/decoding process for names prefixed wth an underscore
|
|
38
|
-
* which are considered programmatic form data not created by user input.
|
|
39
|
-
*/
|
|
40
|
-
function decodeForm(formData) {
|
|
41
|
-
const json = {};
|
|
42
|
-
for (const encodedName in formData) {
|
|
43
|
-
const decodedName = (0, utils_1.decode)(encodedName);
|
|
44
|
-
// always add underscore prefixed names as they are treated as internal
|
|
45
|
-
// private inputs outside of the honeypot system, normalise them here removing
|
|
46
|
-
// the underscore prefix
|
|
47
|
-
if (encodedName.startsWith("_")) {
|
|
48
|
-
// @ts-expect-error nevermind
|
|
49
|
-
json[encodedName.substring(1)] = formData[encodedName];
|
|
50
|
-
}
|
|
51
|
-
// if the decoded `name` is empty and the encoded `name` is defined honeypot passed
|
|
52
|
-
else if (!(0, utils_1.isUndefined)(formData[encodedName]) &&
|
|
53
|
-
formData[decodedName] === "") {
|
|
54
|
-
// @ts-expect-error nevermind
|
|
55
|
-
json[decodedName] = formData[encodedName];
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
// console.log(formData, decoded, json);
|
|
59
|
-
return json;
|
|
60
|
-
}
|
|
61
|
-
exports.decodeForm = decodeForm;
|
package/node/Forms/helpers.js
DELETED
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.triggerChange = exports.triggerOnChange = exports.defaultOptionsFilterFn = exports.normaliseOptions = void 0;
|
|
4
|
-
const utils_1 = require("@koine/utils");
|
|
5
|
-
const normaliseOptions = (options = []) => {
|
|
6
|
-
return options.map((option) => {
|
|
7
|
-
return (0, utils_1.isString)(option)
|
|
8
|
-
? {
|
|
9
|
-
label: option,
|
|
10
|
-
value: option,
|
|
11
|
-
}
|
|
12
|
-
: option;
|
|
13
|
-
});
|
|
14
|
-
};
|
|
15
|
-
exports.normaliseOptions = normaliseOptions;
|
|
16
|
-
function defaultOptionsFilterFn(options, inputValue) {
|
|
17
|
-
if (!inputValue) {
|
|
18
|
-
return options;
|
|
19
|
-
}
|
|
20
|
-
return (0, utils_1.matchSorter)(options, inputValue, { keys: ["value", "label"] });
|
|
21
|
-
}
|
|
22
|
-
exports.defaultOptionsFilterFn = defaultOptionsFilterFn;
|
|
23
|
-
/**
|
|
24
|
-
* We are faking the native input `onChange` event
|
|
25
|
-
*/
|
|
26
|
-
function triggerOnChange(onChange, name, value) {
|
|
27
|
-
// @ts-expect-error nevermind
|
|
28
|
-
if (onChange)
|
|
29
|
-
onChange({ target: { name, value } });
|
|
30
|
-
}
|
|
31
|
-
exports.triggerOnChange = triggerOnChange;
|
|
32
|
-
/**
|
|
33
|
-
* @see https://hustle.bizongo.in/simulate-react-on-change-on-controlled-components-baa336920e04
|
|
34
|
-
* @deprecated
|
|
35
|
-
*/
|
|
36
|
-
function triggerChange(input, value) {
|
|
37
|
-
const obj = window.Object;
|
|
38
|
-
if (!obj) {
|
|
39
|
-
// if (__DEV__) {
|
|
40
|
-
// console.warn("triggerChange: window.Object does not exists, bailing.");
|
|
41
|
-
// }
|
|
42
|
-
return;
|
|
43
|
-
}
|
|
44
|
-
// @ts-expect-error nevermind
|
|
45
|
-
const nativeInputValueSetter = obj.getOwnPropertyDescriptor(window.HTMLInputElement.prototype, "value").set;
|
|
46
|
-
// @ts-expect-error nevermind
|
|
47
|
-
nativeInputValueSetter.call(input, value);
|
|
48
|
-
const inputEvent = new Event("input", { bubbles: true });
|
|
49
|
-
input.dispatchEvent(inputEvent);
|
|
50
|
-
}
|
|
51
|
-
exports.triggerChange = triggerChange;
|
package/node/Forms/index.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const 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("./Form"), exports);
|
|
12
|
-
tslib_1.__exportStar(require("./Label"), exports);
|
|
13
|
-
tslib_1.__exportStar(require("./Password"), exports);
|
|
14
|
-
tslib_1.__exportStar(require("./Radio"), exports);
|
|
15
|
-
// export * from "./Select";
|
|
16
|
-
tslib_1.__exportStar(require("./Switch"), exports);
|
|
17
|
-
tslib_1.__exportStar(require("./Textarea"), exports);
|
|
18
|
-
tslib_1.__exportStar(require("./Toggle"), exports);
|
|
19
|
-
tslib_1.__exportStar(require("./helpers"), exports);
|
|
20
|
-
tslib_1.__exportStar(require("./styles"), exports);
|
package/node/Forms/styles.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
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
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const styled_components_1 = tslib_1.__importDefault(require("styled-components"));
|
|
7
|
-
const styled_1 = require("../styles/styled");
|
|
8
|
-
const ProgressLinear_1 = require("../Progress/ProgressLinear");
|
|
9
|
-
const styled_2 = require("../styles/styled");
|
|
10
|
-
exports.InputInvisible = styled_components_1.default.input `
|
|
11
|
-
${styled_2.invisible}
|
|
12
|
-
`;
|
|
13
|
-
exports.InputHoneypot = (0, styled_components_1.default)(exports.InputInvisible).attrs({
|
|
14
|
-
type: "text",
|
|
15
|
-
autoComplete: "new-password",
|
|
16
|
-
tabIndex: -1,
|
|
17
|
-
}) ``;
|
|
18
|
-
exports.InputProgress = (0, styled_components_1.default)((p) => ((0, jsx_runtime_1.jsx)(ProgressLinear_1.ProgressLinear, { fg: "var(--accent300)", bg: "var(--accent400)", ...p }))) `
|
|
19
|
-
position: absolute;
|
|
20
|
-
bottom: 0;
|
|
21
|
-
left: 0;
|
|
22
|
-
width: 100%;
|
|
23
|
-
`;
|
|
24
|
-
/**
|
|
25
|
-
* Remove the default light blue background on autofilled inputs. To be used as
|
|
26
|
-
* a function that outputs a CSS string.
|
|
27
|
-
*
|
|
28
|
-
* @see https://stackoverflow.com/a/62624824/1938970
|
|
29
|
-
*/
|
|
30
|
-
exports.inputResetAutofill = `
|
|
31
|
-
&:-webkit-autofill,
|
|
32
|
-
&:-webkit-autofill:hover,
|
|
33
|
-
&:-webkit-autofill:focus,
|
|
34
|
-
&:-webkit-autofill:active {
|
|
35
|
-
-webkit-background-clip: text;
|
|
36
|
-
}
|
|
37
|
-
`;
|
|
38
|
-
/* FIXME: find a nice way to override this styling from implementation */
|
|
39
|
-
// border-bottom: 1px solid var(--forms-border-color);
|
|
40
|
-
// border: 0;
|
|
41
|
-
exports.inputBorder = `
|
|
42
|
-
border: 1px solid var(--forms-border-color);
|
|
43
|
-
`;
|
|
44
|
-
exports.inputPadding = `
|
|
45
|
-
padding: var(--forms-gutter-y) var(--forms-gutter-x);
|
|
46
|
-
`;
|
|
47
|
-
exports.inputReset = `
|
|
48
|
-
width: 100%;
|
|
49
|
-
min-height: 44px;
|
|
50
|
-
${exports.inputBorder}
|
|
51
|
-
${exports.inputPadding}
|
|
52
|
-
`;
|
|
53
|
-
exports.inputBase = `
|
|
54
|
-
${exports.inputReset}
|
|
55
|
-
${exports.inputResetAutofill}
|
|
56
|
-
background: transparent;
|
|
57
|
-
`;
|
|
58
|
-
exports.inputFocus = `
|
|
59
|
-
&:focus {
|
|
60
|
-
outline: 0px;
|
|
61
|
-
appearance: none;
|
|
62
|
-
${styled_1.stateFocus}
|
|
63
|
-
}
|
|
64
|
-
`;
|
package/node/Gauge/Gauge.js
DELETED
|
@@ -1,106 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
// import styled, { keyframes } from "styled-components";
|
|
3
|
-
// import { m } from "framer-motion";
|
|
4
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
5
|
-
exports.Gauge = void 0;
|
|
6
|
-
const Gauge = (_props) => null;
|
|
7
|
-
exports.Gauge = Gauge;
|
|
8
|
-
// export type GaugeProps = {
|
|
9
|
-
// /** In percentage */
|
|
10
|
-
// value: number;
|
|
11
|
-
// };
|
|
12
|
-
// export const Gauge = ({
|
|
13
|
-
// value,
|
|
14
|
-
// counter = true,
|
|
15
|
-
// stroke,
|
|
16
|
-
// // emptyStroke = "#e2e2e2",
|
|
17
|
-
// emptyStroke = stroke,
|
|
18
|
-
// emptyStrokeOpacity = 0.25,
|
|
19
|
-
// // emptyStrokeOpacity = 1,
|
|
20
|
-
// duration = 3,
|
|
21
|
-
// delay = 0.5,
|
|
22
|
-
// size = 100,
|
|
23
|
-
// strokeWidth = 6,
|
|
24
|
-
// }) => {
|
|
25
|
-
// const radius = 45;
|
|
26
|
-
// const circumference = Math.ceil(2 * Math.PI * radius);
|
|
27
|
-
// const fillPercents = Math.abs(
|
|
28
|
-
// Math.ceil((circumference / 100) * (value - 100))
|
|
29
|
-
// );
|
|
30
|
-
// const transition = {
|
|
31
|
-
// duration: duration,
|
|
32
|
-
// delay: delay,
|
|
33
|
-
// ease: "easeIn",
|
|
34
|
-
// };
|
|
35
|
-
// const variants = {
|
|
36
|
-
// hidden: {
|
|
37
|
-
// strokeDashoffset: circumference,
|
|
38
|
-
// transition,
|
|
39
|
-
// },
|
|
40
|
-
// show: {
|
|
41
|
-
// strokeDashoffset: fillPercents,
|
|
42
|
-
// transition,
|
|
43
|
-
// },
|
|
44
|
-
// };
|
|
45
|
-
// return (
|
|
46
|
-
// <>
|
|
47
|
-
// <Flex justifyContent="center" alignItems="center">
|
|
48
|
-
// {counter && (
|
|
49
|
-
// <Box
|
|
50
|
-
// position="absolute"
|
|
51
|
-
// fontSize={size >= 100 ? 6 : 3}
|
|
52
|
-
// fontWeight={2}
|
|
53
|
-
// color="text500"
|
|
54
|
-
// >
|
|
55
|
-
// <Counter valueTo={value} totalDuration={duration + delay} />%
|
|
56
|
-
// </Box>
|
|
57
|
-
// )}
|
|
58
|
-
// <Box height={size}>
|
|
59
|
-
// <svg
|
|
60
|
-
// viewBox="0 0 100 100"
|
|
61
|
-
// version="1.1"
|
|
62
|
-
// xmlns="http://www.w3.org/2000/svg"
|
|
63
|
-
// width={size}
|
|
64
|
-
// height={size}
|
|
65
|
-
// >
|
|
66
|
-
// <circle
|
|
67
|
-
// cx="50"
|
|
68
|
-
// cy="50"
|
|
69
|
-
// r={radius}
|
|
70
|
-
// className="circle"
|
|
71
|
-
// strokeWidth={strokeWidth}
|
|
72
|
-
// stroke={emptyStroke}
|
|
73
|
-
// strokeOpacity={emptyStrokeOpacity}
|
|
74
|
-
// fill="transparent"
|
|
75
|
-
// />
|
|
76
|
-
// </svg>
|
|
77
|
-
// <svg
|
|
78
|
-
// viewBox="0 0 100 100"
|
|
79
|
-
// width={size}
|
|
80
|
-
// height={size}
|
|
81
|
-
// style={{
|
|
82
|
-
// position: "absolute",
|
|
83
|
-
// transform: "rotate(-90deg)",
|
|
84
|
-
// overflow: "visible",
|
|
85
|
-
// marginLeft: -size,
|
|
86
|
-
// }}
|
|
87
|
-
// >
|
|
88
|
-
// <m.circle
|
|
89
|
-
// cx="50"
|
|
90
|
-
// cy="50"
|
|
91
|
-
// r={radius}
|
|
92
|
-
// strokeWidth={strokeWidth}
|
|
93
|
-
// stroke={stroke}
|
|
94
|
-
// fill="transparent"
|
|
95
|
-
// strokeDashoffset={fillPercents}
|
|
96
|
-
// strokeDasharray={circumference}
|
|
97
|
-
// variants={variants}
|
|
98
|
-
// initial="hidden"
|
|
99
|
-
// animate={"show"}
|
|
100
|
-
// />
|
|
101
|
-
// </svg>
|
|
102
|
-
// </Box>
|
|
103
|
-
// </Flex>
|
|
104
|
-
// </>
|
|
105
|
-
// );
|
|
106
|
-
// };
|