@instructure/ui-date-input 8.18.0 → 8.18.1-snapshot.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.
- package/LICENSE.md +27 -0
- package/es/DateInput/index.js +40 -36
- package/lib/DateInput/index.js +40 -36
- package/package.json +18 -17
package/LICENSE.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: The MIT License (MIT)
|
|
3
|
+
category: Getting Started
|
|
4
|
+
order: 9
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
# The MIT License (MIT)
|
|
8
|
+
|
|
9
|
+
Copyright (c) 2015 Instructure, Inc.
|
|
10
|
+
|
|
11
|
+
**Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
12
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
13
|
+
in the Software without restriction, including without limitation the rights
|
|
14
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
15
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
16
|
+
furnished to do so, subject to the following conditions.**
|
|
17
|
+
|
|
18
|
+
The above copyright notice and this permission notice shall be included in all
|
|
19
|
+
copies or substantial portions of the Software.
|
|
20
|
+
|
|
21
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
22
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
23
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
24
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
25
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
26
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
27
|
+
SOFTWARE.
|
package/es/DateInput/index.js
CHANGED
|
@@ -117,11 +117,15 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
117
117
|
}
|
|
118
118
|
|
|
119
119
|
componentDidMount() {
|
|
120
|
-
|
|
120
|
+
var _this$props$makeStyle, _this$props3;
|
|
121
|
+
|
|
122
|
+
(_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
|
|
121
123
|
}
|
|
122
124
|
|
|
123
125
|
componentDidUpdate() {
|
|
124
|
-
|
|
126
|
+
var _this$props$makeStyle2, _this$props4;
|
|
127
|
+
|
|
128
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
125
129
|
}
|
|
126
130
|
|
|
127
131
|
get selectedDateId() {
|
|
@@ -143,9 +147,9 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
143
147
|
|
|
144
148
|
renderMonthNavigationButton() {
|
|
145
149
|
let type = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'prev';
|
|
146
|
-
const _this$
|
|
147
|
-
renderPrevMonthButton = _this$
|
|
148
|
-
renderNextMonthButton = _this$
|
|
150
|
+
const _this$props5 = this.props,
|
|
151
|
+
renderPrevMonthButton = _this$props5.renderPrevMonthButton,
|
|
152
|
+
renderNextMonthButton = _this$props5.renderNextMonthButton;
|
|
149
153
|
const button = type === 'prev' ? renderPrevMonthButton : renderNextMonthButton;
|
|
150
154
|
return button && safeCloneElement(callRenderProp(button), {
|
|
151
155
|
tabIndex: -1
|
|
@@ -175,11 +179,11 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
175
179
|
renderCalendar(_ref3) {
|
|
176
180
|
let getListProps = _ref3.getListProps,
|
|
177
181
|
getOptionProps = _ref3.getOptionProps;
|
|
178
|
-
const _this$
|
|
179
|
-
onRequestRenderNextMonth = _this$
|
|
180
|
-
onRequestRenderPrevMonth = _this$
|
|
181
|
-
renderNavigationLabel = _this$
|
|
182
|
-
renderWeekdayLabels = _this$
|
|
182
|
+
const _this$props6 = this.props,
|
|
183
|
+
onRequestRenderNextMonth = _this$props6.onRequestRenderNextMonth,
|
|
184
|
+
onRequestRenderPrevMonth = _this$props6.onRequestRenderPrevMonth,
|
|
185
|
+
renderNavigationLabel = _this$props6.renderNavigationLabel,
|
|
186
|
+
renderWeekdayLabels = _this$props6.renderWeekdayLabels;
|
|
183
187
|
return jsx(Calendar, getListProps({
|
|
184
188
|
onRequestRenderNextMonth,
|
|
185
189
|
onRequestRenderPrevMonth,
|
|
@@ -196,25 +200,25 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
196
200
|
let getInputProps = _ref4.getInputProps,
|
|
197
201
|
getTriggerProps = _ref4.getTriggerProps;
|
|
198
202
|
|
|
199
|
-
const _this$
|
|
200
|
-
renderLabel = _this$
|
|
201
|
-
value = _this$
|
|
202
|
-
placeholder = _this$
|
|
203
|
-
onBlur = _this$
|
|
204
|
-
isRequired = _this$
|
|
205
|
-
size = _this$
|
|
206
|
-
isInline = _this$
|
|
207
|
-
layout = _this$
|
|
208
|
-
width = _this$
|
|
209
|
-
messages = _this$
|
|
210
|
-
onRequestValidateDate = _this$
|
|
211
|
-
onRequestShowCalendar = _this$
|
|
212
|
-
onRequestHideCalendar = _this$
|
|
213
|
-
onRequestSelectNextDay = _this$
|
|
214
|
-
onRequestSelectPrevDay = _this$
|
|
215
|
-
onRequestRenderNextMonth = _this$
|
|
216
|
-
onRequestRenderPrevMonth = _this$
|
|
217
|
-
rest = _objectWithoutProperties(_this$
|
|
203
|
+
const _this$props7 = this.props,
|
|
204
|
+
renderLabel = _this$props7.renderLabel,
|
|
205
|
+
value = _this$props7.value,
|
|
206
|
+
placeholder = _this$props7.placeholder,
|
|
207
|
+
onBlur = _this$props7.onBlur,
|
|
208
|
+
isRequired = _this$props7.isRequired,
|
|
209
|
+
size = _this$props7.size,
|
|
210
|
+
isInline = _this$props7.isInline,
|
|
211
|
+
layout = _this$props7.layout,
|
|
212
|
+
width = _this$props7.width,
|
|
213
|
+
messages = _this$props7.messages,
|
|
214
|
+
onRequestValidateDate = _this$props7.onRequestValidateDate,
|
|
215
|
+
onRequestShowCalendar = _this$props7.onRequestShowCalendar,
|
|
216
|
+
onRequestHideCalendar = _this$props7.onRequestHideCalendar,
|
|
217
|
+
onRequestSelectNextDay = _this$props7.onRequestSelectNextDay,
|
|
218
|
+
onRequestSelectPrevDay = _this$props7.onRequestSelectPrevDay,
|
|
219
|
+
onRequestRenderNextMonth = _this$props7.onRequestRenderNextMonth,
|
|
220
|
+
onRequestRenderPrevMonth = _this$props7.onRequestRenderPrevMonth,
|
|
221
|
+
rest = _objectWithoutProperties(_this$props7, _excluded);
|
|
218
222
|
|
|
219
223
|
const interaction = this.interaction;
|
|
220
224
|
|
|
@@ -245,11 +249,11 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
245
249
|
}
|
|
246
250
|
|
|
247
251
|
render() {
|
|
248
|
-
const _this$
|
|
249
|
-
placement = _this$
|
|
250
|
-
isShowingCalendar = _this$
|
|
251
|
-
assistiveText = _this$
|
|
252
|
-
styles = _this$
|
|
252
|
+
const _this$props8 = this.props,
|
|
253
|
+
placement = _this$props8.placement,
|
|
254
|
+
isShowingCalendar = _this$props8.isShowingCalendar,
|
|
255
|
+
assistiveText = _this$props8.assistiveText,
|
|
256
|
+
styles = _this$props8.styles;
|
|
253
257
|
const selectedDateId = this.selectedDateId;
|
|
254
258
|
return jsx(Selectable, {
|
|
255
259
|
isShowingOptions: isShowingCalendar,
|
|
@@ -267,12 +271,12 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
267
271
|
getOptionProps = _ref5.getOptionProps,
|
|
268
272
|
getDescriptionProps = _ref5.getDescriptionProps;
|
|
269
273
|
return jsx("span", getRootProps({
|
|
270
|
-
css: styles
|
|
274
|
+
css: styles === null || styles === void 0 ? void 0 : styles.dateInput
|
|
271
275
|
}), this.renderInput({
|
|
272
276
|
getInputProps,
|
|
273
277
|
getTriggerProps
|
|
274
278
|
}), jsx("span", Object.assign({}, getDescriptionProps(), {
|
|
275
|
-
css: styles
|
|
279
|
+
css: styles === null || styles === void 0 ? void 0 : styles.assistiveText
|
|
276
280
|
}), assistiveText), jsx(Popover, {
|
|
277
281
|
placement: placement,
|
|
278
282
|
isShowingContent: isShowingCalendar,
|
package/lib/DateInput/index.js
CHANGED
|
@@ -119,11 +119,15 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
119
119
|
}
|
|
120
120
|
|
|
121
121
|
componentDidMount() {
|
|
122
|
-
|
|
122
|
+
var _this$props$makeStyle, _this$props3;
|
|
123
|
+
|
|
124
|
+
(_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
|
|
123
125
|
}
|
|
124
126
|
|
|
125
127
|
componentDidUpdate() {
|
|
126
|
-
|
|
128
|
+
var _this$props$makeStyle2, _this$props4;
|
|
129
|
+
|
|
130
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
127
131
|
}
|
|
128
132
|
|
|
129
133
|
get selectedDateId() {
|
|
@@ -147,9 +151,9 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
147
151
|
|
|
148
152
|
renderMonthNavigationButton() {
|
|
149
153
|
let type = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : 'prev';
|
|
150
|
-
const _this$
|
|
151
|
-
renderPrevMonthButton = _this$
|
|
152
|
-
renderNextMonthButton = _this$
|
|
154
|
+
const _this$props5 = this.props,
|
|
155
|
+
renderPrevMonthButton = _this$props5.renderPrevMonthButton,
|
|
156
|
+
renderNextMonthButton = _this$props5.renderNextMonthButton;
|
|
153
157
|
const button = type === 'prev' ? renderPrevMonthButton : renderNextMonthButton;
|
|
154
158
|
return button && (0, _safeCloneElement.safeCloneElement)((0, _callRenderProp.callRenderProp)(button), {
|
|
155
159
|
tabIndex: -1
|
|
@@ -179,11 +183,11 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
179
183
|
renderCalendar(_ref3) {
|
|
180
184
|
let getListProps = _ref3.getListProps,
|
|
181
185
|
getOptionProps = _ref3.getOptionProps;
|
|
182
|
-
const _this$
|
|
183
|
-
onRequestRenderNextMonth = _this$
|
|
184
|
-
onRequestRenderPrevMonth = _this$
|
|
185
|
-
renderNavigationLabel = _this$
|
|
186
|
-
renderWeekdayLabels = _this$
|
|
186
|
+
const _this$props6 = this.props,
|
|
187
|
+
onRequestRenderNextMonth = _this$props6.onRequestRenderNextMonth,
|
|
188
|
+
onRequestRenderPrevMonth = _this$props6.onRequestRenderPrevMonth,
|
|
189
|
+
renderNavigationLabel = _this$props6.renderNavigationLabel,
|
|
190
|
+
renderWeekdayLabels = _this$props6.renderWeekdayLabels;
|
|
187
191
|
return (0, _emotion.jsx)(_Calendar.Calendar, getListProps({
|
|
188
192
|
onRequestRenderNextMonth,
|
|
189
193
|
onRequestRenderPrevMonth,
|
|
@@ -199,25 +203,25 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
199
203
|
renderInput(_ref4) {
|
|
200
204
|
let getInputProps = _ref4.getInputProps,
|
|
201
205
|
getTriggerProps = _ref4.getTriggerProps;
|
|
202
|
-
const _this$
|
|
203
|
-
renderLabel = _this$
|
|
204
|
-
value = _this$
|
|
205
|
-
placeholder = _this$
|
|
206
|
-
onBlur = _this$
|
|
207
|
-
isRequired = _this$
|
|
208
|
-
size = _this$
|
|
209
|
-
isInline = _this$
|
|
210
|
-
layout = _this$
|
|
211
|
-
width = _this$
|
|
212
|
-
messages = _this$
|
|
213
|
-
onRequestValidateDate = _this$
|
|
214
|
-
onRequestShowCalendar = _this$
|
|
215
|
-
onRequestHideCalendar = _this$
|
|
216
|
-
onRequestSelectNextDay = _this$
|
|
217
|
-
onRequestSelectPrevDay = _this$
|
|
218
|
-
onRequestRenderNextMonth = _this$
|
|
219
|
-
onRequestRenderPrevMonth = _this$
|
|
220
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
206
|
+
const _this$props7 = this.props,
|
|
207
|
+
renderLabel = _this$props7.renderLabel,
|
|
208
|
+
value = _this$props7.value,
|
|
209
|
+
placeholder = _this$props7.placeholder,
|
|
210
|
+
onBlur = _this$props7.onBlur,
|
|
211
|
+
isRequired = _this$props7.isRequired,
|
|
212
|
+
size = _this$props7.size,
|
|
213
|
+
isInline = _this$props7.isInline,
|
|
214
|
+
layout = _this$props7.layout,
|
|
215
|
+
width = _this$props7.width,
|
|
216
|
+
messages = _this$props7.messages,
|
|
217
|
+
onRequestValidateDate = _this$props7.onRequestValidateDate,
|
|
218
|
+
onRequestShowCalendar = _this$props7.onRequestShowCalendar,
|
|
219
|
+
onRequestHideCalendar = _this$props7.onRequestHideCalendar,
|
|
220
|
+
onRequestSelectNextDay = _this$props7.onRequestSelectNextDay,
|
|
221
|
+
onRequestSelectPrevDay = _this$props7.onRequestSelectPrevDay,
|
|
222
|
+
onRequestRenderNextMonth = _this$props7.onRequestRenderNextMonth,
|
|
223
|
+
onRequestRenderPrevMonth = _this$props7.onRequestRenderPrevMonth,
|
|
224
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props7, _excluded);
|
|
221
225
|
const interaction = this.interaction;
|
|
222
226
|
|
|
223
227
|
const _getTriggerProps = getTriggerProps(),
|
|
@@ -247,11 +251,11 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
247
251
|
}
|
|
248
252
|
|
|
249
253
|
render() {
|
|
250
|
-
const _this$
|
|
251
|
-
placement = _this$
|
|
252
|
-
isShowingCalendar = _this$
|
|
253
|
-
assistiveText = _this$
|
|
254
|
-
styles = _this$
|
|
254
|
+
const _this$props8 = this.props,
|
|
255
|
+
placement = _this$props8.placement,
|
|
256
|
+
isShowingCalendar = _this$props8.isShowingCalendar,
|
|
257
|
+
assistiveText = _this$props8.assistiveText,
|
|
258
|
+
styles = _this$props8.styles;
|
|
255
259
|
const selectedDateId = this.selectedDateId;
|
|
256
260
|
return (0, _emotion.jsx)(_Selectable.Selectable, {
|
|
257
261
|
isShowingOptions: isShowingCalendar,
|
|
@@ -269,12 +273,12 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
269
273
|
getOptionProps = _ref5.getOptionProps,
|
|
270
274
|
getDescriptionProps = _ref5.getDescriptionProps;
|
|
271
275
|
return (0, _emotion.jsx)("span", getRootProps({
|
|
272
|
-
css: styles
|
|
276
|
+
css: styles === null || styles === void 0 ? void 0 : styles.dateInput
|
|
273
277
|
}), this.renderInput({
|
|
274
278
|
getInputProps,
|
|
275
279
|
getTriggerProps
|
|
276
280
|
}), (0, _emotion.jsx)("span", Object.assign({}, getDescriptionProps(), {
|
|
277
|
-
css: styles
|
|
281
|
+
css: styles === null || styles === void 0 ? void 0 : styles.assistiveText
|
|
278
282
|
}), assistiveText), (0, _emotion.jsx)(_Popover.Popover, {
|
|
279
283
|
placement: placement,
|
|
280
284
|
isShowingContent: isShowingCalendar,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-input",
|
|
3
|
-
"version": "8.18.
|
|
3
|
+
"version": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"module": "./es/index.js",
|
|
@@ -23,24 +23,24 @@
|
|
|
23
23
|
},
|
|
24
24
|
"license": "MIT",
|
|
25
25
|
"devDependencies": {
|
|
26
|
-
"@instructure/ui-babel-preset": "8.18.
|
|
27
|
-
"@instructure/ui-test-locator": "8.18.
|
|
28
|
-
"@instructure/ui-test-utils": "8.18.
|
|
26
|
+
"@instructure/ui-babel-preset": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
27
|
+
"@instructure/ui-test-locator": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
28
|
+
"@instructure/ui-test-utils": "8.18.1-snapshot.2+ca4c1ff9d"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@babel/runtime": "^7.13.10",
|
|
32
|
-
"@instructure/emotion": "8.18.
|
|
33
|
-
"@instructure/ui-calendar": "8.18.
|
|
34
|
-
"@instructure/ui-form-field": "8.18.
|
|
35
|
-
"@instructure/ui-icons": "8.18.
|
|
36
|
-
"@instructure/ui-popover": "8.18.
|
|
37
|
-
"@instructure/ui-position": "8.18.
|
|
38
|
-
"@instructure/ui-prop-types": "8.18.
|
|
39
|
-
"@instructure/ui-react-utils": "8.18.
|
|
40
|
-
"@instructure/ui-selectable": "8.18.
|
|
41
|
-
"@instructure/ui-testable": "8.18.
|
|
42
|
-
"@instructure/ui-text-input": "8.18.
|
|
43
|
-
"@instructure/ui-utils": "8.18.
|
|
32
|
+
"@instructure/emotion": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
33
|
+
"@instructure/ui-calendar": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
34
|
+
"@instructure/ui-form-field": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
35
|
+
"@instructure/ui-icons": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
36
|
+
"@instructure/ui-popover": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
37
|
+
"@instructure/ui-position": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
38
|
+
"@instructure/ui-prop-types": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
39
|
+
"@instructure/ui-react-utils": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
40
|
+
"@instructure/ui-selectable": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
41
|
+
"@instructure/ui-testable": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
42
|
+
"@instructure/ui-text-input": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
43
|
+
"@instructure/ui-utils": "8.18.1-snapshot.2+ca4c1ff9d",
|
|
44
44
|
"prop-types": "^15"
|
|
45
45
|
},
|
|
46
46
|
"peerDependencies": {
|
|
@@ -49,5 +49,6 @@
|
|
|
49
49
|
"publishConfig": {
|
|
50
50
|
"access": "public"
|
|
51
51
|
},
|
|
52
|
-
"sideEffects": false
|
|
52
|
+
"sideEffects": false,
|
|
53
|
+
"gitHead": "ca4c1ff9d3985151ae0758fb596de41652dbb58b"
|
|
53
54
|
}
|