carbon-react 142.3.2 → 142.4.1

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.
Files changed (86) hide show
  1. package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +3 -2
  2. package/esm/components/flat-table/flat-table-cell/flat-table-cell.component.js +7 -2
  3. package/esm/components/flat-table/flat-table-header/flat-table-header.component.d.ts +3 -2
  4. package/esm/components/flat-table/flat-table-header/flat-table-header.component.js +9 -3
  5. package/esm/components/flat-table/flat-table-row/flat-table-row.component.js +2 -0
  6. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
  7. package/esm/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +10 -9
  8. package/esm/components/grouped-character/grouped-character.component.js +1 -1
  9. package/esm/components/loader-star/index.d.ts +2 -0
  10. package/esm/components/loader-star/index.js +1 -0
  11. package/esm/components/loader-star/internal/star.component.d.ts +9 -0
  12. package/esm/components/loader-star/internal/star.component.js +40 -0
  13. package/esm/components/loader-star/internal/star.style.d.ts +4 -0
  14. package/esm/components/loader-star/internal/star.style.js +126 -0
  15. package/esm/components/loader-star/loader-star.component.d.ts +14 -0
  16. package/esm/components/loader-star/loader-star.component.js +46 -0
  17. package/esm/components/loader-star/loader-star.style.d.ts +8 -0
  18. package/esm/components/loader-star/loader-star.style.js +15 -0
  19. package/esm/components/menu/__internal__/submenu/submenu.style.js +0 -1
  20. package/esm/components/pager/pager.style.js +1 -1
  21. package/esm/components/select/__internal__/select-list/select-list.component.d.ts +0 -2
  22. package/esm/components/select/__internal__/select-list/select-list.component.js +3 -8
  23. package/esm/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -3
  24. package/esm/components/select/__internal__/select-textbox/select-textbox.component.js +24 -56
  25. package/esm/components/select/__internal__/{select-text/select-text.style.d.ts → select-textbox/select-textbox.style.d.ts} +2 -3
  26. package/esm/components/select/filterable-select/filterable-select.component.d.ts +1 -1
  27. package/esm/components/select/filterable-select/filterable-select.component.js +4 -7
  28. package/esm/components/select/multi-select/multi-select.component.d.ts +1 -1
  29. package/esm/components/select/multi-select/multi-select.component.js +4 -7
  30. package/esm/components/select/simple-select/simple-select.component.d.ts +1 -1
  31. package/esm/components/select/simple-select/simple-select.component.js +4 -7
  32. package/esm/locales/de-de.js +3 -0
  33. package/esm/locales/en-gb.js +3 -0
  34. package/esm/locales/es-es.js +3 -0
  35. package/esm/locales/fr-ca.js +3 -0
  36. package/esm/locales/fr-fr.js +3 -0
  37. package/esm/locales/locale.d.ts +3 -0
  38. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.d.ts +3 -2
  39. package/lib/components/flat-table/flat-table-cell/flat-table-cell.component.js +7 -2
  40. package/lib/components/flat-table/flat-table-header/flat-table-header.component.d.ts +3 -2
  41. package/lib/components/flat-table/flat-table-header/flat-table-header.component.js +9 -3
  42. package/lib/components/flat-table/flat-table-row/flat-table-row.component.js +2 -0
  43. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.d.ts +1 -1
  44. package/lib/components/flat-table/flat-table-row-header/flat-table-row-header.component.js +10 -9
  45. package/lib/components/grouped-character/grouped-character.component.js +1 -1
  46. package/lib/components/loader-star/index.d.ts +2 -0
  47. package/lib/components/{select/__internal__/select-text → loader-star}/index.js +2 -2
  48. package/lib/components/loader-star/internal/star.component.d.ts +9 -0
  49. package/lib/components/loader-star/internal/star.component.js +47 -0
  50. package/lib/components/loader-star/internal/star.style.d.ts +4 -0
  51. package/lib/components/loader-star/internal/star.style.js +134 -0
  52. package/lib/components/loader-star/loader-star.component.d.ts +14 -0
  53. package/lib/components/loader-star/loader-star.component.js +53 -0
  54. package/lib/components/loader-star/loader-star.style.d.ts +8 -0
  55. package/lib/components/loader-star/loader-star.style.js +22 -0
  56. package/lib/components/loader-star/package.json +6 -0
  57. package/lib/components/menu/__internal__/submenu/submenu.style.js +0 -1
  58. package/lib/components/pager/pager.style.js +2 -2
  59. package/lib/components/select/__internal__/select-list/select-list.component.d.ts +0 -2
  60. package/lib/components/select/__internal__/select-list/select-list.component.js +3 -8
  61. package/lib/components/select/__internal__/select-textbox/select-textbox.component.d.ts +1 -3
  62. package/lib/components/select/__internal__/select-textbox/select-textbox.component.js +24 -58
  63. package/lib/components/select/__internal__/{select-text/select-text.style.d.ts → select-textbox/select-textbox.style.d.ts} +2 -3
  64. package/lib/components/select/filterable-select/filterable-select.component.d.ts +1 -1
  65. package/lib/components/select/filterable-select/filterable-select.component.js +4 -7
  66. package/lib/components/select/multi-select/multi-select.component.d.ts +1 -1
  67. package/lib/components/select/multi-select/multi-select.component.js +4 -7
  68. package/lib/components/select/simple-select/simple-select.component.d.ts +1 -1
  69. package/lib/components/select/simple-select/simple-select.component.js +4 -7
  70. package/lib/locales/de-de.js +3 -0
  71. package/lib/locales/en-gb.js +3 -0
  72. package/lib/locales/es-es.js +3 -0
  73. package/lib/locales/fr-ca.js +3 -0
  74. package/lib/locales/fr-fr.js +3 -0
  75. package/lib/locales/locale.d.ts +3 -0
  76. package/package.json +1 -1
  77. package/esm/components/select/__internal__/select-text/index.d.ts +0 -2
  78. package/esm/components/select/__internal__/select-text/index.js +0 -1
  79. package/esm/components/select/__internal__/select-text/select-text.component.d.ts +0 -22
  80. package/esm/components/select/__internal__/select-text/select-text.component.js +0 -27
  81. package/lib/components/select/__internal__/select-text/index.d.ts +0 -2
  82. package/lib/components/select/__internal__/select-text/package.json +0 -6
  83. package/lib/components/select/__internal__/select-text/select-text.component.d.ts +0 -22
  84. package/lib/components/select/__internal__/select-text/select-text.component.js +0 -34
  85. /package/esm/components/select/__internal__/{select-text/select-text.style.js → select-textbox/select-textbox.style.js} +0 -0
  86. /package/lib/components/select/__internal__/{select-text/select-text.style.js → select-textbox/select-textbox.style.js} +0 -0
@@ -291,10 +291,9 @@ const SimpleSelect = exports.SimpleSelect = /*#__PURE__*/_react.default.forwardR
291
291
  setOpenState(false);
292
292
  }, []);
293
293
  const assignInput = (0, _react.useCallback)(element => {
294
+ if (!element) return;
294
295
  setTextboxRef(element);
295
- if (!ref) {
296
- return;
297
- }
296
+ if (!ref) return;
298
297
  if (typeof ref === "function") {
299
298
  ref(element);
300
299
  } else {
@@ -307,7 +306,6 @@ const SimpleSelect = exports.SimpleSelect = /*#__PURE__*/_react.default.forwardR
307
306
  name,
308
307
  disabled,
309
308
  readOnly,
310
- ref: assignInput,
311
309
  selectedValue,
312
310
  formattedValue: textValue,
313
311
  onClick: handleTextboxClick,
@@ -339,7 +337,6 @@ const SimpleSelect = exports.SimpleSelect = /*#__PURE__*/_react.default.forwardR
339
337
  onListScrollBottom: onListScrollBottom,
340
338
  tableHeader: tableHeader,
341
339
  multiColumn: multiColumn,
342
- loaderDataRole: "simple-select-list-loader",
343
340
  listPlacement: listPlacement,
344
341
  flipEnabled: flipEnabled,
345
342
  isOpen: isOpen,
@@ -358,12 +355,12 @@ const SimpleSelect = exports.SimpleSelect = /*#__PURE__*/_react.default.forwardR
358
355
  }, marginProps), /*#__PURE__*/_react.default.createElement("div", {
359
356
  ref: containerRef
360
357
  }, /*#__PURE__*/_react.default.createElement(_selectTextbox.default, _extends({
358
+ ref: assignInput,
361
359
  ariaLabel: ariaLabel,
362
360
  "aria-controls": selectListId.current,
363
361
  activeDescendantId: activeDescendantId,
364
362
  ariaLabelledby: ariaLabelledby,
365
- isOpen: isOpen,
366
- textboxRef: textboxRef
363
+ isOpen: isOpen
367
364
  }, getTextboxProps()))), selectList);
368
365
  });
369
366
  if (process.env.NODE_ENV !== "production") {
@@ -98,6 +98,9 @@ const deDE = {
98
98
  loaderSpinner: {
99
99
  loading: () => "Laden..."
100
100
  },
101
+ loaderStar: {
102
+ loading: () => "Laden..."
103
+ },
101
104
  menuFullscreen: {
102
105
  ariaLabels: {
103
106
  closeButton: () => "Schließen"
@@ -101,6 +101,9 @@ const enGB = {
101
101
  loaderSpinner: {
102
102
  loading: () => "Loading..."
103
103
  },
104
+ loaderStar: {
105
+ loading: () => "Loading..."
106
+ },
104
107
  menuFullscreen: {
105
108
  ariaLabels: {
106
109
  closeButton: () => "Close"
@@ -99,6 +99,9 @@ const esES = {
99
99
  loaderSpinner: {
100
100
  loading: () => "Cargando..."
101
101
  },
102
+ loaderStar: {
103
+ loading: () => "Cargando..."
104
+ },
102
105
  menuFullscreen: {
103
106
  ariaLabels: {
104
107
  closeButton: () => "Cerrar"
@@ -99,6 +99,9 @@ const frCA = {
99
99
  loaderSpinner: {
100
100
  loading: () => "Chargement..."
101
101
  },
102
+ loaderStar: {
103
+ loading: () => "Chargement..."
104
+ },
102
105
  menuFullscreen: {
103
106
  ariaLabels: {
104
107
  closeButton: () => "Fermer"
@@ -99,6 +99,9 @@ const frFR = {
99
99
  loaderSpinner: {
100
100
  loading: () => "Téléhargement..."
101
101
  },
102
+ loaderStar: {
103
+ loading: () => "Téléhargement..."
104
+ },
102
105
  menuFullscreen: {
103
106
  ariaLabels: {
104
107
  closeButton: () => "Fermer"
@@ -77,6 +77,9 @@ interface Locale {
77
77
  loaderSpinner: {
78
78
  loading: () => string;
79
79
  };
80
+ loaderStar: {
81
+ loading: () => string;
82
+ };
80
83
  menuFullscreen: {
81
84
  ariaLabels: {
82
85
  closeButton: () => string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "142.3.2",
3
+ "version": "142.4.1",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -1,2 +0,0 @@
1
- export { default } from "./select-text.component";
2
- export type { SelectTextProps } from "./select-text.component";
@@ -1 +0,0 @@
1
- export { default } from "./select-text.component";
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- export interface SelectTextProps {
3
- /** If true the Component will be disabled */
4
- disabled?: boolean;
5
- /** Value to be displayed */
6
- formattedValue?: string;
7
- /** Callback function for when the component is clicked. */
8
- onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
9
- /** Callback function for when the key is pressed when focused on Select Text. */
10
- /** Callback function for when the left mouse key is pressed when focused on Select Text. */
11
- onMouseDown?: (ev: React.MouseEvent<HTMLElement>) => void;
12
- /** Placeholder string to be displayed when formattedValue is empty */
13
- placeholder?: string;
14
- /** If true the Component will be read-only */
15
- readOnly?: boolean;
16
- /** If true the component has no border and a transparent background */
17
- transparent?: boolean;
18
- /** Component size */
19
- size?: "small" | "medium" | "large";
20
- }
21
- declare const SelectText: ({ disabled, formattedValue, onClick, onMouseDown, placeholder, readOnly, transparent, size, }: SelectTextProps) => React.JSX.Element;
22
- export default SelectText;
@@ -1,27 +0,0 @@
1
- import React from "react";
2
- import PropTypes from "prop-types";
3
- import { StyledSelectText, StyledSelectTextChildrenWrapper } from "./select-text.style";
4
- const SelectText = ({
5
- disabled,
6
- formattedValue = "",
7
- onClick,
8
- onMouseDown,
9
- placeholder,
10
- readOnly,
11
- transparent,
12
- size = "medium"
13
- }) => {
14
- const hasPlaceholder = !disabled && !readOnly && !formattedValue;
15
- return /*#__PURE__*/React.createElement(StyledSelectText, {
16
- "aria-hidden": true,
17
- "data-element": "select-text",
18
- disabled: disabled,
19
- hasPlaceholder: hasPlaceholder,
20
- onClick: onClick,
21
- onMouseDown: onMouseDown,
22
- readOnly: readOnly,
23
- transparent: transparent,
24
- size: size
25
- }, /*#__PURE__*/React.createElement(StyledSelectTextChildrenWrapper, null, hasPlaceholder ? placeholder : formattedValue));
26
- };
27
- export default SelectText;
@@ -1,2 +0,0 @@
1
- export { default } from "./select-text.component";
2
- export type { SelectTextProps } from "./select-text.component";
@@ -1,6 +0,0 @@
1
- {
2
- "sideEffects": false,
3
- "module": "../../../../../esm/components/select/__internal__/select-text/index.js",
4
- "main": "./index.js",
5
- "types": "./index.d.ts"
6
- }
@@ -1,22 +0,0 @@
1
- import React from "react";
2
- export interface SelectTextProps {
3
- /** If true the Component will be disabled */
4
- disabled?: boolean;
5
- /** Value to be displayed */
6
- formattedValue?: string;
7
- /** Callback function for when the component is clicked. */
8
- onClick?: (ev: React.MouseEvent<HTMLElement>) => void;
9
- /** Callback function for when the key is pressed when focused on Select Text. */
10
- /** Callback function for when the left mouse key is pressed when focused on Select Text. */
11
- onMouseDown?: (ev: React.MouseEvent<HTMLElement>) => void;
12
- /** Placeholder string to be displayed when formattedValue is empty */
13
- placeholder?: string;
14
- /** If true the Component will be read-only */
15
- readOnly?: boolean;
16
- /** If true the component has no border and a transparent background */
17
- transparent?: boolean;
18
- /** Component size */
19
- size?: "small" | "medium" | "large";
20
- }
21
- declare const SelectText: ({ disabled, formattedValue, onClick, onMouseDown, placeholder, readOnly, transparent, size, }: SelectTextProps) => React.JSX.Element;
22
- export default SelectText;
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- var _propTypes = _interopRequireDefault(require("prop-types"));
9
- var _selectText = require("./select-text.style");
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const SelectText = ({
12
- disabled,
13
- formattedValue = "",
14
- onClick,
15
- onMouseDown,
16
- placeholder,
17
- readOnly,
18
- transparent,
19
- size = "medium"
20
- }) => {
21
- const hasPlaceholder = !disabled && !readOnly && !formattedValue;
22
- return /*#__PURE__*/_react.default.createElement(_selectText.StyledSelectText, {
23
- "aria-hidden": true,
24
- "data-element": "select-text",
25
- disabled: disabled,
26
- hasPlaceholder: hasPlaceholder,
27
- onClick: onClick,
28
- onMouseDown: onMouseDown,
29
- readOnly: readOnly,
30
- transparent: transparent,
31
- size: size
32
- }, /*#__PURE__*/_react.default.createElement(_selectText.StyledSelectTextChildrenWrapper, null, hasPlaceholder ? placeholder : formattedValue));
33
- };
34
- var _default = exports.default = SelectText;