@optilogic/core 1.3.6 → 1.4.0

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.d.cts CHANGED
@@ -1002,17 +1002,25 @@ interface ModalProps {
1002
1002
  */
1003
1003
  footer?: React$1.ReactNode;
1004
1004
  /**
1005
- * Size variant
1005
+ * Size variant. Maps to a `max-width` on the modal frame. For arbitrary
1006
+ * widths, use `contentClassName` to override.
1006
1007
  */
1007
- size?: "sm" | "md" | "lg";
1008
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
1008
1009
  /**
1009
1010
  * Z-index for stacking modals (default: 50)
1010
1011
  */
1011
1012
  zIndex?: number;
1012
1013
  /**
1013
- * Additional class names for modal content
1014
+ * Additional class names for the modal body (the scrollable content area).
1014
1015
  */
1015
1016
  className?: string;
1017
+ /**
1018
+ * Additional class names for the modal frame (the outer card containing
1019
+ * header, body, and footer). Merges with the `size` class — pass width
1020
+ * utilities here to override the named size, e.g. `"max-w-[1200px]"` or
1021
+ * `"w-[80vw] max-w-none"`.
1022
+ */
1023
+ contentClassName?: string;
1016
1024
  }
1017
1025
  /**
1018
1026
  * Modal component
@@ -1033,8 +1041,19 @@ interface ModalProps {
1033
1041
  * <Button variant="primary" onClick={handleConfirm}>Confirm</Button>
1034
1042
  * </footer>
1035
1043
  * </Modal>
1044
+ *
1045
+ * @example
1046
+ * // Custom width override
1047
+ * <Modal
1048
+ * isOpen={open}
1049
+ * onClose={() => setOpen(false)}
1050
+ * title="Report"
1051
+ * contentClassName="max-w-[1200px]"
1052
+ * >
1053
+ * ...
1054
+ * </Modal>
1036
1055
  */
1037
- declare function Modal({ isOpen, onClose, title, children, footer, size, zIndex, className, }: ModalProps): react_jsx_runtime.JSX.Element | null;
1056
+ declare function Modal({ isOpen, onClose, title, children, footer, size, zIndex, className, contentClassName, }: ModalProps): react_jsx_runtime.JSX.Element | null;
1038
1057
  /**
1039
1058
  * ModalButton component
1040
1059
  * @deprecated Use Button component from @optilogic/core instead
package/dist/index.d.ts CHANGED
@@ -1002,17 +1002,25 @@ interface ModalProps {
1002
1002
  */
1003
1003
  footer?: React$1.ReactNode;
1004
1004
  /**
1005
- * Size variant
1005
+ * Size variant. Maps to a `max-width` on the modal frame. For arbitrary
1006
+ * widths, use `contentClassName` to override.
1006
1007
  */
1007
- size?: "sm" | "md" | "lg";
1008
+ size?: "sm" | "md" | "lg" | "xl" | "2xl" | "full";
1008
1009
  /**
1009
1010
  * Z-index for stacking modals (default: 50)
1010
1011
  */
1011
1012
  zIndex?: number;
1012
1013
  /**
1013
- * Additional class names for modal content
1014
+ * Additional class names for the modal body (the scrollable content area).
1014
1015
  */
1015
1016
  className?: string;
1017
+ /**
1018
+ * Additional class names for the modal frame (the outer card containing
1019
+ * header, body, and footer). Merges with the `size` class — pass width
1020
+ * utilities here to override the named size, e.g. `"max-w-[1200px]"` or
1021
+ * `"w-[80vw] max-w-none"`.
1022
+ */
1023
+ contentClassName?: string;
1016
1024
  }
1017
1025
  /**
1018
1026
  * Modal component
@@ -1033,8 +1041,19 @@ interface ModalProps {
1033
1041
  * <Button variant="primary" onClick={handleConfirm}>Confirm</Button>
1034
1042
  * </footer>
1035
1043
  * </Modal>
1044
+ *
1045
+ * @example
1046
+ * // Custom width override
1047
+ * <Modal
1048
+ * isOpen={open}
1049
+ * onClose={() => setOpen(false)}
1050
+ * title="Report"
1051
+ * contentClassName="max-w-[1200px]"
1052
+ * >
1053
+ * ...
1054
+ * </Modal>
1036
1055
  */
1037
- declare function Modal({ isOpen, onClose, title, children, footer, size, zIndex, className, }: ModalProps): react_jsx_runtime.JSX.Element | null;
1056
+ declare function Modal({ isOpen, onClose, title, children, footer, size, zIndex, className, contentClassName, }: ModalProps): react_jsx_runtime.JSX.Element | null;
1038
1057
  /**
1039
1058
  * ModalButton component
1040
1059
  * @deprecated Use Button component from @optilogic/core instead
package/dist/index.js CHANGED
@@ -2091,7 +2091,8 @@ function Modal({
2091
2091
  footer,
2092
2092
  size = "md",
2093
2093
  zIndex = 50,
2094
- className
2094
+ className,
2095
+ contentClassName
2095
2096
  }) {
2096
2097
  React20.useEffect(() => {
2097
2098
  if (!isOpen) return;
@@ -2117,7 +2118,10 @@ function Modal({
2117
2118
  const sizeClasses = {
2118
2119
  sm: "max-w-md",
2119
2120
  md: "max-w-lg",
2120
- lg: "max-w-2xl"
2121
+ lg: "max-w-2xl",
2122
+ xl: "max-w-4xl",
2123
+ "2xl": "max-w-6xl",
2124
+ full: "max-w-[95vw]"
2121
2125
  };
2122
2126
  return /* @__PURE__ */ jsxs(
2123
2127
  "div",
@@ -2135,7 +2139,8 @@ function Modal({
2135
2139
  "bg-card border border-border rounded-lg shadow-lg",
2136
2140
  "flex flex-col",
2137
2141
  "max-h-[90vh]",
2138
- sizeClasses[size]
2142
+ sizeClasses[size],
2143
+ contentClassName
2139
2144
  ),
2140
2145
  onClick: (e) => e.stopPropagation(),
2141
2146
  children: [
@@ -6777,7 +6782,7 @@ function applyTheme(theme, targetElement) {
6777
6782
  );
6778
6783
  element.style.setProperty(
6779
6784
  "--hover",
6780
- `${hslTheme.hover ?? deriveHoverChannels(theme, hslTheme)} / 0.12`
6785
+ `${hslTheme.hover ?? deriveHoverChannels(theme, hslTheme)} / 0.18`
6781
6786
  );
6782
6787
  element.style.setProperty("--chart-1", hslTheme.chart1);
6783
6788
  element.style.setProperty("--chart-2", hslTheme.chart2);