@brightlocal/ui-components 2.24.1 → 2.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/component-meta.json +93 -79
- package/dist/accordion.cjs +1 -1
- package/dist/accordion.js +2 -2
- package/dist/alert-dialog.cjs +1 -1
- package/dist/alert-dialog.js +17 -17
- package/dist/badge.cjs +1 -1
- package/dist/badge.js +9 -9
- package/dist/blocks/input-list.cjs +2 -2
- package/dist/blocks/input-list.d.ts.map +1 -1
- package/dist/blocks/input-list.js +43 -46
- package/dist/blocks/sidebar.cjs +1 -1
- package/dist/blocks/sidebar.js +14 -14
- package/dist/brand-illustration-motif.cjs +1 -1
- package/dist/brand-illustration-motif.js +11 -11
- package/dist/breadcrumb.cjs +1 -1
- package/dist/breadcrumb.js +1 -1
- package/dist/button.cjs +1 -1
- package/dist/button.js +10 -10
- package/dist/card.cjs +1 -1
- package/dist/card.js +1 -1
- package/dist/carousel.cjs +1 -1
- package/dist/carousel.js +12 -12
- package/dist/checkbox.cjs +1 -1
- package/dist/checkbox.js +7 -7
- package/dist/chip.cjs +1 -1
- package/dist/chip.js +7 -7
- package/dist/combobox.cjs +1 -1
- package/dist/combobox.js +1 -1
- package/dist/data-table.d.ts +29 -0
- package/dist/data-table.d.ts.map +1 -1
- package/dist/dialog.cjs +1 -1
- package/dist/dialog.js +61 -61
- package/dist/field.cjs +1 -1
- package/dist/field.js +1 -1
- package/dist/height-transition.cjs +1 -0
- package/dist/height-transition.d.ts +44 -0
- package/dist/height-transition.d.ts.map +1 -0
- package/dist/height-transition.js +63 -0
- 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 +326 -324
- package/dist/input-chip.cjs +1 -1
- package/dist/input-chip.js +2 -2
- package/dist/input-group.cjs +1 -1
- package/dist/input-group.js +15 -15
- package/dist/input-otp.cjs +1 -1
- package/dist/input-otp.js +1 -1
- package/dist/input.cjs +1 -1
- package/dist/input.js +1 -1
- package/dist/lib/motion.cjs +1 -0
- package/dist/lib/motion.d.ts +70 -0
- package/dist/lib/motion.d.ts.map +1 -0
- package/dist/lib/motion.js +25 -0
- package/dist/lib/utils.cjs +1 -1
- package/dist/lib/utils.d.ts +1 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/utils.js +12 -4
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +17 -16
- package/dist/list.cjs +1 -1
- package/dist/list.js +10 -10
- package/dist/loading.cjs +1 -1
- package/dist/loading.d.ts.map +1 -1
- package/dist/loading.js +45 -47
- package/dist/map.cjs +1 -1
- package/dist/map.d.ts.map +1 -1
- package/dist/map.js +2 -2
- package/dist/menubar.cjs +1 -1
- package/dist/menubar.js +5 -5
- package/dist/navigation-menu.cjs +1 -1
- package/dist/navigation-menu.js +13 -13
- package/dist/pagination.cjs +1 -1
- package/dist/pagination.js +1 -1
- package/dist/progress.cjs +1 -1
- package/dist/progress.d.ts.map +1 -1
- package/dist/progress.js +21 -25
- package/dist/radio-group.cjs +1 -1
- package/dist/radio-group.js +12 -12
- package/dist/scroll-area.cjs +1 -1
- package/dist/scroll-area.js +11 -11
- package/dist/select.cjs +1 -1
- package/dist/select.js +12 -12
- package/dist/sheet.cjs +1 -1
- package/dist/sheet.d.ts.map +1 -1
- package/dist/sheet.js +54 -50
- package/dist/slider.cjs +1 -1
- package/dist/slider.js +13 -13
- package/dist/stepper.cjs +1 -1
- package/dist/stepper.js +4 -4
- package/dist/switch.cjs +1 -1
- package/dist/switch.js +5 -5
- package/dist/table.cjs +1 -1
- package/dist/table.js +2 -2
- package/dist/tabs.cjs +1 -1
- package/dist/tabs.js +1 -1
- package/dist/text-reveal-motion.cjs +1 -1
- package/dist/text-reveal-motion.d.ts.map +1 -1
- package/dist/text-reveal-motion.js +77 -79
- package/dist/textarea.cjs +1 -1
- package/dist/textarea.js +11 -11
- package/dist/toggle.cjs +1 -1
- package/dist/toggle.js +5 -5
- package/package.json +13 -4
- package/src/blocks/input-list.tsx +3 -6
- package/src/blocks/sidebar.tsx +14 -14
- package/src/components/accordion.tsx +2 -2
- package/src/components/alert-dialog.tsx +2 -2
- package/src/components/badge.tsx +1 -1
- package/src/components/brand-illustration-motif.tsx +1 -1
- package/src/components/breadcrumb.tsx +1 -1
- package/src/components/button.tsx +2 -2
- package/src/components/card.tsx +1 -1
- package/src/components/carousel.tsx +1 -1
- package/src/components/checkbox.tsx +1 -1
- package/src/components/chip.tsx +2 -2
- package/src/components/combobox.tsx +1 -1
- package/src/components/data-table.tsx +29 -0
- package/src/components/dialog.tsx +3 -3
- package/src/components/field.tsx +1 -1
- package/src/components/height-transition.tsx +164 -0
- package/src/components/input-chip.tsx +2 -2
- package/src/components/input-group.tsx +2 -2
- package/src/components/input-otp.tsx +1 -1
- package/src/components/input.tsx +1 -1
- package/src/components/link.tsx +4 -3
- package/src/components/list.tsx +1 -1
- package/src/components/loading.tsx +2 -15
- package/src/components/map.tsx +3 -2
- package/src/components/menubar.tsx +5 -5
- package/src/components/navigation-menu.tsx +6 -6
- package/src/components/pagination.tsx +1 -1
- package/src/components/progress.tsx +2 -10
- package/src/components/radio-group.tsx +1 -1
- package/src/components/scroll-area.tsx +2 -2
- package/src/components/select.tsx +1 -1
- package/src/components/sheet.tsx +9 -5
- package/src/components/slider.tsx +1 -1
- package/src/components/stepper.tsx +4 -4
- package/src/components/switch.tsx +2 -2
- package/src/components/table.tsx +2 -2
- package/src/components/tabs.tsx +1 -1
- package/src/components/text-reveal-motion.tsx +3 -8
- package/src/components/textarea.tsx +1 -1
- package/src/components/toggle.tsx +1 -1
- package/src/index.ts +1 -0
- package/src/lib/motion.ts +75 -0
- package/src/lib/utils.ts +14 -2
package/README.md
CHANGED
|
@@ -24,7 +24,7 @@ pnpm add @brightlocal/tokens
|
|
|
24
24
|
|
|
25
25
|
## Components
|
|
26
26
|
|
|
27
|
-
This package includes
|
|
27
|
+
This package includes 69 components and 2 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
|
|
|
@@ -32,6 +32,7 @@ This package includes 67 components and 3 blocks built on Radix UI primitives an
|
|
|
32
32
|
- **Card** - Container for content with consistent styling
|
|
33
33
|
- **CentredLayout** - Centers content horizontally
|
|
34
34
|
- **GlobalLayout** - Full-page layout wrapper
|
|
35
|
+
- **HeightTransition** - Smoothly transitions its height when children's natural height changes
|
|
35
36
|
- **ResizablePanel** - Panels that can be resized by users
|
|
36
37
|
- **ScrollArea** - Custom scrollable areas with styled scrollbars
|
|
37
38
|
- **Separator** - Visual divider between content with configurable spacing
|
package/component-meta.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlocal/ui-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.25.0",
|
|
4
4
|
"description": "Machine-readable registry of all components in the BrightLocal Design System",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
@@ -857,6 +857,85 @@
|
|
|
857
857
|
"props": [],
|
|
858
858
|
"description": "Right-click context menu"
|
|
859
859
|
},
|
|
860
|
+
{
|
|
861
|
+
"name": "DataTable",
|
|
862
|
+
"import": "@brightlocal/ui-components/data-table",
|
|
863
|
+
"category": "display",
|
|
864
|
+
"exports": [
|
|
865
|
+
"DataTable",
|
|
866
|
+
"DataTableBulkActions",
|
|
867
|
+
"DataTableBulkActionsActions",
|
|
868
|
+
"DataTableBulkActionsSummary",
|
|
869
|
+
"DataTableColumnHeader",
|
|
870
|
+
"DataTablePagination",
|
|
871
|
+
"DataTablePaginationNav",
|
|
872
|
+
"DataTablePaginationRowCount",
|
|
873
|
+
"DataTableSearch",
|
|
874
|
+
"DataTableSelectAllCheckbox",
|
|
875
|
+
"DataTableSelectRowCheckbox",
|
|
876
|
+
"DataTableToolbar",
|
|
877
|
+
"DataTableToolbarLeft",
|
|
878
|
+
"DataTableToolbarRight",
|
|
879
|
+
"VirtualizedDataTable",
|
|
880
|
+
"useDataTable",
|
|
881
|
+
"useDataTableBulkActionsContext"
|
|
882
|
+
],
|
|
883
|
+
"compound": true,
|
|
884
|
+
"dataHookRequired": true,
|
|
885
|
+
"variants": {},
|
|
886
|
+
"props": [
|
|
887
|
+
"columns",
|
|
888
|
+
"data",
|
|
889
|
+
"enableSorting",
|
|
890
|
+
"enableGlobalFiltering",
|
|
891
|
+
"enableRowSelection",
|
|
892
|
+
"enablePagination",
|
|
893
|
+
"pageSize",
|
|
894
|
+
"isLoading",
|
|
895
|
+
"skeletonRowCount",
|
|
896
|
+
"noResultsMessage",
|
|
897
|
+
"layout",
|
|
898
|
+
"minWidth",
|
|
899
|
+
"scrollRegionLabel",
|
|
900
|
+
"stickyHeader",
|
|
901
|
+
"footer",
|
|
902
|
+
"className"
|
|
903
|
+
],
|
|
904
|
+
"i18nProps": {
|
|
905
|
+
"DataTable": {
|
|
906
|
+
"scrollRegionLabel": "string — default: \"Scrollable table\"",
|
|
907
|
+
"noResultsMessage": "string — default: \"No results.\""
|
|
908
|
+
},
|
|
909
|
+
"DataTableColumnHeader": {
|
|
910
|
+
"getSortLabel": "(title: string, direction: \"asc\" | \"desc\" | false) => string"
|
|
911
|
+
},
|
|
912
|
+
"DataTableSearch": {
|
|
913
|
+
"ariaLabel": "string — default: \"Search table\"",
|
|
914
|
+
"placeholder": "string — default: \"Search...\"",
|
|
915
|
+
"clearSearchAriaLabel": "string — default: \"Clear search\""
|
|
916
|
+
},
|
|
917
|
+
"DataTablePaginationNav": {
|
|
918
|
+
"ariaLabel": "string — default: \"Table pagination\""
|
|
919
|
+
},
|
|
920
|
+
"DataTablePagination": {
|
|
921
|
+
"ariaLabel": "string — default: \"Table pagination\"",
|
|
922
|
+
"renderRowCount": "(info: RowCountRenderInfo) => React.ReactNode — default: renders \"{startRow}-{endRow} of {totalRows}\""
|
|
923
|
+
},
|
|
924
|
+
"DataTablePaginationRowCount": {
|
|
925
|
+
"renderText": "(info: RowCountRenderInfo) => React.ReactNode — default: renders \"{startRow}-{endRow} of {totalRows}\""
|
|
926
|
+
},
|
|
927
|
+
"DataTableSelectAllCheckbox": {
|
|
928
|
+
"selectAllAriaLabel": "string — default: \"Select all\""
|
|
929
|
+
},
|
|
930
|
+
"DataTableSelectRowCheckbox": {
|
|
931
|
+
"selectRowAriaLabel": "string — default: \"Select row\""
|
|
932
|
+
},
|
|
933
|
+
"DataTableBulkActionsSummary": {
|
|
934
|
+
"children": "React.ReactNode | ((info: { selectedCount: number; totalCount: number }) => React.ReactNode) — default: \"{selectedCount} of {totalCount} row(s) selected.\""
|
|
935
|
+
}
|
|
936
|
+
},
|
|
937
|
+
"description": "Composable data table built on TanStack Table. Exposes `useDataTable` hook + `DataTable` / `VirtualizedDataTable` renderers + toolbar layout + pagination and search helpers. Compose the table and its companions (DataTableToolbar rows, bulk actions) as ONE slot — a single flex-column wrapper — inside gapped parents like DialogContent or Card, so the parent's gap applies around the table block, not between the toolbars and the table; the toolbars' built-in padding provides the internal spacing."
|
|
938
|
+
},
|
|
860
939
|
{
|
|
861
940
|
"name": "DatePicker",
|
|
862
941
|
"import": "@brightlocal/ui-components/date-picker",
|
|
@@ -1199,6 +1278,19 @@
|
|
|
1199
1278
|
],
|
|
1200
1279
|
"description": "Top-level page header container"
|
|
1201
1280
|
},
|
|
1281
|
+
{
|
|
1282
|
+
"name": "HeightTransition",
|
|
1283
|
+
"import": "@brightlocal/ui-components/height-transition",
|
|
1284
|
+
"category": "layout",
|
|
1285
|
+
"exports": [
|
|
1286
|
+
"HeightTransition"
|
|
1287
|
+
],
|
|
1288
|
+
"compound": false,
|
|
1289
|
+
"dataHookRequired": true,
|
|
1290
|
+
"variants": {},
|
|
1291
|
+
"props": [],
|
|
1292
|
+
"description": "Wrapper that smoothly transitions its height (fixed 200ms) when children's natural height changes (content swaps, filtering); reduced motion handled by the DS global kill-switch"
|
|
1293
|
+
},
|
|
1202
1294
|
{
|
|
1203
1295
|
"name": "HoverCard",
|
|
1204
1296
|
"import": "@brightlocal/ui-components/hover-card",
|
|
@@ -2572,84 +2664,6 @@
|
|
|
2572
2664
|
}
|
|
2573
2665
|
],
|
|
2574
2666
|
"blocks": [
|
|
2575
|
-
{
|
|
2576
|
-
"name": "DataTable",
|
|
2577
|
-
"import": "@brightlocal/ui-components/data-table",
|
|
2578
|
-
"category": "block",
|
|
2579
|
-
"exports": [
|
|
2580
|
-
"DataTable",
|
|
2581
|
-
"VirtualizedDataTable",
|
|
2582
|
-
"useDataTable",
|
|
2583
|
-
"useDataTableBulkActionsContext",
|
|
2584
|
-
"DataTableColumnHeader",
|
|
2585
|
-
"DataTableSearch",
|
|
2586
|
-
"DataTablePagination",
|
|
2587
|
-
"DataTablePaginationRowCount",
|
|
2588
|
-
"DataTablePaginationNav",
|
|
2589
|
-
"DataTableSelectAllCheckbox",
|
|
2590
|
-
"DataTableSelectRowCheckbox",
|
|
2591
|
-
"DataTableBulkActions",
|
|
2592
|
-
"DataTableBulkActionsSummary",
|
|
2593
|
-
"DataTableBulkActionsActions",
|
|
2594
|
-
"DataTableToolbar",
|
|
2595
|
-
"DataTableToolbarLeft",
|
|
2596
|
-
"DataTableToolbarRight"
|
|
2597
|
-
],
|
|
2598
|
-
"compound": true,
|
|
2599
|
-
"dataHookRequired": true,
|
|
2600
|
-
"variants": {},
|
|
2601
|
-
"props": [
|
|
2602
|
-
"columns",
|
|
2603
|
-
"data",
|
|
2604
|
-
"enableSorting",
|
|
2605
|
-
"enableGlobalFiltering",
|
|
2606
|
-
"enableRowSelection",
|
|
2607
|
-
"enablePagination",
|
|
2608
|
-
"pageSize",
|
|
2609
|
-
"isLoading",
|
|
2610
|
-
"noResultsMessage",
|
|
2611
|
-
"layout",
|
|
2612
|
-
"minWidth",
|
|
2613
|
-
"scrollRegionLabel",
|
|
2614
|
-
"stickyHeader",
|
|
2615
|
-
"footer",
|
|
2616
|
-
"className"
|
|
2617
|
-
],
|
|
2618
|
-
"i18nProps": {
|
|
2619
|
-
"DataTable": {
|
|
2620
|
-
"scrollRegionLabel": "string — default: \"Scrollable table\"",
|
|
2621
|
-
"noResultsMessage": "string — default: \"No results.\""
|
|
2622
|
-
},
|
|
2623
|
-
"DataTableColumnHeader": {
|
|
2624
|
-
"getSortLabel": "(title: string, direction: \"asc\" | \"desc\" | false) => string"
|
|
2625
|
-
},
|
|
2626
|
-
"DataTableSearch": {
|
|
2627
|
-
"ariaLabel": "string — default: \"Search table\"",
|
|
2628
|
-
"placeholder": "string — default: \"Search...\"",
|
|
2629
|
-
"clearSearchAriaLabel": "string — default: \"Clear search\""
|
|
2630
|
-
},
|
|
2631
|
-
"DataTablePaginationNav": {
|
|
2632
|
-
"ariaLabel": "string — default: \"Table pagination\""
|
|
2633
|
-
},
|
|
2634
|
-
"DataTablePagination": {
|
|
2635
|
-
"ariaLabel": "string — default: \"Table pagination\"",
|
|
2636
|
-
"renderRowCount": "(info: RowCountRenderInfo) => React.ReactNode — default: renders \"{startRow}-{endRow} of {totalRows}\""
|
|
2637
|
-
},
|
|
2638
|
-
"DataTablePaginationRowCount": {
|
|
2639
|
-
"renderText": "(info: RowCountRenderInfo) => React.ReactNode — default: renders \"{startRow}-{endRow} of {totalRows}\""
|
|
2640
|
-
},
|
|
2641
|
-
"DataTableSelectAllCheckbox": {
|
|
2642
|
-
"selectAllAriaLabel": "string — default: \"Select all\""
|
|
2643
|
-
},
|
|
2644
|
-
"DataTableSelectRowCheckbox": {
|
|
2645
|
-
"selectRowAriaLabel": "string — default: \"Select row\""
|
|
2646
|
-
},
|
|
2647
|
-
"DataTableBulkActionsSummary": {
|
|
2648
|
-
"children": "React.ReactNode | ((info: { selectedCount: number; totalCount: number }) => React.ReactNode) — default: \"{selectedCount} of {totalCount} row(s) selected.\""
|
|
2649
|
-
}
|
|
2650
|
-
},
|
|
2651
|
-
"description": "Composable data table built on TanStack Table. Exposes `useDataTable` hook + `DataTable` / `VirtualizedDataTable` renderers + toolbar layout + pagination and search helpers."
|
|
2652
|
-
},
|
|
2653
2667
|
{
|
|
2654
2668
|
"name": "InputList",
|
|
2655
2669
|
"import": "@brightlocal/ui-components/input-list",
|
package/dist/accordion.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),j=require("@radix-ui/react-accordion"),A=require("@brightlocal/icons"),c=require("@brightlocal/ui-components/lib/utils");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=g(y),r=g(j),b=i.forwardRef((e,a)=>{const{dataHook:t,trackingEl:o,trackingLabel:d,disabled:l,dir:s,orientation:u,className:m,children:f}=e;return e.type==="single"?n.jsx(r.Root,{ref:a,className:m,collapsible:e.collapsible,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"single",value:e.value,onValueChange:e.onValueChange,children:f}):n.jsx(r.Root,{ref:a,className:m,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"multiple",value:e.value,onValueChange:e.onValueChange,children:f})});b.displayName="Accordion";const v=i.forwardRef(({className:e,...a},t)=>n.jsx(r.Item,{ref:t,className:c.cn("border-b last:border-b-0",e),"data-slot":"accordion-item",...a}));v.displayName="AccordionItem";const h=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Header,{className:"flex",children:n.jsxs(r.Trigger,{ref:o,className:c.cn("focus-visible:border-ring focus-visible:shadow-default flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),"data-slot":"accordion-trigger",...t,children:[a,n.jsx(A.ChevronDown,{className:"text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),y=require("react"),j=require("@radix-ui/react-accordion"),A=require("@brightlocal/icons"),c=require("@brightlocal/ui-components/lib/utils");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return a.default=e,Object.freeze(a)}const i=g(y),r=g(j),b=i.forwardRef((e,a)=>{const{dataHook:t,trackingEl:o,trackingLabel:d,disabled:l,dir:s,orientation:u,className:m,children:f}=e;return e.type==="single"?n.jsx(r.Root,{ref:a,className:m,collapsible:e.collapsible,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"single",value:e.value,onValueChange:e.onValueChange,children:f}):n.jsx(r.Root,{ref:a,className:m,"data-hook":t,"data-slot":"accordion","data-tracking-el":o,"data-tracking-label":d,defaultValue:e.defaultValue,dir:s,disabled:l,orientation:u,type:"multiple",value:e.value,onValueChange:e.onValueChange,children:f})});b.displayName="Accordion";const v=i.forwardRef(({className:e,...a},t)=>n.jsx(r.Item,{ref:t,className:c.cn("border-b last:border-b-0",e),"data-slot":"accordion-item",...a}));v.displayName="AccordionItem";const h=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Header,{className:"flex",children:n.jsxs(r.Trigger,{ref:o,className:c.cn("focus-visible:border-ring focus-visible:shadow-default duration-fast flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow ease-out outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",e),"data-slot":"accordion-trigger",...t,children:[a,n.jsx(A.ChevronDown,{className:"text-muted-foreground duration-base pointer-events-none shrink-0 translate-y-0.5 transition-transform ease-in-out"})]})}));h.displayName="AccordionTrigger";const x=i.forwardRef(({className:e,children:a,...t},o)=>n.jsx(r.Content,{ref:o,className:"data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down overflow-hidden text-sm","data-slot":"accordion-content",...t,children:n.jsx("div",{className:c.cn("pt-0 pb-4",e),children:a})}));x.displayName="AccordionContent";exports.Accordion=b;exports.AccordionContent=x;exports.AccordionItem=v;exports.AccordionTrigger=h;
|
package/dist/accordion.js
CHANGED
|
@@ -71,14 +71,14 @@ const y = r.forwardRef(({ className: a, children: e, ...t }, n) => /* @__PURE__
|
|
|
71
71
|
{
|
|
72
72
|
ref: n,
|
|
73
73
|
className: d(
|
|
74
|
-
"focus-visible:border-ring focus-visible:shadow-default flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
74
|
+
"focus-visible:border-ring focus-visible:shadow-default duration-fast flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-shadow ease-out outline-none hover:underline disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180",
|
|
75
75
|
a
|
|
76
76
|
),
|
|
77
77
|
"data-slot": "accordion-trigger",
|
|
78
78
|
...t,
|
|
79
79
|
children: [
|
|
80
80
|
e,
|
|
81
|
-
/* @__PURE__ */ o(b, { className: "text-muted-foreground pointer-events-none shrink-0 translate-y-0.5 transition-transform
|
|
81
|
+
/* @__PURE__ */ o(b, { className: "text-muted-foreground duration-base pointer-events-none shrink-0 translate-y-0.5 transition-transform ease-in-out" })
|
|
82
82
|
]
|
|
83
83
|
}
|
|
84
84
|
) }));
|
package/dist/alert-dialog.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"),N=require("react"),b=require("@radix-ui/react-alert-dialog"),s=require("@brightlocal/ui-components/lib/utils"),w=require("@brightlocal/ui-components/hooks/use-overlay-pointer-lock"),c=require("@brightlocal/ui-components/button");function g(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(e,a,i.get?i:{enumerable:!0,get:()=>t[a]})}}return e.default=t,Object.freeze(e)}const l=g(N),r=g(b);function u({dataHook:t,trackingEl:e,trackingLabel:a,...i}){return o.jsx(r.Root,{"data-hook":t,"data-slot":"alert-dialog","data-tracking-el":e,"data-tracking-label":a,...i})}u.displayName="AlertDialog";const f=l.forwardRef((t,e)=>o.jsx(r.Trigger,{ref:e,"data-slot":"alert-dialog-trigger",...t}));f.displayName="AlertDialogTrigger";function n({...t}){return o.jsx(r.Portal,{...t})}n.displayName="AlertDialogPortal";const d=l.forwardRef(({className:t,...e},a)=>o.jsx(r.Overlay,{ref:a,className:s.cn("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:duration-slow fixed inset-0 z-50 bg-black/50 ease-out data-[state=closed]:duration-250 data-[state=closed]:ease-in",t),"data-slot":"alert-dialog-overlay",...e}));d.displayName="AlertDialogOverlay";const m=l.forwardRef(({className:t,...e},a)=>(w.useOverlayPointerLock(),o.jsxs(n,{children:[o.jsx(d,{}),o.jsx(r.Content,{ref:a,className:s.cn("border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:duration-slow fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg ease-out data-[state=closed]:duration-250 data-[state=closed]:ease-in sm:max-w-lg",t),"data-slot":"alert-dialog-content",...e})]})));m.displayName="AlertDialogContent";const D=l.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("flex flex-col gap-2 text-center sm:text-left",t),"data-slot":"alert-dialog-header",...e}));D.displayName="AlertDialogHeader";const A=l.forwardRef(({className:t,...e},a)=>o.jsx("div",{ref:a,className:s.cn("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",t),"data-slot":"alert-dialog-footer",...e}));A.displayName="AlertDialogFooter";const p=l.forwardRef(({className:t,dataHook:e,...a},i)=>o.jsx(r.Title,{ref:i,className:s.cn("text-lg font-semibold",t),"data-hook":e,"data-slot":"alert-dialog-title",...a}));p.displayName="AlertDialogTitle";const x=l.forwardRef(({className:t,dataHook:e,...a},i)=>o.jsx(r.Description,{ref:i,className:s.cn("text-muted-foreground text-sm",t),"data-hook":e,"data-slot":"alert-dialog-description",...a}));x.displayName="AlertDialogDescription";const y=l.forwardRef(({className:t,...e},a)=>o.jsx(r.Action,{ref:a,className:s.cn(c.ButtonVariants(),t),"data-slot":"alert-dialog-action",...e}));y.displayName="AlertDialogAction";const j=l.forwardRef(({className:t,...e},a)=>o.jsx(r.Cancel,{ref:a,className:s.cn(c.ButtonVariants({variant:"outline"}),t),"data-slot":"alert-dialog-cancel",...e}));j.displayName="AlertDialogCancel";exports.AlertDialog=u;exports.AlertDialogAction=y;exports.AlertDialogCancel=j;exports.AlertDialogContent=m;exports.AlertDialogDescription=x;exports.AlertDialogFooter=A;exports.AlertDialogHeader=D;exports.AlertDialogOverlay=d;exports.AlertDialogPortal=n;exports.AlertDialogTitle=p;exports.AlertDialogTrigger=f;
|
package/dist/alert-dialog.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import { jsx as o, jsxs as
|
|
1
|
+
import { jsx as o, jsxs as g } from "react/jsx-runtime";
|
|
2
2
|
import * as l from "react";
|
|
3
3
|
import * as r from "@radix-ui/react-alert-dialog";
|
|
4
4
|
import { cn as i } from "@brightlocal/ui-components/lib/utils";
|
|
5
5
|
import { useOverlayPointerLock as m } from "@brightlocal/ui-components/hooks/use-overlay-pointer-lock";
|
|
6
|
-
import { ButtonVariants as
|
|
6
|
+
import { ButtonVariants as d } from "@brightlocal/ui-components/button";
|
|
7
7
|
function f({
|
|
8
8
|
dataHook: a,
|
|
9
9
|
trackingEl: t,
|
|
10
10
|
trackingLabel: e,
|
|
11
|
-
...
|
|
11
|
+
...s
|
|
12
12
|
}) {
|
|
13
13
|
return /* @__PURE__ */ o(
|
|
14
14
|
r.Root,
|
|
@@ -17,7 +17,7 @@ function f({
|
|
|
17
17
|
"data-slot": "alert-dialog",
|
|
18
18
|
"data-tracking-el": t,
|
|
19
19
|
"data-tracking-label": e,
|
|
20
|
-
...
|
|
20
|
+
...s
|
|
21
21
|
}
|
|
22
22
|
);
|
|
23
23
|
}
|
|
@@ -37,27 +37,27 @@ function n({
|
|
|
37
37
|
return /* @__PURE__ */ o(r.Portal, { ...a });
|
|
38
38
|
}
|
|
39
39
|
n.displayName = "AlertDialogPortal";
|
|
40
|
-
const
|
|
40
|
+
const c = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ o(
|
|
41
41
|
r.Overlay,
|
|
42
42
|
{
|
|
43
43
|
ref: e,
|
|
44
44
|
className: i(
|
|
45
|
-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
|
|
45
|
+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=open]:duration-slow fixed inset-0 z-50 bg-black/50 ease-out data-[state=closed]:duration-250 data-[state=closed]:ease-in",
|
|
46
46
|
a
|
|
47
47
|
),
|
|
48
48
|
"data-slot": "alert-dialog-overlay",
|
|
49
49
|
...t
|
|
50
50
|
}
|
|
51
51
|
));
|
|
52
|
-
|
|
53
|
-
const A = l.forwardRef(({ className: a, ...t }, e) => (m(), /* @__PURE__ */
|
|
54
|
-
/* @__PURE__ */ o(
|
|
52
|
+
c.displayName = "AlertDialogOverlay";
|
|
53
|
+
const A = l.forwardRef(({ className: a, ...t }, e) => (m(), /* @__PURE__ */ g(n, { children: [
|
|
54
|
+
/* @__PURE__ */ o(c, {}),
|
|
55
55
|
/* @__PURE__ */ o(
|
|
56
56
|
r.Content,
|
|
57
57
|
{
|
|
58
58
|
ref: e,
|
|
59
59
|
className: i(
|
|
60
|
-
"border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-
|
|
60
|
+
"border-border bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=open]:duration-slow fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg ease-out data-[state=closed]:duration-250 data-[state=closed]:ease-in sm:max-w-lg",
|
|
61
61
|
a
|
|
62
62
|
),
|
|
63
63
|
"data-slot": "alert-dialog-content",
|
|
@@ -89,10 +89,10 @@ const u = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ o(
|
|
|
89
89
|
}
|
|
90
90
|
));
|
|
91
91
|
u.displayName = "AlertDialogFooter";
|
|
92
|
-
const N = l.forwardRef(({ className: a, dataHook: t, ...e },
|
|
92
|
+
const N = l.forwardRef(({ className: a, dataHook: t, ...e }, s) => /* @__PURE__ */ o(
|
|
93
93
|
r.Title,
|
|
94
94
|
{
|
|
95
|
-
ref:
|
|
95
|
+
ref: s,
|
|
96
96
|
className: i("text-lg font-semibold", a),
|
|
97
97
|
"data-hook": t,
|
|
98
98
|
"data-slot": "alert-dialog-title",
|
|
@@ -100,10 +100,10 @@ const N = l.forwardRef(({ className: a, dataHook: t, ...e }, d) => /* @__PURE__
|
|
|
100
100
|
}
|
|
101
101
|
));
|
|
102
102
|
N.displayName = "AlertDialogTitle";
|
|
103
|
-
const x = l.forwardRef(({ className: a, dataHook: t, ...e },
|
|
103
|
+
const x = l.forwardRef(({ className: a, dataHook: t, ...e }, s) => /* @__PURE__ */ o(
|
|
104
104
|
r.Description,
|
|
105
105
|
{
|
|
106
|
-
ref:
|
|
106
|
+
ref: s,
|
|
107
107
|
className: i("text-muted-foreground text-sm", a),
|
|
108
108
|
"data-hook": t,
|
|
109
109
|
"data-slot": "alert-dialog-description",
|
|
@@ -115,7 +115,7 @@ const y = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ o(
|
|
|
115
115
|
r.Action,
|
|
116
116
|
{
|
|
117
117
|
ref: e,
|
|
118
|
-
className: i(
|
|
118
|
+
className: i(d(), a),
|
|
119
119
|
"data-slot": "alert-dialog-action",
|
|
120
120
|
...t
|
|
121
121
|
}
|
|
@@ -125,7 +125,7 @@ const w = l.forwardRef(({ className: a, ...t }, e) => /* @__PURE__ */ o(
|
|
|
125
125
|
r.Cancel,
|
|
126
126
|
{
|
|
127
127
|
ref: e,
|
|
128
|
-
className: i(
|
|
128
|
+
className: i(d({ variant: "outline" }), a),
|
|
129
129
|
"data-slot": "alert-dialog-cancel",
|
|
130
130
|
...t
|
|
131
131
|
}
|
|
@@ -139,7 +139,7 @@ export {
|
|
|
139
139
|
x as AlertDialogDescription,
|
|
140
140
|
u as AlertDialogFooter,
|
|
141
141
|
D as AlertDialogHeader,
|
|
142
|
-
|
|
142
|
+
c as AlertDialogOverlay,
|
|
143
143
|
n as AlertDialogPortal,
|
|
144
144
|
N as AlertDialogTitle,
|
|
145
145
|
p as AlertDialogTrigger
|
package/dist/badge.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),g=require("react"),f=require("@radix-ui/react-slot"),p=require("class-variance-authority"),_=require("@brightlocal/ui-components/lib/utils");function v(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const m=v(g),x=p.cva(["inline-flex items-center justify-center gap-1 w-fit shrink-0 overflow-hidden","rounded-full border px-2 py-1","text-xs font-semibold whitespace-nowrap leading-none","[&>svg]:size-3 [&>svg]:pointer-events-none","transition-[color,background-color,border-color,box-shadow] duration-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),g=require("react"),f=require("@radix-ui/react-slot"),p=require("class-variance-authority"),_=require("@brightlocal/ui-components/lib/utils");function v(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const a=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,a.get?a:{enumerable:!0,get:()=>e[r]})}}return t.default=e,Object.freeze(t)}const m=v(g),x=p.cva(["inline-flex items-center justify-center gap-1 w-fit shrink-0 overflow-hidden","rounded-full border px-2 py-1","text-xs font-semibold whitespace-nowrap leading-none","[&>svg]:size-3 [&>svg]:pointer-events-none","transition-[color,background-color,border-color,box-shadow] duration-fast ease-out","focus-visible:outline-none","focus-visible:shadow-[0_0_0_1px_white,0_0_0_2px_var(--color-ring),0_0_0_4px_rgba(0,0,0,0.1)]","dark:focus-visible:shadow-[0_0_0_1px_var(--background),0_0_0_2px_var(--color-ring),0_0_0_4px_rgba(255,255,255,0.1)]","data-[number=true]:size-5 data-[number=true]:p-0 data-[number=true]:aspect-square"],{variants:{variant:{primary:"border-transparent bg-success-background text-success-foreground",secondary:"border-transparent bg-secondary text-secondary-foreground focus-visible:border-ring",destructive:"border-transparent bg-destructive text-destructive-foreground",outline:"bg-background border-border text-foreground focus-visible:border-ring"}},defaultVariants:{variant:"primary"}}),n=m.forwardRef(({className:e,variant:t,asChild:r=!1,dataHook:a,trackingEl:s,trackingLabel:i,children:o,...c},u)=>{const d=r?f.Slot:"span",b=typeof o=="string"&&/^[0-9]$/.test(o);return l.jsx(d,{ref:u,className:_.cn(x({variant:t}),e),"data-hook":a,"data-number":b,"data-slot":"badge","data-tracking-el":s,"data-tracking-label":i,...c,children:o})});n.displayName="Badge";exports.Badge=n;
|
package/dist/badge.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as b } from "react/jsx-runtime";
|
|
2
2
|
import * as g from "react";
|
|
3
3
|
import { Slot as p } from "@radix-ui/react-slot";
|
|
4
|
-
import { cva as
|
|
5
|
-
import { cn as
|
|
6
|
-
const _ =
|
|
4
|
+
import { cva as f } from "class-variance-authority";
|
|
5
|
+
import { cn as l } from "@brightlocal/ui-components/lib/utils";
|
|
6
|
+
const _ = f(
|
|
7
7
|
[
|
|
8
8
|
// Layout
|
|
9
9
|
"inline-flex items-center justify-center gap-1 w-fit shrink-0 overflow-hidden",
|
|
@@ -14,7 +14,7 @@ const _ = l(
|
|
|
14
14
|
// Icons
|
|
15
15
|
"[&>svg]:size-3 [&>svg]:pointer-events-none",
|
|
16
16
|
// Transition
|
|
17
|
-
"transition-[color,background-color,border-color,box-shadow] duration-
|
|
17
|
+
"transition-[color,background-color,border-color,box-shadow] duration-fast ease-out",
|
|
18
18
|
// Focus
|
|
19
19
|
"focus-visible:outline-none",
|
|
20
20
|
"focus-visible:shadow-[0_0_0_1px_white,0_0_0_2px_var(--color-ring),0_0_0_4px_rgba(0,0,0,0.1)]",
|
|
@@ -41,8 +41,8 @@ const _ = l(
|
|
|
41
41
|
variant: o,
|
|
42
42
|
asChild: a = !1,
|
|
43
43
|
dataHook: t,
|
|
44
|
-
trackingEl:
|
|
45
|
-
trackingLabel:
|
|
44
|
+
trackingEl: s,
|
|
45
|
+
trackingLabel: n,
|
|
46
46
|
children: r,
|
|
47
47
|
...i
|
|
48
48
|
}, d) => {
|
|
@@ -51,12 +51,12 @@ const _ = l(
|
|
|
51
51
|
c,
|
|
52
52
|
{
|
|
53
53
|
ref: d,
|
|
54
|
-
className:
|
|
54
|
+
className: l(_({ variant: o }), e),
|
|
55
55
|
"data-hook": t,
|
|
56
56
|
"data-number": u,
|
|
57
57
|
"data-slot": "badge",
|
|
58
|
-
"data-tracking-el":
|
|
59
|
-
"data-tracking-label":
|
|
58
|
+
"data-tracking-el": s,
|
|
59
|
+
"data-tracking-label": n,
|
|
60
60
|
...i,
|
|
61
61
|
children: r
|
|
62
62
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),
|
|
2
|
-
`);I.length>1&&(e.preventDefault(),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),_=require("react"),R=require("framer-motion"),M=require("@brightlocal/icons"),y=require("@brightlocal/ui-components/lib/utils"),K=require("@brightlocal/ui-components/hooks/use-prefers-reduced-motion"),O=require("../lib/motion.cjs"),$=require("../button.cjs"),B=require("../input.cjs"),x=require("../list.cjs");function V(t){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const a in t)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(t,a);Object.defineProperty(o,a,i.get?i:{enumerable:!0,get:()=>t[a]})}}return o.default=t,Object.freeze(o)}const r=V(_),P=r.createContext(null);function j(){const t=r.useContext(P);if(!t)throw new Error("InputList components must be used within an <InputList>");return t}function k({value:t,onValueChange:o,children:a,className:i,dataHook:c,trackingEl:u,trackingLabel:g}){const[f,m]=r.useState(""),h=r.useRef(t.length),e=r.useRef(t.length),[l,I]=r.useState(()=>t.map((p,s)=>s)),[w,C]=r.useState(0);r.useEffect(()=>{const p=h.current;h.current=t.length,t.length>p&&m(""),I(s=>s.length===t.length?s:t.length>s.length?[...s,...Array.from({length:t.length-s.length},()=>e.current++)]:s.slice(0,t.length))},[t,w]);const b=r.useCallback(p=>{const s=p.map(d=>d.trim()).filter(Boolean);s.length&&(I(d=>[...d,...s.map(()=>e.current++)]),o([...t,...s]),C(d=>d+1))},[t,o]),L=r.useCallback(p=>{I(s=>s.filter((d,D)=>D!==p)),o(t.filter((s,d)=>d!==p))},[t,o]),S=r.useMemo(()=>({value:t,inputValue:f,setInputValue:m,addItems:b,removeItem:L,stableKeys:l}),[t,f,b,L,l]);return n.jsx(P.Provider,{value:S,children:n.jsx("div",{className:y.cn("flex flex-col gap-4",i),"data-hook":c,"data-slot":"input-list","data-tracking-el":u,"data-tracking-label":g,children:a})})}k.displayName="InputList";function A({dataHook:t="input-list",loading:o=!1,skeletonCount:a=5,disabled:i=!1,removeAriaLabel:c,className:u}){const{value:g,removeItem:f,stableKeys:m}=j(),h=K.usePrefersReducedMotion();return o?n.jsx("ul",{className:y.cn("flex flex-col gap-2",u),"data-slot":"input-list-skeleton",children:Array.from({length:a}).map((e,l)=>n.jsx(x.Item,{variant:"loading"},l))}):n.jsx("ul",{className:y.cn("flex flex-col gap-2",u),"data-hook":`${t}-list`,"data-slot":"list",children:n.jsx(R.AnimatePresence,{initial:!1,mode:"popLayout",children:g.map((e,l)=>n.jsx(R.motion.li,{layout:!0,animate:{opacity:1,scale:1},"data-hook":`${t}-item-${l}`,exit:{opacity:0,scale:.8,transition:{opacity:{duration:.15},scale:{duration:.12}}},initial:h?!1:{opacity:0,scale:.8},transition:{opacity:{duration:.15},scale:{duration:.15},layout:O.SPRING_SNAPPY},children:n.jsx(x.Item,{asChild:!0,variant:"filled",children:n.jsxs("div",{children:[n.jsx(x.ItemContent,{children:n.jsx(x.ItemTitle,{children:e})}),n.jsx(x.ItemActions,{children:n.jsx("button",{"aria-label":c?c.replace("{item}",e):`Remove ${e}`,className:y.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-${l}`,disabled:i,type:"button",onClick:()=>f(l),children:n.jsx(M.X,{})})})]})})},m[l]))})})}A.displayName="InputListItems";const N=r.forwardRef(({dataHook:t,error:o=!1,className:a,...i},c)=>{const{inputValue:u,setInputValue:g,addItems:f}=j(),m=e=>{e.key==="Enter"&&(e.preventDefault(),f([u])),i.onKeyDown?.(e)},h=e=>{const I=e.clipboardData.getData("text").split(`
|
|
2
|
+
`);I.length>1&&(e.preventDefault(),f(I)),i.onPaste?.(e)};return n.jsx(B.Input,{ref:c,...i,className:y.cn("flex-1",a),dataHook:t,error:o,value:u,onChange:e=>{g(e.target.value),i.onChange?.(e)},onKeyDown:m,onPaste:h})});N.displayName="InputListInput";const q=r.forwardRef(({dataHook:t,children:o,...a},i)=>{const{inputValue:c,addItems:u}=j();return n.jsx($.Button,{ref:i,...a,dataHook:t,onClick:()=>u([c]),children:o})});q.displayName="InputListAddButton";exports.InputList=k;exports.InputListAddButton=q;exports.InputListInput=N;exports.InputListItems=A;exports.useInputListContext=j;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input-list.d.ts","sourceRoot":"","sources":["../../src/blocks/input-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"input-list.d.ts","sourceRoot":"","sources":["../../src/blocks/input-list.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAO/B,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAQhE,UAAU,qBAAqB;IAC7B,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACpC,UAAU,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACpC,+CAA+C;IAC/C,UAAU,EAAE,MAAM,EAAE,CAAC;CACtB;AAMD,iBAAS,mBAAmB,0BAM3B;AAMD;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB;;OAEG;IACH,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IACzC;;OAEG;IACH,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,aAAa,EACb,QAAQ,EACR,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,cAAc,2CA2FhB;kBAnGQ,SAAS;;;AA2GlB;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC;;;OAGG;IACH,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB;;;OAGG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;;;;;;;;;;GAWG;AACH,iBAAS,cAAc,CAAC,EACtB,QAAuB,EACvB,OAAe,EACf,aAAiB,EACjB,QAAgB,EAChB,eAAe,EACf,SAAS,GACV,EAAE,mBAAmB,2CAoFrB;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"}
|