@julseb-lib/react 1.0.44 → 1.0.46
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 +245 -197
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +25 -1
- package/dist/index.d.ts +25 -1
- package/dist/index.js +148 -101
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -531,6 +531,30 @@ declare const usePagination: ({ currentPage, setCurrentPage, totalPages, }: ILib
|
|
|
531
531
|
handlePage: (n: number) => void;
|
|
532
532
|
};
|
|
533
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Hook for calculating the number of lines text will occupy in a container with given dimensions and font properties.
|
|
536
|
+
*
|
|
537
|
+
* @hook
|
|
538
|
+
*
|
|
539
|
+
* @example
|
|
540
|
+
* const lineCount = useTextLineCount(
|
|
541
|
+
* "This is a long text that will wrap across multiple lines",
|
|
542
|
+
* 300,
|
|
543
|
+
* 16,
|
|
544
|
+
* "Arial"
|
|
545
|
+
* )
|
|
546
|
+
*
|
|
547
|
+
* @param {string} text - The text content to measure for line count.
|
|
548
|
+
* @param {number} containerWidth - The width of the container in pixels.
|
|
549
|
+
* @param {number} [fontSize=16] - The font size in pixels. Default: 16.
|
|
550
|
+
* @param {string} [fontFamily="lato"] - The font family to use for measurement. Default: "system-ui".
|
|
551
|
+
*
|
|
552
|
+
* @returns {number} The number of lines the text will occupy.
|
|
553
|
+
*
|
|
554
|
+
* @see https://doc-julseb-lib-react.vercel.app/hooks/use-text-line-count
|
|
555
|
+
*/
|
|
556
|
+
declare const useTextLineCount: (text: string, containerWidth: number, fontSize?: number, fontFamily?: string) => number;
|
|
557
|
+
|
|
534
558
|
/**
|
|
535
559
|
* Hook to detect if the current device supports touch screen interaction.
|
|
536
560
|
*
|
|
@@ -3331,4 +3355,4 @@ declare const SrOnly: FC$1<ILibSrOnly>;
|
|
|
3331
3355
|
*/
|
|
3332
3356
|
declare const CodeContainer: FC$1<ILibCodeContainer>;
|
|
3333
3357
|
|
|
3334
|
-
export { Accordion, AccordionItem, Alert, Aside, Autocomplete, Avatar, BackToTop, Badge, Breadcrumbs, Burger, Button, ButtonGroup, ButtonIcon, COLORS, CodeContainer, Cover, DROP_SHADOWS, DragList, DragListItem, Drawer, Dropdown, DropdownItem, FONT_FAMILIES, FONT_SIZES, FONT_WEIGHTS, Fade, Fieldset, Flexbox, Footer, Form, Grid, Header, Highlight, Hr, ICON_MULTIPLIER, INPUT_HEIGHT, INSET_SHADOWS, Image, Input, InputCheck, InputContainer, InputCounter, InputImage, InputPhone, InputPin, InputSlider, Key, LAYOUTS, LINE_HEIGHTS, Linkify, ListGroup, ListGroupItem, ListGroupTitle, Loader, MEDIA, Main, MarkdownContainer, MarkdownEditor, Masonry, Meta, Modal, OVERLAYS, PageLayout, PageLoading, Pagination, PaginationButton, Paginator, ProgressBar, ProgressCircle, RADIUSES, Rating, SHADOWS, SPACERS, Section, Select, Skeleton, SkeletonCard, Slideshow, SrOnly, Sticky, TEXT_BASE_CLASSES, TEXT_SHADOWS, TRANSITIONS, Table, Tabs, TabsButton, TabsButtonsContainer, TabsContainer, TabsContent, Tag, Text, ThemeProviderWrapper, Toast, ToastContainer, Tooltip, URL_REGEX, Wrapper, clsx, countries, detectLanguage, disableScroll, enableScroll, genAlignContent, genAlignItems, genBgAllColors, genBgAllColorsAndOverlays, genBgColor, genBgColor50, genBgColorGhostHover, genBgColorHover, genBgColorShort, genBgOverlay, genBorderAllColors, genBorderColor, genBorderColorHover, genBorderColorShort, genBorderRadius, genBoxShadow, genButtonColor, genButtonDisabled, genColGap, genGap, genJustifyContent, genJustifyItems, genLinkColor, genMaxWidth, genObjectFit, genRingColor, genRingColorChildren, genRowGap, genTextAlign, genTextAllColor, genTextColor, genTextColorHover, genTextColorShort, genVAlign, libMarkdownEditorOptions, libOptionsMarkdown, linkifyText, scrollToTop, toast, useClickOutside, useCopyToClipboard, useDebounce, useExportData, useFetch, useForm, useIsOverflow, useKeyPress, useLibTheme, useMaxWidth, useMergeRefs, useMinWidth, usePaginatedData, usePagination, useTouchScreen, useTranslation };
|
|
3358
|
+
export { Accordion, AccordionItem, Alert, Aside, Autocomplete, Avatar, BackToTop, Badge, Breadcrumbs, Burger, Button, ButtonGroup, ButtonIcon, COLORS, CodeContainer, Cover, DROP_SHADOWS, DragList, DragListItem, Drawer, Dropdown, DropdownItem, FONT_FAMILIES, FONT_SIZES, FONT_WEIGHTS, Fade, Fieldset, Flexbox, Footer, Form, Grid, Header, Highlight, Hr, ICON_MULTIPLIER, INPUT_HEIGHT, INSET_SHADOWS, Image, Input, InputCheck, InputContainer, InputCounter, InputImage, InputPhone, InputPin, InputSlider, Key, LAYOUTS, LINE_HEIGHTS, Linkify, ListGroup, ListGroupItem, ListGroupTitle, Loader, MEDIA, Main, MarkdownContainer, MarkdownEditor, Masonry, Meta, Modal, OVERLAYS, PageLayout, PageLoading, Pagination, PaginationButton, Paginator, ProgressBar, ProgressCircle, RADIUSES, Rating, SHADOWS, SPACERS, Section, Select, Skeleton, SkeletonCard, Slideshow, SrOnly, Sticky, TEXT_BASE_CLASSES, TEXT_SHADOWS, TRANSITIONS, Table, Tabs, TabsButton, TabsButtonsContainer, TabsContainer, TabsContent, Tag, Text, ThemeProviderWrapper, Toast, ToastContainer, Tooltip, URL_REGEX, Wrapper, clsx, countries, detectLanguage, disableScroll, enableScroll, genAlignContent, genAlignItems, genBgAllColors, genBgAllColorsAndOverlays, genBgColor, genBgColor50, genBgColorGhostHover, genBgColorHover, genBgColorShort, genBgOverlay, genBorderAllColors, genBorderColor, genBorderColorHover, genBorderColorShort, genBorderRadius, genBoxShadow, genButtonColor, genButtonDisabled, genColGap, genGap, genJustifyContent, genJustifyItems, genLinkColor, genMaxWidth, genObjectFit, genRingColor, genRingColorChildren, genRowGap, genTextAlign, genTextAllColor, genTextColor, genTextColorHover, genTextColorShort, genVAlign, libMarkdownEditorOptions, libOptionsMarkdown, linkifyText, scrollToTop, toast, useClickOutside, useCopyToClipboard, useDebounce, useExportData, useFetch, useForm, useIsOverflow, useKeyPress, useLibTheme, useMaxWidth, useMergeRefs, useMinWidth, usePaginatedData, usePagination, useTextLineCount, useTouchScreen, useTranslation };
|
package/dist/index.d.ts
CHANGED
|
@@ -531,6 +531,30 @@ declare const usePagination: ({ currentPage, setCurrentPage, totalPages, }: ILib
|
|
|
531
531
|
handlePage: (n: number) => void;
|
|
532
532
|
};
|
|
533
533
|
|
|
534
|
+
/**
|
|
535
|
+
* Hook for calculating the number of lines text will occupy in a container with given dimensions and font properties.
|
|
536
|
+
*
|
|
537
|
+
* @hook
|
|
538
|
+
*
|
|
539
|
+
* @example
|
|
540
|
+
* const lineCount = useTextLineCount(
|
|
541
|
+
* "This is a long text that will wrap across multiple lines",
|
|
542
|
+
* 300,
|
|
543
|
+
* 16,
|
|
544
|
+
* "Arial"
|
|
545
|
+
* )
|
|
546
|
+
*
|
|
547
|
+
* @param {string} text - The text content to measure for line count.
|
|
548
|
+
* @param {number} containerWidth - The width of the container in pixels.
|
|
549
|
+
* @param {number} [fontSize=16] - The font size in pixels. Default: 16.
|
|
550
|
+
* @param {string} [fontFamily="lato"] - The font family to use for measurement. Default: "system-ui".
|
|
551
|
+
*
|
|
552
|
+
* @returns {number} The number of lines the text will occupy.
|
|
553
|
+
*
|
|
554
|
+
* @see https://doc-julseb-lib-react.vercel.app/hooks/use-text-line-count
|
|
555
|
+
*/
|
|
556
|
+
declare const useTextLineCount: (text: string, containerWidth: number, fontSize?: number, fontFamily?: string) => number;
|
|
557
|
+
|
|
534
558
|
/**
|
|
535
559
|
* Hook to detect if the current device supports touch screen interaction.
|
|
536
560
|
*
|
|
@@ -3331,4 +3355,4 @@ declare const SrOnly: FC$1<ILibSrOnly>;
|
|
|
3331
3355
|
*/
|
|
3332
3356
|
declare const CodeContainer: FC$1<ILibCodeContainer>;
|
|
3333
3357
|
|
|
3334
|
-
export { Accordion, AccordionItem, Alert, Aside, Autocomplete, Avatar, BackToTop, Badge, Breadcrumbs, Burger, Button, ButtonGroup, ButtonIcon, COLORS, CodeContainer, Cover, DROP_SHADOWS, DragList, DragListItem, Drawer, Dropdown, DropdownItem, FONT_FAMILIES, FONT_SIZES, FONT_WEIGHTS, Fade, Fieldset, Flexbox, Footer, Form, Grid, Header, Highlight, Hr, ICON_MULTIPLIER, INPUT_HEIGHT, INSET_SHADOWS, Image, Input, InputCheck, InputContainer, InputCounter, InputImage, InputPhone, InputPin, InputSlider, Key, LAYOUTS, LINE_HEIGHTS, Linkify, ListGroup, ListGroupItem, ListGroupTitle, Loader, MEDIA, Main, MarkdownContainer, MarkdownEditor, Masonry, Meta, Modal, OVERLAYS, PageLayout, PageLoading, Pagination, PaginationButton, Paginator, ProgressBar, ProgressCircle, RADIUSES, Rating, SHADOWS, SPACERS, Section, Select, Skeleton, SkeletonCard, Slideshow, SrOnly, Sticky, TEXT_BASE_CLASSES, TEXT_SHADOWS, TRANSITIONS, Table, Tabs, TabsButton, TabsButtonsContainer, TabsContainer, TabsContent, Tag, Text, ThemeProviderWrapper, Toast, ToastContainer, Tooltip, URL_REGEX, Wrapper, clsx, countries, detectLanguage, disableScroll, enableScroll, genAlignContent, genAlignItems, genBgAllColors, genBgAllColorsAndOverlays, genBgColor, genBgColor50, genBgColorGhostHover, genBgColorHover, genBgColorShort, genBgOverlay, genBorderAllColors, genBorderColor, genBorderColorHover, genBorderColorShort, genBorderRadius, genBoxShadow, genButtonColor, genButtonDisabled, genColGap, genGap, genJustifyContent, genJustifyItems, genLinkColor, genMaxWidth, genObjectFit, genRingColor, genRingColorChildren, genRowGap, genTextAlign, genTextAllColor, genTextColor, genTextColorHover, genTextColorShort, genVAlign, libMarkdownEditorOptions, libOptionsMarkdown, linkifyText, scrollToTop, toast, useClickOutside, useCopyToClipboard, useDebounce, useExportData, useFetch, useForm, useIsOverflow, useKeyPress, useLibTheme, useMaxWidth, useMergeRefs, useMinWidth, usePaginatedData, usePagination, useTouchScreen, useTranslation };
|
|
3358
|
+
export { Accordion, AccordionItem, Alert, Aside, Autocomplete, Avatar, BackToTop, Badge, Breadcrumbs, Burger, Button, ButtonGroup, ButtonIcon, COLORS, CodeContainer, Cover, DROP_SHADOWS, DragList, DragListItem, Drawer, Dropdown, DropdownItem, FONT_FAMILIES, FONT_SIZES, FONT_WEIGHTS, Fade, Fieldset, Flexbox, Footer, Form, Grid, Header, Highlight, Hr, ICON_MULTIPLIER, INPUT_HEIGHT, INSET_SHADOWS, Image, Input, InputCheck, InputContainer, InputCounter, InputImage, InputPhone, InputPin, InputSlider, Key, LAYOUTS, LINE_HEIGHTS, Linkify, ListGroup, ListGroupItem, ListGroupTitle, Loader, MEDIA, Main, MarkdownContainer, MarkdownEditor, Masonry, Meta, Modal, OVERLAYS, PageLayout, PageLoading, Pagination, PaginationButton, Paginator, ProgressBar, ProgressCircle, RADIUSES, Rating, SHADOWS, SPACERS, Section, Select, Skeleton, SkeletonCard, Slideshow, SrOnly, Sticky, TEXT_BASE_CLASSES, TEXT_SHADOWS, TRANSITIONS, Table, Tabs, TabsButton, TabsButtonsContainer, TabsContainer, TabsContent, Tag, Text, ThemeProviderWrapper, Toast, ToastContainer, Tooltip, URL_REGEX, Wrapper, clsx, countries, detectLanguage, disableScroll, enableScroll, genAlignContent, genAlignItems, genBgAllColors, genBgAllColorsAndOverlays, genBgColor, genBgColor50, genBgColorGhostHover, genBgColorHover, genBgColorShort, genBgOverlay, genBorderAllColors, genBorderColor, genBorderColorHover, genBorderColorShort, genBorderRadius, genBoxShadow, genButtonColor, genButtonDisabled, genColGap, genGap, genJustifyContent, genJustifyItems, genLinkColor, genMaxWidth, genObjectFit, genRingColor, genRingColorChildren, genRowGap, genTextAlign, genTextAllColor, genTextColor, genTextColorHover, genTextColorShort, genVAlign, libMarkdownEditorOptions, libOptionsMarkdown, linkifyText, scrollToTop, toast, useClickOutside, useCopyToClipboard, useDebounce, useExportData, useFetch, useForm, useIsOverflow, useKeyPress, useLibTheme, useMaxWidth, useMergeRefs, useMinWidth, usePaginatedData, usePagination, useTextLineCount, useTouchScreen, useTranslation };
|