@dimasbaguspm/versaur 0.0.59 → 0.0.61
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/js/forms/index.js +1 -1
- package/dist/js/helpers/index.js +28 -10
- package/dist/js/{image-rectangle-CCvXv24a.js → image-rectangle-CLLXF8w_.js} +409 -347
- package/dist/js/index.js +88 -68
- package/dist/js/layouts/index.js +1 -1
- package/dist/js/navigation/index.js +1 -1
- package/dist/js/overlays/index.js +2 -2
- package/dist/js/primitive/index.js +27 -25
- package/dist/js/tablet-landscape-breakpoint-DUeRFxIA.js +113 -0
- package/dist/js/{tabs-BQs53hHL.js → tabs-DeyqSghV.js} +1 -1
- package/dist/js/{time-picker-input-Disd231b.js → time-picker-input-B_cV6nlk.js} +854 -642
- package/dist/js/{tooltip-Dpx3TpR6.js → tooltip-C1TbSbNF.js} +1 -1
- package/dist/js/{top-bar-B2nzldfs.js → top-bar-BGJufFzt.js} +10 -6
- package/dist/types/forms/textarea-input/index.d.ts +1 -1
- package/dist/types/forms/textarea-input/textarea-input.atoms.d.ts +53 -0
- package/dist/types/forms/textarea-input/textarea-input.d.ts +1 -0
- package/dist/types/forms/textarea-input/types.d.ts +28 -0
- package/dist/types/forms/textarea-input/use-textarea-formatting.d.ts +21 -0
- package/dist/types/helpers/match-media/built-in/components/index.d.ts +6 -0
- package/dist/types/helpers/match-media/built-in/components/mobile-and-tablet-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/mobile-landscape-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/mobile-portrait-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/tablet-and-desktop-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/tablet-landscape-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/components/tablet-portrait-breakpoint.d.ts +18 -0
- package/dist/types/helpers/match-media/built-in/hooks/index.d.ts +6 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-mobile-and-tablet-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-mobile-landscape-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-mobile-portrait-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-tablet-and-desktop-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-tablet-landscape-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/built-in/hooks/use-tablet-portrait-breakpoint.d.ts +11 -0
- package/dist/types/helpers/match-media/constants.d.ts +12 -0
- package/dist/types/primitive/formatted-text/formatted-text.d.ts +10 -0
- package/dist/types/primitive/formatted-text/index.d.ts +3 -0
- package/dist/types/primitive/formatted-text/types.d.ts +19 -0
- package/dist/types/primitive/index.d.ts +1 -0
- package/dist/utils/enforce-subpath-import.js +2 -0
- package/package.json +1 -1
- package/dist/js/desktop-breakpoint-CuSom-sN.js +0 -47
|
@@ -2,7 +2,7 @@ import { j as r } from "./jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import g, { useState as y, useEffect as v, createContext as V, useContext as T, forwardRef as p, useRef as S, useId as k, useMemo as _, cloneElement as $ } from "react";
|
|
3
3
|
import { c as h, a as u } from "./index-BDtz_hQY.js";
|
|
4
4
|
import { XIcon as R } from "lucide-react";
|
|
5
|
-
import {
|
|
5
|
+
import { p as D, l as H, H as G, v as U } from "./image-rectangle-CLLXF8w_.js";
|
|
6
6
|
import "./snackbar-CTq4MLir.js";
|
|
7
7
|
import X from "react-dom";
|
|
8
8
|
function q() {
|
|
@@ -2,7 +2,7 @@ import { j as s } from "./jsx-runtime-C5mzlN2N.js";
|
|
|
2
2
|
import * as j from "react";
|
|
3
3
|
import { forwardRef as l, createContext as S, useContext as C, useState as w } from "react";
|
|
4
4
|
import { c as n, a as d } from "./index-BDtz_hQY.js";
|
|
5
|
-
import {
|
|
5
|
+
import { p as x, I as N } from "./image-rectangle-CLLXF8w_.js";
|
|
6
6
|
import "./snackbar-CTq4MLir.js";
|
|
7
7
|
import { L as V } from "./skeleton-BRwIW26B.js";
|
|
8
8
|
import { ChevronDown as z, ChevronRight as B, ChevronLeft as H } from "lucide-react";
|
|
@@ -17,14 +17,16 @@ const T = n(
|
|
|
17
17
|
variants: {},
|
|
18
18
|
defaultVariants: {}
|
|
19
19
|
}
|
|
20
|
-
), P = n(
|
|
20
|
+
), P = n(
|
|
21
|
+
"[grid-area:top] z-30 sticky top-0 border-b border-border"
|
|
22
|
+
), A = n(
|
|
21
23
|
"[grid-area:left] z-20 border-r border-border bg-white"
|
|
22
24
|
), _ = n(
|
|
23
25
|
"[grid-area:right] z-20 border-l border-border bg-white"
|
|
24
26
|
), I = n(
|
|
25
27
|
"[grid-area:bottom] z-30 border-t border-border bg-white"
|
|
26
28
|
), k = n(
|
|
27
|
-
"[grid-area:main] overflow-y-auto min-h-0"
|
|
29
|
+
"[grid-area:main] overflow-y-auto min-h-0 [scrollbar-gutter:stable]"
|
|
28
30
|
), G = l(function({ children: t, className: e, ...a }, o) {
|
|
29
31
|
return /* @__PURE__ */ s.jsx(
|
|
30
32
|
"div",
|
|
@@ -84,7 +86,7 @@ const T = n(
|
|
|
84
86
|
BottomRegion: O,
|
|
85
87
|
MainRegion: E
|
|
86
88
|
}), D = n(
|
|
87
|
-
"sticky bottom-0 w-full flex justify-around items-center bg-white
|
|
89
|
+
"sticky bottom-0 w-full flex justify-around items-center bg-white z-40 safe-bottom gap-4 select-none px-8",
|
|
88
90
|
{
|
|
89
91
|
variants: {
|
|
90
92
|
variant: {
|
|
@@ -582,6 +584,8 @@ const T = n(
|
|
|
582
584
|
), ve = n(
|
|
583
585
|
[
|
|
584
586
|
"grid",
|
|
587
|
+
"h-full",
|
|
588
|
+
"min-h-0",
|
|
585
589
|
"grid-rows-[auto_1fr]",
|
|
586
590
|
'[grid-template-areas:"header"_"content"]'
|
|
587
591
|
].join(" "),
|
|
@@ -607,7 +611,7 @@ const T = n(
|
|
|
607
611
|
backgroundColor: "white"
|
|
608
612
|
}
|
|
609
613
|
}), be = n(
|
|
610
|
-
"[grid-area:content]
|
|
614
|
+
"[grid-area:content] min-h-0",
|
|
611
615
|
{
|
|
612
616
|
variants: {
|
|
613
617
|
backgroundColor: {
|
|
@@ -1002,7 +1006,7 @@ const T = n(
|
|
|
1002
1006
|
Item: Ae,
|
|
1003
1007
|
Group: _e
|
|
1004
1008
|
}), ke = n(
|
|
1005
|
-
"w-full flex items-center px-6 py-4
|
|
1009
|
+
"w-full flex items-center px-6 py-4 bg-white",
|
|
1006
1010
|
{
|
|
1007
1011
|
variants: {},
|
|
1008
1012
|
defaultVariants: {}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { TextAreaInput } from './textarea-input';
|
|
2
|
-
export type { TextAreaInputProps } from './types';
|
|
2
|
+
export type { TextAreaInputProps, FormatType, FormatState } from './types';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormatType } from './types';
|
|
3
|
+
import { IconProps } from '../../primitive/icon';
|
|
4
|
+
/**
|
|
5
|
+
* Props for the TextAreaInputToolbarButton component
|
|
6
|
+
*/
|
|
7
|
+
export interface TextAreaInputToolbarButtonProps {
|
|
8
|
+
/**
|
|
9
|
+
* The format type this button applies
|
|
10
|
+
*/
|
|
11
|
+
format: FormatType;
|
|
12
|
+
/**
|
|
13
|
+
* Whether this format is currently active
|
|
14
|
+
*/
|
|
15
|
+
isActive: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* Icon component to render
|
|
18
|
+
*/
|
|
19
|
+
icon: IconProps['as'];
|
|
20
|
+
/**
|
|
21
|
+
* Accessible label for the button
|
|
22
|
+
*/
|
|
23
|
+
label: string;
|
|
24
|
+
/**
|
|
25
|
+
* Whether the button is disabled
|
|
26
|
+
*/
|
|
27
|
+
disabled?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* Click handler
|
|
30
|
+
*/
|
|
31
|
+
onClick: (format: FormatType) => void;
|
|
32
|
+
}
|
|
33
|
+
/**
|
|
34
|
+
* Individual toolbar button for formatting actions
|
|
35
|
+
*/
|
|
36
|
+
export declare const TextAreaInputToolbarButton: React.ForwardRefExoticComponent<TextAreaInputToolbarButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
37
|
+
/**
|
|
38
|
+
* Props for the TextAreaInputToolbar component
|
|
39
|
+
*/
|
|
40
|
+
export interface TextAreaInputToolbarProps {
|
|
41
|
+
/**
|
|
42
|
+
* Child toolbar buttons
|
|
43
|
+
*/
|
|
44
|
+
children: React.ReactNode;
|
|
45
|
+
/**
|
|
46
|
+
* Additional CSS classes
|
|
47
|
+
*/
|
|
48
|
+
className?: string;
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Container for formatting toolbar buttons
|
|
52
|
+
*/
|
|
53
|
+
export declare const TextAreaInputToolbar: React.ForwardRefExoticComponent<TextAreaInputToolbarProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -5,6 +5,7 @@ import { TextAreaInputProps } from './types';
|
|
|
5
5
|
*
|
|
6
6
|
* Uses contentEditable div for robust multi-line text input with better control
|
|
7
7
|
* Provides error states, disabled, and readOnly support
|
|
8
|
+
* Supports rich text formatting with an optional toolbar
|
|
8
9
|
* Follows browser standards and accessibility best practices
|
|
9
10
|
*/
|
|
10
11
|
export declare const TextAreaInput: React.ForwardRefExoticComponent<TextAreaInputProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -1,4 +1,23 @@
|
|
|
1
1
|
import { HTMLAttributes, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Available formatting options for rich text editing
|
|
4
|
+
*/
|
|
5
|
+
export type FormatType = 'bold' | 'italic' | 'underline' | 'strikethrough' | 'h1' | 'h2' | 'h3' | 'orderedList' | 'unorderedList' | 'link';
|
|
6
|
+
/**
|
|
7
|
+
* State of active formats in the current selection
|
|
8
|
+
*/
|
|
9
|
+
export interface FormatState {
|
|
10
|
+
bold: boolean;
|
|
11
|
+
italic: boolean;
|
|
12
|
+
underline: boolean;
|
|
13
|
+
strikethrough: boolean;
|
|
14
|
+
h1: boolean;
|
|
15
|
+
h2: boolean;
|
|
16
|
+
h3: boolean;
|
|
17
|
+
orderedList: boolean;
|
|
18
|
+
unorderedList: boolean;
|
|
19
|
+
link: boolean;
|
|
20
|
+
}
|
|
2
21
|
/**
|
|
3
22
|
* Props for the TextAreaInput component
|
|
4
23
|
*/
|
|
@@ -52,4 +71,13 @@ export interface TextAreaInputProps extends Omit<HTMLAttributes<HTMLDivElement>,
|
|
|
52
71
|
* Whether the textarea is required
|
|
53
72
|
*/
|
|
54
73
|
required?: boolean;
|
|
74
|
+
/**
|
|
75
|
+
* Whether to show the formatting toolbar
|
|
76
|
+
* @default false
|
|
77
|
+
*/
|
|
78
|
+
showToolbar?: boolean;
|
|
79
|
+
/**
|
|
80
|
+
* Allowed formatting options (if not specified, all are allowed)
|
|
81
|
+
*/
|
|
82
|
+
allowedFormats?: FormatType[];
|
|
55
83
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { FormatType } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Custom hook for managing rich text formatting in TextAreaInput
|
|
4
|
+
*
|
|
5
|
+
* Handles toolbar state, format application, and selection tracking
|
|
6
|
+
*/
|
|
7
|
+
export declare const useTextAreaFormatting: (enabled: boolean, contentRef: React.RefObject<HTMLDivElement | null>) => {
|
|
8
|
+
formatState: {
|
|
9
|
+
bold: boolean;
|
|
10
|
+
italic: boolean;
|
|
11
|
+
underline: boolean;
|
|
12
|
+
strikethrough: boolean;
|
|
13
|
+
h1: boolean;
|
|
14
|
+
h2: boolean;
|
|
15
|
+
h3: boolean;
|
|
16
|
+
orderedList: boolean;
|
|
17
|
+
unorderedList: boolean;
|
|
18
|
+
link: boolean;
|
|
19
|
+
};
|
|
20
|
+
handleFormatClick: (format: FormatType) => void;
|
|
21
|
+
};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export * from './mobile-breakpoint';
|
|
2
2
|
export * from './tablet-breakpoint';
|
|
3
3
|
export * from './desktop-breakpoint';
|
|
4
|
+
export * from './mobile-and-tablet-breakpoint';
|
|
5
|
+
export * from './tablet-and-desktop-breakpoint';
|
|
6
|
+
export * from './mobile-portrait-breakpoint';
|
|
7
|
+
export * from './mobile-landscape-breakpoint';
|
|
8
|
+
export * from './tablet-portrait-breakpoint';
|
|
9
|
+
export * from './tablet-landscape-breakpoint';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on mobile and tablet viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <MobileAndTabletBreakpoint>
|
|
13
|
+
* <MobileAndTabletContent />
|
|
14
|
+
* </MobileAndTabletBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function MobileAndTabletBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on mobile landscape viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <MobileLandscapeBreakpoint>
|
|
13
|
+
* <MobileLandscapeContent />
|
|
14
|
+
* </MobileLandscapeBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function MobileLandscapeBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on mobile portrait viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <MobilePortraitBreakpoint>
|
|
13
|
+
* <MobilePortraitContent />
|
|
14
|
+
* </MobilePortraitBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function MobilePortraitBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on tablet and desktop viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <TabletAndDesktopBreakpoint>
|
|
13
|
+
* <TabletAndDesktopContent />
|
|
14
|
+
* </TabletAndDesktopBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function TabletAndDesktopBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on tablet landscape viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <TabletLandscapeBreakpoint>
|
|
13
|
+
* <TabletLandscapeContent />
|
|
14
|
+
* </TabletLandscapeBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function TabletLandscapeBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Props for breakpoint components
|
|
3
|
+
*/
|
|
4
|
+
interface BreakpointComponentProps {
|
|
5
|
+
children: React.ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Component that only renders children on tablet portrait viewports
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```tsx
|
|
12
|
+
* <TabletPortraitBreakpoint>
|
|
13
|
+
* <TabletPortraitContent />
|
|
14
|
+
* </TabletPortraitBreakpoint>
|
|
15
|
+
* ```
|
|
16
|
+
*/
|
|
17
|
+
export declare function TabletPortraitBreakpoint({ children, }: BreakpointComponentProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export {};
|
|
@@ -1,3 +1,9 @@
|
|
|
1
1
|
export * from './use-mobile-breakpoint';
|
|
2
2
|
export * from './use-tablet-breakpoint';
|
|
3
3
|
export * from './use-desktop-breakpoint';
|
|
4
|
+
export * from './use-mobile-and-tablet-breakpoint';
|
|
5
|
+
export * from './use-tablet-and-desktop-breakpoint';
|
|
6
|
+
export * from './use-mobile-portrait-breakpoint';
|
|
7
|
+
export * from './use-mobile-landscape-breakpoint';
|
|
8
|
+
export * from './use-tablet-portrait-breakpoint';
|
|
9
|
+
export * from './use-tablet-landscape-breakpoint';
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is mobile or tablet
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is mobile or tablet (max-width: 1023px)
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isMobileOrTablet = useMobileAndTabletBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMobileAndTabletBreakpoint(): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is mobile in landscape orientation
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is mobile landscape
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isMobileLandscape = useMobileLandscapeBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMobileLandscapeBreakpoint(): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is mobile in portrait orientation
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is mobile portrait
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isMobilePortrait = useMobilePortraitBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useMobilePortraitBreakpoint(): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is tablet or desktop
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is tablet or desktop (min-width: 768px)
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isTabletOrDesktop = useTabletAndDesktopBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTabletAndDesktopBreakpoint(): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is tablet in landscape orientation
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is tablet landscape
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isTabletLandscape = useTabletLandscapeBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTabletLandscapeBreakpoint(): boolean;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Hook to detect if the current viewport is tablet in portrait orientation
|
|
3
|
+
*
|
|
4
|
+
* @returns boolean indicating if viewport is tablet portrait
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
* ```tsx
|
|
8
|
+
* const isTabletPortrait = useTabletPortraitBreakpoint()
|
|
9
|
+
* ```
|
|
10
|
+
*/
|
|
11
|
+
export declare function useTabletPortraitBreakpoint(): boolean;
|
|
@@ -5,3 +5,15 @@
|
|
|
5
5
|
export declare const BREAKPOINT_MOBILE = "(max-width: 767px)";
|
|
6
6
|
export declare const BREAKPOINT_TABLET = "(min-width: 768px) and (max-width: 1023px)";
|
|
7
7
|
export declare const BREAKPOINT_DESKTOP = "(min-width: 1024px)";
|
|
8
|
+
/**
|
|
9
|
+
* Combined breakpoint definitions
|
|
10
|
+
*/
|
|
11
|
+
export declare const BREAKPOINT_MOBILE_AND_TABLET = "(max-width: 1023px)";
|
|
12
|
+
export declare const BREAKPOINT_TABLET_AND_DESKTOP = "(min-width: 768px)";
|
|
13
|
+
/**
|
|
14
|
+
* Orientation-specific breakpoint definitions
|
|
15
|
+
*/
|
|
16
|
+
export declare const BREAKPOINT_MOBILE_PORTRAIT = "(max-width: 767px) and (orientation: portrait)";
|
|
17
|
+
export declare const BREAKPOINT_MOBILE_LANDSCAPE = "(max-width: 767px) and (orientation: landscape)";
|
|
18
|
+
export declare const BREAKPOINT_TABLET_PORTRAIT = "(min-width: 768px) and (max-width: 1023px) and (orientation: portrait)";
|
|
19
|
+
export declare const BREAKPOINT_TABLET_LANDSCAPE = "(min-width: 768px) and (max-width: 1023px) and (orientation: landscape)";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
import { FormattedTextProps } from './types';
|
|
3
|
+
/**
|
|
4
|
+
* FormattedText component for Versaur UI
|
|
5
|
+
*
|
|
6
|
+
* Displays rich HTML content with consistent formatting styles
|
|
7
|
+
* Matches the styling used in TextAreaInput with toolbar formatting
|
|
8
|
+
* Should be used with sanitized HTML content to prevent XSS attacks
|
|
9
|
+
*/
|
|
10
|
+
export declare const FormattedText: React.ForwardRefExoticComponent<FormattedTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { HTMLAttributes } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Props for the FormattedText component
|
|
4
|
+
*/
|
|
5
|
+
export interface FormattedTextProps extends HTMLAttributes<HTMLDivElement> {
|
|
6
|
+
/**
|
|
7
|
+
* The HTML content to display (should be sanitized if from user input)
|
|
8
|
+
*/
|
|
9
|
+
content: string;
|
|
10
|
+
/**
|
|
11
|
+
* Whether to allow the content to be scrollable
|
|
12
|
+
* @default false
|
|
13
|
+
*/
|
|
14
|
+
scrollable?: boolean;
|
|
15
|
+
/**
|
|
16
|
+
* Maximum height for scrollable content (in rem units)
|
|
17
|
+
*/
|
|
18
|
+
maxHeight?: number;
|
|
19
|
+
}
|
|
@@ -59,6 +59,8 @@ const symbolToSubpath = {
|
|
|
59
59
|
"ButtonMenuIcon": "primitive",
|
|
60
60
|
"Card": "primitive",
|
|
61
61
|
"FilterChip": "primitive",
|
|
62
|
+
"FormattedText": "primitive",
|
|
63
|
+
"formattedContentStyles": "primitive",
|
|
62
64
|
"Heading": "primitive",
|
|
63
65
|
"Hr": "primitive",
|
|
64
66
|
"Icon": "primitive",
|
package/package.json
CHANGED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
import { j as t } from "./jsx-runtime-C5mzlN2N.js";
|
|
2
|
-
import { useState as m, useEffect as h } from "react";
|
|
3
|
-
const u = "(max-width: 767px)", c = "(min-width: 768px) and (max-width: 1023px)", d = "(min-width: 1024px)";
|
|
4
|
-
function n(e) {
|
|
5
|
-
const [a, s] = m(() => typeof window > "u" ? !1 : window.matchMedia(e).matches);
|
|
6
|
-
return h(() => {
|
|
7
|
-
if (typeof window > "u") return;
|
|
8
|
-
const r = window.matchMedia(e), o = (f) => s(f.matches);
|
|
9
|
-
return s(r.matches), r.addEventListener("change", o), () => {
|
|
10
|
-
r.removeEventListener("change", o);
|
|
11
|
-
};
|
|
12
|
-
}, [e]), a;
|
|
13
|
-
}
|
|
14
|
-
function i({ query: e, children: a }) {
|
|
15
|
-
return n(e) ? /* @__PURE__ */ t.jsx(t.Fragment, { children: a }) : null;
|
|
16
|
-
}
|
|
17
|
-
function w() {
|
|
18
|
-
return n(u);
|
|
19
|
-
}
|
|
20
|
-
function B() {
|
|
21
|
-
return n(c);
|
|
22
|
-
}
|
|
23
|
-
function M() {
|
|
24
|
-
return n(d);
|
|
25
|
-
}
|
|
26
|
-
function E({ children: e }) {
|
|
27
|
-
return /* @__PURE__ */ t.jsx(i, { query: u, children: e });
|
|
28
|
-
}
|
|
29
|
-
function T({ children: e }) {
|
|
30
|
-
return /* @__PURE__ */ t.jsx(i, { query: c, children: e });
|
|
31
|
-
}
|
|
32
|
-
function k({ children: e }) {
|
|
33
|
-
return /* @__PURE__ */ t.jsx(i, { query: d, children: e });
|
|
34
|
-
}
|
|
35
|
-
export {
|
|
36
|
-
u as B,
|
|
37
|
-
k as D,
|
|
38
|
-
i as M,
|
|
39
|
-
T,
|
|
40
|
-
c as a,
|
|
41
|
-
d as b,
|
|
42
|
-
w as c,
|
|
43
|
-
B as d,
|
|
44
|
-
M as e,
|
|
45
|
-
E as f,
|
|
46
|
-
n as u
|
|
47
|
-
};
|