@bioturing/components 0.42.0 → 0.44.0

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 (136) hide show
  1. package/dist/components/button/component.d.ts.map +1 -1
  2. package/dist/components/button/component.js +41 -34
  3. package/dist/components/button/component.js.map +1 -1
  4. package/dist/components/button/style.css +1 -1
  5. package/dist/components/combobox/component.d.ts.map +1 -1
  6. package/dist/components/combobox/component.js +136 -126
  7. package/dist/components/combobox/component.js.map +1 -1
  8. package/dist/components/command-palette/component.d.ts +7 -0
  9. package/dist/components/command-palette/component.d.ts.map +1 -1
  10. package/dist/components/command-palette/component.js +35 -33
  11. package/dist/components/command-palette/component.js.map +1 -1
  12. package/dist/components/dialog/Dialog.d.ts +53 -0
  13. package/dist/components/dialog/Dialog.d.ts.map +1 -0
  14. package/dist/components/dialog/Dialog.js +231 -0
  15. package/dist/components/dialog/Dialog.js.map +1 -0
  16. package/dist/components/dialog/constants.d.ts +20 -0
  17. package/dist/components/dialog/constants.d.ts.map +1 -0
  18. package/dist/components/dialog/constants.js +20 -0
  19. package/dist/components/dialog/constants.js.map +1 -0
  20. package/dist/components/dialog/dialog.css +1 -0
  21. package/dist/components/dialog/index.d.ts +4 -0
  22. package/dist/components/dialog/index.d.ts.map +1 -0
  23. package/dist/components/dialog/index.js +8 -0
  24. package/dist/components/dialog/index.js.map +1 -0
  25. package/dist/components/dropdown-menu/component.d.ts +8 -1
  26. package/dist/components/dropdown-menu/component.d.ts.map +1 -1
  27. package/dist/components/dropdown-menu/component.js +165 -141
  28. package/dist/components/dropdown-menu/component.js.map +1 -1
  29. package/dist/components/dropdown-menu/style.css +1 -1
  30. package/dist/components/ds-root/component.d.ts +6 -1
  31. package/dist/components/ds-root/component.d.ts.map +1 -1
  32. package/dist/components/ds-root/component.js +15 -14
  33. package/dist/components/ds-root/component.js.map +1 -1
  34. package/dist/components/form/style.css +1 -1
  35. package/dist/components/hooks/index.d.ts +0 -1
  36. package/dist/components/hooks/index.d.ts.map +1 -1
  37. package/dist/components/icon-button/style.css +1 -1
  38. package/dist/components/index.d.ts +2 -0
  39. package/dist/components/index.d.ts.map +1 -1
  40. package/dist/components/label-with-help/component.d.ts +20 -0
  41. package/dist/components/label-with-help/component.d.ts.map +1 -0
  42. package/dist/components/label-with-help/component.js +39 -0
  43. package/dist/components/label-with-help/component.js.map +1 -0
  44. package/dist/components/label-with-help/index.d.ts +2 -0
  45. package/dist/components/label-with-help/index.d.ts.map +1 -0
  46. package/dist/components/label-with-help/style.css +1 -0
  47. package/dist/components/modal/Modal.d.ts.map +1 -1
  48. package/dist/components/modal/Modal.js +157 -133
  49. package/dist/components/modal/Modal.js.map +1 -1
  50. package/dist/components/popup-panel/component.d.ts +2 -111
  51. package/dist/components/popup-panel/component.d.ts.map +1 -1
  52. package/dist/components/popup-panel/component.js +259 -143
  53. package/dist/components/popup-panel/component.js.map +1 -1
  54. package/dist/components/popup-panel/constants.d.ts +1 -0
  55. package/dist/components/popup-panel/constants.d.ts.map +1 -1
  56. package/dist/components/popup-panel/constants.js +2 -0
  57. package/dist/components/popup-panel/constants.js.map +1 -1
  58. package/dist/components/popup-panel/index.d.ts +1 -0
  59. package/dist/components/popup-panel/index.d.ts.map +1 -1
  60. package/dist/components/popup-panel/types.d.ts +124 -0
  61. package/dist/components/popup-panel/types.d.ts.map +1 -0
  62. package/dist/components/popup-panel/utils.d.ts +1 -1
  63. package/dist/components/popup-panel/utils.d.ts.map +1 -1
  64. package/dist/components/popup-panel/utils.js +5 -5
  65. package/dist/components/popup-panel/utils.js.map +1 -1
  66. package/dist/components/resizable/component.d.ts.map +1 -1
  67. package/dist/components/resizable/component.js +28 -28
  68. package/dist/components/resizable/component.js.map +1 -1
  69. package/dist/components/select/component.d.ts.map +1 -1
  70. package/dist/components/select/component.js +130 -120
  71. package/dist/components/select/component.js.map +1 -1
  72. package/dist/components/select-trigger/style.css +1 -1
  73. package/dist/components/spin/Indicator/Looper.d.ts +6 -0
  74. package/dist/components/spin/Indicator/Looper.d.ts.map +1 -0
  75. package/dist/components/spin/Indicator/Looper.js +15 -0
  76. package/dist/components/spin/Indicator/Looper.js.map +1 -0
  77. package/dist/components/spin/Indicator/Progress.d.ts +6 -0
  78. package/dist/components/spin/Indicator/Progress.d.ts.map +1 -0
  79. package/dist/components/spin/Indicator/Progress.js +59 -0
  80. package/dist/components/spin/Indicator/Progress.js.map +1 -0
  81. package/dist/components/spin/Indicator/index.d.ts +8 -0
  82. package/dist/components/spin/Indicator/index.d.ts.map +1 -0
  83. package/dist/components/spin/Indicator/index.js +20 -0
  84. package/dist/components/spin/Indicator/index.js.map +1 -0
  85. package/dist/components/spin/component.d.ts +28 -4
  86. package/dist/components/spin/component.d.ts.map +1 -1
  87. package/dist/components/spin/component.js +162 -14
  88. package/dist/components/spin/component.js.map +1 -1
  89. package/dist/components/spin/style.css +1 -1
  90. package/dist/components/spin/usePercent.d.ts +2 -0
  91. package/dist/components/spin/usePercent.d.ts.map +1 -0
  92. package/dist/components/spin/usePercent.js +27 -0
  93. package/dist/components/spin/usePercent.js.map +1 -0
  94. package/dist/components/theme-provider/style.css +1 -1
  95. package/dist/components/toast/component.d.ts +2 -2
  96. package/dist/components/toast/component.d.ts.map +1 -1
  97. package/dist/components/toast/component.js +14 -20
  98. package/dist/components/toast/component.js.map +1 -1
  99. package/dist/components/toast/function.d.ts +7 -8
  100. package/dist/components/toast/function.d.ts.map +1 -1
  101. package/dist/components/toast/function.js.map +1 -1
  102. package/dist/components/toast/style.css +1 -1
  103. package/dist/components/toast/types.d.ts +4 -0
  104. package/dist/components/toast/types.d.ts.map +1 -1
  105. package/dist/components/utils/cn.d.ts.map +1 -1
  106. package/dist/components/utils/cn.js +112 -20
  107. package/dist/components/utils/cn.js.map +1 -1
  108. package/dist/components/utils/placement.d.ts +9 -2
  109. package/dist/components/utils/placement.d.ts.map +1 -1
  110. package/dist/components/utils/placement.js +29 -18
  111. package/dist/components/utils/placement.js.map +1 -1
  112. package/dist/components/utils/reactElement.d.ts +2 -0
  113. package/dist/components/utils/reactElement.d.ts.map +1 -1
  114. package/dist/components/utils/reactElement.js +10 -2
  115. package/dist/components/utils/reactElement.js.map +1 -1
  116. package/dist/components/utils/renderProp.d.ts.map +1 -1
  117. package/dist/components/utils/renderProp.js +9 -8
  118. package/dist/components/utils/renderProp.js.map +1 -1
  119. package/dist/components/utils/theme.d.ts.map +1 -1
  120. package/dist/components/utils/theme.js +3 -1
  121. package/dist/components/utils/theme.js.map +1 -1
  122. package/dist/index.js +239 -235
  123. package/dist/index.js.map +1 -1
  124. package/dist/metadata.d.ts +28 -1
  125. package/dist/metadata.d.ts.map +1 -1
  126. package/dist/metadata.js +52 -1
  127. package/dist/metadata.js.map +1 -1
  128. package/dist/stats.html +1 -1
  129. package/dist/tokens/and-theme/tokens.d.ts.map +1 -1
  130. package/dist/tokens/and-theme/tokens.js +61 -56
  131. package/dist/tokens/and-theme/tokens.js.map +1 -1
  132. package/package.json +3 -3
  133. package/dist/components/hooks/useBaseUIPlacement.d.ts +0 -64
  134. package/dist/components/hooks/useBaseUIPlacement.d.ts.map +0 -1
  135. package/dist/components/hooks/useBaseUIPlacement.js +0 -61
  136. package/dist/components/hooks/useBaseUIPlacement.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/tokens/and-theme/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,eAAO,MAAM,eAAe,EAAE,WAyR7B,CAAC;AA0EF,eAAO,MAAM,UAAU,EAAE,WAMxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAMvB,CAAC"}
1
+ {"version":3,"file":"tokens.d.ts","sourceRoot":"","sources":["../../../src/tokens/and-theme/tokens.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,MAAM,CAAC;AAExC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAGvC,eAAO,MAAM,eAAe,EAAE,WA6R7B,CAAC;AA2EF,eAAO,MAAM,UAAU,EAAE,WAMxB,CAAC;AAEF,eAAO,MAAM,SAAS,EAAE,WAMvB,CAAC"}
@@ -3,7 +3,11 @@ const o = {
3
3
  // Text colors
4
4
  colorText: {
5
5
  light: "rgba(0, 0, 0, 0.88)",
6
- dark: "rgba(255, 255, 255, 0.88)"
6
+ dark: "rgba(255, 255, 255, 0.8784313725)"
7
+ },
8
+ colorTextControl: {
9
+ light: "rgba(0, 0, 0, 0.5490196078)",
10
+ dark: "rgba(255, 255, 255, 0.5490196078)"
7
11
  },
8
12
  colorTextSecondary: {
9
13
  light: "rgba(0, 0, 0, 0.65)",
@@ -14,82 +18,82 @@ const o = {
14
18
  dark: "rgba(255, 255, 255, 0.45)"
15
19
  },
16
20
  colorTextQuaternary: {
17
- light: "rgba(0, 0, 0, 0.25)",
18
- dark: "rgba(255, 255, 255, 0.25)"
21
+ light: "rgba(0, 0, 0, 0.2509803922)",
22
+ dark: "rgba(255, 255, 255, 0.2509803922)"
19
23
  },
20
24
  // Primary colors
21
25
  colorPrimary: {
22
26
  light: "#175CD3",
23
- dark: "#2E90FA"
27
+ dark: "#1F88FA"
24
28
  },
25
29
  colorPrimaryBg: {
26
- light: "#E9F2FF",
27
- dark: "#152137"
30
+ light: "#E6F4FF",
31
+ dark: "#16233C"
28
32
  },
29
33
  colorPrimaryBgHover: {
30
- light: "#D1E9FF",
31
- dark: "#112545"
34
+ light: "#BAE0FF",
35
+ dark: "#132944"
32
36
  },
33
37
  colorPrimaryBorder: {
34
- light: "#84CAFF",
35
- dark: "#1C3959"
38
+ light: "#ADCAF0",
39
+ dark: "#254B74"
36
40
  },
37
41
  colorPrimaryBorderHover: {
38
- light: "#53B1FD",
39
- dark: "#204C7C"
42
+ light: "#69B1FF",
43
+ dark: "#19487C"
40
44
  },
41
45
  colorPrimaryHover: {
42
- light: "#1570EF",
43
- dark: "#50A0E8"
46
+ light: "#3D7EE0",
47
+ dark: "#509FE8"
44
48
  },
45
49
  colorPrimaryActive: {
46
- light: "#175CD3",
47
- dark: "#2565AB"
50
+ light: "#0A41AD",
51
+ dark: "#2565AA"
48
52
  },
49
53
  colorPrimaryTextHover: {
50
- light: "#1570EF",
51
- dark: "#50A0E8"
54
+ light: "#3D7EE0",
55
+ dark: "#509FE8"
52
56
  },
53
57
  colorPrimaryTextActive: {
54
- light: "#175CD3",
55
- dark: "#2565AB"
58
+ light: "#0A41AD",
59
+ dark: "#2565AA"
56
60
  },
57
61
  // Info colors
58
62
  colorInfo: {
59
63
  light: "#175CD3",
60
- dark: "#2E90FA"
64
+ dark: "#1F88FA"
61
65
  },
62
66
  colorInfoBg: {
63
- light: "#E9F2FF",
64
- dark: "#152137"
67
+ light: "#E6F4FF",
68
+ dark: "#16233C"
65
69
  },
66
70
  colorInfoBgHover: {
67
- light: "#D1E9FF",
68
- dark: "#112545"
71
+ light: "#BAE0FF",
72
+ dark: "#132944"
69
73
  },
70
74
  colorInfoBorder: {
71
- light: "#84CAFF",
72
- dark: "#1C3959"
75
+ light: "#ADCAF0",
76
+ dark: "#254B74"
73
77
  },
74
78
  colorInfoBorderHover: {
75
- light: "#53B1FD",
76
- dark: "#204C7C"
79
+ light: "#69B1FF",
80
+ dark: "#19487C"
77
81
  },
78
82
  colorInfoHover: {
79
- light: "#1570EF",
80
- dark: "#50A0E8"
83
+ light: "#3D7EE0",
84
+ dark: "#509FE8"
81
85
  },
82
86
  colorInfoActive: {
83
- light: "#175CD3",
84
- dark: "#2565AB"
87
+ light: "#0A41AD",
88
+ dark: "#2565AA"
85
89
  },
86
90
  colorInfoTextHover: {
87
- light: "#1570EF",
88
- dark: "#50A0E8"
91
+ light: "#3D7EE0",
92
+ dark: "#509FE8"
89
93
  },
90
94
  colorInfoTextActive: {
91
- light: "#175CD3",
92
- dark: "#2565AB"
95
+ light: "#0A41AD",
96
+ dark: "#2565AA"
93
97
  },
94
98
  // Success colors
95
99
  colorSuccess: {
@@ -167,40 +171,40 @@ const o = {
167
171
  },
168
172
  // Error colors
169
173
  colorError: {
170
- light: "#D92D20",
171
- dark: "#CF3D33"
174
+ light: "#D43225",
175
+ dark: "#DE4035"
172
176
  },
173
177
  colorErrorBg: {
174
- light: "#FEF3F2",
178
+ light: "#FFF3F0",
175
179
  dark: "#291414"
176
180
  },
177
181
  colorErrorBgHover: {
178
- light: "#FEE4E2",
182
+ light: "#FFD4C9",
179
183
  dark: "#411A18"
180
184
  },
181
185
  colorErrorBorder: {
182
- light: "#FDA29B",
183
- dark: "#562222"
186
+ light: "#FFB6A8",
187
+ dark: "#842924"
184
188
  },
185
189
  colorErrorBorderHover: {
186
- light: "#F97066",
187
- dark: "#772A24"
190
+ light: "#F28372",
191
+ dark: "#AC362F"
188
192
  },
189
193
  colorErrorHover: {
190
- light: "#F04438",
194
+ light: "#E0594A",
191
195
  dark: "#E5695A"
192
196
  },
193
197
  colorErrorActive: {
194
- light: "#D92D20",
195
- dark: "#A3332B"
198
+ light: "#B31712",
199
+ dark: "#973129"
196
200
  },
197
201
  colorErrorTextHover: {
198
- light: "#F04438",
199
- dark: "#E5695A"
202
+ light: "#E65747",
203
+ dark: "#D66357"
200
204
  },
201
205
  colorErrorTextActive: {
202
- light: "#D92D20",
203
- dark: "#A3332B"
206
+ light: "#B31712",
207
+ dark: "#973129"
204
208
  },
205
209
  // Fill colors
206
210
  colorFill: {
@@ -309,9 +313,10 @@ const o = {
309
313
  Button: {
310
314
  defaultShadow: void 0,
311
315
  primaryShadow: void 0,
312
- dangerShadow: void 0
316
+ dangerShadow: void 0,
317
+ textTextColor: "var(--ds-color-text-control)",
318
+ textTextHoverColor: "var(--ds-color-text-control)"
313
319
  },
314
- Select: {},
315
320
  Segmented: {
316
321
  controlHeightLG: 36,
317
322
  controlHeightSM: 24
@@ -336,7 +341,7 @@ const o = {
336
341
  labelColor: "var(--ds-color-text)"
337
342
  }
338
343
  }
339
- }, t = {
344
+ }, e = {
340
345
  token: {
341
346
  ...r(o, "light"),
342
347
  ...a
@@ -352,6 +357,6 @@ const o = {
352
357
  export {
353
358
  o as antdColorTokens,
354
359
  i as darkTheme,
355
- t as lightTheme
360
+ e as lightTheme
356
361
  };
357
362
  //# sourceMappingURL=tokens.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"tokens.js","sources":["../../../src/tokens/and-theme/tokens.ts"],"sourcesContent":["import { type ThemeConfig } from \"antd\";\nimport { getTokensByTheme } from \"../utils\";\nimport { ColorTokens } from \"../types\";\n\n// Convert Figma variables to Ant Design tokens with light/dark variants\nexport const antdColorTokens: ColorTokens = {\n // Text colors\n colorText: {\n light: \"rgba(0, 0, 0, 0.88)\",\n dark: \"rgba(255, 255, 255, 0.88)\",\n },\n colorTextSecondary: {\n light: \"rgba(0, 0, 0, 0.65)\",\n dark: \"rgba(255, 255, 255, 0.65)\",\n },\n colorTextTertiary: {\n light: \"rgba(0, 0, 0, 0.45)\",\n dark: \"rgba(255, 255, 255, 0.45)\",\n },\n colorTextQuaternary: {\n light: \"rgba(0, 0, 0, 0.25)\",\n dark: \"rgba(255, 255, 255, 0.25)\",\n },\n // Primary colors\n colorPrimary: {\n light: \"#175CD3\",\n dark: \"#2E90FA\",\n },\n colorPrimaryBg: {\n light: \"#E9F2FF\",\n dark: \"#152137\",\n },\n colorPrimaryBgHover: {\n light: \"#D1E9FF\",\n dark: \"#112545\",\n },\n colorPrimaryBorder: {\n light: \"#84CAFF\",\n dark: \"#1C3959\",\n },\n colorPrimaryBorderHover: {\n light: \"#53B1FD\",\n dark: \"#204C7C\",\n },\n colorPrimaryHover: {\n light: \"#1570EF\",\n dark: \"#50A0E8\",\n },\n colorPrimaryActive: {\n light: \"#175CD3\",\n dark: \"#2565AB\",\n },\n colorPrimaryTextHover: {\n light: \"#1570EF\",\n dark: \"#50A0E8\",\n },\n colorPrimaryTextActive: {\n light: \"#175CD3\",\n dark: \"#2565AB\",\n },\n\n // Info colors\n colorInfo: {\n light: \"#175CD3\",\n dark: \"#2E90FA\",\n },\n colorInfoBg: {\n light: \"#E9F2FF\",\n dark: \"#152137\",\n },\n colorInfoBgHover: {\n light: \"#D1E9FF\",\n dark: \"#112545\",\n },\n colorInfoBorder: {\n light: \"#84CAFF\",\n dark: \"#1C3959\",\n },\n colorInfoBorderHover: {\n light: \"#53B1FD\",\n dark: \"#204C7C\",\n },\n colorInfoHover: {\n light: \"#1570EF\",\n dark: \"#50A0E8\",\n },\n colorInfoActive: {\n light: \"#175CD3\",\n dark: \"#2565AB\",\n },\n colorInfoTextHover: {\n light: \"#1570EF\",\n dark: \"#50A0E8\",\n },\n colorInfoTextActive: {\n light: \"#175CD3\",\n dark: \"#2565AB\",\n },\n\n // Success colors\n colorSuccess: {\n light: \"#4CB200\",\n dark: \"#389E0D\",\n },\n colorSuccessBg: {\n light: \"#F6FFF0\",\n dark: \"#162100\",\n },\n colorSuccessBgHover: {\n light: \"#D9F7BE\",\n dark: \"#1D2B00\",\n },\n colorSuccessBorder: {\n light: \"#B7EB8F\",\n dark: \"#274916\",\n },\n colorSuccessBorderHover: {\n light: \"#95DE64\",\n dark: \"#306317\",\n },\n colorSuccessHover: {\n light: \"#73D13D\",\n dark: \"#52C41A\",\n },\n colorSuccessActive: {\n light: \"#389E0D\",\n dark: \"#237804\",\n },\n colorSuccessTextHover: {\n light: \"#237804\",\n dark: \"#52C41A\",\n },\n colorSuccessTextActive: {\n light: \"#092B00\",\n dark: \"#237804\",\n },\n\n // Warning colors\n colorWarning: {\n light: \"#FA8C16\",\n dark: \"#D48806\",\n },\n colorWarningBg: {\n light: \"#FFF7E6\",\n dark: \"#281800\",\n },\n colorWarningBgHover: {\n light: \"#FFE7BA\",\n dark: \"#3D2200\",\n },\n colorWarningBorder: {\n light: \"#FFD591\",\n dark: \"#443B16\",\n },\n colorWarningBorderHover: {\n light: \"#FFC069\",\n dark: \"#594E1A\",\n },\n colorWarningHover: {\n light: \"#FFA940\",\n dark: \"#E8B339\",\n },\n colorWarningActive: {\n light: \"#D46B08\",\n dark: \"#AA7714\",\n },\n colorWarningTextHover: {\n light: \"#AD4E00\",\n dark: \"#E8B339\",\n },\n colorWarningTextActive: {\n light: \"#873800\",\n dark: \"#AA7714\",\n },\n\n // Error colors\n colorError: {\n light: \"#D92D20\",\n dark: \"#CF3D33\",\n },\n colorErrorBg: {\n light: \"#FEF3F2\",\n dark: \"#291414\",\n },\n colorErrorBgHover: {\n light: \"#FEE4E2\",\n dark: \"#411A18\",\n },\n colorErrorBorder: {\n light: \"#FDA29B\",\n dark: \"#562222\",\n },\n colorErrorBorderHover: {\n light: \"#F97066\",\n dark: \"#772A24\",\n },\n colorErrorHover: {\n light: \"#F04438\",\n dark: \"#E5695A\",\n },\n colorErrorActive: {\n light: \"#D92D20\",\n dark: \"#A3332B\",\n },\n colorErrorTextHover: {\n light: \"#F04438\",\n dark: \"#E5695A\",\n },\n colorErrorTextActive: {\n light: \"#D92D20\",\n dark: \"#A3332B\",\n },\n\n // Fill colors\n colorFill: {\n light: \"rgba(0, 0, 0, 0.15)\",\n dark: \"rgba(255, 255, 255, 0.15)\",\n },\n colorFillSecondary: {\n light: \"rgba(0, 0, 0, 0.06)\",\n dark: \"rgba(255, 255, 255, 0.06)\",\n },\n colorFillTertiary: {\n light: \"rgba(0, 0, 0, 0.04)\",\n dark: \"rgba(255, 255, 255, 0.04)\",\n },\n colorFillQuaternary: {\n light: \"rgba(0, 0, 0, 0.02)\",\n dark: \"rgba(255, 255, 255, 0.02)\",\n },\n colorFillAlter: {\n light: \"rgba(0, 0, 0, 0.02)\",\n dark: \"rgba(255, 255, 255, 0.02)\",\n },\n\n // Border colors\n colorBorder: {\n light: \"rgba(0, 0, 0, 0.16)\",\n dark: \"rgba(255, 255, 255, 0.16)\",\n },\n colorBorderSecondary: {\n light: \"rgba(0, 0, 0, 0.06)\",\n dark: \"rgba(255, 255, 255, 0.06)\",\n },\n\n // Icon colors\n colorIcon: {\n light: \"rgba(0, 0, 0, 0.50)\",\n dark: \"rgba(255, 255, 255, 0.58)\",\n },\n colorIconHover: {\n light: \"rgba(0, 0, 0, 0.80)\",\n dark: \"rgba(255, 255, 255, 0.88)\",\n },\n colorBgBase: {\n light: \"#FFFFFF\",\n dark: \"#111113\",\n },\n\n // Background colors\n colorBgContainer: {\n light: \"#FFFFFF\",\n dark: \"#242429\",\n },\n colorBgElevated: {\n light: \"#FFFFFF\",\n dark: \"#2B2B31\",\n },\n colorBgLayout: {\n light: \"#F4F4F5\",\n dark: \"#18181B\",\n },\n colorBgSpotlight: {\n light: \"rgba(0, 0, 0, 0.85)\",\n dark: \"#484851\",\n },\n colorBgMask: {\n light: \"rgba(0, 0, 0, 0.45)\",\n dark: \"rgba(0, 0, 0, 0.45)\",\n },\n\n // Control\n controlOutline: {\n light: \"rgba(0, 0, 0, 0.12)\",\n dark: \"rgba(255, 255, 255, 0.12)\",\n },\n};\n\nconst sharedTokens: ThemeConfig[\"token\"] = {\n fontFamily: \"var(--ds-inter)\",\n fontFamilyCode: \"var(--ds-roboto-mono)\",\n fontSizeHeading1: 36,\n fontSizeHeading2: 30,\n fontSizeHeading3: 24,\n fontSizeHeading4: 20,\n fontSizeHeading5: 16,\n lineHeightHeading1: 40 / 36,\n lineHeightHeading2: 36 / 30,\n lineHeightHeading3: 32 / 24,\n lineHeightHeading4: 28 / 20,\n lineHeightHeading5: 24 / 16,\n lineHeight: 20 / 14,\n lineHeightLG: 24 / 16,\n lineHeightSM: 16 / 12,\n fontWeightStrong: 600,\n boxShadow:\n \"0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 6px rgba(0, 0, 0, 0.04), 0px 2px 10px rgba(0, 0, 0, 0.04)\",\n boxShadowSecondary:\n \"0px 0px 1px 0px var(--ds-modal-color-border), 0px 3px 6px 1px rgba(0, 0, 0, 0.08), 0px 6px 26px 2px rgba(0, 0, 0, 0.08), 0px 4px 52px 0px rgba(0, 0, 0, 0.05)\",\n colorBgSpotlight: \"rgba(0, 0, 0, 0.85)\",\n};\n\nconst sharedThemeConfig: ThemeConfig = {\n cssVar: true,\n components: {\n Input: {\n activeBorderColor: \"var(--ds-control-color-border-active)\",\n activeShadow: \"var(--ds-control-shadow-active)\",\n errorActiveShadow: \"var(--ds-control-shadow-error-active)\",\n warningActiveShadow: \"var(--ds-control-shadow-warning-active)\",\n },\n InputNumber: {\n activeBorderColor: \"var(--ds-control-color-border-active)\",\n activeShadow: \"var(--ds-control-shadow-active)\",\n errorActiveShadow: \"var(--ds-control-shadow-error-active)\",\n warningActiveShadow: \"var(--ds-control-shadow-warning-active)\",\n },\n Button: {\n defaultShadow: undefined,\n primaryShadow: undefined,\n dangerShadow: undefined,\n },\n Select: {},\n Segmented: {\n controlHeightLG: 36,\n controlHeightSM: 24,\n },\n Breadcrumb: {\n separatorColor: \"var(--ds-color-border)\",\n },\n Slider: {\n trackBg: \"var(--ds-color-primary)\",\n trackHoverBg: \"var(--ds-color-primary-hover)\",\n trackBgDisabled: \"var(--ds-color-text-disabled)\",\n railBg: \"var(--ds-control-outline)\",\n railHoverBg: \"var(--ds-color-border)\",\n handleColor: \"var(--ds-color-primary)\",\n handleActiveColor: \"var(--ds-color-primary-active)\",\n handleColorDisabled: \"var(--ds-color-text-disabled)\",\n dotBorderColor: \"var(--ds-color-primary)\",\n dotActiveBorderColor: \"var(--ds-color-primary-active)\",\n },\n Form: {\n itemMarginBottom: 16,\n labelColor: \"var(--ds-color-text)\",\n },\n },\n};\n\n// Export theme configurations\nexport const lightTheme: ThemeConfig = {\n token: {\n ...getTokensByTheme(antdColorTokens, \"light\"),\n ...sharedTokens,\n },\n ...sharedThemeConfig,\n};\n\nexport const darkTheme: ThemeConfig = {\n token: {\n ...getTokensByTheme(antdColorTokens, \"dark\"),\n ...sharedTokens,\n },\n ...sharedThemeConfig,\n};\n"],"names":["antdColorTokens","sharedTokens","sharedThemeConfig","lightTheme","getTokensByTheme","darkTheme"],"mappings":";AAKO,MAAMA,IAA+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AAA,IAEvB,aAAa;AAAA,MACX,mBAAmB;AAAA,MACnB,cAAc;AAAA,MACd,mBAAmB;AAAA,MACnB,qBAAqB;AAAA,IAAA;AAAA,IAEvB,QAAQ;AAAA,MACN,eAAe;AAAA,MACf,eAAe;AAAA,MACf,cAAc;AAAA,IAAA;AAAA,IAEhB,QAAQ,CAAA;AAAA,IACR,WAAW;AAAA,MACT,iBAAiB;AAAA,MACjB,iBAAiB;AAAA,IAAA;AAAA,IAEnB,YAAY;AAAA,MACV,gBAAgB;AAAA,IAAA;AAAA,IAElB,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,qBAAqB;AAAA,MACrB,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,IAAA;AAAA,IAExB,MAAM;AAAA,MACJ,kBAAkB;AAAA,MAClB,YAAY;AAAA,IAAA;AAAA,EACd;AAEJ,GAGaC,IAA0B;AAAA,EACrC,OAAO;AAAA,IACL,GAAGC,EAAiBJ,GAAiB,OAAO;AAAA,IAC5C,GAAGC;AAAA,EAAA;AAAA,EAEL,GAAGC;AACL,GAEaG,IAAyB;AAAA,EACpC,OAAO;AAAA,IACL,GAAGD,EAAiBJ,GAAiB,MAAM;AAAA,IAC3C,GAAGC;AAAA,EAAA;AAAA,EAEL,GAAGC;AACL;"}
1
+ {"version":3,"file":"tokens.js","sources":["../../../src/tokens/and-theme/tokens.ts"],"sourcesContent":["import { type ThemeConfig } from \"antd\";\nimport { getTokensByTheme } from \"../utils\";\nimport { ColorTokens } from \"../types\";\n\n// Convert Figma variables to Ant Design tokens with light/dark variants\nexport const antdColorTokens: ColorTokens = {\n // Text colors\n colorText: {\n light: \"rgba(0, 0, 0, 0.88)\",\n dark: \"rgba(255, 255, 255, 0.8784313725)\",\n },\n colorTextControl: {\n light: \"rgba(0, 0, 0, 0.5490196078)\",\n dark: \"rgba(255, 255, 255, 0.5490196078)\",\n },\n colorTextSecondary: {\n light: \"rgba(0, 0, 0, 0.65)\",\n dark: \"rgba(255, 255, 255, 0.65)\",\n },\n colorTextTertiary: {\n light: \"rgba(0, 0, 0, 0.45)\",\n dark: \"rgba(255, 255, 255, 0.45)\",\n },\n colorTextQuaternary: {\n light: \"rgba(0, 0, 0, 0.2509803922)\",\n dark: \"rgba(255, 255, 255, 0.2509803922)\",\n },\n // Primary colors\n colorPrimary: {\n light: \"#175CD3\",\n dark: \"#1F88FA\",\n },\n colorPrimaryBg: {\n light: \"#E6F4FF\",\n dark: \"#16233C\",\n },\n colorPrimaryBgHover: {\n light: \"#BAE0FF\",\n dark: \"#132944\",\n },\n colorPrimaryBorder: {\n light: \"#ADCAF0\",\n dark: \"#254B74\",\n },\n colorPrimaryBorderHover: {\n light: \"#69B1FF\",\n dark: \"#19487C\",\n },\n colorPrimaryHover: {\n light: \"#3D7EE0\",\n dark: \"#509FE8\",\n },\n colorPrimaryActive: {\n light: \"#0A41AD\",\n dark: \"#2565AA\",\n },\n colorPrimaryTextHover: {\n light: \"#3D7EE0\",\n dark: \"#509FE8\",\n },\n colorPrimaryTextActive: {\n light: \"#0A41AD\",\n dark: \"#2565AA\",\n },\n\n // Info colors\n colorInfo: {\n light: \"#175CD3\",\n dark: \"#1F88FA\",\n },\n colorInfoBg: {\n light: \"#E6F4FF\",\n dark: \"#16233C\",\n },\n colorInfoBgHover: {\n light: \"#BAE0FF\",\n dark: \"#132944\",\n },\n colorInfoBorder: {\n light: \"#ADCAF0\",\n dark: \"#254B74\",\n },\n colorInfoBorderHover: {\n light: \"#69B1FF\",\n dark: \"#19487C\",\n },\n colorInfoHover: {\n light: \"#3D7EE0\",\n dark: \"#509FE8\",\n },\n colorInfoActive: {\n light: \"#0A41AD\",\n dark: \"#2565AA\",\n },\n colorInfoTextHover: {\n light: \"#3D7EE0\",\n dark: \"#509FE8\",\n },\n colorInfoTextActive: {\n light: \"#0A41AD\",\n dark: \"#2565AA\",\n },\n\n // Success colors\n colorSuccess: {\n light: \"#4CB200\",\n dark: \"#389E0D\",\n },\n colorSuccessBg: {\n light: \"#F6FFF0\",\n dark: \"#162100\",\n },\n colorSuccessBgHover: {\n light: \"#D9F7BE\",\n dark: \"#1D2B00\",\n },\n colorSuccessBorder: {\n light: \"#B7EB8F\",\n dark: \"#274916\",\n },\n colorSuccessBorderHover: {\n light: \"#95DE64\",\n dark: \"#306317\",\n },\n colorSuccessHover: {\n light: \"#73D13D\",\n dark: \"#52C41A\",\n },\n colorSuccessActive: {\n light: \"#389E0D\",\n dark: \"#237804\",\n },\n colorSuccessTextHover: {\n light: \"#237804\",\n dark: \"#52C41A\",\n },\n colorSuccessTextActive: {\n light: \"#092B00\",\n dark: \"#237804\",\n },\n\n // Warning colors\n colorWarning: {\n light: \"#FA8C16\",\n dark: \"#D48806\",\n },\n colorWarningBg: {\n light: \"#FFF7E6\",\n dark: \"#281800\",\n },\n colorWarningBgHover: {\n light: \"#FFE7BA\",\n dark: \"#3D2200\",\n },\n colorWarningBorder: {\n light: \"#FFD591\",\n dark: \"#443B16\",\n },\n colorWarningBorderHover: {\n light: \"#FFC069\",\n dark: \"#594E1A\",\n },\n colorWarningHover: {\n light: \"#FFA940\",\n dark: \"#E8B339\",\n },\n colorWarningActive: {\n light: \"#D46B08\",\n dark: \"#AA7714\",\n },\n colorWarningTextHover: {\n light: \"#AD4E00\",\n dark: \"#E8B339\",\n },\n colorWarningTextActive: {\n light: \"#873800\",\n dark: \"#AA7714\",\n },\n\n // Error colors\n colorError: {\n light: \"#D43225\",\n dark: \"#DE4035\",\n },\n colorErrorBg: {\n light: \"#FFF3F0\",\n dark: \"#291414\",\n },\n colorErrorBgHover: {\n light: \"#FFD4C9\",\n dark: \"#411A18\",\n },\n colorErrorBorder: {\n light: \"#FFB6A8\",\n dark: \"#842924\",\n },\n colorErrorBorderHover: {\n light: \"#F28372\",\n dark: \"#AC362F\",\n },\n colorErrorHover: {\n light: \"#E0594A\",\n dark: \"#E5695A\",\n },\n colorErrorActive: {\n light: \"#B31712\",\n dark: \"#973129\",\n },\n colorErrorTextHover: {\n light: \"#E65747\",\n dark: \"#D66357\",\n },\n colorErrorTextActive: {\n light: \"#B31712\",\n dark: \"#973129\",\n },\n\n // Fill colors\n colorFill: {\n light: \"rgba(0, 0, 0, 0.15)\",\n dark: \"rgba(255, 255, 255, 0.15)\",\n },\n colorFillSecondary: {\n light: \"rgba(0, 0, 0, 0.06)\",\n dark: \"rgba(255, 255, 255, 0.06)\",\n },\n colorFillTertiary: {\n light: \"rgba(0, 0, 0, 0.04)\",\n dark: \"rgba(255, 255, 255, 0.04)\",\n },\n colorFillQuaternary: {\n light: \"rgba(0, 0, 0, 0.02)\",\n dark: \"rgba(255, 255, 255, 0.02)\",\n },\n colorFillAlter: {\n light: \"rgba(0, 0, 0, 0.02)\",\n dark: \"rgba(255, 255, 255, 0.02)\",\n },\n\n // Border colors\n colorBorder: {\n light: \"rgba(0, 0, 0, 0.16)\",\n dark: \"rgba(255, 255, 255, 0.16)\",\n },\n colorBorderSecondary: {\n light: \"rgba(0, 0, 0, 0.06)\",\n dark: \"rgba(255, 255, 255, 0.06)\",\n },\n\n // Icon colors\n colorIcon: {\n light: \"rgba(0, 0, 0, 0.50)\",\n dark: \"rgba(255, 255, 255, 0.58)\",\n },\n colorIconHover: {\n light: \"rgba(0, 0, 0, 0.80)\",\n dark: \"rgba(255, 255, 255, 0.88)\",\n },\n colorBgBase: {\n light: \"#FFFFFF\",\n dark: \"#111113\",\n },\n\n // Background colors\n colorBgContainer: {\n light: \"#FFFFFF\",\n dark: \"#242429\",\n },\n colorBgElevated: {\n light: \"#FFFFFF\",\n dark: \"#2B2B31\",\n },\n colorBgLayout: {\n light: \"#F4F4F5\",\n dark: \"#18181B\",\n },\n colorBgSpotlight: {\n light: \"rgba(0, 0, 0, 0.85)\",\n dark: \"#484851\",\n },\n colorBgMask: {\n light: \"rgba(0, 0, 0, 0.45)\",\n dark: \"rgba(0, 0, 0, 0.45)\",\n },\n\n // Control\n controlOutline: {\n light: \"rgba(0, 0, 0, 0.12)\",\n dark: \"rgba(255, 255, 255, 0.12)\",\n },\n};\n\nconst sharedTokens: ThemeConfig[\"token\"] = {\n fontFamily: \"var(--ds-inter)\",\n fontFamilyCode: \"var(--ds-roboto-mono)\",\n fontSizeHeading1: 36,\n fontSizeHeading2: 30,\n fontSizeHeading3: 24,\n fontSizeHeading4: 20,\n fontSizeHeading5: 16,\n lineHeightHeading1: 40 / 36,\n lineHeightHeading2: 36 / 30,\n lineHeightHeading3: 32 / 24,\n lineHeightHeading4: 28 / 20,\n lineHeightHeading5: 24 / 16,\n lineHeight: 20 / 14,\n lineHeightLG: 24 / 16,\n lineHeightSM: 16 / 12,\n fontWeightStrong: 600,\n boxShadow:\n \"0px 1px 2px rgba(0, 0, 0, 0.06), 0px 1px 6px rgba(0, 0, 0, 0.04), 0px 2px 10px rgba(0, 0, 0, 0.04)\",\n boxShadowSecondary:\n \"0px 0px 1px 0px var(--ds-modal-color-border), 0px 3px 6px 1px rgba(0, 0, 0, 0.08), 0px 6px 26px 2px rgba(0, 0, 0, 0.08), 0px 4px 52px 0px rgba(0, 0, 0, 0.05)\",\n colorBgSpotlight: \"rgba(0, 0, 0, 0.85)\",\n};\n\nconst sharedThemeConfig: ThemeConfig = {\n cssVar: true,\n components: {\n Input: {\n activeBorderColor: \"var(--ds-control-color-border-active)\",\n activeShadow: \"var(--ds-control-shadow-active)\",\n errorActiveShadow: \"var(--ds-control-shadow-error-active)\",\n warningActiveShadow: \"var(--ds-control-shadow-warning-active)\",\n },\n InputNumber: {\n activeBorderColor: \"var(--ds-control-color-border-active)\",\n activeShadow: \"var(--ds-control-shadow-active)\",\n errorActiveShadow: \"var(--ds-control-shadow-error-active)\",\n warningActiveShadow: \"var(--ds-control-shadow-warning-active)\",\n },\n Button: {\n defaultShadow: undefined,\n primaryShadow: undefined,\n dangerShadow: undefined,\n textTextColor: \"var(--ds-color-text-control)\",\n textTextHoverColor: \"var(--ds-color-text-control)\",\n },\n Segmented: {\n controlHeightLG: 36,\n controlHeightSM: 24,\n },\n Breadcrumb: {\n separatorColor: \"var(--ds-color-border)\",\n },\n Slider: {\n trackBg: \"var(--ds-color-primary)\",\n trackHoverBg: \"var(--ds-color-primary-hover)\",\n trackBgDisabled: \"var(--ds-color-text-disabled)\",\n railBg: \"var(--ds-control-outline)\",\n railHoverBg: \"var(--ds-color-border)\",\n handleColor: \"var(--ds-color-primary)\",\n handleActiveColor: \"var(--ds-color-primary-active)\",\n handleColorDisabled: \"var(--ds-color-text-disabled)\",\n dotBorderColor: \"var(--ds-color-primary)\",\n dotActiveBorderColor: \"var(--ds-color-primary-active)\",\n },\n Form: {\n itemMarginBottom: 16,\n labelColor: \"var(--ds-color-text)\",\n },\n },\n};\n\n// Export theme configurations\nexport const lightTheme: ThemeConfig = {\n token: {\n ...getTokensByTheme(antdColorTokens, \"light\"),\n ...sharedTokens,\n },\n ...sharedThemeConfig,\n};\n\nexport const darkTheme: ThemeConfig = {\n token: {\n ...getTokensByTheme(antdColorTokens, \"dark\"),\n ...sharedTokens,\n },\n ...sharedThemeConfig,\n};\n"],"names":["antdColorTokens","sharedTokens","sharedThemeConfig","lightTheme","getTokensByTheme","darkTheme"],"mappings":";AAKO,MAAMA,IAA+B;AAAA;AAAA,EAE1C,WAAW;AAAA,IACT,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER,kBAAkB;AAAA,IAChB,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER,oBAAoB;AAAA,IAClB,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER,mBAAmB;AAAA,IACjB,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA,EAER,qBAAqB;AAAA,IACnB,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AAAA;AAAA,EAGR,cAAc;AAAA,IACZ,OAAO;AAAA,IACP,MAAM;AAAA,EAAA;AA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A;AAAA,IAElB,QAAQ;AAAA,MACN,SAAS;AAAA,MACT,cAAc;AAAA,MACd,iBAAiB;AAAA,MACjB,QAAQ;AAAA,MACR,aAAa;AAAA,MACb,aAAa;AAAA,MACb,mBAAmB;AAAA,MACnB,qBAAqB;AAAA,MACrB,gBAAgB;AAAA,MAChB,sBAAsB;AAAA,IAAA;AAAA,IAExB,MAAM;AAAA,MACJ,kBAAkB;AAAA,MAClB,YAAY;AAAA,IAAA;AAAA,EACd;AAEJ,GAGaC,IAA0B;AAAA,EACrC,OAAO;AAAA,IACL,GAAGC,EAAiBJ,GAAiB,OAAO;AAAA,IAC5C,GAAGC;AAAA,EAAA;AAAA,EAEL,GAAGC;AACL,GAEaG,IAAyB;AAAA,EACpC,OAAO;AAAA,IACL,GAAGD,EAAiBJ,GAAiB,MAAM;AAAA,IAC3C,GAAGC;AAAA,EAAA;AAAA,EAEL,GAAGC;AACL;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bioturing/components",
3
- "version": "0.42.0",
3
+ "version": "0.44.0",
4
4
  "type": "module",
5
5
  "module": "./dist/index.js",
6
6
  "main": "./dist/index.js",
@@ -35,8 +35,8 @@
35
35
  "rc-tree": "^5.13.1",
36
36
  "rc-util": "^5.44.4",
37
37
  "react-use-resizable": "^0.2.0",
38
- "tailwind-merge": "^3.3.1",
39
- "@bioturing/assets": "0.26.0"
38
+ "tailwind-merge": "^3.5.0",
39
+ "@bioturing/assets": "0.27.0"
40
40
  },
41
41
  "peerDependencies": {
42
42
  "antd": "^5.26.7",
@@ -1,64 +0,0 @@
1
- import { BaseUIAlign, BaseUISide } from '../utils';
2
- export interface UseBaseUIPlacementOptions {
3
- /**
4
- * The positioner element to observe for placement changes
5
- */
6
- positionerRef: HTMLElement | null;
7
- /**
8
- * Whether the popup is currently open
9
- * Observation only occurs when open is true
10
- */
11
- open: boolean;
12
- /**
13
- * Initial side placement
14
- */
15
- initialSide: BaseUISide;
16
- /**
17
- * Initial align placement
18
- */
19
- initialAlign: BaseUIAlign;
20
- /**
21
- * Callback fired when placement changes
22
- */
23
- onPlacementChange?: (placement: string) => void;
24
- /**
25
- * Enable debug logging
26
- * @default false
27
- */
28
- debug?: boolean;
29
- }
30
- export interface UseBaseUIPlacementReturn {
31
- /**
32
- * Current side placement
33
- */
34
- currentSide: BaseUISide;
35
- /**
36
- * Current align placement
37
- */
38
- currentAlign: BaseUIAlign;
39
- /**
40
- * Key that increments when placement changes
41
- * Useful for triggering re-renders or resets
42
- */
43
- placementChangeKey: number;
44
- }
45
- /**
46
- * Hook to track Base UI positioner placement changes
47
- *
48
- * Observes the positioner element's data-side and data-align attributes
49
- * and triggers callbacks when they change. Useful for components that need
50
- * to react to automatic placement adjustments by Base UI.
51
- *
52
- * @example
53
- * ```tsx
54
- * const { currentSide, currentAlign, placementChangeKey } = useBaseUIPlacement({
55
- * positionerRef,
56
- * open,
57
- * initialSide: 'bottom',
58
- * initialAlign: 'start',
59
- * onPlacementChange: (placement) => console.log('New placement:', placement)
60
- * });
61
- * ```
62
- */
63
- export declare function useBaseUIPlacement({ positionerRef, open, initialSide, initialAlign, onPlacementChange, debug, }: UseBaseUIPlacementOptions): UseBaseUIPlacementReturn;
64
- //# sourceMappingURL=useBaseUIPlacement.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBaseUIPlacement.d.ts","sourceRoot":"","sources":["../../../src/components/hooks/useBaseUIPlacement.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,WAAW,EAAE,UAAU,EAAsB,MAAM,UAAU,CAAC;AAEvE,MAAM,WAAW,yBAAyB;IACxC;;OAEG;IACH,aAAa,EAAE,WAAW,GAAG,IAAI,CAAC;IAClC;;;OAGG;IACH,IAAI,EAAE,OAAO,CAAC;IACd;;OAEG;IACH,WAAW,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC;IAC1B;;OAEG;IACH,iBAAiB,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IAChD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,WAAW,EAAE,UAAU,CAAC;IACxB;;OAEG;IACH,YAAY,EAAE,WAAW,CAAC;IAC1B;;;OAGG;IACH,kBAAkB,EAAE,MAAM,CAAC;CAC5B;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,aAAa,EACb,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,iBAAiB,EACjB,KAAa,GACd,EAAE,yBAAyB,GAAG,wBAAwB,CAsFtD"}
@@ -1,61 +0,0 @@
1
- "use client";
2
- import { useState as i, useEffect as y } from "react";
3
- import { useStableCallback as N } from "@base-ui/utils/useStableCallback";
4
- import { buildAntdPlacement as S } from "../utils/placement.js";
5
- function E({
6
- positionerRef: a,
7
- open: b,
8
- initialSide: d,
9
- initialAlign: f,
10
- onPlacementChange: m,
11
- debug: o = !1
12
- }) {
13
- const [r, C] = i(d), [n, h] = i(f), [P, A] = i(0), s = N(m);
14
- return y(() => {
15
- if (!a || !b)
16
- return;
17
- const g = new MutationObserver((w) => {
18
- let u = !1, l = r, c = n;
19
- if (w.forEach((t) => {
20
- if (t.type === "attributes" && t.attributeName === "data-side") {
21
- const e = a.getAttribute(t.attributeName);
22
- e && e !== r && (l = e, u = !0);
23
- }
24
- if (t.type === "attributes" && t.attributeName === "data-align") {
25
- const e = a.getAttribute(t.attributeName);
26
- e && e !== n && (c = e, u = !0);
27
- }
28
- }), u) {
29
- const t = S({
30
- side: l,
31
- align: c
32
- });
33
- C(l), h(c), A((e) => e + 1), s && s(t);
34
- }
35
- });
36
- return g.observe(a, {
37
- attributes: !0,
38
- attributeFilter: ["data-side", "data-align"],
39
- attributeOldValue: !0
40
- }), () => {
41
- g.disconnect();
42
- };
43
- }, [
44
- b,
45
- a,
46
- s,
47
- r,
48
- n,
49
- o,
50
- d,
51
- f
52
- ]), {
53
- currentSide: r,
54
- currentAlign: n,
55
- placementChangeKey: P
56
- };
57
- }
58
- export {
59
- E as useBaseUIPlacement
60
- };
61
- //# sourceMappingURL=useBaseUIPlacement.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBaseUIPlacement.js","sources":["../../../src/components/hooks/useBaseUIPlacement.ts"],"sourcesContent":["\"use client\";\nimport { useEffect, useState } from \"react\";\nimport { useStableCallback } from \"@base-ui/utils/useStableCallback\";\nimport { BaseUIAlign, BaseUISide, buildAntdPlacement } from \"../utils\";\n\nexport interface UseBaseUIPlacementOptions {\n /**\n * The positioner element to observe for placement changes\n */\n positionerRef: HTMLElement | null;\n /**\n * Whether the popup is currently open\n * Observation only occurs when open is true\n */\n open: boolean;\n /**\n * Initial side placement\n */\n initialSide: BaseUISide;\n /**\n * Initial align placement\n */\n initialAlign: BaseUIAlign;\n /**\n * Callback fired when placement changes\n */\n onPlacementChange?: (placement: string) => void;\n /**\n * Enable debug logging\n * @default false\n */\n debug?: boolean;\n}\n\nexport interface UseBaseUIPlacementReturn {\n /**\n * Current side placement\n */\n currentSide: BaseUISide;\n /**\n * Current align placement\n */\n currentAlign: BaseUIAlign;\n /**\n * Key that increments when placement changes\n * Useful for triggering re-renders or resets\n */\n placementChangeKey: number;\n}\n\n/**\n * Hook to track Base UI positioner placement changes\n *\n * Observes the positioner element's data-side and data-align attributes\n * and triggers callbacks when they change. Useful for components that need\n * to react to automatic placement adjustments by Base UI.\n *\n * @example\n * ```tsx\n * const { currentSide, currentAlign, placementChangeKey } = useBaseUIPlacement({\n * positionerRef,\n * open,\n * initialSide: 'bottom',\n * initialAlign: 'start',\n * onPlacementChange: (placement) => console.log('New placement:', placement)\n * });\n * ```\n */\nexport function useBaseUIPlacement({\n positionerRef,\n open,\n initialSide,\n initialAlign,\n onPlacementChange,\n debug = false,\n}: UseBaseUIPlacementOptions): UseBaseUIPlacementReturn {\n const [currentSide, setCurrentSide] = useState<BaseUISide>(initialSide);\n const [currentAlign, setCurrentAlign] = useState<BaseUIAlign>(initialAlign);\n const [placementChangeKey, setPlacementChangeKey] = useState(0);\n\n const stableOnPlacementChange = useStableCallback(onPlacementChange);\n\n useEffect(() => {\n if (!positionerRef || !open) {\n return;\n }\n\n // Create MutationObserver to watch for data-side and data-align changes\n const observer = new MutationObserver((mutations) => {\n let hasPlacementChanged = false;\n let newSide = currentSide;\n let newAlign = currentAlign;\n\n mutations.forEach((mutation) => {\n if (\n mutation.type === \"attributes\" &&\n mutation.attributeName === \"data-side\"\n ) {\n const side = positionerRef.getAttribute(mutation.attributeName);\n if (side && side !== currentSide) {\n newSide = side as BaseUISide;\n hasPlacementChanged = true;\n }\n }\n\n if (\n mutation.type === \"attributes\" &&\n mutation.attributeName === \"data-align\"\n ) {\n const align = positionerRef.getAttribute(mutation.attributeName);\n if (align && align !== currentAlign) {\n newAlign = align as BaseUIAlign;\n hasPlacementChanged = true;\n }\n }\n });\n\n // Only trigger callbacks if placement actually changed\n if (hasPlacementChanged) {\n const newPlacement = buildAntdPlacement({\n side: newSide,\n align: newAlign,\n });\n\n // Update state to trigger re-render\n setCurrentSide(newSide);\n setCurrentAlign(newAlign);\n setPlacementChangeKey((prev) => prev + 1);\n\n if (stableOnPlacementChange) {\n stableOnPlacementChange(newPlacement);\n }\n }\n });\n\n // Start observing\n observer.observe(positionerRef, {\n attributes: true,\n attributeFilter: [\"data-side\", \"data-align\"],\n attributeOldValue: true,\n });\n\n return () => {\n observer.disconnect();\n };\n }, [\n open,\n positionerRef,\n stableOnPlacementChange,\n currentSide,\n currentAlign,\n debug,\n initialSide,\n initialAlign,\n ]);\n\n return {\n currentSide,\n currentAlign,\n placementChangeKey,\n };\n}\n"],"names":["useBaseUIPlacement","positionerRef","open","initialSide","initialAlign","onPlacementChange","debug","currentSide","setCurrentSide","useState","currentAlign","setCurrentAlign","placementChangeKey","setPlacementChangeKey","stableOnPlacementChange","useStableCallback","useEffect","observer","mutations","hasPlacementChanged","newSide","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