@helpdice/ui 1.7.4 → 1.7.7

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 (306) hide show
  1. package/dist/CurrencyInput/index.js +2981 -0
  2. package/dist/LinearProgress/index.d.ts +2 -0
  3. package/dist/{css-baseline → LinearProgress}/index.js +25 -317
  4. package/dist/LinearProgress/linear-progress.d.ts +9 -0
  5. package/dist/Loadable/index.js +570 -0
  6. package/dist/PhoneInput/index.js +2175 -22
  7. package/dist/PhoneInput/phone.d.ts +1 -1
  8. package/dist/Placeholder/index.js +2116 -254
  9. package/dist/auto-complete/index.js +2145 -652
  10. package/dist/avatar/index.js +2119 -333
  11. package/dist/badge/index.js +2117 -331
  12. package/dist/breadcrumbs/index.js +2126 -340
  13. package/dist/button/button.compact.d.ts +2 -0
  14. package/dist/button/index.js +2214 -342
  15. package/dist/button-dropdown/index.js +2120 -291
  16. package/dist/button-group/index.js +2117 -331
  17. package/dist/capacity/index.js +2117 -331
  18. package/dist/card/index.js +2127 -298
  19. package/dist/checkbox/index.js +2119 -290
  20. package/dist/code/index.js +2116 -297
  21. package/dist/collapse/index.js +2117 -475
  22. package/dist/description/index.js +2117 -331
  23. package/dist/display/index.js +2117 -331
  24. package/dist/divider/index.js +2118 -332
  25. package/dist/dot/index.js +2117 -331
  26. package/dist/drawer/index.js +2129 -439
  27. package/dist/fieldset/index.js +2121 -354
  28. package/dist/grid/index.js +2119 -333
  29. package/dist/image/index.js +2122 -336
  30. package/dist/index.d.ts +2 -14
  31. package/dist/index.js +3175 -1881
  32. package/dist/input/index.js +2125 -296
  33. package/dist/keyboard/index.js +2116 -297
  34. package/dist/link/index.js +2117 -331
  35. package/dist/list/index.js +2119 -333
  36. package/dist/loading/index.js +2117 -331
  37. package/dist/menu/index.js +77 -45
  38. package/dist/modal/index.js +2145 -452
  39. package/dist/note/index.js +2117 -331
  40. package/dist/page/index.js +2117 -331
  41. package/dist/pagination/index.js +2118 -351
  42. package/dist/popover/index.js +2123 -354
  43. package/dist/progress/index.js +2117 -331
  44. package/dist/radio/index.js +2120 -334
  45. package/dist/rating/index.js +2118 -332
  46. package/dist/row/index.js +2115 -296
  47. package/dist/select/index.js +2151 -688
  48. package/dist/slider/index.js +2123 -356
  49. package/dist/snippet/index.js +2118 -421
  50. package/dist/spacer/index.js +2115 -296
  51. package/dist/spinner/index.js +2117 -331
  52. package/dist/table/index.js +2341 -754
  53. package/dist/tabs/index.js +2123 -344
  54. package/dist/tag/index.js +2116 -254
  55. package/dist/text/index.js +2116 -297
  56. package/dist/textarea/index.js +2117 -288
  57. package/dist/toggle/index.js +2117 -331
  58. package/dist/tooltip/index.js +2120 -351
  59. package/dist/tree/index.js +2123 -459
  60. package/dist/use-input/index.js +2122 -24
  61. package/dist/use-modal/index.js +2122 -24
  62. package/dist/use-network-status/index.d.ts +2 -0
  63. package/dist/{use-current-state → use-network-status}/index.js +22 -15
  64. package/dist/use-network-status/use-netowork-status.d.ts +4 -0
  65. package/dist/use-scale/index.js +2115 -296
  66. package/dist/use-tabs/index.js +2122 -24
  67. package/dist/user/index.js +2123 -337
  68. package/esm/CurrencyInput/components/CurrencyInput.js +342 -0
  69. package/esm/CurrencyInput/components/CurrencyInputProps.js +1 -0
  70. package/esm/CurrencyInput/components/utils/addSeparators.js +7 -0
  71. package/esm/CurrencyInput/components/utils/cleanValue.js +69 -0
  72. package/esm/CurrencyInput/components/utils/escapeRegExp.js +8 -0
  73. package/esm/CurrencyInput/components/utils/fixedDecimalValue.js +29 -0
  74. package/esm/CurrencyInput/components/utils/formatValue.js +124 -0
  75. package/esm/CurrencyInput/components/utils/getLocaleConfig.js +47 -0
  76. package/esm/CurrencyInput/components/utils/getSuffix.js +10 -0
  77. package/esm/CurrencyInput/components/utils/index.js +8 -0
  78. package/esm/CurrencyInput/components/utils/isNumber.js +3 -0
  79. package/esm/CurrencyInput/components/utils/padTrimValue.js +27 -0
  80. package/esm/CurrencyInput/components/utils/parseAbbrValue.js +43 -0
  81. package/esm/CurrencyInput/components/utils/removeInvalidChars.js +10 -0
  82. package/esm/CurrencyInput/components/utils/removeSeparators.js +10 -0
  83. package/esm/CurrencyInput/components/utils/repositionCursor.js +35 -0
  84. package/esm/CurrencyInput/index.js +4 -0
  85. package/esm/LinearProgress/index.d.ts +2 -0
  86. package/esm/LinearProgress/index.js +2 -0
  87. package/esm/LinearProgress/linear-progress.d.ts +9 -0
  88. package/esm/LinearProgress/linear-progress.js +28 -0
  89. package/esm/Loadable/index.js +2 -0
  90. package/esm/PhoneInput/phone.d.ts +1 -1
  91. package/esm/PhoneInput/phone.js +23 -20
  92. package/esm/auto-complete/auto-complete-dropdown.js +1 -3
  93. package/esm/auto-complete/auto-complete-item.js +1 -3
  94. package/esm/auto-complete/auto-complete-searching.js +1 -1
  95. package/esm/auto-complete/auto-complete.js +1 -1
  96. package/esm/avatar/avatar-group.js +1 -2
  97. package/esm/avatar/avatar.js +1 -2
  98. package/esm/badge/badge.js +1 -2
  99. package/esm/breadcrumbs/breadcrumbs-item.js +1 -1
  100. package/esm/breadcrumbs/breadcrumbs-separator.js +1 -1
  101. package/esm/breadcrumbs/breadcrumbs.js +1 -1
  102. package/esm/button/button-icon.js +1 -1
  103. package/esm/button/button.compact.d.ts +2 -0
  104. package/esm/button/button.compact.js +94 -50
  105. package/esm/button/button.js +1 -2
  106. package/esm/button/utils.js +1 -1
  107. package/esm/button-dropdown/button-dropdown-item.js +1 -1
  108. package/esm/button-dropdown/button-dropdown.js +1 -2
  109. package/esm/button-group/button-group.js +1 -2
  110. package/esm/capacity/capacity.js +1 -2
  111. package/esm/card/card-content.js +1 -1
  112. package/esm/card/card-footer.js +1 -2
  113. package/esm/card/card.js +1 -2
  114. package/esm/carousal/Arrow.js +18 -0
  115. package/esm/carousal/Indicator.js +20 -0
  116. package/esm/carousal/Thumbs.js +302 -0
  117. package/esm/carousal/animations.js +162 -0
  118. package/esm/carousal/index.js +683 -0
  119. package/esm/carousal/types.js +1 -0
  120. package/esm/carousal/utils.js +49 -0
  121. package/esm/checkbox/checkbox-group.js +1 -1
  122. package/esm/checkbox/checkbox.icon.js +1 -1
  123. package/esm/checkbox/checkbox.js +1 -2
  124. package/esm/code/code.js +1 -1
  125. package/esm/collapse/collapse-group.js +1 -2
  126. package/esm/collapse/collapse.js +1 -4
  127. package/esm/description/description.js +1 -2
  128. package/esm/display/display.js +1 -2
  129. package/esm/divider/divider.js +1 -2
  130. package/esm/dot/dot.js +1 -2
  131. package/esm/drawer/drawer-wrapper.js +1 -3
  132. package/esm/drawer/drawer.js +1 -1
  133. package/esm/fieldset/fieldset-content.js +1 -1
  134. package/esm/fieldset/fieldset-footer.js +1 -1
  135. package/esm/fieldset/fieldset-group.js +1 -3
  136. package/esm/fieldset/fieldset-title.js +1 -1
  137. package/esm/fieldset/fieldset.js +1 -2
  138. package/esm/grid/basic-item.js +1 -2
  139. package/esm/grid/grid-container.js +1 -1
  140. package/esm/grid/grid.js +1 -1
  141. package/esm/image/image-browser.js +1 -2
  142. package/esm/image/image.js +1 -2
  143. package/esm/image/image.skeleton.js +1 -1
  144. package/esm/index.d.ts +2 -14
  145. package/esm/index.js +5 -9
  146. package/esm/input/input-block-label.js +1 -1
  147. package/esm/input/input-icon-clear.js +1 -2
  148. package/esm/input/input-label.js +1 -1
  149. package/esm/input/input.js +1 -2
  150. package/esm/keyboard/keyboard.js +1 -1
  151. package/esm/link/link.js +1 -2
  152. package/esm/list/list-item.js +1 -2
  153. package/esm/loading/loading.js +1 -2
  154. package/esm/modal/modal-action.js +1 -2
  155. package/esm/modal/modal-actions.js +1 -1
  156. package/esm/modal/modal-content.js +1 -1
  157. package/esm/modal/modal-subtitle.js +1 -1
  158. package/esm/modal/modal-title.js +1 -1
  159. package/esm/modal/modal-wrapper.js +1 -3
  160. package/esm/modal/modal.js +1 -1
  161. package/esm/note/note.js +1 -2
  162. package/esm/page/page-header.js +1 -1
  163. package/esm/page/page.js +1 -1
  164. package/esm/pagination/pagination-item.js +1 -2
  165. package/esm/pagination/pagination.js +1 -1
  166. package/esm/popover/popover-item.js +1 -2
  167. package/esm/popover/popover.js +1 -1
  168. package/esm/progress/progress.js +1 -2
  169. package/esm/radio/radio-description.js +1 -1
  170. package/esm/radio/radio-group.js +1 -1
  171. package/esm/radio/radio.js +1 -2
  172. package/esm/rating/rating.js +1 -2
  173. package/esm/row/row.js +1 -1
  174. package/esm/select/select-dropdown.js +1 -3
  175. package/esm/select/select-icon-clear.js +1 -1
  176. package/esm/select/select-multiple-value.js +1 -1
  177. package/esm/select/select-option.js +1 -3
  178. package/esm/select/select.js +9 -12
  179. package/esm/slider/slider-dot.js +1 -2
  180. package/esm/slider/slider-mark.js +1 -1
  181. package/esm/slider/slider.js +1 -3
  182. package/esm/snippet/snippet.js +1 -3
  183. package/esm/spinner/spinner.js +1 -2
  184. package/esm/table/table-body.js +1 -2
  185. package/esm/table/table-head.js +3 -2
  186. package/esm/tabs/tabs-item.js +1 -2
  187. package/esm/tabs/tabs.js +1 -3
  188. package/esm/tag/tag.js +1 -1
  189. package/esm/text/child.js +1 -1
  190. package/esm/textarea/textarea.js +1 -2
  191. package/esm/toggle/toggle.js +1 -2
  192. package/esm/tooltip/tooltip-content.js +1 -3
  193. package/esm/tooltip/tooltip-icon.js +1 -1
  194. package/esm/tooltip/tooltip.js +1 -1
  195. package/esm/tree/tree-file-icon.js +1 -1
  196. package/esm/tree/tree-file.js +1 -2
  197. package/esm/tree/tree-folder-icon.js +1 -1
  198. package/esm/tree/tree-folder.js +1 -3
  199. package/esm/tree/tree-status-icon.js +1 -1
  200. package/esm/tree/tree.js +1 -1
  201. package/esm/use-input/use-input.js +1 -1
  202. package/esm/use-modal/use-modal.js +1 -1
  203. package/esm/use-network-status/index.d.ts +2 -0
  204. package/esm/use-network-status/index.js +2 -0
  205. package/esm/use-network-status/use-netowork-status.d.ts +4 -0
  206. package/esm/use-network-status/use-netowork-status.js +29 -0
  207. package/esm/use-scale/with-scale.js +1 -1
  208. package/esm/use-tabs/use-tabs.js +1 -1
  209. package/esm/user/user.js +1 -2
  210. package/esm/utils/use-context-state/use-context-state.js +1 -1
  211. package/esm/utils/use-drag.js +1 -1
  212. package/package.json +12 -4
  213. package/dist/css-baseline/css-baseline.d.ts +0 -9
  214. package/dist/css-baseline/index.d.ts +0 -1
  215. package/dist/shared/backdrop.d.ts +0 -14
  216. package/dist/shared/css-transition.d.ts +0 -13
  217. package/dist/shared/dropdown.d.ts +0 -9
  218. package/dist/shared/ellipsis.d.ts +0 -6
  219. package/dist/shared/expand.d.ts +0 -7
  220. package/dist/shared/highlight.d.ts +0 -13
  221. package/dist/ui-provider/index.d.ts +0 -3
  222. package/dist/ui-provider/index.js +0 -2186
  223. package/dist/ui-provider/theme-provider.d.ts +0 -8
  224. package/dist/ui-provider/ui-provider.d.ts +0 -8
  225. package/dist/use-all-themes/all-themes-context.d.ts +0 -7
  226. package/dist/use-all-themes/index.d.ts +0 -3
  227. package/dist/use-all-themes/index.js +0 -311
  228. package/dist/use-classes/index.d.ts +0 -2
  229. package/dist/use-classes/index.js +0 -48
  230. package/dist/use-classes/use-classes.d.ts +0 -4
  231. package/dist/use-current-state/index.d.ts +0 -2
  232. package/dist/use-current-state/use-current-state.d.ts +0 -4
  233. package/dist/use-media-query/index.d.ts +0 -3
  234. package/dist/use-media-query/index.js +0 -444
  235. package/dist/use-media-query/use-media-query.d.ts +0 -12
  236. package/dist/use-theme/index.d.ts +0 -2
  237. package/dist/use-theme/index.js +0 -309
  238. package/dist/use-theme/theme-context.d.ts +0 -4
  239. package/dist/use-toasts/helpers.d.ts +0 -18
  240. package/dist/use-toasts/index.d.ts +0 -3
  241. package/dist/use-toasts/index.js +0 -204
  242. package/dist/use-toasts/toast-container.d.ts +0 -3
  243. package/dist/use-toasts/toast-item.d.ts +0 -8
  244. package/dist/use-toasts/use-toast.d.ts +0 -40
  245. package/dist/utils/use-current-state.d.ts +0 -2
  246. package/dist/utils/use-dom-observer.d.ts +0 -3
  247. package/dist/utils/use-hd-ui-context.d.ts +0 -16
  248. package/dist/utils/use-previous.d.ts +0 -2
  249. package/esm/captcha/index.js +0 -128
  250. package/esm/css-baseline/css-baseline.d.ts +0 -9
  251. package/esm/css-baseline/css-baseline.js +0 -23
  252. package/esm/css-baseline/index.d.ts +0 -1
  253. package/esm/css-baseline/index.js +0 -2
  254. package/esm/shared/backdrop.d.ts +0 -14
  255. package/esm/shared/backdrop.js +0 -66
  256. package/esm/shared/css-transition.d.ts +0 -13
  257. package/esm/shared/css-transition.js +0 -65
  258. package/esm/shared/dropdown.d.ts +0 -9
  259. package/esm/shared/dropdown.js +0 -99
  260. package/esm/shared/ellipsis.d.ts +0 -6
  261. package/esm/shared/ellipsis.js +0 -13
  262. package/esm/shared/expand.d.ts +0 -7
  263. package/esm/shared/expand.js +0 -86
  264. package/esm/shared/highlight.d.ts +0 -13
  265. package/esm/shared/highlight.js +0 -46
  266. package/esm/ui-provider/index.d.ts +0 -3
  267. package/esm/ui-provider/index.js +0 -4
  268. package/esm/ui-provider/theme-provider.d.ts +0 -8
  269. package/esm/ui-provider/theme-provider.js +0 -45
  270. package/esm/ui-provider/ui-provider.d.ts +0 -8
  271. package/esm/ui-provider/ui-provider.js +0 -55
  272. package/esm/use-all-themes/all-themes-context.d.ts +0 -7
  273. package/esm/use-all-themes/all-themes-context.js +0 -11
  274. package/esm/use-all-themes/index.d.ts +0 -3
  275. package/esm/use-all-themes/index.js +0 -2
  276. package/esm/use-classes/index.d.ts +0 -2
  277. package/esm/use-classes/index.js +0 -2
  278. package/esm/use-classes/use-classes.d.ts +0 -4
  279. package/esm/use-classes/use-classes.js +0 -34
  280. package/esm/use-current-state/index.d.ts +0 -2
  281. package/esm/use-current-state/index.js +0 -2
  282. package/esm/use-current-state/use-current-state.d.ts +0 -4
  283. package/esm/use-current-state/use-current-state.js +0 -23
  284. package/esm/use-media-query/index.d.ts +0 -3
  285. package/esm/use-media-query/index.js +0 -2
  286. package/esm/use-media-query/use-media-query.d.ts +0 -12
  287. package/esm/use-media-query/use-media-query.js +0 -81
  288. package/esm/use-theme/index.d.ts +0 -2
  289. package/esm/use-theme/index.js +0 -2
  290. package/esm/use-theme/theme-context.d.ts +0 -4
  291. package/esm/use-theme/theme-context.js +0 -9
  292. package/esm/use-toasts/helpers.d.ts +0 -18
  293. package/esm/use-toasts/helpers.js +0 -68
  294. package/esm/use-toasts/index.d.ts +0 -3
  295. package/esm/use-toasts/index.js +0 -2
  296. package/esm/use-toasts/toast-container.d.ts +0 -3
  297. package/esm/use-toasts/toast-container.js +0 -120
  298. package/esm/use-toasts/toast-item.d.ts +0 -8
  299. package/esm/use-toasts/toast-item.js +0 -45
  300. package/esm/use-toasts/use-toast.d.ts +0 -40
  301. package/esm/use-toasts/use-toast.js +0 -103
  302. package/esm/utils/use-current-state.d.ts +0 -2
  303. package/esm/utils/use-current-state.js +0 -2
  304. package/esm/utils/use-dom-observer.d.ts +0 -3
  305. package/esm/utils/use-hd-ui-context.d.ts +0 -16
  306. package/esm/utils/use-previous.d.ts +0 -2
@@ -1,128 +0,0 @@
1
- import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
2
- import _createClass from "@babel/runtime/helpers/esm/createClass";
3
- import _possibleConstructorReturn from "@babel/runtime/helpers/esm/possibleConstructorReturn";
4
- import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
5
- import _inherits from "@babel/runtime/helpers/esm/inherits";
6
- function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
7
- function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
8
- import { Component } from 'react';
9
- import ReactHtmlParser from 'react-html-parser';
10
- var captcha_value = '';
11
- var captcha_number = '';
12
- var backgroundColor_value = '';
13
- var fontColor_value = '';
14
- var charMap_value = '';
15
- var LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: blue\">Reload Captcha</a></div></div>";
16
- var LoadCanvasTemplateNoReload_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: blue\"></a></div></div>";
17
- ;
18
- var _loadCaptchaEnginge = function loadCaptchaEnginge(numberOfCharacters) {
19
- var backgroundColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'white';
20
- var fontColor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'black';
21
- var charMap = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : '';
22
- backgroundColor_value = backgroundColor;
23
- fontColor_value = fontColor;
24
- charMap_value = charMap;
25
- captcha_number = numberOfCharacters;
26
- var retVal = "";
27
- var charset = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
28
- if (charMap === "upper") {
29
- charset = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
30
- } else if (charMap === "lower") {
31
- charset = "abcdefghijklmnopqrstuvwxyz0123456789";
32
- } else if (charMap === "numbers") {
33
- charset = "0123456789";
34
- } else if (charMap === "special_char") {
35
- charset = "~`!@#$%^&*()_+-=[]{}\|:'<>,.?/";
36
- }
37
- var length = parseInt(numberOfCharacters);
38
- for (var i = 0, n = charset.length; i < length; ++i) {
39
- retVal += charset.charAt(Math.floor(Math.random() * n));
40
- }
41
- var captcha = retVal;
42
- captcha_value = captcha;
43
- var length_height_canvas = Math.round(parseInt(length) / 3);
44
- var canvas = document.getElementById('canv'),
45
- ctx = canvas.getContext('2d'),
46
- img = document.getElementById('image');
47
- var text = captcha;
48
- var x = 12.5;
49
- var y = 15;
50
- var lineheight = 30;
51
- var canvas_height = (parseInt(length) - parseInt(length_height_canvas)) * 20;
52
- var lines = text.split('\n');
53
- var lineLengthOrder = lines.slice(0).sort(function (a, b) {
54
- return b.length - a.length;
55
- });
56
- ctx.canvas.width = parseInt(length) * 25;
57
- ctx.canvas.height = lines.length * lineheight;
58
- ctx.fillStyle = backgroundColor;
59
- ctx.fillRect(0, 0, canvas.width, canvas.height);
60
- ctx.textBaseline = "middle";
61
- ctx.font = "italic 20px Arial";
62
- ctx.fillStyle = fontColor;
63
- var num = 0;
64
- for (var _i = 0; _i < parseInt(length); _i++) {
65
- num = parseInt(num) + 1;
66
- var heigt_num = 20 * num;
67
- ctx.fillText(retVal[_i], heigt_num, Math.round(Math.random() * (15 - 12) + 12));
68
- }
69
- document.getElementById("reload_href").onclick = function () {
70
- _loadCaptchaEnginge(captcha_number, backgroundColor, fontColor, charMap);
71
- };
72
- };
73
- export { _loadCaptchaEnginge as loadCaptchaEnginge };
74
- export var validateCaptcha = function validateCaptcha(userValue) {
75
- var reload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
76
- if (userValue != captcha_value) {
77
- if (reload == true) {
78
- _loadCaptchaEnginge(captcha_number, backgroundColor_value, fontColor_value, charMap_value);
79
- }
80
- return false;
81
- } else {
82
- return true;
83
- }
84
- };
85
- export var LoadCanvasTemplate = /*#__PURE__*/function (_Component) {
86
- function LoadCanvasTemplate() {
87
- _classCallCheck(this, LoadCanvasTemplate);
88
- return _callSuper(this, LoadCanvasTemplate, arguments);
89
- }
90
- _inherits(LoadCanvasTemplate, _Component);
91
- return _createClass(LoadCanvasTemplate, [{
92
- key: "render",
93
- value: function render() {
94
- var reload_text = "";
95
- var reload_color = "";
96
- LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\" style=\"background-color: blue;\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: blue\">Reload Captcha</a></div></div>";
97
- if (this.props.reloadText) {
98
- reload_text = this.props.reloadText;
99
- }
100
- if (this.props.reloadColor) {
101
- reload_color = this.props.reloadColor;
102
- }
103
- if (reload_text == "") {
104
- reload_text = "Reload Captcha";
105
- }
106
- if (reload_color == "") {
107
- reload_color = "blue";
108
- }
109
- LoadCanvasTemplate_HTML = "<div><canvas id=\"canv\"></canvas><div><a id=\"reload_href\" style=\"cursor: pointer; color: " + reload_color + "\">" + reload_text + "</a></div></div>";
110
- return ReactHtmlParser(LoadCanvasTemplate_HTML);
111
- }
112
- }]);
113
- }(Component);
114
- ;
115
- export var LoadCanvasTemplateNoReload = /*#__PURE__*/function (_Component2) {
116
- function LoadCanvasTemplateNoReload() {
117
- _classCallCheck(this, LoadCanvasTemplateNoReload);
118
- return _callSuper(this, LoadCanvasTemplateNoReload, arguments);
119
- }
120
- _inherits(LoadCanvasTemplateNoReload, _Component2);
121
- return _createClass(LoadCanvasTemplateNoReload, [{
122
- key: "render",
123
- value: function render() {
124
- return ReactHtmlParser(LoadCanvasTemplateNoReload_HTML);
125
- }
126
- }]);
127
- }(Component);
128
- ;
@@ -1,9 +0,0 @@
1
- import React, { ReactElement } from 'react';
2
- export type FlushToReact = <T>(opts?: {
3
- nonce?: string;
4
- }) => Array<ReactElement<T>>;
5
- type MemoCssBaselineComponent<P = {}> = React.NamedExoticComponent<P> & {
6
- flush: FlushToReact;
7
- };
8
- declare const MemoCssBaseline: MemoCssBaselineComponent<React.PropsWithChildren<unknown>>;
9
- export default MemoCssBaseline;
@@ -1,23 +0,0 @@
1
- import _JSXStyle from "../styled-jsx.es.js";
2
- /* "use client" */
3
- import React from 'react';
4
- import useTheme from '../use-theme';
5
- // import flush from 'styled-jsx'
6
-
7
- // export type FlushToReact = <T>(opts?: { nonce?: string }) => Array<ReactElement<T>>
8
-
9
- // export type FlushToHTML = (opts?: { nonce?: string }) => string
10
-
11
- var CssBaseline = function CssBaseline(_ref) {
12
- var children = _ref.children;
13
- var theme = useTheme();
14
- return /*#__PURE__*/React.createElement(React.Fragment, null, children, /*#__PURE__*/React.createElement(_JSXStyle, {
15
- id: "3647548829",
16
- dynamic: [theme.palette.background, theme.palette.foreground, theme.palette.background, theme.font.sans, theme.font.sans, theme.palette.link, theme.expressiveness.linkStyle, theme.expressiveness.linkHoverStyle, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gapHalf, theme.layout.gap, theme.palette.foreground, theme.palette.code, theme.font.mono, theme.layout.gap, theme.layout.gap, theme.layout.gap, theme.palette.accents_2, theme.layout.radius, theme.font.mono, theme.palette.foreground, theme.palette.accents_2, theme.palette.accents_1, theme.layout.gap, theme.layout.gap, theme.palette.accents_5, theme.palette.accents_1, theme.layout.radius, theme.palette.border, theme.palette.selection, theme.palette.foreground]
17
- }, "html,body{background-color:".concat(theme.palette.background, ";color:").concat(theme.palette.foreground, ";}html{font-size:16px;--helpdice-icons-background:").concat(theme.palette.background, ";}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;text-rendering:optimizeLegibility;font-size:1rem;line-height:1.5;margin:0;padding:0;min-height:100%;position:relative;overflow-x:hidden;font-family:").concat(theme.font.sans, ";}#__next{overflow-x:hidden;}*,*:before,*:after{box-sizing:inherit;text-rendering:geometricPrecision;-webkit-tap-highlight-color:transparent;}p,small{font-weight:400;color:inherit;-webkit-letter-spacing:-0.005625em;-moz-letter-spacing:-0.005625em;-ms-letter-spacing:-0.005625em;letter-spacing:-0.005625em;font-family:").concat(theme.font.sans, ";}p{margin:1em 0;font-size:1em;line-height:1.625em;}small{margin:0;line-height:1.5;font-size:0.875em;}b{font-weight:600;}span{font-size:inherit;color:inherit;font-weight:inherit;}img{max-width:100%;}a{cursor:pointer;font-size:inherit;-webkit-touch-callout:none;-webkit-tap-highlight-color:rgba(0,0,0,0);-webkit-box-align:center;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(theme.palette.link, ";-webkit-text-decoration:").concat(theme.expressiveness.linkStyle, ";text-decoration:").concat(theme.expressiveness.linkStyle, ";}a:hover{-webkit-text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";text-decoration:").concat(theme.expressiveness.linkHoverStyle, ";}ul,ol{padding:0;list-style-type:none;margin:").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gapHalf, " ").concat(theme.layout.gap, ";color:").concat(theme.palette.foreground, ";}ol{list-style-type:decimal;}li{margin-bottom:0.625em;font-size:1em;line-height:1.625em;}h1,h2,h3,h4,h5,h6{color:inherit;margin:0 0 0.7rem 0;}h1{font-size:3rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;line-height:1.5;font-weight:700;}h2{font-size:2.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h3{font-size:1.5rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h4{font-size:1.25rem;-webkit-letter-spacing:-0.02em;-moz-letter-spacing:-0.02em;-ms-letter-spacing:-0.02em;letter-spacing:-0.02em;font-weight:600;}h5{font-size:1rem;-webkit-letter-spacing:-0.01em;-moz-letter-spacing:-0.01em;-ms-letter-spacing:-0.01em;letter-spacing:-0.01em;font-weight:600;}h6{font-size:0.875rem;-webkit-letter-spacing:-0.005em;-moz-letter-spacing:-0.005em;-ms-letter-spacing:-0.005em;letter-spacing:-0.005em;font-weight:600;}button,input,select,textarea{font-family:inherit;font-size:inherit;line-height:inherit;color:inherit;margin:0;}button:focus,input:focus,select:focus,textarea:focus{outline:none;}code{color:").concat(theme.palette.code, ";font-family:").concat(theme.font.mono, ";font-size:0.9em;white-space:pre-wrap;}code:before,code:after{content:'\\`';}pre{padding:calc(").concat(theme.layout.gap, " * 0.9) ").concat(theme.layout.gap, ";margin:").concat(theme.layout.gap, " 0;border:1px solid ").concat(theme.palette.accents_2, ";border-radius:").concat(theme.layout.radius, ";font-family:").concat(theme.font.mono, ";white-space:pre;overflow:auto;line-height:1.5;text-align:left;font-size:14px;-webkit-overflow-scrolling:touch;}pre code{color:").concat(theme.palette.foreground, ";font-size:1em;line-height:1.25em;white-space:pre;}pre code:before,pre code:after{display:none;}pre p{margin:0;}pre::-webkit-scrollbar{display:none;width:0;height:0;background:transparent;}hr{border-color:").concat(theme.palette.accents_2, ";}details{background-color:").concat(theme.palette.accents_1, ";border:none;}details:focus,details:hover,details:active{outline:none;}summary{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;list-style:none;outline:none;}summary::marker,summary::before,summary::-webkit-details-marker{display:none;}summary::-moz-list-bullet{font-size:0;}summary:focus,summary:hover,summary:active{outline:none;list-style:none;}blockquote{padding:calc(0.667 * ").concat(theme.layout.gap, ") ").concat(theme.layout.gap, ";color:").concat(theme.palette.accents_5, ";background-color:").concat(theme.palette.accents_1, ";border-radius:").concat(theme.layout.radius, ";margin:1.5em 0;border:1px solid ").concat(theme.palette.border, ";}blockquote *:first-child{margin-top:0;}blockquote *:last-child{margin-bottom:0;}::selection{background-color:").concat(theme.palette.selection, ";color:").concat(theme.palette.foreground, ";}")));
18
- };
19
- var MemoCssBaseline = /*#__PURE__*/React.memo(CssBaseline);
20
- // MemoCssBaseline.flush = flush.StyleRegistry
21
- // MemoCssBaseline.flushToHTML = flushToReact
22
-
23
- export default MemoCssBaseline;
@@ -1 +0,0 @@
1
- export { default } from './css-baseline';
@@ -1,2 +0,0 @@
1
- /* "use client" */
2
- export { default } from './css-baseline';
@@ -1,14 +0,0 @@
1
- import React, { MouseEvent } from 'react';
2
- interface Props {
3
- onClick?: (event: MouseEvent<HTMLElement>) => void;
4
- visible?: boolean;
5
- width?: string;
6
- onContentClick?: (event: MouseEvent<HTMLElement>) => void;
7
- backdropClassName?: string;
8
- positionClassName?: string;
9
- layerClassName?: string;
10
- }
11
- type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
12
- export type BackdropProps = Props & NativeAttrs;
13
- declare const Backdrop: React.FC<React.PropsWithChildren<BackdropProps>>;
14
- export default Backdrop;
@@ -1,66 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["children", "onClick", "visible", "width", "onContentClick", "backdropClassName", "positionClassName", "layerClassName"];
5
- import _JSXStyle from "../styled-jsx.es.js";
6
- import React from 'react';
7
- import useTheme from '../use-theme';
8
- import CssTransition from './css-transition';
9
- import useCurrentState from '../utils/use-current-state';
10
- import useClasses from '../use-classes';
11
- var Backdrop = /*#__PURE__*/React.memo(function (_ref) {
12
- var children = _ref.children,
13
- _ref$onClick = _ref.onClick,
14
- onClick = _ref$onClick === void 0 ? function () {} : _ref$onClick,
15
- _ref$visible = _ref.visible,
16
- visible = _ref$visible === void 0 ? false : _ref$visible,
17
- width = _ref.width,
18
- _ref$onContentClick = _ref.onContentClick,
19
- onContentClick = _ref$onContentClick === void 0 ? function () {} : _ref$onContentClick,
20
- _ref$backdropClassNam = _ref.backdropClassName,
21
- backdropClassName = _ref$backdropClassNam === void 0 ? '' : _ref$backdropClassNam,
22
- _ref$positionClassNam = _ref.positionClassName,
23
- positionClassName = _ref$positionClassNam === void 0 ? '' : _ref$positionClassNam,
24
- _ref$layerClassName = _ref.layerClassName,
25
- layerClassName = _ref$layerClassName === void 0 ? '' : _ref$layerClassName,
26
- props = _objectWithoutProperties(_ref, _excluded);
27
- var theme = useTheme();
28
- var _useCurrentState = useCurrentState(false),
29
- _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
30
- setIsContentMouseDown = _useCurrentState2[1],
31
- IsContentMouseDownRef = _useCurrentState2[2];
32
- var clickHandler = function clickHandler(event) {
33
- if (IsContentMouseDownRef.current) return;
34
- onClick && onClick(event);
35
- };
36
- var mouseUpHandler = function mouseUpHandler() {
37
- if (!IsContentMouseDownRef.current) return;
38
- var timer = setTimeout(function () {
39
- setIsContentMouseDown(false);
40
- clearTimeout(timer);
41
- }, 0);
42
- };
43
- return /*#__PURE__*/React.createElement(CssTransition, {
44
- name: "backdrop-wrapper",
45
- visible: visible,
46
- clearTime: 300
47
- }, /*#__PURE__*/React.createElement("div", _extends({
48
- onClick: clickHandler,
49
- onMouseUp: mouseUpHandler
50
- }, props, {
51
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (props && props.className != null && props.className || useClasses('backdrop', backdropClassName) || "")
52
- }), /*#__PURE__*/React.createElement("div", {
53
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('layer', layerClassName) || "")
54
- }), /*#__PURE__*/React.createElement("div", {
55
- onClick: onContentClick,
56
- onMouseDown: function onMouseDown() {
57
- return setIsContentMouseDown(true);
58
- },
59
- className: _JSXStyle.dynamic([["2021762493", [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]]]) + " " + (useClasses('position', positionClassName) || "")
60
- }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
61
- id: "2021762493",
62
- dynamic: [width, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity, theme.expressiveness.portalOpacity]
63
- }, ".backdrop.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;overflow:auto;z-index:1000;-webkit-overflow-scrolling:touch;box-sizing:border-box;text-align:center;}.position.__jsx-style-dynamic-selector{position:relative;z-index:1001;outline:none;max-width:90%;width:".concat(width, ";margin:20px auto;vertical-align:middle;display:inline-block;}.backdrop.__jsx-style-dynamic-selector:before{display:inline-block;width:0;height:100%;vertical-align:middle;content:'';}.layer.__jsx-style-dynamic-selector{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;opacity:").concat(theme.expressiveness.portalOpacity, ";background-color:black;-webkit-transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);transition:opacity 0.35s cubic-bezier(0.4,0,0.2,1);pointer-events:none;z-index:1000;}.backdrop-wrapper-enter.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}.backdrop-wrapper-enter-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:").concat(theme.expressiveness.portalOpacity, ";}.backdrop-wrapper-leave-active.__jsx-style-dynamic-selector .layer.__jsx-style-dynamic-selector{opacity:0;}"))));
64
- });
65
- Backdrop.displayName = 'Backdrop';
66
- export default Backdrop;
@@ -1,13 +0,0 @@
1
- import React, { ReactNode } from 'react';
2
- interface Props {
3
- visible?: boolean;
4
- enterTime?: number;
5
- leaveTime?: number;
6
- clearTime?: number;
7
- className?: string;
8
- name?: string;
9
- children: ReactNode;
10
- }
11
- export type CssTransitionProps = Props;
12
- declare const CssTransition: React.FC<CssTransitionProps>;
13
- export default CssTransition;
@@ -1,65 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
4
- var _excluded = ["children", "className", "visible", "enterTime", "leaveTime", "clearTime", "name"];
5
- /* "use client" */
6
-
7
- import React, { useEffect, useState } from 'react';
8
- var CssTransition = function CssTransition(_ref) {
9
- var children = _ref.children,
10
- _ref$className = _ref.className,
11
- className = _ref$className === void 0 ? '' : _ref$className,
12
- _ref$visible = _ref.visible,
13
- visible = _ref$visible === void 0 ? false : _ref$visible,
14
- _ref$enterTime = _ref.enterTime,
15
- enterTime = _ref$enterTime === void 0 ? 60 : _ref$enterTime,
16
- _ref$leaveTime = _ref.leaveTime,
17
- leaveTime = _ref$leaveTime === void 0 ? 60 : _ref$leaveTime,
18
- _ref$clearTime = _ref.clearTime,
19
- clearTime = _ref$clearTime === void 0 ? 60 : _ref$clearTime,
20
- _ref$name = _ref.name,
21
- name = _ref$name === void 0 ? 'transition' : _ref$name,
22
- props = _objectWithoutProperties(_ref, _excluded);
23
- var _useState = useState(''),
24
- _useState2 = _slicedToArray(_useState, 2),
25
- classes = _useState2[0],
26
- setClasses = _useState2[1];
27
- var _useState3 = useState(visible),
28
- _useState4 = _slicedToArray(_useState3, 2),
29
- renderable = _useState4[0],
30
- setRenderable = _useState4[1];
31
- useEffect(function () {
32
- var statusClassName = visible ? 'enter' : 'leave';
33
- var time = visible ? enterTime : leaveTime;
34
- if (visible && !renderable) {
35
- setRenderable(true);
36
- }
37
- setClasses("".concat(name, "-").concat(statusClassName));
38
-
39
- // set class to active
40
- var timer = setTimeout(function () {
41
- setClasses("".concat(name, "-").concat(statusClassName, " ").concat(name, "-").concat(statusClassName, "-active"));
42
- clearTimeout(timer);
43
- }, time);
44
-
45
- // remove classess when animation over
46
- var clearClassesTimer = setTimeout(function () {
47
- if (!visible) {
48
- setClasses('');
49
- setRenderable(false);
50
- }
51
- clearTimeout(clearClassesTimer);
52
- }, time + clearTime);
53
- return function () {
54
- clearTimeout(timer);
55
- clearTimeout(clearClassesTimer);
56
- };
57
- }, [visible, renderable]);
58
- if (! /*#__PURE__*/React.isValidElement(children) || !renderable) return null;
59
- var propsTransition = _extends({}, props, {
60
- className: "".concat(children.props.className, " ").concat(className, " ").concat(classes)
61
- });
62
- return /*#__PURE__*/React.cloneElement(children, propsTransition);
63
- };
64
- CssTransition.displayName = 'CssTransition';
65
- export default CssTransition;
@@ -1,9 +0,0 @@
1
- import React, { MutableRefObject } from 'react';
2
- interface Props {
3
- parent?: MutableRefObject<HTMLElement | null> | undefined;
4
- visible: boolean;
5
- disableMatchWidth?: boolean;
6
- getPopupContainer?: () => HTMLElement | null;
7
- }
8
- declare const Dropdown: React.FC<React.PropsWithChildren<Props>>;
9
- export default Dropdown;
@@ -1,99 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _JSXStyle from "../styled-jsx.es.js";
3
- /* "use client" */
4
-
5
- import React, { useEffect, useState } from 'react';
6
- import { createPortal } from 'react-dom';
7
- import usePortal from '../utils/use-portal';
8
- import useResize from '../utils/use-resize';
9
- import CssTransition from './css-transition';
10
- import useClickAnyWhere from '../utils/use-click-anywhere';
11
- import useDOMObserver from '../utils/use-dom-observer';
12
- import useWarning from '../utils/use-warning';
13
- import { getRefRect } from '../utils/layouts';
14
- import useClasses from '../use-classes';
15
- var defaultRect = {
16
- top: -1000,
17
- left: -1000,
18
- right: -1000,
19
- width: 0
20
- };
21
- var Dropdown = /*#__PURE__*/React.memo(function (_ref) {
22
- var children = _ref.children,
23
- parent = _ref.parent,
24
- visible = _ref.visible,
25
- disableMatchWidth = _ref.disableMatchWidth,
26
- getPopupContainer = _ref.getPopupContainer;
27
- var el = usePortal('dropdown', getPopupContainer);
28
- var _useState = useState(defaultRect),
29
- _useState2 = _slicedToArray(_useState, 2),
30
- rect = _useState2[0],
31
- setRect = _useState2[1];
32
- var classes = useClasses('dropdown', disableMatchWidth ? 'disable-match' : 'width-match');
33
- if (!parent) return null;
34
-
35
- /* istanbul ignore next */
36
- if (process.env.NODE_ENV !== 'production') {
37
- if (getPopupContainer && getPopupContainer()) {
38
- var _el = getPopupContainer();
39
- var style = window.getComputedStyle(_el);
40
- if (style.position === 'static') {
41
- useWarning('The element specified by "getPopupContainer" must have "position" set.');
42
- }
43
- }
44
- }
45
- var updateRect = function updateRect() {
46
- var _getRefRect = getRefRect(parent, getPopupContainer),
47
- top = _getRefRect.top,
48
- left = _getRefRect.left,
49
- right = _getRefRect.right,
50
- nativeWidth = _getRefRect.width;
51
- setRect({
52
- top: top,
53
- left: left,
54
- right: right,
55
- width: nativeWidth
56
- });
57
- };
58
- useResize(updateRect);
59
- useClickAnyWhere(function () {
60
- var _getRefRect2 = getRefRect(parent, getPopupContainer),
61
- top = _getRefRect2.top,
62
- left = _getRefRect2.left;
63
- var shouldUpdatePosition = top !== rect.top || left !== rect.left;
64
- if (!shouldUpdatePosition) return;
65
- updateRect();
66
- });
67
- useDOMObserver(parent, function () {
68
- updateRect();
69
- });
70
- useEffect(function () {
71
- if (!parent || !parent.current) return;
72
- parent.current.addEventListener('mouseenter', updateRect);
73
- /* istanbul ignore next */
74
- return function () {
75
- if (!parent || !parent.current) return;
76
- parent.current.removeEventListener('mouseenter', updateRect);
77
- };
78
- }, [parent]);
79
- var clickHandler = function clickHandler(event) {
80
- event.stopPropagation();
81
- event.nativeEvent.stopImmediatePropagation();
82
- event.preventDefault();
83
- };
84
- var mouseDownHandler = function mouseDownHandler(event) {
85
- event.preventDefault();
86
- };
87
- if (!el) return null;
88
- return /*#__PURE__*/createPortal(/*#__PURE__*/React.createElement(CssTransition, {
89
- visible: visible
90
- }, /*#__PURE__*/React.createElement("div", {
91
- onClick: clickHandler,
92
- onMouseDown: mouseDownHandler,
93
- className: _JSXStyle.dynamic([["1644673105", [rect.top + 2, rect.left, rect.width, rect.width]]]) + " " + (classes || "")
94
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
95
- id: "1644673105",
96
- dynamic: [rect.top + 2, rect.left, rect.width, rect.width]
97
- }, ".dropdown.__jsx-style-dynamic-selector{position:absolute;top:".concat(rect.top + 2, "px;left:").concat(rect.left, "px;z-index:1100;}.width-match.__jsx-style-dynamic-selector{width:").concat(rect.width, "px;}.disable-match.__jsx-style-dynamic-selector{min-width:").concat(rect.width, "px;}")))), el);
98
- });
99
- export default Dropdown;
@@ -1,6 +0,0 @@
1
- import React from 'react';
2
- export type EllipsisProps = {
3
- height: string;
4
- };
5
- declare const _default: React.NamedExoticComponent<React.PropsWithChildren<EllipsisProps>>;
6
- export default _default;
@@ -1,13 +0,0 @@
1
- import _JSXStyle from "../styled-jsx.es.js";
2
- import React from 'react';
3
- var Ellipsis = function Ellipsis(_ref) {
4
- var children = _ref.children,
5
- height = _ref.height;
6
- return /*#__PURE__*/React.createElement("span", {
7
- className: _JSXStyle.dynamic([["822089635", [height]]])
8
- }, children, /*#__PURE__*/React.createElement(_JSXStyle, {
9
- id: "822089635",
10
- dynamic: [height]
11
- }, "span.__jsx-style-dynamic-selector{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;line-height:".concat(height, ";min-width:0;}")));
12
- };
13
- export default /*#__PURE__*/React.memo(Ellipsis);
@@ -1,7 +0,0 @@
1
- import React from 'react';
2
- export type ExpandProps = {
3
- isExpanded?: boolean;
4
- delay?: number;
5
- };
6
- declare const Expand: React.FC<React.PropsWithChildren<ExpandProps>>;
7
- export default Expand;
@@ -1,86 +0,0 @@
1
- import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
- import _JSXStyle from "../styled-jsx.es.js";
3
- /* "use client" */
4
-
5
- import React, { useEffect, useRef, useState } from 'react';
6
- import useRealShape from '../utils/use-real-shape';
7
- import useClasses from '../use-classes';
8
- var Expand = function Expand(_ref) {
9
- var _ref$isExpanded = _ref.isExpanded,
10
- isExpanded = _ref$isExpanded === void 0 ? false : _ref$isExpanded,
11
- _ref$delay = _ref.delay,
12
- delay = _ref$delay === void 0 ? 200 : _ref$delay,
13
- children = _ref.children;
14
- var _useState = useState(isExpanded ? 'auto' : '0'),
15
- _useState2 = _slicedToArray(_useState, 2),
16
- height = _useState2[0],
17
- setHeight = _useState2[1];
18
- var _useState3 = useState(isExpanded),
19
- _useState4 = _slicedToArray(_useState3, 2),
20
- selfExpanded = _useState4[0],
21
- setSelfExpanded = _useState4[1];
22
- var _useState5 = useState(isExpanded),
23
- _useState6 = _slicedToArray(_useState5, 2),
24
- visible = _useState6[0],
25
- setVisible = _useState6[1];
26
- var contentRef = useRef(null);
27
- var entryTimer = useRef();
28
- var leaveTimer = useRef();
29
- var resetTimer = useRef();
30
- var _useRealShape = useRealShape(contentRef),
31
- _useRealShape2 = _slicedToArray(_useRealShape, 2),
32
- state = _useRealShape2[0],
33
- updateShape = _useRealShape2[1];
34
- var classes = useClasses('container', {
35
- expanded: selfExpanded
36
- });
37
- useEffect(function () {
38
- return setHeight("".concat(state.height, "px"));
39
- }, [state.height]);
40
- useEffect(function () {
41
- // show element or reset height.
42
- // force an update once manually, even if the element does not change.
43
- // (the height of the element might be "auto")
44
- if (isExpanded) {
45
- setVisible(isExpanded);
46
- } else {
47
- updateShape();
48
- setHeight("".concat(state.height, "px"));
49
- }
50
-
51
- // show expand animation
52
- entryTimer.current = window.setTimeout(function () {
53
- setSelfExpanded(isExpanded);
54
- clearTimeout(entryTimer.current);
55
- }, 30);
56
-
57
- // Reset height after animation
58
- if (isExpanded) {
59
- resetTimer.current = window.setTimeout(function () {
60
- setHeight('auto');
61
- clearTimeout(resetTimer.current);
62
- }, delay);
63
- } else {
64
- leaveTimer.current = window.setTimeout(function () {
65
- setVisible(isExpanded);
66
- clearTimeout(leaveTimer.current);
67
- }, delay / 2);
68
- }
69
- return function () {
70
- clearTimeout(entryTimer.current);
71
- clearTimeout(leaveTimer.current);
72
- clearTimeout(resetTimer.current);
73
- };
74
- }, [isExpanded]);
75
- return /*#__PURE__*/React.createElement("div", {
76
- className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + (classes || "")
77
- }, /*#__PURE__*/React.createElement("div", {
78
- ref: contentRef,
79
- className: _JSXStyle.dynamic([["1918690829", [visible ? 'visible' : 'hidden', delay, height]]]) + " " + "content"
80
- }, children), /*#__PURE__*/React.createElement(_JSXStyle, {
81
- id: "1918690829",
82
- dynamic: [visible ? 'visible' : 'hidden', delay, height]
83
- }, ".container.__jsx-style-dynamic-selector{padding:0;margin:0;height:0;overflow:hidden;visibility:".concat(visible ? 'visible' : 'hidden', ";-webkit-transition:height ").concat(delay, "ms ease;transition:height ").concat(delay, "ms ease;}.expanded.__jsx-style-dynamic-selector{height:").concat(height, ";visibility:visible;}")));
84
- };
85
- Expand.displayName = 'Expand';
86
- export default Expand;
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { ReactiveDomReact } from '../utils/layouts';
3
- type Props = {
4
- rect: ReactiveDomReact;
5
- visible?: boolean;
6
- hoverHeightRatio?: number;
7
- hoverWidthRatio?: number;
8
- activeOpacity?: number;
9
- };
10
- type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
11
- export type HighlightProps = Props & NativeAttrs;
12
- declare const Highlight: React.FC<HighlightProps>;
13
- export default Highlight;
@@ -1,46 +0,0 @@
1
- import _extends from "@babel/runtime/helpers/esm/extends";
2
- import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutProperties";
3
- var _excluded = ["rect", "visible", "hoverHeightRatio", "hoverWidthRatio", "activeOpacity", "className"];
4
- import _JSXStyle from "../styled-jsx.es.js";
5
- /* "use client" */
6
-
7
- import React, { useMemo, useRef } from 'react';
8
- import { isUnplacedRect } from '../utils/layouts';
9
- import usePrevious from '../utils/use-previous';
10
- import useTheme from '../use-theme';
11
- import useClasses from '../use-classes';
12
- var Highlight = function Highlight(_ref) {
13
- var rect = _ref.rect,
14
- visible = _ref.visible,
15
- _ref$hoverHeightRatio = _ref.hoverHeightRatio,
16
- hoverHeightRatio = _ref$hoverHeightRatio === void 0 ? 1 : _ref$hoverHeightRatio,
17
- _ref$hoverWidthRatio = _ref.hoverWidthRatio,
18
- hoverWidthRatio = _ref$hoverWidthRatio === void 0 ? 1 : _ref$hoverWidthRatio,
19
- _ref$activeOpacity = _ref.activeOpacity,
20
- activeOpacity = _ref$activeOpacity === void 0 ? 0.8 : _ref$activeOpacity,
21
- className = _ref.className,
22
- props = _objectWithoutProperties(_ref, _excluded);
23
- var theme = useTheme();
24
- var ref = useRef(null);
25
- var isFirstVisible = usePrevious(isUnplacedRect(rect));
26
- var position = useMemo(function () {
27
- var width = rect.width * hoverWidthRatio;
28
- var height = rect.height * hoverHeightRatio;
29
- return {
30
- width: "".concat(width, "px"),
31
- left: "".concat(rect.left + (rect.width - width) / 2, "px"),
32
- height: "".concat(height, "px"),
33
- top: "".concat(rect.elementTop + (rect.height - height) / 2, "px"),
34
- transition: isFirstVisible ? 'opacity' : 'opacity, width, left, top'
35
- };
36
- }, [rect, hoverWidthRatio, hoverHeightRatio]);
37
- return /*#__PURE__*/React.createElement("div", _extends({
38
- ref: ref
39
- }, props, {
40
- className: _JSXStyle.dynamic([["603024321", [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]]]) + " " + (props && props.className != null && props.className || useClasses('highlight', className) || "")
41
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
42
- id: "603024321",
43
- dynamic: [theme.palette.accents_2, position.width, position.left, position.height, position.top, visible ? activeOpacity : 0, position.transition]
44
- }, ".highlight.__jsx-style-dynamic-selector{background:".concat(theme.palette.accents_2, ";position:absolute;border-radius:5px;width:").concat(position.width, ";left:").concat(position.left, ";height:").concat(position.height, ";top:").concat(position.top, ";opacity:").concat(visible ? activeOpacity : 0, ";-webkit-transition:0.15s ease;transition:0.15s ease;-webkit-transition-property:").concat(position.transition, ";transition-property:").concat(position.transition, ";}")));
45
- };
46
- export default Highlight;
@@ -1,3 +0,0 @@
1
- import HuiProvider from './ui-provider';
2
- export type { UiProviderProps } from './ui-provider';
3
- export default HuiProvider;
@@ -1,4 +0,0 @@
1
- /* "use client" */
2
-
3
- import HuiProvider from './ui-provider';
4
- export default HuiProvider;
@@ -1,8 +0,0 @@
1
- import React, { PropsWithChildren } from 'react';
2
- import { HUIThemes } from '../themes/presets';
3
- export interface Props {
4
- themeType?: string;
5
- themes?: Array<HUIThemes>;
6
- }
7
- declare const ThemeProvider: React.FC<PropsWithChildren<Props>>;
8
- export default ThemeProvider;