jcicl 0.0.147 → 0.0.151

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/Modal/Modal.js ADDED
@@ -0,0 +1,405 @@
1
+ import { jsx as n } from "react/jsx-runtime";
2
+ import { n as Y } from "../.chunks/emotion-styled.browser.esm.js";
3
+ import { c as z } from "../.chunks/emotion-react.browser.esm.js";
4
+ import * as c from "react";
5
+ import { g as H, a as _, s as d, c as i, u as q, b as y, P as e, d as G } from "../.chunks/DefaultPropsProvider.js";
6
+ import { u as J, b as Q } from "../.chunks/Portal.js";
7
+ import { m as Z } from "../.chunks/memoTheme.js";
8
+ import { B as ee, M as oe, P as w, F as re } from "../.chunks/Paper.js";
9
+ function ae(r) {
10
+ return H("MuiDialog", r);
11
+ }
12
+ const x = _("MuiDialog", ["root", "scrollPaper", "scrollBody", "container", "paper", "paperScrollPaper", "paperScrollBody", "paperWidthFalse", "paperWidthXs", "paperWidthSm", "paperWidthMd", "paperWidthLg", "paperWidthXl", "paperFullWidth", "paperFullScreen"]), P = /* @__PURE__ */ c.createContext({});
13
+ process.env.NODE_ENV !== "production" && (P.displayName = "DialogContext");
14
+ const te = d(ee, {
15
+ name: "MuiDialog",
16
+ slot: "Backdrop",
17
+ overrides: (r, o) => o.backdrop
18
+ })({
19
+ // Improve scrollable dialog support.
20
+ zIndex: -1
21
+ }), ne = (r) => {
22
+ const {
23
+ classes: o,
24
+ scroll: a,
25
+ maxWidth: l,
26
+ fullWidth: s,
27
+ fullScreen: u
28
+ } = r, m = {
29
+ root: ["root"],
30
+ container: ["container", `scroll${i(a)}`],
31
+ paper: ["paper", `paperScroll${i(a)}`, `paperWidth${i(String(l))}`, s && "paperFullWidth", u && "paperFullScreen"]
32
+ };
33
+ return G(m, ae, o);
34
+ }, ie = d(oe, {
35
+ name: "MuiDialog",
36
+ slot: "Root",
37
+ overridesResolver: (r, o) => o.root
38
+ })({
39
+ "@media print": {
40
+ // Use !important to override the Modal inline-style.
41
+ position: "absolute !important"
42
+ }
43
+ }), le = d("div", {
44
+ name: "MuiDialog",
45
+ slot: "Container",
46
+ overridesResolver: (r, o) => {
47
+ const {
48
+ ownerState: a
49
+ } = r;
50
+ return [o.container, o[`scroll${i(a.scroll)}`]];
51
+ }
52
+ })({
53
+ height: "100%",
54
+ "@media print": {
55
+ height: "auto"
56
+ },
57
+ // We disable the focus ring for mouse, touch and keyboard users.
58
+ outline: 0,
59
+ variants: [{
60
+ props: {
61
+ scroll: "paper"
62
+ },
63
+ style: {
64
+ display: "flex",
65
+ justifyContent: "center",
66
+ alignItems: "center"
67
+ }
68
+ }, {
69
+ props: {
70
+ scroll: "body"
71
+ },
72
+ style: {
73
+ overflowY: "auto",
74
+ overflowX: "hidden",
75
+ textAlign: "center",
76
+ "&::after": {
77
+ content: '""',
78
+ display: "inline-block",
79
+ verticalAlign: "middle",
80
+ height: "100%",
81
+ width: "0"
82
+ }
83
+ }
84
+ }]
85
+ }), se = d(w, {
86
+ name: "MuiDialog",
87
+ slot: "Paper",
88
+ overridesResolver: (r, o) => {
89
+ const {
90
+ ownerState: a
91
+ } = r;
92
+ return [o.paper, o[`scrollPaper${i(a.scroll)}`], o[`paperWidth${i(String(a.maxWidth))}`], a.fullWidth && o.paperFullWidth, a.fullScreen && o.paperFullScreen];
93
+ }
94
+ })(Z(({
95
+ theme: r
96
+ }) => ({
97
+ margin: 32,
98
+ position: "relative",
99
+ overflowY: "auto",
100
+ "@media print": {
101
+ overflowY: "visible",
102
+ boxShadow: "none"
103
+ },
104
+ variants: [{
105
+ props: {
106
+ scroll: "paper"
107
+ },
108
+ style: {
109
+ display: "flex",
110
+ flexDirection: "column",
111
+ maxHeight: "calc(100% - 64px)"
112
+ }
113
+ }, {
114
+ props: {
115
+ scroll: "body"
116
+ },
117
+ style: {
118
+ display: "inline-block",
119
+ verticalAlign: "middle",
120
+ textAlign: "initial"
121
+ }
122
+ }, {
123
+ props: ({
124
+ ownerState: o
125
+ }) => !o.maxWidth,
126
+ style: {
127
+ maxWidth: "calc(100% - 64px)"
128
+ }
129
+ }, {
130
+ props: {
131
+ maxWidth: "xs"
132
+ },
133
+ style: {
134
+ maxWidth: r.breakpoints.unit === "px" ? Math.max(r.breakpoints.values.xs, 444) : `max(${r.breakpoints.values.xs}${r.breakpoints.unit}, 444px)`,
135
+ [`&.${x.paperScrollBody}`]: {
136
+ [r.breakpoints.down(Math.max(r.breakpoints.values.xs, 444) + 32 * 2)]: {
137
+ maxWidth: "calc(100% - 64px)"
138
+ }
139
+ }
140
+ }
141
+ }, ...Object.keys(r.breakpoints.values).filter((o) => o !== "xs").map((o) => ({
142
+ props: {
143
+ maxWidth: o
144
+ },
145
+ style: {
146
+ maxWidth: `${r.breakpoints.values[o]}${r.breakpoints.unit}`,
147
+ [`&.${x.paperScrollBody}`]: {
148
+ [r.breakpoints.down(r.breakpoints.values[o] + 32 * 2)]: {
149
+ maxWidth: "calc(100% - 64px)"
150
+ }
151
+ }
152
+ }
153
+ })), {
154
+ props: ({
155
+ ownerState: o
156
+ }) => o.fullWidth,
157
+ style: {
158
+ width: "calc(100% - 64px)"
159
+ }
160
+ }, {
161
+ props: ({
162
+ ownerState: o
163
+ }) => o.fullScreen,
164
+ style: {
165
+ margin: 0,
166
+ width: "100%",
167
+ maxWidth: "100%",
168
+ height: "100%",
169
+ maxHeight: "none",
170
+ borderRadius: 0,
171
+ [`&.${x.paperScrollBody}`]: {
172
+ margin: 0,
173
+ maxWidth: "100%"
174
+ }
175
+ }
176
+ }]
177
+ }))), T = /* @__PURE__ */ c.forwardRef(function(o, a) {
178
+ const l = q({
179
+ props: o,
180
+ name: "MuiDialog"
181
+ }), s = J(), u = {
182
+ enter: s.transitions.duration.enteringScreen,
183
+ exit: s.transitions.duration.leavingScreen
184
+ }, {
185
+ "aria-describedby": m,
186
+ "aria-labelledby": B,
187
+ BackdropComponent: M,
188
+ BackdropProps: $,
189
+ children: N,
190
+ className: O,
191
+ disableEscapeKeyDown: k = !1,
192
+ fullScreen: R = !1,
193
+ fullWidth: j = !1,
194
+ maxWidth: F = "sm",
195
+ onBackdropClick: C,
196
+ onClick: D,
197
+ onClose: b,
198
+ open: v,
199
+ PaperComponent: E = w,
200
+ PaperProps: S = {},
201
+ scroll: A = "paper",
202
+ TransitionComponent: I = re,
203
+ transitionDuration: W = u,
204
+ TransitionProps: U,
205
+ ...K
206
+ } = l, p = {
207
+ ...l,
208
+ disableEscapeKeyDown: k,
209
+ fullScreen: R,
210
+ fullWidth: j,
211
+ maxWidth: F,
212
+ scroll: A
213
+ }, f = ne(p), g = c.useRef(), L = (t) => {
214
+ g.current = t.target === t.currentTarget;
215
+ }, V = (t) => {
216
+ D && D(t), g.current && (g.current = null, C && C(t), b && b(t, "backdropClick"));
217
+ }, h = Q(B), X = c.useMemo(() => ({
218
+ titleId: h
219
+ }), [h]);
220
+ return /* @__PURE__ */ n(ie, {
221
+ className: y(f.root, O),
222
+ closeAfterTransition: !0,
223
+ components: {
224
+ Backdrop: te
225
+ },
226
+ componentsProps: {
227
+ backdrop: {
228
+ transitionDuration: W,
229
+ as: M,
230
+ ...$
231
+ }
232
+ },
233
+ disableEscapeKeyDown: k,
234
+ onClose: b,
235
+ open: v,
236
+ ref: a,
237
+ onClick: V,
238
+ ownerState: p,
239
+ ...K,
240
+ children: /* @__PURE__ */ n(I, {
241
+ appear: !0,
242
+ in: v,
243
+ timeout: W,
244
+ role: "presentation",
245
+ ...U,
246
+ children: /* @__PURE__ */ n(le, {
247
+ className: y(f.container),
248
+ onMouseDown: L,
249
+ ownerState: p,
250
+ children: /* @__PURE__ */ n(se, {
251
+ as: E,
252
+ elevation: 24,
253
+ role: "dialog",
254
+ "aria-describedby": m,
255
+ "aria-labelledby": h,
256
+ ...S,
257
+ className: y(f.paper, S.className),
258
+ ownerState: p,
259
+ children: /* @__PURE__ */ n(P.Provider, {
260
+ value: X,
261
+ children: N
262
+ })
263
+ })
264
+ })
265
+ })
266
+ });
267
+ });
268
+ process.env.NODE_ENV !== "production" && (T.propTypes = {
269
+ // ┌────────────────────────────── Warning ──────────────────────────────┐
270
+ // │ These PropTypes are generated from the TypeScript type definitions. │
271
+ // │ To update them, edit the d.ts file and run `pnpm proptypes`. │
272
+ // └─────────────────────────────────────────────────────────────────────┘
273
+ /**
274
+ * The id(s) of the element(s) that describe the dialog.
275
+ */
276
+ "aria-describedby": e.string,
277
+ /**
278
+ * The id(s) of the element(s) that label the dialog.
279
+ */
280
+ "aria-labelledby": e.string,
281
+ /**
282
+ * A backdrop component. This prop enables custom backdrop rendering.
283
+ * @deprecated Use `slots.backdrop` instead. While this prop currently works, it will be removed in the next major version.
284
+ * Use the `slots.backdrop` prop to make your application ready for the next version of Material UI.
285
+ * @default styled(Backdrop, {
286
+ * name: 'MuiModal',
287
+ * slot: 'Backdrop',
288
+ * overridesResolver: (props, styles) => {
289
+ * return styles.backdrop;
290
+ * },
291
+ * })({
292
+ * zIndex: -1,
293
+ * })
294
+ */
295
+ BackdropComponent: e.elementType,
296
+ /**
297
+ * @ignore
298
+ */
299
+ BackdropProps: e.object,
300
+ /**
301
+ * Dialog children, usually the included sub-components.
302
+ */
303
+ children: e.node,
304
+ /**
305
+ * Override or extend the styles applied to the component.
306
+ */
307
+ classes: e.object,
308
+ /**
309
+ * @ignore
310
+ */
311
+ className: e.string,
312
+ /**
313
+ * If `true`, hitting escape will not fire the `onClose` callback.
314
+ * @default false
315
+ */
316
+ disableEscapeKeyDown: e.bool,
317
+ /**
318
+ * If `true`, the dialog is full-screen.
319
+ * @default false
320
+ */
321
+ fullScreen: e.bool,
322
+ /**
323
+ * If `true`, the dialog stretches to `maxWidth`.
324
+ *
325
+ * Notice that the dialog width grow is limited by the default margin.
326
+ * @default false
327
+ */
328
+ fullWidth: e.bool,
329
+ /**
330
+ * Determine the max-width of the dialog.
331
+ * The dialog width grows with the size of the screen.
332
+ * Set to `false` to disable `maxWidth`.
333
+ * @default 'sm'
334
+ */
335
+ maxWidth: e.oneOfType([e.oneOf(["xs", "sm", "md", "lg", "xl", !1]), e.string]),
336
+ /**
337
+ * Callback fired when the backdrop is clicked.
338
+ * @deprecated Use the `onClose` prop with the `reason` argument to handle the `backdropClick` events.
339
+ */
340
+ onBackdropClick: e.func,
341
+ /**
342
+ * @ignore
343
+ */
344
+ onClick: e.func,
345
+ /**
346
+ * Callback fired when the component requests to be closed.
347
+ *
348
+ * @param {object} event The event source of the callback.
349
+ * @param {string} reason Can be: `"escapeKeyDown"`, `"backdropClick"`.
350
+ */
351
+ onClose: e.func,
352
+ /**
353
+ * If `true`, the component is shown.
354
+ */
355
+ open: e.bool.isRequired,
356
+ /**
357
+ * The component used to render the body of the dialog.
358
+ * @default Paper
359
+ */
360
+ PaperComponent: e.elementType,
361
+ /**
362
+ * Props applied to the [`Paper`](https://mui.com/material-ui/api/paper/) element.
363
+ * @default {}
364
+ */
365
+ PaperProps: e.object,
366
+ /**
367
+ * Determine the container for scrolling the dialog.
368
+ * @default 'paper'
369
+ */
370
+ scroll: e.oneOf(["body", "paper"]),
371
+ /**
372
+ * The system prop that allows defining system overrides as well as additional CSS styles.
373
+ */
374
+ sx: e.oneOfType([e.arrayOf(e.oneOfType([e.func, e.object, e.bool])), e.func, e.object]),
375
+ /**
376
+ * The component used for the transition.
377
+ * [Follow this guide](https://mui.com/material-ui/transitions/#transitioncomponent-prop) to learn more about the requirements for this component.
378
+ * @default Fade
379
+ */
380
+ TransitionComponent: e.elementType,
381
+ /**
382
+ * The duration for the transition, in milliseconds.
383
+ * You may specify a single timeout for all transitions, or individually with an object.
384
+ * @default {
385
+ * enter: theme.transitions.duration.enteringScreen,
386
+ * exit: theme.transitions.duration.leavingScreen,
387
+ * }
388
+ */
389
+ transitionDuration: e.oneOfType([e.number, e.shape({
390
+ appear: e.number,
391
+ enter: e.number,
392
+ exit: e.number
393
+ })]),
394
+ /**
395
+ * Props applied to the transition element.
396
+ * By default, the element is based on this [`Transition`](https://reactcommunity.org/react-transition-group/transition/) component.
397
+ */
398
+ TransitionProps: e.object
399
+ });
400
+ const pe = Y(T)(() => ({
401
+ ...z``
402
+ })), he = (r) => /* @__PURE__ */ n(pe, { ...r });
403
+ export {
404
+ he as default
405
+ };
@@ -0,0 +1 @@
1
+ export { default, type ModalProps } from './Modal';
package/Modal/index.js ADDED
@@ -0,0 +1,4 @@
1
+ import { default as o } from "./Modal.js";
2
+ export {
3
+ o as default
4
+ };