@inglorious/ui 1.0.1 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (206) hide show
  1. package/package.json +11 -9
  2. package/src/controls/button/button.stories.js +2 -2
  3. package/src/controls/button/index.js +1 -1
  4. package/src/controls/button/template.js +2 -2
  5. package/src/controls/button-group/button-group.stories.js +2 -2
  6. package/src/controls/button-group/index.js +1 -1
  7. package/src/controls/button-group/template.js +4 -4
  8. package/src/controls/checkbox/checkbox.stories.js +2 -2
  9. package/src/controls/checkbox/index.js +1 -1
  10. package/src/controls/checkbox/template.js +2 -2
  11. package/src/controls/combobox/combobox.stories.js +3 -3
  12. package/src/controls/combobox/index.js +2 -2
  13. package/src/controls/combobox/template.js +35 -14
  14. package/src/controls/fab/fab.stories.js +2 -2
  15. package/src/controls/fab/index.js +1 -1
  16. package/src/controls/fab/template.js +4 -4
  17. package/src/controls/icon-button/icon-button.stories.js +2 -2
  18. package/src/controls/icon-button/index.js +1 -1
  19. package/src/controls/icon-button/template.js +4 -4
  20. package/src/controls/input/index.js +1 -1
  21. package/src/controls/input/input.stories.js +2 -2
  22. package/src/controls/input/template.js +2 -2
  23. package/src/controls/radio-group/index.js +1 -1
  24. package/src/controls/radio-group/radio-group.stories.js +2 -2
  25. package/src/controls/radio-group/template.js +2 -2
  26. package/src/controls/rating/index.js +1 -1
  27. package/src/controls/rating/rating.stories.js +2 -2
  28. package/src/controls/rating/template.js +2 -2
  29. package/src/controls/select/index.js +1 -1
  30. package/src/controls/select/select.stories.js +2 -2
  31. package/src/controls/select/template.js +2 -2
  32. package/src/controls/slider/index.js +1 -1
  33. package/src/controls/slider/slider.stories.js +2 -2
  34. package/src/controls/slider/template.js +2 -2
  35. package/src/controls/switch/index.js +1 -1
  36. package/src/controls/switch/switch.stories.js +2 -2
  37. package/src/controls/switch/template.js +2 -2
  38. package/src/data-display/avatar/avatar.stories.js +2 -2
  39. package/src/data-display/avatar/index.js +1 -1
  40. package/src/data-display/avatar/template.js +2 -1
  41. package/src/data-display/badge/badge.stories.js +2 -2
  42. package/src/data-display/badge/index.js +1 -1
  43. package/src/data-display/badge/template.js +7 -0
  44. package/src/data-display/chip/chip.stories.js +2 -2
  45. package/src/data-display/chip/index.js +1 -1
  46. package/src/data-display/chip/template.js +7 -0
  47. package/src/data-display/data-grid/data-grid.stories.js +4 -4
  48. package/src/data-display/data-grid/filters/index.js +10 -10
  49. package/src/data-display/data-grid/filters/input.js +3 -3
  50. package/src/data-display/data-grid/filters/range.js +4 -4
  51. package/src/data-display/data-grid/filters/select.js +3 -3
  52. package/src/data-display/data-grid/index.js +2 -2
  53. package/src/data-display/data-grid/template.js +40 -28
  54. package/src/data-display/divider/divider.stories.js +2 -2
  55. package/src/data-display/divider/index.js +1 -1
  56. package/src/data-display/divider/template.js +7 -0
  57. package/src/data-display/icon/icon-implementations.mdx +4 -4
  58. package/src/data-display/icon/icon-utf8.stories.js +9 -9
  59. package/src/data-display/icon/icon.stories.js +2 -2
  60. package/src/data-display/icon/index.js +1 -1
  61. package/src/data-display/icon/template.js +7 -0
  62. package/src/data-display/list/index.js +2 -2
  63. package/src/data-display/list/list.stories.js +2 -2
  64. package/src/data-display/list/template.js +22 -13
  65. package/src/data-display/material-icon/index.js +1 -1
  66. package/src/data-display/material-icon/material-icon.stories.js +2 -2
  67. package/src/data-display/material-icon/template.js +7 -0
  68. package/src/data-display/table/index.js +1 -1
  69. package/src/data-display/table/table.stories.js +2 -2
  70. package/src/data-display/table/template.js +19 -1
  71. package/src/data-display/tooltip/index.js +1 -1
  72. package/src/data-display/tooltip/template.js +2 -0
  73. package/src/data-display/tooltip/tooltip.stories.js +2 -2
  74. package/src/data-display/typography/index.js +1 -1
  75. package/src/data-display/typography/template.js +2 -0
  76. package/src/data-display/typography/typography.stories.js +2 -2
  77. package/src/data-display/virtual-list/index.js +1 -1
  78. package/src/data-display/virtual-list/template.js +4 -2
  79. package/src/examples/dashboard/app-drawer.js +15 -15
  80. package/src/examples/dashboard/app-header.js +33 -33
  81. package/src/examples/dashboard/dashboard-jsx.jsx +76 -0
  82. package/src/examples/dashboard/dashboard-vue.vue +68 -0
  83. package/src/examples/dashboard/dashboard.js +43 -42
  84. package/src/examples/dashboard/dashboard.stories.js +46 -16
  85. package/src/examples/dashboard/mode.js +1 -1
  86. package/src/examples/dashboard/primitive-content.js +248 -248
  87. package/src/examples/dashboard/primitive-section.js +25 -25
  88. package/src/examples/dashboard/router.js +1 -1
  89. package/src/examples/dashboard/social-card.js +14 -14
  90. package/src/examples/dashboard/stat-card.js +12 -12
  91. package/src/examples/dashboard/theme.js +1 -1
  92. package/src/examples/dashboard/traffic-card.js +22 -22
  93. package/src/examples/dashboard/traffic-sales-card.js +39 -39
  94. package/src/feedback/alert/alert.stories.js +2 -2
  95. package/src/feedback/alert/index.js +2 -2
  96. package/src/feedback/alert/template.js +2 -0
  97. package/src/feedback/backdrop/backdrop.stories.js +2 -2
  98. package/src/feedback/backdrop/index.js +2 -2
  99. package/src/feedback/backdrop/template.js +2 -0
  100. package/src/feedback/dialog/dialog.stories.js +2 -2
  101. package/src/feedback/dialog/index.js +2 -2
  102. package/src/feedback/dialog/template.js +2 -0
  103. package/src/feedback/progress/index.js +1 -1
  104. package/src/feedback/progress/progress.stories.js +2 -2
  105. package/src/feedback/progress/template.js +3 -1
  106. package/src/feedback/skeleton/index.js +2 -2
  107. package/src/feedback/skeleton/skeleton.stories.js +2 -2
  108. package/src/feedback/skeleton/template.js +2 -0
  109. package/src/feedback/snackbar/index.js +2 -2
  110. package/src/feedback/snackbar/snackbar.stories.js +2 -2
  111. package/src/feedback/snackbar/template.js +2 -0
  112. package/src/index.js +45 -45
  113. package/src/layout/container/container.stories.js +3 -3
  114. package/src/layout/container/index.js +1 -1
  115. package/src/layout/container/template.js +2 -0
  116. package/src/layout/flex/flex.stories.js +2 -2
  117. package/src/layout/flex/index.js +1 -1
  118. package/src/layout/flex/template.js +2 -3
  119. package/src/layout/grid/grid.stories.js +2 -2
  120. package/src/layout/grid/index.js +1 -1
  121. package/src/layout/grid/template.js +2 -3
  122. package/src/navigation/bottom-navigation/bottom-navigation.stories.js +2 -2
  123. package/src/navigation/bottom-navigation/index.js +1 -1
  124. package/src/navigation/bottom-navigation/template.js +16 -2
  125. package/src/navigation/breadcrumbs/breadcrumbs.stories.js +2 -2
  126. package/src/navigation/breadcrumbs/index.js +1 -1
  127. package/src/navigation/breadcrumbs/template.js +16 -2
  128. package/src/navigation/drawer/drawer.stories.js +2 -2
  129. package/src/navigation/drawer/index.js +1 -1
  130. package/src/navigation/drawer/template.js +15 -13
  131. package/src/navigation/link/index.js +2 -2
  132. package/src/navigation/link/link.stories.js +2 -2
  133. package/src/navigation/link/template.js +2 -0
  134. package/src/navigation/menu/index.js +1 -1
  135. package/src/navigation/menu/menu.stories.js +2 -2
  136. package/src/navigation/menu/template.js +15 -1
  137. package/src/navigation/pagination/index.js +1 -1
  138. package/src/navigation/pagination/pagination.stories.js +2 -2
  139. package/src/navigation/pagination/template.js +20 -4
  140. package/src/navigation/speed-dial/index.js +1 -1
  141. package/src/navigation/speed-dial/speed-dial.stories.js +2 -2
  142. package/src/navigation/speed-dial/template.js +15 -1
  143. package/src/navigation/stepper/index.js +1 -1
  144. package/src/navigation/stepper/stepper.stories.js +2 -2
  145. package/src/navigation/stepper/template.js +15 -1
  146. package/src/navigation/tabs/index.js +1 -1
  147. package/src/navigation/tabs/tabs.stories.js +2 -2
  148. package/src/navigation/tabs/template.js +17 -1
  149. package/src/surfaces/accordion/accordion.stories.js +2 -2
  150. package/src/surfaces/accordion/index.js +1 -1
  151. package/src/surfaces/accordion/template.js +15 -1
  152. package/src/surfaces/app-bar/app-bar.stories.js +2 -2
  153. package/src/surfaces/app-bar/index.js +1 -1
  154. package/src/surfaces/app-bar/template.js +2 -0
  155. package/src/surfaces/card/card.stories.js +2 -2
  156. package/src/surfaces/card/index.js +1 -1
  157. package/src/surfaces/card/template.js +19 -1
  158. package/src/surfaces/paper/index.js +2 -2
  159. package/src/surfaces/paper/paper.stories.js +3 -3
  160. package/src/surfaces/paper/template.js +2 -0
  161. package/types/controls/button-group.d.ts +1 -1
  162. package/types/controls/button.d.ts +2 -2
  163. package/types/controls/checkbox.d.ts +1 -1
  164. package/types/controls/combobox.d.ts +2 -1
  165. package/types/controls/fab.d.ts +1 -1
  166. package/types/controls/icon-button.d.ts +1 -1
  167. package/types/controls/input.d.ts +1 -1
  168. package/types/controls/radio-group.d.ts +1 -1
  169. package/types/controls/rating.d.ts +1 -1
  170. package/types/controls/select.d.ts +1 -1
  171. package/types/controls/slider.d.ts +1 -1
  172. package/types/controls/switch.d.ts +1 -1
  173. package/types/data-display/avatar.d.ts +1 -1
  174. package/types/data-display/badge.d.ts +1 -1
  175. package/types/data-display/chip.d.ts +1 -1
  176. package/types/data-display/data-grid.d.ts +2 -1
  177. package/types/data-display/divider.d.ts +1 -1
  178. package/types/data-display/icon.d.ts +1 -1
  179. package/types/data-display/list.d.ts +2 -1
  180. package/types/data-display/material-icon.d.ts +1 -1
  181. package/types/data-display/table.d.ts +2 -1
  182. package/types/data-display/tooltip.d.ts +1 -1
  183. package/types/data-display/typography.d.ts +1 -1
  184. package/types/data-display/virtual-list.d.ts +1 -1
  185. package/types/feedback/alert.d.ts +1 -1
  186. package/types/feedback/backdrop.d.ts +1 -1
  187. package/types/feedback/dialog.d.ts +1 -1
  188. package/types/feedback/progress.d.ts +1 -1
  189. package/types/feedback/skeleton.d.ts +1 -1
  190. package/types/feedback/snackbar.d.ts +1 -1
  191. package/types/layout/container.d.ts +1 -1
  192. package/types/layout/flex.d.ts +1 -1
  193. package/types/layout/grid.d.ts +1 -1
  194. package/types/navigation/bottom-navigation.d.ts +2 -1
  195. package/types/navigation/breadcrumbs.d.ts +2 -1
  196. package/types/navigation/drawer.d.ts +1 -1
  197. package/types/navigation/link.d.ts +1 -1
  198. package/types/navigation/menu.d.ts +2 -1
  199. package/types/navigation/pagination.d.ts +2 -1
  200. package/types/navigation/speed-dial.d.ts +2 -1
  201. package/types/navigation/stepper.d.ts +2 -1
  202. package/types/navigation/tabs.d.ts +2 -1
  203. package/types/surfaces/accordion.d.ts +2 -1
  204. package/types/surfaces/app-bar.d.ts +1 -1
  205. package/types/surfaces/card.d.ts +2 -1
  206. package/types/surfaces/paper.d.ts +1 -1
@@ -6,7 +6,8 @@
6
6
  import { classMap, html, styleMap } from "@inglorious/web"
7
7
 
8
8
  /**
9
- * Avatar component.
9
+ * Renders an avatar with image, initials, or fallback content.
10
+ * Supports size, shape, and automatic background color generation.
10
11
  * @param {AvatarProps} props
11
12
  * @returns {TemplateResult}
12
13
  */
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { badge } from "."
2
+ import { Badge } from "."
3
3
 
4
4
  export default {
5
5
  title: "Data Display/Badge",
6
6
  tags: ["autodocs"],
7
- render: createRender(badge),
7
+ render: createRender(Badge),
8
8
  argTypes: {
9
9
  children: { control: "text", description: "Badge content." },
10
10
  color: {
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const badge = { ...renderers }
3
+ export const Badge = { ...renderers }
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * @typedef {import('../../../types/data-display/badge').BadgeProps} BadgeProps
3
+ * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
3
4
  */
4
5
 
5
6
  import { classMap, html, styleMap } from "@inglorious/web"
6
7
 
8
+ /**
9
+ * Renders a compact badge for status, labels, or counts.
10
+ * Supports color, variant, size, shape, and optional ring styling.
11
+ * @param {BadgeProps} props
12
+ * @returns {TemplateResult}
13
+ */
7
14
  export function render(props) {
8
15
  const {
9
16
  children,
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { chip } from "."
2
+ import { Chip } from "."
3
3
 
4
4
  export default {
5
5
  title: "Data Display/Chip",
6
6
  tags: ["autodocs"],
7
- render: createRender(chip),
7
+ render: createRender(Chip),
8
8
  argTypes: {
9
9
  children: { control: "text", description: "Chip label content." },
10
10
  isRemovable: {
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const chip = { ...renderers }
3
+ export const Chip = { ...renderers }
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * @typedef {import('../../../types/data-display/chip').ChipProps} ChipProps
3
+ * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
3
4
  */
4
5
 
5
6
  import { classMap, html } from "@inglorious/web"
6
7
 
8
+ /**
9
+ * Renders a compact chip label with optional remove action.
10
+ * Use chips for tags, filters, or selected values.
11
+ * @param {ChipProps} props
12
+ * @returns {TemplateResult}
13
+ */
7
14
  export function render(props) {
8
15
  const {
9
16
  children,
@@ -2,7 +2,7 @@ import {
2
2
  createEntityRender,
3
3
  notifyActionArgType,
4
4
  } from "../../stories/notifyStory.js"
5
- import { dataGrid } from "."
5
+ import { DataGrid } from "."
6
6
 
7
7
  const baseRows = [
8
8
  { id: 1, name: "Charlie", age: 35, active: true, role: "Admin" },
@@ -57,7 +57,7 @@ function createRows(count) {
57
57
  export default {
58
58
  title: "Data Display/DataGrid",
59
59
  tags: ["autodocs"],
60
- render: createEntityRender({ dataGrid }),
60
+ render: createEntityRender({ DataGrid }),
61
61
  argTypes: {
62
62
  ...notifyActionArgType,
63
63
  id: { control: "text", description: "Optional grid id" },
@@ -75,7 +75,7 @@ export default {
75
75
  export const Default = {
76
76
  args: {
77
77
  id: "dataGrid",
78
- type: "dataGrid",
78
+ type: "DataGrid",
79
79
  rows: baseRows,
80
80
  columns: baseColumns,
81
81
  search: {},
@@ -130,7 +130,7 @@ export const FlexibleWidths = {
130
130
  export const Virtualized = {
131
131
  args: {
132
132
  id: "virtualizedGrid",
133
- type: "dataGrid",
133
+ type: "DataGrid",
134
134
  rows: createRows(1000),
135
135
  columns: baseColumns,
136
136
  search: null,
@@ -1,21 +1,21 @@
1
1
  import { choose, html } from "@inglorious/web"
2
2
 
3
- import { inputFilter } from "./input.js"
4
- import { rangeFilter } from "./range.js"
5
- import { selectFilter } from "./select.js"
3
+ import { InputFilter } from "./input.js"
4
+ import { RangeFilter } from "./range.js"
5
+ import { SelectFilter } from "./select.js"
6
6
 
7
- export const filters = {
7
+ export const Filters = {
8
8
  render(entity, column) {
9
9
  return html`${choose(
10
10
  column.filter.type,
11
11
  [
12
- ["range", () => rangeFilter.render(entity, column)],
13
- ["date", () => rangeFilter.render(entity, column)],
14
- ["time", () => rangeFilter.render(entity, column)],
15
- ["datetime", () => rangeFilter.render(entity, column)],
16
- ["select", () => selectFilter.render(entity, column)],
12
+ ["range", () => RangeFilter.render(entity, column)],
13
+ ["date", () => RangeFilter.render(entity, column)],
14
+ ["time", () => RangeFilter.render(entity, column)],
15
+ ["datetime", () => RangeFilter.render(entity, column)],
16
+ ["select", () => SelectFilter.render(entity, column)],
17
17
  ],
18
- () => inputFilter.render(entity, column),
18
+ () => InputFilter.render(entity, column),
19
19
  )}`
20
20
  },
21
21
  }
@@ -1,4 +1,4 @@
1
- import { input } from "../../../controls/input"
1
+ import { Input } from "../../../controls/input"
2
2
  import { format } from "./helpers"
3
3
 
4
4
  const DEFAULT_PLACEHOLDER = {
@@ -6,9 +6,9 @@ const DEFAULT_PLACEHOLDER = {
6
6
  text: "Contains...",
7
7
  }
8
8
 
9
- export const inputFilter = {
9
+ export const InputFilter = {
10
10
  render(entity, column) {
11
- return input.render({
11
+ return Input.render({
12
12
  name: column.id,
13
13
  inputType: column.filter.type,
14
14
  placeholder:
@@ -1,6 +1,6 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
- import { input } from "../../../controls/input"
3
+ import { Input } from "../../../controls/input"
4
4
  import { format } from "./helpers"
5
5
 
6
6
  const RANGE_TYPE = {
@@ -10,10 +10,10 @@ const RANGE_TYPE = {
10
10
  datetime: "datetime-local",
11
11
  }
12
12
 
13
- export const rangeFilter = {
13
+ export const RangeFilter = {
14
14
  render(entity, column) {
15
15
  return html`<div class="iw-data-grid-filter-range">
16
- ${input.render({
16
+ ${Input.render({
17
17
  name: `${column.id}Min`,
18
18
  inputType: RANGE_TYPE[column.filter.type],
19
19
  placeholder: column.filter.placeholder ?? "≥",
@@ -28,7 +28,7 @@ export const rangeFilter = {
28
28
  })
29
29
  },
30
30
  })}
31
- ${input.render({
31
+ ${Input.render({
32
32
  name: `${column.id}Max`,
33
33
  inputType: RANGE_TYPE[column.filter.type],
34
34
  placeholder: column.filter.placeholder ?? "≤",
@@ -1,9 +1,9 @@
1
- import { select } from "../../../controls/select"
1
+ import { Select } from "../../../controls/select"
2
2
  import { format } from "./helpers"
3
3
 
4
- export const selectFilter = {
4
+ export const SelectFilter = {
5
5
  render(entity, column) {
6
- return select.render({
6
+ return Select.render({
7
7
  name: column.id,
8
8
  size: "sm",
9
9
  isFullWidth: true,
@@ -1,8 +1,8 @@
1
1
  import * as handlers from "./handlers.js"
2
2
  import * as helpers from "./helpers.js"
3
- import { dataGrid as renderers } from "./template.js"
3
+ import { DataGrid as renderers } from "./template.js"
4
4
 
5
- export const dataGrid = {
5
+ export const DataGrid = {
6
6
  ...handlers,
7
7
  ...renderers,
8
8
  render(entity, api) {
@@ -7,11 +7,11 @@
7
7
 
8
8
  import { classMap, html, repeat, when } from "@inglorious/web"
9
9
 
10
- import { input } from "../../controls/input/index.js"
11
- import { select } from "../../controls/select/index.js"
12
- import { pagination } from "../../navigation/pagination/index.js"
13
- import { virtualList } from "../virtual-list/index.js"
14
- import { filters } from "./filters"
10
+ import { Input } from "../../controls/input/index.js"
11
+ import { Select } from "../../controls/select/index.js"
12
+ import { Pagination } from "../../navigation/pagination/index.js"
13
+ import { VirtualList } from "../virtual-list/index.js"
14
+ import { Filters } from "./filters"
15
15
  import {
16
16
  getPaginationInfo,
17
17
  getRowKeyValue,
@@ -25,9 +25,10 @@ const PRETTY_PAGE = 1
25
25
  const FIRST_PAGE = 0
26
26
  const LAST_PAGE = 1
27
27
 
28
- export const dataGrid = {
28
+ export const DataGrid = {
29
29
  /**
30
- * Main entrypoint. Allows override to wire to the store.
30
+ * Main entrypoint for the data grid template. It delegates to the base grid renderer so overrides can still reuse it.
31
+ * Data grids support sorting, filtering, selection, pagination, and optional virtualization.
31
32
  * @param {DataGridProps} props The data grid props.
32
33
  * @returns {TemplateResult} The rendered data grid.
33
34
  */
@@ -36,7 +37,8 @@ export const dataGrid = {
36
37
  },
37
38
 
38
39
  /**
39
- * Renders the data grid component.
40
+ * Renders the data grid container and wires the header, body, and footer regions.
41
+ * This is the canonical renderer that custom `render()` overrides should call.
40
42
  * @param {DataGridProps} props The data grid props.
41
43
  * @returns {TemplateResult} The rendered data grid.
42
44
  */
@@ -55,7 +57,8 @@ export const dataGrid = {
55
57
  },
56
58
 
57
59
  /**
58
- * Renders the data grid header.
60
+ * Renders the grid header region, including optional toolbar and column headers.
61
+ * Column rendering is delegated to `renderHeaderColumn`.
59
62
  * @param {DataGridProps} props The data grid props.
60
63
  * @returns {TemplateResult} The rendered header.
61
64
  */
@@ -74,7 +77,8 @@ export const dataGrid = {
74
77
  },
75
78
 
76
79
  /**
77
- * Renders the toolbar above the header row.
80
+ * Renders the toolbar row that contains search, bulk actions, and filtering controls.
81
+ * Override to customize the global header tools.
78
82
  * @param {DataGridProps} props The data grid props.
79
83
  * @returns {TemplateResult}
80
84
  */
@@ -85,7 +89,8 @@ export const dataGrid = {
85
89
  },
86
90
 
87
91
  /**
88
- * Renders a single column in the header.
92
+ * Renders a single column header cell, including sorting and filter affordances.
93
+ * Override to customize header labels or controls per column.
89
94
  * @param {DataGridProps} props The data grid props.
90
95
  * @param {object} payload The payload.
91
96
  * @param {Column} payload.column The column definition.
@@ -103,7 +108,7 @@ export const dataGrid = {
103
108
  ${column.title} ${getSortIcon(getSortDirection(props, column.id))}
104
109
  </div>
105
110
 
106
- ${column.isFilterable && filters.render(props, column)}
111
+ ${column.isFilterable && Filters.render(props, column)}
107
112
 
108
113
  <div
109
114
  class="iw-data-grid-column-resizer"
@@ -118,13 +123,14 @@ export const dataGrid = {
118
123
  },
119
124
 
120
125
  /**
121
- * Renders the search bar.
126
+ * Renders the global search input shown in the grid toolbar.
127
+ * Used when `search` is enabled in the grid props.
122
128
  * @param {DataGridProps} props The data grid props.
123
129
  * @returns {TemplateResult} The rendered search bar.
124
130
  */
125
131
  renderSearchbar(props) {
126
132
  return html`<div class="iw-data-grid-searchbar">
127
- ${input.render({
133
+ ${Input.render({
128
134
  size: "sm",
129
135
  isFullWidth: true,
130
136
  name: "search",
@@ -137,7 +143,8 @@ export const dataGrid = {
137
143
  },
138
144
 
139
145
  /**
140
- * Renders the data grid body with rows.
146
+ * Renders the grid body, either as a standard list of rows or as a virtualized list.
147
+ * Row rendering is delegated to `renderRow`.
141
148
  * @param {DataGridProps} props The data grid props.
142
149
  * @returns {TemplateResult} The rendered data grid body.
143
150
  */
@@ -157,7 +164,7 @@ export const dataGrid = {
157
164
  const virtualState = getVirtualizationState(props, rows.length)
158
165
  const virtualEntity = {
159
166
  id: props.id,
160
- type: "dataGridVirtualRows",
167
+ type: "DataGridVirtualRows",
161
168
  items: rows,
162
169
  className: "iw-data-grid-body",
163
170
  scrollTop: virtualState.scrollTop,
@@ -183,11 +190,12 @@ export const dataGrid = {
183
190
  }),
184
191
  }
185
192
 
186
- return virtualList.render(virtualEntity, virtualApi)
193
+ return VirtualList.render(virtualEntity, virtualApi)
187
194
  },
188
195
 
189
196
  /**
190
- * Renders a single row in the data grid body.
197
+ * Renders a single data row and wires row click/selection handlers.
198
+ * Cells are delegated to `renderCell` for customization.
191
199
  * @param {DataGridProps} props The data grid props.
192
200
  * @param {object} payload The payload.
193
201
  * @param {Row} payload.row The row data.
@@ -220,7 +228,8 @@ export const dataGrid = {
220
228
  },
221
229
 
222
230
  /**
223
- * Renders a single cell within a row.
231
+ * Renders a single cell container and delegates the value to `renderValue`.
232
+ * Override to customize per-column cell structure.
224
233
  * @param {DataGridProps} props The data grid props.
225
234
  * @param {object} payload The payload.
226
235
  * @param {any} payload.cell The cell data.
@@ -243,7 +252,8 @@ export const dataGrid = {
243
252
  },
244
253
 
245
254
  /**
246
- * Renders the value within a cell. This can be overridden for custom formatting.
255
+ * Renders the raw cell value for a column.
256
+ * Override to format values or inject custom content.
247
257
  * @param {DataGridProps} _props The data grid props (ignored).
248
258
  * @param {object} payload The payload.
249
259
  * @param {any} payload.value The value to render.
@@ -254,7 +264,8 @@ export const dataGrid = {
254
264
  },
255
265
 
256
266
  /**
257
- * Renders the data grid footer.
267
+ * Renders the grid footer, including pagination controls and page size selectors.
268
+ * Footer elements are delegated to `renderPagination` and `renderPageSize`.
258
269
  * @param {DataGridProps} props The data grid props.
259
270
  * @returns {TemplateResult} The rendered footer.
260
271
  */
@@ -281,14 +292,15 @@ export const dataGrid = {
281
292
  },
282
293
 
283
294
  /**
284
- * Renders the pagination controls.
295
+ * Renders pagination controls for the grid footer.
296
+ * Override to provide custom paging UI.
285
297
  * @param {DataGridProps} props The data grid props.
286
298
  * @param {object} pagination The pagination info object from `getPaginationInfo`.
287
299
  * @returns {TemplateResult} The rendered pagination controls.
288
300
  */
289
301
  renderPagination(props, paginationInfo) {
290
302
  return html`<div class="iw-data-grid-row">
291
- ${pagination.renderControl(
303
+ ${Pagination.renderControl(
292
304
  {
293
305
  buttonSize: "sm",
294
306
  buttonVariant: "outline",
@@ -301,7 +313,7 @@ export const dataGrid = {
301
313
  onChange: () => props.onPageChange?.(FIRST_PAGE),
302
314
  },
303
315
  )}
304
- ${pagination.renderControl(
316
+ ${Pagination.renderControl(
305
317
  {
306
318
  buttonSize: "sm",
307
319
  buttonVariant: "outline",
@@ -314,7 +326,7 @@ export const dataGrid = {
314
326
  onChange: () => props.onPagePrev?.(),
315
327
  },
316
328
  )}
317
- ${input.render({
329
+ ${Input.render({
318
330
  name: "page",
319
331
  size: "sm",
320
332
  inputType: "number",
@@ -325,7 +337,7 @@ export const dataGrid = {
325
337
  })}
326
338
  /
327
339
  <span>${paginationInfo.totalPages}</span>
328
- ${pagination.renderControl(
340
+ ${Pagination.renderControl(
329
341
  {
330
342
  buttonSize: "sm",
331
343
  buttonVariant: "outline",
@@ -338,7 +350,7 @@ export const dataGrid = {
338
350
  onChange: () => props.onPageNext?.(),
339
351
  },
340
352
  )}
341
- ${pagination.renderControl(
353
+ ${Pagination.renderControl(
342
354
  {
343
355
  buttonSize: "sm",
344
356
  buttonVariant: "outline",
@@ -358,7 +370,7 @@ export const dataGrid = {
358
370
  renderPageSize(props, pagination) {
359
371
  return html`<div class="iw-data-grid-footer-row">
360
372
  <div>Page size:</div>
361
- ${select.render({
373
+ ${Select.render({
362
374
  size: "sm",
363
375
  value: pagination.pageSize,
364
376
  options: pagination.pageSizes,
@@ -1,12 +1,12 @@
1
1
  import { render } from "@inglorious/web/test"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { divider } from "."
4
+ import { Divider } from "."
5
5
 
6
6
  export default {
7
7
  title: "Data Display/Divider",
8
8
  tags: ["autodocs"],
9
- render: createRender(divider),
9
+ render: createRender(Divider),
10
10
  argTypes: {
11
11
  orientation: {
12
12
  control: "select",
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const divider = { ...renderers }
3
+ export const Divider = { ...renderers }
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * @typedef {import('../../../types/data-display/divider').DividerProps} DividerProps
3
+ * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
3
4
  */
4
5
 
5
6
  import { classMap, html } from "@inglorious/web"
6
7
 
8
+ /**
9
+ * Renders a horizontal or vertical divider line.
10
+ * Supports inset styling for aligned content blocks.
11
+ * @param {DividerProps} props
12
+ * @returns {TemplateResult}
13
+ */
7
14
  export function render(props) {
8
15
  const { orientation = "horizontal", isInset = false } = props
9
16
 
@@ -83,13 +83,13 @@ Use this page as a quick reference for supported icon strategies in `@inglorious
83
83
  <div className="iw-icon-tab-panels">
84
84
  <section className="iw-icon-tab-panel iw-icon-tab-panel-generic">
85
85
  <p>Use <code>@inglorious/ui/icon</code> for glyphs, emoji, and simple symbols. Reference: <a href="/?path=/story/data-display-icon--unicode">UTF-8 Icons</a></p>
86
- <pre><code>{`icon.render({ children: "★", size: "md", color: "primary" })`}</code></pre>
86
+ <pre><code>{`Icon.render({ children: "★", size: "md", color: "primary" })`}</code></pre>
87
87
  <div className="iw-icon-example">★ ⚑ ♫</div>
88
88
  </section>
89
89
 
90
90
  <section className="iw-icon-tab-panel iw-icon-tab-panel-svg">
91
91
  <p>Use inline SVG when you want a custom icon pack without font dependencies.</p>
92
- <pre><code>{`icon.render({
92
+ <pre><code>{`Icon.render({
93
93
  children: html\`<svg viewBox="0 0 24 24" ...>...</svg>\`,
94
94
  size: "md",
95
95
  })`}</code></pre>
@@ -109,7 +109,7 @@ Use this page as a quick reference for supported icon strategies in `@inglorious
109
109
 
110
110
  <section className="iw-icon-tab-panel iw-icon-tab-panel-material">
111
111
  <p>Use <code>@inglorious/ui/material-icon</code> when Material Symbols fonts are loaded. Reference: <a href="https://fonts.google.com/icons?icon.set=Material+Icons" target="_blank">Material Icons</a></p>
112
- <pre><code>{`materialIcon.render({ name: "home", filled: true, size: "md" })`}</code></pre>
112
+ <pre><code>{`MaterialIcon.render({ name: "home", filled: true, size: "md" })`}</code></pre>
113
113
  <div className="iw-icon-example">
114
114
  <span className="iw-material-symbol" aria-hidden="true">home</span>
115
115
  <span className="iw-material-symbol" aria-hidden="true">settings</span>
@@ -119,7 +119,7 @@ Use this page as a quick reference for supported icon strategies in `@inglorious
119
119
 
120
120
  <section className="iw-icon-tab-panel iw-icon-tab-panel-fa">
121
121
  <p>Load Font Awesome CSS globally, then pass an icon element as <code>children</code>. Reference: <a href="https://fontawesome.com/search" target="_blank">Font Awesome Icons</a></p>
122
- <pre><code>{`icon.render({
122
+ <pre><code>{`Icon.render({
123
123
  children: html\`<i class="fa-solid fa-user" aria-hidden="true"></i>\`,
124
124
  })`}</code></pre>
125
125
 
@@ -1,18 +1,18 @@
1
- import { virtualList } from "@inglorious/ui/virtual-list"
1
+ import { VirtualList } from "@inglorious/ui/virtual-list"
2
2
  import { html, repeat } from "@inglorious/web"
3
3
 
4
- import { button } from "../../controls/button"
4
+ import { Button } from "../../controls/button"
5
5
  import {
6
6
  createEntityRender,
7
7
  notifyActionArgType,
8
8
  } from "../../stories/notifyStory.js"
9
- import { icon } from "."
9
+ import { Icon } from "."
10
10
 
11
11
  const unicodeList = {
12
- ...virtualList,
12
+ ...VirtualList,
13
13
 
14
14
  create(entity) {
15
- virtualList.create(entity)
15
+ VirtualList.create(entity)
16
16
 
17
17
  const items = []
18
18
  let rowIndex = 0
@@ -35,7 +35,7 @@ const unicodeList = {
35
35
  },
36
36
 
37
37
  render(entity, api) {
38
- return virtualList.render(entity, {
38
+ return VirtualList.render(entity, {
39
39
  ...api,
40
40
  getType: () => unicodeList,
41
41
  })
@@ -64,7 +64,7 @@ const unicodeList = {
64
64
  .toUpperCase()
65
65
  .padStart(4, "0")}`
66
66
 
67
- return button.render({
67
+ return Button.render({
68
68
  id: code,
69
69
  variant: "ghost",
70
70
  color: "default",
@@ -72,7 +72,7 @@ const unicodeList = {
72
72
  shape: "square",
73
73
  ariaLabel: label,
74
74
  onClick: () => copyGlyph(glyph),
75
- children: icon.render({
75
+ children: Icon.render({
76
76
  children: glyph,
77
77
  size,
78
78
  color: "current",
@@ -128,7 +128,7 @@ export default {
128
128
  export const Unicode = {
129
129
  args: {
130
130
  id: "unicodeList",
131
- type: "unicodeList",
131
+ type: "UnicodeList",
132
132
  start: 0,
133
133
  end: 129799,
134
134
  columns: 20,
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { icon } from "."
2
+ import { Icon } from "."
3
3
 
4
4
  export default {
5
5
  title: "Data Display/Icon",
6
6
  tags: ["autodocs"],
7
- render: createRender(icon),
7
+ render: createRender(Icon),
8
8
  argTypes: {
9
9
  children: { control: "text", description: "Icon glyph or inline content." },
10
10
  size: {
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const icon = { ...renderers }
3
+ export const Icon = { ...renderers }
@@ -1,9 +1,16 @@
1
1
  /**
2
2
  * @typedef {import('../../../types/data-display/icon').IconProps} IconProps
3
+ * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
3
4
  */
4
5
 
5
6
  import { classMap, html } from "@inglorious/web"
6
7
 
8
+ /**
9
+ * Renders an inline icon element with size and color control.
10
+ * Use it for custom SVG, emoji, or font-based glyphs.
11
+ * @param {IconProps} props
12
+ * @returns {TemplateResult}
13
+ */
7
14
  export function render({ children, size = "md", color = "current", onClick }) {
8
15
  return html`<span
9
16
  class=${classMap({
@@ -1,4 +1,4 @@
1
1
  import * as handlers from "./handlers.js"
2
- import { list as renderers } from "./template.js"
2
+ import { List as renderers } from "./template.js"
3
3
 
4
- export const list = { ...renderers, ...handlers }
4
+ export const List = { ...renderers, ...handlers }
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { list } from "."
2
+ import { List } from "."
3
3
 
4
4
  export default {
5
5
  title: "Data Display/List",
6
6
  tags: ["autodocs"],
7
- render: createRender(list),
7
+ render: createRender(List),
8
8
  argTypes: {
9
9
  items: {
10
10
  control: "object",