@seed-design/react 0.0.5 → 0.0.6
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/lib/components/LoadingIndicator/usePendingButton.d.ts +57 -57
- package/lib/components/Snackbar/Snackbar.cjs +13 -17
- package/lib/components/Snackbar/Snackbar.d.ts +2 -2
- package/lib/components/Snackbar/Snackbar.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.js +14 -18
- package/lib/components/Snackbar/Snackbar.namespace.cjs +1 -1
- package/lib/components/Snackbar/Snackbar.namespace.d.ts +1 -1
- package/lib/components/Snackbar/Snackbar.namespace.d.ts.map +1 -1
- package/lib/components/Snackbar/Snackbar.namespace.js +1 -1
- package/lib/components/Snackbar/index.cjs +1 -1
- package/lib/components/Snackbar/index.d.ts +1 -1
- package/lib/components/Snackbar/index.d.ts.map +1 -1
- package/lib/components/Snackbar/index.js +1 -1
- package/lib/components/VisuallyHidden/VisuallyHidden.cjs +7 -4
- package/lib/components/VisuallyHidden/VisuallyHidden.d.ts.map +1 -1
- package/lib/components/VisuallyHidden/VisuallyHidden.js +7 -4
- package/lib/components/index.cjs +1 -1
- package/lib/components/index.js +1 -1
- package/lib/components/private/useDismissible.d.ts +120 -120
- package/lib/index.cjs +1 -1
- package/lib/index.js +1 -1
- package/package.json +3 -3
- package/src/components/Snackbar/Snackbar.namespace.ts +2 -2
- package/src/components/Snackbar/Snackbar.tsx +16 -17
- package/src/components/Snackbar/index.ts +2 -2
- package/src/components/VisuallyHidden/VisuallyHidden.tsx +6 -5
package/lib/index.cjs
CHANGED
|
@@ -221,7 +221,7 @@ exports.RadioSelectBox = RadioSelectBox_namespace;
|
|
|
221
221
|
exports.Skeleton = Skeleton.Skeleton;
|
|
222
222
|
exports.SnackbarActionButton = Snackbar.SnackbarActionButton;
|
|
223
223
|
exports.SnackbarAvoidOverlap = Snackbar.SnackbarAvoidOverlap;
|
|
224
|
-
exports.
|
|
224
|
+
exports.SnackbarHiddenCloseButton = Snackbar.SnackbarHiddenCloseButton;
|
|
225
225
|
exports.SnackbarMessage = Snackbar.SnackbarMessage;
|
|
226
226
|
exports.SnackbarPrefixIcon = Snackbar.SnackbarPrefixIcon;
|
|
227
227
|
exports.SnackbarRegion = Snackbar.SnackbarRegion;
|
package/lib/index.js
CHANGED
|
@@ -65,7 +65,7 @@ export { CheckSelectBox_namespace as CheckSelectBox };
|
|
|
65
65
|
import * as RadioSelectBox_namespace from './components/SelectBox/RadioSelectBox.namespace.js';
|
|
66
66
|
export { RadioSelectBox_namespace as RadioSelectBox };
|
|
67
67
|
export { Skeleton } from './components/Skeleton/Skeleton.js';
|
|
68
|
-
export { SnackbarActionButton, SnackbarAvoidOverlap,
|
|
68
|
+
export { SnackbarActionButton, SnackbarAvoidOverlap, SnackbarHiddenCloseButton, SnackbarMessage, SnackbarPrefixIcon, SnackbarRegion, SnackbarRenderer, SnackbarRoot, SnackbarRootProvider } from './components/Snackbar/Snackbar.js';
|
|
69
69
|
export { useSnackbarContext } from '@seed-design/react-snackbar';
|
|
70
70
|
export { useSnackbarAdapter } from './components/Snackbar/useSnackbarAdapter.js';
|
|
71
71
|
import * as Snackbar_namespace from './components/Snackbar/Snackbar.namespace.js';
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seed-design/react",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.6",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/daangn/seed-design.git",
|
|
@@ -55,12 +55,12 @@
|
|
|
55
55
|
"clsx": "^2.1.1"
|
|
56
56
|
},
|
|
57
57
|
"peerDependencies": {
|
|
58
|
-
"@seed-design/css": "0.0.
|
|
58
|
+
"@seed-design/css": "0.0.6",
|
|
59
59
|
"react": ">=18.0.0",
|
|
60
60
|
"react-dom": ">=18.0.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@seed-design/css": "0.0.
|
|
63
|
+
"@seed-design/css": "0.0.6",
|
|
64
64
|
"globby": "^14.1.0",
|
|
65
65
|
"vite": "^6.1.1",
|
|
66
66
|
"vite-plugin-dts": "^4.5.0"
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
SnackbarActionButton as ActionButton,
|
|
3
3
|
SnackbarAvoidOverlap as AvoidOverlap,
|
|
4
|
-
|
|
4
|
+
SnackbarHiddenCloseButton as HiddenCloseButton,
|
|
5
5
|
SnackbarMessage as Message,
|
|
6
6
|
SnackbarPrefixIcon as PrefixIcon,
|
|
7
7
|
SnackbarRegion as Region,
|
|
@@ -10,7 +10,7 @@ export {
|
|
|
10
10
|
SnackbarRootProvider as RootProvider,
|
|
11
11
|
type SnackbarActionButtonProps as ActionButtonProps,
|
|
12
12
|
type SnackbarAvoidOverlapProps as AvoidOverlapProps,
|
|
13
|
-
type
|
|
13
|
+
type SnackbarHiddenCloseButtonProps as HiddenCloseButtonProps,
|
|
14
14
|
type SnackbarMessageProps as MessageProps,
|
|
15
15
|
type SnackbarPrefixIconProps as PrefixIconProps,
|
|
16
16
|
type SnackbarRegionProps as RegionProps,
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { snackbar, type SnackbarVariantProps } from "@seed-design/css/recipes/snackbar";
|
|
2
2
|
import { snackbarRegion } from "@seed-design/css/recipes/snackbar-region";
|
|
3
|
-
import { visuallyHidden } from "@seed-design/
|
|
3
|
+
import { visuallyHidden } from "@seed-design/dom-utils";
|
|
4
4
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
5
5
|
import { Snackbar as SnackbarPrimitive } from "@seed-design/react-snackbar";
|
|
6
|
-
import
|
|
7
|
-
import { forwardRef, useMemo } from "react";
|
|
6
|
+
import { forwardRef } from "react";
|
|
8
7
|
import { createRecipeContext } from "../../utils/createRecipeContext";
|
|
9
8
|
import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
|
|
10
9
|
import { InternalIcon, type InternalIconProps } from "../private/Icon";
|
|
@@ -68,24 +67,24 @@ export const SnackbarActionButton = withContext<HTMLButtonElement, SnackbarActio
|
|
|
68
67
|
|
|
69
68
|
////////////////////////////////////////////////////////////////////////////////////
|
|
70
69
|
|
|
71
|
-
export interface
|
|
70
|
+
export interface SnackbarHiddenCloseButtonProps extends SnackbarPrimitive.CloseButtonProps {}
|
|
72
71
|
|
|
73
72
|
/**
|
|
74
73
|
* Visually hidden button that closes the snackbar (for screen readers).
|
|
75
74
|
*/
|
|
76
|
-
export const
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
);
|
|
75
|
+
export const SnackbarHiddenCloseButton = forwardRef<
|
|
76
|
+
HTMLButtonElement,
|
|
77
|
+
SnackbarHiddenCloseButtonProps
|
|
78
|
+
>((props, ref) => {
|
|
79
|
+
const { style, ...otherProps } = props;
|
|
80
|
+
return (
|
|
81
|
+
<SnackbarPrimitive.CloseButton
|
|
82
|
+
ref={ref}
|
|
83
|
+
style={{ ...visuallyHidden, ...style }}
|
|
84
|
+
{...otherProps}
|
|
85
|
+
/>
|
|
86
|
+
);
|
|
87
|
+
});
|
|
89
88
|
|
|
90
89
|
////////////////////////////////////////////////////////////////////////////////////
|
|
91
90
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export {
|
|
2
2
|
SnackbarActionButton,
|
|
3
3
|
SnackbarAvoidOverlap,
|
|
4
|
-
|
|
4
|
+
SnackbarHiddenCloseButton,
|
|
5
5
|
SnackbarMessage,
|
|
6
6
|
SnackbarPrefixIcon,
|
|
7
7
|
SnackbarRegion,
|
|
@@ -10,7 +10,7 @@ export {
|
|
|
10
10
|
SnackbarRootProvider,
|
|
11
11
|
type SnackbarActionButtonProps,
|
|
12
12
|
type SnackbarAvoidOverlapProps,
|
|
13
|
-
type
|
|
13
|
+
type SnackbarHiddenCloseButtonProps,
|
|
14
14
|
type SnackbarMessageProps,
|
|
15
15
|
type SnackbarPrefixIconProps,
|
|
16
16
|
type SnackbarRegionProps,
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { visuallyHidden } from "@seed-design/dom-utils";
|
|
1
2
|
import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
|
|
2
|
-
import { visuallyHidden } from "@seed-design/css/recipes/visually-hidden";
|
|
3
3
|
import type * as React from "react";
|
|
4
|
-
import {
|
|
5
|
-
|
|
6
|
-
const { withProvider } = createRecipeContext(visuallyHidden);
|
|
4
|
+
import { forwardRef } from "react";
|
|
7
5
|
|
|
8
6
|
export interface VisuallyHiddenProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {}
|
|
9
7
|
|
|
10
|
-
export const VisuallyHidden =
|
|
8
|
+
export const VisuallyHidden = forwardRef<HTMLDivElement, VisuallyHiddenProps>((props, ref) => {
|
|
9
|
+
const { style, ...otherProps } = props;
|
|
10
|
+
return <Primitive.div ref={ref} style={{ ...visuallyHidden, ...style }} {...otherProps} />;
|
|
11
|
+
});
|