@kirana-ui/web 0.1.1 → 0.3.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 (140) hide show
  1. package/llms.txt +3174 -0
  2. package/package.json +14 -2
  3. package/skills/kirana-ui-primitives/SKILL.md +163 -0
  4. package/src/accordion.d.ts +18 -3
  5. package/src/accordion.js +5 -4
  6. package/src/accordion.js.map +1 -1
  7. package/src/agent.d.ts +1 -0
  8. package/src/agent.js +1 -0
  9. package/src/alert-dialog.d.ts +14 -3
  10. package/src/alert-dialog.js +6 -2
  11. package/src/alert-dialog.js.map +1 -1
  12. package/src/around.d.ts +37 -4
  13. package/src/around.js +72 -8
  14. package/src/around.js.map +1 -1
  15. package/src/autocomplete.d.ts +17 -3
  16. package/src/autocomplete.js +9 -4
  17. package/src/autocomplete.js.map +1 -1
  18. package/src/autosize.d.ts +10 -1
  19. package/src/autosize.js.map +1 -1
  20. package/src/avatar.d.ts +21 -3
  21. package/src/avatar.js +39 -10
  22. package/src/avatar.js.map +1 -1
  23. package/src/button.d.ts +10 -1
  24. package/src/button.js.map +1 -1
  25. package/src/calendar.d.ts +19 -5
  26. package/src/calendar.js +21 -9
  27. package/src/calendar.js.map +1 -1
  28. package/src/carousel.d.ts +10 -1
  29. package/src/carousel.js.map +1 -1
  30. package/src/checkbox-group.d.ts +22 -0
  31. package/src/checkbox-group.js +36 -0
  32. package/src/checkbox-group.js.map +1 -0
  33. package/src/checkbox.d.ts +16 -3
  34. package/src/checkbox.js +10 -4
  35. package/src/checkbox.js.map +1 -1
  36. package/src/collapsible.d.ts +10 -1
  37. package/src/collapsible.js.map +1 -1
  38. package/src/combobox.d.ts +37 -7
  39. package/src/combobox.js +52 -16
  40. package/src/combobox.js.map +1 -1
  41. package/src/command.d.ts +12 -2
  42. package/src/command.js +2 -1
  43. package/src/command.js.map +1 -1
  44. package/src/context-menu.d.ts +13 -1
  45. package/src/context-menu.js.map +1 -1
  46. package/src/date-field.d.ts +10 -1
  47. package/src/date-field.js.map +1 -1
  48. package/src/date-picker.d.ts +19 -4
  49. package/src/date-picker.js +14 -11
  50. package/src/date-picker.js.map +1 -1
  51. package/src/dates.d.ts +5 -2
  52. package/src/dates.js +50 -15
  53. package/src/dates.js.map +1 -1
  54. package/src/dialog.d.ts +14 -3
  55. package/src/dialog.js +6 -2
  56. package/src/dialog.js.map +1 -1
  57. package/src/drawer.d.ts +17 -1
  58. package/src/drawer.js.map +1 -1
  59. package/src/field.d.ts +8 -1
  60. package/src/field.js.map +1 -1
  61. package/src/fieldset.d.ts +10 -1
  62. package/src/fieldset.js.map +1 -1
  63. package/src/form.d.ts +13 -1
  64. package/src/form.js.map +1 -1
  65. package/src/hover-card.d.ts +10 -1
  66. package/src/hover-card.js.map +1 -1
  67. package/src/hover-popup.d.ts +2 -1
  68. package/src/hover-popup.js +2 -8
  69. package/src/hover-popup.js.map +1 -1
  70. package/src/index.d.ts +60 -1
  71. package/src/index.js +1 -0
  72. package/src/input.d.ts +12 -1
  73. package/src/input.js.map +1 -1
  74. package/src/label.d.ts +9 -1
  75. package/src/label.js.map +1 -1
  76. package/src/listbox.d.ts +15 -1
  77. package/src/listbox.js.map +1 -1
  78. package/src/menu.d.ts +15 -4
  79. package/src/menu.js +2 -8
  80. package/src/menu.js.map +1 -1
  81. package/src/menubar.d.ts +10 -1
  82. package/src/menubar.js.map +1 -1
  83. package/src/message-scroller.d.ts +10 -1
  84. package/src/message-scroller.js.map +1 -1
  85. package/src/meter.d.ts +10 -1
  86. package/src/meter.js.map +1 -1
  87. package/src/navigation-menu.d.ts +15 -4
  88. package/src/navigation-menu.js +7 -13
  89. package/src/navigation-menu.js.map +1 -1
  90. package/src/number-field.d.ts +18 -3
  91. package/src/number-field.js +23 -3
  92. package/src/number-field.js.map +1 -1
  93. package/src/otp.d.ts +12 -2
  94. package/src/otp.js +2 -1
  95. package/src/otp.js.map +1 -1
  96. package/src/pagination.d.ts +10 -1
  97. package/src/pagination.js.map +1 -1
  98. package/src/popover.d.ts +16 -3
  99. package/src/popover.js +35 -12
  100. package/src/popover.js.map +1 -1
  101. package/src/progress.d.ts +10 -1
  102. package/src/progress.js.map +1 -1
  103. package/src/qr-code.d.ts +8 -1
  104. package/src/qr-code.js.map +1 -1
  105. package/src/radio-group.d.ts +12 -2
  106. package/src/radio-group.js +9 -2
  107. package/src/radio-group.js.map +1 -1
  108. package/src/resizable.d.ts +10 -1
  109. package/src/resizable.js.map +1 -1
  110. package/src/runtime.d.ts +42 -4
  111. package/src/runtime.js +35 -7
  112. package/src/runtime.js.map +1 -1
  113. package/src/scroll-area.d.ts +13 -2
  114. package/src/scroll-area.js +3 -1
  115. package/src/scroll-area.js.map +1 -1
  116. package/src/select.d.ts +26 -5
  117. package/src/select.js +36 -11
  118. package/src/select.js.map +1 -1
  119. package/src/separator.d.ts +10 -1
  120. package/src/separator.js.map +1 -1
  121. package/src/slider.d.ts +20 -5
  122. package/src/slider.js +9 -8
  123. package/src/slider.js.map +1 -1
  124. package/src/switch.d.ts +12 -1
  125. package/src/switch.js.map +1 -1
  126. package/src/tabs.d.ts +10 -1
  127. package/src/tabs.js.map +1 -1
  128. package/src/testing.d.ts +1 -0
  129. package/src/testing.js +1 -0
  130. package/src/toast.d.ts +20 -7
  131. package/src/toast.js +28 -7
  132. package/src/toast.js.map +1 -1
  133. package/src/toggle-group.d.ts +16 -1
  134. package/src/toggle-group.js.map +1 -1
  135. package/src/toggle.d.ts +12 -1
  136. package/src/toggle.js.map +1 -1
  137. package/src/toolbar.d.ts +10 -1
  138. package/src/toolbar.js.map +1 -1
  139. package/src/tooltip.d.ts +10 -1
  140. package/src/tooltip.js.map +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"autocomplete.js","names":[],"sources":["../../../../packages/web/src/autocomplete.ts"],"sourcesContent":["import { createAutocomplete } from \"@kirana-ui/core/autocomplete\"\nimport type { AutocompleteProps } from \"@kirana-ui/core/autocomplete\"\nimport type { Combobox } from \"@kirana-ui/core/combobox\"\n\nimport { fieldAround } from \"./around.ts\"\nimport { PARTS } from \"./combobox.ts\"\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-autocomplete>`: a combobox whose text is the value, with a combobox's parts: the\n * list only suggests. `value`, `default-value`, `open`, `default-open`, `mode`,\n * `open-on-input-click`, `disabled`, `required`, `name`, `form`; `filter` as a property; it\n * tells `value-change` and `open-change`.\n */\nexport const tag = defineElement<AutocompleteProps, Combobox<string>>({\n tag: \"kui-autocomplete\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n open: \"boolean\",\n \"default-open\": \"boolean\",\n mode: \"string\",\n \"open-on-input-click\": \"boolean\",\n disabled: \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n },\n properties: [\"filter\"],\n create: (props, host) =>\n createAutocomplete(props, { field: fieldAround(host) }) as Combobox<string>,\n changes: {\n onValueChange: { event: \"value-change\", prop: \"value\" },\n onOpenChange: { event: \"open-change\", prop: \"open\" },\n },\n parts: PARTS,\n})\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,MAAM,cAAmD;CACpE,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,MAAM;EACN,uBAAuB;EACvB,UAAU;EACV,UAAU;EACV,MAAM;EACN,MAAM;CACR;CACA,YAAY,CAAC,QAAQ;CACrB,SAAS,OAAO,SACd,mBAAmB,OAAO,EAAE,OAAO,YAAY,IAAI,EAAE,CAAC;CACxD,SAAS;EACP,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;EACtD,cAAc;GAAE,OAAO;GAAe,MAAM;EAAO;CACrD;CACA,OAAO;AACT,CAAC"}
1
+ {"version":3,"file":"autocomplete.js","names":[],"sources":["../../../../packages/web/src/autocomplete.ts"],"sourcesContent":["import { createAutocomplete } from \"@kirana-ui/core/autocomplete\"\nimport type { AutocompleteProps } from \"@kirana-ui/core/autocomplete\"\nimport type { Combobox } from \"@kirana-ui/core/combobox\"\n\nimport { fieldAround } from \"./around.ts\"\nimport type { Placed } from \"./around.ts\"\nimport { LISTS, PARTS } from \"./combobox.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-autocomplete>`: a combobox whose text is the value, with a combobox's parts: the\n * list only suggests. `value`, `default-value`, `open`, `default-open`, `mode`,\n * `open-on-input-click`, `auto-highlight`, `disabled`, `read-only`, `required`, `name`, `form`;\n * `filter` and `items` as properties (with `items`, the suggestions are a\n * `<template kui-each=\"collection\">`, as a combobox's); it tells `value-change` and\n * `open-change`.\n */\nexport const tag = defineElement<AutocompleteProps, Combobox<string>>({\n tag: \"kui-autocomplete\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n open: \"boolean\",\n \"default-open\": \"boolean\",\n mode: \"string\",\n \"open-on-input-click\": \"boolean\",\n \"auto-highlight\": \"boolean\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n },\n properties: [\"filter\", \"items\"],\n create: (props, host) =>\n createAutocomplete(props, { field: fieldAround(host) }) as Combobox<string>,\n changes: {\n onValueChange: { event: \"value-change\", prop: \"value\" },\n onOpenChange: { event: \"open-change\", prop: \"open\" },\n },\n lists: { collection: LISTS.collection },\n parts: PARTS,\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-autocomplete\": ElementOf<\n typeof tag,\n { \"value-change\": [\"onValueChange\", \"value\"]; \"open-change\": [\"onOpenChange\", \"open\"] }\n > &\n Placed\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAkBA,MAAa,MAAM,cAAmD;CACpE,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,MAAM;EACN,gBAAgB;EAChB,MAAM;EACN,uBAAuB;EACvB,kBAAkB;EAClB,UAAU;EACV,aAAa;EACb,UAAU;EACV,MAAM;EACN,MAAM;CACR;CACA,YAAY,CAAC,UAAU,OAAO;CAC9B,SAAS,OAAO,SACd,mBAAmB,OAAO,EAAE,OAAO,YAAY,IAAI,EAAE,CAAC;CACxD,SAAS;EACP,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;EACtD,cAAc;GAAE,OAAO;GAAe,MAAM;EAAO;CACrD;CACA,OAAO,EAAE,YAAY,MAAM,WAAW;CACtC,OAAO;AACT,CAAC"}
package/src/autosize.d.ts CHANGED
@@ -1,6 +1,15 @@
1
+ import { As, ElementOf, Tag } from "./runtime.js";
2
+ import { AutosizeProps } from "@kirana-ui/core/autosize";
1
3
  /**
2
4
  * `<kui-autosize>` around a `kui-part="root"` textarea, which is as tall as what is written
3
5
  * in it. `value` as a property, for a caller that holds the text: set, it is measured again.
4
6
  */
5
- export declare const tag: string;
7
+ export declare const tag: Tag<{
8
+ id: string;
9
+ }, import("@kirana-ui/core/autosize").Autosize>;
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ "kui-autosize": ElementOf<As<typeof tag, AutosizeProps>>;
13
+ }
14
+ }
6
15
  //# sourceMappingURL=autosize.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"autosize.js","names":[],"sources":["../../../../packages/web/src/autosize.ts"],"sourcesContent":["import { createAutosize } from \"@kirana-ui/core/autosize\"\n\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-autosize>` around a `kui-part=\"root\"` textarea, which is as tall as what is written\n * in it. `value` as a property, for a caller that holds the text: set, it is measured again.\n */\nexport const tag = defineElement({\n tag: \"kui-autosize\",\n props: {},\n properties: [\"value\"],\n create: (props) => createAutosize(props as never),\n changes: {},\n parts: { root: (controller) => controller.textarea },\n})\n"],"mappings":";;;;;;;AAQA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO,CAAC;CACR,YAAY,CAAC,OAAO;CACpB,SAAS,UAAU,eAAe,KAAc;CAChD,SAAS,CAAC;CACV,OAAO,EAAE,OAAO,eAAe,WAAW,SAAS;AACrD,CAAC"}
1
+ {"version":3,"file":"autosize.js","names":[],"sources":["../../../../packages/web/src/autosize.ts"],"sourcesContent":["import { createAutosize } from \"@kirana-ui/core/autosize\"\nimport type { AutosizeProps } from \"@kirana-ui/core/autosize\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-autosize>` around a `kui-part=\"root\"` textarea, which is as tall as what is written\n * in it. `value` as a property, for a caller that holds the text: set, it is measured again.\n */\nexport const tag = defineElement({\n tag: \"kui-autosize\",\n props: {},\n properties: [\"value\"],\n create: (props) => createAutosize(props as never),\n changes: {},\n parts: { root: (controller) => controller.textarea },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-autosize\": ElementOf<As<typeof tag, AutosizeProps>>\n }\n}\n"],"mappings":";;;;;;;AAUA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO,CAAC;CACR,YAAY,CAAC,OAAO;CACpB,SAAS,UAAU,eAAe,KAAc;CAChD,SAAS,CAAC;CACV,OAAO,EAAE,OAAO,eAAe,WAAW,SAAS;AACrD,CAAC"}
package/src/avatar.d.ts CHANGED
@@ -1,7 +1,25 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { Avatar, AvatarImageProps } from "@kirana-ui/core/avatar";
1
3
  /**
2
4
  * `<kui-avatar>` around `kui-part="root"`, an `image` (an `<img>`, in the page once the
3
- * picture has loaded) and a `fallback`, in the page until then. `src`: the picture's address,
4
- * on the component, since the image is not in the page to be given one.
5
+ * picture has loaded) and a `fallback`, in the page until then; `kui-delay="600"` on the
6
+ * fallback waits that many milliseconds first. `src`: the picture's address, on the component,
7
+ * since the image is not in the page to be given one. With `kui-keep-mounted` the image stays
8
+ * in the page, as Base UI's `keepMounted` image: its own `src` is the address, it loads the
9
+ * picture itself, and it is `aria-hidden` until it has (`data-loading`, `data-error`). It
10
+ * tells `loading-status-change` (`detail.status`) as the picture loads.
5
11
  */
6
- export declare const tag: string;
12
+ export declare const tag: Tag<{
13
+ id: string;
14
+ src?: string;
15
+ } & AvatarImageProps, Avatar & {
16
+ mount(): () => void;
17
+ }>;
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ "kui-avatar": ElementOf<typeof tag, {
21
+ "loading-status-change": ["onLoadingStatusChange", "status"];
22
+ }>;
23
+ }
24
+ }
7
25
  //# sourceMappingURL=avatar.d.ts.map
package/src/avatar.js CHANGED
@@ -2,35 +2,64 @@ import { defineElement } from "./runtime.js";
2
2
  import { computed, effect } from "@kirana-ui/core";
3
3
  import { createAvatar } from "@kirana-ui/core/avatar";
4
4
  // src/avatar.ts
5
+ const fallbacks = /* @__PURE__ */ new WeakMap();
5
6
  /**
6
7
  * `<kui-avatar>` around `kui-part="root"`, an `image` (an `<img>`, in the page once the
7
- * picture has loaded) and a `fallback`, in the page until then. `src`: the picture's address,
8
- * on the component, since the image is not in the page to be given one.
8
+ * picture has loaded) and a `fallback`, in the page until then; `kui-delay="600"` on the
9
+ * fallback waits that many milliseconds first. `src`: the picture's address, on the component,
10
+ * since the image is not in the page to be given one. With `kui-keep-mounted` the image stays
11
+ * in the page, as Base UI's `keepMounted` image: its own `src` is the address, it loads the
12
+ * picture itself, and it is `aria-hidden` until it has (`data-loading`, `data-error`). It
13
+ * tells `loading-status-change` (`detail.status`) as the picture loads.
9
14
  */
10
15
  const tag = defineElement({
11
16
  tag: "kui-avatar",
12
17
  props: { src: "string" },
13
18
  create(props) {
14
19
  const avatar = createAvatar(props);
20
+ const report = avatar.statusReport(() => props.peek().onLoadingStatusChange);
15
21
  return {
16
22
  ...avatar,
17
23
  mount() {
18
- const stops = [effect(() => avatar.source.set(props.get().src)), avatar.mount()];
24
+ let given = false;
25
+ const stops = [
26
+ effect(() => {
27
+ const { src } = props.get();
28
+ if (src === void 0 && !given) return;
29
+ given = src !== void 0;
30
+ avatar.source.set(src);
31
+ }),
32
+ avatar.mount(),
33
+ report.mount()
34
+ ];
19
35
  return () => stops.forEach((stop) => stop());
20
36
  }
21
37
  };
22
38
  },
23
- changes: {},
39
+ changes: { onLoadingStatusChange: {
40
+ event: "loading-status-change",
41
+ prop: "status",
42
+ hold: false
43
+ } },
24
44
  parts: {
25
45
  root: (controller) => controller.root,
26
- image: (controller) => ({
46
+ image: (controller, element) => element.hasAttribute("kui-keep-mounted") ? controller.keptImage : {
27
47
  part: controller.image,
28
48
  mounted: computed(() => controller.status.get() === "loaded")
29
- }),
30
- fallback: (controller) => ({
31
- part: controller.fallback,
32
- mounted: computed(() => controller.status.get() !== "loaded")
33
- })
49
+ },
50
+ fallback(controller, element) {
51
+ let presence = fallbacks.get(element);
52
+ if (!presence) {
53
+ const delay = Number(element.getAttribute("kui-delay")) || 0;
54
+ presence = controller.fallbackPresence({ delay });
55
+ fallbacks.set(element, presence);
56
+ }
57
+ return {
58
+ part: controller.fallback,
59
+ mounted: presence.shown,
60
+ mount: presence.mount
61
+ };
62
+ }
34
63
  }
35
64
  });
36
65
  export { tag };
package/src/avatar.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"avatar.js","names":[],"sources":["../../../../packages/web/src/avatar.ts"],"sourcesContent":["import { computed, effect } from \"@kirana-ui/core\"\nimport { createAvatar } from \"@kirana-ui/core/avatar\"\nimport type { Avatar } from \"@kirana-ui/core/avatar\"\n\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-avatar>` around `kui-part=\"root\"`, an `image` (an `<img>`, in the page once the\n * picture has loaded) and a `fallback`, in the page until then. `src`: the picture's address,\n * on the component, since the image is not in the page to be given one.\n */\nexport const tag = defineElement<{ id: string; src?: string }, Avatar & { mount(): () => void }>({\n tag: \"kui-avatar\",\n props: { src: \"string\" },\n create(props) {\n const avatar = createAvatar(props)\n return {\n ...avatar,\n mount() {\n const stops = [effect(() => avatar.source.set(props.get().src)), avatar.mount()]\n return () => stops.forEach((stop) => stop())\n },\n }\n },\n changes: {},\n parts: {\n root: (controller) => controller.root,\n image: (controller) => ({\n part: controller.image,\n mounted: computed(() => controller.status.get() === \"loaded\"),\n }),\n fallback: (controller) => ({\n part: controller.fallback,\n mounted: computed(() => controller.status.get() !== \"loaded\"),\n }),\n },\n})\n"],"mappings":";;;;;;;;;AAWA,MAAa,MAAM,cAA8E;CAC/F,KAAK;CACL,OAAO,EAAE,KAAK,SAAS;CACvB,OAAO,OAAO;EACZ,MAAM,SAAS,aAAa,KAAK;EACjC,OAAO;GACL,GAAG;GACH,QAAQ;IACN,MAAM,QAAQ,CAAC,aAAa,OAAO,OAAO,IAAI,MAAM,IAAI,CAAC,CAAC,GAAG,CAAC,GAAG,OAAO,MAAM,CAAC;IAC/E,aAAa,MAAM,SAAS,SAAS,KAAK,CAAC;GAC7C;EACF;CACF;CACA,SAAS,CAAC;CACV,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,QAAQ,gBAAgB;GACtB,MAAM,WAAW;GACjB,SAAS,eAAe,WAAW,OAAO,IAAI,MAAM,QAAQ;EAC9D;EACA,WAAW,gBAAgB;GACzB,MAAM,WAAW;GACjB,SAAS,eAAe,WAAW,OAAO,IAAI,MAAM,QAAQ;EAC9D;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"avatar.js","names":[],"sources":["../../../../packages/web/src/avatar.ts"],"sourcesContent":["import { computed, effect } from \"@kirana-ui/core\"\nimport { createAvatar } from \"@kirana-ui/core/avatar\"\nimport type { Avatar, AvatarFallbackPresence, AvatarImageProps } from \"@kirana-ui/core/avatar\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n// One presence per fallback element: its delay is counted once.\nconst fallbacks = new WeakMap<HTMLElement, AvatarFallbackPresence>()\n\n/**\n * `<kui-avatar>` around `kui-part=\"root\"`, an `image` (an `<img>`, in the page once the\n * picture has loaded) and a `fallback`, in the page until then; `kui-delay=\"600\"` on the\n * fallback waits that many milliseconds first. `src`: the picture's address, on the component,\n * since the image is not in the page to be given one. With `kui-keep-mounted` the image stays\n * in the page, as Base UI's `keepMounted` image: its own `src` is the address, it loads the\n * picture itself, and it is `aria-hidden` until it has (`data-loading`, `data-error`). It\n * tells `loading-status-change` (`detail.status`) as the picture loads.\n */\nexport const tag = defineElement<\n { id: string; src?: string } & AvatarImageProps,\n Avatar & { mount(): () => void }\n>({\n tag: \"kui-avatar\",\n props: { src: \"string\" },\n create(props) {\n const avatar = createAvatar(props)\n const report = avatar.statusReport(() => props.peek().onLoadingStatusChange)\n return {\n ...avatar,\n mount() {\n // An image kept in the page says its own address: a component given none leaves it.\n let given = false\n const stops = [\n effect(() => {\n const { src } = props.get()\n if (src === undefined && !given) return\n given = src !== undefined\n avatar.source.set(src)\n }),\n avatar.mount(),\n report.mount(),\n ]\n return () => stops.forEach((stop) => stop())\n },\n }\n },\n changes: {\n onLoadingStatusChange: { event: \"loading-status-change\", prop: \"status\", hold: false },\n },\n parts: {\n root: (controller) => controller.root,\n image: (controller, element) =>\n element.hasAttribute(\"kui-keep-mounted\")\n ? controller.keptImage\n : { part: controller.image, mounted: computed(() => controller.status.get() === \"loaded\") },\n fallback(controller, element) {\n let presence = fallbacks.get(element)\n if (!presence) {\n const delay = Number(element.getAttribute(\"kui-delay\")) || 0\n presence = controller.fallbackPresence({ delay })\n fallbacks.set(element, presence)\n }\n return { part: controller.fallback, mounted: presence.shown, mount: presence.mount }\n },\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-avatar\": ElementOf<\n typeof tag,\n { \"loading-status-change\": [\"onLoadingStatusChange\", \"status\"] }\n >\n }\n}\n"],"mappings":";;;;AAQA,MAAM,4BAAY,IAAI,QAA6C;;;;;;;;;;AAWnE,MAAa,MAAM,cAGjB;CACA,KAAK;CACL,OAAO,EAAE,KAAK,SAAS;CACvB,OAAO,OAAO;EACZ,MAAM,SAAS,aAAa,KAAK;EACjC,MAAM,SAAS,OAAO,mBAAmB,MAAM,KAAK,CAAC,CAAC,qBAAqB;EAC3E,OAAO;GACL,GAAG;GACH,QAAQ;IAEN,IAAI,QAAQ;IACZ,MAAM,QAAQ;KACZ,aAAa;MACX,MAAM,EAAE,QAAQ,MAAM,IAAI;MAC1B,IAAI,QAAQ,KAAA,KAAa,CAAC,OAAO;MACjC,QAAQ,QAAQ,KAAA;MAChB,OAAO,OAAO,IAAI,GAAG;KACvB,CAAC;KACD,OAAO,MAAM;KACb,OAAO,MAAM;IACf;IACA,aAAa,MAAM,SAAS,SAAS,KAAK,CAAC;GAC7C;EACF;CACF;CACA,SAAS,EACP,uBAAuB;EAAE,OAAO;EAAyB,MAAM;EAAU,MAAM;CAAM,EACvF;CACA,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,QAAQ,YAAY,YAClB,QAAQ,aAAa,kBAAkB,IACnC,WAAW,YACX;GAAE,MAAM,WAAW;GAAO,SAAS,eAAe,WAAW,OAAO,IAAI,MAAM,QAAQ;EAAE;EAC9F,SAAS,YAAY,SAAS;GAC5B,IAAI,WAAW,UAAU,IAAI,OAAO;GACpC,IAAI,CAAC,UAAU;IACb,MAAM,QAAQ,OAAO,QAAQ,aAAa,WAAW,CAAC,KAAK;IAC3D,WAAW,WAAW,iBAAiB,EAAE,MAAM,CAAC;IAChD,UAAU,IAAI,SAAS,QAAQ;GACjC;GACA,OAAO;IAAE,MAAM,WAAW;IAAU,SAAS,SAAS;IAAO,OAAO,SAAS;GAAM;EACrF;CACF;AACF,CAAC"}
package/src/button.d.ts CHANGED
@@ -1,6 +1,15 @@
1
+ import { As, ElementOf, Tag } from "./runtime.js";
2
+ import { ButtonProps } from "@kirana-ui/core/button";
1
3
  /**
2
4
  * `<kui-button>` around a `kui-part="root"` button, or with `native-button="false"` another
3
5
  * element that acts as one. `disabled`, `focusable-when-disabled`, `native-button`.
4
6
  */
5
- export declare const tag: string;
7
+ export declare const tag: Tag<{
8
+ id: string;
9
+ }, import("@kirana-ui/core/button").Button>;
10
+ declare global {
11
+ interface HTMLElementTagNameMap {
12
+ "kui-button": ElementOf<As<typeof tag, ButtonProps>>;
13
+ }
14
+ }
6
15
  //# sourceMappingURL=button.d.ts.map
package/src/button.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"button.js","names":[],"sources":["../../../../packages/web/src/button.ts"],"sourcesContent":["import { createButton } from \"@kirana-ui/core/button\"\n\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-button>` around a `kui-part=\"root\"` button, or with `native-button=\"false\"` another\n * element that acts as one. `disabled`, `focusable-when-disabled`, `native-button`.\n */\nexport const tag = defineElement({\n tag: \"kui-button\",\n props: { disabled: \"boolean\", \"focusable-when-disabled\": \"boolean\", \"native-button\": \"boolean\" },\n create: (props) => createButton(props as never),\n changes: {},\n parts: { root: (controller) => controller.root },\n})\n"],"mappings":";;;;;;;AAQA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EAAE,UAAU;EAAW,2BAA2B;EAAW,iBAAiB;CAAU;CAC/F,SAAS,UAAU,aAAa,KAAc;CAC9C,SAAS,CAAC;CACV,OAAO,EAAE,OAAO,eAAe,WAAW,KAAK;AACjD,CAAC"}
1
+ {"version":3,"file":"button.js","names":[],"sources":["../../../../packages/web/src/button.ts"],"sourcesContent":["import { createButton } from \"@kirana-ui/core/button\"\nimport type { ButtonProps } from \"@kirana-ui/core/button\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-button>` around a `kui-part=\"root\"` button, or with `native-button=\"false\"` another\n * element that acts as one. `disabled`, `focusable-when-disabled`, `native-button`.\n */\nexport const tag = defineElement({\n tag: \"kui-button\",\n props: { disabled: \"boolean\", \"focusable-when-disabled\": \"boolean\", \"native-button\": \"boolean\" },\n create: (props) => createButton(props as never),\n changes: {},\n parts: { root: (controller) => controller.root },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-button\": ElementOf<As<typeof tag, ButtonProps>>\n }\n}\n"],"mappings":";;;;;;;AAUA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EAAE,UAAU;EAAW,2BAA2B;EAAW,iBAAiB;CAAU;CAC/F,SAAS,UAAU,aAAa,KAAc;CAC9C,SAAS,CAAC;CACV,OAAO,EAAE,OAAO,eAAe,WAAW,KAAK;AACjD,CAAC"}
package/src/calendar.d.ts CHANGED
@@ -1,12 +1,26 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { Calendar, CalendarProps } from "@kirana-ui/core/calendar";
1
3
  /**
2
4
  * `<kui-calendar>` around `kui-part="root"`, with `previous` and `next` buttons, a `heading`
3
5
  * (it says the month) and a `grid` table. The table's head row holds a
4
6
  * `<template kui-each="weekdays">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its
5
7
  * body a `<template kui-each="weeks">` with a row, which holds a `<template kui-each="days">`
6
- * with a `cell` and its `day` button (`{date}`, `{label}`). `value` and `default-value` (a
7
- * day as `2026-03-14`; several with commas between), `mode`, `default-focused-value`,
8
- * `locale`, `calendar-system`, `min`, `max`, `disabled`, `read-only`, `fixed-weeks`;
9
- * `isDateUnavailable` as a property; it tells `value-change` and `month-change`.
8
+ * with a `cell` and its `day` button (`{date}`, `{label}`). With several `months`, a
9
+ * `<template kui-each="months">` (`{index}`, `{month}`, `{title}`) holds each month's
10
+ * `heading` and `grid`. An `<input kui-part="input">` submits the value under `name`.
11
+ * `value` and `default-value` (a day as `2026-03-14`; a range's first and last, or a list's
12
+ * days, with commas between), `mode`, `min-days`, `max-days`, `months`, `paged-navigation`,
13
+ * `month`, `default-month`, `default-focused-value`, `locale`, `calendar-system`, `min`,
14
+ * `max`, `disabled`, `read-only`, `fixed-weeks`, `name`, `form`; `isDateUnavailable` as a
15
+ * property; it tells `value-change` and `month-change`.
10
16
  */
11
- export declare const tag: string;
17
+ export declare const tag: Tag<CalendarProps<import("@kirana-ui/core/calendar").CalendarMode>, Calendar>;
18
+ declare global {
19
+ interface HTMLElementTagNameMap {
20
+ "kui-calendar": ElementOf<typeof tag, {
21
+ "value-change": ["onValueChange", "value"];
22
+ "month-change": ["onMonthChange", "month"];
23
+ }>;
24
+ }
25
+ }
12
26
  //# sourceMappingURL=calendar.d.ts.map
package/src/calendar.js CHANGED
@@ -9,10 +9,14 @@ const { parts, lists } = calendarParts((controller) => controller);
9
9
  * (it says the month) and a `grid` table. The table's head row holds a
10
10
  * `<template kui-each="weekdays">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its
11
11
  * body a `<template kui-each="weeks">` with a row, which holds a `<template kui-each="days">`
12
- * with a `cell` and its `day` button (`{date}`, `{label}`). `value` and `default-value` (a
13
- * day as `2026-03-14`; several with commas between), `mode`, `default-focused-value`,
14
- * `locale`, `calendar-system`, `min`, `max`, `disabled`, `read-only`, `fixed-weeks`;
15
- * `isDateUnavailable` as a property; it tells `value-change` and `month-change`.
12
+ * with a `cell` and its `day` button (`{date}`, `{label}`). With several `months`, a
13
+ * `<template kui-each="months">` (`{index}`, `{month}`, `{title}`) holds each month's
14
+ * `heading` and `grid`. An `<input kui-part="input">` submits the value under `name`.
15
+ * `value` and `default-value` (a day as `2026-03-14`; a range's first and last, or a list's
16
+ * days, with commas between), `mode`, `min-days`, `max-days`, `months`, `paged-navigation`,
17
+ * `month`, `default-month`, `default-focused-value`, `locale`, `calendar-system`, `min`,
18
+ * `max`, `disabled`, `read-only`, `fixed-weeks`, `name`, `form`; `isDateUnavailable` as a
19
+ * property; it tells `value-change` and `month-change`.
16
20
  */
17
21
  const tag = defineElement({
18
22
  tag: "kui-calendar",
@@ -20,6 +24,12 @@ const tag = defineElement({
20
24
  value: "string",
21
25
  "default-value": "string",
22
26
  mode: "string",
27
+ "min-days": "number",
28
+ "max-days": "number",
29
+ months: "number",
30
+ "paged-navigation": "boolean",
31
+ month: "string",
32
+ "default-month": "string",
23
33
  "default-focused-value": "string",
24
34
  locale: "string",
25
35
  "calendar-system": "string",
@@ -27,15 +37,17 @@ const tag = defineElement({
27
37
  max: "string",
28
38
  disabled: "boolean",
29
39
  "read-only": "boolean",
30
- "fixed-weeks": "boolean"
40
+ "fixed-weeks": "boolean",
41
+ name: "string",
42
+ form: "string"
31
43
  },
32
44
  properties: ["isDateUnavailable"],
33
45
  create: (props) => createCalendar(computed(() => {
34
46
  const own = props.get();
35
47
  return {
36
48
  ...own,
37
- value: days(own.value),
38
- defaultValue: days(own.defaultValue)
49
+ value: days(own.value, own.mode),
50
+ defaultValue: days(own.defaultValue, own.mode)
39
51
  };
40
52
  })),
41
53
  changes: {
@@ -45,13 +57,13 @@ const tag = defineElement({
45
57
  },
46
58
  onMonthChange: {
47
59
  event: "month-change",
48
- prop: "month",
49
- hold: false
60
+ prop: "month"
50
61
  }
51
62
  },
52
63
  lists,
53
64
  parts: {
54
65
  root: (controller) => controller.root,
66
+ input: (controller) => controller.input,
55
67
  ...parts
56
68
  }
57
69
  });
@@ -1 +1 @@
1
- {"version":3,"file":"calendar.js","names":[],"sources":["../../../../packages/web/src/calendar.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createCalendar } from \"@kirana-ui/core/calendar\"\nimport type { Calendar, CalendarProps } from \"@kirana-ui/core/calendar\"\n\nimport { calendarParts, days } from \"./dates.ts\"\nimport { defineElement } from \"./runtime.ts\"\n\nconst { parts, lists } = calendarParts<Calendar>((controller) => controller)\n\n/**\n * `<kui-calendar>` around `kui-part=\"root\"`, with `previous` and `next` buttons, a `heading`\n * (it says the month) and a `grid` table. The table's head row holds a\n * `<template kui-each=\"weekdays\">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its\n * body a `<template kui-each=\"weeks\">` with a row, which holds a `<template kui-each=\"days\">`\n * with a `cell` and its `day` button (`{date}`, `{label}`). `value` and `default-value` (a\n * day as `2026-03-14`; several with commas between), `mode`, `default-focused-value`,\n * `locale`, `calendar-system`, `min`, `max`, `disabled`, `read-only`, `fixed-weeks`;\n * `isDateUnavailable` as a property; it tells `value-change` and `month-change`.\n */\nexport const tag = defineElement<CalendarProps, Calendar>({\n tag: \"kui-calendar\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n mode: \"string\",\n \"default-focused-value\": \"string\",\n locale: \"string\",\n \"calendar-system\": \"string\",\n min: \"string\",\n max: \"string\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n \"fixed-weeks\": \"boolean\",\n },\n properties: [\"isDateUnavailable\"],\n create: (props) =>\n createCalendar(\n computed(() => {\n const own = props.get()\n return {\n ...own,\n value: days(own.value),\n defaultValue: days(own.defaultValue),\n } as CalendarProps\n })\n ),\n changes: {\n onValueChange: { event: \"value-change\", prop: \"value\" },\n onMonthChange: { event: \"month-change\", prop: \"month\", hold: false },\n },\n lists,\n parts: { root: (controller) => controller.root, ...parts },\n})\n"],"mappings":";;;;;AAOA,MAAM,EAAE,OAAO,UAAU,eAAyB,eAAe,UAAU;;;;;;;;;;;AAY3E,MAAa,MAAM,cAAuC;CACxD,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,MAAM;EACN,yBAAyB;EACzB,QAAQ;EACR,mBAAmB;EACnB,KAAK;EACL,KAAK;EACL,UAAU;EACV,aAAa;EACb,eAAe;CACjB;CACA,YAAY,CAAC,mBAAmB;CAChC,SAAS,UACP,eACE,eAAe;EACb,MAAM,MAAM,MAAM,IAAI;EACtB,OAAO;GACL,GAAG;GACH,OAAO,KAAK,IAAI,KAAK;GACrB,cAAc,KAAK,IAAI,YAAY;EACrC;CACF,CAAC,CACH;CACF,SAAS;EACP,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;EACtD,eAAe;GAAE,OAAO;GAAgB,MAAM;GAAS,MAAM;EAAM;CACrE;CACA;CACA,OAAO;EAAE,OAAO,eAAe,WAAW;EAAM,GAAG;CAAM;AAC3D,CAAC"}
1
+ {"version":3,"file":"calendar.js","names":[],"sources":["../../../../packages/web/src/calendar.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createCalendar } from \"@kirana-ui/core/calendar\"\nimport type { Calendar, CalendarProps } from \"@kirana-ui/core/calendar\"\n\nimport { calendarParts, days } from \"./dates.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\nconst { parts, lists } = calendarParts<Calendar>((controller) => controller)\n\n/**\n * `<kui-calendar>` around `kui-part=\"root\"`, with `previous` and `next` buttons, a `heading`\n * (it says the month) and a `grid` table. The table's head row holds a\n * `<template kui-each=\"weekdays\">` with a `head-cell` (`{short}`, `{narrow}`, `{long}`); its\n * body a `<template kui-each=\"weeks\">` with a row, which holds a `<template kui-each=\"days\">`\n * with a `cell` and its `day` button (`{date}`, `{label}`). With several `months`, a\n * `<template kui-each=\"months\">` (`{index}`, `{month}`, `{title}`) holds each month's\n * `heading` and `grid`. An `<input kui-part=\"input\">` submits the value under `name`.\n * `value` and `default-value` (a day as `2026-03-14`; a range's first and last, or a list's\n * days, with commas between), `mode`, `min-days`, `max-days`, `months`, `paged-navigation`,\n * `month`, `default-month`, `default-focused-value`, `locale`, `calendar-system`, `min`,\n * `max`, `disabled`, `read-only`, `fixed-weeks`, `name`, `form`; `isDateUnavailable` as a\n * property; it tells `value-change` and `month-change`.\n */\nexport const tag = defineElement<CalendarProps, Calendar>({\n tag: \"kui-calendar\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n mode: \"string\",\n \"min-days\": \"number\",\n \"max-days\": \"number\",\n months: \"number\",\n \"paged-navigation\": \"boolean\",\n month: \"string\",\n \"default-month\": \"string\",\n \"default-focused-value\": \"string\",\n locale: \"string\",\n \"calendar-system\": \"string\",\n min: \"string\",\n max: \"string\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n \"fixed-weeks\": \"boolean\",\n name: \"string\",\n form: \"string\",\n },\n properties: [\"isDateUnavailable\"],\n create: (props) =>\n createCalendar(\n computed(() => {\n const own = props.get()\n return {\n ...own,\n value: days(own.value, own.mode),\n defaultValue: days(own.defaultValue, own.mode),\n } as CalendarProps\n })\n ),\n changes: {\n onValueChange: { event: \"value-change\", prop: \"value\" },\n onMonthChange: { event: \"month-change\", prop: \"month\" },\n },\n lists,\n parts: {\n root: (controller) => controller.root,\n input: (controller) => controller.input,\n ...parts,\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-calendar\": ElementOf<\n typeof tag,\n { \"value-change\": [\"onValueChange\", \"value\"]; \"month-change\": [\"onMonthChange\", \"month\"] }\n >\n }\n}\n"],"mappings":";;;;;AAQA,MAAM,EAAE,OAAO,UAAU,eAAyB,eAAe,UAAU;;;;;;;;;;;;;;;AAgB3E,MAAa,MAAM,cAAuC;CACxD,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,MAAM;EACN,YAAY;EACZ,YAAY;EACZ,QAAQ;EACR,oBAAoB;EACpB,OAAO;EACP,iBAAiB;EACjB,yBAAyB;EACzB,QAAQ;EACR,mBAAmB;EACnB,KAAK;EACL,KAAK;EACL,UAAU;EACV,aAAa;EACb,eAAe;EACf,MAAM;EACN,MAAM;CACR;CACA,YAAY,CAAC,mBAAmB;CAChC,SAAS,UACP,eACE,eAAe;EACb,MAAM,MAAM,MAAM,IAAI;EACtB,OAAO;GACL,GAAG;GACH,OAAO,KAAK,IAAI,OAAO,IAAI,IAAI;GAC/B,cAAc,KAAK,IAAI,cAAc,IAAI,IAAI;EAC/C;CACF,CAAC,CACH;CACF,SAAS;EACP,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;EACtD,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;CACxD;CACA;CACA,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,QAAQ,eAAe,WAAW;EAClC,GAAG;CACL;AACF,CAAC"}
package/src/carousel.d.ts CHANGED
@@ -1,7 +1,16 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { Carousel, CarouselProps } from "@kirana-ui/core/carousel";
1
3
  /**
2
4
  * `<kui-carousel>` around `kui-part="root"`, a `viewport` with an `item` for each slide
3
5
  * (`kui-index`, from 0), `previous` and `next` buttons, and an `indicator` button for a slide
4
6
  * (`kui-index`). `index`, `default-index`, `orientation`, `loop`; it tells `index-change`.
5
7
  */
6
- export declare const tag: string;
8
+ export declare const tag: Tag<CarouselProps, Carousel>;
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ "kui-carousel": ElementOf<typeof tag, {
12
+ "index-change": ["onIndexChange", "index"];
13
+ }>;
14
+ }
15
+ }
7
16
  //# sourceMappingURL=carousel.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"carousel.js","names":[],"sources":["../../../../packages/web/src/carousel.ts"],"sourcesContent":["import { createCarousel } from \"@kirana-ui/core/carousel\"\nimport type { Carousel, CarouselProps } from \"@kirana-ui/core/carousel\"\n\nimport { defineElement } from \"./runtime.ts\"\n\nconst indexOf = (element: HTMLElement) => Number(element.getAttribute(\"kui-index\") ?? 0)\n\n/**\n * `<kui-carousel>` around `kui-part=\"root\"`, a `viewport` with an `item` for each slide\n * (`kui-index`, from 0), `previous` and `next` buttons, and an `indicator` button for a slide\n * (`kui-index`). `index`, `default-index`, `orientation`, `loop`; it tells `index-change`.\n */\nexport const tag = defineElement<CarouselProps, Carousel>({\n tag: \"kui-carousel\",\n props: { index: \"number\", \"default-index\": \"number\", orientation: \"string\", loop: \"boolean\" },\n create: (props) => createCarousel(props),\n changes: { onIndexChange: { event: \"index-change\", prop: \"index\" } },\n parts: {\n root: (controller) => controller.root,\n viewport: (controller) => controller.viewport,\n item: (controller, element) => controller.item(indexOf(element)),\n previous: (controller) => controller.previous,\n next: (controller) => controller.next,\n indicator: (controller, element) => controller.indicator(indexOf(element)),\n },\n})\n"],"mappings":";;;AAKA,MAAM,WAAW,YAAyB,OAAO,QAAQ,aAAa,WAAW,KAAK,CAAC;;;;;;AAOvF,MAAa,MAAM,cAAuC;CACxD,KAAK;CACL,OAAO;EAAE,OAAO;EAAU,iBAAiB;EAAU,aAAa;EAAU,MAAM;CAAU;CAC5F,SAAS,UAAU,eAAe,KAAK;CACvC,SAAS,EAAE,eAAe;EAAE,OAAO;EAAgB,MAAM;CAAQ,EAAE;CACnE,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,WAAW,eAAe,WAAW;EACrC,OAAO,YAAY,YAAY,WAAW,KAAK,QAAQ,OAAO,CAAC;EAC/D,WAAW,eAAe,WAAW;EACrC,OAAO,eAAe,WAAW;EACjC,YAAY,YAAY,YAAY,WAAW,UAAU,QAAQ,OAAO,CAAC;CAC3E;AACF,CAAC"}
1
+ {"version":3,"file":"carousel.js","names":[],"sources":["../../../../packages/web/src/carousel.ts"],"sourcesContent":["import { createCarousel } from \"@kirana-ui/core/carousel\"\nimport type { Carousel, CarouselProps } from \"@kirana-ui/core/carousel\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\nconst indexOf = (element: HTMLElement) => Number(element.getAttribute(\"kui-index\") ?? 0)\n\n/**\n * `<kui-carousel>` around `kui-part=\"root\"`, a `viewport` with an `item` for each slide\n * (`kui-index`, from 0), `previous` and `next` buttons, and an `indicator` button for a slide\n * (`kui-index`). `index`, `default-index`, `orientation`, `loop`; it tells `index-change`.\n */\nexport const tag = defineElement<CarouselProps, Carousel>({\n tag: \"kui-carousel\",\n props: { index: \"number\", \"default-index\": \"number\", orientation: \"string\", loop: \"boolean\" },\n create: (props) => createCarousel(props),\n changes: { onIndexChange: { event: \"index-change\", prop: \"index\" } },\n parts: {\n root: (controller) => controller.root,\n viewport: (controller) => controller.viewport,\n item: (controller, element) => controller.item(indexOf(element)),\n previous: (controller) => controller.previous,\n next: (controller) => controller.next,\n indicator: (controller, element) => controller.indicator(indexOf(element)),\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-carousel\": ElementOf<typeof tag, { \"index-change\": [\"onIndexChange\", \"index\"] }>\n }\n}\n"],"mappings":";;;AAMA,MAAM,WAAW,YAAyB,OAAO,QAAQ,aAAa,WAAW,KAAK,CAAC;;;;;;AAOvF,MAAa,MAAM,cAAuC;CACxD,KAAK;CACL,OAAO;EAAE,OAAO;EAAU,iBAAiB;EAAU,aAAa;EAAU,MAAM;CAAU;CAC5F,SAAS,UAAU,eAAe,KAAK;CACvC,SAAS,EAAE,eAAe;EAAE,OAAO;EAAgB,MAAM;CAAQ,EAAE;CACnE,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,WAAW,eAAe,WAAW;EACrC,OAAO,YAAY,YAAY,WAAW,KAAK,QAAQ,OAAO,CAAC;EAC/D,WAAW,eAAe,WAAW;EACrC,OAAO,eAAe,WAAW;EACjC,YAAY,YAAY,YAAY,WAAW,UAAU,QAAQ,OAAO,CAAC;CAC3E;AACF,CAAC"}
@@ -0,0 +1,22 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { CheckboxGroup, CheckboxGroupProps } from "@kirana-ui/core/checkbox-group";
3
+ type Props = Omit<CheckboxGroupProps, "value" | "defaultValue" | "allValues"> & {
4
+ value?: string | readonly string[];
5
+ defaultValue?: string | readonly string[];
6
+ allValues?: string | readonly string[];
7
+ };
8
+ /**
9
+ * `<kui-checkbox-group>` around `kui-part="root"` and its `<kui-checkbox>`es, each with a
10
+ * `value`; one marked `parent` stands for every value of `all-values`. `value`,
11
+ * `default-value` and `all-values` (with commas between), `disabled`; it tells `value-change`.
12
+ */
13
+ export declare const tag: Tag<Props, CheckboxGroup>;
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ "kui-checkbox-group": ElementOf<typeof tag, {
17
+ "value-change": ["onValueChange", "value"];
18
+ }>;
19
+ }
20
+ }
21
+ export {};
22
+ //# sourceMappingURL=checkbox-group.d.ts.map
@@ -0,0 +1,36 @@
1
+ import { fieldAround, list } from "./around.js";
2
+ import { defineElement } from "./runtime.js";
3
+ import { computed } from "@kirana-ui/core";
4
+ import { createCheckboxGroup } from "@kirana-ui/core/checkbox-group";
5
+ // src/checkbox-group.ts
6
+ /**
7
+ * `<kui-checkbox-group>` around `kui-part="root"` and its `<kui-checkbox>`es, each with a
8
+ * `value`; one marked `parent` stands for every value of `all-values`. `value`,
9
+ * `default-value` and `all-values` (with commas between), `disabled`; it tells `value-change`.
10
+ */
11
+ const tag = defineElement({
12
+ tag: "kui-checkbox-group",
13
+ props: {
14
+ value: "string",
15
+ "default-value": "string",
16
+ "all-values": "string",
17
+ disabled: "boolean"
18
+ },
19
+ create: (props, host) => createCheckboxGroup(computed(() => {
20
+ const own = props.get();
21
+ return {
22
+ ...own,
23
+ value: list(own.value),
24
+ defaultValue: list(own.defaultValue),
25
+ allValues: list(own.allValues)
26
+ };
27
+ }), { field: fieldAround(host) }),
28
+ changes: { onValueChange: {
29
+ event: "value-change",
30
+ prop: "value"
31
+ } },
32
+ parts: { root: (controller) => controller.root }
33
+ });
34
+ export { tag };
35
+
36
+ //# sourceMappingURL=checkbox-group.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"checkbox-group.js","names":[],"sources":["../../../../packages/web/src/checkbox-group.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createCheckboxGroup } from \"@kirana-ui/core/checkbox-group\"\nimport type { CheckboxGroup, CheckboxGroupProps } from \"@kirana-ui/core/checkbox-group\"\n\nimport { fieldAround, list } from \"./around.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\ntype Props = Omit<CheckboxGroupProps, \"value\" | \"defaultValue\" | \"allValues\"> & {\n value?: string | readonly string[]\n defaultValue?: string | readonly string[]\n allValues?: string | readonly string[]\n}\n\n/**\n * `<kui-checkbox-group>` around `kui-part=\"root\"` and its `<kui-checkbox>`es, each with a\n * `value`; one marked `parent` stands for every value of `all-values`. `value`,\n * `default-value` and `all-values` (with commas between), `disabled`; it tells `value-change`.\n */\nexport const tag = defineElement<Props, CheckboxGroup>({\n tag: \"kui-checkbox-group\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n \"all-values\": \"string\",\n disabled: \"boolean\",\n },\n create: (props, host) =>\n createCheckboxGroup(\n computed(() => {\n const own = props.get()\n return {\n ...own,\n value: list(own.value),\n defaultValue: list(own.defaultValue),\n allValues: list(own.allValues),\n }\n }),\n { field: fieldAround(host) }\n ),\n changes: { onValueChange: { event: \"value-change\", prop: \"value\" } },\n parts: { root: (controller) => controller.root },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-checkbox-group\": ElementOf<typeof tag, { \"value-change\": [\"onValueChange\", \"value\"] }>\n }\n}\n"],"mappings":";;;;;;;;;;AAmBA,MAAa,MAAM,cAAoC;CACrD,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,cAAc;EACd,UAAU;CACZ;CACA,SAAS,OAAO,SACd,oBACE,eAAe;EACb,MAAM,MAAM,MAAM,IAAI;EACtB,OAAO;GACL,GAAG;GACH,OAAO,KAAK,IAAI,KAAK;GACrB,cAAc,KAAK,IAAI,YAAY;GACnC,WAAW,KAAK,IAAI,SAAS;EAC/B;CACF,CAAC,GACD,EAAE,OAAO,YAAY,IAAI,EAAE,CAC7B;CACF,SAAS,EAAE,eAAe;EAAE,OAAO;EAAgB,MAAM;CAAQ,EAAE;CACnE,OAAO,EAAE,OAAO,eAAe,WAAW,KAAK;AACjD,CAAC"}
package/src/checkbox.d.ts CHANGED
@@ -1,8 +1,21 @@
1
+ import { As, ElementOf, Tag } from "./runtime.js";
2
+ import { CheckboxProps } from "@kirana-ui/core/checkbox";
1
3
  /**
2
4
  * `<kui-checkbox>` around a `kui-part="root"` button with an `indicator` inside, which is in
3
5
  * the page while the box is checked or indeterminate. The root draws the hidden native input a
4
- * form and a label reach. `checked`, `default-checked`, `indeterminate`, `disabled`,
5
- * `read-only`, `required`, `name`, `form`, `value`; it tells `checked-change`.
6
+ * form and a label reach. Inside a `<kui-checkbox-group>` it is one of the group's boxes, by
7
+ * its `value`, or with `parent` the one that stands for them all. `checked`, `default-checked`,
8
+ * `indeterminate`, `parent`, `disabled`, `read-only`, `required`, `name`, `form`, `value`; it
9
+ * tells `checked-change`.
6
10
  */
7
- export declare const tag: string;
11
+ export declare const tag: Tag<{
12
+ id: string;
13
+ }, import("@kirana-ui/core/checkbox").Checkbox>;
14
+ declare global {
15
+ interface HTMLElementTagNameMap {
16
+ "kui-checkbox": ElementOf<As<typeof tag, CheckboxProps>, {
17
+ "checked-change": ["onCheckedChange", "checked"];
18
+ }>;
19
+ }
20
+ }
8
21
  //# sourceMappingURL=checkbox.d.ts.map
package/src/checkbox.js CHANGED
@@ -1,12 +1,14 @@
1
1
  import { fieldAround } from "./around.js";
2
- import { defineElement } from "./runtime.js";
2
+ import { controllerAround, defineElement } from "./runtime.js";
3
3
  import { createCheckbox } from "@kirana-ui/core/checkbox";
4
4
  // src/checkbox.ts
5
5
  /**
6
6
  * `<kui-checkbox>` around a `kui-part="root"` button with an `indicator` inside, which is in
7
7
  * the page while the box is checked or indeterminate. The root draws the hidden native input a
8
- * form and a label reach. `checked`, `default-checked`, `indeterminate`, `disabled`,
9
- * `read-only`, `required`, `name`, `form`, `value`; it tells `checked-change`.
8
+ * form and a label reach. Inside a `<kui-checkbox-group>` it is one of the group's boxes, by
9
+ * its `value`, or with `parent` the one that stands for them all. `checked`, `default-checked`,
10
+ * `indeterminate`, `parent`, `disabled`, `read-only`, `required`, `name`, `form`, `value`; it
11
+ * tells `checked-change`.
10
12
  */
11
13
  const tag = defineElement({
12
14
  tag: "kui-checkbox",
@@ -14,6 +16,7 @@ const tag = defineElement({
14
16
  checked: "boolean",
15
17
  "default-checked": "boolean",
16
18
  indeterminate: "boolean",
19
+ parent: "boolean",
17
20
  disabled: "boolean",
18
21
  "read-only": "boolean",
19
22
  required: "boolean",
@@ -21,7 +24,10 @@ const tag = defineElement({
21
24
  form: "string",
22
25
  value: "string"
23
26
  },
24
- create: (props, host) => createCheckbox(props, { field: fieldAround(host) }),
27
+ create: (props, host) => createCheckbox(props, {
28
+ field: fieldAround(host),
29
+ group: controllerAround(host, "kui-checkbox-group")
30
+ }),
25
31
  changes: { onCheckedChange: {
26
32
  event: "checked-change",
27
33
  prop: "checked"
@@ -1 +1 @@
1
- {"version":3,"file":"checkbox.js","names":[],"sources":["../../../../packages/web/src/checkbox.ts"],"sourcesContent":["import { createCheckbox } from \"@kirana-ui/core/checkbox\"\n\nimport { fieldAround } from \"./around.ts\"\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-checkbox>` around a `kui-part=\"root\"` button with an `indicator` inside, which is in\n * the page while the box is checked or indeterminate. The root draws the hidden native input a\n * form and a label reach. `checked`, `default-checked`, `indeterminate`, `disabled`,\n * `read-only`, `required`, `name`, `form`, `value`; it tells `checked-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-checkbox\",\n props: {\n checked: \"boolean\",\n \"default-checked\": \"boolean\",\n indeterminate: \"boolean\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n value: \"string\",\n },\n create: (props, host) => createCheckbox(props, { field: fieldAround(host) }),\n changes: { onCheckedChange: { event: \"checked-change\", prop: \"checked\" } },\n parts: {\n root: (controller) => ({ part: controller.root, inner: controller.input }),\n indicator: (controller) => ({\n mounted: controller.indicatorMounted,\n part: controller.indicator,\n }),\n },\n})\n"],"mappings":";;;;;;;;;;AAWA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EACL,SAAS;EACT,mBAAmB;EACnB,eAAe;EACf,UAAU;EACV,aAAa;EACb,UAAU;EACV,MAAM;EACN,MAAM;EACN,OAAO;CACT;CACA,SAAS,OAAO,SAAS,eAAe,OAAO,EAAE,OAAO,YAAY,IAAI,EAAE,CAAC;CAC3E,SAAS,EAAE,iBAAiB;EAAE,OAAO;EAAkB,MAAM;CAAU,EAAE;CACzE,OAAO;EACL,OAAO,gBAAgB;GAAE,MAAM,WAAW;GAAM,OAAO,WAAW;EAAM;EACxE,YAAY,gBAAgB;GAC1B,SAAS,WAAW;GACpB,MAAM,WAAW;EACnB;CACF;AACF,CAAC"}
1
+ {"version":3,"file":"checkbox.js","names":[],"sources":["../../../../packages/web/src/checkbox.ts"],"sourcesContent":["import { createCheckbox } from \"@kirana-ui/core/checkbox\"\nimport type { CheckboxGroupLink, CheckboxProps } from \"@kirana-ui/core/checkbox\"\n\nimport { fieldAround } from \"./around.ts\"\nimport { controllerAround, defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\ntype Group = { readonly link: CheckboxGroupLink }\n\n/**\n * `<kui-checkbox>` around a `kui-part=\"root\"` button with an `indicator` inside, which is in\n * the page while the box is checked or indeterminate. The root draws the hidden native input a\n * form and a label reach. Inside a `<kui-checkbox-group>` it is one of the group's boxes, by\n * its `value`, or with `parent` the one that stands for them all. `checked`, `default-checked`,\n * `indeterminate`, `parent`, `disabled`, `read-only`, `required`, `name`, `form`, `value`; it\n * tells `checked-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-checkbox\",\n props: {\n checked: \"boolean\",\n \"default-checked\": \"boolean\",\n indeterminate: \"boolean\",\n parent: \"boolean\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n value: \"string\",\n },\n create: (props, host) =>\n createCheckbox(props, {\n field: fieldAround(host),\n group: controllerAround<Group>(host, \"kui-checkbox-group\"),\n }),\n changes: { onCheckedChange: { event: \"checked-change\", prop: \"checked\" } },\n parts: {\n root: (controller) => ({ part: controller.root, inner: controller.input }),\n indicator: (controller) => ({\n mounted: controller.indicatorMounted,\n part: controller.indicator,\n }),\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-checkbox\": ElementOf<\n As<typeof tag, CheckboxProps>,\n { \"checked-change\": [\"onCheckedChange\", \"checked\"] }\n >\n }\n}\n"],"mappings":";;;;;;;;;;;;AAiBA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EACL,SAAS;EACT,mBAAmB;EACnB,eAAe;EACf,QAAQ;EACR,UAAU;EACV,aAAa;EACb,UAAU;EACV,MAAM;EACN,MAAM;EACN,OAAO;CACT;CACA,SAAS,OAAO,SACd,eAAe,OAAO;EACpB,OAAO,YAAY,IAAI;EACvB,OAAO,iBAAwB,MAAM,oBAAoB;CAC3D,CAAC;CACH,SAAS,EAAE,iBAAiB;EAAE,OAAO;EAAkB,MAAM;CAAU,EAAE;CACzE,OAAO;EACL,OAAO,gBAAgB;GAAE,MAAM,WAAW;GAAM,OAAO,WAAW;EAAM;EACxE,YAAY,gBAAgB;GAC1B,SAAS,WAAW;GACpB,MAAM,WAAW;EACnB;CACF;AACF,CAAC"}
@@ -1,7 +1,16 @@
1
+ import { As, ElementOf, Tag } from "./runtime.js";
2
+ import { CollapsibleProps } from "@kirana-ui/core/collapsible";
1
3
  /**
2
4
  * `<kui-collapsible>` around `kui-part="root"`, a `trigger` button and a `panel`, which is in
3
5
  * the page while it is open (`kui-keep-mounted` keeps it). `open`, `default-open`, `disabled`; it
4
6
  * tells `open-change`.
5
7
  */
6
- export declare const tag: string;
8
+ export declare const tag: Tag<CollapsibleProps, import("@kirana-ui/core/collapsible").Collapsible>;
9
+ declare global {
10
+ interface HTMLElementTagNameMap {
11
+ "kui-collapsible": ElementOf<As<typeof tag, CollapsibleProps>, {
12
+ "open-change": ["onOpenChange", "open"];
13
+ }>;
14
+ }
15
+ }
7
16
  //# sourceMappingURL=collapsible.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"collapsible.js","names":[],"sources":["../../../../packages/web/src/collapsible.ts"],"sourcesContent":["import { createCollapsible } from \"@kirana-ui/core/collapsible\"\n\nimport { defineElement } from \"./runtime.ts\"\n\n/**\n * `<kui-collapsible>` around `kui-part=\"root\"`, a `trigger` button and a `panel`, which is in\n * the page while it is open (`kui-keep-mounted` keeps it). `open`, `default-open`, `disabled`; it\n * tells `open-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-collapsible\",\n props: { open: \"boolean\", \"default-open\": \"boolean\", disabled: \"boolean\" },\n create: createCollapsible,\n changes: { onOpenChange: { event: \"open-change\", prop: \"open\" } },\n parts: {\n root: (controller) => controller.root,\n trigger: (controller) => controller.trigger,\n panel: (controller) => ({ mounted: controller.mounted, part: controller.panel }),\n },\n})\n"],"mappings":";;;;;;;;AASA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EAAE,MAAM;EAAW,gBAAgB;EAAW,UAAU;CAAU;CACzE,QAAQ;CACR,SAAS,EAAE,cAAc;EAAE,OAAO;EAAe,MAAM;CAAO,EAAE;CAChE,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,UAAU,eAAe,WAAW;EACpC,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;CAChF;AACF,CAAC"}
1
+ {"version":3,"file":"collapsible.js","names":[],"sources":["../../../../packages/web/src/collapsible.ts"],"sourcesContent":["import { createCollapsible } from \"@kirana-ui/core/collapsible\"\nimport type { CollapsibleProps } from \"@kirana-ui/core/collapsible\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-collapsible>` around `kui-part=\"root\"`, a `trigger` button and a `panel`, which is in\n * the page while it is open (`kui-keep-mounted` keeps it). `open`, `default-open`, `disabled`; it\n * tells `open-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-collapsible\",\n props: { open: \"boolean\", \"default-open\": \"boolean\", disabled: \"boolean\" },\n create: createCollapsible,\n changes: { onOpenChange: { event: \"open-change\", prop: \"open\" } },\n parts: {\n root: (controller) => controller.root,\n trigger: (controller) => controller.trigger,\n panel: (controller) => ({ mounted: controller.mounted, part: controller.panel }),\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-collapsible\": ElementOf<\n As<typeof tag, CollapsibleProps>,\n { \"open-change\": [\"onOpenChange\", \"open\"] }\n >\n }\n}\n"],"mappings":";;;;;;;;AAWA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EAAE,MAAM;EAAW,gBAAgB;EAAW,UAAU;CAAU;CACzE,QAAQ;CACR,SAAS,EAAE,cAAc;EAAE,OAAO;EAAe,MAAM;CAAO,EAAE;CAChE,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,UAAU,eAAe,WAAW;EACpC,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;CAChF;AACF,CAAC"}
package/src/combobox.d.ts CHANGED
@@ -1,27 +1,57 @@
1
- import { Drawn, Each } from "./runtime.js";
2
- import { Combobox } from "@kirana-ui/core/combobox";
1
+ import { Drawn, Each, ElementOf, Tag } from "./runtime.js";
2
+ import { Placed } from "./around.js";
3
+ import { Combobox, ComboboxEntry, ComboboxProps } from "@kirana-ui/core/combobox";
4
+ type Props = Omit<ComboboxProps<string>, "values" | "defaultValues"> & {
5
+ values?: string | readonly string[];
6
+ defaultValues?: string | readonly string[];
7
+ };
3
8
  type Parts = Record<string, (controller: Combobox<string>, element: HTMLElement) => Drawn["part"] | Drawn | undefined>;
4
9
  /** A combobox's parts: an autocomplete has them too. */
5
10
  export declare const PARTS: Parts;
6
- /** With `multiple`: a chip for each chosen value, from a `<template kui-each="chips">`. */
11
+ /**
12
+ * With `multiple`: a chip for each chosen value, from a `<template kui-each="chips">`. With
13
+ * `items` as data: what is left of them, from a `<template kui-each="collection">`; one
14
+ * written in a group's copy is that group's items left.
15
+ */
7
16
  export declare const LISTS: {
8
17
  chips: (controller: Combobox<string>) => Each<{
9
18
  value: string;
10
19
  }>;
20
+ collection: (controller: Combobox<string>, around: unknown) => Each<ComboboxEntry<string>>;
11
21
  };
12
22
  /**
13
23
  * `<kui-combobox>` around an `input`, with a `trigger` and a `clear` button if it has them,
14
- * and a `portal` with a `positioner` around the `popup`, which holds an `item` for each
24
+ * and a `portal` with a `positioner` (`kui-side` … and `kui-anchor`, an element's id) around
25
+ * the `popup`, which holds an `item` for each
15
26
  * `kui-value` (`kui-disabled`, `kui-label`, `kui-id`) with an `item-indicator`, in `group`s
16
27
  * with a `group-label` and `separator`s if it has them, and an `empty` part drawn while
17
- * nothing matches. With `multiple`, the input is in a `chips` part with a
28
+ * nothing matches. The `input` may be inside the `popup`, the items then in a `list` part: the
29
+ * popup is placed against the `trigger`, and the input has focus while it is open. With `multiple`, the input is in a `chips` part with a
18
30
  * `<template kui-each="chips">` holding a `chip` (`{value}`) and its `chip-remove` button.
31
+ * With the input in the popup, the `trigger` may hold a `value` part: it says the chosen
32
+ * value's label, or its `kui-placeholder`. A `status` part says how the list stands to
33
+ * software that reads the page, as the page changes its text. With `items` given as data, the
34
+ * list is a `<template kui-each="collection">` holding an `item` (`kui-value="{value}"`,
35
+ * `{label}`; `kui-when="item"` where groups are given too) or a `group`
36
+ * (`kui-when="group"`, `{value}` its name) with a `<template kui-each="collection">` of its
37
+ * own for its items: the element filters, and draws what is left.
19
38
  * With a name it draws the hidden input a form reads. `value`,
20
39
  * `default-value`, `input-value`, `default-input-value`, `open`, `default-open`, `disabled`,
21
- * `required`, `inline`, `multiple`, `values` and `default-values` (with commas between),
40
+ * `read-only`, `required`, `inline`, `auto-highlight`, `multiple`, `values` and `default-values` (with
41
+ * commas between),
22
42
  * `name`, `form`; `items` and `filter` as properties; it tells `value-change`,
23
43
  * `values-change`, `input-value-change` and `open-change`.
24
44
  */
25
- export declare const tag: string;
45
+ export declare const tag: Tag<Props, Combobox<string>>;
46
+ declare global {
47
+ interface HTMLElementTagNameMap {
48
+ "kui-combobox": ElementOf<typeof tag, {
49
+ "value-change": ["onValueChange", "value"];
50
+ "values-change": ["onValuesChange", "values"];
51
+ "input-value-change": ["onInputValueChange", "inputValue"];
52
+ "open-change": ["onOpenChange", "open"];
53
+ }> & Placed;
54
+ }
55
+ }
26
56
  export {};
27
57
  //# sourceMappingURL=combobox.d.ts.map