@apple-pie/slice 0.0.0 → 0.0.2

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 (291) hide show
  1. package/dist/cjs/chunks/Avatar-8-wPWe0V.js +68 -0
  2. package/dist/cjs/chunks/AvatarGroup-CVKmgBbD.js +39 -0
  3. package/dist/cjs/chunks/Badge-CMapJCij.js +41 -0
  4. package/dist/cjs/chunks/CheckBox-7AACxrdZ.js +76 -0
  5. package/dist/cjs/chunks/DivInput-BKKJTFeV.js +204 -0
  6. package/dist/cjs/chunks/DocIcons-BRWOzK96.js +41 -0
  7. package/dist/cjs/chunks/Dot-Dnr9M9na.js +80 -0
  8. package/dist/cjs/chunks/DrggablePanel-C6TPsDB-.js +302 -0
  9. package/dist/cjs/chunks/DropDown-D9sf_m2I.js +154 -0
  10. package/dist/cjs/chunks/EditorButtonBar-CUNDgRQd.js +244 -0
  11. package/dist/cjs/chunks/ErrorSummary-Dv44onsV.js +42 -0
  12. package/dist/cjs/chunks/FlexDiv-DZBpswHV.js +103 -0
  13. package/dist/cjs/chunks/Grouper-_kd2nU78.js +50 -0
  14. package/dist/cjs/chunks/IconButton-BfsPlKTb.js +84 -0
  15. package/dist/cjs/chunks/Logos-DSlAUz8l.js +119 -0
  16. package/dist/cjs/chunks/MessageInput-CiHFo2j8.js +399 -0
  17. package/dist/cjs/chunks/Overlay-DwCPvGB5.js +45 -0
  18. package/dist/cjs/chunks/Pager-CFtZ0IIW.js +42 -0
  19. package/dist/cjs/chunks/ProgressIndicator-C5oB7Mky.js +121 -0
  20. package/dist/cjs/chunks/RadioButton-e_y2qiPE.js +65 -0
  21. package/dist/cjs/chunks/RadioButtonList-I81UwHmM.js +116 -0
  22. package/dist/cjs/chunks/Slider-C-gn7Sby.js +285 -0
  23. package/dist/cjs/chunks/Spacer-BEY2-_PB.js +16 -0
  24. package/dist/cjs/chunks/Switch-CtkFtogd.js +43 -0
  25. package/dist/cjs/chunks/TabBar-D3bj4pjj.js +176 -0
  26. package/dist/cjs/chunks/TextArea-B1oKK3_b.js +153 -0
  27. package/dist/cjs/chunks/TextField-CiQdPP5E.js +248 -0
  28. package/dist/cjs/chunks/Tip-C2pzExut.js +91 -0
  29. package/dist/cjs/chunks/Toast-DrijUwoL.js +141 -0
  30. package/dist/cjs/chunks/UIButton-CH4p-8yq.js +317 -0
  31. package/dist/cjs/chunks/UIButtonBar-0fHPB0ww.js +58 -0
  32. package/dist/cjs/chunks/UICard-DBDSyT7E.js +36 -0
  33. package/dist/cjs/chunks/UIChip-kjhvRrOV.js +93 -0
  34. package/dist/cjs/chunks/UIFileIcon-ZrbDIeYz.js +54 -0
  35. package/dist/cjs/chunks/UILabel-DkBE2AIt.js +116 -0
  36. package/dist/cjs/chunks/_types-CoWzQFsT.js +714 -0
  37. package/dist/cjs/chunks/sharedTypes-BvTjh6M5.js +9 -0
  38. package/dist/cjs/chunks/style-inject.es-XZHJH68X.js +30 -0
  39. package/dist/cjs/chunks/tipStore-C9oV9SIh.js +23 -0
  40. package/dist/cjs/chunks/toastStore-C-ETP9H6.js +23 -0
  41. package/dist/cjs/chunks/tslib.es6-4H29ixHs.js +48 -0
  42. package/dist/cjs/chunks/utils-CbayehuI.js +126 -0
  43. package/dist/cjs/hooks/useDoubleClick.js +26 -0
  44. package/dist/cjs/hooks/useKeyboardShortcuts.js +42 -0
  45. package/dist/cjs/hooks/useLastUpdated.js +53 -0
  46. package/dist/cjs/hooks/useLocalStore.js +52 -0
  47. package/dist/cjs/hooks/useObserveResize.js +56 -0
  48. package/dist/cjs/hooks/useObserveTheme.js +36 -0
  49. package/dist/cjs/hooks/useTheme.js +85 -0
  50. package/dist/cjs/hooks/useToolTip.js +36 -0
  51. package/dist/cjs/hooks/useTrackRenders.js +38 -0
  52. package/dist/cjs/hooks/useWindow.js +64 -0
  53. package/dist/cjs/hooks.js +32 -0
  54. package/dist/cjs/index.js +121 -0
  55. package/dist/cjs/providers/ThemeProvider.js +51 -0
  56. package/dist/cjs/providers.js +13 -0
  57. package/dist/cjs/stores/tip.js +12 -0
  58. package/dist/cjs/stores/toast.js +12 -0
  59. package/dist/cjs/stores.js +18 -0
  60. package/dist/cjs/theme/colors.js +383 -0
  61. package/dist/cjs/theme/corners.js +14 -0
  62. package/dist/cjs/theme/themes.js +23 -0
  63. package/dist/cjs/theme/type.js +316 -0
  64. package/dist/cjs/theme.js +13 -0
  65. package/dist/cjs/uikit/Avatar.js +11 -0
  66. package/dist/cjs/uikit/AvatarGroup.js +12 -0
  67. package/dist/cjs/uikit/Badge.js +11 -0
  68. package/dist/cjs/uikit/CheckBox.js +21 -0
  69. package/dist/cjs/uikit/DivInput.js +13 -0
  70. package/dist/cjs/uikit/DocIcon.js +17 -0
  71. package/dist/cjs/uikit/Dot.js +12 -0
  72. package/dist/cjs/uikit/DraggablePanel.js +20 -0
  73. package/dist/cjs/uikit/DropDown.js +20 -0
  74. package/dist/cjs/uikit/EditorButtonBar.js +27 -0
  75. package/dist/cjs/uikit/ErrorSummary.js +12 -0
  76. package/dist/cjs/uikit/FlexDiv.js +12 -0
  77. package/dist/cjs/uikit/Grouper.js +22 -0
  78. package/dist/cjs/uikit/Icon.js +22 -0
  79. package/dist/cjs/uikit/IconButton.js +24 -0
  80. package/dist/cjs/uikit/Logos.js +17 -0
  81. package/dist/cjs/uikit/MessageInput.js +29 -0
  82. package/dist/cjs/uikit/Overlay.js +12 -0
  83. package/dist/cjs/uikit/Pager.js +12 -0
  84. package/dist/cjs/uikit/Progress.js +20 -0
  85. package/dist/cjs/uikit/RadioButton.js +25 -0
  86. package/dist/cjs/uikit/RadioButtonList.js +26 -0
  87. package/dist/cjs/uikit/Slider.js +13 -0
  88. package/dist/cjs/uikit/Spacer.js +10 -0
  89. package/dist/cjs/uikit/Switch.js +12 -0
  90. package/dist/cjs/uikit/TabBar.js +25 -0
  91. package/dist/cjs/uikit/TextArea.js +26 -0
  92. package/dist/cjs/uikit/Textfield.js +27 -0
  93. package/dist/cjs/uikit/Tip.js +13 -0
  94. package/dist/cjs/uikit/Toast.js +25 -0
  95. package/dist/cjs/uikit/UIButton.js +25 -0
  96. package/dist/cjs/uikit/UIButtonBar.js +25 -0
  97. package/dist/cjs/uikit/UICard.js +20 -0
  98. package/dist/cjs/uikit/UIChip.js +21 -0
  99. package/dist/cjs/uikit/UIFileIcon.js +17 -0
  100. package/dist/cjs/uikit/UILabel.js +18 -0
  101. package/dist/esm/chunks/Avatar-D_muqPrW.js +66 -0
  102. package/dist/esm/chunks/AvatarGroup-D8Xmrn52.js +37 -0
  103. package/dist/esm/chunks/Badge-PPf5Uvw3.js +39 -0
  104. package/dist/esm/chunks/CheckBox-CswFI0Xc.js +74 -0
  105. package/dist/esm/chunks/DivInput-iKFkeU2F.js +202 -0
  106. package/dist/esm/chunks/DocIcons-CbOX4n8Y.js +39 -0
  107. package/dist/esm/chunks/Dot-B84UVs2e.js +78 -0
  108. package/dist/esm/chunks/DrggablePanel-CYYwTmFd.js +300 -0
  109. package/dist/esm/chunks/DropDown-D4t6EhKL.js +152 -0
  110. package/dist/esm/chunks/EditorButtonBar-FnMa8Zv2.js +242 -0
  111. package/dist/esm/chunks/ErrorSummary-DhU5SKPt.js +40 -0
  112. package/dist/esm/chunks/FlexDiv-CmMpORgn.js +101 -0
  113. package/dist/esm/chunks/Grouper-BbreOXI9.js +48 -0
  114. package/dist/esm/chunks/IconButton-CguHGkBM.js +82 -0
  115. package/dist/esm/chunks/Logos-DwZP-TR2.js +117 -0
  116. package/dist/esm/chunks/MessageInput-DMHzCwjO.js +397 -0
  117. package/dist/esm/chunks/Overlay-CCBy7n7H.js +43 -0
  118. package/dist/esm/chunks/Pager-BsSti93V.js +40 -0
  119. package/dist/esm/chunks/ProgressIndicator-BVukxMU6.js +118 -0
  120. package/dist/esm/chunks/RadioButton-B5BxQI0R.js +63 -0
  121. package/dist/esm/chunks/RadioButtonList-C2z8McAD.js +114 -0
  122. package/dist/esm/chunks/Slider-C-PcWqTz.js +283 -0
  123. package/dist/esm/chunks/Spacer-DbZSG5x3.js +14 -0
  124. package/dist/esm/chunks/Switch-DjfrSiQz.js +41 -0
  125. package/dist/esm/chunks/TabBar-BSBcgTbd.js +174 -0
  126. package/dist/esm/chunks/TextArea-COM0UPo2.js +151 -0
  127. package/dist/esm/chunks/TextField-Bh24bRWs.js +246 -0
  128. package/dist/esm/chunks/Tip-Ct19Ljul.js +89 -0
  129. package/dist/esm/chunks/Toast-BR0oMX6z.js +139 -0
  130. package/dist/esm/chunks/UIButton-DKx-_O8h.js +315 -0
  131. package/dist/esm/chunks/UIButtonBar-BNdA5eVq.js +56 -0
  132. package/dist/esm/chunks/UICard-Dn5f3wg8.js +34 -0
  133. package/dist/esm/chunks/UIChip-DqnGeVyR.js +91 -0
  134. package/dist/esm/chunks/UIFileIcon-qGxIPsJJ.js +52 -0
  135. package/dist/esm/chunks/UILabel-RnbodPCS.js +114 -0
  136. package/dist/esm/chunks/_types-BaYeLEWK.js +712 -0
  137. package/dist/esm/chunks/sharedTypes-BfZzG1KX.js +9 -0
  138. package/dist/esm/chunks/style-inject.es-tgCJW-Cu.js +28 -0
  139. package/dist/esm/chunks/tipStore-nBYJ6tmE.js +17 -0
  140. package/dist/esm/chunks/toastStore-r3pvNa28.js +17 -0
  141. package/dist/esm/chunks/tslib.es6-0pkUdtrF.js +45 -0
  142. package/dist/esm/chunks/utils-BRZK2Drn.js +119 -0
  143. package/dist/esm/hooks/useDoubleClick.js +24 -0
  144. package/dist/esm/hooks/useKeyboardShortcuts.js +40 -0
  145. package/dist/esm/hooks/useLastUpdated.js +51 -0
  146. package/dist/esm/hooks/useLocalStore.js +50 -0
  147. package/dist/esm/hooks/useObserveResize.js +54 -0
  148. package/dist/esm/hooks/useObserveTheme.js +34 -0
  149. package/dist/esm/hooks/useTheme.js +83 -0
  150. package/dist/esm/hooks/useToolTip.js +34 -0
  151. package/dist/esm/hooks/useTrackRenders.js +36 -0
  152. package/dist/esm/hooks/useWindow.js +62 -0
  153. package/dist/esm/hooks.js +14 -0
  154. package/dist/esm/index.js +57 -0
  155. package/dist/esm/providers/ThemeProvider.js +49 -0
  156. package/dist/esm/providers.js +7 -0
  157. package/dist/esm/stores/tip.js +2 -0
  158. package/dist/esm/stores/toast.js +2 -0
  159. package/dist/esm/stores.js +3 -0
  160. package/dist/esm/theme/colors.js +377 -0
  161. package/dist/esm/theme/corners.js +12 -0
  162. package/dist/esm/theme/themes.js +20 -0
  163. package/dist/esm/theme/type.js +312 -0
  164. package/dist/esm/theme.js +4 -0
  165. package/dist/esm/uikit/Avatar.js +5 -0
  166. package/dist/esm/uikit/AvatarGroup.js +6 -0
  167. package/dist/esm/uikit/Badge.js +5 -0
  168. package/dist/esm/uikit/CheckBox.js +15 -0
  169. package/dist/esm/uikit/DivInput.js +7 -0
  170. package/dist/esm/uikit/DocIcon.js +11 -0
  171. package/dist/esm/uikit/Dot.js +6 -0
  172. package/dist/esm/uikit/DraggablePanel.js +14 -0
  173. package/dist/esm/uikit/DropDown.js +14 -0
  174. package/dist/esm/uikit/EditorButtonBar.js +21 -0
  175. package/dist/esm/uikit/ErrorSummary.js +6 -0
  176. package/dist/esm/uikit/FlexDiv.js +6 -0
  177. package/dist/esm/uikit/Grouper.js +16 -0
  178. package/dist/esm/uikit/Icon.js +12 -0
  179. package/dist/esm/uikit/IconButton.js +18 -0
  180. package/dist/esm/uikit/Logos.js +11 -0
  181. package/dist/esm/uikit/MessageInput.js +23 -0
  182. package/dist/esm/uikit/Overlay.js +6 -0
  183. package/dist/esm/uikit/Pager.js +6 -0
  184. package/dist/esm/uikit/Progress.js +13 -0
  185. package/dist/esm/uikit/RadioButton.js +19 -0
  186. package/dist/esm/uikit/RadioButtonList.js +20 -0
  187. package/dist/esm/uikit/Slider.js +7 -0
  188. package/dist/esm/uikit/Spacer.js +4 -0
  189. package/dist/esm/uikit/Switch.js +6 -0
  190. package/dist/esm/uikit/TabBar.js +19 -0
  191. package/dist/esm/uikit/TextArea.js +20 -0
  192. package/dist/esm/uikit/Textfield.js +21 -0
  193. package/dist/esm/uikit/Tip.js +7 -0
  194. package/dist/esm/uikit/Toast.js +15 -0
  195. package/dist/esm/uikit/UIButton.js +19 -0
  196. package/dist/esm/uikit/UIButtonBar.js +19 -0
  197. package/dist/esm/uikit/UICard.js +14 -0
  198. package/dist/esm/uikit/UIChip.js +15 -0
  199. package/dist/esm/uikit/UIFileIcon.js +11 -0
  200. package/dist/esm/uikit/UILabel.js +12 -0
  201. package/dist/types/hooks/index.d.ts +9 -2
  202. package/dist/types/hooks/useDoubleClick/useDoubleClick.d.ts +1 -0
  203. package/dist/types/hooks/useKeyboardShortcuts/useKeyboardShortcuts.d.ts +6 -0
  204. package/dist/types/hooks/useLastUpdated/useLastUpdated.d.ts +4 -0
  205. package/dist/types/hooks/useLocalStore/useLocalStore.d.ts +1 -0
  206. package/dist/types/hooks/{useObserveResize.d.ts → useObserveResize/useObserveResize.d.ts} +1 -1
  207. package/dist/types/hooks/useObserveTheme/useObserveTheme.d.ts +2 -0
  208. package/dist/types/hooks/useTheme/useTheme.d.ts +47 -0
  209. package/dist/types/hooks/useToolTip/useToolTip.d.ts +6 -0
  210. package/dist/types/hooks/useWindow/useWindow.d.ts +15 -0
  211. package/dist/types/index.d.ts +9 -4
  212. package/dist/types/providers/ThemeProvider.d.ts +1 -0
  213. package/dist/types/stores/index.d.ts +2 -0
  214. package/dist/types/stores/tip/_types.d.ts +8 -0
  215. package/dist/types/stores/tip/index.d.ts +2 -0
  216. package/dist/types/stores/tip/tipStore.d.ts +12 -0
  217. package/dist/types/stores/toast/_types.d.ts +14 -0
  218. package/dist/types/stores/toast/index.d.ts +2 -0
  219. package/dist/types/stores/toast/toastStore.d.ts +12 -0
  220. package/dist/types/theme/colors/colors.d.ts +2 -0
  221. package/dist/types/theme/colors/types.d.ts +14 -0
  222. package/dist/types/theme/components/BrandColors.d.ts +1 -0
  223. package/dist/types/theme/components/ColorTile.d.ts +6 -0
  224. package/dist/types/theme/components/ColorTileGroup.d.ts +6 -0
  225. package/dist/types/theme/components/ThemeColors.d.ts +2 -0
  226. package/dist/types/theme/components/_types.d.ts +15 -0
  227. package/dist/types/theme/index.d.ts +1 -1
  228. package/dist/types/theme/themes.d.ts +3 -3
  229. package/dist/types/theme/type/type.d.ts +3 -0
  230. package/dist/types/uikit/Avatar/_types.d.ts +3 -2
  231. package/dist/types/uikit/AvatarGroup/_types.d.ts +4 -2
  232. package/dist/types/uikit/Badge/_types.d.ts +5 -2
  233. package/dist/types/uikit/CheckBox/_types.d.ts +5 -2
  234. package/dist/types/uikit/DivInput/_types.d.ts +4 -2
  235. package/dist/types/uikit/DocIcon/_types.d.ts +5 -2
  236. package/dist/types/uikit/Dot/_types.d.ts +6 -2
  237. package/dist/types/uikit/DraggablePanel/DrggablePanel.d.ts +3 -2
  238. package/dist/types/uikit/DropDown/DropDown.d.ts +2 -1
  239. package/dist/types/uikit/DropDown/_types.d.ts +5 -2
  240. package/dist/types/uikit/EditorButtonBar/_types.d.ts +4 -2
  241. package/dist/types/uikit/ErrorSummary/ErrorSummary.d.ts +2 -1
  242. package/dist/types/uikit/ErrorSummary/_types.d.ts +5 -2
  243. package/dist/types/uikit/FlexDiv/FlexDiv.d.ts +59 -2
  244. package/dist/types/uikit/FlexDiv/_types.d.ts +8 -2
  245. package/dist/types/uikit/Grouper/_types.d.ts +6 -2
  246. package/dist/types/uikit/Icon/_types.d.ts +7 -2
  247. package/dist/types/uikit/Icon/iconRegistry.d.ts +1 -0
  248. package/dist/types/uikit/IconButton/_types.d.ts +4 -2
  249. package/dist/types/uikit/Logos/_types.d.ts +8 -4
  250. package/dist/types/uikit/MessageInput/InputField/_types.d.ts +5 -2
  251. package/dist/types/uikit/Overlay/_types.d.ts +5 -2
  252. package/dist/types/uikit/Pager/_types.d.ts +5 -2
  253. package/dist/types/uikit/Progress/DoneCheck/_types.d.ts +5 -2
  254. package/dist/types/uikit/Progress/ProgressIndicator/_types.d.ts +5 -2
  255. package/dist/types/uikit/RadioButton/_types.d.ts +5 -2
  256. package/dist/types/uikit/RadioButtonList/_types.d.ts +5 -2
  257. package/dist/types/uikit/Slider/_types.d.ts +5 -2
  258. package/dist/types/uikit/Spacer/_types.d.ts +5 -2
  259. package/dist/types/uikit/Switch/Switch.d.ts +1 -1
  260. package/dist/types/uikit/Switch/_types.d.ts +5 -4
  261. package/dist/types/uikit/TabBar/_types.d.ts +5 -2
  262. package/dist/types/uikit/TextArea/_types.d.ts +5 -2
  263. package/dist/types/uikit/Textfield/_types.d.ts +4 -2
  264. package/dist/types/uikit/Tip/Tip.d.ts +3 -0
  265. package/dist/types/uikit/Tip/_types.d.ts +28 -0
  266. package/dist/types/uikit/Tip/index.d.ts +2 -0
  267. package/dist/types/uikit/Toast/Toast.d.ts +3 -0
  268. package/dist/types/uikit/Toast/_types.d.ts +24 -0
  269. package/dist/types/uikit/Toast/index.d.ts +2 -0
  270. package/dist/types/uikit/UIButton/UIButton.d.ts +73 -2
  271. package/dist/types/uikit/UIButton/_types.d.ts +4 -2
  272. package/dist/types/uikit/UIButtonBar/_types.d.ts +5 -2
  273. package/dist/types/uikit/UICard/_types.d.ts +5 -2
  274. package/dist/types/uikit/UIChip/_types.d.ts +4 -2
  275. package/dist/types/uikit/UIFileIcon/UIFileIcon.d.ts +1 -1
  276. package/dist/types/uikit/UIFileIcon/_types.d.ts +4 -2
  277. package/dist/types/uikit/UILabel/_types.d.ts +4 -2
  278. package/dist/types/util/utils.d.ts +12 -0
  279. package/package.json +80 -5
  280. package/dist/colors.css +0 -237
  281. package/dist/index.esm.js +0 -4831
  282. package/dist/index.esm.js.map +0 -1
  283. package/dist/index.js +0 -4873
  284. package/dist/index.js.map +0 -1
  285. package/dist/type.css +0 -16
  286. package/dist/types/hooks/useMayaTheme.d.ts +0 -7
  287. package/dist/types/hooks/useTheme.d.ts +0 -2
  288. package/dist/types/uikit/Avatar/AvatarInline.stories.d.ts +0 -7
  289. /package/dist/{flexBox.module.css → css/flexBox.module.css} +0 -0
  290. /package/dist/{type.module.css → css/type.module.css} +0 -0
  291. /package/dist/types/hooks/{useTrackRenders.d.ts → useTrackRenders/useTrackRenders.d.ts} +0 -0
@@ -0,0 +1,244 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-4H29ixHs.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var React = require('react');
6
+ var hooks_useTheme = require('../hooks/useTheme.js');
7
+ require('../theme/colors.js');
8
+ require('../hooks/useWindow.js');
9
+ var hooks_useObserveResize = require('../hooks/useObserveResize.js');
10
+ var DropDown = require('./DropDown-D9sf_m2I.js');
11
+ var IconButton = require('./IconButton-BfsPlKTb.js');
12
+ var styleInject_es = require('./style-inject.es-XZHJH68X.js');
13
+
14
+ var css_248z = ".flexBox-module_row__PWxbe {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__27lKK {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__nJZnW {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__dHcOU {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__MP2Xd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__Kg8cV {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__zcmtk {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__157yI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__u2nwI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\n.EditorButtonBar-module_wrapper__mfv-c {\n\twidth: 100%;\n}\n\n.EditorButtonBar-module_right__G2tBZ {\n}\n\n.EditorButtonBar-module_left__9omfV {\n\tflex: 1;\n}\n\n.EditorButtonBar-module_buttonGroup__p0aEd {\n\tgap: 4px;\n\tdiv.EditorButtonBar-module_divider__T5y5c {\n\t\theight: 20px;\n\t\tmin-height: 100%;\n\t\twidth: 1px;\n\t\tmin-width: 1px;\n\t\tmax-width: 1px;\n\t\tbackground: var(--core-surface-secondary);\n\t\tmargin: 0 8px;\n\t}\n}\n";
15
+ var css = {"wrapper":"EditorButtonBar-module_wrapper__mfv-c flexBox-module_rowStart__nJZnW","right":"EditorButtonBar-module_right__G2tBZ flexBox-module_rowStart__nJZnW","left":"EditorButtonBar-module_left__9omfV flexBox-module_rowStart__nJZnW","buttonGroup":"EditorButtonBar-module_buttonGroup__p0aEd flexBox-module_rowStart__nJZnW"};
16
+ styleInject_es.styleInject(css_248z);
17
+
18
+ var FormattingOption;
19
+ (function (FormattingOption) {
20
+ FormattingOption["hilight"] = "hilight";
21
+ FormattingOption["bold"] = "bold";
22
+ FormattingOption["italic"] = "italic";
23
+ FormattingOption["underline"] = "underline";
24
+ FormattingOption["strikethrough"] = "strikethrough";
25
+ FormattingOption["list"] = "list";
26
+ FormattingOption["orderedList"] = "ordered list";
27
+ FormattingOption["taskList"] = "task list";
28
+ FormattingOption["sinkList"] = "sink list";
29
+ FormattingOption["raiseList"] = "raise list";
30
+ FormattingOption["undo"] = "undo";
31
+ FormattingOption["redo"] = "redo";
32
+ FormattingOption["download"] = "download";
33
+ FormattingOption["more"] = "more";
34
+ FormattingOption["copy"] = "copy";
35
+ FormattingOption["link"] = "link";
36
+ })(FormattingOption || (FormattingOption = {}));
37
+
38
+ const coreButtons = {
39
+ link: {
40
+ icon: 'link',
41
+ toolTip: 'Link',
42
+ command: 'link',
43
+ id: FormattingOption.link,
44
+ },
45
+ hilight: {
46
+ icon: 'hilight',
47
+ toolTip: 'Highlight',
48
+ command: 'hilight',
49
+ id: FormattingOption.hilight,
50
+ },
51
+ bold: {
52
+ icon: 'bold',
53
+ toolTip: 'Bold',
54
+ command: 'bold',
55
+ id: FormattingOption.bold,
56
+ shortcut: { modifier: 'meta', key: 'b' },
57
+ },
58
+ italic: {
59
+ icon: 'italic',
60
+ toolTip: 'Italic',
61
+ command: 'italic',
62
+ id: FormattingOption.italic,
63
+ shortcut: { modifier: 'meta', key: 'i' },
64
+ },
65
+ underline: {
66
+ icon: 'underline',
67
+ toolTip: 'Underline',
68
+ command: 'underline',
69
+ id: FormattingOption.underline,
70
+ shortcut: { modifier: 'meta', key: 'u' },
71
+ },
72
+ strikethrough: {
73
+ icon: 'strike',
74
+ toolTip: 'Strikethrough',
75
+ command: 'strike',
76
+ id: FormattingOption.strikethrough,
77
+ shortcut: { modifier: 'meta', key: 's' },
78
+ },
79
+ list: {
80
+ icon: 'bullet list',
81
+ toolTip: 'List',
82
+ command: 'ulist',
83
+ id: FormattingOption.list,
84
+ },
85
+ orderedList: {
86
+ icon: 'numbered list',
87
+ toolTip: 'Ordered list',
88
+ command: 'olist',
89
+ id: FormattingOption.orderedList,
90
+ },
91
+ taskList: {
92
+ icon: 'task list',
93
+ toolTip: 'Task list',
94
+ command: 'task',
95
+ id: FormattingOption.taskList,
96
+ },
97
+ sinkList: {
98
+ icon: 'sink',
99
+ toolTip: 'Sink list item',
100
+ command: 'sink',
101
+ id: FormattingOption.sinkList,
102
+ },
103
+ raiseList: {
104
+ icon: 'lift',
105
+ toolTip: 'Raise list item',
106
+ command: 'raise',
107
+ id: FormattingOption.raiseList,
108
+ },
109
+ undo: {
110
+ icon: 'undo',
111
+ toolTip: 'Undo',
112
+ command: 'undo',
113
+ id: FormattingOption.undo,
114
+ },
115
+ redo: {
116
+ icon: 'redo',
117
+ toolTip: 'Redo',
118
+ command: 'redo',
119
+ id: FormattingOption.redo,
120
+ },
121
+ copy: {
122
+ icon: 'copy',
123
+ toolTip: 'Copy',
124
+ command: 'copy',
125
+ id: FormattingOption.copy,
126
+ },
127
+ download: {
128
+ icon: 'download',
129
+ toolTip: 'Download',
130
+ command: 'download',
131
+ id: FormattingOption.download,
132
+ },
133
+ more: {
134
+ icon: 'more',
135
+ toolTip: 'More Options',
136
+ command: 'more',
137
+ id: FormattingOption.more,
138
+ },
139
+ };
140
+ const styles = [
141
+ { label: 'Heading 1', value: 'h1', alt: 'h1' },
142
+ { label: 'Heading 2', value: 'h2', alt: 'h2' },
143
+ { label: 'Heading 3', value: 'h3', alt: 'h3' },
144
+ { label: 'Body', value: 'p', alt: 'p' },
145
+ ];
146
+ const buttonGroups = {
147
+ format: {
148
+ buttons: [
149
+ coreButtons.hilight,
150
+ coreButtons.bold,
151
+ coreButtons.italic,
152
+ coreButtons.underline,
153
+ coreButtons.strikethrough,
154
+ coreButtons.link,
155
+ ],
156
+ },
157
+ lists: {
158
+ buttons: [coreButtons.list, coreButtons.orderedList, coreButtons.taskList],
159
+ },
160
+ listEdit: {
161
+ buttons: [coreButtons.sinkList, coreButtons.raiseList],
162
+ },
163
+ undo: {
164
+ buttons: [coreButtons.undo, coreButtons.redo],
165
+ },
166
+ more: {
167
+ buttons: [coreButtons.more],
168
+ },
169
+ };
170
+ const editControls = {
171
+ regular: {
172
+ styles,
173
+ buttons: [
174
+ buttonGroups.format,
175
+ buttonGroups.lists,
176
+ buttonGroups.listEdit,
177
+ buttonGroups.undo,
178
+ ],
179
+ download: coreButtons.download,
180
+ },
181
+ small: {
182
+ buttons: [buttonGroups.format, buttonGroups.more],
183
+ download: coreButtons.download,
184
+ },
185
+ medium: {
186
+ styles,
187
+ buttons: [buttonGroups.format, buttonGroups.lists],
188
+ download: coreButtons.download,
189
+ },
190
+ };
191
+
192
+ const EditorButtonBar = React.memo((props) => {
193
+ var _a;
194
+ const { onCommand = () => null, onToolTip = () => null, shortSize = 500, mediumSize = 664, state = 'auto', activeStyle = 'p', disabledFormats = [], activeFormats } = props, divAttributes = tslib_es6.__rest(props, ["onCommand", "onToolTip", "shortSize", "mediumSize", "state", "activeStyle", "disabledFormats", "activeFormats"]);
195
+ const { id: divId, className, style } = divAttributes, rest = tslib_es6.__rest(divAttributes, ["id", "className", "style"]);
196
+ const divStyle = style !== null && style !== void 0 ? style : {};
197
+ const divClass = className ? ` ${className}` : '';
198
+ const [barState, setBarState] = React.useState('regular');
199
+ const ref = React.useRef(null);
200
+ const size = hooks_useObserveResize.useObserveResize(ref);
201
+ React.useEffect(() => {
202
+ if (state !== 'auto')
203
+ setBarState(state);
204
+ else if (size.width < shortSize)
205
+ setBarState('small');
206
+ else if (size.width < mediumSize)
207
+ setBarState('medium');
208
+ else
209
+ setBarState('regular');
210
+ }, [size, shortSize, mediumSize, state]);
211
+ const handleStyleChange = React.useCallback((option) => {
212
+ switch (option.value) {
213
+ case 'h1':
214
+ onCommand('h1', undefined);
215
+ break;
216
+ case 'h2':
217
+ onCommand('h2', undefined);
218
+ break;
219
+ case 'h3':
220
+ onCommand('h3', undefined);
221
+ break;
222
+ case 'p':
223
+ onCommand('p', undefined);
224
+ break;
225
+ }
226
+ }, [onCommand]);
227
+ return (jsxRuntime.jsxs("div", Object.assign({ id: divId, className: `${css.wrapper}${divClass}`, style: divStyle, ref: ref }, rest, { children: [jsxRuntime.jsxs("div", { className: css.left, children: [(editControls === null || editControls === void 0 ? void 0 : editControls[barState].styles) && (jsxRuntime.jsx(DropDown.DropDown, { options: editControls === null || editControls === void 0 ? void 0 : editControls[barState].styles, placeholder: false, unframed: true, width: '100px', selectedValue: activeStyle, onChange: (_index, option) => handleStyleChange(option) })), (_a = editControls === null || editControls === void 0 ? void 0 : editControls[barState].buttons) === null || _a === void 0 ? void 0 : _a.map((group, index) => {
228
+ return (jsxRuntime.jsx(RenderGroup, { onCommand: onCommand, onToolTip: onToolTip, buttonGroup: group, activeFormats: activeFormats, disabledFormats: disabledFormats, state: barState }, `button-group-${group.name}${index}`));
229
+ })] }), (editControls === null || editControls === void 0 ? void 0 : editControls[barState].download) && (jsxRuntime.jsxs("div", { className: css.right, children: [jsxRuntime.jsx(IconButton.IconButton, { icon: coreButtons.copy.icon, tooltip: coreButtons.copy.toolTip, hover: disabledFormats.includes('download'), toggle: false, onToolTip: onToolTip, disabled: disabledFormats.includes('copy'), onClick: (e) => onCommand(coreButtons.copy.command, e) }), jsxRuntime.jsx(IconButton.IconButton, { icon: coreButtons.download.icon, tooltip: coreButtons.download.toolTip, hover: !disabledFormats.includes('download'), toggle: false, onToolTip: onToolTip, disabled: disabledFormats.includes('download'), onClick: (e) => onCommand(coreButtons.download.command, e) })] }))] })));
230
+ });
231
+ const RenderGroup = React.memo((props) => {
232
+ var _a;
233
+ const { onCommand = () => null, onToolTip = () => null, buttonGroup, activeFormats, state = 'default', disabledFormats = [], } = props;
234
+ const theme = hooks_useTheme.useTheme();
235
+ return (jsxRuntime.jsxs("div", { className: css.buttonGroup, children: [state !== 'small' && jsxRuntime.jsx("div", { className: "divider" }), (_a = buttonGroup === null || buttonGroup === void 0 ? void 0 : buttonGroup.buttons) === null || _a === void 0 ? void 0 : _a.map((button, index) => {
236
+ const active = (button === null || button === void 0 ? void 0 : button.id) ? activeFormats === null || activeFormats === void 0 ? void 0 : activeFormats.includes(button.id) : false;
237
+ const bgColor = active
238
+ ? theme.current.colors['core-surface-secondary']
239
+ : 'transparent';
240
+ return (jsxRuntime.jsx(IconButton.IconButton, { icon: button === null || button === void 0 ? void 0 : button.icon, tooltip: button === null || button === void 0 ? void 0 : button.toolTip, onToolTip: onToolTip, hover: !disabledFormats.includes(button.id || 'none'), toggle: false, bgColor: bgColor, onClick: (e) => onCommand(button === null || button === void 0 ? void 0 : button.command, e), disabled: disabledFormats.includes(button.id || 'none'), frameSize: 30, iconSize: 20 }, `button-${button === null || button === void 0 ? void 0 : button.icon}-${index}`));
241
+ })] }));
242
+ });
243
+
244
+ exports.EditorButtonBar = EditorButtonBar;
@@ -0,0 +1,42 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-4H29ixHs.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('motion/react');
6
+ var React = require('react');
7
+ var styleInject_es = require('./style-inject.es-XZHJH68X.js');
8
+
9
+ var css_248z = ".flexBox-module_row__PWxbe {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__27lKK {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__nJZnW {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__dHcOU {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__MP2Xd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__Kg8cV {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__zcmtk {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__157yI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__u2nwI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__QWEzl {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__FxEAv {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__rf7AV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__8-FO- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__qyYq- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__7GQ5Z {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__Qtp5G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__Ieh9K {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__0lZ3I {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__Ar4d3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__6tV1n {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__I8Q1v {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.ErrorSummary-module_errorBox__-R7XM {\n\twidth: 100%;\n\tbackground: var(--core-surface-secondary);\n\tcolor: var(--feedback-warning);\n\tborder: 1px solid var(--feedback-warning);\n\tborder-radius: 4px;\n\tpadding: 0 16px 16px 16px !important;\n\toverflow: hidden;\n\tmargin-bottom: 44px !important;\n}\n\n.ErrorSummary-module_error__YCQLh {\n\twidth: 100%;\n}\n\n.ErrorSummary-module_p__lbLpS {\n\tmargin: 0;\n\tpadding: 16px 0 0 0;\n}\n\n.ErrorSummary-module_strong__XVtAe {\n}\n\n.ErrorSummary-module_ul__d0xoc {\n\tlist-style-type: none;\n\tlist-style-position: outside;\n\tmargin: 0;\n\tpadding: 0;\n}\n\n.ErrorSummary-module_li__jym6S {\n\tmargin: 3px 0 3px 0;\n\tline-height: 1.2em;\n\tpadding: 0;\n}\n";
10
+ var css = {"errorBox":"ErrorSummary-module_errorBox__-R7XM flexBox-module_columnStart__Kg8cV type-module_body-m-regular__Qtp5G","error":"ErrorSummary-module_error__YCQLh flexBox-module_columnStart__Kg8cV","p":"ErrorSummary-module_p__lbLpS type-module_body-m-regular__Qtp5G","strong":"ErrorSummary-module_strong__XVtAe type-module_body-m-bold__0lZ3I","ul":"ErrorSummary-module_ul__d0xoc","li":"ErrorSummary-module_li__jym6S type-module_body-m-regular__Qtp5G"};
11
+ styleInject_es.styleInject(css_248z);
12
+
13
+ const ErrorSummary = React.memo((props) => {
14
+ const { entries, errors = [] } = props, divAttributes = tslib_es6.__rest(props, ["entries", "errors"]);
15
+ const { id: divId, className, style } = divAttributes, rest = tslib_es6.__rest(divAttributes, ["id", "className", "style"]);
16
+ const divStyle = style !== null && style !== void 0 ? style : {};
17
+ const divClass = className ? ` ${className}` : '';
18
+ // memo animation variants
19
+ const variants = React.useMemo(() => ({
20
+ enter: { opacity: 0, maxHeight: 0 },
21
+ animate: { opacity: 1, maxHeight: 500 },
22
+ exit: { opacity: 0, maxHeight: 0 },
23
+ }), []);
24
+ // memo trans
25
+ const transition = React.useMemo(() => ({ ease: 'easeInOut', duration: 0.25 }), []);
26
+ const renderedErrors = React.useMemo(() => {
27
+ if (!entries)
28
+ return null;
29
+ return entries.map((error, index) => {
30
+ var _a;
31
+ if (errors.includes(index) || errors.includes(error.id)) {
32
+ return (jsxRuntime.jsxs("div", { className: css.error, children: [jsxRuntime.jsx("p", { className: css.p, children: jsxRuntime.jsx("strong", { className: css.strong, children: error.title }) }), jsxRuntime.jsx("ul", { className: css.ul, children: (_a = error.bullets) === null || _a === void 0 ? void 0 : _a.map((bullet, index) => {
33
+ return (jsxRuntime.jsx("li", { className: css.li, children: bullet }, `${error.title}_bullet_${index}`));
34
+ }) })] }, `${error.id}_${index}`));
35
+ }
36
+ return null;
37
+ });
38
+ }, [entries, errors]);
39
+ return (jsxRuntime.jsx(react.AnimatePresence, { initial: false, children: entries && errors && errors.length > 0 && (jsxRuntime.jsx(react.motion.div, Object.assign({ id: divId, className: `${css.errorBox}${divClass}`, style: divStyle, initial: 'enter', animate: 'animate', exit: 'exit', variants: variants, transition: transition }, rest, { children: renderedErrors }))) }));
40
+ });
41
+
42
+ exports.ErrorSummary = ErrorSummary;
@@ -0,0 +1,103 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-4H29ixHs.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('motion/react');
6
+ var React = require('react');
7
+ var styleInject_es = require('./style-inject.es-XZHJH68X.js');
8
+
9
+ var css_248z = ".type-module_body-xs-regular__QWEzl {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__FxEAv {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__rf7AV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__8-FO- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__qyYq- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__7GQ5Z {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__Qtp5G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__Ieh9K {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__0lZ3I {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__Ar4d3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__6tV1n {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__I8Q1v {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.FlexDiv-module_flexDiv__VNfVQ {\n\t&::-webkit-scrollbar {\n\t\tbackground-color: var(--flex-div-bg);\n\t\twidth: 14px;\n\t}\n\n\t&::-webkit-scrollbar-track {\n\t\tbackground-color: var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb {\n\t\tbackground-color: var(--flex-div-scroll-handle);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t}\n\n\t&::-webkit-scrollbar-thumb:hover {\n\t\tbackground-color: var(--flex-div-scroll-handle-hover);\n\t\tborder-radius: 20px;\n\t\tborder: 4px solid var(--flex-div-scroll-border);\n\t\tcursor: default;\n\t}\n}\n";
10
+ var css = {"flexDiv":"FlexDiv-module_flexDiv__VNfVQ type-module_body-m-regular__Qtp5G"};
11
+ styleInject_es.styleInject(css_248z);
12
+
13
+ // Extract helper functions outside component
14
+ function setSize(style, isHeight) {
15
+ if (typeof style === 'number')
16
+ return `${style}px`;
17
+ if (style === 'grow')
18
+ return 'unset';
19
+ if (style === 'fill')
20
+ return '100%';
21
+ if (style === 'fit')
22
+ return 'auto';
23
+ if (style === 'viewport')
24
+ return isHeight ? '100vh' : '100vw';
25
+ return style;
26
+ }
27
+ function setBox(style) {
28
+ if (typeof style === 'number')
29
+ return `${style}px`;
30
+ return style;
31
+ }
32
+ function setFlex(style) {
33
+ if (style === 'start' || style === 'top')
34
+ return 'flex-start';
35
+ if (style === 'end' || style === 'bottom')
36
+ return 'flex-end';
37
+ if (style === 'between')
38
+ return 'space-between';
39
+ return style;
40
+ }
41
+ const FlexDiv = React.memo(React.forwardRef((props, ref) => {
42
+ const { children, scrollY = false, scrollX = false, background = 'var(--core-surface-primary)', direction = 'column', alignItems = 'start', justify = 'start', height = 'fit', width = 'fill', maxWidth = undefined, centerSelf = undefined, wrap = false, reverse = false, padding = 0, margin = 0, absolute = false, flex, gap, variants, transition, animate, enter, exit, border, borderRadius, className, scrollHandle, scrollHandleHover } = props, divAttributes = tslib_es6.__rest(props, ["children", "scrollY", "scrollX", "background", "direction", "alignItems", "justify", "height", "width", "maxWidth", "centerSelf", "wrap", "reverse", "padding", "margin", "absolute", "flex", "gap", "variants", "transition", "animate", "enter", "exit", "border", "borderRadius", "className", "scrollHandle", "scrollHandleHover"]);
43
+ const { id: divId, style: userStyle } = divAttributes, rest = tslib_es6.__rest(divAttributes, ["id", "style"]);
44
+ const wrapperStyle = userStyle !== null && userStyle !== void 0 ? userStyle : {};
45
+ // Memoize layout
46
+ const style = React.useMemo(() => {
47
+ return {
48
+ display: 'flex',
49
+ position: `${absolute ? 'absolute' : 'relative'}`,
50
+ flexDirection: `${direction}${reverse ? '-reverse' : ''}`,
51
+ flexWrap: `${wrap ? 'wrap' : 'nowrap'}`,
52
+ justifyContent: `${setFlex(justify)}`,
53
+ alignItems: `${setFlex(alignItems)}`,
54
+ boxSizing: 'border-box',
55
+ padding: `${setBox(padding)}`,
56
+ margin: centerSelf ? '0 auto' : `${setBox(margin)}`,
57
+ width: `${absolute ? 'unset' : setSize(width, false)}`,
58
+ height: `${absolute ? 'unset' : setSize(height, true)}`,
59
+ maxWidth: `${maxWidth ? setSize(maxWidth, false) : 'unset'}`,
60
+ flex: `${absolute ? 'unset' : (flex !== null && flex !== void 0 ? flex : 'unset')}`,
61
+ top: `${absolute ? '0' : 'unset'}`,
62
+ bottom: `${absolute ? '0' : 'unset'}`,
63
+ left: `${absolute ? '0' : 'unset'}`,
64
+ right: `${absolute ? '0' : 'unset'}`,
65
+ gap: gap ? `${gap}px` : 'unset',
66
+ border: `${border !== null && border !== void 0 ? border : 'unset'}`,
67
+ background: `${background !== null && background !== void 0 ? background : 'transparent'}`,
68
+ overflow: 'hidden',
69
+ overflowY: `${scrollY ? 'auto' : 'unset'}`,
70
+ overflowX: `${scrollX ? 'auto' : 'unset'}`,
71
+ borderRadius: borderRadius ? `${borderRadius}px` : 'unset',
72
+ color: 'var(--core-text-primary)',
73
+ '--flex-div-scroll-border': `${background !== null && background !== void 0 ? background : 'transparent'}`,
74
+ '--flex-div-scroll-handle': `${scrollHandle !== null && scrollHandle !== void 0 ? scrollHandle : 'var(--scroll-bar)'}`,
75
+ '--flex-div-scroll-handle-hover': `${scrollHandleHover !== null && scrollHandleHover !== void 0 ? scrollHandleHover : 'var(--scroll-bar-hover)'}`,
76
+ };
77
+ }, [
78
+ absolute,
79
+ direction,
80
+ reverse,
81
+ wrap,
82
+ justify,
83
+ alignItems,
84
+ padding,
85
+ margin,
86
+ width,
87
+ height,
88
+ flex,
89
+ gap,
90
+ border,
91
+ background,
92
+ scrollY,
93
+ scrollX,
94
+ centerSelf,
95
+ maxWidth,
96
+ scrollHandle,
97
+ scrollHandleHover,
98
+ borderRadius,
99
+ ]);
100
+ return (jsxRuntime.jsx(react.motion.div, Object.assign({ id: divId, ref: ref, className: `${css.flexDiv} ${className !== null && className !== void 0 ? className : ''}`, style: Object.assign(Object.assign({}, wrapperStyle), style), transition: transition, variants: variants, initial: enter, animate: animate, exit: exit }, rest, { children: children })));
101
+ }));
102
+
103
+ exports.FlexDiv = FlexDiv;
@@ -0,0 +1,50 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-4H29ixHs.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('motion/react');
6
+ var React = require('react');
7
+ var hooks_useTheme = require('../hooks/useTheme.js');
8
+ require('../theme/colors.js');
9
+ require('../hooks/useWindow.js');
10
+ var Badge = require('./Badge-CMapJCij.js');
11
+ var _types = require('./_types-CoWzQFsT.js');
12
+ var styleInject_es = require('./style-inject.es-XZHJH68X.js');
13
+
14
+ var css_248z = ".flexBox-module_row__PWxbe {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__27lKK {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__nJZnW {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__dHcOU {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__MP2Xd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__Kg8cV {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__zcmtk {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__157yI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__u2nwI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__QWEzl {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__FxEAv {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__rf7AV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__8-FO- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__qyYq- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__7GQ5Z {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__Qtp5G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__Ieh9K {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__0lZ3I {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__Ar4d3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__6tV1n {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__I8Q1v {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.Grouper-module_header__NPgUW {\n\twidth: 100%;\n\tcursor: pointer;\n}\n\n.Grouper-module_title__-bt06 {\n\tcolor: var(--core-text-primary);\n\tflex: 1;\n}\n\n.Grouper-module_content__u2SN7 {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\tpadding: 0 24px !important;\n\twidth: 100%;\n\tgap: 6px;\n\theight: var(--grouper-height);\n\tborder-top: var(--grouper-border) solid var(--core-outline-primary);\n}\n\n.Grouper-module_icon__7YSLa {\n\tmin-height: var(--grouper-icon-size);\n\theight: var(--grouper-icon-size);\n\tmin-width: var(--grouper-icon-size);\n\twidth: var(--grouper-icon-size);\n}\n";
15
+ var css = {"header":"Grouper-module_header__NPgUW flexBox-module_rowBetween__27lKK","title":"Grouper-module_title__-bt06 flexBox-module_rowBetween__27lKK type-module_body-m-regular__Qtp5G","content":"Grouper-module_content__u2SN7 flexBox-module_rowBetween__27lKK","icon":"Grouper-module_icon__7YSLa flexBox-module_row__PWxbe"};
16
+ styleInject_es.styleInject(css_248z);
17
+
18
+ const Grouper = React.memo((props) => {
19
+ const { title = 'Group Title', toggle = true, open = true, hasIcon = true, iconName = 'chevron down', iconSize = 18, frameSize = 64, border = 0, count = 0, unframed = false, hideNull = true, showFilterBadge = false, onChange = () => null, onClick = () => null } = props, divAttributes = tslib_es6.__rest(props, ["title", "toggle", "open", "hasIcon", "iconName", "iconSize", "frameSize", "border", "count", "unframed", "hideNull", "showFilterBadge", "onChange", "onClick"]);
20
+ const { id: divId, className, style } = divAttributes, rest = tslib_es6.__rest(divAttributes, ["id", "className", "style"]);
21
+ const divStyle = style !== null && style !== void 0 ? style : {};
22
+ const divClass = className ? ` ${className}` : '';
23
+ const theme = hooks_useTheme.useTheme();
24
+ const [state, setState] = React.useState(open);
25
+ const [icon, animateIcon] = react.useAnimate();
26
+ React.useEffect(() => setState(open), [open]);
27
+ const animate = React.useCallback((state) => {
28
+ const animation = { rotate: state ? 0 : 180 };
29
+ animateIcon(icon.current, Object.assign({}, animation), { ease: 'easeInOut', duration: 0.25 });
30
+ }, [animateIcon, icon]);
31
+ const handleToggle = React.useCallback(() => {
32
+ if (!toggle)
33
+ return;
34
+ onClick();
35
+ onChange(!state);
36
+ animate(!state);
37
+ setState(!state);
38
+ }, [toggle, onClick, onChange, state, animate]);
39
+ // memo css vars
40
+ const cssVars = React.useMemo(() => {
41
+ return {
42
+ '--grouper-height': unframed ? 'auto' : `${frameSize}px`,
43
+ '--grouper-border': border ? `${border}px` : '0',
44
+ '--grouper-icon-size': `${iconSize}px`,
45
+ };
46
+ }, [frameSize, iconSize, border, unframed]);
47
+ return (jsxRuntime.jsx("div", Object.assign({ id: divId, className: `${css.header}${divClass}`, style: Object.assign(Object.assign({}, divStyle), cssVars), onClick: handleToggle, onKeyDown: handleToggle }, rest, { children: jsxRuntime.jsxs("div", { className: css.content, children: [jsxRuntime.jsxs("div", { className: css.title, children: [title, jsxRuntime.jsx(Badge.Badge, { hideNull: hideNull, count: count, variant: 'light' }), showFilterBadge && (jsxRuntime.jsx(_types.Icon, { name: "filter", size: 16, strokeColor: theme.current.colors['core-text-disabled'] }))] }), hasIcon && (jsxRuntime.jsx("div", { ref: icon, className: css.icon, children: jsxRuntime.jsx(_types.Icon, { name: iconName, size: iconSize }) }))] }) })));
48
+ });
49
+
50
+ exports.Grouper = Grouper;
@@ -0,0 +1,84 @@
1
+ 'use strict';
2
+
3
+ var tslib_es6 = require('./tslib.es6-4H29ixHs.js');
4
+ var jsxRuntime = require('react/jsx-runtime');
5
+ var react = require('motion/react');
6
+ var React = require('react');
7
+ var Badge = require('./Badge-CMapJCij.js');
8
+ var Dot = require('./Dot-Dnr9M9na.js');
9
+ var _types = require('./_types-CoWzQFsT.js');
10
+ var sharedTypes = require('./sharedTypes-BvTjh6M5.js');
11
+ var styleInject_es = require('./style-inject.es-XZHJH68X.js');
12
+
13
+ var css_248z = ".flexBox-module_row__PWxbe {\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowBetween__27lKK {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowStart__nJZnW {\n\tdisplay: flex;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_rowEnd__dHcOU {\n\tdisplay: flex;\n\tjustify-content: flex-end;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_column__MP2Xd {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: center;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStart__Kg8cV {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: flex-start;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnStartCenter__zcmtk {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-start;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnBetween__157yI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n\talign-items: center;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.flexBox-module_columnEnd__u2nwI {\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: flex-end;\n\talign-items: flex-end;\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}.type-module_body-xs-regular__QWEzl {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-medium__FxEAv {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-xs-bold__rf7AV {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-xs);\n\tline-height: 133.33%;\n\ttext-decoration: none;\n\tletter-spacing: 0.25px;\n}.type-module_body-s-regular__8-FO- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-medium__qyYq- {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-s-bold__7GQ5Z {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-s);\n\tline-height: 142.86%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-m-regular__Qtp5G {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-medium__Ieh9K {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_body-m-bold__0lZ3I {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-m);\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_body-l-regular__Ar4d3 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-regular);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-medium__6tV1n {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-medium);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.1px;\n}.type-module_body-l-bold__I8Q1v {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: var(--font-weight-bold);\n\tfont-size: var(--font-size-l);\n\tline-height: 162.5%;\n\ttext-decoration: none;\n\tletter-spacing: 0.15px;\n}.type-module_heading-s-bold__QFgN8 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-s-medium__jGIb2 {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 20px;\n\tline-height: 140%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-bold__tdBSi {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-m-medium__-7Uyu {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 24px;\n\tline-height: 116.67%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-medium__8hGYF {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 560;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}.type-module_heading-l-bold__Cryjg {\n\tfont-family: var(--font-family), sans-serif;\n\tfont-weight: 650;\n\tfont-size: 28px;\n\tline-height: 128.57%;\n\ttext-decoration: none;\n\tletter-spacing: 0.2px;\n}\n\n.IconButton-module_button__Mq4Gd {\n\tposition: relative;\n\tbackground: var(--ib-bg);\n\tborder-radius: var(--ib-border-radius);\n\tborder: var(--ib-border) solid var(--core-outline-primary);\n\tgap: 6px;\n\tcursor: pointer;\n\t&:hover {\n\t\tbackground: var(--ib-bg-hover);\n\t}\n}\n\n.IconButton-module_label__piWOE {\n\tcolor: var(--ib-color);\n\ttext-overflow: ellipsis;\n\toverflow: hidden;\n\tword-break: break-all;\n\tdisplay: -webkit-box;\n\t-webkit-line-clamp: 1;\n\t-webkit-box-orient: vertical;\n}\n\n.IconButton-module_icon__EQ8vW {\n\tmin-height: var(--ib-icon-size);\n\theight: var(--ib-icon-size);\n\tmin-width: var(--ib-icon-size);\n\twidth: var(--ib-icon-size);\n}\n\n.IconButton-module_count__BhOlH {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\ttransform: translateX(5px) translateY(-2px);\n}\n";
14
+ var css = {"button":"IconButton-module_button__Mq4Gd flexBox-module_row__PWxbe","label":"IconButton-module_label__piWOE flexBox-module_row__PWxbe type-module_body-l-regular__Ar4d3","icon":"IconButton-module_icon__EQ8vW flexBox-module_row__PWxbe","count":"IconButton-module_count__BhOlH flexBox-module_row__PWxbe"};
15
+ styleInject_es.styleInject(css_248z);
16
+
17
+ const IconButton = React.memo((props) => {
18
+ const { frameSize = 36, iconSize = 20, icon = 'more', borderRadius = 4, tooltip = undefined, color = undefined, colorOn = undefined, bgColor = 'var(--core-surface-secondary)', bgColorHover = 'var(--core-outline-primary)', bgColorOn = 'var(--core-outline-primary)', transition = undefined, variants = undefined, initial = undefined, animate = undefined, exit = undefined, fillColor = undefined, label = undefined, hover = undefined, count = 0, toggle = true, toggleIcon = false, isToggled = false, disabled = false, showDot = false, border = false, onClick = () => null, onToolTip = () => null } = props, divAttributes = tslib_es6.__rest(props, ["frameSize", "iconSize", "icon", "borderRadius", "tooltip", "color", "colorOn", "bgColor", "bgColorHover", "bgColorOn", "transition", "variants", "initial", "animate", "exit", "fillColor", "label", "hover", "count", "toggle", "toggleIcon", "isToggled", "disabled", "showDot", "border", "onClick", "onToolTip"]);
19
+ const { id: divId, className, style } = divAttributes, rest = tslib_es6.__rest(divAttributes, ["id", "className", "style"]);
20
+ const divStyle = style !== null && style !== void 0 ? style : {};
21
+ const divClass = className ? ` ${className}` : '';
22
+ const [on, setOn] = React.useState(isToggled);
23
+ const ref = React.useRef(null);
24
+ React.useEffect(() => setOn(isToggled), [isToggled]);
25
+ const handleClick = React.useCallback((e) => {
26
+ if (disabled)
27
+ return;
28
+ if (tooltip)
29
+ onToolTip(null);
30
+ setOn(!on);
31
+ onClick(e);
32
+ }, [disabled, tooltip, onToolTip, on, onClick]);
33
+ const handleMouseEnter = React.useCallback((e) => {
34
+ if (!(ref === null || ref === void 0 ? void 0 : ref.current) || !tooltip)
35
+ return;
36
+ const tip = {
37
+ type: sharedTypes.ToolTipType.button,
38
+ payload: { label: tooltip },
39
+ event: e,
40
+ ref: ref,
41
+ };
42
+ onToolTip(tip);
43
+ }, [tooltip, onToolTip]);
44
+ const handleMouseLeave = React.useCallback(() => {
45
+ if (tooltip)
46
+ onToolTip(null);
47
+ }, [tooltip, onToolTip]);
48
+ // memo icon stroke color
49
+ const strokeColor = React.useMemo(() => color || 'var(--core-icon-primary)', [color]);
50
+ // memo bg color
51
+ const bgColorNormal = React.useMemo(() => {
52
+ if (on && toggle)
53
+ return bgColorOn;
54
+ return bgColor !== null && bgColor !== void 0 ? bgColor : 'var(--core-surface-secondary)';
55
+ }, [toggle, bgColorOn, bgColor, on]);
56
+ // memo bg color on hover
57
+ const bgHoverColor = React.useMemo(() => {
58
+ if (hover && on)
59
+ return bgColorOn;
60
+ if (hover)
61
+ return bgColorHover;
62
+ return bgColor !== null && bgColor !== void 0 ? bgColor : 'transparent';
63
+ }, [hover, bgColor, bgColorOn, bgColorHover, on]);
64
+ // memo text color selected / unselected
65
+ const textColor = React.useMemo(() => {
66
+ if (toggle && on)
67
+ return colorOn;
68
+ return color !== null && color !== void 0 ? color : 'var(--core-text-primary)';
69
+ }, [toggle, on, colorOn, color]);
70
+ // memo css vars
71
+ const cssVars = React.useMemo(() => {
72
+ return {
73
+ '--ib-bg': bgColorNormal,
74
+ '--ib-bg-hover': bgHoverColor,
75
+ '--ib-icon-size': `${frameSize !== null && frameSize !== void 0 ? frameSize : 0}px`,
76
+ '--ib-border-radius': `${borderRadius !== null && borderRadius !== void 0 ? borderRadius : 0}px`,
77
+ '--ib-border': border ? '1px' : 0,
78
+ '--ib-color': textColor,
79
+ };
80
+ }, [bgColorNormal, bgHoverColor, textColor, border, frameSize, borderRadius]);
81
+ return (jsxRuntime.jsxs(react.motion.div, Object.assign({ id: divId, className: `${css.button}${divClass}`, style: Object.assign(Object.assign({}, divStyle), cssVars), onClick: handleClick, onMouseLeave: handleMouseLeave, onMouseEnter: handleMouseEnter, transition: transition, variants: variants, initial: initial, animate: animate, exit: exit, ref: ref }, rest, { children: [jsxRuntime.jsx("div", { className: css.icon, style: { opacity: disabled ? 0.3 : 1 }, children: jsxRuntime.jsx(_types.Icon, { name: icon, strokeColor: strokeColor, fillColor: fillColor, disabled: disabled, size: iconSize, toggle: toggleIcon ? isToggled : false, pointer: true }) }), label && jsxRuntime.jsx("div", { className: css.label, children: label }), jsxRuntime.jsx(Dot.Dot, { show: showDot }), count !== 0 && (jsxRuntime.jsx("div", { className: css.count, children: jsxRuntime.jsx(Badge.Badge, { variant: 'light', count: count, hideNull: true }) }))] })));
82
+ });
83
+
84
+ exports.IconButton = IconButton;