carbon-react 127.0.2 → 127.0.4

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 (23) hide show
  1. package/esm/__spec_helper__/mock-dom-rect.d.ts +2 -0
  2. package/esm/__spec_helper__/mock-dom-rect.js +20 -0
  3. package/esm/__spec_helper__/select-test-utils.js +1 -1
  4. package/esm/components/select/list-action-button/list-action-button.style.js +2 -0
  5. package/esm/components/select/option-row/option-row.style.js +1 -1
  6. package/esm/components/select/select-list/select-list.component.js +13 -13
  7. package/esm/components/select/select-list/select-list.style.d.ts +7 -1
  8. package/esm/components/select/select-list/select-list.style.js +46 -1
  9. package/esm/locales/en-gb.js +2 -2
  10. package/lib/__spec_helper__/mock-dom-rect.d.ts +2 -0
  11. package/lib/__spec_helper__/mock-dom-rect.js +26 -0
  12. package/lib/__spec_helper__/select-test-utils.js +3 -4
  13. package/lib/components/select/list-action-button/list-action-button.style.js +2 -0
  14. package/lib/components/select/option-row/option-row.style.js +1 -1
  15. package/lib/components/select/select-list/select-list.component.js +13 -13
  16. package/lib/components/select/select-list/select-list.style.d.ts +7 -1
  17. package/lib/components/select/select-list/select-list.style.js +47 -2
  18. package/lib/locales/en-gb.js +2 -2
  19. package/package.json +1 -1
  20. package/esm/components/select/select-list/select-list-container.style.d.ts +0 -6
  21. package/esm/components/select/select-list/select-list-container.style.js +0 -36
  22. package/lib/components/select/select-list/select-list-container.style.d.ts +0 -6
  23. package/lib/components/select/select-list/select-list-container.style.js +0 -43
@@ -0,0 +1,2 @@
1
+ declare const mockDOMRect: (width: number, height: number, elementIdentifier: string) => void;
2
+ export default mockDOMRect;
@@ -0,0 +1,20 @@
1
+ const getDOMRect = (width, height) => ({
2
+ width,
3
+ height,
4
+ top: 0,
5
+ left: 0,
6
+ bottom: 0,
7
+ right: 0,
8
+ x: 0,
9
+ y: 0,
10
+ toJSON: () => {}
11
+ });
12
+ const mockDOMRect = (width, height, elementIdentifier) => {
13
+ Element.prototype.getBoundingClientRect = jest.fn(function () {
14
+ if (this.getAttribute("data-component") === elementIdentifier) {
15
+ return getDOMRect(width, height);
16
+ }
17
+ return getDOMRect(0, 0);
18
+ });
19
+ };
20
+ export default mockDOMRect;
@@ -1,6 +1,6 @@
1
1
  import { act } from "react-dom/test-utils";
2
2
  import { mockResizeObserver } from "jsdom-testing-mocks";
3
- import StyledSelectListContainer from "../components/select/select-list/select-list-container.style";
3
+ import { StyledSelectListContainer } from "../components/select/select-list/select-list.style";
4
4
  const resizeObserver = mockResizeObserver();
5
5
  export function simulateSelectTextboxEvent(container, eventType,
6
6
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -9,6 +9,8 @@ const StyledListActionButtonWrapper = styled.div`
9
9
  position: sticky;
10
10
  bottom: 0;
11
11
  background-color: inherit;
12
+ border-bottom-left-radius: var(--borderRadius050);
13
+ border-bottom-right-radius: var(--borderRadius050);
12
14
 
13
15
  ${StyledButton} {
14
16
  border: none;
@@ -1,10 +1,10 @@
1
1
  import styled, { css } from "styled-components";
2
2
  const StyledOptionRow = styled.tr`
3
3
  cursor: pointer;
4
+ width: 100%;
4
5
  position: absolute;
5
6
  top: 0;
6
7
  left: 0;
7
- width: 100%;
8
8
 
9
9
  ${({
10
10
  hidden
@@ -7,14 +7,13 @@ import findLastIndex from "lodash/findLastIndex";
7
7
  import usePrevious from "../../../hooks/__internal__/usePrevious";
8
8
  import useScrollBlock from "../../../hooks/__internal__/useScrollBlock";
9
9
  import useModalManager from "../../../hooks/__internal__/useModalManager";
10
- import { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody } from "./select-list.style";
10
+ import { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, StyledSelectListContainer, StyledScrollableContainer } from "./select-list.style";
11
11
  import Popover from "../../../__internal__/popover";
12
12
  import OptionRow from "../option-row/option-row.component";
13
13
  import getNextChildByText from "../utils/get-next-child-by-text";
14
14
  import getNextIndexByKey from "../utils/get-next-index-by-key";
15
15
  import isNavigationKey from "../utils/is-navigation-key";
16
16
  import ListActionButton from "../list-action-button";
17
- import StyledSelectListContainer from "./select-list-container.style";
18
17
  import Loader from "../../loader";
19
18
  import Option from "../option";
20
19
  import SelectListContext from "../__internal__/select-list-context";
@@ -363,13 +362,11 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
363
362
  }), ...(flipEnabled ? [flip({
364
363
  fallbackStrategy: "initialPlacement"
365
364
  })] : [])], [flipEnabled]);
366
- const loader = () => {
367
- return /*#__PURE__*/React.createElement(StyledSelectLoaderContainer, {
368
- key: "loader"
369
- }, /*#__PURE__*/React.createElement(Loader, {
370
- "data-role": loaderDataRole
371
- }));
372
- };
365
+ const loader = isLoading ? /*#__PURE__*/React.createElement(StyledSelectLoaderContainer, {
366
+ key: "loader"
367
+ }, /*#__PURE__*/React.createElement(Loader, {
368
+ "data-role": loaderDataRole
369
+ })) : undefined;
373
370
  let selectListContent = renderedChildren;
374
371
  const listBoxProps = {
375
372
  role: "listbox",
@@ -406,17 +403,20 @@ const SelectList = /*#__PURE__*/React.forwardRef(({
406
403
  animationFrame: true
407
404
  }, /*#__PURE__*/React.createElement(StyledSelectListContainer, _extends({
408
405
  "data-element": "select-list-wrapper",
409
- ref: listContainerRef,
410
- maxHeight: listMaxHeight + actionButtonHeight.current,
411
406
  isLoading: isLoading
412
- }, listProps), /*#__PURE__*/React.createElement(StyledSelectList, _extends({
407
+ }, listProps), /*#__PURE__*/React.createElement(StyledScrollableContainer, {
408
+ ref: listContainerRef,
409
+ maxHeight: listMaxHeight,
410
+ "data-component": "select-list-scrollable-container",
411
+ hasActionButton: !!listActionButton
412
+ }, /*#__PURE__*/React.createElement(StyledSelectList, _extends({
413
413
  as: multiColumn ? "div" : "ul",
414
414
  "data-element": "select-list"
415
415
  }, multiColumn ? {} : listBoxProps, {
416
416
  ref: listRef,
417
417
  tabIndex: -1,
418
418
  listHeight: multiColumn ? undefined : listHeight
419
- }), selectListContent), isLoading && loader(), listActionButton && /*#__PURE__*/React.createElement(ListActionButton, {
419
+ }), selectListContent), loader), listActionButton && /*#__PURE__*/React.createElement(ListActionButton, {
420
420
  ref: listActionButtonRef,
421
421
  listActionButton: listActionButton,
422
422
  onListAction: onListAction
@@ -1,3 +1,4 @@
1
+ import { SelectListProps } from ".";
1
2
  interface StyledSelectListProps {
2
3
  listHeight?: number;
3
4
  }
@@ -9,4 +10,9 @@ interface StyledSelectListTableHeaderProps {
9
10
  }
10
11
  declare const StyledSelectListTableHeader: import("styled-components").StyledComponent<"thead", any, StyledSelectListTableHeaderProps, never>;
11
12
  declare const StyledSelectListTableBody: import("styled-components").StyledComponent<"tbody", any, StyledSelectListProps, never>;
12
- export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, };
13
+ declare const StyledSelectListContainer: import("styled-components").StyledComponent<"div", any, Pick<SelectListProps, "isLoading">, never>;
14
+ declare const StyledScrollableContainer: import("styled-components").StyledComponent<"div", any, {
15
+ maxHeight: number;
16
+ hasActionButton: boolean;
17
+ }, never>;
18
+ export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, StyledSelectListContainer, StyledScrollableContainer, };
@@ -1,4 +1,5 @@
1
1
  import styled, { css } from "styled-components";
2
+ import { baseTheme } from "../../../style/themes";
2
3
  const StyledSelectList = styled.ul`
3
4
  ${({
4
5
  listHeight
@@ -91,4 +92,48 @@ const StyledSelectListTableBody = styled.tbody`
91
92
  listHeight
92
93
  }) => `${listHeight}px`};
93
94
  `;
94
- export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody };
95
+ const StyledSelectListContainer = styled.div`
96
+ background-color: white;
97
+ box-shadow: var(--boxShadow100);
98
+ animation: fadeIn 250ms ease-out;
99
+ position: absolute;
100
+ z-index: ${({
101
+ theme
102
+ }) => theme.zIndex.popover};
103
+ display: flex;
104
+ flex-wrap: wrap;
105
+ align-items: flex-start;
106
+ border-radius: var(--borderRadius050);
107
+ ${({
108
+ isLoading
109
+ }) => isLoading && "min-height: 150px"};
110
+
111
+ @keyframes fadeIn {
112
+ 0% {
113
+ opacity: 0;
114
+ }
115
+ 100% {
116
+ opacity: 1;
117
+ }
118
+ }
119
+ `;
120
+ const StyledScrollableContainer = styled.div`
121
+ max-height: ${({
122
+ maxHeight
123
+ }) => `${maxHeight}px`};
124
+ width: 100%;
125
+ border-top-left-radius: var(--borderRadius050);
126
+ border-top-right-radius: var(--borderRadius050);
127
+ overflow-y: auto;
128
+
129
+ ${({
130
+ hasActionButton
131
+ }) => !hasActionButton && css`
132
+ border-bottom-left-radius: var(--borderRadius050);
133
+ border-bottom-right-radius: var(--borderRadius050);
134
+ `}
135
+ `;
136
+ StyledSelectListContainer.defaultProps = {
137
+ theme: baseTheme
138
+ };
139
+ export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, StyledSelectListContainer, StyledScrollableContainer };
@@ -11,7 +11,7 @@ const enGB = {
11
11
  },
12
12
  advancedColorPicker: {
13
13
  ariaLabel: () => "Change colour",
14
- currentColorDescriptionTerm: () => "Current color assigned: ",
14
+ currentColorDescriptionTerm: () => "Current colour assigned: ",
15
15
  currentColorAssigned: currentColor => currentColor
16
16
  },
17
17
  batchSelection: {
@@ -126,7 +126,7 @@ const enGB = {
126
126
  },
127
127
  password: {
128
128
  ariaLiveShownMessage: () => "Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",
129
- ariaLiveHiddenMessage: () => "Your Password is currently hidden."
129
+ ariaLiveHiddenMessage: () => "Your password is currently hidden."
130
130
  },
131
131
  progressTracker: {
132
132
  of: () => "of"
@@ -0,0 +1,2 @@
1
+ declare const mockDOMRect: (width: number, height: number, elementIdentifier: string) => void;
2
+ export default mockDOMRect;
@@ -0,0 +1,26 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ const getDOMRect = (width, height) => ({
8
+ width,
9
+ height,
10
+ top: 0,
11
+ left: 0,
12
+ bottom: 0,
13
+ right: 0,
14
+ x: 0,
15
+ y: 0,
16
+ toJSON: () => {}
17
+ });
18
+ const mockDOMRect = (width, height, elementIdentifier) => {
19
+ Element.prototype.getBoundingClientRect = jest.fn(function () {
20
+ if (this.getAttribute("data-component") === elementIdentifier) {
21
+ return getDOMRect(width, height);
22
+ }
23
+ return getDOMRect(0, 0);
24
+ });
25
+ };
26
+ var _default = exports.default = mockDOMRect;
@@ -7,15 +7,14 @@ exports.simulateDropdownEvent = simulateDropdownEvent;
7
7
  exports.simulateSelectTextboxEvent = simulateSelectTextboxEvent;
8
8
  var _testUtils = require("react-dom/test-utils");
9
9
  var _jsdomTestingMocks = require("jsdom-testing-mocks");
10
- var _selectListContainer = _interopRequireDefault(require("../components/select/select-list/select-list-container.style"));
11
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
+ var _selectList = require("../components/select/select-list/select-list.style");
12
11
  const resizeObserver = (0, _jsdomTestingMocks.mockResizeObserver)();
13
12
  function simulateSelectTextboxEvent(container, eventType,
14
13
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
15
14
  ...eventArgs) {
16
15
  const selectText = container.find('input[type="text"]').first();
17
16
  selectText.simulate(eventType, ...eventArgs);
18
- const selectList = container.find(_selectListContainer.default).getDOMNode();
17
+ const selectList = container.find(_selectList.StyledSelectListContainer).getDOMNode();
19
18
  // need to manually trigger a resize to make react-virtual realise that child options should be rendered
20
19
  (0, _testUtils.act)(() => {
21
20
  resizeObserver.mockElementSize(selectList, {
@@ -32,7 +31,7 @@ function simulateSelectTextboxEvent(container, eventType,
32
31
  function simulateDropdownEvent(container, eventType) {
33
32
  const dropdown = container.find('[type="dropdown"]').first();
34
33
  dropdown.simulate(eventType);
35
- const selectList = container.find(_selectListContainer.default).getDOMNode();
34
+ const selectList = container.find(_selectList.StyledSelectListContainer).getDOMNode();
36
35
  // need to manually trigger a resize to make react-virtual realise that child options should be rendered
37
36
  (0, _testUtils.act)(() => {
38
37
  resizeObserver.mockElementSize(selectList, {
@@ -16,6 +16,8 @@ const StyledListActionButtonWrapper = _styledComponents.default.div`
16
16
  position: sticky;
17
17
  bottom: 0;
18
18
  background-color: inherit;
19
+ border-bottom-left-radius: var(--borderRadius050);
20
+ border-bottom-right-radius: var(--borderRadius050);
19
21
 
20
22
  ${_button.default} {
21
23
  border: none;
@@ -9,10 +9,10 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
9
9
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
10
  const StyledOptionRow = _styledComponents.default.tr`
11
11
  cursor: pointer;
12
+ width: 100%;
12
13
  position: absolute;
13
14
  top: 0;
14
15
  left: 0;
15
- width: 100%;
16
16
 
17
17
  ${({
18
18
  hidden
@@ -19,7 +19,6 @@ var _getNextChildByText = _interopRequireDefault(require("../utils/get-next-chil
19
19
  var _getNextIndexByKey = _interopRequireDefault(require("../utils/get-next-index-by-key"));
20
20
  var _isNavigationKey = _interopRequireDefault(require("../utils/is-navigation-key"));
21
21
  var _listActionButton = _interopRequireDefault(require("../list-action-button"));
22
- var _selectListContainer = _interopRequireDefault(require("./select-list-container.style"));
23
22
  var _loader = _interopRequireDefault(require("../../loader"));
24
23
  var _option = _interopRequireDefault(require("../option"));
25
24
  var _selectListContext = _interopRequireDefault(require("../__internal__/select-list-context"));
@@ -372,13 +371,11 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
372
371
  }), ...(flipEnabled ? [(0, _dom.flip)({
373
372
  fallbackStrategy: "initialPlacement"
374
373
  })] : [])], [flipEnabled]);
375
- const loader = () => {
376
- return /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectLoaderContainer, {
377
- key: "loader"
378
- }, /*#__PURE__*/_react.default.createElement(_loader.default, {
379
- "data-role": loaderDataRole
380
- }));
381
- };
374
+ const loader = isLoading ? /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectLoaderContainer, {
375
+ key: "loader"
376
+ }, /*#__PURE__*/_react.default.createElement(_loader.default, {
377
+ "data-role": loaderDataRole
378
+ })) : undefined;
382
379
  let selectListContent = renderedChildren;
383
380
  const listBoxProps = {
384
381
  role: "listbox",
@@ -413,19 +410,22 @@ const SelectList = /*#__PURE__*/_react.default.forwardRef(({
413
410
  isOpen: isOpen,
414
411
  disableBackgroundUI: true,
415
412
  animationFrame: true
416
- }, /*#__PURE__*/_react.default.createElement(_selectListContainer.default, _extends({
413
+ }, /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectListContainer, _extends({
417
414
  "data-element": "select-list-wrapper",
418
- ref: listContainerRef,
419
- maxHeight: listMaxHeight + actionButtonHeight.current,
420
415
  isLoading: isLoading
421
- }, listProps), /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectList, _extends({
416
+ }, listProps), /*#__PURE__*/_react.default.createElement(_selectList.StyledScrollableContainer, {
417
+ ref: listContainerRef,
418
+ maxHeight: listMaxHeight,
419
+ "data-component": "select-list-scrollable-container",
420
+ hasActionButton: !!listActionButton
421
+ }, /*#__PURE__*/_react.default.createElement(_selectList.StyledSelectList, _extends({
422
422
  as: multiColumn ? "div" : "ul",
423
423
  "data-element": "select-list"
424
424
  }, multiColumn ? {} : listBoxProps, {
425
425
  ref: listRef,
426
426
  tabIndex: -1,
427
427
  listHeight: multiColumn ? undefined : listHeight
428
- }), selectListContent), isLoading && loader(), listActionButton && /*#__PURE__*/_react.default.createElement(_listActionButton.default, {
428
+ }), selectListContent), loader), listActionButton && /*#__PURE__*/_react.default.createElement(_listActionButton.default, {
429
429
  ref: listActionButtonRef,
430
430
  listActionButton: listActionButton,
431
431
  onListAction: onListAction
@@ -1,3 +1,4 @@
1
+ import { SelectListProps } from ".";
1
2
  interface StyledSelectListProps {
2
3
  listHeight?: number;
3
4
  }
@@ -9,4 +10,9 @@ interface StyledSelectListTableHeaderProps {
9
10
  }
10
11
  declare const StyledSelectListTableHeader: import("styled-components").StyledComponent<"thead", any, StyledSelectListTableHeaderProps, never>;
11
12
  declare const StyledSelectListTableBody: import("styled-components").StyledComponent<"tbody", any, StyledSelectListProps, never>;
12
- export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, };
13
+ declare const StyledSelectListContainer: import("styled-components").StyledComponent<"div", any, Pick<SelectListProps, "isLoading">, never>;
14
+ declare const StyledScrollableContainer: import("styled-components").StyledComponent<"div", any, {
15
+ maxHeight: number;
16
+ hasActionButton: boolean;
17
+ }, never>;
18
+ export { StyledSelectList, StyledSelectLoaderContainer, StyledSelectListTable, StyledSelectListTableHeader, StyledSelectListTableBody, StyledSelectListContainer, StyledScrollableContainer, };
@@ -3,8 +3,9 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.StyledSelectLoaderContainer = exports.StyledSelectListTableHeader = exports.StyledSelectListTableBody = exports.StyledSelectListTable = exports.StyledSelectList = void 0;
6
+ exports.StyledSelectLoaderContainer = exports.StyledSelectListTableHeader = exports.StyledSelectListTableBody = exports.StyledSelectListTable = exports.StyledSelectListContainer = exports.StyledSelectList = exports.StyledScrollableContainer = void 0;
7
7
  var _styledComponents = _interopRequireWildcard(require("styled-components"));
8
+ var _themes = require("../../../style/themes");
8
9
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
9
10
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
10
11
  const StyledSelectList = exports.StyledSelectList = _styledComponents.default.ul`
@@ -98,4 +99,48 @@ const StyledSelectListTableBody = exports.StyledSelectListTableBody = _styledCom
98
99
  height: ${({
99
100
  listHeight
100
101
  }) => `${listHeight}px`};
101
- `;
102
+ `;
103
+ const StyledSelectListContainer = exports.StyledSelectListContainer = _styledComponents.default.div`
104
+ background-color: white;
105
+ box-shadow: var(--boxShadow100);
106
+ animation: fadeIn 250ms ease-out;
107
+ position: absolute;
108
+ z-index: ${({
109
+ theme
110
+ }) => theme.zIndex.popover};
111
+ display: flex;
112
+ flex-wrap: wrap;
113
+ align-items: flex-start;
114
+ border-radius: var(--borderRadius050);
115
+ ${({
116
+ isLoading
117
+ }) => isLoading && "min-height: 150px"};
118
+
119
+ @keyframes fadeIn {
120
+ 0% {
121
+ opacity: 0;
122
+ }
123
+ 100% {
124
+ opacity: 1;
125
+ }
126
+ }
127
+ `;
128
+ const StyledScrollableContainer = exports.StyledScrollableContainer = _styledComponents.default.div`
129
+ max-height: ${({
130
+ maxHeight
131
+ }) => `${maxHeight}px`};
132
+ width: 100%;
133
+ border-top-left-radius: var(--borderRadius050);
134
+ border-top-right-radius: var(--borderRadius050);
135
+ overflow-y: auto;
136
+
137
+ ${({
138
+ hasActionButton
139
+ }) => !hasActionButton && (0, _styledComponents.css)`
140
+ border-bottom-left-radius: var(--borderRadius050);
141
+ border-bottom-right-radius: var(--borderRadius050);
142
+ `}
143
+ `;
144
+ StyledSelectListContainer.defaultProps = {
145
+ theme: _themes.baseTheme
146
+ };
@@ -17,7 +17,7 @@ const enGB = {
17
17
  },
18
18
  advancedColorPicker: {
19
19
  ariaLabel: () => "Change colour",
20
- currentColorDescriptionTerm: () => "Current color assigned: ",
20
+ currentColorDescriptionTerm: () => "Current colour assigned: ",
21
21
  currentColorAssigned: currentColor => currentColor
22
22
  },
23
23
  batchSelection: {
@@ -132,7 +132,7 @@ const enGB = {
132
132
  },
133
133
  password: {
134
134
  ariaLiveShownMessage: () => "Your password has been shown. Focus on the password input to have it read to you, if it is safe to do so.",
135
- ariaLiveHiddenMessage: () => "Your Password is currently hidden."
135
+ ariaLiveHiddenMessage: () => "Your password is currently hidden."
136
136
  },
137
137
  progressTracker: {
138
138
  of: () => "of"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "carbon-react",
3
- "version": "127.0.2",
3
+ "version": "127.0.4",
4
4
  "description": "A library of reusable React components for easily building user interfaces.",
5
5
  "files": [
6
6
  "lib",
@@ -1,6 +0,0 @@
1
- import { SelectListProps } from ".";
2
- interface StyledSelectListContainerProps extends Pick<SelectListProps, "isLoading"> {
3
- maxHeight: number;
4
- }
5
- declare const StyledSelectListContainer: import("styled-components").StyledComponent<"div", any, StyledSelectListContainerProps, never>;
6
- export default StyledSelectListContainer;
@@ -1,36 +0,0 @@
1
- import styled from "styled-components";
2
- import { baseTheme } from "../../../style/themes";
3
- const StyledSelectListContainer = styled.div`
4
- background-color: white;
5
- box-shadow: var(--boxShadow100);
6
- animation: fadeIn 250ms ease-out;
7
- position: absolute;
8
- z-index: ${({
9
- theme
10
- }) => theme.zIndex.popover};
11
- max-height: ${({
12
- maxHeight
13
- }) => `${maxHeight}px`};
14
- overflow-y: auto;
15
- display: flex;
16
- flex-wrap: wrap;
17
- align-items: flex-start;
18
- border-radius: var(--borderRadius050);
19
-
20
- ${({
21
- isLoading
22
- }) => isLoading && "min-height: 150px"};
23
-
24
- @keyframes fadeIn {
25
- 0% {
26
- opacity: 0;
27
- }
28
- 100% {
29
- opacity: 1;
30
- }
31
- }
32
- `;
33
- StyledSelectListContainer.defaultProps = {
34
- theme: baseTheme
35
- };
36
- export default StyledSelectListContainer;
@@ -1,6 +0,0 @@
1
- import { SelectListProps } from ".";
2
- interface StyledSelectListContainerProps extends Pick<SelectListProps, "isLoading"> {
3
- maxHeight: number;
4
- }
5
- declare const StyledSelectListContainer: import("styled-components").StyledComponent<"div", any, StyledSelectListContainerProps, never>;
6
- export default StyledSelectListContainer;
@@ -1,43 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _styledComponents = _interopRequireDefault(require("styled-components"));
8
- var _themes = require("../../../style/themes");
9
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
10
- const StyledSelectListContainer = _styledComponents.default.div`
11
- background-color: white;
12
- box-shadow: var(--boxShadow100);
13
- animation: fadeIn 250ms ease-out;
14
- position: absolute;
15
- z-index: ${({
16
- theme
17
- }) => theme.zIndex.popover};
18
- max-height: ${({
19
- maxHeight
20
- }) => `${maxHeight}px`};
21
- overflow-y: auto;
22
- display: flex;
23
- flex-wrap: wrap;
24
- align-items: flex-start;
25
- border-radius: var(--borderRadius050);
26
-
27
- ${({
28
- isLoading
29
- }) => isLoading && "min-height: 150px"};
30
-
31
- @keyframes fadeIn {
32
- 0% {
33
- opacity: 0;
34
- }
35
- 100% {
36
- opacity: 1;
37
- }
38
- }
39
- `;
40
- StyledSelectListContainer.defaultProps = {
41
- theme: _themes.baseTheme
42
- };
43
- var _default = exports.default = StyledSelectListContainer;