@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.
- package/dist/CircularProgress/index.js +6 -6
- package/dist/Placeholder/index.js +41 -41
- package/dist/auto-complete/index.js +60 -60
- package/dist/avatar/index.js +28 -28
- package/dist/badge/index.js +27 -27
- package/dist/breadcrumbs/index.js +34 -34
- package/dist/button/button.compact.d.ts +2 -2
- package/dist/button/index.js +46 -45
- package/dist/button-dropdown/index.js +34 -34
- package/dist/button-group/index.js +25 -25
- package/dist/capacity/index.js +26 -26
- package/dist/card/index.js +44 -44
- package/dist/checkbox/index.js +30 -30
- package/dist/code/index.js +27 -27
- package/dist/col/index.js +8 -8
- package/dist/collapse/index.js +30 -30
- package/dist/css-baseline/index.js +6 -6
- package/dist/description/index.js +26 -26
- package/dist/display/index.js +26 -26
- package/dist/divider/index.js +26 -26
- package/dist/dot/index.js +25 -25
- package/dist/drawer/index.js +53 -53
- package/dist/fieldset/index.js +33 -33
- package/dist/form/FormWrapper.d.ts +7 -7
- package/dist/form/connect.d.ts +1 -0
- package/dist/grid/index.js +33 -33
- package/dist/html-renderer/index.d.ts +6 -0
- package/dist/image/index.js +37 -37
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1899 -547
- package/dist/input/index.js +40 -40
- package/dist/keyboard/index.js +28 -28
- package/dist/link/index.js +29 -29
- package/dist/loading/index.js +26 -26
- package/dist/modal/index.js +75 -75
- package/dist/note/index.js +27 -27
- package/dist/page/index.js +30 -30
- package/dist/pagination/index.js +27 -27
- package/dist/popover/index.js +57 -57
- package/dist/progress/index.js +29 -29
- package/dist/radio/index.js +30 -30
- package/dist/rating/index.js +29 -29
- package/dist/row/index.js +11 -11
- package/dist/search-bar/index.js +1826 -61
- package/dist/select/index.js +60 -60
- package/dist/slider/index.js +35 -35
- package/dist/snippet/index.js +30 -30
- package/dist/spacer/index.js +25 -25
- package/dist/spinner/index.js +24 -24
- package/dist/table/index.js +224 -211
- package/dist/tabs/index.js +39 -39
- package/dist/tag/index.js +26 -26
- package/dist/text/index.js +40 -40
- package/dist/textarea/index.js +29 -29
- package/dist/themes/index.js +2 -2
- package/dist/toggle/index.js +27 -27
- package/dist/tooltip/index.js +42 -42
- package/dist/tree/index.js +23 -23
- package/dist/ui-provider/index.js +48 -48
- package/dist/use-all-themes/index.js +2 -2
- package/dist/use-body-scroll/index.js +5 -5
- package/dist/use-clipboard/index.js +1 -1
- package/dist/use-current-state/index.js +1 -1
- package/dist/use-input/index.js +1 -1
- package/dist/use-keyboard/index.js +5 -5
- package/dist/use-media-query/index.js +5 -5
- package/dist/use-modal/index.js +1 -1
- package/dist/use-scale/index.js +19 -19
- package/dist/use-tabs/index.js +1 -1
- package/dist/use-theme/index.js +2 -2
- package/dist/use-toasts/index.js +3 -3
- package/dist/user/index.js +36 -36
- package/esm/button/button.compact.d.ts +2 -2
- package/esm/button/button.compact.js +4 -2
- package/esm/form/FastField.js +1 -1
- package/esm/form/FormWrapper.d.ts +7 -7
- package/esm/form/FormWrapper.js +2 -2
- package/esm/form/connect.d.ts +1 -0
- package/esm/form/connect.js +2 -1
- package/esm/html-renderer/index.d.ts +6 -0
- package/esm/html-renderer/index.js +12 -0
- package/esm/index.d.ts +1 -0
- package/esm/index.js +1 -0
- package/esm/link/link.js +2 -0
- package/esm/login-with/LoginSocialAmazon/index.js +162 -134
- package/esm/login-with/index.js +2 -0
- package/esm/search-bar/components/index.js +4 -7
- package/esm/table/data-table.js +6 -4
- package/esm/table/table.js +12 -1
- package/package.json +5 -3
- package/esm/formik-native/src/index.js +0 -12
- package/esm/formik-native/test/blah.test.js +0 -5
package/esm/login-with/index.js
CHANGED
|
@@ -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
|
|
6
|
+
import Fuse from 'fuse.js';
|
|
7
7
|
import React, { useEffect, useState } from 'react';
|
|
8
|
-
import { defaultFuseOptions
|
|
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
|
-
|
|
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);
|
package/esm/table/data-table.js
CHANGED
|
@@ -34,7 +34,7 @@ function DataTable(_ref) {
|
|
|
34
34
|
window.history.back();
|
|
35
35
|
} : _ref$onBack,
|
|
36
36
|
onRefresh = _ref.onRefresh,
|
|
37
|
-
|
|
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,
|
|
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',
|
package/esm/table/table.js
CHANGED
|
@@ -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.
|
|
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
|
-
"
|
|
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.
|
|
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
|
-
}
|