@amboss/design-system 2.4.2 → 2.4.4
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/build/cjs/components/EntityTree/BaseEntityTree.d.ts +3 -1
- package/build/cjs/components/EntityTree/BaseEntityTree.js +1 -1
- package/build/cjs/components/Form/MaskedInput/MaskedInput.d.ts +1 -1
- package/build/cjs/web-tokens/assets/icons.json +3 -1
- package/build/cjs/web-tokens/assets/icons16.json +3 -1
- package/build/esm/components/EntityTree/BaseEntityTree.d.ts +3 -1
- package/build/esm/components/EntityTree/BaseEntityTree.js +1 -1
- package/build/esm/components/Form/MaskedInput/MaskedInput.d.ts +1 -1
- package/build/esm/web-tokens/assets/icons.json +3 -1
- package/build/esm/web-tokens/assets/icons16.json +3 -1
- package/package.json +1 -1
|
@@ -27,6 +27,8 @@ export type EntityTreeProps = {
|
|
|
27
27
|
* @param ids - Updated expanded node ids
|
|
28
28
|
*/
|
|
29
29
|
onToggle?: (ids: NodeID[]) => void;
|
|
30
|
+
/** Active node id that should be highlighted */
|
|
31
|
+
activeId?: NodeID;
|
|
30
32
|
/** If provided, the filter function is used to filter the tree. */
|
|
31
33
|
filterFn?: (node: TreeNode) => boolean;
|
|
32
34
|
/** Callback function to handle tree change
|
|
@@ -39,5 +41,5 @@ export type EntityTreeProps = {
|
|
|
39
41
|
renderRightContent?: (props: TreeNode & Parameters<EntityListItemProps["renderRight"]>[0]) => React.ReactNode;
|
|
40
42
|
"data-e2e-test-id"?: string;
|
|
41
43
|
} & PartialEntityListItemProps;
|
|
42
|
-
export declare const BaseEntityTree: ({ data, selectedIds, onSelectionChange, expandedIds, onToggle, filterFn, onTreeChange, hideBorder, size, showItemsCount, renderRightContent, "data-e2e-test-id": dataE2eTestId, }: EntityTreeProps) => React.ReactElement;
|
|
44
|
+
export declare const BaseEntityTree: ({ data, selectedIds, onSelectionChange, expandedIds, onToggle, activeId, filterFn, onTreeChange, hideBorder, size, showItemsCount, renderRightContent, "data-e2e-test-id": dataE2eTestId, }: EntityTreeProps) => React.ReactElement;
|
|
43
45
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BaseEntityTree",{enumerable:!0,get:function(){return BaseEntityTree}});const _react=require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styledcomponents=require("../EntityList/styled-components"),_EntityListItem=require("../EntityList/EntityListItem"),_Text=require("../Typography/Text/Text"),_Checkbox=require("../Form/Checkbox/Checkbox"),_tree=require("./tree"),getLastNodeOfList=({node,data,level,isParentsLastOfLvl})=>{let currentLastNodeOfLvl=node.id===data[data.length-1].id;return 0===level?currentLastNodeOfLvl:isParentsLastOfLvl&¤tLastNodeOfLvl},makeRenderTreeBranches=({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange,handleToggle,expandAll,hideBorder,size,showItemsCount,renderRightContent})=>({data,level,renderFn,isParentsLastOfLvl})=>data.map(node=>{let readOnly=null===nodeCheckboxState,hasChildren=node.children.length>0,expandedState=!!expandAll||!!nodeExpandedState[node.id],leafItems=(0,_tree.getLeafNodeIds)(nodeChildrenMap,node.id),totalItemsCount=leafItems.length,selectedItemsCount=nodeCheckboxState?leafItems.filter(leafId=>"checked"===nodeCheckboxState[leafId]).length:null,countLabel=nodeCheckboxState?`(${selectedItemsCount}/${totalItemsCount})`:`(${totalItemsCount})`,isLastNodeOfList=getLastNodeOfList({node,data,level,isParentsLastOfLvl}),lastLeaf=!hasChildren&&!node.isFiltered,isExpanded=lastLeaf?void 0:expandedState;return _react.default.createElement(_EntityListItem.EntityListItem,{key:node.id,role:"treeitem",hideBorder:hideBorder||isLastNodeOfList&&(!isExpanded||node.isFiltered),size:size,isClickable:!0,lSpaceStep:level,"aria-label":node.label,description:node.description,renderLabel:({textSize})=>_react.default.createElement(_react.default.Fragment,null,node.label,showItemsCount&&!lastLeaf&&_react.default.createElement(_Text.Text,{as:"span",size:textSize,color:"tertiary"}," ",countLabel)),isExpanded:isExpanded,isDisabledExpand:expandAll,onExpandClick:e=>{e.stopPropagation(),handleToggle(node.id)},onClick:readOnly?()=>handleToggle(node.id):()=>handleSelectionChange(node.id),renderLeft:readOnly?void 0:()=>_react.default.createElement(_Checkbox.CheckboxRaw,{size:"s",name:node.label,checked:"checked"===nodeCheckboxState[node.id],indeterminate:"indeterminate"===nodeCheckboxState[node.id],onChange:()=>handleSelectionChange(node.id)}),renderRight:renderRightContent?sizeProps=>renderRightContent({...sizeProps,...node}):void 0},hasChildren&&_react.default.createElement("ul",null,renderFn({data:node.children,level:level+1,renderFn,isParentsLastOfLvl:isLastNodeOfList})))}),BaseEntityTree=({data,selectedIds,onSelectionChange,expandedIds=[],onToggle,filterFn,onTreeChange,hideBorder=!1,size="m",showItemsCount=!0,renderRightContent,"data-e2e-test-id":dataE2eTestId})=>{let nodeChildrenMap=Object.assign({},...data.map(tree=>(0,_tree.getNodeChildrenMap)(tree))),nodeCheckboxState=selectedIds?Object.assign({},...data.map(tree=>(0,_tree.getTreeCheckboxState)(nodeChildrenMap,tree.id,selectedIds))):null,nodeExpandedState=expandedIds.reduce((acc,id)=>(acc[id]=!0,acc),{}),dataShown=filterFn?data.map(tree=>(0,_tree.filterTree)(tree,filterFn)).filter(Boolean):data;(0,_react.useEffect)(()=>{onTreeChange&&onTreeChange(dataShown.map(tree=>(0,_tree.mapTree)(tree,node=>({...node,checkedState:!!nodeCheckboxState&&nodeCheckboxState[node.id],isExpanded:!!nodeExpandedState[node.id]}))))},[dataShown,nodeCheckboxState,nodeExpandedState,onTreeChange]);let renderTreeBranches=makeRenderTreeBranches({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange:targetId=>{if(onSelectionChange){let updatedSelectedIds=[];if(0===nodeChildrenMap[targetId].length)updatedSelectedIds=selectedIds.includes(targetId)?selectedIds.filter(id=>id!==targetId):selectedIds.concat([targetId]);else{let affectedLeafNodeIds=(0,_tree.getLeafNodeIds)(nodeChildrenMap,targetId);updatedSelectedIds="checked"===nodeCheckboxState[targetId]?selectedIds.filter(id=>!affectedLeafNodeIds.includes(id)):selectedIds.concat(affectedLeafNodeIds)}onSelectionChange(updatedSelectedIds)}},handleToggle:targetId=>{onToggle&&onToggle(expandedIds.includes(targetId)?expandedIds.filter(id=>id!==targetId):expandedIds.concat([targetId]))},expandAll:!!filterFn,hideBorder,size,showItemsCount,renderRightContent});return _react.default.createElement(_styledcomponents.StyledList,{role:"tree","data-e2e-test-id":dataE2eTestId,"data-ds-id":"EntityTree",size:size},renderTreeBranches({data:dataShown,level:0,renderFn:renderTreeBranches}))};
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"BaseEntityTree",{enumerable:!0,get:function(){return BaseEntityTree}});const _react=require("@swc/helpers/_/_interop_require_wildcard")._(require("react")),_styledcomponents=require("../EntityList/styled-components"),_EntityListItem=require("../EntityList/EntityListItem"),_Text=require("../Typography/Text/Text"),_Checkbox=require("../Form/Checkbox/Checkbox"),_tree=require("./tree"),getLastNodeOfList=({node,data,level,isParentsLastOfLvl})=>{let currentLastNodeOfLvl=node.id===data[data.length-1].id;return 0===level?currentLastNodeOfLvl:isParentsLastOfLvl&¤tLastNodeOfLvl},makeRenderTreeBranches=({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange,handleToggle,expandAll,hideBorder,size,showItemsCount,renderRightContent,activeId})=>({data,level,renderFn,isParentsLastOfLvl})=>data.map(node=>{let readOnly=null===nodeCheckboxState,hasChildren=node.children.length>0,expandedState=!!expandAll||!!nodeExpandedState[node.id],leafItems=(0,_tree.getLeafNodeIds)(nodeChildrenMap,node.id),totalItemsCount=leafItems.length,selectedItemsCount=nodeCheckboxState?leafItems.filter(leafId=>"checked"===nodeCheckboxState[leafId]).length:null,countLabel=nodeCheckboxState?`(${selectedItemsCount}/${totalItemsCount})`:`(${totalItemsCount})`,isLastNodeOfList=getLastNodeOfList({node,data,level,isParentsLastOfLvl}),lastLeaf=!hasChildren&&!node.isFiltered,isExpanded=lastLeaf?void 0:expandedState;return _react.default.createElement(_EntityListItem.EntityListItem,{key:node.id,role:"treeitem",hideBorder:hideBorder||isLastNodeOfList&&(!isExpanded||node.isFiltered),size:size,isClickable:!0,lSpaceStep:level,"aria-label":node.label,description:node.description,renderLabel:({textSize})=>_react.default.createElement(_react.default.Fragment,null,node.label,showItemsCount&&!lastLeaf&&_react.default.createElement(_Text.Text,{as:"span",size:textSize,color:"tertiary"}," ",countLabel)),isActive:node.id===activeId,isExpanded:isExpanded,isDisabledExpand:expandAll,onExpandClick:e=>{e.stopPropagation(),handleToggle(node.id)},onClick:readOnly?()=>handleToggle(node.id):()=>handleSelectionChange(node.id),renderLeft:readOnly?void 0:()=>_react.default.createElement(_Checkbox.CheckboxRaw,{size:"s",name:node.label,checked:"checked"===nodeCheckboxState[node.id],indeterminate:"indeterminate"===nodeCheckboxState[node.id],onChange:()=>handleSelectionChange(node.id)}),renderRight:renderRightContent?sizeProps=>renderRightContent({...sizeProps,...node}):void 0},hasChildren&&_react.default.createElement("ul",null,renderFn({data:node.children,level:level+1,renderFn,isParentsLastOfLvl:isLastNodeOfList})))}),BaseEntityTree=({data,selectedIds,onSelectionChange,expandedIds=[],onToggle,activeId,filterFn,onTreeChange,hideBorder=!1,size="m",showItemsCount=!0,renderRightContent,"data-e2e-test-id":dataE2eTestId})=>{let nodeChildrenMap=Object.assign({},...data.map(tree=>(0,_tree.getNodeChildrenMap)(tree))),nodeCheckboxState=selectedIds?Object.assign({},...data.map(tree=>(0,_tree.getTreeCheckboxState)(nodeChildrenMap,tree.id,selectedIds))):null,nodeExpandedState=expandedIds.reduce((acc,id)=>(acc[id]=!0,acc),{}),dataShown=filterFn?data.map(tree=>(0,_tree.filterTree)(tree,filterFn)).filter(Boolean):data;(0,_react.useEffect)(()=>{onTreeChange&&onTreeChange(dataShown.map(tree=>(0,_tree.mapTree)(tree,node=>({...node,checkedState:!!nodeCheckboxState&&nodeCheckboxState[node.id],isExpanded:!!nodeExpandedState[node.id]}))))},[dataShown,nodeCheckboxState,nodeExpandedState,onTreeChange]);let renderTreeBranches=makeRenderTreeBranches({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange:targetId=>{if(onSelectionChange){let updatedSelectedIds=[];if(0===nodeChildrenMap[targetId].length)updatedSelectedIds=selectedIds.includes(targetId)?selectedIds.filter(id=>id!==targetId):selectedIds.concat([targetId]);else{let affectedLeafNodeIds=(0,_tree.getLeafNodeIds)(nodeChildrenMap,targetId);updatedSelectedIds="checked"===nodeCheckboxState[targetId]?selectedIds.filter(id=>!affectedLeafNodeIds.includes(id)):selectedIds.concat(affectedLeafNodeIds)}onSelectionChange(updatedSelectedIds)}},handleToggle:targetId=>{onToggle&&onToggle(expandedIds.includes(targetId)?expandedIds.filter(id=>id!==targetId):expandedIds.concat([targetId]))},expandAll:!!filterFn,hideBorder,size,showItemsCount,renderRightContent,activeId});return _react.default.createElement(_styledcomponents.StyledList,{role:"tree","data-e2e-test-id":dataE2eTestId,"data-ds-id":"EntityTree",size:size},renderTreeBranches({data:dataShown,level:0,renderFn:renderTreeBranches}))};
|
|
@@ -13,7 +13,7 @@ export declare const MaskedInput: React.ForwardRefExoticComponent<{
|
|
|
13
13
|
} & {
|
|
14
14
|
name: string;
|
|
15
15
|
value?: string;
|
|
16
|
-
icon?: "article" | "link" | "menu" | "table" | "key" | "info" | "circle" | "filter" | "image" | "x" | "download" | "list" | "search" | "grid" | "sort" | "copy" | "reset" | "activity" | "alert-circle" | "alert-triangle" | "alert-octagon" | "align-left" | "amboss-logo" | "anamnesis" | "anki" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "auditor" | "award" | "bar-chart-2" | "bell" | "bell-curve" | "book" | "bookmark" | "book-open" | "box" | "bubble" | "bubble-check" | "bubble-image" | "bubble-pill" | "bubble-text" | "bulb" | "calculator" | "chart" | "charts" | "check" | "check-circle" | "check-small" | "check-square" | "checkmark-circle-filled" | "chevron-down" | "chevrons-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-up" | "clipboard" | "coffee" | "collapse" | "comment" | "compass" | "corner-down-left" | "corner-down-right" | "credit-card" | "edit-3" | "edit-3-filled" | "edit-square" | "education" | "effigos" | "emergency" | "expand" | "external-link" | "eye" | "eye-off" | "facebook" | "face-happy" | "face-neutral" | "face-sad" | "file-text" | "figma" | "filled-dot" | "film" | "flag" | "flag-filled" | "flask" | "flowchart" | "folder" | "folder-check-filled" | "folder-plus" | "gift" | "google" | "hammer-filled" | "hash" | "headphones" | "help-circle" | "home" | "illustration" | "image-broken" | "institution" | "layers" | "loader" | "lock" | "magic" | "mail" | "maximize" | "maximize-2" | "med-imaging" | "meditricks" | "message-circle" | "minus" | "more-horizontal" | "more-vertical" | "no-fill" | "open-full-screen" | "open-new-tab" | "open-sidebar-right" | "percent" | "pill" | "play-circle" | "play-filled" | "plus" | "plus-circle" | "plus-circle-filled" | "quiz" | "rotate-cw" | "search-list" | "settings" | "share" | "shopping-bag" | "show-all" | "sliders" | "smartzoom" | "sort-ascending" | "sort-descending" | "sort-neutral" | "star" | "stethoscope" | "tag" | "text-zoom-reset" | "thumbs-down" | "thumbs-up" | "timer-off" | "timer-on" | "trash-2" | "twitter" | "unlock" | "user" | "users" | "watch" | "wifi-off" | "wifi" | "x-circle-filled" | "zap" | "square";
|
|
16
|
+
icon?: "article" | "link" | "menu" | "table" | "key" | "info" | "circle" | "filter" | "image" | "x" | "download" | "list" | "search" | "grid" | "sort" | "copy" | "reset" | "zoom-in" | "zoom-out" | "activity" | "alert-circle" | "alert-triangle" | "alert-octagon" | "align-left" | "amboss-logo" | "anamnesis" | "anki" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "auditor" | "award" | "bar-chart-2" | "bell" | "bell-curve" | "book" | "bookmark" | "book-open" | "box" | "bubble" | "bubble-check" | "bubble-image" | "bubble-pill" | "bubble-text" | "bulb" | "calculator" | "chart" | "charts" | "check" | "check-circle" | "check-small" | "check-square" | "checkmark-circle-filled" | "chevron-down" | "chevrons-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-up" | "clipboard" | "coffee" | "collapse" | "comment" | "compass" | "corner-down-left" | "corner-down-right" | "credit-card" | "edit-3" | "edit-3-filled" | "edit-square" | "education" | "effigos" | "emergency" | "expand" | "external-link" | "eye" | "eye-off" | "facebook" | "face-happy" | "face-neutral" | "face-sad" | "file-text" | "figma" | "filled-dot" | "film" | "flag" | "flag-filled" | "flask" | "flowchart" | "folder" | "folder-check-filled" | "folder-plus" | "gift" | "google" | "hammer-filled" | "hash" | "headphones" | "help-circle" | "home" | "illustration" | "image-broken" | "institution" | "layers" | "loader" | "lock" | "magic" | "mail" | "maximize" | "maximize-2" | "med-imaging" | "meditricks" | "message-circle" | "minus" | "more-horizontal" | "more-vertical" | "no-fill" | "open-full-screen" | "open-new-tab" | "open-sidebar-right" | "percent" | "pill" | "play-circle" | "play-filled" | "plus" | "plus-circle" | "plus-circle-filled" | "quiz" | "rotate-cw" | "search-list" | "settings" | "share" | "shopping-bag" | "show-all" | "sliders" | "smartzoom" | "sort-ascending" | "sort-descending" | "sort-neutral" | "star" | "stethoscope" | "tag" | "text-zoom-reset" | "thumbs-down" | "thumbs-up" | "timer-off" | "timer-on" | "trash-2" | "twitter" | "unlock" | "user" | "users" | "watch" | "wifi-off" | "wifi" | "x-circle-filled" | "zap" | "square";
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
hasError?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
@@ -155,5 +155,7 @@
|
|
|
155
155
|
"x-circle-filled": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path fill-rule=\"evenodd\"\n d=\"M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11zm4.707-15.707a1 1 0 010 1.414L13.414 12l3.293 3.293a1 1 0 01-1.414 1.414L12 13.414l-3.293 3.293a1 1 0 01-1.414-1.414L10.586 12 7.293 8.707a1 1 0 011.414-1.414L12 10.586l3.293-3.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n</svg>",
|
|
156
156
|
"table": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-table\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"></path></svg>",
|
|
157
157
|
"zap": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-zap\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\"></polygon></svg>",
|
|
158
|
-
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>"
|
|
158
|
+
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>",
|
|
159
|
+
"zoom-in": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M11 7a1 1 0 0 1 1 1v2h2a1 1 0 1 1 0 2h-2v2a1 1 0 1 1-2 0v-2H8a1 1 0 1 1 0-2h2V8a1 1 0 0 1 1-1Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M11 2a9 9 0 1 0 5.618 16.032l3.675 3.675a1 1 0 0 0 1.414-1.414l-3.675-3.675A9 9 0 0 0 11 2Zm5.041 13.856a7 7 0 1 0-.185.185 1.01 1.01 0 0 1 .185-.185Z\" clip-rule=\"evenodd\"/></svg>",
|
|
160
|
+
"zoom-out": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M8 10a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H8Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2 11a9 9 0 1 1 16.032 5.618l3.675 3.675a1 1 0 0 1-1.414 1.414l-3.675-3.675A9 9 0 0 1 2 11Zm16 0a6.977 6.977 0 0 1-1.959 4.856.998.998 0 0 0-.185.185A7 7 0 1 1 18 11Z\" clip-rule=\"evenodd\"/></svg>"
|
|
159
161
|
}
|
|
@@ -166,5 +166,7 @@
|
|
|
166
166
|
"x-circle-filled": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\">\n <path fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M8 16A8 8 0 108 0a8 8 0 000 16zm3.707-11.707a1 1 0 010 1.414L9.414 8l2.293 2.293a1 1 0 01-1.414 1.414L8 9.414l-2.293 2.293a1 1 0 01-1.414-1.414L6.586 8 4.293 5.707a1 1 0 011.414-1.414L8 6.586l2.293-2.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n</svg>",
|
|
167
167
|
"table": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-table\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"></path></svg>",
|
|
168
168
|
"zap": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-zap\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\"></polygon></svg>",
|
|
169
|
-
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>"
|
|
169
|
+
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>",
|
|
170
|
+
"zoom-in": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M6 6V4h2v2h2v2H8v2H6V8H4V6h2Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M7 0a7 7 0 1 0 4.192 12.606l3.1 3.101a1 1 0 0 0 1.415-1.414l-3.1-3.1A7 7 0 0 0 7 0ZM2 7a5 5 0 1 1 10 0A5 5 0 0 1 2 7Z\" clip-rule=\"evenodd\"/></svg>",
|
|
171
|
+
"zoom-out": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M10 6H4v2h6V6Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M0 7a7 7 0 1 1 12.606 4.192l3.101 3.1a1 1 0 1 1-1.414 1.415l-3.1-3.1A7 7 0 0 1 0 7Zm7-5a5 5 0 1 0 0 10A5 5 0 0 0 7 2Z\" clip-rule=\"evenodd\"/></svg>"
|
|
170
172
|
}
|
|
@@ -27,6 +27,8 @@ export type EntityTreeProps = {
|
|
|
27
27
|
* @param ids - Updated expanded node ids
|
|
28
28
|
*/
|
|
29
29
|
onToggle?: (ids: NodeID[]) => void;
|
|
30
|
+
/** Active node id that should be highlighted */
|
|
31
|
+
activeId?: NodeID;
|
|
30
32
|
/** If provided, the filter function is used to filter the tree. */
|
|
31
33
|
filterFn?: (node: TreeNode) => boolean;
|
|
32
34
|
/** Callback function to handle tree change
|
|
@@ -39,5 +41,5 @@ export type EntityTreeProps = {
|
|
|
39
41
|
renderRightContent?: (props: TreeNode & Parameters<EntityListItemProps["renderRight"]>[0]) => React.ReactNode;
|
|
40
42
|
"data-e2e-test-id"?: string;
|
|
41
43
|
} & PartialEntityListItemProps;
|
|
42
|
-
export declare const BaseEntityTree: ({ data, selectedIds, onSelectionChange, expandedIds, onToggle, filterFn, onTreeChange, hideBorder, size, showItemsCount, renderRightContent, "data-e2e-test-id": dataE2eTestId, }: EntityTreeProps) => React.ReactElement;
|
|
44
|
+
export declare const BaseEntityTree: ({ data, selectedIds, onSelectionChange, expandedIds, onToggle, activeId, filterFn, onTreeChange, hideBorder, size, showItemsCount, renderRightContent, "data-e2e-test-id": dataE2eTestId, }: EntityTreeProps) => React.ReactElement;
|
|
43
45
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import React,{useEffect}from"react";import{StyledList}from"../EntityList/styled-components";import{EntityListItem}from"../EntityList/EntityListItem";import{Text}from"../Typography/Text/Text";import{CheckboxRaw}from"../Form/Checkbox/Checkbox";import{getNodeChildrenMap,getTreeCheckboxState,getLeafNodeIds,filterTree,mapTree}from"./tree";let getLastNodeOfList=({node,data,level,isParentsLastOfLvl})=>{let currentLastNodeOfLvl=node.id===data[data.length-1].id;return 0===level?currentLastNodeOfLvl:isParentsLastOfLvl&¤tLastNodeOfLvl},makeRenderTreeBranches=({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange,handleToggle,expandAll,hideBorder,size,showItemsCount,renderRightContent})=>({data,level,renderFn,isParentsLastOfLvl})=>data.map(node=>{let readOnly=null===nodeCheckboxState,hasChildren=node.children.length>0,expandedState=!!expandAll||!!nodeExpandedState[node.id],leafItems=getLeafNodeIds(nodeChildrenMap,node.id),totalItemsCount=leafItems.length,selectedItemsCount=nodeCheckboxState?leafItems.filter(leafId=>"checked"===nodeCheckboxState[leafId]).length:null,countLabel=nodeCheckboxState?`(${selectedItemsCount}/${totalItemsCount})`:`(${totalItemsCount})`,isLastNodeOfList=getLastNodeOfList({node,data,level,isParentsLastOfLvl}),lastLeaf=!hasChildren&&!node.isFiltered,isExpanded=lastLeaf?void 0:expandedState;return React.createElement(EntityListItem,{key:node.id,role:"treeitem",hideBorder:hideBorder||isLastNodeOfList&&(!isExpanded||node.isFiltered),size:size,isClickable:!0,lSpaceStep:level,"aria-label":node.label,description:node.description,renderLabel:({textSize})=>React.createElement(React.Fragment,null,node.label,showItemsCount&&!lastLeaf&&React.createElement(Text,{as:"span",size:textSize,color:"tertiary"}," ",countLabel)),isExpanded:isExpanded,isDisabledExpand:expandAll,onExpandClick:e=>{e.stopPropagation(),handleToggle(node.id)},onClick:readOnly?()=>handleToggle(node.id):()=>handleSelectionChange(node.id),renderLeft:readOnly?void 0:()=>React.createElement(CheckboxRaw,{size:"s",name:node.label,checked:"checked"===nodeCheckboxState[node.id],indeterminate:"indeterminate"===nodeCheckboxState[node.id],onChange:()=>handleSelectionChange(node.id)}),renderRight:renderRightContent?sizeProps=>renderRightContent({...sizeProps,...node}):void 0},hasChildren&&React.createElement("ul",null,renderFn({data:node.children,level:level+1,renderFn,isParentsLastOfLvl:isLastNodeOfList})))});export const BaseEntityTree=({data,selectedIds,onSelectionChange,expandedIds=[],onToggle,filterFn,onTreeChange,hideBorder=!1,size="m",showItemsCount=!0,renderRightContent,"data-e2e-test-id":dataE2eTestId})=>{let nodeChildrenMap=Object.assign({},...data.map(tree=>getNodeChildrenMap(tree))),nodeCheckboxState=selectedIds?Object.assign({},...data.map(tree=>getTreeCheckboxState(nodeChildrenMap,tree.id,selectedIds))):null,nodeExpandedState=expandedIds.reduce((acc,id)=>(acc[id]=!0,acc),{}),dataShown=filterFn?data.map(tree=>filterTree(tree,filterFn)).filter(Boolean):data;useEffect(()=>{onTreeChange&&onTreeChange(dataShown.map(tree=>mapTree(tree,node=>({...node,checkedState:!!nodeCheckboxState&&nodeCheckboxState[node.id],isExpanded:!!nodeExpandedState[node.id]}))))},[dataShown,nodeCheckboxState,nodeExpandedState,onTreeChange]);let renderTreeBranches=makeRenderTreeBranches({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange:targetId=>{if(onSelectionChange){let updatedSelectedIds=[];if(0===nodeChildrenMap[targetId].length)updatedSelectedIds=selectedIds.includes(targetId)?selectedIds.filter(id=>id!==targetId):selectedIds.concat([targetId]);else{let affectedLeafNodeIds=getLeafNodeIds(nodeChildrenMap,targetId);updatedSelectedIds="checked"===nodeCheckboxState[targetId]?selectedIds.filter(id=>!affectedLeafNodeIds.includes(id)):selectedIds.concat(affectedLeafNodeIds)}onSelectionChange(updatedSelectedIds)}},handleToggle:targetId=>{onToggle&&onToggle(expandedIds.includes(targetId)?expandedIds.filter(id=>id!==targetId):expandedIds.concat([targetId]))},expandAll:!!filterFn,hideBorder,size,showItemsCount,renderRightContent});return React.createElement(StyledList,{role:"tree","data-e2e-test-id":dataE2eTestId,"data-ds-id":"EntityTree",size:size},renderTreeBranches({data:dataShown,level:0,renderFn:renderTreeBranches}))};
|
|
1
|
+
import React,{useEffect}from"react";import{StyledList}from"../EntityList/styled-components";import{EntityListItem}from"../EntityList/EntityListItem";import{Text}from"../Typography/Text/Text";import{CheckboxRaw}from"../Form/Checkbox/Checkbox";import{getNodeChildrenMap,getTreeCheckboxState,getLeafNodeIds,filterTree,mapTree}from"./tree";let getLastNodeOfList=({node,data,level,isParentsLastOfLvl})=>{let currentLastNodeOfLvl=node.id===data[data.length-1].id;return 0===level?currentLastNodeOfLvl:isParentsLastOfLvl&¤tLastNodeOfLvl},makeRenderTreeBranches=({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange,handleToggle,expandAll,hideBorder,size,showItemsCount,renderRightContent,activeId})=>({data,level,renderFn,isParentsLastOfLvl})=>data.map(node=>{let readOnly=null===nodeCheckboxState,hasChildren=node.children.length>0,expandedState=!!expandAll||!!nodeExpandedState[node.id],leafItems=getLeafNodeIds(nodeChildrenMap,node.id),totalItemsCount=leafItems.length,selectedItemsCount=nodeCheckboxState?leafItems.filter(leafId=>"checked"===nodeCheckboxState[leafId]).length:null,countLabel=nodeCheckboxState?`(${selectedItemsCount}/${totalItemsCount})`:`(${totalItemsCount})`,isLastNodeOfList=getLastNodeOfList({node,data,level,isParentsLastOfLvl}),lastLeaf=!hasChildren&&!node.isFiltered,isExpanded=lastLeaf?void 0:expandedState;return React.createElement(EntityListItem,{key:node.id,role:"treeitem",hideBorder:hideBorder||isLastNodeOfList&&(!isExpanded||node.isFiltered),size:size,isClickable:!0,lSpaceStep:level,"aria-label":node.label,description:node.description,renderLabel:({textSize})=>React.createElement(React.Fragment,null,node.label,showItemsCount&&!lastLeaf&&React.createElement(Text,{as:"span",size:textSize,color:"tertiary"}," ",countLabel)),isActive:node.id===activeId,isExpanded:isExpanded,isDisabledExpand:expandAll,onExpandClick:e=>{e.stopPropagation(),handleToggle(node.id)},onClick:readOnly?()=>handleToggle(node.id):()=>handleSelectionChange(node.id),renderLeft:readOnly?void 0:()=>React.createElement(CheckboxRaw,{size:"s",name:node.label,checked:"checked"===nodeCheckboxState[node.id],indeterminate:"indeterminate"===nodeCheckboxState[node.id],onChange:()=>handleSelectionChange(node.id)}),renderRight:renderRightContent?sizeProps=>renderRightContent({...sizeProps,...node}):void 0},hasChildren&&React.createElement("ul",null,renderFn({data:node.children,level:level+1,renderFn,isParentsLastOfLvl:isLastNodeOfList})))});export const BaseEntityTree=({data,selectedIds,onSelectionChange,expandedIds=[],onToggle,activeId,filterFn,onTreeChange,hideBorder=!1,size="m",showItemsCount=!0,renderRightContent,"data-e2e-test-id":dataE2eTestId})=>{let nodeChildrenMap=Object.assign({},...data.map(tree=>getNodeChildrenMap(tree))),nodeCheckboxState=selectedIds?Object.assign({},...data.map(tree=>getTreeCheckboxState(nodeChildrenMap,tree.id,selectedIds))):null,nodeExpandedState=expandedIds.reduce((acc,id)=>(acc[id]=!0,acc),{}),dataShown=filterFn?data.map(tree=>filterTree(tree,filterFn)).filter(Boolean):data;useEffect(()=>{onTreeChange&&onTreeChange(dataShown.map(tree=>mapTree(tree,node=>({...node,checkedState:!!nodeCheckboxState&&nodeCheckboxState[node.id],isExpanded:!!nodeExpandedState[node.id]}))))},[dataShown,nodeCheckboxState,nodeExpandedState,onTreeChange]);let renderTreeBranches=makeRenderTreeBranches({nodeChildrenMap,nodeCheckboxState,nodeExpandedState,handleSelectionChange:targetId=>{if(onSelectionChange){let updatedSelectedIds=[];if(0===nodeChildrenMap[targetId].length)updatedSelectedIds=selectedIds.includes(targetId)?selectedIds.filter(id=>id!==targetId):selectedIds.concat([targetId]);else{let affectedLeafNodeIds=getLeafNodeIds(nodeChildrenMap,targetId);updatedSelectedIds="checked"===nodeCheckboxState[targetId]?selectedIds.filter(id=>!affectedLeafNodeIds.includes(id)):selectedIds.concat(affectedLeafNodeIds)}onSelectionChange(updatedSelectedIds)}},handleToggle:targetId=>{onToggle&&onToggle(expandedIds.includes(targetId)?expandedIds.filter(id=>id!==targetId):expandedIds.concat([targetId]))},expandAll:!!filterFn,hideBorder,size,showItemsCount,renderRightContent,activeId});return React.createElement(StyledList,{role:"tree","data-e2e-test-id":dataE2eTestId,"data-ds-id":"EntityTree",size:size},renderTreeBranches({data:dataShown,level:0,renderFn:renderTreeBranches}))};
|
|
@@ -13,7 +13,7 @@ export declare const MaskedInput: React.ForwardRefExoticComponent<{
|
|
|
13
13
|
} & {
|
|
14
14
|
name: string;
|
|
15
15
|
value?: string;
|
|
16
|
-
icon?: "article" | "link" | "menu" | "table" | "key" | "info" | "circle" | "filter" | "image" | "x" | "download" | "list" | "search" | "grid" | "sort" | "copy" | "reset" | "activity" | "alert-circle" | "alert-triangle" | "alert-octagon" | "align-left" | "amboss-logo" | "anamnesis" | "anki" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "auditor" | "award" | "bar-chart-2" | "bell" | "bell-curve" | "book" | "bookmark" | "book-open" | "box" | "bubble" | "bubble-check" | "bubble-image" | "bubble-pill" | "bubble-text" | "bulb" | "calculator" | "chart" | "charts" | "check" | "check-circle" | "check-small" | "check-square" | "checkmark-circle-filled" | "chevron-down" | "chevrons-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-up" | "clipboard" | "coffee" | "collapse" | "comment" | "compass" | "corner-down-left" | "corner-down-right" | "credit-card" | "edit-3" | "edit-3-filled" | "edit-square" | "education" | "effigos" | "emergency" | "expand" | "external-link" | "eye" | "eye-off" | "facebook" | "face-happy" | "face-neutral" | "face-sad" | "file-text" | "figma" | "filled-dot" | "film" | "flag" | "flag-filled" | "flask" | "flowchart" | "folder" | "folder-check-filled" | "folder-plus" | "gift" | "google" | "hammer-filled" | "hash" | "headphones" | "help-circle" | "home" | "illustration" | "image-broken" | "institution" | "layers" | "loader" | "lock" | "magic" | "mail" | "maximize" | "maximize-2" | "med-imaging" | "meditricks" | "message-circle" | "minus" | "more-horizontal" | "more-vertical" | "no-fill" | "open-full-screen" | "open-new-tab" | "open-sidebar-right" | "percent" | "pill" | "play-circle" | "play-filled" | "plus" | "plus-circle" | "plus-circle-filled" | "quiz" | "rotate-cw" | "search-list" | "settings" | "share" | "shopping-bag" | "show-all" | "sliders" | "smartzoom" | "sort-ascending" | "sort-descending" | "sort-neutral" | "star" | "stethoscope" | "tag" | "text-zoom-reset" | "thumbs-down" | "thumbs-up" | "timer-off" | "timer-on" | "trash-2" | "twitter" | "unlock" | "user" | "users" | "watch" | "wifi-off" | "wifi" | "x-circle-filled" | "zap" | "square";
|
|
16
|
+
icon?: "article" | "link" | "menu" | "table" | "key" | "info" | "circle" | "filter" | "image" | "x" | "download" | "list" | "search" | "grid" | "sort" | "copy" | "reset" | "zoom-in" | "zoom-out" | "activity" | "alert-circle" | "alert-triangle" | "alert-octagon" | "align-left" | "amboss-logo" | "anamnesis" | "anki" | "apple" | "arrow-down" | "arrow-left" | "arrow-right" | "arrow-up" | "auditor" | "award" | "bar-chart-2" | "bell" | "bell-curve" | "book" | "bookmark" | "book-open" | "box" | "bubble" | "bubble-check" | "bubble-image" | "bubble-pill" | "bubble-text" | "bulb" | "calculator" | "chart" | "charts" | "check" | "check-circle" | "check-small" | "check-square" | "checkmark-circle-filled" | "chevron-down" | "chevrons-down" | "chevron-left" | "chevron-right" | "chevron-up" | "chevrons-up" | "clipboard" | "coffee" | "collapse" | "comment" | "compass" | "corner-down-left" | "corner-down-right" | "credit-card" | "edit-3" | "edit-3-filled" | "edit-square" | "education" | "effigos" | "emergency" | "expand" | "external-link" | "eye" | "eye-off" | "facebook" | "face-happy" | "face-neutral" | "face-sad" | "file-text" | "figma" | "filled-dot" | "film" | "flag" | "flag-filled" | "flask" | "flowchart" | "folder" | "folder-check-filled" | "folder-plus" | "gift" | "google" | "hammer-filled" | "hash" | "headphones" | "help-circle" | "home" | "illustration" | "image-broken" | "institution" | "layers" | "loader" | "lock" | "magic" | "mail" | "maximize" | "maximize-2" | "med-imaging" | "meditricks" | "message-circle" | "minus" | "more-horizontal" | "more-vertical" | "no-fill" | "open-full-screen" | "open-new-tab" | "open-sidebar-right" | "percent" | "pill" | "play-circle" | "play-filled" | "plus" | "plus-circle" | "plus-circle-filled" | "quiz" | "rotate-cw" | "search-list" | "settings" | "share" | "shopping-bag" | "show-all" | "sliders" | "smartzoom" | "sort-ascending" | "sort-descending" | "sort-neutral" | "star" | "stethoscope" | "tag" | "text-zoom-reset" | "thumbs-down" | "thumbs-up" | "timer-off" | "timer-on" | "trash-2" | "twitter" | "unlock" | "user" | "users" | "watch" | "wifi-off" | "wifi" | "x-circle-filled" | "zap" | "square";
|
|
17
17
|
placeholder?: string;
|
|
18
18
|
hasError?: boolean;
|
|
19
19
|
disabled?: boolean;
|
|
@@ -155,5 +155,7 @@
|
|
|
155
155
|
"x-circle-filled": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\">\n <path fill-rule=\"evenodd\"\n d=\"M12 23c6.075 0 11-4.925 11-11S18.075 1 12 1 1 5.925 1 12s4.925 11 11 11zm4.707-15.707a1 1 0 010 1.414L13.414 12l3.293 3.293a1 1 0 01-1.414 1.414L12 13.414l-3.293 3.293a1 1 0 01-1.414-1.414L10.586 12 7.293 8.707a1 1 0 011.414-1.414L12 10.586l3.293-3.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n</svg>",
|
|
156
156
|
"table": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-table\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"></path></svg>",
|
|
157
157
|
"zap": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-zap\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\"></polygon></svg>",
|
|
158
|
-
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>"
|
|
158
|
+
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>",
|
|
159
|
+
"zoom-in": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M11 7a1 1 0 0 1 1 1v2h2a1 1 0 1 1 0 2h-2v2a1 1 0 1 1-2 0v-2H8a1 1 0 1 1 0-2h2V8a1 1 0 0 1 1-1Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M11 2a9 9 0 1 0 5.618 16.032l3.675 3.675a1 1 0 0 0 1.414-1.414l-3.675-3.675A9 9 0 0 0 11 2Zm5.041 13.856a7 7 0 1 0-.185.185 1.01 1.01 0 0 1 .185-.185Z\" clip-rule=\"evenodd\"/></svg>",
|
|
160
|
+
"zoom-out": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"24\" height=\"24\" fill=\"currentColor\" viewBox=\"0 0 24 24\"><path fill=\"currentColor\" d=\"M8 10a1 1 0 1 0 0 2h6a1 1 0 1 0 0-2H8Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M2 11a9 9 0 1 1 16.032 5.618l3.675 3.675a1 1 0 0 1-1.414 1.414l-3.675-3.675A9 9 0 0 1 2 11Zm16 0a6.977 6.977 0 0 1-1.959 4.856.998.998 0 0 0-.185.185A7 7 0 1 1 18 11Z\" clip-rule=\"evenodd\"/></svg>"
|
|
159
161
|
}
|
|
@@ -166,5 +166,7 @@
|
|
|
166
166
|
"x-circle-filled": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"none\" viewBox=\"0 0 16 16\">\n <path fill=\"currentColor\" fill-rule=\"evenodd\"\n d=\"M8 16A8 8 0 108 0a8 8 0 000 16zm3.707-11.707a1 1 0 010 1.414L9.414 8l2.293 2.293a1 1 0 01-1.414 1.414L8 9.414l-2.293 2.293a1 1 0 01-1.414-1.414L6.586 8 4.293 5.707a1 1 0 011.414-1.414L8 6.586l2.293-2.293a1 1 0 011.414 0z\"\n clip-rule=\"evenodd\" />\n</svg>",
|
|
167
167
|
"table": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-table\"><path d=\"M9 3H5a2 2 0 0 0-2 2v4m6-6h10a2 2 0 0 1 2 2v4M9 3v18m0 0h10a2 2 0 0 0 2-2V9M9 21H5a2 2 0 0 1-2-2V9m0 0h18\"></path></svg>",
|
|
168
168
|
"zap": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-zap\"><polygon points=\"13 2 3 14 12 14 11 22 21 10 12 10 13 2\"></polygon></svg>",
|
|
169
|
-
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>"
|
|
169
|
+
"square": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" class=\"feather feather-square\"><rect x=\"3\" y=\"3\" width=\"18\" height=\"18\" rx=\"2\" ry=\"2\"></rect></svg>",
|
|
170
|
+
"zoom-in": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M6 6V4h2v2h2v2H8v2H6V8H4V6h2Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M7 0a7 7 0 1 0 4.192 12.606l3.1 3.101a1 1 0 0 0 1.415-1.414l-3.1-3.1A7 7 0 0 0 7 0ZM2 7a5 5 0 1 1 10 0A5 5 0 0 1 2 7Z\" clip-rule=\"evenodd\"/></svg>",
|
|
171
|
+
"zoom-out": "<svg xmlns=\"http://www.w3.org/2000/svg\" width=\"16\" height=\"16\" fill=\"currentColor\" viewBox=\"0 0 16 16\"><path fill=\"currentColor\" d=\"M10 6H4v2h6V6Z\"/><path fill=\"currentColor\" fill-rule=\"evenodd\" d=\"M0 7a7 7 0 1 1 12.606 4.192l3.101 3.1a1 1 0 1 1-1.414 1.415l-3.1-3.1A7 7 0 0 1 0 7Zm7-5a5 5 0 1 0 0 10A5 5 0 0 0 7 2Z\" clip-rule=\"evenodd\"/></svg>"
|
|
170
172
|
}
|