@abgov/jsonforms-components 1.40.2 → 1.40.3

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/index.esm.js CHANGED
@@ -4424,6 +4424,7 @@ const ESCAPE_KEY = 'Escape';
4424
4424
  const ARROW_DOWN_KEY = 'ArrowDown';
4425
4425
  const ARROW_UP_KEY = 'ArrowUp';
4426
4426
  const TAB_KEY = 'Tab';
4427
+ const SPACE_KEY = ' ';
4427
4428
 
4428
4429
  let _$7 = t => t,
4429
4430
  _t$7,
@@ -4470,7 +4471,7 @@ const GoADropdownListContainer = styled.div(_t3$4 || (_t3$4 = _$7`
4470
4471
  }
4471
4472
  &:hover {
4472
4473
  background-color: var(--goa-color-interactive-hover) !important;
4473
- color: white !important;
4474
+ color: var(--goa-color-text-light) !important;
4474
4475
  }
4475
4476
  `), p => p.optionListMaxHeight || '272px');
4476
4477
  const GoADropdownListOption = styled.div(_t4$2 || (_t4$2 = _$7`
@@ -4497,7 +4498,7 @@ const GoADropdownListOption = styled.div(_t4$2 || (_t4$2 = _$7`
4497
4498
  }
4498
4499
  &:focus-within {
4499
4500
  caret-color: transparent;
4500
- color: ${0} !important;
4501
+ color: 'var(--goa-color-text-light) !important';
4501
4502
  background-color: var(--goa-color-interactive-hover) !important;
4502
4503
  }
4503
4504
  .dropDownListItem:focus-visible {
@@ -4505,7 +4506,7 @@ const GoADropdownListOption = styled.div(_t4$2 || (_t4$2 = _$7`
4505
4506
  outline: none !important;
4506
4507
  color: ${0};
4507
4508
  }
4508
- `), p => p.isSelected ? 'white' : 'var(--goa-color-greyscale-black)', p => p.isSelected ? 'var(--goa-color-interactive-default)' : '#fff', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'white' : 'var(--goa-color-interactive-hover)', p => p.isSelected ? 'white' : 'var(--goa-color-interactive-hover) !important');
4509
+ `), p => p.isSelected ? 'var(--goa-color-text-light)' : 'var(--goa-color-greyscale-black)', p => p.isSelected ? 'var(--goa-color-interactive-default)' : '#fff', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'var(--goa-color-interactive-hover)' : 'var(--goa-color-greyscale-100) !important', p => p.isSelected ? 'var(--goa-color-interactive-default)' : 'var(--goa-color-interactive-hover) !important', p => p.isSelected ? 'var(--goa-color-text-light)' : 'var(--goa-color-interactive-hover) !important');
4509
4510
 
4510
4511
  const isValidKey = keyCode => {
4511
4512
  if (keyCode === 'Shift' || keyCode === 'Alt') return false;
@@ -4591,7 +4592,7 @@ const Dropdown = props => {
4591
4592
  /* istanbul ignore next */
4592
4593
  const handleKeyDown = e => {
4593
4594
  var _a, _b, _c;
4594
- if (e.key === ENTER_KEY) {
4595
+ if (e.key === ENTER_KEY || e.key === SPACE_KEY) {
4595
4596
  setIsOpen(previousIsOpen => !previousIsOpen);
4596
4597
  const el = document.getElementById(`${PREFIX}-${label}-${(_a = items.at(0)) === null || _a === void 0 ? void 0 : _a.value}`);
4597
4598
  setElementFocus(e, el, false);
@@ -4628,7 +4629,7 @@ const Dropdown = props => {
4628
4629
  };
4629
4630
  const handDropDownItemOnKeyDown = (e, item) => {
4630
4631
  var _a, _b, _c, _d;
4631
- if (e.key === ENTER_KEY) {
4632
+ if (e.key === ENTER_KEY || e.key === SPACE_KEY) {
4632
4633
  updateDropDownData(item);
4633
4634
  const inputEl = document.getElementById(`${id}-input`);
4634
4635
  if (inputEl) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@abgov/jsonforms-components",
3
- "version": "1.40.2",
3
+ "version": "1.40.3",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Government of Alberta - React renderers for JSON Forms based on the design system.",
6
6
  "repository": "https://github.com/GovAlta/adsp-monorepo",
@@ -32,3 +32,6 @@ export declare const ESCAPE_KEY = "Escape";
32
32
  export declare const ARROW_DOWN_KEY = "ArrowDown";
33
33
  export declare const ARROW_UP_KEY = "ArrowUp";
34
34
  export declare const TAB_KEY = "Tab";
35
+ export declare const SPACE_KEY = " ";
36
+ export declare const ALT_KEY = "Alt";
37
+ export declare const SHIFT_KEY = "Shift";