@kirana-ui/web 0.2.0 → 0.4.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 (132) hide show
  1. package/CHANGELOG.md +140 -0
  2. package/llms.txt +1598 -143
  3. package/package.json +48 -3
  4. package/skills/kirana-ui-primitives/SKILL.md +53 -12
  5. package/src/accordion.d.ts +1 -1
  6. package/src/accordion.js +2 -1
  7. package/src/accordion.js.map +1 -1
  8. package/src/alert-dialog.d.ts +2 -2
  9. package/src/alert-dialog.js +9 -4
  10. package/src/alert-dialog.js.map +1 -1
  11. package/src/around.d.ts +28 -4
  12. package/src/around.js +46 -13
  13. package/src/around.js.map +1 -1
  14. package/src/autocomplete.d.ts +7 -4
  15. package/src/autocomplete.js +8 -4
  16. package/src/autocomplete.js.map +1 -1
  17. package/src/avatar.d.ts +11 -5
  18. package/src/avatar.js +41 -12
  19. package/src/avatar.js.map +1 -1
  20. package/src/button.d.ts +2 -1
  21. package/src/button.js +2 -1
  22. package/src/button.js.map +1 -1
  23. package/src/calendar.d.ts +9 -5
  24. package/src/calendar.js +22 -9
  25. package/src/calendar.js.map +1 -1
  26. package/src/carousel.d.ts +1 -1
  27. package/src/carousel.js +4 -2
  28. package/src/carousel.js.map +1 -1
  29. package/src/checkbox-group.d.ts +22 -0
  30. package/src/checkbox-group.js +36 -0
  31. package/src/checkbox-group.js.map +1 -0
  32. package/src/checkbox.d.ts +4 -2
  33. package/src/checkbox.js +10 -4
  34. package/src/checkbox.js.map +1 -1
  35. package/src/color-picker.d.ts +28 -0
  36. package/src/color-picker.js +81 -0
  37. package/src/color-picker.js.map +1 -0
  38. package/src/combobox.d.ts +27 -7
  39. package/src/combobox.js +79 -17
  40. package/src/combobox.js.map +1 -1
  41. package/src/command.d.ts +3 -3
  42. package/src/command.js +6 -5
  43. package/src/command.js.map +1 -1
  44. package/src/context-menu.d.ts +2 -1
  45. package/src/context-menu.js.map +1 -1
  46. package/src/date-field.d.ts +2 -2
  47. package/src/date-field.js +3 -3
  48. package/src/date-field.js.map +1 -1
  49. package/src/date-picker.d.ts +14 -8
  50. package/src/date-picker.js +49 -10
  51. package/src/date-picker.js.map +1 -1
  52. package/src/dates.d.ts +11 -5
  53. package/src/dates.js +58 -20
  54. package/src/dates.js.map +1 -1
  55. package/src/dialog.d.ts +3 -2
  56. package/src/dialog.js +12 -4
  57. package/src/dialog.js.map +1 -1
  58. package/src/drawer.d.ts +2 -1
  59. package/src/drawer.js +7 -3
  60. package/src/drawer.js.map +1 -1
  61. package/src/editable.d.ts +21 -0
  62. package/src/editable.js +56 -0
  63. package/src/editable.js.map +1 -0
  64. package/src/file-upload.d.ts +23 -0
  65. package/src/file-upload.js +98 -0
  66. package/src/file-upload.js.map +1 -0
  67. package/src/hover-card.d.ts +2 -1
  68. package/src/hover-card.js.map +1 -1
  69. package/src/index.d.ts +29 -7
  70. package/src/index.js +11 -0
  71. package/src/menu.d.ts +4 -3
  72. package/src/menu.js +19 -10
  73. package/src/menu.js.map +1 -1
  74. package/src/menubar.d.ts +2 -2
  75. package/src/menubar.js +5 -3
  76. package/src/menubar.js.map +1 -1
  77. package/src/navigation-menu.d.ts +4 -3
  78. package/src/navigation-menu.js +10 -6
  79. package/src/navigation-menu.js.map +1 -1
  80. package/src/number-field.d.ts +5 -2
  81. package/src/number-field.js +23 -3
  82. package/src/number-field.js.map +1 -1
  83. package/src/otp.d.ts +4 -2
  84. package/src/otp.js +24 -4
  85. package/src/otp.js.map +1 -1
  86. package/src/password-input.d.ts +20 -0
  87. package/src/password-input.js +39 -0
  88. package/src/password-input.js.map +1 -0
  89. package/src/popover.d.ts +8 -7
  90. package/src/popover.js +33 -5
  91. package/src/popover.js.map +1 -1
  92. package/src/radio-group.d.ts +2 -1
  93. package/src/radio-group.js +9 -2
  94. package/src/radio-group.js.map +1 -1
  95. package/src/rating.d.ts +18 -0
  96. package/src/rating.js +54 -0
  97. package/src/rating.js.map +1 -0
  98. package/src/runtime.d.ts +9 -4
  99. package/src/runtime.js +8 -5
  100. package/src/runtime.js.map +1 -1
  101. package/src/select.d.ts +12 -4
  102. package/src/select.js +33 -10
  103. package/src/select.js.map +1 -1
  104. package/src/slider.d.ts +2 -2
  105. package/src/slider.js +3 -2
  106. package/src/slider.js.map +1 -1
  107. package/src/steps.d.ts +17 -0
  108. package/src/steps.js +47 -0
  109. package/src/steps.js.map +1 -0
  110. package/src/tags-input.d.ts +35 -0
  111. package/src/tags-input.js +96 -0
  112. package/src/tags-input.js.map +1 -0
  113. package/src/time-field.d.ts +18 -0
  114. package/src/time-field.js +54 -0
  115. package/src/time-field.js.map +1 -0
  116. package/src/toast.d.ts +4 -3
  117. package/src/toast.js +6 -4
  118. package/src/toast.js.map +1 -1
  119. package/src/toggle-group.d.ts +1 -1
  120. package/src/toggle-group.js +2 -1
  121. package/src/toggle-group.js.map +1 -1
  122. package/src/toolbar.d.ts +0 -6
  123. package/src/toolbar.js +14 -3
  124. package/src/toolbar.js.map +1 -1
  125. package/src/tooltip.d.ts +2 -1
  126. package/src/tooltip.js.map +1 -1
  127. package/src/tour.d.ts +27 -0
  128. package/src/tour.js +62 -0
  129. package/src/tour.js.map +1 -0
  130. package/src/tree.d.ts +29 -0
  131. package/src/tree.js +99 -0
  132. package/src/tree.js.map +1 -0
package/src/dates.d.ts CHANGED
@@ -2,9 +2,12 @@ import { Drawn, Each } from "./runtime.js";
2
2
  import { Calendar } from "@kirana-ui/core/calendar";
3
3
  import { DateField } from "@kirana-ui/core/date-field";
4
4
  type Parts<Controller> = Record<string, (controller: Controller, element: HTMLElement) => Drawn["part"] | Drawn | undefined>;
5
- type Lists<Controller> = Record<string, (controller: Controller, around: unknown) => Each>;
6
- /** A date field's parts and its list, for a component that is one or holds one. */
7
- export declare function fieldParts<Controller>(of: (controller: Controller) => DateField): {
5
+ type Lists<Controller> = Record<string, (controller: Controller, around: unknown, template: HTMLElement) => Each>;
6
+ /**
7
+ * A date field's parts and its list, for a component that is one or holds one. `of` is given
8
+ * the element a part is written on, for a component of several fields.
9
+ */
10
+ export declare function fieldParts<Controller>(of: (controller: Controller, element: HTMLElement) => DateField): {
8
11
  parts: Parts<Controller>;
9
12
  lists: Lists<Controller>;
10
13
  };
@@ -13,7 +16,10 @@ export declare function calendarParts<Controller>(of: (controller: Controller) =
13
16
  parts: Parts<Controller>;
14
17
  lists: Lists<Controller>;
15
18
  };
16
- /** A calendar's value as an attribute writes it: a day, or several with commas between. */
17
- export declare const days: (given: unknown) => unknown;
19
+ /**
20
+ * A calendar's value as an attribute writes it: a day, or several with commas between (a
21
+ * range's first and last, or a list's days).
22
+ */
23
+ export declare function days(given: unknown, mode?: unknown): unknown;
18
24
  export {};
19
25
  //# sourceMappingURL=dates.d.ts.map
package/src/dates.js CHANGED
@@ -1,49 +1,59 @@
1
1
  import { entryAround } from "./runtime.js";
2
2
  // src/dates.ts
3
- /** A date field's parts and its list, for a component that is one or holds one. */
3
+ /**
4
+ * A date field's parts and its list, for a component that is one or holds one. `of` is given
5
+ * the element a part is written on, for a component of several fields.
6
+ */
4
7
  function fieldParts(of) {
5
8
  return {
6
9
  parts: {
7
10
  segment(controller, element) {
8
11
  const segment = entryAround(element);
9
12
  if (!segment) return void 0;
10
- const { part, text } = of(controller).segment(segment);
13
+ const { part, text } = of(controller, element).segment(segment);
11
14
  return {
12
15
  part,
13
16
  text
14
17
  };
15
18
  },
16
- input: (controller) => of(controller).input
19
+ input: (controller, element) => of(controller, element).input
17
20
  },
18
- lists: { segments: (controller) => ({
19
- entries: of(controller).segments,
21
+ lists: { segments: (controller, _around, template) => ({
22
+ entries: of(controller, template).segments,
20
23
  key: (segment) => `${segment.index}-${segment.type}`
21
24
  }) }
22
25
  };
23
26
  }
27
+ const isMonth = (entry) => typeof entry === "object" && entry !== null && "weeks" in entry && "title" in entry;
28
+ /** The month a part is written in, in a `months` template: its place among those shown. */
29
+ const monthAround = (element) => entryAround(element, isMonth)?.index;
24
30
  /** A calendar's parts and its lists, for a component that is one or holds one. */
25
31
  function calendarParts(of) {
26
32
  const date = (element) => entryAround(element)?.date;
33
+ const month = (controller, element) => of(controller).monthAt(monthAround(element) ?? 0);
27
34
  return {
28
35
  parts: {
29
- heading: (controller) => ({
30
- part: of(controller).heading,
31
- text: of(controller).title
32
- }),
36
+ heading(controller, element) {
37
+ const shown = month(controller, element);
38
+ return {
39
+ part: shown.heading,
40
+ text: shown.title
41
+ };
42
+ },
33
43
  previous: (controller) => of(controller).previous,
34
44
  next: (controller) => of(controller).next,
35
- grid: (controller) => of(controller).grid,
45
+ grid: (controller, element) => month(controller, element).grid,
36
46
  "head-cell"(controller, element) {
37
47
  const weekday = entryAround(element);
38
48
  return weekday && of(controller).headCell(weekday);
39
49
  },
40
50
  cell(controller, element) {
41
51
  const day = date(element);
42
- return day === void 0 ? void 0 : of(controller).cell(day);
52
+ return day === void 0 ? void 0 : of(controller).cell(day, monthAround(element));
43
53
  },
44
54
  day(controller, element) {
45
55
  const day = date(element);
46
- return day === void 0 ? void 0 : of(controller).day(day);
56
+ return day === void 0 ? void 0 : of(controller).day(day, monthAround(element));
47
57
  }
48
58
  },
49
59
  lists: {
@@ -51,20 +61,48 @@ function calendarParts(of) {
51
61
  entries: of(controller).weekdays,
52
62
  key: (weekday) => weekday.index
53
63
  }),
54
- weeks: (controller) => ({
55
- entries: of(controller).weeks,
64
+ months: (controller) => ({
65
+ entries: of(controller).months,
66
+ key: (shown) => shown.index,
67
+ values: (shown) => ({
68
+ index: shown.index,
69
+ month: shown.month,
70
+ title: shown.title
71
+ })
72
+ }),
73
+ weeks: (controller, around) => ({
74
+ entries: isMonth(around) ? of(controller).monthAt(around.index).weeks : of(controller).weeks,
56
75
  key: (week) => week[0].date,
57
76
  values: () => ({})
58
77
  }),
59
- days: (_controller, week) => ({
60
- entries: week ?? [],
61
- key: (day) => day.date
62
- })
78
+ days(controller, week) {
79
+ const row = week ?? [];
80
+ const shown = of(controller).months.peek().find((each) => each.weeks.includes(row));
81
+ return {
82
+ entries: row,
83
+ key: (day) => day.date,
84
+ values: (day) => ({
85
+ ...day,
86
+ monthIndex: shown?.index ?? 0
87
+ })
88
+ };
89
+ }
63
90
  }
64
91
  };
65
92
  }
66
- /** A calendar's value as an attribute writes it: a day, or several with commas between. */
67
- const days = (given) => typeof given === "string" && given.includes(",") ? given.split(",") : given;
93
+ /**
94
+ * A calendar's value as an attribute writes it: a day, or several with commas between (a
95
+ * range's first and last, or a list's days).
96
+ */
97
+ function days(given, mode) {
98
+ const list = typeof given === "string" && given.includes(",") ? given.split(",") : given;
99
+ if (mode === "range" && Array.isArray(list)) return {
100
+ start: list[0],
101
+ end: list[1] ?? list[0]
102
+ };
103
+ if (mode === "multiple" && typeof list === "string") return list === "" ? [] : [list];
104
+ return list;
105
+ }
68
106
  export { calendarParts, days, fieldParts };
69
107
 
70
108
  //# sourceMappingURL=dates.js.map
package/src/dates.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dates.js","names":[],"sources":["../../../../packages/web/src/dates.ts"],"sourcesContent":["import type { Calendar, CalendarDay, CalendarWeekday } from \"@kirana-ui/core/calendar\"\nimport type { DateField, DateFieldSegment } from \"@kirana-ui/core/date-field\"\n\nimport { entryAround } from \"./runtime.ts\"\nimport type { Drawn, Each } from \"./runtime.ts\"\n\ntype Parts<Controller> = Record<\n string,\n (controller: Controller, element: HTMLElement) => Drawn[\"part\"] | Drawn | undefined\n>\ntype Lists<Controller> = Record<string, (controller: Controller, around: unknown) => Each>\n\n/** A date field's parts and its list, for a component that is one or holds one. */\nexport function fieldParts<Controller>(of: (controller: Controller) => DateField) {\n const parts: Parts<Controller> = {\n segment(controller, element) {\n const segment = entryAround<DateFieldSegment>(element)\n if (!segment) return undefined\n const { part, text } = of(controller).segment(segment)\n return { part, text }\n },\n input: (controller) => of(controller).input,\n }\n const lists: Lists<Controller> = {\n segments: (controller) => ({\n entries: of(controller).segments,\n key: (segment: DateFieldSegment) => `${segment.index}-${segment.type}`,\n }),\n }\n return { parts, lists }\n}\n\n/** A calendar's parts and its lists, for a component that is one or holds one. */\nexport function calendarParts<Controller>(of: (controller: Controller) => Calendar) {\n const date = (element: HTMLElement) => entryAround<CalendarDay>(element)?.date\n const parts: Parts<Controller> = {\n heading: (controller) => ({ part: of(controller).heading, text: of(controller).title }),\n previous: (controller) => of(controller).previous,\n next: (controller) => of(controller).next,\n grid: (controller) => of(controller).grid,\n \"head-cell\"(controller, element) {\n const weekday = entryAround<CalendarWeekday>(element)\n return weekday && of(controller).headCell(weekday)\n },\n cell(controller, element) {\n const day = date(element)\n return day === undefined ? undefined : of(controller).cell(day)\n },\n day(controller, element) {\n const day = date(element)\n return day === undefined ? undefined : of(controller).day(day)\n },\n }\n const lists: Lists<Controller> = {\n weekdays: (controller) => ({\n entries: of(controller).weekdays,\n key: (weekday: CalendarWeekday) => weekday.index,\n }),\n weeks: (controller) => ({\n entries: of(controller).weeks,\n key: (week: readonly CalendarDay[]) => week[0]!.date,\n values: () => ({}),\n }),\n // Written in a week's row: that week's days.\n days: (_controller, week) => ({\n entries: (week as readonly CalendarDay[] | undefined) ?? [],\n key: (day: CalendarDay) => day.date,\n }),\n }\n return { parts, lists }\n}\n\n/** A calendar's value as an attribute writes it: a day, or several with commas between. */\nexport const days = (given: unknown): unknown =>\n typeof given === \"string\" && given.includes(\",\") ? given.split(\",\") : given\n"],"mappings":";;;AAaA,SAAgB,WAAuB,IAA2C;CAgBhF,OAAO;EAAE,OAAA;GAdP,QAAQ,YAAY,SAAS;IAC3B,MAAM,UAAU,YAA8B,OAAO;IACrD,IAAI,CAAC,SAAS,OAAO,KAAA;IACrB,MAAM,EAAE,MAAM,SAAS,GAAG,UAAU,CAAC,CAAC,QAAQ,OAAO;IACrD,OAAO;KAAE;KAAM;IAAK;GACtB;GACA,QAAQ,eAAe,GAAG,UAAU,CAAC,CAAC;EAQ3B;EAAG,OAAA,EALd,WAAW,gBAAgB;GACzB,SAAS,GAAG,UAAU,CAAC,CAAC;GACxB,MAAM,YAA8B,GAAG,QAAQ,MAAM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ages/web/src/dates.ts"],"sourcesContent":["import type {\n Calendar,\n CalendarDay,\n CalendarMonth,\n CalendarWeekday,\n} from \"@kirana-ui/core/calendar\"\nimport type { DateField, DateFieldSegment } from \"@kirana-ui/core/date-field\"\n\nimport { entryAround } from \"./runtime.ts\"\nimport type { Drawn, Each } from \"./runtime.ts\"\n\ntype Parts<Controller> = Record<\n string,\n (controller: Controller, element: HTMLElement) => Drawn[\"part\"] | Drawn | undefined\n>\ntype Lists<Controller> = Record<\n string,\n (controller: Controller, around: unknown, template: HTMLElement) => Each\n>\n\n/**\n * A date field's parts and its list, for a component that is one or holds one. `of` is given\n * the element a part is written on, for a component of several fields.\n */\nexport function fieldParts<Controller>(\n of: (controller: Controller, element: HTMLElement) => DateField\n) {\n const parts: Parts<Controller> = {\n segment(controller, element) {\n const segment = entryAround<DateFieldSegment>(element)\n if (!segment) return undefined\n const { part, text } = of(controller, element).segment(segment)\n return { part, text }\n },\n input: (controller, element) => of(controller, element).input,\n }\n const lists: Lists<Controller> = {\n segments: (controller, _around, template) => ({\n entries: of(controller, template).segments,\n key: (segment: DateFieldSegment) => `${segment.index}-${segment.type}`,\n }),\n }\n return { parts, lists }\n}\n\nconst isMonth = (entry: unknown) =>\n typeof entry === \"object\" && entry !== null && \"weeks\" in entry && \"title\" in entry\n\n/** The month a part is written in, in a `months` template: its place among those shown. */\nconst monthAround = (element: Node) => entryAround<CalendarMonth>(element, isMonth)?.index\n\n/** A calendar's parts and its lists, for a component that is one or holds one. */\nexport function calendarParts<Controller>(of: (controller: Controller) => Calendar) {\n const date = (element: HTMLElement) => entryAround<CalendarDay>(element)?.date\n const month = (controller: Controller, element: HTMLElement) =>\n of(controller).monthAt(monthAround(element) ?? 0)\n const parts: Parts<Controller> = {\n heading(controller, element) {\n const shown = month(controller, element)\n return { part: shown.heading, text: shown.title }\n },\n previous: (controller) => of(controller).previous,\n next: (controller) => of(controller).next,\n grid: (controller, element) => month(controller, element).grid,\n \"head-cell\"(controller, element) {\n const weekday = entryAround<CalendarWeekday>(element)\n return weekday && of(controller).headCell(weekday)\n },\n cell(controller, element) {\n const day = date(element)\n return day === undefined ? undefined : of(controller).cell(day, monthAround(element))\n },\n day(controller, element) {\n const day = date(element)\n return day === undefined ? undefined : of(controller).day(day, monthAround(element))\n },\n }\n const lists: Lists<Controller> = {\n weekdays: (controller) => ({\n entries: of(controller).weekdays,\n key: (weekday: CalendarWeekday) => weekday.index,\n }),\n months: (controller) => ({\n entries: of(controller).months,\n key: (shown: CalendarMonth) => shown.index,\n values: (shown: CalendarMonth) => ({\n index: shown.index,\n month: shown.month,\n title: shown.title,\n }),\n }),\n // Written in a month's copy: that month's weeks; else the first month's.\n weeks: (controller, around) => ({\n entries: isMonth(around)\n ? of(controller).monthAt((around as CalendarMonth).index).weeks\n : of(controller).weeks,\n key: (week: readonly CalendarDay[]) => week[0]!.date,\n values: () => ({}),\n }),\n // Written in a week's row: that week's days, each with the place of its month\n // (`{monthIndex}`), for a page that names a day where it is drawn twice.\n days(controller, week) {\n const row = (week as readonly CalendarDay[] | undefined) ?? []\n const shown = of(controller)\n .months.peek()\n .find((each) => each.weeks.includes(row))\n return {\n entries: row,\n key: (day: CalendarDay) => day.date,\n values: (day: CalendarDay) => ({ ...day, monthIndex: shown?.index ?? 0 }),\n }\n },\n }\n return { parts, lists }\n}\n\n/**\n * A calendar's value as an attribute writes it: a day, or several with commas between (a\n * range's first and last, or a list's days).\n */\nexport function days(given: unknown, mode?: unknown): unknown {\n const list = typeof given === \"string\" && given.includes(\",\") ? given.split(\",\") : given\n if (mode === \"range\" && Array.isArray(list)) return { start: list[0], end: list[1] ?? list[0] }\n if (mode === \"multiple\" && typeof list === \"string\") return list === \"\" ? [] : [list]\n return list\n}\n"],"mappings":";;;;;;AAwBA,SAAgB,WACd,IACA;CAgBA,OAAO;EAAE,OAAA;GAdP,QAAQ,YAAY,SAAS;IAC3B,MAAM,UAAU,YAA8B,OAAO;IACrD,IAAI,CAAC,SAAS,OAAO,KAAA;IACr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;AACT"}
package/src/dialog.d.ts CHANGED
@@ -3,8 +3,9 @@ import { DialogProps } from "@kirana-ui/core/dialog";
3
3
  /**
4
4
  * `<kui-dialog>` around a `kui-part="trigger"` button and a `portal`, which is drawn at the
5
5
  * end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a
6
- * `title`, a `description` and a `close` button. `open`, `default-open`, `modal`,
7
- * `dismissible`; it tells `open-change`.
6
+ * `title`, a `description` and a `close` button. The trigger and the close take `kui-disabled`. A long dialog's popup is in a `viewport`,
7
+ * which scrolls. `open`, `default-open`, `modal`, `disable-pointer-dismissal`
8
+ * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read); it tells `open-change`.
8
9
  */
9
10
  export declare const tag: Tag<{
10
11
  id: string;
package/src/dialog.js CHANGED
@@ -1,11 +1,13 @@
1
+ import { ownDisabled } from "./around.js";
1
2
  import { defineElement } from "./runtime.js";
2
3
  import { createDialog } from "@kirana-ui/core/dialog";
3
4
  // src/dialog.ts
4
5
  /**
5
6
  * `<kui-dialog>` around a `kui-part="trigger"` button and a `portal`, which is drawn at the
6
7
  * end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a
7
- * `title`, a `description` and a `close` button. `open`, `default-open`, `modal`,
8
- * `dismissible`; it tells `open-change`.
8
+ * `title`, a `description` and a `close` button. The trigger and the close take `kui-disabled`. A long dialog's popup is in a `viewport`,
9
+ * which scrolls. `open`, `default-open`, `modal`, `disable-pointer-dismissal`
10
+ * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read); it tells `open-change`.
9
11
  */
10
12
  const tag = defineElement({
11
13
  tag: "kui-dialog",
@@ -13,6 +15,8 @@ const tag = defineElement({
13
15
  open: "boolean",
14
16
  "default-open": "boolean",
15
17
  modal: "boolean",
18
+ "disable-pointer-dismissal": "boolean",
19
+ "close-on-outside-press": "boolean",
16
20
  dismissible: "boolean"
17
21
  },
18
22
  create: (props) => createDialog(props),
@@ -21,18 +25,22 @@ const tag = defineElement({
21
25
  prop: "open"
22
26
  } },
23
27
  parts: {
24
- trigger: (controller) => controller.trigger,
28
+ trigger: (controller, element) => ownDisabled(element, controller.triggerPart),
25
29
  backdrop: (controller) => ({
26
30
  mounted: controller.mounted,
27
31
  part: controller.backdrop
28
32
  }),
33
+ viewport: (controller) => ({
34
+ mounted: controller.mounted,
35
+ part: controller.viewport
36
+ }),
29
37
  popup: (controller) => ({
30
38
  mounted: controller.mounted,
31
39
  part: controller.popup
32
40
  }),
33
41
  title: (controller) => controller.title,
34
42
  description: (controller) => controller.description,
35
- close: (controller) => controller.close
43
+ close: (controller, element) => ownDisabled(element, controller.closePart)
36
44
  }
37
45
  });
38
46
  export { tag };
package/src/dialog.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"dialog.js","names":[],"sources":["../../../../packages/web/src/dialog.ts"],"sourcesContent":["import { createDialog } from \"@kirana-ui/core/dialog\"\nimport type { DialogProps } from \"@kirana-ui/core/dialog\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-dialog>` around a `kui-part=\"trigger\"` button and a `portal`, which is drawn at the\n * end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a\n * `title`, a `description` and a `close` button. `open`, `default-open`, `modal`,\n * `dismissible`; it tells `open-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-dialog\",\n props: {\n open: \"boolean\",\n \"default-open\": \"boolean\",\n modal: \"boolean\",\n dismissible: \"boolean\",\n },\n create: (props) => createDialog(props),\n changes: { onOpenChange: { event: \"open-change\", prop: \"open\" } },\n parts: {\n trigger: (controller) => controller.trigger,\n backdrop: (controller) => ({ mounted: controller.mounted, part: controller.backdrop }),\n popup: (controller) => ({ mounted: controller.mounted, part: controller.popup }),\n title: (controller) => controller.title,\n description: (controller) => controller.description,\n close: (controller) => controller.close,\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-dialog\": ElementOf<\n As<typeof tag, DialogProps>,\n { \"open-change\": [\"onOpenChange\", \"open\"] }\n >\n }\n}\n"],"mappings":";;;;;;;;;AAYA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EACL,MAAM;EACN,gBAAgB;EAChB,OAAO;EACP,aAAa;CACf;CACA,SAAS,UAAU,aAAa,KAAK;CACrC,SAAS,EAAE,cAAc;EAAE,OAAO;EAAe,MAAM;CAAO,EAAE;CAChE,OAAO;EACL,UAAU,eAAe,WAAW;EACpC,WAAW,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAS;EACpF,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;EAC9E,QAAQ,eAAe,WAAW;EAClC,cAAc,eAAe,WAAW;EACxC,QAAQ,eAAe,WAAW;CACpC;AACF,CAAC"}
1
+ {"version":3,"file":"dialog.js","names":[],"sources":["../../../../packages/web/src/dialog.ts"],"sourcesContent":["import { createDialog } from \"@kirana-ui/core/dialog\"\nimport type { DialogProps } from \"@kirana-ui/core/dialog\"\n\nimport { ownDisabled } from \"./around.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { As, ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-dialog>` around a `kui-part=\"trigger\"` button and a `portal`, which is drawn at the\n * end of the page while the dialog is open and holds its `backdrop` and its `popup`, with a\n * `title`, a `description` and a `close` button. The trigger and the close take `kui-disabled`. A long dialog's popup is in a `viewport`,\n * which scrolls. `open`, `default-open`, `modal`, `disable-pointer-dismissal`\n * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read); it tells `open-change`.\n */\nexport const tag = defineElement({\n tag: \"kui-dialog\",\n props: {\n open: \"boolean\",\n \"default-open\": \"boolean\",\n modal: \"boolean\",\n \"disable-pointer-dismissal\": \"boolean\",\n \"close-on-outside-press\": \"boolean\",\n dismissible: \"boolean\",\n },\n create: (props) => createDialog(props),\n changes: { onOpenChange: { event: \"open-change\", prop: \"open\" } },\n parts: {\n trigger: (controller, element) => ownDisabled(element, controller.triggerPart),\n backdrop: (controller) => ({ mounted: controller.mounted, part: controller.backdrop }),\n viewport: (controller) => ({ mounted: controller.mounted, part: controller.viewport }),\n popup: (controller) => ({ mounted: controller.mounted, part: controller.popup }),\n title: (controller) => controller.title,\n description: (controller) => controller.description,\n close: (controller, element) => ownDisabled(element, controller.closePart),\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-dialog\": ElementOf<\n As<typeof tag, DialogProps>,\n { \"open-change\": [\"onOpenChange\", \"open\"] }\n >\n }\n}\n"],"mappings":";;;;;;;;;;;AAcA,MAAa,MAAM,cAAc;CAC/B,KAAK;CACL,OAAO;EACL,MAAM;EACN,gBAAgB;EAChB,OAAO;EACP,6BAA6B;EAC7B,0BAA0B;EAC1B,aAAa;CACf;CACA,SAAS,UAAU,aAAa,KAAK;CACrC,SAAS,EAAE,cAAc;EAAE,OAAO;EAAe,MAAM;CAAO,EAAE;CAChE,OAAO;EACL,UAAU,YAAY,YAAY,YAAY,SAAS,WAAW,WAAW;EAC7E,WAAW,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAS;EACpF,WAAW,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAS;EACpF,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;EAC9E,QAAQ,eAAe,WAAW;EAClC,cAAc,eAAe,WAAW;EACxC,QAAQ,YAAY,YAAY,YAAY,SAAS,WAAW,SAAS;CAC3E;AACF,CAAC"}
package/src/drawer.d.ts CHANGED
@@ -7,7 +7,8 @@ type Props = Omit<DrawerProps, "snapPoints" | "snapPoint" | "defaultSnapPoint">
7
7
  };
8
8
  /**
9
9
  * `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the
10
- * dialog's parts. `open`, `default-open`, `modal`, `dismissible`, `swipe-direction`,
10
+ * dialog's parts. `open`, `default-open`, `modal`, `disable-pointer-dismissal`
11
+ * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read), `swipe-direction`,
11
12
  * `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`,
12
13
  * `default-snap-point`; it tells `open-change` and `snap-point-change`.
13
14
  */
package/src/drawer.js CHANGED
@@ -1,3 +1,4 @@
1
+ import { ownDisabled } from "./around.js";
1
2
  import { defineElement } from "./runtime.js";
2
3
  import { computed } from "@kirana-ui/core";
3
4
  import { createDrawer } from "@kirana-ui/core/drawer";
@@ -6,7 +7,8 @@ import { createDrawer } from "@kirana-ui/core/drawer";
6
7
  const point = (text) => typeof text !== "string" || text === "" ? text : isNaN(+text) ? text : +text;
7
8
  /**
8
9
  * `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the
9
- * dialog's parts. `open`, `default-open`, `modal`, `dismissible`, `swipe-direction`,
10
+ * dialog's parts. `open`, `default-open`, `modal`, `disable-pointer-dismissal`
11
+ * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read), `swipe-direction`,
10
12
  * `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`,
11
13
  * `default-snap-point`; it tells `open-change` and `snap-point-change`.
12
14
  */
@@ -16,6 +18,8 @@ const tag = defineElement({
16
18
  open: "boolean",
17
19
  "default-open": "boolean",
18
20
  modal: "boolean",
21
+ "disable-pointer-dismissal": "boolean",
22
+ "close-on-outside-press": "boolean",
19
23
  dismissible: "boolean",
20
24
  "swipe-direction": "string",
21
25
  "snap-points": "string",
@@ -43,7 +47,7 @@ const tag = defineElement({
43
47
  }
44
48
  },
45
49
  parts: {
46
- trigger: (controller) => controller.trigger,
50
+ trigger: (controller, element) => ownDisabled(element, controller.triggerPart),
47
51
  backdrop: (controller) => ({
48
52
  mounted: controller.mounted,
49
53
  part: controller.backdrop
@@ -54,7 +58,7 @@ const tag = defineElement({
54
58
  }),
55
59
  title: (controller) => controller.title,
56
60
  description: (controller) => controller.description,
57
- close: (controller) => controller.close
61
+ close: (controller, element) => ownDisabled(element, controller.closePart)
58
62
  }
59
63
  });
60
64
  export { tag };
package/src/drawer.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"drawer.js","names":[],"sources":["../../../../packages/web/src/drawer.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createDrawer } from \"@kirana-ui/core/drawer\"\nimport type { Drawer, DrawerProps, DrawerSnapPoint } from \"@kirana-ui/core/drawer\"\n\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/** A place to rest, as an attribute writes it: a share (`0.5`) or a length (`200px`). */\nconst point = (text: unknown): DrawerSnapPoint | undefined =>\n typeof text !== \"string\" || text === \"\" ? (text as undefined) : isNaN(+text) ? text : +text\n\ntype Props = Omit<DrawerProps, \"snapPoints\" | \"snapPoint\" | \"defaultSnapPoint\"> & {\n snapPoints?: string | readonly DrawerSnapPoint[]\n snapPoint?: DrawerSnapPoint\n defaultSnapPoint?: DrawerSnapPoint\n}\n\n/**\n * `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the\n * dialog's parts. `open`, `default-open`, `modal`, `dismissible`, `swipe-direction`,\n * `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`,\n * `default-snap-point`; it tells `open-change` and `snap-point-change`.\n */\nexport const tag = defineElement<Props, Drawer>({\n tag: \"kui-drawer\",\n props: {\n open: \"boolean\",\n \"default-open\": \"boolean\",\n modal: \"boolean\",\n dismissible: \"boolean\",\n \"swipe-direction\": \"string\",\n \"snap-points\": \"string\",\n \"snap-point\": \"string\",\n \"default-snap-point\": \"string\",\n },\n create: (props) =>\n createDrawer(\n computed(() => {\n const own = props.get()\n const points = own.snapPoints\n return {\n ...own,\n snapPoints:\n typeof points === \"string\" ? points.split(\",\").map((each) => point(each)!) : points,\n snapPoint: point(own.snapPoint),\n defaultSnapPoint: point(own.defaultSnapPoint),\n }\n })\n ),\n changes: {\n onOpenChange: { event: \"open-change\", prop: \"open\" },\n onSnapPointChange: { event: \"snap-point-change\", prop: \"snapPoint\" },\n },\n parts: {\n trigger: (controller) => controller.trigger,\n backdrop: (controller) => ({ mounted: controller.mounted, part: controller.backdrop }),\n popup: (controller) => ({ mounted: controller.mounted, part: controller.popup }),\n title: (controller) => controller.title,\n description: (controller) => controller.description,\n close: (controller) => controller.close,\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-drawer\": ElementOf<\n typeof tag,\n {\n \"open-change\": [\"onOpenChange\", \"open\"]\n \"snap-point-change\": [\"onSnapPointChange\", \"snapPoint\"]\n }\n >\n }\n}\n"],"mappings":";;;;;AAQA,MAAM,SAAS,SACb,OAAO,SAAS,YAAY,SAAS,KAAM,OAAqB,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC;;;;;;;AAczF,MAAa,MAAM,cAA6B;CAC9C,KAAK;CACL,OAAO;EACL,MAAM;EACN,gBAAgB;EAChB,OAAO;EACP,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,cAAc;EACd,sBAAsB;CACxB;CACA,SAAS,UACP,aACE,eAAe;EACb,MAAM,MAAM,MAAM,IAAI;EACtB,MAAM,SAAS,IAAI;EACnB,OAAO;GACL,GAAG;GACH,YACE,OAAO,WAAW,WAAW,OAAO,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS,MAAM,IAAI,CAAE,IAAI;GAC/E,WAAW,MAAM,IAAI,SAAS;GAC9B,kBAAkB,MAAM,IAAI,gBAAgB;EAC9C;CACF,CAAC,CACH;CACF,SAAS;EACP,cAAc;GAAE,OAAO;GAAe,MAAM;EAAO;EACnD,mBAAmB;GAAE,OAAO;GAAqB,MAAM;EAAY;CACrE;CACA,OAAO;EACL,UAAU,eAAe,WAAW;EACpC,WAAW,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAS;EACpF,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;EAC9E,QAAQ,eAAe,WAAW;EAClC,cAAc,eAAe,WAAW;EACxC,QAAQ,eAAe,WAAW;CACpC;AACF,CAAC"}
1
+ {"version":3,"file":"drawer.js","names":[],"sources":["../../../../packages/web/src/drawer.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createDrawer } from \"@kirana-ui/core/drawer\"\nimport type { Drawer, DrawerProps, DrawerSnapPoint } from \"@kirana-ui/core/drawer\"\n\nimport { ownDisabled } from \"./around.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/** A place to rest, as an attribute writes it: a share (`0.5`) or a length (`200px`). */\nconst point = (text: unknown): DrawerSnapPoint | undefined =>\n typeof text !== \"string\" || text === \"\" ? (text as undefined) : isNaN(+text) ? text : +text\n\ntype Props = Omit<DrawerProps, \"snapPoints\" | \"snapPoint\" | \"defaultSnapPoint\"> & {\n snapPoints?: string | readonly DrawerSnapPoint[]\n snapPoint?: DrawerSnapPoint\n defaultSnapPoint?: DrawerSnapPoint\n}\n\n/**\n * `<kui-drawer>`: a dialog that comes from an edge and is dragged back to it, with the\n * dialog's parts. `open`, `default-open`, `modal`, `disable-pointer-dismissal`\n * (`close-on-outside-press` and `dismissible`, the other way round, its old names, still read), `swipe-direction`,\n * `snap-points` (with commas between: `0.4,1` or `200px,1`), `snap-point`,\n * `default-snap-point`; it tells `open-change` and `snap-point-change`.\n */\nexport const tag = defineElement<Props, Drawer>({\n tag: \"kui-drawer\",\n props: {\n open: \"boolean\",\n \"default-open\": \"boolean\",\n modal: \"boolean\",\n \"disable-pointer-dismissal\": \"boolean\",\n \"close-on-outside-press\": \"boolean\",\n dismissible: \"boolean\",\n \"swipe-direction\": \"string\",\n \"snap-points\": \"string\",\n \"snap-point\": \"string\",\n \"default-snap-point\": \"string\",\n },\n create: (props) =>\n createDrawer(\n computed(() => {\n const own = props.get()\n const points = own.snapPoints\n return {\n ...own,\n snapPoints:\n typeof points === \"string\" ? points.split(\",\").map((each) => point(each)!) : points,\n snapPoint: point(own.snapPoint),\n defaultSnapPoint: point(own.defaultSnapPoint),\n }\n })\n ),\n changes: {\n onOpenChange: { event: \"open-change\", prop: \"open\" },\n onSnapPointChange: { event: \"snap-point-change\", prop: \"snapPoint\" },\n },\n parts: {\n trigger: (controller, element) => ownDisabled(element, controller.triggerPart),\n backdrop: (controller) => ({ mounted: controller.mounted, part: controller.backdrop }),\n popup: (controller) => ({ mounted: controller.mounted, part: controller.popup }),\n title: (controller) => controller.title,\n description: (controller) => controller.description,\n close: (controller, element) => ownDisabled(element, controller.closePart),\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-drawer\": ElementOf<\n typeof tag,\n {\n \"open-change\": [\"onOpenChange\", \"open\"]\n \"snap-point-change\": [\"onSnapPointChange\", \"snapPoint\"]\n }\n >\n }\n}\n"],"mappings":";;;;;;AASA,MAAM,SAAS,SACb,OAAO,SAAS,YAAY,SAAS,KAAM,OAAqB,MAAM,CAAC,IAAI,IAAI,OAAO,CAAC;;;;;;;;AAezF,MAAa,MAAM,cAA6B;CAC9C,KAAK;CACL,OAAO;EACL,MAAM;EACN,gBAAgB;EAChB,OAAO;EACP,6BAA6B;EAC7B,0BAA0B;EAC1B,aAAa;EACb,mBAAmB;EACnB,eAAe;EACf,cAAc;EACd,sBAAsB;CACxB;CACA,SAAS,UACP,aACE,eAAe;EACb,MAAM,MAAM,MAAM,IAAI;EACtB,MAAM,SAAS,IAAI;EACnB,OAAO;GACL,GAAG;GACH,YACE,OAAO,WAAW,WAAW,OAAO,MAAM,GAAG,CAAC,CAAC,KAAK,SAAS,MAAM,IAAI,CAAE,IAAI;GAC/E,WAAW,MAAM,IAAI,SAAS;GAC9B,kBAAkB,MAAM,IAAI,gBAAgB;EAC9C;CACF,CAAC,CACH;CACF,SAAS;EACP,cAAc;GAAE,OAAO;GAAe,MAAM;EAAO;EACnD,mBAAmB;GAAE,OAAO;GAAqB,MAAM;EAAY;CACrE;CACA,OAAO;EACL,UAAU,YAAY,YAAY,YAAY,SAAS,WAAW,WAAW;EAC7E,WAAW,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAS;EACpF,QAAQ,gBAAgB;GAAE,SAAS,WAAW;GAAS,MAAM,WAAW;EAAM;EAC9E,QAAQ,eAAe,WAAW;EAClC,cAAc,eAAe,WAAW;EACxC,QAAQ,YAAY,YAAY,YAAY,SAAS,WAAW,SAAS;CAC3E;AACF,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { Editable, EditableProps } from "@kirana-ui/core/editable";
3
+ /**
4
+ * `<kui-editable>` around `kui-part="root"`, a `preview`, which says the text (or the
5
+ * placeholder while there is none) unless the page gave it something to say, an `input` or a
6
+ * textarea, and `edit-trigger`, `submit-trigger` and `cancel-trigger` buttons. The input's id is
7
+ * the element's `kui-id`. `value`, `default-value`, `editing`, `default-editing`, `placeholder`,
8
+ * `activation`, `submit-on-blur`, `select-on-focus`, `disabled`, `read-only`, `required`,
9
+ * `name`, `form`; it tells `value-change` and `editing-change`. Inside a `<kui-field>` its
10
+ * input is the field's control.
11
+ */
12
+ export declare const tag: Tag<EditableProps, Editable>;
13
+ declare global {
14
+ interface HTMLElementTagNameMap {
15
+ "kui-editable": ElementOf<typeof tag, {
16
+ "value-change": ["onValueChange", "value"];
17
+ "editing-change": ["onEditingChange", "editing"];
18
+ }>;
19
+ }
20
+ }
21
+ //# sourceMappingURL=editable.d.ts.map
@@ -0,0 +1,56 @@
1
+ import { fieldAround } from "./around.js";
2
+ import { defineElement } from "./runtime.js";
3
+ import { createEditable } from "@kirana-ui/core/editable";
4
+ // src/editable.ts
5
+ /**
6
+ * `<kui-editable>` around `kui-part="root"`, a `preview`, which says the text (or the
7
+ * placeholder while there is none) unless the page gave it something to say, an `input` or a
8
+ * textarea, and `edit-trigger`, `submit-trigger` and `cancel-trigger` buttons. The input's id is
9
+ * the element's `kui-id`. `value`, `default-value`, `editing`, `default-editing`, `placeholder`,
10
+ * `activation`, `submit-on-blur`, `select-on-focus`, `disabled`, `read-only`, `required`,
11
+ * `name`, `form`; it tells `value-change` and `editing-change`. Inside a `<kui-field>` its
12
+ * input is the field's control.
13
+ */
14
+ const tag = defineElement({
15
+ tag: "kui-editable",
16
+ props: {
17
+ value: "string",
18
+ "default-value": "string",
19
+ editing: "boolean",
20
+ "default-editing": "boolean",
21
+ placeholder: "string",
22
+ activation: "string",
23
+ "submit-on-blur": "boolean",
24
+ "select-on-focus": "boolean",
25
+ disabled: "boolean",
26
+ "read-only": "boolean",
27
+ required: "boolean",
28
+ name: "string",
29
+ form: "string"
30
+ },
31
+ create: (props, host) => createEditable(props, { field: fieldAround(host) }),
32
+ changes: {
33
+ onValueChange: {
34
+ event: "value-change",
35
+ prop: "value"
36
+ },
37
+ onEditingChange: {
38
+ event: "editing-change",
39
+ prop: "editing"
40
+ }
41
+ },
42
+ parts: {
43
+ root: (controller) => controller.root,
44
+ preview: (controller) => ({
45
+ part: controller.preview,
46
+ text: controller.text
47
+ }),
48
+ input: (controller) => controller.input,
49
+ "edit-trigger": (controller) => controller.editTrigger,
50
+ "submit-trigger": (controller) => controller.submitTrigger,
51
+ "cancel-trigger": (controller) => controller.cancelTrigger
52
+ }
53
+ });
54
+ export { tag };
55
+
56
+ //# sourceMappingURL=editable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editable.js","names":[],"sources":["../../../../packages/web/src/editable.ts"],"sourcesContent":["import { createEditable } from \"@kirana-ui/core/editable\"\nimport type { Editable, EditableProps } from \"@kirana-ui/core/editable\"\n\nimport { fieldAround } from \"./around.ts\"\nimport { defineElement } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-editable>` around `kui-part=\"root\"`, a `preview`, which says the text (or the\n * placeholder while there is none) unless the page gave it something to say, an `input` or a\n * textarea, and `edit-trigger`, `submit-trigger` and `cancel-trigger` buttons. The input's id is\n * the element's `kui-id`. `value`, `default-value`, `editing`, `default-editing`, `placeholder`,\n * `activation`, `submit-on-blur`, `select-on-focus`, `disabled`, `read-only`, `required`,\n * `name`, `form`; it tells `value-change` and `editing-change`. Inside a `<kui-field>` its\n * input is the field's control.\n */\nexport const tag = defineElement<EditableProps, Editable>({\n tag: \"kui-editable\",\n props: {\n value: \"string\",\n \"default-value\": \"string\",\n editing: \"boolean\",\n \"default-editing\": \"boolean\",\n placeholder: \"string\",\n activation: \"string\",\n \"submit-on-blur\": \"boolean\",\n \"select-on-focus\": \"boolean\",\n disabled: \"boolean\",\n \"read-only\": \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n },\n create: (props, host) => createEditable(props, { field: fieldAround(host) }),\n changes: {\n onValueChange: { event: \"value-change\", prop: \"value\" },\n onEditingChange: { event: \"editing-change\", prop: \"editing\" },\n },\n parts: {\n root: (controller) => controller.root,\n preview: (controller) => ({ part: controller.preview, text: controller.text }),\n input: (controller) => controller.input,\n \"edit-trigger\": (controller) => controller.editTrigger,\n \"submit-trigger\": (controller) => controller.submitTrigger,\n \"cancel-trigger\": (controller) => controller.cancelTrigger,\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-editable\": ElementOf<\n typeof tag,\n {\n \"value-change\": [\"onValueChange\", \"value\"]\n \"editing-change\": [\"onEditingChange\", \"editing\"]\n }\n >\n }\n}\n"],"mappings":";;;;;;;;;;;;;AAgBA,MAAa,MAAM,cAAuC;CACxD,KAAK;CACL,OAAO;EACL,OAAO;EACP,iBAAiB;EACjB,SAAS;EACT,mBAAmB;EACnB,aAAa;EACb,YAAY;EACZ,kBAAkB;EAClB,mBAAmB;EACnB,UAAU;EACV,aAAa;EACb,UAAU;EACV,MAAM;EACN,MAAM;CACR;CACA,SAAS,OAAO,SAAS,eAAe,OAAO,EAAE,OAAO,YAAY,IAAI,EAAE,CAAC;CAC3E,SAAS;EACP,eAAe;GAAE,OAAO;GAAgB,MAAM;EAAQ;EACtD,iBAAiB;GAAE,OAAO;GAAkB,MAAM;EAAU;CAC9D;CACA,OAAO;EACL,OAAO,eAAe,WAAW;EACjC,UAAU,gBAAgB;GAAE,MAAM,WAAW;GAAS,MAAM,WAAW;EAAK;EAC5E,QAAQ,eAAe,WAAW;EAClC,iBAAiB,eAAe,WAAW;EAC3C,mBAAmB,eAAe,WAAW;EAC7C,mBAAmB,eAAe,WAAW;CAC/C;AACF,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { ElementOf, Tag } from "./runtime.js";
2
+ import { FileUpload, FileUploadProps } from "@kirana-ui/core/file-upload";
3
+ /**
4
+ * `<kui-file-upload>` around `kui-part="root"`, which holds a `dropzone` (with a `trigger`
5
+ * button inside, if the page wants one), a `list` with a `<template kui-each="items">` for a
6
+ * file (`{name}`, `{size}` in bytes, `{type}` and `{index}` are its own), and a `clear` button.
7
+ * An `item` holds its `item-name` and `item-size`, which say the file's name and its size as
8
+ * people read one (in the language of its `kui-locale`) unless the page wrote something, and an
9
+ * `item-remove` button. The dropzone draws the native file input, hidden, as its last child.
10
+ * `accept`, `multiple`, `max-files`, `max-size`, `min-size`, `disabled`, `required`, `name`,
11
+ * `form`; `files`, `default-files` and `validate` as properties. It tells `files-change` and
12
+ * `files-reject` (`detail.rejections`).
13
+ */
14
+ export declare const tag: Tag<FileUploadProps, FileUpload>;
15
+ declare global {
16
+ interface HTMLElementTagNameMap {
17
+ "kui-file-upload": ElementOf<typeof tag, {
18
+ "files-change": ["onFilesChange", "files"];
19
+ "files-reject": ["onFilesReject", "rejections"];
20
+ }>;
21
+ }
22
+ }
23
+ //# sourceMappingURL=file-upload.d.ts.map
@@ -0,0 +1,98 @@
1
+ import { fieldAround } from "./around.js";
2
+ import { defineElement, entryAround } from "./runtime.js";
3
+ import { computed } from "@kirana-ui/core";
4
+ import { createFileUpload, formatBytes } from "@kirana-ui/core/file-upload";
5
+ // src/file-upload.ts
6
+ /** The file a part is in: the entry its item was stamped for. */
7
+ const keyOf = (element) => entryAround(element)?.key;
8
+ /**
9
+ * `<kui-file-upload>` around `kui-part="root"`, which holds a `dropzone` (with a `trigger`
10
+ * button inside, if the page wants one), a `list` with a `<template kui-each="items">` for a
11
+ * file (`{name}`, `{size}` in bytes, `{type}` and `{index}` are its own), and a `clear` button.
12
+ * An `item` holds its `item-name` and `item-size`, which say the file's name and its size as
13
+ * people read one (in the language of its `kui-locale`) unless the page wrote something, and an
14
+ * `item-remove` button. The dropzone draws the native file input, hidden, as its last child.
15
+ * `accept`, `multiple`, `max-files`, `max-size`, `min-size`, `disabled`, `required`, `name`,
16
+ * `form`; `files`, `default-files` and `validate` as properties. It tells `files-change` and
17
+ * `files-reject` (`detail.rejections`).
18
+ */
19
+ const tag = defineElement({
20
+ tag: "kui-file-upload",
21
+ props: {
22
+ accept: "string",
23
+ multiple: "boolean",
24
+ "max-files": "number",
25
+ "max-size": "number",
26
+ "min-size": "number",
27
+ disabled: "boolean",
28
+ required: "boolean",
29
+ name: "string",
30
+ form: "string"
31
+ },
32
+ properties: [
33
+ "files",
34
+ "defaultFiles",
35
+ "validate"
36
+ ],
37
+ create: (props, host) => createFileUpload(props, { field: fieldAround(host) }),
38
+ changes: {
39
+ onFilesChange: {
40
+ event: "files-change",
41
+ prop: "files"
42
+ },
43
+ onFilesReject: {
44
+ event: "files-reject",
45
+ prop: "rejections",
46
+ hold: false
47
+ }
48
+ },
49
+ lists: { items: (controller) => ({
50
+ entries: controller.entries,
51
+ key: (entry) => entry.key,
52
+ values: (entry) => ({
53
+ name: entry.file.name,
54
+ size: entry.file.size,
55
+ type: entry.file.type,
56
+ index: entry.index
57
+ })
58
+ }) },
59
+ parts: {
60
+ root: (controller) => controller.root,
61
+ dropzone: (controller) => ({
62
+ part: controller.dropzone,
63
+ inner: controller.input
64
+ }),
65
+ trigger: (controller) => controller.trigger,
66
+ list: (controller) => controller.list,
67
+ item(controller, element) {
68
+ const key = keyOf(element);
69
+ return key === void 0 ? void 0 : controller.item(key);
70
+ },
71
+ "item-name"(controller, element) {
72
+ const entry = entryAround(element);
73
+ if (!entry) return void 0;
74
+ const { name } = entry.file;
75
+ return {
76
+ part: controller.itemName(entry.key),
77
+ text: computed(() => name)
78
+ };
79
+ },
80
+ "item-size"(controller, element) {
81
+ const entry = entryAround(element);
82
+ if (!entry) return void 0;
83
+ const { size } = entry.file;
84
+ return {
85
+ part: controller.itemSize(entry.key),
86
+ text: computed(() => formatBytes(size, element.getAttribute("kui-locale") ?? void 0))
87
+ };
88
+ },
89
+ "item-remove"(controller, element) {
90
+ const key = keyOf(element);
91
+ return key === void 0 ? void 0 : controller.itemRemove(key);
92
+ },
93
+ clear: (controller) => controller.clear
94
+ }
95
+ });
96
+ export { tag };
97
+
98
+ //# sourceMappingURL=file-upload.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file-upload.js","names":[],"sources":["../../../../packages/web/src/file-upload.ts"],"sourcesContent":["import { computed } from \"@kirana-ui/core\"\nimport { createFileUpload, formatBytes } from \"@kirana-ui/core/file-upload\"\nimport type { FileUpload, FileUploadEntry, FileUploadProps } from \"@kirana-ui/core/file-upload\"\n\nimport { fieldAround } from \"./around.ts\"\nimport { defineElement, entryAround } from \"./runtime.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/** The file a part is in: the entry its item was stamped for. */\nconst keyOf = (element: HTMLElement) => entryAround<FileUploadEntry>(element)?.key\n\n/**\n * `<kui-file-upload>` around `kui-part=\"root\"`, which holds a `dropzone` (with a `trigger`\n * button inside, if the page wants one), a `list` with a `<template kui-each=\"items\">` for a\n * file (`{name}`, `{size}` in bytes, `{type}` and `{index}` are its own), and a `clear` button.\n * An `item` holds its `item-name` and `item-size`, which say the file's name and its size as\n * people read one (in the language of its `kui-locale`) unless the page wrote something, and an\n * `item-remove` button. The dropzone draws the native file input, hidden, as its last child.\n * `accept`, `multiple`, `max-files`, `max-size`, `min-size`, `disabled`, `required`, `name`,\n * `form`; `files`, `default-files` and `validate` as properties. It tells `files-change` and\n * `files-reject` (`detail.rejections`).\n */\nexport const tag = defineElement<FileUploadProps, FileUpload>({\n tag: \"kui-file-upload\",\n props: {\n accept: \"string\",\n multiple: \"boolean\",\n \"max-files\": \"number\",\n \"max-size\": \"number\",\n \"min-size\": \"number\",\n disabled: \"boolean\",\n required: \"boolean\",\n name: \"string\",\n form: \"string\",\n },\n properties: [\"files\", \"defaultFiles\", \"validate\"],\n create: (props, host) => createFileUpload(props, { field: fieldAround(host) }),\n changes: {\n onFilesChange: { event: \"files-change\", prop: \"files\" },\n onFilesReject: { event: \"files-reject\", prop: \"rejections\", hold: false },\n },\n lists: {\n items: (controller) => ({\n entries: controller.entries,\n key: (entry: FileUploadEntry) => entry.key,\n values: (entry: FileUploadEntry) => ({\n name: entry.file.name,\n size: entry.file.size,\n type: entry.file.type,\n index: entry.index,\n }),\n }),\n },\n parts: {\n root: (controller) => controller.root,\n dropzone: (controller) => ({ part: controller.dropzone, inner: controller.input }),\n trigger: (controller) => controller.trigger,\n list: (controller) => controller.list,\n item(controller, element) {\n const key = keyOf(element)\n return key === undefined ? undefined : controller.item(key)\n },\n \"item-name\"(controller, element) {\n const entry = entryAround<FileUploadEntry>(element)\n if (!entry) return undefined\n const { name } = entry.file\n return { part: controller.itemName(entry.key), text: computed(() => name) }\n },\n \"item-size\"(controller, element) {\n const entry = entryAround<FileUploadEntry>(element)\n if (!entry) return undefined\n const { size } = entry.file\n return {\n part: controller.itemSize(entry.key),\n text: computed(() => formatBytes(size, element.getAttribute(\"kui-locale\") ?? undefined)),\n }\n },\n \"item-remove\"(controller, element) {\n const key = keyOf(element)\n return key === undefined ? undefined : controller.itemRemove(key)\n },\n clear: (controller) => controller.clear,\n },\n})\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-file-upload\": ElementOf<\n typeof tag,\n {\n \"files-change\": [\"onFilesChange\", \"files\"]\n \"files-reject\": [\"onFilesReject\", \"rejections\"]\n }\n >\n }\n}\n"],"mappings":";;;;;;AASA,MAAM,SAAS,YAAyB,YAA6B,OAAO,CAAC,EAAE;;;;;;;;;;;;AAa/E,MAAa,MAAM,cAA2C;CAC5D,KAAK;CACL,OAAO;EACL,QAAQ;EACR,UAAU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ACzF;EACF;EACA,cAAc,YAAY,SAAS;GACjC,MAAM,MAAM,MAAM,OAAO;GACzB,OAAO,QAAQ,KAAA,IAAY,KAAA,IAAY,WAAW,WAAW,GAAG;EAClE;EACA,QAAQ,eAAe,WAAW;CACpC;AACF,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { ElementOf, Tag } from "./runtime.js";
2
+ import { Placed } from "./around.js";
2
3
  /**
3
4
  * `<kui-hover-card>` around a `kui-part="trigger"` link and a `portal` with a `positioner`
4
5
  * around the `popup`, which the pointer may enter. `open`, `default-open`, `delay`,
@@ -9,7 +10,7 @@ declare global {
9
10
  interface HTMLElementTagNameMap {
10
11
  "kui-hover-card": ElementOf<typeof tag, {
11
12
  "open-change": ["onOpenChange", "open"];
12
- }>;
13
+ }> & Placed;
13
14
  }
14
15
  }
15
16
  //# sourceMappingURL=hover-card.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hover-card.js","names":[],"sources":["../../../../packages/web/src/hover-card.ts"],"sourcesContent":["import { createHoverCard } from \"@kirana-ui/core/hover-card\"\n\nimport { hoverPopup } from \"./hover-popup.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-hover-card>` around a `kui-part=\"trigger\"` link and a `portal` with a `positioner`\n * around the `popup`, which the pointer may enter. `open`, `default-open`, `delay`,\n * `close-delay`, `disabled`; it tells `open-change`.\n */\nexport const tag = hoverPopup(\"kui-hover-card\", createHoverCard)\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-hover-card\": ElementOf<typeof tag, { \"open-change\": [\"onOpenChange\", \"open\"] }>\n }\n}\n"],"mappings":";;;;;;;;AAUA,MAAa,MAAM,WAAW,kBAAkB,eAAe"}
1
+ {"version":3,"file":"hover-card.js","names":[],"sources":["../../../../packages/web/src/hover-card.ts"],"sourcesContent":["import { createHoverCard } from \"@kirana-ui/core/hover-card\"\n\nimport { hoverPopup } from \"./hover-popup.ts\"\nimport type { Placed } from \"./around.ts\"\nimport type { ElementOf } from \"./runtime.ts\"\n\n/**\n * `<kui-hover-card>` around a `kui-part=\"trigger\"` link and a `portal` with a `positioner`\n * around the `popup`, which the pointer may enter. `open`, `default-open`, `delay`,\n * `close-delay`, `disabled`; it tells `open-change`.\n */\nexport const tag = hoverPopup(\"kui-hover-card\", createHoverCard)\n\ndeclare global {\n interface HTMLElementTagNameMap {\n \"kui-hover-card\": ElementOf<typeof tag, { \"open-change\": [\"onOpenChange\", \"open\"] }> & Placed\n }\n}\n"],"mappings":";;;;;;;;AAWA,MAAa,MAAM,WAAW,kBAAkB,eAAe"}