@lumx/core 4.25.1-next.2 → 4.26.0-next.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.
@@ -5076,6 +5076,9 @@ table {
5076
5076
  .lumx-combobox-option-skeleton:nth-child(3n+2) .lumx-skeleton-typography {
5077
5077
  width: min(55%, 170px);
5078
5078
  }
5079
+ .lumx-combobox-option__selection-icon {
5080
+ margin: auto;
5081
+ }
5079
5082
  .lumx-combobox-option .lumx-list-item__content {
5080
5083
  display: flex;
5081
5084
  flex-direction: column;
@@ -8123,6 +8126,7 @@ table {
8123
8126
  display: flex;
8124
8127
  flex-shrink: 0;
8125
8128
  justify-content: center;
8129
+ gap: 4px;
8126
8130
  width: 24px;
8127
8131
  margin-right: 8px;
8128
8132
  }
@@ -8130,6 +8134,7 @@ table {
8130
8134
  display: flex;
8131
8135
  flex-shrink: 0;
8132
8136
  justify-content: center;
8137
+ gap: 4px;
8133
8138
  margin-left: 8px;
8134
8139
  }
8135
8140
 
@@ -8147,6 +8152,7 @@ table {
8147
8152
  display: flex;
8148
8153
  flex-shrink: 0;
8149
8154
  justify-content: center;
8155
+ gap: 4px;
8150
8156
  width: 36px;
8151
8157
  margin-right: 16px;
8152
8158
  }
@@ -8154,6 +8160,7 @@ table {
8154
8160
  display: flex;
8155
8161
  flex-shrink: 0;
8156
8162
  justify-content: center;
8163
+ gap: 4px;
8157
8164
  margin-left: 16px;
8158
8165
  }
8159
8166
 
@@ -8171,6 +8178,7 @@ table {
8171
8178
  display: flex;
8172
8179
  flex-shrink: 0;
8173
8180
  justify-content: center;
8181
+ gap: 4px;
8174
8182
  width: 36px;
8175
8183
  margin-right: 16px;
8176
8184
  }
@@ -8178,6 +8186,7 @@ table {
8178
8186
  display: flex;
8179
8187
  flex-shrink: 0;
8180
8188
  justify-content: center;
8189
+ gap: 4px;
8181
8190
  margin-left: 16px;
8182
8191
  }
8183
8192
 
@@ -8194,6 +8203,7 @@ table {
8194
8203
  display: flex;
8195
8204
  flex-shrink: 0;
8196
8205
  justify-content: center;
8206
+ gap: 4px;
8197
8207
  width: 36px;
8198
8208
  margin-right: 16px;
8199
8209
  }
@@ -8201,6 +8211,7 @@ table {
8201
8211
  display: flex;
8202
8212
  flex-shrink: 0;
8203
8213
  justify-content: center;
8214
+ gap: 4px;
8204
8215
  margin-left: 16px;
8205
8216
  }
8206
8217
 
@@ -8255,17 +8266,17 @@ table {
8255
8266
  .lumx-list-item__link--is-selected:active, .lumx-list-item__link--is-selected[data-lumx-active] {
8256
8267
  background-color: var(--lumx-color-primary-L3);
8257
8268
  }
8258
- .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8269
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8259
8270
  background-color: var(--lumx-color-primary-L5);
8260
8271
  }
8261
- .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8272
+ .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8262
8273
  background-color: var(--lumx-color-primary-L4);
8263
8274
  }
8264
8275
  @media (hover: hover) {
8265
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8276
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, [aria-current=""]):hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8266
8277
  background-color: var(--lumx-color-primary-L4);
8267
8278
  }}
8268
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8279
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""]):active::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8269
8280
  background-color: var(--lumx-color-primary-L3);
8270
8281
  }
8271
8282
  .lumx-list-item__link--is-disabled, .lumx-list-item__link[aria-disabled=true], .lumx-list-item:has(.lumx-action-area__action[aria-disabled=true]) {
@@ -17,6 +17,11 @@ export interface ComboboxListProps extends HasClassName {
17
17
  * Omit (or set to `undefined`) when not loading — the attribute is not rendered as `"false"`.
18
18
  */
19
19
  'aria-busy'?: boolean;
20
+ /**
21
+ * Allow selecting several options (`aria-multiselectable`).
22
+ * Also read by `Combobox.SelectionIcon` to pick the checkbox icons.
23
+ */
24
+ 'aria-multiselectable'?: boolean | 'true' | 'false';
20
25
  /** Content (should be ComboboxOption elements). */
21
26
  children?: JSXElement;
22
27
  /** The ID of the listbox element. */
@@ -9,7 +9,7 @@ type RenderResult = {
9
9
  */
10
10
  export interface ComboboxOptionTestSetup {
11
11
  /** Combobox compound component namespace */
12
- Combobox: Pick<ComboboxNamespace, 'Provider' | 'Input' | 'List' | 'Option'>;
12
+ Combobox: Pick<ComboboxNamespace, 'Provider' | 'Input' | 'List' | 'Option' | 'SelectionIcon'>;
13
13
  /**
14
14
  * Render a JSX template and return a result with a container.
15
15
  * The template is a zero-argument function returning a JSX element.
@@ -0,0 +1,13 @@
1
+ export interface ComboboxSelectionIconProps {
2
+ /** Selection type of the select (`undefined` renders nothing). */
3
+ selectionType: 'single' | 'multiple' | undefined;
4
+ /** Whether the option is selected. */
5
+ isSelected: boolean;
6
+ }
7
+ /**
8
+ * Selection state icon of an option. The icon is always rendered after the label.
9
+ *
10
+ * - `single`: a check circle icon when selected, a blank radio icon otherwise.
11
+ * - `multiple`: a checkbox icon, marked or blank.
12
+ */
13
+ export declare const ComboboxSelectionIcon: ({ selectionType, isSelected }: ComboboxSelectionIconProps) => import("react").JSX.Element | null;
@@ -79,6 +79,26 @@ export declare function setup({ components: { Combobox, IconButton, Avatar, Skel
79
79
  onChange: (v: string) => void;
80
80
  }) => import("react").JSX.Element;
81
81
  };
82
+ ComboboxWithSelectionIconSingle: {
83
+ args: {
84
+ value: string;
85
+ };
86
+ decorators: ((story: any, context: any) => any)[];
87
+ render: ({ value, onChange }: {
88
+ value: string;
89
+ onChange: (v: string) => void;
90
+ }) => import("react").JSX.Element;
91
+ };
92
+ ComboboxWithSelectionIconMultiple: {
93
+ args: {
94
+ value: string;
95
+ };
96
+ decorators: ((story: any, context: any) => any)[];
97
+ render: ({ value, onChange }: {
98
+ value: string;
99
+ onChange: (v: string) => void;
100
+ }) => import("react").JSX.Element;
101
+ };
82
102
  GridComboboxWithInput: {
83
103
  args: {
84
104
  value: string;
@@ -9,6 +9,7 @@ export interface ComboboxNamespace {
9
9
  OptionAction: any;
10
10
  OptionMoreInfo: any;
11
11
  OptionSkeleton: any;
12
+ SelectionIcon: any;
12
13
  Popover: any;
13
14
  Section: any;
14
15
  State: any;
@@ -1,6 +1,7 @@
1
1
  import type { HasAriaDisabled } from '../../types/HasAriaDisabled';
2
2
  import type { HasTheme } from '../../types/HasTheme';
3
3
  import type { JSXElement, Selector } from '../../types';
4
+ import type { InputLabelProps } from '../../components/InputLabel';
4
5
  /**
5
6
  * Status of the select dropdown list.
6
7
  *
@@ -74,6 +75,7 @@ export interface BaseSelectComponents {
74
75
  Option: any;
75
76
  State: any;
76
77
  OptionSkeleton: any;
78
+ SelectionIcon: any;
77
79
  };
78
80
  /** Framework-specific InfiniteScroll component (handles IntersectionObserver lifecycle). */
79
81
  InfiniteScroll?: any;
@@ -237,6 +239,8 @@ export interface BaseSelectTextFieldWrapperProps<O> extends Pick<BaseSelectProps
237
239
  maxLength?: number;
238
240
  /** Accessible label for the input element (overrides the visual label for screen readers). */
239
241
  ariaLabel?: string;
242
+ /** Additional props forwarded to the field label (e.g. `className: 'visually-hidden'`, `typography`). */
243
+ labelProps?: Partial<Omit<InputLabelProps, 'children' | 'htmlFor' | 'id'>>;
240
244
  /** Additional props forwarded to the Combobox.Input (and ultimately to TextField). */
241
245
  inputProps?: Record<string, any>;
242
246
  /** Props forwarded to the Combobox.Popover. */
package/lumx.css CHANGED
@@ -5757,6 +5757,9 @@ table {
5757
5757
  .lumx-combobox-option-skeleton:nth-child(3n+2) .lumx-skeleton-typography {
5758
5758
  width: min(55%, 170px);
5759
5759
  }
5760
+ .lumx-combobox-option__selection-icon {
5761
+ margin: auto;
5762
+ }
5760
5763
  .lumx-combobox-option .lumx-list-item__content {
5761
5764
  display: flex;
5762
5765
  flex-direction: column;
@@ -8804,6 +8807,7 @@ table {
8804
8807
  display: flex;
8805
8808
  flex-shrink: 0;
8806
8809
  justify-content: center;
8810
+ gap: 4px;
8807
8811
  width: 24px;
8808
8812
  margin-right: 8px;
8809
8813
  }
@@ -8811,6 +8815,7 @@ table {
8811
8815
  display: flex;
8812
8816
  flex-shrink: 0;
8813
8817
  justify-content: center;
8818
+ gap: 4px;
8814
8819
  margin-left: 8px;
8815
8820
  }
8816
8821
 
@@ -8828,6 +8833,7 @@ table {
8828
8833
  display: flex;
8829
8834
  flex-shrink: 0;
8830
8835
  justify-content: center;
8836
+ gap: 4px;
8831
8837
  width: 36px;
8832
8838
  margin-right: 16px;
8833
8839
  }
@@ -8835,6 +8841,7 @@ table {
8835
8841
  display: flex;
8836
8842
  flex-shrink: 0;
8837
8843
  justify-content: center;
8844
+ gap: 4px;
8838
8845
  margin-left: 16px;
8839
8846
  }
8840
8847
 
@@ -8852,6 +8859,7 @@ table {
8852
8859
  display: flex;
8853
8860
  flex-shrink: 0;
8854
8861
  justify-content: center;
8862
+ gap: 4px;
8855
8863
  width: 36px;
8856
8864
  margin-right: 16px;
8857
8865
  }
@@ -8859,6 +8867,7 @@ table {
8859
8867
  display: flex;
8860
8868
  flex-shrink: 0;
8861
8869
  justify-content: center;
8870
+ gap: 4px;
8862
8871
  margin-left: 16px;
8863
8872
  }
8864
8873
 
@@ -8875,6 +8884,7 @@ table {
8875
8884
  display: flex;
8876
8885
  flex-shrink: 0;
8877
8886
  justify-content: center;
8887
+ gap: 4px;
8878
8888
  width: 36px;
8879
8889
  margin-right: 16px;
8880
8890
  }
@@ -8882,6 +8892,7 @@ table {
8882
8892
  display: flex;
8883
8893
  flex-shrink: 0;
8884
8894
  justify-content: center;
8895
+ gap: 4px;
8885
8896
  margin-left: 16px;
8886
8897
  }
8887
8898
 
@@ -8936,17 +8947,17 @@ table {
8936
8947
  .lumx-list-item__link--is-selected:active, .lumx-list-item__link--is-selected[data-lumx-active] {
8937
8948
  background-color: var(--lumx-color-primary-L3);
8938
8949
  }
8939
- .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8950
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action::before {
8940
8951
  background-color: var(--lumx-color-primary-L5);
8941
8952
  }
8942
- .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8953
+ .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-focus-visible-added]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-lumx-hover]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-focus-visible-added]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-hover]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-focus-visible-added]::before {
8943
8954
  background-color: var(--lumx-color-primary-L4);
8944
8955
  }
8945
8956
  @media (hover: hover) {
8946
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8957
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:hover::before, [aria-current=""]):hover::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:hover::before {
8947
8958
  background-color: var(--lumx-color-primary-L4);
8948
8959
  }}
8949
- .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8960
+ .lumx-list-item .lumx-action-area__action[aria-selected=true]:active::before, .lumx-list-item .lumx-action-area__action[aria-selected=true][data-lumx-active]::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""]):active::before, .lumx-list-item .lumx-action-area__action[aria-current]:not([aria-current=false], [aria-current=""])[data-lumx-active]::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action:active::before, .lumx-list-item__wrapper--is-selected .lumx-action-area__action[data-lumx-active]::before {
8950
8961
  background-color: var(--lumx-color-primary-L3);
8951
8962
  }
8952
8963
  .lumx-list-item__link--is-disabled, .lumx-list-item__link[aria-disabled=true], .lumx-list-item:has(.lumx-action-area__action[aria-disabled=true]) {
package/package.json CHANGED
@@ -7,7 +7,7 @@
7
7
  },
8
8
  "dependencies": {
9
9
  "@floating-ui/dom": "^1.7.5",
10
- "@lumx/icons": "^4.25.1-next.2",
10
+ "@lumx/icons": "^4.26.0-next.0",
11
11
  "classnames": "^2.3.2",
12
12
  "focus-visible": "^5.0.2",
13
13
  "lodash": "4.18.1",
@@ -66,7 +66,7 @@
66
66
  "update-version-changelog": "yarn version-changelog ../../CHANGELOG.md"
67
67
  },
68
68
  "sideEffects": false,
69
- "version": "4.25.1-next.2",
69
+ "version": "4.26.0-next.0",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -70,6 +70,11 @@
70
70
  }
71
71
  }
72
72
 
73
+ // Selection state icon (select options), centered in the `after` slot
74
+ &__selection-icon {
75
+ margin: auto;
76
+ }
77
+
73
78
  // Center option content
74
79
  .#{$lumx-base-prefix}-list-item__content {
75
80
  display: flex;
@@ -45,9 +45,11 @@
45
45
  @include lumx-list-item-selected;
46
46
  }
47
47
 
48
- // Selected action: from `aria-selected` on the action (ex: combobox option) or from `isSelected` on the list item.
48
+ // Selected action: from `aria-selected` (ex: combobox option) or `aria-current` (ex: nav link) on the action,
49
+ // or from `isSelected` on the list item.
49
50
  // (the background is on the action overlay `::before`, so the state selectors must come before `::before`)
50
51
  & .#{$lumx-base-prefix}-action-area__action[aria-selected="true"],
52
+ & .#{$lumx-base-prefix}-action-area__action[aria-current]:not([aria-current="false"], [aria-current=""]),
51
53
  &__wrapper--is-selected .#{$lumx-base-prefix}-action-area__action {
52
54
  &::before {
53
55
  background-color: lumx-color-variant("primary", "L5");
@@ -89,6 +89,7 @@
89
89
  display: flex;
90
90
  flex-shrink: 0;
91
91
  justify-content: center;
92
+ gap: $lumx-spacing-unit-tiny;
92
93
  }
93
94
 
94
95
  @mixin lumx-list-item-before($size) {