@stackone/malachite 2.136.0 → 2.138.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.
- package/COMPONENTS.md +4 -3
- package/dist/components/DatePicker.js +24 -22
- package/dist/components/DatePicker.js.map +1 -1
- package/dist/components/DatePickerField.js +151 -146
- package/dist/components/DatePickerField.js.map +1 -1
- package/dist/components/DatePickerPanel.js +190 -179
- package/dist/components/DatePickerPanel.js.map +1 -1
- package/dist/components/DateRangePicker.js +31 -29
- package/dist/components/DateRangePicker.js.map +1 -1
- package/dist/components/Table/Table.js +1118 -798
- package/dist/components/Table/Table.js.map +1 -1
- package/dist/components/Table/TableColumnPicker.js +70 -0
- package/dist/components/Table/TableColumnPicker.js.map +1 -0
- package/dist/components/TimeBarChart/TimeBarChart.js +120 -118
- package/dist/components/TimeBarChart/TimeBarChart.js.map +1 -1
- package/dist/components/TimeBarChart/TimeBarChartTable.js +14 -13
- package/dist/components/TimeBarChart/TimeBarChartTable.js.map +1 -1
- package/dist/components/TimeBarChart/timeBuckets.js +91 -87
- package/dist/components/TimeBarChart/timeBuckets.js.map +1 -1
- package/dist/components/Tooltip.js +80 -80
- package/dist/components/Tooltip.js.map +1 -1
- package/dist/index.d.ts +98 -1
- package/dist/index.js +36 -34
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tooltip.js","sources":["../../src/components/Tooltip.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect, useId, useInsertionEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { FOCUS_RING } from './focusRing';\nimport { ensureOverlayStyles, overlayIdentity } from './portalOverlay';\nimport { useTopLayer } from './topLayer';\nimport { useFollowTrigger } from './useFollowTrigger';\n\n// Split after each delimiter so long values (URLs, dotted paths) wrap at \"/\" or \".\"\n// instead of mid-token. <wbr> is copy-safe (a zero-width space would corrupt a copied\n// URL); overflow-wrap still handles a single run too long to fit.\nconst WRAP_AFTER = /(?<=[/\\\\.\\-_?&#=:@])/;\nconst withBreakOpportunities = (value: string): React.ReactNode =>\n value.split(WRAP_AFTER).map((chunk, i) => (\n <React.Fragment key={i}>\n {chunk}\n <wbr />\n </React.Fragment>\n ));\n\ninterface TooltipProps {\n text: React.ReactNode | string;\n children: React.ReactNode;\n delay?: number;\n wrapChildren?: boolean;\n placement?: 'top' | 'bottom' | 'left' | 'right';\n isShrinkable?: boolean;\n fill?: boolean;\n /** Max width of tooltip. Default: 320px */\n maxWidth?: number | string;\n /** Called synchronously when the trigger is hovered/focused; return false to\n * suppress the tooltip for this interaction. Lets wrappers defer expensive\n * checks (e.g. truncation measurement) to interaction time instead of mount. */\n shouldShow?: () => boolean;\n suppressed?: boolean;\n triggerAs?: 'div' | 'span';\n inline?: boolean;\n /** Whether the tooltip acts as the trigger's accessible description. False where the\n * trigger already points at the same sentence on screen, so it is not announced twice. */\n describesTrigger?: boolean;\n /** False to open on hover only, e.g. where script moves focus onto the trigger. */\n showOnFocus?: boolean;\n /** Makes a trigger that cannot take focus a tab stop. Not for focusable children. */\n focusableTrigger?: boolean;\n}\n\nconst SHRINKABLE_STYLE: React.CSSProperties = {\n minWidth: 0,\n overflow: 'hidden',\n};\n\nconst FILL_STYLE: React.CSSProperties = {\n flex: 1,\n minWidth: 0,\n};\n\n/** Kept clear of the viewport edge so a clamped tooltip does not sit flush against it. */\nconst VIEWPORT_MARGIN = 8;\n\n// The tooltip portals to document.body, outside the shadow root's `--font-sans`, so it names the\n// stack itself rather than inheriting the host page's font (a serif in an MCP card's iframe).\nconst TOOLTIP_FONT_FAMILY = '\"Inter\", ui-sans-serif, system-ui, sans-serif';\n\nconst Tooltip: React.FC<TooltipProps> = ({\n text,\n children,\n delay = 0.2,\n wrapChildren = false,\n triggerAs = 'div',\n inline = false,\n placement = 'top',\n isShrinkable = false,\n maxWidth = '320px',\n fill = false,\n shouldShow,\n suppressed = false,\n describesTrigger = true,\n showOnFocus = true,\n focusableTrigger = false,\n}) => {\n const triggerStyle =\n isShrinkable || fill\n ? { ...(isShrinkable ? SHRINKABLE_STYLE : {}), ...(fill ? FILL_STYLE : {}) }\n : undefined;\n\n const [isVisible, setIsVisible] = useState(false);\n // Portal mounts on first show, not on mount: an at-rest tooltip otherwise\n // costs a hidden document.body node plus a getBoundingClientRect per render —\n // multiplied by every row in a large table.\n // Mounted up front so a focusable trigger is described on first focus.\n const [hasShown, setHasShown] = useState(false);\n const isMounted = hasShown || focusableTrigger;\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const showFrameRef = useRef<number | null>(null);\n\n const cancelPendingShow = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n if (showFrameRef.current !== null) {\n cancelAnimationFrame(showFrameRef.current);\n showFrameRef.current = null;\n }\n }, []);\n\n const scheduleVisible = () => {\n // Two steps so the portal mounts hidden first and the fade-in transition\n // still runs on the very first show. The frame is tracked so leave/blur/\n // unmount can cancel a show that is already past its delay.\n setHasShown(true);\n if (showFrameRef.current !== null) {\n cancelAnimationFrame(showFrameRef.current);\n }\n showFrameRef.current = requestAnimationFrame(() => {\n showFrameRef.current = null;\n setIsVisible(true);\n });\n };\n const tooltipRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n // Tied to visibility, not mount: the node is latched into the DOM after its first show, and\n // re-entering on each show keeps a tooltip above the panel it is annotating.\n useTopLayer(tooltipRef, isVisible);\n\n const tooltipId = useId();\n\n const hasText = text !== null && text !== undefined && text !== '' && text !== false;\n\n const handleMouseEnter = (e: React.MouseEvent) => {\n e.stopPropagation();\n\n if (!hasText || suppressed || (shouldShow && !shouldShow())) {\n return;\n }\n\n cancelPendingShow();\n\n timeoutRef.current = setTimeout(() => {\n scheduleVisible();\n }, delay * 1000);\n };\n\n const handleMouseLeave = (e: React.MouseEvent) => {\n e.stopPropagation();\n\n cancelPendingShow();\n setIsVisible(false);\n };\n\n const handleFocus = () => {\n if (!showOnFocus || !hasText || suppressed || (shouldShow && !shouldShow())) {\n return;\n }\n\n cancelPendingShow();\n scheduleVisible();\n };\n\n const handleBlur = () => {\n cancelPendingShow();\n setIsVisible(false);\n };\n\n // Turning on while the trigger already holds focus fires no focus event to open on.\n const showOnFocusRef = useRef(showOnFocus);\n useEffect(() => {\n const switchedOn = showOnFocus && !showOnFocusRef.current;\n showOnFocusRef.current = showOnFocus;\n if (switchedOn && triggerRef.current?.matches(':focus-within')) {\n handleFocus();\n }\n });\n\n const [wasSuppressed, setWasSuppressed] = useState(suppressed);\n if (suppressed !== wasSuppressed) {\n setWasSuppressed(suppressed);\n if (suppressed) {\n setIsVisible(false);\n }\n }\n\n useEffect(() => {\n if (suppressed) {\n cancelPendingShow();\n }\n }, [suppressed, cancelPendingShow]);\n\n const [, forceUpdate] = useState({});\n\n const hideWithTrigger = useCallback(() => {\n cancelPendingShow();\n setIsVisible(false);\n }, [cancelPendingShow]);\n\n useFollowTrigger(isVisible, triggerRef, () => forceUpdate({}), hideWithTrigger);\n\n useEffect(() => {\n // Only a VISIBLE tooltip needs to track resize; keeping global listeners per mounted\n // instance made every event fan out across every tooltip on the page. Scrolling is\n // followed by useFollowTrigger.\n if (!isVisible) {\n return () => {\n cancelPendingShow();\n };\n }\n const handleUpdate = () => {\n forceUpdate({});\n };\n\n window.addEventListener('resize', handleUpdate);\n\n return () => {\n cancelPendingShow();\n window.removeEventListener('resize', handleUpdate);\n };\n }, [isVisible, cancelPendingShow]);\n\n // The first render that mounts the tooltip has no measured width yet, so the clamp below\n // cannot run on it. One extra pass once it is in the DOM gives the clamp its measurement\n // — before the opacity transition finishes, so nothing is seen sliding into place.\n useEffect(() => {\n if (isVisible) {\n forceUpdate({});\n }\n }, [isVisible]);\n\n const getTooltipStyles = (): React.CSSProperties => {\n if (!triggerRef.current) {\n return { display: 'none' };\n }\n\n const rect = triggerRef.current.getBoundingClientRect();\n\n const baseStyles: React.CSSProperties = {\n position: 'fixed',\n display: 'flex',\n width: 'max-content',\n maxWidth: typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth,\n minWidth: '32px',\n minHeight: '32px',\n padding: '8px 12px',\n alignItems: 'center',\n gap: '8px',\n borderRadius: '12px',\n backgroundColor: 'var(--malachite-tooltip-background, rgb(59, 59, 59))',\n color: 'var(--malachite-tooltip-foreground, rgb(255, 255, 255))',\n boxShadow: 'var(--malachite-tooltip-shadow, 0px 0px 10px 0px rgba(0, 0, 0, 0.20))',\n fontFamily: TOOLTIP_FONT_FAMILY,\n fontSize: '14px',\n lineHeight: '1.4',\n whiteSpace: 'normal',\n textAlign: 'left',\n pointerEvents: 'none',\n opacity: isVisible ? 1 : 0,\n visibility: isVisible ? 'visible' : 'hidden',\n transition:\n 'opacity 150ms ease-in-out, transform 150ms ease-in-out, visibility 150ms ease-in-out',\n };\n\n // A trigger near the viewport edge would otherwise centre a wide tooltip half off\n // screen, where the panel or the window crops it. Clamping the CENTRE keeps the\n // `translateX(-50%)` placement honest: the box stays put, it just stops short.\n const measured = tooltipRef.current?.getBoundingClientRect();\n const width = measured?.width ?? 0;\n const height = measured?.height ?? 0;\n\n const centeredLeft = (): number => {\n const desired = rect.left + rect.width / 2;\n\n if (width === 0) {\n return desired;\n }\n\n const half = width / 2;\n const min = VIEWPORT_MARGIN + half;\n const max = window.innerWidth - VIEWPORT_MARGIN - half;\n\n // A tooltip wider than the viewport has no in-bounds centre; leave it centred\n // rather than pinning it to a nonsensical one.\n return min > max ? desired : Math.min(Math.max(desired, min), max);\n };\n\n // At the viewport's top or bottom edge the tooltip would land where the window or an\n // embedding iframe crops it, so it flips to the side that has room.\n const fitsAbove = rect.top - 8 - height >= VIEWPORT_MARGIN;\n const fitsBelow = rect.bottom + 8 + height <= window.innerHeight - VIEWPORT_MARGIN;\n const side =\n placement === 'top' && !fitsAbove && fitsBelow\n ? 'bottom'\n : placement === 'bottom' && !fitsBelow && fitsAbove\n ? 'top'\n : placement;\n\n switch (side) {\n case 'top':\n return {\n ...baseStyles,\n top: rect.top - 8,\n left: centeredLeft(),\n transform: `translate(-50%, -100%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'bottom':\n return {\n ...baseStyles,\n top: rect.bottom + 8,\n left: centeredLeft(),\n transform: `translateX(-50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'left':\n return {\n ...baseStyles,\n top: rect.top + rect.height / 2,\n left: rect.left - 8,\n transform: `translate(-100%, -50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'right':\n return {\n ...baseStyles,\n top: rect.top + rect.height / 2,\n left: rect.right + 8,\n transform: `translateY(-50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n default:\n return {\n ...baseStyles,\n top: rect.top - 8,\n left: centeredLeft(),\n transform: `translate(-50%, -100%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n }\n };\n\n // Only reference the tooltip id once the portal can exist — a dangling\n // aria-describedby (text set, never shown) confuses assistive tech.\n const describedBy = hasText && isMounted && describesTrigger ? tooltipId : undefined;\n useInsertionEffect(() => {\n if (hasText && isMounted) {\n ensureOverlayStyles();\n }\n }, [hasText, isMounted]);\n const renderedChildren = focusableTrigger ? (\n children\n ) : wrapChildren || !React.isValidElement(children) ? (\n <span aria-describedby={describedBy} style={fill ? FILL_STYLE : undefined}>\n {children}\n </span>\n ) : (\n React.cloneElement(children as React.ReactElement, {\n 'aria-describedby':\n [(children as React.ReactElement).props['aria-describedby'], describedBy]\n .filter(Boolean)\n .join(' ') || undefined,\n })\n );\n\n const Trigger = inline ? 'span' : triggerAs;\n const isTabStop = focusableTrigger && hasText && !suppressed && showOnFocus;\n\n // Create the tooltip content without its own shadow root\n return (\n <>\n <Trigger\n ref={triggerRef}\n className={`relative ${inline ? 'inline-flex max-w-full align-middle' : 'flex'} items-center${isTabStop ? ` ${FOCUS_RING}` : ''}`}\n style={triggerStyle}\n tabIndex={isTabStop ? 0 : undefined}\n aria-describedby={focusableTrigger ? describedBy : undefined}\n onMouseEnter={handleMouseEnter}\n onMouseLeave={handleMouseLeave}\n onFocus={handleFocus}\n onBlur={handleBlur}\n >\n {renderedChildren}\n </Trigger>\n\n {hasText &&\n isMounted &&\n createPortal(\n <div\n ref={tooltipRef}\n id={tooltipId}\n role=\"tooltip\"\n // Nothing references it, and the sentence is already on screen and\n // described: left in the tree it is a second copy to read past.\n aria-hidden={describesTrigger ? undefined : true}\n {...overlayIdentity('tooltip')}\n style={getTooltipStyles()}\n >\n {/* min-w-0 + overflow-wrap let long values wrap within maxWidth. */}\n <span\n style={{\n minWidth: 0,\n overflowWrap: 'anywhere',\n }}\n >\n {typeof text === 'string' ? withBreakOpportunities(text) : text}\n </span>\n </div>,\n document.body,\n )}\n </>\n );\n};\n\nexport default Tooltip;\n"],"names":["WRAP_AFTER","withBreakOpportunities","value","chunk","i","jsxs","React","SHRINKABLE_STYLE","FILL_STYLE","VIEWPORT_MARGIN","TOOLTIP_FONT_FAMILY","Tooltip","text","children","delay","wrapChildren","triggerAs","inline","placement","isShrinkable","maxWidth","fill","shouldShow","suppressed","describesTrigger","showOnFocus","focusableTrigger","triggerStyle","isVisible","setIsVisible","useState","hasShown","setHasShown","isMounted","timeoutRef","useRef","showFrameRef","cancelPendingShow","useCallback","scheduleVisible","tooltipRef","triggerRef","useTopLayer","tooltipId","useId","hasText","handleMouseEnter","e","handleMouseLeave","handleFocus","handleBlur","showOnFocusRef","useEffect","switchedOn","_a","wasSuppressed","setWasSuppressed","forceUpdate","hideWithTrigger","useFollowTrigger","handleUpdate","getTooltipStyles","rect","baseStyles","measured","width","height","centeredLeft","desired","half","min","max","fitsAbove","fitsBelow","describedBy","useInsertionEffect","ensureOverlayStyles","renderedChildren","jsx","Trigger","isTabStop","Fragment","FOCUS_RING","createPortal","overlayIdentity"],"mappings":";;;;;;;AAUA,MAAMA,KAAa,WAAA,yBAAA,GACbC,KAAyB,CAACC,MAC5BA,EAAM,MAAMF,E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hC,KACGZ,KACAkD;AAAA,MACI,gBAAAL;AAAA,QAAC;AAAA,QAAA;AAAA,UACG,KAAKtC;AAAA,UACL,IAAIG;AAAA,UACJ,MAAK;AAAA,UAGL,eAAanB,IAAmB,SAAY;AAAA,UAC3C,GAAG4D,GAAgB,SAAS;AAAA,UAC7B,OAAOvB,GAAA;AAAA,UAGP,UAAA,gBAAAiB;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,OAAO;AAAA,gBACH,UAAU;AAAA,gBACV,cAAc;AAAA,cAAA;AAAA,cAGjB,UAAA,OAAOlE,KAAS,WAAWX,GAAuBW,CAAI,IAAIA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC/D;AAAA,MAAA;AAAA,MAEJ,SAAS;AAAA,IAAA;AAAA,EACb,GACR;AAER;"}
|
|
1
|
+
{"version":3,"file":"Tooltip.js","sources":["../../src/components/Tooltip.tsx"],"sourcesContent":["import React, { useState, useRef, useEffect, useId, useInsertionEffect, useCallback } from 'react';\nimport { createPortal } from 'react-dom';\nimport { FOCUS_RING } from './focusRing';\nimport { ensureOverlayStyles, overlayIdentity } from './portalOverlay';\nimport { useTopLayer } from './topLayer';\nimport { useFollowTrigger } from './useFollowTrigger';\n\n// Split after each delimiter so long values (URLs, dotted paths) wrap at \"/\" or \".\"\n// instead of mid-token. <wbr> is copy-safe (a zero-width space would corrupt a copied\n// URL); overflow-wrap still handles a single run too long to fit.\nconst WRAP_AFTER = /(?<=[/\\\\.\\-_?&#=:@])/;\nconst withBreakOpportunities = (value: string): React.ReactNode =>\n value.split(WRAP_AFTER).map((chunk, i) => (\n <React.Fragment key={i}>\n {chunk}\n <wbr />\n </React.Fragment>\n ));\n\ninterface TooltipProps {\n text: React.ReactNode | string;\n children: React.ReactNode;\n delay?: number;\n wrapChildren?: boolean;\n placement?: 'top' | 'bottom' | 'left' | 'right';\n isShrinkable?: boolean;\n fill?: boolean;\n /** Max width of tooltip. Default: 320px */\n maxWidth?: number | string;\n /** Called synchronously when the trigger is hovered/focused; return false to\n * suppress the tooltip for this interaction. Lets wrappers defer expensive\n * checks (e.g. truncation measurement) to interaction time instead of mount. */\n shouldShow?: () => boolean;\n suppressed?: boolean;\n triggerAs?: 'div' | 'span';\n inline?: boolean;\n /** Whether the tooltip acts as the trigger's accessible description. False where the\n * trigger already points at the same sentence on screen, so it is not announced twice. */\n describesTrigger?: boolean;\n /** False to open on hover only, e.g. where script moves focus onto the trigger. */\n showOnFocus?: boolean;\n /** Makes a trigger that cannot take focus a tab stop. Not for focusable children. */\n focusableTrigger?: boolean;\n}\n\nconst SHRINKABLE_STYLE: React.CSSProperties = {\n minWidth: 0,\n overflow: 'hidden',\n};\n\nconst FILL_STYLE: React.CSSProperties = {\n flex: 1,\n minWidth: 0,\n};\n\n/** Kept clear of the viewport edge so a clamped tooltip does not sit flush against it. */\nconst VIEWPORT_MARGIN = 8;\n\n// The tooltip portals to document.body, outside the shadow root's `--font-sans`, so it names the\n// stack itself rather than inheriting the host page's font (a serif in an MCP card's iframe).\nconst TOOLTIP_FONT_FAMILY = '\"Inter\", ui-sans-serif, system-ui, sans-serif';\n\nconst Tooltip: React.FC<TooltipProps> = ({\n text,\n children,\n delay = 0.2,\n wrapChildren = false,\n triggerAs = 'div',\n inline = false,\n placement = 'top',\n isShrinkable = false,\n maxWidth = '320px',\n fill = false,\n shouldShow,\n suppressed = false,\n describesTrigger = true,\n showOnFocus = true,\n focusableTrigger = false,\n}) => {\n const triggerStyle =\n isShrinkable || fill\n ? { ...(isShrinkable ? SHRINKABLE_STYLE : {}), ...(fill ? FILL_STYLE : {}) }\n : undefined;\n\n const [isVisible, setIsVisible] = useState(false);\n // Portal mounts on first show, not on mount: an at-rest tooltip otherwise\n // costs a hidden document.body node plus a getBoundingClientRect per render —\n // multiplied by every row in a large table.\n // Mounted up front so a focusable trigger is described on first focus.\n const [hasShown, setHasShown] = useState(false);\n const isMounted = hasShown || focusableTrigger;\n const timeoutRef = useRef<NodeJS.Timeout | null>(null);\n const showFrameRef = useRef<number | null>(null);\n\n const cancelPendingShow = useCallback(() => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n if (showFrameRef.current !== null) {\n cancelAnimationFrame(showFrameRef.current);\n showFrameRef.current = null;\n }\n }, []);\n\n const scheduleVisible = () => {\n // Two steps so the portal mounts hidden first and the fade-in transition\n // still runs on the very first show. The frame is tracked so leave/blur/\n // unmount can cancel a show that is already past its delay.\n setHasShown(true);\n if (showFrameRef.current !== null) {\n cancelAnimationFrame(showFrameRef.current);\n }\n showFrameRef.current = requestAnimationFrame(() => {\n showFrameRef.current = null;\n setIsVisible(true);\n });\n };\n const tooltipRef = useRef<HTMLDivElement>(null);\n const triggerRef = useRef<HTMLDivElement>(null);\n\n // Tied to visibility, not mount: the node is latched into the DOM after its first show, and\n // re-entering on each show keeps a tooltip above the panel it is annotating.\n useTopLayer(tooltipRef, isVisible);\n\n const tooltipId = useId();\n\n const hasText = text !== null && text !== undefined && text !== '' && text !== false;\n\n // Over/out rather than enter/leave: React derives enter/leave from over/out pairs that never\n // resolve inside a shadow-root portal (a popover), but over/out themselves arrive there.\n const crossesTrigger = (event: React.MouseEvent<HTMLElement>): boolean =>\n !(event.relatedTarget instanceof Node && event.currentTarget.contains(event.relatedTarget));\n\n const handleMouseOver = (event: React.MouseEvent<HTMLElement>) => {\n if (!crossesTrigger(event) || !hasText || suppressed || (shouldShow && !shouldShow())) {\n return;\n }\n\n cancelPendingShow();\n\n timeoutRef.current = setTimeout(() => {\n scheduleVisible();\n }, delay * 1000);\n };\n\n const handleMouseOut = (event: React.MouseEvent<HTMLElement>) => {\n if (!crossesTrigger(event)) {\n return;\n }\n cancelPendingShow();\n setIsVisible(false);\n };\n\n const handleFocus = () => {\n if (!showOnFocus || !hasText || suppressed || (shouldShow && !shouldShow())) {\n return;\n }\n\n cancelPendingShow();\n scheduleVisible();\n };\n\n const handleBlur = () => {\n cancelPendingShow();\n setIsVisible(false);\n };\n\n // Turning on while the trigger already holds focus fires no focus event to open on.\n const showOnFocusRef = useRef(showOnFocus);\n useEffect(() => {\n const switchedOn = showOnFocus && !showOnFocusRef.current;\n showOnFocusRef.current = showOnFocus;\n if (switchedOn && triggerRef.current?.matches(':focus-within')) {\n handleFocus();\n }\n });\n\n const [wasSuppressed, setWasSuppressed] = useState(suppressed);\n if (suppressed !== wasSuppressed) {\n setWasSuppressed(suppressed);\n if (suppressed) {\n setIsVisible(false);\n }\n }\n\n useEffect(() => {\n if (suppressed) {\n cancelPendingShow();\n }\n }, [suppressed, cancelPendingShow]);\n\n const [, forceUpdate] = useState({});\n\n const hideWithTrigger = useCallback(() => {\n cancelPendingShow();\n setIsVisible(false);\n }, [cancelPendingShow]);\n\n useFollowTrigger(isVisible, triggerRef, () => forceUpdate({}), hideWithTrigger);\n\n useEffect(() => {\n // Only a VISIBLE tooltip needs to track resize; keeping global listeners per mounted\n // instance made every event fan out across every tooltip on the page. Scrolling is\n // followed by useFollowTrigger.\n if (!isVisible) {\n return () => {\n cancelPendingShow();\n };\n }\n const handleUpdate = () => {\n forceUpdate({});\n };\n\n window.addEventListener('resize', handleUpdate);\n\n return () => {\n cancelPendingShow();\n window.removeEventListener('resize', handleUpdate);\n };\n }, [isVisible, cancelPendingShow]);\n\n // The first render that mounts the tooltip has no measured width yet, so the clamp below\n // cannot run on it. One extra pass once it is in the DOM gives the clamp its measurement\n // — before the opacity transition finishes, so nothing is seen sliding into place.\n useEffect(() => {\n if (isVisible) {\n forceUpdate({});\n }\n }, [isVisible]);\n\n const getTooltipStyles = (): React.CSSProperties => {\n if (!triggerRef.current) {\n return { display: 'none' };\n }\n\n const rect = triggerRef.current.getBoundingClientRect();\n\n const baseStyles: React.CSSProperties = {\n position: 'fixed',\n display: 'flex',\n width: 'max-content',\n maxWidth: typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth,\n minWidth: '32px',\n minHeight: '32px',\n padding: '8px 12px',\n alignItems: 'center',\n gap: '8px',\n borderRadius: '12px',\n backgroundColor: 'var(--malachite-tooltip-background, rgb(59, 59, 59))',\n color: 'var(--malachite-tooltip-foreground, rgb(255, 255, 255))',\n boxShadow: 'var(--malachite-tooltip-shadow, 0px 0px 10px 0px rgba(0, 0, 0, 0.20))',\n fontFamily: TOOLTIP_FONT_FAMILY,\n fontSize: '14px',\n lineHeight: '1.4',\n whiteSpace: 'normal',\n textAlign: 'left',\n pointerEvents: 'none',\n opacity: isVisible ? 1 : 0,\n visibility: isVisible ? 'visible' : 'hidden',\n transition:\n 'opacity 150ms ease-in-out, transform 150ms ease-in-out, visibility 150ms ease-in-out',\n };\n\n // A trigger near the viewport edge would otherwise centre a wide tooltip half off\n // screen, where the panel or the window crops it. Clamping the CENTRE keeps the\n // `translateX(-50%)` placement honest: the box stays put, it just stops short.\n const measured = tooltipRef.current?.getBoundingClientRect();\n const width = measured?.width ?? 0;\n const height = measured?.height ?? 0;\n\n const centeredLeft = (): number => {\n const desired = rect.left + rect.width / 2;\n\n if (width === 0) {\n return desired;\n }\n\n const half = width / 2;\n const min = VIEWPORT_MARGIN + half;\n const max = window.innerWidth - VIEWPORT_MARGIN - half;\n\n // A tooltip wider than the viewport has no in-bounds centre; leave it centred\n // rather than pinning it to a nonsensical one.\n return min > max ? desired : Math.min(Math.max(desired, min), max);\n };\n\n // At the viewport's top or bottom edge the tooltip would land where the window or an\n // embedding iframe crops it, so it flips to the side that has room.\n const fitsAbove = rect.top - 8 - height >= VIEWPORT_MARGIN;\n const fitsBelow = rect.bottom + 8 + height <= window.innerHeight - VIEWPORT_MARGIN;\n const side =\n placement === 'top' && !fitsAbove && fitsBelow\n ? 'bottom'\n : placement === 'bottom' && !fitsBelow && fitsAbove\n ? 'top'\n : placement;\n\n switch (side) {\n case 'top':\n return {\n ...baseStyles,\n top: rect.top - 8,\n left: centeredLeft(),\n transform: `translate(-50%, -100%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'bottom':\n return {\n ...baseStyles,\n top: rect.bottom + 8,\n left: centeredLeft(),\n transform: `translateX(-50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'left':\n return {\n ...baseStyles,\n top: rect.top + rect.height / 2,\n left: rect.left - 8,\n transform: `translate(-100%, -50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n case 'right':\n return {\n ...baseStyles,\n top: rect.top + rect.height / 2,\n left: rect.right + 8,\n transform: `translateY(-50%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n default:\n return {\n ...baseStyles,\n top: rect.top - 8,\n left: centeredLeft(),\n transform: `translate(-50%, -100%) ${isVisible ? 'scale(1)' : 'scale(0.95)'}`,\n };\n }\n };\n\n // Only reference the tooltip id once the portal can exist — a dangling\n // aria-describedby (text set, never shown) confuses assistive tech.\n const describedBy = hasText && isMounted && describesTrigger ? tooltipId : undefined;\n useInsertionEffect(() => {\n if (hasText && isMounted) {\n ensureOverlayStyles();\n }\n }, [hasText, isMounted]);\n const renderedChildren = focusableTrigger ? (\n children\n ) : wrapChildren || !React.isValidElement(children) ? (\n <span aria-describedby={describedBy} style={fill ? FILL_STYLE : undefined}>\n {children}\n </span>\n ) : (\n React.cloneElement(children as React.ReactElement, {\n 'aria-describedby':\n [(children as React.ReactElement).props['aria-describedby'], describedBy]\n .filter(Boolean)\n .join(' ') || undefined,\n })\n );\n\n const Trigger = inline ? 'span' : triggerAs;\n const isTabStop = focusableTrigger && hasText && !suppressed && showOnFocus;\n\n // Create the tooltip content without its own shadow root\n return (\n <>\n <Trigger\n ref={triggerRef}\n className={`relative ${inline ? 'inline-flex max-w-full align-middle' : 'flex'} items-center${isTabStop ? ` ${FOCUS_RING}` : ''}`}\n style={triggerStyle}\n tabIndex={isTabStop ? 0 : undefined}\n aria-describedby={focusableTrigger ? describedBy : undefined}\n onMouseOver={handleMouseOver}\n onMouseOut={handleMouseOut}\n onFocus={handleFocus}\n onBlur={handleBlur}\n >\n {renderedChildren}\n </Trigger>\n\n {hasText &&\n isMounted &&\n createPortal(\n <div\n ref={tooltipRef}\n id={tooltipId}\n role=\"tooltip\"\n // Nothing references it, and the sentence is already on screen and\n // described: left in the tree it is a second copy to read past.\n aria-hidden={describesTrigger ? undefined : true}\n {...overlayIdentity('tooltip')}\n style={getTooltipStyles()}\n >\n {/* min-w-0 + overflow-wrap let long values wrap within maxWidth. */}\n <span\n style={{\n minWidth: 0,\n overflowWrap: 'anywhere',\n }}\n >\n {typeof text === 'string' ? withBreakOpportunities(text) : text}\n </span>\n </div>,\n document.body,\n )}\n </>\n );\n};\n\nexport default Tooltip;\n"],"names":["WRAP_AFTER","withBreakOpportunities","value","chunk","i","jsxs","React","SHRINKABLE_STYLE","FILL_STYLE","VIEWPORT_MARGIN","TOOLTIP_FONT_FAMILY","Tooltip","text","children","delay","wrapChildren","triggerAs","inline","placement","isShrinkable","maxWidth","fill","shouldShow","suppressed","describesTrigger","showOnFocus","focusableTrigger","triggerStyle","isVisible","setIsVisible","useState","hasShown","setHasShown","isMounted","timeoutRef","useRef","showFrameRef","cancelPendingShow","useCallback","scheduleVisible","tooltipRef","triggerRef","useTopLayer","tooltipId","useId","hasText","crossesTrigger","event","handleMouseOver","handleMouseOut","handleFocus","handleBlur","showOnFocusRef","useEffect","switchedOn","_a","wasSuppressed","setWasSuppressed","forceUpdate","hideWithTrigger","useFollowTrigger","handleUpdate","getTooltipStyles","rect","baseStyles","measured","width","height","centeredLeft","desired","half","min","max","fitsAbove","fitsBelow","describedBy","useInsertionEffect","ensureOverlayStyles","renderedChildren","jsx","Trigger","isTabStop","Fragment","FOCUS_RING","createPortal","overlayIdentity"],"mappings":";;;;;;;AAUA,MAAMA,KAAa,WAAA,yBAAA,GACbC,KAAyB,CAACC,MAC5BA,EAAM,MAAMF,EAAU,EAAE,IAAI,CAACG,GAAOC,MAChC,gBAAAC,EAACC,EAAM,UAAN,EACI,UAAA;AAAA,EAAAH;AAAA,oBACA,OAAA,CAAA,CAAI;AAAA,EAAA,GAFYC,CAGrB,CACH,GA4BCG,KAAw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,UACG,KAAKvC;AAAA,UACL,IAAIG;AAAA,UACJ,MAAK;AAAA,UAGL,eAAanB,IAAmB,SAAY;AAAA,UAC3C,GAAG6D,GAAgB,SAAS;AAAA,UAC7B,OAAOvB,GAAA;AAAA,UAGP,UAAA,gBAAAiB;AAAA,YAAC;AAAA,YAAA;AAAA,cACG,OAAO;AAAA,gBACH,UAAU;AAAA,gBACV,cAAc;AAAA,cAAA;AAAA,cAGjB,UAAA,OAAOnE,KAAS,WAAWX,GAAuBW,CAAI,IAAIA;AAAA,YAAA;AAAA,UAAA;AAAA,QAC/D;AAAA,MAAA;AAAA,MAEJ,SAAS;AAAA,IAAA;AAAA,EACb,GACR;AAER;"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1795,6 +1795,10 @@ export declare type DatePickerTone = 'default' | 'chosen' | 'pending';
|
|
|
1795
1795
|
/** Pass a function for a relative preset, so it is measured when clicked. */
|
|
1796
1796
|
export declare interface DatePreset<T> {
|
|
1797
1797
|
label: string;
|
|
1798
|
+
/** Shown but never resolved or committed, e.g. a range the plan does not include. */
|
|
1799
|
+
disabled?: boolean;
|
|
1800
|
+
/** Why a disabled preset is locked: a tooltip, and the button's accessible description. */
|
|
1801
|
+
disabledReason?: string;
|
|
1798
1802
|
value: T | (() => T);
|
|
1799
1803
|
}
|
|
1800
1804
|
|
|
@@ -6368,7 +6372,7 @@ export declare interface TabItem {
|
|
|
6368
6372
|
content?: default_2.ReactNode;
|
|
6369
6373
|
}
|
|
6370
6374
|
|
|
6371
|
-
export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, loadingRowCount, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, error, errorTitle, errorSubTitle, emptyTitle, emptySubTitle, bordered, showHeader, rowKey, scrollHeight, size, rowDensity, layout, headerVariant, title, subtitle, extra, rowClassName, rowVariant, onRow, onClickRow, selectedRowKey, scrollSelectedIntoView, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, onVisibleOrderChange, virtual, virtualRowHeightEstimate, virtualScrollElement, }: TableProps<T>) => JSX_2.Element;
|
|
6375
|
+
export declare const Table: <T = Record<string, unknown>>({ columns, data, loading, loadingRowCount, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, error, errorTitle, errorSubTitle, emptyTitle, emptySubTitle, bordered, showHeader, rowKey, scrollHeight, size, rowDensity, layout, headerVariant, title, subtitle, extra, rowClassName, rowVariant, onRow, onClickRow, selectedRowKey, scrollSelectedIntoView, rowSelection, pagination, className, style, stickyHeaderTop, scrollX, rowSection, renderSectionDivider, onVisibleOrderChange, virtual, virtualRowHeightEstimate, virtualScrollElement, expandable: expandableProp, onReachEnd, loadingMore, loadingMoreText, rowThread: rowThreadProp, rowThreadTitle, }: TableProps<T>) => JSX_2.Element;
|
|
6372
6376
|
|
|
6373
6377
|
export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
6374
6378
|
title: string | default_2.ReactNode;
|
|
@@ -6405,8 +6409,51 @@ export declare type TableColumnDefinition<T = Record<string, unknown>> = {
|
|
|
6405
6409
|
align?: 'left' | 'center' | 'right';
|
|
6406
6410
|
};
|
|
6407
6411
|
|
|
6412
|
+
/**
|
|
6413
|
+
* Chooses which of a table's columns show. Filter the `columns` passed to `Table` by
|
|
6414
|
+
* `visibleKeys`. Every change hands back the keys in `columns` order, locked columns included,
|
|
6415
|
+
* so the table's order never depends on the order they were switched on.
|
|
6416
|
+
*/
|
|
6417
|
+
export declare const TableColumnPicker: default_2.FC<TableColumnPickerProps>;
|
|
6418
|
+
|
|
6419
|
+
export declare interface TableColumnPickerColumn {
|
|
6420
|
+
key: string;
|
|
6421
|
+
title: string;
|
|
6422
|
+
/** `false` keeps the column shown: it is listed, checked, says it is always shown, and
|
|
6423
|
+
* cannot be turned off. */
|
|
6424
|
+
hideable?: boolean;
|
|
6425
|
+
}
|
|
6426
|
+
|
|
6427
|
+
export declare interface TableColumnPickerProps {
|
|
6428
|
+
columns: readonly TableColumnPickerColumn[];
|
|
6429
|
+
/** The keys shown. Controlled. Include every `hideable: false` column's key, or the table
|
|
6430
|
+
* filtering by these hides a column the picker shows locked on. */
|
|
6431
|
+
visibleKeys: readonly string[];
|
|
6432
|
+
onVisibleKeysChange: (keys: string[]) => void;
|
|
6433
|
+
/** Shown in the header, to put the defaults back. */
|
|
6434
|
+
onReset?: () => void;
|
|
6435
|
+
/** The trigger's text and the panel's name. Default "Columns". */
|
|
6436
|
+
label?: string;
|
|
6437
|
+
}
|
|
6438
|
+
|
|
6408
6439
|
export declare type TableColumns<T = Record<string, unknown>> = TableColumnDefinition<T>[];
|
|
6409
6440
|
|
|
6441
|
+
/**
|
|
6442
|
+
* Rows nested under a parent row, such as the calls of one session. Detached header only.
|
|
6443
|
+
* Children follow their parent through a sort and are never sorted among themselves.
|
|
6444
|
+
*/
|
|
6445
|
+
export declare type TableExpandable<T = Record<string, unknown>> = {
|
|
6446
|
+
/** The rows under a record. A record with none, or an empty list, gets no toggle. Taken as
|
|
6447
|
+
* pure, like a function `rowKey`: the rows are read again when `data` or the open parents
|
|
6448
|
+
* change, not when a new function is passed. Give children a `rowKey` of their own. */
|
|
6449
|
+
childRows: (record: T) => readonly T[] | undefined;
|
|
6450
|
+
/** The parents shown open, resolved against `rowKey`. Controlled. */
|
|
6451
|
+
expandedRowKeys: readonly default_2.Key[];
|
|
6452
|
+
onExpandedRowKeysChange: (keys: default_2.Key[]) => void;
|
|
6453
|
+
/** Drawn after a parent's first cell, such as a count of its children. */
|
|
6454
|
+
summary?: (record: T, children: readonly T[]) => default_2.ReactNode;
|
|
6455
|
+
};
|
|
6456
|
+
|
|
6410
6457
|
/** What the table reads from a column's `onHeaderCell`: `onClick`, run from the sort button. */
|
|
6411
6458
|
export declare interface TableHeaderCellHandlers {
|
|
6412
6459
|
onClick?: (event: default_2.MouseEvent<HTMLButtonElement>) => void;
|
|
@@ -6513,6 +6560,28 @@ declare type TableProps<T = Record<string, unknown>> = {
|
|
|
6513
6560
|
* scroll away). Pass the element from state (not a ref) so it arrives after
|
|
6514
6561
|
* mount. The table body stops scrolling when this is set. */
|
|
6515
6562
|
virtualScrollElement?: HTMLElement | null;
|
|
6563
|
+
/** Parent rows that open onto child rows. Detached header only; needs a `rowKey`.
|
|
6564
|
+
* Expanded children count as rows everywhere else: `selectedRowKey`, the arrow keys and
|
|
6565
|
+
* `onVisibleOrderChange` all see them. On a focused clickable parent row, right opens it
|
|
6566
|
+
* and left closes it; its toggle button opens and closes it on any row. */
|
|
6567
|
+
expandable?: TableExpandable<T>;
|
|
6568
|
+
/** Called when the last row scrolls within 200px of view, to load the next page onto
|
|
6569
|
+
* `data`. Called once per length of `data`, so a page that adds no rows does not loop;
|
|
6570
|
+
* scrolling away and back, a reload through `loading`, and an `error` clearing each call
|
|
6571
|
+
* it again. Not while `loading`, `loadingMore` or `error`, nor on an empty table.
|
|
6572
|
+
* Detached header only. Leave it out once there is nothing more to load. */
|
|
6573
|
+
onReachEnd?: () => void;
|
|
6574
|
+
/** Draws a trailing row saying more rows are on their way. Detached header only. */
|
|
6575
|
+
loadingMore?: boolean;
|
|
6576
|
+
/** The trailing row's text. Default "Loading more". */
|
|
6577
|
+
loadingMoreText?: string;
|
|
6578
|
+
/** Adds a gutter ahead of the first column threading rows together, such as the calls of
|
|
6579
|
+
* one session. A row it returns nothing for gets an empty gutter. `index` is the row's
|
|
6580
|
+
* rendered position, as everywhere else, so after a sort it is not its place in `data`.
|
|
6581
|
+
* Detached header only. */
|
|
6582
|
+
rowThread?: (record: T, index: number) => TableRowThread | undefined;
|
|
6583
|
+
/** Names the gutter's column for assistive technology. Default "Thread". */
|
|
6584
|
+
rowThreadTitle?: string;
|
|
6516
6585
|
};
|
|
6517
6586
|
|
|
6518
6587
|
declare type TableRowActions<T = Record<string, unknown>> = {
|
|
@@ -6541,6 +6610,28 @@ export declare type TableRowSelection<T = Record<string, unknown>> = {
|
|
|
6541
6610
|
selections?: boolean | default_2.ReactNode[];
|
|
6542
6611
|
};
|
|
6543
6612
|
|
|
6613
|
+
/**
|
|
6614
|
+
* One row's place on a thread: a dot in a gutter ahead of the first column, joined by a line to
|
|
6615
|
+
* the rows above and below it on the same thread, such as the calls of one session.
|
|
6616
|
+
*/
|
|
6617
|
+
export declare type TableRowThread = {
|
|
6618
|
+
/** Draw the line up to the row above. */
|
|
6619
|
+
joinsAbove: boolean;
|
|
6620
|
+
/** Draw the line down to the row below. */
|
|
6621
|
+
joinsBelow: boolean;
|
|
6622
|
+
/** `lead` marks a thread's first row, `current` the row the thread is focused on. */
|
|
6623
|
+
emphasis?: 'lead' | 'follow' | 'current';
|
|
6624
|
+
} & ({
|
|
6625
|
+
/** Names the dot, and shows as its tooltip. */
|
|
6626
|
+
label?: string;
|
|
6627
|
+
onClick?: never;
|
|
6628
|
+
} | {
|
|
6629
|
+
/** Names the dot's button, which has nothing else to be called by. */
|
|
6630
|
+
label: string;
|
|
6631
|
+
/** Makes the dot a button. */
|
|
6632
|
+
onClick: () => void;
|
|
6633
|
+
});
|
|
6634
|
+
|
|
6544
6635
|
export declare type TableSize = 'small' | 'medium' | 'large';
|
|
6545
6636
|
|
|
6546
6637
|
export declare type TableType = 'default' | 'compact' | 'bordered';
|
|
@@ -6779,6 +6870,10 @@ export declare interface TimeBarChartProps {
|
|
|
6779
6870
|
valueLabel?: string;
|
|
6780
6871
|
/** A legend naming each series. Leave it off only where the page labels the series itself. */
|
|
6781
6872
|
legend?: boolean;
|
|
6873
|
+
/** The zone of the axis, tooltip and table labels, `utc` by default. Buckets, ticks, `range`
|
|
6874
|
+
* and `onRangeSelect` stay UTC either way, so in a zone behind UTC a day or month bar starts
|
|
6875
|
+
* on the previous local date and is labelled by it; local labels carry their UTC offset. */
|
|
6876
|
+
timeZone?: TimeBarChartTimeZone;
|
|
6782
6877
|
/** A time whose bucket is shaded behind the bars, e.g. the row under the pointer in a list. */
|
|
6783
6878
|
highlightTime?: TimeInput;
|
|
6784
6879
|
/** Turns on click-and-drag selection of whole buckets. */
|
|
@@ -6816,6 +6911,8 @@ export declare interface TimeBarChartSwatchProps {
|
|
|
6816
6911
|
tone: TimeBarChartTone;
|
|
6817
6912
|
}
|
|
6818
6913
|
|
|
6914
|
+
export declare type TimeBarChartTimeZone = DatePickerTimeZone;
|
|
6915
|
+
|
|
6819
6916
|
export declare type TimeBarChartTone = 'success' | 'error' | 'neutral';
|
|
6820
6917
|
|
|
6821
6918
|
export declare type TimeBarChartUnit = 'minute' | 'hour' | 'day' | 'week' | 'month';
|
package/dist/index.js
CHANGED
|
@@ -245,23 +245,24 @@ import { default as yl } from "./components/CustomIcons/StepUpcomingIcon.js";
|
|
|
245
245
|
import { default as _l } from "./components/CustomIcons/SuggestedIcon.js";
|
|
246
246
|
import { default as Ml } from "./components/CustomIcons/SyntheticWebhookIcon.js";
|
|
247
247
|
import { default as Wl } from "./components/Table/Table.js";
|
|
248
|
-
import {
|
|
249
|
-
import { default as Gl } from "./components/
|
|
250
|
-
import { default as Vl } from "./components/CustomIcons/
|
|
251
|
-
import {
|
|
252
|
-
import {
|
|
253
|
-
import {
|
|
254
|
-
import { default as Zl } from "./components/CustomIcons/
|
|
255
|
-
import { default as ox } from "./components/CustomIcons/
|
|
256
|
-
import { default as rx } from "./components/CustomIcons/
|
|
257
|
-
import { default as ax } from "./components/CustomIcons/
|
|
258
|
-
import { default as px } from "./components/CustomIcons/
|
|
259
|
-
import { default as lx } from "./components/CustomIcons/
|
|
260
|
-
import { default as nx } from "./components/CustomIcons/
|
|
261
|
-
import { default as sx } from "./components/CustomIcons/
|
|
262
|
-
import { default as cx } from "./components/CustomIcons/
|
|
263
|
-
import {
|
|
264
|
-
import {
|
|
248
|
+
import { TableColumnPicker as Nl } from "./components/Table/TableColumnPicker.js";
|
|
249
|
+
import { default as Gl } from "./components/TextArea/TextArea.js";
|
|
250
|
+
import { default as Vl } from "./components/CustomIcons/ThumbsDownIcon.js";
|
|
251
|
+
import { default as Kl } from "./components/CustomIcons/ThumbsUpIcon.js";
|
|
252
|
+
import { TimeBarChart as Ql } from "./components/TimeBarChart/TimeBarChart.js";
|
|
253
|
+
import { TimeBarChartSwatch as jl } from "./components/TimeBarChart/TimeBarChartSwatch.js";
|
|
254
|
+
import { default as Zl } from "./components/CustomIcons/TrashIcon.js";
|
|
255
|
+
import { default as ox } from "./components/CustomIcons/TriangleDownIcon.js";
|
|
256
|
+
import { default as rx } from "./components/CustomIcons/TriangleRightIcon.js";
|
|
257
|
+
import { default as ax } from "./components/CustomIcons/UnarchiveIcon.js";
|
|
258
|
+
import { default as px } from "./components/CustomIcons/UploadIcon.js";
|
|
259
|
+
import { default as lx } from "./components/CustomIcons/WarningCircleFilled.js";
|
|
260
|
+
import { default as nx } from "./components/CustomIcons/WarningTriangleIcon.js";
|
|
261
|
+
import { default as sx } from "./components/CustomIcons/WebhookEventsIcon.js";
|
|
262
|
+
import { default as cx } from "./components/CustomIcons/WebhookIcon.js";
|
|
263
|
+
import { default as Ix } from "./components/CustomIcons/WebhookSigningSecretIcon.js";
|
|
264
|
+
import { PageActions as Sx } from "./components/PageLayout/regularLayout.js";
|
|
265
|
+
import { guideTimelinePositions as hx } from "./components/GuideTimeline/guideTimelinePositions.js";
|
|
265
266
|
export {
|
|
266
267
|
Gt as AccessPills,
|
|
267
268
|
r as Accordion,
|
|
@@ -434,7 +435,7 @@ export {
|
|
|
434
435
|
tt as OverflowRow,
|
|
435
436
|
Re as Padded,
|
|
436
437
|
Ro as PaddingSize,
|
|
437
|
-
|
|
438
|
+
Sx as PageActions,
|
|
438
439
|
yt as PageLayout,
|
|
439
440
|
zr as PillButton,
|
|
440
441
|
Jr as PillButtonGroup,
|
|
@@ -508,34 +509,35 @@ export {
|
|
|
508
509
|
Uo as TOOLBAR_FILTER_MIN_WIDTH_PX,
|
|
509
510
|
Go as TOOLBAR_FILTER_WIDTH_PX,
|
|
510
511
|
Wl as Table,
|
|
512
|
+
Nl as TableColumnPicker,
|
|
511
513
|
dr as Tabs,
|
|
512
514
|
xr as Tag,
|
|
513
|
-
|
|
515
|
+
Gl as TextArea,
|
|
514
516
|
kt as ThemeScope,
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
517
|
+
Vl as ThumbsDownIcon,
|
|
518
|
+
Kl as ThumbsUpIcon,
|
|
519
|
+
Ql as TimeBarChart,
|
|
520
|
+
jl as TimeBarChartSwatch,
|
|
519
521
|
ur as Timeline,
|
|
520
522
|
gr as ToastProvider,
|
|
521
523
|
qr as Toggle,
|
|
522
524
|
Xo as Toolbar,
|
|
523
525
|
Tr as Tooltip,
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
526
|
+
Zl as TrashIcon,
|
|
527
|
+
ox as TriangleDownIcon,
|
|
528
|
+
rx as TriangleRightIcon,
|
|
527
529
|
Ar as TruncatedTooltip,
|
|
528
530
|
Xr as Typography,
|
|
529
|
-
|
|
530
|
-
|
|
531
|
+
ax as UnarchiveIcon,
|
|
532
|
+
px as UploadIcon,
|
|
531
533
|
Rr as UsageCard,
|
|
532
534
|
s as UserIdentity,
|
|
533
535
|
mr as VisuallyHidden,
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
536
|
+
lx as WarningCircleFilled,
|
|
537
|
+
nx as WarningTriangleIcon,
|
|
538
|
+
sx as WebhookEventsIcon,
|
|
539
|
+
cx as WebhookIcon,
|
|
540
|
+
Ix as WebhookSigningSecretIcon,
|
|
539
541
|
zo as WizardLayout,
|
|
540
542
|
Jo as ZoomableImage,
|
|
541
543
|
Zt as applyCustomTheme,
|
|
@@ -548,7 +550,7 @@ export {
|
|
|
548
550
|
aa as defaultTheme,
|
|
549
551
|
fa as getCurrentTheme,
|
|
550
552
|
pa as getCurrentThemeMode,
|
|
551
|
-
|
|
553
|
+
hx as guideTimelinePositions,
|
|
552
554
|
ma as initializeTheme,
|
|
553
555
|
la as resetTheme,
|
|
554
556
|
xa as toggleTheme,
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/package.json
CHANGED