@brightlocal/ui-components 0.1.2 → 0.1.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.
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.d.ts +74 -4
- package/dist/accordion.d.ts.map +1 -1
- package/dist/accordion.js +100 -105
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.d.ts +30 -10
- package/dist/alert-dialog.d.ts.map +1 -1
- package/dist/alert-dialog.js +129 -132
- package/dist/alert.d.ts +22 -1
- package/dist/alert.d.ts.map +1 -1
- package/dist/aspect-ratio.cjs +1 -1
- package/dist/aspect-ratio.d.ts +11 -1
- package/dist/aspect-ratio.d.ts.map +1 -1
- package/dist/aspect-ratio.js +16 -20
- package/dist/avatar.cjs +1 -1
- package/dist/avatar.d.ts +43 -3
- package/dist/avatar.d.ts.map +1 -1
- package/dist/avatar.js +18 -16
- package/dist/badge.cjs +1 -1
- package/dist/badge.d.ts +24 -9
- package/dist/badge.d.ts.map +1 -1
- package/dist/badge.js +34 -32
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +177 -170
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +1 -1
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +154 -154
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +63 -8
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +97 -93
- package/dist/button.cjs +1 -1
- package/dist/button.d.ts +17 -45
- package/dist/button.d.ts.map +1 -1
- package/dist/button.js +49 -50
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +12 -0
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +10 -8
- package/dist/card.cjs +1 -1
- package/dist/card.d.ts +58 -18
- package/dist/card.d.ts.map +1 -1
- package/dist/card.js +60 -51
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +99 -9
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +142 -128
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +18 -2
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +46 -33
- package/dist/chart.cjs +4 -4
- package/dist/chart.d.ts +70 -7
- package/dist/chart.d.ts.map +1 -1
- package/dist/chart.js +71 -66
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts +9 -5
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +61 -82
- package/dist/collapsible.cjs +1 -1
- package/dist/collapsible.d.ts +65 -8
- package/dist/collapsible.d.ts.map +1 -1
- package/dist/collapsible.js +41 -55
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +29 -11
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +193 -159
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +115 -9
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +176 -152
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.d.ts +188 -20
- package/dist/context-menu.d.ts.map +1 -1
- package/dist/context-menu.js +119 -121
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +75 -9
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +220 -81
- package/dist/description.cjs +1 -0
- package/dist/description.d.ts +37 -0
- package/dist/description.d.ts.map +1 -0
- package/dist/description.js +25 -0
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +73 -9
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +103 -112
- package/dist/drawer.cjs +1 -1
- package/dist/drawer.d.ts +92 -0
- package/dist/drawer.d.ts.map +1 -1
- package/dist/drawer.js +67 -52
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.d.ts +95 -11
- package/dist/dropdown-menu.d.ts.map +1 -1
- package/dist/dropdown-menu.js +146 -106
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +23 -6
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +54 -53
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +27 -17
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +86 -79
- package/dist/hover-card.cjs +1 -1
- package/dist/hover-card.d.ts +36 -6
- package/dist/hover-card.d.ts.map +1 -1
- package/dist/hover-card.js +44 -42
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +383 -387
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +21 -2
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +51 -41
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +24 -25
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +38 -24
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +68 -136
- package/dist/label.cjs +1 -1
- package/dist/label.d.ts +20 -1
- package/dist/label.d.ts.map +1 -1
- package/dist/label.js +31 -18
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +3 -0
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +12 -10
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +40 -6
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +97 -76
- package/dist/popover.cjs +1 -1
- package/dist/popover.d.ts +59 -4
- package/dist/popover.d.ts.map +1 -1
- package/dist/popover.js +42 -34
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts +9 -2
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +71 -59
- package/dist/radio-group.d.ts +40 -0
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/rating.d.ts +4 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +65 -4
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +53 -36
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.d.ts +46 -5
- package/dist/scroll-area.d.ts.map +1 -1
- package/dist/scroll-area.js +42 -38
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +30 -0
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +64 -54
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +49 -2
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +48 -36
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +80 -9
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +117 -113
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +24 -2
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +15 -9
- package/dist/slider.cjs +1 -1
- package/dist/slider.d.ts +18 -4
- package/dist/slider.d.ts.map +1 -1
- package/dist/slider.js +72 -66
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +4 -2
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +29 -28
- package/dist/split-layout.d.ts +4 -1
- package/dist/split-layout.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/blocks/data-table.tsx +42 -32
- package/src/blocks/sidebar.tsx +4 -12
- package/src/components/accordion.tsx +163 -77
- package/src/components/alert-dialog.tsx +156 -111
- package/src/components/alert.tsx +26 -13
- package/src/components/aspect-ratio.tsx +25 -16
- package/src/components/avatar.tsx +56 -8
- package/src/components/badge.tsx +65 -42
- package/src/components/breadcrumb.tsx +158 -82
- package/src/components/button.tsx +41 -62
- package/src/components/calendar.tsx +16 -2
- package/src/components/card.tsx +92 -40
- package/src/components/carousel.tsx +240 -115
- package/src/components/centred-layout.tsx +67 -35
- package/src/components/chart.tsx +118 -47
- package/src/components/checkbox.tsx +42 -78
- package/src/components/collapsible.tsx +95 -26
- package/src/components/combobox.tsx +242 -144
- package/src/components/command.tsx +295 -121
- package/src/components/context-menu.tsx +278 -81
- package/src/components/date-picker.tsx +281 -30
- package/src/components/description.tsx +60 -0
- package/src/components/dialog.tsx +162 -86
- package/src/components/drawer.tsx +76 -2
- package/src/components/dropdown-menu.tsx +143 -37
- package/src/components/field.tsx +36 -11
- package/src/components/global-layout.tsx +116 -77
- package/src/components/hover-card.tsx +54 -14
- package/src/components/input-group.tsx +56 -18
- package/src/components/input-password.tsx +3 -4
- package/src/components/input.tsx +93 -186
- package/src/components/label.tsx +56 -15
- package/src/components/logo.tsx +3 -0
- package/src/components/menubar.tsx +58 -4
- package/src/components/popover.tsx +103 -20
- package/src/components/progress.tsx +82 -60
- package/src/components/radio-group.tsx +40 -0
- package/src/components/rating.tsx +4 -0
- package/src/components/resizable.tsx +119 -31
- package/src/components/scroll-area.tsx +123 -56
- package/src/components/select.tsx +21 -1
- package/src/components/separator.tsx +97 -20
- package/src/components/sheet.tsx +180 -79
- package/src/components/skeleton.tsx +40 -10
- package/src/components/slider.tsx +83 -57
- package/src/components/sonner.tsx +10 -7
- package/src/components/split-layout.tsx +4 -1
- package/src/index.ts +1 -1
- package/dist/input-base.cjs +0 -1
- package/dist/input-base.d.ts +0 -28
- package/dist/input-base.d.ts.map +0 -1
- package/dist/input-base.js +0 -56
- package/src/components/input-base.tsx +0 -86
package/dist/select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),D=require("react"),P=require("@radix-ui/react-select"),p=require("lucide-react"),V=require("class-variance-authority"),s=require("@brightlocal/ui-components/lib/utils"),R=require("@brightlocal/ui-components/label");function j(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 u=j(D),a=j(P);function y({label:e,description:r,optional:o,placeholder:l,children:n,"aria-label":c,...m}){const d=u.useId(),f=`${d}-label`,k=`${d}-description`,g=r,C=e||g,S={placeholder:l,"aria-required":o?void 0:!0,"aria-label":c},T={...S,id:d},h=(i,B)=>u.isValidElement(i)&&i.type===b?u.cloneElement(i,B):i;return C?t.jsxs("div",{className:"flex flex-col gap-2",children:[e&&t.jsx(R.Label,{htmlFor:d,id:f,optional:o,children:e}),t.jsx(a.Root,{"data-slot":"select",...m,children:u.Children.map(n,i=>h(i,T))}),g&&t.jsx("p",{className:"text-muted-foreground text-sm",id:k,children:g})]}):t.jsx(a.Root,{"data-slot":"select",...m,children:u.Children.map(n,i=>h(i,S))})}y.displayName="Select";function N(e){return t.jsx(a.Group,{"data-slot":"select-group",...e})}N.displayName="SelectGroup";function w(e){return t.jsx(a.Value,{"data-slot":"select-value",...e})}w.displayName="SelectValue";const L=V.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-all","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","[&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-muted-foreground"]);function b({className:e,children:r,placeholder:o,dataHook:l,...n}){const c=n["aria-invalid"]===!0||n["aria-invalid"]==="true",m=n["aria-required"]===!0||n["aria-required"]==="true",d=n["aria-label"]||o||"Select an option",f=c?"border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive":"";return t.jsxs(a.Trigger,{...n,"aria-invalid":c?"true":void 0,"aria-label":d,"aria-required":m?"true":void 0,className:s.cn(L(),f,e),"data-hook":l,"data-slot":"select-trigger",children:[r,t.jsx(a.Icon,{asChild:!0,children:t.jsx(p.ChevronDownIcon,{className:"text-muted-foreground size-4"})})]})}b.displayName="SelectTrigger";function I({className:e,children:r,position:o="popper",...l}){const n=s.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"),c=o==="popper"&&s.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:s.cn(n,c,e),"data-slot":"select-content",position:o,...l,children:[t.jsx(x,{}),t.jsx(a.Viewport,{className:s.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(v,{})]})})}I.displayName="SelectContent";function z({className:e,...r}){return t.jsx(a.Label,{className:s.cn("text-muted-foreground px-2 py-1.5 text-xs font-medium",e),"data-slot":"select-label",...r})}z.displayName="SelectLabel";function _({className:e,children:r,...o}){const l=s.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","[&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-foreground");return t.jsxs(a.Item,{className:s.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(p.CheckIcon,{className:"size-4"})})}),t.jsx(a.ItemText,{children:r})]})}_.displayName="SelectItem";function q({className:e,...r}){return t.jsx(a.Separator,{className:s.cn("bg-border pointer-events-none -mx-1 my-1 h-px",e),"data-slot":"select-separator",...r})}q.displayName="SelectSeparator";function x({className:e,...r}){return t.jsx(a.ScrollUpButton,{className:s.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-up-button",...r,children:t.jsx(p.ChevronUpIcon,{className:"size-4"})})}x.displayName="SelectScrollUpButton";function v({className:e,...r}){return t.jsx(a.ScrollDownButton,{className:s.cn("flex cursor-default items-center justify-center py-1",e),"data-slot":"select-scroll-down-button",...r,children:t.jsx(p.ChevronDownIcon,{className:"size-4"})})}v.displayName="SelectScrollDownButton";exports.Select=y;exports.SelectContent=I;exports.SelectGroup=N;exports.SelectItem=_;exports.SelectLabel=z;exports.SelectScrollDownButton=v;exports.SelectScrollUpButton=x;exports.SelectSeparator=q;exports.SelectTrigger=b;exports.SelectValue=w;
|
package/dist/select.d.ts
CHANGED
|
@@ -20,14 +20,23 @@ interface SelectProps extends React.ComponentProps<typeof SelectPrimitive.Root>
|
|
|
20
20
|
* Error state should be managed via Form components (FormMessage).
|
|
21
21
|
*/
|
|
22
22
|
declare function Select({ label, description, optional, placeholder, children, "aria-label": ariaLabel, ...props }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
declare namespace Select {
|
|
24
|
+
var displayName: string;
|
|
25
|
+
}
|
|
23
26
|
/**
|
|
24
27
|
* SelectGroup - Groups related select options together
|
|
25
28
|
*/
|
|
26
29
|
declare function SelectGroup(props: React.ComponentProps<typeof SelectPrimitive.Group>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
+
declare namespace SelectGroup {
|
|
31
|
+
var displayName: string;
|
|
32
|
+
}
|
|
27
33
|
/**
|
|
28
34
|
* SelectValue - Displays the selected value in the trigger
|
|
29
35
|
*/
|
|
30
36
|
declare function SelectValue(props: React.ComponentProps<typeof SelectPrimitive.Value>): import("react/jsx-runtime").JSX.Element;
|
|
37
|
+
declare namespace SelectValue {
|
|
38
|
+
var displayName: string;
|
|
39
|
+
}
|
|
31
40
|
interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive.Trigger> {
|
|
32
41
|
/** Placeholder text when no value is selected */
|
|
33
42
|
placeholder?: string;
|
|
@@ -38,14 +47,23 @@ interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive
|
|
|
38
47
|
* SelectTrigger - The button that opens the select dropdown
|
|
39
48
|
*/
|
|
40
49
|
declare function SelectTrigger({ className, children, placeholder, dataHook, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
50
|
+
declare namespace SelectTrigger {
|
|
51
|
+
var displayName: string;
|
|
52
|
+
}
|
|
41
53
|
/**
|
|
42
54
|
* SelectContent - The dropdown container for select options
|
|
43
55
|
*/
|
|
44
56
|
declare function SelectContent({ className, children, position, ...props }: React.ComponentProps<typeof SelectPrimitive.Content>): import("react/jsx-runtime").JSX.Element;
|
|
57
|
+
declare namespace SelectContent {
|
|
58
|
+
var displayName: string;
|
|
59
|
+
}
|
|
45
60
|
/**
|
|
46
61
|
* SelectLabel - Label for a group of select options
|
|
47
62
|
*/
|
|
48
63
|
declare function SelectLabel({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Label>): import("react/jsx-runtime").JSX.Element;
|
|
64
|
+
declare namespace SelectLabel {
|
|
65
|
+
var displayName: string;
|
|
66
|
+
}
|
|
49
67
|
/**
|
|
50
68
|
* SelectItem - Individual selectable option in the dropdown
|
|
51
69
|
*
|
|
@@ -60,18 +78,30 @@ declare function SelectLabel({ className, ...props }: React.ComponentProps<typeo
|
|
|
60
78
|
* </SelectItem>
|
|
61
79
|
*/
|
|
62
80
|
declare function SelectItem({ className, children, ...props }: React.ComponentProps<typeof SelectPrimitive.Item>): import("react/jsx-runtime").JSX.Element;
|
|
81
|
+
declare namespace SelectItem {
|
|
82
|
+
var displayName: string;
|
|
83
|
+
}
|
|
63
84
|
/**
|
|
64
85
|
* SelectSeparator - Visual separator between select items or groups
|
|
65
86
|
*/
|
|
66
87
|
declare function SelectSeparator({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.Separator>): import("react/jsx-runtime").JSX.Element;
|
|
88
|
+
declare namespace SelectSeparator {
|
|
89
|
+
var displayName: string;
|
|
90
|
+
}
|
|
67
91
|
/**
|
|
68
92
|
* SelectScrollUpButton - Button to scroll up in the dropdown (when content overflows)
|
|
69
93
|
*/
|
|
70
94
|
declare function SelectScrollUpButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollUpButton>): import("react/jsx-runtime").JSX.Element;
|
|
95
|
+
declare namespace SelectScrollUpButton {
|
|
96
|
+
var displayName: string;
|
|
97
|
+
}
|
|
71
98
|
/**
|
|
72
99
|
* SelectScrollDownButton - Button to scroll down in the dropdown (when content overflows)
|
|
73
100
|
*/
|
|
74
101
|
declare function SelectScrollDownButton({ className, ...props }: React.ComponentProps<typeof SelectPrimitive.ScrollDownButton>): import("react/jsx-runtime").JSX.Element;
|
|
102
|
+
declare namespace SelectScrollDownButton {
|
|
103
|
+
var displayName: string;
|
|
104
|
+
}
|
|
75
105
|
export { Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectScrollDownButton, SelectScrollUpButton, SelectSeparator, SelectTrigger, SelectValue, };
|
|
76
106
|
export type { SelectProps, SelectTriggerProps };
|
|
77
107
|
//# sourceMappingURL=select.d.ts.map
|
package/dist/select.d.ts.map
CHANGED
|
@@ -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;AAW1D,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAChD,OAAO,eAAe,CAAC,IAAI,CAC5B;IACC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,WAAW,EACX,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,WAAW,2CAkEb;
|
|
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;AAW1D,UAAU,WAAY,SAAQ,KAAK,CAAC,cAAc,CAChD,OAAO,eAAe,CAAC,IAAI,CAC5B;IACC,4CAA4C;IAC5C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,iDAAiD;IACjD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAMD;;;;GAIG;AACH,iBAAS,MAAM,CAAC,EACd,KAAK,EACL,WAAW,EACX,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,YAAY,EAAE,SAAS,EACvB,GAAG,KAAK,EACT,EAAE,WAAW,2CAkEb;kBA1EQ,MAAM;;;AA8Ef;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AAQpB;;GAEG;AACH,iBAAS,WAAW,CAClB,KAAK,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAG1D;kBAJQ,WAAW;;;AA+CpB,UAAU,kBAAmB,SAAQ,KAAK,CAAC,cAAc,CACvD,OAAO,eAAe,CAAC,OAAO,CAC/B;IACC,iDAAiD;IACjD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,2CAA2C;IAC3C,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAMD;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,WAAW,EACX,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,kBAAkB,2CAkCpB;kBAxCQ,aAAa;;;AA4CtB;;GAEG;AACH,iBAAS,aAAa,CAAC,EACrB,SAAS,EACT,QAAQ,EACR,QAAmB,EACnB,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,OAAO,CAAC,2CAqDtD;kBA1DQ,aAAa;;;AA8DtB;;GAEG;AACH,iBAAS,WAAW,CAAC,EACnB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,KAAK,CAAC,2CAWpD;kBAdQ,WAAW;;;AAkBpB;;;;;;;;;;;;GAYG;AACH,iBAAS,UAAU,CAAC,EAClB,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,IAAI,CAAC,2CAsCnD;kBA1CQ,UAAU;;;AA8CnB;;GAEG;AACH,iBAAS,eAAe,CAAC,EACvB,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,SAAS,CAAC,2CAQxD;kBAXQ,eAAe;;;AAexB;;GAEG;AACH,iBAAS,oBAAoB,CAAC,EAC5B,SAAS,EACT,GAAG,KAAK,EACT,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,eAAe,CAAC,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
|
@@ -1,54 +1,57 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
2
|
import * as u from "react";
|
|
3
3
|
import * as r from "@radix-ui/react-select";
|
|
4
|
-
import { CheckIcon as
|
|
5
|
-
import { cva as
|
|
4
|
+
import { CheckIcon as k, ChevronDownIcon as h, ChevronUpIcon as C } from "lucide-react";
|
|
5
|
+
import { cva as T } from "class-variance-authority";
|
|
6
6
|
import { cn as n } from "@brightlocal/ui-components/lib/utils";
|
|
7
|
-
import { Label as
|
|
8
|
-
function
|
|
7
|
+
import { Label as _ } from "@brightlocal/ui-components/label";
|
|
8
|
+
function j({
|
|
9
9
|
label: t,
|
|
10
10
|
description: a,
|
|
11
11
|
optional: s,
|
|
12
|
-
placeholder:
|
|
12
|
+
placeholder: i,
|
|
13
13
|
children: o,
|
|
14
14
|
"aria-label": d,
|
|
15
15
|
...m
|
|
16
16
|
}) {
|
|
17
|
-
const c = u.useId(),
|
|
18
|
-
placeholder:
|
|
17
|
+
const c = u.useId(), f = `${c}-label`, N = `${c}-description`, g = a, w = t || g, b = {
|
|
18
|
+
placeholder: i,
|
|
19
19
|
"aria-required": s ? void 0 : !0,
|
|
20
20
|
"aria-label": d
|
|
21
|
-
},
|
|
21
|
+
}, I = {
|
|
22
22
|
...b,
|
|
23
23
|
id: c
|
|
24
|
-
}, v = (
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
) :
|
|
28
|
-
return
|
|
29
|
-
t && /* @__PURE__ */ e(
|
|
24
|
+
}, v = (l, z) => u.isValidElement(l) && l.type === x ? u.cloneElement(
|
|
25
|
+
l,
|
|
26
|
+
z
|
|
27
|
+
) : l;
|
|
28
|
+
return w ? /* @__PURE__ */ p("div", { className: "flex flex-col gap-2", children: [
|
|
29
|
+
t && /* @__PURE__ */ e(_, { htmlFor: c, id: f, optional: s, children: t }),
|
|
30
30
|
/* @__PURE__ */ e(r.Root, { "data-slot": "select", ...m, children: u.Children.map(
|
|
31
31
|
o,
|
|
32
|
-
(
|
|
32
|
+
(l) => v(l, I)
|
|
33
33
|
) }),
|
|
34
|
-
g && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", id:
|
|
34
|
+
g && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", id: N, children: g })
|
|
35
35
|
] }) : /* @__PURE__ */ e(r.Root, { "data-slot": "select", ...m, children: u.Children.map(
|
|
36
36
|
o,
|
|
37
|
-
(
|
|
37
|
+
(l) => v(l, b)
|
|
38
38
|
) });
|
|
39
39
|
}
|
|
40
|
-
|
|
40
|
+
j.displayName = "Select";
|
|
41
|
+
function B(t) {
|
|
41
42
|
return /* @__PURE__ */ e(r.Group, { "data-slot": "select-group", ...t });
|
|
42
43
|
}
|
|
43
|
-
|
|
44
|
+
B.displayName = "SelectGroup";
|
|
45
|
+
function V(t) {
|
|
44
46
|
return /* @__PURE__ */ e(r.Value, { "data-slot": "select-value", ...t });
|
|
45
47
|
}
|
|
46
|
-
|
|
48
|
+
V.displayName = "SelectValue";
|
|
49
|
+
const q = T([
|
|
47
50
|
// Base layout
|
|
48
51
|
"relative flex w-full h-9 items-center justify-between gap-2",
|
|
49
52
|
"px-3 py-2",
|
|
50
53
|
// Base appearance
|
|
51
|
-
"border border-border rounded-
|
|
54
|
+
"border border-border rounded-sm outline-none transition-all",
|
|
52
55
|
"bg-neutral-50 border-neutral-300",
|
|
53
56
|
"dark:bg-white/5 dark:border-white/15",
|
|
54
57
|
// Typography
|
|
@@ -69,23 +72,23 @@ const C = I([
|
|
|
69
72
|
"[&_svg:not([class*='size-'])]:size-4",
|
|
70
73
|
"[&_svg:not([class*='text-'])]:text-muted-foreground"
|
|
71
74
|
]);
|
|
72
|
-
function
|
|
75
|
+
function x({
|
|
73
76
|
className: t,
|
|
74
77
|
children: a,
|
|
75
78
|
placeholder: s,
|
|
76
|
-
dataHook:
|
|
79
|
+
dataHook: i,
|
|
77
80
|
...o
|
|
78
81
|
}) {
|
|
79
|
-
const d = o["aria-invalid"] === !0 || o["aria-invalid"] === "true", m = o["aria-required"] === !0 || o["aria-required"] === "true", c = o["aria-label"] || s || "Select an option",
|
|
80
|
-
return /* @__PURE__ */
|
|
82
|
+
const d = o["aria-invalid"] === !0 || o["aria-invalid"] === "true", m = o["aria-required"] === !0 || o["aria-required"] === "true", c = o["aria-label"] || s || "Select an option", f = d ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
|
|
83
|
+
return /* @__PURE__ */ p(
|
|
81
84
|
r.Trigger,
|
|
82
85
|
{
|
|
83
86
|
...o,
|
|
84
87
|
"aria-invalid": d ? "true" : void 0,
|
|
85
88
|
"aria-label": c,
|
|
86
89
|
"aria-required": m ? "true" : void 0,
|
|
87
|
-
className: n(
|
|
88
|
-
"data-hook":
|
|
90
|
+
className: n(q(), f, t),
|
|
91
|
+
"data-hook": i,
|
|
89
92
|
"data-slot": "select-trigger",
|
|
90
93
|
children: [
|
|
91
94
|
a,
|
|
@@ -94,11 +97,12 @@ function _({
|
|
|
94
97
|
}
|
|
95
98
|
);
|
|
96
99
|
}
|
|
97
|
-
|
|
100
|
+
x.displayName = "SelectTrigger";
|
|
101
|
+
function L({
|
|
98
102
|
className: t,
|
|
99
103
|
children: a,
|
|
100
104
|
position: s = "popper",
|
|
101
|
-
...
|
|
105
|
+
...i
|
|
102
106
|
}) {
|
|
103
107
|
const o = n(
|
|
104
108
|
// Base appearance
|
|
@@ -123,15 +127,15 @@ function U({
|
|
|
123
127
|
"data-[side=right]:translate-x-1",
|
|
124
128
|
"data-[side=top]:-translate-y-1"
|
|
125
129
|
);
|
|
126
|
-
return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */
|
|
130
|
+
return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ p(
|
|
127
131
|
r.Content,
|
|
128
132
|
{
|
|
129
133
|
className: n(o, d, t),
|
|
130
134
|
"data-slot": "select-content",
|
|
131
135
|
position: s,
|
|
132
|
-
...
|
|
136
|
+
...i,
|
|
133
137
|
children: [
|
|
134
|
-
/* @__PURE__ */ e(
|
|
138
|
+
/* @__PURE__ */ e(S, {}),
|
|
135
139
|
/* @__PURE__ */ e(
|
|
136
140
|
r.Viewport,
|
|
137
141
|
{
|
|
@@ -142,12 +146,13 @@ function U({
|
|
|
142
146
|
children: a
|
|
143
147
|
}
|
|
144
148
|
),
|
|
145
|
-
/* @__PURE__ */ e(
|
|
149
|
+
/* @__PURE__ */ e(y, {})
|
|
146
150
|
]
|
|
147
151
|
}
|
|
148
152
|
) });
|
|
149
153
|
}
|
|
150
|
-
|
|
154
|
+
L.displayName = "SelectContent";
|
|
155
|
+
function D({
|
|
151
156
|
className: t,
|
|
152
157
|
...a
|
|
153
158
|
}) {
|
|
@@ -163,12 +168,13 @@ function G({
|
|
|
163
168
|
}
|
|
164
169
|
);
|
|
165
170
|
}
|
|
166
|
-
|
|
171
|
+
D.displayName = "SelectLabel";
|
|
172
|
+
function P({
|
|
167
173
|
className: t,
|
|
168
174
|
children: a,
|
|
169
175
|
...s
|
|
170
176
|
}) {
|
|
171
|
-
const
|
|
177
|
+
const i = n(
|
|
172
178
|
// Base layout
|
|
173
179
|
"relative flex w-full cursor-default select-none items-center gap-2",
|
|
174
180
|
"rounded py-1.5 pl-2 pr-8",
|
|
@@ -185,20 +191,21 @@ function $({
|
|
|
185
191
|
"[&_svg:not([class*='size-'])]:size-4",
|
|
186
192
|
"[&_svg:not([class*='text-'])]:text-foreground"
|
|
187
193
|
);
|
|
188
|
-
return /* @__PURE__ */
|
|
194
|
+
return /* @__PURE__ */ p(
|
|
189
195
|
r.Item,
|
|
190
196
|
{
|
|
191
|
-
className: n(
|
|
197
|
+
className: n(i, t),
|
|
192
198
|
"data-slot": "select-item",
|
|
193
199
|
...s,
|
|
194
200
|
children: [
|
|
195
|
-
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(r.ItemIndicator, { children: /* @__PURE__ */ e(
|
|
201
|
+
/* @__PURE__ */ e("span", { className: "absolute right-2 flex size-4 items-center justify-center", children: /* @__PURE__ */ e(r.ItemIndicator, { children: /* @__PURE__ */ e(k, { className: "size-4" }) }) }),
|
|
196
202
|
/* @__PURE__ */ e(r.ItemText, { children: a })
|
|
197
203
|
]
|
|
198
204
|
}
|
|
199
205
|
);
|
|
200
206
|
}
|
|
201
|
-
|
|
207
|
+
P.displayName = "SelectItem";
|
|
208
|
+
function R({
|
|
202
209
|
className: t,
|
|
203
210
|
...a
|
|
204
211
|
}) {
|
|
@@ -211,7 +218,8 @@ function F({
|
|
|
211
218
|
}
|
|
212
219
|
);
|
|
213
220
|
}
|
|
214
|
-
|
|
221
|
+
R.displayName = "SelectSeparator";
|
|
222
|
+
function S({
|
|
215
223
|
className: t,
|
|
216
224
|
...a
|
|
217
225
|
}) {
|
|
@@ -224,11 +232,12 @@ function T({
|
|
|
224
232
|
),
|
|
225
233
|
"data-slot": "select-scroll-up-button",
|
|
226
234
|
...a,
|
|
227
|
-
children: /* @__PURE__ */ e(
|
|
235
|
+
children: /* @__PURE__ */ e(C, { className: "size-4" })
|
|
228
236
|
}
|
|
229
237
|
);
|
|
230
238
|
}
|
|
231
|
-
|
|
239
|
+
S.displayName = "SelectScrollUpButton";
|
|
240
|
+
function y({
|
|
232
241
|
className: t,
|
|
233
242
|
...a
|
|
234
243
|
}) {
|
|
@@ -245,15 +254,16 @@ function j({
|
|
|
245
254
|
}
|
|
246
255
|
);
|
|
247
256
|
}
|
|
257
|
+
y.displayName = "SelectScrollDownButton";
|
|
248
258
|
export {
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
+
j as Select,
|
|
260
|
+
L as SelectContent,
|
|
261
|
+
B as SelectGroup,
|
|
262
|
+
P as SelectItem,
|
|
263
|
+
D as SelectLabel,
|
|
264
|
+
y as SelectScrollDownButton,
|
|
265
|
+
S as SelectScrollUpButton,
|
|
266
|
+
R as SelectSeparator,
|
|
267
|
+
x as SelectTrigger,
|
|
268
|
+
V as SelectValue
|
|
259
269
|
};
|
package/dist/separator.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),x=require("react"),h=require("@radix-ui/react-separator"),l=require("@brightlocal/ui-components/lib/utils");function c(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const d=c(x),g=c(h);var u=(t=>(t.HORIZONTAL="horizontal",t.VERTICAL="vertical",t))(u||{});const n=d.forwardRef(({className:t,orientation:a="horizontal",decorative:e=!0,dataHook:r,trackingEl:i,trackingLabel:s,...f},m)=>o.jsx(g.Root,{ref:m,className:l.cn("bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",t),"data-hook":r,"data-slot":"separator","data-tracking-el":i,"data-tracking-label":s,decorative:e,orientation:a,...f}));n.displayName="Separator";const p=d.forwardRef(({className:t,children:a,dataHook:e,trackingEl:r,trackingLabel:i},s)=>o.jsxs("div",{ref:s,className:l.cn("flex items-center gap-2",t),"data-hook":e,"data-slot":"separator-with-text","data-tracking-el":r,"data-tracking-label":i,children:[o.jsx(n,{className:"flex-1"}),o.jsx("span",{className:"text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap",children:a}),o.jsx(n,{className:"flex-1"})]}));p.displayName="SeparatorWithText";exports.Separator=n;exports.SeparatorOrientation=u;exports.SeparatorWithText=p;
|
package/dist/separator.d.ts
CHANGED
|
@@ -4,11 +4,58 @@ export declare enum SeparatorOrientation {
|
|
|
4
4
|
HORIZONTAL = "horizontal",
|
|
5
5
|
VERTICAL = "vertical"
|
|
6
6
|
}
|
|
7
|
-
|
|
7
|
+
/**
|
|
8
|
+
* Props for the Separator component.
|
|
9
|
+
*/
|
|
10
|
+
interface SeparatorProps extends React.ComponentProps<typeof SeparatorPrimitive.Root> {
|
|
11
|
+
/**
|
|
12
|
+
* Data hook for automated testing
|
|
13
|
+
*/
|
|
14
|
+
dataHook?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Tracking element identifier for analytics
|
|
17
|
+
*/
|
|
18
|
+
trackingEl?: string;
|
|
19
|
+
/**
|
|
20
|
+
* Tracking label for analytics context
|
|
21
|
+
*/
|
|
22
|
+
trackingLabel?: string;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Separator visually divides content using a horizontal or vertical line.
|
|
26
|
+
* Built on Radix UI Separator primitive.
|
|
27
|
+
*/
|
|
28
|
+
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
29
|
+
/**
|
|
30
|
+
* Props for the SeparatorWithText component.
|
|
31
|
+
*/
|
|
8
32
|
interface SeparatorWithTextProps {
|
|
33
|
+
/**
|
|
34
|
+
* Additional CSS classes
|
|
35
|
+
*/
|
|
9
36
|
className?: string;
|
|
37
|
+
/**
|
|
38
|
+
* Text content to display between separators
|
|
39
|
+
*/
|
|
10
40
|
children: React.ReactNode;
|
|
41
|
+
/**
|
|
42
|
+
* Data hook for automated testing
|
|
43
|
+
*/
|
|
44
|
+
dataHook?: string;
|
|
45
|
+
/**
|
|
46
|
+
* Tracking element identifier for analytics
|
|
47
|
+
*/
|
|
48
|
+
trackingEl?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Tracking label for analytics context
|
|
51
|
+
*/
|
|
52
|
+
trackingLabel?: string;
|
|
11
53
|
}
|
|
12
|
-
|
|
54
|
+
/**
|
|
55
|
+
* SeparatorWithText displays a horizontal separator with centered text.
|
|
56
|
+
* Commonly used for "OR" dividers in forms.
|
|
57
|
+
*/
|
|
58
|
+
declare const SeparatorWithText: React.ForwardRefExoticComponent<SeparatorWithTextProps & React.RefAttributes<HTMLDivElement>>;
|
|
13
59
|
export { Separator, SeparatorWithText };
|
|
60
|
+
export type { SeparatorProps, SeparatorWithTextProps };
|
|
14
61
|
//# sourceMappingURL=separator.d.ts.map
|
package/dist/separator.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED,
|
|
1
|
+
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../src/components/separator.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAC;AAIhE,oBAAY,oBAAoB;IAC9B,UAAU,eAAe;IACzB,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,UAAU,cAAe,SAAQ,KAAK,CAAC,cAAc,CACnD,OAAO,kBAAkB,CAAC,IAAI,CAC/B;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,QAAA,MAAM,SAAS,oGAiCd,CAAC;AAIF;;GAEG;AACH,UAAU,sBAAsB;IAC9B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,QAAA,MAAM,iBAAiB,+FAoBrB,CAAC;AAIH,OAAO,EAAE,SAAS,EAAE,iBAAiB,EAAE,CAAC;AAExC,YAAY,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAC"}
|
package/dist/separator.js
CHANGED
|
@@ -1,43 +1,55 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
1
|
+
import { jsx as t, jsxs as p } from "react/jsx-runtime";
|
|
2
|
+
import * as s from "react";
|
|
3
|
+
import * as f from "@radix-ui/react-separator";
|
|
4
|
+
import { cn as d } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
+
var h = /* @__PURE__ */ ((a) => (a.HORIZONTAL = "horizontal", a.VERTICAL = "vertical", a))(h || {});
|
|
6
|
+
const n = s.forwardRef(
|
|
7
|
+
({
|
|
8
|
+
className: a,
|
|
9
|
+
orientation: r = "horizontal",
|
|
10
|
+
decorative: e = !0,
|
|
11
|
+
dataHook: o,
|
|
12
|
+
trackingEl: i,
|
|
13
|
+
trackingLabel: l,
|
|
14
|
+
...m
|
|
15
|
+
}, c) => /* @__PURE__ */ t(
|
|
16
|
+
f.Root,
|
|
13
17
|
{
|
|
14
|
-
|
|
18
|
+
ref: c,
|
|
19
|
+
className: d(
|
|
15
20
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
16
|
-
|
|
21
|
+
a
|
|
17
22
|
),
|
|
18
|
-
"data-
|
|
19
|
-
|
|
23
|
+
"data-hook": o,
|
|
24
|
+
"data-slot": "separator",
|
|
25
|
+
"data-tracking-el": i,
|
|
26
|
+
"data-tracking-label": l,
|
|
27
|
+
decorative: e,
|
|
20
28
|
orientation: r,
|
|
21
|
-
...
|
|
29
|
+
...m
|
|
22
30
|
}
|
|
23
|
-
)
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
}
|
|
31
|
+
)
|
|
32
|
+
);
|
|
33
|
+
n.displayName = "Separator";
|
|
34
|
+
const x = s.forwardRef(({ className: a, children: r, dataHook: e, trackingEl: o, trackingLabel: i }, l) => /* @__PURE__ */ p(
|
|
35
|
+
"div",
|
|
36
|
+
{
|
|
37
|
+
ref: l,
|
|
38
|
+
className: d("flex items-center gap-2", a),
|
|
39
|
+
"data-hook": e,
|
|
40
|
+
"data-slot": "separator-with-text",
|
|
41
|
+
"data-tracking-el": o,
|
|
42
|
+
"data-tracking-label": i,
|
|
43
|
+
children: [
|
|
44
|
+
/* @__PURE__ */ t(n, { className: "flex-1" }),
|
|
45
|
+
/* @__PURE__ */ t("span", { className: "text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: r }),
|
|
46
|
+
/* @__PURE__ */ t(n, { className: "flex-1" })
|
|
47
|
+
]
|
|
48
|
+
}
|
|
49
|
+
));
|
|
50
|
+
x.displayName = "SeparatorWithText";
|
|
39
51
|
export {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
52
|
+
n as Separator,
|
|
53
|
+
h as SeparatorOrientation,
|
|
54
|
+
x as SeparatorWithText
|
|
43
55
|
};
|
package/dist/sheet.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),w=require("react"),T=require("@radix-ui/react-dialog"),R=require("class-variance-authority"),O=require("lucide-react"),n=require("@brightlocal/ui-components/lib/utils");function c(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const a in e)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(e,a);Object.defineProperty(t,a,i.get?i:{enumerable:!0,get:()=>e[a]})}}return t.default=e,Object.freeze(t)}const r=c(w),s=c(T);var f=(e=>(e.TOP="top",e.RIGHT="right",e.BOTTOM="bottom",e.LEFT="left",e))(f||{});const C=R.cva(["bg-background","data-[state=open]:animate-in","data-[state=closed]:animate-out","fixed","z-50","flex","flex-col","gap-4","p-6","shadow-lg","transition","ease-in-out","data-[state=closed]:duration-300","data-[state=open]:duration-500"],{variants:{side:{top:["data-[state=closed]:slide-out-to-top","data-[state=open]:slide-in-from-top","inset-x-0","top-0","h-auto","border-b"],right:["data-[state=closed]:slide-out-to-right","data-[state=open]:slide-in-from-right","inset-y-0","right-0","h-full","w-3/4","border-l","sm:max-w-sm"],bottom:["data-[state=closed]:slide-out-to-bottom","data-[state=open]:slide-in-from-bottom","inset-x-0","bottom-0","h-auto","border-t"],left:["data-[state=closed]:slide-out-to-left","data-[state=open]:slide-in-from-left","inset-y-0","left-0","h-full","w-3/4","border-r","sm:max-w-sm"]}},defaultVariants:{side:"right"}});function h({...e}){return o.jsx(s.Root,{"data-slot":"sheet",modal:!0,...e})}h.displayName="Sheet";const u=r.forwardRef(({dataHook:e,...t},a)=>o.jsx(s.Trigger,{ref:a,"data-hook":e,"data-slot":"sheet-trigger",...t}));u.displayName="SheetTrigger";const m=r.forwardRef(({...e},t)=>o.jsx(s.Close,{ref:t,"data-slot":"sheet-close",...e}));m.displayName="SheetClose";function l({...e}){return o.jsx(s.Portal,{"data-slot":"sheet-portal",...e})}l.displayName="SheetPortal";const d=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Overlay,{ref:a,className:n.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",e),"data-slot":"sheet-overlay",...t}));d.displayName="SheetOverlay";const p=r.forwardRef(({className:e,children:t,side:a,dataHook:i,trackingEl:y,trackingLabel:j,...v},N)=>o.jsxs(l,{children:[o.jsx(d,{}),o.jsxs(s.Content,{ref:N,className:n.cn(C({side:a}),e),"data-hook":i,"data-slot":"sheet-content","data-tracking-el":y,"data-tracking-label":j,...v,children:[t,o.jsxs(s.Close,{className:"ring-offset-background focus:ring-ring data-[state=open]:bg-accent data-[state=open]:text-muted-foreground absolute top-4 right-4 rounded-xs opacity-70 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",children:[o.jsx(O.XIcon,{}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));p.displayName="SheetContent";const g=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("flex flex-col gap-2 text-center sm:text-left",e),"data-slot":"sheet-header",...t}));g.displayName="SheetHeader";const x=r.forwardRef(({className:e,...t},a)=>o.jsx("div",{ref:a,className:n.cn("mt-auto flex flex-col gap-2 sm:flex-row sm:justify-end",e),"data-slot":"sheet-footer",...t}));x.displayName="SheetFooter";const S=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Title,{ref:a,className:n.cn("text-foreground text-lg font-semibold",e),"data-slot":"sheet-title",...t}));S.displayName="SheetTitle";const b=r.forwardRef(({className:e,...t},a)=>o.jsx(s.Description,{ref:a,className:n.cn("text-muted-foreground text-sm",e),"data-slot":"sheet-description",...t}));b.displayName="SheetDescription";exports.Sheet=h;exports.SheetClose=m;exports.SheetContent=p;exports.SheetDescription=b;exports.SheetFooter=x;exports.SheetHeader=g;exports.SheetOverlay=d;exports.SheetPortal=l;exports.SheetSide=f;exports.SheetTitle=S;exports.SheetTrigger=u;
|