@spaced-out/ui-design-system 0.5.12-beta.0 → 0.5.12
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 +6 -2
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.d.ts +0 -1
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTab/ButtonTab.js +0 -2
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts +1 -2
- package/lib/components/ButtonTabs/ButtonTabDropdown.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabDropdown.js +2 -19
- package/lib/components/ButtonTabs/ButtonTabs.d.ts +0 -1
- package/lib/components/ButtonTabs/ButtonTabs.d.ts.map +1 -1
- package/lib/components/ButtonTabs/ButtonTabs.js +4 -19
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts +0 -1
- package/lib/components/Charts/ChartWrapper/ChartWrapper.d.ts.map +1 -1
- package/lib/components/Charts/ChartWrapper/ChartWrapper.js +5 -37
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts +1 -2
- package/lib/components/Charts/ColumnChart/ColumnChart.d.ts.map +1 -1
- package/lib/components/Charts/ColumnChart/ColumnChart.js +0 -2
- package/lib/components/Charts/DonutChart/DonutChart.d.ts +1 -2
- package/lib/components/Charts/DonutChart/DonutChart.d.ts.map +1 -1
- package/lib/components/Charts/DonutChart/DonutChart.js +0 -2
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts +1 -2
- package/lib/components/Charts/FunnelChart/FunnelChart.d.ts.map +1 -1
- package/lib/components/Charts/FunnelChart/FunnelChart.js +0 -2
- package/lib/components/Charts/LineChart/LineChart.d.ts +1 -2
- package/lib/components/Charts/LineChart/LineChart.d.ts.map +1 -1
- package/lib/components/Charts/LineChart/LineChart.js +0 -2
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts +1 -2
- package/lib/components/Charts/SankeyChart/SankeyChart.d.ts.map +1 -1
- package/lib/components/Charts/SankeyChart/SankeyChart.js +0 -2
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts +1 -2
- package/lib/components/Charts/SpiderChart/SpiderChart.d.ts.map +1 -1
- package/lib/components/Charts/SpiderChart/SpiderChart.js +0 -2
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts +1 -2
- package/lib/components/Charts/StackedBarChart/StackedBarChart.d.ts.map +1 -1
- package/lib/components/Charts/StackedBarChart/StackedBarChart.js +0 -2
- package/lib/components/Combobox/Combobox.d.ts +0 -1
- package/lib/components/Combobox/Combobox.d.ts.map +1 -1
- package/lib/components/Combobox/Combobox.js +3 -45
- package/lib/components/DateRangePicker/Calendar.d.ts +1 -2
- package/lib/components/DateRangePicker/Calendar.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Calendar.js +2 -24
- package/lib/components/DateRangePicker/DateRangePicker.d.ts +0 -1
- package/lib/components/DateRangePicker/DateRangePicker.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangePicker.js +2 -4
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts +0 -1
- package/lib/components/DateRangePicker/DateRangeWrapper.d.ts.map +1 -1
- package/lib/components/DateRangePicker/DateRangeWrapper.js +14 -104
- package/lib/components/DateRangePicker/Day.d.ts +1 -2
- package/lib/components/DateRangePicker/Day.d.ts.map +1 -1
- package/lib/components/DateRangePicker/Day.js +1 -11
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.d.ts +0 -1
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.d.ts.map +1 -1
- package/lib/components/FilterButtonOverlay/FilterButtonOverlay.js +1 -18
- package/lib/components/InfinitePagination/InfinitePagination.d.ts +0 -1
- package/lib/components/InfinitePagination/InfinitePagination.d.ts.map +1 -1
- package/lib/components/InfinitePagination/InfinitePagination.js +3 -20
- package/lib/components/InlineDropdown/InlineDropdown.d.ts +0 -1
- package/lib/components/InlineDropdown/InlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/InlineDropdown.js +2 -27
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts +1 -2
- package/lib/components/InlineDropdown/SimpleInlineDropdown.d.ts.map +1 -1
- package/lib/components/InlineDropdown/SimpleInlineDropdown.js +0 -2
- package/lib/components/OptionButton/OptionButton.d.ts +0 -1
- package/lib/components/OptionButton/OptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/OptionButton.js +2 -20
- package/lib/components/OptionButton/SimpleOptionButton.d.ts +1 -2
- package/lib/components/OptionButton/SimpleOptionButton.d.ts.map +1 -1
- package/lib/components/OptionButton/SimpleOptionButton.js +0 -2
- package/lib/components/Pagination/Pagination.d.ts +0 -2
- package/lib/components/Pagination/Pagination.d.ts.map +1 -1
- package/lib/components/Pagination/Pagination.js +3 -33
- package/lib/components/Pagination/PaginationItem.d.ts.map +1 -1
- package/lib/components/Pagination/PaginationItem.js +5 -31
- package/lib/components/Table/Cell.d.ts +7 -13
- package/lib/components/Table/Cell.d.ts.map +1 -1
- package/lib/components/Table/Cell.js +9 -40
- package/lib/components/Table/DefaultRow.d.ts +2 -5
- package/lib/components/Table/DefaultRow.d.ts.map +1 -1
- package/lib/components/Table/DefaultRow.js +6 -38
- package/lib/components/Table/DefaultTableHeader.d.ts +0 -2
- package/lib/components/Table/DefaultTableHeader.d.ts.map +1 -1
- package/lib/components/Table/DefaultTableHeader.js +2 -17
- package/lib/components/Table/StaticTable.d.ts.map +1 -1
- package/lib/components/Table/StaticTable.js +11 -45
- package/lib/components/Table/Table.d.ts +0 -1
- package/lib/components/Table/Table.d.ts.map +1 -1
- package/lib/components/Table/Table.docs.d.ts +0 -11
- package/lib/components/Table/Table.docs.d.ts.map +1 -1
- package/lib/components/Table/Table.docs.js +0 -11
- package/lib/components/Table/Table.js +3 -6
- package/lib/components/Table/TableActionBar.d.ts +3 -8
- package/lib/components/Table/TableActionBar.d.ts.map +1 -1
- package/lib/components/Table/TableActionBar.js +3 -16
- package/lib/components/Table/TableBottomBar.d.ts +1 -2
- package/lib/components/Table/TableBottomBar.d.ts.map +1 -1
- package/lib/components/Table/TableBottomBar.js +1 -6
- package/lib/components/Table/TableTopBar.d.ts +1 -2
- package/lib/components/Table/TableTopBar.d.ts.map +1 -1
- package/lib/components/Table/TableTopBar.js +1 -6
- package/lib/components/Tabs/Tab/Tab.d.ts +0 -1
- package/lib/components/Tabs/Tab/Tab.d.ts.map +1 -1
- package/lib/components/Tabs/Tab/Tab.js +1 -9
- package/lib/components/Tabs/TabList/TabDropdown.d.ts +1 -2
- package/lib/components/Tabs/TabList/TabDropdown.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabDropdown.js +4 -21
- package/lib/components/Tabs/TabList/TabList.d.ts +0 -1
- package/lib/components/Tabs/TabList/TabList.d.ts.map +1 -1
- package/lib/components/Tabs/TabList/TabList.js +5 -20
- package/lib/components/Timeline/Timeline.d.ts.map +1 -1
- package/lib/components/Timeline/Timeline.js +1 -0
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts +1 -0
- package/lib/components/Timeline/TimelineItem/TimelineItem.d.ts.map +1 -1
- package/lib/components/Timeline/TimelineItem/TimelineItem.js +2 -1
- package/lib/components/TokenListInput/TokenListInput.d.ts +0 -1
- package/lib/components/TokenListInput/TokenListInput.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenListInput.js +7 -56
- package/lib/components/TokenListInput/TokenValueChips.d.ts +0 -2
- package/lib/components/TokenListInput/TokenValueChips.d.ts.map +1 -1
- package/lib/components/TokenListInput/TokenValueChips.js +3 -12
- package/package.json +1 -1
|
@@ -6,7 +6,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.Combobox = void 0;
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
9
|
-
var _qa = require("../../utils/qa");
|
|
10
9
|
var _Dropdown = require("../Dropdown");
|
|
11
10
|
var _Input = require("../Input");
|
|
12
11
|
var _Text = require("../Text");
|
|
@@ -58,8 +57,7 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
58
57
|
onDropdownContainerClick,
|
|
59
58
|
dropdownName,
|
|
60
59
|
dropdownPlaceholder,
|
|
61
|
-
dropdownBoxRef
|
|
62
|
-
testId
|
|
60
|
+
dropdownBoxRef
|
|
63
61
|
} = props;
|
|
64
62
|
const inputRef = React.useRef(null);
|
|
65
63
|
const dropdownRef = React.useRef(null);
|
|
@@ -106,31 +104,15 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
106
104
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
107
105
|
ref: ref,
|
|
108
106
|
className: (0, _classify.default)(_ComboboxModule.default.wrapper, classNames?.wrapper),
|
|
109
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
110
|
-
base: testId,
|
|
111
|
-
slot: 'root'
|
|
112
|
-
}),
|
|
113
107
|
children: [Boolean(label) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
114
108
|
className: _ComboboxModule.default.info,
|
|
115
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
116
|
-
base: testId,
|
|
117
|
-
slot: 'label'
|
|
118
|
-
}),
|
|
119
109
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
120
110
|
className: _ComboboxModule.default.infoContent,
|
|
121
111
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
122
112
|
color: "secondary",
|
|
123
|
-
testId: (0, _qa.generateTestId)({
|
|
124
|
-
base: testId,
|
|
125
|
-
slot: 'label-text'
|
|
126
|
-
}),
|
|
127
113
|
children: label ?? ''
|
|
128
114
|
}), "\xA0", required && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.FormLabelSmall, {
|
|
129
115
|
color: "danger",
|
|
130
|
-
testId: (0, _qa.generateTestId)({
|
|
131
|
-
base: testId,
|
|
132
|
-
slot: 'required'
|
|
133
|
-
}),
|
|
134
116
|
children: "*"
|
|
135
117
|
})]
|
|
136
118
|
})
|
|
@@ -140,10 +122,6 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
140
122
|
}, classNames?.box),
|
|
141
123
|
onClick: !(disabled || locked) ? onContainerClick : undefined,
|
|
142
124
|
ref: boxRef,
|
|
143
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
144
|
-
base: testId,
|
|
145
|
-
slot: 'box'
|
|
146
|
-
}),
|
|
147
125
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
148
126
|
ref: dropdownRef,
|
|
149
127
|
menu: menu,
|
|
@@ -169,11 +147,7 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
169
147
|
onBlur: onDropdownBlur,
|
|
170
148
|
onKeyDown: onDropdownKeyDown,
|
|
171
149
|
onContainerClick: onDropdownContainerClick,
|
|
172
|
-
name: dropdownName
|
|
173
|
-
testId: (0, _qa.generateTestId)({
|
|
174
|
-
base: testId,
|
|
175
|
-
slot: 'dropdown'
|
|
176
|
-
})
|
|
150
|
+
name: dropdownName
|
|
177
151
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Input.Input, {
|
|
178
152
|
ref: inputRef,
|
|
179
153
|
boxRef: inputBoxRef,
|
|
@@ -208,31 +182,15 @@ const Combobox = exports.Combobox = /*#__PURE__*/React.forwardRef((props, ref) =
|
|
|
208
182
|
maxLength: maxLength,
|
|
209
183
|
pattern: pattern,
|
|
210
184
|
min: min,
|
|
211
|
-
max: max
|
|
212
|
-
testId: (0, _qa.generateTestId)({
|
|
213
|
-
base: testId,
|
|
214
|
-
slot: 'input'
|
|
215
|
-
})
|
|
185
|
+
max: max
|
|
216
186
|
})]
|
|
217
187
|
}), (Boolean(helperText) || error) && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
218
188
|
className: _ComboboxModule.default.info,
|
|
219
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
220
|
-
base: testId,
|
|
221
|
-
slot: 'helper'
|
|
222
|
-
}),
|
|
223
189
|
children: error && errorText ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
224
190
|
color: "danger",
|
|
225
|
-
testId: (0, _qa.generateTestId)({
|
|
226
|
-
base: testId,
|
|
227
|
-
slot: 'error'
|
|
228
|
-
}),
|
|
229
191
|
children: errorText
|
|
230
192
|
}) : typeof helperText === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
231
193
|
color: disabled ? 'disabled' : 'secondary',
|
|
232
|
-
testId: (0, _qa.generateTestId)({
|
|
233
|
-
base: testId,
|
|
234
|
-
slot: 'helper-text'
|
|
235
|
-
}),
|
|
236
194
|
children: helperText
|
|
237
195
|
}) : helperText
|
|
238
196
|
})]
|
|
@@ -16,8 +16,7 @@ interface CalendarProps {
|
|
|
16
16
|
};
|
|
17
17
|
today: string;
|
|
18
18
|
t: ((key: string, fallback: string) => string) | null | undefined;
|
|
19
|
-
testId?: string;
|
|
20
19
|
}
|
|
21
|
-
export declare const Calendar: ({ value, minDate, maxDate, handlers, hoverDay, dateRange, inHoverRange, today, t,
|
|
20
|
+
export declare const Calendar: ({ value, minDate, maxDate, handlers, hoverDay, dateRange, inHoverRange, today, t, }: CalendarProps) => React.JSX.Element;
|
|
22
21
|
export {};
|
|
23
22
|
//# sourceMappingURL=Calendar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAC,OAAO,EAAE,iBAAiB,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Calendar.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/Calendar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,WAAW,CAAC;AACzC,OAAO,KAAK,EAAC,OAAO,EAAE,iBAAiB,EAAC,MAAM,WAAW,CAAC;AAuB1D,UAAU,aAAa;IACrB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,CAAC;IAC/C,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,SAAS,CAAC;IACrB,YAAY,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;IACvC,QAAQ,EAAE;QACR,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAClC,UAAU,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;QAClC,eAAe,EAAE,CACf,MAAM,EAAE,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,EAC9C,MAAM,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,KAC/D,IAAI,CAAC;KACX,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;CACnE;AAED,eAAO,MAAM,QAAQ,GAAI,qFAUtB,aAAa,sBAgDf,CAAC"}
|
|
@@ -8,7 +8,6 @@ var React = _interopRequireWildcard(require("react"));
|
|
|
8
8
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _dateRangePicker = require("../../utils/date-range-picker");
|
|
11
|
-
var _qa = require("../../utils/qa");
|
|
12
11
|
var _Day = require("./Day");
|
|
13
12
|
var _Text = require("../Text");
|
|
14
13
|
var _CalendarModule = _interopRequireDefault(require("./Calendar.module.css"));
|
|
@@ -25,36 +24,19 @@ const Calendar = _ref => {
|
|
|
25
24
|
dateRange,
|
|
26
25
|
inHoverRange,
|
|
27
26
|
today,
|
|
28
|
-
t
|
|
29
|
-
testId
|
|
27
|
+
t
|
|
30
28
|
} = _ref;
|
|
31
29
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
32
30
|
className: _CalendarModule.default.calendar,
|
|
33
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
34
|
-
base: testId,
|
|
35
|
-
slot: `calendar-${value}`
|
|
36
|
-
}),
|
|
37
31
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
38
32
|
className: _CalendarModule.default.calendarRow,
|
|
39
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
40
|
-
base: testId,
|
|
41
|
-
slot: 'weekdays'
|
|
42
|
-
}),
|
|
43
33
|
children: _utils.WEEKDAYS.map(day => /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
44
34
|
className: _CalendarModule.default.calendarRowItem,
|
|
45
35
|
color: _Text.TEXT_COLORS.tertiary,
|
|
46
|
-
testId: (0, _qa.generateTestId)({
|
|
47
|
-
base: testId,
|
|
48
|
-
slot: `weekday-${day}`
|
|
49
|
-
}),
|
|
50
36
|
children: (0, _dateRangePicker.getTranslation)(t, day)
|
|
51
37
|
}, day))
|
|
52
38
|
}), (0, _utils.getDaysInMonth)(value).map((week, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
53
39
|
className: _CalendarModule.default.calendarRow,
|
|
54
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
55
|
-
base: testId,
|
|
56
|
-
slot: `week-${index}`
|
|
57
|
-
}),
|
|
58
40
|
children: week.map(date => {
|
|
59
41
|
const isRangeValid = (0, _utils.isStartDateEndDateSame)(dateRange);
|
|
60
42
|
const isStart = (0, _utils.isStartOfRange)(dateRange, date);
|
|
@@ -76,11 +58,7 @@ const Calendar = _ref => {
|
|
|
76
58
|
highlighted: highlighted && !isRangeValid,
|
|
77
59
|
startOfRange: isStart && !isRangeValid,
|
|
78
60
|
value: dateValue.date().toString(),
|
|
79
|
-
hoverDay: hoverDay
|
|
80
|
-
testId: (0, _qa.generateTestId)({
|
|
81
|
-
base: testId,
|
|
82
|
-
slot: `day-${date}`
|
|
83
|
-
})
|
|
61
|
+
hoverDay: hoverDay
|
|
84
62
|
}, date);
|
|
85
63
|
})
|
|
86
64
|
}, week[index]))]
|
|
@@ -16,7 +16,6 @@ export interface DateRangePickerProps {
|
|
|
16
16
|
endDateLabel?: string;
|
|
17
17
|
t?: ((key: string, fallback: string) => string) | null | undefined;
|
|
18
18
|
locale?: string;
|
|
19
|
-
testId?: string;
|
|
20
19
|
}
|
|
21
20
|
export declare const DateRangePicker: Flow.AbstractComponent<DateRangePickerProps, HTMLDivElement>;
|
|
22
21
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangePicker.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangePicker.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAEV,oBAAoB,EACpB,qBAAqB,EACtB,MAAM,WAAW,CAAC;AAyBnB,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAEH,MAAM,WAAW,oBAAoB;IACnC,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,iBAAiB,CAAC,EAAE,qBAAqB,CAAC;IAC1C,OAAO,EAA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AE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,eAAe,EAAE,IAAI,CAAC,iBAAiB,CAClD,oBAAoB,EACpB,cAAc,CA8Jf,CAAC"}
|
|
@@ -28,8 +28,7 @@ const DateRangePicker = exports.DateRangePicker = /*#__PURE__*/React.forwardRef(
|
|
|
28
28
|
startDateLabel,
|
|
29
29
|
endDateLabel,
|
|
30
30
|
t,
|
|
31
|
-
locale
|
|
32
|
-
testId
|
|
31
|
+
locale
|
|
33
32
|
} = _ref;
|
|
34
33
|
const localTimezone = _momentTimezone.default.tz.guess();
|
|
35
34
|
const {
|
|
@@ -138,7 +137,6 @@ const DateRangePicker = exports.DateRangePicker = /*#__PURE__*/React.forwardRef(
|
|
|
138
137
|
startDateLabel: startDateLabel,
|
|
139
138
|
endDateLabel: endDateLabel,
|
|
140
139
|
t: t,
|
|
141
|
-
locale: locale
|
|
142
|
-
testId: testId
|
|
140
|
+
locale: locale
|
|
143
141
|
});
|
|
144
142
|
});
|
|
@@ -27,7 +27,6 @@ interface DateRangeWrapperProps {
|
|
|
27
27
|
endDateLabel?: string;
|
|
28
28
|
t?: ((key: string, fallback: string) => string) | null | undefined;
|
|
29
29
|
locale?: string;
|
|
30
|
-
testId?: string;
|
|
31
30
|
}
|
|
32
31
|
export declare const DateRangeWrapper: Flow.AbstractComponent<DateRangeWrapperProps, HTMLDivElement>;
|
|
33
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DateRangeWrapper.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/DateRangeWrapper.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAC,IAAI,EAAC,MA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AAM,KAAK,IAAI,CAAC;QAClC,eAAe,EAAE,CACf,MAAM,EAAE,CAAC,OAAO,OAAO,CAAC,CAAC,MAAM,OAAO,OAAO,CAAC,EAC9C,MAAM,EAAE,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,OAAO,iBAAiB,CAAC,KAC/D,IAAI,CAAC;KACX,CAAC;IACF,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,KAAK,MAAM,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAyFD,eAAO,MAAM,gBAAgB,EAAE,IAAI,CAAC,iBAAiB,CACnD,qBAAqB,EACrB,cAAc,CA8Mf,CAAC"}
|
|
@@ -9,7 +9,6 @@ var _moment = _interopRequireDefault(require("moment"));
|
|
|
9
9
|
var _utils = require("../../utils");
|
|
10
10
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
11
11
|
var _dateRangePicker = require("../../utils/date-range-picker");
|
|
12
|
-
var _qa = require("../../utils/qa");
|
|
13
12
|
var _Button = require("../Button");
|
|
14
13
|
var _Card = require("../Card");
|
|
15
14
|
var _Calendar = require("./Calendar");
|
|
@@ -34,8 +33,7 @@ const CalendarHeader = _ref => {
|
|
|
34
33
|
onClickNext,
|
|
35
34
|
nextDisabled,
|
|
36
35
|
prevDisabled,
|
|
37
|
-
onClickPrevious
|
|
38
|
-
testId
|
|
36
|
+
onClickPrevious
|
|
39
37
|
} = _ref;
|
|
40
38
|
const availableYears = (0, _utils.generateAvailableYears)({
|
|
41
39
|
marker,
|
|
@@ -55,10 +53,6 @@ const CalendarHeader = _ref => {
|
|
|
55
53
|
const MONTHS = (0, _utils.getMonths)(t);
|
|
56
54
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
57
55
|
className: _DateRangeWrapperModule.default.calendarHeader,
|
|
58
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
59
|
-
base: testId,
|
|
60
|
-
slot: `header-${marker}`
|
|
61
|
-
}),
|
|
62
56
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.ClickableIcon, {
|
|
63
57
|
ariaLabel: (0, _dateRangePicker.getTranslation)(t, 'Select Previous Month'),
|
|
64
58
|
size: "small",
|
|
@@ -67,11 +61,7 @@ const CalendarHeader = _ref => {
|
|
|
67
61
|
[_DateRangeWrapperModule.default.disabledIcon]: prevDisabled
|
|
68
62
|
}),
|
|
69
63
|
onClick: () => !prevDisabled && onClickPrevious(),
|
|
70
|
-
color: prevDisabled ? 'disabled' : 'secondary'
|
|
71
|
-
testId: (0, _qa.generateTestId)({
|
|
72
|
-
base: testId,
|
|
73
|
-
slot: `prev-button-${marker}`
|
|
74
|
-
})
|
|
64
|
+
color: prevDisabled ? 'disabled' : 'secondary'
|
|
75
65
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
76
66
|
size: "small",
|
|
77
67
|
disabled: !availableMonths.length || (0, _dateRangePicker.isAfter)(minDate, maxDate),
|
|
@@ -83,11 +73,7 @@ const CalendarHeader = _ref => {
|
|
|
83
73
|
setMonth((0, _utils.getMonthEndDate)(_moment.default.utc(date).set('M', Number(event.key))));
|
|
84
74
|
},
|
|
85
75
|
dropdownInputText: MONTHS[_moment.default.utc(date).month()].label,
|
|
86
|
-
scrollMenuToBottom: true
|
|
87
|
-
testId: (0, _qa.generateTestId)({
|
|
88
|
-
base: testId,
|
|
89
|
-
slot: `month-dropdown-${marker}`
|
|
90
|
-
})
|
|
76
|
+
scrollMenuToBottom: true
|
|
91
77
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
92
78
|
disabled: !availableYears.length || (0, _dateRangePicker.isAfter)(minDate, maxDate),
|
|
93
79
|
menu: {
|
|
@@ -99,11 +85,7 @@ const CalendarHeader = _ref => {
|
|
|
99
85
|
setMonth((0, _utils.getMonthEndDate)(_moment.default.utc(date).set('y', Number(event.key))));
|
|
100
86
|
},
|
|
101
87
|
dropdownInputText: _moment.default.utc(date).year().toString(),
|
|
102
|
-
scrollMenuToBottom: true
|
|
103
|
-
testId: (0, _qa.generateTestId)({
|
|
104
|
-
base: testId,
|
|
105
|
-
slot: `year-dropdown-${marker}`
|
|
106
|
-
})
|
|
88
|
+
scrollMenuToBottom: true
|
|
107
89
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.ClickableIcon, {
|
|
108
90
|
size: "small",
|
|
109
91
|
ariaLabel: (0, _dateRangePicker.getTranslation)(t, 'Select Next Month'),
|
|
@@ -112,11 +94,7 @@ const CalendarHeader = _ref => {
|
|
|
112
94
|
[_DateRangeWrapperModule.default.disabledIcon]: nextDisabled
|
|
113
95
|
}),
|
|
114
96
|
onClick: () => !nextDisabled && onClickNext(),
|
|
115
|
-
color: nextDisabled ? 'disabled' : 'secondary'
|
|
116
|
-
testId: (0, _qa.generateTestId)({
|
|
117
|
-
base: testId,
|
|
118
|
-
slot: `next-button-${marker}`
|
|
119
|
-
})
|
|
97
|
+
color: nextDisabled ? 'disabled' : 'secondary'
|
|
120
98
|
})]
|
|
121
99
|
});
|
|
122
100
|
};
|
|
@@ -142,8 +120,7 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
142
120
|
startDateLabel,
|
|
143
121
|
endDateLabel,
|
|
144
122
|
t,
|
|
145
|
-
locale
|
|
146
|
-
testId
|
|
123
|
+
locale
|
|
147
124
|
} = _ref2;
|
|
148
125
|
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;
|
|
149
126
|
const handleApplyClick = () => {
|
|
@@ -172,8 +149,7 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
172
149
|
minDate,
|
|
173
150
|
maxDate,
|
|
174
151
|
today,
|
|
175
|
-
t
|
|
176
|
-
testId
|
|
152
|
+
t
|
|
177
153
|
};
|
|
178
154
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_FocusManager.FocusManager, {
|
|
179
155
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.Card, {
|
|
@@ -181,48 +157,24 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
181
157
|
wrapper: (0, _classify.default)(_DateRangeWrapperModule.default.dateRangeWrapper, cardWrapperClass)
|
|
182
158
|
},
|
|
183
159
|
ref: ref,
|
|
184
|
-
testId: (0, _qa.generateTestId)({
|
|
185
|
-
base: testId,
|
|
186
|
-
slot: 'card'
|
|
187
|
-
}),
|
|
188
160
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.CardHeader, {
|
|
189
161
|
className: _DateRangeWrapperModule.default.cardHeader,
|
|
190
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
191
|
-
base: testId,
|
|
192
|
-
slot: 'header'
|
|
193
|
-
}),
|
|
194
162
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
195
163
|
className: _DateRangeWrapperModule.default.selectedDate,
|
|
196
164
|
color: _Text.TEXT_COLORS.secondary,
|
|
197
|
-
testId: (0, _qa.generateTestId)({
|
|
198
|
-
base: testId,
|
|
199
|
-
slot: 'start-date-label'
|
|
200
|
-
}),
|
|
201
165
|
children: `${startDateLabel || (0, _dateRangePicker.getTranslation)(t, 'Start Date')}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_START, dateRange, locale)}`
|
|
202
166
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Icon.Icon, {
|
|
203
167
|
name: "minus",
|
|
204
168
|
size: _Icon.ICON_SIZE.small,
|
|
205
169
|
type: _Icon.ICON_TYPE.regular,
|
|
206
|
-
color: _Text.TEXT_COLORS.secondary
|
|
207
|
-
testId: (0, _qa.generateTestId)({
|
|
208
|
-
base: testId,
|
|
209
|
-
slot: 'separator-icon'
|
|
210
|
-
})
|
|
170
|
+
color: _Text.TEXT_COLORS.secondary
|
|
211
171
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodySmall, {
|
|
212
172
|
className: _DateRangeWrapperModule.default.selectedDate,
|
|
213
173
|
color: _Text.TEXT_COLORS.secondary,
|
|
214
|
-
testId: (0, _qa.generateTestId)({
|
|
215
|
-
base: testId,
|
|
216
|
-
slot: 'end-date-label'
|
|
217
|
-
}),
|
|
218
174
|
children: `${endDateLabel || (0, _dateRangePicker.getTranslation)(t, 'End Date')}: ${(0, _dateRangePicker.getFormattedDate)(_utils.MARKERS.DATE_RANGE_END, dateRange, locale)}`
|
|
219
175
|
})]
|
|
220
176
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
221
177
|
className: _DateRangeWrapperModule.default.calendarMenuContainer,
|
|
222
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
223
|
-
base: testId,
|
|
224
|
-
slot: 'calendar-menu-container'
|
|
225
|
-
}),
|
|
226
178
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(CalendarHeader, {
|
|
227
179
|
t: t,
|
|
228
180
|
marker: _utils.MARKERS.DATE_RANGE_START,
|
|
@@ -235,8 +187,7 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
235
187
|
minDate: minDate,
|
|
236
188
|
maxDate: maxDate,
|
|
237
189
|
onClickNext: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_START, _utils.NAVIGATION_ACTION.NEXT),
|
|
238
|
-
onClickPrevious: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_START, _utils.NAVIGATION_ACTION.PREV)
|
|
239
|
-
testId: testId
|
|
190
|
+
onClickPrevious: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_START, _utils.NAVIGATION_ACTION.PREV)
|
|
240
191
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(CalendarHeader, {
|
|
241
192
|
t: t,
|
|
242
193
|
marker: _utils.MARKERS.DATE_RANGE_END,
|
|
@@ -249,50 +200,25 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
249
200
|
minDate: minDate,
|
|
250
201
|
maxDate: maxDate,
|
|
251
202
|
onClickNext: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_END, _utils.NAVIGATION_ACTION.NEXT),
|
|
252
|
-
onClickPrevious: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_END, _utils.NAVIGATION_ACTION.PREV)
|
|
253
|
-
testId: testId
|
|
203
|
+
onClickPrevious: () => onMonthNavigate(_utils.MARKERS.DATE_RANGE_END, _utils.NAVIGATION_ACTION.PREV)
|
|
254
204
|
})]
|
|
255
205
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.CardContent, {
|
|
256
206
|
className: _DateRangeWrapperModule.default.dateRangeCalendars,
|
|
257
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
258
|
-
base: testId,
|
|
259
|
-
slot: 'calendars'
|
|
260
|
-
}),
|
|
261
207
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Calendar.Calendar, {
|
|
262
208
|
marker: _utils.MARKERS.DATE_RANGE_START,
|
|
263
209
|
value: rangeStartMonth,
|
|
264
|
-
...commonProps
|
|
265
|
-
testId: (0, _qa.generateTestId)({
|
|
266
|
-
base: testId,
|
|
267
|
-
slot: 'start-calendar'
|
|
268
|
-
})
|
|
210
|
+
...commonProps
|
|
269
211
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
270
|
-
className: _DateRangeWrapperModule.default.divider
|
|
271
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
272
|
-
base: testId,
|
|
273
|
-
slot: 'divider'
|
|
274
|
-
})
|
|
212
|
+
className: _DateRangeWrapperModule.default.divider
|
|
275
213
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Calendar.Calendar, {
|
|
276
214
|
marker: _utils.MARKERS.DATE_RANGE_END,
|
|
277
215
|
value: rangeEndMonth,
|
|
278
|
-
...commonProps
|
|
279
|
-
testId: (0, _qa.generateTestId)({
|
|
280
|
-
base: testId,
|
|
281
|
-
slot: 'end-calendar'
|
|
282
|
-
})
|
|
216
|
+
...commonProps
|
|
283
217
|
})]
|
|
284
218
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.CardFooter, {
|
|
285
219
|
className: _DateRangeWrapperModule.default.cardFooter,
|
|
286
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
287
|
-
base: testId,
|
|
288
|
-
slot: 'footer'
|
|
289
|
-
}),
|
|
290
220
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Card.CardTitle, {
|
|
291
221
|
className: _DateRangeWrapperModule.default.timezoneDropdownContainer,
|
|
292
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
293
|
-
base: testId,
|
|
294
|
-
slot: 'timezone-container'
|
|
295
|
-
}),
|
|
296
222
|
children: !hideTimezone && /*#__PURE__*/(0, _jsxRuntime.jsx)(_Dropdown.Dropdown, {
|
|
297
223
|
menu: {
|
|
298
224
|
selectedKeys: [timezone],
|
|
@@ -313,34 +239,18 @@ const DateRangeWrapper = exports.DateRangeWrapper = /*#__PURE__*/React.forwardRe
|
|
|
313
239
|
box: _DateRangeWrapperModule.default.timezoneDropdown
|
|
314
240
|
},
|
|
315
241
|
onChange: event => setTimezone(event.key),
|
|
316
|
-
size: "small"
|
|
317
|
-
testId: (0, _qa.generateTestId)({
|
|
318
|
-
base: testId,
|
|
319
|
-
slot: 'timezone-dropdown'
|
|
320
|
-
})
|
|
242
|
+
size: "small"
|
|
321
243
|
})
|
|
322
244
|
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_Card.CardActions, {
|
|
323
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
324
|
-
base: testId,
|
|
325
|
-
slot: 'actions'
|
|
326
|
-
}),
|
|
327
245
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
328
246
|
type: "ghost",
|
|
329
247
|
onClick: onCancel,
|
|
330
248
|
size: "small",
|
|
331
|
-
testId: (0, _qa.generateTestId)({
|
|
332
|
-
base: testId,
|
|
333
|
-
slot: 'cancel-button'
|
|
334
|
-
}),
|
|
335
249
|
children: (0, _dateRangePicker.getTranslation)(t, 'Cancel')
|
|
336
250
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.Button, {
|
|
337
251
|
onClick: handleApplyClick,
|
|
338
252
|
size: "small",
|
|
339
253
|
disabled: !(dateRange.startDate && dateRange.endDate),
|
|
340
|
-
testId: (0, _qa.generateTestId)({
|
|
341
|
-
base: testId,
|
|
342
|
-
slot: 'apply-button'
|
|
343
|
-
}),
|
|
344
254
|
children: (0, _dateRangePicker.getTranslation)(t, 'Apply')
|
|
345
255
|
})]
|
|
346
256
|
})]
|
|
@@ -11,8 +11,7 @@ interface DayProps {
|
|
|
11
11
|
startOfRange: boolean;
|
|
12
12
|
onClick: () => void;
|
|
13
13
|
onHover: () => void;
|
|
14
|
-
testId?: string;
|
|
15
14
|
}
|
|
16
|
-
export declare const Day: ({ date, value, filled, onHover, onClick, disabled, hoverDay, outlined, endOfRange, highlighted, startOfRange,
|
|
15
|
+
export declare const Day: ({ date, value, filled, onHover, onClick, disabled, hoverDay, outlined, endOfRange, highlighted, startOfRange, }: DayProps) => React.JSX.Element;
|
|
17
16
|
export {};
|
|
18
17
|
//# sourceMappingURL=Day.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Day.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/Day.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"Day.d.ts","sourceRoot":"","sources":["../../../src/components/DateRangePicker/Day.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAY/B,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,OAAO,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;IAClB,UAAU,EAAE,OAAO,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,OAAO,CAAC;IACtB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB;AAYD,eAAO,MAAM,GAAG,GAAI,iHAYjB,QAAQ,sBAwBV,CAAC"}
|
|
@@ -7,7 +7,6 @@ exports.Day = void 0;
|
|
|
7
7
|
var React = _interopRequireWildcard(require("react"));
|
|
8
8
|
var _moment = _interopRequireDefault(require("moment"));
|
|
9
9
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
10
|
-
var _qa = require("../../utils/qa");
|
|
11
10
|
var _Button = require("../Button");
|
|
12
11
|
var _Text = require("../Text");
|
|
13
12
|
var _DayModule = _interopRequireDefault(require("./Day.module.css"));
|
|
@@ -35,8 +34,7 @@ const Day = _ref => {
|
|
|
35
34
|
outlined,
|
|
36
35
|
endOfRange,
|
|
37
36
|
highlighted,
|
|
38
|
-
startOfRange
|
|
39
|
-
testId
|
|
37
|
+
startOfRange
|
|
40
38
|
} = _ref;
|
|
41
39
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_Button.UnstyledButton, {
|
|
42
40
|
tabIndex: disabled ? -1 : 0,
|
|
@@ -47,10 +45,6 @@ const Day = _ref => {
|
|
|
47
45
|
onMouseOver: onHover,
|
|
48
46
|
onClick: onClick,
|
|
49
47
|
onKeyUp: onHover,
|
|
50
|
-
testId: (0, _qa.generateTestId)({
|
|
51
|
-
base: testId,
|
|
52
|
-
slot: `day-button-${date}`
|
|
53
|
-
}),
|
|
54
48
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_Text.BodyMedium, {
|
|
55
49
|
color: getTextColor(disabled, filled),
|
|
56
50
|
className: (0, _classify.default)(_DayModule.default.calendarRowItem, {
|
|
@@ -58,10 +52,6 @@ const Day = _ref => {
|
|
|
58
52
|
[_DayModule.default.calendarRowItemFilled]: !disabled && filled,
|
|
59
53
|
[_DayModule.default.calendarRowItemOutlined]: outlined
|
|
60
54
|
}),
|
|
61
|
-
testId: (0, _qa.generateTestId)({
|
|
62
|
-
base: testId,
|
|
63
|
-
slot: `day-text-${date}`
|
|
64
|
-
}),
|
|
65
55
|
children: value
|
|
66
56
|
})
|
|
67
57
|
});
|
|
@@ -24,7 +24,6 @@ export interface FilterButtonOverlayProps extends Omit<NewButtonProps, 'classNam
|
|
|
24
24
|
buttonSize?: ButtonSize;
|
|
25
25
|
elevation?: ElevationType;
|
|
26
26
|
buttonIsFluid?: boolean;
|
|
27
|
-
testId?: string;
|
|
28
27
|
}
|
|
29
28
|
export declare const FilterButtonOverlay: Flow.AbstractComponent<FilterButtonOverlayProps, HTMLDivElement>;
|
|
30
29
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterButtonOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FilterButtonOverlay/FilterButtonOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAW/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAIrD,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"FilterButtonOverlay.d.ts","sourceRoot":"","sources":["../../../src/components/FilterButtonOverlay/FilterButtonOverlay.t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AS,CAAC;IAC9B,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,eAAO,MAAM,mBAAmB,EAAE,IAAI,CAAC,iBAAiB,CACtD,wBAAwB,EACxB,cAAc,CA6Gf,CAAC"}
|
|
@@ -10,7 +10,6 @@ var _hooks = require("../../hooks");
|
|
|
10
10
|
var _space = require("../../styles/variables/_space");
|
|
11
11
|
var _utils = require("../../utils");
|
|
12
12
|
var _classify = _interopRequireDefault(require("../../utils/classify"));
|
|
13
|
-
var _qa = require("../../utils/qa");
|
|
14
13
|
var _Button = require("../Button");
|
|
15
14
|
var _ButtonDropdown = require("../ButtonDropdown");
|
|
16
15
|
var _Tooltip = require("../Tooltip");
|
|
@@ -31,7 +30,6 @@ const FilterButtonOverlay = exports.FilterButtonOverlay = /*#__PURE__*/React.for
|
|
|
31
30
|
buttonIsFluid,
|
|
32
31
|
buttonSize,
|
|
33
32
|
elevation = 'modal',
|
|
34
|
-
testId,
|
|
35
33
|
...restProps
|
|
36
34
|
} = _ref;
|
|
37
35
|
const {
|
|
@@ -60,10 +58,7 @@ const FilterButtonOverlay = exports.FilterButtonOverlay = /*#__PURE__*/React.for
|
|
|
60
58
|
triggerRef
|
|
61
59
|
} = _ref2;
|
|
62
60
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
63
|
-
"data-testid":
|
|
64
|
-
base: testId,
|
|
65
|
-
slot: 'root'
|
|
66
|
-
}),
|
|
61
|
+
"data-testid": "FilterButtonOverlay",
|
|
67
62
|
className: (0, _classify.default)({
|
|
68
63
|
[_FilterButtonOverlayModule.default.isFluid]: buttonIsFluid
|
|
69
64
|
}, classNames?.wrapper),
|
|
@@ -77,10 +72,6 @@ const FilterButtonOverlay = exports.FilterButtonOverlay = /*#__PURE__*/React.for
|
|
|
77
72
|
},
|
|
78
73
|
isFluid: buttonIsFluid,
|
|
79
74
|
size: buttonSize,
|
|
80
|
-
testId: (0, _qa.generateTestId)({
|
|
81
|
-
base: testId,
|
|
82
|
-
slot: 'button'
|
|
83
|
-
}),
|
|
84
75
|
children: buttonLabel
|
|
85
76
|
}), isOpen && /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.FloatingPortal, {
|
|
86
77
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.FloatingFocusManager, {
|
|
@@ -90,10 +81,6 @@ const FilterButtonOverlay = exports.FilterButtonOverlay = /*#__PURE__*/React.for
|
|
|
90
81
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
91
82
|
ref: (0, _utils.mergeRefs)([refs.setFloating, boundaryRef]),
|
|
92
83
|
className: _FilterButtonOverlayModule.default.overlayContainer,
|
|
93
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
94
|
-
base: testId,
|
|
95
|
-
slot: 'overlay'
|
|
96
|
-
}),
|
|
97
84
|
style: {
|
|
98
85
|
display: 'flex',
|
|
99
86
|
position: strategy,
|
|
@@ -115,10 +102,6 @@ const FilterButtonOverlay = exports.FilterButtonOverlay = /*#__PURE__*/React.for
|
|
|
115
102
|
[_FilterButtonOverlayModule.default.small]: size === 'small',
|
|
116
103
|
[_FilterButtonOverlayModule.default.medium]: size === 'medium'
|
|
117
104
|
}, classNames?.overlayContainer),
|
|
118
|
-
"data-testid": (0, _qa.generateTestId)({
|
|
119
|
-
base: testId,
|
|
120
|
-
slot: 'content'
|
|
121
|
-
}),
|
|
122
105
|
children: children
|
|
123
106
|
})
|
|
124
107
|
})
|
|
@@ -13,7 +13,6 @@ export type InfinitePaginationProps = {
|
|
|
13
13
|
getItemKey?: (item: GenericObject, index: number) => string | number;
|
|
14
14
|
hasNextPage: boolean;
|
|
15
15
|
loadMoreItems: () => Promise<void>;
|
|
16
|
-
testId?: string;
|
|
17
16
|
} & ({
|
|
18
17
|
itemSize: (index: number) => number;
|
|
19
18
|
isVariableSizeList: true;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InfinitePagination.d.ts","sourceRoot":"","sources":["../../../src/components/InfinitePagination/InfinitePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;
|
|
1
|
+
{"version":3,"file":"InfinitePagination.d.ts","sourceRoot":"","sources":["../../../src/components/InfinitePagination/InfinitePagination.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,KAAK,EAAC,IAAI,EAAC,MAAM,4BAA4B,CAAC;AAQrD,OAAO,KAAK,EAAC,aAAa,EAAC,MAAM,sBAAsB,CAAC;AAKxD,KAAK,UAAU,GAAG,QAAQ,CAAC;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB,CAAC,CAAC;AAIH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,UAAU,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,KAAK,CAAC,SAAS,CAAC;IACpE,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,MAAM,CAAC;IACrE,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CACpC,GAAG,CACA;IACE,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACpC,kBAAkB,EAAE,IAAI,CAAC;CAC1B,GACD;IACE,QAAQ,EAAE,MAAM,CAAC;IACjB,kBAAkB,CAAC,EAAE,KAAK,CAAC;CAC5B,CACJ,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,IAAI,CAAC,iBAAiB,CACrD,uBAAuB,EACvB,cAAc,CA4Ff,CAAC"}
|