@syware/jlib 0.12.1 → 0.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.
Files changed (155) hide show
  1. package/dist/atoms/jl-avatar.css.js +1 -1
  2. package/dist/atoms/jl-avatar.js +1 -8
  3. package/dist/atoms/jl-button.css.js +1 -1
  4. package/dist/atoms/jl-button.js +4 -6
  5. package/dist/atoms/jl-checkbox.css.js +1 -1
  6. package/dist/atoms/jl-checkbox.js +8 -10
  7. package/dist/atoms/jl-chip.css.js +1 -1
  8. package/dist/atoms/jl-chip.js +3 -11
  9. package/dist/atoms/jl-divider.css.js +1 -1
  10. package/dist/atoms/jl-divider.js +1 -5
  11. package/dist/atoms/jl-icon.css.js +1 -1
  12. package/dist/atoms/jl-icon.d.ts +2 -0
  13. package/dist/atoms/jl-icon.js +5 -1
  14. package/dist/atoms/jl-input.d.ts +7 -2
  15. package/dist/atoms/jl-input.js +36 -31
  16. package/dist/atoms/jl-link.css.js +1 -1
  17. package/dist/atoms/jl-link.js +3 -6
  18. package/dist/atoms/jl-progress-ring.js +3 -2
  19. package/dist/atoms/jl-progress.js +3 -2
  20. package/dist/atoms/jl-rating.css.js +1 -1
  21. package/dist/atoms/jl-rating.d.ts +2 -2
  22. package/dist/atoms/jl-rating.js +17 -35
  23. package/dist/atoms/jl-select.d.ts +8 -3
  24. package/dist/atoms/jl-select.js +26 -13
  25. package/dist/atoms/jl-skeleton.d.ts +1 -0
  26. package/dist/atoms/jl-skeleton.js +4 -1
  27. package/dist/atoms/jl-slider.d.ts +4 -0
  28. package/dist/atoms/jl-slider.js +29 -15
  29. package/dist/atoms/jl-switch.css.js +1 -1
  30. package/dist/atoms/jl-switch.js +2 -8
  31. package/dist/atoms/jl-textarea.css.js +1 -1
  32. package/dist/atoms/jl-textarea.d.ts +4 -5
  33. package/dist/atoms/jl-textarea.js +15 -30
  34. package/dist/index.d.ts +1 -1
  35. package/dist/lib/calendar.js +3 -2
  36. package/dist/lib/floating.d.ts +10 -0
  37. package/dist/lib/floating.js +27 -8
  38. package/dist/lib/flow.d.ts +7 -3
  39. package/dist/lib/flow.js +19 -8
  40. package/dist/lib/hotkey.d.ts +13 -0
  41. package/dist/lib/hotkey.js +2 -1
  42. package/dist/lib/indicator.d.ts +16 -0
  43. package/dist/lib/indicator.js +32 -6
  44. package/dist/lib/intl.d.ts +6 -0
  45. package/dist/lib/intl.js +19 -0
  46. package/dist/lib/key-shortcut.js +11 -29
  47. package/dist/lib/palette.js +1 -6
  48. package/dist/lib/progress.d.ts +0 -5
  49. package/dist/lib/progress.js +1 -9
  50. package/dist/lib/roving.d.ts +6 -0
  51. package/dist/lib/roving.js +14 -1
  52. package/dist/lib/table.d.ts +14 -2
  53. package/dist/lib/table.js +50 -39
  54. package/dist/molecules/jl-accordion-item.css.js +1 -1
  55. package/dist/molecules/jl-accordion-item.js +1 -5
  56. package/dist/molecules/jl-account-button.css.js +1 -1
  57. package/dist/molecules/jl-account-button.js +1 -5
  58. package/dist/molecules/jl-alert.css.js +1 -1
  59. package/dist/molecules/jl-alert.d.ts +5 -5
  60. package/dist/molecules/jl-alert.js +4 -13
  61. package/dist/molecules/jl-avatar-group.d.ts +7 -5
  62. package/dist/molecules/jl-avatar-group.js +15 -5
  63. package/dist/molecules/jl-breadcrumb.d.ts +7 -4
  64. package/dist/molecules/jl-breadcrumb.js +32 -8
  65. package/dist/molecules/jl-calendar.d.ts +12 -3
  66. package/dist/molecules/jl-calendar.js +79 -48
  67. package/dist/molecules/jl-card.css.js +1 -1
  68. package/dist/molecules/jl-card.js +2 -8
  69. package/dist/molecules/jl-chip-group.css.js +1 -1
  70. package/dist/molecules/jl-chip-group.d.ts +6 -2
  71. package/dist/molecules/jl-chip-group.js +14 -19
  72. package/dist/molecules/jl-code-block.css.js +1 -1
  73. package/dist/molecules/jl-code-block.d.ts +7 -5
  74. package/dist/molecules/jl-code-block.js +19 -22
  75. package/dist/molecules/jl-combobox.css.js +1 -1
  76. package/dist/molecules/jl-combobox.d.ts +4 -0
  77. package/dist/molecules/jl-combobox.js +33 -19
  78. package/dist/molecules/jl-date-picker.d.ts +6 -0
  79. package/dist/molecules/jl-date-picker.js +29 -9
  80. package/dist/molecules/jl-empty.css.js +1 -1
  81. package/dist/molecules/jl-empty.js +4 -19
  82. package/dist/molecules/jl-field.css.js +1 -1
  83. package/dist/molecules/jl-field.d.ts +7 -1
  84. package/dist/molecules/jl-field.js +35 -23
  85. package/dist/molecules/jl-file-drop.css.js +1 -1
  86. package/dist/molecules/jl-file-drop.js +1 -3
  87. package/dist/molecules/jl-input-list.css.js +1 -1
  88. package/dist/molecules/jl-input-list.d.ts +12 -1
  89. package/dist/molecules/jl-input-list.js +81 -51
  90. package/dist/molecules/jl-list-item.css.js +1 -1
  91. package/dist/molecules/jl-list-item.d.ts +3 -1
  92. package/dist/molecules/jl-list-item.js +26 -27
  93. package/dist/molecules/jl-load-state.css.js +1 -1
  94. package/dist/molecules/jl-load-state.d.ts +6 -1
  95. package/dist/molecules/jl-load-state.js +15 -18
  96. package/dist/molecules/jl-menu.d.ts +1 -0
  97. package/dist/molecules/jl-menu.js +9 -2
  98. package/dist/molecules/jl-pagination.css.js +1 -1
  99. package/dist/molecules/jl-pagination.d.ts +7 -1
  100. package/dist/molecules/jl-pagination.js +43 -35
  101. package/dist/molecules/jl-radio-group.js +1 -1
  102. package/dist/molecules/jl-search.css.js +1 -1
  103. package/dist/molecules/jl-search.js +4 -12
  104. package/dist/molecules/jl-segmented.css.js +1 -1
  105. package/dist/molecules/jl-segmented.d.ts +4 -2
  106. package/dist/molecules/jl-segmented.js +19 -26
  107. package/dist/molecules/jl-stat.css.js +1 -1
  108. package/dist/molecules/jl-stat.js +2 -8
  109. package/dist/molecules/jl-steps.d.ts +10 -3
  110. package/dist/molecules/jl-steps.js +82 -49
  111. package/dist/molecules/jl-tabs.d.ts +5 -2
  112. package/dist/molecules/jl-tabs.js +31 -25
  113. package/dist/molecules/jl-tag-input.css.js +1 -1
  114. package/dist/molecules/jl-tag-input.d.ts +13 -1
  115. package/dist/molecules/jl-tag-input.js +57 -30
  116. package/dist/molecules/jl-timeline.css.js +1 -1
  117. package/dist/molecules/jl-timeline.d.ts +3 -1
  118. package/dist/molecules/jl-timeline.js +9 -14
  119. package/dist/molecules/jl-toast.css.js +1 -1
  120. package/dist/molecules/jl-toast.js +4 -12
  121. package/dist/molecules/jl-tooltip.d.ts +2 -1
  122. package/dist/molecules/jl-tooltip.js +11 -15
  123. package/dist/organisms/jl-command-palette.css.js +1 -1
  124. package/dist/organisms/jl-command-palette.d.ts +8 -1
  125. package/dist/organisms/jl-command-palette.js +74 -43
  126. package/dist/organisms/jl-confirm.css.js +1 -1
  127. package/dist/organisms/jl-confirm.js +1 -5
  128. package/dist/organisms/jl-dialog.css.js +1 -1
  129. package/dist/organisms/jl-dialog.js +1 -5
  130. package/dist/organisms/jl-drawer.css.js +1 -1
  131. package/dist/organisms/jl-drawer.js +1 -3
  132. package/dist/organisms/jl-flow.d.ts +18 -2
  133. package/dist/organisms/jl-flow.js +128 -44
  134. package/dist/organisms/jl-navbar.css.js +1 -1
  135. package/dist/organisms/jl-navbar.d.ts +1 -1
  136. package/dist/organisms/jl-navbar.js +3 -5
  137. package/dist/organisms/jl-page-header.css.js +1 -1
  138. package/dist/organisms/jl-page-header.js +1 -5
  139. package/dist/organisms/jl-page-outlet.d.ts +4 -3
  140. package/dist/organisms/jl-page-outlet.js +7 -8
  141. package/dist/organisms/jl-side-nav.css.js +1 -1
  142. package/dist/organisms/jl-side-nav.d.ts +9 -2
  143. package/dist/organisms/jl-side-nav.js +44 -16
  144. package/dist/organisms/jl-tab-bar.css.js +1 -1
  145. package/dist/organisms/jl-tab-bar.js +0 -2
  146. package/dist/organisms/jl-table.css.js +1 -1
  147. package/dist/organisms/jl-table.d.ts +19 -7
  148. package/dist/organisms/jl-table.js +97 -59
  149. package/dist/organisms/jl-tree.css.js +1 -1
  150. package/dist/organisms/jl-tree.d.ts +16 -13
  151. package/dist/organisms/jl-tree.js +72 -70
  152. package/package.json +4 -2
  153. package/dist/lib/roving-index.d.ts +0 -10
  154. package/dist/lib/roving-index.js +0 -32
  155. /package/dist/types/{roving-index.types.d.ts → roving.types.d.ts} +0 -0
@@ -33,14 +33,14 @@ var JlInputList = class extends JlElement {
33
33
  parse: jsonOf([])
34
34
  });
35
35
  /** The input of each row: text, a number, a date, a link… */
36
- type = this.useChange("text", () => this.renderRows(), {
36
+ type = this.useChange("text", () => this.drawRows(), {
37
37
  attribute: "type",
38
38
  parse: oneOf(INPUT_TYPES, "text")
39
39
  });
40
40
  /** Each value on several lines, in a text area. */
41
- multiline = this.useChange(false, () => this.renderRows(), { attribute: "multiline" });
41
+ multiline = this.useChange(false, () => this.drawRows(), { attribute: "multiline" });
42
42
  /** The values to pick from, each row a select; none lets people type. */
43
- options = this.useChange([], () => this.renderRows(), {
43
+ options = this.useChange([], () => this.drawRows(), {
44
44
  attribute: "options",
45
45
  parse: jsonOf([])
46
46
  });
@@ -49,15 +49,19 @@ var JlInputList = class extends JlElement {
49
49
  attribute: "max",
50
50
  parse: clampedNumber(NO_LIMIT, NO_LIMIT, MAX_LIMIT)
51
51
  });
52
- placeholder = this.useChange("", () => this.renderRows(), { attribute: "placeholder" });
52
+ placeholder = this.useChange("", () => this.drawRows(), { attribute: "placeholder" });
53
53
  /** The name of each row for screen readers: the field's label. */
54
- label = this.useChange("", () => this.renderRows(), { attribute: "label" });
54
+ label = this.useChange("", () => this.drawRows(), { attribute: "label" });
55
55
  disabled = this.useChange(false, (value) => this.renderDisabled(value), { attribute: "disabled" });
56
56
  /** The add button's text; jlib's own when empty. */
57
57
  addLabel = this.useChange("", () => this.renderAdd(), { attribute: "add-label" });
58
58
  /** The text a screen reader says for each row's remove button; jlib's own when empty. */
59
- removeLabel = this.useChange("", () => this.renderRows(), { attribute: "remove-label" });
59
+ removeLabel = this.useChange("", () => this.drawRows(), { attribute: "remove-label" });
60
60
  _state = { rows: [""] };
61
+ _drawn = {
62
+ kind: void 0,
63
+ rows: []
64
+ };
61
65
  _refs = this.useRefs((ref) => ({
62
66
  add: ref(".add"),
63
67
  rows: ref(".rows")
@@ -87,20 +91,39 @@ var JlInputList = class extends JlElement {
87
91
  this.renderRows();
88
92
  }
89
93
  drawTexts() {
90
- this.renderRows();
94
+ this.drawRows();
91
95
  }
96
+ /**
97
+ * Draws the rows as the inputs say: in place, or built again for another kind of control. Every input's callback
98
+ * runs as the list appears: a build in each made about ten per list.
99
+ */
100
+ drawRows() {
101
+ if (this._drawn.kind !== this.rowKind()) {
102
+ this.renderRows();
103
+ return;
104
+ }
105
+ for (const row of this._drawn.rows) this.drawRow(row);
106
+ this.renderAdd();
107
+ }
108
+ /** Builds every row again, from the values in `_state`. */
92
109
  renderRows() {
93
- this._refs.rows.replaceChildren(...this._state.rows.map((value, index) => this.row(value, index)));
110
+ this._drawn.kind = this.rowKind();
111
+ this._drawn.rows = this._state.rows.map((value, index) => this.row(value, index));
112
+ this._refs.rows.replaceChildren(...this._drawn.rows.map(({ control, remove }) => /* @__PURE__ */ jsxs("div", {
113
+ class: "row",
114
+ children: [control, remove]
115
+ })));
94
116
  this.renderAdd();
95
117
  }
118
+ /** The add button: its text, and hidden at `max`; the CSS hides it in a disabled list. */
96
119
  renderAdd() {
97
120
  const add = this._refs.add;
98
121
  add.label.set(this.addLabel.get() || jlText("addValue"));
99
- add.hidden = this.disabled.get() || !canAddRow(this._state.rows.length, this.max.get());
122
+ add.hidden = !canAddRow(this._state.rows.length, this.max.get());
100
123
  }
101
124
  renderDisabled(disabled) {
102
125
  this.reflect("disabled", disabled);
103
- this.renderRows();
126
+ this.drawRows();
104
127
  }
105
128
  row(value, index) {
106
129
  const control = this.control(value, (text) => this.change(index, text));
@@ -108,51 +131,58 @@ var JlInputList = class extends JlElement {
108
131
  class: "remove",
109
132
  variant: "ghost",
110
133
  size: "sm",
111
- icon: "x",
112
- hint: this.removeLabel.get() || jlText("removeValue")
134
+ icon: "x"
113
135
  });
114
136
  remove.events.register("press", () => this.removeRow(index));
115
- remove.hidden = this.disabled.get() || this._state.rows.length === 1;
116
- return /* @__PURE__ */ jsxs("div", {
117
- class: "row",
118
- children: [control, remove]
119
- });
137
+ const row = {
138
+ control,
139
+ remove
140
+ };
141
+ this.drawRow(row);
142
+ return row;
120
143
  }
121
- /** The control of a row: a select among the options, a text area, or an input of the type; `onInput` hears it. */
122
- control(value, onInput) {
123
- const label = this.label.get();
124
- const disabled = this.disabled.get();
125
- const options = this.options.get();
126
- if (options.length > 0) {
127
- const select = /* @__PURE__ */ jsx(JlSelect, {
128
- label,
129
- options,
130
- disabled
131
- });
132
- select.value.set(value);
133
- select.events.register("change", onInput);
134
- return select;
135
- }
136
- if (this.multiline.get()) {
137
- const area = /* @__PURE__ */ jsx(JlTextarea, {
138
- label,
139
- value,
140
- placeholder: this.placeholder.get(),
141
- disabled,
142
- autosize: true
143
- });
144
- area.events.register("input", onInput);
145
- return area;
144
+ /** Gives a row the list's label, placeholder, type, options and state; the CSS shows or hides its remove button. */
145
+ drawRow({ control, remove }) {
146
+ control.label.set(this.label.get());
147
+ control.disabled.set(this.disabled.get());
148
+ remove.hint.set(this.removeLabel.get() || jlText("removeValue"));
149
+ if (control instanceof JlSelect) {
150
+ control.options.set(this.options.get());
151
+ return;
146
152
  }
147
- const input = /* @__PURE__ */ jsx(JlInput, {
148
- label,
149
- value,
150
- type: this.type.get(),
151
- placeholder: this.placeholder.get(),
152
- disabled
153
- });
154
- input.events.register("input", onInput);
155
- return input;
153
+ control.placeholder.set(this.placeholder.get());
154
+ if (control instanceof JlInput) control.type.set(this.type.get());
155
+ }
156
+ rowKind() {
157
+ if (this.options.get().length > 0) return "select";
158
+ return this.multiline.get() ? "textarea" : "input";
159
+ }
160
+ /** A row's control, of the list's kind, holding `value`; `onInput` hears it. drawRow gives it the rest. */
161
+ control(value, onInput) {
162
+ return {
163
+ input: () => {
164
+ const input = /* @__PURE__ */ jsx(JlInput, {
165
+ type: this.type.get(),
166
+ value
167
+ });
168
+ input.events.register("input", onInput);
169
+ return input;
170
+ },
171
+ select: () => {
172
+ const select = /* @__PURE__ */ jsx(JlSelect, { options: this.options.get() });
173
+ select.value.set(value);
174
+ select.events.register("change", onInput);
175
+ return select;
176
+ },
177
+ textarea: () => {
178
+ const area = /* @__PURE__ */ jsx(JlTextarea, {
179
+ value,
180
+ autosize: true
181
+ });
182
+ area.events.register("input", onInput);
183
+ return area;
184
+ }
185
+ }[this.rowKind()]();
156
186
  }
157
187
  change(index, text) {
158
188
  this._state.rows = withRowAt(this._state.rows, index, text);
@@ -1,3 +1,3 @@
1
1
  // src/molecules/jl-list-item.css?inline
2
- var jl_list_item_default = ":host{--pad-x:16px;--pad-y:12px;display:block}.item{min-height:52px;padding:var(--pad-y) var(--pad-x);background:var(--jl-surface);color:var(--jl-text);transition:background var(--jl-fast) var(--jl-ease);align-items:center;gap:12px;display:flex;position:relative}:host(:not(:last-child)) .item{border-bottom:1px solid var(--jl-line)}:host([clickable]) .item{cursor:pointer}:host([clickable]) .item:hover{background:var(--jl-surface-2)}:host([selected]) .item,:host([selected][clickable]) .item:hover{background:var(--jl-accent-soft)}.link{z-index:1;position:absolute;inset:0}.link:focus-visible,.item:focus-visible{box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--jl-brand) 55%, transparent)}.end{z-index:2;flex:none;align-items:center;gap:8px;display:flex;position:relative}.start{flex:none;align-items:center;display:inline-flex}.icon-box{border-radius:var(--jl-radius-sm);background:var(--jl-surface-3);width:32px;height:32px;color:var(--jl-text-2);justify-content:center;align-items:center;display:inline-flex}:host([selected]) .icon-box{background:color-mix(in srgb, var(--jl-accent) 14%, transparent);color:var(--jl-accent)}.text{flex:1;gap:1px;min-width:0;display:grid}.heading{font-size:var(--jl-font-md);text-overflow:ellipsis;white-space:nowrap;font-weight:600;line-height:1.4;overflow:hidden}:host([selected]) .heading{color:var(--jl-accent)}.description{color:var(--jl-muted);font-size:var(--jl-font-sm);line-height:1.45}.meta{color:var(--jl-muted);font-size:var(--jl-font-xs);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.chevron{color:var(--jl-faint);margin-right:-4px}";
2
+ var jl_list_item_default = ":host{--pad-x:16px;--pad-y:12px;display:block}.item{min-height:52px;padding:var(--pad-y) var(--pad-x);background:var(--jl-surface);color:var(--jl-text);transition:background var(--jl-fast) var(--jl-ease);align-items:center;gap:12px;display:flex;position:relative}:host(:not(:last-child)) .item{border-bottom:1px solid var(--jl-line)}:host([clickable]) .item{cursor:pointer}:host([clickable]) .item:hover{background:var(--jl-surface-2)}:host([selected]) .item,:host([selected][clickable]) .item:hover{background:var(--jl-accent-soft)}.link{z-index:1;position:absolute;inset:0}.link:focus-visible,.item:focus-visible{box-shadow:inset 0 0 0 2px color-mix(in srgb, var(--jl-brand) 55%, transparent)}.end{z-index:2;flex:none;align-items:center;gap:8px;display:flex;position:relative}.start{flex:none;align-items:center;display:inline-flex}.icon-box{border-radius:var(--jl-radius-sm);background:var(--jl-surface-3);width:32px;height:32px;color:var(--jl-text-2);justify-content:center;align-items:center;display:inline-flex}:host([selected]) .icon-box{background:color-mix(in srgb, var(--jl-accent) 14%, transparent);color:var(--jl-accent)}.text{flex:1;gap:1px;min-width:0;display:grid}.heading{font-size:var(--jl-font-md);text-overflow:ellipsis;white-space:nowrap;font-weight:600;line-height:1.4;overflow:hidden}:host([selected]) .heading{color:var(--jl-accent)}.description:empty,.meta:empty{display:none}.description{color:var(--jl-muted);font-size:var(--jl-font-sm);line-height:1.45}.meta{color:var(--jl-muted);font-size:var(--jl-font-xs);font-variant-numeric:tabular-nums;white-space:nowrap;flex:none}.chevron{color:var(--jl-faint);margin-right:-4px}";
3
3
  export { jl_list_item_default as default };
@@ -50,7 +50,9 @@ export declare class JlListItem extends JlElement {
50
50
  /** An interactive row without a link fires `press`; a link row leaves the press to the link. */
51
51
  private pressable;
52
52
  private renderInteraction;
53
- /** The start holds an avatar when one is slotted, otherwise the icon, otherwise nothing. */
53
+ /** The chevron of a link row, made the first time the row is a link. */
54
+ private renderChevron;
55
+ /** The start holds an avatar when one is slotted, otherwise the icon (made the first time there is one), or nothing. */
54
56
  private renderStart;
55
57
  private renderEnd;
56
58
  }
@@ -28,14 +28,12 @@ var JlListItem = class extends JlElement {
28
28
  }, { attribute: "heading" });
29
29
  description = this.useChange("", (value) => {
30
30
  this._refs.description.textContent = value;
31
- this._refs.description.hidden = value === "";
32
31
  }, { attribute: "description" });
33
32
  /** An icon at the start; `slot="start"` takes an avatar instead. */
34
33
  icon = this.useChange("", () => this.renderStart(), { attribute: "icon" });
35
34
  /** A short note at the end: a time, a count, a size. */
36
35
  meta = this.useChange("", (value) => {
37
36
  this._refs.meta.textContent = value;
38
- this._refs.meta.hidden = value === "";
39
37
  }, { attribute: "meta" });
40
38
  /** Makes the row a link, named by its heading. The trailing controls stay pressable on their own. */
41
39
  href = this.useChange("", () => this.renderInteraction(), { attribute: "href" });
@@ -47,12 +45,10 @@ var JlListItem = class extends JlElement {
47
45
  this.renderInteraction();
48
46
  }, { attribute: "selected" });
49
47
  _refs = this.useRefs((ref) => ({
50
- chevron: ref(".chevron"),
51
48
  description: ref(".description"),
52
49
  end: ref(".end"),
53
50
  endSlot: ref("slot[name=\"end\"]"),
54
51
  heading: ref(".heading"),
55
- icon: ref(".icon"),
56
52
  iconBox: ref(".icon-box"),
57
53
  item: ref(".item"),
58
54
  link: ref(".link"),
@@ -78,13 +74,7 @@ var JlListItem = class extends JlElement {
78
74
  /* @__PURE__ */ jsxs("span", {
79
75
  class: "start",
80
76
  hidden: true,
81
- children: [/* @__PURE__ */ jsx("span", {
82
- class: "icon-box",
83
- children: /* @__PURE__ */ jsx(JlIcon, {
84
- class: "icon",
85
- size: ICON_SIZE
86
- })
87
- }), /* @__PURE__ */ jsx("slot", { name: "start" })]
77
+ children: [/* @__PURE__ */ jsx("span", { class: "icon-box" }), /* @__PURE__ */ jsx("slot", { name: "start" })]
88
78
  }),
89
79
  /* @__PURE__ */ jsxs("span", {
90
80
  class: "text",
@@ -93,24 +83,14 @@ var JlListItem = class extends JlElement {
93
83
  id: "heading"
94
84
  }), /* @__PURE__ */ jsx("span", {
95
85
  class: "description",
96
- id: "description",
97
- hidden: true
86
+ id: "description"
98
87
  })]
99
88
  }),
100
- /* @__PURE__ */ jsx("span", {
101
- class: "meta",
102
- hidden: true
103
- }),
89
+ /* @__PURE__ */ jsx("span", { class: "meta" }),
104
90
  /* @__PURE__ */ jsx("span", {
105
91
  class: "end",
106
92
  hidden: true,
107
93
  children: /* @__PURE__ */ jsx("slot", { name: "end" })
108
- }),
109
- /* @__PURE__ */ jsx(JlIcon, {
110
- class: "chevron",
111
- name: "chevron-right",
112
- size: CHEVRON_SIZE,
113
- hidden: true
114
94
  })
115
95
  ]
116
96
  });
@@ -145,7 +125,7 @@ var JlListItem = class extends JlElement {
145
125
  const selected = this.selected.get();
146
126
  setOrRemove(link, "href", href);
147
127
  link.hidden = href === "";
148
- this._refs.chevron.hidden = href === "";
128
+ this.renderChevron(href !== "");
149
129
  this.reflect("clickable", this.interactive.get() || href !== "");
150
130
  setOrRemove(link, "aria-current", selected ? "page" : "");
151
131
  if (!this.pressable()) {
@@ -160,12 +140,31 @@ var JlListItem = class extends JlElement {
160
140
  item.setAttribute("aria-labelledby", "heading");
161
141
  setOrRemove(item, "aria-current", selected ? "true" : "");
162
142
  }
163
- /** The start holds an avatar when one is slotted, otherwise the icon, otherwise nothing. */
143
+ /** The chevron of a link row, made the first time the row is a link. */
144
+ renderChevron(shown) {
145
+ const item = this._refs.item;
146
+ const chevron = item.querySelector(".chevron");
147
+ if (chevron !== null) {
148
+ chevron.hidden = !shown;
149
+ return;
150
+ }
151
+ if (shown) item.append(/* @__PURE__ */ jsx(JlIcon, {
152
+ class: "chevron",
153
+ name: "chevron-right",
154
+ size: CHEVRON_SIZE
155
+ }));
156
+ }
157
+ /** The start holds an avatar when one is slotted, otherwise the icon (made the first time there is one), or nothing. */
164
158
  renderStart() {
165
159
  const icon = this.icon.get();
166
160
  const slotted = hasSlotted(this._refs.startSlot);
167
- this._refs.icon.name.set(icon);
168
- this._refs.iconBox.hidden = slotted || icon === "";
161
+ const box = this._refs.iconBox;
162
+ const drawn = box.querySelector(JlIcon.selector);
163
+ if (icon !== "") drawn === null ? box.append(/* @__PURE__ */ jsx(JlIcon, {
164
+ name: icon,
165
+ size: ICON_SIZE
166
+ })) : drawn.name.set(icon);
167
+ box.hidden = slotted || icon === "";
169
168
  this._refs.start.hidden = !slotted && icon === "";
170
169
  }
171
170
  renderEnd() {
@@ -1,3 +1,3 @@
1
1
  // src/molecules/jl-load-state.css?inline
2
- var jl_load_state_default = ":host{display:block}.bones{gap:16px;padding:16px;display:grid}.bones.lines{gap:10px}.bones.cards{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;padding:0}.bone-row{align-items:center;gap:12px;display:flex}.bone-lines{flex:1;gap:6px;display:grid}.bone-card{border:1px solid var(--jl-line);border-radius:var(--jl-radius-lg);gap:8px;padding:12px;display:grid}";
2
+ var jl_load_state_default = ":host{display:block}:host(:not([state=error])) .error,:host(:not([state=empty])) .empty,:host(:not([state=ready])) .content{display:none}.bones{gap:16px;padding:16px;display:grid}.bones.lines{gap:10px}.bones.cards{grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;padding:0}.bone-row{align-items:center;gap:12px;display:flex}.bone-lines{flex:1;gap:6px;display:grid}.bone-card{border:1px solid var(--jl-line);border-radius:var(--jl-radius-lg);gap:8px;padding:12px;display:grid}";
3
3
  export { jl_load_state_default as default };
@@ -72,6 +72,11 @@ export declare class JlLoadState extends JlElement {
72
72
  protected drawTexts(): void;
73
73
  onConnect(): void;
74
74
  onDisconnect(): void;
75
+ /** The CSS shows what the state on the host says; the skeleton waits for `delay` first. */
75
76
  private renderState;
76
- private renderSkeleton;
77
+ /** Shows the skeleton, made the first time it shows: most loads answer before it would. */
78
+ private showSkeleton;
79
+ /** A new shape or count changes a skeleton already made; one never shown stays unmade. */
80
+ private redrawSkeleton;
81
+ private drawSkeleton;
77
82
  }
@@ -120,12 +120,12 @@ var JlLoadState = class JlLoadState extends JlElement {
120
120
  parse: oneOf(LOAD_STATES, "loading")
121
121
  });
122
122
  /** The shape of the skeleton; slot `loading` takes one of the page's own instead. */
123
- skeleton = this.useChange("rows", () => this.renderSkeleton(), {
123
+ skeleton = this.useChange("rows", () => this.redrawSkeleton(), {
124
124
  attribute: "skeleton",
125
125
  parse: oneOf(LOAD_SKELETONS, "rows")
126
126
  });
127
127
  /** How many rows, cards or lines the skeleton has. */
128
- count = this.useChange(DEFAULT_COUNT, () => this.renderSkeleton(), {
128
+ count = this.useChange(DEFAULT_COUNT, () => this.redrawSkeleton(), {
129
129
  attribute: "count",
130
130
  parse: clampedNumber(DEFAULT_COUNT, 1, MAX_COUNT)
131
131
  });
@@ -143,8 +143,6 @@ var JlLoadState = class JlLoadState extends JlElement {
143
143
  _work = { latest: 0 };
144
144
  _refs = this.useRefs((ref) => ({
145
145
  bones: ref(".bones"),
146
- content: ref(".content"),
147
- empty: ref(".empty"),
148
146
  error: ref(JlEmpty),
149
147
  loading: ref(".loading"),
150
148
  retry: ref(".retry")
@@ -199,7 +197,6 @@ var JlLoadState = class JlLoadState extends JlElement {
199
197
  /* @__PURE__ */ jsx("jl-empty", {
200
198
  class: "error",
201
199
  icon: "circle-alert",
202
- hidden: true,
203
200
  children: /* @__PURE__ */ jsx(JlButton, {
204
201
  class: "retry",
205
202
  icon: "refresh"
@@ -207,12 +204,10 @@ var JlLoadState = class JlLoadState extends JlElement {
207
204
  }),
208
205
  /* @__PURE__ */ jsx("div", {
209
206
  class: "empty",
210
- hidden: true,
211
207
  children: /* @__PURE__ */ jsx("slot", { name: "empty" })
212
208
  }),
213
209
  /* @__PURE__ */ jsx("div", {
214
210
  class: "content",
215
- hidden: true,
216
211
  children: /* @__PURE__ */ jsx("slot", {})
217
212
  })
218
213
  ]
@@ -227,8 +222,6 @@ var JlLoadState = class JlLoadState extends JlElement {
227
222
  this._refs.retry.label.set(this.retryLabel.get() || jlText("retry"));
228
223
  }
229
224
  onConnect() {
230
- this.renderSkeleton();
231
- this.renderState(this.state.get());
232
225
  this._refs.retry.events.register("press", () => {
233
226
  this.events.emit("retry");
234
227
  this._work.retry?.();
@@ -237,19 +230,23 @@ var JlLoadState = class JlLoadState extends JlElement {
237
230
  onDisconnect() {
238
231
  clearTimeout(this._work.timer);
239
232
  }
233
+ /** The CSS shows what the state on the host says; the skeleton waits for `delay` first. */
240
234
  renderState(state) {
241
- const refs = this._refs;
242
235
  clearTimeout(this._work.timer);
243
- refs.loading.hidden = true;
244
- refs.error.hidden = state !== "error";
245
- refs.empty.hidden = state !== "empty";
246
- refs.content.hidden = state !== "ready";
236
+ this._refs.loading.hidden = true;
247
237
  this.reflect("state", state);
248
- if (state === "loading") this._work.timer = setTimeout(() => {
249
- refs.loading.hidden = false;
250
- }, this.delay.get());
238
+ if (state === "loading") this._work.timer = setTimeout(() => this.showSkeleton(), this.delay.get());
239
+ }
240
+ /** Shows the skeleton, made the first time it shows: most loads answer before it would. */
241
+ showSkeleton() {
242
+ if (this._refs.bones.childElementCount === 0) this.drawSkeleton();
243
+ this._refs.loading.hidden = false;
244
+ }
245
+ /** A new shape or count changes a skeleton already made; one never shown stays unmade. */
246
+ redrawSkeleton() {
247
+ if (this._refs.bones.childElementCount > 0) this.drawSkeleton();
251
248
  }
252
- renderSkeleton() {
249
+ drawSkeleton() {
253
250
  const kind = this.skeleton.get();
254
251
  this._refs.bones.className = `bones ${kind}`;
255
252
  this._refs.bones.replaceChildren(...SKELETONS[kind](this.count.get()));
@@ -29,6 +29,7 @@ export declare class JlMenu<Value extends string = string> extends JlElement {
29
29
  set(setter: string | ((prevState: string) => string)): void;
30
30
  }>>;
31
31
  private readonly _state;
32
+ private readonly _drawn;
32
33
  private readonly _refs;
33
34
  /** Opens the menu and focuses its first item. */
34
35
  show(): void;
@@ -50,7 +50,9 @@ var isTypeahead = (event) => event.key.length === 1 && event.key !== " " && !eve
50
50
  var JlMenu = class extends JlElement {
51
51
  static selector = "jl-menu";
52
52
  events = this.useEvents();
53
- items = this.useChange([], () => this.renderItems(), {
53
+ items = this.useChange([], () => {
54
+ if (this.isOpen()) this.renderItems();
55
+ }, {
54
56
  attribute: "items",
55
57
  parse: jsonOf([])
56
58
  });
@@ -65,6 +67,7 @@ var JlMenu = class extends JlElement {
65
67
  following: new AbortController(),
66
68
  openAtPointerDown: false
67
69
  };
70
+ _drawn = {};
68
71
  _refs = this.useRefs((ref) => ({
69
72
  menu: ref(".menu"),
70
73
  trigger: ref("slot[name=\"trigger\"]")
@@ -175,6 +178,7 @@ var JlMenu = class extends JlElement {
175
178
  open(focusFirst) {
176
179
  const menu = this._refs.menu;
177
180
  if (!this.isOpen()) {
181
+ this.renderItems();
178
182
  menu.showPopover();
179
183
  this.follow();
180
184
  }
@@ -240,7 +244,10 @@ var JlMenu = class extends JlElement {
240
244
  menu.ariaLabelledByElements = trigger === null ? null : [trigger];
241
245
  }
242
246
  renderItems() {
243
- this._refs.menu.replaceChildren(...sectionsOf(this.items.get()).map((section) => this.section(section)));
247
+ const items = this.items.get();
248
+ if (items === this._drawn.items) return;
249
+ this._drawn.items = items;
250
+ this._refs.menu.replaceChildren(...sectionsOf(items).map((section) => this.section(section)));
244
251
  }
245
252
  section(section) {
246
253
  const entries = section.entries.map((entry) => this.entry(entry));
@@ -1,3 +1,3 @@
1
1
  // src/molecules/jl-pagination.css?inline
2
- var jl_pagination_default = ":host{--height:var(--jl-control-md);--font-size:var(--jl-font-sm);--entry:var(--height);--gap:4px;--min-button:26px;display:block}:host([size=sm]){--height:var(--jl-control-sm);--font-size:var(--jl-font-xs);--min-button:24px}:host([size=lg]){--height:var(--jl-control-lg);--font-size:var(--jl-font-md);--min-button:32px}@media (width<480px){:host{--entry:var(--min-button);--gap:2px}}nav{align-items:center;gap:var(--gap);display:flex}.pages{align-items:center;gap:var(--gap);padding:0;list-style:none;display:flex}.pages li{width:var(--entry);display:flex}.button{width:100%;height:var(--height);border-radius:var(--jl-radius-sm);color:var(--jl-text-2);font-size:var(--font-size);font-variant-numeric:tabular-nums;cursor:pointer;transition:background var(--jl-fast) var(--jl-ease), color var(--jl-fast) var(--jl-ease);background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0 2px;font-weight:600;display:inline-flex}.button:hover:not(:disabled,[aria-current]){background:var(--jl-surface-2);color:var(--jl-text)}.button:active:not(:disabled,[aria-current]){background:var(--jl-surface-3)}.previous,.next{width:calc(var(--entry) + 2px);border-color:var(--jl-line-strong);color:var(--jl-text);flex:none}.button:disabled{cursor:not-allowed;opacity:.4}.page[aria-current]{background:var(--jl-accent);color:var(--jl-on-accent);cursor:default}.pages .gap{width:calc(var(--entry) - 10px);color:var(--jl-faint);font-size:var(--font-size);-webkit-user-select:none;user-select:none;justify-content:center;align-items:flex-end;display:inline-flex}.status{min-width:72px;color:var(--jl-text-2);font-size:var(--font-size);font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap;flex:none;padding:0 8px;font-weight:600}";
2
+ var jl_pagination_default = ":host{--height:var(--jl-control-md);--font-size:var(--jl-font-sm);--entry:var(--height);--gap:4px;--min-button:26px;display:block}:host([size=sm]){--height:var(--jl-control-sm);--font-size:var(--jl-font-xs);--min-button:24px}:host([size=lg]){--height:var(--jl-control-lg);--font-size:var(--jl-font-md);--min-button:32px}@media (width<480px){:host{--entry:var(--min-button);--gap:2px}}nav{align-items:center;gap:var(--gap);display:flex}.pages{align-items:center;gap:var(--gap);padding:0;list-style:none;display:flex}.pages li{width:var(--entry);display:flex}.button{width:100%;height:var(--height);border-radius:var(--jl-radius-sm);color:var(--jl-text-2);font-size:var(--font-size);font-variant-numeric:tabular-nums;cursor:pointer;transition:background var(--jl-fast) var(--jl-ease), color var(--jl-fast) var(--jl-ease);background:0 0;border:1px solid #0000;justify-content:center;align-items:center;padding:0 2px;font-weight:600;display:inline-flex}.button:hover:not(:disabled,[aria-current]){background:var(--jl-surface-2);color:var(--jl-text)}.button:active:not(:disabled,[aria-current]){background:var(--jl-surface-3)}.previous,.next{width:calc(var(--entry) + 2px);border-color:var(--jl-line-strong);color:var(--jl-text);flex:none}.button:disabled{cursor:not-allowed;opacity:.4}.page[aria-current]{background:var(--jl-accent);color:var(--jl-on-accent);cursor:default}.pages .gap{width:calc(var(--entry) - 10px);color:var(--jl-faint);font-size:var(--font-size);-webkit-user-select:none;user-select:none;justify-content:center;align-items:flex-end;display:inline-flex}.status{min-width:72px;color:var(--jl-text-2);font-size:var(--font-size);font-variant-numeric:tabular-nums;text-align:center;white-space:nowrap;flex:none;padding:0 8px;font-weight:600}:host([compact]) .pages,:host(:not([compact])) .status{display:none}jl-icon{--icon-size:16px}:host([size=sm]) jl-icon{--icon-size:14px}:host([size=lg]) jl-icon{--icon-size:18px}";
3
3
  export { jl_pagination_default as default };
@@ -51,8 +51,14 @@ export declare class JlPagination extends JlElement {
51
51
  onConnect(): void;
52
52
  /** The current page, kept within the pages there are. */
53
53
  private currentPage;
54
+ /** The CSS shows the list, or "3 of 12" when `compact`: only the one shown is drawn. */
54
55
  private render;
55
- private entry;
56
+ /**
57
+ * The list's entry at a place, made only when the place has none or one of the other kind (a gap, a page): the list
58
+ * keeps its length from page to page, so stepping through changes the buttons' numbers, not the buttons.
59
+ */
60
+ private entryAt;
61
+ private renderPageButton;
56
62
  private renderSize;
57
63
  /** Goes one page back or forward from an arrow; at an end, the focus moves to the other arrow. */
58
64
  private step;
@@ -5,6 +5,7 @@ import { clampedNumber, oneOf } from "../lib/attributes.js";
5
5
  import { registerIcons } from "../lib/icons.js";
6
6
  import { CONTROL_SIZES } from "../lib/options.js";
7
7
  import { JlIcon } from "../atoms/jl-icon.js";
8
+ import { setOrRemove } from "../lib/dom.js";
8
9
  import { clampPage, pageItems } from "../lib/pagination.js";
9
10
  import jl_pagination_default from "./jl-pagination.css.js";
10
11
  import { css } from "@jadis/core";
@@ -15,11 +16,6 @@ registerIcons({
15
16
  "chevron-left": ChevronLeft,
16
17
  "chevron-right": ChevronRight
17
18
  });
18
- var ICON_SIZES = {
19
- lg: 18,
20
- md: 16,
21
- sm: 14
22
- };
23
19
  var MAX_PAGES = Number.MAX_SAFE_INTEGER;
24
20
  var MAX_NEIGHBOURS = 5;
25
21
  var STEP_BACK = -1;
@@ -66,10 +62,9 @@ var JlPagination = class extends JlElement {
66
62
  list: ref(".pages"),
67
63
  nav: ref("nav"),
68
64
  next: ref(".next"),
69
- nextIcon: ref(".next jl-icon"),
70
65
  previous: ref(".previous"),
71
- previousIcon: ref(".previous jl-icon"),
72
- status: ref(".status")
66
+ statusPrefix: ref(".status-prefix"),
67
+ statusText: ref(".status-text")
73
68
  }));
74
69
  templateHtml() {
75
70
  return /* @__PURE__ */ jsxs("nav", {
@@ -81,9 +76,9 @@ var JlPagination = class extends JlElement {
81
76
  children: /* @__PURE__ */ jsx(JlIcon, { name: "chevron-left" })
82
77
  }),
83
78
  /* @__PURE__ */ jsx("ol", { class: "pages" }),
84
- /* @__PURE__ */ jsx("span", {
79
+ /* @__PURE__ */ jsxs("span", {
85
80
  class: "status",
86
- hidden: true
81
+ children: [/* @__PURE__ */ jsx("span", { class: "status-prefix sr-only" }), /* @__PURE__ */ jsx("span", { class: "status-text" })]
87
82
  }),
88
83
  /* @__PURE__ */ jsx("button", {
89
84
  type: "button",
@@ -120,46 +115,59 @@ var JlPagination = class extends JlElement {
120
115
  currentPage() {
121
116
  return clampPage(this.page.get(), this.pages.get());
122
117
  }
118
+ /** The CSS shows the list, or "3 of 12" when `compact`: only the one shown is drawn. */
123
119
  render() {
124
120
  const pages = this.pages.get();
125
121
  const page = this.currentPage();
126
- const compact = this.compact.get();
127
122
  this._refs.previous.disabled = page <= 1;
128
123
  this._refs.next.disabled = page >= pages;
129
- this._refs.list.hidden = compact;
130
- this._refs.status.hidden = !compact;
131
- this._refs.status.replaceChildren(/* @__PURE__ */ jsx("span", {
132
- class: "sr-only",
133
- children: `${jlText("page")} `
134
- }), jlText("pageOfTotal", {
135
- page,
136
- total: Math.max(pages, 1)
137
- }));
138
- if (!compact) {
139
- const items = pageItems(page, pages, this.siblings.get(), this.boundaries.get());
140
- this._refs.list.replaceChildren(...items.map((item) => this.entry(item, page)));
124
+ if (this.compact.get()) {
125
+ this._refs.statusPrefix.textContent = `${jlText("page")} `;
126
+ this._refs.statusText.textContent = jlText("pageOfTotal", {
127
+ page,
128
+ total: Math.max(pages, 1)
129
+ });
130
+ return;
141
131
  }
132
+ const items = pageItems(page, pages, this.siblings.get(), this.boundaries.get());
133
+ items.forEach((item, index) => {
134
+ const entry = this.entryAt(index, item.type);
135
+ if (item.type === "page") this.renderPageButton(entry, item.page, page);
136
+ });
137
+ const list = this._refs.list;
138
+ while (list.childElementCount > items.length) list.lastElementChild?.remove();
142
139
  }
143
- entry(item, current) {
144
- if (item.type === "gap") return /* @__PURE__ */ jsx("li", {
140
+ /**
141
+ * The list's entry at a place, made only when the place has none or one of the other kind (a gap, a page): the list
142
+ * keeps its length from page to page, so stepping through changes the buttons' numbers, not the buttons.
143
+ */
144
+ entryAt(index, kind) {
145
+ const list = this._refs.list;
146
+ const entry = list.children.item(index);
147
+ if (entry !== null && entry.classList.contains("gap") === (kind === "gap")) return entry;
148
+ const made = kind === "gap" ? /* @__PURE__ */ jsx("li", {
145
149
  class: "gap",
146
150
  "aria-hidden": "true",
147
151
  children: "…"
148
- });
149
- const isCurrent = item.page === current;
150
- return /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
152
+ }) : /* @__PURE__ */ jsx("li", { children: /* @__PURE__ */ jsx("button", {
151
153
  type: "button",
152
- class: "button page",
153
- "data-page": item.page,
154
- "aria-label": jlText("pageNumber", { page: item.page }),
155
- "aria-current": isCurrent ? "page" : void 0,
156
- children: String(item.page)
154
+ class: "button page"
157
155
  }) });
156
+ entry === null ? list.append(made) : entry.replaceWith(made);
157
+ return made;
158
+ }
159
+ renderPageButton(entry, page, current) {
160
+ const button = entry.firstElementChild;
161
+ const text = String(page);
162
+ if (button.textContent !== text) {
163
+ button.textContent = text;
164
+ button.dataset.page = text;
165
+ }
166
+ button.setAttribute("aria-label", jlText("pageNumber", { page }));
167
+ setOrRemove(button, "aria-current", page === current ? "page" : "");
158
168
  }
159
169
  renderSize(size) {
160
170
  this.reflect("size", size);
161
- this._refs.previousIcon.size.set(ICON_SIZES[size]);
162
- this._refs.nextIcon.size.set(ICON_SIZES[size]);
163
171
  }
164
172
  /** Goes one page back or forward from an arrow; at an end, the focus moves to the other arrow. */
165
173
  step(direction) {
@@ -2,7 +2,7 @@ import { jlText } from "../lib/texts.js";
2
2
  import { BASE_STYLES } from "../styles/shared.js";
3
3
  import { JlFormControl } from "../base/jl-form-control.js";
4
4
  import { jsonOf, oneOf, textOf } from "../lib/attributes.js";
5
- import { rovingIndex } from "../lib/roving-index.js";
5
+ import { rovingIndex } from "../lib/roving.js";
6
6
  import jl_radio_group_default from "./jl-radio-group.css.js";
7
7
  import { css } from "@jadis/core";
8
8
  import { jsx, jsxs } from "@jadis/core/jsx-runtime";
@@ -1,3 +1,3 @@
1
1
  // src/molecules/jl-search.css?inline
2
- var jl_search_default = ":host{display:block}.lead{justify-content:center;width:16px}:host([loading]) .lead{color:var(--jl-muted)}.native::-webkit-search-cancel-button{appearance:none}.native::-webkit-search-decoration{appearance:none}.keys{flex:none;gap:3px;margin-right:-4px;display:inline-flex}.control:focus-within .keys{display:none}.key{border:1px solid var(--jl-line);border-radius:var(--jl-radius-xs);background:var(--jl-surface-2);min-width:20px;height:20px;color:var(--jl-muted);font-size:var(--jl-font-xs);border-bottom-width:2px;justify-content:center;align-items:center;padding:0 5px;font-weight:500;line-height:1;display:inline-flex}:host([size=sm]) .key{min-width:18px;height:18px;padding:0 4px}";
2
+ var jl_search_default = ":host{display:block}.lead{justify-content:center;width:16px}:host([loading]) .lead{color:var(--jl-muted)}:host([loading]) .icon,:host(:not([loading])) jl-spinner{display:none}.native::-webkit-search-cancel-button{appearance:none}.native::-webkit-search-decoration{appearance:none}.keys{flex:none;gap:3px;margin-right:-4px;display:inline-flex}.keys:empty,.control:focus-within .keys{display:none}.key{border:1px solid var(--jl-line);border-radius:var(--jl-radius-xs);background:var(--jl-surface-2);min-width:20px;height:20px;color:var(--jl-muted);font-size:var(--jl-font-xs);border-bottom-width:2px;justify-content:center;align-items:center;padding:0 5px;font-weight:500;line-height:1;display:inline-flex}:host([size=sm]) .key{min-width:18px;height:18px;padding:0 4px}";
3
3
  export { jl_search_default as default };