@hybridcore/ui 1.0.2 → 1.1.2

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 (105) hide show
  1. package/dist/ButtonBase-BYmh3G5j.js +967 -0
  2. package/dist/CardContent-C8PxkJz4.js +73 -0
  3. package/dist/Checkbox-DostZSwR.js +673 -0
  4. package/dist/DialogContent-2aPOjKE7.js +2025 -0
  5. package/dist/FormControl-BiAFm76F.js +1491 -0
  6. package/dist/IconButton-CQJ8wZE8.js +183 -0
  7. package/dist/Input-Bf5G3tFN.js +324 -0
  8. package/dist/OutlinedInput-BEVE8VZQ.js +452 -0
  9. package/dist/Paper-CaiWdndQ.js +162 -0
  10. package/dist/Select-DxpxZbJp.js +2526 -0
  11. package/dist/Source-CnCcu5UP.js +4374 -0
  12. package/dist/Text-BT5kPHOo.js +2192 -0
  13. package/dist/Typography-XIiVCSto.js +178 -0
  14. package/dist/assertThisInitialized-BUtkG-md.js +13 -0
  15. package/dist/assets/index.css +1 -0
  16. package/dist/assets/index2.css +1 -0
  17. package/dist/chainPropTypes-DtBfUj5o.js +96 -0
  18. package/dist/components/access/helpers.js +32 -0
  19. package/dist/components/access/index.js +15 -0
  20. package/dist/components/card/index.js +159 -469
  21. package/dist/components/card/styled.js +75 -7
  22. package/dist/components/conditional-wrapper/index.js +9 -0
  23. package/dist/components/confirm/dialog.js +151 -0
  24. package/dist/components/confirm/index.js +23 -0
  25. package/dist/components/container/index.js +270 -0
  26. package/dist/components/context-menu/index.js +973 -0
  27. package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
  28. package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
  29. package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
  30. package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
  31. package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
  32. package/dist/components/data-management/instance-form/index.js +437 -0
  33. package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
  34. package/dist/components/data-security-selectors/security-level/index.js +81 -0
  35. package/dist/components/date-time-picker/index.js +103 -0
  36. package/dist/components/geometry-picker/coordinate/index.js +93 -0
  37. package/dist/components/geometry-picker/edit/index.js +71 -0
  38. package/dist/components/geometry-picker/geometry/index.js +160 -0
  39. package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
  40. package/dist/components/geometry-picker/index.js +140 -0
  41. package/dist/components/geometry-picker/kml/index.js +62 -0
  42. package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
  43. package/dist/components/geometry-picker/logic.js +69 -0
  44. package/dist/components/geometry-picker/map/index.js +42 -0
  45. package/dist/components/geometry-picker/map/logic.js +2360 -0
  46. package/dist/components/geometry-picker/map/style.js +88 -0
  47. package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
  48. package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
  49. package/dist/components/geometry-picker/parser/index.js +179 -0
  50. package/dist/components/geometry-picker/parser/logic.js +84 -0
  51. package/dist/components/geometry-picker/parser/styled.js +25 -0
  52. package/dist/components/geometry-picker/styled.js +48 -0
  53. package/dist/components/geometry-picker/wkt/index.js +59 -0
  54. package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
  55. package/dist/components/icon-button/index.js +18 -0
  56. package/dist/components/icon-button/styled.js +51 -0
  57. package/dist/components/key-protection/index.js +4 -0
  58. package/dist/components/key-protection/menu.js +85 -0
  59. package/dist/components/key-protection/utils.js +10 -0
  60. package/dist/components/loading/index.js +7 -0
  61. package/dist/components/loading/styled.js +16 -0
  62. package/dist/components/map/helpers/kml.js +45 -0
  63. package/dist/components/map/helpers/mapbox.js +48 -0
  64. package/dist/components/map/helpers/ol.js +25 -0
  65. package/dist/components/map/helpers/wkt.js +29 -0
  66. package/dist/components/map/index.js +8 -0
  67. package/dist/components/map/logic.js +140 -0
  68. package/dist/components/map/styled.js +8 -0
  69. package/dist/components/phone-input/index.js +25 -0
  70. package/dist/components/phone-input/styled.js +26 -0
  71. package/dist/components/search-input/index.js +76 -0
  72. package/dist/components/tree-select/index.js +70 -0
  73. package/dist/components/tree-select/styled.js +64 -0
  74. package/dist/components/treeview-filter/index.js +621 -0
  75. package/dist/components/treeview-filter/item/index.js +7 -0
  76. package/dist/components/treeview-filter/item-label/index.js +44 -0
  77. package/dist/createTheme-agWfFD64.js +2392 -0
  78. package/dist/exactProp-CI8dagM-.js +36 -0
  79. package/dist/extends-C3382pL0.js +22 -0
  80. package/dist/has-9_asnBxn.js +688 -0
  81. package/dist/hooks/useMenuLogic.js +21 -0
  82. package/dist/hooks/useToggle.js +23 -0
  83. package/dist/index-Bw_m9ult.js +1105 -0
  84. package/dist/index-IvOfmM1F.js +34 -0
  85. package/dist/index-wW2D1aTG.js +957 -0
  86. package/dist/isHostComponent-kiaBvYVo.js +6 -0
  87. package/dist/isMuiElement-CxT3_ACP.js +13 -0
  88. package/dist/listItemTextClasses-BvXFz-Oc.js +132 -0
  89. package/dist/main.d.ts +1317 -0
  90. package/dist/main.js +41 -2
  91. package/dist/ol-DXmSLlWv.js +15041 -0
  92. package/dist/ownerDocument-CUrv0DIK.js +6 -0
  93. package/dist/ownerWindow-niciwP7I.js +7 -0
  94. package/dist/styled-C43K9x7T.js +229 -0
  95. package/dist/styled-Iq9jsO4F.js +1033 -0
  96. package/dist/useFormControl-CatNKXAi.js +10 -0
  97. package/dist/useId-BHG98T5I.js +26 -0
  98. package/dist/useTheme-C0Dky5rV.js +17 -0
  99. package/dist/useTheme-CeyGVuQP.js +10 -0
  100. package/dist/useThemeProps-CzAjOL6F.js +26 -0
  101. package/dist/utils/ontology.js +37 -0
  102. package/dist/utils-Bq0ye5vf.js +115 -0
  103. package/dist/utils-DLpkeyhZ.js +365 -0
  104. package/package.json +26 -5
  105. package/dist/styled-BG5UIpPU.js +0 -3459
@@ -0,0 +1,10 @@
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
+ };
@@ -0,0 +1,26 @@
1
+ import * as u from "react";
2
+ function f(...t) {
3
+ return t.reduce((n, e) => e == null ? n : function(...a) {
4
+ n.apply(this, a), e.apply(this, a);
5
+ }, () => {
6
+ });
7
+ }
8
+ let c = 0;
9
+ function s(t) {
10
+ const [n, e] = u.useState(t), o = t || n;
11
+ return u.useEffect(() => {
12
+ n == null && (c += 1, e(`mui-${c}`));
13
+ }, [n]), o;
14
+ }
15
+ const l = u.useId;
16
+ function i(t) {
17
+ if (l !== void 0) {
18
+ const n = l();
19
+ return t ?? n;
20
+ }
21
+ return s(t);
22
+ }
23
+ export {
24
+ f as c,
25
+ i as u
26
+ };
@@ -0,0 +1,17 @@
1
+ import * as n from "react";
2
+ import { ThemeContext as o } from "@emotion/react";
3
+ import { a as m } from "./createTheme-agWfFD64.js";
4
+ function r(e) {
5
+ return Object.keys(e).length === 0;
6
+ }
7
+ function s(e = null) {
8
+ const t = n.useContext(o);
9
+ return !t || r(t) ? e : t;
10
+ }
11
+ const u = m();
12
+ function f(e = u) {
13
+ return s(e);
14
+ }
15
+ export {
16
+ f as u
17
+ };
@@ -0,0 +1,10 @@
1
+ import * as o from "react";
2
+ import { d as r, T as s } from "./styled-Iq9jsO4F.js";
3
+ import { u as t } from "./useTheme-C0Dky5rV.js";
4
+ function a() {
5
+ const e = t(r);
6
+ return process.env.NODE_ENV !== "production" && o.useDebugValue(e), e[s] || e;
7
+ }
8
+ export {
9
+ a as u
10
+ };
@@ -0,0 +1,26 @@
1
+ import { r as n } from "./chainPropTypes-DtBfUj5o.js";
2
+ import { u as p } from "./useTheme-C0Dky5rV.js";
3
+ function m(t) {
4
+ const {
5
+ theme: e,
6
+ name: o,
7
+ props: r
8
+ } = t;
9
+ return !e || !e.components || !e.components[o] || !e.components[o].defaultProps ? r : n(e.components[o].defaultProps, r);
10
+ }
11
+ function P({
12
+ props: t,
13
+ name: e,
14
+ defaultTheme: o,
15
+ themeId: r
16
+ }) {
17
+ let s = p(o);
18
+ return r && (s = s[r] || s), m({
19
+ theme: s,
20
+ name: e,
21
+ props: t
22
+ });
23
+ }
24
+ export {
25
+ P as u
26
+ };
@@ -0,0 +1,37 @@
1
+ import p from "lodash";
2
+ const m = (e, i = !0) => {
3
+ let n = [];
4
+ const s = e.values();
5
+ for (let t of s)
6
+ (t.parent === null || !e.has(t.parent)) && n.push(t.templateKey);
7
+ const c = (t) => {
8
+ let l = [];
9
+ const r = e.get(t);
10
+ if (r && r.childrenKeys)
11
+ for (let u of r.childrenKeys) {
12
+ let f = c(u), o = e.get(u);
13
+ o && (f.length && (o.children = f), l.push(o));
14
+ }
15
+ return l;
16
+ };
17
+ let h = [];
18
+ return n.forEach((t) => {
19
+ let l = e.get(t);
20
+ if (l) {
21
+ const r = c(t);
22
+ l.children = r, i && l.parent === null ? h.push(...l.children) : h.push(l);
23
+ }
24
+ }), p.uniqBy(h, "id");
25
+ }, d = (e) => {
26
+ let i = [];
27
+ for (let n in e)
28
+ if (i.push(e[n]), e[n].children) {
29
+ const s = d(e[n].children);
30
+ i.push(...s);
31
+ }
32
+ return i;
33
+ };
34
+ export {
35
+ d as flattenNestedTemplates,
36
+ m as getNestedChildrenFromMap
37
+ };
@@ -0,0 +1,115 @@
1
+ async function c() {
2
+ const e = {
3
+ challenge: new Uint8Array([583, 3, 100]),
4
+ rp: { id: window.location.hostname, name: "Smart Navigator" },
5
+ user: {
6
+ id: new TextEncoder().encode("hybridcore"),
7
+ name: "info@hybridcore.eu",
8
+ displayName: "Hybrid Core"
9
+ },
10
+ pubKeyCredParams: [{ type: "public-key", alg: -7 }]
11
+ };
12
+ return await navigator.credentials.create({ publicKey: e });
13
+ }
14
+ async function i(e) {
15
+ const r = {
16
+ challenge: new Uint8Array([583, 3, 100]),
17
+ rpId: window.location.hostname,
18
+ userVerification: "required",
19
+ allowCredentials: [
20
+ {
21
+ type: "public-key",
22
+ id: e
23
+ }
24
+ ]
25
+ };
26
+ return await navigator.credentials.get({
27
+ publicKey: r
28
+ }), !0;
29
+ }
30
+ async function s() {
31
+ return await crypto.subtle.generateKey(
32
+ { name: "AES-GCM", length: 256 },
33
+ !0,
34
+ ["encrypt", "decrypt"]
35
+ );
36
+ }
37
+ async function y(e, r) {
38
+ try {
39
+ const t = new TextEncoder().encode(r), { ciphertext: n, iv: a } = await p(e, t);
40
+ return {
41
+ status: "SUCCESS",
42
+ data: window.btoa(
43
+ a.toString() + ":" + new Uint8Array(n).toString()
44
+ )
45
+ };
46
+ } catch (t) {
47
+ let n = "Encryption error!";
48
+ return (t.name === "NotAllowedError" || t.name === "TimeoutError") && (n = "User interaction required or operation timed out."), {
49
+ status: "ERROR",
50
+ message: n
51
+ };
52
+ }
53
+ }
54
+ async function d(e, r) {
55
+ try {
56
+ const t = window.atob(r).split(":"), n = new Uint8Array(t[0].split(",")), a = new Uint8Array(t[1].split(",")).buffer, o = await u(e, a, n);
57
+ return {
58
+ status: "SUCCESS",
59
+ data: new TextDecoder().decode(o)
60
+ };
61
+ } catch (t) {
62
+ let n = "Decryption error!";
63
+ return (t.name === "NotAllowedError" || t.name === "TimeoutError") && (n = "User interaction required or operation timed out."), console.log(t), {
64
+ status: "ERROR",
65
+ message: n
66
+ };
67
+ }
68
+ }
69
+ async function p(e, r) {
70
+ const t = crypto.getRandomValues(new Uint8Array(12));
71
+ return { ciphertext: await crypto.subtle.encrypt(
72
+ { name: "AES-GCM", iv: t },
73
+ e,
74
+ r
75
+ ), iv: t };
76
+ }
77
+ async function u(e, r, t) {
78
+ return crypto.subtle.decrypt({ name: "AES-GCM", iv: t }, e, r);
79
+ }
80
+ async function l(e) {
81
+ return await window.crypto.subtle.exportKey("jwk", e);
82
+ }
83
+ async function w(e) {
84
+ return await window.crypto.subtle.importKey(
85
+ "jwk",
86
+ e,
87
+ {
88
+ name: "AES-GCM",
89
+ length: 256
90
+ // namedCurve: "P-384",
91
+ },
92
+ !0,
93
+ ["encrypt", "decrypt"]
94
+ );
95
+ }
96
+ const b = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
97
+ __proto__: null,
98
+ authenticate: i,
99
+ decrypt: d,
100
+ encrypt: y,
101
+ exportKey: l,
102
+ generateKey: s,
103
+ importKey: w,
104
+ register: c
105
+ }, Symbol.toStringTag, { value: "Module" }));
106
+ export {
107
+ b as S,
108
+ i as a,
109
+ l as b,
110
+ d,
111
+ y as e,
112
+ s as g,
113
+ w as i,
114
+ c as r
115
+ };
@@ -0,0 +1,365 @@
1
+ import { _ as D } from "./extends-C3382pL0.js";
2
+ import { _ as C, T as S } from "./ButtonBase-BYmh3G5j.js";
3
+ import { P as i } from "./createTheme-agWfFD64.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;
14
+ process.env.NODE_ENV !== "production" && i.oneOfType([i.string, i.shape({
15
+ enter: i.string,
16
+ exit: i.string,
17
+ active: i.string
18
+ }), i.shape({
19
+ enter: i.string,
20
+ enterDone: i.string,
21
+ enterActive: i.string,
22
+ exit: i.string,
23
+ exitDone: i.string,
24
+ exitActive: i.string
25
+ })]);
26
+ var y = function(a) {
27
+ return a.scrollTop;
28
+ }, x = "unmounted", f = "exited", c = "entering", h = "entered", T = "exiting", l = /* @__PURE__ */ function(u) {
29
+ C(a, u);
30
+ function a(r, e) {
31
+ var t;
32
+ t = u.call(this, r, e) || this;
33
+ var n = e, s = n && !n.isMounting ? r.enter : r.appear, p;
34
+ return t.appearStatus = null, r.in ? s ? (p = f, t.appearStatus = c) : p = h : r.unmountOnExit || r.mountOnEnter ? p = x : p = f, t.state = {
35
+ status: p
36
+ }, t.nextCallback = null, t;
37
+ }
38
+ a.getDerivedStateFromProps = function(e, t) {
39
+ var n = e.in;
40
+ return n && t.status === x ? {
41
+ status: f
42
+ } : null;
43
+ };
44
+ var o = a.prototype;
45
+ return o.componentDidMount = function() {
46
+ this.updateStatus(!0, this.appearStatus);
47
+ }, o.componentDidUpdate = function(e) {
48
+ var t = null;
49
+ if (e !== this.props) {
50
+ var n = this.state.status;
51
+ this.props.in ? n !== c && n !== h && (t = c) : (n === c || n === h) && (t = T);
52
+ }
53
+ this.updateStatus(!1, t);
54
+ }, o.componentWillUnmount = function() {
55
+ this.cancelNextCallback();
56
+ }, o.getTimeouts = function() {
57
+ var e = this.props.timeout, t, n, s;
58
+ return t = n = s = e, e != null && typeof e != "number" && (t = e.exit, n = e.enter, s = e.appear !== void 0 ? e.appear : n), {
59
+ exit: t,
60
+ enter: n,
61
+ appear: s
62
+ };
63
+ }, o.updateStatus = function(e, t) {
64
+ if (e === void 0 && (e = !1), t !== null)
65
+ if (this.cancelNextCallback(), t === c) {
66
+ if (this.props.unmountOnExit || this.props.mountOnEnter) {
67
+ var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this);
68
+ n && y(n);
69
+ }
70
+ this.performEnter(e);
71
+ } else
72
+ this.performExit();
73
+ else this.props.unmountOnExit && this.state.status === f && this.setState({
74
+ status: x
75
+ });
76
+ }, o.performEnter = function(e) {
77
+ 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;
78
+ if (!e && !n || N.disabled) {
79
+ this.safeSetState({
80
+ status: h
81
+ }, function() {
82
+ t.props.onEntered(d);
83
+ });
84
+ return;
85
+ }
86
+ this.props.onEnter(d, m), this.safeSetState({
87
+ status: c
88
+ }, function() {
89
+ t.props.onEntering(d, m), t.onTransitionEnd(O, function() {
90
+ t.safeSetState({
91
+ status: h
92
+ }, function() {
93
+ t.props.onEntered(d, m);
94
+ });
95
+ });
96
+ });
97
+ }, o.performExit = function() {
98
+ var e = this, t = this.props.exit, n = this.getTimeouts(), s = this.props.nodeRef ? void 0 : b.findDOMNode(this);
99
+ if (!t || N.disabled) {
100
+ this.safeSetState({
101
+ status: f
102
+ }, function() {
103
+ e.props.onExited(s);
104
+ });
105
+ return;
106
+ }
107
+ this.props.onExit(s), this.safeSetState({
108
+ status: T
109
+ }, function() {
110
+ e.props.onExiting(s), e.onTransitionEnd(n.exit, function() {
111
+ e.safeSetState({
112
+ status: f
113
+ }, function() {
114
+ e.props.onExited(s);
115
+ });
116
+ });
117
+ });
118
+ }, o.cancelNextCallback = function() {
119
+ this.nextCallback !== null && (this.nextCallback.cancel(), this.nextCallback = null);
120
+ }, o.safeSetState = function(e, t) {
121
+ t = this.setNextCallback(t), this.setState(e, t);
122
+ }, o.setNextCallback = function(e) {
123
+ var t = this, n = !0;
124
+ return this.nextCallback = function(s) {
125
+ n && (n = !1, t.nextCallback = null, e(s));
126
+ }, this.nextCallback.cancel = function() {
127
+ n = !1;
128
+ }, this.nextCallback;
129
+ }, o.onTransitionEnd = function(e, t) {
130
+ this.setNextCallback(t);
131
+ var n = this.props.nodeRef ? this.props.nodeRef.current : b.findDOMNode(this), s = e == null && !this.props.addEndListener;
132
+ if (!n || s) {
133
+ setTimeout(this.nextCallback, 0);
134
+ return;
135
+ }
136
+ if (this.props.addEndListener) {
137
+ var p = this.props.nodeRef ? [this.nextCallback] : [n, this.nextCallback], d = p[0], m = p[1];
138
+ this.props.addEndListener(d, m);
139
+ }
140
+ e != null && setTimeout(this.nextCallback, e);
141
+ }, o.render = function() {
142
+ var e = this.state.status;
143
+ if (e === x)
144
+ return null;
145
+ var t = this.props, n = t.children;
146
+ 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;
147
+ var s = D(t, ["children", "in", "mountOnEnter", "unmountOnExit", "appear", "enter", "exit", "timeout", "addEndListener", "onEnter", "onEntering", "onEntered", "onExit", "onExiting", "onExited", "nodeRef"]);
148
+ return (
149
+ // allows for nested Transitions
150
+ /* @__PURE__ */ v.createElement(S.Provider, {
151
+ value: null
152
+ }, typeof n == "function" ? n(e, s) : v.cloneElement(v.Children.only(n), s))
153
+ );
154
+ }, a;
155
+ }(v.Component);
156
+ l.contextType = S;
157
+ l.propTypes = process.env.NODE_ENV !== "production" ? {
158
+ /**
159
+ * A React reference to DOM element that need to transition:
160
+ * https://stackoverflow.com/a/51127130/4671932
161
+ *
162
+ * - When `nodeRef` prop is used, `node` is not passed to callback functions
163
+ * (e.g. `onEnter`) because user already has direct access to the node.
164
+ * - When changing `key` prop of `Transition` in a `TransitionGroup` a new
165
+ * `nodeRef` need to be provided to `Transition` with changed `key` prop
166
+ * (see
167
+ * [test/CSSTransition-test.js](https://github.com/reactjs/react-transition-group/blob/13435f897b3ab71f6e19d724f145596f5910581c/test/CSSTransition-test.js#L362-L437)).
168
+ */
169
+ nodeRef: i.shape({
170
+ current: typeof Element > "u" ? i.any : function(u, a, o, r, e, t) {
171
+ var n = u[a];
172
+ return i.instanceOf(n && "ownerDocument" in n ? n.ownerDocument.defaultView.Element : Element)(u, a, o, r, e, t);
173
+ }
174
+ }),
175
+ /**
176
+ * A `function` child can be used instead of a React element. This function is
177
+ * called with the current transition status (`'entering'`, `'entered'`,
178
+ * `'exiting'`, `'exited'`), which can be used to apply context
179
+ * specific props to a component.
180
+ *
181
+ * ```jsx
182
+ * <Transition in={this.state.in} timeout={150}>
183
+ * {state => (
184
+ * <MyComponent className={`fade fade-${state}`} />
185
+ * )}
186
+ * </Transition>
187
+ * ```
188
+ */
189
+ children: i.oneOfType([i.func.isRequired, i.element.isRequired]).isRequired,
190
+ /**
191
+ * Show the component; triggers the enter or exit states
192
+ */
193
+ in: i.bool,
194
+ /**
195
+ * By default the child component is mounted immediately along with
196
+ * the parent `Transition` component. If you want to "lazy mount" the component on the
197
+ * first `in={true}` you can set `mountOnEnter`. After the first enter transition the component will stay
198
+ * mounted, even on "exited", unless you also specify `unmountOnExit`.
199
+ */
200
+ mountOnEnter: i.bool,
201
+ /**
202
+ * By default the child component stays mounted after it reaches the `'exited'` state.
203
+ * Set `unmountOnExit` if you'd prefer to unmount the component after it finishes exiting.
204
+ */
205
+ unmountOnExit: i.bool,
206
+ /**
207
+ * By default the child component does not perform the enter transition when
208
+ * it first mounts, regardless of the value of `in`. If you want this
209
+ * behavior, set both `appear` and `in` to `true`.
210
+ *
211
+ * > **Note**: there are no special appear states like `appearing`/`appeared`, this prop
212
+ * > only adds an additional enter transition. However, in the
213
+ * > `<CSSTransition>` component that first enter transition does result in
214
+ * > additional `.appear-*` classes, that way you can choose to style it
215
+ * > differently.
216
+ */
217
+ appear: i.bool,
218
+ /**
219
+ * Enable or disable enter transitions.
220
+ */
221
+ enter: i.bool,
222
+ /**
223
+ * Enable or disable exit transitions.
224
+ */
225
+ exit: i.bool,
226
+ /**
227
+ * The duration of the transition, in milliseconds.
228
+ * Required unless `addEndListener` is provided.
229
+ *
230
+ * You may specify a single timeout for all transitions:
231
+ *
232
+ * ```jsx
233
+ * timeout={500}
234
+ * ```
235
+ *
236
+ * or individually:
237
+ *
238
+ * ```jsx
239
+ * timeout={{
240
+ * appear: 500,
241
+ * enter: 300,
242
+ * exit: 500,
243
+ * }}
244
+ * ```
245
+ *
246
+ * - `appear` defaults to the value of `enter`
247
+ * - `enter` defaults to `0`
248
+ * - `exit` defaults to `0`
249
+ *
250
+ * @type {number | { enter?: number, exit?: number, appear?: number }}
251
+ */
252
+ timeout: function(a) {
253
+ var o = R;
254
+ a.addEndListener || (o = o.isRequired);
255
+ for (var r = arguments.length, e = new Array(r > 1 ? r - 1 : 0), t = 1; t < r; t++)
256
+ e[t - 1] = arguments[t];
257
+ return o.apply(void 0, [a].concat(e));
258
+ },
259
+ /**
260
+ * Add a custom transition end trigger. Called with the transitioning
261
+ * DOM node and a `done` callback. Allows for more fine grained transition end
262
+ * logic. Timeouts are still used as a fallback if provided.
263
+ *
264
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
265
+ *
266
+ * ```jsx
267
+ * addEndListener={(node, done) => {
268
+ * // use the css transitionend event to mark the finish of a transition
269
+ * node.addEventListener('transitionend', done, false);
270
+ * }}
271
+ * ```
272
+ */
273
+ addEndListener: i.func,
274
+ /**
275
+ * Callback fired before the "entering" status is applied. An extra parameter
276
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
277
+ *
278
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
279
+ *
280
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
281
+ */
282
+ onEnter: i.func,
283
+ /**
284
+ * Callback fired after the "entering" status is applied. An extra parameter
285
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
286
+ *
287
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
288
+ *
289
+ * @type Function(node: HtmlElement, isAppearing: bool)
290
+ */
291
+ onEntering: i.func,
292
+ /**
293
+ * Callback fired after the "entered" status is applied. An extra parameter
294
+ * `isAppearing` is supplied to indicate if the enter stage is occurring on the initial mount
295
+ *
296
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
297
+ *
298
+ * @type Function(node: HtmlElement, isAppearing: bool) -> void
299
+ */
300
+ onEntered: i.func,
301
+ /**
302
+ * Callback fired before the "exiting" status is applied.
303
+ *
304
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
305
+ *
306
+ * @type Function(node: HtmlElement) -> void
307
+ */
308
+ onExit: i.func,
309
+ /**
310
+ * Callback fired after the "exiting" status is applied.
311
+ *
312
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed.
313
+ *
314
+ * @type Function(node: HtmlElement) -> void
315
+ */
316
+ onExiting: i.func,
317
+ /**
318
+ * Callback fired after the "exited" status is applied.
319
+ *
320
+ * **Note**: when `nodeRef` prop is passed, `node` is not passed
321
+ *
322
+ * @type Function(node: HtmlElement) -> void
323
+ */
324
+ onExited: i.func
325
+ } : {};
326
+ function E() {
327
+ }
328
+ l.defaultProps = {
329
+ in: !1,
330
+ mountOnEnter: !1,
331
+ unmountOnExit: !1,
332
+ appear: !1,
333
+ enter: !0,
334
+ exit: !0,
335
+ onEnter: E,
336
+ onEntering: E,
337
+ onEntered: E,
338
+ onExit: E,
339
+ onExiting: E,
340
+ onExited: E
341
+ };
342
+ l.UNMOUNTED = x;
343
+ l.EXITED = f;
344
+ l.ENTERING = c;
345
+ l.ENTERED = h;
346
+ l.EXITING = T;
347
+ const P = (u) => u.scrollTop;
348
+ function U(u, a) {
349
+ var o, r;
350
+ const {
351
+ timeout: e,
352
+ easing: t,
353
+ style: n = {}
354
+ } = u;
355
+ return {
356
+ duration: (o = n.transitionDuration) != null ? o : typeof e == "number" ? e : e[a.mode] || 0,
357
+ easing: (r = n.transitionTimingFunction) != null ? r : typeof t == "object" ? t[a.mode] : t,
358
+ delay: n.transitionDelay
359
+ };
360
+ }
361
+ export {
362
+ l as T,
363
+ U as g,
364
+ P as r
365
+ };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@hybridcore/ui",
3
3
  "description": "Hybrid Core UI Library",
4
- "version": "1.0.2",
4
+ "version": "1.1.2",
5
5
  "author": "Hybrid Core",
6
6
  "license": "ISC",
7
7
  "type": "module",
@@ -18,17 +18,35 @@
18
18
  "build": "tsc -b ./tsconfig.lib.json && vite build",
19
19
  "lint": "eslint .",
20
20
  "preview": "vite preview",
21
- "prepublishOnly": "npm run build",
21
+ "prepublishOnly": "yarn build",
22
22
  "storybook": "storybook dev -p 6006",
23
- "build-storybook": "storybook build"
23
+ "build-storybook": "storybook build",
24
+ "tsc": "tsc -b ./tsconfig.lib.json"
24
25
  },
25
- "peerDependencies": {
26
+ "dependencies": {
26
27
  "@emotion/react": "^11.10.6",
27
28
  "@emotion/styled": "^11.10.6",
28
29
  "@mui/icons-material": "^5.11.11",
30
+ "@mui/lab": "5.0.0-alpha.130",
29
31
  "@mui/material": "^5.11.13",
32
+ "@mui/x-data-grid": "^6.0.4",
33
+ "@mui/x-date-pickers": "^6.3.0",
34
+ "@turf/turf": "^7.0.0",
35
+ "dayjs": "^1.11.7",
36
+ "fast-xml-parser": "^4.2.2",
37
+ "geodesy": "^2.4.0",
38
+ "lodash": "^4.17.21",
39
+ "mapbox-gl": "^2.15.0",
40
+ "ol": "^7.3.0",
30
41
  "react": "^18.3.1",
31
- "react-dom": "^18.3.1"
42
+ "react-confirm": "^0.3.0-2",
43
+ "react-dom": "^18.3.1",
44
+ "react-dropdown-tree-select": "^2.8.0",
45
+ "react-hook-form": "^7.43.9",
46
+ "react-number-format": "^5.3.4",
47
+ "react-phone-number-input": "^3.3.7",
48
+ "react-select": "^5.8.0",
49
+ "terraformer-wkt-parser": "^1.2.1"
32
50
  },
33
51
  "devDependencies": {
34
52
  "@chromatic-com/storybook": "^1.9.0",
@@ -41,6 +59,9 @@
41
59
  "@storybook/react": "^8.3.5",
42
60
  "@storybook/react-vite": "^8.3.5",
43
61
  "@storybook/test": "^8.3.5",
62
+ "@types/geodesy": "^2.2.3",
63
+ "@types/lodash": "^4.14.194",
64
+ "@types/mapbox-gl": "^2.7.11",
44
65
  "@types/node": "^22.7.5",
45
66
  "@types/react": "^18.3.10",
46
67
  "@types/react-dom": "^18.3.0",