@helpdice/ui 1.6.8 → 1.7.0

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 (141) hide show
  1. package/dist/Placeholder/index.js +44 -23
  2. package/dist/auto-complete/auto-complete.d.ts +35 -3
  3. package/dist/auto-complete/index.js +45 -22
  4. package/dist/avatar/avatar.d.ts +2 -1
  5. package/dist/avatar/index.js +33 -13
  6. package/dist/badge/index.js +30 -11
  7. package/dist/breadcrumbs/index.js +31 -12
  8. package/dist/button/index.js +34 -14
  9. package/dist/button-dropdown/index.js +31 -12
  10. package/dist/button-group/index.js +30 -11
  11. package/dist/capacity/index.js +30 -11
  12. package/dist/card/index.js +31 -12
  13. package/dist/checkbox/index.js +31 -12
  14. package/dist/code/index.js +30 -11
  15. package/dist/code-block/index.d.ts +10 -0
  16. package/dist/col/index.js +21 -2
  17. package/dist/collapse/index.js +30 -11
  18. package/dist/css-baseline/index.js +24 -5
  19. package/dist/description/index.js +30 -11
  20. package/dist/display/index.js +30 -11
  21. package/dist/divider/index.js +30 -11
  22. package/dist/dot/index.js +30 -11
  23. package/dist/drawer/index.js +30 -11
  24. package/dist/fieldset/index.js +30 -11
  25. package/dist/grid/grid-container.d.ts +3 -3
  26. package/dist/grid/grid.d.ts +3 -3
  27. package/dist/grid/index.js +30 -11
  28. package/dist/image/index.js +31 -12
  29. package/dist/index.d.ts +4 -3
  30. package/dist/index.js +10994 -1501
  31. package/dist/input/index.js +36 -15
  32. package/dist/keyboard/index.js +30 -11
  33. package/dist/link/index.js +31 -12
  34. package/dist/list/index.d.ts +9 -0
  35. package/dist/list/index.js +1287 -0
  36. package/dist/list/list-item.d.ts +53 -0
  37. package/dist/list/list.d.ts +44 -0
  38. package/dist/loading/index.js +30 -11
  39. package/dist/menu/index.d.ts +2 -0
  40. package/dist/menu/index.js +10354 -0
  41. package/dist/menu/menu.d.ts +9 -0
  42. package/dist/modal/index.js +37 -16
  43. package/dist/note/index.js +30 -11
  44. package/dist/page/index.js +30 -11
  45. package/dist/pagination/index.js +30 -11
  46. package/dist/popover/index.js +30 -11
  47. package/dist/progress/index.js +30 -11
  48. package/dist/radio/index.js +30 -11
  49. package/dist/rating/index.js +31 -12
  50. package/dist/row/index.js +21 -2
  51. package/dist/search-bar/index.js +31 -12
  52. package/dist/select/index.js +33 -14
  53. package/dist/slider/index.js +30 -11
  54. package/dist/snippet/index.js +31 -12
  55. package/dist/spacer/index.js +30 -11
  56. package/dist/spinner/index.js +30 -11
  57. package/dist/table/index.d.ts +0 -1
  58. package/dist/table/index.js +1673 -2252
  59. package/dist/tabs/index.js +32 -13
  60. package/dist/tag/index.js +30 -11
  61. package/dist/text/child.d.ts +1 -1
  62. package/dist/text/index.js +44 -23
  63. package/dist/text/text.d.ts +2 -1
  64. package/dist/textarea/index.js +30 -11
  65. package/dist/toggle/index.js +30 -11
  66. package/dist/tooltip/index.js +30 -11
  67. package/dist/tree/index.js +21 -2
  68. package/dist/ui-provider/index.js +34 -14
  69. package/dist/use-scale/index.js +9 -9
  70. package/dist/user/index.js +34 -14
  71. package/dist/utils/collections.d.ts +1 -1
  72. package/esm/auto-complete/auto-complete.d.ts +35 -3
  73. package/esm/auto-complete/auto-complete.js +6 -6
  74. package/esm/avatar/avatar.d.ts +2 -1
  75. package/esm/avatar/avatar.js +3 -2
  76. package/esm/button/button-loading.js +1 -1
  77. package/esm/button/button.js +2 -1
  78. package/esm/button/styles.js +1 -1
  79. package/esm/button-dropdown/icon.js +1 -1
  80. package/esm/checkbox/checkbox.icon.js +1 -1
  81. package/esm/code-block/index.d.ts +10 -0
  82. package/esm/code-block/index.js +31 -27
  83. package/esm/css-baseline/css-baseline.js +3 -3
  84. package/esm/form/FormWrapper.js +4 -4
  85. package/esm/grid/grid-container.d.ts +3 -3
  86. package/esm/grid/grid.d.ts +3 -3
  87. package/esm/index.d.ts +4 -3
  88. package/esm/index.js +4 -4
  89. package/esm/input/input-block-label.js +1 -1
  90. package/esm/input/input-icon.js +1 -1
  91. package/esm/input/input.js +2 -1
  92. package/esm/input/password.js +2 -1
  93. package/esm/link/icon.js +1 -1
  94. package/esm/link/link.js +2 -2
  95. package/esm/list/index.d.ts +9 -0
  96. package/esm/list/index.js +8 -0
  97. package/esm/list/list-item.d.ts +53 -0
  98. package/esm/list/list-item.js +84 -0
  99. package/esm/list/list.d.ts +44 -0
  100. package/esm/list/list.js +29 -0
  101. package/esm/login-with/LoginSocialApple/index.js +17 -17
  102. package/esm/login-with/LoginSocialGithub/index.js +2 -2
  103. package/esm/login-with/LoginSocialInstagram/index.js +2 -2
  104. package/esm/login-with/LoginSocialLinkedin/index.js +2 -2
  105. package/esm/login-with/LoginSocialMicrosoft/index.js +2 -2
  106. package/esm/login-with/LoginSocialPinterest/index.js +9 -9
  107. package/esm/login-with/LoginSocialTiktok/index.js +2 -2
  108. package/esm/login-with/LoginSocialTwitter/index.js +11 -11
  109. package/esm/menu/index.d.ts +2 -0
  110. package/esm/menu/index.js +2 -0
  111. package/esm/menu/menu.d.ts +9 -0
  112. package/esm/menu/menu.js +92 -0
  113. package/esm/modal/modal-action.js +2 -1
  114. package/esm/modal/modal-actions.js +1 -1
  115. package/esm/rating/rating-icon.js +1 -1
  116. package/esm/select/select-icon.js +1 -1
  117. package/esm/select/select-input.js +1 -1
  118. package/esm/select/select-multiple-value.js +1 -1
  119. package/esm/snippet/snippet-icon.js +1 -1
  120. package/esm/table/index.d.ts +0 -1
  121. package/esm/table/index.js +0 -1
  122. package/esm/table/table-body.js +4 -23
  123. package/esm/tabs/tabs.js +2 -2
  124. package/esm/text/child.d.ts +1 -1
  125. package/esm/text/child.js +10 -10
  126. package/esm/text/text.d.ts +2 -1
  127. package/esm/text/text.js +4 -2
  128. package/esm/tooltip/__test__/index.test.js +30 -30
  129. package/esm/utils/collections.d.ts +1 -1
  130. package/esm/utils/collections.js +1 -1
  131. package/package.json +19 -12
  132. package/dist/cart/index.d.ts +0 -72
  133. package/dist/cart/useLocalStorage.d.ts +0 -1
  134. package/dist/table/data-table.d.ts +0 -44
  135. package/esm/cart/index.d.ts +0 -72
  136. package/esm/cart/index.js +0 -265
  137. package/esm/cart/useLocalStorage.d.ts +0 -1
  138. package/esm/cart/useLocalStorage.js +0 -29
  139. package/esm/table/data-table.d.ts +0 -44
  140. package/esm/table/data-table.js +0 -451
  141. /package/esm/utils/use-context-state/{create-geist-context.js → create-ui-context.js} +0 -0
@@ -0,0 +1,53 @@
1
+ import React from 'react';
2
+ interface Props {
3
+ line?: boolean;
4
+ direction?: string;
5
+ justify?: string;
6
+ alignItems?: string;
7
+ leading?: React.ReactNode;
8
+ primary?: string;
9
+ secondary?: string;
10
+ trailing?: React.ReactNode;
11
+ showTitle?: boolean;
12
+ disableAutoClose?: boolean;
13
+ selected?: boolean;
14
+ onClick?: (e: React.MouseEvent<HTMLDivElement>) => void;
15
+ }
16
+ type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
17
+ export type ListItemProps = Props & NativeAttrs;
18
+ declare const ListItem: React.ForwardRefExoticComponent<Props & NativeAttrs & {
19
+ children?: React.ReactNode | undefined;
20
+ } & {
21
+ width?: string | number;
22
+ height?: string | number;
23
+ padding?: string | number;
24
+ margin?: string | number;
25
+ w?: string | number;
26
+ h?: string | number;
27
+ paddingLeft?: string | number;
28
+ paddingRight?: string | number;
29
+ paddingTop?: string | number;
30
+ paddingBottom?: string | number;
31
+ pl?: string | number;
32
+ pr?: string | number;
33
+ pt?: string | number;
34
+ pb?: string | number;
35
+ marginLeft?: string | number;
36
+ marginRight?: string | number;
37
+ marginTop?: string | number;
38
+ marginBottom?: string | number;
39
+ ml?: string | number;
40
+ mr?: string | number;
41
+ mt?: string | number;
42
+ mb?: string | number;
43
+ px?: string | number;
44
+ py?: string | number;
45
+ mx?: string | number;
46
+ my?: string | number;
47
+ font?: string | number;
48
+ unit?: string;
49
+ scale?: number;
50
+ children?: any;
51
+ className?: string;
52
+ } & React.InputHTMLAttributes<any> & React.RefAttributes<unknown>>;
53
+ export default ListItem;
@@ -0,0 +1,44 @@
1
+ import React from "react";
2
+ interface Props {
3
+ heading?: any;
4
+ showHeading?: boolean;
5
+ secondary?: any;
6
+ className?: string;
7
+ children?: React.ReactNode;
8
+ }
9
+ type NativeAttrs = Omit<React.HTMLAttributes<any>, keyof Props>;
10
+ export type ListProps = Props & NativeAttrs;
11
+ declare const List: React.ForwardRefExoticComponent<Props & NativeAttrs & {
12
+ width?: string | number;
13
+ height?: string | number;
14
+ padding?: string | number;
15
+ margin?: string | number;
16
+ w?: string | number;
17
+ h?: string | number;
18
+ paddingLeft?: string | number;
19
+ paddingRight?: string | number;
20
+ paddingTop?: string | number;
21
+ paddingBottom?: string | number;
22
+ pl?: string | number;
23
+ pr?: string | number;
24
+ pt?: string | number;
25
+ pb?: string | number;
26
+ marginLeft?: string | number;
27
+ marginRight?: string | number;
28
+ marginTop?: string | number;
29
+ marginBottom?: string | number;
30
+ ml?: string | number;
31
+ mr?: string | number;
32
+ mt?: string | number;
33
+ mb?: string | number;
34
+ px?: string | number;
35
+ py?: string | number;
36
+ mx?: string | number;
37
+ my?: string | number;
38
+ font?: string | number;
39
+ unit?: string;
40
+ scale?: number;
41
+ children?: any;
42
+ className?: string;
43
+ } & React.InputHTMLAttributes<any> & React.RefAttributes<unknown>>;
44
+ export default List;
@@ -618,11 +618,12 @@ function requireIndex () {
618
618
 
619
619
  // Opt-into the new `useInsertionEffect` API in React 18, fallback to `useLayoutEffect`.
620
620
  // https://github.com/reactwg/react-18/discussions/110
621
- var useInsertionEffect = React__default["default"].useInsertionEffect || React__default["default"].useLayoutEffect;
621
+ var useInsertionEffect = React__default["default"].useInsertionEffect || React$1.useLayoutEffect;
622
622
  var defaultRegistry = typeof window !== "undefined" ? createStyleRegistry() : undefined;
623
623
  function JSXStyle(props) {
624
624
  var registry = defaultRegistry ? defaultRegistry : useStyleRegistry();
625
- // If `registry` does not exist, we do nothing here.
625
+ var insertionEffectCalled = React$1.useRef(false);
626
+ // `registry` might not exist while server-side rendering
626
627
  if (!registry) {
627
628
  return null;
628
629
  }
@@ -631,6 +632,24 @@ function requireIndex () {
631
632
  return null;
632
633
  }
633
634
  useInsertionEffect(function() {
635
+ // ReactDOM removes all DOM during hydration in certain cases
636
+ if (!document.head) {
637
+ return;
638
+ }
639
+ registry.add(props);
640
+ insertionEffectCalled.current = true;
641
+ return function() {
642
+ insertionEffectCalled.current = false;
643
+ registry.remove(props);
644
+ };
645
+ }, [
646
+ props.id,
647
+ String(props.dynamic)
648
+ ]);
649
+ React$1.useLayoutEffect(function() {
650
+ if (!document.head || insertionEffectCalled.current) {
651
+ return;
652
+ }
634
653
  registry.add(props);
635
654
  return function() {
636
655
  registry.remove(props);
@@ -1016,7 +1035,7 @@ var reduceScaleCoefficient = function reduceScaleCoefficient(scale) {
1016
1035
  };
1017
1036
  var withScale = function withScale(Render) {
1018
1037
  var ScaleFC = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1019
- var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31, _ref32, _ref33;
1038
+ var _ref2, _ref3, _ref4, _ref5, _ref6, _ref7, _ref8, _ref9, _ref0, _ref1, _ref10, _ref11, _ref12, _ref13, _ref14, _ref15, _ref16, _ref17, _ref18, _ref19, _ref20, _ref21, _ref22, _ref23, _ref24, _ref25, _ref26, _ref27, _ref28, _ref29, _ref30, _ref31;
1020
1039
  var children = _ref.children,
1021
1040
  props = _objectWithoutProperties(_ref, _excluded$1);
1022
1041
  var _useTheme = useTheme(),
@@ -1076,14 +1095,14 @@ var withScale = function withScale(Render) {
1076
1095
  pr: makeScaleHandler((_ref4 = (_ref5 = paddingRight !== null && paddingRight !== void 0 ? paddingRight : pr) !== null && _ref5 !== void 0 ? _ref5 : px) !== null && _ref4 !== void 0 ? _ref4 : padding),
1077
1096
  pb: makeScaleHandler((_ref6 = (_ref7 = paddingBottom !== null && paddingBottom !== void 0 ? paddingBottom : pb) !== null && _ref7 !== void 0 ? _ref7 : py) !== null && _ref6 !== void 0 ? _ref6 : padding),
1078
1097
  pl: makeScaleHandler((_ref8 = (_ref9 = paddingLeft !== null && paddingLeft !== void 0 ? paddingLeft : pl) !== null && _ref9 !== void 0 ? _ref9 : px) !== null && _ref8 !== void 0 ? _ref8 : padding),
1079
- px: makeScaleHandler((_ref10 = (_ref11 = (_ref12 = (_ref13 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref13 !== void 0 ? _ref13 : paddingRight) !== null && _ref12 !== void 0 ? _ref12 : pl) !== null && _ref11 !== void 0 ? _ref11 : pr) !== null && _ref10 !== void 0 ? _ref10 : padding),
1080
- py: makeScaleHandler((_ref14 = (_ref15 = (_ref16 = (_ref17 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref17 !== void 0 ? _ref17 : paddingBottom) !== null && _ref16 !== void 0 ? _ref16 : pt) !== null && _ref15 !== void 0 ? _ref15 : pb) !== null && _ref14 !== void 0 ? _ref14 : padding),
1081
- mt: makeScaleHandler((_ref18 = (_ref19 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref19 !== void 0 ? _ref19 : my) !== null && _ref18 !== void 0 ? _ref18 : margin),
1082
- mr: makeScaleHandler((_ref20 = (_ref21 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref21 !== void 0 ? _ref21 : mx) !== null && _ref20 !== void 0 ? _ref20 : margin),
1083
- mb: makeScaleHandler((_ref22 = (_ref23 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref23 !== void 0 ? _ref23 : my) !== null && _ref22 !== void 0 ? _ref22 : margin),
1084
- ml: makeScaleHandler((_ref24 = (_ref25 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref25 !== void 0 ? _ref25 : mx) !== null && _ref24 !== void 0 ? _ref24 : margin),
1085
- mx: makeScaleHandler((_ref26 = (_ref27 = (_ref28 = (_ref29 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref29 !== void 0 ? _ref29 : marginRight) !== null && _ref28 !== void 0 ? _ref28 : ml) !== null && _ref27 !== void 0 ? _ref27 : mr) !== null && _ref26 !== void 0 ? _ref26 : margin),
1086
- my: makeScaleHandler((_ref30 = (_ref31 = (_ref32 = (_ref33 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref33 !== void 0 ? _ref33 : marginBottom) !== null && _ref32 !== void 0 ? _ref32 : mt) !== null && _ref31 !== void 0 ? _ref31 : mb) !== null && _ref30 !== void 0 ? _ref30 : margin),
1098
+ px: makeScaleHandler((_ref0 = (_ref1 = (_ref10 = (_ref11 = px !== null && px !== void 0 ? px : paddingLeft) !== null && _ref11 !== void 0 ? _ref11 : paddingRight) !== null && _ref10 !== void 0 ? _ref10 : pl) !== null && _ref1 !== void 0 ? _ref1 : pr) !== null && _ref0 !== void 0 ? _ref0 : padding),
1099
+ py: makeScaleHandler((_ref12 = (_ref13 = (_ref14 = (_ref15 = py !== null && py !== void 0 ? py : paddingTop) !== null && _ref15 !== void 0 ? _ref15 : paddingBottom) !== null && _ref14 !== void 0 ? _ref14 : pt) !== null && _ref13 !== void 0 ? _ref13 : pb) !== null && _ref12 !== void 0 ? _ref12 : padding),
1100
+ mt: makeScaleHandler((_ref16 = (_ref17 = marginTop !== null && marginTop !== void 0 ? marginTop : mt) !== null && _ref17 !== void 0 ? _ref17 : my) !== null && _ref16 !== void 0 ? _ref16 : margin),
1101
+ mr: makeScaleHandler((_ref18 = (_ref19 = marginRight !== null && marginRight !== void 0 ? marginRight : mr) !== null && _ref19 !== void 0 ? _ref19 : mx) !== null && _ref18 !== void 0 ? _ref18 : margin),
1102
+ mb: makeScaleHandler((_ref20 = (_ref21 = marginBottom !== null && marginBottom !== void 0 ? marginBottom : mb) !== null && _ref21 !== void 0 ? _ref21 : my) !== null && _ref20 !== void 0 ? _ref20 : margin),
1103
+ ml: makeScaleHandler((_ref22 = (_ref23 = marginLeft !== null && marginLeft !== void 0 ? marginLeft : ml) !== null && _ref23 !== void 0 ? _ref23 : mx) !== null && _ref22 !== void 0 ? _ref22 : margin),
1104
+ mx: makeScaleHandler((_ref24 = (_ref25 = (_ref26 = (_ref27 = mx !== null && mx !== void 0 ? mx : marginLeft) !== null && _ref27 !== void 0 ? _ref27 : marginRight) !== null && _ref26 !== void 0 ? _ref26 : ml) !== null && _ref25 !== void 0 ? _ref25 : mr) !== null && _ref24 !== void 0 ? _ref24 : margin),
1105
+ my: makeScaleHandler((_ref28 = (_ref29 = (_ref30 = (_ref31 = my !== null && my !== void 0 ? my : marginTop) !== null && _ref31 !== void 0 ? _ref31 : marginBottom) !== null && _ref30 !== void 0 ? _ref30 : mt) !== null && _ref29 !== void 0 ? _ref29 : mb) !== null && _ref28 !== void 0 ? _ref28 : margin),
1087
1106
  width: makeScaleHandler(width !== null && width !== void 0 ? width : w),
1088
1107
  height: makeScaleHandler(height !== null && height !== void 0 ? height : h),
1089
1108
  font: makeScaleHandler(font)
@@ -0,0 +1,2 @@
1
+ import Menu from "./menu";
2
+ export default Menu;