@yamada-ui/react 2.3.0-dev-20261027072316 → 2.3.0-dev-20261028015806

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 (35) hide show
  1. package/dist/cjs/components/bubble/bubble.cjs +163 -0
  2. package/dist/cjs/components/bubble/bubble.cjs.map +1 -0
  3. package/dist/cjs/components/bubble/bubble.style.cjs +143 -0
  4. package/dist/cjs/components/bubble/bubble.style.cjs.map +1 -0
  5. package/dist/cjs/components/bubble/index.cjs +18 -0
  6. package/dist/cjs/components/bubble/namespace.cjs +28 -0
  7. package/dist/cjs/components/bubble/namespace.cjs.map +1 -0
  8. package/dist/cjs/core/components/create-component.cjs +1 -1
  9. package/dist/cjs/core/components/create-component.cjs.map +1 -1
  10. package/dist/cjs/core/css/conditions.cjs +4 -4
  11. package/dist/cjs/core/css/conditions.cjs.map +1 -1
  12. package/dist/cjs/index.cjs +125 -99
  13. package/dist/cjs/index.cjs.map +1 -1
  14. package/dist/esm/components/bubble/bubble.js +157 -0
  15. package/dist/esm/components/bubble/bubble.js.map +1 -0
  16. package/dist/esm/components/bubble/bubble.style.js +144 -0
  17. package/dist/esm/components/bubble/bubble.style.js.map +1 -0
  18. package/dist/esm/components/bubble/index.js +4 -0
  19. package/dist/esm/components/bubble/namespace.js +16 -0
  20. package/dist/esm/components/bubble/namespace.js.map +1 -0
  21. package/dist/esm/core/components/create-component.js +1 -1
  22. package/dist/esm/core/components/create-component.js.map +1 -1
  23. package/dist/esm/core/css/conditions.js +4 -4
  24. package/dist/esm/core/css/conditions.js.map +1 -1
  25. package/dist/esm/index.js +107 -95
  26. package/dist/esm/index.js.map +1 -1
  27. package/dist/types/components/bubble/bubble.d.ts +89 -0
  28. package/dist/types/components/bubble/bubble.style.d.ts +79 -0
  29. package/dist/types/components/bubble/index.d.ts +4 -0
  30. package/dist/types/components/bubble/namespace.d.ts +7 -0
  31. package/dist/types/components/chart/cartesian-chart.style.d.ts +1 -1
  32. package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
  33. package/dist/types/core/css/conditions.d.ts +10 -10
  34. package/dist/types/index.d.ts +53 -49
  35. package/package.json +2 -2
@@ -0,0 +1,163 @@
1
+ "use client";
2
+ const require_children = require("../../utils/children.cjs");
3
+ const require_factory = require("../../core/system/factory.cjs");
4
+ const require_props = require("../../core/components/props.cjs");
5
+ const require_create_component = require("../../core/components/create-component.cjs");
6
+ const require_bubble_style = require("./bubble.style.cjs");
7
+ let react = require("react");
8
+ let react_jsx_runtime = require("react/jsx-runtime");
9
+ //#region src/components/bubble/bubble.tsx
10
+ const { component, ComponentContext, PropsContext: BubblePropsContext, useComponentContext, usePropsContext: useBubblePropsContext, withContext, withProvider, useRootComponentProps } = require_create_component.createSlotComponent("bubble", require_bubble_style.bubbleStyle);
11
+ /**
12
+ * `Bubble` is a component that displays conversational content in a message bubble.
13
+ *
14
+ * @see https://yamada-ui.com/docs/components/bubble
15
+ */
16
+ const BubbleRoot = component((props) => {
17
+ const [, { colorScheme, size, variant, children, items, contentProps, endGroupProps, endItemProps, groupProps, itemProps, reactionsProps, startGroupProps, startItemProps, ...rest }] = useRootComponentProps(props, "root", { transferProps: [
18
+ "variant",
19
+ "colorScheme",
20
+ "size"
21
+ ] });
22
+ const computedChildren = (0, react.useMemo)(() => {
23
+ if (children) return children;
24
+ return items?.map((props, index) => {
25
+ if ("children" in props) {
26
+ const { children, reactions, contentProps, reactionsProps, ...rest } = props;
27
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(BubbleItem, {
28
+ ...rest,
29
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleContent, {
30
+ ...contentProps,
31
+ children
32
+ }), reactions ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleReactions, {
33
+ ...reactionsProps,
34
+ children: reactions
35
+ }) : null]
36
+ }, index);
37
+ } else return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleGroup, { ...props }, index);
38
+ });
39
+ }, [children, items]);
40
+ const context = (0, react.useMemo)(() => ({
41
+ colorScheme,
42
+ size,
43
+ variant
44
+ }), [
45
+ colorScheme,
46
+ size,
47
+ variant
48
+ ]);
49
+ const componentContext = (0, react.useMemo)(() => ({
50
+ contentProps,
51
+ endGroupProps,
52
+ endItemProps,
53
+ groupProps,
54
+ itemProps,
55
+ reactionsProps,
56
+ startGroupProps,
57
+ startItemProps
58
+ }), [
59
+ groupProps,
60
+ itemProps,
61
+ contentProps,
62
+ reactionsProps,
63
+ startItemProps,
64
+ endItemProps,
65
+ startGroupProps,
66
+ endGroupProps
67
+ ]);
68
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubblePropsContext, {
69
+ value: context,
70
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(ComponentContext, {
71
+ value: componentContext,
72
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.div, {
73
+ ...rest,
74
+ children: computedChildren
75
+ })
76
+ })
77
+ });
78
+ }, "root")();
79
+ const BubbleGroup = component((props) => {
80
+ const [, { colorScheme, size, variant, children, direction, items, ...rest }] = useRootComponentProps(props, "group", { transferProps: [
81
+ "variant",
82
+ "colorScheme",
83
+ "size"
84
+ ] });
85
+ const computedChildren = (0, react.useMemo)(() => {
86
+ if (children) return children;
87
+ return items?.map(({ children, reactions, contentProps, reactionsProps, ...rest }, index) => /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(BubbleItem, {
88
+ ...rest,
89
+ children: [/* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleContent, {
90
+ ...contentProps,
91
+ children
92
+ }), reactions ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleReactions, {
93
+ ...reactionsProps,
94
+ children: reactions
95
+ }) : null]
96
+ }, index));
97
+ }, [children, items]);
98
+ const context = (0, react.useMemo)(() => ({
99
+ colorScheme,
100
+ size,
101
+ variant,
102
+ direction
103
+ }), [
104
+ colorScheme,
105
+ size,
106
+ variant,
107
+ direction
108
+ ]);
109
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubblePropsContext, {
110
+ value: context,
111
+ children: /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_factory.styled.div, {
112
+ ...rest,
113
+ children: computedChildren
114
+ })
115
+ });
116
+ }, "group")(({ direction = "start", ...rest }) => {
117
+ const { endGroupProps, groupProps, startGroupProps } = useComponentContext();
118
+ return require_props.mergeProps(groupProps, direction === "start" ? startGroupProps : endGroupProps, {
119
+ direction,
120
+ ...rest
121
+ })();
122
+ });
123
+ const BubbleItem = withProvider(({ children, direction, contentProps, ...rest }) => {
124
+ const [content, customContent, reactions] = require_children.useSplitChildren(children, BubbleContent, BubbleReactions);
125
+ return /* @__PURE__ */ (0, react_jsx_runtime.jsxs)(require_factory.styled.div, {
126
+ "data-direction": direction,
127
+ ...rest,
128
+ children: [customContent ?? /* @__PURE__ */ (0, react_jsx_runtime.jsx)(BubbleContent, {
129
+ ...contentProps,
130
+ children: content
131
+ }), reactions]
132
+ });
133
+ }, "item")((props) => {
134
+ const contextProps = useBubblePropsContext();
135
+ const { endItemProps, itemProps, startItemProps } = useComponentContext();
136
+ const direction = props.direction ?? contextProps?.direction ?? "start";
137
+ return require_props.mergeProps(contextProps, itemProps, direction === "start" ? startItemProps : endItemProps, {
138
+ ...props,
139
+ direction
140
+ })();
141
+ });
142
+ const BubbleContent = withContext("div", "content")(void 0, (props) => {
143
+ const { contentProps } = useComponentContext();
144
+ return require_props.mergeProps(contentProps, props)();
145
+ });
146
+ const BubbleReactions = withContext("div", "reactions")(void 0, (props) => {
147
+ const { reactionsProps } = useComponentContext();
148
+ const { placement = "end-end", ...rest } = require_props.mergeProps(reactionsProps, props)();
149
+ return {
150
+ "data-placement": placement,
151
+ ...rest
152
+ };
153
+ });
154
+ //#endregion
155
+ exports.BubbleContent = BubbleContent;
156
+ exports.BubbleGroup = BubbleGroup;
157
+ exports.BubbleItem = BubbleItem;
158
+ exports.BubblePropsContext = BubblePropsContext;
159
+ exports.BubbleReactions = BubbleReactions;
160
+ exports.BubbleRoot = BubbleRoot;
161
+ exports.useBubblePropsContext = useBubblePropsContext;
162
+
163
+ //# sourceMappingURL=bubble.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubble.cjs","names":["createSlotComponent","bubbleStyle","useMemo","styled","mergeProps","useSplitChildren"],"sources":["../../../../src/components/bubble/bubble.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactNode } from \"react\"\nimport type {\n Direction,\n HTMLStyledProps,\n SimpleDirection,\n ThemeProps,\n} from \"../../core\"\nimport type { Merge } from \"../../utils\"\nimport type { BubbleStyle } from \"./bubble.style\"\nimport { useMemo } from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport { useSplitChildren } from \"../../utils\"\nimport { bubbleStyle } from \"./bubble.style\"\n\nexport interface BubbleItemWithContent extends Omit<\n BubbleItemProps,\n \"children\"\n> {\n children: ReactNode\n reactions?: ReactNode\n reactionsProps?: Omit<BubbleReactionsProps, \"children\">\n}\n\nexport interface BubbleItemWithGroup\n extends\n Required<Pick<BubbleGroupProps, \"items\">>,\n Omit<BubbleGroupProps, \"children\" | \"items\"> {}\n\nexport type BubbleItem =\n | BubbleItemWithContent\n | Omit<BubbleGroupProps, \"children\" | \"direction\">\n\ninterface ComponentContext extends Pick<\n BubbleRootProps,\n | \"contentProps\"\n | \"endGroupProps\"\n | \"endItemProps\"\n | \"groupProps\"\n | \"itemProps\"\n | \"reactionsProps\"\n | \"startGroupProps\"\n | \"startItemProps\"\n> {}\n\nexport interface BubbleRootProps extends Merge<\n HTMLStyledProps,\n ThemeProps<BubbleStyle>\n> {\n /**\n * If provided, generate elements based on items.\n */\n items?: BubbleItem[]\n /**\n * The props for content component.\n */\n contentProps?: Omit<BubbleContentProps, \"children\">\n /**\n * The theme props for group component in end direction.\n */\n endGroupProps?: Omit<BubbleGroupProps, \"children\" | \"direction\" | \"items\">\n /**\n * The theme props for item component in end direction.\n */\n endItemProps?: Omit<BubbleItemProps, \"children\" | \"direction\">\n /**\n * The props for group component.\n */\n groupProps?: Omit<BubbleGroupProps, \"children\" | \"direction\" | \"items\">\n /**\n * The props for item component.\n */\n itemProps?: Omit<BubbleItemProps, \"children\" | \"direction\">\n /**\n * The props for reactions component.\n */\n reactionsProps?: Omit<BubbleReactionsProps, \"children\">\n /**\n * The theme props for group component in start direction.\n */\n startGroupProps?: Omit<BubbleGroupProps, \"children\" | \"direction\" | \"items\">\n /**\n * The theme props for item component in start direction.\n */\n startItemProps?: Omit<BubbleItemProps, \"children\" | \"direction\">\n}\n\nconst {\n component,\n ComponentContext,\n PropsContext: BubblePropsContext,\n useComponentContext,\n usePropsContext: useBubblePropsContext,\n withContext,\n withProvider,\n useRootComponentProps,\n} = createSlotComponent<BubbleItemProps, BubbleStyle, ComponentContext>(\n \"bubble\",\n bubbleStyle,\n)\n\nexport { BubblePropsContext, useBubblePropsContext }\n\n/**\n * `Bubble` is a component that displays conversational content in a message bubble.\n *\n * @see https://yamada-ui.com/docs/components/bubble\n */\nexport const BubbleRoot = component<\"div\", BubbleRootProps>((props) => {\n const [\n ,\n {\n colorScheme,\n size,\n variant,\n children,\n items,\n contentProps,\n endGroupProps,\n endItemProps,\n groupProps,\n itemProps,\n reactionsProps,\n startGroupProps,\n startItemProps,\n ...rest\n },\n ] = useRootComponentProps(props, \"root\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\"],\n })\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map((props, index) => {\n if (\"children\" in props) {\n const { children, reactions, contentProps, reactionsProps, ...rest } =\n props\n\n return (\n <BubbleItem key={index} {...rest}>\n <BubbleContent {...contentProps}>{children}</BubbleContent>\n {reactions ? (\n <BubbleReactions {...reactionsProps}>{reactions}</BubbleReactions>\n ) : null}\n </BubbleItem>\n )\n } else {\n return <BubbleGroup key={index} {...props} />\n }\n })\n }, [children, items])\n const context = useMemo(\n () => ({ colorScheme, size, variant }),\n [colorScheme, size, variant],\n )\n const componentContext = useMemo(\n () => ({\n contentProps,\n endGroupProps,\n endItemProps,\n groupProps,\n itemProps,\n reactionsProps,\n startGroupProps,\n startItemProps,\n }),\n [\n groupProps,\n itemProps,\n contentProps,\n reactionsProps,\n startItemProps,\n endItemProps,\n startGroupProps,\n endGroupProps,\n ],\n )\n\n return (\n <BubblePropsContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div {...rest}>{computedChildren}</styled.div>\n </ComponentContext>\n </BubblePropsContext>\n )\n}, \"root\")()\n\nexport interface BubbleGroupProps\n extends\n Merge<HTMLStyledProps, Pick<BubbleItemProps, \"direction\">>,\n ThemeProps<BubbleStyle> {\n /**\n * If provided, generate elements based on items.\n */\n items?: BubbleItemWithContent[]\n}\n\nexport const BubbleGroup = component<\"div\", BubbleGroupProps>((props) => {\n const [\n ,\n { colorScheme, size, variant, children, direction, items, ...rest },\n ] = useRootComponentProps(props, \"group\", {\n transferProps: [\"variant\", \"colorScheme\", \"size\"],\n })\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map(\n (\n { children, reactions, contentProps, reactionsProps, ...rest },\n index,\n ) => (\n <BubbleItem key={index} {...rest}>\n <BubbleContent {...contentProps}>{children}</BubbleContent>\n {reactions ? (\n <BubbleReactions {...reactionsProps}>{reactions}</BubbleReactions>\n ) : null}\n </BubbleItem>\n ),\n )\n }, [children, items])\n\n const context = useMemo(\n () => ({ colorScheme, size, variant, direction }),\n [colorScheme, size, variant, direction],\n )\n\n return (\n <BubblePropsContext value={context}>\n <styled.div {...rest}>{computedChildren}</styled.div>\n </BubblePropsContext>\n )\n}, \"group\")(({ direction = \"start\", ...rest }) => {\n const { endGroupProps, groupProps, startGroupProps } = useComponentContext()\n const directionProps = direction === \"start\" ? startGroupProps : endGroupProps\n\n return mergeProps(groupProps, directionProps, { direction, ...rest })()\n})\n\nexport interface BubbleItemProps\n extends\n Omit<HTMLStyledProps, \"direction\">,\n Pick<BubbleRootProps, \"contentProps\">,\n ThemeProps<BubbleStyle> {\n /**\n * The inline direction of the bubble.\n *\n * @default 'start'\n */\n direction?: SimpleDirection\n}\n\nexport const BubbleItem = withProvider<\"div\", BubbleItemProps>(\n ({ children, direction, contentProps, ...rest }) => {\n const [content, customContent, reactions] = useSplitChildren(\n children,\n BubbleContent,\n BubbleReactions,\n )\n\n return (\n <styled.div data-direction={direction} {...rest}>\n {customContent ?? (\n <BubbleContent {...contentProps}>{content}</BubbleContent>\n )}\n\n {reactions}\n </styled.div>\n )\n },\n \"item\",\n)((props) => {\n const contextProps = useBubblePropsContext()\n const { endItemProps, itemProps, startItemProps } = useComponentContext()\n const direction = props.direction ?? contextProps?.direction ?? \"start\"\n const directionProps = direction === \"start\" ? startItemProps : endItemProps\n\n return mergeProps(contextProps, itemProps, directionProps, {\n ...props,\n direction,\n })()\n})\n\nexport interface BubbleContentProps extends HTMLStyledProps {}\n\nexport const BubbleContent = withContext<\"div\", BubbleContentProps>(\n \"div\",\n \"content\",\n)(undefined, (props) => {\n const { contentProps } = useComponentContext()\n\n return mergeProps(contentProps, props)()\n})\n\nexport interface BubbleReactionsProps extends HTMLStyledProps {\n /**\n * The placement of the reactions.\n *\n * @default 'end-end'\n */\n placement?: Exclude<Direction, \"end\" | \"start\" | `center-${string}`>\n}\n\nexport const BubbleReactions = withContext<\"div\", BubbleReactionsProps>(\n \"div\",\n \"reactions\",\n)(undefined, (props) => {\n const { reactionsProps } = useComponentContext()\n const { placement = \"end-end\", ...rest } = mergeProps(reactionsProps, props)()\n\n return { \"data-placement\": placement, ...rest }\n})\n"],"mappings":";;;;;;;;;AAwFA,MAAM,EACJ,WACA,kBACA,cAAc,oBACd,qBACA,iBAAiB,uBACjB,aACA,cACA,0BACEA,yBAAAA,oBACF,UACAC,qBAAAA,WACF;;;;;;AASA,MAAa,aAAa,WAAmC,UAAU;CACrE,MAAM,GAEJ,EACE,aACA,MACA,SACA,UACA,OACA,cACA,eACA,cACA,YACA,WACA,gBACA,iBACA,gBACA,GAAG,UAEH,sBA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ACF;CAEA,OACE,iBAAA,GAAA,kBAAA,KAAA,CAACF,gBAAAA,OAAO,KAAR;EAAY,kBAAgB;EAAW,GAAI;EAA3C,UAAA,CACG,iBACC,iBAAA,GAAA,kBAAA,IAAA,CAAC,eAAD;GAAe,GAAI;GAAe,UAAA;EAAuB,CAAA,GAG1D,SACS;;AAEhB,GACA,MACF,CAAC,EAAE,UAAU;CACX,MAAM,eAAe,sBAAsB;CAC3C,MAAM,EAAE,cAAc,WAAW,mBAAmB,oBAAoB;CACxE,MAAM,YAAY,MAAM,aAAa,cAAc,aAAa;CAGhE,OAAOC,cAAAA,WAAW,cAAc,WAFT,cAAc,UAAU,iBAAiB,cAEL;EACzD,GAAG;EACH;CACF,CAAC,CAAC,CAAC;AACL,CAAC;AAID,MAAa,gBAAgB,YAC3B,OACA,SACF,CAAC,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,iBAAiB,oBAAoB;CAE7C,OAAOA,cAAAA,WAAW,cAAc,KAAK,CAAC,CAAC;AACzC,CAAC;AAWD,MAAa,kBAAkB,YAC7B,OACA,WACF,CAAC,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,mBAAmB,oBAAoB;CAC/C,MAAM,EAAE,YAAY,WAAW,GAAG,SAASA,cAAAA,WAAW,gBAAgB,KAAK,CAAC,CAAC;CAE7E,OAAO;EAAE,kBAAkB;EAAW,GAAG;CAAK;AAChD,CAAC"}
@@ -0,0 +1,143 @@
1
+ //#region src/components/bubble/bubble.style.ts
2
+ const bubbleStyle = require("../../core/system/config.cjs").defineComponentSlotStyle({
3
+ base: {
4
+ content: {
5
+ maxW: "full",
6
+ minW: "0",
7
+ overflowWrap: "anywhere",
8
+ py: "{space-y}",
9
+ rounded: "calc(0.5lh + {space-y} + 1px)",
10
+ textAlign: "start",
11
+ whiteSpace: "pre-wrap"
12
+ },
13
+ group: {
14
+ display: "flex",
15
+ flexDirection: "column",
16
+ gap: "sm",
17
+ minW: "0",
18
+ w: "full"
19
+ },
20
+ item: {
21
+ display: "flex",
22
+ flexDirection: "column",
23
+ maxW: "4/5",
24
+ minW: "0",
25
+ position: "relative",
26
+ w: "fit-content",
27
+ _end: {
28
+ alignSelf: "flex-end",
29
+ me: "0",
30
+ ms: "auto"
31
+ },
32
+ _start: {
33
+ alignSelf: "flex-start",
34
+ me: "auto",
35
+ ms: "0"
36
+ }
37
+ },
38
+ reactions: {
39
+ "&[data-placement$=center]": {
40
+ insetInline: "0",
41
+ mx: "auto"
42
+ },
43
+ "&[data-placement$=end]": { insetInlineEnd: "3" },
44
+ "&[data-placement$=start]": { insetInlineStart: "3" },
45
+ "&[data-placement^=end]": {
46
+ insetBlockEnd: "-2",
47
+ translateY: "50%"
48
+ },
49
+ "&[data-placement^=start]": {
50
+ insetBlockStart: "-2",
51
+ translateY: "-50%"
52
+ },
53
+ alignItems: "center",
54
+ bg: "bg.panel",
55
+ borderColor: "bg",
56
+ display: "flex",
57
+ gap: "xs",
58
+ lineHeight: "normal",
59
+ position: "absolute",
60
+ px: "1.5",
61
+ py: "0.5",
62
+ rounded: "full",
63
+ w: "max-content",
64
+ zIndex: "1"
65
+ },
66
+ root: {
67
+ alignItems: "flex-start",
68
+ display: "flex",
69
+ flexDirection: "column",
70
+ gap: "xl",
71
+ minW: "0",
72
+ w: "full"
73
+ }
74
+ },
75
+ variants: {
76
+ ghost: {
77
+ content: {
78
+ bg: "transparent",
79
+ borderColor: "transparent",
80
+ rounded: "0"
81
+ },
82
+ item: {
83
+ maxW: "full",
84
+ w: "full"
85
+ }
86
+ },
87
+ outline: { content: { layerStyle: "outline" } },
88
+ panel: { content: { bg: "bg.panel" } },
89
+ solid: { content: { layerStyle: "solid" } },
90
+ subtle: { content: { layerStyle: "subtle" } },
91
+ surface: { content: { layerStyle: "surface" } }
92
+ },
93
+ sizes: {
94
+ sm: {
95
+ content: {
96
+ "--space-y": "spaces.2",
97
+ fontSize: "sm",
98
+ px: "3"
99
+ },
100
+ reactions: {
101
+ borderWidth: "3px",
102
+ fontSize: "xs"
103
+ }
104
+ },
105
+ md: {
106
+ content: {
107
+ "--space-y": "spaces.3",
108
+ fontSize: "md",
109
+ px: "4"
110
+ },
111
+ reactions: {
112
+ borderWidth: "5px",
113
+ fontSize: "sm"
114
+ }
115
+ },
116
+ lg: {
117
+ content: {
118
+ "--space-y": "spaces.4",
119
+ fontSize: "lg",
120
+ px: "5"
121
+ },
122
+ reactions: {
123
+ borderWidth: "5px",
124
+ fontSize: "md"
125
+ }
126
+ }
127
+ },
128
+ compounds: [{
129
+ css: { content: {
130
+ px: "0",
131
+ py: "0"
132
+ } },
133
+ variant: "ghost"
134
+ }],
135
+ defaultProps: {
136
+ size: "md",
137
+ variant: "panel"
138
+ }
139
+ });
140
+ //#endregion
141
+ exports.bubbleStyle = bubbleStyle;
142
+
143
+ //# sourceMappingURL=bubble.style.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubble.style.cjs","names":["defineComponentSlotStyle"],"sources":["../../../../src/components/bubble/bubble.style.ts"],"sourcesContent":["import { defineComponentSlotStyle } from \"../../core\"\n\nexport const bubbleStyle = defineComponentSlotStyle({\n base: {\n content: {\n maxW: \"full\",\n minW: \"0\",\n overflowWrap: \"anywhere\",\n py: \"{space-y}\",\n rounded: \"calc(0.5lh + {space-y} + 1px)\",\n textAlign: \"start\",\n whiteSpace: \"pre-wrap\",\n },\n group: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"sm\",\n minW: \"0\",\n w: \"full\",\n },\n item: {\n display: \"flex\",\n flexDirection: \"column\",\n maxW: \"4/5\",\n minW: \"0\",\n position: \"relative\",\n w: \"fit-content\",\n _end: {\n alignSelf: \"flex-end\",\n me: \"0\",\n ms: \"auto\",\n },\n _start: {\n alignSelf: \"flex-start\",\n me: \"auto\",\n ms: \"0\",\n },\n },\n reactions: {\n \"&[data-placement$=center]\": {\n insetInline: \"0\",\n mx: \"auto\",\n },\n \"&[data-placement$=end]\": {\n insetInlineEnd: \"3\",\n },\n \"&[data-placement$=start]\": {\n insetInlineStart: \"3\",\n },\n \"&[data-placement^=end]\": {\n insetBlockEnd: \"-2\",\n translateY: \"50%\",\n },\n \"&[data-placement^=start]\": {\n insetBlockStart: \"-2\",\n translateY: \"-50%\",\n },\n alignItems: \"center\",\n bg: \"bg.panel\",\n borderColor: \"bg\",\n display: \"flex\",\n gap: \"xs\",\n lineHeight: \"normal\",\n position: \"absolute\",\n px: \"1.5\",\n py: \"0.5\",\n rounded: \"full\",\n w: \"max-content\",\n zIndex: \"1\",\n },\n root: {\n alignItems: \"flex-start\",\n display: \"flex\",\n flexDirection: \"column\",\n gap: \"xl\",\n minW: \"0\",\n w: \"full\",\n },\n },\n\n variants: {\n ghost: {\n content: {\n bg: \"transparent\",\n borderColor: \"transparent\",\n rounded: \"0\",\n },\n item: { maxW: \"full\", w: \"full\" },\n },\n outline: { content: { layerStyle: \"outline\" } },\n panel: { content: { bg: \"bg.panel\" } },\n solid: { content: { layerStyle: \"solid\" } },\n subtle: { content: { layerStyle: \"subtle\" } },\n surface: { content: { layerStyle: \"surface\" } },\n },\n\n sizes: {\n sm: {\n content: { \"--space-y\": \"spaces.2\", fontSize: \"sm\", px: \"3\" },\n reactions: { borderWidth: \"3px\", fontSize: \"xs\" },\n },\n md: {\n content: { \"--space-y\": \"spaces.3\", fontSize: \"md\", px: \"4\" },\n reactions: { borderWidth: \"5px\", fontSize: \"sm\" },\n },\n lg: {\n content: { \"--space-y\": \"spaces.4\", fontSize: \"lg\", px: \"5\" },\n reactions: { borderWidth: \"5px\", fontSize: \"md\" },\n },\n },\n\n compounds: [\n {\n css: { content: { px: \"0\", py: \"0\" } },\n variant: \"ghost\",\n },\n ],\n\n defaultProps: {\n size: \"md\",\n variant: \"panel\",\n },\n})\n\nexport type BubbleStyle = typeof bubbleStyle\n"],"mappings":";AAEA,MAAa,oDAAcA,CAAAA,CAAAA,yBAAyB;CAClD,MAAM;EACJ,SAAS;GACP,MAAM;GACN,MAAM;GACN,cAAc;GACd,IAA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,IAAI;GACF,SAAS;IAAE,aAAa;IAAY,UAAU;IAAM,IAAI;GAAI;GAC5D,WAAW;IAAE,aAAa;IAAO,UAAU;GAAK;EAClD;EACA,IAAI;GACF,SAAS;IAAE,aAAa;IAAY,UAAU;IAAM,IAAI;GAAI;GAC5D,WAAW;IAAE,aAAa;IAAO,UAAU;GAAK;EAClD;CACF;CAEA,WAAW,CACT;EACE,KAAK,EAAE,SAAS;GAAE,IAAI;GAAK,IAAI;EAAI,EAAE;EACrC,SAAS;CACX,CACF;CAEA,cAAc;EACZ,MAAM;EACN,SAAS;CACX;AACF,CAAC"}
@@ -0,0 +1,18 @@
1
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
+ const require_bubble_style = require("./bubble.style.cjs");
3
+ const require_bubble = require("./bubble.cjs");
4
+ const require_namespace = require("./namespace.cjs");
5
+ Object.defineProperty(exports, "Bubble", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return require_namespace.namespace_exports;
9
+ }
10
+ });
11
+ exports.BubbleContent = require_bubble.BubbleContent;
12
+ exports.BubbleGroup = require_bubble.BubbleGroup;
13
+ exports.BubbleItem = require_bubble.BubbleItem;
14
+ exports.BubblePropsContext = require_bubble.BubblePropsContext;
15
+ exports.BubbleReactions = require_bubble.BubbleReactions;
16
+ exports.BubbleRoot = require_bubble.BubbleRoot;
17
+ exports.bubbleStyle = require_bubble_style.bubbleStyle;
18
+ exports.useBubblePropsContext = require_bubble.useBubblePropsContext;
@@ -0,0 +1,28 @@
1
+ const require_runtime = require("../../_virtual/_rolldown/runtime.cjs");
2
+ const require_bubble = require("./bubble.cjs");
3
+ //#region src/components/bubble/namespace.ts
4
+ var namespace_exports = /* @__PURE__ */ require_runtime.__exportAll({
5
+ Content: () => require_bubble.BubbleContent,
6
+ Group: () => require_bubble.BubbleGroup,
7
+ Item: () => require_bubble.BubbleItem,
8
+ PropsContext: () => require_bubble.BubblePropsContext,
9
+ Reactions: () => require_bubble.BubbleReactions,
10
+ Root: () => require_bubble.BubbleRoot,
11
+ usePropsContext: () => require_bubble.useBubblePropsContext
12
+ });
13
+ //#endregion
14
+ exports.Content = require_bubble.BubbleContent;
15
+ exports.Group = require_bubble.BubbleGroup;
16
+ exports.Item = require_bubble.BubbleItem;
17
+ exports.PropsContext = require_bubble.BubblePropsContext;
18
+ exports.Reactions = require_bubble.BubbleReactions;
19
+ exports.Root = require_bubble.BubbleRoot;
20
+ Object.defineProperty(exports, "namespace_exports", {
21
+ enumerable: true,
22
+ get: function() {
23
+ return namespace_exports;
24
+ }
25
+ });
26
+ exports.usePropsContext = require_bubble.useBubblePropsContext;
27
+
28
+ //# sourceMappingURL=namespace.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"namespace.cjs","names":[],"sources":["../../../../src/components/bubble/namespace.ts"],"sourcesContent":["export type {\n BubbleContentProps as ContentProps,\n BubbleGroupProps as GroupProps,\n BubbleItemProps as ItemProps,\n BubbleItem as ItemType,\n BubbleReactionsProps as ReactionsProps,\n BubbleRootProps as RootProps,\n} from \"./bubble\"\nexport {\n BubbleContent as Content,\n BubbleGroup as Group,\n BubbleItem as Item,\n BubblePropsContext as PropsContext,\n BubbleReactions as Reactions,\n BubbleRoot as Root,\n useBubblePropsContext as usePropsContext,\n} from \"./bubble\"\n"],"mappings":""}
@@ -49,7 +49,7 @@ function createComponent(name, style) {
49
49
  function useClassName(name, className) {
50
50
  const system = require_system_provider.useSystem();
51
51
  className = (0, require_utils_index.utils_exports.runIfFn)(className, system);
52
- className ??= require_utils.getClassName(name, defaultClassName)(system);
52
+ className ??= defaultClassName ?? require_utils.getClassName(name)(system);
53
53
  return className;
54
54
  }
55
55
  function useComponentProps(props, { className, withContext = true, transferProps } = {}) {
@@ -1 +1 @@
1
- {"version":3,"file":"create-component.cjs","names":["Fragment","styled","getDisplayName","createContext","useSystem","getClassName","mergeProps","useComponentStyle","chainProps","getSlotClassName","useComponentSlotStyle","mergeSlotCSS"],"sources":["../../../../src/core/components/create-component.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, FunctionComponent } from \"react\"\nimport type { AnyString, Dict, Merge } from \"../../utils\"\nimport type { CSSObject, CSSSlotObject } from \"../css\"\nimport type {\n ComponentSlotStyle,\n ComponentStyle,\n StyledOptions,\n System,\n WithoutThemeProps,\n} from \"../system\"\nimport type {\n As,\n DOMElement,\n HTMLStyledProps,\n Component as OriginalComponent,\n} from \"./index.type\"\nimport { Fragment } from \"react\"\nimport {\n createContext,\n cx,\n isArray,\n isFunction,\n isObject,\n isString,\n runIfFn,\n toArray,\n toCamelCase,\n toPascalCase,\n} from \"../../utils\"\nimport { styled, useSystem } from \"../system\"\nimport { chainProps, mergeProps } from \"./props\"\nimport {\n getSlotClassName,\n mergeSlotCSS,\n useComponentSlotStyle,\n useComponentStyle,\n} from \"./use-component-style\"\nimport { getClassName, getDisplayName } from \"./utils\"\n\ntype AsWithFragment = \"fragment\" | As\ntype ClassName = ((system: System) => string) | string\n\ntype Component<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n> = Y extends \"fragment\"\n ? FunctionComponent<M>\n : OriginalComponent<Exclude<Y, \"fragment\">, M>\n\nexport type ComponentSlotName<\n Y extends ComponentSlotStyle | ComponentStyle = ComponentSlotStyle,\n> = AnyString | Extract<keyof NonNullable<Y[\"base\"]>, string>\n\nexport type ComponentSlot<Y extends string> =\n | [Y, Y]\n | Y\n | { name: string; slot: [Y, Y] | Y }\n\nexport type InitialProps<Y extends Dict = Dict> =\n | ((props: Y) => any)\n | Partial<Y>\nexport type SuperProps<Y extends Dict = Dict> = ((props: Y) => any) | Y\n\nexport type SuperWithoutThemeProps<\n Y extends Dict = Dict,\n M extends Dict = Dict,\n D extends keyof Y = keyof Y,\n> = ((props: WithoutThemeProps<Y, M, D>) => any) | WithoutThemeProps<Y, M, D>\n\nexport interface UseComponentPropsOptions<\n Y extends number | string | symbol = string,\n> {\n className?: ClassName\n withContext?: boolean\n transferProps?: Y[]\n}\n\nexport interface ComponentOptions extends Omit<StyledOptions, \"transferProps\"> {\n className?: ClassName\n shouldStyleProps?: boolean\n}\n\ninterface classNameOptions<Y extends string = string> {\n className?: ClassName\n slot?: ComponentSlot<Y>\n}\n\nexport interface ComponentWithContextOptions<\n Y extends number | string | symbol = string,\n>\n extends ComponentOptions, UseComponentPropsOptions<Y> {}\n\nfunction createProxyComponent<\n Y extends AsWithFragment = \"div\",\n M extends Dict = Dict,\n>(el: FC<M> | Y, { shouldStyleProps, ...options }: ComponentOptions = {}) {\n options.shouldForwardProp ??= isFunction(el)\n shouldStyleProps ??= !isFunction(el)\n\n if (el === \"fragment\") el = Fragment\n\n if (shouldStyleProps || isString(el)) {\n const ProxyComponent = styled(el as As, options)\n\n ProxyComponent.displayName = \"ProxyComponent\"\n\n return ProxyComponent\n } else {\n el.displayName ??= \"ProxyComponent\"\n\n return el as FC<M>\n }\n}\n\nfunction withDisplayName<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n>(Component: FC<M>, displayName: string) {\n Object.defineProperty(Component, \"name\", { value: displayName })\n Object.defineProperty(Component, \"displayName\", { value: displayName })\n\n return Component as Component<Y, M>\n}\n\nfunction getSlotKey<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"unknown\"\n\n if (isArray(slot) || !isObject(slot))\n return toCamelCase(toArray(slot).join(\"-\"))\n else return toCamelCase(slot.name)\n}\n\nfunction getSlotName<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"\"\n\n if (isArray(slot))\n return slot.map((value) => toPascalCase(value as string)).join(\"\")\n else if (isObject(slot)) return toPascalCase(slot.name)\n else return toPascalCase(slot)\n}\n\nexport function createComponent<\n Y extends object = {},\n M extends ComponentStyle = Dict,\n D extends Dict = Dict,\n>(name: string, style?: M) {\n const defaultClassName = style?.className\n const defaultDisplayName = getDisplayName(name)\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${defaultDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${defaultDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(name?: string, className?: ClassName) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getClassName(name, defaultClassName)(system)\n\n return className\n }\n\n function useComponentProps<H extends Y = Y, R extends keyof H = keyof H>(\n props: H,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= defaultClassName\n className ??= getClassName(name)(system)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as H)\n : props\n const [, rest] = useComponentStyle(mergedProps, {\n name,\n className,\n style,\n transferProps,\n })\n\n return rest\n }\n\n function component<D extends AsWithFragment = \"div\", H extends Dict = Y>(\n el: D | FC<H>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperProps<H>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps<any>(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withContext<\n D extends AsWithFragment = \"div\",\n H extends Y = Y,\n R extends keyof H = keyof H,\n >(\n el: D | FC<WithoutThemeProps<H, M, R>>,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<R> = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperWithoutThemeProps<H, M, R>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useComponentProps(computedProps, {\n className,\n withContext,\n transferProps,\n })\n const rest = chainProps<any>(...toArray(superProps))()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n useComponentContext,\n usePropsContext,\n withContext,\n useComponentProps,\n }\n}\n\nexport function createSlotComponent<\n Y extends object = {},\n M extends ComponentSlotStyle = Dict,\n D extends Dict = Dict,\n>(rootName: string, style?: M) {\n const rootClassName = style?.className\n const rootDisplayName = getDisplayName(rootName)\n const classNameMap = new Map<string, classNameOptions>()\n const [StyleContext, useStyleContext] = createContext<\n CSSSlotObject<ComponentSlotName<M>>\n >({\n name: `${rootDisplayName}StyleContext`,\n })\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${rootDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${rootDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(\n slot?: ComponentSlot<ComponentSlotName<M>>,\n className?: ClassName,\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return className\n }\n\n function useClassNames() {\n const system = useSystem()\n const entries = classNameMap.entries().map(([key, { className, slot }]) => {\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return [key, className]\n })\n\n return Object.fromEntries(\n entries.filter(([_, className]) => className),\n ) as { [key: string]: string }\n }\n\n function useRootComponentProps<\n Y extends Dict = {},\n R extends keyof Y = keyof Y,\n >(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ): [\n CSSSlotObject,\n Merge<WithoutThemeProps<Y, M, R>, { css?: CSSObject | CSSObject[] }>,\n ] {\n className = useClassName(slot, className)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as Y)\n : props\n const [css, rest] = useComponentSlotStyle(mergedProps, {\n name: rootName,\n className,\n style,\n slot,\n transferProps,\n })\n\n return [css, rest]\n }\n\n function useSlotComponentProps<Y extends Dict = {}>(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { className }: Omit<UseComponentPropsOptions, \"transferProps\"> = {},\n ) {\n className = useClassName(slot, className)\n\n const style = useStyleContext()\n\n return {\n ...props,\n className: cx(className, props.className),\n css: mergeSlotCSS(slot, style, props.css),\n }\n }\n\n function component<H extends AsWithFragment = \"div\", R extends Dict = Dict>(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n className = useClassName(slot, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withProvider<\n H extends AsWithFragment = \"div\",\n R extends Y = Y,\n T extends keyof R = keyof R,\n >(\n el: FC<WithoutThemeProps<R, M, T>> | H,\n slot: ComponentSlot<ComponentSlotName<M>> = \"root\",\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<T> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperWithoutThemeProps<R, M, T>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const [context, mergedProps] = useRootComponentProps(\n computedProps,\n slot,\n {\n className,\n withContext,\n transferProps,\n },\n )\n const rest = chainProps<any>(...superProps)()(mergedProps)\n\n return (\n <StyleContext value={context}>\n <ProxyComponent {...rest} />\n </StyleContext>\n )\n }, displayName)\n }\n }\n\n function withContext<\n H extends AsWithFragment = \"div\",\n R extends Dict = H extends DOMElement ? HTMLStyledProps<H> : Dict,\n >(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n name,\n className,\n withContext,\n ...options\n }: Omit<ComponentWithContextOptions, \"transferProps\"> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useSlotComponentProps(computedProps, slot, {\n className,\n withContext,\n })\n const rest = chainProps(...superProps)()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n StyleContext,\n useClassNames,\n useComponentContext,\n usePropsContext,\n useStyleContext,\n withContext,\n withProvider,\n useRootComponentProps,\n useSlotComponentProps,\n }\n}\n"],"mappings":";;;;;;;;;;;AA8FA,SAAS,qBAGP,IAAe,EAAE,kBAAkB,GAAG,YAA8B,CAAC,GAAG;CACxE,QAAQ,uBAAA,GAAA,oBAAA,cAAsB,WAAA,CAAW,EAAE;CAC3C,qBAAqB,EAAA,GAAA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AAa,KAAK,IAClBI,cAAAA,WAAW,gBAAgB,CAAC,GAAG,KAAK,CAAC,CAAC,GAGxC,MACA;KACE;KACA;KACA;IACF,CACF;IACA,MAAM,OAAOE,cAAAA,WAAgB,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW;IAEzD,OACE,iBAAA,GAAA,kBAAA,IAAA,CAAC,cAAD;KAAc,OAAO;KACnB,UAAA,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD,EAAgB,GAAI,KAAO,CAAA;IACf,CAAA;GAElB,GAAG,WAAW;EAChB;CACF;CAEA,SAAS,YAIP,IACA,MACA,EACE,MACA,WACA,aACA,GAAG,YACmD,CAAC,GACzD;EACA,MAAM,iBAAiB,qBAAqB,IAAI,OAAO;EACvD,MAAM,UAAU,WAAW,IAAI;EAC/B,MAAM,WAAW,YAAY,IAAI;EACjC,MAAM,cAAcN,cAAAA,eAAe,MAAM,GAAG,kBAAkB,UAAU;EAExE,aAAa,IAAI,SAAS;GAAE;GAAW;EAAK,CAAC;EAE7C,OAAO,SACL,cACA,GAAG,YACH;GACA,OAAO,iBAAuB,UAAU;IAItC,MAAM,cAAc,uBAAA,GAAA,oBAAA,cAHE,WAAA,CAAW,YAAY,IACzC,aAAa,KAAK,IAClBI,cAAAA,WAAW,gBAAgB,CAAC,GAAG,KAAK,CAAC,CAAC,GACe,MAAM;KAC7D;KACA;IACF,CAAC;IACD,MAAM,OAAOE,cAAAA,WAAW,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC,WAAW;IAEpD,OAAO,iBAAA,GAAA,kBAAA,IAAA,CAAC,gBAAD,EAAgB,GAAI,KAAO,CAAA;GACpC,GAAG,WAAW;EAChB;CACF;CAEA,OAAO;EACL;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF;AACF"}
1
+ {"version":3,"file":"create-component.cjs","names":["Fragment","styled","getDisplayName","createContext","useSystem","getClassName","mergeProps","useComponentStyle","chainProps","getSlotClassName","useComponentSlotStyle","mergeSlotCSS"],"sources":["../../../../src/core/components/create-component.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, FunctionComponent } from \"react\"\nimport type { AnyString, Dict, Merge } from \"../../utils\"\nimport type { CSSObject, CSSSlotObject } from \"../css\"\nimport type {\n ComponentSlotStyle,\n ComponentStyle,\n StyledOptions,\n System,\n WithoutThemeProps,\n} from \"../system\"\nimport type {\n As,\n DOMElement,\n HTMLStyledProps,\n Component as OriginalComponent,\n} from \"./index.type\"\nimport { Fragment } from \"react\"\nimport {\n createContext,\n cx,\n isArray,\n isFunction,\n isObject,\n isString,\n runIfFn,\n toArray,\n toCamelCase,\n toPascalCase,\n} from \"../../utils\"\nimport { styled, useSystem } from \"../system\"\nimport { chainProps, mergeProps } from \"./props\"\nimport {\n getSlotClassName,\n mergeSlotCSS,\n useComponentSlotStyle,\n useComponentStyle,\n} from \"./use-component-style\"\nimport { getClassName, getDisplayName } from \"./utils\"\n\ntype AsWithFragment = \"fragment\" | As\ntype ClassName = ((system: System) => string) | string\n\ntype Component<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n> = Y extends \"fragment\"\n ? FunctionComponent<M>\n : OriginalComponent<Exclude<Y, \"fragment\">, M>\n\nexport type ComponentSlotName<\n Y extends ComponentSlotStyle | ComponentStyle = ComponentSlotStyle,\n> = AnyString | Extract<keyof NonNullable<Y[\"base\"]>, string>\n\nexport type ComponentSlot<Y extends string> =\n | [Y, Y]\n | Y\n | { name: string; slot: [Y, Y] | Y }\n\nexport type InitialProps<Y extends Dict = Dict> =\n | ((props: Y) => any)\n | Partial<Y>\nexport type SuperProps<Y extends Dict = Dict> = ((props: Y) => any) | Y\n\nexport type SuperWithoutThemeProps<\n Y extends Dict = Dict,\n M extends Dict = Dict,\n D extends keyof Y = keyof Y,\n> = ((props: WithoutThemeProps<Y, M, D>) => any) | WithoutThemeProps<Y, M, D>\n\nexport interface UseComponentPropsOptions<\n Y extends number | string | symbol = string,\n> {\n className?: ClassName\n withContext?: boolean\n transferProps?: Y[]\n}\n\nexport interface ComponentOptions extends Omit<StyledOptions, \"transferProps\"> {\n className?: ClassName\n shouldStyleProps?: boolean\n}\n\ninterface classNameOptions<Y extends string = string> {\n className?: ClassName\n slot?: ComponentSlot<Y>\n}\n\nexport interface ComponentWithContextOptions<\n Y extends number | string | symbol = string,\n>\n extends ComponentOptions, UseComponentPropsOptions<Y> {}\n\nfunction createProxyComponent<\n Y extends AsWithFragment = \"div\",\n M extends Dict = Dict,\n>(el: FC<M> | Y, { shouldStyleProps, ...options }: ComponentOptions = {}) {\n options.shouldForwardProp ??= isFunction(el)\n shouldStyleProps ??= !isFunction(el)\n\n if (el === \"fragment\") el = Fragment\n\n if (shouldStyleProps || isString(el)) {\n const ProxyComponent = styled(el as As, options)\n\n ProxyComponent.displayName = \"ProxyComponent\"\n\n return ProxyComponent\n } else {\n el.displayName ??= \"ProxyComponent\"\n\n return el as FC<M>\n }\n}\n\nfunction withDisplayName<\n Y extends AsWithFragment = AsWithFragment,\n M extends object = {},\n>(Component: FC<M>, displayName: string) {\n Object.defineProperty(Component, \"name\", { value: displayName })\n Object.defineProperty(Component, \"displayName\", { value: displayName })\n\n return Component as Component<Y, M>\n}\n\nfunction getSlotKey<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"unknown\"\n\n if (isArray(slot) || !isObject(slot))\n return toCamelCase(toArray(slot).join(\"-\"))\n else return toCamelCase(slot.name)\n}\n\nfunction getSlotName<Y extends string>(slot?: ComponentSlot<Y>) {\n if (!slot) return \"\"\n\n if (isArray(slot))\n return slot.map((value) => toPascalCase(value as string)).join(\"\")\n else if (isObject(slot)) return toPascalCase(slot.name)\n else return toPascalCase(slot)\n}\n\nexport function createComponent<\n Y extends object = {},\n M extends ComponentStyle = Dict,\n D extends Dict = Dict,\n>(name: string, style?: M) {\n const defaultClassName = style?.className\n const defaultDisplayName = getDisplayName(name)\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${defaultDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${defaultDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(name?: string, className?: ClassName) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= defaultClassName ?? getClassName(name)(system)\n\n return className\n }\n\n function useComponentProps<H extends Y = Y, R extends keyof H = keyof H>(\n props: H,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= defaultClassName\n className ??= getClassName(name)(system)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as H)\n : props\n const [, rest] = useComponentStyle(mergedProps, {\n name,\n className,\n style,\n transferProps,\n })\n\n return rest\n }\n\n function component<D extends AsWithFragment = \"div\", H extends Dict = Y>(\n el: D | FC<H>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperProps<H>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps<any>(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withContext<\n D extends AsWithFragment = \"div\",\n H extends Y = Y,\n R extends keyof H = keyof H,\n >(\n el: D | FC<WithoutThemeProps<H, M, R>>,\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<R> = {},\n ) {\n const displayName = getDisplayName(name, defaultDisplayName)\n const ProxyComponent = createProxyComponent(el, options)\n\n return function (\n initialProps?: InitialProps<H>,\n ...superProps: SuperWithoutThemeProps<H, M, R>[]\n ) {\n return withDisplayName<D, H>((props) => {\n className = useClassName(name, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useComponentProps(computedProps, {\n className,\n withContext,\n transferProps,\n })\n const rest = chainProps<any>(...toArray(superProps))()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n useComponentContext,\n usePropsContext,\n withContext,\n useComponentProps,\n }\n}\n\nexport function createSlotComponent<\n Y extends object = {},\n M extends ComponentSlotStyle = Dict,\n D extends Dict = Dict,\n>(rootName: string, style?: M) {\n const rootClassName = style?.className\n const rootDisplayName = getDisplayName(rootName)\n const classNameMap = new Map<string, classNameOptions>()\n const [StyleContext, useStyleContext] = createContext<\n CSSSlotObject<ComponentSlotName<M>>\n >({\n name: `${rootDisplayName}StyleContext`,\n })\n const [ComponentContext, useComponentContext] = createContext<D>({\n name: `${rootDisplayName}Context`,\n })\n const [PropsContext, usePropsContext] = createContext<Partial<Y>>({\n name: `${rootDisplayName}PropsContext`,\n strict: false,\n })\n\n function useClassName(\n slot?: ComponentSlot<ComponentSlotName<M>>,\n className?: ClassName,\n ) {\n const system = useSystem()\n\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return className\n }\n\n function useClassNames() {\n const system = useSystem()\n const entries = classNameMap.entries().map(([key, { className, slot }]) => {\n className = runIfFn(className, system)\n className ??= getSlotClassName(\n rootClassName ?? getClassName(rootName)(system),\n slot,\n )\n\n return [key, className]\n })\n\n return Object.fromEntries(\n entries.filter(([_, className]) => className),\n ) as { [key: string]: string }\n }\n\n function useRootComponentProps<\n Y extends Dict = {},\n R extends keyof Y = keyof Y,\n >(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n className,\n withContext = true,\n transferProps,\n }: UseComponentPropsOptions<R> = {},\n ): [\n CSSSlotObject,\n Merge<WithoutThemeProps<Y, M, R>, { css?: CSSObject | CSSObject[] }>,\n ] {\n className = useClassName(slot, className)\n\n const contextProps = usePropsContext() ?? {}\n const mergedProps = withContext\n ? (mergeProps(contextProps, props)() as Y)\n : props\n const [css, rest] = useComponentSlotStyle(mergedProps, {\n name: rootName,\n className,\n style,\n slot,\n transferProps,\n })\n\n return [css, rest]\n }\n\n function useSlotComponentProps<Y extends Dict = {}>(\n props: Y,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { className }: Omit<UseComponentPropsOptions, \"transferProps\"> = {},\n ) {\n className = useClassName(slot, className)\n\n const style = useStyleContext()\n\n return {\n ...props,\n className: cx(className, props.className),\n css: mergeSlotCSS(slot, style, props.css),\n }\n }\n\n function component<H extends AsWithFragment = \"div\", R extends Dict = Dict>(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n { name, className, ...options }: ComponentOptions = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n className = useClassName(slot, className)\n\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = chainProps(...superProps)()(computedProps)\n\n return (\n <ProxyComponent\n {...mergedProps}\n className={cx(className, mergedProps.className)}\n />\n )\n }, displayName)\n }\n }\n\n function withProvider<\n H extends AsWithFragment = \"div\",\n R extends Y = Y,\n T extends keyof R = keyof R,\n >(\n el: FC<WithoutThemeProps<R, M, T>> | H,\n slot: ComponentSlot<ComponentSlotName<M>> = \"root\",\n {\n name,\n className,\n withContext,\n transferProps,\n ...options\n }: ComponentWithContextOptions<T> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperWithoutThemeProps<R, M, T>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const [context, mergedProps] = useRootComponentProps(\n computedProps,\n slot,\n {\n className,\n withContext,\n transferProps,\n },\n )\n const rest = chainProps<any>(...superProps)()(mergedProps)\n\n return (\n <StyleContext value={context}>\n <ProxyComponent {...rest} />\n </StyleContext>\n )\n }, displayName)\n }\n }\n\n function withContext<\n H extends AsWithFragment = \"div\",\n R extends Dict = H extends DOMElement ? HTMLStyledProps<H> : Dict,\n >(\n el: FC<R> | H,\n slot?: ComponentSlot<ComponentSlotName<M>>,\n {\n name,\n className,\n withContext,\n ...options\n }: Omit<ComponentWithContextOptions, \"transferProps\"> = {},\n ) {\n const ProxyComponent = createProxyComponent(el, options)\n const slotKey = getSlotKey(slot)\n const slotName = getSlotName(slot)\n const displayName = getDisplayName(name, `${rootDisplayName}${slotName}`)\n\n classNameMap.set(slotKey, { className, slot })\n\n return function (\n initialProps?: InitialProps<R>,\n ...superProps: SuperProps<R>[]\n ) {\n return withDisplayName<H, R>((props) => {\n const computedProps = isFunction(initialProps)\n ? initialProps(props)\n : mergeProps(initialProps ?? {}, props)()\n const mergedProps = useSlotComponentProps(computedProps, slot, {\n className,\n withContext,\n })\n const rest = chainProps(...superProps)()(mergedProps)\n\n return <ProxyComponent {...rest} />\n }, displayName)\n }\n }\n\n return {\n component,\n ComponentContext,\n PropsContext,\n StyleContext,\n useClassNames,\n useComponentContext,\n usePropsContext,\n useStyleContext,\n withContext,\n withProvider,\n useRootComponentProps,\n useSlotComponentProps,\n }\n}\n"],"mappings":";;;;;;;;;;;AA8FA,SAAS,qBAGP,IAAe,EAAE,kBAAkB,GAAG,YAA8B,CAAC,GAAG;CACxE,QAAQ,uBAAA,GAAA,o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  _dark: ":host([data-mode=dark]) &, .dark &:not([data-mode]), [data-mode=dark] &:not([data-mode]), &[data-mode=dark]",
45
45
  /**
46
- * The CSS `&:is([data-end], [data-group-end])` attribute selector.
46
+ * The CSS `&:is([data-end], [data-group-end], [data-direction=end])` attribute selector.
47
47
  */
48
- _end: "&:is([data-end], [data-group-end])",
48
+ _end: "&:is([data-end], [data-group-end], [data-direction=end])",
49
49
  /**
50
50
  * The CSS `&:is([data-expanded], [aria-expanded=true])` attribute selector.
51
51
  */
@@ -151,9 +151,9 @@ const attributes = {
151
151
  */
152
152
  _rtl: "[dir=rtl] &",
153
153
  /**
154
- * The CSS `&:is([data-start], [data-group-start])` attribute selector.
154
+ * The CSS `&:is([data-start], [data-group-start], [data-direction=start])` attribute selector.
155
155
  */
156
- _start: "&:is([data-start], [data-group-start])",
156
+ _start: "&:is([data-start], [data-group-start], [data-direction=start])",
157
157
  /**
158
158
  * The CSS `&:is([data-selected], [aria-selected=true])` attribute selector.
159
159
  */