@brightlocal/ui-components 2.2.0 → 2.4.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/AI_USAGE.md +1 -1
- package/README.md +6 -5
- package/component-meta.json +531 -32
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +380 -196
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +452 -449
- package/dist/callout.cjs +1 -0
- package/dist/callout.d.ts +51 -0
- package/dist/callout.d.ts.map +1 -0
- package/dist/callout.js +114 -0
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +40 -4
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +156 -101
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +2 -2
- package/dist/command.cjs +1 -1
- package/dist/command.js +27 -27
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +436 -426
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +1 -1
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +1 -1
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +9 -9
- package/dist/input.cjs +1 -1
- package/dist/input.d.ts.map +1 -1
- package/dist/input.js +6 -7
- package/dist/sheet.d.ts +1 -1
- package/dist/split-layout.cjs +1 -1
- package/dist/split-layout.d.ts +17 -3
- package/dist/split-layout.d.ts.map +1 -1
- package/dist/split-layout.js +86 -114
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +6 -6
- package/package.json +34 -10
- package/src/blocks/data-table.tsx +865 -679
- package/src/components/callout.tsx +182 -0
- package/src/components/carousel.tsx +121 -3
- package/src/components/combobox.tsx +2 -2
- package/src/components/command.tsx +1 -1
- package/src/components/input-chip.tsx +1 -1
- package/src/components/input-group.tsx +1 -1
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input.tsx +2 -3
- package/src/components/split-layout.tsx +27 -65
- package/src/components/textarea.tsx +1 -1
- package/src/index.ts +1 -0
package/dist/input-chip.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),F=require("react"),q=require("class-variance-authority"),D=require("@brightlocal/ui-components/lib/utils"),E=require("@brightlocal/ui-components/chip");function N(s){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(f,n,a.get?a:{enumerable:!0,get:()=>s[n]})}}return f.default=s,Object.freeze(f)}const u=N(F),S=u.createContext(null);function V(){const s=u.useContext(S);if(!s)throw new Error("InputChip components must be used within an <InputChip>");return s}function O({value:s,defaultValue:f=[],onValueChange:n,disabled:a=!1,allowDuplicates:h=!1,children:d}){const[o,i]=u.useState(f),[l,v]=u.useState(""),[
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const w=require("react/jsx-runtime"),F=require("react"),q=require("class-variance-authority"),D=require("@brightlocal/ui-components/lib/utils"),E=require("@brightlocal/ui-components/chip");function N(s){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(s){for(const n in s)if(n!=="default"){const a=Object.getOwnPropertyDescriptor(s,n);Object.defineProperty(f,n,a.get?a:{enumerable:!0,get:()=>s[n]})}}return f.default=s,Object.freeze(f)}const u=N(F),S=u.createContext(null);function V(){const s=u.useContext(S);if(!s)throw new Error("InputChip components must be used within an <InputChip>");return s}function O({value:s,defaultValue:f=[],onValueChange:n,disabled:a=!1,allowDuplicates:h=!1,children:d}){const[o,i]=u.useState(f),[l,v]=u.useState(""),[b,I]=u.useState(-1),t=u.useRef(null),e=u.useRef([]),c=s!==void 0,r=c?s:o;u.useEffect(()=>{e.current.length>r.length&&(e.current.length=r.length),b>=r.length&&I(-1)},[r.length,b]);const g=u.useCallback(C=>{c||i(C),n?.(C)},[c,n]),R=u.useCallback(C=>{if(a)return;const m=C.trim();m&&(h||!r.includes(m))&&(g([...r,m]),v(""))},[r,g,h,a]),y=u.useCallback(C=>{a||g(r.filter((m,p)=>p!==C))},[r,g,a]),x=u.useMemo(()=>({value:r,onValueChange:g,inputValue:l,setInputValue:v,disabled:a,addItem:R,removeItem:y,inputRef:t,focusedChipIndex:b,setFocusedChipIndex:I,chipRefs:e}),[r,g,l,v,a,R,y,t,b,I,e]);return w.jsx(S.Provider,{value:x,children:d})}const j=q.cva(["relative flex w-full flex-wrap items-center gap-1","min-h-9 rounded-sm border border-input bg-background","px-3 py-2","has-[:focus-visible]:border-ring has-[:focus-visible]:bg-background","has-[:focus-visible]:shadow-default","has-[:disabled]:cursor-not-allowed has-[:disabled]:opacity-50","transition-[color,box-shadow,border-color]","duration-150","ease-in-out"],{variants:{error:{true:["border-destructive-40","has-[:focus-visible]:border-destructive-40 has-[:focus-visible]:shadow-destructive"],false:""}},defaultVariants:{error:!1}}),$=["flex-1 min-w-20","bg-transparent","border-0 outline-none","text-base font-sans","text-foreground","placeholder:text-muted-foreground","focus:outline-none focus-visible:outline-none","disabled:cursor-not-allowed disabled:opacity-50"],A=u.forwardRef(({className:s,error:f=!1,dataHook:n,trackingEl:a,trackingLabel:h,placeholder:d,inputId:o,"aria-label":i,"aria-labelledby":l,children:v,...b},I)=>{const{value:t,inputValue:e,setInputValue:c,disabled:r,addItem:g,inputRef:R,setFocusedChipIndex:y,chipRefs:x}=V(),C=p=>{c(p.target.value)},m=p=>{if(p.key==="Enter"&&e.trim()&&(p.preventDefault(),g(e)),p.key==="ArrowLeft"&&!e&&t.length>0){p.preventDefault();const k=t.length-1;y(k),x.current[k]?.focus()}if(p.key==="Backspace"&&!e&&t.length>0){p.preventDefault();const k=t.length-1;y(k),x.current[k]?.focus()}};return w.jsxs("div",{ref:I,className:D.cn(j({error:f}),s),"data-hook":n,"data-slot":"input-chip","data-tracking-el":a,"data-tracking-label":h,...b,children:[v,w.jsx("input",{ref:R,"aria-label":i,"aria-labelledby":l,className:D.cn($),"data-slot":"input-chip-input",disabled:r,id:o,placeholder:d,type:"text",value:e,onChange:C,onKeyDown:m})]})});A.displayName="InputChipInput";function B({className:s,dataHookPrefix:f="chip"}){const{value:n,disabled:a,removeItem:h,inputRef:d,setFocusedChipIndex:o,chipRefs:i}=V(),l=u.useRef(null);u.useEffect(()=>{if(l.current!==null){if(l.current==="input")d.current?.focus();else{const t=l.current;t>=0&&t<n.length?i.current[t]?.focus():n.length>0?i.current[n.length-1]?.focus():d.current?.focus()}l.current=null}},[n.length,d,i]);const v=(t,e)=>{if(!a)switch(t.key){case"ArrowLeft":t.preventDefault(),e>0&&(o(e-1),i.current[e-1]?.focus());break;case"ArrowRight":t.preventDefault(),e<n.length-1?(o(e+1),i.current[e+1]?.focus()):(o(-1),d.current?.focus());break;case"Backspace":case"Delete":{t.preventDefault();const c=n.length-1;if(c===0)o(-1),l.current="input",h(e);else if(e>=c){const r=c-1;o(r),l.current=r,h(e)}else o(e),l.current=e,h(e);break}case"Home":t.preventDefault(),n.length>0&&(o(0),i.current[0]?.focus());break;case"End":t.preventDefault(),o(-1),d.current?.focus();break}},b=t=>{o(t)},I=t=>{const e=t.relatedTarget;e&&(e.closest('[data-slot="chip"]')!==null||e.dataset.slot==="input-chip-input")||o(-1)};return n.length===0?null:w.jsx("div",{className:D.cn("contents",s),"data-slot":"input-chip-items",children:n.map((t,e)=>w.jsx(E.Chip,{ref:c=>{i.current[e]=c},"aria-label":`${t}, press Delete to remove`,dataHook:`${f}-${e}`,disabled:a,role:"group",tabIndex:-1,onBlur:I,onFocus:()=>b(e),onKeyDown:c=>v(c,e),onRemove:()=>h(e),children:t},`${t}-${e}`))})}const K=j;exports.InputChip=O;exports.InputChipInput=A;exports.InputChipItems=B;exports.inputChipInputVariants=j;exports.inputChipVariants=K;exports.useInputChipContext=V;
|
package/dist/input-chip.js
CHANGED
package/dist/input-group.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),G=require("@radix-ui/react-slot"),l=require("class-variance-authority"),a=require("@brightlocal/ui-components/lib/utils"),x=require("./input.cjs");function I(t){const n=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(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const u=I(h),c=l.cva("relative flex w-full items-center rounded-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),h=require("react"),G=require("@radix-ui/react-slot"),l=require("class-variance-authority"),a=require("@brightlocal/ui-components/lib/utils"),x=require("./input.cjs");function I(t){const n=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(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const u=I(h),c=l.cva("relative flex w-full items-center rounded-sm border border-input bg-background transition-colors has-[input:focus-visible]:border-ring has-[input:focus-visible]:shadow-default has-[:disabled]:opacity-50",{variants:{size:{default:"h-9",sm:"h-8",lg:"h-10"},error:{true:["border-destructive-40","has-[input:focus-visible]:border-destructive-40 has-[input:focus-visible]:shadow-destructive"],false:""}},defaultVariants:{size:"default",error:!1}}),p=u.forwardRef(({className:t,size:n,error:e,dataHook:r,trackingEl:s,trackingLabel:i,...d},m)=>o.jsx("div",{ref:m,className:a.cn(c({size:n,error:e}),t),"data-hook":r,"data-slot":"input-group","data-tracking-el":s,"data-tracking-label":i,...d}));p.displayName="InputGroup";const f=u.forwardRef(({className:t,...n},e)=>o.jsx(x.Input,{ref:e,className:a.cn("border-0 focus-visible:border-0 focus-visible:shadow-[none]","h-full",t),dataHook:"input-group-input",...n}));f.displayName="InputGroupInput";const w=l.cva("flex shrink-0 items-center text-muted-foreground",{variants:{align:{"inline-start":"","inline-end":"ml-auto","block-start":"self-start","block-end":"self-end"}},defaultVariants:{align:"inline-start"}}),b=u.forwardRef(({className:t,align:n,...e},r)=>o.jsx("div",{ref:r,className:a.cn(w({align:n}),t),"data-slot":"input-group-addon",...e}));b.displayName="InputGroupAddon";const v=l.cva(["inline-flex items-center justify-center gap-2","text-sm font-medium transition-colors","outline-none focus-visible:shadow-default rounded-sm","disabled:pointer-events-none disabled:opacity-50","text-muted-foreground hover:text-foreground","[&_svg]:pointer-events-none [&_svg]:shrink-0"],{variants:{variant:{default:"hover:bg-accent",ghost:""},size:{default:"h-9 px-3",sm:"h-8 px-2",lg:"h-10 px-4",icon:"h-9 w-9","icon-xs":"h-6 w-6","icon-sm":"h-8 w-8","icon-lg":"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),g=u.forwardRef(({className:t,variant:n,size:e,asChild:r=!1,...s},i)=>{const d=r?G.Slot:"button";return o.jsx(d,{ref:i,className:a.cn(v({variant:n,size:e,className:t})),"data-slot":"input-group-button",type:r?void 0:"button",...s})});g.displayName="InputGroupButton";exports.InputGroup=p;exports.InputGroupAddon=b;exports.InputGroupButton=g;exports.InputGroupInput=f;exports.inputGroupButtonVariants=v;exports.inputGroupVariants=c;
|
package/dist/input-group.js
CHANGED
|
@@ -5,7 +5,7 @@ import { cva as d } from "class-variance-authority";
|
|
|
5
5
|
import { cn as s } from "@brightlocal/ui-components/lib/utils";
|
|
6
6
|
import { Input as c } from "./input.js";
|
|
7
7
|
const m = d(
|
|
8
|
-
"relative flex w-full items-center rounded-
|
|
8
|
+
"relative flex w-full items-center rounded-sm border border-input bg-background transition-colors has-[input:focus-visible]:border-ring has-[input:focus-visible]:shadow-default has-[:disabled]:opacity-50",
|
|
9
9
|
{
|
|
10
10
|
variants: {
|
|
11
11
|
size: {
|
package/dist/input-otp.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),l=require("input-otp"),_=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function y(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const i=y(S),g=i.createContext(null);function v(){const t=i.useContext(g);if(!t)throw new Error("InputOTP components must be used within an <InputOTP>");return t}const p=i.forwardRef(({dataHook:t,trackingEl:n,trackingLabel:o,containerClassName:r,error:a,disabled:u,children:s,...c},
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),S=require("react"),l=require("input-otp"),_=require("@brightlocal/icons"),x=require("@brightlocal/ui-components/lib/utils");function y(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const o in t)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(t,o);Object.defineProperty(n,o,r.get?r:{enumerable:!0,get:()=>t[o]})}}return n.default=t,Object.freeze(n)}const i=y(S),g=i.createContext(null);function v(){const t=i.useContext(g);if(!t)throw new Error("InputOTP components must be used within an <InputOTP>");return t}const p=i.forwardRef(({dataHook:t,trackingEl:n,trackingLabel:o,containerClassName:r,error:a,disabled:u,children:s,...c},m)=>{const O=i.useMemo(()=>({error:a,disabled:u}),[a,u]);return e.jsx(g.Provider,{value:O,children:e.jsx(l.OTPInput,{ref:m,"aria-invalid":a?"true":void 0,className:"disabled:cursor-not-allowed",containerClassName:x.cn("group flex items-center gap-2 has-disabled:opacity-50 w-fit",r),"data-hook":t,"data-slot":"input-otp","data-tracking-el":n,"data-tracking-label":o,disabled:u,...c,children:s})})});p.displayName="InputOTP";function f({className:t,...n}){return e.jsx("div",{className:x.cn("flex items-center rounded-md shadow-xs",t),"data-slot":"input-otp-group",...n})}function d({index:t,className:n,...o}){const{error:r}=v(),a=i.useContext(l.OTPInputContext),{char:u,hasFakeCaret:s,isActive:c}=a?.slots[t]??{};return e.jsxs("div",{className:x.cn("relative flex h-9 w-9 items-center justify-center","border-input bg-background border-y border-r","text-foreground text-base font-normal transition-[border-color,box-shadow] outline-none","first:rounded-l-md first:border-l last:rounded-r-md","data-[active=true]:border-ring data-[active=true]:z-10","data-[active=true]:shadow-default",r&&"border-destructive-40",r&&"data-[active=true]:border-destructive-40 data-[active=true]:shadow-destructive","dark:bg-input/30",n),"data-active":c,"data-error":r,"data-slot":"input-otp-slot",...o,children:[u,s&&e.jsx("div",{className:"pointer-events-none absolute inset-0 flex items-center justify-center",children:e.jsx("div",{className:"animate-caret-blink bg-foreground h-4 w-px duration-1000"})})]})}function P({...t}){return e.jsx("div",{"data-slot":"input-otp-separator",role:"separator",...t,children:e.jsx(_.Minus,{})})}const h=i.forwardRef(({maxLength:t=6,...n},o)=>e.jsx(p,{ref:o,inputMode:"numeric",maxLength:t,pasteTransformer:r=>r.replace(/\D+/g,"").slice(0,t),pattern:l.REGEXP_ONLY_DIGITS,...n,children:e.jsx(f,{children:Array.from({length:t},(r,a)=>e.jsx(d,{index:a},a))})}));h.displayName="InputOTPDigitsOnly";const T=i.forwardRef(({maxLength:t=4,...n},o)=>e.jsx(p,{ref:o,containerClassName:"gap-2",maxLength:t,...n,children:Array.from({length:t},(r,a)=>e.jsx(d,{className:"rounded-md border-l shadow-xs",index:a},a))}));T.displayName="InputOTPWithSpacing";const j=i.forwardRef(({maxLength:t=6,...n},o)=>{const r=Math.ceil(t/2),a=t-r;return e.jsxs(p,{ref:o,maxLength:t,...n,children:[e.jsx(f,{children:Array.from({length:r},(u,s)=>e.jsx(d,{index:s},s))}),e.jsx(P,{}),e.jsx(f,{children:Array.from({length:a},(u,s)=>e.jsx(d,{index:s+r},s+r))})]})});j.displayName="InputOTPSimple";const b=i.forwardRef(({maxLength:t=6,...n},o)=>{const a=Math.ceil(t/2);return e.jsx(p,{ref:o,maxLength:t,...n,children:Array.from({length:a},(u,s)=>{const c=s*2,O=Math.min(c+2,t)-c;return e.jsxs(i.Fragment,{children:[s>0&&e.jsx(P,{}),e.jsx(f,{children:Array.from({length:O},(N,I)=>e.jsx(d,{index:c+I},c+I))})]},s)})})});b.displayName="InputOTPWithSeparator";Object.defineProperty(exports,"REGEXP_ONLY_CHARS",{enumerable:!0,get:()=>l.REGEXP_ONLY_CHARS});Object.defineProperty(exports,"REGEXP_ONLY_DIGITS",{enumerable:!0,get:()=>l.REGEXP_ONLY_DIGITS});Object.defineProperty(exports,"REGEXP_ONLY_DIGITS_AND_CHARS",{enumerable:!0,get:()=>l.REGEXP_ONLY_DIGITS_AND_CHARS});exports.InputOTP=p;exports.InputOTPDigitsOnly=h;exports.InputOTPGroup=f;exports.InputOTPSeparator=P;exports.InputOTPSimple=j;exports.InputOTPSlot=d;exports.InputOTPWithSeparator=b;exports.InputOTPWithSpacing=T;
|
package/dist/input-otp.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { jsx as e, jsxs as
|
|
1
|
+
import { jsx as e, jsxs as m } from "react/jsx-runtime";
|
|
2
2
|
import * as s from "react";
|
|
3
3
|
import { OTPInput as T, REGEXP_ONLY_DIGITS as x, OTPInputContext as v } from "input-otp";
|
|
4
4
|
import { REGEXP_ONLY_CHARS as M, REGEXP_ONLY_DIGITS as z, REGEXP_ONLY_DIGITS_AND_CHARS as j } from "input-otp";
|
|
@@ -22,11 +22,11 @@ const l = s.forwardRef(
|
|
|
22
22
|
children: a,
|
|
23
23
|
...u
|
|
24
24
|
}, I) => {
|
|
25
|
-
const
|
|
25
|
+
const f = s.useMemo(
|
|
26
26
|
() => ({ error: n, disabled: d }),
|
|
27
27
|
[n, d]
|
|
28
28
|
);
|
|
29
|
-
return /* @__PURE__ */ e(g.Provider, { value:
|
|
29
|
+
return /* @__PURE__ */ e(g.Provider, { value: f, children: /* @__PURE__ */ e(
|
|
30
30
|
T,
|
|
31
31
|
{
|
|
32
32
|
ref: I,
|
|
@@ -62,14 +62,14 @@ function c({ index: t, className: o, ...i }) {
|
|
|
62
62
|
const { error: r } = N(), n = s.useContext(
|
|
63
63
|
v
|
|
64
64
|
), { char: d, hasFakeCaret: a, isActive: u } = n?.slots[t] ?? {};
|
|
65
|
-
return /* @__PURE__ */
|
|
65
|
+
return /* @__PURE__ */ m(
|
|
66
66
|
"div",
|
|
67
67
|
{
|
|
68
68
|
className: h(
|
|
69
69
|
// Base styles
|
|
70
70
|
"relative flex h-9 w-9 items-center justify-center",
|
|
71
71
|
"border-input bg-background border-y border-r",
|
|
72
|
-
"text-foreground text-
|
|
72
|
+
"text-foreground text-base font-normal transition-[border-color,box-shadow] outline-none",
|
|
73
73
|
"first:rounded-l-md first:border-l last:rounded-r-md",
|
|
74
74
|
// Focus state
|
|
75
75
|
"data-[active=true]:border-ring data-[active=true]:z-10",
|
|
@@ -129,7 +129,7 @@ y.displayName = "InputOTPWithSpacing";
|
|
|
129
129
|
const S = s.forwardRef(
|
|
130
130
|
({ maxLength: t = 6, ...o }, i) => {
|
|
131
131
|
const r = Math.ceil(t / 2), n = t - r;
|
|
132
|
-
return /* @__PURE__ */
|
|
132
|
+
return /* @__PURE__ */ m(l, { ref: i, maxLength: t, ...o, children: [
|
|
133
133
|
/* @__PURE__ */ e(p, { children: Array.from({ length: r }, (d, a) => /* @__PURE__ */ e(c, { index: a }, a)) }),
|
|
134
134
|
/* @__PURE__ */ e(P, {}),
|
|
135
135
|
/* @__PURE__ */ e(p, { children: Array.from({ length: n }, (d, a) => /* @__PURE__ */ e(
|
|
@@ -146,10 +146,10 @@ S.displayName = "InputOTPSimple";
|
|
|
146
146
|
const _ = s.forwardRef(({ maxLength: t = 6, ...o }, i) => {
|
|
147
147
|
const n = Math.ceil(t / 2);
|
|
148
148
|
return /* @__PURE__ */ e(l, { ref: i, maxLength: t, ...o, children: Array.from({ length: n }, (d, a) => {
|
|
149
|
-
const u = a * 2,
|
|
150
|
-
return /* @__PURE__ */
|
|
149
|
+
const u = a * 2, f = Math.min(u + 2, t) - u;
|
|
150
|
+
return /* @__PURE__ */ m(s.Fragment, { children: [
|
|
151
151
|
a > 0 && /* @__PURE__ */ e(P, {}),
|
|
152
|
-
/* @__PURE__ */ e(p, { children: Array.from({ length:
|
|
152
|
+
/* @__PURE__ */ e(p, { children: Array.from({ length: f }, (C, O) => /* @__PURE__ */ e(c, { index: u + O }, u + O)) })
|
|
153
153
|
] }, a);
|
|
154
154
|
}) });
|
|
155
155
|
});
|
package/dist/input.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color]","text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),b=require("react"),p=require("class-variance-authority"),v=require("@brightlocal/ui-components/lib/utils");function g(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const h=g(b),n=p.cva(["flex w-full min-w-0 h-9","border border-input bg-background rounded-sm","outline-none transition-[border-color,box-shadow,background-color]","text-base font-sans","text-foreground","overflow-hidden text-ellipsis","focus-visible:outline-none focus-visible:border-ring focus-visible:bg-background","focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-muted-foreground","placeholder:overflow-hidden placeholder:text-ellipsis","items-center px-3","[&::-webkit-calendar-picker-indicator]:hidden"],{variants:{hasIcon:{true:"pl-9",false:""},hasSecondaryIcon:{true:"pr-9",false:""}},defaultVariants:{hasIcon:!1,hasSecondaryIcon:!1}}),s=h.forwardRef(({className:e,hasIcon:r=!1,hasSecondaryIcon:t=!1,dataHook:a,error:l,trackingEl:c,trackingLabel:d,...o},u)=>{const i=l||o["aria-invalid"]===!0||o["aria-invalid"]==="true";return f.jsx("input",{ref:u,"aria-invalid":i?"true":void 0,className:v.cn(n({hasIcon:r,hasSecondaryIcon:t}),i&&"border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",e),"data-hook":a,"data-slot":"input","data-tracking-el":c,"data-tracking-label":d,...o})});s.displayName="Input";exports.Input=s;exports.inputVariants=n;
|
package/dist/input.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,aAAa;;;
|
|
1
|
+
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../src/components/input.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAGlE;;;GAGG;AACH,eAAO,MAAM,aAAa;;;8EAuCzB,CAAC;AAEF;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,WAAW,UACf,SACE,IAAI,CAAC,KAAK,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,MAAM,CAAC,EACzD,YAAY,CAAC,OAAO,aAAa,CAAC;IACpC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,KAAK,qFAsCjB,CAAC"}
|
package/dist/input.js
CHANGED
|
@@ -10,7 +10,7 @@ const p = f(
|
|
|
10
10
|
"border border-input bg-background rounded-sm",
|
|
11
11
|
"outline-none transition-[border-color,box-shadow,background-color]",
|
|
12
12
|
// Typography
|
|
13
|
-
"text-
|
|
13
|
+
"text-base font-sans",
|
|
14
14
|
"text-foreground",
|
|
15
15
|
"overflow-hidden text-ellipsis",
|
|
16
16
|
// States - Focus
|
|
@@ -21,8 +21,7 @@ const p = f(
|
|
|
21
21
|
// Pseudo-elements
|
|
22
22
|
"placeholder:text-muted-foreground",
|
|
23
23
|
"placeholder:overflow-hidden placeholder:text-ellipsis",
|
|
24
|
-
|
|
25
|
-
"items-center px-3 pb-[1px] leading-5",
|
|
24
|
+
"items-center px-3",
|
|
26
25
|
// Hide default browser icons for date/time inputs
|
|
27
26
|
"[&::-webkit-calendar-picker-indicator]:hidden"
|
|
28
27
|
],
|
|
@@ -46,8 +45,8 @@ const p = f(
|
|
|
46
45
|
({
|
|
47
46
|
className: o,
|
|
48
47
|
hasIcon: r = !1,
|
|
49
|
-
hasSecondaryIcon:
|
|
50
|
-
dataHook:
|
|
48
|
+
hasSecondaryIcon: t = !1,
|
|
49
|
+
dataHook: i,
|
|
51
50
|
error: s,
|
|
52
51
|
trackingEl: d,
|
|
53
52
|
trackingLabel: n,
|
|
@@ -60,11 +59,11 @@ const p = f(
|
|
|
60
59
|
ref: l,
|
|
61
60
|
"aria-invalid": a ? "true" : void 0,
|
|
62
61
|
className: b(
|
|
63
|
-
p({ hasIcon: r, hasSecondaryIcon:
|
|
62
|
+
p({ hasIcon: r, hasSecondaryIcon: t }),
|
|
64
63
|
a && "border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",
|
|
65
64
|
o
|
|
66
65
|
),
|
|
67
|
-
"data-hook":
|
|
66
|
+
"data-hook": i,
|
|
68
67
|
"data-slot": "input",
|
|
69
68
|
"data-tracking-el": d,
|
|
70
69
|
"data-tracking-label": n,
|
package/dist/sheet.d.ts
CHANGED
|
@@ -10,7 +10,7 @@ import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
|
10
10
|
*/
|
|
11
11
|
export type SheetSide = "top" | "right" | "bottom" | "left";
|
|
12
12
|
declare const sheetContentVariants: (props?: ({
|
|
13
|
-
side?: "left" | "right" | "
|
|
13
|
+
side?: "left" | "right" | "top" | "bottom" | null | undefined;
|
|
14
14
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
15
15
|
/**
|
|
16
16
|
* Sheet root component that provides context for the sheet dialog.
|
package/dist/split-layout.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"),h=require("react"),r=require("@brightlocal/ui-components/lib/utils");function S(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const l=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(a,e,l.get?l:{enumerable:!0,get:()=>t[e]})}}return a.default=t,Object.freeze(a)}const i=S(h),y=i.forwardRef(({className:t,dataHook:a,trackingEl:e,trackingLabel:l,left:s,right:n,children:u,...c},d)=>o.jsxs("div",{ref:d,className:r.cn("group/split-layout bg-background grid min-h-screen w-full grid-cols-1 grid-rows-[auto_1fr] lg:has-[[data-slot=split-layout-right]]:grid-cols-2",t),"data-hook":a,"data-slot":"split-layout","data-tracking-el":e||"split-layout","data-tracking-label":l,...c,children:[u,s&&o.jsx(p,{children:s}),n&&o.jsx(f,{children:n})]}));y.displayName="SplitLayout";const g=i.forwardRef(({className:t,children:a,...e},l)=>o.jsx("div",{ref:l,className:r.cn("px-section-sm pt-section-sm col-start-1 row-start-1 flex w-full items-center justify-center lg:justify-start",t),"data-slot":"split-layout-header",...e,children:a}));g.displayName="SplitLayoutHeader";const p=i.forwardRef(({className:t,children:a,...e},l)=>o.jsx("div",{ref:l,className:r.cn("p-section-sm col-start-1 row-start-2 flex min-h-0 items-center justify-center overflow-auto","group-has-[[data-slot=split-layout-header]]/split-layout:pt-2",t),"data-slot":"split-layout-left",...e,children:a}));p.displayName="SplitLayoutContentLeft";const f=i.forwardRef(({className:t,flush:a=!1,children:e,...l},s)=>o.jsx("div",{ref:s,className:r.cn("bg-card hidden lg:col-start-2 lg:row-span-full lg:row-start-1",a?"relative overflow-hidden lg:block":"p-section-sm min-h-0 items-center justify-center overflow-auto lg:flex",t),"data-slot":"split-layout-right",...l,children:e}));f.displayName="SplitLayoutContentRight";const m=i.forwardRef(({className:t,dataHook:a,src:e,alt:l,objectFit:s="cover",objectPosition:n="center",style:u,...c},d)=>o.jsx("img",{ref:d,alt:l,className:r.cn("absolute inset-0 h-full w-full",t),"data-hook":a,"data-slot":"split-layout-image",src:e,style:{objectFit:s,objectPosition:n,...u},...c}));m.displayName="SplitLayoutImage";exports.SplitLayout=y;exports.SplitLayoutContentLeft=p;exports.SplitLayoutContentRight=f;exports.SplitLayoutHeader=g;exports.SplitLayoutImage=m;
|
package/dist/split-layout.d.ts
CHANGED
|
@@ -24,8 +24,10 @@ interface SplitLayoutProps extends React.ComponentProps<"div"> {
|
|
|
24
24
|
* and shows only the left section on smaller screens (hiding the right/marketing section).
|
|
25
25
|
* This pattern is commonly used for authentication pages where the form is prioritized on mobile.
|
|
26
26
|
*
|
|
27
|
-
* Uses
|
|
28
|
-
*
|
|
27
|
+
* Uses CSS Grid for slot positioning — sub-components self-place into the correct
|
|
28
|
+
* grid area via their own classes, so SplitLayout renders {children} without
|
|
29
|
+
* inspecting them. This enables composition through any wrapping: Fragments,
|
|
30
|
+
* router Outlets, memoized components, or conditional renders.
|
|
29
31
|
*
|
|
30
32
|
* @example
|
|
31
33
|
* // Basic usage
|
|
@@ -52,6 +54,15 @@ interface SplitLayoutProps extends React.ComponentProps<"div"> {
|
|
|
52
54
|
* </SplitLayoutContentRight>
|
|
53
55
|
* </SplitLayout>
|
|
54
56
|
*
|
|
57
|
+
* @example
|
|
58
|
+
* // With router Outlet — slots project up through any wrapping
|
|
59
|
+
* <SplitLayout dataHook="auth-layout">
|
|
60
|
+
* <SplitLayoutHeader>
|
|
61
|
+
* <Header dataHook="my-header"><Logo dataHook="my-logo" /></Header>
|
|
62
|
+
* </SplitLayoutHeader>
|
|
63
|
+
* <Outlet />
|
|
64
|
+
* </SplitLayout>
|
|
65
|
+
*
|
|
55
66
|
* Layout specifications:
|
|
56
67
|
* - Mobile/Tablet: Stacked layout, only left section visible, content centered
|
|
57
68
|
* - Desktop (≥1024px): Side-by-side, content centered within each section
|
|
@@ -70,6 +81,7 @@ interface SplitLayoutHeaderProps extends React.ComponentProps<"div"> {
|
|
|
70
81
|
* SplitLayoutHeader component for rendering header content at the top of SplitLayout.
|
|
71
82
|
* Content is centered on mobile/tablet, left-aligned from lg breakpoint onwards.
|
|
72
83
|
* Uses section padding tokens for responsive horizontal and vertical padding (16px mobile, 24px desktop).
|
|
84
|
+
* Self-positions in the first column, first row of the grid.
|
|
73
85
|
*/
|
|
74
86
|
declare const SplitLayoutHeader: React.ForwardRefExoticComponent<Omit<SplitLayoutHeaderProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
75
87
|
interface SplitLayoutContentLeftProps extends React.ComponentProps<"div"> {
|
|
@@ -79,7 +91,8 @@ interface SplitLayoutContentLeftProps extends React.ComponentProps<"div"> {
|
|
|
79
91
|
* SplitLayoutContentLeft - Left/primary section within a SplitLayout.
|
|
80
92
|
*
|
|
81
93
|
* Always visible. When a SplitLayoutHeader is present, top padding is
|
|
82
|
-
* automatically reduced to avoid excessive spacing below the header.
|
|
94
|
+
* automatically reduced via CSS :has() to avoid excessive spacing below the header.
|
|
95
|
+
* Self-positions in the first column, second row of the grid.
|
|
83
96
|
*/
|
|
84
97
|
declare const SplitLayoutContentLeft: React.ForwardRefExoticComponent<Omit<SplitLayoutContentLeftProps, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
85
98
|
interface SplitLayoutContentRightProps extends React.ComponentProps<"div"> {
|
|
@@ -96,6 +109,7 @@ interface SplitLayoutContentRightProps extends React.ComponentProps<"div"> {
|
|
|
96
109
|
*
|
|
97
110
|
* Hidden on mobile/tablet (<1024px), visible on desktop (≥1024px).
|
|
98
111
|
* Uses bg-card background color.
|
|
112
|
+
* Self-positions in the second column, spanning all rows of the grid.
|
|
99
113
|
*
|
|
100
114
|
* Set `flush` to remove padding for full-bleed content (e.g. images).
|
|
101
115
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../src/components/split-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"split-layout.d.ts","sourceRoot":"","sources":["../../src/components/split-layout.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,UAAU,gBAAiB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAC5D,iDAAiD;IACjD,QAAQ,EAAE,MAAM,CAAC;IACjB,gDAAgD;IAChD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,2CAA2C;IAC3C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;OAGG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACvB;;;OAGG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoDG;AACH,QAAA,MAAM,WAAW,sGAiChB,CAAC;AAQF,UAAU,sBAAuB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IAClE;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;GAKG;AACH,QAAA,MAAM,iBAAiB,4GAiBrB,CAAC;AAQH,UAAU,2BAA4B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,QAAA,MAAM,sBAAsB,iHAkB1B,CAAC;AAQH,UAAU,4BAA6B,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACxE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;;;OAIG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,uBAAuB,kHAoB3B,CAAC;AAQH,UAAU,qBAAsB,SAAQ,KAAK,CAAC,cAAc,CAAC,KAAK,CAAC;IACjE;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;OAEG;IACH,GAAG,EAAE,MAAM,CAAC;IACZ;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IAChC;;;;OAIG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,QAAA,MAAM,gBAAgB,6GA8BrB,CAAC;AAQF,OAAO,EACL,WAAW,EACX,iBAAiB,EACjB,sBAAsB,EACtB,uBAAuB,EACvB,gBAAgB,EAChB,KAAK,gBAAgB,EACrB,KAAK,sBAAsB,EAC3B,KAAK,2BAA2B,EAChC,KAAK,4BAA4B,EACjC,KAAK,qBAAqB,GAC3B,CAAC"}
|
package/dist/split-layout.js
CHANGED
|
@@ -1,139 +1,111 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import * as
|
|
3
|
-
import { cn as
|
|
4
|
-
const
|
|
1
|
+
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import * as r from "react";
|
|
3
|
+
import { cn as i } from "@brightlocal/ui-components/lib/utils";
|
|
4
|
+
const y = r.forwardRef(
|
|
5
5
|
({
|
|
6
|
-
className:
|
|
7
|
-
dataHook:
|
|
8
|
-
trackingEl:
|
|
9
|
-
trackingLabel:
|
|
10
|
-
left:
|
|
11
|
-
right:
|
|
6
|
+
className: t,
|
|
7
|
+
dataHook: a,
|
|
8
|
+
trackingEl: l,
|
|
9
|
+
trackingLabel: e,
|
|
10
|
+
left: o,
|
|
11
|
+
right: n,
|
|
12
12
|
children: d,
|
|
13
|
-
...
|
|
14
|
-
},
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
"flex min-h-screen w-full flex-col lg:flex-row",
|
|
35
|
-
e
|
|
36
|
-
),
|
|
37
|
-
"data-hook": l,
|
|
38
|
-
"data-slot": "split-layout",
|
|
39
|
-
"data-tracking-el": a || "split-layout",
|
|
40
|
-
"data-tracking-label": o,
|
|
41
|
-
...f,
|
|
42
|
-
children: [
|
|
43
|
-
/* @__PURE__ */ n(
|
|
44
|
-
"div",
|
|
45
|
-
{
|
|
46
|
-
className: "bg-background flex flex-1 flex-col",
|
|
47
|
-
"data-slot": "split-layout-body",
|
|
48
|
-
children: /* @__PURE__ */ C(L.Provider, { value: R, children: [
|
|
49
|
-
p,
|
|
50
|
-
x ? s && /* @__PURE__ */ n(v, { children: s }) : y
|
|
51
|
-
] })
|
|
52
|
-
}
|
|
53
|
-
),
|
|
54
|
-
x ? i && /* @__PURE__ */ n(h, { children: i }) : m
|
|
55
|
-
]
|
|
56
|
-
}
|
|
57
|
-
);
|
|
58
|
-
}
|
|
13
|
+
...u
|
|
14
|
+
}, c) => /* @__PURE__ */ m(
|
|
15
|
+
"div",
|
|
16
|
+
{
|
|
17
|
+
ref: c,
|
|
18
|
+
className: i(
|
|
19
|
+
"group/split-layout bg-background grid min-h-screen w-full grid-cols-1 grid-rows-[auto_1fr] lg:has-[[data-slot=split-layout-right]]:grid-cols-2",
|
|
20
|
+
t
|
|
21
|
+
),
|
|
22
|
+
"data-hook": a,
|
|
23
|
+
"data-slot": "split-layout",
|
|
24
|
+
"data-tracking-el": l || "split-layout",
|
|
25
|
+
"data-tracking-label": e,
|
|
26
|
+
...u,
|
|
27
|
+
children: [
|
|
28
|
+
d,
|
|
29
|
+
o && /* @__PURE__ */ s(p, { children: o }),
|
|
30
|
+
n && /* @__PURE__ */ s(f, { children: n })
|
|
31
|
+
]
|
|
32
|
+
}
|
|
33
|
+
)
|
|
59
34
|
);
|
|
60
|
-
|
|
61
|
-
const
|
|
35
|
+
y.displayName = "SplitLayout";
|
|
36
|
+
const g = r.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__ */ s(
|
|
62
37
|
"div",
|
|
63
38
|
{
|
|
64
|
-
ref:
|
|
65
|
-
className:
|
|
66
|
-
"px-section-sm pt-section-sm flex w-full items-center justify-center lg:justify-start",
|
|
67
|
-
|
|
39
|
+
ref: e,
|
|
40
|
+
className: i(
|
|
41
|
+
"px-section-sm pt-section-sm col-start-1 row-start-1 flex w-full items-center justify-center lg:justify-start",
|
|
42
|
+
t
|
|
68
43
|
),
|
|
69
44
|
"data-slot": "split-layout-header",
|
|
70
|
-
...
|
|
71
|
-
children:
|
|
45
|
+
...l,
|
|
46
|
+
children: a
|
|
72
47
|
}
|
|
73
48
|
));
|
|
74
|
-
|
|
75
|
-
const
|
|
76
|
-
const s = t.useContext(L);
|
|
77
|
-
return /* @__PURE__ */ n(
|
|
78
|
-
"div",
|
|
79
|
-
{
|
|
80
|
-
ref: o,
|
|
81
|
-
className: c(
|
|
82
|
-
"p-section-sm flex flex-1 items-center justify-center overflow-auto",
|
|
83
|
-
s && "pt-2",
|
|
84
|
-
e
|
|
85
|
-
),
|
|
86
|
-
"data-slot": "split-layout-left",
|
|
87
|
-
...a,
|
|
88
|
-
children: l
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
});
|
|
92
|
-
v.displayName = "SplitLayoutContentLeft";
|
|
93
|
-
const h = t.forwardRef(({ className: e, flush: l = !1, children: a, ...o }, s) => /* @__PURE__ */ n(
|
|
49
|
+
g.displayName = "SplitLayoutHeader";
|
|
50
|
+
const p = r.forwardRef(({ className: t, children: a, ...l }, e) => /* @__PURE__ */ s(
|
|
94
51
|
"div",
|
|
95
52
|
{
|
|
96
|
-
ref:
|
|
97
|
-
className:
|
|
98
|
-
"
|
|
99
|
-
|
|
100
|
-
|
|
53
|
+
ref: e,
|
|
54
|
+
className: i(
|
|
55
|
+
"p-section-sm col-start-1 row-start-2 flex min-h-0 items-center justify-center overflow-auto",
|
|
56
|
+
"group-has-[[data-slot=split-layout-header]]/split-layout:pt-2",
|
|
57
|
+
t
|
|
101
58
|
),
|
|
102
|
-
"data-slot": "split-layout-
|
|
103
|
-
...
|
|
59
|
+
"data-slot": "split-layout-left",
|
|
60
|
+
...l,
|
|
104
61
|
children: a
|
|
105
62
|
}
|
|
106
63
|
));
|
|
107
|
-
|
|
108
|
-
const
|
|
64
|
+
p.displayName = "SplitLayoutContentLeft";
|
|
65
|
+
const f = r.forwardRef(({ className: t, flush: a = !1, children: l, ...e }, o) => /* @__PURE__ */ s(
|
|
66
|
+
"div",
|
|
67
|
+
{
|
|
68
|
+
ref: o,
|
|
69
|
+
className: i(
|
|
70
|
+
"bg-card hidden lg:col-start-2 lg:row-span-full lg:row-start-1",
|
|
71
|
+
a ? "relative overflow-hidden lg:block" : "p-section-sm min-h-0 items-center justify-center overflow-auto lg:flex",
|
|
72
|
+
t
|
|
73
|
+
),
|
|
74
|
+
"data-slot": "split-layout-right",
|
|
75
|
+
...e,
|
|
76
|
+
children: l
|
|
77
|
+
}
|
|
78
|
+
));
|
|
79
|
+
f.displayName = "SplitLayoutContentRight";
|
|
80
|
+
const h = r.forwardRef(
|
|
109
81
|
({
|
|
110
|
-
className:
|
|
111
|
-
dataHook:
|
|
112
|
-
src:
|
|
113
|
-
alt:
|
|
114
|
-
objectFit:
|
|
115
|
-
objectPosition:
|
|
82
|
+
className: t,
|
|
83
|
+
dataHook: a,
|
|
84
|
+
src: l,
|
|
85
|
+
alt: e,
|
|
86
|
+
objectFit: o = "cover",
|
|
87
|
+
objectPosition: n = "center",
|
|
116
88
|
style: d,
|
|
117
|
-
...
|
|
118
|
-
},
|
|
89
|
+
...u
|
|
90
|
+
}, c) => /* @__PURE__ */ s(
|
|
119
91
|
"img",
|
|
120
92
|
{
|
|
121
|
-
ref:
|
|
122
|
-
alt:
|
|
123
|
-
className:
|
|
124
|
-
"data-hook":
|
|
93
|
+
ref: c,
|
|
94
|
+
alt: e,
|
|
95
|
+
className: i("absolute inset-0 h-full w-full", t),
|
|
96
|
+
"data-hook": a,
|
|
125
97
|
"data-slot": "split-layout-image",
|
|
126
|
-
src:
|
|
127
|
-
style: { objectFit:
|
|
128
|
-
...
|
|
98
|
+
src: l,
|
|
99
|
+
style: { objectFit: o, objectPosition: n, ...d },
|
|
100
|
+
...u
|
|
129
101
|
}
|
|
130
102
|
)
|
|
131
103
|
);
|
|
132
|
-
|
|
104
|
+
h.displayName = "SplitLayoutImage";
|
|
133
105
|
export {
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
106
|
+
y as SplitLayout,
|
|
107
|
+
p as SplitLayoutContentLeft,
|
|
108
|
+
f as SplitLayoutContentRight,
|
|
109
|
+
g as SplitLayoutHeader,
|
|
110
|
+
h as SplitLayoutImage
|
|
139
111
|
};
|
package/dist/textarea.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),u=require("react"),l=require("class-variance-authority"),b=require("@brightlocal/ui-components/lib/utils");function f(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const g=f(u),v=l.cva(["flex w-full","border border-input bg-background rounded-md","outline-none transition-[border-color,background-color,box-shadow]","text-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),u=require("react"),l=require("class-variance-authority"),b=require("@brightlocal/ui-components/lib/utils");function f(e){const r=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(r,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return r.default=e,Object.freeze(r)}const g=f(u),v=l.cva(["flex w-full","border border-input bg-background rounded-md","outline-none transition-[border-color,background-color,box-shadow]","text-base leading-normal font-sans","text-foreground","px-3 py-2","focus-visible:outline-none focus-visible:border-ring focus-visible:bg-background","focus-visible:shadow-default","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-muted-foreground"]),n=g.forwardRef(({className:e,dataHook:r,error:t,trackingEl:a,trackingLabel:s,...o},c)=>{const i=t||o["aria-invalid"]===!0||o["aria-invalid"]==="true";return d.jsx("textarea",{ref:c,"aria-invalid":i?"true":void 0,className:b.cn(v(),i&&"border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",e),"data-hook":r,"data-slot":"textarea","data-tracking-el":a,"data-tracking-label":s,...o})});n.displayName="Textarea";exports.Textarea=n;
|
package/dist/textarea.js
CHANGED
|
@@ -9,7 +9,7 @@ const b = c([
|
|
|
9
9
|
"border border-input bg-background rounded-md",
|
|
10
10
|
"outline-none transition-[border-color,background-color,box-shadow]",
|
|
11
11
|
// Typography
|
|
12
|
-
"text-
|
|
12
|
+
"text-base leading-normal font-sans",
|
|
13
13
|
"text-foreground",
|
|
14
14
|
// Spacing
|
|
15
15
|
"px-3 py-2",
|
|
@@ -21,23 +21,23 @@ const b = c([
|
|
|
21
21
|
// Pseudo-elements
|
|
22
22
|
"placeholder:text-muted-foreground"
|
|
23
23
|
]), f = l.forwardRef(
|
|
24
|
-
({ className: a, dataHook: o, error: t, trackingEl: i, trackingLabel: d, ...
|
|
25
|
-
const
|
|
24
|
+
({ className: a, dataHook: o, error: t, trackingEl: i, trackingLabel: d, ...e }, s) => {
|
|
25
|
+
const r = t || e["aria-invalid"] === !0 || e["aria-invalid"] === "true";
|
|
26
26
|
return /* @__PURE__ */ n(
|
|
27
27
|
"textarea",
|
|
28
28
|
{
|
|
29
29
|
ref: s,
|
|
30
|
-
"aria-invalid":
|
|
30
|
+
"aria-invalid": r ? "true" : void 0,
|
|
31
31
|
className: u(
|
|
32
32
|
b(),
|
|
33
|
-
|
|
33
|
+
r && "border-destructive-40 focus-visible:border-destructive-40 focus-visible:shadow-destructive",
|
|
34
34
|
a
|
|
35
35
|
),
|
|
36
36
|
"data-hook": o,
|
|
37
37
|
"data-slot": "textarea",
|
|
38
38
|
"data-tracking-el": i,
|
|
39
39
|
"data-tracking-label": d,
|
|
40
|
-
...
|
|
40
|
+
...e
|
|
41
41
|
}
|
|
42
42
|
);
|
|
43
43
|
}
|