@spaced-out/ui-design-system 0.3.46 → 0.3.47
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 +14 -0
- package/lib/components/DateRangePicker/DateRangePicker.js +6 -2
- package/lib/components/DateRangePicker/DateRangePicker.js.flow +6 -0
- package/lib/components/DateRangePicker/DateRangeWrapper.js +4 -4
- package/lib/components/DateRangePicker/DateRangeWrapper.js.flow +4 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [0.3.47](https://github.com/spaced-out/ui-design-system/compare/v0.3.47-beta.0...v0.3.47) (2025-06-24)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
* added labels support for i18n ([#360](https://github.com/spaced-out/ui-design-system/issues/360)) ([f33f4ed](https://github.com/spaced-out/ui-design-system/commit/f33f4ed8fe8346c1c884d67fd8d9ea0cd0331602))
|
|
11
|
+
|
|
12
|
+
### [0.3.47-beta.0](https://github.com/spaced-out/ui-design-system/compare/v0.3.46...v0.3.47-beta.0) (2025-06-20)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **GDS-524:** render dropdown menus via portal for improved positioning ([#353](https://github.com/spaced-out/ui-design-system/issues/353)) ([3421218](https://github.com/spaced-out/ui-design-system/commit/342121840775dfa142307858f4d8ced40c311bfd))
|
|
18
|
+
|
|
5
19
|
### [0.3.46](https://github.com/spaced-out/ui-design-system/compare/v0.3.45...v0.3.46) (2025-06-17)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -24,7 +24,9 @@ const DateRangePicker = exports.DateRangePicker = /*#__PURE__*/React.forwardRef(
|
|
|
24
24
|
onCancel,
|
|
25
25
|
classNames,
|
|
26
26
|
hideTimezone = false,
|
|
27
|
-
selectedDateRange = {}
|
|
27
|
+
selectedDateRange = {},
|
|
28
|
+
startDateLabel,
|
|
29
|
+
endDateLabel
|
|
28
30
|
} = _ref;
|
|
29
31
|
const localTimezone = _momentTimezone.default.tz.guess();
|
|
30
32
|
const {
|
|
@@ -128,6 +130,8 @@ const DateRangePicker = exports.DateRangePicker = /*#__PURE__*/React.forwardRef(
|
|
|
128
130
|
setRangeEndMonth: setRangeEndMonthValidated,
|
|
129
131
|
hideTimezone: hideTimezone,
|
|
130
132
|
cardWrapperClass: (0, _classify.default)(_DateRangePickerModule.default.container, classNames?.wrapper),
|
|
131
|
-
today: today
|
|
133
|
+
today: today,
|
|
134
|
+
startDateLabel: startDateLabel,
|
|
135
|
+
endDateLabel: endDateLabel
|
|
132
136
|
});
|
|
133
137
|
});
|
|
@@ -45,6 +45,8 @@ export type DateRangePickerProps = {
|
|
|
45
45
|
hideTimezone?: boolean,
|
|
46
46
|
minDate?: string,
|
|
47
47
|
maxDate?: string,
|
|
48
|
+
startDateLabel?: string,
|
|
49
|
+
endDateLabel?: string,
|
|
48
50
|
};
|
|
49
51
|
|
|
50
52
|
export const DateRangePicker: React$AbstractComponent<
|
|
@@ -61,6 +63,8 @@ export const DateRangePicker: React$AbstractComponent<
|
|
|
61
63
|
classNames,
|
|
62
64
|
hideTimezone = false,
|
|
63
65
|
selectedDateRange = {},
|
|
66
|
+
startDateLabel,
|
|
67
|
+
endDateLabel,
|
|
64
68
|
}: DateRangePickerProps,
|
|
65
69
|
ref,
|
|
66
70
|
): React.Node => {
|
|
@@ -195,6 +199,8 @@ export const DateRangePicker: React$AbstractComponent<
|
|
|
195
199
|
hideTimezone={hideTimezone}
|
|
196
200
|
cardWrapperClass={classify(css.container, classNames?.wrapper)}
|
|
197
201
|
today={today}
|
|
202
|
+
startDateLabel={startDateLabel}
|
|
203
|
+
endDateLabel={endDateLabel}
|
|
198
204
|
/>
|
|
199
205
|
);
|
|
200
206
|
},
|
|
@@ -113,8 +113,8 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
113
113
|
cardWrapperClass,
|
|
114
114
|
hideTimezone,
|
|
115
115
|
today,
|
|
116
|
-
startDateLabel
|
|
117
|
-
endDateLabel
|
|
116
|
+
startDateLabel,
|
|
117
|
+
endDateLabel
|
|
118
118
|
} = _ref2;
|
|
119
119
|
const canNavigateCloser = _moment.default.utc(rangeStartMonth).year() !== _moment.default.utc(rangeEndMonth).year() || Math.abs(_moment.default.utc(rangeStartMonth).month() - _moment.default.utc(rangeEndMonth).month()) > 1;
|
|
120
120
|
const handleApplyClick = () => {
|
|
@@ -154,7 +154,7 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
154
154
|
}, /*#__PURE__*/React.createElement(_Text.BodySmall, {
|
|
155
155
|
className: _DateRangeWrapperModule.default.selectedDate,
|
|
156
156
|
color: _Text.TEXT_COLORS.secondary
|
|
157
|
-
}, `${startDateLabel}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_START, dateRange)}`), /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
157
|
+
}, `${startDateLabel || 'Start Date'}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_START, dateRange)}`), /*#__PURE__*/React.createElement(_Icon.Icon, {
|
|
158
158
|
name: "minus",
|
|
159
159
|
size: _Icon.ICON_SIZE.small,
|
|
160
160
|
type: _Icon.ICON_TYPE.regular,
|
|
@@ -162,7 +162,7 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
162
162
|
}), /*#__PURE__*/React.createElement(_Text.BodySmall, {
|
|
163
163
|
className: _DateRangeWrapperModule.default.selectedDate,
|
|
164
164
|
color: _Text.TEXT_COLORS.secondary
|
|
165
|
-
}, `${endDateLabel}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_END, dateRange)}`)), /*#__PURE__*/React.createElement("div", {
|
|
165
|
+
}, `${endDateLabel || 'End Date'}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_END, dateRange)}`)), /*#__PURE__*/React.createElement("div", {
|
|
166
166
|
className: _DateRangeWrapperModule.default.calendarMenuContainer
|
|
167
167
|
}, /*#__PURE__*/React.createElement(CalendarHeader, {
|
|
168
168
|
marker: _utils.MARKERS.DATE_RANGE_START,
|
|
@@ -188,8 +188,8 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
188
188
|
cardWrapperClass,
|
|
189
189
|
hideTimezone,
|
|
190
190
|
today,
|
|
191
|
-
startDateLabel
|
|
192
|
-
endDateLabel
|
|
191
|
+
startDateLabel,
|
|
192
|
+
endDateLabel,
|
|
193
193
|
}: DateRangeWrapperProps,
|
|
194
194
|
ref,
|
|
195
195
|
): React.Node => {
|
|
@@ -238,7 +238,7 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
238
238
|
className={css.selectedDate}
|
|
239
239
|
color={TEXT_COLORS.secondary}
|
|
240
240
|
>
|
|
241
|
-
{`${startDateLabel}: ${getFormattedDate(
|
|
241
|
+
{`${startDateLabel || 'Start Date'}: ${getFormattedDate(
|
|
242
242
|
MARKERS.DATE_RANGE_START,
|
|
243
243
|
dateRange,
|
|
244
244
|
)}`}
|
|
@@ -255,7 +255,7 @@ export const DateRangeWrapper: React$AbstractComponent<
|
|
|
255
255
|
className={css.selectedDate}
|
|
256
256
|
color={TEXT_COLORS.secondary}
|
|
257
257
|
>
|
|
258
|
-
{`${endDateLabel}: ${getFormattedDate(
|
|
258
|
+
{`${endDateLabel || 'End Date'}: ${getFormattedDate(
|
|
259
259
|
MARKERS.DATE_RANGE_END,
|
|
260
260
|
dateRange,
|
|
261
261
|
)}`}
|