@inglorious/ui 1.0.2 → 2.0.1
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.
- package/package.json +11 -9
- package/src/controls/button/button.stories.js +2 -2
- package/src/controls/button/index.js +1 -1
- package/src/controls/button-group/button-group.stories.js +2 -2
- package/src/controls/button-group/index.js +1 -1
- package/src/controls/button-group/template.js +2 -2
- package/src/controls/checkbox/checkbox.stories.js +2 -2
- package/src/controls/checkbox/index.js +1 -1
- package/src/controls/combobox/combobox.stories.js +3 -3
- package/src/controls/combobox/index.js +2 -2
- package/src/controls/combobox/template.js +3 -3
- package/src/controls/fab/fab.stories.js +2 -2
- package/src/controls/fab/index.js +1 -1
- package/src/controls/fab/template.js +2 -2
- package/src/controls/icon-button/icon-button.stories.js +2 -2
- package/src/controls/icon-button/index.js +1 -1
- package/src/controls/icon-button/template.js +2 -2
- package/src/controls/input/index.js +1 -1
- package/src/controls/input/input.stories.js +2 -2
- package/src/controls/radio-group/index.js +1 -1
- package/src/controls/radio-group/radio-group.stories.js +2 -2
- package/src/controls/rating/index.js +1 -1
- package/src/controls/rating/rating.stories.js +2 -2
- package/src/controls/select/index.js +1 -1
- package/src/controls/select/select.stories.js +2 -2
- package/src/controls/slider/index.js +1 -1
- package/src/controls/slider/slider.stories.js +2 -2
- package/src/controls/switch/index.js +1 -1
- package/src/controls/switch/switch.stories.js +2 -2
- package/src/data-display/avatar/avatar.stories.js +2 -2
- package/src/data-display/avatar/index.js +1 -1
- package/src/data-display/badge/badge.stories.js +2 -2
- package/src/data-display/badge/index.js +1 -1
- package/src/data-display/chip/chip.stories.js +2 -2
- package/src/data-display/chip/index.js +1 -1
- package/src/data-display/data-grid/data-grid.stories.js +4 -4
- package/src/data-display/data-grid/filters/index.js +10 -10
- package/src/data-display/data-grid/filters/input.js +3 -3
- package/src/data-display/data-grid/filters/range.js +4 -4
- package/src/data-display/data-grid/filters/select.js +3 -3
- package/src/data-display/data-grid/index.js +2 -2
- package/src/data-display/data-grid/template.js +16 -16
- package/src/data-display/divider/divider.stories.js +2 -2
- package/src/data-display/divider/index.js +1 -1
- package/src/data-display/icon/icon-implementations.mdx +4 -4
- package/src/data-display/icon/icon-utf8.stories.js +9 -9
- package/src/data-display/icon/icon.stories.js +2 -2
- package/src/data-display/icon/index.js +1 -1
- package/src/data-display/list/index.js +2 -2
- package/src/data-display/list/list.stories.js +2 -2
- package/src/data-display/list/template.js +8 -8
- package/src/data-display/material-icon/index.js +1 -1
- package/src/data-display/material-icon/material-icon.stories.js +2 -2
- package/src/data-display/table/index.js +1 -1
- package/src/data-display/table/table.stories.js +2 -2
- package/src/data-display/table/template.js +1 -1
- package/src/data-display/tooltip/index.js +1 -1
- package/src/data-display/tooltip/tooltip.stories.js +2 -2
- package/src/data-display/typography/index.js +1 -1
- package/src/data-display/typography/typography.stories.js +2 -2
- package/src/data-display/virtual-list/index.js +1 -1
- package/src/examples/dashboard/app-drawer.js +15 -15
- package/src/examples/dashboard/app-header.js +33 -33
- package/src/examples/dashboard/dashboard-jsx.jsx +76 -0
- package/src/examples/dashboard/dashboard-vue.vue +68 -0
- package/src/examples/dashboard/dashboard.js +43 -42
- package/src/examples/dashboard/dashboard.stories.js +46 -16
- package/src/examples/dashboard/mode.js +1 -1
- package/src/examples/dashboard/primitive-content.js +248 -248
- package/src/examples/dashboard/primitive-section.js +25 -25
- package/src/examples/dashboard/router.js +1 -1
- package/src/examples/dashboard/social-card.js +14 -14
- package/src/examples/dashboard/stat-card.js +12 -12
- package/src/examples/dashboard/theme.js +1 -1
- package/src/examples/dashboard/traffic-card.js +22 -22
- package/src/examples/dashboard/traffic-sales-card.js +39 -39
- package/src/feedback/alert/alert.stories.js +2 -2
- package/src/feedback/alert/index.js +2 -2
- package/src/feedback/backdrop/backdrop.stories.js +2 -2
- package/src/feedback/backdrop/index.js +2 -2
- package/src/feedback/dialog/dialog.stories.js +2 -2
- package/src/feedback/dialog/index.js +2 -2
- package/src/feedback/progress/index.js +1 -1
- package/src/feedback/progress/progress.stories.js +2 -2
- package/src/feedback/progress/template.js +1 -1
- package/src/feedback/skeleton/index.js +2 -2
- package/src/feedback/skeleton/skeleton.stories.js +2 -2
- package/src/feedback/snackbar/index.js +2 -2
- package/src/feedback/snackbar/snackbar.stories.js +2 -2
- package/src/index.js +45 -45
- package/src/layout/container/container.stories.js +3 -3
- package/src/layout/container/index.js +1 -1
- package/src/layout/flex/flex.stories.js +2 -2
- package/src/layout/flex/index.js +1 -1
- package/src/layout/grid/grid.stories.js +2 -2
- package/src/layout/grid/index.js +1 -1
- package/src/navigation/bottom-navigation/bottom-navigation.stories.js +2 -2
- package/src/navigation/bottom-navigation/index.js +1 -1
- package/src/navigation/bottom-navigation/template.js +2 -2
- package/src/navigation/breadcrumbs/breadcrumbs.stories.js +2 -2
- package/src/navigation/breadcrumbs/index.js +1 -1
- package/src/navigation/breadcrumbs/template.js +2 -2
- package/src/navigation/drawer/drawer.stories.js +2 -2
- package/src/navigation/drawer/index.js +1 -1
- package/src/navigation/drawer/template.js +13 -13
- package/src/navigation/link/index.js +2 -2
- package/src/navigation/link/link.stories.js +2 -2
- package/src/navigation/menu/index.js +1 -1
- package/src/navigation/menu/menu.stories.js +2 -2
- package/src/navigation/menu/template.js +1 -1
- package/src/navigation/pagination/index.js +1 -1
- package/src/navigation/pagination/pagination.stories.js +2 -2
- package/src/navigation/pagination/template.js +4 -4
- package/src/navigation/speed-dial/index.js +1 -1
- package/src/navigation/speed-dial/speed-dial.stories.js +2 -2
- package/src/navigation/speed-dial/template.js +1 -1
- package/src/navigation/stepper/index.js +1 -1
- package/src/navigation/stepper/stepper.stories.js +2 -2
- package/src/navigation/stepper/template.js +1 -1
- package/src/navigation/tabs/index.js +1 -1
- package/src/navigation/tabs/tabs.stories.js +2 -2
- package/src/navigation/tabs/template.js +1 -1
- package/src/surfaces/accordion/accordion.stories.js +2 -2
- package/src/surfaces/accordion/index.js +1 -1
- package/src/surfaces/accordion/template.js +1 -1
- package/src/surfaces/app-bar/app-bar.stories.js +2 -2
- package/src/surfaces/app-bar/index.js +1 -1
- package/src/surfaces/card/card.stories.js +2 -2
- package/src/surfaces/card/index.js +1 -1
- package/src/surfaces/card/template.js +1 -1
- package/src/surfaces/paper/index.js +2 -2
- package/src/surfaces/paper/paper.stories.js +3 -3
- package/types/controls/button-group.d.ts +1 -1
- package/types/controls/button.d.ts +2 -2
- package/types/controls/checkbox.d.ts +1 -1
- package/types/controls/combobox.d.ts +1 -1
- package/types/controls/fab.d.ts +1 -1
- package/types/controls/icon-button.d.ts +1 -1
- package/types/controls/input.d.ts +1 -1
- package/types/controls/radio-group.d.ts +1 -1
- package/types/controls/rating.d.ts +1 -1
- package/types/controls/select.d.ts +1 -1
- package/types/controls/slider.d.ts +1 -1
- package/types/controls/switch.d.ts +1 -1
- package/types/data-display/avatar.d.ts +1 -1
- package/types/data-display/badge.d.ts +1 -1
- package/types/data-display/chip.d.ts +1 -1
- package/types/data-display/divider.d.ts +1 -1
- package/types/data-display/icon.d.ts +1 -1
- package/types/data-display/list.d.ts +1 -1
- package/types/data-display/material-icon.d.ts +1 -1
- package/types/data-display/table.d.ts +1 -1
- package/types/data-display/tooltip.d.ts +1 -1
- package/types/data-display/typography.d.ts +1 -1
- package/types/data-display/virtual-list.d.ts +1 -1
- package/types/feedback/alert.d.ts +1 -1
- package/types/feedback/backdrop.d.ts +1 -1
- package/types/feedback/dialog.d.ts +1 -1
- package/types/feedback/progress.d.ts +1 -1
- package/types/feedback/skeleton.d.ts +1 -1
- package/types/feedback/snackbar.d.ts +1 -1
- package/types/layout/container.d.ts +1 -1
- package/types/layout/flex.d.ts +1 -1
- package/types/layout/grid.d.ts +1 -1
- package/types/navigation/bottom-navigation.d.ts +1 -1
- package/types/navigation/breadcrumbs.d.ts +1 -1
- package/types/navigation/drawer.d.ts +1 -1
- package/types/navigation/link.d.ts +1 -1
- package/types/navigation/menu.d.ts +1 -1
- package/types/navigation/pagination.d.ts +1 -1
- package/types/navigation/speed-dial.d.ts +1 -1
- package/types/navigation/stepper.d.ts +1 -1
- package/types/navigation/tabs.d.ts +1 -1
- package/types/surfaces/accordion.d.ts +1 -1
- package/types/surfaces/app-bar.d.ts +1 -1
- package/types/surfaces/card.d.ts +1 -1
- package/types/surfaces/paper.d.ts +1 -1
|
@@ -1,50 +1,50 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import {
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import {
|
|
19
|
-
import {
|
|
20
|
-
import {
|
|
21
|
-
import {
|
|
22
|
-
import {
|
|
23
|
-
import {
|
|
24
|
-
import {
|
|
25
|
-
import {
|
|
26
|
-
import {
|
|
27
|
-
import {
|
|
28
|
-
import {
|
|
29
|
-
import {
|
|
30
|
-
import {
|
|
31
|
-
import {
|
|
32
|
-
import {
|
|
33
|
-
import {
|
|
34
|
-
import {
|
|
35
|
-
import {
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
38
|
-
import {
|
|
39
|
-
import {
|
|
40
|
-
import {
|
|
41
|
-
import {
|
|
42
|
-
import {
|
|
43
|
-
import {
|
|
44
|
-
import {
|
|
45
|
-
import {
|
|
46
|
-
import {
|
|
47
|
-
import {
|
|
3
|
+
import { Button } from "../../controls/button/index.js"
|
|
4
|
+
import { ButtonGroup } from "../../controls/button-group/index.js"
|
|
5
|
+
import { Checkbox } from "../../controls/checkbox/index.js"
|
|
6
|
+
import { Combobox } from "../../controls/combobox/index.js"
|
|
7
|
+
import { Fab } from "../../controls/fab/index.js"
|
|
8
|
+
import { IconButton } from "../../controls/icon-button/index.js"
|
|
9
|
+
import { Input } from "../../controls/input/index.js"
|
|
10
|
+
import { RadioGroup } from "../../controls/radio-group/index.js"
|
|
11
|
+
import { Rating } from "../../controls/rating/index.js"
|
|
12
|
+
import { Select } from "../../controls/select/index.js"
|
|
13
|
+
import { Slider } from "../../controls/slider/index.js"
|
|
14
|
+
import { Switch } from "../../controls/switch/index.js"
|
|
15
|
+
import { Avatar } from "../../data-display/avatar/index.js"
|
|
16
|
+
import { Badge } from "../../data-display/badge/index.js"
|
|
17
|
+
import { Chip } from "../../data-display/chip/index.js"
|
|
18
|
+
import { DataGrid } from "../../data-display/data-grid/index.js"
|
|
19
|
+
import { Divider } from "../../data-display/divider/index.js"
|
|
20
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
21
|
+
import { List } from "../../data-display/list/index.js"
|
|
22
|
+
import { MaterialIcon } from "../../data-display/material-icon/index.js"
|
|
23
|
+
import { Table } from "../../data-display/table/index.js"
|
|
24
|
+
import { Tooltip } from "../../data-display/tooltip/index.js"
|
|
25
|
+
import { Typography } from "../../data-display/typography/index.js"
|
|
26
|
+
import { Alert } from "../../feedback/alert/index.js"
|
|
27
|
+
import { Backdrop } from "../../feedback/backdrop/index.js"
|
|
28
|
+
import { Dialog } from "../../feedback/dialog/index.js"
|
|
29
|
+
import { Progress } from "../../feedback/progress/index.js"
|
|
30
|
+
import { Skeleton } from "../../feedback/skeleton/index.js"
|
|
31
|
+
import { Snackbar } from "../../feedback/snackbar/index.js"
|
|
32
|
+
import { Container } from "../../layout/container/index.js"
|
|
33
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
34
|
+
import { Grid } from "../../layout/grid/index.js"
|
|
35
|
+
import { BottomNavigation } from "../../navigation/bottom-navigation/index.js"
|
|
36
|
+
import { Breadcrumbs } from "../../navigation/breadcrumbs/index.js"
|
|
37
|
+
import { Drawer } from "../../navigation/drawer/index.js"
|
|
38
|
+
import { Link } from "../../navigation/link/index.js"
|
|
39
|
+
import { Menu } from "../../navigation/menu/index.js"
|
|
40
|
+
import { Pagination } from "../../navigation/pagination/index.js"
|
|
41
|
+
import { SpeedDial } from "../../navigation/speed-dial/index.js"
|
|
42
|
+
import { Stepper } from "../../navigation/stepper/index.js"
|
|
43
|
+
import { Tabs } from "../../navigation/tabs/index.js"
|
|
44
|
+
import { Accordion } from "../../surfaces/accordion/index.js"
|
|
45
|
+
import { AppBar } from "../../surfaces/app-bar/index.js"
|
|
46
|
+
import { Card } from "../../surfaces/card/index.js"
|
|
47
|
+
import { Paper } from "../../surfaces/paper/index.js"
|
|
48
48
|
|
|
49
49
|
const categoryMeta = {
|
|
50
50
|
layout: {
|
|
@@ -113,22 +113,22 @@ const primitiveDetailsByPath = {
|
|
|
113
113
|
"Consistent guttering",
|
|
114
114
|
],
|
|
115
115
|
example: {
|
|
116
|
-
code: `import {
|
|
117
|
-
import {
|
|
116
|
+
code: `import { Container } from "@inglorious/ui/container"
|
|
117
|
+
import { Typography } from "@inglorious/ui/typography"
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
Container.render({
|
|
120
120
|
maxWidth: "md",
|
|
121
121
|
padding: "lg",
|
|
122
|
-
children:
|
|
122
|
+
children: Typography.render({
|
|
123
123
|
variant: "h6",
|
|
124
124
|
children: "Content width locked to md"
|
|
125
125
|
})
|
|
126
126
|
})`,
|
|
127
127
|
preview: () =>
|
|
128
|
-
|
|
128
|
+
Container.render({
|
|
129
129
|
maxWidth: "md",
|
|
130
130
|
padding: "lg",
|
|
131
|
-
children:
|
|
131
|
+
children: Typography.render({
|
|
132
132
|
variant: "h6",
|
|
133
133
|
children: "Content width locked to md",
|
|
134
134
|
}),
|
|
@@ -141,24 +141,24 @@ container.render({
|
|
|
141
141
|
"Flex composes horizontal and vertical stacks without custom CSS rules for spacing and alignment.",
|
|
142
142
|
useCases: ["Toolbar rows", "Form stacks", "Inline actions"],
|
|
143
143
|
example: {
|
|
144
|
-
code: `import {
|
|
145
|
-
import {
|
|
144
|
+
code: `import { Flex } from "@inglorious/ui/flex"
|
|
145
|
+
import { Paper } from "@inglorious/ui/paper"
|
|
146
146
|
|
|
147
|
-
|
|
147
|
+
Flex.render({
|
|
148
148
|
align: "center",
|
|
149
149
|
gap: "sm",
|
|
150
150
|
children: [
|
|
151
|
-
|
|
152
|
-
|
|
151
|
+
Paper.render({ padding: "sm", children: "Left" }),
|
|
152
|
+
Paper.render({ padding: "sm", children: "Right" })
|
|
153
153
|
]
|
|
154
154
|
})`,
|
|
155
155
|
preview: () =>
|
|
156
|
-
|
|
156
|
+
Flex.render({
|
|
157
157
|
align: "center",
|
|
158
158
|
gap: "sm",
|
|
159
159
|
children: [
|
|
160
|
-
|
|
161
|
-
|
|
160
|
+
Paper.render({ padding: "sm", children: "Left" }),
|
|
161
|
+
Paper.render({ padding: "sm", children: "Right" }),
|
|
162
162
|
],
|
|
163
163
|
}),
|
|
164
164
|
},
|
|
@@ -169,28 +169,28 @@ flex.render({
|
|
|
169
169
|
"Grid is ideal for dashboards and card layouts where column count varies by viewport.",
|
|
170
170
|
useCases: ["Card galleries", "Metric grids", "Dashboard panels"],
|
|
171
171
|
example: {
|
|
172
|
-
code: `import {
|
|
173
|
-
import {
|
|
172
|
+
code: `import { Grid } from "@inglorious/ui/grid"
|
|
173
|
+
import { Paper } from "@inglorious/ui/paper"
|
|
174
174
|
|
|
175
|
-
|
|
175
|
+
Grid.render({
|
|
176
176
|
minColumnWidth: "10rem",
|
|
177
177
|
gap: "sm",
|
|
178
178
|
children: [
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
179
|
+
Paper.render({ padding: "sm", children: "A" }),
|
|
180
|
+
Paper.render({ padding: "sm", children: "B" }),
|
|
181
|
+
Paper.render({ padding: "sm", children: "C" }),
|
|
182
|
+
Paper.render({ padding: "sm", children: "D" })
|
|
183
183
|
]
|
|
184
184
|
})`,
|
|
185
185
|
preview: () =>
|
|
186
|
-
|
|
186
|
+
Grid.render({
|
|
187
187
|
minColumnWidth: "10rem",
|
|
188
188
|
gap: "sm",
|
|
189
189
|
children: [
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
190
|
+
Paper.render({ padding: "sm", children: "A" }),
|
|
191
|
+
Paper.render({ padding: "sm", children: "B" }),
|
|
192
|
+
Paper.render({ padding: "sm", children: "C" }),
|
|
193
|
+
Paper.render({ padding: "sm", children: "D" }),
|
|
194
194
|
],
|
|
195
195
|
}),
|
|
196
196
|
},
|
|
@@ -201,26 +201,26 @@ grid.render({
|
|
|
201
201
|
"Button exposes stateful styles for primary, secondary, and destructive actions.",
|
|
202
202
|
useCases: ["Primary CTAs", "Dialog actions", "Toolbar commands"],
|
|
203
203
|
example: {
|
|
204
|
-
code: `import {
|
|
204
|
+
code: `import { Button } from "@inglorious/ui/button"
|
|
205
205
|
|
|
206
|
-
|
|
206
|
+
Button.render({
|
|
207
207
|
variant: "default",
|
|
208
208
|
color: "primary",
|
|
209
209
|
children: "Save changes"
|
|
210
210
|
})`,
|
|
211
211
|
preview: () =>
|
|
212
212
|
previewRow([
|
|
213
|
-
|
|
213
|
+
Button.render({
|
|
214
214
|
variant: "default",
|
|
215
215
|
color: "primary",
|
|
216
216
|
children: "Primary",
|
|
217
217
|
}),
|
|
218
|
-
|
|
218
|
+
Button.render({
|
|
219
219
|
variant: "outline",
|
|
220
220
|
color: "primary",
|
|
221
221
|
children: "Outline",
|
|
222
222
|
}),
|
|
223
|
-
|
|
223
|
+
Button.render({
|
|
224
224
|
variant: "ghost",
|
|
225
225
|
color: "secondary",
|
|
226
226
|
children: "Ghost",
|
|
@@ -234,9 +234,9 @@ button.render({
|
|
|
234
234
|
"Button Group handles selection state while keeping controls visually attached.",
|
|
235
235
|
useCases: ["Segmented filters", "Mode switches", "Batch actions"],
|
|
236
236
|
example: {
|
|
237
|
-
code: `import {
|
|
237
|
+
code: `import { ButtonGroup } from "@inglorious/ui/button-group"
|
|
238
238
|
|
|
239
|
-
|
|
239
|
+
ButtonGroup.render({
|
|
240
240
|
value: "week",
|
|
241
241
|
buttons: [
|
|
242
242
|
{ id: "day", label: "Day" },
|
|
@@ -245,7 +245,7 @@ buttonGroup.render({
|
|
|
245
245
|
]
|
|
246
246
|
})`,
|
|
247
247
|
preview: () =>
|
|
248
|
-
|
|
248
|
+
ButtonGroup.render({
|
|
249
249
|
value: "week",
|
|
250
250
|
buttons: [
|
|
251
251
|
{ id: "day", label: "Day" },
|
|
@@ -261,19 +261,19 @@ buttonGroup.render({
|
|
|
261
261
|
"Checkboxes allow multi-select within lists and forms while staying compact.",
|
|
262
262
|
useCases: ["Bulk selection", "Settings toggles", "Agreement fields"],
|
|
263
263
|
example: {
|
|
264
|
-
code: `import {
|
|
264
|
+
code: `import { Checkbox } from "@inglorious/ui/checkbox"
|
|
265
265
|
|
|
266
|
-
|
|
266
|
+
Checkbox.render({
|
|
267
267
|
label: "Send weekly report",
|
|
268
268
|
isChecked: true
|
|
269
269
|
})`,
|
|
270
270
|
preview: () =>
|
|
271
271
|
previewColumn([
|
|
272
|
-
|
|
272
|
+
Checkbox.render({
|
|
273
273
|
label: "Send weekly report",
|
|
274
274
|
isChecked: true,
|
|
275
275
|
}),
|
|
276
|
-
|
|
276
|
+
Checkbox.render({
|
|
277
277
|
label: "Email notifications",
|
|
278
278
|
isChecked: false,
|
|
279
279
|
}),
|
|
@@ -286,9 +286,9 @@ checkbox.render({
|
|
|
286
286
|
"Combobox facilitates selection from large option sets with autocomplete, tag-based multi-select, and custom filtering.",
|
|
287
287
|
useCases: ["Tag selection", "Data filtering", "Complex forms"],
|
|
288
288
|
example: {
|
|
289
|
-
code: `import {
|
|
289
|
+
code: `import { Combobox } from "@inglorious/ui/combobox"
|
|
290
290
|
|
|
291
|
-
|
|
291
|
+
Combobox.render({
|
|
292
292
|
label: "Frameworks",
|
|
293
293
|
placeholder: "Select frameworks...",
|
|
294
294
|
isMulti: true,
|
|
@@ -304,7 +304,7 @@ combobox.render({
|
|
|
304
304
|
selectedValue: ["inglorious"]
|
|
305
305
|
})`,
|
|
306
306
|
preview: () =>
|
|
307
|
-
|
|
307
|
+
Combobox.render({
|
|
308
308
|
label: "Frameworks",
|
|
309
309
|
placeholder: "Select frameworks...",
|
|
310
310
|
isMulti: true,
|
|
@@ -327,16 +327,16 @@ combobox.render({
|
|
|
327
327
|
"FABs emphasize the most important action in a view, especially on mobile.",
|
|
328
328
|
useCases: ["Create actions", "Quick add", "Contextual primary"],
|
|
329
329
|
example: {
|
|
330
|
-
code: `import {
|
|
330
|
+
code: `import { Fab } from "@inglorious/ui/fab"
|
|
331
331
|
|
|
332
|
-
|
|
332
|
+
Fab.render({
|
|
333
333
|
isExtended: true,
|
|
334
334
|
children: "Create"
|
|
335
335
|
})`,
|
|
336
336
|
preview: () =>
|
|
337
337
|
previewRow([
|
|
338
|
-
|
|
339
|
-
|
|
338
|
+
Fab.render({ children: "+" }),
|
|
339
|
+
Fab.render({ isExtended: true, children: "Create" }),
|
|
340
340
|
]),
|
|
341
341
|
},
|
|
342
342
|
},
|
|
@@ -346,23 +346,23 @@ fab.render({
|
|
|
346
346
|
"Icon Button is optimized for toolbars and dense control clusters.",
|
|
347
347
|
useCases: ["Toolbar controls", "Inline actions", "Overflow triggers"],
|
|
348
348
|
example: {
|
|
349
|
-
code: `import {
|
|
350
|
-
import {
|
|
349
|
+
code: `import { IconButton } from "@inglorious/ui/icon-button"
|
|
350
|
+
import { MaterialIcon } from "@inglorious/ui/material-icon"
|
|
351
351
|
|
|
352
|
-
|
|
353
|
-
icon:
|
|
352
|
+
IconButton.render({
|
|
353
|
+
icon: MaterialIcon.render({ name: "settings" }),
|
|
354
354
|
label: "Settings",
|
|
355
355
|
variant: "ghost"
|
|
356
356
|
})`,
|
|
357
357
|
preview: () =>
|
|
358
358
|
previewRow([
|
|
359
|
-
|
|
360
|
-
icon:
|
|
359
|
+
IconButton.render({
|
|
360
|
+
icon: MaterialIcon.render({ name: "settings" }),
|
|
361
361
|
label: "Settings",
|
|
362
362
|
variant: "ghost",
|
|
363
363
|
}),
|
|
364
|
-
|
|
365
|
-
icon:
|
|
364
|
+
IconButton.render({
|
|
365
|
+
icon: MaterialIcon.render({ name: "favorite" }),
|
|
366
366
|
label: "Favorite",
|
|
367
367
|
variant: "ghost",
|
|
368
368
|
}),
|
|
@@ -375,9 +375,9 @@ iconButton.render({
|
|
|
375
375
|
"Input exposes states for errors and hints while keeping layout consistent.",
|
|
376
376
|
useCases: ["Forms", "Search fields", "Inline editing"],
|
|
377
377
|
example: {
|
|
378
|
-
code: `import {
|
|
378
|
+
code: `import { Input } from "@inglorious/ui/input"
|
|
379
379
|
|
|
380
|
-
|
|
380
|
+
Input.render({
|
|
381
381
|
label: "Email",
|
|
382
382
|
inputType: "email",
|
|
383
383
|
placeholder: "name@company.com",
|
|
@@ -385,14 +385,14 @@ input.render({
|
|
|
385
385
|
})`,
|
|
386
386
|
preview: () =>
|
|
387
387
|
previewColumn([
|
|
388
|
-
|
|
388
|
+
Input.render({
|
|
389
389
|
label: "Email",
|
|
390
390
|
inputType: "email",
|
|
391
391
|
placeholder: "name@company.com",
|
|
392
392
|
hint: "We will not share your email",
|
|
393
393
|
value: "",
|
|
394
394
|
}),
|
|
395
|
-
|
|
395
|
+
Input.render({
|
|
396
396
|
label: "Password",
|
|
397
397
|
inputType: "password",
|
|
398
398
|
placeholder: "••••••••",
|
|
@@ -407,9 +407,9 @@ input.render({
|
|
|
407
407
|
"Radio Group ensures mutual exclusivity with explicit option labels.",
|
|
408
408
|
useCases: ["Plan selection", "Single-choice forms", "Mode switching"],
|
|
409
409
|
example: {
|
|
410
|
-
code: `import {
|
|
410
|
+
code: `import { RadioGroup } from "@inglorious/ui/radio-group"
|
|
411
411
|
|
|
412
|
-
|
|
412
|
+
RadioGroup.render({
|
|
413
413
|
label: "Billing",
|
|
414
414
|
value: "annual",
|
|
415
415
|
options: [
|
|
@@ -418,7 +418,7 @@ radioGroup.render({
|
|
|
418
418
|
]
|
|
419
419
|
})`,
|
|
420
420
|
preview: () =>
|
|
421
|
-
|
|
421
|
+
RadioGroup.render({
|
|
422
422
|
label: "Billing",
|
|
423
423
|
value: "annual",
|
|
424
424
|
options: [
|
|
@@ -434,13 +434,13 @@ radioGroup.render({
|
|
|
434
434
|
"Rating captures qualitative feedback with a numeric value backing it.",
|
|
435
435
|
useCases: ["Reviews", "Quality scoring", "Satisfaction"],
|
|
436
436
|
example: {
|
|
437
|
-
code: `import {
|
|
437
|
+
code: `import { Rating } from "@inglorious/ui/rating"
|
|
438
438
|
|
|
439
|
-
|
|
439
|
+
Rating.render({
|
|
440
440
|
value: 4,
|
|
441
441
|
max: 5
|
|
442
442
|
})`,
|
|
443
|
-
preview: () =>
|
|
443
|
+
preview: () => Rating.render({ value: 4, max: 5 }),
|
|
444
444
|
},
|
|
445
445
|
},
|
|
446
446
|
"/controls/select": {
|
|
@@ -449,9 +449,9 @@ rating.render({
|
|
|
449
449
|
"Select keeps forms tight while preserving clear option labels.",
|
|
450
450
|
useCases: ["Filters", "Country selectors", "Form fields"],
|
|
451
451
|
example: {
|
|
452
|
-
code: `import {
|
|
452
|
+
code: `import { Select } from "@inglorious/ui/select"
|
|
453
453
|
|
|
454
|
-
|
|
454
|
+
Select.render({
|
|
455
455
|
value: "active",
|
|
456
456
|
options: [
|
|
457
457
|
{ value: "active", label: "Active" },
|
|
@@ -460,7 +460,7 @@ select.render({
|
|
|
460
460
|
]
|
|
461
461
|
})`,
|
|
462
462
|
preview: () =>
|
|
463
|
-
|
|
463
|
+
Select.render({
|
|
464
464
|
value: "active",
|
|
465
465
|
options: [
|
|
466
466
|
{ value: "active", label: "Active" },
|
|
@@ -476,16 +476,16 @@ select.render({
|
|
|
476
476
|
"Slider is ideal for approximate values like volume or thresholds.",
|
|
477
477
|
useCases: ["Range filters", "Preference tuning", "Threshold settings"],
|
|
478
478
|
example: {
|
|
479
|
-
code: `import {
|
|
479
|
+
code: `import { Slider } from "@inglorious/ui/slider"
|
|
480
480
|
|
|
481
|
-
|
|
481
|
+
Slider.render({
|
|
482
482
|
label: "Volume",
|
|
483
483
|
value: 32,
|
|
484
484
|
min: 0,
|
|
485
485
|
max: 100
|
|
486
486
|
})`,
|
|
487
487
|
preview: () =>
|
|
488
|
-
|
|
488
|
+
Slider.render({ label: "Volume", value: 32, min: 0, max: 100 }),
|
|
489
489
|
},
|
|
490
490
|
},
|
|
491
491
|
"/controls/switch": {
|
|
@@ -494,16 +494,16 @@ slider.render({
|
|
|
494
494
|
"Switches represent live state and can be flipped without confirmation.",
|
|
495
495
|
useCases: ["Feature flags", "Settings", "Live states"],
|
|
496
496
|
example: {
|
|
497
|
-
code: `import {
|
|
497
|
+
code: `import { Switch } from "@inglorious/ui/switch"
|
|
498
498
|
|
|
499
|
-
|
|
499
|
+
Switch.render({
|
|
500
500
|
label: "Auto-sync",
|
|
501
501
|
isChecked: true
|
|
502
502
|
})`,
|
|
503
503
|
preview: () =>
|
|
504
504
|
previewColumn([
|
|
505
|
-
|
|
506
|
-
|
|
505
|
+
Switch.render({ label: "Auto-sync", isChecked: true }),
|
|
506
|
+
Switch.render({ label: "Offline mode", isChecked: false }),
|
|
507
507
|
]),
|
|
508
508
|
},
|
|
509
509
|
},
|
|
@@ -513,16 +513,16 @@ switchControl.render({
|
|
|
513
513
|
"Avatar supports automatic color hashing and multiple shapes/sizes.",
|
|
514
514
|
useCases: ["User lists", "Assignees", "Account menus"],
|
|
515
515
|
example: {
|
|
516
|
-
code: `import {
|
|
516
|
+
code: `import { Avatar } from "@inglorious/ui/avatar"
|
|
517
517
|
|
|
518
|
-
|
|
518
|
+
Avatar.render({
|
|
519
519
|
initials: "JD",
|
|
520
520
|
color: "auto"
|
|
521
521
|
})`,
|
|
522
522
|
preview: () =>
|
|
523
523
|
previewRow([
|
|
524
|
-
|
|
525
|
-
|
|
524
|
+
Avatar.render({ initials: "JD", color: "auto" }),
|
|
525
|
+
Avatar.render({ src: "/transparent.png", shape: "square" }),
|
|
526
526
|
]),
|
|
527
527
|
},
|
|
528
528
|
},
|
|
@@ -531,17 +531,17 @@ avatar.render({
|
|
|
531
531
|
description: "Badges are lightweight chips for quick semantic emphasis.",
|
|
532
532
|
useCases: ["Status tags", "Counts", "Category labels"],
|
|
533
533
|
example: {
|
|
534
|
-
code: `import {
|
|
534
|
+
code: `import { Badge } from "@inglorious/ui/badge"
|
|
535
535
|
|
|
536
|
-
|
|
536
|
+
Badge.render({
|
|
537
537
|
color: "success",
|
|
538
538
|
children: "LIVE"
|
|
539
539
|
})`,
|
|
540
540
|
preview: () =>
|
|
541
541
|
previewRow([
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
542
|
+
Badge.render({ color: "success", children: "LIVE" }),
|
|
543
|
+
Badge.render({ color: "warning", children: "BETA" }),
|
|
544
|
+
Badge.render({ color: "info", children: "NEW" }),
|
|
545
545
|
]),
|
|
546
546
|
},
|
|
547
547
|
},
|
|
@@ -550,17 +550,17 @@ badge.render({
|
|
|
550
550
|
description: "Chips are best for quick filters or removable selections.",
|
|
551
551
|
useCases: ["Tag lists", "Filter pills", "Multi-select"],
|
|
552
552
|
example: {
|
|
553
|
-
code: `import {
|
|
553
|
+
code: `import { Chip } from "@inglorious/ui/chip"
|
|
554
554
|
|
|
555
|
-
|
|
555
|
+
Chip.render({
|
|
556
556
|
children: "Priority: High",
|
|
557
557
|
color: "warning"
|
|
558
558
|
})`,
|
|
559
559
|
preview: () =>
|
|
560
560
|
previewRow([
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
561
|
+
Chip.render({ children: "Priority: High", color: "warning" }),
|
|
562
|
+
Chip.render({ children: "Assigned", color: "success" }),
|
|
563
|
+
Chip.render({ children: "Blocked", color: "error" }),
|
|
564
564
|
]),
|
|
565
565
|
},
|
|
566
566
|
},
|
|
@@ -570,9 +570,9 @@ chip.render({
|
|
|
570
570
|
"Data Grid supports structured datasets with built-in pagination and search hooks.",
|
|
571
571
|
useCases: ["Admin tables", "Operational dashboards", "Data exports"],
|
|
572
572
|
example: {
|
|
573
|
-
code: `import {
|
|
573
|
+
code: `import { DataGrid } from "@inglorious/ui/data-grid"
|
|
574
574
|
|
|
575
|
-
|
|
575
|
+
DataGrid.render({
|
|
576
576
|
rowId: "id",
|
|
577
577
|
columns: [
|
|
578
578
|
{ id: "id", title: "ID", type: "number", isSortable: true },
|
|
@@ -590,7 +590,7 @@ dataGrid.render({
|
|
|
590
590
|
pagination: { page: 0, pageSize: 3, pageSizes: [3, 6] }
|
|
591
591
|
})`,
|
|
592
592
|
preview: () =>
|
|
593
|
-
|
|
593
|
+
DataGrid.render({
|
|
594
594
|
rowId: "id",
|
|
595
595
|
columns: [
|
|
596
596
|
{ id: "id", title: "ID", type: "number", isSortable: true },
|
|
@@ -615,14 +615,14 @@ dataGrid.render({
|
|
|
615
615
|
"Divider adds visual rhythm without introducing heavy borders.",
|
|
616
616
|
useCases: ["Section boundaries", "List grouping", "Sidebars"],
|
|
617
617
|
example: {
|
|
618
|
-
code: `import {
|
|
618
|
+
code: `import { Divider } from "@inglorious/ui/divider"
|
|
619
619
|
|
|
620
|
-
|
|
620
|
+
Divider.render({ orientation: "horizontal" })`,
|
|
621
621
|
preview: () =>
|
|
622
622
|
previewColumn([
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
623
|
+
Typography.render({ variant: "body2", children: "Section A" }),
|
|
624
|
+
Divider.render({ orientation: "horizontal" }),
|
|
625
|
+
Typography.render({ variant: "body2", children: "Section B" }),
|
|
626
626
|
]),
|
|
627
627
|
},
|
|
628
628
|
},
|
|
@@ -632,16 +632,16 @@ divider.render({ orientation: "horizontal" })`,
|
|
|
632
632
|
"Icon is a neutral wrapper for SVGs or glyphs within UI layouts.",
|
|
633
633
|
useCases: ["Inline cues", "Status indicators", "UI affordances"],
|
|
634
634
|
example: {
|
|
635
|
-
code: `import {
|
|
635
|
+
code: `import { Icon } from "@inglorious/ui/icon"
|
|
636
636
|
|
|
637
|
-
|
|
637
|
+
Icon.render({
|
|
638
638
|
size: "lg",
|
|
639
639
|
children: "★"
|
|
640
640
|
})`,
|
|
641
641
|
preview: () =>
|
|
642
642
|
previewRow([
|
|
643
|
-
|
|
644
|
-
|
|
643
|
+
Icon.render({ size: "lg", children: "★" }),
|
|
644
|
+
Icon.render({ size: "lg", children: "⚡" }),
|
|
645
645
|
]),
|
|
646
646
|
},
|
|
647
647
|
},
|
|
@@ -651,29 +651,29 @@ icon.render({
|
|
|
651
651
|
"List supports nested items, selection state, and action affordances.",
|
|
652
652
|
useCases: ["Navigation menus", "Activity feeds", "Result lists"],
|
|
653
653
|
example: {
|
|
654
|
-
code: `import {
|
|
654
|
+
code: `import { List } from "@inglorious/ui/list"
|
|
655
655
|
|
|
656
|
-
|
|
656
|
+
List.render({
|
|
657
657
|
items: [
|
|
658
658
|
{ id: "alpha", primary: "Alpha", secondary: "Ready" },
|
|
659
659
|
{ id: "beta", primary: "Beta", secondary: "Paused" }
|
|
660
660
|
]
|
|
661
661
|
})`,
|
|
662
662
|
preview: () =>
|
|
663
|
-
|
|
663
|
+
List.render({
|
|
664
664
|
isInset: true,
|
|
665
665
|
items: [
|
|
666
666
|
{
|
|
667
667
|
id: "alpha",
|
|
668
668
|
primary: "Alpha",
|
|
669
669
|
secondary: "Ready",
|
|
670
|
-
icon:
|
|
670
|
+
icon: MaterialIcon.render({ name: "bolt", size: "sm" }),
|
|
671
671
|
},
|
|
672
672
|
{
|
|
673
673
|
id: "beta",
|
|
674
674
|
primary: "Beta",
|
|
675
675
|
secondary: "Paused",
|
|
676
|
-
icon:
|
|
676
|
+
icon: MaterialIcon.render({ name: "pause", size: "sm" }),
|
|
677
677
|
},
|
|
678
678
|
],
|
|
679
679
|
}),
|
|
@@ -685,14 +685,14 @@ list.render({
|
|
|
685
685
|
"Material Icon renders Material Symbols with predefined size tokens.",
|
|
686
686
|
useCases: ["Standard iconography", "Toolbar actions", "Menus"],
|
|
687
687
|
example: {
|
|
688
|
-
code: `import {
|
|
688
|
+
code: `import { MaterialIcon } from "@inglorious/ui/material-icon"
|
|
689
689
|
|
|
690
|
-
|
|
690
|
+
MaterialIcon.render({ name: "bolt", size: "lg" })`,
|
|
691
691
|
preview: () =>
|
|
692
692
|
previewRow([
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
693
|
+
MaterialIcon.render({ name: "bolt", size: "lg" }),
|
|
694
|
+
MaterialIcon.render({ name: "settings", size: "lg" }),
|
|
695
|
+
MaterialIcon.render({ name: "layers", size: "lg" }),
|
|
696
696
|
]),
|
|
697
697
|
},
|
|
698
698
|
},
|
|
@@ -702,9 +702,9 @@ materialIcon.render({ name: "bolt", size: "lg" })`,
|
|
|
702
702
|
"Table is a minimal data layout when you do not need full grid features.",
|
|
703
703
|
useCases: ["Reports", "Billing summaries", "Audit tables"],
|
|
704
704
|
example: {
|
|
705
|
-
code: `import {
|
|
705
|
+
code: `import { Table } from "@inglorious/ui/table"
|
|
706
706
|
|
|
707
|
-
|
|
707
|
+
Table.render({
|
|
708
708
|
isStriped: true,
|
|
709
709
|
columns: [
|
|
710
710
|
{ id: "name", label: "Name" },
|
|
@@ -716,7 +716,7 @@ table.render({
|
|
|
716
716
|
]
|
|
717
717
|
})`,
|
|
718
718
|
preview: () =>
|
|
719
|
-
|
|
719
|
+
Table.render({
|
|
720
720
|
isStriped: true,
|
|
721
721
|
columns: [
|
|
722
722
|
{ id: "name", label: "Name" },
|
|
@@ -735,19 +735,19 @@ table.render({
|
|
|
735
735
|
"Tooltip keeps interfaces clean while still exposing contextual help.",
|
|
736
736
|
useCases: ["Icon explanations", "Truncated labels", "Inline hints"],
|
|
737
737
|
example: {
|
|
738
|
-
code: `import {
|
|
738
|
+
code: `import { Tooltip } from "@inglorious/ui/tooltip"
|
|
739
739
|
|
|
740
|
-
|
|
740
|
+
Tooltip.render({
|
|
741
741
|
isOpen: true,
|
|
742
742
|
content: "Copy to clipboard",
|
|
743
743
|
children: "Hover me"
|
|
744
744
|
})`,
|
|
745
745
|
preview: () =>
|
|
746
|
-
|
|
746
|
+
Tooltip.render({
|
|
747
747
|
isOpen: true,
|
|
748
748
|
content: "Copy to clipboard",
|
|
749
|
-
children:
|
|
750
|
-
icon:
|
|
749
|
+
children: IconButton.render({
|
|
750
|
+
icon: MaterialIcon.render({ name: "content_copy" }),
|
|
751
751
|
label: "Copy",
|
|
752
752
|
variant: "ghost",
|
|
753
753
|
}),
|
|
@@ -760,20 +760,20 @@ tooltip.render({
|
|
|
760
760
|
"Typography tokens enforce consistent sizing, weight, and color across surfaces.",
|
|
761
761
|
useCases: ["Headings", "Body text", "Meta labels"],
|
|
762
762
|
example: {
|
|
763
|
-
code: `import {
|
|
763
|
+
code: `import { Typography } from "@inglorious/ui/typography"
|
|
764
764
|
|
|
765
|
-
|
|
765
|
+
Typography.render({
|
|
766
766
|
variant: "h5",
|
|
767
767
|
children: "Section title"
|
|
768
768
|
})`,
|
|
769
769
|
preview: () =>
|
|
770
770
|
previewColumn([
|
|
771
|
-
|
|
772
|
-
|
|
771
|
+
Typography.render({ variant: "h5", children: "Section title" }),
|
|
772
|
+
Typography.render({
|
|
773
773
|
variant: "body1",
|
|
774
774
|
children: "Body text uses a readable line height.",
|
|
775
775
|
}),
|
|
776
|
-
|
|
776
|
+
Typography.render({
|
|
777
777
|
variant: "body2",
|
|
778
778
|
color: "secondary",
|
|
779
779
|
children: "Secondary metadata label",
|
|
@@ -787,15 +787,15 @@ typography.render({
|
|
|
787
787
|
"Alert surfaces contextual feedback without interrupting the flow.",
|
|
788
788
|
useCases: ["Validation errors", "Success banners", "System warnings"],
|
|
789
789
|
example: {
|
|
790
|
-
code: `import {
|
|
790
|
+
code: `import { Alert } from "@inglorious/ui/alert"
|
|
791
791
|
|
|
792
|
-
|
|
792
|
+
Alert.render({
|
|
793
793
|
title: "Payment failed",
|
|
794
794
|
description: "Card expired on 04/24",
|
|
795
795
|
severity: "error"
|
|
796
796
|
})`,
|
|
797
797
|
preview: () =>
|
|
798
|
-
|
|
798
|
+
Alert.render({
|
|
799
799
|
title: "Payment failed",
|
|
800
800
|
description: "Card expired on 04/24",
|
|
801
801
|
severity: "error",
|
|
@@ -808,14 +808,14 @@ alert.render({
|
|
|
808
808
|
"Backdrop dims the app surface and optionally displays a loading cue.",
|
|
809
809
|
useCases: ["Blocking operations", "Modal focus", "Loading states"],
|
|
810
810
|
example: {
|
|
811
|
-
code: `import {
|
|
811
|
+
code: `import { Backdrop } from "@inglorious/ui/backdrop"
|
|
812
812
|
|
|
813
|
-
|
|
813
|
+
Backdrop.render({
|
|
814
814
|
isOpen: true,
|
|
815
815
|
children: "Processing..."
|
|
816
816
|
})`,
|
|
817
817
|
preview: () =>
|
|
818
|
-
|
|
818
|
+
Backdrop.render({
|
|
819
819
|
isOpen: true,
|
|
820
820
|
children: "Processing...",
|
|
821
821
|
}),
|
|
@@ -827,27 +827,27 @@ backdrop.render({
|
|
|
827
827
|
"Dialog interrupts flow for explicit confirmation or data entry.",
|
|
828
828
|
useCases: ["Destructive actions", "Confirmations", "Focused forms"],
|
|
829
829
|
example: {
|
|
830
|
-
code: `import {
|
|
831
|
-
import {
|
|
830
|
+
code: `import { Dialog } from "@inglorious/ui/dialog"
|
|
831
|
+
import { Button } from "@inglorious/ui/button"
|
|
832
832
|
|
|
833
|
-
|
|
833
|
+
Dialog.render({
|
|
834
834
|
isOpen: true,
|
|
835
835
|
title: "Delete record",
|
|
836
836
|
description: "This action cannot be undone.",
|
|
837
|
-
actions:
|
|
837
|
+
actions: Button.render({ children: "Confirm" })
|
|
838
838
|
})`,
|
|
839
839
|
preview: () =>
|
|
840
|
-
|
|
840
|
+
Dialog.render({
|
|
841
841
|
isOpen: true,
|
|
842
842
|
title: "Delete record",
|
|
843
843
|
description: "This action cannot be undone.",
|
|
844
844
|
actions: previewRow([
|
|
845
|
-
|
|
845
|
+
Button.render({
|
|
846
846
|
variant: "ghost",
|
|
847
847
|
color: "secondary",
|
|
848
848
|
children: "Cancel",
|
|
849
849
|
}),
|
|
850
|
-
|
|
850
|
+
Button.render({
|
|
851
851
|
variant: "default",
|
|
852
852
|
color: "error",
|
|
853
853
|
children: "Delete",
|
|
@@ -862,16 +862,16 @@ dialog.render({
|
|
|
862
862
|
"Progress communicates activity for async or long-running operations.",
|
|
863
863
|
useCases: ["Uploads", "Background tasks", "Step completion"],
|
|
864
864
|
example: {
|
|
865
|
-
code: `import {
|
|
865
|
+
code: `import { Progress } from "@inglorious/ui/progress"
|
|
866
866
|
|
|
867
|
-
|
|
867
|
+
Progress.render({
|
|
868
868
|
variant: "linear",
|
|
869
869
|
value: 45
|
|
870
870
|
})`,
|
|
871
871
|
preview: () =>
|
|
872
872
|
previewColumn([
|
|
873
|
-
|
|
874
|
-
|
|
873
|
+
Progress.render({ variant: "linear", value: 45 }),
|
|
874
|
+
Progress.render({ variant: "circular", value: 72, size: 48 }),
|
|
875
875
|
]),
|
|
876
876
|
},
|
|
877
877
|
},
|
|
@@ -880,16 +880,16 @@ progress.render({
|
|
|
880
880
|
description: "Skeleton preserves layout while content is still loading.",
|
|
881
881
|
useCases: ["Card placeholders", "List loading", "Async fetches"],
|
|
882
882
|
example: {
|
|
883
|
-
code: `import {
|
|
883
|
+
code: `import { Skeleton } from "@inglorious/ui/skeleton"
|
|
884
884
|
|
|
885
|
-
|
|
885
|
+
Skeleton.render({
|
|
886
886
|
variant: "text",
|
|
887
887
|
lines: 3
|
|
888
888
|
})`,
|
|
889
889
|
preview: () =>
|
|
890
890
|
previewColumn([
|
|
891
|
-
|
|
892
|
-
|
|
891
|
+
Skeleton.render({ variant: "text", lines: 3 }),
|
|
892
|
+
Skeleton.render({ variant: "rect", height: 80 }),
|
|
893
893
|
]),
|
|
894
894
|
},
|
|
895
895
|
},
|
|
@@ -898,18 +898,18 @@ skeleton.render({
|
|
|
898
898
|
description: "Snackbar provides quick feedback without blocking the user.",
|
|
899
899
|
useCases: ["Save confirmations", "Undo prompts", "Background updates"],
|
|
900
900
|
example: {
|
|
901
|
-
code: `import {
|
|
901
|
+
code: `import { Snackbar } from "@inglorious/ui/snackbar"
|
|
902
902
|
|
|
903
|
-
|
|
903
|
+
Snackbar.render({
|
|
904
904
|
isOpen: true,
|
|
905
905
|
message: "Saved",
|
|
906
906
|
action: "Undo"
|
|
907
907
|
})`,
|
|
908
908
|
preview: () =>
|
|
909
|
-
|
|
909
|
+
Snackbar.render({
|
|
910
910
|
isOpen: true,
|
|
911
911
|
message: "Saved",
|
|
912
|
-
action:
|
|
912
|
+
action: Link.render({ href: "#", children: "Undo" }),
|
|
913
913
|
}),
|
|
914
914
|
},
|
|
915
915
|
},
|
|
@@ -919,9 +919,9 @@ snackbar.render({
|
|
|
919
919
|
"Bottom Navigation keeps primary destinations reachable on small screens.",
|
|
920
920
|
useCases: ["Mobile apps", "Primary sections", "Quick switching"],
|
|
921
921
|
example: {
|
|
922
|
-
code: `import {
|
|
922
|
+
code: `import { BottomNavigation } from "@inglorious/ui/bottom-navigation"
|
|
923
923
|
|
|
924
|
-
|
|
924
|
+
BottomNavigation.render({
|
|
925
925
|
value: 1,
|
|
926
926
|
actions: [
|
|
927
927
|
{ label: "Home", icon: "home" },
|
|
@@ -930,12 +930,12 @@ bottomNavigation.render({
|
|
|
930
930
|
]
|
|
931
931
|
})`,
|
|
932
932
|
preview: () =>
|
|
933
|
-
|
|
933
|
+
BottomNavigation.render({
|
|
934
934
|
value: 1,
|
|
935
935
|
actions: [
|
|
936
|
-
{ label: "Home", icon:
|
|
937
|
-
{ label: "Search", icon:
|
|
938
|
-
{ label: "Profile", icon:
|
|
936
|
+
{ label: "Home", icon: MaterialIcon.render({ name: "home" }) },
|
|
937
|
+
{ label: "Search", icon: MaterialIcon.render({ name: "search" }) },
|
|
938
|
+
{ label: "Profile", icon: MaterialIcon.render({ name: "person" }) },
|
|
939
939
|
],
|
|
940
940
|
}),
|
|
941
941
|
},
|
|
@@ -946,9 +946,9 @@ bottomNavigation.render({
|
|
|
946
946
|
"Breadcrumbs communicate location and allow quick jumps to parent levels.",
|
|
947
947
|
useCases: ["Nested pages", "Content hierarchies", "Admin paths"],
|
|
948
948
|
example: {
|
|
949
|
-
code: `import {
|
|
949
|
+
code: `import { Breadcrumbs } from "@inglorious/ui/breadcrumbs"
|
|
950
950
|
|
|
951
|
-
|
|
951
|
+
Breadcrumbs.render({
|
|
952
952
|
items: [
|
|
953
953
|
{ label: "Projects", href: "/projects" },
|
|
954
954
|
{ label: "Atlas" },
|
|
@@ -956,7 +956,7 @@ breadcrumbs.render({
|
|
|
956
956
|
]
|
|
957
957
|
})`,
|
|
958
958
|
preview: () =>
|
|
959
|
-
|
|
959
|
+
Breadcrumbs.render({
|
|
960
960
|
items: [
|
|
961
961
|
{ label: "Projects", href: "/projects" },
|
|
962
962
|
{ label: "Atlas" },
|
|
@@ -971,33 +971,33 @@ breadcrumbs.render({
|
|
|
971
971
|
"Drawer anchors large navigation trees and can collapse for density.",
|
|
972
972
|
useCases: ["Admin navigation", "Settings menus", "Content trees"],
|
|
973
973
|
example: {
|
|
974
|
-
code: `import {
|
|
975
|
-
import {
|
|
974
|
+
code: `import { Drawer } from "@inglorious/ui/drawer"
|
|
975
|
+
import { List } from "@inglorious/ui/list"
|
|
976
976
|
|
|
977
|
-
|
|
977
|
+
Drawer.render({
|
|
978
978
|
isOpen: true,
|
|
979
979
|
title: "Navigation",
|
|
980
|
-
children:
|
|
980
|
+
children: List.render({ items: [
|
|
981
981
|
{ id: "home", primary: "Dashboard" },
|
|
982
982
|
{ id: "reports", primary: "Reports" }
|
|
983
983
|
] })
|
|
984
984
|
})`,
|
|
985
985
|
preview: () =>
|
|
986
|
-
|
|
986
|
+
Drawer.render({
|
|
987
987
|
isOpen: true,
|
|
988
988
|
hasBackdrop: false,
|
|
989
989
|
title: "Navigation",
|
|
990
|
-
children:
|
|
990
|
+
children: List.render({
|
|
991
991
|
items: [
|
|
992
992
|
{
|
|
993
993
|
id: "home",
|
|
994
994
|
primary: "Dashboard",
|
|
995
|
-
icon:
|
|
995
|
+
icon: MaterialIcon.render({ name: "speed" }),
|
|
996
996
|
},
|
|
997
997
|
{
|
|
998
998
|
id: "reports",
|
|
999
999
|
primary: "Reports",
|
|
1000
|
-
icon:
|
|
1000
|
+
icon: MaterialIcon.render({ name: "bar_chart" }),
|
|
1001
1001
|
},
|
|
1002
1002
|
],
|
|
1003
1003
|
}),
|
|
@@ -1010,16 +1010,16 @@ drawer.render({
|
|
|
1010
1010
|
"Link standardizes color and underline behavior across surfaces.",
|
|
1011
1011
|
useCases: ["Inline navigation", "Help links", "Secondary actions"],
|
|
1012
1012
|
example: {
|
|
1013
|
-
code: `import {
|
|
1013
|
+
code: `import { Link } from "@inglorious/ui/link"
|
|
1014
1014
|
|
|
1015
|
-
|
|
1015
|
+
Link.render({
|
|
1016
1016
|
href: "/docs",
|
|
1017
1017
|
children: "Read documentation"
|
|
1018
1018
|
})`,
|
|
1019
1019
|
preview: () =>
|
|
1020
1020
|
previewRow([
|
|
1021
|
-
|
|
1022
|
-
|
|
1021
|
+
Link.render({ href: "#", children: "Read documentation" }),
|
|
1022
|
+
Link.render({
|
|
1023
1023
|
href: "#",
|
|
1024
1024
|
children: "Release notes",
|
|
1025
1025
|
underline: "always",
|
|
@@ -1033,9 +1033,9 @@ link.render({
|
|
|
1033
1033
|
"Menu surfaces grouped actions without cluttering the main UI.",
|
|
1034
1034
|
useCases: ["Overflow menus", "Context actions", "Quick picks"],
|
|
1035
1035
|
example: {
|
|
1036
|
-
code: `import {
|
|
1036
|
+
code: `import { Menu } from "@inglorious/ui/menu"
|
|
1037
1037
|
|
|
1038
|
-
|
|
1038
|
+
Menu.render({
|
|
1039
1039
|
isOpen: true,
|
|
1040
1040
|
items: [
|
|
1041
1041
|
{ label: "Edit" },
|
|
@@ -1045,7 +1045,7 @@ menu.render({
|
|
|
1045
1045
|
]
|
|
1046
1046
|
})`,
|
|
1047
1047
|
preview: () =>
|
|
1048
|
-
|
|
1048
|
+
Menu.render({
|
|
1049
1049
|
isOpen: true,
|
|
1050
1050
|
items: [
|
|
1051
1051
|
{ label: "Edit" },
|
|
@@ -1061,13 +1061,13 @@ menu.render({
|
|
|
1061
1061
|
description: "Pagination keeps dataset navigation fast and accessible.",
|
|
1062
1062
|
useCases: ["Search results", "Data tables", "Archives"],
|
|
1063
1063
|
example: {
|
|
1064
|
-
code: `import {
|
|
1064
|
+
code: `import { Pagination } from "@inglorious/ui/pagination"
|
|
1065
1065
|
|
|
1066
|
-
|
|
1066
|
+
Pagination.render({
|
|
1067
1067
|
page: 2,
|
|
1068
1068
|
count: 6
|
|
1069
1069
|
})`,
|
|
1070
|
-
preview: () =>
|
|
1070
|
+
preview: () => Pagination.render({ page: 2, count: 6 }),
|
|
1071
1071
|
},
|
|
1072
1072
|
},
|
|
1073
1073
|
"/navigation/speed-dial": {
|
|
@@ -1076,9 +1076,9 @@ pagination.render({
|
|
|
1076
1076
|
"Speed Dial groups floating actions and reveals them on interaction.",
|
|
1077
1077
|
useCases: ["Mobile shortcuts", "Create actions", "Context tools"],
|
|
1078
1078
|
example: {
|
|
1079
|
-
code: `import {
|
|
1079
|
+
code: `import { SpeedDial } from "@inglorious/ui/speed-dial"
|
|
1080
1080
|
|
|
1081
|
-
|
|
1081
|
+
SpeedDial.render({
|
|
1082
1082
|
isOpen: true,
|
|
1083
1083
|
actions: [
|
|
1084
1084
|
{ label: "Add", icon: "+" },
|
|
@@ -1086,7 +1086,7 @@ speedDial.render({
|
|
|
1086
1086
|
]
|
|
1087
1087
|
})`,
|
|
1088
1088
|
preview: () =>
|
|
1089
|
-
|
|
1089
|
+
SpeedDial.render({
|
|
1090
1090
|
isOpen: true,
|
|
1091
1091
|
actions: [
|
|
1092
1092
|
{ label: "Add", icon: "+" },
|
|
@@ -1101,9 +1101,9 @@ speedDial.render({
|
|
|
1101
1101
|
"Stepper communicates progress and ordering in multi-step tasks.",
|
|
1102
1102
|
useCases: ["Checkout", "Onboarding", "Wizard flows"],
|
|
1103
1103
|
example: {
|
|
1104
|
-
code: `import {
|
|
1104
|
+
code: `import { Stepper } from "@inglorious/ui/stepper"
|
|
1105
1105
|
|
|
1106
|
-
|
|
1106
|
+
Stepper.render({
|
|
1107
1107
|
activeStep: 1,
|
|
1108
1108
|
steps: [
|
|
1109
1109
|
{ label: "Details" },
|
|
@@ -1112,7 +1112,7 @@ stepper.render({
|
|
|
1112
1112
|
]
|
|
1113
1113
|
})`,
|
|
1114
1114
|
preview: () =>
|
|
1115
|
-
|
|
1115
|
+
Stepper.render({
|
|
1116
1116
|
activeStep: 1,
|
|
1117
1117
|
steps: [
|
|
1118
1118
|
{ label: "Details" },
|
|
@@ -1128,9 +1128,9 @@ stepper.render({
|
|
|
1128
1128
|
"Tabs keep related content in one location with explicit selection state.",
|
|
1129
1129
|
useCases: ["Detail views", "Settings", "Section switches"],
|
|
1130
1130
|
example: {
|
|
1131
|
-
code: `import {
|
|
1131
|
+
code: `import { Tabs } from "@inglorious/ui/tabs"
|
|
1132
1132
|
|
|
1133
|
-
|
|
1133
|
+
Tabs.render({
|
|
1134
1134
|
value: 0,
|
|
1135
1135
|
items: [
|
|
1136
1136
|
{ label: "Overview", panel: "Overview content" },
|
|
@@ -1138,19 +1138,19 @@ tabs.render({
|
|
|
1138
1138
|
]
|
|
1139
1139
|
})`,
|
|
1140
1140
|
preview: () =>
|
|
1141
|
-
|
|
1141
|
+
Tabs.render({
|
|
1142
1142
|
value: 0,
|
|
1143
1143
|
items: [
|
|
1144
1144
|
{
|
|
1145
1145
|
label: "Overview",
|
|
1146
|
-
panel:
|
|
1146
|
+
panel: Typography.render({
|
|
1147
1147
|
variant: "body2",
|
|
1148
1148
|
children: "Overview content",
|
|
1149
1149
|
}),
|
|
1150
1150
|
},
|
|
1151
1151
|
{
|
|
1152
1152
|
label: "Details",
|
|
1153
|
-
panel:
|
|
1153
|
+
panel: Typography.render({
|
|
1154
1154
|
variant: "body2",
|
|
1155
1155
|
children: "Details content",
|
|
1156
1156
|
}),
|
|
@@ -1165,16 +1165,16 @@ tabs.render({
|
|
|
1165
1165
|
"Accordion reveals details on demand while keeping layouts compact.",
|
|
1166
1166
|
useCases: ["FAQs", "Settings groups", "Detail panels"],
|
|
1167
1167
|
example: {
|
|
1168
|
-
code: `import {
|
|
1168
|
+
code: `import { Accordion } from "@inglorious/ui/accordion"
|
|
1169
1169
|
|
|
1170
|
-
|
|
1170
|
+
Accordion.render({
|
|
1171
1171
|
items: [
|
|
1172
1172
|
{ title: "Usage", content: "How to use it", isExpanded: true },
|
|
1173
1173
|
{ title: "API", content: "Props and handlers" }
|
|
1174
1174
|
]
|
|
1175
1175
|
})`,
|
|
1176
1176
|
preview: () =>
|
|
1177
|
-
|
|
1177
|
+
Accordion.render({
|
|
1178
1178
|
items: [
|
|
1179
1179
|
{
|
|
1180
1180
|
title: "Usage",
|
|
@@ -1192,20 +1192,20 @@ accordion.render({
|
|
|
1192
1192
|
"App Bar anchors navigation and global actions in a consistent header.",
|
|
1193
1193
|
useCases: ["App headers", "Section titles", "Global actions"],
|
|
1194
1194
|
example: {
|
|
1195
|
-
code: `import {
|
|
1196
|
-
import {
|
|
1195
|
+
code: `import { AppBar } from "@inglorious/ui/app-bar"
|
|
1196
|
+
import { Button } from "@inglorious/ui/button"
|
|
1197
1197
|
|
|
1198
|
-
|
|
1198
|
+
AppBar.render({
|
|
1199
1199
|
title: "Project Ops",
|
|
1200
1200
|
subtitle: "SLA dashboard",
|
|
1201
|
-
trailing:
|
|
1201
|
+
trailing: Button.render({ children: "Share" })
|
|
1202
1202
|
})`,
|
|
1203
1203
|
preview: () =>
|
|
1204
|
-
|
|
1204
|
+
AppBar.render({
|
|
1205
1205
|
title: "Project Ops",
|
|
1206
1206
|
subtitle: "SLA dashboard",
|
|
1207
|
-
leading:
|
|
1208
|
-
trailing:
|
|
1207
|
+
leading: MaterialIcon.render({ name: "menu" }),
|
|
1208
|
+
trailing: Button.render({
|
|
1209
1209
|
variant: "ghost",
|
|
1210
1210
|
color: "secondary",
|
|
1211
1211
|
children: "Share",
|
|
@@ -1219,18 +1219,18 @@ appBar.render({
|
|
|
1219
1219
|
"Card provides a flexible surface with optional header and footer sections.",
|
|
1220
1220
|
useCases: ["Dashboard panels", "Content previews", "Summary blocks"],
|
|
1221
1221
|
example: {
|
|
1222
|
-
code: `import {
|
|
1222
|
+
code: `import { Card } from "@inglorious/ui/card"
|
|
1223
1223
|
|
|
1224
|
-
|
|
1224
|
+
Card.render({
|
|
1225
1225
|
title: "Weekly report",
|
|
1226
1226
|
subtitle: "Updated 2h ago",
|
|
1227
1227
|
children: "View metrics and KPIs"
|
|
1228
1228
|
})`,
|
|
1229
1229
|
preview: () =>
|
|
1230
|
-
|
|
1230
|
+
Card.render({
|
|
1231
1231
|
title: "Weekly report",
|
|
1232
1232
|
subtitle: "Updated 2h ago",
|
|
1233
|
-
children:
|
|
1233
|
+
children: Typography.render({
|
|
1234
1234
|
variant: "body2",
|
|
1235
1235
|
children: "View metrics and KPIs",
|
|
1236
1236
|
}),
|
|
@@ -1243,16 +1243,16 @@ card.render({
|
|
|
1243
1243
|
"Paper is the base surface primitive for sections and layout regions.",
|
|
1244
1244
|
useCases: ["Section backgrounds", "Inset panels", "Content blocks"],
|
|
1245
1245
|
example: {
|
|
1246
|
-
code: `import {
|
|
1246
|
+
code: `import { Paper } from "@inglorious/ui/paper"
|
|
1247
1247
|
|
|
1248
|
-
|
|
1248
|
+
Paper.render({
|
|
1249
1249
|
padding: "md",
|
|
1250
1250
|
children: "Surface content"
|
|
1251
1251
|
})`,
|
|
1252
1252
|
preview: () =>
|
|
1253
|
-
|
|
1253
|
+
Paper.render({
|
|
1254
1254
|
padding: "md",
|
|
1255
|
-
children:
|
|
1255
|
+
children: Typography.render({
|
|
1256
1256
|
variant: "body2",
|
|
1257
1257
|
children: "Surface content",
|
|
1258
1258
|
}),
|