@gbmtech/aurora-ui 0.1.2 → 0.1.4
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,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs");function Input({className:e,type:_,disabled:r,prefix:t,suffix:n,inputClassName:a,loading:c,loaderPosition:
|
|
2
|
+
"use strict";let __rslib_import_meta_url__="undefined"==typeof document?new(require("url".replace("",""))).URL("file:"+__filename).href:document.currentScript&&document.currentScript.src||new URL("main.js",document.baseURI).href;var __webpack_require__={};__webpack_require__.d=(e,_)=>{for(var r in _)__webpack_require__.o(_,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:_[r]})},__webpack_require__.o=(e,_)=>Object.prototype.hasOwnProperty.call(e,_),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var __webpack_exports__={};__webpack_require__.r(__webpack_exports__),__webpack_require__.d(__webpack_exports__,{Input:()=>Input});let jsx_runtime_namespaceObject=require("react/jsx-runtime"),utils_cjs_namespaceObject=require("../lib/utils.cjs"),external_spinner_cjs_namespaceObject=require("./spinner.cjs");function Input({className:e,type:_,disabled:r,prefix:t,suffix:n,inputClassName:a,loading:c,loaderPosition:i="prefix",spinner:s,...p}){return(0,jsx_runtime_namespaceObject.jsxs)("div",{className:(0,utils_cjs_namespaceObject.cn)("flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",e),"data-disabled":r,children:[c&&"prefix"===i?s||(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{}):t,(0,jsx_runtime_namespaceObject.jsx)("input",{className:(0,utils_cjs_namespaceObject.cn)("peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400",a),type:_,disabled:r,onKeyDown:e=>{"number"===_&&["e","E","+","-"].includes(e.key)&&e.preventDefault()},onFocus:e=>{"number"===_&&e.target.addEventListener("wheel",e=>{e.preventDefault()},{passive:!1})},...p}),c&&"suffix"===i?s||(0,jsx_runtime_namespaceObject.jsx)(external_spinner_cjs_namespaceObject.Spinner,{}):n]})}for(var __webpack_i__ in exports.Input=__webpack_exports__.Input,__webpack_exports__)-1===["Input"].indexOf(__webpack_i__)&&(exports[__webpack_i__]=__webpack_exports__[__webpack_i__]);Object.defineProperty(exports,"__esModule",{value:!0});
|
|
3
3
|
//# sourceMappingURL=input.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\input.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center rounded-md border border-zinc-200 bg-background ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ?
|
|
1
|
+
{"version":3,"file":"components\\input.cjs","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ? spinner || <Spinner /> : prefix}\r\n\r\n <input\r\n className={cn(\r\n 'peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400',\r\n inputClassName\r\n )}\r\n type={type}\r\n disabled={disabled}\r\n onKeyDown={e => {\r\n if (type === 'number' && ['e', 'E', '+', '-'].includes(e.key)) {\r\n e.preventDefault()\r\n }\r\n }}\r\n onFocus={e => {\r\n if (type === 'number') {\r\n e.target.addEventListener(\r\n 'wheel',\r\n e => {\r\n e.preventDefault()\r\n },\r\n { passive: false }\r\n )\r\n }\r\n }}\r\n {...props}\r\n />\r\n\r\n {loading && loaderPosition === 'suffix' ? spinner || <Spinner /> : suffix}\r\n </div>\r\n )\r\n}\r\n\r\nexport { Input }\r\n"],"names":["Input","className","type","disabled","prefix","suffix","inputClassName","loading","loaderPosition","spinner","props","cn","Spinner","e"],"mappings":";+8BAgBA,SAASA,MAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,SAAAA,CAAQ,CACRC,OAAAA,CAAM,CACNC,OAAAA,CAAM,CACNC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,eAAAA,EAAiB,QAAQ,CACzBC,QAAAA,CAAO,CACP,GAAGC,EACQ,EACX,MACE,qCAAC,OACC,UAAWC,GAAAA,0BAAAA,EAAAA,EACT,uTACAV,GAEF,gBAAeE,E,UAEdI,GAAWC,WAAAA,EAA8BC,GAAW,oCAACG,qCAAAA,OAAOA,CAAAA,CAAAA,GAAMR,EAEnE,oCAAC,SACC,UAAWO,GAAAA,0BAAAA,EAAAA,EACT,4GACAL,GAEF,KAAMJ,EACN,SAAUC,EACV,UAAWU,IACLX,WAAAA,GAAqB,CAAC,IAAK,IAAK,IAAK,IAAI,CAAC,QAAQ,CAACW,EAAE,GAAG,GAC1DA,EAAE,cAAc,EAEpB,EACA,QAASA,IACHX,WAAAA,GACFW,EAAE,MAAM,CAAC,gBAAgB,CACvB,QACAA,IACEA,EAAE,cAAc,EAClB,EACA,CAAE,QAAS,EAAM,EAGvB,EACC,GAAGH,CAAK,GAGVH,GAAWC,WAAAA,EAA8BC,GAAW,oCAACG,qCAAAA,OAAOA,CAAAA,CAAAA,GAAMP,E,EAGzE,C"}
|
package/dist/cjs/index.css
CHANGED
|
@@ -181,3 +181,399 @@
|
|
|
181
181
|
--color-purple-800: #351856;
|
|
182
182
|
--color-purple-900: #2a1440;
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Keyframe Animations
|
|
186
|
+
* -----------------------------------------------------------------------------
|
|
187
|
+
* Defines basic animations such as cursor blinking effects,
|
|
188
|
+
* expanding/collapsing content effects.
|
|
189
|
+
*/
|
|
190
|
+
@theme inline {
|
|
191
|
+
--animate-caret-blink: caret-blink 1250ms ease-out infinite;
|
|
192
|
+
--animate-collapsible-up: collapsible-up 200ms ease-in;
|
|
193
|
+
--animate-collapsible-down: collapsible-down 200ms ease-out;
|
|
194
|
+
|
|
195
|
+
@keyframes caret-blink {
|
|
196
|
+
0%,
|
|
197
|
+
70%,
|
|
198
|
+
100% {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
20%,
|
|
203
|
+
50% {
|
|
204
|
+
opacity: 0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes collapsible-up {
|
|
209
|
+
from {
|
|
210
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
211
|
+
height: var(--radix-collapsible-content-height);
|
|
212
|
+
}
|
|
213
|
+
to {
|
|
214
|
+
height: 0;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes collapsible-down {
|
|
219
|
+
from {
|
|
220
|
+
height: 0;
|
|
221
|
+
}
|
|
222
|
+
to {
|
|
223
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
224
|
+
height: var(--radix-collapsible-content-height);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Animation Timing Functions
|
|
231
|
+
* -----------------------------------------------------------------------------
|
|
232
|
+
* Easing functions used to adjust the speed of animation transitions.
|
|
233
|
+
*/
|
|
234
|
+
@theme inline {
|
|
235
|
+
--animate-fade-in: fadeIn 250ms ease-out;
|
|
236
|
+
--animate-fade-out: fadeOut 250ms ease-in;
|
|
237
|
+
|
|
238
|
+
--animate-in: enter 300ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
239
|
+
--animate-out: exit 250ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
240
|
+
|
|
241
|
+
@keyframes fadeIn {
|
|
242
|
+
from {
|
|
243
|
+
opacity: var(--tw-enter-opacity, 0);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes fadeOut {
|
|
248
|
+
to {
|
|
249
|
+
opacity: var(--tw-exit-opacity, 0);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@keyframes enter {
|
|
254
|
+
from {
|
|
255
|
+
opacity: var(--tw-enter-opacity, 1);
|
|
256
|
+
transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
|
|
257
|
+
scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
|
|
258
|
+
rotate(var(--tw-enter-rotate, 0));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@keyframes exit {
|
|
263
|
+
to {
|
|
264
|
+
opacity: var(--tw-exit-opacity, 1);
|
|
265
|
+
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
|
|
266
|
+
scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
|
|
267
|
+
rotate(var(--tw-exit-rotate, 0));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Animation Timing Functions
|
|
274
|
+
* -----------------------------------------------------------------------------
|
|
275
|
+
* Defines utilities to adjust animation speed.
|
|
276
|
+
*/
|
|
277
|
+
@utility animation-ease-linear {
|
|
278
|
+
animation-timing-function: linear;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@utility animation-ease-in {
|
|
282
|
+
animation-timing-function: var(--ease-in);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@utility animation-ease-out {
|
|
286
|
+
animation-timing-function: var(--ease-out);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@utility animation-ease-in-out {
|
|
290
|
+
animation-timing-function: var(--ease-in-out);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@utility animation-ease-initial {
|
|
294
|
+
animation-timing-function: initial;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@utility animation-ease-* {
|
|
298
|
+
animation-timing-function: --value([*]);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Animation Play State
|
|
303
|
+
* -----------------------------------------------------------------------------
|
|
304
|
+
* Adjust the playback state of the animation.
|
|
305
|
+
*/
|
|
306
|
+
@utility animation-state-paused {
|
|
307
|
+
animation-play-state: paused;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@utility animation-state-running {
|
|
311
|
+
animation-play-state: running;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@utility animation-state-initial {
|
|
315
|
+
animation-play-state: initial;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@utility animation-state-* {
|
|
319
|
+
animation-play-state: --value([*]);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Animation Repeat
|
|
324
|
+
* -----------------------------------------------------------------------------
|
|
325
|
+
* Controls the number of repetitions of the animation.
|
|
326
|
+
*/
|
|
327
|
+
@utility animation-repeat-infinite {
|
|
328
|
+
animation-iteration-count: infinite;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@utility animation-repeat-initial {
|
|
332
|
+
animation-iteration-count: initial;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@utility animation-repeat-* {
|
|
336
|
+
animation-iteration-count: --value(integer, [integer]);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Animation Composition
|
|
341
|
+
* -----------------------------------------------------------------------------
|
|
342
|
+
* Defines how animations combine with each other.
|
|
343
|
+
*/
|
|
344
|
+
@utility animation-composition-replace {
|
|
345
|
+
animation-composition: replace;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@utility animation-composition-add {
|
|
349
|
+
animation-composition: add;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@utility animation-composition-accumulate {
|
|
353
|
+
animation-composition: accumulate;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@utility animation-composition-initial {
|
|
357
|
+
animation-composition: initial;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@utility animation-composition-* {
|
|
361
|
+
animation-composition: --value([*]);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Animation Delay
|
|
366
|
+
* -----------------------------------------------------------------------------
|
|
367
|
+
* Adjust the delay time before the animation starts.
|
|
368
|
+
*/
|
|
369
|
+
@utility animation-delay-initial {
|
|
370
|
+
animation-delay: initial;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@utility animation-delay-* {
|
|
374
|
+
animation-delay: calc(--value(integer) * 1ms);
|
|
375
|
+
animation-delay: --value([*]);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Animation Direction
|
|
380
|
+
* -----------------------------------------------------------------------------
|
|
381
|
+
* Determines the playback direction of the animation.
|
|
382
|
+
*/
|
|
383
|
+
@utility animation-direction-normal {
|
|
384
|
+
animation-direction: normal;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@utility animation-direction-reverse {
|
|
388
|
+
animation-direction: reverse;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
@utility animation-direction-alternate {
|
|
392
|
+
animation-direction: alternate;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
@utility animation-direction-alternate-reverse {
|
|
396
|
+
animation-direction: alternate-reverse;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@utility animation-direction-initial {
|
|
400
|
+
animation-direction: initial;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@utility animation-direction-* {
|
|
404
|
+
animation-direction: --value([*]);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Animation Duration
|
|
409
|
+
* -----------------------------------------------------------------------------
|
|
410
|
+
* Defines the duration of the animation execution.
|
|
411
|
+
*/
|
|
412
|
+
@utility animation-duration-initial {
|
|
413
|
+
animation-duration: initial;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
@utility animation-duration-* {
|
|
417
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
418
|
+
animation-duration: --value([*]);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Animation Fill Mode
|
|
423
|
+
* -----------------------------------------------------------------------------
|
|
424
|
+
* Defines the state of the element after the animation ends.
|
|
425
|
+
*/
|
|
426
|
+
@utility animation-fill-none {
|
|
427
|
+
animation-fill-mode: none;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@utility animation-fill-forwards {
|
|
431
|
+
animation-fill-mode: forwards;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
@utility animation-fill-backwards {
|
|
435
|
+
animation-fill-mode: backwards;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
@utility animation-fill-both {
|
|
439
|
+
animation-fill-mode: both;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@utility animation-fill-* {
|
|
443
|
+
animation-fill-mode: --value([*]);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Fade Animations
|
|
448
|
+
* -----------------------------------------------------------------------------
|
|
449
|
+
* Create fade-in and fade-out effects.
|
|
450
|
+
*/
|
|
451
|
+
@utility fade-in-* {
|
|
452
|
+
--tw-enter-opacity: calc(--value(integer) * 1%);
|
|
453
|
+
--tw-enter-opacity: --value(--opacity-*, [percentage]);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@utility fade-out-* {
|
|
457
|
+
--tw-exit-opacity: calc(--value(integer) * 1%);
|
|
458
|
+
--tw-exit-opacity: --value(--opacity-*, [percentage]);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Rotate Animations
|
|
463
|
+
* -----------------------------------------------------------------------------
|
|
464
|
+
* Adjust the rotation angle of the element when it appears or disappears.
|
|
465
|
+
*/
|
|
466
|
+
@utility spin-in-* {
|
|
467
|
+
--tw-enter-rotate: calc(1deg * --value(integer));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
@utility spin-out-* {
|
|
471
|
+
--tw-exit-rotate: calc(1deg * --value(integer));
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Scale Animations
|
|
476
|
+
* -----------------------------------------------------------------------------
|
|
477
|
+
* Adjust the size of the element when it appears or disappears.
|
|
478
|
+
*/
|
|
479
|
+
@utility zoom-in-* {
|
|
480
|
+
--tw-enter-scale: --value([percentage]);
|
|
481
|
+
--tw-enter-scale: calc(--value(integer) * 1%);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
@utility zoom-out-* {
|
|
485
|
+
--tw-exit-scale: --value([percentage]);
|
|
486
|
+
--tw-exit-scale: calc(--value(integer) * 1%);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Slide Animations - Enter
|
|
491
|
+
* -----------------------------------------------------------------------------
|
|
492
|
+
* Effects for sliding in from directions: left, right, top, bottom.
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
@utility slide-in-from-top {
|
|
496
|
+
--tw-enter-translate-y: -100%;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@utility slide-in-from-top-* {
|
|
500
|
+
--tw-enter-translate-y: calc(var(--spacing) * --value(number) * -1);
|
|
501
|
+
--tw-enter-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
502
|
+
--tw-enter-translate-y: calc(--value([length], [percentage]) * -1);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
@utility slide-in-from-left {
|
|
506
|
+
--tw-enter-translate-x: -100%;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
@utility slide-in-from-left-* {
|
|
510
|
+
--tw-enter-translate-x: calc(var(--spacing) * --value(number) * -1);
|
|
511
|
+
--tw-enter-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
512
|
+
--tw-enter-translate-x: calc(--value([length], [percentage]) * -1);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@utility slide-in-from-bottom {
|
|
516
|
+
--tw-enter-translate-y: 100%;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@utility slide-in-from-bottom-* {
|
|
520
|
+
--tw-enter-translate-y: calc(var(--spacing) * --value(number));
|
|
521
|
+
--tw-enter-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
522
|
+
--tw-enter-translate-y: --value([length], [percentage]);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@utility slide-in-from-right {
|
|
526
|
+
--tw-enter-translate-x: 100%;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
@utility slide-in-from-right-* {
|
|
530
|
+
--tw-enter-translate-x: calc(var(--spacing) * --value(number));
|
|
531
|
+
--tw-enter-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
532
|
+
--tw-enter-translate-x: --value([length], [percentage]);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Slide Animations - Exit
|
|
537
|
+
* -----------------------------------------------------------------------------
|
|
538
|
+
* Effects for sliding out of the screen in directions: left, right, top, bottom.
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
@utility slide-out-to-top {
|
|
542
|
+
--tw-exit-translate-y: -100%;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
@utility slide-out-to-top-* {
|
|
546
|
+
--tw-exit-translate-y: calc(var(--spacing) * --value(number) * -1);
|
|
547
|
+
--tw-exit-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
548
|
+
--tw-exit-translate-y: calc(--value([length], [percentage]) * -1);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@utility slide-out-to-left {
|
|
552
|
+
--tw-exit-translate-x: -100%;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@utility slide-out-to-left-* {
|
|
556
|
+
--tw-exit-translate-x: calc(var(--spacing) * --value(number) * -1);
|
|
557
|
+
--tw-exit-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
558
|
+
--tw-exit-translate-x: calc(--value([length], [percentage]) * -1);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@utility slide-out-to-bottom {
|
|
562
|
+
--tw-exit-translate-y: 100%;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
@utility slide-out-to-bottom-* {
|
|
566
|
+
--tw-exit-translate-y: calc(var(--spacing) * --value(number));
|
|
567
|
+
--tw-exit-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
568
|
+
--tw-exit-translate-y: --value([length], [percentage]);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@utility slide-out-to-right {
|
|
572
|
+
--tw-exit-translate-x: 100%;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@utility slide-out-to-right-* {
|
|
576
|
+
--tw-exit-translate-x: calc(var(--spacing) * --value(number));
|
|
577
|
+
--tw-exit-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
578
|
+
--tw-exit-translate-x: --value([length], [percentage]);
|
|
579
|
+
}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
'use client'
|
|
2
|
-
import*as e from"react/jsx-runtime";import*as n from"../lib/utils.js";import*as r from"./spinner.js";function
|
|
2
|
+
import*as e from"react/jsx-runtime";import*as n from"../lib/utils.js";import*as r from"./spinner.js";function t({className:t,type:i,disabled:s,prefix:o,suffix:a,inputClassName:l,loading:d,loaderPosition:u="prefix",spinner:f,...c}){return(0,e.jsxs)("div",{className:(0,n.cn)("flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",t),"data-disabled":s,children:[d&&"prefix"===u?f||(0,e.jsx)(r.Spinner,{}):o,(0,e.jsx)("input",{className:(0,n.cn)("peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400",l),type:i,disabled:s,onKeyDown:e=>{"number"===i&&["e","E","+","-"].includes(e.key)&&e.preventDefault()},onFocus:e=>{"number"===i&&e.target.addEventListener("wheel",e=>{e.preventDefault()},{passive:!1})},...c}),d&&"suffix"===u?f||(0,e.jsx)(r.Spinner,{}):a]})}export{t as Input};
|
|
3
3
|
//# sourceMappingURL=input.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"components\\input.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center rounded-md border border-zinc-200 bg-background ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ?
|
|
1
|
+
{"version":3,"file":"components\\input.js","sources":["webpack://@gbmtech/aurora-ui/./src/components/input.tsx"],"sourcesContent":["\r\n\r\nimport { ComponentProps, JSX, ReactNode } from 'react'\r\n\r\nimport { cn } from '../lib/utils'\r\nimport { Spinner } from './spinner'\r\n\r\nexport type InputProps = Omit<ComponentProps<'input'>, 'prefix'> & {\r\n prefix?: ReactNode\r\n suffix?: ReactNode\r\n inputClassName?: string\r\n loaderPosition?: 'prefix' | 'suffix'\r\n loading?: boolean\r\n spinner?: ReactNode\r\n}\r\n\r\nfunction Input({\r\n className,\r\n type,\r\n disabled,\r\n prefix,\r\n suffix,\r\n inputClassName,\r\n loading,\r\n loaderPosition = 'prefix',\r\n spinner,\r\n ...props\r\n}: InputProps): JSX.Element {\r\n return (\r\n <div\r\n className={cn(\r\n 'flex h-12 w-full items-center gap-4 rounded-md border border-zinc-200 bg-background px-4 ring-offset-background placeholder:text-zinc-400 focus-within:outline-none focus-within:ring-2 focus-within:ring-gbm-sky focus-within:ring-offset-2 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50',\r\n className\r\n )}\r\n data-disabled={disabled}\r\n >\r\n {loading && loaderPosition === 'prefix' ? spinner || <Spinner /> : prefix}\r\n\r\n <input\r\n className={cn(\r\n 'peer h-full w-full flex-1 overflow-hidden bg-transparent text-base outline-none placeholder:text-zinc-400',\r\n inputClassName\r\n )}\r\n type={type}\r\n disabled={disabled}\r\n onKeyDown={e => {\r\n if (type === 'number' && ['e', 'E', '+', '-'].includes(e.key)) {\r\n e.preventDefault()\r\n }\r\n }}\r\n onFocus={e => {\r\n if (type === 'number') {\r\n e.target.addEventListener(\r\n 'wheel',\r\n e => {\r\n e.preventDefault()\r\n },\r\n { passive: false }\r\n )\r\n }\r\n }}\r\n {...props}\r\n />\r\n\r\n {loading && loaderPosition === 'suffix' ? spinner || <Spinner /> : suffix}\r\n </div>\r\n )\r\n}\r\n\r\nexport { Input }\r\n"],"names":["Input","className","type","disabled","prefix","suffix","inputClassName","loading","loaderPosition","spinner","props","cn","Spinner","e"],"mappings":";qGAgBA,SAASA,EAAM,CACbC,UAAAA,CAAS,CACTC,KAAAA,CAAI,CACJC,SAAAA,CAAQ,CACRC,OAAAA,CAAM,CACNC,OAAAA,CAAM,CACNC,eAAAA,CAAc,CACdC,QAAAA,CAAO,CACPC,eAAAA,EAAiB,QAAQ,CACzBC,QAAAA,CAAO,CACP,GAAGC,EACQ,EACX,MACE,WAAC,OACC,UAAWC,GAAAA,EAAAA,EAAAA,EACT,uTACAV,GAEF,gBAAeE,E,UAEdI,GAAWC,WAAAA,EAA8BC,GAAW,UAACG,EAAAA,OAAOA,CAAAA,CAAAA,GAAMR,EAEnE,UAAC,SACC,UAAWO,GAAAA,EAAAA,EAAAA,EACT,4GACAL,GAEF,KAAMJ,EACN,SAAUC,EACV,UAAWU,IACLX,WAAAA,GAAqB,CAAC,IAAK,IAAK,IAAK,IAAI,CAAC,QAAQ,CAACW,EAAE,GAAG,GAC1DA,EAAE,cAAc,EAEpB,EACA,QAASA,IACHX,WAAAA,GACFW,EAAE,MAAM,CAAC,gBAAgB,CACvB,QACAA,IACEA,EAAE,cAAc,EAClB,EACA,CAAE,QAAS,EAAM,EAGvB,EACC,GAAGH,CAAK,GAGVH,GAAWC,WAAAA,EAA8BC,GAAW,UAACG,EAAAA,OAAOA,CAAAA,CAAAA,GAAMP,E,EAGzE,Q"}
|
package/dist/esm/index.css
CHANGED
|
@@ -181,3 +181,399 @@
|
|
|
181
181
|
--color-purple-800: #351856;
|
|
182
182
|
--color-purple-900: #2a1440;
|
|
183
183
|
}
|
|
184
|
+
/**
|
|
185
|
+
* Keyframe Animations
|
|
186
|
+
* -----------------------------------------------------------------------------
|
|
187
|
+
* Defines basic animations such as cursor blinking effects,
|
|
188
|
+
* expanding/collapsing content effects.
|
|
189
|
+
*/
|
|
190
|
+
@theme inline {
|
|
191
|
+
--animate-caret-blink: caret-blink 1250ms ease-out infinite;
|
|
192
|
+
--animate-collapsible-up: collapsible-up 200ms ease-in;
|
|
193
|
+
--animate-collapsible-down: collapsible-down 200ms ease-out;
|
|
194
|
+
|
|
195
|
+
@keyframes caret-blink {
|
|
196
|
+
0%,
|
|
197
|
+
70%,
|
|
198
|
+
100% {
|
|
199
|
+
opacity: 1;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
20%,
|
|
203
|
+
50% {
|
|
204
|
+
opacity: 0;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
@keyframes collapsible-up {
|
|
209
|
+
from {
|
|
210
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
211
|
+
height: var(--radix-collapsible-content-height);
|
|
212
|
+
}
|
|
213
|
+
to {
|
|
214
|
+
height: 0;
|
|
215
|
+
}
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
@keyframes collapsible-down {
|
|
219
|
+
from {
|
|
220
|
+
height: 0;
|
|
221
|
+
}
|
|
222
|
+
to {
|
|
223
|
+
/*noinspection CssUnresolvedCustomProperty*/
|
|
224
|
+
height: var(--radix-collapsible-content-height);
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
/**
|
|
230
|
+
* Animation Timing Functions
|
|
231
|
+
* -----------------------------------------------------------------------------
|
|
232
|
+
* Easing functions used to adjust the speed of animation transitions.
|
|
233
|
+
*/
|
|
234
|
+
@theme inline {
|
|
235
|
+
--animate-fade-in: fadeIn 250ms ease-out;
|
|
236
|
+
--animate-fade-out: fadeOut 250ms ease-in;
|
|
237
|
+
|
|
238
|
+
--animate-in: enter 300ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
239
|
+
--animate-out: exit 250ms cubic-bezier(0.32, 0.72, 0, 1);
|
|
240
|
+
|
|
241
|
+
@keyframes fadeIn {
|
|
242
|
+
from {
|
|
243
|
+
opacity: var(--tw-enter-opacity, 0);
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
@keyframes fadeOut {
|
|
248
|
+
to {
|
|
249
|
+
opacity: var(--tw-exit-opacity, 0);
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
@keyframes enter {
|
|
254
|
+
from {
|
|
255
|
+
opacity: var(--tw-enter-opacity, 1);
|
|
256
|
+
transform: translate3d(var(--tw-enter-translate-x, 0), var(--tw-enter-translate-y, 0), 0)
|
|
257
|
+
scale3d(var(--tw-enter-scale, 1), var(--tw-enter-scale, 1), var(--tw-enter-scale, 1))
|
|
258
|
+
rotate(var(--tw-enter-rotate, 0));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
@keyframes exit {
|
|
263
|
+
to {
|
|
264
|
+
opacity: var(--tw-exit-opacity, 1);
|
|
265
|
+
transform: translate3d(var(--tw-exit-translate-x, 0), var(--tw-exit-translate-y, 0), 0)
|
|
266
|
+
scale3d(var(--tw-exit-scale, 1), var(--tw-exit-scale, 1), var(--tw-exit-scale, 1))
|
|
267
|
+
rotate(var(--tw-exit-rotate, 0));
|
|
268
|
+
}
|
|
269
|
+
}
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
/**
|
|
273
|
+
* Animation Timing Functions
|
|
274
|
+
* -----------------------------------------------------------------------------
|
|
275
|
+
* Defines utilities to adjust animation speed.
|
|
276
|
+
*/
|
|
277
|
+
@utility animation-ease-linear {
|
|
278
|
+
animation-timing-function: linear;
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
@utility animation-ease-in {
|
|
282
|
+
animation-timing-function: var(--ease-in);
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
@utility animation-ease-out {
|
|
286
|
+
animation-timing-function: var(--ease-out);
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
@utility animation-ease-in-out {
|
|
290
|
+
animation-timing-function: var(--ease-in-out);
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
@utility animation-ease-initial {
|
|
294
|
+
animation-timing-function: initial;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
@utility animation-ease-* {
|
|
298
|
+
animation-timing-function: --value([*]);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
/**
|
|
302
|
+
* Animation Play State
|
|
303
|
+
* -----------------------------------------------------------------------------
|
|
304
|
+
* Adjust the playback state of the animation.
|
|
305
|
+
*/
|
|
306
|
+
@utility animation-state-paused {
|
|
307
|
+
animation-play-state: paused;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
@utility animation-state-running {
|
|
311
|
+
animation-play-state: running;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
@utility animation-state-initial {
|
|
315
|
+
animation-play-state: initial;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
@utility animation-state-* {
|
|
319
|
+
animation-play-state: --value([*]);
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
/**
|
|
323
|
+
* Animation Repeat
|
|
324
|
+
* -----------------------------------------------------------------------------
|
|
325
|
+
* Controls the number of repetitions of the animation.
|
|
326
|
+
*/
|
|
327
|
+
@utility animation-repeat-infinite {
|
|
328
|
+
animation-iteration-count: infinite;
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
@utility animation-repeat-initial {
|
|
332
|
+
animation-iteration-count: initial;
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
@utility animation-repeat-* {
|
|
336
|
+
animation-iteration-count: --value(integer, [integer]);
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
/**
|
|
340
|
+
* Animation Composition
|
|
341
|
+
* -----------------------------------------------------------------------------
|
|
342
|
+
* Defines how animations combine with each other.
|
|
343
|
+
*/
|
|
344
|
+
@utility animation-composition-replace {
|
|
345
|
+
animation-composition: replace;
|
|
346
|
+
}
|
|
347
|
+
|
|
348
|
+
@utility animation-composition-add {
|
|
349
|
+
animation-composition: add;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
@utility animation-composition-accumulate {
|
|
353
|
+
animation-composition: accumulate;
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
@utility animation-composition-initial {
|
|
357
|
+
animation-composition: initial;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
@utility animation-composition-* {
|
|
361
|
+
animation-composition: --value([*]);
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
/**
|
|
365
|
+
* Animation Delay
|
|
366
|
+
* -----------------------------------------------------------------------------
|
|
367
|
+
* Adjust the delay time before the animation starts.
|
|
368
|
+
*/
|
|
369
|
+
@utility animation-delay-initial {
|
|
370
|
+
animation-delay: initial;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
@utility animation-delay-* {
|
|
374
|
+
animation-delay: calc(--value(integer) * 1ms);
|
|
375
|
+
animation-delay: --value([*]);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Animation Direction
|
|
380
|
+
* -----------------------------------------------------------------------------
|
|
381
|
+
* Determines the playback direction of the animation.
|
|
382
|
+
*/
|
|
383
|
+
@utility animation-direction-normal {
|
|
384
|
+
animation-direction: normal;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
@utility animation-direction-reverse {
|
|
388
|
+
animation-direction: reverse;
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
@utility animation-direction-alternate {
|
|
392
|
+
animation-direction: alternate;
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
@utility animation-direction-alternate-reverse {
|
|
396
|
+
animation-direction: alternate-reverse;
|
|
397
|
+
}
|
|
398
|
+
|
|
399
|
+
@utility animation-direction-initial {
|
|
400
|
+
animation-direction: initial;
|
|
401
|
+
}
|
|
402
|
+
|
|
403
|
+
@utility animation-direction-* {
|
|
404
|
+
animation-direction: --value([*]);
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Animation Duration
|
|
409
|
+
* -----------------------------------------------------------------------------
|
|
410
|
+
* Defines the duration of the animation execution.
|
|
411
|
+
*/
|
|
412
|
+
@utility animation-duration-initial {
|
|
413
|
+
animation-duration: initial;
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
@utility animation-duration-* {
|
|
417
|
+
animation-duration: calc(--value(integer) * 1ms);
|
|
418
|
+
animation-duration: --value([*]);
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* Animation Fill Mode
|
|
423
|
+
* -----------------------------------------------------------------------------
|
|
424
|
+
* Defines the state of the element after the animation ends.
|
|
425
|
+
*/
|
|
426
|
+
@utility animation-fill-none {
|
|
427
|
+
animation-fill-mode: none;
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
@utility animation-fill-forwards {
|
|
431
|
+
animation-fill-mode: forwards;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
@utility animation-fill-backwards {
|
|
435
|
+
animation-fill-mode: backwards;
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
@utility animation-fill-both {
|
|
439
|
+
animation-fill-mode: both;
|
|
440
|
+
}
|
|
441
|
+
|
|
442
|
+
@utility animation-fill-* {
|
|
443
|
+
animation-fill-mode: --value([*]);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Fade Animations
|
|
448
|
+
* -----------------------------------------------------------------------------
|
|
449
|
+
* Create fade-in and fade-out effects.
|
|
450
|
+
*/
|
|
451
|
+
@utility fade-in-* {
|
|
452
|
+
--tw-enter-opacity: calc(--value(integer) * 1%);
|
|
453
|
+
--tw-enter-opacity: --value(--opacity-*, [percentage]);
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
@utility fade-out-* {
|
|
457
|
+
--tw-exit-opacity: calc(--value(integer) * 1%);
|
|
458
|
+
--tw-exit-opacity: --value(--opacity-*, [percentage]);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* Rotate Animations
|
|
463
|
+
* -----------------------------------------------------------------------------
|
|
464
|
+
* Adjust the rotation angle of the element when it appears or disappears.
|
|
465
|
+
*/
|
|
466
|
+
@utility spin-in-* {
|
|
467
|
+
--tw-enter-rotate: calc(1deg * --value(integer));
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
@utility spin-out-* {
|
|
471
|
+
--tw-exit-rotate: calc(1deg * --value(integer));
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* Scale Animations
|
|
476
|
+
* -----------------------------------------------------------------------------
|
|
477
|
+
* Adjust the size of the element when it appears or disappears.
|
|
478
|
+
*/
|
|
479
|
+
@utility zoom-in-* {
|
|
480
|
+
--tw-enter-scale: --value([percentage]);
|
|
481
|
+
--tw-enter-scale: calc(--value(integer) * 1%);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
@utility zoom-out-* {
|
|
485
|
+
--tw-exit-scale: --value([percentage]);
|
|
486
|
+
--tw-exit-scale: calc(--value(integer) * 1%);
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
/**
|
|
490
|
+
* Slide Animations - Enter
|
|
491
|
+
* -----------------------------------------------------------------------------
|
|
492
|
+
* Effects for sliding in from directions: left, right, top, bottom.
|
|
493
|
+
*/
|
|
494
|
+
|
|
495
|
+
@utility slide-in-from-top {
|
|
496
|
+
--tw-enter-translate-y: -100%;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
@utility slide-in-from-top-* {
|
|
500
|
+
--tw-enter-translate-y: calc(var(--spacing) * --value(number) * -1);
|
|
501
|
+
--tw-enter-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
502
|
+
--tw-enter-translate-y: calc(--value([length], [percentage]) * -1);
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
@utility slide-in-from-left {
|
|
506
|
+
--tw-enter-translate-x: -100%;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
@utility slide-in-from-left-* {
|
|
510
|
+
--tw-enter-translate-x: calc(var(--spacing) * --value(number) * -1);
|
|
511
|
+
--tw-enter-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
512
|
+
--tw-enter-translate-x: calc(--value([length], [percentage]) * -1);
|
|
513
|
+
}
|
|
514
|
+
|
|
515
|
+
@utility slide-in-from-bottom {
|
|
516
|
+
--tw-enter-translate-y: 100%;
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
@utility slide-in-from-bottom-* {
|
|
520
|
+
--tw-enter-translate-y: calc(var(--spacing) * --value(number));
|
|
521
|
+
--tw-enter-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
522
|
+
--tw-enter-translate-y: --value([length], [percentage]);
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
@utility slide-in-from-right {
|
|
526
|
+
--tw-enter-translate-x: 100%;
|
|
527
|
+
}
|
|
528
|
+
|
|
529
|
+
@utility slide-in-from-right-* {
|
|
530
|
+
--tw-enter-translate-x: calc(var(--spacing) * --value(number));
|
|
531
|
+
--tw-enter-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
532
|
+
--tw-enter-translate-x: --value([length], [percentage]);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Slide Animations - Exit
|
|
537
|
+
* -----------------------------------------------------------------------------
|
|
538
|
+
* Effects for sliding out of the screen in directions: left, right, top, bottom.
|
|
539
|
+
*/
|
|
540
|
+
|
|
541
|
+
@utility slide-out-to-top {
|
|
542
|
+
--tw-exit-translate-y: -100%;
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
@utility slide-out-to-top-* {
|
|
546
|
+
--tw-exit-translate-y: calc(var(--spacing) * --value(number) * -1);
|
|
547
|
+
--tw-exit-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
548
|
+
--tw-exit-translate-y: calc(--value([length], [percentage]) * -1);
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
@utility slide-out-to-left {
|
|
552
|
+
--tw-exit-translate-x: -100%;
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
@utility slide-out-to-left-* {
|
|
556
|
+
--tw-exit-translate-x: calc(var(--spacing) * --value(number) * -1);
|
|
557
|
+
--tw-exit-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * -100%);
|
|
558
|
+
--tw-exit-translate-x: calc(--value([length], [percentage]) * -1);
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
@utility slide-out-to-bottom {
|
|
562
|
+
--tw-exit-translate-y: 100%;
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
@utility slide-out-to-bottom-* {
|
|
566
|
+
--tw-exit-translate-y: calc(var(--spacing) * --value(number));
|
|
567
|
+
--tw-exit-translate-y: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
568
|
+
--tw-exit-translate-y: --value([length], [percentage]);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
@utility slide-out-to-right {
|
|
572
|
+
--tw-exit-translate-x: 100%;
|
|
573
|
+
}
|
|
574
|
+
|
|
575
|
+
@utility slide-out-to-right-* {
|
|
576
|
+
--tw-exit-translate-x: calc(var(--spacing) * --value(number));
|
|
577
|
+
--tw-exit-translate-x: calc(--value(--aspect-ratio-*, ratio, [ratio]) * 100%);
|
|
578
|
+
--tw-exit-translate-x: --value([length], [percentage]);
|
|
579
|
+
}
|