@codefast/ui 0.0.65 → 0.0.67
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/dist/{chunk-ZMF2SRE5.js → chunk-26W5NJTU.js} +1 -1
- package/dist/chunk-26W5NJTU.js.map +1 -0
- package/dist/chunk-3COHZ24E.cjs +2 -0
- package/dist/chunk-3COHZ24E.cjs.map +1 -0
- package/dist/{chunk-QEWITXOV.cjs → chunk-4MTN7WZ2.cjs} +1 -1
- package/dist/chunk-4MTN7WZ2.cjs.map +1 -0
- package/dist/chunk-5QETIFO4.js +2 -0
- package/dist/chunk-5QETIFO4.js.map +1 -0
- package/dist/{chunk-WECV77JD.cjs → chunk-5RJANBDJ.cjs} +1 -1
- package/dist/chunk-5RJANBDJ.cjs.map +1 -0
- package/dist/chunk-6UQKMUZG.cjs +2 -0
- package/dist/chunk-6UQKMUZG.cjs.map +1 -0
- package/dist/chunk-AVEDWLNQ.js +2 -0
- package/dist/chunk-AVEDWLNQ.js.map +1 -0
- package/dist/{chunk-YLE5XFEO.cjs → chunk-EW7DAPDC.cjs} +1 -1
- package/dist/chunk-EW7DAPDC.cjs.map +1 -0
- package/dist/{chunk-RSNKUKY7.js → chunk-HDHZESSG.js} +1 -1
- package/dist/chunk-HDHZESSG.js.map +1 -0
- package/dist/{chunk-GCHNSK5O.cjs → chunk-JMM2MTPI.cjs} +1 -1
- package/dist/chunk-JMM2MTPI.cjs.map +1 -0
- package/dist/{chunk-WRO3QIWH.js → chunk-JNOLIDCD.js} +1 -1
- package/dist/chunk-JNOLIDCD.js.map +1 -0
- package/dist/{chunk-F5TIIJJJ.cjs → chunk-LOJBMYTH.cjs} +1 -1
- package/dist/chunk-LOJBMYTH.cjs.map +1 -0
- package/dist/{chunk-A5ILA637.js → chunk-RBP4PBCK.js} +1 -1
- package/dist/chunk-RBP4PBCK.js.map +1 -0
- package/dist/{chunk-L7IASKCH.js → chunk-RVGKUNXC.js} +1 -1
- package/dist/{chunk-L7IASKCH.js.map → chunk-RVGKUNXC.js.map} +1 -1
- package/dist/{chunk-72NPDP3X.cjs → chunk-T3G5USVY.cjs} +1 -1
- package/dist/chunk-T3G5USVY.cjs.map +1 -0
- package/dist/chunk-VDVLCSO4.js +2 -0
- package/dist/chunk-VDVLCSO4.js.map +1 -0
- package/dist/{chunk-2OBTJ7SD.cjs → chunk-WKKCZQNO.cjs} +2 -2
- package/dist/chunk-WKKCZQNO.cjs.map +1 -0
- package/dist/{chunk-FNQFZJUG.js → chunk-WQFHFTYS.js} +1 -1
- package/dist/chunk-WQFHFTYS.js.map +1 -0
- package/dist/react/accordion.cjs.map +1 -1
- package/dist/react/accordion.js.map +1 -1
- package/dist/react/alert-dialog.cjs +1 -1
- package/dist/react/alert-dialog.cjs.map +1 -1
- package/dist/react/alert-dialog.js +1 -1
- package/dist/react/alert-dialog.js.map +1 -1
- package/dist/react/alert.cjs.map +1 -1
- package/dist/react/alert.js.map +1 -1
- package/dist/react/avatar.cjs.map +1 -1
- package/dist/react/avatar.js.map +1 -1
- package/dist/react/blockquote.cjs.map +1 -1
- package/dist/react/blockquote.js.map +1 -1
- package/dist/react/box.cjs.map +1 -1
- package/dist/react/box.js.map +1 -1
- package/dist/react/breadcrumb.cjs.map +1 -1
- package/dist/react/breadcrumb.js.map +1 -1
- package/dist/react/button.cjs +1 -1
- package/dist/react/button.js +1 -1
- package/dist/react/calendar.cjs +1 -1
- package/dist/react/calendar.js +1 -1
- package/dist/react/card.cjs.map +1 -1
- package/dist/react/card.js.map +1 -1
- package/dist/react/carousel.cjs +1 -1
- package/dist/react/carousel.cjs.map +1 -1
- package/dist/react/carousel.js +1 -1
- package/dist/react/carousel.js.map +1 -1
- package/dist/react/checkbox-cards.cjs +1 -1
- package/dist/react/checkbox-cards.cjs.map +1 -1
- package/dist/react/checkbox-cards.js +1 -1
- package/dist/react/checkbox-cards.js.map +1 -1
- package/dist/react/checkbox-group.cjs +1 -1
- package/dist/react/checkbox-group.cjs.map +1 -1
- package/dist/react/checkbox-group.js +1 -1
- package/dist/react/checkbox-group.js.map +1 -1
- package/dist/react/checkbox-group.primitive.cjs +1 -1
- package/dist/react/checkbox-group.primitive.js +1 -1
- package/dist/react/checkbox.cjs +1 -1
- package/dist/react/checkbox.cjs.map +1 -1
- package/dist/react/checkbox.js +1 -1
- package/dist/react/checkbox.js.map +1 -1
- package/dist/react/code.cjs.map +1 -1
- package/dist/react/code.js.map +1 -1
- package/dist/react/collapsible.cjs.map +1 -1
- package/dist/react/collapsible.js.map +1 -1
- package/dist/react/command.cjs +1 -1
- package/dist/react/command.cjs.map +1 -1
- package/dist/react/command.js +1 -1
- package/dist/react/command.js.map +1 -1
- package/dist/react/container.cjs.map +1 -1
- package/dist/react/container.js.map +1 -1
- package/dist/react/context-menu.cjs.map +1 -1
- package/dist/react/context-menu.js.map +1 -1
- package/dist/react/data-table.cjs +1 -1
- package/dist/react/data-table.js +1 -1
- package/dist/react/dialog.cjs +1 -1
- package/dist/react/dialog.js +1 -1
- package/dist/react/drawer.cjs.map +1 -1
- package/dist/react/drawer.js.map +1 -1
- package/dist/react/dropdown-menu.cjs +1 -1
- package/dist/react/dropdown-menu.js +1 -1
- package/dist/react/em.cjs.map +1 -1
- package/dist/react/em.js.map +1 -1
- package/dist/react/form.cjs +1 -1
- package/dist/react/form.cjs.map +1 -1
- package/dist/react/form.js +1 -1
- package/dist/react/form.js.map +1 -1
- package/dist/react/heading.cjs.map +1 -1
- package/dist/react/heading.js.map +1 -1
- package/dist/react/hover-card.cjs.map +1 -1
- package/dist/react/hover-card.js.map +1 -1
- package/dist/react/input-otp.cjs +1 -1
- package/dist/react/input-otp.cjs.map +1 -1
- package/dist/react/input-otp.js +1 -1
- package/dist/react/input-otp.js.map +1 -1
- package/dist/react/input.cjs +1 -1
- package/dist/react/input.cjs.map +1 -1
- package/dist/react/input.d.cts +113 -34
- package/dist/react/input.d.ts +113 -34
- package/dist/react/input.js +1 -1
- package/dist/react/input.js.map +1 -1
- package/dist/react/kbd.cjs.map +1 -1
- package/dist/react/kbd.js.map +1 -1
- package/dist/react/label.cjs +1 -1
- package/dist/react/label.js +1 -1
- package/dist/react/menubar.cjs.map +1 -1
- package/dist/react/menubar.js.map +1 -1
- package/dist/react/navigation-menu.cjs.map +1 -1
- package/dist/react/navigation-menu.js.map +1 -1
- package/dist/react/pagination.cjs +1 -1
- package/dist/react/pagination.cjs.map +1 -1
- package/dist/react/pagination.js +1 -1
- package/dist/react/pagination.js.map +1 -1
- package/dist/react/popover.cjs.map +1 -1
- package/dist/react/popover.js.map +1 -1
- package/dist/react/pre.cjs.map +1 -1
- package/dist/react/pre.js.map +1 -1
- package/dist/react/progress.cjs.map +1 -1
- package/dist/react/progress.js.map +1 -1
- package/dist/react/quote.cjs.map +1 -1
- package/dist/react/quote.js.map +1 -1
- package/dist/react/radio-cards.cjs +1 -1
- package/dist/react/radio-cards.cjs.map +1 -1
- package/dist/react/radio-cards.js +1 -1
- package/dist/react/radio-cards.js.map +1 -1
- package/dist/react/radio-group.cjs.map +1 -1
- package/dist/react/radio-group.js.map +1 -1
- package/dist/react/radio.cjs.map +1 -1
- package/dist/react/radio.js.map +1 -1
- package/dist/react/scroll-area.cjs.map +1 -1
- package/dist/react/scroll-area.js.map +1 -1
- package/dist/react/section.cjs.map +1 -1
- package/dist/react/section.js.map +1 -1
- package/dist/react/select.cjs +1 -1
- package/dist/react/select.js +1 -1
- package/dist/react/separator.cjs.map +1 -1
- package/dist/react/separator.js.map +1 -1
- package/dist/react/sheet.cjs.map +1 -1
- package/dist/react/sheet.js.map +1 -1
- package/dist/react/slider.cjs.map +1 -1
- package/dist/react/slider.js.map +1 -1
- package/dist/react/spinner.cjs +1 -1
- package/dist/react/spinner.js +1 -1
- package/dist/react/strong.cjs.map +1 -1
- package/dist/react/strong.js.map +1 -1
- package/dist/react/switch.cjs +1 -1
- package/dist/react/switch.cjs.map +1 -1
- package/dist/react/switch.js +1 -1
- package/dist/react/switch.js.map +1 -1
- package/dist/react/table.cjs.map +1 -1
- package/dist/react/table.js.map +1 -1
- package/dist/react/tabs.cjs.map +1 -1
- package/dist/react/tabs.js.map +1 -1
- package/dist/react/text-input.cjs +2 -0
- package/dist/react/text-input.cjs.map +1 -0
- package/dist/react/text-input.d.cts +11 -0
- package/dist/react/text-input.d.ts +11 -0
- package/dist/react/text-input.js +2 -0
- package/dist/react/text-input.js.map +1 -0
- package/dist/react/text.cjs.map +1 -1
- package/dist/react/text.js.map +1 -1
- package/dist/react/textarea.cjs +1 -1
- package/dist/react/textarea.cjs.map +1 -1
- package/dist/react/textarea.js +1 -1
- package/dist/react/textarea.js.map +1 -1
- package/dist/react/toggle-group.cjs +1 -1
- package/dist/react/toggle-group.cjs.map +1 -1
- package/dist/react/toggle-group.js +1 -1
- package/dist/react/toggle-group.js.map +1 -1
- package/dist/react/toggle.cjs +1 -1
- package/dist/react/toggle.js +1 -1
- package/dist/react/tooltip.cjs.map +1 -1
- package/dist/react/tooltip.js.map +1 -1
- package/dist/styles.css +1 -1
- package/dist/styles.css.map +1 -1
- package/package.json +76 -102
- package/dist/chunk-2OBTJ7SD.cjs.map +0 -1
- package/dist/chunk-3OEPCFBF.cjs +0 -2
- package/dist/chunk-3OEPCFBF.cjs.map +0 -1
- package/dist/chunk-6AFJCDFU.js +0 -2
- package/dist/chunk-6AFJCDFU.js.map +0 -1
- package/dist/chunk-72NPDP3X.cjs.map +0 -1
- package/dist/chunk-7CHCTEST.js +0 -2
- package/dist/chunk-7CHCTEST.js.map +0 -1
- package/dist/chunk-A5ILA637.js.map +0 -1
- package/dist/chunk-DH3YP4ZC.cjs +0 -2
- package/dist/chunk-DH3YP4ZC.cjs.map +0 -1
- package/dist/chunk-DTSAQICV.js +0 -2
- package/dist/chunk-DTSAQICV.js.map +0 -1
- package/dist/chunk-F5TIIJJJ.cjs.map +0 -1
- package/dist/chunk-FNQFZJUG.js.map +0 -1
- package/dist/chunk-GCHNSK5O.cjs.map +0 -1
- package/dist/chunk-NH6X3FON.js +0 -2
- package/dist/chunk-NH6X3FON.js.map +0 -1
- package/dist/chunk-P563ILDJ.cjs +0 -2
- package/dist/chunk-P563ILDJ.cjs.map +0 -1
- package/dist/chunk-QEWITXOV.cjs.map +0 -1
- package/dist/chunk-RSNKUKY7.js.map +0 -1
- package/dist/chunk-VVA2EE5V.js +0 -2
- package/dist/chunk-VVA2EE5V.js.map +0 -1
- package/dist/chunk-VZ6P3BCB.cjs +0 -2
- package/dist/chunk-VZ6P3BCB.cjs.map +0 -1
- package/dist/chunk-WECV77JD.cjs.map +0 -1
- package/dist/chunk-WRO3QIWH.js.map +0 -1
- package/dist/chunk-YLE5XFEO.cjs.map +0 -1
- package/dist/chunk-ZMF2SRE5.js.map +0 -1
- package/dist/hooks/use-media-query.cjs +0 -2
- package/dist/hooks/use-media-query.cjs.map +0 -1
- package/dist/hooks/use-media-query.d.cts +0 -3
- package/dist/hooks/use-media-query.d.ts +0 -3
- package/dist/hooks/use-media-query.js +0 -2
- package/dist/hooks/use-media-query.js.map +0 -1
- package/dist/hooks/use-mutation-observer.cjs +0 -2
- package/dist/hooks/use-mutation-observer.cjs.map +0 -1
- package/dist/hooks/use-mutation-observer.d.cts +0 -5
- package/dist/hooks/use-mutation-observer.d.ts +0 -5
- package/dist/hooks/use-mutation-observer.js +0 -2
- package/dist/hooks/use-mutation-observer.js.map +0 -1
- package/dist/lib/colors.cjs +0 -2
- package/dist/lib/colors.cjs.map +0 -1
- package/dist/lib/colors.d.cts +0 -1759
- package/dist/lib/colors.d.ts +0 -1759
- package/dist/lib/colors.js +0 -2
- package/dist/lib/colors.js.map +0 -1
- package/dist/plugin/animate.plugin.cjs +0 -2
- package/dist/plugin/animate.plugin.cjs.map +0 -1
- package/dist/plugin/animate.plugin.js +0 -2
- package/dist/plugin/animate.plugin.js.map +0 -1
- package/dist/plugin/base.plugin.cjs +0 -2
- package/dist/plugin/base.plugin.cjs.map +0 -1
- package/dist/plugin/base.plugin.js +0 -2
- package/dist/plugin/base.plugin.js.map +0 -1
- package/dist/plugin/perspective.plugin.cjs +0 -2
- package/dist/plugin/perspective.plugin.cjs.map +0 -1
- package/dist/plugin/perspective.plugin.js +0 -2
- package/dist/plugin/perspective.plugin.js.map +0 -1
- package/dist/tailwind.config.cjs +0 -2
- package/dist/tailwind.config.cjs.map +0 -1
- package/dist/tailwind.config.js +0 -2
- package/dist/tailwind.config.js.map +0 -1
- package/plugin/animate.plugin.ts +0 -319
- package/plugin/base.plugin.ts +0 -21
- package/plugin/perspective.plugin.ts +0 -11
- package/src/hooks/use-media-query.ts +0 -22
- package/src/hooks/use-mutation-observer.ts +0 -26
- package/src/lib/colors.ts +0 -1757
- package/src/lib/utils.ts +0 -6
- package/src/react/accordion.tsx +0 -86
- package/src/react/alert-dialog.tsx +0 -177
- package/src/react/alert.tsx +0 -71
- package/src/react/aspect-ratio.tsx +0 -17
- package/src/react/avatar.tsx +0 -58
- package/src/react/badge.tsx +0 -39
- package/src/react/blockquote.tsx +0 -26
- package/src/react/box.tsx +0 -34
- package/src/react/breadcrumb.tsx +0 -148
- package/src/react/button.tsx +0 -95
- package/src/react/calendar.tsx +0 -79
- package/src/react/card.tsx +0 -103
- package/src/react/carousel.tsx +0 -299
- package/src/react/checkbox-cards.tsx +0 -59
- package/src/react/checkbox-group.primitive.tsx +0 -200
- package/src/react/checkbox-group.tsx +0 -53
- package/src/react/checkbox.tsx +0 -36
- package/src/react/code.tsx +0 -26
- package/src/react/collapsible.tsx +0 -54
- package/src/react/command.tsx +0 -199
- package/src/react/container.tsx +0 -27
- package/src/react/context-menu.tsx +0 -302
- package/src/react/data-table.tsx +0 -249
- package/src/react/dialog.tsx +0 -156
- package/src/react/drawer.tsx +0 -132
- package/src/react/dropdown-menu.tsx +0 -286
- package/src/react/em.tsx +0 -26
- package/src/react/form.tsx +0 -218
- package/src/react/heading.tsx +0 -27
- package/src/react/hover-card.tsx +0 -73
- package/src/react/input-otp.tsx +0 -114
- package/src/react/input.tsx +0 -42
- package/src/react/kbd.tsx +0 -36
- package/src/react/label.tsx +0 -31
- package/src/react/menubar.tsx +0 -316
- package/src/react/navigation-menu.tsx +0 -192
- package/src/react/pagination.tsx +0 -150
- package/src/react/popover.tsx +0 -82
- package/src/react/pre.tsx +0 -26
- package/src/react/progress.tsx +0 -35
- package/src/react/quote.tsx +0 -26
- package/src/react/radio-cards.tsx +0 -46
- package/src/react/radio-group.tsx +0 -48
- package/src/react/radio.tsx +0 -38
- package/src/react/resizable.tsx +0 -62
- package/src/react/scroll-area.tsx +0 -106
- package/src/react/section.tsx +0 -26
- package/src/react/select.tsx +0 -217
- package/src/react/separator.tsx +0 -32
- package/src/react/sheet.tsx +0 -170
- package/src/react/skeleton.tsx +0 -18
- package/src/react/slider.tsx +0 -41
- package/src/react/sonner.tsx +0 -40
- package/src/react/spinner.tsx +0 -68
- package/src/react/strong.tsx +0 -26
- package/src/react/switch.tsx +0 -33
- package/src/react/table.tsx +0 -142
- package/src/react/tabs.tsx +0 -87
- package/src/react/text.tsx +0 -34
- package/src/react/textarea.tsx +0 -30
- package/src/react/toggle-group.tsx +0 -81
- package/src/react/toggle.tsx +0 -49
- package/src/react/tooltip.tsx +0 -81
- package/src/styles/styles.css +0 -3
- package/tailwind.config.ts +0 -126
package/plugin/animate.plugin.ts
DELETED
|
@@ -1,319 +0,0 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
import { type Config } from 'tailwindcss/types/config';
|
|
3
|
-
|
|
4
|
-
type Theme = <TDefaultValue = Config['theme']>(path?: string, defaultValue?: TDefaultValue) => TDefaultValue;
|
|
5
|
-
|
|
6
|
-
const animate = plugin(
|
|
7
|
-
({ addUtilities, matchUtilities, theme }) => {
|
|
8
|
-
// Keyframes
|
|
9
|
-
addUtilities({
|
|
10
|
-
'@keyframes in': {
|
|
11
|
-
from: {
|
|
12
|
-
opacity: 'var(--animate-in-opacity, 1)',
|
|
13
|
-
transform: [
|
|
14
|
-
'translate3d(var(--animate-in-translate-x, 0), var(--animate-in-translate-y, 0), 0)',
|
|
15
|
-
'scale3d(var(--animate-in-scale, 1), var(--animate-in-scale, 1), var(--animate-in-scale, 1))',
|
|
16
|
-
'rotate(var(--animate-in-rotate, 0))',
|
|
17
|
-
].join(' '),
|
|
18
|
-
},
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
'@keyframes out': {
|
|
22
|
-
to: {
|
|
23
|
-
opacity: 'var(--animate-out-opacity, 1)',
|
|
24
|
-
transform: [
|
|
25
|
-
'translate3d(var(--animate-out-translate-x, 0), var(--animate-out-translate-y, 0), 0)',
|
|
26
|
-
'scale3d(var(--animate-out-scale, 1), var(--animate-out-scale, 1), var(--animate-out-scale, 1))',
|
|
27
|
-
'rotate(var(--animate-out-rotate, 0))',
|
|
28
|
-
].join(' '),
|
|
29
|
-
},
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
'@keyframes fade-in': {
|
|
33
|
-
from: {
|
|
34
|
-
opacity: 'var(--animate-in-opacity, 0)',
|
|
35
|
-
},
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
'@keyframes fade-out': {
|
|
39
|
-
to: {
|
|
40
|
-
opacity: 'var(--animate-out-opacity, 0)',
|
|
41
|
-
},
|
|
42
|
-
},
|
|
43
|
-
|
|
44
|
-
'.animate-in': {
|
|
45
|
-
animationName: 'in',
|
|
46
|
-
animationDuration: theme('animationDuration.DEFAULT'),
|
|
47
|
-
'--animate-in-opacity': 'initial',
|
|
48
|
-
'--animate-in-scale': 'initial',
|
|
49
|
-
'--animate-in-rotate': 'initial',
|
|
50
|
-
'--animate-in-translate-x': 'initial',
|
|
51
|
-
'--animate-in-translate-y': 'initial',
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
'.animate-out': {
|
|
55
|
-
animationName: 'out',
|
|
56
|
-
animationDuration: theme('animationDuration.DEFAULT'),
|
|
57
|
-
'--animate-out-opacity': 'initial',
|
|
58
|
-
'--animate-out-scale': 'initial',
|
|
59
|
-
'--animate-out-rotate': 'initial',
|
|
60
|
-
'--animate-out-translate-x': 'initial',
|
|
61
|
-
'--animate-out-translate-y': 'initial',
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
'.animate-fade-in': {
|
|
65
|
-
animationName: 'fade-in',
|
|
66
|
-
animationDuration: theme('animationDuration.DEFAULT'),
|
|
67
|
-
'--animate-in-opacity': 'initial',
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
'.animate-fade-out': {
|
|
71
|
-
animationName: 'fade-out',
|
|
72
|
-
animationDuration: theme('animationDuration.DEFAULT'),
|
|
73
|
-
'--animate-out-opacity': 'initial',
|
|
74
|
-
},
|
|
75
|
-
});
|
|
76
|
-
|
|
77
|
-
// Play state
|
|
78
|
-
addUtilities({
|
|
79
|
-
'.animation-running': {
|
|
80
|
-
animationPlayState: 'running',
|
|
81
|
-
},
|
|
82
|
-
'.animation-paused': {
|
|
83
|
-
animationPlayState: 'paused',
|
|
84
|
-
},
|
|
85
|
-
});
|
|
86
|
-
|
|
87
|
-
// Delay
|
|
88
|
-
matchUtilities(
|
|
89
|
-
{
|
|
90
|
-
'animate-delay': (value) => ({
|
|
91
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
92
|
-
animationDelay: value,
|
|
93
|
-
}),
|
|
94
|
-
},
|
|
95
|
-
{
|
|
96
|
-
values: theme('animationDelay'),
|
|
97
|
-
},
|
|
98
|
-
);
|
|
99
|
-
|
|
100
|
-
// Direction
|
|
101
|
-
matchUtilities(
|
|
102
|
-
{
|
|
103
|
-
'animate-direction': (value) => ({
|
|
104
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
105
|
-
animationDirection: value,
|
|
106
|
-
}),
|
|
107
|
-
},
|
|
108
|
-
{
|
|
109
|
-
values: theme('animationDirection'),
|
|
110
|
-
},
|
|
111
|
-
);
|
|
112
|
-
|
|
113
|
-
// Duration
|
|
114
|
-
matchUtilities(
|
|
115
|
-
{
|
|
116
|
-
'animate-duration': (value) => ({
|
|
117
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
118
|
-
animationDuration: value,
|
|
119
|
-
}),
|
|
120
|
-
},
|
|
121
|
-
{
|
|
122
|
-
values: theme('animationDuration'),
|
|
123
|
-
},
|
|
124
|
-
);
|
|
125
|
-
|
|
126
|
-
// Fill mode
|
|
127
|
-
matchUtilities(
|
|
128
|
-
{
|
|
129
|
-
'animate-fill-mode': (value) => ({
|
|
130
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
131
|
-
animationFillMode: value,
|
|
132
|
-
}),
|
|
133
|
-
},
|
|
134
|
-
{
|
|
135
|
-
values: theme('animationFillMode'),
|
|
136
|
-
},
|
|
137
|
-
);
|
|
138
|
-
|
|
139
|
-
// Opacity
|
|
140
|
-
matchUtilities(
|
|
141
|
-
{
|
|
142
|
-
'fade-in': (value) => ({
|
|
143
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
144
|
-
'--animate-in-opacity': value,
|
|
145
|
-
}),
|
|
146
|
-
'fade-out': (value) => ({
|
|
147
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
148
|
-
'--animate-out-opacity': value,
|
|
149
|
-
}),
|
|
150
|
-
},
|
|
151
|
-
{
|
|
152
|
-
values: theme('animationOpacity'),
|
|
153
|
-
},
|
|
154
|
-
);
|
|
155
|
-
|
|
156
|
-
// Repeat
|
|
157
|
-
matchUtilities(
|
|
158
|
-
{
|
|
159
|
-
'animate-repeat': (value) => ({
|
|
160
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
161
|
-
animationIterationCount: value,
|
|
162
|
-
}),
|
|
163
|
-
},
|
|
164
|
-
{
|
|
165
|
-
values: theme('animationRepeat'),
|
|
166
|
-
},
|
|
167
|
-
);
|
|
168
|
-
|
|
169
|
-
// Rotate
|
|
170
|
-
matchUtilities(
|
|
171
|
-
{
|
|
172
|
-
'spin-in': (value) => ({
|
|
173
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
174
|
-
'--animate-in-rotate': value,
|
|
175
|
-
}),
|
|
176
|
-
'spin-out': (value) => ({
|
|
177
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
178
|
-
'--animate-out-rotate': value,
|
|
179
|
-
}),
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
values: theme('animationRotate'),
|
|
183
|
-
},
|
|
184
|
-
);
|
|
185
|
-
|
|
186
|
-
// Scale – Zoom
|
|
187
|
-
matchUtilities(
|
|
188
|
-
{
|
|
189
|
-
'zoom-in': (value) => ({
|
|
190
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
191
|
-
'--animate-in-scale': value,
|
|
192
|
-
}),
|
|
193
|
-
'zoom-out': (value) => ({
|
|
194
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
195
|
-
'--animate-out-scale': value,
|
|
196
|
-
}),
|
|
197
|
-
},
|
|
198
|
-
{
|
|
199
|
-
values: theme('animationScale'),
|
|
200
|
-
},
|
|
201
|
-
);
|
|
202
|
-
|
|
203
|
-
// Timing function
|
|
204
|
-
matchUtilities(
|
|
205
|
-
{
|
|
206
|
-
'animate-ease': (value) => ({
|
|
207
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
208
|
-
animationTimingFunction: value,
|
|
209
|
-
}),
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
values: theme('animationTimingFunction'),
|
|
213
|
-
},
|
|
214
|
-
);
|
|
215
|
-
|
|
216
|
-
// Translate - Slide
|
|
217
|
-
matchUtilities(
|
|
218
|
-
{
|
|
219
|
-
'slide-in-from-top': (value) => ({
|
|
220
|
-
'--animate-in-translate-y': `-${value}`,
|
|
221
|
-
}),
|
|
222
|
-
|
|
223
|
-
'slide-in-from-bottom': (value) => ({
|
|
224
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
225
|
-
'--animate-in-translate-y': value,
|
|
226
|
-
}),
|
|
227
|
-
|
|
228
|
-
'slide-in-from-left': (value) => ({
|
|
229
|
-
'--animate-in-translate-x': `-${value}`,
|
|
230
|
-
}),
|
|
231
|
-
|
|
232
|
-
'slide-in-from-right': (value) => ({
|
|
233
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
234
|
-
'--animate-in-translate-x': value,
|
|
235
|
-
}),
|
|
236
|
-
|
|
237
|
-
'slide-out-to-top': (value) => ({
|
|
238
|
-
'--animate-out-translate-y': `-${value}`,
|
|
239
|
-
}),
|
|
240
|
-
|
|
241
|
-
'slide-out-to-bottom': (value) => ({
|
|
242
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
243
|
-
'--animate-out-translate-y': value,
|
|
244
|
-
}),
|
|
245
|
-
|
|
246
|
-
'slide-out-to-left': (value) => ({
|
|
247
|
-
'--animate-out-translate-x': `-${value}`,
|
|
248
|
-
}),
|
|
249
|
-
|
|
250
|
-
'slide-out-to-right': (value) => ({
|
|
251
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment -- safe
|
|
252
|
-
'--animate-out-translate-x': value,
|
|
253
|
-
}),
|
|
254
|
-
},
|
|
255
|
-
{
|
|
256
|
-
values: theme('animationTranslate'),
|
|
257
|
-
},
|
|
258
|
-
);
|
|
259
|
-
},
|
|
260
|
-
{
|
|
261
|
-
theme: {
|
|
262
|
-
extend: {
|
|
263
|
-
animationDelay: ({ theme }: { theme: Theme }) => ({
|
|
264
|
-
...theme('transitionDelay'),
|
|
265
|
-
}),
|
|
266
|
-
|
|
267
|
-
animationDirection: {
|
|
268
|
-
normal: 'normal',
|
|
269
|
-
reverse: 'reverse',
|
|
270
|
-
alternate: 'alternate',
|
|
271
|
-
'alternate-reverse': 'alternate-reverse',
|
|
272
|
-
},
|
|
273
|
-
|
|
274
|
-
animationDuration: ({ theme }: { theme: Theme }) => ({
|
|
275
|
-
...theme('transitionDuration'),
|
|
276
|
-
}),
|
|
277
|
-
|
|
278
|
-
animationFillMode: {
|
|
279
|
-
none: 'none',
|
|
280
|
-
forwards: 'forwards',
|
|
281
|
-
backwards: 'backwards',
|
|
282
|
-
both: 'both',
|
|
283
|
-
},
|
|
284
|
-
|
|
285
|
-
animationOpacity: ({ theme }: { theme: Theme }) => ({
|
|
286
|
-
DEFAULT: 0,
|
|
287
|
-
...theme('opacity'),
|
|
288
|
-
}),
|
|
289
|
-
|
|
290
|
-
animationRepeat: {
|
|
291
|
-
0: '0',
|
|
292
|
-
1: '1',
|
|
293
|
-
infinite: 'infinite',
|
|
294
|
-
},
|
|
295
|
-
|
|
296
|
-
animationRotate: ({ theme }: { theme: Theme }) => ({
|
|
297
|
-
DEFAULT: '30deg',
|
|
298
|
-
...theme('rotate'),
|
|
299
|
-
}),
|
|
300
|
-
|
|
301
|
-
animationScale: ({ theme }: { theme: Theme }) => ({
|
|
302
|
-
DEFAULT: 0,
|
|
303
|
-
...theme('scale'),
|
|
304
|
-
}),
|
|
305
|
-
|
|
306
|
-
animationTimingFunction: ({ theme }: { theme: Theme }) => ({
|
|
307
|
-
...theme('transitionTimingFunction'),
|
|
308
|
-
}),
|
|
309
|
-
|
|
310
|
-
animationTranslate: ({ theme }: { theme: Theme }) => ({
|
|
311
|
-
DEFAULT: '100%',
|
|
312
|
-
...theme('translate'),
|
|
313
|
-
}),
|
|
314
|
-
},
|
|
315
|
-
},
|
|
316
|
-
},
|
|
317
|
-
);
|
|
318
|
-
|
|
319
|
-
export default animate;
|
package/plugin/base.plugin.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import plugin from 'tailwindcss/plugin';
|
|
2
|
-
|
|
3
|
-
const base = plugin(({ addBase }) => {
|
|
4
|
-
addBase({
|
|
5
|
-
'.dark': {
|
|
6
|
-
'color-scheme': 'dark',
|
|
7
|
-
},
|
|
8
|
-
body: {
|
|
9
|
-
'@apply bg-background text-foreground': '',
|
|
10
|
-
},
|
|
11
|
-
':focus-visible': {
|
|
12
|
-
'@apply outline-ring': '',
|
|
13
|
-
},
|
|
14
|
-
"button, [role='button'], input:where([type='button']), input:where([type='reset']), input:where([type='submit'])":
|
|
15
|
-
{
|
|
16
|
-
'@apply outline-transparent': '',
|
|
17
|
-
},
|
|
18
|
-
});
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
export default base;
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
export function useMediaQuery(query: string): boolean {
|
|
4
|
-
const [value, setValue] = React.useState(false);
|
|
5
|
-
|
|
6
|
-
React.useEffect(() => {
|
|
7
|
-
function onChange(event: MediaQueryListEvent): void {
|
|
8
|
-
setValue(event.matches);
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const result = matchMedia(query);
|
|
12
|
-
|
|
13
|
-
result.addEventListener('change', onChange);
|
|
14
|
-
setValue(result.matches);
|
|
15
|
-
|
|
16
|
-
return () => {
|
|
17
|
-
result.removeEventListener('change', onChange);
|
|
18
|
-
};
|
|
19
|
-
}, [query]);
|
|
20
|
-
|
|
21
|
-
return value;
|
|
22
|
-
}
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import * as React from 'react';
|
|
2
|
-
|
|
3
|
-
export const useMutationObserver = (
|
|
4
|
-
ref: React.MutableRefObject<HTMLElement | null>,
|
|
5
|
-
callback: MutationCallback,
|
|
6
|
-
options: MutationObserverInit = {
|
|
7
|
-
attributes: true,
|
|
8
|
-
characterData: true,
|
|
9
|
-
childList: true,
|
|
10
|
-
subtree: true,
|
|
11
|
-
},
|
|
12
|
-
): void => {
|
|
13
|
-
React.useEffect(() => {
|
|
14
|
-
if (!ref.current) {
|
|
15
|
-
return;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
const observer = new MutationObserver(callback);
|
|
19
|
-
|
|
20
|
-
observer.observe(ref.current, options);
|
|
21
|
-
|
|
22
|
-
return () => {
|
|
23
|
-
observer.disconnect();
|
|
24
|
-
};
|
|
25
|
-
}, [ref, callback, options]);
|
|
26
|
-
};
|