@yamada-ui/react 2.3.0-dev-20261027074222 → 2.3.0-dev-20261028024203
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/components/bubble/bubble.cjs +163 -0
- package/dist/cjs/components/bubble/bubble.cjs.map +1 -0
- package/dist/cjs/components/bubble/bubble.style.cjs +143 -0
- package/dist/cjs/components/bubble/bubble.style.cjs.map +1 -0
- package/dist/cjs/components/bubble/index.cjs +18 -0
- package/dist/cjs/components/bubble/namespace.cjs +28 -0
- package/dist/cjs/components/bubble/namespace.cjs.map +1 -0
- package/dist/cjs/components/prose/prose.cjs +1 -1
- package/dist/cjs/components/prose/prose.cjs.map +1 -1
- package/dist/cjs/core/css/conditions.cjs +4 -4
- package/dist/cjs/core/css/conditions.cjs.map +1 -1
- package/dist/cjs/index.cjs +125 -99
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/esm/components/bubble/bubble.js +157 -0
- package/dist/esm/components/bubble/bubble.js.map +1 -0
- package/dist/esm/components/bubble/bubble.style.js +144 -0
- package/dist/esm/components/bubble/bubble.style.js.map +1 -0
- package/dist/esm/components/bubble/index.js +4 -0
- package/dist/esm/components/bubble/namespace.js +16 -0
- package/dist/esm/components/bubble/namespace.js.map +1 -0
- package/dist/esm/components/prose/prose.js +1 -1
- package/dist/esm/components/prose/prose.js.map +1 -1
- package/dist/esm/core/css/conditions.js +4 -4
- package/dist/esm/core/css/conditions.js.map +1 -1
- package/dist/esm/index.js +107 -95
- package/dist/esm/index.js.map +1 -1
- package/dist/types/components/bubble/bubble.d.ts +89 -0
- package/dist/types/components/bubble/bubble.style.d.ts +79 -0
- package/dist/types/components/bubble/index.d.ts +4 -0
- package/dist/types/components/bubble/namespace.d.ts +7 -0
- package/dist/types/components/chart/cartesian-chart.style.d.ts +1 -1
- package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
- package/dist/types/components/prose/prose.d.ts +1 -1
- package/dist/types/core/css/conditions.d.ts +10 -10
- package/dist/types/index.d.ts +53 -49
- package/package.json +2 -2
package/dist/cjs/index.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from \"./core\"\nexport * from \"./theme\"\nexport * from \"./utils\"\n\nexport * from \"./components/accordion\"\nexport * from \"./components/action-bar\"\nexport * from \"./components/airy\"\nexport * from \"./components/alert\"\nexport * from \"./components/alpha-slider\"\nexport * from \"./components/aspect-ratio\"\nexport * from \"./components/autocomplete\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/bleed\"\nexport * from \"./components/blockquote\"\nexport * from \"./components/box\"\nexport * from \"./components/breadcrumb\"\nexport * from \"./components/button\"\nexport * from \"./components/calendar\"\nexport * from \"./components/card\"\nexport * from \"./components/carousel\"\nexport * from \"./components/center\"\nexport * from \"./components/chart\"\nexport * from \"./components/checkbox\"\nexport * from \"./components/checkbox-card\"\nexport * from \"./components/circle-progress\"\nexport * from \"./components/client-only\"\nexport * from \"./components/close-button\"\nexport * from \"./components/code\"\nexport * from \"./components/collapse\"\nexport * from \"./components/color-picker\"\nexport * from \"./components/color-selector\"\nexport * from \"./components/color-swatch\"\nexport * from \"./components/container\"\nexport * from \"./components/data-list\"\nexport * from \"./components/date-picker\"\nexport * from \"./components/drawer\"\nexport * from \"./components/dropzone\"\nexport * from \"./components/editable\"\nexport * from \"./components/em\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/fade\"\nexport * from \"./components/fade-scale\"\nexport * from \"./components/field\"\nexport * from \"./components/fieldset\"\nexport * from \"./components/file-button\"\nexport * from \"./components/file-input\"\nexport * from \"./components/flex\"\nexport * from \"./components/flip\"\nexport * from \"./components/float\"\nexport * from \"./components/focus-lock\"\nexport * from \"./components/for\"\nexport * from \"./components/form\"\nexport * from \"./components/format\"\nexport * from \"./components/grid\"\nexport * from \"./components/group\"\nexport * from \"./components/heading\"\nexport * from \"./components/highlight\"\nexport * from \"./components/hue-slider\"\nexport * from \"./components/icon\"\nexport * from \"./components/image\"\nexport * from \"./components/indicator\"\nexport * from \"./components/infinite-scroll-area\"\nexport * from \"./components/input\"\nexport * from \"./components/kbd\"\nexport * from \"./components/link\"\nexport * from \"./components/link-box\"\nexport * from \"./components/list\"\nexport * from \"./components/loading\"\nexport * from \"./components/mark\"\nexport * from \"./components/marquee\"\nexport * from \"./components/menu\"\nexport * from \"./components/modal\"\nexport * from \"./components/motion\"\nexport * from \"./components/native-accordion\"\nexport * from \"./components/native-popover\"\nexport * from \"./components/native-select\"\nexport * from \"./components/native-table\"\nexport * from \"./components/notice\"\nexport * from \"./components/number-input\"\nexport * from \"./components/pagination\"\nexport * from \"./components/password-input\"\nexport * from \"./components/picture\"\nexport * from \"./components/pin-input\"\nexport * from \"./components/popover\"\nexport * from \"./components/portal\"\nexport * from \"./components/progress\"\nexport * from \"./components/prose\"\nexport * from \"./components/qr-code\"\nexport * from \"./components/radio\"\nexport * from \"./components/radio-card\"\nexport * from \"./components/rating\"\nexport * from \"./components/reorder\"\nexport * from \"./components/resizable\"\nexport * from \"./components/ripple\"\nexport * from \"./components/rotate\"\nexport * from \"./components/saturation-slider\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/segmented-control\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/show\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/simple-grid\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/slide\"\nexport * from \"./components/slide-fade\"\nexport * from \"./components/slider\"\nexport * from \"./components/slot\"\nexport * from \"./components/snacks\"\nexport * from \"./components/stack\"\nexport * from \"./components/stat\"\nexport * from \"./components/status\"\nexport * from \"./components/steps\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/tag\"\nexport * from \"./components/text\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline\"\nexport * from \"./components/tip\"\nexport * from \"./components/toggle\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/tree\"\nexport * from \"./components/visually-hidden\"\nexport * from \"./components/wrap\"\n\nexport * from \"./hooks/use-animation\"\nexport * from \"./hooks/use-async\"\nexport * from \"./hooks/use-async-callback\"\nexport * from \"./hooks/use-boolean\"\nexport * from \"./hooks/use-breakpoint\"\nexport * from \"./hooks/use-clickable\"\nexport * from \"./hooks/use-clipboard\"\nexport * from \"./hooks/use-combobox\"\nexport * from \"./hooks/use-controllable-state\"\nexport * from \"./hooks/use-counter\"\nexport * from \"./hooks/use-descendants\"\nexport * from \"./hooks/use-disclosure\"\nexport * from \"./hooks/use-event-listener\"\nexport * from \"./hooks/use-eye-dropper\"\nexport * from \"./hooks/use-field-sizing\"\nexport * from \"./hooks/use-focus\"\nexport * from \"./hooks/use-hover\"\nexport * from \"./hooks/use-idle\"\nexport * from \"./hooks/use-interval\"\nexport * from \"./hooks/use-lazy-mount\"\nexport * from \"./hooks/use-local-storage\"\nexport * from \"./hooks/use-media-query\"\nexport * from \"./hooks/use-mounted\"\nexport * from \"./hooks/use-online\"\nexport * from \"./hooks/use-os\"\nexport * from \"./hooks/use-outside-click\"\nexport * from \"./hooks/use-pan-event\"\nexport * from \"./hooks/use-popper\"\nexport * from \"./hooks/use-previous\"\nexport * from \"./hooks/use-processing\"\nexport * from \"./hooks/use-resize-observer\"\nexport * from \"./hooks/use-timeout\"\nexport * from \"./hooks/use-value\"\nexport * from \"./hooks/use-window-event\"\n\nexport * from \"./providers/i18n-provider\"\nexport * from \"./providers/ui-provider\"\n"],"mappings":""}
|
|
1
|
+
{"version":3,"file":"index.cjs","names":[],"sources":["../../src/index.ts"],"sourcesContent":["export * from \"./core\"\nexport * from \"./theme\"\nexport * from \"./utils\"\n\nexport * from \"./components/accordion\"\nexport * from \"./components/action-bar\"\nexport * from \"./components/airy\"\nexport * from \"./components/alert\"\nexport * from \"./components/alpha-slider\"\nexport * from \"./components/aspect-ratio\"\nexport * from \"./components/autocomplete\"\nexport * from \"./components/avatar\"\nexport * from \"./components/badge\"\nexport * from \"./components/bleed\"\nexport * from \"./components/blockquote\"\nexport * from \"./components/box\"\nexport * from \"./components/breadcrumb\"\nexport * from \"./components/bubble\"\nexport * from \"./components/button\"\nexport * from \"./components/calendar\"\nexport * from \"./components/card\"\nexport * from \"./components/carousel\"\nexport * from \"./components/center\"\nexport * from \"./components/chart\"\nexport * from \"./components/checkbox\"\nexport * from \"./components/checkbox-card\"\nexport * from \"./components/circle-progress\"\nexport * from \"./components/client-only\"\nexport * from \"./components/close-button\"\nexport * from \"./components/code\"\nexport * from \"./components/collapse\"\nexport * from \"./components/color-picker\"\nexport * from \"./components/color-selector\"\nexport * from \"./components/color-swatch\"\nexport * from \"./components/container\"\nexport * from \"./components/data-list\"\nexport * from \"./components/date-picker\"\nexport * from \"./components/drawer\"\nexport * from \"./components/dropzone\"\nexport * from \"./components/editable\"\nexport * from \"./components/em\"\nexport * from \"./components/empty-state\"\nexport * from \"./components/fade\"\nexport * from \"./components/fade-scale\"\nexport * from \"./components/field\"\nexport * from \"./components/fieldset\"\nexport * from \"./components/file-button\"\nexport * from \"./components/file-input\"\nexport * from \"./components/flex\"\nexport * from \"./components/flip\"\nexport * from \"./components/float\"\nexport * from \"./components/focus-lock\"\nexport * from \"./components/for\"\nexport * from \"./components/form\"\nexport * from \"./components/format\"\nexport * from \"./components/grid\"\nexport * from \"./components/group\"\nexport * from \"./components/heading\"\nexport * from \"./components/highlight\"\nexport * from \"./components/hue-slider\"\nexport * from \"./components/icon\"\nexport * from \"./components/image\"\nexport * from \"./components/indicator\"\nexport * from \"./components/infinite-scroll-area\"\nexport * from \"./components/input\"\nexport * from \"./components/kbd\"\nexport * from \"./components/link\"\nexport * from \"./components/link-box\"\nexport * from \"./components/list\"\nexport * from \"./components/loading\"\nexport * from \"./components/mark\"\nexport * from \"./components/marquee\"\nexport * from \"./components/menu\"\nexport * from \"./components/modal\"\nexport * from \"./components/motion\"\nexport * from \"./components/native-accordion\"\nexport * from \"./components/native-popover\"\nexport * from \"./components/native-select\"\nexport * from \"./components/native-table\"\nexport * from \"./components/notice\"\nexport * from \"./components/number-input\"\nexport * from \"./components/pagination\"\nexport * from \"./components/password-input\"\nexport * from \"./components/picture\"\nexport * from \"./components/pin-input\"\nexport * from \"./components/popover\"\nexport * from \"./components/portal\"\nexport * from \"./components/progress\"\nexport * from \"./components/prose\"\nexport * from \"./components/qr-code\"\nexport * from \"./components/radio\"\nexport * from \"./components/radio-card\"\nexport * from \"./components/rating\"\nexport * from \"./components/reorder\"\nexport * from \"./components/resizable\"\nexport * from \"./components/ripple\"\nexport * from \"./components/rotate\"\nexport * from \"./components/saturation-slider\"\nexport * from \"./components/scroll-area\"\nexport * from \"./components/segmented-control\"\nexport * from \"./components/select\"\nexport * from \"./components/separator\"\nexport * from \"./components/show\"\nexport * from \"./components/sidebar\"\nexport * from \"./components/simple-grid\"\nexport * from \"./components/skeleton\"\nexport * from \"./components/slide\"\nexport * from \"./components/slide-fade\"\nexport * from \"./components/slider\"\nexport * from \"./components/slot\"\nexport * from \"./components/snacks\"\nexport * from \"./components/stack\"\nexport * from \"./components/stat\"\nexport * from \"./components/status\"\nexport * from \"./components/steps\"\nexport * from \"./components/switch\"\nexport * from \"./components/table\"\nexport * from \"./components/tabs\"\nexport * from \"./components/tag\"\nexport * from \"./components/text\"\nexport * from \"./components/textarea\"\nexport * from \"./components/timeline\"\nexport * from \"./components/tip\"\nexport * from \"./components/toggle\"\nexport * from \"./components/tooltip\"\nexport * from \"./components/tree\"\nexport * from \"./components/visually-hidden\"\nexport * from \"./components/wrap\"\n\nexport * from \"./hooks/use-animation\"\nexport * from \"./hooks/use-async\"\nexport * from \"./hooks/use-async-callback\"\nexport * from \"./hooks/use-boolean\"\nexport * from \"./hooks/use-breakpoint\"\nexport * from \"./hooks/use-clickable\"\nexport * from \"./hooks/use-clipboard\"\nexport * from \"./hooks/use-combobox\"\nexport * from \"./hooks/use-controllable-state\"\nexport * from \"./hooks/use-counter\"\nexport * from \"./hooks/use-descendants\"\nexport * from \"./hooks/use-disclosure\"\nexport * from \"./hooks/use-event-listener\"\nexport * from \"./hooks/use-eye-dropper\"\nexport * from \"./hooks/use-field-sizing\"\nexport * from \"./hooks/use-focus\"\nexport * from \"./hooks/use-hover\"\nexport * from \"./hooks/use-idle\"\nexport * from \"./hooks/use-interval\"\nexport * from \"./hooks/use-lazy-mount\"\nexport * from \"./hooks/use-local-storage\"\nexport * from \"./hooks/use-media-query\"\nexport * from \"./hooks/use-mounted\"\nexport * from \"./hooks/use-online\"\nexport * from \"./hooks/use-os\"\nexport * from \"./hooks/use-outside-click\"\nexport * from \"./hooks/use-pan-event\"\nexport * from \"./hooks/use-popper\"\nexport * from \"./hooks/use-previous\"\nexport * from \"./hooks/use-processing\"\nexport * from \"./hooks/use-resize-observer\"\nexport * from \"./hooks/use-timeout\"\nexport * from \"./hooks/use-value\"\nexport * from \"./hooks/use-window-event\"\n\nexport * from \"./providers/i18n-provider\"\nexport * from \"./providers/ui-provider\"\n"],"mappings":""}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useSplitChildren } from "../../utils/children.js";
|
|
3
|
+
import { styled } from "../../core/system/factory.js";
|
|
4
|
+
import { mergeProps } from "../../core/components/props.js";
|
|
5
|
+
import { createSlotComponent } from "../../core/components/create-component.js";
|
|
6
|
+
import { bubbleStyle } from "./bubble.style.js";
|
|
7
|
+
import { useMemo } from "react";
|
|
8
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
9
|
+
//#region src/components/bubble/bubble.tsx
|
|
10
|
+
const { component, ComponentContext, PropsContext: BubblePropsContext, useComponentContext, usePropsContext: useBubblePropsContext, withContext, withProvider, useRootComponentProps } = createSlotComponent("bubble", 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 = 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__ */ jsxs(BubbleItem, {
|
|
28
|
+
...rest,
|
|
29
|
+
children: [/* @__PURE__ */ jsx(BubbleContent, {
|
|
30
|
+
...contentProps,
|
|
31
|
+
children
|
|
32
|
+
}), reactions ? /* @__PURE__ */ jsx(BubbleReactions, {
|
|
33
|
+
...reactionsProps,
|
|
34
|
+
children: reactions
|
|
35
|
+
}) : null]
|
|
36
|
+
}, index);
|
|
37
|
+
} else return /* @__PURE__ */ jsx(BubbleGroup, { ...props }, index);
|
|
38
|
+
});
|
|
39
|
+
}, [children, items]);
|
|
40
|
+
const context = useMemo(() => ({
|
|
41
|
+
colorScheme,
|
|
42
|
+
size,
|
|
43
|
+
variant
|
|
44
|
+
}), [
|
|
45
|
+
colorScheme,
|
|
46
|
+
size,
|
|
47
|
+
variant
|
|
48
|
+
]);
|
|
49
|
+
const componentContext = 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__ */ jsx(BubblePropsContext, {
|
|
69
|
+
value: context,
|
|
70
|
+
children: /* @__PURE__ */ jsx(ComponentContext, {
|
|
71
|
+
value: componentContext,
|
|
72
|
+
children: /* @__PURE__ */ jsx(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 = useMemo(() => {
|
|
86
|
+
if (children) return children;
|
|
87
|
+
return items?.map(({ children, reactions, contentProps, reactionsProps, ...rest }, index) => /* @__PURE__ */ jsxs(BubbleItem, {
|
|
88
|
+
...rest,
|
|
89
|
+
children: [/* @__PURE__ */ jsx(BubbleContent, {
|
|
90
|
+
...contentProps,
|
|
91
|
+
children
|
|
92
|
+
}), reactions ? /* @__PURE__ */ jsx(BubbleReactions, {
|
|
93
|
+
...reactionsProps,
|
|
94
|
+
children: reactions
|
|
95
|
+
}) : null]
|
|
96
|
+
}, index));
|
|
97
|
+
}, [children, items]);
|
|
98
|
+
const context = useMemo(() => ({
|
|
99
|
+
colorScheme,
|
|
100
|
+
size,
|
|
101
|
+
variant,
|
|
102
|
+
direction
|
|
103
|
+
}), [
|
|
104
|
+
colorScheme,
|
|
105
|
+
size,
|
|
106
|
+
variant,
|
|
107
|
+
direction
|
|
108
|
+
]);
|
|
109
|
+
return /* @__PURE__ */ jsx(BubblePropsContext, {
|
|
110
|
+
value: context,
|
|
111
|
+
children: /* @__PURE__ */ jsx(styled.div, {
|
|
112
|
+
...rest,
|
|
113
|
+
children: computedChildren
|
|
114
|
+
})
|
|
115
|
+
});
|
|
116
|
+
}, "group")(({ direction = "start", ...rest }) => {
|
|
117
|
+
const { endGroupProps, groupProps, startGroupProps } = useComponentContext();
|
|
118
|
+
return 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] = useSplitChildren(children, BubbleContent, BubbleReactions);
|
|
125
|
+
return /* @__PURE__ */ jsxs(styled.div, {
|
|
126
|
+
"data-direction": direction,
|
|
127
|
+
...rest,
|
|
128
|
+
children: [customContent ?? /* @__PURE__ */ 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 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 mergeProps(contentProps, props)();
|
|
145
|
+
});
|
|
146
|
+
const BubbleReactions = withContext("div", "reactions")(void 0, (props) => {
|
|
147
|
+
const { reactionsProps } = useComponentContext();
|
|
148
|
+
const { placement = "end-end", ...rest } = mergeProps(reactionsProps, props)();
|
|
149
|
+
return {
|
|
150
|
+
"data-placement": placement,
|
|
151
|
+
...rest
|
|
152
|
+
};
|
|
153
|
+
});
|
|
154
|
+
//#endregion
|
|
155
|
+
export { BubbleContent, BubbleGroup, BubbleItem, BubblePropsContext, BubbleReactions, BubbleRoot, useBubblePropsContext };
|
|
156
|
+
|
|
157
|
+
//# sourceMappingURL=bubble.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bubble.js","names":[],"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":"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"}
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { defineComponentSlotStyle } from "../../core/system/config.js";
|
|
2
|
+
//#region src/components/bubble/bubble.style.ts
|
|
3
|
+
const bubbleStyle = defineComponentSlotStyle({
|
|
4
|
+
base: {
|
|
5
|
+
content: {
|
|
6
|
+
maxW: "full",
|
|
7
|
+
minW: "0",
|
|
8
|
+
overflowWrap: "anywhere",
|
|
9
|
+
py: "{space-y}",
|
|
10
|
+
rounded: "calc(0.5lh + {space-y} + 1px)",
|
|
11
|
+
textAlign: "start",
|
|
12
|
+
whiteSpace: "pre-wrap"
|
|
13
|
+
},
|
|
14
|
+
group: {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: "sm",
|
|
18
|
+
minW: "0",
|
|
19
|
+
w: "full"
|
|
20
|
+
},
|
|
21
|
+
item: {
|
|
22
|
+
display: "flex",
|
|
23
|
+
flexDirection: "column",
|
|
24
|
+
maxW: "4/5",
|
|
25
|
+
minW: "0",
|
|
26
|
+
position: "relative",
|
|
27
|
+
w: "fit-content",
|
|
28
|
+
_end: {
|
|
29
|
+
alignSelf: "flex-end",
|
|
30
|
+
me: "0",
|
|
31
|
+
ms: "auto"
|
|
32
|
+
},
|
|
33
|
+
_start: {
|
|
34
|
+
alignSelf: "flex-start",
|
|
35
|
+
me: "auto",
|
|
36
|
+
ms: "0"
|
|
37
|
+
}
|
|
38
|
+
},
|
|
39
|
+
reactions: {
|
|
40
|
+
"&[data-placement$=center]": {
|
|
41
|
+
insetInline: "0",
|
|
42
|
+
mx: "auto"
|
|
43
|
+
},
|
|
44
|
+
"&[data-placement$=end]": { insetInlineEnd: "3" },
|
|
45
|
+
"&[data-placement$=start]": { insetInlineStart: "3" },
|
|
46
|
+
"&[data-placement^=end]": {
|
|
47
|
+
insetBlockEnd: "-2",
|
|
48
|
+
translateY: "50%"
|
|
49
|
+
},
|
|
50
|
+
"&[data-placement^=start]": {
|
|
51
|
+
insetBlockStart: "-2",
|
|
52
|
+
translateY: "-50%"
|
|
53
|
+
},
|
|
54
|
+
alignItems: "center",
|
|
55
|
+
bg: "bg.panel",
|
|
56
|
+
borderColor: "bg",
|
|
57
|
+
display: "flex",
|
|
58
|
+
gap: "xs",
|
|
59
|
+
lineHeight: "normal",
|
|
60
|
+
position: "absolute",
|
|
61
|
+
px: "1.5",
|
|
62
|
+
py: "0.5",
|
|
63
|
+
rounded: "full",
|
|
64
|
+
w: "max-content",
|
|
65
|
+
zIndex: "1"
|
|
66
|
+
},
|
|
67
|
+
root: {
|
|
68
|
+
alignItems: "flex-start",
|
|
69
|
+
display: "flex",
|
|
70
|
+
flexDirection: "column",
|
|
71
|
+
gap: "xl",
|
|
72
|
+
minW: "0",
|
|
73
|
+
w: "full"
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
variants: {
|
|
77
|
+
ghost: {
|
|
78
|
+
content: {
|
|
79
|
+
bg: "transparent",
|
|
80
|
+
borderColor: "transparent",
|
|
81
|
+
rounded: "0"
|
|
82
|
+
},
|
|
83
|
+
item: {
|
|
84
|
+
maxW: "full",
|
|
85
|
+
w: "full"
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
outline: { content: { layerStyle: "outline" } },
|
|
89
|
+
panel: { content: { bg: "bg.panel" } },
|
|
90
|
+
solid: { content: { layerStyle: "solid" } },
|
|
91
|
+
subtle: { content: { layerStyle: "subtle" } },
|
|
92
|
+
surface: { content: { layerStyle: "surface" } }
|
|
93
|
+
},
|
|
94
|
+
sizes: {
|
|
95
|
+
sm: {
|
|
96
|
+
content: {
|
|
97
|
+
"--space-y": "spaces.2",
|
|
98
|
+
fontSize: "sm",
|
|
99
|
+
px: "3"
|
|
100
|
+
},
|
|
101
|
+
reactions: {
|
|
102
|
+
borderWidth: "3px",
|
|
103
|
+
fontSize: "xs"
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
md: {
|
|
107
|
+
content: {
|
|
108
|
+
"--space-y": "spaces.3",
|
|
109
|
+
fontSize: "md",
|
|
110
|
+
px: "4"
|
|
111
|
+
},
|
|
112
|
+
reactions: {
|
|
113
|
+
borderWidth: "5px",
|
|
114
|
+
fontSize: "sm"
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
lg: {
|
|
118
|
+
content: {
|
|
119
|
+
"--space-y": "spaces.4",
|
|
120
|
+
fontSize: "lg",
|
|
121
|
+
px: "5"
|
|
122
|
+
},
|
|
123
|
+
reactions: {
|
|
124
|
+
borderWidth: "5px",
|
|
125
|
+
fontSize: "md"
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
compounds: [{
|
|
130
|
+
css: { content: {
|
|
131
|
+
px: "0",
|
|
132
|
+
py: "0"
|
|
133
|
+
} },
|
|
134
|
+
variant: "ghost"
|
|
135
|
+
}],
|
|
136
|
+
defaultProps: {
|
|
137
|
+
size: "md",
|
|
138
|
+
variant: "panel"
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
//#endregion
|
|
142
|
+
export { bubbleStyle };
|
|
143
|
+
|
|
144
|
+
//# sourceMappingURL=bubble.style.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bubble.style.js","names":[],"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,cAAc,yBAAyB;CAClD,MAAM;EACJ,SAAS;GACP,MAAM;GACN,MAAM;GACN,cAAc;GACd,IAAI;GACJ,SAAS;GACT,WAAW;GACX,YAAY;EACd;EACA,OAAO;GACL,SAAS;GACT,eAAe;GACf,KAAK;GACL,MAAM;GACN,GAAG;EACL;EACA,MAAM;GACJ,SAAS;GACT,eAAe;GACf,MAAM;GACN,MAAM;GACN,UAAU;GACV,GAAG;GACH,MAAM;IACJ,WAAW;IACX,IAAI;IACJ,IAAI;GACN;GACA,QAAQ;IACN,WAAW;IACX,IAAI;IACJ,IAAI;GACN;EACF;EACA,WAAW;GACT,6BAA6B;IAC3B,aAAa;IACb,IAAI;GACN;GACA,0BAA0B,EACxB,gBAAgB,IAClB;GACA,4BAA4B,EAC1B,kBAAkB,IACpB;GACA,0BAA0B;IACxB,eAAe;IACf,YAAY;GACd;GACA,4BAA4B;IAC1B,iBAAiB;IACjB,YAAY;GACd;GACA,YAAY;GACZ,IAAI;GACJ,aAAa;GACb,SAAS;GACT,KAAK;GACL,YAAY;GACZ,UAAU;GACV,IAAI;GACJ,IAAI;GACJ,SAAS;GACT,GAAG;GACH,QAAQ;EACV;EACA,MAAM;GACJ,YAAY;GACZ,SAAS;GACT,eAAe;GACf,KAAK;GACL,MAAM;GACN,GAAG;EACL;CACF;CAEA,UAAU;EACR,OAAO;GACL,SAAS;IACP,IAAI;IACJ,aAAa;IACb,SAAS;GACX;GACA,MAAM;IAAE,MAAM;IAAQ,GAAG;GAAO;EAClC;EACA,SAAS,EAAE,SAAS,EAAE,YAAY,UAAU,EAAE;EAC9C,OAAO,EAAE,SAAS,EAAE,IAAI,WAAW,EAAE;EACrC,OAAO,EAAE,SAAS,EAAE,YAAY,QAAQ,EAAE;EAC1C,QAAQ,EAAE,SAAS,EAAE,YAAY,SAAS,EAAE;EAC5C,SAAS,EAAE,SAAS,EAAE,YAAY,UAAU,EAAE;CAChD;CAEA,OAAO;EACL,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;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,4 @@
|
|
|
1
|
+
import { bubbleStyle } from "./bubble.style.js";
|
|
2
|
+
import { BubbleContent, BubbleGroup, BubbleItem, BubblePropsContext, BubbleReactions, BubbleRoot, useBubblePropsContext } from "./bubble.js";
|
|
3
|
+
import { namespace_exports } from "./namespace.js";
|
|
4
|
+
export { namespace_exports as Bubble, BubbleContent, BubbleGroup, BubbleItem, BubblePropsContext, BubbleReactions, BubbleRoot, bubbleStyle, useBubblePropsContext };
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { __exportAll } from "../../_virtual/_rolldown/runtime.js";
|
|
2
|
+
import { BubbleContent, BubbleGroup, BubbleItem, BubblePropsContext, BubbleReactions, BubbleRoot, useBubblePropsContext } from "./bubble.js";
|
|
3
|
+
//#region src/components/bubble/namespace.ts
|
|
4
|
+
var namespace_exports = /* @__PURE__ */ __exportAll({
|
|
5
|
+
Content: () => BubbleContent,
|
|
6
|
+
Group: () => BubbleGroup,
|
|
7
|
+
Item: () => BubbleItem,
|
|
8
|
+
PropsContext: () => BubblePropsContext,
|
|
9
|
+
Reactions: () => BubbleReactions,
|
|
10
|
+
Root: () => BubbleRoot,
|
|
11
|
+
usePropsContext: () => useBubblePropsContext
|
|
12
|
+
});
|
|
13
|
+
//#endregion
|
|
14
|
+
export { BubbleContent as Content, BubbleGroup as Group, BubbleItem as Item, BubblePropsContext as PropsContext, BubbleReactions as Reactions, BubbleRoot as Root, namespace_exports, useBubblePropsContext as usePropsContext };
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=namespace.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"namespace.js","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":""}
|
|
@@ -4,7 +4,7 @@ import { proseStyle } from "./prose.style.js";
|
|
|
4
4
|
//#region src/components/prose/prose.tsx
|
|
5
5
|
const { PropsContext: ProsePropsContext, usePropsContext: useProsePropsContext, withContext } = createComponent("prose", proseStyle);
|
|
6
6
|
/**
|
|
7
|
-
* `Prose` is a component that styles HTML content.
|
|
7
|
+
* `Prose` is a component that styles HTML content.
|
|
8
8
|
*
|
|
9
9
|
* @see https://yamada-ui.com/docs/components/prose
|
|
10
10
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prose.js","names":[],"sources":["../../../../src/components/prose/prose.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { ProseStyle } from \"./prose.style\"\nimport { createComponent } from \"../../core\"\nimport { proseStyle } from \"./prose.style\"\n\nexport interface ProseProps\n extends HTMLStyledProps<\"div\">, ThemeProps<ProseStyle> {}\n\nconst {\n PropsContext: ProsePropsContext,\n usePropsContext: useProsePropsContext,\n withContext,\n} = createComponent<ProseProps, ProseStyle>(\"prose\", proseStyle)\n\nexport { ProsePropsContext, useProsePropsContext }\n\n/**\n * `Prose` is a component that styles HTML content
|
|
1
|
+
{"version":3,"file":"prose.js","names":[],"sources":["../../../../src/components/prose/prose.tsx"],"sourcesContent":["\"use client\"\n\nimport type { HTMLStyledProps, ThemeProps } from \"../../core\"\nimport type { ProseStyle } from \"./prose.style\"\nimport { createComponent } from \"../../core\"\nimport { proseStyle } from \"./prose.style\"\n\nexport interface ProseProps\n extends HTMLStyledProps<\"div\">, ThemeProps<ProseStyle> {}\n\nconst {\n PropsContext: ProsePropsContext,\n usePropsContext: useProsePropsContext,\n withContext,\n} = createComponent<ProseProps, ProseStyle>(\"prose\", proseStyle)\n\nexport { ProsePropsContext, useProsePropsContext }\n\n/**\n * `Prose` is a component that styles HTML content.\n *\n * @see https://yamada-ui.com/docs/components/prose\n */\nexport const Prose = withContext(\"div\")()\n"],"mappings":";;;;AAUA,MAAM,EACJ,cAAc,mBACd,iBAAiB,sBACjB,gBACE,gBAAwC,SAAS,UAAU;;;;;;AAS/D,MAAa,QAAQ,YAAY,KAAK,CAAC,CAAC"}
|
|
@@ -43,9 +43,9 @@ const attributes = {
|
|
|
43
43
|
*/
|
|
44
44
|
_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
|
*/
|