@inglorious/ui 8.4.1 → 8.5.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 +5 -5
- package/src/controls/fab/fab.stories.js +1 -1
- package/src/data-display/data-grid/filters/input.js +2 -2
- package/src/data-display/data-grid/filters/range.js +2 -2
- package/src/data-display/data-grid/filters/select.js +2 -2
- package/src/data-display/data-grid/template.js +1 -1
- package/src/data-display/icon/icon-utf8.stories.js +1 -1
- package/src/data-display/list/template.js +3 -3
- package/src/examples/dashboard/app-drawer.js +6 -6
- package/src/examples/dashboard/app-header.js +7 -7
- package/src/examples/dashboard/social-card.js +5 -5
- package/src/examples/dashboard/stat-card.js +4 -4
- package/src/examples/dashboard/traffic-card.js +9 -9
- package/src/examples/dashboard/traffic-sales-card.js +11 -11
- package/src/feedback/snackbar/snackbar.stories.js +25 -1
- package/src/feedback/snackbar/style.css +31 -10
- package/src/navigation/drawer/template.js +4 -4
- package/types/feedback/snackbar.d.ts +7 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.5.0",
|
|
4
4
|
"description": "A design system for Inglorious Web with render-function components and customizable themes",
|
|
5
5
|
"author": "Matteo Antony Mistretta <antony.mistretta@gmail.com> (https://ingloriouscoderz.it)",
|
|
6
6
|
"license": "MIT",
|
|
@@ -308,19 +308,19 @@
|
|
|
308
308
|
"peerDependencies": {
|
|
309
309
|
"@inglorious/store": "12.0.0",
|
|
310
310
|
"@inglorious/utils": "5.1.0",
|
|
311
|
-
"@inglorious/web": "6.
|
|
311
|
+
"@inglorious/web": "6.9.0"
|
|
312
312
|
},
|
|
313
313
|
"devDependencies": {
|
|
314
314
|
"@iconify-icons/fa7-brands": "^2.0.0",
|
|
315
315
|
"@iconify-icons/fa7-regular": "^2.0.0",
|
|
316
316
|
"@iconify-icons/fa7-solid": "^2.0.0",
|
|
317
317
|
"@iconify-icons/material-symbols": "^2.0.6",
|
|
318
|
-
"@inglorious/charts": "11.1.
|
|
319
|
-
"@inglorious/eslint-config": "1.
|
|
318
|
+
"@inglorious/charts": "11.1.7",
|
|
319
|
+
"@inglorious/eslint-config": "1.2.0",
|
|
320
320
|
"@inglorious/store": "12.0.0",
|
|
321
321
|
"@inglorious/vite-plugin-jsx": "2.0.5",
|
|
322
322
|
"@inglorious/vite-plugin-vue": "1.0.6",
|
|
323
|
-
"@inglorious/web": "6.
|
|
323
|
+
"@inglorious/web": "6.9.0",
|
|
324
324
|
"@storybook/addon-docs": "^10.6.0",
|
|
325
325
|
"@storybook/web-components-vite": "^10.6.0",
|
|
326
326
|
"happy-dom": "^20.14.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { html } from "@inglorious/web"
|
|
2
2
|
|
|
3
|
-
import { Input } from "../../../controls/input"
|
|
4
|
-
import { format } from "./helpers"
|
|
3
|
+
import { Input } from "../../../controls/input/index.js"
|
|
4
|
+
import { format } from "./helpers.js"
|
|
5
5
|
|
|
6
6
|
const RANGE_TYPE = {
|
|
7
7
|
range: "number",
|
|
@@ -14,7 +14,7 @@ import { Input } from "../../controls/input/index.js"
|
|
|
14
14
|
import { Select } from "../../controls/select/index.js"
|
|
15
15
|
import { Pagination } from "../../navigation/pagination/index.js"
|
|
16
16
|
import { VirtualList } from "../virtual-list/index.js"
|
|
17
|
-
import { Filters } from "./filters"
|
|
17
|
+
import { Filters } from "./filters/index.js"
|
|
18
18
|
import {
|
|
19
19
|
getPaginationInfo,
|
|
20
20
|
getRowKeyValue,
|
|
@@ -2,7 +2,7 @@ import { VirtualList } from "@inglorious/ui/virtual-list"
|
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
import { repeat } from "@inglorious/web/directives/repeat"
|
|
4
4
|
|
|
5
|
-
import { Button } from "../../controls/button"
|
|
5
|
+
import { Button } from "../../controls/button/index.js"
|
|
6
6
|
import {
|
|
7
7
|
createEntityRender,
|
|
8
8
|
notifyActionArgType,
|
|
@@ -25,9 +25,9 @@ import { ref } from "@inglorious/web/directives/ref"
|
|
|
25
25
|
import { repeat } from "@inglorious/web/directives/repeat"
|
|
26
26
|
import { when } from "@inglorious/web/directives/when"
|
|
27
27
|
|
|
28
|
-
import { IconButton } from "../../controls/icon-button"
|
|
29
|
-
import { Icon } from "../../data-display/icon"
|
|
30
|
-
import { Flex } from "../../layout/flex"
|
|
28
|
+
import { IconButton } from "../../controls/icon-button/index.js"
|
|
29
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
30
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
31
31
|
import { applyElementProps } from "../../shared/apply-element-props.js"
|
|
32
32
|
|
|
33
33
|
const PRETTY_INDEX = 1
|
|
@@ -7,12 +7,12 @@ import notificationsOutline from "@iconify-icons/material-symbols/notifications-
|
|
|
7
7
|
import speedOutline from "@iconify-icons/material-symbols/speed-outline"
|
|
8
8
|
import { html } from "@inglorious/web"
|
|
9
9
|
|
|
10
|
-
import { Avatar } from "../../data-display/avatar"
|
|
11
|
-
import { Badge } from "../../data-display/badge"
|
|
12
|
-
import { Icon } from "../../data-display/icon"
|
|
13
|
-
import { List } from "../../data-display/list"
|
|
14
|
-
import { Flex } from "../../layout/flex"
|
|
15
|
-
import { Drawer } from "../../navigation/drawer"
|
|
10
|
+
import { Avatar } from "../../data-display/avatar/index.js"
|
|
11
|
+
import { Badge } from "../../data-display/badge/index.js"
|
|
12
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
13
|
+
import { List } from "../../data-display/list/index.js"
|
|
14
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
15
|
+
import { Drawer } from "../../navigation/drawer/index.js"
|
|
16
16
|
|
|
17
17
|
export const AppDrawer = {
|
|
18
18
|
create(entity) {
|
|
@@ -10,13 +10,13 @@ import menuOutline from "@iconify-icons/material-symbols/menu-outline"
|
|
|
10
10
|
import notificationsOutline from "@iconify-icons/material-symbols/notifications-outline"
|
|
11
11
|
import { html } from "@inglorious/web"
|
|
12
12
|
|
|
13
|
-
import { Button } from "../../controls/button"
|
|
14
|
-
import { Avatar } from "../../data-display/avatar"
|
|
15
|
-
import { Divider } from "../../data-display/divider"
|
|
16
|
-
import { Icon } from "../../data-display/icon"
|
|
17
|
-
import { Flex } from "../../layout/flex"
|
|
18
|
-
import { Breadcrumbs } from "../../navigation/breadcrumbs"
|
|
19
|
-
import { AppBar } from "../../surfaces/app-bar"
|
|
13
|
+
import { Button } from "../../controls/button/index.js"
|
|
14
|
+
import { Avatar } from "../../data-display/avatar/index.js"
|
|
15
|
+
import { Divider } from "../../data-display/divider/index.js"
|
|
16
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
17
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
18
|
+
import { Breadcrumbs } from "../../navigation/breadcrumbs/index.js"
|
|
19
|
+
import { AppBar } from "../../surfaces/app-bar/index.js"
|
|
20
20
|
|
|
21
21
|
export const AppHeader = {
|
|
22
22
|
render(entity, api) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { Area, Chart } from "@inglorious/charts"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
|
-
import { Divider } from "../../data-display/divider"
|
|
5
|
-
import { Icon } from "../../data-display/icon"
|
|
6
|
-
import { Typography } from "../../data-display/typography"
|
|
7
|
-
import { Grid } from "../../layout/grid"
|
|
8
|
-
import { Card } from "../../surfaces/card"
|
|
4
|
+
import { Divider } from "../../data-display/divider/index.js"
|
|
5
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
6
|
+
import { Typography } from "../../data-display/typography/index.js"
|
|
7
|
+
import { Grid } from "../../layout/grid/index.js"
|
|
8
|
+
import { Card } from "../../surfaces/card/index.js"
|
|
9
9
|
|
|
10
10
|
export const SocialCard = {
|
|
11
11
|
render(entity, api) {
|
|
@@ -2,10 +2,10 @@ import moreVertOutline from "@iconify-icons/material-symbols/more-vert-outline"
|
|
|
2
2
|
import { Area, Bar, Chart, Dots, Line } from "@inglorious/charts"
|
|
3
3
|
import { html } from "@inglorious/web"
|
|
4
4
|
|
|
5
|
-
import { Button } from "../../controls/button"
|
|
6
|
-
import { Icon } from "../../data-display/icon"
|
|
7
|
-
import { Typography } from "../../data-display/typography"
|
|
8
|
-
import { Card } from "../../surfaces/card"
|
|
5
|
+
import { Button } from "../../controls/button/index.js"
|
|
6
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
7
|
+
import { Typography } from "../../data-display/typography/index.js"
|
|
8
|
+
import { Card } from "../../surfaces/card/index.js"
|
|
9
9
|
|
|
10
10
|
export const StatCard = {
|
|
11
11
|
render(entity, api) {
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
} from "@inglorious/charts"
|
|
10
10
|
import { html } from "@inglorious/web"
|
|
11
11
|
|
|
12
|
-
import { Button } from "../../controls/button"
|
|
13
|
-
import { ButtonGroup } from "../../controls/button-group"
|
|
14
|
-
import { Icon } from "../../data-display/icon"
|
|
15
|
-
import { Typography } from "../../data-display/typography"
|
|
16
|
-
import { Progress } from "../../feedback/progress"
|
|
17
|
-
import { Flex } from "../../layout/flex"
|
|
18
|
-
import { Grid } from "../../layout/grid"
|
|
19
|
-
import { Card } from "../../surfaces/card"
|
|
20
|
-
import { trafficSeries, trafficSummary } from "./data"
|
|
12
|
+
import { Button } from "../../controls/button/index.js"
|
|
13
|
+
import { ButtonGroup } from "../../controls/button-group/index.js"
|
|
14
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
15
|
+
import { Typography } from "../../data-display/typography/index.js"
|
|
16
|
+
import { Progress } from "../../feedback/progress/index.js"
|
|
17
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
18
|
+
import { Grid } from "../../layout/grid/index.js"
|
|
19
|
+
import { Card } from "../../surfaces/card/index.js"
|
|
20
|
+
import { trafficSeries, trafficSummary } from "./data.js"
|
|
21
21
|
|
|
22
22
|
export const TrafficCard = {
|
|
23
23
|
render(entity, api) {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import moreVertOutline from "@iconify-icons/material-symbols/more-vert-outline"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
|
-
import { Button } from "../../controls/button"
|
|
5
|
-
import { Avatar } from "../../data-display/avatar"
|
|
6
|
-
import { Badge } from "../../data-display/badge"
|
|
7
|
-
import { Icon } from "../../data-display/icon"
|
|
8
|
-
import { Table } from "../../data-display/table"
|
|
9
|
-
import { Typography } from "../../data-display/typography"
|
|
10
|
-
import { Progress } from "../../feedback/progress"
|
|
11
|
-
import { Flex } from "../../layout/flex"
|
|
12
|
-
import { Grid } from "../../layout/grid"
|
|
13
|
-
import { Card } from "../../surfaces/card"
|
|
14
|
-
import { clientBars, sourceBars, userRows } from "./data"
|
|
4
|
+
import { Button } from "../../controls/button/index.js"
|
|
5
|
+
import { Avatar } from "../../data-display/avatar/index.js"
|
|
6
|
+
import { Badge } from "../../data-display/badge/index.js"
|
|
7
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
8
|
+
import { Table } from "../../data-display/table/index.js"
|
|
9
|
+
import { Typography } from "../../data-display/typography/index.js"
|
|
10
|
+
import { Progress } from "../../feedback/progress/index.js"
|
|
11
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
12
|
+
import { Grid } from "../../layout/grid/index.js"
|
|
13
|
+
import { Card } from "../../surfaces/card/index.js"
|
|
14
|
+
import { clientBars, sourceBars, userRows } from "./data.js"
|
|
15
15
|
|
|
16
16
|
export const TrafficSalesCard = {
|
|
17
17
|
render(entity, api) {
|
|
@@ -10,7 +10,14 @@ export default {
|
|
|
10
10
|
message: { control: "text" },
|
|
11
11
|
position: {
|
|
12
12
|
control: "select",
|
|
13
|
-
options: [
|
|
13
|
+
options: [
|
|
14
|
+
"bottom-left",
|
|
15
|
+
"bottom-center",
|
|
16
|
+
"bottom-right",
|
|
17
|
+
"top-left",
|
|
18
|
+
"top-center",
|
|
19
|
+
"top-right",
|
|
20
|
+
],
|
|
14
21
|
},
|
|
15
22
|
onClose: { action: "onClose" },
|
|
16
23
|
},
|
|
@@ -23,3 +30,20 @@ export const Default = {
|
|
|
23
30
|
position: "bottom-left",
|
|
24
31
|
},
|
|
25
32
|
}
|
|
33
|
+
|
|
34
|
+
// A phone app keeps a bar at the bottom: the snackbar rises above it.
|
|
35
|
+
export const AboveBottomNavigation = {
|
|
36
|
+
args: {
|
|
37
|
+
isOpen: true,
|
|
38
|
+
message: "New version available",
|
|
39
|
+
position: "bottom-center",
|
|
40
|
+
},
|
|
41
|
+
decorators: [
|
|
42
|
+
(story) => {
|
|
43
|
+
const container = document.createElement("div")
|
|
44
|
+
container.style.setProperty("--iw-snackbar-offset-bottom", "4.875rem")
|
|
45
|
+
container.append(story())
|
|
46
|
+
return container
|
|
47
|
+
},
|
|
48
|
+
],
|
|
49
|
+
}
|
|
@@ -1,26 +1,47 @@
|
|
|
1
|
+
/* Fixed to the viewport, clear of the system bars. A bottom snackbar also
|
|
2
|
+
clears whatever bar the app keeps at the bottom: the app sets
|
|
3
|
+
--iw-snackbar-offset-bottom to that bar's height while it shows, and the
|
|
4
|
+
offset then stands in for the safe area, which the bar already covers.
|
|
5
|
+
Only the app knows when its bar is on screen, so nothing is guessed here. */
|
|
1
6
|
.iw-snackbar {
|
|
7
|
+
--iw-snackbar-gap: var(--iw-space-4);
|
|
2
8
|
position: fixed;
|
|
3
9
|
z-index: var(--iw-z-popover, 1060);
|
|
10
|
+
max-width: calc(100vw - 2 * var(--iw-snackbar-gap));
|
|
4
11
|
}
|
|
5
12
|
|
|
6
|
-
.iw-snackbar-bottom-left
|
|
7
|
-
|
|
8
|
-
|
|
13
|
+
.iw-snackbar-bottom-left,
|
|
14
|
+
.iw-snackbar-bottom-center,
|
|
15
|
+
.iw-snackbar-bottom-right {
|
|
16
|
+
bottom: calc(
|
|
17
|
+
var(--iw-snackbar-gap) +
|
|
18
|
+
var(--iw-snackbar-offset-bottom, var(--safe-area-bottom, 0px))
|
|
19
|
+
);
|
|
9
20
|
}
|
|
10
21
|
|
|
11
|
-
.iw-snackbar-
|
|
12
|
-
|
|
13
|
-
|
|
22
|
+
.iw-snackbar-top-left,
|
|
23
|
+
.iw-snackbar-top-center,
|
|
24
|
+
.iw-snackbar-top-right {
|
|
25
|
+
top: calc(var(--iw-snackbar-gap) + var(--safe-area-top, 0px));
|
|
14
26
|
}
|
|
15
27
|
|
|
28
|
+
.iw-snackbar-bottom-left,
|
|
16
29
|
.iw-snackbar-top-left {
|
|
17
|
-
left: var(--iw-
|
|
18
|
-
top: var(--iw-space-4);
|
|
30
|
+
left: var(--iw-snackbar-gap);
|
|
19
31
|
}
|
|
20
32
|
|
|
33
|
+
.iw-snackbar-bottom-right,
|
|
21
34
|
.iw-snackbar-top-right {
|
|
22
|
-
right: var(--iw-
|
|
23
|
-
|
|
35
|
+
right: var(--iw-snackbar-gap);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Both insets and auto margins: the snackbar is as wide as its content, up
|
|
39
|
+
to the gutters, and centered within them. */
|
|
40
|
+
.iw-snackbar-bottom-center,
|
|
41
|
+
.iw-snackbar-top-center {
|
|
42
|
+
inset-inline: var(--iw-snackbar-gap);
|
|
43
|
+
width: fit-content;
|
|
44
|
+
margin-inline: auto;
|
|
24
45
|
}
|
|
25
46
|
|
|
26
47
|
.iw-snackbar-content {
|
|
@@ -6,10 +6,10 @@
|
|
|
6
6
|
import { html } from "@inglorious/web"
|
|
7
7
|
import { when } from "@inglorious/web/directives/when"
|
|
8
8
|
|
|
9
|
-
import { Button } from "../../controls/button"
|
|
10
|
-
import { Icon } from "../../data-display/icon"
|
|
11
|
-
import { Backdrop } from "../../feedback/backdrop"
|
|
12
|
-
import { Flex } from "../../layout/flex"
|
|
9
|
+
import { Button } from "../../controls/button/index.js"
|
|
10
|
+
import { Icon } from "../../data-display/icon/index.js"
|
|
11
|
+
import { Backdrop } from "../../feedback/backdrop/index.js"
|
|
12
|
+
import { Flex } from "../../layout/flex/index.js"
|
|
13
13
|
import { close, leftPanelClose } from "../../shared/icons.js"
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -6,7 +6,13 @@ export interface SnackbarProps {
|
|
|
6
6
|
isOpen?: boolean
|
|
7
7
|
message?: TemplateResult | string | number
|
|
8
8
|
action?: TemplateResult | string | number
|
|
9
|
-
position?:
|
|
9
|
+
position?:
|
|
10
|
+
| "bottom-left"
|
|
11
|
+
| "bottom-center"
|
|
12
|
+
| "bottom-right"
|
|
13
|
+
| "top-left"
|
|
14
|
+
| "top-center"
|
|
15
|
+
| "top-right"
|
|
10
16
|
className?: string
|
|
11
17
|
onClose?: () => void
|
|
12
18
|
[key: string]: unknown
|