@hitachivantara/uikit-react-lab 5.36.2 → 5.37.1

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.
Files changed (104) hide show
  1. package/dist/cjs/Blade/Blade.cjs +1 -1
  2. package/dist/cjs/Blades/Blades.cjs +1 -1
  3. package/dist/cjs/Dashboard/Dashboard.cjs +1 -1
  4. package/dist/cjs/Flow/Background/Background.cjs +9 -2
  5. package/dist/cjs/Flow/Controls/Controls.cjs +1 -1
  6. package/dist/cjs/Flow/DroppableFlow.cjs +1 -1
  7. package/dist/cjs/Flow/Empty/Empty.cjs +1 -1
  8. package/dist/cjs/Flow/Flow.cjs +1 -1
  9. package/dist/cjs/Flow/Flow.styles.cjs +1 -1
  10. package/dist/cjs/Flow/FlowContext/FlowContext.cjs +1 -1
  11. package/dist/cjs/Flow/FlowContext/NodeMetaContext.cjs +1 -1
  12. package/dist/cjs/Flow/Minimap/Minimap.cjs +1 -1
  13. package/dist/cjs/Flow/Node/BaseNode.cjs +31 -33
  14. package/dist/cjs/Flow/Node/BaseNode.styles.cjs +6 -3
  15. package/dist/cjs/Flow/Node/Node.cjs +1 -1
  16. package/dist/cjs/Flow/Node/Parameters/ParamRenderer.cjs +1 -1
  17. package/dist/cjs/Flow/Node/Parameters/Select.cjs +1 -1
  18. package/dist/cjs/Flow/Node/Parameters/Slider.cjs +1 -1
  19. package/dist/cjs/Flow/Node/Parameters/Text.cjs +1 -1
  20. package/dist/cjs/Flow/Sidebar/Sidebar.cjs +1 -1
  21. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroup.cjs +1 -1
  22. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.cjs +1 -1
  23. package/dist/cjs/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.cjs +1 -1
  24. package/dist/cjs/Flow/hooks/useNode.cjs +1 -1
  25. package/dist/cjs/Flow/nodes/DashboardNode.cjs +1 -1
  26. package/dist/cjs/StepNavigation/DefaultNavigation/DefaultNavigation.cjs +1 -1
  27. package/dist/cjs/StepNavigation/DefaultNavigation/Step/Step.cjs +1 -1
  28. package/dist/cjs/StepNavigation/SimpleNavigation/Dot/Dot.cjs +1 -1
  29. package/dist/cjs/StepNavigation/SimpleNavigation/SimpleNavigation.cjs +1 -1
  30. package/dist/cjs/StepNavigation/StepNavigation.cjs +5 -3
  31. package/dist/cjs/Wizard/Wizard.cjs +8 -11
  32. package/dist/cjs/Wizard/WizardActions/WizardActions.cjs +8 -11
  33. package/dist/cjs/Wizard/WizardContainer/WizardContainer.cjs +1 -1
  34. package/dist/cjs/Wizard/WizardContent/WizardContent.cjs +11 -18
  35. package/dist/cjs/Wizard/WizardTitle/WizardTitle.cjs +1 -1
  36. package/dist/cjs/index.cjs +0 -12
  37. package/dist/esm/Blade/Blade.js +1 -1
  38. package/dist/esm/Blade/Blade.js.map +1 -1
  39. package/dist/esm/Blades/Blades.js +1 -1
  40. package/dist/esm/Blades/Blades.js.map +1 -1
  41. package/dist/esm/Dashboard/Dashboard.js +1 -1
  42. package/dist/esm/Flow/Background/Background.js +9 -2
  43. package/dist/esm/Flow/Background/Background.js.map +1 -1
  44. package/dist/esm/Flow/Controls/Controls.js +1 -1
  45. package/dist/esm/Flow/DroppableFlow.js +1 -1
  46. package/dist/esm/Flow/Empty/Empty.js +1 -1
  47. package/dist/esm/Flow/Flow.js +1 -1
  48. package/dist/esm/Flow/Flow.styles.js +1 -1
  49. package/dist/esm/Flow/FlowContext/FlowContext.js +1 -1
  50. package/dist/esm/Flow/FlowContext/NodeMetaContext.js +1 -1
  51. package/dist/esm/Flow/Minimap/Minimap.js +1 -1
  52. package/dist/esm/Flow/Node/BaseNode.js +31 -33
  53. package/dist/esm/Flow/Node/BaseNode.js.map +1 -1
  54. package/dist/esm/Flow/Node/BaseNode.styles.js +6 -3
  55. package/dist/esm/Flow/Node/BaseNode.styles.js.map +1 -1
  56. package/dist/esm/Flow/Node/Node.js +1 -1
  57. package/dist/esm/Flow/Node/Parameters/ParamRenderer.js +1 -1
  58. package/dist/esm/Flow/Node/Parameters/Select.js +1 -1
  59. package/dist/esm/Flow/Node/Parameters/Slider.js +1 -1
  60. package/dist/esm/Flow/Node/Parameters/Text.js +1 -1
  61. package/dist/esm/Flow/Sidebar/Sidebar.js +1 -1
  62. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroup.js +1 -1
  63. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/DraggableSidebarGroupItem.js +1 -1
  64. package/dist/esm/Flow/Sidebar/SidebarGroup/SidebarGroupItem/SidebarGroupItem.js +1 -1
  65. package/dist/esm/Flow/hooks/useNode.js +1 -1
  66. package/dist/esm/Flow/nodes/DashboardNode.js +1 -1
  67. package/dist/esm/StepNavigation/DefaultNavigation/DefaultNavigation.js +1 -1
  68. package/dist/esm/StepNavigation/DefaultNavigation/Step/Step.js +1 -1
  69. package/dist/esm/StepNavigation/SimpleNavigation/Dot/Dot.js +1 -1
  70. package/dist/esm/StepNavigation/SimpleNavigation/SimpleNavigation.js +1 -1
  71. package/dist/esm/StepNavigation/StepNavigation.js +5 -3
  72. package/dist/esm/StepNavigation/StepNavigation.js.map +1 -1
  73. package/dist/esm/Wizard/Wizard.js +8 -11
  74. package/dist/esm/Wizard/Wizard.js.map +1 -1
  75. package/dist/esm/Wizard/WizardActions/WizardActions.js +8 -11
  76. package/dist/esm/Wizard/WizardActions/WizardActions.js.map +1 -1
  77. package/dist/esm/Wizard/WizardContainer/WizardContainer.js +1 -1
  78. package/dist/esm/Wizard/WizardContainer/WizardContainer.js.map +1 -1
  79. package/dist/esm/Wizard/WizardContent/WizardContent.js +11 -18
  80. package/dist/esm/Wizard/WizardContent/WizardContent.js.map +1 -1
  81. package/dist/esm/Wizard/WizardContext/WizardContext.js.map +1 -1
  82. package/dist/esm/Wizard/WizardTitle/WizardTitle.js +1 -1
  83. package/dist/esm/index.js +26 -38
  84. package/dist/esm/index.js.map +1 -1
  85. package/dist/types/index.d.ts +117 -267
  86. package/package.json +5 -5
  87. package/dist/cjs/Canvas/Panel/Panel.cjs +0 -79
  88. package/dist/cjs/Canvas/Panel/Panel.styles.cjs +0 -66
  89. package/dist/cjs/Canvas/Tabs/Tabs.cjs +0 -48
  90. package/dist/cjs/Canvas/Tabs/Tabs.styles.cjs +0 -44
  91. package/dist/cjs/Canvas/Toolbar/Toolbar.cjs +0 -39
  92. package/dist/cjs/Canvas/Toolbar/Toolbar.styles.cjs +0 -42
  93. package/dist/esm/Canvas/Panel/Panel.js +0 -80
  94. package/dist/esm/Canvas/Panel/Panel.js.map +0 -1
  95. package/dist/esm/Canvas/Panel/Panel.styles.js +0 -66
  96. package/dist/esm/Canvas/Panel/Panel.styles.js.map +0 -1
  97. package/dist/esm/Canvas/Tabs/Tabs.js +0 -49
  98. package/dist/esm/Canvas/Tabs/Tabs.js.map +0 -1
  99. package/dist/esm/Canvas/Tabs/Tabs.styles.js +0 -44
  100. package/dist/esm/Canvas/Tabs/Tabs.styles.js.map +0 -1
  101. package/dist/esm/Canvas/Toolbar/Toolbar.js +0 -40
  102. package/dist/esm/Canvas/Toolbar/Toolbar.js.map +0 -1
  103. package/dist/esm/Canvas/Toolbar/Toolbar.styles.js +0 -42
  104. package/dist/esm/Canvas/Toolbar/Toolbar.styles.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Blade.js","sources":["../../../src/Blade/Blade.tsx"],"sourcesContent":["import React, {\n HTMLAttributes,\n SyntheticEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n ExtractNames,\n HvBaseProps,\n HvTypography,\n HvTypographyVariants,\n setId,\n useControlled,\n useDefaultProps,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { staticClasses, useClasses } from \"./Blade.styles\";\n\nexport { staticClasses as bladeClasses };\n\nexport type HvBladeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBladeProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /**\n * The content that will be rendered within the blade.\n */\n children: React.ReactNode;\n\n /**\n * The content of the blade's button.\n *\n * If a render function is provided, it will be called with the expanded state as an argument.\n */\n label?: React.ReactNode | ((expanded: boolean) => React.ReactNode);\n /**\n * Typography variant for the blade's button label.\n */\n labelVariant?: HvTypographyVariants;\n /**\n * Heading Level to apply to blade button.\n *\n * If 'undefined', the button will not have a header wrapper.\n */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n\n /**\n * Indicates whether the blade is expanded or not.\n *\n * When defined the expanded state becomes controlled.\n *\n * @default undefined\n */\n expanded?: boolean;\n /**\n * Specifies the initial expanded state of the blade when it is uncontrolled.\n */\n defaultExpanded?: boolean;\n\n /**\n * Callback function triggered when the blade's button is pressed.\n * It receives the event and the new expanded state as arguments.\n *\n * If the blade is uncontrolled, this new state will be effective.\n * If the blade is controlled, it is up to the parent component to manage this state.\n *\n * @param {SyntheticEvent} event The event source of the callback.\n * @param {boolean} value The new value.\n */\n onChange?: (event: React.SyntheticEvent, value: boolean) => void;\n\n /**\n * Specifies whether the blade is disabled. If true, the blade cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If true, the blade will take up the maximum width of the container when expanded.\n */\n fullWidth?: boolean;\n\n /**\n * Props to be passed to the button that toggles the blade's expanded state.\n * This can be used to further customize the appearance or behavior of the blade's button,\n * e.g. to set the aria-label attribute.\n */\n buttonProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * Props to be passed to the container div that holds the blade's children.\n * This can be used to further customize the appearance or behavior of the blade's content area.\n */\n containerProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBladeClasses;\n}\n\n/**\n * A blade is a design element that expands horizontally to reveal information, similar to an accordion.\n *\n * It is usually stacked horizontally with other blades and works best when used within a flex container.\n * The `HvBlades` component is recommended for this purpose, as it also provides better management of the\n * blades' expanded state.\n */\nexport const HvBlade = (props: HvBladeProps) => {\n const {\n id: idProp,\n className,\n classes: classesProp,\n expanded,\n defaultExpanded = false,\n label,\n labelVariant = \"label\",\n headingLevel,\n onChange,\n disabled = false,\n children,\n fullWidth,\n buttonProps,\n containerProps,\n ...others\n } = useDefaultProps(\"HvBlade\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const [isExpanded, setIsExpanded] = useControlled(\n expanded,\n Boolean(defaultExpanded),\n );\n\n const handleAction = useCallback(\n (event: SyntheticEvent) => {\n if (!disabled) {\n onChange?.(event, !isExpanded);\n\n // This will only run if uncontrolled\n setIsExpanded(!isExpanded);\n\n return true;\n }\n return false;\n },\n [disabled, onChange, isExpanded, setIsExpanded],\n );\n\n const handleClick = useCallback(\n (event: SyntheticEvent) => {\n handleAction(event);\n event.preventDefault();\n event.stopPropagation();\n },\n [handleAction],\n );\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n let isEventHandled = false;\n const { key } = event;\n\n if (\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.currentTarget !== event.target\n ) {\n return;\n }\n switch (key) {\n case \"Enter\":\n case \" \":\n isEventHandled = handleAction(event);\n break;\n default:\n return;\n }\n\n if (isEventHandled) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n [handleAction],\n );\n\n const id = useUniqueId(idProp);\n const bladeHeaderId = setId(id, \"button\");\n const bladeContainerId = setId(id, \"container\");\n const bladeHeader = useMemo(() => {\n const buttonLabel = typeof label === \"function\" ? label(isExpanded) : label;\n\n const bladeButton = (\n <HvTypography\n id={bladeHeaderId}\n component=\"div\"\n role=\"button\"\n className={cx(classes.button, {\n [classes.disabled]: disabled,\n [classes.textOnlyLabel]: typeof buttonLabel === \"string\",\n })}\n style={{ flexShrink: headingLevel === undefined ? 0 : undefined }}\n disabled={disabled}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n onClick={handleClick}\n variant={labelVariant}\n aria-expanded={isExpanded}\n aria-controls={bladeContainerId}\n {...buttonProps}\n >\n {buttonLabel}\n </HvTypography>\n );\n return headingLevel === undefined ? (\n bladeButton\n ) : (\n <HvTypography\n component={`h${headingLevel}`}\n variant={labelVariant}\n className={classes.heading}\n style={{ flexShrink: 0 }}\n >\n {bladeButton}\n </HvTypography>\n );\n }, [\n bladeContainerId,\n bladeHeaderId,\n buttonProps,\n classes.button,\n classes.disabled,\n classes.heading,\n classes.textOnlyLabel,\n cx,\n disabled,\n handleClick,\n handleKeyDown,\n headingLevel,\n isExpanded,\n label,\n labelVariant,\n ]);\n\n const bladeRef = useRef<HTMLDivElement>(null);\n const [maxWidth, setMaxWidth] = useState<number | undefined>(undefined);\n useEffect(() => {\n if (bladeRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n setMaxWidth(entries[0].target.clientWidth);\n });\n resizeObserver.observe(\n // using the blade's container as reference max-width is more stable\n bladeRef.current.parentElement ?? bladeRef.current,\n );\n return () => {\n resizeObserver.disconnect();\n };\n }\n }, [isExpanded]);\n\n const { style: containerStyle, ...otherContainerProps } =\n containerProps || {};\n\n return (\n <div\n ref={bladeRef}\n id={idProp}\n className={cx(classes.root, className, {\n [classes.fullWidth]: fullWidth,\n [classes.expanded]: isExpanded,\n })}\n {...others}\n >\n {bladeHeader}\n <div\n id={bladeContainerId}\n role=\"region\"\n aria-labelledby={bladeHeaderId}\n className={classes.container}\n hidden={!isExpanded}\n style={{\n ...containerStyle,\n maxWidth: isExpanded ? maxWidth : 0,\n }}\n {...otherContainerProps}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AA6Ga,MAAA,UAAU,CAAC,UAAwB;AACxC,QAAA;AAAA,IACJ,IAAI;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;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AAE,OAAO,gBAAgB,GAAG,oBAAoB,IACpD,kBAAkB;AAGlB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAK;AAAA,MACL,IAAI;AAAA,MACJ,WAAW,GAAG,QAAQ,MAAM,WAAW;AAAA,QACrC,CAAC,QAAQ,SAAS,GAAG;AAAA,QACrB,CAAC,QAAQ,QAAQ,GAAG;AAAA,MAAA,CACrB;AAAA,MACA,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA;AAAA,QACD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,YACJ,MAAK;AAAA,YACL,mBAAiB;AAAA,YACjB,WAAW,QAAQ;AAAA,YACnB,QAAQ,CAAC;AAAA,YACT,OAAO;AAAA,cACL,GAAG;AAAA,cACH,UAAU,aAAa,WAAW;AAAA,YACpC;AAAA,YACC,GAAG;AAAA,YAEH;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
1
+ {"version":3,"file":"Blade.js","sources":["../../../src/Blade/Blade.tsx"],"sourcesContent":["import {\n HTMLAttributes,\n SyntheticEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from \"react\";\nimport {\n ExtractNames,\n HvBaseProps,\n HvTypography,\n HvTypographyVariants,\n setId,\n useControlled,\n useDefaultProps,\n useUniqueId,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { staticClasses, useClasses } from \"./Blade.styles\";\n\nexport { staticClasses as bladeClasses };\n\nexport type HvBladeClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBladeProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /**\n * The content that will be rendered within the blade.\n */\n children: React.ReactNode;\n\n /**\n * The content of the blade's button.\n *\n * If a render function is provided, it will be called with the expanded state as an argument.\n */\n label?: React.ReactNode | ((expanded: boolean) => React.ReactNode);\n /**\n * Typography variant for the blade's button label.\n */\n labelVariant?: HvTypographyVariants;\n /**\n * Heading Level to apply to blade button.\n *\n * If 'undefined', the button will not have a header wrapper.\n */\n headingLevel?: 1 | 2 | 3 | 4 | 5 | 6;\n\n /**\n * Indicates whether the blade is expanded or not.\n *\n * When defined the expanded state becomes controlled.\n *\n * @default undefined\n */\n expanded?: boolean;\n /**\n * Specifies the initial expanded state of the blade when it is uncontrolled.\n */\n defaultExpanded?: boolean;\n\n /**\n * Callback function triggered when the blade's button is pressed.\n * It receives the event and the new expanded state as arguments.\n *\n * If the blade is uncontrolled, this new state will be effective.\n * If the blade is controlled, it is up to the parent component to manage this state.\n *\n * @param {SyntheticEvent} event The event source of the callback.\n * @param {boolean} value The new value.\n */\n onChange?: (event: React.SyntheticEvent, value: boolean) => void;\n\n /**\n * Specifies whether the blade is disabled. If true, the blade cannot be interacted with.\n */\n disabled?: boolean;\n\n /**\n * If true, the blade will take up the maximum width of the container when expanded.\n */\n fullWidth?: boolean;\n\n /**\n * Props to be passed to the button that toggles the blade's expanded state.\n * This can be used to further customize the appearance or behavior of the blade's button,\n * e.g. to set the aria-label attribute.\n */\n buttonProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * Props to be passed to the container div that holds the blade's children.\n * This can be used to further customize the appearance or behavior of the blade's content area.\n */\n containerProps?: HTMLAttributes<HTMLDivElement>;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBladeClasses;\n}\n\n/**\n * A blade is a design element that expands horizontally to reveal information, similar to an accordion.\n *\n * It is usually stacked horizontally with other blades and works best when used within a flex container.\n * The `HvBlades` component is recommended for this purpose, as it also provides better management of the\n * blades' expanded state.\n */\nexport const HvBlade = (props: HvBladeProps) => {\n const {\n id: idProp,\n className,\n classes: classesProp,\n expanded,\n defaultExpanded = false,\n label,\n labelVariant = \"label\",\n headingLevel,\n onChange,\n disabled = false,\n children,\n fullWidth,\n buttonProps,\n containerProps,\n ...others\n } = useDefaultProps(\"HvBlade\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const [isExpanded, setIsExpanded] = useControlled(\n expanded,\n Boolean(defaultExpanded),\n );\n\n const handleAction = useCallback(\n (event: SyntheticEvent) => {\n if (!disabled) {\n onChange?.(event, !isExpanded);\n\n // This will only run if uncontrolled\n setIsExpanded(!isExpanded);\n\n return true;\n }\n return false;\n },\n [disabled, onChange, isExpanded, setIsExpanded],\n );\n\n const handleClick = useCallback(\n (event: SyntheticEvent) => {\n handleAction(event);\n event.preventDefault();\n event.stopPropagation();\n },\n [handleAction],\n );\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLDivElement>) => {\n let isEventHandled = false;\n const { key } = event;\n\n if (\n event.altKey ||\n event.ctrlKey ||\n event.metaKey ||\n event.currentTarget !== event.target\n ) {\n return;\n }\n switch (key) {\n case \"Enter\":\n case \" \":\n isEventHandled = handleAction(event);\n break;\n default:\n return;\n }\n\n if (isEventHandled) {\n event.preventDefault();\n event.stopPropagation();\n }\n },\n [handleAction],\n );\n\n const id = useUniqueId(idProp);\n const bladeHeaderId = setId(id, \"button\");\n const bladeContainerId = setId(id, \"container\");\n const bladeHeader = useMemo(() => {\n const buttonLabel = typeof label === \"function\" ? label(isExpanded) : label;\n\n const bladeButton = (\n <HvTypography\n id={bladeHeaderId}\n component=\"div\"\n role=\"button\"\n className={cx(classes.button, {\n [classes.disabled]: disabled,\n [classes.textOnlyLabel]: typeof buttonLabel === \"string\",\n })}\n style={{ flexShrink: headingLevel === undefined ? 0 : undefined }}\n disabled={disabled}\n tabIndex={0}\n onKeyDown={handleKeyDown}\n onClick={handleClick}\n variant={labelVariant}\n aria-expanded={isExpanded}\n aria-controls={bladeContainerId}\n {...buttonProps}\n >\n {buttonLabel}\n </HvTypography>\n );\n return headingLevel === undefined ? (\n bladeButton\n ) : (\n <HvTypography\n component={`h${headingLevel}`}\n variant={labelVariant}\n className={classes.heading}\n style={{ flexShrink: 0 }}\n >\n {bladeButton}\n </HvTypography>\n );\n }, [\n bladeContainerId,\n bladeHeaderId,\n buttonProps,\n classes.button,\n classes.disabled,\n classes.heading,\n classes.textOnlyLabel,\n cx,\n disabled,\n handleClick,\n handleKeyDown,\n headingLevel,\n isExpanded,\n label,\n labelVariant,\n ]);\n\n const bladeRef = useRef<HTMLDivElement>(null);\n const [maxWidth, setMaxWidth] = useState<number | undefined>(undefined);\n useEffect(() => {\n if (bladeRef.current) {\n const resizeObserver = new ResizeObserver((entries) => {\n setMaxWidth(entries[0].target.clientWidth);\n });\n resizeObserver.observe(\n // using the blade's container as reference max-width is more stable\n bladeRef.current.parentElement ?? bladeRef.current,\n );\n return () => {\n resizeObserver.disconnect();\n };\n }\n }, [isExpanded]);\n\n const { style: containerStyle, ...otherContainerProps } =\n containerProps || {};\n\n return (\n <div\n ref={bladeRef}\n id={idProp}\n className={cx(classes.root, className, {\n [classes.fullWidth]: fullWidth,\n [classes.expanded]: isExpanded,\n })}\n {...others}\n >\n {bladeHeader}\n <div\n id={bladeContainerId}\n role=\"region\"\n aria-labelledby={bladeHeaderId}\n className={classes.container}\n hidden={!isExpanded}\n style={{\n ...containerStyle,\n maxWidth: isExpanded ? maxWidth : 0,\n }}\n {...otherContainerProps}\n >\n {children}\n </div>\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AA6Ga,MAAA,UAAU,CAAC,UAAwB;AACxC,QAAA;AAAA,IACJ,IAAI;AAAA,IACJ;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,kBAAkB;AAAA,IAClB;AAAA,IACA,eAAe;AAAA,IACf;AAAA,IACA;AAAA,IACA,WAAW;AAAA,IACX;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,WAAW,KAAK;AAEpC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AAExC,QAAA,CAAC,YAAY,aAAa,IAAI;AAAA,IAClC;AAAA,IACA,QAAQ,eAAe;AAAA,EAAA;AAGzB,QAAM,eAAe;AAAA,IACnB,CAAC,UAA0B;AACzB,UAAI,CAAC,UAAU;AACF,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MAAA,CACrB;AAAA,MACA,GAAG;AAAA,MAEH,UAAA;AAAA,QAAA;AAAA,QACD;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,IAAI;AAAA,YACJ,MAAK;AAAA,YACL,mBAAiB;AAAA,YACjB,WAAW,QAAQ;AAAA,YACnB,QAAQ,CAAC;AAAA,YACT,OAAO;AAAA,cACL,GAAG;AAAA,cACH,UAAU,aAAa,WAAW;AAAA,YACpC;AAAA,YACC,GAAG;AAAA,YAEH;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGN;"}
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useCallback, useMemo, Children, cloneElement } from "react";
3
3
  import { useDefaultProps, useControlled } from "@hitachivantara/uikit-react-core";
4
4
  import { useClasses } from "./Blades.styles.js";
@@ -1 +1 @@
1
- {"version":3,"file":"Blades.js","sources":["../../../src/Blades/Blades.tsx"],"sourcesContent":["import React, {\n Children,\n cloneElement,\n SyntheticEvent,\n useCallback,\n useMemo,\n} from \"react\";\nimport {\n ExtractNames,\n HvBaseProps,\n useControlled,\n useDefaultProps,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { staticClasses, useClasses } from \"./Blades.styles\";\n\nexport { staticClasses as bladesClasses };\n\nexport type HvBladesClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBladesProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /**\n * Array of indices representing the expanded state of each blade.\n *\n * When defined, the expanded state of the blades becomes controlled.\n */\n expanded?: number[];\n /**\n * Initial expanded state of the blades when in an uncontrolled state.\n *\n * It's an array of indices representing the blades that should be initially expanded.\n */\n defaultExpanded?: number[];\n\n /**\n * If true, ensures that only one blade can be expanded at a time.\n */\n atMostOneExpanded?: boolean;\n /**\n * If true, ensures that at least one blade is always expanded.\n */\n atLeastOneExpanded?: boolean;\n\n /**\n * If true, the blades will take up the full width of the container by default.\n */\n fullWidthBlades?: boolean;\n\n /**\n * Callback function triggered when the expanded state of any blade changes.\n * It receives the event and the new array of expanded indices as arguments.\n *\n * If uncontrolled, this new state will be effective.\n * If controlled, it is up to the parent component to manage this state.\n *\n * @param {SyntheticEvent} event The event source of the callback.\n * @param {number[]} value Array of indices of the blades that are expanded.\n */\n onChange?: (event: SyntheticEvent, value: number[]) => void;\n\n /**\n * The blades to be rendered within the group.\n * Must be instances of `HvBlade`, otherwise the behavior is undefined and will most likely break.\n */\n children: React.ReactNode;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBladesClasses;\n}\n\nfunction getExpandedBlades(\n defaultExpanded: number[] | undefined,\n children: React.ReactNode,\n atMostOneExpanded: boolean,\n atLeastOneExpanded: boolean,\n) {\n const childrenArray = Children.toArray(children);\n const expandedBlades =\n defaultExpanded ??\n childrenArray\n .map((child: any, i: number) => {\n const childIsControlled = child?.props?.expanded !== undefined;\n const childIsExpanded = childIsControlled\n ? child?.props?.expanded\n : child?.props?.defaultExpanded;\n\n return childIsExpanded ? i : undefined;\n })\n .filter((v) => v !== undefined);\n\n const numberOfExpandedBlades = expandedBlades.length;\n if (\n atLeastOneExpanded &&\n numberOfExpandedBlades === 0 &&\n childrenArray.length > 0\n ) {\n return [0];\n }\n if (atMostOneExpanded && numberOfExpandedBlades > 1) {\n return [expandedBlades[0]];\n }\n\n return expandedBlades;\n}\n\n/**\n * `HvBlades` is a component that groups multiple `HvBlade` components.\n *\n * It allows for better control over the expanded state of blades, suitable for both\n * controlled and uncontrolled scenarios.\n */\nexport const HvBlades = (props: HvBladesProps) => {\n const {\n id,\n className,\n classes: classesProp,\n children,\n expanded: expandedProp,\n defaultExpanded,\n atMostOneExpanded = false,\n atLeastOneExpanded = false,\n fullWidthBlades = false,\n onChange,\n ...others\n } = useDefaultProps(\"HvBlades\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const [expanded, setExpanded] = useControlled(expandedProp, () =>\n getExpandedBlades(\n defaultExpanded,\n children,\n atMostOneExpanded,\n atLeastOneExpanded,\n ),\n );\n\n const onChildChangeInterceptor = useCallback(\n (\n index: number,\n childOnChange: (event: SyntheticEvent, isExpanded: boolean) => void,\n event: SyntheticEvent,\n isExpanded: boolean,\n ) => {\n const newValue: number[] = [];\n if (atMostOneExpanded) {\n if (isExpanded) {\n newValue.push(index);\n }\n } else {\n newValue.push(...(expanded as number[]));\n if (isExpanded) {\n newValue.push(index);\n } else {\n newValue.splice(newValue.indexOf(index), 1);\n }\n }\n\n if (atLeastOneExpanded && newValue.length === 0) {\n newValue.push(index);\n }\n\n childOnChange?.(event, isExpanded);\n\n onChange?.(event, newValue);\n\n // This will only run if uncontrolled\n setExpanded(newValue);\n },\n [onChange, expanded, setExpanded, atMostOneExpanded, atLeastOneExpanded],\n );\n\n const modifiedChildren = useMemo(() => {\n return Children.map(children, (child: any, i: number) => {\n const childIsExpanded = expanded.includes(i);\n\n return cloneElement(child, {\n expanded: childIsExpanded,\n fullWidth: child?.props?.fullWidth ?? fullWidthBlades,\n buttonProps: {\n ...child?.props?.buttonProps,\n \"aria-disabled\":\n // If the accordion panel associated with an accordion header is visible,\n // and if the accordion does not permit the panel to be collapsed, the header\n // button element has aria-disabled set to true.\n child?.props?.disabled ||\n (childIsExpanded && atMostOneExpanded && expanded.length === 1)\n ? true\n : undefined,\n },\n onChange: (\n event: React.ChangeEvent<HTMLInputElement>,\n isExpanded: boolean,\n ) =>\n onChildChangeInterceptor(\n i,\n child?.props?.onChange,\n event,\n isExpanded,\n ),\n });\n });\n }, [\n children,\n expanded,\n fullWidthBlades,\n atMostOneExpanded,\n onChildChangeInterceptor,\n ]);\n\n return (\n <div id={id} className={cx(classes.root, className)} {...others}>\n {modifiedChildren}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAwEA,SAAS,kBACP,iBACA,UACA,mBACA,oBACA;AACM,QAAA,gBAAgB,SAAS,QAAQ,QAAQ;AAC/C,QAAM,iBACJ,mBAC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C,iBAAS,KAAK,KAAK;AAAA,MACrB;AAEA,sBAAgB,OAAO,UAAU;AAEjC,iBAAW,OAAO,QAAQ;AAG1B,kBAAY,QAAQ;AAAA,IACtB;AAAA,IACA,CAAC,UAAU,UAAU,aAAa,mBAAmB,kBAAkB;AAAA,EAAA;AAGnE,QAAA,mBAAmB,QAAQ,MAAM;AACrC,WAAO,SAAS,IAAI,UAAU,CAAC,OAAY,MAAc;AACjD,YAAA,kBAAkB,SAAS,SAAS,CAAC;AAE3C,aAAO,aAAa,OAAO;AAAA,QACzB,UAAU;AAAA,QACV,WAAW,OAAO,OAAO,aAAa;AAAA,QACtC,aAAa;AAAA,UACX,GAAG,OAAO,OAAO;AAAA,UACjB;AAAA;AAAA;AAAA;AAAA,YAIE,OAAO,OAAO,YACb,mBAAmB,qBAAqB,SAAS,WAAW,IACzD,OACA;AAAA;AAAA,QACR;AAAA,QACA,UAAU,CACR,OACA,eAEA;AAAA,UACE;AAAA,UACA,OAAO,OAAO;AAAA,UACd;AAAA,UACA;AAAA,QACF;AAAA,MAAA,CACH;AAAA,IAAA,CACF;AAAA,EAAA,GACA;AAAA,IACD;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EAAA,CACD;AAGC,SAAA,oBAAC,OAAI,EAAA,IAAQ,WAAW,GAAG,QAAQ,MAAM,SAAS,GAAI,GAAG,QACtD,UACH,iBAAA,CAAA;AAEJ;"}
1
+ {"version":3,"file":"Blades.js","sources":["../../../src/Blades/Blades.tsx"],"sourcesContent":["import {\n Children,\n cloneElement,\n SyntheticEvent,\n useCallback,\n useMemo,\n} from \"react\";\nimport {\n ExtractNames,\n HvBaseProps,\n useControlled,\n useDefaultProps,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { staticClasses, useClasses } from \"./Blades.styles\";\n\nexport { staticClasses as bladesClasses };\n\nexport type HvBladesClasses = ExtractNames<typeof useClasses>;\n\nexport interface HvBladesProps\n extends HvBaseProps<HTMLDivElement, \"onChange\" | \"children\"> {\n /**\n * Array of indices representing the expanded state of each blade.\n *\n * When defined, the expanded state of the blades becomes controlled.\n */\n expanded?: number[];\n /**\n * Initial expanded state of the blades when in an uncontrolled state.\n *\n * It's an array of indices representing the blades that should be initially expanded.\n */\n defaultExpanded?: number[];\n\n /**\n * If true, ensures that only one blade can be expanded at a time.\n */\n atMostOneExpanded?: boolean;\n /**\n * If true, ensures that at least one blade is always expanded.\n */\n atLeastOneExpanded?: boolean;\n\n /**\n * If true, the blades will take up the full width of the container by default.\n */\n fullWidthBlades?: boolean;\n\n /**\n * Callback function triggered when the expanded state of any blade changes.\n * It receives the event and the new array of expanded indices as arguments.\n *\n * If uncontrolled, this new state will be effective.\n * If controlled, it is up to the parent component to manage this state.\n *\n * @param {SyntheticEvent} event The event source of the callback.\n * @param {number[]} value Array of indices of the blades that are expanded.\n */\n onChange?: (event: SyntheticEvent, value: number[]) => void;\n\n /**\n * The blades to be rendered within the group.\n * Must be instances of `HvBlade`, otherwise the behavior is undefined and will most likely break.\n */\n children: React.ReactNode;\n /**\n * A Jss Object used to override or extend the styles applied.\n */\n classes?: HvBladesClasses;\n}\n\nfunction getExpandedBlades(\n defaultExpanded: number[] | undefined,\n children: React.ReactNode,\n atMostOneExpanded: boolean,\n atLeastOneExpanded: boolean,\n) {\n const childrenArray = Children.toArray(children);\n const expandedBlades =\n defaultExpanded ??\n childrenArray\n .map((child: any, i: number) => {\n const childIsControlled = child?.props?.expanded !== undefined;\n const childIsExpanded = childIsControlled\n ? child?.props?.expanded\n : child?.props?.defaultExpanded;\n\n return childIsExpanded ? i : undefined;\n })\n .filter((v) => v !== undefined);\n\n const numberOfExpandedBlades = expandedBlades.length;\n if (\n atLeastOneExpanded &&\n numberOfExpandedBlades === 0 &&\n childrenArray.length > 0\n ) {\n return [0];\n }\n if (atMostOneExpanded && numberOfExpandedBlades > 1) {\n return [expandedBlades[0]];\n }\n\n return expandedBlades;\n}\n\n/**\n * `HvBlades` is a component that groups multiple `HvBlade` components.\n *\n * It allows for better control over the expanded state of blades, suitable for both\n * controlled and uncontrolled scenarios.\n */\nexport const HvBlades = (props: HvBladesProps) => {\n const {\n id,\n className,\n classes: classesProp,\n children,\n expanded: expandedProp,\n defaultExpanded,\n atMostOneExpanded = false,\n atLeastOneExpanded = false,\n fullWidthBlades = false,\n onChange,\n ...others\n } = useDefaultProps(\"HvBlades\", props);\n\n const { classes, cx } = useClasses(classesProp);\n\n const [expanded, setExpanded] = useControlled(expandedProp, () =>\n getExpandedBlades(\n defaultExpanded,\n children,\n atMostOneExpanded,\n atLeastOneExpanded,\n ),\n );\n\n const onChildChangeInterceptor = useCallback(\n (\n index: number,\n childOnChange: (event: SyntheticEvent, isExpanded: boolean) => void,\n event: SyntheticEvent,\n isExpanded: boolean,\n ) => {\n const newValue: number[] = [];\n if (atMostOneExpanded) {\n if (isExpanded) {\n newValue.push(index);\n }\n } else {\n newValue.push(...(expanded as number[]));\n if (isExpanded) {\n newValue.push(index);\n } else {\n newValue.splice(newValue.indexOf(index), 1);\n }\n }\n\n if (atLeastOneExpanded && newValue.length === 0) {\n newValue.push(index);\n }\n\n childOnChange?.(event, isExpanded);\n\n onChange?.(event, newValue);\n\n // This will only run if uncontrolled\n setExpanded(newValue);\n },\n [onChange, expanded, setExpanded, atMostOneExpanded, atLeastOneExpanded],\n );\n\n const modifiedChildren = useMemo(() => {\n return Children.map(children, (child: any, i: number) => {\n const childIsExpanded = expanded.includes(i);\n\n return cloneElement(child, {\n expanded: childIsExpanded,\n fullWidth: child?.props?.fullWidth ?? fullWidthBlades,\n buttonProps: {\n ...child?.props?.buttonProps,\n \"aria-disabled\":\n // If the accordion panel associated with an accordion header is visible,\n // and if the accordion does not permit the panel to be collapsed, the header\n // button element has aria-disabled set to true.\n child?.props?.disabled ||\n (childIsExpanded && atMostOneExpanded && expanded.length === 1)\n ? true\n : undefined,\n },\n onChange: (\n event: React.ChangeEvent<HTMLInputElement>,\n isExpanded: boolean,\n ) =>\n onChildChangeInterceptor(\n i,\n child?.props?.onChange,\n event,\n isExpanded,\n ),\n });\n });\n }, [\n children,\n expanded,\n fullWidthBlades,\n atMostOneExpanded,\n onChildChangeInterceptor,\n ]);\n\n return (\n <div id={id} className={cx(classes.root, className)} {...others}>\n {modifiedChildren}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;AAwEA,SAAS,kBACP,iBACA,UACA,mBACA,oBACA;AACM,QAAA,gBAAgB,SAAS,QAAQ,QAAQ;AAC/C,QAAM,iBACJ,mBACA,cACG,IAAI,CAAC,OAAY,MAAc;AACxB,UAAA,oBAAoB,OAAO,OAAO,aAAa;AACrD,UAAM,kBAAkB,oBACpB,OAAO,OAAO,WACd,OAAO,OAAO;AAElB,WAAO,kBAAkB,IAAI;AAAA,EAAA,CAC9B,EACA,OAAO,CAAC,MAAM,MAAM,MAAS;AAElC,QAAM,yBAAyB,eAAe;AAC9C,MACE,sBACA,2BAA2B,KAC3B,cAAc,SAAS,GACvB;AACA,WAAO,CAAC,CAAC;AAAA,EACX;AACI,MAAA,qBAAqB,yBAAyB,GAAG;AAC5C,WAAA,CAAC,eAAe,CAAC,CAAC;AAAA,EAC3B;AAEO,SAAA;AACT;AAQa,MAAA,WAAW,CAAC,UAAyB;AAC1C,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA,SAAS;AAAA,IACT;AAAA,IACA,UAAU;AAAA,IACV;AAAA,IACA,oBAAoB;AAAA,IACpB,qBAAqB;AAAA,IACrB,kBAAkB;AAAA,IAClB;AAAA,IACA,GAAG;AAAA,EAAA,IACD,gBAAgB,YAAY,KAAK;AAErC,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AAExC,QAAA,CAAC,UAAU,WAAW,IAAI;AAAA,IAAc;AAAA,IAAc,MAC1D;AAAA,MACE;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,IACF;AAAA,EAAA;AAGF,QAAM,2BAA2B;AAAA,IAC/B,CACE,OACA,eACA,OACA,eACG;AACH,YAAM,WAAqB,C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"@emotion/react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useMemo } from "react";
3
3
  import { WidthProvider, Responsive } from "react-grid-layout";
4
4
  import { Global } from "@emotion/react";
@@ -1,11 +1,18 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { Background } from "reactflow";
3
3
  import { getColor, theme } from "@hitachivantara/uikit-styles";
4
4
  const HvFlowBackground = ({
5
5
  color = "secondary",
6
6
  ...others
7
7
  }) => {
8
- return /* @__PURE__ */ jsx(Background, { color: getColor(color, theme.colors.secondary), ...others });
8
+ return /* @__PURE__ */ jsx(
9
+ Background,
10
+ {
11
+ color: getColor(color, theme.colors.secondary_80),
12
+ gap: 16,
13
+ ...others
14
+ }
15
+ );
9
16
  };
10
17
  export {
11
18
  HvFlowBackground
@@ -1 +1 @@
1
- {"version":3,"file":"Background.js","sources":["../../../../src/Flow/Background/Background.tsx"],"sourcesContent":["import { Background, BackgroundProps } from \"reactflow\";\nimport { getColor, HvColorAny, theme } from \"@hitachivantara/uikit-styles\";\n\nexport interface HvFlowBackgroundProps extends Omit<BackgroundProps, \"color\"> {\n /** Color for the background dots. Defaults to `secondary`. */\n color?: HvColorAny;\n}\n\nexport const HvFlowBackground = ({\n color = \"secondary\",\n ...others\n}: HvFlowBackgroundProps) => {\n return (\n <Background color={getColor(color, theme.colors.secondary)} {...others} />\n );\n};\n"],"names":[],"mappings":";;;AAQO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAQ;AAAA,EACR,GAAG;AACL,MAA6B;AAEzB,SAAA,oBAAC,YAAW,EAAA,OAAO,SAAS,OAAO,MAAM,OAAO,SAAS,GAAI,GAAG,OAAQ,CAAA;AAE5E;"}
1
+ {"version":3,"file":"Background.js","sources":["../../../../src/Flow/Background/Background.tsx"],"sourcesContent":["import { Background, BackgroundProps } from \"reactflow\";\nimport { getColor, HvColorAny, theme } from \"@hitachivantara/uikit-styles\";\n\nexport interface HvFlowBackgroundProps extends Omit<BackgroundProps, \"color\"> {\n /** Color for the background dots. Defaults to `secondary`. */\n color?: HvColorAny;\n}\n\nexport const HvFlowBackground = ({\n color = \"secondary\",\n ...others\n}: HvFlowBackgroundProps) => {\n return (\n <Background\n color={getColor(color, theme.colors.secondary_80)}\n gap={16}\n {...others}\n />\n );\n};\n"],"names":[],"mappings":";;;AAQO,MAAM,mBAAmB,CAAC;AAAA,EAC/B,QAAQ;AAAA,EACR,GAAG;AACL,MAA6B;AAEzB,SAAA;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,OAAO,SAAS,OAAO,MAAM,OAAO,YAAY;AAAA,MAChD,KAAK;AAAA,MACJ,GAAG;AAAA,IAAA;AAAA,EAAA;AAGV;"}
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useStore, useStoreApi, Panel } from "reactflow";
3
3
  import { shallow } from "zustand/shallow";
4
4
  import { useLabels, HvMultiButton, HvButton } from "@hitachivantara/uikit-react-core";
@@ -1,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, useRef, useCallback } from "react";
3
3
  import { useDroppable, useDndMonitor } from "@dnd-kit/core";
4
4
  import { Global } from "@emotion/react";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useNodes } from "reactflow";
3
3
  import { HvEmptyState } from "@hitachivantara/uikit-react-core";
4
4
  import { useClasses } from "./Empty.styles.js";
@@ -1,4 +1,4 @@
1
- import { jsx, jsxs } from "@emotion/react/jsx-runtime";
1
+ import { jsx, jsxs } from "react/jsx-runtime";
2
2
  import { useSensors, useSensor, PointerSensor, KeyboardSensor, DndContext } from "@dnd-kit/core";
3
3
  import { restrictToWindowEdges } from "@dnd-kit/modifiers";
4
4
  import { ReactFlowProvider } from "reactflow";
@@ -1,6 +1,6 @@
1
1
  import { createClasses, theme } from "@hitachivantara/uikit-react-core";
2
2
  import { staticClasses as staticClasses$1 } from "./Node/BaseNode.styles.js";
3
- import "@emotion/react/jsx-runtime";
3
+ import "react/jsx-runtime";
4
4
  import "reactflow";
5
5
  const { staticClasses, useClasses } = createClasses("HvFlow", {
6
6
  root: {
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { createContext, useState, useMemo } from "react";
3
3
  import { HvFlowNodeMetaProvider } from "./NodeMetaContext.js";
4
4
  const HvFlowContext = createContext({});
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { createContext, useContext, useRef, useCallback, useMemo } from "react";
3
3
  const HvFlowNodeMetaContext = createContext(void 0);
4
4
  const HvFlowNodeMetaProvider = ({
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { MiniMap } from "reactflow";
3
3
  import { getColor } from "@hitachivantara/uikit-styles";
4
4
  import { useClasses } from "./Minimap.styles.js";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx, Fragment } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
2
2
  import { NodeToolbar, Handle, Position } from "reactflow";
3
3
  import { useLabels, HvIconButton, HvTypography } from "@hitachivantara/uikit-react-core";
4
4
  import { useClasses } from "./BaseNode.styles.js";
@@ -51,7 +51,7 @@ const HvFlowBaseNode = ({
51
51
  nodeActions: nodeActionsProp
52
52
  });
53
53
  const labels = useLabels(DEFAULT_LABELS, labelsProp);
54
- const { classes, cx, css } = useClasses(classesProp);
54
+ const { classes, cx } = useClasses(classesProp);
55
55
  const renderOutput = (output) => {
56
56
  const edgeConnected = isConnected(id, "source", output.id, outputEdges);
57
57
  return /* @__PURE__ */ jsxs("div", { className: classes.outputContainer, children: [
@@ -95,10 +95,13 @@ const HvFlowBaseNode = ({
95
95
  return /* @__PURE__ */ jsxs(
96
96
  "div",
97
97
  {
98
+ style: {
99
+ // @ts-ignore
100
+ "--node-color": color
101
+ },
98
102
  className: cx(
99
103
  "nowheel",
100
104
  // Disables the default canvas pan behaviour when scrolling inside the node
101
- css({ border: `1px solid ${color}` }),
102
105
  classes.root,
103
106
  className
104
107
  ),
@@ -114,36 +117,31 @@ const HvFlowBaseNode = ({
114
117
  },
115
118
  action.id
116
119
  )) }),
117
- /* @__PURE__ */ jsxs(
118
- "div",
119
- {
120
- className: cx(css({ backgroundColor: color }), classes.headerContainer),
121
- children: [
122
- /* @__PURE__ */ jsxs(
123
- "div",
124
- {
125
- className: cx(
126
- classes.titleContainer,
127
- css({ "& svg *.color0": { fill: iconColor } })
128
- ),
129
- children: [
130
- icon,
131
- /* @__PURE__ */ jsx(
132
- HvTypography,
133
- {
134
- component: "p",
135
- variant: "title4",
136
- className: classes.title,
137
- children: title
138
- }
139
- )
140
- ]
141
- }
142
- ),
143
- headerItems && /* @__PURE__ */ jsx("div", { style: { display: "flex" }, children: headerItems })
144
- ]
145
- }
146
- ),
120
+ /* @__PURE__ */ jsxs("div", { className: classes.headerContainer, children: [
121
+ /* @__PURE__ */ jsxs(
122
+ "div",
123
+ {
124
+ style: {
125
+ // @ts-ignore
126
+ "--icon-color": iconColor
127
+ },
128
+ className: classes.titleContainer,
129
+ children: [
130
+ icon,
131
+ /* @__PURE__ */ jsx(
132
+ HvTypography,
133
+ {
134
+ component: "p",
135
+ variant: "title4",
136
+ className: classes.title,
137
+ children: title
138
+ }
139
+ )
140
+ ]
141
+ }
142
+ ),
143
+ headerItems && /* @__PURE__ */ jsx("div", { style: { display: "flex" }, children: headerItems })
144
+ ] }),
147
145
  children && /* @__PURE__ */ jsx("div", { className: classes.contentContainer, children }),
148
146
  inputs && inputs.length > 0 && /* @__PURE__ */ jsxs(Fragment, { children: [
149
147
  /* @__PURE__ */ jsx("div", { className: classes.inputsTitleContainer, children: /* @__PURE__ */ jsx(HvTypography, { children: labels?.inputsTitle }) }),
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNode.js","sources":["../../../../src/Flow/Node/BaseNode.tsx"],"sourcesContent":["import { Handle, NodeProps, NodeToolbar, Position } from \"reactflow\";\nimport {\n ExtractNames,\n HvBaseProps,\n HvIconButton,\n HvTypography,\n useLabels,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvUseNodeParams, useHvNode } from \"../hooks\";\nimport {\n HvFlowNodeInput,\n HvFlowNodeInputGroup,\n HvFlowNodeOutput,\n HvFlowNodeOutputGroup,\n} from \"../types\";\nimport { staticClasses, useClasses } from \"./BaseNode.styles\";\nimport {\n isConnected,\n isInputGroup,\n isOutputGroup,\n renderedIcon,\n} from \"./utils\";\n\nexport { staticClasses as flowBaseNodeClasses };\n\nexport type HvFlowBaseNodeClasses = ExtractNames<typeof useClasses>;\n\nexport const DEFAULT_LABELS = {\n outputsTitle: \"Outputs\",\n inputsTitle: \"Inputs\",\n deleteActionLabel: \"Delete\",\n duplicateActionLabel: \"Duplicate\",\n};\n\nexport interface HvFlowBaseNodeProps<T = any>\n extends Omit<HvBaseProps, \"id\" | \"color\">,\n Omit<HvUseNodeParams, \"id\">,\n NodeProps<T> {\n /** Header items */\n headerItems?: React.ReactNode;\n /** The content of the node footer */\n footer?: React.ReactNode;\n /** Labels used on the node. */\n labels?: Partial<typeof DEFAULT_LABELS>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowBaseNodeClasses;\n}\n\nexport const HvFlowBaseNode = ({\n id,\n title: titleProp,\n headerItems,\n icon: iconProp,\n color: colorProp,\n inputs: inputsProp,\n outputs: outputsProp,\n nodeActions: nodeActionsProp,\n footer,\n classes: classesProp,\n labels: labelsProp,\n className,\n children,\n}: HvFlowBaseNodeProps<unknown>) => {\n const {\n toggleShowActions,\n getNodeToolbarProps,\n handleDefaultAction,\n nodeActions,\n title,\n icon,\n color,\n iconColor,\n inputEdges,\n inputs,\n outputEdges,\n outputs,\n node,\n } = useHvNode({\n id,\n title: titleProp,\n inputs: inputsProp,\n outputs: outputsProp,\n icon: iconProp,\n color: colorProp,\n labels: labelsProp,\n nodeActions: nodeActionsProp,\n });\n\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n\n const { classes, cx, css } = useClasses(classesProp);\n\n const renderOutput = (output: HvFlowNodeOutput) => {\n const edgeConnected = isConnected(id, \"source\", output.id!, outputEdges);\n\n return (\n <div className={classes.outputContainer} key={output.id}>\n <Handle\n type=\"source\"\n isConnectableEnd={false}\n id={output.id}\n position={Position.Right}\n className={cx(classes.handle, {\n [classes.handleConnected]: edgeConnected,\n })}\n />\n {output.isMandatory && !edgeConnected && (\n <div className={classes.mandatory} />\n )}\n <HvTypography component=\"div\">{output.label}</HvTypography>\n </div>\n );\n };\n\n const renderInput = (input: HvFlowNodeInput) => {\n const edgeConnected = isConnected(id, \"target\", input.id!, inputEdges);\n\n return (\n <div className={classes.inputContainer} key={input.id}>\n <Handle\n type=\"target\"\n isConnectableStart={false}\n id={input.id}\n position={Position.Left}\n className={cx(classes.handle, {\n [classes.handleConnected]: edgeConnected,\n })}\n />\n <HvTypography component=\"div\">{input.label}</HvTypography>\n {input.isMandatory && !edgeConnected && (\n <div className={classes.mandatory} />\n )}\n </div>\n );\n };\n\n if (!node) return null;\n\n return (\n <div\n className={cx(\n \"nowheel\", // Disables the default canvas pan behaviour when scrolling inside the node\n css({ border: `1px solid ${color}` }),\n classes.root,\n className,\n )}\n onMouseEnter={toggleShowActions}\n onMouseLeave={toggleShowActions}\n >\n <NodeToolbar {...getNodeToolbarProps()}>\n {nodeActions?.map((action) => (\n <HvIconButton\n key={action.id}\n title={action.label}\n onClick={() => handleDefaultAction(action)}\n >\n {renderedIcon(action.icon)}\n </HvIconButton>\n ))}\n </NodeToolbar>\n <div\n className={cx(css({ backgroundColor: color }), classes.headerContainer)}\n >\n <div\n className={cx(\n classes.titleContainer,\n css({ \"& svg *.color0\": { fill: iconColor } }),\n )}\n >\n {icon}\n <HvTypography\n component=\"p\"\n variant=\"title4\"\n className={classes.title}\n >\n {title}\n </HvTypography>\n </div>\n {headerItems && <div style={{ display: \"flex\" }}>{headerItems}</div>}\n </div>\n {children && <div className={classes.contentContainer}>{children}</div>}\n {inputs && inputs.length > 0 && (\n <>\n <div className={classes.inputsTitleContainer}>\n <HvTypography>{labels?.inputsTitle}</HvTypography>\n </div>\n <div className={classes.inputsContainer}>\n {inputs?.map((input, idx) => {\n if (!isInputGroup(input)) return renderInput(input);\n\n return (\n <div\n className={classes.inputGroupContainer}\n key={`group${idx}`}\n >\n <HvTypography component=\"div\" variant=\"label\">\n {input.label}\n </HvTypography>\n {(input as HvFlowNodeInputGroup).inputs.map((inp) =>\n renderInput(inp),\n )}\n </div>\n );\n })}\n </div>\n </>\n )}\n {outputs && outputs.length > 0 && (\n <>\n <div className={classes.outputsTitleContainer}>\n <HvTypography>{labels?.outputsTitle}</HvTypography>\n </div>\n <div className={classes.outputsContainer}>\n {outputs?.map((output, idx) => {\n if (!isOutputGroup(output)) {\n return renderOutput(output);\n }\n\n return (\n <div\n className={classes.outputGroupContainer}\n key={`group${idx}`}\n >\n <HvTypography component=\"div\" variant=\"label\">\n {output.label}\n </HvTypography>\n {(output as HvFlowNodeOutputGroup).outputs.map((out) => {\n return renderOutput(out);\n })}\n </div>\n );\n })}\n </div>\n </>\n )}\n {footer && <div className={classes.footerContainer}>{footer}</div>}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,iBAAiB;AAAA,EAC5B,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,sBAAsB;AACxB;AAgBO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,MAAM;AAAA,EACN,OAAO;AAAA,EACP,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1B,qBAAO,aAAa,MAAM;AAAA,YAC5B;AAGE,mBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW,QAAQ;AAAA,gBAGnB,UAAA;AAAA,kBAAA,oBAAC,gBAAa,WAAU,OAAM,SAAQ,SACnC,iBAAO,OACV;AAAA,kBACE,OAAiC,QAAQ,IAAI,CAAC,QAAQ;AACtD,2BAAO,aAAa,GAAG;AAAA,kBAAA,CACxB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAPI,QAAQ,GAAG;AAAA,YAAA;AAAA,UAUrB,CAAA,GACH;AAAA,QAAA,GACF;AAAA,QAED,UAAW,oBAAA,OAAA,EAAI,WAAW,QAAQ,iBAAkB,UAAO,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlE;"}
1
+ {"version":3,"file":"BaseNode.js","sources":["../../../../src/Flow/Node/BaseNode.tsx"],"sourcesContent":["import { Handle, NodeProps, NodeToolbar, Position } from \"reactflow\";\nimport {\n ExtractNames,\n HvBaseProps,\n HvIconButton,\n HvTypography,\n useLabels,\n} from \"@hitachivantara/uikit-react-core\";\n\nimport { HvUseNodeParams, useHvNode } from \"../hooks\";\nimport {\n HvFlowNodeInput,\n HvFlowNodeInputGroup,\n HvFlowNodeOutput,\n HvFlowNodeOutputGroup,\n} from \"../types\";\nimport { staticClasses, useClasses } from \"./BaseNode.styles\";\nimport {\n isConnected,\n isInputGroup,\n isOutputGroup,\n renderedIcon,\n} from \"./utils\";\n\nexport { staticClasses as flowBaseNodeClasses };\n\nexport type HvFlowBaseNodeClasses = ExtractNames<typeof useClasses>;\n\nexport const DEFAULT_LABELS = {\n outputsTitle: \"Outputs\",\n inputsTitle: \"Inputs\",\n deleteActionLabel: \"Delete\",\n duplicateActionLabel: \"Duplicate\",\n};\n\nexport interface HvFlowBaseNodeProps<T = any>\n extends Omit<HvBaseProps, \"id\" | \"color\">,\n Omit<HvUseNodeParams, \"id\">,\n NodeProps<T> {\n /** Header items */\n headerItems?: React.ReactNode;\n /** The content of the node footer */\n footer?: React.ReactNode;\n /** Labels used on the node. */\n labels?: Partial<typeof DEFAULT_LABELS>;\n /** A Jss Object used to override or extend the styles applied to the component. */\n classes?: HvFlowBaseNodeClasses;\n}\n\nexport const HvFlowBaseNode = ({\n id,\n title: titleProp,\n headerItems,\n icon: iconProp,\n color: colorProp,\n inputs: inputsProp,\n outputs: outputsProp,\n nodeActions: nodeActionsProp,\n footer,\n classes: classesProp,\n labels: labelsProp,\n className,\n children,\n}: HvFlowBaseNodeProps<unknown>) => {\n const {\n toggleShowActions,\n getNodeToolbarProps,\n handleDefaultAction,\n nodeActions,\n title,\n icon,\n color,\n iconColor,\n inputEdges,\n inputs,\n outputEdges,\n outputs,\n node,\n } = useHvNode({\n id,\n title: titleProp,\n inputs: inputsProp,\n outputs: outputsProp,\n icon: iconProp,\n color: colorProp,\n labels: labelsProp,\n nodeActions: nodeActionsProp,\n });\n\n const labels = useLabels(DEFAULT_LABELS, labelsProp);\n\n const { classes, cx } = useClasses(classesProp);\n\n const renderOutput = (output: HvFlowNodeOutput) => {\n const edgeConnected = isConnected(id, \"source\", output.id!, outputEdges);\n\n return (\n <div className={classes.outputContainer} key={output.id}>\n <Handle\n type=\"source\"\n isConnectableEnd={false}\n id={output.id}\n position={Position.Right}\n className={cx(classes.handle, {\n [classes.handleConnected]: edgeConnected,\n })}\n />\n {output.isMandatory && !edgeConnected && (\n <div className={classes.mandatory} />\n )}\n <HvTypography component=\"div\">{output.label}</HvTypography>\n </div>\n );\n };\n\n const renderInput = (input: HvFlowNodeInput) => {\n const edgeConnected = isConnected(id, \"target\", input.id!, inputEdges);\n\n return (\n <div className={classes.inputContainer} key={input.id}>\n <Handle\n type=\"target\"\n isConnectableStart={false}\n id={input.id}\n position={Position.Left}\n className={cx(classes.handle, {\n [classes.handleConnected]: edgeConnected,\n })}\n />\n <HvTypography component=\"div\">{input.label}</HvTypography>\n {input.isMandatory && !edgeConnected && (\n <div className={classes.mandatory} />\n )}\n </div>\n );\n };\n\n if (!node) return null;\n\n return (\n <div\n style={{\n // @ts-ignore\n \"--node-color\": color,\n }}\n className={cx(\n \"nowheel\", // Disables the default canvas pan behaviour when scrolling inside the node\n classes.root,\n className,\n )}\n onMouseEnter={toggleShowActions}\n onMouseLeave={toggleShowActions}\n >\n <NodeToolbar {...getNodeToolbarProps()}>\n {nodeActions?.map((action) => (\n <HvIconButton\n key={action.id}\n title={action.label}\n onClick={() => handleDefaultAction(action)}\n >\n {renderedIcon(action.icon)}\n </HvIconButton>\n ))}\n </NodeToolbar>\n <div className={classes.headerContainer}>\n <div\n style={{\n // @ts-ignore\n \"--icon-color\": iconColor,\n }}\n className={classes.titleContainer}\n >\n {icon}\n <HvTypography\n component=\"p\"\n variant=\"title4\"\n className={classes.title}\n >\n {title}\n </HvTypography>\n </div>\n {headerItems && <div style={{ display: \"flex\" }}>{headerItems}</div>}\n </div>\n {children && <div className={classes.contentContainer}>{children}</div>}\n {inputs && inputs.length > 0 && (\n <>\n <div className={classes.inputsTitleContainer}>\n <HvTypography>{labels?.inputsTitle}</HvTypography>\n </div>\n <div className={classes.inputsContainer}>\n {inputs?.map((input, idx) => {\n if (!isInputGroup(input)) return renderInput(input);\n\n return (\n <div\n className={classes.inputGroupContainer}\n key={`group${idx}`}\n >\n <HvTypography component=\"div\" variant=\"label\">\n {input.label}\n </HvTypography>\n {(input as HvFlowNodeInputGroup).inputs.map((inp) =>\n renderInput(inp),\n )}\n </div>\n );\n })}\n </div>\n </>\n )}\n {outputs && outputs.length > 0 && (\n <>\n <div className={classes.outputsTitleContainer}>\n <HvTypography>{labels?.outputsTitle}</HvTypography>\n </div>\n <div className={classes.outputsContainer}>\n {outputs?.map((output, idx) => {\n if (!isOutputGroup(output)) {\n return renderOutput(output);\n }\n\n return (\n <div\n className={classes.outputGroupContainer}\n key={`group${idx}`}\n >\n <HvTypography component=\"div\" variant=\"label\">\n {output.label}\n </HvTypography>\n {(output as HvFlowNodeOutputGroup).outputs.map((out) => {\n return renderOutput(out);\n })}\n </div>\n );\n })}\n </div>\n </>\n )}\n {footer && <div className={classes.footerContainer}>{footer}</div>}\n </div>\n );\n};\n"],"names":[],"mappings":";;;;;;;AA4BO,MAAM,iBAAiB;AAAA,EAC5B,cAAc;AAAA,EACd,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,sBAAsB;AACxB;AAgBO,MAAM,iBAAiB,CAAC;AAAA,EAC7B;AAAA,EACA,OAAO;AAAA,EACP;AAAA,EACA,MAAM;AAAA,EACN,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,aAAa;AAAA,EACb;AAAA,EACA,SAAS;AAAA,EACT,QAAQ;AAAA,EACR;AAAA,EACA;AACF,MAAoC;AAC5B,QAAA;AAAA,IACJ;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,MACE,UAAU;AAAA,IACZ;AAAA,IACA,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAS;AAAA,IACT,MAAM;AAAA,IACN,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,aAAa;AAAA,EAAA,CACd;AAEK,QAAA,SAAS,UAAU,gBAAgB,UAAU;AAEnD,QAAM,EAAE,SAAS,GAAG,IAAI,WAAW,WAAW;AAExC,QAAA,eAAe,CAAC,WAA6B;AACjD,UAAM,gBAAgB,YAAY,IAAI,UAAU,OAAO,IAAK,WAAW;AAEvE,WACG,qBAAA,OAAA,EAAI,WAAW,QAAQ,iBACtB,UAAA;AAAA,MAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,kBAAkB;AAAA,UAClB,IAAI,OAAO;AAAA,UACX,UAAU,SAAS;AAAA,UACnB,WAAW,GAAG,QAAQ,QAAQ;AAAA,YAC5B,CAAC,QAAQ,eAAe,GAAG;AAAA,UAAA,CAC5B;AAAA,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A,UAAC,oBAAA,OAAA,EAAI,WAAW,QAAQ,uBACtB,8BAAC,cAAc,EAAA,UAAA,QAAQ,cAAa,EACtC,CAAA;AAAA,UACA,oBAAC,SAAI,WAAW,QAAQ,kBACrB,UAAS,SAAA,IAAI,CAAC,QAAQ,QAAQ;AACzB,gBAAA,CAAC,cAAc,MAAM,GAAG;AAC1B,qBAAO,aAAa,MAAM;AAAA,YAC5B;AAGE,mBAAA;AAAA,cAAC;AAAA,cAAA;AAAA,gBACC,WAAW,QAAQ;AAAA,gBAGnB,UAAA;AAAA,kBAAA,oBAAC,gBAAa,WAAU,OAAM,SAAQ,SACnC,iBAAO,OACV;AAAA,kBACE,OAAiC,QAAQ,IAAI,CAAC,QAAQ;AACtD,2BAAO,aAAa,GAAG;AAAA,kBAAA,CACxB;AAAA,gBAAA;AAAA,cAAA;AAAA,cAPI,QAAQ,GAAG;AAAA,YAAA;AAAA,UAUrB,CAAA,GACH;AAAA,QAAA,GACF;AAAA,QAED,UAAW,oBAAA,OAAA,EAAI,WAAW,QAAQ,iBAAkB,UAAO,QAAA;AAAA,MAAA;AAAA,IAAA;AAAA,EAAA;AAGlE;"}
@@ -4,7 +4,8 @@ const { staticClasses, useClasses } = createClasses("HvFlowBaseNode", {
4
4
  borderRadius: theme.radii.round,
5
5
  backgroundColor: theme.colors.atmo1,
6
6
  boxShadow: theme.colors.shadow,
7
- minWidth: "250px"
7
+ minWidth: "250px",
8
+ border: "1px solid var(--node-color)"
8
9
  },
9
10
  headerContainer: {
10
11
  padding: theme.spacing(0.5, 1),
@@ -13,12 +14,14 @@ const { staticClasses, useClasses } = createClasses("HvFlowBaseNode", {
13
14
  justifyContent: "space-between",
14
15
  alignItems: "center",
15
16
  borderTopLeftRadius: "inherit",
16
- borderTopRightRadius: "inherit"
17
+ borderTopRightRadius: "inherit",
18
+ backgroundColor: "var(--node-color)"
17
19
  },
18
20
  titleContainer: {
19
21
  display: "flex",
20
22
  flexDirection: "row",
21
- alignItems: "center"
23
+ alignItems: "center",
24
+ "& svg *.color0": { fill: "var(--icon-color)" }
22
25
  },
23
26
  title: {
24
27
  color: theme.colors.base_dark
@@ -1 +1 @@
1
- {"version":3,"file":"BaseNode.styles.js","sources":["../../../../src/Flow/Node/BaseNode.styles.tsx"],"sourcesContent":["import { createClasses, theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvFlowBaseNode\", {\n root: {\n borderRadius: theme.radii.round,\n backgroundColor: theme.colors.atmo1,\n boxShadow: theme.colors.shadow,\n minWidth: \"250px\",\n },\n headerContainer: {\n padding: theme.spacing(0.5, 1),\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n borderTopLeftRadius: \"inherit\",\n borderTopRightRadius: \"inherit\",\n },\n titleContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n },\n title: {\n color: theme.colors.base_dark,\n },\n inputsTitleContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n padding: theme.space.xs,\n backgroundColor: theme.colors.atmo2,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n borderBottom: `1px solid ${theme.colors.atmo3}`,\n },\n outputsTitleContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n padding: theme.space.xs,\n backgroundColor: theme.colors.atmo2,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n borderBottom: `1px solid ${theme.colors.atmo3}`,\n },\n contentContainer: {},\n inputsContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n padding: theme.space.sm,\n gap: theme.space.xs,\n alignItems: \"flex-start\",\n },\n outputsContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n padding: theme.space.sm,\n gap: theme.space.xs,\n alignItems: \"flex-end\",\n },\n inputGroupContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: theme.space.xs,\n alignItems: \"flex-start\",\n },\n outputGroupContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: theme.space.xs,\n alignItems: \"flex-end\",\n },\n inputContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n position: \"relative\",\n },\n outputContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n position: \"relative\",\n },\n handle: {\n zIndex: theme.zIndices.overlay,\n marginLeft: 2,\n backgroundColor: theme.colors.atmo1,\n height: 10,\n width: 10,\n border: `1px solid ${theme.colors.secondary_60}`,\n \"&.react-flow__handle-left\": {\n left: -23,\n },\n \"&.react-flow__handle-right\": {\n right: -21,\n },\n \"&.react-flow__handle-connecting\": {\n backgroundColor: theme.colors.negative_20,\n },\n \"&.react-flow__handle-valid\": {\n backgroundColor: theme.colors.positive_20,\n },\n \"::before\": {\n fontSize: 14,\n color: theme.colors.secondary_60,\n content: '\"+\"',\n marginTop: -7,\n position: \"absolute\",\n },\n },\n handleConnected: {\n backgroundColor: theme.colors.secondary_60,\n width: 8,\n height: 8,\n\n \"::before\": {\n fontSize: 11,\n marginTop: -8,\n },\n },\n mandatory: {\n width: 10,\n height: 10,\n margin: theme.spacing(0, theme.space.xs),\n borderRadius: theme.radii.circle,\n backgroundColor: theme.colors.negative_20,\n },\n footerContainer: {\n padding: theme.space.sm,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n },\n});\n"],"names":[],"mappings":";AAEO,MAAM,EAAE,eAAe,eAAe,cAAc,kBAAkB;AAAA,EAC3E,MAAM;AAAA,IACJ,cAAc,MAAM,MAAM;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,IAC9B,WAAW,MAAM,OAAO;AAAA,IACxB,UAAU;AAAA,EACZ;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS,MAAM,QAAQ,KAAK,CAAC;AAAA,IAC7B,SAAS;AAAA,IACT,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,EACxB;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,IACT,eAAe;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IACZ,UAAU;AAAA,EACZ;AAAA,EACA,QAAQ;AAAA,IACN,QAAQ,MAAM,SAAS;AAAA,IACvB,YAAY;AAAA,IACZ,iBAAiB,MAAM,OAAO;AAAA,IAC9B,QAAQ;AAAA,IACR,OAAO;AAAA,IACP,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,IAC9C,6BAA6B;AAAA,MAC3B,MAAM;AAAA,IACR;AAAA,IACA,8BAA8B;AAAA,MAC5B,OAAO;AAAA,IACT;AAAA,IACA,mCAAmC;AAAA,MACjC,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,8BAA8B;AAAA,MAC5B,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,YAAY;AAAA,MACV,UAAU;AAAA,MACV,OAAO,MAAM,OAAO;AAAA,MACpB,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,iBAAiB,MAAM,OAAO;AAAA,IAC9B,OAAO;AAAA,IACP,QAAQ;AAAA,IAER,YAAY;AAAA,MACV,UAAU;AAAA,MACV,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ,MAAM,QAAQ,GAAG,MAAM,MAAM,EAAE;AAAA,IACvC,cAAc,MAAM,MAAM;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS,MAAM,MAAM;AAAA,IACrB,WAAW,aAAa,MAAM,OAAO,KAAK;AAAA,EAC5C;AACF,CAAC;"}
1
+ {"version":3,"file":"BaseNode.styles.js","sources":["../../../../src/Flow/Node/BaseNode.styles.tsx"],"sourcesContent":["import { createClasses, theme } from \"@hitachivantara/uikit-react-core\";\n\nexport const { staticClasses, useClasses } = createClasses(\"HvFlowBaseNode\", {\n root: {\n borderRadius: theme.radii.round,\n backgroundColor: theme.colors.atmo1,\n boxShadow: theme.colors.shadow,\n minWidth: \"250px\",\n border: \"1px solid var(--node-color)\",\n },\n headerContainer: {\n padding: theme.spacing(0.5, 1),\n display: \"flex\",\n flexDirection: \"row\",\n justifyContent: \"space-between\",\n alignItems: \"center\",\n borderTopLeftRadius: \"inherit\",\n borderTopRightRadius: \"inherit\",\n backgroundColor: \"var(--node-color)\",\n },\n titleContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n \"& svg *.color0\": { fill: \"var(--icon-color)\" },\n },\n title: {\n color: theme.colors.base_dark,\n },\n inputsTitleContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n padding: theme.space.xs,\n backgroundColor: theme.colors.atmo2,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n borderBottom: `1px solid ${theme.colors.atmo3}`,\n },\n outputsTitleContainer: {\n display: \"flex\",\n justifyContent: \"center\",\n padding: theme.space.xs,\n backgroundColor: theme.colors.atmo2,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n borderBottom: `1px solid ${theme.colors.atmo3}`,\n },\n contentContainer: {},\n inputsContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n padding: theme.space.sm,\n gap: theme.space.xs,\n alignItems: \"flex-start\",\n },\n outputsContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n padding: theme.space.sm,\n gap: theme.space.xs,\n alignItems: \"flex-end\",\n },\n inputGroupContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: theme.space.xs,\n alignItems: \"flex-start\",\n },\n outputGroupContainer: {\n display: \"flex\",\n flexDirection: \"column\",\n gap: theme.space.xs,\n alignItems: \"flex-end\",\n },\n inputContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n position: \"relative\",\n },\n outputContainer: {\n display: \"flex\",\n flexDirection: \"row\",\n alignItems: \"center\",\n position: \"relative\",\n },\n handle: {\n zIndex: theme.zIndices.overlay,\n marginLeft: 2,\n backgroundColor: theme.colors.atmo1,\n height: 10,\n width: 10,\n border: `1px solid ${theme.colors.secondary_60}`,\n \"&.react-flow__handle-left\": {\n left: -23,\n },\n \"&.react-flow__handle-right\": {\n right: -21,\n },\n \"&.react-flow__handle-connecting\": {\n backgroundColor: theme.colors.negative_20,\n },\n \"&.react-flow__handle-valid\": {\n backgroundColor: theme.colors.positive_20,\n },\n \"::before\": {\n fontSize: 14,\n color: theme.colors.secondary_60,\n content: '\"+\"',\n marginTop: -7,\n position: \"absolute\",\n },\n },\n handleConnected: {\n backgroundColor: theme.colors.secondary_60,\n width: 8,\n height: 8,\n\n \"::before\": {\n fontSize: 11,\n marginTop: -8,\n },\n },\n mandatory: {\n width: 10,\n height: 10,\n margin: theme.spacing(0, theme.space.xs),\n borderRadius: theme.radii.circle,\n backgroundColor: theme.colors.negative_20,\n },\n footerContainer: {\n padding: theme.space.sm,\n borderTop: `1px solid ${theme.colors.atmo3}`,\n },\n});\n"],"names":[],"mappings":";AAEO,MAAM,EAAE,eAAe,eAAe,cAAc,kBAAkB;AAAA,EAC3E,MAAM;AAAA,IACJ,cAAc,MAAM,MAAM;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,IAC9B,WAAW,MAAM,OAAO;AAAA,IACxB,UAAU;AAAA,IACV,QAAQ;AAAA,EACV;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS,MAAM,QAAQ,KAAK,CAAC;AAAA,IAC7B,SAAS;AAAA,IACT,eAAe;AAAA,IACf,gBAAgB;AAAA,IAChB,YAAY;AAAA,IACZ,qBAAqB;AAAA,IACrB,sBAAsB;AAAA,IACtB,iBAAiB;AAAA,EACnB;AAAA,EACA,gBAAgB;AAAA,IACd,SAAS;AAAA,IACT,eAAe;AAAA,IACf,YAAY;AAAA,IACZ,kBAAkB,EAAE,MAAM,oBAAoB;AAAA,EAChD;AAAA,EACA,OAAO;AAAA,IACL,OAAO,MAAM,OAAO;AAAA,EACtB;AAAA,EACA,sBAAsB;AAAA,IACpB,SAAS;AAAA,IACT,gBAAg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Q;AAAA,IACR,OAAO;AAAA,IACP,QAAQ,aAAa,MAAM,OAAO,YAAY;AAAA,IAC9C,6BAA6B;AAAA,MAC3B,MAAM;AAAA,IACR;AAAA,IACA,8BAA8B;AAAA,MAC5B,OAAO;AAAA,IACT;AAAA,IACA,mCAAmC;AAAA,MACjC,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,8BAA8B;AAAA,MAC5B,iBAAiB,MAAM,OAAO;AAAA,IAChC;AAAA,IACA,YAAY;AAAA,MACV,UAAU;AAAA,MACV,OAAO,MAAM,OAAO;AAAA,MACpB,SAAS;AAAA,MACT,WAAW;AAAA,MACX,UAAU;AAAA,IACZ;AAAA,EACF;AAAA,EACA,iBAAiB;AAAA,IACf,iBAAiB,MAAM,OAAO;AAAA,IAC9B,OAAO;AAAA,IACP,QAAQ;AAAA,IAER,YAAY;AAAA,MACV,UAAU;AAAA,MACV,WAAW;AAAA,IACb;AAAA,EACF;AAAA,EACA,WAAW;AAAA,IACT,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,QAAQ,MAAM,QAAQ,GAAG,MAAM,MAAM,EAAE;AAAA,IACvC,cAAc,MAAM,MAAM;AAAA,IAC1B,iBAAiB,MAAM,OAAO;AAAA,EAChC;AAAA,EACA,iBAAiB;AAAA,IACf,SAAS,MAAM,MAAM;AAAA,IACrB,WAAW,aAAa,MAAM,OAAO,KAAK;AAAA,EAC5C;AACF,CAAC;"}
@@ -1,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { useLabels, theme, HvTooltip, HvButton, HvTypography, HvInlineEditor, HvActionsGeneric } from "@hitachivantara/uikit-react-core";
4
4
  import { Info, Up, Down } from "@hitachivantara/uikit-react-icons";
@@ -1,4 +1,4 @@
1
- import { jsx, Fragment } from "@emotion/react/jsx-runtime";
1
+ import { jsx, Fragment } from "react/jsx-runtime";
2
2
  import Select from "./Select.js";
3
3
  import Slider from "./Slider.js";
4
4
  import Text from "./Text.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useState } from "react";
3
3
  import { HvDropdown } from "@hitachivantara/uikit-react-core";
4
4
  import { useFlowNodeUtils } from "../../hooks/useFlowNode.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { css } from "@emotion/css";
3
3
  import { HvSlider } from "@hitachivantara/uikit-react-core";
4
4
  import { useFlowNodeUtils } from "../../hooks/useFlowNode.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { HvInput } from "@hitachivantara/uikit-react-core";
3
3
  import { useFlowNodeUtils } from "../../hooks/useFlowNode.js";
4
4
  const Text = ({ param, data }) => {
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useState, useMemo, useEffect } from "react";
3
3
  import { useDroppable, useDndMonitor, DragOverlay } from "@dnd-kit/core";
4
4
  import { restrictToWindowEdges } from "@dnd-kit/modifiers";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useMemo, useCallback } from "react";
3
3
  import { HvTypography, HvButton } from "@hitachivantara/uikit-react-core";
4
4
  import { Up, Down } from "@hitachivantara/uikit-react-icons";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useRef } from "react";
3
3
  import { useDraggable } from "@dnd-kit/core";
4
4
  import { useForkRef } from "@mui/material/utils";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { forwardRef } from "react";
3
3
  import { HvTypography } from "@hitachivantara/uikit-react-core";
4
4
  import { Drag } from "@hitachivantara/uikit-react-icons";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { useMemo, isValidElement, useState, useCallback, useEffect } from "react";
3
3
  import { uid } from "uid";
4
4
  import { useLabels } from "@hitachivantara/uikit-react-core";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useLabels, HvDialog, HvDialogTitle, HvDialogContent, HvEmptyState, HvDialogActions, HvButton } from "@hitachivantara/uikit-react-core";
3
3
  import { Info } from "@hitachivantara/uikit-react-icons";
4
4
  import { useClasses } from "./DashboardNode.styles.js";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useTheme } from "@hitachivantara/uikit-react-core";
3
3
  import { getColor, stepSizes } from "./utils.js";
4
4
  import { HvStep } from "./Step/Step.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { HvButton, HvAvatar } from "@hitachivantara/uikit-react-core";
3
3
  import { HourGlass, Level3Bad, Level0Good } from "@hitachivantara/uikit-react-icons";
4
4
  import { getColor, getSemantic } from "../utils.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import { HvButton } from "@hitachivantara/uikit-react-core";
3
3
  import { getColor, dotSizes } from "../utils.js";
4
4
  import { useClasses } from "./Dot.styles.js";
@@ -1,4 +1,4 @@
1
- import { jsxs, jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { useTheme } from "@hitachivantara/uikit-react-core";
3
3
  import { getColor, dotSizes } from "./utils.js";
4
4
  import { HvDot } from "./Dot/Dot.js";
@@ -1,4 +1,4 @@
1
- import { jsx } from "@emotion/react/jsx-runtime";
1
+ import { jsx } from "react/jsx-runtime";
2
2
  import styled from "@emotion/styled";
3
3
  import { useTheme, useWidth, HvBox, HvTooltip, HvTypography } from "@hitachivantara/uikit-react-core";
4
4
  import { theme } from "@hitachivantara/uikit-styles";
@@ -100,9 +100,11 @@ const HvStepNavigation = ({
100
100
  theme
101
101
  )
102
102
  );
103
- return [...acc, stepElement, separatorElement];
103
+ acc.push(stepElement, separatorElement);
104
+ return acc;
104
105
  }
105
- return [...acc, stepElement];
106
+ acc.push(stepElement);
107
+ return acc;
106
108
  },
107
109
  []
108
110
  );