@ikatec/nebula-react 1.0.7 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes } from 'react';
3
+ import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as PopoverPrimitive from '@radix-ui/react-popover';
6
6
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -342,7 +342,7 @@ declare const DrawerClose: React$1.ForwardRefExoticComponent<DrawerPrimitive.Dia
342
342
  declare const DrawerPortal: React$1.FC<DrawerPrimitive.DialogPortalProps>;
343
343
  declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
344
344
  declare const DrawerVariants: (props?: ({
345
- side?: "top" | "right" | "bottom" | "left" | null | undefined;
345
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
346
346
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
347
347
  interface DrawerContentProps extends React$1.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>, VariantProps<typeof DrawerVariants> {
348
348
  portal?: boolean;
@@ -478,6 +478,26 @@ interface ActionBarContentProps {
478
478
  }
479
479
  declare const ActionBarContent: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement> & ActionBarContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
480
480
 
481
+ interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
482
+ level: '1' | '2' | '3' | '4' | '5' | '6';
483
+ }
484
+ declare const Heading: React__default.ForwardRefExoticComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement>>;
485
+ interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
486
+ size?: 'md' | 'sm';
487
+ }
488
+ declare const Paragraph: React__default.ForwardRefExoticComponent<ParagraphProps & React__default.RefAttributes<HTMLParagraphElement>>;
489
+ interface CaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
490
+ }
491
+ declare const Caption: React__default.ForwardRefExoticComponent<CaptionProps & React__default.RefAttributes<HTMLTableCaptionElement>>;
492
+ interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
493
+ size?: 'md' | 'sm';
494
+ }
495
+ declare const Link: React__default.ForwardRefExoticComponent<Omit<LinkProps & {
496
+ [K: string]: any;
497
+ } & {
498
+ component?: (props: LinkProps) => ReactNode;
499
+ }, "ref"> & React__default.RefAttributes<HTMLAnchorElement>>;
500
+
481
501
  type InputPhoneProps = {
482
502
  value: string;
483
503
  onChange: (value: string) => void;
@@ -613,4 +633,4 @@ declare const setNebulaLanguage: (language: Language) => void;
613
633
  */
614
634
  declare const messages: Map<Language | null | undefined, Messages>;
615
635
 
616
- export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InputPhone, InputText, type InputTextProps, Label, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
636
+ export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Heading, type HeadingProps, InputPhone, InputText, type InputTextProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as class_variance_authority_dist_types from 'class-variance-authority/dist/types';
2
2
  import * as React$1 from 'react';
3
- import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes } from 'react';
3
+ import React__default, { ComponentProps, PropsWithChildren, HTMLAttributes, ReactNode } from 'react';
4
4
  import { VariantProps } from 'class-variance-authority';
5
5
  import * as PopoverPrimitive from '@radix-ui/react-popover';
6
6
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -342,7 +342,7 @@ declare const DrawerClose: React$1.ForwardRefExoticComponent<DrawerPrimitive.Dia
342
342
  declare const DrawerPortal: React$1.FC<DrawerPrimitive.DialogPortalProps>;
343
343
  declare const DrawerOverlay: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogOverlayProps & React$1.RefAttributes<HTMLDivElement>, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
344
344
  declare const DrawerVariants: (props?: ({
345
- side?: "top" | "right" | "bottom" | "left" | null | undefined;
345
+ side?: "bottom" | "left" | "right" | "top" | null | undefined;
346
346
  } & class_variance_authority_dist_types.ClassProp) | undefined) => string;
347
347
  interface DrawerContentProps extends React$1.ComponentPropsWithoutRef<typeof DrawerPrimitive.Content>, VariantProps<typeof DrawerVariants> {
348
348
  portal?: boolean;
@@ -478,6 +478,26 @@ interface ActionBarContentProps {
478
478
  }
479
479
  declare const ActionBarContent: React$1.ForwardRefExoticComponent<Omit<DrawerPrimitive.DialogContentProps & React$1.RefAttributes<HTMLDivElement> & ActionBarContentProps, "ref"> & React$1.RefAttributes<HTMLDivElement>>;
480
480
 
481
+ interface HeadingProps extends HTMLAttributes<HTMLHeadingElement> {
482
+ level: '1' | '2' | '3' | '4' | '5' | '6';
483
+ }
484
+ declare const Heading: React__default.ForwardRefExoticComponent<HeadingProps & React__default.RefAttributes<HTMLHeadingElement>>;
485
+ interface ParagraphProps extends HTMLAttributes<HTMLParagraphElement> {
486
+ size?: 'md' | 'sm';
487
+ }
488
+ declare const Paragraph: React__default.ForwardRefExoticComponent<ParagraphProps & React__default.RefAttributes<HTMLParagraphElement>>;
489
+ interface CaptionProps extends HTMLAttributes<HTMLTableCaptionElement> {
490
+ }
491
+ declare const Caption: React__default.ForwardRefExoticComponent<CaptionProps & React__default.RefAttributes<HTMLTableCaptionElement>>;
492
+ interface LinkProps extends HTMLAttributes<HTMLAnchorElement> {
493
+ size?: 'md' | 'sm';
494
+ }
495
+ declare const Link: React__default.ForwardRefExoticComponent<Omit<LinkProps & {
496
+ [K: string]: any;
497
+ } & {
498
+ component?: (props: LinkProps) => ReactNode;
499
+ }, "ref"> & React__default.RefAttributes<HTMLAnchorElement>>;
500
+
481
501
  type InputPhoneProps = {
482
502
  value: string;
483
503
  onChange: (value: string) => void;
@@ -613,4 +633,4 @@ declare const setNebulaLanguage: (language: Language) => void;
613
633
  */
614
634
  declare const messages: Map<Language | null | undefined, Messages>;
615
635
 
616
- export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InputPhone, InputText, type InputTextProps, Label, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
636
+ export { Accordion, AccordionContent, AccordionDescription, AccordionItem, type AccordionProps, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, type AlertProps, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, type BadgeProps, Box, type BoxProps, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, type ButtonProps, Caption, type CaptionProps, Checkbox, type CheckboxProps, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Heading, type HeadingProps, InputPhone, InputText, type InputTextProps, Label, Link, type LinkProps, NebulaI18nProvider, type NebulaI18nProviderProps, Pagination, type PaginationProps, Paragraph, type ParagraphProps, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, type CreateStyledSelectProps as SelectProps, Separator, type SeparatorProps, Skeleton, type SkeletonProps, Space, SpaceDirectionEnum, type SpaceProps, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, type TagProps, Toaster, Tooltip, type TooltipProps, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
package/dist/index.js CHANGED
@@ -84,8 +84,27 @@ function clsx() {
84
84
  var nebulaClass = "nebula-ds";
85
85
 
86
86
  // lib/utils.ts
87
+ var customTwMerge = tailwindMerge.extendTailwindMerge({
88
+ extend: {
89
+ classGroups: {
90
+ "font-size": [
91
+ "text-heading-1",
92
+ "text-heading-2",
93
+ "text-heading-3",
94
+ "text-heading-4",
95
+ "text-heading-5",
96
+ "text-heading-6",
97
+ "text-paragraph-md",
98
+ "text-paragraph-sm",
99
+ "text-caption",
100
+ "text-link-md",
101
+ "text-link-sm"
102
+ ]
103
+ }
104
+ }
105
+ });
87
106
  function cn(...inputs) {
88
- return tailwindMerge.twMerge(nebulaClass, clsx(inputs));
107
+ return customTwMerge(nebulaClass, clsx(inputs));
89
108
  }
90
109
  var processChildren = (children) => {
91
110
  return React8__namespace.default.Children.map(children, (child) => {
@@ -3409,6 +3428,91 @@ var ActionBarContent = React8__namespace.forwardRef(({ className, children, port
3409
3428
  ) });
3410
3429
  });
3411
3430
  ActionBarContent.displayName = "ActionBarContent";
3431
+ var Heading = React8.forwardRef(
3432
+ ({ level, className, ...rest }, ref) => {
3433
+ const element = React8.useMemo(
3434
+ () => ({
3435
+ 1: "h1",
3436
+ 2: "h2",
3437
+ 3: "h3",
3438
+ 4: "h4",
3439
+ 5: "h5",
3440
+ 6: "h6"
3441
+ })[level],
3442
+ [level]
3443
+ );
3444
+ const headingStyles = React8.useMemo(
3445
+ () => ({
3446
+ 1: "text-typography-heading-1 text-heading-1 tracking-heading-1 font-heading-1 leading-heading-1",
3447
+ 2: "text-typography-heading-2 text-heading-2 tracking-heading-2 font-heading-2 leading-heading-2",
3448
+ 3: "text-typography-heading-3 text-heading-3 tracking-heading-3 font-heading-3 leading-heading-3",
3449
+ 4: "text-typography-heading-4 text-heading-4 tracking-heading-4 font-heading-4 leading-heading-4",
3450
+ 5: "text-typography-heading-5 text-heading-5 tracking-heading-5 font-heading-5 leading-heading-5",
3451
+ 6: "text-typography-heading-6 text-heading-6 tracking-heading-6 font-heading-6 leading-heading-6"
3452
+ })[level],
3453
+ [level]
3454
+ );
3455
+ if (!element) return null;
3456
+ return React8__namespace.default.createElement(element, {
3457
+ ...rest,
3458
+ ref,
3459
+ className: cn(headingStyles, className)
3460
+ });
3461
+ }
3462
+ );
3463
+ Heading.displayName = "Heading";
3464
+ var Paragraph = React8.forwardRef(
3465
+ ({ size: size4 = "md", className, ...rest }, ref) => {
3466
+ return /* @__PURE__ */ jsxRuntime.jsx(
3467
+ "p",
3468
+ {
3469
+ ref,
3470
+ ...rest,
3471
+ className: cn(
3472
+ "text-left",
3473
+ {
3474
+ "!text-typography-paragraph-md text-paragraph-md tracking-paragraph-md font-paragraph-md leading-paragraph-md": size4 === "md",
3475
+ "!text-typography-paragraph-sm text-paragraph-sm tracking-paragraph-sm font-paragraph-sm leading-paragraph-sm": size4 === "sm"
3476
+ },
3477
+ className
3478
+ )
3479
+ }
3480
+ );
3481
+ }
3482
+ );
3483
+ Paragraph.displayName = "Paragraph";
3484
+ var Caption = React8.forwardRef(
3485
+ ({ className, ...rest }, ref) => {
3486
+ return /* @__PURE__ */ jsxRuntime.jsx(
3487
+ "caption",
3488
+ {
3489
+ ref,
3490
+ ...rest,
3491
+ className: cn(
3492
+ "!text-typography-caption text-caption tracking-caption font-caption leading-caption uppercase",
3493
+ className
3494
+ )
3495
+ }
3496
+ );
3497
+ }
3498
+ );
3499
+ Caption.displayName = "Caption";
3500
+ var Link = React8.forwardRef(
3501
+ ({ className, size: size4 = "md", asChild = false, ...rest }, ref) => {
3502
+ const classNames = cn(
3503
+ "cursor-pointer",
3504
+ {
3505
+ "text-typography-link-md text-link-md tracking-link-md font-link-md leading-link-md underline": size4 === "md",
3506
+ "text-typography-link-sm text-link-sm tracking-link-sm font-link-sm leading-link-sm underline": size4 === "sm"
3507
+ },
3508
+ "hover:text-typography-link-hover",
3509
+ className
3510
+ );
3511
+ if (!asChild) return /* @__PURE__ */ jsxRuntime.jsx("a", { ...rest, className: classNames, ref });
3512
+ return /* @__PURE__ */ jsxRuntime.jsx(reactSlot.Slot, { ...rest, className: classNames, ref });
3513
+ }
3514
+ );
3515
+ Link.displayName = "Link";
3412
3516
  var CountrySelect = ({
3413
3517
  disabled,
3414
3518
  value,
@@ -3594,6 +3698,7 @@ exports.BreadcrumbList = BreadcrumbList;
3594
3698
  exports.BreadcrumbPage = BreadcrumbPage;
3595
3699
  exports.BreadcrumbSeparator = BreadcrumbSeparator;
3596
3700
  exports.Button = Button;
3701
+ exports.Caption = Caption;
3597
3702
  exports.Checkbox = Checkbox;
3598
3703
  exports.Creatable = StyledCreatable;
3599
3704
  exports.Dialog = Dialog;
@@ -3630,11 +3735,14 @@ exports.DropdownMenuSub = DropdownMenuSub;
3630
3735
  exports.DropdownMenuSubContent = DropdownMenuSubContent;
3631
3736
  exports.DropdownMenuSubTrigger = DropdownMenuSubTrigger;
3632
3737
  exports.DropdownMenuTrigger = DropdownMenuTrigger;
3738
+ exports.Heading = Heading;
3633
3739
  exports.InputPhone = InputPhone;
3634
3740
  exports.InputText = InputText;
3635
3741
  exports.Label = Label;
3742
+ exports.Link = Link;
3636
3743
  exports.NebulaI18nProvider = NebulaI18nProvider;
3637
3744
  exports.Pagination = Pagination;
3745
+ exports.Paragraph = Paragraph;
3638
3746
  exports.Popover = Popover;
3639
3747
  exports.PopoverContent = PopoverContent;
3640
3748
  exports.PopoverTrigger = PopoverTrigger;
package/dist/index.mjs CHANGED
@@ -2,7 +2,7 @@ import * as React8 from 'react';
2
2
  import React8__default, { forwardRef, createElement, createContext, useMemo, useState, useCallback, useEffect, useContext } from 'react';
3
3
  import { Slot } from '@radix-ui/react-slot';
4
4
  import { cva } from 'class-variance-authority';
5
- import { twMerge } from 'tailwind-merge';
5
+ import { extendTailwindMerge } from 'tailwind-merge';
6
6
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
7
7
  import * as PopoverPrimitive from '@radix-ui/react-popover';
8
8
  import * as LabelPrimitive from '@radix-ui/react-label';
@@ -44,8 +44,27 @@ function clsx() {
44
44
  var nebulaClass = "nebula-ds";
45
45
 
46
46
  // lib/utils.ts
47
+ var customTwMerge = extendTailwindMerge({
48
+ extend: {
49
+ classGroups: {
50
+ "font-size": [
51
+ "text-heading-1",
52
+ "text-heading-2",
53
+ "text-heading-3",
54
+ "text-heading-4",
55
+ "text-heading-5",
56
+ "text-heading-6",
57
+ "text-paragraph-md",
58
+ "text-paragraph-sm",
59
+ "text-caption",
60
+ "text-link-md",
61
+ "text-link-sm"
62
+ ]
63
+ }
64
+ }
65
+ });
47
66
  function cn(...inputs) {
48
- return twMerge(nebulaClass, clsx(inputs));
67
+ return customTwMerge(nebulaClass, clsx(inputs));
49
68
  }
50
69
  var processChildren = (children) => {
51
70
  return React8__default.Children.map(children, (child) => {
@@ -3369,6 +3388,91 @@ var ActionBarContent = React8.forwardRef(({ className, children, portal = false,
3369
3388
  ) });
3370
3389
  });
3371
3390
  ActionBarContent.displayName = "ActionBarContent";
3391
+ var Heading = forwardRef(
3392
+ ({ level, className, ...rest }, ref) => {
3393
+ const element = useMemo(
3394
+ () => ({
3395
+ 1: "h1",
3396
+ 2: "h2",
3397
+ 3: "h3",
3398
+ 4: "h4",
3399
+ 5: "h5",
3400
+ 6: "h6"
3401
+ })[level],
3402
+ [level]
3403
+ );
3404
+ const headingStyles = useMemo(
3405
+ () => ({
3406
+ 1: "text-typography-heading-1 text-heading-1 tracking-heading-1 font-heading-1 leading-heading-1",
3407
+ 2: "text-typography-heading-2 text-heading-2 tracking-heading-2 font-heading-2 leading-heading-2",
3408
+ 3: "text-typography-heading-3 text-heading-3 tracking-heading-3 font-heading-3 leading-heading-3",
3409
+ 4: "text-typography-heading-4 text-heading-4 tracking-heading-4 font-heading-4 leading-heading-4",
3410
+ 5: "text-typography-heading-5 text-heading-5 tracking-heading-5 font-heading-5 leading-heading-5",
3411
+ 6: "text-typography-heading-6 text-heading-6 tracking-heading-6 font-heading-6 leading-heading-6"
3412
+ })[level],
3413
+ [level]
3414
+ );
3415
+ if (!element) return null;
3416
+ return React8__default.createElement(element, {
3417
+ ...rest,
3418
+ ref,
3419
+ className: cn(headingStyles, className)
3420
+ });
3421
+ }
3422
+ );
3423
+ Heading.displayName = "Heading";
3424
+ var Paragraph = forwardRef(
3425
+ ({ size: size4 = "md", className, ...rest }, ref) => {
3426
+ return /* @__PURE__ */ jsx(
3427
+ "p",
3428
+ {
3429
+ ref,
3430
+ ...rest,
3431
+ className: cn(
3432
+ "text-left",
3433
+ {
3434
+ "!text-typography-paragraph-md text-paragraph-md tracking-paragraph-md font-paragraph-md leading-paragraph-md": size4 === "md",
3435
+ "!text-typography-paragraph-sm text-paragraph-sm tracking-paragraph-sm font-paragraph-sm leading-paragraph-sm": size4 === "sm"
3436
+ },
3437
+ className
3438
+ )
3439
+ }
3440
+ );
3441
+ }
3442
+ );
3443
+ Paragraph.displayName = "Paragraph";
3444
+ var Caption = forwardRef(
3445
+ ({ className, ...rest }, ref) => {
3446
+ return /* @__PURE__ */ jsx(
3447
+ "caption",
3448
+ {
3449
+ ref,
3450
+ ...rest,
3451
+ className: cn(
3452
+ "!text-typography-caption text-caption tracking-caption font-caption leading-caption uppercase",
3453
+ className
3454
+ )
3455
+ }
3456
+ );
3457
+ }
3458
+ );
3459
+ Caption.displayName = "Caption";
3460
+ var Link = forwardRef(
3461
+ ({ className, size: size4 = "md", asChild = false, ...rest }, ref) => {
3462
+ const classNames = cn(
3463
+ "cursor-pointer",
3464
+ {
3465
+ "text-typography-link-md text-link-md tracking-link-md font-link-md leading-link-md underline": size4 === "md",
3466
+ "text-typography-link-sm text-link-sm tracking-link-sm font-link-sm leading-link-sm underline": size4 === "sm"
3467
+ },
3468
+ "hover:text-typography-link-hover",
3469
+ className
3470
+ );
3471
+ if (!asChild) return /* @__PURE__ */ jsx("a", { ...rest, className: classNames, ref });
3472
+ return /* @__PURE__ */ jsx(Slot, { ...rest, className: classNames, ref });
3473
+ }
3474
+ );
3475
+ Link.displayName = "Link";
3372
3476
  var CountrySelect = ({
3373
3477
  disabled,
3374
3478
  value,
@@ -3516,4 +3620,4 @@ lucide-react/dist/esm/lucide-react.js:
3516
3620
  *)
3517
3621
  */
3518
3622
 
3519
- export { Accordion, AccordionContent, AccordionDescription, AccordionItem, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Checkbox, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, InputPhone, InputText, Label, NebulaI18nProvider, Pagination, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, Separator2 as Separator, Skeleton, Space, SpaceDirectionEnum, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Toaster, Tooltip, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages10 as messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
3623
+ export { Accordion, AccordionContent, AccordionDescription, AccordionItem, AccordionTitle, AccordionTrigger, ActionBar, ActionBarButton, ActionBarClose, ActionBarContent, ActionBarDivider, ActionBarPortal, ActionBarTrigger, Alert, AlertButton, AlertDescription, AlertDialog, AlertDialogAction, AlertDialogCancel, AlertDialogContent, AlertDialogDescription, AlertDialogFooter, AlertDialogHeader, AlertDialogTitle, AlertDialogTrigger, AlertTitle, StyledAsync as Async, StyledAsyncCreatable as AsyncCreatable, Badge, Box, Breadcrumb, BreadcrumbEllipsis, BreadcrumbItem, BreadcrumbLink, BreadcrumbList, BreadcrumbPage, BreadcrumbSeparator, Button, Caption, Checkbox, StyledCreatable as Creatable, Dialog, DialogBody, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger, Drawer, DrawerBody, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerOverlay, DrawerPortal, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, Heading, InputPhone, InputText, Label, Link, NebulaI18nProvider, Pagination, Paragraph, Popover, PopoverContent, PopoverTrigger, StyledSelect as Select, Separator2 as Separator, Skeleton, Space, SpaceDirectionEnum, SpaceSizeEnum, Switch, Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, TabsContent, TabsList, TabsTrigger, Tag, Toaster, Tooltip, alertVariants, badgeSizeEnum, badgeVariantEnum, buttonSizeEnum, buttonVariantEnum, buttonVariantsConfig, getNebulaLanguage, messages10 as messages, separatorVariants, setNebulaLanguage, tagVariantsEnum, tailwind, toast, useNebulaI18n };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ikatec/nebula-react",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "description": "React components",
5
5
  "publishConfig": {
6
6
  "access": "public"