@inglorious/ui 1.0.2 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- 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,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Progress } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Feedback/Progress",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Progress),
|
|
8
8
|
argTypes: {
|
|
9
9
|
variant: { control: "select", options: ["linear", "circular"] },
|
|
10
10
|
value: { control: "number" },
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as renderers from "./template.js"
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const Skeleton = { ...renderers }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Skeleton } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Feedback/Skeleton",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Skeleton),
|
|
8
8
|
argTypes: {
|
|
9
9
|
variant: { control: "select", options: ["text", "rect", "circle"] },
|
|
10
10
|
width: { control: "text" },
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as renderers from "./template.js"
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const Snackbar = { ...renderers }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Snackbar } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Feedback/Snackbar",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Snackbar),
|
|
8
8
|
argTypes: {
|
|
9
9
|
isOpen: { control: "boolean" },
|
|
10
10
|
message: { control: "text" },
|
package/src/index.js
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export {
|
|
3
|
-
export {
|
|
4
|
-
export {
|
|
5
|
-
export {
|
|
6
|
-
export {
|
|
7
|
-
export {
|
|
8
|
-
export {
|
|
9
|
-
export {
|
|
10
|
-
export {
|
|
11
|
-
export {
|
|
12
|
-
export {
|
|
13
|
-
export {
|
|
14
|
-
export {
|
|
15
|
-
export {
|
|
16
|
-
export {
|
|
17
|
-
export {
|
|
18
|
-
export {
|
|
19
|
-
export {
|
|
20
|
-
export {
|
|
21
|
-
export {
|
|
22
|
-
export {
|
|
23
|
-
export {
|
|
24
|
-
export {
|
|
25
|
-
export {
|
|
26
|
-
export {
|
|
27
|
-
export {
|
|
28
|
-
export {
|
|
29
|
-
export {
|
|
30
|
-
export {
|
|
31
|
-
export {
|
|
32
|
-
export {
|
|
33
|
-
export {
|
|
34
|
-
export {
|
|
35
|
-
export {
|
|
36
|
-
export {
|
|
37
|
-
export {
|
|
38
|
-
export {
|
|
39
|
-
export {
|
|
40
|
-
export {
|
|
41
|
-
export {
|
|
42
|
-
export {
|
|
43
|
-
export {
|
|
44
|
-
export {
|
|
45
|
-
export {
|
|
1
|
+
export { Button } from "./controls/button/index.js"
|
|
2
|
+
export { ButtonGroup } from "./controls/button-group/index.js"
|
|
3
|
+
export { Checkbox } from "./controls/checkbox/index.js"
|
|
4
|
+
export { Fab } from "./controls/fab/index.js"
|
|
5
|
+
export { IconButton } from "./controls/icon-button/index.js"
|
|
6
|
+
export { Input } from "./controls/input/index.js"
|
|
7
|
+
export { RadioGroup } from "./controls/radio-group/index.js"
|
|
8
|
+
export { Rating } from "./controls/rating/index.js"
|
|
9
|
+
export { Select } from "./controls/select/index.js"
|
|
10
|
+
export { Slider } from "./controls/slider/index.js"
|
|
11
|
+
export { Switch } from "./controls/switch/index.js"
|
|
12
|
+
export { Avatar } from "./data-display/avatar/index.js"
|
|
13
|
+
export { Badge } from "./data-display/badge/index.js"
|
|
14
|
+
export { Chip } from "./data-display/chip/index.js"
|
|
15
|
+
export { DataGrid } from "./data-display/data-grid/index.js"
|
|
16
|
+
export { Divider } from "./data-display/divider/index.js"
|
|
17
|
+
export { Icon } from "./data-display/icon/index.js"
|
|
18
|
+
export { List } from "./data-display/list/index.js"
|
|
19
|
+
export { MaterialIcon } from "./data-display/material-icon/index.js"
|
|
20
|
+
export { Table } from "./data-display/table/index.js"
|
|
21
|
+
export { Tooltip } from "./data-display/tooltip/index.js"
|
|
22
|
+
export { Typography } from "./data-display/typography/index.js"
|
|
23
|
+
export { VirtualList } from "./data-display/virtual-list/index.js"
|
|
24
|
+
export { Alert } from "./feedback/alert/index.js"
|
|
25
|
+
export { Backdrop } from "./feedback/backdrop/index.js"
|
|
26
|
+
export { Dialog } from "./feedback/dialog/index.js"
|
|
27
|
+
export { Progress } from "./feedback/progress/index.js"
|
|
28
|
+
export { Skeleton } from "./feedback/skeleton/index.js"
|
|
29
|
+
export { Snackbar } from "./feedback/snackbar/index.js"
|
|
30
|
+
export { Container } from "./layout/container/index.js"
|
|
31
|
+
export { Flex } from "./layout/flex/index.js"
|
|
32
|
+
export { Grid } from "./layout/grid/index.js"
|
|
33
|
+
export { BottomNavigation } from "./navigation/bottom-navigation/index.js"
|
|
34
|
+
export { Breadcrumbs } from "./navigation/breadcrumbs/index.js"
|
|
35
|
+
export { Drawer } from "./navigation/drawer/index.js"
|
|
36
|
+
export { Link } from "./navigation/link/index.js"
|
|
37
|
+
export { Menu } from "./navigation/menu/index.js"
|
|
38
|
+
export { Pagination } from "./navigation/pagination/index.js"
|
|
39
|
+
export { SpeedDial } from "./navigation/speed-dial/index.js"
|
|
40
|
+
export { Stepper } from "./navigation/stepper/index.js"
|
|
41
|
+
export { Tabs } from "./navigation/tabs/index.js"
|
|
42
|
+
export { Accordion } from "./surfaces/accordion/index.js"
|
|
43
|
+
export { AppBar } from "./surfaces/app-bar/index.js"
|
|
44
|
+
export { Card } from "./surfaces/card/index.js"
|
|
45
|
+
export { Paper } from "./surfaces/paper/index.js"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Container } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Layout/Container",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Container),
|
|
10
10
|
argTypes: {
|
|
11
11
|
maxWidth: {
|
|
12
12
|
control: "text",
|
|
@@ -79,7 +79,7 @@ export const WidthPresets = {
|
|
|
79
79
|
>
|
|
80
80
|
${size}
|
|
81
81
|
</div>
|
|
82
|
-
${
|
|
82
|
+
${Container.render({
|
|
83
83
|
maxWidth: size,
|
|
84
84
|
children: html`<div
|
|
85
85
|
style="padding: 0.5rem 0.75rem; border: 1px solid var(--iw-color-border);"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Flex } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Layout/Flex",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Flex),
|
|
10
10
|
argTypes: {
|
|
11
11
|
direction: {
|
|
12
12
|
control: "select",
|
package/src/layout/flex/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Grid } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Layout/Grid",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Grid),
|
|
10
10
|
argTypes: {
|
|
11
11
|
columns: {
|
|
12
12
|
control: "number",
|
package/src/layout/grid/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { BottomNavigation } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Bottom Navigation",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(BottomNavigation),
|
|
8
8
|
argTypes: {
|
|
9
9
|
actions: { control: "object", description: "Bottom navigation actions." },
|
|
10
10
|
value: { control: "text", description: "Currently selected action value." },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { BottomNavigation } from "./template.js"
|
|
@@ -8,7 +8,7 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
|
|
9
9
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const BottomNavigation = {
|
|
12
12
|
/**
|
|
13
13
|
* Main entrypoint for bottom navigation. Delegates to the base renderer for overrides.
|
|
14
14
|
* Renders a row of actions with optional labels.
|
|
@@ -70,7 +70,7 @@ export const bottomNavigation = {
|
|
|
70
70
|
"iw-bottom-navigation-action": true,
|
|
71
71
|
"iw-bottom-navigation-action-selected": selected,
|
|
72
72
|
})}
|
|
73
|
-
aria-current=${selected ? "page" :
|
|
73
|
+
aria-current=${selected ? "page" : "false"}
|
|
74
74
|
?disabled=${action.isDisabled}
|
|
75
75
|
@click=${() => {
|
|
76
76
|
action.onClick?.(currentValue)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Breadcrumbs } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Breadcrumbs",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Breadcrumbs),
|
|
8
8
|
argTypes: {
|
|
9
9
|
items: { control: "object", description: "Ordered breadcrumb path items." },
|
|
10
10
|
separator: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Breadcrumbs } from "./template.js"
|
|
@@ -8,7 +8,7 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
|
|
9
9
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const Breadcrumbs = {
|
|
12
12
|
/**
|
|
13
13
|
* Main entrypoint for breadcrumbs navigation. Delegates to the base renderer for overrides.
|
|
14
14
|
* Renders a list of path items separated by a configurable separator.
|
|
@@ -84,7 +84,7 @@ export const breadcrumbs = {
|
|
|
84
84
|
class=${classMap({
|
|
85
85
|
"iw-breadcrumbs-current": isLast,
|
|
86
86
|
})}
|
|
87
|
-
aria-current=${isLast ? "page" :
|
|
87
|
+
aria-current=${isLast ? "page" : "false"}
|
|
88
88
|
>
|
|
89
89
|
${item.label}
|
|
90
90
|
</span>`}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Drawer } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Navigation/Drawer",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Drawer),
|
|
10
10
|
argTypes: {
|
|
11
11
|
isOpen: {
|
|
12
12
|
control: "boolean",
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
|
|
6
6
|
import { html, when } from "@inglorious/web"
|
|
7
7
|
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
8
|
+
import { Button } from "../../controls/button"
|
|
9
|
+
import { MaterialIcon } from "../../data-display/material-icon"
|
|
10
|
+
import { Backdrop } from "../../feedback/backdrop"
|
|
11
|
+
import { Flex } from "../../layout/flex"
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Renders a side drawer panel with optional header, body, and collapse controls.
|
|
@@ -52,7 +52,7 @@ export function render(props) {
|
|
|
52
52
|
.join(" ")
|
|
53
53
|
|
|
54
54
|
return html`
|
|
55
|
-
${
|
|
55
|
+
${Flex.render({
|
|
56
56
|
element: "aside",
|
|
57
57
|
direction: "column",
|
|
58
58
|
className: drawerClassName,
|
|
@@ -60,7 +60,7 @@ export function render(props) {
|
|
|
60
60
|
when(
|
|
61
61
|
title || onClose,
|
|
62
62
|
() => html`
|
|
63
|
-
${
|
|
63
|
+
${Flex.render({
|
|
64
64
|
align: "center",
|
|
65
65
|
justify: "between",
|
|
66
66
|
gap: "sm",
|
|
@@ -71,14 +71,14 @@ export function render(props) {
|
|
|
71
71
|
() => html`<div class="iw-drawer-title">${title}</div>`,
|
|
72
72
|
),
|
|
73
73
|
when(onClose, () =>
|
|
74
|
-
|
|
74
|
+
Button.render({
|
|
75
75
|
color: "secondary",
|
|
76
76
|
variant: "ghost",
|
|
77
77
|
shape: "square",
|
|
78
78
|
className: "iw-drawer-close",
|
|
79
79
|
"aria-label": "Close",
|
|
80
80
|
onClick: onClose,
|
|
81
|
-
children:
|
|
81
|
+
children: MaterialIcon.render({
|
|
82
82
|
name: "close",
|
|
83
83
|
size: "lg",
|
|
84
84
|
}),
|
|
@@ -89,7 +89,7 @@ export function render(props) {
|
|
|
89
89
|
`,
|
|
90
90
|
),
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Flex.render({
|
|
93
93
|
direction: "column",
|
|
94
94
|
className: "iw-drawer-body",
|
|
95
95
|
children,
|
|
@@ -98,11 +98,11 @@ export function render(props) {
|
|
|
98
98
|
when(
|
|
99
99
|
onCollapseToggle,
|
|
100
100
|
() => html`
|
|
101
|
-
${
|
|
101
|
+
${Flex.render({
|
|
102
102
|
justify: "end",
|
|
103
103
|
padding: "sm",
|
|
104
104
|
className: "iw-drawer-footer",
|
|
105
|
-
children:
|
|
105
|
+
children: Button.render({
|
|
106
106
|
color: "secondary",
|
|
107
107
|
variant: "ghost",
|
|
108
108
|
shape: "square",
|
|
@@ -111,7 +111,7 @@ export function render(props) {
|
|
|
111
111
|
? "Expand sidebar"
|
|
112
112
|
: "Collapse sidebar",
|
|
113
113
|
onClick: onCollapseToggle,
|
|
114
|
-
children:
|
|
114
|
+
children: MaterialIcon.render({
|
|
115
115
|
name: "left_panel_close",
|
|
116
116
|
size: "lg",
|
|
117
117
|
}),
|
|
@@ -123,7 +123,7 @@ export function render(props) {
|
|
|
123
123
|
...rest,
|
|
124
124
|
})}
|
|
125
125
|
${when(isOpen && hasBackdrop, () =>
|
|
126
|
-
|
|
126
|
+
Backdrop.render({
|
|
127
127
|
isOpen: true,
|
|
128
128
|
className: "iw-drawer-backdrop",
|
|
129
129
|
onClick: onClose,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as renderers from "./template.js"
|
|
2
2
|
|
|
3
|
-
export const
|
|
3
|
+
export const Link = { ...renderers }
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Link } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Link",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Link),
|
|
8
8
|
argTypes: {
|
|
9
9
|
href: { control: "text", description: "Destination URL." },
|
|
10
10
|
label: { control: "text", description: "Fallback text content." },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Menu } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Menu } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Menu",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Menu),
|
|
8
8
|
argTypes: {
|
|
9
9
|
isOpen: {
|
|
10
10
|
control: "boolean",
|
|
@@ -8,7 +8,7 @@ import { classMap, html, ref } from "@inglorious/web"
|
|
|
8
8
|
|
|
9
9
|
import { applyElementProps } from "../../shared/applyElementProps.js"
|
|
10
10
|
|
|
11
|
-
export const
|
|
11
|
+
export const Menu = {
|
|
12
12
|
/**
|
|
13
13
|
* Main entrypoint for a menu list. Delegates to the base renderer for overrides.
|
|
14
14
|
* Menus render selectable items and optional dividers.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Pagination } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Pagination } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Pagination",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Pagination),
|
|
8
8
|
argTypes: {
|
|
9
9
|
page: { control: "number", description: "Current page (1-based)." },
|
|
10
10
|
count: { control: "number", description: "Total number of pages." },
|
|
@@ -7,11 +7,11 @@
|
|
|
7
7
|
|
|
8
8
|
import { classMap, html } from "@inglorious/web"
|
|
9
9
|
|
|
10
|
-
import {
|
|
10
|
+
import { Button } from "../../controls/button/index.js"
|
|
11
11
|
|
|
12
12
|
const PRETTY_PAGE = 1
|
|
13
13
|
|
|
14
|
-
export const
|
|
14
|
+
export const Pagination = {
|
|
15
15
|
/**
|
|
16
16
|
* Main entrypoint for pagination controls. Delegates to the base renderer for overrides.
|
|
17
17
|
* Supports sibling ranges, first/last buttons, and disabled state.
|
|
@@ -92,7 +92,7 @@ export const pagination = {
|
|
|
92
92
|
}
|
|
93
93
|
|
|
94
94
|
const isCurrent = item === props.page
|
|
95
|
-
return
|
|
95
|
+
return Button.render({
|
|
96
96
|
variant: isCurrent ? "default" : props.buttonVariant,
|
|
97
97
|
color: isCurrent ? "primary" : props.buttonColor,
|
|
98
98
|
size: props.buttonSize,
|
|
@@ -121,7 +121,7 @@ export const pagination = {
|
|
|
121
121
|
props,
|
|
122
122
|
{ label, target, isDisabled = false, onChange = props.onChange },
|
|
123
123
|
) {
|
|
124
|
-
return
|
|
124
|
+
return Button.render({
|
|
125
125
|
variant: props.buttonVariant,
|
|
126
126
|
color: props.buttonColor,
|
|
127
127
|
size: props.buttonSize,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { SpeedDial } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { SpeedDial } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Speed Dial",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(SpeedDial),
|
|
8
8
|
argTypes: {
|
|
9
9
|
isOpen: {
|
|
10
10
|
control: "boolean",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { classMap, html } from "@inglorious/web"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const SpeedDial = {
|
|
10
10
|
/**
|
|
11
11
|
* Main entrypoint for the speed dial. Delegates to the base renderer for overrides.
|
|
12
12
|
* Shows a trigger button and an expandable list of actions.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Stepper } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Stepper } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Stepper",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Stepper),
|
|
8
8
|
argTypes: {
|
|
9
9
|
steps: { control: "object", description: "Ordered step definitions." },
|
|
10
10
|
activeStep: {
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
import { classMap, html } from "@inglorious/web"
|
|
8
8
|
|
|
9
|
-
export const
|
|
9
|
+
export const Stepper = {
|
|
10
10
|
/**
|
|
11
11
|
* Main entrypoint for the stepper component. Delegates to the base renderer for overrides.
|
|
12
12
|
* Steppers render a sequence of steps with completion states.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Tabs } from "./template.js"
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { createRender } from "../../stories/notifyStory.js"
|
|
2
|
-
import {
|
|
2
|
+
import { Tabs } from "."
|
|
3
3
|
|
|
4
4
|
export default {
|
|
5
5
|
title: "Navigation/Tabs",
|
|
6
6
|
tags: ["autodocs"],
|
|
7
|
-
render: createRender(
|
|
7
|
+
render: createRender(Tabs),
|
|
8
8
|
argTypes: {
|
|
9
9
|
items: {
|
|
10
10
|
control: "object",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
3
|
import { createRender } from "../../stories/notifyStory.js"
|
|
4
|
-
import {
|
|
4
|
+
import { Accordion } from "."
|
|
5
5
|
|
|
6
6
|
export default {
|
|
7
7
|
title: "Surfaces/Accordion",
|
|
8
8
|
tags: ["autodocs"],
|
|
9
|
-
render: createRender(
|
|
9
|
+
render: createRender(Accordion),
|
|
10
10
|
argTypes: {
|
|
11
11
|
items: {
|
|
12
12
|
control: "object",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { Accordion } from "./template.js"
|