@cgi-learning-hub/ui 0.0.1-dev.1708363971 → 0.0.1-dev.1708424507
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-8coRSZ3M.cjs +1 -0
- package/dist/Button-BJMp7Tz3.js +355 -0
- package/dist/ButtonBase-DfYGPVje.js +892 -0
- package/dist/ButtonBase-xIJbOm-V.cjs +75 -0
- package/dist/Input-DS9hzPC3.js +322 -0
- package/dist/Input-DWEaLJ-2.cjs +1 -0
- package/dist/{InputBase-CGq779n2.js → InputBase-B31rEvBe.js} +59 -60
- package/dist/InputBase-BuseI3Oe.cjs +4 -0
- package/dist/components/AnotherComponent/AnotherComponent.cjs.js +1 -1
- package/dist/components/AnotherComponent/AnotherComponent.es.js +7 -6
- package/dist/components/AnotherComponent/AnotherComponent.stories.d.ts +1 -1
- package/dist/components/BasicButtons/BasicButtons.cjs.js +1 -1
- package/dist/components/BasicButtons/BasicButtons.es.js +22 -23
- package/dist/components/buttons/DefaultButton/DefaultButton.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButton.es.js +3 -3
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.cjs.js +1 -1
- package/dist/components/buttons/DefaultButton/DefaultButtonIcon.es.js +12 -13
- package/dist/components/buttons/PrimaryButton/PrimaryButton.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.es.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/PrimaryButton/PrimaryButton.stories.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.es.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.cjs.js +1 -1
- package/dist/components/buttons/SecondaryButton/SecondaryButton.stories.es.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.cjs.js +1 -1
- package/dist/components/inputs/SearchInput/SearchInput.es.js +18 -19
- package/dist/components/inputs/TextInput/TextInput.cjs.js +13 -13
- package/dist/components/inputs/TextInput/TextInput.es.js +1015 -1329
- package/dist/{createSvgIcon-CHLyeSLU.js → createSvgIcon-BPyRt0N5.js} +12 -13
- package/dist/createSvgIcon-Cz9hf1Fl.cjs +1 -0
- package/dist/{extendSxProp-BqGiF689.js → extendSxProp-DzGZiKZk.js} +1 -1
- package/dist/extendSxProp-LEI89AMt.cjs +1 -0
- package/dist/{useForkRef-GL_-ZsET.js → useForkRef-C0Hk1SEc.js} +1 -1
- package/dist/useForkRef-YQvz-OME.cjs +1 -0
- package/dist/useTheme-BzgwMQvX.cjs +1 -0
- package/dist/{TransitionGroupContext-BjDSFqZJ.js → useTheme-D1_U7jx5.js} +20 -14
- package/dist/useThemeProps-Aqe6oH65.cjs +65 -0
- package/dist/useThemeProps-Dkkbtzcg.js +2696 -0
- package/package.json +1 -1
- package/dist/Button-D0o8tGej.cjs +0 -75
- package/dist/Button-D0z_AY3E.js +0 -1241
- package/dist/InputBase-lIiwyvaO.cjs +0 -4
- package/dist/TransitionGroupContext-B6r0bfvS.cjs +0 -1
- package/dist/createSvgIcon-DHY1YrJ8.cjs +0 -1
- package/dist/defaultTheme-BKohU5FP.js +0 -2232
- package/dist/defaultTheme-DdZ2uQhZ.cjs +0 -42
- package/dist/extendSxProp-DRVELas3.cjs +0 -1
- package/dist/styled-1ec4DLGK.js +0 -472
- package/dist/styled-DqWU6H76.cjs +0 -24
- package/dist/useForkRef-BkcfGVSE.cjs +0 -1
- package/dist/useTheme-B4qd7ENB.js +0 -9
- package/dist/useTheme-DjsJvzN5.cjs +0 -1
|
@@ -1,27 +1,10 @@
|
|
|
1
|
-
import { P as e,
|
|
1
|
+
import { P as e, w as He, _ as ge, a as d, x as Pe, T as Ve, g as We, b as _e, s as we, u as Le, h as fe, f as ee, e as je, y as Ue } from "./useThemeProps-Dkkbtzcg.js";
|
|
2
2
|
import * as a from "react";
|
|
3
|
-
import { g as Le, s as we, u as je, c as fe, a as Ue } from "./styled-1ec4DLGK.js";
|
|
4
3
|
import { jsx as R, jsxs as ne } from "react/jsx-runtime";
|
|
5
|
-
import { a as ve, u as oe, e as $e, r as Ge } from "./useForkRef-
|
|
4
|
+
import { a as ve, u as oe, e as $e, r as Ge } from "./useForkRef-C0Hk1SEc.js";
|
|
6
5
|
import * as Ke from "react-dom";
|
|
7
6
|
import { Global as qe } from "@emotion/react";
|
|
8
|
-
function Ye(n) {
|
|
9
|
-
return n == null || Object.keys(n).length === 0;
|
|
10
|
-
}
|
|
11
|
-
function Ce(n) {
|
|
12
|
-
const {
|
|
13
|
-
styles: o,
|
|
14
|
-
defaultTheme: t = {}
|
|
15
|
-
} = n;
|
|
16
|
-
return /* @__PURE__ */ R(qe, {
|
|
17
|
-
styles: typeof o == "function" ? (r) => o(Ye(r) ? t : r) : o
|
|
18
|
-
});
|
|
19
|
-
}
|
|
20
|
-
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
21
|
-
defaultTheme: e.object,
|
|
22
|
-
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
23
|
-
});
|
|
24
|
-
function Ze(n, o = 166) {
|
|
7
|
+
function Ye(n, o = 166) {
|
|
25
8
|
let t;
|
|
26
9
|
function i(...r) {
|
|
27
10
|
const p = () => {
|
|
@@ -33,12 +16,28 @@ function Ze(n, o = 166) {
|
|
|
33
16
|
clearTimeout(t);
|
|
34
17
|
}, i;
|
|
35
18
|
}
|
|
36
|
-
function
|
|
19
|
+
function Ze(n) {
|
|
37
20
|
return n && n.ownerDocument || document;
|
|
38
21
|
}
|
|
39
22
|
function me(n) {
|
|
40
|
-
return
|
|
23
|
+
return Ze(n).defaultView || window;
|
|
24
|
+
}
|
|
25
|
+
function Je(n) {
|
|
26
|
+
return n == null || Object.keys(n).length === 0;
|
|
27
|
+
}
|
|
28
|
+
function Ce(n) {
|
|
29
|
+
const {
|
|
30
|
+
styles: o,
|
|
31
|
+
defaultTheme: t = {}
|
|
32
|
+
} = n;
|
|
33
|
+
return /* @__PURE__ */ R(qe, {
|
|
34
|
+
styles: typeof o == "function" ? (r) => o(Je(r) ? t : r) : o
|
|
35
|
+
});
|
|
41
36
|
}
|
|
37
|
+
process.env.NODE_ENV !== "production" && (Ce.propTypes = {
|
|
38
|
+
defaultTheme: e.object,
|
|
39
|
+
styles: e.oneOfType([e.array, e.string, e.object, e.func])
|
|
40
|
+
});
|
|
42
41
|
function Se({
|
|
43
42
|
styles: n,
|
|
44
43
|
themeId: o,
|
|
@@ -67,20 +66,14 @@ process.env.NODE_ENV !== "production" && (Se.propTypes = {
|
|
|
67
66
|
*/
|
|
68
67
|
themeId: e.string
|
|
69
68
|
});
|
|
70
|
-
const xe = /* @__PURE__ */ a.createContext(void 0);
|
|
71
|
-
process.env.NODE_ENV !== "production" && (xe.displayName = "FormControlContext");
|
|
72
|
-
const Te = xe;
|
|
73
|
-
function Qe() {
|
|
74
|
-
return a.useContext(Te);
|
|
75
|
-
}
|
|
76
69
|
function he(n) {
|
|
77
70
|
return typeof n == "string";
|
|
78
71
|
}
|
|
79
|
-
const
|
|
72
|
+
const Qe = ["onChange", "maxRows", "minRows", "style", "value"];
|
|
80
73
|
function U(n) {
|
|
81
74
|
return parseInt(n, 10) || 0;
|
|
82
75
|
}
|
|
83
|
-
const
|
|
76
|
+
const Xe = {
|
|
84
77
|
shadow: {
|
|
85
78
|
// Visibility needed to hide the extra text area on iPads
|
|
86
79
|
visibility: "hidden",
|
|
@@ -98,14 +91,14 @@ const en = {
|
|
|
98
91
|
function ye(n) {
|
|
99
92
|
return n == null || Object.keys(n).length === 0 || n.outerHeightStyle === 0 && !n.overflow;
|
|
100
93
|
}
|
|
101
|
-
const
|
|
94
|
+
const xe = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
102
95
|
const {
|
|
103
96
|
onChange: i,
|
|
104
97
|
maxRows: r,
|
|
105
98
|
minRows: p = 1,
|
|
106
99
|
style: I,
|
|
107
100
|
value: E
|
|
108
|
-
} = o, D = ge(o,
|
|
101
|
+
} = o, D = ge(o, Qe), {
|
|
109
102
|
current: O
|
|
110
103
|
} = a.useRef(E != null), S = a.useRef(null), F = ve(t, S), v = a.useRef(null), b = a.useRef(0), [N, k] = a.useState({
|
|
111
104
|
outerHeightStyle: 0
|
|
@@ -156,7 +149,7 @@ const Re = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
|
156
149
|
cancelAnimationFrame(u), u = requestAnimationFrame(() => {
|
|
157
150
|
g();
|
|
158
151
|
});
|
|
159
|
-
}, w =
|
|
152
|
+
}, w = Ye(g), z = S.current, A = me(z);
|
|
160
153
|
A.addEventListener("resize", w);
|
|
161
154
|
let C;
|
|
162
155
|
return typeof ResizeObserver < "u" && (C = new ResizeObserver(process.env.NODE_ENV === "test" ? f : g), C.observe(z)), () => {
|
|
@@ -188,14 +181,14 @@ const Re = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
|
188
181
|
readOnly: !0,
|
|
189
182
|
ref: v,
|
|
190
183
|
tabIndex: -1,
|
|
191
|
-
style: d({},
|
|
184
|
+
style: d({}, Xe.shadow, I, {
|
|
192
185
|
paddingTop: 0,
|
|
193
186
|
paddingBottom: 0
|
|
194
187
|
})
|
|
195
188
|
})]
|
|
196
189
|
});
|
|
197
190
|
});
|
|
198
|
-
process.env.NODE_ENV !== "production" && (
|
|
191
|
+
process.env.NODE_ENV !== "production" && (xe.propTypes = {
|
|
199
192
|
// ┌────────────────────────────── Warning ──────────────────────────────┐
|
|
200
193
|
// │ These PropTypes are generated from the TypeScript type definitions. │
|
|
201
194
|
// │ To update them, edit the TypeScript types and run `pnpm proptypes`. │
|
|
@@ -230,13 +223,19 @@ process.env.NODE_ENV !== "production" && (Re.propTypes = {
|
|
|
230
223
|
*/
|
|
231
224
|
value: e.oneOfType([e.arrayOf(e.string), e.number, e.string])
|
|
232
225
|
});
|
|
233
|
-
function
|
|
226
|
+
function en({
|
|
234
227
|
props: n,
|
|
235
228
|
states: o,
|
|
236
229
|
muiFormControl: t
|
|
237
230
|
}) {
|
|
238
231
|
return o.reduce((i, r) => (i[r] = n[r], t && typeof n[r] > "u" && (i[r] = t[r]), i), {});
|
|
239
232
|
}
|
|
233
|
+
const Te = /* @__PURE__ */ a.createContext(void 0);
|
|
234
|
+
process.env.NODE_ENV !== "production" && (Te.displayName = "FormControlContext");
|
|
235
|
+
const Re = Te;
|
|
236
|
+
function nn() {
|
|
237
|
+
return a.useContext(Re);
|
|
238
|
+
}
|
|
240
239
|
function Ee(n) {
|
|
241
240
|
return /* @__PURE__ */ R(Se, d({}, n, {
|
|
242
241
|
defaultTheme: Pe,
|
|
@@ -259,13 +258,13 @@ function be(n) {
|
|
|
259
258
|
function on(n, o = !1) {
|
|
260
259
|
return n && (be(n.value) && n.value !== "" || o && be(n.defaultValue) && n.defaultValue !== "");
|
|
261
260
|
}
|
|
262
|
-
function
|
|
261
|
+
function bn(n) {
|
|
263
262
|
return n.startAdornment;
|
|
264
263
|
}
|
|
265
264
|
function tn(n) {
|
|
266
|
-
return
|
|
265
|
+
return _e("MuiInputBase", n);
|
|
267
266
|
}
|
|
268
|
-
const rn =
|
|
267
|
+
const rn = We("MuiInputBase", ["root", "formControl", "focused", "disabled", "adornedStart", "adornedEnd", "error", "sizeSmall", "multiline", "colorSecondary", "fullWidth", "hiddenLabel", "readOnly", "input", "inputSizeSmall", "inputMultiline", "inputTypeSearch", "inputAdornedStart", "inputAdornedEnd", "inputHiddenLabel"]), te = rn, sn = ["aria-describedby", "autoComplete", "autoFocus", "className", "color", "components", "componentsProps", "defaultValue", "disabled", "disableInjectingGlobalStyles", "endAdornment", "error", "fullWidth", "id", "inputComponent", "inputProps", "inputRef", "margin", "maxRows", "minRows", "multiline", "name", "onBlur", "onChange", "onClick", "onFocus", "onKeyDown", "onKeyUp", "placeholder", "readOnly", "renderSuffix", "rows", "size", "slotProps", "slots", "startAdornment", "type", "value"], an = (n, o) => {
|
|
269
268
|
const {
|
|
270
269
|
ownerState: t
|
|
271
270
|
} = n;
|
|
@@ -295,7 +294,7 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
295
294
|
root: ["root", `color${ee(t)}`, i && "disabled", r && "error", D && "fullWidth", I && "focused", E && "formControl", v && v !== "medium" && `size${ee(v)}`, S && "multiline", b && "adornedStart", p && "adornedEnd", O && "hiddenLabel", F && "readOnly"],
|
|
296
295
|
input: ["input", i && "disabled", N === "search" && "inputTypeSearch", S && "inputMultiline", v === "small" && "inputSizeSmall", O && "inputHiddenLabel", b && "inputAdornedStart", p && "inputAdornedEnd", F && "readOnly"]
|
|
297
296
|
};
|
|
298
|
-
return
|
|
297
|
+
return je(k, tn, o);
|
|
299
298
|
}, cn = we("div", {
|
|
300
299
|
name: "MuiInputBase",
|
|
301
300
|
slot: "Root",
|
|
@@ -439,7 +438,7 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
439
438
|
}
|
|
440
439
|
}), Oe = /* @__PURE__ */ a.forwardRef(function(o, t) {
|
|
441
440
|
var i;
|
|
442
|
-
const r =
|
|
441
|
+
const r = Le({
|
|
443
442
|
props: o,
|
|
444
443
|
name: "MuiInputBase"
|
|
445
444
|
}), {
|
|
@@ -482,12 +481,12 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
482
481
|
} = a.useRef(L != null), M = a.useRef(), Ae = a.useCallback((s) => {
|
|
483
482
|
process.env.NODE_ENV !== "production" && s && s.nodeName !== "INPUT" && !s.focus && console.error(["MUI: You have provided a `inputComponent` to the input component", "that does not correctly handle the `ref` prop.", "Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
484
483
|
`));
|
|
485
|
-
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] = a.useState(!1), l =
|
|
484
|
+
}, []), Ie = ve(M, $, m.ref, Ae), [q, Y] = a.useState(!1), l = nn();
|
|
486
485
|
process.env.NODE_ENV !== "production" && a.useEffect(() => {
|
|
487
486
|
if (l)
|
|
488
487
|
return l.registerEffect();
|
|
489
488
|
}, [l]);
|
|
490
|
-
const y =
|
|
489
|
+
const y = en({
|
|
491
490
|
props: r,
|
|
492
491
|
muiFormControl: l,
|
|
493
492
|
states: ["color", "disabled", "error", "hiddenLabel", "size", "required", "filled"]
|
|
@@ -515,7 +514,7 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
515
514
|
if (!K) {
|
|
516
515
|
const pe = s.target || M.current;
|
|
517
516
|
if (pe == null)
|
|
518
|
-
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." :
|
|
517
|
+
throw new Error(process.env.NODE_ENV !== "production" ? "MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info." : Ue(1));
|
|
519
518
|
V({
|
|
520
519
|
value: pe.value
|
|
521
520
|
});
|
|
@@ -537,7 +536,7 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
537
536
|
type: void 0,
|
|
538
537
|
maxRows: c,
|
|
539
538
|
minRows: g
|
|
540
|
-
}, x), Q =
|
|
539
|
+
}, x), Q = xe);
|
|
541
540
|
const De = (s) => {
|
|
542
541
|
V(s.animationName === "mui-auto-fill-cancel" ? M.current : {
|
|
543
542
|
value: "x"
|
|
@@ -568,7 +567,7 @@ const rn = Le("MuiInputBase", ["root", "formControl", "focused", "disabled", "ad
|
|
|
568
567
|
onClick: Me
|
|
569
568
|
}, ze, {
|
|
570
569
|
className: fe(le.root, X.className, D, H && "MuiInputBase-readOnly"),
|
|
571
|
-
children: [P, /* @__PURE__ */ R(
|
|
570
|
+
children: [P, /* @__PURE__ */ R(Re.Provider, {
|
|
572
571
|
value: null,
|
|
573
572
|
children: /* @__PURE__ */ R(ce, d({
|
|
574
573
|
ownerState: j,
|
|
@@ -835,21 +834,21 @@ process.env.NODE_ENV !== "production" && (Oe.propTypes = {
|
|
|
835
834
|
*/
|
|
836
835
|
value: e.any
|
|
837
836
|
});
|
|
838
|
-
const
|
|
837
|
+
const gn = Oe;
|
|
839
838
|
export {
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
839
|
+
Re as F,
|
|
840
|
+
cn as I,
|
|
841
|
+
dn as a,
|
|
842
|
+
ln as b,
|
|
843
|
+
gn as c,
|
|
844
|
+
he as d,
|
|
845
|
+
me as e,
|
|
846
|
+
en as f,
|
|
847
|
+
bn as g,
|
|
849
848
|
on as h,
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
849
|
+
te as i,
|
|
850
|
+
Ye as j,
|
|
851
|
+
Ze as o,
|
|
853
852
|
an as r,
|
|
854
|
-
|
|
853
|
+
nn as u
|
|
855
854
|
};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
"use strict";const e=require("./useThemeProps-Aqe6oH65.cjs"),He=require("react"),P=require("react/jsx-runtime"),z=require("./useForkRef-YQvz-OME.cjs"),We=require("react-dom"),Ve=require("@emotion/react");function me(o){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const t in o)if(t!=="default"){const r=Object.getOwnPropertyDescriptor(o,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:()=>o[t]})}}return n.default=o,Object.freeze(n)}const l=me(He),Le=me(We);function he(o,n=166){let t;function r(...s){const c=()=>{o.apply(this,s)};clearTimeout(t),t=setTimeout(c,n)}return r.clear=()=>{clearTimeout(t)},r}function Te(o){return o&&o.ownerDocument||document}function oe(o){return Te(o).defaultView||window}function Ue(o){return o==null||Object.keys(o).length===0}function be(o){const{styles:n,defaultTheme:t={}}=o,r=typeof n=="function"?s=>n(Ue(s)?t:s):n;return P.jsx(Ve.Global,{styles:r})}process.env.NODE_ENV!=="production"&&(be.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.string,e.PropTypes.object,e.PropTypes.func])});function Pe({styles:o,themeId:n,defaultTheme:t={}}){const r=e.useTheme(t),s=typeof o=="function"?o(n&&r[n]||r):o;return P.jsx(be,{styles:s})}process.env.NODE_ENV!=="production"&&(Pe.propTypes={defaultTheme:e.PropTypes.object,styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool]),themeId:e.PropTypes.string});function ne(o){return typeof o=="string"}const $e=["onChange","maxRows","minRows","style","value"];function U(o){return parseInt(o,10)||0}const qe={shadow:{visibility:"hidden",position:"absolute",overflow:"hidden",height:0,top:0,left:0,transform:"translateZ(0)"}};function fe(o){return o==null||Object.keys(o).length===0||o.outerHeightStyle===0&&!o.overflow}const ge=l.forwardRef(function(n,t){const{onChange:r,maxRows:s,minRows:c=1,style:_,value:S}=n,B=e._objectWithoutPropertiesLoose(n,$e),{current:R}=l.useRef(S!=null),w=l.useRef(null),A=z.useForkRef(t,w),g=l.useRef(null),h=l.useRef(0),[O,F]=l.useState({outerHeightStyle:0}),I=l.useCallback(()=>{const u=w.current,a=oe(u).getComputedStyle(u);if(a.width==="0px")return{outerHeightStyle:0};const d=g.current;d.style.width=a.width,d.value=u.value||n.placeholder||"x",d.value.slice(-1)===`
|
|
2
|
+
`&&(d.value+=" ");const b=a.boxSizing,E=U(a.paddingBottom)+U(a.paddingTop),N=U(a.borderBottomWidth)+U(a.borderTopWidth),x=d.scrollHeight;d.value="x";const C=d.scrollHeight;let y=x;c&&(y=Math.max(Number(c)*C,y)),s&&(y=Math.min(Number(s)*C,y)),y=Math.max(y,C);const G=y+(b==="border-box"?E+N:0),j=Math.abs(y-x)<=1;return{outerHeightStyle:G,overflow:j}},[s,c,n.placeholder]),H=(u,T)=>{const{outerHeightStyle:a,overflow:d}=T;return h.current<20&&(a>0&&Math.abs((u.outerHeightStyle||0)-a)>1||u.overflow!==d)?(h.current+=1,{overflow:d,outerHeightStyle:a}):(process.env.NODE_ENV!=="production"&&h.current===20&&console.error(["MUI: Too many re-renders. The layout is unstable.","TextareaAutosize limits the number of renders to prevent an infinite loop."].join(`
|
|
3
|
+
`)),u)},f=l.useCallback(()=>{const u=I();fe(u)||F(T=>H(T,u))},[I]);z.useEnhancedEffect(()=>{const u=()=>{const C=I();fe(C)||Le.flushSync(()=>{F(y=>H(y,C))})},T=()=>{h.current=0,u()};let a;const d=()=>{cancelAnimationFrame(a),a=requestAnimationFrame(()=>{T()})},b=he(T),E=w.current,N=oe(E);N.addEventListener("resize",b);let x;return typeof ResizeObserver<"u"&&(x=new ResizeObserver(process.env.NODE_ENV==="test"?d:T),x.observe(E)),()=>{b.clear(),cancelAnimationFrame(a),N.removeEventListener("resize",b),x&&x.disconnect()}},[I]),z.useEnhancedEffect(()=>{f()}),l.useEffect(()=>{h.current=0},[S]);const q=u=>{h.current=0,R||f(),r&&r(u)};return P.jsxs(l.Fragment,{children:[P.jsx("textarea",e._extends({value:S,onChange:q,ref:A,rows:c,style:e._extends({height:O.outerHeightStyle,overflow:O.overflow?"hidden":void 0},_)},B)),P.jsx("textarea",{"aria-hidden":!0,className:n.className,readOnly:!0,ref:g,tabIndex:-1,style:e._extends({},qe.shadow,_,{paddingTop:0,paddingBottom:0})})]})});process.env.NODE_ENV!=="production"&&(ge.propTypes={className:e.PropTypes.string,maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),onChange:e.PropTypes.func,placeholder:e.PropTypes.string,style:e.PropTypes.object,value:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.string),e.PropTypes.number,e.PropTypes.string])});function xe({props:o,states:n,muiFormControl:t}){return n.reduce((r,s)=>(r[s]=o[s],t&&typeof o[s]>"u"&&(r[s]=t[s]),r),{})}const we=l.createContext(void 0);process.env.NODE_ENV!=="production"&&(we.displayName="FormControlContext");const te=we;function ve(){return l.useContext(te)}function Ce(o){return P.jsx(Pe,e._extends({},o,{defaultTheme:e.defaultTheme,themeId:e.THEME_ID}))}process.env.NODE_ENV!=="production"&&(Ce.propTypes={styles:e.PropTypes.oneOfType([e.PropTypes.array,e.PropTypes.func,e.PropTypes.number,e.PropTypes.object,e.PropTypes.string,e.PropTypes.bool])});function ye(o){return o!=null&&!(Array.isArray(o)&&o.length===0)}function Se(o,n=!1){return o&&(ye(o.value)&&o.value!==""||n&&ye(o.defaultValue)&&o.defaultValue!=="")}function Ge(o){return o.startAdornment}function Ke(o){return e.generateUtilityClass("MuiInputBase",o)}const Ye=e.generateUtilityClasses("MuiInputBase",["root","formControl","focused","disabled","adornedStart","adornedEnd","error","sizeSmall","multiline","colorSecondary","fullWidth","hiddenLabel","readOnly","input","inputSizeSmall","inputMultiline","inputTypeSearch","inputAdornedStart","inputAdornedEnd","inputHiddenLabel"]),$=Ye,Ze=["aria-describedby","autoComplete","autoFocus","className","color","components","componentsProps","defaultValue","disabled","disableInjectingGlobalStyles","endAdornment","error","fullWidth","id","inputComponent","inputProps","inputRef","margin","maxRows","minRows","multiline","name","onBlur","onChange","onClick","onFocus","onKeyDown","onKeyUp","placeholder","readOnly","renderSuffix","rows","size","slotProps","slots","startAdornment","type","value"],Re=(o,n)=>{const{ownerState:t}=o;return[n.root,t.formControl&&n.formControl,t.startAdornment&&n.adornedStart,t.endAdornment&&n.adornedEnd,t.error&&n.error,t.size==="small"&&n.sizeSmall,t.multiline&&n.multiline,t.color&&n[`color${e.capitalize(t.color)}`],t.fullWidth&&n.fullWidth,t.hiddenLabel&&n.hiddenLabel]},Oe=(o,n)=>{const{ownerState:t}=o;return[n.input,t.size==="small"&&n.inputSizeSmall,t.multiline&&n.inputMultiline,t.type==="search"&&n.inputTypeSearch,t.startAdornment&&n.inputAdornedStart,t.endAdornment&&n.inputAdornedEnd,t.hiddenLabel&&n.inputHiddenLabel]},Je=o=>{const{classes:n,color:t,disabled:r,error:s,endAdornment:c,focused:_,formControl:S,fullWidth:B,hiddenLabel:R,multiline:w,readOnly:A,size:g,startAdornment:h,type:O}=o,F={root:["root",`color${e.capitalize(t)}`,r&&"disabled",s&&"error",B&&"fullWidth",_&&"focused",S&&"formControl",g&&g!=="medium"&&`size${e.capitalize(g)}`,w&&"multiline",h&&"adornedStart",c&&"adornedEnd",R&&"hiddenLabel",A&&"readOnly"],input:["input",r&&"disabled",O==="search"&&"inputTypeSearch",w&&"inputMultiline",g==="small"&&"inputSizeSmall",R&&"inputHiddenLabel",h&&"inputAdornedStart",c&&"inputAdornedEnd",A&&"readOnly"]};return e.composeClasses(F,Ke,n)},Ee=e.styled("div",{name:"MuiInputBase",slot:"Root",overridesResolver:Re})(({theme:o,ownerState:n})=>e._extends({},o.typography.body1,{color:(o.vars||o).palette.text.primary,lineHeight:"1.4375em",boxSizing:"border-box",position:"relative",cursor:"text",display:"inline-flex",alignItems:"center",[`&.${$.disabled}`]:{color:(o.vars||o).palette.text.disabled,cursor:"default"}},n.multiline&&e._extends({padding:"4px 0 5px"},n.size==="small"&&{paddingTop:1}),n.fullWidth&&{width:"100%"})),Ne=e.styled("input",{name:"MuiInputBase",slot:"Input",overridesResolver:Oe})(({theme:o,ownerState:n})=>{const t=o.palette.mode==="light",r=e._extends({color:"currentColor"},o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5},{transition:o.transitions.create("opacity",{duration:o.transitions.duration.shorter})}),s={opacity:"0 !important"},c=o.vars?{opacity:o.vars.opacity.inputPlaceholder}:{opacity:t?.42:.5};return e._extends({font:"inherit",letterSpacing:"inherit",color:"currentColor",padding:"4px 0 5px",border:0,boxSizing:"content-box",background:"none",height:"1.4375em",margin:0,WebkitTapHighlightColor:"transparent",display:"block",minWidth:0,width:"100%",animationName:"mui-auto-fill-cancel",animationDuration:"10ms","&::-webkit-input-placeholder":r,"&::-moz-placeholder":r,"&:-ms-input-placeholder":r,"&::-ms-input-placeholder":r,"&:focus":{outline:0},"&:invalid":{boxShadow:"none"},"&::-webkit-search-decoration":{WebkitAppearance:"none"},[`label[data-shrink=false] + .${$.formControl} &`]:{"&::-webkit-input-placeholder":s,"&::-moz-placeholder":s,"&:-ms-input-placeholder":s,"&::-ms-input-placeholder":s,"&:focus::-webkit-input-placeholder":c,"&:focus::-moz-placeholder":c,"&:focus:-ms-input-placeholder":c,"&:focus::-ms-input-placeholder":c},[`&.${$.disabled}`]:{opacity:1,WebkitTextFillColor:(o.vars||o).palette.text.disabled},"&:-webkit-autofill":{animationDuration:"5000s",animationName:"mui-auto-fill"}},n.size==="small"&&{paddingTop:1},n.multiline&&{height:"auto",resize:"none",padding:0,paddingTop:0},n.type==="search"&&{MozAppearance:"textfield"})}),Qe=P.jsx(Ce,{styles:{"@keyframes mui-auto-fill":{from:{display:"block"}},"@keyframes mui-auto-fill-cancel":{from:{display:"block"}}}}),ze=l.forwardRef(function(n,t){var r;const s=e.useThemeProps({props:n,name:"MuiInputBase"}),{"aria-describedby":c,autoComplete:_,autoFocus:S,className:B,components:R={},componentsProps:w={},defaultValue:A,disabled:g,disableInjectingGlobalStyles:h,endAdornment:O,fullWidth:F=!1,id:I,inputComponent:H="input",inputProps:f={},inputRef:q,maxRows:u,minRows:T,multiline:a=!1,name:d,onBlur:b,onChange:E,onClick:N,onFocus:x,onKeyDown:C,onKeyUp:y,placeholder:G,readOnly:j,renderSuffix:re,rows:W,slotProps:se={},slots:ie={},startAdornment:D,type:le="text",value:_e}=s,Ae=e._objectWithoutPropertiesLoose(s,Ze),V=f.value!=null?f.value:_e,{current:K}=l.useRef(V!=null),k=l.useRef(),Fe=l.useCallback(i=>{process.env.NODE_ENV!=="production"&&i&&i.nodeName!=="INPUT"&&!i.focus&&console.error(["MUI: You have provided a `inputComponent` to the input component","that does not correctly handle the `ref` prop.","Make sure the `ref` prop is called with a HTMLInputElement."].join(`
|
|
4
|
+
`))},[]),Ie=z.useForkRef(k,q,f.ref,Fe),[Y,Z]=l.useState(!1),p=ve();process.env.NODE_ENV!=="production"&&l.useEffect(()=>{if(p)return p.registerEffect()},[p]);const m=xe({props:s,muiFormControl:p,states:["color","disabled","error","hiddenLabel","size","required","filled"]});m.focused=p?p.focused:Y,l.useEffect(()=>{!p&&g&&Y&&(Z(!1),b&&b())},[p,g,Y,b]);const J=p&&p.onFilled,Q=p&&p.onEmpty,M=l.useCallback(i=>{Se(i)?J&&J():Q&&Q()},[J,Q]);z.useEnhancedEffect(()=>{K&&M({value:V})},[V,M,K]);const ke=i=>{if(m.disabled){i.stopPropagation();return}x&&x(i),f.onFocus&&f.onFocus(i),p&&p.onFocus?p.onFocus(i):Z(!0)},Be=i=>{b&&b(i),f.onBlur&&f.onBlur(i),p&&p.onBlur?p.onBlur(i):Z(!1)},je=(i,...ce)=>{if(!K){const de=i.target||k.current;if(de==null)throw new Error(process.env.NODE_ENV!=="production"?"MUI: Expected valid input target. Did you use a custom `inputComponent` and forget to forward refs? See https://mui.com/r/input-component-ref-interface for more info.":e.formatMuiErrorMessage(1));M({value:de.value})}f.onChange&&f.onChange(i,...ce),E&&E(i,...ce)};l.useEffect(()=>{M(k.current)},[]);const De=i=>{k.current&&i.currentTarget===i.target&&k.current.focus(),N&&N(i)};let X=H,v=f;a&&X==="input"&&(W?(process.env.NODE_ENV!=="production"&&(T||u)&&console.warn("MUI: You can not use the `minRows` or `maxRows` props when the input `rows` prop is set."),v=e._extends({type:void 0,minRows:W,maxRows:W},v)):v=e._extends({type:void 0,maxRows:u,minRows:T},v),X=ge);const Me=i=>{M(i.animationName==="mui-auto-fill-cancel"?k.current:{value:"x"})};l.useEffect(()=>{p&&p.setAdornedStart(!!D)},[p,D]);const L=e._extends({},s,{color:m.color||"primary",disabled:m.disabled,endAdornment:O,error:m.error,focused:m.focused,formControl:p,fullWidth:F,hiddenLabel:m.hiddenLabel,multiline:a,size:m.size,startAdornment:D,type:le}),pe=Je(L),ae=ie.root||R.Root||Ee,ee=se.root||w.root||{},ue=ie.input||R.Input||Ne;return v=e._extends({},v,(r=se.input)!=null?r:w.input),P.jsxs(l.Fragment,{children:[!h&&Qe,P.jsxs(ae,e._extends({},ee,!ne(ae)&&{ownerState:e._extends({},L,ee.ownerState)},{ref:t,onClick:De},Ae,{className:e.clsx(pe.root,ee.className,B,j&&"MuiInputBase-readOnly"),children:[D,P.jsx(te.Provider,{value:null,children:P.jsx(ue,e._extends({ownerState:L,"aria-invalid":m.error,"aria-describedby":c,autoComplete:_,autoFocus:S,defaultValue:A,disabled:m.disabled,id:I,onAnimationStart:Me,name:d,placeholder:G,readOnly:j,required:m.required,rows:W,value:V,onKeyDown:C,onKeyUp:y,type:le},v,!ne(ue)&&{as:X,ownerState:e._extends({},L,v.ownerState)},{ref:Ie,className:e.clsx(pe.input,v.className,j&&"MuiInputBase-readOnly"),onBlur:Be,onChange:je,onFocus:ke}))}),O,re?re(e._extends({},m,{startAdornment:D})):null]}))]})});process.env.NODE_ENV!=="production"&&(ze.propTypes={"aria-describedby":e.PropTypes.string,autoComplete:e.PropTypes.string,autoFocus:e.PropTypes.bool,classes:e.PropTypes.object,className:e.PropTypes.string,color:e.PropTypes.oneOfType([e.PropTypes.oneOf(["primary","secondary","error","info","success","warning"]),e.PropTypes.string]),components:e.PropTypes.shape({Input:e.PropTypes.elementType,Root:e.PropTypes.elementType}),componentsProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),defaultValue:e.PropTypes.any,disabled:e.PropTypes.bool,disableInjectingGlobalStyles:e.PropTypes.bool,endAdornment:e.PropTypes.node,error:e.PropTypes.bool,fullWidth:e.PropTypes.bool,id:e.PropTypes.string,inputComponent:z.elementTypeAcceptingRef,inputProps:e.PropTypes.object,inputRef:z.refType,margin:e.PropTypes.oneOf(["dense","none"]),maxRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),minRows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),multiline:e.PropTypes.bool,name:e.PropTypes.string,onBlur:e.PropTypes.func,onChange:e.PropTypes.func,onClick:e.PropTypes.func,onFocus:e.PropTypes.func,onInvalid:e.PropTypes.func,onKeyDown:e.PropTypes.func,onKeyUp:e.PropTypes.func,placeholder:e.PropTypes.string,readOnly:e.PropTypes.bool,renderSuffix:e.PropTypes.func,required:e.PropTypes.bool,rows:e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string]),size:e.PropTypes.oneOfType([e.PropTypes.oneOf(["medium","small"]),e.PropTypes.string]),slotProps:e.PropTypes.shape({input:e.PropTypes.object,root:e.PropTypes.object}),slots:e.PropTypes.shape({input:e.PropTypes.elementType,root:e.PropTypes.elementType}),startAdornment:e.PropTypes.node,sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),type:e.PropTypes.string,value:e.PropTypes.any});const Xe=ze;exports.FormControlContext=te;exports.InputBase=Xe;exports.InputBaseComponent=Ne;exports.InputBaseRoot=Ee;exports.debounce=he;exports.formControlState=xe;exports.inputBaseClasses=$;exports.inputOverridesResolver=Oe;exports.isAdornedStart=Ge;exports.isFilled=Se;exports.isHostComponent=ne;exports.ownerDocument=Te;exports.ownerWindow=oe;exports.rootOverridesResolver=Re;exports.useFormControl=ve;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";const e=require("react/jsx-runtime"),n=require("../../useTheme-BzgwMQvX.cjs"),o=require("../../ButtonBase-xIJbOm-V.cjs"),r=require("../../Input-DWEaLJ-2.cjs"),s=()=>{const t=n.useTheme();return e.jsxs("div",{children:[e.jsx("button",{className:"bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded",children:"Click me from AnotherComponent"}),e.jsx(o.ButtonBase,{style:{backgroundColor:t.palette.primary.main},children:"AnotherComponent"}),e.jsx(r.Input,{className:"bg-blue-500"})]})};module.exports=s;
|
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { jsxs as t, jsx as e } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
import { u as r } from "../../useTheme-D1_U7jx5.js";
|
|
3
|
+
import { B as n } from "../../ButtonBase-DfYGPVje.js";
|
|
4
|
+
import { I as m } from "../../Input-DS9hzPC3.js";
|
|
5
|
+
const i = () => {
|
|
6
|
+
const o = r();
|
|
6
7
|
return /* @__PURE__ */ t("div", { children: [
|
|
7
8
|
/* @__PURE__ */ e("button", { className: "bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded", children: "Click me from AnotherComponent" }),
|
|
8
9
|
/* @__PURE__ */ e(n, { style: { backgroundColor: o.palette.primary.main }, children: "AnotherComponent" }),
|
|
9
|
-
/* @__PURE__ */ e(
|
|
10
|
+
/* @__PURE__ */ e(m, { className: "bg-blue-500" })
|
|
10
11
|
] });
|
|
11
12
|
};
|
|
12
13
|
export {
|
|
13
|
-
|
|
14
|
+
i as default
|
|
14
15
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const a=require("react/jsx-runtime"),S=require("react"),e=require("../../useThemeProps-Aqe6oH65.cjs"),C=require("../../useTheme-BzgwMQvX.cjs"),V=require("../../extendSxProp-LEI89AMt.cjs"),P=require("../../Button-8coRSZ3M.cjs");function R(o){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(o){for(const s in o)if(s!=="default"){const t=Object.getOwnPropertyDescriptor(o,s);Object.defineProperty(r,s,t.get?t:{enumerable:!0,get:()=>o[s]})}}return r.default=o,Object.freeze(r)}const f=R(S),D=e.createStyled(),N=["component","direction","spacing","divider","children","className","useFlexGap"],_=e.createTheme(),q=D("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root});function w(o){return e.useThemeProps$1({props:o,name:"MuiStack",defaultTheme:_})}function E(o,r){const s=f.Children.toArray(o).filter(Boolean);return s.reduce((t,i,p)=>(t.push(i),p<s.length-1&&t.push(f.cloneElement(r,{key:`separator-${p}`})),t),[])}const F=o=>({row:"Left","row-reverse":"Right",column:"Top","column-reverse":"Bottom"})[o],M=({ownerState:o,theme:r})=>{let s=e._extends({display:"flex",flexDirection:"column"},e.handleBreakpoints({theme:r},e.resolveBreakpointValues({values:o.direction,breakpoints:r.breakpoints.values}),t=>({flexDirection:t})));if(o.spacing){const t=e.createUnarySpacing(r),i=Object.keys(r.breakpoints.values).reduce((n,c)=>((typeof o.spacing=="object"&&o.spacing[c]!=null||typeof o.direction=="object"&&o.direction[c]!=null)&&(n[c]=!0),n),{}),p=e.resolveBreakpointValues({values:o.direction,base:i}),l=e.resolveBreakpointValues({values:o.spacing,base:i});typeof p=="object"&&Object.keys(p).forEach((n,c,y)=>{if(!p[n]){const T=c>0?p[y[c-1]]:"column";p[n]=T}});const u=(n,c)=>o.useFlexGap?{gap:e.getValue(t,n)}:{"& > :not(style):not(style)":{margin:0},"& > :not(style) ~ :not(style)":{[`margin${F(c?p[c]:o.direction)}`]:e.getValue(t,n)}};s=e.deepmerge(s,e.handleBreakpoints({theme:r},l,u))}return s=e.mergeBreakpointsInOrder(r.breakpoints,s),s};function G(o={}){const{createStyledComponent:r=q,useThemeProps:s=w,componentName:t="MuiStack"}=o,i=()=>{const u={root:["root"]};return e.composeClasses(u,n=>e.generateUtilityClass(t,n),{})},p=r(M),l=f.forwardRef(function(n,c){const y=s(n),d=V.extendSxProp(y),{component:T="div",direction:b="column",spacing:O=0,divider:m,children:v,className:h,useFlexGap:j=!1}=d,x=e._objectWithoutPropertiesLoose(d,N),k={direction:b,spacing:O,useFlexGap:j},B=i();return a.jsx(p,e._extends({as:T,ownerState:k,ref:c,className:e.clsx(B.root,h)},x,{children:m?E(v,m):v}))});return process.env.NODE_ENV!=="production"&&(l.propTypes={children:e.PropTypes.node,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object])}),l}const g=G({createStyledComponent:e.styled("div",{name:"MuiStack",slot:"Root",overridesResolver:(o,r)=>r.root}),useThemeProps:o=>e.useThemeProps({props:o,name:"MuiStack"})});process.env.NODE_ENV!=="production"&&(g.propTypes={children:e.PropTypes.node,component:e.PropTypes.elementType,direction:e.PropTypes.oneOfType([e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"]),e.PropTypes.arrayOf(e.PropTypes.oneOf(["column-reverse","column","row-reverse","row"])),e.PropTypes.object]),divider:e.PropTypes.node,spacing:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.number,e.PropTypes.string])),e.PropTypes.number,e.PropTypes.object,e.PropTypes.string]),sx:e.PropTypes.oneOfType([e.PropTypes.arrayOf(e.PropTypes.oneOfType([e.PropTypes.func,e.PropTypes.object,e.PropTypes.bool])),e.PropTypes.func,e.PropTypes.object]),useFlexGap:e.PropTypes.bool});const $=g,U=e.styled("button")(({theme:o})=>({backgroundColor:o.palette.primary.main})),A=()=>{const o=C.useTheme();return a.jsxs($,{spacing:2,direction:"row",children:[a.jsx(U,{children:"Styled"}),a.jsx(P.Button,{variant:"text",style:{backgroundColor:o.palette.primary.main},children:"Text"}),a.jsx(P.Button,{variant:"contained",children:"Contained"}),a.jsx(P.Button,{variant:"outlined",children:"Outlined"})]})};module.exports=A;
|
|
@@ -1,17 +1,16 @@
|
|
|
1
1
|
import { jsx as l, jsxs as D } from "react/jsx-runtime";
|
|
2
2
|
import * as v from "react";
|
|
3
|
-
import {
|
|
4
|
-
import { u as
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
|
|
8
|
-
const z = F(), H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], J = $(), K = z("div", {
|
|
3
|
+
import { j as F, P as e, k as E, a as k, l as O, m as f, n as _, c as w, o as G, _ as M, h as $, p as U, e as A, b as L, q as T, s as j, u as q } from "../../useThemeProps-Dkkbtzcg.js";
|
|
4
|
+
import { u as I } from "../../useTheme-D1_U7jx5.js";
|
|
5
|
+
import { e as W } from "../../extendSxProp-DzGZiKZk.js";
|
|
6
|
+
import { B as y } from "../../Button-BJMp7Tz3.js";
|
|
7
|
+
const z = F(), H = ["component", "direction", "spacing", "divider", "children", "className", "useFlexGap"], J = E(), K = z("div", {
|
|
9
8
|
name: "MuiStack",
|
|
10
9
|
slot: "Root",
|
|
11
10
|
overridesResolver: (o, r) => r.root
|
|
12
11
|
});
|
|
13
12
|
function Q(o) {
|
|
14
|
-
return
|
|
13
|
+
return U({
|
|
15
14
|
props: o,
|
|
16
15
|
name: "MuiStack",
|
|
17
16
|
defaultTheme: J
|
|
@@ -32,7 +31,7 @@ const Y = (o) => ({
|
|
|
32
31
|
ownerState: o,
|
|
33
32
|
theme: r
|
|
34
33
|
}) => {
|
|
35
|
-
let c =
|
|
34
|
+
let c = k({
|
|
36
35
|
display: "flex",
|
|
37
36
|
flexDirection: "column"
|
|
38
37
|
}, O({
|
|
@@ -44,7 +43,7 @@ const Y = (o) => ({
|
|
|
44
43
|
flexDirection: a
|
|
45
44
|
})));
|
|
46
45
|
if (o.spacing) {
|
|
47
|
-
const a =
|
|
46
|
+
const a = _(r), i = Object.keys(r.breakpoints.values).reduce((n, s) => ((typeof o.spacing == "object" && o.spacing[s] != null || typeof o.direction == "object" && o.direction[s] != null) && (n[s] = !0), n), {}), t = f({
|
|
48
47
|
values: o.direction,
|
|
49
48
|
base: i
|
|
50
49
|
}), u = f({
|
|
@@ -56,7 +55,7 @@ const Y = (o) => ({
|
|
|
56
55
|
const m = s > 0 ? t[p[s - 1]] : "column";
|
|
57
56
|
t[n] = m;
|
|
58
57
|
}
|
|
59
|
-
}), c =
|
|
58
|
+
}), c = w(c, O({
|
|
60
59
|
theme: r
|
|
61
60
|
}, u, (n, s) => o.useFlexGap ? {
|
|
62
61
|
gap: T(a, n)
|
|
@@ -71,7 +70,7 @@ const Y = (o) => ({
|
|
|
71
70
|
}
|
|
72
71
|
}));
|
|
73
72
|
}
|
|
74
|
-
return c =
|
|
73
|
+
return c = G(r.breakpoints, c), c;
|
|
75
74
|
};
|
|
76
75
|
function ee(o = {}) {
|
|
77
76
|
const {
|
|
@@ -79,10 +78,10 @@ function ee(o = {}) {
|
|
|
79
78
|
createStyledComponent: r = K,
|
|
80
79
|
useThemeProps: c = Q,
|
|
81
80
|
componentName: a = "MuiStack"
|
|
82
|
-
} = o, i = () =>
|
|
81
|
+
} = o, i = () => A({
|
|
83
82
|
root: ["root"]
|
|
84
|
-
}, (n) =>
|
|
85
|
-
const p = c(n), d =
|
|
83
|
+
}, (n) => L(a, n), {}), t = r(Z), u = /* @__PURE__ */ v.forwardRef(function(n, s) {
|
|
84
|
+
const p = c(n), d = W(p), {
|
|
86
85
|
component: m = "div",
|
|
87
86
|
direction: C = "column",
|
|
88
87
|
spacing: P = 0,
|
|
@@ -90,16 +89,16 @@ function ee(o = {}) {
|
|
|
90
89
|
children: b,
|
|
91
90
|
className: S,
|
|
92
91
|
useFlexGap: B = !1
|
|
93
|
-
} = d, V =
|
|
92
|
+
} = d, V = M(d, H), N = {
|
|
94
93
|
direction: C,
|
|
95
94
|
spacing: P,
|
|
96
95
|
useFlexGap: B
|
|
97
96
|
}, R = i();
|
|
98
|
-
return /* @__PURE__ */ l(t,
|
|
97
|
+
return /* @__PURE__ */ l(t, k({
|
|
99
98
|
as: m,
|
|
100
99
|
ownerState: N,
|
|
101
100
|
ref: s,
|
|
102
|
-
className:
|
|
101
|
+
className: $(R.root, S)
|
|
103
102
|
}, V, {
|
|
104
103
|
children: h ? X(b, h) : b
|
|
105
104
|
}));
|
|
@@ -113,12 +112,12 @@ function ee(o = {}) {
|
|
|
113
112
|
}), u;
|
|
114
113
|
}
|
|
115
114
|
const x = ee({
|
|
116
|
-
createStyledComponent:
|
|
115
|
+
createStyledComponent: j("div", {
|
|
117
116
|
name: "MuiStack",
|
|
118
117
|
slot: "Root",
|
|
119
118
|
overridesResolver: (o, r) => r.root
|
|
120
119
|
}),
|
|
121
|
-
useThemeProps: (o) =>
|
|
120
|
+
useThemeProps: (o) => q({
|
|
122
121
|
props: o,
|
|
123
122
|
name: "MuiStack"
|
|
124
123
|
})
|
|
@@ -167,10 +166,10 @@ process.env.NODE_ENV !== "production" && (x.propTypes = {
|
|
|
167
166
|
*/
|
|
168
167
|
useFlexGap: e.bool
|
|
169
168
|
});
|
|
170
|
-
const oe = x, re =
|
|
169
|
+
const oe = x, re = j("button")(({ theme: o }) => ({
|
|
171
170
|
backgroundColor: o.palette.primary.main
|
|
172
|
-
})),
|
|
173
|
-
const o =
|
|
171
|
+
})), ie = () => {
|
|
172
|
+
const o = I();
|
|
174
173
|
return /* @__PURE__ */ D(oe, { spacing: 2, direction: "row", children: [
|
|
175
174
|
/* @__PURE__ */ l(re, { children: "Styled" }),
|
|
176
175
|
/* @__PURE__ */ l(
|
|
@@ -186,5 +185,5 @@ const oe = x, re = k("button")(({ theme: o }) => ({
|
|
|
186
185
|
] });
|
|
187
186
|
};
|
|
188
187
|
export {
|
|
189
|
-
|
|
188
|
+
ie as default
|
|
190
189
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const o=require("react/jsx-runtime");require("react");const n=require("./DefaultButtonIcon.cjs.js"),
|
|
1
|
+
"use strict";const o=require("react/jsx-runtime");require("react");const n=require("./DefaultButtonIcon.cjs.js"),l=require("../../../useThemeProps-Aqe6oH65.cjs"),d=require("../../../Button-8coRSZ3M.cjs"),i=require("../../../useTheme-BzgwMQvX.cjs"),a=l.styled(d.Button,{shouldForwardProp:t=>t!=="contentColor"})(t=>({justifyContent:"center",alignItems:"center",columnGap:8,minHeight:38,paddingLeft:12,paddingRight:12,textTransform:"none",color:t.contentColor,borderColor:t.contentColor,borderRadius:5,borderWidth:2,"&:hover":{borderColor:t.contentColor,borderWidth:2}})),c=({icon:t,text:u,...r})=>{const s=i.useTheme(),e=r.contentColor??s.palette.primary.main;return o.jsxs(a,{...r,variant:"outlined",contentColor:e,children:[(t==null?void 0:t.position)==="left"?o.jsx(n,{...t,color:e}):null,u,(t==null?void 0:t.position)==="right"?o.jsx(n,{...t,color:e}):null]})};module.exports=c;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsxs as d, jsx as e } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import n from "./DefaultButtonIcon.es.js";
|
|
4
|
-
import { s as m } from "../../../
|
|
5
|
-
import { B as s } from "../../../Button-
|
|
6
|
-
import { u } from "../../../useTheme-
|
|
4
|
+
import { s as m } from "../../../useThemeProps-Dkkbtzcg.js";
|
|
5
|
+
import { B as s } from "../../../Button-BJMp7Tz3.js";
|
|
6
|
+
import { u } from "../../../useTheme-D1_U7jx5.js";
|
|
7
7
|
const i = m(s, {
|
|
8
8
|
shouldForwardProp: (t) => t !== "contentColor"
|
|
9
9
|
})((t) => ({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const
|
|
1
|
+
"use strict";const i=require("react/jsx-runtime"),m=require("react"),o=require("../../../useThemeProps-Aqe6oH65.cjs");function T(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const s=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(r,n,s.get?s:{enumerable:!0,get:()=>e[n]})}}return r.default=e,Object.freeze(r)}const P=T(m);function g(e){return o.generateUtilityClass("MuiIcon",e)}o.generateUtilityClasses("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const S=["baseClassName","className","color","component","fontSize"],b=e=>{const{color:r,fontSize:n,classes:s}=e,t={root:["root",r!=="inherit"&&`color${o.capitalize(r)}`,`fontSize${o.capitalize(n)}`]};return o.composeClasses(t,g,s)},z=o.styled("span",{name:"MuiIcon",slot:"Root",overridesResolver:(e,r)=>{const{ownerState:n}=e;return[r.root,n.color!=="inherit"&&r[`color${o.capitalize(n.color)}`],r[`fontSize${o.capitalize(n.fontSize)}`]]}})(({theme:e,ownerState:r})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:e.typography.pxToRem(20),medium:e.typography.pxToRem(24),large:e.typography.pxToRem(36)}[r.fontSize],color:{primary:(e.vars||e).palette.primary.main,secondary:(e.vars||e).palette.secondary.main,info:(e.vars||e).palette.info.main,success:(e.vars||e).palette.success.main,warning:(e.vars||e).palette.warning.main,action:(e.vars||e).palette.action.active,error:(e.vars||e).palette.error.main,disabled:(e.vars||e).palette.action.disabled,inherit:void 0}[r.color]})),a=P.forwardRef(function(r,n){const s=o.useThemeProps({props:r,name:"MuiIcon"}),{baseClassName:t="material-icons",className:l,color:u="inherit",component:c="span",fontSize:y="medium"}=s,f=o._objectWithoutPropertiesLoose(s,S),p=o._extends({},s,{baseClassName:t,color:u,component:c,fontSize:y}),d=b(p);return i.jsx(z,o._extends({as:c,className:o.clsx(t,"notranslate",d.root,l),ownerState:p,"aria-hidden":!0,ref:n},f))});process.env.NODE_ENV!=="production"&&(a.propTypes={baseClassName:o.PropTypes.string,children:o.PropTypes.node,classes:o.PropTypes.object,className:o.PropTypes.string,color:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","action","disabled","primary","secondary","error","info","success","warning"]),o.PropTypes.string]),component:o.PropTypes.elementType,fontSize:o.PropTypes.oneOfType([o.PropTypes.oneOf(["inherit","large","medium","small"]),o.PropTypes.string]),sx:o.PropTypes.oneOfType([o.PropTypes.arrayOf(o.PropTypes.oneOfType([o.PropTypes.func,o.PropTypes.object,o.PropTypes.bool])),o.PropTypes.func,o.PropTypes.object])});a.muiName="Icon";const x=a,v=({color:e,Component:r,name:n})=>n?i.jsx(x,{sx:{color:e},children:n}):i.jsx(r,{sx:{color:e}});module.exports=v;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import { jsx as i } from "react/jsx-runtime";
|
|
2
2
|
import * as S from "react";
|
|
3
|
-
import { g as v,
|
|
4
|
-
import { g as b, s as x, u as I, c as T, a as N } from "../../../styled-1ec4DLGK.js";
|
|
3
|
+
import { b, g as v, s as z, f as t, u as x, _ as I, a as f, h as T, P as e, e as N } from "../../../useThemeProps-Dkkbtzcg.js";
|
|
5
4
|
function C(o) {
|
|
6
|
-
return
|
|
5
|
+
return b("MuiIcon", o);
|
|
7
6
|
}
|
|
8
|
-
|
|
7
|
+
v("MuiIcon", ["root", "colorPrimary", "colorSecondary", "colorAction", "colorError", "colorDisabled", "fontSizeInherit", "fontSizeSmall", "fontSizeMedium", "fontSizeLarge"]);
|
|
9
8
|
const w = ["baseClassName", "className", "color", "component", "fontSize"], O = (o) => {
|
|
10
9
|
const {
|
|
11
10
|
color: n,
|
|
@@ -15,7 +14,7 @@ const w = ["baseClassName", "className", "color", "component", "fontSize"], O =
|
|
|
15
14
|
root: ["root", n !== "inherit" && `color${t(n)}`, `fontSize${t(r)}`]
|
|
16
15
|
};
|
|
17
16
|
return N(a, C, s);
|
|
18
|
-
}, R =
|
|
17
|
+
}, R = z("span", {
|
|
19
18
|
name: "MuiIcon",
|
|
20
19
|
slot: "Root",
|
|
21
20
|
overridesResolver: (o, n) => {
|
|
@@ -58,20 +57,20 @@ const w = ["baseClassName", "className", "color", "component", "fontSize"], O =
|
|
|
58
57
|
inherit: void 0
|
|
59
58
|
}[n.color]
|
|
60
59
|
})), c = /* @__PURE__ */ S.forwardRef(function(n, r) {
|
|
61
|
-
const s =
|
|
60
|
+
const s = x({
|
|
62
61
|
props: n,
|
|
63
62
|
name: "MuiIcon"
|
|
64
63
|
}), {
|
|
65
64
|
baseClassName: a = "material-icons",
|
|
66
65
|
className: d,
|
|
67
|
-
color:
|
|
66
|
+
color: u = "inherit",
|
|
68
67
|
component: l = "span",
|
|
69
|
-
fontSize:
|
|
70
|
-
} = s, y =
|
|
68
|
+
fontSize: m = "medium"
|
|
69
|
+
} = s, y = I(s, w), p = f({}, s, {
|
|
71
70
|
baseClassName: a,
|
|
72
|
-
color:
|
|
71
|
+
color: u,
|
|
73
72
|
component: l,
|
|
74
|
-
fontSize:
|
|
73
|
+
fontSize: m
|
|
75
74
|
}), g = O(p);
|
|
76
75
|
return /* @__PURE__ */ i(R, f({
|
|
77
76
|
as: l,
|
|
@@ -134,11 +133,11 @@ process.env.NODE_ENV !== "production" && (c.propTypes = {
|
|
|
134
133
|
sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object])
|
|
135
134
|
});
|
|
136
135
|
c.muiName = "Icon";
|
|
137
|
-
const h = c,
|
|
136
|
+
const h = c, P = ({
|
|
138
137
|
color: o,
|
|
139
138
|
Component: n,
|
|
140
139
|
name: r
|
|
141
140
|
}) => r ? /* @__PURE__ */ i(h, { sx: { color: o }, children: r }) : /* @__PURE__ */ i(n, { sx: { color: o } });
|
|
142
141
|
export {
|
|
143
|
-
|
|
142
|
+
P as default
|
|
144
143
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const r=require("react/jsx-runtime");require("react");const n=require("../DefaultButton/DefaultButton.cjs.js"),o=require("../../../useTheme-
|
|
1
|
+
"use strict";const r=require("react/jsx-runtime");require("react");const n=require("../DefaultButton/DefaultButton.cjs.js"),o=require("../../../useTheme-BzgwMQvX.cjs"),u=e=>{const t=o.useTheme();return r.jsx(n,{contentColor:t.palette.primary.main,...e})};module.exports=u;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import "react";
|
|
3
3
|
import e from "../DefaultButton/DefaultButton.es.js";
|
|
4
|
-
import { u as m } from "../../../useTheme-
|
|
4
|
+
import { u as m } from "../../../useTheme-D1_U7jx5.js";
|
|
5
5
|
const u = (t) => {
|
|
6
6
|
const o = m();
|
|
7
7
|
return /* @__PURE__ */ r(e, { contentColor: o.palette.primary.main, ...t });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./PrimaryButton.cjs.js"),r=require("../../../createSvgIcon-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const t=require("react/jsx-runtime"),e=require("./PrimaryButton.cjs.js"),r=require("../../../createSvgIcon-Cz9hf1Fl.cjs"),s=r.createSvgIcon(t.jsx("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save"),c={title:"Components/Buttons/PrimaryButton",component:e,argTypes:{}},i=n=>t.jsx(e,{...n}),o=i.bind({});o.args={text:"Save",icon:{Component:s,position:"left"},onClick:()=>alert("Alert")};exports.Primary=o;exports.default=c;
|