@helpdice/ui 1.7.5 → 1.7.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.
- package/dist/CurrencyInput/index.js +2981 -0
- package/dist/LinearProgress/index.d.ts +2 -0
- package/dist/{css-baseline → LinearProgress}/index.js +25 -317
- package/dist/LinearProgress/linear-progress.d.ts +9 -0
- package/dist/Loadable/index.js +570 -0
- package/dist/PhoneInput/index.js +2136 -314
- package/dist/Placeholder/index.js +2116 -254
- package/dist/auto-complete/index.js +2145 -652
- package/dist/avatar/index.js +2119 -333
- package/dist/badge/index.js +2117 -331
- package/dist/breadcrumbs/index.js +2126 -340
- package/dist/button/button.compact.d.ts +2 -0
- package/dist/button/index.js +2214 -342
- package/dist/button-dropdown/index.js +2120 -291
- package/dist/button-group/index.js +2117 -331
- package/dist/capacity/index.js +2117 -331
- package/dist/card/index.js +2127 -298
- package/dist/checkbox/index.js +2119 -290
- package/dist/code/index.js +2116 -297
- package/dist/collapse/index.js +2117 -475
- package/dist/description/index.js +2117 -331
- package/dist/display/index.js +2117 -331
- package/dist/divider/index.js +2118 -332
- package/dist/dot/index.js +2117 -331
- package/dist/drawer/index.js +2129 -439
- package/dist/fieldset/index.js +2121 -354
- package/dist/grid/index.js +2119 -333
- package/dist/image/index.js +2122 -336
- package/dist/index.d.ts +2 -14
- package/dist/index.js +3175 -1879
- package/dist/input/index.js +2125 -296
- package/dist/keyboard/index.js +2116 -297
- package/dist/link/index.js +2117 -331
- package/dist/list/index.js +2119 -333
- package/dist/loading/index.js +2117 -331
- package/dist/menu/index.js +77 -45
- package/dist/modal/index.js +2145 -452
- package/dist/note/index.js +2117 -331
- package/dist/page/index.js +2117 -331
- package/dist/pagination/index.js +2118 -351
- package/dist/popover/index.js +2123 -354
- package/dist/progress/index.js +2117 -331
- package/dist/radio/index.js +2120 -334
- package/dist/rating/index.js +2118 -332
- package/dist/row/index.js +2115 -296
- package/dist/select/index.js +2151 -688
- package/dist/slider/index.js +2123 -356
- package/dist/snippet/index.js +2118 -421
- package/dist/spacer/index.js +2115 -296
- package/dist/spinner/index.js +2117 -331
- package/dist/table/index.js +2341 -754
- package/dist/tabs/index.js +2123 -344
- package/dist/tag/index.js +2116 -254
- package/dist/text/index.js +2116 -297
- package/dist/textarea/index.js +2117 -288
- package/dist/toggle/index.js +2117 -331
- package/dist/tooltip/index.js +2120 -351
- package/dist/tree/index.js +2123 -459
- package/dist/use-input/index.js +2122 -24
- package/dist/use-modal/index.js +2122 -24
- package/dist/use-network-status/index.d.ts +2 -0
- package/dist/{use-current-state → use-network-status}/index.js +22 -15
- package/dist/use-network-status/use-netowork-status.d.ts +4 -0
- package/dist/use-scale/index.js +2115 -296
- package/dist/use-tabs/index.js +2122 -24
- package/dist/user/index.js +2123 -337
- package/esm/CurrencyInput/components/CurrencyInput.js +342 -0
- package/esm/CurrencyInput/components/CurrencyInputProps.js +1 -0
- package/esm/CurrencyInput/components/utils/addSeparators.js +7 -0
- package/esm/CurrencyInput/components/utils/cleanValue.js +69 -0
- package/esm/CurrencyInput/components/utils/escapeRegExp.js +8 -0
- package/esm/CurrencyInput/components/utils/fixedDecimalValue.js +29 -0
- package/esm/CurrencyInput/components/utils/formatValue.js +124 -0
- package/esm/CurrencyInput/components/utils/getLocaleConfig.js +47 -0
- package/esm/CurrencyInput/components/utils/getSuffix.js +10 -0
- package/esm/CurrencyInput/components/utils/index.js +8 -0
- package/esm/CurrencyInput/components/utils/isNumber.js +3 -0
- package/esm/CurrencyInput/components/utils/padTrimValue.js +27 -0
- package/esm/CurrencyInput/components/utils/parseAbbrValue.js +43 -0
- package/esm/CurrencyInput/components/utils/removeInvalidChars.js +10 -0
- package/esm/CurrencyInput/components/utils/removeSeparators.js +10 -0
- package/esm/CurrencyInput/components/utils/repositionCursor.js +35 -0
- package/esm/CurrencyInput/index.js +4 -0
- package/esm/LinearProgress/index.d.ts +2 -0
- package/esm/LinearProgress/index.js +2 -0
- package/esm/LinearProgress/linear-progress.d.ts +9 -0
- package/esm/LinearProgress/linear-progress.js +28 -0
- package/esm/Loadable/index.js +2 -0
- package/esm/PhoneInput/phone.js +22 -19
- package/esm/auto-complete/auto-complete-dropdown.js +1 -3
- package/esm/auto-complete/auto-complete-item.js +1 -3
- package/esm/auto-complete/auto-complete-searching.js +1 -1
- package/esm/auto-complete/auto-complete.js +1 -1
- package/esm/avatar/avatar-group.js +1 -2
- package/esm/avatar/avatar.js +1 -2
- package/esm/badge/badge.js +1 -2
- package/esm/breadcrumbs/breadcrumbs-item.js +1 -1
- package/esm/breadcrumbs/breadcrumbs-separator.js +1 -1
- package/esm/breadcrumbs/breadcrumbs.js +1 -1
- package/esm/button/button-icon.js +1 -1
- package/esm/button/button.compact.d.ts +2 -0
- package/esm/button/button.compact.js +94 -50
- package/esm/button/button.js +1 -2
- package/esm/button/utils.js +1 -1
- package/esm/button-dropdown/button-dropdown-item.js +1 -1
- package/esm/button-dropdown/button-dropdown.js +1 -2
- package/esm/button-group/button-group.js +1 -2
- package/esm/capacity/capacity.js +1 -2
- package/esm/card/card-content.js +1 -1
- package/esm/card/card-footer.js +1 -2
- package/esm/card/card.js +1 -2
- package/esm/carousal/Arrow.js +18 -0
- package/esm/carousal/Indicator.js +20 -0
- package/esm/carousal/Thumbs.js +302 -0
- package/esm/carousal/animations.js +162 -0
- package/esm/carousal/index.js +683 -0
- package/esm/carousal/types.js +1 -0
- package/esm/carousal/utils.js +49 -0
- package/esm/checkbox/checkbox-group.js +1 -1
- package/esm/checkbox/checkbox.icon.js +1 -1
- package/esm/checkbox/checkbox.js +1 -2
- package/esm/code/code.js +1 -1
- package/esm/collapse/collapse-group.js +1 -2
- package/esm/collapse/collapse.js +1 -4
- package/esm/description/description.js +1 -2
- package/esm/display/display.js +1 -2
- package/esm/divider/divider.js +1 -2
- package/esm/dot/dot.js +1 -2
- package/esm/drawer/drawer-wrapper.js +1 -3
- package/esm/drawer/drawer.js +1 -1
- package/esm/fieldset/fieldset-content.js +1 -1
- package/esm/fieldset/fieldset-footer.js +1 -1
- package/esm/fieldset/fieldset-group.js +1 -3
- package/esm/fieldset/fieldset-title.js +1 -1
- package/esm/fieldset/fieldset.js +1 -2
- package/esm/grid/basic-item.js +1 -2
- package/esm/grid/grid-container.js +1 -1
- package/esm/grid/grid.js +1 -1
- package/esm/image/image-browser.js +1 -2
- package/esm/image/image.js +1 -2
- package/esm/image/image.skeleton.js +1 -1
- package/esm/index.d.ts +2 -14
- package/esm/index.js +5 -9
- package/esm/input/input-block-label.js +1 -1
- package/esm/input/input-icon-clear.js +1 -2
- package/esm/input/input-label.js +1 -1
- package/esm/input/input.js +1 -2
- package/esm/keyboard/keyboard.js +1 -1
- package/esm/link/link.js +1 -2
- package/esm/list/list-item.js +1 -2
- package/esm/loading/loading.js +1 -2
- package/esm/modal/modal-action.js +1 -2
- package/esm/modal/modal-actions.js +1 -1
- package/esm/modal/modal-content.js +1 -1
- package/esm/modal/modal-subtitle.js +1 -1
- package/esm/modal/modal-title.js +1 -1
- package/esm/modal/modal-wrapper.js +1 -3
- package/esm/modal/modal.js +1 -1
- package/esm/note/note.js +1 -2
- package/esm/page/page-header.js +1 -1
- package/esm/page/page.js +1 -1
- package/esm/pagination/pagination-item.js +1 -2
- package/esm/pagination/pagination.js +1 -1
- package/esm/popover/popover-item.js +1 -2
- package/esm/popover/popover.js +1 -1
- package/esm/progress/progress.js +1 -2
- package/esm/radio/radio-description.js +1 -1
- package/esm/radio/radio-group.js +1 -1
- package/esm/radio/radio.js +1 -2
- package/esm/rating/rating.js +1 -2
- package/esm/row/row.js +1 -1
- package/esm/select/select-dropdown.js +1 -3
- package/esm/select/select-icon-clear.js +1 -1
- package/esm/select/select-multiple-value.js +1 -1
- package/esm/select/select-option.js +1 -3
- package/esm/select/select.js +9 -12
- package/esm/slider/slider-dot.js +1 -2
- package/esm/slider/slider-mark.js +1 -1
- package/esm/slider/slider.js +1 -3
- package/esm/snippet/snippet.js +1 -3
- package/esm/spinner/spinner.js +1 -2
- package/esm/table/table-body.js +1 -2
- package/esm/table/table-head.js +3 -2
- package/esm/tabs/tabs-item.js +1 -2
- package/esm/tabs/tabs.js +1 -3
- package/esm/tag/tag.js +1 -1
- package/esm/text/child.js +1 -1
- package/esm/textarea/textarea.js +1 -2
- package/esm/toggle/toggle.js +1 -2
- package/esm/tooltip/tooltip-content.js +1 -3
- package/esm/tooltip/tooltip-icon.js +1 -1
- package/esm/tooltip/tooltip.js +1 -1
- package/esm/tree/tree-file-icon.js +1 -1
- package/esm/tree/tree-file.js +1 -2
- package/esm/tree/tree-folder-icon.js +1 -1
- package/esm/tree/tree-folder.js +1 -3
- package/esm/tree/tree-status-icon.js +1 -1
- package/esm/tree/tree.js +1 -1
- package/esm/use-input/use-input.js +1 -1
- package/esm/use-modal/use-modal.js +1 -1
- package/esm/use-network-status/index.d.ts +2 -0
- package/esm/use-network-status/index.js +2 -0
- package/esm/use-network-status/use-netowork-status.d.ts +4 -0
- package/esm/use-network-status/use-netowork-status.js +29 -0
- package/esm/use-scale/with-scale.js +1 -1
- package/esm/use-tabs/use-tabs.js +1 -1
- package/esm/user/user.js +1 -2
- package/esm/utils/use-context-state/use-context-state.js +1 -1
- package/esm/utils/use-drag.js +1 -1
- package/package.json +12 -4
- package/dist/css-baseline/css-baseline.d.ts +0 -9
- package/dist/css-baseline/index.d.ts +0 -1
- package/dist/shared/backdrop.d.ts +0 -14
- package/dist/shared/css-transition.d.ts +0 -13
- package/dist/shared/dropdown.d.ts +0 -9
- package/dist/shared/ellipsis.d.ts +0 -6
- package/dist/shared/expand.d.ts +0 -7
- package/dist/shared/highlight.d.ts +0 -13
- package/dist/ui-provider/index.d.ts +0 -3
- package/dist/ui-provider/index.js +0 -2186
- package/dist/ui-provider/theme-provider.d.ts +0 -8
- package/dist/ui-provider/ui-provider.d.ts +0 -8
- package/dist/use-all-themes/all-themes-context.d.ts +0 -7
- package/dist/use-all-themes/index.d.ts +0 -3
- package/dist/use-all-themes/index.js +0 -311
- package/dist/use-classes/index.d.ts +0 -2
- package/dist/use-classes/index.js +0 -48
- package/dist/use-classes/use-classes.d.ts +0 -4
- package/dist/use-current-state/index.d.ts +0 -2
- package/dist/use-current-state/use-current-state.d.ts +0 -4
- package/dist/use-media-query/index.d.ts +0 -3
- package/dist/use-media-query/index.js +0 -444
- package/dist/use-media-query/use-media-query.d.ts +0 -12
- package/dist/use-theme/index.d.ts +0 -2
- package/dist/use-theme/index.js +0 -309
- package/dist/use-theme/theme-context.d.ts +0 -4
- package/dist/use-toasts/helpers.d.ts +0 -18
- package/dist/use-toasts/index.d.ts +0 -3
- package/dist/use-toasts/index.js +0 -204
- package/dist/use-toasts/toast-container.d.ts +0 -3
- package/dist/use-toasts/toast-item.d.ts +0 -8
- package/dist/use-toasts/use-toast.d.ts +0 -40
- package/dist/utils/use-current-state.d.ts +0 -2
- package/dist/utils/use-dom-observer.d.ts +0 -3
- package/dist/utils/use-hd-ui-context.d.ts +0 -16
- package/dist/utils/use-previous.d.ts +0 -2
- package/esm/captcha/index.js +0 -128
- package/esm/css-baseline/css-baseline.d.ts +0 -9
- package/esm/css-baseline/css-baseline.js +0 -23
- package/esm/css-baseline/index.d.ts +0 -1
- package/esm/css-baseline/index.js +0 -2
- package/esm/shared/backdrop.d.ts +0 -14
- package/esm/shared/backdrop.js +0 -66
- package/esm/shared/css-transition.d.ts +0 -13
- package/esm/shared/css-transition.js +0 -65
- package/esm/shared/dropdown.d.ts +0 -9
- package/esm/shared/dropdown.js +0 -99
- package/esm/shared/ellipsis.d.ts +0 -6
- package/esm/shared/ellipsis.js +0 -13
- package/esm/shared/expand.d.ts +0 -7
- package/esm/shared/expand.js +0 -86
- package/esm/shared/highlight.d.ts +0 -13
- package/esm/shared/highlight.js +0 -46
- package/esm/ui-provider/index.d.ts +0 -3
- package/esm/ui-provider/index.js +0 -4
- package/esm/ui-provider/theme-provider.d.ts +0 -8
- package/esm/ui-provider/theme-provider.js +0 -45
- package/esm/ui-provider/ui-provider.d.ts +0 -8
- package/esm/ui-provider/ui-provider.js +0 -55
- package/esm/use-all-themes/all-themes-context.d.ts +0 -7
- package/esm/use-all-themes/all-themes-context.js +0 -11
- package/esm/use-all-themes/index.d.ts +0 -3
- package/esm/use-all-themes/index.js +0 -2
- package/esm/use-classes/index.d.ts +0 -2
- package/esm/use-classes/index.js +0 -2
- package/esm/use-classes/use-classes.d.ts +0 -4
- package/esm/use-classes/use-classes.js +0 -34
- package/esm/use-current-state/index.d.ts +0 -2
- package/esm/use-current-state/index.js +0 -2
- package/esm/use-current-state/use-current-state.d.ts +0 -4
- package/esm/use-current-state/use-current-state.js +0 -23
- package/esm/use-media-query/index.d.ts +0 -3
- package/esm/use-media-query/index.js +0 -2
- package/esm/use-media-query/use-media-query.d.ts +0 -12
- package/esm/use-media-query/use-media-query.js +0 -81
- package/esm/use-theme/index.d.ts +0 -2
- package/esm/use-theme/index.js +0 -2
- package/esm/use-theme/theme-context.d.ts +0 -4
- package/esm/use-theme/theme-context.js +0 -9
- package/esm/use-toasts/helpers.d.ts +0 -18
- package/esm/use-toasts/helpers.js +0 -68
- package/esm/use-toasts/index.d.ts +0 -3
- package/esm/use-toasts/index.js +0 -2
- package/esm/use-toasts/toast-container.d.ts +0 -3
- package/esm/use-toasts/toast-container.js +0 -120
- package/esm/use-toasts/toast-item.d.ts +0 -8
- package/esm/use-toasts/toast-item.js +0 -45
- package/esm/use-toasts/use-toast.d.ts +0 -40
- package/esm/use-toasts/use-toast.js +0 -103
- package/esm/utils/use-current-state.d.ts +0 -2
- package/esm/utils/use-current-state.js +0 -2
- package/esm/utils/use-dom-observer.d.ts +0 -3
- package/esm/utils/use-hd-ui-context.d.ts +0 -16
- package/esm/utils/use-previous.d.ts +0 -2
package/dist/use-theme/index.js
DELETED
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
|
|
7
|
-
function _defineProperty(e, r, t) {
|
|
8
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
9
|
-
value: t,
|
|
10
|
-
enumerable: true,
|
|
11
|
-
configurable: true,
|
|
12
|
-
writable: true
|
|
13
|
-
}) : e[r] = t, e;
|
|
14
|
-
}
|
|
15
|
-
function ownKeys(e, r) {
|
|
16
|
-
var t = Object.keys(e);
|
|
17
|
-
if (Object.getOwnPropertySymbols) {
|
|
18
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
19
|
-
r && (o = o.filter(function (r) {
|
|
20
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
21
|
-
})), t.push.apply(t, o);
|
|
22
|
-
}
|
|
23
|
-
return t;
|
|
24
|
-
}
|
|
25
|
-
function _objectSpread2(e) {
|
|
26
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
27
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
28
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
29
|
-
_defineProperty(e, r, t[r]);
|
|
30
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
31
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return e;
|
|
35
|
-
}
|
|
36
|
-
function _toPrimitive(t, r) {
|
|
37
|
-
if ("object" != typeof t || !t) return t;
|
|
38
|
-
var e = t[Symbol.toPrimitive];
|
|
39
|
-
if (void 0 !== e) {
|
|
40
|
-
var i = e.call(t, r);
|
|
41
|
-
if ("object" != typeof i) return i;
|
|
42
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
43
|
-
}
|
|
44
|
-
return ("string" === r ? String : Number)(t);
|
|
45
|
-
}
|
|
46
|
-
function _toPropertyKey(t) {
|
|
47
|
-
var i = _toPrimitive(t, "string");
|
|
48
|
-
return "symbol" == typeof i ? i : i + "";
|
|
49
|
-
}
|
|
50
|
-
function _typeof(o) {
|
|
51
|
-
"@babel/helpers - typeof";
|
|
52
|
-
|
|
53
|
-
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) {
|
|
54
|
-
return typeof o;
|
|
55
|
-
} : function (o) {
|
|
56
|
-
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
57
|
-
}, _typeof(o);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
var defaultFont = {
|
|
61
|
-
sans: '"Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif',
|
|
62
|
-
mono: 'Menlo, Monaco, Lucida Console, Liberation Mono, DejaVu Sans Mono, Bitstream Vera Sans Mono, Courier New, monospace',
|
|
63
|
-
prism: 'ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas,"Liberation Mono", "Courier New", monospace'
|
|
64
|
-
};
|
|
65
|
-
var defaultBreakpoints = {
|
|
66
|
-
xs: {
|
|
67
|
-
min: '0',
|
|
68
|
-
max: '650px'
|
|
69
|
-
},
|
|
70
|
-
sm: {
|
|
71
|
-
min: '650px',
|
|
72
|
-
max: '900px'
|
|
73
|
-
},
|
|
74
|
-
md: {
|
|
75
|
-
min: '900px',
|
|
76
|
-
max: '1280px'
|
|
77
|
-
},
|
|
78
|
-
lg: {
|
|
79
|
-
min: '1280px',
|
|
80
|
-
max: '1920px'
|
|
81
|
-
},
|
|
82
|
-
xl: {
|
|
83
|
-
min: '1920px',
|
|
84
|
-
max: '10000px'
|
|
85
|
-
}
|
|
86
|
-
};
|
|
87
|
-
var defaultLayout = {
|
|
88
|
-
gap: '16pt',
|
|
89
|
-
gapNegative: '-16pt',
|
|
90
|
-
gapHalf: '8pt',
|
|
91
|
-
gapHalfNegative: '-8pt',
|
|
92
|
-
gapQuarter: '4pt',
|
|
93
|
-
gapQuarterNegative: '-4pt',
|
|
94
|
-
pageMargin: '16pt',
|
|
95
|
-
pageWidth: '750pt',
|
|
96
|
-
pageWidthWithMargin: '782pt',
|
|
97
|
-
breakpointMobile: defaultBreakpoints.xs.max,
|
|
98
|
-
breakpointTablet: defaultBreakpoints.sm.max,
|
|
99
|
-
radius: '6px',
|
|
100
|
-
unit: '16px'
|
|
101
|
-
};
|
|
102
|
-
|
|
103
|
-
var palette$1 = {
|
|
104
|
-
accents_1: '#fafafa',
|
|
105
|
-
accents_2: '#eaeaea',
|
|
106
|
-
accents_3: '#999',
|
|
107
|
-
accents_4: '#888',
|
|
108
|
-
accents_5: '#666',
|
|
109
|
-
accents_6: '#444',
|
|
110
|
-
accents_7: '#333',
|
|
111
|
-
accents_8: '#111',
|
|
112
|
-
background: '#fff',
|
|
113
|
-
foreground: '#000',
|
|
114
|
-
selection: '#79ffe1',
|
|
115
|
-
secondary: '#666',
|
|
116
|
-
code: '#f81ce5',
|
|
117
|
-
border: '#eaeaea',
|
|
118
|
-
error: '#e00',
|
|
119
|
-
errorLight: '#ff1a1a',
|
|
120
|
-
errorLighter: '#f7d4d6',
|
|
121
|
-
errorDark: '#c50000',
|
|
122
|
-
success: '#0070f3',
|
|
123
|
-
successLight: '#3291ff',
|
|
124
|
-
successLighter: '#d3e5ff',
|
|
125
|
-
successDark: '#0761d1',
|
|
126
|
-
warning: '#f5a623',
|
|
127
|
-
warningLight: '#f7b955',
|
|
128
|
-
warningLighter: '#ffefcf',
|
|
129
|
-
warningDark: '#ab570a',
|
|
130
|
-
cyan: '#50e3c2',
|
|
131
|
-
cyanLighter: '#aaffec',
|
|
132
|
-
cyanLight: '#79ffe1',
|
|
133
|
-
cyanDark: '#29bc9b',
|
|
134
|
-
violet: '#7928ca',
|
|
135
|
-
violetLighter: '#e3d7fc',
|
|
136
|
-
violetLight: '#8a63d2',
|
|
137
|
-
violetDark: '#4c2889',
|
|
138
|
-
purple: '#f81ce5',
|
|
139
|
-
alert: '#ff0080',
|
|
140
|
-
magenta: '#eb367f',
|
|
141
|
-
link: '#0070f3'
|
|
142
|
-
};
|
|
143
|
-
var expressiveness$1 = {
|
|
144
|
-
linkStyle: 'none',
|
|
145
|
-
linkHoverStyle: 'none',
|
|
146
|
-
dropdownBoxShadow: '0 4px 4px 0 rgba(0, 0, 0, 0.02)',
|
|
147
|
-
scrollerStart: 'rgba(255, 255, 255, 1)',
|
|
148
|
-
scrollerEnd: 'rgba(255, 255, 255, 0)',
|
|
149
|
-
shadowSmall: '0 5px 10px rgba(0, 0, 0, 0.12)',
|
|
150
|
-
shadowMedium: '0 8px 30px rgba(0, 0, 0, 0.12)',
|
|
151
|
-
shadowLarge: '0 30px 60px rgba(0, 0, 0, 0.12)',
|
|
152
|
-
portalOpacity: 0.25
|
|
153
|
-
};
|
|
154
|
-
var font$1 = defaultFont;
|
|
155
|
-
var breakpoints$1 = defaultBreakpoints;
|
|
156
|
-
var layout$1 = defaultLayout;
|
|
157
|
-
var themes$1 = {
|
|
158
|
-
type: 'light',
|
|
159
|
-
font: font$1,
|
|
160
|
-
layout: layout$1,
|
|
161
|
-
palette: palette$1,
|
|
162
|
-
breakpoints: breakpoints$1,
|
|
163
|
-
expressiveness: expressiveness$1
|
|
164
|
-
};
|
|
165
|
-
|
|
166
|
-
var palette = {
|
|
167
|
-
accents_1: '#111',
|
|
168
|
-
accents_2: '#333',
|
|
169
|
-
accents_3: '#444',
|
|
170
|
-
accents_4: '#666',
|
|
171
|
-
accents_5: '#888',
|
|
172
|
-
accents_6: '#999',
|
|
173
|
-
accents_7: '#eaeaea',
|
|
174
|
-
accents_8: '#fafafa',
|
|
175
|
-
background: '#000',
|
|
176
|
-
foreground: '#fff',
|
|
177
|
-
selection: '#f81ce5',
|
|
178
|
-
secondary: '#888',
|
|
179
|
-
code: '#79ffe1',
|
|
180
|
-
border: '#333',
|
|
181
|
-
error: '#e00',
|
|
182
|
-
errorLighter: '#f7d4d6',
|
|
183
|
-
errorLight: '#ff1a1a',
|
|
184
|
-
errorDark: '#c50000',
|
|
185
|
-
success: '#0070f3',
|
|
186
|
-
successLighter: '#d3e5ff',
|
|
187
|
-
successLight: '#3291ff',
|
|
188
|
-
successDark: '#0761d1',
|
|
189
|
-
warning: '#f5a623',
|
|
190
|
-
warningLighter: '#ffefcf',
|
|
191
|
-
warningLight: '#f7b955',
|
|
192
|
-
warningDark: '#ab570a',
|
|
193
|
-
cyan: '#50e3c2',
|
|
194
|
-
cyanLighter: '#aaffec',
|
|
195
|
-
cyanLight: '#79ffe1',
|
|
196
|
-
cyanDark: '#29bc9b',
|
|
197
|
-
violet: '#7928ca',
|
|
198
|
-
violetLighter: '#e3d7fc',
|
|
199
|
-
violetLight: '#8a63d2',
|
|
200
|
-
violetDark: '#4c2889',
|
|
201
|
-
purple: '#f81ce5',
|
|
202
|
-
alert: '#ff0080',
|
|
203
|
-
magenta: '#eb367f',
|
|
204
|
-
link: '#3291ff'
|
|
205
|
-
};
|
|
206
|
-
var expressiveness = {
|
|
207
|
-
linkStyle: 'none',
|
|
208
|
-
linkHoverStyle: 'none',
|
|
209
|
-
dropdownBoxShadow: '0 0 0 1px #333',
|
|
210
|
-
scrollerStart: 'rgba(255, 255, 255, 1)',
|
|
211
|
-
scrollerEnd: 'rgba(255, 255, 255, 0)',
|
|
212
|
-
shadowSmall: '0 0 0 1px #333',
|
|
213
|
-
shadowMedium: '0 0 0 1px #333',
|
|
214
|
-
shadowLarge: '0 0 0 1px #333',
|
|
215
|
-
portalOpacity: 0.75
|
|
216
|
-
};
|
|
217
|
-
var font = defaultFont;
|
|
218
|
-
var breakpoints = defaultBreakpoints;
|
|
219
|
-
var layout = defaultLayout;
|
|
220
|
-
var themes = {
|
|
221
|
-
type: 'dark',
|
|
222
|
-
font: font,
|
|
223
|
-
layout: layout,
|
|
224
|
-
palette: palette,
|
|
225
|
-
breakpoints: breakpoints,
|
|
226
|
-
expressiveness: expressiveness
|
|
227
|
-
};
|
|
228
|
-
|
|
229
|
-
var isObject = function isObject(target) {
|
|
230
|
-
return target && _typeof(target) === 'object';
|
|
231
|
-
};
|
|
232
|
-
var _deepDuplicable = function deepDuplicable(source, target) {
|
|
233
|
-
if (!isObject(target) || !isObject(source)) return source;
|
|
234
|
-
var sourceKeys = Object.keys(source);
|
|
235
|
-
var result = {};
|
|
236
|
-
for (var _i = 0, _sourceKeys = sourceKeys; _i < _sourceKeys.length; _i++) {
|
|
237
|
-
var key = _sourceKeys[_i];
|
|
238
|
-
var sourceValue = source[key];
|
|
239
|
-
var targetValue = target[key];
|
|
240
|
-
if (Array.isArray(sourceValue) && Array.isArray(targetValue)) {
|
|
241
|
-
result[key] = targetValue.concat(sourceValue);
|
|
242
|
-
} else if (isObject(sourceValue) && isObject(targetValue)) {
|
|
243
|
-
result[key] = _deepDuplicable(sourceValue, _objectSpread2({}, targetValue));
|
|
244
|
-
} else if (targetValue) {
|
|
245
|
-
result[key] = targetValue;
|
|
246
|
-
} else {
|
|
247
|
-
result[key] = sourceValue;
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
return result;
|
|
251
|
-
};
|
|
252
|
-
var getPresets = function getPresets() {
|
|
253
|
-
return [themes$1, themes];
|
|
254
|
-
};
|
|
255
|
-
var getPresetStaticTheme = function getPresetStaticTheme() {
|
|
256
|
-
return themes$1;
|
|
257
|
-
};
|
|
258
|
-
var isAvailableThemeType = function isAvailableThemeType(type) {
|
|
259
|
-
if (!type) return false;
|
|
260
|
-
var presetThemes = getPresets();
|
|
261
|
-
var hasType = presetThemes.find(function (theme) {
|
|
262
|
-
return theme.type === type;
|
|
263
|
-
});
|
|
264
|
-
return !hasType;
|
|
265
|
-
};
|
|
266
|
-
var isPresetTheme = function isPresetTheme(themeOrType) {
|
|
267
|
-
if (!themeOrType) return false;
|
|
268
|
-
var isType = typeof themeOrType === 'string';
|
|
269
|
-
var type = isType ? themeOrType : themeOrType.type;
|
|
270
|
-
return !isAvailableThemeType(type);
|
|
271
|
-
};
|
|
272
|
-
var hasUserCustomTheme = function hasUserCustomTheme() {
|
|
273
|
-
var themes = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
274
|
-
return !!themes.find(function (item) {
|
|
275
|
-
return isAvailableThemeType(item.type);
|
|
276
|
-
});
|
|
277
|
-
};
|
|
278
|
-
var create = function create(base, custom) {
|
|
279
|
-
if (!isAvailableThemeType(custom.type)) {
|
|
280
|
-
throw new Error('Duplicate or unavailable theme type');
|
|
281
|
-
}
|
|
282
|
-
return _deepDuplicable(base, custom);
|
|
283
|
-
};
|
|
284
|
-
var createFromDark = function createFromDark(custom) {
|
|
285
|
-
return create(themes, custom);
|
|
286
|
-
};
|
|
287
|
-
var createFromLight = function createFromLight(custom) {
|
|
288
|
-
return create(themes$1, custom);
|
|
289
|
-
};
|
|
290
|
-
var Themes = {
|
|
291
|
-
isPresetTheme: isPresetTheme,
|
|
292
|
-
isAvailableThemeType: isAvailableThemeType,
|
|
293
|
-
hasUserCustomTheme: hasUserCustomTheme,
|
|
294
|
-
getPresets: getPresets,
|
|
295
|
-
getPresetStaticTheme: getPresetStaticTheme,
|
|
296
|
-
create: create,
|
|
297
|
-
createFromDark: createFromDark,
|
|
298
|
-
createFromLight: createFromLight
|
|
299
|
-
};
|
|
300
|
-
|
|
301
|
-
/* "use client" */
|
|
302
|
-
|
|
303
|
-
var defaultTheme = Themes.getPresetStaticTheme();
|
|
304
|
-
var ThemeContext = /*#__PURE__*/React.createContext(defaultTheme);
|
|
305
|
-
var useTheme = function useTheme() {
|
|
306
|
-
return React.useContext(ThemeContext);
|
|
307
|
-
};
|
|
308
|
-
|
|
309
|
-
exports.default = useTheme;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Toast } from './use-toast';
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { HUIThemesPalette } from '../themes';
|
|
4
|
-
import { NormalTypes } from '../utils/prop-types';
|
|
5
|
-
export declare const makeToastActions: (actions: Toast["actions"], cancelHandle: () => void) => React.JSX.Element[] | null;
|
|
6
|
-
export declare const getColors: (palette: HUIThemesPalette, type?: NormalTypes) => {
|
|
7
|
-
bgColor: string;
|
|
8
|
-
color: string;
|
|
9
|
-
};
|
|
10
|
-
declare const toastPlacement: ["topLeft", "topRight", "bottomLeft", "bottomRight"];
|
|
11
|
-
export type ToastPlacement = typeof toastPlacement[number];
|
|
12
|
-
export declare const isTopPlacement: (placement: ToastPlacement) => boolean;
|
|
13
|
-
export declare const isLeftPlacement: (placement: ToastPlacement) => boolean;
|
|
14
|
-
export declare const getTranslateByPlacement: (placement: ToastPlacement) => {
|
|
15
|
-
enter: string;
|
|
16
|
-
leave: string;
|
|
17
|
-
};
|
|
18
|
-
export {};
|
package/dist/use-toasts/index.js
DELETED
|
@@ -1,204 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
var React = require('react');
|
|
6
|
-
|
|
7
|
-
function _arrayLikeToArray(r, a) {
|
|
8
|
-
(null == a || a > r.length) && (a = r.length);
|
|
9
|
-
for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
|
|
10
|
-
return n;
|
|
11
|
-
}
|
|
12
|
-
function _arrayWithoutHoles(r) {
|
|
13
|
-
if (Array.isArray(r)) return _arrayLikeToArray(r);
|
|
14
|
-
}
|
|
15
|
-
function _defineProperty(e, r, t) {
|
|
16
|
-
return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
17
|
-
value: t,
|
|
18
|
-
enumerable: true,
|
|
19
|
-
configurable: true,
|
|
20
|
-
writable: true
|
|
21
|
-
}) : e[r] = t, e;
|
|
22
|
-
}
|
|
23
|
-
function _iterableToArray(r) {
|
|
24
|
-
if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r);
|
|
25
|
-
}
|
|
26
|
-
function _nonIterableSpread() {
|
|
27
|
-
throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
|
|
28
|
-
}
|
|
29
|
-
function ownKeys(e, r) {
|
|
30
|
-
var t = Object.keys(e);
|
|
31
|
-
if (Object.getOwnPropertySymbols) {
|
|
32
|
-
var o = Object.getOwnPropertySymbols(e);
|
|
33
|
-
r && (o = o.filter(function (r) {
|
|
34
|
-
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
35
|
-
})), t.push.apply(t, o);
|
|
36
|
-
}
|
|
37
|
-
return t;
|
|
38
|
-
}
|
|
39
|
-
function _objectSpread2(e) {
|
|
40
|
-
for (var r = 1; r < arguments.length; r++) {
|
|
41
|
-
var t = null != arguments[r] ? arguments[r] : {};
|
|
42
|
-
r % 2 ? ownKeys(Object(t), true).forEach(function (r) {
|
|
43
|
-
_defineProperty(e, r, t[r]);
|
|
44
|
-
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) {
|
|
45
|
-
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
46
|
-
});
|
|
47
|
-
}
|
|
48
|
-
return e;
|
|
49
|
-
}
|
|
50
|
-
function _toConsumableArray(r) {
|
|
51
|
-
return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread();
|
|
52
|
-
}
|
|
53
|
-
function _toPrimitive(t, r) {
|
|
54
|
-
if ("object" != typeof t || !t) return t;
|
|
55
|
-
var e = t[Symbol.toPrimitive];
|
|
56
|
-
if (void 0 !== e) {
|
|
57
|
-
var i = e.call(t, r);
|
|
58
|
-
if ("object" != typeof i) return i;
|
|
59
|
-
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
60
|
-
}
|
|
61
|
-
return ("string" === r ? String : Number)(t);
|
|
62
|
-
}
|
|
63
|
-
function _toPropertyKey(t) {
|
|
64
|
-
var i = _toPrimitive(t, "string");
|
|
65
|
-
return "symbol" == typeof i ? i : i + "";
|
|
66
|
-
}
|
|
67
|
-
function _unsupportedIterableToArray(r, a) {
|
|
68
|
-
if (r) {
|
|
69
|
-
if ("string" == typeof r) return _arrayLikeToArray(r, a);
|
|
70
|
-
var t = {}.toString.call(r).slice(8, -1);
|
|
71
|
-
return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
var defaultToastLayout = {
|
|
76
|
-
padding: '12px 16px',
|
|
77
|
-
margin: '8px 0',
|
|
78
|
-
width: '420px',
|
|
79
|
-
maxWidth: '90vw',
|
|
80
|
-
maxHeight: '75px',
|
|
81
|
-
placement: 'bottomRight'
|
|
82
|
-
};
|
|
83
|
-
var defaultParams = {
|
|
84
|
-
toasts: [],
|
|
85
|
-
toastLayout: defaultToastLayout,
|
|
86
|
-
updateToastLayout: function updateToastLayout(t) {
|
|
87
|
-
return t;
|
|
88
|
-
},
|
|
89
|
-
updateToasts: function updateToasts(t) {
|
|
90
|
-
return t;
|
|
91
|
-
},
|
|
92
|
-
lastUpdateToastId: null,
|
|
93
|
-
updateLastToastId: function updateLastToastId() {
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
var HUIContent = /*#__PURE__*/React.createContext(defaultParams);
|
|
98
|
-
var useHUIContext = function useHUIContext() {
|
|
99
|
-
return React.useContext(HUIContent);
|
|
100
|
-
};
|
|
101
|
-
|
|
102
|
-
/* "use client" */
|
|
103
|
-
|
|
104
|
-
var getId = function getId() {
|
|
105
|
-
return Math.random().toString(32).slice(2, 10);
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
var defaultToast = {
|
|
109
|
-
delay: 2000,
|
|
110
|
-
type: 'default'
|
|
111
|
-
};
|
|
112
|
-
var useToasts = function useToasts(layout) {
|
|
113
|
-
var _useHUIContext = useHUIContext(),
|
|
114
|
-
updateToasts = _useHUIContext.updateToasts,
|
|
115
|
-
toasts = _useHUIContext.toasts,
|
|
116
|
-
updateToastLayout = _useHUIContext.updateToastLayout,
|
|
117
|
-
updateLastToastId = _useHUIContext.updateLastToastId;
|
|
118
|
-
React.useEffect(function () {
|
|
119
|
-
if (!layout) return;
|
|
120
|
-
updateToastLayout(function () {
|
|
121
|
-
return layout ? _objectSpread2(_objectSpread2({}, defaultToastLayout), layout) : defaultToastLayout;
|
|
122
|
-
});
|
|
123
|
-
}, []);
|
|
124
|
-
var _cancel = function cancel(internalId) {
|
|
125
|
-
updateToasts(function (currentToasts) {
|
|
126
|
-
return currentToasts.map(function (item) {
|
|
127
|
-
if (item._internalIdent !== internalId) return item;
|
|
128
|
-
return _objectSpread2(_objectSpread2({}, item), {}, {
|
|
129
|
-
visible: false
|
|
130
|
-
});
|
|
131
|
-
});
|
|
132
|
-
});
|
|
133
|
-
updateLastToastId(function () {
|
|
134
|
-
return internalId;
|
|
135
|
-
});
|
|
136
|
-
};
|
|
137
|
-
var removeAll = function removeAll() {
|
|
138
|
-
updateToasts(function (last) {
|
|
139
|
-
return last.map(function (toast) {
|
|
140
|
-
return _objectSpread2(_objectSpread2({}, toast), {}, {
|
|
141
|
-
visible: false
|
|
142
|
-
});
|
|
143
|
-
});
|
|
144
|
-
});
|
|
145
|
-
};
|
|
146
|
-
var findToastOneByID = function findToastOneByID(id) {
|
|
147
|
-
return toasts.find(function (t) {
|
|
148
|
-
return t.id === id;
|
|
149
|
-
});
|
|
150
|
-
};
|
|
151
|
-
var removeToastOneByID = function removeToastOneByID(id) {
|
|
152
|
-
updateToasts(function (last) {
|
|
153
|
-
return last.map(function (toast) {
|
|
154
|
-
if (toast.id !== id) return toast;
|
|
155
|
-
return _objectSpread2(_objectSpread2({}, toast), {}, {
|
|
156
|
-
visible: false
|
|
157
|
-
});
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
};
|
|
161
|
-
var setToast = function setToast(toast) {
|
|
162
|
-
var internalIdent = "toast-".concat(getId());
|
|
163
|
-
var delay = toast.delay || defaultToast.delay;
|
|
164
|
-
if (toast.id) {
|
|
165
|
-
var hasIdent = toasts.find(function (t) {
|
|
166
|
-
return t.id === toast.id;
|
|
167
|
-
});
|
|
168
|
-
if (hasIdent) {
|
|
169
|
-
throw new Error('Toast: Already have the same key: "ident"');
|
|
170
|
-
}
|
|
171
|
-
}
|
|
172
|
-
updateToasts(function (last) {
|
|
173
|
-
var newToast = {
|
|
174
|
-
delay: delay,
|
|
175
|
-
text: toast.text,
|
|
176
|
-
visible: true,
|
|
177
|
-
type: toast.type || defaultToast.type,
|
|
178
|
-
id: toast.id || internalIdent,
|
|
179
|
-
actions: toast.actions || [],
|
|
180
|
-
_internalIdent: internalIdent,
|
|
181
|
-
_timeout: window.setTimeout(function () {
|
|
182
|
-
_cancel(internalIdent);
|
|
183
|
-
if (newToast._timeout) {
|
|
184
|
-
window.clearTimeout(newToast._timeout);
|
|
185
|
-
newToast._timeout = null;
|
|
186
|
-
}
|
|
187
|
-
}, delay),
|
|
188
|
-
cancel: function cancel() {
|
|
189
|
-
return _cancel(internalIdent);
|
|
190
|
-
}
|
|
191
|
-
};
|
|
192
|
-
return [].concat(_toConsumableArray(last), [newToast]);
|
|
193
|
-
});
|
|
194
|
-
};
|
|
195
|
-
return {
|
|
196
|
-
toasts: toasts,
|
|
197
|
-
setToast: setToast,
|
|
198
|
-
removeAll: removeAll,
|
|
199
|
-
findToastOneByID: findToastOneByID,
|
|
200
|
-
removeToastOneByID: removeToastOneByID
|
|
201
|
-
};
|
|
202
|
-
};
|
|
203
|
-
|
|
204
|
-
exports.default = useToasts;
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import React, { CSSProperties } from 'react';
|
|
2
|
-
import type { NormalTypes } from '../utils/prop-types';
|
|
3
|
-
import { ToastPlacement } from '../use-toasts/helpers';
|
|
4
|
-
export interface ToastAction {
|
|
5
|
-
name: string;
|
|
6
|
-
handler: (event: React.MouseEvent<HTMLButtonElement>, cancel: () => void) => void;
|
|
7
|
-
passive?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export type ToastTypes = NormalTypes;
|
|
10
|
-
export type ToastLayout = {
|
|
11
|
-
padding?: CSSProperties['padding'];
|
|
12
|
-
margin?: CSSProperties['margin'];
|
|
13
|
-
width?: CSSProperties['width'];
|
|
14
|
-
maxWidth?: CSSProperties['maxWidth'];
|
|
15
|
-
maxHeight?: CSSProperties['maxHeight'];
|
|
16
|
-
placement?: ToastPlacement;
|
|
17
|
-
};
|
|
18
|
-
export interface ToastInput {
|
|
19
|
-
text: string | React.ReactNode;
|
|
20
|
-
type?: ToastTypes;
|
|
21
|
-
id?: string;
|
|
22
|
-
delay?: number;
|
|
23
|
-
actions?: Array<ToastAction>;
|
|
24
|
-
}
|
|
25
|
-
export type ToastInstance = {
|
|
26
|
-
visible: boolean;
|
|
27
|
-
cancel: () => void;
|
|
28
|
-
_timeout: null | number;
|
|
29
|
-
_internalIdent: string;
|
|
30
|
-
};
|
|
31
|
-
export type Toast = Required<ToastInput> & ToastInstance;
|
|
32
|
-
export type ToastHooksResult = {
|
|
33
|
-
toasts: Array<Toast>;
|
|
34
|
-
setToast: (toast: ToastInput) => void;
|
|
35
|
-
removeAll: () => void;
|
|
36
|
-
findToastOneByID: (ident: string) => Toast | undefined;
|
|
37
|
-
removeToastOneByID: (ident: string) => void;
|
|
38
|
-
};
|
|
39
|
-
declare const useToasts: (layout?: ToastLayout) => ToastHooksResult;
|
|
40
|
-
export default useToasts;
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import type { ToastLayout, Toast } from '../use-toasts/use-toast';
|
|
3
|
-
export declare const defaultToastLayout: Required<ToastLayout>;
|
|
4
|
-
export type UpdateToastsFunction = (fn: (toasts: Array<Toast>) => Array<Toast>) => any;
|
|
5
|
-
export type UpdateToastsLayoutFunction = (fn: (layout: Required<ToastLayout>) => Required<ToastLayout>) => any;
|
|
6
|
-
export type UpdateToastsIDFunction = (fn: () => string | null) => any;
|
|
7
|
-
export interface HUIContextParams {
|
|
8
|
-
toasts: Array<Toast>;
|
|
9
|
-
updateToasts: UpdateToastsFunction;
|
|
10
|
-
toastLayout: Required<ToastLayout>;
|
|
11
|
-
updateToastLayout: UpdateToastsLayoutFunction;
|
|
12
|
-
lastUpdateToastId: string | null;
|
|
13
|
-
updateLastToastId: UpdateToastsIDFunction;
|
|
14
|
-
}
|
|
15
|
-
export declare const HUIContent: React.Context<HUIContextParams>;
|
|
16
|
-
export declare const useHUIContext: () => HUIContextParams;
|