@helpdice/ui 1.7.5 → 1.7.8

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 (304) 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 +2136 -314
  7. package/dist/Placeholder/index.js +2116 -254
  8. package/dist/auto-complete/index.js +2145 -652
  9. package/dist/avatar/index.js +2119 -333
  10. package/dist/badge/index.js +2117 -331
  11. package/dist/breadcrumbs/index.js +2126 -340
  12. package/dist/button/button.compact.d.ts +2 -0
  13. package/dist/button/index.js +2214 -342
  14. package/dist/button-dropdown/index.js +2120 -291
  15. package/dist/button-group/index.js +2117 -331
  16. package/dist/capacity/index.js +2117 -331
  17. package/dist/card/index.js +2127 -298
  18. package/dist/checkbox/index.js +2119 -290
  19. package/dist/code/index.js +2116 -297
  20. package/dist/collapse/index.js +2117 -475
  21. package/dist/description/index.js +2117 -331
  22. package/dist/display/index.js +2117 -331
  23. package/dist/divider/index.js +2118 -332
  24. package/dist/dot/index.js +2117 -331
  25. package/dist/drawer/index.js +2129 -439
  26. package/dist/fieldset/index.js +2121 -354
  27. package/dist/grid/index.js +2119 -333
  28. package/dist/image/index.js +2122 -336
  29. package/dist/index.d.ts +2 -14
  30. package/dist/index.js +3175 -1879
  31. package/dist/input/index.js +2125 -296
  32. package/dist/keyboard/index.js +2116 -297
  33. package/dist/link/index.js +2117 -331
  34. package/dist/list/index.js +2119 -333
  35. package/dist/loading/index.js +2117 -331
  36. package/dist/menu/index.js +77 -45
  37. package/dist/modal/index.js +2145 -452
  38. package/dist/note/index.js +2117 -331
  39. package/dist/page/index.js +2117 -331
  40. package/dist/pagination/index.js +2118 -351
  41. package/dist/popover/index.js +2123 -354
  42. package/dist/progress/index.js +2117 -331
  43. package/dist/radio/index.js +2120 -334
  44. package/dist/rating/index.js +2118 -332
  45. package/dist/row/index.js +2115 -296
  46. package/dist/select/index.js +2151 -688
  47. package/dist/slider/index.js +2123 -356
  48. package/dist/snippet/index.js +2118 -421
  49. package/dist/spacer/index.js +2115 -296
  50. package/dist/spinner/index.js +2117 -331
  51. package/dist/table/index.js +2341 -754
  52. package/dist/tabs/index.js +2123 -344
  53. package/dist/tag/index.js +2116 -254
  54. package/dist/text/index.js +2116 -297
  55. package/dist/textarea/index.js +2117 -288
  56. package/dist/toggle/index.js +2117 -331
  57. package/dist/tooltip/index.js +2120 -351
  58. package/dist/tree/index.js +2123 -459
  59. package/dist/use-input/index.js +2122 -24
  60. package/dist/use-modal/index.js +2122 -24
  61. package/dist/use-network-status/index.d.ts +2 -0
  62. package/dist/{use-current-state → use-network-status}/index.js +22 -15
  63. package/dist/use-network-status/use-netowork-status.d.ts +4 -0
  64. package/dist/use-scale/index.js +2115 -296
  65. package/dist/use-tabs/index.js +2122 -24
  66. package/dist/user/index.js +2123 -337
  67. package/esm/CurrencyInput/components/CurrencyInput.js +342 -0
  68. package/esm/CurrencyInput/components/CurrencyInputProps.js +1 -0
  69. package/esm/CurrencyInput/components/utils/addSeparators.js +7 -0
  70. package/esm/CurrencyInput/components/utils/cleanValue.js +69 -0
  71. package/esm/CurrencyInput/components/utils/escapeRegExp.js +8 -0
  72. package/esm/CurrencyInput/components/utils/fixedDecimalValue.js +29 -0
  73. package/esm/CurrencyInput/components/utils/formatValue.js +124 -0
  74. package/esm/CurrencyInput/components/utils/getLocaleConfig.js +47 -0
  75. package/esm/CurrencyInput/components/utils/getSuffix.js +10 -0
  76. package/esm/CurrencyInput/components/utils/index.js +8 -0
  77. package/esm/CurrencyInput/components/utils/isNumber.js +3 -0
  78. package/esm/CurrencyInput/components/utils/padTrimValue.js +27 -0
  79. package/esm/CurrencyInput/components/utils/parseAbbrValue.js +43 -0
  80. package/esm/CurrencyInput/components/utils/removeInvalidChars.js +10 -0
  81. package/esm/CurrencyInput/components/utils/removeSeparators.js +10 -0
  82. package/esm/CurrencyInput/components/utils/repositionCursor.js +35 -0
  83. package/esm/CurrencyInput/index.js +4 -0
  84. package/esm/LinearProgress/index.d.ts +2 -0
  85. package/esm/LinearProgress/index.js +2 -0
  86. package/esm/LinearProgress/linear-progress.d.ts +9 -0
  87. package/esm/LinearProgress/linear-progress.js +28 -0
  88. package/esm/Loadable/index.js +2 -0
  89. package/esm/PhoneInput/phone.js +22 -19
  90. package/esm/auto-complete/auto-complete-dropdown.js +1 -3
  91. package/esm/auto-complete/auto-complete-item.js +1 -3
  92. package/esm/auto-complete/auto-complete-searching.js +1 -1
  93. package/esm/auto-complete/auto-complete.js +1 -1
  94. package/esm/avatar/avatar-group.js +1 -2
  95. package/esm/avatar/avatar.js +1 -2
  96. package/esm/badge/badge.js +1 -2
  97. package/esm/breadcrumbs/breadcrumbs-item.js +1 -1
  98. package/esm/breadcrumbs/breadcrumbs-separator.js +1 -1
  99. package/esm/breadcrumbs/breadcrumbs.js +1 -1
  100. package/esm/button/button-icon.js +1 -1
  101. package/esm/button/button.compact.d.ts +2 -0
  102. package/esm/button/button.compact.js +94 -50
  103. package/esm/button/button.js +1 -2
  104. package/esm/button/utils.js +1 -1
  105. package/esm/button-dropdown/button-dropdown-item.js +1 -1
  106. package/esm/button-dropdown/button-dropdown.js +1 -2
  107. package/esm/button-group/button-group.js +1 -2
  108. package/esm/capacity/capacity.js +1 -2
  109. package/esm/card/card-content.js +1 -1
  110. package/esm/card/card-footer.js +1 -2
  111. package/esm/card/card.js +1 -2
  112. package/esm/carousal/Arrow.js +18 -0
  113. package/esm/carousal/Indicator.js +20 -0
  114. package/esm/carousal/Thumbs.js +302 -0
  115. package/esm/carousal/animations.js +162 -0
  116. package/esm/carousal/index.js +683 -0
  117. package/esm/carousal/types.js +1 -0
  118. package/esm/carousal/utils.js +49 -0
  119. package/esm/checkbox/checkbox-group.js +1 -1
  120. package/esm/checkbox/checkbox.icon.js +1 -1
  121. package/esm/checkbox/checkbox.js +1 -2
  122. package/esm/code/code.js +1 -1
  123. package/esm/collapse/collapse-group.js +1 -2
  124. package/esm/collapse/collapse.js +1 -4
  125. package/esm/description/description.js +1 -2
  126. package/esm/display/display.js +1 -2
  127. package/esm/divider/divider.js +1 -2
  128. package/esm/dot/dot.js +1 -2
  129. package/esm/drawer/drawer-wrapper.js +1 -3
  130. package/esm/drawer/drawer.js +1 -1
  131. package/esm/fieldset/fieldset-content.js +1 -1
  132. package/esm/fieldset/fieldset-footer.js +1 -1
  133. package/esm/fieldset/fieldset-group.js +1 -3
  134. package/esm/fieldset/fieldset-title.js +1 -1
  135. package/esm/fieldset/fieldset.js +1 -2
  136. package/esm/grid/basic-item.js +1 -2
  137. package/esm/grid/grid-container.js +1 -1
  138. package/esm/grid/grid.js +1 -1
  139. package/esm/image/image-browser.js +1 -2
  140. package/esm/image/image.js +1 -2
  141. package/esm/image/image.skeleton.js +1 -1
  142. package/esm/index.d.ts +2 -14
  143. package/esm/index.js +5 -9
  144. package/esm/input/input-block-label.js +1 -1
  145. package/esm/input/input-icon-clear.js +1 -2
  146. package/esm/input/input-label.js +1 -1
  147. package/esm/input/input.js +1 -2
  148. package/esm/keyboard/keyboard.js +1 -1
  149. package/esm/link/link.js +1 -2
  150. package/esm/list/list-item.js +1 -2
  151. package/esm/loading/loading.js +1 -2
  152. package/esm/modal/modal-action.js +1 -2
  153. package/esm/modal/modal-actions.js +1 -1
  154. package/esm/modal/modal-content.js +1 -1
  155. package/esm/modal/modal-subtitle.js +1 -1
  156. package/esm/modal/modal-title.js +1 -1
  157. package/esm/modal/modal-wrapper.js +1 -3
  158. package/esm/modal/modal.js +1 -1
  159. package/esm/note/note.js +1 -2
  160. package/esm/page/page-header.js +1 -1
  161. package/esm/page/page.js +1 -1
  162. package/esm/pagination/pagination-item.js +1 -2
  163. package/esm/pagination/pagination.js +1 -1
  164. package/esm/popover/popover-item.js +1 -2
  165. package/esm/popover/popover.js +1 -1
  166. package/esm/progress/progress.js +1 -2
  167. package/esm/radio/radio-description.js +1 -1
  168. package/esm/radio/radio-group.js +1 -1
  169. package/esm/radio/radio.js +1 -2
  170. package/esm/rating/rating.js +1 -2
  171. package/esm/row/row.js +1 -1
  172. package/esm/select/select-dropdown.js +1 -3
  173. package/esm/select/select-icon-clear.js +1 -1
  174. package/esm/select/select-multiple-value.js +1 -1
  175. package/esm/select/select-option.js +1 -3
  176. package/esm/select/select.js +9 -12
  177. package/esm/slider/slider-dot.js +1 -2
  178. package/esm/slider/slider-mark.js +1 -1
  179. package/esm/slider/slider.js +1 -3
  180. package/esm/snippet/snippet.js +1 -3
  181. package/esm/spinner/spinner.js +1 -2
  182. package/esm/table/table-body.js +1 -2
  183. package/esm/table/table-head.js +3 -2
  184. package/esm/tabs/tabs-item.js +1 -2
  185. package/esm/tabs/tabs.js +1 -3
  186. package/esm/tag/tag.js +1 -1
  187. package/esm/text/child.js +1 -1
  188. package/esm/textarea/textarea.js +1 -2
  189. package/esm/toggle/toggle.js +1 -2
  190. package/esm/tooltip/tooltip-content.js +1 -3
  191. package/esm/tooltip/tooltip-icon.js +1 -1
  192. package/esm/tooltip/tooltip.js +1 -1
  193. package/esm/tree/tree-file-icon.js +1 -1
  194. package/esm/tree/tree-file.js +1 -2
  195. package/esm/tree/tree-folder-icon.js +1 -1
  196. package/esm/tree/tree-folder.js +1 -3
  197. package/esm/tree/tree-status-icon.js +1 -1
  198. package/esm/tree/tree.js +1 -1
  199. package/esm/use-input/use-input.js +1 -1
  200. package/esm/use-modal/use-modal.js +1 -1
  201. package/esm/use-network-status/index.d.ts +2 -0
  202. package/esm/use-network-status/index.js +2 -0
  203. package/esm/use-network-status/use-netowork-status.d.ts +4 -0
  204. package/esm/use-network-status/use-netowork-status.js +29 -0
  205. package/esm/use-scale/with-scale.js +1 -1
  206. package/esm/use-tabs/use-tabs.js +1 -1
  207. package/esm/user/user.js +1 -2
  208. package/esm/utils/use-context-state/use-context-state.js +1 -1
  209. package/esm/utils/use-drag.js +1 -1
  210. package/package.json +12 -4
  211. package/dist/css-baseline/css-baseline.d.ts +0 -9
  212. package/dist/css-baseline/index.d.ts +0 -1
  213. package/dist/shared/backdrop.d.ts +0 -14
  214. package/dist/shared/css-transition.d.ts +0 -13
  215. package/dist/shared/dropdown.d.ts +0 -9
  216. package/dist/shared/ellipsis.d.ts +0 -6
  217. package/dist/shared/expand.d.ts +0 -7
  218. package/dist/shared/highlight.d.ts +0 -13
  219. package/dist/ui-provider/index.d.ts +0 -3
  220. package/dist/ui-provider/index.js +0 -2186
  221. package/dist/ui-provider/theme-provider.d.ts +0 -8
  222. package/dist/ui-provider/ui-provider.d.ts +0 -8
  223. package/dist/use-all-themes/all-themes-context.d.ts +0 -7
  224. package/dist/use-all-themes/index.d.ts +0 -3
  225. package/dist/use-all-themes/index.js +0 -311
  226. package/dist/use-classes/index.d.ts +0 -2
  227. package/dist/use-classes/index.js +0 -48
  228. package/dist/use-classes/use-classes.d.ts +0 -4
  229. package/dist/use-current-state/index.d.ts +0 -2
  230. package/dist/use-current-state/use-current-state.d.ts +0 -4
  231. package/dist/use-media-query/index.d.ts +0 -3
  232. package/dist/use-media-query/index.js +0 -444
  233. package/dist/use-media-query/use-media-query.d.ts +0 -12
  234. package/dist/use-theme/index.d.ts +0 -2
  235. package/dist/use-theme/index.js +0 -309
  236. package/dist/use-theme/theme-context.d.ts +0 -4
  237. package/dist/use-toasts/helpers.d.ts +0 -18
  238. package/dist/use-toasts/index.d.ts +0 -3
  239. package/dist/use-toasts/index.js +0 -204
  240. package/dist/use-toasts/toast-container.d.ts +0 -3
  241. package/dist/use-toasts/toast-item.d.ts +0 -8
  242. package/dist/use-toasts/use-toast.d.ts +0 -40
  243. package/dist/utils/use-current-state.d.ts +0 -2
  244. package/dist/utils/use-dom-observer.d.ts +0 -3
  245. package/dist/utils/use-hd-ui-context.d.ts +0 -16
  246. package/dist/utils/use-previous.d.ts +0 -2
  247. package/esm/captcha/index.js +0 -128
  248. package/esm/css-baseline/css-baseline.d.ts +0 -9
  249. package/esm/css-baseline/css-baseline.js +0 -23
  250. package/esm/css-baseline/index.d.ts +0 -1
  251. package/esm/css-baseline/index.js +0 -2
  252. package/esm/shared/backdrop.d.ts +0 -14
  253. package/esm/shared/backdrop.js +0 -66
  254. package/esm/shared/css-transition.d.ts +0 -13
  255. package/esm/shared/css-transition.js +0 -65
  256. package/esm/shared/dropdown.d.ts +0 -9
  257. package/esm/shared/dropdown.js +0 -99
  258. package/esm/shared/ellipsis.d.ts +0 -6
  259. package/esm/shared/ellipsis.js +0 -13
  260. package/esm/shared/expand.d.ts +0 -7
  261. package/esm/shared/expand.js +0 -86
  262. package/esm/shared/highlight.d.ts +0 -13
  263. package/esm/shared/highlight.js +0 -46
  264. package/esm/ui-provider/index.d.ts +0 -3
  265. package/esm/ui-provider/index.js +0 -4
  266. package/esm/ui-provider/theme-provider.d.ts +0 -8
  267. package/esm/ui-provider/theme-provider.js +0 -45
  268. package/esm/ui-provider/ui-provider.d.ts +0 -8
  269. package/esm/ui-provider/ui-provider.js +0 -55
  270. package/esm/use-all-themes/all-themes-context.d.ts +0 -7
  271. package/esm/use-all-themes/all-themes-context.js +0 -11
  272. package/esm/use-all-themes/index.d.ts +0 -3
  273. package/esm/use-all-themes/index.js +0 -2
  274. package/esm/use-classes/index.d.ts +0 -2
  275. package/esm/use-classes/index.js +0 -2
  276. package/esm/use-classes/use-classes.d.ts +0 -4
  277. package/esm/use-classes/use-classes.js +0 -34
  278. package/esm/use-current-state/index.d.ts +0 -2
  279. package/esm/use-current-state/index.js +0 -2
  280. package/esm/use-current-state/use-current-state.d.ts +0 -4
  281. package/esm/use-current-state/use-current-state.js +0 -23
  282. package/esm/use-media-query/index.d.ts +0 -3
  283. package/esm/use-media-query/index.js +0 -2
  284. package/esm/use-media-query/use-media-query.d.ts +0 -12
  285. package/esm/use-media-query/use-media-query.js +0 -81
  286. package/esm/use-theme/index.d.ts +0 -2
  287. package/esm/use-theme/index.js +0 -2
  288. package/esm/use-theme/theme-context.d.ts +0 -4
  289. package/esm/use-theme/theme-context.js +0 -9
  290. package/esm/use-toasts/helpers.d.ts +0 -18
  291. package/esm/use-toasts/helpers.js +0 -68
  292. package/esm/use-toasts/index.d.ts +0 -3
  293. package/esm/use-toasts/index.js +0 -2
  294. package/esm/use-toasts/toast-container.d.ts +0 -3
  295. package/esm/use-toasts/toast-container.js +0 -120
  296. package/esm/use-toasts/toast-item.d.ts +0 -8
  297. package/esm/use-toasts/toast-item.js +0 -45
  298. package/esm/use-toasts/use-toast.d.ts +0 -40
  299. package/esm/use-toasts/use-toast.js +0 -103
  300. package/esm/utils/use-current-state.d.ts +0 -2
  301. package/esm/utils/use-current-state.js +0 -2
  302. package/esm/utils/use-dom-observer.d.ts +0 -3
  303. package/esm/utils/use-hd-ui-context.d.ts +0 -16
  304. package/esm/utils/use-previous.d.ts +0 -2
@@ -0,0 +1,570 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var React$1 = require('react');
6
+ var LinearProgress = require('@mui/material/LinearProgress');
7
+
8
+ function getDefaultExportFromCjs (x) {
9
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, 'default') ? x['default'] : x;
10
+ }
11
+
12
+ var index = {};
13
+
14
+ var hasRequiredIndex;
15
+
16
+ function requireIndex () {
17
+ if (hasRequiredIndex) return index;
18
+ hasRequiredIndex = 1;
19
+ var React = React$1;
20
+
21
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
22
+
23
+ var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
24
+
25
+ /*
26
+ Based on Glamor's sheet
27
+ https://github.com/threepointone/glamor/blob/667b480d31b3721a905021b26e1290ce92ca2879/src/sheet.js
28
+ */ function _defineProperties(target, props) {
29
+ for(var i = 0; i < props.length; i++){
30
+ var descriptor = props[i];
31
+ descriptor.enumerable = descriptor.enumerable || false;
32
+ descriptor.configurable = true;
33
+ if ("value" in descriptor) descriptor.writable = true;
34
+ Object.defineProperty(target, descriptor.key, descriptor);
35
+ }
36
+ }
37
+ function _createClass(Constructor, protoProps, staticProps) {
38
+ if (protoProps) _defineProperties(Constructor.prototype, protoProps);
39
+ return Constructor;
40
+ }
41
+ var isProd = typeof process !== "undefined" && process.env && process.env.NODE_ENV === "production";
42
+ var isString = function(o) {
43
+ return Object.prototype.toString.call(o) === "[object String]";
44
+ };
45
+ var StyleSheet = /*#__PURE__*/ function() {
46
+ function StyleSheet(param) {
47
+ var ref = param === void 0 ? {} : param, _name = ref.name, name = _name === void 0 ? "stylesheet" : _name, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? isProd : _optimizeForSpeed;
48
+ invariant$1(isString(name), "`name` must be a string");
49
+ this._name = name;
50
+ this._deletedRulePlaceholder = "#" + name + "-deleted-rule____{}";
51
+ invariant$1(typeof optimizeForSpeed === "boolean", "`optimizeForSpeed` must be a boolean");
52
+ this._optimizeForSpeed = optimizeForSpeed;
53
+ this._serverSheet = undefined;
54
+ this._tags = [];
55
+ this._injected = false;
56
+ this._rulesCount = 0;
57
+ var node = typeof window !== "undefined" && document.querySelector('meta[property="csp-nonce"]');
58
+ this._nonce = node ? node.getAttribute("content") : null;
59
+ }
60
+ var _proto = StyleSheet.prototype;
61
+ _proto.setOptimizeForSpeed = function setOptimizeForSpeed(bool) {
62
+ invariant$1(typeof bool === "boolean", "`setOptimizeForSpeed` accepts a boolean");
63
+ invariant$1(this._rulesCount === 0, "optimizeForSpeed cannot be when rules have already been inserted");
64
+ this.flush();
65
+ this._optimizeForSpeed = bool;
66
+ this.inject();
67
+ };
68
+ _proto.isOptimizeForSpeed = function isOptimizeForSpeed() {
69
+ return this._optimizeForSpeed;
70
+ };
71
+ _proto.inject = function inject() {
72
+ var _this = this;
73
+ invariant$1(!this._injected, "sheet already injected");
74
+ this._injected = true;
75
+ if (typeof window !== "undefined" && this._optimizeForSpeed) {
76
+ this._tags[0] = this.makeStyleTag(this._name);
77
+ this._optimizeForSpeed = "insertRule" in this.getSheet();
78
+ if (!this._optimizeForSpeed) {
79
+ if (!isProd) {
80
+ console.warn("StyleSheet: optimizeForSpeed mode not supported falling back to standard mode.");
81
+ }
82
+ this.flush();
83
+ this._injected = true;
84
+ }
85
+ return;
86
+ }
87
+ this._serverSheet = {
88
+ cssRules: [],
89
+ insertRule: function(rule, index) {
90
+ if (typeof index === "number") {
91
+ _this._serverSheet.cssRules[index] = {
92
+ cssText: rule
93
+ };
94
+ } else {
95
+ _this._serverSheet.cssRules.push({
96
+ cssText: rule
97
+ });
98
+ }
99
+ return index;
100
+ },
101
+ deleteRule: function(index) {
102
+ _this._serverSheet.cssRules[index] = null;
103
+ }
104
+ };
105
+ };
106
+ _proto.getSheetForTag = function getSheetForTag(tag) {
107
+ if (tag.sheet) {
108
+ return tag.sheet;
109
+ }
110
+ // this weirdness brought to you by firefox
111
+ for(var i = 0; i < document.styleSheets.length; i++){
112
+ if (document.styleSheets[i].ownerNode === tag) {
113
+ return document.styleSheets[i];
114
+ }
115
+ }
116
+ };
117
+ _proto.getSheet = function getSheet() {
118
+ return this.getSheetForTag(this._tags[this._tags.length - 1]);
119
+ };
120
+ _proto.insertRule = function insertRule(rule, index) {
121
+ invariant$1(isString(rule), "`insertRule` accepts only strings");
122
+ if (typeof window === "undefined") {
123
+ if (typeof index !== "number") {
124
+ index = this._serverSheet.cssRules.length;
125
+ }
126
+ this._serverSheet.insertRule(rule, index);
127
+ return this._rulesCount++;
128
+ }
129
+ if (this._optimizeForSpeed) {
130
+ var sheet = this.getSheet();
131
+ if (typeof index !== "number") {
132
+ index = sheet.cssRules.length;
133
+ }
134
+ // this weirdness for perf, and chrome's weird bug
135
+ // https://stackoverflow.com/questions/20007992/chrome-suddenly-stopped-accepting-insertrule
136
+ try {
137
+ sheet.insertRule(rule, index);
138
+ } catch (error) {
139
+ if (!isProd) {
140
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
141
+ }
142
+ return -1;
143
+ }
144
+ } else {
145
+ var insertionPoint = this._tags[index];
146
+ this._tags.push(this.makeStyleTag(this._name, rule, insertionPoint));
147
+ }
148
+ return this._rulesCount++;
149
+ };
150
+ _proto.replaceRule = function replaceRule(index, rule) {
151
+ if (this._optimizeForSpeed || typeof window === "undefined") {
152
+ var sheet = typeof window !== "undefined" ? this.getSheet() : this._serverSheet;
153
+ if (!rule.trim()) {
154
+ rule = this._deletedRulePlaceholder;
155
+ }
156
+ if (!sheet.cssRules[index]) {
157
+ // @TBD Should we throw an error?
158
+ return index;
159
+ }
160
+ sheet.deleteRule(index);
161
+ try {
162
+ sheet.insertRule(rule, index);
163
+ } catch (error) {
164
+ if (!isProd) {
165
+ console.warn("StyleSheet: illegal rule: \n\n" + rule + "\n\nSee https://stackoverflow.com/q/20007992 for more info");
166
+ }
167
+ // In order to preserve the indices we insert a deleteRulePlaceholder
168
+ sheet.insertRule(this._deletedRulePlaceholder, index);
169
+ }
170
+ } else {
171
+ var tag = this._tags[index];
172
+ invariant$1(tag, "old rule at index `" + index + "` not found");
173
+ tag.textContent = rule;
174
+ }
175
+ return index;
176
+ };
177
+ _proto.deleteRule = function deleteRule(index) {
178
+ if (typeof window === "undefined") {
179
+ this._serverSheet.deleteRule(index);
180
+ return;
181
+ }
182
+ if (this._optimizeForSpeed) {
183
+ this.replaceRule(index, "");
184
+ } else {
185
+ var tag = this._tags[index];
186
+ invariant$1(tag, "rule at index `" + index + "` not found");
187
+ tag.parentNode.removeChild(tag);
188
+ this._tags[index] = null;
189
+ }
190
+ };
191
+ _proto.flush = function flush() {
192
+ this._injected = false;
193
+ this._rulesCount = 0;
194
+ if (typeof window !== "undefined") {
195
+ this._tags.forEach(function(tag) {
196
+ return tag && tag.parentNode.removeChild(tag);
197
+ });
198
+ this._tags = [];
199
+ } else {
200
+ // simpler on server
201
+ this._serverSheet.cssRules = [];
202
+ }
203
+ };
204
+ _proto.cssRules = function cssRules() {
205
+ var _this = this;
206
+ if (typeof window === "undefined") {
207
+ return this._serverSheet.cssRules;
208
+ }
209
+ return this._tags.reduce(function(rules, tag) {
210
+ if (tag) {
211
+ rules = rules.concat(Array.prototype.map.call(_this.getSheetForTag(tag).cssRules, function(rule) {
212
+ return rule.cssText === _this._deletedRulePlaceholder ? null : rule;
213
+ }));
214
+ } else {
215
+ rules.push(null);
216
+ }
217
+ return rules;
218
+ }, []);
219
+ };
220
+ _proto.makeStyleTag = function makeStyleTag(name, cssString, relativeToTag) {
221
+ if (cssString) {
222
+ invariant$1(isString(cssString), "makeStyleTag accepts only strings as second parameter");
223
+ }
224
+ var tag = document.createElement("style");
225
+ if (this._nonce) tag.setAttribute("nonce", this._nonce);
226
+ tag.type = "text/css";
227
+ tag.setAttribute("data-" + name, "");
228
+ if (cssString) {
229
+ tag.appendChild(document.createTextNode(cssString));
230
+ }
231
+ var head = document.head || document.getElementsByTagName("head")[0];
232
+ if (relativeToTag) {
233
+ head.insertBefore(tag, relativeToTag);
234
+ } else {
235
+ head.appendChild(tag);
236
+ }
237
+ return tag;
238
+ };
239
+ _createClass(StyleSheet, [
240
+ {
241
+ key: "length",
242
+ get: function get() {
243
+ return this._rulesCount;
244
+ }
245
+ }
246
+ ]);
247
+ return StyleSheet;
248
+ }();
249
+ function invariant$1(condition, message) {
250
+ if (!condition) {
251
+ throw new Error("StyleSheet: " + message + ".");
252
+ }
253
+ }
254
+
255
+ function hash(str) {
256
+ var _$hash = 5381, i = str.length;
257
+ while(i){
258
+ _$hash = _$hash * 33 ^ str.charCodeAt(--i);
259
+ }
260
+ /* JavaScript does bitwise operations (like XOR, above) on 32-bit signed
261
+ * integers. Since we want the results to be always positive, convert the
262
+ * signed int to an unsigned by doing an unsigned bitshift. */ return _$hash >>> 0;
263
+ }
264
+ var stringHash = hash;
265
+
266
+ var sanitize = function(rule) {
267
+ return rule.replace(/\/style/gi, "\\/style");
268
+ };
269
+ var cache = {};
270
+ /**
271
+ * computeId
272
+ *
273
+ * Compute and memoize a jsx id from a basedId and optionally props.
274
+ */ function computeId(baseId, props) {
275
+ if (!props) {
276
+ return "jsx-" + baseId;
277
+ }
278
+ var propsToString = String(props);
279
+ var key = baseId + propsToString;
280
+ if (!cache[key]) {
281
+ cache[key] = "jsx-" + stringHash(baseId + "-" + propsToString);
282
+ }
283
+ return cache[key];
284
+ }
285
+ /**
286
+ * computeSelector
287
+ *
288
+ * Compute and memoize dynamic selectors.
289
+ */ function computeSelector(id, css) {
290
+ var selectoPlaceholderRegexp = /__jsx-style-dynamic-selector/g;
291
+ // Sanitize SSR-ed CSS.
292
+ // Client side code doesn't need to be sanitized since we use
293
+ // document.createTextNode (dev) and the CSSOM api sheet.insertRule (prod).
294
+ if (typeof window === "undefined") {
295
+ css = sanitize(css);
296
+ }
297
+ var idcss = id + css;
298
+ if (!cache[idcss]) {
299
+ cache[idcss] = css.replace(selectoPlaceholderRegexp, id);
300
+ }
301
+ return cache[idcss];
302
+ }
303
+
304
+ function mapRulesToStyle(cssRules, options) {
305
+ if (options === void 0) options = {};
306
+ return cssRules.map(function(args) {
307
+ var id = args[0];
308
+ var css = args[1];
309
+ return /*#__PURE__*/ React__default["default"].createElement("style", {
310
+ id: "__" + id,
311
+ // Avoid warnings upon render with a key
312
+ key: "__" + id,
313
+ nonce: options.nonce ? options.nonce : undefined,
314
+ dangerouslySetInnerHTML: {
315
+ __html: css
316
+ }
317
+ });
318
+ });
319
+ }
320
+ var StyleSheetRegistry = /*#__PURE__*/ function() {
321
+ function StyleSheetRegistry(param) {
322
+ var ref = param === void 0 ? {} : param, _styleSheet = ref.styleSheet, styleSheet = _styleSheet === void 0 ? null : _styleSheet, _optimizeForSpeed = ref.optimizeForSpeed, optimizeForSpeed = _optimizeForSpeed === void 0 ? false : _optimizeForSpeed;
323
+ this._sheet = styleSheet || new StyleSheet({
324
+ name: "styled-jsx",
325
+ optimizeForSpeed: optimizeForSpeed
326
+ });
327
+ this._sheet.inject();
328
+ if (styleSheet && typeof optimizeForSpeed === "boolean") {
329
+ this._sheet.setOptimizeForSpeed(optimizeForSpeed);
330
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
331
+ }
332
+ this._fromServer = undefined;
333
+ this._indices = {};
334
+ this._instancesCounts = {};
335
+ }
336
+ var _proto = StyleSheetRegistry.prototype;
337
+ _proto.add = function add(props) {
338
+ var _this = this;
339
+ if (undefined === this._optimizeForSpeed) {
340
+ this._optimizeForSpeed = Array.isArray(props.children);
341
+ this._sheet.setOptimizeForSpeed(this._optimizeForSpeed);
342
+ this._optimizeForSpeed = this._sheet.isOptimizeForSpeed();
343
+ }
344
+ if (typeof window !== "undefined" && !this._fromServer) {
345
+ this._fromServer = this.selectFromServer();
346
+ this._instancesCounts = Object.keys(this._fromServer).reduce(function(acc, tagName) {
347
+ acc[tagName] = 0;
348
+ return acc;
349
+ }, {});
350
+ }
351
+ var ref = this.getIdAndRules(props), styleId = ref.styleId, rules = ref.rules;
352
+ // Deduping: just increase the instances count.
353
+ if (styleId in this._instancesCounts) {
354
+ this._instancesCounts[styleId] += 1;
355
+ return;
356
+ }
357
+ var indices = rules.map(function(rule) {
358
+ return _this._sheet.insertRule(rule);
359
+ })// Filter out invalid rules
360
+ .filter(function(index) {
361
+ return index !== -1;
362
+ });
363
+ this._indices[styleId] = indices;
364
+ this._instancesCounts[styleId] = 1;
365
+ };
366
+ _proto.remove = function remove(props) {
367
+ var _this = this;
368
+ var styleId = this.getIdAndRules(props).styleId;
369
+ invariant(styleId in this._instancesCounts, "styleId: `" + styleId + "` not found");
370
+ this._instancesCounts[styleId] -= 1;
371
+ if (this._instancesCounts[styleId] < 1) {
372
+ var tagFromServer = this._fromServer && this._fromServer[styleId];
373
+ if (tagFromServer) {
374
+ tagFromServer.parentNode.removeChild(tagFromServer);
375
+ delete this._fromServer[styleId];
376
+ } else {
377
+ this._indices[styleId].forEach(function(index) {
378
+ return _this._sheet.deleteRule(index);
379
+ });
380
+ delete this._indices[styleId];
381
+ }
382
+ delete this._instancesCounts[styleId];
383
+ }
384
+ };
385
+ _proto.update = function update(props, nextProps) {
386
+ this.add(nextProps);
387
+ this.remove(props);
388
+ };
389
+ _proto.flush = function flush() {
390
+ this._sheet.flush();
391
+ this._sheet.inject();
392
+ this._fromServer = undefined;
393
+ this._indices = {};
394
+ this._instancesCounts = {};
395
+ };
396
+ _proto.cssRules = function cssRules() {
397
+ var _this = this;
398
+ var fromServer = this._fromServer ? Object.keys(this._fromServer).map(function(styleId) {
399
+ return [
400
+ styleId,
401
+ _this._fromServer[styleId]
402
+ ];
403
+ }) : [];
404
+ var cssRules = this._sheet.cssRules();
405
+ return fromServer.concat(Object.keys(this._indices).map(function(styleId) {
406
+ return [
407
+ styleId,
408
+ _this._indices[styleId].map(function(index) {
409
+ return cssRules[index].cssText;
410
+ }).join(_this._optimizeForSpeed ? "" : "\n")
411
+ ];
412
+ })// filter out empty rules
413
+ .filter(function(rule) {
414
+ return Boolean(rule[1]);
415
+ }));
416
+ };
417
+ _proto.styles = function styles(options) {
418
+ return mapRulesToStyle(this.cssRules(), options);
419
+ };
420
+ _proto.getIdAndRules = function getIdAndRules(props) {
421
+ var css = props.children, dynamic = props.dynamic, id = props.id;
422
+ if (dynamic) {
423
+ var styleId = computeId(id, dynamic);
424
+ return {
425
+ styleId: styleId,
426
+ rules: Array.isArray(css) ? css.map(function(rule) {
427
+ return computeSelector(styleId, rule);
428
+ }) : [
429
+ computeSelector(styleId, css)
430
+ ]
431
+ };
432
+ }
433
+ return {
434
+ styleId: computeId(id),
435
+ rules: Array.isArray(css) ? css : [
436
+ css
437
+ ]
438
+ };
439
+ };
440
+ /**
441
+ * selectFromServer
442
+ *
443
+ * Collects style tags from the document with id __jsx-XXX
444
+ */ _proto.selectFromServer = function selectFromServer() {
445
+ var elements = Array.prototype.slice.call(document.querySelectorAll('[id^="__jsx-"]'));
446
+ return elements.reduce(function(acc, element) {
447
+ var id = element.id.slice(2);
448
+ acc[id] = element;
449
+ return acc;
450
+ }, {});
451
+ };
452
+ return StyleSheetRegistry;
453
+ }();
454
+ function invariant(condition, message) {
455
+ if (!condition) {
456
+ throw new Error("StyleSheetRegistry: " + message + ".");
457
+ }
458
+ }
459
+ var StyleSheetContext = /*#__PURE__*/ React.createContext(null);
460
+ StyleSheetContext.displayName = "StyleSheetContext";
461
+ function createStyleRegistry() {
462
+ return new StyleSheetRegistry();
463
+ }
464
+ function StyleRegistry(param) {
465
+ var configuredRegistry = param.registry, children = param.children;
466
+ var rootRegistry = React.useContext(StyleSheetContext);
467
+ var ref = React.useState(function() {
468
+ return rootRegistry || configuredRegistry || createStyleRegistry();
469
+ }), registry = ref[0];
470
+ return /*#__PURE__*/ React__default["default"].createElement(StyleSheetContext.Provider, {
471
+ value: registry
472
+ }, children);
473
+ }
474
+ function useStyleRegistry() {
475
+ return React.useContext(StyleSheetContext);
476
+ }
477
+
478
+ // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
479
+ // https://github.com/reactwg/react-18/discussions/110
480
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React.useLayoutEffect;
481
+ var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
482
+ function JSXStyle(props) {
483
+ var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
484
+ var insertionEffectCalled = React.useRef(false);
485
+ // `registry` might not exist while server-side rendering
486
+ if (!registry) {
487
+ return null;
488
+ }
489
+ if (typeof window === "undefined") {
490
+ registry.add(props);
491
+ return null;
492
+ }
493
+ useInsertionEffect(function() {
494
+ // ReactDOM removes all DOM during hydration in certain cases
495
+ if (!document.head) {
496
+ return;
497
+ }
498
+ registry.add(props);
499
+ insertionEffectCalled.current = true;
500
+ return function() {
501
+ insertionEffectCalled.current = false;
502
+ registry.remove(props);
503
+ };
504
+ }, [
505
+ props.id,
506
+ String(props.dynamic)
507
+ ]);
508
+ React.useLayoutEffect(function() {
509
+ if (!document.head || insertionEffectCalled.current) {
510
+ return;
511
+ }
512
+ registry.add(props);
513
+ return function() {
514
+ registry.remove(props);
515
+ };
516
+ // props.children can be string[], will be striped since id is identical
517
+ }, [
518
+ props.id,
519
+ String(props.dynamic)
520
+ ]);
521
+ return null;
522
+ }
523
+ JSXStyle.dynamic = function(info) {
524
+ return info.map(function(tagInfo) {
525
+ var baseId = tagInfo[0];
526
+ var props = tagInfo[1];
527
+ return computeId(baseId, props);
528
+ }).join(" ");
529
+ };
530
+
531
+ index.StyleRegistry = StyleRegistry;
532
+ index.createStyleRegistry = createStyleRegistry;
533
+ index.style = JSXStyle;
534
+ index.useStyleRegistry = useStyleRegistry;
535
+ return index;
536
+ }
537
+
538
+ var style;
539
+ var hasRequiredStyle;
540
+
541
+ function requireStyle () {
542
+ if (hasRequiredStyle) return style;
543
+ hasRequiredStyle = 1;
544
+ style = requireIndex().style;
545
+ return style;
546
+ }
547
+
548
+ var styleExports = requireStyle();
549
+ var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
550
+
551
+ var Loader = function Loader() {
552
+ return /*#__PURE__*/React.createElement("div", {
553
+ className: "jsx-965707762" + " " + "loader-wrapper"
554
+ }, /*#__PURE__*/React.createElement(LinearProgress, {
555
+ color: "primary"
556
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
557
+ id: "965707762"
558
+ }, ".loader-wrapper.jsx-965707762{position:fixed;top:0;left:0;z-index:2001;width:100%;}.loader-wrapper.jsx-965707762 * + *{margin-top:16px;}"));
559
+ };
560
+
561
+ // ==============================|| LOADABLE - LAZY LOADING ||============================== //
562
+ var Loadable = function Loadable(Component) {
563
+ return function (props) {
564
+ return /*#__PURE__*/React$1.createElement(React$1.Suspense, {
565
+ fallback: /*#__PURE__*/React$1.createElement(Loader, null)
566
+ }, /*#__PURE__*/React$1.createElement(Component, props));
567
+ };
568
+ };
569
+
570
+ exports.default = Loadable;