@t007/dialog 0.0.3 → 0.0.5
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.
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/* src/css/index.css */
|
|
1
2
|
:where(:root) {
|
|
2
3
|
--t007-dialog-font-family: inherit;
|
|
3
4
|
--t007-dialog-unit: 1rem;
|
|
@@ -31,12 +32,10 @@
|
|
|
31
32
|
--t007-dialog-button-gap: 0.65rem;
|
|
32
33
|
--t007-button-outline-width: 0.15rem;
|
|
33
34
|
--t007-button-outline-style: solid;
|
|
34
|
-
/* animation styles */
|
|
35
35
|
--t007-dialog-start-duration: 150ms;
|
|
36
36
|
--t007-dialog-start-transform: translateY(-100%);
|
|
37
37
|
--t007-dialog-start-opacity: 0;
|
|
38
38
|
}
|
|
39
|
-
|
|
40
39
|
:where(:root, .t007-dialog) {
|
|
41
40
|
--t007-confirm-button-color: grey;
|
|
42
41
|
--t007-confirm-button-background: var(--t007-cancel-button-color);
|
|
@@ -45,11 +44,9 @@
|
|
|
45
44
|
--t007-confirm-button-outline-color: var(--t007-confirm-button-color);
|
|
46
45
|
--t007-cancel-button-outline-color: var(--t007-cancel-button-color);
|
|
47
46
|
}
|
|
48
|
-
|
|
49
47
|
:where(.t007-dialog) .t007-input-field {
|
|
50
48
|
--t007-input-color: var(--t007-dialog-message-color);
|
|
51
49
|
}
|
|
52
|
-
|
|
53
50
|
.t007-dialog,
|
|
54
51
|
.t007-dialog *,
|
|
55
52
|
.t007-dialog *::after,
|
|
@@ -60,23 +57,19 @@
|
|
|
60
57
|
margin: 0;
|
|
61
58
|
padding: 0;
|
|
62
59
|
}
|
|
63
|
-
|
|
64
60
|
.t007-dialog *:disabled {
|
|
65
61
|
filter: grayscale(100%);
|
|
66
62
|
cursor: not-allowed;
|
|
67
63
|
}
|
|
68
|
-
|
|
69
64
|
.t007-dialog *:focus {
|
|
70
65
|
outline-style: dashed;
|
|
71
66
|
outline-offset: 0.1rem;
|
|
72
67
|
outline-width: 0;
|
|
73
68
|
}
|
|
74
|
-
|
|
75
69
|
.t007-dialog *:focus-visible {
|
|
76
70
|
outline-width: 0.15rem;
|
|
77
71
|
transition: none !important;
|
|
78
72
|
}
|
|
79
|
-
|
|
80
73
|
.t007-dialog :where(button) {
|
|
81
74
|
background: none;
|
|
82
75
|
border: none;
|
|
@@ -86,30 +79,30 @@
|
|
|
86
79
|
justify-content: center;
|
|
87
80
|
transition: filter 200ms ease;
|
|
88
81
|
}
|
|
89
|
-
|
|
90
82
|
:where(button):hover {
|
|
91
83
|
cursor: pointer;
|
|
92
84
|
filter: brightness(1.15);
|
|
93
85
|
}
|
|
94
|
-
|
|
95
86
|
:is(html, body):has(.t007-dialog[open]) {
|
|
96
87
|
overflow: hidden;
|
|
97
88
|
}
|
|
98
89
|
body:has(.t007-dialog[open]) {
|
|
99
|
-
overflow-y: visible;
|
|
90
|
+
overflow-y: visible;
|
|
100
91
|
}
|
|
101
|
-
|
|
102
92
|
.t007-dialog,
|
|
103
93
|
.t007-dialog::backdrop {
|
|
104
94
|
position: fixed;
|
|
105
95
|
inset: 0;
|
|
106
96
|
margin: auto;
|
|
107
97
|
display: none;
|
|
108
|
-
transition-property:
|
|
98
|
+
transition-property:
|
|
99
|
+
display,
|
|
100
|
+
transform,
|
|
101
|
+
opacity,
|
|
102
|
+
backdrop-filter;
|
|
109
103
|
transition-duration: var(--t007-dialog-start-duration);
|
|
110
104
|
transition-behavior: allow-discrete;
|
|
111
105
|
}
|
|
112
|
-
|
|
113
106
|
.t007-dialog {
|
|
114
107
|
padding: 0;
|
|
115
108
|
margin: auto;
|
|
@@ -124,7 +117,6 @@ body:has(.t007-dialog[open]) {
|
|
|
124
117
|
opacity: var(--t007-dialog-start-opacity);
|
|
125
118
|
transform: var(--t007-dialog-start-transform);
|
|
126
119
|
}
|
|
127
|
-
|
|
128
120
|
.t007-dialog[open] {
|
|
129
121
|
opacity: 1;
|
|
130
122
|
transform: none;
|
|
@@ -135,7 +127,6 @@ body:has(.t007-dialog[open]) {
|
|
|
135
127
|
transform: var(--t007-dialog-start-transform);
|
|
136
128
|
}
|
|
137
129
|
}
|
|
138
|
-
|
|
139
130
|
.t007-dialog,
|
|
140
131
|
.t007-dialog form {
|
|
141
132
|
flex-direction: column;
|
|
@@ -145,11 +136,9 @@ body:has(.t007-dialog[open]) {
|
|
|
145
136
|
.t007-dialog form {
|
|
146
137
|
display: flex;
|
|
147
138
|
}
|
|
148
|
-
|
|
149
139
|
.t007-dialog::backdrop {
|
|
150
140
|
background-color: transparent;
|
|
151
141
|
}
|
|
152
|
-
|
|
153
142
|
.t007-dialog[open]::backdrop {
|
|
154
143
|
display: block;
|
|
155
144
|
background-color: var(--t007-dialog-backdrop-background);
|
|
@@ -161,35 +150,28 @@ body:has(.t007-dialog[open]) {
|
|
|
161
150
|
background-color: transparent;
|
|
162
151
|
}
|
|
163
152
|
}
|
|
164
|
-
|
|
165
153
|
.t007-dialog > * {
|
|
166
154
|
padding-inline: var(--t007-dialog-padding);
|
|
167
155
|
}
|
|
168
|
-
|
|
169
156
|
.t007-dialog-top-section {
|
|
170
157
|
margin-top: var(--t007-dialog-padding);
|
|
171
158
|
}
|
|
172
|
-
|
|
173
159
|
.t007-dialog-bottom-section {
|
|
174
160
|
margin-bottom: var(--t007-dialog-padding);
|
|
175
161
|
}
|
|
176
|
-
|
|
177
162
|
.t007-dialog-top-section {
|
|
178
163
|
padding-block: var(--t007-dialog-content-padding-block);
|
|
179
164
|
max-height: var(--t007-dialog-max-content-height);
|
|
180
165
|
overflow-x: hidden;
|
|
181
166
|
overflow-y: auto;
|
|
182
167
|
}
|
|
183
|
-
|
|
184
168
|
.t007-dialog:has(.field) .t007-dialog-top-section {
|
|
185
169
|
padding-block-end: 0;
|
|
186
170
|
}
|
|
187
|
-
|
|
188
171
|
.t007-dialog-question {
|
|
189
172
|
color: var(--t007-dialog-message-color);
|
|
190
173
|
font-size: var(--t007-dialog-message-font-size);
|
|
191
174
|
}
|
|
192
|
-
|
|
193
175
|
.t007-dialog-bottom-section {
|
|
194
176
|
align-self: flex-end;
|
|
195
177
|
display: flex;
|
|
@@ -197,7 +179,6 @@ body:has(.t007-dialog[open]) {
|
|
|
197
179
|
justify-content: flex-end;
|
|
198
180
|
gap: var(--t007-dialog-button-gap);
|
|
199
181
|
}
|
|
200
|
-
|
|
201
182
|
.t007-dialog button {
|
|
202
183
|
font-size: var(--t007-dialog-button-font-size);
|
|
203
184
|
min-width: var(--t007-dialog-button-min-width);
|
|
@@ -212,40 +193,32 @@ body:has(.t007-dialog[open]) {
|
|
|
212
193
|
text-shadow: var(--t007-dialog-button-text-shadow);
|
|
213
194
|
transition: 100ms ease;
|
|
214
195
|
}
|
|
215
|
-
|
|
216
196
|
.t007-dialog-confirm-button {
|
|
217
197
|
color: var(--t007-confirm-button-color);
|
|
218
198
|
background: var(--t007-confirm-button-background);
|
|
219
199
|
opacity: 1;
|
|
220
200
|
}
|
|
221
|
-
|
|
222
201
|
.t007-dialog-cancel-button {
|
|
223
202
|
color: var(--t007-cancel-button-color);
|
|
224
203
|
background: var(--t007-cancel-button-background);
|
|
225
204
|
opacity: 0.9;
|
|
226
205
|
}
|
|
227
|
-
|
|
228
206
|
.t007-dialog button:hover {
|
|
229
207
|
cursor: pointer;
|
|
230
208
|
}
|
|
231
|
-
|
|
232
209
|
.t007-dialog-confirm-button:hover {
|
|
233
210
|
opacity: 0.9;
|
|
234
211
|
}
|
|
235
|
-
|
|
236
212
|
.t007-dialog-cancel-button:hover {
|
|
237
213
|
opacity: 1;
|
|
238
214
|
}
|
|
239
|
-
|
|
240
215
|
.t007-dialog button:focus {
|
|
241
216
|
outline-style: var(--t007-button-outline-style);
|
|
242
217
|
outline-width: var(--t007-button-outline-width);
|
|
243
218
|
}
|
|
244
|
-
|
|
245
219
|
.t007-dialog-confirm-button:focus {
|
|
246
220
|
outline-color: var(--t007-confirm-button-outline-color);
|
|
247
221
|
}
|
|
248
|
-
|
|
249
222
|
.t007-dialog-cancel-button:focus {
|
|
250
223
|
outline-color: var(--t007-cancel-button-outline-color);
|
|
251
224
|
}
|
package/dist/index.global.js
CHANGED
|
@@ -71,9 +71,9 @@
|
|
|
71
71
|
window.T007_TOAST_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest`;
|
|
72
72
|
window.T007_INPUT_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest`;
|
|
73
73
|
window.T007_DIALOG_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest`;
|
|
74
|
-
window.T007_TOAST_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest/dist/
|
|
75
|
-
window.T007_INPUT_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest/dist/
|
|
76
|
-
window.T007_DIALOG_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest/dist/
|
|
74
|
+
window.T007_TOAST_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest/dist/index.css`;
|
|
75
|
+
window.T007_INPUT_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest/dist/index.css`;
|
|
76
|
+
window.T007_DIALOG_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest/dist/index.css`;
|
|
77
77
|
}
|
|
78
78
|
|
|
79
79
|
// src/index.js
|
package/dist/standalone.js
CHANGED
|
@@ -69,9 +69,9 @@ if (typeof window !== "undefined") {
|
|
|
69
69
|
window.T007_TOAST_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest`;
|
|
70
70
|
window.T007_INPUT_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest`;
|
|
71
71
|
window.T007_DIALOG_JS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest`;
|
|
72
|
-
window.T007_TOAST_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest/dist/
|
|
73
|
-
window.T007_INPUT_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest/dist/
|
|
74
|
-
window.T007_DIALOG_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest/dist/
|
|
72
|
+
window.T007_TOAST_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/toast@latest/dist/index.css`;
|
|
73
|
+
window.T007_INPUT_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/input@latest/dist/index.css`;
|
|
74
|
+
window.T007_DIALOG_CSS_SRC ??= `https://cdn.jsdelivr.net/npm/@t007/dialog@latest/dist/index.css`;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
77
|
// src/index.js
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@t007/dialog",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.5",
|
|
4
4
|
"description": "A lightweight, pure JS dialog system.",
|
|
5
5
|
"author": "Oketade Oluwatobiloba <tobioketade007@gmail.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -18,28 +18,28 @@
|
|
|
18
18
|
"module": "./dist/index.js",
|
|
19
19
|
"unpkg": "./dist/index.global.js",
|
|
20
20
|
"jsdelivr": "./dist/index.global.js",
|
|
21
|
-
"types": "./
|
|
22
|
-
"style": "./
|
|
21
|
+
"types": "./dist/index.d.ts",
|
|
22
|
+
"style": "./dist/index.css",
|
|
23
23
|
"sideEffects": [
|
|
24
24
|
"*.css"
|
|
25
25
|
],
|
|
26
26
|
"exports": {
|
|
27
27
|
".": {
|
|
28
|
-
"types": "./
|
|
28
|
+
"types": "./dist/index.d.ts",
|
|
29
29
|
"import": "./dist/index.js",
|
|
30
30
|
"default": "./dist/index.js"
|
|
31
31
|
},
|
|
32
32
|
"./standalone": "./dist/standalone.js",
|
|
33
33
|
"./global": "./dist/index.global.js",
|
|
34
|
-
"./style.css": "./
|
|
34
|
+
"./style.css": "./dist/index.css"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"build": "tsup --config ../../tsup.config.ts"
|
|
38
38
|
},
|
|
39
39
|
"files": [
|
|
40
40
|
"dist",
|
|
41
|
-
"./
|
|
42
|
-
"./
|
|
41
|
+
"./dist/index.d.ts",
|
|
42
|
+
"./dist/index.css"
|
|
43
43
|
],
|
|
44
44
|
"keywords": [
|
|
45
45
|
"t007",
|
|
File without changes
|