@brightlocal/ui-components 1.0.0 → 1.0.1

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,8 +1,8 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { Button } from '../components/button';
3
- import { Input } from '../components/input';
4
- import { Separator } from '../components/separator';
5
- import { TooltipContent } from '../components/tooltip';
2
+ import { Button } from '../button';
3
+ import { Input } from '../input';
4
+ import { Separator } from '../separator';
5
+ import { TooltipContent } from '../tooltip';
6
6
  import * as React from "react";
7
7
  /**
8
8
  * Sidebar position variants
@@ -1,5 +1,5 @@
1
1
  import { default as useEmblaCarousel, UseEmblaCarouselType } from 'embla-carousel-react';
2
- import { ButtonProps } from '../button';
2
+ import { ButtonProps } from '@brightlocal/ui-components/button';
3
3
  import * as React from "react";
4
4
  type CarouselApi = UseEmblaCarouselType[1];
5
5
  type UseCarouselParameters = Parameters<typeof useEmblaCarousel>;
@@ -1,5 +1,5 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '../command';
2
+ import { CommandEmpty, CommandGroup, CommandInput, CommandItem, CommandList, CommandSeparator } from '@brightlocal/ui-components/command';
3
3
  import * as React from "react";
4
4
  export interface ComboboxProps {
5
5
  /** Controlled selected value */
@@ -67,11 +67,11 @@ export interface ComboboxInputProps extends React.ComponentProps<typeof CommandI
67
67
  }
68
68
  declare const ComboboxInput: React.ForwardRefExoticComponent<Omit<ComboboxInputProps, "ref"> & React.RefAttributes<HTMLInputElement>>;
69
69
  export type ComboboxListProps = React.ComponentProps<typeof CommandList>;
70
- declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('../command').CommandListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
70
+ declare const ComboboxList: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandListProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
71
71
  export type ComboboxEmptyProps = React.ComponentProps<typeof CommandEmpty>;
72
- declare const ComboboxEmpty: React.ForwardRefExoticComponent<Omit<Omit<import('../command').CommandEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
72
+ declare const ComboboxEmpty: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandEmptyProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
73
73
  export type ComboboxGroupProps = React.ComponentProps<typeof CommandGroup>;
74
- declare const ComboboxGroup: React.ForwardRefExoticComponent<Omit<Omit<import('../command').CommandGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
74
+ declare const ComboboxGroup: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandGroupProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
75
75
  export interface ComboboxItemProps extends Omit<React.ComponentProps<typeof CommandItem>, "onSelect"> {
76
76
  /** The value of the item (required) */
77
77
  value: string;
@@ -88,7 +88,7 @@ export interface ComboboxItemProps extends Omit<React.ComponentProps<typeof Comm
88
88
  }
89
89
  declare const ComboboxItem: React.ForwardRefExoticComponent<Omit<ComboboxItemProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
90
90
  export type ComboboxSeparatorProps = React.ComponentProps<typeof CommandSeparator>;
91
- declare const ComboboxSeparator: React.ForwardRefExoticComponent<Omit<Omit<import('../command').CommandSeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
91
+ declare const ComboboxSeparator: React.ForwardRefExoticComponent<Omit<Omit<import('@brightlocal/ui-components/command').CommandSeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
92
92
  export interface ComboboxLoadingProps {
93
93
  /** Custom className */
94
94
  className?: string;
@@ -1,6 +1,6 @@
1
1
  import { DateRange } from 'react-day-picker';
2
- import { CalendarProps } from '../calendar';
3
- import { PopoverContent } from '../popover';
2
+ import { CalendarProps } from '@brightlocal/ui-components/calendar';
3
+ import { PopoverContent } from '@brightlocal/ui-components/popover';
4
4
  import * as React from "react";
5
5
  /**
6
6
  * Preset configuration for DatePicker
package/dist/field.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { VariantProps } from 'class-variance-authority';
2
- import { LucideProps } from '../../../icons/src/index.ts';
3
- import { Label } from '../label';
2
+ import { LucideProps } from '@brightlocal/icons';
3
+ import { LabelProps } from '@brightlocal/ui-components/label';
4
4
  declare function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">): import("react/jsx-runtime").JSX.Element;
5
5
  declare namespace FieldSet {
6
6
  var displayName: string;
@@ -32,7 +32,7 @@ interface FieldProps extends React.ComponentProps<"div">, VariantProps<typeof fi
32
32
  }
33
33
  declare function Field({ className, orientation, variant, align, ...props }: FieldProps): import("react/jsx-runtime").JSX.Element;
34
34
  declare function FieldContent({ className, ...props }: React.ComponentProps<"div">): import("react/jsx-runtime").JSX.Element;
35
- interface FieldLabelProps extends React.ComponentProps<typeof Label> {
35
+ interface FieldLabelProps extends LabelProps {
36
36
  /**
37
37
  * Required htmlFor attribute for linking label with input
38
38
  */
@@ -1 +1 @@
1
- {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAGnE,OAAO,EAAE,KAAK,EAAE,MAAM,kCAAkC,CAAC;AAEzD,iBAAS,QAAQ,CAAC,EAAE,SAAS,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,C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AC;IAC/D;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,iBAAS,gBAAgB,CAAC,EACxB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,qBAAqB,2CAevB;AAED;;GAEG;AACH,UAAU,cAAc;IACtB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,UAAU,eAAgB,SAAQ,IAAI,CACpC,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC,EAC3B,UAAU,CACX;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;OAGG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,cAAc,GAAG,SAAS,CAAC,CAAC;CAC5C;AAED,UAAU,mBAAoB,SAAQ,IAAI,CAAC,WAAW,EAAE,KAAK,CAAC;IAC5D;;;;OAIG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;CACzC;AAED;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,iBAAS,cAAc,CAAC,EACtB,IAAI,EAAE,IAAkB,EACxB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,mBAAmB,2CAQrB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,GAAG,KAAK,EACT,EAAE,eAAe,kDAyCjB;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
1
+ {"version":3,"file":"field.d.ts","sourceRoot":"","sources":["../../src/components/field.tsx"],"names":[],"mappings":"AAAA,O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V,cAAc,EACd,UAAU,EACV,WAAW,EACX,mBAAmB,EACnB,QAAQ,EACR,YAAY,GACb,CAAC;AAEF,YAAY,EAAE,UAAU,EAAE,eAAe,EAAE,CAAC"}
@@ -1,4 +1,4 @@
1
- import { InputGroupInput, InputGroupButton } from '../input-group';
1
+ import { InputGroupInput, InputGroupButton } from '@brightlocal/ui-components/input-group';
2
2
  import * as React from "react";
3
3
  /**
4
4
  * Default password strength levels (industry standard)
package/dist/label.d.ts CHANGED
@@ -1,9 +1,8 @@
1
1
  import * as React from "react";
2
- import * as LabelPrimitive from "@radix-ui/react-label";
3
2
  declare const labelVariants: (props?: ({
4
3
  optional?: boolean | null | undefined;
5
4
  } & import('class-variance-authority/types').ClassProp) | undefined) => string;
6
- interface LabelProps extends React.ComponentProps<typeof LabelPrimitive.Root> {
5
+ interface LabelProps extends React.ComponentPropsWithoutRef<"label"> {
7
6
  /**
8
7
  * Data hook for automated testing
9
8
  * Used to identify component in tests and E2E automation
@@ -25,7 +24,7 @@ interface LabelProps extends React.ComponentProps<typeof LabelPrimitive.Root> {
25
24
  */
26
25
  optional?: boolean;
27
26
  }
28
- declare const Label: React.ForwardRefExoticComponent<Omit<LabelProps, "ref"> & React.RefAttributes<HTMLLabelElement>>;
27
+ declare const Label: React.ForwardRefExoticComponent<LabelProps & React.RefAttributes<HTMLLabelElement>>;
29
28
  export { Label, labelVariants };
30
29
  export type { LabelProps };
31
30
  //# sourceMappingURL=label.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAC;AAIxD,QAAA,MAAM,aAAa;;8EAUlB,CAAC;AAEF,UAAU,UAAW,SAAQ,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC;IAC3E;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,KAAK,kGAkCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,CAAC"}
1
+ {"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../src/components/label.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,QAAA,MAAM,aAAa;;8EAUlB,CAAC;AAEF,UAAU,UAAW,SAAQ,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC;IAClE;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,QAAA,MAAM,KAAK,qFAkCV,CAAC;AAIF,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,CAAC;AAEhC,YAAY,EAAE,UAAU,EAAE,CAAC"}
package/dist/select.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),N=require("@radix-ui/react-select"),i=require("@brightlocal/icons"),k=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils");function q(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const a=q(N);function p({children:e,...r}){return t.jsx(a.Root,{"data-slot":"select",...r,children:e})}p.displayName="Select";function f(e){return t.jsx(a.Group,{"data-slot":"select-group",...e})}f.displayName="SelectGroup";function b(e){return t.jsx(a.Value,{"data-slot":"select-value",...e})}b.displayName="SelectValue";const C=k.cva(["relative flex w-full h-9 items-center justify-between gap-2","px-3 py-2","border border-border rounded-sm outline-none transition-[border-color,box-shadow,background-color]","bg-neutral-50 border-neutral-300","dark:bg-white/5 dark:border-white/15","text-sm font-normal font-sans text-foreground","[&>span]:block [&>span]:truncate","data-[placeholder]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"]);function g({className:e,children:r,placeholder:o,dataHook:l,error:c,...s}){const m=c||s["aria-invalid"]===!0||s["aria-invalid"]==="true",y=s["aria-required"]===!0||s["aria-required"]==="true",j=s["aria-label"]||o||"Select an option",w=m?"border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive":"";return t.jsxs(a.Trigger,{...s,"aria-invalid":m?"true":void 0,"aria-label":j,"aria-required":y?"true":void 0,className:n.cn(C(),w,e),"data-hook":l,"data-slot":"select-trigger",children:[r,t.jsx(a.Icon,{asChild:!0,children:t.jsx(i.ChevronDown,{className:"text-muted-foreground"})})]})}g.displayName="SelectTrigger";function x({className:e,children:r,position:o="popper",...l}){const c=n.cn("relative z-50 overflow-hidden","min-w-[8rem]","rounded-md border border-border bg-popover shadow-md","text-popover-foreground","max-h-[var(--radix-select-content-available-height)]","origin-[var(--radix-select-content-transform-origin)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"),s=o==="popper"&&n.cn("data-[side=bottom]:translate-y-1","data-[side=left]:-translate-x-1","data-[side=right]:translate-x-1","data-[side=top]:-translate-y-1");return t.jsx(a.Portal,{children:t.jsxs(a.Content,{className:n.cn(c,s,e),"data-slot":"select-content",position:o,...l,children:[t.jsx(d,{}),t.jsx(a.Viewport,{className:n.cn("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),t.jsx(u,{})]})})}x.displayName="SelectContent";function S({className:e,...r}){return t.jsx(a.Label,{className:n.cn("text-muted-foreground px-2 py-1.5 text-xs font-medium",e),"data-slot":"select-label",...r})}S.displayName="SelectLabel";function v({className:e,children:r,...o}){const l=n.cn("relative flex w-full cursor-default select-none items-center gap-2","rounded py-1.5 pl-2 pr-8","text-sm font-normal leading-5 text-popover-foreground","focus:bg-accent focus:text-accent-foreground","hover:bg-accent/50 hover:text-accent-foreground","outline-none focus:outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0");return t.jsxs(a.Item,{className:n.cn(l,e),"data-slot":"select-item",...o,children:[t.jsx("span",{className:"absolute right-2 flex size-4 items-center justify-center",children:t.jsx(a.ItemIndicator,{children:t.jsx(i.Check,{})})}),t.jsx(a.ItemText,{children:r})]})}v.displayName="SelectItem";function h({className:e,...r}){return t.jsx(a.Separator,{className:n.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),"data-slot":"select-separator",...r})}h.displayName="SelectSeparator";function d({className:e,...r}){return t.jsx(a.ScrollUpButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...r,children:t.jsx(i.ChevronUp,{})})}d.displayName="SelectScrollUpButton";function u({className:e,...r}){return t.jsx(a.ScrollDownButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...r,children:t.jsx(i.ChevronDown,{})})}u.displayName="SelectScrollDownButton";exports.Select=p;exports.SelectContent=x;exports.SelectGroup=f;exports.SelectItem=v;exports.SelectLabel=S;exports.SelectScrollDownButton=u;exports.SelectScrollUpButton=d;exports.SelectSeparator=h;exports.SelectTrigger=g;exports.SelectValue=b;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),N=require("@radix-ui/react-select"),i=require("@brightlocal/icons"),k=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils");function q(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const l=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,l.get?l:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const a=q(N);function m({children:e,...r}){return t.jsx(a.Root,{"data-slot":"select",...r,children:e})}m.displayName="Select";function f(e){return t.jsx(a.Group,{"data-slot":"select-group",...e})}f.displayName="SelectGroup";function b(e){return t.jsx(a.Value,{"data-slot":"select-value",...e})}b.displayName="SelectValue";const C=k.cva(["relative flex w-full h-9 items-center justify-between gap-2","px-3 py-2","border border-border rounded-sm outline-none transition-[border-color,box-shadow,background-color]","bg-neutral-50 border-neutral-300","dark:bg-white/5 dark:border-white/15","text-sm font-normal font-sans text-foreground","[&>span]:block [&>span]:truncate","data-[placeholder]:text-muted-foreground","focus-visible:outline-none focus-visible:border-ring dark:focus-visible:border-neutral-500 focus-visible:bg-background","focus-visible:shadow-default","data-[state=open]:border-ring","disabled:cursor-not-allowed disabled:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0"]);function g({className:e,children:r,placeholder:o,dataHook:l,error:c,...s}){const p=c||s["aria-invalid"]===!0||s["aria-invalid"]==="true",y=s["aria-required"]===!0||s["aria-required"]==="true",j=s["aria-label"]||o||"Select an option",w=p?"border-red-600/40 dark:border-red-400/60 focus-visible:border-destructive focus-visible:shadow-destructive data-[state=open]:border-destructive data-[state=open]:shadow-destructive":"";return t.jsxs(a.Trigger,{...s,"aria-invalid":p?"true":void 0,"aria-label":j,"aria-required":y?"true":void 0,className:n.cn(C(),w,e),"data-hook":l,"data-slot":"select-trigger",children:[r,t.jsx(a.Icon,{asChild:!0,children:t.jsx(i.ChevronDown,{className:"text-muted-foreground"})})]})}g.displayName="SelectTrigger";function x({className:e,children:r,position:o="popper",...l}){const c=n.cn("relative z-50 overflow-hidden","min-w-[8rem]","rounded-md border border-border bg-popover shadow-md","text-popover-foreground","max-h-[var(--radix-select-content-available-height)]","origin-[var(--radix-select-content-transform-origin)]","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2"),s=o==="popper"&&n.cn("data-[side=bottom]:translate-y-1","data-[side=left]:-translate-x-1","data-[side=right]:translate-x-1","data-[side=top]:-translate-y-1");return t.jsx(a.Portal,{children:t.jsxs(a.Content,{className:n.cn(c,s,e),"data-slot":"select-content",position:o,...l,children:[t.jsx(d,{}),t.jsx(a.Viewport,{className:n.cn("p-1",o==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"),children:r}),t.jsx(u,{})]})})}x.displayName="SelectContent";function S({className:e,...r}){return t.jsx(a.Label,{className:n.cn("text-muted-foreground px-2 py-1.5 text-xs font-medium",e),"data-slot":"select-label",...r})}S.displayName="SelectLabel";function v({className:e,children:r,...o}){const l=n.cn("relative flex w-full cursor-default select-none items-center gap-2","rounded py-1.5 pl-2 pr-8","text-sm font-normal leading-5 text-popover-foreground","focus:bg-accent focus:text-accent-foreground","hover:bg-accent/50 hover:text-accent-foreground","outline-none focus:outline-none","data-[disabled]:pointer-events-none data-[disabled]:opacity-50","[&_svg]:pointer-events-none [&_svg]:shrink-0");return t.jsxs(a.Item,{className:n.cn(l,e),"data-slot":"select-item",...o,children:[t.jsx("span",{className:"absolute right-2 flex size-4 items-center justify-center",children:t.jsx(a.ItemIndicator,{children:t.jsx(i.Check,{})})}),t.jsx(a.ItemText,{children:r})]})}v.displayName="SelectItem";function h({className:e,...r}){return t.jsx(a.Separator,{className:n.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),"data-slot":"select-separator",...r})}h.displayName="SelectSeparator";function d({className:e,...r}){return t.jsx(a.ScrollUpButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...r,children:t.jsx(i.ChevronUp,{})})}d.displayName="SelectScrollUpButton";function u({className:e,...r}){return t.jsx(a.ScrollDownButton,{className:n.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...r,children:t.jsx(i.ChevronDown,{})})}u.displayName="SelectScrollDownButton";exports.Select=m;exports.SelectContent=x;exports.SelectGroup=f;exports.SelectItem=v;exports.SelectLabel=S;exports.SelectScrollDownButton=u;exports.SelectScrollUpButton=d;exports.SelectSeparator=h;exports.SelectTrigger=g;exports.SelectValue=b;
@@ -1 +1 @@
1
- {"version":3,"file":"select.d.ts","sourceRoot":"","sources":["../../src/components/select.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,eAAe,MAAM,wBAAwB,CAAC;AAU1D,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAChD,OAAO,eAAe,CAAC,IAAI,CAC5B;IACC,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAMD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,iBAAS,MAAM,CAAC,EAAE,QAAQ,EAAE,GAAG,KAAK,EAAE,EAAE,WAAW,2CAMlD;kBANQ,MAAM;;;AAUf;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,C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cAAc,CAAC,2CAa7D;kBAhBQ,oBAAoB;;;AAoB7B;;GAEG;AACH,iBAAS,sBAAsB,CAAC,EAC9B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,gBAAgB,CAAC,2CAa/D;kBAhBQ,sBAAsB;;;AAoB/B,OAAO,EACL,MAAM,EACN,aAAa,EACb,WAAW,EACX,UAAU,EACV,WAAW,EACX,sBAAsB,EACtB,oBAAoB,EACpB,eAAe,EACf,aAAa,EACb,WAAW,GACZ,CAAC;AAEF,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,CAAC"}
package/dist/select.js CHANGED
@@ -42,21 +42,21 @@ const N = S([
42
42
  function k({
43
43
  className: e,
44
44
  children: r,
45
- placeholder: n,
46
- dataHook: i,
47
- error: s,
48
- ...l
45
+ placeholder: l,
46
+ dataHook: s,
47
+ error: i,
48
+ ...n
49
49
  }) {
50
- const c = s || l["aria-invalid"] === !0 || l["aria-invalid"] === "true", f = l["aria-required"] === !0 || l["aria-required"] === "true", b = l["aria-label"] || n || "Select an option", g = c ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
50
+ const c = i || n["aria-invalid"] === !0 || n["aria-invalid"] === "true", f = n["aria-required"] === !0 || n["aria-required"] === "true", b = n["aria-label"] || l || "Select an option", g = c ? "border-red-600/40 dark:border-red-400/60 focus-visible:border-destructive focus-visible:shadow-destructive data-[state=open]:border-destructive data-[state=open]:shadow-destructive" : "";
51
51
  return /* @__PURE__ */ d(
52
52
  a.Trigger,
53
53
  {
54
- ...l,
54
+ ...n,
55
55
  "aria-invalid": c ? "true" : void 0,
56
56
  "aria-label": b,
57
57
  "aria-required": f ? "true" : void 0,
58
58
  className: o(N(), g, e),
59
- "data-hook": i,
59
+ "data-hook": s,
60
60
  "data-slot": "select-trigger",
61
61
  children: [
62
62
  r,
@@ -69,10 +69,10 @@ k.displayName = "SelectTrigger";
69
69
  function C({
70
70
  className: e,
71
71
  children: r,
72
- position: n = "popper",
73
- ...i
72
+ position: l = "popper",
73
+ ...s
74
74
  }) {
75
- const s = o(
75
+ const i = o(
76
76
  // Base appearance
77
77
  "relative z-50 overflow-hidden",
78
78
  "min-w-[8rem]",
@@ -89,7 +89,7 @@ function C({
89
89
  "data-[side=left]:slide-in-from-right-2",
90
90
  "data-[side=right]:slide-in-from-left-2",
91
91
  "data-[side=top]:slide-in-from-bottom-2"
92
- ), l = n === "popper" && o(
92
+ ), n = l === "popper" && o(
93
93
  "data-[side=bottom]:translate-y-1",
94
94
  "data-[side=left]:-translate-x-1",
95
95
  "data-[side=right]:translate-x-1",
@@ -98,10 +98,10 @@ function C({
98
98
  return /* @__PURE__ */ t(a.Portal, { children: /* @__PURE__ */ d(
99
99
  a.Content,
100
100
  {
101
- className: o(s, l, e),
101
+ className: o(i, n, e),
102
102
  "data-slot": "select-content",
103
- position: n,
104
- ...i,
103
+ position: l,
104
+ ...s,
105
105
  children: [
106
106
  /* @__PURE__ */ t(m, {}),
107
107
  /* @__PURE__ */ t(
@@ -109,7 +109,7 @@ function C({
109
109
  {
110
110
  className: o(
111
111
  "p-1",
112
- n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
112
+ l === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
113
113
  ),
114
114
  children: r
115
115
  }
@@ -140,9 +140,9 @@ I.displayName = "SelectLabel";
140
140
  function j({
141
141
  className: e,
142
142
  children: r,
143
- ...n
143
+ ...l
144
144
  }) {
145
- const i = o(
145
+ const s = o(
146
146
  // Base layout
147
147
  "relative flex w-full cursor-default select-none items-center gap-2",
148
148
  "rounded py-1.5 pl-2 pr-8",
@@ -160,9 +160,9 @@ function j({
160
160
  return /* @__PURE__ */ d(
161
161
  a.Item,
162
162
  {
163
- className: o(i, e),
163
+ className: o(s, e),
164
164
  "data-slot": "select-item",
165
- ...n,
165
+ ...l,
166
166
  children: [
167
167
  /* @__PURE__ */ t("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ t(a.ItemIndicator, { children: /* @__PURE__ */ t(v, {}) }) }),
168
168
  /* @__PURE__ */ t(a.ItemText, { children: r })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "BrightLocal Design System UI Components",
5
5
  "type": "module",
6
6
  "private": false,
@@ -3,7 +3,7 @@ import { cva, type VariantProps } from "class-variance-authority";
3
3
  import { AlertCircle, type LucideProps } from "@brightlocal/icons";
4
4
  import { cn } from "@brightlocal/ui-components/lib/utils";
5
5
  import { Description } from "./description";
6
- import { Label } from "@brightlocal/ui-components/label";
6
+ import { Label, type LabelProps } from "@brightlocal/ui-components/label";
7
7
 
8
8
  function FieldSet({ className, ...props }: React.ComponentProps<"fieldset">) {
9
9
  return (
@@ -163,7 +163,7 @@ function FieldContent({ className, ...props }: React.ComponentProps<"div">) {
163
163
  );
164
164
  }
165
165
 
166
- interface FieldLabelProps extends React.ComponentProps<typeof Label> {
166
+ interface FieldLabelProps extends LabelProps {
167
167
  /**
168
168
  * Required htmlFor attribute for linking label with input
169
169
  */
@@ -17,7 +17,7 @@ const labelVariants = cva(
17
17
  }
18
18
  );
19
19
 
20
- interface LabelProps extends React.ComponentProps<typeof LabelPrimitive.Root> {
20
+ interface LabelProps extends React.ComponentPropsWithoutRef<"label"> {
21
21
  /**
22
22
  * Data hook for automated testing
23
23
  * Used to identify component in tests and E2E automation
@@ -41,7 +41,7 @@ interface LabelProps extends React.ComponentProps<typeof LabelPrimitive.Root> {
41
41
  }
42
42
 
43
43
  const Label = React.forwardRef<
44
- React.ComponentRef<typeof LabelPrimitive.Root>,
44
+ HTMLLabelElement,
45
45
  LabelProps
46
46
  >(
47
47
  (
@@ -147,8 +147,9 @@ function SelectTrigger({
147
147
  const ariaLabel = props["aria-label"] || placeholder || "Select an option";
148
148
 
149
149
  const errorStyles = isError
150
- ? "border-destructive dark:border-destructive " +
151
- "focus-visible:border-destructive focus-visible:shadow-destructive"
150
+ ? "border-red-600/40 dark:border-red-400/60 " +
151
+ "focus-visible:border-destructive focus-visible:shadow-destructive " +
152
+ "data-[state=open]:border-destructive data-[state=open]:shadow-destructive"
152
153
  : "";
153
154
 
154
155
  return (