@seed-design/react 0.0.29 → 0.0.30

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 (54) hide show
  1. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.cjs +54 -0
  2. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts +8 -0
  3. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.d.ts.map +1 -0
  4. package/lib/components/ContextualFloatingButton/ContextualFloatingButton.js +31 -0
  5. package/lib/components/ContextualFloatingButton/index.cjs +9 -0
  6. package/lib/components/ContextualFloatingButton/index.d.ts +2 -0
  7. package/lib/components/ContextualFloatingButton/index.d.ts.map +1 -0
  8. package/lib/components/ContextualFloatingButton/index.js +1 -0
  9. package/lib/components/ExtendedFab/ExtendedFab.d.ts +6 -0
  10. package/lib/components/ExtendedFab/ExtendedFab.d.ts.map +1 -1
  11. package/lib/components/Fab/Fab.d.ts +6 -0
  12. package/lib/components/Fab/Fab.d.ts.map +1 -1
  13. package/lib/components/Float/Float.cjs +97 -0
  14. package/lib/components/Float/Float.d.ts +17 -0
  15. package/lib/components/Float/Float.d.ts.map +1 -0
  16. package/lib/components/Float/Float.js +74 -0
  17. package/lib/components/Float/index.cjs +9 -0
  18. package/lib/components/Float/index.d.ts +2 -0
  19. package/lib/components/Float/index.d.ts.map +1 -0
  20. package/lib/components/Float/index.js +1 -0
  21. package/lib/components/FloatingActionButton/FloatingActionButton.cjs +18 -0
  22. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts +14 -0
  23. package/lib/components/FloatingActionButton/FloatingActionButton.d.ts.map +1 -0
  24. package/lib/components/FloatingActionButton/FloatingActionButton.js +12 -0
  25. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.cjs +11 -0
  26. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts +2 -0
  27. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.d.ts.map +1 -0
  28. package/lib/components/FloatingActionButton/FloatingActionButton.namespace.js +1 -0
  29. package/lib/components/FloatingActionButton/index.cjs +13 -0
  30. package/lib/components/FloatingActionButton/index.d.ts +3 -0
  31. package/lib/components/FloatingActionButton/index.d.ts.map +1 -0
  32. package/lib/components/FloatingActionButton/index.js +3 -0
  33. package/lib/components/index.cjs +10 -0
  34. package/lib/components/index.d.ts +3 -0
  35. package/lib/components/index.d.ts.map +1 -1
  36. package/lib/components/index.js +5 -0
  37. package/lib/index.cjs +10 -0
  38. package/lib/index.js +5 -0
  39. package/lib/utils/styled.cjs +4 -0
  40. package/lib/utils/styled.d.ts +3 -1
  41. package/lib/utils/styled.d.ts.map +1 -1
  42. package/lib/utils/styled.js +4 -0
  43. package/package.json +5 -5
  44. package/src/components/ContextualFloatingButton/ContextualFloatingButton.tsx +49 -0
  45. package/src/components/ContextualFloatingButton/index.ts +4 -0
  46. package/src/components/ExtendedFab/ExtendedFab.tsx +6 -0
  47. package/src/components/Fab/Fab.tsx +6 -0
  48. package/src/components/Float/Float.tsx +116 -0
  49. package/src/components/Float/index.ts +1 -0
  50. package/src/components/FloatingActionButton/FloatingActionButton.namespace.tsx +8 -0
  51. package/src/components/FloatingActionButton/FloatingActionButton.tsx +38 -0
  52. package/src/components/FloatingActionButton/index.ts +10 -0
  53. package/src/components/index.ts +3 -0
  54. package/src/utils/styled.tsx +10 -1
@@ -0,0 +1,54 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const jsxRuntime = require('react/jsx-runtime');
7
+ const contextualFloatingButton = require('@seed-design/css/recipes/contextual-floating-button');
8
+ const reactPrimitive = require('@seed-design/react-primitive');
9
+ const clsx = require('clsx');
10
+ const React = require('react');
11
+ const Icon = require('../Icon/Icon.cjs');
12
+ const usePendingButton = require('../LoadingIndicator/usePendingButton.cjs');
13
+
14
+ function _interopNamespaceDefault(e) {
15
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
16
+ if (e) {
17
+ for (const k in e) {
18
+ if (k !== 'default') {
19
+ const d = Object.getOwnPropertyDescriptor(e, k);
20
+ Object.defineProperty(n, k, d.get ? d : {
21
+ enumerable: true,
22
+ get: () => e[k]
23
+ });
24
+ }
25
+ }
26
+ }
27
+ n.default = e;
28
+ return Object.freeze(n);
29
+ }
30
+
31
+ const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
32
+
33
+ const ContextualFloatingButton = React__namespace.forwardRef(({ variant, loading = false, layout = "withText", className, children, ...otherProps }, ref) => {
34
+ const recipeClassName = contextualFloatingButton.contextualFloatingButton({ variant, layout });
35
+ const api = usePendingButton.usePendingButton({ loading, disabled: otherProps.disabled });
36
+ if (layout === "iconOnly" && !(otherProps["aria-label"] || otherProps["aria-labelledby"])) {
37
+ console.warn(
38
+ "When layout is 'iconOnly', 'aria-label' or 'aria-labelledby' should be provided."
39
+ );
40
+ }
41
+ return /* @__PURE__ */ jsxRuntime.jsx(usePendingButton.PendingButtonProvider, { value: api, children: /* @__PURE__ */ jsxRuntime.jsx(Icon.IconRequired, { enabled: layout === "iconOnly", children: /* @__PURE__ */ jsxRuntime.jsx(
42
+ reactPrimitive.Primitive.button,
43
+ {
44
+ ref,
45
+ className: clsx(recipeClassName, className),
46
+ ...api.stateProps,
47
+ ...otherProps,
48
+ children
49
+ }
50
+ ) }) });
51
+ });
52
+ ContextualFloatingButton.displayName = "ContextualFloatingButton";
53
+
54
+ exports.ContextualFloatingButton = ContextualFloatingButton;
@@ -0,0 +1,8 @@
1
+ import { ContextualFloatingButtonVariantProps } from '@seed-design/css/recipes/contextual-floating-button';
2
+ import { PrimitiveProps } from '@seed-design/react-primitive';
3
+ import { UsePendingButtonProps } from '../LoadingIndicator/usePendingButton';
4
+ import * as React from "react";
5
+ export interface ContextualFloatingButtonProps extends ContextualFloatingButtonVariantProps, UsePendingButtonProps, PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ }
7
+ export declare const ContextualFloatingButton: React.ForwardRefExoticComponent<ContextualFloatingButtonProps & React.RefAttributes<HTMLButtonElement>>;
8
+ //# sourceMappingURL=ContextualFloatingButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ContextualFloatingButton.d.ts","sourceRoot":"","sources":["../../../src/components/ContextualFloatingButton/ContextualFloatingButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,oCAAoC,EAC1C,MAAM,qDAAqD,CAAC;AAC7D,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9E,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAGL,KAAK,qBAAqB,EAC3B,MAAM,sCAAsC,CAAC;AAE9C,MAAM,WAAW,6BACf,SAAQ,oCAAoC,EAC1C,qBAAqB,EACrB,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,wBAAwB,yGA2BnC,CAAC"}
@@ -0,0 +1,31 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import { contextualFloatingButton } from '@seed-design/css/recipes/contextual-floating-button';
4
+ import { Primitive } from '@seed-design/react-primitive';
5
+ import clsx from 'clsx';
6
+ import * as React from 'react';
7
+ import { IconRequired } from '../Icon/Icon.js';
8
+ import { usePendingButton, PendingButtonProvider } from '../LoadingIndicator/usePendingButton.js';
9
+
10
+ const ContextualFloatingButton = React.forwardRef(({ variant, loading = false, layout = "withText", className, children, ...otherProps }, ref) => {
11
+ const recipeClassName = contextualFloatingButton({ variant, layout });
12
+ const api = usePendingButton({ loading, disabled: otherProps.disabled });
13
+ if (layout === "iconOnly" && !(otherProps["aria-label"] || otherProps["aria-labelledby"])) {
14
+ console.warn(
15
+ "When layout is 'iconOnly', 'aria-label' or 'aria-labelledby' should be provided."
16
+ );
17
+ }
18
+ return /* @__PURE__ */ jsx(PendingButtonProvider, { value: api, children: /* @__PURE__ */ jsx(IconRequired, { enabled: layout === "iconOnly", children: /* @__PURE__ */ jsx(
19
+ Primitive.button,
20
+ {
21
+ ref,
22
+ className: clsx(recipeClassName, className),
23
+ ...api.stateProps,
24
+ ...otherProps,
25
+ children
26
+ }
27
+ ) }) });
28
+ });
29
+ ContextualFloatingButton.displayName = "ContextualFloatingButton";
30
+
31
+ export { ContextualFloatingButton };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const ContextualFloatingButton = require('./ContextualFloatingButton.cjs');
6
+
7
+
8
+
9
+ exports.ContextualFloatingButton = ContextualFloatingButton.ContextualFloatingButton;
@@ -0,0 +1,2 @@
1
+ export { ContextualFloatingButton, type ContextualFloatingButtonProps, } from './ContextualFloatingButton';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/ContextualFloatingButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,6BAA6B,GACnC,MAAM,4BAA4B,CAAC"}
@@ -0,0 +1 @@
1
+ export { ContextualFloatingButton } from './ContextualFloatingButton.js';
@@ -1,7 +1,13 @@
1
1
  import { PrimitiveProps } from '@seed-design/react-primitive';
2
2
  import { ExtendedFabVariantProps } from '@seed-design/css/recipes/extended-fab';
3
3
  import { ForwardRefExoticComponent, RefAttributes } from 'react';
4
+ /**
5
+ * @deprecated Use `ContextualFloatingButton` instead.
6
+ */
4
7
  export interface ExtendedFabProps extends ExtendedFabVariantProps, PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
5
8
  }
9
+ /**
10
+ * @deprecated Use `ContextualFloatingButton` instead.
11
+ */
6
12
  export declare const ExtendedFab: ForwardRefExoticComponent<ExtendedFabProps & RefAttributes<HTMLButtonElement>>;
7
13
  //# sourceMappingURL=ExtendedFab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ExtendedFab.d.ts","sourceRoot":"","sources":["../../../src/components/ExtendedFab/ExtendedFab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAOlG,MAAM,WAAW,gBACf,SAAQ,uBAAuB,EAC7B,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,WAAW,gHAKtB,CAAC"}
1
+ {"version":3,"file":"ExtendedFab.d.ts","sourceRoot":"","sources":["../../../src/components/ExtendedFab/ExtendedFab.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAe,KAAK,uBAAuB,EAAE,MAAM,uCAAuC,CAAC;AAOlG;;GAEG;AACH,MAAM,WAAW,gBACf,SAAQ,uBAAuB,EAC7B,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD;;GAEG;AACH,eAAO,MAAM,WAAW,gHAKtB,CAAC"}
@@ -1,7 +1,13 @@
1
1
  import { PrimitiveProps } from '@seed-design/react-primitive';
2
2
  import { FabVariantProps } from '@seed-design/css/recipes/fab';
3
3
  import type * as React from "react";
4
+ /**
5
+ * @deprecated Use `ContextualFloatingButton` instead.
6
+ */
4
7
  export interface FabProps extends FabVariantProps, PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
5
8
  }
9
+ /**
10
+ * @deprecated Use `ContextualFloatingButton` instead.
11
+ */
6
12
  export declare const Fab: React.ForwardRefExoticComponent<FabProps & React.RefAttributes<HTMLButtonElement>>;
7
13
  //# sourceMappingURL=Fab.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/components/Fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAO,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC,MAAM,WAAW,QACf,SAAQ,eAAe,EACrB,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,GAAG,oFAA6D,CAAC"}
1
+ {"version":3,"file":"Fab.d.ts","sourceRoot":"","sources":["../../../src/components/Fab/Fab.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,EAAO,KAAK,eAAe,EAAE,MAAM,8BAA8B,CAAC;AACzE,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAOpC;;GAEG;AACH,MAAM,WAAW,QACf,SAAQ,eAAe,EACrB,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD;;GAEG;AACH,eAAO,MAAM,GAAG,oFAA6D,CAAC"}
@@ -0,0 +1,97 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const jsxRuntime = require('react/jsx-runtime');
7
+ const React = require('react');
8
+ const Box = require('../Box/Box.cjs');
9
+ const styled = require('../../utils/styled.cjs');
10
+
11
+ function _interopNamespaceDefault(e) {
12
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: 'Module' } });
13
+ if (e) {
14
+ for (const k in e) {
15
+ if (k !== 'default') {
16
+ const d = Object.getOwnPropertyDescriptor(e, k);
17
+ Object.defineProperty(n, k, d.get ? d : {
18
+ enumerable: true,
19
+ get: () => e[k]
20
+ });
21
+ }
22
+ }
23
+ }
24
+ n.default = e;
25
+ return Object.freeze(n);
26
+ }
27
+
28
+ const React__namespace = /*#__PURE__*/_interopNamespaceDefault(React);
29
+
30
+ function getPlacementStyle(placement, offsetX, offsetY) {
31
+ const offsetXValue = styled.handleDimension(offsetX);
32
+ const offsetYValue = styled.handleDimension(offsetY);
33
+ const centerLeft = offsetXValue ? `calc(50% + ${offsetXValue})` : "50%";
34
+ const middleTop = offsetYValue ? `calc(50% + ${offsetYValue})` : "50%";
35
+ const shiftLeft = "translateX(-50%)";
36
+ const shiftTop = "translateY(-50%)";
37
+ const shiftBoth = "translate(-50%, -50%)";
38
+ switch (placement) {
39
+ case "top-start":
40
+ return {
41
+ top: offsetYValue ?? 0,
42
+ left: offsetXValue ?? 0
43
+ };
44
+ case "top-center":
45
+ return {
46
+ top: offsetYValue ?? 0,
47
+ left: centerLeft,
48
+ unstable_transform: shiftLeft
49
+ };
50
+ case "top-end":
51
+ return {
52
+ top: offsetYValue ?? 0,
53
+ right: offsetXValue ?? 0
54
+ };
55
+ case "middle-start":
56
+ return {
57
+ top: middleTop,
58
+ left: offsetXValue ?? 0,
59
+ unstable_transform: shiftTop
60
+ };
61
+ case "middle-center":
62
+ return {
63
+ top: middleTop,
64
+ left: centerLeft,
65
+ unstable_transform: shiftBoth
66
+ };
67
+ case "middle-end":
68
+ return {
69
+ top: middleTop,
70
+ right: offsetXValue ?? 0,
71
+ unstable_transform: shiftTop
72
+ };
73
+ case "bottom-start":
74
+ return {
75
+ bottom: offsetYValue ?? 0,
76
+ left: offsetXValue ?? 0
77
+ };
78
+ case "bottom-center":
79
+ return {
80
+ bottom: offsetYValue ?? 0,
81
+ left: centerLeft,
82
+ unstable_transform: shiftLeft
83
+ };
84
+ case "bottom-end":
85
+ return {
86
+ bottom: offsetYValue ?? 0,
87
+ right: offsetXValue ?? 0
88
+ };
89
+ }
90
+ }
91
+ const Float = React__namespace.forwardRef((props, ref) => {
92
+ const { as, placement, offsetX, offsetY, zIndex, ...rest } = props;
93
+ const placementStyle = getPlacementStyle(placement, offsetX, offsetY);
94
+ return /* @__PURE__ */ jsxRuntime.jsx(Box.Box, { ref, as, position: "absolute", zIndex, ...placementStyle, ...rest });
95
+ });
96
+
97
+ exports.Float = Float;
@@ -0,0 +1,17 @@
1
+ import { Dimension } from '@seed-design/css/vars';
2
+ import * as React from "react";
3
+ export interface FloatProps extends React.HTMLAttributes<HTMLDivElement> {
4
+ as?: React.ElementType;
5
+ placement: "bottom-end" | "bottom-start" | "top-end" | "top-start" | "bottom-center" | "top-center" | "middle-center" | "middle-end" | "middle-start";
6
+ /**
7
+ * @default 0
8
+ */
9
+ offsetX?: 0 | Dimension | (string & {});
10
+ /**
11
+ * @default 0
12
+ */
13
+ offsetY?: 0 | Dimension | (string & {});
14
+ zIndex?: number | (string & {});
15
+ }
16
+ export declare const Float: React.ForwardRefExoticComponent<FloatProps & React.RefAttributes<HTMLDivElement>>;
17
+ //# sourceMappingURL=Float.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Float.d.ts","sourceRoot":"","sources":["../../../src/components/Float/Float.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,MAAM,WAAW,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,cAAc,CAAC;IACtE,EAAE,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC;IAEvB,SAAS,EACL,YAAY,GACZ,cAAc,GACd,SAAS,GACT,WAAW,GACX,eAAe,GACf,YAAY,GACZ,eAAe,GACf,YAAY,GACZ,cAAc,CAAC;IAEnB;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAExC;;OAEG;IACH,OAAO,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAExC,MAAM,CAAC,EAAE,MAAM,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;CACjC;AA6ED,eAAO,MAAM,KAAK,mFAQhB,CAAC"}
@@ -0,0 +1,74 @@
1
+ 'use client';
2
+ import { jsx } from 'react/jsx-runtime';
3
+ import * as React from 'react';
4
+ import { Box } from '../Box/Box.js';
5
+ import { handleDimension } from '../../utils/styled.js';
6
+
7
+ function getPlacementStyle(placement, offsetX, offsetY) {
8
+ const offsetXValue = handleDimension(offsetX);
9
+ const offsetYValue = handleDimension(offsetY);
10
+ const centerLeft = offsetXValue ? `calc(50% + ${offsetXValue})` : "50%";
11
+ const middleTop = offsetYValue ? `calc(50% + ${offsetYValue})` : "50%";
12
+ const shiftLeft = "translateX(-50%)";
13
+ const shiftTop = "translateY(-50%)";
14
+ const shiftBoth = "translate(-50%, -50%)";
15
+ switch (placement) {
16
+ case "top-start":
17
+ return {
18
+ top: offsetYValue ?? 0,
19
+ left: offsetXValue ?? 0
20
+ };
21
+ case "top-center":
22
+ return {
23
+ top: offsetYValue ?? 0,
24
+ left: centerLeft,
25
+ unstable_transform: shiftLeft
26
+ };
27
+ case "top-end":
28
+ return {
29
+ top: offsetYValue ?? 0,
30
+ right: offsetXValue ?? 0
31
+ };
32
+ case "middle-start":
33
+ return {
34
+ top: middleTop,
35
+ left: offsetXValue ?? 0,
36
+ unstable_transform: shiftTop
37
+ };
38
+ case "middle-center":
39
+ return {
40
+ top: middleTop,
41
+ left: centerLeft,
42
+ unstable_transform: shiftBoth
43
+ };
44
+ case "middle-end":
45
+ return {
46
+ top: middleTop,
47
+ right: offsetXValue ?? 0,
48
+ unstable_transform: shiftTop
49
+ };
50
+ case "bottom-start":
51
+ return {
52
+ bottom: offsetYValue ?? 0,
53
+ left: offsetXValue ?? 0
54
+ };
55
+ case "bottom-center":
56
+ return {
57
+ bottom: offsetYValue ?? 0,
58
+ left: centerLeft,
59
+ unstable_transform: shiftLeft
60
+ };
61
+ case "bottom-end":
62
+ return {
63
+ bottom: offsetYValue ?? 0,
64
+ right: offsetXValue ?? 0
65
+ };
66
+ }
67
+ }
68
+ const Float = React.forwardRef((props, ref) => {
69
+ const { as, placement, offsetX, offsetY, zIndex, ...rest } = props;
70
+ const placementStyle = getPlacementStyle(placement, offsetX, offsetY);
71
+ return /* @__PURE__ */ jsx(Box, { ref, as, position: "absolute", zIndex, ...placementStyle, ...rest });
72
+ });
73
+
74
+ export { Float };
@@ -0,0 +1,9 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const Float = require('./Float.cjs');
6
+
7
+
8
+
9
+ exports.Float = Float.Float;
@@ -0,0 +1,2 @@
1
+ export { Float, type FloatProps } from './Float';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Float/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,KAAK,UAAU,EAAE,MAAM,SAAS,CAAC"}
@@ -0,0 +1 @@
1
+ export { Float } from './Float.js';
@@ -0,0 +1,18 @@
1
+ 'use client';
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
5
+
6
+ const floatingActionButton = require('@seed-design/css/recipes/floating-action-button');
7
+ const reactPrimitive = require('@seed-design/react-primitive');
8
+ const createSlotRecipeContext = require('../../utils/createSlotRecipeContext.cjs');
9
+ const Icon = require('../private/Icon.cjs');
10
+
11
+ const { withProvider, withContext } = createSlotRecipeContext.createSlotRecipeContext(floatingActionButton.floatingActionButton);
12
+ const FloatingActionButtonRoot = withProvider(reactPrimitive.Primitive.button, "root");
13
+ const FloatingActionButtonIcon = withContext(Icon.InternalIcon, "icon");
14
+ const FloatingActionButtonLabel = withContext(reactPrimitive.Primitive.span, "label");
15
+
16
+ exports.FloatingActionButtonIcon = FloatingActionButtonIcon;
17
+ exports.FloatingActionButtonLabel = FloatingActionButtonLabel;
18
+ exports.FloatingActionButtonRoot = FloatingActionButtonRoot;
@@ -0,0 +1,14 @@
1
+ import { FloatingActionButtonVariantProps } from '@seed-design/css/recipes/floating-action-button';
2
+ import { PrimitiveProps } from '@seed-design/react-primitive';
3
+ import { InternalIconProps } from '../private/Icon';
4
+ import type * as React from "react";
5
+ export interface FloatingActionButtonRootProps extends FloatingActionButtonVariantProps, PrimitiveProps, React.ButtonHTMLAttributes<HTMLButtonElement> {
6
+ }
7
+ export declare const FloatingActionButtonRoot: React.ForwardRefExoticComponent<FloatingActionButtonRootProps & React.RefAttributes<HTMLButtonElement>>;
8
+ export interface FloatingActionButtonIconProps extends InternalIconProps {
9
+ }
10
+ export declare const FloatingActionButtonIcon: React.ForwardRefExoticComponent<FloatingActionButtonIconProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export interface FloatingActionButtonLabelProps extends PrimitiveProps, React.HTMLAttributes<HTMLSpanElement> {
12
+ }
13
+ export declare const FloatingActionButtonLabel: React.ForwardRefExoticComponent<FloatingActionButtonLabelProps & React.RefAttributes<HTMLSpanElement>>;
14
+ //# sourceMappingURL=FloatingActionButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingActionButton.d.ts","sourceRoot":"","sources":["../../../src/components/FloatingActionButton/FloatingActionButton.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,gCAAgC,EACtC,MAAM,iDAAiD,CAAC;AACzD,OAAO,EAAa,KAAK,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9E,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAgB,KAAK,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAMvE,MAAM,WAAW,6BACf,SAAQ,gCAAgC,EACtC,cAAc,EACd,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC;CAAG;AAEpD,eAAO,MAAM,wBAAwB,yGAGV,CAAC;AAE5B,MAAM,WAAW,6BAA8B,SAAQ,iBAAiB;CAAG;AAE3E,eAAO,MAAM,wBAAwB,yGAGd,CAAC;AAExB,MAAM,WAAW,8BACf,SAAQ,cAAc,EACpB,KAAK,CAAC,cAAc,CAAC,eAAe,CAAC;CAAG;AAE5C,eAAO,MAAM,yBAAyB,wGAGZ,CAAC"}
@@ -0,0 +1,12 @@
1
+ 'use client';
2
+ import { floatingActionButton } from '@seed-design/css/recipes/floating-action-button';
3
+ import { Primitive } from '@seed-design/react-primitive';
4
+ import { createSlotRecipeContext } from '../../utils/createSlotRecipeContext.js';
5
+ import { InternalIcon } from '../private/Icon.js';
6
+
7
+ const { withProvider, withContext } = createSlotRecipeContext(floatingActionButton);
8
+ const FloatingActionButtonRoot = withProvider(Primitive.button, "root");
9
+ const FloatingActionButtonIcon = withContext(InternalIcon, "icon");
10
+ const FloatingActionButtonLabel = withContext(Primitive.span, "label");
11
+
12
+ export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot };
@@ -0,0 +1,11 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const FloatingActionButton = require('./FloatingActionButton.cjs');
6
+
7
+
8
+
9
+ exports.Icon = FloatingActionButton.FloatingActionButtonIcon;
10
+ exports.Label = FloatingActionButton.FloatingActionButtonLabel;
11
+ exports.Root = FloatingActionButton.FloatingActionButtonRoot;
@@ -0,0 +1,2 @@
1
+ export { FloatingActionButtonIcon as Icon, FloatingActionButtonLabel as Label, FloatingActionButtonRoot as Root, type FloatingActionButtonIconProps as IconProps, type FloatingActionButtonLabelProps as LabelProps, type FloatingActionButtonRootProps as RootProps, } from './FloatingActionButton';
2
+ //# sourceMappingURL=FloatingActionButton.namespace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingActionButton.namespace.d.ts","sourceRoot":"","sources":["../../../src/components/FloatingActionButton/FloatingActionButton.namespace.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,IAAI,IAAI,EAChC,yBAAyB,IAAI,KAAK,EAClC,wBAAwB,IAAI,IAAI,EAChC,KAAK,6BAA6B,IAAI,SAAS,EAC/C,KAAK,8BAA8B,IAAI,UAAU,EACjD,KAAK,6BAA6B,IAAI,SAAS,GAChD,MAAM,wBAAwB,CAAC"}
@@ -0,0 +1 @@
1
+ export { FloatingActionButtonIcon as Icon, FloatingActionButtonLabel as Label, FloatingActionButtonRoot as Root } from './FloatingActionButton.js';
@@ -0,0 +1,13 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
4
+
5
+ const FloatingActionButton = require('./FloatingActionButton.cjs');
6
+ const FloatingActionButton_namespace = require('./FloatingActionButton.namespace.cjs');
7
+
8
+
9
+
10
+ exports.FloatingActionButtonIcon = FloatingActionButton.FloatingActionButtonIcon;
11
+ exports.FloatingActionButtonLabel = FloatingActionButton.FloatingActionButtonLabel;
12
+ exports.FloatingActionButtonRoot = FloatingActionButton.FloatingActionButtonRoot;
13
+ exports.FloatingActionButton = FloatingActionButton_namespace;
@@ -0,0 +1,3 @@
1
+ export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot, type FloatingActionButtonIconProps, type FloatingActionButtonLabelProps, type FloatingActionButtonRootProps, } from './FloatingActionButton';
2
+ export * as FloatingActionButton from './FloatingActionButton.namespace';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/FloatingActionButton/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,yBAAyB,EACzB,wBAAwB,EACxB,KAAK,6BAA6B,EAClC,KAAK,8BAA8B,EACnC,KAAK,6BAA6B,GACnC,MAAM,wBAAwB,CAAC;AAEhC,OAAO,KAAK,oBAAoB,MAAM,kCAAkC,CAAC"}
@@ -0,0 +1,3 @@
1
+ export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot } from './FloatingActionButton.js';
2
+ import * as FloatingActionButton_namespace from './FloatingActionButton.namespace.js';
3
+ export { FloatingActionButton_namespace as FloatingActionButton };
@@ -21,6 +21,7 @@ const ChipTabs = require('./ChipTabs/ChipTabs.cjs');
21
21
  const ChipTabs_namespace = require('./ChipTabs/ChipTabs.namespace.cjs');
22
22
  const Columns = require('./Columns/Columns.cjs');
23
23
  const ConsistentWidth = require('./ConsistentWidth/ConsistentWidth.cjs');
24
+ const ContextualFloatingButton = require('./ContextualFloatingButton/ContextualFloatingButton.cjs');
24
25
  const ControlChip = require('./ControlChip/ControlChip.cjs');
25
26
  const Count = require('./Count/Count.cjs');
26
27
  const Dialog = require('./Dialog/Dialog.cjs');
@@ -30,7 +31,10 @@ const ExtendedActionSheet = require('./ExtendedActionSheet/ExtendedActionSheet.c
30
31
  const ExtendedActionSheet_namespace = require('./ExtendedActionSheet/ExtendedActionSheet.namespace.cjs');
31
32
  const ExtendedFab = require('./ExtendedFab/ExtendedFab.cjs');
32
33
  const Fab = require('./Fab/Fab.cjs');
34
+ const FloatingActionButton = require('./FloatingActionButton/FloatingActionButton.cjs');
35
+ const FloatingActionButton_namespace = require('./FloatingActionButton/FloatingActionButton.namespace.cjs');
33
36
  const Flex = require('./Flex/Flex.cjs');
37
+ const Float = require('./Float/Float.cjs');
34
38
  const HelpBubble = require('./HelpBubble/HelpBubble.cjs');
35
39
  const HelpBubble_namespace = require('./HelpBubble/HelpBubble.namespace.cjs');
36
40
  const Icon = require('./Icon/Icon.cjs');
@@ -134,6 +138,7 @@ exports.ChipTabs = ChipTabs_namespace;
134
138
  exports.Column = Columns.Column;
135
139
  exports.Columns = Columns.Columns;
136
140
  exports.ConsistentWidth = ConsistentWidth.ConsistentWidth;
141
+ exports.ContextualFloatingButton = ContextualFloatingButton.ContextualFloatingButton;
137
142
  exports.ControlChip = ControlChip.ControlChip;
138
143
  exports.Count = Count.Count;
139
144
  exports.DialogAction = Dialog.DialogAction;
@@ -163,7 +168,12 @@ exports.ExtendedActionSheetTrigger = ExtendedActionSheet.ExtendedActionSheetTrig
163
168
  exports.ExtendedActionSheet = ExtendedActionSheet_namespace;
164
169
  exports.ExtendedFab = ExtendedFab.ExtendedFab;
165
170
  exports.Fab = Fab.Fab;
171
+ exports.FloatingActionButtonIcon = FloatingActionButton.FloatingActionButtonIcon;
172
+ exports.FloatingActionButtonLabel = FloatingActionButton.FloatingActionButtonLabel;
173
+ exports.FloatingActionButtonRoot = FloatingActionButton.FloatingActionButtonRoot;
174
+ exports.FloatingActionButton = FloatingActionButton_namespace;
166
175
  exports.Flex = Flex.Flex;
176
+ exports.Float = Float.Float;
167
177
  exports.HelpBubbleAnchor = HelpBubble.HelpBubbleAnchor;
168
178
  exports.HelpBubbleArrow = HelpBubble.HelpBubbleArrow;
169
179
  exports.HelpBubbleArrowTip = HelpBubble.HelpBubbleArrowTip;
@@ -11,6 +11,7 @@ export * from './Checkbox';
11
11
  export * from './ChipTabs';
12
12
  export * from './Columns';
13
13
  export * from './ConsistentWidth';
14
+ export * from './ContextualFloatingButton';
14
15
  export * from './ControlChip';
15
16
  export * from './Count';
16
17
  export * from './Dialog';
@@ -18,7 +19,9 @@ export * from './Divider';
18
19
  export * from './ExtendedActionSheet';
19
20
  export * from './ExtendedFab';
20
21
  export * from './Fab';
22
+ export * from './FloatingActionButton';
21
23
  export * from './Flex';
24
+ export * from './Float';
22
25
  export * from './HelpBubble';
23
26
  export * from './Icon';
24
27
  export * from './IdentityPlaceholder';
@@ -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,YAAY,CAAC;AAC3B,cAAc,WAAW,CAAC;AAC1B,cAAc,mBAAmB,CAAC;AAClC,cAAc,e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B,cAAc,mBAAmB,CAAC;AAClC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,eAAe,CAAC;AAC9B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,WAAW,CAAC;AAC1B,cAAc,uBAAuB,CAAC;AACtC,cAAc,eAAe,CAAC;AAC9B,cAAc,OAAO,CAAC;AACtB,cAAc,wBAAwB,CAAC;AACvC,cAAc,QAAQ,CAAC;AACvB,cAAc,SAAS,CAAC;AACxB,cAAc,cAAc,CAAC;AAC7B,cAAc,QAAQ,CAAC;AACvB,cAAc,uBAAuB,CAAC;AACtC,cAAc,UAAU,CAAC;AACzB,cAAc,gBAAgB,CAAC;AAC/B,cAAc,eAAe,CAAC;AAC9B,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,UAAU,CAAC;AACzB,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,kBAAkB,CAAC;AACjC,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,YAAY,CAAC;AAC3B,cAAc,YAAY,CAAC;AAC3B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,QAAQ,CAAC;AACvB,cAAc,QAAQ,CAAC;AACvB,cAAc,aAAa,CAAC;AAC5B,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC"}
@@ -23,6 +23,7 @@ import * as ChipTabs_namespace from './ChipTabs/ChipTabs.namespace.js';
23
23
  export { ChipTabs_namespace as ChipTabs };
24
24
  export { Column, Columns } from './Columns/Columns.js';
25
25
  export { ConsistentWidth } from './ConsistentWidth/ConsistentWidth.js';
26
+ export { ContextualFloatingButton } from './ContextualFloatingButton/ContextualFloatingButton.js';
26
27
  export { ControlChip } from './ControlChip/ControlChip.js';
27
28
  export { Count } from './Count/Count.js';
28
29
  export { DialogAction, DialogBackdrop, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogTitle, DialogTrigger } from './Dialog/Dialog.js';
@@ -34,7 +35,11 @@ import * as ExtendedActionSheet_namespace from './ExtendedActionSheet/ExtendedAc
34
35
  export { ExtendedActionSheet_namespace as ExtendedActionSheet };
35
36
  export { ExtendedFab } from './ExtendedFab/ExtendedFab.js';
36
37
  export { Fab } from './Fab/Fab.js';
38
+ export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot } from './FloatingActionButton/FloatingActionButton.js';
39
+ import * as FloatingActionButton_namespace from './FloatingActionButton/FloatingActionButton.namespace.js';
40
+ export { FloatingActionButton_namespace as FloatingActionButton };
37
41
  export { Flex } from './Flex/Flex.js';
42
+ export { Float } from './Float/Float.js';
38
43
  export { HelpBubbleAnchor, HelpBubbleArrow, HelpBubbleArrowTip, HelpBubbleCloseButton, HelpBubbleContent, HelpBubbleDescription, HelpBubblePositioner, HelpBubbleRoot, HelpBubbleTitle, HelpBubbleTrigger } from './HelpBubble/HelpBubble.js';
39
44
  import * as HelpBubble_namespace from './HelpBubble/HelpBubble.namespace.js';
40
45
  export { HelpBubble_namespace as HelpBubble };
package/lib/index.cjs CHANGED
@@ -21,6 +21,7 @@ const ChipTabs = require('./components/ChipTabs/ChipTabs.cjs');
21
21
  const ChipTabs_namespace = require('./components/ChipTabs/ChipTabs.namespace.cjs');
22
22
  const Columns = require('./components/Columns/Columns.cjs');
23
23
  const ConsistentWidth = require('./components/ConsistentWidth/ConsistentWidth.cjs');
24
+ const ContextualFloatingButton = require('./components/ContextualFloatingButton/ContextualFloatingButton.cjs');
24
25
  const ControlChip = require('./components/ControlChip/ControlChip.cjs');
25
26
  const Count = require('./components/Count/Count.cjs');
26
27
  const Dialog = require('./components/Dialog/Dialog.cjs');
@@ -30,7 +31,10 @@ const ExtendedActionSheet = require('./components/ExtendedActionSheet/ExtendedAc
30
31
  const ExtendedActionSheet_namespace = require('./components/ExtendedActionSheet/ExtendedActionSheet.namespace.cjs');
31
32
  const ExtendedFab = require('./components/ExtendedFab/ExtendedFab.cjs');
32
33
  const Fab = require('./components/Fab/Fab.cjs');
34
+ const FloatingActionButton = require('./components/FloatingActionButton/FloatingActionButton.cjs');
35
+ const FloatingActionButton_namespace = require('./components/FloatingActionButton/FloatingActionButton.namespace.cjs');
33
36
  const Flex = require('./components/Flex/Flex.cjs');
37
+ const Float = require('./components/Float/Float.cjs');
34
38
  const HelpBubble = require('./components/HelpBubble/HelpBubble.cjs');
35
39
  const HelpBubble_namespace = require('./components/HelpBubble/HelpBubble.namespace.cjs');
36
40
  const Icon = require('./components/Icon/Icon.cjs');
@@ -134,6 +138,7 @@ exports.ChipTabs = ChipTabs_namespace;
134
138
  exports.Column = Columns.Column;
135
139
  exports.Columns = Columns.Columns;
136
140
  exports.ConsistentWidth = ConsistentWidth.ConsistentWidth;
141
+ exports.ContextualFloatingButton = ContextualFloatingButton.ContextualFloatingButton;
137
142
  exports.ControlChip = ControlChip.ControlChip;
138
143
  exports.Count = Count.Count;
139
144
  exports.DialogAction = Dialog.DialogAction;
@@ -163,7 +168,12 @@ exports.ExtendedActionSheetTrigger = ExtendedActionSheet.ExtendedActionSheetTrig
163
168
  exports.ExtendedActionSheet = ExtendedActionSheet_namespace;
164
169
  exports.ExtendedFab = ExtendedFab.ExtendedFab;
165
170
  exports.Fab = Fab.Fab;
171
+ exports.FloatingActionButtonIcon = FloatingActionButton.FloatingActionButtonIcon;
172
+ exports.FloatingActionButtonLabel = FloatingActionButton.FloatingActionButtonLabel;
173
+ exports.FloatingActionButtonRoot = FloatingActionButton.FloatingActionButtonRoot;
174
+ exports.FloatingActionButton = FloatingActionButton_namespace;
166
175
  exports.Flex = Flex.Flex;
176
+ exports.Float = Float.Float;
167
177
  exports.HelpBubbleAnchor = HelpBubble.HelpBubbleAnchor;
168
178
  exports.HelpBubbleArrow = HelpBubble.HelpBubbleArrow;
169
179
  exports.HelpBubbleArrowTip = HelpBubble.HelpBubbleArrowTip;
package/lib/index.js CHANGED
@@ -23,6 +23,7 @@ import * as ChipTabs_namespace from './components/ChipTabs/ChipTabs.namespace.js
23
23
  export { ChipTabs_namespace as ChipTabs };
24
24
  export { Column, Columns } from './components/Columns/Columns.js';
25
25
  export { ConsistentWidth } from './components/ConsistentWidth/ConsistentWidth.js';
26
+ export { ContextualFloatingButton } from './components/ContextualFloatingButton/ContextualFloatingButton.js';
26
27
  export { ControlChip } from './components/ControlChip/ControlChip.js';
27
28
  export { Count } from './components/Count/Count.js';
28
29
  export { DialogAction, DialogBackdrop, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPositioner, DialogRoot, DialogTitle, DialogTrigger } from './components/Dialog/Dialog.js';
@@ -34,7 +35,11 @@ import * as ExtendedActionSheet_namespace from './components/ExtendedActionSheet
34
35
  export { ExtendedActionSheet_namespace as ExtendedActionSheet };
35
36
  export { ExtendedFab } from './components/ExtendedFab/ExtendedFab.js';
36
37
  export { Fab } from './components/Fab/Fab.js';
38
+ export { FloatingActionButtonIcon, FloatingActionButtonLabel, FloatingActionButtonRoot } from './components/FloatingActionButton/FloatingActionButton.js';
39
+ import * as FloatingActionButton_namespace from './components/FloatingActionButton/FloatingActionButton.namespace.js';
40
+ export { FloatingActionButton_namespace as FloatingActionButton };
37
41
  export { Flex } from './components/Flex/Flex.js';
42
+ export { Float } from './components/Float/Float.js';
38
43
  export { HelpBubbleAnchor, HelpBubbleArrow, HelpBubbleArrowTip, HelpBubbleCloseButton, HelpBubbleContent, HelpBubbleDescription, HelpBubblePositioner, HelpBubbleRoot, HelpBubbleTitle, HelpBubbleTrigger } from './components/HelpBubble/HelpBubble.js';
39
44
  import * as HelpBubble_namespace from './components/HelpBubble/HelpBubble.namespace.js';
40
45
  export { HelpBubble_namespace as HelpBubble };
@@ -165,6 +165,7 @@ function useStyleProps(props) {
165
165
  position,
166
166
  overflowX,
167
167
  overflowY,
168
+ zIndex,
168
169
  flexGrow,
169
170
  flexShrink,
170
171
  flexDirection,
@@ -174,6 +175,7 @@ function useStyleProps(props) {
174
175
  alignContent,
175
176
  alignSelf,
176
177
  gap,
178
+ unstable_transform,
177
179
  style,
178
180
  ...restProps
179
181
  } = props;
@@ -214,6 +216,7 @@ function useStyleProps(props) {
214
216
  "--seed-box-position": position,
215
217
  "--seed-box-overflow-x": overflowX,
216
218
  "--seed-box-overflow-y": overflowY,
219
+ "--seed-box-z-index": zIndex,
217
220
  "--seed-box-flex-grow": flexGrow,
218
221
  "--seed-box-flex-shrink": flexShrink,
219
222
  "--seed-box-flex-direction": handleFlexDirection(flexDirection),
@@ -222,6 +225,7 @@ function useStyleProps(props) {
222
225
  "--seed-box-align-items": handleAlignItems(alignItems),
223
226
  "--seed-box-align-content": handleAlignItems(alignContent),
224
227
  "--seed-box-align-self": handleAlignItems(alignSelf),
228
+ "--seed-box-unstable-transform": unstable_transform,
225
229
  ...style
226
230
  },
227
231
  restProps
@@ -1,7 +1,7 @@
1
1
  import { ScopedColorBg, ScopedColorFg, ScopedColorPalette, ScopedColorStroke, Dimension, Radius, SpacingX, SpacingY } from '@seed-design/css/vars';
2
2
  import { ForwardRefExoticComponent, PropsWithoutRef, RefAttributes } from 'react';
3
3
  export declare function handleColor(color: string | undefined): any;
4
- export declare function handleDimension(dimension: string | 0 | undefined): any;
4
+ export declare function handleDimension(dimension: string | 0 | undefined): string | undefined;
5
5
  export interface StyleProps {
6
6
  background?: ScopedColorBg | ScopedColorPalette | (string & {});
7
7
  /**
@@ -69,6 +69,7 @@ export interface StyleProps {
69
69
  position?: "relative" | "absolute" | "fixed" | "sticky";
70
70
  overflowX?: "visible" | "hidden" | "scroll" | "auto";
71
71
  overflowY?: "visible" | "hidden" | "scroll" | "auto";
72
+ zIndex?: number | (string & {});
72
73
  flexGrow?: 0 | 1 | (number & {});
73
74
  flexShrink?: 0 | (number & {});
74
75
  flexDirection?: "row" | "column" | "row-reverse" | "column-reverse" | "rowReverse" | "columnReverse";
@@ -78,6 +79,7 @@ export interface StyleProps {
78
79
  alignContent?: "flex-start" | "flex-end" | "center" | "stretch" | "flexStart" | "flexEnd";
79
80
  alignSelf?: "flex-start" | "flex-end" | "center" | "stretch" | "flexStart" | "flexEnd";
80
81
  gap?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {});
82
+ unstable_transform?: string;
81
83
  }
82
84
  interface UseStyleProps extends StyleProps {
83
85
  style?: React.CSSProperties;
@@ -1 +1 @@
1
- {"version":3,"file":"styled.d.ts","sourceRoot":"","sources":["../../src/utils/styled.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EACV,aAAa,EACb,aAAa,EACb,kBAAkB,EAClB,iBAAiB,EACjB,SAAS,EACT,MAAM,EACN,QAAQ,EACR,QAAQ,EACT,MAAM,uBAAuB,CAAC;AAI/B,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,OAOpD;AAED,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,OAiBhE;AAgHD,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,aAAa,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAEhE;;OAEG;IACH,EAAE,CAAC,EAAE,aAAa,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAExD,KAAK,CAAC,EAAE,aAAa,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAE3D,WAAW,CAAC,EAAE,iBAAiB,GAAG,kBAAkB,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAErE,WAAW,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAEpC,cAAc,CAAC,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC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W,GACX,SAAS,CAAC;IAEd,YAAY,CAAC,EACT,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IAEd,SAAS,CAAC,EACN,YAAY,GACZ,UAAU,GACV,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,CAAC;IAEd,GAAG,CAAC,EAAE,SAAS,GAAG,YAAY,QAAQ,EAAE,GAAG,YAAY,QAAQ,EAAE,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,EAAE,CAAC,CAAC;IAGtF,kBAAkB,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED,UAAU,aAAc,SAAQ,UAAU;IACxC,KAAK,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC;CAC7B;AAED,wBAAgB,aAAa,CAAC,CAAC,SAAS,aAAa,EACnD,KAAK,EAAE,CAAC,GACP;IACD,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC,CAAC,EAAE,MAAM,aAAa,CAAC,CAAC;CACzC,CAkHA;AAED,wBAAgB,cAAc,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,EAC5C,SAAS,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,GAAG,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,oHAY3D"}
@@ -161,6 +161,7 @@ function useStyleProps(props) {
161
161
  position,
162
162
  overflowX,
163
163
  overflowY,
164
+ zIndex,
164
165
  flexGrow,
165
166
  flexShrink,
166
167
  flexDirection,
@@ -170,6 +171,7 @@ function useStyleProps(props) {
170
171
  alignContent,
171
172
  alignSelf,
172
173
  gap,
174
+ unstable_transform,
173
175
  style,
174
176
  ...restProps
175
177
  } = props;
@@ -210,6 +212,7 @@ function useStyleProps(props) {
210
212
  "--seed-box-position": position,
211
213
  "--seed-box-overflow-x": overflowX,
212
214
  "--seed-box-overflow-y": overflowY,
215
+ "--seed-box-z-index": zIndex,
213
216
  "--seed-box-flex-grow": flexGrow,
214
217
  "--seed-box-flex-shrink": flexShrink,
215
218
  "--seed-box-flex-direction": handleFlexDirection(flexDirection),
@@ -218,6 +221,7 @@ function useStyleProps(props) {
218
221
  "--seed-box-align-items": handleAlignItems(alignItems),
219
222
  "--seed-box-align-content": handleAlignItems(alignContent),
220
223
  "--seed-box-align-self": handleAlignItems(alignSelf),
224
+ "--seed-box-unstable-transform": unstable_transform,
221
225
  ...style
222
226
  },
223
227
  restProps
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@seed-design/react",
3
- "version": "0.0.29",
3
+ "version": "0.0.30",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/daangn/seed-design.git",
@@ -46,23 +46,23 @@
46
46
  "@seed-design/react-portal": "0.0.2",
47
47
  "@seed-design/react-primitive": "0.0.3",
48
48
  "@seed-design/react-progress": "0.0.4",
49
- "@seed-design/react-pull-to-refresh": "0.0.5",
49
+ "@seed-design/react-pull-to-refresh": "0.0.6",
50
50
  "@seed-design/react-radio-group": "0.0.4",
51
51
  "@seed-design/react-segmented-control": "0.0.5",
52
52
  "@seed-design/react-snackbar": "0.0.5",
53
53
  "@seed-design/react-switch": "0.0.4",
54
- "@seed-design/react-tabs": "0.0.6",
54
+ "@seed-design/react-tabs": "0.0.7",
55
55
  "@seed-design/react-text-field": "0.0.4",
56
56
  "@seed-design/react-toggle": "0.0.4",
57
57
  "clsx": "^2.1.1"
58
58
  },
59
59
  "peerDependencies": {
60
- "@seed-design/css": "0.0.29",
60
+ "@seed-design/css": "0.0.30",
61
61
  "react": ">=18.0.0",
62
62
  "react-dom": ">=18.0.0"
63
63
  },
64
64
  "devDependencies": {
65
- "@seed-design/css": "0.0.29",
65
+ "@seed-design/css": "0.0.30",
66
66
  "@vitejs/plugin-react": "^4.4.1",
67
67
  "globby": "^14.1.0",
68
68
  "react": "^19.1.0",
@@ -0,0 +1,49 @@
1
+ import {
2
+ contextualFloatingButton,
3
+ type ContextualFloatingButtonVariantProps,
4
+ } from "@seed-design/css/recipes/contextual-floating-button";
5
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
6
+ import clsx from "clsx";
7
+ import * as React from "react";
8
+ import { IconRequired } from "../Icon/Icon";
9
+ import {
10
+ PendingButtonProvider,
11
+ usePendingButton,
12
+ type UsePendingButtonProps,
13
+ } from "../LoadingIndicator/usePendingButton";
14
+
15
+ export interface ContextualFloatingButtonProps
16
+ extends ContextualFloatingButtonVariantProps,
17
+ UsePendingButtonProps,
18
+ PrimitiveProps,
19
+ React.ButtonHTMLAttributes<HTMLButtonElement> {}
20
+
21
+ export const ContextualFloatingButton = React.forwardRef<
22
+ HTMLButtonElement,
23
+ ContextualFloatingButtonProps
24
+ >(({ variant, loading = false, layout = "withText", className, children, ...otherProps }, ref) => {
25
+ const recipeClassName = contextualFloatingButton({ variant, layout });
26
+ const api = usePendingButton({ loading, disabled: otherProps.disabled });
27
+
28
+ if (layout === "iconOnly" && !(otherProps["aria-label"] || otherProps["aria-labelledby"])) {
29
+ console.warn(
30
+ "When layout is 'iconOnly', 'aria-label' or 'aria-labelledby' should be provided.",
31
+ );
32
+ }
33
+
34
+ return (
35
+ <PendingButtonProvider value={api}>
36
+ <IconRequired enabled={layout === "iconOnly"}>
37
+ <Primitive.button
38
+ ref={ref}
39
+ className={clsx(recipeClassName, className)}
40
+ {...api.stateProps}
41
+ {...otherProps}
42
+ >
43
+ {children}
44
+ </Primitive.button>
45
+ </IconRequired>
46
+ </PendingButtonProvider>
47
+ );
48
+ });
49
+ ContextualFloatingButton.displayName = "ContextualFloatingButton";
@@ -0,0 +1,4 @@
1
+ export {
2
+ ContextualFloatingButton,
3
+ type ContextualFloatingButtonProps,
4
+ } from "./ContextualFloatingButton";
@@ -6,11 +6,17 @@ const { withContext } = createRecipeContext(extendedFab);
6
6
 
7
7
  ////////////////////////////////////////////////////////////////////////////////////
8
8
 
9
+ /**
10
+ * @deprecated Use `ContextualFloatingButton` instead.
11
+ */
9
12
  export interface ExtendedFabProps
10
13
  extends ExtendedFabVariantProps,
11
14
  PrimitiveProps,
12
15
  React.ButtonHTMLAttributes<HTMLButtonElement> {}
13
16
 
17
+ /**
18
+ * @deprecated Use `ContextualFloatingButton` instead.
19
+ */
14
20
  export const ExtendedFab = withContext<HTMLButtonElement, ExtendedFabProps>(Primitive.button, {
15
21
  defaultProps: {
16
22
  variant: "neutralSolid",
@@ -7,9 +7,15 @@ const { withContext } = createRecipeContext(fab);
7
7
 
8
8
  ////////////////////////////////////////////////////////////////////////////////////
9
9
 
10
+ /**
11
+ * @deprecated Use `ContextualFloatingButton` instead.
12
+ */
10
13
  export interface FabProps
11
14
  extends FabVariantProps,
12
15
  PrimitiveProps,
13
16
  React.ButtonHTMLAttributes<HTMLButtonElement> {}
14
17
 
18
+ /**
19
+ * @deprecated Use `ContextualFloatingButton` instead.
20
+ */
15
21
  export const Fab = withContext<HTMLButtonElement, FabProps>(Primitive.button);
@@ -0,0 +1,116 @@
1
+ import type { Dimension } from "@seed-design/css/vars";
2
+ import * as React from "react";
3
+ import { Box } from "../Box/Box";
4
+ import { handleDimension } from "../../utils/styled";
5
+
6
+ export interface FloatProps extends React.HTMLAttributes<HTMLDivElement> {
7
+ as?: React.ElementType;
8
+
9
+ placement:
10
+ | "bottom-end"
11
+ | "bottom-start"
12
+ | "top-end"
13
+ | "top-start"
14
+ | "bottom-center"
15
+ | "top-center"
16
+ | "middle-center"
17
+ | "middle-end"
18
+ | "middle-start";
19
+
20
+ /**
21
+ * @default 0
22
+ */
23
+ offsetX?: 0 | Dimension | (string & {});
24
+
25
+ /**
26
+ * @default 0
27
+ */
28
+ offsetY?: 0 | Dimension | (string & {});
29
+
30
+ zIndex?: number | (string & {});
31
+ }
32
+
33
+ function getPlacementStyle(
34
+ placement: FloatProps["placement"],
35
+ offsetX: 0 | (string & {}) | undefined,
36
+ offsetY: 0 | (string & {}) | undefined,
37
+ ): {
38
+ top?: 0 | string | undefined;
39
+ left?: 0 | string | undefined;
40
+ right?: 0 | string | undefined;
41
+ bottom?: 0 | string | undefined;
42
+ unstable_transform?: string | undefined;
43
+ } {
44
+ const offsetXValue = handleDimension(offsetX);
45
+ const offsetYValue = handleDimension(offsetY);
46
+
47
+ const centerLeft = offsetXValue ? `calc(50% + ${offsetXValue})` : "50%";
48
+ const middleTop = offsetYValue ? `calc(50% + ${offsetYValue})` : "50%";
49
+
50
+ const shiftLeft = "translateX(-50%)";
51
+ const shiftTop = "translateY(-50%)";
52
+ const shiftBoth = "translate(-50%, -50%)";
53
+
54
+ switch (placement) {
55
+ case "top-start":
56
+ return {
57
+ top: offsetYValue ?? 0,
58
+ left: offsetXValue ?? 0,
59
+ };
60
+ case "top-center":
61
+ return {
62
+ top: offsetYValue ?? 0,
63
+ left: centerLeft,
64
+ unstable_transform: shiftLeft,
65
+ };
66
+ case "top-end":
67
+ return {
68
+ top: offsetYValue ?? 0,
69
+ right: offsetXValue ?? 0,
70
+ };
71
+ case "middle-start":
72
+ return {
73
+ top: middleTop,
74
+ left: offsetXValue ?? 0,
75
+ unstable_transform: shiftTop,
76
+ };
77
+ case "middle-center":
78
+ return {
79
+ top: middleTop,
80
+ left: centerLeft,
81
+ unstable_transform: shiftBoth,
82
+ };
83
+ case "middle-end":
84
+ return {
85
+ top: middleTop,
86
+ right: offsetXValue ?? 0,
87
+ unstable_transform: shiftTop,
88
+ };
89
+ case "bottom-start":
90
+ return {
91
+ bottom: offsetYValue ?? 0,
92
+ left: offsetXValue ?? 0,
93
+ };
94
+ case "bottom-center":
95
+ return {
96
+ bottom: offsetYValue ?? 0,
97
+ left: centerLeft,
98
+ unstable_transform: shiftLeft,
99
+ };
100
+ case "bottom-end":
101
+ return {
102
+ bottom: offsetYValue ?? 0,
103
+ right: offsetXValue ?? 0,
104
+ };
105
+ }
106
+ }
107
+
108
+ export const Float = React.forwardRef<HTMLDivElement, FloatProps>((props, ref) => {
109
+ const { as, placement, offsetX, offsetY, zIndex, ...rest } = props;
110
+
111
+ const placementStyle = getPlacementStyle(placement, offsetX, offsetY);
112
+
113
+ return (
114
+ <Box ref={ref} as={as} position="absolute" zIndex={zIndex} {...placementStyle} {...rest} />
115
+ );
116
+ });
@@ -0,0 +1 @@
1
+ export { Float, type FloatProps } from "./Float";
@@ -0,0 +1,8 @@
1
+ export {
2
+ FloatingActionButtonIcon as Icon,
3
+ FloatingActionButtonLabel as Label,
4
+ FloatingActionButtonRoot as Root,
5
+ type FloatingActionButtonIconProps as IconProps,
6
+ type FloatingActionButtonLabelProps as LabelProps,
7
+ type FloatingActionButtonRootProps as RootProps,
8
+ } from "./FloatingActionButton";
@@ -0,0 +1,38 @@
1
+ import {
2
+ floatingActionButton,
3
+ type FloatingActionButtonVariantProps,
4
+ } from "@seed-design/css/recipes/floating-action-button";
5
+ import { Primitive, type PrimitiveProps } from "@seed-design/react-primitive";
6
+ import type * as React from "react";
7
+ import { createSlotRecipeContext } from "../../utils/createSlotRecipeContext";
8
+ import { InternalIcon, type InternalIconProps } from "../private/Icon";
9
+
10
+ const { withProvider, withContext } = createSlotRecipeContext(floatingActionButton);
11
+
12
+ ////////////////////////////////////////////////////////////////////////////////////
13
+
14
+ export interface FloatingActionButtonRootProps
15
+ extends FloatingActionButtonVariantProps,
16
+ PrimitiveProps,
17
+ React.ButtonHTMLAttributes<HTMLButtonElement> {}
18
+
19
+ export const FloatingActionButtonRoot = withProvider<
20
+ HTMLButtonElement,
21
+ FloatingActionButtonRootProps
22
+ >(Primitive.button, "root");
23
+
24
+ export interface FloatingActionButtonIconProps extends InternalIconProps {}
25
+
26
+ export const FloatingActionButtonIcon = withContext<
27
+ HTMLButtonElement,
28
+ FloatingActionButtonIconProps
29
+ >(InternalIcon, "icon");
30
+
31
+ export interface FloatingActionButtonLabelProps
32
+ extends PrimitiveProps,
33
+ React.HTMLAttributes<HTMLSpanElement> {}
34
+
35
+ export const FloatingActionButtonLabel = withContext<
36
+ HTMLSpanElement,
37
+ FloatingActionButtonLabelProps
38
+ >(Primitive.span, "label");
@@ -0,0 +1,10 @@
1
+ export {
2
+ FloatingActionButtonIcon,
3
+ FloatingActionButtonLabel,
4
+ FloatingActionButtonRoot,
5
+ type FloatingActionButtonIconProps,
6
+ type FloatingActionButtonLabelProps,
7
+ type FloatingActionButtonRootProps,
8
+ } from "./FloatingActionButton";
9
+
10
+ export * as FloatingActionButton from "./FloatingActionButton.namespace";
@@ -11,6 +11,7 @@ export * from "./Checkbox";
11
11
  export * from "./ChipTabs";
12
12
  export * from "./Columns";
13
13
  export * from "./ConsistentWidth";
14
+ export * from "./ContextualFloatingButton";
14
15
  export * from "./ControlChip";
15
16
  export * from "./Count";
16
17
  export * from "./Dialog";
@@ -18,7 +19,9 @@ export * from "./Divider";
18
19
  export * from "./ExtendedActionSheet";
19
20
  export * from "./ExtendedFab";
20
21
  export * from "./Fab";
22
+ export * from "./FloatingActionButton";
21
23
  export * from "./Flex";
24
+ export * from "./Float";
22
25
  export * from "./HelpBubble";
23
26
  export * from "./Icon";
24
27
  export * from "./IdentityPlaceholder";
@@ -20,7 +20,7 @@ export function handleColor(color: string | undefined) {
20
20
  return vars.$color[type]?.[value] ?? color;
21
21
  }
22
22
 
23
- export function handleDimension(dimension: string | 0 | undefined) {
23
+ export function handleDimension(dimension: string | 0 | undefined): string | undefined {
24
24
  if (dimension == null) {
25
25
  return undefined;
26
26
  }
@@ -266,6 +266,8 @@ export interface StyleProps {
266
266
 
267
267
  overflowY?: "visible" | "hidden" | "scroll" | "auto";
268
268
 
269
+ zIndex?: number | (string & {});
270
+
269
271
  flexGrow?: 0 | 1 | (number & {});
270
272
 
271
273
  flexShrink?: 0 | (number & {});
@@ -317,6 +319,9 @@ export interface StyleProps {
317
319
  | "flexEnd"; // @deprecated Use `flex-end` instead.
318
320
 
319
321
  gap?: Dimension | `spacingX.${SpacingX}` | `spacingY.${SpacingY}` | 0 | (string & {});
322
+
323
+ // NOTE: Not sure how to treat transform/translate right now, mark as unstable until we have a better solution.
324
+ unstable_transform?: string;
320
325
  }
321
326
 
322
327
  interface UseStyleProps extends StyleProps {
@@ -372,6 +377,7 @@ export function useStyleProps<T extends UseStyleProps>(
372
377
  position,
373
378
  overflowX,
374
379
  overflowY,
380
+ zIndex,
375
381
  flexGrow,
376
382
  flexShrink,
377
383
  flexDirection,
@@ -381,6 +387,7 @@ export function useStyleProps<T extends UseStyleProps>(
381
387
  alignContent,
382
388
  alignSelf,
383
389
  gap,
390
+ unstable_transform,
384
391
  style,
385
392
  ...restProps
386
393
  } = props;
@@ -426,6 +433,7 @@ export function useStyleProps<T extends UseStyleProps>(
426
433
  "--seed-box-position": position,
427
434
  "--seed-box-overflow-x": overflowX,
428
435
  "--seed-box-overflow-y": overflowY,
436
+ "--seed-box-z-index": zIndex,
429
437
  "--seed-box-flex-grow": flexGrow,
430
438
  "--seed-box-flex-shrink": flexShrink,
431
439
  "--seed-box-flex-direction": handleFlexDirection(flexDirection),
@@ -434,6 +442,7 @@ export function useStyleProps<T extends UseStyleProps>(
434
442
  "--seed-box-align-items": handleAlignItems(alignItems),
435
443
  "--seed-box-align-content": handleAlignItems(alignContent),
436
444
  "--seed-box-align-self": handleAlignItems(alignSelf),
445
+ "--seed-box-unstable-transform": unstable_transform,
437
446
  ...style,
438
447
  } as React.CSSProperties,
439
448
  restProps,