@neo4j-ndl/react 4.25.2 → 4.25.3

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 (109) hide show
  1. package/lib/cjs/accordion/Accordion.js +2 -2
  2. package/lib/cjs/accordion/Accordion.js.map +1 -1
  3. package/lib/cjs/ai/code-preview/CodePreview.js +3 -1
  4. package/lib/cjs/ai/code-preview/CodePreview.js.map +1 -1
  5. package/lib/cjs/ai/preview/Preview.js +3 -1
  6. package/lib/cjs/ai/preview/Preview.js.map +1 -1
  7. package/lib/cjs/ai/thinking/Thinking.js +3 -2
  8. package/lib/cjs/ai/thinking/Thinking.js.map +1 -1
  9. package/lib/cjs/ai/tool-call/ToolCall.js +2 -2
  10. package/lib/cjs/ai/tool-call/ToolCall.js.map +1 -1
  11. package/lib/cjs/clipboard-button/ClipboardButton.js +1 -1
  12. package/lib/cjs/clipboard-button/ClipboardButton.js.map +1 -1
  13. package/lib/cjs/code-block/CodeBlock.js +1 -1
  14. package/lib/cjs/code-block/CodeBlock.js.map +1 -1
  15. package/lib/cjs/data-grid/Components.js +2 -2
  16. package/lib/cjs/data-grid/Components.js.map +1 -1
  17. package/lib/cjs/date-picker/DatePicker.js +5 -5
  18. package/lib/cjs/date-picker/DatePicker.js.map +1 -1
  19. package/lib/cjs/dialog/Dialog.js +1 -1
  20. package/lib/cjs/dialog/Dialog.js.map +1 -1
  21. package/lib/cjs/dropzone/Dropzone.js +2 -2
  22. package/lib/cjs/dropzone/Dropzone.js.map +1 -1
  23. package/lib/cjs/inline-edit/InlineEdit.js +1 -1
  24. package/lib/cjs/inline-edit/InlineEdit.js.map +1 -1
  25. package/lib/cjs/inline-edit/stories/inline-edit-default.story.js +2 -1
  26. package/lib/cjs/inline-edit/stories/inline-edit-default.story.js.map +1 -1
  27. package/lib/cjs/menu/Menu.js +1 -1
  28. package/lib/cjs/menu/Menu.js.map +1 -1
  29. package/lib/cjs/side-navigation/SideNavigation.js +1 -1
  30. package/lib/cjs/side-navigation/SideNavigation.js.map +1 -1
  31. package/lib/cjs/status-label/StatusLabel.js +1 -18
  32. package/lib/cjs/status-label/StatusLabel.js.map +1 -1
  33. package/lib/cjs/text-input/TextInput.js +1 -1
  34. package/lib/cjs/text-input/TextInput.js.map +1 -1
  35. package/lib/cjs/typography/stories/index.js +2 -1
  36. package/lib/cjs/typography/stories/index.js.map +1 -1
  37. package/lib/cjs/typography/stories/typography-anchor.story.js +2 -1
  38. package/lib/cjs/typography/stories/typography-anchor.story.js.map +1 -1
  39. package/lib/cjs/typography/stories/typography-default.story.js +2 -1
  40. package/lib/cjs/typography/stories/typography-default.story.js.map +1 -1
  41. package/lib/cjs/typography/stories/typography-variants.story.js +2 -1
  42. package/lib/cjs/typography/stories/typography-variants.story.js.map +1 -1
  43. package/lib/cjs/wizard/Wizard.js +2 -6
  44. package/lib/cjs/wizard/Wizard.js.map +1 -1
  45. package/lib/esm/accordion/Accordion.js +2 -2
  46. package/lib/esm/accordion/Accordion.js.map +1 -1
  47. package/lib/esm/ai/code-preview/CodePreview.js +3 -1
  48. package/lib/esm/ai/code-preview/CodePreview.js.map +1 -1
  49. package/lib/esm/ai/preview/Preview.js +3 -1
  50. package/lib/esm/ai/preview/Preview.js.map +1 -1
  51. package/lib/esm/ai/thinking/Thinking.js +3 -2
  52. package/lib/esm/ai/thinking/Thinking.js.map +1 -1
  53. package/lib/esm/ai/tool-call/ToolCall.js +2 -2
  54. package/lib/esm/ai/tool-call/ToolCall.js.map +1 -1
  55. package/lib/esm/clipboard-button/ClipboardButton.js +1 -1
  56. package/lib/esm/clipboard-button/ClipboardButton.js.map +1 -1
  57. package/lib/esm/code-block/CodeBlock.js +1 -1
  58. package/lib/esm/code-block/CodeBlock.js.map +1 -1
  59. package/lib/esm/data-grid/Components.js +2 -2
  60. package/lib/esm/data-grid/Components.js.map +1 -1
  61. package/lib/esm/date-picker/DatePicker.js +5 -5
  62. package/lib/esm/date-picker/DatePicker.js.map +1 -1
  63. package/lib/esm/dialog/Dialog.js +1 -1
  64. package/lib/esm/dialog/Dialog.js.map +1 -1
  65. package/lib/esm/dropzone/Dropzone.js +2 -2
  66. package/lib/esm/dropzone/Dropzone.js.map +1 -1
  67. package/lib/esm/inline-edit/InlineEdit.js +1 -1
  68. package/lib/esm/inline-edit/InlineEdit.js.map +1 -1
  69. package/lib/esm/inline-edit/stories/inline-edit-default.story.js +2 -1
  70. package/lib/esm/inline-edit/stories/inline-edit-default.story.js.map +1 -1
  71. package/lib/esm/menu/Menu.js +1 -1
  72. package/lib/esm/menu/Menu.js.map +1 -1
  73. package/lib/esm/side-navigation/SideNavigation.js +1 -1
  74. package/lib/esm/side-navigation/SideNavigation.js.map +1 -1
  75. package/lib/esm/status-label/StatusLabel.js +1 -18
  76. package/lib/esm/status-label/StatusLabel.js.map +1 -1
  77. package/lib/esm/text-input/TextInput.js +1 -1
  78. package/lib/esm/text-input/TextInput.js.map +1 -1
  79. package/lib/esm/typography/stories/index.js +2 -1
  80. package/lib/esm/typography/stories/index.js.map +1 -1
  81. package/lib/esm/typography/stories/typography-anchor.story.js +2 -1
  82. package/lib/esm/typography/stories/typography-anchor.story.js.map +1 -1
  83. package/lib/esm/typography/stories/typography-default.story.js +2 -1
  84. package/lib/esm/typography/stories/typography-default.story.js.map +1 -1
  85. package/lib/esm/typography/stories/typography-variants.story.js +2 -1
  86. package/lib/esm/typography/stories/typography-variants.story.js.map +1 -1
  87. package/lib/esm/wizard/Wizard.js +2 -6
  88. package/lib/esm/wizard/Wizard.js.map +1 -1
  89. package/lib/types/ai/code-preview/CodePreview.d.ts.map +1 -1
  90. package/lib/types/ai/preview/Preview.d.ts.map +1 -1
  91. package/lib/types/ai/thinking/Thinking.d.ts.map +1 -1
  92. package/lib/types/ai/tool-call/ToolCall.d.ts.map +1 -1
  93. package/lib/types/clipboard-button/ClipboardButton.d.ts.map +1 -1
  94. package/lib/types/data-grid/Components.d.ts.map +1 -1
  95. package/lib/types/date-picker/DatePicker.d.ts.map +1 -1
  96. package/lib/types/dropzone/Dropzone.d.ts.map +1 -1
  97. package/lib/types/inline-edit/stories/inline-edit-default.story.d.ts +2 -1
  98. package/lib/types/inline-edit/stories/inline-edit-default.story.d.ts.map +1 -1
  99. package/lib/types/status-label/StatusLabel.d.ts.map +1 -1
  100. package/lib/types/typography/stories/index.d.ts +2 -1
  101. package/lib/types/typography/stories/index.d.ts.map +1 -1
  102. package/lib/types/typography/stories/typography-anchor.story.d.ts.map +1 -1
  103. package/lib/types/typography/stories/typography-default.story.d.ts +2 -1
  104. package/lib/types/typography/stories/typography-default.story.d.ts.map +1 -1
  105. package/lib/types/typography/stories/typography-variants.story.d.ts +2 -1
  106. package/lib/types/typography/stories/typography-variants.story.d.ts.map +1 -1
  107. package/package.json +2 -2
  108. package/skills/ndl-react/SKILL.md +10 -6
  109. package/skills/ndl-react/references/styling.md +93 -67
@@ -1 +1 @@
1
- {"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../src/side-navigation/SideNavigation.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,IAAI,EACJ,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAKvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;A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;IAEtD,IAAI,CAAC,0BAA0B,EAAE,CAAC;QAChC,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,CACL,KAAC,eAAe,IACd,OAAO,EAAE,gBAAgB,EACzB,SAAS,EAAE,OAAO,EAClB,WAAW,EAAC,KAAK,EACjB,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,UAAU,EACpB,YAAY,EAAE;YACZ,IAAI,EAAE;gBACJ,iBAAiB,EAAE;oBACjB,cAAc,EAAE,IAAI;iBACrB;gBACD,SAAS,EAAE,OAAO;aACnB;SACF,YAED,KAAC,OAAO,KAAG,GACK,CACnB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,cAAc,GAAG,MAAM,CAAC,MAAM,CAAC,gBAAgB,EAAE;IACrD,cAAc,EAAE,cAAc;IAC9B,YAAY,EAAE,YAAY;IAC1B,OAAO,EAAE,cAAc;IACvB,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,eAAe;IACzB,OAAO;CACR,CAAC,CAAC;AAEH,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n autoUpdate,\n Composite,\n CompositeItem,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingPortal,\n offset,\n safePolygon,\n shift,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { IconIndicatorWrapper } from '../_common/IconIndicatorWrapper';\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Divider } from '../divider';\nimport PinIcon from '../icons/generated/custom/Pin';\nimport { ChevronRightIconOutline } from '../icons/generated/heroIcons/ChevronRightIconOutline';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport {\n SideNavCategoryContext,\n SideNavContext,\n useSideNavCategoryContext,\n useSideNavContext,\n} from './side-navigation-context';\nimport {\n type CategoryHeaderProps,\n type CategoryItemProps,\n type ItemBadgeProps,\n type NavItemProps,\n type SideNavListItemProps,\n type SideNavProps,\n} from './side-navigation-types';\n\n/**\n * SideNav\n */\nconst SideNavComponent = ({\n children,\n className,\n style,\n htmlAttributes,\n isExpanded = false,\n shouldOverlayOnInteraction = true,\n ariaLabel,\n onPinButtonClick,\n expandedWidth,\n ref,\n ...restProps\n}: CommonProps<'div', SideNavProps>) => {\n const [isHovered, setIsHovered] = useState(false);\n const [hasFocusVisible, setHasFocusVisible] = useState(false);\n const [isCollapseTransitioning, setIsCollapseTransitioning] = useState(false);\n const collapseTransitionTimeoutRef = useRef<ReturnType<\n typeof setTimeout\n > | null>(null);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const isFloatingExpanded =\n shouldOverlayOnInteraction && (!isHovered ? hasFocusVisible : true);\n\n const classes = classNames('ndl-side-nav', 'ndl-side-nav-root', className, {\n 'ndl-side-nav-collapsed':\n isExpanded !== true && shouldOverlayOnInteraction !== true,\n 'ndl-side-nav-expanded': isExpanded,\n });\n\n const innerClasses = classNames('ndl-side-nav-inner', {\n 'ndl-side-nav-collapsing': isCollapseTransitioning,\n 'ndl-side-nav-hover': isFloatingExpanded === true && isExpanded !== true,\n });\n\n const customStyle = {\n ...style,\n ...(Boolean(expandedWidth) && {\n '--side-nav-width-expanded':\n typeof expandedWidth === 'string'\n ? expandedWidth\n : `${expandedWidth}px`,\n }),\n };\n\n const mergedRef = useMergeRefs([ref, rootRef]);\n\n const collapseTransitionDuration = Number.parseInt(\n tokens.motion.duration.quick,\n 10,\n );\n\n useEffect(() => {\n return () => {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n collapseTransitionTimeoutRef.current = null;\n }\n };\n }, []);\n\n return (\n <SideNavContext.Provider\n value={{\n isExpanded,\n isHovered: isFloatingExpanded, // needs refactoring\n onPinButtonClick,\n shouldOverlayOnInteraction,\n }}\n >\n <div\n className={classes}\n ref={mergedRef}\n style={customStyle}\n onMouseEnter={() => {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n collapseTransitionTimeoutRef.current = null;\n }\n setIsCollapseTransitioning(false);\n setIsHovered(true);\n }}\n onMouseLeave={() => {\n const shouldDelayZIndexRemoval =\n shouldOverlayOnInteraction &&\n !isExpanded &&\n (isHovered || hasFocusVisible);\n setIsHovered(false);\n if (shouldDelayZIndexRemoval) {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n }\n setIsCollapseTransitioning(true);\n collapseTransitionTimeoutRef.current = setTimeout(() => {\n collapseTransitionTimeoutRef.current = null;\n setIsCollapseTransitioning(false);\n }, collapseTransitionDuration);\n }\n }}\n onFocusCapture={() => {\n // Delay slightly to let Composite's focus management settle\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n // Check if focus is inside and visible (using :focus-visible on the active element)\n if (\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement) &&\n activeElement.matches(':focus-visible')\n ) {\n // Update state after another frame to let focus fully settle\n // This updates the context for consumers without disrupting focus\n requestAnimationFrame(() => {\n setHasFocusVisible(true);\n });\n }\n });\n }}\n onBlurCapture={() => {\n // Small delay to check if focus moved to another element inside\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n const isInsideNav =\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement);\n // Check if focus is in a portaled floating menu\n const isInsideFloatingMenu =\n activeElement instanceof HTMLElement &&\n activeElement.closest('.ndl-side-nav-popover') !== null;\n\n if (\n (isInsideNav || isInsideFloatingMenu) &&\n activeElement instanceof HTMLElement &&\n activeElement.matches(':focus-visible')\n ) {\n // Focus stayed inside with focus-visible\n setHasFocusVisible(true);\n } else {\n // Focus left - collapse\n setHasFocusVisible(false);\n }\n });\n }}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={innerClasses}>\n {/** TODO v5: should the nav be the one that gets all the stuff spread on it? */}\n <nav className=\"ndl-side-nav-nav\" aria-label={ariaLabel}>\n <Composite\n as=\"ul\"\n aria-label={ariaLabel}\n role=\"menubar\"\n orientation=\"vertical\"\n aria-orientation=\"vertical\"\n className=\"ndl-side-nav-list\"\n loop={true}\n >\n {children}\n </Composite>\n </nav>\n {shouldOverlayOnInteraction === true && (\n <div className=\"ndl-side-nav-footer\">\n <PinButton />\n </div>\n )}\n </div>\n </div>\n </SideNavContext.Provider>\n );\n};\n\n/**\n * SideNavListItem\n */\nconst SideNavListItem = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'li', SideNavListItemProps>) => {\n const classes = classNames('ndl-side-nav-list-item', className, {});\n\n return (\n <li\n role=\"none\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SelectedIndicator />\n {children}\n </li>\n );\n};\n\n/**\n * NavItem\n */\nconst NavItem = <T extends React.ElementType = 'button'>({\n icon,\n label,\n trailingElement,\n isActive,\n className,\n style,\n htmlAttributes,\n as,\n badge,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, NavItemProps>) => {\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const categoryContext = useSideNavCategoryContext();\n const isInCategory = categoryContext !== null;\n\n const item = useListItem();\n const mergedRef = useMergeRefs([item.ref, ref]);\n\n const isActiveIndex = item.index === categoryContext?.activeIndex;\n\n const Component: React.ElementType = as ?? 'button';\n const classes = classNames('ndl-side-nav-nav-item', className, {\n 'ndl-active': isActive === true,\n });\n\n const Wrapper = isInCategory ? Component : CompositeItem;\n const componentProps = {\n className: classes,\n ref: mergedRef,\n role: 'menuitem',\n style: style,\n ...(isInCategory && {\n ...categoryContext?.getItemProps(),\n tabIndex: isActiveIndex ? 0 : -1,\n }),\n ...restProps,\n ...htmlAttributes,\n };\n const wrapperProps = isInCategory\n ? componentProps\n : {\n render: <Component {...componentProps} />,\n };\n\n return (\n <ConditionalWrap\n shouldWrap={\n isExpanded === false &&\n !shouldOverlayOnInteraction &&\n !isInCategory &&\n Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"right\"\n hoverDelay={{ close: 0, open: shouldOverlayOnInteraction ? 100 : 0 }}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>{children}</Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Wrapper {...wrapperProps}>\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n {(Boolean(trailingElement) || Boolean(badge)) && (\n <div className=\"ndl-side-nav-item-trailing-element\">\n {trailingElement}\n {badge !== undefined && (\n <ItemBadge type={badge.type} number={badge.number} />\n )}\n </div>\n )}\n </div>\n </Wrapper>\n </ConditionalWrap>\n );\n};\n\n/**\n * CategoryItem\n */\nconst CategoryItem = ({\n children,\n icon,\n label,\n isActive,\n className,\n style,\n htmlAttributes,\n badge,\n isMenuOpen = false,\n ref,\n ...restProps\n}: CommonProps<'button', CategoryItemProps>) => {\n const floatingId = useId();\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const anchorRef = useRef<HTMLLIElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const elementsRef = useRef<\n Array<HTMLButtonElement | HTMLAnchorElement | null>\n >([]);\n\n const classes = classNames('ndl-side-nav-category-item', className, {\n 'ndl-active': isActive === true,\n });\n\n // Floating UI setup\n const { refs, context } = useFloating({\n elements: {\n reference: anchorRef.current,\n },\n middleware: [\n offset(5),\n flip({ crossAxis: true, fallbackAxisSideDirection: 'end', padding: 5 }),\n shift({ padding: 5 }),\n ],\n onOpenChange: setIsOpen,\n open: isOpen || isMenuOpen,\n placement: 'right-start',\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context, {\n referencePress: false,\n });\n const hover = useHover(context, {\n delay: { close: 130, open: 130 },\n handleClose: safePolygon({\n blockPointerEvents: false,\n requireIntent: false,\n }),\n });\n const focus = useFocus(context);\n const listNavigation = useListNavigation(context, {\n activeIndex: activeIndex,\n focusItemOnHover: false,\n focusItemOnOpen: false,\n listRef: elementsRef,\n loop: true,\n nested: true,\n onNavigate: setActiveIndex,\n openOnArrowKeyDown: false,\n });\n\n // Separate interactions: reference (no listNavigation), floating (with listNavigation)\n const refInteractions = useInteractions([dismiss, hover, focus]);\n const floatInteractions = useInteractions([dismiss, hover, listNavigation]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n // Reset activeIndex when menu closes\n useEffect(() => {\n if (!context.open) {\n setActiveIndex(null);\n }\n }, [context.open]);\n\n const mergedRef = useMergeRefs([refs.setReference, ref]);\n\n return (\n <SideNavCategoryContext.Provider\n value={{\n activeIndex,\n getItemProps: floatInteractions.getItemProps,\n }}\n >\n <ConditionalWrap\n shouldWrap={\n isExpanded === false && !shouldOverlayOnInteraction && Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"top\"\n hoverDelay={{\n close: 0,\n open: shouldOverlayOnInteraction ? 100 : 0,\n }}\n isOpen={isTooltipOpen}\n onOpenChange={setIsTooltipOpen}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content className=\"ndl-side-nav ndl-side-nav-category-menu-tooltip-content\">\n {label}\n </Tooltip.Content>\n </Tooltip>\n )}\n >\n <CompositeItem\n render={\n <button\n type=\"button\"\n {...refInteractions.getReferenceProps({\n className: classes,\n ref: mergedRef,\n style,\n ...restProps,\n ...htmlAttributes,\n })}\n // {...restProps}\n // {...htmlAttributes}\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={context.open}\n aria-controls={floatingId}\n onFocus={(event) => {\n // Only show tooltip on focus-visible (keyboard navigation)\n if (\n event.target instanceof HTMLElement &&\n event.target.matches(':focus-visible')\n ) {\n setIsTooltipOpen(true);\n }\n // Call original handler if exists\n const originalOnFocus = refInteractions.getReferenceProps({})\n .onFocus as\n | ((event: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnFocus?.(event);\n }}\n onBlur={(event) => {\n setIsTooltipOpen(false);\n // Call original handler if exists\n const originalOnBlur = refInteractions.getReferenceProps({})\n .onBlur as\n | ((event: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnBlur?.(event);\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowRight') {\n // open and move focus into submenu\n setIsOpen(true);\n setActiveIndex(0);\n // Defer focusing first item (if needed) to next tick\n requestAnimationFrame(() => {\n const el = elementsRef.current[0];\n el?.focus();\n });\n event.preventDefault();\n }\n // ArrowDown/ArrowUp: let Composite handle top-level roving focus.\n }}\n />\n }\n >\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n <div className=\"ndl-side-nav-item-trailing-element\">\n {badge && <ItemBadge type={badge.type} number={badge.number} />}\n <ChevronRightIconOutline className=\"n-size-4 n-text-neutral-icon\" />\n </div>\n </div>\n {context.open && (\n <FloatingList elementsRef={elementsRef}>\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n returnFocus={true}\n closeOnFocusOut={true}\n guards={true}\n >\n <ul\n id={floatingId}\n ref={refs.setFloating}\n className=\"ndl-side-nav ndl-side-nav-popover ndl-side-nav-popover-list\"\n style={{\n ...context.floatingStyles,\n ...transitionStyles,\n }}\n {...floatInteractions.getFloatingProps()}\n role=\"menu\"\n >\n {children}\n </ul>\n </FloatingFocusManager>\n </FloatingPortal>\n </FloatingList>\n )}\n </CompositeItem>\n </ConditionalWrap>\n </SideNavCategoryContext.Provider>\n );\n};\n\n/**\n * CategoryHeader\n */\nconst CategoryHeader = ({\n children,\n className,\n ref,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'li', CategoryHeaderProps>) => {\n const { isExpanded, isHovered } = useSideNavContext();\n\n const classes = classNames('ndl-side-nav-category-header', className, {\n 'ndl-side-nav-category-header-expanded': isExpanded || isHovered,\n });\n\n return (\n <Typography\n ref={ref}\n variant=\"label\"\n as=\"li\"\n className={classes}\n htmlAttributes={{\n ...htmlAttributes,\n role: 'separator',\n }}\n style={style}\n {...restProps}\n >\n {isExpanded || isHovered ? children : <Divider />}\n </Typography>\n );\n};\n\n/**\n * SelectedIndicator\n */\nconst SelectedIndicator = () => {\n return <div className=\"ndl-side-nav-selected-indicator\" />;\n};\n\n/**\n * SideNavDivider\n */\nconst SideNavDivider = () => {\n return (\n <Divider\n orientation=\"horizontal\"\n className=\"ndl-side-nav-divider\"\n as=\"li\"\n />\n );\n};\n\n/**\n * ItemBadge\n */\nconst ItemBadge = ({\n number,\n type,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', ItemBadgeProps>) => {\n useSideNavContext();\n\n const badgeClasses = classNames('ndl-side-nav-item-badge', className, {\n 'ndl-danger': type === 'danger',\n 'ndl-info': type === 'info',\n 'ndl-warning': type === 'warning',\n });\n\n return (\n <Typography\n as=\"span\"\n className={badgeClasses}\n variant=\"subheading-small\"\n htmlAttributes={{\n 'aria-label': `${number} notifications of type ${type}`,\n ...htmlAttributes,\n }}\n style={style}\n ref={ref}\n {...restProps}\n >\n {number}\n </Typography>\n );\n};\n\n/**\n * PinButton\n */\nconst PinButton = () => {\n const { isExpanded, shouldOverlayOnInteraction, onPinButtonClick } =\n useSideNavContext();\n\n const classes = classNames('ndl-side-nav-pin-button');\n\n if (!shouldOverlayOnInteraction) {\n return null;\n }\n\n return (\n <CleanIconButton\n onClick={onPinButtonClick}\n className={classes}\n description=\"Pin\"\n size=\"medium\"\n isActive={isExpanded}\n tooltipProps={{\n root: {\n autoUpdateOptions: {\n animationFrame: true,\n },\n placement: 'right',\n },\n }}\n >\n <PinIcon />\n </CleanIconButton>\n );\n};\n\nconst SideNavigation = Object.assign(SideNavComponent, {\n CategoryHeader: CategoryHeader,\n CategoryItem: CategoryItem,\n Divider: SideNavDivider,\n ItemBadge: ItemBadge,\n ListItem: SideNavListItem,\n NavItem,\n});\n\nexport { SideNavigation };\n"]}
1
+ {"version":3,"file":"SideNavigation.js","sourceRoot":"","sources":["../../../src/side-navigation/SideNavigation.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EACL,UAAU,EACV,SAAS,EACT,aAAa,EACb,IAAI,EACJ,oBAAoB,EACpB,YAAY,EACZ,cAAc,EACd,MAAM,EACN,WAAW,EACX,KAAK,EACL,UAAU,EACV,WAAW,EACX,QAAQ,EACR,QAAQ,EACR,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,YAAY,EACZ,mBAAmB,GACpB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,UAAU,MAAM,YAAY,CAAC;AAEpC,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAE3D,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAKvE,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,OAAO,MAAM,+BAA+B,CAAC;AACpD,OAAO,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AAC/F,OAAO,EAAE,OAAO,EAAE,MAAM,YAAY,CAAC;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,yBAAyB,EACzB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AAUnC;;GAEG;AACH,MAAM,gBAAgB,GAAG,CAAC,EAYS,EAAE,EAAE;QAZb,EACxB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,cAAc,EACd,UAAU,GAAG,KAAK,EAClB,0BAA0B,GAAG,IAAI,EACjC,SA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,SAAS,EAAE,SAAS;IACpB,QAAQ,EAAE,eAAe;IACzB,OAAO;CACR,CAAC,CAAC;AAEH,OAAO,EAAE,cAAc,EAAE,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport {\n autoUpdate,\n Composite,\n CompositeItem,\n flip,\n FloatingFocusManager,\n FloatingList,\n FloatingPortal,\n offset,\n safePolygon,\n shift,\n useDismiss,\n useFloating,\n useFocus,\n useHover,\n useInteractions,\n useListItem,\n useListNavigation,\n useMergeRefs,\n useTransitionStyles,\n} from '@floating-ui/react';\nimport { tokens } from '@neo4j-ndl/base';\nimport classNames from 'classnames';\nimport type React from 'react';\nimport { useEffect, useId, useRef, useState } from 'react';\n\nimport { IconIndicatorWrapper } from '../_common/IconIndicatorWrapper';\nimport {\n type CommonProps,\n type PolymorphicCommonProps,\n} from '../_common/types';\nimport { CleanIconButton } from '../clean-icon-button';\nimport { ConditionalWrap } from '../conditional-wrap';\nimport { Divider } from '../divider';\nimport PinIcon from '../icons/generated/custom/Pin';\nimport { ChevronRightIconOutline } from '../icons/generated/heroIcons/ChevronRightIconOutline';\nimport { Tooltip } from '../tooltip';\nimport { Typography } from '../typography';\nimport {\n SideNavCategoryContext,\n SideNavContext,\n useSideNavCategoryContext,\n useSideNavContext,\n} from './side-navigation-context';\nimport {\n type CategoryHeaderProps,\n type CategoryItemProps,\n type ItemBadgeProps,\n type NavItemProps,\n type SideNavListItemProps,\n type SideNavProps,\n} from './side-navigation-types';\n\n/**\n * SideNav\n */\nconst SideNavComponent = ({\n children,\n className,\n style,\n htmlAttributes,\n isExpanded = false,\n shouldOverlayOnInteraction = true,\n ariaLabel,\n onPinButtonClick,\n expandedWidth,\n ref,\n ...restProps\n}: CommonProps<'div', SideNavProps>) => {\n const [isHovered, setIsHovered] = useState(false);\n const [hasFocusVisible, setHasFocusVisible] = useState(false);\n const [isCollapseTransitioning, setIsCollapseTransitioning] = useState(false);\n const collapseTransitionTimeoutRef = useRef<ReturnType<\n typeof setTimeout\n > | null>(null);\n\n const rootRef = useRef<HTMLDivElement>(null);\n\n const isFloatingExpanded =\n shouldOverlayOnInteraction && (!isHovered ? hasFocusVisible : true);\n\n const classes = classNames('ndl-side-nav', 'ndl-side-nav-root', className, {\n 'ndl-side-nav-collapsed':\n isExpanded !== true && shouldOverlayOnInteraction !== true,\n 'ndl-side-nav-expanded': isExpanded,\n });\n\n const innerClasses = classNames('ndl-side-nav-inner', {\n 'ndl-side-nav-collapsing': isCollapseTransitioning,\n 'ndl-side-nav-hover': isFloatingExpanded === true && isExpanded !== true,\n });\n\n const customStyle = {\n ...style,\n ...(Boolean(expandedWidth) && {\n '--side-nav-width-expanded':\n typeof expandedWidth === 'string'\n ? expandedWidth\n : `${expandedWidth}px`,\n }),\n };\n\n const mergedRef = useMergeRefs([ref, rootRef]);\n\n const collapseTransitionDuration = Number.parseInt(\n tokens.motion.duration.quick,\n 10,\n );\n\n useEffect(() => {\n return () => {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n collapseTransitionTimeoutRef.current = null;\n }\n };\n }, []);\n\n return (\n <SideNavContext.Provider\n value={{\n isExpanded,\n isHovered: isFloatingExpanded, // needs refactoring\n onPinButtonClick,\n shouldOverlayOnInteraction,\n }}\n >\n <div\n className={classes}\n ref={mergedRef}\n style={customStyle}\n onMouseEnter={() => {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n collapseTransitionTimeoutRef.current = null;\n }\n setIsCollapseTransitioning(false);\n setIsHovered(true);\n }}\n onMouseLeave={() => {\n const shouldDelayZIndexRemoval =\n shouldOverlayOnInteraction &&\n !isExpanded &&\n (isHovered || hasFocusVisible);\n setIsHovered(false);\n if (shouldDelayZIndexRemoval) {\n if (collapseTransitionTimeoutRef.current !== null) {\n clearTimeout(collapseTransitionTimeoutRef.current);\n }\n setIsCollapseTransitioning(true);\n collapseTransitionTimeoutRef.current = setTimeout(() => {\n collapseTransitionTimeoutRef.current = null;\n setIsCollapseTransitioning(false);\n }, collapseTransitionDuration);\n }\n }}\n onFocusCapture={() => {\n // Delay slightly to let Composite's focus management settle\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n // Check if focus is inside and visible (using :focus-visible on the active element)\n if (\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement) &&\n activeElement.matches(':focus-visible')\n ) {\n // Update state after another frame to let focus fully settle\n // This updates the context for consumers without disrupting focus\n requestAnimationFrame(() => {\n setHasFocusVisible(true);\n });\n }\n });\n }}\n onBlurCapture={() => {\n // Small delay to check if focus moved to another element inside\n requestAnimationFrame(() => {\n const activeElement = document.activeElement;\n const isInsideNav =\n activeElement instanceof HTMLElement &&\n rootRef.current !== null &&\n rootRef.current.contains(activeElement);\n // Check if focus is in a portaled floating menu\n const isInsideFloatingMenu =\n activeElement instanceof HTMLElement &&\n activeElement.closest('.ndl-side-nav-popover') !== null;\n\n if (\n (isInsideNav || isInsideFloatingMenu) &&\n activeElement instanceof HTMLElement &&\n activeElement.matches(':focus-visible')\n ) {\n // Focus stayed inside with focus-visible\n setHasFocusVisible(true);\n } else {\n // Focus left - collapse\n setHasFocusVisible(false);\n }\n });\n }}\n {...restProps}\n {...htmlAttributes}\n >\n <div className={innerClasses}>\n {/** TODO v5: should the nav be the one that gets all the stuff spread on it? */}\n <nav className=\"ndl-side-nav-nav\" aria-label={ariaLabel}>\n <Composite\n as=\"ul\"\n aria-label={ariaLabel}\n role=\"menubar\"\n orientation=\"vertical\"\n aria-orientation=\"vertical\"\n className=\"ndl-side-nav-list\"\n loop={true}\n >\n {children}\n </Composite>\n </nav>\n {shouldOverlayOnInteraction === true && (\n <div className=\"ndl-side-nav-footer\">\n <PinButton />\n </div>\n )}\n </div>\n </div>\n </SideNavContext.Provider>\n );\n};\n\n/**\n * SideNavListItem\n */\nconst SideNavListItem = ({\n children,\n className,\n style,\n htmlAttributes,\n ref,\n ...restProps\n}: CommonProps<'li', SideNavListItemProps>) => {\n const classes = classNames('ndl-side-nav-list-item', className, {});\n\n return (\n <li\n role=\"none\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <SelectedIndicator />\n {children}\n </li>\n );\n};\n\n/**\n * NavItem\n */\nconst NavItem = <T extends React.ElementType = 'button'>({\n icon,\n label,\n trailingElement,\n isActive,\n className,\n style,\n htmlAttributes,\n as,\n badge,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, NavItemProps>) => {\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const categoryContext = useSideNavCategoryContext();\n const isInCategory = categoryContext !== null;\n\n const item = useListItem();\n const mergedRef = useMergeRefs([item.ref, ref]);\n\n const isActiveIndex = item.index === categoryContext?.activeIndex;\n\n const Component: React.ElementType = as ?? 'button';\n const classes = classNames('ndl-side-nav-nav-item', className, {\n 'ndl-active': isActive === true,\n });\n\n const Wrapper = isInCategory ? Component : CompositeItem;\n const componentProps = {\n className: classes,\n ref: mergedRef,\n role: 'menuitem',\n style: style,\n ...(isInCategory && {\n ...categoryContext?.getItemProps(),\n tabIndex: isActiveIndex ? 0 : -1,\n }),\n ...restProps,\n ...htmlAttributes,\n };\n const wrapperProps = isInCategory\n ? componentProps\n : {\n render: <Component {...componentProps} />,\n };\n\n return (\n <ConditionalWrap\n shouldWrap={\n isExpanded === false &&\n !shouldOverlayOnInteraction &&\n !isInCategory &&\n Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"right\"\n hoverDelay={{ close: 0, open: shouldOverlayOnInteraction ? 100 : 0 }}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>{children}</Tooltip.Trigger>\n <Tooltip.Content>{label}</Tooltip.Content>\n </Tooltip>\n )}\n >\n <Wrapper {...wrapperProps}>\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n {(Boolean(trailingElement) || Boolean(badge)) && (\n <div className=\"ndl-side-nav-item-trailing-element\">\n {trailingElement}\n {badge !== undefined && (\n <ItemBadge type={badge.type} number={badge.number} />\n )}\n </div>\n )}\n </div>\n </Wrapper>\n </ConditionalWrap>\n );\n};\n\n/**\n * CategoryItem\n */\nconst CategoryItem = ({\n children,\n icon,\n label,\n isActive,\n className,\n style,\n htmlAttributes,\n badge,\n isMenuOpen = false,\n ref,\n ...restProps\n}: CommonProps<'button', CategoryItemProps>) => {\n const floatingId = useId();\n const { isExpanded, isHovered, shouldOverlayOnInteraction } =\n useSideNavContext();\n const anchorRef = useRef<HTMLLIElement>(null);\n const [isOpen, setIsOpen] = useState(false);\n const [activeIndex, setActiveIndex] = useState<number | null>(null);\n const [isTooltipOpen, setIsTooltipOpen] = useState(false);\n const elementsRef = useRef<\n Array<HTMLButtonElement | HTMLAnchorElement | null>\n >([]);\n\n const classes = classNames('ndl-side-nav-category-item', className, {\n 'ndl-active': isActive === true,\n });\n\n // Floating UI setup\n const { refs, context } = useFloating({\n elements: {\n reference: anchorRef.current,\n },\n middleware: [\n offset(5),\n flip({ crossAxis: true, fallbackAxisSideDirection: 'end', padding: 5 }),\n shift({ padding: 5 }),\n ],\n onOpenChange: setIsOpen,\n open: isOpen || isMenuOpen,\n placement: 'right-start',\n strategy: 'fixed',\n whileElementsMounted: autoUpdate,\n });\n\n const dismiss = useDismiss(context, {\n referencePress: false,\n });\n const hover = useHover(context, {\n delay: { close: 130, open: 130 },\n handleClose: safePolygon({\n blockPointerEvents: false,\n requireIntent: false,\n }),\n });\n const focus = useFocus(context);\n const listNavigation = useListNavigation(context, {\n activeIndex: activeIndex,\n focusItemOnHover: false,\n focusItemOnOpen: false,\n listRef: elementsRef,\n loop: true,\n nested: true,\n onNavigate: setActiveIndex,\n openOnArrowKeyDown: false,\n });\n\n // Separate interactions: reference (no listNavigation), floating (with listNavigation)\n const refInteractions = useInteractions([dismiss, hover, focus]);\n const floatInteractions = useInteractions([dismiss, hover, listNavigation]);\n const { styles: transitionStyles } = useTransitionStyles(context, {\n duration: Number.parseInt(tokens.motion.duration.quick) ?? 0,\n });\n\n // Reset activeIndex when menu closes\n useEffect(() => {\n if (!context.open) {\n setActiveIndex(null);\n }\n }, [context.open]);\n\n const mergedRef = useMergeRefs([refs.setReference, ref]);\n\n return (\n <SideNavCategoryContext.Provider\n value={{\n activeIndex,\n getItemProps: floatInteractions.getItemProps,\n }}\n >\n <ConditionalWrap\n shouldWrap={\n isExpanded === false && !shouldOverlayOnInteraction && Boolean(label)\n }\n wrap={(children) => (\n <Tooltip\n type=\"simple\"\n placement=\"top\"\n hoverDelay={{\n close: 0,\n open: shouldOverlayOnInteraction ? 100 : 0,\n }}\n isOpen={isTooltipOpen}\n onOpenChange={setIsTooltipOpen}\n >\n <Tooltip.Trigger hasButtonWrapper={true}>\n {children}\n </Tooltip.Trigger>\n <Tooltip.Content className=\"ndl-side-nav ndl-side-nav-category-menu-tooltip-content\">\n {label}\n </Tooltip.Content>\n </Tooltip>\n )}\n >\n <CompositeItem\n render={\n <button\n type=\"button\"\n {...refInteractions.getReferenceProps({\n className: classes,\n ref: mergedRef,\n style,\n ...restProps,\n ...htmlAttributes,\n })}\n // {...restProps}\n // {...htmlAttributes}\n role=\"menuitem\"\n aria-haspopup=\"menu\"\n aria-expanded={context.open}\n aria-controls={floatingId}\n onFocus={(event) => {\n // Only show tooltip on focus-visible (keyboard navigation)\n if (\n event.target instanceof HTMLElement &&\n event.target.matches(':focus-visible')\n ) {\n setIsTooltipOpen(true);\n }\n // Call original handler if exists\n const originalOnFocus = refInteractions.getReferenceProps({})\n .onFocus as\n | ((event: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnFocus?.(event);\n }}\n onBlur={(event) => {\n setIsTooltipOpen(false);\n // Call original handler if exists\n const originalOnBlur = refInteractions.getReferenceProps({})\n .onBlur as\n | ((event: React.FocusEvent<HTMLButtonElement>) => void)\n | undefined;\n originalOnBlur?.(event);\n }}\n onKeyDown={(event) => {\n if (event.key === 'ArrowRight') {\n // open and move focus into submenu\n setIsOpen(true);\n setActiveIndex(0);\n // Defer focusing first item (if needed) to next tick\n requestAnimationFrame(() => {\n const el = elementsRef.current[0];\n el?.focus();\n });\n event.preventDefault();\n }\n // ArrowDown/ArrowUp: let Composite handle top-level roving focus.\n }}\n />\n }\n >\n <div className=\"ndl-side-nav-item-inner\">\n {Boolean(icon) && (\n <div className=\"ndl-side-nav-item-leading-element\">\n <ConditionalWrap\n shouldWrap={Boolean(badge) && !isHovered && !isExpanded}\n wrap={(children) => (\n <IconIndicatorWrapper type={badge?.type ?? 'info'}>\n {children}\n </IconIndicatorWrapper>\n )}\n >\n {icon}\n </ConditionalWrap>\n </div>\n )}\n {Boolean(label) && (\n <Typography\n variant=\"body-medium\"\n as=\"div\"\n className=\"ndl-side-nav-item-label\"\n >\n {label}\n </Typography>\n )}\n <div className=\"ndl-side-nav-item-trailing-element\">\n {badge && <ItemBadge type={badge.type} number={badge.number} />}\n <ChevronRightIconOutline className=\"ndl-side-nav-item-chevron\" />\n </div>\n </div>\n {context.open && (\n <FloatingList elementsRef={elementsRef}>\n <FloatingPortal>\n <FloatingFocusManager\n context={context}\n modal={false}\n initialFocus={-1}\n returnFocus={true}\n closeOnFocusOut={true}\n guards={true}\n >\n <ul\n id={floatingId}\n ref={refs.setFloating}\n className=\"ndl-side-nav ndl-side-nav-popover ndl-side-nav-popover-list\"\n style={{\n ...context.floatingStyles,\n ...transitionStyles,\n }}\n {...floatInteractions.getFloatingProps()}\n role=\"menu\"\n >\n {children}\n </ul>\n </FloatingFocusManager>\n </FloatingPortal>\n </FloatingList>\n )}\n </CompositeItem>\n </ConditionalWrap>\n </SideNavCategoryContext.Provider>\n );\n};\n\n/**\n * CategoryHeader\n */\nconst CategoryHeader = ({\n children,\n className,\n ref,\n style,\n htmlAttributes,\n ...restProps\n}: CommonProps<'li', CategoryHeaderProps>) => {\n const { isExpanded, isHovered } = useSideNavContext();\n\n const classes = classNames('ndl-side-nav-category-header', className, {\n 'ndl-side-nav-category-header-expanded': isExpanded || isHovered,\n });\n\n return (\n <Typography\n ref={ref}\n variant=\"label\"\n as=\"li\"\n className={classes}\n htmlAttributes={{\n ...htmlAttributes,\n role: 'separator',\n }}\n style={style}\n {...restProps}\n >\n {isExpanded || isHovered ? children : <Divider />}\n </Typography>\n );\n};\n\n/**\n * SelectedIndicator\n */\nconst SelectedIndicator = () => {\n return <div className=\"ndl-side-nav-selected-indicator\" />;\n};\n\n/**\n * SideNavDivider\n */\nconst SideNavDivider = () => {\n return (\n <Divider\n orientation=\"horizontal\"\n className=\"ndl-side-nav-divider\"\n as=\"li\"\n />\n );\n};\n\n/**\n * ItemBadge\n */\nconst ItemBadge = ({\n number,\n type,\n ref,\n htmlAttributes,\n style,\n className,\n ...restProps\n}: CommonProps<'span', ItemBadgeProps>) => {\n useSideNavContext();\n\n const badgeClasses = classNames('ndl-side-nav-item-badge', className, {\n 'ndl-danger': type === 'danger',\n 'ndl-info': type === 'info',\n 'ndl-warning': type === 'warning',\n });\n\n return (\n <Typography\n as=\"span\"\n className={badgeClasses}\n variant=\"subheading-small\"\n htmlAttributes={{\n 'aria-label': `${number} notifications of type ${type}`,\n ...htmlAttributes,\n }}\n style={style}\n ref={ref}\n {...restProps}\n >\n {number}\n </Typography>\n );\n};\n\n/**\n * PinButton\n */\nconst PinButton = () => {\n const { isExpanded, shouldOverlayOnInteraction, onPinButtonClick } =\n useSideNavContext();\n\n const classes = classNames('ndl-side-nav-pin-button');\n\n if (!shouldOverlayOnInteraction) {\n return null;\n }\n\n return (\n <CleanIconButton\n onClick={onPinButtonClick}\n className={classes}\n description=\"Pin\"\n size=\"medium\"\n isActive={isExpanded}\n tooltipProps={{\n root: {\n autoUpdateOptions: {\n animationFrame: true,\n },\n placement: 'right',\n },\n }}\n >\n <PinIcon />\n </CleanIconButton>\n );\n};\n\nconst SideNavigation = Object.assign(SideNavComponent, {\n CategoryHeader: CategoryHeader,\n CategoryItem: CategoryItem,\n Divider: SideNavDivider,\n ItemBadge: ItemBadge,\n ListItem: SideNavListItem,\n NavItem,\n});\n\nexport { SideNavigation };\n"]}
@@ -46,7 +46,6 @@ const StatusLabelVariants = [
46
46
  const StatusLabelFill = ['filled', 'outlined', 'semi-filled', 'clean'];
47
47
  export const StatusLabel = (_a) => {
48
48
  var { as, variant = 'default', children, className, style, fill = 'filled', hasIcon = false, htmlAttributes, size = 'large', ref } = _a, restProps = __rest(_a, ["as", "variant", "children", "className", "style", "fill", "hasIcon", "htmlAttributes", "size", "ref"]);
49
- let baseClasses;
50
49
  let icon;
51
50
  // Clean Status label without icon is not allowed
52
51
  if (!hasIcon && fill === 'clean') {
@@ -93,23 +92,7 @@ export const StatusLabel = (_a) => {
93
92
  icon = _jsx(CircleIcon, { htmlAttributes: { color: fillColor } });
94
93
  }
95
94
  }
96
- if (mappedColor === 'default') {
97
- baseClasses = classNames({
98
- [`n-bg-neutral-bg-default n-text-neutral-text-weak n-border-neutral-border-strong`]: fill === 'semi-filled',
99
- [`n-bg-neutral-bg-strongest n-text-neutral-text-inverse`]: fill === 'filled',
100
- [`n-text-neutral-text-weak n-border-neutral-border-strong`]: fill === 'outlined',
101
- [`n-text-neutral-text-weaker`]: fill === 'clean',
102
- });
103
- }
104
- else {
105
- baseClasses = classNames({
106
- [`n-bg-${mappedColor}-bg-strong n-text-neutral-text-inverse`]: fill === 'filled',
107
- [`n-text-${mappedColor}-text n-border-${mappedColor}-border-strong`]: fill === 'outlined',
108
- [`n-bg-${mappedColor}-bg-weak n-text-${mappedColor}-text n-border-${mappedColor}-border-weak`]: fill === 'semi-filled',
109
- [`n-text-neutral-text-default`]: fill === 'clean',
110
- });
111
- }
112
- const classes = classNames('ndl-status-label', baseClasses, className, {
95
+ const classes = classNames('ndl-status-label', `ndl-status-label-${variant}`, className, {
113
96
  'ndl-clean': fill === 'clean',
114
97
  'ndl-filled': fill === 'filled',
115
98
  'ndl-large': size === 'large',
@@ -1 +1 @@
1
- {"version":3,"file":"StatusLabel.js","sourceRoot":"","sources":["../../../src/status-label/StatusLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAC5D,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,YAAY,MAAM,oCAAoC,CAAC;AA8B9D,MAAM,mBAAmB,GAAG;IAC1B,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;CACH,CAAC;AAEX,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AAEhF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAuC,EAYX,EAAE,EAAE;QAZO,EAChE,EAAE,EACF,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,SAAS,EACT,KAA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mBAAmB,WAAW,kBAAkB,WAAW,cAAc,CAAC,EAC5F,IAAI,KAAK,aAAa;YACxB,CAAC,6BAA6B,CAAC,EAAE,IAAI,KAAK,OAAO;SAClD,CAAC,CAAC;IACL,CAAC;IAED,MAAM,OAAO,GAAG,UAAU,CAAC,kBAAkB,EAAE,WAAW,EAAE,SAAS,EAAE;QACrE,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,YAAY,EAAE,IAAI,KAAK,QAAQ;QAC/B,WAAW,EAAE,IAAI,KAAK,OAAO;QAC7B,cAAc,EAAE,IAAI,KAAK,UAAU;QACnC,iBAAiB,EAAE,IAAI,KAAK,aAAa;QACzC,WAAW,EAAE,IAAI,KAAK,OAAO;KAC9B,CAAC,CAAC;IAEH,MAAM,SAAS,GAAsB,EAAE,aAAF,EAAE,cAAF,EAAE,GAAI,MAAM,CAAC;IAElD,OAAO,CACL,KAAC,SAAS,kBACR,IAAI,EAAC,QAAQ,EACb,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,GAAG,IACJ,SAAS,EACT,cAAc,cAElB,eAAK,SAAS,EAAC,0BAA0B,aACtC,IAAI,EACL;oBACE,gEAAgE;oBAChE,KAAK,EAAE,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,EAC/D,SAAS,EAAC,uBAAuB,YAEhC,QAAQ,GACJ,IACH,IACI,CACb,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport CircleIcon from '../icons/generated/custom/Circle';\nimport RhombusIcon from '../icons/generated/custom/Rhombus';\nimport SquareIcon from '../icons/generated/custom/Square';\nimport TriangleIcon from '../icons/generated/custom/Triangle';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype EventTypeStatusLabelProps = {\n /** Additional Classnames */\n className?: string;\n\n /** The content displayed inside the status label */\n children: React.ReactNode;\n\n /** Color of the status label that indicates its purpose. */\n variant?: (typeof StatusLabelVariants)[number];\n\n /** Fill type of status label, determines the background and border styles. */\n fill?: (typeof StatusLabelFill)[number];\n\n /** Whether the status label have an icon */\n hasIcon?: boolean;\n\n /** Size of the status label */\n size?: 'small' | 'large';\n};\n\nconst StatusLabelVariants = [\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'default',\n 'discovery',\n] as const;\n\nconst StatusLabelFill = ['filled', 'outlined', 'semi-filled', 'clean'] as const;\n\nexport const StatusLabel = <T extends React.ElementType = 'span'>({\n as,\n variant = 'default',\n children,\n className,\n style,\n fill = 'filled',\n hasIcon = false,\n htmlAttributes,\n size = 'large',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, EventTypeStatusLabelProps>) => {\n let baseClasses: string;\n let icon: React.ReactNode | null;\n\n // Clean Status label without icon is not allowed\n if (!hasIcon && fill === 'clean') {\n console.error('Clean StatusLabel has to have an icon');\n }\n\n // All colors map to the light-theme palette except the info\n const mappedColor = variant === 'info' ? 'primary' : variant;\n\n if (hasIcon) {\n const isFilled = fill === 'filled';\n if (mappedColor === 'default') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-neutral-bg-status)';\n icon = <SquareIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'primary') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-primary-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'success') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-success-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'danger') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-danger-bg-status)';\n icon = <RhombusIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'warning') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-warning-bg-status)';\n icon = <TriangleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'discovery') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-discovery-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n }\n }\n\n if (mappedColor === 'default') {\n baseClasses = classNames({\n [`n-bg-neutral-bg-default n-text-neutral-text-weak n-border-neutral-border-strong`]:\n fill === 'semi-filled',\n [`n-bg-neutral-bg-strongest n-text-neutral-text-inverse`]:\n fill === 'filled',\n [`n-text-neutral-text-weak n-border-neutral-border-strong`]:\n fill === 'outlined',\n [`n-text-neutral-text-weaker`]: fill === 'clean',\n });\n } else {\n baseClasses = classNames({\n [`n-bg-${mappedColor}-bg-strong n-text-neutral-text-inverse`]:\n fill === 'filled',\n [`n-text-${mappedColor}-text n-border-${mappedColor}-border-strong`]:\n fill === 'outlined',\n [`n-bg-${mappedColor}-bg-weak n-text-${mappedColor}-text n-border-${mappedColor}-border-weak`]:\n fill === 'semi-filled',\n [`n-text-neutral-text-default`]: fill === 'clean',\n });\n }\n\n const classes = classNames('ndl-status-label', baseClasses, className, {\n 'ndl-clean': fill === 'clean',\n 'ndl-filled': fill === 'filled',\n 'ndl-large': size === 'large',\n 'ndl-outlined': fill === 'outlined',\n 'ndl-semi-filled': fill === 'semi-filled',\n 'ndl-small': size === 'small',\n });\n\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Component\n role=\"status\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-status-label-content\">\n {icon}\n <span\n // To enable native tooltip on hover if the children is a string\n title={typeof children === 'string' ? children : 'status label'}\n className=\"ndl-status-label-text\"\n >\n {children}\n </span>\n </div>\n </Component>\n );\n};\n"]}
1
+ {"version":3,"file":"StatusLabel.js","sourceRoot":"","sources":["../../../src/status-label/StatusLabel.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,UAAU,MAAM,YAAY,CAAC;AAIpC,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,WAAW,MAAM,mCAAmC,CAAC;AAC5D,OAAO,UAAU,MAAM,kCAAkC,CAAC;AAC1D,OAAO,YAAY,MAAM,oCAAoC,CAAC;AA8B9D,MAAM,mBAAmB,GAAG;IAC1B,MAAM;IACN,SAAS;IACT,SAAS;IACT,QAAQ;IACR,SAAS;IACT,WAAW;CACH,CAAC;AAEX,MAAM,eAAe,GAAG,CAAC,QAAQ,EAAE,UAAU,EAAE,aAAa,EAAE,OAAO,CAAU,CAAC;AAEhF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAuC,EAYX,EAAE,EAAE;QAZO,EAChE,EAAE,EACF,OAAO,GAAG,SAAS,EACnB,QAAQ,EACR,SAAS,EACT,KAAK,EACL,IAAI,GAAG,QAAQ,EACf,OAAO,GAAG,KAAK,EACf,cAAc,EACd,IAAI,GAAG,OAAO,EACd,GAAG,OAEkD,EADlD,SAAS,cAXoD,uGAYjE,CADa;IAEZ,IAAI,IAA4B,CAAC;IAEjC,iDAAiD;IACjD,IAAI,CAAC,OAAO,IAAI,IAAI,KAAK,OAAO,EAAE,CAAC;QACjC,OAAO,CAAC,KAAK,CAAC,uCAAuC,CAAC,CAAC;IACzD,CAAC;IAED,4DAA4D;IAC5D,MAAM,WAAW,GAAG,OAAO,KAAK,MAAM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neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport type React from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport CircleIcon from '../icons/generated/custom/Circle';\nimport RhombusIcon from '../icons/generated/custom/Rhombus';\nimport SquareIcon from '../icons/generated/custom/Square';\nimport TriangleIcon from '../icons/generated/custom/Triangle';\n\n/**\n *\n *\n * Types\n *\n *\n */\n\ntype EventTypeStatusLabelProps = {\n /** Additional Classnames */\n className?: string;\n\n /** The content displayed inside the status label */\n children: React.ReactNode;\n\n /** Color of the status label that indicates its purpose. */\n variant?: (typeof StatusLabelVariants)[number];\n\n /** Fill type of status label, determines the background and border styles. */\n fill?: (typeof StatusLabelFill)[number];\n\n /** Whether the status label have an icon */\n hasIcon?: boolean;\n\n /** Size of the status label */\n size?: 'small' | 'large';\n};\n\nconst StatusLabelVariants = [\n 'info',\n 'success',\n 'warning',\n 'danger',\n 'default',\n 'discovery',\n] as const;\n\nconst StatusLabelFill = ['filled', 'outlined', 'semi-filled', 'clean'] as const;\n\nexport const StatusLabel = <T extends React.ElementType = 'span'>({\n as,\n variant = 'default',\n children,\n className,\n style,\n fill = 'filled',\n hasIcon = false,\n htmlAttributes,\n size = 'large',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, EventTypeStatusLabelProps>) => {\n let icon: React.ReactNode | null;\n\n // Clean Status label without icon is not allowed\n if (!hasIcon && fill === 'clean') {\n console.error('Clean StatusLabel has to have an icon');\n }\n\n // All colors map to the light-theme palette except the info\n const mappedColor = variant === 'info' ? 'primary' : variant;\n\n if (hasIcon) {\n const isFilled = fill === 'filled';\n if (mappedColor === 'default') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-neutral-bg-status)';\n icon = <SquareIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'primary') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-primary-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'success') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-success-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'danger') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-danger-bg-status)';\n icon = <RhombusIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'warning') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-warning-bg-status)';\n icon = <TriangleIcon htmlAttributes={{ color: fillColor }} />;\n } else if (mappedColor === 'discovery') {\n const fillColor = isFilled\n ? 'currentColor'\n : 'var(--theme-color-discovery-bg-status)';\n icon = <CircleIcon htmlAttributes={{ color: fillColor }} />;\n }\n }\n\n const classes = classNames(\n 'ndl-status-label',\n `ndl-status-label-${variant}`,\n className,\n {\n 'ndl-clean': fill === 'clean',\n 'ndl-filled': fill === 'filled',\n 'ndl-large': size === 'large',\n 'ndl-outlined': fill === 'outlined',\n 'ndl-semi-filled': fill === 'semi-filled',\n 'ndl-small': size === 'small',\n },\n );\n\n const Component: React.ElementType = as ?? 'span';\n\n return (\n <Component\n role=\"status\"\n className={classes}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-status-label-content\">\n {icon}\n <span\n // To enable native tooltip on hover if the children is a string\n title={typeof children === 'string' ? children : 'status label'}\n className=\"ndl-status-label-text\"\n >\n {children}\n </span>\n </div>\n </Component>\n );\n};\n"]}
@@ -112,7 +112,7 @@ export const TextInput = (_a) => {
112
112
  handleChange === null || handleChange === void 0 ? void 0 : handleChange({
113
113
  target: { value: '' },
114
114
  });
115
- }, children: _jsx(XMarkIconOutline, { className: "n-size-4" }) }) }))] }), trailingElement && (_jsx("div", { className: "ndl-element-trailing ndl-element", children: isLoading && !leadingElement ? (_jsx(LoadingSpinner, { size: size === 'large' ? 'medium' : 'small', className: size === 'large'
115
+ }, children: _jsx(XMarkIconOutline, {}) }) }))] }), trailingElement && (_jsx("div", { className: "ndl-element-trailing ndl-element", children: isLoading && !leadingElement ? (_jsx(LoadingSpinner, { size: size === 'large' ? 'medium' : 'small', className: size === 'large'
116
116
  ? 'ndl-medium-spinner'
117
117
  : 'ndl-small-spinner' })) : (trailingElement) }))] }) }))] }), _jsx(FormFieldMessage, { field: field, size: size, wrap: (content) => (_jsx(Skeleton, Object.assign({ onBackground: "weak", shape: "rectangular" }, skeletonProps, { isLoading: isSkeletonLoading, children: content }))) })] }));
118
118
  };
@@ -1 +1 @@
1
- {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,EAIL,KAAK,EACL,OAAO,GACR,MAAM,OAAO,CAAC;AAEf,OAAO,EACL,cAAc,EACd,gBAAgB,EAChB,YAAY,GACb,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,uCAAuC,EAAE,MAAM,qBAAqB,CAAC;AAE9E,OAAO,EAAE,sBAAsB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,+CAA+C,CAAC;AACjF,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAqFvC;;;;;;GAMG;AAEH,MAAM,CAAC,MAAM,SAA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CAAC,CAAC,CACF,eAAe,CAChB,GACG,CACP,IACG,IACG,IACL,EAER,KAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CACjB,KAAC,QAAQ,kBACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,IACf,aAAa,IACjB,SAAS,EAAE,iBAAiB,YAE3B,OAAO,IACC,CACZ,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\nimport {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: inconsistent naming. The same switch is `hasRequiredIndicator` on\n // Combobox and on the internal form control this maps onto, and `isOptional`\n // on TextArea. The name also needs the disable below, which a name using one\n // of the allowed boolean prefixes would not.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n // TODO v5: inconsistent naming. Every form control names itself differently:\n // the label is optional here and a design with no room for it reaches for\n // htmlAttributes['aria-label'], TextArea, Select, Checkbox, Radio and Switch\n // expose an `ariaLabel` prop instead, and Combobox requires the label and\n // clips it with `hasVisuallyHiddenLabel`.\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const canClear = isClearable && isDisabled !== true;\n const shouldRenderHint = canClear || isLoading;\n const { field, controlProps } = useFormField({\n errorText,\n // The clear/loading hint describes the input alongside the message.\n extraDescribedByIds: [shouldRenderHint && hintId],\n hasRequiredIndicator: showRequiredOrOptionalLabel,\n helpText,\n isRequired,\n label,\n });\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-input-label', {\n 'ndl-fluid': isFluid,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (canClear && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <FormFieldLabel\n field={field}\n size={size}\n association=\"implicit\"\n moreInformationText={moreInformationText}\n tooltipProps={tooltipProps}\n wrap={(row) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {row}\n </Skeleton>\n )}\n />\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n {...controlProps}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {canClear && 'Press Escape to clear input.'}\n </span>\n )}\n {canClear && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline className=\"n-size-4\" />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n\n <FormFieldMessage\n field={field}\n size={size}\n wrap={(content) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {content}\n </Skeleton>\n )}\n />\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"TextInput.js","sourceRoot":"","sources":["../../../src/text-input/TextInput.tsx"],"names":[],"mappings":";;;;;;;;;;;;AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,UAAU,MAAM,Y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,YAAY,aAAZ,YAAY,uBAAZ,YAAY,CAAG;wDACb,MAAM,EAAE,EAAE,KAAK,EAAE,EAAE,EAAE;qDACiB,CAAC,CAAC;gDAC5C,CAAC,YAED,KAAC,gBAAgB,KAAG,GACb,GACL,CACP,IACG,EACL,eAAe,IAAI,CAClB,cAAK,SAAS,EAAC,kCAAkC,YAC9C,SAAS,IAAI,CAAC,cAAc,CAAC,CAAC,CAAC,CAC9B,KAAC,cAAc,IACb,IAAI,EAAE,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,OAAO,EAC3C,SAAS,EACP,IAAI,KAAK,OAAO;4CACd,CAAC,CAAC,oBAAoB;4CACtB,CAAC,CAAC,mBAAmB,GAEzB,CACH,CAAC,CAAC,CAAC,CACF,eAAe,CAChB,GACG,CACP,IACG,IACG,IACL,EAER,KAAC,gBAAgB,IACf,KAAK,EAAE,KAAK,EACZ,IAAI,EAAE,IAAI,EACV,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,CACjB,KAAC,QAAQ,kBACP,YAAY,EAAC,MAAM,EACnB,KAAK,EAAC,aAAa,IACf,aAAa,IACjB,SAAS,EAAE,iBAAiB,YAE3B,OAAO,IACC,CACZ,GACD,IACE,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport classNames from 'classnames';\nimport {\n type InputHTMLAttributes,\n type ReactElement,\n type ReactNode,\n useId,\n useMemo,\n} from 'react';\n\nimport {\n FormFieldLabel,\n FormFieldMessage,\n useFormField,\n} from '../_common/form-control';\nimport { customLabelAndNoAriaLabelWarningMessage } from '../_common/messages';\nimport { type CommonProps, type TooltipObjectProps } from '../_common/types';\nimport { useSemiControlledInput } from '../_common/use-semi-controlled-input';\nimport { needleWarningMessage } from '../_common/utils';\nimport { XMarkIconOutline } from '../icons/generated/heroIcons/XMarkIconOutline';\nimport { LoadingSpinner } from '../loading-spinner';\nimport { Skeleton } from '../skeleton';\n\n/**\n * @remarks\n * When `moreInformationText` is provided, a tooltip is rendered next to the label, and the `tooltipProps` prop is used to configure the tooltip. The `TooltipObjectProps` type is defined as: `{ root?: Partial<React.ComponentProps<typeof Tooltip>>; trigger?: Partial<React.ComponentProps<typeof Tooltip.Trigger>>; content?: Partial<React.ComponentProps<typeof Tooltip.Content>>; }`, see the Tooltip component for more details.\n *\n * @remarks\n * When `isSkeletonLoading` is true, the input is rendered as a loading skeleton and the `skeletonProps` prop is used to configure the skeleton. For more information, see the Skeleton documentation.\n */\ntype TextInputProps = {\n /** Assistive text displayed below the input */\n helpText?: string | ReactNode;\n\n /** Error message displayed below the input. When provided, it overrides `helpText` and shows an error icon */\n errorText?: string | ReactNode;\n\n /** Leading element rendered inside the input */\n leadingElement?: ReactElement;\n\n /** Trailing element rendered inside the input */\n trailingElement?: ReactElement;\n\n /** Size of the input */\n size?: 'small' | 'medium' | 'large';\n\n /** Whether the input is read-only */\n isReadOnly?: boolean;\n\n /**\n * Whether to display the Required/Optional label next to the field label.\n * Shows Required if isRequired is true, otherwise shows Optional.\n * @default false\n */\n // TODO v5: inconsistent naming. The same switch is `hasRequiredIndicator` on\n // Combobox and on the internal form control this maps onto, and `isOptional`\n // on TextArea. The name also needs the disable below, which a name using one\n // of the allowed boolean prefixes would not.\n // eslint-disable-next-line @typescript-eslint/naming-convention\n showRequiredOrOptionalLabel?: boolean;\n\n /** Whether the input is disabled */\n isDisabled?: boolean;\n\n /** Whether the input is required */\n isRequired?: boolean;\n\n /** The current value of the input */\n value?: React.ComponentPropsWithoutRef<'input'>['value'];\n\n /** Placeholder text displayed when the input is empty */\n placeholder?: React.ComponentPropsWithoutRef<'input'>['placeholder'];\n\n /** Callback function triggered when the input value changes */\n onChange?: React.ComponentPropsWithoutRef<'input'>['onChange'];\n\n /** Whether the input should take the full available width */\n isFluid?: boolean;\n\n /** Text displayed in the information tooltip shown next to the label */\n moreInformationText?: React.ReactNode;\n\n // TODO v5: inconsistent naming. Every form control names itself differently:\n // the label is optional here and a design with no room for it reaches for\n // htmlAttributes['aria-label'], TextArea, Select, Checkbox, Radio and Switch\n // expose an `ariaLabel` prop instead, and Combobox requires the label and\n // clips it with `hasVisuallyHiddenLabel`.\n /** The label displayed above the input */\n label?: string | React.ReactNode;\n\n /** Props for the Tooltip component used by the information icon */\n tooltipProps?: TooltipObjectProps;\n\n /** Whether to render skeletons instead of content */\n isSkeletonLoading?: boolean;\n\n /** Additional props forwarded to the underlying Skeleton components */\n skeletonProps?: React.ComponentProps<typeof Skeleton>;\n\n /** Whether to show the clear button */\n isClearable?: boolean;\n\n /** Whether to show the loading spinner */\n isLoading?: boolean;\n};\n\n/**\n *\n *\n * TextInput Component\n *\n *\n */\n\nexport const TextInput = ({\n label,\n isFluid,\n errorText,\n helpText,\n leadingElement,\n trailingElement,\n showRequiredOrOptionalLabel = false,\n moreInformationText,\n size = 'medium',\n placeholder,\n value,\n tooltipProps,\n htmlAttributes,\n isDisabled,\n isReadOnly,\n isRequired,\n onChange,\n isClearable = false,\n className,\n style,\n isSkeletonLoading = false,\n isLoading = false,\n skeletonProps,\n ref,\n ...restProps\n}: CommonProps<'input', TextInputProps>) => {\n const [currentValue, handleChange] = useSemiControlledInput({\n inputType: 'text',\n isControlled: value !== undefined,\n onChange,\n state: value ?? '',\n });\n const hintId = useId();\n const canClear = isClearable && isDisabled !== true;\n const shouldRenderHint = canClear || isLoading;\n const { field, controlProps } = useFormField({\n errorText,\n // The clear/loading hint describes the input alongside the message.\n extraDescribedByIds: [shouldRenderHint && hintId],\n hasRequiredIndicator: showRequiredOrOptionalLabel,\n helpText,\n isRequired,\n label,\n });\n\n const containerWrappingClasses = classNames(`ndl-text-input`, className, {\n 'ndl-disabled': isDisabled,\n 'ndl-has-error': errorText,\n 'ndl-has-icon': leadingElement || trailingElement || errorText,\n 'ndl-has-leading-icon': leadingElement,\n 'ndl-has-trailing-icon': trailingElement || errorText,\n 'ndl-large': size === 'large',\n 'ndl-medium': size === 'medium',\n 'ndl-read-only': isReadOnly,\n 'ndl-small': size === 'small',\n });\n\n const hasEmptyLabelValue =\n label === undefined || label === null || label === '';\n\n const labelWrappingClasses = classNames('ndl-text-input-label', {\n 'ndl-fluid': isFluid,\n });\n\n const combinedHtmlInputAttributes: InputHTMLAttributes<HTMLInputElement> = {\n ...htmlAttributes,\n className: classNames('ndl-input', htmlAttributes?.className),\n };\n const ariaLabel = combinedHtmlInputAttributes['aria-label'];\n const isCustomLabel = Boolean(label) && typeof label !== 'string';\n const hasCustomLabelAndNoAriaLabel =\n isCustomLabel && (ariaLabel === undefined || ariaLabel === '');\n\n const handleInputKeyDown = (event: React.KeyboardEvent<HTMLInputElement>) => {\n if (canClear && event.key === 'Escape' && Boolean(currentValue)) {\n event.preventDefault();\n event.stopPropagation();\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }\n htmlAttributes?.onKeyDown?.(event);\n };\n\n useMemo(() => {\n if (!label && !ariaLabel) {\n needleWarningMessage(\n 'A TextInput without a label does not have an aria label, be sure to include an aria label for screen readers. Link: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI',\n );\n }\n\n if (hasCustomLabelAndNoAriaLabel) {\n needleWarningMessage(customLabelAndNoAriaLabelWarningMessage);\n }\n }, [label, ariaLabel, hasCustomLabelAndNoAriaLabel]);\n\n return (\n <div className={containerWrappingClasses} style={style}>\n {/* We enable implicit label wrapping */}\n {/* Source: https://dequeuniversity.com/rules/axe/4.2/label?application=axeAPI */}\n <label className={labelWrappingClasses}>\n {!hasEmptyLabelValue && (\n <FormFieldLabel\n field={field}\n size={size}\n association=\"implicit\"\n moreInformationText={moreInformationText}\n tooltipProps={tooltipProps}\n wrap={(row) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {row}\n </Skeleton>\n )}\n />\n )}\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n <div className=\"ndl-input-wrapper\">\n {(leadingElement || (isLoading && !trailingElement)) && (\n <div className=\"ndl-element-leading ndl-element\">\n {isLoading ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n leadingElement\n )}\n </div>\n )}\n <div\n className={classNames('ndl-input-container', {\n 'ndl-clearable': isClearable,\n })}\n >\n <input\n ref={ref}\n readOnly={isReadOnly}\n disabled={isDisabled}\n required={isRequired}\n value={currentValue}\n placeholder={placeholder}\n type=\"text\"\n onChange={handleChange}\n {...controlProps}\n {...combinedHtmlInputAttributes}\n onKeyDown={handleInputKeyDown}\n {...restProps}\n />\n {shouldRenderHint && (\n <span\n id={hintId}\n className=\"ndl-text-input-hint\"\n aria-hidden={true}\n >\n {isLoading && 'Loading '}\n {canClear && 'Press Escape to clear input.'}\n </span>\n )}\n {canClear && Boolean(currentValue) && (\n <div className=\"ndl-element-clear ndl-element\">\n <button\n tabIndex={-1}\n aria-hidden={true}\n type=\"button\"\n title=\"Clear input (Esc)\"\n onClick={() => {\n handleChange?.({\n target: { value: '' },\n } as React.ChangeEvent<HTMLInputElement>);\n }}\n >\n <XMarkIconOutline />\n </button>\n </div>\n )}\n </div>\n {trailingElement && (\n <div className=\"ndl-element-trailing ndl-element\">\n {isLoading && !leadingElement ? (\n <LoadingSpinner\n size={size === 'large' ? 'medium' : 'small'}\n className={\n size === 'large'\n ? 'ndl-medium-spinner'\n : 'ndl-small-spinner'\n }\n />\n ) : (\n trailingElement\n )}\n </div>\n )}\n </div>\n </Skeleton>\n </label>\n\n <FormFieldMessage\n field={field}\n size={size}\n wrap={(content) => (\n <Skeleton\n onBackground=\"weak\"\n shape=\"rectangular\"\n {...skeletonProps}\n isLoading={isSkeletonLoading}\n >\n {content}\n </Skeleton>\n )}\n />\n </div>\n );\n};\n"]}
@@ -1,4 +1,5 @@
1
- /**
1
+ /*!
2
+ *
2
3
  * Copyright (c) "Neo4j"
3
4
  * Neo4j Sweden AB [http://neo4j.com]
4
5
  * This file is part of Neo4j.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/typography/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,yBAAyB,MAAM,+BAA+B,CAAC;AACtE,OAAO,0BAA0B,MAAM,gCAAgC,CAAC;AACxE,OAAO,2BAA2B,MAAM,iCAAiC,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC","sourcesContent":["/**\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as TypographyDefault } from './typography-default.story';\nexport { default as TypographyAnchor } from './typography-anchor.story';\nexport { default as TypographyVariants } from './typography-variants.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TypographyAnchorSourceRaw from './typography-anchor.story?raw';\nimport TypographyDefaultSourceRaw from './typography-default.story?raw';\nimport TypographyVariantsSourceRaw from './typography-variants.story?raw';\n\nexport const TypographyDefaultSource = removeLicenseHeader(\n TypographyDefaultSourceRaw,\n);\nexport const TypographyAnchorSource = removeLicenseHeader(\n TypographyAnchorSourceRaw,\n);\nexport const TypographyVariantsSource = removeLicenseHeader(\n TypographyVariantsSourceRaw,\n);\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/typography/stories/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,OAAO,IAAI,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC1E,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,2BAA2B,CAAC;AACxE,OAAO,EAAE,OAAO,IAAI,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAE5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,yBAAyB,MAAM,+BAA+B,CAAC;AACtE,OAAO,0BAA0B,MAAM,gCAAgC,CAAC;AACxE,OAAO,2BAA2B,MAAM,iCAAiC,CAAC;AAE1E,MAAM,CAAC,MAAM,uBAAuB,GAAG,mBAAmB,CACxD,0BAA0B,CAC3B,CAAC;AACF,MAAM,CAAC,MAAM,sBAAsB,GAAG,mBAAmB,CACvD,yBAAyB,CAC1B,CAAC;AACF,MAAM,CAAC,MAAM,wBAAwB,GAAG,mBAAmB,CACzD,2BAA2B,CAC5B,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nexport { default as TypographyDefault } from './typography-default.story';\nexport { default as TypographyAnchor } from './typography-anchor.story';\nexport { default as TypographyVariants } from './typography-variants.story';\n\nimport { removeLicenseHeader } from '../../_common/export-stories-utils';\nimport TypographyAnchorSourceRaw from './typography-anchor.story?raw';\nimport TypographyDefaultSourceRaw from './typography-default.story?raw';\nimport TypographyVariantsSourceRaw from './typography-variants.story?raw';\n\nexport const TypographyDefaultSource = removeLicenseHeader(\n TypographyDefaultSourceRaw,\n);\nexport const TypographyAnchorSource = removeLicenseHeader(\n TypographyAnchorSourceRaw,\n);\nexport const TypographyVariantsSource = removeLicenseHeader(\n TypographyVariantsSourceRaw,\n);\n"]}
@@ -1,5 +1,6 @@
1
1
  import { jsxs as _jsxs } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
+ *
3
4
  * Copyright (c) "Neo4j"
4
5
  * Neo4j Sweden AB [http://neo4j.com]
5
6
  * This file is part of Neo4j.
@@ -1 +1 @@
1
- {"version":3,"file":"typography-anchor.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-anchor.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,SAAS,CAAC;IAE1B,OAAO,CACL,MAAC,UAAU,IAAC,EAAE,EAAC,GAAG,EAAC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,aACpE,OAAO,qDACG,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '../Typography';\n\nconst Component = () => {\n const variant = 'title-1';\n\n return (\n <Typography as=\"a\" htmlAttributes={{ href: '/index' }} variant={variant}>\n {variant}: The quick brown fox jumps over the lazy dog\n </Typography>\n );\n};\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"typography-anchor.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-anchor.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE;IACrB,MAAM,OAAO,GAAG,SAAS,CAAC;IAE1B,OAAO,CACL,MAAC,UAAU,IAAC,EAAE,EAAC,GAAG,EAAC,cAAc,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,EAAE,OAAO,EAAE,OAAO,aACpE,OAAO,qDACG,CACd,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport { Typography } from '../Typography';\n\nconst Component = () => {\n const variant = 'title-1';\n\n return (\n <Typography as=\"a\" htmlAttributes={{ href: '/index' }} variant={variant}>\n {variant}: The quick brown fox jumps over the lazy dog\n </Typography>\n );\n};\n\nexport default Component;\n"]}
@@ -1,5 +1,6 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
+ *
3
4
  * Copyright (c) "Neo4j"
4
5
  * Neo4j Sweden AB [http://neo4j.com]
5
6
  * This file is part of Neo4j.
@@ -1 +1 @@
1
- {"version":3,"file":"typography-default.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,6DAEpB,CACd,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '../Typography';\n\nconst Component = () => (\n <Typography variant=\"body-medium\">\n The quick brown fox jumps over the lazy dog.\n </Typography>\n);\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"typography-default.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-default.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,KAAC,UAAU,IAAC,OAAO,EAAC,aAAa,6DAEpB,CACd,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { Typography } from '../Typography';\n\nconst Component = () => (\n <Typography variant=\"body-medium\">\n The quick brown fox jumps over the lazy dog.\n </Typography>\n);\n\nexport default Component;\n"]}
@@ -1,5 +1,6 @@
1
1
  import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
2
- /**
2
+ /*!
3
+ *
3
4
  * Copyright (c) "Neo4j"
4
5
  * Neo4j Sweden AB [http://neo4j.com]
5
6
  * This file is part of Neo4j.
@@ -1 +1 @@
1
- {"version":3,"file":"typography-variants.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAE7C,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,YAC9D,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzB,MAAC,UAAU,IAAe,OAAO,EAAE,OAAO,aACvC,OAAO,uDADO,OAAO,CAEX,CACd,CAAC,GACE,CACP,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/**\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\n\nimport { Typography } from '../Typography';\n\nconst VARIANTS = Object.keys(tokens.typography) as Array<\n keyof typeof tokens.typography\n>;\n\nconst Component = () => (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>\n {VARIANTS.map((variant) => (\n <Typography key={variant} variant={variant}>\n {variant}: The quick brown fox jumps over the lazy dog.\n </Typography>\n ))}\n </div>\n);\n\nexport default Component;\n"]}
1
+ {"version":3,"file":"typography-variants.story.js","sourceRoot":"","sources":["../../../../src/typography/stories/typography-variants.story.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEzC,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,MAAM,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAE7C,CAAC;AAEF,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,CACtB,cAAK,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAAE,GAAG,EAAE,EAAE,EAAE,YAC9D,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CACzB,MAAC,UAAU,IAAe,OAAO,EAAE,OAAO,aACvC,OAAO,uDADO,OAAO,CAEX,CACd,CAAC,GACE,CACP,CAAC;AAEF,eAAe,SAAS,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n * This file is part of Neo4j.\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\n\nimport { tokens } from '@neo4j-ndl/base';\n\nimport { Typography } from '../Typography';\n\nconst VARIANTS = Object.keys(tokens.typography) as Array<\n keyof typeof tokens.typography\n>;\n\nconst Component = () => (\n <div style={{ display: 'flex', flexDirection: 'column', gap: 16 }}>\n {VARIANTS.map((variant) => (\n <Typography key={variant} variant={variant}>\n {variant}: The quick brown fox jumps over the lazy dog.\n </Typography>\n ))}\n </div>\n);\n\nexport default Component;\n"]}
@@ -123,14 +123,10 @@ export const WizardSmall = (_a) => {
123
123
  }), _jsx("div", { className: "ndl-wizard-steps-line" })] })));
124
124
  };
125
125
  const Circle = ({ status, number, alignment = 'middle', }) => {
126
- const innerCircleClasses = classNames({
127
- 'n-fill-danger-bg-strong': status === 'error',
128
- 'n-fill-neutral-bg-stronger': status === 'incomplete',
129
- 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',
130
- });
126
+ const innerCircleClasses = classNames('ndl-wizard-circle-inner', `ndl-${status}`);
131
127
  const outerCircleClasses = classNames('ndl-wizard-circle', {
132
128
  [`ndl-wizard-align-${alignment}`]: alignment,
133
129
  });
134
- return (_jsx("div", { className: outerCircleClasses, children: _jsxs("svg", { "aria-hidden": "true", children: [status === 'active' && (_jsx("g", { children: _jsx("circle", { className: "n-stroke-primary-bg-strong", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), _jsx("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), _jsx("text", { x: "50%", y: "50%", fontSize: 14, className: "n-fill-neutral-bg-weak", textAnchor: "middle", dominantBaseline: "middle", dy: "0.1em", children: status === 'error' ? '!' : number })] }) }));
130
+ return (_jsx("div", { className: outerCircleClasses, children: _jsxs("svg", { "aria-hidden": "true", children: [status === 'active' && (_jsx("g", { children: _jsx("circle", { className: "ndl-wizard-circle-ring", style: { fill: 'transparent', strokeWidth: 2 }, cx: "16", cy: "16", r: "14" }) })), _jsx("circle", { className: innerCircleClasses, cx: "16", cy: "16", r: "12" }), _jsx("text", { x: "50%", y: "50%", fontSize: 14, className: "ndl-wizard-circle-text", textAnchor: "middle", dominantBaseline: "middle", dy: "0.1em", children: status === 'error' ? '!' : number })] }) }));
135
131
  };
136
132
  //# sourceMappingURL=Wizard.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Wizard.js","sourceR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AM,kBAAkB,GAAG,UAAU,CAAC,mBAAmB,EAAE;QACzD,CAAC,oBAAoB,SAAS,EAAE,CAAC,EAAE,SAAS;KAC7C,CAAC,CAAC;IAEH,OAAO,CACL,cAAK,SAAS,EAAE,kBAAkB,YAChC,8BAAiB,MAAM,aACpB,MAAM,KAAK,QAAQ,IAAI,CACtB,sBACE,iBACE,SAAS,EAAC,4BAA4B,EACtC,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,EAC9C,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,GACN,GACA,CACL,EAED,iBAAQ,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChE,eACE,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\n/**\n * @remarks\n * Where type `Step` is defined as: `{ content: string | React.JSX.Element; status?: 'default' | 'error' }`. To highlight a step as error, set the `status` to `error`.\n */\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component) */}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n aria-current={\n getStatus(activeStepIndex, index) === 'active'\n ? 'step'\n : undefined\n }\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div\n key={index}\n className={stepClasses(index)}\n aria-current={\n getStatus(activeStepIndex, index) === 'active'\n ? 'step'\n : undefined\n }\n >\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames({\n 'n-fill-danger-bg-strong': status === 'error',\n 'n-fill-neutral-bg-stronger': status === 'incomplete',\n 'n-fill-primary-bg-strong': status === 'complete' || status === 'active',\n });\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg aria-hidden=\"true\">\n {status === 'active' && (\n <g>\n <circle\n className=\"n-stroke-primary-bg-strong\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"n-fill-neutral-bg-weak\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
1
+ {"version":3,"file":"Wizard.js","sourceRoot":"","sources":["../../../src/wizard/Wizard.tsx"],"names":[],"mappings":";;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8BAAiB,MAAM,aACpB,MAAM,KAAK,QAAQ,IAAI,CACtB,sBACE,iBACE,SAAS,EAAC,wBAAwB,EAClC,KAAK,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,CAAC,EAAE,EAC9C,EAAE,EAAC,IAAI,EACP,EAAE,EAAC,IAAI,EACP,CAAC,EAAC,IAAI,GACN,GACA,CACL,EAED,iBAAQ,SAAS,EAAE,kBAAkB,EAAE,EAAE,EAAC,IAAI,EAAC,EAAE,EAAC,IAAI,EAAC,CAAC,EAAC,IAAI,GAAG,EAChE,eACE,CAAC,EAAC,KAAK,EACP,CAAC,EAAC,KAAK,EACP,QAAQ,EAAE,EAAE,EACZ,SAAS,EAAC,wBAAwB,EAClC,UAAU,EAAC,QAAQ,EACnB,gBAAgB,EAAC,QAAQ,EACzB,EAAE,EAAC,OAAO,YAET,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,GAC7B,IACH,GACF,CACP,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*!\n *\n * Copyright (c) \"Neo4j\"\n * Neo4j Sweden AB [http://neo4j.com]\n *\n * This file is part of Neo4j.\n *\n * Neo4j is free software: you can redistribute it and/or modify\n * it under the terms of the GNU General Public License as published by\n * the Free Software Foundation, either version 3 of the License, or\n * (at your option) any later version.\n *\n * This program is distributed in the hope that it will be useful,\n * but WITHOUT ANY WARRANTY; without even the implied warranty of\n * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n * GNU General Public License for more details.\n *\n * You should have received a copy of the GNU General Public License\n * along with this program. If not, see <http://www.gnu.org/licenses/>.\n */\nimport classNames from 'classnames';\nimport React, { useEffect } from 'react';\n\nimport { type PolymorphicCommonProps } from '../_common/types';\nimport { Typography } from '../typography';\n\ninterface Step {\n /** Content displayed as the step label */\n content: React.ReactNode;\n /** Explicit status for the step. When set to `error`, the step is rendered in an error state */\n status?: 'default' | 'error';\n}\n\ninterface BaseWizardProps {\n /** Layout orientation of the wizard */\n orientation?: 'horizontal' | 'vertical';\n /** Visual size of the wizard */\n size?: 'small' | 'large';\n /** Additional style */\n style?: React.CSSProperties;\n /** Additional class name */\n className?: string;\n /** Zero-based index of the active step */\n activeStepIndex: number;\n /** Steps to display in the wizard */\n steps: Step[];\n}\n\ntype HorizontalWizardProps = BaseWizardProps & {\n orientation: 'horizontal';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'middle';\n};\n\ntype VerticalWizardProps = BaseWizardProps & {\n orientation: 'vertical';\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: 'top' | 'middle';\n};\n\ntype NonOrientationWizardProps = BaseWizardProps & {\n orientation: undefined;\n /** Alignment of labels/content, is set to `middle` for horizontal orientation and can be set to `top` or `middle` for vertical orientation and is not applicable when `orientation` is undefined */\n alignment?: never;\n};\n\n/**\n * @remarks\n * Where type `Step` is defined as: `{ content: string | React.JSX.Element; status?: 'default' | 'error' }`. To highlight a step as error, set the `status` to `error`.\n */\ntype WizardProps =\n | HorizontalWizardProps\n | VerticalWizardProps\n | NonOrientationWizardProps;\n\nexport const Wizard = <T extends React.ElementType = 'div'>({\n as,\n className,\n style,\n size = 'large',\n steps,\n activeStepIndex,\n orientation,\n htmlAttributes,\n alignment = orientation === 'vertical' ? 'top' : 'middle',\n ref,\n}: PolymorphicCommonProps<T, WizardProps>) => {\n useEffect(() => {\n if (activeStepIndex > steps.length - 1 || activeStepIndex < 0) {\n console.warn(\n `[🪡 Needle]: The activeStepIndex in Wizard is out of bounds. The activeStepIndex is ${activeStepIndex} and the number of steps is ${steps.length}.`,\n );\n }\n }, [activeStepIndex, steps.length]);\n\n switch (size) {\n case 'small':\n return (\n <WizardSmall\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n case 'large':\n return (\n <WizardLarge\n as={as}\n orientation={orientation}\n style={style}\n className={className}\n steps={steps}\n activeStepIndex={activeStepIndex}\n ref={ref}\n htmlAttributes={htmlAttributes}\n alignment={alignment}\n />\n );\n }\n};\n\nconst getStatus = (activeStepIndex: number, stepIndex: number) =>\n stepIndex === activeStepIndex\n ? 'active'\n : activeStepIndex < stepIndex\n ? 'incomplete'\n : 'complete';\n\nconst WizardLarge = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n style,\n className,\n htmlAttributes,\n alignment,\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component: React.ElementType = as || 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-large',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const componentStyle = {\n gridTemplateColumns:\n orientation === 'horizontal'\n ? `repeat(${steps.length}, 1fr)`\n : `32px 1fr`,\n\n gridTemplateRows:\n orientation === 'vertical' && `repeat(${steps.length}, 1fr)`,\n };\n\n const stepClasses = (index: number, step: Step) => {\n const status = getStatus(activeStepIndex, index);\n\n return classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-line-right': index < steps.length - 1,\n 'ndl-wizard-step-line-left': index > 0,\n 'ndl-wizard-step-complete': status === 'complete',\n 'ndl-wizard-step-active': status === 'active',\n 'ndl-wizard-step-error': step.status === 'error',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n };\n\n return (\n <Component\n className={wizardClasses}\n style={{ ...style, ...componentStyle }}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n {/* iterate over the steps to render the text content (the first row of the component) */}\n {steps.map((step, index) => {\n if (typeof step.content === 'string') {\n const wizardStepClasses = classNames('ndl-wizard-step-text', {\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-horizontal': orientation === 'horizontal',\n [`ndl-wizard-align-${alignment}`]: alignment,\n 'ndl-wizard-step-incomplete':\n getStatus(activeStepIndex, index) === 'incomplete',\n });\n\n return (\n <div key={index} className={wizardStepClasses}>\n <Typography variant=\"body-large\">{step.content}</Typography>\n </div>\n );\n } else {\n return <React.Fragment key={index}>{step.content}</React.Fragment>;\n }\n })}\n {/* iterate over the steps to render the circles (iterates again to render the second row of the component) */}\n {steps.map((step, index) => {\n return (\n <div\n className={stepClasses(index, step)}\n key={index}\n style={{\n gridRow: orientation === 'vertical' ? index + 1 : '',\n }}\n aria-current={\n getStatus(activeStepIndex, index) === 'active'\n ? 'step'\n : undefined\n }\n >\n <Circle\n status={\n step.status === 'error'\n ? 'error'\n : getStatus(activeStepIndex, index)\n }\n number={index + 1}\n text={step.content}\n alignment={alignment}\n />\n </div>\n );\n })}\n </Component>\n );\n};\n\nexport const WizardSmall = <T extends React.ElementType = 'div'>({\n orientation = 'horizontal',\n activeStepIndex,\n steps,\n as,\n className,\n htmlAttributes,\n style,\n alignment = 'middle',\n ref,\n ...restProps\n}: PolymorphicCommonProps<T, Omit<WizardProps, 'size'>>) => {\n const Component = as ?? 'div';\n\n const wizardClasses = classNames(\n 'ndl-wizard',\n 'ndl-wizard-small',\n {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n [`ndl-wizard-align-${alignment}`]: alignment,\n },\n className,\n );\n\n const stepClasses = (index: number) =>\n classNames('ndl-wizard-step', {\n 'ndl-horizontal': orientation === 'horizontal',\n 'ndl-vertical': orientation === 'vertical',\n 'ndl-wizard-step-active': getStatus(activeStepIndex, index) === 'active',\n 'ndl-wizard-step-complete':\n getStatus(activeStepIndex, index) === 'complete',\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <Component\n className={wizardClasses}\n style={style}\n ref={ref}\n {...restProps}\n {...htmlAttributes}\n >\n <div className=\"ndl-wizard-steps-line\" />\n {steps.map((step, index) => {\n return (\n <div\n key={index}\n className={stepClasses(index)}\n aria-current={\n getStatus(activeStepIndex, index) === 'active'\n ? 'step'\n : undefined\n }\n >\n <div className=\"ndl-wizard-circle\"></div>\n </div>\n );\n })}\n <div className=\"ndl-wizard-steps-line\" />\n </Component>\n );\n};\n\nconst Circle = ({\n status,\n number,\n alignment = 'middle',\n}: {\n status: 'active' | 'complete' | 'incomplete' | 'error';\n number: number;\n text: React.ReactNode;\n alignment?: 'top' | 'middle';\n}) => {\n const innerCircleClasses = classNames(\n 'ndl-wizard-circle-inner',\n `ndl-${status}`,\n );\n const outerCircleClasses = classNames('ndl-wizard-circle', {\n [`ndl-wizard-align-${alignment}`]: alignment,\n });\n\n return (\n <div className={outerCircleClasses}>\n <svg aria-hidden=\"true\">\n {status === 'active' && (\n <g>\n <circle\n className=\"ndl-wizard-circle-ring\"\n style={{ fill: 'transparent', strokeWidth: 2 }}\n cx=\"16\"\n cy=\"16\"\n r=\"14\"\n />\n </g>\n )}\n\n <circle className={innerCircleClasses} cx=\"16\" cy=\"16\" r=\"12\" />\n <text\n x=\"50%\"\n y=\"50%\"\n fontSize={14}\n className=\"ndl-wizard-circle-text\"\n textAnchor=\"middle\"\n dominantBaseline=\"middle\"\n dy=\"0.1em\"\n >\n {status === 'error' ? '!' : number}\n </text>\n </svg>\n </div>\n );\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"CodePreview.d.ts","sourceRoot":"","sources":["../../../../src/ai/code-preview/CodePreview.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AACH,OAAO,EAEL,KAAK,SAAS,EAKf,MAAM,kBAAkB,CAAC;AAK1B,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,qBAAqB,CAAC;AASvD,KAAK,gBAAgB,GAAG;IACtB,kCAAkC;IAClC,IAAI,EAAE,MA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