@lobehub/ui 5.18.0 → 5.19.1

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 (64) hide show
  1. package/es/Accordion/Accordion.mjs +2 -2
  2. package/es/Accordion/Accordion.mjs.map +1 -1
  3. package/es/Accordion/AccordionItem.mjs +2 -2
  4. package/es/Accordion/AccordionItem.mjs.map +1 -1
  5. package/es/Checkbox/Checkbox.mjs +2 -2
  6. package/es/Checkbox/Checkbox.mjs.map +1 -1
  7. package/es/Checkbox/CheckboxGroup.mjs +2 -2
  8. package/es/Checkbox/CheckboxGroup.mjs.map +1 -1
  9. package/es/CodeEditor/CodeEditor.mjs +2 -2
  10. package/es/CodeEditor/CodeEditor.mjs.map +1 -1
  11. package/es/ColorSwatches/ColorSwatches.mjs +2 -2
  12. package/es/ColorSwatches/ColorSwatches.mjs.map +1 -1
  13. package/es/DraggablePanel/DraggablePanel.mjs +2 -2
  14. package/es/DraggablePanel/DraggablePanel.mjs.map +1 -1
  15. package/es/DraggablePanel/components/DraggablePanelHeader.mjs +2 -2
  16. package/es/DraggablePanel/components/DraggablePanelHeader.mjs.map +1 -1
  17. package/es/DraggableSideNav/DraggableSideNav.mjs +2 -2
  18. package/es/DraggableSideNav/DraggableSideNav.mjs.map +1 -1
  19. package/es/EditableText/EditableText.mjs +2 -2
  20. package/es/EditableText/EditableText.mjs.map +1 -1
  21. package/es/EmojiPicker/EmojiPicker.mjs +3 -3
  22. package/es/EmojiPicker/EmojiPicker.mjs.map +1 -1
  23. package/es/HotkeyInput/HotkeyInput.mjs +2 -2
  24. package/es/HotkeyInput/HotkeyInput.mjs.map +1 -1
  25. package/es/ImageSelect/ImageSelect.mjs +2 -2
  26. package/es/ImageSelect/ImageSelect.mjs.map +1 -1
  27. package/es/SearchBar/SearchBar.mjs +2 -2
  28. package/es/SearchBar/SearchBar.mjs.map +1 -1
  29. package/es/SliderWithInput/SliderWithInput.mjs +2 -1
  30. package/es/SliderWithInput/SliderWithInput.mjs.map +1 -1
  31. package/es/Toc/TocMobile.mjs +2 -2
  32. package/es/Toc/TocMobile.mjs.map +1 -1
  33. package/es/base-ui/Button/Button.mjs +2 -0
  34. package/es/base-ui/Button/Button.mjs.map +1 -1
  35. package/es/base-ui/Button/style.d.mts +3 -0
  36. package/es/base-ui/Button/style.mjs +119 -17
  37. package/es/base-ui/Button/style.mjs.map +1 -1
  38. package/es/base-ui/Button/type.d.mts +1 -1
  39. package/es/base-ui/FloatingPanel/FloatingPanel.d.mts +8 -0
  40. package/es/base-ui/FloatingPanel/FloatingPanel.mjs +325 -0
  41. package/es/base-ui/FloatingPanel/FloatingPanel.mjs.map +1 -0
  42. package/es/base-ui/FloatingPanel/index.d.mts +2 -0
  43. package/es/base-ui/FloatingPanel/style.mjs +177 -0
  44. package/es/base-ui/FloatingPanel/style.mjs.map +1 -0
  45. package/es/base-ui/FloatingPanel/type.d.mts +75 -0
  46. package/es/base-ui/Segmented/Segmented.mjs +2 -2
  47. package/es/base-ui/Segmented/Segmented.mjs.map +1 -1
  48. package/es/base-ui/Segmented/style.mjs +1 -1
  49. package/es/base-ui/Segmented/style.mjs.map +1 -1
  50. package/es/base-ui/Switch/atoms.mjs +2 -2
  51. package/es/base-ui/Switch/atoms.mjs.map +1 -1
  52. package/es/base-ui/Tabs/Tabs.mjs +2 -2
  53. package/es/base-ui/Tabs/Tabs.mjs.map +1 -1
  54. package/es/base-ui/Tabs/style.mjs +1 -1
  55. package/es/base-ui/Tabs/style.mjs.map +1 -1
  56. package/es/base-ui/index.d.mts +5 -3
  57. package/es/base-ui/index.mjs +3 -2
  58. package/es/chat/EditableMessage/EditableMessage.mjs +3 -3
  59. package/es/chat/EditableMessage/EditableMessage.mjs.map +1 -1
  60. package/es/chat/MessageModal/MessageModal.mjs +3 -3
  61. package/es/chat/MessageModal/MessageModal.mjs.map +1 -1
  62. package/es/mobile/TabBar/TabBar.mjs +2 -2
  63. package/es/mobile/TabBar/TabBar.mjs.map +1 -1
  64. package/package.json +1 -1
@@ -105,9 +105,15 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
105
105
  opacity: 1;
106
106
  `,
107
107
  variantDefault: css`
108
- color: ${cssVar.colorText};
109
108
  background: ${cssVar.colorBgContainer};
110
109
 
110
+ /* &:hover/&:active included so the anchor form outranks antd's global a:hover/a:active link color */
111
+ &,
112
+ &:hover,
113
+ &:active {
114
+ color: ${cssVar.colorText};
115
+ }
116
+
111
117
  &:hover:not(:disabled, [aria-disabled='true']) {
112
118
  border-color: ${cssVar.colorPrimaryBorder};
113
119
  color: ${cssVar.colorPrimaryText};
@@ -115,9 +121,14 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
115
121
  `,
116
122
  variantPrimary: css`
117
123
  border-color: ${cssVar.colorPrimary};
118
- color: ${cssVar.colorBgLayout};
119
124
  background: ${cssVar.colorPrimary};
120
125
 
126
+ &,
127
+ &:hover,
128
+ &:active {
129
+ color: ${cssVar.colorBgLayout};
130
+ }
131
+
121
132
  &:hover:not(:disabled, [aria-disabled='true']) {
122
133
  border-color: ${cssVar.colorPrimaryHover};
123
134
  background: ${cssVar.colorPrimaryHover};
@@ -130,19 +141,47 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
130
141
  `,
131
142
  variantDashed: css`
132
143
  border-style: dashed;
133
- color: ${cssVar.colorText};
134
144
  background: ${cssVar.colorBgContainer};
135
145
 
146
+ &,
147
+ &:hover,
148
+ &:active {
149
+ color: ${cssVar.colorText};
150
+ }
151
+
136
152
  &:hover:not(:disabled, [aria-disabled='true']) {
137
153
  border-color: ${cssVar.colorPrimaryBorder};
138
154
  color: ${cssVar.colorPrimaryText};
139
155
  }
156
+ `,
157
+ variantFill: css`
158
+ border-color: transparent;
159
+ background: ${cssVar.colorFillTertiary};
160
+
161
+ &,
162
+ &:hover,
163
+ &:active {
164
+ color: ${cssVar.colorText};
165
+ }
166
+
167
+ &:hover:not(:disabled, [aria-disabled='true']) {
168
+ background: ${cssVar.colorFillSecondary};
169
+ }
170
+
171
+ &:active:not(:disabled, [aria-disabled='true']) {
172
+ background: ${cssVar.colorFill};
173
+ }
140
174
  `,
141
175
  variantText: css`
142
176
  border-color: transparent;
143
- color: ${cssVar.colorText};
144
177
  background: transparent;
145
178
 
179
+ &,
180
+ &:hover,
181
+ &:active {
182
+ color: ${cssVar.colorText};
183
+ }
184
+
146
185
  &:hover:not(:disabled, [aria-disabled='true']) {
147
186
  background: ${cssVar.colorFillSecondary};
148
187
  }
@@ -150,9 +189,14 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
150
189
  variantLink: css`
151
190
  padding-inline: 0;
152
191
  border-color: transparent;
153
- color: ${cssVar.colorPrimary};
154
192
  background: transparent;
155
193
 
194
+ &,
195
+ &:hover,
196
+ &:active {
197
+ color: ${cssVar.colorPrimary};
198
+ }
199
+
156
200
  &:hover:not(:disabled, [aria-disabled='true']) {
157
201
  color: ${cssVar.colorPrimaryHover};
158
202
  background: transparent;
@@ -160,9 +204,14 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
160
204
  `,
161
205
  dangerOutlined: css`
162
206
  border-color: ${cssVar.colorError};
163
- color: ${cssVar.colorError};
164
207
  background: ${cssVar.colorBgContainer};
165
208
 
209
+ &,
210
+ &:hover,
211
+ &:active {
212
+ color: ${cssVar.colorError};
213
+ }
214
+
166
215
  &:hover:not(:disabled, [aria-disabled='true']) {
167
216
  border-color: ${cssVar.colorErrorHover};
168
217
  color: ${cssVar.colorErrorHover};
@@ -171,9 +220,14 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
171
220
  `,
172
221
  dangerSolid: css`
173
222
  border-color: ${cssVar.colorError};
174
- color: ${cssVar.colorBgLayout};
175
223
  background: ${cssVar.colorError};
176
224
 
225
+ &,
226
+ &:hover,
227
+ &:active {
228
+ color: ${cssVar.colorBgLayout};
229
+ }
230
+
177
231
  &:hover:not(:disabled, [aria-disabled='true']) {
178
232
  border-color: ${cssVar.colorErrorHover};
179
233
  background: ${cssVar.colorErrorHover};
@@ -184,44 +238,92 @@ const styles = createStaticStyles(({ css, cssVar }) => ({
184
238
  background: ${cssVar.colorErrorActive};
185
239
  }
186
240
  `,
187
- dangerInline: css`
241
+ dangerFill: css`
242
+ border-color: transparent;
188
243
  color: ${cssVar.colorError};
244
+ background: ${cssVar.colorErrorBg};
245
+
246
+ &:hover:not(:disabled, [aria-disabled='true']) {
247
+ color: ${cssVar.colorErrorHover};
248
+ background: ${cssVar.colorErrorBgHover};
249
+ }
250
+
251
+ &:active:not(:disabled, [aria-disabled='true']) {
252
+ color: ${cssVar.colorErrorActive};
253
+ background: ${cssVar.colorErrorBgHover};
254
+ }
255
+ `,
256
+ dangerInline: css`
257
+ &,
258
+ &:hover,
259
+ &:active {
260
+ color: ${cssVar.colorError};
261
+ }
189
262
 
190
263
  &:hover:not(:disabled, [aria-disabled='true']) {
191
264
  color: ${cssVar.colorErrorHover};
192
265
  }
193
266
  `,
194
267
  ghostDefault: css`
195
- border-color: ${cssVar.colorBorder};
196
- color: ${cssVar.colorText};
268
+ border-color: rgb(255 255 255 / 65%);
197
269
  background: transparent;
198
270
 
271
+ &,
272
+ &:hover,
273
+ &:active {
274
+ color: #fff;
275
+ }
276
+
199
277
  &:hover:not(:disabled, [aria-disabled='true']) {
200
- border-color: ${cssVar.colorPrimaryBorder};
201
- color: ${cssVar.colorPrimaryText};
202
- background: transparent;
278
+ border-color: #fff;
279
+ background: color-mix(in srgb, currentcolor 8%, transparent);
280
+ }
281
+
282
+ &:active:not(:disabled, [aria-disabled='true']) {
283
+ background: color-mix(in srgb, currentcolor 14%, transparent);
203
284
  }
285
+ `,
286
+ ghostDashed: css`
287
+ border-style: dashed;
204
288
  `,
205
289
  ghostPrimary: css`
206
290
  border-color: ${cssVar.colorPrimary};
207
- color: ${cssVar.colorPrimary};
208
291
  background: transparent;
209
292
 
293
+ &,
294
+ &:hover,
295
+ &:active {
296
+ color: ${cssVar.colorPrimary};
297
+ }
298
+
210
299
  &:hover:not(:disabled, [aria-disabled='true']) {
211
300
  border-color: ${cssVar.colorPrimaryHover};
212
301
  color: ${cssVar.colorPrimaryHover};
213
- background: transparent;
302
+ background: color-mix(in srgb, currentcolor 8%, transparent);
303
+ }
304
+
305
+ &:active:not(:disabled, [aria-disabled='true']) {
306
+ background: color-mix(in srgb, currentcolor 14%, transparent);
214
307
  }
215
308
  `,
216
309
  ghostDanger: css`
217
310
  border-color: ${cssVar.colorError};
218
- color: ${cssVar.colorError};
219
311
  background: transparent;
220
312
 
313
+ &,
314
+ &:hover,
315
+ &:active {
316
+ color: ${cssVar.colorError};
317
+ }
318
+
221
319
  &:hover:not(:disabled, [aria-disabled='true']) {
222
320
  border-color: ${cssVar.colorErrorHover};
223
321
  color: ${cssVar.colorErrorHover};
224
- background: transparent;
322
+ background: color-mix(in srgb, currentcolor 8%, transparent);
323
+ }
324
+
325
+ &:active:not(:disabled, [aria-disabled='true']) {
326
+ background: color-mix(in srgb, currentcolor 14%, transparent);
225
327
  }
226
328
  `,
227
329
  spinner: css`
@@ -1 +1 @@
1
- {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Button/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n base: css`\n cursor: pointer;\n\n display: inline-flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 1px solid ${cssVar.colorBorder};\n\n font-weight: 500;\n line-height: 1;\n text-decoration: none;\n white-space: nowrap;\n\n transition:\n color 160ms cubic-bezier(0.32, 0.72, 0, 1),\n background 160ms cubic-bezier(0.32, 0.72, 0, 1),\n border-color 160ms cubic-bezier(0.32, 0.72, 0, 1),\n box-shadow 160ms cubic-bezier(0.32, 0.72, 0, 1);\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n }\n `,\n\n sizeSmall: css`\n height: 24px;\n padding-inline: 8px;\n border-radius: ${cssVar.borderRadiusSM};\n font-size: 12px;\n `,\n\n sizeMiddle: css`\n height: 32px;\n padding-inline: 14px;\n border-radius: ${cssVar.borderRadiusSM};\n font-size: 13px;\n `,\n\n sizeLarge: css`\n height: 40px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n\n shapeCircle: css`\n padding-inline: 0;\n border-radius: 50%;\n `,\n\n shapeRound: css`\n border-radius: 999px;\n `,\n\n block: css`\n width: 100%;\n `,\n\n iconEnd: css`\n flex-direction: row-reverse;\n `,\n\n iconOnlySmall: css`\n width: 24px;\n padding-inline: 0;\n `,\n\n iconOnlyMiddle: css`\n width: 32px;\n padding-inline: 0;\n `,\n\n iconOnlyLarge: css`\n width: 40px;\n padding-inline: 0;\n `,\n\n iconBox: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n `,\n\n spinnerSlot: css`\n overflow: hidden;\n\n width: 0;\n margin-inline-end: -6px;\n\n opacity: 0;\n\n transition:\n width 380ms cubic-bezier(0.22, 1, 0.36, 1),\n margin 380ms cubic-bezier(0.22, 1, 0.36, 1),\n opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);\n `,\n\n spinnerSlotEnd: css`\n margin-inline: -6px 0;\n `,\n\n spinnerSlotShow: css`\n width: 12px;\n margin-inline: 0;\n opacity: 1;\n `,\n\n variantDefault: css`\n color: ${cssVar.colorText};\n background: ${cssVar.colorBgContainer};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryBorder};\n color: ${cssVar.colorPrimaryText};\n }\n `,\n\n variantPrimary: css`\n border-color: ${cssVar.colorPrimary};\n color: ${cssVar.colorBgLayout};\n background: ${cssVar.colorPrimary};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryHover};\n background: ${cssVar.colorPrimaryHover};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryActive};\n background: ${cssVar.colorPrimaryActive};\n }\n `,\n\n variantDashed: css`\n border-style: dashed;\n color: ${cssVar.colorText};\n background: ${cssVar.colorBgContainer};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryBorder};\n color: ${cssVar.colorPrimaryText};\n }\n `,\n\n variantText: css`\n border-color: transparent;\n color: ${cssVar.colorText};\n background: transparent;\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n background: ${cssVar.colorFillSecondary};\n }\n `,\n\n variantLink: css`\n padding-inline: 0;\n border-color: transparent;\n color: ${cssVar.colorPrimary};\n background: transparent;\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorPrimaryHover};\n background: transparent;\n }\n `,\n\n dangerOutlined: css`\n border-color: ${cssVar.colorError};\n color: ${cssVar.colorError};\n background: ${cssVar.colorBgContainer};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n color: ${cssVar.colorErrorHover};\n background: ${cssVar.colorBgContainer};\n }\n `,\n\n dangerSolid: css`\n border-color: ${cssVar.colorError};\n color: ${cssVar.colorBgLayout};\n background: ${cssVar.colorError};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n background: ${cssVar.colorErrorHover};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorActive};\n background: ${cssVar.colorErrorActive};\n }\n `,\n\n dangerInline: css`\n color: ${cssVar.colorError};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorErrorHover};\n }\n `,\n\n ghostDefault: css`\n border-color: ${cssVar.colorBorder};\n color: ${cssVar.colorText};\n background: transparent;\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryBorder};\n color: ${cssVar.colorPrimaryText};\n background: transparent;\n }\n `,\n\n ghostPrimary: css`\n border-color: ${cssVar.colorPrimary};\n color: ${cssVar.colorPrimary};\n background: transparent;\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryHover};\n color: ${cssVar.colorPrimaryHover};\n background: transparent;\n }\n `,\n\n ghostDanger: css`\n border-color: ${cssVar.colorError};\n color: ${cssVar.colorError};\n background: transparent;\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n color: ${cssVar.colorErrorHover};\n background: transparent;\n }\n `,\n\n spinner: css`\n @keyframes base-button-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n display: inline-block;\n\n width: 12px;\n height: 12px;\n border: 1.5px solid currentcolor;\n border-block-start-color: transparent;\n border-radius: 50%;\n\n animation: base-button-spin 0.6s linear infinite;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,MAAM,GAAG;;;;;;;;;wBASa,OAAO,YAAY;;;;;;;;;;;;;;;8BAeb,OAAO,mBAAmB;;;;;;;;;;CAWtD,WAAW,GAAG;;;qBAGK,OAAO,eAAe;;;CAIzC,YAAY,GAAG;;;qBAGI,OAAO,eAAe;;;CAIzC,WAAW,GAAG;;;qBAGK,OAAO,aAAa;;;CAIvC,aAAa,GAAG;;;;CAKhB,YAAY,GAAG;;;CAIf,OAAO,GAAG;;;CAIV,SAAS,GAAG;;;CAIZ,eAAe,GAAG;;;;CAKlB,gBAAgB,GAAG;;;;CAKnB,eAAe,GAAG;;;;CAKlB,SAAS,GAAG;;;;;CAMZ,aAAa,GAAG;;;;;;;;;;;;;CAchB,gBAAgB,GAAG;;;CAInB,iBAAiB,GAAG;;;;;CAMpB,gBAAgB,GAAG;aACR,OAAO,UAAU;kBACZ,OAAO,iBAAiB;;;sBAGpB,OAAO,mBAAmB;eACjC,OAAO,iBAAiB;;;CAIrC,gBAAgB,GAAG;oBACD,OAAO,aAAa;aAC3B,OAAO,cAAc;kBAChB,OAAO,aAAa;;;sBAGhB,OAAO,kBAAkB;oBAC3B,OAAO,kBAAkB;;;;sBAIvB,OAAO,mBAAmB;oBAC5B,OAAO,mBAAmB;;;CAI5C,eAAe,GAAG;;aAEP,OAAO,UAAU;kBACZ,OAAO,iBAAiB;;;sBAGpB,OAAO,mBAAmB;eACjC,OAAO,iBAAiB;;;CAIrC,aAAa,GAAG;;aAEL,OAAO,UAAU;;;;oBAIV,OAAO,mBAAmB;;;CAI5C,aAAa,GAAG;;;aAGL,OAAO,aAAa;;;;eAIlB,OAAO,kBAAkB;;;;CAKtC,gBAAgB,GAAG;oBACD,OAAO,WAAW;aACzB,OAAO,WAAW;kBACb,OAAO,iBAAiB;;;sBAGpB,OAAO,gBAAgB;eAC9B,OAAO,gBAAgB;oBAClB,OAAO,iBAAiB;;;CAI1C,aAAa,GAAG;oBACE,OAAO,WAAW;aACzB,OAAO,cAAc;kBAChB,OAAO,WAAW;;;sBAGd,OAAO,gBAAgB;oBACzB,OAAO,gBAAgB;;;;sBAIrB,OAAO,iBAAiB;oBAC1B,OAAO,iBAAiB;;;CAI1C,cAAc,GAAG;aACN,OAAO,WAAW;;;eAGhB,OAAO,gBAAgB;;;CAIpC,cAAc,GAAG;oBACC,OAAO,YAAY;aAC1B,OAAO,UAAU;;;;sBAIR,OAAO,mBAAmB;eACjC,OAAO,iBAAiB;;;;CAKrC,cAAc,GAAG;oBACC,OAAO,aAAa;aAC3B,OAAO,aAAa;;;;sBAIX,OAAO,kBAAkB;eAChC,OAAO,kBAAkB;;;;CAKtC,aAAa,GAAG;oBACE,OAAO,WAAW;aACzB,OAAO,WAAW;;;;sBAIT,OAAO,gBAAgB;eAC9B,OAAO,gBAAgB;;;;CAKpC,SAAS,GAAG;;;;;;;;;;;;;;;;;CAiBb,EAAE"}
1
+ {"version":3,"file":"style.mjs","names":[],"sources":["../../../src/base-ui/Button/style.ts"],"sourcesContent":["import { createStaticStyles } from 'antd-style';\n\nexport const styles = createStaticStyles(({ css, cssVar }) => ({\n base: css`\n cursor: pointer;\n\n display: inline-flex;\n gap: 6px;\n align-items: center;\n justify-content: center;\n\n box-sizing: border-box;\n border: 1px solid ${cssVar.colorBorder};\n\n font-weight: 500;\n line-height: 1;\n text-decoration: none;\n white-space: nowrap;\n\n transition:\n color 160ms cubic-bezier(0.32, 0.72, 0, 1),\n background 160ms cubic-bezier(0.32, 0.72, 0, 1),\n border-color 160ms cubic-bezier(0.32, 0.72, 0, 1),\n box-shadow 160ms cubic-bezier(0.32, 0.72, 0, 1);\n\n &:focus-visible {\n outline: none;\n box-shadow: 0 0 0 2px ${cssVar.colorPrimaryBorder};\n }\n\n &:disabled,\n &[aria-disabled='true'] {\n pointer-events: none;\n cursor: not-allowed;\n opacity: 0.5;\n }\n `,\n\n sizeSmall: css`\n height: 24px;\n padding-inline: 8px;\n border-radius: ${cssVar.borderRadiusSM};\n font-size: 12px;\n `,\n\n sizeMiddle: css`\n height: 32px;\n padding-inline: 14px;\n border-radius: ${cssVar.borderRadiusSM};\n font-size: 13px;\n `,\n\n sizeLarge: css`\n height: 40px;\n padding-inline: 16px;\n border-radius: ${cssVar.borderRadius};\n font-size: 14px;\n `,\n\n shapeCircle: css`\n padding-inline: 0;\n border-radius: 50%;\n `,\n\n shapeRound: css`\n border-radius: 999px;\n `,\n\n block: css`\n width: 100%;\n `,\n\n iconEnd: css`\n flex-direction: row-reverse;\n `,\n\n iconOnlySmall: css`\n width: 24px;\n padding-inline: 0;\n `,\n\n iconOnlyMiddle: css`\n width: 32px;\n padding-inline: 0;\n `,\n\n iconOnlyLarge: css`\n width: 40px;\n padding-inline: 0;\n `,\n\n iconBox: css`\n display: inline-flex;\n align-items: center;\n justify-content: center;\n `,\n\n spinnerSlot: css`\n overflow: hidden;\n\n width: 0;\n margin-inline-end: -6px;\n\n opacity: 0;\n\n transition:\n width 380ms cubic-bezier(0.22, 1, 0.36, 1),\n margin 380ms cubic-bezier(0.22, 1, 0.36, 1),\n opacity 260ms cubic-bezier(0.22, 1, 0.36, 1);\n `,\n\n spinnerSlotEnd: css`\n margin-inline: -6px 0;\n `,\n\n spinnerSlotShow: css`\n width: 12px;\n margin-inline: 0;\n opacity: 1;\n `,\n\n variantDefault: css`\n background: ${cssVar.colorBgContainer};\n\n /* &:hover/&:active included so the anchor form outranks antd's global a:hover/a:active link color */\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorText};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryBorder};\n color: ${cssVar.colorPrimaryText};\n }\n `,\n\n variantPrimary: css`\n border-color: ${cssVar.colorPrimary};\n background: ${cssVar.colorPrimary};\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorBgLayout};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryHover};\n background: ${cssVar.colorPrimaryHover};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryActive};\n background: ${cssVar.colorPrimaryActive};\n }\n `,\n\n variantDashed: css`\n border-style: dashed;\n background: ${cssVar.colorBgContainer};\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorText};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryBorder};\n color: ${cssVar.colorPrimaryText};\n }\n `,\n\n variantFill: css`\n border-color: transparent;\n background: ${cssVar.colorFillTertiary};\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorText};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n background: ${cssVar.colorFillSecondary};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n background: ${cssVar.colorFill};\n }\n `,\n\n variantText: css`\n border-color: transparent;\n background: transparent;\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorText};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n background: ${cssVar.colorFillSecondary};\n }\n `,\n\n variantLink: css`\n padding-inline: 0;\n border-color: transparent;\n background: transparent;\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorPrimary};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorPrimaryHover};\n background: transparent;\n }\n `,\n\n dangerOutlined: css`\n border-color: ${cssVar.colorError};\n background: ${cssVar.colorBgContainer};\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorError};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n color: ${cssVar.colorErrorHover};\n background: ${cssVar.colorBgContainer};\n }\n `,\n\n dangerSolid: css`\n border-color: ${cssVar.colorError};\n background: ${cssVar.colorError};\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorBgLayout};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n background: ${cssVar.colorErrorHover};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorActive};\n background: ${cssVar.colorErrorActive};\n }\n `,\n\n dangerFill: css`\n border-color: transparent;\n color: ${cssVar.colorError};\n background: ${cssVar.colorErrorBg};\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorErrorHover};\n background: ${cssVar.colorErrorBgHover};\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorErrorActive};\n background: ${cssVar.colorErrorBgHover};\n }\n `,\n\n dangerInline: css`\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorError};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n color: ${cssVar.colorErrorHover};\n }\n `,\n\n ghostDefault: css`\n border-color: rgb(255 255 255 / 65%);\n background: transparent;\n\n &,\n &:hover,\n &:active {\n color: #fff;\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: #fff;\n background: color-mix(in srgb, currentcolor 8%, transparent);\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n background: color-mix(in srgb, currentcolor 14%, transparent);\n }\n `,\n\n ghostDashed: css`\n border-style: dashed;\n `,\n\n ghostPrimary: css`\n border-color: ${cssVar.colorPrimary};\n background: transparent;\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorPrimary};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorPrimaryHover};\n color: ${cssVar.colorPrimaryHover};\n background: color-mix(in srgb, currentcolor 8%, transparent);\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n background: color-mix(in srgb, currentcolor 14%, transparent);\n }\n `,\n\n ghostDanger: css`\n border-color: ${cssVar.colorError};\n background: transparent;\n\n &,\n &:hover,\n &:active {\n color: ${cssVar.colorError};\n }\n\n &:hover:not(:disabled, [aria-disabled='true']) {\n border-color: ${cssVar.colorErrorHover};\n color: ${cssVar.colorErrorHover};\n background: color-mix(in srgb, currentcolor 8%, transparent);\n }\n\n &:active:not(:disabled, [aria-disabled='true']) {\n background: color-mix(in srgb, currentcolor 14%, transparent);\n }\n `,\n\n spinner: css`\n @keyframes base-button-spin {\n to {\n transform: rotate(360deg);\n }\n }\n\n display: inline-block;\n\n width: 12px;\n height: 12px;\n border: 1.5px solid currentcolor;\n border-block-start-color: transparent;\n border-radius: 50%;\n\n animation: base-button-spin 0.6s linear infinite;\n `,\n}));\n"],"mappings":";;AAEA,MAAa,SAAS,oBAAoB,EAAE,KAAK,cAAc;CAC7D,MAAM,GAAG;;;;;;;;;wBASa,OAAO,YAAY;;;;;;;;;;;;;;;8BAeb,OAAO,mBAAmB;;;;;;;;;;CAWtD,WAAW,GAAG;;;qBAGK,OAAO,eAAe;;;CAIzC,YAAY,GAAG;;;qBAGI,OAAO,eAAe;;;CAIzC,WAAW,GAAG;;;qBAGK,OAAO,aAAa;;;CAIvC,aAAa,GAAG;;;;CAKhB,YAAY,GAAG;;;CAIf,OAAO,GAAG;;;CAIV,SAAS,GAAG;;;CAIZ,eAAe,GAAG;;;;CAKlB,gBAAgB,GAAG;;;;CAKnB,eAAe,GAAG;;;;CAKlB,SAAS,GAAG;;;;;CAMZ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AAkB;;;CAI3C,cAAc,GAAG;;;;eAIJ,OAAO,WAAW;;;;eAIlB,OAAO,gBAAgB;;;CAIpC,cAAc,GAAG;;;;;;;;;;;;;;;;;;;CAoBjB,aAAa,GAAG;;;CAIhB,cAAc,GAAG;oBACC,OAAO,aAAa;;;;;;eAMzB,OAAO,aAAa;;;;sBAIb,OAAO,kBAAkB;eAChC,OAAO,kBAAkB;;;;;;;;CAStC,aAAa,GAAG;oBACE,OAAO,WAAW;;;;;;eAMvB,OAAO,WAAW;;;;sBAIX,OAAO,gBAAgB;eAC9B,OAAO,gBAAgB;;;;;;;;CASpC,SAAS,GAAG;;;;;;;;;;;;;;;;;CAiBb,EAAE"}
@@ -1,7 +1,7 @@
1
1
  import { AnchorHTMLAttributes, ButtonHTMLAttributes, CSSProperties, ReactNode, Ref } from "react";
2
2
 
3
3
  //#region src/base-ui/Button/type.d.ts
4
- type ButtonType = 'default' | 'primary' | 'dashed' | 'link' | 'text';
4
+ type ButtonType = 'default' | 'primary' | 'dashed' | 'fill' | 'link' | 'text';
5
5
  type ButtonShape = 'default' | 'circle' | 'round';
6
6
  type ButtonSize = 'small' | 'middle' | 'large';
7
7
  type ButtonIconPosition = 'start' | 'end';
@@ -0,0 +1,8 @@
1
+ import { FloatingPanelProps } from "./type.mjs";
2
+ import * as _$react from "react";
3
+
4
+ //#region src/base-ui/FloatingPanel/FloatingPanel.d.ts
5
+ declare const FloatingPanel: _$react.NamedExoticComponent<FloatingPanelProps>;
6
+ //#endregion
7
+ export { FloatingPanel };
8
+ //# sourceMappingURL=FloatingPanel.d.mts.map
@@ -0,0 +1,325 @@
1
+ "use client";
2
+ import { ModalBackdrop, ModalClose, ModalContent, ModalFooter, ModalHeader, ModalPopup, ModalPortal, ModalRoot, ModalTitle } from "../Modal/atoms.mjs";
3
+ import { styles } from "./style.mjs";
4
+ import { memo, useCallback, useEffect, useMemo, useRef, useState } from "react";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { cx } from "antd-style";
7
+ import { X } from "lucide-react";
8
+ //#region src/base-ui/FloatingPanel/FloatingPanel.tsx
9
+ const DEFAULT_MIN_HEIGHT = 180;
10
+ const DEFAULT_MIN_WIDTH = 320;
11
+ const defaultMotionProps = {
12
+ animate: {
13
+ opacity: 1,
14
+ scale: 1,
15
+ x: 0,
16
+ y: 0
17
+ },
18
+ exit: {
19
+ opacity: 0,
20
+ scale: .98,
21
+ transition: {
22
+ duration: .14,
23
+ ease: [
24
+ .4,
25
+ 0,
26
+ 1,
27
+ 1
28
+ ]
29
+ },
30
+ y: 12
31
+ },
32
+ initial: {
33
+ opacity: 0,
34
+ scale: .98,
35
+ y: 12
36
+ },
37
+ transition: {
38
+ duration: .2,
39
+ ease: [
40
+ .32,
41
+ .72,
42
+ 0,
43
+ 1
44
+ ]
45
+ }
46
+ };
47
+ const topMotionProps = {
48
+ animate: {
49
+ opacity: 1,
50
+ scale: 1,
51
+ x: 0,
52
+ y: 0
53
+ },
54
+ exit: {
55
+ opacity: 0,
56
+ scale: .98,
57
+ transition: {
58
+ duration: .14,
59
+ ease: [
60
+ .4,
61
+ 0,
62
+ 1,
63
+ 1
64
+ ]
65
+ },
66
+ y: -12
67
+ },
68
+ initial: {
69
+ opacity: 0,
70
+ scale: .98,
71
+ y: -12
72
+ },
73
+ transition: {
74
+ duration: .2,
75
+ ease: [
76
+ .32,
77
+ .72,
78
+ 0,
79
+ 1
80
+ ]
81
+ }
82
+ };
83
+ const resolveOffset = (offset) => {
84
+ if (typeof offset === "object") return {
85
+ x: offset.x ?? 8,
86
+ y: offset.y ?? 8
87
+ };
88
+ return {
89
+ x: offset,
90
+ y: offset
91
+ };
92
+ };
93
+ const getPlacementStyle = (placement, offset) => {
94
+ const { x, y } = resolveOffset(offset);
95
+ const isTop = placement.startsWith("top");
96
+ const isLeft = placement.endsWith("Left");
97
+ return {
98
+ alignItems: isTop ? "flex-start" : "flex-end",
99
+ justifyContent: isLeft ? "flex-start" : "flex-end",
100
+ paddingBlockEnd: isTop ? void 0 : y,
101
+ paddingBlockStart: isTop ? y : void 0,
102
+ paddingInlineEnd: isLeft ? void 0 : x,
103
+ paddingInlineStart: isLeft ? x : void 0
104
+ };
105
+ };
106
+ const clamp = (value, min, max) => Math.min(Math.max(value, min), max);
107
+ const getViewportMaxSize = () => ({
108
+ height: Math.max(DEFAULT_MIN_HEIGHT, window.innerHeight - 16),
109
+ width: Math.max(DEFAULT_MIN_WIDTH, window.innerWidth - 16)
110
+ });
111
+ const getResizeHandles = (placement) => {
112
+ switch (placement) {
113
+ case "bottomLeft": return [
114
+ "top",
115
+ "right",
116
+ "topRight"
117
+ ];
118
+ case "topLeft": return [
119
+ "bottom",
120
+ "right",
121
+ "bottomRight"
122
+ ];
123
+ case "topRight": return [
124
+ "bottom",
125
+ "left",
126
+ "bottomLeft"
127
+ ];
128
+ default: return [
129
+ "top",
130
+ "left",
131
+ "topLeft"
132
+ ];
133
+ }
134
+ };
135
+ const getResizeHandleClassName = (s, handle) => {
136
+ return {
137
+ bottom: s.resizeHandleBottom,
138
+ bottomLeft: s.resizeHandleBottomLeft,
139
+ bottomRight: s.resizeHandleBottomRight,
140
+ left: s.resizeHandleLeft,
141
+ right: s.resizeHandleRight,
142
+ top: s.resizeHandleTop,
143
+ topLeft: s.resizeHandleTopLeft,
144
+ topRight: s.resizeHandleTopRight
145
+ }[handle];
146
+ };
147
+ const resolveResizeSize = ({ handle, maxHeight, maxWidth, minHeight, minWidth, startHeight, startWidth, startX, startY, x, y }) => {
148
+ const deltaX = x - startX;
149
+ const deltaY = y - startY;
150
+ const growsLeft = handle.includes("Left") || handle === "left";
151
+ const growsRight = handle.includes("Right") || handle === "right";
152
+ const growsTop = handle.includes("top") || handle === "top";
153
+ const growsBottom = handle.includes("bottom") || handle === "bottom";
154
+ const nextWidth = growsLeft ? startWidth - deltaX : growsRight ? startWidth + deltaX : startWidth;
155
+ return {
156
+ height: clamp(growsTop ? startHeight - deltaY : growsBottom ? startHeight + deltaY : startHeight, minHeight, maxHeight),
157
+ width: clamp(nextWidth, minWidth, maxWidth)
158
+ };
159
+ };
160
+ const FloatingPanel = memo(({ afterClose, ariaLabel, children, className, classNames, closable = true, closeIcon, closeLabel = "Close", defaultOpen, actions, footer, getContainer, height, keyboard = true, mask = false, maskClosable = true, maxHeight, maxWidth, minHeight = DEFAULT_MIN_HEIGHT, minWidth = DEFAULT_MIN_WIDTH, modal = false, motionProps, offset = 8, onClose, onOpenChange, onResize, onResizeEnd, open, placement = "bottomRight", resizable = true, styles: semanticStyles, title, width = 640, zIndex }) => {
161
+ const s = styles;
162
+ const isTop = placement.startsWith("top");
163
+ const container = getContainer === false ? void 0 : getContainer;
164
+ const [resizeSize, setResizeSize] = useState();
165
+ const latestResizeSizeRef = useRef(void 0);
166
+ const resizeCleanupRef = useRef(void 0);
167
+ const activeResizeSize = resizeSize?.sourceWidth === width && resizeSize.sourceHeight === height ? resizeSize : void 0;
168
+ useEffect(() => () => {
169
+ resizeCleanupRef.current?.();
170
+ }, []);
171
+ const popupStyle = useMemo(() => ({
172
+ ...getPlacementStyle(placement, offset),
173
+ ...semanticStyles?.wrapper
174
+ }), [
175
+ offset,
176
+ placement,
177
+ semanticStyles?.wrapper
178
+ ]);
179
+ const handleOpenChange = useCallback((nextOpen, eventDetails) => {
180
+ if (!nextOpen) {
181
+ if (keyboard === false && eventDetails.reason === "escape-key") return;
182
+ if (maskClosable === false && eventDetails.reason === "outside-press") return;
183
+ onClose?.();
184
+ }
185
+ onOpenChange?.(nextOpen, eventDetails);
186
+ }, [
187
+ keyboard,
188
+ maskClosable,
189
+ onClose,
190
+ onOpenChange
191
+ ]);
192
+ const showHeader = title !== void 0 || actions !== void 0 || closable;
193
+ const resolvedMotionProps = motionProps ?? (isTop ? topMotionProps : defaultMotionProps);
194
+ const resizeHandles = useMemo(() => getResizeHandles(placement), [placement]);
195
+ const handleResizeStart = useCallback((handle) => (event) => {
196
+ event.preventDefault();
197
+ event.stopPropagation();
198
+ const panel = event.currentTarget.parentElement;
199
+ if (!panel) return;
200
+ const rect = panel.getBoundingClientRect();
201
+ const viewportMaxSize = getViewportMaxSize();
202
+ const resolvedMaxWidth = Math.max(minWidth, maxWidth ?? viewportMaxSize.width);
203
+ const resolvedMaxHeight = Math.max(minHeight, maxHeight ?? viewportMaxSize.height);
204
+ const startX = event.clientX;
205
+ const startY = event.clientY;
206
+ const handleResizeMove = (moveEvent) => {
207
+ const nextSize = resolveResizeSize({
208
+ handle,
209
+ maxHeight: resolvedMaxHeight,
210
+ maxWidth: resolvedMaxWidth,
211
+ minHeight,
212
+ minWidth,
213
+ startHeight: rect.height,
214
+ startWidth: rect.width,
215
+ startX,
216
+ startY,
217
+ x: moveEvent.clientX,
218
+ y: moveEvent.clientY
219
+ });
220
+ const nextState = {
221
+ ...nextSize,
222
+ sourceHeight: height,
223
+ sourceWidth: width
224
+ };
225
+ latestResizeSizeRef.current = nextSize;
226
+ setResizeSize(nextState);
227
+ onResize?.(nextSize);
228
+ };
229
+ const handleResizeEnd = () => {
230
+ resizeCleanupRef.current?.();
231
+ resizeCleanupRef.current = void 0;
232
+ if (latestResizeSizeRef.current) onResizeEnd?.(latestResizeSizeRef.current);
233
+ };
234
+ resizeCleanupRef.current?.();
235
+ window.addEventListener("pointermove", handleResizeMove);
236
+ window.addEventListener("pointerup", handleResizeEnd);
237
+ resizeCleanupRef.current = () => {
238
+ window.removeEventListener("pointermove", handleResizeMove);
239
+ window.removeEventListener("pointerup", handleResizeEnd);
240
+ };
241
+ }, [
242
+ height,
243
+ maxHeight,
244
+ maxWidth,
245
+ minHeight,
246
+ minWidth,
247
+ onResize,
248
+ onResizeEnd,
249
+ width
250
+ ]);
251
+ return /* @__PURE__ */ jsx(ModalRoot, {
252
+ defaultOpen,
253
+ modal,
254
+ open,
255
+ zIndex,
256
+ onExitComplete: afterClose,
257
+ onOpenChange: handleOpenChange,
258
+ children: /* @__PURE__ */ jsxs(ModalPortal, {
259
+ container,
260
+ children: [mask && /* @__PURE__ */ jsx(ModalBackdrop, {
261
+ className: classNames?.backdrop,
262
+ style: semanticStyles?.backdrop
263
+ }), /* @__PURE__ */ jsxs(ModalPopup, {
264
+ "aria-label": ariaLabel,
265
+ className: cx(s.wrapper, classNames?.wrapper),
266
+ motionProps: resolvedMotionProps,
267
+ panelClassName: cx(s.panel, isTop && s.panelTop, className, classNames?.panel),
268
+ popupStyle,
269
+ width: activeResizeSize?.width ?? width,
270
+ style: {
271
+ height: activeResizeSize?.height ?? height,
272
+ minHeight,
273
+ minWidth,
274
+ width: activeResizeSize?.width,
275
+ ...semanticStyles?.panel
276
+ },
277
+ children: [
278
+ resizable && resizeHandles.map((handle) => /* @__PURE__ */ jsx("div", {
279
+ "aria-hidden": true,
280
+ "data-floating-panel-resize-handle": handle,
281
+ style: semanticStyles?.resizeHandle,
282
+ className: cx(s.resizeHandle, getResizeHandleClassName(s, handle), classNames?.resizeHandle),
283
+ onPointerDown: handleResizeStart(handle)
284
+ }, handle)),
285
+ showHeader && /* @__PURE__ */ jsxs(ModalHeader, {
286
+ className: cx(s.header, classNames?.header),
287
+ style: semanticStyles?.header,
288
+ children: [title !== void 0 ? /* @__PURE__ */ jsx(ModalTitle, {
289
+ className: cx(s.title, classNames?.title),
290
+ style: semanticStyles?.title,
291
+ children: title
292
+ }) : /* @__PURE__ */ jsx("span", {}), /* @__PURE__ */ jsxs("div", {
293
+ className: s.headerActions,
294
+ children: [actions && /* @__PURE__ */ jsx("div", {
295
+ className: cx(s.actions, classNames?.actions),
296
+ style: semanticStyles?.actions,
297
+ children: actions
298
+ }), closable && /* @__PURE__ */ jsx(ModalClose, {
299
+ "aria-label": closeLabel,
300
+ className: cx(s.close, classNames?.close),
301
+ style: semanticStyles?.close,
302
+ children: closeIcon ?? /* @__PURE__ */ jsx(X, { size: 16 })
303
+ })]
304
+ })]
305
+ }),
306
+ /* @__PURE__ */ jsx(ModalContent, {
307
+ className: cx(s.body, classNames?.body),
308
+ style: semanticStyles?.body,
309
+ children
310
+ }),
311
+ footer && /* @__PURE__ */ jsx(ModalFooter, {
312
+ className: cx(s.footer, classNames?.footer),
313
+ style: semanticStyles?.footer,
314
+ children: footer
315
+ })
316
+ ]
317
+ })]
318
+ })
319
+ });
320
+ });
321
+ FloatingPanel.displayName = "FloatingPanel";
322
+ //#endregion
323
+ export { FloatingPanel };
324
+
325
+ //# sourceMappingURL=FloatingPanel.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingPanel.mjs","names":[],"sources":["../../../src/base-ui/FloatingPanel/FloatingPanel.tsx"],"sourcesContent":["'use client';\n\nimport { cx } from 'antd-style';\nimport { X } from 'lucide-react';\nimport type { MotionProps } from 'motion/react';\nimport type { CSSProperties, PointerEvent as ReactPointerEvent } from 'react';\nimport { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport type { ModalRootProps } from '../Modal';\nimport {\n ModalBackdrop,\n ModalClose,\n ModalContent,\n ModalFooter,\n ModalHeader,\n ModalPopup,\n ModalPortal,\n ModalRoot,\n ModalTitle,\n} from '../Modal';\nimport { styles } from './style';\nimport type {\n FloatingPanelOffset,\n FloatingPanelPlacement,\n FloatingPanelProps,\n FloatingPanelResizeHandle,\n FloatingPanelSize,\n} from './type';\n\nconst DEFAULT_MIN_HEIGHT = 180;\nconst DEFAULT_MIN_WIDTH = 320;\n\ninterface InternalFloatingPanelSize extends FloatingPanelSize {\n sourceHeight?: number | string;\n sourceWidth?: number | string;\n}\n\nconst defaultMotionProps: MotionProps = {\n animate: { opacity: 1, scale: 1, x: 0, y: 0 },\n exit: {\n opacity: 0,\n scale: 0.98,\n transition: { duration: 0.14, ease: [0.4, 0, 1, 1] },\n y: 12,\n },\n initial: { opacity: 0, scale: 0.98, y: 12 },\n transition: { duration: 0.2, ease: [0.32, 0.72, 0, 1] },\n};\n\nconst topMotionProps: MotionProps = {\n animate: { opacity: 1, scale: 1, x: 0, y: 0 },\n exit: {\n opacity: 0,\n scale: 0.98,\n transition: { duration: 0.14, ease: [0.4, 0, 1, 1] },\n y: -12,\n },\n initial: { opacity: 0, scale: 0.98, y: -12 },\n transition: { duration: 0.2, ease: [0.32, 0.72, 0, 1] },\n};\n\nconst resolveOffset = (offset: FloatingPanelOffset) => {\n if (typeof offset === 'object') {\n return {\n x: offset.x ?? 8,\n y: offset.y ?? 8,\n };\n }\n\n return { x: offset, y: offset };\n};\n\nconst getPlacementStyle = (\n placement: FloatingPanelPlacement,\n offset: FloatingPanelOffset,\n): CSSProperties => {\n const { x, y } = resolveOffset(offset);\n const isTop = placement.startsWith('top');\n const isLeft = placement.endsWith('Left');\n\n return {\n alignItems: isTop ? 'flex-start' : 'flex-end',\n justifyContent: isLeft ? 'flex-start' : 'flex-end',\n paddingBlockEnd: isTop ? undefined : y,\n paddingBlockStart: isTop ? y : undefined,\n paddingInlineEnd: isLeft ? undefined : x,\n paddingInlineStart: isLeft ? x : undefined,\n };\n};\n\nconst clamp = (value: number, min: number, max: number) => Math.min(Math.max(value, min), max);\n\nconst getViewportMaxSize = () => ({\n height: Math.max(DEFAULT_MIN_HEIGHT, window.innerHeight - 16),\n width: Math.max(DEFAULT_MIN_WIDTH, window.innerWidth - 16),\n});\n\nconst getResizeHandles = (placement: FloatingPanelPlacement): FloatingPanelResizeHandle[] => {\n switch (placement) {\n case 'bottomLeft': {\n return ['top', 'right', 'topRight'];\n }\n case 'topLeft': {\n return ['bottom', 'right', 'bottomRight'];\n }\n case 'topRight': {\n return ['bottom', 'left', 'bottomLeft'];\n }\n default: {\n return ['top', 'left', 'topLeft'];\n }\n }\n};\n\nconst getResizeHandleClassName = (s: typeof styles, handle: FloatingPanelResizeHandle) => {\n const handleClassMap: Record<FloatingPanelResizeHandle, string> = {\n bottom: s.resizeHandleBottom,\n bottomLeft: s.resizeHandleBottomLeft,\n bottomRight: s.resizeHandleBottomRight,\n left: s.resizeHandleLeft,\n right: s.resizeHandleRight,\n top: s.resizeHandleTop,\n topLeft: s.resizeHandleTopLeft,\n topRight: s.resizeHandleTopRight,\n };\n\n return handleClassMap[handle];\n};\n\nconst resolveResizeSize = ({\n handle,\n maxHeight,\n maxWidth,\n minHeight,\n minWidth,\n startHeight,\n startWidth,\n startX,\n startY,\n x,\n y,\n}: {\n handle: FloatingPanelResizeHandle;\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n startHeight: number;\n startWidth: number;\n startX: number;\n startY: number;\n x: number;\n y: number;\n}): FloatingPanelSize => {\n const deltaX = x - startX;\n const deltaY = y - startY;\n const growsLeft = handle.includes('Left') || handle === 'left';\n const growsRight = handle.includes('Right') || handle === 'right';\n const growsTop = handle.includes('top') || handle === 'top';\n const growsBottom = handle.includes('bottom') || handle === 'bottom';\n\n const nextWidth = growsLeft ? startWidth - deltaX : growsRight ? startWidth + deltaX : startWidth;\n const nextHeight = growsTop\n ? startHeight - deltaY\n : growsBottom\n ? startHeight + deltaY\n : startHeight;\n\n return {\n height: clamp(nextHeight, minHeight, maxHeight),\n width: clamp(nextWidth, minWidth, maxWidth),\n };\n};\n\nconst FloatingPanel = memo<FloatingPanelProps>(\n ({\n afterClose,\n ariaLabel,\n children,\n className,\n classNames,\n closable = true,\n closeIcon,\n closeLabel = 'Close',\n defaultOpen,\n actions,\n footer,\n getContainer,\n height,\n keyboard = true,\n mask = false,\n maskClosable = true,\n maxHeight,\n maxWidth,\n minHeight = DEFAULT_MIN_HEIGHT,\n minWidth = DEFAULT_MIN_WIDTH,\n modal = false,\n motionProps,\n offset = 8,\n onClose,\n onOpenChange,\n onResize,\n onResizeEnd,\n open,\n placement = 'bottomRight',\n resizable = true,\n styles: semanticStyles,\n title,\n width = 640,\n zIndex,\n }) => {\n const s = styles;\n const isTop = placement.startsWith('top');\n const container = getContainer === false ? undefined : getContainer;\n const [resizeSize, setResizeSize] = useState<InternalFloatingPanelSize>();\n const latestResizeSizeRef = useRef<FloatingPanelSize | undefined>(undefined);\n const resizeCleanupRef = useRef<(() => void) | undefined>(undefined);\n const activeResizeSize =\n resizeSize?.sourceWidth === width && resizeSize.sourceHeight === height\n ? resizeSize\n : undefined;\n\n useEffect(\n () => () => {\n resizeCleanupRef.current?.();\n },\n [],\n );\n\n const popupStyle = useMemo(\n () => ({\n ...getPlacementStyle(placement, offset),\n ...semanticStyles?.wrapper,\n }),\n [offset, placement, semanticStyles?.wrapper],\n );\n\n const handleOpenChange = useCallback<NonNullable<ModalRootProps['onOpenChange']>>(\n (nextOpen, eventDetails) => {\n if (!nextOpen) {\n if (keyboard === false && eventDetails.reason === 'escape-key') return;\n if (maskClosable === false && eventDetails.reason === 'outside-press') return;\n onClose?.();\n }\n\n onOpenChange?.(nextOpen, eventDetails);\n },\n [keyboard, maskClosable, onClose, onOpenChange],\n );\n\n const showHeader = title !== undefined || actions !== undefined || closable;\n const resolvedMotionProps = motionProps ?? (isTop ? topMotionProps : defaultMotionProps);\n const resizeHandles = useMemo(() => getResizeHandles(placement), [placement]);\n\n const handleResizeStart = useCallback(\n (handle: FloatingPanelResizeHandle) => (event: ReactPointerEvent<HTMLDivElement>) => {\n event.preventDefault();\n event.stopPropagation();\n\n const panel = event.currentTarget.parentElement;\n if (!panel) return;\n\n const rect = panel.getBoundingClientRect();\n const viewportMaxSize = getViewportMaxSize();\n const resolvedMaxWidth = Math.max(minWidth, maxWidth ?? viewportMaxSize.width);\n const resolvedMaxHeight = Math.max(minHeight, maxHeight ?? viewportMaxSize.height);\n const startX = event.clientX;\n const startY = event.clientY;\n\n const handleResizeMove = (moveEvent: PointerEvent) => {\n const nextSize = resolveResizeSize({\n handle,\n maxHeight: resolvedMaxHeight,\n maxWidth: resolvedMaxWidth,\n minHeight,\n minWidth,\n startHeight: rect.height,\n startWidth: rect.width,\n startX,\n startY,\n x: moveEvent.clientX,\n y: moveEvent.clientY,\n });\n\n const nextState = { ...nextSize, sourceHeight: height, sourceWidth: width };\n latestResizeSizeRef.current = nextSize;\n setResizeSize(nextState);\n onResize?.(nextSize);\n };\n\n const handleResizeEnd = () => {\n resizeCleanupRef.current?.();\n resizeCleanupRef.current = undefined;\n\n if (latestResizeSizeRef.current) onResizeEnd?.(latestResizeSizeRef.current);\n };\n\n resizeCleanupRef.current?.();\n window.addEventListener('pointermove', handleResizeMove);\n window.addEventListener('pointerup', handleResizeEnd);\n resizeCleanupRef.current = () => {\n window.removeEventListener('pointermove', handleResizeMove);\n window.removeEventListener('pointerup', handleResizeEnd);\n };\n },\n [height, maxHeight, maxWidth, minHeight, minWidth, onResize, onResizeEnd, width],\n );\n\n return (\n <ModalRoot\n defaultOpen={defaultOpen}\n modal={modal}\n open={open}\n zIndex={zIndex}\n onExitComplete={afterClose}\n onOpenChange={handleOpenChange}\n >\n <ModalPortal container={container}>\n {mask && (\n <ModalBackdrop className={classNames?.backdrop} style={semanticStyles?.backdrop} />\n )}\n <ModalPopup\n aria-label={ariaLabel}\n className={cx(s.wrapper, classNames?.wrapper)}\n motionProps={resolvedMotionProps}\n panelClassName={cx(s.panel, isTop && s.panelTop, className, classNames?.panel)}\n popupStyle={popupStyle}\n width={activeResizeSize?.width ?? width}\n style={{\n height: activeResizeSize?.height ?? height,\n minHeight,\n minWidth,\n width: activeResizeSize?.width,\n ...semanticStyles?.panel,\n }}\n >\n {resizable &&\n resizeHandles.map((handle) => (\n <div\n aria-hidden\n data-floating-panel-resize-handle={handle}\n key={handle}\n style={semanticStyles?.resizeHandle}\n className={cx(\n s.resizeHandle,\n getResizeHandleClassName(s, handle),\n classNames?.resizeHandle,\n )}\n onPointerDown={handleResizeStart(handle)}\n />\n ))}\n {showHeader && (\n <ModalHeader\n className={cx(s.header, classNames?.header)}\n style={semanticStyles?.header}\n >\n {title !== undefined ? (\n <ModalTitle\n className={cx(s.title, classNames?.title)}\n style={semanticStyles?.title}\n >\n {title}\n </ModalTitle>\n ) : (\n <span />\n )}\n <div className={s.headerActions}>\n {actions && (\n <div\n className={cx(s.actions, classNames?.actions)}\n style={semanticStyles?.actions}\n >\n {actions}\n </div>\n )}\n {closable && (\n <ModalClose\n aria-label={closeLabel}\n className={cx(s.close, classNames?.close)}\n style={semanticStyles?.close}\n >\n {closeIcon ?? <X size={16} />}\n </ModalClose>\n )}\n </div>\n </ModalHeader>\n )}\n <ModalContent className={cx(s.body, classNames?.body)} style={semanticStyles?.body}>\n {children}\n </ModalContent>\n {footer && (\n <ModalFooter\n className={cx(s.footer, classNames?.footer)}\n style={semanticStyles?.footer}\n >\n {footer}\n </ModalFooter>\n )}\n </ModalPopup>\n </ModalPortal>\n </ModalRoot>\n );\n },\n);\n\nFloatingPanel.displayName = 'FloatingPanel';\n\nexport { FloatingPanel };\n"],"mappings":";;;;;;;;AA6BA,MAAM,qBAAqB;AAC3B,MAAM,oBAAoB;AAO1B,MAAM,qBAAkC;CACtC,SAAS;EAAE,SAAS;EAAG,OAAO;EAAG,GAAG;EAAG,GAAG;EAAG;CAC7C,MAAM;EACJ,SAAS;EACT,OAAO;EACP,YAAY;GAAE,UAAU;GAAM,MAAM;IAAC;IAAK;IAAG;IAAG;IAAE;GAAE;EACpD,GAAG;EACJ;CACD,SAAS;EAAE,SAAS;EAAG,OAAO;EAAM,GAAG;EAAI;CAC3C,YAAY;EAAE,UAAU;EAAK,MAAM;GAAC;GAAM;GAAM;GAAG;GAAE;EAAE;CACxD;AAED,MAAM,iBAA8B;CAClC,SAAS;EAAE,SAAS;EAAG,OAAO;EAAG,GAAG;EAAG,GAAG;EAAG;CAC7C,MAAM;EACJ,SAAS;EACT,OAAO;EACP,YAAY;GAAE,UAAU;GAAM,MAAM;IAAC;IAAK;IAAG;IAAG;IAAE;GAAE;EACpD,GAAG;EACJ;CACD,SAAS;EAAE,SAAS;EAAG,OAAO;EAAM,GAAG;EAAK;CAC5C,YAAY;EAAE,UAAU;EAAK,MAAM;GAAC;GAAM;GAAM;GAAG;GAAE;EAAE;CACxD;AAED,MAAM,iBAAiB,WAAgC;AACrD,KAAI,OAAO,WAAW,SACpB,QAAO;EACL,GAAG,OAAO,KAAK;EACf,GAAG,OAAO,KAAK;EAChB;AAGH,QAAO;EAAE,GAAG;EAAQ,GAAG;EAA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ClB,CAAA,CAEX;SACM;;KAEhB,oBAAC,cAAD;MAAc,WAAW,GAAG,EAAE,MAAM,YAAY,KAAK;MAAE,OAAO,gBAAgB;MAC3E;MACY,CAAA;KACd,UACC,oBAAC,aAAD;MACE,WAAW,GAAG,EAAE,QAAQ,YAAY,OAAO;MAC3C,OAAO,gBAAgB;gBAEtB;MACW,CAAA;KAEL;MACD;;EACJ,CAAA;EAGjB;AAED,cAAc,cAAc"}
@@ -0,0 +1,2 @@
1
+ import { FloatingPanelOffset, FloatingPanelPlacement, FloatingPanelProps } from "./type.mjs";
2
+ import { FloatingPanel } from "./FloatingPanel.mjs";