@brightlocal/ui-components 3.3.0 → 3.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/README.md CHANGED
@@ -24,7 +24,7 @@ pnpm add @brightlocal/tokens
24
24
 
25
25
  ## Components
26
26
 
27
- This package includes 87 components and 4 blocks built on Radix UI primitives and other React libraries. All components are fully typed with TypeScript and follow BrightLocal's design system patterns.
27
+ This package includes 88 components and 4 blocks built on Radix UI primitives and other React libraries. All components are fully typed with TypeScript and follow BrightLocal's design system patterns.
28
28
 
29
29
  ### Layout Components
30
30
 
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@brightlocal/ui-components",
3
- "version": "3.3.0",
3
+ "version": "3.4.0",
4
4
  "description": "Machine-readable registry of all components in the BrightLocal Design System",
5
5
  "components": [
6
6
  {
@@ -2562,7 +2562,104 @@
2562
2562
  "doNotUseFor": [
2563
2563
  "form field descriptions (use Field's built-in description)",
2564
2564
  "heading or body-copy weight text (use Typography)",
2565
- "validation errors (use Field's error text)"
2565
+ "validation errors (use Field's error text)",
2566
+ "label-value pairs describing a record (use DescriptionList)"
2567
+ ]
2568
+ },
2569
+ {
2570
+ "name": "DescriptionList",
2571
+ "import": "@brightlocal/ui-components/description-list",
2572
+ "category": "display",
2573
+ "exports": [
2574
+ "DescriptionList",
2575
+ "DescriptionListItem",
2576
+ "DescriptionListTerm",
2577
+ "DescriptionListDetails",
2578
+ "DescriptionListIconText"
2579
+ ],
2580
+ "compound": true,
2581
+ "dataHookRequired": true,
2582
+ "variants": {
2583
+ "layout": [
2584
+ "inline",
2585
+ "stacked",
2586
+ "responsive",
2587
+ "container",
2588
+ "grid"
2589
+ ],
2590
+ "align": [
2591
+ "start",
2592
+ "end"
2593
+ ]
2594
+ },
2595
+ "props": [
2596
+ "termWidth",
2597
+ "divided",
2598
+ "color"
2599
+ ],
2600
+ "description": "Label-and-value pairs describing one record, rendered as a semantic <dl>",
2601
+ "aliases": [
2602
+ "description list",
2603
+ "definition list",
2604
+ "key value",
2605
+ "key-value pairs",
2606
+ "label value",
2607
+ "details list",
2608
+ "metadata list",
2609
+ "summary list",
2610
+ "dl"
2611
+ ],
2612
+ "whenToUse": [
2613
+ "Properties of one record: the details of a review, a location's business details",
2614
+ "The read view of a settings card (the card header owns the Edit action)",
2615
+ "Receipts and totals in a popover or dialog (align=\"end\")",
2616
+ "A plan's limits or a record's facts as stacked items in columns (layout=\"grid\")"
2617
+ ],
2618
+ "doNotUseFor": [
2619
+ "several records compared by the same attributes (use Table or DataTable)",
2620
+ "rows the user acts on: navigation, drill-down, toggles (use List with ItemButton/ItemLink)",
2621
+ "headline numbers with a trend (use CardMetric)",
2622
+ "form inputs (use Field)"
2623
+ ],
2624
+ "states": [
2625
+ "default"
2626
+ ],
2627
+ "a11yContract": [
2628
+ "renders <dl> with each <dt>/<dd> pair grouped in a <div> (allowed inside dl)",
2629
+ "no interactive role; links and buttons inside values keep their own semantics",
2630
+ "DescriptionListIconText hides its icon from assistive tech; the text names the value"
2631
+ ],
2632
+ "decisions": [
2633
+ {
2634
+ "date": "2026-11-03",
2635
+ "decision": "DescriptionList is its own component, not a Table variant. One record's properties are a dl; several records compared by the same attributes are a Table.",
2636
+ "why": "A table announces rows and columns that a list of one record's fields does not have, and a variant would have overridden Table's header, borders, density and hover, plus added stacked and grid layouts a table cannot do without losing its semantics.",
2637
+ "ticket": "DS-1124"
2638
+ },
2639
+ {
2640
+ "date": "2026-11-03",
2641
+ "decision": "Promoted from the local DescriptionList that Tool Settings, Location Manager and Review Manager carried (inline/stacked/responsive/container layouts, termWidth 128px default, divided, IconText), adding termWidth=\"auto\", align=\"end\" and layout=\"grid\".",
2642
+ "why": "The three prototype copies were identical and already matched the Figma Description List anatomy; the additions cover the auto-width read views (account settings, greenfield ReviewDetails), popover receipts and the plan facts grid found in the prototypes.",
2643
+ "ticket": "DS-1124"
2644
+ },
2645
+ {
2646
+ "date": "2026-11-03",
2647
+ "decision": "An empty value is DescriptionListDetails color=\"muted\" (\"Not set\"), not a className.",
2648
+ "why": "Colour on a DS component through className is lint-blocked outside ui-components, and empty values appear in most read views.",
2649
+ "ticket": "DS-1124"
2650
+ }
2651
+ ],
2652
+ "ruledOut": [
2653
+ {
2654
+ "option": "A key-value variant of Table",
2655
+ "why": "Different semantics (2D grid vs one record's properties) and the variant would replace almost all of Table's styling; see decisions.",
2656
+ "ticket": "DS-1124"
2657
+ },
2658
+ {
2659
+ "option": "Per-row edit actions inside DescriptionList",
2660
+ "why": "Every read view in the prototypes edits from the container header; an action on the row turns it into a List row (DS-1166).",
2661
+ "ticket": "DS-1124"
2662
+ }
2566
2663
  ]
2567
2664
  },
2568
2665
  {
@@ -3931,6 +4028,18 @@
3931
4028
  "category": "display",
3932
4029
  "exports": [
3933
4030
  "List",
4031
+ "ListItem",
4032
+ "ListItemButton",
4033
+ "ListItemLink",
4034
+ "ListItemMedia",
4035
+ "ListItemContent",
4036
+ "ListItemTitle",
4037
+ "ListItemDescription",
4038
+ "ListItemValue",
4039
+ "ListItemChevron",
4040
+ "ListItemActions",
4041
+ "ListSubheader",
4042
+ "ListSeparator",
3934
4043
  "Item",
3935
4044
  "ItemMedia",
3936
4045
  "ItemContent",
@@ -3951,10 +4060,17 @@
3951
4060
  "align": [
3952
4061
  "center",
3953
4062
  "start"
4063
+ ],
4064
+ "mediaVariant": [
4065
+ "default",
4066
+ "icon",
4067
+ "image"
3954
4068
  ]
3955
4069
  },
3956
- "props": [],
3957
- "description": "Vertical item list with optional section headings",
4070
+ "props": [
4071
+ "truncate"
4072
+ ],
4073
+ "description": "Vertical list of rows: static, pressable (button or link), drill-down with a value and chevron, toggle and media rows, with section headings and separators",
3958
4074
  "figma": {
3959
4075
  "fileKey": "p3krmC8DBUgqpbq6cLzaal",
3960
4076
  "nodes": [
@@ -3969,33 +4085,81 @@
3969
4085
  "nodeId": "28298:5025",
3970
4086
  "figmaName": "Item Subheader",
3971
4087
  "kind": "component",
3972
- "export": "ItemSubheader"
4088
+ "export": "ListSubheader"
3973
4089
  }
3974
4090
  ],
3975
4091
  "unmappedExports": [
3976
4092
  {
3977
- "export": "Item",
4093
+ "export": "ListItem",
3978
4094
  "reason": "Drawn inside the List composition"
3979
4095
  },
3980
4096
  {
3981
- "export": "ItemMedia",
4097
+ "export": "ListItemMedia",
3982
4098
  "reason": "Drawn inside the List composition"
3983
4099
  },
3984
4100
  {
3985
- "export": "ItemContent",
4101
+ "export": "ListItemContent",
3986
4102
  "reason": "Drawn inside the List composition"
3987
4103
  },
3988
4104
  {
3989
- "export": "ItemTitle",
4105
+ "export": "ListItemTitle",
3990
4106
  "reason": "Drawn inside the List composition"
3991
4107
  },
3992
4108
  {
3993
- "export": "ItemDescription",
4109
+ "export": "ListItemDescription",
3994
4110
  "reason": "Drawn inside the List composition"
3995
4111
  },
3996
4112
  {
3997
- "export": "ItemActions",
4113
+ "export": "ListItemActions",
4114
+ "reason": "Drawn inside the List composition"
4115
+ },
4116
+ {
4117
+ "export": "ListItemButton",
4118
+ "reason": "Drawn inside the List composition"
4119
+ },
4120
+ {
4121
+ "export": "ListItemLink",
4122
+ "reason": "Drawn inside the List composition"
4123
+ },
4124
+ {
4125
+ "export": "ListItemValue",
3998
4126
  "reason": "Drawn inside the List composition"
4127
+ },
4128
+ {
4129
+ "export": "ListItemChevron",
4130
+ "reason": "Drawn inside the List composition"
4131
+ },
4132
+ {
4133
+ "export": "ListSeparator",
4134
+ "reason": "Drawn inside the List composition"
4135
+ },
4136
+ {
4137
+ "export": "Item",
4138
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4139
+ },
4140
+ {
4141
+ "export": "ItemMedia",
4142
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4143
+ },
4144
+ {
4145
+ "export": "ItemContent",
4146
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4147
+ },
4148
+ {
4149
+ "export": "ItemTitle",
4150
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4151
+ },
4152
+ {
4153
+ "export": "ItemDescription",
4154
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4155
+ },
4156
+ {
4157
+ "export": "ItemActions",
4158
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
4159
+ },
4160
+ {
4161
+ "export": "ItemSubheader",
4162
+ "reason": "Deprecated alias of the ListItem/ListSubheader name; removed in 4.0"
3999
4163
  }
4000
4164
  ],
4001
4165
  "figmaOnly": []
@@ -4003,11 +4167,78 @@
4003
4167
  "whenToUse": [
4004
4168
  "Rows with media, title, description, and trailing actions (filled)",
4005
4169
  "Settings or form-related rows needing a visible border (outline)",
4006
- "Lightweight lists inside popovers or dropdowns (default)"
4170
+ "Lightweight lists inside popovers or dropdowns (default)",
4171
+ "A row that navigates or opens something: ListItemLink or ListItemButton inside the ListItem, with ListItemChevron",
4172
+ "A drill-down list (label, current value, chevron) such as a phone filters drawer: <List divided> + ListItemButton + ListItemValue + ListItemChevron",
4173
+ "A row whose trailing part is a Switch, Badge, Status, text Button or two actions: put them in ListItemActions",
4174
+ "Logo or icon tiles in front of a row: ListItemMedia variant=\"icon\""
4007
4175
  ],
4008
4176
  "doNotUseFor": [
4009
4177
  "tabular data with sortable columns (use Table or DataTable)",
4010
- "main page content with the default variant (use filled)"
4178
+ "main page content with the default variant (use filled)",
4179
+ "read-only label and value pairs describing one record (use DescriptionList, DS-1124)",
4180
+ "choosing one or several options in a form (use Field, RadioGroup variant=\"box\" or Checkbox)"
4181
+ ],
4182
+ "decisions": [
4183
+ {
4184
+ "date": "2026-11-03",
4185
+ "decision": "List follows shadcn's Item anatomy (media with variant default|icon|image, content, title, description, actions, separator) under List-prefixed names: ListItem, ListItemMedia, ListItemContent, ListItemTitle, ListItemDescription, ListItemValue, ListItemChevron, ListItemActions, ListItemButton, ListItemLink for row parts, and ListSubheader, ListSeparator for parts that sit in the list beside rows. The shipped Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions and ItemSubheader stay as deprecated aliases, removed in 4.0. This settles DS-850.",
4186
+ "why": "Structure agreed in refinement on 28 October; the names follow the family-prefix rule (components.md: ListItem, not Item) so every part says which component it belongs to.",
4187
+ "ticket": "DS-1166"
4188
+ },
4189
+ {
4190
+ "date": "2026-11-03",
4191
+ "decision": "A pressable row is an ListItemButton or ListItemLink inside the ListItem. The ListItem stays the <li> and hands its padding to the pressable part, which carries hover and focus-visible.",
4192
+ "why": "Our List renders ul > li. Replacing the li with a link or button would break the list semantics, and the prototypes already hand-built drill-down rows as li > button.",
4193
+ "ticket": "DS-1166"
4194
+ },
4195
+ {
4196
+ "date": "2026-11-03",
4197
+ "decision": "ListItemActions takes any trailing content (min 36px square, gap-2) instead of a fixed 36px circle.",
4198
+ "why": "Switches, Badges, Status, text Buttons and pairs of actions overflowed the circle in six prototype screens.",
4199
+ "ticket": "DS-1166"
4200
+ },
4201
+ {
4202
+ "date": "2026-11-03",
4203
+ "decision": "The drill-down value is its own part, ListItemValue: muted body-sm, right-aligned, truncated past half the row.",
4204
+ "why": "shadcn has no value slot; the Rank Tracker filters drawer needs the current value before the chevron.",
4205
+ "ticket": "DS-1166"
4206
+ },
4207
+ {
4208
+ "date": "2026-11-03",
4209
+ "decision": "truncate on ListItemTitle and ListItemDescription wraps to two lines and clamps the rest (line-clamp-2). The full text appears in a Tooltip only when the text is clamped: on hover, or on keyboard focus of the row's ListItemButton / ListItemLink. The text is never its own tab stop, and a touch tap inside a button, link or label is left to that control.",
4210
+ "why": "Rows need a predictable height, but a clamped name or address must still be readable. Two lines cover most real text with no tooltip; opening it from the row's own focus keeps the row a single interactive target.",
4211
+ "ticket": "DS-1166"
4212
+ }
4213
+ ],
4214
+ "ruledOut": [
4215
+ {
4216
+ "option": "ListItem asChild rendering an <a> or <button> as the row (shadcn's Item asChild pattern)",
4217
+ "why": "Swaps out the <li>, so a ul would hold links instead of list items. shadcn's list is div-based; ours is ul > li.",
4218
+ "ticket": "DS-1166"
4219
+ },
4220
+ {
4221
+ "option": "Renaming the ListItem variants (default|filled|outline) to shadcn's names in this change",
4222
+ "why": "Breaking change; kept out of DS-1166 so the new row types ship as a minor. Rename is a separate decision for 4.0.",
4223
+ "ticket": "DS-1166"
4224
+ },
4225
+ {
4226
+ "option": "shadcn's bare Item naming with an ItemGroup alias for List",
4227
+ "why": "The names didn't say which component they belong to; the DS family-prefix rule asks for ListItem, not Item.",
4228
+ "ticket": "DS-1166"
4229
+ }
4230
+ ],
4231
+ "knownGaps": [
4232
+ {
4233
+ "description": "Item, ItemMedia, ItemContent, ItemTitle, ItemDescription, ItemActions and ItemSubheader are deprecated since the DS-1166 release and will be removed in 4.0",
4234
+ "ticket": "DS-1166",
4235
+ "workaround": "Use ListItem, ListItemMedia, ListItemContent, ListItemTitle, ListItemDescription, ListItemActions and ListSubheader (same components)"
4236
+ },
4237
+ {
4238
+ "description": "truncate on a non-pressable ListItem shows its tooltip on hover and tap only; a keyboard user cannot open it because the text is not focusable. TypographyText / TypographyHeading truncate (DS-988) clamp to one line and have no tooltip at all.",
4239
+ "ticket": "DS-1166",
4240
+ "workaround": "Put the full text where the row leads (sheet or page), or make the row a ListItemButton / ListItemLink so its focus opens the tooltip."
4241
+ }
4011
4242
  ]
4012
4243
  },
4013
4244
  {
@@ -6926,6 +7157,10 @@
6926
7157
  {
6927
7158
  "component": "DataTable",
6928
7159
  "rule": "Use DataTable for sortable, filterable, paginated tables with row selection — it wraps TanStack Table"
7160
+ },
7161
+ {
7162
+ "component": "DescriptionList",
7163
+ "rule": "Use DescriptionList for the label-value properties of one record; Table is for several records compared by the same columns"
6929
7164
  }
6930
7165
  ],
6931
7166
  "replaces": [
@@ -1,2 +1,2 @@
1
- "use client";const w=require("../_virtual/_rolldown/runtime.cjs"),P=require("../button.cjs"),A=require("../input.cjs"),x=require("../list.cjs"),D=require("../lib/motion.cjs");let s=require("react");s=w.__toESM(s,1);let S=require("@brightlocal/icons"),_=require("@brightlocal/ui-components/lib/utils"),n=require("react/jsx-runtime"),b=require("framer-motion"),K=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion");var k=s.createContext(null);function y(){const t=s.useContext(k);if(!t)throw new Error("InputList components must be used within an <InputList>");return t}function q({value:t,onValueChange:o,children:p,className:r,dataHook:d,trackingEl:u,trackingLabel:g}){const[m,h]=s.useState(""),I=s.useRef(t.length),[e,i]=s.useState(()=>({keys:t.map((a,c)=>c),nextId:t.length,pendingRemoval:null}));let l=e.keys;if(l.length!==t.length){const a=t.length>l.length?{keys:[...l,...Array.from({length:t.length-l.length},(c,f)=>e.nextId+f)],nextId:e.nextId+(t.length-l.length),pendingRemoval:null}:{keys:e.pendingRemoval!==null&&l.length-t.length===1?l.filter((c,f)=>f!==e.pendingRemoval):l.slice(0,t.length),nextId:e.nextId,pendingRemoval:null};l=a.keys,i(a)}else e.pendingRemoval!==null&&i({...e,pendingRemoval:null});s.useEffect(()=>{const a=I.current;I.current=t.length,t.length>a&&h("")},[t]);const L=s.useCallback(a=>{const c=a.map(f=>f.trim()).filter(Boolean);c.length&&o([...t,...c])},[t,o]),j=s.useCallback(a=>{i(c=>({...c,pendingRemoval:a})),o(t.filter((c,f)=>f!==a))},[t,o]),N=s.useMemo(()=>({value:t,inputValue:m,setInputValue:h,addItems:L,removeItem:j,stableKeys:l}),[t,m,L,j,l]);return(0,n.jsx)(k.Provider,{value:N,children:(0,n.jsx)("div",{className:(0,_.cn)("flex flex-col gap-4",r),"data-hook":d,"data-slot":"input-list","data-tracking-el":u,"data-tracking-label":g,children:p})})}q.displayName="InputList";function R({dataHook:t="input-list",loading:o=!1,skeletonCount:p=5,disabled:r=!1,removeAriaLabel:d,className:u}){const{value:g,removeItem:m,stableKeys:h}=y(),I=(0,K.usePrefersReducedMotion)();return o?(0,n.jsx)("ul",{className:(0,_.cn)("flex flex-col gap-2",u),"data-slot":"input-list-skeleton",children:Array.from({length:p}).map((e,i)=>(0,n.jsx)(x.Item,{variant:"loading"},i))}):(0,n.jsx)("ul",{className:(0,_.cn)("flex flex-col gap-2",u),"data-hook":`${t}-list`,"data-slot":"list",children:(0,n.jsx)(b.AnimatePresence,{initial:!1,mode:"popLayout",children:g.map((e,i)=>(0,n.jsx)(b.motion.li,{layout:!0,animate:{opacity:1,scale:1},"data-hook":`${t}-item-${i}`,exit:{opacity:0,scale:.8,transition:{opacity:{duration:.15},scale:{duration:.12}}},initial:I?!1:{opacity:0,scale:.8},transition:{opacity:{duration:.15},scale:{duration:.15},layout:D.SPRING_SNAPPY},children:(0,n.jsx)(x.Item,{asChild:!0,variant:"filled",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(x.ItemContent,{children:(0,n.jsx)(x.ItemTitle,{children:e})}),(0,n.jsx)(x.ItemActions,{children:(0,n.jsx)("button",{"aria-label":d?d.replace("{item}",e):`Remove ${e}`,className:(0,_.cn)("inline-flex size-9 cursor-pointer items-center justify-center rounded-full","text-muted-foreground","focus-visible:shadow-default outline-none","duration-fast transition-colors ease-out","disabled:pointer-events-none disabled:opacity-50"),"data-hook":`${t}-remove-${i}`,disabled:r,type:"button",onClick:()=>m(i),children:(0,n.jsx)(S.X,{})})})]})})},h[i]))})})}R.displayName="InputListItems";var v=s.forwardRef(({dataHook:t,error:o=!1,className:p,...r},d)=>{const{inputValue:u,setInputValue:g,addItems:m}=y(),h=e=>{e.key==="Enter"&&(e.preventDefault(),m([u])),r.onKeyDown?.(e)},I=e=>{const i=e.clipboardData.getData("text").split(`
1
+ "use client";const w=require("../_virtual/_rolldown/runtime.cjs"),P=require("../button.cjs"),A=require("../input.cjs"),x=require("../list.cjs"),D=require("../lib/motion.cjs");let s=require("react");s=w.__toESM(s,1);let S=require("@brightlocal/icons"),_=require("@brightlocal/ui-components/lib/utils"),n=require("react/jsx-runtime"),b=require("framer-motion"),K=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion");var k=s.createContext(null);function y(){const t=s.useContext(k);if(!t)throw new Error("InputList components must be used within an <InputList>");return t}function q({value:t,onValueChange:o,children:p,className:r,dataHook:d,trackingEl:u,trackingLabel:g}){const[m,h]=s.useState(""),I=s.useRef(t.length),[e,i]=s.useState(()=>({keys:t.map((a,c)=>c),nextId:t.length,pendingRemoval:null}));let l=e.keys;if(l.length!==t.length){const a=t.length>l.length?{keys:[...l,...Array.from({length:t.length-l.length},(c,f)=>e.nextId+f)],nextId:e.nextId+(t.length-l.length),pendingRemoval:null}:{keys:e.pendingRemoval!==null&&l.length-t.length===1?l.filter((c,f)=>f!==e.pendingRemoval):l.slice(0,t.length),nextId:e.nextId,pendingRemoval:null};l=a.keys,i(a)}else e.pendingRemoval!==null&&i({...e,pendingRemoval:null});s.useEffect(()=>{const a=I.current;I.current=t.length,t.length>a&&h("")},[t]);const L=s.useCallback(a=>{const c=a.map(f=>f.trim()).filter(Boolean);c.length&&o([...t,...c])},[t,o]),j=s.useCallback(a=>{i(c=>({...c,pendingRemoval:a})),o(t.filter((c,f)=>f!==a))},[t,o]),N=s.useMemo(()=>({value:t,inputValue:m,setInputValue:h,addItems:L,removeItem:j,stableKeys:l}),[t,m,L,j,l]);return(0,n.jsx)(k.Provider,{value:N,children:(0,n.jsx)("div",{className:(0,_.cn)("flex flex-col gap-4",r),"data-hook":d,"data-slot":"input-list","data-tracking-el":u,"data-tracking-label":g,children:p})})}q.displayName="InputList";function R({dataHook:t="input-list",loading:o=!1,skeletonCount:p=5,disabled:r=!1,removeAriaLabel:d,className:u}){const{value:g,removeItem:m,stableKeys:h}=y(),I=(0,K.usePrefersReducedMotion)();return o?(0,n.jsx)("ul",{className:(0,_.cn)("flex flex-col gap-2",u),"data-slot":"input-list-skeleton",children:Array.from({length:p}).map((e,i)=>(0,n.jsx)(x.ListItem,{variant:"loading"},i))}):(0,n.jsx)("ul",{className:(0,_.cn)("flex flex-col gap-2",u),"data-hook":`${t}-list`,"data-slot":"list",children:(0,n.jsx)(b.AnimatePresence,{initial:!1,mode:"popLayout",children:g.map((e,i)=>(0,n.jsx)(b.motion.li,{layout:!0,animate:{opacity:1,scale:1},"data-hook":`${t}-item-${i}`,exit:{opacity:0,scale:.8,transition:{opacity:{duration:.15},scale:{duration:.12}}},initial:I?!1:{opacity:0,scale:.8},transition:{opacity:{duration:.15},scale:{duration:.15},layout:D.SPRING_SNAPPY},children:(0,n.jsx)(x.ListItem,{asChild:!0,variant:"filled",children:(0,n.jsxs)("div",{children:[(0,n.jsx)(x.ListItemContent,{children:(0,n.jsx)(x.ListItemTitle,{children:e})}),(0,n.jsx)(x.ListItemActions,{children:(0,n.jsx)("button",{"aria-label":d?d.replace("{item}",e):`Remove ${e}`,className:(0,_.cn)("inline-flex size-9 cursor-pointer items-center justify-center rounded-full","text-muted-foreground","focus-visible:shadow-default outline-none","duration-fast transition-colors ease-out","disabled:pointer-events-none disabled:opacity-50"),"data-hook":`${t}-remove-${i}`,disabled:r,type:"button",onClick:()=>m(i),children:(0,n.jsx)(S.X,{})})})]})})},h[i]))})})}R.displayName="InputListItems";var v=s.forwardRef(({dataHook:t,error:o=!1,className:p,...r},d)=>{const{inputValue:u,setInputValue:g,addItems:m}=y(),h=e=>{e.key==="Enter"&&(e.preventDefault(),m([u])),r.onKeyDown?.(e)},I=e=>{const i=e.clipboardData.getData("text").split(`
2
2
  `);i.length>1&&(e.preventDefault(),m(i)),r.onPaste?.(e)};return(0,n.jsx)(A.Input,{ref:d,...r,className:(0,_.cn)("flex-1",p),dataHook:t,error:o,value:u,onChange:e=>{g(e.target.value),r.onChange?.(e)},onKeyDown:h,onPaste:I})});v.displayName="InputListInput";var C=s.forwardRef(({dataHook:t,children:o,...p},r)=>{const{inputValue:d,addItems:u}=y();return(0,n.jsx)(P.Button,{ref:r,...p,dataHook:t,onClick:()=>u([d]),children:o})});C.displayName="InputListAddButton";exports.InputList=q;exports.InputListAddButton=C;exports.InputListInput=v;exports.InputListItems=R;exports.useInputListContext=y;
@@ -1 +1 @@
1
- {"version":3,"file":"input-list.d.ts","sourceRoot":"","sources":["../../src/blocks/input-list.tsx"],"names":[],"mappings":"AAEA,OAA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;kBA3FQ,cAAc;;;AAmGvB;;;;;;GAMG;AACH,MAAM,WAAW,mBAAoB,SAAQ,IAAI,CAC/C,KAAK,CAAC,wBAAwB,CAAC,OAAO,CAAC,EACvC,OAAO,GAAG,MAAM,CACjB;IACC;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB;AAED;;;;;;;;GAQG;AACH,QAAA,MAAM,cAAc,8FAuCnB,CAAC;AAOF;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,CAAC;AAEnE;;;;;;;;GAQG;AACH,QAAA,MAAM,kBAAkB,gHAgBtB,CAAC;AAOH,OAAO,EACL,SAAS,EACT,cAAc,EACd,cAAc,EACd,kBAAkB,EAClB,mBAAmB,GACpB,CAAC"}
@@ -1,72 +1,72 @@
1
1
  "use client";
2
2
  import { Button as N } from "../button.js";
3
3
  import { Input as w } from "../input.js";
4
- import { Item as L, ItemActions as C, ItemContent as P, ItemTitle as A } from "../list.js";
4
+ import { ListItem as k, ListItemActions as C, ListItemContent as P, ListItemTitle as A } from "../list.js";
5
5
  import { SPRING_SNAPPY as D } from "../lib/motion.js";
6
- import * as i from "react";
6
+ import * as l from "react";
7
7
  import { X as K } from "@brightlocal/icons";
8
8
  import { cn as y } from "@brightlocal/ui-components/lib/utils";
9
9
  import { jsx as n, jsxs as S } from "react/jsx-runtime";
10
10
  import { AnimatePresence as _, motion as $ } from "framer-motion";
11
11
  import { usePrefersReducedMotion as B } from "@brightlocal/ui-components/hooks/use-prefers-reduced-motion";
12
- var b = i.createContext(null);
12
+ var b = l.createContext(null);
13
13
  function x() {
14
- const t = i.useContext(b);
14
+ const t = l.useContext(b);
15
15
  if (!t) throw new Error("InputList components must be used within an <InputList>");
16
16
  return t;
17
17
  }
18
- function V({ value: t, onValueChange: a, children: m, className: s, dataHook: d, trackingEl: u, trackingLabel: I }) {
19
- const [p, h] = i.useState(""), g = i.useRef(t.length), [e, o] = i.useState(() => ({
18
+ function V({ value: t, onValueChange: s, children: m, className: a, dataHook: d, trackingEl: u, trackingLabel: I }) {
19
+ const [p, h] = l.useState(""), g = l.useRef(t.length), [e, o] = l.useState(() => ({
20
20
  keys: t.map((r, c) => c),
21
21
  nextId: t.length,
22
22
  pendingRemoval: null
23
23
  }));
24
- let l = e.keys;
25
- if (l.length !== t.length) {
26
- const r = t.length > l.length ? {
27
- keys: [...l, ...Array.from({ length: t.length - l.length }, (c, f) => e.nextId + f)],
28
- nextId: e.nextId + (t.length - l.length),
24
+ let i = e.keys;
25
+ if (i.length !== t.length) {
26
+ const r = t.length > i.length ? {
27
+ keys: [...i, ...Array.from({ length: t.length - i.length }, (c, f) => e.nextId + f)],
28
+ nextId: e.nextId + (t.length - i.length),
29
29
  pendingRemoval: null
30
30
  } : {
31
- keys: e.pendingRemoval !== null && l.length - t.length === 1 ? l.filter((c, f) => f !== e.pendingRemoval) : l.slice(0, t.length),
31
+ keys: e.pendingRemoval !== null && i.length - t.length === 1 ? i.filter((c, f) => f !== e.pendingRemoval) : i.slice(0, t.length),
32
32
  nextId: e.nextId,
33
33
  pendingRemoval: null
34
34
  };
35
- l = r.keys, o(r);
35
+ i = r.keys, o(r);
36
36
  } else e.pendingRemoval !== null && o({
37
37
  ...e,
38
38
  pendingRemoval: null
39
39
  });
40
- i.useEffect(() => {
40
+ l.useEffect(() => {
41
41
  const r = g.current;
42
42
  g.current = t.length, t.length > r && h("");
43
43
  }, [t]);
44
- const R = i.useCallback((r) => {
44
+ const L = l.useCallback((r) => {
45
45
  const c = r.map((f) => f.trim()).filter(Boolean);
46
- c.length && a([...t, ...c]);
47
- }, [t, a]), k = i.useCallback((r) => {
46
+ c.length && s([...t, ...c]);
47
+ }, [t, s]), R = l.useCallback((r) => {
48
48
  o((c) => ({
49
49
  ...c,
50
50
  pendingRemoval: r
51
- })), a(t.filter((c, f) => f !== r));
52
- }, [t, a]), v = i.useMemo(() => ({
51
+ })), s(t.filter((c, f) => f !== r));
52
+ }, [t, s]), v = l.useMemo(() => ({
53
53
  value: t,
54
54
  inputValue: p,
55
55
  setInputValue: h,
56
- addItems: R,
57
- removeItem: k,
58
- stableKeys: l
56
+ addItems: L,
57
+ removeItem: R,
58
+ stableKeys: i
59
59
  }), [
60
60
  t,
61
61
  p,
62
+ L,
62
63
  R,
63
- k,
64
- l
64
+ i
65
65
  ]);
66
66
  return /* @__PURE__ */ n(b.Provider, {
67
67
  value: v,
68
68
  children: /* @__PURE__ */ n("div", {
69
- className: y("flex flex-col gap-4", s),
69
+ className: y("flex flex-col gap-4", a),
70
70
  "data-hook": d,
71
71
  "data-slot": "input-list",
72
72
  "data-tracking-el": u,
@@ -76,12 +76,12 @@ function V({ value: t, onValueChange: a, children: m, className: s, dataHook: d,
76
76
  });
77
77
  }
78
78
  V.displayName = "InputList";
79
- function j({ dataHook: t = "input-list", loading: a = !1, skeletonCount: m = 5, disabled: s = !1, removeAriaLabel: d, className: u }) {
79
+ function j({ dataHook: t = "input-list", loading: s = !1, skeletonCount: m = 5, disabled: a = !1, removeAriaLabel: d, className: u }) {
80
80
  const { value: I, removeItem: p, stableKeys: h } = x(), g = B();
81
- return a ? /* @__PURE__ */ n("ul", {
81
+ return s ? /* @__PURE__ */ n("ul", {
82
82
  className: y("flex flex-col gap-2", u),
83
83
  "data-slot": "input-list-skeleton",
84
- children: Array.from({ length: m }).map((e, o) => /* @__PURE__ */ n(L, { variant: "loading" }, o))
84
+ children: Array.from({ length: m }).map((e, o) => /* @__PURE__ */ n(k, { variant: "loading" }, o))
85
85
  }) : /* @__PURE__ */ n("ul", {
86
86
  className: y("flex flex-col gap-2", u),
87
87
  "data-hook": `${t}-list`,
@@ -113,14 +113,14 @@ function j({ dataHook: t = "input-list", loading: a = !1, skeletonCount: m = 5,
113
113
  scale: { duration: 0.15 },
114
114
  layout: D
115
115
  },
116
- children: /* @__PURE__ */ n(L, {
116
+ children: /* @__PURE__ */ n(k, {
117
117
  asChild: !0,
118
118
  variant: "filled",
119
119
  children: /* @__PURE__ */ S("div", { children: [/* @__PURE__ */ n(P, { children: /* @__PURE__ */ n(A, { children: e }) }), /* @__PURE__ */ n(C, { children: /* @__PURE__ */ n("button", {
120
120
  "aria-label": d ? d.replace("{item}", e) : `Remove ${e}`,
121
121
  className: y("inline-flex size-9 cursor-pointer items-center justify-center rounded-full", "text-muted-foreground", "focus-visible:shadow-default outline-none", "duration-fast transition-colors ease-out", "disabled:pointer-events-none disabled:opacity-50"),
122
122
  "data-hook": `${t}-remove-${o}`,
123
- disabled: s,
123
+ disabled: a,
124
124
  type: "button",
125
125
  onClick: () => p(o),
126
126
  children: /* @__PURE__ */ n(K, {})
@@ -131,37 +131,37 @@ function j({ dataHook: t = "input-list", loading: a = !1, skeletonCount: m = 5,
131
131
  });
132
132
  }
133
133
  j.displayName = "InputListItems";
134
- var E = i.forwardRef(({ dataHook: t, error: a = !1, className: m, ...s }, d) => {
134
+ var E = l.forwardRef(({ dataHook: t, error: s = !1, className: m, ...a }, d) => {
135
135
  const { inputValue: u, setInputValue: I, addItems: p } = x(), h = (e) => {
136
- e.key === "Enter" && (e.preventDefault(), p([u])), s.onKeyDown?.(e);
136
+ e.key === "Enter" && (e.preventDefault(), p([u])), a.onKeyDown?.(e);
137
137
  }, g = (e) => {
138
138
  const o = e.clipboardData.getData("text").split(`
139
139
  `);
140
- o.length > 1 && (e.preventDefault(), p(o)), s.onPaste?.(e);
140
+ o.length > 1 && (e.preventDefault(), p(o)), a.onPaste?.(e);
141
141
  };
142
142
  return /* @__PURE__ */ n(w, {
143
143
  ref: d,
144
- ...s,
144
+ ...a,
145
145
  className: y("flex-1", m),
146
146
  dataHook: t,
147
- error: a,
147
+ error: s,
148
148
  value: u,
149
149
  onChange: (e) => {
150
- I(e.target.value), s.onChange?.(e);
150
+ I(e.target.value), a.onChange?.(e);
151
151
  },
152
152
  onKeyDown: h,
153
153
  onPaste: g
154
154
  });
155
155
  });
156
156
  E.displayName = "InputListInput";
157
- var M = i.forwardRef(({ dataHook: t, children: a, ...m }, s) => {
157
+ var M = l.forwardRef(({ dataHook: t, children: s, ...m }, a) => {
158
158
  const { inputValue: d, addItems: u } = x();
159
159
  return /* @__PURE__ */ n(N, {
160
- ref: s,
160
+ ref: a,
161
161
  ...m,
162
162
  dataHook: t,
163
163
  onClick: () => u([d]),
164
- children: a
164
+ children: s
165
165
  });
166
166
  });
167
167
  M.displayName = "InputListAddButton";
@@ -0,0 +1 @@
1
+ "use client";const h=require("./_virtual/_rolldown/runtime.cjs");let t=require("react");t=h.__toESM(t,1);let d=require("@brightlocal/ui-components/lib/utils"),n=require("react/jsx-runtime"),u=require("class-variance-authority");var c=t.createContext({layout:"inline",align:"start",autoTerm:!1}),f=(0,u.cva)("min-w-0",{variants:{layout:{inline:"flex flex-col",stacked:"flex flex-col",responsive:"flex flex-col",container:"flex flex-col",grid:"grid grid-cols-[repeat(auto-fill,minmax(8rem,1fr))] gap-x-6 gap-y-4"},divided:{true:["divide-border divide-y","[&>[data-slot=description-list-item]]:py-3","[&>[data-slot=description-list-item]:first-child]:pt-0","[&>[data-slot=description-list-item]:last-child]:pb-0"],false:""}},compoundVariants:[{layout:"inline",divided:!1,className:"gap-3"},{layout:"stacked",divided:!1,className:"gap-3"},{layout:"responsive",divided:!1,className:"gap-3"},{layout:"container",divided:!1,className:"gap-3"}],defaultVariants:{layout:"inline",divided:!1}}),N=(0,u.cva)("flex min-w-0",{variants:{layout:{inline:"flex-row items-baseline gap-4",stacked:"flex-col gap-1",responsive:"flex-col gap-1 sm:flex-row sm:items-baseline sm:gap-4",container:"flex-col gap-1 @md:flex-row @md:items-baseline @md:gap-4",grid:"flex-col gap-1"}},defaultVariants:{layout:"inline"}}),k=(0,u.cva)("text-muted-foreground text-body-sm shrink-0",{variants:{layout:{inline:"w-(--dl-term-width)",stacked:"",responsive:"sm:w-(--dl-term-width)",container:"@md:w-(--dl-term-width)",grid:""}},defaultVariants:{layout:"inline"}}),T={inline:"grid grid-cols-[max-content_1fr] gap-x-4",responsive:"sm:grid sm:grid-cols-[max-content_1fr] sm:gap-x-4",container:"@md:grid @md:grid-cols-[max-content_1fr] @md:gap-x-4"},j={inline:"col-span-2 grid grid-cols-subgrid",responsive:"sm:col-span-2 sm:grid sm:grid-cols-subgrid",container:"@md:col-span-2 @md:grid @md:grid-cols-subgrid"},I=["inline","responsive","container"],x=t.forwardRef(({className:a,style:r,layout:e="inline",termWidth:s=128,align:i="start",divided:l=!1,dataHook:o,trackingEl:m,trackingLabel:D,...L},b)=>{const p=I.includes(e)&&!(i==="end"&&e==="inline")&&s==="auto",_=t.useMemo(()=>({layout:e,align:i,autoTerm:p}),[e,i,p]);return(0,n.jsx)(c.Provider,{value:_,children:(0,n.jsx)("dl",{ref:b,className:(0,d.cn)(f({layout:e,divided:e==="grid"?!1:l}),p&&T[e],a),"data-align":i,"data-hook":o,"data-layout":e,"data-slot":"description-list","data-tracking-el":m||"description-list","data-tracking-label":D,style:{...typeof s=="number"&&{"--dl-term-width":`${s}px`},...r},...L})})});x.displayName="DescriptionList";var g=t.forwardRef(({className:a,dataHook:r,...e},s)=>{const{layout:i,align:l,autoTerm:o}=t.useContext(c),m=l==="end"&&i==="inline";return(0,n.jsx)("div",{ref:s,className:(0,d.cn)(N({layout:i}),m&&"justify-between",o&&j[i],a),"data-hook":r,"data-slot":"description-list-item",...e})});g.displayName="DescriptionListItem";var v=t.forwardRef(({className:a,dataHook:r,...e},s)=>{const{layout:i,align:l,autoTerm:o}=t.useContext(c);return(0,n.jsx)("dt",{ref:s,className:(0,d.cn)(k({layout:l==="end"||o?"stacked":i}),a),"data-hook":r,"data-slot":"description-list-term",...e})});v.displayName="DescriptionListTerm";var y=t.forwardRef(({className:a,color:r="foreground",dataHook:e,...s},i)=>{const{layout:l,align:o}=t.useContext(c);return(0,n.jsx)("dd",{ref:i,className:(0,d.cn)("text-body-sm min-w-0 flex-1 break-words",r==="muted"?"text-muted-foreground":"text-foreground",o==="end"&&l==="inline"&&"text-right tabular-nums",a),"data-hook":e,"data-slot":"description-list-details",...s})});y.displayName="DescriptionListDetails";var w=t.forwardRef(({className:a,icon:r,children:e,...s},i)=>(0,n.jsxs)("span",{ref:i,className:(0,d.cn)("inline-flex max-w-full items-center gap-2 align-bottom [&_svg:not([class*='size-'])]:size-4",a),"data-slot":"description-list-icon-text",...s,children:[(0,n.jsx)("span",{"aria-hidden":"true",className:"inline-flex size-4 shrink-0 items-center justify-center",children:r}),(0,n.jsx)("span",{className:"min-w-0",children:e})]}));w.displayName="DescriptionListIconText";exports.DescriptionList=x;exports.DescriptionListDetails=y;exports.DescriptionListIconText=w;exports.DescriptionListItem=g;exports.DescriptionListTerm=v;exports.descriptionListVariants=f;