asterui 0.12.18 → 0.12.20

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 (205) hide show
  1. package/dist/components/Code.d.ts +2 -0
  2. package/dist/components/CopyButton.d.ts +34 -0
  3. package/dist/components/Watermark.d.ts +40 -0
  4. package/dist/index.d.ts +4 -0
  5. package/dist/index.js +205 -201
  6. package/dist/index.js.map +1 -1
  7. package/dist/index10.js +91 -121
  8. package/dist/index10.js.map +1 -1
  9. package/dist/index100.js +5 -45
  10. package/dist/index100.js.map +1 -1
  11. package/dist/index101.js +13 -12
  12. package/dist/index101.js.map +1 -1
  13. package/dist/index102.js +44 -13
  14. package/dist/index102.js.map +1 -1
  15. package/dist/index103.js +12 -7
  16. package/dist/index103.js.map +1 -1
  17. package/dist/index104.js +13 -11
  18. package/dist/index104.js.map +1 -1
  19. package/dist/index105.js +7 -30
  20. package/dist/index105.js.map +1 -1
  21. package/dist/index106.js +11 -16
  22. package/dist/index106.js.map +1 -1
  23. package/dist/index107.js +34 -0
  24. package/dist/index107.js.map +1 -0
  25. package/dist/index108.js +21 -0
  26. package/dist/index108.js.map +1 -0
  27. package/dist/index11.js +123 -30
  28. package/dist/index11.js.map +1 -1
  29. package/dist/index12.js +28 -263
  30. package/dist/index12.js.map +1 -1
  31. package/dist/index13.js +257 -105
  32. package/dist/index13.js.map +1 -1
  33. package/dist/index14.js +108 -153
  34. package/dist/index14.js.map +1 -1
  35. package/dist/index15.js +154 -146
  36. package/dist/index15.js.map +1 -1
  37. package/dist/index16.js +150 -5
  38. package/dist/index16.js.map +1 -1
  39. package/dist/index17.js +5 -71
  40. package/dist/index17.js.map +1 -1
  41. package/dist/index18.js +70 -24
  42. package/dist/index18.js.map +1 -1
  43. package/dist/index19.js +23 -194
  44. package/dist/index19.js.map +1 -1
  45. package/dist/index20.js +188 -106
  46. package/dist/index20.js.map +1 -1
  47. package/dist/index21.js +107 -177
  48. package/dist/index21.js.map +1 -1
  49. package/dist/index22.js +181 -107
  50. package/dist/index22.js.map +1 -1
  51. package/dist/index23.js +110 -19
  52. package/dist/index23.js.map +1 -1
  53. package/dist/index24.js +17 -41
  54. package/dist/index24.js.map +1 -1
  55. package/dist/index25.js +43 -32
  56. package/dist/index25.js.map +1 -1
  57. package/dist/index26.js +30 -170
  58. package/dist/index26.js.map +1 -1
  59. package/dist/index27.js +171 -40
  60. package/dist/index27.js.map +1 -1
  61. package/dist/index28.js +41 -17
  62. package/dist/index28.js.map +1 -1
  63. package/dist/index29.js +17 -33
  64. package/dist/index29.js.map +1 -1
  65. package/dist/index30.js +33 -52
  66. package/dist/index30.js.map +1 -1
  67. package/dist/index31.js +50 -61
  68. package/dist/index31.js.map +1 -1
  69. package/dist/index32.js +60 -181
  70. package/dist/index32.js.map +1 -1
  71. package/dist/index33.js +184 -18
  72. package/dist/index33.js.map +1 -1
  73. package/dist/index34.js +15 -271
  74. package/dist/index34.js.map +1 -1
  75. package/dist/index35.js +270 -1083
  76. package/dist/index35.js.map +1 -1
  77. package/dist/index36.js +1086 -16
  78. package/dist/index36.js.map +1 -1
  79. package/dist/index37.js +17 -17
  80. package/dist/index37.js.map +1 -1
  81. package/dist/index38.js +15 -120
  82. package/dist/index38.js.map +1 -1
  83. package/dist/index39.js +119 -37
  84. package/dist/index39.js.map +1 -1
  85. package/dist/index40.js +40 -398
  86. package/dist/index40.js.map +1 -1
  87. package/dist/index41.js +390 -89
  88. package/dist/index41.js.map +1 -1
  89. package/dist/index42.js +91 -253
  90. package/dist/index42.js.map +1 -1
  91. package/dist/index43.js +249 -145
  92. package/dist/index43.js.map +1 -1
  93. package/dist/index44.js +155 -15
  94. package/dist/index44.js.map +1 -1
  95. package/dist/index45.js +15 -17
  96. package/dist/index45.js.map +1 -1
  97. package/dist/index46.js +16 -136
  98. package/dist/index46.js.map +1 -1
  99. package/dist/index47.js +134 -10
  100. package/dist/index47.js.map +1 -1
  101. package/dist/index48.js +13 -35
  102. package/dist/index48.js.map +1 -1
  103. package/dist/index49.js +35 -34
  104. package/dist/index49.js.map +1 -1
  105. package/dist/index50.js +34 -81
  106. package/dist/index50.js.map +1 -1
  107. package/dist/index51.js +71 -166
  108. package/dist/index51.js.map +1 -1
  109. package/dist/index52.js +167 -144
  110. package/dist/index52.js.map +1 -1
  111. package/dist/index53.js +152 -11
  112. package/dist/index53.js.map +1 -1
  113. package/dist/index54.js +10 -20
  114. package/dist/index54.js.map +1 -1
  115. package/dist/index55.js +55 -12
  116. package/dist/index55.js.map +1 -1
  117. package/dist/index56.js +14 -7
  118. package/dist/index56.js.map +1 -1
  119. package/dist/index57.js +6 -333
  120. package/dist/index57.js.map +1 -1
  121. package/dist/index58.js +334 -47
  122. package/dist/index58.js.map +1 -1
  123. package/dist/index59.js +47 -122
  124. package/dist/index59.js.map +1 -1
  125. package/dist/index60.js +120 -108
  126. package/dist/index60.js.map +1 -1
  127. package/dist/index61.js +107 -167
  128. package/dist/index61.js.map +1 -1
  129. package/dist/index62.js +167 -29
  130. package/dist/index62.js.map +1 -1
  131. package/dist/index63.js +30 -120
  132. package/dist/index63.js.map +1 -1
  133. package/dist/index64.js +116 -80
  134. package/dist/index64.js.map +1 -1
  135. package/dist/index65.js +85 -19
  136. package/dist/index65.js.map +1 -1
  137. package/dist/index66.js +19 -73
  138. package/dist/index66.js.map +1 -1
  139. package/dist/index67.js +71 -54
  140. package/dist/index67.js.map +1 -1
  141. package/dist/index68.js +56 -44
  142. package/dist/index68.js.map +1 -1
  143. package/dist/index69.js +42 -49
  144. package/dist/index69.js.map +1 -1
  145. package/dist/index70.js +50 -121
  146. package/dist/index70.js.map +1 -1
  147. package/dist/index71.js +118 -102
  148. package/dist/index71.js.map +1 -1
  149. package/dist/index72.js +105 -72
  150. package/dist/index72.js.map +1 -1
  151. package/dist/index73.js +73 -67
  152. package/dist/index73.js.map +1 -1
  153. package/dist/index74.js +66 -19
  154. package/dist/index74.js.map +1 -1
  155. package/dist/index75.js +18 -55
  156. package/dist/index75.js.map +1 -1
  157. package/dist/index76.js +55 -251
  158. package/dist/index76.js.map +1 -1
  159. package/dist/index77.js +254 -22
  160. package/dist/index77.js.map +1 -1
  161. package/dist/index78.js +22 -31
  162. package/dist/index78.js.map +1 -1
  163. package/dist/index79.js +30 -93
  164. package/dist/index79.js.map +1 -1
  165. package/dist/index80.js +89 -324
  166. package/dist/index80.js.map +1 -1
  167. package/dist/index81.js +322 -73
  168. package/dist/index81.js.map +1 -1
  169. package/dist/index82.js +79 -39
  170. package/dist/index82.js.map +1 -1
  171. package/dist/index83.js +40 -23
  172. package/dist/index83.js.map +1 -1
  173. package/dist/index84.js +21 -93
  174. package/dist/index84.js.map +1 -1
  175. package/dist/index85.js +87 -148
  176. package/dist/index85.js.map +1 -1
  177. package/dist/index86.js +147 -152
  178. package/dist/index86.js.map +1 -1
  179. package/dist/index87.js +159 -63
  180. package/dist/index87.js.map +1 -1
  181. package/dist/index88.js +65 -35
  182. package/dist/index88.js.map +1 -1
  183. package/dist/index89.js +35 -234
  184. package/dist/index89.js.map +1 -1
  185. package/dist/index90.js +231 -31
  186. package/dist/index90.js.map +1 -1
  187. package/dist/index91.js +34 -210
  188. package/dist/index91.js.map +1 -1
  189. package/dist/index92.js +195 -198
  190. package/dist/index92.js.map +1 -1
  191. package/dist/index93.js +159 -241
  192. package/dist/index93.js.map +1 -1
  193. package/dist/index94.js +283 -166
  194. package/dist/index94.js.map +1 -1
  195. package/dist/index95.js +173 -253
  196. package/dist/index95.js.map +1 -1
  197. package/dist/index96.js +258 -14
  198. package/dist/index96.js.map +1 -1
  199. package/dist/index97.js +124 -31
  200. package/dist/index97.js.map +1 -1
  201. package/dist/index98.js +13 -5
  202. package/dist/index98.js.map +1 -1
  203. package/dist/index99.js +31 -12
  204. package/dist/index99.js.map +1 -1
  205. package/package.json +1 -1
package/dist/index32.js CHANGED
@@ -1,187 +1,66 @@
1
- import { jsx as t, jsxs as N, Fragment as I } from "react/jsx-runtime";
2
- import { useContext as C, createContext as F, useState as S, useEffect as W } from "react";
3
- const y = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" }) }), E = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 10l7-7m0 0l7 7m-7-7v18" }) }), M = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }), f = F({ inGroup: !1 }), P = {
4
- left: "tooltip-left",
5
- right: "tooltip-right",
6
- top: "tooltip-top",
7
- bottom: "tooltip-bottom"
8
- }, j = {
9
- default: "btn-neutral",
10
- primary: "btn-primary"
11
- }, L = {
12
- circle: "btn-circle",
13
- square: "btn-square"
14
- }, B = ({
15
- icon: d,
16
- description: l,
17
- onClick: o,
18
- type: p = "default",
19
- shape: u = "circle",
20
- className: w = "",
21
- tooltip: c,
22
- tooltipPlacement: v = "left",
23
- badge: a,
24
- href: e,
25
- target: i,
26
- children: g,
27
- style: m,
28
- ...s
1
+ import { jsx as v } from "react/jsx-runtime";
2
+ const y = ({
3
+ direction: t,
4
+ justify: r,
5
+ align: s,
6
+ wrap: m,
7
+ gap: e,
8
+ flex: o,
9
+ inline: a = !1,
10
+ minHeight: l,
11
+ minWidth: f,
12
+ className: x = "",
13
+ style: c,
14
+ children: i,
15
+ ...u
29
16
  }) => {
30
- const h = C(f), x = h.inGroup && h.shape || u, n = [
31
- "btn",
32
- "btn-lg",
33
- "shadow-lg",
34
- L[x],
35
- j[p],
36
- w
37
- ].filter(Boolean).join(" "), b = d || g || /* @__PURE__ */ t(y, {}), r = /* @__PURE__ */ t(I, { children: l ? /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
38
- b,
39
- /* @__PURE__ */ t("span", { className: "text-xs mt-1", children: l })
40
- ] }) : b });
41
- if (h.inGroup)
42
- return e ? /* @__PURE__ */ t(
43
- "a",
44
- {
45
- href: e,
46
- target: i,
47
- className: n,
48
- title: c,
49
- onClick: o,
50
- ...s,
51
- children: r
52
- }
53
- ) : /* @__PURE__ */ t("button", { className: n, title: c, onClick: o, ...s, children: r });
54
- const G = e ? /* @__PURE__ */ t(
55
- "a",
56
- {
57
- href: e,
58
- target: i,
59
- className: n,
60
- style: m,
61
- onClick: o,
62
- ...s,
63
- children: r
64
- }
65
- ) : /* @__PURE__ */ t("button", { className: n, onClick: o, style: m, ...s, children: r }), T = a !== void 0 ? /* @__PURE__ */ N("div", { className: "indicator", style: m, children: [
66
- /* @__PURE__ */ t("span", { className: "indicator-item badge badge-secondary", children: a }),
67
- e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r })
68
- ] }) : G;
69
- return c ? /* @__PURE__ */ t("div", { className: `tooltip ${P[v]}`, "data-tip": c, style: m, children: a !== void 0 ? /* @__PURE__ */ N("div", { className: "indicator", children: [
70
- /* @__PURE__ */ t("span", { className: "indicator-item badge badge-secondary", children: a }),
71
- e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r })
72
- ] }) : e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r }) }) : T;
73
- }, k = (d) => {
74
- const {
75
- style: l,
76
- ...o
77
- } = d;
78
- if (C(f).inGroup)
79
- return /* @__PURE__ */ t(B, { ...o });
80
- const u = {
81
- position: "fixed",
82
- zIndex: 1e3,
83
- bottom: 24,
84
- right: 24,
85
- ...l
17
+ const n = typeof e == "number", w = [
18
+ a ? "inline-flex" : "flex",
19
+ t === "row" && "flex-row",
20
+ t === "column" && "flex-col",
21
+ t === "row-reverse" && "flex-row-reverse",
22
+ t === "column-reverse" && "flex-col-reverse",
23
+ r === "start" && "justify-start",
24
+ r === "end" && "justify-end",
25
+ r === "center" && "justify-center",
26
+ r === "between" && "justify-between",
27
+ r === "around" && "justify-around",
28
+ r === "evenly" && "justify-evenly",
29
+ s === "start" && "items-start",
30
+ s === "end" && "items-end",
31
+ s === "center" && "items-center",
32
+ s === "baseline" && "items-baseline",
33
+ s === "stretch" && "items-stretch",
34
+ m === !0 && "flex-wrap",
35
+ m === "wrap" && "flex-wrap",
36
+ m === "nowrap" && "flex-nowrap",
37
+ m === "wrap-reverse" && "flex-wrap-reverse",
38
+ !n && e === "xs" && "gap-1",
39
+ !n && e === "sm" && "gap-2",
40
+ !n && e === "md" && "gap-4",
41
+ !n && e === "lg" && "gap-6",
42
+ !n && e === "xl" && "gap-8",
43
+ o === "1" && "flex-1",
44
+ o === "auto" && "flex-auto",
45
+ o === "initial" && "flex-initial",
46
+ o === "none" && "flex-none",
47
+ l === "screen" && "min-h-screen",
48
+ l === "full" && "min-h-full",
49
+ l === "fit" && "min-h-fit",
50
+ l === "min" && "min-h-min",
51
+ l === "max" && "min-h-max",
52
+ f === "full" && "min-w-full",
53
+ f === "fit" && "min-w-fit",
54
+ f === "min" && "min-w-min",
55
+ f === "max" && "min-w-max",
56
+ x
57
+ ].filter(Boolean).join(" "), p = {
58
+ ...c,
59
+ ...n ? { gap: `${e}px` } : {}
86
60
  };
87
- return /* @__PURE__ */ t(B, { ...o, style: u });
88
- }, $ = ({
89
- children: d,
90
- flower: l = !1,
91
- shape: o = "circle",
92
- icon: p,
93
- mainAction: u,
94
- onMainAction: w,
95
- showClose: c = !1,
96
- type: v = "default",
97
- position: a = "bottom-right",
98
- offset: e = 24,
99
- className: i = "",
100
- style: g
101
- }) => {
102
- const m = [
103
- "fab",
104
- l ? "fab-flower" : "",
105
- i
106
- ].filter(Boolean).join(" "), s = [
107
- "btn",
108
- "btn-lg",
109
- "shadow-lg",
110
- L[o],
111
- j[v]
112
- ].filter(Boolean).join(" "), h = {
113
- ...a.includes("bottom") ? { bottom: e } : { top: e },
114
- ...a.includes("right") ? { right: e } : { left: e },
115
- ...g
116
- };
117
- return /* @__PURE__ */ N("div", { className: m, style: h, children: [
118
- /* @__PURE__ */ t(
119
- "div",
120
- {
121
- tabIndex: 0,
122
- role: "button",
123
- className: s,
124
- children: p || /* @__PURE__ */ t(y, {})
125
- }
126
- ),
127
- u && /* @__PURE__ */ t(
128
- "button",
129
- {
130
- className: `${s} fab-main-action`,
131
- onClick: w,
132
- children: u
133
- }
134
- ),
135
- c && /* @__PURE__ */ t("button", { className: `${s} fab-close`, children: /* @__PURE__ */ t(M, {}) }),
136
- /* @__PURE__ */ t(f.Provider, { value: { inGroup: !0, shape: o }, children: d })
137
- ] });
138
- }, q = ({
139
- visibilityHeight: d = 400,
140
- target: l,
141
- onClick: o,
142
- icon: p,
143
- duration: u = 450,
144
- position: w = "bottom-right",
145
- offset: c = 24,
146
- className: v = "",
147
- children: a,
148
- style: e,
149
- ...i
150
- }) => {
151
- const [g, m] = S(!1);
152
- W(() => {
153
- const n = l ? l() : window, b = () => {
154
- const r = n instanceof Window ? window.scrollY : n.scrollTop;
155
- m(r >= d);
156
- };
157
- return n.addEventListener("scroll", b), b(), () => n.removeEventListener("scroll", b);
158
- }, [l, d]);
159
- const s = () => {
160
- o?.();
161
- const n = l ? l() : window;
162
- n instanceof Window ? window.scrollTo({ top: 0, behavior: "smooth" }) : n.scrollTo({ top: 0, behavior: "smooth" });
163
- };
164
- if (!g) return null;
165
- const h = [
166
- "btn",
167
- "btn-lg",
168
- "btn-circle",
169
- "btn-neutral",
170
- "shadow-lg",
171
- "transition-opacity",
172
- v
173
- ].filter(Boolean).join(" "), x = {
174
- position: "fixed",
175
- zIndex: 1e3,
176
- bottom: c,
177
- ...w.includes("right") ? { right: c } : { left: c },
178
- ...e
179
- };
180
- return /* @__PURE__ */ t("button", { className: h, onClick: s, style: x, ...i, children: p || a || /* @__PURE__ */ t(E, {}) });
61
+ return /* @__PURE__ */ v("div", { className: w, style: p, ...u, children: i });
181
62
  };
182
- k.Group = $;
183
- k.BackTop = q;
184
63
  export {
185
- k as FloatButton
64
+ y as Flex
186
65
  };
187
66
  //# sourceMappingURL=index32.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index32.js","sources":["../src/components/FloatButton.tsx"],"sourcesContent":["import React, { useState, useEffect, createContext, useContext } from 'react'\n\n// Default icons\nconst PlusIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 4v16m8-8H4\" />\n </svg>\n)\n\nconst ArrowUpIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 10l7-7m0 0l7 7m-7-7v18\" />\n </svg>\n)\n\nconst CloseIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\nexport interface FloatButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n /** Icon to display */\n icon?: React.ReactNode\n /** Description text below icon */\n description?: React.ReactNode\n /** Button type/color */\n type?: 'default' | 'primary'\n /** Button shape */\n shape?: 'circle' | 'square'\n /** Tooltip text */\n tooltip?: string\n /** Tooltip placement */\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom'\n /** Badge content */\n badge?: number | React.ReactNode\n /** Link URL (renders as anchor) */\n href?: string\n /** Link target */\n target?: string\n /** @deprecated Use icon prop instead */\n children?: React.ReactNode\n}\n\nexport interface FloatButtonGroupProps {\n /** Child FloatButton components */\n children: React.ReactNode\n /** Arrange buttons in a quarter-circle (radial) layout */\n flower?: boolean\n /** Button shape for children */\n shape?: 'circle' | 'square'\n /** Main trigger button icon */\n icon?: React.ReactNode\n /** Main action button that replaces trigger when open (fab-main-action) */\n mainAction?: React.ReactNode\n /** Click handler for main action button */\n onMainAction?: () => void\n /** Show close button when open (fab-close) */\n showClose?: boolean\n /** Button type/color */\n type?: 'default' | 'primary'\n /** Position on screen */\n position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n /** Distance from edge */\n offset?: number\n /** Additional CSS classes */\n className?: string\n /** Custom styles */\n style?: React.CSSProperties\n}\n\nexport interface BackTopProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'onClick'> {\n /** Scroll threshold to show button (pixels) */\n visibilityHeight?: number\n /** Scroll target (default: window) */\n target?: () => HTMLElement | Window\n /** Click handler (called before scrolling) */\n onClick?: () => void\n /** Custom icon */\n icon?: React.ReactNode\n /** Duration of scroll animation in ms */\n duration?: number\n /** Position on screen */\n position?: 'bottom-right' | 'bottom-left'\n /** Distance from edge in pixels */\n offset?: number\n /** @deprecated Use icon prop instead */\n children?: React.ReactNode\n}\n\n// Context for group\ninterface FloatButtonGroupContextValue {\n inGroup: boolean\n shape?: 'circle' | 'square'\n}\n\nconst FloatButtonGroupContext = createContext<FloatButtonGroupContextValue>({ inGroup: false })\n\nconst tooltipPlacementClasses: Record<string, string> = {\n left: 'tooltip-left',\n right: 'tooltip-right',\n top: 'tooltip-top',\n bottom: 'tooltip-bottom',\n}\n\nconst typeClasses: Record<string, string> = {\n default: 'btn-neutral',\n primary: 'btn-primary',\n}\n\nconst shapeClasses: Record<string, string> = {\n circle: 'btn-circle',\n square: 'btn-square',\n}\n\ninterface FloatButtonComponent extends React.FC<FloatButtonProps> {\n Group: React.FC<FloatButtonGroupProps>\n BackTop: React.FC<BackTopProps>\n}\n\nconst FloatButtonBase: React.FC<FloatButtonProps & { style?: React.CSSProperties }> = ({\n icon,\n description,\n onClick,\n type = 'default',\n shape = 'circle',\n className = '',\n tooltip,\n tooltipPlacement = 'left',\n badge,\n href,\n target,\n children,\n style,\n ...rest\n}) => {\n const groupContext = useContext(FloatButtonGroupContext)\n const effectiveShape = groupContext.inGroup ? (groupContext.shape || shape) : shape\n\n const buttonClasses = [\n 'btn',\n 'btn-lg',\n 'shadow-lg',\n shapeClasses[effectiveShape],\n typeClasses[type],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const content = icon || children || <PlusIcon />\n\n const buttonContent = (\n <>\n {description ? (\n <div className=\"flex flex-col items-center\">\n {content}\n <span className=\"text-xs mt-1\">{description}</span>\n </div>\n ) : (\n content\n )}\n </>\n )\n\n // When inside a group, render simple button without wrapper divs\n // DaisyUI's fab CSS requires direct button children\n if (groupContext.inGroup) {\n return href ? (\n <a\n href={href}\n target={target}\n className={buttonClasses}\n title={tooltip}\n onClick={onClick as any}\n {...(rest as any)}\n >\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} title={tooltip} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )\n }\n\n const buttonElement = href ? (\n <a\n href={href}\n target={target}\n className={buttonClasses}\n style={style}\n onClick={onClick as any}\n {...(rest as any)}\n >\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} style={style} {...rest}>\n {buttonContent}\n </button>\n )\n\n const withBadge = badge !== undefined ? (\n <div className=\"indicator\" style={style}>\n <span className=\"indicator-item badge badge-secondary\">\n {badge}\n </span>\n {href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n ) : buttonElement\n\n if (tooltip) {\n return (\n <div className={`tooltip ${tooltipPlacementClasses[tooltipPlacement]}`} data-tip={tooltip} style={style}>\n {badge !== undefined ? (\n <div className=\"indicator\">\n <span className=\"indicator-item badge badge-secondary\">{badge}</span>\n {href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n ) : href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n )\n }\n\n return withBadge\n}\n\nexport const FloatButton: FloatButtonComponent = (props) => {\n const {\n style: propStyle,\n ...rest\n } = props\n\n const groupContext = useContext(FloatButtonGroupContext)\n\n // If in group, don't apply fixed positioning\n if (groupContext.inGroup) {\n return <FloatButtonBase {...rest} />\n }\n\n // Standalone button with fixed positioning\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 1000,\n bottom: 24,\n right: 24,\n ...propStyle,\n }\n\n return <FloatButtonBase {...rest} style={style} />\n}\n\nconst FloatButtonGroup: React.FC<FloatButtonGroupProps> = ({\n children,\n flower = false,\n shape = 'circle',\n icon,\n mainAction,\n onMainAction,\n showClose = false,\n type = 'default',\n position = 'bottom-right',\n offset = 24,\n className = '',\n style: propStyle,\n}) => {\n const fabClasses = [\n 'fab',\n flower ? 'fab-flower' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const triggerButtonClasses = [\n 'btn',\n 'btn-lg',\n 'shadow-lg',\n shapeClasses[shape],\n typeClasses[type],\n ]\n .filter(Boolean)\n .join(' ')\n\n const containerStyle: React.CSSProperties = {\n ...(position.includes('bottom') ? { bottom: offset } : { top: offset }),\n ...(position.includes('right') ? { right: offset } : { left: offset }),\n ...propStyle,\n }\n\n return (\n <div className={fabClasses} style={containerStyle}>\n {/* Trigger button - shown when closed */}\n <div\n tabIndex={0}\n role=\"button\"\n className={triggerButtonClasses}\n >\n {icon || <PlusIcon />}\n </div>\n\n {/* Main action button - shown when open (replaces trigger in flower mode) */}\n {mainAction && (\n <button\n className={`${triggerButtonClasses} fab-main-action`}\n onClick={onMainAction}\n >\n {mainAction}\n </button>\n )}\n\n {/* Close button - shown when open */}\n {showClose && (\n <button className={`${triggerButtonClasses} fab-close`}>\n <CloseIcon />\n </button>\n )}\n\n <FloatButtonGroupContext.Provider value={{ inGroup: true, shape }}>\n {children}\n </FloatButtonGroupContext.Provider>\n </div>\n )\n}\n\nconst BackTop: React.FC<BackTopProps> = ({\n visibilityHeight = 400,\n target,\n onClick,\n icon,\n duration = 450,\n position = 'bottom-right',\n offset = 24,\n className = '',\n children,\n style: propStyle,\n ...rest\n}) => {\n const [visible, setVisible] = useState(false)\n\n useEffect(() => {\n const scrollTarget = target ? target() : window\n\n const handleScroll = () => {\n const scrollTop =\n scrollTarget instanceof Window\n ? window.scrollY\n : (scrollTarget as HTMLElement).scrollTop\n\n setVisible(scrollTop >= visibilityHeight)\n }\n\n scrollTarget.addEventListener('scroll', handleScroll)\n handleScroll()\n\n return () => scrollTarget.removeEventListener('scroll', handleScroll)\n }, [target, visibilityHeight])\n\n const handleClick = () => {\n onClick?.()\n const scrollTarget = target ? target() : window\n if (scrollTarget instanceof Window) {\n window.scrollTo({ top: 0, behavior: 'smooth' })\n } else {\n (scrollTarget as HTMLElement).scrollTo({ top: 0, behavior: 'smooth' })\n }\n }\n\n if (!visible) return null\n\n const buttonClasses = [\n 'btn',\n 'btn-lg',\n 'btn-circle',\n 'btn-neutral',\n 'shadow-lg',\n 'transition-opacity',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 1000,\n bottom: offset,\n ...(position.includes('right') ? { right: offset } : { left: offset }),\n ...propStyle,\n }\n\n return (\n <button className={buttonClasses} onClick={handleClick} style={style} {...rest}>\n {icon || children || <ArrowUpIcon />}\n </button>\n )\n}\n\nFloatButton.Group = FloatButtonGroup\nFloatButton.BackTop = BackTop\n"],"names":["PlusIcon","jsx","ArrowUpIcon","CloseIcon","FloatButtonGroupContext","createContext","tooltipPlacementClasses","typeClasses","shapeClasses","FloatButtonBase","icon","description","onClick","type","shape","className","tooltip","tooltipPlacement","badge","href","target","children","style","rest","groupContext","useContext","effectiveShape","buttonClasses","content","buttonContent","Fragment","jsxs","buttonElement","withBadge","FloatButton","props","propStyle","FloatButtonGroup","flower","mainAction","onMainAction","showClose","position","offset","fabClasses","triggerButtonClasses","containerStyle","BackTop","visibilityHeight","duration","visible","setVisible","useState","useEffect","scrollTarget","handleScroll","scrollTop","handleClick"],"mappings":";;AAGA,MAAMA,IAAW,MACf,gBAAAC,EAAC,OAAA,EAAI,OAAM,8BAA6B,WAAU,WAAU,MAAK,QAAO,SAAQ,aAAY,QAAO,gBACjG,UAAA,gBAAAA,EAAC,QAAA,EAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAa,GAAG,GAAE,iBAAA,CAAiB,EAAA,CACxF,GAGIC,IAAc,MAClB,gBAAAD,EAAC,OAAA,EAAI,OAAM,8BAA6B,WAAU,WAAU,MAAK,QAAO,SAAQ,aAAY,QAAO,gBACjG,UAAA,gBAAAA,EAAC,QAAA,EAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAa,GAAG,GAAE,4BAAA,CAA4B,EAAA,CACnG,GAGIE,IAAY,MAChB,gBAAAF,EAAC,OAAA,EAAI,OAAM,8BAA6B,WAAU,WAAU,MAAK,QAAO,SAAQ,aAAY,QAAO,gBACjG,UAAA,gBAAAA,EAAC,QAAA,EAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAa,GAAG,GAAE,uBAAA,CAAuB,EAAA,CAC9F,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ASC,CAAU,IAAIC,EAAS,EAAK;AAE5C,EAAAC,EAAU,MAAM;AACd,UAAMC,IAAelC,IAASA,EAAA,IAAW,QAEnCmC,IAAe,MAAM;AACzB,YAAMC,IACJF,aAAwB,SACpB,OAAO,UACNA,EAA6B;AAEpC,MAAAH,EAAWK,KAAaR,CAAgB;AAAA,IAC1C;AAEA,WAAAM,EAAa,iBAAiB,UAAUC,CAAY,GACpDA,EAAA,GAEO,MAAMD,EAAa,oBAAoB,UAAUC,CAAY;AAAA,EACtE,GAAG,CAACnC,GAAQ4B,CAAgB,CAAC;AAE7B,QAAMS,IAAc,MAAM;AACxB,IAAA7C,IAAA;AACA,UAAM0C,IAAelC,IAASA,EAAA,IAAW;AACzC,IAAIkC,aAAwB,SAC1B,OAAO,SAAS,EAAE,KAAK,GAAG,UAAU,UAAU,IAE7CA,EAA6B,SAAS,EAAE,KAAK,GAAG,UAAU,UAAU;AAAA,EAEzE;AAEA,MAAI,CAACJ,EAAS,QAAO;AAErB,QAAMvB,IAAgB;AAAA,IACpB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACAZ;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG,GAELO,IAA6B;AAAA,IACjC,UAAU;AAAA,IACV,QAAQ;AAAA,IACR,QAAQqB;AAAA,IACR,GAAID,EAAS,SAAS,OAAO,IAAI,EAAE,OAAOC,EAAA,IAAW,EAAE,MAAMA,EAAA;AAAA,IAC7D,GAAGP;AAAA,EAAA;AAGL,SACE,gBAAAnC,EAAC,UAAA,EAAO,WAAW0B,GAAe,SAAS8B,GAAa,OAAAnC,GAAe,GAAGC,GACvE,UAAAb,KAAQW,KAAY,gBAAApB,EAACC,KAAY,GACpC;AAEJ;AAEAgC,EAAY,QAAQG;AACpBH,EAAY,UAAUa;"}
1
+ {"version":3,"file":"index32.js","sources":["../src/components/Flex.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface FlexProps extends React.HTMLAttributes<HTMLDivElement> {\n direction?: 'row' | 'column' | 'row-reverse' | 'column-reverse'\n justify?: 'start' | 'end' | 'center' | 'between' | 'around' | 'evenly'\n align?: 'start' | 'end' | 'center' | 'baseline' | 'stretch'\n wrap?: boolean | 'wrap' | 'nowrap' | 'wrap-reverse'\n gap?: 'xs' | 'sm' | 'md' | 'lg' | 'xl' | number\n flex?: '1' | 'auto' | 'initial' | 'none'\n inline?: boolean\n minHeight?: 'screen' | 'full' | 'fit' | 'min' | 'max'\n minWidth?: 'full' | 'fit' | 'min' | 'max'\n children?: React.ReactNode\n}\n\nexport const Flex: React.FC<FlexProps> = ({\n direction,\n justify,\n align,\n wrap,\n gap,\n flex,\n inline = false,\n minHeight,\n minWidth,\n className = '',\n style,\n children,\n ...rest\n}) => {\n const isNumericGap = typeof gap === 'number'\n\n const classes = [\n inline ? 'inline-flex' : 'flex',\n direction === 'row' && 'flex-row',\n direction === 'column' && 'flex-col',\n direction === 'row-reverse' && 'flex-row-reverse',\n direction === 'column-reverse' && 'flex-col-reverse',\n justify === 'start' && 'justify-start',\n justify === 'end' && 'justify-end',\n justify === 'center' && 'justify-center',\n justify === 'between' && 'justify-between',\n justify === 'around' && 'justify-around',\n justify === 'evenly' && 'justify-evenly',\n align === 'start' && 'items-start',\n align === 'end' && 'items-end',\n align === 'center' && 'items-center',\n align === 'baseline' && 'items-baseline',\n align === 'stretch' && 'items-stretch',\n wrap === true && 'flex-wrap',\n wrap === 'wrap' && 'flex-wrap',\n wrap === 'nowrap' && 'flex-nowrap',\n wrap === 'wrap-reverse' && 'flex-wrap-reverse',\n !isNumericGap && gap === 'xs' && 'gap-1',\n !isNumericGap && gap === 'sm' && 'gap-2',\n !isNumericGap && gap === 'md' && 'gap-4',\n !isNumericGap && gap === 'lg' && 'gap-6',\n !isNumericGap && gap === 'xl' && 'gap-8',\n flex === '1' && 'flex-1',\n flex === 'auto' && 'flex-auto',\n flex === 'initial' && 'flex-initial',\n flex === 'none' && 'flex-none',\n minHeight === 'screen' && 'min-h-screen',\n minHeight === 'full' && 'min-h-full',\n minHeight === 'fit' && 'min-h-fit',\n minHeight === 'min' && 'min-h-min',\n minHeight === 'max' && 'min-h-max',\n minWidth === 'full' && 'min-w-full',\n minWidth === 'fit' && 'min-w-fit',\n minWidth === 'min' && 'min-w-min',\n minWidth === 'max' && 'min-w-max',\n className,\n ].filter(Boolean).join(' ')\n\n const combinedStyle: React.CSSProperties = {\n ...style,\n ...(isNumericGap ? { gap: `${gap}px` } : {}),\n }\n\n return (\n <div className={classes} style={combinedStyle} {...rest}>\n {children}\n </div>\n )\n}\n"],"names":["Flex","direction","justify","align","wrap","gap","flex","inline","minHeight","minWidth","className","style","children","rest","isNumericGap","classes","combinedStyle","jsx"],"mappings":";AAeO,MAAMA,IAA4B,CAAC;AAAA,EACxC,WAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,KAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC,IAAS;AAAA,EACT,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAe,OAAOT,KAAQ,UAE9BU,IAAU;AAAA,IACdR,IAAS,gBAAgB;AAAA,IACzBN,MAAc,SAAS;AAAA,IACvBA,MAAc,YAAY;AAAA,IAC1BA,MAAc,iBAAiB;AAAA,IAC/BA,MAAc,oBAAoB;AAAA,IAClCC,MAAY,WAAW;AAAA,IACvBA,MAAY,SAAS;AAAA,IACrBA,MAAY,YAAY;AAAA,IACxBA,MAAY,aAAa;AAAA,IACzBA,MAAY,YAAY;AAAA,IACxBA,MAAY,YAAY;AAAA,IACxBC,MAAU,WAAW;AAAA,IACrBA,MAAU,SAAS;AAAA,IACnBA,MAAU,YAAY;AAAA,IACtBA,MAAU,cAAc;AAAA,IACxBA,MAAU,aAAa;AAAA,IACvBC,MAAS,MAAQ;AAAA,IACjBA,MAAS,UAAU;AAAA,IACnBA,MAAS,YAAY;AAAA,IACrBA,MAAS,kBAAkB;AAAA,IAC3B,CAACU,KAAgBT,MAAQ,QAAQ;AAAA,IACjC,CAACS,KAAgBT,MAAQ,QAAQ;AAAA,IACjC,CAACS,KAAgBT,MAAQ,QAAQ;AAAA,IACjC,CAACS,KAAgBT,MAAQ,QAAQ;AAAA,IACjC,CAACS,KAAgBT,MAAQ,QAAQ;AAAA,IACjCC,MAAS,OAAO;AAAA,IAChBA,MAAS,UAAU;AAAA,IACnBA,MAAS,aAAa;AAAA,IACtBA,MAAS,UAAU;AAAA,IACnBE,MAAc,YAAY;AAAA,IAC1BA,MAAc,UAAU;AAAA,IACxBA,MAAc,SAAS;AAAA,IACvBA,MAAc,SAAS;AAAA,IACvBA,MAAc,SAAS;AAAA,IACvBC,MAAa,UAAU;AAAA,IACvBA,MAAa,SAAS;AAAA,IACtBA,MAAa,SAAS;AAAA,IACtBA,MAAa,SAAS;AAAA,IACtBC;AAAA,EAAA,EACA,OAAO,OAAO,EAAE,KAAK,GAAG,GAEpBM,IAAqC;AAAA,IACzC,GAAGL;AAAA,IACH,GAAIG,IAAe,EAAE,KAAK,GAAGT,CAAG,SAAS,CAAA;AAAA,EAAC;AAG5C,SACE,gBAAAY,EAAC,SAAI,WAAWF,GAAS,OAAOC,GAAgB,GAAGH,GAChD,UAAAD,GACH;AAEJ;"}
package/dist/index33.js CHANGED
@@ -1,21 +1,187 @@
1
- import { jsx as r } from "react/jsx-runtime";
2
- function a({ children: o, className: e = "", center: t = !1, horizontal: s = !1, vertical: f = !1, ...l }) {
3
- const n = [
4
- "footer",
5
- t && "footer-center",
6
- s && "footer-horizontal",
7
- f && "footer-vertical",
8
- e
9
- ].filter(Boolean).join(" ");
10
- return /* @__PURE__ */ r("footer", { className: n, ...l, children: o });
11
- }
12
- function i({ children: o, className: e = "", ...t }) {
13
- return /* @__PURE__ */ r("h6", { className: `footer-title ${e}`, ...t, children: o });
14
- }
15
- const m = Object.assign(a, {
16
- Title: i
17
- });
1
+ import { jsx as t, jsxs as N, Fragment as I } from "react/jsx-runtime";
2
+ import { useContext as C, createContext as F, useState as S, useEffect as W } from "react";
3
+ const y = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M12 4v16m8-8H4" }) }), E = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M5 10l7-7m0 0l7 7m-7-7v18" }) }), M = () => /* @__PURE__ */ t("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-6 w-6", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: /* @__PURE__ */ t("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M6 18L18 6M6 6l12 12" }) }), f = F({ inGroup: !1 }), P = {
4
+ left: "tooltip-left",
5
+ right: "tooltip-right",
6
+ top: "tooltip-top",
7
+ bottom: "tooltip-bottom"
8
+ }, j = {
9
+ default: "btn-neutral",
10
+ primary: "btn-primary"
11
+ }, L = {
12
+ circle: "btn-circle",
13
+ square: "btn-square"
14
+ }, B = ({
15
+ icon: d,
16
+ description: l,
17
+ onClick: o,
18
+ type: p = "default",
19
+ shape: u = "circle",
20
+ className: w = "",
21
+ tooltip: c,
22
+ tooltipPlacement: v = "left",
23
+ badge: a,
24
+ href: e,
25
+ target: i,
26
+ children: g,
27
+ style: m,
28
+ ...s
29
+ }) => {
30
+ const h = C(f), x = h.inGroup && h.shape || u, n = [
31
+ "btn",
32
+ "btn-lg",
33
+ "shadow-lg",
34
+ L[x],
35
+ j[p],
36
+ w
37
+ ].filter(Boolean).join(" "), b = d || g || /* @__PURE__ */ t(y, {}), r = /* @__PURE__ */ t(I, { children: l ? /* @__PURE__ */ N("div", { className: "flex flex-col items-center", children: [
38
+ b,
39
+ /* @__PURE__ */ t("span", { className: "text-xs mt-1", children: l })
40
+ ] }) : b });
41
+ if (h.inGroup)
42
+ return e ? /* @__PURE__ */ t(
43
+ "a",
44
+ {
45
+ href: e,
46
+ target: i,
47
+ className: n,
48
+ title: c,
49
+ onClick: o,
50
+ ...s,
51
+ children: r
52
+ }
53
+ ) : /* @__PURE__ */ t("button", { className: n, title: c, onClick: o, ...s, children: r });
54
+ const G = e ? /* @__PURE__ */ t(
55
+ "a",
56
+ {
57
+ href: e,
58
+ target: i,
59
+ className: n,
60
+ style: m,
61
+ onClick: o,
62
+ ...s,
63
+ children: r
64
+ }
65
+ ) : /* @__PURE__ */ t("button", { className: n, onClick: o, style: m, ...s, children: r }), T = a !== void 0 ? /* @__PURE__ */ N("div", { className: "indicator", style: m, children: [
66
+ /* @__PURE__ */ t("span", { className: "indicator-item badge badge-secondary", children: a }),
67
+ e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r })
68
+ ] }) : G;
69
+ return c ? /* @__PURE__ */ t("div", { className: `tooltip ${P[v]}`, "data-tip": c, style: m, children: a !== void 0 ? /* @__PURE__ */ N("div", { className: "indicator", children: [
70
+ /* @__PURE__ */ t("span", { className: "indicator-item badge badge-secondary", children: a }),
71
+ e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r })
72
+ ] }) : e ? /* @__PURE__ */ t("a", { href: e, target: i, className: n, onClick: o, ...s, children: r }) : /* @__PURE__ */ t("button", { className: n, onClick: o, ...s, children: r }) }) : T;
73
+ }, k = (d) => {
74
+ const {
75
+ style: l,
76
+ ...o
77
+ } = d;
78
+ if (C(f).inGroup)
79
+ return /* @__PURE__ */ t(B, { ...o });
80
+ const u = {
81
+ position: "fixed",
82
+ zIndex: 1e3,
83
+ bottom: 24,
84
+ right: 24,
85
+ ...l
86
+ };
87
+ return /* @__PURE__ */ t(B, { ...o, style: u });
88
+ }, $ = ({
89
+ children: d,
90
+ flower: l = !1,
91
+ shape: o = "circle",
92
+ icon: p,
93
+ mainAction: u,
94
+ onMainAction: w,
95
+ showClose: c = !1,
96
+ type: v = "default",
97
+ position: a = "bottom-right",
98
+ offset: e = 24,
99
+ className: i = "",
100
+ style: g
101
+ }) => {
102
+ const m = [
103
+ "fab",
104
+ l ? "fab-flower" : "",
105
+ i
106
+ ].filter(Boolean).join(" "), s = [
107
+ "btn",
108
+ "btn-lg",
109
+ "shadow-lg",
110
+ L[o],
111
+ j[v]
112
+ ].filter(Boolean).join(" "), h = {
113
+ ...a.includes("bottom") ? { bottom: e } : { top: e },
114
+ ...a.includes("right") ? { right: e } : { left: e },
115
+ ...g
116
+ };
117
+ return /* @__PURE__ */ N("div", { className: m, style: h, children: [
118
+ /* @__PURE__ */ t(
119
+ "div",
120
+ {
121
+ tabIndex: 0,
122
+ role: "button",
123
+ className: s,
124
+ children: p || /* @__PURE__ */ t(y, {})
125
+ }
126
+ ),
127
+ u && /* @__PURE__ */ t(
128
+ "button",
129
+ {
130
+ className: `${s} fab-main-action`,
131
+ onClick: w,
132
+ children: u
133
+ }
134
+ ),
135
+ c && /* @__PURE__ */ t("button", { className: `${s} fab-close`, children: /* @__PURE__ */ t(M, {}) }),
136
+ /* @__PURE__ */ t(f.Provider, { value: { inGroup: !0, shape: o }, children: d })
137
+ ] });
138
+ }, q = ({
139
+ visibilityHeight: d = 400,
140
+ target: l,
141
+ onClick: o,
142
+ icon: p,
143
+ duration: u = 450,
144
+ position: w = "bottom-right",
145
+ offset: c = 24,
146
+ className: v = "",
147
+ children: a,
148
+ style: e,
149
+ ...i
150
+ }) => {
151
+ const [g, m] = S(!1);
152
+ W(() => {
153
+ const n = l ? l() : window, b = () => {
154
+ const r = n instanceof Window ? window.scrollY : n.scrollTop;
155
+ m(r >= d);
156
+ };
157
+ return n.addEventListener("scroll", b), b(), () => n.removeEventListener("scroll", b);
158
+ }, [l, d]);
159
+ const s = () => {
160
+ o?.();
161
+ const n = l ? l() : window;
162
+ n instanceof Window ? window.scrollTo({ top: 0, behavior: "smooth" }) : n.scrollTo({ top: 0, behavior: "smooth" });
163
+ };
164
+ if (!g) return null;
165
+ const h = [
166
+ "btn",
167
+ "btn-lg",
168
+ "btn-circle",
169
+ "btn-neutral",
170
+ "shadow-lg",
171
+ "transition-opacity",
172
+ v
173
+ ].filter(Boolean).join(" "), x = {
174
+ position: "fixed",
175
+ zIndex: 1e3,
176
+ bottom: c,
177
+ ...w.includes("right") ? { right: c } : { left: c },
178
+ ...e
179
+ };
180
+ return /* @__PURE__ */ t("button", { className: h, onClick: s, style: x, ...i, children: p || a || /* @__PURE__ */ t(E, {}) });
181
+ };
182
+ k.Group = $;
183
+ k.BackTop = q;
18
184
  export {
19
- m as Footer
185
+ k as FloatButton
20
186
  };
21
187
  //# sourceMappingURL=index33.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index33.js","sources":["../src/components/Footer.tsx"],"sourcesContent":["import React from 'react'\n\nexport interface FooterProps extends React.HTMLAttributes<HTMLElement> {\n children: React.ReactNode\n center?: boolean\n horizontal?: boolean\n vertical?: boolean\n}\n\nexport interface FooterTitleProps extends React.HTMLAttributes<HTMLHeadingElement> {\n children: React.ReactNode\n}\n\nfunction FooterRoot({ children, className = '', center = false, horizontal = false, vertical = false, ...rest }: FooterProps) {\n const classes = [\n 'footer',\n center && 'footer-center',\n horizontal && 'footer-horizontal',\n vertical && 'footer-vertical',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n return <footer className={classes} {...rest}>{children}</footer>\n}\n\nfunction FooterTitle({ children, className = '', ...rest }: FooterTitleProps) {\n return <h6 className={`footer-title ${className}`} {...rest}>{children}</h6>\n}\n\nexport const Footer = Object.assign(FooterRoot, {\n Title: FooterTitle,\n})\n"],"names":["FooterRoot","children","className","center","horizontal","vertical","rest","classes","FooterTitle","jsx","Footer"],"mappings":";AAaA,SAASA,EAAW,EAAE,UAAAC,GAAU,WAAAC,IAAY,IAAI,QAAAC,IAAS,IAAO,YAAAC,IAAa,IAAO,UAAAC,IAAW,IAAO,GAAGC,KAAqB;AAC5H,QAAMC,IAAU;AAAA,IACd;AAAA,IACAJ,KAAU;AAAA,IACVC,KAAc;AAAA,IACdC,KAAY;AAAA,IACZH;AAAA,EAAA,EAEC,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,2BAAQ,UAAA,EAAO,WAAWK,GAAU,GAAGD,GAAO,UAAAL,GAAS;AACzD;AAEA,SAASO,EAAY,EAAE,UAAAP,GAAU,WAAAC,IAAY,IAAI,GAAGI,KAA0B;AAC5E,SAAO,gBAAAG,EAAC,QAAG,WAAW,gBAAgBP,CAAS,IAAK,GAAGI,GAAO,UAAAL,GAAS;AACzE;AAEO,MAAMS,IAAS,OAAO,OAAOV,GAAY;AAAA,EAC9C,OAAOQ;AACT,CAAC;"}
1
+ {"version":3,"file":"index33.js","sources":["../src/components/FloatButton.tsx"],"sourcesContent":["import React, { useState, useEffect, createContext, useContext } from 'react'\n\n// Default icons\nconst PlusIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M12 4v16m8-8H4\" />\n </svg>\n)\n\nconst ArrowUpIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M5 10l7-7m0 0l7 7m-7-7v18\" />\n </svg>\n)\n\nconst CloseIcon = () => (\n <svg xmlns=\"http://www.w3.org/2000/svg\" className=\"h-6 w-6\" fill=\"none\" viewBox=\"0 0 24 24\" stroke=\"currentColor\">\n <path strokeLinecap=\"round\" strokeLinejoin=\"round\" strokeWidth={2} d=\"M6 18L18 6M6 6l12 12\" />\n </svg>\n)\n\nexport interface FloatButtonProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type'> {\n /** Icon to display */\n icon?: React.ReactNode\n /** Description text below icon */\n description?: React.ReactNode\n /** Button type/color */\n type?: 'default' | 'primary'\n /** Button shape */\n shape?: 'circle' | 'square'\n /** Tooltip text */\n tooltip?: string\n /** Tooltip placement */\n tooltipPlacement?: 'left' | 'right' | 'top' | 'bottom'\n /** Badge content */\n badge?: number | React.ReactNode\n /** Link URL (renders as anchor) */\n href?: string\n /** Link target */\n target?: string\n /** @deprecated Use icon prop instead */\n children?: React.ReactNode\n}\n\nexport interface FloatButtonGroupProps {\n /** Child FloatButton components */\n children: React.ReactNode\n /** Arrange buttons in a quarter-circle (radial) layout */\n flower?: boolean\n /** Button shape for children */\n shape?: 'circle' | 'square'\n /** Main trigger button icon */\n icon?: React.ReactNode\n /** Main action button that replaces trigger when open (fab-main-action) */\n mainAction?: React.ReactNode\n /** Click handler for main action button */\n onMainAction?: () => void\n /** Show close button when open (fab-close) */\n showClose?: boolean\n /** Button type/color */\n type?: 'default' | 'primary'\n /** Position on screen */\n position?: 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left'\n /** Distance from edge */\n offset?: number\n /** Additional CSS classes */\n className?: string\n /** Custom styles */\n style?: React.CSSProperties\n}\n\nexport interface BackTopProps extends Omit<React.ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'onClick'> {\n /** Scroll threshold to show button (pixels) */\n visibilityHeight?: number\n /** Scroll target (default: window) */\n target?: () => HTMLElement | Window\n /** Click handler (called before scrolling) */\n onClick?: () => void\n /** Custom icon */\n icon?: React.ReactNode\n /** Duration of scroll animation in ms */\n duration?: number\n /** Position on screen */\n position?: 'bottom-right' | 'bottom-left'\n /** Distance from edge in pixels */\n offset?: number\n /** @deprecated Use icon prop instead */\n children?: React.ReactNode\n}\n\n// Context for group\ninterface FloatButtonGroupContextValue {\n inGroup: boolean\n shape?: 'circle' | 'square'\n}\n\nconst FloatButtonGroupContext = createContext<FloatButtonGroupContextValue>({ inGroup: false })\n\nconst tooltipPlacementClasses: Record<string, string> = {\n left: 'tooltip-left',\n right: 'tooltip-right',\n top: 'tooltip-top',\n bottom: 'tooltip-bottom',\n}\n\nconst typeClasses: Record<string, string> = {\n default: 'btn-neutral',\n primary: 'btn-primary',\n}\n\nconst shapeClasses: Record<string, string> = {\n circle: 'btn-circle',\n square: 'btn-square',\n}\n\ninterface FloatButtonComponent extends React.FC<FloatButtonProps> {\n Group: React.FC<FloatButtonGroupProps>\n BackTop: React.FC<BackTopProps>\n}\n\nconst FloatButtonBase: React.FC<FloatButtonProps & { style?: React.CSSProperties }> = ({\n icon,\n description,\n onClick,\n type = 'default',\n shape = 'circle',\n className = '',\n tooltip,\n tooltipPlacement = 'left',\n badge,\n href,\n target,\n children,\n style,\n ...rest\n}) => {\n const groupContext = useContext(FloatButtonGroupContext)\n const effectiveShape = groupContext.inGroup ? (groupContext.shape || shape) : shape\n\n const buttonClasses = [\n 'btn',\n 'btn-lg',\n 'shadow-lg',\n shapeClasses[effectiveShape],\n typeClasses[type],\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const content = icon || children || <PlusIcon />\n\n const buttonContent = (\n <>\n {description ? (\n <div className=\"flex flex-col items-center\">\n {content}\n <span className=\"text-xs mt-1\">{description}</span>\n </div>\n ) : (\n content\n )}\n </>\n )\n\n // When inside a group, render simple button without wrapper divs\n // DaisyUI's fab CSS requires direct button children\n if (groupContext.inGroup) {\n return href ? (\n <a\n href={href}\n target={target}\n className={buttonClasses}\n title={tooltip}\n onClick={onClick as any}\n {...(rest as any)}\n >\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} title={tooltip} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )\n }\n\n const buttonElement = href ? (\n <a\n href={href}\n target={target}\n className={buttonClasses}\n style={style}\n onClick={onClick as any}\n {...(rest as any)}\n >\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} style={style} {...rest}>\n {buttonContent}\n </button>\n )\n\n const withBadge = badge !== undefined ? (\n <div className=\"indicator\" style={style}>\n <span className=\"indicator-item badge badge-secondary\">\n {badge}\n </span>\n {href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n ) : buttonElement\n\n if (tooltip) {\n return (\n <div className={`tooltip ${tooltipPlacementClasses[tooltipPlacement]}`} data-tip={tooltip} style={style}>\n {badge !== undefined ? (\n <div className=\"indicator\">\n <span className=\"indicator-item badge badge-secondary\">{badge}</span>\n {href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n ) : href ? (\n <a href={href} target={target} className={buttonClasses} onClick={onClick as any} {...(rest as any)}>\n {buttonContent}\n </a>\n ) : (\n <button className={buttonClasses} onClick={onClick} {...rest}>\n {buttonContent}\n </button>\n )}\n </div>\n )\n }\n\n return withBadge\n}\n\nexport const FloatButton: FloatButtonComponent = (props) => {\n const {\n style: propStyle,\n ...rest\n } = props\n\n const groupContext = useContext(FloatButtonGroupContext)\n\n // If in group, don't apply fixed positioning\n if (groupContext.inGroup) {\n return <FloatButtonBase {...rest} />\n }\n\n // Standalone button with fixed positioning\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 1000,\n bottom: 24,\n right: 24,\n ...propStyle,\n }\n\n return <FloatButtonBase {...rest} style={style} />\n}\n\nconst FloatButtonGroup: React.FC<FloatButtonGroupProps> = ({\n children,\n flower = false,\n shape = 'circle',\n icon,\n mainAction,\n onMainAction,\n showClose = false,\n type = 'default',\n position = 'bottom-right',\n offset = 24,\n className = '',\n style: propStyle,\n}) => {\n const fabClasses = [\n 'fab',\n flower ? 'fab-flower' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const triggerButtonClasses = [\n 'btn',\n 'btn-lg',\n 'shadow-lg',\n shapeClasses[shape],\n typeClasses[type],\n ]\n .filter(Boolean)\n .join(' ')\n\n const containerStyle: React.CSSProperties = {\n ...(position.includes('bottom') ? { bottom: offset } : { top: offset }),\n ...(position.includes('right') ? { right: offset } : { left: offset }),\n ...propStyle,\n }\n\n return (\n <div className={fabClasses} style={containerStyle}>\n {/* Trigger button - shown when closed */}\n <div\n tabIndex={0}\n role=\"button\"\n className={triggerButtonClasses}\n >\n {icon || <PlusIcon />}\n </div>\n\n {/* Main action button - shown when open (replaces trigger in flower mode) */}\n {mainAction && (\n <button\n className={`${triggerButtonClasses} fab-main-action`}\n onClick={onMainAction}\n >\n {mainAction}\n </button>\n )}\n\n {/* Close button - shown when open */}\n {showClose && (\n <button className={`${triggerButtonClasses} fab-close`}>\n <CloseIcon />\n </button>\n )}\n\n <FloatButtonGroupContext.Provider value={{ inGroup: true, shape }}>\n {children}\n </FloatButtonGroupContext.Provider>\n </div>\n )\n}\n\nconst BackTop: React.FC<BackTopProps> = ({\n visibilityHeight = 400,\n target,\n onClick,\n icon,\n duration = 450,\n position = 'bottom-right',\n offset = 24,\n className = '',\n children,\n style: propStyle,\n ...rest\n}) => {\n const [visible, setVisible] = useState(false)\n\n useEffect(() => {\n const scrollTarget = target ? target() : window\n\n const handleScroll = () => {\n const scrollTop =\n scrollTarget instanceof Window\n ? window.scrollY\n : (scrollTarget as HTMLElement).scrollTop\n\n setVisible(scrollTop >= visibilityHeight)\n }\n\n scrollTarget.addEventListener('scroll', handleScroll)\n handleScroll()\n\n return () => scrollTarget.removeEventListener('scroll', handleScroll)\n }, [target, visibilityHeight])\n\n const handleClick = () => {\n onClick?.()\n const scrollTarget = target ? target() : window\n if (scrollTarget instanceof Window) {\n window.scrollTo({ top: 0, behavior: 'smooth' })\n } else {\n (scrollTarget as HTMLElement).scrollTo({ top: 0, behavior: 'smooth' })\n }\n }\n\n if (!visible) return null\n\n const buttonClasses = [\n 'btn',\n 'btn-lg',\n 'btn-circle',\n 'btn-neutral',\n 'shadow-lg',\n 'transition-opacity',\n className,\n ]\n .filter(Boolean)\n .join(' ')\n\n const style: React.CSSProperties = {\n position: 'fixed',\n zIndex: 1000,\n bottom: offset,\n ...(position.includes('right') ? { right: offset } : { left: offset }),\n ...propStyle,\n }\n\n return (\n <button className={buttonClasses} onClick={handleClick} style={style} {...rest}>\n {icon || children || <ArrowUpIcon />}\n </button>\n )\n}\n\nFloatButton.Group = FloatButtonGroup\nFloatButton.BackTop = BackTop\n"],"names":["PlusIcon","jsx","ArrowUpIcon","CloseIcon","FloatButtonGroupContext","createContext","tooltipPlacementClasses","typeClasses","shapeClasses","FloatButtonBase","icon","description","onClick","type","shape","className","tooltip","tooltipPlacement","badge","href","target","children","style","rest","groupContext","useContext","effectiveShape","buttonClasses","content","buttonContent","Fragment","jsxs","buttonElement","withBadge","FloatButton","props","propStyle","FloatButtonGroup","flower","mainAction","onMainAction","showClose","position","offset","fabClasses","triggerButtonClasses","containerStyle","BackTop","visibilityHeight","duration","visible","setVisible","useState","useEffect","scrollTarget","handleScroll","scrollTop","handleClick"],"mappings":";;AAGA,MAAMA,IAAW,MACf,gBAAAC,EAAC,OAAA,EAAI,OAAM,8BAA6B,WAAU,WAAU,MAAK,QAAO,SAAQ,aAAY,QAAO,gBACjG,UAAA,gBAAAA,EAAC,QAAA,EAAK,eAAc,SAAQ,gBAAe,SAAQ,aAAa,GAAG,GAAE,iBAAA,CAAiB,EAAA,CACxF,GAGIC,IAAc,MAClB,gBAAAD,EAAC,OAAA,EAAI,OAAM,8BAA6B,WAAU,WAAU,MAAK,QAAO,SAAQ,aAAY,QAAO,gBACjG,UAAA,gBAA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