@inglorious/ui 7.8.1 → 8.1.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 (34) hide show
  1. package/README.md +21 -4
  2. package/package.json +12 -16
  3. package/src/controls/select/template.js +7 -0
  4. package/src/data-display/data-display.css +0 -1
  5. package/src/data-display/icon/icon-implementations.mdx +52 -149
  6. package/src/data-display/icon/icon.stories.js +48 -3
  7. package/src/data-display/icon/style.css +10 -3
  8. package/src/data-display/icon/template.js +50 -4
  9. package/src/examples/dashboard/app-drawer.js +16 -14
  10. package/src/examples/dashboard/app-header.js +26 -17
  11. package/src/examples/dashboard/data.js +36 -19
  12. package/src/examples/dashboard/primitive-content.js +35 -38
  13. package/src/examples/dashboard/social-card.js +2 -2
  14. package/src/examples/dashboard/stat-card.js +5 -4
  15. package/src/examples/dashboard/style.css +6 -3
  16. package/src/examples/dashboard/traffic-card.js +3 -2
  17. package/src/examples/dashboard/traffic-sales-card.js +5 -11
  18. package/src/index.js +0 -1
  19. package/src/navigation/bottom-navigation/style.css +6 -2
  20. package/src/navigation/drawer/template.js +4 -9
  21. package/src/shared/icons.js +15 -0
  22. package/src/styles/themes/bootstrap.css +4 -0
  23. package/src/styles/themes/inglorious.css +5 -0
  24. package/src/styles/themes/material.css +4 -0
  25. package/src/surfaces/app-bar/style.css +3 -0
  26. package/types/controls/select.d.ts +2 -0
  27. package/types/data-display/icon.d.ts +24 -0
  28. package/types/index.d.ts +1 -5
  29. package/types/navigation/view-transitions.d.ts +5 -4
  30. package/src/data-display/material-icon/index.js +0 -3
  31. package/src/data-display/material-icon/material-icon.stories.js +0 -100
  32. package/src/data-display/material-icon/style.css +0 -33
  33. package/src/data-display/material-icon/template.js +0 -39
  34. package/types/data-display/material-icon.d.ts +0 -21
@@ -1,10 +1,19 @@
1
+ import android from "@iconify-icons/fa7-brands/android"
2
+ import bootstrap from "@iconify-icons/fa7-brands/bootstrap"
3
+ import gamepad from "@iconify-icons/fa7-solid/gamepad"
4
+ import contrastOutline from "@iconify-icons/material-symbols/contrast-outline"
5
+ import darkModeOutline from "@iconify-icons/material-symbols/dark-mode-outline"
6
+ import formatListBulletedOutline from "@iconify-icons/material-symbols/format-list-bulleted-outline"
7
+ import lightModeOutline from "@iconify-icons/material-symbols/light-mode-outline"
8
+ import mailOutline from "@iconify-icons/material-symbols/mail-outline"
9
+ import menuOutline from "@iconify-icons/material-symbols/menu-outline"
10
+ import notificationsOutline from "@iconify-icons/material-symbols/notifications-outline"
1
11
  import { html } from "@inglorious/web"
2
12
 
3
13
  import { Button } from "../../controls/button"
4
14
  import { Avatar } from "../../data-display/avatar"
5
15
  import { Divider } from "../../data-display/divider"
6
16
  import { Icon } from "../../data-display/icon"
7
- import { MaterialIcon } from "../../data-display/material-icon"
8
17
  import { Flex } from "../../layout/flex"
9
18
  import { Breadcrumbs } from "../../navigation/breadcrumbs"
10
19
  import { AppBar } from "../../surfaces/app-bar"
@@ -17,16 +26,16 @@ export const AppHeader = {
17
26
  const themeName = themeEntity?.theme ?? "inglorious"
18
27
  const themeIcon =
19
28
  themeName === "bootstrap"
20
- ? "fa-brands fa-bootstrap"
29
+ ? bootstrap
21
30
  : themeName === "material"
22
- ? "fa-brands fa-android"
23
- : "fa-solid fa-gamepad"
31
+ ? android
32
+ : gamepad
24
33
  const modeIcon =
25
34
  themeMode === "light"
26
- ? "light_mode"
35
+ ? lightModeOutline
27
36
  : themeMode === "dark"
28
- ? "dark_mode"
29
- : "contrast"
37
+ ? darkModeOutline
38
+ : contrastOutline
30
39
 
31
40
  return html`
32
41
  <div class="iw-dashboard-header">
@@ -44,7 +53,7 @@ export const AppHeader = {
44
53
  color: "secondary",
45
54
  variant: "ghost",
46
55
  shape: "square",
47
- children: MaterialIcon.render({ name: "menu", size: "lg" }),
56
+ children: Icon.render({ icon: menuOutline, size: "lg" }),
48
57
  "aria-label": "Toggle navigation",
49
58
  onClick: () => api.notify(`#appDrawer:toggle`),
50
59
  }),
@@ -79,8 +88,8 @@ export const AppHeader = {
79
88
  color: "secondary",
80
89
  variant: "ghost",
81
90
  shape: "square",
82
- children: MaterialIcon.render({
83
- name: "notifications",
91
+ children: Icon.render({
92
+ icon: notificationsOutline,
84
93
  size: "lg",
85
94
  }),
86
95
  "aria-label": "Notifications",
@@ -89,8 +98,8 @@ export const AppHeader = {
89
98
  color: "secondary",
90
99
  variant: "ghost",
91
100
  shape: "square",
92
- children: MaterialIcon.render({
93
- name: "format_list_bulleted",
101
+ children: Icon.render({
102
+ icon: formatListBulletedOutline,
94
103
  }),
95
104
  "aria-label": "Tasks",
96
105
  }),
@@ -98,8 +107,8 @@ export const AppHeader = {
98
107
  color: "secondary",
99
108
  variant: "ghost",
100
109
  shape: "square",
101
- children: MaterialIcon.render({
102
- name: "mail",
110
+ children: Icon.render({
111
+ icon: mailOutline,
103
112
  size: "lg",
104
113
  }),
105
114
  "aria-label": "Messages",
@@ -111,7 +120,7 @@ export const AppHeader = {
111
120
  variant: "ghost",
112
121
  shape: "square",
113
122
  children: Icon.render({
114
- children: html`<i class=${themeIcon}></i>`,
123
+ icon: themeIcon,
115
124
  size: "lg",
116
125
  }),
117
126
  "aria-label": `Theme: ${themeName}`,
@@ -121,8 +130,8 @@ export const AppHeader = {
121
130
  color: "secondary",
122
131
  variant: "ghost",
123
132
  shape: "square",
124
- children: MaterialIcon.render({
125
- name: modeIcon,
133
+ children: Icon.render({
134
+ icon: modeIcon,
126
135
  size: "lg",
127
136
  }),
128
137
  "aria-label": `Mode: ${themeMode}`,
@@ -1,10 +1,27 @@
1
+ import ccAmex from "@iconify-icons/fa7-brands/cc-amex"
2
+ import ccApplePay from "@iconify-icons/fa7-brands/cc-apple-pay"
3
+ import ccMastercard from "@iconify-icons/fa7-brands/cc-mastercard"
4
+ import ccPaypal from "@iconify-icons/fa7-brands/cc-paypal"
5
+ import ccStripe from "@iconify-icons/fa7-brands/cc-stripe"
6
+ import ccVisa from "@iconify-icons/fa7-brands/cc-visa"
7
+ import alternateEmailOutline from "@iconify-icons/material-symbols/alternate-email-outline"
8
+ import businessCenterOutline from "@iconify-icons/material-symbols/business-center-outline"
9
+ import northOutline from "@iconify-icons/material-symbols/north-outline"
10
+ import person2Outline from "@iconify-icons/material-symbols/person-2-outline"
11
+ import personOutline from "@iconify-icons/material-symbols/person-outline"
12
+ import publicOutline from "@iconify-icons/material-symbols/public-outline"
13
+ import southOutline from "@iconify-icons/material-symbols/south-outline"
14
+ import tagOutline from "@iconify-icons/material-symbols/tag-outline"
15
+ import thumbUpOutline from "@iconify-icons/material-symbols/thumb-up-outline"
16
+ import travelExploreOutline from "@iconify-icons/material-symbols/travel-explore-outline"
17
+ import workOutline from "@iconify-icons/material-symbols/work-outline"
1
18
  export const statCards = [
2
19
  {
3
20
  id: "users",
4
21
  label: "Users",
5
22
  value: "26K",
6
23
  change: "-12.4%",
7
- direction: "south",
24
+ trendIcon: southOutline,
8
25
  className: "iw-dashboard-stat-primary",
9
26
  chartType: "line",
10
27
  data: [65, 59, 84, 84, 51, 55, 40],
@@ -14,7 +31,7 @@ export const statCards = [
14
31
  label: "Income",
15
32
  value: "$6.2K",
16
33
  change: "40.9%",
17
- direction: "north",
34
+ trendIcon: northOutline,
18
35
  className: "iw-dashboard-stat-info",
19
36
  chartType: "line",
20
37
  hasDots: true,
@@ -25,7 +42,7 @@ export const statCards = [
25
42
  label: "Conversion Rate",
26
43
  value: "2.49%",
27
44
  change: "84.7%",
28
- direction: "north",
45
+ trendIcon: northOutline,
29
46
  className: "iw-dashboard-stat-warning",
30
47
  chartType: "area",
31
48
  data: [78, 81, 80, 45, 34, 12, 40],
@@ -35,7 +52,7 @@ export const statCards = [
35
52
  label: "Sessions",
36
53
  value: "44K",
37
54
  change: "-23.6%",
38
- direction: "south",
55
+ trendIcon: southOutline,
39
56
  className: "iw-dashboard-stat-danger",
40
57
  chartType: "bar",
41
58
  data: [78, 81, 80, 45, 34, 12, 40, 85, 65, 23, 12, 98, 34, 84, 67, 82],
@@ -82,7 +99,7 @@ export const trafficSummary = [
82
99
 
83
100
  export const socialCards = [
84
101
  {
85
- icon: "thumb_up",
102
+ icon: thumbUpOutline,
86
103
  capClass: "iw-dashboard-social-cap-facebook",
87
104
  top: "89k",
88
105
  bottom: "459",
@@ -91,7 +108,7 @@ export const socialCards = [
91
108
  data: [24, 28, 20, 30, 26, 34, 29],
92
109
  },
93
110
  {
94
- icon: "alternate_email",
111
+ icon: alternateEmailOutline,
95
112
  capClass: "iw-dashboard-social-cap-twitter",
96
113
  top: "973k",
97
114
  bottom: "1.792",
@@ -100,7 +117,7 @@ export const socialCards = [
100
117
  data: [12, 19, 16, 22, 24, 28, 32],
101
118
  },
102
119
  {
103
- icon: "work",
120
+ icon: workOutline,
104
121
  capClass: "iw-dashboard-social-cap-linkedin",
105
122
  top: "500+",
106
123
  bottom: "292",
@@ -121,12 +138,12 @@ export const clientBars = [
121
138
  ]
122
139
 
123
140
  export const sourceBars = [
124
- ["Male", 43, "person", "warning", "", ""],
125
- ["Female", 37, "person_2", "warning", "", ""],
126
- ["Organic Search", 56, "travel_explore", "success", "191.235", "(56%)"],
127
- ["Facebook", 15, "public", "success", "51.223", "(15%)"],
128
- ["Twitter", 11, "tag", "success", "37.564", "(11%)"],
129
- ["LinkedIn", 8, "business_center", "success", "27.319", "(8%)"],
141
+ ["Male", 43, personOutline, "warning", "", ""],
142
+ ["Female", 37, person2Outline, "warning", "", ""],
143
+ ["Organic Search", 56, travelExploreOutline, "success", "191.235", "(56%)"],
144
+ ["Facebook", 15, publicOutline, "success", "51.223", "(15%)"],
145
+ ["Twitter", 11, tagOutline, "success", "37.564", "(11%)"],
146
+ ["LinkedIn", 8, businessCenterOutline, "success", "27.319", "(8%)"],
130
147
  ]
131
148
 
132
149
  export const userRows = [
@@ -139,7 +156,7 @@ export const userRows = [
139
156
  country: "🇺🇸",
140
157
  usage: 50,
141
158
  range: "Jun 11, 2023 - Jul 10, 2023",
142
- payment: "cc-mastercard",
159
+ payment: ccMastercard,
143
160
  activity: "10 sec ago",
144
161
  },
145
162
  {
@@ -151,7 +168,7 @@ export const userRows = [
151
168
  country: "🇧🇷",
152
169
  usage: 10,
153
170
  range: "Jun 11, 2023 - Jul 10, 2023",
154
- payment: "cc-visa",
171
+ payment: ccVisa,
155
172
  activity: "5 minutes ago",
156
173
  },
157
174
  {
@@ -163,7 +180,7 @@ export const userRows = [
163
180
  country: "🇮🇳",
164
181
  usage: 74,
165
182
  range: "Jun 11, 2023 - Jul 10, 2023",
166
- payment: "cc-stripe",
183
+ payment: ccStripe,
167
184
  activity: "1 hour ago",
168
185
  },
169
186
  {
@@ -175,7 +192,7 @@ export const userRows = [
175
192
  country: "🇫🇷",
176
193
  usage: 98,
177
194
  range: "Jun 11, 2023 - Jul 10, 2023",
178
- payment: "cc-paypal",
195
+ payment: ccPaypal,
179
196
  activity: "Last month",
180
197
  },
181
198
  {
@@ -187,7 +204,7 @@ export const userRows = [
187
204
  country: "🇪🇸",
188
205
  usage: 22,
189
206
  range: "Jun 11, 2023 - Jul 10, 2023",
190
- payment: "cc-apple-pay",
207
+ payment: ccApplePay,
191
208
  activity: "Last week",
192
209
  },
193
210
  {
@@ -199,7 +216,7 @@ export const userRows = [
199
216
  country: "🇵🇱",
200
217
  usage: 43,
201
218
  range: "Jun 11, 2023 - Jul 10, 2023",
202
- payment: "cc-amex",
219
+ payment: ccAmex,
203
220
  activity: "Yesterday",
204
221
  },
205
222
  ]
@@ -1,3 +1,15 @@
1
+ import gamepad from "@iconify-icons/fa7-solid/gamepad"
2
+ import barChartOutline from "@iconify-icons/material-symbols/bar-chart-outline"
3
+ import boltOutline from "@iconify-icons/material-symbols/bolt-outline"
4
+ import contentCopyOutline from "@iconify-icons/material-symbols/content-copy-outline"
5
+ import favoriteOutline from "@iconify-icons/material-symbols/favorite-outline"
6
+ import homeOutline from "@iconify-icons/material-symbols/home-outline"
7
+ import menuOutline from "@iconify-icons/material-symbols/menu-outline"
8
+ import pauseOutline from "@iconify-icons/material-symbols/pause-outline"
9
+ import personOutline from "@iconify-icons/material-symbols/person-outline"
10
+ import searchOutline from "@iconify-icons/material-symbols/search-outline"
11
+ import settingsOutline from "@iconify-icons/material-symbols/settings-outline"
12
+ import speedOutline from "@iconify-icons/material-symbols/speed-outline"
1
13
  import { createStore } from "@inglorious/store"
2
14
  import { html, mount } from "@inglorious/web"
3
15
 
@@ -24,7 +36,6 @@ import { DataGrid } from "../../data-display/data-grid/index.js"
24
36
  import { Divider } from "../../data-display/divider/index.js"
25
37
  import { Icon } from "../../data-display/icon/index.js"
26
38
  import { List } from "../../data-display/list/index.js"
27
- import { MaterialIcon } from "../../data-display/material-icon/index.js"
28
39
  import { Table } from "../../data-display/table/index.js"
29
40
  import { Tooltip } from "../../data-display/tooltip/index.js"
30
41
  import { Typography } from "../../data-display/typography/index.js"
@@ -462,22 +473,23 @@ Fab.render({
462
473
  useCases: ["Toolbar controls", "Inline actions", "Overflow triggers"],
463
474
  example: {
464
475
  code: `import { IconButton } from "@inglorious/ui/icon-button"
465
- import { MaterialIcon } from "@inglorious/ui/material-icon"
476
+ import { Icon } from "@inglorious/ui/icon"
477
+ import settingsOutline from "@iconify-icons/material-symbols/settings-outline"
466
478
 
467
479
  IconButton.render({
468
- icon: MaterialIcon.render({ name: "settings" }),
480
+ icon: Icon.render({ icon: settingsOutline }),
469
481
  label: "Settings",
470
482
  variant: "ghost"
471
483
  })`,
472
484
  preview: () =>
473
485
  previewRow([
474
486
  IconButton.render({
475
- icon: MaterialIcon.render({ name: "settings" }),
487
+ icon: Icon.render({ icon: settingsOutline }),
476
488
  label: "Settings",
477
489
  variant: "ghost",
478
490
  }),
479
491
  IconButton.render({
480
- icon: MaterialIcon.render({ name: "favorite" }),
492
+ icon: Icon.render({ icon: favoriteOutline }),
481
493
  label: "Favorite",
482
494
  variant: "ghost",
483
495
  }),
@@ -814,21 +826,23 @@ Divider.render({ orientation: "horizontal" })`,
814
826
  },
815
827
  },
816
828
  "/data-display/icon": {
817
- summary: "Generic icon wrapper with size and color control.",
829
+ summary: "Icons from any Iconify set, drawn as inline SVG.",
818
830
  description:
819
- "Icon is a neutral wrapper for SVGs or glyphs within UI layouts.",
831
+ "Icon draws an icon from Material Symbols, Font Awesome or any other Iconify set at the size of the text, or wraps a glyph.",
820
832
  useCases: ["Inline cues", "Status indicators", "UI affordances"],
821
833
  example: {
822
834
  code: `import { Icon } from "@inglorious/ui/icon"
835
+ import boltOutline from "@iconify-icons/material-symbols/bolt-outline"
836
+ import gamepad from "@iconify-icons/fa7-solid/gamepad"
823
837
 
824
- Icon.render({
825
- size: "lg",
826
- children: "★"
827
- })`,
838
+ Icon.render({ icon: boltOutline, size: "lg" })
839
+ Icon.render({ icon: gamepad, size: "lg" })
840
+ Icon.render({ children: "★", size: "lg" })`,
828
841
  preview: () =>
829
842
  previewRow([
843
+ Icon.render({ icon: boltOutline, size: "lg" }),
844
+ Icon.render({ icon: gamepad, size: "lg" }),
830
845
  Icon.render({ size: "lg", children: "★" }),
831
- Icon.render({ size: "lg", children: "⚡" }),
832
846
  ]),
833
847
  },
834
848
  },
@@ -854,35 +868,18 @@ List.render({
854
868
  id: "alpha",
855
869
  primary: "Alpha",
856
870
  secondary: "Ready",
857
- icon: MaterialIcon.render({ name: "bolt", size: "sm" }),
871
+ icon: Icon.render({ icon: boltOutline, size: "sm" }),
858
872
  },
859
873
  {
860
874
  id: "beta",
861
875
  primary: "Beta",
862
876
  secondary: "Paused",
863
- icon: MaterialIcon.render({ name: "pause", size: "sm" }),
877
+ icon: Icon.render({ icon: pauseOutline, size: "sm" }),
864
878
  },
865
879
  ],
866
880
  }),
867
881
  },
868
882
  },
869
- "/data-display/material-icon": {
870
- summary: "Material Symbols integration with consistent sizing.",
871
- description:
872
- "Material Icon renders Material Symbols with predefined size tokens.",
873
- useCases: ["Standard iconography", "Toolbar actions", "Menus"],
874
- example: {
875
- code: `import { MaterialIcon } from "@inglorious/ui/material-icon"
876
-
877
- MaterialIcon.render({ name: "bolt", size: "lg" })`,
878
- preview: () =>
879
- previewRow([
880
- MaterialIcon.render({ name: "bolt", size: "lg" }),
881
- MaterialIcon.render({ name: "settings", size: "lg" }),
882
- MaterialIcon.render({ name: "layers", size: "lg" }),
883
- ]),
884
- },
885
- },
886
883
  "/data-display/table": {
887
884
  summary: "Lightweight table for structured data.",
888
885
  description:
@@ -934,7 +931,7 @@ Tooltip.render({
934
931
  isOpen: true,
935
932
  content: "Copy to clipboard",
936
933
  children: IconButton.render({
937
- icon: MaterialIcon.render({ name: "content_copy" }),
934
+ icon: Icon.render({ icon: contentCopyOutline }),
938
935
  label: "Copy",
939
936
  variant: "ghost",
940
937
  }),
@@ -1120,9 +1117,9 @@ BottomNavigation.render({
1120
1117
  BottomNavigation.render({
1121
1118
  value: 1,
1122
1119
  actions: [
1123
- { label: "Home", icon: MaterialIcon.render({ name: "home" }) },
1124
- { label: "Search", icon: MaterialIcon.render({ name: "search" }) },
1125
- { label: "Profile", icon: MaterialIcon.render({ name: "person" }) },
1120
+ { label: "Home", icon: Icon.render({ icon: homeOutline }) },
1121
+ { label: "Search", icon: Icon.render({ icon: searchOutline }) },
1122
+ { label: "Profile", icon: Icon.render({ icon: personOutline }) },
1126
1123
  ],
1127
1124
  }),
1128
1125
  },
@@ -1179,12 +1176,12 @@ Drawer.render({
1179
1176
  {
1180
1177
  id: "home",
1181
1178
  primary: "Dashboard",
1182
- icon: MaterialIcon.render({ name: "speed" }),
1179
+ icon: Icon.render({ icon: speedOutline }),
1183
1180
  },
1184
1181
  {
1185
1182
  id: "reports",
1186
1183
  primary: "Reports",
1187
- icon: MaterialIcon.render({ name: "bar_chart" }),
1184
+ icon: Icon.render({ icon: barChartOutline }),
1188
1185
  },
1189
1186
  ],
1190
1187
  }),
@@ -1391,7 +1388,7 @@ AppBar.render({
1391
1388
  AppBar.render({
1392
1389
  title: "Project Ops",
1393
1390
  subtitle: "SLA dashboard",
1394
- leading: MaterialIcon.render({ name: "menu" }),
1391
+ leading: Icon.render({ icon: menuOutline }),
1395
1392
  trailing: Button.render({
1396
1393
  variant: "ghost",
1397
1394
  color: "secondary",
@@ -2,7 +2,7 @@ import { Chart } from "@inglorious/charts"
2
2
  import { html } from "@inglorious/web"
3
3
 
4
4
  import { Divider } from "../../data-display/divider"
5
- import { MaterialIcon } from "../../data-display/material-icon"
5
+ import { Icon } from "../../data-display/icon"
6
6
  import { Typography } from "../../data-display/typography"
7
7
  import { Grid } from "../../layout/grid"
8
8
  import { Card } from "../../surfaces/card"
@@ -14,7 +14,7 @@ export const SocialCard = {
14
14
  headerPadding: "none",
15
15
  header: html`
16
16
  <div class="iw-dashboard-social-cap ${entity.capClass}">
17
- ${MaterialIcon.render({ name: entity.icon, size: "lg" })}
17
+ ${Icon.render({ icon: entity.icon, size: "lg" })}
18
18
  <div class="iw-dashboard-social-chart">
19
19
  ${this.renderAreaSpark(entity, api)}
20
20
  </div>
@@ -1,8 +1,9 @@
1
+ import moreVertOutline from "@iconify-icons/material-symbols/more-vert-outline"
1
2
  import { Chart } from "@inglorious/charts"
2
3
  import { html } from "@inglorious/web"
3
4
 
4
5
  import { Button } from "../../controls/button"
5
- import { MaterialIcon } from "../../data-display/material-icon"
6
+ import { Icon } from "../../data-display/icon"
6
7
  import { Typography } from "../../data-display/typography"
7
8
  import { Card } from "../../surfaces/card"
8
9
 
@@ -22,8 +23,8 @@ export const StatCard = {
22
23
  variant: "caption",
23
24
  children: html`<span class="iw-dashboard-stat-change">
24
25
  ${entity.change}
25
- ${MaterialIcon.render({
26
- name: entity.direction,
26
+ ${Icon.render({
27
+ icon: entity.trendIcon,
27
28
  size: "sm",
28
29
  })}
29
30
  </span>`,
@@ -40,7 +41,7 @@ export const StatCard = {
40
41
  variant: "ghost",
41
42
  shape: "square",
42
43
  className: "iw-dashboard-stat-more",
43
- children: MaterialIcon.render({ name: "more_vert", size: "lg" }),
44
+ children: Icon.render({ icon: moreVertOutline, size: "lg" }),
44
45
  "aria-label": "More options",
45
46
  })}
46
47
  </div>
@@ -55,11 +55,12 @@
55
55
 
56
56
  .iw-dashboard-header-row {
57
57
  width: 100%;
58
- padding-inline: var(--iw-space-4);
59
58
  }
60
59
 
60
+ /* Outside the app bar, so it pads itself to line up with it. */
61
61
  .iw-dashboard-breadcrumbs {
62
62
  min-height: var(--iw-space-12);
63
+ padding-inline: var(--iw-space-4);
63
64
  }
64
65
  }
65
66
 
@@ -80,9 +81,9 @@
80
81
  overflow: hidden;
81
82
 
82
83
  .iw-typography,
83
- .iw-material-icon,
84
+ .iw-icon,
84
85
  .iw-button,
85
- .iw-button .iw-material-icon {
86
+ .iw-button .iw-icon {
86
87
  color: white;
87
88
  }
88
89
  }
@@ -324,6 +325,8 @@
324
325
  @media (max-width: 64rem) {
325
326
  .iw-dashboard-header-row {
326
327
  flex-wrap: wrap;
328
+ }
329
+ .iw-dashboard-header .iw-dashboard-breadcrumbs {
327
330
  padding-inline: var(--iw-space-3);
328
331
  }
329
332
  .iw-dashboard-content {
@@ -1,9 +1,10 @@
1
+ import downloadOutline from "@iconify-icons/material-symbols/download-outline"
1
2
  import { Chart } from "@inglorious/charts"
2
3
  import { html } from "@inglorious/web"
3
4
 
4
5
  import { Button } from "../../controls/button"
5
6
  import { ButtonGroup } from "../../controls/button-group"
6
- import { MaterialIcon } from "../../data-display/material-icon"
7
+ import { Icon } from "../../data-display/icon"
7
8
  import { Typography } from "../../data-display/typography"
8
9
  import { Progress } from "../../feedback/progress"
9
10
  import { Flex } from "../../layout/flex"
@@ -44,7 +45,7 @@ export const TrafficCard = {
44
45
  Button.render({
45
46
  size: "md",
46
47
  color: "primary",
47
- children: MaterialIcon.render({ name: "download" }),
48
+ children: Icon.render({ icon: downloadOutline }),
48
49
  "aria-label": "Download report",
49
50
  }),
50
51
  ],
@@ -1,10 +1,10 @@
1
+ import moreVertOutline from "@iconify-icons/material-symbols/more-vert-outline"
1
2
  import { html } from "@inglorious/web"
2
3
 
3
4
  import { Button } from "../../controls/button"
4
5
  import { Avatar } from "../../data-display/avatar"
5
6
  import { Badge } from "../../data-display/badge"
6
7
  import { Icon } from "../../data-display/icon"
7
- import { MaterialIcon } from "../../data-display/material-icon"
8
8
  import { Table } from "../../data-display/table"
9
9
  import { Typography } from "../../data-display/typography"
10
10
  import { Progress } from "../../feedback/progress"
@@ -123,8 +123,8 @@ export const TrafficSalesCard = {
123
123
  align: "center",
124
124
  gap: "sm",
125
125
  children: [
126
- MaterialIcon.render({
127
- name: iconName,
126
+ Icon.render({
127
+ icon: iconName,
128
128
  size: "lg",
129
129
  }),
130
130
  html`<span class="iw-typography"
@@ -233,13 +233,7 @@ export const TrafficSalesCard = {
233
233
  })}
234
234
  `,
235
235
  payment: html`<div class="iw-dashboard-payment">
236
- ${Icon.render({
237
- size: "lg",
238
- children: html`<i
239
- class="fa-brands fa-${row.payment}"
240
- aria-hidden="true"
241
- ></i>`,
242
- })}
236
+ ${Icon.render({ icon: row.payment, size: "lg" })}
243
237
  </div>`,
244
238
  activity: html`
245
239
  <div>
@@ -254,7 +248,7 @@ export const TrafficSalesCard = {
254
248
  ${Button.render({
255
249
  variant: "ghost",
256
250
  color: "secondary",
257
- children: MaterialIcon.render({ name: "more_vert" }),
251
+ children: Icon.render({ icon: moreVertOutline }),
258
252
  "aria-label": "Row actions",
259
253
  })}
260
254
  </div>
package/src/index.js CHANGED
@@ -20,7 +20,6 @@ export { DataGrid } from "./data-display/data-grid/index.js"
20
20
  export { Divider } from "./data-display/divider/index.js"
21
21
  export { Icon } from "./data-display/icon/index.js"
22
22
  export { List } from "./data-display/list/index.js"
23
- export { MaterialIcon } from "./data-display/material-icon/index.js"
24
23
  export { Table } from "./data-display/table/index.js"
25
24
  export { Tooltip } from "./data-display/tooltip/index.js"
26
25
  export { Typography } from "./data-display/typography/index.js"
@@ -19,7 +19,9 @@
19
19
  align-items: center;
20
20
  justify-content: center;
21
21
  gap: var(--iw-space-1);
22
- padding: var(--iw-space-2);
22
+ /* Narrow sides: a tab is a quarter or a fifth of a phone, and its label
23
+ needs every pixel of it. */
24
+ padding: var(--iw-space-2) var(--iw-space-1);
23
25
  cursor: pointer;
24
26
  }
25
27
 
@@ -27,8 +29,10 @@
27
29
  color: var(--iw-color-primary);
28
30
  }
29
31
 
32
+ /* 12px, as Material sizes navigation labels: at 14px, "Applications" or
33
+ "Candidatures" does not fit a quarter of a 360px phone. */
30
34
  .iw-bottom-navigation-label {
31
- font-size: var(--iw-font-size-sm);
35
+ font-size: var(--iw-font-size-xs);
32
36
  /* One line, like its neighbours: a label too long for its tab is cut short
33
37
  rather than wrapping, which in languages that break between any two
34
38
  characters (Japanese, Chinese) splits a word and makes the bar taller. */
@@ -7,9 +7,10 @@ import { html } from "@inglorious/web"
7
7
  import { when } from "@inglorious/web/directives/when"
8
8
 
9
9
  import { Button } from "../../controls/button"
10
- import { MaterialIcon } from "../../data-display/material-icon"
10
+ import { Icon } from "../../data-display/icon"
11
11
  import { Backdrop } from "../../feedback/backdrop"
12
12
  import { Flex } from "../../layout/flex"
13
+ import { close, leftPanelClose } from "../../shared/icons.js"
13
14
 
14
15
  /**
15
16
  * Renders a side drawer panel with optional header, body, and collapse controls.
@@ -80,10 +81,7 @@ export function render(props) {
80
81
  className: "iw-drawer-close",
81
82
  "aria-label": "Close",
82
83
  onClick: onClose,
83
- children: MaterialIcon.render({
84
- name: "close",
85
- size: "lg",
86
- }),
84
+ children: Icon.render({ icon: close, size: "lg" }),
87
85
  }),
88
86
  ),
89
87
  ],
@@ -113,10 +111,7 @@ export function render(props) {
113
111
  ? "Expand sidebar"
114
112
  : "Collapse sidebar",
115
113
  onClick: onCollapseToggle,
116
- children: MaterialIcon.render({
117
- name: "left_panel_close",
118
- size: "lg",
119
- }),
114
+ children: Icon.render({ icon: leftPanelClose, size: "lg" }),
120
115
  }),
121
116
  })}
122
117
  `,
@@ -0,0 +1,15 @@
1
+ // The few icons the components draw themselves, so the library needs no icon
2
+ // set of its own. From Material Symbols (Apache License 2.0), in the Iconify
3
+ // format that `Icon` takes.
4
+
5
+ export const close = {
6
+ width: 24,
7
+ height: 24,
8
+ body: '<path fill="currentColor" d="M6.4 19L5 17.6l5.6-5.6L5 6.4L6.4 5l5.6 5.6L17.6 5L19 6.4L13.4 12l5.6 5.6l-1.4 1.4l-5.6-5.6z"/>',
9
+ }
10
+
11
+ export const leftPanelClose = {
12
+ width: 24,
13
+ height: 24,
14
+ body: '<path fill="currentColor" d="M16.5 16V8l-4 4zM5 21q-.825 0-1.412-.587T3 19V5q0-.825.588-1.412T5 3h14q.825 0 1.413.588T21 5v14q0 .825-.587 1.413T19 21zm3-2V5H5v14zm2 0h9V5h-9zm-2 0H5z"/>',
15
+ }