@semcore/date-picker 16.2.4 → 17.0.0-prerelease.18
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/CHANGELOG.md +6 -0
- package/lib/cjs/DatePicker.js +116 -139
- package/lib/cjs/DatePicker.js.map +1 -1
- package/lib/cjs/DateRangeComparator.js +144 -149
- package/lib/cjs/DateRangeComparator.js.map +1 -1
- package/lib/cjs/DateRangePicker.js +86 -101
- package/lib/cjs/DateRangePicker.js.map +1 -1
- package/lib/cjs/MonthDateRangeComparator.js +173 -180
- package/lib/cjs/MonthDateRangeComparator.js.map +1 -1
- package/lib/cjs/MonthPicker.js +70 -87
- package/lib/cjs/MonthPicker.js.map +1 -1
- package/lib/cjs/MonthRangePicker.js +96 -111
- package/lib/cjs/MonthRangePicker.js.map +1 -1
- package/lib/cjs/components/ButtonTrigger.js +12 -11
- package/lib/cjs/components/ButtonTrigger.js.map +1 -1
- package/lib/cjs/components/Calendar.js +409 -466
- package/lib/cjs/components/Calendar.js.map +1 -1
- package/lib/cjs/components/DateRangeComparatorAbstract.js +574 -626
- package/lib/cjs/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/cjs/components/InputTrigger.js +585 -677
- package/lib/cjs/components/InputTrigger.js.map +1 -1
- package/lib/cjs/components/PickerAbstract.js +254 -273
- package/lib/cjs/components/PickerAbstract.js.map +1 -1
- package/lib/cjs/components/RangePickerAbstract.js +407 -439
- package/lib/cjs/components/RangePickerAbstract.js.map +1 -1
- package/lib/cjs/components/index.js +92 -102
- package/lib/cjs/components/index.js.map +1 -1
- package/lib/cjs/index.d.js.map +1 -1
- package/lib/cjs/index.js +15 -15
- package/lib/cjs/index.js.map +1 -1
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js +17 -17
- package/lib/cjs/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/cjs/utils/cronTabScheduler.js +13 -22
- package/lib/cjs/utils/cronTabScheduler.js.map +1 -1
- package/lib/cjs/utils/datesIntersects.js +12 -19
- package/lib/cjs/utils/datesIntersects.js.map +1 -1
- package/lib/cjs/utils/formatDate.js +11 -9
- package/lib/cjs/utils/formatDate.js.map +1 -1
- package/lib/cjs/utils/includesDate.js +11 -16
- package/lib/cjs/utils/includesDate.js.map +1 -1
- package/lib/cjs/utils/isBetweenPlugin.js +6 -6
- package/lib/cjs/utils/isBetweenPlugin.js.map +1 -1
- package/lib/cjs/utils/shortDateRangeFormat.js +29 -33
- package/lib/cjs/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/es6/DatePicker.js +117 -141
- package/lib/es6/DatePicker.js.map +1 -1
- package/lib/es6/DateRangeComparator.js +130 -135
- package/lib/es6/DateRangeComparator.js.map +1 -1
- package/lib/es6/DateRangePicker.js +87 -102
- package/lib/es6/DateRangePicker.js.map +1 -1
- package/lib/es6/MonthDateRangeComparator.js +159 -166
- package/lib/es6/MonthDateRangeComparator.js.map +1 -1
- package/lib/es6/MonthPicker.js +72 -89
- package/lib/es6/MonthPicker.js.map +1 -1
- package/lib/es6/MonthRangePicker.js +97 -112
- package/lib/es6/MonthRangePicker.js.map +1 -1
- package/lib/es6/components/ButtonTrigger.js +4 -3
- package/lib/es6/components/ButtonTrigger.js.map +1 -1
- package/lib/es6/components/Calendar.js +400 -457
- package/lib/es6/components/Calendar.js.map +1 -1
- package/lib/es6/components/DateRangeComparatorAbstract.js +552 -604
- package/lib/es6/components/DateRangeComparatorAbstract.js.map +1 -1
- package/lib/es6/components/InputTrigger.js +568 -660
- package/lib/es6/components/InputTrigger.js.map +1 -1
- package/lib/es6/components/PickerAbstract.js +246 -265
- package/lib/es6/components/PickerAbstract.js.map +1 -1
- package/lib/es6/components/RangePickerAbstract.js +397 -429
- package/lib/es6/components/RangePickerAbstract.js.map +1 -1
- package/lib/es6/components/index.js +74 -85
- package/lib/es6/components/index.js.map +1 -1
- package/lib/es6/index.d.js.map +1 -1
- package/lib/es6/translations/__intergalactic-dynamic-locales.js +16 -16
- package/lib/es6/translations/__intergalactic-dynamic-locales.js.map +1 -1
- package/lib/es6/utils/cronTabScheduler.js +13 -21
- package/lib/es6/utils/cronTabScheduler.js.map +1 -1
- package/lib/es6/utils/datesIntersects.js +10 -18
- package/lib/es6/utils/datesIntersects.js.map +1 -1
- package/lib/es6/utils/formatDate.js +6 -6
- package/lib/es6/utils/formatDate.js.map +1 -1
- package/lib/es6/utils/includesDate.js +10 -15
- package/lib/es6/utils/includesDate.js.map +1 -1
- package/lib/es6/utils/isBetweenPlugin.js +4 -4
- package/lib/es6/utils/isBetweenPlugin.js.map +1 -1
- package/lib/es6/utils/shortDateRangeFormat.js +27 -31
- package/lib/es6/utils/shortDateRangeFormat.js.map +1 -1
- package/lib/esm/DatePicker.mjs +109 -114
- package/lib/esm/DateRangeComparator.mjs +112 -105
- package/lib/esm/DateRangePicker.mjs +76 -80
- package/lib/esm/MonthDateRangeComparator.mjs +141 -134
- package/lib/esm/MonthPicker.mjs +65 -70
- package/lib/esm/MonthRangePicker.mjs +86 -88
- package/lib/esm/components/ButtonTrigger.mjs +4 -3
- package/lib/esm/components/Calendar.mjs +397 -423
- package/lib/esm/components/DateRangeComparatorAbstract.mjs +559 -516
- package/lib/esm/components/InputTrigger.mjs +550 -557
- package/lib/esm/components/PickerAbstract.mjs +249 -244
- package/lib/esm/components/RangePickerAbstract.mjs +400 -384
- package/lib/esm/components/index.mjs +73 -69
- package/lib/esm/translations/__intergalactic-dynamic-locales.mjs +1 -1
- package/lib/esm/utils/cronTabScheduler.mjs +13 -18
- package/lib/esm/utils/datesIntersects.mjs +10 -14
- package/lib/esm/utils/formatDate.mjs +6 -6
- package/lib/esm/utils/includesDate.mjs +10 -13
- package/lib/esm/utils/isBetweenPlugin.mjs +4 -4
- package/lib/esm/utils/shortDateRangeFormat.mjs +27 -27
- package/lib/types/index.d.ts +2 -44
- package/package.json +16 -17
package/lib/esm/MonthPicker.mjs
CHANGED
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
2
|
import { createComponent } from "@semcore/core";
|
|
9
3
|
import dayjs from "dayjs";
|
|
@@ -11,81 +5,82 @@ import React from "react";
|
|
|
11
5
|
import { Next, Prev, Title, Header, Popper, Trigger, InputTrigger } from "./components/index.mjs";
|
|
12
6
|
import { CalendarMonths } from "./components/Calendar.mjs";
|
|
13
7
|
import PickerAbstract from "./components/PickerAbstract.mjs";
|
|
14
|
-
|
|
8
|
+
const dateParts = {
|
|
15
9
|
day: false,
|
|
16
10
|
month: true,
|
|
17
11
|
year: true
|
|
18
12
|
};
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
_this = _callSuper(this, MonthPickerRoot2, [].concat(args));
|
|
27
|
-
_defineProperty(_this, "navigateStep", "year");
|
|
28
|
-
_defineProperty(_this, "keyStep", "month");
|
|
29
|
-
_defineProperty(_this, "keyDiff", {
|
|
13
|
+
class MonthPickerRoot extends PickerAbstract {
|
|
14
|
+
constructor(...args) {
|
|
15
|
+
super(...args);
|
|
16
|
+
_defineProperty(this, "navigateStep", "year");
|
|
17
|
+
_defineProperty(this, "keyStep", "month");
|
|
18
|
+
_defineProperty(this, "keyDiff", {
|
|
30
19
|
ArrowLeft: -1,
|
|
31
20
|
ArrowUp: -3,
|
|
32
21
|
ArrowRight: 1,
|
|
33
22
|
ArrowDown: 3
|
|
34
23
|
});
|
|
35
|
-
return _this;
|
|
36
24
|
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
})
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
}
|
|
25
|
+
getButtonTriggerProps() {
|
|
26
|
+
const {
|
|
27
|
+
value,
|
|
28
|
+
locale
|
|
29
|
+
} = this.asProps;
|
|
30
|
+
return {
|
|
31
|
+
...super.getButtonTriggerProps(),
|
|
32
|
+
placeholder: "Select month",
|
|
33
|
+
children: value ? new Intl.DateTimeFormat(locale, {
|
|
34
|
+
month: "short",
|
|
35
|
+
year: "numeric"
|
|
36
|
+
}).format(dayjs(value).toDate()) : null
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
getTriggerProps() {
|
|
40
|
+
const {
|
|
41
|
+
value,
|
|
42
|
+
onChange,
|
|
43
|
+
onDisplayedPeriodChange,
|
|
44
|
+
locale,
|
|
45
|
+
disabled,
|
|
46
|
+
disabledErrorText,
|
|
47
|
+
getI18nText,
|
|
48
|
+
animationsDisabled
|
|
49
|
+
} = this.asProps;
|
|
50
|
+
return {
|
|
51
|
+
...super.getButtonTriggerProps(),
|
|
52
|
+
value,
|
|
53
|
+
onChange,
|
|
54
|
+
onDisplayedPeriodChange,
|
|
55
|
+
locale,
|
|
56
|
+
parts: dateParts,
|
|
57
|
+
disabledDates: disabled,
|
|
58
|
+
disabledErrorText,
|
|
59
|
+
children: () => /* @__PURE__ */ React.createElement(InputTrigger.SingleDateInput, null),
|
|
60
|
+
getI18nText,
|
|
61
|
+
animationsDisabled,
|
|
62
|
+
unit: this.keyStep
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
getTitleProps() {
|
|
66
|
+
const {
|
|
67
|
+
displayedPeriod,
|
|
68
|
+
locale
|
|
69
|
+
} = this.asProps;
|
|
70
|
+
return {
|
|
71
|
+
...super.getTitleProps(),
|
|
72
|
+
children: new Intl.DateTimeFormat(locale, {
|
|
73
|
+
year: "numeric"
|
|
74
|
+
}).format(dayjs(displayedPeriod).startOf("year").toDate())
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
}
|
|
82
78
|
_defineProperty(MonthPickerRoot, "displayName", "MonthPicker");
|
|
83
|
-
_defineProperty(MonthPickerRoot, "defaultProps",
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
var MonthPicker = createComponent(MonthPickerRoot, {
|
|
79
|
+
_defineProperty(MonthPickerRoot, "defaultProps", (props) => ({
|
|
80
|
+
...PickerAbstract.defaultProps(props),
|
|
81
|
+
children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(MonthPicker.Trigger, null), /* @__PURE__ */ React.createElement(MonthPicker.Popper, null))
|
|
82
|
+
}));
|
|
83
|
+
const MonthPicker = createComponent(MonthPickerRoot, {
|
|
89
84
|
Trigger: InputTrigger,
|
|
90
85
|
ButtonTrigger: Trigger,
|
|
91
86
|
Popper,
|
|
@@ -1,9 +1,3 @@
|
|
|
1
|
-
import _objectSpread from "@babel/runtime/helpers/esm/objectSpread2";
|
|
2
|
-
import _classCallCheck from "@babel/runtime/helpers/esm/classCallCheck";
|
|
3
|
-
import _createClass from "@babel/runtime/helpers/esm/createClass";
|
|
4
|
-
import _callSuper from "@babel/runtime/helpers/esm/callSuper";
|
|
5
|
-
import _superPropGet from "@babel/runtime/helpers/esm/superPropGet";
|
|
6
|
-
import _inherits from "@babel/runtime/helpers/esm/inherits";
|
|
7
1
|
import _defineProperty from "@babel/runtime/helpers/esm/defineProperty";
|
|
8
2
|
import { createComponent } from "@semcore/core";
|
|
9
3
|
import dayjs from "dayjs";
|
|
@@ -12,102 +6,106 @@ import { Period, Next, Prev, Title, Header, Popper, Trigger, InputTrigger } from
|
|
|
12
6
|
import { CalendarMonths } from "./components/Calendar.mjs";
|
|
13
7
|
import RangePickerAbstract, { Reset, Apply } from "./components/RangePickerAbstract.mjs";
|
|
14
8
|
import shortDateRangeFormat from "./utils/shortDateRangeFormat.mjs";
|
|
15
|
-
|
|
9
|
+
const dateParts = {
|
|
16
10
|
day: false,
|
|
17
11
|
month: true,
|
|
18
12
|
year: true
|
|
19
13
|
};
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
_this = _callSuper(this, MonthRangePickerRoot2, [].concat(args));
|
|
28
|
-
_defineProperty(_this, "navigateStep", "year");
|
|
29
|
-
_defineProperty(_this, "keyStep", "month");
|
|
30
|
-
_defineProperty(_this, "keyDiff", {
|
|
14
|
+
class MonthRangePickerRoot extends RangePickerAbstract {
|
|
15
|
+
constructor(...args) {
|
|
16
|
+
super(...args);
|
|
17
|
+
_defineProperty(this, "navigateStep", "year");
|
|
18
|
+
_defineProperty(this, "keyStep", "month");
|
|
19
|
+
_defineProperty(this, "keyDiff", {
|
|
31
20
|
ArrowLeft: -1,
|
|
32
21
|
ArrowUp: -3,
|
|
33
22
|
ArrowRight: 1,
|
|
34
23
|
ArrowDown: 3
|
|
35
24
|
});
|
|
36
|
-
return _this;
|
|
37
25
|
}
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
month: "short",
|
|
67
|
-
year: "numeric"
|
|
68
|
-
})
|
|
69
|
-
});
|
|
70
|
-
}
|
|
71
|
-
}, {
|
|
72
|
-
key: "getTriggerProps",
|
|
73
|
-
value: function getTriggerProps() {
|
|
74
|
-
var _this$asProps2 = this.asProps, visible = _this$asProps2.visible, preselectedValue = _this$asProps2.preselectedValue, onChange = _this$asProps2.onChange, onDisplayedPeriodChange = _this$asProps2.onDisplayedPeriodChange, locale = _this$asProps2.locale, disabled = _this$asProps2.disabled, disabledErrorText = _this$asProps2.disabledErrorText, getI18nText = _this$asProps2.getI18nText, animationsDisabled = _this$asProps2.animationsDisabled;
|
|
75
|
-
var value = visible ? [preselectedValue[0] || this.asProps.value[0], preselectedValue[1] || this.asProps.value[1]] : this.asProps.value;
|
|
76
|
-
return _objectSpread(_objectSpread({}, _superPropGet(MonthRangePickerRoot2, "getButtonTriggerProps", this, 3)([])), {}, {
|
|
77
|
-
value,
|
|
78
|
-
onChange,
|
|
79
|
-
onDisplayedPeriodChange,
|
|
26
|
+
getDefaultPeriods() {
|
|
27
|
+
const {
|
|
28
|
+
getI18nText
|
|
29
|
+
} = this.asProps;
|
|
30
|
+
const today = new Date((/* @__PURE__ */ new Date()).setHours(0, 0, 0, 0));
|
|
31
|
+
return [{
|
|
32
|
+
children: getI18nText("lastMonth"),
|
|
33
|
+
value: [dayjs(today).subtract(1, "month").startOf("month").toDate(), dayjs(today).startOf("month").toDate()]
|
|
34
|
+
}, {
|
|
35
|
+
children: getI18nText("last3Months"),
|
|
36
|
+
value: [dayjs(today).subtract(2, "month").startOf("month").toDate(), dayjs(today).startOf("month").toDate()]
|
|
37
|
+
}, {
|
|
38
|
+
children: getI18nText("last6Months"),
|
|
39
|
+
value: [dayjs(today).subtract(5, "month").startOf("month").toDate(), dayjs(today).startOf("month").toDate()]
|
|
40
|
+
}, {
|
|
41
|
+
children: getI18nText("last12Months"),
|
|
42
|
+
value: [dayjs(today).subtract(11, "month").startOf("month").toDate(), dayjs(today).startOf("month").toDate()]
|
|
43
|
+
}];
|
|
44
|
+
}
|
|
45
|
+
getButtonTriggerProps() {
|
|
46
|
+
const {
|
|
47
|
+
value,
|
|
48
|
+
locale
|
|
49
|
+
} = this.asProps;
|
|
50
|
+
return {
|
|
51
|
+
...super.getButtonTriggerProps(),
|
|
52
|
+
placeholder: "Select month period",
|
|
53
|
+
children: shortDateRangeFormat(value, {
|
|
80
54
|
locale,
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
55
|
+
month: "short",
|
|
56
|
+
year: "numeric"
|
|
57
|
+
})
|
|
58
|
+
};
|
|
59
|
+
}
|
|
60
|
+
getTriggerProps() {
|
|
61
|
+
const {
|
|
62
|
+
visible,
|
|
63
|
+
preselectedValue,
|
|
64
|
+
onChange,
|
|
65
|
+
onDisplayedPeriodChange,
|
|
66
|
+
locale,
|
|
67
|
+
disabled,
|
|
68
|
+
disabledErrorText,
|
|
69
|
+
getI18nText,
|
|
70
|
+
animationsDisabled
|
|
71
|
+
} = this.asProps;
|
|
72
|
+
const value = visible ? [preselectedValue[0] || this.asProps.value[0], preselectedValue[1] || this.asProps.value[1]] : this.asProps.value;
|
|
73
|
+
return {
|
|
74
|
+
...super.getButtonTriggerProps(),
|
|
75
|
+
value,
|
|
76
|
+
onChange,
|
|
77
|
+
onDisplayedPeriodChange,
|
|
78
|
+
locale,
|
|
79
|
+
parts: dateParts,
|
|
80
|
+
disabledDates: disabled,
|
|
81
|
+
disabledErrorText,
|
|
82
|
+
children: () => /* @__PURE__ */ React.createElement(InputTrigger.DateRange, null),
|
|
83
|
+
getI18nText,
|
|
84
|
+
animationsDisabled,
|
|
85
|
+
unit: this.keyStep
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
getTitleProps(props, index) {
|
|
89
|
+
const {
|
|
90
|
+
displayedPeriod,
|
|
91
|
+
locale
|
|
92
|
+
} = this.asProps;
|
|
93
|
+
return {
|
|
94
|
+
...super.getTitleProps(props, index),
|
|
95
|
+
children: new Intl.DateTimeFormat(locale, {
|
|
96
|
+
year: "numeric"
|
|
97
|
+
}).format(dayjs(displayedPeriod).add(index, this.navigateStep).startOf(this.navigateStep).toDate())
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
}
|
|
104
101
|
_defineProperty(MonthRangePickerRoot, "displayName", "MonthRangePicker");
|
|
105
|
-
_defineProperty(MonthRangePickerRoot, "defaultProps",
|
|
106
|
-
return
|
|
102
|
+
_defineProperty(MonthRangePickerRoot, "defaultProps", (props) => {
|
|
103
|
+
return {
|
|
104
|
+
...RangePickerAbstract.defaultProps(props),
|
|
107
105
|
children: /* @__PURE__ */ React.createElement(React.Fragment, null, /* @__PURE__ */ React.createElement(MonthRangePicker.Trigger, null), /* @__PURE__ */ React.createElement(MonthRangePicker.Popper, null))
|
|
108
|
-
}
|
|
106
|
+
};
|
|
109
107
|
});
|
|
110
|
-
|
|
108
|
+
const MonthRangePicker = createComponent(MonthRangePickerRoot, {
|
|
111
109
|
Trigger: InputTrigger,
|
|
112
110
|
ButtonTrigger: Trigger,
|
|
113
111
|
Popper,
|
|
@@ -3,15 +3,16 @@ import BaseTrigger from "@semcore/base-trigger";
|
|
|
3
3
|
import addonTextChildren from "@semcore/core/lib/utils/addonTextChildren";
|
|
4
4
|
import Calendar from "@semcore/icon/Calendar/m";
|
|
5
5
|
import React from "react";
|
|
6
|
-
function ButtonTriggerRoot(
|
|
6
|
+
function ButtonTriggerRoot({
|
|
7
|
+
Children
|
|
8
|
+
}) {
|
|
7
9
|
var _ref = arguments[0];
|
|
8
|
-
var Children = _ref2.Children;
|
|
9
10
|
return /* @__PURE__ */ React.createElement(BaseTrigger, assignProps({}, _ref), /* @__PURE__ */ React.createElement(ButtonTrigger.Addon, {
|
|
10
11
|
tag: Calendar
|
|
11
12
|
}), addonTextChildren(Children, ButtonTrigger.Text, ButtonTrigger.Addon, true));
|
|
12
13
|
}
|
|
13
14
|
ButtonTriggerRoot.displayName = "ButtonTrigger";
|
|
14
|
-
|
|
15
|
+
const ButtonTrigger = createComponent(ButtonTriggerRoot, {
|
|
15
16
|
Text: BaseTrigger.Text,
|
|
16
17
|
Addon: BaseTrigger.Addon
|
|
17
18
|
});
|