@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
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;