@inglorious/ui 0.1.0 → 1.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/README.md +45 -0
- package/package.json +191 -16
- package/src/all.css +7 -0
- package/src/controls/button/button.stories.js +35 -15
- package/src/controls/button/index.js +1 -3
- package/src/controls/button/style.css +80 -37
- package/src/controls/button/template.js +23 -26
- package/src/controls/button-group/button-group.stories.js +19 -15
- package/src/controls/button-group/index.js +1 -2
- package/src/controls/button-group/style.css +0 -7
- package/src/controls/button-group/template.js +46 -56
- package/src/controls/checkbox/checkbox.stories.js +16 -13
- package/src/controls/checkbox/index.js +1 -2
- package/src/controls/checkbox/style.css +23 -2
- package/src/controls/checkbox/template.js +20 -18
- package/src/controls/combobox/combobox.stories.js +92 -0
- package/src/controls/{select → combobox}/handlers.js +8 -5
- package/src/controls/combobox/helpers.js +91 -0
- package/src/controls/combobox/index.js +43 -0
- package/src/controls/combobox/style.css +203 -0
- package/src/controls/combobox/template.js +340 -0
- package/src/controls/controls.css +12 -0
- package/src/controls/fab/fab.stories.js +11 -11
- package/src/controls/fab/index.js +1 -2
- package/src/controls/fab/template.js +21 -19
- package/src/controls/icon-button/icon-button.stories.js +8 -10
- package/src/controls/icon-button/index.js +1 -2
- package/src/controls/icon-button/template.js +13 -19
- package/src/controls/input/index.js +1 -2
- package/src/controls/input/input.stories.js +24 -23
- package/src/controls/input/style.css +9 -7
- package/src/controls/input/template.js +28 -31
- package/src/controls/radio-group/index.js +1 -2
- package/src/controls/radio-group/radio-group.stories.js +11 -8
- package/src/controls/radio-group/style.css +22 -1
- package/src/controls/radio-group/template.js +20 -15
- package/src/controls/rating/index.js +1 -2
- package/src/controls/rating/rating.stories.js +7 -10
- package/src/controls/rating/style.css +1 -2
- package/src/controls/rating/template.js +20 -17
- package/src/controls/select/helpers.js +2 -21
- package/src/controls/select/index.js +1 -13
- package/src/controls/select/select.stories.js +68 -64
- package/src/controls/select/style.css +66 -189
- package/src/controls/select/template.js +77 -406
- package/src/controls/slider/index.js +1 -2
- package/src/controls/slider/slider.stories.js +15 -12
- package/src/controls/slider/style.css +24 -3
- package/src/controls/slider/template.js +30 -23
- package/src/controls/switch/index.js +1 -2
- package/src/controls/switch/style.css +23 -2
- package/src/controls/switch/switch.stories.js +14 -11
- package/src/controls/switch/template.js +18 -16
- package/src/data-display/avatar/avatar.stories.js +106 -0
- package/src/data-display/avatar/index.js +3 -0
- package/src/data-display/avatar/style.css +64 -0
- package/src/data-display/avatar/template.js +81 -0
- package/src/data-display/badge/badge.stories.js +64 -0
- package/src/data-display/badge/index.js +3 -0
- package/src/data-display/badge/style.css +84 -0
- package/src/data-display/badge/template.js +46 -0
- package/src/data-display/chip/chip.stories.js +57 -0
- package/src/data-display/chip/index.js +3 -0
- package/src/data-display/chip/style.css +84 -0
- package/src/data-display/chip/template.js +32 -0
- package/src/data-display/data-display.css +11 -0
- package/src/data-display/data-grid/base.css +58 -0
- package/src/data-display/data-grid/data-grid.stories.js +158 -0
- package/src/data-display/data-grid/filters/helpers.js +8 -0
- package/src/data-display/data-grid/filters/index.js +21 -0
- package/src/data-display/data-grid/filters/input.js +24 -0
- package/src/data-display/data-grid/filters/range.js +48 -0
- package/src/data-display/data-grid/filters/select.js +17 -0
- package/src/data-display/data-grid/handlers.js +523 -0
- package/src/data-display/data-grid/helpers.js +248 -0
- package/src/data-display/data-grid/index.js +64 -0
- package/src/data-display/data-grid/style.css +14 -0
- package/src/data-display/data-grid/template.js +458 -0
- package/src/data-display/data-grid/theme.css +148 -0
- package/src/data-display/divider/divider.stories.js +48 -0
- package/src/data-display/divider/index.js +3 -0
- package/src/data-display/divider/style.css +18 -0
- package/src/data-display/divider/template.js +17 -0
- package/src/data-display/icon/icon-implementations.mdx +160 -0
- package/src/data-display/icon/icon-utf8.stories.js +156 -0
- package/src/data-display/icon/icon.stories.js +38 -0
- package/src/data-display/icon/index.js +3 -0
- package/src/data-display/icon/style.css +17 -0
- package/src/data-display/icon/template.js +19 -0
- package/src/data-display/list/handlers.js +25 -0
- package/src/data-display/list/index.js +4 -0
- package/src/data-display/list/list.stories.js +187 -0
- package/src/data-display/list/style.css +119 -0
- package/src/data-display/list/template.js +302 -0
- package/src/data-display/material-icon/index.js +3 -0
- package/src/data-display/material-icon/material-icon.stories.js +99 -0
- package/src/data-display/material-icon/style.css +27 -0
- package/src/data-display/material-icon/template.js +21 -0
- package/src/data-display/table/index.js +1 -0
- package/src/data-display/table/style.css +42 -0
- package/src/data-display/table/table.stories.js +40 -0
- package/src/data-display/table/template.js +114 -0
- package/src/data-display/tooltip/index.js +3 -0
- package/src/data-display/tooltip/style.css +57 -0
- package/src/data-display/tooltip/template.js +58 -0
- package/src/data-display/tooltip/tooltip.stories.js +44 -0
- package/src/data-display/typography/index.js +3 -0
- package/src/data-display/typography/style.css +49 -0
- package/src/data-display/typography/template.js +110 -0
- package/src/data-display/typography/typography.stories.js +48 -0
- package/src/data-display/virtual-list/handlers.js +68 -0
- package/src/data-display/virtual-list/index.js +4 -0
- package/src/data-display/virtual-list/template.js +101 -0
- package/src/examples/dashboard/app-drawer.js +255 -0
- package/src/examples/dashboard/app-header.js +149 -0
- package/src/examples/dashboard/dashboard.js +85 -0
- package/src/examples/dashboard/dashboard.stories.js +47 -0
- package/src/examples/dashboard/data.js +205 -0
- package/src/examples/dashboard/mode.js +27 -0
- package/src/examples/dashboard/primitive-content.js +1325 -0
- package/src/examples/dashboard/primitive-section.js +158 -0
- package/src/examples/dashboard/router.js +13 -0
- package/src/examples/dashboard/social-card.js +73 -0
- package/src/examples/dashboard/stat-card.js +84 -0
- package/src/examples/dashboard/style.css +339 -0
- package/src/examples/dashboard/theme-utils.js +95 -0
- package/src/examples/dashboard/theme.js +27 -0
- package/src/examples/dashboard/traffic-card.js +108 -0
- package/src/examples/dashboard/traffic-sales-card.js +267 -0
- package/src/feedback/alert/alert.stories.js +70 -0
- package/src/feedback/alert/index.js +3 -0
- package/src/feedback/alert/style.css +98 -0
- package/src/feedback/alert/template.js +74 -0
- package/src/feedback/backdrop/backdrop.stories.js +21 -0
- package/src/feedback/backdrop/index.js +3 -0
- package/src/feedback/backdrop/style.css +25 -0
- package/src/feedback/backdrop/template.js +31 -0
- package/src/feedback/dialog/dialog.stories.js +27 -0
- package/src/feedback/dialog/index.js +3 -0
- package/src/feedback/dialog/style.css +68 -0
- package/src/feedback/dialog/template.js +64 -0
- package/src/feedback/feedback.css +6 -0
- package/src/feedback/progress/index.js +3 -0
- package/src/feedback/progress/progress.stories.js +54 -0
- package/src/feedback/progress/style.css +95 -0
- package/src/feedback/progress/template.js +88 -0
- package/src/feedback/skeleton/index.js +3 -0
- package/src/feedback/skeleton/skeleton.stories.js +44 -0
- package/src/feedback/skeleton/style.css +41 -0
- package/src/feedback/skeleton/template.js +48 -0
- package/src/feedback/snackbar/index.js +3 -0
- package/src/feedback/snackbar/snackbar.stories.js +25 -0
- package/src/feedback/snackbar/style.css +64 -0
- package/src/feedback/snackbar/template.js +55 -0
- package/src/index.js +32 -1
- package/src/layout/container/container.stories.js +105 -0
- package/src/layout/container/index.js +3 -0
- package/src/layout/container/style.css +34 -0
- package/src/layout/container/template.js +119 -0
- package/src/layout/flex/flex.stories.js +28 -10
- package/src/layout/flex/index.js +1 -2
- package/src/layout/flex/style.css +20 -0
- package/src/layout/flex/template.js +40 -13
- package/src/layout/grid/grid.stories.js +46 -30
- package/src/layout/grid/index.js +1 -2
- package/src/layout/grid/style.css +20 -0
- package/src/layout/grid/template.js +100 -20
- package/src/layout/layout.css +3 -0
- package/src/navigation/bottom-navigation/bottom-navigation.stories.js +33 -0
- package/src/navigation/bottom-navigation/index.js +1 -0
- package/src/navigation/bottom-navigation/style.css +32 -0
- package/src/navigation/bottom-navigation/template.js +74 -0
- package/src/navigation/breadcrumbs/breadcrumbs.stories.js +33 -0
- package/src/navigation/breadcrumbs/index.js +1 -0
- package/src/navigation/breadcrumbs/style.css +27 -0
- package/src/navigation/breadcrumbs/template.js +79 -0
- package/src/navigation/drawer/drawer.stories.js +60 -0
- package/src/navigation/drawer/index.js +3 -0
- package/src/navigation/drawer/style.css +125 -0
- package/src/navigation/drawer/template.js +131 -0
- package/src/navigation/link/index.js +3 -0
- package/src/navigation/link/link.stories.js +53 -0
- package/src/navigation/link/style.css +40 -0
- package/src/navigation/link/template.js +53 -0
- package/src/navigation/menu/index.js +1 -0
- package/src/navigation/menu/menu.stories.js +36 -0
- package/src/navigation/menu/style.css +44 -0
- package/src/navigation/menu/template.js +81 -0
- package/src/navigation/navigation.css +9 -0
- package/src/navigation/pagination/index.js +1 -0
- package/src/navigation/pagination/pagination.stories.js +61 -0
- package/src/navigation/pagination/style.css +29 -0
- package/src/navigation/pagination/template.js +140 -0
- package/src/navigation/speed-dial/index.js +1 -0
- package/src/navigation/speed-dial/speed-dial.stories.js +40 -0
- package/src/navigation/speed-dial/style.css +38 -0
- package/src/navigation/speed-dial/template.js +68 -0
- package/src/navigation/stepper/index.js +1 -0
- package/src/navigation/stepper/stepper.stories.js +35 -0
- package/src/navigation/stepper/style.css +49 -0
- package/src/navigation/stepper/template.js +61 -0
- package/src/navigation/tabs/index.js +1 -0
- package/src/navigation/tabs/style.css +35 -0
- package/src/navigation/tabs/tabs.stories.js +40 -0
- package/src/navigation/tabs/template.js +79 -0
- package/src/overview.mdx +39 -0
- package/src/stories/notifyStory.js +22 -25
- package/src/styles/base.css +2 -0
- package/src/styles/reset.css +15 -0
- package/src/{themes → styles/themes}/bootstrap.css +2 -0
- package/src/{themes → styles/themes}/inglorious.css +9 -1
- package/src/{themes → styles/themes}/material.css +2 -0
- package/src/{tokens/index.css → styles/tokens.css} +9 -0
- package/src/surfaces/accordion/accordion.stories.js +60 -0
- package/src/surfaces/accordion/index.js +1 -0
- package/src/surfaces/accordion/style.css +64 -0
- package/src/surfaces/accordion/template.js +85 -0
- package/src/surfaces/app-bar/app-bar.stories.js +109 -0
- package/src/surfaces/app-bar/index.js +3 -0
- package/src/surfaces/app-bar/style.css +109 -0
- package/src/surfaces/app-bar/template.js +78 -0
- package/src/surfaces/card/card.stories.js +108 -0
- package/src/surfaces/card/index.js +1 -0
- package/src/surfaces/card/style.css +107 -0
- package/src/surfaces/card/template.js +163 -0
- package/src/surfaces/paper/index.js +3 -0
- package/src/surfaces/paper/paper.stories.js +97 -0
- package/src/surfaces/paper/style.css +73 -0
- package/src/surfaces/paper/template.js +76 -0
- package/src/surfaces/surfaces.css +4 -0
- package/types/controls/button-group.d.ts +8 -7
- package/types/controls/button.d.ts +10 -7
- package/types/controls/checkbox.d.ts +8 -6
- package/types/controls/combobox.d.ts +66 -0
- package/types/controls/fab.d.ts +6 -5
- package/types/controls/icon-button.d.ts +8 -7
- package/types/controls/input.d.ts +18 -11
- package/types/controls/radio-group.d.ts +7 -5
- package/types/controls/rating.d.ts +6 -5
- package/types/controls/select.d.ts +11 -34
- package/types/controls/slider.d.ts +8 -6
- package/types/controls/switch.d.ts +7 -5
- package/types/data-display/avatar.d.ts +30 -0
- package/types/data-display/badge.d.ts +20 -0
- package/types/data-display/chip.d.ts +25 -0
- package/types/data-display/data-grid.d.ts +151 -0
- package/types/data-display/divider.d.ts +14 -0
- package/types/data-display/icon.d.ts +16 -0
- package/types/data-display/list.d.ts +66 -0
- package/types/data-display/material-icon.d.ts +15 -0
- package/types/data-display/table.d.ts +45 -0
- package/types/data-display/tooltip.d.ts +20 -0
- package/types/data-display/typography.d.ts +28 -0
- package/types/data-display/virtual-list.d.ts +94 -0
- package/types/feedback/alert.d.ts +22 -0
- package/types/feedback/backdrop.d.ts +17 -0
- package/types/feedback/dialog.d.ts +21 -0
- package/types/feedback/progress.d.ts +18 -0
- package/types/feedback/skeleton.d.ts +18 -0
- package/types/feedback/snackbar.d.ts +19 -0
- package/types/index.d.ts +92 -14
- package/types/layout/container.d.ts +28 -0
- package/types/layout/flex.d.ts +16 -5
- package/types/layout/grid.d.ts +15 -4
- package/types/navigation/bottom-navigation.d.ts +33 -0
- package/types/navigation/breadcrumbs.d.ts +29 -0
- package/types/navigation/drawer.d.ts +23 -0
- package/types/navigation/link.d.ts +22 -0
- package/types/navigation/menu.d.ts +32 -0
- package/types/navigation/pagination.d.ts +50 -0
- package/types/navigation/speed-dial.d.ts +35 -0
- package/types/navigation/stepper.d.ts +26 -0
- package/types/navigation/tabs.d.ts +31 -0
- package/types/surfaces/accordion.d.ts +32 -0
- package/types/surfaces/app-bar.d.ts +25 -0
- package/types/surfaces/card.d.ts +39 -0
- package/types/surfaces/paper.d.ts +28 -0
- package/src/shared/withRenderValidation.js +0 -19
- package/src/widgets/card/card.stories.js +0 -135
- package/src/widgets/card/index.js +0 -4
- package/src/widgets/card/style.css +0 -53
- package/src/widgets/card/template.js +0 -97
- package/types/widgets/card.d.ts +0 -21
|
@@ -0,0 +1,205 @@
|
|
|
1
|
+
export const statCards = [
|
|
2
|
+
{
|
|
3
|
+
id: "users",
|
|
4
|
+
label: "Users",
|
|
5
|
+
value: "26K",
|
|
6
|
+
change: "-12.4%",
|
|
7
|
+
direction: "south",
|
|
8
|
+
className: "iw-dashboard-stat-primary",
|
|
9
|
+
chartType: "line",
|
|
10
|
+
data: [65, 59, 84, 84, 51, 55, 40],
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
id: "income",
|
|
14
|
+
label: "Income",
|
|
15
|
+
value: "$6.2K",
|
|
16
|
+
change: "40.9%",
|
|
17
|
+
direction: "north",
|
|
18
|
+
className: "iw-dashboard-stat-info",
|
|
19
|
+
chartType: "line",
|
|
20
|
+
hasDots: true,
|
|
21
|
+
data: [1, 18, 9, 17, 34, 22, 11],
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
id: "conversionRate",
|
|
25
|
+
label: "Conversion Rate",
|
|
26
|
+
value: "2.49%",
|
|
27
|
+
change: "84.7%",
|
|
28
|
+
direction: "north",
|
|
29
|
+
className: "iw-dashboard-stat-warning",
|
|
30
|
+
chartType: "area",
|
|
31
|
+
data: [78, 81, 80, 45, 34, 12, 40],
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
id: "sessions",
|
|
35
|
+
label: "Sessions",
|
|
36
|
+
value: "44K",
|
|
37
|
+
change: "-23.6%",
|
|
38
|
+
direction: "south",
|
|
39
|
+
className: "iw-dashboard-stat-danger",
|
|
40
|
+
chartType: "bar",
|
|
41
|
+
data: [78, 81, 80, 45, 34, 12, 40, 85, 65, 23, 12, 98, 34, 84, 67, 82],
|
|
42
|
+
},
|
|
43
|
+
]
|
|
44
|
+
|
|
45
|
+
export const trafficSeries = [
|
|
46
|
+
{ month: "Jan", visits: 132, unique: 62 },
|
|
47
|
+
{ month: "Feb", visits: 96, unique: 101 },
|
|
48
|
+
{ month: "Mar", visits: 147, unique: 110 },
|
|
49
|
+
{ month: "Apr", visits: 131, unique: 112 },
|
|
50
|
+
{ month: "May", visits: 170, unique: 133 },
|
|
51
|
+
{ month: "Jun", visits: 51, unique: 88 },
|
|
52
|
+
{ month: "Jul", visits: 142, unique: 145 },
|
|
53
|
+
]
|
|
54
|
+
|
|
55
|
+
export const trafficSummary = [
|
|
56
|
+
{
|
|
57
|
+
label: "Visits",
|
|
58
|
+
value: "29.703 Users (40%)",
|
|
59
|
+
progress: 40,
|
|
60
|
+
color: "success",
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
label: "Unique",
|
|
64
|
+
value: "24.093 Users (20%)",
|
|
65
|
+
progress: 20,
|
|
66
|
+
color: "info",
|
|
67
|
+
},
|
|
68
|
+
{
|
|
69
|
+
label: "Pageviews",
|
|
70
|
+
value: "78.706 Views (60%)",
|
|
71
|
+
progress: 60,
|
|
72
|
+
color: "warning",
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
label: "New Users",
|
|
76
|
+
value: "22.123 Users (80%)",
|
|
77
|
+
progress: 80,
|
|
78
|
+
color: "error",
|
|
79
|
+
},
|
|
80
|
+
// { label: "Bounce Rate", value: "40.15%", progress: 40, color: "primary" },
|
|
81
|
+
]
|
|
82
|
+
|
|
83
|
+
export const socialCards = [
|
|
84
|
+
{
|
|
85
|
+
icon: "thumb_up",
|
|
86
|
+
capClass: "iw-dashboard-social-cap-facebook",
|
|
87
|
+
top: "89k",
|
|
88
|
+
bottom: "459",
|
|
89
|
+
topLabel: "friends",
|
|
90
|
+
bottomLabel: "feeds",
|
|
91
|
+
data: [24, 28, 20, 30, 26, 34, 29],
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
icon: "alternate_email",
|
|
95
|
+
capClass: "iw-dashboard-social-cap-twitter",
|
|
96
|
+
top: "973k",
|
|
97
|
+
bottom: "1.792",
|
|
98
|
+
topLabel: "followers",
|
|
99
|
+
bottomLabel: "tweets",
|
|
100
|
+
data: [12, 19, 16, 22, 24, 28, 32],
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
icon: "work",
|
|
104
|
+
capClass: "iw-dashboard-social-cap-linkedin",
|
|
105
|
+
top: "500+",
|
|
106
|
+
bottom: "292",
|
|
107
|
+
topLabel: "contacts",
|
|
108
|
+
bottomLabel: "feeds",
|
|
109
|
+
data: [9, 12, 10, 14, 13, 17, 16],
|
|
110
|
+
},
|
|
111
|
+
]
|
|
112
|
+
|
|
113
|
+
export const clientBars = [
|
|
114
|
+
["Monday", 34, 78],
|
|
115
|
+
["Tuesday", 56, 94],
|
|
116
|
+
["Wednesday", 12, 67],
|
|
117
|
+
["Thursday", 43, 91],
|
|
118
|
+
["Friday", 22, 73],
|
|
119
|
+
["Saturday", 53, 82],
|
|
120
|
+
["Sunday", 9, 69],
|
|
121
|
+
]
|
|
122
|
+
|
|
123
|
+
export const sourceBars = [
|
|
124
|
+
["Male", 43, "person", "warning", "", ""],
|
|
125
|
+
["Female", 37, "person_2", "warning", "", ""],
|
|
126
|
+
["Organic Search", 56, "travel_explore", "success", "191.235", "(56%)"],
|
|
127
|
+
["Facebook", 15, "public", "success", "51.223", "(15%)"],
|
|
128
|
+
["Twitter", 11, "tag", "success", "37.564", "(11%)"],
|
|
129
|
+
["LinkedIn", 8, "business_center", "success", "27.319", "(8%)"],
|
|
130
|
+
]
|
|
131
|
+
|
|
132
|
+
export const userRows = [
|
|
133
|
+
{
|
|
134
|
+
id: 1,
|
|
135
|
+
initials: "YA",
|
|
136
|
+
status: "success",
|
|
137
|
+
name: "Yiorgos Avraamu",
|
|
138
|
+
subtitle: "New | Registered: Jan 1, 2023",
|
|
139
|
+
country: "🇺🇸",
|
|
140
|
+
usage: 50,
|
|
141
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
142
|
+
payment: "cc-mastercard",
|
|
143
|
+
activity: "10 sec ago",
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
id: 2,
|
|
147
|
+
initials: "AT",
|
|
148
|
+
status: "error",
|
|
149
|
+
name: "Avram Tarasios",
|
|
150
|
+
subtitle: "Recurring | Registered: Jan 1, 2023",
|
|
151
|
+
country: "🇧🇷",
|
|
152
|
+
usage: 10,
|
|
153
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
154
|
+
payment: "cc-visa",
|
|
155
|
+
activity: "5 minutes ago",
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
id: 3,
|
|
159
|
+
initials: "QE",
|
|
160
|
+
status: "warning",
|
|
161
|
+
name: "Quintin Ed",
|
|
162
|
+
subtitle: "New | Registered: Jan 1, 2023",
|
|
163
|
+
country: "🇮🇳",
|
|
164
|
+
usage: 74,
|
|
165
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
166
|
+
payment: "cc-stripe",
|
|
167
|
+
activity: "1 hour ago",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
id: 4,
|
|
171
|
+
initials: "EK",
|
|
172
|
+
status: "secondary",
|
|
173
|
+
name: "Eneas Kwadwo",
|
|
174
|
+
subtitle: "New | Registered: Jan 1, 2023",
|
|
175
|
+
country: "🇫🇷",
|
|
176
|
+
usage: 98,
|
|
177
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
178
|
+
payment: "cc-paypal",
|
|
179
|
+
activity: "Last month",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
id: 5,
|
|
183
|
+
initials: "AT",
|
|
184
|
+
status: "success",
|
|
185
|
+
name: "Agapetus Tadeáš",
|
|
186
|
+
subtitle: "New | Registered: Jan 1, 2023",
|
|
187
|
+
country: "🇪🇸",
|
|
188
|
+
usage: 22,
|
|
189
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
190
|
+
payment: "cc-apple-pay",
|
|
191
|
+
activity: "Last week",
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
id: 6,
|
|
195
|
+
initials: "FD",
|
|
196
|
+
status: "error",
|
|
197
|
+
name: "Friderik Dávid",
|
|
198
|
+
subtitle: "New | Registered: Jan 1, 2023",
|
|
199
|
+
country: "🇵🇱",
|
|
200
|
+
usage: 43,
|
|
201
|
+
range: "Jun 11, 2023 - Jul 10, 2023",
|
|
202
|
+
payment: "cc-amex",
|
|
203
|
+
activity: "Yesterday",
|
|
204
|
+
},
|
|
205
|
+
]
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import {
|
|
2
|
+
applyTheme,
|
|
3
|
+
DEFAULTS,
|
|
4
|
+
getMode,
|
|
5
|
+
getTheme,
|
|
6
|
+
nextMode,
|
|
7
|
+
} from "./theme-utils.js"
|
|
8
|
+
|
|
9
|
+
export const mode = {
|
|
10
|
+
create(entity) {
|
|
11
|
+
entity.mode ??= DEFAULTS.mode
|
|
12
|
+
applyTheme(getTheme(), entity.mode)
|
|
13
|
+
},
|
|
14
|
+
|
|
15
|
+
set(entity, payload = {}) {
|
|
16
|
+
const next = payload.mode ?? entity.mode ?? DEFAULTS.mode
|
|
17
|
+
entity.mode = next
|
|
18
|
+
applyTheme(getTheme(), next)
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
toggle(entity) {
|
|
22
|
+
const activeMode = entity.mode ?? getMode()
|
|
23
|
+
const next = nextMode(activeMode)
|
|
24
|
+
entity.mode = next
|
|
25
|
+
applyTheme(getTheme(), next)
|
|
26
|
+
},
|
|
27
|
+
}
|