@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
@@ -8,12 +8,24 @@ import { classMap, html, ref } from "@inglorious/web"
8
8
 
9
9
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
10
 
11
- export const menu = {
11
+ export const Menu = {
12
12
  /**
13
+ * Main entrypoint for a menu list. Delegates to the base renderer for overrides.
14
+ * Menus render selectable items and optional dividers.
13
15
  * @param {MenuProps} props
14
16
  * @returns {TemplateResult | null}
15
17
  */
16
18
  render(props) {
19
+ return this.renderMenu(props)
20
+ },
21
+
22
+ /**
23
+ * Renders the menu container and iterates items when open.
24
+ * Each item is delegated to `renderItem`.
25
+ * @param {MenuProps} props
26
+ * @returns {TemplateResult | null}
27
+ */
28
+ renderMenu(props) {
17
29
  const {
18
30
  type, // eslint-disable-line no-unused-vars
19
31
  isOpen = false,
@@ -46,6 +58,8 @@ export const menu = {
46
58
  },
47
59
 
48
60
  /**
61
+ * Renders a single menu item or divider.
62
+ * Handles selection, disabled state, and click callbacks.
49
63
  * @param {MenuItem} item
50
64
  * @param {number} index
51
65
  * @param {MenuProps} props
@@ -1 +1 @@
1
- export { pagination } from "./template.js"
1
+ export { Pagination } from "./template.js"
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { pagination } from "."
2
+ import { Pagination } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Pagination",
6
6
  tags: ["autodocs"],
7
- render: createRender(pagination),
7
+ render: createRender(Pagination),
8
8
  argTypes: {
9
9
  page: { control: "number", description: "Current page (1-based)." },
10
10
  count: { control: "number", description: "Total number of pages." },
@@ -7,16 +7,28 @@
7
7
 
8
8
  import { classMap, html } from "@inglorious/web"
9
9
 
10
- import { button } from "../../controls/button/index.js"
10
+ import { Button } from "../../controls/button/index.js"
11
11
 
12
12
  const PRETTY_PAGE = 1
13
13
 
14
- export const pagination = {
14
+ export const Pagination = {
15
15
  /**
16
+ * Main entrypoint for pagination controls. Delegates to the base renderer for overrides.
17
+ * Supports sibling ranges, first/last buttons, and disabled state.
16
18
  * @param {PaginationProps} props
17
19
  * @returns {TemplateResult}
18
20
  */
19
21
  render(props) {
22
+ return this.renderPagination(props)
23
+ },
24
+
25
+ /**
26
+ * Renders the pagination container and page/control items.
27
+ * Items are delegated to `renderItem` and `renderControl`.
28
+ * @param {PaginationProps} props
29
+ * @returns {TemplateResult}
30
+ */
31
+ renderPagination(props) {
20
32
  const {
21
33
  page = 1,
22
34
  count = 1,
@@ -68,6 +80,8 @@ export const pagination = {
68
80
  },
69
81
 
70
82
  /**
83
+ * Renders a single page number item or ellipsis.
84
+ * Uses the button primitive for interactive pages.
71
85
  * @param {PaginationProps} props
72
86
  * @param {PaginationItemRenderProps} payload
73
87
  * @returns {TemplateResult}
@@ -78,7 +92,7 @@ export const pagination = {
78
92
  }
79
93
 
80
94
  const isCurrent = item === props.page
81
- return button.render({
95
+ return Button.render({
82
96
  variant: isCurrent ? "default" : props.buttonVariant,
83
97
  color: isCurrent ? "primary" : props.buttonColor,
84
98
  size: props.buttonSize,
@@ -97,6 +111,8 @@ export const pagination = {
97
111
  },
98
112
 
99
113
  /**
114
+ * Renders a navigation control (first/prev/next/last).
115
+ * Uses the button primitive and wires change events.
100
116
  * @param {PaginationProps} props
101
117
  * @param {PaginationControlRenderProps} payload
102
118
  * @returns {TemplateResult}
@@ -105,7 +121,7 @@ export const pagination = {
105
121
  props,
106
122
  { label, target, isDisabled = false, onChange = props.onChange },
107
123
  ) {
108
- return button.render({
124
+ return Button.render({
109
125
  variant: props.buttonVariant,
110
126
  color: props.buttonColor,
111
127
  size: props.buttonSize,
@@ -1 +1 @@
1
- export { speedDial } from "./template.js"
1
+ export { SpeedDial } from "./template.js"
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { speedDial } from "."
2
+ import { SpeedDial } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Speed Dial",
6
6
  tags: ["autodocs"],
7
- render: createRender(speedDial),
7
+ render: createRender(SpeedDial),
8
8
  argTypes: {
9
9
  isOpen: {
10
10
  control: "boolean",
@@ -6,12 +6,24 @@
6
6
 
7
7
  import { classMap, html } from "@inglorious/web"
8
8
 
9
- export const speedDial = {
9
+ export const SpeedDial = {
10
10
  /**
11
+ * Main entrypoint for the speed dial. Delegates to the base renderer for overrides.
12
+ * Shows a trigger button and an expandable list of actions.
11
13
  * @param {SpeedDialProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
14
16
  render(props) {
17
+ return this.renderSpeedDial(props)
18
+ },
19
+
20
+ /**
21
+ * Renders the speed dial container, trigger, and optional actions list.
22
+ * Actions are delegated to `renderAction`.
23
+ * @param {SpeedDialProps} props
24
+ * @returns {TemplateResult}
25
+ */
26
+ renderSpeedDial(props) {
15
27
  const {
16
28
  isOpen = false,
17
29
  direction = "up",
@@ -46,6 +58,8 @@ export const speedDial = {
46
58
  },
47
59
 
48
60
  /**
61
+ * Renders a single speed dial action button.
62
+ * Handles click callbacks and disabled state.
49
63
  * @param {SpeedDialAction} action
50
64
  * @param {number} index
51
65
  * @param {SpeedDialProps} props
@@ -1 +1 @@
1
- export { stepper } from "./template.js"
1
+ export { Stepper } from "./template.js"
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { stepper } from "."
2
+ import { Stepper } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Stepper",
6
6
  tags: ["autodocs"],
7
- render: createRender(stepper),
7
+ render: createRender(Stepper),
8
8
  argTypes: {
9
9
  steps: { control: "object", description: "Ordered step definitions." },
10
10
  activeStep: {
@@ -6,12 +6,24 @@
6
6
 
7
7
  import { classMap, html } from "@inglorious/web"
8
8
 
9
- export const stepper = {
9
+ export const Stepper = {
10
10
  /**
11
+ * Main entrypoint for the stepper component. Delegates to the base renderer for overrides.
12
+ * Steppers render a sequence of steps with completion states.
11
13
  * @param {StepperProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
14
16
  render(props) {
17
+ return this.renderStepper(props)
18
+ },
19
+
20
+ /**
21
+ * Renders the ordered list of steps with orientation styling.
22
+ * Each step is delegated to `renderStep`.
23
+ * @param {StepperProps} props
24
+ * @returns {TemplateResult}
25
+ */
26
+ renderStepper(props) {
15
27
  const {
16
28
  steps = [],
17
29
  activeStep = 0,
@@ -33,6 +45,8 @@ export const stepper = {
33
45
  },
34
46
 
35
47
  /**
48
+ * Renders a single step with label, optional text, and completion state.
49
+ * Calculates active/completed styling based on the current step.
36
50
  * @param {Step} step
37
51
  * @param {number} index
38
52
  * @param {StepperProps} props
@@ -1 +1 @@
1
- export { tabs } from "./template.js"
1
+ export { Tabs } from "./template.js"
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { tabs } from "."
2
+ import { Tabs } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Tabs",
6
6
  tags: ["autodocs"],
7
- render: createRender(tabs),
7
+ render: createRender(Tabs),
8
8
  argTypes: {
9
9
  items: {
10
10
  control: "object",
@@ -6,12 +6,24 @@
6
6
 
7
7
  import { classMap, html } from "@inglorious/web"
8
8
 
9
- export const tabs = {
9
+ export const Tabs = {
10
10
  /**
11
+ * Main entrypoint for tabbed navigation. Delegates to the base renderer for overrides.
12
+ * Renders tab labels and the active panel.
11
13
  * @param {TabsProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
14
16
  render(props) {
17
+ return this.renderTabs(props)
18
+ },
19
+
20
+ /**
21
+ * Renders the tabs list and the active panel container.
22
+ * Individual tabs are delegated to `renderTab`.
23
+ * @param {TabsProps} props
24
+ * @returns {TemplateResult}
25
+ */
26
+ renderTabs(props) {
15
27
  const {
16
28
  items = [],
17
29
  value = items[0]?.value ?? 0,
@@ -40,6 +52,8 @@ export const tabs = {
40
52
  },
41
53
 
42
54
  /**
55
+ * Renders a single tab button with selected/disabled states.
56
+ * Wires click events to update the active tab.
43
57
  * @param {TabItem} item
44
58
  * @param {number} index
45
59
  * @param {TabsProps} props
@@ -69,6 +83,8 @@ export const tabs = {
69
83
  },
70
84
 
71
85
  /**
86
+ * Renders the active tab panel content.
87
+ * Returns `null` when the active item has no panel.
72
88
  * @param {TabItem | null} item
73
89
  * @returns {TemplateResult | null}
74
90
  */
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { accordion } from "."
4
+ import { Accordion } from "."
5
5
 
6
6
  export default {
7
7
  title: "Surfaces/Accordion",
8
8
  tags: ["autodocs"],
9
- render: createRender(accordion),
9
+ render: createRender(Accordion),
10
10
  argTypes: {
11
11
  items: {
12
12
  control: "object",
@@ -1 +1 @@
1
- export { accordion } from "./template.js"
1
+ export { Accordion } from "./template.js"
@@ -8,12 +8,24 @@ import { classMap, html, ref } from "@inglorious/web"
8
8
 
9
9
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
10
 
11
- export const accordion = {
11
+ export const Accordion = {
12
12
  /**
13
+ * Main entrypoint for the accordion component. Delegates to the base accordion renderer for overrides.
14
+ * Accordions render a list of collapsible items with optional icons.
13
15
  * @param {AccordionProps} props
14
16
  * @returns {TemplateResult}
15
17
  */
16
18
  render(props) {
19
+ return this.renderAccordion(props)
20
+ },
21
+
22
+ /**
23
+ * Renders the accordion container and iterates items.
24
+ * Each item is delegated to `renderItem`.
25
+ * @param {AccordionProps} props
26
+ * @returns {TemplateResult}
27
+ */
28
+ renderAccordion(props) {
17
29
  const {
18
30
  type, // eslint-disable-line no-unused-vars
19
31
  items = [],
@@ -40,6 +52,8 @@ export const accordion = {
40
52
  },
41
53
 
42
54
  /**
55
+ * Renders a single accordion item with trigger and panel content.
56
+ * Handles expand/collapse behavior and item-level callbacks.
43
57
  * @param {AccordionItem} item
44
58
  * @param {number} index
45
59
  * @param {AccordionProps} props
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { appBar } from "."
4
+ import { AppBar } from "."
5
5
 
6
6
  export default {
7
7
  title: "Surfaces/App Bar",
8
8
  tags: ["autodocs"],
9
- render: createRender(appBar),
9
+ render: createRender(AppBar),
10
10
  argTypes: {
11
11
  title: {
12
12
  control: "text",
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const appBar = { ...renderers }
3
+ export const AppBar = { ...renderers }
@@ -8,6 +8,8 @@ import { classMap, html, ref, when } from "@inglorious/web"
8
8
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
9
 
10
10
  /**
11
+ * Renders a top app bar with optional leading/trailing content and title metadata.
12
+ * Supports variants, density, color, and positioning modes.
11
13
  * @param {AppBarProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { card } from "."
4
+ import { Card } from "."
5
5
 
6
6
  export default {
7
7
  title: "Surfaces/Card",
8
8
  tags: ["autodocs"],
9
- render: createRender(card),
9
+ render: createRender(Card),
10
10
  argTypes: {
11
11
  title: {
12
12
  control: "text",
@@ -1 +1 @@
1
- export { card } from "./template.js"
1
+ export { Card } from "./template.js"
@@ -7,12 +7,24 @@ import { classMap, html, ref } from "@inglorious/web"
7
7
 
8
8
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
9
 
10
- export const card = {
10
+ export const Card = {
11
11
  /**
12
+ * Main entrypoint for the card component. Delegates to the base card renderer for easy overrides.
13
+ * Cards support header, body, and footer slots with optional click behavior.
12
14
  * @param {CardProps} props
13
15
  * @returns {TemplateResult}
14
16
  */
15
17
  render(props) {
18
+ return this.renderCard(props)
19
+ },
20
+
21
+ /**
22
+ * Renders the card container and composes header, body, and footer sub-sections.
23
+ * Uses `element` to control the semantic tag.
24
+ * @param {CardProps} props
25
+ * @returns {TemplateResult}
26
+ */
27
+ renderCard(props) {
16
28
  const {
17
29
  type, // eslint-disable-line no-unused-vars
18
30
  element = "article",
@@ -52,6 +64,8 @@ export const card = {
52
64
  },
53
65
 
54
66
  /**
67
+ * Renders the optional card header area (title, subtitle, or custom header content).
68
+ * Returns `null` when no header content is provided.
55
69
  * @param {CardProps} props
56
70
  * @returns {TemplateResult | null}
57
71
  */
@@ -83,6 +97,8 @@ export const card = {
83
97
  },
84
98
 
85
99
  /**
100
+ * Renders the main card content area.
101
+ * Returns `null` when there is no body or children content.
86
102
  * @param {CardProps} props
87
103
  * @returns {TemplateResult | null}
88
104
  */
@@ -103,6 +119,8 @@ export const card = {
103
119
  },
104
120
 
105
121
  /**
122
+ * Renders the optional card footer area, typically for actions.
123
+ * Returns `null` when no footer content is provided.
106
124
  * @param {CardProps} props
107
125
  * @returns {TemplateResult | null}
108
126
  */
@@ -1,3 +1,3 @@
1
- import { render } from "./template.js"
1
+ import * as renderers from "./template.js"
2
2
 
3
- export const paper = { render }
3
+ export const Paper = { ...renderers }
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { paper } from "."
4
+ import { Paper } from "."
5
5
 
6
6
  export default {
7
7
  title: "Surfaces/Paper",
8
8
  tags: ["autodocs"],
9
- render: createRender(paper),
9
+ render: createRender(Paper),
10
10
  argTypes: {
11
11
  variant: {
12
12
  control: "select",
@@ -85,7 +85,7 @@ export const AllElevations = {
85
85
  ${[0, 1, 2, 3, 4].map(
86
86
  (level) =>
87
87
  html`<div>
88
- ${paper.render({
88
+ ${Paper.render({
89
89
  variant: "elevated",
90
90
  elevation: level,
91
91
  padding: "md",
@@ -8,6 +8,8 @@ import { classMap, html, ref } from "@inglorious/web"
8
8
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
9
 
10
10
  /**
11
+ * Renders a surface container with elevation, radius, and padding options.
12
+ * Use it as a generic surface for grouping content.
11
13
  * @param {PaperProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
@@ -33,4 +33,4 @@ export interface ButtonGroupType {
33
33
  render(props: ButtonGroupProps): TemplateResult
34
34
  }
35
35
 
36
- export declare const buttonGroup: ButtonGroupType
36
+ export declare const ButtonGroup: ButtonGroupType
@@ -2,7 +2,7 @@ import type { TemplateResult } from "@inglorious/web"
2
2
 
3
3
  export interface ButtonProps {
4
4
  id?: string
5
- type: "button"
5
+ type: "Button"
6
6
  children?: TemplateResult | string | number
7
7
  variant?: "default" | "outline" | "ghost"
8
8
  color?: "primary" | "secondary" | "success" | "warning" | "error" | "info"
@@ -23,4 +23,4 @@ export interface ButtonType {
23
23
  render(props: ButtonProps): TemplateResult
24
24
  }
25
25
 
26
- export declare const button: ButtonType
26
+ export declare const Button: ButtonType
@@ -17,4 +17,4 @@ export interface CheckboxType {
17
17
  render(props: CheckboxProps): TemplateResult
18
18
  }
19
19
 
20
- export declare const checkbox: CheckboxType
20
+ export declare const Checkbox: CheckboxType
@@ -51,6 +51,7 @@ export interface ComboboxProps {
51
51
  export interface ComboboxType {
52
52
  create(entity: ComboboxProps): void
53
53
  render(entity: ComboboxProps, api: Api): TemplateResult
54
+ renderCombobox(props: ComboboxProps): TemplateResult
54
55
  open(entity: ComboboxProps): void
55
56
  close(entity: ComboboxProps): void
56
57
  toggle(entity: ComboboxProps): void
@@ -63,4 +64,4 @@ export interface ComboboxType {
63
64
  focusLast(entity: ComboboxProps): void
64
65
  }
65
66
 
66
- export declare const combobox: ComboboxType
67
+ export declare const Combobox: ComboboxType
@@ -17,4 +17,4 @@ export interface FabType {
17
17
  render(props: FabProps): TemplateResult
18
18
  }
19
19
 
20
- export declare const fab: FabType
20
+ export declare const Fab: FabType
@@ -21,4 +21,4 @@ export interface IconButtonType {
21
21
  render(props: IconButtonProps): TemplateResult
22
22
  }
23
23
 
24
- export declare const iconButton: IconButtonType
24
+ export declare const IconButton: IconButtonType
@@ -33,4 +33,4 @@ export interface InputType {
33
33
  render(props: InputProps): TemplateResult
34
34
  }
35
35
 
36
- export declare const input: InputType
36
+ export declare const Input: InputType
@@ -24,4 +24,4 @@ export interface RadioGroupType {
24
24
  render(props: RadioGroupProps): TemplateResult
25
25
  }
26
26
 
27
- export declare const radioGroup: RadioGroupType
27
+ export declare const RadioGroup: RadioGroupType
@@ -16,4 +16,4 @@ export interface RatingType {
16
16
  render(props: RatingProps): TemplateResult
17
17
  }
18
18
 
19
- export declare const rating: RatingType
19
+ export declare const Rating: RatingType
@@ -30,4 +30,4 @@ export interface SelectType {
30
30
  render(props: SelectProps): TemplateResult
31
31
  }
32
32
 
33
- export declare const select: SelectType
33
+ export declare const Select: SelectType
@@ -20,4 +20,4 @@ export interface SliderType {
20
20
  render(props: SliderProps): TemplateResult
21
21
  }
22
22
 
23
- export declare const slider: SliderType
23
+ export declare const Slider: SliderType
@@ -16,4 +16,4 @@ export interface SwitchType {
16
16
  render(props: SwitchProps): TemplateResult
17
17
  }
18
18
 
19
- export declare const switchControl: SwitchType
19
+ export declare const Switch: SwitchType
@@ -27,4 +27,4 @@ export interface AvatarType {
27
27
  render(props: AvatarProps): TemplateResult
28
28
  }
29
29
 
30
- export declare const avatar: AvatarType
30
+ export declare const Avatar: AvatarType
@@ -17,4 +17,4 @@ export interface BadgeType {
17
17
  render(props: BadgeProps): TemplateResult
18
18
  }
19
19
 
20
- export declare const badge: BadgeType
20
+ export declare const Badge: BadgeType
@@ -22,4 +22,4 @@ export interface ChipType {
22
22
  render(props: ChipProps): TemplateResult
23
23
  }
24
24
 
25
- export declare const chip: ChipType
25
+ export declare const Chip: ChipType
@@ -122,9 +122,10 @@ export interface DataGridType {
122
122
  rowsToggleAll(entity: DataGridProps): void
123
123
  rowsSelectAll(entity: DataGridProps): void
124
124
  selectionClear(entity: DataGridProps): void
125
- virtualScroll(entity: DataGridProps, containerEl: HTMLElement): void
126
125
  virtualMount(entity: DataGridProps, containerEl: HTMLElement): void
126
+ virtualScroll(entity: DataGridProps, containerEl: HTMLElement): void
127
127
  render(entity: DataGridProps, api: Api): TemplateResult
128
+ renderDataGrid(entity: DataGridProps, api: Api): TemplateResult
128
129
  renderHeader(entity: DataGridProps, api: Api): TemplateResult
129
130
  renderToolbar(entity: DataGridProps, api: Api): TemplateResult
130
131
  renderHeaderColumn(
@@ -11,4 +11,4 @@ export interface DividerType {
11
11
  render(props: DividerProps): TemplateResult
12
12
  }
13
13
 
14
- export declare const divider: DividerType
14
+ export declare const Divider: DividerType
@@ -13,4 +13,4 @@ export interface IconType {
13
13
  render(props: IconProps): TemplateResult
14
14
  }
15
15
 
16
- export declare const icon: IconType
16
+ export declare const Icon: IconType
@@ -39,6 +39,7 @@ export interface ListProps {
39
39
 
40
40
  export interface ListType {
41
41
  render(props: ListProps): TemplateResult
42
+ renderList(props: ListProps): TemplateResult
42
43
  renderItem(
43
44
  props: ListProps,
44
45
  payload: {
@@ -63,4 +64,4 @@ export interface ListType {
63
64
  ): TemplateResult
64
65
  }
65
66
 
66
- export declare const list: ListType
67
+ export declare const List: ListType