@axinom/mosaic-ui 0.66.0-rc.9 → 0.67.0-rc.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.
Files changed (146) hide show
  1. package/dist/components/DynamicDataList/DynamicListHeader/DynamicListHeader.d.ts.map +1 -1
  2. package/dist/components/FieldSelection/FieldSelection.d.ts.map +1 -1
  3. package/dist/components/Filters/Filter/Filter.d.ts.map +1 -1
  4. package/dist/components/Filters/Filters.model.d.ts +5 -0
  5. package/dist/components/Filters/Filters.model.d.ts.map +1 -1
  6. package/dist/components/Filters/SelectionTypes/DateTimeFilter/DateTimeFilter.d.ts +2 -0
  7. package/dist/components/Filters/SelectionTypes/DateTimeFilter/DateTimeFilter.d.ts.map +1 -1
  8. package/dist/components/Filters/SelectionTypes/FreeTextFilter/FreeTextFilter.d.ts +2 -0
  9. package/dist/components/Filters/SelectionTypes/FreeTextFilter/FreeTextFilter.d.ts.map +1 -1
  10. package/dist/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.d.ts +2 -0
  11. package/dist/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.d.ts.map +1 -1
  12. package/dist/components/Filters/SelectionTypes/NumericTextFilter/NumericTextFilter.d.ts +2 -0
  13. package/dist/components/Filters/SelectionTypes/NumericTextFilter/NumericTextFilter.d.ts.map +1 -1
  14. package/dist/components/Filters/SelectionTypes/OptionsFilter/OptionsFilter.d.ts +2 -0
  15. package/dist/components/Filters/SelectionTypes/OptionsFilter/OptionsFilter.d.ts.map +1 -1
  16. package/dist/components/Filters/SelectionTypes/SearcheableOptionsFilter/SearcheableOptionsFilter.d.ts +2 -0
  17. package/dist/components/Filters/SelectionTypes/SearcheableOptionsFilter/SearcheableOptionsFilter.d.ts.map +1 -1
  18. package/dist/components/FormElements/Radio/Radio.d.ts.map +1 -1
  19. package/dist/components/FormElements/ToggleButton/ToggleButton.d.ts.map +1 -1
  20. package/dist/components/Hub/Tile/Tile.d.ts.map +1 -1
  21. package/dist/components/Icons/Icons.d.ts +4 -9
  22. package/dist/components/Icons/Icons.d.ts.map +1 -1
  23. package/dist/components/LandingPageTiles/TileLarge/TileLarge.d.ts.map +1 -1
  24. package/dist/components/LandingPageTiles/TileSmall/TileSmall.d.ts.map +1 -1
  25. package/dist/components/List/ListCheckBox/ListCheckBox.d.ts.map +1 -1
  26. package/dist/components/List/ListHeader/ColumnLabel/ColumnLabel.d.ts.map +1 -1
  27. package/dist/components/List/ListHeader/ListHeader.d.ts.map +1 -1
  28. package/dist/components/List/ListRow/ListRow.d.ts.map +1 -1
  29. package/dist/components/List/ListRow/ListRowCell/ListRowCell.d.ts +15 -0
  30. package/dist/components/List/ListRow/ListRowCell/ListRowCell.d.ts.map +1 -0
  31. package/dist/components/List/ListRow/ListRowCell/renderData.d.ts +9 -0
  32. package/dist/components/List/ListRow/ListRowCell/renderData.d.ts.map +1 -0
  33. package/dist/components/List/ListRow/Renderers/TagsRenderer/TagsRenderer.d.ts.map +1 -1
  34. package/dist/components/Loaders/ImageLoader/ImageLoader.d.ts.map +1 -1
  35. package/dist/components/PageHeader/PageHeaderAction/PageHeaderAction.d.ts.map +1 -1
  36. package/dist/components/Utils/Postgraphile/CreateConnectionRenderer.d.ts +1 -1
  37. package/dist/components/Utils/Postgraphile/CreateConnectionRenderer.d.ts.map +1 -1
  38. package/dist/components/VisualElements/ImgElement.d.ts +50 -0
  39. package/dist/components/VisualElements/ImgElement.d.ts.map +1 -0
  40. package/dist/components/VisualElements/SvgElement.d.ts +14 -0
  41. package/dist/components/VisualElements/SvgElement.d.ts.map +1 -0
  42. package/dist/components/VisualElements/index.d.ts +3 -0
  43. package/dist/components/VisualElements/index.d.ts.map +1 -0
  44. package/dist/components/index.d.ts +1 -0
  45. package/dist/components/index.d.ts.map +1 -1
  46. package/dist/helpers/idleCallbackHelpers.d.ts +42 -0
  47. package/dist/helpers/idleCallbackHelpers.d.ts.map +1 -0
  48. package/dist/helpers/index.d.ts +1 -0
  49. package/dist/helpers/index.d.ts.map +1 -1
  50. package/dist/hooks/useResize/ResizeIndicator.d.ts +8 -0
  51. package/dist/hooks/useResize/ResizeIndicator.d.ts.map +1 -0
  52. package/dist/hooks/useResize/useResize.d.ts +5 -2
  53. package/dist/hooks/useResize/useResize.d.ts.map +1 -1
  54. package/dist/index.d.ts +1 -0
  55. package/dist/index.d.ts.map +1 -1
  56. package/dist/index.es.js +4 -4
  57. package/dist/index.es.js.map +1 -1
  58. package/dist/index.js +4 -4
  59. package/dist/index.js.map +1 -1
  60. package/package.json +2 -2
  61. package/src/components/Accordion/Accordion.scss +1 -1
  62. package/src/components/Accordion/AccordionItem/AccordionItem.scss +2 -2
  63. package/src/components/Buttons/Button/Button.scss +5 -5
  64. package/src/components/Buttons/CompositeButton/CompositeButton.scss +7 -7
  65. package/src/components/Buttons/TextButton/TextButton.scss +6 -6
  66. package/src/components/ConfirmDialog/ConfirmDialog.scss +1 -1
  67. package/src/components/DateTime/DatePicker/DatePicker.scss +12 -12
  68. package/src/components/DateTime/TimePicker/ScrollColumn/ScrollColumn.scss +7 -7
  69. package/src/components/DateTime/TimePicker/TimePicker.scss +1 -1
  70. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.scss +2 -2
  71. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.spec.tsx +2 -0
  72. package/src/components/DynamicDataList/DynamicListHeader/DynamicListHeader.tsx +62 -50
  73. package/src/components/DynamicDataList/DynamicListRow/DynamicListRow.scss +2 -2
  74. package/src/components/FieldSelection/FieldSelection.scss +6 -0
  75. package/src/components/FieldSelection/FieldSelection.tsx +2 -1
  76. package/src/components/Filters/Filter/Filter.scss +34 -15
  77. package/src/components/Filters/Filter/Filter.spec.tsx +1 -1
  78. package/src/components/Filters/Filter/Filter.tsx +46 -34
  79. package/src/components/Filters/Filters.model.ts +6 -0
  80. package/src/components/Filters/SelectionTypes/DateTimeFilter/DateTimeFilter.tsx +5 -0
  81. package/src/components/Filters/SelectionTypes/FreeTextFilter/FreeTextFilter.tsx +4 -0
  82. package/src/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.scss +1 -1
  83. package/src/components/Filters/SelectionTypes/MultiOptionFilter/MultiOptionFilter.tsx +9 -1
  84. package/src/components/Filters/SelectionTypes/NumericTextFilter/NumericTextFilter.tsx +5 -0
  85. package/src/components/Filters/SelectionTypes/OptionsFilter/OptionsFilter.scss +6 -10
  86. package/src/components/Filters/SelectionTypes/OptionsFilter/OptionsFilter.tsx +8 -0
  87. package/src/components/Filters/SelectionTypes/SearcheableOptionsFilter/SearcheableOptionsFilter.tsx +6 -1
  88. package/src/components/FormElements/Checkbox/Checkbox.scss +4 -4
  89. package/src/components/FormElements/CustomTags/CustomTags.scss +1 -1
  90. package/src/components/FormElements/FileUploadControl/FileUploadControl.scss +4 -4
  91. package/src/components/FormElements/Radio/Radio.scss +5 -5
  92. package/src/components/FormElements/Radio/Radio.tsx +3 -2
  93. package/src/components/FormElements/Select/Select.scss +11 -6
  94. package/src/components/FormElements/ToggleButton/ToggleButton.scss +7 -7
  95. package/src/components/FormElements/ToggleButton/ToggleButton.tsx +32 -27
  96. package/src/components/Hub/Hub.stories.tsx +3 -2
  97. package/src/components/Hub/Tile/Tile.spec.tsx +7 -2
  98. package/src/components/Hub/Tile/Tile.tsx +2 -1
  99. package/src/components/Icons/Icons.scss +1 -0
  100. package/src/components/Icons/Icons.spec.tsx +90 -41
  101. package/src/components/Icons/Icons.tsx +357 -765
  102. package/src/components/InfoTooltip/InfoTooltip.scss +1 -1
  103. package/src/components/InlineMenu/InlineMenu.scss +2 -2
  104. package/src/components/LandingPageTiles/LandingPageTiles.stories.tsx +3 -2
  105. package/src/components/LandingPageTiles/TileLarge/TileLarge.spec.tsx +5 -1
  106. package/src/components/LandingPageTiles/TileLarge/TileLarge.tsx +2 -1
  107. package/src/components/LandingPageTiles/TileSmall/TileSmall.spec.tsx +7 -2
  108. package/src/components/LandingPageTiles/TileSmall/TileSmall.tsx +2 -1
  109. package/src/components/List/List.scss +4 -4
  110. package/src/components/List/ListCheckBox/ListCheckBox.tsx +1 -0
  111. package/src/components/List/ListHeader/ColumnLabel/ColumnLabel.spec.tsx +6 -6
  112. package/src/components/List/ListHeader/ColumnLabel/ColumnLabel.tsx +10 -13
  113. package/src/components/List/ListHeader/ListHeader.scss +2 -3
  114. package/src/components/List/ListHeader/ListHeader.spec.tsx +2 -0
  115. package/src/components/List/ListHeader/ListHeader.tsx +57 -51
  116. package/src/components/List/ListRow/ListRow.scss +1 -28
  117. package/src/components/List/ListRow/ListRow.spec.tsx +10 -8
  118. package/src/components/List/ListRow/ListRow.tsx +20 -152
  119. package/src/components/List/ListRow/ListRowCell/ListRowCell.scss +26 -0
  120. package/src/components/List/ListRow/ListRowCell/ListRowCell.spec.tsx +491 -0
  121. package/src/components/List/ListRow/ListRowCell/ListRowCell.tsx +57 -0
  122. package/src/components/List/ListRow/ListRowCell/renderData.tsx +124 -0
  123. package/src/components/List/ListRow/Renderers/TagsRenderer/TagsRenderer.spec.tsx +191 -80
  124. package/src/components/List/ListRow/Renderers/TagsRenderer/TagsRenderer.tsx +63 -34
  125. package/src/components/Loaders/ImageLoader/ImageLoader.spec.tsx +13 -14
  126. package/src/components/Loaders/ImageLoader/ImageLoader.tsx +5 -3
  127. package/src/components/PageHeader/PageHeader.scss +1 -1
  128. package/src/components/PageHeader/PageHeaderAction/PageHeaderAction.tsx +13 -2
  129. package/src/components/Tabs/Tab/CustomTab.scss +4 -4
  130. package/src/components/Tabs/TabList/CustomTabList.scss +2 -2
  131. package/src/components/Utils/Postgraphile/CreateConnectionRenderer.spec.ts +48 -12
  132. package/src/components/Utils/Postgraphile/CreateConnectionRenderer.tsx +5 -4
  133. package/src/components/VisualElements/ImgElement.spec.tsx +92 -0
  134. package/src/components/VisualElements/ImgElement.tsx +72 -0
  135. package/src/components/VisualElements/SvgElement.spec.tsx +158 -0
  136. package/src/components/VisualElements/SvgElement.tsx +40 -0
  137. package/src/components/VisualElements/index.ts +7 -0
  138. package/src/components/index.ts +1 -0
  139. package/src/helpers/idleCallbackHelpers.ts +66 -0
  140. package/src/helpers/index.ts +5 -0
  141. package/src/hooks/useResize/ResizeIndicator.scss +7 -0
  142. package/src/hooks/useResize/ResizeIndicator.tsx +39 -0
  143. package/src/hooks/useResize/{useResize.ts → useResize.tsx} +38 -6
  144. package/src/index.ts +2 -0
  145. package/src/styles/branding.scss +89 -0
  146. package/src/styles/variables.scss +245 -187
@@ -1,11 +1,5 @@
1
1
  import clsx from 'clsx';
2
- import React, {
3
- PropsWithChildren,
4
- ReactNode,
5
- useEffect,
6
- useRef,
7
- useState,
8
- } from 'react';
2
+ import React, { PropsWithChildren, ReactNode, useState } from 'react';
9
3
  import { assertNever } from '../../../helpers/utils';
10
4
  import { Data } from '../../../types/data';
11
5
  import { Button, ButtonContext } from '../../Buttons';
@@ -58,18 +52,16 @@ export const Filter = <T extends Data>({
58
52
  }: PropsWithChildren<FilterProps<T>>): JSX.Element => {
59
53
  const [isExpanded, setIsExpanded] = useState<boolean>(false);
60
54
  const [hasError, setHasError] = useState<boolean>(false);
61
- const [contentHeight, setContentHeight] = useState<number>(0);
62
55
  const [stringValue, setStringValue] = useState<string | undefined>();
63
56
 
64
- const contentRef = useRef<HTMLDivElement>(null);
65
- const valueRef = useRef<HTMLDivElement>(null);
66
-
67
- useEffect(() => {
68
- setContentHeight(
69
- (contentRef.current?.scrollHeight ?? 0) +
70
- (valueRef.current?.scrollHeight ?? 0),
71
- );
72
- }, [isExpanded, hasError, value]);
57
+ const inputId = `${String(options.property)}-filter-input`;
58
+ const labelId = `${String(options.property)}-filter-label`;
59
+ const inputBasedFilter = [
60
+ FilterTypes.FreeText,
61
+ FilterTypes.Numeric,
62
+ FilterTypes.Date,
63
+ FilterTypes.DateTime,
64
+ ];
73
65
 
74
66
  const onFilterValueChange = (
75
67
  prop: keyof T,
@@ -135,6 +127,7 @@ export const Filter = <T extends Data>({
135
127
  onError={onError}
136
128
  onValidate={onValidate}
137
129
  selectOnFocus={selectOnFocus}
130
+ inputId={inputId}
138
131
  />
139
132
  );
140
133
 
@@ -147,6 +140,7 @@ export const Filter = <T extends Data>({
147
140
  }
148
141
  onError={onError}
149
142
  onValidate={onValidate}
143
+ inputId={inputId}
150
144
  />
151
145
  );
152
146
 
@@ -158,6 +152,7 @@ export const Filter = <T extends Data>({
158
152
  onSelect={(value: FilterValue) =>
159
153
  onFilterValueChange(options.property, value)
160
154
  }
155
+ labelId={labelId}
161
156
  />
162
157
  );
163
158
 
@@ -169,6 +164,7 @@ export const Filter = <T extends Data>({
169
164
  onSelect={(value: FilterValue) =>
170
165
  onFilterValueChange(options.property, value?.toString())
171
166
  }
167
+ labelId={labelId}
172
168
  />
173
169
  );
174
170
  case FilterTypes.SearcheableOptions:
@@ -181,6 +177,8 @@ export const Filter = <T extends Data>({
181
177
  onFilterValueChange(options.property, value, stringValue)
182
178
  }
183
179
  maxItems={options.maxItems}
180
+ inputId={inputId}
181
+ labelId={labelId}
184
182
  />
185
183
  );
186
184
 
@@ -194,6 +192,7 @@ export const Filter = <T extends Data>({
194
192
  modifyTime={false}
195
193
  onError={onError}
196
194
  onValidate={onValidate}
195
+ inputId={inputId}
197
196
  />
198
197
  );
199
198
 
@@ -207,6 +206,7 @@ export const Filter = <T extends Data>({
207
206
  modifyTime={true}
208
207
  onError={onError}
209
208
  onValidate={onValidate}
209
+ inputId={inputId}
210
210
  />
211
211
  );
212
212
 
@@ -220,6 +220,7 @@ export const Filter = <T extends Data>({
220
220
  }}
221
221
  onError={onError}
222
222
  onValidate={onValidate}
223
+ labelId={labelId}
223
224
  />
224
225
  );
225
226
 
@@ -229,9 +230,16 @@ export const Filter = <T extends Data>({
229
230
  }
230
231
  };
231
232
 
233
+ const hasValue = value !== undefined && value !== '';
234
+
232
235
  return (
233
236
  <div
234
- className={clsx(classes.container, 'filter-container', className)}
237
+ className={clsx(
238
+ classes.container,
239
+ { [classes.hasValue]: hasValue },
240
+ 'filter-container',
241
+ className,
242
+ )}
235
243
  data-test-id={`filter:${options.property as string}`}
236
244
  data-test-type={FilterTypes[options.type]}
237
245
  onClick={() => onFilterClicked()}
@@ -241,31 +249,36 @@ export const Filter = <T extends Data>({
241
249
  setIsExpanded(!isExpanded);
242
250
  setHasError(false);
243
251
  }}
244
- className={clsx(
245
- classes.title,
246
- { [classes.expanded]: isExpanded && isActive },
247
- hasError && classes.hasError,
248
- !!value && classes.active,
249
- )}
252
+ className={clsx(classes.title, {
253
+ [classes.hasValue]: hasValue,
254
+ [classes.active]: isActive && isExpanded,
255
+ [classes.hasError]: hasError,
256
+ })}
250
257
  data-test-id="filter-button-toggle"
251
258
  >
252
- <span data-test-id="filter-label">{options.label}</span>
259
+ <label
260
+ id={labelId}
261
+ {...(inputBasedFilter.includes(options.type)
262
+ ? {}
263
+ : { htmlFor: inputId })}
264
+ data-test-id="filter-label"
265
+ >
266
+ {options.label}
267
+ </label>
253
268
  <Button
254
- icon={IconName.ChevronDown}
255
- className={clsx(classes.button)}
269
+ icon={IconName.ChevronRight}
270
+ className={clsx(classes.button, {
271
+ [classes.rotated]: isExpanded || hasValue,
272
+ })}
256
273
  buttonContext={ButtonContext.None}
257
274
  />
258
275
  </div>
259
276
  <div
260
- className={clsx(classes.content)}
261
- style={{
262
- maxHeight: contentHeight,
263
- }}
277
+ className={clsx(classes.content, { [classes.expanded]: isExpanded })}
264
278
  >
265
- {value !== undefined && !isExpanded && (
279
+ {hasValue && !isExpanded && (
266
280
  <div
267
281
  className={clsx(classes.selectedValue)}
268
- ref={valueRef}
269
282
  onClick={() => {
270
283
  setIsExpanded(!isExpanded);
271
284
  }}
@@ -285,7 +298,6 @@ export const Filter = <T extends Data>({
285
298
  )}
286
299
  {isExpanded && (
287
300
  <div
288
- ref={contentRef}
289
301
  data-test-id="filter-content"
290
302
  className={clsx({ [classes.active]: isActive })}
291
303
  >
@@ -78,6 +78,12 @@ export interface CustomFilterProps {
78
78
  /** Wether or not the filter is active (default: false) */
79
79
  active?: boolean;
80
80
 
81
+ /**
82
+ * Optional id for the label element.
83
+ * Assign to the label's `id` and reference from the input or group via `aria-labelledby`.
84
+ */
85
+ labelId?: string;
86
+
81
87
  /** Callback triggered when a new filter value is selected */
82
88
  onSelect: (
83
89
  value: FilterValue,
@@ -31,6 +31,9 @@ export interface DateTimeFilterProps {
31
31
 
32
32
  /** CSS Class name for additional styles */
33
33
  className?: string;
34
+
35
+ /** Optional id for the input field */
36
+ inputId?: string;
34
37
  }
35
38
 
36
39
  export const DateTimeFilter: React.FC<DateTimeFilterProps> = ({
@@ -40,6 +43,7 @@ export const DateTimeFilter: React.FC<DateTimeFilterProps> = ({
40
43
  onError = noop,
41
44
  onValidate: customValidate,
42
45
  className = '',
46
+ inputId,
43
47
  }) => {
44
48
  const container = useRef<HTMLDivElement>(null);
45
49
  const [showPicker, setShowPicker] = useState(false);
@@ -111,6 +115,7 @@ export const DateTimeFilter: React.FC<DateTimeFilterProps> = ({
111
115
  ref={container}
112
116
  >
113
117
  <input
118
+ id={inputId}
114
119
  autoFocus
115
120
  className={clsx(classes.inputValue)}
116
121
  onKeyDown={handleKeyDown}
@@ -19,6 +19,8 @@ export interface FreeTextFilterProps {
19
19
  className?: string;
20
20
  /** Select text on focus if true (default: true) */
21
21
  selectOnFocus?: boolean;
22
+ /** Optional id for the input field */
23
+ inputId?: string;
22
24
  }
23
25
 
24
26
  export const FreeTextFilter: React.FC<FreeTextFilterProps> = ({
@@ -28,6 +30,7 @@ export const FreeTextFilter: React.FC<FreeTextFilterProps> = ({
28
30
  onValidate: customValidate,
29
31
  className = '',
30
32
  selectOnFocus = true,
33
+ inputId,
31
34
  }) => {
32
35
  const [errorMsg, setErrorMsg] = useState<string>();
33
36
  const ENTER_KEY = 'Enter';
@@ -68,6 +71,7 @@ export const FreeTextFilter: React.FC<FreeTextFilterProps> = ({
68
71
  )}
69
72
  >
70
73
  <input
74
+ id={inputId}
71
75
  ref={inputRef}
72
76
  autoFocus
73
77
  className={clsx(classes.inputValue, errorMsg && classes.hasError)}
@@ -13,7 +13,7 @@
13
13
  input {
14
14
  border-color: var(
15
15
  --multi-option-checbox-border,
16
- $multi-option-checbox-border
16
+ $multi-option-checkbox-border
17
17
  );
18
18
  }
19
19
  &:hover {
@@ -17,19 +17,27 @@ export interface MultiOptionFilterProps {
17
17
 
18
18
  /** CSS Class name for additional styles */
19
19
  className?: string;
20
+
21
+ /** ID for the label */
22
+ labelId?: string;
20
23
  }
21
24
 
22
25
  export const MultiOptionsFilter: React.FC<MultiOptionFilterProps> = ({
23
26
  value,
24
27
  options,
25
28
  onSelect,
29
+ labelId,
26
30
  }) => {
27
31
  const [selectedOptionList, setSelectedOptionList] = useState<string[]>(
28
32
  value ? value.split(',') : [],
29
33
  );
30
34
 
31
35
  return (
32
- <div className={clsx(classes.multiFilterContainer)}>
36
+ <div
37
+ className={classes.multiFilterContainer}
38
+ role="group"
39
+ aria-labelledby={labelId}
40
+ >
33
41
  {options?.map((option: Option) => (
34
42
  <Checkbox
35
43
  className={clsx(
@@ -18,6 +18,9 @@ export interface NumericTextFilterProps {
18
18
 
19
19
  /** CSS Class name for additional styles */
20
20
  className?: string;
21
+
22
+ /** Optional id for the input field */
23
+ inputId?: string;
21
24
  }
22
25
 
23
26
  export const NumericTextFilter: React.FC<NumericTextFilterProps> = ({
@@ -26,6 +29,7 @@ export const NumericTextFilter: React.FC<NumericTextFilterProps> = ({
26
29
  onError = noop,
27
30
  onValidate: customValidate,
28
31
  className = '',
32
+ inputId,
29
33
  }) => {
30
34
  const [errorMsg, setErrorMsg] = useState<string>();
31
35
  const ENTER_KEY = 'Enter';
@@ -64,6 +68,7 @@ export const NumericTextFilter: React.FC<NumericTextFilterProps> = ({
64
68
  )}
65
69
  >
66
70
  <input
71
+ id={inputId}
67
72
  autoFocus
68
73
  value={valueLocal}
69
74
  className={clsx(classes.inputValue, errorMsg && classes.hasError)}
@@ -4,11 +4,7 @@
4
4
  @include boxSizing;
5
5
 
6
6
  display: grid;
7
- grid-auto-rows: 50px;
8
- background-color: var(
9
- --filter-controller-background-color,
10
- $filter-controller-background-color
11
- );
7
+ grid-auto-rows: 40px;
12
8
  gap: 1px;
13
9
  border-top: unset;
14
10
 
@@ -18,7 +14,7 @@
18
14
 
19
15
  span {
20
16
  font-size: var(--filter-font-size, $filter-font-size);
21
- color: var(--filter-title-color, $filter-title-color);
17
+ color: var(--popper-text-color, $popper-text-color);
22
18
  display: grid;
23
19
  place-items: center left;
24
20
  padding: 0 20px;
@@ -27,15 +23,15 @@
27
23
 
28
24
  &:hover {
29
25
  background-color: var(
30
- --filter-background-selected-color,
31
- $filter-background-selected-color
26
+ --popper-item-hover-color,
27
+ $popper-item-hover-color
32
28
  );
33
29
  }
34
30
 
35
31
  &.selected {
36
32
  background-color: var(
37
- --filter-background-selected-color,
38
- $filter-background-selected-color
33
+ --popper-background-selected-color,
34
+ $popper-background-selected-color
39
35
  );
40
36
  }
41
37
  }
@@ -14,6 +14,9 @@ export interface OptionFilterProps {
14
14
 
15
15
  /** CSS Class name for additional styles */
16
16
  className?: string;
17
+
18
+ /** Optional id for the label element */
19
+ labelId?: string;
17
20
  }
18
21
 
19
22
  export const OptionsFilter: React.FC<OptionFilterProps> = ({
@@ -21,9 +24,12 @@ export const OptionsFilter: React.FC<OptionFilterProps> = ({
21
24
  options,
22
25
  onSelect,
23
26
  className = '',
27
+ labelId,
24
28
  }) => {
25
29
  return (
26
30
  <div
31
+ role="radiogroup"
32
+ aria-labelledby={labelId}
27
33
  className={clsx(classes.container, 'options-filter-container', className)}
28
34
  >
29
35
  {options?.map((option: Option) => (
@@ -32,6 +38,8 @@ export const OptionsFilter: React.FC<OptionFilterProps> = ({
32
38
  onClick={() => onSelect(option.value)}
33
39
  key={option.label}
34
40
  data-test-value={option.value as string}
41
+ role="radio"
42
+ aria-checked={value === option.value}
35
43
  >
36
44
  <span
37
45
  className={clsx(value === option.value && classes.selected)}
@@ -14,6 +14,9 @@ interface SearcheableOptionFilterProps
14
14
  searchInputPlaceholder?: string;
15
15
  maxItems?: number;
16
16
  onSelect: (value: string, stringValue?: string) => void;
17
+
18
+ /** Optional id for the input field */
19
+ inputId?: string;
17
20
  }
18
21
 
19
22
  export const SearcheableOptionsFilter: React.FC<
@@ -24,6 +27,7 @@ export const SearcheableOptionsFilter: React.FC<
24
27
  maxItems = 10,
25
28
  onSelect,
26
29
  className,
30
+ inputId,
27
31
  ...rest
28
32
  }) => {
29
33
  const [options, setOptions] = useState<Option[]>([]);
@@ -56,9 +60,10 @@ export const SearcheableOptionsFilter: React.FC<
56
60
  )}
57
61
  >
58
62
  <input
63
+ id={inputId}
59
64
  autoFocus
60
65
  onChange={debounce(onChangeHandler, 500)}
61
- className={clsx(classes.inputValue, '' && classes.hasError)}
66
+ className={classes.inputValue}
62
67
  placeholder={searchInputPlaceholder}
63
68
  />
64
69
  </div>
@@ -26,7 +26,7 @@
26
26
  // transition: background-color 0.15s ease-in-out 0s;
27
27
 
28
28
  &.hasConfirm {
29
- border: 1px solid $yellow;
29
+ border: 1px solid var(--ax-warning);
30
30
  }
31
31
 
32
32
  &.hasError {
@@ -54,8 +54,8 @@
54
54
  box-shadow: 0 0 0 2px var(--input-hover-color, $input-hover-color);
55
55
 
56
56
  &.hasConfirm {
57
- border: 1px solid $yellow;
58
- box-shadow: 0 0 0 2px $yellow;
57
+ border: 1px solid var(--ax-warning);
58
+ box-shadow: 0 0 0 2px var(--ax-warning);
59
59
  }
60
60
 
61
61
  &.hasError {
@@ -70,7 +70,7 @@
70
70
  background-color: var(--input-hover-color, $input-hover-color);
71
71
 
72
72
  &.hasConfirm {
73
- background-color: $yellow;
73
+ background-color: var(--ax-warning);
74
74
  }
75
75
 
76
76
  &.hasError {
@@ -145,7 +145,7 @@
145
145
  &.hasError {
146
146
  background-color: white;
147
147
  svg * {
148
- stroke: rgba($gray, 0.5);
148
+ stroke: color-mix(in srgb, var(--ax-neutral) 50%, transparent);
149
149
  }
150
150
  }
151
151
 
@@ -19,7 +19,7 @@
19
19
 
20
20
  margin-left: -50px;
21
21
  border: none;
22
- background-color: $blue;
22
+ background-color: var(--ax-primary);
23
23
 
24
24
  transition: box-shadow 0.15s ease-in-out 0s;
25
25
 
@@ -35,16 +35,16 @@
35
35
 
36
36
  &:hover {
37
37
  border: none;
38
- background-color: rgba($blue, 0.75);
38
+ background-color: color-mix(in srgb, var(--ax-primary) 75%, transparent);
39
39
  }
40
40
 
41
41
  &.disabled {
42
42
  border: none;
43
- background-color: $gray;
43
+ background-color: var(--ax-neutral);
44
44
  cursor: default;
45
45
 
46
46
  svg * {
47
- stroke: rgba(white, 0.5);
47
+ stroke: color-mix(in srgb, white 50%, transparent);
48
48
  }
49
49
  }
50
50
  }
@@ -27,7 +27,7 @@
27
27
  grid: 1fr / 30px 1fr;
28
28
  column-gap: 8px;
29
29
 
30
- color: $dark-gray;
30
+ color: var(--ax-neutral-dark);
31
31
  font-size: 16px;
32
32
  font-weight: unset;
33
33
 
@@ -37,12 +37,12 @@
37
37
 
38
38
  &.disabled {
39
39
  .radioOutline {
40
- fill: $light-gray-2;
40
+ fill: var(--ax-neutral-lighter);
41
41
  }
42
42
 
43
43
  .checked {
44
44
  .radioDot {
45
- fill: $light-gray;
45
+ fill: var(--ax-neutral-light);
46
46
  }
47
47
  }
48
48
  }
@@ -60,7 +60,7 @@
60
60
 
61
61
  .radioOutline {
62
62
  fill: none;
63
- stroke: $gray;
63
+ stroke: var(--ax-neutral);
64
64
  stroke-width: 1;
65
65
  }
66
66
 
@@ -87,7 +87,7 @@
87
87
 
88
88
  &.hasConfirm {
89
89
  .radioOutline {
90
- stroke: $yellow;
90
+ stroke: var(--ax-warning);
91
91
  stroke-width: 3;
92
92
  }
93
93
  }
@@ -5,6 +5,7 @@ import {
5
5
  ConfirmationConfig,
6
6
  ConfirmationMode,
7
7
  } from '../../ConfirmDialog';
8
+ import { SvgElement } from '../../VisualElements/SvgElement';
8
9
  import { BaseFormControl, BaseInputEvents } from '../Form.models';
9
10
  import { FormElementContainer } from '../FormElementContainer';
10
11
  import classes from './Radio.scss';
@@ -42,7 +43,7 @@ export const RadioButton: React.FC<RadioButtonProps> = ({
42
43
  confirmValue,
43
44
  disabled = false,
44
45
  }) => (
45
- <svg
46
+ <SvgElement
46
47
  className={clsx(classes.buttonContainer, {
47
48
  [classes.checked]: checked,
48
49
  [classes.hasError]: hasError,
@@ -59,7 +60,7 @@ export const RadioButton: React.FC<RadioButtonProps> = ({
59
60
  >
60
61
  <circle className={classes.radioOutline} cx="17" cy="17" r="15" />
61
62
  <circle className={classes.radioDot} cx="17" cy="17" r="7.5" />
62
- </svg>
63
+ </SvgElement>
63
64
  );
64
65
 
65
66
  /**
@@ -94,7 +94,7 @@
94
94
  ul {
95
95
  display: grid;
96
96
  row-gap: 1px;
97
- background-color: var(--popper-background-color, $popper-background-color);
97
+ background-color: white;
98
98
  padding: 0px;
99
99
  margin-top: 1px;
100
100
  margin-bottom: 1px;
@@ -105,7 +105,7 @@
105
105
  li {
106
106
  display: grid;
107
107
  place-items: center left;
108
- height: 50px;
108
+ height: 40px;
109
109
  font-size: var(--popper-item-font-size, $popper-item-font-size);
110
110
  color: var(--popper-text-color, $popper-text-color);
111
111
  background-color: white;
@@ -116,18 +116,23 @@
116
116
  &:hover {
117
117
  cursor: pointer;
118
118
  background-color: var(
119
- --popper-background-selected-color,
120
- $popper-background-selected-color
119
+ --popper-item-hover-color,
120
+ $popper-item-hover-color
121
121
  );
122
122
  }
123
123
 
124
- &[aria-selected='true'],
125
- &[class='Mui-focused Mui-focusVisible'] {
124
+ &[aria-selected='true'] {
126
125
  background-color: var(
127
126
  --popper-background-selected-color,
128
127
  $popper-background-selected-color
129
128
  );
130
129
  }
130
+ &[class='Mui-focused Mui-focusVisible'] {
131
+ background-color: var(
132
+ --popper-item-selected-color,
133
+ $popper-item-selected-color
134
+ );
135
+ }
131
136
  }
132
137
  }
133
138
  }
@@ -94,13 +94,13 @@
94
94
  }
95
95
  }
96
96
  &.off {
97
- border-top: 1px solid $yellow;
98
- border-bottom: 1px solid $yellow;
99
- border-left: 1px solid $yellow;
97
+ border-top: 1px solid var(--ax-warning);
98
+ border-bottom: 1px solid var(--ax-warning);
99
+ border-left: 1px solid var(--ax-warning);
100
100
  transition: border $confirmation-transition linear;
101
101
  }
102
102
  &.on {
103
- border: 1px solid $yellow;
103
+ border: 1px solid var(--ax-warning);
104
104
  transition: border $confirmation-transition linear;
105
105
  }
106
106
  }
@@ -108,19 +108,19 @@
108
108
  div.active.off {
109
109
  svg {
110
110
  .svgText {
111
- fill: $yellow;
111
+ fill: var(--ax-warning);
112
112
  transition: fill $confirmation-transition linear;
113
113
  }
114
114
  }
115
115
  }
116
116
 
117
117
  div.active.on {
118
- background-color: $yellow !important;
118
+ background-color: var(--ax-warning) !important;
119
119
  transition: background-color $confirmation-transition linear;
120
120
  }
121
121
 
122
122
  &:hover {
123
- box-shadow: 0 0 0 2px $yellow;
123
+ box-shadow: 0 0 0 2px var(--ax-warning);
124
124
  transition: box-shadow $confirmation-transition linear;
125
125
  }
126
126
  }