@julseb-lib/react 0.0.13 → 0.0.19

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.
Files changed (120) hide show
  1. package/dist/index.cjs.js +528 -528
  2. package/dist/index.es.js +5950 -6493
  3. package/dist/index.umd.js +571 -571
  4. package/dist/lib/Mixins.tsx +1 -1
  5. package/dist/lib/components/Accordion/Accordion.tsx +1 -1
  6. package/dist/lib/components/Accordion/AccordionButton.tsx +3 -3
  7. package/dist/lib/components/Accordion/AccordionContent.tsx +3 -3
  8. package/dist/lib/components/Accordion/AccordionItem.tsx +1 -1
  9. package/dist/lib/components/Alert/Alert.tsx +1 -1
  10. package/dist/lib/components/Aside/styles.tsx +1 -1
  11. package/dist/lib/components/Autocomplete/Autocomplete.tsx +2 -2
  12. package/dist/lib/components/Avatar/Avatar.tsx +1 -1
  13. package/dist/lib/components/Avatar/AvatarFunction.tsx +1 -1
  14. package/dist/lib/components/BackToTop/BackToTop.tsx +1 -1
  15. package/dist/lib/components/Badge/Badge.tsx +1 -1
  16. package/dist/lib/components/Breadcrumbs/BreadcrumbItem.tsx +3 -3
  17. package/dist/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
  18. package/dist/lib/components/Breadcrumbs/BreadcrumbsFn.tsx +1 -1
  19. package/dist/lib/components/Burger/styles.tsx +1 -1
  20. package/dist/lib/components/ButtonGroup/ButtonGroup.tsx +1 -1
  21. package/dist/lib/components/ButtonGroup/ButtonGroupButton.tsx +1 -1
  22. package/dist/lib/components/ButtonIcon/ButtonIcon.tsx +1 -1
  23. package/dist/lib/components/ButtonIcon/styles.tsx +1 -1
  24. package/dist/lib/components/Card/styles.tsx +1 -1
  25. package/dist/lib/components/Cover/styles.tsx +1 -1
  26. package/dist/lib/components/Datepicker/Calendar.tsx +3 -3
  27. package/dist/lib/components/Datepicker/Datepicker.tsx +2 -2
  28. package/dist/lib/components/DragList/styles.tsx +1 -1
  29. package/dist/lib/components/Drawer/Drawer.tsx +4 -1
  30. package/dist/lib/components/Dropdown/Dropdown.tsx +1 -1
  31. package/dist/lib/components/Dropdown/styles.tsx +1 -1
  32. package/dist/lib/components/Fallback/Fallback.tsx +1 -1
  33. package/dist/lib/components/Footer/Footer.tsx +1 -1
  34. package/dist/lib/components/Footer/FooterLogo.tsx +2 -2
  35. package/dist/lib/components/Form/styles.tsx +1 -1
  36. package/dist/lib/components/FullBleed/styles.tsx +1 -1
  37. package/dist/lib/components/Header/Header.tsx +1 -1
  38. package/dist/lib/components/Header/HeaderLogo.tsx +2 -2
  39. package/dist/lib/components/Header/HeaderNav.tsx +14 -19
  40. package/dist/lib/components/Header/HeaderNavLink.tsx +6 -2
  41. package/dist/lib/components/Header/HeaderSearch.tsx +2 -2
  42. package/dist/lib/components/Header/styles.tsx +1 -1
  43. package/dist/lib/components/Header/types.ts +0 -1
  44. package/dist/lib/components/Helmet/Helmet.tsx +2 -2
  45. package/dist/lib/components/Hr/styles.tsx +1 -1
  46. package/dist/lib/components/Icon/styles.tsx +1 -1
  47. package/dist/lib/components/Image/styles.tsx +1 -1
  48. package/dist/lib/components/Input/Input.tsx +1 -1
  49. package/dist/lib/components/InputCheck/InputCheck.tsx +1 -1
  50. package/dist/lib/components/InputComponents/components/InputButton.tsx +2 -2
  51. package/dist/lib/components/InputComponents/components/InputContainer.tsx +2 -2
  52. package/dist/lib/components/InputComponents/components/InputIcon.tsx +2 -2
  53. package/dist/lib/components/InputComponents/components/InputPrefix.tsx +2 -2
  54. package/dist/lib/components/InputComponents/components/InputRightContainer.tsx +2 -2
  55. package/dist/lib/components/InputComponents/components/InputSuffix.tsx +2 -2
  56. package/dist/lib/components/InputComponents/components/InputValidationHelper.tsx +5 -5
  57. package/dist/lib/components/InputComponents/components/InputValidationIcon.tsx +2 -2
  58. package/dist/lib/components/InputComponents/components/InputWrapper.tsx +2 -2
  59. package/dist/lib/components/InputComponents/types.ts +2 -13
  60. package/dist/lib/components/InputContainer/HelperBottom.tsx +89 -0
  61. package/dist/lib/components/InputContainer/InputContainer.tsx +12 -90
  62. package/dist/lib/components/InputContainer/styles.tsx +4 -4
  63. package/dist/lib/components/InputContainer/subtypes.ts +10 -0
  64. package/dist/lib/components/InputContainer/types.ts +2 -13
  65. package/dist/lib/components/InputCounter/InputCounter.tsx +1 -1
  66. package/dist/lib/components/InputImage/EmptyContainer.tsx +2 -2
  67. package/dist/lib/components/InputImage/HoverContainer.tsx +2 -2
  68. package/dist/lib/components/InputImage/InputImage.tsx +5 -3
  69. package/dist/lib/components/InputImage/styles.tsx +1 -1
  70. package/dist/lib/components/InputImage/types.ts +1 -0
  71. package/dist/lib/components/InputPhone/InputPhone.tsx +1 -1
  72. package/dist/lib/components/InputPin/InputPin.tsx +1 -1
  73. package/dist/lib/components/InputSlider/InputSlider.tsx +1 -1
  74. package/dist/lib/components/InputSlider/styles.tsx +1 -1
  75. package/dist/lib/components/LibIcon/LibIcon.tsx +2 -2
  76. package/dist/lib/components/Linkify/Linkify.tsx +1 -1
  77. package/dist/lib/components/ListGroup/ListGroup.tsx +1 -1
  78. package/dist/lib/components/ListGroup/styles.tsx +1 -1
  79. package/dist/lib/components/Loader/styles.tsx +1 -1
  80. package/dist/lib/components/Main/styles.tsx +1 -1
  81. package/dist/lib/components/MarkdownEditor/MarkdownEditor.tsx +1 -1
  82. package/dist/lib/components/MarkdownEditor/MdEditorButtons/EditorButtonTitles.tsx +2 -2
  83. package/dist/lib/components/MarkdownEditor/MdEditorButtons/EditorButtons.tsx +3 -3
  84. package/dist/lib/components/MarkdownEditor/MdEditorButtons/MarkdownButtons.tsx +1 -1
  85. package/dist/lib/components/Masonry/Masonry.tsx +1 -1
  86. package/dist/lib/components/Messaging/Message.tsx +1 -1
  87. package/dist/lib/components/Messaging/Messaging.tsx +1 -1
  88. package/dist/lib/components/Modal/Modal.tsx +1 -1
  89. package/dist/lib/components/PageLayout/PageLayout.tsx +2 -2
  90. package/dist/lib/components/PageLoading/PageLoading.tsx +1 -1
  91. package/dist/lib/components/ProgressBar/ProgressBar.tsx +1 -1
  92. package/dist/lib/components/ProgressCircle/Circle.tsx +2 -2
  93. package/dist/lib/components/ProgressCircle/Value.tsx +2 -2
  94. package/dist/lib/components/Rating/Rating.tsx +2 -2
  95. package/dist/lib/components/ResetScroll/ResetScroll.tsx +1 -1
  96. package/dist/lib/components/Select/Select.tsx +1 -1
  97. package/dist/lib/components/Skeleton/styles.tsx +1 -1
  98. package/dist/lib/components/Slideshow/Slideshow.tsx +1 -1
  99. package/dist/lib/components/Slideshow/SlideshowButton.tsx +2 -2
  100. package/dist/lib/components/Slideshow/SlideshowPagination.tsx +3 -3
  101. package/dist/lib/components/Slideshow/styles.tsx +1 -1
  102. package/dist/lib/components/Stepper/Stepper.tsx +1 -1
  103. package/dist/lib/components/Table/Table.tsx +1 -1
  104. package/dist/lib/components/Tabs/Tabs.tsx +1 -1
  105. package/dist/lib/components/TextIcon/styles.tsx +1 -1
  106. package/dist/lib/components/Timepicker/Timepicker.tsx +1 -1
  107. package/dist/lib/components/Toast/Toast.tsx +1 -1
  108. package/dist/lib/components/Toast/Toaster.tsx +1 -1
  109. package/dist/lib/components/Video/styles.tsx +1 -1
  110. package/dist/lib/components/Youtube/Youtube.tsx +1 -1
  111. package/dist/lib/components/Youtube/styles.tsx +1 -1
  112. package/dist/lib/hooks/usePagination.tsx +1 -1
  113. package/dist/lib/hooks/useTranslation.tsx +1 -1
  114. package/dist/lib/index.ts +2 -1
  115. package/dist/lib/lib-utils/get-highlighted-text.tsx +1 -1
  116. package/dist/lib/types/component-items.ts +28 -0
  117. package/dist/lib/utils/linkify-text.tsx +1 -1
  118. package/dist/{styles-DM9qlYpR.js → styles-BCSPldCD.js} +1 -1
  119. package/dist/{styles-CVN0uFDU.cjs → styles-CtcGw3Gv.cjs} +2 -2
  120. package/package.json +4 -5
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { css, type DefaultTheme } from "styled-components"
4
4
  import type { Property } from "csstype"
5
- import { stringifyPx } from "ts-utils-julseb"
5
+ import { stringifyPx } from "@julseb-lib/utils"
6
6
  import { overlaysMap } from "./lib-utils"
7
7
  import {
8
8
  COLORS_LIGHT,
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { uuid, capitalize } from "ts-utils-julseb"
5
+ import { uuid, capitalize } from "@julseb-lib/utils"
6
6
  import { Text } from "../../"
7
7
  import { AccordionItem } from "./AccordionItem"
8
8
  import { StyledAccordion } from "./styles"
@@ -2,13 +2,13 @@
2
2
 
3
3
  import { useCallback } from "react"
4
4
  import classNames from "classnames"
5
- import { capitalize } from "ts-utils-julseb"
5
+ import { capitalize } from "@julseb-lib/utils"
6
6
  import { LibIcon } from "../LibIcon"
7
7
  import { Plus, ChevronDown } from "../../icons"
8
8
  import { StyledAccordionButton, StyledAccordionIcon } from "./styles"
9
9
  import type { ILibAccordionButton } from "./subtypes"
10
10
 
11
- export function AccordionButton({
11
+ export const AccordionButton = ({
12
12
  "data-testid": testid,
13
13
  className,
14
14
  variant = "basic",
@@ -16,7 +16,7 @@ export function AccordionButton({
16
16
  isOpen,
17
17
  setIsOpen,
18
18
  title,
19
- }: ILibAccordionButton) {
19
+ }: ILibAccordionButton) => {
20
20
  const iconProps = {
21
21
  "data-testid":
22
22
  testid &&
@@ -1,17 +1,17 @@
1
1
  /*=============================================== AccordionContent component ===============================================*/
2
2
 
3
3
  import classNames from "classnames"
4
- import { capitalize } from "ts-utils-julseb"
4
+ import { capitalize } from "@julseb-lib/utils"
5
5
  import { StyledAccordionContent } from "./styles"
6
6
  import type { ILibAccordionContent } from "./subtypes"
7
7
 
8
- export function AccordionContent({
8
+ export const AccordionContent = ({
9
9
  "data-testid": testid,
10
10
  className,
11
11
  children,
12
12
  isOpen,
13
13
  variant = "basic",
14
- }: ILibAccordionContent) {
14
+ }: ILibAccordionContent) => {
15
15
  return (
16
16
  <StyledAccordionContent
17
17
  data-testid={testid && `${testid}.AccordionContent`}
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef, useState } from "react"
4
4
  import classNames from "classnames"
5
- import { capitalize } from "ts-utils-julseb"
5
+ import { capitalize } from "@julseb-lib/utils"
6
6
  import { AccordionButton } from "./AccordionButton"
7
7
  import { AccordionContent } from "./AccordionContent"
8
8
  import { StyledAccordionItem } from "./styles"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { stringifyPx, getRandomString } from "ts-utils-julseb"
5
+ import { stringifyPx, getRandomString } from "@julseb-lib/utils"
6
6
  import { Text } from "../../"
7
7
  import { appendStyles } from "../../lib-utils"
8
8
  import type { LibAllColors } from "../../types"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Aside styles ===============================================*/
2
2
 
3
3
  import styled from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { setDefaultTheme, LAYOUTS, Mixins, SPACERS, BREAKPOINTS } from "../../"
6
6
  import type { LibAsideSize } from "../../types"
7
7
 
@@ -10,7 +10,7 @@ import {
10
10
  } from "react"
11
11
  import Fuse from "fuse.js"
12
12
  import classNames from "classnames"
13
- import { uuid } from "ts-utils-julseb"
13
+ import { uuid } from "@julseb-lib/utils"
14
14
  import {
15
15
  Key,
16
16
  useKeyPress,
@@ -54,7 +54,7 @@ import type { ILibAutocomplete } from "./types"
54
54
  * @prop label?: string
55
55
  * @prop labelComment?: string
56
56
  * @prop helper?: string
57
- * @prop helperBottom?: string | { text: string; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
57
+ * @prop helperBottom?: string | { text: string => only if element is not defined; element: ReactChildren => only if text is not defined; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
58
58
  * @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
59
59
  * @prop iconBaseUrl?: string
60
60
  * @prop inputBackground?: "light" | "dark"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { capitalize } from "ts-utils-julseb"
5
+ import { capitalize } from "@julseb-lib/utils"
6
6
  import { roundIconSize } from "../../lib-utils"
7
7
  import { AvatarFunction } from "./AvatarFunction"
8
8
  import { StyledAvatarContainer, StyledBadge } from "./styles"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { getRandomString } from "ts-utils-julseb"
5
+ import { getRandomString } from "@julseb-lib/utils"
6
6
  import { Image } from "../../"
7
7
  import { appendStyles } from "../../lib-utils"
8
8
  import { LibIcon } from "../LibIcon"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef, useState, useEffect } from "react"
4
4
  import classNames from "classnames"
5
- import { scrollToTop } from "ts-utils-julseb"
5
+ import { scrollToTop } from "@julseb-lib/utils"
6
6
  import { ArrowUp } from "../../icons"
7
7
  import { StyledBackToTop } from "./styles"
8
8
  import type { ILibBackToTop } from "./types"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { getRandomString } from "ts-utils-julseb"
5
+ import { getRandomString } from "@julseb-lib/utils"
6
6
  import { roundIconSize, appendStyles } from "../../lib-utils"
7
7
  import { LibIcon } from "../LibIcon"
8
8
  import { StyledBadge } from "./styles"
@@ -1,15 +1,15 @@
1
1
  /*=============================================== BreadcrumbItem ===============================================*/
2
2
 
3
3
  import { Link } from "react-router-dom"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import type { ILibBreadcrumbItem } from "./subtypes"
6
6
 
7
- export function BreadcrumbItem({
7
+ export const BreadcrumbItem = ({
8
8
  "data-testid": testid,
9
9
  className,
10
10
  item,
11
11
  index,
12
- }: ILibBreadcrumbItem) {
12
+ }: ILibBreadcrumbItem) => {
13
13
  if (item.to)
14
14
  return (
15
15
  <Link
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Breadcrumbs component ===============================================*/
2
2
 
3
3
  import { forwardRef } from "react"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import { BreadcrumbsFn } from "./BreadcrumbsFn"
6
6
  import { BreadcrumbItem } from "./BreadcrumbItem"
7
7
  import type { ILibBreadcrumbs } from "./types"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== BreadcrumbsFn ===============================================*/
2
2
 
3
3
  import { forwardRef, Fragment } from "react"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import { LibIcon } from "../LibIcon"
6
6
  import { ChevronRight } from "../../icons"
7
7
  import { StyledBreadcrumbs, SeparatorContainer } from "./styles"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Burger styles ===============================================*/
2
2
 
3
3
  import styled, { css } from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import {
6
6
  BREAKPOINTS,
7
7
  RADIUSES,
@@ -1,7 +1,7 @@
1
1
  /*=============================================== ButtonGroup component ===============================================*/
2
2
 
3
3
  import { forwardRef, useState, Fragment } from "react"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import { ButtonGroupButton } from "./ButtonGroupButton"
6
6
  import { ButtonGroupToggle } from "./ButtonGroupToggle"
7
7
  import { StyledButtonGroup, Separator } from "./styles"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== ButtonGroupButtons ===============================================*/
2
2
 
3
3
  import { forwardRef } from "react"
4
- import { capitalize, filterObject } from "ts-utils-julseb"
4
+ import { capitalize, filterObject } from "@julseb-lib/utils"
5
5
  import { Button, ButtonIcon } from "../.."
6
6
  import type { ILibButton } from "../Button/types"
7
7
  import type { ILibButtonIcon } from "../ButtonIcon/types"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== ButtonIcon component ===============================================*/
2
2
 
3
3
  import { forwardRef } from "react"
4
- import { capitalize } from "ts-utils-julseb"
4
+ import { capitalize } from "@julseb-lib/utils"
5
5
  import { Tooltip } from "../../"
6
6
  import { roundIconSize } from "../../lib-utils"
7
7
  import { ButtonIconFunction } from "./ButtonFunction"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== ButtonIcon styles ===============================================*/
2
2
 
3
3
  import styled, { css } from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { BREAKPOINTS, setDefaultTheme } from "../../"
6
6
  import { ButtonMixin } from "../ComponentsMixins"
7
7
  import type { ILibButtonIconStyles } from "./subtypes"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import styled from "styled-components"
4
4
  import type { Property } from "csstype"
5
- import { stringifyPx } from "ts-utils-julseb"
5
+ import { stringifyPx } from "@julseb-lib/utils"
6
6
  import { setDefaultTheme, Mixins } from "../../"
7
7
  import type {
8
8
  CssCursor,
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Cover styles ===============================================*/
2
2
 
3
3
  import styled, { css } from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { setDefaultTheme, Image, Flexbox, Mixins } from "../../"
6
6
  import type { LibOverlays, ILibPadding } from "../../types"
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Calendar component ===============================================*/
2
2
 
3
3
  import { useState, type MouseEvent } from "react"
4
- import { uuid, formatDate as formatDateUtil } from "ts-utils-julseb"
4
+ import { uuid, formatDate as formatDateUtil } from "@julseb-lib/utils"
5
5
  import classNames from "classnames"
6
6
  import { Text } from "../../"
7
7
  import { LibIcon } from "../LibIcon"
@@ -18,7 +18,7 @@ import {
18
18
  } from "./styles"
19
19
  import type { ILibDatepicker } from "./types"
20
20
 
21
- export function Calendar({
21
+ export const Calendar = ({
22
22
  "data-testid": testid,
23
23
  className,
24
24
  minDate,
@@ -52,7 +52,7 @@ export function Calendar({
52
52
  > & {
53
53
  isOpen: boolean
54
54
  setIsOpen: DispatchState<boolean>
55
- }) {
55
+ }) => {
56
56
  const [currentMonth, setCurrentMonth] = useState(new Date().getMonth())
57
57
  const [currentYear, setCurrentYear] = useState(new Date().getFullYear())
58
58
 
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Datepicker component ===============================================*/
2
2
 
3
3
  import { forwardRef, useRef, useState, type ChangeEvent } from "react"
4
- import { convertDateShort } from "ts-utils-julseb"
4
+ import { convertDateShort } from "@julseb-lib/utils"
5
5
  import { useClickOutside } from "../../"
6
6
  import { Calendar as CalendarIcon } from "../../icons"
7
7
  import {
@@ -41,7 +41,7 @@ import type { ILibDatepicker } from "./types"
41
41
  * @prop label?: string
42
42
  * @prop labelComment?: string
43
43
  * @prop helper?: string
44
- * @prop helperBottom?: string | { text: string; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
44
+ * @prop helperBottom?: string | { text: string => only if element is not defined; element: ReactChildren => only if text is not defined; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
45
45
  * @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
46
46
  * @prop iconBaseUrl?: string
47
47
  * @prop inputBackground?: "light" | "dark"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== DragList styles ===============================================*/
2
2
 
3
3
  import styled from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { Mixins, setDefaultTheme } from "../../"
6
6
  import type {
7
7
  ILibBorder,
@@ -2,7 +2,10 @@
2
2
 
3
3
  import { forwardRef, useEffect } from "react"
4
4
  import classNames from "classnames"
5
- import { enableScroll, disableScroll as disableScrollFn } from "ts-utils-julseb"
5
+ import {
6
+ enableScroll,
7
+ disableScroll as disableScrollFn,
8
+ } from "@julseb-lib/utils"
6
9
  import { useKeyPress } from "../../"
7
10
  import { StyledDrawer, Overlay, DrawerContent } from "./styles"
8
11
  import type { ILibDrawer } from "./types"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef, useRef, useCallback } from "react"
4
4
  import classNames from "classnames"
5
- import { uuid } from "ts-utils-julseb"
5
+ import { uuid } from "@julseb-lib/utils"
6
6
  import { useMergeRefs, useClickOutside } from "../../"
7
7
  import { DropdownItem } from "./DropdownItem"
8
8
  import { StyledDropdown } from "./styles"
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Dropdown styles ===============================================*/
2
2
 
3
3
  import styled, { css } from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import {
6
6
  BREAKPOINTS,
7
7
  FONT_FAMILIES,
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Fallback ===============================================*/
2
2
 
3
3
  import styled from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { setDefaultTheme, Mixins } from "../../"
6
6
  import type { ILibRadius } from "../../types"
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Footer component ===============================================*/
2
2
 
3
3
  import { forwardRef, Fragment } from "react"
4
- import { uuid } from "ts-utils-julseb"
4
+ import { uuid } from "@julseb-lib/utils"
5
5
  import { FooterLogo } from "./FooterLogo"
6
6
  import { FooterLink } from "./FooterLink"
7
7
  import {
@@ -3,11 +3,11 @@
3
3
  import { LogoText, LogoImg } from "./styles"
4
4
  import type { ILibFooterLogo } from "./subtypes"
5
5
 
6
- export function FooterLogo({
6
+ export const FooterLogo = ({
7
7
  "data-testid": testid,
8
8
  className,
9
9
  logo,
10
- }: ILibFooterLogo) {
10
+ }: ILibFooterLogo) => {
11
11
  const { text, img, alt = "Logo", width = 100, height = 30 } = logo as any
12
12
 
13
13
  if (text || typeof logo === "string")
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Form styles ===============================================*/
2
2
 
3
3
  import styled from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { Mixins, setDefaultTheme } from "../../"
6
6
  import type { LibSpacers } from "../../types"
7
7
 
@@ -1,7 +1,7 @@
1
1
  /*=============================================== FullBleed styles ===============================================*/
2
2
 
3
3
  import styled, { css } from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { Mixins, setDefaultTheme } from "../../"
6
6
  import type { ILibPadding } from "../../types"
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef, useState, useEffect, useRef, type RefObject } from "react"
4
4
  import classNames from "classnames"
5
- import { enableScroll, disableScroll } from "ts-utils-julseb"
5
+ import { enableScroll, disableScroll } from "@julseb-lib/utils"
6
6
  import { useMaxWidth, useKeyPress } from "../../"
7
7
  import { HeaderBurger } from "./HeaderBurger"
8
8
  import { HeaderSearch } from "./HeaderSearch"
@@ -4,13 +4,13 @@ import { Link } from "react-router-dom"
4
4
  import { Logo, LogoImg } from "./styles"
5
5
  import type { ILibHeaderLogo } from "./subtypes"
6
6
 
7
- export function HeaderLogo({
7
+ export const HeaderLogo = ({
8
8
  "data-testid": testid,
9
9
  className,
10
10
  logo,
11
11
  children,
12
12
  isOpen,
13
- }: ILibHeaderLogo) {
13
+ }: ILibHeaderLogo) => {
14
14
  const {
15
15
  to = "/",
16
16
  href,
@@ -1,16 +1,16 @@
1
1
  /*=============================================== HeaderNav ===============================================*/
2
2
 
3
- import { useRef, isValidElement, type ReactNode, Fragment } from "react"
3
+ import { useRef, type ReactNode } from "react"
4
4
  import classNames from "classnames"
5
- import { uuid } from "ts-utils-julseb"
5
+ import { uuid } from "@julseb-lib/utils"
6
6
  import { useMaxWidth, useClickOutside } from "../../"
7
7
  import { HeaderNavLink } from "./HeaderNavLink"
8
8
  import { HeaderSearch } from "./HeaderSearch"
9
9
  import { Nav } from "./styles"
10
10
  import type { ILibHeaderNav } from "./subtypes"
11
- import { LibHeaderLink } from "../../types"
11
+ import type { LibHeaderLink } from "../../types"
12
12
 
13
- export function HeaderNav({
13
+ export const HeaderNav = ({
14
14
  "data-testid": testid,
15
15
  className,
16
16
  search,
@@ -24,7 +24,7 @@ export function HeaderNav({
24
24
  burgerRef,
25
25
  handleClose,
26
26
  nav,
27
- }: ILibHeaderNav) {
27
+ }: ILibHeaderNav) => {
28
28
  const isMobile = useMaxWidth(600)
29
29
 
30
30
  const el = useRef<HTMLDivElement>(null)
@@ -64,20 +64,15 @@ export function HeaderNav({
64
64
  />
65
65
  )}
66
66
 
67
- {links
68
- ? links.map(link =>
69
- isValidElement(link) ? (
70
- <Fragment>{link}</Fragment>
71
- ) : (
72
- <HeaderNavLink
73
- data-testid={testid}
74
- className={className}
75
- link={link as LibHeaderLink | JSX.Element}
76
- key={uuid()}
77
- />
78
- )
79
- )
80
- : null}
67
+ {links &&
68
+ links.map(link => (
69
+ <HeaderNavLink
70
+ data-testid={testid}
71
+ className={className}
72
+ link={link as LibHeaderLink | JSX.Element}
73
+ key={uuid()}
74
+ />
75
+ ))}
81
76
 
82
77
  {children && children}
83
78
 
@@ -1,13 +1,17 @@
1
+ // @ts-nocheck
1
2
  /*=============================================== HeaderNavLink ===============================================*/
2
3
 
4
+ import { isValidElement } from "react"
3
5
  import { NavLink } from "react-router-dom"
4
6
  import type { ILibHeaderNavLink } from "./subtypes"
5
7
 
6
- export function HeaderNavLink({
8
+ export const HeaderNavLink = ({
7
9
  "data-testid": testid,
8
10
  link,
9
11
  className,
10
- }: ILibHeaderNavLink) {
12
+ }: ILibHeaderNavLink) => {
13
+ if (isValidElement(link)) return link
14
+
11
15
  if (link.to)
12
16
  return (
13
17
  <NavLink
@@ -6,12 +6,12 @@ import { Input } from "../../"
6
6
  import { SearchForm } from "./styles"
7
7
  import type { ILibHeaderSearch } from "./subtypes"
8
8
 
9
- export function HeaderSearch({
9
+ export const HeaderSearch = ({
10
10
  "data-testid": testid,
11
11
  className,
12
12
  search,
13
13
  handleClose,
14
- }: ILibHeaderSearch) {
14
+ }: ILibHeaderSearch) => {
15
15
  if (!search) return null
16
16
 
17
17
  const {
@@ -2,7 +2,7 @@
2
2
 
3
3
  import styled, { css } from "styled-components"
4
4
  import { Link } from "react-router-dom"
5
- import { stringifyPx } from "ts-utils-julseb"
5
+ import { stringifyPx } from "@julseb-lib/utils"
6
6
  import {
7
7
  setDefaultTheme,
8
8
  Image,
@@ -1,6 +1,5 @@
1
1
  /*=============================================== Header types ===============================================*/
2
2
 
3
- import type { FC } from "react"
4
3
  import type {
5
4
  LibComponentBase,
6
5
  LibHeaderPosition,
@@ -20,7 +20,7 @@ const helmetData = new HelmetData({})
20
20
  * @prop language?: string
21
21
  * @prop children?: ReactChildren
22
22
  */
23
- export function Helmet({
23
+ export const Helmet = ({
24
24
  title,
25
25
  favicon,
26
26
  description,
@@ -32,7 +32,7 @@ export function Helmet({
32
32
  language = "en",
33
33
  children,
34
34
  ...rest
35
- }: ILibHelmet) {
35
+ }: ILibHelmet) => {
36
36
  return (
37
37
  <Meta helmetData={helmetData} {...rest}>
38
38
  <title>{title}</title>
@@ -1,7 +1,7 @@
1
1
  /*=============================================== Hr styles ===============================================*/
2
2
 
3
3
  import styled from "styled-components"
4
- import { stringifyPx } from "ts-utils-julseb"
4
+ import { stringifyPx } from "@julseb-lib/utils"
5
5
  import { setDefaultTheme, Mixins, RADIUSES } from "../../"
6
6
  import type { LibAllColors, ILibMargin } from "../../types"
7
7
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import styled from "styled-components"
4
4
  import SVG from "react-inlinesvg"
5
- import { stringifyPx } from "ts-utils-julseb"
5
+ import { stringifyPx } from "@julseb-lib/utils"
6
6
  import { setDefaultTheme, Mixins } from "../../"
7
7
  import type { LibAllColors } from "../../types"
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  import type { FC } from "react"
4
4
  import styled from "styled-components"
5
- import { stringifyPx } from "ts-utils-julseb"
5
+ import { stringifyPx } from "@julseb-lib/utils"
6
6
  import { setDefaultTheme, Text, Mixins, SPACERS } from "../../"
7
7
  import type {
8
8
  LibAllColors,
@@ -63,7 +63,7 @@ const InputFunction = forwardRef<
63
63
  * @prop label?: string
64
64
  * @prop labelComment?: string
65
65
  * @prop helper?: string
66
- * @prop helperBottom?: string | { text: string; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
66
+ * @prop helperBottom?: string | { text: string => only if element is not defined; element: ReactChildren => only if text is not defined; textColor?: Any color from the library; fontStyle?: CssFontStyle; icon?: string | JSX.Element; iconColor?: Any color from the library; iconSize?: number }
67
67
  * @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
68
68
  * @prop iconBaseUrl?: string
69
69
  * @prop inputBackground?: "light" | "dark"
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { forwardRef } from "react"
4
4
  import classNames from "classnames"
5
- import { capitalize } from "ts-utils-julseb"
5
+ import { capitalize } from "@julseb-lib/utils"
6
6
  import { LibIcon } from "../LibIcon"
7
7
  import { Check } from "../../icons"
8
8
  import {