@felfhenor/ui 0.0.0-stage → 0.1.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/assets/fonts/GeistPixel-Square-Tabular.woff2 +0 -0
- package/assets/fonts/GeistPixel-Square.woff2 +0 -0
- package/assets/fonts/Montserrat-Italic-VariableFont_wght.ttf +0 -0
- package/assets/fonts/Montserrat-VariableFont_wght.ttf +0 -0
- package/assets/fonts/input/playstation.woff2 +0 -0
- package/assets/fonts/input/steam-controller.woff2 +0 -0
- package/assets/fonts/input/steam-deck.woff2 +0 -0
- package/assets/fonts/input/switch.woff2 +0 -0
- package/assets/fonts/input/switch2.woff2 +0 -0
- package/assets/fonts/input/xbox.woff2 +0 -0
- package/assets/textures/texture-bg.png +0 -0
- package/assets/textures/texture-button.png +0 -0
- package/fesm2022/felfhenor-ui.mjs +10506 -0
- package/fesm2022/felfhenor-ui.mjs.map +1 -0
- package/package.json +42 -4
- package/styles/ff-base.scss +279 -0
- package/styles/ff-button-glow.scss +15 -0
- package/styles/ff-fonts.scss +64 -0
- package/styles/ff-input.scss +144 -0
- package/styles/ff-ng-select.scss +46 -0
- package/styles/ff-palette.scss +20 -0
- package/styles/ff-reduce-motion.scss +32 -0
- package/styles/ff-sweetalert2.scss +116 -0
- package/styles/ff-tabs.scss +29 -0
- package/styles/ff-theme.scss +56 -0
- package/styles/ff-toastr.scss +82 -0
- package/types/felfhenor-ui.d.ts +4322 -0
- package/README.md +0 -3
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// Recolors SweetAlert2 to match the game's parchment/plaque look instead of its flat default theme.
|
|
2
|
+
// Most of the library's chrome is driven by --swal2-* custom properties, so
|
|
3
|
+
// most of this is variable overrides; a few colors (icons, validation message)
|
|
4
|
+
// are hardcoded in the library and need direct selector overrides instead.
|
|
5
|
+
:root {
|
|
6
|
+
--swal2-backdrop: rgba(0, 0, 0, 0.6);
|
|
7
|
+
--swal2-width: 30em;
|
|
8
|
+
--swal2-border: 2px solid var(--color-base-300);
|
|
9
|
+
--swal2-border-radius: 0rem;
|
|
10
|
+
--swal2-title-padding: 0.9em 1.4em 0;
|
|
11
|
+
--swal2-html-container-padding: 1em 1.6em 0.3em;
|
|
12
|
+
--swal2-actions-margin: 1.5em auto 0;
|
|
13
|
+
|
|
14
|
+
--swal2-input-background: var(--color-base-200);
|
|
15
|
+
--swal2-input-border: 1px solid var(--color-base-300);
|
|
16
|
+
--swal2-input-focus-border: 1px solid var(--color-primary);
|
|
17
|
+
--swal2-input-focus-box-shadow:
|
|
18
|
+
inset 0 1px 1px rgba(0, 0, 0, 0.2),
|
|
19
|
+
0 0 0 3px color-mix(in oklab, var(--color-primary) 40%, transparent);
|
|
20
|
+
|
|
21
|
+
--swal2-footer-border-color: var(--color-base-300);
|
|
22
|
+
--swal2-footer-background: transparent;
|
|
23
|
+
--swal2-footer-color: var(--color-base-content);
|
|
24
|
+
|
|
25
|
+
--swal2-validation-message-background: var(--color-error);
|
|
26
|
+
--swal2-validation-message-color: var(--color-error-content);
|
|
27
|
+
|
|
28
|
+
--swal2-close-button-color: var(--color-base-content);
|
|
29
|
+
--swal2-timer-progress-bar-background: color-mix(
|
|
30
|
+
in oklab,
|
|
31
|
+
var(--color-primary) 60%,
|
|
32
|
+
transparent
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.swal2-popup {
|
|
37
|
+
background-color: var(--color-base-300);
|
|
38
|
+
background-image: var(--ff-texture-bg);
|
|
39
|
+
background-repeat: repeat;
|
|
40
|
+
color: var(--color-base-content);
|
|
41
|
+
box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.swal2-title {
|
|
45
|
+
font-family: var(--font-fancy);
|
|
46
|
+
font-size: 1.5rem;
|
|
47
|
+
letter-spacing: 0.5px;
|
|
48
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.swal2-html-container {
|
|
52
|
+
color: var(--color-base-content);
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.swal2-close:hover {
|
|
56
|
+
color: var(--color-error);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
div:where(.swal2-container) div:where(.swal2-validation-message)::before {
|
|
60
|
+
background-color: var(--color-error);
|
|
61
|
+
color: var(--color-error-content);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.swal2-error {
|
|
65
|
+
border-color: var(--color-error);
|
|
66
|
+
color: var(--color-error);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.swal2-error [class^='swal2-x-mark-line'] {
|
|
70
|
+
background-color: var(--color-error);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.swal2-warning {
|
|
74
|
+
border-color: var(--color-warning);
|
|
75
|
+
color: var(--color-warning);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.swal2-info {
|
|
79
|
+
border-color: var(--color-info);
|
|
80
|
+
color: var(--color-info);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.swal2-question {
|
|
84
|
+
border-color: var(--color-info);
|
|
85
|
+
color: var(--color-info);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.swal2-success {
|
|
89
|
+
border-color: var(--color-success);
|
|
90
|
+
color: var(--color-success);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.swal2-success .swal2-success-ring {
|
|
94
|
+
border-color: color-mix(in oklab, var(--color-success) 30%, transparent);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.swal2-success [class^='swal2-success-line'] {
|
|
98
|
+
background-color: var(--color-success);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.swal2-actions {
|
|
102
|
+
gap: 4px;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
// Swal sets an inline display on its buttons, which breaks .btn's flex row; restore it so the glyph centers on the label.
|
|
106
|
+
.swal2-actions button:has(.ff-swal-glyph) {
|
|
107
|
+
display: inline-flex !important;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 0.5rem;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
// Pad buttons map to fixed dialog buttons (A/B/X), so a focus ring on one would only mislead.
|
|
113
|
+
html.ff-input-gamepad .swal2-popup :focus {
|
|
114
|
+
outline: none;
|
|
115
|
+
box-shadow: none;
|
|
116
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
// Tab bars render as a row of buttons, with the active tab marked "here" to match the top nav.
|
|
2
|
+
.tabs.tabs-box {
|
|
3
|
+
justify-content: center;
|
|
4
|
+
gap: 0.375rem;
|
|
5
|
+
padding: 0;
|
|
6
|
+
background: transparent;
|
|
7
|
+
box-shadow: none;
|
|
8
|
+
|
|
9
|
+
> .tab {
|
|
10
|
+
height: 2rem;
|
|
11
|
+
padding-inline: 0.875rem;
|
|
12
|
+
border: 1px solid
|
|
13
|
+
color-mix(in oklab, var(--color-base-content) 30%, transparent);
|
|
14
|
+
border-radius: var(--radius-field);
|
|
15
|
+
background: var(--color-base-200);
|
|
16
|
+
color: color-mix(in oklab, var(--color-base-content) 85%, transparent);
|
|
17
|
+
opacity: 1;
|
|
18
|
+
|
|
19
|
+
&:hover:not(.tab-active) {
|
|
20
|
+
border-color: var(--color-primary);
|
|
21
|
+
color: var(--color-base-content);
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
&.tab-active {
|
|
25
|
+
@apply here;
|
|
26
|
+
box-shadow: none;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
// Required base: daisyUI, library tokens and the textured card/button look. Colors come from ff-palette or any daisyUI theme.
|
|
2
|
+
|
|
3
|
+
@plugin "daisyui" {
|
|
4
|
+
themes: dark --default;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@theme static {
|
|
8
|
+
--color-attention: oklch(83% 0.16 84);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
body {
|
|
12
|
+
--swal2-border-radius: 0;
|
|
13
|
+
--swal2-input-border-radius: 0;
|
|
14
|
+
--radius-field: 0;
|
|
15
|
+
--radius-box: 0;
|
|
16
|
+
--radius-selector: 0;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
:root {
|
|
20
|
+
--ff-texture-bg: url(/ff/textures/texture-bg.png);
|
|
21
|
+
--ff-texture-button: url(/ff/textures/texture-button.png);
|
|
22
|
+
--ff-glow-color: rgb(251 191 36);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
.card:not(.card-untextured) {
|
|
26
|
+
--bg-color: var(--color-base-300);
|
|
27
|
+
|
|
28
|
+
background:
|
|
29
|
+
var(--ff-texture-bg),
|
|
30
|
+
linear-gradient(to bottom, var(--bg-color), var(--bg-color));
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// The texture ignores bg-* classes; a card nested in a page card is a section, one surface step lighter.
|
|
34
|
+
.card .card:not(.card-untextured) {
|
|
35
|
+
--bg-color: var(--color-base-100);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.btn:not(.btn-untextured):not(.btn-outline):not(.btn-debug):not(.here):not(
|
|
39
|
+
:disabled,
|
|
40
|
+
[disabled],
|
|
41
|
+
.btn-disabled
|
|
42
|
+
) {
|
|
43
|
+
background:
|
|
44
|
+
var(--ff-texture-button),
|
|
45
|
+
linear-gradient(to bottom, var(--btn-color), var(--btn-color)) !important;
|
|
46
|
+
|
|
47
|
+
&:hover {
|
|
48
|
+
background:
|
|
49
|
+
var(--ff-texture-button),
|
|
50
|
+
linear-gradient(
|
|
51
|
+
to bottom,
|
|
52
|
+
color-mix(in oklab, var(--btn-color) 90%, black),
|
|
53
|
+
color-mix(in oklab, var(--btn-color) 90%, black)
|
|
54
|
+
) !important;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
// Recolors ngx-toastr to match the game's parchment/plaque look instead of ngx-toastr's flat default colors.
|
|
2
|
+
$toast-types: (
|
|
3
|
+
('success', '✦'),
|
|
4
|
+
('error', '⚔'),
|
|
5
|
+
('warning', '⚠'),
|
|
6
|
+
('info', 'ℹ')
|
|
7
|
+
);
|
|
8
|
+
|
|
9
|
+
.toast-container .ngx-toastr {
|
|
10
|
+
--toast-accent: var(--color-base-content);
|
|
11
|
+
|
|
12
|
+
position: relative;
|
|
13
|
+
width: 320px;
|
|
14
|
+
padding: 16px 16px 16px 54px;
|
|
15
|
+
border: 2px solid color-mix(in oklab, var(--toast-accent) 70%, black);
|
|
16
|
+
border-radius: 0;
|
|
17
|
+
background-color: var(--color-base-300);
|
|
18
|
+
background-image: var(--ff-texture-bg);
|
|
19
|
+
background-position: 0 0;
|
|
20
|
+
background-repeat: repeat;
|
|
21
|
+
background-size: auto;
|
|
22
|
+
box-shadow:
|
|
23
|
+
0 4px 12px rgba(0, 0, 0, 0.5),
|
|
24
|
+
0 0 10px 1px color-mix(in oklab, var(--toast-accent) 55%, transparent);
|
|
25
|
+
color: var(--color-base-content);
|
|
26
|
+
|
|
27
|
+
&:hover {
|
|
28
|
+
box-shadow:
|
|
29
|
+
0 4px 16px rgba(0, 0, 0, 0.65),
|
|
30
|
+
0 0 14px 2px color-mix(in oklab, var(--toast-accent) 65%, transparent);
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
&::before {
|
|
34
|
+
position: absolute;
|
|
35
|
+
top: 50%;
|
|
36
|
+
left: 16px;
|
|
37
|
+
transform: translateY(-50%);
|
|
38
|
+
font-size: 1.5rem;
|
|
39
|
+
line-height: 1;
|
|
40
|
+
color: var(--toast-accent);
|
|
41
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
.toast-title {
|
|
46
|
+
font-family: var(--font-fancy);
|
|
47
|
+
font-size: 1.25rem;
|
|
48
|
+
letter-spacing: 0.5px;
|
|
49
|
+
text-shadow: 0 1px 1px rgba(0, 0, 0, 0.4);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.toast-message {
|
|
53
|
+
opacity: 0.9;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.toast-close-button {
|
|
57
|
+
color: var(--color-base-content);
|
|
58
|
+
text-shadow: none;
|
|
59
|
+
opacity: 0.6;
|
|
60
|
+
|
|
61
|
+
&:hover,
|
|
62
|
+
&:focus {
|
|
63
|
+
color: var(--color-base-content);
|
|
64
|
+
opacity: 1;
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.toast-progress {
|
|
69
|
+
height: 3px;
|
|
70
|
+
background-color: var(--toast-accent, var(--color-base-content));
|
|
71
|
+
opacity: 0.8;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
@each $type, $glyph in $toast-types {
|
|
75
|
+
.toast-container .ngx-toastr.toast-#{$type} {
|
|
76
|
+
--toast-accent: var(--color-#{$type});
|
|
77
|
+
|
|
78
|
+
&::before {
|
|
79
|
+
content: '#{$glyph}';
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
}
|