td-stylekit 28.25.0 → 28.26.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 +14 -0
- package/dist/es/ChartPrimitives/Defs.js +1 -1
- package/dist/es/ChartPrimitives/Tooltip.js +2 -1
- package/dist/es/CollapsibleToggle/CollapsibleToggle.js +2 -2
- package/dist/es/DataGrid/DataGrid.js +3 -1
- package/dist/es/DataGrid/components/CategoryFilter.js +2 -0
- package/dist/es/DataGrid/components/CollapsibleCell.js +3 -0
- package/dist/es/DataGrid/components/ColumnHeader.d.ts +1 -4
- package/dist/es/DataGrid/components/ColumnHeader.js +37 -37
- package/dist/es/DataGrid/components/ColumnHeaderActions.js +2 -0
- package/dist/es/DataGrid/components/InputCell.js +3 -0
- package/dist/es/DataGrid/components/ScrollableTable.js +6 -0
- package/dist/es/DataGrid/elements.d.ts +3 -0
- package/dist/es/DataGrid/elements.js +38 -28
- package/dist/es/DataGrid/renderers.js +2 -0
- package/dist/es/DateField/DateField.js +3 -0
- package/dist/es/DatePicker/utils.js +1 -1
- package/dist/es/DetailPanel/DetailPanel.js +2 -0
- package/dist/es/Drawer/Drawer.js +2 -0
- package/dist/es/DropdownButton/DropdownButtonElements.js +3 -0
- package/dist/es/FormControl/components/CheckboxGroup.js +2 -0
- package/dist/es/FormControl/components/RadioGroup.js +2 -0
- package/dist/es/FormControl/index.js +1 -1
- package/dist/es/FormField/FormField.js +2 -1
- package/dist/es/Icon/staticTypes.js +2 -1
- package/dist/es/IconBar/IconBar.js +3 -0
- package/dist/es/IconBar/LogoItem.js +2 -0
- package/dist/es/Input/Input.js +10 -0
- package/dist/es/Logo/Logo.js +3 -0
- package/dist/es/Logo/LogoDark.js +5 -0
- package/dist/es/Logo/LogoLight.js +3 -0
- package/dist/es/Menu/Menu.js +29 -0
- package/dist/es/MiddleTruncatedText/MiddleTruncatedText.js +10 -0
- package/dist/es/Modal/components/Header.js +2 -0
- package/dist/es/Modal/components/ModalOverlay.js +3 -0
- package/dist/es/MultiSelect/MultiSelect.js +1 -1
- package/dist/es/NavigationBar/LogoItem.js +2 -0
- package/dist/es/NavigationBar/NavigationBar.js +2 -0
- package/dist/es/Overlay/OverlayHeader.js +3 -0
- package/dist/es/Select/components/CreatableSelect.js +2 -0
- package/dist/es/Select/components/MenuPortal.js +8 -0
- package/dist/es/Select/variantProps.js +19 -0
- package/dist/es/Slider/Slider.js +2 -0
- package/dist/es/Slider/elements.js +2 -0
- package/dist/es/Tabs/Tabs.js +2 -1
- package/dist/es/Tagger/Tagger.js +2 -1
- package/dist/es/Tagger/TaggerElements.js +3 -0
- package/dist/es/Tagger/components/PopupSelector.js +6 -1
- package/dist/es/Tagger/variantProps.js +15 -0
- package/dist/es/ThemeProvider/ThemeProvider.js +2 -3
- package/dist/es/ThemeProvider/accessibility.js +1 -0
- package/dist/es/TimeControl/TimeControl.js +1 -0
- package/dist/es/TimeControl/elements.js +2 -0
- package/dist/es/TimePicker/TimePicker.js +1 -0
- package/dist/es/TimePicker/components/PeriodSelector.js +5 -0
- package/dist/es/TimePicker/components/Spinner.js +5 -0
- package/dist/es/TooltipPopover/useWaitForDOMRef.js +3 -1
- package/dist/es/Tree/NodeContent.js +1 -1
- package/dist/es/Tree/TreeNode.js +1 -1
- package/dist/es/mixins/border.js +15 -0
- package/dist/es/mixins/color.js +10 -0
- package/dist/es/mixins/spacing.js +8 -0
- package/dist/es/utils/testingLibrary.js +3 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,17 @@
|
|
|
1
|
+
# [28.26.0](https://github.com/treasure-data/td-stylekit/compare/v28.25.1...v28.26.0) (2023-10-18)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Features
|
|
5
|
+
|
|
6
|
+
* **CON-14048:** Make DataGrid filter icons always visible ([#1492](https://github.com/treasure-data/td-stylekit/issues/1492)) ([5ed2fee](https://github.com/treasure-data/td-stylekit/commit/5ed2fee))
|
|
7
|
+
|
|
8
|
+
## [28.25.1](https://github.com/treasure-data/td-stylekit/compare/v28.25.0...v28.25.1) (2023-10-16)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **CON-14162:** Resolve Visual Regression test CI issues ([#1502](https://github.com/treasure-data/td-stylekit/issues/1502)) ([c07f661](https://github.com/treasure-data/td-stylekit/commit/c07f661))
|
|
14
|
+
|
|
1
15
|
# [28.25.0](https://github.com/treasure-data/td-stylekit/compare/v28.24.1...v28.25.0) (2023-10-11)
|
|
2
16
|
|
|
3
17
|
|
|
@@ -37,11 +37,11 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
37
37
|
|
|
38
38
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
39
39
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
40
|
-
|
|
41
40
|
/**
|
|
42
41
|
* Sets up reusable SVG definitions for use in charts,
|
|
43
42
|
* like gradients and drop shadows.
|
|
44
43
|
*/
|
|
44
|
+
|
|
45
45
|
var Defs = /*#__PURE__*/function (_React$Component) {
|
|
46
46
|
_inherits(Defs, _React$Component);
|
|
47
47
|
|
|
@@ -155,7 +155,8 @@ var Tooltip = /*#__PURE__*/function (_PureComponent) {
|
|
|
155
155
|
});
|
|
156
156
|
|
|
157
157
|
return _this;
|
|
158
|
-
}
|
|
158
|
+
} // Required. See docs: https://formidable.com/open-source/victory/guides/tooltips/#wrapping-victorytooltip
|
|
159
|
+
|
|
159
160
|
|
|
160
161
|
_createClass(Tooltip, [{
|
|
161
162
|
key: "componentDidMount",
|
|
@@ -24,8 +24,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "d
|
|
|
24
24
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
25
25
|
|
|
26
26
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
27
|
-
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
28
|
-
|
|
27
|
+
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {}; // openLeft is used for v4
|
|
28
|
+
|
|
29
29
|
var Highlight = ( /*#__PURE__*/0, _base["default"])('div', process.env.NODE_ENV === "production" ? {
|
|
30
30
|
target: "ezxmtq91"
|
|
31
31
|
} : {
|
|
@@ -27,6 +27,8 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
|
27
27
|
|
|
28
28
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
29
29
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
30
|
+
/* eslint-disable td/instrumentation */
|
|
31
|
+
// this level of fine grained instrumentation is not needed
|
|
30
32
|
|
|
31
33
|
function CategoryFilter(_ref) {
|
|
32
34
|
var _ref$options = _ref.options,
|
|
@@ -61,6 +61,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
61
61
|
|
|
62
62
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
63
63
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
64
|
+
/* eslint-disable td/instrumentation */
|
|
65
|
+
// this level of fine grained instrumentation is not needed
|
|
66
|
+
|
|
64
67
|
var CollapsibleIcon = ( /*#__PURE__*/0, _base["default"])(_Icon["default"].Medium.SymbolArrowDown, process.env.NODE_ENV === "production" ? {
|
|
65
68
|
target: "e1prc87v2"
|
|
66
69
|
} : {
|
|
@@ -33,7 +33,6 @@ type ColumnHeaderProps = {
|
|
|
33
33
|
headerContainerStyles?: (theme: Theme) => Interpolation<Theme>;
|
|
34
34
|
};
|
|
35
35
|
type ColumnHeaderState = {
|
|
36
|
-
hovered: boolean;
|
|
37
36
|
opened: boolean;
|
|
38
37
|
isFiltering: boolean;
|
|
39
38
|
};
|
|
@@ -46,13 +45,11 @@ declare class ColumnHeader extends Component<ColumnHeaderProps, ColumnHeaderStat
|
|
|
46
45
|
sortDescIcon: import("@emotion/react/jsx-runtime").JSX.Element;
|
|
47
46
|
};
|
|
48
47
|
state: {
|
|
49
|
-
hovered: boolean;
|
|
50
48
|
opened: boolean;
|
|
51
49
|
isFiltering: boolean;
|
|
52
50
|
};
|
|
53
51
|
columnHeaderRef: React.RefObject<HTMLDivElement>;
|
|
54
|
-
|
|
55
|
-
columnHeaderFilterIconRef: React.RefObject<HTMLDivElement>;
|
|
52
|
+
iconRef: React.RefObject<HTMLDivElement>;
|
|
56
53
|
handleOverlayToggle: (opened: boolean) => void;
|
|
57
54
|
setIsFiltering: (isFiltering: boolean) => void;
|
|
58
55
|
render(): import("@emotion/react/jsx-runtime").JSX.Element;
|
|
@@ -55,6 +55,32 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
55
55
|
|
|
56
56
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
57
57
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
58
|
+
/* eslint-disable td/instrumentation */
|
|
59
|
+
// this level of fine grained instrumentation is not needed
|
|
60
|
+
|
|
61
|
+
function HeaderIcon(_ref) {
|
|
62
|
+
var isSorted = _ref.isSorted,
|
|
63
|
+
isActive = _ref.isActive,
|
|
64
|
+
hasActions = _ref.hasActions,
|
|
65
|
+
iconRef = _ref.iconRef,
|
|
66
|
+
sortIcon = _ref.sortIcon;
|
|
67
|
+
var icon = isSorted ? sortIcon : (0, _jsxRuntime.jsx)(_Icon["default"].Medium.ToolFilledFilter, {
|
|
68
|
+
"data-gs": gs("src", "datagrid", "components", "header-icon", "icon-medium-tool-filled-filter")
|
|
69
|
+
});
|
|
70
|
+
|
|
71
|
+
if (isSorted || hasActions) {
|
|
72
|
+
return (0, _jsxRuntime.jsx)(_elements.ColumnHeaderIcon, {
|
|
73
|
+
"data-gs-c": gsC(icon),
|
|
74
|
+
"data-gs": gs("src", "datagrid", "components", "header-icon", "column-header-icon"),
|
|
75
|
+
active: isActive,
|
|
76
|
+
ref: iconRef,
|
|
77
|
+
"data-testid": "column-header-icon",
|
|
78
|
+
children: icon
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
return null;
|
|
83
|
+
}
|
|
58
84
|
|
|
59
85
|
/**
|
|
60
86
|
* Component that renders a column header. Responsible for sorting and filtering.
|
|
@@ -76,16 +102,13 @@ var ColumnHeader = /*#__PURE__*/function (_Component) {
|
|
|
76
102
|
_this = _super.call.apply(_super, [this].concat(args));
|
|
77
103
|
|
|
78
104
|
_defineProperty(_assertThisInitialized(_this), "state", {
|
|
79
|
-
hovered: false,
|
|
80
105
|
opened: false,
|
|
81
106
|
isFiltering: false
|
|
82
107
|
});
|
|
83
108
|
|
|
84
109
|
_defineProperty(_assertThisInitialized(_this), "columnHeaderRef", /*#__PURE__*/_react["default"].createRef());
|
|
85
110
|
|
|
86
|
-
_defineProperty(_assertThisInitialized(_this), "
|
|
87
|
-
|
|
88
|
-
_defineProperty(_assertThisInitialized(_this), "columnHeaderFilterIconRef", /*#__PURE__*/_react["default"].createRef());
|
|
111
|
+
_defineProperty(_assertThisInitialized(_this), "iconRef", /*#__PURE__*/_react["default"].createRef());
|
|
89
112
|
|
|
90
113
|
_defineProperty(_assertThisInitialized(_this), "handleOverlayToggle", function (opened) {
|
|
91
114
|
_this.setState({
|
|
@@ -138,25 +161,14 @@ var ColumnHeader = /*#__PURE__*/function (_Component) {
|
|
|
138
161
|
var isFiltered = filterValue && _typeof(filterValue) === 'object' ? !(0, _utils.isReallyEmpty)(filterValue.value) : !(0, _utils.isReallyEmpty)(filterValue);
|
|
139
162
|
var hasActions = !!(filterRenderer || sortRenderer);
|
|
140
163
|
var isActive = isSorted || isFiltered;
|
|
141
|
-
var showPlaceholderFilterIcon = hasActions && !isActive && (this.state.hovered || this.state.opened);
|
|
142
164
|
var header = (0, _jsxRuntime.jsxs)(_elements.ColumnHeaderContainer, {
|
|
143
|
-
"data-gs-c": gsC(""),
|
|
165
|
+
"data-gs-c": gsC("", "headericon"),
|
|
144
166
|
"data-gs": gs("src", "datagrid", "components", "column-header-container"),
|
|
145
167
|
active: isActive,
|
|
146
168
|
clickable: hasActions,
|
|
147
169
|
"data-testid": "column-header-container",
|
|
148
170
|
isFirst: isFirst,
|
|
149
171
|
isLast: isLast,
|
|
150
|
-
onMouseEnter: function onMouseEnter() {
|
|
151
|
-
return _this2.setState({
|
|
152
|
-
hovered: true
|
|
153
|
-
});
|
|
154
|
-
},
|
|
155
|
-
onMouseLeave: function onMouseLeave() {
|
|
156
|
-
return _this2.setState({
|
|
157
|
-
hovered: false
|
|
158
|
-
});
|
|
159
|
-
},
|
|
160
172
|
onClick: function onClick() {
|
|
161
173
|
return _this2.handleOverlayToggle(!_this2.state.opened);
|
|
162
174
|
},
|
|
@@ -169,18 +181,13 @@ var ColumnHeader = /*#__PURE__*/function (_Component) {
|
|
|
169
181
|
"data-gs": gs("src", "datagrid", "components", "column-header-container", "column-header-label"),
|
|
170
182
|
title: label,
|
|
171
183
|
children: label
|
|
172
|
-
}),
|
|
173
|
-
"data-gs
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
"data-gs": gs("src", "datagrid", "components", "column-header-container", "column-header-icon"),
|
|
180
|
-
ref: this.columnHeaderFilterIconRef,
|
|
181
|
-
children: (0, _jsxRuntime.jsx)(_Icon["default"].Medium.ToolFilledFilter, {
|
|
182
|
-
"data-gs": gs("src", "datagrid", "components", "column-header-container", "column-header-icon", "icon-medium-tool-filled-filter")
|
|
183
|
-
})
|
|
184
|
+
}), (0, _jsxRuntime.jsx)(HeaderIcon, {
|
|
185
|
+
"data-gs": gs("src", "datagrid", "components", "column-header-container", "header-icon"),
|
|
186
|
+
isActive: isActive,
|
|
187
|
+
isSorted: isSorted,
|
|
188
|
+
hasActions: hasActions,
|
|
189
|
+
iconRef: this.iconRef,
|
|
190
|
+
sortIcon: sortIcon
|
|
184
191
|
}), onResize ? (0, _jsxRuntime.jsx)(_ColumnHeaderDragHandle["default"], {
|
|
185
192
|
"data-gs": gs("src", "datagrid", "components", "column-header-container", "column-header-drag-handle"),
|
|
186
193
|
onResize: onResize
|
|
@@ -188,6 +195,7 @@ var ColumnHeader = /*#__PURE__*/function (_Component) {
|
|
|
188
195
|
});
|
|
189
196
|
var headerOverlay = (0, _jsxRuntime.jsx)(_elements.ColumnHeaderPopover, {
|
|
190
197
|
"data-gs": gs("src", "datagrid", "components", "column-header-popover"),
|
|
198
|
+
"data-testid": "column-header-popover",
|
|
191
199
|
children: (0, _jsxRuntime.jsx)(_elements.ColumnHeaderActionsContainer, {
|
|
192
200
|
"data-gs": gs("src", "datagrid", "components", "column-header-popover", "column-header-actions-container"),
|
|
193
201
|
children: (0, _jsxRuntime.jsx)(_ColumnHeaderActions["default"], {
|
|
@@ -218,20 +226,12 @@ var ColumnHeader = /*#__PURE__*/function (_Component) {
|
|
|
218
226
|
return header;
|
|
219
227
|
}
|
|
220
228
|
|
|
221
|
-
var tooltipTarget = this.columnHeaderRef;
|
|
222
|
-
|
|
223
|
-
if (isSorted) {
|
|
224
|
-
tooltipTarget = this.columnHeaderSortIconRef;
|
|
225
|
-
} else if (isFiltered || showPlaceholderFilterIcon) {
|
|
226
|
-
tooltipTarget = this.columnHeaderFilterIconRef;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
229
|
return (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
230
230
|
children: [(0, _jsxRuntime.jsx)(_TooltipPopover["default"], {
|
|
231
231
|
"data-gs-c": gsC(headerOverlay),
|
|
232
232
|
"data-gs": gs("src", "datagrid", "components", "tooltip-popover"),
|
|
233
233
|
escClose: true,
|
|
234
|
-
target:
|
|
234
|
+
target: this.iconRef,
|
|
235
235
|
onHide: function onHide() {
|
|
236
236
|
return _this2.state.isFiltering ? false : _this2.handleOverlayToggle(false);
|
|
237
237
|
},
|
|
@@ -49,6 +49,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
49
49
|
|
|
50
50
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
51
51
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
52
|
+
/* eslint-disable td/instrumentation */
|
|
53
|
+
// this level of fine grained instrumentation is not needed
|
|
52
54
|
|
|
53
55
|
/**
|
|
54
56
|
* Component that renders Clear/Apply buttons and calls single child with render
|
|
@@ -47,6 +47,9 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
47
47
|
|
|
48
48
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
49
49
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
50
|
+
/* eslint-disable td/instrumentation */
|
|
51
|
+
// this level of fine grained instrumentation is not needed
|
|
52
|
+
|
|
50
53
|
var TYPES = {
|
|
51
54
|
NUMBER: 'number',
|
|
52
55
|
SELECT: 'select',
|
|
@@ -51,6 +51,8 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
|
|
|
51
51
|
|
|
52
52
|
if (typeof window !== "undefined" && !window.gs) window.gs = function () {};
|
|
53
53
|
if (typeof window !== "undefined" && !window.gsC) window.gsC = function () {};
|
|
54
|
+
/* eslint-disable td/instrumentation */
|
|
55
|
+
// this level of fine grained instrumentation is not needed
|
|
54
56
|
|
|
55
57
|
/**
|
|
56
58
|
* This mirrors react-virtualized Table component to enable horizontal
|
|
@@ -579,6 +581,10 @@ var ScrollableTable = /*#__PURE__*/function (_PureComponent) {
|
|
|
579
581
|
})
|
|
580
582
|
});
|
|
581
583
|
}
|
|
584
|
+
/**
|
|
585
|
+
* Determines the flex-shrink, flex-grow, and width values for a cell (header or column).
|
|
586
|
+
*/
|
|
587
|
+
|
|
582
588
|
}, {
|
|
583
589
|
key: "getScrollbarWidth",
|
|
584
590
|
value: function getScrollbarWidth() {
|
|
@@ -34,6 +34,8 @@ export declare const ColumnHeaderLabel: StyledComponent<{
|
|
|
34
34
|
export declare const ColumnHeaderIcon: StyledComponent<{
|
|
35
35
|
theme?: import("@emotion/react").Theme | undefined;
|
|
36
36
|
as?: import("react").ElementType<any> | undefined;
|
|
37
|
+
} & {
|
|
38
|
+
active?: boolean | undefined;
|
|
37
39
|
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, {}>;
|
|
38
40
|
type CellProps = {
|
|
39
41
|
editable?: boolean;
|
|
@@ -82,6 +84,7 @@ type SortButtonProps = {
|
|
|
82
84
|
export declare const SortButton: StyledComponent<{
|
|
83
85
|
icon: React.ReactNode;
|
|
84
86
|
label: string;
|
|
87
|
+
active?: boolean | undefined;
|
|
85
88
|
} & {
|
|
86
89
|
theme?: import("@emotion/react").Theme | undefined;
|
|
87
90
|
} & SortButtonProps, {}, {}>;
|