@dhis2-ui/calendar 10.17.0 → 10.18.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.
|
@@ -128,7 +128,7 @@ const CalendarInput = ({
|
|
|
128
128
|
}), [cellSize, date, pickerResults, width, languageDirection]);
|
|
129
129
|
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement("div", {
|
|
130
130
|
ref: ref,
|
|
131
|
-
className: _style.default.dynamic([["
|
|
131
|
+
className: _style.default.dynamic([["2879226820", [inputWidth, rest.error || rest.warning ? '36px' : '6px']]]) + " " + "calendar-input-wrapper"
|
|
132
132
|
}, /*#__PURE__*/_react.default.createElement(_input.InputField, _extends({
|
|
133
133
|
label: _index.default.t('Pick a date')
|
|
134
134
|
}, rest, {
|
|
@@ -140,7 +140,7 @@ const CalendarInput = ({
|
|
|
140
140
|
onBlur: handleBlur,
|
|
141
141
|
inputWidth: inputWidth
|
|
142
142
|
})), clearable && /*#__PURE__*/_react.default.createElement("div", {
|
|
143
|
-
className: _style.default.dynamic([["
|
|
143
|
+
className: _style.default.dynamic([["2879226820", [inputWidth, rest.error || rest.warning ? '36px' : '6px']]]) + " " + ((0, _classnames.default)('calendar-clear-button', {
|
|
144
144
|
'with-icon': rest.valid || rest.error || rest.warning || rest.loading,
|
|
145
145
|
'with-dense-wrapper': rest.dense
|
|
146
146
|
}) || "")
|
|
@@ -163,7 +163,7 @@ const CalendarInput = ({
|
|
|
163
163
|
}, /*#__PURE__*/_react.default.createElement(_calendarContainer.CalendarContainer, _extends({}, calendarProps, {
|
|
164
164
|
calendarRef: calendarRef
|
|
165
165
|
})))), /*#__PURE__*/_react.default.createElement(_style.default, {
|
|
166
|
-
id: "
|
|
166
|
+
id: "2879226820",
|
|
167
167
|
dynamic: [inputWidth, rest.error || rest.warning ? '36px' : '6px']
|
|
168
168
|
}, [`.calendar-input-wrapper.__jsx-style-dynamic-selector{position:relative;width:${inputWidth};}`, `.calendar-clear-button.__jsx-style-dynamic-selector{position:absolute;inset-inline-end:${rest.error || rest.warning ? '36px' : '6px'};-webkit-inset-block-start:27px;-ms-intb-rlock-start:27px;inset-block-start:27px;}`, ".calendar-clear-button.with-icon.__jsx-style-dynamic-selector{inset-inline-end:36px;}", ".calendar-clear-button.with-dense-wrapper.__jsx-style-dynamic-selector{-webkit-inset-block-start:23px;-ms-intb-rlock-start:23px;inset-block-start:23px;}"]));
|
|
169
169
|
};
|
|
@@ -120,7 +120,7 @@ export const CalendarInput = ({
|
|
|
120
120
|
}), [cellSize, date, pickerResults, width, languageDirection]);
|
|
121
121
|
return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
122
122
|
ref: ref,
|
|
123
|
-
className: _JSXStyle.dynamic([["
|
|
123
|
+
className: _JSXStyle.dynamic([["2879226820", [inputWidth, rest.error || rest.warning ? '36px' : '6px']]]) + " " + "calendar-input-wrapper"
|
|
124
124
|
}, /*#__PURE__*/React.createElement(InputField, _extends({
|
|
125
125
|
label: i18n.t('Pick a date')
|
|
126
126
|
}, rest, {
|
|
@@ -132,7 +132,7 @@ export const CalendarInput = ({
|
|
|
132
132
|
onBlur: handleBlur,
|
|
133
133
|
inputWidth: inputWidth
|
|
134
134
|
})), clearable && /*#__PURE__*/React.createElement("div", {
|
|
135
|
-
className: _JSXStyle.dynamic([["
|
|
135
|
+
className: _JSXStyle.dynamic([["2879226820", [inputWidth, rest.error || rest.warning ? '36px' : '6px']]]) + " " + (cx('calendar-clear-button', {
|
|
136
136
|
'with-icon': rest.valid || rest.error || rest.warning || rest.loading,
|
|
137
137
|
'with-dense-wrapper': rest.dense
|
|
138
138
|
}) || "")
|
|
@@ -155,7 +155,7 @@ export const CalendarInput = ({
|
|
|
155
155
|
}, /*#__PURE__*/React.createElement(CalendarContainer, _extends({}, calendarProps, {
|
|
156
156
|
calendarRef: calendarRef
|
|
157
157
|
})))), /*#__PURE__*/React.createElement(_JSXStyle, {
|
|
158
|
-
id: "
|
|
158
|
+
id: "2879226820",
|
|
159
159
|
dynamic: [inputWidth, rest.error || rest.warning ? '36px' : '6px']
|
|
160
160
|
}, [`.calendar-input-wrapper.__jsx-style-dynamic-selector{position:relative;width:${inputWidth};}`, `.calendar-clear-button.__jsx-style-dynamic-selector{position:absolute;inset-inline-end:${rest.error || rest.warning ? '36px' : '6px'};-webkit-inset-block-start:27px;-ms-intb-rlock-start:27px;inset-block-start:27px;}`, ".calendar-clear-button.with-icon.__jsx-style-dynamic-selector{inset-inline-end:36px;}", ".calendar-clear-button.with-dense-wrapper.__jsx-style-dynamic-selector{-webkit-inset-block-start:23px;-ms-intb-rlock-start:23px;inset-block-start:23px;}"]));
|
|
161
161
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dhis2-ui/calendar",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.18.0",
|
|
4
4
|
"description": "UI Calendar",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -33,15 +33,15 @@
|
|
|
33
33
|
"styled-jsx": "^4"
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
|
-
"@dhis2-ui/button": "10.
|
|
37
|
-
"@dhis2-ui/card": "10.
|
|
38
|
-
"@dhis2-ui/input": "10.
|
|
39
|
-
"@dhis2-ui/layer": "10.
|
|
40
|
-
"@dhis2-ui/popper": "10.
|
|
36
|
+
"@dhis2-ui/button": "10.18.0",
|
|
37
|
+
"@dhis2-ui/card": "10.18.0",
|
|
38
|
+
"@dhis2-ui/input": "10.18.0",
|
|
39
|
+
"@dhis2-ui/layer": "10.18.0",
|
|
40
|
+
"@dhis2-ui/popper": "10.18.0",
|
|
41
41
|
"@dhis2/multi-calendar-dates": "2.1.2",
|
|
42
42
|
"@dhis2/prop-types": "^3.1.2",
|
|
43
|
-
"@dhis2/ui-constants": "10.
|
|
44
|
-
"@dhis2/ui-icons": "10.
|
|
43
|
+
"@dhis2/ui-constants": "10.18.0",
|
|
44
|
+
"@dhis2/ui-icons": "10.18.0",
|
|
45
45
|
"classnames": "^2.3.1",
|
|
46
46
|
"prop-types": "^15.7.2"
|
|
47
47
|
},
|
|
@@ -207,9 +207,9 @@ export const CalendarInput = ({
|
|
|
207
207
|
}
|
|
208
208
|
.calendar-clear-button {
|
|
209
209
|
position: absolute;
|
|
210
|
-
inset-inline-end: ${
|
|
211
|
-
? '36px'
|
|
212
|
-
|
|
210
|
+
inset-inline-end: ${
|
|
211
|
+
rest.error || rest.warning ? '36px' : '6px'
|
|
212
|
+
};
|
|
213
213
|
inset-block-start: 27px;
|
|
214
214
|
}
|
|
215
215
|
.calendar-clear-button.with-icon {
|
|
@@ -26,19 +26,18 @@ export default {
|
|
|
26
26
|
|
|
27
27
|
const buildCalendar =
|
|
28
28
|
({ date, locale, calendar }) =>
|
|
29
|
-
() =>
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
)
|
|
29
|
+
() => (
|
|
30
|
+
<CalendarStoryWrapper
|
|
31
|
+
component={CalendarInput}
|
|
32
|
+
dir="ltr"
|
|
33
|
+
timeZone="Africa/Khartoum"
|
|
34
|
+
weekDayFormat="short"
|
|
35
|
+
date={date}
|
|
36
|
+
locale={locale}
|
|
37
|
+
calendar={calendar}
|
|
38
|
+
onDateSelect={() => {}}
|
|
39
|
+
/>
|
|
40
|
+
)
|
|
42
41
|
|
|
43
42
|
export const EthiopicWithAmharic = buildCalendar({
|
|
44
43
|
calendar: 'ethiopic',
|