@instructure/ui-date-input 8.11.2-snapshot.7 → 8.11.2-snapshot.70
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/es/DateInput/index.js +40 -35
- package/es/DateInput/props.js +6 -1
- package/es/DateInput/styles.js +2 -2
- package/es/package.json +1 -0
- package/lib/DateInput/index.js +40 -35
- package/lib/DateInput/props.js +6 -1
- package/lib/DateInput/styles.js +2 -2
- package/package.json +17 -17
- package/src/DateInput/index.tsx +4 -6
- package/src/DateInput/props.ts +6 -0
- package/src/DateInput/styles.ts +6 -3
- package/types/DateInput/index.d.ts +4 -1
- package/types/DateInput/index.d.ts.map +1 -1
- package/types/DateInput/props.d.ts +1 -0
- package/types/DateInput/props.d.ts.map +1 -1
- package/types/DateInput/styles.d.ts +2 -2
- package/types/DateInput/styles.d.ts.map +1 -1
package/es/DateInput/index.js
CHANGED
|
@@ -118,11 +118,15 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
componentDidMount() {
|
|
121
|
-
|
|
121
|
+
var _this$props$makeStyle, _this$props3;
|
|
122
|
+
|
|
123
|
+
(_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
|
|
122
124
|
}
|
|
123
125
|
|
|
124
|
-
componentDidUpdate(
|
|
125
|
-
|
|
126
|
+
componentDidUpdate() {
|
|
127
|
+
var _this$props$makeStyle2, _this$props4;
|
|
128
|
+
|
|
129
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
126
130
|
}
|
|
127
131
|
|
|
128
132
|
get selectedDateId() {
|
|
@@ -143,9 +147,9 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
143
147
|
}
|
|
144
148
|
|
|
145
149
|
renderMonthNavigationButton(type = '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
|
|
@@ -177,11 +181,11 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
177
181
|
getListProps,
|
|
178
182
|
getOptionProps
|
|
179
183
|
}) {
|
|
180
|
-
const _this$
|
|
181
|
-
onRequestRenderNextMonth = _this$
|
|
182
|
-
onRequestRenderPrevMonth = _this$
|
|
183
|
-
renderNavigationLabel = _this$
|
|
184
|
-
renderWeekdayLabels = _this$
|
|
184
|
+
const _this$props6 = this.props,
|
|
185
|
+
onRequestRenderNextMonth = _this$props6.onRequestRenderNextMonth,
|
|
186
|
+
onRequestRenderPrevMonth = _this$props6.onRequestRenderPrevMonth,
|
|
187
|
+
renderNavigationLabel = _this$props6.renderNavigationLabel,
|
|
188
|
+
renderWeekdayLabels = _this$props6.renderWeekdayLabels;
|
|
185
189
|
return jsx(Calendar, getListProps({
|
|
186
190
|
onRequestRenderNextMonth,
|
|
187
191
|
onRequestRenderPrevMonth,
|
|
@@ -198,25 +202,25 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
198
202
|
getInputProps,
|
|
199
203
|
getTriggerProps
|
|
200
204
|
}) {
|
|
201
|
-
const _this$
|
|
202
|
-
renderLabel = _this$
|
|
203
|
-
value = _this$
|
|
204
|
-
placeholder = _this$
|
|
205
|
-
onBlur = _this$
|
|
206
|
-
isRequired = _this$
|
|
207
|
-
size = _this$
|
|
208
|
-
isInline = _this$
|
|
209
|
-
layout = _this$
|
|
210
|
-
width = _this$
|
|
211
|
-
messages = _this$
|
|
212
|
-
onRequestValidateDate = _this$
|
|
213
|
-
onRequestShowCalendar = _this$
|
|
214
|
-
onRequestHideCalendar = _this$
|
|
215
|
-
onRequestSelectNextDay = _this$
|
|
216
|
-
onRequestSelectPrevDay = _this$
|
|
217
|
-
onRequestRenderNextMonth = _this$
|
|
218
|
-
onRequestRenderPrevMonth = _this$
|
|
219
|
-
rest = _objectWithoutProperties(_this$
|
|
205
|
+
const _this$props7 = this.props,
|
|
206
|
+
renderLabel = _this$props7.renderLabel,
|
|
207
|
+
value = _this$props7.value,
|
|
208
|
+
placeholder = _this$props7.placeholder,
|
|
209
|
+
onBlur = _this$props7.onBlur,
|
|
210
|
+
isRequired = _this$props7.isRequired,
|
|
211
|
+
size = _this$props7.size,
|
|
212
|
+
isInline = _this$props7.isInline,
|
|
213
|
+
layout = _this$props7.layout,
|
|
214
|
+
width = _this$props7.width,
|
|
215
|
+
messages = _this$props7.messages,
|
|
216
|
+
onRequestValidateDate = _this$props7.onRequestValidateDate,
|
|
217
|
+
onRequestShowCalendar = _this$props7.onRequestShowCalendar,
|
|
218
|
+
onRequestHideCalendar = _this$props7.onRequestHideCalendar,
|
|
219
|
+
onRequestSelectNextDay = _this$props7.onRequestSelectNextDay,
|
|
220
|
+
onRequestSelectPrevDay = _this$props7.onRequestSelectPrevDay,
|
|
221
|
+
onRequestRenderNextMonth = _this$props7.onRequestRenderNextMonth,
|
|
222
|
+
onRequestRenderPrevMonth = _this$props7.onRequestRenderPrevMonth,
|
|
223
|
+
rest = _objectWithoutProperties(_this$props7, _excluded);
|
|
220
224
|
|
|
221
225
|
const interaction = this.interaction;
|
|
222
226
|
|
|
@@ -247,11 +251,11 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
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 jsx(Selectable, {
|
|
257
261
|
isShowingOptions: isShowingCalendar,
|
|
@@ -298,6 +302,7 @@ let DateInput = (_dec = withStyle(generateStyle, null), _dec2 = testable(), _dec
|
|
|
298
302
|
isInline: false,
|
|
299
303
|
layout: 'stacked',
|
|
300
304
|
width: null,
|
|
305
|
+
display: 'inline-block',
|
|
301
306
|
inputRef: el => {},
|
|
302
307
|
placement: 'bottom center',
|
|
303
308
|
isShowingCalendar: false,
|
package/es/DateInput/props.js
CHANGED
|
@@ -97,6 +97,11 @@ const propTypes = {
|
|
|
97
97
|
*/
|
|
98
98
|
width: PropTypes.string,
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Specifies the display property of the container.
|
|
102
|
+
*/
|
|
103
|
+
display: PropTypes.oneOf(['inline-block', 'block']),
|
|
104
|
+
|
|
100
105
|
/**
|
|
101
106
|
* Provides a ref to the underlying input element.
|
|
102
107
|
*/
|
|
@@ -200,5 +205,5 @@ const propTypes = {
|
|
|
200
205
|
*/
|
|
201
206
|
children: ChildrenPropTypes.oneOf([Calendar.Day])
|
|
202
207
|
};
|
|
203
|
-
const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children'];
|
|
208
|
+
const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children'];
|
|
204
209
|
export { propTypes, allowedProps };
|
package/es/DateInput/styles.js
CHANGED
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
* @param {Object} state the state of the component, the style is applied to
|
|
33
33
|
* @return {Object} The final style object, which will be used in the component
|
|
34
34
|
*/
|
|
35
|
-
const generateStyle = () => {
|
|
35
|
+
const generateStyle = (_componentTheme, props) => {
|
|
36
36
|
return {
|
|
37
37
|
dateInput: {
|
|
38
38
|
label: 'dateInput',
|
|
39
|
-
display:
|
|
39
|
+
display: props.display
|
|
40
40
|
},
|
|
41
41
|
assistiveText: {
|
|
42
42
|
label: 'dateInput__assistiveText',
|
package/es/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
package/lib/DateInput/index.js
CHANGED
|
@@ -120,11 +120,15 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
componentDidMount() {
|
|
123
|
-
|
|
123
|
+
var _this$props$makeStyle, _this$props3;
|
|
124
|
+
|
|
125
|
+
(_this$props$makeStyle = (_this$props3 = this.props).makeStyles) === null || _this$props$makeStyle === void 0 ? void 0 : _this$props$makeStyle.call(_this$props3);
|
|
124
126
|
}
|
|
125
127
|
|
|
126
|
-
componentDidUpdate(
|
|
127
|
-
|
|
128
|
+
componentDidUpdate() {
|
|
129
|
+
var _this$props$makeStyle2, _this$props4;
|
|
130
|
+
|
|
131
|
+
(_this$props$makeStyle2 = (_this$props4 = this.props).makeStyles) === null || _this$props$makeStyle2 === void 0 ? void 0 : _this$props$makeStyle2.call(_this$props4);
|
|
128
132
|
}
|
|
129
133
|
|
|
130
134
|
get selectedDateId() {
|
|
@@ -147,9 +151,9 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
147
151
|
}
|
|
148
152
|
|
|
149
153
|
renderMonthNavigationButton(type = '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
|
|
@@ -181,11 +185,11 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
181
185
|
getListProps,
|
|
182
186
|
getOptionProps
|
|
183
187
|
}) {
|
|
184
|
-
const _this$
|
|
185
|
-
onRequestRenderNextMonth = _this$
|
|
186
|
-
onRequestRenderPrevMonth = _this$
|
|
187
|
-
renderNavigationLabel = _this$
|
|
188
|
-
renderWeekdayLabels = _this$
|
|
188
|
+
const _this$props6 = this.props,
|
|
189
|
+
onRequestRenderNextMonth = _this$props6.onRequestRenderNextMonth,
|
|
190
|
+
onRequestRenderPrevMonth = _this$props6.onRequestRenderPrevMonth,
|
|
191
|
+
renderNavigationLabel = _this$props6.renderNavigationLabel,
|
|
192
|
+
renderWeekdayLabels = _this$props6.renderWeekdayLabels;
|
|
189
193
|
return (0, _emotion.jsx)(_Calendar.Calendar, getListProps({
|
|
190
194
|
onRequestRenderNextMonth,
|
|
191
195
|
onRequestRenderPrevMonth,
|
|
@@ -202,25 +206,25 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
202
206
|
getInputProps,
|
|
203
207
|
getTriggerProps
|
|
204
208
|
}) {
|
|
205
|
-
const _this$
|
|
206
|
-
renderLabel = _this$
|
|
207
|
-
value = _this$
|
|
208
|
-
placeholder = _this$
|
|
209
|
-
onBlur = _this$
|
|
210
|
-
isRequired = _this$
|
|
211
|
-
size = _this$
|
|
212
|
-
isInline = _this$
|
|
213
|
-
layout = _this$
|
|
214
|
-
width = _this$
|
|
215
|
-
messages = _this$
|
|
216
|
-
onRequestValidateDate = _this$
|
|
217
|
-
onRequestShowCalendar = _this$
|
|
218
|
-
onRequestHideCalendar = _this$
|
|
219
|
-
onRequestSelectNextDay = _this$
|
|
220
|
-
onRequestSelectPrevDay = _this$
|
|
221
|
-
onRequestRenderNextMonth = _this$
|
|
222
|
-
onRequestRenderPrevMonth = _this$
|
|
223
|
-
rest = (0, _objectWithoutProperties2.default)(_this$
|
|
209
|
+
const _this$props7 = this.props,
|
|
210
|
+
renderLabel = _this$props7.renderLabel,
|
|
211
|
+
value = _this$props7.value,
|
|
212
|
+
placeholder = _this$props7.placeholder,
|
|
213
|
+
onBlur = _this$props7.onBlur,
|
|
214
|
+
isRequired = _this$props7.isRequired,
|
|
215
|
+
size = _this$props7.size,
|
|
216
|
+
isInline = _this$props7.isInline,
|
|
217
|
+
layout = _this$props7.layout,
|
|
218
|
+
width = _this$props7.width,
|
|
219
|
+
messages = _this$props7.messages,
|
|
220
|
+
onRequestValidateDate = _this$props7.onRequestValidateDate,
|
|
221
|
+
onRequestShowCalendar = _this$props7.onRequestShowCalendar,
|
|
222
|
+
onRequestHideCalendar = _this$props7.onRequestHideCalendar,
|
|
223
|
+
onRequestSelectNextDay = _this$props7.onRequestSelectNextDay,
|
|
224
|
+
onRequestSelectPrevDay = _this$props7.onRequestSelectPrevDay,
|
|
225
|
+
onRequestRenderNextMonth = _this$props7.onRequestRenderNextMonth,
|
|
226
|
+
onRequestRenderPrevMonth = _this$props7.onRequestRenderPrevMonth,
|
|
227
|
+
rest = (0, _objectWithoutProperties2.default)(_this$props7, _excluded);
|
|
224
228
|
const interaction = this.interaction;
|
|
225
229
|
|
|
226
230
|
const _getTriggerProps = getTriggerProps(),
|
|
@@ -250,11 +254,11 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
250
254
|
}
|
|
251
255
|
|
|
252
256
|
render() {
|
|
253
|
-
const _this$
|
|
254
|
-
placement = _this$
|
|
255
|
-
isShowingCalendar = _this$
|
|
256
|
-
assistiveText = _this$
|
|
257
|
-
styles = _this$
|
|
257
|
+
const _this$props8 = this.props,
|
|
258
|
+
placement = _this$props8.placement,
|
|
259
|
+
isShowingCalendar = _this$props8.isShowingCalendar,
|
|
260
|
+
assistiveText = _this$props8.assistiveText,
|
|
261
|
+
styles = _this$props8.styles;
|
|
258
262
|
const selectedDateId = this.selectedDateId;
|
|
259
263
|
return (0, _emotion.jsx)(_Selectable.Selectable, {
|
|
260
264
|
isShowingOptions: isShowingCalendar,
|
|
@@ -301,6 +305,7 @@ let DateInput = (_dec = (0, _emotion.withStyle)(_styles.default, null), _dec2 =
|
|
|
301
305
|
isInline: false,
|
|
302
306
|
layout: 'stacked',
|
|
303
307
|
width: null,
|
|
308
|
+
display: 'inline-block',
|
|
304
309
|
inputRef: el => {},
|
|
305
310
|
placement: 'bottom center',
|
|
306
311
|
isShowingCalendar: false,
|
package/lib/DateInput/props.js
CHANGED
|
@@ -113,6 +113,11 @@ const propTypes = {
|
|
|
113
113
|
*/
|
|
114
114
|
width: _propTypes.default.string,
|
|
115
115
|
|
|
116
|
+
/**
|
|
117
|
+
* Specifies the display property of the container.
|
|
118
|
+
*/
|
|
119
|
+
display: _propTypes.default.oneOf(['inline-block', 'block']),
|
|
120
|
+
|
|
116
121
|
/**
|
|
117
122
|
* Provides a ref to the underlying input element.
|
|
118
123
|
*/
|
|
@@ -217,5 +222,5 @@ const propTypes = {
|
|
|
217
222
|
children: _Children.Children.oneOf([_Calendar.Calendar.Day])
|
|
218
223
|
};
|
|
219
224
|
exports.propTypes = propTypes;
|
|
220
|
-
const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children'];
|
|
225
|
+
const allowedProps = ['renderLabel', 'value', 'size', 'placeholder', 'onChange', 'onBlur', 'interaction', 'isRequired', 'isInline', 'assistiveText', 'layout', 'width', 'display', 'inputRef', 'messages', 'placement', 'isShowingCalendar', 'onRequestValidateDate', 'onRequestShowCalendar', 'onRequestHideCalendar', 'onRequestSelectNextDay', 'onRequestSelectPrevDay', 'onRequestRenderNextMonth', 'onRequestRenderPrevMonth', 'renderNavigationLabel', 'renderWeekdayLabels', 'renderNextMonthButton', 'renderPrevMonthButton', 'children'];
|
|
221
226
|
exports.allowedProps = allowedProps;
|
package/lib/DateInput/styles.js
CHANGED
|
@@ -39,11 +39,11 @@ exports.default = void 0;
|
|
|
39
39
|
* @param {Object} state the state of the component, the style is applied to
|
|
40
40
|
* @return {Object} The final style object, which will be used in the component
|
|
41
41
|
*/
|
|
42
|
-
const generateStyle = () => {
|
|
42
|
+
const generateStyle = (_componentTheme, props) => {
|
|
43
43
|
return {
|
|
44
44
|
dateInput: {
|
|
45
45
|
label: 'dateInput',
|
|
46
|
-
display:
|
|
46
|
+
display: props.display
|
|
47
47
|
},
|
|
48
48
|
assistiveText: {
|
|
49
49
|
label: 'dateInput__assistiveText',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@instructure/ui-date-input",
|
|
3
|
-
"version": "8.11.2-snapshot.
|
|
3
|
+
"version": "8.11.2-snapshot.70+9653a896e",
|
|
4
4
|
"description": "A UI component library made by Instructure Inc.",
|
|
5
5
|
"author": "Instructure, Inc. Engineering and Product Design",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -24,24 +24,24 @@
|
|
|
24
24
|
},
|
|
25
25
|
"license": "MIT",
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"@instructure/ui-babel-preset": "8.11.2-snapshot.
|
|
28
|
-
"@instructure/ui-test-locator": "8.11.2-snapshot.
|
|
29
|
-
"@instructure/ui-test-utils": "8.11.2-snapshot.
|
|
27
|
+
"@instructure/ui-babel-preset": "8.11.2-snapshot.70+9653a896e",
|
|
28
|
+
"@instructure/ui-test-locator": "8.11.2-snapshot.70+9653a896e",
|
|
29
|
+
"@instructure/ui-test-utils": "8.11.2-snapshot.70+9653a896e"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@babel/runtime": "^7.13.10",
|
|
33
|
-
"@instructure/emotion": "8.11.2-snapshot.
|
|
34
|
-
"@instructure/ui-calendar": "8.11.2-snapshot.
|
|
35
|
-
"@instructure/ui-form-field": "8.11.2-snapshot.
|
|
36
|
-
"@instructure/ui-icons": "8.11.2-snapshot.
|
|
37
|
-
"@instructure/ui-popover": "8.11.2-snapshot.
|
|
38
|
-
"@instructure/ui-position": "8.11.2-snapshot.
|
|
39
|
-
"@instructure/ui-prop-types": "8.11.2-snapshot.
|
|
40
|
-
"@instructure/ui-react-utils": "8.11.2-snapshot.
|
|
41
|
-
"@instructure/ui-selectable": "8.11.2-snapshot.
|
|
42
|
-
"@instructure/ui-testable": "8.11.2-snapshot.
|
|
43
|
-
"@instructure/ui-text-input": "8.11.2-snapshot.
|
|
44
|
-
"@instructure/ui-utils": "8.11.2-snapshot.
|
|
33
|
+
"@instructure/emotion": "8.11.2-snapshot.70+9653a896e",
|
|
34
|
+
"@instructure/ui-calendar": "8.11.2-snapshot.70+9653a896e",
|
|
35
|
+
"@instructure/ui-form-field": "8.11.2-snapshot.70+9653a896e",
|
|
36
|
+
"@instructure/ui-icons": "8.11.2-snapshot.70+9653a896e",
|
|
37
|
+
"@instructure/ui-popover": "8.11.2-snapshot.70+9653a896e",
|
|
38
|
+
"@instructure/ui-position": "8.11.2-snapshot.70+9653a896e",
|
|
39
|
+
"@instructure/ui-prop-types": "8.11.2-snapshot.70+9653a896e",
|
|
40
|
+
"@instructure/ui-react-utils": "8.11.2-snapshot.70+9653a896e",
|
|
41
|
+
"@instructure/ui-selectable": "8.11.2-snapshot.70+9653a896e",
|
|
42
|
+
"@instructure/ui-testable": "8.11.2-snapshot.70+9653a896e",
|
|
43
|
+
"@instructure/ui-text-input": "8.11.2-snapshot.70+9653a896e",
|
|
44
|
+
"@instructure/ui-utils": "8.11.2-snapshot.70+9653a896e",
|
|
45
45
|
"prop-types": "^15"
|
|
46
46
|
},
|
|
47
47
|
"peerDependencies": {
|
|
@@ -51,5 +51,5 @@
|
|
|
51
51
|
"access": "public"
|
|
52
52
|
},
|
|
53
53
|
"sideEffects": false,
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "9653a896e80ba4d73335225e80807746a232d96d"
|
|
55
55
|
}
|
package/src/DateInput/index.tsx
CHANGED
|
@@ -73,6 +73,7 @@ class DateInput extends Component<DateInputProps> {
|
|
|
73
73
|
isInline: false,
|
|
74
74
|
layout: 'stacked',
|
|
75
75
|
width: null,
|
|
76
|
+
display: 'inline-block',
|
|
76
77
|
// @ts-expect-error ts-migrate(6133) FIXME: 'el' is declared but its value is never read.
|
|
77
78
|
inputRef: (el) => {},
|
|
78
79
|
placement: 'bottom center',
|
|
@@ -98,14 +99,11 @@ class DateInput extends Component<DateInputProps> {
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
componentDidMount() {
|
|
101
|
-
|
|
102
|
-
this.props.makeStyles()
|
|
102
|
+
this.props.makeStyles?.()
|
|
103
103
|
}
|
|
104
104
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
// @ts-expect-error ts-migrate(2722) FIXME: Cannot invoke an object which is possibly 'undefin... Remove this comment to see the full error message
|
|
108
|
-
this.props.makeStyles()
|
|
105
|
+
componentDidUpdate() {
|
|
106
|
+
this.props.makeStyles?.()
|
|
109
107
|
}
|
|
110
108
|
|
|
111
109
|
state = {
|
package/src/DateInput/props.ts
CHANGED
|
@@ -54,6 +54,7 @@ type DateInputOwnProps = {
|
|
|
54
54
|
assistiveText?: string
|
|
55
55
|
layout?: 'stacked' | 'inline'
|
|
56
56
|
width?: string
|
|
57
|
+
display?: 'inline-block' | 'block'
|
|
57
58
|
inputRef?: (...args: any[]) => any
|
|
58
59
|
messages?: FormMessage[]
|
|
59
60
|
placement?: PlacementPropValues
|
|
@@ -141,6 +142,10 @@ const propTypes: PropValidators<PropKeys> = {
|
|
|
141
142
|
* Specifies the width of the input.
|
|
142
143
|
*/
|
|
143
144
|
width: PropTypes.string,
|
|
145
|
+
/**
|
|
146
|
+
* Specifies the display property of the container.
|
|
147
|
+
*/
|
|
148
|
+
display: PropTypes.oneOf(['inline-block', 'block']),
|
|
144
149
|
/**
|
|
145
150
|
* Provides a ref to the underlying input element.
|
|
146
151
|
*/
|
|
@@ -245,6 +250,7 @@ const allowedProps: AllowedPropKeys = [
|
|
|
245
250
|
'assistiveText',
|
|
246
251
|
'layout',
|
|
247
252
|
'width',
|
|
253
|
+
'display',
|
|
248
254
|
'inputRef',
|
|
249
255
|
'messages',
|
|
250
256
|
'placement',
|
package/src/DateInput/styles.ts
CHANGED
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
* SOFTWARE.
|
|
23
23
|
*/
|
|
24
24
|
|
|
25
|
-
import type { DateInputStyle } from './props'
|
|
25
|
+
import type { DateInputProps, DateInputStyle } from './props'
|
|
26
26
|
|
|
27
27
|
/**
|
|
28
28
|
* ---
|
|
@@ -34,11 +34,14 @@ import type { DateInputStyle } from './props'
|
|
|
34
34
|
* @param {Object} state the state of the component, the style is applied to
|
|
35
35
|
* @return {Object} The final style object, which will be used in the component
|
|
36
36
|
*/
|
|
37
|
-
const generateStyle = (
|
|
37
|
+
const generateStyle = (
|
|
38
|
+
_componentTheme: null,
|
|
39
|
+
props: DateInputProps
|
|
40
|
+
): DateInputStyle => {
|
|
38
41
|
return {
|
|
39
42
|
dateInput: {
|
|
40
43
|
label: 'dateInput',
|
|
41
|
-
display:
|
|
44
|
+
display: props.display
|
|
42
45
|
},
|
|
43
46
|
assistiveText: {
|
|
44
47
|
label: 'dateInput__assistiveText',
|
|
@@ -23,6 +23,7 @@ declare class DateInput extends Component<DateInputProps> {
|
|
|
23
23
|
assistiveText?: string | undefined;
|
|
24
24
|
layout?: "stacked" | "inline" | undefined;
|
|
25
25
|
width?: string | undefined;
|
|
26
|
+
display?: "inline-block" | "block" | undefined;
|
|
26
27
|
inputRef?: ((...args: any[]) => any) | undefined;
|
|
27
28
|
messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
|
|
28
29
|
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
@@ -53,6 +54,7 @@ declare class DateInput extends Component<DateInputProps> {
|
|
|
53
54
|
assistiveText?: string | undefined;
|
|
54
55
|
layout?: "stacked" | "inline" | undefined;
|
|
55
56
|
width?: string | undefined;
|
|
57
|
+
display?: "inline-block" | "block" | undefined;
|
|
56
58
|
inputRef?: ((...args: any[]) => any) | undefined;
|
|
57
59
|
messages?: import("@instructure/ui-form-field").FormMessage[] | undefined;
|
|
58
60
|
placement?: import("@instructure/ui-position").PlacementPropValues | undefined;
|
|
@@ -80,6 +82,7 @@ declare class DateInput extends Component<DateInputProps> {
|
|
|
80
82
|
isInline: boolean;
|
|
81
83
|
layout: string;
|
|
82
84
|
width: null;
|
|
85
|
+
display: string;
|
|
83
86
|
inputRef: (el: any) => void;
|
|
84
87
|
placement: string;
|
|
85
88
|
isShowingCalendar: boolean;
|
|
@@ -96,7 +99,7 @@ declare class DateInput extends Component<DateInputProps> {
|
|
|
96
99
|
children: null;
|
|
97
100
|
};
|
|
98
101
|
componentDidMount(): void;
|
|
99
|
-
componentDidUpdate(
|
|
102
|
+
componentDidUpdate(): void;
|
|
100
103
|
state: {
|
|
101
104
|
hasInputRef: boolean;
|
|
102
105
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAgBzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,GAAG,uEAAe;IAEzB,MAAM,CAAC,SAAS
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/DateInput/index.tsx"],"names":[],"mappings":"AAwBA,eAAe;AACf,OAAO,EAAY,SAAS,EAAE,YAAY,EAAE,MAAM,OAAO,CAAA;AAgBzD,OAAO,EAAa,GAAG,EAAE,MAAM,sBAAsB,CAAA;AAKrD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7C;;;;GAIG;AACH,cAEM,SAAU,SAAQ,SAAS,CAAC,cAAc,CAAC;IAC/C,MAAM,CAAC,QAAQ,CAAC,WAAW,eAAc;IAEzC,MAAM,CAAC,GAAG,uEAAe;IAEzB,MAAM,CAAC,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;OAAY;IAC5B,MAAM,CAAC,YAAY;;;;;;;;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E,mBAAmB,CAAC,iBAAiB,CAAC,CAAC,CAAA;AAEhF,aAAK,cAAc,GAAG,cAAc,CAAC,WAAW,GAAG,eAAe,CAAC,CAAA;AAEnE,QAAA,MAAM,SAAS,EAAE,cAAc,CAAC,QAAQ,CAwJvC,CAAA;AAED,QAAA,MAAM,YAAY,EAAE,eA8BnB,CAAA;AAED,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DateInputStyle } from './props';
|
|
1
|
+
import type { DateInputProps, DateInputStyle } from './props';
|
|
2
2
|
/**
|
|
3
3
|
* ---
|
|
4
4
|
* private: true
|
|
@@ -9,6 +9,6 @@ import type { DateInputStyle } from './props';
|
|
|
9
9
|
* @param {Object} state the state of the component, the style is applied to
|
|
10
10
|
* @return {Object} The final style object, which will be used in the component
|
|
11
11
|
*/
|
|
12
|
-
declare const generateStyle: () => DateInputStyle;
|
|
12
|
+
declare const generateStyle: (_componentTheme: null, props: DateInputProps) => DateInputStyle;
|
|
13
13
|
export default generateStyle;
|
|
14
14
|
//# sourceMappingURL=styles.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/DateInput/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;
|
|
1
|
+
{"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/DateInput/styles.ts"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,SAAS,CAAA;AAE7D;;;;;;;;;GASG;AACH,QAAA,MAAM,aAAa,oBACA,IAAI,SACd,cAAc,KACpB,cAWF,CAAA;AAED,eAAe,aAAa,CAAA"}
|