@brightlocal/ui-components 2.11.0 → 2.13.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/component-meta.json +474 -27
- package/dist/blocks/data-table.cjs +1 -1
- package/dist/blocks/data-table.d.ts +16 -4
- package/dist/blocks/data-table.d.ts.map +1 -1
- package/dist/blocks/data-table.js +57 -53
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts +7 -1
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +82 -81
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.d.ts +221 -11
- package/dist/blocks/sidebar.d.ts.map +1 -1
- package/dist/blocks/sidebar.js +687 -406
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.d.ts +14 -2
- package/dist/breadcrumb.d.ts.map +1 -1
- package/dist/breadcrumb.js +37 -37
- package/dist/callout.cjs +1 -1
- package/dist/callout.d.ts +3 -3
- package/dist/callout.d.ts.map +1 -1
- package/dist/callout.js +2 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.d.ts +24 -3
- package/dist/carousel.d.ts.map +1 -1
- package/dist/carousel.js +121 -117
- package/dist/chip.cjs +1 -1
- package/dist/chip.d.ts +11 -0
- package/dist/chip.d.ts.map +1 -1
- package/dist/chip.js +43 -38
- package/dist/combobox.cjs +3 -3
- package/dist/combobox.d.ts +20 -2
- package/dist/combobox.d.ts.map +1 -1
- package/dist/combobox.js +244 -238
- package/dist/command.cjs +1 -1
- package/dist/command.d.ts +5 -0
- package/dist/command.d.ts.map +1 -1
- package/dist/command.js +207 -206
- package/dist/date-picker.cjs +1 -1
- package/dist/date-picker.d.ts +10 -0
- package/dist/date-picker.d.ts.map +1 -1
- package/dist/date-picker.js +96 -96
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.d.ts +7 -2
- package/dist/dialog.d.ts.map +1 -1
- package/dist/dialog.js +38 -30
- package/dist/drawer.d.ts +2 -2
- package/dist/dropdown-menu.cjs +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/global-layout.cjs +1 -1
- package/dist/global-layout.d.ts +5 -0
- package/dist/global-layout.d.ts.map +1 -1
- package/dist/global-layout.js +15 -7
- package/dist/index.cjs +1 -1
- package/dist/index.js +313 -305
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.d.ts +7 -1
- package/dist/input-chip.d.ts.map +1 -1
- package/dist/input-chip.js +131 -130
- package/dist/input-group.d.ts +1 -1
- package/dist/input-password.cjs +1 -1
- package/dist/input-password.d.ts +10 -0
- package/dist/input-password.d.ts.map +1 -1
- package/dist/input-password.js +108 -106
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +36 -37
- package/dist/list.cjs +1 -1
- package/dist/list.d.ts +25 -4
- package/dist/list.d.ts.map +1 -1
- package/dist/list.js +71 -53
- package/dist/logo.cjs +1 -1
- package/dist/logo.d.ts +6 -1
- package/dist/logo.d.ts.map +1 -1
- package/dist/logo.js +25 -22
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts +17 -2
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +32 -26
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.d.ts +29 -3
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +26 -25
- package/dist/popover.cjs +1 -1
- package/dist/popover.js +7 -7
- package/dist/rating.cjs +1 -1
- package/dist/rating.d.ts +6 -0
- package/dist/rating.d.ts.map +1 -1
- package/dist/rating.js +28 -20
- package/dist/resizable.d.ts +1 -1
- package/dist/select.cjs +2 -2
- package/dist/select.d.ts +17 -3
- package/dist/select.d.ts.map +1 -1
- package/dist/select.js +65 -58
- package/dist/separator.cjs +1 -1
- package/dist/separator.d.ts +16 -4
- package/dist/separator.d.ts.map +1 -1
- package/dist/separator.js +38 -35
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts +6 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +42 -41
- package/dist/skeleton.cjs +1 -1
- package/dist/skeleton.d.ts +5 -0
- package/dist/skeleton.d.ts.map +1 -1
- package/dist/skeleton.js +13 -11
- package/dist/table.cjs +1 -1
- package/dist/table.d.ts +14 -0
- package/dist/table.d.ts.map +1 -1
- package/dist/table.js +57 -39
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.d.ts +25 -9
- package/dist/tabs.d.ts.map +1 -1
- package/dist/tabs.js +128 -113
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts +5 -0
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +111 -110
- package/dist/typography.cjs +1 -1
- package/dist/typography.d.ts +1 -2
- package/dist/typography.d.ts.map +1 -1
- package/dist/typography.js +49 -50
- package/package.json +2 -3
- package/src/blocks/data-table.tsx +26 -9
- package/src/blocks/input-list.tsx +12 -1
- package/src/blocks/sidebar.tsx +638 -29
- package/src/components/breadcrumb.tsx +43 -26
- package/src/components/callout.tsx +5 -4
- package/src/components/carousel.tsx +33 -4
- package/src/components/chip.tsx +22 -2
- package/src/components/combobox.tsx +28 -3
- package/src/components/command.tsx +7 -1
- package/src/components/date-picker.tsx +17 -3
- package/src/components/dialog.tsx +17 -4
- package/src/components/drawer.tsx +2 -2
- package/src/components/dropdown-menu.tsx +1 -1
- package/src/components/global-layout.tsx +15 -2
- package/src/components/input-chip.tsx +12 -1
- package/src/components/input-password.tsx +73 -49
- package/src/components/link.tsx +29 -17
- package/src/components/list.tsx +45 -2
- package/src/components/logo.tsx +10 -2
- package/src/components/map.tsx +23 -0
- package/src/components/pagination.tsx +44 -11
- package/src/components/popover.tsx +1 -1
- package/src/components/rating.tsx +21 -3
- package/src/components/select.tsx +33 -3
- package/src/components/separator.tsx +40 -25
- package/src/components/sheet.tsx +28 -20
- package/src/components/skeleton.tsx +13 -2
- package/src/components/table.tsx +39 -2
- package/src/components/tabs.tsx +195 -146
- package/src/components/text-reveal-motion.tsx +7 -1
- package/src/components/typography.tsx +6 -7
package/dist/input-chip.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 m=require("react/jsx-runtime"),$=require("react"),B=require("class-variance-authority"),j=require("@brightlocal/ui-components/lib/utils"),K=require("@brightlocal/ui-components/chip");function T(r){const f=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const o in r)if(o!=="default"){const s=Object.getOwnPropertyDescriptor(r,o);Object.defineProperty(f,o,s.get?s:{enumerable:!0,get:()=>r[o]})}}return f.default=r,Object.freeze(f)}const n=T($),F=n.createContext(null),O=n.createContext(null),P=n.createContext(null);function E(){const r=n.useContext(F);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function S(){const r=n.useContext(O);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function q(){const r=n.useContext(P);if(!r)throw new Error("InputChip components must be used within an <InputChip>");return r}function _(){const r=E(),{value:f,disabled:o}=S(),{inputValue:s,focusedChipIndex:l}=q();return{...r,value:f,disabled:o,inputValue:s,focusedChipIndex:l}}function L({value:r,defaultValue:f=[],onValueChange:o,disabled:s=!1,allowDuplicates:l=!1,children:c}){const[h,a]=n.useState(f),[g,i]=n.useState(""),[b,w]=n.useState(-1),y=n.useRef(null),t=n.useRef([]),e=r!==void 0,u=e?r:h,d=n.useRef(u),I=n.useRef(o),R=n.useRef(s);n.useLayoutEffect(()=>{d.current=u,I.current=o,R.current=s}),n.useEffect(()=>{t.current.length>u.length&&(t.current.length=u.length),b>=u.length&&w(-1)},[u.length,b]);const p=n.useCallback(x=>{e||a(x),I.current?.(x)},[e]),k=n.useCallback(x=>{if(R.current)return;const V=x.trim();V&&(l||!d.current.includes(V))&&(p([...d.current,V]),i(""))},[l,p]),D=n.useCallback(x=>{R.current||p(d.current.filter((V,N)=>N!==x))},[p]),C=n.useMemo(()=>({onValueChange:p,setInputValue:i,addItem:k,removeItem:D,inputRef:y,setFocusedChipIndex:w,chipRefs:t}),[p,k,D]),v=n.useMemo(()=>({value:u,disabled:s}),[u,s]),M=n.useMemo(()=>({inputValue:g,focusedChipIndex:b}),[g,b]);return m.jsx(F.Provider,{value:C,children:m.jsx(O.Provider,{value:v,children:m.jsx(P.Provider,{value:M,children:c})})})}const H=B.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}}),W=["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=n.forwardRef(({className:r,error:f=!1,dataHook:o,trackingEl:s,trackingLabel:l,placeholder:c,inputId:h,"aria-label":a,"aria-labelledby":g,children:i,...b},w)=>{const{setInputValue:y,addItem:t,inputRef:e,setFocusedChipIndex:u,chipRefs:d}=E(),{value:I,disabled:R}=S(),{inputValue:p}=q(),k=C=>{y(C.target.value)},D=C=>{if(C.key==="Enter"&&p.trim()&&(C.preventDefault(),t(p)),C.key==="ArrowLeft"&&!p&&I.length>0){C.preventDefault();const v=I.length-1;u(v),d.current[v]?.focus()}if(C.key==="Backspace"&&!p&&I.length>0){C.preventDefault();const v=I.length-1;u(v),d.current[v]?.focus()}};return m.jsxs("div",{ref:w,className:j.cn(H({error:f}),r),"data-hook":o,"data-slot":"input-chip","data-tracking-el":s,"data-tracking-label":l,...b,children:[i,m.jsx("input",{ref:e,"aria-label":a,"aria-labelledby":g,className:j.cn(W),"data-slot":"input-chip-input",disabled:R,id:h,placeholder:c,type:"text",value:p,onChange:k,onKeyDown:D})]})});A.displayName="InputChipInput";function z({className:r,dataHookPrefix:f="chip",itemAriaLabel:o}){const{removeItem:s,inputRef:l,setFocusedChipIndex:c,chipRefs:h}=E(),{value:a,disabled:g}=S(),i=n.useRef(null);n.useEffect(()=>{if(i.current!==null){if(i.current==="input")l.current?.focus();else{const t=i.current;t>=0&&t<a.length?h.current[t]?.focus():a.length>0?h.current[a.length-1]?.focus():l.current?.focus()}i.current=null}},[a.length,l,h]);const b=(t,e)=>{if(!g)switch(t.key){case"ArrowLeft":t.preventDefault(),e>0&&(c(e-1),h.current[e-1]?.focus());break;case"ArrowRight":t.preventDefault(),e<a.length-1?(c(e+1),h.current[e+1]?.focus()):(c(-1),l.current?.focus());break;case"Backspace":case"Delete":{t.preventDefault();const u=a.length-1;if(u===0)c(-1),i.current="input",s(e);else if(e>=u){const d=u-1;c(d),i.current=d,s(e)}else c(e),i.current=e,s(e);break}case"Home":t.preventDefault(),a.length>0&&(c(0),h.current[0]?.focus());break;case"End":t.preventDefault(),c(-1),l.current?.focus();break}},w=t=>{c(t)},y=t=>{const e=t.relatedTarget;e&&(e.closest('[data-slot="chip"]')!==null||e.dataset.slot==="input-chip-input")||c(-1)};return a.length===0?null:m.jsx("div",{className:j.cn("contents",r),"data-slot":"input-chip-items",children:a.map((t,e)=>m.jsx(K.Chip,{ref:u=>{h.current[e]=u},"aria-label":o?o.replace("{item}",t):`${t}, press Delete to remove`,dataHook:`${f}-${e}`,disabled:g,role:"group",tabIndex:-1,onBlur:y,onFocus:()=>w(e),onKeyDown:u=>b(u,e),onRemove:()=>s(e),children:t},`${t}-${e}`))})}exports.InputChip=L;exports.InputChipInput=A;exports.InputChipItems=z;exports.useInputChipContext=_;
|
package/dist/input-chip.d.ts
CHANGED
|
@@ -104,11 +104,17 @@ export interface InputChipItemsProps {
|
|
|
104
104
|
className?: string;
|
|
105
105
|
/** Data hook prefix for chips */
|
|
106
106
|
dataHookPrefix?: string;
|
|
107
|
+
/**
|
|
108
|
+
* Accessible label for each chip item.
|
|
109
|
+
* Supports `{item}` placeholder for interpolation.
|
|
110
|
+
* @default "{item}, press Delete to remove"
|
|
111
|
+
*/
|
|
112
|
+
itemAriaLabel?: string;
|
|
107
113
|
}
|
|
108
114
|
/**
|
|
109
115
|
* Auto-renders chips from the InputChip value array.
|
|
110
116
|
* Must be used within an InputChip component.
|
|
111
117
|
*/
|
|
112
|
-
declare function InputChipItems({ className, dataHookPrefix, }: InputChipItemsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
118
|
+
declare function InputChipItems({ className, dataHookPrefix, itemAriaLabel, }: InputChipItemsProps): import("react/jsx-runtime").JSX.Element | null;
|
|
113
119
|
export { InputChip, InputChipInput, InputChipItems, useInputChipContext };
|
|
114
120
|
//# sourceMappingURL=input-chip.d.ts.map
|
package/dist/input-chip.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-chip.d.ts","sourceRoot":"","sources":["../../src/components/input-chip.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AASlE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,OAAO,CAAC;IAClB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,oDAAoD;IACpD,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,g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EG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED;;;GAGG;AACH,QAAA,MAAM,cAAc,4FA6EnB,CAAC;AAOF,MAAM,WAAW,mBAAmB;IAClC,yCAAyC;IACzC,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,iCAAiC;IACjC,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,iBAAS,cAAc,CAAC,EACtB,SAAS,EACT,cAAuB,EACvB,aAAa,GACd,EAAE,mBAAmB,kDAoJrB;AAMD,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,cAAc,EAAE,mBAAmB,EAAE,CAAC"}
|
package/dist/input-chip.js
CHANGED
|
@@ -1,87 +1,87 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
1
|
+
import { jsx as x, jsxs as M } from "react/jsx-runtime";
|
|
2
|
+
import * as n from "react";
|
|
3
3
|
import { cva as P } from "class-variance-authority";
|
|
4
4
|
import { cn as E } from "@brightlocal/ui-components/lib/utils";
|
|
5
5
|
import { Chip as j } from "@brightlocal/ui-components/chip";
|
|
6
|
-
const
|
|
6
|
+
const A = n.createContext(null), B = n.createContext(null), K = n.createContext(null);
|
|
7
7
|
function F() {
|
|
8
|
-
const
|
|
9
|
-
if (!
|
|
8
|
+
const u = n.useContext(A);
|
|
9
|
+
if (!u)
|
|
10
10
|
throw new Error("InputChip components must be used within an <InputChip>");
|
|
11
|
-
return
|
|
11
|
+
return u;
|
|
12
12
|
}
|
|
13
|
-
function
|
|
14
|
-
const
|
|
15
|
-
if (!
|
|
13
|
+
function $() {
|
|
14
|
+
const u = n.useContext(B);
|
|
15
|
+
if (!u)
|
|
16
16
|
throw new Error("InputChip components must be used within an <InputChip>");
|
|
17
|
-
return
|
|
17
|
+
return u;
|
|
18
18
|
}
|
|
19
|
-
function
|
|
20
|
-
const
|
|
21
|
-
if (!
|
|
19
|
+
function N() {
|
|
20
|
+
const u = n.useContext(K);
|
|
21
|
+
if (!u)
|
|
22
22
|
throw new Error("InputChip components must be used within an <InputChip>");
|
|
23
|
-
return
|
|
23
|
+
return u;
|
|
24
24
|
}
|
|
25
25
|
function G() {
|
|
26
|
-
const
|
|
26
|
+
const u = F(), { value: b, disabled: d } = $(), { inputValue: o, focusedChipIndex: c } = N();
|
|
27
27
|
return {
|
|
28
|
-
...
|
|
29
|
-
value:
|
|
30
|
-
disabled:
|
|
31
|
-
inputValue:
|
|
32
|
-
focusedChipIndex:
|
|
28
|
+
...u,
|
|
29
|
+
value: b,
|
|
30
|
+
disabled: d,
|
|
31
|
+
inputValue: o,
|
|
32
|
+
focusedChipIndex: c
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
35
|
function J({
|
|
36
|
-
value:
|
|
37
|
-
defaultValue:
|
|
38
|
-
onValueChange:
|
|
39
|
-
disabled:
|
|
40
|
-
allowDuplicates:
|
|
41
|
-
children:
|
|
36
|
+
value: u,
|
|
37
|
+
defaultValue: b = [],
|
|
38
|
+
onValueChange: d,
|
|
39
|
+
disabled: o = !1,
|
|
40
|
+
allowDuplicates: c = !1,
|
|
41
|
+
children: s
|
|
42
42
|
}) {
|
|
43
|
-
const [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}),
|
|
47
|
-
|
|
48
|
-
}, [
|
|
49
|
-
const i =
|
|
50
|
-
(
|
|
51
|
-
|
|
43
|
+
const [p, a] = n.useState(b), [v, l] = n.useState(""), [C, I] = n.useState(-1), k = n.useRef(null), t = n.useRef([]), e = u !== void 0, r = e ? u : p, f = n.useRef(r), g = n.useRef(d), R = n.useRef(o);
|
|
44
|
+
n.useLayoutEffect(() => {
|
|
45
|
+
f.current = r, g.current = d, R.current = o;
|
|
46
|
+
}), n.useEffect(() => {
|
|
47
|
+
t.current.length > r.length && (t.current.length = r.length), C >= r.length && I(-1);
|
|
48
|
+
}, [r.length, C]);
|
|
49
|
+
const i = n.useCallback(
|
|
50
|
+
(w) => {
|
|
51
|
+
e || a(w), g.current?.(w);
|
|
52
52
|
},
|
|
53
|
-
[
|
|
54
|
-
), y =
|
|
55
|
-
(
|
|
53
|
+
[e]
|
|
54
|
+
), y = n.useCallback(
|
|
55
|
+
(w) => {
|
|
56
56
|
if (R.current) return;
|
|
57
|
-
const V =
|
|
58
|
-
V && (
|
|
57
|
+
const V = w.trim();
|
|
58
|
+
V && (c || !f.current.includes(V)) && (i([...f.current, V]), l(""));
|
|
59
59
|
},
|
|
60
|
-
[
|
|
61
|
-
), D =
|
|
62
|
-
(
|
|
63
|
-
R.current || i(
|
|
60
|
+
[c, i]
|
|
61
|
+
), D = n.useCallback(
|
|
62
|
+
(w) => {
|
|
63
|
+
R.current || i(f.current.filter((V, L) => L !== w));
|
|
64
64
|
},
|
|
65
65
|
[i]
|
|
66
|
-
), h =
|
|
66
|
+
), h = n.useMemo(
|
|
67
67
|
() => ({
|
|
68
68
|
onValueChange: i,
|
|
69
|
-
setInputValue:
|
|
69
|
+
setInputValue: l,
|
|
70
70
|
addItem: y,
|
|
71
71
|
removeItem: D,
|
|
72
|
-
inputRef:
|
|
73
|
-
setFocusedChipIndex:
|
|
74
|
-
chipRefs:
|
|
72
|
+
inputRef: k,
|
|
73
|
+
setFocusedChipIndex: I,
|
|
74
|
+
chipRefs: t
|
|
75
75
|
}),
|
|
76
76
|
[i, y, D]
|
|
77
|
-
),
|
|
78
|
-
() => ({ value:
|
|
79
|
-
[
|
|
80
|
-
),
|
|
81
|
-
() => ({ inputValue:
|
|
82
|
-
[
|
|
77
|
+
), m = n.useMemo(
|
|
78
|
+
() => ({ value: r, disabled: o }),
|
|
79
|
+
[r, o]
|
|
80
|
+
), S = n.useMemo(
|
|
81
|
+
() => ({ inputValue: v, focusedChipIndex: C }),
|
|
82
|
+
[v, C]
|
|
83
83
|
);
|
|
84
|
-
return /* @__PURE__ */
|
|
84
|
+
return /* @__PURE__ */ x(A.Provider, { value: h, children: /* @__PURE__ */ x(B.Provider, { value: m, children: /* @__PURE__ */ x(K.Provider, { value: S, children: s }) }) });
|
|
85
85
|
}
|
|
86
86
|
const H = P(
|
|
87
87
|
[
|
|
@@ -128,57 +128,57 @@ const H = P(
|
|
|
128
128
|
"focus:outline-none focus-visible:outline-none",
|
|
129
129
|
// Disabled
|
|
130
130
|
"disabled:cursor-not-allowed disabled:opacity-50"
|
|
131
|
-
], W =
|
|
131
|
+
], W = n.forwardRef(
|
|
132
132
|
({
|
|
133
|
-
className:
|
|
134
|
-
error:
|
|
135
|
-
dataHook:
|
|
136
|
-
trackingEl:
|
|
137
|
-
trackingLabel:
|
|
138
|
-
placeholder:
|
|
139
|
-
inputId:
|
|
140
|
-
"aria-label":
|
|
141
|
-
"aria-labelledby":
|
|
142
|
-
children:
|
|
143
|
-
...
|
|
144
|
-
},
|
|
145
|
-
const { setInputValue:
|
|
146
|
-
|
|
133
|
+
className: u,
|
|
134
|
+
error: b = !1,
|
|
135
|
+
dataHook: d,
|
|
136
|
+
trackingEl: o,
|
|
137
|
+
trackingLabel: c,
|
|
138
|
+
placeholder: s,
|
|
139
|
+
inputId: p,
|
|
140
|
+
"aria-label": a,
|
|
141
|
+
"aria-labelledby": v,
|
|
142
|
+
children: l,
|
|
143
|
+
...C
|
|
144
|
+
}, I) => {
|
|
145
|
+
const { setInputValue: k, addItem: t, inputRef: e, setFocusedChipIndex: r, chipRefs: f } = F(), { value: g, disabled: R } = $(), { inputValue: i } = N(), y = (h) => {
|
|
146
|
+
k(h.target.value);
|
|
147
147
|
}, D = (h) => {
|
|
148
|
-
if (h.key === "Enter" && i.trim() && (h.preventDefault(),
|
|
148
|
+
if (h.key === "Enter" && i.trim() && (h.preventDefault(), t(i)), h.key === "ArrowLeft" && !i && g.length > 0) {
|
|
149
149
|
h.preventDefault();
|
|
150
|
-
const
|
|
151
|
-
|
|
150
|
+
const m = g.length - 1;
|
|
151
|
+
r(m), f.current[m]?.focus();
|
|
152
152
|
}
|
|
153
|
-
if (h.key === "Backspace" && !i &&
|
|
153
|
+
if (h.key === "Backspace" && !i && g.length > 0) {
|
|
154
154
|
h.preventDefault();
|
|
155
|
-
const
|
|
156
|
-
|
|
155
|
+
const m = g.length - 1;
|
|
156
|
+
r(m), f.current[m]?.focus();
|
|
157
157
|
}
|
|
158
158
|
};
|
|
159
159
|
return /* @__PURE__ */ M(
|
|
160
160
|
"div",
|
|
161
161
|
{
|
|
162
|
-
ref:
|
|
163
|
-
className: E(H({ error:
|
|
164
|
-
"data-hook":
|
|
162
|
+
ref: I,
|
|
163
|
+
className: E(H({ error: b }), u),
|
|
164
|
+
"data-hook": d,
|
|
165
165
|
"data-slot": "input-chip",
|
|
166
|
-
"data-tracking-el":
|
|
167
|
-
"data-tracking-label":
|
|
168
|
-
...
|
|
166
|
+
"data-tracking-el": o,
|
|
167
|
+
"data-tracking-label": c,
|
|
168
|
+
...C,
|
|
169
169
|
children: [
|
|
170
|
-
|
|
171
|
-
/* @__PURE__ */
|
|
170
|
+
l,
|
|
171
|
+
/* @__PURE__ */ x(
|
|
172
172
|
"input",
|
|
173
173
|
{
|
|
174
|
-
ref:
|
|
175
|
-
"aria-label":
|
|
176
|
-
"aria-labelledby":
|
|
174
|
+
ref: e,
|
|
175
|
+
"aria-label": a,
|
|
176
|
+
"aria-labelledby": v,
|
|
177
177
|
className: E(T),
|
|
178
178
|
"data-slot": "input-chip-input",
|
|
179
179
|
disabled: R,
|
|
180
|
-
id:
|
|
181
|
-
placeholder:
|
|
180
|
+
id: p,
|
|
181
|
+
placeholder: s,
|
|
182
182
|
type: "text",
|
|
183
183
|
value: i,
|
|
184
184
|
onChange: y,
|
|
@@ -192,74 +192,75 @@ const H = P(
|
|
|
192
192
|
);
|
|
193
193
|
W.displayName = "InputChipInput";
|
|
194
194
|
function O({
|
|
195
|
-
className:
|
|
196
|
-
dataHookPrefix:
|
|
195
|
+
className: u,
|
|
196
|
+
dataHookPrefix: b = "chip",
|
|
197
|
+
itemAriaLabel: d
|
|
197
198
|
}) {
|
|
198
|
-
const { removeItem:
|
|
199
|
-
|
|
199
|
+
const { removeItem: o, inputRef: c, setFocusedChipIndex: s, chipRefs: p } = F(), { value: a, disabled: v } = $(), l = n.useRef(null);
|
|
200
|
+
n.useEffect(() => {
|
|
200
201
|
if (l.current !== null) {
|
|
201
202
|
if (l.current === "input")
|
|
202
|
-
|
|
203
|
+
c.current?.focus();
|
|
203
204
|
else {
|
|
204
|
-
const
|
|
205
|
-
|
|
205
|
+
const t = l.current;
|
|
206
|
+
t >= 0 && t < a.length ? p.current[t]?.focus() : a.length > 0 ? p.current[a.length - 1]?.focus() : c.current?.focus();
|
|
206
207
|
}
|
|
207
208
|
l.current = null;
|
|
208
209
|
}
|
|
209
|
-
}, [
|
|
210
|
-
const
|
|
211
|
-
if (!
|
|
212
|
-
switch (
|
|
210
|
+
}, [a.length, c, p]);
|
|
211
|
+
const C = (t, e) => {
|
|
212
|
+
if (!v)
|
|
213
|
+
switch (t.key) {
|
|
213
214
|
case "ArrowLeft":
|
|
214
|
-
|
|
215
|
+
t.preventDefault(), e > 0 && (s(e - 1), p.current[e - 1]?.focus());
|
|
215
216
|
break;
|
|
216
217
|
case "ArrowRight":
|
|
217
|
-
|
|
218
|
+
t.preventDefault(), e < a.length - 1 ? (s(e + 1), p.current[e + 1]?.focus()) : (s(-1), c.current?.focus());
|
|
218
219
|
break;
|
|
219
220
|
case "Backspace":
|
|
220
221
|
case "Delete": {
|
|
221
|
-
|
|
222
|
-
const
|
|
223
|
-
if (
|
|
224
|
-
|
|
225
|
-
else if (e >=
|
|
226
|
-
const
|
|
227
|
-
|
|
222
|
+
t.preventDefault();
|
|
223
|
+
const r = a.length - 1;
|
|
224
|
+
if (r === 0)
|
|
225
|
+
s(-1), l.current = "input", o(e);
|
|
226
|
+
else if (e >= r) {
|
|
227
|
+
const f = r - 1;
|
|
228
|
+
s(f), l.current = f, o(e);
|
|
228
229
|
} else
|
|
229
|
-
|
|
230
|
+
s(e), l.current = e, o(e);
|
|
230
231
|
break;
|
|
231
232
|
}
|
|
232
233
|
case "Home":
|
|
233
|
-
|
|
234
|
+
t.preventDefault(), a.length > 0 && (s(0), p.current[0]?.focus());
|
|
234
235
|
break;
|
|
235
236
|
case "End":
|
|
236
|
-
|
|
237
|
+
t.preventDefault(), s(-1), c.current?.focus();
|
|
237
238
|
break;
|
|
238
239
|
}
|
|
239
|
-
},
|
|
240
|
-
|
|
241
|
-
},
|
|
242
|
-
const e =
|
|
243
|
-
e && (e.closest('[data-slot="chip"]') !== null || e.dataset.slot === "input-chip-input") ||
|
|
240
|
+
}, I = (t) => {
|
|
241
|
+
s(t);
|
|
242
|
+
}, k = (t) => {
|
|
243
|
+
const e = t.relatedTarget;
|
|
244
|
+
e && (e.closest('[data-slot="chip"]') !== null || e.dataset.slot === "input-chip-input") || s(-1);
|
|
244
245
|
};
|
|
245
|
-
return
|
|
246
|
+
return a.length === 0 ? null : /* @__PURE__ */ x("div", { className: E("contents", u), "data-slot": "input-chip-items", children: a.map((t, e) => /* @__PURE__ */ x(
|
|
246
247
|
j,
|
|
247
248
|
{
|
|
248
|
-
ref: (
|
|
249
|
-
|
|
249
|
+
ref: (r) => {
|
|
250
|
+
p.current[e] = r;
|
|
250
251
|
},
|
|
251
|
-
"aria-label": `${
|
|
252
|
-
dataHook: `${
|
|
253
|
-
disabled:
|
|
252
|
+
"aria-label": d ? d.replace("{item}", t) : `${t}, press Delete to remove`,
|
|
253
|
+
dataHook: `${b}-${e}`,
|
|
254
|
+
disabled: v,
|
|
254
255
|
role: "group",
|
|
255
256
|
tabIndex: -1,
|
|
256
|
-
onBlur:
|
|
257
|
-
onFocus: () =>
|
|
258
|
-
onKeyDown: (
|
|
259
|
-
onRemove: () =>
|
|
260
|
-
children:
|
|
257
|
+
onBlur: k,
|
|
258
|
+
onFocus: () => I(e),
|
|
259
|
+
onKeyDown: (r) => C(r, e),
|
|
260
|
+
onRemove: () => o(e),
|
|
261
|
+
children: t
|
|
261
262
|
},
|
|
262
|
-
`${
|
|
263
|
+
`${t}-${e}`
|
|
263
264
|
)) });
|
|
264
265
|
}
|
|
265
266
|
export {
|
package/dist/input-group.d.ts
CHANGED
|
@@ -34,7 +34,7 @@ interface InputGroupAddonProps extends React.HTMLAttributes<HTMLDivElement>, Var
|
|
|
34
34
|
declare const InputGroupAddon: React.ForwardRefExoticComponent<InputGroupAddonProps & React.RefAttributes<HTMLDivElement>>;
|
|
35
35
|
declare const inputGroupButtonVariants: (props?: ({
|
|
36
36
|
variant?: "default" | "ghost" | null | undefined;
|
|
37
|
-
size?: "default" | "
|
|
37
|
+
size?: "default" | "icon" | "sm" | "lg" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
|
|
38
38
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string;
|
|
39
39
|
interface InputGroupButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof inputGroupButtonVariants> {
|
|
40
40
|
asChild?: boolean;
|
package/dist/input-password.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),D=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),D=require("react"),j=require("@brightlocal/icons"),M=require("@brightlocal/ui-components/progress"),y=require("@brightlocal/ui-components/lib/utils"),w=require("@brightlocal/ui-components/input-group");function $(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const r=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,r.get?r:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const n=$(D),O={meter:{label:"Meter",value:0,color:"bg-green-500"},weak:{label:"Weak",value:25,color:"bg-green-500"},ok:{label:"Ok",value:50,color:"bg-green-500"},good:{label:"Good",value:75,color:"bg-green-500"},great:{label:"Great",value:100,color:"bg-green-500"}};function L(e){if(!e||e.length===0)return"meter";if(e.length<12)return"weak";let t=0;return e.length>=16&&(t+=1),/[a-z]/.test(e)&&(t+=1),/[A-Z]/.test(e)&&(t+=1),/[0-9]/.test(e)&&(t+=1),/[^a-zA-Z0-9]/.test(e)&&(t+=1),t<=1?"ok":t<=3?"good":"great"}const _=n.createContext(null);function k(){const e=n.useContext(_);if(!e)throw new Error("InputPassword compound components must be used within InputPasswordRoot");return e}function q({children:e,dataHook:t,trackingEl:o,trackingLabel:r,disabled:u,value:a,onChange:l,onStrengthChange:i,strengthLevels:g,calculateStrength:p,error:c,id:h,className:f}){const[m,b]=n.useState(!1),[S,v]=n.useState(""),[P,x]=n.useState("meter"),F=n.useId(),E=h||F,I=a!==void 0?a:S,N=g??O,T=p??L,R=n.useCallback(d=>{a===void 0&&v(d),l?.(d)},[a,l]),G=n.useCallback(()=>{b(d=>!d)},[]);n.useEffect(()=>{const d=setTimeout(()=>{const C=T(I);x(C),i?.(C)},180);return()=>clearTimeout(d)},[I,T,i]);const z=n.useMemo(()=>({showPassword:m,setShowPassword:b,toggleVisibility:G,password:I,setPassword:R,strength:P,strengthLevels:N,disabled:u,dataHook:t,trackingEl:o,trackingLabel:r,inputId:E,error:c}),[m,G,I,R,P,N,u,t,o,r,E,c]);return s.jsx(_.Provider,{value:z,children:s.jsx("div",{className:y.cn("w-full",f),"data-hook":t,"data-slot":"input-password",children:e})})}q.displayName="InputPasswordRoot";const H=n.forwardRef(({className:e,groupClassName:t,onChange:o,showLabel:r,hideLabel:u,...a},l)=>{const{showPassword:i,toggleVisibility:g,password:p,setPassword:c,disabled:h,dataHook:f,trackingEl:m,trackingLabel:b,inputId:S,error:v}=k(),P=x=>{c(x.target.value),o?.(x)};return s.jsxs(w.InputGroup,{className:t,dataHook:f,error:v,children:[s.jsx(w.InputGroupInput,{ref:l,className:e,disabled:h,id:S,trackingEl:m,trackingLabel:b,type:i?"text":"password",value:p,onChange:P,...a}),s.jsx(w.InputGroupAddon,{align:"inline-end",children:s.jsx(w.InputGroupButton,{"aria-label":i?u??"Hide password":r??"Show password","data-hook":`${f}-toggle`,disabled:h,size:"icon-sm",variant:"ghost",onClick:g,children:i?s.jsx(j.EyeOff,{}):s.jsx(j.Eye,{})})})]})});H.displayName="InputPasswordField";const V=n.forwardRef(({className:e,showLabel:t,hideLabel:o,size:r="icon",variant:u="ghost",...a},l)=>{const{showPassword:i,toggleVisibility:g,disabled:p,dataHook:c}=k();return s.jsx(w.InputGroupButton,{ref:l,"aria-label":i?o??"Hide password":t??"Show password",className:e,"data-hook":`${c}-toggle`,disabled:p,size:r,variant:u,onClick:g,...a,children:i?s.jsx(j.EyeOff,{}):s.jsx(j.Eye,{})})});V.displayName="InputPasswordToggle";function A({className:e,showLabel:t=!0}){const{strength:o,strengthLevels:r,dataHook:u,disabled:a}=k(),l=r[o]??{label:o,value:0,color:"bg-muted"};return s.jsx("div",{className:y.cn("mt-1 space-y-2",e),children:s.jsxs("div",{className:y.cn("flex items-center gap-2",a&&"opacity-50"),children:[s.jsx(M.Progress,{className:"h-2 flex-1",dataHook:`${u}-strength-progress`,indicatorClassName:l.color,value:l.value}),t&&s.jsx("span",{className:"text-foreground w-10 shrink-0 text-right text-sm font-medium whitespace-nowrap","data-hook":`${u}-strength-label`,children:l.label})]})})}A.displayName="InputPasswordStrength";exports.DEFAULT_STRENGTH_LEVELS=O;exports.InputPasswordField=H;exports.InputPasswordRoot=q;exports.InputPasswordStrength=A;exports.InputPasswordToggle=V;exports.calculatePasswordStrength=L;
|
package/dist/input-password.d.ts
CHANGED
|
@@ -122,6 +122,16 @@ export interface InputPasswordFieldProps extends Omit<React.ComponentProps<typeo
|
|
|
122
122
|
* Additional class name for the InputGroup wrapper
|
|
123
123
|
*/
|
|
124
124
|
groupClassName?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Accessible label for the toggle button when password is hidden.
|
|
127
|
+
* @default "Show password"
|
|
128
|
+
*/
|
|
129
|
+
showLabel?: string;
|
|
130
|
+
/**
|
|
131
|
+
* Accessible label for the toggle button when password is visible.
|
|
132
|
+
* @default "Hide password"
|
|
133
|
+
*/
|
|
134
|
+
hideLabel?: string;
|
|
125
135
|
}
|
|
126
136
|
/**
|
|
127
137
|
* InputPasswordField - The password input field with toggle button
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-password.d.ts","sourceRoot":"","sources":["../../src/components/input-password.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"input-password.d.ts","sourceRoot":"","sources":["../../src/components/input-password.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAM/B,OAAO,EAEL,eAAe,EAEf,gBAAgB,EACjB,MAAM,wCAAwC,CAAC;AAMhD;;GAEG;AACH,KAAK,uBAAuB,GAAG,OAAO,GAAG,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,OAAO,CAAC;AAE1E;;GAEG;AACH,UAAU,mBAAmB;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,QAAA,MAAM,uBAAuB,EAAE,MAAM,CACnC,uBAAuB,EACvB,mBAAmB,CAOpB,CAAC;AAEF;;;GAGG;AACH,iBAAS,yBAAyB,CAAC,QAAQ,EAAE,MAAM,GAAG,uBAAuB,CAyB5E;AAkDD,MAAM,WAAW,sBAAsB,CACrC,CAAC,SAAS,MAAM,GAAG,uBAAuB;IAE1C;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,CAAC,EAAE,CAAC,K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