@ceed/cds 1.37.1 → 1.39.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/components/DialogFrame/DialogFrame.d.ts +7 -1
- package/dist/components/feedback/Dialog.md +57 -19
- package/dist/components/inputs/DatePicker.md +2 -2
- package/dist/components/inputs/DateRangePicker.md +1 -1
- package/dist/index.browser.js +2 -2
- package/dist/index.browser.js.map +2 -2
- package/dist/index.cjs +23 -4
- package/dist/index.js +23 -4
- package/framer/index.js +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3055,6 +3055,14 @@ var DatePicker = (0, import_react21.forwardRef)((inProps, ref) => {
|
|
|
3055
3055
|
},
|
|
3056
3056
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
3057
3057
|
);
|
|
3058
|
+
const handleInputClick = (0, import_react21.useCallback)(
|
|
3059
|
+
(event) => {
|
|
3060
|
+
if (inputReadOnly && !readOnly) {
|
|
3061
|
+
handleCalendarToggle(event);
|
|
3062
|
+
}
|
|
3063
|
+
},
|
|
3064
|
+
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
3065
|
+
);
|
|
3058
3066
|
const handlePresetClick = (0, import_react21.useCallback)(
|
|
3059
3067
|
(presetValue) => {
|
|
3060
3068
|
handleChange({
|
|
@@ -3106,7 +3114,8 @@ var DatePicker = (0, import_react21.forwardRef)((inProps, ref) => {
|
|
|
3106
3114
|
cursor: isAlphabeticDisplay || inputReadOnly || readOnly ? "default" : "text"
|
|
3107
3115
|
}
|
|
3108
3116
|
},
|
|
3109
|
-
onMouseDown: handleInputMouseDown
|
|
3117
|
+
onMouseDown: handleInputMouseDown,
|
|
3118
|
+
onClick: handleInputClick
|
|
3110
3119
|
}
|
|
3111
3120
|
},
|
|
3112
3121
|
className,
|
|
@@ -5351,6 +5360,14 @@ var DateRangePicker = (0, import_react30.forwardRef)((inProps, ref) => {
|
|
|
5351
5360
|
},
|
|
5352
5361
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
5353
5362
|
);
|
|
5363
|
+
const handleInputClick = (0, import_react30.useCallback)(
|
|
5364
|
+
(event) => {
|
|
5365
|
+
if (inputReadOnly && !readOnly) {
|
|
5366
|
+
handleCalendarToggle(event);
|
|
5367
|
+
}
|
|
5368
|
+
},
|
|
5369
|
+
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
5370
|
+
);
|
|
5354
5371
|
const handlePresetClick = (0, import_react30.useCallback)(
|
|
5355
5372
|
(presetValue) => {
|
|
5356
5373
|
if (props.value !== void 0) {
|
|
@@ -5404,7 +5421,8 @@ var DateRangePicker = (0, import_react30.forwardRef)((inProps, ref) => {
|
|
|
5404
5421
|
cursor: isAlphabeticDisplay || inputReadOnly || readOnly ? "default" : "text"
|
|
5405
5422
|
}
|
|
5406
5423
|
},
|
|
5407
|
-
onMouseDown: handleInputMouseDown
|
|
5424
|
+
onMouseDown: handleInputMouseDown,
|
|
5425
|
+
onClick: handleInputClick
|
|
5408
5426
|
}
|
|
5409
5427
|
},
|
|
5410
5428
|
error,
|
|
@@ -5584,8 +5602,9 @@ var StyledDialogFrame = (0, import_joy42.styled)(ModalDialog, {
|
|
|
5584
5602
|
padding: 0
|
|
5585
5603
|
});
|
|
5586
5604
|
var DialogFrame = import_react33.default.forwardRef((props, ref) => {
|
|
5587
|
-
const { title, children, actions, fullscreen, ...innerProps } = props;
|
|
5588
|
-
|
|
5605
|
+
const { title, children, actions, fullscreen, onSubmit, ...innerProps } = props;
|
|
5606
|
+
const formProps = onSubmit ? { component: "form", onSubmit } : void 0;
|
|
5607
|
+
return /* @__PURE__ */ import_react33.default.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...formProps, ...innerProps }, /* @__PURE__ */ import_react33.default.createElement(DialogTitle_default, null, title), /* @__PURE__ */ import_react33.default.createElement(DialogContent_default, null, children), /* @__PURE__ */ import_react33.default.createElement(DialogActions_default, null, actions));
|
|
5589
5608
|
});
|
|
5590
5609
|
DialogFrame.displayName = "DialogFrame";
|
|
5591
5610
|
|
package/dist/index.js
CHANGED
|
@@ -2935,6 +2935,14 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2935
2935
|
},
|
|
2936
2936
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
2937
2937
|
);
|
|
2938
|
+
const handleInputClick = useCallback9(
|
|
2939
|
+
(event) => {
|
|
2940
|
+
if (inputReadOnly && !readOnly) {
|
|
2941
|
+
handleCalendarToggle(event);
|
|
2942
|
+
}
|
|
2943
|
+
},
|
|
2944
|
+
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
2945
|
+
);
|
|
2938
2946
|
const handlePresetClick = useCallback9(
|
|
2939
2947
|
(presetValue) => {
|
|
2940
2948
|
handleChange({
|
|
@@ -2986,7 +2994,8 @@ var DatePicker = forwardRef6((inProps, ref) => {
|
|
|
2986
2994
|
cursor: isAlphabeticDisplay || inputReadOnly || readOnly ? "default" : "text"
|
|
2987
2995
|
}
|
|
2988
2996
|
},
|
|
2989
|
-
onMouseDown: handleInputMouseDown
|
|
2997
|
+
onMouseDown: handleInputMouseDown,
|
|
2998
|
+
onClick: handleInputClick
|
|
2990
2999
|
}
|
|
2991
3000
|
},
|
|
2992
3001
|
className,
|
|
@@ -5236,6 +5245,14 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
5236
5245
|
},
|
|
5237
5246
|
[inputReadOnly, isAlphabeticDisplay, buttonRef]
|
|
5238
5247
|
);
|
|
5248
|
+
const handleInputClick = useCallback14(
|
|
5249
|
+
(event) => {
|
|
5250
|
+
if (inputReadOnly && !readOnly) {
|
|
5251
|
+
handleCalendarToggle(event);
|
|
5252
|
+
}
|
|
5253
|
+
},
|
|
5254
|
+
[inputReadOnly, readOnly, handleCalendarToggle]
|
|
5255
|
+
);
|
|
5239
5256
|
const handlePresetClick = useCallback14(
|
|
5240
5257
|
(presetValue) => {
|
|
5241
5258
|
if (props.value !== void 0) {
|
|
@@ -5289,7 +5306,8 @@ var DateRangePicker = forwardRef8((inProps, ref) => {
|
|
|
5289
5306
|
cursor: isAlphabeticDisplay || inputReadOnly || readOnly ? "default" : "text"
|
|
5290
5307
|
}
|
|
5291
5308
|
},
|
|
5292
|
-
onMouseDown: handleInputMouseDown
|
|
5309
|
+
onMouseDown: handleInputMouseDown,
|
|
5310
|
+
onClick: handleInputClick
|
|
5293
5311
|
}
|
|
5294
5312
|
},
|
|
5295
5313
|
error,
|
|
@@ -5475,8 +5493,9 @@ var StyledDialogFrame = styled19(ModalDialog, {
|
|
|
5475
5493
|
padding: 0
|
|
5476
5494
|
});
|
|
5477
5495
|
var DialogFrame = React30.forwardRef((props, ref) => {
|
|
5478
|
-
const { title, children, actions, fullscreen, ...innerProps } = props;
|
|
5479
|
-
|
|
5496
|
+
const { title, children, actions, fullscreen, onSubmit, ...innerProps } = props;
|
|
5497
|
+
const formProps = onSubmit ? { component: "form", onSubmit } : void 0;
|
|
5498
|
+
return /* @__PURE__ */ React30.createElement(StyledDialogFrame, { layout: fullscreen ? "fullscreen" : "center", ref, ...formProps, ...innerProps }, /* @__PURE__ */ React30.createElement(DialogTitle_default, null, title), /* @__PURE__ */ React30.createElement(DialogContent_default, null, children), /* @__PURE__ */ React30.createElement(DialogActions_default, null, actions));
|
|
5480
5499
|
});
|
|
5481
5500
|
DialogFrame.displayName = "DialogFrame";
|
|
5482
5501
|
|