@seed-design/react 0.1.13 → 0.1.14

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.
Files changed (30) hide show
  1. package/lib/components/Badge/Badge.cjs +11 -3
  2. package/lib/components/Badge/Badge.d.ts.map +1 -1
  3. package/lib/components/Badge/Badge.js +11 -3
  4. package/lib/components/InlineBanner/InlineBanner.d.ts +36 -0
  5. package/lib/components/InlineBanner/InlineBanner.d.ts.map +1 -1
  6. package/lib/components/PageBanner/PageBanner.cjs +42 -0
  7. package/lib/components/PageBanner/PageBanner.d.ts +23 -0
  8. package/lib/components/PageBanner/PageBanner.d.ts.map +1 -0
  9. package/lib/components/PageBanner/PageBanner.js +33 -0
  10. package/lib/components/PageBanner/PageBanner.namespace.cjs +14 -0
  11. package/lib/components/PageBanner/PageBanner.namespace.d.ts +2 -0
  12. package/lib/components/PageBanner/PageBanner.namespace.d.ts.map +1 -0
  13. package/lib/components/PageBanner/PageBanner.namespace.js +1 -0
  14. package/lib/components/PageBanner/index.cjs +16 -0
  15. package/lib/components/PageBanner/index.d.ts +3 -0
  16. package/lib/components/PageBanner/index.d.ts.map +1 -0
  17. package/lib/components/PageBanner/index.js +3 -0
  18. package/lib/components/index.cjs +9 -0
  19. package/lib/components/index.d.ts +1 -0
  20. package/lib/components/index.d.ts.map +1 -1
  21. package/lib/components/index.js +3 -0
  22. package/lib/index.cjs +9 -0
  23. package/lib/index.js +3 -0
  24. package/package.json +3 -3
  25. package/src/components/Badge/Badge.tsx +15 -4
  26. package/src/components/InlineBanner/InlineBanner.tsx +36 -0
  27. package/src/components/PageBanner/PageBanner.namespace.ts +14 -0
  28. package/src/components/PageBanner/PageBanner.tsx +64 -0
  29. package/src/components/PageBanner/index.ts +16 -0
  30. package/src/components/index.ts +1 -0
@@ -3,11 +3,19 @@
3
3
 
4
4
  Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
5
 
6
+ const jsxRuntime = require('react/jsx-runtime');
6
7
  const reactPrimitive = require('@seed-design/react-primitive');
7
8
  const badge = require('@seed-design/css/recipes/badge');
8
- const createRecipeContext = require('../../utils/createRecipeContext.cjs');
9
+ const React = require('react');
10
+ const clsx = require('clsx');
9
11
 
10
- const { withContext } = createRecipeContext.createRecipeContext(badge.badge);
11
- const Badge = withContext(reactPrimitive.Primitive.span);
12
+ const Badge = React.forwardRef(
13
+ ({ className, children, ...props }, ref) => {
14
+ const [variantProps, restProps] = badge.badge.splitVariantProps(props);
15
+ const { root, label } = badge.badge(variantProps);
16
+ return /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.span, { className: clsx(root, className), ...restProps, ref, children: /* @__PURE__ */ jsxRuntime.jsx(reactPrimitive.Primitive.span, { className: label, children }) });
17
+ }
18
+ );
19
+ Badge.displayName = "Badge";
12
20
 
13
21
  exports.Badge = Badge;
@@ -1 +1 @@
1
- {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAS,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,KAAK,oFAA2D,CAAC"}
1
+ {"version":3,"file":"Badge.d.ts","sourceRoot":"","sources":["../../../src/components/Badge/Badge.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAS,KAAK,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAC/E,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAMpC,MAAM,WAAW,UACf,SAAQ,iBAAiB,EACvB,cAAc,EACd,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,KAAK,oFAWjB,CAAC"}
@@ -1,9 +1,17 @@
1
1
  'use client';
2
+ import { jsx } from 'react/jsx-runtime';
2
3
  import { Primitive } from '@seed-design/react-primitive';
3
4
  import { badge } from '@seed-design/css/recipes/badge';
4
- import { createRecipeContext } from '../../utils/createRecipeContext.js';
5
+ import { forwardRef } from 'react';
6
+ import clsx from 'clsx';
5
7
 
6
- const { withContext } = createRecipeContext(badge);
7
- const Badge = withContext(Primitive.span);
8
+ const Badge = forwardRef(
9
+ ({ className, children, ...props }, ref) => {
10
+ const [variantProps, restProps] = badge.splitVariantProps(props);
11
+ const { root, label } = badge(variantProps);
12
+ return /* @__PURE__ */ jsx(Primitive.span, { className: clsx(root, className), ...restProps, ref, children: /* @__PURE__ */ jsx(Primitive.span, { className: label, children }) });
13
+ }
14
+ );
15
+ Badge.displayName = "Badge";
8
16
 
9
17
  export { Badge };
@@ -2,22 +2,58 @@ import { InlineBannerVariantProps } from '@seed-design/css/recipes/inline-banner
2
2
  import { PrimitiveProps } from '@seed-design/react-primitive';
3
3
  import { DismissibleRootProps } from '../private/useDismissible';
4
4
  import type * as React from "react";
5
+ /**
6
+ * @deprecated Use `PageBanner` instead.
7
+ */
5
8
  export interface InlineBannerRootProps extends InlineBannerVariantProps, DismissibleRootProps {
6
9
  }
10
+ /**
11
+ * @deprecated Use `PageBanner` instead.
12
+ */
7
13
  export declare const InlineBannerRoot: React.ForwardRefExoticComponent<InlineBannerRootProps & React.RefAttributes<HTMLDivElement>>;
14
+ /**
15
+ * @deprecated Use `PageBanner` instead.
16
+ */
8
17
  export interface InlineBannerContentProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
9
18
  }
19
+ /**
20
+ * @deprecated Use `PageBanner` instead.
21
+ */
10
22
  export declare const InlineBannerContent: React.ForwardRefExoticComponent<InlineBannerContentProps & React.RefAttributes<HTMLDivElement>>;
23
+ /**
24
+ * @deprecated Use `PageBanner` instead.
25
+ */
11
26
  export interface InlineBannerTitleProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
12
27
  }
28
+ /**
29
+ * @deprecated Use `PageBanner` instead.
30
+ */
13
31
  export declare const InlineBannerTitle: React.ForwardRefExoticComponent<InlineBannerTitleProps & React.RefAttributes<HTMLSpanElement>>;
32
+ /**
33
+ * @deprecated Use `PageBanner` instead.
34
+ */
14
35
  export interface InlineBannerDescriptionProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
15
36
  }
37
+ /**
38
+ * @deprecated Use `PageBanner` instead.
39
+ */
16
40
  export declare const InlineBannerDescription: React.ForwardRefExoticComponent<InlineBannerDescriptionProps & React.RefAttributes<HTMLSpanElement>>;
41
+ /**
42
+ * @deprecated Use `PageBanner` instead.
43
+ */
17
44
  export interface InlineBannerLinkProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
18
45
  }
46
+ /**
47
+ * @deprecated Use `PageBanner` instead.
48
+ */
19
49
  export declare const InlineBannerLink: React.ForwardRefExoticComponent<InlineBannerLinkProps & React.RefAttributes<HTMLButtonElement>>;
50
+ /**
51
+ * @deprecated Use `PageBanner` instead.
52
+ */
20
53
  export interface InlineBannerCloseButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
21
54
  }
55
+ /**
56
+ * @deprecated Use `PageBanner` instead.
57
+ */
22
58
  export declare const InlineBannerCloseButton: React.ForwardRefExoticComponent<InlineBannerCloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
23
59
  //# sourceMappingURL=InlineBanner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"InlineBanner.d.ts","sourceRoot":"","sources":["../../../src/components/InlineBanner/InlineBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAEL,KAAK,wBAAwB,EAC9B,MAAM,wCAAwC,CAAC;A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Q,wBAAwB,EAAE,oBAAoB;CAAG;AAEhG;;GAEG;AACH,eAAO,MAAM,gBAAgB,8FAG5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,wBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C;;GAEG;AACH,eAAO,MAAM,mBAAmB,iGAG/B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,sBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C;;GAEG;AACH,eAAO,MAAM,iBAAiB,gGAG7B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C;;GAEG;AACH,eAAO,MAAM,uBAAuB,sGAGnC,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,qBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD;;GAEG;AACH,eAAO,MAAM,gBAAgB,iGAG5B,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,4BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD;;GAEG;AACH,eAAO,MAAM,uBAAuB,wGAGnC,CAAC"}
@@ -0,0 +1,42 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const pageBanner = require('@seed-design/css/recipes/page-banner');
7
+ const reactPrimitive = require('@seed-design/react-primitive');
8
+ const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
9
+ const useDismissible = require('../private/useDismissible.cjs');
10
+
11
+ const { withContext, withProvider } = createSlotRecipeContext.createSlotRecipeContext(pageBanner.pageBanner);
12
+ const PageBannerRoot = withProvider(
13
+ useDismissible.DismissibleRoot,
14
+ "root"
15
+ );
16
+ const PageBannerTextContent = withContext(
17
+ reactPrimitive.Primitive.div,
18
+ "textContent"
19
+ );
20
+ const PageBannerTitle = withContext(
21
+ reactPrimitive.Primitive.span,
22
+ "title"
23
+ );
24
+ const PageBannerDescription = withContext(
25
+ reactPrimitive.Primitive.span,
26
+ "description"
27
+ );
28
+ const PageBannerButton = withContext(
29
+ reactPrimitive.Primitive.button,
30
+ "button"
31
+ );
32
+ const PageBannerCloseButton = withContext(
33
+ useDismissible.DismissibleCloseButton,
34
+ "closeButton"
35
+ );
36
+
37
+ exports.PageBannerButton = PageBannerButton;
38
+ exports.PageBannerCloseButton = PageBannerCloseButton;
39
+ exports.PageBannerDescription = PageBannerDescription;
40
+ exports.PageBannerRoot = PageBannerRoot;
41
+ exports.PageBannerTextContent = PageBannerTextContent;
42
+ exports.PageBannerTitle = PageBannerTitle;
@@ -0,0 +1,23 @@
1
+ import { PageBannerVariantProps } from '@seed-design/css/recipes/page-banner';
2
+ import { PrimitiveProps } from '@seed-design/react-primitive';
3
+ import { DismissibleRootProps } from '../private/useDismissible';
4
+ import type * as React from "react";
5
+ export interface PageBannerRootProps extends PageBannerVariantProps, DismissibleRootProps {
6
+ }
7
+ export declare const PageBannerRoot: React.ForwardRefExoticComponent<PageBannerRootProps & React.RefAttributes<HTMLDivElement>>;
8
+ export interface PageBannerTextContentProps extends PrimitiveProps, React.HTMLAttributes<HTMLDivElement> {
9
+ }
10
+ export declare const PageBannerTextContent: React.ForwardRefExoticComponent<PageBannerTextContentProps & React.RefAttributes<HTMLDivElement>>;
11
+ export interface PageBannerTitleProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
12
+ }
13
+ export declare const PageBannerTitle: React.ForwardRefExoticComponent<PageBannerTitleProps & React.RefAttributes<HTMLSpanElement>>;
14
+ export interface PageBannerDescriptionProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
15
+ }
16
+ export declare const PageBannerDescription: React.ForwardRefExoticComponent<PageBannerDescriptionProps & React.RefAttributes<HTMLSpanElement>>;
17
+ export interface PageBannerButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
18
+ }
19
+ export declare const PageBannerButton: React.ForwardRefExoticComponent<PageBannerButtonProps & React.RefAttributes<HTMLButtonElement>>;
20
+ export interface PageBannerCloseButtonProps extends PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
21
+ }
22
+ export declare const PageBannerCloseButton: React.ForwardRefExoticComponent<PageBannerCloseButtonProps & React.RefAttributes<HTMLButtonElement>>;
23
+ //# sourceMappingURL=PageBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAc,KAAK,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC/F,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,EAGL,KAAK,oBAAoB,EAC1B,MAAM,2BAA2B,CAAC;AAInC,MAAM,WAAW,mBAAoB,SAAQ,sBAAsB,EAAE,oBAAoB;CAAG;AAE5F,eAAO,MAAM,cAAc,4FAG1B,CAAC;AAEF,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;CAAG;AAE3C,eAAO,MAAM,qBAAqB,mGAGjC,CAAC;AAEF,MAAM,WAAW,oBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,eAAe,8FAG3B,CAAC;AAEF,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,qBAAqB,oGAGjC,CAAC;AAEF,MAAM,WAAW,qBACf,SAAQ,cAAc,EACpB,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,gBAAgB,iGAG5B,CAAC;AAEF,MAAM,WAAW,0BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,qBAAqB,sGAGjC,CAAC"}
@@ -0,0 +1,33 @@
1
+ 'use client';
2
+ import { pageBanner } from '@seed-design/css/recipes/page-banner';
3
+ import { Primitive } from '@seed-design/react-primitive';
4
+ import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
5
+ import { DismissibleCloseButton, DismissibleRoot } from '../private/useDismissible.js';
6
+
7
+ const { withContext, withProvider } = createSlotRecipeContext(pageBanner);
8
+ const PageBannerRoot = withProvider(
9
+ DismissibleRoot,
10
+ "root"
11
+ );
12
+ const PageBannerTextContent = withContext(
13
+ Primitive.div,
14
+ "textContent"
15
+ );
16
+ const PageBannerTitle = withContext(
17
+ Primitive.span,
18
+ "title"
19
+ );
20
+ const PageBannerDescription = withContext(
21
+ Primitive.span,
22
+ "description"
23
+ );
24
+ const PageBannerButton = withContext(
25
+ Primitive.button,
26
+ "button"
27
+ );
28
+ const PageBannerCloseButton = withContext(
29
+ DismissibleCloseButton,
30
+ "closeButton"
31
+ );
32
+
33
+ export { PageBannerButton, PageBannerCloseButton, PageBannerDescription, PageBannerRoot, PageBannerTextContent, PageBannerTitle };
@@ -0,0 +1,14 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const PageBanner = require('./PageBanner.cjs');
6
+
7
+
8
+
9
+ exports.Button = PageBanner.PageBannerButton;
10
+ exports.CloseButton = PageBanner.PageBannerCloseButton;
11
+ exports.Description = PageBanner.PageBannerDescription;
12
+ exports.Root = PageBanner.PageBannerRoot;
13
+ exports.TextContent = PageBanner.PageBannerTextContent;
14
+ exports.Title = PageBanner.PageBannerTitle;
@@ -0,0 +1,2 @@
1
+ export { PageBannerCloseButton as CloseButton, PageBannerTextContent as TextContent, PageBannerDescription as Description, PageBannerButton as Button, PageBannerRoot as Root, PageBannerTitle as Title, type PageBannerCloseButtonProps as CloseButtonProps, type PageBannerTextContentProps as TextContentProps, type PageBannerDescriptionProps as DescriptionProps, type PageBannerButtonProps as ButtonProps, type PageBannerRootProps as RootProps, type PageBannerTitleProps as TitleProps, } from './PageBanner';
2
+ //# sourceMappingURL=PageBanner.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PageBanner.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/PageBanner.namespace.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,IAAI,WAAW,EACpC,qBAAqB,IAAI,WAAW,EACpC,qBAAqB,IAAI,WAAW,EACpC,gBAAgB,IAAI,MAAM,EAC1B,cAAc,IAAI,IAAI,EACtB,eAAe,IAAI,KAAK,EACxB,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,0BAA0B,IAAI,gBAAgB,EACnD,KAAK,qBAAqB,IAAI,WAAW,EACzC,KAAK,mBAAmB,IAAI,SAAS,EACrC,KAAK,oBAAoB,IAAI,UAAU,GACxC,MAAM,cAAc,CAAC"}
@@ -0,0 +1 @@
1
+ export { PageBannerButton as Button, PageBannerCloseButton as CloseButton, PageBannerDescription as Description, PageBannerRoot as Root, PageBannerTextContent as TextContent, PageBannerTitle as Title } from './PageBanner.js';
@@ -0,0 +1,16 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const PageBanner = require('./PageBanner.cjs');
6
+ const PageBanner_namespace = require('./PageBanner.namespace.cjs');
7
+
8
+
9
+
10
+ exports.PageBannerButton = PageBanner.PageBannerButton;
11
+ exports.PageBannerCloseButton = PageBanner.PageBannerCloseButton;
12
+ exports.PageBannerDescription = PageBanner.PageBannerDescription;
13
+ exports.PageBannerRoot = PageBanner.PageBannerRoot;
14
+ exports.PageBannerTextContent = PageBanner.PageBannerTextContent;
15
+ exports.PageBannerTitle = PageBanner.PageBannerTitle;
16
+ exports.PageBanner = PageBanner_namespace;
@@ -0,0 +1,3 @@
1
+ export { PageBannerCloseButton, PageBannerTextContent, PageBannerDescription, PageBannerButton, PageBannerRoot, PageBannerTitle, type PageBannerCloseButtonProps, type PageBannerTextContentProps, type PageBannerDescriptionProps, type PageBannerButtonProps, type PageBannerRootProps, type PageBannerTitleProps, } from './PageBanner';
2
+ export * as PageBanner from './PageBanner.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/PageBanner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EACrB,qBAAqB,EACrB,qBAAqB,EACrB,gBAAgB,EAChB,cAAc,EACd,eAAe,EACf,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GAC1B,MAAM,cAAc,CAAC;AAEtB,OAAO,KAAK,UAAU,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { PageBannerButton, PageBannerCloseButton, PageBannerDescription, PageBannerRoot, PageBannerTextContent, PageBannerTitle } from './PageBanner.js';
2
+ import * as PageBanner_namespace from './PageBanner.namespace.js';
3
+ export { PageBanner_namespace as PageBanner };
@@ -53,6 +53,8 @@ const MannerTempBadge = require('./MannerTempBadge/MannerTempBadge.cjs');
53
53
  const MenuSheet = require('./MenuSheet/MenuSheet.cjs');
54
54
  const MenuSheet_namespace = require('./MenuSheet/MenuSheet.namespace.cjs');
55
55
  const NotificationBadge = require('./NotificationBadge/NotificationBadge.cjs');
56
+ const PageBanner = require('./PageBanner/PageBanner.cjs');
57
+ const PageBanner_namespace = require('./PageBanner/PageBanner.namespace.cjs');
56
58
  const reactPortal = require('@seed-design/react-portal');
57
59
  const ProgressCircle = require('./ProgressCircle/ProgressCircle.cjs');
58
60
  const ProgressCircle_namespace = require('./ProgressCircle/ProgressCircle.namespace.cjs');
@@ -230,6 +232,13 @@ exports.MenuSheetTrigger = MenuSheet.MenuSheetTrigger;
230
232
  exports.MenuSheet = MenuSheet_namespace;
231
233
  exports.NotificationBadge = NotificationBadge.NotificationBadge;
232
234
  exports.NotificationBadgePositioner = NotificationBadge.NotificationBadgePositioner;
235
+ exports.PageBannerButton = PageBanner.PageBannerButton;
236
+ exports.PageBannerCloseButton = PageBanner.PageBannerCloseButton;
237
+ exports.PageBannerDescription = PageBanner.PageBannerDescription;
238
+ exports.PageBannerRoot = PageBanner.PageBannerRoot;
239
+ exports.PageBannerTextContent = PageBanner.PageBannerTextContent;
240
+ exports.PageBannerTitle = PageBanner.PageBannerTitle;
241
+ exports.PageBanner = PageBanner_namespace;
233
242
  Object.defineProperty(exports, "Portal", {
234
243
  enumerable: true,
235
244
  get: () => reactPortal.Portal
@@ -34,6 +34,7 @@ export * from './MannerTemp';
34
34
  export * from './MannerTempBadge';
35
35
  export * from './MenuSheet';
36
36
  export * from './NotificationBadge';
37
+ export * from './PageBanner';
37
38
  export * from './Portal';
38
39
  export * from './ProgressCircle';
39
40
  export * from './PullToRefresh';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.ts"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC;AAC/B,cAAc,cAAc,CAAC;AAC7B,cAAc,eAAe,CAAC;AAC9B,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,QAAQ,CAAC;AACvB,cAAc,YAAY,CAAC;AAC3B,cAAc,WAAW,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op, MenuSheetCloseButton, MenuSheetContent, MenuSheetFoo
63
63
  import * as MenuSheet_namespace from './MenuSheet/MenuSheet.namespace.js';
64
64
  export { MenuSheet_namespace as MenuSheet };
65
65
  export { NotificationBadge, NotificationBadgePositioner } from './NotificationBadge/NotificationBadge.js';
66
+ export { PageBannerButton, PageBannerCloseButton, PageBannerDescription, PageBannerRoot, PageBannerTextContent, PageBannerTitle } from './PageBanner/PageBanner.js';
67
+ import * as PageBanner_namespace from './PageBanner/PageBanner.namespace.js';
68
+ export { PageBanner_namespace as PageBanner };
66
69
  export { Portal } from '@seed-design/react-portal';
67
70
  export { ProgressCircleRange, ProgressCircleRoot, ProgressCircleTrack } from './ProgressCircle/ProgressCircle.js';
68
71
  import * as ProgressCircle_namespace from './ProgressCircle/ProgressCircle.namespace.js';
package/lib/index.cjs CHANGED
@@ -53,6 +53,8 @@ const MannerTempBadge = require('./components/MannerTempBadge/MannerTempBadge.cj
53
53
  const MenuSheet = require('./components/MenuSheet/MenuSheet.cjs');
54
54
  const MenuSheet_namespace = require('./components/MenuSheet/MenuSheet.namespace.cjs');
55
55
  const NotificationBadge = require('./components/NotificationBadge/NotificationBadge.cjs');
56
+ const PageBanner = require('./components/PageBanner/PageBanner.cjs');
57
+ const PageBanner_namespace = require('./components/PageBanner/PageBanner.namespace.cjs');
56
58
  const reactPortal = require('@seed-design/react-portal');
57
59
  const ProgressCircle = require('./components/ProgressCircle/ProgressCircle.cjs');
58
60
  const ProgressCircle_namespace = require('./components/ProgressCircle/ProgressCircle.namespace.cjs');
@@ -230,6 +232,13 @@ exports.MenuSheetTrigger = MenuSheet.MenuSheetTrigger;
230
232
  exports.MenuSheet = MenuSheet_namespace;
231
233
  exports.NotificationBadge = NotificationBadge.NotificationBadge;
232
234
  exports.NotificationBadgePositioner = NotificationBadge.NotificationBadgePositioner;
235
+ exports.PageBannerButton = PageBanner.PageBannerButton;
236
+ exports.PageBannerCloseButton = PageBanner.PageBannerCloseButton;
237
+ exports.PageBannerDescription = PageBanner.PageBannerDescription;
238
+ exports.PageBannerRoot = PageBanner.PageBannerRoot;
239
+ exports.PageBannerTextContent = PageBanner.PageBannerTextContent;
240
+ exports.PageBannerTitle = PageBanner.PageBannerTitle;
241
+ exports.PageBanner = PageBanner_namespace;
233
242
  Object.defineProperty(exports, "Portal", {
234
243
  enumerable: true,
235
244
  get: () => reactPortal.Portal
package/lib/index.js CHANGED
@@ -63,6 +63,9 @@ export { MenuSheetBackdrop, MenuSheetCloseButton, MenuSheetContent, MenuSheetFoo
63
63
  import * as MenuSheet_namespace from './components/MenuSheet/MenuSheet.namespace.js';
64
64
  export { MenuSheet_namespace as MenuSheet };
65
65
  export { NotificationBadge, NotificationBadgePositioner } from './components/NotificationBadge/NotificationBadge.js';
66
+ export { PageBannerButton, PageBannerCloseButton, PageBannerDescription, PageBannerRoot, PageBannerTextContent, PageBannerTitle } from './components/PageBanner/PageBanner.js';
67
+ import * as PageBanner_namespace from './components/PageBanner/PageBanner.namespace.js';
68
+ export { PageBanner_namespace as PageBanner };
66
69
  export { Portal } from '@seed-design/react-portal';
67
70
  export { ProgressCircleRange, ProgressCircleRoot, ProgressCircleTrack } from './components/ProgressCircle/ProgressCircle.js';
68
71
  import * as ProgressCircle_namespace from './components/ProgressCircle/ProgressCircle.namespace.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-design/react",
3
- "version": "0.1.13",
3
+ "version": "0.1.14",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
@@ -58,12 +58,12 @@
58
58
  "clsx": "^2.1.1"
59
59
  },
60
60
  "peerDependencies": {
61
- "@seed-design/css": "0.1.13",
61
+ "@seed-design/css": "0.1.14",
62
62
  "react": ">=18.0.0",
63
63
  "react-dom": ">=18.0.0"
64
64
  },
65
65
  "devDependencies": {
66
- "@seed-design/css": "0.1.13",
66
+ "@seed-design/css": "0.1.14",
67
67
  "@vitejs/plugin-react": "^5.0.0",
68
68
  "ajv": "^8.17.1",
69
69
  "globby": "^14.1.0",
@@ -1,9 +1,8 @@
1
1
  import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
2
2
  import { badge, type BadgeVariantProps } from "@seed-design/css/recipes/badge";
3
3
  import type * as React from "react";
4
- import { createRecipeContext } from "../../utils/createRecipeContext";
5
-
6
- const { withContext } = createRecipeContext(badge);
4
+ import { forwardRef } from "react";
5
+ import clsx from "clsx";
7
6
 
8
7
  ////////////////////////////////////////////////////////////////////////////////////
9
8
 
@@ -12,4 +11,16 @@ export interface BadgeProps
12
11
  PrimitiveProps,
13
12
  React.HTMLAttributes<HTMLSpanElement> {}
14
13
 
15
- export const Badge = withContext<HTMLSpanElement, BadgeProps>(Primitive.span);
14
+ export const Badge = forwardRef<HTMLSpanElement, BadgeProps>(
15
+ ({ className, children, ...props }, ref) => {
16
+ const [variantProps, restProps] = badge.splitVariantProps(props);
17
+ const { root, label } = badge(variantProps);
18
+
19
+ return (
20
+ <Primitive.span className={clsx(root, className)} {...restProps} ref={ref}>
21
+ <Primitive.span className={label}>{children}</Primitive.span>
22
+ </Primitive.span>
23
+ );
24
+ },
25
+ );
26
+ Badge.displayName = "Badge";
@@ -14,53 +14,89 @@ import {
14
14
 
15
15
  const { withContext, withProvider } = createSlotRecipeContext(inlineBanner);
16
16
 
17
+ /**
18
+ * @deprecated Use `PageBanner` instead.
19
+ */
17
20
  export interface InlineBannerRootProps extends InlineBannerVariantProps, DismissibleRootProps {}
18
21
 
22
+ /**
23
+ * @deprecated Use `PageBanner` instead.
24
+ */
19
25
  export const InlineBannerRoot = withProvider<HTMLDivElement, InlineBannerRootProps>(
20
26
  DismissibleRoot,
21
27
  "root",
22
28
  );
23
29
 
30
+ /**
31
+ * @deprecated Use `PageBanner` instead.
32
+ */
24
33
  export interface InlineBannerContentProps
25
34
  extends PrimitiveProps,
26
35
  React.HTMLAttributes<HTMLDivElement> {}
27
36
 
37
+ /**
38
+ * @deprecated Use `PageBanner` instead.
39
+ */
28
40
  export const InlineBannerContent = withContext<HTMLDivElement, InlineBannerContentProps>(
29
41
  Primitive.div,
30
42
  "content",
31
43
  );
32
44
 
45
+ /**
46
+ * @deprecated Use `PageBanner` instead.
47
+ */
33
48
  export interface InlineBannerTitleProps
34
49
  extends PrimitiveProps,
35
50
  React.HTMLAttributes<HTMLSpanElement> {}
36
51
 
52
+ /**
53
+ * @deprecated Use `PageBanner` instead.
54
+ */
37
55
  export const InlineBannerTitle = withContext<HTMLSpanElement, InlineBannerTitleProps>(
38
56
  Primitive.span,
39
57
  "title",
40
58
  );
41
59
 
60
+ /**
61
+ * @deprecated Use `PageBanner` instead.
62
+ */
42
63
  export interface InlineBannerDescriptionProps
43
64
  extends PrimitiveProps,
44
65
  React.HTMLAttributes<HTMLSpanElement> {}
45
66
 
67
+ /**
68
+ * @deprecated Use `PageBanner` instead.
69
+ */
46
70
  export const InlineBannerDescription = withContext<HTMLSpanElement, InlineBannerDescriptionProps>(
47
71
  Primitive.span,
48
72
  "description",
49
73
  );
50
74
 
75
+ /**
76
+ * @deprecated Use `PageBanner` instead.
77
+ */
51
78
  export interface InlineBannerLinkProps
52
79
  extends PrimitiveProps,
53
80
  React.ButtonHTMLAttributes<HTMLButtonElement> {}
54
81
 
82
+ /**
83
+ * @deprecated Use `PageBanner` instead.
84
+ */
55
85
  export const InlineBannerLink = withContext<HTMLButtonElement, InlineBannerLinkProps>(
56
86
  Primitive.button,
57
87
  "link",
58
88
  );
59
89
 
90
+ /**
91
+ * @deprecated Use `PageBanner` instead.
92
+ */
60
93
  export interface InlineBannerCloseButtonProps
61
94
  extends PrimitiveProps,
62
95
  React.ButtonHTMLAttributes<HTMLButtonElement> {}
63
96
 
97
+ /**
98
+ * @deprecated Use `PageBanner` instead.
99
+ */
64
100
  export const InlineBannerCloseButton = withContext<HTMLButtonElement, InlineBannerCloseButtonProps>(
65
101
  DismissibleCloseButton,
66
102
  "closeButton",
@@ -0,0 +1,14 @@
1
+ export {
2
+ PageBannerCloseButton as CloseButton,
3
+ PageBannerTextContent as TextContent,
4
+ PageBannerDescription as Description,
5
+ PageBannerButton as Button,
6
+ PageBannerRoot as Root,
7
+ PageBannerTitle as Title,
8
+ type PageBannerCloseButtonProps as CloseButtonProps,
9
+ type PageBannerTextContentProps as TextContentProps,
10
+ type PageBannerDescriptionProps as DescriptionProps,
11
+ type PageBannerButtonProps as ButtonProps,
12
+ type PageBannerRootProps as RootProps,
13
+ type PageBannerTitleProps as TitleProps,
14
+ } from "./PageBanner";
@@ -0,0 +1,64 @@
1
+ import type * as React from "react";
2
+
3
+ import { pageBanner, type PageBannerVariantProps } from "@seed-design/css/recipes/page-banner";
4
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
5
+ import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
6
+ import {
7
+ DismissibleCloseButton,
8
+ DismissibleRoot,
9
+ type DismissibleRootProps,
10
+ } from "../private/useDismissible";
11
+
12
+ const { withContext, withProvider } = createSlotRecipeContext(pageBanner);
13
+
14
+ export interface PageBannerRootProps extends PageBannerVariantProps, DismissibleRootProps {}
15
+
16
+ export const PageBannerRoot = withProvider<HTMLDivElement, PageBannerRootProps>(
17
+ DismissibleRoot,
18
+ "root",
19
+ );
20
+
21
+ export interface PageBannerTextContentProps
22
+ extends PrimitiveProps,
23
+ React.HTMLAttributes<HTMLDivElement> {}
24
+
25
+ export const PageBannerTextContent = withContext<HTMLDivElement, PageBannerTextContentProps>(
26
+ Primitive.div,
27
+ "textContent",
28
+ );
29
+
30
+ export interface PageBannerTitleProps
31
+ extends PrimitiveProps,
32
+ React.HTMLAttributes<HTMLSpanElement> {}
33
+
34
+ export const PageBannerTitle = withContext<HTMLSpanElement, PageBannerTitleProps>(
35
+ Primitive.span,
36
+ "title",
37
+ );
38
+
39
+ export interface PageBannerDescriptionProps
40
+ extends PrimitiveProps,
41
+ React.HTMLAttributes<HTMLSpanElement> {}
42
+
43
+ export const PageBannerDescription = withContext<HTMLSpanElement, PageBannerDescriptionProps>(
44
+ Primitive.span,
45
+ "description",
46
+ );
47
+
48
+ export interface PageBannerButtonProps
49
+ extends PrimitiveProps,
50
+ React.ButtonHTMLAttributes<HTMLButtonElement> {}
51
+
52
+ export const PageBannerButton = withContext<HTMLButtonElement, PageBannerButtonProps>(
53
+ Primitive.button,
54
+ "button",
55
+ );
56
+
57
+ export interface PageBannerCloseButtonProps
58
+ extends PrimitiveProps,
59
+ React.ButtonHTMLAttributes<HTMLButtonElement> {}
60
+
61
+ export const PageBannerCloseButton = withContext<HTMLButtonElement, PageBannerCloseButtonProps>(
62
+ DismissibleCloseButton,
63
+ "closeButton",
64
+ );
@@ -0,0 +1,16 @@
1
+ export {
2
+ PageBannerCloseButton,
3
+ PageBannerTextContent,
4
+ PageBannerDescription,
5
+ PageBannerButton,
6
+ PageBannerRoot,
7
+ PageBannerTitle,
8
+ type PageBannerCloseButtonProps,
9
+ type PageBannerTextContentProps,
10
+ type PageBannerDescriptionProps,
11
+ type PageBannerButtonProps,
12
+ type PageBannerRootProps,
13
+ type PageBannerTitleProps,
14
+ } from "./PageBanner";
15
+
16
+ export * as PageBanner from "./PageBanner.namespace";
@@ -34,6 +34,7 @@ export * from "./MannerTemp";
34
34
  export * from "./MannerTempBadge";
35
35
  export * from "./MenuSheet";
36
36
  export * from "./NotificationBadge";
37
+ export * from "./PageBanner";
37
38
  export * from "./Portal";
38
39
  export * from "./ProgressCircle";
39
40
  export * from "./PullToRefresh";