td-stylekit 28.9.0 → 28.11.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 CHANGED
@@ -1,3 +1,17 @@
1
+ # [28.11.0](https://github.com/treasure-data/td-stylekit/compare/v28.10.0...v28.11.0) (2023-01-10)
2
+
3
+
4
+ ### Features
5
+
6
+ * **Modal:** Hide header close button if onHide not set ([#1405](https://github.com/treasure-data/td-stylekit/issues/1405)) ([639dcb2](https://github.com/treasure-data/td-stylekit/commit/639dcb2))
7
+
8
+ # [28.10.0](https://github.com/treasure-data/td-stylekit/compare/v28.9.0...v28.10.0) (2023-01-10)
9
+
10
+
11
+ ### Features
12
+
13
+ * **CON-11211:** Migrate tests for TimeField component ([#1404](https://github.com/treasure-data/td-stylekit/issues/1404)) ([f0e6cb0](https://github.com/treasure-data/td-stylekit/commit/f0e6cb0))
14
+
1
15
  # [28.9.0](https://github.com/treasure-data/td-stylekit/compare/v28.8.0...v28.9.0) (2023-01-06)
2
16
 
3
17
 
@@ -214,6 +214,7 @@ var FormField = /*#__PURE__*/function (_PureComponent) {
214
214
  "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover"),
215
215
  placement: "top",
216
216
  target: this.inputRef,
217
+ role: "tooltip",
217
218
  children: shouldRenderTooltip ? (0, _jsxRuntime.jsxs)(_elements.PopoverComponent, {
218
219
  "data-gs": gs("src", "formfield", "formfield.tsx", "form-field-wrapper", "tooltip-popover", "popover-component"),
219
220
  backgroundColor: isInvalid ? '#ffeef0' : undefined,
@@ -80,9 +80,22 @@ var Header = function Header(_ref) {
80
80
  "data-gs": gs("src", "modal", "components", "header-container", "grid-item"),
81
81
  children: children
82
82
  }), (0, _jsxRuntime.jsx)(_Grid.GridItem, {
83
- "data-gs-c": gsC("closeicon"),
83
+ "data-gs-c": gsC(onHide ? (0, _jsxRuntime.jsxs)(_elements.CloseIcon, {
84
+ "data-gs-c": gsC("icon-medium-close"),
85
+ "data-gs": gs("src", "modal", "components", "header-container", "grid-item", "close-icon"),
86
+ onClick: onHide,
87
+ dynamite: dynamite,
88
+ disabled: disableCancel,
89
+ children: [(0, _jsxRuntime.jsx)(_VisuallyHidden["default"], {
90
+ "data-gs-c": gsC(closeTitle),
91
+ "data-gs": gs("src", "modal", "components", "header-container", "grid-item", "close-icon", "visually-hidden"),
92
+ children: closeTitle
93
+ }), (0, _jsxRuntime.jsx)(_Icon["default"].Medium.Close, {
94
+ "data-gs": gs("src", "modal", "components", "header-container", "grid-item", "close-icon", "icon-medium-close")
95
+ })]
96
+ }) : null),
84
97
  "data-gs": gs("src", "modal", "components", "header-container", "grid-item"),
85
- children: (0, _jsxRuntime.jsxs)(_elements.CloseIcon, {
98
+ children: onHide ? (0, _jsxRuntime.jsxs)(_elements.CloseIcon, {
86
99
  "data-gs-c": gsC("icon-medium-close"),
87
100
  "data-gs": gs("src", "modal", "components", "header-container", "grid-item", "close-icon"),
88
101
  onClick: onHide,
@@ -95,7 +108,7 @@ var Header = function Header(_ref) {
95
108
  }), (0, _jsxRuntime.jsx)(_Icon["default"].Medium.Close, {
96
109
  "data-gs": gs("src", "modal", "components", "header-container", "grid-item", "close-icon", "icon-medium-close")
97
110
  })]
98
- })
111
+ }) : null
99
112
  })]
100
113
  }));
101
114
  };
@@ -5,6 +5,7 @@ export type HeaderProps = {
5
5
  subtitle?: string;
6
6
  dynamite?: boolean;
7
7
  destructive?: boolean;
8
+ /** Called when cancel is clicked. If not provided, cancel button will not render. */
8
9
  onHide?: () => void;
9
10
  disableCancel?: boolean;
10
11
  smallFont?: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "td-stylekit",
3
- "version": "28.9.0",
3
+ "version": "28.11.0",
4
4
  "main": "dist/es/index.js",
5
5
  "module": "dist/es/index.js",
6
6
  "types": "dist/es/index.d.ts",