@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
package/esm/page/page.js CHANGED
@@ -7,7 +7,7 @@ import _JSXStyle from "../styled-jsx.es.js";
7
7
 
8
8
  import React, { useEffect, useMemo, useState } from 'react';
9
9
  import { tuple } from '../utils/prop-types';
10
- import useTheme from '../use-theme';
10
+ import { useTheme } from '@helpdice/theme';
11
11
  import PageContent from './page-content';
12
12
  import { hasChild } from '../utils/collections';
13
13
  import useScale, { withScale } from '../use-scale';
@@ -4,9 +4,8 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
4
4
  var _excluded = ["active", "children", "disabled", "onClick"];
5
5
  import _JSXStyle from "../styled-jsx.es.js";
6
6
  import React, { useMemo } from 'react';
7
- import useTheme from '../use-theme';
7
+ import { useTheme, useClasses } from '@helpdice/theme';
8
8
  import { addColorAlpha } from '../utils/color';
9
- import useClasses from '../use-classes';
10
9
  var PaginationItem = function PaginationItem(_ref) {
11
10
  var active = _ref.active,
12
11
  children = _ref.children,
@@ -10,7 +10,7 @@ import PaginationPrevious from './pagination-previous';
10
10
  import PaginationNext from './pagination-next';
11
11
  import PaginationPages from './pagination-pages';
12
12
  import { PaginationContext } from './pagination-context';
13
- import useCurrentState from '../utils/use-current-state';
13
+ import { useCurrentState } from '@helpdice/theme';
14
14
  import { pickChild } from '../utils/collections';
15
15
  import useScale, { withScale } from '../use-scale';
16
16
  var PaginationComponent = function PaginationComponent(_ref) {
@@ -3,10 +3,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["children", "line", "showTitle", "className", "onClick", "selected", "disableAutoClose"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme, useClasses } from '@helpdice/theme';
7
7
  import useScale, { withScale } from '../use-scale';
8
8
  import { usePopoverContext } from './popover-context';
9
- import useClasses from '../use-classes';
10
9
  var PopoverItemComponent = function PopoverItemComponent(_ref) {
11
10
  var children = _ref.children,
12
11
  _ref$line = _ref.line,
@@ -9,7 +9,7 @@ import Tooltip from '../tooltip/tooltip';
9
9
  import { getReactNode } from '../utils/collections';
10
10
  import useScale, { withScale } from '../use-scale';
11
11
  import { PopoverContext } from './popover-context';
12
- import useClasses from '../use-classes';
12
+ import { useClasses } from '@helpdice/theme';
13
13
  var PopoverComponent = function PopoverComponent(_ref) {
14
14
  var child = _ref.child,
15
15
  children = _ref.children,
@@ -3,10 +3,9 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["value", "max", "className", "type", "colors", "fixedTop", "fixedBottom"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme, useClasses } from '@helpdice/theme';
7
7
  import { useProportions } from '../utils/calculations';
8
8
  import useScale, { withScale } from '../use-scale';
9
- import useClasses from '../use-classes';
10
9
  var getCurrentColor = function getCurrentColor(ratio, palette, type) {
11
10
  var colors = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
12
11
  var defaultColors = {
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["className", "children"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme } from '@helpdice/theme';
7
7
  import useScale, { withScale } from '../use-scale';
8
8
  var RadioDescriptionComponent = function RadioDescriptionComponent(_ref) {
9
9
  var _ref$className = _ref.className,
@@ -8,7 +8,7 @@ import _JSXStyle from "../styled-jsx.es.js";
8
8
  import React, { useEffect, useMemo, useState } from 'react';
9
9
  import { RadioContext } from './radio-context';
10
10
  import useScale, { withScale } from '../use-scale';
11
- import useClasses from '../use-classes';
11
+ import { useClasses } from '@helpdice/theme';
12
12
  var RadioGroupComponent = function RadioGroupComponent(_ref) {
13
13
  var _ref$disabled = _ref.disabled,
14
14
  disabled = _ref$disabled === void 0 ? false : _ref$disabled,
@@ -6,14 +6,13 @@ import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
8
8
  import React, { useEffect, useMemo, useState } from 'react';
9
- import useTheme from '../use-theme';
9
+ import { useTheme, useClasses } from '@helpdice/theme';
10
10
  import { useRadioContext } from './radio-context';
11
11
  import RadioDescription from './radio-description';
12
12
  import { pickChild } from '../utils/collections';
13
13
  import useWarning from '../utils/use-warning';
14
14
  import { getColors } from './styles';
15
15
  import useScale, { withScale } from '../use-scale';
16
- import useClasses from '../use-classes';
17
16
  var RadioComponent = function RadioComponent(_ref) {
18
17
  var _ref$className = _ref.className,
19
18
  className = _ref$className === void 0 ? '' : _ref$className,
@@ -9,9 +9,8 @@ import _JSXStyle from "../styled-jsx.es.js";
9
9
  import React, { useEffect, useMemo, useState } from 'react';
10
10
  import { tupleNumber } from '../utils/prop-types';
11
11
  import RatingIcon from './rating-icon';
12
- import useTheme from '../use-theme';
12
+ import { useTheme, useClasses } from '@helpdice/theme';
13
13
  import useScale, { withScale } from '../use-scale';
14
- import useClasses from '../use-classes';
15
14
  var ratingCountTuple = tupleNumber(2, 3, 4, 5, 6, 7, 8, 9, 10);
16
15
  var ratingValueTuple = tupleNumber(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10);
17
16
  var getColor = function getColor(type, palette) {
package/esm/row/row.js CHANGED
@@ -3,7 +3,7 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["children", "component", "gap", "justify", "align", "className"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React, { useMemo } from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme } from '@helpdice/theme';
7
7
  var getFlexAlignment = function getFlexAlignment(justify, align) {
8
8
  var flexJustifyMap = {
9
9
  end: 'flex-end',
@@ -2,10 +2,8 @@ import _JSXStyle from "../styled-jsx.es.js";
2
2
  /* "use client" */
3
3
 
4
4
  import React, { useImperativeHandle, useRef } from 'react';
5
- import useTheme from '../use-theme';
5
+ import { useTheme, Dropdown, useClasses } from '@helpdice/theme';
6
6
  import { useSelectContext } from './select-context';
7
- import Dropdown from '../shared/dropdown';
8
- import useClasses from '../use-classes';
9
7
  var SelectDropdown = /*#__PURE__*/React.forwardRef(function (_ref, dropdownRef) {
10
8
  var visible = _ref.visible,
11
9
  children = _ref.children,
@@ -1,6 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
3
+ import { useTheme } from '@helpdice/theme';
4
4
  var SelectIconClear = function SelectIconClear(_ref) {
5
5
  var onClick = _ref.onClick;
6
6
  var theme = useTheme();
@@ -1,6 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
3
+ import { useTheme } from '@helpdice/theme';
4
4
  import Grid from '../grid';
5
5
  import SelectClearIcon from './select-icon-clear';
6
6
  var SelectMultipleValue = function SelectMultipleValue(_ref) {
@@ -3,12 +3,10 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["value", "className", "children", "disabled", "divider", "label", "preventAllEvents"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React, { useMemo } from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme, Ellipsis, useClasses } from '@helpdice/theme';
7
7
  import { useSelectContext } from './select-context';
8
8
  import useWarning from '../utils/use-warning';
9
- import Ellipsis from '../shared/ellipsis';
10
9
  import useScale, { withScale } from '../use-scale';
11
- import useClasses from '../use-classes';
12
10
  var SelectOptionComponent = function SelectOptionComponent(_ref) {
13
11
  var identValue = _ref.value,
14
12
  _ref$className = _ref.className,
@@ -7,8 +7,7 @@ import _JSXStyle from "../styled-jsx.es.js";
7
7
  /* "use client" */
8
8
 
9
9
  import React, { useEffect, useImperativeHandle, useMemo, useRef, useState } from 'react';
10
- import useTheme from '../use-theme';
11
- import useCurrentState from '../utils/use-current-state';
10
+ import { useTheme, Ellipsis, useClasses, useCurrentState } from '@helpdice/theme';
12
11
  import { pickChildByProps } from '../utils/collections';
13
12
  import SelectIcon from './select-icon';
14
13
  import SelectDropdown from './select-dropdown';
@@ -16,10 +15,8 @@ import SelectMultipleValue from './select-multiple-value';
16
15
  import Grid from '../grid';
17
16
  import { SelectContext } from './select-context';
18
17
  import { getColors } from './styles';
19
- import Ellipsis from '../shared/ellipsis';
20
18
  import SelectInput from './select-input';
21
19
  import useScale, { withScale } from '../use-scale';
22
- import useClasses from '../use-classes';
23
20
  var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
24
21
  var children = _ref.children,
25
22
  label = _ref.label,
@@ -169,7 +166,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
169
166
  multiple: multiple
170
167
  }, className);
171
168
  return /*#__PURE__*/React.createElement("div", {
172
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
169
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
173
170
  }, label && /*#__PURE__*/React.createElement("label", {
174
171
  style: {
175
172
  display: 'block',
@@ -177,7 +174,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
177
174
  fontSize: '14px',
178
175
  fontWeight: 'light'
179
176
  },
180
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
177
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
181
178
  }, label), /*#__PURE__*/React.createElement(SelectContext.Provider, {
182
179
  value: initialValue
183
180
  }, /*#__PURE__*/React.createElement("div", _extends({
@@ -185,7 +182,7 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
185
182
  onClick: clickHandler,
186
183
  onMouseDown: mouseDownHandler
187
184
  }, props, {
188
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + (props && props.className != null && props.className || classes || "")
185
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + (props && props.className != null && props.className || classes || "")
189
186
  }), /*#__PURE__*/React.createElement(SelectInput, {
190
187
  ref: inputRef,
191
188
  visible: visible,
@@ -194,11 +191,11 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
194
191
  return setSelectFocus(true);
195
192
  }
196
193
  }), isEmpty && /*#__PURE__*/React.createElement("span", {
197
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value placeholder"
194
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value placeholder"
198
195
  }, /*#__PURE__*/React.createElement(Ellipsis, {
199
196
  height: "var(--select-height)"
200
197
  }, placeholder)), value && !multiple && /*#__PURE__*/React.createElement("span", {
201
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value"
198
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "value"
202
199
  }, selectedChild), value && multiple && /*#__PURE__*/React.createElement(Grid.Container, {
203
200
  gap: 0.5
204
201
  }, selectedChild), /*#__PURE__*/React.createElement(SelectDropdown, {
@@ -209,11 +206,11 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
209
206
  disableMatchWidth: disableMatchWidth,
210
207
  getPopupContainer: getPopupContainer
211
208
  }, children), !pure && /*#__PURE__*/React.createElement("div", {
212
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "icon"
209
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]]) + " " + "icon"
213
210
  }, /*#__PURE__*/React.createElement(Icon, {
214
- className: _JSXStyle.dynamic([["3282295248", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
211
+ className: _JSXStyle.dynamic([["2996243684", [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]]])
215
212
  })))), /*#__PURE__*/React.createElement(_JSXStyle, {
216
- id: "3282295248",
213
+ id: "2996243684",
217
214
  dynamic: [disabled ? 'not-allowed' : 'pointer', border, theme.layout.radius, disabled ? theme.palette.accents_1 : theme.palette.background, SCALES.font(0.875), SCALES.height(2.25), SCALES.width(1, 'initial'), SCALES.pt(0), SCALES.pr(0.334), SCALES.pb(0), SCALES.pl(0.667), SCALES.mt(0), SCALES.mr(0), SCALES.mb(0), SCALES.ml(0), SCALES.pt(0.334), SCALES.pr(0.334), SCALES.pb(0.334), SCALES.pl(0.667), disabled ? theme.palette.border : borderActive, disabled ? theme.palette.accents_5 : borderActive, disabled ? theme.palette.accents_4 : theme.palette.foreground, placeholderColor, theme.layout.gapQuarter, visible ? '180' : '0', iconBorder]
218
215
  }, ".select.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;white-space:nowrap;position:relative;cursor:".concat(disabled ? 'not-allowed' : 'pointer', ";max-width:90vw;overflow:hidden;-webkit-transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;transition:border 150ms ease-in 0s,color 200ms ease-out 0s, box-shadow 200ms ease 0s;border:1px solid ").concat(border, ";border-radius:").concat(theme.layout.radius, ";background-color:").concat(disabled ? theme.palette.accents_1 : theme.palette.background, ";--select-font-size:").concat(SCALES.font(0.875), ";--select-height:").concat(SCALES.height(2.25), ";min-width:11.5em;width:").concat(SCALES.width(1, 'initial'), ";height:var(--select-height);padding:").concat(SCALES.pt(0), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0), " ").concat(SCALES.pl(0.667), ";margin:").concat(SCALES.mt(0), " ").concat(SCALES.mr(0), " ").concat(SCALES.mb(0), " ").concat(SCALES.ml(0), ";}.multiple.__jsx-style-dynamic-selector{height:auto;min-height:var(--select-height);padding:").concat(SCALES.pt(0.334), " ").concat(SCALES.pr(0.334), " ").concat(SCALES.pb(0.334), " ").concat(SCALES.pl(0.667), ";}.select.active.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover{border-color:").concat(disabled ? theme.palette.border : borderActive, ";}.select.active.icon.__jsx-style-dynamic-selector,.select.__jsx-style-dynamic-selector:hover .icon.__jsx-style-dynamic-selector{color:").concat(disabled ? theme.palette.accents_5 : borderActive, ";}.value.__jsx-style-dynamic-selector{display:-webkit-inline-box;display:-webkit-inline-flex;display:-ms-inline-flexbox;display:inline-flex;-webkit-flex:1;-ms-flex:1;flex:1;height:100%;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;line-height:1;padding:0;margin-right:1.25em;font-size:var(--select-font-size);color:").concat(disabled ? theme.palette.accents_4 : theme.palette.foreground, ";width:calc(100% - 1.25em);}.value.__jsx-style-dynamic-selector>div,.value.__jsx-style-dynamic-selector>div:hover{border-radius:0;background-color:transparent;padding:0;margin:0;color:inherit;}.placeholder.__jsx-style-dynamic-selector{color:").concat(placeholderColor, ";}.icon.__jsx-style-dynamic-selector{position:absolute;right:").concat(theme.layout.gapQuarter, ";font-size:var(--select-font-size);top:50%;bottom:0;-webkit-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);-ms-transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);transform:translateY(-50%) rotate(").concat(visible ? '180' : '0', "deg);pointer-events:none;-webkit-transition:-webkit-transform 200ms ease;-webkit-transition:transform 200ms ease;transition:transform 200ms ease;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-align-items:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;color:").concat(iconBorder, ";}")));
219
216
  });
@@ -1,7 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
4
- import useClasses from '../use-classes';
3
+ import { useTheme, useClasses } from '@helpdice/theme';
5
4
  var SliderDot = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
6
5
  var children = _ref.children,
7
6
  _ref$disabled = _ref.disabled,
@@ -1,7 +1,7 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
2
2
  import _JSXStyle from "../styled-jsx.es.js";
3
3
  import React, { useMemo } from 'react';
4
- import useTheme from '../use-theme';
4
+ import { useTheme } from '@helpdice/theme';
5
5
  var getMarks = function getMarks(min, max, step) {
6
6
  var value = max - min;
7
7
  var roundFunc = !(value % step) ? Math.floor : Math.ceil;
@@ -6,14 +6,12 @@ import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
8
8
  import React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';
9
- import useTheme from '../use-theme';
9
+ import { useTheme, useClasses, useCurrentState } from '@helpdice/theme';
10
10
  import useDrag from '../utils/use-drag';
11
- import useCurrentState from '../utils/use-current-state';
12
11
  import SliderDot from './slider-dot';
13
12
  import SliderMark from './slider-mark';
14
13
  import { getColors } from './styles';
15
14
  import useScale, { withScale } from '../use-scale';
16
- import useClasses from '../use-classes';
17
15
  var getRefWidth = function getRefWidth(elementRef) {
18
16
  if (!elementRef || !elementRef.current) return 0;
19
17
  var rect = elementRef.current.getBoundingClientRect();
@@ -5,13 +5,11 @@ import _JSXStyle from "../styled-jsx.es.js";
5
5
  /* "use client" */
6
6
 
7
7
  import React, { useMemo, useRef } from 'react';
8
- import useTheme from '../use-theme';
8
+ import { useTheme, useToasts, useClasses } from '@helpdice/theme';
9
9
  import { getStyles } from './styles';
10
10
  import SnippetIcon from './snippet-icon';
11
11
  import useClipboard from '../utils/use-clipboard';
12
- import useToasts from '../use-toasts';
13
12
  import useScale, { withScale } from '../use-scale';
14
- import useClasses from '../use-classes';
15
13
  var textArrayToString = function textArrayToString(text) {
16
14
  return text.reduce(function (pre, current) {
17
15
  if (!current) return pre;
@@ -4,9 +4,8 @@ import _toConsumableArray from "@babel/runtime/helpers/esm/toConsumableArray";
4
4
  var _excluded = ["className"];
5
5
  import _JSXStyle from "../styled-jsx.es.js";
6
6
  import React from 'react';
7
- import useTheme from '../use-theme';
7
+ import { useTheme, useClasses } from '@helpdice/theme';
8
8
  import useScale, { withScale } from '../use-scale';
9
- import useClasses from '../use-classes';
10
9
  var getSpans = function getSpans(theme) {
11
10
  return _toConsumableArray(new Array(12)).map(function (_, index) {
12
11
  return /*#__PURE__*/React.createElement("span", {
@@ -2,10 +2,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  import _JSXStyle from "../styled-jsx.es.js";
4
4
  import React, { useState } from 'react';
5
- import useTheme from '../use-theme';
5
+ import { useTheme, useClasses } from '@helpdice/theme';
6
6
  import TableCell from './table-cell';
7
7
  import { useTableContext } from './table-context';
8
- import useClasses from '../use-classes';
9
8
  import _ from 'lodash';
10
9
  import Placeholder from '../Placeholder';
11
10
  // import { DataTable } from '@helpdice/pro';
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React, { useMemo } from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme } from '@helpdice/theme';
7
7
  import Input from '../input';
8
8
  import Select from '../select';
9
9
  // import Button from '../button'
@@ -83,7 +83,8 @@ var TableHead = function TableHead(props) {
83
83
  // }
84
84
  return /*#__PURE__*/React.createElement("th", {
85
85
  style: {
86
- padding: '3px'
86
+ padding: '3px',
87
+ display: 'flex'
87
88
  },
88
89
  "data-column": Header
89
90
  }, accessor === 'fixed' && /*#__PURE__*/React.createElement(Select
@@ -4,9 +4,8 @@ import _JSXStyle from "../styled-jsx.es.js";
4
4
 
5
5
  import React, { useEffect, useMemo, useRef } from 'react';
6
6
  import { useTabsContext } from './tabs-context';
7
- import useTheme from '../use-theme';
7
+ import { useTheme, useClasses } from '@helpdice/theme';
8
8
  import useScale, { withScale } from '../use-scale';
9
- import useClasses from '../use-classes';
10
9
  var TabsItemComponent = function TabsItemComponent(_ref) {
11
10
  var children = _ref.children,
12
11
  value = _ref.value,
package/esm/tabs/tabs.js CHANGED
@@ -7,13 +7,11 @@ import _JSXStyle from "../styled-jsx.es.js";
7
7
  /* "use client" */
8
8
 
9
9
  import React, { useEffect, useMemo, useRef, useState } from 'react';
10
- import useTheme from '../use-theme';
10
+ import { useTheme, Highlight, useClasses } from '@helpdice/theme';
11
11
  import { TabsContext } from './tabs-context';
12
12
  import useScale, { withScale } from '../use-scale';
13
- import Highlight from '../shared/highlight';
14
13
  import { useRect } from '../utils/layouts';
15
14
  import { isUiElement } from '../utils/collections';
16
- import useClasses from '../use-classes';
17
15
  var TabsComponent = function TabsComponent(_ref) {
18
16
  var userCustomInitialValue = _ref.initialValue,
19
17
  value = _ref.value,
package/esm/tag/tag.js CHANGED
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  var _excluded = ["type", "children", "className", "invert"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React, { useMemo } from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme } from '@helpdice/theme';
7
7
  import useScale, { withScale } from '../use-scale';
8
8
  var getColors = function getColors(type, palette, invert) {
9
9
  var colors = {
package/esm/text/child.js CHANGED
@@ -5,7 +5,7 @@ import _JSXStyle from "../styled-jsx.es.js";
5
5
  /* "use client" */
6
6
 
7
7
  import React, { useMemo } from 'react';
8
- import useTheme from '../use-theme';
8
+ import { useTheme } from '@helpdice/theme';
9
9
  import useScale from '../use-scale';
10
10
  var getTypeColor = function getTypeColor(type, palette) {
11
11
  var colors = {
@@ -6,11 +6,10 @@ import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
8
8
  import React, { useRef, useImperativeHandle, useEffect, useMemo, useState } from 'react';
9
- import useTheme from '../use-theme';
9
+ import { useTheme, useClasses } from '@helpdice/theme';
10
10
  import { tuple } from '../utils/prop-types';
11
11
  import { getColors } from '../input/styles';
12
12
  import useScale, { withScale } from '../use-scale';
13
- import useClasses from '../use-classes';
14
13
  var resizeTypes = tuple('none', 'both', 'horizontal', 'vertical', 'initial', 'inherit');
15
14
  var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
16
15
  var _ref$type = _ref.type,
@@ -6,10 +6,9 @@ import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
8
8
  import React, { useCallback, useEffect, useMemo, useState } from 'react';
9
- import useTheme from '../use-theme';
9
+ import { useTheme, useClasses } from '@helpdice/theme';
10
10
  import { getColors } from './styles';
11
11
  import useScale, { withScale } from '../use-scale';
12
- import useClasses from '../use-classes';
13
12
  var ToggleComponent = function ToggleComponent(_ref) {
14
13
  var _ref$initialChecked = _ref.initialChecked,
15
14
  initialChecked = _ref$initialChecked === void 0 ? false : _ref$initialChecked,
@@ -4,17 +4,15 @@ import _JSXStyle from "../styled-jsx.es.js";
4
4
 
5
5
  import React, { useEffect, useMemo, useRef, useState } from 'react';
6
6
  import { createPortal } from 'react-dom';
7
- import useTheme from '../use-theme';
7
+ import { useTheme, useClasses, CssTransition } from '@helpdice/theme';
8
8
  import usePortal from '../utils/use-portal';
9
9
  import useResize from '../utils/use-resize';
10
- import CssTransition from '../shared/css-transition';
11
10
  import useClickAnyWhere from '../utils/use-click-anywhere';
12
11
  import { getColors } from './styles';
13
12
  import { getPosition, defaultTooltipPosition } from './placement';
14
13
  import TooltipIcon from './tooltip-icon';
15
14
  import useScale from '../use-scale';
16
15
  import { getRect } from './helper';
17
- import useClasses from '../use-classes';
18
16
  var TooltipContent = function TooltipContent(_ref) {
19
17
  var children = _ref.children,
20
18
  parent = _ref.parent,
@@ -1,7 +1,7 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React, { useMemo } from 'react';
3
3
  import { getIconPosition } from './placement';
4
- import useTheme from '../use-theme';
4
+ import { useTheme } from '@helpdice/theme';
5
5
  var TooltipIcon = function TooltipIcon(_ref) {
6
6
  var placement = _ref.placement,
7
7
  shadow = _ref.shadow;
@@ -10,7 +10,7 @@ import TooltipContent from './tooltip-content';
10
10
  import useClickAway from '../utils/use-click-away';
11
11
  import { withScale } from '../use-scale';
12
12
  import { getRect } from './helper';
13
- import useClasses from '../use-classes';
13
+ import { useClasses } from '@helpdice/theme';
14
14
  var TooltipComponent = function TooltipComponent(_ref) {
15
15
  var children = _ref.children,
16
16
  _ref$initialVisible = _ref.initialVisible,
@@ -1,6 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
3
+ import { useTheme } from '@helpdice/theme';
4
4
  var TreeFileIcon = function TreeFileIcon(_ref) {
5
5
  var color = _ref.color,
6
6
  _ref$width = _ref.width,
@@ -3,12 +3,11 @@ import _objectWithoutProperties from "@babel/runtime/helpers/esm/objectWithoutPr
3
3
  var _excluded = ["name", "parentPath", "level", "extra", "className"];
4
4
  import _JSXStyle from "../styled-jsx.es.js";
5
5
  import React, { useMemo } from 'react';
6
- import useTheme from '../use-theme';
6
+ import { useTheme, useClasses } from '@helpdice/theme';
7
7
  import TreeFileIcon from './tree-file-icon';
8
8
  import { useTreeContext } from './tree-context';
9
9
  import TreeIndents from './tree-indents';
10
10
  import { makeChildPath, stopPropagation } from './tree-help';
11
- import useClasses from '../use-classes';
12
11
  var TreeFile = function TreeFile(_ref) {
13
12
  var name = _ref.name,
14
13
  _ref$parentPath = _ref.parentPath,
@@ -1,6 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
3
+ import { useTheme } from '@helpdice/theme';
4
4
  var TreeFolderIcon = function TreeFolderIcon(_ref) {
5
5
  var color = _ref.color,
6
6
  _ref$width = _ref.width,
@@ -6,16 +6,14 @@ import _JSXStyle from "../styled-jsx.es.js";
6
6
  /* "use client" */
7
7
 
8
8
  import React, { useEffect, useMemo, useState } from 'react';
9
- import useTheme from '../use-theme';
9
+ import { useTheme, Expand, useClasses } from '@helpdice/theme';
10
10
  import { setChildrenProps } from '../utils/collections';
11
11
  import TreeFile from './tree-file';
12
- import Expand from '../shared/expand';
13
12
  import TreeIndents from './tree-indents';
14
13
  import { useTreeContext } from './tree-context';
15
14
  import TreeFolderIcon from './tree-folder-icon';
16
15
  import TreeStatusIcon from './tree-status-icon';
17
16
  import { sortChildren, makeChildPath, stopPropagation } from './tree-help';
18
- import useClasses from '../use-classes';
19
17
  var _TreeFolder = function TreeFolder(_ref) {
20
18
  var name = _ref.name,
21
19
  _ref$children = _ref.children,
@@ -1,6 +1,6 @@
1
1
  import _JSXStyle from "../styled-jsx.es.js";
2
2
  import React from 'react';
3
- import useTheme from '../use-theme';
3
+ import { useTheme } from '@helpdice/theme';
4
4
  var TreeStatusIcon = function TreeStatusIcon(_ref) {
5
5
  var color = _ref.color,
6
6
  _ref$width = _ref.width,
package/esm/tree/tree.js CHANGED
@@ -8,7 +8,7 @@ import TreeFolder from './tree-folder';
8
8
  import { TreeContext } from './tree-context';
9
9
  import { tuple } from '../utils/prop-types';
10
10
  import { sortChildren } from './tree-help';
11
- import useClasses from '../use-classes';
11
+ import { useClasses } from '@helpdice/theme';
12
12
  var FileTreeValueType = tuple('directory', 'file');
13
13
  var directoryType = FileTreeValueType[0];
14
14
  var _makeChildren = function makeChildren() {
@@ -2,7 +2,7 @@ import _typeof from "@babel/runtime/helpers/esm/typeof";
2
2
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
3
3
  /* "use client" */
4
4
 
5
- import useCurrentState from '../utils/use-current-state';
5
+ import { useCurrentState } from '@helpdice/theme';
6
6
  var useInput = function useInput(initialValue) {
7
7
  var _useCurrentState = useCurrentState(initialValue),
8
8
  _useCurrentState2 = _slicedToArray(_useCurrentState, 3),
@@ -1,7 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/esm/slicedToArray";
2
2
  /* "use client" */
3
3
 
4
- import useCurrentState from '../utils/use-current-state';
4
+ import { useCurrentState } from '@helpdice/theme';
5
5
  var useModal = function useModal() {
6
6
  var initialVisible = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
7
7
  var _useCurrentState = useCurrentState(initialVisible),
@@ -0,0 +1,2 @@
1
+ import useNetworkStatus from "./use-netowork-status";
2
+ export default useNetworkStatus;
@@ -0,0 +1,2 @@
1
+ import useNetworkStatus from "./use-netowork-status";
2
+ export default useNetworkStatus;
@@ -0,0 +1,4 @@
1
+ declare const useNetworkStatus: () => {
2
+ isOnline: boolean;
3
+ };
4
+ export default useNetworkStatus;