@stackone/malachite 2.111.1 → 2.113.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/COMPONENTS.md +5 -1
  2. package/dist/assets/icons/arrow_line_left.svg.js +6 -0
  3. package/dist/assets/icons/arrow_line_left.svg.js.map +1 -0
  4. package/dist/assets/icons/arrow_line_right.svg.js +6 -0
  5. package/dist/assets/icons/arrow_line_right.svg.js.map +1 -0
  6. package/dist/assets/icons/book.svg.js +6 -0
  7. package/dist/assets/icons/book.svg.js.map +1 -0
  8. package/dist/assets/icons/book_open.svg.js +6 -0
  9. package/dist/assets/icons/book_open.svg.js.map +1 -0
  10. package/dist/components/Accordion.js +66 -64
  11. package/dist/components/Accordion.js.map +1 -1
  12. package/dist/components/ActionMenu.js +97 -96
  13. package/dist/components/ActionMenu.js.map +1 -1
  14. package/dist/components/BannerButton.js +44 -0
  15. package/dist/components/BannerButton.js.map +1 -0
  16. package/dist/components/Button.js.map +1 -1
  17. package/dist/components/CopyButton.js +37 -0
  18. package/dist/components/CopyButton.js.map +1 -0
  19. package/dist/components/CustomIcons/ArrowLineLeftIcon.js +21 -0
  20. package/dist/components/CustomIcons/ArrowLineLeftIcon.js.map +1 -0
  21. package/dist/components/CustomIcons/ArrowLineRightIcon.js +21 -0
  22. package/dist/components/CustomIcons/ArrowLineRightIcon.js.map +1 -0
  23. package/dist/components/CustomIcons/BookIcon.js +16 -0
  24. package/dist/components/CustomIcons/BookIcon.js.map +1 -0
  25. package/dist/components/CustomIcons/BookOpenIcon.js +21 -0
  26. package/dist/components/CustomIcons/BookOpenIcon.js.map +1 -0
  27. package/dist/components/CustomIcons/index.js +363 -351
  28. package/dist/components/CustomIcons/index.js.map +1 -1
  29. package/dist/components/DividerToggle.js +68 -0
  30. package/dist/components/DividerToggle.js.map +1 -0
  31. package/dist/components/FormSteps.js +110 -0
  32. package/dist/components/FormSteps.js.map +1 -0
  33. package/dist/components/Input/Input.js +202 -178
  34. package/dist/components/Input/Input.js.map +1 -1
  35. package/dist/components/KeyValueList.js +36 -35
  36. package/dist/components/KeyValueList.js.map +1 -1
  37. package/dist/components/actionMenuStyles.js +70 -51
  38. package/dist/components/actionMenuStyles.js.map +1 -1
  39. package/dist/components/buttonStyles.js +2 -0
  40. package/dist/components/buttonStyles.js.map +1 -1
  41. package/dist/components/chromeStyles.js +2 -3
  42. package/dist/components/chromeStyles.js.map +1 -1
  43. package/dist/index.d.ts +273 -117
  44. package/dist/index.js +451 -435
  45. package/dist/index.js.map +1 -1
  46. package/dist/tailwind.css.js +1 -1
  47. package/dist/theme.js +12 -9
  48. package/dist/theme.js.map +1 -1
  49. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React, { forwardRef, useLayoutEffect, useMemo, useRef } from 'react';\nimport ButtonSpinner from './ButtonSpinner';\nimport Tooltip from './Tooltip';\nimport { getDeepActiveNode } from './activeElement';\nimport { getIconOnlySizeClasses, getIconSizeClass } from './buttonSizing';\nimport {\n getDefaultRadiusClass,\n getIconGapClass,\n getRadiusClass,\n getSizeClasses,\n getVariantClasses,\n} from './buttonStyles';\nimport { composeRefs } from './composeRefs';\nimport { isFocusVisible } from './focusRing';\nimport { resolveRel } from './linkRel';\n\n// Button variant types matching the old component\nexport type ButtonVariant =\n | 'filled'\n | 'outline'\n /**\n * `outline`'s geometry on a ground of its own. For a button sitting on a tinted or\n * patterned surface, where `outline`'s transparent background lets that surface through\n * and the control stops reading as a button.\n */\n | 'surface'\n /**\n * The violet the assistant is named in elsewhere — for a control that hands work to it, or\n * acts on what it produced. Provenance, not a severity: it says who is being asked, not\n * that anything is wrong.\n */\n | 'assistant'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost'\n /** `ghost` until its `Surface.Row` is hovered or focused, or its menu opens. For `trailing` only. */\n | 'row-outline'\n /** Text only, in the accent colour, for a secondary action beside a primary one. */\n | 'quiet'\n /**\n * A recessed grey with secondary text, for a control whose subject is switched off, such as\n * an account set to Not allowed. It stays clickable: `disabled` is for a control that is not.\n */\n | 'muted'\n | 'no-style';\n\nexport type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large';\n\nexport type ButtonRadius = 'md' | 'lg' | 'xl';\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant: ButtonVariant;\n size?: ButtonSize;\n radius?: ButtonRadius;\n loading?: boolean;\n disabled?: boolean;\n icon?: React.ReactNode;\n iconPosition?: 'start' | 'end';\n /** Before the label at its own size, never squeezed (an avatar); pairs with an end `icon`. */\n leading?: React.ReactNode;\n /** `start` aligns the label to the leading edge and pins an end `icon` to the far edge. */\n contentAlign?: 'center' | 'start';\n /** Fills the container's width. */\n flexGrow?: boolean;\n /** `wide` holds a 120px floor for a primary action. */\n width?: 'auto' | 'wide';\n fill?: boolean;\n tooltip?: string;\n tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';\n iconOnly?: boolean;\n /** Pulls a borderless button out by its own padding, so its label lines up with the text around it. */\n flush?: boolean;\n children?: React.ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement>;\n /** Renders the button as a real anchor, so a link action is never an <a> nested in a <button>. */\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n rel?: string;\n}\n\n// The 1px is the transparent border, which `no-style` drops.\nconst FLUSH_MARGIN = '-mx-[calc(var(--btn-px)+1px)]';\nconst FLUSH_MARGIN_BORDERLESS = '-mx-[var(--btn-px)]';\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (\n {\n variant,\n size = 'large',\n radius,\n loading = false,\n disabled = false,\n icon,\n iconPosition = 'start',\n leading,\n contentAlign = 'center',\n flexGrow = false,\n width = 'auto',\n fill = false,\n tooltip,\n tooltipPlacement = 'top',\n iconOnly = false,\n flush = false,\n children,\n className = '',\n href,\n target,\n rel,\n onBlur,\n onFocus,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const elementRef = useRef<HTMLElement | null>(null);\n // Memoised: a fresh callback ref each render would detach and re-attach the consumer's.\n const composedRef = useMemo(\n () => composeRefs(ref as React.Ref<HTMLElement>, elementRef),\n [ref],\n );\n // Loading disables the button, or swaps the element (a tooltip wrapper, a link), and\n // either drops a keyboard user's focus to <body>. It is handed back when loading ends.\n const keyboardFocus = useRef(false);\n const refocusAfterLoading = useRef(false);\n // Counts focus events, so a blur's deferred clear can tell focus came back meanwhile.\n const focusCount = useRef(0);\n\n // A layout effect, so it reads `keyboardFocus` at commit: the blur that commit causes\n // only clears it from a microtask, after this has run.\n useLayoutEffect(() => {\n if (loading) {\n refocusAfterLoading.current = keyboardFocus.current;\n return;\n }\n if (!refocusAfterLoading.current) {\n return;\n }\n refocusAfterLoading.current = false;\n const active = getDeepActiveNode();\n if (!active || active === document.body) {\n elementRef.current?.focus({ preventScroll: true });\n // Scripted focus from <body> need not match :focus-visible, yet it is still the\n // keyboard user's: the next send must hand it back too.\n if (getDeepActiveNode() === elementRef.current) {\n keyboardFocus.current = true;\n }\n }\n }, [loading]);\n\n const handleFocus = (event: React.FocusEvent<HTMLElement>) => {\n focusCount.current += 1;\n // Only keyboard focus is handed back: a mouse user never asked for focus to stay there.\n keyboardFocus.current = isFocusVisible(event.currentTarget);\n onFocus?.(event as React.FocusEvent<HTMLButtonElement>);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLElement>) => {\n // A focus trap can put focus straight back within this task; that focus wins.\n const blurredAfter = focusCount.current;\n queueMicrotask(() => {\n if (focusCount.current === blurredAfter) {\n keyboardFocus.current = false;\n }\n });\n onBlur?.(event as React.FocusEvent<HTMLButtonElement>);\n };\n\n const radiusClass = radius ? getRadiusClass(radius) : getDefaultRadiusClass(size, iconOnly);\n const isInactive = disabled || loading;\n const alignStart = contentAlign === 'start';\n const baseClasses = [\n alignStart\n ? 'flex items-center justify-start text-left'\n : 'flex items-center justify-center',\n iconOnly ? `p-0 ${getIconOnlySizeClasses(size)}` : getSizeClasses(size),\n getVariantClasses(variant, radiusClass),\n flexGrow ? 'w-full' : '',\n width === 'wide' ? 'min-w-[120px]' : '',\n fill ? 'max-w-full' : '',\n isInactive ? 'cursor-not-allowed' : '',\n tooltip && isInactive ? 'pointer-events-none' : '',\n flush && !iconOnly\n ? variant === 'no-style'\n ? FLUSH_MARGIN_BORDERLESS\n : FLUSH_MARGIN\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const label = alignStart ? (\n <span className=\"flex min-w-0 flex-1 items-center\">{children}</span>\n ) : (\n children\n );\n\n const leadingSlot = leading ? (\n <span\n className={\n children\n ? 'btn-leading inline-flex shrink-0 items-center me-2'\n : 'btn-leading inline-flex shrink-0 items-center'\n }\n >\n {leading}\n </span>\n ) : null;\n\n const renderContent = () => {\n if (loading) {\n return (\n <>\n {leadingSlot}\n <ButtonSpinner />\n {label}\n </>\n );\n }\n\n const iconWrapperClasses = `inline-flex items-center shrink-0 ${getIconSizeClass(size)}`;\n\n if (icon && iconPosition === 'start') {\n return (\n <>\n {leadingSlot}\n <span\n className={`${iconWrapperClasses}${children ? ` ${getIconGapClass(size, 'start')}` : ''}`}\n >\n {icon}\n </span>\n {label}\n </>\n );\n }\n\n if (icon && iconPosition === 'end') {\n return (\n <>\n {leadingSlot}\n {label}\n <span\n className={`${iconWrapperClasses}${children ? ` ${getIconGapClass(size, 'end')}` : ''}`}\n >\n {icon}\n </span>\n </>\n );\n }\n\n return (\n <>\n {leadingSlot}\n {label}\n </>\n );\n };\n\n // An anchor cannot be disabled, so an inactive link still renders as a <button>.\n const button =\n href && !isInactive ? (\n <a\n ref={composedRef}\n href={href}\n target={target}\n rel={resolveRel(rel, target)}\n className={baseClasses}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...(props as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {renderContent()}\n </a>\n ) : (\n <button\n ref={composedRef}\n // Not the browser's `submit`: an untyped Button in a form would otherwise be its\n // default button, so Enter in any field pressed it.\n type={type}\n disabled={isInactive}\n className={baseClasses}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n >\n {renderContent()}\n </button>\n );\n\n if (tooltip) {\n const trigger = isInactive ? (\n <span className={`inline-flex cursor-not-allowed${flexGrow ? ' w-full' : ''}`}>\n {button}\n </span>\n ) : (\n button\n );\n return (\n <Tooltip text={tooltip} placement={tooltipPlacement} fill={flexGrow}>\n {trigger}\n </Tooltip>\n );\n }\n\n return button;\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["FLUSH_MARGIN","FLUSH_MARGIN_BORDERLESS","Button","forwardRef","variant","size","radius","loading","disabled","icon","iconPosition","leading","contentAlign","flexGrow","width","fill","tooltip","tooltipPlacement","iconOnly","flush","children","className","href","target","rel","onBlur","onFocus","type","props","ref","elementRef","useRef","composedRef","useMemo","composeRefs","keyboardFocus","refocusAfterLoading","focusCount","useLayoutEffect","active","getDeepActiveNode","_a","handleFocus","event","isFocusVisible","handleBlur","blurredAfter","radiusClass","getRadiusClass","getDefaultRadiusClass","isInactive","alignStart","baseClasses","getIconOnlySizeClasses","getSizeClasses","getVariantClasses","label","jsx","leadingSlot","renderContent","jsxs","Fragment","ButtonSpinner","iconWrapperClasses","getIconSizeClass","getIconGapClass","button","resolveRel","Tooltip"],"mappings":";;;;;;;;;;AAmFA,MAAMA,KAAe,iCACfC,KAA0B,uBAEnBC,KAASC;AAAA,EAClB,CACI;AAAA,IACI,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,MAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,SAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,MAAAC,IAAO;AAAA,IACP,SAAAC;AAAA,IACA,kBAAAC,IAAmB;AA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AA,QACAF;AAAA,QACD,gBAAAC;AAAA,UAAC;AAAA,UAAA;AAAA,YACG,WAAW,GAAGM,CAAkB,GAAG3C,IAAW,IAAI6C,EAAgB5D,GAAM,KAAK,CAAC,KAAK,EAAE;AAAA,YAEpF,UAAAI;AAAA,UAAA;AAAA,QAAA;AAAA,MACL,GACJ,IAKJ,gBAAAmD,EAAAC,GAAA,EACK,UAAA;AAAA,QAAAH;AAAA,QACAF;AAAA,MAAA,GACL;AAAA,IAER,GAGMU,IACF5C,KAAQ,CAAC4B,IACL,gBAAAO;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKzB;AAAA,QACL,MAAAV;AAAA,QACA,QAAAC;AAAA,QACA,KAAK4C,GAAW3C,GAAKD,CAAM;AAAA,QAC3B,WAAW6B;AAAA,QACX,SAASV;AAAA,QACT,QAAQG;AAAA,QACP,GAAIjB;AAAA,QAEJ,UAAA+B,EAAA;AAAA,MAAc;AAAA,IAAA,IAGnB,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKzB;AAAA,QAGL,MAAAL;AAAA,QACA,UAAUuB;AAAA,QACV,WAAWE;AAAA,QACX,SAASV;AAAA,QACT,QAAQG;AAAA,QACP,GAAGjB;AAAA,QAEH,UAAA+B,EAAA;AAAA,MAAc;AAAA,IAAA;AAI3B,WAAI3C,IASI,gBAAAyC,EAACW,KAAQ,MAAMpD,GAAS,WAAWC,GAAkB,MAAMJ,GACtD,UATOqC,IACZ,gBAAAO,EAAC,QAAA,EAAK,WAAW,iCAAiC5C,IAAW,YAAY,EAAE,IACtE,UAAAqD,EAAA,CACL,IAEAA,EAIK,CACL,IAIDA;AAAA,EACX;AACJ;AAEAhE,GAAO,cAAc;"}
1
+ {"version":3,"file":"Button.js","sources":["../../src/components/Button.tsx"],"sourcesContent":["import React, { forwardRef, useLayoutEffect, useMemo, useRef } from 'react';\nimport ButtonSpinner from './ButtonSpinner';\nimport Tooltip from './Tooltip';\nimport { getDeepActiveNode } from './activeElement';\nimport { getIconOnlySizeClasses, getIconSizeClass } from './buttonSizing';\nimport {\n getDefaultRadiusClass,\n getIconGapClass,\n getRadiusClass,\n getSizeClasses,\n getVariantClasses,\n} from './buttonStyles';\nimport { composeRefs } from './composeRefs';\nimport { isFocusVisible } from './focusRing';\nimport { resolveRel } from './linkRel';\n\n// Button variant types matching the old component\nexport type ButtonVariant =\n | 'filled'\n | 'outline'\n /**\n * `outline`'s geometry on a ground of its own. For a button sitting on a tinted or\n * patterned surface, where `outline`'s transparent background lets that surface through\n * and the control stops reading as a button.\n */\n | 'surface'\n /**\n * The violet the assistant is named in elsewhere — for a control that hands work to it, or\n * acts on what it produced. Provenance, not a severity: it says who is being asked, not\n * that anything is wrong.\n */\n | 'assistant'\n | 'destructive'\n | 'success'\n | 'warning'\n | 'error'\n | 'ghost'\n /** `ghost` until its `Surface.Row` is hovered or focused, or its menu opens. For `trailing` only. */\n | 'row-outline'\n /** Text only, in the accent colour, for a secondary action beside a primary one. */\n | 'quiet'\n /**\n * A recessed grey with secondary text, for a control whose subject is switched off, such as\n * an account set to Not allowed. It stays clickable: `disabled` is for a control that is not.\n */\n | 'muted'\n /** Secondary text on no ground, primary on hover or focus: a row's secondary affordance, e.g. its open chevron. */\n | 'subtle'\n | 'no-style';\n\nexport type ButtonSize = 'xsmall' | 'small' | 'medium' | 'large';\n\nexport type ButtonRadius = 'md' | 'lg' | 'xl';\n\ninterface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {\n variant: ButtonVariant;\n size?: ButtonSize;\n radius?: ButtonRadius;\n loading?: boolean;\n disabled?: boolean;\n icon?: React.ReactNode;\n iconPosition?: 'start' | 'end';\n /** Before the label at its own size, never squeezed (an avatar); pairs with an end `icon`. */\n leading?: React.ReactNode;\n /** `start` aligns the label to the leading edge and pins an end `icon` to the far edge. */\n contentAlign?: 'center' | 'start';\n /** Fills the container's width. */\n flexGrow?: boolean;\n /** `wide` holds a 120px floor for a primary action. */\n width?: 'auto' | 'wide';\n fill?: boolean;\n tooltip?: string;\n tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';\n iconOnly?: boolean;\n /** Pulls a borderless button out by its own padding, so its label lines up with the text around it. */\n flush?: boolean;\n children?: React.ReactNode;\n onClick?: React.MouseEventHandler<HTMLButtonElement & HTMLAnchorElement>;\n /** Renders the button as a real anchor, so a link action is never an <a> nested in a <button>. */\n href?: string;\n target?: React.HTMLAttributeAnchorTarget;\n rel?: string;\n}\n\n// The 1px is the transparent border, which `no-style` drops.\nconst FLUSH_MARGIN = '-mx-[calc(var(--btn-px)+1px)]';\nconst FLUSH_MARGIN_BORDERLESS = '-mx-[var(--btn-px)]';\n\nexport const Button = forwardRef<HTMLButtonElement | HTMLAnchorElement, ButtonProps>(\n (\n {\n variant,\n size = 'large',\n radius,\n loading = false,\n disabled = false,\n icon,\n iconPosition = 'start',\n leading,\n contentAlign = 'center',\n flexGrow = false,\n width = 'auto',\n fill = false,\n tooltip,\n tooltipPlacement = 'top',\n iconOnly = false,\n flush = false,\n children,\n className = '',\n href,\n target,\n rel,\n onBlur,\n onFocus,\n type = 'button',\n ...props\n },\n ref,\n ) => {\n const elementRef = useRef<HTMLElement | null>(null);\n // Memoised: a fresh callback ref each render would detach and re-attach the consumer's.\n const composedRef = useMemo(\n () => composeRefs(ref as React.Ref<HTMLElement>, elementRef),\n [ref],\n );\n // Loading disables the button, or swaps the element (a tooltip wrapper, a link), and\n // either drops a keyboard user's focus to <body>. It is handed back when loading ends.\n const keyboardFocus = useRef(false);\n const refocusAfterLoading = useRef(false);\n // Counts focus events, so a blur's deferred clear can tell focus came back meanwhile.\n const focusCount = useRef(0);\n\n // A layout effect, so it reads `keyboardFocus` at commit: the blur that commit causes\n // only clears it from a microtask, after this has run.\n useLayoutEffect(() => {\n if (loading) {\n refocusAfterLoading.current = keyboardFocus.current;\n return;\n }\n if (!refocusAfterLoading.current) {\n return;\n }\n refocusAfterLoading.current = false;\n const active = getDeepActiveNode();\n if (!active || active === document.body) {\n elementRef.current?.focus({ preventScroll: true });\n // Scripted focus from <body> need not match :focus-visible, yet it is still the\n // keyboard user's: the next send must hand it back too.\n if (getDeepActiveNode() === elementRef.current) {\n keyboardFocus.current = true;\n }\n }\n }, [loading]);\n\n const handleFocus = (event: React.FocusEvent<HTMLElement>) => {\n focusCount.current += 1;\n // Only keyboard focus is handed back: a mouse user never asked for focus to stay there.\n keyboardFocus.current = isFocusVisible(event.currentTarget);\n onFocus?.(event as React.FocusEvent<HTMLButtonElement>);\n };\n\n const handleBlur = (event: React.FocusEvent<HTMLElement>) => {\n // A focus trap can put focus straight back within this task; that focus wins.\n const blurredAfter = focusCount.current;\n queueMicrotask(() => {\n if (focusCount.current === blurredAfter) {\n keyboardFocus.current = false;\n }\n });\n onBlur?.(event as React.FocusEvent<HTMLButtonElement>);\n };\n\n const radiusClass = radius ? getRadiusClass(radius) : getDefaultRadiusClass(size, iconOnly);\n const isInactive = disabled || loading;\n const alignStart = contentAlign === 'start';\n const baseClasses = [\n alignStart\n ? 'flex items-center justify-start text-left'\n : 'flex items-center justify-center',\n iconOnly ? `p-0 ${getIconOnlySizeClasses(size)}` : getSizeClasses(size),\n getVariantClasses(variant, radiusClass),\n flexGrow ? 'w-full' : '',\n width === 'wide' ? 'min-w-[120px]' : '',\n fill ? 'max-w-full' : '',\n isInactive ? 'cursor-not-allowed' : '',\n tooltip && isInactive ? 'pointer-events-none' : '',\n flush && !iconOnly\n ? variant === 'no-style'\n ? FLUSH_MARGIN_BORDERLESS\n : FLUSH_MARGIN\n : '',\n className,\n ]\n .filter(Boolean)\n .join(' ');\n\n const label = alignStart ? (\n <span className=\"flex min-w-0 flex-1 items-center\">{children}</span>\n ) : (\n children\n );\n\n const leadingSlot = leading ? (\n <span\n className={\n children\n ? 'btn-leading inline-flex shrink-0 items-center me-2'\n : 'btn-leading inline-flex shrink-0 items-center'\n }\n >\n {leading}\n </span>\n ) : null;\n\n const renderContent = () => {\n if (loading) {\n return (\n <>\n {leadingSlot}\n <ButtonSpinner />\n {label}\n </>\n );\n }\n\n const iconWrapperClasses = `inline-flex items-center shrink-0 ${getIconSizeClass(size)}`;\n\n if (icon && iconPosition === 'start') {\n return (\n <>\n {leadingSlot}\n <span\n className={`${iconWrapperClasses}${children ? ` ${getIconGapClass(size, 'start')}` : ''}`}\n >\n {icon}\n </span>\n {label}\n </>\n );\n }\n\n if (icon && iconPosition === 'end') {\n return (\n <>\n {leadingSlot}\n {label}\n <span\n className={`${iconWrapperClasses}${children ? ` ${getIconGapClass(size, 'end')}` : ''}`}\n >\n {icon}\n </span>\n </>\n );\n }\n\n return (\n <>\n {leadingSlot}\n {label}\n </>\n );\n };\n\n // An anchor cannot be disabled, so an inactive link still renders as a <button>.\n const button =\n href && !isInactive ? (\n <a\n ref={composedRef}\n href={href}\n target={target}\n rel={resolveRel(rel, target)}\n className={baseClasses}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...(props as React.AnchorHTMLAttributes<HTMLAnchorElement>)}\n >\n {renderContent()}\n </a>\n ) : (\n <button\n ref={composedRef}\n // Not the browser's `submit`: an untyped Button in a form would otherwise be its\n // default button, so Enter in any field pressed it.\n type={type}\n disabled={isInactive}\n className={baseClasses}\n onFocus={handleFocus}\n onBlur={handleBlur}\n {...props}\n >\n {renderContent()}\n </button>\n );\n\n if (tooltip) {\n const trigger = isInactive ? (\n <span className={`inline-flex cursor-not-allowed${flexGrow ? ' w-full' : ''}`}>\n {button}\n </span>\n ) : (\n button\n );\n return (\n <Tooltip text={tooltip} placement={tooltipPlacement} fill={flexGrow}>\n {trigger}\n </Tooltip>\n );\n }\n\n return button;\n },\n);\n\nButton.displayName = 'Button';\n\nexport default Button;\n"],"names":["FLUSH_MARGIN","FLUSH_MARGIN_BORDERLESS","Button","forwardRef","variant","size","radius","loading","disabled","icon","iconPosition","leading","contentAlign","flexGrow","width","fill","tooltip","tooltipPlacement","iconOnly","flush","children","className","href","target","rel","onBlur","onFocus","type","props","ref","elementRef","useRef","composedRef","useMemo","composeRefs","keyboardFocus","refocusAfterLoading","focusCount","useLayoutEffect","active","getDeepActiveNode","_a","handleFocus","event","isFocusVisible","handleBlur","blurredAfter","radiusClass","getRadiusClass","getDefaultRadiusClass","isInactive","alignStart","baseClasses","getIconOnlySizeClasses","getSizeClasses","getVariantClasses","label","jsx","leadingSlot","renderContent","jsxs","Fragment","ButtonSpinner","iconWrapperClasses","getIconSizeClass","getIconGapClass","button","resolveRel","Tooltip"],"mappings":";;;;;;;;;;AAqFA,MAAMA,KAAe,iCACfC,KAA0B,uBAEnBC,KAASC;AAAA,EAClB,CACI;AAAA,IACI,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,QAAAC;AAAA,IACA,SAAAC,IAAU;AAAA,IACV,UAAAC,IAAW;AAAA,IACX,MAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,SAAAC;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,MAAAC,IAAO;AAAA,IACP,SAAAC;AAAA,IACA,kBAAAC,IAAmB;AAAA,IACnB,UAAAC,IAAW;AAAA,IACX,OAAAC,IAAQ;AAAA,IACR,UAAAC;AAAA,IACA,WAAAC,IAAY;AAAA,IACZ,MAAAC;AAAA,IACA,QAAAC;AAAA,IACA,KAAAC;AAAA,IACA,QAAAC;AAAA,IACA,SAAAC;AAAA,IACA,MAAAC,IAAO;AAAA,IACP,GAAGC;AAAA,EAAA,GAEPC,MACC;AACD,UAAMC,IAAaC,EAA2B,IAAI,GAE5CC,IAAcC;AAAA,MAChB,MAAMC,GAAYL,GAA+BC,CAAU;AAAA,MAC3D,CAACD,CAAG;AAAA,IAAA,GAIFM,IAAgBJ,EAAO,EAAK,GAC5BK,IAAsBL,EAAO,EAAK,GAElCM,IAAaN,EAAO,CAAC;AAI3B,IAAAO,EAAgB,MAAM;;AAClB,UAAI/B,GAAS;AACT,QAAA6B,EAAoB,UAAUD,EAAc;AAC5C;AAAA,MACJ;A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,EAAA;AAAA,MAAc;AAAA,IAAA,IAGnB,gBAAAF;AAAA,MAAC;AAAA,MAAA;AAAA,QACG,KAAKzB;AAAA,QAGL,MAAAL;AAAA,QACA,UAAUuB;AAAA,QACV,WAAWE;AAAA,QACX,SAASV;AAAA,QACT,QAAQG;AAAA,QACP,GAAGjB;AAAA,QAEH,UAAA+B,EAAA;AAAA,MAAc;AAAA,IAAA;AAI3B,WAAI3C,IASI,gBAAAyC,EAACW,KAAQ,MAAMpD,GAAS,WAAWC,GAAkB,MAAMJ,GACtD,UATOqC,IACZ,gBAAAO,EAAC,QAAA,EAAK,WAAW,iCAAiC5C,IAAW,YAAY,EAAE,IACtE,UAAAqD,EAAA,CACL,IAEAA,EAIK,CACL,IAIDA;AAAA,EACX;AACJ;AAEAhE,GAAO,cAAc;"}
@@ -0,0 +1,37 @@
1
+ import { jsx as r } from "react/jsx-runtime";
2
+ import n from "./CustomIcons/CheckCircleFilled.js";
3
+ import m from "./CustomIcons/CopyIcon.js";
4
+ import d from "./Tooltip.js";
5
+ import { useClipboardCopy as p } from "./useClipboardCopy.js";
6
+ const g = ({
7
+ value: e,
8
+ onCopy: o,
9
+ copied: c,
10
+ "aria-label": s = "Copy",
11
+ tooltip: t
12
+ }) => {
13
+ const { outcome: a, copy: l } = p(e), i = /* @__PURE__ */ r(
14
+ "button",
15
+ {
16
+ onClick: async () => {
17
+ (e === void 0 || await l(e)) && (o == null || o());
18
+ },
19
+ type: "button",
20
+ "aria-label": s,
21
+ className: "flex items-center justify-center w-5 h-5 hover:bg-[var(--malachite-primary-border)] rounded transition-colors flex-shrink-0 cursor-pointer",
22
+ children: c ?? a === "copied" ? /* @__PURE__ */ r(
23
+ n,
24
+ {
25
+ size: 16,
26
+ style: { color: "var(--malachite-success-foreground)" }
27
+ }
28
+ ) : /* @__PURE__ */ r(m, { size: 16 })
29
+ }
30
+ );
31
+ return t ? /* @__PURE__ */ r(d, { text: t, describesTrigger: !1, children: i }) : i;
32
+ };
33
+ export {
34
+ g as CopyButton,
35
+ g as default
36
+ };
37
+ //# sourceMappingURL=CopyButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CopyButton.js","sources":["../../src/components/CopyButton.tsx"],"sourcesContent":["import type React from 'react';\nimport CheckCircleFilled from './CustomIcons/CheckCircleFilled';\nimport CopyIcon from './CustomIcons/CopyIcon';\nimport Tooltip from './Tooltip';\nimport { useClipboardCopy } from './useClipboardCopy';\n\nexport interface CopyButtonProps {\n /** Copied on click, after which the button shows a check for a beat. */\n value?: string;\n /**\n * Called once `value` is on the clipboard: a toast, say. Not called when the copy fails or\n * the clipboard is out of reach (outside a secure context). Without `value` it is called on\n * click and the copy is the caller's.\n */\n onCopy?: () => void;\n /** Shows the check, for a caller that tracks the copy itself. */\n copied?: boolean;\n /** Default: `Copy`. */\n 'aria-label'?: string;\n tooltip?: string;\n}\n\n/**\n * The small copy control a copyable `Input` ends with, for a copyable value that is not an\n * input — a list of scopes beside its label, say — so the two read the same.\n */\nconst CopyButton: React.FC<CopyButtonProps> = ({\n value,\n onCopy,\n copied: copiedByCaller,\n 'aria-label': ariaLabel = 'Copy',\n tooltip,\n}) => {\n const { outcome, copy } = useClipboardCopy(value);\n const copied = copiedByCaller ?? outcome === 'copied';\n\n const button = (\n <button\n onClick={async () => {\n if (value === undefined || (await copy(value))) {\n onCopy?.();\n }\n }}\n type=\"button\"\n aria-label={ariaLabel}\n className=\"flex items-center justify-center w-5 h-5 hover:bg-[var(--malachite-primary-border)] rounded transition-colors flex-shrink-0 cursor-pointer\"\n >\n {copied ? (\n <CheckCircleFilled\n size={16}\n style={{ color: 'var(--malachite-success-foreground)' }}\n />\n ) : (\n <CopyIcon size={16} />\n )}\n </button>\n );\n\n return tooltip ? (\n <Tooltip text={tooltip} describesTrigger={false}>\n {button}\n </Tooltip>\n ) : (\n button\n );\n};\n\nexport default CopyButton;\nexport { CopyButton };\n"],"names":["CopyButton","value","onCopy","copiedByCaller","ariaLabel","tooltip","outcome","copy","useClipboardCopy","button","jsx","CheckCircleFilled","CopyIcon","Tooltip"],"mappings":";;;;;AA0BA,MAAMA,IAAwC,CAAC;AAAA,EAC3C,OAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAQC;AAAA,EACR,cAAcC,IAAY;AAAA,EAC1B,SAAAC;AACJ,MAAM;AACF,QAAM,EAAE,SAAAC,GAAS,MAAAC,MAASC,EAAiBP,CAAK,GAG1CQ,IACF,gBAAAC;AAAA,IAAC;AAAA,IAAA;AAAA,MACG,SAAS,YAAY;AACjB,SAAIT,MAAU,UAAc,MAAMM,EAAKN,CAAK,OACxCC,KAAA,QAAAA;AAAA,MAER;AAAA,MACA,MAAK;AAAA,MACL,cAAYE;AAAA,MACZ,WAAU;AAAA,MAET,UAbMD,KAAkBG,MAAY,WAcjC,gBAAAI;AAAA,QAACC;AAAA,QAAA;AAAA,UACG,MAAM;AAAA,UACN,OAAO,EAAE,OAAO,sCAAA;AAAA,QAAsC;AAAA,MAAA,IAG1D,gBAAAD,EAACE,GAAA,EAAS,MAAM,GAAA,CAAI;AAAA,IAAA;AAAA,EAAA;AAKhC,SAAOP,sBACFQ,GAAA,EAAQ,MAAMR,GAAS,kBAAkB,IACrC,aACL,IAEAI;AAER;"}
@@ -0,0 +1,21 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import f from "../../assets/icons/arrow_line_left.svg.js";
3
+ const i = ({
4
+ size: o = 16,
5
+ className: r = "",
6
+ style: t = {},
7
+ onClick: n
8
+ }) => {
9
+ const e = {
10
+ width: typeof o == "number" ? `${o}px` : o,
11
+ height: typeof o == "number" ? `${o}px` : o,
12
+ display: "inline-block",
13
+ fill: "currentColor",
14
+ ...t
15
+ };
16
+ return /* @__PURE__ */ l(f, { className: r, style: e, onClick: n });
17
+ };
18
+ export {
19
+ i as default
20
+ };
21
+ //# sourceMappingURL=ArrowLineLeftIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowLineLeftIcon.js","sources":["../../../src/components/CustomIcons/ArrowLineLeftIcon.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport ArrowLineLeftIconSvg from '../../assets/icons/arrow_line_left.svg?react';\n\nexport interface IconProps {\n size?: number | string;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}\n\nconst ArrowLineLeftIcon: React.FC<IconProps> = ({\n size = 16,\n className = '',\n style = {},\n onClick,\n}) => {\n const iconStyle: CSSProperties = {\n width: typeof size === 'number' ? `${size}px` : size,\n height: typeof size === 'number' ? `${size}px` : size,\n display: 'inline-block',\n fill: 'currentColor',\n ...style,\n };\n\n return <ArrowLineLeftIconSvg className={className} style={iconStyle} onClick={onClick} />;\n};\n\nexport default ArrowLineLeftIcon;\n"],"names":["ArrowLineLeftIcon","size","className","style","onClick","iconStyle","jsx","ArrowLineLeftIconSvg"],"mappings":";;AAUA,MAAMA,IAAyC,CAAC;AAAA,EAC5C,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ,CAAA;AAAA,EACR,SAAAC;AACJ,MAAM;AACF,QAAMC,IAA2B;AAAA,IAC7B,OAAO,OAAOJ,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IAChD,QAAQ,OAAOA,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IACjD,SAAS;AAAA,IACT,MAAM;AAAA,IACN,GAAGE;AAAA,EAAA;AAGP,SAAO,gBAAAG,EAACC,GAAA,EAAqB,WAAAL,GAAsB,OAAOG,GAAW,SAAAD,GAAkB;AAC3F;"}
@@ -0,0 +1,21 @@
1
+ import { jsx as l } from "react/jsx-runtime";
2
+ import i from "../../assets/icons/arrow_line_right.svg.js";
3
+ const f = ({
4
+ size: o = 16,
5
+ className: r = "",
6
+ style: t = {},
7
+ onClick: n
8
+ }) => {
9
+ const e = {
10
+ width: typeof o == "number" ? `${o}px` : o,
11
+ height: typeof o == "number" ? `${o}px` : o,
12
+ display: "inline-block",
13
+ fill: "currentColor",
14
+ ...t
15
+ };
16
+ return /* @__PURE__ */ l(i, { className: r, style: e, onClick: n });
17
+ };
18
+ export {
19
+ f as default
20
+ };
21
+ //# sourceMappingURL=ArrowLineRightIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ArrowLineRightIcon.js","sources":["../../../src/components/CustomIcons/ArrowLineRightIcon.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport ArrowLineRightIconSvg from '../../assets/icons/arrow_line_right.svg?react';\n\nexport interface IconProps {\n size?: number | string;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}\n\nconst ArrowLineRightIcon: React.FC<IconProps> = ({\n size = 16,\n className = '',\n style = {},\n onClick,\n}) => {\n const iconStyle: CSSProperties = {\n width: typeof size === 'number' ? `${size}px` : size,\n height: typeof size === 'number' ? `${size}px` : size,\n display: 'inline-block',\n fill: 'currentColor',\n ...style,\n };\n\n return <ArrowLineRightIconSvg className={className} style={iconStyle} onClick={onClick} />;\n};\n\nexport default ArrowLineRightIcon;\n"],"names":["ArrowLineRightIcon","size","className","style","onClick","iconStyle","jsx","ArrowLineRightIconSvg"],"mappings":";;AAUA,MAAMA,IAA0C,CAAC;AAAA,EAC7C,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ,CAAA;AAAA,EACR,SAAAC;AACJ,MAAM;AACF,QAAMC,IAA2B;AAAA,IAC7B,OAAO,OAAOJ,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IAChD,QAAQ,OAAOA,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IACjD,SAAS;AAAA,IACT,MAAM;AAAA,IACN,GAAGE;AAAA,EAAA;AAGP,SAAO,gBAAAG,EAACC,GAAA,EAAsB,WAAAL,GAAsB,OAAOG,GAAW,SAAAD,GAAkB;AAC5F;"}
@@ -0,0 +1,16 @@
1
+ import { jsx as p } from "react/jsx-runtime";
2
+ import e from "../../assets/icons/book.svg.js";
3
+ const m = ({ size: o = 16, className: t = "", style: r = {}, onClick: n }) => {
4
+ const l = {
5
+ width: typeof o == "number" ? `${o}px` : o,
6
+ height: typeof o == "number" ? `${o}px` : o,
7
+ display: "inline-block",
8
+ fill: "currentColor",
9
+ ...r
10
+ };
11
+ return /* @__PURE__ */ p(e, { className: t, style: l, onClick: n });
12
+ };
13
+ export {
14
+ m as default
15
+ };
16
+ //# sourceMappingURL=BookIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BookIcon.js","sources":["../../../src/components/CustomIcons/BookIcon.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport BookIconSvg from '../../assets/icons/book.svg?react';\n\nexport interface IconProps {\n size?: number | string;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}\n\nconst BookIcon: React.FC<IconProps> = ({ size = 16, className = '', style = {}, onClick }) => {\n const iconStyle: CSSProperties = {\n width: typeof size === 'number' ? `${size}px` : size,\n height: typeof size === 'number' ? `${size}px` : size,\n display: 'inline-block',\n fill: 'currentColor',\n ...style,\n };\n\n return <BookIconSvg className={className} style={iconStyle} onClick={onClick} />;\n};\n\nexport default BookIcon;\n"],"names":["BookIcon","size","className","style","onClick","iconStyle","jsx","BookIconSvg"],"mappings":";;AAUA,MAAMA,IAAgC,CAAC,EAAE,MAAAC,IAAO,IAAI,WAAAC,IAAY,IAAI,OAAAC,IAAQ,IAAI,SAAAC,QAAc;AAC1F,QAAMC,IAA2B;AAAA,IAC7B,OAAO,OAAOJ,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IAChD,QAAQ,OAAOA,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IACjD,SAAS;AAAA,IACT,MAAM;AAAA,IACN,GAAGE;AAAA,EAAA;AAGP,SAAO,gBAAAG,EAACC,GAAA,EAAY,WAAAL,GAAsB,OAAOG,GAAW,SAAAD,GAAkB;AAClF;"}
@@ -0,0 +1,21 @@
1
+ import { jsx as e } from "react/jsx-runtime";
2
+ import l from "../../assets/icons/book_open.svg.js";
3
+ const m = ({
4
+ size: o = 16,
5
+ className: t = "",
6
+ style: n = {},
7
+ onClick: r
8
+ }) => {
9
+ const p = {
10
+ width: typeof o == "number" ? `${o}px` : o,
11
+ height: typeof o == "number" ? `${o}px` : o,
12
+ display: "inline-block",
13
+ fill: "currentColor",
14
+ ...n
15
+ };
16
+ return /* @__PURE__ */ e(l, { className: t, style: p, onClick: r });
17
+ };
18
+ export {
19
+ m as default
20
+ };
21
+ //# sourceMappingURL=BookOpenIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BookOpenIcon.js","sources":["../../../src/components/CustomIcons/BookOpenIcon.tsx"],"sourcesContent":["import type { CSSProperties } from 'react';\nimport BookOpenIconSvg from '../../assets/icons/book_open.svg?react';\n\nexport interface IconProps {\n size?: number | string;\n className?: string;\n style?: CSSProperties;\n onClick?: () => void;\n}\n\nconst BookOpenIcon: React.FC<IconProps> = ({\n size = 16,\n className = '',\n style = {},\n onClick,\n}) => {\n const iconStyle: CSSProperties = {\n width: typeof size === 'number' ? `${size}px` : size,\n height: typeof size === 'number' ? `${size}px` : size,\n display: 'inline-block',\n fill: 'currentColor',\n ...style,\n };\n\n return <BookOpenIconSvg className={className} style={iconStyle} onClick={onClick} />;\n};\n\nexport default BookOpenIcon;\n"],"names":["BookOpenIcon","size","className","style","onClick","iconStyle","jsx","BookOpenIconSvg"],"mappings":";;AAUA,MAAMA,IAAoC,CAAC;AAAA,EACvC,MAAAC,IAAO;AAAA,EACP,WAAAC,IAAY;AAAA,EACZ,OAAAC,IAAQ,CAAA;AAAA,EACR,SAAAC;AACJ,MAAM;AACF,QAAMC,IAA2B;AAAA,IAC7B,OAAO,OAAOJ,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IAChD,QAAQ,OAAOA,KAAS,WAAW,GAAGA,CAAI,OAAOA;AAAA,IACjD,SAAS;AAAA,IACT,MAAM;AAAA,IACN,GAAGE;AAAA,EAAA;AAGP,SAAO,gBAAAG,EAACC,GAAA,EAAgB,WAAAL,GAAsB,OAAOG,GAAW,SAAAD,GAAkB;AACtF;"}