@arch-cadre/ui 0.0.6

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.
Files changed (74) hide show
  1. package/biome.json +38 -0
  2. package/components.json +20 -0
  3. package/package.json +83 -0
  4. package/postcss.config.mjs +6 -0
  5. package/src/components/.gitkeep +0 -0
  6. package/src/components/accordion.tsx +66 -0
  7. package/src/components/alert-dialog.tsx +157 -0
  8. package/src/components/alert.tsx +66 -0
  9. package/src/components/aspect-ratio.tsx +11 -0
  10. package/src/components/avatar.tsx +53 -0
  11. package/src/components/badge.tsx +46 -0
  12. package/src/components/breadcrumb.tsx +109 -0
  13. package/src/components/button-group.tsx +83 -0
  14. package/src/components/button.tsx +62 -0
  15. package/src/components/calendar.tsx +220 -0
  16. package/src/components/card.tsx +92 -0
  17. package/src/components/carousel.tsx +241 -0
  18. package/src/components/chart.tsx +357 -0
  19. package/src/components/checkbox.tsx +32 -0
  20. package/src/components/collapsible.tsx +33 -0
  21. package/src/components/command.tsx +184 -0
  22. package/src/components/context-menu.tsx +252 -0
  23. package/src/components/dialog.tsx +143 -0
  24. package/src/components/drawer.tsx +135 -0
  25. package/src/components/dropdown-menu.tsx +257 -0
  26. package/src/components/empty.tsx +104 -0
  27. package/src/components/field.tsx +248 -0
  28. package/src/components/form.tsx +168 -0
  29. package/src/components/hover-card.tsx +44 -0
  30. package/src/components/input-group.tsx +170 -0
  31. package/src/components/input-otp.tsx +77 -0
  32. package/src/components/input.tsx +21 -0
  33. package/src/components/item.tsx +193 -0
  34. package/src/components/kbd.tsx +28 -0
  35. package/src/components/label.tsx +24 -0
  36. package/src/components/language-switcher.tsx +50 -0
  37. package/src/components/menubar.tsx +276 -0
  38. package/src/components/navigation-menu.tsx +168 -0
  39. package/src/components/pagination.tsx +127 -0
  40. package/src/components/popover.tsx +48 -0
  41. package/src/components/progress.tsx +31 -0
  42. package/src/components/radio-group.tsx +45 -0
  43. package/src/components/scroll-area.tsx +67 -0
  44. package/src/components/select.tsx +190 -0
  45. package/src/components/separator.tsx +28 -0
  46. package/src/components/sheet.tsx +139 -0
  47. package/src/components/sidebar.tsx +726 -0
  48. package/src/components/skeleton.tsx +13 -0
  49. package/src/components/slider.tsx +63 -0
  50. package/src/components/sonner.tsx +40 -0
  51. package/src/components/spinner.tsx +16 -0
  52. package/src/components/switch.tsx +31 -0
  53. package/src/components/table.tsx +116 -0
  54. package/src/components/tabs.tsx +66 -0
  55. package/src/components/textarea.tsx +18 -0
  56. package/src/components/toggle-group.tsx +83 -0
  57. package/src/components/toggle.tsx +47 -0
  58. package/src/components/tooltip.tsx +61 -0
  59. package/src/hooks/.gitkeep +0 -0
  60. package/src/hooks/use-mobile.ts +21 -0
  61. package/src/hooks/use-user.ts +27 -0
  62. package/src/index.ts +11 -0
  63. package/src/lib/utils.ts +6 -0
  64. package/src/logo.tsx +48 -0
  65. package/src/postcss.config.mjs +6 -0
  66. package/src/providers/auth-provider.tsx +65 -0
  67. package/src/providers/index.tsx +49 -0
  68. package/src/shared/access-denied.tsx +30 -0
  69. package/src/shared/loader.tsx +108 -0
  70. package/src/shared/page-loader.tsx +23 -0
  71. package/src/shared/scroll-fade-effect.tsx +23 -0
  72. package/src/styles/globals.css +300 -0
  73. package/tsconfig.build.json +16 -0
  74. package/tsconfig.json +24 -0
@@ -0,0 +1,6 @@
1
+ /** @type {import('postcss-load-config').Config} */
2
+ const config = {
3
+ plugins: { "@tailwindcss/postcss": {} },
4
+ };
5
+
6
+ export default config;
@@ -0,0 +1,65 @@
1
+ "use client";
2
+
3
+ import type { AuthSession } from "@arch-cadre/core";
4
+ import { createContext, type ReactNode, useEffect, useState } from "react";
5
+ import { mutate } from "swr";
6
+ import { PageLoader } from "../shared/page-loader";
7
+
8
+ export const AuthContext = createContext<
9
+ | {
10
+ user: AuthSession["user"] | null | undefined;
11
+ session: AuthSession["session"] | null | undefined;
12
+ kryoPrefix: string;
13
+ isLoading: boolean;
14
+ refetchUser: () => Promise<void>;
15
+ }
16
+ | undefined
17
+ >(undefined);
18
+
19
+ export default function AuthProvider({
20
+ children,
21
+ initialSession,
22
+ kryoPrefix = "/kryo",
23
+ }: {
24
+ children: ReactNode;
25
+ initialSession?: AuthSession;
26
+ kryoPrefix?: string;
27
+ }) {
28
+ const [isLoading, setIsLoading] = useState(true);
29
+
30
+ const refetchUser = async () => {
31
+ mutate("user");
32
+ };
33
+
34
+ useEffect(() => {
35
+ setTimeout(() => {
36
+ setIsLoading(false);
37
+ }, 800);
38
+ }, []);
39
+
40
+ if (isLoading) {
41
+ return <PageLoader text="User checking" />;
42
+ }
43
+
44
+ return (
45
+ <AuthContext.Provider
46
+ value={{
47
+ user: initialSession?.user,
48
+ session: initialSession?.session,
49
+ kryoPrefix,
50
+ isLoading,
51
+ refetchUser,
52
+ }}
53
+ >
54
+ {children}
55
+ </AuthContext.Provider>
56
+ );
57
+ }
58
+
59
+ // export const useUser = () => {
60
+ // const context = useContext(AuthContext);
61
+ // if (!context) {
62
+ // throw new Error("useUser must be used within AuthProvider");
63
+ // }
64
+ // return context;
65
+ // };
@@ -0,0 +1,49 @@
1
+ "use client";
2
+
3
+ import type { AuthSession } from "@arch-cadre/core";
4
+ import { useEffect, useState } from "react";
5
+ import { SWRConfig } from "swr";
6
+ import { Toaster } from "../components/sonner";
7
+ import { TooltipProvider } from "../components/tooltip";
8
+ import { PageLoader } from "../shared/page-loader";
9
+ import AuthProvider from "./auth-provider";
10
+
11
+ export const AppProvider = ({
12
+ children,
13
+ initialSession,
14
+ kryoPrefix,
15
+ }: {
16
+ children: React.ReactElement;
17
+ initialSession?: AuthSession;
18
+ kryoPrefix?: string;
19
+ }) => {
20
+ const [isLoading, setIsLoading] = useState(true);
21
+
22
+ useEffect(() => {
23
+ setTimeout(() => {
24
+ setIsLoading(false);
25
+ }, 800);
26
+ }, []);
27
+
28
+ if (isLoading) {
29
+ return <PageLoader text="Initializing" />;
30
+ }
31
+
32
+ return (
33
+ <SWRConfig
34
+ value={{
35
+ fetcher: (url: string) =>
36
+ fetch(url).then((response) => response.json()),
37
+ revalidateIfStale: true,
38
+ }}
39
+ >
40
+ <AuthProvider initialSession={initialSession} kryoPrefix={kryoPrefix}>
41
+ <TooltipProvider>
42
+ {children}
43
+
44
+ <Toaster position="top-right" expand={true} />
45
+ </TooltipProvider>
46
+ </AuthProvider>
47
+ </SWRConfig>
48
+ );
49
+ };
@@ -0,0 +1,30 @@
1
+ import { Icon } from "@iconify/react";
2
+ import { Button } from "../components/button";
3
+
4
+ export function AccessDenied() {
5
+ return (
6
+ <div className="flex flex-col items-center justify-center min-h-[60vh] text-center space-y-6 p-4">
7
+ <div className="bg-destructive/10 p-6 rounded-full">
8
+ <Icon
9
+ icon="solar:shield-warning-bold-duotone"
10
+ className="size-16 text-destructive"
11
+ />
12
+ </div>
13
+ <div className="space-y-2">
14
+ <h2 className="text-2xl font-bold tracking-tight">Access Denied</h2>
15
+ <p className="text-muted-foreground max-w-[400px]">
16
+ You do not have the required permissions to access this area. Please
17
+ contact your administrator if you believe this is an error.
18
+ </p>
19
+ </div>
20
+ <div className="flex gap-4">
21
+ <Button asChild variant="outline">
22
+ <a href="/">Go back home</a>
23
+ </Button>
24
+ <Button asChild>
25
+ <a href="/signin">Sign in with another account</a>
26
+ </Button>
27
+ </div>
28
+ </div>
29
+ );
30
+ }
@@ -0,0 +1,108 @@
1
+ import { Slot } from "@radix-ui/react-slot";
2
+ import type { VariantProps } from "class-variance-authority";
3
+ import { cva } from "class-variance-authority";
4
+ import { cn } from "../lib/utils";
5
+
6
+ const loaderVariants = cva("spinner", {
7
+ variants: {
8
+ variant: {
9
+ default: "stroke-primary",
10
+ dark: "stroke-white",
11
+ destructive: "stroke-destructive",
12
+ secondary: "stroke-secondary",
13
+ ghost: "stroke-accent",
14
+ },
15
+ size: {
16
+ default: "h-5 w-5",
17
+ md: "h-10 w-10",
18
+ lg: "h-60 w-60",
19
+ },
20
+ },
21
+ defaultVariants: {
22
+ variant: "default",
23
+ size: "default",
24
+ },
25
+ });
26
+
27
+ export interface LoaderProps
28
+ extends React.HTMLAttributes<HTMLDivElement>,
29
+ VariantProps<typeof loaderVariants> {
30
+ asChild?: boolean;
31
+ }
32
+
33
+ function Loader({
34
+ className,
35
+ variant,
36
+ size,
37
+ asChild = false,
38
+ ...props
39
+ }: React.ComponentProps<"div"> &
40
+ VariantProps<typeof loaderVariants> &
41
+ LoaderProps) {
42
+ const Comp = asChild ? Slot : "div";
43
+
44
+ return (
45
+ <Comp className="flex items-center justify-center" {...props}>
46
+ <style>
47
+ {`
48
+ .spinner {
49
+ animation: animate-rotate 2s linear infinite;
50
+ z-index: 2;
51
+ max-width: 5rem;
52
+ max-height: 5rem;
53
+
54
+ .path {
55
+ stroke-linecap: round;
56
+ animation: animate-dash 1.75s ease-in-out infinite;
57
+ }
58
+ }
59
+ `}
60
+ </style>
61
+ {/** biome-ignore lint/a11y/noSvgWithoutTitle: <explanation> */}
62
+ <svg
63
+ xmlns="http://www.w3.org/2000/svg"
64
+ viewBox="0 0 24 24"
65
+ className={cn(loaderVariants({ variant, size, className }))}
66
+ >
67
+ <g>
68
+ <circle
69
+ cx={12}
70
+ cy={12}
71
+ r={9.5}
72
+ fill="none"
73
+ strokeLinecap="round"
74
+ strokeWidth={3}
75
+ >
76
+ <animate
77
+ attributeName="stroke-dasharray"
78
+ calcMode="spline"
79
+ dur="1.5s"
80
+ keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1"
81
+ keyTimes="0;0.475;0.95;1"
82
+ repeatCount="indefinite"
83
+ values="0 150;42 150;42 150;42 150"
84
+ />
85
+ <animate
86
+ attributeName="stroke-dashoffset"
87
+ calcMode="spline"
88
+ dur="1.5s"
89
+ keySplines="0.42,0,0.58,1;0.42,0,0.58,1;0.42,0,0.58,1"
90
+ keyTimes="0;0.475;0.95;1"
91
+ repeatCount="indefinite"
92
+ values="0;-16;-59;-59"
93
+ />
94
+ </circle>
95
+ <animateTransform
96
+ attributeName="transform"
97
+ dur="2s"
98
+ repeatCount="indefinite"
99
+ type="rotate"
100
+ values="0 12 12;360 12 12"
101
+ />
102
+ </g>
103
+ </svg>
104
+ </Comp>
105
+ );
106
+ }
107
+
108
+ export { Loader, loaderVariants };
@@ -0,0 +1,23 @@
1
+ import { Logo } from "../logo";
2
+ import { Loader } from "./loader";
3
+
4
+ interface PageLoaderProps {
5
+ withLogo?: boolean;
6
+ text?: string;
7
+ }
8
+
9
+ export function PageLoader({ withLogo = true, text }: PageLoaderProps) {
10
+ return (
11
+ <div className="bg-background absolute inset-0 flex flex-col items-center justify-center space-y-6">
12
+ {withLogo && (
13
+ <div className="mb-6">
14
+ <Logo />
15
+ </div>
16
+ )}
17
+
18
+ <Loader />
19
+
20
+ {text && <div className="text-xs lowercase">{text}</div>}
21
+ </div>
22
+ );
23
+ }
@@ -0,0 +1,23 @@
1
+ import React from "react";
2
+
3
+ import { cn } from "../lib/utils";
4
+
5
+ export function ScrollFadeEffect({
6
+ className,
7
+ orientation = "vertical",
8
+ ...props
9
+ }: React.ComponentProps<"div"> & {
10
+ orientation?: "horizontal" | "vertical";
11
+ }) {
12
+ return (
13
+ <div
14
+ data-orientation={orientation}
15
+ className={cn(
16
+ "data-[orientation=horizontal]:overflow-x-auto data-[orientation=vertical]:overflow-y-auto",
17
+ "data-[orientation=horizontal]:scroll-fade-effect-x data-[orientation=vertical]:scroll-fade-effect-y",
18
+ className,
19
+ )}
20
+ {...props}
21
+ />
22
+ );
23
+ }
@@ -0,0 +1,300 @@
1
+ @import "tailwindcss";
2
+ @source "../../../apps/**/*.{ts,tsx}";
3
+ @source "../../../components/**/*.{ts,tsx}";
4
+ @source "../**/*.{ts,tsx}";
5
+
6
+ @import "tw-animate-css";
7
+
8
+ @custom-variant dark (&:is(.dark *));
9
+
10
+ @theme inline {
11
+ --container: 1024px;
12
+
13
+ --color-background: var(--background);
14
+ --color-foreground: var(--foreground);
15
+
16
+ --font-sans: var(--font-syne-sans);
17
+ --font-mono: var(--font-syne-mono);
18
+
19
+ --color-sidebar-ring: var(--sidebar-ring);
20
+ --color-sidebar-border: var(--sidebar-border);
21
+ --color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
22
+ --color-sidebar-accent: var(--sidebar-accent);
23
+ --color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
24
+ --color-sidebar-primary: var(--sidebar-primary);
25
+ --color-sidebar-foreground: var(--sidebar-foreground);
26
+ --color-sidebar: var(--sidebar);
27
+ --color-chart-5: var(--chart-5);
28
+ --color-chart-4: var(--chart-4);
29
+ --color-chart-3: var(--chart-3);
30
+ --color-chart-2: var(--chart-2);
31
+ --color-chart-1: var(--chart-1);
32
+ --color-ring: var(--ring);
33
+ --color-input: var(--input);
34
+ --color-border: var(--border);
35
+ --color-destructive: var(--destructive);
36
+ --color-accent-foreground: var(--accent-foreground);
37
+ --color-accent: var(--accent);
38
+ --color-muted-foreground: var(--muted-foreground);
39
+ --color-muted: var(--muted);
40
+ --color-secondary-foreground: var(--secondary-foreground);
41
+ --color-secondary: var(--secondary);
42
+ --color-primary-foreground: var(--primary-foreground);
43
+ --color-primary: var(--primary);
44
+ --color-popover-foreground: var(--popover-foreground);
45
+ --color-popover: var(--popover);
46
+ --color-card-foreground: var(--card-foreground);
47
+ --color-card: var(--card);
48
+ --radius-sm: calc(var(--radius) - 4px);
49
+ --radius-md: calc(var(--radius) - 2px);
50
+ --radius-lg: var(--radius);
51
+ --radius-xl: calc(var(--radius) + 4px);
52
+ --radius-2xl: calc(var(--radius) + 8px);
53
+ --radius-3xl: calc(var(--radius) + 12px);
54
+ --radius-4xl: calc(var(--radius) + 16px);
55
+ }
56
+
57
+ :root {
58
+ --radius: 0.5rem;
59
+ --background: oklch(0.985 0 0);
60
+ --foreground: oklch(0.24 0.06 245.57);
61
+ --card: oklch(1 0 0);
62
+ --card-foreground: oklch(0.24 0.06 245.57);
63
+ --popover: oklch(1 0 0);
64
+ --popover-foreground: oklch(0.24 0.06 245.57);
65
+ --primary: oklch(0.24 0.06 245.57);
66
+ --primary-foreground: oklch(0.985 0 0);
67
+ --secondary: oklch(0.97 0 0);
68
+ --secondary-foreground: oklch(0.24 0.06 245.57);
69
+ --muted: oklch(0.97 0 0);
70
+ --muted-foreground: oklch(0.556 0 0);
71
+ --accent: oklch(0.97 0 0);
72
+ --accent-foreground: oklch(0.24 0.06 245.57);
73
+ --destructive: oklch(0.577 0.245 27.325);
74
+ --border: oklch(0.922 0 0);
75
+ --input: oklch(0.922 0 0);
76
+ --ring: oklch(0.708 0 0);
77
+ --chart-1: oklch(0.646 0.222 41.116);
78
+ --chart-2: oklch(0.6 0.118 184.704);
79
+ --chart-3: oklch(0.398 0.07 227.392);
80
+ --chart-4: oklch(0.828 0.189 84.429);
81
+ --chart-5: oklch(0.769 0.188 70.08);
82
+ --sidebar: oklch(1 0 0);
83
+ --sidebar-foreground: oklch(0.24 0.06 245.57);
84
+ --sidebar-primary: oklch(0.24 0.06 245.57);
85
+ --sidebar-primary-foreground: oklch(0.985 0 0);
86
+ --sidebar-accent: oklch(0.97 0 0);
87
+ --sidebar-accent-foreground: oklch(0.24 0.06 245.57);
88
+ --sidebar-border: oklch(0.922 0 0);
89
+ --sidebar-ring: oklch(0.708 0 0);
90
+ }
91
+
92
+ .dark {
93
+ --background: oklch(0.145 0 0);
94
+ --foreground: oklch(0.985 0 0);
95
+ --card: oklch(0.205 0 0);
96
+ --card-foreground: oklch(0.985 0 0);
97
+ --popover: oklch(0.205 0 0);
98
+ --popover-foreground: oklch(0.985 0 0);
99
+ --primary: oklch(0.922 0 0);
100
+ --primary-foreground: oklch(0.205 0 0);
101
+ --secondary: oklch(0.269 0 0);
102
+ --secondary-foreground: oklch(0.985 0 0);
103
+ --muted: oklch(0.269 0 0);
104
+ --muted-foreground: oklch(0.708 0 0);
105
+ --accent: oklch(0.269 0 0);
106
+ --accent-foreground: oklch(0.985 0 0);
107
+ --destructive: oklch(0.704 0.191 22.216);
108
+ --border: oklch(1 0 0 / 10%);
109
+ --input: oklch(1 0 0 / 15%);
110
+ --ring: oklch(0.556 0 0);
111
+ --chart-1: oklch(0.488 0.243 264.376);
112
+ --chart-2: oklch(0.696 0.17 162.48);
113
+ --chart-3: oklch(0.769 0.188 70.08);
114
+ --chart-4: oklch(0.627 0.265 303.9);
115
+ --chart-5: oklch(0.645 0.246 16.439);
116
+ --sidebar: oklch(0.205 0 0);
117
+ --sidebar-foreground: oklch(0.985 0 0);
118
+ --sidebar-primary: oklch(0.488 0.243 264.376);
119
+ --sidebar-primary-foreground: oklch(0.985 0 0);
120
+ --sidebar-accent: oklch(0.269 0 0);
121
+ --sidebar-accent-foreground: oklch(0.985 0 0);
122
+ --sidebar-border: oklch(1 0 0 / 10%);
123
+ --sidebar-ring: oklch(0.556 0 0);
124
+ }
125
+
126
+ @layer base {
127
+ * {
128
+ @apply border-border outline-ring/50;
129
+ }
130
+ body {
131
+ @apply bg-background text-foreground;
132
+ }
133
+
134
+ body:before {
135
+ content: "";
136
+ z-index: 1;
137
+ pointer-events: none;
138
+ opacity: 0.1;
139
+ filter: url(#grain);
140
+ background: #000;
141
+ width: 100%;
142
+ height: 100%;
143
+ position: fixed;
144
+ top: 0;
145
+ left: 0;
146
+ }
147
+
148
+ [data-slot="sidebar-wrapper"]:before {
149
+ content: "";
150
+ z-index: 51;
151
+ pointer-events: none;
152
+ opacity: 0.1;
153
+ filter: url(#grain);
154
+ background: #000;
155
+ width: 100%;
156
+ height: 100%;
157
+ position: fixed;
158
+ top: 0;
159
+ left: 0;
160
+ }
161
+
162
+ svg.grain-noise {
163
+ z-index: -1;
164
+ width: 0;
165
+ height: 0;
166
+ position: absolute;
167
+ }
168
+
169
+ .container {
170
+ max-width: var(--container);
171
+ margin: 0 auto;
172
+ @apply px-4 sm:px-6 lg:px-8;
173
+ }
174
+
175
+ @keyframes show-top-mask {
176
+ to {
177
+ --top-mask-height: var(--mask-height);
178
+ }
179
+ }
180
+
181
+ @keyframes hide-bottom-mask {
182
+ to {
183
+ --bottom-mask-height: 0px;
184
+ }
185
+ }
186
+
187
+ @keyframes show-left-mask {
188
+ to {
189
+ --left-mask-width: var(--mask-width);
190
+ }
191
+ }
192
+
193
+ @keyframes hide-right-mask {
194
+ to {
195
+ --right-mask-width: 0px;
196
+ }
197
+ }
198
+ }
199
+
200
+ @property --top-mask-height {
201
+ syntax: "<length>";
202
+ inherits: true;
203
+ initial-value: 0px;
204
+ }
205
+
206
+ @property --bottom-mask-height {
207
+ syntax: "<length>";
208
+ inherits: true;
209
+ initial-value: 64px;
210
+ }
211
+
212
+ @property --left-mask-width {
213
+ syntax: "<length>";
214
+ inherits: true;
215
+ initial-value: 0px;
216
+ }
217
+
218
+ @property --right-mask-width {
219
+ syntax: "<length>";
220
+ inherits: true;
221
+ initial-value: 64px;
222
+ }
223
+
224
+ @utility scroll-fade-effect-y {
225
+ --mask-height: 64px;
226
+ --mask-offset-top: 0px;
227
+ --mask-offset-bottom: 0px;
228
+ --scroll-buffer: 2rem;
229
+
230
+ /* Set up the mask layers */
231
+ mask-image:
232
+ linear-gradient(to top, transparent, black 90%),
233
+ linear-gradient(to bottom, transparent 0%, black 100%),
234
+ linear-gradient(black, black);
235
+
236
+ mask-size:
237
+ 100% var(--top-mask-height),
238
+ 100% var(--bottom-mask-height),
239
+ 100% 100%;
240
+ mask-repeat: no-repeat, no-repeat, no-repeat;
241
+ mask-position:
242
+ 0 var(--mask-offset-top),
243
+ 0 calc(100% - var(--mask-offset-bottom)),
244
+ 0 0;
245
+ /* Exclude the gradient areas from the solid mask */
246
+ mask-composite: exclude;
247
+
248
+ animation-name: show-top-mask, hide-bottom-mask;
249
+ animation-timeline: scroll(self), scroll(self);
250
+ animation-range:
251
+ 0 var(--scroll-buffer),
252
+ calc(100% - var(--scroll-buffer)) 100%;
253
+ animation-fill-mode: both;
254
+ }
255
+
256
+ @utility scroll-fade-effect-x {
257
+ --mask-width: 64px;
258
+ --mask-offset-left: 0px;
259
+ --mask-offset-right: 0px;
260
+ --scroll-buffer: 2rem;
261
+
262
+ mask-image:
263
+ linear-gradient(to left, transparent, black 90%),
264
+ linear-gradient(to right, transparent 0%, black 100%),
265
+ linear-gradient(black, black);
266
+
267
+ mask-size:
268
+ var(--left-mask-width) 100%,
269
+ var(--right-mask-width) 100%,
270
+ 100% 100%;
271
+ mask-repeat: no-repeat, no-repeat, no-repeat;
272
+ mask-position:
273
+ var(--mask-offset-left) 0,
274
+ calc(100% - var(--mask-offset-right)) 0,
275
+ 0 0;
276
+ mask-composite: exclude;
277
+
278
+ animation-name: show-left-mask, hide-right-mask;
279
+ animation-timeline: scroll(self inline), scroll(self inline);
280
+ animation-range:
281
+ 0 var(--scroll-buffer),
282
+ calc(100% - var(--scroll-buffer)) 100%;
283
+ animation-fill-mode: both;
284
+ }
285
+
286
+ @keyframes progress-fast {
287
+ 0% {
288
+ transform: translateX(-100%);
289
+ }
290
+ 50% {
291
+ transform: translateX(-20%);
292
+ }
293
+ 100% {
294
+ transform: translateX(100%);
295
+ }
296
+ }
297
+
298
+ .animate-progress-fast {
299
+ animation: progress-fast 1.5s infinite linear;
300
+ }
@@ -0,0 +1,16 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "noEmit": false,
5
+ "declaration": true,
6
+ "emitDeclarationOnly": false,
7
+ "outDir": "dist",
8
+ "module": "CommonJS",
9
+ "target": "ES2022",
10
+ "jsx": "react-jsx",
11
+ "moduleResolution": "node",
12
+ "isolatedModules": false
13
+ },
14
+ "include": ["src/**/*"],
15
+ "exclude": ["node_modules", "dist", "**/*.test.*"]
16
+ }
package/tsconfig.json ADDED
@@ -0,0 +1,24 @@
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "lib": ["dom", "dom.iterable", "esnext"],
5
+ "allowJs": true,
6
+ "skipLibCheck": true,
7
+ "strict": true,
8
+ "forceConsistentCasingInFileNames": true,
9
+ "noEmit": true,
10
+ "esModuleInterop": true,
11
+ "module": "esnext",
12
+ "moduleResolution": "bundler",
13
+ "resolveJsonModule": true,
14
+ "isolatedModules": true,
15
+ "jsx": "react-jsx",
16
+ "incremental": false,
17
+ "baseUrl": ".",
18
+ "paths": {
19
+ "@arch-cadre/ui/*": ["./src/*"]
20
+ }
21
+ },
22
+ "include": ["."],
23
+ "exclude": ["node_modules", "dist"]
24
+ }