@telepix-lab/telepix-ui 0.3.1 → 0.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- interface AutocompleteProps<T> {
1
+ export interface AutocompleteProps<T> {
2
2
  placeholder?: string;
3
3
  data: T[];
4
4
  value?: string;
@@ -13,4 +13,3 @@ interface AutocompleteProps<T> {
13
13
  itemClassName?: string;
14
14
  }
15
15
  export declare const Autocomplete: <T>({ placeholder, data, value, displayValue, onSelect, onChange, noResultsMessage, maxResults, debounceTime, wrapperClassName, contentClassName, itemClassName, }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Checkbox as CheckboxRadix } from "radix-ui";
3
2
  interface CheckboxProps extends CheckboxRadix.CheckboxProps {
4
3
  label?: string;
@@ -20,5 +19,5 @@ interface CheckboxProps extends CheckboxRadix.CheckboxProps {
20
19
  * />
21
20
  * ```
22
21
  */
23
- export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
24
23
  export {};
@@ -1,16 +1,31 @@
1
1
  export { RadioGroup, RadioItem } from "./radio-group";
2
+ export type { RadioGroupOrientation } from "./radio-group/types";
2
3
  export { Checkbox } from "./checkbox";
3
4
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, } from "./dialog";
4
5
  export { Select, SelectTrigger, SelectContent, SelectGroup, SelectLabel, SelectSeparator, SelectItem, } from "./select";
6
+ export { SELECT_TRIGGER_SIZES, SELECT_TRIGGER_VARIANTS } from "./select/types";
7
+ export type { SelectTriggerSize, SelectTriggerVariant } from "./select/types";
5
8
  export { VerticalMenus, VerticalMenu } from "./vertical-menu";
9
+ export { VERTICAL_MENU_SIZES, VERTICAL_MENU_VARIANTS, } from "./vertical-menu/types";
10
+ export type { VerticalMenuSize, VerticalMenuVariant, } from "./vertical-menu/types";
6
11
  export { HorizontalTabs, HorizontalTab } from "./horizontal-tab";
12
+ export { HORIZONTAL_TAB_SIZES } from "./horizontal-tab/types";
13
+ export type { HorizontalTabSize } from "./horizontal-tab/types";
7
14
  export { ModeTabs, ModeTab } from "./mode-tab";
8
15
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow, TooltipHeader, TooltipDescription, TooltipFooter, } from "./tooltip";
16
+ export { TOOLTIP_SHORT_VARIANTS, TOOLTIP_SHORT_SIZES } from "./tooltip/types";
17
+ export type { TooltipShortSize, TooltipShortVariant } from "./tooltip/types";
9
18
  export { MultipleSelect, MultipleSelectTrigger, MultipleSelectContent, MultipleSelectValue, } from "./multiple-select";
19
+ export { MULTIPLE_SELECT_SIZES } from "./multiple-select/types";
20
+ export type { MultipleSelectSize } from "./multiple-select/types";
10
21
  export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, } from "./table";
11
22
  export { DataTable } from "./data-table";
23
+ export type { DataTableConfig, DataTableProps } from "./data-table";
12
24
  export { InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, } from "./interactive-list-item";
13
25
  export { Calendar } from "./calendar";
26
+ export type { CalendarProps } from "./calendar";
14
27
  export { DatePicker } from "./date-picker";
28
+ export type { DatePickerProps } from "./date-picker";
15
29
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuArrow, ContextMenuLabel, ContextMenuItem, ContextMenuGroup, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, ContextMenuSeparator, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuItemIndicator, } from "./context-menu";
16
30
  export { Autocomplete } from "./autocomplete";
31
+ export type { AutocompleteProps } from "./autocomplete";
@@ -12970,12 +12970,14 @@ exports.DialogFooter = DialogFooter;
12970
12970
  exports.DialogHeader = DialogHeader;
12971
12971
  exports.DialogPortal = DialogPortal;
12972
12972
  exports.DialogTrigger = DialogTrigger;
12973
+ exports.HORIZONTAL_TAB_SIZES = HORIZONTAL_TAB_SIZES;
12973
12974
  exports.HorizontalTab = HorizontalTab;
12974
12975
  exports.HorizontalTabs = HorizontalTabs;
12975
12976
  exports.InteractiveListItem = InteractiveListItem;
12976
12977
  exports.InteractiveListItemActions = InteractiveListItemActions;
12977
12978
  exports.InteractiveListItemContent = InteractiveListItemContent;
12978
12979
  exports.InteractiveListItemIcon = InteractiveListItemIcon;
12980
+ exports.MULTIPLE_SELECT_SIZES = MULTIPLE_SELECT_SIZES;
12979
12981
  exports.ModeTab = ModeTab;
12980
12982
  exports.ModeTabs = ModeTabs;
12981
12983
  exports.MultipleSelect = MultipleSelect;
@@ -12984,6 +12986,8 @@ exports.MultipleSelectTrigger = MultipleSelectTrigger;
12984
12986
  exports.MultipleSelectValue = MultipleSelectValue;
12985
12987
  exports.RadioGroup = RadioGroup;
12986
12988
  exports.RadioItem = RadioItem;
12989
+ exports.SELECT_TRIGGER_SIZES = SELECT_TRIGGER_SIZES;
12990
+ exports.SELECT_TRIGGER_VARIANTS = SELECT_TRIGGER_VARIANTS;
12987
12991
  exports.Select = Select;
12988
12992
  exports.SelectContent = SelectContent;
12989
12993
  exports.SelectGroup = SelectGroup;
@@ -12991,6 +12995,8 @@ exports.SelectItem = SelectItem;
12991
12995
  exports.SelectLabel = SelectLabel;
12992
12996
  exports.SelectSeparator = SelectSeparator;
12993
12997
  exports.SelectTrigger = SelectTrigger;
12998
+ exports.TOOLTIP_SHORT_SIZES = TOOLTIP_SHORT_SIZES;
12999
+ exports.TOOLTIP_SHORT_VARIANTS = TOOLTIP_SHORT_VARIANTS;
12994
13000
  exports.Table = Table;
12995
13001
  exports.TableBody = TableBody;
12996
13002
  exports.TableCell = TableCell;
@@ -13004,5 +13010,7 @@ exports.TooltipDescription = TooltipDescription;
13004
13010
  exports.TooltipFooter = TooltipFooter;
13005
13011
  exports.TooltipHeader = TooltipHeader;
13006
13012
  exports.TooltipTrigger = TooltipTrigger;
13013
+ exports.VERTICAL_MENU_SIZES = VERTICAL_MENU_SIZES;
13014
+ exports.VERTICAL_MENU_VARIANTS = VERTICAL_MENU_VARIANTS;
13007
13015
  exports.VerticalMenu = VerticalMenu;
13008
13016
  exports.VerticalMenus = VerticalMenus;
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import { ReactNode, Ref } from "react";
2
2
  /** table 기반 config로 테이블 완성 component */
3
3
  interface TableInfo<T> {
4
4
  header: string;
5
- renderFn: (item: T) => React.ReactNode;
5
+ renderFn: (item: T) => ReactNode;
6
6
  minWidth?: number;
7
7
  maxWidth?: number;
8
8
  showTooltip?: boolean;
@@ -24,12 +24,12 @@ export interface DataTableProps<T> {
24
24
  cell?: string;
25
25
  };
26
26
  refs?: {
27
- tableRef?: React.Ref<HTMLTableElement>;
28
- headerRef?: React.Ref<HTMLTableRowElement>;
29
- bodyRef?: React.Ref<HTMLTableSectionElement>;
30
- rowRef?: React.Ref<HTMLTableRowElement>;
31
- cellRef?: React.Ref<HTMLTableCellElement>;
32
- headRef?: React.Ref<HTMLTableCellElement>;
27
+ tableRef?: Ref<HTMLTableElement>;
28
+ headerRef?: Ref<HTMLTableRowElement>;
29
+ bodyRef?: Ref<HTMLTableSectionElement>;
30
+ rowRef?: Ref<HTMLTableRowElement>;
31
+ cellRef?: Ref<HTMLTableCellElement>;
32
+ headRef?: Ref<HTMLTableCellElement>;
33
33
  };
34
34
  }
35
35
  export declare const DataTable: <T extends object>({ config, data, emptyMessage, onRowClick, enableSelection, shouldLastBorderRender, classNames, refs, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,15 @@
1
1
  export { Button } from "./button";
2
+ export { BUTTON_SIZES, BUTTON_VARIANTS } from "./button/types";
3
+ export type { ButtonSize, ButtonVariant } from "./button/types";
2
4
  export { Text } from "./text";
5
+ export { TEXT_SIZES, TEXT_VARIANTS, TEXT_ALIGNMENTS, FONT_WEIGHTS, } from "./text/types";
6
+ export type { TextSize, FontWeight, TextAlignment, TextVariant, } from "./text/types";
3
7
  export { Input } from "./input";
8
+ export { INPUT_SIZES } from "./input/types";
9
+ export type { InputSize } from "./input/types";
4
10
  export { TextArea } from "./textarea";
5
11
  export { Card, CardBody, CardContent, CardFooter, CardHeader } from "./card";
6
12
  export { Tag } from "./tag";
13
+ export { TAG_SIZES, TAG_VARIANTS } from "./tag/types";
14
+ export type { TagSize, TagVariant } from "./tag/types";
7
15
  export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./pagination";
package/dist/cjs/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
3
  var jsxRuntime = require('react/jsx-runtime');
4
- var React = require('react');
4
+ var react = require('react');
5
5
 
6
6
  const BUTTON_SIZES = {
7
7
  REGULAR: "regular",
@@ -3327,7 +3327,7 @@ function cn(...inputs) {
3327
3327
  * </Button>
3328
3328
  * ```
3329
3329
  */
3330
- const Button = React.forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
3330
+ const Button = react.forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
3331
3331
  return (jsxRuntime.jsxs("button", { ref: ref, disabled: disabled ?? isLoading, className: cn("flex items-center justify-center relative box-border m-0 border-transparent outline-none cursor-pointer select-none align-middle appearance-none text-center transition-normal font-medium w-auto rounded-md overflow-hidden pointer-events-auto disabled:pointer-events-none disabled:cursor-not-allowed", size === BUTTON_SIZES.SMALL &&
3332
3332
  "h-7 py-0 px-1.5 text-label leading-label-compact", size === BUTTON_SIZES.REGULAR &&
3333
3333
  "h-9 py-0 px-2 text-body leading-body-compact", size === BUTTON_SIZES.LARGE &&
@@ -3341,6 +3341,33 @@ const Button = React.forwardRef(({ variant = "accent", size = "regular", fullWid
3341
3341
  });
3342
3342
  Button.displayName = "Button";
3343
3343
 
3344
+ const TEXT_SIZES = {
3345
+ XSMALL: "xsmall",
3346
+ LABEL: "label",
3347
+ BODY: "body",
3348
+ BASE: "base",
3349
+ LARGE: "large",
3350
+ XLARGE: "xl",
3351
+ XXLARGE: "xxl",
3352
+ XXXLARGE: "xxxl",
3353
+ XXXXLARGE: "xxxxl",
3354
+ };
3355
+ const FONT_WEIGHTS = {
3356
+ THIN: "thin",
3357
+ EXTRALIGHT: "extralight",
3358
+ LIGHT: "light",
3359
+ REGULAR: "regular",
3360
+ MEDIUM: "medium",
3361
+ SEMIBOLD: "semibold",
3362
+ BOLD: "bold",
3363
+ EXTRABOLD: "extrabold",
3364
+ };
3365
+ const TEXT_ALIGNMENTS = {
3366
+ LEFT: "left",
3367
+ CENTER: "center",
3368
+ RIGHT: "right",
3369
+ JUSTIFY: "justify",
3370
+ };
3344
3371
  const TEXT_VARIANTS = {
3345
3372
  BOLD3XLARGEBOLD: "bold3XLargeBold",
3346
3373
  BOLD2XLARGEBOLDCOMPACT: "bold2XLargeBoldCompact",
@@ -3558,7 +3585,7 @@ const INPUT_SIZES = {
3558
3585
  * />
3559
3586
  * ```
3560
3587
  */
3561
- const Input = React.forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
3588
+ const Input = react.forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
3562
3589
  return (jsxRuntime.jsxs("div", { "aria-disabled": rest.disabled, className: cn("flex itesm-center justify-center rounded-lg bg-fill-mono-default hover:bg-fill-mono-hovered focus-within:bg-fill-mono-default border border-border-bound focus-within:border-border-focused has-[input:disabled]:border-transparent", size === INPUT_SIZES.REGULAR &&
3563
3590
  "py-1.5 px-2 text-body leading-body-compact font-medium gap-2", size === INPUT_SIZES.LARGE &&
3564
3591
  "py-[11px] px-4 text-base leading-base-compact font-medium gap-3", wrapperClassName), children: [leftIcon && (jsxRuntime.jsx("span", { className: "flex items-center justify-center", children: leftIcon })), jsxRuntime.jsx("input", { ref: ref, className: cn("border-none outline-none p-0 flex-1 bg-transparent text-comp-mono-default placeholder:text-comp-mono-subtle-default hover:placeholder:text-comp-mono-subtle-hovered focus:placeholder:text-comp-mono-subtle-selected disabled:text-comp-disabled disabled:placeholder:text-comp-disabled", size === INPUT_SIZES.REGULAR &&
@@ -3583,7 +3610,7 @@ Input.displayName = "Input";
3583
3610
  * />
3584
3611
  * ```
3585
3612
  */
3586
- const TextArea = React.forwardRef((rest, ref) => {
3613
+ const TextArea = react.forwardRef((rest, ref) => {
3587
3614
  return (jsxRuntime.jsx("div", { className: "py-3 px-4 flex-1 h-full", children: jsxRuntime.jsx("textarea", { ref: ref, className: cn("w-full h-full flex-1 p-0 text-body leading-body font-medium border-none resize-none outline-none text-comp-mono-default disabled:text-comp-disabled disabled:placeholder:text-comp-disabled placeholder:text-comp-mono-subtle-default", rest.className), ...rest }) }));
3588
3615
  });
3589
3616
  TextArea.displayName = "TextArea";
@@ -3607,19 +3634,19 @@ TextArea.displayName = "TextArea";
3607
3634
  * </CardFooter>
3608
3635
  * </Card>
3609
3636
  */
3610
- const Card = React.forwardRef(({ className, ...rest }, ref) => {
3637
+ const Card = react.forwardRef(({ className, ...rest }, ref) => {
3611
3638
  return (jsxRuntime.jsx("div", { ...rest, ref: ref, className: cn("flex flex-col rounded-2xl border border-border-divider bg-page-l0", className), children: rest.children }));
3612
3639
  });
3613
- const CardBody = React.forwardRef(({ className, ...rest }, ref) => {
3640
+ const CardBody = react.forwardRef(({ className, ...rest }, ref) => {
3614
3641
  return (jsxRuntime.jsx("div", { ...rest, ref: ref, className: cn("p-6", className), children: rest.children }));
3615
3642
  });
3616
- const CardHeader = React.forwardRef(({ className, ...rest }, ref) => {
3643
+ const CardHeader = react.forwardRef(({ className, ...rest }, ref) => {
3617
3644
  return (jsxRuntime.jsx("div", { ...rest, ref: ref, className: cn("text-comp-mono-default font-bold text-xl leading-xl-compact mb-2", className), children: rest.children }));
3618
3645
  });
3619
- const CardContent = React.forwardRef((rest, ref) => {
3646
+ const CardContent = react.forwardRef((rest, ref) => {
3620
3647
  return (jsxRuntime.jsx("div", { ...rest, ref: ref, children: rest.children }));
3621
3648
  });
3622
- const CardFooter = React.forwardRef(({ className, ...rest }, ref) => {
3649
+ const CardFooter = react.forwardRef(({ className, ...rest }, ref) => {
3623
3650
  return (jsxRuntime.jsx("div", { ...rest, ref: ref, className: cn("py-4 px-6", className), children: rest.children }));
3624
3651
  });
3625
3652
 
@@ -3677,7 +3704,7 @@ var defaultAttributes = {
3677
3704
  */
3678
3705
 
3679
3706
 
3680
- const Icon = React.forwardRef(
3707
+ const Icon = react.forwardRef(
3681
3708
  ({
3682
3709
  color = "currentColor",
3683
3710
  size = 24,
@@ -3687,7 +3714,7 @@ const Icon = React.forwardRef(
3687
3714
  children,
3688
3715
  iconNode,
3689
3716
  ...rest
3690
- }, ref) => React.createElement(
3717
+ }, ref) => react.createElement(
3691
3718
  "svg",
3692
3719
  {
3693
3720
  ref,
@@ -3701,7 +3728,7 @@ const Icon = React.forwardRef(
3701
3728
  ...rest
3702
3729
  },
3703
3730
  [
3704
- ...iconNode.map(([tag, attrs]) => React.createElement(tag, attrs)),
3731
+ ...iconNode.map(([tag, attrs]) => react.createElement(tag, attrs)),
3705
3732
  ...Array.isArray(children) ? children : [children]
3706
3733
  ]
3707
3734
  )
@@ -3716,8 +3743,8 @@ const Icon = React.forwardRef(
3716
3743
 
3717
3744
 
3718
3745
  const createLucideIcon = (iconName, iconNode) => {
3719
- const Component = React.forwardRef(
3720
- ({ className, ...props }, ref) => React.createElement(Icon, {
3746
+ const Component = react.forwardRef(
3747
+ ({ className, ...props }, ref) => react.createElement(Icon, {
3721
3748
  ref,
3722
3749
  iconNode,
3723
3750
  className: mergeClasses(
@@ -3783,8 +3810,8 @@ const __iconNode = [
3783
3810
  ];
3784
3811
  const X = createLucideIcon("x", __iconNode);
3785
3812
 
3786
- const Tag = React.forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
3787
- const [isSelected, setIsSelected] = React.useState(false);
3813
+ const Tag = react.forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
3814
+ const [isSelected, setIsSelected] = react.useState(false);
3788
3815
  const handleClick = (event) => {
3789
3816
  setIsSelected((prev) => !prev);
3790
3817
  onClick?.(event);
@@ -3810,6 +3837,15 @@ const Tag = React.forwardRef(({ icon, value, variant = "filled", size = "regular
3810
3837
  });
3811
3838
  Tag.displayName = "Tag";
3812
3839
 
3840
+ const TAG_VARIANTS = {
3841
+ FILLED: "filled",
3842
+ ACCENT: "accent",
3843
+ };
3844
+ const TAG_SIZES = {
3845
+ REGULAR: "regular",
3846
+ SMALL: "small",
3847
+ };
3848
+
3813
3849
  const Pagination = ({ className, ...rest }) => {
3814
3850
  return (jsxRuntime.jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto my-0 flex justify-center w-full", className), ...rest }));
3815
3851
  };
@@ -3832,12 +3868,16 @@ const PaginationEllipsis = ({ className, ...rest }) => {
3832
3868
  return (jsxRuntime.jsx("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex items-center justify-center size-9 rounded-md hover:bg-fill-mono-hovered", className), ...rest, children: jsxRuntime.jsx(Ellipsis, { className: "size-4 stroke-comp-mono-subtle-default" }) }));
3833
3869
  };
3834
3870
 
3871
+ exports.BUTTON_SIZES = BUTTON_SIZES;
3872
+ exports.BUTTON_VARIANTS = BUTTON_VARIANTS;
3835
3873
  exports.Button = Button;
3836
3874
  exports.Card = Card;
3837
3875
  exports.CardBody = CardBody;
3838
3876
  exports.CardContent = CardContent;
3839
3877
  exports.CardFooter = CardFooter;
3840
3878
  exports.CardHeader = CardHeader;
3879
+ exports.FONT_WEIGHTS = FONT_WEIGHTS;
3880
+ exports.INPUT_SIZES = INPUT_SIZES;
3841
3881
  exports.Input = Input;
3842
3882
  exports.Pagination = Pagination;
3843
3883
  exports.PaginationContent = PaginationContent;
@@ -3846,6 +3886,11 @@ exports.PaginationItem = PaginationItem;
3846
3886
  exports.PaginationLink = PaginationLink;
3847
3887
  exports.PaginationNext = PaginationNext;
3848
3888
  exports.PaginationPrevious = PaginationPrevious;
3889
+ exports.TAG_SIZES = TAG_SIZES;
3890
+ exports.TAG_VARIANTS = TAG_VARIANTS;
3891
+ exports.TEXT_ALIGNMENTS = TEXT_ALIGNMENTS;
3892
+ exports.TEXT_SIZES = TEXT_SIZES;
3893
+ exports.TEXT_VARIANTS = TEXT_VARIANTS;
3849
3894
  exports.Tag = Tag;
3850
3895
  exports.Text = Text;
3851
3896
  exports.TextArea = TextArea;
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { RadioGroup as RadioGroupRadix } from "radix-ui";
3
2
  import { RadioGroupOrientation } from "./types";
4
3
  interface RadioGroupProps extends RadioGroupRadix.RadioGroupProps {
@@ -22,12 +21,12 @@ interface RadioGroupProps extends RadioGroupRadix.RadioGroupProps {
22
21
  * </RadioGroup>
23
22
  * ```
24
23
  */
25
- export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
24
+ export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
26
25
  interface RadioItemProps extends RadioGroupRadix.RadioGroupItemProps {
27
26
  label?: string;
28
27
  labelClassName?: string;
29
28
  wrapperClassName?: string;
30
29
  className?: string;
31
30
  }
32
- export declare const RadioItem: React.ForwardRefExoticComponent<RadioItemProps & React.RefAttributes<HTMLButtonElement>>;
31
+ export declare const RadioItem: import("react").ForwardRefExoticComponent<RadioItemProps & import("react").RefAttributes<HTMLButtonElement>>;
33
32
  export {};
package/dist/client.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as React$1 from 'react';
2
- import React__default from 'react';
2
+ import React__default, { ReactNode, Ref } from 'react';
3
3
  import { RadioGroup as RadioGroup$1, Checkbox as Checkbox$1, Dialog as Dialog$1, Select as Select$1, Tooltip as Tooltip$1, Popover, ContextMenu as ContextMenu$1 } from 'radix-ui';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
5
  import { DayPicker, DateRange } from 'react-day-picker';
@@ -31,14 +31,14 @@ interface RadioGroupProps extends RadioGroup$1.RadioGroupProps {
31
31
  * </RadioGroup>
32
32
  * ```
33
33
  */
34
- declare const RadioGroup: React__default.ForwardRefExoticComponent<RadioGroupProps & React__default.RefAttributes<HTMLDivElement>>;
34
+ declare const RadioGroup: React$1.ForwardRefExoticComponent<RadioGroupProps & React$1.RefAttributes<HTMLDivElement>>;
35
35
  interface RadioItemProps extends RadioGroup$1.RadioGroupItemProps {
36
36
  label?: string;
37
37
  labelClassName?: string;
38
38
  wrapperClassName?: string;
39
39
  className?: string;
40
40
  }
41
- declare const RadioItem: React__default.ForwardRefExoticComponent<RadioItemProps & React__default.RefAttributes<HTMLButtonElement>>;
41
+ declare const RadioItem: React$1.ForwardRefExoticComponent<RadioItemProps & React$1.RefAttributes<HTMLButtonElement>>;
42
42
 
43
43
  interface CheckboxProps extends Checkbox$1.CheckboxProps {
44
44
  label?: string;
@@ -60,7 +60,7 @@ interface CheckboxProps extends Checkbox$1.CheckboxProps {
60
60
  * />
61
61
  * ```
62
62
  */
63
- declare const Checkbox: React__default.ForwardRefExoticComponent<CheckboxProps & React__default.RefAttributes<HTMLButtonElement>>;
63
+ declare const Checkbox: React$1.ForwardRefExoticComponent<CheckboxProps & React$1.RefAttributes<HTMLButtonElement>>;
64
64
 
65
65
  type CardProps = React__default.DetailedHTMLProps<React__default.HTMLAttributes<HTMLDivElement>, HTMLDivElement>;
66
66
  declare const CardBody: React__default.ForwardRefExoticComponent<Omit<CardProps, "ref"> & React__default.RefAttributes<HTMLDivElement>>;
@@ -305,7 +305,7 @@ declare const TableCell: React__default.ForwardRefExoticComponent<Omit<TableCell
305
305
  /** table 기반 config로 테이블 완성 component */
306
306
  interface TableInfo<T> {
307
307
  header: string;
308
- renderFn: (item: T) => React__default.ReactNode;
308
+ renderFn: (item: T) => ReactNode;
309
309
  minWidth?: number;
310
310
  maxWidth?: number;
311
311
  showTooltip?: boolean;
@@ -327,12 +327,12 @@ interface DataTableProps<T> {
327
327
  cell?: string;
328
328
  };
329
329
  refs?: {
330
- tableRef?: React__default.Ref<HTMLTableElement>;
331
- headerRef?: React__default.Ref<HTMLTableRowElement>;
332
- bodyRef?: React__default.Ref<HTMLTableSectionElement>;
333
- rowRef?: React__default.Ref<HTMLTableRowElement>;
334
- cellRef?: React__default.Ref<HTMLTableCellElement>;
335
- headRef?: React__default.Ref<HTMLTableCellElement>;
330
+ tableRef?: Ref<HTMLTableElement>;
331
+ headerRef?: Ref<HTMLTableRowElement>;
332
+ bodyRef?: Ref<HTMLTableSectionElement>;
333
+ rowRef?: Ref<HTMLTableRowElement>;
334
+ cellRef?: Ref<HTMLTableCellElement>;
335
+ headRef?: Ref<HTMLTableCellElement>;
336
336
  };
337
337
  }
338
338
  declare const DataTable: <T extends object>({ config, data, emptyMessage, onRowClick, enableSelection, shouldLastBorderRender, classNames, refs, }: DataTableProps<T>) => react_jsx_runtime.JSX.Element;
@@ -399,4 +399,4 @@ interface AutocompleteProps<T> {
399
399
  }
400
400
  declare const Autocomplete: <T>({ placeholder, data, value, displayValue, onSelect, onChange, noResultsMessage, maxResults, debounceTime, wrapperClassName, contentClassName, itemClassName, }: AutocompleteProps<T>) => react_jsx_runtime.JSX.Element;
401
401
 
402
- export { Autocomplete, Calendar, Checkbox, ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, HorizontalTab, HorizontalTabs, InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, ModeTab, ModeTabs, MultipleSelect, MultipleSelectContent, MultipleSelectTrigger, MultipleSelectValue, RadioGroup, RadioItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipArrow, TooltipContent, TooltipDescription, TooltipFooter, TooltipHeader, TooltipTrigger, VerticalMenu, VerticalMenus };
402
+ export { Autocomplete, type AutocompleteProps, Calendar, type CalendarProps, Checkbox, ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, type DataTableConfig, type DataTableProps, DatePicker, type DatePickerProps, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, HORIZONTAL_TAB_SIZES, HorizontalTab, type HorizontalTabSize, HorizontalTabs, InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, MULTIPLE_SELECT_SIZES, ModeTab, ModeTabs, MultipleSelect, MultipleSelectContent, type MultipleSelectSize, MultipleSelectTrigger, MultipleSelectValue, RadioGroup, type RadioGroupOrientation, RadioItem, SELECT_TRIGGER_SIZES, SELECT_TRIGGER_VARIANTS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, type SelectTriggerSize, type SelectTriggerVariant, TOOLTIP_SHORT_SIZES, TOOLTIP_SHORT_VARIANTS, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipArrow, TooltipContent, TooltipDescription, TooltipFooter, TooltipHeader, type TooltipShortSize, type TooltipShortVariant, TooltipTrigger, VERTICAL_MENU_SIZES, VERTICAL_MENU_VARIANTS, VerticalMenu, type VerticalMenuSize, type VerticalMenuVariant, VerticalMenus };
@@ -1,4 +1,4 @@
1
- interface AutocompleteProps<T> {
1
+ export interface AutocompleteProps<T> {
2
2
  placeholder?: string;
3
3
  data: T[];
4
4
  value?: string;
@@ -13,4 +13,3 @@ interface AutocompleteProps<T> {
13
13
  itemClassName?: string;
14
14
  }
15
15
  export declare const Autocomplete: <T>({ placeholder, data, value, displayValue, onSelect, onChange, noResultsMessage, maxResults, debounceTime, wrapperClassName, contentClassName, itemClassName, }: AutocompleteProps<T>) => import("react/jsx-runtime").JSX.Element;
16
- export {};
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { Checkbox as CheckboxRadix } from "radix-ui";
3
2
  interface CheckboxProps extends CheckboxRadix.CheckboxProps {
4
3
  label?: string;
@@ -20,5 +19,5 @@ interface CheckboxProps extends CheckboxRadix.CheckboxProps {
20
19
  * />
21
20
  * ```
22
21
  */
23
- export declare const Checkbox: React.ForwardRefExoticComponent<CheckboxProps & React.RefAttributes<HTMLButtonElement>>;
22
+ export declare const Checkbox: import("react").ForwardRefExoticComponent<CheckboxProps & import("react").RefAttributes<HTMLButtonElement>>;
24
23
  export {};
@@ -1,16 +1,31 @@
1
1
  export { RadioGroup, RadioItem } from "./radio-group";
2
+ export type { RadioGroupOrientation } from "./radio-group/types";
2
3
  export { Checkbox } from "./checkbox";
3
4
  export { Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, } from "./dialog";
4
5
  export { Select, SelectTrigger, SelectContent, SelectGroup, SelectLabel, SelectSeparator, SelectItem, } from "./select";
6
+ export { SELECT_TRIGGER_SIZES, SELECT_TRIGGER_VARIANTS } from "./select/types";
7
+ export type { SelectTriggerSize, SelectTriggerVariant } from "./select/types";
5
8
  export { VerticalMenus, VerticalMenu } from "./vertical-menu";
9
+ export { VERTICAL_MENU_SIZES, VERTICAL_MENU_VARIANTS, } from "./vertical-menu/types";
10
+ export type { VerticalMenuSize, VerticalMenuVariant, } from "./vertical-menu/types";
6
11
  export { HorizontalTabs, HorizontalTab } from "./horizontal-tab";
12
+ export { HORIZONTAL_TAB_SIZES } from "./horizontal-tab/types";
13
+ export type { HorizontalTabSize } from "./horizontal-tab/types";
7
14
  export { ModeTabs, ModeTab } from "./mode-tab";
8
15
  export { Tooltip, TooltipTrigger, TooltipContent, TooltipArrow, TooltipHeader, TooltipDescription, TooltipFooter, } from "./tooltip";
16
+ export { TOOLTIP_SHORT_VARIANTS, TOOLTIP_SHORT_SIZES } from "./tooltip/types";
17
+ export type { TooltipShortSize, TooltipShortVariant } from "./tooltip/types";
9
18
  export { MultipleSelect, MultipleSelectTrigger, MultipleSelectContent, MultipleSelectValue, } from "./multiple-select";
19
+ export { MULTIPLE_SELECT_SIZES } from "./multiple-select/types";
20
+ export type { MultipleSelectSize } from "./multiple-select/types";
10
21
  export { Table, TableHeader, TableBody, TableRow, TableHead, TableCell, } from "./table";
11
22
  export { DataTable } from "./data-table";
23
+ export type { DataTableConfig, DataTableProps } from "./data-table";
12
24
  export { InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, } from "./interactive-list-item";
13
25
  export { Calendar } from "./calendar";
26
+ export type { CalendarProps } from "./calendar";
14
27
  export { DatePicker } from "./date-picker";
28
+ export type { DatePickerProps } from "./date-picker";
15
29
  export { ContextMenu, ContextMenuTrigger, ContextMenuContent, ContextMenuArrow, ContextMenuLabel, ContextMenuItem, ContextMenuGroup, ContextMenuSub, ContextMenuSubTrigger, ContextMenuSubContent, ContextMenuSeparator, ContextMenuCheckboxItem, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuItemIndicator, } from "./context-menu";
16
30
  export { Autocomplete } from "./autocomplete";
31
+ export type { AutocompleteProps } from "./autocomplete";
@@ -1,6 +1,6 @@
1
1
  import { jsx, Fragment, jsxs } from 'react/jsx-runtime';
2
2
  import * as React from 'react';
3
- import React__default, { useState, useLayoutEffect, forwardRef, createElement, createContext, useContext, useEffect, useRef, useCallback } from 'react';
3
+ import React__default, { useState, useLayoutEffect, forwardRef, createElement, createContext, useId as useId$1, useContext, useEffect, useMemo, useRef, useCallback } from 'react';
4
4
  import * as ReactDOM from 'react-dom';
5
5
  import ReactDOM__default from 'react-dom';
6
6
  import { DayPicker } from 'react-day-picker';
@@ -11871,13 +11871,13 @@ const RadioGroupContext = createContext({ value: "", disabled: false });
11871
11871
  * </RadioGroup>
11872
11872
  * ```
11873
11873
  */
11874
- const RadioGroup = React__default.forwardRef(({ className, orientation = "vertical", ...rest }, ref) => {
11874
+ const RadioGroup = forwardRef(({ className, orientation = "vertical", ...rest }, ref) => {
11875
11875
  const { disabled, children, value, ...restProps } = rest;
11876
11876
  return (jsx(RadioGroupContext, { value: { value: value ?? "", disabled: disabled ?? false }, children: jsx(Root2$1, { ...restProps, ref: ref, className: cn("flex flex-col gap-3", orientation === RADIO_GROUP_ORIENTAIONS.HORIZONTAL && "flex-row", className), children: children }) }));
11877
11877
  });
11878
- const RadioItem = React__default.forwardRef(({ label, labelClassName, wrapperClassName, ...rest }, ref) => {
11878
+ const RadioItem = forwardRef(({ label, labelClassName, wrapperClassName, ...rest }, ref) => {
11879
11879
  const { id, value, disabled, className, ...restProps } = rest;
11880
- const randomId = id ?? React__default.useId();
11880
+ const randomId = id ?? useId$1();
11881
11881
  const isSelected = useContext(RadioGroupContext).value === value;
11882
11882
  const isDisabled = useContext(RadioGroupContext).disabled || disabled || false;
11883
11883
  return (jsxs("div", { className: cn("flex items-center gap-1.5 cursor-pointer bg-transparent border-none", wrapperClassName), children: [jsx(Item2, { ...restProps, id: randomId, ref: ref, value: value, disabled: isDisabled, className: cn("bg-transparent border-none p-0 flex items-center outline-none justify-center cursor-pointer", className), children: isDisabled ? (jsx(CircleBackslashIcon, { className: "stroke-comp-disabled" })) : isSelected ? (jsx(RadiobuttonIcon, { className: "stroke-comp-mono-selected" })) : (jsx(CircleIcon, { className: "stroke-comp-mono-default" })) }), label && (jsx("label", { className: cn("text-body leading-body-compact text-comp-mono-default font-medium cursor-pointer", isDisabled && "text-comp-disabled cursor-default", isSelected && "text-comp-mono-selected", labelClassName), htmlFor: randomId, children: label }))] }));
@@ -12102,13 +12102,13 @@ const X = createLucideIcon("x", __iconNode);
12102
12102
  * />
12103
12103
  * ```
12104
12104
  */
12105
- const Checkbox = React__default.forwardRef(({ label, labelClassName, wrapperClassName, ...rest }, ref) => {
12105
+ const Checkbox = forwardRef(({ label, labelClassName, wrapperClassName, ...rest }, ref) => {
12106
12106
  const { checked: isChecked, defaultChecked, id, disabled, className, onCheckedChange: onChange, } = rest;
12107
- const [checked, setChecked] = React__default.useState(isChecked ?? defaultChecked);
12107
+ const [checked, setChecked] = useState(isChecked ?? defaultChecked);
12108
12108
  useEffect(() => {
12109
12109
  setChecked(isChecked ?? defaultChecked);
12110
12110
  }, [isChecked, defaultChecked]);
12111
- const randomId = React__default.useId();
12111
+ const randomId = useId$1();
12112
12112
  const checkboxIconClass = cn("size-4 fill-transparent stroke-comp-mono-default", checked && "stroke-comp-mono-selected", disabled && "stroke-comp-disabled cursor-default");
12113
12113
  const renderCheckboxIcon = (checked, disabled) => {
12114
12114
  if (disabled) {
@@ -12146,19 +12146,19 @@ Checkbox.displayName = "Checkbox";
12146
12146
  * </CardFooter>
12147
12147
  * </Card>
12148
12148
  */
12149
- const Card = React__default.forwardRef(({ className, ...rest }, ref) => {
12149
+ const Card = forwardRef(({ className, ...rest }, ref) => {
12150
12150
  return (jsx("div", { ...rest, ref: ref, className: cn("flex flex-col rounded-2xl border border-border-divider bg-page-l0", className), children: rest.children }));
12151
12151
  });
12152
- const CardBody = React__default.forwardRef(({ className, ...rest }, ref) => {
12152
+ const CardBody = forwardRef(({ className, ...rest }, ref) => {
12153
12153
  return (jsx("div", { ...rest, ref: ref, className: cn("p-6", className), children: rest.children }));
12154
12154
  });
12155
- const CardHeader = React__default.forwardRef(({ className, ...rest }, ref) => {
12155
+ const CardHeader = forwardRef(({ className, ...rest }, ref) => {
12156
12156
  return (jsx("div", { ...rest, ref: ref, className: cn("text-comp-mono-default font-bold text-xl leading-xl-compact mb-2", className), children: rest.children }));
12157
12157
  });
12158
- React__default.forwardRef((rest, ref) => {
12158
+ forwardRef((rest, ref) => {
12159
12159
  return (jsx("div", { ...rest, ref: ref, children: rest.children }));
12160
12160
  });
12161
- const CardFooter = React__default.forwardRef(({ className, ...rest }, ref) => {
12161
+ const CardFooter = forwardRef(({ className, ...rest }, ref) => {
12162
12162
  return (jsx("div", { ...rest, ref: ref, className: cn("py-4 px-6", className), children: rest.children }));
12163
12163
  });
12164
12164
 
@@ -12285,8 +12285,8 @@ const VerticalMenusContext = createContext({
12285
12285
  disabled: false,
12286
12286
  setSelectedMenu: () => { },
12287
12287
  });
12288
- const VerticalMenus = React__default.forwardRef(({ disabled, value, onValueChange, className, ...rest }, ref) => {
12289
- const [selectedMenu, setSelectedMenu] = React__default.useState(value || "");
12288
+ const VerticalMenus = forwardRef(({ disabled, value, onValueChange, className, ...rest }, ref) => {
12289
+ const [selectedMenu, setSelectedMenu] = useState(value || "");
12290
12290
  useEffect(() => {
12291
12291
  if (!onValueChange)
12292
12292
  return;
@@ -12298,7 +12298,7 @@ const VerticalMenus = React__default.forwardRef(({ disabled, value, onValueChang
12298
12298
  setSelectedMenu,
12299
12299
  }, children: jsx("div", { ref: ref, className: cn("flex flex-col w-full gap-2 p-2", className), ...rest, children: rest.children }) }));
12300
12300
  });
12301
- const VerticalMenu = React__default.forwardRef(({ disabled, value, label, icon, variant = "accent", size = "regular", ...rest }, ref) => {
12301
+ const VerticalMenu = forwardRef(({ disabled, value, label, icon, variant = "accent", size = "regular", ...rest }, ref) => {
12302
12302
  const context = useContext(VerticalMenusContext);
12303
12303
  const isSelected = context.value === value;
12304
12304
  const isDisabled = context.disabled || disabled || false;
@@ -12359,14 +12359,14 @@ const HorizontalTab = React__default.forwardRef(({ value, label, className, icon
12359
12359
  `, isSelected && "text-comp-mono-subtle-selected font-bold", className), onClick: handleClick, disabled: isDisabled, "data-selected": isSelected, ...rest, children: [jsxs("div", { className: cn("flex items-center justify-center gap-2", size === HORIZONTAL_TAB_SIZES.SMALL && "py-1 px-2", size === HORIZONTAL_TAB_SIZES.REGULAR && "py-2.5 px-2"), children: [icon && (jsx("span", { className: cn("flex items-center justify-center size-5", size === HORIZONTAL_TAB_SIZES.SMALL && "size-4"), children: icon })), label] }), jsx("div", { className: cn("bg-comp-mono-subtle-default mt-[3px] h-[1px] w-full", isSelected && "bg-comp-mono-subtle-selected h-0.5 mt-0.5"), "data-selected": isSelected })] }));
12360
12360
  });
12361
12361
 
12362
- const ModeTabContext = React__default.createContext({
12362
+ const ModeTabContext = createContext({
12363
12363
  value: "",
12364
12364
  disabled: false,
12365
12365
  setSelectedTab: () => { },
12366
12366
  });
12367
- const ModeTabs = React__default.forwardRef(({ disabled, value, onValueChange, className, ...rest }, ref) => {
12368
- const [selectedTab, setSelectedTab] = React__default.useState(value || "");
12369
- React__default.useEffect(() => {
12367
+ const ModeTabs = forwardRef(({ disabled, value, onValueChange, className, ...rest }, ref) => {
12368
+ const [selectedTab, setSelectedTab] = useState(value || "");
12369
+ useEffect(() => {
12370
12370
  if (!onValueChange)
12371
12371
  return;
12372
12372
  onValueChange(selectedTab);
@@ -12377,8 +12377,8 @@ const ModeTabs = React__default.forwardRef(({ disabled, value, onValueChange, cl
12377
12377
  setSelectedTab,
12378
12378
  }, children: jsx("div", { ref: ref, className: cn("flex items-center w-full bg-page-l2 rounded-lg p-1 box-content", className), ...rest, children: rest.children }) }));
12379
12379
  });
12380
- const ModeTab = React__default.forwardRef(({ label, icon, value, className, ...rest }, ref) => {
12381
- const { value: selectedTab, disabled, setSelectedTab, } = React__default.useContext(ModeTabContext);
12380
+ const ModeTab = forwardRef(({ label, icon, value, className, ...rest }, ref) => {
12381
+ const { value: selectedTab, disabled, setSelectedTab, } = useContext(ModeTabContext);
12382
12382
  const isSelected = selectedTab === value;
12383
12383
  const isDisabled = disabled || rest.disabled;
12384
12384
  const handleClick = () => {
@@ -12420,21 +12420,21 @@ const TooltipContent = ({ type, ...rest }) => {
12420
12420
  "py-1.5 px-2 text-label leading-label-compact font-medium", className), ...otherProps, children: rest.children }) }));
12421
12421
  };
12422
12422
  const TooltipArrow = Arrow2;
12423
- const TooltipHeader = React__default.forwardRef((props, ref) => {
12423
+ const TooltipHeader = forwardRef((props, ref) => {
12424
12424
  const { className, ...otherProps } = props;
12425
12425
  return (jsx("div", { className: cn("text-base leading-base-compact font-medium text-comp-mono-default", className), ...otherProps, ref: ref, children: props.children }));
12426
12426
  });
12427
- const TooltipDescription = React__default.forwardRef((props, ref) => {
12427
+ const TooltipDescription = forwardRef((props, ref) => {
12428
12428
  const { className, ...otherProps } = props;
12429
12429
  return (jsx("div", { className: cn("text-body leading-body font-normal text-comp-mono-subtle-default", className), ...otherProps, ref: ref, children: props.children }));
12430
12430
  });
12431
- const TooltipFooter = React__default.forwardRef((props, ref) => {
12431
+ const TooltipFooter = forwardRef((props, ref) => {
12432
12432
  const { className, ...otherProps } = props;
12433
12433
  return (jsx("div", { className: cn("flex items-center justify-between pt-4", className), ...otherProps, ref: ref, children: props.children }));
12434
12434
  });
12435
12435
 
12436
- const Tag = React__default.forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
12437
- const [isSelected, setIsSelected] = React__default.useState(false);
12436
+ const Tag = forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
12437
+ const [isSelected, setIsSelected] = useState(false);
12438
12438
  const handleClick = (event) => {
12439
12439
  setIsSelected((prev) => !prev);
12440
12440
  onClick?.(event);
@@ -12484,7 +12484,7 @@ const INPUT_SIZES = {
12484
12484
  * />
12485
12485
  * ```
12486
12486
  */
12487
- const Input = React__default.forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
12487
+ const Input = forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
12488
12488
  return (jsxs("div", { "aria-disabled": rest.disabled, className: cn("flex itesm-center justify-center rounded-lg bg-fill-mono-default hover:bg-fill-mono-hovered focus-within:bg-fill-mono-default border border-border-bound focus-within:border-border-focused has-[input:disabled]:border-transparent", size === INPUT_SIZES.REGULAR &&
12489
12489
  "py-1.5 px-2 text-body leading-body-compact font-medium gap-2", size === INPUT_SIZES.LARGE &&
12490
12490
  "py-[11px] px-4 text-base leading-base-compact font-medium gap-3", wrapperClassName), children: [leftIcon && (jsx("span", { className: "flex items-center justify-center", children: leftIcon })), jsx("input", { ref: ref, className: cn("border-none outline-none p-0 flex-1 bg-transparent text-comp-mono-default placeholder:text-comp-mono-subtle-default hover:placeholder:text-comp-mono-subtle-hovered focus:placeholder:text-comp-mono-subtle-selected disabled:text-comp-disabled disabled:placeholder:text-comp-disabled", size === INPUT_SIZES.REGULAR &&
@@ -12498,16 +12498,16 @@ const MULTIPLE_SELECT_SIZES = {
12498
12498
  LARGE: "large",
12499
12499
  };
12500
12500
 
12501
- const MultipleSelectContext = React__default.createContext({
12501
+ const MultipleSelectContext = createContext({
12502
12502
  isOpen: false,
12503
12503
  values: [],
12504
12504
  disabled: false,
12505
12505
  setSelectedValues: () => { },
12506
12506
  setIsOpen: () => { },
12507
12507
  });
12508
- const MultipleSelect = React__default.forwardRef(({ open, onOpenChange, disabled, value, onValueChange, className, children, ...rest }, ref) => {
12509
- const [isOpen, setIsOpen] = React__default.useState(open || false);
12510
- const [selectedValues, setSelectedValues] = React__default.useState([]);
12508
+ const MultipleSelect = forwardRef(({ open, onOpenChange, disabled, value, onValueChange, className, children, ...rest }, ref) => {
12509
+ const [isOpen, setIsOpen] = useState(open || false);
12510
+ const [selectedValues, setSelectedValues] = useState([]);
12511
12511
  useEffect(() => {
12512
12512
  setIsOpen(open || false);
12513
12513
  }, [open]);
@@ -12527,9 +12527,9 @@ const MultipleSelect = React__default.forwardRef(({ open, onOpenChange, disabled
12527
12527
  setIsOpen: onTriggerOpenChange,
12528
12528
  }, children: jsx("div", { ref: ref, className: cn("relative", className), ...rest, children: children }) }));
12529
12529
  });
12530
- const MultipleSelectTrigger = React__default.forwardRef(({ size = "regular", children, ...rest }, ref) => {
12530
+ const MultipleSelectTrigger = forwardRef(({ size = "regular", children, ...rest }, ref) => {
12531
12531
  const { className, onClick, ...otherProps } = rest;
12532
- const { disabled, values, isOpen, setIsOpen } = React__default.useContext(MultipleSelectContext);
12532
+ const { disabled, values, isOpen, setIsOpen } = useContext(MultipleSelectContext);
12533
12533
  const handleTriggerClick = (e) => {
12534
12534
  e.stopPropagation();
12535
12535
  if (disabled)
@@ -12540,9 +12540,9 @@ const MultipleSelectTrigger = React__default.forwardRef(({ size = "regular", chi
12540
12540
  };
12541
12541
  return (jsxs("div", { ref: ref, className: cn("flex items-center justify-between rounded-lg cursor-pointer border border-border-bound bg-fill-mono-default hover:bg-fill-mono-hovered", values.length > 0 && "border-border-focused", disabled && "border-none cursor-not-allowed", size === MULTIPLE_SELECT_SIZES.REGULAR && "py-1.5 px-3 gap-1", size === MULTIPLE_SELECT_SIZES.LARGE && "py-3 pr-4 pl-3 gap-2", className), "data-disabled": disabled, "data-selected": values.length > 0, onClick: handleTriggerClick, ...otherProps, children: [children, jsx("span", { className: "flex items-center justify-center size-4", children: jsx(ChevronDown, { size: 16 }) })] }));
12542
12542
  });
12543
- const MultipleSelectValue = React__default.forwardRef(({ placeholder, className, ...rest }, ref) => {
12544
- const { values, disabled, setSelectedValues } = React__default.useContext(MultipleSelectContext);
12545
- const [content, setContent] = React__default.useState(null);
12543
+ const MultipleSelectValue = forwardRef(({ placeholder, className, ...rest }, ref) => {
12544
+ const { values, disabled, setSelectedValues } = useContext(MultipleSelectContext);
12545
+ const [content, setContent] = useState(null);
12546
12546
  const composedRefs = useComposedRefs(ref, (node) => setContent(node));
12547
12547
  const onDeleteClick = (value, e) => {
12548
12548
  e.stopPropagation();
@@ -12553,9 +12553,9 @@ const MultipleSelectValue = React__default.forwardRef(({ placeholder, className,
12553
12553
  "--select-content-width": `${content?.offsetWidth}px`,
12554
12554
  }, className: cn("flex-1 flex gap-1 flex-wrap", className), ...rest, children: values?.length > 0 ? (values.map((val) => (jsx(Tag, { value: { id: val.value, label: val.label }, disabled: disabled, className: "max-w-[var(--select-content-width)]", onDeleteClick: onDeleteClick }, val.value)))) : (jsx("span", { "data-disabled": disabled, className: "text-comp-mono-subtle-default text-body leading-body-compact font-medium", children: placeholder || "Select options" })) }));
12555
12555
  });
12556
- const MultipleSelectContent = React__default.forwardRef(({ useSearch, options: optionsProps, indicator, className, ...rest }, ref) => {
12557
- const { isOpen, setIsOpen } = React__default.useContext(MultipleSelectContext);
12558
- const [content, setContent] = React__default.useState(null);
12556
+ const MultipleSelectContent = forwardRef(({ useSearch, options: optionsProps, indicator, className, ...rest }, ref) => {
12557
+ const { isOpen, setIsOpen } = useContext(MultipleSelectContext);
12558
+ const [content, setContent] = useState(null);
12559
12559
  const composedRefs = useComposedRefs(ref, (node) => setContent(node));
12560
12560
  const [options, setOptions] = useState(optionsProps);
12561
12561
  useEffect(() => {
@@ -12572,7 +12572,7 @@ const MultipleSelectContent = React__default.forwardRef(({ useSearch, options: o
12572
12572
  const filteredOptions = options.filter((option) => option.label.toLowerCase().includes(searchValue));
12573
12573
  setOptions(filteredOptions);
12574
12574
  };
12575
- React__default.useEffect(() => {
12575
+ useEffect(() => {
12576
12576
  const handleMouseUp = (event) => {
12577
12577
  if (!content?.contains(event.target)) {
12578
12578
  setIsOpen(false);
@@ -12583,7 +12583,7 @@ const MultipleSelectContent = React__default.forwardRef(({ useSearch, options: o
12583
12583
  document.removeEventListener("mouseup", handleMouseUp);
12584
12584
  };
12585
12585
  }, [setIsOpen, content]);
12586
- React__default.useEffect(() => {
12586
+ useEffect(() => {
12587
12587
  const close = () => setIsOpen(false);
12588
12588
  window.addEventListener("blur", close);
12589
12589
  window.addEventListener("resize", close);
@@ -12594,8 +12594,8 @@ const MultipleSelectContent = React__default.forwardRef(({ useSearch, options: o
12594
12594
  }, [setIsOpen]);
12595
12595
  return (isOpen && (jsxs("div", { ref: composedRefs, className: cn("flex-1 absolute top-[calc(100%+4px)] left-0 z-[1000] w-[calc(100%-16px)] bg-page-l1 rounded-xl shadow-medium p-2 border border-border-overlay", className), ...rest, children: [useSearch && (jsx("div", { className: "pb-2 mb-2 border-b border-b-border-divider", children: jsx(Input, { onChange: handleSearchChange, leftIcon: jsx(MagnifyingGlassIcon, { width: 20, height: 20 }), placeholder: "Enter any characters..." }) })), jsx("ul", { className: "p-0 m-0 flex flex-col gap-1 list-none", children: options.map((option) => (jsx(MultipleSelectItem, { option: option, indicator: indicator }, option.value))) })] })));
12596
12596
  });
12597
- const MultipleSelectItem = React__default.forwardRef(({ option, indicator, className, ...rest }, ref) => {
12598
- const { values, setSelectedValues } = React__default.useContext(MultipleSelectContext);
12597
+ const MultipleSelectItem = forwardRef(({ option, indicator, className, ...rest }, ref) => {
12598
+ const { values, setSelectedValues } = useContext(MultipleSelectContext);
12599
12599
  const isSelected = values.some((val) => val.value === option.value);
12600
12600
  const handleClick = (e) => {
12601
12601
  e.stopPropagation();
@@ -12610,28 +12610,28 @@ const MultipleSelectItem = React__default.forwardRef(({ option, indicator, class
12610
12610
  "bg-fill-disabled text-comp-disabled cursor-not-allowed", className), onClick: handleClick, ...rest, children: [jsx("span", { className: "flex-1 overflow-ellipsis overflow-x-hidden whitespace-nowrap text-inherit text-size-inherit leading-inherit font-inherit", children: option.label }), indicator && isSelected && (jsx("span", { className: "flex items-center justify-center size-4", children: indicator }))] }));
12611
12611
  });
12612
12612
 
12613
- const Table = React__default.forwardRef(({ className, ...rest }, ref) => {
12613
+ const Table = forwardRef(({ className, ...rest }, ref) => {
12614
12614
  return (jsx("table", { ref: ref, className: cn("w-full relative border-collapse", className), ...rest }));
12615
12615
  });
12616
- const TableHeader = React__default.forwardRef(({ className, ...rest }, ref) => {
12616
+ const TableHeader = forwardRef(({ className, ...rest }, ref) => {
12617
12617
  return (jsx("thead", { children: jsx("tr", { ref: ref, className: cn("border-b border-b-border-divider bg-page-l1", className), ...rest }) }));
12618
12618
  });
12619
- const TableBody = React__default.forwardRef(({ ...rest }, ref) => {
12619
+ const TableBody = forwardRef(({ ...rest }, ref) => {
12620
12620
  return jsx("tbody", { ref: ref, ...rest });
12621
12621
  });
12622
- const TableRow = React__default.forwardRef(({ isSelected, shouldLastBorderRender = true, className, ...rest }, ref) => {
12622
+ const TableRow = forwardRef(({ isSelected, shouldLastBorderRender = true, className, ...rest }, ref) => {
12623
12623
  return (jsx("tr", { ref: ref, "data-selected": isSelected, "data-last-border": shouldLastBorderRender, className: cn("border-b border-border-divider hover:bg-fill-mono-hovered", isSelected && "bg-fill-mono-selected", !shouldLastBorderRender && "last:border-b-0", className), ...rest }));
12624
12624
  });
12625
- const TableHead = React__default.forwardRef(({ className, children, ...rest }, ref) => {
12625
+ const TableHead = forwardRef(({ className, children, ...rest }, ref) => {
12626
12626
  return (jsx("th", { ref: ref, className: cn("text-body leading-body font-medium py-5 pr-0 pl-9 last:pr-9 align-middle text-comp-mono-subtle-default text-left", className), ...rest, children: jsx("div", { className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: children }) }));
12627
12627
  });
12628
- const TableCell = React__default.forwardRef(({ className, children, showTooltip, ...rest }, ref) => {
12628
+ const TableCell = forwardRef(({ className, children, showTooltip, ...rest }, ref) => {
12629
12629
  return (jsx("td", { ref: ref, className: cn("text-body leading-body font-medium py-5 pr-0 pl-9 last:pr-9 align-middle text-comp-mono-default", className), ...rest, children: showTooltip ? (jsxs(Tooltip, { children: [jsx(TooltipTrigger, { asChild: true, children: jsx("span", { className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: children }) }), jsx(TooltipContent, { type: "short", side: "bottom", sideOffset: 10, children: children })] })) : (jsx("div", { className: "overflow-hidden overflow-ellipsis whitespace-nowrap", children: children })) }));
12630
12630
  });
12631
12631
 
12632
12632
  const DataTable = ({ config, data, emptyMessage, onRowClick, enableSelection = false, shouldLastBorderRender = true, classNames, refs, }) => {
12633
- const [selectedRow, setSelectedRow] = React__default.useState(undefined);
12634
- const rowData = React__default.useMemo(() => {
12633
+ const [selectedRow, setSelectedRow] = useState(undefined);
12634
+ const rowData = useMemo(() => {
12635
12635
  return data.map((item) => ({
12636
12636
  ...item,
12637
12637
  randomId: crypto.randomUUID(),
@@ -12648,20 +12648,20 @@ const DataTable = ({ config, data, emptyMessage, onRowClick, enableSelection = f
12648
12648
  return (jsxs(Table, { className: classNames?.table, ref: refs?.tableRef, children: [jsx(TableHeader, { className: classNames?.header, ref: refs?.headerRef, children: config.map((col) => (jsx(TableHead, { style: { minWidth: col.minWidth, maxWidth: col.maxWidth }, className: classNames?.head, ref: refs?.headRef, children: col.header }, col.header))) }), jsx(TableBody, { className: classNames?.body, ref: refs?.bodyRef, children: rowData.length > 0 ? (rowData.map((item, index) => (jsx(TableRow, { id: item.randomId, onClick: () => handleRowClick(item, item.randomId), isSelected: selectedRow === item.randomId, shouldLastBorderRender: shouldLastBorderRender, className: classNames?.row, ref: refs?.rowRef, children: config.map((col, colIndex) => (jsx(TableCell, { className: classNames?.cell, ref: refs?.cellRef, showTooltip: col.showTooltip, children: col.renderFn(item) || "-" }, colIndex))) }, index)))) : emptyMessage ? (jsx(TableRow, { ref: refs?.rowRef, className: classNames?.row, children: jsx(TableCell, { colSpan: config.length, className: classNames?.cell, ref: refs?.cellRef, children: emptyMessage }) })) : null })] }));
12649
12649
  };
12650
12650
 
12651
- const InteractiveListItemContext = React__default.createContext({
12651
+ const InteractiveListItemContext = createContext({
12652
12652
  disabled: false,
12653
12653
  });
12654
- const InteractiveListItem = React__default.forwardRef(({ isSelected, disabled, showHoverActions = true, children, className, ...rest }, ref) => {
12654
+ const InteractiveListItem = forwardRef(({ isSelected, disabled, showHoverActions = true, children, className, ...rest }, ref) => {
12655
12655
  return (jsx(InteractiveListItemContext, { value: { disabled: !!disabled }, children: jsx("div", { ref: ref, "data-selected": isSelected, "data-disabled": disabled, "data-hover-actions": showHoverActions, className: cn("flex items-center gap-1 p-1.5 rounded-sm cursor-pointer text-comp-mono-default bg-fill-mono-default border border-transparent hover:bg-fill-mono-hovered active:bg-fill-mono-pressed", isSelected && "bg-fill-mono-selected border-border-selected", disabled &&
12656
12656
  "cursor-not-allowed text-comp-disabled bg-fill-disabled", className), ...rest, children: children }) }));
12657
12657
  });
12658
- const InteractiveListItemIcon = React__default.forwardRef(({ children, className, ...props }, ref) => {
12658
+ const InteractiveListItemIcon = forwardRef(({ children, className, ...props }, ref) => {
12659
12659
  return (jsx("span", { className: cn("flex items-center justify-center size-6 p-1", className), ...props, ref: ref, children: children }));
12660
12660
  });
12661
- const InteractiveListItemContent = React__default.forwardRef(({ children, className, ...rest }, ref) => {
12661
+ const InteractiveListItemContent = forwardRef(({ children, className, ...rest }, ref) => {
12662
12662
  return (jsx("div", { className: cn("grow text-inherit leading-body-compact font-medium text-body", className), ...rest, ref: ref, children: children }));
12663
12663
  });
12664
- const InteractiveListItemActions = React__default.forwardRef(({ children, className, ...props }, ref) => {
12664
+ const InteractiveListItemActions = forwardRef(({ children, className, ...props }, ref) => {
12665
12665
  return (jsx("div", { className: cn("flex items-center justify-center gap-2", className), ...props, ref: ref, children: children }));
12666
12666
  });
12667
12667
 
@@ -12715,7 +12715,7 @@ const BUTTON_VARIANTS = {
12715
12715
  * </Button>
12716
12716
  * ```
12717
12717
  */
12718
- const Button = React__default.forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
12718
+ const Button = forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
12719
12719
  return (jsxs("button", { ref: ref, disabled: disabled ?? isLoading, className: cn("flex items-center justify-center relative box-border m-0 border-transparent outline-none cursor-pointer select-none align-middle appearance-none text-center transition-normal font-medium w-auto rounded-md overflow-hidden pointer-events-auto disabled:pointer-events-none disabled:cursor-not-allowed", size === BUTTON_SIZES.SMALL &&
12720
12720
  "h-7 py-0 px-1.5 text-label leading-label-compact", size === BUTTON_SIZES.REGULAR &&
12721
12721
  "h-9 py-0 px-2 text-body leading-body-compact", size === BUTTON_SIZES.LARGE &&
@@ -12739,8 +12739,8 @@ var dayjs_minExports = dayjs_min.exports;
12739
12739
  var dayjs = /*@__PURE__*/getDefaultExportFromCjs(dayjs_minExports);
12740
12740
 
12741
12741
  const DatePicker = ({ size = "regular", placeholder = "Pick a date", format = "YYYY. MM. DD.", value, mode = "single", onChange, isInstantClose = false, open: openProp, onOpenChange: onOpenChangeProp, disabled, ...rest }) => {
12742
- const [inputValue, setInputValue] = React__default.useState(value);
12743
- const [open, setOpen] = React__default.useState(openProp || false);
12742
+ const [inputValue, setInputValue] = useState(value);
12743
+ const [open, setOpen] = useState(openProp || false);
12744
12744
  const handleSelect = (date) => {
12745
12745
  if (mode === "single") {
12746
12746
  const value = date;
@@ -12922,4 +12922,4 @@ const Autocomplete = ({ placeholder, data, value, displayValue, onSelect, onChan
12922
12922
  : undefined }), showSuggestions && (jsx("ul", { id: "autocomplete-suggestions", role: "listbox", className: cn("absolute top-calc(100%-10px) left-0 z-[20] p-2 bg-page-l1 shadow-medium border border-border-overlay rounded-lg w-[calc(100%-16px)]", contentClassName), children: filteredResults.length > 0 ? (filteredResults.map((item, index) => (jsx(AutocompleteContentItem, { item: item, index: index, highlightedIndex: highlightedIndex, onClick: handleItemClick, displayValue: displayValue, inputValue: inputValue, className: itemClassName }, displayValue(item) + index)))) : (jsx("li", { "data-no-results": true, className: "rounded-sm p-2 bg-fill-mono-default text-comp-mono-default text-body leading-body-compact font-medium list-none text-center", children: noResultsMessage })) }))] }));
12923
12923
  };
12924
12924
 
12925
- export { Autocomplete, Calendar, Checkbox, ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, HorizontalTab, HorizontalTabs, InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, ModeTab, ModeTabs, MultipleSelect, MultipleSelectContent, MultipleSelectTrigger, MultipleSelectValue, RadioGroup, RadioItem, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipArrow, TooltipContent, TooltipDescription, TooltipFooter, TooltipHeader, TooltipTrigger, VerticalMenu, VerticalMenus };
12925
+ export { Autocomplete, Calendar, Checkbox, ContextMenu, ContextMenuArrow, ContextMenuCheckboxItem, ContextMenuContent, ContextMenuGroup, ContextMenuItem, ContextMenuItemIndicator, ContextMenuLabel, ContextMenuRadioGroup, ContextMenuRadioItem, ContextMenuSeparator, ContextMenuSub, ContextMenuSubContent, ContextMenuSubTrigger, ContextMenuTrigger, DataTable, DatePicker, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogPortal, DialogTrigger, HORIZONTAL_TAB_SIZES, HorizontalTab, HorizontalTabs, InteractiveListItem, InteractiveListItemActions, InteractiveListItemContent, InteractiveListItemIcon, MULTIPLE_SELECT_SIZES, ModeTab, ModeTabs, MultipleSelect, MultipleSelectContent, MultipleSelectTrigger, MultipleSelectValue, RadioGroup, RadioItem, SELECT_TRIGGER_SIZES, SELECT_TRIGGER_VARIANTS, Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, TOOLTIP_SHORT_SIZES, TOOLTIP_SHORT_VARIANTS, Table, TableBody, TableCell, TableHead, TableHeader, TableRow, Tooltip, TooltipArrow, TooltipContent, TooltipDescription, TooltipFooter, TooltipHeader, TooltipTrigger, VERTICAL_MENU_SIZES, VERTICAL_MENU_VARIANTS, VerticalMenu, VerticalMenus };
@@ -1,8 +1,8 @@
1
- import React from "react";
1
+ import { ReactNode, Ref } from "react";
2
2
  /** table 기반 config로 테이블 완성 component */
3
3
  interface TableInfo<T> {
4
4
  header: string;
5
- renderFn: (item: T) => React.ReactNode;
5
+ renderFn: (item: T) => ReactNode;
6
6
  minWidth?: number;
7
7
  maxWidth?: number;
8
8
  showTooltip?: boolean;
@@ -24,12 +24,12 @@ export interface DataTableProps<T> {
24
24
  cell?: string;
25
25
  };
26
26
  refs?: {
27
- tableRef?: React.Ref<HTMLTableElement>;
28
- headerRef?: React.Ref<HTMLTableRowElement>;
29
- bodyRef?: React.Ref<HTMLTableSectionElement>;
30
- rowRef?: React.Ref<HTMLTableRowElement>;
31
- cellRef?: React.Ref<HTMLTableCellElement>;
32
- headRef?: React.Ref<HTMLTableCellElement>;
27
+ tableRef?: Ref<HTMLTableElement>;
28
+ headerRef?: Ref<HTMLTableRowElement>;
29
+ bodyRef?: Ref<HTMLTableSectionElement>;
30
+ rowRef?: Ref<HTMLTableRowElement>;
31
+ cellRef?: Ref<HTMLTableCellElement>;
32
+ headRef?: Ref<HTMLTableCellElement>;
33
33
  };
34
34
  }
35
35
  export declare const DataTable: <T extends object>({ config, data, emptyMessage, onRowClick, enableSelection, shouldLastBorderRender, classNames, refs, }: DataTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -1,7 +1,15 @@
1
1
  export { Button } from "./button";
2
+ export { BUTTON_SIZES, BUTTON_VARIANTS } from "./button/types";
3
+ export type { ButtonSize, ButtonVariant } from "./button/types";
2
4
  export { Text } from "./text";
5
+ export { TEXT_SIZES, TEXT_VARIANTS, TEXT_ALIGNMENTS, FONT_WEIGHTS, } from "./text/types";
6
+ export type { TextSize, FontWeight, TextAlignment, TextVariant, } from "./text/types";
3
7
  export { Input } from "./input";
8
+ export { INPUT_SIZES } from "./input/types";
9
+ export type { InputSize } from "./input/types";
4
10
  export { TextArea } from "./textarea";
5
11
  export { Card, CardBody, CardContent, CardFooter, CardHeader } from "./card";
6
12
  export { Tag } from "./tag";
13
+ export { TAG_SIZES, TAG_VARIANTS } from "./tag/types";
14
+ export type { TagSize, TagVariant } from "./tag/types";
7
15
  export { Pagination, PaginationContent, PaginationLink, PaginationItem, PaginationPrevious, PaginationNext, PaginationEllipsis, } from "./pagination";
package/dist/esm/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
- import React, { forwardRef, createElement } from 'react';
2
+ import { forwardRef, createElement, useState } from 'react';
3
3
 
4
4
  const BUTTON_SIZES = {
5
5
  REGULAR: "regular",
@@ -3325,7 +3325,7 @@ function cn(...inputs) {
3325
3325
  * </Button>
3326
3326
  * ```
3327
3327
  */
3328
- const Button = React.forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
3328
+ const Button = forwardRef(({ variant = "accent", size = "regular", fullWidth = false, isLoading = false, leftIcon, rightIcon, children, disabled, className, ...rest }, ref) => {
3329
3329
  return (jsxs("button", { ref: ref, disabled: disabled ?? isLoading, className: cn("flex items-center justify-center relative box-border m-0 border-transparent outline-none cursor-pointer select-none align-middle appearance-none text-center transition-normal font-medium w-auto rounded-md overflow-hidden pointer-events-auto disabled:pointer-events-none disabled:cursor-not-allowed", size === BUTTON_SIZES.SMALL &&
3330
3330
  "h-7 py-0 px-1.5 text-label leading-label-compact", size === BUTTON_SIZES.REGULAR &&
3331
3331
  "h-9 py-0 px-2 text-body leading-body-compact", size === BUTTON_SIZES.LARGE &&
@@ -3339,6 +3339,33 @@ const Button = React.forwardRef(({ variant = "accent", size = "regular", fullWid
3339
3339
  });
3340
3340
  Button.displayName = "Button";
3341
3341
 
3342
+ const TEXT_SIZES = {
3343
+ XSMALL: "xsmall",
3344
+ LABEL: "label",
3345
+ BODY: "body",
3346
+ BASE: "base",
3347
+ LARGE: "large",
3348
+ XLARGE: "xl",
3349
+ XXLARGE: "xxl",
3350
+ XXXLARGE: "xxxl",
3351
+ XXXXLARGE: "xxxxl",
3352
+ };
3353
+ const FONT_WEIGHTS = {
3354
+ THIN: "thin",
3355
+ EXTRALIGHT: "extralight",
3356
+ LIGHT: "light",
3357
+ REGULAR: "regular",
3358
+ MEDIUM: "medium",
3359
+ SEMIBOLD: "semibold",
3360
+ BOLD: "bold",
3361
+ EXTRABOLD: "extrabold",
3362
+ };
3363
+ const TEXT_ALIGNMENTS = {
3364
+ LEFT: "left",
3365
+ CENTER: "center",
3366
+ RIGHT: "right",
3367
+ JUSTIFY: "justify",
3368
+ };
3342
3369
  const TEXT_VARIANTS = {
3343
3370
  BOLD3XLARGEBOLD: "bold3XLargeBold",
3344
3371
  BOLD2XLARGEBOLDCOMPACT: "bold2XLargeBoldCompact",
@@ -3556,7 +3583,7 @@ const INPUT_SIZES = {
3556
3583
  * />
3557
3584
  * ```
3558
3585
  */
3559
- const Input = React.forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
3586
+ const Input = forwardRef(({ size = "regular", leftIcon, rightIcon, wrapperClassName, ...rest }, ref) => {
3560
3587
  return (jsxs("div", { "aria-disabled": rest.disabled, className: cn("flex itesm-center justify-center rounded-lg bg-fill-mono-default hover:bg-fill-mono-hovered focus-within:bg-fill-mono-default border border-border-bound focus-within:border-border-focused has-[input:disabled]:border-transparent", size === INPUT_SIZES.REGULAR &&
3561
3588
  "py-1.5 px-2 text-body leading-body-compact font-medium gap-2", size === INPUT_SIZES.LARGE &&
3562
3589
  "py-[11px] px-4 text-base leading-base-compact font-medium gap-3", wrapperClassName), children: [leftIcon && (jsx("span", { className: "flex items-center justify-center", children: leftIcon })), jsx("input", { ref: ref, className: cn("border-none outline-none p-0 flex-1 bg-transparent text-comp-mono-default placeholder:text-comp-mono-subtle-default hover:placeholder:text-comp-mono-subtle-hovered focus:placeholder:text-comp-mono-subtle-selected disabled:text-comp-disabled disabled:placeholder:text-comp-disabled", size === INPUT_SIZES.REGULAR &&
@@ -3581,7 +3608,7 @@ Input.displayName = "Input";
3581
3608
  * />
3582
3609
  * ```
3583
3610
  */
3584
- const TextArea = React.forwardRef((rest, ref) => {
3611
+ const TextArea = forwardRef((rest, ref) => {
3585
3612
  return (jsx("div", { className: "py-3 px-4 flex-1 h-full", children: jsx("textarea", { ref: ref, className: cn("w-full h-full flex-1 p-0 text-body leading-body font-medium border-none resize-none outline-none text-comp-mono-default disabled:text-comp-disabled disabled:placeholder:text-comp-disabled placeholder:text-comp-mono-subtle-default", rest.className), ...rest }) }));
3586
3613
  });
3587
3614
  TextArea.displayName = "TextArea";
@@ -3605,19 +3632,19 @@ TextArea.displayName = "TextArea";
3605
3632
  * </CardFooter>
3606
3633
  * </Card>
3607
3634
  */
3608
- const Card = React.forwardRef(({ className, ...rest }, ref) => {
3635
+ const Card = forwardRef(({ className, ...rest }, ref) => {
3609
3636
  return (jsx("div", { ...rest, ref: ref, className: cn("flex flex-col rounded-2xl border border-border-divider bg-page-l0", className), children: rest.children }));
3610
3637
  });
3611
- const CardBody = React.forwardRef(({ className, ...rest }, ref) => {
3638
+ const CardBody = forwardRef(({ className, ...rest }, ref) => {
3612
3639
  return (jsx("div", { ...rest, ref: ref, className: cn("p-6", className), children: rest.children }));
3613
3640
  });
3614
- const CardHeader = React.forwardRef(({ className, ...rest }, ref) => {
3641
+ const CardHeader = forwardRef(({ className, ...rest }, ref) => {
3615
3642
  return (jsx("div", { ...rest, ref: ref, className: cn("text-comp-mono-default font-bold text-xl leading-xl-compact mb-2", className), children: rest.children }));
3616
3643
  });
3617
- const CardContent = React.forwardRef((rest, ref) => {
3644
+ const CardContent = forwardRef((rest, ref) => {
3618
3645
  return (jsx("div", { ...rest, ref: ref, children: rest.children }));
3619
3646
  });
3620
- const CardFooter = React.forwardRef(({ className, ...rest }, ref) => {
3647
+ const CardFooter = forwardRef(({ className, ...rest }, ref) => {
3621
3648
  return (jsx("div", { ...rest, ref: ref, className: cn("py-4 px-6", className), children: rest.children }));
3622
3649
  });
3623
3650
 
@@ -3781,8 +3808,8 @@ const __iconNode = [
3781
3808
  ];
3782
3809
  const X = createLucideIcon("x", __iconNode);
3783
3810
 
3784
- const Tag = React.forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
3785
- const [isSelected, setIsSelected] = React.useState(false);
3811
+ const Tag = forwardRef(({ icon, value, variant = "filled", size = "regular", className, onDeleteClick, onClick, ...props }, ref) => {
3812
+ const [isSelected, setIsSelected] = useState(false);
3786
3813
  const handleClick = (event) => {
3787
3814
  setIsSelected((prev) => !prev);
3788
3815
  onClick?.(event);
@@ -3808,6 +3835,15 @@ const Tag = React.forwardRef(({ icon, value, variant = "filled", size = "regular
3808
3835
  });
3809
3836
  Tag.displayName = "Tag";
3810
3837
 
3838
+ const TAG_VARIANTS = {
3839
+ FILLED: "filled",
3840
+ ACCENT: "accent",
3841
+ };
3842
+ const TAG_SIZES = {
3843
+ REGULAR: "regular",
3844
+ SMALL: "small",
3845
+ };
3846
+
3811
3847
  const Pagination = ({ className, ...rest }) => {
3812
3848
  return (jsx("nav", { role: "navigation", "aria-label": "pagination", "data-slot": "pagination", className: cn("mx-auto my-0 flex justify-center w-full", className), ...rest }));
3813
3849
  };
@@ -3830,4 +3866,4 @@ const PaginationEllipsis = ({ className, ...rest }) => {
3830
3866
  return (jsx("span", { "aria-hidden": true, "data-slot": "pagination-ellipsis", className: cn("flex items-center justify-center size-9 rounded-md hover:bg-fill-mono-hovered", className), ...rest, children: jsx(Ellipsis, { className: "size-4 stroke-comp-mono-subtle-default" }) }));
3831
3867
  };
3832
3868
 
3833
- export { Button, Card, CardBody, CardContent, CardFooter, CardHeader, Input, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Tag, Text, TextArea };
3869
+ export { BUTTON_SIZES, BUTTON_VARIANTS, Button, Card, CardBody, CardContent, CardFooter, CardHeader, FONT_WEIGHTS, INPUT_SIZES, Input, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, TAG_SIZES, TAG_VARIANTS, TEXT_ALIGNMENTS, TEXT_SIZES, TEXT_VARIANTS, Tag, Text, TextArea };
@@ -1,4 +1,3 @@
1
- import React from "react";
2
1
  import { RadioGroup as RadioGroupRadix } from "radix-ui";
3
2
  import { RadioGroupOrientation } from "./types";
4
3
  interface RadioGroupProps extends RadioGroupRadix.RadioGroupProps {
@@ -22,12 +21,12 @@ interface RadioGroupProps extends RadioGroupRadix.RadioGroupProps {
22
21
  * </RadioGroup>
23
22
  * ```
24
23
  */
25
- export declare const RadioGroup: React.ForwardRefExoticComponent<RadioGroupProps & React.RefAttributes<HTMLDivElement>>;
24
+ export declare const RadioGroup: import("react").ForwardRefExoticComponent<RadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
26
25
  interface RadioItemProps extends RadioGroupRadix.RadioGroupItemProps {
27
26
  label?: string;
28
27
  labelClassName?: string;
29
28
  wrapperClassName?: string;
30
29
  className?: string;
31
30
  }
32
- export declare const RadioItem: React.ForwardRefExoticComponent<RadioItemProps & React.RefAttributes<HTMLButtonElement>>;
31
+ export declare const RadioItem: import("react").ForwardRefExoticComponent<RadioItemProps & import("react").RefAttributes<HTMLButtonElement>>;
33
32
  export {};
package/dist/index.d.ts CHANGED
@@ -243,4 +243,4 @@ declare const PaginationPrevious: ({ className, ...rest }: React.ComponentProps<
243
243
  declare const PaginationNext: ({ className, ...rest }: React.ComponentProps<typeof PaginationLink>) => react_jsx_runtime.JSX.Element;
244
244
  declare const PaginationEllipsis: ({ className, ...rest }: React.ComponentProps<"span">) => react_jsx_runtime.JSX.Element;
245
245
 
246
- export { Button, Card, CardBody, CardContent, CardFooter, CardHeader, Input, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, Tag, Text, TextArea };
246
+ export { BUTTON_SIZES, BUTTON_VARIANTS, Button, type ButtonSize, type ButtonVariant, Card, CardBody, CardContent, CardFooter, CardHeader, FONT_WEIGHTS, type FontWeight, INPUT_SIZES, Input, type InputSize, Pagination, PaginationContent, PaginationEllipsis, PaginationItem, PaginationLink, PaginationNext, PaginationPrevious, TAG_SIZES, TAG_VARIANTS, TEXT_ALIGNMENTS, TEXT_SIZES, TEXT_VARIANTS, Tag, type TagSize, type TagVariant, Text, type TextAlignment, TextArea, type TextSize, type TextVariant };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@telepix-lab/telepix-ui",
3
- "version": "0.3.1",
3
+ "version": "0.3.3",
4
4
  "description": "A UI kit for TelePIX",
5
5
  "types": "./dist/index.d.ts",
6
6
  "exports": {