@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.
- package/dist/index.cjs.js +528 -528
- package/dist/index.es.js +5950 -6493
- package/dist/index.umd.js +571 -571
- package/dist/lib/Mixins.tsx +1 -1
- package/dist/lib/components/Accordion/Accordion.tsx +1 -1
- package/dist/lib/components/Accordion/AccordionButton.tsx +3 -3
- package/dist/lib/components/Accordion/AccordionContent.tsx +3 -3
- package/dist/lib/components/Accordion/AccordionItem.tsx +1 -1
- package/dist/lib/components/Alert/Alert.tsx +1 -1
- package/dist/lib/components/Aside/styles.tsx +1 -1
- package/dist/lib/components/Autocomplete/Autocomplete.tsx +2 -2
- package/dist/lib/components/Avatar/Avatar.tsx +1 -1
- package/dist/lib/components/Avatar/AvatarFunction.tsx +1 -1
- package/dist/lib/components/BackToTop/BackToTop.tsx +1 -1
- package/dist/lib/components/Badge/Badge.tsx +1 -1
- package/dist/lib/components/Breadcrumbs/BreadcrumbItem.tsx +3 -3
- package/dist/lib/components/Breadcrumbs/Breadcrumbs.tsx +1 -1
- package/dist/lib/components/Breadcrumbs/BreadcrumbsFn.tsx +1 -1
- package/dist/lib/components/Burger/styles.tsx +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroup.tsx +1 -1
- package/dist/lib/components/ButtonGroup/ButtonGroupButton.tsx +1 -1
- package/dist/lib/components/ButtonIcon/ButtonIcon.tsx +1 -1
- package/dist/lib/components/ButtonIcon/styles.tsx +1 -1
- package/dist/lib/components/Card/styles.tsx +1 -1
- package/dist/lib/components/Cover/styles.tsx +1 -1
- package/dist/lib/components/Datepicker/Calendar.tsx +3 -3
- package/dist/lib/components/Datepicker/Datepicker.tsx +2 -2
- package/dist/lib/components/DragList/styles.tsx +1 -1
- package/dist/lib/components/Drawer/Drawer.tsx +4 -1
- package/dist/lib/components/Dropdown/Dropdown.tsx +1 -1
- package/dist/lib/components/Dropdown/styles.tsx +1 -1
- package/dist/lib/components/Fallback/Fallback.tsx +1 -1
- package/dist/lib/components/Footer/Footer.tsx +1 -1
- package/dist/lib/components/Footer/FooterLogo.tsx +2 -2
- package/dist/lib/components/Form/styles.tsx +1 -1
- package/dist/lib/components/FullBleed/styles.tsx +1 -1
- package/dist/lib/components/Header/Header.tsx +1 -1
- package/dist/lib/components/Header/HeaderLogo.tsx +2 -2
- package/dist/lib/components/Header/HeaderNav.tsx +14 -19
- package/dist/lib/components/Header/HeaderNavLink.tsx +6 -2
- package/dist/lib/components/Header/HeaderSearch.tsx +2 -2
- package/dist/lib/components/Header/styles.tsx +1 -1
- package/dist/lib/components/Header/types.ts +0 -1
- package/dist/lib/components/Helmet/Helmet.tsx +2 -2
- package/dist/lib/components/Hr/styles.tsx +1 -1
- package/dist/lib/components/Icon/styles.tsx +1 -1
- package/dist/lib/components/Image/styles.tsx +1 -1
- package/dist/lib/components/Input/Input.tsx +1 -1
- package/dist/lib/components/InputCheck/InputCheck.tsx +1 -1
- package/dist/lib/components/InputComponents/components/InputButton.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputContainer.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputIcon.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputPrefix.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputRightContainer.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputSuffix.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputValidationHelper.tsx +5 -5
- package/dist/lib/components/InputComponents/components/InputValidationIcon.tsx +2 -2
- package/dist/lib/components/InputComponents/components/InputWrapper.tsx +2 -2
- package/dist/lib/components/InputComponents/types.ts +2 -13
- package/dist/lib/components/InputContainer/HelperBottom.tsx +89 -0
- package/dist/lib/components/InputContainer/InputContainer.tsx +12 -90
- package/dist/lib/components/InputContainer/styles.tsx +4 -4
- package/dist/lib/components/InputContainer/subtypes.ts +10 -0
- package/dist/lib/components/InputContainer/types.ts +2 -13
- package/dist/lib/components/InputCounter/InputCounter.tsx +1 -1
- package/dist/lib/components/InputImage/EmptyContainer.tsx +2 -2
- package/dist/lib/components/InputImage/HoverContainer.tsx +2 -2
- package/dist/lib/components/InputImage/InputImage.tsx +5 -3
- package/dist/lib/components/InputImage/styles.tsx +1 -1
- package/dist/lib/components/InputImage/types.ts +1 -0
- package/dist/lib/components/InputPhone/InputPhone.tsx +1 -1
- package/dist/lib/components/InputPin/InputPin.tsx +1 -1
- package/dist/lib/components/InputSlider/InputSlider.tsx +1 -1
- package/dist/lib/components/InputSlider/styles.tsx +1 -1
- package/dist/lib/components/LibIcon/LibIcon.tsx +2 -2
- package/dist/lib/components/Linkify/Linkify.tsx +1 -1
- package/dist/lib/components/ListGroup/ListGroup.tsx +1 -1
- package/dist/lib/components/ListGroup/styles.tsx +1 -1
- package/dist/lib/components/Loader/styles.tsx +1 -1
- package/dist/lib/components/Main/styles.tsx +1 -1
- package/dist/lib/components/MarkdownEditor/MarkdownEditor.tsx +1 -1
- package/dist/lib/components/MarkdownEditor/MdEditorButtons/EditorButtonTitles.tsx +2 -2
- package/dist/lib/components/MarkdownEditor/MdEditorButtons/EditorButtons.tsx +3 -3
- package/dist/lib/components/MarkdownEditor/MdEditorButtons/MarkdownButtons.tsx +1 -1
- package/dist/lib/components/Masonry/Masonry.tsx +1 -1
- package/dist/lib/components/Messaging/Message.tsx +1 -1
- package/dist/lib/components/Messaging/Messaging.tsx +1 -1
- package/dist/lib/components/Modal/Modal.tsx +1 -1
- package/dist/lib/components/PageLayout/PageLayout.tsx +2 -2
- package/dist/lib/components/PageLoading/PageLoading.tsx +1 -1
- package/dist/lib/components/ProgressBar/ProgressBar.tsx +1 -1
- package/dist/lib/components/ProgressCircle/Circle.tsx +2 -2
- package/dist/lib/components/ProgressCircle/Value.tsx +2 -2
- package/dist/lib/components/Rating/Rating.tsx +2 -2
- package/dist/lib/components/ResetScroll/ResetScroll.tsx +1 -1
- package/dist/lib/components/Select/Select.tsx +1 -1
- package/dist/lib/components/Skeleton/styles.tsx +1 -1
- package/dist/lib/components/Slideshow/Slideshow.tsx +1 -1
- package/dist/lib/components/Slideshow/SlideshowButton.tsx +2 -2
- package/dist/lib/components/Slideshow/SlideshowPagination.tsx +3 -3
- package/dist/lib/components/Slideshow/styles.tsx +1 -1
- package/dist/lib/components/Stepper/Stepper.tsx +1 -1
- package/dist/lib/components/Table/Table.tsx +1 -1
- package/dist/lib/components/Tabs/Tabs.tsx +1 -1
- package/dist/lib/components/TextIcon/styles.tsx +1 -1
- package/dist/lib/components/Timepicker/Timepicker.tsx +1 -1
- package/dist/lib/components/Toast/Toast.tsx +1 -1
- package/dist/lib/components/Toast/Toaster.tsx +1 -1
- package/dist/lib/components/Video/styles.tsx +1 -1
- package/dist/lib/components/Youtube/Youtube.tsx +1 -1
- package/dist/lib/components/Youtube/styles.tsx +1 -1
- package/dist/lib/hooks/usePagination.tsx +1 -1
- package/dist/lib/hooks/useTranslation.tsx +1 -1
- package/dist/lib/index.ts +2 -1
- package/dist/lib/lib-utils/get-highlighted-text.tsx +1 -1
- package/dist/lib/types/component-items.ts +28 -0
- package/dist/lib/utils/linkify-text.tsx +1 -1
- package/dist/{styles-DM9qlYpR.js → styles-BCSPldCD.js} +1 -1
- package/dist/{styles-CVN0uFDU.cjs → styles-CtcGw3Gv.cjs} +2 -2
- package/package.json +4 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== InputSlider styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css } from "styled-components"
|
|
4
|
-
import { getPercentage } from "
|
|
4
|
+
import { getPercentage } from "@julseb-lib/utils"
|
|
5
5
|
import {
|
|
6
6
|
BREAKPOINTS,
|
|
7
7
|
OVERLAYS,
|
|
@@ -12,14 +12,14 @@ import type { ILibLibIcon } from "./types"
|
|
|
12
12
|
* @prop color?: Any color from the library
|
|
13
13
|
* @prop className?: string
|
|
14
14
|
*/
|
|
15
|
-
export
|
|
15
|
+
export const LibIcon = ({
|
|
16
16
|
"data-testid": testid,
|
|
17
17
|
icon,
|
|
18
18
|
size,
|
|
19
19
|
color,
|
|
20
20
|
className,
|
|
21
21
|
baseUrl,
|
|
22
|
-
}: ILibLibIcon) {
|
|
22
|
+
}: ILibLibIcon) => {
|
|
23
23
|
if (typeof icon !== "string") return icon
|
|
24
24
|
|
|
25
25
|
return (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Linkify component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, Fragment } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { Text } from "../../"
|
|
6
6
|
import type { ILibLinkify } from "./types"
|
|
7
7
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useRef } from "react"
|
|
4
4
|
import classNames from "classnames"
|
|
5
|
-
import { uuid } from "
|
|
5
|
+
import { uuid } from "@julseb-lib/utils"
|
|
6
6
|
import { useMergeRefs } from "../../hooks"
|
|
7
7
|
import { ListGroupTitle } from "./ListGroupTitle"
|
|
8
8
|
import { ListGroupItem } from "./ListGroupItem"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== ListGroup styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css } from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import {
|
|
6
6
|
BREAKPOINTS,
|
|
7
7
|
FONT_SIZES,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Loader styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css, keyframes } from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { Mixins, RADIUSES, setDefaultTheme } from "../../"
|
|
6
6
|
import type { LibAllColors } from "../../types"
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Main styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css } from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { setDefaultTheme, Mixins, BREAKPOINTS, SPACERS, LAYOUTS } from "../../"
|
|
6
6
|
import type { LibMainSize } from "../../types"
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ import type { ILibMarkdownEditor } from "./types"
|
|
|
29
29
|
* @prop label?: string
|
|
30
30
|
* @prop labelComment?: string
|
|
31
31
|
* @prop helper?: string
|
|
32
|
-
* @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 }
|
|
32
|
+
* @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 }
|
|
33
33
|
* @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
|
|
34
34
|
* @prop iconBaseUrl?: string
|
|
35
35
|
* @prop inputBackground?: "light" | "dark"
|
|
@@ -6,14 +6,14 @@ import { mdTitlesButtons } from "../markdown-buttons"
|
|
|
6
6
|
import { TitlesDropdown, TitleDropdownItem } from "../styles"
|
|
7
7
|
import type { ILibMarkdownEditorTitles } from "../subtypes"
|
|
8
8
|
|
|
9
|
-
export
|
|
9
|
+
export const EditorButtonTitles = ({
|
|
10
10
|
"data-testid": testid,
|
|
11
11
|
showButtons,
|
|
12
12
|
className,
|
|
13
13
|
textButtonTitles,
|
|
14
14
|
inputRef,
|
|
15
15
|
addCode,
|
|
16
|
-
}: ILibMarkdownEditorTitles) {
|
|
16
|
+
}: ILibMarkdownEditorTitles) => {
|
|
17
17
|
const [isTextOpen, setIsTextOpen] = useState(false)
|
|
18
18
|
|
|
19
19
|
if (showButtons?.titles === false) return null
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/*=============================================== EditorButtons component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import classNames from "classnames"
|
|
4
|
-
import { uuid, toSentenceCase } from "
|
|
4
|
+
import { uuid, toSentenceCase } from "@julseb-lib/utils"
|
|
5
5
|
import { Flexbox } from "../../../"
|
|
6
6
|
import type { LibMdEditorEditor } from "../../../types"
|
|
7
7
|
import { mdEditorButtons } from "../markdown-buttons"
|
|
8
8
|
import { IconButton } from "../styles"
|
|
9
9
|
import type { ILibMdEditorButtons } from "../subtypes"
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export const EditorButtons = ({
|
|
12
12
|
"data-testid": testid,
|
|
13
13
|
className,
|
|
14
14
|
showButtons,
|
|
@@ -17,7 +17,7 @@ export function EditorButtons({
|
|
|
17
17
|
iconsBaseUrl,
|
|
18
18
|
editor,
|
|
19
19
|
setEditor,
|
|
20
|
-
}: ILibMdEditorButtons) {
|
|
20
|
+
}: ILibMdEditorButtons) => {
|
|
21
21
|
return (
|
|
22
22
|
<Flexbox
|
|
23
23
|
data-testid={
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*=============================================== MarkdownButtons component ===============================================*/
|
|
2
2
|
|
|
3
|
-
import { uuid, toSentenceCase } from "
|
|
3
|
+
import { uuid, toSentenceCase } from "@julseb-lib/utils"
|
|
4
4
|
import { roundIconSize } from "../../../lib-utils"
|
|
5
5
|
import { mdButtons } from "../markdown-buttons"
|
|
6
6
|
import { IconButton } from "../styles"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Masonry component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useEffect, useRef, useState, useCallback } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { useMergeRefs } from "../../"
|
|
6
6
|
import { useEventListener, fillCols } from "./utils"
|
|
7
7
|
import { StyledMasonry, Col } from "./styles"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Messaging component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useState } from "react"
|
|
4
|
-
import { getToday, uuid, stringifyPx } from "
|
|
4
|
+
import { getToday, uuid, stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { Hr } from "../../"
|
|
6
6
|
import { appendStyles } from "../../lib-utils"
|
|
7
7
|
import { MessagesContainer } from "./MessagesContainer"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useCallback, useRef } from "react"
|
|
4
4
|
import classNames from "classnames"
|
|
5
|
-
import { enableScroll, getRandomString, stringifyPx } from "
|
|
5
|
+
import { enableScroll, getRandomString, stringifyPx } from "@julseb-lib/utils"
|
|
6
6
|
import { useKeyPress, useClickOutside } from "../../"
|
|
7
7
|
import { roundIconSize, appendStyles } from "../../lib-utils"
|
|
8
8
|
import { Close } from "../../icons"
|
|
@@ -27,7 +27,7 @@ import type { ILibPageLayout } from "./types"
|
|
|
27
27
|
* @prop main?: ILibMain => imported from Main component, only if template is set to single
|
|
28
28
|
* @prop mainMinHeight?: string | number => only if template is set to single
|
|
29
29
|
*/
|
|
30
|
-
export
|
|
30
|
+
export const PageLayout = ({
|
|
31
31
|
children,
|
|
32
32
|
isLoading,
|
|
33
33
|
pageLoading,
|
|
@@ -40,7 +40,7 @@ export function PageLayout({
|
|
|
40
40
|
template = "single",
|
|
41
41
|
main,
|
|
42
42
|
mainMinHeight = "85vh",
|
|
43
|
-
}: ILibPageLayout) {
|
|
43
|
+
}: ILibPageLayout) => {
|
|
44
44
|
return (
|
|
45
45
|
<>
|
|
46
46
|
{helmet && (
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== PageLoading component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useEffect } from "react"
|
|
4
|
-
import { disableScroll } from "
|
|
4
|
+
import { disableScroll } from "@julseb-lib/utils"
|
|
5
5
|
import { Loader } from "../../"
|
|
6
6
|
import { StyledPageLoading } from "./styles"
|
|
7
7
|
import type { ILibPageLoading } from "./types"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react"
|
|
4
4
|
import classNames from "classnames"
|
|
5
|
-
import { getPercentage, getRandomString } from "
|
|
5
|
+
import { getPercentage, getRandomString } from "@julseb-lib/utils"
|
|
6
6
|
import { appendStyles } from "../../lib-utils"
|
|
7
7
|
import { StyledProgressBar } from "./styles"
|
|
8
8
|
import type { ILibProgressBar } from "./types"
|
|
@@ -4,12 +4,12 @@ import classNames from "classnames"
|
|
|
4
4
|
import { StyledCircle } from "./styles"
|
|
5
5
|
import type { ILibProgressCircle } from "./types"
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const Circle = ({
|
|
8
8
|
className,
|
|
9
9
|
value,
|
|
10
10
|
color = "primary",
|
|
11
11
|
noAnimation,
|
|
12
|
-
}: ILibProgressCircle) {
|
|
12
|
+
}: ILibProgressCircle) => {
|
|
13
13
|
const r = 70
|
|
14
14
|
const circ = 2 * Math.PI * r
|
|
15
15
|
const strokePct = ((100 - value) * circ) / 100
|
|
@@ -4,12 +4,12 @@ import { SrOnly } from "../../"
|
|
|
4
4
|
import { Value as StyledValue } from "./styles"
|
|
5
5
|
import type { ILibProgressCircleValue } from "./subtypes"
|
|
6
6
|
|
|
7
|
-
export
|
|
7
|
+
export const Value = ({
|
|
8
8
|
"data-testid": testid,
|
|
9
9
|
className,
|
|
10
10
|
showValue,
|
|
11
11
|
value,
|
|
12
|
-
}: ILibProgressCircleValue) {
|
|
12
|
+
}: ILibProgressCircleValue) => {
|
|
13
13
|
if (!showValue)
|
|
14
14
|
return (
|
|
15
15
|
<SrOnly
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Rating component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useCallback } from "react"
|
|
4
|
-
import { generateNumbers } from "
|
|
4
|
+
import { generateNumbers } from "@julseb-lib/utils"
|
|
5
5
|
import { Flexbox } from "../../"
|
|
6
6
|
import { roundIconSize } from "../../lib-utils"
|
|
7
7
|
import { InputContainer } from "../InputComponents"
|
|
@@ -24,7 +24,7 @@ import type { ILibRating } from "./types"
|
|
|
24
24
|
* @prop label?: string
|
|
25
25
|
* @prop labelComment?: string
|
|
26
26
|
* @prop helper?: string
|
|
27
|
-
* @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 }
|
|
27
|
+
* @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 }
|
|
28
28
|
* @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
|
|
29
29
|
* @prop iconBaseUrl?: string
|
|
30
30
|
* @prop containerStyle?: CSSProperties
|
|
@@ -7,7 +7,7 @@ import { useLocation } from "react-router-dom"
|
|
|
7
7
|
* @description Scrolls to the top of the page every time the path changes, add it in your PageLayout
|
|
8
8
|
* @link https://documentation-components-react.vercel.app/helpers/reset-scroll
|
|
9
9
|
*/
|
|
10
|
-
export
|
|
10
|
+
export const ResetScroll = () => {
|
|
11
11
|
const { pathname, search } = useLocation()
|
|
12
12
|
|
|
13
13
|
useEffect(() => {
|
|
@@ -39,7 +39,7 @@ import type { ILibSelectButton } from "./subtypes"
|
|
|
39
39
|
* @prop label?: string
|
|
40
40
|
* @prop labelComment?: string
|
|
41
41
|
* @prop helper?: string
|
|
42
|
-
* @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 }
|
|
42
|
+
* @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 }
|
|
43
43
|
* @prop validation?: { status: LibValidationStatus; message?: string; iconNotPassed?: LibIcon; iconNotPassedSize?: number; iconPassed?: LibIcon; iconPassedSize?: number; iconBaseUrl?: string }
|
|
44
44
|
* @prop iconBaseUrl?: string
|
|
45
45
|
* @prop inputBackground?: "light" | "dark"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Skeleton styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css, keyframes } from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { setDefaultTheme, Flexbox, Mixins } from "../../"
|
|
6
6
|
import type { ILibBorder, ILibPadding, LibSkeletonAnimation } from "../../types"
|
|
7
7
|
import type { ILibSkeletonCommonStyles } from "./subtypes"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Slideshow component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useState, useCallback, useEffect } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { Image } from "../../"
|
|
6
6
|
import { SlideshowButton } from "./SlideshowButton"
|
|
7
7
|
import { SlideshowPagination } from "./SlideshowPagination"
|
|
@@ -8,13 +8,13 @@ import type { ILibSlideshowButton } from "./subtypes"
|
|
|
8
8
|
const DEFAULT_ICON_SIZE_SMALL = 24
|
|
9
9
|
const DEFAULT_ICON_SIZE_LARGE = 32
|
|
10
10
|
|
|
11
|
-
export
|
|
11
|
+
export const SlideshowButton = ({
|
|
12
12
|
"data-testid": testid,
|
|
13
13
|
className,
|
|
14
14
|
onClick,
|
|
15
15
|
position,
|
|
16
16
|
controls,
|
|
17
|
-
}: ILibSlideshowButton) {
|
|
17
|
+
}: ILibSlideshowButton) => {
|
|
18
18
|
const {
|
|
19
19
|
"data-testid": controlTestid,
|
|
20
20
|
className: controlClassName,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== SlideshowNav ===============================================*/
|
|
2
2
|
|
|
3
3
|
import classNames from "classnames"
|
|
4
|
-
import { uuid, generateNumbers } from "
|
|
4
|
+
import { uuid, generateNumbers } from "@julseb-lib/utils"
|
|
5
5
|
import { Image } from "../.."
|
|
6
6
|
import {
|
|
7
7
|
SlideshowThumbnail,
|
|
@@ -10,7 +10,7 @@ import {
|
|
|
10
10
|
} from "./styles"
|
|
11
11
|
import type { ILibSlideshowPagination } from "./subtypes"
|
|
12
12
|
|
|
13
|
-
export
|
|
13
|
+
export const SlideshowPagination = ({
|
|
14
14
|
"data-testid": testid,
|
|
15
15
|
className,
|
|
16
16
|
pagination,
|
|
@@ -18,7 +18,7 @@ export function SlideshowPagination({
|
|
|
18
18
|
setActive,
|
|
19
19
|
contentLength,
|
|
20
20
|
activeSlide,
|
|
21
|
-
}: ILibSlideshowPagination) {
|
|
21
|
+
}: ILibSlideshowPagination) => {
|
|
22
22
|
const {
|
|
23
23
|
position = "outside",
|
|
24
24
|
hideOnTouch,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Slideshow styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled, { css } from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import {
|
|
6
6
|
setDefaultTheme,
|
|
7
7
|
Mixins,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Stepper component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { Step } from "./Step"
|
|
6
6
|
import { StyledStepper } from "./styles"
|
|
7
7
|
import type { ILibStepper } from "./types"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Table component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { Linkify } from "../../"
|
|
6
6
|
import { THead } from "./THead"
|
|
7
7
|
import { TBody } from "./TBody"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useState } from "react"
|
|
4
4
|
import { useSearchParams } from "react-router-dom"
|
|
5
|
-
import { uuid } from "
|
|
5
|
+
import { uuid } from "@julseb-lib/utils"
|
|
6
6
|
import { Text } from "../../"
|
|
7
7
|
import { TabsContainer } from "./TabsContainer"
|
|
8
8
|
import { TabsButtonsContainer } from "./TabsButtonsContainer"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== TextIcon styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { Mixins, setDefaultTheme } from "../../"
|
|
6
6
|
import { getIconHeight } from "./utils"
|
|
7
7
|
import type { LibSpacers, LibTextIconTag } from "../../types"
|
|
@@ -41,7 +41,7 @@ import type { ILibTimepicker } 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"
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { forwardRef, useEffect, useCallback, useRef, useState } from "react"
|
|
4
4
|
import classNames from "classnames"
|
|
5
|
-
import { uuid } from "
|
|
5
|
+
import { uuid } from "@julseb-lib/utils"
|
|
6
6
|
import { Text, useToast, useMergeRefs } from "../.."
|
|
7
7
|
import { LibIcon } from "../LibIcon"
|
|
8
8
|
import { Close } from "../../icons"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Toaster component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
import { Loader } from "../Loader"
|
|
6
6
|
import { Toast } from "./Toast"
|
|
7
7
|
import type { LibAllColors } from "../../types"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Video styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { setDefaultTheme } from "../../"
|
|
6
6
|
import type { CssObjectFit } from "../../types"
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Youtube component ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { forwardRef } from "react"
|
|
4
|
-
import { convertYoutube } from "
|
|
4
|
+
import { convertYoutube } from "@julseb-lib/utils"
|
|
5
5
|
import { StyledYoutube } from "./styles"
|
|
6
6
|
import type { ILibYoutube } from "./types"
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Youtube styles ===============================================*/
|
|
2
2
|
|
|
3
3
|
import styled from "styled-components"
|
|
4
|
-
import { stringifyPx } from "
|
|
4
|
+
import { stringifyPx } from "@julseb-lib/utils"
|
|
5
5
|
import { setDefaultTheme } from "../../"
|
|
6
6
|
|
|
7
7
|
const StyledYoutube = styled.iframe<{
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import { useCallback } from "react"
|
|
4
4
|
import { useSearchParams } from "react-router-dom"
|
|
5
|
-
import { scrollToTop } from "
|
|
5
|
+
import { scrollToTop } from "@julseb-lib/utils"
|
|
6
6
|
import type { DispatchState } from "../types"
|
|
7
7
|
|
|
8
8
|
interface ILibUsePaginationNavigation {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== useTranslation ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { useState, useEffect } from "react"
|
|
4
|
-
import { detectLanguage } from "
|
|
4
|
+
import { detectLanguage } from "@julseb-lib/utils"
|
|
5
5
|
import type { TranslateLang } from "../types"
|
|
6
6
|
|
|
7
7
|
let currentLanguage = detectLanguage() || "en"
|
package/dist/lib/index.ts
CHANGED
|
@@ -24,6 +24,7 @@ export {
|
|
|
24
24
|
formatHour,
|
|
25
25
|
generateNumbers,
|
|
26
26
|
getFirstName,
|
|
27
|
+
getInitials,
|
|
27
28
|
getLastName,
|
|
28
29
|
getPercentage,
|
|
29
30
|
getRandom,
|
|
@@ -55,7 +56,7 @@ export {
|
|
|
55
56
|
toTitleCase,
|
|
56
57
|
unslugify,
|
|
57
58
|
uuid,
|
|
58
|
-
} from "
|
|
59
|
+
} from "@julseb-lib/utils"
|
|
59
60
|
|
|
60
61
|
export * from "./Variables"
|
|
61
62
|
export * from "./Mixins"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== GetHighlightedText ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { Fragment, type CSSProperties } from "react"
|
|
4
|
-
import { uuid, slugify } from "
|
|
4
|
+
import { uuid, slugify } from "@julseb-lib/utils"
|
|
5
5
|
import { Text } from ".."
|
|
6
6
|
import type { ReactChildren } from "../types"
|
|
7
7
|
|
|
@@ -10,6 +10,7 @@ import type {
|
|
|
10
10
|
LibToastStatus,
|
|
11
11
|
ReactChildren,
|
|
12
12
|
LibMessageType,
|
|
13
|
+
CssFontStyle,
|
|
13
14
|
} from "./"
|
|
14
15
|
|
|
15
16
|
/*====================== Base ======================*/
|
|
@@ -512,3 +513,30 @@ export type LibDragListItem =
|
|
|
512
513
|
| DragListItemWithContentAndBadge
|
|
513
514
|
| DragListItemWithContentAndDate
|
|
514
515
|
| DragListItemWithElement
|
|
516
|
+
|
|
517
|
+
/*====================== HelperBottom ======================*/
|
|
518
|
+
|
|
519
|
+
interface HelperBottomWithText {
|
|
520
|
+
text: string
|
|
521
|
+
textColor?: LibAllColors
|
|
522
|
+
fontStyle?: CssFontStyle
|
|
523
|
+
icon?: LibIcon
|
|
524
|
+
iconColor?: LibAllColors
|
|
525
|
+
iconSize?: number
|
|
526
|
+
element?: never
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
interface HelperBottomWithElement {
|
|
530
|
+
text?: never
|
|
531
|
+
textColor?: never
|
|
532
|
+
fontStyle?: never
|
|
533
|
+
icon?: never
|
|
534
|
+
iconColor?: never
|
|
535
|
+
iconSize?: never
|
|
536
|
+
element: ReactChildren
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
export type LibHelperBottom =
|
|
540
|
+
| string
|
|
541
|
+
| HelperBottomWithText
|
|
542
|
+
| HelperBottomWithElement
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*=============================================== Linkify text ===============================================*/
|
|
2
2
|
|
|
3
3
|
import { Fragment } from "react"
|
|
4
|
-
import { uuid } from "
|
|
4
|
+
import { uuid } from "@julseb-lib/utils"
|
|
5
5
|
|
|
6
6
|
export const URL_REGEX =
|
|
7
7
|
/^(http:\/\/www\.|https:\/\/www\.|http:\/\/|https:\/\/)?[a-z0-9]+([\-\.]{1}[a-z0-9]+)*\.[a-z]{2,5}(:[0-9]{1,5})?(\/.*)?$/gm
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),t=require("
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("styled-components"),t=require("@julseb-lib/utils"),o=require("./index.cjs.js");require("react");require("react-router-dom");const i=r.video`
|
|
2
2
|
display: block;
|
|
3
3
|
width: ${({$width:e})=>t.stringifyPx(e)};
|
|
4
4
|
height: ${({$height:e})=>t.stringifyPx(e)};
|
|
5
5
|
object-fit: ${({$fit:e})=>e};
|
|
6
6
|
aspect-ratio: ${({$aspectRatio:e})=>e};
|
|
7
|
-
`;
|
|
7
|
+
`;o.setDefaultTheme([i]);exports.default=i;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@julseb-lib/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.19",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"scripts": {
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"copy": "cp ./src/lib/index.css ./dist",
|
|
12
12
|
"copy-lib": "cp -a ./src/lib ./dist && rm -rf ./dist/lib/components/*/__tests__ ./dist/lib/components/*/__preview__",
|
|
13
13
|
"clean": "rm -rf ./dist/icons ./dist/images ./dist/vite.svg ./dist/favicon.svg ./dist/icons-alt",
|
|
14
|
-
"build
|
|
14
|
+
"build:lib": "rm -rf ./dist && mkdir ./dist && tsc && vite build && yarn copy && yarn copy-lib && yarn clean",
|
|
15
15
|
"cy": "cypress",
|
|
16
16
|
"cy:open": "cypress open",
|
|
17
17
|
"cy:ct:run": "cypress run --component --browser electron",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"check-errors": "tsc --noEmit"
|
|
25
25
|
},
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"@julseb-lib/utils": "^0.0.
|
|
27
|
+
"@julseb-lib/utils": "^0.0.2",
|
|
28
28
|
"classnames": "^2.5.1",
|
|
29
29
|
"fuse.js": "^7.0.0",
|
|
30
30
|
"markdown-to-jsx": "^7.5.0",
|
|
@@ -34,8 +34,7 @@
|
|
|
34
34
|
"react-inlinesvg": "^4.1.3",
|
|
35
35
|
"react-router-dom": "^6.26.1",
|
|
36
36
|
"react-syntax-highlighter": "^15.5.0",
|
|
37
|
-
"styled-components": "^6.1.12"
|
|
38
|
-
"ts-utils-julseb": "2.4.5"
|
|
37
|
+
"styled-components": "^6.1.12"
|
|
39
38
|
},
|
|
40
39
|
"devDependencies": {
|
|
41
40
|
"@eslint/compat": "^1.1.1",
|