jasmincss 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 +524 -0
- package/bin/jasmin.js +45 -0
- package/dist/index.d.ts +62 -0
- package/dist/index.js +14568 -0
- package/dist/index.mjs +14524 -0
- package/dist/jasmin.css +63308 -0
- package/dist/jasmin.min.css +1 -0
- package/dist/plugins/nextjs.js +14777 -0
- package/dist/plugins/nextjs.mjs +14747 -0
- package/dist/plugins/vite.js +14889 -0
- package/dist/plugins/vite.mjs +14860 -0
- package/package.json +101 -0
- package/src/cli/add.js +83 -0
- package/src/cli/init.js +210 -0
- package/src/cli/run.js +142 -0
- package/src/components/accordion.js +309 -0
- package/src/components/alerts.js +357 -0
- package/src/components/avatars.js +331 -0
- package/src/components/badges.js +353 -0
- package/src/components/buttons.js +412 -0
- package/src/components/cards.js +342 -0
- package/src/components/carousel.js +495 -0
- package/src/components/chips.js +440 -0
- package/src/components/command-palette.js +434 -0
- package/src/components/datepicker.js +517 -0
- package/src/components/dropdown.js +411 -0
- package/src/components/forms.js +516 -0
- package/src/components/index.js +81 -0
- package/src/components/modals.js +349 -0
- package/src/components/navigation.js +463 -0
- package/src/components/offcanvas.js +390 -0
- package/src/components/popover.js +427 -0
- package/src/components/progress.js +396 -0
- package/src/components/rating.js +394 -0
- package/src/components/skeleton.js +408 -0
- package/src/components/spinner.js +453 -0
- package/src/components/stepper.js +389 -0
- package/src/components/tables.js +304 -0
- package/src/components/timeline.js +452 -0
- package/src/components/timepicker.js +529 -0
- package/src/components/tooltips.js +345 -0
- package/src/components/upload.js +490 -0
- package/src/config/defaults.js +263 -0
- package/src/config/loader.js +109 -0
- package/src/core/base.js +241 -0
- package/src/core/compiler.js +135 -0
- package/src/core/utilities/accessibility.js +290 -0
- package/src/core/utilities/animations.js +205 -0
- package/src/core/utilities/background.js +109 -0
- package/src/core/utilities/colors.js +234 -0
- package/src/core/utilities/columns.js +161 -0
- package/src/core/utilities/effects.js +261 -0
- package/src/core/utilities/filters.js +135 -0
- package/src/core/utilities/icons.js +806 -0
- package/src/core/utilities/index.js +239 -0
- package/src/core/utilities/layout.js +321 -0
- package/src/core/utilities/scroll.js +205 -0
- package/src/core/utilities/spacing.js +120 -0
- package/src/core/utilities/svg.js +191 -0
- package/src/core/utilities/transforms.js +116 -0
- package/src/core/utilities/typography.js +188 -0
- package/src/index.js +7 -0
- package/src/js/components/accordion.js +154 -0
- package/src/js/components/alert.js +198 -0
- package/src/js/components/carousel.js +226 -0
- package/src/js/components/dropdown.js +166 -0
- package/src/js/components/modal.js +169 -0
- package/src/js/components/offcanvas.js +175 -0
- package/src/js/components/popover.js +221 -0
- package/src/js/components/tabs.js +163 -0
- package/src/js/components/tooltip.js +200 -0
- package/src/js/index.js +79 -0
- package/src/js/types/config.d.ts +228 -0
- package/src/js/types/index.d.ts +439 -0
- package/src/plugins/nextjs.js +100 -0
- package/src/plugins/vite.js +133 -0
|
@@ -0,0 +1,349 @@
|
|
|
1
|
+
export function generateModalStyles(config) {
|
|
2
|
+
return `/* Modal Overlay/Backdrop */
|
|
3
|
+
.modal-backdrop {
|
|
4
|
+
position: fixed;
|
|
5
|
+
inset: 0;
|
|
6
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
7
|
+
backdrop-filter: blur(4px);
|
|
8
|
+
-webkit-backdrop-filter: blur(4px);
|
|
9
|
+
z-index: var(--j-z-modal-backdrop, 1040);
|
|
10
|
+
opacity: 0;
|
|
11
|
+
transition: opacity 200ms ease-out;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.modal-backdrop.show {
|
|
15
|
+
opacity: 1;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/* Modal Container */
|
|
19
|
+
.modal {
|
|
20
|
+
position: fixed;
|
|
21
|
+
inset: 0;
|
|
22
|
+
display: flex;
|
|
23
|
+
align-items: center;
|
|
24
|
+
justify-content: center;
|
|
25
|
+
padding: 1rem;
|
|
26
|
+
z-index: var(--j-z-modal, 1050);
|
|
27
|
+
overflow-y: auto;
|
|
28
|
+
opacity: 0;
|
|
29
|
+
pointer-events: none;
|
|
30
|
+
transition: opacity 200ms ease-out;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.modal.show {
|
|
34
|
+
opacity: 1;
|
|
35
|
+
pointer-events: auto;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/* Modal Dialog */
|
|
39
|
+
.modal-dialog {
|
|
40
|
+
position: relative;
|
|
41
|
+
width: 100%;
|
|
42
|
+
max-width: 500px;
|
|
43
|
+
background-color: var(--j-bg);
|
|
44
|
+
border-radius: var(--j-radius-lg, 0.75rem);
|
|
45
|
+
box-shadow: var(--j-shadow-xl);
|
|
46
|
+
transform: scale(0.95) translateY(-20px);
|
|
47
|
+
transition: transform 200ms ease-out;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.modal.show .modal-dialog {
|
|
51
|
+
transform: scale(1) translateY(0);
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
/* Modal Sizes */
|
|
55
|
+
.modal-sm .modal-dialog {
|
|
56
|
+
max-width: 360px;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
.modal-lg .modal-dialog {
|
|
60
|
+
max-width: 700px;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.modal-xl .modal-dialog {
|
|
64
|
+
max-width: 900px;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.modal-full .modal-dialog {
|
|
68
|
+
max-width: calc(100% - 2rem);
|
|
69
|
+
max-height: calc(100% - 2rem);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/* Modal Positions */
|
|
73
|
+
.modal-top {
|
|
74
|
+
align-items: flex-start;
|
|
75
|
+
padding-top: 3rem;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.modal-bottom {
|
|
79
|
+
align-items: flex-end;
|
|
80
|
+
padding-bottom: 3rem;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/* Modal Content */
|
|
84
|
+
.modal-content {
|
|
85
|
+
display: flex;
|
|
86
|
+
flex-direction: column;
|
|
87
|
+
max-height: calc(100vh - 4rem);
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.modal-header {
|
|
91
|
+
display: flex;
|
|
92
|
+
align-items: center;
|
|
93
|
+
justify-content: space-between;
|
|
94
|
+
padding: 1rem 1.5rem;
|
|
95
|
+
border-bottom: 1px solid var(--j-border);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
.modal-title {
|
|
99
|
+
font-size: 1.125rem;
|
|
100
|
+
font-weight: 600;
|
|
101
|
+
color: var(--j-text);
|
|
102
|
+
margin: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.modal-close {
|
|
106
|
+
display: flex;
|
|
107
|
+
align-items: center;
|
|
108
|
+
justify-content: center;
|
|
109
|
+
width: 2rem;
|
|
110
|
+
height: 2rem;
|
|
111
|
+
padding: 0;
|
|
112
|
+
background: transparent;
|
|
113
|
+
border: none;
|
|
114
|
+
border-radius: var(--j-radius-default, 0.5rem);
|
|
115
|
+
cursor: pointer;
|
|
116
|
+
color: var(--j-text-muted);
|
|
117
|
+
transition: all 150ms ease-in-out;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.modal-close:hover {
|
|
121
|
+
background-color: var(--j-bg-subtle);
|
|
122
|
+
color: var(--j-text);
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.modal-close svg {
|
|
126
|
+
width: 1.25rem;
|
|
127
|
+
height: 1.25rem;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
.modal-body {
|
|
131
|
+
flex: 1;
|
|
132
|
+
padding: 1.5rem;
|
|
133
|
+
overflow-y: auto;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.modal-footer {
|
|
137
|
+
display: flex;
|
|
138
|
+
align-items: center;
|
|
139
|
+
justify-content: flex-end;
|
|
140
|
+
gap: 0.75rem;
|
|
141
|
+
padding: 1rem 1.5rem;
|
|
142
|
+
border-top: 1px solid var(--j-border);
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.modal-footer-between {
|
|
146
|
+
justify-content: space-between;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/* Modal without Header Border */
|
|
150
|
+
.modal-borderless .modal-header {
|
|
151
|
+
border-bottom: none;
|
|
152
|
+
padding-bottom: 0;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
.modal-borderless .modal-footer {
|
|
156
|
+
border-top: none;
|
|
157
|
+
padding-top: 0;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/* Centered Content Modal */
|
|
161
|
+
.modal-centered .modal-body {
|
|
162
|
+
text-align: center;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.modal-centered .modal-footer {
|
|
166
|
+
justify-content: center;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
/* Glass Modal */
|
|
170
|
+
.modal-glass .modal-dialog {
|
|
171
|
+
background: rgba(255, 255, 255, 0.1);
|
|
172
|
+
backdrop-filter: blur(16px);
|
|
173
|
+
-webkit-backdrop-filter: blur(16px);
|
|
174
|
+
border: 1px solid rgba(255, 255, 255, 0.2);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.modal-glass .modal-header {
|
|
178
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.modal-glass .modal-footer {
|
|
182
|
+
border-color: rgba(255, 255, 255, 0.1);
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/* Drawer (Slide-in Modal) */
|
|
186
|
+
.drawer {
|
|
187
|
+
position: fixed;
|
|
188
|
+
top: 0;
|
|
189
|
+
bottom: 0;
|
|
190
|
+
width: 100%;
|
|
191
|
+
max-width: 400px;
|
|
192
|
+
background-color: var(--j-bg);
|
|
193
|
+
box-shadow: var(--j-shadow-xl);
|
|
194
|
+
z-index: var(--j-z-modal, 1050);
|
|
195
|
+
transition: transform 300ms ease-out;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
.drawer-left {
|
|
199
|
+
left: 0;
|
|
200
|
+
transform: translateX(-100%);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.drawer-left.show {
|
|
204
|
+
transform: translateX(0);
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
.drawer-right {
|
|
208
|
+
right: 0;
|
|
209
|
+
transform: translateX(100%);
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.drawer-right.show {
|
|
213
|
+
transform: translateX(0);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
.drawer-header {
|
|
217
|
+
display: flex;
|
|
218
|
+
align-items: center;
|
|
219
|
+
justify-content: space-between;
|
|
220
|
+
padding: 1rem 1.5rem;
|
|
221
|
+
border-bottom: 1px solid var(--j-border);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
.drawer-title {
|
|
225
|
+
font-size: 1.125rem;
|
|
226
|
+
font-weight: 600;
|
|
227
|
+
color: var(--j-text);
|
|
228
|
+
}
|
|
229
|
+
|
|
230
|
+
.drawer-close {
|
|
231
|
+
display: flex;
|
|
232
|
+
align-items: center;
|
|
233
|
+
justify-content: center;
|
|
234
|
+
width: 2rem;
|
|
235
|
+
height: 2rem;
|
|
236
|
+
padding: 0;
|
|
237
|
+
background: transparent;
|
|
238
|
+
border: none;
|
|
239
|
+
border-radius: var(--j-radius-default, 0.5rem);
|
|
240
|
+
cursor: pointer;
|
|
241
|
+
color: var(--j-text-muted);
|
|
242
|
+
transition: all 150ms ease-in-out;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
.drawer-close:hover {
|
|
246
|
+
background-color: var(--j-bg-subtle);
|
|
247
|
+
color: var(--j-text);
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
.drawer-body {
|
|
251
|
+
flex: 1;
|
|
252
|
+
padding: 1.5rem;
|
|
253
|
+
overflow-y: auto;
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.drawer-footer {
|
|
257
|
+
padding: 1rem 1.5rem;
|
|
258
|
+
border-top: 1px solid var(--j-border);
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
/* Drawer Sizes */
|
|
262
|
+
.drawer-sm {
|
|
263
|
+
max-width: 300px;
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
.drawer-lg {
|
|
267
|
+
max-width: 500px;
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
.drawer-xl {
|
|
271
|
+
max-width: 700px;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
.drawer-full {
|
|
275
|
+
max-width: 100%;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/* Bottom Drawer */
|
|
279
|
+
.drawer-bottom {
|
|
280
|
+
top: auto;
|
|
281
|
+
left: 0;
|
|
282
|
+
right: 0;
|
|
283
|
+
max-width: 100%;
|
|
284
|
+
max-height: 80vh;
|
|
285
|
+
border-radius: var(--j-radius-lg, 0.75rem) var(--j-radius-lg, 0.75rem) 0 0;
|
|
286
|
+
transform: translateY(100%);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
.drawer-bottom.show {
|
|
290
|
+
transform: translateY(0);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
/* Confirm Dialog */
|
|
294
|
+
.dialog-confirm {
|
|
295
|
+
text-align: center;
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
.dialog-confirm .modal-body {
|
|
299
|
+
padding: 2rem 1.5rem;
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.dialog-confirm-icon {
|
|
303
|
+
width: 4rem;
|
|
304
|
+
height: 4rem;
|
|
305
|
+
margin: 0 auto 1rem;
|
|
306
|
+
display: flex;
|
|
307
|
+
align-items: center;
|
|
308
|
+
justify-content: center;
|
|
309
|
+
border-radius: 50%;
|
|
310
|
+
background-color: var(--j-bg-subtle);
|
|
311
|
+
}
|
|
312
|
+
|
|
313
|
+
.dialog-confirm-icon svg {
|
|
314
|
+
width: 2rem;
|
|
315
|
+
height: 2rem;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.dialog-confirm-icon.danger {
|
|
319
|
+
background-color: color-mix(in srgb, var(--j-error) 15%, transparent);
|
|
320
|
+
color: var(--j-error);
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
.dialog-confirm-icon.warning {
|
|
324
|
+
background-color: color-mix(in srgb, var(--j-warning) 15%, transparent);
|
|
325
|
+
color: var(--j-warning);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
.dialog-confirm-icon.success {
|
|
329
|
+
background-color: color-mix(in srgb, var(--j-success) 15%, transparent);
|
|
330
|
+
color: var(--j-success);
|
|
331
|
+
}
|
|
332
|
+
|
|
333
|
+
.dialog-confirm-title {
|
|
334
|
+
font-size: 1.125rem;
|
|
335
|
+
font-weight: 600;
|
|
336
|
+
margin-bottom: 0.5rem;
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
.dialog-confirm-message {
|
|
340
|
+
color: var(--j-text-subtle);
|
|
341
|
+
font-size: 0.875rem;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
.dialog-confirm .modal-footer {
|
|
345
|
+
justify-content: center;
|
|
346
|
+
border-top: none;
|
|
347
|
+
}
|
|
348
|
+
`;
|
|
349
|
+
}
|