@helpdice/ui 1.4.9 → 1.5.1

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 (92) hide show
  1. package/dist/CircularProgress/index.js +6 -6
  2. package/dist/Placeholder/index.js +41 -41
  3. package/dist/auto-complete/index.js +60 -60
  4. package/dist/avatar/index.js +28 -28
  5. package/dist/badge/index.js +27 -27
  6. package/dist/breadcrumbs/index.js +34 -34
  7. package/dist/button/button.compact.d.ts +2 -2
  8. package/dist/button/index.js +46 -45
  9. package/dist/button-dropdown/index.js +34 -34
  10. package/dist/button-group/index.js +25 -25
  11. package/dist/capacity/index.js +26 -26
  12. package/dist/card/index.js +44 -44
  13. package/dist/checkbox/index.js +30 -30
  14. package/dist/code/index.js +27 -27
  15. package/dist/col/index.js +8 -8
  16. package/dist/collapse/index.js +30 -30
  17. package/dist/css-baseline/index.js +6 -6
  18. package/dist/description/index.js +26 -26
  19. package/dist/display/index.js +26 -26
  20. package/dist/divider/index.js +26 -26
  21. package/dist/dot/index.js +25 -25
  22. package/dist/drawer/index.js +53 -53
  23. package/dist/fieldset/index.js +33 -33
  24. package/dist/form/FormWrapper.d.ts +7 -7
  25. package/dist/form/connect.d.ts +1 -0
  26. package/dist/grid/index.js +33 -33
  27. package/dist/html-renderer/index.d.ts +6 -0
  28. package/dist/image/index.js +37 -37
  29. package/dist/index.d.ts +1 -0
  30. package/dist/index.js +1899 -547
  31. package/dist/input/index.js +40 -40
  32. package/dist/keyboard/index.js +28 -28
  33. package/dist/link/index.js +29 -29
  34. package/dist/loading/index.js +26 -26
  35. package/dist/modal/index.js +75 -75
  36. package/dist/note/index.js +27 -27
  37. package/dist/page/index.js +30 -30
  38. package/dist/pagination/index.js +27 -27
  39. package/dist/popover/index.js +57 -57
  40. package/dist/progress/index.js +29 -29
  41. package/dist/radio/index.js +30 -30
  42. package/dist/rating/index.js +29 -29
  43. package/dist/row/index.js +11 -11
  44. package/dist/search-bar/index.js +1826 -61
  45. package/dist/select/index.js +60 -60
  46. package/dist/slider/index.js +35 -35
  47. package/dist/snippet/index.js +30 -30
  48. package/dist/spacer/index.js +25 -25
  49. package/dist/spinner/index.js +24 -24
  50. package/dist/table/index.js +224 -211
  51. package/dist/tabs/index.js +39 -39
  52. package/dist/tag/index.js +26 -26
  53. package/dist/text/index.js +40 -40
  54. package/dist/textarea/index.js +29 -29
  55. package/dist/themes/index.js +2 -2
  56. package/dist/toggle/index.js +27 -27
  57. package/dist/tooltip/index.js +42 -42
  58. package/dist/tree/index.js +23 -23
  59. package/dist/ui-provider/index.js +48 -48
  60. package/dist/use-all-themes/index.js +2 -2
  61. package/dist/use-body-scroll/index.js +5 -5
  62. package/dist/use-clipboard/index.js +1 -1
  63. package/dist/use-current-state/index.js +1 -1
  64. package/dist/use-input/index.js +1 -1
  65. package/dist/use-keyboard/index.js +5 -5
  66. package/dist/use-media-query/index.js +5 -5
  67. package/dist/use-modal/index.js +1 -1
  68. package/dist/use-scale/index.js +19 -19
  69. package/dist/use-tabs/index.js +1 -1
  70. package/dist/use-theme/index.js +2 -2
  71. package/dist/use-toasts/index.js +3 -3
  72. package/dist/user/index.js +36 -36
  73. package/esm/button/button.compact.d.ts +2 -2
  74. package/esm/button/button.compact.js +4 -2
  75. package/esm/form/FastField.js +1 -1
  76. package/esm/form/FormWrapper.d.ts +7 -7
  77. package/esm/form/FormWrapper.js +2 -2
  78. package/esm/form/connect.d.ts +1 -0
  79. package/esm/form/connect.js +2 -1
  80. package/esm/html-renderer/index.d.ts +6 -0
  81. package/esm/html-renderer/index.js +12 -0
  82. package/esm/index.d.ts +1 -0
  83. package/esm/index.js +1 -0
  84. package/esm/link/link.js +2 -0
  85. package/esm/login-with/LoginSocialAmazon/index.js +162 -134
  86. package/esm/login-with/index.js +2 -0
  87. package/esm/search-bar/components/index.js +4 -7
  88. package/esm/table/data-table.js +6 -4
  89. package/esm/table/table.js +12 -1
  90. package/package.json +5 -3
  91. package/esm/formik-native/src/index.js +0 -12
  92. package/esm/formik-native/test/blah.test.js +0 -5
@@ -1,3 +1,5 @@
1
+ "use client";
2
+
1
3
  // export { default as LoginWithAmazon } from './LoginSocialAmazon';
2
4
  export { default as LoginWithFacebook } from './LoginSocialFacebook';
3
5
  export { default as LoginWithGoogle } from './LoginSocialGoogle';
@@ -3,9 +3,9 @@ import _extends from "@babel/runtime/helpers/esm/extends";
3
3
  import _JSXStyle from "../styled-jsx.es.js";
4
4
  /* "use client" */
5
5
 
6
- import { default as Fuse } from 'fuse.js';
6
+ import Fuse from 'fuse.js';
7
7
  import React, { useEffect, useState } from 'react';
8
- import { defaultFuseOptions, defaultTheme } from '../config/config';
8
+ import { defaultFuseOptions } from '../config/config'; // defaultTheme
9
9
  import { debounce } from '../utils/utils';
10
10
  import Results from './Results';
11
11
  import SearchInput from './SearchInput';
@@ -38,8 +38,6 @@ export default function ReactSearchAutocomplete(_ref) {
38
38
  placeholder = _ref$placeholder === void 0 ? '' : _ref$placeholder,
39
39
  _ref$autoFocus = _ref.autoFocus,
40
40
  autoFocus = _ref$autoFocus === void 0 ? false : _ref$autoFocus,
41
- _ref$styling = _ref.styling,
42
- styling = _ref$styling === void 0 ? {} : _ref$styling,
43
41
  _ref$resultStringKeyN = _ref.resultStringKeyName,
44
42
  resultStringKeyName = _ref$resultStringKeyN === void 0 ? 'name' : _ref$resultStringKeyN,
45
43
  _ref$inputSearchStrin = _ref.inputSearchString,
@@ -52,9 +50,8 @@ export default function ReactSearchAutocomplete(_ref) {
52
50
  _ref$showItemsOnFocus = _ref.showItemsOnFocus,
53
51
  showItemsOnFocus = _ref$showItemsOnFocus === void 0 ? false : _ref$showItemsOnFocus,
54
52
  _ref$maxLength = _ref.maxLength,
55
- maxLength = _ref$maxLength === void 0 ? 0 : _ref$maxLength,
56
- className = _ref.className;
57
- var theme = _extends({}, defaultTheme, styling);
53
+ maxLength = _ref$maxLength === void 0 ? 0 : _ref$maxLength;
54
+ // const theme = { ...defaultTheme, ...styling }
58
55
  var options = _extends({}, defaultFuseOptions, fuseOptions);
59
56
  var fuse = new Fuse(items, options);
60
57
  fuse.setCollection(items);
@@ -34,7 +34,7 @@ function DataTable(_ref) {
34
34
  window.history.back();
35
35
  } : _ref$onBack,
36
36
  onRefresh = _ref.onRefresh,
37
- onFilters = _ref.onFilters,
37
+ _onFilters = _ref.onFilters,
38
38
  onSelectedDelete = _ref.onSelectedDelete,
39
39
  onSelectedEdit = _ref.onSelectedEdit,
40
40
  onSelected = _ref.onSelected,
@@ -215,7 +215,7 @@ function DataTable(_ref) {
215
215
  },
216
216
  justify: "flex-end",
217
217
  alignContent: "center"
218
- }, menu, !children && !readOnly ? /*#__PURE__*/React.createElement(React.Fragment, null, onSelectedEdit && selected.length === 1 ? /*#__PURE__*/React.createElement(Tooltip, {
218
+ }, menu, !children && !readOnly ? /*#__PURE__*/React.createElement(React.Fragment, null, onSelected && onSelected, onSelectedEdit && selected.length === 1 ? /*#__PURE__*/React.createElement(Tooltip, {
219
219
  text: "Edit Selected",
220
220
  placement: "bottom",
221
221
  font: 0.8,
@@ -263,7 +263,7 @@ function DataTable(_ref) {
263
263
  scale: 2 / 3,
264
264
  px: 0.6,
265
265
  iconRight: /*#__PURE__*/React.createElement(Refresh, null)
266
- })) : null, onFilters && filter ? /*#__PURE__*/React.createElement(Tooltip, {
266
+ })) : null, _onFilters && filter ? /*#__PURE__*/React.createElement(Tooltip, {
267
267
  text: "Filters",
268
268
  placement: "bottomEnd",
269
269
  font: 0.8,
@@ -348,7 +348,9 @@ function DataTable(_ref) {
348
348
  onSelected: function onSelected(selected) {
349
349
  return setSelected(selected);
350
350
  },
351
- onFilters: onFilters,
351
+ onFilters: function onFilters(filters) {
352
+ return _onFilters && _onFilters(filters);
353
+ },
352
354
  data: rows,
353
355
  style: {
354
356
  borderCollapse: 'collapse',
@@ -111,6 +111,15 @@ function TableComponent(tableProps) {
111
111
  endIndex: endIndex
112
112
  };
113
113
  };
114
+ var _useState5 = useState({}),
115
+ _useState6 = _slicedToArray(_useState5, 2),
116
+ filters = _useState6[0],
117
+ setFilters = _useState6[1];
118
+ useEffect(function () {
119
+ if (onFilters) {
120
+ onFilters(filters);
121
+ }
122
+ }, [filters]);
114
123
  return /*#__PURE__*/React.createElement(TableContext.Provider, {
115
124
  value: contextValue
116
125
  }, /*#__PURE__*/React.createElement("table", _extends({
@@ -120,7 +129,9 @@ function TableComponent(tableProps) {
120
129
  }), /*#__PURE__*/React.createElement(TableHead, {
121
130
  stickyHeader: stickyHeader,
122
131
  columns: columns,
123
- onFilters: onFilters,
132
+ onFilters: function onFilters(filters) {
133
+ return setFilters(filters);
134
+ },
124
135
  showFilters: showFilters,
125
136
  width: width
126
137
  }), /*#__PURE__*/React.createElement(TableBody, {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@helpdice/ui",
3
- "version": "1.4.9",
3
+ "version": "1.5.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "esm/index.d.ts",
6
6
  "unpkg": "dist/index.min.js",
@@ -22,7 +22,7 @@
22
22
  "build:after": "node scripts/move-built-in.js",
23
23
  "build:types": "tsc -p ./scripts & tsc -p ./scripts --outDir ./esm",
24
24
  "build": "yarn build:rollup && yarn build:babel && yarn build:types && yarn build:after",
25
- "pusher": "yarn build && yarn publish --access public --non-interactive"
25
+ "release": "yarn build && yarn publish --access public --non-interactive"
26
26
  },
27
27
  "license": "MIT",
28
28
  "description": "Modern React UI library.",
@@ -80,7 +80,7 @@
80
80
  "extract-mdx-metadata": "^2.0.0",
81
81
  "fs-extra": "^11.3.0",
82
82
  "just-debounce-it": "^3.2.0",
83
- "next": "^15.1.6",
83
+ "next": "^15.1.7",
84
84
  "prettier": "^3.4.2",
85
85
  "react": "~18.3.1",
86
86
  "react-color": "^2.19.3",
@@ -100,6 +100,8 @@
100
100
  "babel-plugin-transform-rename-import": "^2.3.0",
101
101
  "clsx": "^2.1.1",
102
102
  "deepmerge": "^4.3.1",
103
+ "dompurify": "^3.2.4",
104
+ "fuse.js": "^7.1.0",
103
105
  "hoist-non-react-statics": "^3.3.2",
104
106
  "lodash": "^4.17.21",
105
107
  "lodash-es": "^4.17.21",
@@ -1,12 +0,0 @@
1
- import * as React from 'react';
2
- import { useFormikContext } from 'formik';
3
- export function useSubmitButton() {
4
- var _useFormikContext = useFormikContext(),
5
- submitForm = _useFormikContext.submitForm;
6
- var handlePress = React.useCallback(function (_ev) {
7
- submitForm();
8
- }, [submitForm]);
9
- return {
10
- onPress: handlePress
11
- };
12
- }
@@ -1,5 +0,0 @@
1
- describe('blah', function () {
2
- it('works', function () {
3
- expect(1).toEqual(1);
4
- });
5
- });