@helpdice/ui 1.6.9 → 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.
- package/dist/Placeholder/index.js +37 -16
- package/dist/auto-complete/index.js +37 -15
- package/dist/avatar/avatar.d.ts +2 -1
- package/dist/avatar/index.js +33 -13
- package/dist/badge/index.js +30 -11
- package/dist/breadcrumbs/index.js +30 -11
- package/dist/button/index.js +32 -12
- package/dist/button-dropdown/index.js +30 -11
- package/dist/button-group/index.js +30 -11
- package/dist/capacity/index.js +30 -11
- package/dist/card/index.js +30 -11
- package/dist/checkbox/index.js +30 -11
- package/dist/code/index.js +30 -11
- package/dist/col/index.js +21 -2
- package/dist/collapse/index.js +30 -11
- package/dist/css-baseline/index.js +24 -5
- package/dist/description/index.js +30 -11
- package/dist/display/index.js +30 -11
- package/dist/divider/index.js +30 -11
- package/dist/dot/index.js +30 -11
- package/dist/drawer/index.js +30 -11
- package/dist/fieldset/index.js +30 -11
- package/dist/grid/grid-container.d.ts +3 -3
- package/dist/grid/grid.d.ts +3 -3
- package/dist/grid/index.js +30 -11
- package/dist/image/index.js +30 -11
- package/dist/index.d.ts +3 -3
- package/dist/index.js +10950 -1486
- package/dist/input/index.js +34 -13
- package/dist/keyboard/index.js +30 -11
- package/dist/link/index.js +30 -11
- package/dist/list/index.d.ts +9 -0
- package/dist/list/index.js +1287 -0
- package/dist/list/list-item.d.ts +53 -0
- package/dist/list/list.d.ts +44 -0
- package/dist/loading/index.js +30 -11
- package/dist/menu/index.d.ts +2 -0
- package/dist/menu/index.js +10354 -0
- package/dist/menu/menu.d.ts +9 -0
- package/dist/modal/index.js +34 -13
- package/dist/note/index.js +30 -11
- package/dist/page/index.js +30 -11
- package/dist/pagination/index.js +30 -11
- package/dist/popover/index.js +30 -11
- package/dist/progress/index.js +30 -11
- package/dist/radio/index.js +30 -11
- package/dist/rating/index.js +30 -11
- package/dist/row/index.js +21 -2
- package/dist/search-bar/index.js +31 -12
- package/dist/select/index.js +30 -11
- package/dist/slider/index.js +30 -11
- package/dist/snippet/index.js +30 -11
- package/dist/spacer/index.js +30 -11
- package/dist/spinner/index.js +30 -11
- package/dist/table/index.d.ts +0 -1
- package/dist/table/index.js +1663 -2242
- package/dist/tabs/index.js +30 -11
- package/dist/tag/index.js +30 -11
- package/dist/text/index.js +37 -16
- package/dist/text/text.d.ts +1 -0
- package/dist/textarea/index.js +30 -11
- package/dist/toggle/index.js +30 -11
- package/dist/tooltip/index.js +30 -11
- package/dist/tree/index.js +21 -2
- package/dist/ui-provider/index.js +32 -12
- package/dist/use-scale/index.js +9 -9
- package/dist/user/index.js +33 -13
- package/esm/auto-complete/auto-complete.js +3 -2
- package/esm/avatar/avatar.d.ts +2 -1
- package/esm/avatar/avatar.js +3 -2
- package/esm/button/button.js +2 -1
- package/esm/code-block/index.js +17 -12
- package/esm/css-baseline/css-baseline.js +3 -3
- package/esm/form/FormWrapper.js +4 -4
- package/esm/grid/grid-container.d.ts +3 -3
- package/esm/grid/grid.d.ts +3 -3
- package/esm/index.d.ts +3 -3
- package/esm/index.js +3 -3
- package/esm/input/input.js +2 -1
- package/esm/input/password.js +2 -1
- package/esm/link/link.js +2 -2
- package/esm/list/index.d.ts +9 -0
- package/esm/list/index.js +8 -0
- package/esm/list/list-item.d.ts +53 -0
- package/esm/list/list-item.js +84 -0
- package/esm/list/list.d.ts +44 -0
- package/esm/list/list.js +29 -0
- package/esm/login-with/LoginSocialApple/index.js +17 -17
- package/esm/login-with/LoginSocialGithub/index.js +2 -2
- package/esm/login-with/LoginSocialInstagram/index.js +2 -2
- package/esm/login-with/LoginSocialLinkedin/index.js +2 -2
- package/esm/login-with/LoginSocialMicrosoft/index.js +2 -2
- package/esm/login-with/LoginSocialPinterest/index.js +9 -9
- package/esm/login-with/LoginSocialTiktok/index.js +2 -2
- package/esm/login-with/LoginSocialTwitter/index.js +11 -11
- package/esm/menu/index.d.ts +2 -0
- package/esm/menu/index.js +2 -0
- package/esm/menu/menu.d.ts +9 -0
- package/esm/menu/menu.js +92 -0
- package/esm/modal/modal-action.js +2 -1
- package/esm/table/index.d.ts +0 -1
- package/esm/table/index.js +0 -1
- package/esm/table/table-body.js +4 -23
- package/esm/text/child.js +3 -3
- package/esm/text/text.d.ts +1 -0
- package/esm/text/text.js +4 -2
- package/esm/tooltip/__test__/index.test.js +28 -28
- package/package.json +15 -11
- package/dist/cart/index.d.ts +0 -72
- package/dist/cart/useLocalStorage.d.ts +0 -1
- package/dist/table/data-table.d.ts +0 -44
- package/esm/cart/index.d.ts +0 -72
- package/esm/cart/index.js +0 -265
- package/esm/cart/useLocalStorage.d.ts +0 -1
- package/esm/cart/useLocalStorage.js +0 -29
- package/esm/table/data-table.d.ts +0 -44
- package/esm/table/data-table.js +0 -451
|
@@ -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;
|
package/dist/loading/index.js
CHANGED
|
@@ -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 ||
|
|
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
|
-
|
|
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
|
|
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((
|
|
1080
|
-
py: makeScaleHandler((
|
|
1081
|
-
mt: makeScaleHandler((
|
|
1082
|
-
mr: makeScaleHandler((
|
|
1083
|
-
mb: makeScaleHandler((
|
|
1084
|
-
ml: makeScaleHandler((
|
|
1085
|
-
mx: makeScaleHandler((
|
|
1086
|
-
my: makeScaleHandler((
|
|
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)
|