@cere/cere-design-system 0.0.2 → 0.0.4
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.mts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +4 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +9 -2
package/dist/index.d.mts
CHANGED
|
@@ -210,7 +210,7 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
|
|
|
210
210
|
}
|
|
211
211
|
declare const ToggleButtonGroup: React.FC<ToggleButtonGroupProps>;
|
|
212
212
|
|
|
213
|
-
interface SwitchProps extends
|
|
213
|
+
interface SwitchProps extends SwitchProps$1 {
|
|
214
214
|
label?: string;
|
|
215
215
|
labelPosition?: 'left' | 'right';
|
|
216
216
|
}
|
|
@@ -483,6 +483,11 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
|
|
|
483
483
|
children: ReactNode;
|
|
484
484
|
dividers?: boolean;
|
|
485
485
|
confirmBeforeClose?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Custom actions to render instead of default actions
|
|
488
|
+
* If provided, showActions is ignored and custom actions are used
|
|
489
|
+
*/
|
|
490
|
+
customActions?: ReactNode;
|
|
486
491
|
}
|
|
487
492
|
declare const Dialog: React.FC<DialogProps>;
|
|
488
493
|
|
package/dist/index.d.ts
CHANGED
|
@@ -210,7 +210,7 @@ interface ToggleButtonGroupProps extends ToggleButtonGroupProps$1 {
|
|
|
210
210
|
}
|
|
211
211
|
declare const ToggleButtonGroup: React.FC<ToggleButtonGroupProps>;
|
|
212
212
|
|
|
213
|
-
interface SwitchProps extends
|
|
213
|
+
interface SwitchProps extends SwitchProps$1 {
|
|
214
214
|
label?: string;
|
|
215
215
|
labelPosition?: 'left' | 'right';
|
|
216
216
|
}
|
|
@@ -483,6 +483,11 @@ interface DialogProps extends Omit<DialogProps$1, 'title'> {
|
|
|
483
483
|
children: ReactNode;
|
|
484
484
|
dividers?: boolean;
|
|
485
485
|
confirmBeforeClose?: boolean;
|
|
486
|
+
/**
|
|
487
|
+
* Custom actions to render instead of default actions
|
|
488
|
+
* If provided, showActions is ignored and custom actions are used
|
|
489
|
+
*/
|
|
490
|
+
customActions?: ReactNode;
|
|
486
491
|
}
|
|
487
492
|
declare const Dialog: React.FC<DialogProps>;
|
|
488
493
|
|
package/dist/index.js
CHANGED
|
@@ -2089,6 +2089,7 @@ var Dialog = ({
|
|
|
2089
2089
|
children,
|
|
2090
2090
|
dividers = true,
|
|
2091
2091
|
confirmBeforeClose = false,
|
|
2092
|
+
customActions,
|
|
2092
2093
|
...dialogProps
|
|
2093
2094
|
}) => {
|
|
2094
2095
|
const handleCloseAttempt = (e) => {
|
|
@@ -2130,9 +2131,9 @@ var Dialog = ({
|
|
|
2130
2131
|
] }),
|
|
2131
2132
|
dividers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.Divider, {}),
|
|
2132
2133
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.DialogContent, { dividers, children }),
|
|
2133
|
-
showActions && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2134
|
+
(showActions || customActions) && /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2134
2135
|
dividers && /* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.Divider, {}),
|
|
2135
|
-
/* @__PURE__ */ (0, import_jsx_runtime26.
|
|
2136
|
+
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(import_material13.DialogActions, { children: customActions || /* @__PURE__ */ (0, import_jsx_runtime26.jsxs)(import_jsx_runtime26.Fragment, { children: [
|
|
2136
2137
|
/* @__PURE__ */ (0, import_jsx_runtime26.jsx)(
|
|
2137
2138
|
import_material13.Button,
|
|
2138
2139
|
{
|
|
@@ -2152,7 +2153,7 @@ var Dialog = ({
|
|
|
2152
2153
|
children: submitLabel
|
|
2153
2154
|
}
|
|
2154
2155
|
)
|
|
2155
|
-
] })
|
|
2156
|
+
] }) })
|
|
2156
2157
|
] })
|
|
2157
2158
|
]
|
|
2158
2159
|
}
|