@jolly-pixel/ui 1.0.1 → 2.0.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 (117) hide show
  1. package/LICENSE +44 -44
  2. package/NOTICE +9 -0
  3. package/README.md +194 -194
  4. package/dist/containers/Dialog.js +11 -11
  5. package/dist/containers/Dialog.styles.js +48 -48
  6. package/dist/containers/Dock.js +11 -11
  7. package/dist/containers/Dock.styles.js +351 -351
  8. package/dist/containers/DockLayout.js +4 -4
  9. package/dist/containers/Floating.js +23 -23
  10. package/dist/containers/Floating.styles.js +116 -116
  11. package/dist/containers/Folder.js +28 -28
  12. package/dist/containers/Folder.styles.js +221 -221
  13. package/dist/containers/Pane.js +50 -50
  14. package/dist/containers/Pane.styles.js +186 -186
  15. package/dist/containers/Rail.js +18 -18
  16. package/dist/containers/Tab.js +10 -10
  17. package/dist/containers/Tabs.js +26 -26
  18. package/dist/containers/Tabs.styles.js +93 -93
  19. package/dist/containers/Toolbar.js +25 -25
  20. package/dist/containers/resize.js +5 -5
  21. package/dist/controls/Button.js +9 -9
  22. package/dist/controls/Button.styles.js +79 -79
  23. package/dist/controls/ButtonGroup.js +28 -28
  24. package/dist/controls/ButtonGroup.styles.js +98 -98
  25. package/dist/controls/Checkbox.js +14 -14
  26. package/dist/controls/Checkbox.styles.js +111 -111
  27. package/dist/controls/Color.js +51 -51
  28. package/dist/controls/Color.styles.js +83 -83
  29. package/dist/controls/ColorPicker.js +104 -104
  30. package/dist/controls/ColorPicker.styles.js +296 -296
  31. package/dist/controls/Control.js +33 -33
  32. package/dist/controls/Control.styles.js +102 -102
  33. package/dist/controls/Controls.js +11 -11
  34. package/dist/controls/Controls.styles.js +98 -98
  35. package/dist/controls/Flags.js +18 -18
  36. package/dist/controls/Flags.styles.js +59 -59
  37. package/dist/controls/Number.js +21 -21
  38. package/dist/controls/Number.styles.js +44 -44
  39. package/dist/controls/PropertyRow.js +13 -13
  40. package/dist/controls/PropertyRow.styles.js +105 -105
  41. package/dist/controls/Range.js +24 -24
  42. package/dist/controls/Range.styles.js +25 -25
  43. package/dist/controls/Select.js +23 -23
  44. package/dist/controls/Select.styles.js +47 -47
  45. package/dist/controls/Separator.js +11 -11
  46. package/dist/controls/Separator.styles.js +45 -45
  47. package/dist/controls/Slider.js +36 -36
  48. package/dist/controls/Slider.styles.js +161 -161
  49. package/dist/controls/Text.js +17 -17
  50. package/dist/data/Tree.d.ts +0 -14
  51. package/dist/data/Tree.d.ts.map +1 -1
  52. package/dist/data/Tree.js +90 -120
  53. package/dist/data/Tree.js.map +1 -1
  54. package/dist/data/Tree.styles.d.ts.map +1 -1
  55. package/dist/data/Tree.styles.js +220 -237
  56. package/dist/data/Tree.styles.js.map +1 -1
  57. package/dist/data/dropZone.d.ts +0 -10
  58. package/dist/data/dropZone.d.ts.map +1 -1
  59. package/dist/data/dropZone.js +0 -10
  60. package/dist/data/dropZone.js.map +1 -1
  61. package/dist/data/resolveRename.d.ts +0 -3
  62. package/dist/data/resolveRename.d.ts.map +1 -1
  63. package/dist/data/resolveRename.js +0 -3
  64. package/dist/data/resolveRename.js.map +1 -1
  65. package/dist/data/resolveReparent.d.ts +0 -7
  66. package/dist/data/resolveReparent.d.ts.map +1 -1
  67. package/dist/data/resolveReparent.js +0 -6
  68. package/dist/data/resolveReparent.js.map +1 -1
  69. package/dist/data/rowDragSession.d.ts +0 -8
  70. package/dist/data/rowDragSession.d.ts.map +1 -1
  71. package/dist/data/rowDragSession.js +0 -6
  72. package/dist/data/rowDragSession.js.map +1 -1
  73. package/dist/data/treeNodes.d.ts +0 -6
  74. package/dist/data/treeNodes.d.ts.map +1 -1
  75. package/dist/data/treeNodes.js +2 -7
  76. package/dist/data/treeNodes.js.map +1 -1
  77. package/dist/feedback/JollyPixelLogo.js +84 -84
  78. package/dist/feedback/Loading.js +29 -29
  79. package/dist/feedback/Loading.styles.js +230 -230
  80. package/dist/feedback/Log.js +8 -8
  81. package/dist/feedback/Log.styles.js +61 -61
  82. package/dist/feedback/Progress.js +17 -17
  83. package/dist/feedback/Progress.styles.js +146 -146
  84. package/dist/field/JollyField.js +51 -51
  85. package/dist/field/JollyField.styles.js +429 -429
  86. package/dist/icon/Icon.js +24 -24
  87. package/dist/icon/builtins.js +126 -126
  88. package/dist/interaction/drag/DragSession.js +6 -6
  89. package/dist/interaction/scrub/ScrubController.js +6 -6
  90. package/dist/math/AxisController.js +22 -22
  91. package/dist/math/Point2d.js +12 -12
  92. package/dist/math/Point2d.styles.js +49 -49
  93. package/dist/math/Quaternion.js +4 -4
  94. package/dist/math/Transform.js +40 -40
  95. package/dist/math/Transform.styles.js +17 -17
  96. package/dist/math/VectorField.js +4 -4
  97. package/dist/math/VectorField.styles.js +102 -102
  98. package/dist/monitors/Graph.js +8 -8
  99. package/dist/monitors/Graph.styles.js +42 -42
  100. package/dist/monitors/Monitor.js +5 -5
  101. package/dist/monitors/Monitor.styles.js +31 -31
  102. package/dist/peer/Presence.js +33 -33
  103. package/dist/peer/Presence.styles.js +82 -82
  104. package/dist/stats/Stats.js +6 -6
  105. package/dist/stats/Stats.styles.js +54 -54
  106. package/dist/theme/components/DensityControl.js +16 -16
  107. package/dist/theme/components/ThemeControl.js +16 -16
  108. package/dist/theme/components/ThemePreferences.js +18 -18
  109. package/dist/theme/font.js +9 -9
  110. package/dist/theme/styles/hiddenStyles.js +4 -4
  111. package/dist/theme/styles/mixins.js +16 -16
  112. package/dist/theme/styles/themeStyles.js +4 -4
  113. package/dist/theme/tokens/density.js +19 -19
  114. package/dist/theme/tokens/ramps.js +40 -40
  115. package/dist/theme/tokens/scales.js +56 -56
  116. package/dist/theme/tokens/semantic.js +184 -184
  117. package/package.json +6 -5
@@ -5,49 +5,49 @@ import { fillTransition } from "../theme/styles/mixins.js";
5
5
  /**
6
6
  * The wrapper hosts the scrub handle over the native input.
7
7
  */
8
- export const numberStyles = css `
9
- .wrap {
10
- position: relative;
11
- display: flex;
12
- flex: 1 1 auto;
13
- min-width: 0;
14
- }
15
-
16
- /*
17
- * Match the base selector specificity for the padding override.
18
- */
19
- .value .wrap input:not([type="color"]) {
20
- padding-left: 10px;
21
- }
22
-
23
- .scrub-handle {
24
- position: absolute;
25
- inset-block: 1px;
26
- left: 1px;
27
- width: 8px;
28
- border-radius: var(--jolly-radius-sm, 2px) 0 0 var(--jolly-radius-sm, 2px);
29
- }
30
-
31
- :host([scrubbable]) .scrub-handle {
32
- cursor: ew-resize;
33
- touch-action: none;
34
- }
35
-
36
- .scrub-handle::before {
37
- content: "";
38
- position: absolute;
39
- top: 50%;
40
- left: 3px;
41
- width: 2px;
42
- height: 55%;
43
- border-radius: 1px;
44
- background: var(--jolly-groove);
45
- transform: translateY(-50%);
46
- ${fillTransition}
47
- }
48
-
49
- :host([scrubbable]) .scrub-handle:hover::before {
50
- background: var(--jolly-accent-fill);
51
- }
8
+ export const numberStyles = css `
9
+ .wrap {
10
+ position: relative;
11
+ display: flex;
12
+ flex: 1 1 auto;
13
+ min-width: 0;
14
+ }
15
+
16
+ /*
17
+ * Match the base selector specificity for the padding override.
18
+ */
19
+ .value .wrap input:not([type="color"]) {
20
+ padding-left: 10px;
21
+ }
22
+
23
+ .scrub-handle {
24
+ position: absolute;
25
+ inset-block: 1px;
26
+ left: 1px;
27
+ width: 8px;
28
+ border-radius: var(--jolly-radius-sm, 2px) 0 0 var(--jolly-radius-sm, 2px);
29
+ }
30
+
31
+ :host([scrubbable]) .scrub-handle {
32
+ cursor: ew-resize;
33
+ touch-action: none;
34
+ }
35
+
36
+ .scrub-handle::before {
37
+ content: "";
38
+ position: absolute;
39
+ top: 50%;
40
+ left: 3px;
41
+ width: 2px;
42
+ height: 55%;
43
+ border-radius: 1px;
44
+ background: var(--jolly-groove);
45
+ transform: translateY(-50%);
46
+ ${fillTransition}
47
+ }
48
+
49
+ :host([scrubbable]) .scrub-handle:hover::before {
50
+ background: var(--jolly-accent-fill);
51
+ }
52
52
  `;
53
53
  //# sourceMappingURL=Number.styles.js.map
@@ -31,21 +31,21 @@ let PropertyRow = class PropertyRow extends LitElement {
31
31
  this.labelPosition = "inline";
32
32
  }
33
33
  render() {
34
- return html `
35
- <div class="row">
36
- <div class="leading">
37
- ${this.label === "" ? nothing : html `<span class="label">${this.label}</span>`}
38
- </div>
39
- <div class="value"><slot></slot></div>
40
- </div>
34
+ return html `
35
+ <div class="row">
36
+ <div class="leading">
37
+ ${this.label === "" ? nothing : html `<span class="label">${this.label}</span>`}
38
+ </div>
39
+ <div class="value"><slot></slot></div>
40
+ </div>
41
41
  ${this.description === ""
42
42
  ? nothing
43
- : html `
44
- <p class="description">
45
- <jolly-icon name="info"></jolly-icon>
46
- <span>${this.description}</span>
47
- </p>
48
- `}
43
+ : html `
44
+ <p class="description">
45
+ <jolly-icon name="info"></jolly-icon>
46
+ <span>${this.description}</span>
47
+ </p>
48
+ `}
49
49
  `;
50
50
  }
51
51
  };
@@ -6,110 +6,110 @@ import { truncate } from "../theme/styles/mixins.js";
6
6
  /**
7
7
  * Matches `JollyField` geometry for custom rows.
8
8
  */
9
- export const propertyRowStyles = css `
10
- :host {
11
- display: block;
12
- font-family: var(--jolly-font-family, ui-monospace, monospace);
13
- font-size: var(--jolly-font-size, 11px);
14
- color: var(--jolly-text, ${kFallback.text});
15
- }
16
-
17
- .row {
18
- display: flex;
19
- align-items: center;
20
- gap: var(--jolly-space-1, 4px);
21
- min-height: var(--jolly-row-height, 20px);
22
- /*
23
- * Match the field's leading inset and collapsible gutter.
24
- */
25
- padding-inline: calc(var(--jolly-gutter-width, 0px) + var(--jolly-space-1, 4px))
26
- var(--jolly-field-inset-end, var(--jolly-space-1, 4px));
27
- }
28
-
29
- .leading {
30
- display: contents;
31
- }
32
-
33
- :host([label-position="top"]) .row {
34
- flex-direction: column;
35
- align-items: stretch;
36
- min-height: auto;
37
- gap: calc(var(--jolly-space-1, 4px) / 2);
38
- }
39
-
40
- :host([label-position="top"]) .leading {
41
- display: flex;
42
- align-items: center;
43
- }
44
-
45
- /*
46
- * Use the shared label column when an ancestor sets it.
47
- */
48
- .label {
49
- flex: 0 0 auto;
50
- width: var(--jolly-label-width, auto);
51
- max-width: var(--jolly-label-max-width, 45%);
52
- color: var(--jolly-text-muted);
53
- text-align: start;
54
- ${truncate}
55
- user-select: none;
56
- }
57
-
58
- :host([label-position="top"]) .label {
59
- width: auto;
60
- max-width: none;
61
- }
62
-
63
- .value {
64
- display: flex;
65
- align-items: center;
66
- flex: 1 1 auto;
67
- gap: var(--jolly-space-1, 4px);
68
- min-width: 0;
69
- }
70
-
71
- /*
72
- * A row holds arbitrary content rather than an input, so the trailing edge is
73
- * reached by moving the content, not by setting text-align.
74
- */
75
- :host([align="end"]) .value {
76
- justify-content: flex-end;
77
- }
78
-
79
- /* A nested field already carries its own trailing row inset. */
80
- :host([align="end"]) ::slotted(jolly-checkbox[align="end"]) {
81
- margin-inline-end: calc(var(--jolly-space-1, 4px) * -1);
82
- }
83
-
84
- /* Let an opted-in checkbox carry its gradient across the whole value column. */
85
- :host([align="end"])
86
- ::slotted(jolly-checkbox[align="end"][clickable-background]) {
87
- flex: 1 1 auto;
88
- min-width: 0;
89
- }
90
-
91
- /*
92
- * Align descriptions with field help text.
93
- */
94
- .description {
95
- display: flex;
96
- align-items: flex-start;
97
- gap: var(--jolly-space-1, 4px);
98
- margin-block: calc(var(--jolly-space-1, 4px) / 2);
99
- margin-inline: calc(
100
- var(--jolly-gutter-width, 0px) + (var(--jolly-space-1, 4px) * 2)
101
- )
102
- var(--jolly-space-1, 4px);
103
- color: var(--jolly-text-muted);
104
- font-size: 0.9em;
105
- }
106
-
107
- .description jolly-icon {
108
- flex: 0 0 auto;
109
- width: 14px;
110
- height: 14px;
111
- margin-block-start: 0;
112
- color: var(--jolly-accent-text);
113
- }
9
+ export const propertyRowStyles = css `
10
+ :host {
11
+ display: block;
12
+ font-family: var(--jolly-font-family, ui-monospace, monospace);
13
+ font-size: var(--jolly-font-size, 11px);
14
+ color: var(--jolly-text, ${kFallback.text});
15
+ }
16
+
17
+ .row {
18
+ display: flex;
19
+ align-items: center;
20
+ gap: var(--jolly-space-1, 4px);
21
+ min-height: var(--jolly-row-height, 20px);
22
+ /*
23
+ * Match the field's leading inset and collapsible gutter.
24
+ */
25
+ padding-inline: calc(var(--jolly-gutter-width, 0px) + var(--jolly-space-1, 4px))
26
+ var(--jolly-field-inset-end, var(--jolly-space-1, 4px));
27
+ }
28
+
29
+ .leading {
30
+ display: contents;
31
+ }
32
+
33
+ :host([label-position="top"]) .row {
34
+ flex-direction: column;
35
+ align-items: stretch;
36
+ min-height: auto;
37
+ gap: calc(var(--jolly-space-1, 4px) / 2);
38
+ }
39
+
40
+ :host([label-position="top"]) .leading {
41
+ display: flex;
42
+ align-items: center;
43
+ }
44
+
45
+ /*
46
+ * Use the shared label column when an ancestor sets it.
47
+ */
48
+ .label {
49
+ flex: 0 0 auto;
50
+ width: var(--jolly-label-width, auto);
51
+ max-width: var(--jolly-label-max-width, 45%);
52
+ color: var(--jolly-text-muted);
53
+ text-align: start;
54
+ ${truncate}
55
+ user-select: none;
56
+ }
57
+
58
+ :host([label-position="top"]) .label {
59
+ width: auto;
60
+ max-width: none;
61
+ }
62
+
63
+ .value {
64
+ display: flex;
65
+ align-items: center;
66
+ flex: 1 1 auto;
67
+ gap: var(--jolly-space-1, 4px);
68
+ min-width: 0;
69
+ }
70
+
71
+ /*
72
+ * A row holds arbitrary content rather than an input, so the trailing edge is
73
+ * reached by moving the content, not by setting text-align.
74
+ */
75
+ :host([align="end"]) .value {
76
+ justify-content: flex-end;
77
+ }
78
+
79
+ /* A nested field already carries its own trailing row inset. */
80
+ :host([align="end"]) ::slotted(jolly-checkbox[align="end"]) {
81
+ margin-inline-end: calc(var(--jolly-space-1, 4px) * -1);
82
+ }
83
+
84
+ /* Let an opted-in checkbox carry its gradient across the whole value column. */
85
+ :host([align="end"])
86
+ ::slotted(jolly-checkbox[align="end"][clickable-background]) {
87
+ flex: 1 1 auto;
88
+ min-width: 0;
89
+ }
90
+
91
+ /*
92
+ * Align descriptions with field help text.
93
+ */
94
+ .description {
95
+ display: flex;
96
+ align-items: flex-start;
97
+ gap: var(--jolly-space-1, 4px);
98
+ margin-block: calc(var(--jolly-space-1, 4px) / 2);
99
+ margin-inline: calc(
100
+ var(--jolly-gutter-width, 0px) + (var(--jolly-space-1, 4px) * 2)
101
+ )
102
+ var(--jolly-space-1, 4px);
103
+ color: var(--jolly-text-muted);
104
+ font-size: 0.9em;
105
+ }
106
+
107
+ .description jolly-icon {
108
+ flex: 0 0 auto;
109
+ width: 14px;
110
+ height: 14px;
111
+ margin-block-start: 0;
112
+ color: var(--jolly-accent-text);
113
+ }
114
114
  `;
115
115
  //# sourceMappingURL=PropertyRow.styles.js.map
@@ -56,34 +56,34 @@ let Range = class Range extends JollyField {
56
56
  }
57
57
  renderValue() {
58
58
  const interval = this.concreteValue;
59
- return html `
60
- ${this.#renderEnd("from", interval?.from)}
61
- <span class="separator" aria-hidden="true"></span>
62
- ${this.#renderEnd("to", interval?.to)}
59
+ return html `
60
+ ${this.#renderEnd("from", interval?.from)}
61
+ <span class="separator" aria-hidden="true"></span>
62
+ ${this.#renderEnd("to", interval?.to)}
63
63
  `;
64
64
  }
65
65
  #renderEnd(end, value) {
66
- return html `
67
- <input
68
- type="text"
69
- inputmode="decimal"
70
- class="end"
71
- data-end=${end}
66
+ return html `
67
+ <input
68
+ type="text"
69
+ inputmode="decimal"
70
+ class="end"
71
+ data-end=${end}
72
72
  .value=${this.#drafts[end] ??
73
- (value === undefined ? "" : formatNumber(value, this.step))}
74
- placeholder=${this.mixed ? MIXED_PLACEHOLDER : ""}
75
- aria-label=${end === "from" ? "Range start" : "Range end"}
76
- ?disabled=${this.disabled}
77
- ?readonly=${this.inputReadonly}
78
- ?data-pointer-focus=${this.#pointerFocus.active}
79
- aria-readonly=${this.readonlyAria}
80
- aria-disabled=${this.lockedAria}
81
- aria-description=${this.lockDescription}
82
- @input=${(event) => this.#onType(end, event)}
83
- @focus=${this.#pointerFocus.onFocus}
84
- @blur=${() => this.#onBlur(end)}
85
- @keydown=${(event) => this.#onKeyDown(end, event)}
86
- >
73
+ (value === undefined ? "" : formatNumber(value, this.step))}
74
+ placeholder=${this.mixed ? MIXED_PLACEHOLDER : ""}
75
+ aria-label=${end === "from" ? "Range start" : "Range end"}
76
+ ?disabled=${this.disabled}
77
+ ?readonly=${this.inputReadonly}
78
+ ?data-pointer-focus=${this.#pointerFocus.active}
79
+ aria-readonly=${this.readonlyAria}
80
+ aria-disabled=${this.lockedAria}
81
+ aria-description=${this.lockDescription}
82
+ @input=${(event) => this.#onType(end, event)}
83
+ @focus=${this.#pointerFocus.onFocus}
84
+ @blur=${() => this.#onBlur(end)}
85
+ @keydown=${(event) => this.#onKeyDown(end, event)}
86
+ >
87
87
  `;
88
88
  }
89
89
  /**
@@ -1,29 +1,29 @@
1
1
  // Import Third-party Dependencies
2
2
  import { css } from "lit";
3
- export const rangeStyles = css `
4
- .value input.end {
5
- flex: 1 1 0;
6
- min-width: 0;
7
- text-align: right;
8
- }
9
-
10
- .separator {
11
- position: relative;
12
- box-sizing: border-box;
13
- flex: 0 0 auto;
14
- width: 12px;
15
- height: 7px;
16
- border-inline: 1px solid currentColor;
17
- color: var(--jolly-text-muted);
18
- }
19
-
20
- .separator::after {
21
- content: "";
22
- position: absolute;
23
- inset-inline: 0;
24
- top: 3px;
25
- height: 1px;
26
- background: currentColor;
27
- }
3
+ export const rangeStyles = css `
4
+ .value input.end {
5
+ flex: 1 1 0;
6
+ min-width: 0;
7
+ text-align: right;
8
+ }
9
+
10
+ .separator {
11
+ position: relative;
12
+ box-sizing: border-box;
13
+ flex: 0 0 auto;
14
+ width: 12px;
15
+ height: 7px;
16
+ border-inline: 1px solid currentColor;
17
+ color: var(--jolly-text-muted);
18
+ }
19
+
20
+ .separator::after {
21
+ content: "";
22
+ position: absolute;
23
+ inset-inline: 0;
24
+ top: 3px;
25
+ height: 1px;
26
+ background: currentColor;
27
+ }
28
28
  `;
29
29
  //# sourceMappingURL=Range.styles.js.map
@@ -31,29 +31,29 @@ let Select = class Select extends JollyField {
31
31
  this.options = [];
32
32
  }
33
33
  renderValue() {
34
- return html `
35
- <span class="select-wrap">
36
- <select
37
- ?disabled=${this.disabled}
38
- ?data-pointer-focus=${this.#pointerFocus.active}
39
- aria-readonly=${this.readonlyAria}
40
- aria-disabled=${this.lockedAria}
41
- aria-description=${this.lockDescription}
42
- aria-invalid=${this.displayError === null ? nothing : "true"}
43
- @focus=${this.#pointerFocus.onFocus}
44
- @blur=${this.#pointerFocus.onBlur}
45
- @keydown=${this.#pointerFocus.onKeyDown}
46
- @change=${this.#onChange}
47
- >
48
- ${this.mixed ? html `<option value=${kMixedValue}>—</option>` : nothing}
49
- ${this.options.map((option, index) => html `
50
- <option value=${String(index)} ?disabled=${option.disabled === true}>
51
- ${option.label}
52
- </option>
53
- `)}
54
- </select>
55
- <jolly-icon class="chevron" name="chevron"></jolly-icon>
56
- </span>
34
+ return html `
35
+ <span class="select-wrap">
36
+ <select
37
+ ?disabled=${this.disabled}
38
+ ?data-pointer-focus=${this.#pointerFocus.active}
39
+ aria-readonly=${this.readonlyAria}
40
+ aria-disabled=${this.lockedAria}
41
+ aria-description=${this.lockDescription}
42
+ aria-invalid=${this.displayError === null ? nothing : "true"}
43
+ @focus=${this.#pointerFocus.onFocus}
44
+ @blur=${this.#pointerFocus.onBlur}
45
+ @keydown=${this.#pointerFocus.onKeyDown}
46
+ @change=${this.#onChange}
47
+ >
48
+ ${this.mixed ? html `<option value=${kMixedValue}>—</option>` : nothing}
49
+ ${this.options.map((option, index) => html `
50
+ <option value=${String(index)} ?disabled=${option.disabled === true}>
51
+ ${option.label}
52
+ </option>
53
+ `)}
54
+ </select>
55
+ <jolly-icon class="chevron" name="chevron"></jolly-icon>
56
+ </span>
57
57
  `;
58
58
  }
59
59
  /**
@@ -1,51 +1,51 @@
1
1
  // Import Third-party Dependencies
2
2
  import { css } from "lit";
3
- export const selectStyles = css `
4
- .value .select-wrap {
5
- position: relative;
6
- display: flex;
7
- flex: 1 1 auto;
8
- min-width: 0;
9
- }
10
-
11
- /*
12
- * Replace native chrome with the shared field styling and chevron.
13
- */
14
- .value select {
15
- flex: 1 1 auto;
16
- min-width: 0;
17
- appearance: none;
18
- padding-inline-end: calc(var(--jolly-space-1, 4px) * 2 + 12px);
19
- cursor: pointer;
20
- }
21
-
22
- /* Native dropdown rows need an opaque themed plane, especially in dark mode. */
23
- .value option {
24
- background: var(--jolly-surface-raised, Canvas);
25
- color: var(--jolly-text, CanvasText);
26
- }
27
-
28
- /*
29
- * Hide Firefox's inner focus ring without hiding the selected value.
30
- */
31
- .value select:-moz-focusring {
32
- color: transparent;
33
- text-shadow: 0 0 0 currentColor;
34
- }
35
-
36
- .value .chevron {
37
- position: absolute;
38
- top: 50%;
39
- right: var(--jolly-space-1, 4px);
40
- width: 10px;
41
- height: 10px;
42
- color: var(--jolly-text-muted);
43
- transform: translateY(-50%) rotate(90deg);
44
- pointer-events: none;
45
- }
46
-
47
- :host([disabled]) .value select {
48
- cursor: default;
49
- }
3
+ export const selectStyles = css `
4
+ .value .select-wrap {
5
+ position: relative;
6
+ display: flex;
7
+ flex: 1 1 auto;
8
+ min-width: 0;
9
+ }
10
+
11
+ /*
12
+ * Replace native chrome with the shared field styling and chevron.
13
+ */
14
+ .value select {
15
+ flex: 1 1 auto;
16
+ min-width: 0;
17
+ appearance: none;
18
+ padding-inline-end: calc(var(--jolly-space-1, 4px) * 2 + 12px);
19
+ cursor: pointer;
20
+ }
21
+
22
+ /* Native dropdown rows need an opaque themed plane, especially in dark mode. */
23
+ .value option {
24
+ background: var(--jolly-surface-raised, Canvas);
25
+ color: var(--jolly-text, CanvasText);
26
+ }
27
+
28
+ /*
29
+ * Hide Firefox's inner focus ring without hiding the selected value.
30
+ */
31
+ .value select:-moz-focusring {
32
+ color: transparent;
33
+ text-shadow: 0 0 0 currentColor;
34
+ }
35
+
36
+ .value .chevron {
37
+ position: absolute;
38
+ top: 50%;
39
+ right: var(--jolly-space-1, 4px);
40
+ width: 10px;
41
+ height: 10px;
42
+ color: var(--jolly-text-muted);
43
+ transform: translateY(-50%) rotate(90deg);
44
+ pointer-events: none;
45
+ }
46
+
47
+ :host([disabled]) .value select {
48
+ cursor: default;
49
+ }
50
50
  `;
51
51
  //# sourceMappingURL=Select.styles.js.map
@@ -27,19 +27,19 @@ let Separator = class Separator extends LitElement {
27
27
  }
28
28
  render() {
29
29
  if (this.label === "") {
30
- return html `
31
- <div class="unlabelled" role="separator">
32
- <span class="rule" aria-hidden="true"></span>
33
- </div>
30
+ return html `
31
+ <div class="unlabelled" role="separator">
32
+ <span class="rule" aria-hidden="true"></span>
33
+ </div>
34
34
  `;
35
35
  }
36
- return html `
37
- <div class="labelled" role="separator" aria-label=${this.label}>
38
- <span class="rule" aria-hidden="true"></span>
39
- <span class="caption">${this.label}</span>
40
- <span class="rule" aria-hidden="true"></span>
41
- </div>
42
- ${nothing}
36
+ return html `
37
+ <div class="labelled" role="separator" aria-label=${this.label}>
38
+ <span class="rule" aria-hidden="true"></span>
39
+ <span class="caption">${this.label}</span>
40
+ <span class="rule" aria-hidden="true"></span>
41
+ </div>
42
+ ${nothing}
43
43
  `;
44
44
  }
45
45
  };