@cgi-learning-hub/ui
Version:
@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features
196 lines (195 loc) • 5.2 kB
JavaScript
import * as g from "react";
import { P as o } from "./index-Sy88PpwE.js";
import { F as p, G as d, H as u } from "./identifier-PWESmBq6.js";
import { jsx as f } from "react/jsx-runtime";
import { u as m, s as v, c as D } from "./DefaultPropsProvider-DqazQPtr.js";
import { m as y } from "./memoTheme-DAFDflPY.js";
function C(s) {
return d("MuiDialogActions", s);
}
const $ = p("MuiDialogActions", ["root", "spacing"]), b = (s) => {
const {
classes: t,
disableSpacing: e
} = s;
return D({
root: ["root", !e && "spacing"]
}, C, t);
}, x = v("div", {
name: "MuiDialogActions",
slot: "Root",
overridesResolver: (s, t) => {
const {
ownerState: e
} = s;
return [t.root, !e.disableSpacing && t.spacing];
}
})({
display: "flex",
alignItems: "center",
padding: 8,
justifyContent: "flex-end",
flex: "0 0 auto",
variants: [{
props: ({
ownerState: s
}) => !s.disableSpacing,
style: {
"& > :not(style) ~ :not(style)": {
marginLeft: 8
}
}
}]
}), T = /* @__PURE__ */ g.forwardRef(function(t, e) {
const i = m({
props: t,
name: "MuiDialogActions"
}), {
className: n,
disableSpacing: r = !1,
...l
} = i, a = {
...i,
disableSpacing: r
}, c = b(a);
return /* @__PURE__ */ f(x, {
className: u(c.root, n),
ownerState: a,
ref: e,
...l
});
});
process.env.NODE_ENV !== "production" && (T.propTypes = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* The content of the component.
*/
children: o.node,
/**
* Override or extend the styles applied to the component.
*/
classes: o.object,
/**
* @ignore
*/
className: o.string,
/**
* If `true`, the actions do not have additional margin.
* @default false
*/
disableSpacing: o.bool,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
});
function S(s) {
return d("MuiDialogContent", s);
}
const h = p("MuiDialogContent", ["root", "dividers"]);
function P(s) {
return d("MuiDialogTitle", s);
}
const w = p("MuiDialogTitle", ["root"]), M = (s) => {
const {
classes: t,
dividers: e
} = s;
return D({
root: ["root", e && "dividers"]
}, S, t);
}, N = v("div", {
name: "MuiDialogContent",
slot: "Root",
overridesResolver: (s, t) => {
const {
ownerState: e
} = s;
return [t.root, e.dividers && t.dividers];
}
})(y(({
theme: s
}) => ({
flex: "1 1 auto",
// Add iOS momentum scrolling for iOS < 13.0
WebkitOverflowScrolling: "touch",
overflowY: "auto",
padding: "20px 24px",
variants: [{
props: ({
ownerState: t
}) => t.dividers,
style: {
padding: "16px 24px",
borderTop: `1px solid ${(s.vars || s).palette.divider}`,
borderBottom: `1px solid ${(s.vars || s).palette.divider}`
}
}, {
props: ({
ownerState: t
}) => !t.dividers,
style: {
[`.${w.root} + &`]: {
paddingTop: 0
}
}
}]
}))), A = /* @__PURE__ */ g.forwardRef(function(t, e) {
const i = m({
props: t,
name: "MuiDialogContent"
}), {
className: n,
dividers: r = !1,
...l
} = i, a = {
...i,
dividers: r
}, c = M(a);
return /* @__PURE__ */ f(N, {
className: u(c.root, n),
ownerState: a,
ref: e,
...l
});
});
process.env.NODE_ENV !== "production" && (A.propTypes = {
// ┌────────────────────────────── Warning ──────────────────────────────┐
// │ These PropTypes are generated from the TypeScript type definitions. │
// │ To update them, edit the d.ts file and run `pnpm proptypes`. │
// └─────────────────────────────────────────────────────────────────────┘
/**
* The content of the component.
*/
children: o.node,
/**
* Override or extend the styles applied to the component.
*/
classes: o.object,
/**
* @ignore
*/
className: o.string,
/**
* Display the top and bottom dividers.
* @default false
*/
dividers: o.bool,
/**
* The system prop that allows defining system overrides as well as additional CSS styles.
*/
sx: o.oneOfType([o.arrayOf(o.oneOfType([o.func, o.object, o.bool])), o.func, o.object])
});
export {
T as D,
A as a,
h as b,
S as c,
$ as d,
w as e,
P as f,
C as g
};