@inglorious/ui 8.1.1 → 8.2.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 +3 -3
- package/src/controls/button/style.css +2 -0
- package/src/data-display/table/style.css +9 -0
- package/src/data-display/table/table.stories.js +5 -0
- package/src/data-display/table/template.js +2 -0
- package/src/examples/dashboard/social-card.js +2 -2
- package/src/examples/dashboard/stat-card.js +5 -9
- package/src/examples/dashboard/traffic-card.js +14 -7
- package/src/feedback/progress/template.js +1 -0
- package/src/navigation/tabs/style.css +2 -0
- package/src/styles/themes/material.css +4 -0
- package/src/styles/tokens.css +4 -0
- package/types/controls/button-group.d.ts +16 -2
- package/types/controls/button.d.ts +8 -1
- package/types/controls/fab.d.ts +8 -1
- package/types/controls/icon-button.d.ts +8 -1
- package/types/data-display/table.d.ts +1 -0
- package/types/data-display/tooltip.d.ts +1 -1
- package/types/feedback/progress.d.ts +8 -0
- package/types/navigation/tabs.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@inglorious/ui",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.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",
|
|
@@ -310,8 +310,8 @@
|
|
|
310
310
|
"@iconify-icons/fa7-regular": "^2.0.0",
|
|
311
311
|
"@iconify-icons/fa7-solid": "^2.0.0",
|
|
312
312
|
"@iconify-icons/material-symbols": "^2.0.6",
|
|
313
|
-
"@inglorious/charts": "
|
|
314
|
-
"@inglorious/eslint-config": "1.1.
|
|
313
|
+
"@inglorious/charts": "11.1.0",
|
|
314
|
+
"@inglorious/eslint-config": "1.1.3",
|
|
315
315
|
"@inglorious/store": "11.0.4",
|
|
316
316
|
"@inglorious/vite-plugin-jsx": "2.0.4",
|
|
317
317
|
"@inglorious/vite-plugin-vue": "1.0.5",
|
|
@@ -8,6 +8,8 @@
|
|
|
8
8
|
font-size: var(--iw-font-size-base);
|
|
9
9
|
font-weight: var(--iw-font-weight-normal);
|
|
10
10
|
line-height: var(--iw-line-height-normal);
|
|
11
|
+
text-transform: var(--iw-label-text-transform);
|
|
12
|
+
letter-spacing: var(--iw-label-letter-spacing);
|
|
11
13
|
text-decoration: none;
|
|
12
14
|
white-space: nowrap;
|
|
13
15
|
cursor: pointer;
|
|
@@ -10,6 +10,11 @@ export default {
|
|
|
10
10
|
rows: { control: "object", description: "Row records." },
|
|
11
11
|
isFullWidth: { control: "boolean", description: "Stretch table width." },
|
|
12
12
|
isStriped: { control: "boolean", description: "Enable zebra rows." },
|
|
13
|
+
isWrapping: {
|
|
14
|
+
control: "boolean",
|
|
15
|
+
description:
|
|
16
|
+
"Wrap cell content to fit the container instead of scrolling.",
|
|
17
|
+
},
|
|
13
18
|
onRowClick: { action: "onRowClick" },
|
|
14
19
|
},
|
|
15
20
|
parameters: {
|
|
@@ -37,6 +37,7 @@ export const Table = {
|
|
|
37
37
|
rows = [],
|
|
38
38
|
isFullWidth = false,
|
|
39
39
|
isStriped = false,
|
|
40
|
+
isWrapping = false,
|
|
40
41
|
onRowClick,
|
|
41
42
|
...rest
|
|
42
43
|
} = props
|
|
@@ -45,6 +46,7 @@ export const Table = {
|
|
|
45
46
|
"iw-table": true,
|
|
46
47
|
"iw-table-full-width": isFullWidth,
|
|
47
48
|
"iw-table-striped": isStriped,
|
|
49
|
+
"iw-table-wrapping": isWrapping,
|
|
48
50
|
}
|
|
49
51
|
|
|
50
52
|
return html`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Chart } from "@inglorious/charts"
|
|
1
|
+
import { Area, Chart } from "@inglorious/charts"
|
|
2
2
|
import { html } from "@inglorious/web"
|
|
3
3
|
|
|
4
4
|
import { Divider } from "../../data-display/divider"
|
|
@@ -55,7 +55,7 @@ export const SocialCard = {
|
|
|
55
55
|
height: 200,
|
|
56
56
|
padding: 0,
|
|
57
57
|
children: [
|
|
58
|
-
|
|
58
|
+
Area({
|
|
59
59
|
dataKey: "value",
|
|
60
60
|
stroke: "rgba(255,255,255,0.9)",
|
|
61
61
|
fill: "rgba(255,255,255,0.35)",
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import moreVertOutline from "@iconify-icons/material-symbols/more-vert-outline"
|
|
2
|
-
import { Chart } from "@inglorious/charts"
|
|
2
|
+
import { Area, Bar, Chart, Dots, Line } from "@inglorious/charts"
|
|
3
3
|
import { html } from "@inglorious/web"
|
|
4
4
|
|
|
5
5
|
import { Button } from "../../controls/button"
|
|
@@ -66,20 +66,16 @@ export const StatCard = {
|
|
|
66
66
|
const children = []
|
|
67
67
|
|
|
68
68
|
if (entity.chartType === "area") {
|
|
69
|
-
children.push(
|
|
70
|
-
Chart.Area({ dataKey: "value", fill: "rgba(255,255,255,0.3)" }),
|
|
71
|
-
)
|
|
69
|
+
children.push(Area({ dataKey: "value", fill: "rgba(255,255,255,0.3)" }))
|
|
72
70
|
} else if (entity.chartType === "bar") {
|
|
73
|
-
children.push(
|
|
74
|
-
Chart.Bar({ dataKey: "value", fill: "rgba(255,255,255,0.3)" }),
|
|
75
|
-
)
|
|
71
|
+
children.push(Bar({ dataKey: "value", fill: "rgba(255,255,255,0.3)" }))
|
|
76
72
|
} else if (entity.chartType === "line") {
|
|
77
|
-
children.push(
|
|
73
|
+
children.push(Line({ dataKey: "value", stroke: "white" }))
|
|
78
74
|
}
|
|
79
75
|
|
|
80
76
|
if (entity.hasDots) {
|
|
81
77
|
children.push(
|
|
82
|
-
|
|
78
|
+
Dots({ dataKey: "value", stroke: "white", fill: "#39a2f1" }),
|
|
83
79
|
)
|
|
84
80
|
}
|
|
85
81
|
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import downloadOutline from "@iconify-icons/material-symbols/download-outline"
|
|
2
|
-
import {
|
|
2
|
+
import {
|
|
3
|
+
Area,
|
|
4
|
+
CartesianGrid,
|
|
5
|
+
Chart,
|
|
6
|
+
Tooltip,
|
|
7
|
+
XAxis,
|
|
8
|
+
YAxis,
|
|
9
|
+
} from "@inglorious/charts"
|
|
3
10
|
import { html } from "@inglorious/web"
|
|
4
11
|
|
|
5
12
|
import { Button } from "../../controls/button"
|
|
@@ -94,15 +101,15 @@ export const TrafficCard = {
|
|
|
94
101
|
height: 320,
|
|
95
102
|
dataKeys: ["visits", "unique"],
|
|
96
103
|
children: [
|
|
97
|
-
|
|
104
|
+
CartesianGrid({
|
|
98
105
|
stroke: "rgba(255,255,255,0.08)",
|
|
99
106
|
strokeDasharray: "4 4",
|
|
100
107
|
}),
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
108
|
+
XAxis({ dataKey: "month" }),
|
|
109
|
+
YAxis(),
|
|
110
|
+
Area({ dataKey: "visits", stroke: "#39a2f1", strokeWidth: 3 }),
|
|
111
|
+
Area({ dataKey: "unique", stroke: "#2eb85c", strokeWidth: 3 }),
|
|
112
|
+
Tooltip({}),
|
|
106
113
|
],
|
|
107
114
|
},
|
|
108
115
|
api,
|
|
@@ -33,6 +33,10 @@
|
|
|
33
33
|
--iw-color-accent-hover: #c2185b;
|
|
34
34
|
--iw-color-accent-active: #ad1457;
|
|
35
35
|
|
|
36
|
+
/* Buttons and tabs carry their labels in capitals, as Material does. */
|
|
37
|
+
--iw-label-text-transform: uppercase;
|
|
38
|
+
--iw-label-letter-spacing: 0.06em;
|
|
39
|
+
|
|
36
40
|
/* ========================================
|
|
37
41
|
COMPONENT TOKENS
|
|
38
42
|
======================================== */
|
package/src/styles/tokens.css
CHANGED
|
@@ -125,6 +125,10 @@
|
|
|
125
125
|
--iw-line-height-normal: 1.5;
|
|
126
126
|
--iw-line-height-relaxed: 1.75;
|
|
127
127
|
|
|
128
|
+
/* Labels of buttons and tabs: a theme can set them in capitals. */
|
|
129
|
+
--iw-label-text-transform: none;
|
|
130
|
+
--iw-label-letter-spacing: normal;
|
|
131
|
+
|
|
128
132
|
/* ========================================
|
|
129
133
|
SHADOWS
|
|
130
134
|
======================================== */
|
|
@@ -7,7 +7,14 @@ export interface ButtonGroupItem {
|
|
|
7
7
|
children?: TemplateResult | string | number
|
|
8
8
|
isDisabled?: boolean
|
|
9
9
|
variant?: "default" | "outline" | "ghost"
|
|
10
|
-
color?:
|
|
10
|
+
color?:
|
|
11
|
+
| "default"
|
|
12
|
+
| "primary"
|
|
13
|
+
| "secondary"
|
|
14
|
+
| "success"
|
|
15
|
+
| "warning"
|
|
16
|
+
| "error"
|
|
17
|
+
| "info"
|
|
11
18
|
size?: "sm" | "md" | "lg"
|
|
12
19
|
icon?: string
|
|
13
20
|
iconAfter?: string
|
|
@@ -23,7 +30,14 @@ export interface ButtonGroupProps {
|
|
|
23
30
|
isAttached?: boolean
|
|
24
31
|
size?: "sm" | "md" | "lg"
|
|
25
32
|
variant?: "default" | "outline" | "ghost"
|
|
26
|
-
color?:
|
|
33
|
+
color?:
|
|
34
|
+
| "default"
|
|
35
|
+
| "primary"
|
|
36
|
+
| "secondary"
|
|
37
|
+
| "success"
|
|
38
|
+
| "warning"
|
|
39
|
+
| "error"
|
|
40
|
+
| "info"
|
|
27
41
|
isDisabled?: boolean
|
|
28
42
|
onChange?: (value?: string | string[]) => void
|
|
29
43
|
[key: string]: unknown
|
|
@@ -5,7 +5,14 @@ export interface ButtonProps {
|
|
|
5
5
|
type: "Button"
|
|
6
6
|
children?: TemplateResult | string | number
|
|
7
7
|
variant?: "default" | "outline" | "ghost"
|
|
8
|
-
color?:
|
|
8
|
+
color?:
|
|
9
|
+
| "default"
|
|
10
|
+
| "primary"
|
|
11
|
+
| "secondary"
|
|
12
|
+
| "success"
|
|
13
|
+
| "warning"
|
|
14
|
+
| "error"
|
|
15
|
+
| "info"
|
|
9
16
|
size?: "sm" | "md" | "lg"
|
|
10
17
|
shape?: "rectangle" | "pill" | "round" | "square"
|
|
11
18
|
isDisabled?: boolean
|
package/types/controls/fab.d.ts
CHANGED
|
@@ -3,7 +3,14 @@ import type { TemplateResult } from "@inglorious/web"
|
|
|
3
3
|
export interface FabProps {
|
|
4
4
|
id?: string
|
|
5
5
|
children?: TemplateResult | string | number
|
|
6
|
-
color?:
|
|
6
|
+
color?:
|
|
7
|
+
| "default"
|
|
8
|
+
| "primary"
|
|
9
|
+
| "secondary"
|
|
10
|
+
| "success"
|
|
11
|
+
| "warning"
|
|
12
|
+
| "error"
|
|
13
|
+
| "info"
|
|
7
14
|
size?: "sm" | "md" | "lg"
|
|
8
15
|
isDisabled?: boolean
|
|
9
16
|
type?: "button" | "submit" | "reset" | "menu"
|
|
@@ -9,7 +9,14 @@ export interface IconButtonProps {
|
|
|
9
9
|
direction?: "row" | "column"
|
|
10
10
|
ariaLabel?: string
|
|
11
11
|
variant?: "default" | "outline" | "ghost"
|
|
12
|
-
color?:
|
|
12
|
+
color?:
|
|
13
|
+
| "default"
|
|
14
|
+
| "primary"
|
|
15
|
+
| "secondary"
|
|
16
|
+
| "success"
|
|
17
|
+
| "warning"
|
|
18
|
+
| "error"
|
|
19
|
+
| "info"
|
|
13
20
|
size?: "sm" | "md" | "lg"
|
|
14
21
|
isDisabled?: boolean
|
|
15
22
|
isFullWidth?: boolean
|
|
@@ -5,6 +5,14 @@ export interface ProgressProps {
|
|
|
5
5
|
type?: string
|
|
6
6
|
variant?: "linear" | "circular"
|
|
7
7
|
value?: number
|
|
8
|
+
color?:
|
|
9
|
+
| "default"
|
|
10
|
+
| "primary"
|
|
11
|
+
| "secondary"
|
|
12
|
+
| "success"
|
|
13
|
+
| "warning"
|
|
14
|
+
| "error"
|
|
15
|
+
| "info"
|
|
8
16
|
size?: number
|
|
9
17
|
thickness?: number
|
|
10
18
|
className?: string
|