@k2b/ui 0.11.0 → 0.12.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 (69) hide show
  1. package/dist/browser/content/FileView.js +203 -136
  2. package/dist/browser/content/FileView.js.map +1 -1
  3. package/dist/browser/content/markdown-title.js +52 -0
  4. package/dist/browser/content/markdown-title.js.map +1 -0
  5. package/dist/browser/feedback/index.js.map +1 -1
  6. package/dist/browser/feedback/prompts.js +18 -19
  7. package/dist/browser/feedback/prompts.js.map +1 -1
  8. package/dist/browser/feedback/toast.js +363 -122
  9. package/dist/browser/feedback/toast.js.map +1 -1
  10. package/dist/browser/inputs/DatePicker.js +263 -222
  11. package/dist/browser/inputs/DatePicker.js.map +1 -1
  12. package/dist/browser/inputs/MultiSelectInput.js +139 -105
  13. package/dist/browser/inputs/MultiSelectInput.js.map +1 -1
  14. package/dist/browser/inputs/NumberInput.js +209 -122
  15. package/dist/browser/inputs/NumberInput.js.map +1 -1
  16. package/dist/browser/inputs/Select.js +184 -92
  17. package/dist/browser/inputs/Select.js.map +1 -1
  18. package/dist/browser/inputs/index.js.map +1 -1
  19. package/dist/browser/intl/messages.js +4 -0
  20. package/dist/browser/intl/messages.js.map +1 -1
  21. package/dist/browser/layout/DetailPanel.js +2 -1
  22. package/dist/browser/layout/DetailPanel.js.map +1 -1
  23. package/dist/browser/layout/Navigation.js +1 -0
  24. package/dist/browser/layout/Navigation.js.map +1 -1
  25. package/dist/browser/layout/PanelDialog.js +1 -0
  26. package/dist/browser/layout/PanelDialog.js.map +1 -1
  27. package/dist/browser/layout/Settings.js +2 -2
  28. package/dist/browser/layout/Settings.js.map +1 -1
  29. package/dist/ssr/content/FileView.js +141 -81
  30. package/dist/ssr/content/FileView.js.map +1 -1
  31. package/dist/ssr/content/markdown-title.js +52 -0
  32. package/dist/ssr/content/markdown-title.js.map +1 -0
  33. package/dist/ssr/feedback/index.js.map +1 -1
  34. package/dist/ssr/feedback/prompts.js +1 -1
  35. package/dist/ssr/feedback/prompts.js.map +1 -1
  36. package/dist/ssr/feedback/toast.js +363 -122
  37. package/dist/ssr/feedback/toast.js.map +1 -1
  38. package/dist/ssr/inputs/DatePicker.js +78 -52
  39. package/dist/ssr/inputs/DatePicker.js.map +1 -1
  40. package/dist/ssr/inputs/MultiSelectInput.js +52 -32
  41. package/dist/ssr/inputs/MultiSelectInput.js.map +1 -1
  42. package/dist/ssr/inputs/NumberInput.js +93 -40
  43. package/dist/ssr/inputs/NumberInput.js.map +1 -1
  44. package/dist/ssr/inputs/Select.js +108 -29
  45. package/dist/ssr/inputs/Select.js.map +1 -1
  46. package/dist/ssr/inputs/index.js.map +1 -1
  47. package/dist/ssr/intl/messages.js +4 -0
  48. package/dist/ssr/intl/messages.js.map +1 -1
  49. package/dist/ssr/layout/DetailPanel.js +2 -1
  50. package/dist/ssr/layout/DetailPanel.js.map +1 -1
  51. package/dist/ssr/layout/Navigation.js +1 -0
  52. package/dist/ssr/layout/Navigation.js.map +1 -1
  53. package/dist/ssr/layout/PanelDialog.js +1 -0
  54. package/dist/ssr/layout/PanelDialog.js.map +1 -1
  55. package/dist/ssr/layout/Settings.js +2 -2
  56. package/dist/ssr/layout/Settings.js.map +1 -1
  57. package/dist/styles.css +1 -1
  58. package/dist/types/content/FileView.d.ts +11 -1
  59. package/dist/types/content/markdown-title.d.ts +9 -0
  60. package/dist/types/feedback/index.d.ts +1 -1
  61. package/dist/types/feedback/toast.d.ts +7 -0
  62. package/dist/types/inputs/DatePicker.d.ts +11 -2
  63. package/dist/types/inputs/MultiSelectInput.d.ts +5 -1
  64. package/dist/types/inputs/NumberInput.d.ts +14 -0
  65. package/dist/types/inputs/Select.d.ts +10 -0
  66. package/dist/types/inputs/index.d.ts +1 -1
  67. package/dist/types/intl/messages.d.ts +2 -0
  68. package/dist/types/layout/Settings.d.ts +2 -2
  69. package/package.json +1 -1
@@ -21,19 +21,30 @@ var _tmpl$ = /*#__PURE__*/_$template(`<button type=button class="k2b-choice-cont
21
21
  _tmpl$4 = /*#__PURE__*/_$template(`<div class=k2b-choice-toolbar><!$><!/><!$><!/>`),
22
22
  _tmpl$5 = /*#__PURE__*/_$template(`<div class=k2b-choice-status><i class="ti ti-loader-2 k2b-spin"aria-hidden=true></i><span>`),
23
23
  _tmpl$6 = /*#__PURE__*/_$template(`<div class=k2b-choice-control><button type=button class=k2b-choice-trigger role=combobox aria-haspopup=listbox><!$><!/><span class=k2b-choice-trigger__value></span><i aria-hidden=true></i></button><!$><!/><!$><!/><div popover=manual class=k2b-choice-popover role=group><!$><!/><!$><!/><div class=k2b-choice-options role=listbox><!$><!/><!$><!/><!$><!/>`),
24
- _tmpl$7 = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
25
- _tmpl$8 = /*#__PURE__*/_$template(`<span class=k2b-choice-dot aria-hidden=true>`),
26
- _tmpl$9 = /*#__PURE__*/_$template(`<input type=hidden>`),
27
- _tmpl$0 = /*#__PURE__*/_$template(`<div class=k2b-choice-status data-tone=danger><span></span><button type=button>`),
28
- _tmpl$1 = /*#__PURE__*/_$template(`<div class=k2b-choice-status>`),
29
- _tmpl$10 = /*#__PURE__*/_$template(`<button type=button class=k2b-choice-option role=option><!$><!/><span><strong></strong><!$><!/>`),
30
- _tmpl$11 = /*#__PURE__*/_$template(`<small>`);
24
+ _tmpl$7 = /*#__PURE__*/_$template(`<span class=k2b-choice-dot data-empty=true aria-hidden=true>`),
25
+ _tmpl$8 = /*#__PURE__*/_$template(`<i aria-hidden=true>`),
26
+ _tmpl$9 = /*#__PURE__*/_$template(`<span class=k2b-choice-dot aria-hidden=true>`),
27
+ _tmpl$0 = /*#__PURE__*/_$template(`<input type=hidden>`),
28
+ _tmpl$1 = /*#__PURE__*/_$template(`<div class=k2b-choice-status data-tone=danger><span></span><button type=button>`),
29
+ _tmpl$10 = /*#__PURE__*/_$template(`<div class=k2b-choice-status>`),
30
+ _tmpl$11 = /*#__PURE__*/_$template(`<button type=button class=k2b-choice-option role=option><!$><!/><span><strong></strong><!$><!/>`),
31
+ _tmpl$12 = /*#__PURE__*/_$template(`<small>`);
31
32
  import { createMemo, createSignal, For, Show } from "solid-js";
32
33
  import { createFieldMeta, Field, fieldControlAria } from "../internal/field";
33
34
  import { useUiMessages } from "../intl/messages";
34
35
  import { ChoiceGroups } from "./ChoiceGroups";
35
36
  import { createChoiceLoader, createChoicePopover, filterChoiceOptions, nextEnabledChoiceIndex } from "./choice";
36
37
  import { commitFieldValue, resolveMaybeAccessor } from "./field-contract";
38
+
39
+ /**
40
+ * `field` draws the boxed form control. `plain` shows the value as text for
41
+ * property rows: no box, no chevron, and a quiet surface on hover or while
42
+ * open. Its surface and hit area cover the nearest positioned ancestor, such as
43
+ * a `DescriptionList` row, so the whole row opens the picker.
44
+ */
45
+
46
+ /** The list entry that clears a plain select. It cannot collide with a real option value. */
47
+ const CLEAR_VALUE = "\u0000k2b-select-clear";
37
48
  const normalize = option => typeof option === "string" ? {
38
49
  value: option,
39
50
  label: option
@@ -75,6 +86,19 @@ export function Select(props) {
75
86
  // Remote loaders filter server-side; a static list has to be filtered here or
76
87
  // the search field would render but do nothing.
77
88
  const options = createMemo(() => isAsync() || !props.searchable ? groupedOptions() : props.filterOptions ? [...props.filterOptions(groupedOptions(), query())] : filterChoiceOptions(groupedOptions(), query()));
89
+ const plain = () => props.appearance === "plain";
90
+ // A plain select has no room for a clear button beside its value, so
91
+ // clearing becomes the last list entry, named by the placeholder.
92
+ const clearOption = createMemo(() => plain() && props.clearable && !query() ? {
93
+ value: CLEAR_VALUE,
94
+ label: props.placeholder ?? messages().clearSelection
95
+ } : undefined);
96
+ const listOptions = createMemo(() => {
97
+ const clear = clearOption();
98
+ return clear && !loader.error() ? [...options(), clear] : options();
99
+ });
100
+ // Colour dots mark the options, so an empty plain value keeps the column with a hollow dot.
101
+ const emptyDot = () => plain() && !props.placeholderIcon && sourceOptions().some(option => option.color);
78
102
  const selected = createMemo(() => {
79
103
  const current = value();
80
104
  if (current === null) return undefined;
@@ -85,29 +109,29 @@ export function Select(props) {
85
109
  label: props.selectedLabel?.() ?? current
86
110
  };
87
111
  });
88
- const hasClearAction = () => Boolean(props.clearable && selected() && !props.disabled);
112
+ const hasClearAction = () => Boolean(props.clearable && selected() && !props.disabled && !plain());
89
113
  const accessibleLabel = () => props["aria-label"] ?? (typeof props.label === "string" ? undefined : props.placeholder ?? messages().selectOption);
90
114
  const popover = createChoicePopover(() => Boolean(props.disabled));
91
- const focusedOption = () => options()[focusedIndex()];
115
+ const focusedOption = () => listOptions()[focusedIndex()];
92
116
  const focus = index => {
93
117
  setFocusedIndex(index);
94
118
  optionRefs[index]?.scrollIntoView({
95
119
  block: "nearest"
96
120
  });
97
121
  };
98
- const move = direction => focus(nextEnabledChoiceIndex(options(), focusedIndex(), direction));
122
+ const move = direction => focus(nextEnabledChoiceIndex(listOptions(), focusedIndex(), direction));
99
123
  const chooseGroup = group => {
100
124
  if (group === activeGroup()) return;
101
125
  setSelectedGroup(group);
102
- setFocusedIndex(nextEnabledChoiceIndex(options(), -1, 1));
126
+ setFocusedIndex(nextEnabledChoiceIndex(listOptions(), -1, 1));
103
127
  if (isAsync()) loader.load(query(), true);
104
128
  };
105
129
  const open = () => {
106
130
  if (props.disabled) return;
107
131
  setQuery("");
108
132
  if (isAsync()) loader.load("", true);
109
- const selectedIndex = options().findIndex(option => option.value === value());
110
- focus(selectedIndex >= 0 ? selectedIndex : nextEnabledChoiceIndex(options(), -1, 1));
133
+ const selectedIndex = listOptions().findIndex(option => option.value === (value() ?? CLEAR_VALUE));
134
+ focus(selectedIndex >= 0 ? selectedIndex : nextEnabledChoiceIndex(listOptions(), -1, 1));
111
135
  popover.show();
112
136
  if (isSearchable()) queueMicrotask(() => searchRef?.focus());
113
137
  };
@@ -123,6 +147,10 @@ export function Select(props) {
123
147
  const select = option => {
124
148
  if (option.disabled) return;
125
149
  close(true);
150
+ if (option.value === CLEAR_VALUE) {
151
+ commitFieldValue(props, null);
152
+ return;
153
+ }
126
154
  setCache({
127
155
  ...cache(),
128
156
  [option.value]: option
@@ -224,25 +252,54 @@ export function Select(props) {
224
252
  }), false, true);
225
253
  _$insert(_el$2, _$createComponent(Show, {
226
254
  get when() {
227
- return selected()?.color;
255
+ return selected();
228
256
  },
229
257
  get fallback() {
230
258
  return _$createComponent(Show, {
231
259
  get when() {
232
- return selected()?.icon;
260
+ return props.placeholderIcon;
261
+ },
262
+ get fallback() {
263
+ return _$createComponent(Show, {
264
+ get when() {
265
+ return emptyDot();
266
+ },
267
+ get children() {
268
+ return _$getNextElement(_tmpl$7);
269
+ }
270
+ });
233
271
  },
234
272
  children: icon => (() => {
235
- var _el$35 = _$getNextElement(_tmpl$7);
236
- _$effect(() => _$className(_el$35, icon()));
237
- return _el$35;
273
+ var _el$36 = _$getNextElement(_tmpl$8);
274
+ _$effect(() => _$className(_el$36, `${icon()} k2b-choice-trigger__placeholder-icon`));
275
+ return _el$36;
238
276
  })()
239
277
  });
240
278
  },
241
- children: color => (() => {
242
- var _el$36 = _$getNextElement(_tmpl$8);
243
- _$effect(_$p => _$setStyleProperty(_el$36, "background-color", color()));
244
- return _el$36;
245
- })()
279
+ get children() {
280
+ return _$createComponent(Show, {
281
+ get when() {
282
+ return selected()?.color;
283
+ },
284
+ get fallback() {
285
+ return _$createComponent(Show, {
286
+ get when() {
287
+ return selected()?.icon;
288
+ },
289
+ children: icon => (() => {
290
+ var _el$37 = _$getNextElement(_tmpl$8);
291
+ _$effect(() => _$className(_el$37, icon()));
292
+ return _el$37;
293
+ })()
294
+ });
295
+ },
296
+ children: color => (() => {
297
+ var _el$38 = _$getNextElement(_tmpl$9);
298
+ _$effect(_$p => _$setStyleProperty(_el$38, "background-color", color()));
299
+ return _el$38;
300
+ })()
301
+ });
302
+ }
246
303
  }), _el$6, _co$);
247
304
  _$insert(_el$3, () => selected()?.label ?? props.placeholder ?? messages().select);
248
305
  _$insert(_el$, _$createComponent(Show, {
@@ -250,10 +307,10 @@ export function Select(props) {
250
307
  return props.name;
251
308
  },
252
309
  children: name => (() => {
253
- var _el$37 = _$getNextElement(_tmpl$9);
254
- _$effect(() => _$setAttribute(_el$37, "name", name()));
255
- _$effect(() => _$setProperty(_el$37, "value", value() ?? ""));
256
- return _el$37;
310
+ var _el$39 = _$getNextElement(_tmpl$0);
311
+ _$effect(() => _$setAttribute(_el$39, "name", name()));
312
+ _$effect(() => _$setProperty(_el$39, "value", value() ?? ""));
313
+ return _el$39;
257
314
  })()
258
315
  }), _el$32, _co$9);
259
316
  _$insert(_el$, _$createComponent(Show, {
@@ -367,14 +424,14 @@ export function Select(props) {
367
424
  return loader.error();
368
425
  },
369
426
  children: message => (() => {
370
- var _el$38 = _$getNextElement(_tmpl$0),
371
- _el$39 = _el$38.firstChild,
372
- _el$40 = _el$39.nextSibling;
373
- _$insert(_el$39, message);
374
- _$addEventListener(_el$40, "click", loader.retry, true);
375
- _$insert(_el$40, () => messages().retry);
427
+ var _el$40 = _$getNextElement(_tmpl$1),
428
+ _el$41 = _el$40.firstChild,
429
+ _el$42 = _el$41.nextSibling;
430
+ _$insert(_el$41, message);
431
+ _$addEventListener(_el$42, "click", loader.retry, true);
432
+ _$insert(_el$42, () => messages().retry);
376
433
  _$runHydrationEvents();
377
- return _el$38;
434
+ return _el$40;
378
435
  })()
379
436
  }), _el$22, _co$4);
380
437
  _$insert(_el$17, _$createComponent(Show, {
@@ -391,7 +448,7 @@ export function Select(props) {
391
448
  }), _el$24, _co$5);
392
449
  _$insert(_el$17, _$createComponent(For, {
393
450
  get each() {
394
- return _$memo(() => !!loader.error())() ? [] : options();
451
+ return _$memo(() => !!loader.error())() ? [] : listOptions();
395
452
  },
396
453
  get fallback() {
397
454
  return _$createComponent(Show, {
@@ -399,95 +456,129 @@ export function Select(props) {
399
456
  return _$memo(() => !!!loader.loading())() && !loader.error();
400
457
  },
401
458
  get children() {
402
- var _el$41 = _$getNextElement(_tmpl$1);
403
- _$insert(_el$41, (() => {
459
+ var _el$43 = _$getNextElement(_tmpl$10);
460
+ _$insert(_el$43, (() => {
404
461
  var _c$ = _$memo(() => !!isSearchable());
405
462
  return () => _c$() ? messages().noResults : messages().noOptions;
406
463
  })());
407
- return _el$41;
464
+ return _el$43;
408
465
  }
409
466
  });
410
467
  },
411
468
  children: (option, index) => (() => {
412
- var _el$42 = _$getNextElement(_tmpl$10),
413
- _el$47 = _el$42.firstChild,
414
- [_el$48, _co$10] = _$getNextMarker(_el$47.nextSibling),
415
- _el$43 = _el$48.nextSibling,
416
- _el$44 = _el$43.firstChild,
417
- _el$45 = _el$44.nextSibling,
418
- [_el$46, _co$1] = _$getNextMarker(_el$45.nextSibling);
419
- _el$42.$$click = () => select(option);
420
- _el$42.$$pointermove = () => focus(index());
421
- _$use(element => optionRefs[index()] = element, _el$42);
422
- _$insert(_el$42, _$createComponent(Show, {
469
+ var _el$44 = _$getNextElement(_tmpl$11),
470
+ _el$49 = _el$44.firstChild,
471
+ [_el$50, _co$10] = _$getNextMarker(_el$49.nextSibling),
472
+ _el$45 = _el$50.nextSibling,
473
+ _el$46 = _el$45.firstChild,
474
+ _el$47 = _el$46.nextSibling,
475
+ [_el$48, _co$1] = _$getNextMarker(_el$47.nextSibling);
476
+ _el$44.$$click = () => select(option);
477
+ _el$44.$$pointermove = () => focus(index());
478
+ _$use(element => optionRefs[index()] = element, _el$44);
479
+ _$insert(_el$44, _$createComponent(Show, {
423
480
  get when() {
424
- return option.color;
481
+ return option.value === CLEAR_VALUE;
425
482
  },
426
483
  get fallback() {
427
484
  return _$createComponent(Show, {
428
485
  get when() {
429
- return option.icon;
486
+ return option.color;
430
487
  },
431
- children: icon => (() => {
432
- var _el$49 = _$getNextElement(_tmpl$7);
433
- _$effect(() => _$className(_el$49, icon()));
434
- return _el$49;
488
+ get fallback() {
489
+ return _$createComponent(Show, {
490
+ get when() {
491
+ return option.icon;
492
+ },
493
+ children: icon => (() => {
494
+ var _el$51 = _$getNextElement(_tmpl$8);
495
+ _$effect(() => _$className(_el$51, icon()));
496
+ return _el$51;
497
+ })()
498
+ });
499
+ },
500
+ children: color => (() => {
501
+ var _el$52 = _$getNextElement(_tmpl$9);
502
+ _$effect(_$p => _$setStyleProperty(_el$52, "background-color", color()));
503
+ return _el$52;
435
504
  })()
436
505
  });
437
506
  },
438
- children: color => (() => {
439
- var _el$50 = _$getNextElement(_tmpl$8);
440
- _$effect(_$p => _$setStyleProperty(_el$50, "background-color", color()));
441
- return _el$50;
442
- })()
443
- }), _el$48, _co$10);
444
- _$insert(_el$44, () => option.label);
445
- _$insert(_el$43, _$createComponent(Show, {
507
+ get children() {
508
+ return _$createComponent(Show, {
509
+ get when() {
510
+ return props.placeholderIcon;
511
+ },
512
+ get fallback() {
513
+ return _$createComponent(Show, {
514
+ get when() {
515
+ return emptyDot();
516
+ },
517
+ get children() {
518
+ return _$getNextElement(_tmpl$7);
519
+ }
520
+ });
521
+ },
522
+ children: icon => (() => {
523
+ var _el$54 = _$getNextElement(_tmpl$8);
524
+ _$effect(() => _$className(_el$54, icon()));
525
+ return _el$54;
526
+ })()
527
+ });
528
+ }
529
+ }), _el$50, _co$10);
530
+ _$insert(_el$46, () => option.label);
531
+ _$insert(_el$45, _$createComponent(Show, {
446
532
  get when() {
447
533
  return option.description;
448
534
  },
449
535
  children: description => (() => {
450
- var _el$51 = _$getNextElement(_tmpl$11);
451
- _$insert(_el$51, description);
452
- return _el$51;
536
+ var _el$55 = _$getNextElement(_tmpl$12);
537
+ _$insert(_el$55, description);
538
+ return _el$55;
453
539
  })()
454
- }), _el$46, _co$1);
540
+ }), _el$48, _co$1);
455
541
  _$effect(_p$ => {
456
- var _v$10 = `${listboxId}-${index()}`,
457
- _v$11 = option.label,
458
- _v$12 = option.value === value(),
459
- _v$13 = index() === focusedIndex() ? "true" : undefined,
460
- _v$14 = option.disabled;
461
- _v$10 !== _p$.e && _$setAttribute(_el$42, "id", _p$.e = _v$10);
462
- _v$11 !== _p$.t && _$setAttribute(_el$42, "aria-label", _p$.t = _v$11);
463
- _v$12 !== _p$.a && _$setAttribute(_el$42, "aria-selected", _p$.a = _v$12);
464
- _v$13 !== _p$.o && _$setAttribute(_el$42, "data-focused", _p$.o = _v$13);
465
- _v$14 !== _p$.i && _$setProperty(_el$42, "disabled", _p$.i = _v$14);
542
+ var _v$11 = `${listboxId}-${index()}`,
543
+ _v$12 = option.label,
544
+ _v$13 = option.value === (value() ?? CLEAR_VALUE),
545
+ _v$14 = index() === focusedIndex() ? "true" : undefined,
546
+ _v$15 = option.value === CLEAR_VALUE ? "true" : undefined,
547
+ _v$16 = option.disabled;
548
+ _v$11 !== _p$.e && _$setAttribute(_el$44, "id", _p$.e = _v$11);
549
+ _v$12 !== _p$.t && _$setAttribute(_el$44, "aria-label", _p$.t = _v$12);
550
+ _v$13 !== _p$.a && _$setAttribute(_el$44, "aria-selected", _p$.a = _v$13);
551
+ _v$14 !== _p$.o && _$setAttribute(_el$44, "data-focused", _p$.o = _v$14);
552
+ _v$15 !== _p$.i && _$setAttribute(_el$44, "data-clear", _p$.i = _v$15);
553
+ _v$16 !== _p$.n && _$setProperty(_el$44, "disabled", _p$.n = _v$16);
466
554
  return _p$;
467
555
  }, {
468
556
  e: undefined,
469
557
  t: undefined,
470
558
  a: undefined,
471
559
  o: undefined,
472
- i: undefined
560
+ i: undefined,
561
+ n: undefined
473
562
  });
474
563
  _$runHydrationEvents();
475
- return _el$42;
564
+ return _el$44;
476
565
  })()
477
566
  }), _el$26, _co$6);
478
567
  _$effect(_p$ => {
479
- var _v$6 = error() ? "true" : undefined,
480
- _v$7 = selected() ? undefined : "true",
481
- _v$8 = popover.open() ? props.activeIcon ?? "ti ti-chevron-up" : props.icon ?? "ti ti-chevron-down",
482
- _v$9 = typeof props.label === "string" ? props.label : props["aria-label"] ?? messages().options,
483
- _v$0 = activeView(),
484
- _v$1 = activeView() === "grid" ? props.gridSize ?? "md" : undefined;
485
- _v$6 !== _p$.e && _$setAttribute(_el$, "data-invalid", _p$.e = _v$6);
486
- _v$7 !== _p$.t && _$setAttribute(_el$3, "data-placeholder", _p$.t = _v$7);
487
- _v$8 !== _p$.a && _$className(_el$4, _p$.a = _v$8);
488
- _v$9 !== _p$.o && _$setAttribute(_el$8, "aria-label", _p$.o = _v$9);
489
- _v$0 !== _p$.i && _$setAttribute(_el$17, "data-view", _p$.i = _v$0);
490
- _v$1 !== _p$.n && _$setAttribute(_el$17, "data-grid-size", _p$.n = _v$1);
568
+ var _v$6 = props.appearance ?? "field",
569
+ _v$7 = error() ? "true" : undefined,
570
+ _v$8 = selected() ? undefined : "true",
571
+ _v$9 = `${popover.open() ? props.activeIcon ?? "ti ti-chevron-up" : props.icon ?? "ti ti-chevron-down"} k2b-choice-trigger__chevron`,
572
+ _v$0 = typeof props.label === "string" ? props.label : props["aria-label"] ?? messages().options,
573
+ _v$1 = activeView(),
574
+ _v$10 = activeView() === "grid" ? props.gridSize ?? "md" : undefined;
575
+ _v$6 !== _p$.e && _$setAttribute(_el$, "data-appearance", _p$.e = _v$6);
576
+ _v$7 !== _p$.t && _$setAttribute(_el$, "data-invalid", _p$.t = _v$7);
577
+ _v$8 !== _p$.a && _$setAttribute(_el$3, "data-placeholder", _p$.a = _v$8);
578
+ _v$9 !== _p$.o && _$className(_el$4, _p$.o = _v$9);
579
+ _v$0 !== _p$.i && _$setAttribute(_el$8, "aria-label", _p$.i = _v$0);
580
+ _v$1 !== _p$.n && _$setAttribute(_el$17, "data-view", _p$.n = _v$1);
581
+ _v$10 !== _p$.s && _$setAttribute(_el$17, "data-grid-size", _p$.s = _v$10);
491
582
  return _p$;
492
583
  }, {
493
584
  e: undefined,
@@ -495,7 +586,8 @@ export function Select(props) {
495
586
  a: undefined,
496
587
  o: undefined,
497
588
  i: undefined,
498
- n: undefined
589
+ n: undefined,
590
+ s: undefined
499
591
  });
500
592
  _$runHydrationEvents();
501
593
  return _el$;
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["inputs/Select.tsx"],"sourcesContent":["import { createMemo, createSignal, For, type JSX, Show } from \"solid-js\";\nimport { createFieldMeta, Field, fieldControlAria } from \"../internal/field\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { ChoiceGroups } from \"./ChoiceGroups\";\nimport { type ChoiceOption, createChoiceLoader, createChoicePopover, filterChoiceOptions, nextEnabledChoiceIndex } from \"./choice\";\nimport type { ValueFieldProps } from \"./field-contract\";\nimport { commitFieldValue, resolveMaybeAccessor } from \"./field-contract\";\n\nexport type SelectOption = ChoiceOption<string>;\nexport type SelectGroup = {\n value: string;\n label: string;\n};\nexport type SelectView = \"list\" | \"grid\";\nexport type SelectGridSize = \"sm\" | \"md\" | \"lg\";\nexport type SelectSourceOption =\n | string\n | {\n id: string;\n label?: string;\n description?: string;\n icon?: string;\n color?: string;\n groups?: readonly string[];\n }\n | SelectOption;\n\nexport type SelectProps = ValueFieldProps<string | null> & {\n placeholder?: string;\n icon?: string;\n activeIcon?: string;\n options?: SelectSourceOption[];\n fetchData?: (query: string, signal: AbortSignal, group: string | null) => Promise<SelectSourceOption[]>;\n loadOptions?: (query: string, signal: AbortSignal, group: string | null) => Promise<readonly ChoiceOption<string>[]>;\n selectedOption?: ChoiceOption<string>;\n selectedLabel?: () => string | undefined;\n fetchDebounceMs?: number;\n debounceMs?: number;\n searchable?: boolean;\n /** Optional synchronous filter for static options. */\n filterOptions?: (options: readonly SelectOption[], query: string) => readonly SelectOption[];\n /** Optional filters. An option may belong to more than one group. */\n groups?: readonly SelectGroup[];\n /** Group selected when the component is created. Omit to start with all options. */\n defaultGroup?: string;\n groupsAriaLabel?: string;\n allGroupLabel?: string;\n /** Show a local list/grid layout toggle in the dropdown. */\n viewToggle?: boolean;\n /** Initial dropdown layout when `viewToggle` is enabled. */\n defaultView?: SelectView;\n /** Tile density for the grid layout. */\n gridSize?: SelectGridSize;\n searchPlaceholder?: string;\n clearable?: boolean;\n name?: string;\n};\n\ntype NormalizedOption = ChoiceOption<string>;\nconst normalize = (option: SelectSourceOption): NormalizedOption =>\n typeof option === \"string\"\n ? { value: option, label: option }\n : \"value\" in option\n ? option\n : { ...option, value: option.id, label: option.label || option.id };\n\nexport function Select(props: SelectProps): JSX.Element {\n const messages = useUiMessages();\n const meta = createFieldMeta(props.id);\n const listboxId = `${meta.controlId}-listbox`;\n const [query, setQuery] = createSignal(\"\");\n const [focusedIndex, setFocusedIndex] = createSignal(-1);\n const [cache, setCache] = createSignal<Record<string, NormalizedOption>>({});\n const [selectedGroup, setSelectedGroup] = createSignal<string | null>(props.defaultGroup ?? null);\n const [selectedView, setSelectedView] = createSignal<SelectView>(props.defaultView ?? \"list\");\n let searchRef: HTMLInputElement | undefined;\n let optionRefs: HTMLButtonElement[] = [];\n const value = () => resolveMaybeAccessor(props.value) ?? null;\n const error = () => resolveMaybeAccessor(props.error);\n const activeGroup = createMemo(() => {\n const current = selectedGroup();\n return current && props.groups?.some((group) => group.value === current) ? current : null;\n });\n const groupChoices = createMemo(() => [{ value: null, label: props.allGroupLabel ?? messages().all }, ...(props.groups ?? [])]);\n const activeView = () => (props.viewToggle ? selectedView() : \"list\");\n\n const loader = createChoiceLoader(\n () =>\n props.fetchData\n ? async (value, signal) => (await props.fetchData!(value, signal, activeGroup())).map(normalize)\n : props.loadOptions\n ? (value, signal) => props.loadOptions!(value, signal, activeGroup())\n : undefined,\n () => props.fetchDebounceMs ?? props.debounceMs ?? 200,\n );\n const isAsync = () => Boolean(props.fetchData || props.loadOptions);\n const isSearchable = () => isAsync() || Boolean(props.searchable);\n const sourceOptions = createMemo(() => (isAsync() ? loader.options() : (props.options ?? []).map(normalize)));\n const groupedOptions = createMemo(() => {\n const group = activeGroup();\n return !isAsync() && group ? sourceOptions().filter((option) => option.groups?.includes(group)) : sourceOptions();\n });\n // Remote loaders filter server-side; a static list has to be filtered here or\n // the search field would render but do nothing.\n const options = createMemo(() =>\n isAsync() || !props.searchable\n ? groupedOptions()\n : props.filterOptions\n ? [...props.filterOptions(groupedOptions(), query())]\n : filterChoiceOptions(groupedOptions(), query()),\n );\n const selected = createMemo(() => {\n const current = value();\n if (current === null) return undefined;\n // Resolve against the unfiltered list so typing in the search field never\n // blanks the trigger label of the current selection.\n return (\n sourceOptions().find((option) => option.value === current) ??\n cache()[current] ??\n (props.selectedOption?.value === current ? props.selectedOption : undefined) ?? {\n value: current,\n label: props.selectedLabel?.() ?? current,\n }\n );\n });\n const hasClearAction = () => Boolean(props.clearable && selected() && !props.disabled);\n const accessibleLabel = () =>\n props[\"aria-label\"] ?? (typeof props.label === \"string\" ? undefined : (props.placeholder ?? messages().selectOption));\n const popover = createChoicePopover(() => Boolean(props.disabled));\n const focusedOption = () => options()[focusedIndex()];\n const focus = (index: number) => {\n setFocusedIndex(index);\n optionRefs[index]?.scrollIntoView({ block: \"nearest\" });\n };\n const move = (direction: 1 | -1) => focus(nextEnabledChoiceIndex(options(), focusedIndex(), direction));\n const chooseGroup = (group: string | null) => {\n if (group === activeGroup()) return;\n setSelectedGroup(group);\n setFocusedIndex(nextEnabledChoiceIndex(options(), -1, 1));\n if (isAsync()) loader.load(query(), true);\n };\n const open = () => {\n if (props.disabled) return;\n setQuery(\"\");\n if (isAsync()) loader.load(\"\", true);\n const selectedIndex = options().findIndex((option) => option.value === value());\n focus(selectedIndex >= 0 ? selectedIndex : nextEnabledChoiceIndex(options(), -1, 1));\n popover.show();\n if (isSearchable()) queueMicrotask(() => searchRef?.focus());\n };\n const close = (restoreFocus = false) => {\n // Hide the top-layer surface before any reactive cleanup or consumer\n // callback can rerender its contents. Selection must feel atomic: the old\n // listbox must never remain visible with the next value.\n popover.hide(restoreFocus);\n loader.cancel();\n setQuery(\"\");\n setFocusedIndex(-1);\n };\n const select = (option: NormalizedOption) => {\n if (option.disabled) return;\n close(true);\n setCache({ ...cache(), [option.value]: option });\n commitFieldValue(props, option.value);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n const inToolbar = Boolean((event.target as HTMLElement | null)?.closest?.(\".k2b-choice-toolbar\"));\n if (inToolbar && event.key !== \"Escape\" && event.key !== \"Tab\") return;\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n if (!popover.open()) open();\n else move(event.key === \"ArrowDown\" ? 1 : -1);\n } else if ((event.key === \"Enter\" || event.key === \" \") && !popover.open()) {\n event.preventDefault();\n open();\n } else if (event.key === \"Enter\" && focusedOption()) {\n event.preventDefault();\n select(focusedOption()!);\n } else if (event.key === \"Escape\" && popover.open()) {\n // Only swallow Escape while the list is open — a closed select must let\n // the key bubble to an enclosing dialog or drawer.\n event.preventDefault();\n close(true);\n } else if (event.key === \"Tab\" && popover.open()) close();\n };\n const clear = (event: MouseEvent) => {\n event.stopPropagation();\n commitFieldValue(props, null);\n popover.trigger()?.focus();\n };\n\n return (\n <Field\n class={props.class}\n label={props.label}\n description={props.description}\n error={error()}\n meta={meta}\n required={props.required}\n disabled={props.disabled}\n >\n <div class=\"k2b-choice-control\" data-invalid={error() ? \"true\" : undefined}>\n <button\n ref={popover.setTrigger}\n id={meta.controlId}\n type=\"button\"\n class=\"k2b-choice-trigger\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={popover.open()}\n aria-controls={listboxId}\n aria-activedescendant={focusedOption() ? `${listboxId}-${focusedIndex()}` : undefined}\n data-clearable={hasClearAction() ? \"true\" : undefined}\n {...fieldControlAria(meta, {\n ...props,\n \"aria-label\": accessibleLabel(),\n })}\n disabled={props.disabled}\n onClick={() => (popover.open() ? close() : open())}\n onKeyDown={onKeyDown}\n >\n <Show\n when={selected()?.color}\n fallback={<Show when={selected()?.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}\n >\n {(color) => <span class=\"k2b-choice-dot\" style={{ \"background-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n <span class=\"k2b-choice-trigger__value\" data-placeholder={selected() ? undefined : \"true\"}>\n {selected()?.label ?? props.placeholder ?? messages().select}\n </span>\n <i class={popover.open() ? (props.activeIcon ?? \"ti ti-chevron-up\") : (props.icon ?? \"ti ti-chevron-down\")} aria-hidden=\"true\" />\n </button>\n <Show when={props.name}>{(name) => <input type=\"hidden\" name={name()} value={value() ?? \"\"} />}</Show>\n <Show when={hasClearAction()}>\n <button\n type=\"button\"\n class=\"k2b-choice-control__clear k2b-input-clear-action\"\n aria-label={messages().clearSelection}\n onClick={clear}\n >\n <i class=\"ti ti-x\" aria-hidden=\"true\" />\n </button>\n </Show>\n <div\n ref={popover.setPopover}\n popover=\"manual\"\n class=\"k2b-choice-popover\"\n role=\"group\"\n onKeyDown={onKeyDown}\n aria-label={typeof props.label === \"string\" ? props.label : (props[\"aria-label\"] ?? messages().options)}\n >\n <Show when={isSearchable()}>\n <div class=\"k2b-choice-search\">\n <i class=\"ti ti-search\" aria-hidden=\"true\" />\n <input\n ref={searchRef}\n type=\"search\"\n value={query()}\n placeholder={props.searchPlaceholder ?? messages().search}\n aria-label={props.searchPlaceholder ?? messages().searchOptions}\n aria-controls={listboxId}\n aria-activedescendant={focusedOption() ? `${listboxId}-${focusedIndex()}` : undefined}\n onInput={(event) => {\n setQuery(event.currentTarget.value);\n if (isAsync()) loader.load(event.currentTarget.value);\n focus(isAsync() ? -1 : nextEnabledChoiceIndex(options(), -1, 1));\n }}\n />\n </div>\n </Show>\n <Show when={(props.groups?.length ?? 0) > 0 || props.viewToggle}>\n <div class=\"k2b-choice-toolbar\">\n <Show when={(props.groups?.length ?? 0) > 0}>\n <ChoiceGroups\n choices={groupChoices()}\n value={activeGroup()}\n onValueChange={chooseGroup}\n ariaLabel={props.groupsAriaLabel ?? messages().filterOptions}\n controls={listboxId}\n />\n </Show>\n <Show when={props.viewToggle}>\n <button\n type=\"button\"\n class=\"k2b-choice-view-toggle\"\n aria-label={activeView() === \"list\" ? messages().showGridView : messages().showListView}\n aria-controls={listboxId}\n onClick={() => setSelectedView(activeView() === \"list\" ? \"grid\" : \"list\")}\n >\n <i class={activeView() === \"list\" ? \"ti ti-category-2\" : \"ti ti-list-details\"} aria-hidden=\"true\" />\n </button>\n </Show>\n </div>\n </Show>\n <div\n id={listboxId}\n class=\"k2b-choice-options\"\n role=\"listbox\"\n data-view={activeView()}\n data-grid-size={activeView() === \"grid\" ? (props.gridSize ?? \"md\") : undefined}\n >\n <Show when={loader.error()}>\n {(message) => (\n <div class=\"k2b-choice-status\" data-tone=\"danger\">\n <span>{message()}</span>\n <button type=\"button\" onClick={loader.retry}>\n {messages().retry}\n </button>\n </div>\n )}\n </Show>\n <Show when={loader.loading() && options().length === 0}>\n <div class=\"k2b-choice-status\">\n <i class=\"ti ti-loader-2 k2b-spin\" aria-hidden=\"true\" />\n <span>{messages().loading}</span>\n </div>\n </Show>\n <For\n each={loader.error() ? [] : options()}\n fallback={\n <Show when={!loader.loading() && !loader.error()}>\n <div class=\"k2b-choice-status\">{isSearchable() ? messages().noResults : messages().noOptions}</div>\n </Show>\n }\n >\n {(option, index) => (\n <button\n ref={(element) => (optionRefs[index()] = element)}\n type=\"button\"\n id={`${listboxId}-${index()}`}\n class=\"k2b-choice-option\"\n role=\"option\"\n aria-label={option.label}\n aria-selected={option.value === value()}\n data-focused={index() === focusedIndex() ? \"true\" : undefined}\n disabled={option.disabled}\n onPointerMove={() => focus(index())}\n onClick={() => select(option)}\n >\n <Show when={option.color} fallback={<Show when={option.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}>\n {(color) => <span class=\"k2b-choice-dot\" style={{ \"background-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n <span>\n <strong>{option.label}</strong>\n <Show when={option.description}>{(description) => <small>{description()}</small>}</Show>\n </span>\n </button>\n )}\n </For>\n </div>\n </div>\n </div>\n </Field>\n );\n}\n\nexport default Select;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,EAAE,YAAY,EAAE,GAAG,EAAY,IAAI,QAAQ,UAAU;AACxE,SAAS,eAAe,EAAE,KAAK,EAAE,gBAAgB,QAAQ,mBAAmB;AAC5E,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAA4B,kBAAkB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AU,CAAC,CAAC;UAAA,OACP,UAAU,CAAC,CAAC,KAAK,MAAM,GAAI,KAAK,CAAC,QAAQ,IAAI,IAAI,GAAI,SAAS;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;MAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;MAAA;MAAA;MAAA;IAAA;EAAA;AAuD1F;AAEA,eAAe,MAAM;AAAC","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["inputs/Select.tsx"],"sourcesContent":["import { createMemo, createSignal, For, type JSX, Show } from \"solid-js\";\nimport { createFieldMeta, Field, fieldControlAria } from \"../internal/field\";\nimport { useUiMessages } from \"../intl/messages\";\nimport { ChoiceGroups } from \"./ChoiceGroups\";\nimport { type ChoiceOption, createChoiceLoader, createChoicePopover, filterChoiceOptions, nextEnabledChoiceIndex } from \"./choice\";\nimport type { ValueFieldProps } from \"./field-contract\";\nimport { commitFieldValue, resolveMaybeAccessor } from \"./field-contract\";\n\nexport type SelectOption = ChoiceOption<string>;\nexport type SelectGroup = {\n value: string;\n label: string;\n};\nexport type SelectView = \"list\" | \"grid\";\nexport type SelectGridSize = \"sm\" | \"md\" | \"lg\";\n/**\n * `field` draws the boxed form control. `plain` shows the value as text for\n * property rows: no box, no chevron, and a quiet surface on hover or while\n * open. Its surface and hit area cover the nearest positioned ancestor, such as\n * a `DescriptionList` row, so the whole row opens the picker.\n */\nexport type ChoiceAppearance = \"field\" | \"plain\";\nexport type SelectSourceOption =\n | string\n | {\n id: string;\n label?: string;\n description?: string;\n icon?: string;\n color?: string;\n groups?: readonly string[];\n }\n | SelectOption;\n\nexport type SelectProps = ValueFieldProps<string | null> & {\n placeholder?: string;\n icon?: string;\n activeIcon?: string;\n options?: SelectSourceOption[];\n fetchData?: (query: string, signal: AbortSignal, group: string | null) => Promise<SelectSourceOption[]>;\n loadOptions?: (query: string, signal: AbortSignal, group: string | null) => Promise<readonly ChoiceOption<string>[]>;\n selectedOption?: ChoiceOption<string>;\n selectedLabel?: () => string | undefined;\n fetchDebounceMs?: number;\n debounceMs?: number;\n searchable?: boolean;\n /** Optional synchronous filter for static options. */\n filterOptions?: (options: readonly SelectOption[], query: string) => readonly SelectOption[];\n /** Optional filters. An option may belong to more than one group. */\n groups?: readonly SelectGroup[];\n /** Group selected when the component is created. Omit to start with all options. */\n defaultGroup?: string;\n groupsAriaLabel?: string;\n allGroupLabel?: string;\n /** Show a local list/grid layout toggle in the dropdown. */\n viewToggle?: boolean;\n /** Initial dropdown layout when `viewToggle` is enabled. */\n defaultView?: SelectView;\n /** Tile density for the grid layout. */\n gridSize?: SelectGridSize;\n searchPlaceholder?: string;\n clearable?: boolean;\n name?: string;\n appearance?: ChoiceAppearance;\n /** Icon class shown before the placeholder while nothing is selected. */\n placeholderIcon?: string;\n};\n\ntype NormalizedOption = ChoiceOption<string>;\n/** The list entry that clears a plain select. It cannot collide with a real option value. */\nconst CLEAR_VALUE = \"\\u0000k2b-select-clear\";\n\nconst normalize = (option: SelectSourceOption): NormalizedOption =>\n typeof option === \"string\"\n ? { value: option, label: option }\n : \"value\" in option\n ? option\n : { ...option, value: option.id, label: option.label || option.id };\n\nexport function Select(props: SelectProps): JSX.Element {\n const messages = useUiMessages();\n const meta = createFieldMeta(props.id);\n const listboxId = `${meta.controlId}-listbox`;\n const [query, setQuery] = createSignal(\"\");\n const [focusedIndex, setFocusedIndex] = createSignal(-1);\n const [cache, setCache] = createSignal<Record<string, NormalizedOption>>({});\n const [selectedGroup, setSelectedGroup] = createSignal<string | null>(props.defaultGroup ?? null);\n const [selectedView, setSelectedView] = createSignal<SelectView>(props.defaultView ?? \"list\");\n let searchRef: HTMLInputElement | undefined;\n let optionRefs: HTMLButtonElement[] = [];\n const value = () => resolveMaybeAccessor(props.value) ?? null;\n const error = () => resolveMaybeAccessor(props.error);\n const activeGroup = createMemo(() => {\n const current = selectedGroup();\n return current && props.groups?.some((group) => group.value === current) ? current : null;\n });\n const groupChoices = createMemo(() => [{ value: null, label: props.allGroupLabel ?? messages().all }, ...(props.groups ?? [])]);\n const activeView = () => (props.viewToggle ? selectedView() : \"list\");\n\n const loader = createChoiceLoader(\n () =>\n props.fetchData\n ? async (value, signal) => (await props.fetchData!(value, signal, activeGroup())).map(normalize)\n : props.loadOptions\n ? (value, signal) => props.loadOptions!(value, signal, activeGroup())\n : undefined,\n () => props.fetchDebounceMs ?? props.debounceMs ?? 200,\n );\n const isAsync = () => Boolean(props.fetchData || props.loadOptions);\n const isSearchable = () => isAsync() || Boolean(props.searchable);\n const sourceOptions = createMemo(() => (isAsync() ? loader.options() : (props.options ?? []).map(normalize)));\n const groupedOptions = createMemo(() => {\n const group = activeGroup();\n return !isAsync() && group ? sourceOptions().filter((option) => option.groups?.includes(group)) : sourceOptions();\n });\n // Remote loaders filter server-side; a static list has to be filtered here or\n // the search field would render but do nothing.\n const options = createMemo(() =>\n isAsync() || !props.searchable\n ? groupedOptions()\n : props.filterOptions\n ? [...props.filterOptions(groupedOptions(), query())]\n : filterChoiceOptions(groupedOptions(), query()),\n );\n const plain = () => props.appearance === \"plain\";\n // A plain select has no room for a clear button beside its value, so\n // clearing becomes the last list entry, named by the placeholder.\n const clearOption = createMemo<NormalizedOption | undefined>(() =>\n plain() && props.clearable && !query() ? { value: CLEAR_VALUE, label: props.placeholder ?? messages().clearSelection } : undefined,\n );\n const listOptions = createMemo(() => {\n const clear = clearOption();\n return clear && !loader.error() ? [...options(), clear] : options();\n });\n // Colour dots mark the options, so an empty plain value keeps the column with a hollow dot.\n const emptyDot = () => plain() && !props.placeholderIcon && sourceOptions().some((option) => option.color);\n const selected = createMemo(() => {\n const current = value();\n if (current === null) return undefined;\n // Resolve against the unfiltered list so typing in the search field never\n // blanks the trigger label of the current selection.\n return (\n sourceOptions().find((option) => option.value === current) ??\n cache()[current] ??\n (props.selectedOption?.value === current ? props.selectedOption : undefined) ?? {\n value: current,\n label: props.selectedLabel?.() ?? current,\n }\n );\n });\n const hasClearAction = () => Boolean(props.clearable && selected() && !props.disabled && !plain());\n const accessibleLabel = () =>\n props[\"aria-label\"] ?? (typeof props.label === \"string\" ? undefined : (props.placeholder ?? messages().selectOption));\n const popover = createChoicePopover(() => Boolean(props.disabled));\n const focusedOption = () => listOptions()[focusedIndex()];\n const focus = (index: number) => {\n setFocusedIndex(index);\n optionRefs[index]?.scrollIntoView({ block: \"nearest\" });\n };\n const move = (direction: 1 | -1) => focus(nextEnabledChoiceIndex(listOptions(), focusedIndex(), direction));\n const chooseGroup = (group: string | null) => {\n if (group === activeGroup()) return;\n setSelectedGroup(group);\n setFocusedIndex(nextEnabledChoiceIndex(listOptions(), -1, 1));\n if (isAsync()) loader.load(query(), true);\n };\n const open = () => {\n if (props.disabled) return;\n setQuery(\"\");\n if (isAsync()) loader.load(\"\", true);\n const selectedIndex = listOptions().findIndex((option) => option.value === (value() ?? CLEAR_VALUE));\n focus(selectedIndex >= 0 ? selectedIndex : nextEnabledChoiceIndex(listOptions(), -1, 1));\n popover.show();\n if (isSearchable()) queueMicrotask(() => searchRef?.focus());\n };\n const close = (restoreFocus = false) => {\n // Hide the top-layer surface before any reactive cleanup or consumer\n // callback can rerender its contents. Selection must feel atomic: the old\n // listbox must never remain visible with the next value.\n popover.hide(restoreFocus);\n loader.cancel();\n setQuery(\"\");\n setFocusedIndex(-1);\n };\n const select = (option: NormalizedOption) => {\n if (option.disabled) return;\n close(true);\n if (option.value === CLEAR_VALUE) {\n commitFieldValue(props, null);\n return;\n }\n setCache({ ...cache(), [option.value]: option });\n commitFieldValue(props, option.value);\n };\n const onKeyDown = (event: KeyboardEvent) => {\n const inToolbar = Boolean((event.target as HTMLElement | null)?.closest?.(\".k2b-choice-toolbar\"));\n if (inToolbar && event.key !== \"Escape\" && event.key !== \"Tab\") return;\n if (event.key === \"ArrowDown\" || event.key === \"ArrowUp\") {\n event.preventDefault();\n if (!popover.open()) open();\n else move(event.key === \"ArrowDown\" ? 1 : -1);\n } else if ((event.key === \"Enter\" || event.key === \" \") && !popover.open()) {\n event.preventDefault();\n open();\n } else if (event.key === \"Enter\" && focusedOption()) {\n event.preventDefault();\n select(focusedOption()!);\n } else if (event.key === \"Escape\" && popover.open()) {\n // Only swallow Escape while the list is open — a closed select must let\n // the key bubble to an enclosing dialog or drawer.\n event.preventDefault();\n close(true);\n } else if (event.key === \"Tab\" && popover.open()) close();\n };\n const clear = (event: MouseEvent) => {\n event.stopPropagation();\n commitFieldValue(props, null);\n popover.trigger()?.focus();\n };\n\n return (\n <Field\n class={props.class}\n label={props.label}\n description={props.description}\n error={error()}\n meta={meta}\n required={props.required}\n disabled={props.disabled}\n >\n <div class=\"k2b-choice-control\" data-appearance={props.appearance ?? \"field\"} data-invalid={error() ? \"true\" : undefined}>\n <button\n ref={popover.setTrigger}\n id={meta.controlId}\n type=\"button\"\n class=\"k2b-choice-trigger\"\n role=\"combobox\"\n aria-haspopup=\"listbox\"\n aria-expanded={popover.open()}\n aria-controls={listboxId}\n aria-activedescendant={focusedOption() ? `${listboxId}-${focusedIndex()}` : undefined}\n data-clearable={hasClearAction() ? \"true\" : undefined}\n {...fieldControlAria(meta, {\n ...props,\n \"aria-label\": accessibleLabel(),\n })}\n disabled={props.disabled}\n onClick={() => (popover.open() ? close() : open())}\n onKeyDown={onKeyDown}\n >\n <Show\n when={selected()}\n fallback={\n <Show\n when={props.placeholderIcon}\n fallback={<Show when={emptyDot()}>{<span class=\"k2b-choice-dot\" data-empty=\"true\" aria-hidden=\"true\" />}</Show>}\n >\n {(icon) => <i class={`${icon()} k2b-choice-trigger__placeholder-icon`} aria-hidden=\"true\" />}\n </Show>\n }\n >\n <Show\n when={selected()?.color}\n fallback={<Show when={selected()?.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}\n >\n {(color) => <span class=\"k2b-choice-dot\" style={{ \"background-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n </Show>\n <span class=\"k2b-choice-trigger__value\" data-placeholder={selected() ? undefined : \"true\"}>\n {selected()?.label ?? props.placeholder ?? messages().select}\n </span>\n <i\n class={`${popover.open() ? (props.activeIcon ?? \"ti ti-chevron-up\") : (props.icon ?? \"ti ti-chevron-down\")} k2b-choice-trigger__chevron`}\n aria-hidden=\"true\"\n />\n </button>\n <Show when={props.name}>{(name) => <input type=\"hidden\" name={name()} value={value() ?? \"\"} />}</Show>\n <Show when={hasClearAction()}>\n <button\n type=\"button\"\n class=\"k2b-choice-control__clear k2b-input-clear-action\"\n aria-label={messages().clearSelection}\n onClick={clear}\n >\n <i class=\"ti ti-x\" aria-hidden=\"true\" />\n </button>\n </Show>\n <div\n ref={popover.setPopover}\n popover=\"manual\"\n class=\"k2b-choice-popover\"\n role=\"group\"\n onKeyDown={onKeyDown}\n aria-label={typeof props.label === \"string\" ? props.label : (props[\"aria-label\"] ?? messages().options)}\n >\n <Show when={isSearchable()}>\n <div class=\"k2b-choice-search\">\n <i class=\"ti ti-search\" aria-hidden=\"true\" />\n <input\n ref={searchRef}\n type=\"search\"\n value={query()}\n placeholder={props.searchPlaceholder ?? messages().search}\n aria-label={props.searchPlaceholder ?? messages().searchOptions}\n aria-controls={listboxId}\n aria-activedescendant={focusedOption() ? `${listboxId}-${focusedIndex()}` : undefined}\n onInput={(event) => {\n setQuery(event.currentTarget.value);\n if (isAsync()) loader.load(event.currentTarget.value);\n focus(isAsync() ? -1 : nextEnabledChoiceIndex(options(), -1, 1));\n }}\n />\n </div>\n </Show>\n <Show when={(props.groups?.length ?? 0) > 0 || props.viewToggle}>\n <div class=\"k2b-choice-toolbar\">\n <Show when={(props.groups?.length ?? 0) > 0}>\n <ChoiceGroups\n choices={groupChoices()}\n value={activeGroup()}\n onValueChange={chooseGroup}\n ariaLabel={props.groupsAriaLabel ?? messages().filterOptions}\n controls={listboxId}\n />\n </Show>\n <Show when={props.viewToggle}>\n <button\n type=\"button\"\n class=\"k2b-choice-view-toggle\"\n aria-label={activeView() === \"list\" ? messages().showGridView : messages().showListView}\n aria-controls={listboxId}\n onClick={() => setSelectedView(activeView() === \"list\" ? \"grid\" : \"list\")}\n >\n <i class={activeView() === \"list\" ? \"ti ti-category-2\" : \"ti ti-list-details\"} aria-hidden=\"true\" />\n </button>\n </Show>\n </div>\n </Show>\n <div\n id={listboxId}\n class=\"k2b-choice-options\"\n role=\"listbox\"\n data-view={activeView()}\n data-grid-size={activeView() === \"grid\" ? (props.gridSize ?? \"md\") : undefined}\n >\n <Show when={loader.error()}>\n {(message) => (\n <div class=\"k2b-choice-status\" data-tone=\"danger\">\n <span>{message()}</span>\n <button type=\"button\" onClick={loader.retry}>\n {messages().retry}\n </button>\n </div>\n )}\n </Show>\n <Show when={loader.loading() && options().length === 0}>\n <div class=\"k2b-choice-status\">\n <i class=\"ti ti-loader-2 k2b-spin\" aria-hidden=\"true\" />\n <span>{messages().loading}</span>\n </div>\n </Show>\n <For\n each={loader.error() ? [] : listOptions()}\n fallback={\n <Show when={!loader.loading() && !loader.error()}>\n <div class=\"k2b-choice-status\">{isSearchable() ? messages().noResults : messages().noOptions}</div>\n </Show>\n }\n >\n {(option, index) => (\n <button\n ref={(element) => (optionRefs[index()] = element)}\n type=\"button\"\n id={`${listboxId}-${index()}`}\n class=\"k2b-choice-option\"\n role=\"option\"\n aria-label={option.label}\n aria-selected={option.value === (value() ?? CLEAR_VALUE)}\n data-focused={index() === focusedIndex() ? \"true\" : undefined}\n data-clear={option.value === CLEAR_VALUE ? \"true\" : undefined}\n disabled={option.disabled}\n onPointerMove={() => focus(index())}\n onClick={() => select(option)}\n >\n <Show\n when={option.value === CLEAR_VALUE}\n fallback={\n <Show\n when={option.color}\n fallback={<Show when={option.icon}>{(icon) => <i class={icon()} aria-hidden=\"true\" />}</Show>}\n >\n {(color) => <span class=\"k2b-choice-dot\" style={{ \"background-color\": color() }} aria-hidden=\"true\" />}\n </Show>\n }\n >\n <Show\n when={props.placeholderIcon}\n fallback={<Show when={emptyDot()}>{<span class=\"k2b-choice-dot\" data-empty=\"true\" aria-hidden=\"true\" />}</Show>}\n >\n {(icon) => <i class={icon()} aria-hidden=\"true\" />}\n </Show>\n </Show>\n <span>\n <strong>{option.label}</strong>\n <Show when={option.description}>{(description) => <small>{description()}</small>}</Show>\n </span>\n </button>\n )}\n </For>\n </div>\n </div>\n </div>\n </Field>\n );\n}\n\nexport default Select;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,UAAU,EAAE,YAAY,EAAE,GAAG,EAAY,IAAI,QAAQ,UAAU;AACxE,SAAS,eAAe,EAAE,KAAK,EAAE,gBAAgB,QAAQ,mBAAmB;AAC5E,SAAS,aAAa,QAAQ,kBAAkB;AAChD,SAAS,YAAY,QAAQ,gBAAgB;AAC7C,SAA4B,kBAAkB,EAAE,mBAAmB,EAAE,mBAAmB,EAAE,sBAAsB,QAAQ,UAAU;AAElI,SAAS,gBAAgB,EAAE,oBAAoB,QAAQ,kBAAkB;;AASzE;AACA;AACA;AACA;AACA;AACA;;AAiDA;AACA,MAAM,WAAW,GAAG,wBAAwB;AAE5C,MAAM,SAAS,GAAI,MAA0B,IAC3C,OAAO,MAAM,KAAK,QAAQ,GACtB;EAAE,KAAK,EAAE,MAAM;EAAE,KAAK,EAAE;AAAO,CAAC,GAChC,OAAO,IAAI,MAAM,GACf,MAAM,GACN;EAAE,GAAG,MAAM;EAAE,KAAK,EAAE,MAAM,CAAC,EAAE;EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,IAAI,MAAM,CAAC;AAAG,CAAC;AAEzE,OAAO,SAAS,MAAM,CAAC,KAAkB,EAAe;EACtD,MAAM,QAAQ,GAAG,aAAa,CAAC,CAAC;EAChC,MAAM,IAAI,GAAG,eAAe,CAAC,KAAK,CAAC,EAAE,CAAC;EACtC,MAAM,SAAS,GAAG,GAAG,IAAI,CAAC,SAAS,UAAU;EAC7C,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,YAAY,CAAC,EAAE,CAAC;EAC1C,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,YAAY,CAAC,CAAC,CAAC,CAAC;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,SAAS;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;MAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;QAAA;MAAA;MAAA;MAAA;IAAA;EAAA;AAuE1F;AAEA,eAAe,MAAM;AAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["inputs/index.ts"],"sourcesContent":["export type { AutocompleteEditorProps } from \"./AutocompleteEditor\";\nexport { AutocompleteEditor } from \"./AutocompleteEditor\";\nexport type {\n AutocompleteSelectOption,\n AutocompleteSelectProps,\n AutocompleteSelectSearchResult,\n} from \"./AutocompleteSelect\";\nexport { AutocompleteSelect } from \"./AutocompleteSelect\";\nexport type { CheckboxProps } from \"./Checkbox\";\nexport { Checkbox } from \"./Checkbox\";\nexport type { CheckboxCardProps } from \"./CheckboxCard\";\nexport { CheckboxCard } from \"./CheckboxCard\";\nexport type {\n ColorInputProps,\n PinInputProps,\n SliderProps,\n} from \"./ChoiceInputs\";\nexport { ColorInput, PinInput, Slider } from \"./ChoiceInputs\";\nexport type { ComboboxOption, ComboboxProps } from \"./Combobox\";\nexport { Combobox } from \"./Combobox\";\nexport type { ChoiceOption, ChoiceOptionsLoader } from \"./choice\";\nexport type {\n Completion,\n QueryContext,\n SuggestContext,\n Suggestion,\n} from \"./completion\";\nexport { abbreviations } from \"./completion\";\nexport type {\n DatePickerBaseProps,\n DatePickerProps,\n DatePreset,\n DateRangePickerProps,\n DateRangeValue,\n DateTimePickerProps,\n DurationPreset,\n} from \"./DatePicker\";\nexport { DatePicker, DateRangePicker, DateTimePicker } from \"./DatePicker\";\nexport type { FileDropzoneProps, ImageCropperProps, ImageInputProps } from \"./FileInputs\";\nexport { FileDropzone, ImageCropper, ImageInput } from \"./FileInputs\";\nexport type { DateContext, FieldProps, MaybeAccessor, ValueFieldProps } from \"./field-contract\";\nexport { DEFAULT_ICON_GROUPS, DEFAULT_ICON_OPTIONS } from \"./icon-options\";\nexport type {\n ImageCropAspect,\n ImageCropOutput,\n ImageCropRect,\n ImageCropRotation,\n ImageCropSize,\n ImageCropSource,\n ImageCropState,\n} from \"./image-crop\";\nexport {\n clampImageCropRect,\n createCroppedImageCanvas,\n createCroppedImageDataUrl,\n getInitialImageCropRect,\n imageCropRectToPixels,\n normalizeImageCropRotation,\n resizeImageCropAroundCenter,\n rotateImageCropRight,\n} from \"./image-crop\";\nexport type {\n MultiSelectFetchDataFn,\n MultiSelectInputProps,\n MultiSelectOption,\n} from \"./MultiSelectInput\";\nexport { MultiSelectInput } from \"./MultiSelectInput\";\nexport type { MarkdownEditorProps } from \"./markdown/MarkdownEditor\";\nexport { MarkdownEditor } from \"./markdown/MarkdownEditor\";\nexport type { NumberInputProps } from \"./NumberInput\";\nexport { NumberInput } from \"./NumberInput\";\nexport type { SelectGridSize, SelectGroup, SelectOption, SelectProps, SelectSourceOption, SelectView } from \"./Select\";\nexport { Select } from \"./Select\";\nexport type { SelectChipOption, SelectChipProps } from \"./SelectChip\";\nexport { SelectChip } from \"./SelectChip\";\nexport type { IconInputProps, IconOption } from \"./SpecialInputs\";\nexport { IconInput } from \"./SpecialInputs\";\nexport type { SwitchProps } from \"./Switch\";\nexport { Switch } from \"./Switch\";\nexport type { TagEditorItem, TagEditorLabels, TagEditorProps, TagEditorValue } from \"./TagEditor\";\nexport { TagEditor } from \"./TagEditor\";\nexport type { TagsInputProps } from \"./TagsInput\";\nexport { TagsInput } from \"./TagsInput\";\nexport type {\n TemplateEditorLayout,\n TemplateEditorProps,\n TemplatePreviewProps,\n TemplateSampleDataProps,\n TemplateVariable,\n TemplateVariableKind,\n} from \"./TemplateEditor\";\nexport {\n createTemplateEditorPanesLayout,\n TemplateEditor,\n TemplatePreview,\n TemplateSampleData,\n} from \"./TemplateEditor\";\nexport type { TextInputProps } from \"./TextInput\";\nexport { TextInput } from \"./TextInput\";\n"],"mappings":"AACA,SAAS,kBAAkB,QAAQ,sBAAsB;AAMzD,SAAS,kBAAkB,QAAQ,sBAAsB;AAEzD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,YAAY,QAAQ,gBAAgB;AAM7C,SAAS,UAAU,EAAE,QAAQ,EAAE,MAAM,QAAQ,gBAAgB;AAE7D,SAAS,QAAQ,QAAQ,YAAY;AAQrC,SAAS,aAAa,QAAQ,cAAc;AAU5C,SAAS,UAAU,EAAE,eAAe,EAAE,cAAc,QAAQ,cAAc;AAE1E,SAAS,YAAY,EAAE,YAAY,EAAE,UAAU,QAAQ,cAAc;AAErE,SAAS,mBAAmB,EAAE,oBAAoB,QAAQ,gBAAgB;AAU1E,SACE,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,QACf,cAAc;AAMrB,SAAS,gBAAgB,QAAQ,oBAAoB;AAErD,SAAS,cAAc,QAAQ,2BAA2B;AAE1D,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,SAAS,QAAQ,iBAAiB;AAE3C,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,SAAS,QAAQ,aAAa;AASvC,SACE,+BAA+B,EAC/B,cAAc,EACd,eAAe,EACf,kBAAkB,QACb,kBAAkB;AAEzB,SAAS,SAAS,QAAQ,aAAa","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["inputs/index.ts"],"sourcesContent":["export type { AutocompleteEditorProps } from \"./AutocompleteEditor\";\nexport { AutocompleteEditor } from \"./AutocompleteEditor\";\nexport type {\n AutocompleteSelectOption,\n AutocompleteSelectProps,\n AutocompleteSelectSearchResult,\n} from \"./AutocompleteSelect\";\nexport { AutocompleteSelect } from \"./AutocompleteSelect\";\nexport type { CheckboxProps } from \"./Checkbox\";\nexport { Checkbox } from \"./Checkbox\";\nexport type { CheckboxCardProps } from \"./CheckboxCard\";\nexport { CheckboxCard } from \"./CheckboxCard\";\nexport type {\n ColorInputProps,\n PinInputProps,\n SliderProps,\n} from \"./ChoiceInputs\";\nexport { ColorInput, PinInput, Slider } from \"./ChoiceInputs\";\nexport type { ComboboxOption, ComboboxProps } from \"./Combobox\";\nexport { Combobox } from \"./Combobox\";\nexport type { ChoiceOption, ChoiceOptionsLoader } from \"./choice\";\nexport type {\n Completion,\n QueryContext,\n SuggestContext,\n Suggestion,\n} from \"./completion\";\nexport { abbreviations } from \"./completion\";\nexport type {\n DatePickerBaseProps,\n DatePickerProps,\n DatePreset,\n DateRangePickerProps,\n DateRangeValue,\n DateTimePickerProps,\n DurationPreset,\n} from \"./DatePicker\";\nexport { DatePicker, DateRangePicker, DateTimePicker } from \"./DatePicker\";\nexport type { FileDropzoneProps, ImageCropperProps, ImageInputProps } from \"./FileInputs\";\nexport { FileDropzone, ImageCropper, ImageInput } from \"./FileInputs\";\nexport type { DateContext, FieldProps, MaybeAccessor, ValueFieldProps } from \"./field-contract\";\nexport { DEFAULT_ICON_GROUPS, DEFAULT_ICON_OPTIONS } from \"./icon-options\";\nexport type {\n ImageCropAspect,\n ImageCropOutput,\n ImageCropRect,\n ImageCropRotation,\n ImageCropSize,\n ImageCropSource,\n ImageCropState,\n} from \"./image-crop\";\nexport {\n clampImageCropRect,\n createCroppedImageCanvas,\n createCroppedImageDataUrl,\n getInitialImageCropRect,\n imageCropRectToPixels,\n normalizeImageCropRotation,\n resizeImageCropAroundCenter,\n rotateImageCropRight,\n} from \"./image-crop\";\nexport type {\n MultiSelectFetchDataFn,\n MultiSelectInputProps,\n MultiSelectOption,\n} from \"./MultiSelectInput\";\nexport { MultiSelectInput } from \"./MultiSelectInput\";\nexport type { MarkdownEditorProps } from \"./markdown/MarkdownEditor\";\nexport { MarkdownEditor } from \"./markdown/MarkdownEditor\";\nexport type { NumberInputProps } from \"./NumberInput\";\nexport { NumberInput } from \"./NumberInput\";\nexport type { ChoiceAppearance, SelectGridSize, SelectGroup, SelectOption, SelectProps, SelectSourceOption, SelectView } from \"./Select\";\nexport { Select } from \"./Select\";\nexport type { SelectChipOption, SelectChipProps } from \"./SelectChip\";\nexport { SelectChip } from \"./SelectChip\";\nexport type { IconInputProps, IconOption } from \"./SpecialInputs\";\nexport { IconInput } from \"./SpecialInputs\";\nexport type { SwitchProps } from \"./Switch\";\nexport { Switch } from \"./Switch\";\nexport type { TagEditorItem, TagEditorLabels, TagEditorProps, TagEditorValue } from \"./TagEditor\";\nexport { TagEditor } from \"./TagEditor\";\nexport type { TagsInputProps } from \"./TagsInput\";\nexport { TagsInput } from \"./TagsInput\";\nexport type {\n TemplateEditorLayout,\n TemplateEditorProps,\n TemplatePreviewProps,\n TemplateSampleDataProps,\n TemplateVariable,\n TemplateVariableKind,\n} from \"./TemplateEditor\";\nexport {\n createTemplateEditorPanesLayout,\n TemplateEditor,\n TemplatePreview,\n TemplateSampleData,\n} from \"./TemplateEditor\";\nexport type { TextInputProps } from \"./TextInput\";\nexport { TextInput } from \"./TextInput\";\n"],"mappings":"AACA,SAAS,kBAAkB,QAAQ,sBAAsB;AAMzD,SAAS,kBAAkB,QAAQ,sBAAsB;AAEzD,SAAS,QAAQ,QAAQ,YAAY;AAErC,SAAS,YAAY,QAAQ,gBAAgB;AAM7C,SAAS,UAAU,EAAE,QAAQ,EAAE,MAAM,QAAQ,gBAAgB;AAE7D,SAAS,QAAQ,QAAQ,YAAY;AAQrC,SAAS,aAAa,QAAQ,cAAc;AAU5C,SAAS,UAAU,EAAE,eAAe,EAAE,cAAc,QAAQ,cAAc;AAE1E,SAAS,YAAY,EAAE,YAAY,EAAE,UAAU,QAAQ,cAAc;AAErE,SAAS,mBAAmB,EAAE,oBAAoB,QAAQ,gBAAgB;AAU1E,SACE,kBAAkB,EAClB,wBAAwB,EACxB,yBAAyB,EACzB,uBAAuB,EACvB,qBAAqB,EACrB,0BAA0B,EAC1B,2BAA2B,EAC3B,oBAAoB,QACf,cAAc;AAMrB,SAAS,gBAAgB,QAAQ,oBAAoB;AAErD,SAAS,cAAc,QAAQ,2BAA2B;AAE1D,SAAS,WAAW,QAAQ,eAAe;AAE3C,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,UAAU,QAAQ,cAAc;AAEzC,SAAS,SAAS,QAAQ,iBAAiB;AAE3C,SAAS,MAAM,QAAQ,UAAU;AAEjC,SAAS,SAAS,QAAQ,aAAa;AAEvC,SAAS,SAAS,QAAQ,aAAa;AASvC,SACE,+BAA+B,EAC/B,cAAc,EACd,eAAe,EACf,kBAAkB,QACb,kBAAkB;AAEzB,SAAS,SAAS,QAAQ,aAAa","ignoreList":[]}
@@ -23,6 +23,7 @@ const uiMessages = i18n.define({
23
23
  add: "Add",
24
24
  addTag: "Add tag",
25
25
  addImage: "Add image",
26
+ apply: "Apply",
26
27
  attachments: "Attachments",
27
28
  assistant: "Assistant",
28
29
  avatarLabel: ({
@@ -255,6 +256,7 @@ const uiMessages = i18n.define({
255
256
  filterActions: "Filter actions",
256
257
  info: "Info",
257
258
  dismissNotification: "Dismiss notification",
259
+ notifications: "Notifications",
258
260
  interactiveLineChart: "Interactive line chart",
259
261
  interactiveChart: "Interactive chart. Use arrow keys to inspect, Enter to select, Escape to dismiss. On maps and timelines use Alt with arrow keys to inspect.",
260
262
  chartFields: ({
@@ -485,6 +487,7 @@ const uiMessages = i18n.define({
485
487
  add: "Hinzufügen",
486
488
  addTag: "Tag hinzufügen",
487
489
  addImage: "Bild hinzufügen",
490
+ apply: "Übernehmen",
488
491
  attachments: "Anhänge",
489
492
  assistant: "Assistent",
490
493
  avatarLabel: ({
@@ -717,6 +720,7 @@ const uiMessages = i18n.define({
717
720
  filterActions: "Filteraktionen",
718
721
  info: "Information",
719
722
  dismissNotification: "Benachrichtigung schließen",
723
+ notifications: "Benachrichtigungen",
720
724
  interactiveLineChart: "Interaktives Liniendiagramm",
721
725
  interactiveChart: "Interaktives Diagramm. Pfeiltasten zum Erkunden, Enter zum Auswählen, Escape zum Schließen. In Karten und Zeitleisten Alt mit Pfeiltasten zum Erkunden.",
722
726
  chartFields: ({