@lumx/core 4.27.0-next.0 → 4.27.1-alpha.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.
@@ -5040,7 +5040,7 @@ table {
5040
5040
  .lumx-combobox-popover__scroll {
5041
5041
  overflow-y: auto;
5042
5042
  }
5043
- .lumx-combobox-popover:empty, .lumx-combobox-popover:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
5043
+ .lumx-combobox-popover:not(:has(:is([role=listbox], [role=grid]):not([hidden]), .lumx-listbox-state)) {
5044
5044
  display: none;
5045
5045
  }
5046
5046
 
@@ -7416,7 +7416,7 @@ table {
7416
7416
  /* ==========================================================================
7417
7417
  Listbox
7418
7418
  ========================================================================== */
7419
- .lumx-listbox-list:empty, .lumx-listbox-list:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
7419
+ .lumx-listbox-list:empty {
7420
7420
  display: none;
7421
7421
  }
7422
7422
 
@@ -31,6 +31,13 @@ export interface ListItemProps extends HasClassName, HasAriaDisabled {
31
31
  /** On click callback. */
32
32
  handleClick?: (event: any) => void;
33
33
  }
34
+ /**
35
+ * Core-only props of the ListItem template (not exposed by the React and Vue components).
36
+ */
37
+ export interface ListItemCoreProps {
38
+ /** Root element tag. Default: `li` (e.g. `div` for an item row that is not a direct list child). */
39
+ as?: 'li' | 'div';
40
+ }
34
41
  export type ListItemPropsToOverride = 'after' | 'before' | 'children' | 'handleClick';
35
42
  /**
36
43
  * Component display name.
@@ -51,7 +58,7 @@ export declare const DEFAULT_PROPS: Partial<ListItemProps>;
51
58
  * @return JSX element.
52
59
  */
53
60
  export declare const ListItem: {
54
- (props: ListItemProps): import("react").JSX.Element;
61
+ (props: ListItemProps & ListItemCoreProps): import("react").JSX.Element;
55
62
  displayName: string;
56
63
  className: "lumx-list-item";
57
64
  defaultProps: Partial<ListItemProps>;
@@ -13,6 +13,13 @@ export interface ListProps extends HasClassName {
13
13
  /** ref to the root element */
14
14
  ref?: CommonRef;
15
15
  }
16
+ /**
17
+ * Core-only props of the List template (not exposed by the React and Vue components).
18
+ */
19
+ export interface ListCoreProps {
20
+ /** Root element tag. Default: `ul`. */
21
+ as?: 'ul' | 'ol' | 'div';
22
+ }
16
23
  /**
17
24
  * Component display name.
18
25
  */
@@ -32,7 +39,7 @@ export declare const DEFAULT_PROPS: Partial<ListProps>;
32
39
  * @return JSX element.
33
40
  */
34
41
  export declare const List: {
35
- (props: ListProps): import("react").JSX.Element;
42
+ (props: ListProps & ListCoreProps): import("react").JSX.Element;
36
43
  displayName: string;
37
44
  className: "lumx-list";
38
45
  defaultProps: Partial<ListProps>;
@@ -107,7 +107,10 @@ export interface ListboxHandle {
107
107
  readonly isMultiSelect: boolean;
108
108
  /** Whether any skeleton placeholders are registered (loading). */
109
109
  readonly isLoading: boolean;
110
- /** Whether the listbox has visible options or skeletons. */
110
+ /**
111
+ * Whether the listbox has visible options or skeletons. Without them, the mounted element gets `hidden`
112
+ * (unless it holds a status: the live region, e.g. a `Combobox.State` inside the list).
113
+ */
111
114
  readonly hasVisibleContent: boolean;
112
115
  /**
113
116
  * Set whether the options are visible (standalone: always visible; combobox: open state).
package/lumx.css CHANGED
@@ -5721,7 +5721,7 @@ table {
5721
5721
  .lumx-combobox-popover__scroll {
5722
5722
  overflow-y: auto;
5723
5723
  }
5724
- .lumx-combobox-popover:empty, .lumx-combobox-popover:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
5724
+ .lumx-combobox-popover:not(:has(:is([role=listbox], [role=grid]):not([hidden]), .lumx-listbox-state)) {
5725
5725
  display: none;
5726
5726
  }
5727
5727
 
@@ -8097,7 +8097,7 @@ table {
8097
8097
  /* ==========================================================================
8098
8098
  Listbox
8099
8099
  ========================================================================== */
8100
- .lumx-listbox-list:empty, .lumx-listbox-list:not(:has(.lumx-listbox-option)):not(:has(.lumx-listbox-state)):not(:has(.lumx-listbox-option-skeleton)) {
8100
+ .lumx-listbox-list:empty {
8101
8101
  display: none;
8102
8102
  }
8103
8103
 
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.27.0-next.0",
10
+ "@lumx/icons": "^4.27.1-alpha.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.27.0-next.0",
69
+ "version": "4.27.1-alpha.0",
70
70
  "devDependencies": {
71
71
  "@rollup/plugin-typescript": "^12.3.0",
72
72
  "@testing-library/dom": "^10.4.1",
@@ -86,9 +86,9 @@
86
86
  "tinycolor2": "^1.4.1",
87
87
  "typescript": "^5.4.3",
88
88
  "version-changelog": "^3.1.1",
89
- "vite": "^7.3.5",
89
+ "vite": "^7.3.7",
90
90
  "vite-tsconfig-paths": "^5.1.4",
91
91
  "vitest": "^4.1.11"
92
92
  },
93
- "stableVersion": "4.26.0"
93
+ "stableVersion": "4.27.0"
94
94
  }
@@ -21,11 +21,11 @@
21
21
  overflow-y: auto;
22
22
  }
23
23
 
24
- // Hide popover when there is no option, no state, and no skeleton
25
- &:empty,
26
- &:not(:has(.#{$lumx-base-prefix}-listbox-option)):not(:has(.#{$lumx-base-prefix}-listbox-state)):not(
27
- :has(.#{$lumx-base-prefix}-listbox-option-skeleton)
28
- ) {
24
+ // Hide the popover when it holds no visible list (the listbox sets `hidden` on a list without visible
25
+ // content) and no state
26
+ $visible-list: ':is([role="listbox"], [role="grid"]):not([hidden])';
27
+
28
+ &:not(:has(#{$visible-list}, .#{$lumx-base-prefix}-listbox-state)) {
29
29
  display: none;
30
30
  }
31
31
  }
@@ -7,14 +7,10 @@
7
7
 
8
8
  // ---- List -----------------------
9
9
 
10
- // Hide list when there is no option, no state, and no skeleton
11
- .#{$lumx-base-prefix}-listbox-list {
12
- &:empty,
13
- &:not(:has(.#{$lumx-base-prefix}-listbox-option)):not(:has(.#{$lumx-base-prefix}-listbox-state)):not(
14
- :has(.#{$lumx-base-prefix}-listbox-option-skeleton)
15
- ) {
16
- display: none;
17
- }
10
+ // The listbox sets `hidden` on the list when it has no visible content (see `setupListbox`).
11
+ // Before the listbox mounts: hide an empty list.
12
+ .#{$lumx-base-prefix}-listbox-list:empty {
13
+ display: none;
18
14
  }
19
15
 
20
16
  // ---- State -----------------------