@hybridcore/ui 1.0.2 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Button-BZR43NHz.js +2025 -0
- package/dist/ButtonBase-B6WYZgVU.js +967 -0
- package/dist/CardContent-C8PxkJz4.js +73 -0
- package/dist/Checkbox-CxbQ9tJ5.js +673 -0
- package/dist/FormControl-C4PmH1vh.js +1491 -0
- package/dist/IconButton-CKHPuOyh.js +183 -0
- package/dist/Input-CH_JyT5B.js +324 -0
- package/dist/List-BX_5LP1i.js +132 -0
- package/dist/Object-DBPgar-D.js +688 -0
- package/dist/OutlinedInput-gnp48tDo.js +452 -0
- package/dist/Paper-CaiWdndQ.js +162 -0
- package/dist/Select-DOyHt8I_.js +2526 -0
- package/dist/Source-Bo1Eq6y-.js +4374 -0
- package/dist/Text-DVP2PrYM.js +2192 -0
- package/dist/Typography-XIiVCSto.js +178 -0
- package/dist/assertThisInitialized-BUtkG-md.js +13 -0
- package/dist/assets/index.css +1 -0
- package/dist/assets/index2.css +1 -0
- package/dist/chainPropTypes-DtBfUj5o.js +96 -0
- package/dist/components/access/helpers.js +32 -0
- package/dist/components/access/index.js +15 -0
- package/dist/components/card/index.js +159 -469
- package/dist/components/card/styled.js +75 -7
- package/dist/components/conditional-wrapper/index.js +9 -0
- package/dist/components/confirm/dialog.js +151 -0
- package/dist/components/confirm/index.js +23 -0
- package/dist/components/container/index.js +270 -0
- package/dist/components/context-menu/index.js +973 -0
- package/dist/components/data-management/instance-form/components/composite-list/index.js +12 -0
- package/dist/components/data-management/instance-form/components/composite-list/styled.js +64 -0
- package/dist/components/data-management/instance-form/components/policy-list/index.js +86 -0
- package/dist/components/data-management/instance-form/components/variable/index.js +15 -0
- package/dist/components/data-management/instance-form/components/variables/index.js +39 -0
- package/dist/components/data-management/instance-form/index.js +437 -0
- package/dist/components/data-security-selectors/dissemination-list/index.js +3201 -0
- package/dist/components/data-security-selectors/security-level/index.js +81 -0
- package/dist/components/date-time-picker/index.js +103 -0
- package/dist/components/geometry-picker/coordinate/index.js +93 -0
- package/dist/components/geometry-picker/edit/index.js +71 -0
- package/dist/components/geometry-picker/geometry/index.js +160 -0
- package/dist/components/geometry-picker/geometry/map-overlay.js +22 -0
- package/dist/components/geometry-picker/index.js +140 -0
- package/dist/components/geometry-picker/kml/index.js +62 -0
- package/dist/components/geometry-picker/kml/select-input-method.js +75 -0
- package/dist/components/geometry-picker/logic.js +69 -0
- package/dist/components/geometry-picker/map/index.js +42 -0
- package/dist/components/geometry-picker/map/logic.js +2360 -0
- package/dist/components/geometry-picker/map/style.js +88 -0
- package/dist/components/geometry-picker/parser/coordinate-input/index.js +78 -0
- package/dist/components/geometry-picker/parser/coordinate-input/logic.js +1305 -0
- package/dist/components/geometry-picker/parser/index.js +179 -0
- package/dist/components/geometry-picker/parser/logic.js +84 -0
- package/dist/components/geometry-picker/parser/styled.js +25 -0
- package/dist/components/geometry-picker/styled.js +48 -0
- package/dist/components/geometry-picker/wkt/index.js +59 -0
- package/dist/components/geometry-picker/wkt/select-input-method.js +75 -0
- package/dist/components/icon-button/index.js +18 -0
- package/dist/components/icon-button/styled.js +51 -0
- package/dist/components/key-protection/index.js +4 -0
- package/dist/components/key-protection/menu.js +85 -0
- package/dist/components/key-protection/utils.js +10 -0
- package/dist/components/loading/index.js +7 -0
- package/dist/components/loading/styled.js +16 -0
- package/dist/components/map/helpers/kml.js +45 -0
- package/dist/components/map/helpers/mapbox.js +48 -0
- package/dist/components/map/helpers/ol.js +25 -0
- package/dist/components/map/helpers/wkt.js +29 -0
- package/dist/components/map/index.js +30 -0
- package/dist/components/map/logic.js +140 -0
- package/dist/components/map/styled.js +8 -0
- package/dist/components/phone-input/index.js +25 -0
- package/dist/components/phone-input/styled.js +26 -0
- package/dist/components/search-input/index.js +76 -0
- package/dist/components/tree-select/index.js +70 -0
- package/dist/components/tree-select/styled.js +64 -0
- package/dist/components/treeview-filter/index.js +621 -0
- package/dist/components/treeview-filter/item/index.js +7 -0
- package/dist/components/treeview-filter/item-label/index.js +44 -0
- package/dist/createTheme-agWfFD64.js +2392 -0
- package/dist/exactProp-CI8dagM-.js +36 -0
- package/dist/extends-C3382pL0.js +22 -0
- package/dist/hooks/useMenuLogic.js +21 -0
- package/dist/hooks/useToggle.js +23 -0
- package/dist/index-BQE8B4sc.js +957 -0
- package/dist/index-DHFb1Qpn.js +1105 -0
- package/dist/isHostComponent-kiaBvYVo.js +6 -0
- package/dist/isMuiElement-CxT3_ACP.js +13 -0
- package/dist/main.d.ts +646 -0
- package/dist/ol-CMEkXXLJ.js +15041 -0
- package/dist/ownerDocument-CUrv0DIK.js +6 -0
- package/dist/ownerWindow-niciwP7I.js +7 -0
- package/dist/styled-B22KrhDR.js +229 -0
- package/dist/styled-Iq9jsO4F.js +1033 -0
- package/dist/useFormControl-CatNKXAi.js +10 -0
- package/dist/useId-BHG98T5I.js +26 -0
- package/dist/useTheme-C0Dky5rV.js +17 -0
- package/dist/useTheme-CeyGVuQP.js +10 -0
- package/dist/useThemeProps-CzAjOL6F.js +26 -0
- package/dist/utils/ontology.js +37 -0
- package/dist/utils-Bq0ye5vf.js +115 -0
- package/dist/utils-C13eMoWa.js +365 -0
- package/package.json +26 -5
- package/dist/styled-BG5UIpPU.js +0 -3459
|
@@ -0,0 +1,673 @@
|
|
|
1
|
+
import { s as ne, b as te, c as x, P as e } from "./createTheme-agWfFD64.js";
|
|
2
|
+
import { e as se, g as F, s as R, f as ce, T as re, C as ie, r as q, a as ae } from "./styled-Iq9jsO4F.js";
|
|
3
|
+
import { c as O, g as T, u as A, a as P } from "./chainPropTypes-DtBfUj5o.js";
|
|
4
|
+
import { _, a as m } from "./extends-C3382pL0.js";
|
|
5
|
+
import * as d from "react";
|
|
6
|
+
import { u as le } from "./useTheme-C0Dky5rV.js";
|
|
7
|
+
import { jsx as v, jsxs as H } from "react/jsx-runtime";
|
|
8
|
+
import { u as de } from "./useFormControl-CatNKXAi.js";
|
|
9
|
+
import { B as ue, r as L } from "./ButtonBase-B6WYZgVU.js";
|
|
10
|
+
const pe = ["className", "component"];
|
|
11
|
+
function fe(o = {}) {
|
|
12
|
+
const {
|
|
13
|
+
themeId: n,
|
|
14
|
+
defaultTheme: t,
|
|
15
|
+
defaultClassName: c = "MuiBox-root",
|
|
16
|
+
generateClassName: s
|
|
17
|
+
} = o, r = ne("div", {
|
|
18
|
+
shouldForwardProp: (a) => a !== "theme" && a !== "sx" && a !== "as"
|
|
19
|
+
})(te);
|
|
20
|
+
return /* @__PURE__ */ d.forwardRef(function(g, i) {
|
|
21
|
+
const u = le(t), p = se(g), {
|
|
22
|
+
className: l,
|
|
23
|
+
component: b = "div"
|
|
24
|
+
} = p, f = _(p, pe);
|
|
25
|
+
return /* @__PURE__ */ v(r, m({
|
|
26
|
+
as: b,
|
|
27
|
+
ref: i,
|
|
28
|
+
className: O(l, s ? s(c) : c),
|
|
29
|
+
theme: n && u[n] || u
|
|
30
|
+
}, f));
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
function he({
|
|
34
|
+
controlled: o,
|
|
35
|
+
default: n,
|
|
36
|
+
name: t,
|
|
37
|
+
state: c = "value"
|
|
38
|
+
}) {
|
|
39
|
+
const {
|
|
40
|
+
current: s
|
|
41
|
+
} = d.useRef(o !== void 0), [r, h] = d.useState(n), a = s ? o : r;
|
|
42
|
+
if (process.env.NODE_ENV !== "production") {
|
|
43
|
+
d.useEffect(() => {
|
|
44
|
+
s !== (o !== void 0) && console.error([`MUI: A component is changing the ${s ? "" : "un"}controlled ${c} state of ${t} to be ${s ? "un" : ""}controlled.`, "Elements should not switch from uncontrolled to controlled (or vice versa).", `Decide between using a controlled or uncontrolled ${t} element for the lifetime of the component.`, "The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.", "More info: https://fb.me/react-controlled-components"].join(`
|
|
45
|
+
`));
|
|
46
|
+
}, [c, t, o]);
|
|
47
|
+
const {
|
|
48
|
+
current: i
|
|
49
|
+
} = d.useRef(n);
|
|
50
|
+
d.useEffect(() => {
|
|
51
|
+
!s && !Object.is(i, n) && console.error([`MUI: A component is changing the default ${c} state of an uncontrolled ${t} after being initialized. To suppress this warning opt to use a controlled ${t}.`].join(`
|
|
52
|
+
`));
|
|
53
|
+
}, [JSON.stringify(n)]);
|
|
54
|
+
}
|
|
55
|
+
const g = d.useCallback((i) => {
|
|
56
|
+
s || h(i);
|
|
57
|
+
}, []);
|
|
58
|
+
return [a, g];
|
|
59
|
+
}
|
|
60
|
+
function me(o) {
|
|
61
|
+
return F("MuiSvgIcon", o);
|
|
62
|
+
}
|
|
63
|
+
T("MuiSvgIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
64
|
+
const ge = ["children", "className", "color", "component", "fontSize", "htmlColor", "inheritViewBox", "titleAccess", "viewBox"], be = (o) => {
|
|
65
|
+
const {
|
|
66
|
+
color: n,
|
|
67
|
+
fontSize: t,
|
|
68
|
+
classes: c
|
|
69
|
+
} = o, s = {
|
|
70
|
+
root: ["root", n !== "inherit" && `color${x(n)}`, `fontSize${x(t)}`]
|
|
71
|
+
};
|
|
72
|
+
return P(s, me, c);
|
|
73
|
+
}, ve = R("svg", {
|
|
74
|
+
name: "MuiSvgIcon",
|
|
75
|
+
slot: "Root",
|
|
76
|
+
overridesResolver: (o, n) => {
|
|
77
|
+
const {
|
|
78
|
+
ownerState: t
|
|
79
|
+
} = o;
|
|
80
|
+
return [n.root, t.color !== "inherit" && n[`color${x(t.color)}`], n[`fontSize${x(t.fontSize)}`]];
|
|
81
|
+
}
|
|
82
|
+
})(({
|
|
83
|
+
theme: o,
|
|
84
|
+
ownerState: n
|
|
85
|
+
}) => {
|
|
86
|
+
var t, c, s, r, h, a, g, i, u, p, l, b, f;
|
|
87
|
+
return {
|
|
88
|
+
userSelect: "none",
|
|
89
|
+
width: "1em",
|
|
90
|
+
height: "1em",
|
|
91
|
+
display: "inline-block",
|
|
92
|
+
// the <svg> will define the property that has `currentColor`
|
|
93
|
+
// for example heroicons uses fill="none" and stroke="currentColor"
|
|
94
|
+
fill: n.hasSvgAsChild ? void 0 : "currentColor",
|
|
95
|
+
flexShrink: 0,
|
|
96
|
+
transition: (t = o.transitions) == null || (c = t.create) == null ? void 0 : c.call(t, "fill", {
|
|
97
|
+
duration: (s = o.transitions) == null || (s = s.duration) == null ? void 0 : s.shorter
|
|
98
|
+
}),
|
|
99
|
+
fontSize: {
|
|
100
|
+
inherit: "inherit",
|
|
101
|
+
small: ((r = o.typography) == null || (h = r.pxToRem) == null ? void 0 : h.call(r, 20)) || "1.25rem",
|
|
102
|
+
medium: ((a = o.typography) == null || (g = a.pxToRem) == null ? void 0 : g.call(a, 24)) || "1.5rem",
|
|
103
|
+
large: ((i = o.typography) == null || (u = i.pxToRem) == null ? void 0 : u.call(i, 35)) || "2.1875rem"
|
|
104
|
+
}[n.fontSize],
|
|
105
|
+
// TODO v5 deprecate, v6 remove for sx
|
|
106
|
+
color: (p = (l = (o.vars || o).palette) == null || (l = l[n.color]) == null ? void 0 : l.main) != null ? p : {
|
|
107
|
+
action: (b = (o.vars || o).palette) == null || (b = b.action) == null ? void 0 : b.active,
|
|
108
|
+
disabled: (f = (o.vars || o).palette) == null || (f = f.action) == null ? void 0 : f.disabled,
|
|
109
|
+
inherit: void 0
|
|
110
|
+
}[n.color]
|
|
111
|
+
};
|
|
112
|
+
}), N = /* @__PURE__ */ d.forwardRef(function(n, t) {
|
|
113
|
+
const c = A({
|
|
114
|
+
props: n,
|
|
115
|
+
name: "MuiSvgIcon"
|
|
116
|
+
}), {
|
|
117
|
+
children: s,
|
|
118
|
+
className: r,
|
|
119
|
+
color: h = "inherit",
|
|
120
|
+
component: a = "svg",
|
|
121
|
+
fontSize: g = "medium",
|
|
122
|
+
htmlColor: i,
|
|
123
|
+
inheritViewBox: u = !1,
|
|
124
|
+
titleAccess: p,
|
|
125
|
+
viewBox: l = "0 0 24 24"
|
|
126
|
+
} = c, b = _(c, ge), f = /* @__PURE__ */ d.isValidElement(s) && s.type === "svg", S = m({}, c, {
|
|
127
|
+
color: h,
|
|
128
|
+
component: a,
|
|
129
|
+
fontSize: g,
|
|
130
|
+
instanceFontSize: n.fontSize,
|
|
131
|
+
inheritViewBox: u,
|
|
132
|
+
viewBox: l,
|
|
133
|
+
hasSvgAsChild: f
|
|
134
|
+
}), C = {};
|
|
135
|
+
u || (C.viewBox = l);
|
|
136
|
+
const I = be(S);
|
|
137
|
+
return /* @__PURE__ */ H(ve, m({
|
|
138
|
+
as: a,
|
|
139
|
+
className: O(I.root, r),
|
|
140
|
+
focusable: "false",
|
|
141
|
+
color: i,
|
|
142
|
+
"aria-hidden": p ? void 0 : !0,
|
|
143
|
+
role: p ? "img" : void 0,
|
|
144
|
+
ref: t
|
|
145
|
+
}, C, b, f && s.props, {
|
|
146
|
+
ownerState: S,
|
|
147
|
+
children: [f ? s.props.children : s, p ? /* @__PURE__ */ v("title", {
|
|
148
|
+
children: p
|
|
149
|
+
}) : null]
|
|
150
|
+
}));
|
|
151
|
+
});
|
|
152
|
+
process.env.NODE_ENV !== "production" && (N.propTypes = {
|
|
153
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
154
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
155
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
156
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
157
|
+
/**
|
|
158
|
+
* Node passed into the SVG element.
|
|
159
|
+
*/
|
|
160
|
+
children: e.node,
|
|
161
|
+
/**
|
|
162
|
+
* Override or extend the styles applied to the component.
|
|
163
|
+
*/
|
|
164
|
+
classes: e.object,
|
|
165
|
+
/**
|
|
166
|
+
* @ignore
|
|
167
|
+
*/
|
|
168
|
+
className: e.string,
|
|
169
|
+
/**
|
|
170
|
+
* The color of the component.
|
|
171
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
172
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
173
|
+
* You can use the `htmlColor` prop to apply a color attribute to the SVG element.
|
|
174
|
+
* @default 'inherit'
|
|
175
|
+
*/
|
|
176
|
+
color: e.oneOfType([e.oneOf(["inherit", "action", "disabled", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
177
|
+
/**
|
|
178
|
+
* The component used for the root node.
|
|
179
|
+
* Either a string to use a HTML element or a component.
|
|
180
|
+
*/
|
|
181
|
+
component: e.elementType,
|
|
182
|
+
/**
|
|
183
|
+
* The fontSize applied to the icon. Defaults to 24px, but can be configure to inherit font size.
|
|
184
|
+
* @default 'medium'
|
|
185
|
+
*/
|
|
186
|
+
fontSize: e.oneOfType([e.oneOf(["inherit", "large", "medium", "small"]), e.string]),
|
|
187
|
+
/**
|
|
188
|
+
* Applies a color attribute to the SVG element.
|
|
189
|
+
*/
|
|
190
|
+
htmlColor: e.string,
|
|
191
|
+
/**
|
|
192
|
+
* If `true`, the root node will inherit the custom `component`'s viewBox and the `viewBox`
|
|
193
|
+
* prop will be ignored.
|
|
194
|
+
* Useful when you want to reference a custom `component` and have `SvgIcon` pass that
|
|
195
|
+
* `component`'s viewBox to the root node.
|
|
196
|
+
* @default false
|
|
197
|
+
*/
|
|
198
|
+
inheritViewBox: e.bool,
|
|
199
|
+
/**
|
|
200
|
+
* The shape-rendering attribute. The behavior of the different options is described on the
|
|
201
|
+
* [MDN Web Docs](https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute/shape-rendering).
|
|
202
|
+
* If you are having issues with blurry icons you should investigate this prop.
|
|
203
|
+
*/
|
|
204
|
+
shapeRendering: e.string,
|
|
205
|
+
/**
|
|
206
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
207
|
+
*/
|
|
208
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
209
|
+
/**
|
|
210
|
+
* Provides a human-readable title for the element that contains it.
|
|
211
|
+
* https://www.w3.org/TR/SVG-access/#Equivalent
|
|
212
|
+
*/
|
|
213
|
+
titleAccess: e.string,
|
|
214
|
+
/**
|
|
215
|
+
* Allows you to redefine what the coordinates without units mean inside an SVG element.
|
|
216
|
+
* For example, if the SVG element is 500 (width) by 200 (height),
|
|
217
|
+
* and you pass viewBox="0 0 50 20",
|
|
218
|
+
* this means that the coordinates inside the SVG will go from the top left corner (0,0)
|
|
219
|
+
* to bottom right (50,20) and each unit will be worth 10px.
|
|
220
|
+
* @default '0 0 24 24'
|
|
221
|
+
*/
|
|
222
|
+
viewBox: e.string
|
|
223
|
+
});
|
|
224
|
+
N.muiName = "SvgIcon";
|
|
225
|
+
function M(o, n) {
|
|
226
|
+
function t(c, s) {
|
|
227
|
+
return /* @__PURE__ */ v(N, m({
|
|
228
|
+
"data-testid": `${n}Icon`,
|
|
229
|
+
ref: s
|
|
230
|
+
}, c, {
|
|
231
|
+
children: o
|
|
232
|
+
}));
|
|
233
|
+
}
|
|
234
|
+
return process.env.NODE_ENV !== "production" && (t.displayName = `${n}Icon`), t.muiName = N.muiName, /* @__PURE__ */ d.memo(/* @__PURE__ */ d.forwardRef(t));
|
|
235
|
+
}
|
|
236
|
+
const ye = T("MuiBox", ["root"]), xe = ce(), Ce = fe({
|
|
237
|
+
themeId: re,
|
|
238
|
+
defaultTheme: xe,
|
|
239
|
+
defaultClassName: ye.root,
|
|
240
|
+
generateClassName: ie.generate
|
|
241
|
+
});
|
|
242
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
243
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
244
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
245
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
246
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
247
|
+
/**
|
|
248
|
+
* @ignore
|
|
249
|
+
*/
|
|
250
|
+
children: e.node,
|
|
251
|
+
/**
|
|
252
|
+
* The component used for the root node.
|
|
253
|
+
* Either a string to use a HTML element or a component.
|
|
254
|
+
*/
|
|
255
|
+
component: e.elementType,
|
|
256
|
+
/**
|
|
257
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
258
|
+
*/
|
|
259
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
260
|
+
});
|
|
261
|
+
function ke(o) {
|
|
262
|
+
return F("PrivateSwitchBase", o);
|
|
263
|
+
}
|
|
264
|
+
T("PrivateSwitchBase", ["root", "checked", "disabled", "input", "edgeStart", "edgeEnd"]);
|
|
265
|
+
const Se = ["autoFocus", "checked", "checkedIcon", "className", "defaultChecked", "disabled", "disableFocusRipple", "edge", "icon", "id", "inputProps", "inputRef", "name", "onBlur", "onChange", "onFocus", "readOnly", "required", "tabIndex", "type", "value"], Ie = (o) => {
|
|
266
|
+
const {
|
|
267
|
+
classes: n,
|
|
268
|
+
checked: t,
|
|
269
|
+
disabled: c,
|
|
270
|
+
edge: s
|
|
271
|
+
} = o, r = {
|
|
272
|
+
root: ["root", t && "checked", c && "disabled", s && `edge${x(s)}`],
|
|
273
|
+
input: ["input"]
|
|
274
|
+
};
|
|
275
|
+
return P(r, ke, n);
|
|
276
|
+
}, $e = R(ue)(({
|
|
277
|
+
ownerState: o
|
|
278
|
+
}) => m({
|
|
279
|
+
padding: 9,
|
|
280
|
+
borderRadius: "50%"
|
|
281
|
+
}, o.edge === "start" && {
|
|
282
|
+
marginLeft: o.size === "small" ? -3 : -12
|
|
283
|
+
}, o.edge === "end" && {
|
|
284
|
+
marginRight: o.size === "small" ? -3 : -12
|
|
285
|
+
})), Be = R("input", {
|
|
286
|
+
shouldForwardProp: q
|
|
287
|
+
})({
|
|
288
|
+
cursor: "inherit",
|
|
289
|
+
position: "absolute",
|
|
290
|
+
opacity: 0,
|
|
291
|
+
width: "100%",
|
|
292
|
+
height: "100%",
|
|
293
|
+
top: 0,
|
|
294
|
+
left: 0,
|
|
295
|
+
margin: 0,
|
|
296
|
+
padding: 0,
|
|
297
|
+
zIndex: 1
|
|
298
|
+
}), G = /* @__PURE__ */ d.forwardRef(function(n, t) {
|
|
299
|
+
const {
|
|
300
|
+
autoFocus: c,
|
|
301
|
+
checked: s,
|
|
302
|
+
checkedIcon: r,
|
|
303
|
+
className: h,
|
|
304
|
+
defaultChecked: a,
|
|
305
|
+
disabled: g,
|
|
306
|
+
disableFocusRipple: i = !1,
|
|
307
|
+
edge: u = !1,
|
|
308
|
+
icon: p,
|
|
309
|
+
id: l,
|
|
310
|
+
inputProps: b,
|
|
311
|
+
inputRef: f,
|
|
312
|
+
name: S,
|
|
313
|
+
onBlur: C,
|
|
314
|
+
onChange: I,
|
|
315
|
+
onFocus: $,
|
|
316
|
+
readOnly: J,
|
|
317
|
+
required: W = !1,
|
|
318
|
+
tabIndex: K,
|
|
319
|
+
type: z,
|
|
320
|
+
value: j
|
|
321
|
+
} = n, Q = _(n, Se), [V, X] = he({
|
|
322
|
+
controlled: s,
|
|
323
|
+
default: !!a,
|
|
324
|
+
name: "SwitchBase",
|
|
325
|
+
state: "checked"
|
|
326
|
+
}), k = de(), Y = (y) => {
|
|
327
|
+
$ && $(y), k && k.onFocus && k.onFocus(y);
|
|
328
|
+
}, Z = (y) => {
|
|
329
|
+
C && C(y), k && k.onBlur && k.onBlur(y);
|
|
330
|
+
}, ee = (y) => {
|
|
331
|
+
if (y.nativeEvent.defaultPrevented)
|
|
332
|
+
return;
|
|
333
|
+
const D = y.target.checked;
|
|
334
|
+
X(D), I && I(y, D);
|
|
335
|
+
};
|
|
336
|
+
let B = g;
|
|
337
|
+
k && typeof B > "u" && (B = k.disabled);
|
|
338
|
+
const oe = z === "checkbox" || z === "radio", w = m({}, n, {
|
|
339
|
+
checked: V,
|
|
340
|
+
disabled: B,
|
|
341
|
+
disableFocusRipple: i,
|
|
342
|
+
edge: u
|
|
343
|
+
}), U = Ie(w);
|
|
344
|
+
return /* @__PURE__ */ H($e, m({
|
|
345
|
+
component: "span",
|
|
346
|
+
className: O(U.root, h),
|
|
347
|
+
centerRipple: !0,
|
|
348
|
+
focusRipple: !i,
|
|
349
|
+
disabled: B,
|
|
350
|
+
tabIndex: null,
|
|
351
|
+
role: void 0,
|
|
352
|
+
onFocus: Y,
|
|
353
|
+
onBlur: Z,
|
|
354
|
+
ownerState: w,
|
|
355
|
+
ref: t
|
|
356
|
+
}, Q, {
|
|
357
|
+
children: [/* @__PURE__ */ v(Be, m({
|
|
358
|
+
autoFocus: c,
|
|
359
|
+
checked: s,
|
|
360
|
+
defaultChecked: a,
|
|
361
|
+
className: U.input,
|
|
362
|
+
disabled: B,
|
|
363
|
+
id: oe ? l : void 0,
|
|
364
|
+
name: S,
|
|
365
|
+
onChange: ee,
|
|
366
|
+
readOnly: J,
|
|
367
|
+
ref: f,
|
|
368
|
+
required: W,
|
|
369
|
+
ownerState: w,
|
|
370
|
+
tabIndex: K,
|
|
371
|
+
type: z
|
|
372
|
+
}, z === "checkbox" && j === void 0 ? {} : {
|
|
373
|
+
value: j
|
|
374
|
+
}, b)), V ? r : p]
|
|
375
|
+
}));
|
|
376
|
+
});
|
|
377
|
+
process.env.NODE_ENV !== "production" && (G.propTypes = {
|
|
378
|
+
/**
|
|
379
|
+
* If `true`, the `input` element is focused during the first mount.
|
|
380
|
+
*/
|
|
381
|
+
autoFocus: e.bool,
|
|
382
|
+
/**
|
|
383
|
+
* If `true`, the component is checked.
|
|
384
|
+
*/
|
|
385
|
+
checked: e.bool,
|
|
386
|
+
/**
|
|
387
|
+
* The icon to display when the component is checked.
|
|
388
|
+
*/
|
|
389
|
+
checkedIcon: e.node.isRequired,
|
|
390
|
+
/**
|
|
391
|
+
* Override or extend the styles applied to the component.
|
|
392
|
+
*/
|
|
393
|
+
classes: e.object,
|
|
394
|
+
/**
|
|
395
|
+
* @ignore
|
|
396
|
+
*/
|
|
397
|
+
className: e.string,
|
|
398
|
+
/**
|
|
399
|
+
* @ignore
|
|
400
|
+
*/
|
|
401
|
+
defaultChecked: e.bool,
|
|
402
|
+
/**
|
|
403
|
+
* If `true`, the component is disabled.
|
|
404
|
+
*/
|
|
405
|
+
disabled: e.bool,
|
|
406
|
+
/**
|
|
407
|
+
* If `true`, the keyboard focus ripple is disabled.
|
|
408
|
+
* @default false
|
|
409
|
+
*/
|
|
410
|
+
disableFocusRipple: e.bool,
|
|
411
|
+
/**
|
|
412
|
+
* If given, uses a negative margin to counteract the padding on one
|
|
413
|
+
* side (this is often helpful for aligning the left or right
|
|
414
|
+
* side of the icon with content above or below, without ruining the border
|
|
415
|
+
* size and shape).
|
|
416
|
+
* @default false
|
|
417
|
+
*/
|
|
418
|
+
edge: e.oneOf(["end", "start", !1]),
|
|
419
|
+
/**
|
|
420
|
+
* The icon to display when the component is unchecked.
|
|
421
|
+
*/
|
|
422
|
+
icon: e.node.isRequired,
|
|
423
|
+
/**
|
|
424
|
+
* The id of the `input` element.
|
|
425
|
+
*/
|
|
426
|
+
id: e.string,
|
|
427
|
+
/**
|
|
428
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
429
|
+
*/
|
|
430
|
+
inputProps: e.object,
|
|
431
|
+
/**
|
|
432
|
+
* Pass a ref to the `input` element.
|
|
433
|
+
*/
|
|
434
|
+
inputRef: L,
|
|
435
|
+
/*
|
|
436
|
+
* @ignore
|
|
437
|
+
*/
|
|
438
|
+
name: e.string,
|
|
439
|
+
/**
|
|
440
|
+
* @ignore
|
|
441
|
+
*/
|
|
442
|
+
onBlur: e.func,
|
|
443
|
+
/**
|
|
444
|
+
* Callback fired when the state is changed.
|
|
445
|
+
*
|
|
446
|
+
* @param {object} event The event source of the callback.
|
|
447
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
448
|
+
*/
|
|
449
|
+
onChange: e.func,
|
|
450
|
+
/**
|
|
451
|
+
* @ignore
|
|
452
|
+
*/
|
|
453
|
+
onFocus: e.func,
|
|
454
|
+
/**
|
|
455
|
+
* It prevents the user from changing the value of the field
|
|
456
|
+
* (not from interacting with the field).
|
|
457
|
+
*/
|
|
458
|
+
readOnly: e.bool,
|
|
459
|
+
/**
|
|
460
|
+
* If `true`, the `input` element is required.
|
|
461
|
+
*/
|
|
462
|
+
required: e.bool,
|
|
463
|
+
/**
|
|
464
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
465
|
+
*/
|
|
466
|
+
sx: e.object,
|
|
467
|
+
/**
|
|
468
|
+
* @ignore
|
|
469
|
+
*/
|
|
470
|
+
tabIndex: e.oneOfType([e.number, e.string]),
|
|
471
|
+
/**
|
|
472
|
+
* The input component prop `type`.
|
|
473
|
+
*/
|
|
474
|
+
type: e.string.isRequired,
|
|
475
|
+
/**
|
|
476
|
+
* The value of the component.
|
|
477
|
+
*/
|
|
478
|
+
value: e.any
|
|
479
|
+
});
|
|
480
|
+
const ze = M(/* @__PURE__ */ v("path", {
|
|
481
|
+
d: "M19 5v14H5V5h14m0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2z"
|
|
482
|
+
}), "CheckBoxOutlineBlank"), Ne = M(/* @__PURE__ */ v("path", {
|
|
483
|
+
d: "M19 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.11 0 2-.9 2-2V5c0-1.1-.89-2-2-2zm-9 14l-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8l-9 9z"
|
|
484
|
+
}), "CheckBox"), Re = M(/* @__PURE__ */ v("path", {
|
|
485
|
+
d: "M19 3H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zm-2 10H7v-2h10v2z"
|
|
486
|
+
}), "IndeterminateCheckBox");
|
|
487
|
+
function Oe(o) {
|
|
488
|
+
return F("MuiCheckbox", o);
|
|
489
|
+
}
|
|
490
|
+
const E = T("MuiCheckbox", ["root", "checked", "disabled", "indeterminate", "colorPrimary", "colorSecondary", "sizeSmall", "sizeMedium"]), Te = ["checkedIcon", "color", "icon", "indeterminate", "indeterminateIcon", "inputProps", "size", "className"], _e = (o) => {
|
|
491
|
+
const {
|
|
492
|
+
classes: n,
|
|
493
|
+
indeterminate: t,
|
|
494
|
+
color: c,
|
|
495
|
+
size: s
|
|
496
|
+
} = o, r = {
|
|
497
|
+
root: ["root", t && "indeterminate", `color${x(c)}`, `size${x(s)}`]
|
|
498
|
+
}, h = P(r, Oe, n);
|
|
499
|
+
return m({}, n, h);
|
|
500
|
+
}, we = R(G, {
|
|
501
|
+
shouldForwardProp: (o) => q(o) || o === "classes",
|
|
502
|
+
name: "MuiCheckbox",
|
|
503
|
+
slot: "Root",
|
|
504
|
+
overridesResolver: (o, n) => {
|
|
505
|
+
const {
|
|
506
|
+
ownerState: t
|
|
507
|
+
} = o;
|
|
508
|
+
return [n.root, t.indeterminate && n.indeterminate, n[`size${x(t.size)}`], t.color !== "default" && n[`color${x(t.color)}`]];
|
|
509
|
+
}
|
|
510
|
+
})(({
|
|
511
|
+
theme: o,
|
|
512
|
+
ownerState: n
|
|
513
|
+
}) => m({
|
|
514
|
+
color: (o.vars || o).palette.text.secondary
|
|
515
|
+
}, !n.disableRipple && {
|
|
516
|
+
"&:hover": {
|
|
517
|
+
backgroundColor: o.vars ? `rgba(${n.color === "default" ? o.vars.palette.action.activeChannel : o.vars.palette[n.color].mainChannel} / ${o.vars.palette.action.hoverOpacity})` : ae(n.color === "default" ? o.palette.action.active : o.palette[n.color].main, o.palette.action.hoverOpacity),
|
|
518
|
+
// Reset on touch devices, it doesn't add specificity
|
|
519
|
+
"@media (hover: none)": {
|
|
520
|
+
backgroundColor: "transparent"
|
|
521
|
+
}
|
|
522
|
+
}
|
|
523
|
+
}, n.color !== "default" && {
|
|
524
|
+
[`&.${E.checked}, &.${E.indeterminate}`]: {
|
|
525
|
+
color: (o.vars || o).palette[n.color].main
|
|
526
|
+
},
|
|
527
|
+
[`&.${E.disabled}`]: {
|
|
528
|
+
color: (o.vars || o).palette.action.disabled
|
|
529
|
+
}
|
|
530
|
+
})), Ee = /* @__PURE__ */ v(Ne, {}), Fe = /* @__PURE__ */ v(ze, {}), Pe = /* @__PURE__ */ v(Re, {}), Me = /* @__PURE__ */ d.forwardRef(function(n, t) {
|
|
531
|
+
var c, s;
|
|
532
|
+
const r = A({
|
|
533
|
+
props: n,
|
|
534
|
+
name: "MuiCheckbox"
|
|
535
|
+
}), {
|
|
536
|
+
checkedIcon: h = Ee,
|
|
537
|
+
color: a = "primary",
|
|
538
|
+
icon: g = Fe,
|
|
539
|
+
indeterminate: i = !1,
|
|
540
|
+
indeterminateIcon: u = Pe,
|
|
541
|
+
inputProps: p,
|
|
542
|
+
size: l = "medium",
|
|
543
|
+
className: b
|
|
544
|
+
} = r, f = _(r, Te), S = i ? u : g, C = i ? u : h, I = m({}, r, {
|
|
545
|
+
color: a,
|
|
546
|
+
indeterminate: i,
|
|
547
|
+
size: l
|
|
548
|
+
}), $ = _e(I);
|
|
549
|
+
return /* @__PURE__ */ v(we, m({
|
|
550
|
+
type: "checkbox",
|
|
551
|
+
inputProps: m({
|
|
552
|
+
"data-indeterminate": i
|
|
553
|
+
}, p),
|
|
554
|
+
icon: /* @__PURE__ */ d.cloneElement(S, {
|
|
555
|
+
fontSize: (c = S.props.fontSize) != null ? c : l
|
|
556
|
+
}),
|
|
557
|
+
checkedIcon: /* @__PURE__ */ d.cloneElement(C, {
|
|
558
|
+
fontSize: (s = C.props.fontSize) != null ? s : l
|
|
559
|
+
}),
|
|
560
|
+
ownerState: I,
|
|
561
|
+
ref: t,
|
|
562
|
+
className: O($.root, b)
|
|
563
|
+
}, f, {
|
|
564
|
+
classes: $
|
|
565
|
+
}));
|
|
566
|
+
});
|
|
567
|
+
process.env.NODE_ENV !== "production" && (Me.propTypes = {
|
|
568
|
+
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
569
|
+
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
570
|
+
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
|
|
571
|
+
// └─────────────────────────────────────────────────────────────────────┘
|
|
572
|
+
/**
|
|
573
|
+
* If `true`, the component is checked.
|
|
574
|
+
*/
|
|
575
|
+
checked: e.bool,
|
|
576
|
+
/**
|
|
577
|
+
* The icon to display when the component is checked.
|
|
578
|
+
* @default <CheckBoxIcon />
|
|
579
|
+
*/
|
|
580
|
+
checkedIcon: e.node,
|
|
581
|
+
/**
|
|
582
|
+
* Override or extend the styles applied to the component.
|
|
583
|
+
*/
|
|
584
|
+
classes: e.object,
|
|
585
|
+
/**
|
|
586
|
+
* @ignore
|
|
587
|
+
*/
|
|
588
|
+
className: e.string,
|
|
589
|
+
/**
|
|
590
|
+
* The color of the component.
|
|
591
|
+
* It supports both default and custom theme colors, which can be added as shown in the
|
|
592
|
+
* [palette customization guide](https://mui.com/material-ui/customization/palette/#custom-colors).
|
|
593
|
+
* @default 'primary'
|
|
594
|
+
*/
|
|
595
|
+
color: e.oneOfType([e.oneOf(["default", "primary", "secondary", "error", "info", "success", "warning"]), e.string]),
|
|
596
|
+
/**
|
|
597
|
+
* The default checked state. Use when the component is not controlled.
|
|
598
|
+
*/
|
|
599
|
+
defaultChecked: e.bool,
|
|
600
|
+
/**
|
|
601
|
+
* If `true`, the component is disabled.
|
|
602
|
+
* @default false
|
|
603
|
+
*/
|
|
604
|
+
disabled: e.bool,
|
|
605
|
+
/**
|
|
606
|
+
* If `true`, the ripple effect is disabled.
|
|
607
|
+
* @default false
|
|
608
|
+
*/
|
|
609
|
+
disableRipple: e.bool,
|
|
610
|
+
/**
|
|
611
|
+
* The icon to display when the component is unchecked.
|
|
612
|
+
* @default <CheckBoxOutlineBlankIcon />
|
|
613
|
+
*/
|
|
614
|
+
icon: e.node,
|
|
615
|
+
/**
|
|
616
|
+
* The id of the `input` element.
|
|
617
|
+
*/
|
|
618
|
+
id: e.string,
|
|
619
|
+
/**
|
|
620
|
+
* If `true`, the component appears indeterminate.
|
|
621
|
+
* This does not set the native input element to indeterminate due
|
|
622
|
+
* to inconsistent behavior across browsers.
|
|
623
|
+
* However, we set a `data-indeterminate` attribute on the `input`.
|
|
624
|
+
* @default false
|
|
625
|
+
*/
|
|
626
|
+
indeterminate: e.bool,
|
|
627
|
+
/**
|
|
628
|
+
* The icon to display when the component is indeterminate.
|
|
629
|
+
* @default <IndeterminateCheckBoxIcon />
|
|
630
|
+
*/
|
|
631
|
+
indeterminateIcon: e.node,
|
|
632
|
+
/**
|
|
633
|
+
* [Attributes](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#Attributes) applied to the `input` element.
|
|
634
|
+
*/
|
|
635
|
+
inputProps: e.object,
|
|
636
|
+
/**
|
|
637
|
+
* Pass a ref to the `input` element.
|
|
638
|
+
*/
|
|
639
|
+
inputRef: L,
|
|
640
|
+
/**
|
|
641
|
+
* Callback fired when the state is changed.
|
|
642
|
+
*
|
|
643
|
+
* @param {React.ChangeEvent<HTMLInputElement>} event The event source of the callback.
|
|
644
|
+
* You can pull out the new checked state by accessing `event.target.checked` (boolean).
|
|
645
|
+
*/
|
|
646
|
+
onChange: e.func,
|
|
647
|
+
/**
|
|
648
|
+
* If `true`, the `input` element is required.
|
|
649
|
+
* @default false
|
|
650
|
+
*/
|
|
651
|
+
required: e.bool,
|
|
652
|
+
/**
|
|
653
|
+
* The size of the component.
|
|
654
|
+
* `small` is equivalent to the dense checkbox styling.
|
|
655
|
+
* @default 'medium'
|
|
656
|
+
*/
|
|
657
|
+
size: e.oneOfType([e.oneOf(["medium", "small"]), e.string]),
|
|
658
|
+
/**
|
|
659
|
+
* The system prop that allows defining system overrides as well as additional CSS styles.
|
|
660
|
+
*/
|
|
661
|
+
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
|
|
662
|
+
/**
|
|
663
|
+
* The value of the component. The DOM API casts this to a string.
|
|
664
|
+
* The browser uses "on" as the default value.
|
|
665
|
+
*/
|
|
666
|
+
value: e.any
|
|
667
|
+
});
|
|
668
|
+
export {
|
|
669
|
+
Ce as B,
|
|
670
|
+
Me as C,
|
|
671
|
+
M as c,
|
|
672
|
+
he as u
|
|
673
|
+
};
|