@lumx/core 4.9.0-next.4 → 4.9.0-next.5
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/components-and-utils.css +36 -4
- package/js/components/Combobox/ComboboxButton.d.ts +54 -0
- package/js/components/Combobox/ComboboxInput.d.ts +49 -0
- package/js/components/Combobox/ComboboxList.d.ts +47 -0
- package/js/components/Combobox/ComboboxOption.d.ts +72 -0
- package/js/components/Combobox/ComboboxOptionAction.d.ts +35 -0
- package/js/components/Combobox/ComboboxOptionMoreInfo.d.ts +52 -0
- package/js/components/Combobox/ComboboxOptionSkeleton.d.ts +41 -0
- package/js/components/Combobox/ComboboxPopover.d.ts +50 -0
- package/js/components/Combobox/ComboboxSection.d.ts +58 -0
- package/js/components/Combobox/ComboboxState.d.ts +84 -0
- package/js/components/Combobox/index.d.ts +23 -0
- package/js/components/Combobox/setupCombobox.d.ts +24 -0
- package/js/components/Combobox/setupComboboxButton.d.ts +16 -0
- package/js/components/Combobox/setupComboboxInput.d.ts +29 -0
- package/js/components/Combobox/setupListbox.d.ts +21 -0
- package/js/components/Combobox/types.d.ts +124 -0
- package/js/components/Combobox/utils.d.ts +27 -0
- package/js/components/List/ListItem.d.ts +58 -0
- package/js/components/List/ListItemAction.d.ts +24 -0
- package/js/components/List/index.d.ts +39 -0
- package/js/components/Text/index.d.ts +1 -1
- package/js/utils/browser/createSelectorTreeWalker.d.ts +13 -0
- package/js/utils/focusNavigation/createGridFocusNavigation.d.ts +13 -0
- package/js/utils/focusNavigation/index.d.ts +2 -1
- package/js/utils/focusNavigation/types.d.ts +28 -7
- package/js/utils/typeahead/index.d.ts +29 -0
- package/lumx.css +36 -4
- package/package.json +2 -2
- package/scss/_components_classes.scss +2 -1
- package/scss/components/combobox/_index.scss +44 -0
- package/scss/components/list/_mixins.scss +44 -32
- package/stories/types.d.ts +2 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@use
|
|
1
|
+
@use 'sass:map';
|
|
2
2
|
|
|
3
3
|
@mixin lumx-list() {
|
|
4
4
|
padding: $lumx-spacing-unit 0;
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
text-decoration: none;
|
|
13
13
|
outline: none;
|
|
14
14
|
|
|
15
|
-
@if $size ==
|
|
15
|
+
@if $size == 'huge' {
|
|
16
16
|
align-items: flex-start;
|
|
17
17
|
padding-top: $lumx-spacing-unit * 2;
|
|
18
18
|
padding-bottom: $lumx-spacing-unit * 2;
|
|
@@ -30,23 +30,24 @@
|
|
|
30
30
|
width: 100%;
|
|
31
31
|
cursor: pointer;
|
|
32
32
|
text-align: left;
|
|
33
|
-
@include lumx-state(lumx-base-const(
|
|
33
|
+
@include lumx-state(lumx-base-const('state', 'DEFAULT'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
34
34
|
|
|
35
|
-
&[data-focus-visible-added]
|
|
36
|
-
|
|
35
|
+
&[data-focus-visible-added],
|
|
36
|
+
&:has([data-focus-visible-added]) {
|
|
37
|
+
outline: 2px solid lumx-color-variant('dark', 'N');
|
|
37
38
|
outline-offset: -2px;
|
|
38
39
|
}
|
|
39
40
|
|
|
40
|
-
&:not([aria-disabled=
|
|
41
|
+
&:not([aria-disabled='true']) {
|
|
41
42
|
&:hover,
|
|
42
43
|
&[data-lumx-hover],
|
|
43
44
|
&[data-focus-visible-added] {
|
|
44
|
-
@include lumx-state(lumx-base-const(
|
|
45
|
+
@include lumx-state(lumx-base-const('state', 'HOVER'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
45
46
|
}
|
|
46
47
|
|
|
47
48
|
&:active,
|
|
48
|
-
&[data-lumx-active]
|
|
49
|
-
@include lumx-state(lumx-base-const(
|
|
49
|
+
&[data-lumx-active] {
|
|
50
|
+
@include lumx-state(lumx-base-const('state', 'ACTIVE'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
50
51
|
}
|
|
51
52
|
}
|
|
52
53
|
}
|
|
@@ -54,25 +55,33 @@
|
|
|
54
55
|
@mixin lumx-list-item-highlighted() {
|
|
55
56
|
cursor: pointer;
|
|
56
57
|
|
|
57
|
-
@include lumx-state(lumx-base-const(
|
|
58
|
+
@include lumx-state(lumx-base-const('state', 'HOVER'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
58
59
|
|
|
59
60
|
&:active {
|
|
60
|
-
@include lumx-state(lumx-base-const(
|
|
61
|
+
@include lumx-state(lumx-base-const('state', 'ACTIVE'), lumx-base-const('emphasis', 'LOW'), 'dark');
|
|
61
62
|
}
|
|
62
63
|
}
|
|
63
64
|
|
|
64
65
|
@mixin lumx-list-item-selected($component: null) {
|
|
65
|
-
@include lumx-state-as-selected(lumx-base-const(
|
|
66
|
+
@include lumx-state-as-selected(lumx-base-const('state', 'DEFAULT'), lumx-base-const('theme', 'LIGHT'), $component);
|
|
66
67
|
|
|
67
68
|
&:hover,
|
|
68
69
|
&[data-lumx-hover],
|
|
69
70
|
&[data-focus-visible-added] {
|
|
70
|
-
@include lumx-state-as-selected(
|
|
71
|
+
@include lumx-state-as-selected(
|
|
72
|
+
lumx-base-const('state', 'HOVER'),
|
|
73
|
+
lumx-base-const('theme', 'LIGHT'),
|
|
74
|
+
$component
|
|
75
|
+
);
|
|
71
76
|
}
|
|
72
77
|
|
|
73
78
|
&:active,
|
|
74
|
-
&[data-lumx-active]
|
|
75
|
-
@include lumx-state-as-selected(
|
|
79
|
+
&[data-lumx-active] {
|
|
80
|
+
@include lumx-state-as-selected(
|
|
81
|
+
lumx-base-const('state', 'ACTIVE'),
|
|
82
|
+
lumx-base-const('theme', 'LIGHT'),
|
|
83
|
+
$component
|
|
84
|
+
);
|
|
76
85
|
}
|
|
77
86
|
}
|
|
78
87
|
|
|
@@ -85,17 +94,17 @@
|
|
|
85
94
|
@mixin lumx-list-item-before($size) {
|
|
86
95
|
@include lumx-list-item-edge($size);
|
|
87
96
|
|
|
88
|
-
@if $size ==
|
|
89
|
-
width: map.get($lumx-sizes, lumx-base-const(
|
|
97
|
+
@if $size == 'tiny' {
|
|
98
|
+
width: map.get($lumx-sizes, lumx-base-const('size', 'S'));
|
|
90
99
|
margin-right: $lumx-spacing-unit;
|
|
91
100
|
} @else {
|
|
92
|
-
width: map.get($lumx-sizes, lumx-base-const(
|
|
101
|
+
width: map.get($lumx-sizes, lumx-base-const('size', 'M'));
|
|
93
102
|
margin-right: $lumx-spacing-unit * 2;
|
|
94
103
|
}
|
|
95
104
|
}
|
|
96
105
|
|
|
97
106
|
@mixin lumx-list-item-content() {
|
|
98
|
-
@include lumx-typography(
|
|
107
|
+
@include lumx-typography('body1');
|
|
99
108
|
|
|
100
109
|
flex: 1 1 auto;
|
|
101
110
|
}
|
|
@@ -103,7 +112,7 @@
|
|
|
103
112
|
@mixin lumx-list-item-after($size) {
|
|
104
113
|
@include lumx-list-item-edge($size);
|
|
105
114
|
|
|
106
|
-
@if $size ==
|
|
115
|
+
@if $size == 'tiny' {
|
|
107
116
|
margin-left: $lumx-spacing-unit;
|
|
108
117
|
} @else {
|
|
109
118
|
margin-left: $lumx-spacing-unit * 2;
|
|
@@ -111,16 +120,16 @@
|
|
|
111
120
|
}
|
|
112
121
|
|
|
113
122
|
@mixin lumx-list-subheader() {
|
|
114
|
-
@include lumx-typography(
|
|
123
|
+
@include lumx-typography('overline');
|
|
115
124
|
|
|
116
125
|
display: flex;
|
|
117
126
|
align-items: center;
|
|
118
|
-
height: map.get($lumx-list-item-sizes,
|
|
119
|
-
color: lumx-color-variant(
|
|
127
|
+
height: map.get($lumx-list-item-sizes, 'tiny');
|
|
128
|
+
color: lumx-color-variant('dark', 'L2');
|
|
120
129
|
}
|
|
121
130
|
|
|
122
131
|
@mixin lumx-list-subheader-icon {
|
|
123
|
-
@include lumx-icon-size(lumx-base-const(
|
|
132
|
+
@include lumx-icon-size(lumx-base-const('size', 'XXS'));
|
|
124
133
|
|
|
125
134
|
margin-right: $lumx-spacing-unit;
|
|
126
135
|
}
|
|
@@ -128,15 +137,17 @@
|
|
|
128
137
|
@mixin lumx-list-divider() {
|
|
129
138
|
height: 1px;
|
|
130
139
|
margin: $lumx-spacing-unit 0;
|
|
131
|
-
background-color: lumx-color-variant(
|
|
140
|
+
background-color: lumx-color-variant('dark', $lumx-divider-color-variant);
|
|
132
141
|
}
|
|
133
142
|
|
|
134
143
|
@mixin lumx-list-auto-section-divider() {
|
|
135
144
|
$divider: '.#{$lumx-base-prefix}-list-divider';
|
|
145
|
+
$section: &;
|
|
136
146
|
|
|
137
|
-
// Insert a divider before each section NOT directly following another section or an explicit divider.
|
|
138
|
-
// Avoids double dividers when two sections are adjacent or when a ListDivider separates them.
|
|
139
|
-
|
|
147
|
+
// Insert a divider before each section NOT directly following another visible section or an explicit divider.
|
|
148
|
+
// Avoids double dividers when two visible sections are adjacent or when a ListDivider separates them.
|
|
149
|
+
// Uses #{$section}:not([hidden]) so that hidden sections in between don't prevent the divider.
|
|
150
|
+
&:not(:first-child):not(#{$section}:not([hidden]) + &):not(#{$divider} + &) {
|
|
140
151
|
&::before {
|
|
141
152
|
content: '';
|
|
142
153
|
display: block;
|
|
@@ -145,8 +156,9 @@
|
|
|
145
156
|
}
|
|
146
157
|
|
|
147
158
|
// Insert a divider after each section that is not the last child
|
|
148
|
-
// and not directly followed by an explicit divider
|
|
149
|
-
|
|
159
|
+
// and not directly followed by an explicit divider or a hidden element
|
|
160
|
+
// (when followed by a hidden element, the next visible section's ::before handles the divider).
|
|
161
|
+
&:not(:last-child):not(:has(+ #{$divider})):not(:has(+ [hidden])) {
|
|
150
162
|
&::after {
|
|
151
163
|
content: '';
|
|
152
164
|
display: block;
|
|
@@ -156,10 +168,10 @@
|
|
|
156
168
|
}
|
|
157
169
|
|
|
158
170
|
@mixin lumx-list-item-padding($size) {
|
|
159
|
-
@if $size ==
|
|
171
|
+
@if $size == 'big' {
|
|
160
172
|
padding-right: $lumx-spacing-unit * 2;
|
|
161
173
|
padding-left: $lumx-spacing-unit * 2;
|
|
162
|
-
} @else if $size ==
|
|
174
|
+
} @else if $size == 'huge' {
|
|
163
175
|
padding-right: $lumx-spacing-unit * 3;
|
|
164
176
|
padding-left: $lumx-spacing-unit * 3;
|
|
165
177
|
}
|
package/stories/types.d.ts
CHANGED
|
@@ -18,6 +18,8 @@ interface StoryDecorators {
|
|
|
18
18
|
withValueOnChange?: (options?: {
|
|
19
19
|
valueProp?: string;
|
|
20
20
|
valueTransform?: (v: any) => any;
|
|
21
|
+
onChangeProp?: string;
|
|
22
|
+
valueExtract?: (v: any) => any;
|
|
21
23
|
}) => Decorator;
|
|
22
24
|
/** Decorator forcing a minimum screen size for Chromatic snapshots */
|
|
23
25
|
withChromaticForceScreenSize?: () => Decorator;
|