@ceed/ads 0.0.79 → 0.0.81

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.
@@ -1,8 +1,19 @@
1
1
  import React from "react";
2
2
  import { BreadcrumbsProps } from "@mui/joy";
3
3
  declare function Breadcrumbs(props: {
4
- crumbs: React.ReactElement[];
5
- collapsed?: boolean;
4
+ crumbs: {
5
+ type: "text" | "link";
6
+ label: string;
7
+ linkHref?: string;
8
+ }[];
9
+ frontCrumbCounts?: number;
10
+ backCrumbCounts?: number;
11
+ slots?: {
12
+ link?: React.ElementType;
13
+ } & BreadcrumbsProps["slots"];
14
+ slotProps?: {
15
+ link?: {};
16
+ } & BreadcrumbsProps["slotProps"];
6
17
  } & BreadcrumbsProps): React.JSX.Element;
7
18
  declare namespace Breadcrumbs {
8
19
  var displayName: string;
@@ -1,12 +1,12 @@
1
1
  import React from "react";
2
2
  declare const Modal: import("framer-motion").CustomDomComponent<Pick<import("@mui/base").ModalOwnProps, "children" | "container" | "open" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop"> & {
3
- onClose?: ((event: {}, reason: "escapeKeyDown" | "backdropClick" | "closeClick") => void) | undefined;
3
+ onClose?: ((event: {}, reason: "backdropClick" | "escapeKeyDown" | "closeClick") => void) | undefined;
4
4
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
5
5
  } & import("@mui/joy").ModalSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
6
6
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
7
7
  }, "children" | "container" | "sx" | "onClose" | "open" | "disablePortal" | "keepMounted" | "disableAutoFocus" | "disableEnforceFocus" | "disableRestoreFocus" | "disableEscapeKeyDown" | "disableScrollLock" | "hideBackdrop" | keyof import("@mui/joy").ModalSlotsAndSlotProps>>;
8
8
  export { Modal };
9
- declare const ModalDialog: import("framer-motion").CustomDomComponent<{
9
+ declare const ModalDialog: import("@emotion/styled").StyledComponent<Omit<{
10
10
  children?: React.ReactNode;
11
11
  color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").ModalDialogPropsColorOverrides> | undefined;
12
12
  invertedColors?: boolean | undefined;
@@ -19,7 +19,7 @@ declare const ModalDialog: import("framer-motion").CustomDomComponent<{
19
19
  variant?: import("@mui/types").OverridableStringUnion<import("@mui/joy").VariantProp, import("@mui/joy").ModalDialogPropsVariantOverrides> | undefined;
20
20
  } & import("@mui/joy").ModalDialogSlotsAndSlotProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
21
21
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
22
- }, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "variant" | "sx" | "size" | "orientation" | "invertedColors" | keyof import("@mui/joy").ModalDialogSlotsAndSlotProps>>;
22
+ }, "children" | "layout" | "color" | "maxWidth" | "minWidth" | "variant" | "sx" | "size" | "orientation" | "invertedColors" | keyof import("@mui/joy").ModalDialogSlotsAndSlotProps> & import("framer-motion").MotionProps, "ref"> & React.RefAttributes<HTMLElement | SVGElement> & import("@mui/system").MUIStyledCommonProps<import("@mui/joy").Theme>, {}, {}>;
23
23
  export { ModalDialog };
24
24
  declare const ModalClose: import("framer-motion").CustomDomComponent<{
25
25
  color?: import("@mui/types").OverridableStringUnion<import("@mui/joy").ColorPaletteProp, import("@mui/joy").ModalClosePropsColorOverrides> | undefined;
@@ -8,5 +8,5 @@ declare const Stack: import("framer-motion").CustomDomComponent<{
8
8
  sx?: import("@mui/joy/styles/types").SxProps | undefined;
9
9
  } & import("@mui/joy").StackSlotsAndSlotProps & import("@mui/joy/styles/types").SystemProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
10
10
  ref?: ((instance: HTMLDivElement | null) => void) | React.RefObject<HTMLDivElement> | null | undefined;
11
- }, "children" | "direction" | "sx" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "spacing" | "divider" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps>>;
11
+ }, "children" | "direction" | "sx" | ("p" | "border" | "boxShadow" | "fontWeight" | "zIndex" | "alignContent" | "alignItems" | "alignSelf" | "bottom" | "boxSizing" | "color" | "columnGap" | "display" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "fontFamily" | "fontSize" | "fontStyle" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "height" | "justifyContent" | "justifyItems" | "justifySelf" | "left" | "letterSpacing" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "order" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "right" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "top" | "visibility" | "whiteSpace" | "width" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "overflow" | "padding" | "paddingBlock" | "paddingInline" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "marginX" | "my" | "marginY" | "pt" | "pr" | "pb" | "pl" | "px" | "paddingX" | "py" | "paddingY" | "typography" | "displayPrint") | "divider" | "spacing" | "useFlexGap" | keyof import("@mui/joy").StackSlotsAndSlotProps>>;
12
12
  export { Stack };
package/dist/index.js CHANGED
@@ -222,8 +222,11 @@ Box.displayName = "Box";
222
222
  var Box_default = Box;
223
223
 
224
224
  // src/components/Breadcrumbs/Breadcrumbs.tsx
225
- import React4 from "react";
226
- import { Breadcrumbs as JoyBreadcrumbs } from "@mui/joy";
225
+ import React5 from "react";
226
+ import {
227
+ Breadcrumbs as JoyBreadcrumbs,
228
+ Link as JoyLink
229
+ } from "@mui/joy";
227
230
 
228
231
  // src/components/Menu/Menu.tsx
229
232
  import React3 from "react";
@@ -262,25 +265,67 @@ Dropdown.displayName = "Dropdown";
262
265
  // src/components/Dropdown/index.ts
263
266
  var Dropdown_default = Dropdown;
264
267
 
268
+ // src/components/Typography/Typography.tsx
269
+ import React4 from "react";
270
+ import { Typography as JoyTypography } from "@mui/joy";
271
+ import { motion as motion8 } from "framer-motion";
272
+ var MotionTypography = motion8(JoyTypography);
273
+ var Typography = (props) => {
274
+ return /* @__PURE__ */ React4.createElement(MotionTypography, { ...props });
275
+ };
276
+ Typography.displayName = "Typography";
277
+
278
+ // src/components/Typography/index.ts
279
+ var Typography_default = Typography;
280
+
265
281
  // src/components/Breadcrumbs/Breadcrumbs.tsx
266
- var MAX_CRUMBS = 4;
267
282
  function Breadcrumbs(props) {
268
- const { crumbs, collapsed, size, ...innerProps } = props;
269
- const firstCrumb = crumbs[0];
270
- const restCrumbs = crumbs.length < MAX_CRUMBS ? crumbs.slice(1) : crumbs.slice(-(MAX_CRUMBS - 1));
271
- const collapsingCrumbs = crumbs.slice(1, -(MAX_CRUMBS - 1));
272
- return /* @__PURE__ */ React4.createElement(JoyBreadcrumbs, { size, ...innerProps }, firstCrumb, collapsingCrumbs.length && (collapsed ? /* @__PURE__ */ React4.createElement(Dropdown_default, null, /* @__PURE__ */ React4.createElement(MenuButton, { size, variant: "plain", color: "neutral" }, "\u2022\u2022\u2022"), /* @__PURE__ */ React4.createElement(Menu_default, null, collapsingCrumbs.map((crumb) => /* @__PURE__ */ React4.createElement(MenuItem, null, crumb)))) : collapsingCrumbs), restCrumbs);
283
+ const {
284
+ crumbs,
285
+ size,
286
+ frontCrumbCounts = 1,
287
+ backCrumbCounts = 3,
288
+ slots: { link: Link2, ...restSlots } = { link: JoyLink },
289
+ slotProps: { link: linkProps, ...restSlotProps } = {
290
+ link: { color: "neutral" }
291
+ },
292
+ ...innerProps
293
+ } = props;
294
+ const _backCrumbCounts = Math.max(1, backCrumbCounts);
295
+ const Crumb = (props2) => {
296
+ if (props2.type === "link" && Link2) {
297
+ return /* @__PURE__ */ React5.createElement(Link2, { to: props2.linkHref, href: props2.linkHref, ...linkProps }, props2.label);
298
+ } else {
299
+ return /* @__PURE__ */ React5.createElement(Typography_default, null, props2.label);
300
+ }
301
+ };
302
+ const frontCrumbs = crumbs.slice(0, frontCrumbCounts).map((crumb) => /* @__PURE__ */ React5.createElement(Crumb, { ...crumb }));
303
+ const backCrumbs = (frontCrumbCounts + _backCrumbCounts > crumbs.length ? crumbs.slice(frontCrumbCounts) : crumbs.slice(-_backCrumbCounts)).map((crumb) => /* @__PURE__ */ React5.createElement(Crumb, { ...crumb }));
304
+ const collapsedCrumbs = crumbs.slice(frontCrumbCounts, -_backCrumbCounts).map((crumb) => /* @__PURE__ */ React5.createElement(MenuItem, null, /* @__PURE__ */ React5.createElement(Crumb, { ...crumb })));
305
+ console.log(collapsedCrumbs);
306
+ return /* @__PURE__ */ React5.createElement(
307
+ JoyBreadcrumbs,
308
+ {
309
+ size,
310
+ slots: restSlots,
311
+ slotProps: restSlotProps,
312
+ ...innerProps
313
+ },
314
+ frontCrumbs,
315
+ collapsedCrumbs.length && /* @__PURE__ */ React5.createElement(Dropdown_default, null, /* @__PURE__ */ React5.createElement(MenuButton, { variant: "plain" }, "..."), /* @__PURE__ */ React5.createElement(Menu_default, null, collapsedCrumbs)),
316
+ backCrumbs
317
+ );
273
318
  }
274
319
  Breadcrumbs.displayName = "Breadcrumbs";
275
320
 
276
321
  // src/components/Button/Button.tsx
277
- import React5, { forwardRef } from "react";
322
+ import React6, { forwardRef } from "react";
278
323
  import { Button as JoyButton } from "@mui/joy";
279
- import { motion as motion8 } from "framer-motion";
280
- var MotionButton = motion8(JoyButton);
324
+ import { motion as motion9 } from "framer-motion";
325
+ var MotionButton = motion9(JoyButton);
281
326
  var Button = forwardRef(
282
327
  (props, ref) => {
283
- return /* @__PURE__ */ React5.createElement(
328
+ return /* @__PURE__ */ React6.createElement(
284
329
  MotionButton,
285
330
  {
286
331
  ref,
@@ -301,19 +346,6 @@ import ChevronLeftIcon from "@mui/icons-material/esm/ChevronLeft.js";
301
346
  import ChevronRightIcon from "@mui/icons-material/esm/ChevronRight.js";
302
347
  import { AnimatePresence, motion as motion11 } from "framer-motion";
303
348
 
304
- // src/components/Typography/Typography.tsx
305
- import React6 from "react";
306
- import { Typography as JoyTypography } from "@mui/joy";
307
- import { motion as motion9 } from "framer-motion";
308
- var MotionTypography = motion9(JoyTypography);
309
- var Typography = (props) => {
310
- return /* @__PURE__ */ React6.createElement(MotionTypography, { ...props });
311
- };
312
- Typography.displayName = "Typography";
313
-
314
- // src/components/Typography/index.ts
315
- var Typography_default = Typography;
316
-
317
349
  // src/components/Calendar/utils/index.ts
318
350
  var getCalendarDates = (date) => {
319
351
  const dates = [];
@@ -1716,7 +1748,7 @@ var StyledPopper = styled5(Popper, {
1716
1748
  name: "DatePicker",
1717
1749
  slot: "popper"
1718
1750
  })(({ theme }) => ({
1719
- zIndex: theme.zIndex.popup
1751
+ zIndex: theme.zIndex.tooltip
1720
1752
  }));
1721
1753
  var CalendarSheet = styled5(Sheet_default, {
1722
1754
  name: "DatePicker",
@@ -1910,14 +1942,14 @@ var StyledPopper2 = styled6(Popper2, {
1910
1942
  name: "DateRangePicker",
1911
1943
  slot: "popper"
1912
1944
  })(({ theme }) => ({
1913
- zIndex: theme.zIndex.popup
1945
+ zIndex: theme.zIndex.tooltip
1914
1946
  }));
1915
1947
  var CalendarSheet2 = styled6(Sheet_default, {
1916
1948
  name: "DateRangePicker",
1917
1949
  slot: "sheet",
1918
1950
  overridesResolver: (props, styles) => styles.root
1919
1951
  })(({ theme }) => ({
1920
- zIndex: theme.zIndex.popup,
1952
+ zIndex: theme.zIndex.tooltip,
1921
1953
  width: "264px",
1922
1954
  boxShadow: theme.shadow.md,
1923
1955
  borderRadius: theme.radius.md
@@ -2144,14 +2176,18 @@ import {
2144
2176
  Modal as JoyModal,
2145
2177
  ModalDialog as JoyModalDialog,
2146
2178
  ModalClose as JoyModalClose,
2147
- ModalOverflow as JoyModalOverflow
2179
+ ModalOverflow as JoyModalOverflow,
2180
+ styled as styled9
2148
2181
  } from "@mui/joy";
2149
2182
  import { motion as motion19 } from "framer-motion";
2150
2183
  var MotionModal = motion19(JoyModal);
2151
2184
  var Modal = MotionModal;
2152
2185
  Modal.displayName = "Modal";
2153
2186
  var MotionModalDialog = motion19(JoyModalDialog);
2154
- var ModalDialog = MotionModalDialog;
2187
+ var StyledModalDialog = styled9(MotionModalDialog)({
2188
+ padding: 0
2189
+ });
2190
+ var ModalDialog = StyledModalDialog;
2155
2191
  ModalDialog.displayName = "ModalDialog";
2156
2192
  var MotionModalClose = motion19(JoyModalClose);
2157
2193
  var ModalClose = MotionModalClose;
@@ -2161,13 +2197,13 @@ var ModalOverflow = MotionModalOverflow;
2161
2197
  ModalOverflow.displayName = "ModalOverflow";
2162
2198
  function ModalFrame(props) {
2163
2199
  const { title, children, ...innerProps } = props;
2164
- return /* @__PURE__ */ React17.createElement(ModalDialog, { ...innerProps }, /* @__PURE__ */ React17.createElement(ModalClose, null), /* @__PURE__ */ React17.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React17.createElement(DialogContent_default, null, children));
2200
+ return /* @__PURE__ */ React17.createElement(StyledModalDialog, { ...innerProps }, /* @__PURE__ */ React17.createElement(ModalClose, null), /* @__PURE__ */ React17.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React17.createElement(DialogContent_default, null, children));
2165
2201
  }
2166
2202
  ModalFrame.displayName = "ModalFrame";
2167
2203
 
2168
2204
  // src/components/DialogFrame/DialogFrame.tsx
2169
- import { styled as styled9 } from "@mui/joy";
2170
- var StyledDialogFrame = styled9(ModalDialog)(({ theme }) => ({
2205
+ import { styled as styled10 } from "@mui/joy";
2206
+ var StyledDialogFrame = styled10(ModalDialog)(({ theme }) => ({
2171
2207
  padding: 0
2172
2208
  }));
2173
2209
  function DialogFrame(props) {
@@ -2225,20 +2261,20 @@ Grid.displayName = "Grid";
2225
2261
  import React21, { forwardRef as forwardRef6, useCallback as useCallback6, useMemo as useMemo5, useState as useState6 } from "react";
2226
2262
  import { IMaskInput as IMaskInput3, IMask as IMask3 } from "react-imask";
2227
2263
  import CalendarTodayIcon3 from "@mui/icons-material/esm/CalendarToday.js";
2228
- import { styled as styled10 } from "@mui/joy";
2264
+ import { styled as styled11 } from "@mui/joy";
2229
2265
  import { FocusTrap as FocusTrap3, ClickAwayListener as ClickAwayListener3, Popper as Popper3 } from "@mui/base";
2230
- var StyledPopper3 = styled10(Popper3, {
2266
+ var StyledPopper3 = styled11(Popper3, {
2231
2267
  name: "MonthRangePicker",
2232
2268
  slot: "popper"
2233
2269
  })(({ theme }) => ({
2234
- zIndex: theme.zIndex.popup
2270
+ zIndex: theme.zIndex.tooltip
2235
2271
  }));
2236
- var CalendarSheet3 = styled10(Sheet_default, {
2272
+ var CalendarSheet3 = styled11(Sheet_default, {
2237
2273
  name: "MonthRangePicker",
2238
2274
  slot: "sheet",
2239
2275
  overridesResolver: (props, styles) => styles.root
2240
2276
  })(({ theme }) => ({
2241
- zIndex: theme.zIndex.popup,
2277
+ zIndex: theme.zIndex.tooltip,
2242
2278
  width: "264px",
2243
2279
  boxShadow: theme.shadow.md,
2244
2280
  borderRadius: theme.radius.md
@@ -2486,12 +2522,12 @@ Select.displayName = "Select";
2486
2522
  import React24 from "react";
2487
2523
  import {
2488
2524
  Switch as JoySwitch,
2489
- styled as styled11,
2525
+ styled as styled12,
2490
2526
  switchClasses
2491
2527
  } from "@mui/joy";
2492
2528
  import { motion as motion25 } from "framer-motion";
2493
2529
  var MotionSwitch = motion25(JoySwitch);
2494
- var StyledThumb = styled11(motion25.div)({
2530
+ var StyledThumb = styled12(motion25.div)({
2495
2531
  "--Icon-fontSize": "calc(var(--Switch-thumbSize) * 0.75)",
2496
2532
  display: "inline-flex",
2497
2533
  justifyContent: "center",