get-elementa-ui 1.8.0 → 1.10.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/dist/components/avatar.js +23 -0
- package/dist/components/text.js +3 -3
- package/dist/index.esm.js +1 -1
- package/dist/index.js +6 -0
- package/dist/types/components/avatar.d.ts +11 -0
- package/dist/types/components/button.d.ts +2 -2
- package/dist/types/components/text.d.ts +1 -1
- package/dist/types/index.d.ts +2 -0
- package/dist/types/lib/types.d.ts +1 -0
- package/package.json +1 -1
- package/src/index.ts +6 -0
- package/src/styles/globals.css +207 -23
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
4
|
+
import { cn } from '@/src/lib/utils';
|
|
5
|
+
function Avatar({ className, size = 'default', ...props }) {
|
|
6
|
+
return (_jsx(AvatarPrimitive.Root, { "data-slot": "avatar", "data-size": size, className: cn('group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6', className), ...props }));
|
|
7
|
+
}
|
|
8
|
+
function AvatarImage({ className, ...props }) {
|
|
9
|
+
return (_jsx(AvatarPrimitive.Image, { "data-slot": "avatar-image", className: cn('aspect-square size-full', className), ...props }));
|
|
10
|
+
}
|
|
11
|
+
function AvatarFallback({ className, ...props }) {
|
|
12
|
+
return (_jsx(AvatarPrimitive.Fallback, { "data-slot": "avatar-fallback", className: cn('bg-muted text-muted-foreground flex size-full items-center justify-center rounded-full text-sm group-data-[size=sm]/avatar:text-xs', className), ...props }));
|
|
13
|
+
}
|
|
14
|
+
function AvatarBadge({ className, ...props }) {
|
|
15
|
+
return (_jsx("span", { "data-slot": "avatar-badge", className: cn('bg-primary text-primary-foreground ring-background absolute right-0 bottom-0 z-10 inline-flex items-center justify-center rounded-full ring-2 select-none', 'group-data-[size=sm]/avatar:size-2 group-data-[size=sm]/avatar:[&>svg]:hidden', 'group-data-[size=default]/avatar:size-2.5 group-data-[size=default]/avatar:[&>svg]:size-2', 'group-data-[size=lg]/avatar:size-3 group-data-[size=lg]/avatar:[&>svg]:size-2', className), ...props }));
|
|
16
|
+
}
|
|
17
|
+
function AvatarGroup({ className, ...props }) {
|
|
18
|
+
return (_jsx("div", { "data-slot": "avatar-group", className: cn('*:data-[slot=avatar]:ring-background group/avatar-group flex -space-x-2 *:data-[slot=avatar]:ring-2', className), ...props }));
|
|
19
|
+
}
|
|
20
|
+
function AvatarGroupCount({ className, ...props }) {
|
|
21
|
+
return (_jsx("div", { "data-slot": "avatar-group-count", className: cn('bg-muted text-muted-foreground ring-background relative flex size-8 shrink-0 items-center justify-center rounded-full text-sm ring-2 group-has-data-[size=lg]/avatar-group:size-10 group-has-data-[size=sm]/avatar-group:size-6 [&>svg]:size-4 group-has-data-[size=lg]/avatar-group:[&>svg]:size-5 group-has-data-[size=sm]/avatar-group:[&>svg]:size-3', className), ...props }));
|
|
22
|
+
}
|
|
23
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };
|
package/dist/components/text.js
CHANGED
|
@@ -6,7 +6,7 @@ import { TextVariant } from '@/src/lib/types';
|
|
|
6
6
|
/**
|
|
7
7
|
* This function renders the Text component for the library.
|
|
8
8
|
*/
|
|
9
|
-
function Text({ variant = TextVariant.Body, color, children }) {
|
|
9
|
+
function Text({ variant = TextVariant.Body, color, children, customClassName }) {
|
|
10
10
|
// SECTION: Constants and Variables
|
|
11
11
|
const [className, setClassName] = useState('');
|
|
12
12
|
// !SECTION: Constants and Variables
|
|
@@ -46,8 +46,8 @@ function Text({ variant = TextVariant.Body, color, children }) {
|
|
|
46
46
|
// !SECTION: Event Handlers
|
|
47
47
|
// SECTION: Side Effects
|
|
48
48
|
useEffect(() => {
|
|
49
|
-
setClassName(cn(getVariantClass(variant), color));
|
|
50
|
-
}, [variant, color]);
|
|
49
|
+
setClassName(cn(getVariantClass(variant), color, customClassName));
|
|
50
|
+
}, [variant, color, customClassName]);
|
|
51
51
|
// !SECTION: Side Effects
|
|
52
52
|
// SECTION: UI
|
|
53
53
|
return _jsx("p", { className: className, children: children });
|
package/dist/index.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{
|
|
1
|
+
import{jsx as e,jsxs as t}from"react/jsx-runtime";import{Avatar as a,Slot as r,Checkbox as i,Select as n,Separator as o}from"radix-ui";import{clsx as s}from"clsx";import{twMerge as d}from"tailwind-merge";import{cva as l}from"class-variance-authority";import{CheckIcon as c,ChevronDownIcon as u,ChevronUpIcon as p}from"lucide-react";import{useState as g,useEffect as m}from"react";function v(...e){return d(s(e))}function f({className:t,size:r="default",...i}){return e(a.Root,{"data-slot":"avatar","data-size":r,className:v("group/avatar relative flex size-8 shrink-0 overflow-hidden rounded-full select-none data-[size=lg]:size-10 data-[size=sm]:size-6",t),...i})}const b=l("focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 rounded-lg border border-transparent bg-clip-padding text-sm font-medium focus-visible:ring-3 aria-invalid:ring-3 [&_svg:not([class*='size-'])]:size-4 inline-flex items-center justify-center whitespace-nowrap transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none shrink-0 [&_svg]:shrink-0 outline-none group/button select-none",{variants:{variant:{default:"bg-primary text-primary-foreground [a]:hover:bg-primary/80",outline:"border-border bg-background hover:bg-muted hover:text-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50 aria-expanded:bg-muted aria-expanded:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80 aria-expanded:bg-secondary aria-expanded:text-secondary-foreground",ghost:"hover:bg-muted hover:text-foreground dark:hover:bg-muted/50 aria-expanded:bg-muted aria-expanded:text-foreground",destructive:"bg-destructive/10 hover:bg-destructive/20 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/20 text-destructive focus-visible:border-destructive/40 dark:hover:bg-destructive/30",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2",xs:"h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3",sm:"h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5",lg:"h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-3 has-data-[icon=inline-start]:pl-3",icon:"size-8","icon-xs":"size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3","icon-sm":"size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg","icon-lg":"size-9"}},defaultVariants:{variant:"default",size:"default"}});function h({className:t,variant:a="default",size:i="default",asChild:n=!1,...o}){const s=n?r.Root:"button";return e(s,{"data-slot":"button","data-variant":a,"data-size":i,className:v(b({variant:a,size:i,className:t})),...o})}function x({className:t,...a}){return e(i.Root,{"data-slot":"checkbox",className:v("border-input dark:bg-input/30 data-checked:bg-primary data-checked:text-primary-foreground dark:data-checked:bg-primary data-checked:border-primary aria-invalid:aria-checked:border-primary aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 flex size-4 items-center justify-center rounded-[4px] border transition-colors group-has-disabled/field:opacity-50 focus-visible:ring-3 aria-invalid:ring-3 peer relative shrink-0 outline-none after:absolute after:-inset-x-3 after:-inset-y-2 disabled:cursor-not-allowed disabled:opacity-50",t),...a,children:e(i.Indicator,{"data-slot":"checkbox-indicator",className:"[&>svg]:size-3.5 grid place-content-center text-current transition-none",children:e(c,{})})})}function z({...t}){return e(n.Root,{"data-slot":"select",...t})}function y({className:t,...a}){return e(n.Group,{"data-slot":"select-group",className:v("scroll-my-1 p-1",t),...a})}function k({...t}){return e(n.Value,{"data-slot":"select-value",...t})}function N({className:a,size:r="default",children:i,...o}){return t(n.Trigger,{"data-slot":"select-trigger","data-size":r,className:v("border-input data-placeholder:text-muted-foreground dark:bg-input/30 dark:hover:bg-input/50 focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive dark:aria-invalid:border-destructive/50 gap-1.5 rounded-lg border bg-transparent py-2 pr-2 pl-2.5 text-sm transition-colors select-none focus-visible:ring-3 aria-invalid:ring-3 data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:gap-1.5 [&_svg:not([class*='size-'])]:size-4 flex w-fit items-center justify-between whitespace-nowrap outline-none disabled:cursor-not-allowed disabled:opacity-50 *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center [&_svg]:pointer-events-none [&_svg]:shrink-0",a),...o,children:[i,e(n.Icon,{asChild:!0,children:e(u,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function w({className:a,children:r,position:i="item-aligned",align:o="center",...s}){return e(n.Portal,{children:t(n.Content,{"data-slot":"select-content","data-align-trigger":"item-aligned"===i,className:v("bg-popover text-popover-foreground data-open:animate-in data-closed:animate-out data-closed:fade-out-0 data-open:fade-in-0 data-closed:zoom-out-95 data-open:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 ring-foreground/10 min-w-36 rounded-lg shadow-md ring-1 duration-100 relative z-50 max-h-(--radix-select-content-available-height) origin-(--radix-select-content-transform-origin) overflow-x-hidden overflow-y-auto data-[align-trigger=true]:animate-none","popper"===i&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",a),position:i,align:o,...s,children:[e(C,{}),e(n.Viewport,{"data-position":i,className:v("data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)","popper"===i&&""),children:r}),e(S,{})]})})}function H({className:t,...a}){return e(n.Label,{"data-slot":"select-label",className:v("text-muted-foreground px-1.5 py-1 text-xs",t),...a})}function _({className:a,children:r,...i}){return t(n.Item,{"data-slot":"select-item",className:v("focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2 relative flex w-full cursor-default items-center outline-hidden select-none data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0",a),...i,children:[e("span",{className:"pointer-events-none absolute right-2 flex size-4 items-center justify-center",children:e(n.ItemIndicator,{children:e(c,{className:"pointer-events-none"})})}),e(n.ItemText,{children:r})]})}function B({className:t,...a}){return e(n.Separator,{"data-slot":"select-separator",className:v("bg-border -mx-1 my-1 h-px pointer-events-none",t),...a})}function C({className:t,...a}){return e(n.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:v("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e(p,{})})}function S({className:t,...a}){return e(n.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:v("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e(u,{})})}function j({className:t,orientation:a="horizontal",decorative:r=!0,...i}){return e(o.Root,{"data-slot":"separator",decorative:r,orientation:a,className:v("bg-border shrink-0 data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch",t),...i})}function I({className:t,...a}){return e("div",{"data-slot":"skeleton",className:v("bg-muted rounded-md animate-pulse",t),...a})}var R;function V({variant:t=R.Body,color:a,children:r,customClassName:i}){const[n,o]=g("");return m(()=>{o(v((e=>{switch(e){case R.H1:return"text-[61px] font-heading";case R.H2:return"text-[48px] font-heading";case R.H3:return"text-[39px] font-heading";case R.H4:return"text-[31px] font-bold font-heading";case R.H5:return"text-[25px] font-bold font-heading";case R.H6:return"text-[20px] font-bold font-heading";case R.Body:return"text-[16px] font-body";case R.Button:return"text-[16px] font-bold font-body";default:return"text-[16px] font-body"}})(t),a,i))},[t,a,i]),e("p",{className:n,children:r})}!function(e){e[e.H1=0]="H1",e[e.H2=1]="H2",e[e.H3=2]="H3",e[e.H4=3]="H4",e[e.H5=4]="H5",e[e.H6=5]="H6",e[e.Body=6]="Body",e[e.Button=7]="Button",e[e.Subtitle1=8]="Subtitle1",e[e.Subtitle2=9]="Subtitle2",e[e.Caption=10]="Caption",e[e.Custom=11]="Custom"}(R||(R={}));export{f as Avatar,h as Button,x as Checkbox,z as Select,w as SelectContent,y as SelectGroup,_ as SelectItem,H as SelectLabel,S as SelectScrollDownButton,C as SelectScrollUpButton,B as SelectSeparator,N as SelectTrigger,k as SelectValue,j as Separator,I as Skeleton,V as Text};
|
package/dist/index.js
CHANGED
|
@@ -1,12 +1,18 @@
|
|
|
1
|
+
// SECTION: Imports
|
|
2
|
+
import { Avatar } from '@/src/components/avatar';
|
|
1
3
|
import { Button } from '@/src/components/button';
|
|
2
4
|
import { Checkbox } from '@/src/components/checkbox';
|
|
3
5
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from '@/src/components/select';
|
|
4
6
|
import { Separator } from '@/src/components/separator';
|
|
5
7
|
import { Skeleton } from '@/src/components/skeleton';
|
|
6
8
|
import { Text } from '@/src/components/text';
|
|
9
|
+
// !SECTION: Imports
|
|
10
|
+
// SECTION: Exports
|
|
11
|
+
export { Avatar };
|
|
7
12
|
export { Button };
|
|
8
13
|
export { Checkbox };
|
|
9
14
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
|
10
15
|
export { Separator };
|
|
11
16
|
export { Skeleton };
|
|
12
17
|
export { Text };
|
|
18
|
+
// !SECTION: Exports
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Avatar as AvatarPrimitive } from 'radix-ui';
|
|
3
|
+
declare function Avatar({ className, size, ...props }: React.ComponentProps<typeof AvatarPrimitive.Root> & {
|
|
4
|
+
size?: 'default' | 'sm' | 'lg';
|
|
5
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
6
|
+
declare function AvatarImage({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Image>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
declare function AvatarFallback({ className, ...props }: React.ComponentProps<typeof AvatarPrimitive.Fallback>): import("react/jsx-runtime").JSX.Element;
|
|
8
|
+
declare function AvatarBadge({ className, ...props }: React.ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
declare function AvatarGroup({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
declare function AvatarGroupCount({ className, ...props }: React.ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export { Avatar, AvatarImage, AvatarFallback, AvatarBadge, AvatarGroup, AvatarGroupCount };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { type VariantProps } from 'class-variance-authority';
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "default" | "outline" | "secondary" | "ghost" | "destructive" |
|
|
5
|
-
size?: "default" | "
|
|
4
|
+
variant?: "link" | "default" | "outline" | "secondary" | "ghost" | "destructive" | null | undefined;
|
|
5
|
+
size?: "default" | "sm" | "lg" | "xs" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<'button'> & VariantProps<typeof buttonVariants> & {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -2,5 +2,5 @@ import { TextProps } from '@/src/lib/types';
|
|
|
2
2
|
/**
|
|
3
3
|
* This function renders the Text component for the library.
|
|
4
4
|
*/
|
|
5
|
-
declare function Text({ variant, color, children }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
5
|
+
declare function Text({ variant, color, children, customClassName }: TextProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export { Text };
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
import { Avatar } from '@/src/components/avatar';
|
|
1
2
|
import { Button } from '@/src/components/button';
|
|
2
3
|
import { Checkbox } from '@/src/components/checkbox';
|
|
3
4
|
import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from '@/src/components/select';
|
|
4
5
|
import { Separator } from '@/src/components/separator';
|
|
5
6
|
import { Skeleton } from '@/src/components/skeleton';
|
|
6
7
|
import { Text } from '@/src/components/text';
|
|
8
|
+
export { Avatar };
|
|
7
9
|
export { Button };
|
|
8
10
|
export { Checkbox };
|
|
9
11
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
|
package/package.json
CHANGED
package/src/index.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// SECTION: Imports
|
|
2
|
+
import { Avatar } from '@/src/components/avatar';
|
|
1
3
|
import { Button } from '@/src/components/button';
|
|
2
4
|
import { Checkbox } from '@/src/components/checkbox';
|
|
3
5
|
import {
|
|
@@ -15,7 +17,10 @@ import {
|
|
|
15
17
|
import { Separator } from '@/src/components/separator';
|
|
16
18
|
import { Skeleton } from '@/src/components/skeleton';
|
|
17
19
|
import { Text } from '@/src/components/text';
|
|
20
|
+
// !SECTION: Imports
|
|
18
21
|
|
|
22
|
+
// SECTION: Exports
|
|
23
|
+
export { Avatar };
|
|
19
24
|
export { Button };
|
|
20
25
|
export { Checkbox };
|
|
21
26
|
export {
|
|
@@ -33,3 +38,4 @@ export {
|
|
|
33
38
|
export { Separator };
|
|
34
39
|
export { Skeleton };
|
|
35
40
|
export { Text };
|
|
41
|
+
// !SECTION: Exports
|
package/src/styles/globals.css
CHANGED
|
@@ -60,9 +60,11 @@
|
|
|
60
60
|
@import "tw-animate-css";
|
|
61
61
|
@import "shadcn/tailwind.css";
|
|
62
62
|
|
|
63
|
-
@custom-variant dark (&:
|
|
63
|
+
@custom-variant dark (&:where(.dark, .dark *));
|
|
64
64
|
|
|
65
|
+
/* GLOBAL PALETTE */
|
|
65
66
|
@theme inline {
|
|
67
|
+
/* TODO: Again these are used by tailwind. Remove them gradually once our library is using the same variables and is stable. */
|
|
66
68
|
--color-background: var(--background);
|
|
67
69
|
--color-foreground: var(--foreground);
|
|
68
70
|
--color-card: var(--card);
|
|
@@ -100,28 +102,38 @@
|
|
|
100
102
|
--color-sidebar-border: var(--sidebar-border);
|
|
101
103
|
--color-sidebar-ring: var(--sidebar-ring);
|
|
102
104
|
--breakpoint-3xl: 1920px;
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
--color-electric-violet-
|
|
108
|
-
--color-electric-violet-
|
|
109
|
-
--color-electric-violet-
|
|
110
|
-
--color-electric-violet-
|
|
111
|
-
--color-electric-violet-
|
|
112
|
-
--color-electric-violet-
|
|
113
|
-
--color-electric-violet-
|
|
114
|
-
--color-
|
|
115
|
-
--color-
|
|
116
|
-
--color-
|
|
117
|
-
--color-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
--color-hot-pink-
|
|
122
|
-
--color-hot-pink-
|
|
123
|
-
--color-hot-pink-
|
|
124
|
-
--color-hot-pink-
|
|
105
|
+
|
|
106
|
+
/* SECTION: Variables */
|
|
107
|
+
/* SECTION: Colors */
|
|
108
|
+
/* SECTION: Electric Violet */
|
|
109
|
+
--color-electric-violet-100: oklch(0.963 0.0193 302.21);
|
|
110
|
+
--color-electric-violet-200: oklch(0.8907 0.0562 301.22);
|
|
111
|
+
--color-electric-violet-300: oklch(0.8189 0.0956 300.04);
|
|
112
|
+
--color-electric-violet-400: oklch(0.7474 0.1344 298.96);
|
|
113
|
+
--color-electric-violet-500: oklch(0.6777 0.1726 297.5);
|
|
114
|
+
--color-electric-violet-600: oklch(0.6436 0.1922 296.58);
|
|
115
|
+
--color-electric-violet-700: oklch(0.5965 0.177 296.84);
|
|
116
|
+
--color-electric-violet-800: oklch(0.4977 0.144 297.26);
|
|
117
|
+
--color-electric-violet-900: oklch(0.3963 0.1087 297.27);
|
|
118
|
+
--color-electric-violet-1000: oklch(0.2849 0.0719 296.56);
|
|
119
|
+
--color-electric-violet-1100: oklch(0.162 0.0275 297.41);
|
|
120
|
+
/* !SECTION: Electric Violet */
|
|
121
|
+
|
|
122
|
+
/* SECTION: Hot Pink */
|
|
123
|
+
--color-hot-pink-100: oklch(0.9656 0.0179 351.14);
|
|
124
|
+
--color-hot-pink-200: oklch(0.8976 0.0586 350.91);
|
|
125
|
+
--color-hot-pink-300: oklch(0.8335 0.0986 352.09);
|
|
126
|
+
--color-hot-pink-400: oklch(0.7732 0.1386 354.16);
|
|
127
|
+
--color-hot-pink-500: oklch(0.7195 0.1797 356.01);
|
|
128
|
+
--color-hot-pink-600: oklch(0.6958 0.197 357.35);
|
|
129
|
+
--color-hot-pink-700: oklch(0.6435 0.1802 357.35);
|
|
130
|
+
--color-hot-pink-800: oklch(0.5363 0.1483 356.85);
|
|
131
|
+
--color-hot-pink-900: oklch(0.4245 0.1124 357.09);
|
|
132
|
+
--color-hot-pink-1000: oklch(0.3017 0.0738 356.56);
|
|
133
|
+
--color-hot-pink-1100: oklch(0.3017 0.0738 356.56);
|
|
134
|
+
/* !SECTION: Hot Pink */
|
|
135
|
+
|
|
136
|
+
/* SECTION: Acid Lime */
|
|
125
137
|
--color-acid-lime-100: #FBFEED;
|
|
126
138
|
--color-acid-lime-200: #F2FBCA;
|
|
127
139
|
--color-acid-lime-300: #EAF8A6;
|
|
@@ -133,6 +145,9 @@
|
|
|
133
145
|
--color-acid-lime-900: #6B7927;
|
|
134
146
|
--color-acid-lime-1000: #404817;
|
|
135
147
|
--color-acid-lime-1100: #151808;
|
|
148
|
+
/* !SECTION: Acid Lime */
|
|
149
|
+
|
|
150
|
+
/* SECTION: Aqua Mint */
|
|
136
151
|
--color-aqua-mint-100: #F1FDF9;
|
|
137
152
|
--color-aqua-mint-200: #D5FAEE;
|
|
138
153
|
--color-aqua-mint-300: #B9F6E2;
|
|
@@ -144,6 +159,9 @@
|
|
|
144
159
|
--color-aqua-mint-900: #397763;
|
|
145
160
|
--color-aqua-mint-1000: #22473B;
|
|
146
161
|
--color-aqua-mint-1100: #0B1814;
|
|
162
|
+
/* !SECTION: Aqua Mint */
|
|
163
|
+
|
|
164
|
+
/* SECTION: Gun Metal (Neutrals) */
|
|
147
165
|
--color-gun-metal-100: #D3D7D9;
|
|
148
166
|
--color-gun-metal-200: #B5BDC0;
|
|
149
167
|
--color-gun-metal-300: #919CA1;
|
|
@@ -155,6 +173,9 @@
|
|
|
155
173
|
--color-gun-metal-900: #111C22;
|
|
156
174
|
--color-gun-metal-1000: #0B1316;
|
|
157
175
|
--color-gun-metal-1100: #070B0D;
|
|
176
|
+
/* !SECTION: Gun Metal (Neutrals) */
|
|
177
|
+
|
|
178
|
+
/* SECTION: Amber White (Neutrals) */
|
|
158
179
|
--color-amber-white-100: #FCFCFD;
|
|
159
180
|
--color-amber-white-200: #FAFAFB;
|
|
160
181
|
--color-amber-white-300: #F7F8F9;
|
|
@@ -166,12 +187,175 @@
|
|
|
166
187
|
--color-amber-white-900: #78797A;
|
|
167
188
|
--color-amber-white-1000: #505051;
|
|
168
189
|
--color-amber-white-1100: #303031;
|
|
190
|
+
/* !SECTION: Amber White (Neutrals) */
|
|
191
|
+
/* !SECTION: Colors */
|
|
192
|
+
|
|
193
|
+
/* SECTION: Fonts */
|
|
169
194
|
--font-heading: 'Fraunces', sans-serif;
|
|
170
195
|
--font-body: 'Satoshi', sans-serif;
|
|
171
196
|
--font-heading: var(--font-fraunces), serif;
|
|
172
197
|
--font-body: var(--font-satoshi), sans-serif;
|
|
198
|
+
/* !SECTION: Fonts */
|
|
199
|
+
/* !SECTION: Variables */
|
|
200
|
+
|
|
201
|
+
/* SECTION: Semantics Mapping */
|
|
202
|
+
/* SECTION: Structure & Surfaces */
|
|
203
|
+
/* --background: The absolute bottom layer of the app (Page BG).
|
|
204
|
+
--foreground: The default text color on top of background.
|
|
205
|
+
--card: Background color for Cards, Modals, and Popovers.
|
|
206
|
+
--card-foreground: Text color inside cards.
|
|
207
|
+
--popover: Background for dropdowns, tooltips, and select menus.
|
|
208
|
+
--popover-foreground: Text color inside popovers. */
|
|
209
|
+
--color-primary: var(--primary);
|
|
210
|
+
--color-primary-foreground: var(--primary-foreground);
|
|
211
|
+
--color-secondary: var(--secondary);
|
|
212
|
+
--color-secondary-foreground: var(--secondary-foreground);
|
|
213
|
+
--color-background: var(--background);
|
|
214
|
+
--color-foreground: var(--foreground);
|
|
215
|
+
|
|
216
|
+
/* 1. Structure & Surfaces (6 Tokens) */
|
|
217
|
+
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
/* 2. Brand Actions (8 Tokens)
|
|
221
|
+
These handle your "Primary" (Brand) and "Secondary" (Alternative) interactions.
|
|
222
|
+
|
|
223
|
+
--primary: High-emphasis actions (Solid Buttons, Active States).
|
|
224
|
+
Example: Electric Violet 600
|
|
225
|
+
--primary-foreground: Text color on top of primary.
|
|
226
|
+
--secondary: Low-emphasis actions (Ghost buttons, Chips).
|
|
227
|
+
Example: Electric Violet 100 (Light) / Violet 900 (Dark)
|
|
228
|
+
--secondary-foreground: Text color on top of secondary.
|
|
229
|
+
--accent: Interactive elements that are not buttons (Hover states, Selected rows).
|
|
230
|
+
--accent-foreground: Text color on top of accent.
|
|
231
|
+
--muted: Backgrounds for disabled states, skeletons, or subtle areas.
|
|
232
|
+
--muted-foreground: Low-contrast text (subtitles, placeholders).
|
|
233
|
+
3. Feedback & Borders (6 Tokens)
|
|
234
|
+
--destructive: Critical actions (Delete, Error).
|
|
235
|
+
--destructive-foreground: Text on top of destructive.
|
|
236
|
+
--border: Hairline borders for inputs, cards, and dividers.
|
|
237
|
+
--input: Background or border specifically for form inputs (often same as --border).
|
|
238
|
+
--ring: Focus ring color for accessibility.
|
|
239
|
+
--radius: Global border-radius (e.g., 0.5rem).
|
|
240
|
+
4. Data Visualization (8 Tokens)
|
|
241
|
+
For charts, graphs, and status badges. These are vital for dashboards (Deriva's core use case).
|
|
242
|
+
|
|
243
|
+
--chart-1: Primary data series (usually matches Brand Primary).
|
|
244
|
+
--chart-2: Secondary data series.
|
|
245
|
+
--chart-3: Tertiary data series.
|
|
246
|
+
--chart-4: Quaternary data series.
|
|
247
|
+
--chart-5: Quinary data series.
|
|
248
|
+
--success: Positive states (Green/Teal).
|
|
249
|
+
--warning: Cautionary states (Yellow/Orange).
|
|
250
|
+
--info: Neutral information (Blue/Gray). */
|
|
251
|
+
/* !SECTION: Semantics Mapping */
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
/* SECTION: TODO: rename */
|
|
255
|
+
@layer base {
|
|
256
|
+
/* SECTION: Base Styles */
|
|
257
|
+
/* Light Theme */
|
|
258
|
+
:root {
|
|
259
|
+
--background: var(--color-amber-white-100);
|
|
260
|
+
--foreground: var(--color-gun-metal-1100);
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
/* Dark Theme */
|
|
264
|
+
.dark {
|
|
265
|
+
--background: var(--color-gun-metal-1100);
|
|
266
|
+
--foreground: var(--color-amber-white-100);
|
|
267
|
+
}
|
|
268
|
+
/* !SECTION: Base Styles */
|
|
269
|
+
|
|
270
|
+
/* SECTION: Energies */
|
|
271
|
+
/* SECTION: ENERGY 1: VAPORWAVE (Electric Violet + Hot Pink) */
|
|
272
|
+
/* Light Theme */
|
|
273
|
+
[data-energy="vaporwave"] {
|
|
274
|
+
--primary: var(--color-electric-violet-600);
|
|
275
|
+
--primary-foreground: #ffffff;
|
|
276
|
+
--secondary: var(--color-electric-violet-100);
|
|
277
|
+
--secondary-foreground: var(--color-electric-violet-900);
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
/* Dark Theme */
|
|
281
|
+
.dark[data-energy="vaporwave"] {
|
|
282
|
+
--primary: var(--color-electric-violet-400);
|
|
283
|
+
--primary-foreground: var(--color-gun-metal-1100);
|
|
284
|
+
--secondary: var(--color-electric-violet-900);
|
|
285
|
+
--secondary-foreground: var(--color-electric-violet-100);
|
|
286
|
+
}
|
|
287
|
+
/* !SECTION: ENERGY 1: VAPORWAVE (Electric Violet + Hot Pink) */
|
|
288
|
+
|
|
289
|
+
/* SECTION: ENERGY 2: ELECTRIC SHOCK (Electric Violet + Acid Lime) */
|
|
290
|
+
/* Light Theme */
|
|
291
|
+
[data-energy="electric-shock"] {
|
|
292
|
+
--primary: var(--color-electric-violet-600);
|
|
293
|
+
--primary-foreground: #ffffff;
|
|
294
|
+
--secondary: var(--color-acid-lime-100);
|
|
295
|
+
--secondary-foreground: var(--color-acid-lime-900);
|
|
296
|
+
}
|
|
297
|
+
|
|
298
|
+
/* Dark Theme */
|
|
299
|
+
.dark[data-energy="electric-shock"] {
|
|
300
|
+
--primary: var(--color-electric-violet-400);
|
|
301
|
+
--primary-foreground: var(--color-gun-metal-1100);
|
|
302
|
+
--secondary: var(--color-electric-violet-900);
|
|
303
|
+
--secondary-foreground: var(--color-electric-violet-100);
|
|
304
|
+
}
|
|
305
|
+
/* !SECTION: ENERGY 2: ELECTRIC SHOCK (Electric Violet + Acid Lime) */
|
|
306
|
+
|
|
307
|
+
/* SECTION: ENERGY 3: CYBER MIST (Electric Violet + Aqua Mint) */
|
|
308
|
+
/* Light Theme */
|
|
309
|
+
[data-energy="cyber-mist"] {
|
|
310
|
+
--primary: var(--color-electric-violet-600);
|
|
311
|
+
--primary-foreground: #ffffff;
|
|
312
|
+
--secondary: var(--color-aqua-mint-100);
|
|
313
|
+
--secondary-foreground: var(--color-aqua-mint-900);
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
/* Dark Theme */
|
|
317
|
+
/* !SECTION: ENERGY 3: CYBER MIST (Electric Violet + Aqua Mint) */
|
|
318
|
+
|
|
319
|
+
/* SECTION: ENERGY 4: SUMMER FRUIT (Hot Pink + Acid Lime) */
|
|
320
|
+
/* Light Theme */
|
|
321
|
+
[data-energy="summer-fruit"] {
|
|
322
|
+
--primary: var(--color-hot-pink-600);
|
|
323
|
+
--primary-foreground: #ffffff;
|
|
324
|
+
--secondary: var(--color-acid-lime-100);
|
|
325
|
+
--secondary-foreground: var(--color-acid-lime-900);
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
/* Dark Theme */
|
|
329
|
+
/* !SECTION: ENERGY 4: SUMMER FRUIT (Hot Pink + Acid Lime) */
|
|
330
|
+
|
|
331
|
+
/* SECTION: ENERGY 5: BUBBLEGUM ICE (Hot Pink + Aqua Mint) */
|
|
332
|
+
/* Light Theme */
|
|
333
|
+
[data-energy="bubblegum-ice"] {
|
|
334
|
+
--primary: var(--color-hot-pink-600);
|
|
335
|
+
--primary-foreground: #ffffff;
|
|
336
|
+
--secondary: var(--color-aqua-mint-100);
|
|
337
|
+
--secondary-foreground: var(--color-aqua-mint-900);
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
/* Dark Theme */
|
|
341
|
+
.dark[data-energy="bubblegum-ice"] {
|
|
342
|
+
--primary: var(--color-hot-pink-600);
|
|
343
|
+
--primary-foreground: #ffffff;
|
|
344
|
+
|
|
345
|
+
--secondary: var(--color-gun-metal-900);
|
|
346
|
+
--secondary-foreground: var(--color-aqua-mint-400);
|
|
347
|
+
}
|
|
348
|
+
/* !SECTION: ENERGY 5: BUBBLEGUM ICE (Hot Pink + Aqua Mint) */
|
|
173
349
|
}
|
|
174
350
|
|
|
351
|
+
|
|
352
|
+
/* TODO: Keeping this for now as shadcn might need it. Once our library is up and stable, starting removing this gradually. */
|
|
353
|
+
/* Base Styles */
|
|
354
|
+
/* @layer base {
|
|
355
|
+
* { @apply border-gray-200 dark:border-gray-800; }
|
|
356
|
+
body { @apply bg-background text-foreground transition-colors duration-300; }
|
|
357
|
+
} */
|
|
358
|
+
|
|
175
359
|
:root {
|
|
176
360
|
--radius: 0.625rem;
|
|
177
361
|
--background: oklch(1 0 0);
|