@splendidlabz/styles 4.13.2 → 4.14.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@splendidlabz/styles",
3
- "version": "4.13.2",
3
+ "version": "4.14.0",
4
4
  "description": "",
5
5
  "license": "Elastic-2.0",
6
6
  "type": "module",
@@ -0,0 +1,40 @@
1
+ .combobox-options {
2
+ padding: 0;
3
+ border: 0;
4
+ }
5
+
6
+ /* Flex so filtering can rank matches with `order` without moving any node */
7
+ .combobox-options [role='listbox'] {
8
+ --height: 15rem;
9
+ display: flex;
10
+ flex-direction: column;
11
+ max-height: var(--height);
12
+ overflow-y: auto;
13
+ }
14
+
15
+ .combobox-options [role='option'] {
16
+ cursor: pointer;
17
+ }
18
+
19
+ /* Keeps the pointer cursor over an option's own markup */
20
+ .combobox-options [role='option'] > * {
21
+ pointer-events: none;
22
+ }
23
+
24
+ /* The band — where the keyboard or pointer is. Defaults to the platform's own colors for the current item in a list. */
25
+ .combobox-options [data-highlighted],
26
+ .combobox-options [role='option']:focus {
27
+ color: var(--text-highlighted-color, HighlightText);
28
+ background: var(--bg-highlighted-color, Highlight);
29
+ }
30
+
31
+ /* The selection — what was chosen. Both states can land on one option, so this takes a property the cursor doesn't. */
32
+ .combobox-options [aria-selected='true'] {
33
+ box-shadow: inset 2px 0 0 0 var(--border-selected-color, currentColor);
34
+ }
35
+
36
+ /* Highlight pseudo-elements only take properties that don't affect layout, so the match can be recoloured but never bolded. font-weight here is silently ignored. */
37
+ ::highlight(autocomplete-match) {
38
+ color: var(--text-match-color, #7c3aed);
39
+ text-decoration: underline;
40
+ }
@@ -1,3 +1,4 @@
1
1
  @import './input.css';
2
2
  @import './select.css';
3
3
  @import './checkbox-and-radio.css';
4
+ @import './combobox.css';
@@ -38,6 +38,9 @@
38
38
  @utility indentlist {
39
39
  @apply indentlist-scaffold;
40
40
 
41
+ /* Keeps markers inside the box */
42
+ padding-inline-start: var(--indent, 1em);
43
+
41
44
  li {
42
45
  list-style-type: disc;
43
46
  }
@@ -0,0 +1,15 @@
1
+ /*********************
2
+ * Content List *
3
+ Variables:
4
+ --contentlist-top
5
+ --contentlist-gap
6
+ *********************/
7
+
8
+ @utility contentlist {
9
+ position: sticky;
10
+ top: var(--contentlist-top, 0);
11
+ max-height: calc(
12
+ 100dvh - var(--contentlist-top, 0px) - var(--contentlist-gap, 0px)
13
+ );
14
+ overflow-y: auto;
15
+ }
@@ -6,5 +6,6 @@
6
6
  @import './popover.css';
7
7
  @import './tabs.css';
8
8
  @import './callout.css';
9
+ @import './contentlist.css';
9
10
  @import './status.css';
10
11
  @import './resizer.css';