@telus-uds/components-web 2.6.0 → 2.8.0
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 +36 -2
- package/component-docs.json +12 -10
- package/lib/Autocomplete/Autocomplete.js +6 -5
- package/lib/DatePicker/CalendarContainer.js +10 -25
- package/lib/DatePicker/DatePicker.js +104 -57
- package/lib/DatePicker/reactDatesCss.js +1 -1
- package/lib/ExpandCollapseMini/ExpandCollapseMini.js +3 -1
- package/lib/Footnote/Footnote.js +6 -2
- package/lib/Listbox/ListboxItem.js +3 -2
- package/lib/Listbox/ListboxOverlay.js +3 -1
- package/lib/NavigationBar/NavigationItem.js +5 -4
- package/lib/StoryCard/StoryCard.js +3 -6
- package/lib/Table/Table.js +1 -1
- package/lib/WebPortal/WebPortal.js +46 -0
- package/lib/WebPortal/index.js +13 -0
- package/lib/WebVideo/WebVideo.js +1 -1
- package/lib/baseExports.js +6 -0
- package/lib/index.js +10 -1
- package/lib-module/Autocomplete/Autocomplete.js +6 -5
- package/lib-module/DatePicker/CalendarContainer.js +10 -25
- package/lib-module/DatePicker/DatePicker.js +103 -58
- package/lib-module/DatePicker/reactDatesCss.js +1 -1
- package/lib-module/ExpandCollapseMini/ExpandCollapseMini.js +3 -1
- package/lib-module/Footnote/Footnote.js +6 -2
- package/lib-module/Listbox/ListboxItem.js +3 -2
- package/lib-module/Listbox/ListboxOverlay.js +3 -2
- package/lib-module/NavigationBar/NavigationItem.js +6 -3
- package/lib-module/StoryCard/StoryCard.js +3 -6
- package/lib-module/Table/Table.js +1 -1
- package/lib-module/WebPortal/WebPortal.js +35 -0
- package/lib-module/WebPortal/index.js +2 -0
- package/lib-module/WebVideo/WebVideo.js +1 -1
- package/lib-module/baseExports.js +1 -1
- package/lib-module/index.js +1 -0
- package/package.json +5 -4
- package/src/Autocomplete/Autocomplete.jsx +3 -2
- package/src/DatePicker/CalendarContainer.jsx +10 -25
- package/src/DatePicker/DatePicker.jsx +99 -65
- package/src/DatePicker/reactDatesCss.js +4 -67
- package/src/ExpandCollapseMini/ExpandCollapseMini.jsx +1 -1
- package/src/Footnote/Footnote.jsx +6 -2
- package/src/Listbox/ListboxItem.jsx +3 -2
- package/src/Listbox/ListboxOverlay.jsx +4 -3
- package/src/NavigationBar/NavigationItem.jsx +5 -3
- package/src/StoryCard/StoryCard.jsx +3 -7
- package/src/Table/Table.jsx +1 -1
- package/src/WebPortal/WebPortal.jsx +36 -0
- package/src/WebPortal/index.js +3 -0
- package/src/WebVideo/WebVideo.jsx +1 -1
- package/src/baseExports.js +2 -1
- package/src/index.js +1 -0
- package/types/WebVideo.d.ts +2 -2
package/lib/Table/Table.js
CHANGED
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _react = require("react");
|
|
9
|
+
|
|
10
|
+
var _reactDom = _interopRequireDefault(require("react-dom"));
|
|
11
|
+
|
|
12
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* WebPortal component renders its children in a separate portal container appended to the document body.
|
|
16
|
+
*
|
|
17
|
+
* While `@gorhom/portal` works well for a lot of use-cases, there are some issues with it, particularly around
|
|
18
|
+
* reading context values (see issues below). For web-only components, it is safe to replace `Portal` from `@gorhom/portal`
|
|
19
|
+
* to `WebPortal` to solve such issues
|
|
20
|
+
*
|
|
21
|
+
* https://github.com/gorhom/react-native-portal/issues/34
|
|
22
|
+
* https://github.com/gorhom/react-native-portal/issues/2
|
|
23
|
+
* https://github.com/gorhom/react-native-portal/issues/3
|
|
24
|
+
* https://github.com/gorhom/react-native-portal/issues/31
|
|
25
|
+
*
|
|
26
|
+
* @component
|
|
27
|
+
* @param {object} props - The component props.
|
|
28
|
+
* @param {React.ReactNode} props.children - The content to render within the portal.
|
|
29
|
+
* @returns {React.ReactPortal} The React portal component.
|
|
30
|
+
*/
|
|
31
|
+
const WebPortal = _ref => {
|
|
32
|
+
let {
|
|
33
|
+
children
|
|
34
|
+
} = _ref;
|
|
35
|
+
const portalContainer = document.createElement('div');
|
|
36
|
+
(0, _react.useEffect)(() => {
|
|
37
|
+
document.body.appendChild(portalContainer);
|
|
38
|
+
return () => {
|
|
39
|
+
document.body.removeChild(portalContainer);
|
|
40
|
+
};
|
|
41
|
+
}, [portalContainer]);
|
|
42
|
+
return /*#__PURE__*/_reactDom.default.createPortal(children, portalContainer);
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
var _default = WebPortal;
|
|
46
|
+
exports.default = _default;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
|
|
8
|
+
var _WebPortal = _interopRequireDefault(require("./WebPortal"));
|
|
9
|
+
|
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
+
|
|
12
|
+
var _default = _WebPortal.default;
|
|
13
|
+
exports.default = _default;
|
package/lib/WebVideo/WebVideo.js
CHANGED
|
@@ -157,7 +157,7 @@ const VideoProps = { ...selectedSystemPropTypes,
|
|
|
157
157
|
/**
|
|
158
158
|
* The splash screen UI's language as an ISO language code. It currently supports English and French.
|
|
159
159
|
*/
|
|
160
|
-
copy: _propTypes.default.oneOf(['en', 'fr'])
|
|
160
|
+
copy: _propTypes.default.oneOf(['en', 'fr']),
|
|
161
161
|
|
|
162
162
|
/**
|
|
163
163
|
* A function to be run when the play button is pressed on the video splash screen and the video is ready to play.
|
package/lib/baseExports.js
CHANGED
|
@@ -345,6 +345,12 @@ Object.defineProperty(exports, "useResponsiveProp", {
|
|
|
345
345
|
return _componentsBase.useResponsiveProp;
|
|
346
346
|
}
|
|
347
347
|
});
|
|
348
|
+
Object.defineProperty(exports, "useSetTheme", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function () {
|
|
351
|
+
return _componentsBase.useSetTheme;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
348
354
|
Object.defineProperty(exports, "useViewport", {
|
|
349
355
|
enumerable: true,
|
|
350
356
|
get: function () {
|
package/lib/index.js
CHANGED
|
@@ -43,7 +43,8 @@ var _exportNames = {
|
|
|
43
43
|
TermsAndConditions: true,
|
|
44
44
|
NavigationBar: true,
|
|
45
45
|
Progress: true,
|
|
46
|
-
SkeletonProvider: true
|
|
46
|
+
SkeletonProvider: true,
|
|
47
|
+
WebPortal: true
|
|
47
48
|
};
|
|
48
49
|
Object.defineProperty(exports, "Autocomplete", {
|
|
49
50
|
enumerable: true,
|
|
@@ -267,6 +268,12 @@ Object.defineProperty(exports, "WaffleGrid", {
|
|
|
267
268
|
return _WaffleGrid.default;
|
|
268
269
|
}
|
|
269
270
|
});
|
|
271
|
+
Object.defineProperty(exports, "WebPortal", {
|
|
272
|
+
enumerable: true,
|
|
273
|
+
get: function () {
|
|
274
|
+
return _WebPortal.default;
|
|
275
|
+
}
|
|
276
|
+
});
|
|
270
277
|
Object.defineProperty(exports, "WebVideo", {
|
|
271
278
|
enumerable: true,
|
|
272
279
|
get: function () {
|
|
@@ -364,6 +371,8 @@ var _Progress = _interopRequireDefault(require("./Progress"));
|
|
|
364
371
|
|
|
365
372
|
var _SkeletonProvider = _interopRequireDefault(require("./SkeletonProvider"));
|
|
366
373
|
|
|
374
|
+
var _WebPortal = _interopRequireDefault(require("./WebPortal"));
|
|
375
|
+
|
|
367
376
|
var _baseExports = require("./baseExports");
|
|
368
377
|
|
|
369
378
|
Object.keys(_baseExports).forEach(function (key) {
|
|
@@ -12,10 +12,7 @@ import dictionary from './dictionary';
|
|
|
12
12
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
13
13
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
14
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
15
|
-
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, inputSupportsProps, textInputHandlerProps, textInputProps]);
|
|
16
|
-
const inputTokens = {
|
|
17
|
-
paddingLeft: INPUT_LEFT_PADDING
|
|
18
|
-
}; // Returns JSX to display a bold string `str` with unbolded occurrences of the
|
|
15
|
+
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs, inputSupportsProps, textInputHandlerProps, textInputProps]); // Returns JSX to display a bold string `str` with unbolded occurrences of the
|
|
19
16
|
// `substring` based in the array of `matchIndexes` provided
|
|
20
17
|
|
|
21
18
|
const highlightAllMatches = function (str) {
|
|
@@ -97,7 +94,10 @@ const Autocomplete = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
97
94
|
|
|
98
95
|
const [currentItems, setCurrentItems] = useState(initialItems); // We need to store the current value as well to be able to highlight it
|
|
99
96
|
|
|
100
|
-
const [currentValue, setCurrentValue] = useState(value ?? initialValue);
|
|
97
|
+
const [currentValue, setCurrentValue] = useState(value ?? initialValue);
|
|
98
|
+
const inputTokens = {
|
|
99
|
+
paddingLeft: INPUT_LEFT_PADDING
|
|
100
|
+
}; // Setting up the overlay
|
|
101
101
|
|
|
102
102
|
const openOverlayRef = useRef();
|
|
103
103
|
const [isExpanded, setIsExpanded] = useState(((_ref3 = value ?? initialValue) === null || _ref3 === void 0 ? void 0 : _ref3.length) >= minToSuggestion);
|
|
@@ -239,6 +239,7 @@ const Autocomplete = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
239
239
|
readOnly: readOnly,
|
|
240
240
|
ref: inputRef,
|
|
241
241
|
tokens: inputTokens,
|
|
242
|
+
validation: validation,
|
|
242
243
|
...selectedProps,
|
|
243
244
|
...props,
|
|
244
245
|
...(isControlled ? {
|
|
@@ -8,7 +8,6 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
8
8
|
})(_ref => {
|
|
9
9
|
let {
|
|
10
10
|
daySize,
|
|
11
|
-
validation,
|
|
12
11
|
remainingTokens,
|
|
13
12
|
calendarMonthFontTokens,
|
|
14
13
|
calendarDayDefaultHeight,
|
|
@@ -35,31 +34,10 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
35
34
|
}
|
|
36
35
|
.DateInput {
|
|
37
36
|
width: 100%;
|
|
38
|
-
border: 2px solid ${remainingTokens.dateInputBorderColor};
|
|
39
|
-
${validation === 'error' && `input { border-color: ${remainingTokens.invalidInputMixin}; }`};
|
|
40
|
-
${validation === 'success' && `input { border-color: ${remainingTokens.validInputMixin}; }`};
|
|
41
|
-
}
|
|
42
|
-
.DateInput:hover {
|
|
43
|
-
border-radius: ${remainingTokens.dateInputBorderRadius}px;
|
|
44
|
-
border: 2px solid ${remainingTokens.dateInputHoverBorderColor};
|
|
45
|
-
}
|
|
46
|
-
.DateInput_input:focus {
|
|
47
|
-
border: 3px solid ${remainingTokens.dateInputFocusBorderColor};
|
|
48
37
|
}
|
|
49
38
|
.SingleDatePickerInput__withBorder {
|
|
50
39
|
border: 0 !important;
|
|
51
40
|
}
|
|
52
|
-
.DateInput_input {
|
|
53
|
-
box-sizing: border-box;
|
|
54
|
-
padding: 1rem;
|
|
55
|
-
border: 1px solid ${remainingTokens.dateInputInsideBorderColor};
|
|
56
|
-
border-radius: 4px;
|
|
57
|
-
min-height: 3.25rem;
|
|
58
|
-
color: ${remainingTokens.dateInputInsideColor};
|
|
59
|
-
font-weight: 400;
|
|
60
|
-
font-size: 1rem;
|
|
61
|
-
box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
|
|
62
|
-
}
|
|
63
41
|
.DateInput_fang {
|
|
64
42
|
transform: translateY(2px);
|
|
65
43
|
z-index: 4;
|
|
@@ -164,10 +142,8 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
164
142
|
}
|
|
165
143
|
.CalendarDay__selected,
|
|
166
144
|
.CalendarDay__selected:active,
|
|
167
|
-
.CalendarDay__selected:hover
|
|
168
145
|
.CalendarDay__default.CalendarDay__selected,
|
|
169
|
-
.CalendarDay__default.CalendarDay__selected:active
|
|
170
|
-
.CalendarDay__default.CalendarDay__selected:hover{
|
|
146
|
+
.CalendarDay__default.CalendarDay__selected:active{
|
|
171
147
|
background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBackground};
|
|
172
148
|
border: 1px solid ${remainingTokens.calendarDaySelectedHoverBorderColor};
|
|
173
149
|
color: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverColor};
|
|
@@ -177,6 +153,15 @@ const CalendarContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
177
153
|
background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
|
|
178
154
|
}
|
|
179
155
|
}
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
.CalendarDay__selected:hover
|
|
159
|
+
.CalendarDay__default.CalendarDay__selected:hover{
|
|
160
|
+
&:before {
|
|
161
|
+
background: ${remainingTokens.calendarDayDefaultCalendarDaySelectedHoverBeforeBackground};
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
180
165
|
.CalendarDay__blocked_out_of_range,
|
|
181
166
|
.CalendarDay__blocked_out_of_range:active,
|
|
182
167
|
.CalendarDay__blocked_out_of_range:hover,
|
|
@@ -5,7 +5,8 @@ import momentPropTypes from 'react-moment-proptypes';
|
|
|
5
5
|
import 'react-dates/initialize';
|
|
6
6
|
import SingleDatePicker from 'react-dates/lib/components/SingleDatePicker';
|
|
7
7
|
import DayPickerSingleDateController from 'react-dates/lib/components/DayPickerSingleDateController';
|
|
8
|
-
import { IconButton,
|
|
8
|
+
import { IconButton, TextInput, selectSystemProps, useCopy, useViewport, useThemeTokens, applyTextStyles } from '@telus-uds/components-base';
|
|
9
|
+
import moment from 'moment';
|
|
9
10
|
import CalendarContainer from './CalendarContainer';
|
|
10
11
|
import dictionary from './dictionary';
|
|
11
12
|
import { htmlAttrs } from '../utils';
|
|
@@ -13,6 +14,8 @@ import { jsx as _jsx } from "react/jsx-runtime";
|
|
|
13
14
|
import { jsxs as _jsxs } from "react/jsx-runtime";
|
|
14
15
|
import { Fragment as _Fragment } from "react/jsx-runtime";
|
|
15
16
|
const [selectProps, selectedSystemPropTypes] = selectSystemProps([htmlAttrs]);
|
|
17
|
+
const dateFormat = 'DD / MM / YYYY';
|
|
18
|
+
const dateFormatWithoutSpaces = 'DD/MM/YYYY';
|
|
16
19
|
|
|
17
20
|
const getResponsiveDaySize = function () {
|
|
18
21
|
let inline = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : false;
|
|
@@ -49,6 +52,13 @@ const MonthCenterContainer = /*#__PURE__*/styled.div.withConfig({
|
|
|
49
52
|
display: 'flex',
|
|
50
53
|
justifyContent: 'center'
|
|
51
54
|
});
|
|
55
|
+
const DateInputWrapper = /*#__PURE__*/styled.div.withConfig({
|
|
56
|
+
displayName: "DatePicker__DateInputWrapper",
|
|
57
|
+
componentId: "components-web__sc-mz8fi3-1"
|
|
58
|
+
})({
|
|
59
|
+
display: 'flex',
|
|
60
|
+
flexDirection: 'column'
|
|
61
|
+
});
|
|
52
62
|
/**
|
|
53
63
|
* Use DatePicker to select a date on a calendar.
|
|
54
64
|
*
|
|
@@ -93,6 +103,8 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
93
103
|
} = _ref;
|
|
94
104
|
const [inputDate, setInputDate] = useState(date);
|
|
95
105
|
const [isFocused, setIsFocused] = useState(false);
|
|
106
|
+
const [inputText, setInputText] = useState(moment(date, dateFormat, true).isValid() ? date : '');
|
|
107
|
+
const [isClickedInside, setIsClickedInside] = useState(false);
|
|
96
108
|
const getCopy = useCopy({
|
|
97
109
|
dictionary,
|
|
98
110
|
copy
|
|
@@ -102,21 +114,50 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
102
114
|
let {
|
|
103
115
|
focused
|
|
104
116
|
} = _ref2;
|
|
105
|
-
|
|
117
|
+
|
|
118
|
+
if (!isClickedInside) {
|
|
119
|
+
setIsFocused(focused);
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
setIsClickedInside(false);
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
const handleFocus = () => {
|
|
126
|
+
setIsFocused(true);
|
|
127
|
+
};
|
|
128
|
+
|
|
129
|
+
const handleMouseDown = event => {
|
|
130
|
+
if (event.target.tagName === 'INPUT') {
|
|
131
|
+
setIsClickedInside(true);
|
|
132
|
+
setIsFocused(true);
|
|
133
|
+
} else {
|
|
134
|
+
event.stopPropagation();
|
|
135
|
+
}
|
|
106
136
|
};
|
|
107
137
|
|
|
108
138
|
const onChange = value => {
|
|
109
139
|
setInputDate(value);
|
|
140
|
+
setInputText(value.format(dateFormat));
|
|
110
141
|
if (onDateChange) onDateChange(value);
|
|
111
142
|
};
|
|
112
143
|
|
|
144
|
+
const onChangeInput = value => {
|
|
145
|
+
if (moment(value.replace(/\s/g, ''), dateFormatWithoutSpaces, true).isValid()) {
|
|
146
|
+
setInputDate(moment(value, dateFormat));
|
|
147
|
+
if (onDateChange) onDateChange(moment(value, dateFormat));
|
|
148
|
+
setInputText(moment(value, dateFormatWithoutSpaces).format(dateFormat));
|
|
149
|
+
} else {
|
|
150
|
+
setInputText(value);
|
|
151
|
+
}
|
|
152
|
+
};
|
|
153
|
+
|
|
113
154
|
const viewport = useViewport();
|
|
114
155
|
const daySize = getResponsiveDaySize(inline, viewport);
|
|
115
156
|
const circleSize = getResponsiveCircleSize(inline, viewport);
|
|
116
157
|
const value = date ?? inputDate;
|
|
117
158
|
const HiddenInputFieldContainer = /*#__PURE__*/styled.div.withConfig({
|
|
118
159
|
displayName: "DatePicker__HiddenInputFieldContainer",
|
|
119
|
-
componentId: "components-web__sc-mz8fi3-
|
|
160
|
+
componentId: "components-web__sc-mz8fi3-2"
|
|
120
161
|
})(["height:", ";width:", ";overflow:hidden;"], props => props.height, props => props.width);
|
|
121
162
|
const {
|
|
122
163
|
hiddenInputFieldContainerHeight,
|
|
@@ -182,43 +223,77 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
182
223
|
calendarMonthFontTokens: calendarMonthFontTokens,
|
|
183
224
|
calendarWeekFontTokens: calendarWeekFontTokens,
|
|
184
225
|
defaultFontTokens: defaultFontTokens,
|
|
185
|
-
children: /*#__PURE__*/
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
226
|
+
children: inline ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
227
|
+
children: [/*#__PURE__*/_jsx(HiddenInputFieldContainer, {
|
|
228
|
+
height: hiddenInputFieldContainerHeight,
|
|
229
|
+
width: hiddenInputFieldContainerWidth,
|
|
230
|
+
children: /*#__PURE__*/_jsx("input", {
|
|
231
|
+
ref: ref,
|
|
232
|
+
id: id,
|
|
233
|
+
type: "text",
|
|
234
|
+
value: (value === null || value === void 0 ? void 0 : value.format('DD/MM/YYYY')) ?? '',
|
|
235
|
+
readOnly: true
|
|
236
|
+
})
|
|
237
|
+
}), /*#__PURE__*/_jsx(DayPickerSingleDateController, {
|
|
238
|
+
date: value,
|
|
239
|
+
onDateChange: onChange,
|
|
240
|
+
focused: isFocused,
|
|
241
|
+
onFocusChange: onFocusChange,
|
|
242
|
+
numberOfMonths: 1,
|
|
243
|
+
hideKeyboardShortcutsPanel: true,
|
|
244
|
+
keepOpenOnDateSelect: false,
|
|
245
|
+
daySize: daySize,
|
|
246
|
+
renderNavPrevButton: renderPrevButton,
|
|
247
|
+
renderNavNextButton: renderNextButton,
|
|
248
|
+
isOutsideRange: isDayDisabled,
|
|
249
|
+
phrases: getCopy(),
|
|
250
|
+
renderMonthElement: _ref5 => {
|
|
251
|
+
let {
|
|
252
|
+
month
|
|
253
|
+
} = _ref5;
|
|
254
|
+
return /*#__PURE__*/_jsx(MonthCenterContainer, {
|
|
255
|
+
children: /*#__PURE__*/_jsxs("div", {
|
|
256
|
+
children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
257
|
+
})
|
|
258
|
+
});
|
|
259
|
+
},
|
|
260
|
+
renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
|
|
261
|
+
children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
|
|
262
|
+
})
|
|
263
|
+
})]
|
|
264
|
+
}) : /*#__PURE__*/_jsx(DateInputWrapper, {
|
|
265
|
+
onMouseDown: handleMouseDown,
|
|
266
|
+
onFocus: handleFocus,
|
|
267
|
+
children: /*#__PURE__*/_jsx(TextInput, {
|
|
268
|
+
copy: copy,
|
|
269
|
+
feedback: feedback,
|
|
270
|
+
hint: hint,
|
|
271
|
+
placeholder: "DD / MM / YYYY",
|
|
272
|
+
onChange: onChangeInput,
|
|
273
|
+
tooltip: tooltip,
|
|
274
|
+
hintPosition: hintPosition,
|
|
275
|
+
label: ((_dictionary$copy = dictionary[copy]) === null || _dictionary$copy === void 0 ? void 0 : _dictionary$copy.roleDescription) ?? label,
|
|
276
|
+
value: inputText,
|
|
277
|
+
validation: validation,
|
|
278
|
+
children: /*#__PURE__*/_jsx(SingleDatePicker, {
|
|
206
279
|
date: value,
|
|
207
280
|
onDateChange: onChange,
|
|
208
281
|
focused: isFocused,
|
|
209
282
|
onFocusChange: onFocusChange,
|
|
210
283
|
numberOfMonths: 1,
|
|
211
284
|
hideKeyboardShortcutsPanel: true,
|
|
212
|
-
keepOpenOnDateSelect:
|
|
285
|
+
keepOpenOnDateSelect: true,
|
|
213
286
|
daySize: daySize,
|
|
287
|
+
ref: ref,
|
|
214
288
|
renderNavPrevButton: renderPrevButton,
|
|
215
|
-
renderNavNextButton: renderNextButton,
|
|
216
289
|
isOutsideRange: isDayDisabled,
|
|
217
290
|
phrases: getCopy(),
|
|
218
|
-
|
|
291
|
+
id: id,
|
|
292
|
+
renderNavNextButton: renderNextButton,
|
|
293
|
+
renderMonthElement: _ref6 => {
|
|
219
294
|
let {
|
|
220
295
|
month
|
|
221
|
-
} =
|
|
296
|
+
} = _ref6;
|
|
222
297
|
return /*#__PURE__*/_jsx(MonthCenterContainer, {
|
|
223
298
|
children: /*#__PURE__*/_jsxs("div", {
|
|
224
299
|
children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
@@ -228,36 +303,6 @@ const DatePicker = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
228
303
|
renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
|
|
229
304
|
children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
|
|
230
305
|
})
|
|
231
|
-
})]
|
|
232
|
-
}) : /*#__PURE__*/_jsx(SingleDatePicker, {
|
|
233
|
-
date: value,
|
|
234
|
-
onDateChange: onChange,
|
|
235
|
-
focused: isFocused,
|
|
236
|
-
onFocusChange: onFocusChange,
|
|
237
|
-
numberOfMonths: 1,
|
|
238
|
-
hideKeyboardShortcutsPanel: true,
|
|
239
|
-
keepOpenOnDateSelect: true,
|
|
240
|
-
daySize: daySize,
|
|
241
|
-
ref: ref,
|
|
242
|
-
renderNavPrevButton: renderPrevButton,
|
|
243
|
-
isOutsideRange: isDayDisabled,
|
|
244
|
-
phrases: getCopy(),
|
|
245
|
-
id: id,
|
|
246
|
-
displayFormat: "DD / MM / YYYY",
|
|
247
|
-
placeholder: "DD / MM / YYYY",
|
|
248
|
-
renderNavNextButton: renderNextButton,
|
|
249
|
-
renderMonthElement: _ref6 => {
|
|
250
|
-
let {
|
|
251
|
-
month
|
|
252
|
-
} = _ref6;
|
|
253
|
-
return /*#__PURE__*/_jsx(MonthCenterContainer, {
|
|
254
|
-
children: /*#__PURE__*/_jsxs("div", {
|
|
255
|
-
children: [dictionary[copy] ? dictionary[copy].months[month.month()] : month.format('MMMM'), ' ', month.year()]
|
|
256
|
-
})
|
|
257
|
-
});
|
|
258
|
-
},
|
|
259
|
-
renderWeekHeaderElement: day => /*#__PURE__*/_jsx("div", {
|
|
260
|
-
children: dictionary[copy] ? dictionary[copy].weekDays[day] : day
|
|
261
306
|
})
|
|
262
307
|
})
|
|
263
308
|
})
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { css } from 'styled-components';
|
|
2
|
-
const defaultReactDatesCss = /*#__PURE__*/css([".PresetDateRangePicker_panel{padding:0 22px 11px;}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;}.PresetDateRangePicker_button:active{outline:0;}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699;}.SingleDatePickerInput{display:inline-block;background-color:#fff;}.SingleDatePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb;}.SingleDatePickerInput__rtl{direction:rtl;}.SingleDatePickerInput__disabled{background-color:#f2f2f2;}.SingleDatePickerInput__block{display:block;}.SingleDatePickerInput__showClearDate{padding-right:30px;}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%;}.SingleDatePickerInput_clearDate__small{padding:6px;}.SingleDatePickerInput_clearDate__hide{visibility:hidden;}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.SingleDatePickerInput_clearDate_svg__small{height:9px;}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.SingleDatePicker{position:relative;display:inline-block;}.SingleDatePicker__block{display:block;}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute;}.SingleDatePicker_picker__rtl{direction:rtl;}.SingleDatePicker_picker__directionLeft{left:0;}.SingleDatePicker_picker__directionRight{right:0;}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff;}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px;}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0;}.DayPickerKeyboardShortcuts_show{width:33px;height:26px;position:absolute;z-index:2;}.DayPickerKeyboardShortcuts_show::before{content:'';display:block;position:absolute;}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight::before{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topRight{top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight::before{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topLeft{top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft::before{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft:hover::before{border-left:33px solid #008489;}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute;}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:5px;}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px;text-align:left;}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0;}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px;}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2;}.DayPickerKeyboardShortcuts_close:active{outline:0;}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a;}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center;}.CalendarDay:active{outline:0;}.CalendarDay__defaultCursor{cursor:default;}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff;}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit;}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit;}.CalendarDay__outside{border:0;background:#fff;color:#484848;}.CalendarDay__outside:hover{border:0;}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd;}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd;}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848;}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848;}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff;}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff;}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff;}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87;}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87;}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a;}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd;}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee;}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7;}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.CalendarMonth_table{border-collapse:collapse;border-spacing:0;}.CalendarMonth_verticalSpacing{border-collapse:separate;}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:initial;}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px;}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0;}.CalendarMonthGrid__animating{z-index:1;}.CalendarMonthGrid__horizontal{position:absolute;left:9px;}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto;}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%;}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none;}.CalendarMonthGrid_month__hidden{visibility:hidden;}.DayPickerNavigation{position:relative;z-index:2;}.DayPickerNavigation__horizontal{height:0;}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1;}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0;}.DayPickerNavigation__verticalScrollableDefault{position:relative;}.DayPickerNavigation__bottom{height:auto;}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;padding:0;margin:0;}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575;}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4;}.DayPickerNavigation_button__default:active{background:#f2f2f2;}.DayPickerNavigation_button__disabled{cursor:default;border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:active{background:0 0;}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:0.78;border-radius:3px;padding:6px 9px;}.DayPickerNavigation_bottomButton__horizontalDefault{position:static;margin:-10px 22px 30px;}.DayPickerNavigation_leftButton__horizontalDefault{left:22px;}.DayPickerNavigation_rightButton__horizontalDefault{right:22px;}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,0.1);position:relative;display:inline-block;text-align:center;height:100%;width:50%;}.DayPickerNavigation_nextButton__verticalDefault{border-left:0;}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%;}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block;}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;}.DayPickerNavigation_svg__disabled{fill:#f2f2f2;}.DayPicker{background:#fff;position:relative;text-align:left;}.DayPicker__horizontal{background:#fff;}.DayPicker__verticalScrollable{height:100%;}.DayPicker__hidden{visibility:hidden;}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,0.05),0 0 0 1px rgba(0,0,0,0.07);border-radius:3px;}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%;}.DayPicker_portal__vertical{position:initial;}.DayPicker_focusRegion{outline:0;}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top;}.DayPicker_weekHeaders{position:relative;}.DayPicker_weekHeaders__horizontal{margin-left:9px;}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;}.DayPicker_weekHeader__vertical{left:50%;}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center;}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px;}.DayPicker_weekHeader_li{display:inline-block;text-align:center;}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px;}.DayPicker_transitionContainer__horizontal{-webkit-transition:height 0.2s ease-in-out;-moz-transition:height 0.2s ease-in-out;transition:height 0.2s ease-in-out;}.DayPicker_transitionContainer__vertical{width:100%;}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll;}.DateInput{margin:0;padding:0;background:#fff;position:relative;display:inline-block;width:130px;vertical-align:middle;}.DateInput__small{width:97px;}.DateInput__block{width:100%;}.DateInput__disabled{background:#f2f2f2;color:#dbdbdb;}.DateInput_input{font-weight:200;font-size:19px;line-height:24px;color:#484848;background-color:#fff;width:100%;padding:11px 11px 9px;border:0;border-top:0;border-right:0;border-bottom:2px solid transparent;border-left:0;border-radius:0;}.DateInput_input__small{font-size:15px;line-height:18px;letter-spacing:0.2px;padding:7px 7px 5px;}.DateInput_input__regular{font-weight:auto;}.DateInput_input__readOnly{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.DateInput_input__focused{outline:0;background:#fff;border:0;border-top:0;border-right:0;border-bottom:2px solid #008489;border-left:0;}.DateInput_input__disabled{background:#f2f2f2;font-style:italic;}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.DateInput_fang{position:absolute;width:20px;height:10px;left:22px;z-index:2;}.DateInput_fangShape{fill:#fff;}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent;}.DateRangePickerInput{background-color:#fff;display:inline-block;}.DateRangePickerInput__disabled{background:#f2f2f2;}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb;}.DateRangePickerInput__rtl{direction:rtl;}.DateRangePickerInput__block{display:block;}.DateRangePickerInput__showClearDates{padding-right:30px;}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848;}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px;}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.DateRangePickerInput_clearDates__small{padding:6px;}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%;}.DateRangePickerInput_clearDates__hide{visibility:hidden;}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.DateRangePickerInput_clearDates_svg__small{height:9px;}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.DateRangePicker{position:relative;display:inline-block;}.DateRangePicker__block{display:block;}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute;}.DateRangePicker_picker__rtl{direction:rtl;}.DateRangePicker_picker__directionLeft{left:0;}.DateRangePicker_picker__directionRight{right:0;}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.DateRangePicker_picker__fullScreenPortal{background-color:#fff;}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}"]);
|
|
2
|
+
const defaultReactDatesCss = /*#__PURE__*/css([".PresetDateRangePicker_panel{padding:0 22px 11px;}.PresetDateRangePicker_button{position:relative;height:100%;text-align:center;background:0 0;border:2px solid #00a699;color:#00a699;padding:4px 12px;margin-right:8px;font:inherit;font-weight:700;line-height:normal;overflow:visible;-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;}.PresetDateRangePicker_button:active{outline:0;}.PresetDateRangePicker_button__selected{color:#fff;background:#00a699;}.SingleDatePickerInput{display:inline-block;background-color:#fff;position:absolute;top:-55px;}.SingleDatePickerInput__disabled{background-color:#f2f2f2;}.SingleDatePickerInput__block{display:block;}.SingleDatePickerInput__showClearDate{padding-right:30px;}.SingleDatePickerInput_clearDate{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.SingleDatePickerInput_clearDate__default:focus,.SingleDatePickerInput_clearDate__default:hover{background:#dbdbdb;border-radius:50%;}.SingleDatePickerInput_clearDate__small{padding:6px;}.SingleDatePickerInput_clearDate__hide{visibility:hidden;}.SingleDatePickerInput_clearDate_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.SingleDatePickerInput_clearDate_svg__small{height:9px;}.SingleDatePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.SingleDatePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.SingleDatePicker{position:relative;display:inline-block;}.SingleDatePicker__block{display:block;}.SingleDatePicker_picker{z-index:1;background-color:#fff;position:absolute;}.SingleDatePicker_picker__rtl{direction:rtl;}.SingleDatePicker_picker__directionLeft{left:0;}.SingleDatePicker_picker__directionRight{right:0;}.SingleDatePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.SingleDatePicker_picker__fullScreenPortal{background-color:#fff;}.SingleDatePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.SingleDatePicker_closeButton:focus,.SingleDatePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.SingleDatePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_buttonReset{background:0 0;border:0;border-radius:0;color:inherit;font:inherit;line-height:normal;overflow:visible;padding:0;cursor:pointer;font-size:14px;}.DayPickerKeyboardShortcuts_buttonReset:active{outline:0;}.DayPickerKeyboardShortcuts_show{width:33px;height:26px;position:absolute;z-index:2;}.DayPickerKeyboardShortcuts_show::before{content:'';display:block;position:absolute;}.DayPickerKeyboardShortcuts_show__bottomRight{bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight::before{border-top:26px solid transparent;border-right:33px solid #00a699;bottom:0;right:0;}.DayPickerKeyboardShortcuts_show__bottomRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topRight{top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight::before{border-bottom:26px solid transparent;border-right:33px solid #00a699;top:0;right:0;}.DayPickerKeyboardShortcuts_show__topRight:hover::before{border-right:33px solid #008489;}.DayPickerKeyboardShortcuts_show__topLeft{top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft::before{border-bottom:26px solid transparent;border-left:33px solid #00a699;top:0;left:0;}.DayPickerKeyboardShortcuts_show__topLeft:hover::before{border-left:33px solid #008489;}.DayPickerKeyboardShortcuts_showSpan{color:#fff;position:absolute;}.DayPickerKeyboardShortcuts_showSpan__bottomRight{bottom:0;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topRight{top:1px;right:5px;}.DayPickerKeyboardShortcuts_showSpan__topLeft{top:1px;left:5px;}.DayPickerKeyboardShortcuts_panel{overflow:auto;background:#fff;border:1px solid #dbdbdb;border-radius:2px;position:absolute;top:0;bottom:0;right:0;left:0;z-index:2;padding:22px;margin:33px;text-align:left;}.DayPickerKeyboardShortcuts_title{font-size:16px;font-weight:700;margin:0;}.DayPickerKeyboardShortcuts_list{list-style:none;padding:0;font-size:14px;}.DayPickerKeyboardShortcuts_close{position:absolute;right:22px;top:22px;z-index:2;}.DayPickerKeyboardShortcuts_close:active{outline:0;}.DayPickerKeyboardShortcuts_closeSvg{height:15px;width:15px;fill:#cacccd;}.DayPickerKeyboardShortcuts_closeSvg:focus,.DayPickerKeyboardShortcuts_closeSvg:hover{fill:#82888a;}.CalendarDay{-moz-box-sizing:border-box;box-sizing:border-box;cursor:pointer;font-size:14px;text-align:center;}.CalendarDay:active{outline:0;}.CalendarDay__defaultCursor{cursor:default;}.CalendarDay__default{border:1px solid #e4e7e7;color:#484848;background:#fff;}.CalendarDay__default:hover{background:#e4e7e7;border:1px solid #e4e7e7;color:inherit;}.CalendarDay__hovered_offset{background:#f4f5f5;border:1px double #e4e7e7;color:inherit;}.CalendarDay__outside{border:0;background:#fff;color:#484848;}.CalendarDay__outside:hover{border:0;}.CalendarDay__blocked_minimum_nights{background:#fff;border:1px solid #eceeee;color:#cacccd;}.CalendarDay__blocked_minimum_nights:active,.CalendarDay__blocked_minimum_nights:hover{background:#fff;color:#cacccd;}.CalendarDay__highlighted_calendar{background:#ffe8bc;color:#484848;}.CalendarDay__highlighted_calendar:active,.CalendarDay__highlighted_calendar:hover{background:#ffce71;color:#484848;}.CalendarDay__selected_span{background:#66e2da;border:1px double #33dacd;color:#fff;}.CalendarDay__selected_span:active,.CalendarDay__selected_span:hover{background:#33dacd;border:1px double #33dacd;color:#fff;}.CalendarDay__selected,.CalendarDay__selected:active,.CalendarDay__selected:hover{background:#00a699;border:1px double #00a699;color:#fff;}.CalendarDay__hovered_span,.CalendarDay__hovered_span:hover{background:#b2f1ec;border:1px double #80e8e0;color:#007a87;}.CalendarDay__hovered_span:active{background:#80e8e0;border:1px double #80e8e0;color:#007a87;}.CalendarDay__blocked_calendar,.CalendarDay__blocked_calendar:active,.CalendarDay__blocked_calendar:hover{background:#cacccd;border:1px solid #cacccd;color:#82888a;}.CalendarDay__blocked_out_of_range,.CalendarDay__blocked_out_of_range:active,.CalendarDay__blocked_out_of_range:hover{background:#fff;border:1px solid #e4e7e7;color:#cacccd;}.CalendarDay__hovered_start_first_possible_end{background:#eceeee;border:1px double #eceeee;}.CalendarDay__hovered_start_blocked_min_nights{background:#eceeee;border:1px double #e4e7e7;}.CalendarMonth{background:#fff;text-align:center;vertical-align:top;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;}.CalendarMonth_table{border-collapse:collapse;border-spacing:0;}.CalendarMonth_verticalSpacing{border-collapse:separate;}.CalendarMonth_caption{color:#484848;font-size:18px;text-align:center;padding-top:22px;padding-bottom:37px;caption-side:initial;}.CalendarMonth_caption__verticalScrollable{padding-top:12px;padding-bottom:7px;}.CalendarMonthGrid{background:#fff;text-align:left;z-index:0;}.CalendarMonthGrid__animating{z-index:1;}.CalendarMonthGrid__horizontal{position:absolute;left:9px;}.CalendarMonthGrid__vertical,.CalendarMonthGrid__vertical_scrollable{margin:0 auto;}.CalendarMonthGrid_month__horizontal{display:inline-block;vertical-align:top;min-height:100%;}.CalendarMonthGrid_month__hideForAnimation{position:absolute;z-index:-1;opacity:0;pointer-events:none;}.CalendarMonthGrid_month__hidden{visibility:hidden;}.DayPickerNavigation{position:relative;z-index:2;}.DayPickerNavigation__horizontal{height:0;}.DayPickerNavigation__verticalScrollable_prevNav{z-index:1;}.DayPickerNavigation__verticalDefault{position:absolute;width:100%;height:52px;bottom:0;left:0;}.DayPickerNavigation__verticalScrollableDefault{position:relative;}.DayPickerNavigation__bottom{height:auto;}.DayPickerNavigation__bottomDefault{-webkit-box-pack:justify;-ms-flex-pack:justify;display:-webkit-box;display:-moz-box;display:-ms-flexbox;display:-webkit-flex;display:flex;-webkit-justify-content:space-between;justify-content:space-between;}.DayPickerNavigation_button{cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;border:0;padding:0;margin:0;}.DayPickerNavigation_button__default{border:1px solid #e4e7e7;background-color:#fff;color:#757575;}.DayPickerNavigation_button__default:focus,.DayPickerNavigation_button__default:hover{border:1px solid #c4c4c4;}.DayPickerNavigation_button__default:active{background:#f2f2f2;}.DayPickerNavigation_button__disabled{cursor:default;border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:focus,.DayPickerNavigation_button__disabled:hover{border:1px solid #f2f2f2;}.DayPickerNavigation_button__disabled:active{background:0 0;}.DayPickerNavigation_button__horizontalDefault{position:absolute;top:18px;line-height:0.78;border-radius:3px;padding:6px 9px;}.DayPickerNavigation_bottomButton__horizontalDefault{position:static;margin:-10px 22px 30px;}.DayPickerNavigation_leftButton__horizontalDefault{left:22px;}.DayPickerNavigation_rightButton__horizontalDefault{right:22px;}.DayPickerNavigation_button__verticalDefault{padding:5px;background:#fff;box-shadow:0 0 5px 2px rgba(0,0,0,0.1);position:relative;display:inline-block;text-align:center;height:100%;width:50%;}.DayPickerNavigation_nextButton__verticalDefault{border-left:0;}.DayPickerNavigation_nextButton__verticalScrollableDefault,.DayPickerNavigation_prevButton__verticalScrollableDefault{width:100%;}.DayPickerNavigation_svg__horizontal{height:19px;width:19px;fill:#82888a;display:block;}.DayPickerNavigation_svg__vertical{height:42px;width:42px;fill:#484848;}.DayPickerNavigation_svg__disabled{fill:#f2f2f2;}.DayPicker{background:#fff;position:relative;text-align:left;}.DayPicker__horizontal{background:#fff;}.DayPicker__verticalScrollable{height:100%;}.DayPicker__hidden{visibility:hidden;}.DayPicker__withBorder{box-shadow:0 2px 6px rgba(0,0,0,0.05),0 0 0 1px rgba(0,0,0,0.07);border-radius:3px;}.DayPicker_portal__horizontal{box-shadow:none;position:absolute;left:50%;top:50%;}.DayPicker_portal__vertical{position:initial;}.DayPicker_focusRegion{outline:0;}.DayPicker_calendarInfo__horizontal,.DayPicker_wrapper__horizontal{display:inline-block;vertical-align:top;}.DayPicker_weekHeaders{position:relative;}.DayPicker_weekHeaders__horizontal{margin-left:9px;}.DayPicker_weekHeader{color:#757575;position:absolute;top:62px;z-index:2;text-align:left;}.DayPicker_weekHeader__vertical{left:50%;}.DayPicker_weekHeader__verticalScrollable{top:0;display:table-row;border-bottom:1px solid #dbdbdb;background:#fff;margin-left:0;left:0;width:100%;text-align:center;}.DayPicker_weekHeader_ul{list-style:none;margin:1px 0;padding-left:0;padding-right:0;font-size:14px;}.DayPicker_weekHeader_li{display:inline-block;text-align:center;}.DayPicker_transitionContainer{position:relative;overflow:hidden;border-radius:3px;}.DayPicker_transitionContainer__horizontal{-webkit-transition:height 0.2s ease-in-out;-moz-transition:height 0.2s ease-in-out;transition:height 0.2s ease-in-out;}.DayPicker_transitionContainer__vertical{width:100%;}.DayPicker_transitionContainer__verticalScrollable{padding-top:20px;height:100%;position:absolute;top:0;bottom:0;right:0;left:0;overflow-y:scroll;}.DateInput_input{display:none;}.DateInput_screenReaderMessage{border:0;clip:rect(0,0,0,0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;}.DateInput_fang{position:absolute;top:55px;width:20px;height:10px;left:22px;z-index:2;}.DateInput_fangShape{fill:#fff;}.DateInput_fangStroke{stroke:#dbdbdb;fill:transparent;}.DateRangePickerInput{background-color:#fff;display:inline-block;}.DateRangePickerInput__disabled{background:#f2f2f2;}.DateRangePickerInput__withBorder{border-radius:2px;border:1px solid #dbdbdb;}.DateRangePickerInput__rtl{direction:rtl;}.DateRangePickerInput__block{display:block;}.DateRangePickerInput__showClearDates{padding-right:30px;}.DateRangePickerInput_arrow{display:inline-block;vertical-align:middle;color:#484848;}.DateRangePickerInput_arrow_svg{vertical-align:middle;fill:#484848;height:24px;width:24px;}.DateRangePickerInput_clearDates{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;padding:10px;margin:0 10px 0 5px;position:absolute;right:0;top:50%;-webkit-transform:translateY(-50%);-ms-transform:translateY(-50%);transform:translateY(-50%);}.DateRangePickerInput_clearDates__small{padding:6px;}.DateRangePickerInput_clearDates_default:focus,.DateRangePickerInput_clearDates_default:hover{background:#dbdbdb;border-radius:50%;}.DateRangePickerInput_clearDates__hide{visibility:hidden;}.DateRangePickerInput_clearDates_svg{fill:#82888a;height:12px;width:15px;vertical-align:middle;}.DateRangePickerInput_clearDates_svg__small{height:9px;}.DateRangePickerInput_calendarIcon{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;display:inline-block;vertical-align:middle;padding:10px;margin:0 5px 0 10px;}.DateRangePickerInput_calendarIcon_svg{fill:#82888a;height:15px;width:14px;vertical-align:middle;}.DateRangePicker{position:relative;display:inline-block;}.DateRangePicker__block{display:block;}.DateRangePicker_picker{z-index:1;background-color:#fff;position:absolute;}.DateRangePicker_picker__rtl{direction:rtl;}.DateRangePicker_picker__directionLeft{left:0;}.DateRangePicker_picker__directionRight{right:0;}.DateRangePicker_picker__portal{background-color:rgba(0,0,0,0.3);position:fixed;top:0;left:0;height:100%;width:100%;}.DateRangePicker_picker__fullScreenPortal{background-color:#fff;}.DateRangePicker_closeButton{background:0 0;border:0;color:inherit;font:inherit;line-height:normal;overflow:visible;cursor:pointer;position:absolute;top:0;right:0;padding:15px;z-index:2;}.DateRangePicker_closeButton:focus,.DateRangePicker_closeButton:hover{color:darken(#cacccd,10%);text-decoration:none;}.DateRangePicker_closeButton_svg{height:15px;width:15px;fill:#cacccd;}"]);
|
|
3
3
|
export default defaultReactDatesCss;
|
|
@@ -31,7 +31,9 @@ const ExpandCollapseMini = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
31
31
|
onChange: handleChange,
|
|
32
32
|
children: expandProps => /*#__PURE__*/_jsx(ExpandCollapse.Panel, { ...expandProps,
|
|
33
33
|
panelId: "ExpandCollapseMiniPanel",
|
|
34
|
-
|
|
34
|
+
variant: {
|
|
35
|
+
mini: true
|
|
36
|
+
},
|
|
35
37
|
controlTokens: {
|
|
36
38
|
icon: null
|
|
37
39
|
} // TODO refactor
|
|
@@ -326,6 +326,10 @@ const Footnote = props => {
|
|
|
326
326
|
const handleClose = useCallback(event => {
|
|
327
327
|
var _footnoteRef$current, _footnoteRef$current2;
|
|
328
328
|
|
|
329
|
+
if (!isVisible) {
|
|
330
|
+
return;
|
|
331
|
+
}
|
|
332
|
+
|
|
329
333
|
if (event.type === 'keydown') {
|
|
330
334
|
if (event.key === 'Escape' || event.key === 27) {
|
|
331
335
|
closeFootnote(event, {
|
|
@@ -341,7 +345,7 @@ const Footnote = props => {
|
|
|
341
345
|
returnFocus: false
|
|
342
346
|
});
|
|
343
347
|
}
|
|
344
|
-
}, [closeFootnote]);
|
|
348
|
+
}, [closeFootnote, isVisible]);
|
|
345
349
|
|
|
346
350
|
const saveCurrentHeight = () => {
|
|
347
351
|
const oldHeight = contentRef.current.offsetHeight;
|
|
@@ -422,7 +426,7 @@ const Footnote = props => {
|
|
|
422
426
|
|
|
423
427
|
return () => {
|
|
424
428
|
if (isOpen) {
|
|
425
|
-
document.
|
|
429
|
+
document.removeEventListener('mousedown', handleClose);
|
|
426
430
|
window.removeEventListener('click', handleClose);
|
|
427
431
|
window.removeEventListener('keydown', handleClose);
|
|
428
432
|
window.removeEventListener('touchstart', handleClose);
|
|
@@ -71,6 +71,8 @@ const ListboxItem = /*#__PURE__*/forwardRef((_ref4, ref) => {
|
|
|
71
71
|
prevItemRef,
|
|
72
72
|
tokens,
|
|
73
73
|
variant = {},
|
|
74
|
+
LinkRouter,
|
|
75
|
+
linkRouterProps,
|
|
74
76
|
...rest
|
|
75
77
|
} = _ref4;
|
|
76
78
|
const selectedProps = selectProps(rest);
|
|
@@ -106,7 +108,6 @@ ListboxItem.propTypes = { ...selectedSystemPropTypes,
|
|
|
106
108
|
nextItemRef: PropTypes.object,
|
|
107
109
|
prevItemRef: PropTypes.object,
|
|
108
110
|
onPress: PropTypes.func,
|
|
109
|
-
selected: PropTypes.bool
|
|
110
|
-
reactRouterLinkComponent: PropTypes.oneOfType([PropTypes.func, PropTypes.object])
|
|
111
|
+
selected: PropTypes.bool
|
|
111
112
|
};
|
|
112
113
|
export default withLinkRouter(ListboxItem);
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable react/require-default-props */
|
|
2
2
|
import React, { forwardRef } from 'react';
|
|
3
|
-
import { Card,
|
|
3
|
+
import { Card, useThemeTokens } from '@telus-uds/components-base';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
5
5
|
import View from "react-native-web/dist/exports/View";
|
|
6
6
|
import StyleSheet from "react-native-web/dist/exports/StyleSheet";
|
|
7
|
+
import WebPortal from '../WebPortal';
|
|
7
8
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
8
9
|
const staticStyles = StyleSheet.create({
|
|
9
10
|
positioner: {
|
|
@@ -31,7 +32,7 @@ const DropdownOverlay = /*#__PURE__*/forwardRef((_ref, ref) => {
|
|
|
31
32
|
onLayout
|
|
32
33
|
} = _ref;
|
|
33
34
|
const systemTokens = useThemeTokens('ListBox', {}, {});
|
|
34
|
-
return /*#__PURE__*/_jsx(
|
|
35
|
+
return /*#__PURE__*/_jsx(WebPortal, {
|
|
35
36
|
children: /*#__PURE__*/_jsx(View, {
|
|
36
37
|
ref: ref,
|
|
37
38
|
onLayout: onLayout,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { forwardRef } from 'react';
|
|
2
2
|
import PropTypes from 'prop-types';
|
|
3
|
-
import { Button, selectSystemProps, useResponsiveProp, useViewport,
|
|
3
|
+
import { Button, selectSystemProps, useResponsiveProp, useViewport, useThemeTokensCallback } from '@telus-uds/components-base';
|
|
4
4
|
import styled from 'styled-components';
|
|
5
5
|
import { htmlAttrs } from '../utils';
|
|
6
6
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -42,6 +42,8 @@ const NavigationItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
42
42
|
href,
|
|
43
43
|
tokens,
|
|
44
44
|
variant = {},
|
|
45
|
+
LinkRouter,
|
|
46
|
+
linkRouterProps,
|
|
45
47
|
...rest
|
|
46
48
|
} = _ref2;
|
|
47
49
|
const selectedProps = selectProps(rest);
|
|
@@ -68,6 +70,8 @@ const NavigationItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
68
70
|
selected
|
|
69
71
|
},
|
|
70
72
|
href: href,
|
|
73
|
+
LinkRouter: LinkRouter,
|
|
74
|
+
linkRouterProps: linkRouterProps,
|
|
71
75
|
...selectedProps,
|
|
72
76
|
children: children
|
|
73
77
|
})
|
|
@@ -75,7 +79,6 @@ const NavigationItem = /*#__PURE__*/forwardRef((_ref2, ref) => {
|
|
|
75
79
|
});
|
|
76
80
|
NavigationItem.displayName = 'NavigationItem';
|
|
77
81
|
NavigationItem.propTypes = { ...selectedSystemPropTypes,
|
|
78
|
-
...withLinkRouter.propTypes,
|
|
79
82
|
onClick: PropTypes.func,
|
|
80
83
|
selected: PropTypes.bool,
|
|
81
84
|
children: PropTypes.oneOfType([PropTypes.string, PropTypes.func]).isRequired
|
|
@@ -84,4 +87,4 @@ NavigationItem.defaultProps = {
|
|
|
84
87
|
onClick: () => {},
|
|
85
88
|
selected: false
|
|
86
89
|
};
|
|
87
|
-
export default
|
|
90
|
+
export default NavigationItem;
|