@saas-ui/react 3.0.0-next.41 → 3.0.0-next.43
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/.tsbuildinfo.json +1 -1
- package/dist/components/blockquote/blockquote.d.ts +2 -1
- package/dist/components/blockquote/blockquote.js +4 -1
- package/dist/components/blockquote/index.d.ts +1 -1
- package/dist/components/blockquote/index.js +1 -1
- package/dist/components/checkbox/index.d.ts +1 -0
- package/dist/components/checkbox/index.js +1 -0
- package/dist/components/circle/index.d.ts +1 -0
- package/dist/components/circle/index.js +1 -0
- package/dist/components/code-block/index.d.ts +1 -0
- package/dist/components/code-block/index.js +1 -0
- package/dist/components/download-trigger/index.d.ts +1 -0
- package/dist/components/download-trigger/index.js +1 -0
- package/dist/components/field/field.recipe.d.ts +1 -1
- package/dist/components/quote/index.d.ts +1 -0
- package/dist/components/quote/index.js +1 -0
- package/dist/components/scroll-area/index.d.ts +1 -0
- package/dist/components/scroll-area/index.js +1 -0
- package/dist/components/square/index.d.ts +1 -0
- package/dist/components/square/index.js +1 -0
- package/dist/components/steps/index.d.ts +1 -0
- package/dist/components/steps/index.js +1 -0
- package/dist/components/sticky/index.d.ts +1 -0
- package/dist/components/sticky/index.js +1 -0
- package/dist/components/tree-view/index.d.ts +1 -0
- package/dist/components/tree-view/index.js +1 -0
- package/dist/index.d.ts +13 -2
- package/dist/index.js +13 -2
- package/dist/styled-system/create-slot-recipe-context.js +8 -5
- package/dist/theme/slot-recipes.d.ts +1 -1
- package/package.json +13 -13
@@ -1,5 +1,5 @@
|
|
1
1
|
import * as React from 'react';
|
2
|
-
import { Blockquote as ChakraBlockquote } from '@chakra-ui/react';
|
2
|
+
import { Blockquote as ChakraBlockquote, type HTMLChakraProps } from '@chakra-ui/react';
|
3
3
|
export interface BlockquoteProps extends ChakraBlockquote.RootProps {
|
4
4
|
cite?: React.ReactNode;
|
5
5
|
citeUrl?: string;
|
@@ -7,3 +7,4 @@ export interface BlockquoteProps extends ChakraBlockquote.RootProps {
|
|
7
7
|
showDash?: boolean;
|
8
8
|
}
|
9
9
|
export declare const Blockquote: React.ForwardRefExoticComponent<BlockquoteProps & React.RefAttributes<HTMLDivElement>>;
|
10
|
+
export declare const BlockquoteIcon: (props: HTMLChakraProps<"svg">) => import("react/jsx-runtime").JSX.Element;
|
@@ -1,7 +1,10 @@
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
2
2
|
import * as React from 'react';
|
3
|
-
import { Blockquote as ChakraBlockquote } from '@chakra-ui/react';
|
3
|
+
import { Blockquote as ChakraBlockquote, } from '@chakra-ui/react';
|
4
4
|
export const Blockquote = React.forwardRef(function Blockquote(props, ref) {
|
5
5
|
const { children, cite, citeUrl, showDash, icon, ...rest } = props;
|
6
6
|
return (_jsxs(ChakraBlockquote.Root, { ref: ref, ...rest, children: [icon, _jsx(ChakraBlockquote.Content, { cite: citeUrl, children: children }), cite && (_jsxs(ChakraBlockquote.Caption, { children: [showDash ? _jsx(_Fragment, { children: "\u2014" }) : null, " ", _jsx("cite", { children: cite })] }))] }));
|
7
7
|
});
|
8
|
+
export const BlockquoteIcon = (props) => {
|
9
|
+
return _jsx(ChakraBlockquote.Icon, { ...props });
|
10
|
+
};
|
@@ -1 +1 @@
|
|
1
|
-
export { Blockquote, type BlockquoteProps } from './blockquote.tsx';
|
1
|
+
export { Blockquote, BlockquoteIcon, type BlockquoteProps, } from './blockquote.tsx';
|
@@ -1 +1 @@
|
|
1
|
-
export { Blockquote } from "./blockquote.js";
|
1
|
+
export { Blockquote, BlockquoteIcon, } from "./blockquote.js";
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Circle, type CircleProps, } from '@chakra-ui/react/circle';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Circle, } from '@chakra-ui/react/circle';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { CodeBlock } from '@chakra-ui/react/code-block';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { CodeBlock } from '@chakra-ui/react/code-block';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { DownloadTrigger, type DownloadTriggerProps, } from '@chakra-ui/react/download-trigger';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { DownloadTrigger, } from '@chakra-ui/react/download-trigger';
|
@@ -1,4 +1,4 @@
|
|
1
|
-
export declare const fieldSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "textarea" | "root" | "input" | "
|
1
|
+
export declare const fieldSlotRecipe: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "textarea" | "root" | "input" | "errorText" | "helperText" | "select" | "requiredIndicator", {
|
2
2
|
orientation: {
|
3
3
|
vertical: {
|
4
4
|
root: {
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Quote, type QuoteProps, } from '@chakra-ui/react/quote';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Quote, } from '@chakra-ui/react/quote';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ScrollArea } from '@chakra-ui/react/scroll-area';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { ScrollArea } from '@chakra-ui/react/scroll-area';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Square, type SquareProps, } from '@chakra-ui/react/square';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Square, } from '@chakra-ui/react/square';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Sticky, type StickyProps, } from '@chakra-ui/react/sticky';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { Sticky, } from '@chakra-ui/react/sticky';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { TreeView } from '@chakra-ui/react/tree-view';
|
@@ -0,0 +1 @@
|
|
1
|
+
export { TreeView } from '@chakra-ui/react/tree-view';
|
package/dist/index.d.ts
CHANGED
@@ -12,13 +12,15 @@ export { AppShell, type AppShellProps } from './components/app-shell/index.ts';
|
|
12
12
|
export { Avatar, AvatarGroup, type AvatarProps, } from './components/avatar/index.ts';
|
13
13
|
export { Badge, BadgePropsProvider, type BadgeProps, } from './components/badge/index.ts';
|
14
14
|
export { BackButton, type BackButtonProps, } from './components/back-button/index.ts';
|
15
|
-
export { Blockquote, type BlockquoteProps, } from './components/blockquote/index.ts';
|
15
|
+
export { Blockquote, BlockquoteIcon, type BlockquoteProps, } from './components/blockquote/index.ts';
|
16
16
|
export { Breadcrumb } from './components/breadcrumb/index.ts';
|
17
17
|
export { Button, type ButtonProps } from './components/button/index.ts';
|
18
18
|
export { ButtonGroup, type ButtonGroupProps, } from './components/button-group/index.ts';
|
19
19
|
export { Card } from './components/card/index.ts';
|
20
|
-
export { Checkbox, type CheckboxProps } from './components/checkbox/index.ts';
|
20
|
+
export { Checkbox, CheckboxGroup, type CheckboxProps, type CheckboxGroupProps, } from './components/checkbox/index.ts';
|
21
21
|
export { Checkmark, type CheckmarkProps } from './components/checkmark/index.ts';
|
22
|
+
export { CodeBlock } from './components/code-block/index.ts';
|
23
|
+
export { Circle } from './components/circle/index.ts';
|
22
24
|
export { CheckboxCard, type CheckboxCardProps, } from './components/checkbox-card/index.ts';
|
23
25
|
export { Clipboard } from './components/clipboard/index.ts';
|
24
26
|
export { useClipboard } from './components/clipboard/index.ts';
|
@@ -121,6 +123,12 @@ export { Section, useSectionStyles } from './components/section/index.ts';
|
|
121
123
|
export { Show, type ShowProps } from './components/show/index.ts';
|
122
124
|
export { Spacer, type SpacerProps } from './components/spacer/index.ts';
|
123
125
|
export { Stack, type StackProps, HStack, VStack, StackSeparator, type StackSeparatorProps, } from './components/stack/index.ts';
|
126
|
+
export { Sticky, type StickyProps } from './components/sticky/index.ts';
|
127
|
+
export { TreeView } from './components/tree-view/index.ts';
|
128
|
+
export { ScrollArea } from './components/scroll-area/index.ts';
|
129
|
+
export { DownloadTrigger, type DownloadTriggerProps, } from './components/download-trigger/index.ts';
|
130
|
+
export { Quote, type QuoteProps } from './components/quote/index.ts';
|
131
|
+
export { Square, type SquareProps } from './components/square/index.ts';
|
124
132
|
export { Toggle } from './components/toggle/index.ts';
|
125
133
|
export { Text, type TextProps } from './components/text/index.ts';
|
126
134
|
export { Em, type EmProps } from './components/em/index.ts';
|
@@ -129,3 +137,6 @@ export { VisuallyHidden } from './components/visually-hidden/index.ts';
|
|
129
137
|
export { Wrap, type WrapProps } from './components/wrap/index.ts';
|
130
138
|
export { Flex, type FlexProps } from './components/flex/index.ts';
|
131
139
|
export type { ColorPalette } from './theme/tokens/colors.ts';
|
140
|
+
export { For } from '@chakra-ui/react/for';
|
141
|
+
export { LocaleProvider, useLocaleContext, useFilter, } from '@chakra-ui/react/locale';
|
142
|
+
export { Theme } from '@chakra-ui/react';
|
package/dist/index.js
CHANGED
@@ -9,13 +9,15 @@ export { AppShell } from "./components/app-shell/index.js";
|
|
9
9
|
export { Avatar, AvatarGroup, } from "./components/avatar/index.js";
|
10
10
|
export { Badge, BadgePropsProvider, } from "./components/badge/index.js";
|
11
11
|
export { BackButton, } from "./components/back-button/index.js";
|
12
|
-
export { Blockquote, } from "./components/blockquote/index.js";
|
12
|
+
export { Blockquote, BlockquoteIcon, } from "./components/blockquote/index.js";
|
13
13
|
export { Breadcrumb } from "./components/breadcrumb/index.js";
|
14
14
|
export { Button } from "./components/button/index.js";
|
15
15
|
export { ButtonGroup, } from "./components/button-group/index.js";
|
16
16
|
export { Card } from "./components/card/index.js";
|
17
|
-
export { Checkbox } from "./components/checkbox/index.js";
|
17
|
+
export { Checkbox, CheckboxGroup, } from "./components/checkbox/index.js";
|
18
18
|
export { Checkmark } from "./components/checkmark/index.js";
|
19
|
+
export { CodeBlock } from "./components/code-block/index.js";
|
20
|
+
export { Circle } from "./components/circle/index.js";
|
19
21
|
export { CheckboxCard, } from "./components/checkbox-card/index.js";
|
20
22
|
export { Clipboard } from "./components/clipboard/index.js";
|
21
23
|
export { useClipboard } from "./components/clipboard/index.js";
|
@@ -115,6 +117,12 @@ export { Section, useSectionStyles } from "./components/section/index.js";
|
|
115
117
|
export { Show } from "./components/show/index.js";
|
116
118
|
export { Spacer } from "./components/spacer/index.js";
|
117
119
|
export { Stack, HStack, VStack, StackSeparator, } from "./components/stack/index.js";
|
120
|
+
export { Sticky } from "./components/sticky/index.js";
|
121
|
+
export { TreeView } from "./components/tree-view/index.js";
|
122
|
+
export { ScrollArea } from "./components/scroll-area/index.js";
|
123
|
+
export { DownloadTrigger, } from "./components/download-trigger/index.js";
|
124
|
+
export { Quote } from "./components/quote/index.js";
|
125
|
+
export { Square } from "./components/square/index.js";
|
118
126
|
export { Toggle } from "./components/toggle/index.js";
|
119
127
|
export { Text } from "./components/text/index.js";
|
120
128
|
export { Em } from "./components/em/index.js";
|
@@ -122,3 +130,6 @@ export { Strong } from "./components/strong/index.js";
|
|
122
130
|
export { VisuallyHidden } from "./components/visually-hidden/index.js";
|
123
131
|
export { Wrap } from "./components/wrap/index.js";
|
124
132
|
export { Flex } from "./components/flex/index.js";
|
133
|
+
export { For } from '@chakra-ui/react/for';
|
134
|
+
export { LocaleProvider, useLocaleContext, useFilter, } from '@chakra-ui/react/locale';
|
135
|
+
export { Theme } from '@chakra-ui/react';
|
@@ -1,6 +1,6 @@
|
|
1
1
|
'use client';
|
2
2
|
import { jsx as _jsx } from "react/jsx-runtime";
|
3
|
-
import { forwardRef } from 'react';
|
3
|
+
import { forwardRef, useMemo } from 'react';
|
4
4
|
import { chakra, createContext, mergeProps, useSlotRecipe, } from '@chakra-ui/react';
|
5
5
|
import { cx } from '@saas-ui/core/utils';
|
6
6
|
import { EMPTY_SLOT_STYLES } from "./empty.js";
|
@@ -30,8 +30,8 @@ export const createSlotRecipeContext = (options) => {
|
|
30
30
|
recipe: restProps.recipe || recipeConfig,
|
31
31
|
});
|
32
32
|
// @ts-ignore
|
33
|
-
const [variantProps, otherProps] = slotRecipe.splitVariantProps(restProps);
|
34
|
-
const styles = unstyled ? EMPTY_SLOT_STYLES : slotRecipe(variantProps);
|
33
|
+
const [variantProps, otherProps] = useMemo(() => slotRecipe.splitVariantProps(restProps), [restProps, slotRecipe]);
|
34
|
+
const styles = useMemo(() => (unstyled ? EMPTY_SLOT_STYLES : slotRecipe(variantProps)), [unstyled, variantProps, slotRecipe]);
|
35
35
|
return {
|
36
36
|
styles: styles,
|
37
37
|
classNames: slotRecipe.classNameMap,
|
@@ -41,7 +41,8 @@ export const createSlotRecipeContext = (options) => {
|
|
41
41
|
function withRootProvider(Component, options = {}) {
|
42
42
|
const { defaultProps } = options;
|
43
43
|
const StyledComponent = (inProps) => {
|
44
|
-
const
|
44
|
+
const propsContext = usePropsContext();
|
45
|
+
const props = useMemo(() => mergeProps(defaultProps, propsContext, inProps), [propsContext, inProps]);
|
45
46
|
const { styles, classNames, props: rootProps } = useRecipeResult(props);
|
46
47
|
return (_jsx(StylesProvider, { value: styles, children: _jsx(ClassNamesProvider, { value: classNames, children: _jsx(Component, { ...rootProps }) }) }));
|
47
48
|
};
|
@@ -53,10 +54,12 @@ export const createSlotRecipeContext = (options) => {
|
|
53
54
|
const { defaultProps, ...restOptions } = options ?? {};
|
54
55
|
const SuperComponent = chakra(Component, {}, restOptions);
|
55
56
|
const StyledComponent = forwardRef((inProps, ref) => {
|
56
|
-
const
|
57
|
+
const propsContext = usePropsContext();
|
58
|
+
const props = useMemo(() => mergeProps(defaultProps ?? {}, propsContext, inProps), [propsContext, inProps]);
|
57
59
|
const { styles, props: rootProps, classNames } = useRecipeResult(props);
|
58
60
|
const className = classNames[slot];
|
59
61
|
const element = (_jsx(StylesProvider, { value: styles, children: _jsx(ClassNamesProvider, { value: classNames, children: _jsx(SuperComponent, { ref: ref, ...rootProps, css: [styles[slot], props.css], className: cx(props.className, className) }) }) }));
|
62
|
+
// @ts-expect-error
|
60
63
|
return options?.wrapElement?.(element, props) ?? element;
|
61
64
|
});
|
62
65
|
// @ts-expect-error
|
@@ -1335,7 +1335,7 @@ export declare const slotRecipes: {
|
|
1335
1335
|
};
|
1336
1336
|
};
|
1337
1337
|
}>;
|
1338
|
-
field: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "textarea" | "root" | "input" | "
|
1338
|
+
field: import("@chakra-ui/react").SlotRecipeDefinition<"label" | "textarea" | "root" | "input" | "errorText" | "helperText" | "select" | "requiredIndicator", {
|
1339
1339
|
orientation: {
|
1340
1340
|
vertical: {
|
1341
1341
|
root: {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@saas-ui/react",
|
3
|
-
"version": "3.0.0-next.
|
3
|
+
"version": "3.0.0-next.43",
|
4
4
|
"description": "Saas UI - The React component library for startups.",
|
5
5
|
"type": "module",
|
6
6
|
"exports": {
|
@@ -60,26 +60,26 @@
|
|
60
60
|
"url": "https://storybook.saas-ui.dev"
|
61
61
|
},
|
62
62
|
"dependencies": {
|
63
|
-
"@ark-ui/react": "^5.
|
63
|
+
"@ark-ui/react": "^5.25.1",
|
64
64
|
"next-themes": "^0.4.6",
|
65
|
-
"@saas-ui/
|
66
|
-
"@saas-ui/
|
65
|
+
"@saas-ui/core": "3.0.0-next.11",
|
66
|
+
"@saas-ui/hooks": "3.0.0-next.3"
|
67
67
|
},
|
68
68
|
"peerDependencies": {
|
69
|
-
"@chakra-ui/react": "^3.
|
69
|
+
"@chakra-ui/react": "^3.27.0",
|
70
70
|
"@emotion/react": "^11",
|
71
|
-
"react": "
|
72
|
-
"react-dom": "
|
71
|
+
"react": "^19.1.1",
|
72
|
+
"react-dom": "^19.1.1"
|
73
73
|
},
|
74
74
|
"devDependencies": {
|
75
|
+
"@types/react": "19.2.0",
|
76
|
+
"@types/react-dom": "19.2.0",
|
77
|
+
"react": "19.2.0",
|
78
|
+
"react-dom": "19.2.0",
|
75
79
|
"react-icons": "^5.5.0",
|
76
80
|
"rimraf": "^6.0.1",
|
77
|
-
"tsup": "^8.
|
78
|
-
"typescript": "
|
79
|
-
"react": "^19.0.0",
|
80
|
-
"react-dom": "^19.0.0",
|
81
|
-
"@types/react": "^19.0.12",
|
82
|
-
"@types/react-dom": "^19.0.4"
|
81
|
+
"tsup": "^8.5.0",
|
82
|
+
"typescript": "5.9.3"
|
83
83
|
},
|
84
84
|
"scripts": {
|
85
85
|
"clean": "rimraf --no-glob ./dist",
|