@hybridcore/ui 1.6.0 → 1.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (128) hide show
  1. package/dist/{AccordionSummary-DgAwVTk8.js → AccordionSummary-CMg08YSA.js} +20 -23
  2. package/dist/{Add-DJLrrVHm.js → Add-DuVVJeQU.js} +65 -67
  3. package/dist/{ButtonBase-2bPw77UP.js → ButtonBase-sObABYY2.js} +60 -56
  4. package/dist/{Delete-CW0UZv1m.js → Delete-fBLhTHbF.js} +1 -1
  5. package/dist/{DialogContent-B3nbEbuv.js → DialogContent-CGJ7alb8.js} +8 -10
  6. package/dist/{FormControl-BLbrq4C7.js → FormControl-BCurCxRj.js} +377 -719
  7. package/dist/FormControlLabel-BkRfrhNy.js +601 -0
  8. package/dist/{IconButton-CHwRQF-g.js → IconButton-_opV1iNK.js} +26 -28
  9. package/dist/{InputAdornment-DLxWUE6H.js → InputAdornment-C7PEvvYr.js} +16 -18
  10. package/dist/InputLabel-rEwwnD4_.js +354 -0
  11. package/dist/{MenuItem-xZx_w7zA.js → MenuItem-DrE50M_p.js} +92 -70
  12. package/dist/Modal-DlB6GH-f.js +1659 -0
  13. package/dist/Paper-q9kKjAKx.js +527 -0
  14. package/dist/{Select-BgYwkZgI.js → TextField-DSDIEEKu.js} +1449 -901
  15. package/dist/{Typography-CxbneZy_.js → Typography-B-Z5Y0Xq.js} +46 -48
  16. package/dist/{capitalize-ciszXJ7R.js → capitalize-quqpGCFu.js} +1 -1
  17. package/dist/components/access/index.js +8 -15
  18. package/dist/components/access/logic.js +25 -0
  19. package/dist/components/card/index.js +158 -498
  20. package/dist/components/card/logic.js +24 -0
  21. package/dist/components/card/styled.js +226 -51
  22. package/dist/components/card-alternate/index.js +111 -139
  23. package/dist/components/card-alternate/logic.js +17 -0
  24. package/dist/components/card-alternate/styled.js +113 -19
  25. package/dist/components/collapsible-card/index.js +1 -1
  26. package/dist/components/collapsible-card/styled.js +1 -1
  27. package/dist/components/confirm/dialog.js +3 -3
  28. package/dist/components/confirm/index.js +1 -1
  29. package/dist/components/container/index.js +28 -269
  30. package/dist/components/container/logic.js +12 -0
  31. package/dist/components/container/styled.js +29 -0
  32. package/dist/components/context-menu/index.js +25 -457
  33. package/dist/components/context-menu/logic.js +14 -0
  34. package/dist/components/context-menu/styled.js +40 -0
  35. package/dist/components/data-security-selectors/security-level/index.js +36 -91
  36. package/dist/components/data-security-selectors/security-level/logic.js +73 -0
  37. package/dist/components/data-security-selectors/security-level/styled.js +47 -0
  38. package/dist/components/date-picker-with-custom-range/index.js +1 -1
  39. package/dist/components/geometry-picker/index.js +13 -12
  40. package/dist/components/instance-form/components/composite-list/index.js +1 -1
  41. package/dist/components/instance-form/components/variable/index.js +7 -9
  42. package/dist/components/instance-form/components/variables/index.js +1 -1
  43. package/dist/components/instance-form/index.js +1 -1
  44. package/dist/components/instance-hierarchy-table/index.js +32 -37
  45. package/dist/components/instance-hierarchy-table/logic.js +16 -0
  46. package/dist/components/instance-hierarchy-table/styled.js +53 -12
  47. package/dist/components/instance-table/index.js +30 -135
  48. package/dist/components/instance-table/logic.js +122 -0
  49. package/dist/components/instance-table/styled.js +53 -11
  50. package/dist/components/key-protection/index.js +45 -2
  51. package/dist/components/key-protection/logic.js +40 -0
  52. package/dist/components/key-protection/styled.js +45 -0
  53. package/dist/components/key-protection/utils.js +1 -1
  54. package/dist/components/loading/index.js +15 -9
  55. package/dist/components/loading/logic.js +15 -0
  56. package/dist/components/loading/styled.js +26 -19
  57. package/dist/components/phone-input/index.js +18 -22
  58. package/dist/components/phone-input/logic.js +14 -0
  59. package/dist/components/phone-input/styled.js +12 -4
  60. package/dist/components/property-mapping/index.js +1 -1
  61. package/dist/components/range-selector/components/composite-list-range/index.js +42 -50
  62. package/dist/components/range-selector/components/date-range/index.js +87 -4221
  63. package/dist/components/range-selector/components/geometry-range/index.js +11 -17
  64. package/dist/components/range-selector/components/number-range/index.js +48 -53
  65. package/dist/components/range-selector/components/string-range/index.js +15 -17
  66. package/dist/components/range-selector/index.js +63 -57
  67. package/dist/components/range-selector/logic.js +12 -0
  68. package/dist/components/range-selector/styled.js +4222 -0
  69. package/dist/components/template-filters/components/filter/index.js +13 -18
  70. package/dist/components/template-filters/components/tab-panel/index.js +8 -16
  71. package/dist/components/template-filters/index.js +21 -29
  72. package/dist/components/template-filters/logic.js +18 -0
  73. package/dist/components/template-filters/styled.js +44 -1
  74. package/dist/components/template-form/components/property-list/index.js +8 -8
  75. package/dist/components/template-form/components/property-list/property-list-columns.js +3 -3
  76. package/dist/components/template-form/components/property-list/property-list-form.js +8 -10
  77. package/dist/components/template-form/components/recognition-property-list/index.js +6 -6
  78. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-columns.js +2 -2
  79. package/dist/components/template-form/components/recognition-property-list/recognition-property-list-form.js +8 -9
  80. package/dist/components/template-form/index.js +32 -33
  81. package/dist/components/template-property-filters/index.js +45 -95
  82. package/dist/components/template-property-filters/logic.js +27 -0
  83. package/dist/components/template-property-filters/property.js +105 -165
  84. package/dist/components/template-property-filters/styled.js +121 -20
  85. package/dist/components/tree-select/index.js +52 -67
  86. package/dist/components/tree-select/logic.js +59 -0
  87. package/dist/components/tree-select/styled.js +45 -62
  88. package/dist/components/treeview-filter/index.js +43 -65
  89. package/dist/components/treeview-filter/item/index.js +43 -42
  90. package/dist/components/treeview-filter/item-label/index.js +17 -37
  91. package/dist/components/treeview-filter/logic.js +28 -0
  92. package/dist/components/treeview-filter/styled.js +86 -0
  93. package/dist/components/uploader/index.js +532 -567
  94. package/dist/components/uploader/logic.js +74 -0
  95. package/dist/components/uploader/styled.js +93 -46
  96. package/dist/{createSvgIcon-BjpIhJ30.js → createSvgIcon-BM3-TsGy.js} +25 -26
  97. package/dist/{createSvgIcon-DrtgaibK.js → createSvgIcon-DX-SqL8M.js} +23 -25
  98. package/dist/{dialog-DcwXug9J.js → dialog-cf4HUXXl.js} +26 -27
  99. package/dist/{index-syTc6m_V.js → index-C8C3YXle.js} +92 -94
  100. package/dist/{index-CcdvNlgr.js → index-DPKUmQnz.js} +11 -13
  101. package/dist/isMuiElement-BkJ72LB3.js +26 -0
  102. package/dist/main.d.ts +734 -298
  103. package/dist/main.js +15 -15
  104. package/dist/{property-list-form-zZQfpR0X.js → property-list-form-DL_dEoNn.js} +56 -61
  105. package/dist/{createTheme-DYxDnE9u.js → styled-Bsjp3kFh.js} +232 -176
  106. package/dist/{useMobilePicker-BLg3Blg8.js → useMobilePicker-B-M3dnTn.js} +2692 -2288
  107. package/dist/{utils-Bq0ye5vf.js → utils-Cxu-fHjQ.js} +7 -7
  108. package/package.json +1 -1
  109. package/dist/Box-p6OtTUEo.js +0 -30
  110. package/dist/Button-CvE2gnly.js +0 -370
  111. package/dist/CardContent-CSHh-ZlM.js +0 -74
  112. package/dist/Checkbox-CWRMFTBp.js +0 -421
  113. package/dist/FormControlLabel-C8SPv14J.js +0 -195
  114. package/dist/List-tqElle9C.js +0 -121
  115. package/dist/ListItem-CfjsIg4B.js +0 -430
  116. package/dist/Modal-DhPpOoGB.js +0 -1299
  117. package/dist/Paper-2B03OBmZ.js +0 -169
  118. package/dist/TextField-1yCesIbH.js +0 -457
  119. package/dist/components/key-protection/menu.js +0 -85
  120. package/dist/components/treeview-filter/item/styled.js +0 -39
  121. package/dist/debounce-46wSf_lW.js +0 -15
  122. package/dist/isHostComponent-kiaBvYVo.js +0 -6
  123. package/dist/isMuiElement-CxT3_ACP.js +0 -13
  124. package/dist/listItemTextClasses-C3lndiXO.js +0 -16
  125. package/dist/styled-eZwjUruw.js +0 -12
  126. package/dist/useFormControl-CatNKXAi.js +0 -10
  127. package/dist/useThemeProps-BzzHcQyd.js +0 -58
  128. package/dist/utils-BDNynJcd.js +0 -365
@@ -1,39 +0,0 @@
1
- import { TreeItem as r } from "@mui/x-tree-view";
2
- import { styled as t, alpha as i } from "@mui/material";
3
- const l = t(r)(
4
- ({ theme: o, checked: e }) => ({
5
- position: "relative",
6
- "& .MuiTreeItem-content": {
7
- flexDirection: "row-reverse",
8
- borderBottom: "1px solid",
9
- borderBottomColor: o.palette.divider,
10
- boxSizing: "border-box",
11
- borderRadius: 0
12
- },
13
- "& .MuiTreeItem-iconContainer": {
14
- transition: ".3s all",
15
- "& svg": {
16
- fontSize: "20px !important"
17
- }
18
- },
19
- // "& .MuiTreeItem-content.Mui-expanded .MuiTreeItem-iconContainer": {
20
- // // transform: "rotate(90deg)",
21
- // },
22
- ...e && {
23
- "&:before": {
24
- content: '""',
25
- position: "absolute",
26
- left: 0,
27
- top: 0,
28
- bottom: 0,
29
- right: 0,
30
- borderLeft: "1px solid",
31
- borderLeftColor: o.palette.primary.main,
32
- backgroundColor: i(o.palette.primary.main, 0.1)
33
- }
34
- }
35
- })
36
- );
37
- export {
38
- l as TreeItem
39
- };
@@ -1,15 +0,0 @@
1
- function i(o, u = 166) {
2
- let e;
3
- function t(...c) {
4
- const n = () => {
5
- o.apply(this, c);
6
- };
7
- clearTimeout(e), e = setTimeout(n, u);
8
- }
9
- return t.clear = () => {
10
- clearTimeout(e);
11
- }, t;
12
- }
13
- export {
14
- i as d
15
- };
@@ -1,6 +0,0 @@
1
- function n(t) {
2
- return typeof t == "string";
3
- }
4
- export {
5
- n as i
6
- };
@@ -1,13 +0,0 @@
1
- import * as u from "react";
2
- function m(i, a) {
3
- var l, e;
4
- return /* @__PURE__ */ u.isValidElement(i) && a.indexOf(
5
- // For server components `muiName` is avaialble in element.type._payload.value.muiName
6
- // relevant info - https://github.com/facebook/react/blob/2807d781a08db8e9873687fccc25c0f12b4fb3d4/packages/react/src/ReactLazy.js#L45
7
- // eslint-disable-next-line no-underscore-dangle
8
- (l = i.type.muiName) != null ? l : (e = i.type) == null || (e = e._payload) == null || (e = e.value) == null ? void 0 : e.muiName
9
- ) !== -1;
10
- }
11
- export {
12
- m as i
13
- };
@@ -1,16 +0,0 @@
1
- import { g as s } from "./useThemeProps-BzzHcQyd.js";
2
- import { g as e } from "./createTheme-DYxDnE9u.js";
3
- function n(t) {
4
- return e("MuiListItemIcon", t);
5
- }
6
- const o = s("MuiListItemIcon", ["root", "alignItemsFlexStart"]);
7
- function l(t) {
8
- return e("MuiListItemText", t);
9
- }
10
- const r = s("MuiListItemText", ["root", "multiline", "dense", "inset", "primary", "secondary"]);
11
- export {
12
- o as a,
13
- l as b,
14
- n as g,
15
- r as l
16
- };
@@ -1,12 +0,0 @@
1
- import { createStyled as s, shouldForwardProp as r } from "@mui/system";
2
- import { c as t } from "./createTheme-DYxDnE9u.js";
3
- const a = t(), e = (o) => r(o) && o !== "classes", l = r, m = s({
4
- defaultTheme: a,
5
- rootShouldForwardProp: e
6
- });
7
- export {
8
- l as a,
9
- a as d,
10
- e as r,
11
- m as s
12
- };
@@ -1,10 +0,0 @@
1
- import * as o from "react";
2
- const t = /* @__PURE__ */ o.createContext(void 0);
3
- process.env.NODE_ENV !== "production" && (t.displayName = "FormControlContext");
4
- function e() {
5
- return o.useContext(t);
6
- }
7
- export {
8
- t as F,
9
- e as u
10
- };
@@ -1,58 +0,0 @@
1
- import { g as a } from "./createTheme-DYxDnE9u.js";
2
- import { useThemeProps as p } from "@mui/system";
3
- import { d as c } from "./styled-eZwjUruw.js";
4
- function f(r) {
5
- var e, n, t = "";
6
- if (typeof r == "string" || typeof r == "number") t += r;
7
- else if (typeof r == "object") if (Array.isArray(r)) for (e = 0; e < r.length; e++) r[e] && (n = f(r[e])) && (t && (t += " "), t += n);
8
- else for (e in r) r[e] && (t && (t += " "), t += e);
9
- return t;
10
- }
11
- function g() {
12
- for (var r, e, n = 0, t = ""; n < arguments.length; ) (r = arguments[n++]) && (e = f(r)) && (t && (t += " "), t += e);
13
- return t;
14
- }
15
- function d(r, e) {
16
- return process.env.NODE_ENV === "production" ? () => null : function(...t) {
17
- return r(...t) || e(...t);
18
- };
19
- }
20
- function y(r, e, n = void 0) {
21
- const t = {};
22
- return Object.keys(r).forEach(
23
- // `Object.keys(slots)` can't be wider than `T` because we infer `T` from `slots`.
24
- // @ts-expect-error https://github.com/microsoft/TypeScript/pull/12253#issuecomment-263132208
25
- (u) => {
26
- t[u] = r[u].reduce((i, o) => {
27
- if (o) {
28
- const s = e(o);
29
- s !== "" && i.push(s), n && n[o] && i.push(n[o]);
30
- }
31
- return i;
32
- }, []).join(" ");
33
- }
34
- ), t;
35
- }
36
- function T(r, e, n = "Mui") {
37
- const t = {};
38
- return e.forEach((u) => {
39
- t[u] = a(r, u, n);
40
- }), t;
41
- }
42
- function b({
43
- props: r,
44
- name: e
45
- }) {
46
- return p({
47
- props: r,
48
- name: e,
49
- defaultTheme: c
50
- });
51
- }
52
- export {
53
- y as a,
54
- d as b,
55
- g as c,
56
- T as g,
57
- b as u
58
- };
@@ -1,365 +0,0 @@
1
- import { _ as D } from "./objectWithoutPropertiesLoose-DJteAcBH.js";
2
- import { _ as C, T as S } from "./ButtonBase-2bPw77UP.js";
3
- import { P as i } from "./index-C__OZmYy.js";
4
- import v from "react";
5
- import b from "react-dom";
6
- const N = {
7
- disabled: !1
8
- };
9
- var R = process.env.NODE_ENV !== "production" ? i.oneOfType([i.number, i.shape({
10
- enter: i.number,
11
- exit: i.number,
12
- appear: i.number
13
- }).isRequired]) : null, P = process.env.NODE_ENV !== "production" ? i.oneOfType([i.string, i.shape({
14
- enter: i.string,
15
- exit: i.string,
16
- active: i.string
17
- }), i.shape({
18
- enter: i.string,
19
- enterDone: i.string,
20
- enterActive: i.string,
21
- exit: i.string,
22
- exitDone: i.string,
23
- exitActive: i.string
24
- })]) : null, y = function(a) {
25
- return a.scrollTop;
26
- }, x = "unmounted", f = "exited", c = "entering", h = "entered", T = "exiting", l = /* @__PURE__ */ function(u) {
27
- C(a, u);
28
- function a(r, e) {
29
- var t;
30
- t = u.call(this, r, e) || this;
31
- var n = e, s = n && !n.isMounting ? r.enter : r.appear, p;
32
- return t.appearStatus = null, r.in ? s ? (p = f, t.appearStatus = c) : p = h : r.unmountOnExit || r.mountOnEnter ? p = x : p = f, t.state = {
33
- status: p
34
- }, t.nextCallback = null, t;
35
- }
36
- a.getDerivedStateFromProps = function(e, t) {
37
- var n = e.in;
38
- return n && t.status === x ? {
39
- status: f
40
- } : null;
41
- };
42
- var o = a.prototype;
43
- return o.componentDidMount = function() {
44
- this.updateStatus(!0, this.appearStatus);
45
- }, o.componentDidUpdate = function(e) {
46
- var t = null;
47
- if (e !== this.props) {
48
- var n = this.state.status;
49
- this.props.in ? n !== c && n !== h && (t = c) : (n === c || n === h) && (t = T);
50
- }
51
- this.updateStatus(!1, t);
52
- }, o.componentWillUnmount = function() {
53
- this.cancelNextCallback();
54
- }, o.getTimeouts = function() {
55
- var e = this.props.timeout, t, n, s;
56
- return t = n = s = e, e != null && typeof e != "number" && (t = e.exit, n = e.enter, s = e.appear !== void 0 ? e.appear : n), {
57
- exit: t,
58
- enter: n,
59
- appear: s
60
- };
61
- }, o.updateStatus = function(e, t) {
62
- if (e === void 0 && (e = !1), t !== null)
63
- if (this.cancelNextCallback(), t === c) {
64
- if (this.props.unmountOnExit || this.props.mountOnEnter) {
65
- var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this);
66
- n && y(n);
67
- }
68
- this.performEnter(e);
69
- } else
70
- this.performExit();
71
- else this.props.unmountOnExit && this.state.status === f && this.setState({
72
- status: x
73
- });
74
- }, o.performEnter = function(e) {
75
- var t = this, n = this.props.enter, s = this.context ? this.context.isMounting : e, p = this.props.nodeRef ? [s] : [b.findDOMNode(this), s], d = p[0], m = p[1], g = this.getTimeouts(), O = s ? g.appear : g.enter;
76
- if (!e && !n || N.disabled) {
77
- this.safeSetState({
78
- status: h
79
- }, function() {
80
- t.props.onEntered(d);
81
- });
82
- return;
83
- }
84
- this.props.onEnter(d, m), this.safeSetState({
85
- status: c
86
- }, function() {
87
- t.props.onEntering(d, m), t.onTransitionEnd(O, function() {
88
- t.safeSetState({
89
- status: h
90
- }, function() {
91
- t.props.onEntered(d, m);
92
- });
93
- });
94
- });
95
- }, o.performExit = function() {
96
- var e = this, t = this.props.exit, n = this.getTimeouts(), s = this.props.nodeRef ? void 0 : b.findDOMNode(this);
97
- if (!t || N.disabled) {
98
- this.safeSetState({
99
- status: f
100
- }, function() {
101
- e.props.onExited(s);
102
- });
103
- return;
104
- }
105
- this.props.onExit(s), this.safeSetState({
106
- status: T
107
- }, function() {
108
- e.props.onExiting(s), e.onTransitionEnd(n.exit, function() {
109
- e.safeSetState({
110
- status: f
111
- }, function() {
112
- e.props.onExited(s);
113
- });
114
- });
115
- });
116
- }, o.cancelNextCallback = function() {
117
- this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
118
- }, o.safeSetState = function(e, t) {
119
- t = this.setNextCallback(t), this.setState(e, t);
120
- }, o.setNextCallback = function(e) {
121
- var t = this, n = !0;
122
- return this.nextCallback = function(s) {
123
- n && (n = !1, t.nextCallback = null, e(s));
124
- }, this.nextCallback.cancel = function() {
125
- n = !1;
126
- }, this.nextCallback;
127
- }, o.onTransitionEnd = function(e, t) {
128
- this.setNextCallback(t);
129
- var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this), s = e == null && !this.props.addEndListener;
130
- if (!n || s) {
131
- setTimeout(this.nextCallback, 0);
132
- return;
133
- }
134
- if (this.props.addEndListener) {
135
- var p = this.props.nodeRef ? [this.nextCallback] : [n, this.nextCallback], d = p[0], m = p[1];
136
- this.props.addEndListener(d, m);
137
- }
138
- e != null && setTimeout(this.nextCallback, e);
139
- }, o.render = function() {
140
- var e = this.state.status;
141
- if (e === x)
142
- return null;
143
- var t = this.props, n = t.children;
144
- t.in, t.mountOnEnter, t.unmountOnExit, t.appear, t.enter, t.exit, t.timeout, t.addEndListener, t.onEnter, t.onEntering, t.onEntered, t.onExit, t.onExiting, t.onExited, t.nodeRef;
145
- var s = D(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
146
- return (
147
- // allows for nested Transitions
148
- /* @__PURE__ */ v.createElement(S.Provider, {
149
- value: null
150
- }, typeof n == "function" ? n(e, s) : v.cloneElement(v.Children.only(n), s))
151
- );
152
- }, a;
153
- }(v.Component);
154
- l.contextType = S;
155
- l.propTypes = process.env.NODE_ENV !== "production" ? {
156
- /**
157
- * A React reference to DOM element that need to transition:
158
- * https://stackoverflow.com/a/51127130/4671932
159
- *
160
- * - When `nodeRef` prop is used, `node` is not passed to callback functions
161
- * (e.g. `onEnter`) because user already has direct access to the node.
162
- * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
163
- * `nodeRef` need to be provided to `Transition` with changed `key` prop
164
- * (see
165
- * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
166
- */
167
- nodeRef: i.shape({
168
- current: typeof Element > "u" ? i.any : function(u, a, o, r, e, t) {
169
- var n = u[a];
170
- return i.instanceOf(n && "ownerDocument" in n ? n.ownerDocument.defaultView.Element : Element)(u, a, o, r, e, t);
171
- }
172
- }),
173
- /**
174
- * A `function` child can be used instead of a React element. This function is
175
- * called with the current transition status (`'entering'`, `'entered'`,
176
- * `'exiting'`, `'exited'`), which can be used to apply context
177
- * specific props to a component.
178
- *
179
- * ```jsx
180
- * <Transition in={this.state.in} timeout={150}>
181
- * {state => (
182
- * <MyComponent className={`fade fade-${state}`} />
183
- * )}
184
- * </Transition>
185
- * ```
186
- */
187
- children: i.oneOfType([i.func.isRequired, i.element.isRequired]).isRequired,
188
- /**
189
- * Show the component; triggers the enter or exit states
190
- */
191
- in: i.bool,
192
- /**
193
- * By default the child component is mounted immediately along with
194
- * the parent `Transition` component. If you want to "lazy mount" the component on the
195
- * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
196
- * mounted, even on "exited", unless you also specify `unmountOnExit`.
197
- */
198
- mountOnEnter: i.bool,
199
- /**
200
- * By default the child component stays mounted after it reaches the `'exited'` state.
201
- * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
202
- */
203
- unmountOnExit: i.bool,
204
- /**
205
- * By default the child component does not perform the enter transition when
206
- * it first mounts, regardless of the value of `in`. If you want this
207
- * behavior, set both `appear` and `in` to `true`.
208
- *
209
- * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
210
- * > only adds an additional enter transition. However, in the
211
- * > `<CSSTransition>` component that first enter transition does result in
212
- * > additional `.appear-*` classes, that way you can choose to style it
213
- * > differently.
214
- */
215
- appear: i.bool,
216
- /**
217
- * Enable or disable enter transitions.
218
- */
219
- enter: i.bool,
220
- /**
221
- * Enable or disable exit transitions.
222
- */
223
- exit: i.bool,
224
- /**
225
- * The duration of the transition, in milliseconds.
226
- * Required unless `addEndListener` is provided.
227
- *
228
- * You may specify a single timeout for all transitions:
229
- *
230
- * ```jsx
231
- * timeout={500}
232
- * ```
233
- *
234
- * or individually:
235
- *
236
- * ```jsx
237
- * timeout={{
238
- * appear: 500,
239
- * enter: 300,
240
- * exit: 500,
241
- * }}
242
- * ```
243
- *
244
- * - `appear` defaults to the value of `enter`
245
- * - `enter` defaults to `0`
246
- * - `exit` defaults to `0`
247
- *
248
- * @type {number | { enter?: number, exit?: number, appear?: number }}
249
- */
250
- timeout: function(a) {
251
- var o = R;
252
- a.addEndListener || (o = o.isRequired);
253
- for (var r = arguments.length, e = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++)
254
- e[t - 1] = arguments[t];
255
- return o.apply(void 0, [a].concat(e));
256
- },
257
- /**
258
- * Add a custom transition end trigger. Called with the transitioning
259
- * DOM node and a `done` callback. Allows for more fine grained transition end
260
- * logic. Timeouts are still used as a fallback if provided.
261
- *
262
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
263
- *
264
- * ```jsx
265
- * addEndListener={(node, done) => {
266
- * // use the css transitionend event to mark the finish of a transition
267
- * node.addEventListener('transitionend', done, false);
268
- * }}
269
- * ```
270
- */
271
- addEndListener: i.func,
272
- /**
273
- * Callback fired before the "entering" status is applied. An extra parameter
274
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
275
- *
276
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
277
- *
278
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
279
- */
280
- onEnter: i.func,
281
- /**
282
- * Callback fired after the "entering" status is applied. An extra parameter
283
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
284
- *
285
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
286
- *
287
- * @type Function(node: HtmlElement, isAppearing: bool)
288
- */
289
- onEntering: i.func,
290
- /**
291
- * Callback fired after the "entered" status is applied. An extra parameter
292
- * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
293
- *
294
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
295
- *
296
- * @type Function(node: HtmlElement, isAppearing: bool) -> void
297
- */
298
- onEntered: i.func,
299
- /**
300
- * Callback fired before the "exiting" status is applied.
301
- *
302
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
303
- *
304
- * @type Function(node: HtmlElement) -> void
305
- */
306
- onExit: i.func,
307
- /**
308
- * Callback fired after the "exiting" status is applied.
309
- *
310
- * **Note**: when `nodeRef` prop is passed, `node` is not passed.
311
- *
312
- * @type Function(node: HtmlElement) -> void
313
- */
314
- onExiting: i.func,
315
- /**
316
- * Callback fired after the "exited" status is applied.
317
- *
318
- * **Note**: when `nodeRef` prop is passed, `node` is not passed
319
- *
320
- * @type Function(node: HtmlElement) -> void
321
- */
322
- onExited: i.func
323
- } : {};
324
- function E() {
325
- }
326
- l.defaultProps = {
327
- in: !1,
328
- mountOnEnter: !1,
329
- unmountOnExit: !1,
330
- appear: !1,
331
- enter: !0,
332
- exit: !0,
333
- onEnter: E,
334
- onEntering: E,
335
- onEntered: E,
336
- onExit: E,
337
- onExiting: E,
338
- onExited: E
339
- };
340
- l.UNMOUNTED = x;
341
- l.EXITED = f;
342
- l.ENTERING = c;
343
- l.ENTERED = h;
344
- l.EXITING = T;
345
- const U = (u) => u.scrollTop;
346
- function w(u, a) {
347
- var o, r;
348
- const {
349
- timeout: e,
350
- easing: t,
351
- style: n = {}
352
- } = u;
353
- return {
354
- duration: (o = n.transitionDuration) != null ? o : typeof e == "number" ? e : e[a.mode] || 0,
355
- easing: (r = n.transitionTimingFunction) != null ? r : typeof t == "object" ? t[a.mode] : t,
356
- delay: n.transitionDelay
357
- };
358
- }
359
- export {
360
- l as T,
361
- P as c,
362
- y as f,
363
- w as g,
364
- U as r
365
- };