@hitachivantara/uikit-react-lab 5.5.1 → 5.5.2
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/dist/cjs/components/Flow/Background/Background.cjs +2 -5
- package/dist/cjs/components/Flow/Background/Background.cjs.map +1 -1
- package/dist/cjs/components/Flow/Controls/Controls.cjs +8 -41
- package/dist/cjs/components/Flow/Controls/Controls.cjs.map +1 -1
- package/dist/cjs/components/Flow/DroppableFlow.cjs +2 -16
- package/dist/cjs/components/Flow/DroppableFlow.cjs.map +1 -1
- package/dist/cjs/components/Flow/Flow.cjs +6 -23
- package/dist/cjs/components/Flow/Flow.cjs.map +1 -1
- package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs +2 -5
- package/dist/cjs/components/Flow/FlowContext/FlowContext.cjs.map +1 -1
- package/dist/cjs/components/Flow/Minimap/Minimap.cjs +2 -9
- package/dist/cjs/components/Flow/Minimap/Minimap.cjs.map +1 -1
- package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs +20 -54
- package/dist/cjs/components/Flow/Sidebar/Sidebar.cjs.map +1 -1
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +14 -41
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs.map +1 -1
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +2 -10
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs.map +1 -1
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +7 -13
- package/dist/cjs/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs.map +1 -1
- package/dist/cjs/components/StepNavigation/DefaultNavigation/DefaultNavigation.cjs +6 -6
- package/dist/cjs/components/StepNavigation/DefaultNavigation/DefaultNavigation.cjs.map +1 -1
- package/dist/cjs/components/StepNavigation/DefaultNavigation/Step/Step.cjs +6 -29
- package/dist/cjs/components/StepNavigation/DefaultNavigation/Step/Step.cjs.map +1 -1
- package/dist/cjs/components/StepNavigation/SimpleNavigation/Dot/Dot.cjs +12 -20
- package/dist/cjs/components/StepNavigation/SimpleNavigation/Dot/Dot.cjs.map +1 -1
- package/dist/cjs/components/StepNavigation/SimpleNavigation/SimpleNavigation.cjs +6 -6
- package/dist/cjs/components/StepNavigation/SimpleNavigation/SimpleNavigation.cjs.map +1 -1
- package/dist/cjs/components/StepNavigation/StepNavigation.cjs +37 -87
- package/dist/cjs/components/StepNavigation/StepNavigation.cjs.map +1 -1
- package/dist/cjs/components/Wizard/Wizard.cjs +8 -30
- package/dist/cjs/components/Wizard/Wizard.cjs.map +1 -1
- package/dist/cjs/components/Wizard/WizardActions/WizardActions.cjs +12 -45
- package/dist/cjs/components/Wizard/WizardActions/WizardActions.cjs.map +1 -1
- package/dist/cjs/components/Wizard/WizardContainer/WizardContainer.cjs +5 -13
- package/dist/cjs/components/Wizard/WizardContainer/WizardContainer.cjs.map +1 -1
- package/dist/cjs/components/Wizard/WizardContent/LoadingContainer.cjs +16 -26
- package/dist/cjs/components/Wizard/WizardContent/LoadingContainer.cjs.map +1 -1
- package/dist/cjs/components/Wizard/WizardContent/WizardContent.cjs +23 -38
- package/dist/cjs/components/Wizard/WizardContent/WizardContent.cjs.map +1 -1
- package/dist/cjs/components/Wizard/WizardTitle/WizardTitle.cjs +16 -37
- package/dist/cjs/components/Wizard/WizardTitle/WizardTitle.cjs.map +1 -1
- package/dist/esm/components/Flow/Background/Background.js +2 -5
- package/dist/esm/components/Flow/Background/Background.js.map +1 -1
- package/dist/esm/components/Flow/Controls/Controls.js +8 -41
- package/dist/esm/components/Flow/Controls/Controls.js.map +1 -1
- package/dist/esm/components/Flow/DroppableFlow.js +2 -16
- package/dist/esm/components/Flow/DroppableFlow.js.map +1 -1
- package/dist/esm/components/Flow/Flow.js +6 -23
- package/dist/esm/components/Flow/Flow.js.map +1 -1
- package/dist/esm/components/Flow/FlowContext/FlowContext.js +2 -5
- package/dist/esm/components/Flow/FlowContext/FlowContext.js.map +1 -1
- package/dist/esm/components/Flow/Minimap/Minimap.js +2 -9
- package/dist/esm/components/Flow/Minimap/Minimap.js.map +1 -1
- package/dist/esm/components/Flow/Sidebar/Sidebar.js +20 -54
- package/dist/esm/components/Flow/Sidebar/Sidebar.js.map +1 -1
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js +14 -41
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroup.js.map +1 -1
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +2 -10
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js.map +1 -1
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +7 -13
- package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js.map +1 -1
- package/dist/esm/components/StepNavigation/DefaultNavigation/DefaultNavigation.js +6 -6
- package/dist/esm/components/StepNavigation/DefaultNavigation/DefaultNavigation.js.map +1 -1
- package/dist/esm/components/StepNavigation/DefaultNavigation/Step/Step.js +6 -29
- package/dist/esm/components/StepNavigation/DefaultNavigation/Step/Step.js.map +1 -1
- package/dist/esm/components/StepNavigation/SimpleNavigation/Dot/Dot.js +12 -20
- package/dist/esm/components/StepNavigation/SimpleNavigation/Dot/Dot.js.map +1 -1
- package/dist/esm/components/StepNavigation/SimpleNavigation/SimpleNavigation.js +6 -6
- package/dist/esm/components/StepNavigation/SimpleNavigation/SimpleNavigation.js.map +1 -1
- package/dist/esm/components/StepNavigation/StepNavigation.js +37 -87
- package/dist/esm/components/StepNavigation/StepNavigation.js.map +1 -1
- package/dist/esm/components/Wizard/Wizard.js +8 -30
- package/dist/esm/components/Wizard/Wizard.js.map +1 -1
- package/dist/esm/components/Wizard/WizardActions/WizardActions.js +12 -45
- package/dist/esm/components/Wizard/WizardActions/WizardActions.js.map +1 -1
- package/dist/esm/components/Wizard/WizardContainer/WizardContainer.js +5 -13
- package/dist/esm/components/Wizard/WizardContainer/WizardContainer.js.map +1 -1
- package/dist/esm/components/Wizard/WizardContent/LoadingContainer.js +16 -26
- package/dist/esm/components/Wizard/WizardContent/LoadingContainer.js.map +1 -1
- package/dist/esm/components/Wizard/WizardContent/WizardContent.js +23 -38
- package/dist/esm/components/Wizard/WizardContent/WizardContent.js.map +1 -1
- package/dist/esm/components/Wizard/WizardTitle/WizardTitle.js +16 -37
- package/dist/esm/components/Wizard/WizardTitle/WizardTitle.js.map +1 -1
- package/package.json +4 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.js","sources":["../../../../../src/components/Flow/Sidebar/Sidebar.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nimport debounce from \"lodash/debounce\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport {\n ExtractNames,\n HvDrawer,\n HvDrawerProps,\n HvInput,\n HvInputProps,\n HvTypography,\n useLabels,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Add } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./Sidebar.styles\";\nimport { HvFlowSidebarGroup } from \"./SidebarGroup\";\nimport { useFlowContext } from \"../FlowContext\";\nimport { buildGroups } from \"./utils\";\n\nexport { staticClasses as flowSidebarClasses };\n\nexport type HvFlowSidebarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarProps\n extends Omit<HvDrawerProps, \"classes\" | \"title\"> {\n /** Sidebar title. */\n title?: string;\n /** Sidebar description. */\n description?: string;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarClasses;\n /** Labels used on the sidebar. */\n labels?: {\n itemAriaRoleDescription?: string;\n expandGroupButtonAriaLabel?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n };\n}\n\nconst DEFAULT_LABELS: HvFlowSidebarProps[\"labels\"] = {\n itemAriaRoleDescription: \"Draggable\",\n expandGroupButtonAriaLabel: \"Expand group\",\n searchPlaceholder: \"Search node...\",\n searchAriaLabel: \"Search node...\",\n};\n\nexport const HvFlowSidebar = ({\n id,\n title,\n description,\n anchor = \"right\",\n buttonTitle = \"Close\",\n classes: classesProp,\n labels: labelsProps,\n ...others\n}: HvFlowSidebarProps) => {\n const { classes } = useClasses(classesProp);\n\n const { nodeGroups, nodeTypes, setExpandedNodeGroups } = useFlowContext();\n\n const unfilteredGroups = useMemo(\n () => buildGroups(nodeGroups, nodeTypes),\n [nodeGroups, nodeTypes]\n );\n\n const [groups, setGroups] = useState(unfilteredGroups);\n\n const labels = useLabels(DEFAULT_LABELS, labelsProps);\n\n const drawerElementId = useUniqueId(id, \"hvFlowSidebarDrawer\");\n const groupsElementId = useUniqueId(id, \"hvFlowSidebarGroups\");\n\n // The sidebar is droppable to distinguish between the canvas and the sidebar\n // Otherwise items dropped inside the sidebar will be added to the canvas\n const { setNodeRef } = useDroppable({\n id: drawerElementId,\n });\n\n const handleSearch: HvInputProps[\"onChange\"] = (event, value) => {\n const gps = value\n ? Object.entries(unfilteredGroups).reduce((acc, curr) => {\n // Filter nodes by search\n const filteredNodes = curr[1].nodes.filter((obj) =>\n obj.label.toLocaleLowerCase().includes(value.toLocaleLowerCase())\n );\n const nodesCount = filteredNodes.length;\n\n // Only show groups with nodes\n if (nodesCount > 0) {\n acc[curr[0]] = {\n ...curr[1],\n nodes: filteredNodes,\n };\n }\n\n return acc;\n }, {})\n : unfilteredGroups;\n\n setGroups(gps);\n setExpandedNodeGroups?.(value ? Object.keys(gps) : []);\n };\n\n const handleDebouncedSearch = debounce(handleSearch, 500);\n\n return (\n <HvDrawer\n BackdropComponent={undefined}\n variant=\"persistent\"\n classes={{\n paper: classes.drawerPaper,\n }}\n anchor={anchor}\n buttonTitle={buttonTitle}\n {...others}\n >\n <div id={drawerElementId} ref={setNodeRef}>\n <div className={classes.titleContainer}>\n <Add role=\"none\" />\n <HvTypography variant=\"title3\">{title}</HvTypography>\n </div>\n <div className={classes.contentContainer}>\n <HvTypography className={classes.description}>\n {description}\n </HvTypography>\n <HvInput\n className={classes.searchRoot}\n type=\"search\"\n placeholder={labels?.searchPlaceholder}\n aria-label={labels?.searchAriaLabel}\n aria-controls={groupsElementId}\n aria-owns={groupsElementId}\n onChange={handleDebouncedSearch}\n inputProps={{ autoComplete: \"off\" }}\n />\n <ul id={groupsElementId} className={classes.groupsContainer}>\n {Object.entries(groups).map((obj) => (\n <HvFlowSidebarGroup\n key={obj[0]}\n id={obj[0]}\n expandButtonProps={{\n \"aria-label\": labels?.expandGroupButtonAriaLabel,\n }}\n itemProps={{\n \"aria-roledescription\": labels?.itemAriaRoleDescription,\n }}\n {...obj[1]}\n />\n ))}\n </ul>\n </div>\n </div>\n </HvDrawer>\n );\n};\n"],"names":["DEFAULT_LABELS","itemAriaRoleDescription","expandGroupButtonAriaLabel","searchPlaceholder","searchAriaLabel","HvFlowSidebar","id","title","description","anchor","buttonTitle","classes","classesProp","labels","labelsProps","others","useClasses","nodeGroups","nodeTypes","setExpandedNodeGroups","useFlowContext","unfilteredGroups","useMemo","buildGroups","groups","setGroups","useState","useLabels","drawerElementId","useUniqueId","groupsElementId","setNodeRef","useDroppable","handleSearch","event","value","gps","Object","entries","reduce","acc","curr","filteredNodes","nodes","filter","obj","label","toLocaleLowerCase","includes","nodesCount","length","keys","handleDebouncedSearch","debounce","
|
|
1
|
+
{"version":3,"file":"Sidebar.js","sources":["../../../../../src/components/Flow/Sidebar/Sidebar.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\n\nimport debounce from \"lodash/debounce\";\n\nimport { useDroppable } from \"@dnd-kit/core\";\n\nimport {\n ExtractNames,\n HvDrawer,\n HvDrawerProps,\n HvInput,\n HvInputProps,\n HvTypography,\n useLabels,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Add } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./Sidebar.styles\";\nimport { HvFlowSidebarGroup } from \"./SidebarGroup\";\nimport { useFlowContext } from \"../FlowContext\";\nimport { buildGroups } from \"./utils\";\n\nexport { staticClasses as flowSidebarClasses };\n\nexport type HvFlowSidebarClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarProps\n extends Omit<HvDrawerProps, \"classes\" | \"title\"> {\n /** Sidebar title. */\n title?: string;\n /** Sidebar description. */\n description?: string;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarClasses;\n /** Labels used on the sidebar. */\n labels?: {\n itemAriaRoleDescription?: string;\n expandGroupButtonAriaLabel?: string;\n searchPlaceholder?: string;\n searchAriaLabel?: string;\n };\n}\n\nconst DEFAULT_LABELS: HvFlowSidebarProps[\"labels\"] = {\n itemAriaRoleDescription: \"Draggable\",\n expandGroupButtonAriaLabel: \"Expand group\",\n searchPlaceholder: \"Search node...\",\n searchAriaLabel: \"Search node...\",\n};\n\nexport const HvFlowSidebar = ({\n id,\n title,\n description,\n anchor = \"right\",\n buttonTitle = \"Close\",\n classes: classesProp,\n labels: labelsProps,\n ...others\n}: HvFlowSidebarProps) => {\n const { classes } = useClasses(classesProp);\n\n const { nodeGroups, nodeTypes, setExpandedNodeGroups } = useFlowContext();\n\n const unfilteredGroups = useMemo(\n () => buildGroups(nodeGroups, nodeTypes),\n [nodeGroups, nodeTypes]\n );\n\n const [groups, setGroups] = useState(unfilteredGroups);\n\n const labels = useLabels(DEFAULT_LABELS, labelsProps);\n\n const drawerElementId = useUniqueId(id, \"hvFlowSidebarDrawer\");\n const groupsElementId = useUniqueId(id, \"hvFlowSidebarGroups\");\n\n // The sidebar is droppable to distinguish between the canvas and the sidebar\n // Otherwise items dropped inside the sidebar will be added to the canvas\n const { setNodeRef } = useDroppable({\n id: drawerElementId,\n });\n\n const handleSearch: HvInputProps[\"onChange\"] = (event, value) => {\n const gps = value\n ? Object.entries(unfilteredGroups).reduce((acc, curr) => {\n // Filter nodes by search\n const filteredNodes = curr[1].nodes.filter((obj) =>\n obj.label.toLocaleLowerCase().includes(value.toLocaleLowerCase())\n );\n const nodesCount = filteredNodes.length;\n\n // Only show groups with nodes\n if (nodesCount > 0) {\n acc[curr[0]] = {\n ...curr[1],\n nodes: filteredNodes,\n };\n }\n\n return acc;\n }, {})\n : unfilteredGroups;\n\n setGroups(gps);\n setExpandedNodeGroups?.(value ? Object.keys(gps) : []);\n };\n\n const handleDebouncedSearch = debounce(handleSearch, 500);\n\n return (\n <HvDrawer\n BackdropComponent={undefined}\n variant=\"persistent\"\n classes={{\n paper: classes.drawerPaper,\n }}\n anchor={anchor}\n buttonTitle={buttonTitle}\n {...others}\n >\n <div id={drawerElementId} ref={setNodeRef}>\n <div className={classes.titleContainer}>\n <Add role=\"none\" />\n <HvTypography variant=\"title3\">{title}</HvTypography>\n </div>\n <div className={classes.contentContainer}>\n <HvTypography className={classes.description}>\n {description}\n </HvTypography>\n <HvInput\n className={classes.searchRoot}\n type=\"search\"\n placeholder={labels?.searchPlaceholder}\n aria-label={labels?.searchAriaLabel}\n aria-controls={groupsElementId}\n aria-owns={groupsElementId}\n onChange={handleDebouncedSearch}\n inputProps={{ autoComplete: \"off\" }}\n />\n <ul id={groupsElementId} className={classes.groupsContainer}>\n {Object.entries(groups).map((obj) => (\n <HvFlowSidebarGroup\n key={obj[0]}\n id={obj[0]}\n expandButtonProps={{\n \"aria-label\": labels?.expandGroupButtonAriaLabel,\n }}\n itemProps={{\n \"aria-roledescription\": labels?.itemAriaRoleDescription,\n }}\n {...obj[1]}\n />\n ))}\n </ul>\n </div>\n </div>\n </HvDrawer>\n );\n};\n"],"names":["DEFAULT_LABELS","itemAriaRoleDescription","expandGroupButtonAriaLabel","searchPlaceholder","searchAriaLabel","HvFlowSidebar","id","title","description","anchor","buttonTitle","classes","classesProp","labels","labelsProps","others","useClasses","nodeGroups","nodeTypes","setExpandedNodeGroups","useFlowContext","unfilteredGroups","useMemo","buildGroups","groups","setGroups","useState","useLabels","drawerElementId","useUniqueId","groupsElementId","setNodeRef","useDroppable","handleSearch","event","value","gps","Object","entries","reduce","acc","curr","filteredNodes","nodes","filter","obj","label","toLocaleLowerCase","includes","nodesCount","length","keys","handleDebouncedSearch","debounce","undefined","paper","drawerPaper","titleContainer","contentContainer","searchRoot","autoComplete","groupsContainer","map"],"mappings":";;;;;;;;;;;AA4CA,MAAMA,iBAA+C;AAAA,EACnDC,yBAAyB;AAAA,EACzBC,4BAA4B;AAAA,EAC5BC,mBAAmB;AAAA,EACnBC,iBAAiB;AACnB;AAEO,MAAMC,gBAAgBA,CAAC;AAAA,EAC5BC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAAS;AAAA,EACTC,cAAc;AAAA,EACdC,SAASC;AAAAA,EACTC,QAAQC;AAAAA,EACR,GAAGC;AACe,MAAM;AAClB,QAAA;AAAA,IAAEJ;AAAAA,EAAAA,IAAYK,WAAWJ,WAAW;AAEpC,QAAA;AAAA,IAAEK;AAAAA,IAAYC;AAAAA,IAAWC;AAAAA,MAA0BC,eAAe;AAElEC,QAAAA,mBAAmBC,QACvB,MAAMC,YAAYN,YAAYC,SAAS,GACvC,CAACD,YAAYC,SAAS,CACxB;AAEA,QAAM,CAACM,QAAQC,SAAS,IAAIC,SAASL,gBAAgB;AAE/CR,QAAAA,SAASc,UAAU3B,gBAAgBc,WAAW;AAE9Cc,QAAAA,kBAAkBC,YAAYvB,IAAI,qBAAqB;AACvDwB,QAAAA,kBAAkBD,YAAYvB,IAAI,qBAAqB;AAIvD,QAAA;AAAA,IAAEyB;AAAAA,MAAeC,aAAa;AAAA,IAClC1B,IAAIsB;AAAAA,EAAAA,CACL;AAEKK,QAAAA,eAAyCA,CAACC,OAAOC,UAAU;AACzDC,UAAAA,MAAMD,QACRE,OAAOC,QAAQjB,gBAAgB,EAAEkB,OAAO,CAACC,KAAKC,SAAS;AAErD,YAAMC,gBAAgBD,KAAK,CAAC,EAAEE,MAAMC,OAAQC,CAAAA,QAC1CA,IAAIC,MAAMC,oBAAoBC,SAASb,MAAMY,kBAAmB,CAAA,CAClE;AACA,YAAME,aAAaP,cAAcQ;AAGjC,UAAID,aAAa,GAAG;AACdR,YAAAA,KAAK,CAAC,CAAC,IAAI;AAAA,UACb,GAAGA,KAAK,CAAC;AAAA,UACTE,OAAOD;AAAAA,QAAAA;AAAAA,MAEX;AAEOF,aAAAA;AAAAA,IAAAA,GACN,CAAA,CAAE,IACLnB;AAEJI,cAAUW,GAAG;AACbjB,mEAAwBgB,QAAQE,OAAOc,KAAKf,GAAG,IAAI,CAAA;AAAA,EAAE;AAGjDgB,QAAAA,wBAAwBC,SAASpB,cAAc,GAAG;AAExD,6BACG,UACC,EAAA,mBAAmBqB,QACnB,SAAQ,cACR,SAAS;AAAA,IACPC,OAAO5C,QAAQ6C;AAAAA,EACjB,GACA,QACA,aACA,GAAIzC,QAEJ,+BAAC,OAAI,EAAA,IAAIa,iBAAiB,KAAKG,YAC7B,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAWpB,QAAQ8C,gBACtB,UAAA;AAAA,MAAC,oBAAA,KAAA,EAAI,MAAK,OAAM,CAAA;AAAA,MACf,oBAAA,cAAA,EAAa,SAAQ,UAAUlD,UAAM,OAAA;AAAA,IAAA,GACxC;AAAA,IACC,qBAAA,OAAA,EAAI,WAAWI,QAAQ+C,kBACtB,UAAA;AAAA,MAAA,oBAAC,cAAa,EAAA,WAAW/C,QAAQH,aAC9BA,UACH,aAAA;AAAA,0BACC,SACC,EAAA,WAAWG,QAAQgD,YACnB,MAAK,UACL,aAAa9C,iCAAQV,mBACrB,cAAYU,iCAAQT,iBACpB,iBAAe0B,iBACf,aAAWA,iBACX,UAAUsB,uBACV,YAAY;AAAA,QAAEQ,cAAc;AAAA,MAAA,GAAQ;AAAA,0BAErC,MAAG,EAAA,IAAI9B,iBAAiB,WAAWnB,QAAQkD,iBACzCxB,UAAOC,OAAAA,QAAQd,MAAM,EAAEsC,IAAKjB,SAC1B,oBAAA,oBAAA,EAEC,IAAIA,IAAI,CAAC,GACT,mBAAmB;AAAA,QACjB,cAAchC,iCAAQX;AAAAA,SAExB,WAAW;AAAA,QACT,wBAAwBW,iCAAQZ;AAAAA,MAAAA,GAE9B4C,GAAAA,IAAI,CAAC,KARJA,IAAI,CAAC,CAQC,CAEd,GACH;AAAA,IAAA,GACF;AAAA,EAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { useMemo, useCallback } from "react";
|
|
2
3
|
import { Up, Down } from "@hitachivantara/uikit-react-icons";
|
|
3
4
|
import { HvTypography, HvButton } from "@hitachivantara/uikit-react-core";
|
|
4
5
|
import { getColor } from "@hitachivantara/uikit-styles";
|
|
5
6
|
import { useClasses } from "./SidebarGroup.styles.js";
|
|
6
7
|
import { staticClasses } from "./SidebarGroup.styles.js";
|
|
7
|
-
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
8
8
|
import { useFlowContext } from "../../FlowContext/FlowContext.js";
|
|
9
9
|
import { HvFlowDraggableSidebarGroupItem } from "./SidebarGroupItem/DraggableSidebarGroupItem.js";
|
|
10
10
|
const HvFlowSidebarGroup = ({
|
|
@@ -31,46 +31,19 @@ const HvFlowSidebarGroup = ({
|
|
|
31
31
|
const handleClick = useCallback(() => {
|
|
32
32
|
setExpandedNodeGroups == null ? void 0 : setExpandedNodeGroups((prev) => opened ? prev.filter((groupId) => id !== groupId) : [...prev, id]);
|
|
33
33
|
}, [id, opened, setExpandedNodeGroups]);
|
|
34
|
-
return /* @__PURE__ */ jsxs("li", {
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
variant: "title4",
|
|
48
|
-
children: nodes.length > 1 ? `${label} (${nodes.length})` : label
|
|
49
|
-
})]
|
|
50
|
-
}), /* @__PURE__ */ jsx(HvButton, {
|
|
51
|
-
icon: true,
|
|
52
|
-
onClick: handleClick,
|
|
53
|
-
"aria-expanded": opened,
|
|
54
|
-
...expandButtonProps,
|
|
55
|
-
children: opened ? /* @__PURE__ */ jsx(Up, {
|
|
56
|
-
role: "none"
|
|
57
|
-
}) : /* @__PURE__ */ jsx(Down, {
|
|
58
|
-
role: "none"
|
|
59
|
-
})
|
|
60
|
-
})]
|
|
61
|
-
}), description && /* @__PURE__ */ jsx("div", {
|
|
62
|
-
className: classes.descriptionContainer,
|
|
63
|
-
children: /* @__PURE__ */ jsx(HvTypography, {
|
|
64
|
-
children: description
|
|
65
|
-
})
|
|
66
|
-
}), opened && /* @__PURE__ */ jsx("div", {
|
|
67
|
-
className: classes.itemsContainer,
|
|
68
|
-
children: nodes.map((obj) => /* @__PURE__ */ jsx(HvFlowDraggableSidebarGroupItem, {
|
|
69
|
-
...itemProps,
|
|
70
|
-
...obj
|
|
71
|
-
}, obj.id))
|
|
72
|
-
})]
|
|
73
|
-
});
|
|
34
|
+
return /* @__PURE__ */ jsxs("li", { className: cx(css({
|
|
35
|
+
borderColor: getColor(color)
|
|
36
|
+
}), classes.root), children: [
|
|
37
|
+
/* @__PURE__ */ jsxs("div", { className: classes.titleContainer, children: [
|
|
38
|
+
/* @__PURE__ */ jsxs("div", { className: classes.labelContainer, children: [
|
|
39
|
+
/* @__PURE__ */ jsx("div", { className: classes.icon, role: "none", children: icon }),
|
|
40
|
+
/* @__PURE__ */ jsx(HvTypography, { variant: "title4", children: nodes.length > 1 ? `${label} (${nodes.length})` : label })
|
|
41
|
+
] }),
|
|
42
|
+
/* @__PURE__ */ jsx(HvButton, { icon: true, onClick: handleClick, "aria-expanded": opened, ...expandButtonProps, children: opened ? /* @__PURE__ */ jsx(Up, { role: "none" }) : /* @__PURE__ */ jsx(Down, { role: "none" }) })
|
|
43
|
+
] }),
|
|
44
|
+
description && /* @__PURE__ */ jsx("div", { className: classes.descriptionContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: description }) }),
|
|
45
|
+
opened && /* @__PURE__ */ jsx("div", { className: classes.itemsContainer, children: nodes.map((obj) => /* @__PURE__ */ jsx(HvFlowDraggableSidebarGroupItem, { ...itemProps, ...obj }, obj.id)) })
|
|
46
|
+
] });
|
|
74
47
|
};
|
|
75
48
|
export {
|
|
76
49
|
HvFlowSidebarGroup,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarGroup.js","sources":["../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroup.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\n\nimport { Down, Up } from \"@hitachivantara/uikit-react-icons\";\nimport {\n ExtractNames,\n HvButton,\n HvButtonProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { getColor } from \"@hitachivantara/uikit-styles\";\n\nimport { HvFlowNodeGroup } from \"../../types\";\nimport { staticClasses, useClasses } from \"./SidebarGroup.styles\";\nimport {\n HvFlowDraggableSidebarGroupItem,\n HvFlowDraggableSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\nimport { useFlowContext } from \"../../FlowContext\";\n\nexport { staticClasses as flowSidebarGroupClasses };\n\nexport type HvFlowSidebarGroupClasses = ExtractNames<typeof useClasses>;\n\nexport type HvFlowSidebarGroupNodes = {\n id: string;\n label: string;\n}[];\n\nexport interface HvFlowSidebarGroupProps extends HvFlowNodeGroup {\n /** Group id. */\n id: string;\n /** Group nodes. */\n nodes: HvFlowSidebarGroupNodes;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupClasses;\n /** Expand button props. */\n expandButtonProps?: HvButtonProps;\n /** Item group props. */\n itemProps?: Partial<HvFlowDraggableSidebarGroupItemProps>;\n}\n\nexport const HvFlowSidebarGroup = ({\n id,\n label,\n nodes,\n color,\n description,\n icon,\n expandButtonProps,\n classes: classesProp,\n itemProps,\n}: HvFlowSidebarGroupProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const { expandedNodeGroups, setExpandedNodeGroups } = useFlowContext();\n\n const opened = useMemo(\n () => !!expandedNodeGroups?.find((groupId) => groupId === id),\n [expandedNodeGroups, id]\n );\n\n const handleClick = useCallback(() => {\n setExpandedNodeGroups?.((prev) =>\n opened ? prev.filter((groupId) => id !== groupId) : [...prev, id]\n );\n }, [id, opened, setExpandedNodeGroups]);\n\n return (\n <li className={cx(css({ borderColor: getColor(color) }), classes.root)}>\n <div className={classes.titleContainer}>\n <div className={classes.labelContainer}>\n <div className={classes.icon} role=\"none\">\n {icon}\n </div>\n <HvTypography variant=\"title4\">\n {nodes.length > 1 ? `${label} (${nodes.length})` : label}\n </HvTypography>\n </div>\n <HvButton\n icon\n onClick={handleClick}\n aria-expanded={opened}\n {...expandButtonProps}\n >\n {opened ? <Up role=\"none\" /> : <Down role=\"none\" />}\n </HvButton>\n </div>\n {description && (\n <div className={classes.descriptionContainer}>\n <HvTypography>{description}</HvTypography>\n </div>\n )}\n {opened && (\n <div className={classes.itemsContainer}>\n {nodes.map((obj) => (\n <HvFlowDraggableSidebarGroupItem\n key={obj.id}\n {...itemProps}\n {...obj}\n />\n ))}\n </div>\n )}\n </li>\n );\n};\n"],"names":["HvFlowSidebarGroup","id","label","nodes","color","description","icon","expandButtonProps","classes","classesProp","itemProps","cx","css","useClasses","expandedNodeGroups","setExpandedNodeGroups","useFlowContext","opened","useMemo","find","groupId","handleClick","useCallback","prev","filter","
|
|
1
|
+
{"version":3,"file":"SidebarGroup.js","sources":["../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroup.tsx"],"sourcesContent":["import { useCallback, useMemo } from \"react\";\n\nimport { Down, Up } from \"@hitachivantara/uikit-react-icons\";\nimport {\n ExtractNames,\n HvButton,\n HvButtonProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { getColor } from \"@hitachivantara/uikit-styles\";\n\nimport { HvFlowNodeGroup } from \"../../types\";\nimport { staticClasses, useClasses } from \"./SidebarGroup.styles\";\nimport {\n HvFlowDraggableSidebarGroupItem,\n HvFlowDraggableSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\nimport { useFlowContext } from \"../../FlowContext\";\n\nexport { staticClasses as flowSidebarGroupClasses };\n\nexport type HvFlowSidebarGroupClasses = ExtractNames<typeof useClasses>;\n\nexport type HvFlowSidebarGroupNodes = {\n id: string;\n label: string;\n}[];\n\nexport interface HvFlowSidebarGroupProps extends HvFlowNodeGroup {\n /** Group id. */\n id: string;\n /** Group nodes. */\n nodes: HvFlowSidebarGroupNodes;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupClasses;\n /** Expand button props. */\n expandButtonProps?: HvButtonProps;\n /** Item group props. */\n itemProps?: Partial<HvFlowDraggableSidebarGroupItemProps>;\n}\n\nexport const HvFlowSidebarGroup = ({\n id,\n label,\n nodes,\n color,\n description,\n icon,\n expandButtonProps,\n classes: classesProp,\n itemProps,\n}: HvFlowSidebarGroupProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const { expandedNodeGroups, setExpandedNodeGroups } = useFlowContext();\n\n const opened = useMemo(\n () => !!expandedNodeGroups?.find((groupId) => groupId === id),\n [expandedNodeGroups, id]\n );\n\n const handleClick = useCallback(() => {\n setExpandedNodeGroups?.((prev) =>\n opened ? prev.filter((groupId) => id !== groupId) : [...prev, id]\n );\n }, [id, opened, setExpandedNodeGroups]);\n\n return (\n <li className={cx(css({ borderColor: getColor(color) }), classes.root)}>\n <div className={classes.titleContainer}>\n <div className={classes.labelContainer}>\n <div className={classes.icon} role=\"none\">\n {icon}\n </div>\n <HvTypography variant=\"title4\">\n {nodes.length > 1 ? `${label} (${nodes.length})` : label}\n </HvTypography>\n </div>\n <HvButton\n icon\n onClick={handleClick}\n aria-expanded={opened}\n {...expandButtonProps}\n >\n {opened ? <Up role=\"none\" /> : <Down role=\"none\" />}\n </HvButton>\n </div>\n {description && (\n <div className={classes.descriptionContainer}>\n <HvTypography>{description}</HvTypography>\n </div>\n )}\n {opened && (\n <div className={classes.itemsContainer}>\n {nodes.map((obj) => (\n <HvFlowDraggableSidebarGroupItem\n key={obj.id}\n {...itemProps}\n {...obj}\n />\n ))}\n </div>\n )}\n </li>\n );\n};\n"],"names":["HvFlowSidebarGroup","id","label","nodes","color","description","icon","expandButtonProps","classes","classesProp","itemProps","cx","css","useClasses","expandedNodeGroups","setExpandedNodeGroups","useFlowContext","opened","useMemo","find","groupId","handleClick","useCallback","prev","filter","borderColor","getColor","root","titleContainer","labelContainer","length","descriptionContainer","itemsContainer","map","obj"],"mappings":";;;;;;;;;AAyCO,MAAMA,qBAAqBA,CAAC;AAAA,EACjCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,SAASC;AAAAA,EACTC;AACuB,MAAM;AACvB,QAAA;AAAA,IAAEF;AAAAA,IAASG;AAAAA,IAAIC;AAAAA,EAAAA,IAAQC,WAAWJ,WAAW;AAE7C,QAAA;AAAA,IAAEK;AAAAA,IAAoBC;AAAAA,MAA0BC,eAAe;AAErE,QAAMC,SAASC,QACb,MAAM,CAAC,EAACJ,yDAAoBK,KAAMC,CAAYA,YAAAA,YAAYnB,MAC1D,CAACa,oBAAoBb,EAAE,CACzB;AAEMoB,QAAAA,cAAcC,YAAY,MAAM;AACpCP,mEAAyBQ,CACvBN,SAAAA,SAASM,KAAKC,OAAQJ,CAAYnB,YAAAA,OAAOmB,OAAO,IAAI,CAAC,GAAGG,MAAMtB,EAAE;AAAA,EAEjE,GAAA,CAACA,IAAIgB,QAAQF,qBAAqB,CAAC;AAEtC,SACG,qBAAA,MAAA,EAAG,WAAWJ,GAAGC,IAAI;AAAA,IAAEa,aAAaC,SAAStB,KAAK;AAAA,EAAG,CAAA,GAAGI,QAAQmB,IAAI,GACnE,UAAA;AAAA,IAAC,qBAAA,OAAA,EAAI,WAAWnB,QAAQoB,gBACtB,UAAA;AAAA,MAAC,qBAAA,OAAA,EAAI,WAAWpB,QAAQqB,gBACtB,UAAA;AAAA,QAAA,oBAAC,SAAI,WAAWrB,QAAQF,MAAM,MAAK,QAChCA,UACH,MAAA;AAAA,QACC,oBAAA,cAAA,EAAa,SAAQ,UACnBH,UAAM2B,MAAAA,SAAS,IAAK,GAAE5B,KAAM,KAAIC,MAAM2B,MAAO,MAAK5B,OACrD;AAAA,MAAA,GACF;AAAA,MACA,oBAAC,YACC,MAAI,MACJ,SAASmB,aACT,iBAAeJ,QACf,GAAIV,mBAEHU,mBAAU,oBAAA,IAAA,EAAG,MAAK,QAAM,wBAAO,MAAK,EAAA,MAAK,QAAS,EACrD,CAAA;AAAA,IAAA,GACF;AAAA,IACCZ,mCACE,OAAI,EAAA,WAAWG,QAAQuB,sBACtB,UAAA,oBAAC,cAAc1B,EAAAA,UAAAA,YAAAA,CAAY,EAC7B,CAAA;AAAA,IAEDY,UACE,oBAAA,OAAA,EAAI,WAAWT,QAAQwB,gBACrB7B,gBAAM8B,IAAKC,CAAAA,QACT,oBAAA,iCAAA,EAEKxB,GAAAA,WACAwB,GAAAA,OAFCA,IAAIjC,EAED,CAEX,GACH;AAAA,EAEJ,EAAA,CAAA;AAEJ;"}
|
package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { useForkRef } from "@mui/material";
|
|
2
3
|
import { useRef } from "react";
|
|
3
4
|
import { useDraggable } from "@dnd-kit/core";
|
|
4
5
|
import { HvFlowSidebarGroupItem } from "./SidebarGroupItem.js";
|
|
5
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
const HvFlowDraggableSidebarGroupItem = ({
|
|
7
7
|
label,
|
|
8
8
|
id,
|
|
@@ -32,15 +32,7 @@ const HvFlowDraggableSidebarGroupItem = ({
|
|
|
32
32
|
const style = transform ? {
|
|
33
33
|
transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`
|
|
34
34
|
} : void 0;
|
|
35
|
-
return /* @__PURE__ */ jsx(HvFlowSidebarGroupItem, {
|
|
36
|
-
ref: forkedRef,
|
|
37
|
-
style,
|
|
38
|
-
label,
|
|
39
|
-
isDragging,
|
|
40
|
-
...listeners,
|
|
41
|
-
...attributes,
|
|
42
|
-
...others
|
|
43
|
-
});
|
|
35
|
+
return /* @__PURE__ */ jsx(HvFlowSidebarGroupItem, { ref: forkedRef, style, label, isDragging, ...listeners, ...attributes, ...others });
|
|
44
36
|
};
|
|
45
37
|
export {
|
|
46
38
|
HvFlowDraggableSidebarGroupItem
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DraggableSidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.tsx"],"sourcesContent":["import { useForkRef } from \"@mui/material\";\n\nimport { useRef } from \"react\";\n\nimport { useDraggable } from \"@dnd-kit/core\";\n\nimport {\n HvFlowSidebarGroupItem,\n HvFlowSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\n\nexport interface HvFlowDraggableSidebarGroupItemProps\n extends HvFlowSidebarGroupItemProps {\n /** Item id: the item type. */\n id: string;\n}\n\nexport const HvFlowDraggableSidebarGroupItem = ({\n label,\n id,\n ...others\n}: HvFlowDraggableSidebarGroupItemProps) => {\n const itemRef = useRef<HTMLElement>(null);\n\n const { attributes, listeners, setNodeRef, isDragging, transform } =\n useDraggable({\n id,\n data: {\n hvFlow: {\n // Needed for the drag overlay: otherwise the item is cut by the drawer because of overflow\n label,\n // Item position: used to position the item when dropped\n x: itemRef.current?.getBoundingClientRect().x,\n y: itemRef.current?.getBoundingClientRect().y,\n },\n },\n });\n\n const forkedRef = useForkRef(itemRef, setNodeRef);\n\n const style = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n }\n : undefined;\n\n return (\n <HvFlowSidebarGroupItem\n ref={forkedRef}\n style={style}\n label={label}\n isDragging={isDragging}\n {...listeners}\n {...attributes}\n {...others}\n />\n );\n};\n"],"names":["HvFlowDraggableSidebarGroupItem","label","id","others","itemRef","useRef","attributes","listeners","setNodeRef","isDragging","transform","useDraggable","data","hvFlow","x","current","getBoundingClientRect","y","forkedRef","useForkRef","style","undefined"
|
|
1
|
+
{"version":3,"file":"DraggableSidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.tsx"],"sourcesContent":["import { useForkRef } from \"@mui/material\";\n\nimport { useRef } from \"react\";\n\nimport { useDraggable } from \"@dnd-kit/core\";\n\nimport {\n HvFlowSidebarGroupItem,\n HvFlowSidebarGroupItemProps,\n} from \"./SidebarGroupItem\";\n\nexport interface HvFlowDraggableSidebarGroupItemProps\n extends HvFlowSidebarGroupItemProps {\n /** Item id: the item type. */\n id: string;\n}\n\nexport const HvFlowDraggableSidebarGroupItem = ({\n label,\n id,\n ...others\n}: HvFlowDraggableSidebarGroupItemProps) => {\n const itemRef = useRef<HTMLElement>(null);\n\n const { attributes, listeners, setNodeRef, isDragging, transform } =\n useDraggable({\n id,\n data: {\n hvFlow: {\n // Needed for the drag overlay: otherwise the item is cut by the drawer because of overflow\n label,\n // Item position: used to position the item when dropped\n x: itemRef.current?.getBoundingClientRect().x,\n y: itemRef.current?.getBoundingClientRect().y,\n },\n },\n });\n\n const forkedRef = useForkRef(itemRef, setNodeRef);\n\n const style = transform\n ? {\n transform: `translate3d(${transform.x}px, ${transform.y}px, 0)`,\n }\n : undefined;\n\n return (\n <HvFlowSidebarGroupItem\n ref={forkedRef}\n style={style}\n label={label}\n isDragging={isDragging}\n {...listeners}\n {...attributes}\n {...others}\n />\n );\n};\n"],"names":["HvFlowDraggableSidebarGroupItem","label","id","others","itemRef","useRef","attributes","listeners","setNodeRef","isDragging","transform","useDraggable","data","hvFlow","x","current","getBoundingClientRect","y","forkedRef","useForkRef","style","undefined"],"mappings":";;;;;AAiBO,MAAMA,kCAAkCA,CAAC;AAAA,EAC9CC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACiC,MAAM;;AACpCC,QAAAA,UAAUC,OAAoB,IAAI;AAElC,QAAA;AAAA,IAAEC;AAAAA,IAAYC;AAAAA,IAAWC;AAAAA,IAAYC;AAAAA,IAAYC;AAAAA,MACrDC,aAAa;AAAA,IACXT;AAAAA,IACAU,MAAM;AAAA,MACJC,QAAQ;AAAA;AAAA,QAENZ;AAAAA;AAAAA,QAEAa,IAAGV,aAAQW,YAARX,mBAAiBY,wBAAwBF;AAAAA,QAC5CG,IAAGb,aAAQW,YAARX,mBAAiBY,wBAAwBC;AAAAA,MAC9C;AAAA,IACF;AAAA,EAAA,CACD;AAEGC,QAAAA,YAAYC,WAAWf,SAASI,UAAU;AAEhD,QAAMY,QAAQV,YACV;AAAA,IACEA,WAAY,eAAcA,UAAUI,CAAE,OAAMJ,UAAUO,CAAE;AAAA,EAE1DI,IAAAA;AAEJ,SACG,oBAAA,wBAAA,EACC,KAAKH,WACL,OACA,OACA,YACIX,GAAAA,cACAD,YACAH,GAAAA,OACJ,CAAA;AAEN;"}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { forwardRef } from "react";
|
|
2
3
|
import { HvTypography } from "@hitachivantara/uikit-react-core";
|
|
3
4
|
import { Drag } from "@hitachivantara/uikit-react-icons";
|
|
4
5
|
import { useClasses } from "./SidebarGroupItem.styles.js";
|
|
5
6
|
import { staticClasses } from "./SidebarGroupItem.styles.js";
|
|
6
|
-
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
7
7
|
const HvFlowSidebarGroupItem = forwardRef(({
|
|
8
8
|
label,
|
|
9
9
|
isDragging,
|
|
@@ -15,18 +15,12 @@ const HvFlowSidebarGroupItem = forwardRef(({
|
|
|
15
15
|
classes,
|
|
16
16
|
cx
|
|
17
17
|
} = useClasses(classesProp);
|
|
18
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
children: [/* @__PURE__ */ jsx(HvTypography, {
|
|
25
|
-
children: label
|
|
26
|
-
}), /* @__PURE__ */ jsx(Drag, {
|
|
27
|
-
role: "none"
|
|
28
|
-
})]
|
|
29
|
-
});
|
|
18
|
+
return /* @__PURE__ */ jsxs("div", { ref, className: cx(classes.root, {
|
|
19
|
+
[classes.dragging]: isDragging
|
|
20
|
+
}, className), ...others, children: [
|
|
21
|
+
/* @__PURE__ */ jsx(HvTypography, { children: label }),
|
|
22
|
+
/* @__PURE__ */ jsx(Drag, { role: "none" })
|
|
23
|
+
] });
|
|
30
24
|
});
|
|
31
25
|
export {
|
|
32
26
|
HvFlowSidebarGroupItem,
|
package/dist/esm/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport {\n ExtractNames,\n HvBaseProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Drag } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./SidebarGroupItem.styles\";\n\nexport { staticClasses as flowSidebarGroupItemClasses };\n\nexport type HvFlowSidebarGroupItemClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarGroupItemProps extends HvBaseProps {\n /** Item label. */\n label: string;\n /** Whether the item is being dragged. */\n isDragging?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupItemClasses;\n}\n\nexport const HvFlowSidebarGroupItem = forwardRef<\n HTMLDivElement,\n HvFlowSidebarGroupItemProps\n>(\n (\n {\n label,\n isDragging,\n classes: classesProp,\n className,\n ...others\n }: HvFlowSidebarGroupItemProps,\n ref\n ) => {\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <div\n ref={ref}\n className={cx(\n classes.root,\n { [classes.dragging]: isDragging },\n className\n )}\n {...others}\n >\n <HvTypography>{label}</HvTypography>\n <Drag role=\"none\" />\n </div>\n );\n }\n);\n"],"names":["HvFlowSidebarGroupItem","forwardRef","label","isDragging","classes","classesProp","className","others","ref","cx","useClasses","root","dragging"
|
|
1
|
+
{"version":3,"file":"SidebarGroupItem.js","sources":["../../../../../../../src/components/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.tsx"],"sourcesContent":["import { forwardRef } from \"react\";\n\nimport {\n ExtractNames,\n HvBaseProps,\n HvTypography,\n} from \"@hitachivantara/uikit-react-core\";\nimport { Drag } from \"@hitachivantara/uikit-react-icons\";\n\nimport { staticClasses, useClasses } from \"./SidebarGroupItem.styles\";\n\nexport { staticClasses as flowSidebarGroupItemClasses };\n\nexport type HvFlowSidebarGroupItemClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvFlowSidebarGroupItemProps extends HvBaseProps {\n /** Item label. */\n label: string;\n /** Whether the item is being dragged. */\n isDragging?: boolean;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowSidebarGroupItemClasses;\n}\n\nexport const HvFlowSidebarGroupItem = forwardRef<\n HTMLDivElement,\n HvFlowSidebarGroupItemProps\n>(\n (\n {\n label,\n isDragging,\n classes: classesProp,\n className,\n ...others\n }: HvFlowSidebarGroupItemProps,\n ref\n ) => {\n const { classes, cx } = useClasses(classesProp);\n\n return (\n <div\n ref={ref}\n className={cx(\n classes.root,\n { [classes.dragging]: isDragging },\n className\n )}\n {...others}\n >\n <HvTypography>{label}</HvTypography>\n <Drag role=\"none\" />\n </div>\n );\n }\n);\n"],"names":["HvFlowSidebarGroupItem","forwardRef","label","isDragging","classes","classesProp","className","others","ref","cx","useClasses","root","dragging"],"mappings":";;;;;;AAwBaA,MAAAA,yBAAyBC,WAIpC,CACE;AAAA,EACEC;AAAAA,EACAC;AAAAA,EACAC,SAASC;AAAAA,EACTC;AAAAA,EACA,GAAGC;AACwB,GAC7BC,QACG;AACG,QAAA;AAAA,IAAEJ;AAAAA,IAASK;AAAAA,EAAAA,IAAOC,WAAWL,WAAW;AAE9C,8BACG,OACC,EAAA,KACA,WAAWI,GACTL,QAAQO,MACR;AAAA,IAAE,CAACP,QAAQQ,QAAQ,GAAGT;AAAAA,EACtBG,GAAAA,SACF,GACA,GAAIC,QAEJ,UAAA;AAAA,IAAA,oBAAC,gBAAcL,UAAM,MAAA,CAAA;AAAA,IACrB,oBAAC,MAAK,EAAA,MAAK,OAAM,CAAA;AAAA,EACnB,EAAA,CAAA;AAEJ,CACF;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { useTheme } from "@hitachivantara/uikit-react-core";
|
|
2
3
|
import { getColor, stepSizes } from "./utils.js";
|
|
3
|
-
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { HvStep } from "./Step/Step.js";
|
|
5
5
|
const HvDefaultNavigation = ({
|
|
6
6
|
numSteps,
|
|
@@ -35,9 +35,8 @@ const HvDefaultNavigation = ({
|
|
|
35
35
|
titleWidth,
|
|
36
36
|
titleDisabled: state === "Disabled"
|
|
37
37
|
}));
|
|
38
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
39
|
-
...
|
|
40
|
-
children: [/* @__PURE__ */ jsx(Steps, {
|
|
38
|
+
return /* @__PURE__ */ jsxs("div", { ...other, children: [
|
|
39
|
+
/* @__PURE__ */ jsx(Steps, { ...{
|
|
41
40
|
stepsWidth,
|
|
42
41
|
navWidth: width,
|
|
43
42
|
separatorValues: {
|
|
@@ -51,8 +50,9 @@ const HvDefaultNavigation = ({
|
|
|
51
50
|
maxSize,
|
|
52
51
|
StepComponent
|
|
53
52
|
}
|
|
54
|
-
}),
|
|
55
|
-
|
|
53
|
+
} }),
|
|
54
|
+
titles
|
|
55
|
+
] });
|
|
56
56
|
};
|
|
57
57
|
export {
|
|
58
58
|
HvDefaultNavigation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DefaultNavigation.js","sources":["../../../../../src/components/StepNavigation/DefaultNavigation/DefaultNavigation.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n HvBaseProps,\n HvTheme,\n useTheme,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvStep, HvStepProps } from \"./Step\";\nimport { getColor, stepSizes } from \"./utils\";\n\nexport type ComponentChildProps = {\n stepsWidth: number;\n navWidth: number;\n separatorValues: {\n minWidth: number;\n maxWidth: number;\n getColor: (state: HvStepProps[\"state\"], activeTheme: HvTheme) => any;\n height: number;\n };\n stepValues: {\n minSize: number;\n maxSize: number;\n StepComponent: React.ComponentType<HvStepProps>;\n };\n};\n\nexport interface HvDefaultNavigationProps\n extends Omit<HvBaseProps, \"children\"> {\n /** Number of steps to show on the component. */\n numSteps: number;\n /** Sets one of the standard sizes of the steps. */\n stepSize: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /** Returns a `ReactNode` of the titles container. */\n getTitles: (\n getTitleProps?: (params: {\n state: HvStepProps[\"state\"];\n rawTitle: string;\n number: number;\n }) => { variant?: string; title?: string }\n ) => ReactNode;\n /** Returns dynamic width values of the component (width, titleWidth, separatorWidth). */\n getDynamicValues: (stepsWidth: number) => {\n width: number;\n titleWidth: number;\n separatorWidth: number;\n };\n /** Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth} */\n children: React.FunctionComponent<ComponentChildProps>;\n}\n\nexport const HvDefaultNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n className,\n children,\n ...other\n}: HvDefaultNavigationProps) => {\n const { activeTheme } = useTheme();\n\n // step values\n const { container: maxSize, avatar: minSize } = stepSizes[stepSize];\n const StepComponent = HvStep;\n //\n\n const stepsWidth = maxSize + minSize * (numSteps - 1);\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - minSize, separatorWidth);\n const minWidth = Math.max(\n titleWidth - (maxSize + minSize) * 0.5,\n separatorWidth\n );\n //\n\n const Steps = children;\n\n const titles = getTitles(({ state }) => ({\n variant: \"label\",\n titleWidth,\n titleDisabled: state === \"Disabled\",\n }));\n\n return (\n <div {...other}>\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: activeTheme?.stepNavigation.defaultSeparatorHeight || 0,\n },\n stepValues: {\n minSize,\n maxSize,\n StepComponent,\n },\n }}\n />\n {titles}\n </div>\n );\n};\n"],"names":["HvDefaultNavigation","numSteps","stepSize","getTitles","getDynamicValues","className","children","other","activeTheme","useTheme","container","maxSize","avatar","minSize","stepSizes","StepComponent","HvStep","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","state","variant","titleDisabled","
|
|
1
|
+
{"version":3,"file":"DefaultNavigation.js","sources":["../../../../../src/components/StepNavigation/DefaultNavigation/DefaultNavigation.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n HvBaseProps,\n HvTheme,\n useTheme,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvStep, HvStepProps } from \"./Step\";\nimport { getColor, stepSizes } from \"./utils\";\n\nexport type ComponentChildProps = {\n stepsWidth: number;\n navWidth: number;\n separatorValues: {\n minWidth: number;\n maxWidth: number;\n getColor: (state: HvStepProps[\"state\"], activeTheme: HvTheme) => any;\n height: number;\n };\n stepValues: {\n minSize: number;\n maxSize: number;\n StepComponent: React.ComponentType<HvStepProps>;\n };\n};\n\nexport interface HvDefaultNavigationProps\n extends Omit<HvBaseProps, \"children\"> {\n /** Number of steps to show on the component. */\n numSteps: number;\n /** Sets one of the standard sizes of the steps. */\n stepSize: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /** Returns a `ReactNode` of the titles container. */\n getTitles: (\n getTitleProps?: (params: {\n state: HvStepProps[\"state\"];\n rawTitle: string;\n number: number;\n }) => { variant?: string; title?: string }\n ) => ReactNode;\n /** Returns dynamic width values of the component (width, titleWidth, separatorWidth). */\n getDynamicValues: (stepsWidth: number) => {\n width: number;\n titleWidth: number;\n separatorWidth: number;\n };\n /** Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth} */\n children: React.FunctionComponent<ComponentChildProps>;\n}\n\nexport const HvDefaultNavigation = ({\n numSteps,\n stepSize,\n getTitles,\n getDynamicValues,\n className,\n children,\n ...other\n}: HvDefaultNavigationProps) => {\n const { activeTheme } = useTheme();\n\n // step values\n const { container: maxSize, avatar: minSize } = stepSizes[stepSize];\n const StepComponent = HvStep;\n //\n\n const stepsWidth = maxSize + minSize * (numSteps - 1);\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - minSize, separatorWidth);\n const minWidth = Math.max(\n titleWidth - (maxSize + minSize) * 0.5,\n separatorWidth\n );\n //\n\n const Steps = children;\n\n const titles = getTitles(({ state }) => ({\n variant: \"label\",\n titleWidth,\n titleDisabled: state === \"Disabled\",\n }));\n\n return (\n <div {...other}>\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: activeTheme?.stepNavigation.defaultSeparatorHeight || 0,\n },\n stepValues: {\n minSize,\n maxSize,\n StepComponent,\n },\n }}\n />\n {titles}\n </div>\n );\n};\n"],"names":["HvDefaultNavigation","numSteps","stepSize","getTitles","getDynamicValues","className","children","other","activeTheme","useTheme","container","maxSize","avatar","minSize","stepSizes","StepComponent","HvStep","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","state","variant","titleDisabled","navWidth","separatorValues","getColor","height","stepNavigation","defaultSeparatorHeight","stepValues"],"mappings":";;;;AAkDO,MAAMA,sBAAsBA,CAAC;AAAA,EAClCC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACqB,MAAM;AACxB,QAAA;AAAA,IAAEC;AAAAA,MAAgBC,SAAS;AAG3B,QAAA;AAAA,IAAEC,WAAWC;AAAAA,IAASC,QAAQC;AAAAA,EAAAA,IAAYC,UAAUZ,QAAQ;AAClE,QAAMa,gBAAgBC;AAGhBC,QAAAA,aAAaN,UAAUE,WAAWZ,WAAW;AAC7C,QAAA;AAAA,IAAEiB;AAAAA,IAAOC;AAAAA,IAAYC;AAAAA,EAAAA,IAAmBhB,iBAAiBa,UAAU;AAGzE,QAAMI,WAAWC,KAAKC,IAAIJ,aAAaN,SAASO,cAAc;AAC9D,QAAMI,WAAWF,KAAKC,IACpBJ,cAAcR,UAAUE,WAAW,KACnCO,cACF;AAGA,QAAMK,QAAQnB;AAERoB,QAAAA,SAASvB,UAAU,CAAC;AAAA,IAAEwB;AAAAA,EAAAA,OAAa;AAAA,IACvCC,SAAS;AAAA,IACTT;AAAAA,IACAU,eAAeF,UAAU;AAAA,EACzB,EAAA;AAGA,SAAA,qBAAC,OAAI,EAAA,GAAIpB,OACP,UAAA;AAAA,IAAA,oBAAC,SACK,GAAA;AAAA,MACFU;AAAAA,MACAa,UAAUZ;AAAAA,MACVa,iBAAiB;AAAA,QACfP;AAAAA,QACAH;AAAAA,QACAW;AAAAA,QACAC,SAAQzB,2CAAa0B,eAAeC,2BAA0B;AAAA,MAChE;AAAA,MACAC,YAAY;AAAA,QACVvB;AAAAA,QACAF;AAAAA,QACAI;AAAAA,MACF;AAAA,IAAA,GACA;AAAA,IAEHW;AAAAA,EACH,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { HourGlass, Level3Bad, Level0Good } from "@hitachivantara/uikit-react-icons";
|
|
2
3
|
import { HvButton, HvAvatar } from "@hitachivantara/uikit-react-core";
|
|
3
4
|
import { getColor, getSemantic } from "../utils.js";
|
|
4
5
|
import { useClasses } from "./Step.styles.js";
|
|
5
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
const HvStep = ({
|
|
7
7
|
className,
|
|
8
8
|
classes: classesProp,
|
|
@@ -45,34 +45,11 @@ const HvStep = ({
|
|
|
45
45
|
Failed: Level3Bad,
|
|
46
46
|
Completed: Level0Good
|
|
47
47
|
}[state];
|
|
48
|
-
return /* @__PURE__ */ jsx("div", {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
className: cx(classes.ghost, {
|
|
54
|
-
[classes.ghostDisabled]: state === "Current"
|
|
55
|
-
}),
|
|
56
|
-
"aria-label": `${title}`,
|
|
57
|
-
icon: true,
|
|
58
|
-
overrideIconColors: false,
|
|
59
|
-
disabled: disabled ?? ["Current", "Disabled"].includes(state),
|
|
60
|
-
onClick,
|
|
61
|
-
children: /* @__PURE__ */ jsx(HvAvatar, {
|
|
62
|
-
className: cx(classes.avatar, classes[size]),
|
|
63
|
-
backgroundColor,
|
|
64
|
-
status,
|
|
65
|
-
size,
|
|
66
|
-
children: IconComponent ? /* @__PURE__ */ jsx(IconComponent, {
|
|
67
|
-
color,
|
|
68
|
-
semantic,
|
|
69
|
-
width: svgSize,
|
|
70
|
-
height: svgSize,
|
|
71
|
-
iconSize
|
|
72
|
-
}) : number
|
|
73
|
-
})
|
|
74
|
-
})
|
|
75
|
-
});
|
|
48
|
+
return /* @__PURE__ */ jsx("div", { className: cx(classes.root, {
|
|
49
|
+
[classes.notCurrent]: state !== "Current"
|
|
50
|
+
}, className), children: /* @__PURE__ */ jsx(HvButton, { className: cx(classes.ghost, {
|
|
51
|
+
[classes.ghostDisabled]: state === "Current"
|
|
52
|
+
}), "aria-label": `${title}`, icon: true, overrideIconColors: false, disabled: disabled ?? ["Current", "Disabled"].includes(state), onClick, children: /* @__PURE__ */ jsx(HvAvatar, { className: cx(classes.avatar, classes[size]), backgroundColor, status, size, children: IconComponent ? /* @__PURE__ */ jsx(IconComponent, { color, semantic, width: svgSize, height: svgSize, iconSize }) : number }) }) });
|
|
76
53
|
};
|
|
77
54
|
export {
|
|
78
55
|
HvStep
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Step.js","sources":["../../../../../../src/components/StepNavigation/DefaultNavigation/Step/Step.tsx"],"sourcesContent":["import {\n Level0Good,\n Level3Bad,\n HourGlass,\n} from \"@hitachivantara/uikit-react-icons\";\nimport {\n HvAvatarSize,\n HvButtonProps,\n HvBaseProps,\n ExtractNames,\n HvAvatar,\n HvButton,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor, getSemantic } from \"../utils\";\nimport { useClasses } from \"./Step.styles\";\n\ntype HvStepClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvStepProps\n extends Pick<HvButtonProps, \"onClick\">,\n Omit<HvBaseProps, \"onClick\"> {\n /** A Jss Object used to override or extend the styles applied to the empty state StepNavigation. */\n classes?: HvStepClasses;\n /** State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"} */\n state:\n | \"Pending\"\n | \"Failed\"\n | \"Completed\"\n | \"Current\"\n | \"Disabled\"\n | \"Enabled\";\n /** Title of the step. */\n title: string;\n /** Sets one of the standard sizes of the step */\n size?: HvAvatarSize;\n /** Number of the step. */\n number?: number;\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled?: boolean;\n}\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nexport const HvStep = ({\n className,\n classes: classesProp,\n state,\n title,\n onClick,\n disabled,\n size = \"md\",\n number = 1,\n}: HvStepProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n const iconSize = {\n xs: \"XS\",\n sm: \"XS\",\n md: \"S\",\n ml: \"M\",\n xl: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n xs: squareL - 8,\n sm: squareL,\n md: squareL + 8,\n lg: squareL + 16,\n xl: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n const semantic = state !== \"Pending\" ? getSemantic(state) : undefined;\n const status = state === \"Current\" ? \"secondary_60\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={cx(\n classes.root,\n {\n [classes.notCurrent]: state !== \"Current\",\n },\n className\n )}\n >\n <HvButton\n className={cx(classes.ghost, {\n [classes.ghostDisabled]: state === \"Current\",\n })}\n aria-label={`${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={cx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n"],"names":["HvStep","className","classes","classesProp","state","title","onClick","disabled","size","number","cx","useClasses","iconSize","xs","sm","md","ml","xl","squareL","Pending","Failed","Completed","svgSize","lg","backgroundColor","getColor","color","undefined","semantic","getSemantic","status","IconComponent","HourGlass","Level3Bad","Level0Good","root","notCurrent","
|
|
1
|
+
{"version":3,"file":"Step.js","sources":["../../../../../../src/components/StepNavigation/DefaultNavigation/Step/Step.tsx"],"sourcesContent":["import {\n Level0Good,\n Level3Bad,\n HourGlass,\n} from \"@hitachivantara/uikit-react-icons\";\nimport {\n HvAvatarSize,\n HvButtonProps,\n HvBaseProps,\n ExtractNames,\n HvAvatar,\n HvButton,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { getColor, getSemantic } from \"../utils\";\nimport { useClasses } from \"./Step.styles\";\n\ntype HvStepClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvStepProps\n extends Pick<HvButtonProps, \"onClick\">,\n Omit<HvBaseProps, \"onClick\"> {\n /** A Jss Object used to override or extend the styles applied to the empty state StepNavigation. */\n classes?: HvStepClasses;\n /** State of the step. Values = {\"Pending\", \"Failed\", \"Completed\", \"Current\", \"Disabled\", \"Enabled\"} */\n state:\n | \"Pending\"\n | \"Failed\"\n | \"Completed\"\n | \"Current\"\n | \"Disabled\"\n | \"Enabled\";\n /** Title of the step. */\n title: string;\n /** Sets one of the standard sizes of the step */\n size?: HvAvatarSize;\n /** Number of the step. */\n number?: number;\n /**\n * Define if a step is disabled/enabled.\n * If this property is not defined and the step is on state \"Disabled\", the step component will be disabled\n */\n disabled?: boolean;\n}\n\n/**\n * Step element of \"Default\" Step Navigation root component\n */\nexport const HvStep = ({\n className,\n classes: classesProp,\n state,\n title,\n onClick,\n disabled,\n size = \"md\",\n number = 1,\n}: HvStepProps) => {\n const { classes, cx } = useClasses(classesProp);\n\n const iconSize = {\n xs: \"XS\",\n sm: \"XS\",\n md: \"S\",\n ml: \"M\",\n xl: \"M\",\n }[size];\n\n const squareL = {\n Pending: 16,\n Failed: 24,\n Completed: 24,\n }[state];\n\n const svgSize = {\n xs: squareL - 8,\n sm: squareL,\n md: squareL + 8,\n lg: squareL + 16,\n xl: squareL + 24,\n }[size];\n\n const backgroundColor = getColor(state);\n\n const color = state === \"Pending\" ? \"atmo2\" : undefined;\n const semantic = state !== \"Pending\" ? getSemantic(state) : undefined;\n const status = state === \"Current\" ? \"secondary_60\" : undefined;\n\n const IconComponent = {\n Pending: HourGlass,\n Failed: Level3Bad,\n Completed: Level0Good,\n }[state];\n\n return (\n <div\n className={cx(\n classes.root,\n {\n [classes.notCurrent]: state !== \"Current\",\n },\n className\n )}\n >\n <HvButton\n className={cx(classes.ghost, {\n [classes.ghostDisabled]: state === \"Current\",\n })}\n aria-label={`${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n <HvAvatar\n className={cx(classes.avatar, classes[size])}\n backgroundColor={backgroundColor}\n status={status}\n size={size}\n >\n {IconComponent ? (\n <IconComponent\n color={color}\n semantic={semantic}\n width={svgSize}\n height={svgSize}\n iconSize={iconSize}\n />\n ) : (\n number\n )}\n </HvAvatar>\n </HvButton>\n </div>\n );\n};\n"],"names":["HvStep","className","classes","classesProp","state","title","onClick","disabled","size","number","cx","useClasses","iconSize","xs","sm","md","ml","xl","squareL","Pending","Failed","Completed","svgSize","lg","backgroundColor","getColor","color","undefined","semantic","getSemantic","status","IconComponent","HourGlass","Level3Bad","Level0Good","root","notCurrent","ghost","ghostDisabled","includes","avatar"],"mappings":";;;;;AAgDO,MAAMA,SAASA,CAAC;AAAA,EACrBC;AAAAA,EACAC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,OAAO;AAAA,EACPC,SAAS;AACE,MAAM;AACX,QAAA;AAAA,IAAEP;AAAAA,IAASQ;AAAAA,EAAAA,IAAOC,WAAWR,WAAW;AAE9C,QAAMS,WAAW;AAAA,IACfC,IAAI;AAAA,IACJC,IAAI;AAAA,IACJC,IAAI;AAAA,IACJC,IAAI;AAAA,IACJC,IAAI;AAAA,IACJT,IAAI;AAEN,QAAMU,UAAU;AAAA,IACdC,SAAS;AAAA,IACTC,QAAQ;AAAA,IACRC,WAAW;AAAA,IACXjB,KAAK;AAEP,QAAMkB,UAAU;AAAA,IACdT,IAAIK,UAAU;AAAA,IACdJ,IAAII;AAAAA,IACJH,IAAIG,UAAU;AAAA,IACdK,IAAIL,UAAU;AAAA,IACdD,IAAIC,UAAU;AAAA,IACdV,IAAI;AAEAgB,QAAAA,kBAAkBC,SAASrB,KAAK;AAEhCsB,QAAAA,QAAQtB,UAAU,YAAY,UAAUuB;AAC9C,QAAMC,WAAWxB,UAAU,YAAYyB,YAAYzB,KAAK,IAAIuB;AACtDG,QAAAA,SAAS1B,UAAU,YAAY,iBAAiBuB;AAEtD,QAAMI,gBAAgB;AAAA,IACpBZ,SAASa;AAAAA,IACTZ,QAAQa;AAAAA,IACRZ,WAAWa;AAAAA,IACX9B,KAAK;AAEP,SACG,oBAAA,OAAA,EACC,WAAWM,GACTR,QAAQiC,MACR;AAAA,IACE,CAACjC,QAAQkC,UAAU,GAAGhC,UAAU;AAAA,EAAA,GAElCH,SACF,GAEA,UAAA,oBAAC,YACC,WAAWS,GAAGR,QAAQmC,OAAO;AAAA,IAC3B,CAACnC,QAAQoC,aAAa,GAAGlC,UAAU;AAAA,EACpC,CAAA,GACD,cAAa,GAAEC,KAAM,IACrB,MAAI,MACJ,oBAAoB,OACpB,UAAUE,YAAY,CAAC,WAAW,UAAU,EAAEgC,SAASnC,KAAK,GAC5D,SAEA,UAAA,oBAAC,UACC,EAAA,WAAWM,GAAGR,QAAQsC,QAAQtC,QAAQM,IAAI,CAAC,GAC3C,iBACA,QACA,MAECuB,UACC,gBAAA,oBAAC,iBACC,OACA,UACA,OAAOT,SACP,QAAQA,SACR,SAAmB,CAAA,IAGrBb,OAEJ,CAAA,EACF,CAAA,EACF,CAAA;AAEJ;"}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
+
import { jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { HvButton } from "@hitachivantara/uikit-react-core";
|
|
2
3
|
import { getColor, dotSizes } from "../utils.js";
|
|
3
4
|
import { useClasses } from "./Dot.styles.js";
|
|
4
5
|
import { staticClasses } from "./Dot.styles.js";
|
|
5
|
-
import { jsx } from "@emotion/react/jsx-runtime";
|
|
6
6
|
const HvDot = ({
|
|
7
7
|
classes: classesProp,
|
|
8
8
|
className,
|
|
@@ -18,25 +18,17 @@ const HvDot = ({
|
|
|
18
18
|
css
|
|
19
19
|
} = useClasses(classesProp);
|
|
20
20
|
const dotSize = dotSizes[size] * (state === "Current" ? 1.5 : 1);
|
|
21
|
-
return /* @__PURE__ */ jsx(HvButton, {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
}, className),
|
|
33
|
-
"aria-label": `${title}`,
|
|
34
|
-
icon: true,
|
|
35
|
-
overrideIconColors: false,
|
|
36
|
-
disabled: disabled ?? ["Current", "Disabled"].includes(state),
|
|
37
|
-
onClick,
|
|
38
|
-
children: []
|
|
39
|
-
});
|
|
21
|
+
return /* @__PURE__ */ jsx(HvButton, { className: cx(css({
|
|
22
|
+
backgroundColor: getColor(state),
|
|
23
|
+
width: dotSize,
|
|
24
|
+
height: dotSize,
|
|
25
|
+
"&:hover, &:disabled": {
|
|
26
|
+
backgroundColor: getColor(state)
|
|
27
|
+
}
|
|
28
|
+
}), classes.root, {
|
|
29
|
+
[classes.active]: state === "Current",
|
|
30
|
+
[classes.ghostDisabled]: disabled ?? ["Current", "Disabled"].includes(state)
|
|
31
|
+
}, className), "aria-label": `${title}`, icon: true, overrideIconColors: false, disabled: disabled ?? ["Current", "Disabled"].includes(state), onClick, children: [] });
|
|
40
32
|
};
|
|
41
33
|
export {
|
|
42
34
|
HvDot,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Dot.js","sources":["../../../../../../src/components/StepNavigation/SimpleNavigation/Dot/Dot.tsx"],"sourcesContent":["import {\n ExtractNames,\n HvBaseProps,\n HvButton,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvStepProps } from \"../../DefaultNavigation\";\nimport { getColor, dotSizes } from \"../utils\";\nimport { staticClasses, useClasses } from \"./Dot.styles\";\n\nexport { staticClasses as dotClasses };\n\nexport type HvDotClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDotProps\n extends Pick<\n HvStepProps,\n \"size\" | \"title\" | \"state\" | \"onClick\" | \"disabled\"\n >,\n Omit<HvBaseProps, \"title\" | \"onClick\"> {\n /** A Jss Object used to override or extend the styles applied to the empty state StepNavigation. */\n classes?: HvDotClasses;\n}\n\nexport const HvDot = ({\n classes: classesProp,\n className,\n state,\n title,\n size = \"sm\",\n onClick,\n disabled,\n}: HvDotProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n\n return (\n <HvButton\n className={cx(\n css({\n backgroundColor: getColor(state),\n width: dotSize,\n height: dotSize,\n \"&:hover, &:disabled\": {\n backgroundColor: getColor(state),\n },\n }),\n classes.root,\n {\n [classes.active]: state === \"Current\",\n [classes.ghostDisabled]:\n disabled ?? [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n"],"names":["HvDot","classes","classesProp","className","state","title","size","onClick","disabled","cx","css","useClasses","dotSize","dotSizes","
|
|
1
|
+
{"version":3,"file":"Dot.js","sources":["../../../../../../src/components/StepNavigation/SimpleNavigation/Dot/Dot.tsx"],"sourcesContent":["import {\n ExtractNames,\n HvBaseProps,\n HvButton,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvStepProps } from \"../../DefaultNavigation\";\nimport { getColor, dotSizes } from \"../utils\";\nimport { staticClasses, useClasses } from \"./Dot.styles\";\n\nexport { staticClasses as dotClasses };\n\nexport type HvDotClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvDotProps\n extends Pick<\n HvStepProps,\n \"size\" | \"title\" | \"state\" | \"onClick\" | \"disabled\"\n >,\n Omit<HvBaseProps, \"title\" | \"onClick\"> {\n /** A Jss Object used to override or extend the styles applied to the empty state StepNavigation. */\n classes?: HvDotClasses;\n}\n\nexport const HvDot = ({\n classes: classesProp,\n className,\n state,\n title,\n size = \"sm\",\n onClick,\n disabled,\n}: HvDotProps) => {\n const { classes, cx, css } = useClasses(classesProp);\n\n const dotSize = dotSizes[size] * (state === \"Current\" ? 1.5 : 1);\n\n return (\n <HvButton\n className={cx(\n css({\n backgroundColor: getColor(state),\n width: dotSize,\n height: dotSize,\n \"&:hover, &:disabled\": {\n backgroundColor: getColor(state),\n },\n }),\n classes.root,\n {\n [classes.active]: state === \"Current\",\n [classes.ghostDisabled]:\n disabled ?? [\"Current\", \"Disabled\"].includes(state),\n },\n className\n )}\n aria-label={`${title}`}\n icon\n overrideIconColors={false}\n disabled={disabled ?? [\"Current\", \"Disabled\"].includes(state)}\n onClick={onClick}\n >\n {[]}\n </HvButton>\n );\n};\n"],"names":["HvDot","classes","classesProp","className","state","title","size","onClick","disabled","cx","css","useClasses","dotSize","dotSizes","backgroundColor","getColor","width","height","root","active","ghostDisabled","includes"],"mappings":";;;;;AAwBO,MAAMA,QAAQA,CAAC;AAAA,EACpBC,SAASC;AAAAA,EACTC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACAC,OAAO;AAAA,EACPC;AAAAA,EACAC;AACU,MAAM;AACV,QAAA;AAAA,IAAEP;AAAAA,IAASQ;AAAAA,IAAIC;AAAAA,EAAAA,IAAQC,WAAWT,WAAW;AAEnD,QAAMU,UAAUC,SAASP,IAAI,KAAKF,UAAU,YAAY,MAAM;AAE9D,SACG,oBAAA,UAAA,EACC,WAAWK,GACTC,IAAI;AAAA,IACFI,iBAAiBC,SAASX,KAAK;AAAA,IAC/BY,OAAOJ;AAAAA,IACPK,QAAQL;AAAAA,IACR,uBAAuB;AAAA,MACrBE,iBAAiBC,SAASX,KAAK;AAAA,IACjC;AAAA,EAAA,CACD,GACDH,QAAQiB,MACR;AAAA,IACE,CAACjB,QAAQkB,MAAM,GAAGf,UAAU;AAAA,IAC5B,CAACH,QAAQmB,aAAa,GACpBZ,YAAY,CAAC,WAAW,UAAU,EAAEa,SAASjB,KAAK;AAAA,EAAA,GAEtDD,SACF,GACA,cAAa,GAAEE,KAAM,IACrB,MAAI,MACJ,oBAAoB,OACpB,UAAUG,YAAY,CAAC,WAAW,UAAU,EAAEa,SAASjB,KAAK,GAC5D,SAEC,UAAA,CACH,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
1
2
|
import { useTheme } from "@hitachivantara/uikit-react-core";
|
|
2
3
|
import { getColor, dotSizes } from "./utils.js";
|
|
3
|
-
import { jsxs, jsx } from "@emotion/react/jsx-runtime";
|
|
4
4
|
import { HvDot } from "./Dot/Dot.js";
|
|
5
5
|
const HvSimpleNavigation = ({
|
|
6
6
|
numSteps,
|
|
@@ -32,9 +32,9 @@ const HvSimpleNavigation = ({
|
|
|
32
32
|
title: `${number}. ${rawTitle}`,
|
|
33
33
|
titleWidth
|
|
34
34
|
}));
|
|
35
|
-
return /* @__PURE__ */ jsxs("div", {
|
|
36
|
-
|
|
37
|
-
|
|
35
|
+
return /* @__PURE__ */ jsxs("div", { ...others, children: [
|
|
36
|
+
titles,
|
|
37
|
+
/* @__PURE__ */ jsx(Steps, { ...{
|
|
38
38
|
stepsWidth,
|
|
39
39
|
navWidth: width,
|
|
40
40
|
separatorValues: {
|
|
@@ -48,8 +48,8 @@ const HvSimpleNavigation = ({
|
|
|
48
48
|
maxSize: 1.5 * dotSize,
|
|
49
49
|
StepComponent
|
|
50
50
|
}
|
|
51
|
-
})
|
|
52
|
-
});
|
|
51
|
+
} })
|
|
52
|
+
] });
|
|
53
53
|
};
|
|
54
54
|
export {
|
|
55
55
|
HvSimpleNavigation
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SimpleNavigation.js","sources":["../../../../../src/components/StepNavigation/SimpleNavigation/SimpleNavigation.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n HvBaseProps,\n HvTheme,\n useTheme,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvDot, HvDotProps } from \"./Dot\";\nimport { getColor, dotSizes } from \"./utils\";\n\nexport type ComponentChildProps = {\n stepsWidth: number;\n navWidth: number;\n separatorValues: {\n minWidth: number;\n maxWidth: number;\n getColor: (state: HvDotProps[\"state\"], activeTheme: HvTheme) => any;\n height: number;\n };\n stepValues: {\n minSize: number;\n maxSize: number;\n StepComponent: React.ComponentType<HvDotProps>;\n };\n};\n\nexport interface HvSimpleNavigationProps extends Omit<HvBaseProps, \"children\"> {\n /** Sets one of the standard sizes of the steps. */\n stepSize?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /** Number of steps to show on the component. */\n numSteps: number;\n /** Returns a `ReactNode` of the titles container. */\n getTitles: (\n getTitleProps?: (params: {\n state: HvDotProps[\"state\"];\n rawTitle: string;\n number: number;\n }) => { variant: string; title: string }\n ) => ReactNode;\n /** Returns dynamic width values of the component (width, titleWidth, separatorWidth). */\n getDynamicValues: (stepsWidth: number) => {\n width: number;\n titleWidth: number;\n separatorWidth: number;\n };\n /** Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth} */\n children: React.FunctionComponent<ComponentChildProps>;\n}\n\nexport const HvSimpleNavigation = ({\n numSteps,\n stepSize = \"sm\",\n getTitles,\n getDynamicValues,\n children,\n ...others\n}: HvSimpleNavigationProps) => {\n const { activeTheme } = useTheme();\n\n // step values\n const dotSize = dotSizes[stepSize];\n const StepComponent = HvDot;\n //\n\n const stepsWidth = (numSteps + 0.5) * dotSize;\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - dotSize, separatorWidth);\n const minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ rawTitle, number }) => ({\n variant: \"label\",\n title: `${number}. ${rawTitle}`,\n titleWidth,\n }));\n\n return (\n <div {...others}>\n {titles}\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: activeTheme?.stepNavigation.simpleSeparatorHeight || 0,\n },\n stepValues: {\n minSize: dotSize,\n maxSize: 1.5 * dotSize,\n StepComponent,\n },\n }}\n />\n </div>\n );\n};\n"],"names":["HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","others","activeTheme","useTheme","dotSize","dotSizes","StepComponent","HvDot","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","variant","title","
|
|
1
|
+
{"version":3,"file":"SimpleNavigation.js","sources":["../../../../../src/components/StepNavigation/SimpleNavigation/SimpleNavigation.tsx"],"sourcesContent":["import { ReactNode } from \"react\";\nimport {\n HvBaseProps,\n HvTheme,\n useTheme,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvDot, HvDotProps } from \"./Dot\";\nimport { getColor, dotSizes } from \"./utils\";\n\nexport type ComponentChildProps = {\n stepsWidth: number;\n navWidth: number;\n separatorValues: {\n minWidth: number;\n maxWidth: number;\n getColor: (state: HvDotProps[\"state\"], activeTheme: HvTheme) => any;\n height: number;\n };\n stepValues: {\n minSize: number;\n maxSize: number;\n StepComponent: React.ComponentType<HvDotProps>;\n };\n};\n\nexport interface HvSimpleNavigationProps extends Omit<HvBaseProps, \"children\"> {\n /** Sets one of the standard sizes of the steps. */\n stepSize?: \"xs\" | \"sm\" | \"md\" | \"lg\" | \"xl\";\n /** Number of steps to show on the component. */\n numSteps: number;\n /** Returns a `ReactNode` of the titles container. */\n getTitles: (\n getTitleProps?: (params: {\n state: HvDotProps[\"state\"];\n rawTitle: string;\n number: number;\n }) => { variant: string; title: string }\n ) => ReactNode;\n /** Returns dynamic width values of the component (width, titleWidth, separatorWidth). */\n getDynamicValues: (stepsWidth: number) => {\n width: number;\n titleWidth: number;\n separatorWidth: number;\n };\n /** Component to render Step Navigation with props = {separatorValues, stepValues, stepsWidth} */\n children: React.FunctionComponent<ComponentChildProps>;\n}\n\nexport const HvSimpleNavigation = ({\n numSteps,\n stepSize = \"sm\",\n getTitles,\n getDynamicValues,\n children,\n ...others\n}: HvSimpleNavigationProps) => {\n const { activeTheme } = useTheme();\n\n // step values\n const dotSize = dotSizes[stepSize];\n const StepComponent = HvDot;\n //\n\n const stepsWidth = (numSteps + 0.5) * dotSize;\n const { width, titleWidth, separatorWidth } = getDynamicValues(stepsWidth);\n\n // separator values\n const maxWidth = Math.max(titleWidth - dotSize, separatorWidth);\n const minWidth = Math.max(titleWidth - dotSize * 1.25, separatorWidth);\n //\n\n const Steps = children;\n\n const titles = getTitles(({ rawTitle, number }) => ({\n variant: \"label\",\n title: `${number}. ${rawTitle}`,\n titleWidth,\n }));\n\n return (\n <div {...others}>\n {titles}\n <Steps\n {...{\n stepsWidth,\n navWidth: width,\n separatorValues: {\n minWidth,\n maxWidth,\n getColor,\n height: activeTheme?.stepNavigation.simpleSeparatorHeight || 0,\n },\n stepValues: {\n minSize: dotSize,\n maxSize: 1.5 * dotSize,\n StepComponent,\n },\n }}\n />\n </div>\n );\n};\n"],"names":["HvSimpleNavigation","numSteps","stepSize","getTitles","getDynamicValues","children","others","activeTheme","useTheme","dotSize","dotSizes","StepComponent","HvDot","stepsWidth","width","titleWidth","separatorWidth","maxWidth","Math","max","minWidth","Steps","titles","rawTitle","number","variant","title","navWidth","separatorValues","getColor","height","stepNavigation","simpleSeparatorHeight","stepValues","minSize","maxSize"],"mappings":";;;;AAiDO,MAAMA,qBAAqBA,CAAC;AAAA,EACjCC;AAAAA,EACAC,WAAW;AAAA,EACXC;AAAAA,EACAC;AAAAA,EACAC;AAAAA,EACA,GAAGC;AACoB,MAAM;AACvB,QAAA;AAAA,IAAEC;AAAAA,MAAgBC,SAAS;AAG3BC,QAAAA,UAAUC,SAASR,QAAQ;AACjC,QAAMS,gBAAgBC;AAGhBC,QAAAA,cAAcZ,WAAW,OAAOQ;AAChC,QAAA;AAAA,IAAEK;AAAAA,IAAOC;AAAAA,IAAYC;AAAAA,EAAAA,IAAmBZ,iBAAiBS,UAAU;AAGzE,QAAMI,WAAWC,KAAKC,IAAIJ,aAAaN,SAASO,cAAc;AAC9D,QAAMI,WAAWF,KAAKC,IAAIJ,aAAaN,UAAU,MAAMO,cAAc;AAGrE,QAAMK,QAAQhB;AAERiB,QAAAA,SAASnB,UAAU,CAAC;AAAA,IAAEoB;AAAAA,IAAUC;AAAAA,EAAAA,OAAc;AAAA,IAClDC,SAAS;AAAA,IACTC,OAAQ,GAAEF,MAAO,KAAID,QAAS;AAAA,IAC9BR;AAAAA,EACA,EAAA;AAGA,SAAA,qBAAC,OAAI,EAAA,GAAIT,QACNgB,UAAAA;AAAAA,IAAAA;AAAAA,IACD,oBAAC,SACK,GAAA;AAAA,MACFT;AAAAA,MACAc,UAAUb;AAAAA,MACVc,iBAAiB;AAAA,QACfR;AAAAA,QACAH;AAAAA,QACAY;AAAAA,QACAC,SAAQvB,2CAAawB,eAAeC,0BAAyB;AAAA,MAC/D;AAAA,MACAC,YAAY;AAAA,QACVC,SAASzB;AAAAA,QACT0B,SAAS,MAAM1B;AAAAA,QACfE;AAAAA,MACF;AAAA,IAAA,GACA;AAAA,EAEN,EAAA,CAAA;AAEJ;"}
|