@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
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { dialog } from "."
4
+ import { Dialog } from "."
5
5
 
6
6
  export default {
7
7
  title: "Feedback/Dialog",
8
8
  tags: ["autodocs"],
9
- render: createRender(dialog),
9
+ render: createRender(Dialog),
10
10
  argTypes: {
11
11
  isOpen: { control: "boolean" },
12
12
  title: { control: "text" },
@@ -1,3 +1,3 @@
1
- import { render } from "./template.js"
1
+ import * as renderers from "./template.js"
2
2
 
3
- export const dialog = { render }
3
+ export const Dialog = { ...renderers }
@@ -6,6 +6,8 @@
6
6
  import { classMap, html } from "@inglorious/web"
7
7
 
8
8
  /**
9
+ * Renders a modal dialog with header, body, and actions when open.
10
+ * Clicking the backdrop can close the dialog when handlers are provided.
9
11
  * @param {DialogProps} props
10
12
  * @returns {TemplateResult | null}
11
13
  */
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const progress = { ...renderers }
3
+ export const Progress = { ...renderers }
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { progress } from "."
2
+ import { Progress } from "."
3
3
 
4
4
  export default {
5
5
  title: "Feedback/Progress",
6
6
  tags: ["autodocs"],
7
- render: createRender(progress),
7
+ render: createRender(Progress),
8
8
  argTypes: {
9
9
  variant: { control: "select", options: ["linear", "circular"] },
10
10
  value: { control: "number" },
@@ -10,6 +10,8 @@ function clamp(value) {
10
10
  }
11
11
 
12
12
  /**
13
+ * Renders a linear or circular progress indicator.
14
+ * Indeterminate mode is used when no explicit value is provided.
13
15
  * @param {ProgressProps} props
14
16
  * @returns {TemplateResult}
15
17
  */
@@ -41,7 +43,7 @@ export function render(props) {
41
43
  class=${classMap({
42
44
  "iw-progress": true,
43
45
  "iw-progress-circular": true,
44
- "iw-progress-${color}": true,
46
+ [`iw-progress-${color}`]: true,
45
47
  "iw-progress-indeterminate": progress == null,
46
48
  ...extraClasses,
47
49
  })}
@@ -1,3 +1,3 @@
1
- import { render } from "./template.js"
1
+ import * as renderers from "./template.js"
2
2
 
3
- export const skeleton = { render }
3
+ export const Skeleton = { ...renderers }
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { skeleton } from "."
2
+ import { Skeleton } from "."
3
3
 
4
4
  export default {
5
5
  title: "Feedback/Skeleton",
6
6
  tags: ["autodocs"],
7
- render: createRender(skeleton),
7
+ render: createRender(Skeleton),
8
8
  argTypes: {
9
9
  variant: { control: "select", options: ["text", "rect", "circle"] },
10
10
  width: { control: "text" },
@@ -6,6 +6,8 @@
6
6
  import { classMap, html } from "@inglorious/web"
7
7
 
8
8
  /**
9
+ * Renders a loading skeleton placeholder for text, blocks, or multiple lines.
10
+ * Use it to indicate content is loading without layout shifts.
9
11
  * @param {SkeletonProps} props
10
12
  * @returns {TemplateResult}
11
13
  */
@@ -1,3 +1,3 @@
1
- import { render } from "./template.js"
1
+ import * as renderers from "./template.js"
2
2
 
3
- export const snackbar = { render }
3
+ export const Snackbar = { ...renderers }
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { snackbar } from "."
2
+ import { Snackbar } from "."
3
3
 
4
4
  export default {
5
5
  title: "Feedback/Snackbar",
6
6
  tags: ["autodocs"],
7
- render: createRender(snackbar),
7
+ render: createRender(Snackbar),
8
8
  argTypes: {
9
9
  isOpen: { control: "boolean" },
10
10
  message: { control: "text" },
@@ -6,6 +6,8 @@
6
6
  import { classMap, html } from "@inglorious/web"
7
7
 
8
8
  /**
9
+ * Renders a transient snackbar message with optional action and dismiss control.
10
+ * Position is configurable (for example bottom-left or top-right).
9
11
  * @param {SnackbarProps} props
10
12
  * @returns {TemplateResult | null}
11
13
  */
package/src/index.js CHANGED
@@ -1,45 +1,45 @@
1
- export { button } from "./controls/button/index.js"
2
- export { buttonGroup } from "./controls/button-group/index.js"
3
- export { checkbox } from "./controls/checkbox/index.js"
4
- export { fab } from "./controls/fab/index.js"
5
- export { iconButton } from "./controls/icon-button/index.js"
6
- export { input } from "./controls/input/index.js"
7
- export { radioGroup } from "./controls/radio-group/index.js"
8
- export { rating } from "./controls/rating/index.js"
9
- export { select } from "./controls/select/index.js"
10
- export { slider } from "./controls/slider/index.js"
11
- export { switchControl } from "./controls/switch/index.js"
12
- export { avatar } from "./data-display/avatar/index.js"
13
- export { badge } from "./data-display/badge/index.js"
14
- export { chip } from "./data-display/chip/index.js"
15
- export { dataGrid } from "./data-display/data-grid/index.js"
16
- export { divider } from "./data-display/divider/index.js"
17
- export { icon } from "./data-display/icon/index.js"
18
- export { list } from "./data-display/list/index.js"
19
- export { materialIcon } from "./data-display/material-icon/index.js"
20
- export { table } from "./data-display/table/index.js"
21
- export { tooltip } from "./data-display/tooltip/index.js"
22
- export { typography } from "./data-display/typography/index.js"
23
- export { virtualList } from "./data-display/virtual-list/index.js"
24
- export { alert } from "./feedback/alert/index.js"
25
- export { backdrop } from "./feedback/backdrop/index.js"
26
- export { dialog } from "./feedback/dialog/index.js"
27
- export { progress } from "./feedback/progress/index.js"
28
- export { skeleton } from "./feedback/skeleton/index.js"
29
- export { snackbar } from "./feedback/snackbar/index.js"
30
- export { container } from "./layout/container/index.js"
31
- export { flex } from "./layout/flex/index.js"
32
- export { grid } from "./layout/grid/index.js"
33
- export { bottomNavigation } from "./navigation/bottom-navigation/index.js"
34
- export { breadcrumbs } from "./navigation/breadcrumbs/index.js"
35
- export { drawer } from "./navigation/drawer/index.js"
36
- export { link } from "./navigation/link/index.js"
37
- export { menu } from "./navigation/menu/index.js"
38
- export { pagination } from "./navigation/pagination/index.js"
39
- export { speedDial } from "./navigation/speed-dial/index.js"
40
- export { stepper } from "./navigation/stepper/index.js"
41
- export { tabs } from "./navigation/tabs/index.js"
42
- export { accordion } from "./surfaces/accordion/index.js"
43
- export { appBar } from "./surfaces/app-bar/index.js"
44
- export { card } from "./surfaces/card/index.js"
45
- export { paper } from "./surfaces/paper/index.js"
1
+ export { Button } from "./controls/button/index.js"
2
+ export { ButtonGroup } from "./controls/button-group/index.js"
3
+ export { Checkbox } from "./controls/checkbox/index.js"
4
+ export { Fab } from "./controls/fab/index.js"
5
+ export { IconButton } from "./controls/icon-button/index.js"
6
+ export { Input } from "./controls/input/index.js"
7
+ export { RadioGroup } from "./controls/radio-group/index.js"
8
+ export { Rating } from "./controls/rating/index.js"
9
+ export { Select } from "./controls/select/index.js"
10
+ export { Slider } from "./controls/slider/index.js"
11
+ export { Switch } from "./controls/switch/index.js"
12
+ export { Avatar } from "./data-display/avatar/index.js"
13
+ export { Badge } from "./data-display/badge/index.js"
14
+ export { Chip } from "./data-display/chip/index.js"
15
+ export { DataGrid } from "./data-display/data-grid/index.js"
16
+ export { Divider } from "./data-display/divider/index.js"
17
+ export { Icon } from "./data-display/icon/index.js"
18
+ export { List } from "./data-display/list/index.js"
19
+ export { MaterialIcon } from "./data-display/material-icon/index.js"
20
+ export { Table } from "./data-display/table/index.js"
21
+ export { Tooltip } from "./data-display/tooltip/index.js"
22
+ export { Typography } from "./data-display/typography/index.js"
23
+ export { VirtualList } from "./data-display/virtual-list/index.js"
24
+ export { Alert } from "./feedback/alert/index.js"
25
+ export { Backdrop } from "./feedback/backdrop/index.js"
26
+ export { Dialog } from "./feedback/dialog/index.js"
27
+ export { Progress } from "./feedback/progress/index.js"
28
+ export { Skeleton } from "./feedback/skeleton/index.js"
29
+ export { Snackbar } from "./feedback/snackbar/index.js"
30
+ export { Container } from "./layout/container/index.js"
31
+ export { Flex } from "./layout/flex/index.js"
32
+ export { Grid } from "./layout/grid/index.js"
33
+ export { BottomNavigation } from "./navigation/bottom-navigation/index.js"
34
+ export { Breadcrumbs } from "./navigation/breadcrumbs/index.js"
35
+ export { Drawer } from "./navigation/drawer/index.js"
36
+ export { Link } from "./navigation/link/index.js"
37
+ export { Menu } from "./navigation/menu/index.js"
38
+ export { Pagination } from "./navigation/pagination/index.js"
39
+ export { SpeedDial } from "./navigation/speed-dial/index.js"
40
+ export { Stepper } from "./navigation/stepper/index.js"
41
+ export { Tabs } from "./navigation/tabs/index.js"
42
+ export { Accordion } from "./surfaces/accordion/index.js"
43
+ export { AppBar } from "./surfaces/app-bar/index.js"
44
+ export { Card } from "./surfaces/card/index.js"
45
+ export { Paper } from "./surfaces/paper/index.js"
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { container } from "."
4
+ import { Container } from "."
5
5
 
6
6
  export default {
7
7
  title: "Layout/Container",
8
8
  tags: ["autodocs"],
9
- render: createRender(container),
9
+ render: createRender(Container),
10
10
  argTypes: {
11
11
  maxWidth: {
12
12
  control: "text",
@@ -79,7 +79,7 @@ export const WidthPresets = {
79
79
  >
80
80
  ${size}
81
81
  </div>
82
- ${container.render({
82
+ ${Container.render({
83
83
  maxWidth: size,
84
84
  children: html`<div
85
85
  style="padding: 0.5rem 0.75rem; border: 1px solid var(--iw-color-border);"
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const container = { ...renderers }
3
+ export const Container = { ...renderers }
@@ -16,6 +16,8 @@ const SIZE_TO_MAX_WIDTH = {
16
16
  }
17
17
 
18
18
  /**
19
+ * Renders a responsive layout container with optional max width and padding.
20
+ * Use it to constrain page content while keeping semantic HTML tags.
19
21
  * @param {ContainerProps} props
20
22
  * @returns {TemplateResult}
21
23
  */
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { flex } from "."
4
+ import { Flex } from "."
5
5
 
6
6
  export default {
7
7
  title: "Layout/Flex",
8
8
  tags: ["autodocs"],
9
- render: createRender(flex),
9
+ render: createRender(Flex),
10
10
  argTypes: {
11
11
  direction: {
12
12
  control: "select",
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const flex = { ...renderers }
3
+ export const Flex = { ...renderers }
@@ -8,9 +8,8 @@ import { classMap, ref, staticHtml, unsafeStatic } from "@inglorious/web"
8
8
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
9
 
10
10
  /**
11
- * Flex layout component for Inglorious Web.
12
- * Children are rendered as-is (templates/content composition).
13
- *
11
+ * Renders a flexible layout container with direction, alignment, spacing, and wrap control.
12
+ * Use it to compose layouts without writing custom flexbox CSS.
14
13
  * @param {FlexProps} props
15
14
  * @returns {TemplateResult}
16
15
  */
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { grid } from "."
4
+ import { Grid } from "."
5
5
 
6
6
  export default {
7
7
  title: "Layout/Grid",
8
8
  tags: ["autodocs"],
9
- render: createRender(grid),
9
+ render: createRender(Grid),
10
10
  argTypes: {
11
11
  columns: {
12
12
  control: "number",
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const grid = { ...renderers }
3
+ export const Grid = { ...renderers }
@@ -6,9 +6,8 @@
6
6
  import { classMap, html, styleMap } from "@inglorious/web"
7
7
 
8
8
  /**
9
- * Grid layout component for Inglorious Web.
10
- * Children are rendered as-is (templates/content composition).
11
- *
9
+ * Renders a CSS grid container with configurable columns, gaps, and alignment.
10
+ * Supports fixed column counts or auto-fit with a minimum column width.
12
11
  * @param {GridProps} props
13
12
  * @returns {TemplateResult}
14
13
  */
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { bottomNavigation } from "."
2
+ import { BottomNavigation } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Bottom Navigation",
6
6
  tags: ["autodocs"],
7
- render: createRender(bottomNavigation),
7
+ render: createRender(BottomNavigation),
8
8
  argTypes: {
9
9
  actions: { control: "object", description: "Bottom navigation actions." },
10
10
  value: { control: "text", description: "Currently selected action value." },
@@ -1 +1 @@
1
- export { bottomNavigation } from "./template.js"
1
+ export { BottomNavigation } 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 bottomNavigation = {
11
+ export const BottomNavigation = {
12
12
  /**
13
+ * Main entrypoint for bottom navigation. Delegates to the base renderer for overrides.
14
+ * Renders a row of actions with optional labels.
13
15
  * @param {BottomNavigationProps} props
14
16
  * @returns {TemplateResult}
15
17
  */
16
18
  render(props) {
19
+ return this.renderBottomNavigation(props)
20
+ },
21
+
22
+ /**
23
+ * Renders the navigation container and iterates actions.
24
+ * Each action is delegated to `renderAction`.
25
+ * @param {BottomNavigationProps} props
26
+ * @returns {TemplateResult}
27
+ */
28
+ renderBottomNavigation(props) {
17
29
  const {
18
30
  type, // eslint-disable-line no-unused-vars
19
31
  actions = [],
@@ -41,6 +53,8 @@ export const bottomNavigation = {
41
53
  },
42
54
 
43
55
  /**
56
+ * Renders a single bottom navigation action.
57
+ * Handles selection state and click callbacks.
44
58
  * @param {BottomNavigationAction} action
45
59
  * @param {number} index
46
60
  * @param {BottomNavigationProps} props
@@ -56,7 +70,7 @@ export const bottomNavigation = {
56
70
  "iw-bottom-navigation-action": true,
57
71
  "iw-bottom-navigation-action-selected": selected,
58
72
  })}
59
- aria-current=${selected ? "page" : null}
73
+ aria-current=${selected ? "page" : "false"}
60
74
  ?disabled=${action.isDisabled}
61
75
  @click=${() => {
62
76
  action.onClick?.(currentValue)
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { breadcrumbs } from "."
2
+ import { Breadcrumbs } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Breadcrumbs",
6
6
  tags: ["autodocs"],
7
- render: createRender(breadcrumbs),
7
+ render: createRender(Breadcrumbs),
8
8
  argTypes: {
9
9
  items: { control: "object", description: "Ordered breadcrumb path items." },
10
10
  separator: {
@@ -1 +1 @@
1
- export { breadcrumbs } from "./template.js"
1
+ export { Breadcrumbs } 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 breadcrumbs = {
11
+ export const Breadcrumbs = {
12
12
  /**
13
+ * Main entrypoint for breadcrumbs navigation. Delegates to the base renderer for overrides.
14
+ * Renders a list of path items separated by a configurable separator.
13
15
  * @param {BreadcrumbsProps} props
14
16
  * @returns {TemplateResult}
15
17
  */
16
18
  render(props) {
19
+ return this.renderBreadcrumbs(props)
20
+ },
21
+
22
+ /**
23
+ * Renders the breadcrumb container and iterates items.
24
+ * Each item is delegated to `renderItem`.
25
+ * @param {BreadcrumbsProps} props
26
+ * @returns {TemplateResult}
27
+ */
28
+ renderBreadcrumbs(props) {
17
29
  const {
18
30
  type, // eslint-disable-line no-unused-vars
19
31
  items = [],
@@ -49,6 +61,8 @@ export const breadcrumbs = {
49
61
  },
50
62
 
51
63
  /**
64
+ * Renders a single breadcrumb item, handling current vs. link states.
65
+ * Override to customize labels or link behavior.
52
66
  * @param {BreadcrumbItem} item
53
67
  * @param {number} index
54
68
  * @param {BreadcrumbsProps} props
@@ -70,7 +84,7 @@ export const breadcrumbs = {
70
84
  class=${classMap({
71
85
  "iw-breadcrumbs-current": isLast,
72
86
  })}
73
- aria-current=${isLast ? "page" : null}
87
+ aria-current=${isLast ? "page" : "false"}
74
88
  >
75
89
  ${item.label}
76
90
  </span>`}
@@ -1,12 +1,12 @@
1
1
  import { html } from "@inglorious/web"
2
2
 
3
3
  import { createRender } from "../../stories/notifyStory.js"
4
- import { drawer } from "."
4
+ import { Drawer } from "."
5
5
 
6
6
  export default {
7
7
  title: "Navigation/Drawer",
8
8
  tags: ["autodocs"],
9
- render: createRender(drawer),
9
+ render: createRender(Drawer),
10
10
  argTypes: {
11
11
  isOpen: {
12
12
  control: "boolean",
@@ -1,3 +1,3 @@
1
1
  import * as renderers from "./template.js"
2
2
 
3
- export const drawer = { ...renderers }
3
+ export const Drawer = { ...renderers }
@@ -5,12 +5,14 @@
5
5
 
6
6
  import { html, when } from "@inglorious/web"
7
7
 
8
- import { button } from "../../controls/button"
9
- import { materialIcon } from "../../data-display/material-icon"
10
- import { backdrop } from "../../feedback/backdrop"
11
- import { flex } from "../../layout/flex"
8
+ import { Button } from "../../controls/button"
9
+ import { MaterialIcon } from "../../data-display/material-icon"
10
+ import { Backdrop } from "../../feedback/backdrop"
11
+ import { Flex } from "../../layout/flex"
12
12
 
13
13
  /**
14
+ * Renders a side drawer panel with optional header, body, and collapse controls.
15
+ * Can show a backdrop when open and supports left/right anchoring.
14
16
  * @param {DrawerProps} props
15
17
  * @returns {TemplateResult}
16
18
  */
@@ -50,7 +52,7 @@ export function render(props) {
50
52
  .join(" ")
51
53
 
52
54
  return html`
53
- ${flex.render({
55
+ ${Flex.render({
54
56
  element: "aside",
55
57
  direction: "column",
56
58
  className: drawerClassName,
@@ -58,7 +60,7 @@ export function render(props) {
58
60
  when(
59
61
  title || onClose,
60
62
  () => html`
61
- ${flex.render({
63
+ ${Flex.render({
62
64
  align: "center",
63
65
  justify: "between",
64
66
  gap: "sm",
@@ -69,14 +71,14 @@ export function render(props) {
69
71
  () => html`<div class="iw-drawer-title">${title}</div>`,
70
72
  ),
71
73
  when(onClose, () =>
72
- button.render({
74
+ Button.render({
73
75
  color: "secondary",
74
76
  variant: "ghost",
75
77
  shape: "square",
76
78
  className: "iw-drawer-close",
77
79
  "aria-label": "Close",
78
80
  onClick: onClose,
79
- children: materialIcon.render({
81
+ children: MaterialIcon.render({
80
82
  name: "close",
81
83
  size: "lg",
82
84
  }),
@@ -87,7 +89,7 @@ export function render(props) {
87
89
  `,
88
90
  ),
89
91
 
90
- flex.render({
92
+ Flex.render({
91
93
  direction: "column",
92
94
  className: "iw-drawer-body",
93
95
  children,
@@ -96,11 +98,11 @@ export function render(props) {
96
98
  when(
97
99
  onCollapseToggle,
98
100
  () => html`
99
- ${flex.render({
101
+ ${Flex.render({
100
102
  justify: "end",
101
103
  padding: "sm",
102
104
  className: "iw-drawer-footer",
103
- children: button.render({
105
+ children: Button.render({
104
106
  color: "secondary",
105
107
  variant: "ghost",
106
108
  shape: "square",
@@ -109,7 +111,7 @@ export function render(props) {
109
111
  ? "Expand sidebar"
110
112
  : "Collapse sidebar",
111
113
  onClick: onCollapseToggle,
112
- children: materialIcon.render({
114
+ children: MaterialIcon.render({
113
115
  name: "left_panel_close",
114
116
  size: "lg",
115
117
  }),
@@ -121,7 +123,7 @@ export function render(props) {
121
123
  ...rest,
122
124
  })}
123
125
  ${when(isOpen && hasBackdrop, () =>
124
- backdrop.render({
126
+ Backdrop.render({
125
127
  isOpen: true,
126
128
  className: "iw-drawer-backdrop",
127
129
  onClick: onClose,
@@ -1,3 +1,3 @@
1
- import { render } from "./template.js"
1
+ import * as renderers from "./template.js"
2
2
 
3
- export const link = { render }
3
+ export const Link = { ...renderers }
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { link } from "."
2
+ import { Link } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Link",
6
6
  tags: ["autodocs"],
7
- render: createRender(link),
7
+ render: createRender(Link),
8
8
  argTypes: {
9
9
  href: { control: "text", description: "Destination URL." },
10
10
  label: { control: "text", description: "Fallback text content." },
@@ -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 styled link element with optional underline and color variants.
12
+ * Supports external link behavior and click handling.
11
13
  * @param {LinkProps} props
12
14
  * @returns {TemplateResult}
13
15
  */
@@ -1 +1 @@
1
- export { menu } from "./template.js"
1
+ export { Menu } from "./template.js"
@@ -1,10 +1,10 @@
1
1
  import { createRender } from "../../stories/notifyStory.js"
2
- import { menu } from "."
2
+ import { Menu } from "."
3
3
 
4
4
  export default {
5
5
  title: "Navigation/Menu",
6
6
  tags: ["autodocs"],
7
- render: createRender(menu),
7
+ render: createRender(Menu),
8
8
  argTypes: {
9
9
  isOpen: {
10
10
  control: "boolean",