@rpgjs/ui-css 5.0.0-alpha.30

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.
@@ -0,0 +1,190 @@
1
+ .rpg-ui-dialog-container {
2
+ display: flex;
3
+ width: 100%;
4
+ height: 100%;
5
+ padding: 24px;
6
+ box-sizing: border-box;
7
+ justify-content: center;
8
+ align-items: flex-end;
9
+ }
10
+
11
+ .rpg-ui-dialog-container[data-position="top"] {
12
+ align-items: flex-start;
13
+ }
14
+
15
+ .rpg-ui-dialog-container[data-position="middle"] {
16
+ align-items: center;
17
+ }
18
+
19
+ .rpg-ui-dialog-container[data-position="bottom"] {
20
+ align-items: flex-end;
21
+ }
22
+
23
+ .rpg-ui-dialog-container[data-full-width="true"] .rpg-ui-dialog {
24
+ width: 100%;
25
+ }
26
+
27
+ .rpg-ui-dialog-container[data-full-width="false"] .rpg-ui-dialog {
28
+ margin-left: auto;
29
+ margin-right: auto;
30
+ }
31
+
32
+ .rpg-ui-dialog {
33
+ background: var(--rpg-ui-surface);
34
+ border: 4px solid var(--rpg-ui-border);
35
+ border-radius: var(--rpg-ui-radius-lg);
36
+ padding: 24px;
37
+ position: relative;
38
+ box-shadow: var(--rpg-ui-shadow-lg);
39
+ min-height: 256px;
40
+ display: flex;
41
+ flex-direction: column;
42
+ margin-top: 24px;
43
+ }
44
+
45
+ .rpg-ui-dialog-speaker {
46
+ position: absolute;
47
+ top: -20px;
48
+ left: 24px;
49
+ background: var(--rpg-ui-border-dark);
50
+ color: var(--rpg-ui-accent);
51
+ border: 2px solid var(--rpg-ui-border);
52
+ padding: 4px 16px;
53
+ border-radius: var(--rpg-ui-radius-sm);
54
+ font-weight: bold;
55
+ font-size: var(--rpg-ui-font-size-lg);
56
+ text-transform: uppercase;
57
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
58
+ z-index: 10;
59
+ }
60
+
61
+ .rpg-ui-dialog-content {
62
+ flex: 1;
63
+ min-width: 0;
64
+ font-size: var(--rpg-ui-font-size-lg);
65
+ line-height: 1.6;
66
+ color: var(--rpg-ui-text);
67
+ text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.5);
68
+ text-align: left;
69
+ }
70
+
71
+ .rpg-ui-dialog-choices {
72
+ margin-top: 16px;
73
+ display: flex;
74
+ flex-direction: column;
75
+ gap: 8px;
76
+ }
77
+
78
+ .rpg-ui-dialog-choice {
79
+ position: relative;
80
+ padding: 6px 12px 6px 28px;
81
+ border-radius: var(--rpg-ui-radius-sm);
82
+ cursor: pointer;
83
+ color: var(--rpg-ui-text);
84
+ outline: none;
85
+ }
86
+
87
+ .rpg-ui-dialog-choice::before {
88
+ content: "";
89
+ position: absolute;
90
+ left: 8px;
91
+ top: 50%;
92
+ width: 10px;
93
+ height: 10px;
94
+ transform: translateY(-50%);
95
+ border-radius: 50%;
96
+ background: transparent;
97
+ box-shadow: none;
98
+ }
99
+
100
+ .rpg-ui-dialog-choice.active,
101
+ .rpg-ui-dialog-choice:focus {
102
+ background: rgba(0, 0, 0, 0.35);
103
+ box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
104
+ }
105
+
106
+ .rpg-ui-dialog-choice.active::before,
107
+ .rpg-ui-dialog-choice:focus::before {
108
+ background: var(--rpg-ui-accent);
109
+ box-shadow: 0 0 10px rgba(0, 229, 255, 0.6);
110
+ }
111
+
112
+ .rpg-ui-dialog-body {
113
+ display: flex;
114
+ gap: 16px;
115
+ align-items: flex-start;
116
+ justify-content: flex-start;
117
+ flex-direction: row;
118
+ flex-wrap: nowrap;
119
+ min-height: 128px;
120
+ width: 100%;
121
+ }
122
+
123
+ .rpg-ui-dialog-face {
124
+ flex: 0 0 auto;
125
+ width: 96px;
126
+ height: 96px;
127
+ align-self: flex-start;
128
+ border-radius: var(--rpg-ui-radius-sm);
129
+ overflow: hidden;
130
+ background: var(--rpg-ui-border-dark);
131
+ border: 2px solid var(--rpg-ui-border);
132
+ box-shadow: var(--rpg-ui-shadow);
133
+ display: flex;
134
+ align-items: center;
135
+ justify-content: center;
136
+ }
137
+
138
+ .rpg-ui-dialog-face > * {
139
+ width: 100%;
140
+ height: 100%;
141
+ object-fit: cover;
142
+ }
143
+
144
+ .rpg-ui-dialog-indicator {
145
+ position: absolute;
146
+ bottom: 16px;
147
+ left: 50%;
148
+ transform: translateX(-50%);
149
+ width: 18px;
150
+ height: 12px;
151
+ border-left: 9px solid transparent;
152
+ border-right: 9px solid transparent;
153
+ border-top: 12px solid var(--rpg-ui-accent);
154
+ filter: drop-shadow(0 0 6px rgba(0, 229, 255, 0.6));
155
+ animation: rpg-dialog-bounce 1s infinite;
156
+ }
157
+
158
+ @keyframes rpg-dialog-bounce {
159
+ 0%,
160
+ 100% {
161
+ transform: translateX(-50%) translateY(0);
162
+ opacity: 0.7;
163
+ }
164
+ 50% {
165
+ transform: translateX(-50%) translateY(6px);
166
+ opacity: 1;
167
+ }
168
+ }
169
+
170
+ /* Portrait integration (optional) */
171
+ .rpg-ui-dialog-portrait {
172
+ position: absolute;
173
+ bottom: 100%;
174
+ left: -10px;
175
+ width: 96px;
176
+ height: 96px;
177
+ background: var(--rpg-ui-surface);
178
+ border: 4px solid var(--rpg-ui-border);
179
+ box-shadow: var(--rpg-ui-shadow);
180
+ display: none;
181
+ /* Hidden by default */
182
+ }
183
+
184
+ .rpg-ui-dialog[data-has-portrait="true"] {
185
+ margin-left: 48px;
186
+ }
187
+
188
+ .rpg-ui-dialog[data-has-portrait="true"] .rpg-ui-dialog-portrait {
189
+ display: block;
190
+ }
@@ -0,0 +1,115 @@
1
+ .rpg-ui-gameover-screen {
2
+ position: relative;
3
+ width: 100%;
4
+ height: 100%;
5
+ display: flex;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ justify-content: center;
9
+ gap: calc(var(--rpg-ui-spacing-lg) * 1.4);
10
+ padding: calc(var(--rpg-ui-spacing-lg) * 1.5);
11
+ text-align: center;
12
+ color: var(--rpg-ui-text);
13
+ background-color: var(--rpg-ui-bg);
14
+ background-image:
15
+ radial-gradient(circle at 20% 25%, rgba(220, 53, 69, 0.18), transparent 45%),
16
+ radial-gradient(circle at 80% 15%, rgba(220, 53, 69, 0.12), transparent 50%),
17
+ linear-gradient(180deg, rgba(0, 0, 0, 0.45), rgba(0, 0, 0, 0.85));
18
+ overflow: hidden;
19
+ }
20
+
21
+ .rpg-ui-gameover-splatter {
22
+ position: absolute;
23
+ border-radius: 50%;
24
+ background: radial-gradient(circle, rgba(111, 0, 0, 0.8) 0%, transparent 70%);
25
+ opacity: 0.6;
26
+ z-index: 0;
27
+ }
28
+
29
+ .rpg-ui-gameover-splatter-left {
30
+ top: 18%;
31
+ left: 22%;
32
+ width: 280px;
33
+ height: 280px;
34
+ }
35
+
36
+ .rpg-ui-gameover-splatter-right {
37
+ bottom: 8%;
38
+ right: 18%;
39
+ width: 360px;
40
+ height: 360px;
41
+ }
42
+
43
+ .rpg-ui-gameover-splatter-center {
44
+ top: 50%;
45
+ left: 50%;
46
+ width: 520px;
47
+ height: 520px;
48
+ transform: translate(-50%, -50%);
49
+ opacity: 0.3;
50
+ }
51
+
52
+ .rpg-ui-gameover-header {
53
+ position: relative;
54
+ z-index: 1;
55
+ display: flex;
56
+ flex-direction: column;
57
+ gap: var(--rpg-ui-spacing-sm);
58
+ }
59
+
60
+ .rpg-ui-gameover-title {
61
+ font-family: var(--rpg-ui-font);
62
+ font-size: clamp(2.8rem, 8vw, 6rem);
63
+ font-weight: var(--rpg-ui-font-weight-bold);
64
+ letter-spacing: 0.35em;
65
+ text-transform: uppercase;
66
+ color: var(--rpg-ui-danger);
67
+ text-shadow: 0 0 20px rgba(220, 53, 69, 0.45), 4px 4px 0 rgba(0, 0, 0, 0.45);
68
+ }
69
+
70
+ .rpg-ui-gameover-subtitle {
71
+ font-size: clamp(0.9rem, 2.4vw, 1.2rem);
72
+ letter-spacing: 0.3em;
73
+ text-transform: uppercase;
74
+ color: rgba(255, 255, 255, 0.7);
75
+ }
76
+
77
+ .rpg-ui-gameover-menu {
78
+ position: relative;
79
+ z-index: 1;
80
+ width: min(360px, 85vw);
81
+ background: transparent;
82
+ border: none;
83
+ box-shadow: none;
84
+ gap: 12px;
85
+ }
86
+
87
+ .rpg-ui-gameover-menu .rpg-ui-menu-item {
88
+ text-align: center;
89
+ background: rgba(0, 0, 0, 0.45);
90
+ border: 1px solid rgba(255, 255, 255, 0.08);
91
+ color: rgba(255, 255, 255, 0.75);
92
+ padding: 12px 18px;
93
+ margin-bottom: 12px;
94
+ text-transform: uppercase;
95
+ letter-spacing: 0.2em;
96
+ transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease;
97
+ }
98
+
99
+ .rpg-ui-gameover-menu .rpg-ui-menu-item:hover,
100
+ .rpg-ui-gameover-menu .rpg-ui-menu-item[data-selected="true"] {
101
+ border-color: var(--rpg-ui-danger);
102
+ color: #fff;
103
+ transform: translateY(-2px) scale(1.02);
104
+ }
105
+
106
+ .rpg-ui-gameover-menu .rpg-ui-menu-item:hover::before,
107
+ .rpg-ui-gameover-menu .rpg-ui-menu-item[data-selected="true"]::before {
108
+ display: none;
109
+ }
110
+
111
+ .rpg-ui-gameover-menu .rpg-ui-menu-item.disabled {
112
+ opacity: 0.5;
113
+ cursor: not-allowed;
114
+ transform: none;
115
+ }
@@ -0,0 +1,42 @@
1
+ .rpg-ui-hotbar {
2
+ position: fixed;
3
+ bottom: 24px;
4
+ left: 50%;
5
+ transform: translateX(-50%);
6
+ display: flex;
7
+ gap: 4px;
8
+ padding: 8px;
9
+ background: var(--rpg-ui-surface);
10
+ border: 4px solid var(--rpg-ui-border);
11
+ border-radius: var(--rpg-ui-radius-lg);
12
+ box-shadow: var(--rpg-ui-shadow-lg);
13
+ z-index: 100;
14
+ }
15
+
16
+ .rpg-ui-hotbar .rpg-ui-inventory-slot {
17
+ width: 56px;
18
+ height: 56px;
19
+ }
20
+
21
+ .rpg-ui-hotbar-key {
22
+ position: absolute;
23
+ top: -8px;
24
+ left: 50%;
25
+ transform: translateX(-50%);
26
+ background: var(--rpg-ui-border-dark);
27
+ color: var(--rpg-ui-text);
28
+ font-size: 10px;
29
+ padding: 2px 6px;
30
+ border-radius: 4px;
31
+ border: 1px solid var(--rpg-ui-border);
32
+ font-weight: bold;
33
+ z-index: 2;
34
+ }
35
+
36
+ /* Active slot effect */
37
+ .rpg-ui-hotbar .rpg-ui-inventory-slot[data-active="true"] {
38
+ transform: translateY(-8px) scale(1.1);
39
+ border-color: var(--rpg-ui-accent);
40
+ box-shadow: 0 0 15px rgba(255, 204, 0, 0.4);
41
+ z-index: 10;
42
+ }
@@ -0,0 +1,59 @@
1
+ .rpg-ui-input {
2
+ background: var(--rpg-ui-bg);
3
+ border: 2px solid var(--rpg-ui-border-dark);
4
+ color: var(--rpg-ui-text);
5
+ font-family: var(--rpg-ui-font);
6
+ font-size: var(--rpg-ui-font-size);
7
+ padding: 8px 12px;
8
+ border-radius: var(--rpg-ui-radius-sm);
9
+ outline: none;
10
+ transition: all 0.2s;
11
+ box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.5);
12
+ width: 100%;
13
+ }
14
+
15
+ .rpg-ui-input:focus {
16
+ border-color: var(--rpg-ui-accent);
17
+ box-shadow: 0 0 0 2px rgba(255, 204, 0, 0.2), inset 0 2px 4px rgba(0, 0, 0, 0.5);
18
+ }
19
+
20
+ .rpg-ui-input::placeholder {
21
+ color: var(--rpg-ui-text-muted);
22
+ opacity: 0.7;
23
+ }
24
+
25
+ .rpg-ui-input:disabled {
26
+ opacity: 0.5;
27
+ cursor: not-allowed;
28
+ background: #111;
29
+ }
30
+
31
+ /* Checkbox / Toggle */
32
+ .rpg-ui-checkbox {
33
+ appearance: none;
34
+ width: 20px;
35
+ height: 20px;
36
+ background: var(--rpg-ui-bg);
37
+ border: 2px solid var(--rpg-ui-border-dark);
38
+ border-radius: 2px;
39
+ cursor: pointer;
40
+ position: relative;
41
+ vertical-align: middle;
42
+ margin-right: 8px;
43
+ }
44
+
45
+ .rpg-ui-checkbox:checked {
46
+ background: var(--rpg-ui-accent);
47
+ border-color: var(--rpg-ui-accent);
48
+ }
49
+
50
+ .rpg-ui-checkbox:checked::after {
51
+ content: "✔";
52
+ position: absolute;
53
+ top: 50%;
54
+ left: 50%;
55
+ transform: translate(-50%, -50%);
56
+ color: var(--rpg-ui-bg);
57
+ font-size: 14px;
58
+ font-weight: bold;
59
+ }
@@ -0,0 +1,86 @@
1
+ .rpg-ui-inventory {
2
+ display: grid;
3
+ grid-template-columns: repeat(auto-fill, minmax(48px, 1fr));
4
+ gap: 8px;
5
+ padding: 8px;
6
+ background: rgba(0, 0, 0, 0.3);
7
+ border-radius: var(--rpg-ui-radius-md);
8
+ }
9
+
10
+ .rpg-ui-inventory-slot {
11
+ width: 48px;
12
+ height: 48px;
13
+ background: var(--rpg-ui-surface);
14
+ border: 2px solid var(--rpg-ui-border-dark);
15
+ border-radius: var(--rpg-ui-radius-sm);
16
+ position: relative;
17
+ cursor: pointer;
18
+ display: flex;
19
+ align-items: center;
20
+ justify-content: center;
21
+ transition: all 0.1s;
22
+ box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5);
23
+ }
24
+
25
+ .rpg-ui-inventory-slot:hover {
26
+ border-color: var(--rpg-ui-border-light);
27
+ transform: scale(1.05);
28
+ z-index: 1;
29
+ }
30
+
31
+ .rpg-ui-inventory-slot[data-selected="true"] {
32
+ border-color: var(--rpg-ui-accent);
33
+ box-shadow: 0 0 0 2px var(--rpg-ui-accent), inset 0 0 10px rgba(255, 204, 0, 0.2);
34
+ animation: rpg-pulse 2s infinite;
35
+ }
36
+
37
+ .rpg-ui-inventory-slot-icon {
38
+ font-size: 24px;
39
+ filter: drop-shadow(2px 2px 0 rgba(0, 0, 0, 0.5));
40
+ }
41
+
42
+ .rpg-ui-inventory-slot-quantity {
43
+ position: absolute;
44
+ bottom: 2px;
45
+ right: 2px;
46
+ font-size: 10px;
47
+ color: white;
48
+ font-weight: bold;
49
+ text-shadow: 1px 1px 0 #000;
50
+ background: rgba(0, 0, 0, 0.6);
51
+ padding: 0 2px;
52
+ border-radius: 2px;
53
+ }
54
+
55
+ /* Rarity Borders */
56
+ .rpg-ui-inventory-slot[data-rarity="common"] {
57
+ border-color: #9ca3af;
58
+ }
59
+
60
+ .rpg-ui-inventory-slot[data-rarity="uncommon"] {
61
+ border-color: #22c55e;
62
+ }
63
+
64
+ .rpg-ui-inventory-slot[data-rarity="rare"] {
65
+ border-color: #3b82f6;
66
+ }
67
+
68
+ .rpg-ui-inventory-slot[data-rarity="epic"] {
69
+ border-color: #a855f7;
70
+ }
71
+
72
+ .rpg-ui-inventory-slot[data-rarity="legendary"] {
73
+ border-color: #eab308;
74
+ box-shadow: 0 0 5px #eab308;
75
+ }
76
+
77
+ /* Locked/Empty */
78
+ .rpg-ui-inventory-slot[data-locked="true"] {
79
+ background: repeating-linear-gradient(45deg,
80
+ #1c1917,
81
+ #1c1917 10px,
82
+ #292524 10px,
83
+ #292524 20px);
84
+ cursor: not-allowed;
85
+ opacity: 0.7;
86
+ }