UNPKG

@cgi-learning-hub/ui

Version:

@cgi-learning-hub/ui is an open-source React component library that implements UI for HUB's features

226 lines (225 loc) 6.37 kB
import * as d from "react"; import { P as s } from "./index-B9vkf41S.js"; import { F as p, G as u, H as f } from "./generateUtilityClasses-B_xKAflz.js"; import { jsx as C } from "react/jsx-runtime"; import { u as m, s as y, c as g } from "./DefaultPropsProvider-BrmlvPWg.js"; import { P as b } from "./Paper-CZXfHfN_.js"; import { c as v } from "./chainPropTypes-D9lkm76m.js"; function N(o) { return u("MuiCard", o); } const $ = p("MuiCard", ["root"]), w = (o) => { const { classes: t } = o; return g({ root: ["root"] }, N, t); }, M = y(b, { name: "MuiCard", slot: "Root" })({ overflow: "hidden" }), h = /* @__PURE__ */ d.forwardRef(function(t, e) { const n = m({ props: t, name: "MuiCard" }), { className: c, raised: r = !1, ...i } = n, a = { ...n, raised: r }, l = w(a); return /* @__PURE__ */ C(M, { className: f(l.root, c), elevation: r ? 8 : void 0, ref: e, ownerState: a, ...i }); }); process.env.NODE_ENV !== "production" && (h.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: s.node, /** * Override or extend the styles applied to the component. */ classes: s.object, /** * @ignore */ className: s.string, /** * If `true`, the card will use raised styling. * @default false */ raised: v(s.bool, (o) => o.raised && o.variant === "outlined" ? new Error('MUI: Combining `raised={true}` with `variant="outlined"` has no effect.') : null), /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]) }); function O(o) { return u("MuiCardActions", o); } const B = p("MuiCardActions", ["root", "spacing"]), S = (o) => { const { classes: t, disableSpacing: e } = o; return g({ root: ["root", !e && "spacing"] }, O, t); }, T = y("div", { name: "MuiCardActions", slot: "Root", overridesResolver: (o, t) => { const { ownerState: e } = o; return [t.root, !e.disableSpacing && t.spacing]; } })({ display: "flex", alignItems: "center", padding: 8, variants: [{ props: { disableSpacing: !1 }, style: { "& > :not(style) ~ :not(style)": { marginLeft: 8 } } }] }), R = /* @__PURE__ */ d.forwardRef(function(t, e) { const n = m({ props: t, name: "MuiCardActions" }), { disableSpacing: c = !1, className: r, ...i } = n, a = { ...n, disableSpacing: c }, l = S(a); return /* @__PURE__ */ C(T, { className: f(l.root, r), ownerState: a, ref: e, ...i }); }); process.env.NODE_ENV !== "production" && (R.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: s.node, /** * Override or extend the styles applied to the component. */ classes: s.object, /** * @ignore */ className: s.string, /** * If `true`, the actions do not have additional margin. * @default false */ disableSpacing: s.bool, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]) }); function j(o) { return u("MuiCardContent", o); } const F = p("MuiCardContent", ["root"]), A = (o) => { const { classes: t } = o; return g({ root: ["root"] }, j, t); }, U = y("div", { name: "MuiCardContent", slot: "Root" })({ padding: 16, "&:last-child": { paddingBottom: 24 } }), x = /* @__PURE__ */ d.forwardRef(function(t, e) { const n = m({ props: t, name: "MuiCardContent" }), { className: c, component: r = "div", ...i } = n, a = { ...n, component: r }, l = A(a); return /* @__PURE__ */ C(U, { as: r, className: f(l.root, c), ownerState: a, ref: e, ...i }); }); process.env.NODE_ENV !== "production" && (x.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: s.node, /** * Override or extend the styles applied to the component. */ classes: s.object, /** * @ignore */ className: s.string, /** * The component used for the root node. * Either a string to use a HTML element or a component. */ component: s.elementType, /** * The system prop that allows defining system overrides as well as additional CSS styles. */ sx: s.oneOfType([s.arrayOf(s.oneOfType([s.func, s.object, s.bool])), s.func, s.object]) }); export { h as C, R as a, x as b, $ as c, B as d, O as e, F as f, N as g, j as h };