@helpdice/ui 2.5.4 → 2.5.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 (141) hide show
  1. package/dist/auto-complete/index.js +1273 -404
  2. package/dist/avatar/index.js +88 -49
  3. package/dist/badge/index.js +69 -27
  4. package/dist/breadcrumbs/index.js +107 -56
  5. package/dist/button/button.icon.d.ts +3 -16
  6. package/dist/button/button.small.d.ts +3 -16
  7. package/dist/button/index.js +143 -157
  8. package/dist/button-dropdown/index.js +96 -83
  9. package/dist/button-group/index.js +61 -21
  10. package/dist/capacity/index.js +61 -22
  11. package/dist/card/index.js +147 -123
  12. package/dist/carousal/index.js +349 -330
  13. package/dist/checkbox/index.js +72 -67
  14. package/dist/circular-progress/CircularProgress.d.ts +17 -0
  15. package/dist/circular-progress/index.d.ts +3 -4
  16. package/dist/circular-progress/index.js +713 -336
  17. package/dist/circular-progress/useCircularProgress.d.ts +12 -0
  18. package/dist/code/index.js +70 -26
  19. package/dist/col/index.js +61 -24
  20. package/dist/collapse/index.js +102 -52
  21. package/dist/container/index.js +187 -190
  22. package/dist/copy-to-clipboard/index.js +158 -210
  23. package/dist/description/index.js +64 -23
  24. package/dist/display/index.js +64 -23
  25. package/dist/divider/index.js +62 -22
  26. package/dist/dot/index.js +63 -23
  27. package/dist/drawer/index.js +74 -61
  28. package/dist/fieldset/index.js +127 -63
  29. package/dist/form/index.js +15 -40
  30. package/dist/grid/index.js +74 -29
  31. package/dist/html-renderer/index.js +3 -2
  32. package/dist/image/index.js +163 -104
  33. package/dist/index.d.ts +2 -1
  34. package/dist/index.js +5240 -4755
  35. package/dist/input/index.js +1183 -277
  36. package/dist/keyboard/index.js +73 -29
  37. package/dist/linear-progress/index.js +27 -24
  38. package/dist/link/index.js +78 -36
  39. package/dist/list/index.js +118 -63
  40. package/dist/loadable/index.js +76 -27
  41. package/dist/loading/index.js +70 -29
  42. package/dist/menu/index.js +53 -47
  43. package/dist/modal/index.js +225 -178
  44. package/dist/note/index.js +64 -23
  45. package/dist/notetip/index.js +54 -45
  46. package/dist/notetip/note-tip.d.ts +2 -0
  47. package/dist/page/index.js +102 -51
  48. package/dist/pagination/index.js +181 -124
  49. package/dist/placeholder/index.js +554 -538
  50. package/dist/popover/index.js +94 -81
  51. package/dist/progress/index.js +66 -27
  52. package/dist/radio/index.js +94 -48
  53. package/dist/rating/index.js +78 -38
  54. package/dist/row/index.js +62 -25
  55. package/dist/search-bar/index.js +172 -162
  56. package/dist/select/index.js +1098 -163
  57. package/dist/select/select.d.ts +2 -0
  58. package/dist/slider/index.js +91 -47
  59. package/dist/snippet/index.js +39 -39
  60. package/dist/spacer/index.js +58 -19
  61. package/dist/spinner/index.js +69 -28
  62. package/dist/swipe/index.js +28 -13
  63. package/dist/table/index.js +4162 -3863
  64. package/dist/table/table-body.d.ts +4 -3
  65. package/dist/table/table-cell.d.ts +4 -2
  66. package/dist/table/table-types.d.ts +2 -0
  67. package/dist/table/table.d.ts +5 -1
  68. package/dist/tabs/index.js +61 -59
  69. package/dist/tag/index.js +16 -20
  70. package/dist/text/index.js +187 -184
  71. package/dist/text/text.d.ts +3 -0
  72. package/dist/textarea/index.js +916 -36
  73. package/dist/textarea/textarea.d.ts +3 -0
  74. package/dist/toggle/index.js +75 -33
  75. package/dist/tooltip/index.d.ts +1 -2
  76. package/dist/tooltip/index.js +59 -53
  77. package/dist/tooltip/tooltip-content.d.ts +1 -1
  78. package/dist/tooltip/tooltip-small.d.ts +2 -5
  79. package/dist/tooltip/tooltip.d.ts +2 -1
  80. package/dist/tree/index.js +176 -115
  81. package/dist/use-scale/index.js +50 -13
  82. package/dist/user/index.js +152 -100
  83. package/esm/avatar/avatar.js +8 -6
  84. package/esm/button/button.icon.d.ts +3 -16
  85. package/esm/button/button.icon.js +22 -22
  86. package/esm/button/button.js +5 -5
  87. package/esm/button/button.small.d.ts +3 -16
  88. package/esm/button/button.small.js +20 -23
  89. package/esm/circular-progress/CircularProgress.d.ts +17 -0
  90. package/esm/circular-progress/CircularProgress.js +110 -0
  91. package/esm/circular-progress/index.d.ts +3 -4
  92. package/esm/circular-progress/index.js +3 -4
  93. package/esm/circular-progress/useCircularProgress.d.ts +12 -0
  94. package/esm/circular-progress/useCircularProgress.js +35 -0
  95. package/esm/index.d.ts +2 -1
  96. package/esm/index.js +1 -1
  97. package/esm/input/input-field.js +11 -9
  98. package/esm/list/list-item.js +11 -11
  99. package/esm/notetip/note-tip.d.ts +2 -0
  100. package/esm/notetip/note-tip.js +8 -5
  101. package/esm/pagination/pagination-item.js +6 -6
  102. package/esm/select/select.d.ts +2 -0
  103. package/esm/select/select.js +15 -2
  104. package/esm/skeleton/index.js +9 -4
  105. package/esm/table/table-body.d.ts +4 -3
  106. package/esm/table/table-body.js +25 -15
  107. package/esm/table/table-cell.d.ts +4 -2
  108. package/esm/table/table-cell.js +19 -3
  109. package/esm/table/table-types.d.ts +2 -0
  110. package/esm/table/table.d.ts +5 -1
  111. package/esm/table/table.js +52 -25
  112. package/esm/text/text.d.ts +3 -0
  113. package/esm/text/text.js +9 -2
  114. package/esm/textarea/textarea.d.ts +3 -0
  115. package/esm/textarea/textarea.js +19 -2
  116. package/esm/tooltip/index.d.ts +1 -2
  117. package/esm/tooltip/tooltip-content.d.ts +1 -1
  118. package/esm/tooltip/tooltip-content.js +5 -5
  119. package/esm/tooltip/tooltip-small.d.ts +2 -5
  120. package/esm/tooltip/tooltip-small.js +0 -1
  121. package/esm/tooltip/tooltip.d.ts +2 -1
  122. package/esm/tooltip/tooltip.js +6 -5
  123. package/package.json +3 -3
  124. package/dist/circular-progress/CircularProgressbar.d.ts +0 -10
  125. package/dist/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  126. package/dist/circular-progress/Path.d.ts +0 -9
  127. package/dist/circular-progress/buildStyles.d.ts +0 -12
  128. package/dist/circular-progress/constants.d.ts +0 -5
  129. package/dist/circular-progress/types.d.ts +0 -50
  130. package/esm/circular-progress/CircularProgressbar.d.ts +0 -10
  131. package/esm/circular-progress/CircularProgressbar.js +0 -118
  132. package/esm/circular-progress/CircularProgressbarWithChildren.d.ts +0 -7
  133. package/esm/circular-progress/CircularProgressbarWithChildren.js +0 -32
  134. package/esm/circular-progress/Path.d.ts +0 -9
  135. package/esm/circular-progress/Path.js +0 -52
  136. package/esm/circular-progress/buildStyles.d.ts +0 -12
  137. package/esm/circular-progress/buildStyles.js +0 -45
  138. package/esm/circular-progress/constants.d.ts +0 -5
  139. package/esm/circular-progress/constants.js +0 -5
  140. package/esm/circular-progress/types.d.ts +0 -50
  141. package/esm/circular-progress/types.js +0 -1
@@ -2,9 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var React = require('react');
5
+ var react = require('react');
6
6
  var framerMotion = require('framer-motion');
7
7
  var reactDom = require('@floating-ui/react-dom');
8
+ var jsxRuntime = require('react/jsx-runtime');
8
9
 
9
10
  function _arrayLikeToArray(r, a) {
10
11
  (null == a || a > r.length) && (a = r.length);
@@ -57,7 +58,7 @@ var Menu = function Menu(_ref) {
57
58
  children = _ref.children,
58
59
  _ref$placement = _ref.placement,
59
60
  placement = _ref$placement === void 0 ? 'bottom-start' : _ref$placement;
60
- var _useState = React.useState(false),
61
+ var _useState = react.useState(false),
61
62
  _useState2 = _slicedToArray(_useState, 2),
62
63
  open = _useState2[0],
63
64
  setOpen = _useState2[1];
@@ -74,14 +75,14 @@ var Menu = function Menu(_ref) {
74
75
  update = _useFloating.update;
75
76
 
76
77
  // Auto-update on layout changes
77
- React.useEffect(function () {
78
+ react.useEffect(function () {
78
79
  if (open && refs.reference.current && refs.floating.current) {
79
80
  return reactDom.autoUpdate(refs.reference.current, refs.floating.current, update);
80
81
  }
81
82
  }, [open, refs.reference, refs.floating, update]);
82
83
 
83
84
  // Close when clicking outside
84
- React.useEffect(function () {
85
+ react.useEffect(function () {
85
86
  var handleClickOutside = function handleClickOutside(event) {
86
87
  if (refs.reference.current && refs.floating.current && !refs.floating.current.contains(event.target)) {
87
88
  setOpen(false);
@@ -92,52 +93,57 @@ var Menu = function Menu(_ref) {
92
93
  return document.removeEventListener('mousedown', handleClickOutside);
93
94
  };
94
95
  }, [refs]);
95
- return /*#__PURE__*/React.createElement("div", {
96
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
96
97
  style: {
97
98
  display: 'inline-block'
98
- }
99
- }, /*#__PURE__*/React.createElement("div", {
100
- ref: refs.setReference,
101
- onClick: function onClick() {
102
- return setOpen(function (prev) {
103
- return !prev;
104
- });
105
- },
106
- style: {
107
- cursor: 'pointer'
108
- }
109
- }, anchor), /*#__PURE__*/React.createElement(framerMotion.AnimatePresence, null, open && /*#__PURE__*/React.createElement(framerMotion.motion.div, {
110
- ref: refs.setFloating,
111
- initial: {
112
- opacity: 0,
113
- scale: 0.95,
114
- y: -5
115
- },
116
- animate: {
117
- opacity: 1,
118
- scale: 1,
119
- y: 0
120
99
  },
121
- exit: {
122
- opacity: 0,
123
- scale: 0.95,
124
- y: -5
125
- },
126
- transition: {
127
- duration: 0.2,
128
- ease: 'easeOut'
129
- },
130
- style: {
131
- position: strategy,
132
- top: y !== null && y !== void 0 ? y : 0,
133
- left: x !== null && x !== void 0 ? x : 0,
134
- zIndex: 1000,
135
- boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
136
- minWidth: '150px'
137
- }
138
- }, typeof children === 'function' ? children(function () {
139
- return setOpen(false);
140
- }) : children)));
100
+ children: [/*#__PURE__*/jsxRuntime.jsx("div", {
101
+ ref: refs.setReference,
102
+ onClick: function onClick() {
103
+ return setOpen(function (prev) {
104
+ return !prev;
105
+ });
106
+ },
107
+ style: {
108
+ cursor: 'pointer'
109
+ },
110
+ children: anchor
111
+ }), /*#__PURE__*/jsxRuntime.jsx(framerMotion.AnimatePresence, {
112
+ children: open && /*#__PURE__*/jsxRuntime.jsx(framerMotion.motion.div, {
113
+ ref: refs.setFloating,
114
+ initial: {
115
+ opacity: 0,
116
+ scale: 0.95,
117
+ y: -5
118
+ },
119
+ animate: {
120
+ opacity: 1,
121
+ scale: 1,
122
+ y: 0
123
+ },
124
+ exit: {
125
+ opacity: 0,
126
+ scale: 0.95,
127
+ y: -5
128
+ },
129
+ transition: {
130
+ duration: 0.2,
131
+ ease: 'easeOut'
132
+ },
133
+ style: {
134
+ position: strategy,
135
+ top: y !== null && y !== void 0 ? y : 0,
136
+ left: x !== null && x !== void 0 ? x : 0,
137
+ zIndex: 1000,
138
+ boxShadow: '0 2px 8px rgba(0,0,0,0.15)',
139
+ minWidth: '150px'
140
+ },
141
+ children: typeof children === 'function' ? children(function () {
142
+ return setOpen(false);
143
+ }) : children
144
+ })
145
+ })]
146
+ });
141
147
  };
142
148
 
143
149
  exports.default = Menu;