get-elementa-ui 1.0.0 → 1.5.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.
@@ -0,0 +1,9 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { Checkbox as CheckboxPrimitive } from 'radix-ui';
4
+ import { cn } from '@/src/lib/utils';
5
+ import { CheckIcon } from 'lucide-react';
6
+ function Checkbox({ className, ...props }) {
7
+ return (_jsx(CheckboxPrimitive.Root, { "data-slot": "checkbox", className: cn('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', className), ...props, children: _jsx(CheckboxPrimitive.Indicator, { "data-slot": "checkbox-indicator", className: "[&>svg]:size-3.5 grid place-content-center text-current transition-none", children: _jsx(CheckIcon, {}) }) }));
8
+ }
9
+ export { Checkbox };
@@ -0,0 +1,37 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Select as SelectPrimitive } from 'radix-ui';
4
+ import { cn } from '@/src/lib/utils';
5
+ import { ChevronDownIcon, CheckIcon, ChevronUpIcon } from 'lucide-react';
6
+ function Select({ ...props }) {
7
+ return _jsx(SelectPrimitive.Root, { "data-slot": "select", ...props });
8
+ }
9
+ function SelectGroup({ className, ...props }) {
10
+ return (_jsx(SelectPrimitive.Group, { "data-slot": "select-group", className: cn('scroll-my-1 p-1', className), ...props }));
11
+ }
12
+ function SelectValue({ ...props }) {
13
+ return _jsx(SelectPrimitive.Value, { "data-slot": "select-value", ...props });
14
+ }
15
+ function SelectTrigger({ className, size = 'default', children, ...props }) {
16
+ return (_jsxs(SelectPrimitive.Trigger, { "data-slot": "select-trigger", "data-size": size, className: cn("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", className), ...props, children: [children, _jsx(SelectPrimitive.Icon, { asChild: true, children: _jsx(ChevronDownIcon, { className: "text-muted-foreground size-4 pointer-events-none" }) })] }));
17
+ }
18
+ function SelectContent({ className, children, position = 'item-aligned', align = 'center', ...props }) {
19
+ return (_jsx(SelectPrimitive.Portal, { children: _jsxs(SelectPrimitive.Content, { "data-slot": "select-content", "data-align-trigger": position === 'item-aligned', className: cn('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', position === 'popper' &&
20
+ 'data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1', className), position: position, align: align, ...props, children: [_jsx(SelectScrollUpButton, {}), _jsx(SelectPrimitive.Viewport, { "data-position": position, className: cn('data-[position=popper]:h-(--radix-select-trigger-height) data-[position=popper]:w-full data-[position=popper]:min-w-(--radix-select-trigger-width)', position === 'popper' && ''), children: children }), _jsx(SelectScrollDownButton, {})] }) }));
21
+ }
22
+ function SelectLabel({ className, ...props }) {
23
+ return (_jsx(SelectPrimitive.Label, { "data-slot": "select-label", className: cn('text-muted-foreground px-1.5 py-1 text-xs', className), ...props }));
24
+ }
25
+ function SelectItem({ className, children, ...props }) {
26
+ return (_jsxs(SelectPrimitive.Item, { "data-slot": "select-item", className: cn("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", className), ...props, children: [_jsx("span", { className: "pointer-events-none absolute right-2 flex size-4 items-center justify-center", children: _jsx(SelectPrimitive.ItemIndicator, { children: _jsx(CheckIcon, { className: "pointer-events-none" }) }) }), _jsx(SelectPrimitive.ItemText, { children: children })] }));
27
+ }
28
+ function SelectSeparator({ className, ...props }) {
29
+ return (_jsx(SelectPrimitive.Separator, { "data-slot": "select-separator", className: cn('bg-border -mx-1 my-1 h-px pointer-events-none', className), ...props }));
30
+ }
31
+ function SelectScrollUpButton({ className, ...props }) {
32
+ return (_jsx(SelectPrimitive.ScrollUpButton, { "data-slot": "select-scroll-up-button", className: cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronUpIcon, {}) }));
33
+ }
34
+ function SelectScrollDownButton({ className, ...props }) {
35
+ return (_jsx(SelectPrimitive.ScrollDownButton, { "data-slot": "select-scroll-down-button", className: cn("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4", className), ...props, children: _jsx(ChevronDownIcon, {}) }));
36
+ }
37
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -0,0 +1,56 @@
1
+ 'use client';
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useEffect, useState } from 'react';
4
+ import { cn } from '@/src/lib/utils';
5
+ import { TextVariant } from '@/src/lib/types';
6
+ /**
7
+ * This function renders the Text component for the library.
8
+ */
9
+ function Text({ variant = TextVariant.Body, color, children }) {
10
+ // SECTION: Constants and Variables
11
+ const [className, setClassName] = useState('');
12
+ // !SECTION: Constants and Variables
13
+ // SECTION: States
14
+ // !SECTION: States
15
+ // SECTION: Functions
16
+ /**
17
+ * This function returns the class name for the given variant.
18
+ *
19
+ * @param variant - The variant of the text component.
20
+ * @returns The class name for the given variant.
21
+ */
22
+ const getVariantClass = (variant) => {
23
+ switch (variant) {
24
+ case TextVariant.H1:
25
+ return 'text-[61px] font-heading';
26
+ case TextVariant.H2:
27
+ return 'text-[48px] font-heading';
28
+ case TextVariant.H3:
29
+ return 'text-[39px] font-heading';
30
+ case TextVariant.H4:
31
+ return 'text-[31px] font-bold font-heading';
32
+ case TextVariant.H5:
33
+ return 'text-[25px] font-bold font-heading';
34
+ case TextVariant.H6:
35
+ return 'text-[20px] font-bold font-heading';
36
+ case TextVariant.Body:
37
+ return 'text-[16px] font-body';
38
+ case TextVariant.Button:
39
+ return 'text-[16px] font-bold font-body';
40
+ default:
41
+ return 'text-[16px] font-body';
42
+ }
43
+ };
44
+ // !SECTION Functions
45
+ // SECTION: Event Handlers
46
+ // !SECTION: Event Handlers
47
+ // SECTION: Side Effects
48
+ useEffect(() => {
49
+ setClassName(cn(getVariantClass(variant), color));
50
+ }, [variant, color]);
51
+ // !SECTION: Side Effects
52
+ // SECTION: UI
53
+ return _jsx("p", { className: className, children: children });
54
+ // !SECTION: UI
55
+ }
56
+ export { Text };
package/dist/index.esm.js CHANGED
@@ -1 +1 @@
1
- import{jsx as e}from"react/jsx-runtime";import{cva as r}from"class-variance-authority";import{Slot as i}from"radix-ui";import{clsx as a}from"clsx";import{twMerge as t}from"tailwind-merge";function n(...e){return t(a(e))}const d=r("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 o({className:r,variant:a="default",size:t="default",asChild:o=!1,...s}){const u=o?i.Root:"button";return e(u,{"data-slot":"button","data-variant":a,"data-size":t,className:n(d({variant:a,size:t,className:r})),...s})}export{o as Button};
1
+ import{jsx as e,jsxs as t}from"react/jsx-runtime";import{cva as a}from"class-variance-authority";import{Slot as r,Checkbox as i,Select as n}from"radix-ui";import{clsx as o}from"clsx";import{twMerge as s}from"tailwind-merge";import{CheckIcon as d,ChevronDownIcon as l,ChevronUpIcon as c}from"lucide-react";import{useState as u,useEffect as p}from"react";function g(...e){return s(o(e))}const m=a("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 v({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:g(m({variant:a,size:i,className:t})),...o})}function f({className:t,...a}){return e(i.Root,{"data-slot":"checkbox",className:g("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(d,{})})})}function b({...t}){return e(n.Root,{"data-slot":"select",...t})}function x({className:t,...a}){return e(n.Group,{"data-slot":"select-group",className:g("scroll-my-1 p-1",t),...a})}function h({...t}){return e(n.Value,{"data-slot":"select-value",...t})}function y({className:a,size:r="default",children:i,...o}){return t(n.Trigger,{"data-slot":"select-trigger","data-size":r,className:g("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(l,{className:"text-muted-foreground size-4 pointer-events-none"})})]})}function z({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:g("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(H,{}),e(n.Viewport,{"data-position":i,className:g("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(_,{})]})})}function k({className:t,...a}){return e(n.Label,{"data-slot":"select-label",className:g("text-muted-foreground px-1.5 py-1 text-xs",t),...a})}function N({className:a,children:r,...i}){return t(n.Item,{"data-slot":"select-item",className:g("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(d,{className:"pointer-events-none"})})}),e(n.ItemText,{children:r})]})}function w({className:t,...a}){return e(n.Separator,{"data-slot":"select-separator",className:g("bg-border -mx-1 my-1 h-px pointer-events-none",t),...a})}function H({className:t,...a}){return e(n.ScrollUpButton,{"data-slot":"select-scroll-up-button",className:g("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e(c,{})})}function _({className:t,...a}){return e(n.ScrollDownButton,{"data-slot":"select-scroll-down-button",className:g("bg-popover z-10 flex cursor-default items-center justify-center py-1 [&_svg:not([class*='size-'])]:size-4",t),...a,children:e(l,{})})}var B;function C({variant:t=B.Body,color:a,children:r}){const[i,n]=u("");return p(()=>{n(g((e=>{switch(e){case B.H1:return"text-[61px] font-heading";case B.H2:return"text-[48px] font-heading";case B.H3:return"text-[39px] font-heading";case B.H4:return"text-[31px] font-bold font-heading";case B.H5:return"text-[25px] font-bold font-heading";case B.H6:return"text-[20px] font-bold font-heading";case B.Body:return"text-[16px] font-body";case B.Button:return"text-[16px] font-bold font-body";default:return"text-[16px] font-body"}})(t),a))},[t,a]),e("p",{className:i,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"}(B||(B={}));export{v as Button,f as Checkbox,b as Select,z as SelectContent,x as SelectGroup,N as SelectItem,k as SelectLabel,_ as SelectScrollDownButton,H as SelectScrollUpButton,w as SelectSeparator,y as SelectTrigger,h as SelectValue,C as Text};
package/dist/index.js CHANGED
@@ -1,2 +1,8 @@
1
1
  import { Button } from '@/src/components/button';
2
+ import { Checkbox } from '@/src/components/checkbox';
3
+ import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from '@/src/components/select';
4
+ import { Text } from '@/src/components/text';
2
5
  export { Button };
6
+ export { Checkbox };
7
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
8
+ export { Text };
@@ -0,0 +1,16 @@
1
+ var TextVariant;
2
+ (function (TextVariant) {
3
+ TextVariant[TextVariant["H1"] = 0] = "H1";
4
+ TextVariant[TextVariant["H2"] = 1] = "H2";
5
+ TextVariant[TextVariant["H3"] = 2] = "H3";
6
+ TextVariant[TextVariant["H4"] = 3] = "H4";
7
+ TextVariant[TextVariant["H5"] = 4] = "H5";
8
+ TextVariant[TextVariant["H6"] = 5] = "H6";
9
+ TextVariant[TextVariant["Body"] = 6] = "Body";
10
+ TextVariant[TextVariant["Button"] = 7] = "Button";
11
+ TextVariant[TextVariant["Subtitle1"] = 8] = "Subtitle1";
12
+ TextVariant[TextVariant["Subtitle2"] = 9] = "Subtitle2";
13
+ TextVariant[TextVariant["Caption"] = 10] = "Caption";
14
+ TextVariant[TextVariant["Custom"] = 11] = "Custom";
15
+ })(TextVariant || (TextVariant = {}));
16
+ export { TextVariant };
@@ -0,0 +1,4 @@
1
+ import * as React from 'react';
2
+ import { Checkbox as CheckboxPrimitive } from 'radix-ui';
3
+ declare function Checkbox({ className, ...props }: React.ComponentProps<typeof CheckboxPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ export { Checkbox };
@@ -0,0 +1,15 @@
1
+ import * as React from 'react';
2
+ import { Select as SelectPrimitive } from 'radix-ui';
3
+ declare function Select({ ...props }: React.ComponentProps<typeof SelectPrimitive.Root>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SelectGroup({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
5
+ declare function SelectValue({ ...props }: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
6
+ declare function SelectTrigger({ className, size, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Trigger> & {
7
+ size?: 'sm' | 'default';
8
+ }): import("react/jsx-runtime").JSX.Element;
9
+ declare function SelectContent({ className, children, position, align, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
10
+ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
11
+ declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
13
+ declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
14
+ declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
15
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
@@ -0,0 +1,6 @@
1
+ import { TextProps } from '@/src/lib/types';
2
+ /**
3
+ * This function renders the Text component for the library.
4
+ */
5
+ declare function Text({ variant, color, children }: TextProps): import("react/jsx-runtime").JSX.Element;
6
+ export { Text };
@@ -1,2 +1,8 @@
1
1
  import { Button } from '@/src/components/button';
2
+ import { Checkbox } from '@/src/components/checkbox';
3
+ import { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue } from '@/src/components/select';
4
+ import { Text } from '@/src/components/text';
2
5
  export { Button };
6
+ export { Checkbox };
7
+ export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue };
8
+ export { Text };
@@ -0,0 +1,21 @@
1
+ declare enum TextVariant {
2
+ H1 = 0,
3
+ H2 = 1,
4
+ H3 = 2,
5
+ H4 = 3,
6
+ H5 = 4,
7
+ H6 = 5,
8
+ Body = 6,
9
+ Button = 7,
10
+ Subtitle1 = 8,
11
+ Subtitle2 = 9,
12
+ Caption = 10,
13
+ Custom = 11
14
+ }
15
+ interface TextProps {
16
+ variant?: TextVariant;
17
+ color?: string;
18
+ children: React.ReactNode;
19
+ }
20
+ export { TextVariant };
21
+ export type { TextProps };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "get-elementa-ui",
3
- "version": "1.0.0",
3
+ "version": "1.5.0",
4
4
  "description": "Elementa UI components library.",
5
5
  "homepage": "https://deriva.xyz/branding",
6
6
  "main": "dist/index.js",
@@ -38,8 +38,7 @@
38
38
  "build": "rollup -c && tsc",
39
39
  "build:watch": "rollup -c -w",
40
40
  "prepublishOnly": "npm run build",
41
- "publish:npm": "npm publish --access public",
42
- "svgr": "svgr src/icons/*.svg --stdin-filepath .prettierrc --template src/lib/template.js --expand-props none --ignore-existing"
41
+ "publish:npm": "npm publish --access public"
43
42
  },
44
43
  "peerDependencies": {
45
44
  "react": "^19.1.0"
@@ -54,7 +53,6 @@
54
53
  "@rollup/plugin-json": "^6.1.0",
55
54
  "@rollup/plugin-node-resolve": "^16.0.1",
56
55
  "@rollup/plugin-typescript": "^12.1.3",
57
- "@svgr/cli": "^8.1.0",
58
56
  "@types/babel__core": "^7.20.5",
59
57
  "@types/babel__template": "^7.4.4",
60
58
  "@types/node": "^20.12.2",
@@ -86,9 +84,16 @@
86
84
  "clsx": "^2.1.1",
87
85
  "lucide-react": "^0.575.0",
88
86
  "radix-ui": "^1.4.3",
87
+ "rollup-plugin-copy": "^3.5.0",
89
88
  "shadcn": "^3.8.5",
90
89
  "tailwind-merge": "^3.5.0",
91
90
  "ts-node": "^10.9.2",
92
91
  "tw-animate-css": "^1.4.0"
92
+ },
93
+ "exports": {
94
+ "./theme.css": "./src/styles/globals.css"
95
+ },
96
+ "resolutions": {
97
+ "@types/minimatch": "5.1.2"
93
98
  }
94
99
  }
package/src/index.ts CHANGED
@@ -1,3 +1,31 @@
1
1
  import { Button } from '@/src/components/button';
2
+ import { Checkbox } from '@/src/components/checkbox';
3
+ import {
4
+ Select,
5
+ SelectContent,
6
+ SelectGroup,
7
+ SelectItem,
8
+ SelectLabel,
9
+ SelectScrollDownButton,
10
+ SelectScrollUpButton,
11
+ SelectSeparator,
12
+ SelectTrigger,
13
+ SelectValue
14
+ } from '@/src/components/select';
15
+ import { Text } from '@/src/components/text';
2
16
 
3
17
  export { Button };
18
+ export { Checkbox };
19
+ export {
20
+ Select,
21
+ SelectContent,
22
+ SelectGroup,
23
+ SelectItem,
24
+ SelectLabel,
25
+ SelectScrollDownButton,
26
+ SelectScrollUpButton,
27
+ SelectSeparator,
28
+ SelectTrigger,
29
+ SelectValue
30
+ };
31
+ export { Text };