@inglorious/ui 2.0.1 → 3.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 (56) hide show
  1. package/package.json +9 -8
  2. package/src/controls/button/template.js +3 -1
  3. package/src/controls/button-group/template.js +3 -1
  4. package/src/controls/checkbox/template.js +3 -1
  5. package/src/controls/combobox/template.js +5 -1
  6. package/src/controls/input/template.js +3 -1
  7. package/src/controls/radio-group/template.js +3 -1
  8. package/src/controls/rating/template.js +2 -1
  9. package/src/controls/select/template.js +4 -1
  10. package/src/controls/slider/template.js +3 -1
  11. package/src/controls/switch/template.js +3 -1
  12. package/src/data-display/avatar/template.js +3 -1
  13. package/src/data-display/badge/template.js +3 -1
  14. package/src/data-display/chip/template.js +2 -1
  15. package/src/data-display/data-grid/filters/index.js +2 -1
  16. package/src/data-display/data-grid/template.js +4 -1
  17. package/src/data-display/divider/template.js +2 -1
  18. package/src/data-display/icon/icon-utf8.stories.js +2 -1
  19. package/src/data-display/icon/template.js +17 -2
  20. package/src/data-display/list/style.css +18 -8
  21. package/src/data-display/list/template.js +22 -10
  22. package/src/data-display/material-icon/material-icon.stories.js +2 -1
  23. package/src/data-display/material-icon/template.js +2 -1
  24. package/src/data-display/table/template.js +4 -1
  25. package/src/data-display/tooltip/template.js +3 -1
  26. package/src/data-display/typography/template.js +3 -1
  27. package/src/data-display/virtual-list/template.js +4 -1
  28. package/src/examples/dashboard/app-drawer.js +17 -6
  29. package/src/examples/dashboard/dashboard.js +2 -1
  30. package/src/feedback/alert/template.js +3 -1
  31. package/src/feedback/backdrop/template.js +3 -1
  32. package/src/feedback/dialog/template.js +2 -1
  33. package/src/feedback/progress/template.js +2 -1
  34. package/src/feedback/skeleton/template.js +2 -1
  35. package/src/feedback/snackbar/template.js +2 -1
  36. package/src/layout/container/template.js +4 -1
  37. package/src/layout/flex/template.js +3 -1
  38. package/src/layout/grid/template.js +3 -1
  39. package/src/navigation/bottom-navigation/template.js +3 -1
  40. package/src/navigation/breadcrumbs/template.js +3 -1
  41. package/src/navigation/drawer/template.js +2 -1
  42. package/src/navigation/link/template.js +3 -1
  43. package/src/navigation/menu/template.js +3 -1
  44. package/src/navigation/pagination/template.js +2 -1
  45. package/src/navigation/speed-dial/template.js +2 -1
  46. package/src/navigation/stepper/template.js +2 -1
  47. package/src/navigation/tabs/template.js +2 -1
  48. package/src/styles/themes/bootstrap.css +16 -0
  49. package/src/styles/themes/inglorious.css +16 -0
  50. package/src/styles/themes/material.css +16 -0
  51. package/src/surfaces/accordion/template.js +3 -1
  52. package/src/surfaces/app-bar/template.js +4 -1
  53. package/src/surfaces/card/template.js +3 -1
  54. package/src/surfaces/paper/template.js +3 -1
  55. package/types/data-display/icon.d.ts +1 -0
  56. package/src/examples/dashboard/router.js +0 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inglorious/ui",
3
- "version": "2.0.1",
3
+ "version": "3.0.0",
4
4
  "description": "A design system for Inglorious Web with render-function components and customizable themes",
5
5
  "author": "IceOnFire <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
6
6
  "license": "MIT",
@@ -280,9 +280,10 @@
280
280
  "**/*.css"
281
281
  ],
282
282
  "peerDependencies": {
283
- "@inglorious/charts": "5.0.1",
284
- "@inglorious/web": "5.0.1",
285
- "@inglorious/utils": "3.8.0"
283
+ "@inglorious/charts": "6.0.0",
284
+ "@inglorious/store": "11.0.0",
285
+ "@inglorious/utils": "3.8.0",
286
+ "@inglorious/web": "6.0.0"
286
287
  },
287
288
  "devDependencies": {
288
289
  "@fontsource/material-symbols-outlined": "^5.2.36",
@@ -297,10 +298,10 @@
297
298
  "vite": "^7.3.1",
298
299
  "vitest": "^4.0.15",
299
300
  "@inglorious/eslint-config": "1.1.2",
300
- "@inglorious/vite-plugin-jsx": "2.0.0",
301
- "@inglorious/web": "5.0.1",
302
- "@inglorious/store": "10.0.0",
303
- "@inglorious/vite-plugin-vue": "1.0.1"
301
+ "@inglorious/store": "11.0.0",
302
+ "@inglorious/web": "6.0.0",
303
+ "@inglorious/vite-plugin-vue": "1.0.1",
304
+ "@inglorious/vite-plugin-jsx": "2.0.0"
304
305
  },
305
306
  "engines": {
306
307
  "node": ">= 22"
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
  import { Button } from "../button/index.js"
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -4,7 +4,11 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref, repeat, when } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
10
+ import { repeat } from "@inglorious/web/directives/repeat"
11
+ import { when } from "@inglorious/web/directives/when"
8
12
 
9
13
  import { Chip } from "../../data-display/chip/index.js"
10
14
  import {
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  const DEFAULT_VALUE = 0
9
10
  const DEFAULT_MAX = 5
@@ -3,7 +3,10 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref, repeat } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
9
+ import { repeat } from "@inglorious/web/directives/repeat"
7
10
 
8
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
12
  import { formatOption, getOptionValue, isOptionSelected } from "./helpers.js"
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, styleMap } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { styleMap } from "@inglorious/web/directives/style-map"
7
9
 
8
10
  /**
9
11
  * Renders an avatar with image, initials, or fallback content.
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, styleMap } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { styleMap } from "@inglorious/web/directives/style-map"
7
9
 
8
10
  /**
9
11
  * Renders a compact badge for status, labels, or counts.
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a compact chip label with optional remove action.
@@ -1,4 +1,5 @@
1
- import { choose, html } from "@inglorious/web"
1
+ import { html } from "@inglorious/web"
2
+ import { choose } from "@inglorious/web/directives/choose"
2
3
 
3
4
  import { InputFilter } from "./input.js"
4
5
  import { RangeFilter } from "./range.js"
@@ -5,7 +5,10 @@
5
5
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
6
6
  */
7
7
 
8
- import { classMap, html, repeat, when } from "@inglorious/web"
8
+ import { html } from "@inglorious/web"
9
+ import { classMap } from "@inglorious/web/directives/class-map"
10
+ import { repeat } from "@inglorious/web/directives/repeat"
11
+ import { when } from "@inglorious/web/directives/when"
9
12
 
10
13
  import { Input } from "../../controls/input/index.js"
11
14
  import { Select } from "../../controls/select/index.js"
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a horizontal or vertical divider line.
@@ -1,5 +1,6 @@
1
1
  import { VirtualList } from "@inglorious/ui/virtual-list"
2
- import { html, repeat } from "@inglorious/web"
2
+ import { html } from "@inglorious/web"
3
+ import { repeat } from "@inglorious/web/directives/repeat"
3
4
 
4
5
  import { Button } from "../../controls/button"
5
6
  import {
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders an inline icon element with size and color control.
@@ -11,12 +12,26 @@ import { classMap, html } from "@inglorious/web"
11
12
  * @param {IconProps} props
12
13
  * @returns {TemplateResult}
13
14
  */
14
- export function render({ children, size = "md", color = "current", onClick }) {
15
+ export function render({
16
+ children,
17
+ size = "md",
18
+ color = "current",
19
+ className = "",
20
+ onClick,
21
+ }) {
22
+ const extraClasses = Object.fromEntries(
23
+ className
24
+ .split(/\s+/)
25
+ .filter(Boolean)
26
+ .map((name) => [name, true]),
27
+ )
28
+
15
29
  return html`<span
16
30
  class=${classMap({
17
31
  "iw-icon": true,
18
32
  [`iw-icon-${size}`]: size !== "md",
19
33
  "iw-icon-current": color === "current",
34
+ ...extraClasses,
20
35
  })}
21
36
  style=${color !== "current" ? `color: ${color};` : ""}
22
37
  aria-hidden="true"
@@ -36,11 +36,16 @@
36
36
  .iw-list-item {
37
37
  padding: var(--iw-space-3);
38
38
  border-radius: var(--iw-radius-sm);
39
+ background-color: var(--iw-list-item);
39
40
  transition:
40
41
  background-color 0.15s ease,
41
42
  color 0.15s ease;
42
43
  }
43
44
 
45
+ .iw-list-item-icon {
46
+ padding: var(--iw-space-4);
47
+ }
48
+
44
49
  .iw-list-item-inset .iw-list-item-content {
45
50
  margin-left: calc(var(--iw-space-3) + var(--iw-list-icon-size, 1.25rem));
46
51
  }
@@ -85,20 +90,18 @@
85
90
  color: var(--iw-color-text-muted, var(--iw-color-text));
86
91
  }
87
92
 
88
- .iw-list-item-clickable {
93
+ .iw-list-item-clickable,
94
+ .iw-list-item-expandable {
89
95
  cursor: pointer;
90
96
  }
91
97
 
92
- .iw-list-item-clickable:hover {
93
- background-color: var(--iw-color-surface, rgba(0, 0, 0, 0.05));
98
+ .iw-list-item-clickable:hover,
99
+ .iw-list-item-expandable:hover {
100
+ filter: brightness(120%);
94
101
  }
95
102
 
96
103
  .iw-list-item-selected {
97
- background-color: var(--iw-color-surface-active, rgba(0, 0, 0, 0.08));
98
-
99
- .iw-list-item-icon {
100
- color: var(--iw-color-text);
101
- }
104
+ background-color: var(--iw-list-item-selected);
102
105
  }
103
106
 
104
107
  .iw-list-item-disabled {
@@ -117,3 +120,10 @@
117
120
  margin-top: var(--iw-space-1);
118
121
  padding-left: var(--iw-space-4);
119
122
  }
123
+
124
+ .iw-theme-light {
125
+ .iw-list-item-clickable:hover,
126
+ .iw-list-item-expandable:hover {
127
+ filter: brightness(96%);
128
+ }
129
+ }
@@ -19,9 +19,14 @@
19
19
  * }} ListItemMeta
20
20
  */
21
21
 
22
- import { classMap, html, ref, repeat, when } from "@inglorious/web"
22
+ import { html } from "@inglorious/web"
23
+ import { classMap } from "@inglorious/web/directives/class-map"
24
+ import { ref } from "@inglorious/web/directives/ref"
25
+ import { repeat } from "@inglorious/web/directives/repeat"
26
+ import { when } from "@inglorious/web/directives/when"
23
27
 
24
28
  import { IconButton } from "../../controls/icon-button"
29
+ import { Icon } from "../../data-display/icon"
25
30
  import { Flex } from "../../layout/flex"
26
31
  import { applyElementProps } from "../../shared/applyElementProps.js"
27
32
 
@@ -145,12 +150,14 @@ export const List = {
145
150
  }
146
151
 
147
152
  const isClickable = !!props.onItemClick || !!onClick
148
- const hasChildren = Array.isArray(children) && children.length > 0
153
+ const hasChildren = Array.isArray(children) && children.length
154
+ const isExpandable = !!hasChildren
149
155
  const hasAction = !!action
150
156
 
151
157
  const listItemClassName = [
152
158
  "iw-list-item",
153
159
  isClickable && "iw-list-item-clickable",
160
+ isExpandable && "iw-list-item-expandable",
154
161
  isDisabled && "iw-list-item-disabled",
155
162
  isSelected && "iw-list-item-selected",
156
163
  props.isInset && !icon && "iw-list-item-inset",
@@ -166,6 +173,13 @@ export const List = {
166
173
  onClick: (event) => {
167
174
  event.stopPropagation()
168
175
  if (isDisabled) return
176
+
177
+ if (isExpandable) {
178
+ onToggle?.(raw ?? item, path)
179
+ props.onItemToggle?.(raw ?? item, path)
180
+ return
181
+ }
182
+
169
183
  onClick?.(raw ?? item, path)
170
184
  props.onItemClick?.(raw ?? item, path)
171
185
  },
@@ -175,13 +189,11 @@ export const List = {
175
189
  gap: "sm",
176
190
  children: [
177
191
  when(icon, () =>
178
- IconButton.render({
179
- icon,
180
- size: "sm",
181
- color: "secondary",
182
- variant: "ghost",
183
- shape: "square",
192
+ Icon.render({
193
+ size: "lg",
194
+ color: "var(--iw-color-text-muted)",
184
195
  className: "iw-list-item-icon",
196
+ children: icon,
185
197
  }),
186
198
  ),
187
199
  Flex.render({
@@ -200,10 +212,10 @@ export const List = {
200
212
  ],
201
213
  }),
202
214
  when(
203
- hasChildren || hasAction,
215
+ isExpandable || hasAction,
204
216
  () =>
205
217
  html`<span class="iw-list-item-trailing">
206
- ${when(hasChildren, () =>
218
+ ${when(isExpandable, () =>
207
219
  IconButton.render({
208
220
  variant: "ghost",
209
221
  color: "secondary",
@@ -1,4 +1,5 @@
1
- import { html, repeat } from "@inglorious/web"
1
+ import { html } from "@inglorious/web"
2
+ import { repeat } from "@inglorious/web/directives/repeat"
2
3
 
3
4
  import { MaterialIcon } from "."
4
5
 
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a Material Symbols icon by name.
@@ -4,7 +4,10 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref, repeat } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
10
+ import { repeat } from "@inglorious/web/directives/repeat"
8
11
 
9
12
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
13
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -4,7 +4,10 @@
4
4
  * @typedef {import('@inglorious/web').Api} Api
5
5
  */
6
6
 
7
- import { html, ref, repeat, styleMap } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { ref } from "@inglorious/web/directives/ref"
9
+ import { repeat } from "@inglorious/web/directives/repeat"
10
+ import { styleMap } from "@inglorious/web/directives/style-map"
8
11
 
9
12
  const PRETTY_INDEX = 1
10
13
 
@@ -30,7 +30,7 @@ export const AppDrawer = {
30
30
  },
31
31
 
32
32
  render(entity, api) {
33
- const items = mapItemsForRender(entity.items ?? [], api)
33
+ const items = mapItemsForRender(entity, entity.items ?? [], api)
34
34
 
35
35
  return Drawer.render({
36
36
  ...entity,
@@ -52,15 +52,19 @@ export const AppDrawer = {
52
52
  isInset: true,
53
53
  padding: "sm",
54
54
  items,
55
- onItemToggle: (_, path) =>
56
- api.notify(`#${entity.id}:itemToggle`, { path }),
55
+ onItemToggle: (_, path) => {
56
+ api.notify(`#${entity.id}:itemToggle`, { path })
57
+ if (entity.isCollapsed) {
58
+ api.notify(`#${entity.id}:collapseToggle`)
59
+ }
60
+ },
57
61
  })}
58
62
  `,
59
63
  })
60
64
  },
61
65
  }
62
66
 
63
- function mapItemsForRender(items, api) {
67
+ function mapItemsForRender(entity, items, api) {
64
68
  const router = api.getEntity("router")
65
69
 
66
70
  return items.map((item) => {
@@ -75,7 +79,14 @@ function mapItemsForRender(items, api) {
75
79
  }
76
80
 
77
81
  if (item.href) {
78
- mappedItem.onClick = () => api.notify("#router:navigate", item.href)
82
+ mappedItem.onClick = () => {
83
+ api.notify("#router:navigate", item.href)
84
+
85
+ const isMobile = document.body.clientWidth < 64 * 16
86
+ if (isMobile) {
87
+ api.notify(`#${entity.id}:toggle`)
88
+ }
89
+ }
79
90
  }
80
91
 
81
92
  if (router?.path === item.href) {
@@ -83,7 +94,7 @@ function mapItemsForRender(items, api) {
83
94
  }
84
95
 
85
96
  if (Array.isArray(item.children)) {
86
- mappedItem.children = mapItemsForRender(item.children, api)
97
+ mappedItem.children = mapItemsForRender(entity, item.children, api)
87
98
  }
88
99
 
89
100
  return mappedItem
@@ -1,4 +1,5 @@
1
- import { html, when } from "@inglorious/web"
1
+ import { html } from "@inglorious/web"
2
+ import { when } from "@inglorious/web/directives/when"
2
3
 
3
4
  import { Container } from "../../layout/container/index.js"
4
5
  import { Flex } from "../../layout/flex/index.js"
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, when } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { when } from "@inglorious/web/directives/when"
7
9
 
8
10
  /**
9
11
  * Renders a fullscreen backdrop overlay when open.
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a modal dialog with header, body, and actions when open.
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  function clamp(value) {
9
10
  return Math.max(0, Math.min(100, value))
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a loading skeleton placeholder for text, blocks, or multiple lines.
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
7
8
 
8
9
  /**
9
10
  * Renders a transient snackbar message with optional action and dismiss control.
@@ -3,7 +3,10 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref, styleMap } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
9
+ import { styleMap } from "@inglorious/web/directives/style-map"
7
10
 
8
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
12
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, ref, staticHtml, unsafeStatic } from "@inglorious/web"
6
+ import { classMap } from "@inglorious/web/directives/class-map"
7
+ import { ref } from "@inglorious/web/directives/ref"
8
+ import { staticHtml, unsafeStatic } from "@inglorious/web/static"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, styleMap } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { styleMap } from "@inglorious/web/directives/style-map"
7
9
 
8
10
  /**
9
11
  * Renders a CSS grid container with configurable columns, gaps, and alignment.
@@ -4,7 +4,9 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
8
10
 
9
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
12
 
@@ -4,7 +4,9 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
8
10
 
9
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
12
 
@@ -3,7 +3,8 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { html, when } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { when } from "@inglorious/web/directives/when"
7
8
 
8
9
  import { Button } from "../../controls/button"
9
10
  import { MaterialIcon } from "../../data-display/material-icon"
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -4,7 +4,9 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
8
10
 
9
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
12
 
@@ -5,7 +5,8 @@
5
5
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
6
6
  */
7
7
 
8
- import { classMap, html } from "@inglorious/web"
8
+ import { html } from "@inglorious/web"
9
+ import { classMap } from "@inglorious/web/directives/class-map"
9
10
 
10
11
  import { Button } from "../../controls/button/index.js"
11
12
 
@@ -4,7 +4,8 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
8
9
 
9
10
  export const SpeedDial = {
10
11
  /**
@@ -4,7 +4,8 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
8
9
 
9
10
  export const Stepper = {
10
11
  /**
@@ -4,7 +4,8 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
8
9
 
9
10
  export const Tabs = {
10
11
  /**
@@ -77,6 +77,14 @@
77
77
  /* Badge */
78
78
  --iw-badge-radius: var(--iw-radius-md);
79
79
 
80
+ /* List */
81
+ --iw-list-item: var(--iw-color-white);
82
+ --iw-list-item-selected: color-mix(
83
+ in srgb,
84
+ var(--iw-color-primary) 8%,
85
+ var(--iw-color-white)
86
+ );
87
+
80
88
  /* Alert */
81
89
  --iw-alert-radius: var(--iw-radius-md);
82
90
  --iw-alert-shadow: none;
@@ -117,4 +125,12 @@
117
125
  --iw-button-outline-border: var(--iw-color-primary);
118
126
  --iw-button-ghost-bg-hover: #343a40;
119
127
  --iw-button-ghost-text: var(--iw-color-text);
128
+
129
+ --iw-list-item: #2c3036;
130
+ --iw-list-item-active: #343a40;
131
+ --iw-list-item-selected: color-mix(
132
+ in srgb,
133
+ var(--iw-color-primary) 12%,
134
+ #2c3036
135
+ );
120
136
  }
@@ -85,6 +85,14 @@
85
85
  /* Badge */
86
86
  --iw-badge-radius: var(--iw-radius-none);
87
87
 
88
+ /* List */
89
+ --iw-list-item: var(--iw-color-gray-800);
90
+ --iw-list-item-selected: color-mix(
91
+ in srgb,
92
+ var(--iw-color-primary) 8%,
93
+ var(--iw-color-gray-800)
94
+ );
95
+
88
96
  /* Alert */
89
97
  --iw-alert-radius: var(--iw-radius-none);
90
98
  --iw-alert-shadow: none;
@@ -111,4 +119,12 @@
111
119
 
112
120
  --iw-button-shadow-hover: 0 0 10px var(--iw-color-primary);
113
121
  --iw-card-shadow-hover: var(--iw-shadow-xl), 0 0 15px rgba(0, 255, 136, 0.2);
122
+
123
+ --iw-list-item: var(--iw-color-white);
124
+ --iw-list-item-active: var(--iw-color-gray-100);
125
+ --iw-list-item-selected: color-mix(
126
+ in srgb,
127
+ var(--iw-color-primary) 8%,
128
+ var(--iw-color-white)
129
+ );
114
130
  }
@@ -81,6 +81,14 @@
81
81
  /* Badge */
82
82
  --iw-badge-radius: var(--iw-radius-sm);
83
83
 
84
+ /* List */
85
+ --iw-list-item: var(--iw-color-white);
86
+ --iw-list-item-selected: color-mix(
87
+ in srgb,
88
+ var(--iw-color-primary) 8%,
89
+ var(--iw-color-white)
90
+ );
91
+
84
92
  /* Alert */
85
93
  --iw-alert-radius: var(--iw-radius-md);
86
94
  --iw-alert-shadow: none;
@@ -123,4 +131,12 @@
123
131
 
124
132
  --iw-card-shadow:
125
133
  0 1px 2px 0 rgba(0, 0, 0, 0.3), 0 1px 3px 1px rgba(0, 0, 0, 0.15);
134
+
135
+ --iw-list-item: #1e1e1e;
136
+ --iw-list-item-active: #2d2d2d;
137
+ --iw-list-item-selected: color-mix(
138
+ in srgb,
139
+ var(--iw-color-primary) 12%,
140
+ #1e1e1e
141
+ );
126
142
  }
@@ -4,7 +4,9 @@
4
4
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
5
5
  */
6
6
 
7
- import { classMap, html, ref } from "@inglorious/web"
7
+ import { html } from "@inglorious/web"
8
+ import { classMap } from "@inglorious/web/directives/class-map"
9
+ import { ref } from "@inglorious/web/directives/ref"
8
10
 
9
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
10
12
 
@@ -3,7 +3,10 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref, when } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
9
+ import { when } from "@inglorious/web/directives/when"
7
10
 
8
11
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
12
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -3,7 +3,9 @@
3
3
  * @typedef {import('@inglorious/web').TemplateResult} TemplateResult
4
4
  */
5
5
 
6
- import { classMap, html, ref } from "@inglorious/web"
6
+ import { html } from "@inglorious/web"
7
+ import { classMap } from "@inglorious/web/directives/class-map"
8
+ import { ref } from "@inglorious/web/directives/ref"
7
9
 
8
10
  import { applyElementProps } from "../../shared/applyElementProps.js"
9
11
 
@@ -5,6 +5,7 @@ export interface IconProps {
5
5
  children?: TemplateResult | string | number
6
6
  size?: "sm" | "md" | "lg"
7
7
  color?: string
8
+ className?: string
8
9
  onClick?: () => void
9
10
  [key: string]: unknown
10
11
  }
@@ -1,13 +0,0 @@
1
- import { setRoutes } from "@inglorious/web/router"
2
- export { Router } from "@inglorious/web/router"
3
-
4
- setRoutes({
5
- "/": "dashboard",
6
- "/layout/:name": "primitiveSection",
7
- "/controls/:name": "primitiveSection",
8
- "/data-display/:name": "primitiveSection",
9
- "/feedback/:name": "primitiveSection",
10
- "/navigation/:name": "primitiveSection",
11
- "/surfaces/:name": "primitiveSection",
12
- "*": "dashboard",
13
- })