baseui 0.0.0-next-9b528b0 → 0.0.0-next-39f6d48

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.
@@ -239,7 +239,7 @@ var Datepicker = /*#__PURE__*/function (_React$Component) {
239
239
  isOpen: true,
240
240
  isPseudoFocused: true,
241
241
  calendarFocused: false
242
- });
242
+ }, _this.props.onOpen);
243
243
  });
244
244
 
245
245
  _defineProperty(_assertThisInitialized(_this), "close", function () {
@@ -191,11 +191,14 @@ export default class Datepicker<T = Date> extends React.Component<
191
191
  };
192
192
 
193
193
  open = () => {
194
- this.setState({
195
- isOpen: true,
196
- isPseudoFocused: true,
197
- calendarFocused: false,
198
- });
194
+ this.setState(
195
+ {
196
+ isOpen: true,
197
+ isPseudoFocused: true,
198
+ calendarFocused: false,
199
+ },
200
+ this.props.onOpen,
201
+ );
199
202
  };
200
203
 
201
204
  close = () => {
@@ -169,6 +169,7 @@ export type DatepickerProps = CalendarProps & {
169
169
  mask?: string | null;
170
170
  mountNode?: HTMLElement;
171
171
  onClose?: () => any;
172
+ onOpen?: () => any;
172
173
  separateRangeInputs?: boolean;
173
174
  startDateLabel?: string;
174
175
  endDateLabel?: string;
@@ -222,6 +222,8 @@ export type DatepickerPropsT<T = Date> = CalendarPropsT<T> & {
222
222
  mountNode?: HTMLElement,
223
223
  /** Called when calendar is closed */
224
224
  onClose?: () => mixed,
225
+ /** Called when calendar is opened */
226
+ onOpen?: () => mixed,
225
227
  mask?: string | null,
226
228
  /** Determines if startDate and endDate should be separated into two input fields. Ignored if `range` is not true. */
227
229
  separateRangeInputs?: boolean,
@@ -151,7 +151,7 @@ export default class Datepicker extends React.Component {
151
151
  isOpen: true,
152
152
  isPseudoFocused: true,
153
153
  calendarFocused: false
154
- });
154
+ }, this.props.onOpen);
155
155
  });
156
156
 
157
157
  _defineProperty(this, "close", () => {
@@ -221,7 +221,7 @@ var Datepicker = /*#__PURE__*/function (_React$Component) {
221
221
  isOpen: true,
222
222
  isPseudoFocused: true,
223
223
  calendarFocused: false
224
- });
224
+ }, _this.props.onOpen);
225
225
  });
226
226
 
227
227
  _defineProperty(_assertThisInitialized(_this), "close", function () {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "baseui",
3
- "version": "0.0.0-next-9b528b0",
3
+ "version": "0.0.0-next-39f6d48",
4
4
  "description": "A React Component library implementing the Base design language",
5
5
  "keywords": [
6
6
  "react",