@brightlocal/ui-components 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +1 -1
- package/dist/alert.cjs +1 -1
- package/dist/alert.js +1 -1
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.js +1 -1
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +37 -306
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +392 -489
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +1 -1
- package/dist/calendar.cjs +1 -1
- package/dist/calendar.d.ts +4 -1
- package/dist/calendar.d.ts.map +1 -1
- package/dist/calendar.js +33 -33
- package/dist/centred-layout.cjs +1 -1
- package/dist/centred-layout.d.ts +5 -18
- package/dist/centred-layout.d.ts.map +1 -1
- package/dist/centred-layout.js +21 -23
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.d.ts.map +1 -1
- package/dist/checkbox.js +19 -19
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.d.ts +75 -67
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +241 -194
- package/dist/command.cjs +1 -1
- package/dist/command.js +1 -1
- package/dist/context-menu.cjs +1 -1
- package/dist/context-menu.js +1 -1
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.js +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +1 -1
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/field.cjs +1 -1
- package/dist/field.d.ts +3 -0
- package/dist/field.d.ts.map +1 -1
- package/dist/field.js +5 -4
- package/dist/index.cjs +1 -1
- package/dist/index.js +361 -366
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.d.ts +5 -0
- package/dist/input-group.d.ts.map +1 -1
- package/dist/input-group.js +47 -39
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.d.ts +6 -0
- package/dist/input-otp.d.ts.map +1 -1
- package/dist/input-otp.js +79 -76
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +4 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +32 -31
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts +4 -0
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +26 -24
- package/dist/link.cjs +1 -1
- package/dist/link.js +1 -1
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -4
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +17 -20
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.d.ts +3 -0
- package/dist/menubar.d.ts.map +1 -1
- package/dist/menubar.js +31 -30
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.d.ts +6 -54
- package/dist/navigation-menu.d.ts.map +1 -1
- package/dist/navigation-menu.js +73 -84
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +8 -10
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +78 -86
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.d.ts +10 -23
- package/dist/radio-group.d.ts.map +1 -1
- package/dist/radio-group.js +47 -55
- package/dist/resizable.cjs +1 -1
- package/dist/resizable.d.ts +19 -28
- package/dist/resizable.d.ts.map +1 -1
- package/dist/resizable.js +24 -40
- package/dist/select.cjs +1 -1
- package/dist/select.d.ts +3 -1
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +57 -56
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +4 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +19 -21
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +5 -10
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +24 -26
- package/dist/sonner.cjs +1 -1
- package/dist/sonner.d.ts +17 -20
- package/dist/sonner.d.ts.map +1 -1
- package/dist/sonner.js +42 -45
- package/dist/switch.cjs +1 -1
- package/dist/switch.d.ts +2 -12
- package/dist/switch.d.ts.map +1 -1
- package/dist/switch.js +37 -41
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +16 -12
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +56 -58
- package/dist/tabs.d.ts +27 -3
- package/dist/tabs.d.ts.map +1 -1
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.d.ts +4 -0
- package/dist/textarea.d.ts.map +1 -1
- package/dist/textarea.js +19 -18
- package/dist/toggle-group.cjs +1 -1
- package/dist/toggle-group.d.ts +57 -7
- package/dist/toggle-group.d.ts.map +1 -1
- package/dist/toggle-group.js +60 -67
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.d.ts +12 -26
- package/dist/toggle.d.ts.map +1 -1
- package/dist/toggle.js +18 -22
- package/package.json +2 -2
- package/src/blocks/data-table.tsx +1 -1
- package/src/blocks/sidebar.tsx +157 -532
- package/src/components/accordion.tsx +1 -1
- package/src/components/alert.tsx +1 -1
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +1 -1
- package/src/components/calendar.tsx +6 -4
- package/src/components/centred-layout.tsx +11 -24
- package/src/components/checkbox.tsx +5 -6
- package/src/components/combobox.tsx +481 -301
- package/src/components/command.tsx +1 -1
- package/src/components/context-menu.tsx +1 -1
- package/src/components/date-picker.tsx +1 -1
- package/src/components/dialog.tsx +1 -1
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/field.tsx +2 -0
- package/src/components/input-group.tsx +14 -2
- package/src/components/input-otp.tsx +17 -2
- package/src/components/input-password.tsx +7 -2
- package/src/components/input.tsx +11 -3
- package/src/components/link.tsx +1 -1
- package/src/components/logo.tsx +10 -8
- package/src/components/menubar.tsx +3 -1
- package/src/components/navigation-menu.tsx +37 -99
- package/src/components/pagination.tsx +13 -19
- package/src/components/radio-group.tsx +28 -38
- package/src/components/resizable.tsx +5 -43
- package/src/components/select.tsx +8 -3
- package/src/components/separator.tsx +5 -5
- package/src/components/sheet.tsx +6 -11
- package/src/components/sonner.tsx +24 -27
- package/src/components/switch.figma.tsx +7 -11
- package/src/components/switch.tsx +9 -19
- package/src/components/table.tsx +23 -18
- package/src/components/tabs.tsx +27 -3
- package/src/components/textarea.tsx +12 -5
- package/src/components/toggle-group.tsx +115 -86
- package/src/components/toggle.figma.tsx +13 -19
- package/src/components/toggle.tsx +32 -48
package/dist/resizable.js
CHANGED
|
@@ -1,57 +1,41 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import { GripVertical as c } from "
|
|
4
|
-
import * as
|
|
5
|
-
import { cn as
|
|
6
|
-
const f =
|
|
7
|
-
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import { GripVertical as c } from "@brightlocal/icons";
|
|
4
|
+
import * as l from "react-resizable-panels";
|
|
5
|
+
import { cn as o } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const f = i.forwardRef(({ className: e, dataHook: a, trackingEl: t, trackingLabel: n, ...s }, d) => /* @__PURE__ */ r(
|
|
7
|
+
l.PanelGroup,
|
|
8
8
|
{
|
|
9
|
-
ref:
|
|
10
|
-
className:
|
|
9
|
+
ref: d,
|
|
10
|
+
className: o(
|
|
11
11
|
"flex h-full w-full data-[panel-group-direction=vertical]:flex-col",
|
|
12
|
-
|
|
12
|
+
e
|
|
13
13
|
),
|
|
14
|
-
"data-hook":
|
|
14
|
+
"data-hook": a,
|
|
15
15
|
"data-slot": "resizable-panel-group",
|
|
16
|
-
"data-tracking-el":
|
|
17
|
-
"data-tracking-label":
|
|
18
|
-
...
|
|
16
|
+
"data-tracking-el": t,
|
|
17
|
+
"data-tracking-label": n,
|
|
18
|
+
...s
|
|
19
19
|
}
|
|
20
20
|
));
|
|
21
21
|
f.displayName = "ResizablePanelGroup";
|
|
22
|
-
const p =
|
|
23
|
-
n.Panel,
|
|
24
|
-
{
|
|
25
|
-
ref: l,
|
|
26
|
-
"data-hook": a,
|
|
27
|
-
"data-slot": "resizable-panel",
|
|
28
|
-
"data-tracking-el": e,
|
|
29
|
-
"data-tracking-label": r,
|
|
30
|
-
...t
|
|
31
|
-
}
|
|
32
|
-
));
|
|
22
|
+
const p = i.forwardRef(({ ...e }, a) => /* @__PURE__ */ r(l.Panel, { ref: a, "data-slot": "resizable-panel", ...e }));
|
|
33
23
|
p.displayName = "ResizablePanel";
|
|
34
24
|
function u({
|
|
35
|
-
withHandle:
|
|
36
|
-
className:
|
|
37
|
-
|
|
38
|
-
trackingEl: t,
|
|
39
|
-
trackingLabel: l,
|
|
40
|
-
...o
|
|
25
|
+
withHandle: e,
|
|
26
|
+
className: a,
|
|
27
|
+
...t
|
|
41
28
|
}) {
|
|
42
|
-
return /* @__PURE__ */
|
|
43
|
-
|
|
29
|
+
return /* @__PURE__ */ r(
|
|
30
|
+
l.PanelResizeHandle,
|
|
44
31
|
{
|
|
45
|
-
className:
|
|
32
|
+
className: o(
|
|
46
33
|
"bg-border focus-visible:ring-ring relative flex w-px items-center justify-center after:absolute after:inset-y-0 after:left-1/2 after:w-1 after:-translate-x-1/2 focus-visible:ring-1 focus-visible:ring-offset-1 focus-visible:outline-none data-[panel-group-direction=vertical]:h-px data-[panel-group-direction=vertical]:w-full data-[panel-group-direction=vertical]:after:left-0 data-[panel-group-direction=vertical]:after:h-1 data-[panel-group-direction=vertical]:after:w-full data-[panel-group-direction=vertical]:after:translate-x-0 data-[panel-group-direction=vertical]:after:-translate-y-1/2 [&[data-panel-group-direction=vertical]>div]:rotate-90",
|
|
47
|
-
|
|
34
|
+
a
|
|
48
35
|
),
|
|
49
|
-
"data-hook": r,
|
|
50
36
|
"data-slot": "resizable-handle",
|
|
51
|
-
|
|
52
|
-
"
|
|
53
|
-
...o,
|
|
54
|
-
children: a && /* @__PURE__ */ i("div", { className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ i(c, { className: "h-2.5 w-2.5" }) })
|
|
37
|
+
...t,
|
|
38
|
+
children: e && /* @__PURE__ */ r("div", { className: "border-border bg-border z-10 flex h-4 w-3 items-center justify-center rounded-xs border", children: /* @__PURE__ */ r(c, { className: "h-2.5 w-2.5" }) })
|
|
55
39
|
}
|
|
56
40
|
);
|
|
57
41
|
}
|
package/dist/select.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
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("
|
|
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("@brightlocal/icons"),V=require("class-variance-authority"),n=require("@brightlocal/ui-components/lib/utils"),L=require("@brightlocal/ui-components/label");function y(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:()=>e[o]})}}return r.default=e,Object.freeze(r)}const m=y(D),a=y(P);function N({label:e,description:r,optional:o,placeholder:s,children:c,"aria-label":l,...u}){const d=m.useId(),f=`${d}-label`,g=`${d}-description`,b=r,C=e||b,h={placeholder:s,"aria-required":o?void 0:!0,"aria-label":l},T={...h,id:d},j=(i,B)=>m.isValidElement(i)&&i.type===x?m.cloneElement(i,B):i;return C?t.jsxs("div",{className:"flex flex-col gap-2",children:[e&&t.jsx(L.Label,{htmlFor:d,id:f,optional:o,children:e}),t.jsx(a.Root,{"data-slot":"select",...u,children:m.Children.map(c,i=>j(i,T))}),b&&t.jsx("p",{className:"text-muted-foreground text-sm",id:g,children:b})]}):t.jsx(a.Root,{"data-slot":"select",...u,children:m.Children.map(c,i=>j(i,h))})}N.displayName="Select";function w(e){return t.jsx(a.Group,{"data-slot":"select-group",...e})}w.displayName="SelectGroup";function I(e){return t.jsx(a.Value,{"data-slot":"select-value",...e})}I.displayName="SelectValue";const O=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 x({className:e,children:r,placeholder:o,dataHook:s,error:c,...l}){const u=c||l["aria-invalid"]===!0||l["aria-invalid"]==="true",d=l["aria-required"]===!0||l["aria-required"]==="true",f=l["aria-label"]||o||"Select an option",g=u?"border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive":"";return t.jsxs(a.Trigger,{...l,"aria-invalid":u?"true":void 0,"aria-label":f,"aria-required":d?"true":void 0,className:n.cn(O(),g,e),"data-hook":s,"data-slot":"select-trigger",children:[r,t.jsx(a.Icon,{asChild:!0,children:t.jsx(p.ChevronDownIcon,{className:"text-muted-foreground size-4"})})]})}x.displayName="SelectTrigger";function z({className:e,children:r,position:o="popper",...s}){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"),l=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,l,e),"data-slot":"select-content",position:o,...s,children:[t.jsx(v,{}),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(S,{})]})})}z.displayName="SelectContent";function _({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})}_.displayName="SelectLabel";function q({className:e,children:r,...o}){const s=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","[&_svg:not([class*='size-'])]:size-4","[&_svg:not([class*='text-'])]:text-foreground");return t.jsxs(a.Item,{className:n.cn(s,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})]})}q.displayName="SelectItem";function k({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})}k.displayName="SelectSeparator";function v({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(p.ChevronUpIcon,{className:"size-4"})})}v.displayName="SelectScrollUpButton";function S({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(p.ChevronDownIcon,{className:"size-4"})})}S.displayName="SelectScrollDownButton";exports.Select=N;exports.SelectContent=z;exports.SelectGroup=w;exports.SelectItem=q;exports.SelectLabel=_;exports.SelectScrollDownButton=S;exports.SelectScrollUpButton=v;exports.SelectSeparator=k;exports.SelectTrigger=x;exports.SelectValue=I;
|
package/dist/select.d.ts
CHANGED
|
@@ -42,11 +42,13 @@ interface SelectTriggerProps extends React.ComponentProps<typeof SelectPrimitive
|
|
|
42
42
|
placeholder?: string;
|
|
43
43
|
/** Data hook for testing and automation */
|
|
44
44
|
dataHook?: string;
|
|
45
|
+
/** Whether the select trigger has an error state */
|
|
46
|
+
error?: boolean;
|
|
45
47
|
}
|
|
46
48
|
/**
|
|
47
49
|
* SelectTrigger - The button that opens the select dropdown
|
|
48
50
|
*/
|
|
49
|
-
declare function SelectTrigger({ className, children, placeholder, dataHook, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
51
|
+
declare function SelectTrigger({ className, children, placeholder, dataHook, error, ...props }: SelectTriggerProps): import("react/jsx-runtime").JSX.Element;
|
|
50
52
|
declare namespace SelectTrigger {
|
|
51
53
|
var displayName: string;
|
|
52
54
|
}
|
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,iDA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AAK,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,40 +1,40 @@
|
|
|
1
1
|
import { jsx as e, jsxs as p } from "react/jsx-runtime";
|
|
2
|
-
import * as
|
|
2
|
+
import * as m from "react";
|
|
3
3
|
import * as r from "@radix-ui/react-select";
|
|
4
|
-
import { CheckIcon as k, ChevronDownIcon as
|
|
4
|
+
import { CheckIcon as k, ChevronDownIcon as x, ChevronUpIcon as C } from "@brightlocal/icons";
|
|
5
5
|
import { cva as T } from "class-variance-authority";
|
|
6
|
-
import { cn as
|
|
6
|
+
import { cn as o } from "@brightlocal/ui-components/lib/utils";
|
|
7
7
|
import { Label as _ } from "@brightlocal/ui-components/label";
|
|
8
8
|
function j({
|
|
9
9
|
label: t,
|
|
10
10
|
description: a,
|
|
11
|
-
optional:
|
|
11
|
+
optional: n,
|
|
12
12
|
placeholder: i,
|
|
13
|
-
children:
|
|
14
|
-
"aria-label":
|
|
15
|
-
...
|
|
13
|
+
children: d,
|
|
14
|
+
"aria-label": s,
|
|
15
|
+
...u
|
|
16
16
|
}) {
|
|
17
|
-
const c =
|
|
17
|
+
const c = m.useId(), f = `${c}-label`, g = `${c}-description`, b = a, w = t || b, v = {
|
|
18
18
|
placeholder: i,
|
|
19
|
-
"aria-required":
|
|
20
|
-
"aria-label":
|
|
19
|
+
"aria-required": n ? void 0 : !0,
|
|
20
|
+
"aria-label": s
|
|
21
21
|
}, I = {
|
|
22
|
-
...
|
|
22
|
+
...v,
|
|
23
23
|
id: c
|
|
24
|
-
},
|
|
24
|
+
}, h = (l, z) => m.isValidElement(l) && l.type === S ? m.cloneElement(
|
|
25
25
|
l,
|
|
26
26
|
z
|
|
27
27
|
) : l;
|
|
28
28
|
return w ? /* @__PURE__ */ p("div", { className: "flex flex-col gap-2", children: [
|
|
29
|
-
t && /* @__PURE__ */ e(_, { htmlFor: c, id: f, optional:
|
|
30
|
-
/* @__PURE__ */ e(r.Root, { "data-slot": "select", ...
|
|
31
|
-
|
|
32
|
-
(l) =>
|
|
29
|
+
t && /* @__PURE__ */ e(_, { htmlFor: c, id: f, optional: n, children: t }),
|
|
30
|
+
/* @__PURE__ */ e(r.Root, { "data-slot": "select", ...u, children: m.Children.map(
|
|
31
|
+
d,
|
|
32
|
+
(l) => h(l, I)
|
|
33
33
|
) }),
|
|
34
|
-
|
|
35
|
-
] }) : /* @__PURE__ */ e(r.Root, { "data-slot": "select", ...
|
|
36
|
-
|
|
37
|
-
(l) =>
|
|
34
|
+
b && /* @__PURE__ */ e("p", { className: "text-muted-foreground text-sm", id: g, children: b })
|
|
35
|
+
] }) : /* @__PURE__ */ e(r.Root, { "data-slot": "select", ...u, children: m.Children.map(
|
|
36
|
+
d,
|
|
37
|
+
(l) => h(l, v)
|
|
38
38
|
) });
|
|
39
39
|
}
|
|
40
40
|
j.displayName = "Select";
|
|
@@ -72,39 +72,40 @@ const q = T([
|
|
|
72
72
|
"[&_svg:not([class*='size-'])]:size-4",
|
|
73
73
|
"[&_svg:not([class*='text-'])]:text-muted-foreground"
|
|
74
74
|
]);
|
|
75
|
-
function
|
|
75
|
+
function S({
|
|
76
76
|
className: t,
|
|
77
77
|
children: a,
|
|
78
|
-
placeholder:
|
|
78
|
+
placeholder: n,
|
|
79
79
|
dataHook: i,
|
|
80
|
-
|
|
80
|
+
error: d,
|
|
81
|
+
...s
|
|
81
82
|
}) {
|
|
82
|
-
const
|
|
83
|
+
const u = d || s["aria-invalid"] === !0 || s["aria-invalid"] === "true", c = s["aria-required"] === !0 || s["aria-required"] === "true", f = s["aria-label"] || n || "Select an option", g = u ? "border-destructive dark:border-destructive focus-visible:border-destructive focus-visible:shadow-destructive" : "";
|
|
83
84
|
return /* @__PURE__ */ p(
|
|
84
85
|
r.Trigger,
|
|
85
86
|
{
|
|
86
|
-
...
|
|
87
|
-
"aria-invalid":
|
|
88
|
-
"aria-label":
|
|
89
|
-
"aria-required":
|
|
90
|
-
className:
|
|
87
|
+
...s,
|
|
88
|
+
"aria-invalid": u ? "true" : void 0,
|
|
89
|
+
"aria-label": f,
|
|
90
|
+
"aria-required": c ? "true" : void 0,
|
|
91
|
+
className: o(q(), g, t),
|
|
91
92
|
"data-hook": i,
|
|
92
93
|
"data-slot": "select-trigger",
|
|
93
94
|
children: [
|
|
94
95
|
a,
|
|
95
|
-
/* @__PURE__ */ e(r.Icon, { asChild: !0, children: /* @__PURE__ */ e(
|
|
96
|
+
/* @__PURE__ */ e(r.Icon, { asChild: !0, children: /* @__PURE__ */ e(x, { className: "text-muted-foreground size-4" }) })
|
|
96
97
|
]
|
|
97
98
|
}
|
|
98
99
|
);
|
|
99
100
|
}
|
|
100
|
-
|
|
101
|
+
S.displayName = "SelectTrigger";
|
|
101
102
|
function L({
|
|
102
103
|
className: t,
|
|
103
104
|
children: a,
|
|
104
|
-
position:
|
|
105
|
+
position: n = "popper",
|
|
105
106
|
...i
|
|
106
107
|
}) {
|
|
107
|
-
const
|
|
108
|
+
const d = o(
|
|
108
109
|
// Base appearance
|
|
109
110
|
"relative z-50 overflow-hidden",
|
|
110
111
|
"min-w-[8rem]",
|
|
@@ -121,7 +122,7 @@ function L({
|
|
|
121
122
|
"data-[side=left]:slide-in-from-right-2",
|
|
122
123
|
"data-[side=right]:slide-in-from-left-2",
|
|
123
124
|
"data-[side=top]:slide-in-from-bottom-2"
|
|
124
|
-
),
|
|
125
|
+
), s = n === "popper" && o(
|
|
125
126
|
"data-[side=bottom]:translate-y-1",
|
|
126
127
|
"data-[side=left]:-translate-x-1",
|
|
127
128
|
"data-[side=right]:translate-x-1",
|
|
@@ -130,23 +131,23 @@ function L({
|
|
|
130
131
|
return /* @__PURE__ */ e(r.Portal, { children: /* @__PURE__ */ p(
|
|
131
132
|
r.Content,
|
|
132
133
|
{
|
|
133
|
-
className:
|
|
134
|
+
className: o(d, s, t),
|
|
134
135
|
"data-slot": "select-content",
|
|
135
|
-
position:
|
|
136
|
+
position: n,
|
|
136
137
|
...i,
|
|
137
138
|
children: [
|
|
138
|
-
/* @__PURE__ */ e(
|
|
139
|
+
/* @__PURE__ */ e(y, {}),
|
|
139
140
|
/* @__PURE__ */ e(
|
|
140
141
|
r.Viewport,
|
|
141
142
|
{
|
|
142
|
-
className:
|
|
143
|
+
className: o(
|
|
143
144
|
"p-1",
|
|
144
|
-
|
|
145
|
+
n === "popper" && "h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)] scroll-my-1"
|
|
145
146
|
),
|
|
146
147
|
children: a
|
|
147
148
|
}
|
|
148
149
|
),
|
|
149
|
-
/* @__PURE__ */ e(
|
|
150
|
+
/* @__PURE__ */ e(N, {})
|
|
150
151
|
]
|
|
151
152
|
}
|
|
152
153
|
) });
|
|
@@ -159,7 +160,7 @@ function D({
|
|
|
159
160
|
return /* @__PURE__ */ e(
|
|
160
161
|
r.Label,
|
|
161
162
|
{
|
|
162
|
-
className:
|
|
163
|
+
className: o(
|
|
163
164
|
"text-muted-foreground px-2 py-1.5 text-xs font-medium",
|
|
164
165
|
t
|
|
165
166
|
),
|
|
@@ -172,9 +173,9 @@ D.displayName = "SelectLabel";
|
|
|
172
173
|
function P({
|
|
173
174
|
className: t,
|
|
174
175
|
children: a,
|
|
175
|
-
...
|
|
176
|
+
...n
|
|
176
177
|
}) {
|
|
177
|
-
const i =
|
|
178
|
+
const i = o(
|
|
178
179
|
// Base layout
|
|
179
180
|
"relative flex w-full cursor-default select-none items-center gap-2",
|
|
180
181
|
"rounded py-1.5 pl-2 pr-8",
|
|
@@ -194,9 +195,9 @@ function P({
|
|
|
194
195
|
return /* @__PURE__ */ p(
|
|
195
196
|
r.Item,
|
|
196
197
|
{
|
|
197
|
-
className:
|
|
198
|
+
className: o(i, t),
|
|
198
199
|
"data-slot": "select-item",
|
|
199
|
-
...
|
|
200
|
+
...n,
|
|
200
201
|
children: [
|
|
201
202
|
/* @__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" }) }) }),
|
|
202
203
|
/* @__PURE__ */ e(r.ItemText, { children: a })
|
|
@@ -212,21 +213,21 @@ function R({
|
|
|
212
213
|
return /* @__PURE__ */ e(
|
|
213
214
|
r.Separator,
|
|
214
215
|
{
|
|
215
|
-
className:
|
|
216
|
+
className: o("bg-border pointer-events-none -mx-1 my-1 h-px", t),
|
|
216
217
|
"data-slot": "select-separator",
|
|
217
218
|
...a
|
|
218
219
|
}
|
|
219
220
|
);
|
|
220
221
|
}
|
|
221
222
|
R.displayName = "SelectSeparator";
|
|
222
|
-
function
|
|
223
|
+
function y({
|
|
223
224
|
className: t,
|
|
224
225
|
...a
|
|
225
226
|
}) {
|
|
226
227
|
return /* @__PURE__ */ e(
|
|
227
228
|
r.ScrollUpButton,
|
|
228
229
|
{
|
|
229
|
-
className:
|
|
230
|
+
className: o(
|
|
230
231
|
"flex cursor-default items-center justify-center py-1",
|
|
231
232
|
t
|
|
232
233
|
),
|
|
@@ -236,34 +237,34 @@ function S({
|
|
|
236
237
|
}
|
|
237
238
|
);
|
|
238
239
|
}
|
|
239
|
-
|
|
240
|
-
function
|
|
240
|
+
y.displayName = "SelectScrollUpButton";
|
|
241
|
+
function N({
|
|
241
242
|
className: t,
|
|
242
243
|
...a
|
|
243
244
|
}) {
|
|
244
245
|
return /* @__PURE__ */ e(
|
|
245
246
|
r.ScrollDownButton,
|
|
246
247
|
{
|
|
247
|
-
className:
|
|
248
|
+
className: o(
|
|
248
249
|
"flex cursor-default items-center justify-center py-1",
|
|
249
250
|
t
|
|
250
251
|
),
|
|
251
252
|
"data-slot": "select-scroll-down-button",
|
|
252
253
|
...a,
|
|
253
|
-
children: /* @__PURE__ */ e(
|
|
254
|
+
children: /* @__PURE__ */ e(x, { className: "size-4" })
|
|
254
255
|
}
|
|
255
256
|
);
|
|
256
257
|
}
|
|
257
|
-
|
|
258
|
+
N.displayName = "SelectScrollDownButton";
|
|
258
259
|
export {
|
|
259
260
|
j as Select,
|
|
260
261
|
L as SelectContent,
|
|
261
262
|
B as SelectGroup,
|
|
262
263
|
P as SelectItem,
|
|
263
264
|
D as SelectLabel,
|
|
264
|
-
|
|
265
|
-
|
|
265
|
+
N as SelectScrollDownButton,
|
|
266
|
+
y as SelectScrollUpButton,
|
|
266
267
|
R as SelectSeparator,
|
|
267
|
-
|
|
268
|
+
S as SelectTrigger,
|
|
268
269
|
V as SelectValue
|
|
269
270
|
};
|
package/dist/separator.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"),m=require("react"),x=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(m),g=c(x),n=d.forwardRef(({className:t,orientation:a="horizontal",decorative:e=!0,dataHook:r,trackingEl:i,trackingLabel:s,...u},f)=>o.jsx(g.Root,{ref:f,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,...u}));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.SeparatorWithText=p;
|
package/dist/separator.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Orientation variants for Separator
|
|
5
|
+
*/
|
|
6
|
+
export type SeparatorOrientation = "horizontal" | "vertical";
|
|
7
7
|
/**
|
|
8
8
|
* Props for the Separator component.
|
|
9
9
|
*/
|
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,
|
|
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;;GAEG;AACH,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,UAAU,CAAC;AAE7D;;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,55 +1,53 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as a, jsxs as c } from "react/jsx-runtime";
|
|
2
|
+
import * as l from "react";
|
|
3
3
|
import * as f from "@radix-ui/react-separator";
|
|
4
4
|
import { cn as d } from "@brightlocal/ui-components/lib/utils";
|
|
5
|
-
|
|
6
|
-
const n = s.forwardRef(
|
|
5
|
+
const s = l.forwardRef(
|
|
7
6
|
({
|
|
8
|
-
className:
|
|
7
|
+
className: t,
|
|
9
8
|
orientation: r = "horizontal",
|
|
10
9
|
decorative: e = !0,
|
|
11
10
|
dataHook: o,
|
|
12
11
|
trackingEl: i,
|
|
13
|
-
trackingLabel:
|
|
12
|
+
trackingLabel: n,
|
|
14
13
|
...m
|
|
15
|
-
},
|
|
14
|
+
}, p) => /* @__PURE__ */ a(
|
|
16
15
|
f.Root,
|
|
17
16
|
{
|
|
18
|
-
ref:
|
|
17
|
+
ref: p,
|
|
19
18
|
className: d(
|
|
20
19
|
"bg-border shrink-0 data-[orientation=horizontal]:h-px data-[orientation=horizontal]:w-full data-[orientation=vertical]:h-full data-[orientation=vertical]:w-px",
|
|
21
|
-
|
|
20
|
+
t
|
|
22
21
|
),
|
|
23
22
|
"data-hook": o,
|
|
24
23
|
"data-slot": "separator",
|
|
25
24
|
"data-tracking-el": i,
|
|
26
|
-
"data-tracking-label":
|
|
25
|
+
"data-tracking-label": n,
|
|
27
26
|
decorative: e,
|
|
28
27
|
orientation: r,
|
|
29
28
|
...m
|
|
30
29
|
}
|
|
31
30
|
)
|
|
32
31
|
);
|
|
33
|
-
|
|
34
|
-
const
|
|
32
|
+
s.displayName = "Separator";
|
|
33
|
+
const h = l.forwardRef(({ className: t, children: r, dataHook: e, trackingEl: o, trackingLabel: i }, n) => /* @__PURE__ */ c(
|
|
35
34
|
"div",
|
|
36
35
|
{
|
|
37
|
-
ref:
|
|
38
|
-
className: d("flex items-center gap-2",
|
|
36
|
+
ref: n,
|
|
37
|
+
className: d("flex items-center gap-2", t),
|
|
39
38
|
"data-hook": e,
|
|
40
39
|
"data-slot": "separator-with-text",
|
|
41
40
|
"data-tracking-el": o,
|
|
42
41
|
"data-tracking-label": i,
|
|
43
42
|
children: [
|
|
44
|
-
/* @__PURE__ */
|
|
45
|
-
/* @__PURE__ */
|
|
46
|
-
/* @__PURE__ */
|
|
43
|
+
/* @__PURE__ */ a(s, { className: "flex-1" }),
|
|
44
|
+
/* @__PURE__ */ a("span", { className: "text-sidebar-foreground shrink-0 text-sm leading-none font-medium whitespace-nowrap", children: r }),
|
|
45
|
+
/* @__PURE__ */ a(s, { className: "flex-1" })
|
|
47
46
|
]
|
|
48
47
|
}
|
|
49
48
|
));
|
|
50
|
-
|
|
49
|
+
h.displayName = "SeparatorWithText";
|
|
51
50
|
export {
|
|
52
|
-
|
|
53
|
-
h as
|
|
54
|
-
x as SeparatorWithText
|
|
51
|
+
s as Separator,
|
|
52
|
+
h as SeparatorWithText
|
|
55
53
|
};
|
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"),N=require("react"),w=require("@radix-ui/react-dialog"),R=require("class-variance-authority"),C=require("@brightlocal/icons"),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(N),s=c(w),O=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 f({...e}){return o.jsx(s.Root,{"data-slot":"sheet",modal:!0,...e})}f.displayName="Sheet";const h=r.forwardRef(({dataHook:e,...t},a)=>o.jsx(s.Trigger,{ref:a,"data-hook":e,"data-slot":"sheet-trigger",...t}));h.displayName="SheetTrigger";const u=r.forwardRef(({...e},t)=>o.jsx(s.Close,{ref:t,"data-slot":"sheet-close",...e}));u.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 m=r.forwardRef(({className:e,children:t,side:a,dataHook:i,trackingEl:y,trackingLabel:b,...j},v)=>o.jsxs(l,{children:[o.jsx(d,{}),o.jsxs(s.Content,{ref:v,className:n.cn(O({side:a}),e),"data-hook":i,"data-slot":"sheet-content","data-tracking-el":y,"data-tracking-label":b,...j,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(C.XIcon,{}),o.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));m.displayName="SheetContent";const p=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}));p.displayName="SheetHeader";const g=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}));g.displayName="SheetFooter";const x=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}));x.displayName="SheetTitle";const S=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}));S.displayName="SheetDescription";exports.Sheet=f;exports.SheetClose=u;exports.SheetContent=m;exports.SheetDescription=S;exports.SheetFooter=g;exports.SheetHeader=p;exports.SheetOverlay=d;exports.SheetPortal=l;exports.SheetTitle=x;exports.SheetTrigger=h;
|
package/dist/sheet.d.ts
CHANGED
|
@@ -3,17 +3,12 @@ import * as React from "react";
|
|
|
3
3
|
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
4
4
|
/**
|
|
5
5
|
* Available sheet side variants
|
|
6
|
+
* - top: Sheet slides in from the top
|
|
7
|
+
* - right: Sheet slides in from the right (default)
|
|
8
|
+
* - bottom: Sheet slides in from the bottom
|
|
9
|
+
* - left: Sheet slides in from the left
|
|
6
10
|
*/
|
|
7
|
-
export
|
|
8
|
-
/** Sheet slides in from the top */
|
|
9
|
-
TOP = "top",
|
|
10
|
-
/** Sheet slides in from the right (default) */
|
|
11
|
-
RIGHT = "right",
|
|
12
|
-
/** Sheet slides in from the bottom */
|
|
13
|
-
BOTTOM = "bottom",
|
|
14
|
-
/** Sheet slides in from the left */
|
|
15
|
-
LEFT = "left"
|
|
16
|
-
}
|
|
11
|
+
export type SheetSide = "top" | "right" | "bottom" | "left";
|
|
17
12
|
declare const sheetContentVariants: (props?: ({
|
|
18
13
|
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
19
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
package/dist/sheet.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE
|
|
1
|
+
{"version":3,"file":"sheet.d.ts","sourceRoot":"","sources":["../../src/components/sheet.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,cAAc,MAAM,wBAAwB,CAAC;AACzD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE;;;;;;GAMG;AACH,MAAM,MAAM,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,CAAC;AAE5D,QAAA,MAAM,oBAAoB;;8EA8DzB,CAAC;AAEF;;;GAGG;AACH,iBAAS,KAAK,CAAC,EAAE,GAAG,KAAK,EAAE,EAAE,KAAK,CAAC,cAAc,CAAC,OAAO,cAAc,CAAC,IAAI,CAAC,2CAE5E;kBAFQ,KAAK;;;AAKd;;GAEG;AACH,UAAU,iBAAkB,SAAQ,KAAK,CAAC,cAAc,CACtD,OAAO,cAAc,CAAC,OAAO,CAC9B;IACC;;OAEG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;;GAGG;A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