@rc-component/picker 1.2.1 → 1.2.2
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.
|
@@ -104,11 +104,12 @@ export default function PanelBody(props) {
|
|
|
104
104
|
rowNode.push( /*#__PURE__*/React.createElement("td", {
|
|
105
105
|
key: col,
|
|
106
106
|
title: title,
|
|
107
|
-
className: classNames(cellPrefixCls, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
|
|
107
|
+
className: classNames(cellPrefixCls, pickerClassNames === null || pickerClassNames === void 0 ? void 0 : pickerClassNames.popupItem, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
|
|
108
108
|
return isSame(generateConfig, locale, currentDate, date, type);
|
|
109
109
|
})), "".concat(cellPrefixCls, "-in-range"), inRange && !rangeStart && !rangeEnd), "".concat(cellPrefixCls, "-range-start"), rangeStart), "".concat(cellPrefixCls, "-range-end"), rangeEnd), "".concat(prefixCls, "-cell-selected"), !hoverRangeValue &&
|
|
110
110
|
// WeekPicker use row instead
|
|
111
111
|
type !== 'week' && matchValues(currentDate)), getCellClassName(currentDate))),
|
|
112
|
+
style: styles === null || styles === void 0 ? void 0 : styles.popupItem,
|
|
112
113
|
onClick: function onClick() {
|
|
113
114
|
if (!disabled) {
|
|
114
115
|
onSelect(currentDate);
|
|
@@ -43,7 +43,7 @@ export interface SinglePickerPanelProps<DateType extends object = any> extends B
|
|
|
43
43
|
value?: DateType | null;
|
|
44
44
|
onChange?: (date: DateType) => void;
|
|
45
45
|
}
|
|
46
|
-
type PanelSemanticName = 'popupBody' | 'popupContent';
|
|
46
|
+
type PanelSemanticName = 'popupBody' | 'popupContent' | 'popupItem';
|
|
47
47
|
export type PickerPanelProps<DateType extends object = any> = BasePickerPanelProps<DateType> & {
|
|
48
48
|
/** multiple selection. Not support time or datetime picker */
|
|
49
49
|
multiple?: boolean;
|
package/es/interface.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ export type Components<DateType extends object = any> = Partial<Record<InternalM
|
|
|
201
201
|
button?: React.ComponentType<any> | string;
|
|
202
202
|
input?: React.ComponentType<any> | string;
|
|
203
203
|
}>;
|
|
204
|
-
export type SemanticStructure = 'popup' | 'popupBody' | 'popupContent';
|
|
204
|
+
export type SemanticStructure = 'popup' | 'popupBody' | 'popupContent' | 'popupItem';
|
|
205
205
|
export type CustomFormat<DateType> = (value: DateType) => string;
|
|
206
206
|
export type FormatType<DateType = any> = string | CustomFormat<DateType>;
|
|
207
207
|
export type SharedHTMLAttrs = Omit<React.InputHTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'onChange' | 'placeholder' | 'id' | 'onInvalid' | 'disabled' | 'onFocus' | 'onBlur' | 'onSelect' | 'min' | 'max' | 'onKeyDown' | 'size' | 'prefix'>;
|
|
@@ -113,11 +113,12 @@ function PanelBody(props) {
|
|
|
113
113
|
rowNode.push( /*#__PURE__*/React.createElement("td", {
|
|
114
114
|
key: col,
|
|
115
115
|
title: title,
|
|
116
|
-
className: (0, _classnames.default)(cellPrefixCls, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
|
|
116
|
+
className: (0, _classnames.default)(cellPrefixCls, pickerClassNames === null || pickerClassNames === void 0 ? void 0 : pickerClassNames.popupItem, _objectSpread(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, "".concat(cellPrefixCls, "-disabled"), disabled), "".concat(cellPrefixCls, "-hover"), (hoverValue || []).some(function (date) {
|
|
117
117
|
return (0, _dateUtil.isSame)(generateConfig, locale, currentDate, date, type);
|
|
118
118
|
})), "".concat(cellPrefixCls, "-in-range"), inRange && !rangeStart && !rangeEnd), "".concat(cellPrefixCls, "-range-start"), rangeStart), "".concat(cellPrefixCls, "-range-end"), rangeEnd), "".concat(prefixCls, "-cell-selected"), !hoverRangeValue &&
|
|
119
119
|
// WeekPicker use row instead
|
|
120
120
|
type !== 'week' && matchValues(currentDate)), getCellClassName(currentDate))),
|
|
121
|
+
style: styles === null || styles === void 0 ? void 0 : styles.popupItem,
|
|
121
122
|
onClick: function onClick() {
|
|
122
123
|
if (!disabled) {
|
|
123
124
|
onSelect(currentDate);
|
|
@@ -43,7 +43,7 @@ export interface SinglePickerPanelProps<DateType extends object = any> extends B
|
|
|
43
43
|
value?: DateType | null;
|
|
44
44
|
onChange?: (date: DateType) => void;
|
|
45
45
|
}
|
|
46
|
-
type PanelSemanticName = 'popupBody' | 'popupContent';
|
|
46
|
+
type PanelSemanticName = 'popupBody' | 'popupContent' | 'popupItem';
|
|
47
47
|
export type PickerPanelProps<DateType extends object = any> = BasePickerPanelProps<DateType> & {
|
|
48
48
|
/** multiple selection. Not support time or datetime picker */
|
|
49
49
|
multiple?: boolean;
|
package/lib/interface.d.ts
CHANGED
|
@@ -201,7 +201,7 @@ export type Components<DateType extends object = any> = Partial<Record<InternalM
|
|
|
201
201
|
button?: React.ComponentType<any> | string;
|
|
202
202
|
input?: React.ComponentType<any> | string;
|
|
203
203
|
}>;
|
|
204
|
-
export type SemanticStructure = 'popup' | 'popupBody' | 'popupContent';
|
|
204
|
+
export type SemanticStructure = 'popup' | 'popupBody' | 'popupContent' | 'popupItem';
|
|
205
205
|
export type CustomFormat<DateType> = (value: DateType) => string;
|
|
206
206
|
export type FormatType<DateType = any> = string | CustomFormat<DateType>;
|
|
207
207
|
export type SharedHTMLAttrs = Omit<React.InputHTMLAttributes<HTMLDivElement>, 'value' | 'defaultValue' | 'onChange' | 'placeholder' | 'id' | 'onInvalid' | 'disabled' | 'onFocus' | 'onBlur' | 'onSelect' | 'min' | 'max' | 'onKeyDown' | 'size' | 'prefix'>;
|