ctc-component-library 0.1.97 → 0.1.99

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/index.es.js CHANGED
@@ -45217,27 +45217,33 @@ const Z3 = Z.forwardRef(
45217
45217
  style: n = {},
45218
45218
  dataTestId: r = "modal-test-id",
45219
45219
  children: o,
45220
- ...a
45221
- }, i) => {
45222
- const { isOpen: l, onToggle: c } = Zs();
45223
- return l ? /* @__PURE__ */ ce.jsx(
45220
+ arrow: a = !1,
45221
+ arrowPosition: i = "left-center",
45222
+ ...l
45223
+ }, c) => {
45224
+ const { isOpen: u, onToggle: d } = Zs();
45225
+ if (!u)
45226
+ return null;
45227
+ const f = a ? `modal-container--arrow modal-container--arrow-${i}` : "", m = a ? { "--modal-arrow-offset": "35px" } : {};
45228
+ return /* @__PURE__ */ ce.jsx(
45224
45229
  hd,
45225
45230
  {
45226
45231
  "data-test-id": r,
45227
- className: `modal-container ${t}`,
45228
- open: l,
45229
- onCancel: c,
45232
+ className: `modal-container ${f} ${t}`.trim(),
45233
+ open: u,
45234
+ onCancel: d,
45230
45235
  footer: null,
45231
45236
  style: {
45232
- maxWidth: a.width ? "fit-content" : "475px",
45237
+ maxWidth: l.width ? "fit-content" : "475px",
45233
45238
  padding: "0px",
45239
+ ...m,
45234
45240
  ...n
45235
45241
  },
45236
- panelRef: i,
45237
- ...a,
45242
+ panelRef: c,
45243
+ ...l,
45238
45244
  children: o
45239
45245
  }
45240
- ) : null;
45246
+ );
45241
45247
  }
45242
45248
  );
45243
45249
  Z3.displayName = "ModalContent";
@@ -14,11 +14,14 @@ declare const Modal: {
14
14
  ({ isOpen: _isOpen, onOpenChange: _onOpenChange, children }: ModalProps): import("react/jsx-runtime").JSX.Element;
15
15
  displayName: string;
16
16
  };
17
+ export type ModalArrowPosition = 'left-top' | 'left-center' | 'left-bottom' | 'right-top' | 'right-center' | 'right-bottom' | 'top-left' | 'top-center' | 'top-right' | 'bottom-left' | 'bottom-center' | 'bottom-right';
17
18
  interface ModalContentProps extends Omit<ModalAntDProps, 'isOpen'> {
18
19
  maskClosable?: boolean;
19
20
  dataTestId?: string;
20
21
  children: React.ReactNode;
21
22
  onClose?: () => void;
23
+ arrow?: boolean;
24
+ arrowPosition?: ModalArrowPosition;
22
25
  }
23
26
  declare const ModalContent: React.ForwardRefExoticComponent<ModalContentProps & React.RefAttributes<HTMLDivElement>>;
24
27
  interface ModalTitleProps extends React.HTMLAttributes<HTMLElement> {
@@ -1,3 +1,3 @@
1
1
  export { Modal } from './Modal';
2
2
  export type { ModalProps } from './types';
3
- export { Modal as ModalV2, ModalTrigger, ModalContent, ModalTitle, ModalDescription, ModalBody, ModalFooter, ModalCloseButton, ModalActionButton } from './ModalV2';
3
+ export { Modal as ModalV2, ModalTrigger, ModalContent, ModalTitle, ModalDescription, ModalBody, ModalFooter, ModalCloseButton, ModalActionButton, type ModalArrowPosition } from './ModalV2';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "ctc-component-library",
3
3
  "private": false,
4
- "version": "0.1.97",
4
+ "version": "0.1.99",
5
5
  "type": "module",
6
6
  "main": "dist/index.es.js",
7
7
  "module": "dist/index.es.js",