@helpdice/ui 2.0.9 → 2.1.3

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 (64) hide show
  1. package/dist/AutoComplete/auto-complete.d.ts +1 -1
  2. package/dist/AutoComplete/index.js +1 -1
  3. package/dist/ButtonDropdown/index.js +2 -1
  4. package/dist/Carousal/component/Indicator.d.ts +1 -0
  5. package/dist/Carousal/component/Thumbs.d.ts +1 -1
  6. package/dist/Carousal/component/index.d.ts +1 -1
  7. package/dist/Carousal/component/types.d.ts +4 -3
  8. package/dist/Carousal/index.js +88 -38
  9. package/dist/Form/types.d.ts +2 -2
  10. package/dist/Grid/grid-container.d.ts +14 -0
  11. package/dist/Grid/grid.d.ts +14 -0
  12. package/dist/Input/index.js +1 -1
  13. package/dist/Popover/index.js +1 -1
  14. package/dist/Rating/rating.d.ts +1 -1
  15. package/dist/Select/index.js +6 -4
  16. package/dist/Table/index.js +8 -6
  17. package/dist/Table/table-types.d.ts +1 -1
  18. package/dist/Text/child.d.ts +1 -1
  19. package/dist/Textarea/index.js +1 -1
  20. package/dist/Tooltip/index.js +1 -1
  21. package/dist/Tree/index.js +3 -1
  22. package/dist/Tree/tree-help.d.ts +1 -1
  23. package/dist/index.d.ts +2 -0
  24. package/dist/index.js +250 -61
  25. package/dist/use-toasts/helpers.d.ts +17 -0
  26. package/dist/use-toasts/index.d.ts +3 -0
  27. package/dist/use-toasts/index.js +204 -0
  28. package/dist/use-toasts/use-toast.d.ts +40 -0
  29. package/dist/utils/use-drag.d.ts +1 -1
  30. package/dist/utils/use-hd-ui-context.d.ts +16 -0
  31. package/esm/AutoComplete/auto-complete.d.ts +1 -1
  32. package/esm/Carousal/component/Indicator.d.ts +1 -0
  33. package/esm/Carousal/component/Indicator.js +56 -13
  34. package/esm/Carousal/component/Thumbs.d.ts +1 -1
  35. package/esm/Carousal/component/Thumbs.js +3 -3
  36. package/esm/Carousal/component/index.d.ts +1 -1
  37. package/esm/Carousal/component/index.js +29 -22
  38. package/esm/Carousal/component/types.d.ts +4 -3
  39. package/esm/Carousal/main.js +42 -59
  40. package/esm/Form/types.d.ts +2 -2
  41. package/esm/Grid/grid-container.d.ts +14 -0
  42. package/esm/Grid/grid.d.ts +14 -0
  43. package/esm/Rating/rating.d.ts +1 -1
  44. package/esm/Select/select.js +4 -3
  45. package/esm/Table/table-types.d.ts +1 -1
  46. package/esm/Text/child.d.ts +1 -1
  47. package/esm/Textarea/textarea.js +1 -1
  48. package/esm/Tooltip/tooltip.js +1 -1
  49. package/esm/Tree/tree-help.d.ts +1 -1
  50. package/esm/Tree/tree-help.js +3 -1
  51. package/esm/index.d.ts +2 -0
  52. package/esm/index.js +2 -1
  53. package/esm/use-toasts/helpers.d.ts +17 -0
  54. package/esm/use-toasts/helpers.js +69 -0
  55. package/esm/use-toasts/index.d.ts +3 -0
  56. package/esm/use-toasts/index.js +2 -0
  57. package/esm/use-toasts/toast-container.js +118 -0
  58. package/esm/use-toasts/toast-item.js +42 -0
  59. package/esm/use-toasts/use-toast.d.ts +40 -0
  60. package/esm/use-toasts/use-toast.js +103 -0
  61. package/esm/utils/collections.js +2 -1
  62. package/esm/utils/use-drag.d.ts +1 -1
  63. package/esm/utils/use-hd-ui-context.d.ts +16 -0
  64. package/package.json +17 -15
@@ -27,7 +27,7 @@ interface Props {
27
27
  }
28
28
  type NativeAttrs = Omit<React.InputHTMLAttributes<any>, keyof Props>;
29
29
  export type AutoCompleteProps = Props & NativeAttrs & ReactElement;
30
- declare const AutoComplete: React.ForwardRefExoticComponent<Omit<Props & NativeAttrs & React.ReactElement<any, string | React.JSXElementConstructor<any>> & {
30
+ declare const AutoComplete: React.ForwardRefExoticComponent<Omit<Props & NativeAttrs & React.ReactElement<unknown, string | React.JSXElementConstructor<any>> & {
31
31
  children?: React.ReactNode | undefined;
32
32
  } & React.RefAttributes<HTMLInputElement> & {
33
33
  width?: string | number;
@@ -1239,7 +1239,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1239
1239
  var textareaRef = React.useRef(null);
1240
1240
  React.useImperativeHandle(ref, function () {
1241
1241
  return textareaRef.current;
1242
- });
1242
+ }); // added not null
1243
1243
  var isControlledComponent = React.useMemo(function () {
1244
1244
  return value !== undefined;
1245
1245
  }, [value]);
@@ -874,7 +874,8 @@ var pickChild = function pickChild(children, targetChild) {
874
874
  var pickChildByProps = function pickChildByProps(children, key, value) {
875
875
  var target = [];
876
876
  var isArray = Array.isArray(value);
877
- var withoutPropChildren = React.Children.map(children, function (item) {
877
+ var withoutPropChildren = React.Children.map(children, function (_item) {
878
+ var item = _item;
878
879
  if (! /*#__PURE__*/React.isValidElement(item)) return null;
879
880
  if (!item.props) return item;
880
881
  if (isArray) {
@@ -4,6 +4,7 @@ interface IndicatorProps {
4
4
  isSelected: boolean;
5
5
  index: number;
6
6
  label: string;
7
+ type: string;
7
8
  }
8
9
  declare const Indicator: React.FC<IndicatorProps>;
9
10
  export default Indicator;
@@ -1,7 +1,7 @@
1
1
  import React, { Component } from 'react';
2
2
  export interface Props {
3
3
  axis: 'horizontal' | 'vertical';
4
- children: React.ReactChild[];
4
+ children: React.ReactNode[];
5
5
  labels: {
6
6
  leftArrow: string;
7
7
  rightArrow: string;
@@ -79,7 +79,7 @@ export default class Carousel extends React.Component<CarouselProps, CarouselSta
79
79
  selectItem: (state: Pick<CarouselState, "selectedItem" | "swiping">) => void;
80
80
  getInitialImage: () => HTMLImageElement;
81
81
  getVariableItemHeight: (position: number) => number | null;
82
- renderItems(isClone?: boolean): React.JSX.Element[];
82
+ renderItems(isClone?: boolean): React.JSX.Element[] | null | undefined;
83
83
  renderControls(): React.JSX.Element | null;
84
84
  renderStatus(): React.JSX.Element | null;
85
85
  renderThumbs(): React.JSX.Element | null;
@@ -17,7 +17,7 @@ export interface CarouselProps {
17
17
  autoPlay?: boolean;
18
18
  centerMode?: boolean;
19
19
  centerSlidePercentage: number;
20
- children?: React.ReactChild[];
20
+ children?: React.ReactNode[];
21
21
  className?: string;
22
22
  dynamicHeight?: boolean;
23
23
  emulateTouch?: boolean;
@@ -37,16 +37,17 @@ export interface CarouselProps {
37
37
  preventMovementUntilSwipeScrollTolerance: boolean;
38
38
  renderArrowPrev: (clickHandler: () => void, hasPrev: boolean, label: string) => React.ReactNode;
39
39
  renderArrowNext: (clickHandler: () => void, hasNext: boolean, label: string) => React.ReactNode;
40
- renderIndicator: (clickHandler: (e: React.MouseEvent | React.KeyboardEvent) => void, isSelected: boolean, index: number, label: string) => React.ReactNode;
40
+ renderIndicator: (clickHandler: (e: React.MouseEvent | React.KeyboardEvent) => void, isSelected: boolean, index: number, label: string, type: string) => React.ReactNode;
41
41
  renderItem: (item: React.ReactNode, options?: {
42
42
  isSelected: boolean;
43
43
  isPrevious: boolean;
44
44
  }) => React.ReactNode;
45
- renderThumbs: (children: React.ReactChild[]) => React.ReactChild[];
45
+ renderThumbs: (children: React.ReactNode[]) => React.ReactNode[];
46
46
  selectedItem: number;
47
47
  showArrows: boolean;
48
48
  showStatus: boolean;
49
49
  showIndicators: boolean;
50
+ indicator: string;
50
51
  showThumbs: boolean;
51
52
  statusFormatter: (currentItem: number, total: number) => string;
52
53
  stopOnHover: boolean;
@@ -3030,10 +3030,10 @@ var Thumbs = /*#__PURE__*/function (_Component) {
3030
3030
  return /*#__PURE__*/React.createElement("li", _extends({}, thumbProps, {
3031
3031
  role: "button",
3032
3032
  tabIndex: 0,
3033
- className: "jsx-2129274269" + " " + (thumbProps && thumbProps.className != null && thumbProps.className || "")
3033
+ className: "jsx-2625056898" + " " + (thumbProps && thumbProps.className != null && thumbProps.className || "")
3034
3034
  }), img, /*#__PURE__*/React.createElement(_JSXStyle, {
3035
- id: "2129274269"
3036
- }, ".thumb.jsx-2129274269{-webkit-transition:border 0.15s ease-in;transition:border 0.15s ease-in;display:inline-block;margin-right:6px;margin-bottom:0 !important;white-space:nowrap;overflow:hidden;border:3px solid #fff;padding:2px;}.thumb.jsx-2129274269:focus{border:3px solid #ccc;outline:none;}.thumb.selected.jsx-2129274269,.thumb.jsx-2129274269:hover{border:3px solid #0099ff;}.thumb.jsx-2129274269 img.jsx-2129274269{vertical-align:top;}"));
3035
+ id: "2625056898"
3036
+ }, ".thumb.jsx-2625056898{-webkit-transition:border 0.15s ease-in;transition:border 0.15s ease-in;display:inline-block;margin-right:6px;margin-bottom:0 !important;white-space:nowrap;overflow:hidden;border:3px solid #fff;padding:2px;}.thumb.jsx-2625056898:focus{border:3px solid #ccc;outline:none;}.thumb.selected.jsx-2625056898,.thumb.jsx-2625056898:hover{border:3px solid #0099ff;}.thumb.jsx-2625056898 img.jsx-2625056898{vertical-align:top;}"));
3037
3037
  });
3038
3038
  }
3039
3039
  }, {
@@ -3217,19 +3217,62 @@ var Indicator = function Indicator(_ref) {
3217
3217
  var onClickHandler = _ref.onClickHandler,
3218
3218
  isSelected = _ref.isSelected,
3219
3219
  index = _ref.index,
3220
- label = _ref.label;
3221
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
3222
- onClick: onClickHandler,
3223
- onKeyDown: onClickHandler,
3224
- value: index,
3225
- key: index,
3226
- role: "button",
3227
- tabIndex: 0,
3228
- "aria-label": "".concat(label, " ").concat(index + 1),
3229
- className: "jsx-3056554148" + " " + (klass.DOT(isSelected) || "")
3230
- }), /*#__PURE__*/React.createElement(_JSXStyle, {
3231
- id: "3056554148"
3232
- }, ".dot.jsx-3056554148{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;border-radius:50%;width:8px;height:8px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-3056554148,.dot.jsx-3056554148:hover{opacity:1;}"));
3220
+ label = _ref.label,
3221
+ type = _ref.type;
3222
+ switch (type) {
3223
+ case 'line':
3224
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
3225
+ onClick: onClickHandler,
3226
+ onKeyDown: onClickHandler,
3227
+ value: index,
3228
+ key: index,
3229
+ role: "button",
3230
+ tabIndex: 0,
3231
+ "aria-label": "".concat(label, " ").concat(index + 1),
3232
+ className: "jsx-110677664" + " " + (klass.DOT(isSelected) || "")
3233
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
3234
+ id: "110677664"
3235
+ }, ".dot.jsx-110677664{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;width:14px;height:2px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-110677664,.dot.jsx-110677664:hover{opacity:1;}"));
3236
+ case 'square':
3237
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
3238
+ onClick: onClickHandler,
3239
+ onKeyDown: onClickHandler,
3240
+ value: index,
3241
+ key: index,
3242
+ role: "button",
3243
+ tabIndex: 0,
3244
+ "aria-label": "".concat(label, " ").concat(index + 1),
3245
+ className: "jsx-157344968" + " " + (klass.DOT(isSelected) || "")
3246
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
3247
+ id: "157344968"
3248
+ }, ".dot.jsx-157344968{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;width:8px;height:8px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-157344968,.dot.jsx-157344968:hover{opacity:1;}"));
3249
+ case 'pill':
3250
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
3251
+ onClick: onClickHandler,
3252
+ onKeyDown: onClickHandler,
3253
+ value: index,
3254
+ key: index,
3255
+ role: "button",
3256
+ tabIndex: 0,
3257
+ "aria-label": "".concat(label, " ").concat(index + 1),
3258
+ className: "jsx-2836895747" + " " + (klass.DOT(isSelected) || "")
3259
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
3260
+ id: "2836895747"
3261
+ }, ".dot.jsx-2836895747{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;border-radius:25px;width:20px;height:5px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-2836895747,.dot.jsx-2836895747:hover{opacity:1;}"));
3262
+ default:
3263
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("li", {
3264
+ onClick: onClickHandler,
3265
+ onKeyDown: onClickHandler,
3266
+ value: index,
3267
+ key: index,
3268
+ role: "button",
3269
+ tabIndex: 0,
3270
+ "aria-label": "".concat(label, " ").concat(index + 1),
3271
+ className: "jsx-3056554148" + " " + (klass.DOT(isSelected) || "")
3272
+ }), /*#__PURE__*/React.createElement(_JSXStyle, {
3273
+ id: "3056554148"
3274
+ }, ".dot.jsx-3056554148{-webkit-transition:opacity 0.25s ease-in;transition:opacity 0.25s ease-in;opacity:0.3;box-shadow:1px 1px 2px rgba(0,0,0,0.9);background:#fff;border-radius:50%;width:8px;height:8px;cursor:pointer;display:inline-block;margin:0 8px;}.dot.selected.jsx-3056554148,.dot.jsx-3056554148:hover{opacity:1;}"));
3275
+ }
3233
3276
  };
3234
3277
 
3235
3278
  /**
@@ -3683,7 +3726,8 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
3683
3726
  itemListStyle: {},
3684
3727
  slideStyle: {},
3685
3728
  selectedStyle: {},
3686
- prevStyle: {}
3729
+ prevStyle: {},
3730
+ indicator: 'dot'
3687
3731
  };
3688
3732
  _this.animationHandler = typeof props.animationHandler === 'function' && props.animationHandler || props.animationHandler === 'fade' && fadeAnimationHandler || slideAnimationHandler;
3689
3733
  _this.state = _objectSpread2(_objectSpread2({}, initState), _this.animationHandler(props, initState));
@@ -3846,13 +3890,13 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
3846
3890
  style: style
3847
3891
  };
3848
3892
  return /*#__PURE__*/React.createElement("li", _extends({}, slideProps, {
3849
- className: "jsx-2755164558" + " " + (slideProps && slideProps.className != null && slideProps.className || "")
3893
+ className: "jsx-4120978495" + " " + (slideProps && slideProps.className != null && slideProps.className || "")
3850
3894
  }), _this3.props.renderItem(item, {
3851
3895
  isSelected: index === _this3.state.selectedItem,
3852
3896
  isPrevious: index === _this3.state.previousItem
3853
3897
  }), /*#__PURE__*/React.createElement(_JSXStyle, {
3854
- id: "2755164558"
3855
- }, ".slide.jsx-2755164558{min-width:100%;margin:0;position:relative;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}img.jsx-2755164558{width:100%;vertical-align:top;border:0;}iframe.jsx-2755164558{display:inline-block;width:calc(100% - 80px);margin:0 40px 40px;border:0;}.legend.jsx-2755164558{-webkit-transition:opacity 0.35s ease-in-out;transition:opacity 0.35s ease-in-out;position:absolute;bottom:40px;left:50%;margin-left:-45%;width:90%;border-radius:10px;background:#000;color:#fff;padding:10px;font-size:12px;text-align:center;opacity:0.25;}.slide.jsx-2755164558 .legend.jsx-2755164558{opacity:1;}"));
3898
+ id: "4120978495"
3899
+ }, ".slide.jsx-4120978495{min-width:100%;margin:0;position:relative;text-align:center;display:-webkit-box;display:-webkit-flex;display:-ms-flexbox;display:flex;-webkit-flex-direction:column;-ms-flex-direction:column;flex-direction:column;}img.jsx-4120978495{width:100%;vertical-align:top;border:0;}iframe.jsx-4120978495{display:inline-block;width:calc(100% - 80px);margin:0 40px 40px;border:0;}.legend.jsx-4120978495{-webkit-transition:opacity 0.35s ease-in-out;transition:opacity 0.35s ease-in-out;position:absolute;bottom:40px;left:50%;margin-left:-45%;width:90%;border-radius:10px;background:#000;color:#fff;padding:10px;font-size:12px;text-align:center;opacity:0.25;}.slide.jsx-4120978495 .legend.jsx-4120978495{opacity:1;}"));
3856
3900
  });
3857
3901
  }
3858
3902
  }, {
@@ -3863,14 +3907,15 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
3863
3907
  showIndicators = _this$props.showIndicators,
3864
3908
  labels = _this$props.labels,
3865
3909
  renderIndicator = _this$props.renderIndicator,
3866
- children = _this$props.children;
3910
+ children = _this$props.children,
3911
+ indicator = _this$props.indicator;
3867
3912
  if (!showIndicators) {
3868
3913
  return null;
3869
3914
  }
3870
3915
  return /*#__PURE__*/React.createElement("ul", {
3871
3916
  className: "jsx-4140983776" + " " + "control-dots"
3872
3917
  }, React.Children.map(children, function (_, index) {
3873
- return renderIndicator && renderIndicator(_this4.changeItem(index), index === _this4.state.selectedItem, index, labels.item);
3918
+ return renderIndicator && renderIndicator(_this4.changeItem(index), index === _this4.state.selectedItem, index, labels.item, indicator);
3874
3919
  }), /*#__PURE__*/React.createElement(_JSXStyle, {
3875
3920
  id: "4140983776"
3876
3921
  }, ".control-dots.jsx-4140983776{position:absolute;bottom:0;margin:10px 0;padding:0;text-align:center;width:100%;z-index:1;}"));
@@ -3919,8 +3964,9 @@ var Carousel = /*#__PURE__*/function (_React$Component) {
3919
3964
  // show right arrow
3920
3965
  var hasNext = canShowArrows && (this.state.selectedItem < React.Children.count(this.props.children) - 1 || this.props.infiniteLoop) || false;
3921
3966
  var itemsClone = this.renderItems(true);
3922
- var firstClone = itemsClone.shift();
3923
- var lastClone = itemsClone.pop();
3967
+ var firstClone = itemsClone.shift(); // added not null
3968
+ var lastClone = itemsClone.pop(); // added not null
3969
+
3924
3970
  var swiperProps = {
3925
3971
  className: klass.SLIDER(true, this.state.swiping),
3926
3972
  onSwipeMove: this.onSwipeMove,
@@ -4017,8 +4063,9 @@ _defineProperty(Carousel, "defaultProps", {
4017
4063
  label: label
4018
4064
  });
4019
4065
  },
4020
- renderIndicator: function renderIndicator(onClickHandler, isSelected, index, label) {
4066
+ renderIndicator: function renderIndicator(onClickHandler, isSelected, index, label, type) {
4021
4067
  return /*#__PURE__*/React.createElement(Indicator, {
4068
+ type: type,
4022
4069
  onClickHandler: onClickHandler,
4023
4070
  isSelected: isSelected,
4024
4071
  index: index,
@@ -4030,26 +4077,28 @@ _defineProperty(Carousel, "defaultProps", {
4030
4077
  },
4031
4078
  renderThumbs: function renderThumbs(children) {
4032
4079
  var images = React.Children.map(children, function (item) {
4033
- var img = item;
4080
+ var _item = item;
4081
+ if (! /*#__PURE__*/React.isValidElement(_item)) return undefined;
4034
4082
 
4035
- // if the item is not an image, try to find the first image in the item's children.
4036
- if (item.type !== 'img') {
4037
- img = React.Children.toArray(item.props.children).find(function (children) {
4038
- return children.type === 'img';
4039
- });
4083
+ // Directly an <img> element
4084
+ if (_item.type === 'img') {
4085
+ return item;
4040
4086
  }
4041
- if (!img) {
4042
- return undefined;
4043
- }
4044
- return img;
4087
+
4088
+ // If not <img>, search its children
4089
+ var childArray = React.Children.toArray(_item.props.children);
4090
+ var foundImg = childArray.find(function (child) {
4091
+ return /*#__PURE__*/React.isValidElement(child) && child.type === 'img';
4092
+ });
4093
+ return foundImg !== null && foundImg !== void 0 ? foundImg : undefined;
4045
4094
  });
4046
- if (images.filter(function (image) {
4095
+ if ((images === null || images === void 0 ? void 0 : images.filter(function (image) {
4047
4096
  return image;
4048
- }).length === 0) {
4097
+ }).length) === 0) {
4049
4098
  console.warn("No images found! Can't build the thumb list without images. If you don't need thumbs, set showThumbs={false} in the Carousel. Note that it's not possible to get images rendered inside custom components. More info at https://github.com/leandrowd/react-responsive-carousel/blob/master/TROUBLESHOOTING.md");
4050
4099
  return [];
4051
4100
  }
4052
- return images;
4101
+ return images !== null && images !== void 0 ? images : [];
4053
4102
  },
4054
4103
  statusFormatter: defaultStatusFormatter,
4055
4104
  selectedItem: 0,
@@ -4063,6 +4112,7 @@ _defineProperty(Carousel, "defaultProps", {
4063
4112
  transitionTime: 350,
4064
4113
  verticalSwipe: 'standard',
4065
4114
  width: '100%',
4115
+ indicator: 'dot',
4066
4116
  animationHandler: 'slide',
4067
4117
  swipeAnimationHandler: slideSwipeAnimationHandler,
4068
4118
  stopSwipingHandler: slideStopSwipingHandler
@@ -196,7 +196,7 @@ export interface SharedRenderProps<T> {
196
196
  /**
197
197
  * Field component to render. Can either be a string like 'select' or a component.
198
198
  */
199
- component?: keyof JSX.IntrinsicElements | React.ComponentType<T | void>;
199
+ component?: keyof React.JSX.IntrinsicElements | React.ComponentType<T | void>;
200
200
  /**
201
201
  * Render prop (works like React router's <Route render={props =>} />)
202
202
  */
@@ -206,7 +206,7 @@ export interface SharedRenderProps<T> {
206
206
  */
207
207
  children?: (props: T) => React.ReactNode;
208
208
  }
209
- export type GenericFieldHTMLAttributes = JSX.IntrinsicElements['input'] | JSX.IntrinsicElements['select'] | JSX.IntrinsicElements['textarea'];
209
+ export type GenericFieldHTMLAttributes = React.JSX.IntrinsicElements['input'] | React.JSX.IntrinsicElements['select'] | React.JSX.IntrinsicElements['textarea'];
210
210
  /** Field metadata */
211
211
  export interface FieldMetaProps<Value> {
212
212
  /** Value of the field */
@@ -57,6 +57,10 @@ declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./b
57
57
  results?: number | undefined | undefined;
58
58
  security?: string | undefined | undefined;
59
59
  unselectable?: "on" | "off" | undefined | undefined;
60
+ popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
61
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
62
+ popoverTarget?: string | undefined | undefined;
63
+ inert?: boolean | undefined | undefined;
60
64
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
61
65
  is?: string | undefined | undefined;
62
66
  exportparts?: string | undefined | undefined;
@@ -263,6 +267,8 @@ declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./b
263
267
  onLostPointerCaptureCapture?: React.PointerEventHandler<any> | undefined;
264
268
  onScroll?: React.UIEventHandler<any> | undefined;
265
269
  onScrollCapture?: React.UIEventHandler<any> | undefined;
270
+ onScrollEnd?: React.UIEventHandler<any> | undefined;
271
+ onScrollEndCapture?: React.UIEventHandler<any> | undefined;
266
272
  onWheel?: React.WheelEventHandler<any> | undefined;
267
273
  onWheelCapture?: React.WheelEventHandler<any> | undefined;
268
274
  onAnimationStart?: React.AnimationEventHandler<any> | undefined;
@@ -271,8 +277,16 @@ declare const GridContainer: React.ForwardRefExoticComponent<Props & import("./b
271
277
  onAnimationEndCapture?: React.AnimationEventHandler<any> | undefined;
272
278
  onAnimationIteration?: React.AnimationEventHandler<any> | undefined;
273
279
  onAnimationIterationCapture?: React.AnimationEventHandler<any> | undefined;
280
+ onToggle?: React.ToggleEventHandler<any> | undefined;
281
+ onBeforeToggle?: React.ToggleEventHandler<any> | undefined;
282
+ onTransitionCancel?: React.TransitionEventHandler<any> | undefined;
283
+ onTransitionCancelCapture?: React.TransitionEventHandler<any> | undefined;
274
284
  onTransitionEnd?: React.TransitionEventHandler<any> | undefined;
275
285
  onTransitionEndCapture?: React.TransitionEventHandler<any> | undefined;
286
+ onTransitionRun?: React.TransitionEventHandler<any> | undefined;
287
+ onTransitionRunCapture?: React.TransitionEventHandler<any> | undefined;
288
+ onTransitionStart?: React.TransitionEventHandler<any> | undefined;
289
+ onTransitionStartCapture?: React.TransitionEventHandler<any> | undefined;
276
290
  } & {
277
291
  width?: string | number;
278
292
  height?: string | number;
@@ -54,6 +54,10 @@ declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item
54
54
  results?: number | undefined | undefined;
55
55
  security?: string | undefined | undefined;
56
56
  unselectable?: "on" | "off" | undefined | undefined;
57
+ popover?: "" | "auto" | "manual" | "hint" | undefined | undefined;
58
+ popoverTargetAction?: "toggle" | "show" | "hide" | undefined | undefined;
59
+ popoverTarget?: string | undefined | undefined;
60
+ inert?: boolean | undefined | undefined;
57
61
  inputMode?: "none" | "text" | "tel" | "url" | "email" | "numeric" | "decimal" | "search" | undefined | undefined;
58
62
  is?: string | undefined | undefined;
59
63
  exportparts?: string | undefined | undefined;
@@ -260,6 +264,8 @@ declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item
260
264
  onLostPointerCaptureCapture?: React.PointerEventHandler<any> | undefined;
261
265
  onScroll?: React.UIEventHandler<any> | undefined;
262
266
  onScrollCapture?: React.UIEventHandler<any> | undefined;
267
+ onScrollEnd?: React.UIEventHandler<any> | undefined;
268
+ onScrollEndCapture?: React.UIEventHandler<any> | undefined;
263
269
  onWheel?: React.WheelEventHandler<any> | undefined;
264
270
  onWheelCapture?: React.WheelEventHandler<any> | undefined;
265
271
  onAnimationStart?: React.AnimationEventHandler<any> | undefined;
@@ -268,8 +274,16 @@ declare const Grid: React.ForwardRefExoticComponent<Props & import("./basic-item
268
274
  onAnimationEndCapture?: React.AnimationEventHandler<any> | undefined;
269
275
  onAnimationIteration?: React.AnimationEventHandler<any> | undefined;
270
276
  onAnimationIterationCapture?: React.AnimationEventHandler<any> | undefined;
277
+ onToggle?: React.ToggleEventHandler<any> | undefined;
278
+ onBeforeToggle?: React.ToggleEventHandler<any> | undefined;
279
+ onTransitionCancel?: React.TransitionEventHandler<any> | undefined;
280
+ onTransitionCancelCapture?: React.TransitionEventHandler<any> | undefined;
271
281
  onTransitionEnd?: React.TransitionEventHandler<any> | undefined;
272
282
  onTransitionEndCapture?: React.TransitionEventHandler<any> | undefined;
283
+ onTransitionRun?: React.TransitionEventHandler<any> | undefined;
284
+ onTransitionRunCapture?: React.TransitionEventHandler<any> | undefined;
285
+ onTransitionStart?: React.TransitionEventHandler<any> | undefined;
286
+ onTransitionStartCapture?: React.TransitionEventHandler<any> | undefined;
273
287
  } & {
274
288
  width?: string | number;
275
289
  height?: string | number;
@@ -1222,7 +1222,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1222
1222
  var textareaRef = React.useRef(null);
1223
1223
  React.useImperativeHandle(ref, function () {
1224
1224
  return textareaRef.current;
1225
- });
1225
+ }); // added not null
1226
1226
  var isControlledComponent = React.useMemo(function () {
1227
1227
  return value !== undefined;
1228
1228
  }, [value]);
@@ -1311,7 +1311,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
1311
1311
  hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
1312
1312
  customVisible = _ref.visible,
1313
1313
  props = _objectWithoutProperties(_ref, _excluded$2);
1314
- var timer = React.useRef();
1314
+ var timer = React.useRef(undefined);
1315
1315
  var ref = React.useRef(null);
1316
1316
  var _useState = React.useState(initialVisible),
1317
1317
  _useState2 = _slicedToArray(_useState, 2),
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { JSX } from 'react';
2
2
  import { NormalTypes } from '../utils/prop-types';
3
3
  export type RatingTypes = NormalTypes;
4
4
  declare const ratingCountTuple: [2, 3, 4, 5, 6, 7, 8, 9, 10];
@@ -691,7 +691,8 @@ var _JSXStyle = /*@__PURE__*/getDefaultExportFromCjs(styleExports);
691
691
  var pickChildByProps = function pickChildByProps(children, key, value) {
692
692
  var target = [];
693
693
  var isArray = Array.isArray(value);
694
- var withoutPropChildren = React.Children.map(children, function (item) {
694
+ var withoutPropChildren = React.Children.map(children, function (_item) {
695
+ var item = _item;
695
696
  if (! /*#__PURE__*/React.isValidElement(item)) return null;
696
697
  if (!item.props) return item;
697
698
  if (isArray) {
@@ -1339,13 +1340,14 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1339
1340
  _pickChildByProps2 = _slicedToArray(_pickChildByProps, 2),
1340
1341
  optionChildren = _pickChildByProps2[1];
1341
1342
  return React.Children.map(optionChildren, function (child) {
1342
- if (! /*#__PURE__*/React.isValidElement(child)) return null;
1343
- var el = /*#__PURE__*/React.cloneElement(child); // { preventAllEvents: true }
1343
+ var _child = child;
1344
+ if (! /*#__PURE__*/React.isValidElement(_child)) return null;
1345
+ var el = /*#__PURE__*/React.cloneElement(_child); // { preventAllEvents: true }
1344
1346
  if (!multiple) return el;
1345
1347
  return /*#__PURE__*/React.createElement(SelectMultipleValue, {
1346
1348
  disabled: disabled,
1347
1349
  onClear: clearable ? function () {
1348
- return updateValue(child.props.value);
1350
+ return updateValue(_child.props.value);
1349
1351
  } : null
1350
1352
  }, el);
1351
1353
  });
@@ -904,7 +904,8 @@ var pickChild = function pickChild(children, targetChild) {
904
904
  var pickChildByProps = function pickChildByProps(children, key, value) {
905
905
  var target = [];
906
906
  var isArray = Array.isArray(value);
907
- var withoutPropChildren = React.Children.map(children, function (item) {
907
+ var withoutPropChildren = React.Children.map(children, function (_item) {
908
+ var item = _item;
908
909
  if (! /*#__PURE__*/React.isValidElement(item)) return null;
909
910
  if (!item.props) return item;
910
911
  if (isArray) {
@@ -1282,7 +1283,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
1282
1283
  var textareaRef = React.useRef(null);
1283
1284
  React.useImperativeHandle(ref, function () {
1284
1285
  return textareaRef.current;
1285
- });
1286
+ }); // added not null
1286
1287
  var isControlledComponent = React.useMemo(function () {
1287
1288
  return value !== undefined;
1288
1289
  }, [value]);
@@ -1874,13 +1875,14 @@ var SelectComponent = /*#__PURE__*/React.forwardRef(function (_ref, selectRef) {
1874
1875
  _pickChildByProps2 = _slicedToArray(_pickChildByProps, 2),
1875
1876
  optionChildren = _pickChildByProps2[1];
1876
1877
  return React.Children.map(optionChildren, function (child) {
1877
- if (! /*#__PURE__*/React.isValidElement(child)) return null;
1878
- var el = /*#__PURE__*/React.cloneElement(child); // { preventAllEvents: true }
1878
+ var _child = child;
1879
+ if (! /*#__PURE__*/React.isValidElement(_child)) return null;
1880
+ var el = /*#__PURE__*/React.cloneElement(_child); // { preventAllEvents: true }
1879
1881
  if (!multiple) return el;
1880
1882
  return /*#__PURE__*/React.createElement(SelectMultipleValue, {
1881
1883
  disabled: disabled,
1882
1884
  onClear: clearable ? function () {
1883
- return updateValue(child.props.value);
1885
+ return updateValue(_child.props.value);
1884
1886
  } : null
1885
1887
  }, el);
1886
1888
  });
@@ -21500,7 +21502,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
21500
21502
  hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
21501
21503
  customVisible = _ref.visible,
21502
21504
  props = _objectWithoutProperties(_ref, _excluded$1);
21503
- var timer = React.useRef();
21505
+ var timer = React.useRef(undefined);
21504
21506
  var ref = React.useRef(null);
21505
21507
  var _useState = React.useState(initialVisible),
21506
21508
  _useState2 = _slicedToArray(_useState, 2),
@@ -1,4 +1,4 @@
1
- import React, { CSSProperties } from 'react';
1
+ import React, { CSSProperties, JSX } from 'react';
2
2
  export type TableDataItemBase = Record<string, any>;
3
3
  export type TableColumnRender<Item extends TableDataItemBase> = (value: Item[keyof Item], rowData: Item, rowIndex: number) => JSX.Element | void;
4
4
  export type TableAbstractColumn<TableDataItem> = {
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { JSX } from 'react';
2
2
  import { NormalTypes } from '../utils/prop-types';
3
3
  export interface Props {
4
4
  tag: keyof JSX.IntrinsicElements;
@@ -970,7 +970,7 @@ var TextareaComponent = /*#__PURE__*/React.forwardRef(function (_ref, ref) {
970
970
  var textareaRef = React.useRef(null);
971
971
  React.useImperativeHandle(ref, function () {
972
972
  return textareaRef.current;
973
- });
973
+ }); // added not null
974
974
  var isControlledComponent = React.useMemo(function () {
975
975
  return value !== undefined;
976
976
  }, [value]);
@@ -1306,7 +1306,7 @@ var TooltipComponent = function TooltipComponent(_ref) {
1306
1306
  hideArrow = _ref$hideArrow === void 0 ? false : _ref$hideArrow,
1307
1307
  customVisible = _ref.visible,
1308
1308
  props = _objectWithoutProperties(_ref, _excluded);
1309
- var timer = React.useRef();
1309
+ var timer = React.useRef(undefined);
1310
1310
  var ref = React.useRef(null);
1311
1311
  var _useState = React.useState(initialVisible),
1312
1312
  _useState2 = _slicedToArray(_useState, 2),
@@ -693,7 +693,9 @@ var TreeIndents = function TreeIndents(_ref) {
693
693
  };
694
694
 
695
695
  var sortChildren = function sortChildren(children, folderComponentType) {
696
- return React.Children.toArray(children).sort(function (a, b) {
696
+ return React.Children.toArray(children).sort(function (_a, _b) {
697
+ var a = _a;
698
+ var b = _b;
697
699
  if (! /*#__PURE__*/React.isValidElement(a) || ! /*#__PURE__*/React.isValidElement(b)) return 0;
698
700
  if (a.type !== b.type) return a.type !== folderComponentType ? 1 : -1;
699
701
  return "".concat(a.props.name).charCodeAt(0) - "".concat(b.props.name).charCodeAt(0);
@@ -1,4 +1,4 @@
1
1
  import React, { ReactNode } from 'react';
2
- export declare const sortChildren: (children: ReactNode | undefined, folderComponentType: React.ElementType) => (string | number | React.ReactElement<any, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal)[];
2
+ export declare const sortChildren: (children: ReactNode | undefined, folderComponentType: React.ElementType) => (string | number | bigint | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | React.ReactPortal | Promise<string | number | bigint | boolean | React.ReactPortal | React.ReactElement<unknown, string | React.JSXElementConstructor<any>> | Iterable<React.ReactNode> | null | undefined>)[];
3
3
  export declare const makeChildPath: (name: string, parentPath?: string) => string;
4
4
  export declare const stopPropagation: (event: React.MouseEvent) => void;
package/dist/index.d.ts CHANGED
@@ -128,3 +128,5 @@ export { Carousel } from './Carousal';
128
128
  export type { CarouselProps } from './Carousal';
129
129
  export { default as CurrencyInput } from './CurrencyInput';
130
130
  export type { CurrencyInputProps, CurrencyInputOnChangeValues } from './CurrencyInput';
131
+ export { default as useToasts } from './use-toasts';
132
+ export type { Toast, ToastInput, ToastAction, ToastLayout } from './use-toasts';