@regardio/react 0.7.6 → 0.7.10
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/background-slideshow/index.d.mts +2 -2
- package/dist/blurry-gradient/index.d.mts +3 -3
- package/dist/button/index.d.mts +2 -2
- package/dist/{index-D5qbAnHh.d.mts → button-B7uJY8dG.d.mts} +2 -2
- package/dist/carousel/index.d.mts +4 -4
- package/dist/carousel/index.mjs +1 -1
- package/dist/{chunk-Bo1DHCg-.mjs → chunk-DQk6qfdC.mjs} +3 -3
- package/dist/field/index.d.mts +1 -1
- package/dist/grid/index.mjs +1 -1
- package/dist/hooks/use-user.d.mts +8 -8
- package/dist/icon-button/index.d.mts +4 -3
- package/dist/input/index.d.mts +2 -2
- package/dist/{index-cdadznqR.d.mts → input-DlgggywA.d.mts} +1 -1
- package/dist/link/index.d.mts +2 -2
- package/dist/list/index.d.mts +4 -4
- package/dist/list/index.mjs +1 -1
- package/dist/markdown-container/index.mjs +6 -2
- package/dist/password-input/index.d.mts +3 -2
- package/dist/protected-email/index.d.mts +2 -2
- package/dist/toggle/index.d.mts +2 -2
- package/package.json +22 -22
- package/src/background-slideshow/background-slideshow.tsx +2 -2
- package/src/blurry-gradient/blurry-gradient.tsx +3 -3
- package/src/button/button.tsx +2 -2
- package/src/carousel/carousel-root.tsx +4 -4
- package/src/field/field.tsx +1 -1
- package/src/hooks/use-user.tsx +8 -8
- package/src/icon-button/icon-button.tsx +2 -2
- package/src/input/input.tsx +1 -1
- package/src/link/link.tsx +6 -6
- package/src/list/list-root-context.ts +4 -4
- package/src/markdown-container/markdown-container.tsx +13 -9
- package/src/password-input/password-input.tsx +1 -1
- package/src/protected-email/protected-email.tsx +2 -2
- package/src/toggle/toggle.tsx +2 -2
|
@@ -9,11 +9,11 @@ type ImageData = {
|
|
|
9
9
|
interface BackgroundSlideshowProps {
|
|
10
10
|
baseUrl: string;
|
|
11
11
|
className?: string;
|
|
12
|
+
filter?: (image: ImageData) => boolean;
|
|
13
|
+
images: ImageData[];
|
|
12
14
|
imgClassName?: string;
|
|
13
15
|
locale: string;
|
|
14
16
|
pictureClassName?: string;
|
|
15
|
-
images: ImageData[];
|
|
16
|
-
filter?: (image: ImageData) => boolean;
|
|
17
17
|
slideshow?: boolean;
|
|
18
18
|
slideshowInterval?: number;
|
|
19
19
|
transitionDuration?: number;
|
|
@@ -2,14 +2,14 @@ import { SVGProps } from "react";
|
|
|
2
2
|
|
|
3
3
|
//#region src/blurry-gradient/blurry-gradient.d.ts
|
|
4
4
|
interface BlurryGradientProps extends SVGProps<SVGSVGElement> {
|
|
5
|
-
primaryColor: string;
|
|
6
|
-
secondaryColor: string;
|
|
7
|
-
neutralColor: string;
|
|
8
5
|
/**
|
|
9
6
|
* Accessible description for the gradient (for screen readers)
|
|
10
7
|
* @default 'Decorative blurry gradient'
|
|
11
8
|
*/
|
|
12
9
|
description?: string;
|
|
10
|
+
neutralColor: string;
|
|
11
|
+
primaryColor: string;
|
|
12
|
+
secondaryColor: string;
|
|
13
13
|
}
|
|
14
14
|
declare const BlurryGradient: (props: BlurryGradientProps) => React.JSX.Element;
|
|
15
15
|
//#endregion
|
package/dist/button/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as ButtonVariant, n as ButtonProps, r as ButtonSize, t as Button } from "../
|
|
2
|
-
export { Button, ButtonProps, ButtonSize, ButtonVariant };
|
|
1
|
+
import { i as ButtonVariant, n as ButtonProps, r as ButtonSize, t as Button } from "../button-B7uJY8dG.mjs";
|
|
2
|
+
export { Button, type ButtonProps, type ButtonSize, type ButtonVariant };
|
|
@@ -19,10 +19,10 @@ declare const buttonSizes: {
|
|
|
19
19
|
type ButtonVariant = keyof typeof buttonVariants;
|
|
20
20
|
type ButtonSize = keyof typeof buttonSizes;
|
|
21
21
|
interface ButtonProps extends Omit<ComponentProps<typeof Button>, "className"> {
|
|
22
|
-
variant?: ButtonVariant;
|
|
23
|
-
size?: ButtonSize;
|
|
24
22
|
className?: string;
|
|
23
|
+
size?: ButtonSize;
|
|
25
24
|
type?: "button" | "submit" | "reset";
|
|
25
|
+
variant?: ButtonVariant;
|
|
26
26
|
}
|
|
27
27
|
declare const Button$1: ({
|
|
28
28
|
children,
|
|
@@ -16,17 +16,17 @@ declare const CarouselItem: ({
|
|
|
16
16
|
type CarouselApi = EmblaCarouselType;
|
|
17
17
|
interface CarouselContextValue {
|
|
18
18
|
api: CarouselApi | undefined;
|
|
19
|
-
scrollPrev: () => void;
|
|
20
|
-
scrollNext: () => void;
|
|
21
|
-
canScrollPrev: boolean;
|
|
22
19
|
canScrollNext: boolean;
|
|
20
|
+
canScrollPrev: boolean;
|
|
21
|
+
scrollNext: () => void;
|
|
22
|
+
scrollPrev: () => void;
|
|
23
23
|
}
|
|
24
24
|
declare function useCarousel(): CarouselContextValue;
|
|
25
25
|
interface CarouselRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
26
26
|
opts?: EmblaOptionsType;
|
|
27
|
-
setApi?: (api: CarouselApi) => void;
|
|
28
27
|
orientation?: "horizontal" | "vertical";
|
|
29
28
|
ref?: React.Ref<HTMLDivElement>;
|
|
29
|
+
setApi?: (api: CarouselApi) => void;
|
|
30
30
|
}
|
|
31
31
|
declare const CarouselRoot: ({
|
|
32
32
|
children,
|
package/dist/carousel/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as __exportAll } from "../chunk-
|
|
1
|
+
import { t as __exportAll } from "../chunk-DQk6qfdC.mjs";
|
|
2
2
|
import { t as Button } from "../button-C2xZwsR7.mjs";
|
|
3
3
|
import { createContext, useCallback, useContext, useEffect, useState } from "react";
|
|
4
4
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//#region
|
|
1
|
+
//#region \0rolldown/runtime.js
|
|
2
2
|
var __defProp = Object.defineProperty;
|
|
3
|
-
var __exportAll = (all,
|
|
3
|
+
var __exportAll = (all, no_symbols) => {
|
|
4
4
|
let target = {};
|
|
5
5
|
for (var name in all) {
|
|
6
6
|
__defProp(target, name, {
|
|
@@ -8,7 +8,7 @@ var __exportAll = (all, symbols) => {
|
|
|
8
8
|
enumerable: true
|
|
9
9
|
});
|
|
10
10
|
}
|
|
11
|
-
if (
|
|
11
|
+
if (!no_symbols) {
|
|
12
12
|
__defProp(target, Symbol.toStringTag, { value: "Module" });
|
|
13
13
|
}
|
|
14
14
|
return target;
|
package/dist/field/index.d.mts
CHANGED
|
@@ -26,9 +26,9 @@ interface FieldErrorProps extends Omit<ComponentProps<typeof Field$1.Error>, "cl
|
|
|
26
26
|
className?: string;
|
|
27
27
|
}
|
|
28
28
|
interface FieldItemProps extends ComponentProps<"div"> {
|
|
29
|
+
children: ReactNode;
|
|
29
30
|
className?: string;
|
|
30
31
|
layout?: FieldItemLayout;
|
|
31
|
-
children: ReactNode;
|
|
32
32
|
}
|
|
33
33
|
declare const FieldRoot: ({
|
|
34
34
|
className,
|
package/dist/grid/index.mjs
CHANGED
|
@@ -6,14 +6,14 @@ import { User } from "@supabase/supabase-js";
|
|
|
6
6
|
* Context for storing and accessing the current authenticated user
|
|
7
7
|
*/
|
|
8
8
|
interface UserContextType {
|
|
9
|
-
/**
|
|
10
|
-
* The current authenticated user, or null if not authenticated
|
|
11
|
-
*/
|
|
12
|
-
user: User | null;
|
|
13
9
|
/**
|
|
14
10
|
* Whether the user data is currently loading
|
|
15
11
|
*/
|
|
16
12
|
isLoading: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* The current authenticated user, or null if not authenticated
|
|
15
|
+
*/
|
|
16
|
+
user: User | null;
|
|
17
17
|
}
|
|
18
18
|
/**
|
|
19
19
|
* Context for storing and accessing the current authenticated user
|
|
@@ -24,17 +24,17 @@ declare const UserContext: React.Context<UserContextType>;
|
|
|
24
24
|
*/
|
|
25
25
|
interface UserContextProviderProps {
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* Child components that will have access to the user context
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
children: ReactNode;
|
|
30
30
|
/**
|
|
31
31
|
* Whether the user data is currently loading
|
|
32
32
|
*/
|
|
33
33
|
isLoading?: boolean;
|
|
34
34
|
/**
|
|
35
|
-
*
|
|
35
|
+
* The current authenticated user, or null if not authenticated
|
|
36
36
|
*/
|
|
37
|
-
|
|
37
|
+
user: User | null;
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Provider component for the UserContext
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as Button } from "../
|
|
1
|
+
import { t as Button } from "../button-B7uJY8dG.mjs";
|
|
2
|
+
import "../button/index.mjs";
|
|
2
3
|
import { ComponentProps, ReactNode } from "react";
|
|
3
4
|
|
|
4
5
|
//#region src/icon-button/icon-button.d.ts
|
|
@@ -10,11 +11,11 @@ declare const iconButtonVariants: {
|
|
|
10
11
|
};
|
|
11
12
|
type IconButtonSize = keyof typeof iconButtonVariants;
|
|
12
13
|
interface IconButtonProps extends Omit<ComponentProps<typeof Button>, "size"> {
|
|
14
|
+
"aria-label"?: string;
|
|
15
|
+
children?: never;
|
|
13
16
|
icon: ReactNode;
|
|
14
17
|
size?: IconButtonSize;
|
|
15
18
|
title?: string;
|
|
16
|
-
"aria-label"?: string;
|
|
17
|
-
children?: never;
|
|
18
19
|
}
|
|
19
20
|
declare const IconButton: ({
|
|
20
21
|
icon,
|
package/dist/input/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { i as InputVariant, n as InputProps, r as InputSize, t as Input } from "../
|
|
2
|
-
export { Input, InputProps, InputSize, InputVariant };
|
|
1
|
+
import { i as InputVariant, n as InputProps, r as InputSize, t as Input } from "../input-DlgggywA.mjs";
|
|
2
|
+
export { Input, type InputProps, type InputSize, type InputVariant };
|
|
@@ -16,8 +16,8 @@ type InputVariant = keyof typeof inputVariants;
|
|
|
16
16
|
type InputSize = keyof typeof inputSizes;
|
|
17
17
|
interface InputProps extends Omit<ComponentProps<typeof Input>, "className" | "size"> {
|
|
18
18
|
className?: string;
|
|
19
|
-
variant?: InputVariant;
|
|
20
19
|
size?: InputSize;
|
|
20
|
+
variant?: InputVariant;
|
|
21
21
|
}
|
|
22
22
|
declare const Input$1: ({
|
|
23
23
|
className,
|
package/dist/link/index.d.mts
CHANGED
|
@@ -9,12 +9,12 @@ type PathResolver = (routeKey: string) => string;
|
|
|
9
9
|
declare const PathResolverProvider: React.Provider<PathResolver | null>;
|
|
10
10
|
declare function usePathResolver(): PathResolver | null;
|
|
11
11
|
interface LinkBaseProps extends Omit<NavLinkProps, "to"> {
|
|
12
|
+
routeKey?: string;
|
|
12
13
|
to?: string | Partial<{
|
|
13
14
|
pathname?: string;
|
|
14
15
|
search?: string;
|
|
15
16
|
hash?: string;
|
|
16
17
|
}> | undefined;
|
|
17
|
-
routeKey?: string;
|
|
18
18
|
viewTransition?: boolean;
|
|
19
19
|
}
|
|
20
20
|
declare const LinkBase: ({
|
|
@@ -44,12 +44,12 @@ type LinkArrow = keyof typeof arrowVariants;
|
|
|
44
44
|
type LinkVariant = keyof typeof linkVariants;
|
|
45
45
|
interface LinkProps extends Omit<NavLinkProps, "to"> {
|
|
46
46
|
arrow?: LinkArrow;
|
|
47
|
+
routeKey?: string;
|
|
47
48
|
to?: string | Partial<{
|
|
48
49
|
pathname?: string;
|
|
49
50
|
search?: string;
|
|
50
51
|
hash?: string;
|
|
51
52
|
}>;
|
|
52
|
-
routeKey?: string;
|
|
53
53
|
variant?: LinkVariant;
|
|
54
54
|
viewTransition?: boolean;
|
|
55
55
|
}
|
package/dist/list/index.d.mts
CHANGED
|
@@ -24,15 +24,15 @@ declare namespace ListItem {
|
|
|
24
24
|
//#endregion
|
|
25
25
|
//#region src/list/list-root-context.d.ts
|
|
26
26
|
interface ListRootContextValue {
|
|
27
|
+
/**
|
|
28
|
+
* Default className to apply to all list items.
|
|
29
|
+
*/
|
|
30
|
+
defaultItemClassName?: string;
|
|
27
31
|
/**
|
|
28
32
|
* Default element type for list items.
|
|
29
33
|
* @default 'li'
|
|
30
34
|
*/
|
|
31
35
|
defaultItemElement: "li" | "dd" | "dt" | "div" | "span";
|
|
32
|
-
/**
|
|
33
|
-
* Default className to apply to all list items.
|
|
34
|
-
*/
|
|
35
|
-
defaultItemClassName?: string;
|
|
36
36
|
}
|
|
37
37
|
//#endregion
|
|
38
38
|
//#region src/list/list-root.d.ts
|
package/dist/list/index.mjs
CHANGED
|
@@ -59,8 +59,12 @@ const MarkdownContainer = (props) => {
|
|
|
59
59
|
options: {
|
|
60
60
|
disableParsingRawHTML: false,
|
|
61
61
|
forceWrapper: true,
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
overrides: {
|
|
63
|
+
br: { component: () => /* @__PURE__ */ jsx("br", {}) },
|
|
64
|
+
hr: { component: () => /* @__PURE__ */ jsx("hr", {}) },
|
|
65
|
+
...props.markdownOverrides
|
|
66
|
+
},
|
|
67
|
+
tagfilter: false
|
|
64
68
|
},
|
|
65
69
|
children: processedText
|
|
66
70
|
})
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { t as Input } from "../
|
|
1
|
+
import { t as Input } from "../input-DlgggywA.mjs";
|
|
2
|
+
import "../input/index.mjs";
|
|
2
3
|
|
|
3
4
|
//#region src/password-input/password-input.d.ts
|
|
4
5
|
declare const passwordInputVariants: {
|
|
@@ -8,9 +9,9 @@ declare const passwordInputVariants: {
|
|
|
8
9
|
type PasswordInputVariant = keyof typeof passwordInputVariants;
|
|
9
10
|
interface PasswordInputProps extends Omit<React.ComponentProps<typeof Input>, "type" | "variant"> {
|
|
10
11
|
className?: string;
|
|
11
|
-
variant?: PasswordInputVariant;
|
|
12
12
|
inputVariant?: "default" | "error" | "success";
|
|
13
13
|
showToggle?: boolean;
|
|
14
|
+
variant?: PasswordInputVariant;
|
|
14
15
|
}
|
|
15
16
|
declare const PasswordInput: ({
|
|
16
17
|
className,
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
//#region src/protected-email/protected-email.d.ts
|
|
2
2
|
interface ProtectedEmailProps {
|
|
3
|
-
|
|
3
|
+
className?: string;
|
|
4
4
|
domain: string;
|
|
5
5
|
text?: string;
|
|
6
|
-
|
|
6
|
+
username: string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
9
|
* ProtectedEmail component that obfuscates email addresses to protect from scrapers.
|
package/dist/toggle/index.d.mts
CHANGED
|
@@ -7,11 +7,11 @@ declare const toggle: ReturnType<typeof tv>;
|
|
|
7
7
|
type ToggleVariant = keyof typeof toggle.variants.variant;
|
|
8
8
|
type ToggleSize = keyof typeof toggle.variants.size;
|
|
9
9
|
interface ToggleProps extends Omit<ComponentProps<typeof Toggle$1>, "className"> {
|
|
10
|
+
children?: ReactNode;
|
|
10
11
|
className?: string;
|
|
11
|
-
variant?: ToggleVariant;
|
|
12
12
|
size?: ToggleSize;
|
|
13
|
-
children?: ReactNode;
|
|
14
13
|
title?: string;
|
|
14
|
+
variant?: ToggleVariant;
|
|
15
15
|
}
|
|
16
16
|
declare const Toggle: ({
|
|
17
17
|
className,
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://www.schemastore.org/package.json",
|
|
3
3
|
"name": "@regardio/react",
|
|
4
|
-
"version": "0.7.
|
|
4
|
+
"version": "0.7.10",
|
|
5
5
|
"private": false,
|
|
6
6
|
"description": "Regardio React UI components",
|
|
7
7
|
"keywords": [
|
|
@@ -215,53 +215,53 @@
|
|
|
215
215
|
"version": "flow-changeset version"
|
|
216
216
|
},
|
|
217
217
|
"dependencies": {
|
|
218
|
-
"@base-ui/react": "1.
|
|
219
|
-
"@maptiler/sdk": "3.
|
|
218
|
+
"@base-ui/react": "1.2.0",
|
|
219
|
+
"@maptiler/sdk": "3.11.1",
|
|
220
220
|
"@mdx-js/react": "3.1.1",
|
|
221
|
-
"@regardio/js": "0.7.
|
|
222
|
-
"@regardio/tailwind": "0.3.
|
|
223
|
-
"@supabase/supabase-js": "2.
|
|
221
|
+
"@regardio/js": "0.7.3",
|
|
222
|
+
"@regardio/tailwind": "0.3.3",
|
|
223
|
+
"@supabase/supabase-js": "2.96.0",
|
|
224
224
|
"cmdk": "1.1.1",
|
|
225
225
|
"embla-carousel": "8.6.0",
|
|
226
226
|
"embla-carousel-react": "8.6.0",
|
|
227
227
|
"input-otp": "1.4.2",
|
|
228
228
|
"intl-parse-accept-language": "1.0.0",
|
|
229
229
|
"leaflet": "alpha",
|
|
230
|
-
"lucide-react": "0.
|
|
231
|
-
"markdown-to-jsx": "9.
|
|
230
|
+
"lucide-react": "0.574.0",
|
|
231
|
+
"markdown-to-jsx": "9.7.4",
|
|
232
232
|
"react": "19.2.4",
|
|
233
|
-
"react-day-picker": "9.13.
|
|
233
|
+
"react-day-picker": "9.13.2",
|
|
234
234
|
"react-dom": "19.2.4",
|
|
235
235
|
"react-hook-form": "7.71.1",
|
|
236
|
-
"react-resizable-panels": "4.
|
|
236
|
+
"react-resizable-panels": "4.6.4",
|
|
237
237
|
"react-router": "7.13.0",
|
|
238
238
|
"tailwind-variants": "3.2.2",
|
|
239
239
|
"vaul": "1.1.2",
|
|
240
240
|
"zod": "4.3.6"
|
|
241
241
|
},
|
|
242
242
|
"devDependencies": {
|
|
243
|
-
"@regardio/dev": "1.13.
|
|
244
|
-
"@storybook/addon-a11y": "10.2.
|
|
245
|
-
"@storybook/addon-docs": "10.2.
|
|
246
|
-
"@storybook/addon-vitest": "10.2.
|
|
247
|
-
"@storybook/react-vite": "10.2.
|
|
243
|
+
"@regardio/dev": "1.13.5",
|
|
244
|
+
"@storybook/addon-a11y": "10.2.10",
|
|
245
|
+
"@storybook/addon-docs": "10.2.10",
|
|
246
|
+
"@storybook/addon-vitest": "10.2.10",
|
|
247
|
+
"@storybook/react-vite": "10.2.10",
|
|
248
248
|
"@tailwindcss/vite": "4.1.18",
|
|
249
249
|
"@testing-library/jest-dom": "6.9.1",
|
|
250
250
|
"@testing-library/react": "16.3.2",
|
|
251
251
|
"@total-typescript/ts-reset": "0.6.1",
|
|
252
252
|
"@types/leaflet": "1.9.21",
|
|
253
|
-
"@types/node": "25.
|
|
254
|
-
"@types/react": "19.2.
|
|
253
|
+
"@types/node": "25.2.3",
|
|
254
|
+
"@types/react": "19.2.14",
|
|
255
255
|
"@types/react-dom": "19.2.3",
|
|
256
|
-
"@vitejs/plugin-react": "5.1.
|
|
256
|
+
"@vitejs/plugin-react": "5.1.4",
|
|
257
257
|
"@vitest/browser-playwright": "4.0.18",
|
|
258
258
|
"@vitest/coverage-v8": "4.0.18",
|
|
259
259
|
"@vitest/ui": "4.0.18",
|
|
260
|
-
"jsdom": "
|
|
261
|
-
"playwright": "1.58.
|
|
262
|
-
"storybook": "10.2.
|
|
260
|
+
"jsdom": "28.1.0",
|
|
261
|
+
"playwright": "1.58.2",
|
|
262
|
+
"storybook": "10.2.10",
|
|
263
263
|
"tailwindcss": "4.1.18",
|
|
264
|
-
"tsdown": "0.20.
|
|
264
|
+
"tsdown": "0.20.3",
|
|
265
265
|
"typescript": "5.9.3",
|
|
266
266
|
"vite": "7.3.1",
|
|
267
267
|
"vitest": "4.0.18"
|
|
@@ -14,11 +14,11 @@ export type ImageData = {
|
|
|
14
14
|
export interface BackgroundSlideshowProps {
|
|
15
15
|
baseUrl: string; // URL template with {id} and {format} placeholders
|
|
16
16
|
className?: string; // CSS class for the container
|
|
17
|
+
filter?: (image: ImageData) => boolean; // Optional filter function
|
|
18
|
+
images: ImageData[]; // Array of images
|
|
17
19
|
imgClassName?: string; // CSS class for the image
|
|
18
20
|
locale: string; // Locale for the alt text
|
|
19
21
|
pictureClassName?: string; // CSS class for the picture component
|
|
20
|
-
images: ImageData[]; // Array of images
|
|
21
|
-
filter?: (image: ImageData) => boolean; // Optional filter function
|
|
22
22
|
slideshow?: boolean; // Whether to enable the slideshow
|
|
23
23
|
slideshowInterval?: number; // Time in ms between transitions
|
|
24
24
|
transitionDuration?: number; // Time in ms for the fade transition
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { SVGProps } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface BlurryGradientProps extends SVGProps<SVGSVGElement> {
|
|
4
|
-
primaryColor: string;
|
|
5
|
-
secondaryColor: string;
|
|
6
|
-
neutralColor: string;
|
|
7
4
|
/**
|
|
8
5
|
* Accessible description for the gradient (for screen readers)
|
|
9
6
|
* @default 'Decorative blurry gradient'
|
|
10
7
|
*/
|
|
11
8
|
description?: string;
|
|
9
|
+
neutralColor: string;
|
|
10
|
+
primaryColor: string;
|
|
11
|
+
secondaryColor: string;
|
|
12
12
|
}
|
|
13
13
|
|
|
14
14
|
export const BlurryGradient = (props: BlurryGradientProps): React.JSX.Element => {
|
package/src/button/button.tsx
CHANGED
|
@@ -90,10 +90,10 @@ export type ButtonVariant = keyof typeof buttonVariants;
|
|
|
90
90
|
export type ButtonSize = keyof typeof buttonSizes;
|
|
91
91
|
|
|
92
92
|
export interface ButtonProps extends Omit<ComponentProps<typeof BaseUIButton>, 'className'> {
|
|
93
|
-
variant?: ButtonVariant;
|
|
94
|
-
size?: ButtonSize;
|
|
95
93
|
className?: string;
|
|
94
|
+
size?: ButtonSize;
|
|
96
95
|
type?: 'button' | 'submit' | 'reset';
|
|
96
|
+
variant?: ButtonVariant;
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
export const Button = ({
|
|
@@ -16,10 +16,10 @@ export type CarouselApi = EmblaCarouselType;
|
|
|
16
16
|
|
|
17
17
|
interface CarouselContextValue {
|
|
18
18
|
api: CarouselApi | undefined;
|
|
19
|
-
scrollPrev: () => void;
|
|
20
|
-
scrollNext: () => void;
|
|
21
|
-
canScrollPrev: boolean;
|
|
22
19
|
canScrollNext: boolean;
|
|
20
|
+
canScrollPrev: boolean;
|
|
21
|
+
scrollNext: () => void;
|
|
22
|
+
scrollPrev: () => void;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
const CarouselContext = createContext<CarouselContextValue | null>(null);
|
|
@@ -34,9 +34,9 @@ export function useCarousel(): CarouselContextValue {
|
|
|
34
34
|
|
|
35
35
|
export interface CarouselRootProps extends HTMLAttributes<HTMLDivElement> {
|
|
36
36
|
opts?: EmblaOptionsType;
|
|
37
|
-
setApi?: (api: CarouselApi) => void;
|
|
38
37
|
orientation?: 'horizontal' | 'vertical';
|
|
39
38
|
ref?: React.Ref<HTMLDivElement>;
|
|
39
|
+
setApi?: (api: CarouselApi) => void;
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
export const CarouselRoot = function CarouselRoot({
|
package/src/field/field.tsx
CHANGED
|
@@ -88,9 +88,9 @@ export interface FieldErrorProps
|
|
|
88
88
|
}
|
|
89
89
|
|
|
90
90
|
export interface FieldItemProps extends ComponentProps<'div'> {
|
|
91
|
+
children: ReactNode;
|
|
91
92
|
className?: string;
|
|
92
93
|
layout?: FieldItemLayout;
|
|
93
|
-
children: ReactNode;
|
|
94
94
|
}
|
|
95
95
|
|
|
96
96
|
export const FieldRoot = ({ className, variant, ...props }: FieldRootProps): React.JSX.Element => {
|
package/src/hooks/use-user.tsx
CHANGED
|
@@ -5,14 +5,14 @@ import { createContext, type ReactNode, useContext } from 'react';
|
|
|
5
5
|
* Context for storing and accessing the current authenticated user
|
|
6
6
|
*/
|
|
7
7
|
export interface UserContextType {
|
|
8
|
-
/**
|
|
9
|
-
* The current authenticated user, or null if not authenticated
|
|
10
|
-
*/
|
|
11
|
-
user: User | null;
|
|
12
8
|
/**
|
|
13
9
|
* Whether the user data is currently loading
|
|
14
10
|
*/
|
|
15
11
|
isLoading: boolean;
|
|
12
|
+
/**
|
|
13
|
+
* The current authenticated user, or null if not authenticated
|
|
14
|
+
*/
|
|
15
|
+
user: User | null;
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
/**
|
|
@@ -34,17 +34,17 @@ export const UserContext: React.Context<UserContextType> =
|
|
|
34
34
|
*/
|
|
35
35
|
export interface UserContextProviderProps {
|
|
36
36
|
/**
|
|
37
|
-
*
|
|
37
|
+
* Child components that will have access to the user context
|
|
38
38
|
*/
|
|
39
|
-
|
|
39
|
+
children: ReactNode;
|
|
40
40
|
/**
|
|
41
41
|
* Whether the user data is currently loading
|
|
42
42
|
*/
|
|
43
43
|
isLoading?: boolean;
|
|
44
44
|
/**
|
|
45
|
-
*
|
|
45
|
+
* The current authenticated user, or null if not authenticated
|
|
46
46
|
*/
|
|
47
|
-
|
|
47
|
+
user: User | null;
|
|
48
48
|
}
|
|
49
49
|
|
|
50
50
|
/**
|
|
@@ -22,11 +22,11 @@ const iconButton = tv({
|
|
|
22
22
|
export type IconButtonSize = keyof typeof iconButtonVariants;
|
|
23
23
|
|
|
24
24
|
export interface IconButtonProps extends Omit<ComponentProps<typeof Button>, 'size'> {
|
|
25
|
+
'aria-label'?: string;
|
|
26
|
+
children?: never; // Prevent children, only icon allowed
|
|
25
27
|
icon: ReactNode;
|
|
26
28
|
size?: IconButtonSize;
|
|
27
29
|
title?: string;
|
|
28
|
-
'aria-label'?: string;
|
|
29
|
-
children?: never; // Prevent children, only icon allowed
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
export const IconButton = ({
|
package/src/input/input.tsx
CHANGED
|
@@ -95,8 +95,8 @@ export type InputSize = keyof typeof inputSizes;
|
|
|
95
95
|
|
|
96
96
|
export interface InputProps extends Omit<ComponentProps<typeof BaseUIInput>, 'className' | 'size'> {
|
|
97
97
|
className?: string;
|
|
98
|
-
variant?: InputVariant;
|
|
99
98
|
size?: InputSize;
|
|
99
|
+
variant?: InputVariant;
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
export const Input = ({ className, variant, size, ...props }: InputProps): React.JSX.Element => {
|
package/src/link/link.tsx
CHANGED
|
@@ -22,8 +22,8 @@ export function usePathResolver(): PathResolver | null {
|
|
|
22
22
|
}
|
|
23
23
|
|
|
24
24
|
export interface LinkBaseProps extends Omit<NavLinkProps, 'to'> {
|
|
25
|
-
to?: string | Partial<{ pathname?: string; search?: string; hash?: string }> | undefined;
|
|
26
25
|
routeKey?: string;
|
|
26
|
+
to?: string | Partial<{ pathname?: string; search?: string; hash?: string }> | undefined;
|
|
27
27
|
viewTransition?: boolean;
|
|
28
28
|
}
|
|
29
29
|
|
|
@@ -51,10 +51,10 @@ export const LinkBase = ({
|
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
const isExternal =
|
|
54
|
-
path.startsWith('tel:')
|
|
55
|
-
path.startsWith('mailto:')
|
|
56
|
-
path.startsWith('#')
|
|
57
|
-
path.startsWith('http');
|
|
54
|
+
path.startsWith('tel:')
|
|
55
|
+
|| path.startsWith('mailto:')
|
|
56
|
+
|| path.startsWith('#')
|
|
57
|
+
|| path.startsWith('http');
|
|
58
58
|
|
|
59
59
|
const handleClick = useCallback(
|
|
60
60
|
(event: React.MouseEvent<HTMLAnchorElement, MouseEvent>) => {
|
|
@@ -165,8 +165,8 @@ export type LinkVariant = keyof typeof linkVariants;
|
|
|
165
165
|
|
|
166
166
|
export interface LinkProps extends Omit<NavLinkProps, 'to'> {
|
|
167
167
|
arrow?: LinkArrow;
|
|
168
|
-
to?: string | Partial<{ pathname?: string; search?: string; hash?: string }>;
|
|
169
168
|
routeKey?: string;
|
|
169
|
+
to?: string | Partial<{ pathname?: string; search?: string; hash?: string }>;
|
|
170
170
|
variant?: LinkVariant;
|
|
171
171
|
viewTransition?: boolean;
|
|
172
172
|
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import { createContext, useContext } from 'react';
|
|
2
2
|
|
|
3
3
|
export interface ListRootContextValue {
|
|
4
|
+
/**
|
|
5
|
+
* Default className to apply to all list items.
|
|
6
|
+
*/
|
|
7
|
+
defaultItemClassName?: string;
|
|
4
8
|
/**
|
|
5
9
|
* Default element type for list items.
|
|
6
10
|
* @default 'li'
|
|
7
11
|
*/
|
|
8
12
|
defaultItemElement: 'li' | 'dd' | 'dt' | 'div' | 'span';
|
|
9
|
-
/**
|
|
10
|
-
* Default className to apply to all list items.
|
|
11
|
-
*/
|
|
12
|
-
defaultItemClassName?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
export const ListRootContext: React.Context<ListRootContextValue | undefined> = createContext<
|
|
@@ -85,9 +85,9 @@ const truncateText = (
|
|
|
85
85
|
|
|
86
86
|
if (part !== undefined) {
|
|
87
87
|
if (
|
|
88
|
-
(maxSentences === undefined || sentenceCount < maxSentences)
|
|
89
|
-
(maxCharacters === undefined
|
|
90
|
-
charCount + part.length + delimiter.length <= maxCharacters)
|
|
88
|
+
(maxSentences === undefined || sentenceCount < maxSentences)
|
|
89
|
+
&& (maxCharacters === undefined
|
|
90
|
+
|| charCount + part.length + delimiter.length <= maxCharacters)
|
|
91
91
|
) {
|
|
92
92
|
truncatedText += part + delimiter;
|
|
93
93
|
charCount += part.length + delimiter.length;
|
|
@@ -104,8 +104,8 @@ const truncateText = (
|
|
|
104
104
|
paragraphCount++;
|
|
105
105
|
|
|
106
106
|
if (
|
|
107
|
-
(maxSentences !== undefined && sentenceCount >= maxSentences)
|
|
108
|
-
(maxCharacters !== undefined && charCount >= maxCharacters)
|
|
107
|
+
(maxSentences !== undefined && sentenceCount >= maxSentences)
|
|
108
|
+
|| (maxCharacters !== undefined && charCount >= maxCharacters)
|
|
109
109
|
) {
|
|
110
110
|
break;
|
|
111
111
|
}
|
|
@@ -124,9 +124,9 @@ export const MarkdownContainer: React.FC<MarkdownContainerProps> = (props) => {
|
|
|
124
124
|
let processedText = processTextOutsideMDXComponents(rawText, props.locale);
|
|
125
125
|
|
|
126
126
|
const shouldTruncate =
|
|
127
|
-
Number.isInteger(props.sentences)
|
|
128
|
-
Number.isInteger(props.characters)
|
|
129
|
-
Number.isInteger(props.paragraphs);
|
|
127
|
+
Number.isInteger(props.sentences)
|
|
128
|
+
|| Number.isInteger(props.characters)
|
|
129
|
+
|| Number.isInteger(props.paragraphs);
|
|
130
130
|
|
|
131
131
|
if (shouldTruncate) {
|
|
132
132
|
processedText = truncateText(
|
|
@@ -144,8 +144,12 @@ export const MarkdownContainer: React.FC<MarkdownContainerProps> = (props) => {
|
|
|
144
144
|
options={{
|
|
145
145
|
disableParsingRawHTML: false,
|
|
146
146
|
forceWrapper: true,
|
|
147
|
+
overrides: {
|
|
148
|
+
br: { component: () => <br /> },
|
|
149
|
+
hr: { component: () => <hr /> },
|
|
150
|
+
...props.markdownOverrides,
|
|
151
|
+
},
|
|
147
152
|
tagfilter: false,
|
|
148
|
-
...(props.markdownOverrides ? { overrides: props.markdownOverrides } : {}),
|
|
149
153
|
}}
|
|
150
154
|
>
|
|
151
155
|
{processedText}
|
|
@@ -49,9 +49,9 @@ export type PasswordInputVariant = keyof typeof passwordInputVariants;
|
|
|
49
49
|
export interface PasswordInputProps
|
|
50
50
|
extends Omit<React.ComponentProps<typeof Input>, 'type' | 'variant'> {
|
|
51
51
|
className?: string;
|
|
52
|
-
variant?: PasswordInputVariant;
|
|
53
52
|
inputVariant?: 'default' | 'error' | 'success';
|
|
54
53
|
showToggle?: boolean;
|
|
54
|
+
variant?: PasswordInputVariant;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
export const PasswordInput = ({
|
package/src/toggle/toggle.tsx
CHANGED
|
@@ -57,11 +57,11 @@ export type ToggleVariant = keyof typeof toggle.variants.variant;
|
|
|
57
57
|
export type ToggleSize = keyof typeof toggle.variants.size;
|
|
58
58
|
|
|
59
59
|
export interface ToggleProps extends Omit<ComponentProps<typeof BaseUIToggle>, 'className'> {
|
|
60
|
+
children?: ReactNode;
|
|
60
61
|
className?: string;
|
|
61
|
-
variant?: ToggleVariant;
|
|
62
62
|
size?: ToggleSize;
|
|
63
|
-
children?: ReactNode;
|
|
64
63
|
title?: string;
|
|
64
|
+
variant?: ToggleVariant;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
67
|
export const Toggle = ({
|