pcm-shared-components 2.1.409 → 2.1.410
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.
|
@@ -18,11 +18,15 @@ export const openNativeDatePicker = e => {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
-
// Collapsed
|
|
22
|
-
// deliberately small (
|
|
23
|
-
//
|
|
24
|
-
//
|
|
25
|
-
|
|
21
|
+
// Collapsed size for a notice's rich-text content before it needs a "Show More" link -- kept
|
|
22
|
+
// deliberately small (3 text lines, clamped on a clean line boundary with an ellipsis via
|
|
23
|
+
// -webkit-line-clamp) so a long admin-entered notice doesn't dominate the panel's vertical space;
|
|
24
|
+
// anything longer is offered in full through the dialog below. Short content still renders in
|
|
25
|
+
// full with no link at all (overflow-measured, not char-counted). NOTICE_COLLAPSED_MAX_HEIGHT is
|
|
26
|
+
// only a fallback ceiling for engines without line-clamp support, sized generously enough that
|
|
27
|
+
// the line-clamp is what actually cuts in normal browsers.
|
|
28
|
+
const NOTICE_COLLAPSED_LINES = 3;
|
|
29
|
+
const NOTICE_COLLAPSED_MAX_HEIGHT = 130;
|
|
26
30
|
|
|
27
31
|
/**
|
|
28
32
|
* The control for a `notice` field: the admin's sanitized rich text inside a bounded-height
|
|
@@ -77,12 +81,17 @@ const NoticeFieldControl = ({
|
|
|
77
81
|
sx: {
|
|
78
82
|
p: 1.5,
|
|
79
83
|
borderRadius: 1,
|
|
80
|
-
bgcolor: 'action.hover'
|
|
81
|
-
maxHeight: NOTICE_COLLAPSED_MAX_HEIGHT,
|
|
82
|
-
overflow: 'hidden'
|
|
84
|
+
bgcolor: 'action.hover'
|
|
83
85
|
}
|
|
84
86
|
}, /*#__PURE__*/React.createElement("div", {
|
|
85
87
|
ref: contentRef,
|
|
88
|
+
style: {
|
|
89
|
+
display: '-webkit-box',
|
|
90
|
+
WebkitLineClamp: NOTICE_COLLAPSED_LINES,
|
|
91
|
+
WebkitBoxOrient: 'vertical',
|
|
92
|
+
maxHeight: NOTICE_COLLAPSED_MAX_HEIGHT,
|
|
93
|
+
overflow: 'hidden'
|
|
94
|
+
},
|
|
86
95
|
dangerouslySetInnerHTML: {
|
|
87
96
|
__html: contentHtml
|
|
88
97
|
}
|