@bioturing/components 0.15.5 → 0.17.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/dist/components/Badge/component.js +9 -17
- package/dist/components/Badge/component.js.map +1 -1
- package/dist/components/Breadcrumb/component.js +4 -3
- package/dist/components/Breadcrumb/component.js.map +1 -1
- package/dist/components/Button/component.js +30 -3
- package/dist/components/Button/component.js.map +1 -1
- package/dist/components/Button/style.css +1 -1
- package/dist/components/CodeBlock/component.js +7 -6
- package/dist/components/CodeBlock/component.js.map +1 -1
- package/dist/components/CodeBlock/style.css +1 -1
- package/dist/components/Collapse/component.js +11 -10
- package/dist/components/Collapse/component.js.map +1 -1
- package/dist/components/ColorSelect/component.js +138 -0
- package/dist/components/ColorSelect/component.js.map +1 -0
- package/dist/components/ColorSelect/style.css +1 -0
- package/dist/components/DSRoot/component.js +8 -7
- package/dist/components/DSRoot/component.js.map +1 -1
- package/dist/components/DSRoot/context.js +5 -4
- package/dist/components/DSRoot/context.js.map +1 -1
- package/dist/components/DragDrop/context.js +18 -0
- package/dist/components/DragDrop/context.js.map +1 -0
- package/dist/components/DragDrop/draggable.js +64 -0
- package/dist/components/DragDrop/draggable.js.map +1 -0
- package/dist/components/DragDrop/droppable.js +48 -0
- package/dist/components/DragDrop/droppable.js.map +1 -0
- package/dist/components/DragDrop/hooks.js +139 -0
- package/dist/components/DragDrop/hooks.js.map +1 -0
- package/dist/components/DragDrop/index.js +45 -0
- package/dist/components/DragDrop/index.js.map +1 -0
- package/dist/components/DragDrop/style.css +1 -0
- package/dist/components/DropdownMenu/component.js +1 -0
- package/dist/components/DropdownMenu/component.js.map +1 -1
- package/dist/components/Field/component.js +13 -12
- package/dist/components/Field/component.js.map +1 -1
- package/dist/components/Form/component.js +4 -3
- package/dist/components/Form/component.js.map +1 -1
- package/dist/components/Form/item.js +1 -0
- package/dist/components/Form/item.js.map +1 -1
- package/dist/components/IconButton/component.js +55 -43
- package/dist/components/IconButton/component.js.map +1 -1
- package/dist/components/IconButton/style.css +1 -1
- package/dist/components/Modal/Modal.js +1 -0
- package/dist/components/Modal/Modal.js.map +1 -1
- package/dist/components/Modal/ModalProvider.js +1 -0
- package/dist/components/Modal/ModalProvider.js.map +1 -1
- package/dist/components/Modal/index.js +11 -10
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Nav/context.js +7 -0
- package/dist/components/Nav/context.js.map +1 -0
- package/dist/components/Nav/group.js +16 -0
- package/dist/components/Nav/group.js.map +1 -0
- package/dist/components/Nav/heading.js +16 -0
- package/dist/components/Nav/heading.js.map +1 -0
- package/dist/components/Nav/index.js +13 -0
- package/dist/components/Nav/index.js.map +1 -0
- package/dist/components/Nav/item.js +36 -0
- package/dist/components/Nav/item.js.map +1 -0
- package/dist/components/Nav/style.css +1 -0
- package/dist/components/Popover/component.js +6 -5
- package/dist/components/Popover/component.js.map +1 -1
- package/dist/components/PopupPanel/component.js +100 -99
- package/dist/components/PopupPanel/component.js.map +1 -1
- package/dist/components/ScrollArea/component.js +10 -9
- package/dist/components/ScrollArea/component.js.map +1 -1
- package/dist/components/Slider/component.js +9 -8
- package/dist/components/Slider/component.js.map +1 -1
- package/dist/components/Splitter/component.js +12 -11
- package/dist/components/Splitter/component.js.map +1 -1
- package/dist/components/Stack/Stack.js +40 -34
- package/dist/components/Stack/Stack.js.map +1 -1
- package/dist/components/Stack/StackChild.js +62 -54
- package/dist/components/Stack/StackChild.js.map +1 -1
- package/dist/components/Stack/style.css +1 -1
- package/dist/components/Table/component.js +54 -50
- package/dist/components/Table/component.js.map +1 -1
- package/dist/components/Table/style.css +1 -1
- package/dist/components/Tag/component.js +60 -24
- package/dist/components/Tag/component.js.map +1 -1
- package/dist/components/Tag/style.css +1 -1
- package/dist/components/ThemeProvider/component.js +27 -26
- package/dist/components/ThemeProvider/component.js.map +1 -1
- package/dist/components/ThemeProvider/style.css +1 -1
- package/dist/components/Toast/component.js +24 -29
- package/dist/components/Toast/component.js.map +1 -1
- package/dist/components/Toast/function.js +5 -4
- package/dist/components/Toast/function.js.map +1 -1
- package/dist/components/Tooltip/component.js +4 -21
- package/dist/components/Tooltip/component.js.map +1 -1
- package/dist/components/Tour/component.js +5 -4
- package/dist/components/Tour/component.js.map +1 -1
- package/dist/components/Transition/component.js +45 -32
- package/dist/components/Transition/component.js.map +1 -1
- package/dist/components/Tree/components.js +9 -8
- package/dist/components/Tree/components.js.map +1 -1
- package/dist/components/Tree/helpers.js +1 -0
- package/dist/components/Tree/helpers.js.map +1 -1
- package/dist/components/Tree/useTreeCommon.js +12 -11
- package/dist/components/Tree/useTreeCommon.js.map +1 -1
- package/dist/components/Truncate/component.js +1 -0
- package/dist/components/Truncate/component.js.map +1 -1
- package/dist/components/Upload/component.js +13 -11
- package/dist/components/Upload/component.js.map +1 -1
- package/dist/components/Upload/dragger.js +3 -2
- package/dist/components/Upload/dragger.js.map +1 -1
- package/dist/components/Upload/hooks.js +3 -2
- package/dist/components/Upload/hooks.js.map +1 -1
- package/dist/components/Upload/style.css +1 -0
- package/dist/components/VerticalCollapsiblePanel/component.js +39 -36
- package/dist/components/VerticalCollapsiblePanel/component.js.map +1 -1
- package/dist/components/hooks/antd.js +4 -3
- package/dist/components/hooks/antd.js.map +1 -1
- package/dist/components/hooks/base-ui.js +34 -28
- package/dist/components/hooks/base-ui.js.map +1 -1
- package/dist/components/hooks/useCharts.js +19 -17
- package/dist/components/hooks/useCharts.js.map +1 -1
- package/dist/components/hooks/useControlledState.js +17 -9
- package/dist/components/hooks/useControlledState.js.map +1 -1
- package/dist/components/utils/WithAntdTokens.js +14 -13
- package/dist/components/utils/WithAntdTokens.js.map +1 -1
- package/dist/components/utils/antdUtils.js +1 -0
- package/dist/components/utils/antdUtils.js.map +1 -1
- package/dist/components/utils/colors.js +5 -0
- package/dist/components/utils/colors.js.map +1 -0
- package/dist/index.d.ts +819 -65
- package/dist/index.js +191 -159
- package/dist/index.js.map +1 -1
- package/dist/metadata.js +124 -92
- package/dist/metadata.js.map +1 -1
- package/dist/tailwind.css +1 -1
- package/dist/tokens/and-theme/tokens.js +13 -7
- package/dist/tokens/and-theme/tokens.js.map +1 -1
- package/dist/tokens/charts/{tokens.js → palettes/cloudscape.js} +22 -12
- package/dist/tokens/charts/palettes/cloudscape.js.map +1 -0
- package/dist/tokens/charts/palettes/colorbrewer.js +1525 -0
- package/dist/tokens/charts/palettes/colorbrewer.js.map +1 -0
- package/dist/tokens/charts/palettes/index.js +61 -0
- package/dist/tokens/charts/palettes/index.js.map +1 -0
- package/dist/tokens/charts/palettes/tableau.js +112 -0
- package/dist/tokens/charts/palettes/tableau.js.map +1 -0
- package/dist/tokens/utils.js.map +1 -1
- package/package.json +7 -7
- package/dist/tokens/charts/index.js +0 -18
- package/dist/tokens/charts/index.js.map +0 -1
- package/dist/tokens/charts/tokens.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/Truncate/component.tsx"],"sourcesContent":["\"use client\";\nimport React, { useCallback, useLayoutEffect, useRef, useState } from \"react\";\nimport { clsx, useCls } from \"../utils\";\nimport { getMiddleTruncatedString } from \"./helpers\";\n\nimport \"./style.css\";\n\nexport type TruncatePosition = \"middle\" | \"end\";\n\nexport type Props = {\n text: string;\n} & React.CSSProperties;\n\nexport interface TruncateProps\n extends Omit<React.ComponentPropsWithoutRef<\"span\">, \"title\"> {\n /** Text content to be truncated */\n children: string;\n /** Where to truncate the text: start, middle, or end */\n position?: TruncatePosition;\n /** Number of lines to display before truncating (default: 1, 'auto' to fit parent height) */\n lines?: number | \"auto\";\n}\n\nexport const Truncate: React.FC<TruncateProps> = ({\n children,\n position = \"end\",\n lines = 1,\n className,\n style,\n ...rest\n}) => {\n const cls = useCls();\n const containerRef = useRef<HTMLElement>(null);\n const [isTruncated, setIsTruncated] = useState(false);\n const [truncatedText, setTruncatedText] = useState(children);\n\n const text = children;\n\n // Get appropriate container styles based on position and lines\n const getContainerStyles = useCallback(() => {\n // For explicit line numbers or single line\n if (lines !== \"auto\") {\n return {\n ...style,\n ...(lines > 1 ? { \"--ds-line-clamp\": lines } : {}),\n } as React.CSSProperties;\n }\n\n // For auto line calculation, we'll let the useLayoutEffect handle it\n return {\n ...style,\n // Set a temporary high value to ensure it fits the parent\n \"--ds-line-clamp\": 999,\n } as React.CSSProperties;\n }, [lines, style]);\n\n useLayoutEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n // Handle auto-height calculation\n if (lines === \"auto\") {\n setTruncatedText(text);\n\n const calculateLines = () => {\n // Get the parent element's height\n const parent = container.parentElement;\n if (!parent) return;\n\n // Calculate the font size and line height\n const styles = window.getComputedStyle(container);\n const fontSize = parseFloat(styles.fontSize);\n const lineHeight =\n styles.lineHeight === \"normal\"\n ? fontSize * 1.2 // Approximate for \"normal\"\n : parseFloat(styles.lineHeight);\n\n // Get parent's padding and border to subtract from available height\n const parentStyles = window.getComputedStyle(parent);\n const paddingTop = parseFloat(parentStyles.paddingTop) || 0;\n const paddingBottom = parseFloat(parentStyles.paddingBottom) || 0;\n const borderTopWidth = parseFloat(parentStyles.borderTopWidth) || 0;\n const borderBottomWidth =\n parseFloat(parentStyles.borderBottomWidth) || 0;\n\n // Calculate how many lines can fit in the available space\n const parentHeight = parent.clientHeight;\n const availableHeight =\n parentHeight -\n paddingTop -\n paddingBottom -\n borderTopWidth -\n borderBottomWidth;\n const maxLines = Math.max(1, Math.floor(availableHeight / lineHeight));\n\n // Apply the calculated line-clamp\n if (container) {\n container.style.setProperty(\"--ds-line-clamp\", String(maxLines));\n }\n\n // Check if the text is truncated\n const clone = document.createElement(\"span\");\n clone.style.visibility = \"hidden\";\n clone.style.position = \"absolute\";\n clone.style.width = `${container.clientWidth}px`;\n clone.style.fontSize = styles.fontSize;\n clone.style.fontFamily = styles.fontFamily;\n clone.style.lineHeight = styles.lineHeight;\n clone.textContent = text;\n document.body.appendChild(clone);\n\n const isTruncated = clone.scrollHeight > availableHeight;\n document.body.removeChild(clone);\n\n setIsTruncated(isTruncated);\n };\n\n window.document.fonts?.ready?.then(calculateLines);\n const observer = new ResizeObserver(() => {\n window.requestAnimationFrame(calculateLines);\n });\n\n observer.observe(container);\n if (container.parentElement) {\n observer.observe(container.parentElement);\n }\n\n return () => observer.disconnect();\n }\n\n // Skip custom truncation logic for multi-line mode\n if (typeof lines === \"number\" && lines > 1) {\n setTruncatedText(text);\n // Check if text is truncated by comparing heights\n const checkIfTruncated = () => {\n const clone = document.createElement(\"span\");\n clone.style.visibility = \"hidden\";\n clone.style.position = \"absolute\";\n clone.style.width = `${container.clientWidth}px`;\n clone.textContent = text;\n document.body.appendChild(clone);\n const isTruncated =\n clone.scrollHeight >\n (container.clientHeight || container.offsetHeight);\n document.body.removeChild(clone);\n setIsTruncated(isTruncated);\n };\n\n window.document.fonts?.ready?.then(checkIfTruncated);\n const observer = new ResizeObserver(() => {\n window.requestAnimationFrame(checkIfTruncated);\n });\n\n observer.observe(container);\n return () => observer.disconnect();\n }\n\n // Original single-line truncation logic\n let cancellationToken = { cancelled: false };\n\n const calculateTruncatedString = () => {\n if (cancellationToken) cancellationToken.cancelled = true;\n\n const requestCancellationToken = { cancelled: false };\n cancellationToken = requestCancellationToken;\n\n const truncated = getMiddleTruncatedString(text, \"\\u2026\", container);\n\n if (requestCancellationToken.cancelled) return;\n\n setTruncatedText(truncated);\n };\n\n if (position == \"middle\") {\n window.document.fonts?.ready?.then(calculateTruncatedString);\n }\n\n if (position == \"end\") {\n setTruncatedText(text);\n }\n\n const observer = new ResizeObserver(() => {\n if (position == \"middle\")\n window.requestAnimationFrame(calculateTruncatedString);\n if (position == \"end\") {\n const isOverflowing = container.scrollWidth > container.clientWidth;\n if (isOverflowing) {\n setIsTruncated(true);\n }\n }\n });\n\n observer.observe(container);\n\n return () => {\n cancellationToken.cancelled = true;\n observer.disconnect();\n };\n }, [text, position, lines]);\n\n return (\n <span\n ref={containerRef}\n style={getContainerStyles()}\n className={clsx(\n lines === 1 ? cls(\"truncate\") : cls(\"truncate-multiline\"),\n position === \"middle\" ? cls(\"truncate-middle\") : cls(\"truncate-end\"),\n className\n )}\n title={isTruncated ? text : undefined}\n {...rest}\n >\n {text === truncatedText ? text : <span>{truncatedText}</span>}\n </span>\n );\n};\n"],"names":["Truncate","children","position","lines","className","style","rest","cls","useCls","containerRef","useRef","isTruncated","setIsTruncated","useState","truncatedText","setTruncatedText","text","getContainerStyles","useCallback","useLayoutEffect","container","calculateLines","parent","styles","fontSize","lineHeight","parentStyles","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","availableHeight","maxLines","clone","_b","_a","observer","checkIfTruncated","_d","_c","cancellationToken","calculateTruncatedString","requestCancellationToken","truncated","getMiddleTruncatedString","_f","_e","jsx","clsx"],"mappings":";;;;;;AAuBO,MAAMA,KAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAMC,EAAO,GACbC,IAAeC,EAAoB,IAAI,GACvC,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAC9C,CAACC,GAAeC,CAAgB,IAAIF,EAASZ,CAAQ,GAErDe,IAAOf,GAGPgB,IAAqBC,EAAY,MAEjCf,MAAU,SACL;AAAA,IACL,GAAGE;AAAA,IACH,GAAIF,IAAQ,IAAI,EAAE,mBAAmBA,EAAA,IAAU,CAAA;AAAA,EACjD,IAIK;AAAA,IACL,GAAGE;AAAA;AAAA,IAEH,mBAAmB;AAAA,EACrB,GACC,CAACF,GAAOE,CAAK,CAAC;AAEjB,SAAAc,EAAgB,MAAM;;AACpB,UAAMC,IAAYX,EAAa;AAC/B,QAAI,CAACW,EAAW;AAGhB,QAAIjB,MAAU,QAAQ;AACpB,MAAAY,EAAiBC,CAAI;AAErB,YAAMK,IAAiB,MAAM;AAE3B,cAAMC,IAASF,EAAU;AACzB,YAAI,CAACE,EAAQ;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,IAEvB,CACD;AAED,WAAAwB,EAAS,QAAQhB,CAAS,GAEnB,MAAM;AACX,MAAAoB,EAAkB,YAAY,IAC9BJ,EAAS,WAAW;AAAA,IACtB;AAAA,EACC,GAAA,CAACpB,GAAMd,GAAUC,CAAK,CAAC,GAGxB,gBAAA4C;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKtC;AAAA,MACL,OAAOQ,EAAmB;AAAA,MAC1B,WAAW+B;AAAA,QACKzC,EAAdJ,MAAU,IAAQ,aAAkB,oBAAR;AAAA,QACJI,EAAxBL,MAAa,WAAe,oBAAyB,cAAR;AAAA,QAC7CE;AAAA,MACF;AAAA,MACA,OAAOO,IAAcK,IAAO;AAAA,MAC3B,GAAGV;AAAA,MAEH,UAASU,MAAAF,IAAgBE,IAAO,gBAAA+B,EAAC,UAAM,UAAcjC,EAAA,CAAA;AAAA,IAAA;AAAA,EACxD;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/Truncate/component.tsx"],"sourcesContent":["\"use client\";\nimport React, { useCallback, useLayoutEffect, useRef, useState } from \"react\";\nimport { clsx, useCls } from \"../utils\";\nimport { getMiddleTruncatedString } from \"./helpers\";\n\nimport \"./style.css\";\n\nexport type TruncatePosition = \"middle\" | \"end\";\n\nexport type Props = {\n text: string;\n} & React.CSSProperties;\n\nexport interface TruncateProps\n extends Omit<React.ComponentPropsWithoutRef<\"span\">, \"title\"> {\n /** Text content to be truncated */\n children: string;\n /** Where to truncate the text: start, middle, or end */\n position?: TruncatePosition;\n /** Number of lines to display before truncating (default: 1, 'auto' to fit parent height) */\n lines?: number | \"auto\";\n}\n\nexport const Truncate: React.FC<TruncateProps> = ({\n children,\n position = \"end\",\n lines = 1,\n className,\n style,\n ...rest\n}) => {\n const cls = useCls();\n const containerRef = useRef<HTMLElement>(null);\n const [isTruncated, setIsTruncated] = useState(false);\n const [truncatedText, setTruncatedText] = useState(children);\n\n const text = children;\n\n // Get appropriate container styles based on position and lines\n const getContainerStyles = useCallback(() => {\n // For explicit line numbers or single line\n if (lines !== \"auto\") {\n return {\n ...style,\n ...(lines > 1 ? { \"--ds-line-clamp\": lines } : {}),\n } as React.CSSProperties;\n }\n\n // For auto line calculation, we'll let the useLayoutEffect handle it\n return {\n ...style,\n // Set a temporary high value to ensure it fits the parent\n \"--ds-line-clamp\": 999,\n } as React.CSSProperties;\n }, [lines, style]);\n\n useLayoutEffect(() => {\n const container = containerRef.current;\n if (!container) return;\n\n // Handle auto-height calculation\n if (lines === \"auto\") {\n setTruncatedText(text);\n\n const calculateLines = () => {\n // Get the parent element's height\n const parent = container.parentElement;\n if (!parent) return;\n\n // Calculate the font size and line height\n const styles = window.getComputedStyle(container);\n const fontSize = parseFloat(styles.fontSize);\n const lineHeight =\n styles.lineHeight === \"normal\"\n ? fontSize * 1.2 // Approximate for \"normal\"\n : parseFloat(styles.lineHeight);\n\n // Get parent's padding and border to subtract from available height\n const parentStyles = window.getComputedStyle(parent);\n const paddingTop = parseFloat(parentStyles.paddingTop) || 0;\n const paddingBottom = parseFloat(parentStyles.paddingBottom) || 0;\n const borderTopWidth = parseFloat(parentStyles.borderTopWidth) || 0;\n const borderBottomWidth =\n parseFloat(parentStyles.borderBottomWidth) || 0;\n\n // Calculate how many lines can fit in the available space\n const parentHeight = parent.clientHeight;\n const availableHeight =\n parentHeight -\n paddingTop -\n paddingBottom -\n borderTopWidth -\n borderBottomWidth;\n const maxLines = Math.max(1, Math.floor(availableHeight / lineHeight));\n\n // Apply the calculated line-clamp\n if (container) {\n container.style.setProperty(\"--ds-line-clamp\", String(maxLines));\n }\n\n // Check if the text is truncated\n const clone = document.createElement(\"span\");\n clone.style.visibility = \"hidden\";\n clone.style.position = \"absolute\";\n clone.style.width = `${container.clientWidth}px`;\n clone.style.fontSize = styles.fontSize;\n clone.style.fontFamily = styles.fontFamily;\n clone.style.lineHeight = styles.lineHeight;\n clone.textContent = text;\n document.body.appendChild(clone);\n\n const isTruncated = clone.scrollHeight > availableHeight;\n document.body.removeChild(clone);\n\n setIsTruncated(isTruncated);\n };\n\n window.document.fonts?.ready?.then(calculateLines);\n const observer = new ResizeObserver(() => {\n window.requestAnimationFrame(calculateLines);\n });\n\n observer.observe(container);\n if (container.parentElement) {\n observer.observe(container.parentElement);\n }\n\n return () => observer.disconnect();\n }\n\n // Skip custom truncation logic for multi-line mode\n if (typeof lines === \"number\" && lines > 1) {\n setTruncatedText(text);\n // Check if text is truncated by comparing heights\n const checkIfTruncated = () => {\n const clone = document.createElement(\"span\");\n clone.style.visibility = \"hidden\";\n clone.style.position = \"absolute\";\n clone.style.width = `${container.clientWidth}px`;\n clone.textContent = text;\n document.body.appendChild(clone);\n const isTruncated =\n clone.scrollHeight >\n (container.clientHeight || container.offsetHeight);\n document.body.removeChild(clone);\n setIsTruncated(isTruncated);\n };\n\n window.document.fonts?.ready?.then(checkIfTruncated);\n const observer = new ResizeObserver(() => {\n window.requestAnimationFrame(checkIfTruncated);\n });\n\n observer.observe(container);\n return () => observer.disconnect();\n }\n\n // Original single-line truncation logic\n let cancellationToken = { cancelled: false };\n\n const calculateTruncatedString = () => {\n if (cancellationToken) cancellationToken.cancelled = true;\n\n const requestCancellationToken = { cancelled: false };\n cancellationToken = requestCancellationToken;\n\n const truncated = getMiddleTruncatedString(text, \"\\u2026\", container);\n\n if (requestCancellationToken.cancelled) return;\n\n setTruncatedText(truncated);\n };\n\n if (position == \"middle\") {\n window.document.fonts?.ready?.then(calculateTruncatedString);\n }\n\n if (position == \"end\") {\n setTruncatedText(text);\n }\n\n const observer = new ResizeObserver(() => {\n if (position == \"middle\")\n window.requestAnimationFrame(calculateTruncatedString);\n if (position == \"end\") {\n const isOverflowing = container.scrollWidth > container.clientWidth;\n if (isOverflowing) {\n setIsTruncated(true);\n }\n }\n });\n\n observer.observe(container);\n\n return () => {\n cancellationToken.cancelled = true;\n observer.disconnect();\n };\n }, [text, position, lines]);\n\n return (\n <span\n ref={containerRef}\n style={getContainerStyles()}\n className={clsx(\n lines === 1 ? cls(\"truncate\") : cls(\"truncate-multiline\"),\n position === \"middle\" ? cls(\"truncate-middle\") : cls(\"truncate-end\"),\n className\n )}\n title={isTruncated ? text : undefined}\n {...rest}\n >\n {text === truncatedText ? text : <span>{truncatedText}</span>}\n </span>\n );\n};\n"],"names":["Truncate","children","position","lines","className","style","rest","cls","useCls","containerRef","useRef","isTruncated","setIsTruncated","useState","truncatedText","setTruncatedText","text","getContainerStyles","useCallback","useLayoutEffect","container","calculateLines","parent","styles","fontSize","lineHeight","parentStyles","paddingTop","paddingBottom","borderTopWidth","borderBottomWidth","availableHeight","maxLines","clone","_b","_a","observer","checkIfTruncated","_d","_c","cancellationToken","calculateTruncatedString","requestCancellationToken","truncated","getMiddleTruncatedString","_f","_e","jsx","clsx"],"mappings":";;;;;;;AAuBO,MAAMA,KAAoC,CAAC;AAAA,EAChD,UAAAC;AAAA,EACA,UAAAC,IAAW;AAAA,EACX,OAAAC,IAAQ;AAAA,EACR,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,GAAGC;AACL,MAAM;AACJ,QAAMC,IAAMC,EAAO,GACbC,IAAeC,EAAoB,IAAI,GACvC,CAACC,GAAaC,CAAc,IAAIC,EAAS,EAAK,GAC9C,CAACC,GAAeC,CAAgB,IAAIF,EAASZ,CAAQ,GAErDe,IAAOf,GAGPgB,IAAqBC,EAAY,MAEjCf,MAAU,SACL;AAAA,IACL,GAAGE;AAAA,IACH,GAAIF,IAAQ,IAAI,EAAE,mBAAmBA,EAAA,IAAU,CAAA;AAAA,EACjD,IAIK;AAAA,IACL,GAAGE;AAAA;AAAA,IAEH,mBAAmB;AAAA,EACrB,GACC,CAACF,GAAOE,CAAK,CAAC;AAEjB,SAAAc,EAAgB,MAAM;;AACpB,UAAMC,IAAYX,EAAa;AAC/B,QAAI,CAACW,EAAW;AAGhB,QAAIjB,MAAU,QAAQ;AACpB,MAAAY,EAAiBC,CAAI;AAErB,YAAMK,IAAiB,MAAM;AAE3B,cAAMC,IAASF,EAAU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,eAEtDR,EAAe,EAAI;AAAA,IAEvB,CACD;AAED,WAAAwB,EAAS,QAAQhB,CAAS,GAEnB,MAAM;AACX,MAAAoB,EAAkB,YAAY,IAC9BJ,EAAS,WAAW;AAAA,IACtB;AAAA,EACC,GAAA,CAACpB,GAAMd,GAAUC,CAAK,CAAC,GAGxB,gBAAA4C;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKtC;AAAA,MACL,OAAOQ,EAAmB;AAAA,MAC1B,WAAW+B;AAAA,QACKzC,EAAdJ,MAAU,IAAQ,aAAkB,oBAAR;AAAA,QACJI,EAAxBL,MAAa,WAAe,oBAAyB,cAAR;AAAA,QAC7CE;AAAA,MACF;AAAA,MACA,OAAOO,IAAcK,IAAO;AAAA,MAC3B,GAAGV;AAAA,MAEH,UAASU,MAAAF,IAAgBE,IAAO,gBAAA+B,EAAC,UAAM,UAAcjC,EAAA,CAAA;AAAA,IAAA;AAAA,EACxD;AAEJ;"}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as o } from "react/jsx-runtime";
|
|
2
3
|
import n from "antd/es/upload";
|
|
3
|
-
import { CloudArrowUp as
|
|
4
|
-
import { Dragger as
|
|
5
|
-
import { useUploadItemRender as
|
|
4
|
+
import { CloudArrowUp as c } from "@bioturing/assets";
|
|
5
|
+
import { Dragger as d } from "./dragger.js";
|
|
6
|
+
import { useUploadItemRender as a } from "./hooks.js";
|
|
6
7
|
import { UploadItem as f } from "./item.js";
|
|
8
|
+
import './style.css';/* empty css */
|
|
7
9
|
import { Button as u } from "../Button/component.js";
|
|
8
10
|
import { useCls as U } from "../utils/antdUtils.js";
|
|
9
11
|
import { clsx as g } from "../utils/cn.js";
|
|
@@ -14,26 +16,26 @@ const h = ({
|
|
|
14
16
|
className: t,
|
|
15
17
|
fileList: e,
|
|
16
18
|
children: m,
|
|
17
|
-
...
|
|
19
|
+
...i
|
|
18
20
|
}) => {
|
|
19
|
-
const
|
|
21
|
+
const l = U(), p = /* @__PURE__ */ o(u, { icon: /* @__PURE__ */ o(c, { size: 24 }), type: "default", children: "Upload Files" }), s = a({ showRemoveButton: r });
|
|
20
22
|
return /* @__PURE__ */ o(
|
|
21
23
|
n,
|
|
22
24
|
{
|
|
23
|
-
className: g(
|
|
24
|
-
...
|
|
25
|
+
className: g(l("upload"), t),
|
|
26
|
+
...i,
|
|
25
27
|
fileList: e,
|
|
26
28
|
itemRender: s,
|
|
27
|
-
children: m ||
|
|
29
|
+
children: m || p
|
|
28
30
|
}
|
|
29
31
|
);
|
|
30
|
-
},
|
|
32
|
+
}, B = Object.assign(h, {
|
|
31
33
|
// Dragger,
|
|
32
|
-
Dragger:
|
|
34
|
+
Dragger: d,
|
|
33
35
|
Item: f
|
|
34
36
|
});
|
|
35
37
|
export {
|
|
36
38
|
h as DefaultUpload,
|
|
37
|
-
|
|
39
|
+
B as Upload
|
|
38
40
|
};
|
|
39
41
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/Upload/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntUpload,\n type UploadFile as AntUploadFile,\n type UploadProps as AntUploadProps,\n type RcFile,\n type UploadChangeParam,\n} from \"antd/es/upload\";\nimport { Button } from \"..\";\nimport { CloudArrowUp } from \"@bioturing/assets\";\nimport { clsx, useCls } from \"../utils\";\nimport { Dragger } from \"./dragger\";\nimport { useUploadItemRender } from \"./hooks\";\nimport { UploadItem } from \"./item\";\n\n// Re-export UploadFile and other types for consumers\nexport type UploadFile = AntUploadFile;\nexport type { RcFile, UploadChangeParam };\n\nexport type { UploadItemProps, UploadFileStatus } from \"./item\";\n\n// Define props interface extending Ant Design's UploadProps\nexport interface UploadProps extends AntUploadProps {\n /**\n * Show remove button for uploaded files\n * @default true\n */\n showRemoveButton?: boolean;\n // /**\n // * Show file list\n // * @default true\n // */\n // showFileList?: boolean;\n // /**\n // * Custom icon\n // */\n // icon?: React.ReactNode;\n}\n\n// Default icons for file types\nexport const DefaultUpload = ({\n // icon = <CloudArrowUp size={24} />,\n showRemoveButton = true,\n // showFileList = true,\n className,\n fileList,\n children,\n ...restProps\n}: UploadProps) => {\n const cls = useCls();\n const icon = <CloudArrowUp size={24} />;\n\n // Default children if none provided\n const defaultChildren = (\n <Button icon={icon} type=\"default\">\n Upload Files\n </Button>\n );\n const itemRender = useUploadItemRender({ showRemoveButton });\n\n return (\n <AntUpload\n className={clsx(cls(\"upload\"), className)}\n {...restProps}\n fileList={fileList}\n itemRender={itemRender}\n >\n {children || defaultChildren}\n </AntUpload>\n );\n};\n\nexport const Upload = Object.assign(DefaultUpload, {\n // Dragger,\n Dragger: Dragger,\n Item: UploadItem,\n});\n"],"names":["DefaultUpload","showRemoveButton","className","fileList","children","restProps","cls","useCls","defaultChildren","jsx","Button","CloudArrowUp","itemRender","useUploadItemRender","AntUpload","clsx","Upload","Dragger","UploadItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/Upload/component.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntUpload,\n type UploadFile as AntUploadFile,\n type UploadProps as AntUploadProps,\n type RcFile,\n type UploadChangeParam,\n} from \"antd/es/upload\";\nimport { Button } from \"..\";\nimport { CloudArrowUp } from \"@bioturing/assets\";\nimport { clsx, useCls } from \"../utils\";\nimport { Dragger } from \"./dragger\";\nimport { useUploadItemRender } from \"./hooks\";\nimport { UploadItem } from \"./item\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\n// Re-export UploadFile and other types for consumers\nexport type UploadFile = AntUploadFile;\nexport type { RcFile, UploadChangeParam };\n\nexport type { UploadItemProps, UploadFileStatus } from \"./item\";\n\n// Define props interface extending Ant Design's UploadProps\nexport interface UploadProps extends AntUploadProps {\n /**\n * Show remove button for uploaded files\n * @default true\n */\n showRemoveButton?: boolean;\n // /**\n // * Show file list\n // * @default true\n // */\n // showFileList?: boolean;\n // /**\n // * Custom icon\n // */\n // icon?: React.ReactNode;\n}\n\n// Default icons for file types\nexport const DefaultUpload = ({\n // icon = <CloudArrowUp size={24} />,\n showRemoveButton = true,\n // showFileList = true,\n className,\n fileList,\n children,\n ...restProps\n}: UploadProps) => {\n const cls = useCls();\n const icon = <CloudArrowUp size={24} />;\n\n // Default children if none provided\n const defaultChildren = (\n <Button icon={icon} type=\"default\">\n Upload Files\n </Button>\n );\n const itemRender = useUploadItemRender({ showRemoveButton });\n\n return (\n <AntUpload\n className={clsx(cls(\"upload\"), className)}\n {...restProps}\n fileList={fileList}\n itemRender={itemRender}\n >\n {children || defaultChildren}\n </AntUpload>\n );\n};\n\nexport const Upload = Object.assign(DefaultUpload, {\n // Dragger,\n Dragger: Dragger,\n Item: UploadItem,\n});\n"],"names":["DefaultUpload","showRemoveButton","className","fileList","children","restProps","cls","useCls","defaultChildren","jsx","Button","CloudArrowUp","itemRender","useUploadItemRender","AntUpload","clsx","Upload","Dragger","UploadItem"],"mappings":";;;;;;;;;;;AA2CO,MAAMA,IAAgB,CAAC;AAAA;AAAA,EAE5B,kBAAAC,IAAmB;AAAA;AAAA,EAEnB,WAAAC;AAAA,EACA,UAAAC;AAAA,EACA,UAAAC;AAAA,EACA,GAAGC;AACL,MAAmB;AACjB,QAAMC,IAAMC,EAAO,GAIbC,IACH,gBAAAC,EAAAC,GAAA,EAAO,MAJG,gBAAAD,EAACE,GAAa,EAAA,MAAM,GAAI,CAAA,GAIf,MAAK,WAAU,UAEnC,gBAAA,GAEIC,IAAaC,EAAoB,EAAE,kBAAAZ,GAAkB;AAGzD,SAAA,gBAAAQ;AAAA,IAACK;AAAA,IAAA;AAAA,MACC,WAAWC,EAAKT,EAAI,QAAQ,GAAGJ,CAAS;AAAA,MACvC,GAAGG;AAAA,MACJ,UAAAF;AAAA,MACA,YAAAS;AAAA,MAEC,UAAYR,KAAAI;AAAA,IAAA;AAAA,EACf;AAEJ,GAEaQ,IAAS,OAAO,OAAOhB,GAAe;AAAA;AAAA,EAEjD,SAAAiB;AAAA,EACA,MAAMC;AACR,CAAC;"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as r, jsxs as i, Fragment as p } from "react/jsx-runtime";
|
|
2
3
|
import m from "antd/es/upload";
|
|
3
4
|
import { CloudArrowUp as u } from "@bioturing/assets";
|
|
4
5
|
import { useUploadItemRender as c } from "./hooks.js";
|
|
@@ -10,7 +11,7 @@ const N = ({
|
|
|
10
11
|
itemRender: a,
|
|
11
12
|
...n
|
|
12
13
|
}) => {
|
|
13
|
-
const e = f(), s = () => /* @__PURE__ */ p
|
|
14
|
+
const e = f(), s = () => /* @__PURE__ */ i(p, { children: [
|
|
14
15
|
/* @__PURE__ */ r("p", { className: e("upload-drag-icon"), children: /* @__PURE__ */ r(u, { size: 40 }) }),
|
|
15
16
|
/* @__PURE__ */ r("p", { className: e("upload-text"), children: t }),
|
|
16
17
|
/* @__PURE__ */ r("p", { className: e("upload-hint"), children: l })
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dragger.js","sources":["../../../src/components/Upload/dragger.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntUpload,\n type DraggerProps as AntDraggerProps,\n} from \"antd/es/upload\";\nimport React from \"react\";\nimport { CloudArrowUp } from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\nimport { useUploadItemRender } from \"./hooks\";\n\nexport interface DraggerProps extends AntDraggerProps {\n /**\n * Custom title for the upload component\n */\n uploadTitle?: React.ReactNode;\n /**\n * Custom description for the upload component\n **/\n uploadDescription?: React.ReactNode;\n}\n\nexport const Dragger = ({\n children,\n uploadTitle = \"Click or drag file to this area to upload\",\n uploadDescription = \"Support for a single or bulk upload.\",\n itemRender,\n ...rest\n}: DraggerProps) => {\n const cls = useCls();\n const renderChildren = () => {\n return (\n <>\n <p className={cls(\"upload-drag-icon\")}>\n <CloudArrowUp size={40} />\n </p>\n <p className={cls(\"upload-text\")}>{uploadTitle}</p>\n <p className={cls(\"upload-hint\")}>{uploadDescription}</p>\n </>\n );\n };\n const defaultItemRender = useUploadItemRender({ showRemoveButton: true });\n return (\n <AntUpload.Dragger itemRender={itemRender || defaultItemRender} {...rest}>\n {children ? children : renderChildren()}\n </AntUpload.Dragger>\n );\n};\n"],"names":["Dragger","children","uploadTitle","uploadDescription","itemRender","rest","cls","useCls","renderChildren","jsxs","Fragment","jsx","CloudArrowUp","defaultItemRender","useUploadItemRender","AntUpload"],"mappings":"
|
|
1
|
+
{"version":3,"file":"dragger.js","sources":["../../../src/components/Upload/dragger.tsx"],"sourcesContent":["\"use client\";\nimport {\n default as AntUpload,\n type DraggerProps as AntDraggerProps,\n} from \"antd/es/upload\";\nimport React from \"react\";\nimport { CloudArrowUp } from \"@bioturing/assets\";\nimport { useCls } from \"../utils\";\nimport { useUploadItemRender } from \"./hooks\";\n\nexport interface DraggerProps extends AntDraggerProps {\n /**\n * Custom title for the upload component\n */\n uploadTitle?: React.ReactNode;\n /**\n * Custom description for the upload component\n **/\n uploadDescription?: React.ReactNode;\n}\n\nexport const Dragger = ({\n children,\n uploadTitle = \"Click or drag file to this area to upload\",\n uploadDescription = \"Support for a single or bulk upload.\",\n itemRender,\n ...rest\n}: DraggerProps) => {\n const cls = useCls();\n const renderChildren = () => {\n return (\n <>\n <p className={cls(\"upload-drag-icon\")}>\n <CloudArrowUp size={40} />\n </p>\n <p className={cls(\"upload-text\")}>{uploadTitle}</p>\n <p className={cls(\"upload-hint\")}>{uploadDescription}</p>\n </>\n );\n };\n const defaultItemRender = useUploadItemRender({ showRemoveButton: true });\n return (\n <AntUpload.Dragger itemRender={itemRender || defaultItemRender} {...rest}>\n {children ? children : renderChildren()}\n </AntUpload.Dragger>\n );\n};\n"],"names":["Dragger","children","uploadTitle","uploadDescription","itemRender","rest","cls","useCls","renderChildren","jsxs","Fragment","jsx","CloudArrowUp","defaultItemRender","useUploadItemRender","AntUpload"],"mappings":";;;;;;AAqBO,MAAMA,IAAU,CAAC;AAAA,EACtB,UAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,mBAAAC,IAAoB;AAAA,EACpB,YAAAC;AAAA,EACA,GAAGC;AACL,MAAoB;AAClB,QAAMC,IAAMC,EAAO,GACbC,IAAiB,MAGjB,gBAAAC,EAAAC,GAAA,EAAA,UAAA;AAAA,IAAC,gBAAAC,EAAA,KAAA,EAAE,WAAWL,EAAI,kBAAkB,GAClC,UAAC,gBAAAK,EAAAC,GAAA,EAAa,MAAM,GAAA,CAAI,EAC1B,CAAA;AAAA,sBACC,KAAE,EAAA,WAAWN,EAAI,aAAa,GAAI,UAAYJ,GAAA;AAAA,sBAC9C,KAAE,EAAA,WAAWI,EAAI,aAAa,GAAI,UAAkBH,EAAA,CAAA;AAAA,EAAA,GACvD,GAGEU,IAAoBC,EAAoB,EAAE,kBAAkB,IAAM;AACxE,SACG,gBAAAH,EAAAI,EAAU,SAAV,EAAkB,YAAYX,KAAcS,GAAoB,GAAGR,GACjE,UAAAJ,KAAsBO,EACzB,EAAA,CAAA;AAEJ;"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
3
|
import { useCallback as o } from "react";
|
|
3
4
|
import { UploadItem as n } from "./item.js";
|
|
4
|
-
const
|
|
5
|
+
const d = ({ showRemoveButton: r = !0 }) => o((s, e, a, t) => /* @__PURE__ */ m(
|
|
5
6
|
n,
|
|
6
7
|
{
|
|
7
8
|
fileName: e.name,
|
|
@@ -13,6 +14,6 @@ const c = ({ showRemoveButton: r = !0 }) => o((a, e, s, t) => /* @__PURE__ */ m(
|
|
|
13
14
|
}
|
|
14
15
|
), [r]);
|
|
15
16
|
export {
|
|
16
|
-
|
|
17
|
+
d as useUploadItemRender
|
|
17
18
|
};
|
|
18
19
|
//# sourceMappingURL=hooks.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"hooks.js","sources":["../../../src/components/Upload/hooks.tsx"],"sourcesContent":["\"use client\";\nimport { type UploadProps } from \"antd/es/upload\";\nimport { useCallback } from \"react\";\nimport { UploadItem } from \"./item\";\n\nexport type UseUploadItemRenderProps = {\n showRemoveButton?: boolean;\n};\n\nexport const useUploadItemRender: (\n props: UseUploadItemRenderProps\n) => UploadProps[\"itemRender\"] = ({ showRemoveButton = true }) => {\n // If showFileList is false, don't render anything\n // if (!showFileList) return null;\n\n // Custom rendering of file items\n const itemRender: UploadProps[\"itemRender\"] = (\n _originNode,\n file,\n _fileList,\n actions\n ) => {\n return (\n <UploadItem\n fileName={file.name}\n fileType={file.type}\n status={file.status}\n percent={file.percent}\n removable={showRemoveButton}\n onRemove={() => actions.remove()}\n />\n );\n };\n return useCallback(itemRender, [showRemoveButton]);\n};\n"],"names":["useUploadItemRender","showRemoveButton","useCallback","_originNode","file","_fileList","actions","jsx","UploadItem"],"mappings":"
|
|
1
|
+
{"version":3,"file":"hooks.js","sources":["../../../src/components/Upload/hooks.tsx"],"sourcesContent":["\"use client\";\nimport { type UploadProps } from \"antd/es/upload\";\nimport { useCallback } from \"react\";\nimport { UploadItem } from \"./item\";\n\nexport type UseUploadItemRenderProps = {\n showRemoveButton?: boolean;\n};\n\nexport const useUploadItemRender: (\n props: UseUploadItemRenderProps\n) => UploadProps[\"itemRender\"] = ({ showRemoveButton = true }) => {\n // If showFileList is false, don't render anything\n // if (!showFileList) return null;\n\n // Custom rendering of file items\n const itemRender: UploadProps[\"itemRender\"] = (\n _originNode,\n file,\n _fileList,\n actions\n ) => {\n return (\n <UploadItem\n fileName={file.name}\n fileType={file.type}\n status={file.status}\n percent={file.percent}\n removable={showRemoveButton}\n onRemove={() => actions.remove()}\n />\n );\n };\n return useCallback(itemRender, [showRemoveButton]);\n};\n"],"names":["useUploadItemRender","showRemoveButton","useCallback","_originNode","file","_fileList","actions","jsx","UploadItem"],"mappings":";;;;AASO,MAAMA,IAEoB,CAAC,EAAE,kBAAAC,IAAmB,SAsB9CC,EAjBuC,CAC5CC,GACAC,GACAC,GACAC,MAGE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,UAAUJ,EAAK;AAAA,IACf,UAAUA,EAAK;AAAA,IACf,QAAQA,EAAK;AAAA,IACb,SAASA,EAAK;AAAA,IACd,WAAWH;AAAA,IACX,UAAU,MAAMK,EAAQ,OAAO;AAAA,EAAA;AACjC,GAG2B,CAACL,CAAgB,CAAC;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@layer components{.ds-upload-wrapper{display:flex;flex-direction:column}.ds-upload-list{display:flex;flex-direction:column;flex-grow:1}.ds-upload-list-item-container{margin-top:.5rem}.ds-upload-item{padding:.5rem;border-radius:var(--ds-border-radius);border:1px solid var(--ds-color-border);flex-grow:1}.ds-upload-item-icon{font-size:1.25rem;color:var(--ds-color-text-tertiary)}.ds-upload-drag-icon{font-size:2.5rem;color:var(--ds-color-primary);margin-bottom:.5rem;display:flex;align-items:center;justify-content:center}.ds-upload-item-content{display:flex;align-items:center;justify-content:space-between;min-width:0}.ds-upload-item-name-progress{min-width:0;display:flex;flex-direction:column;flex-grow:1;flex-shrink:1;gap:0rem}}
|
|
@@ -1,88 +1,91 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import { jsxs as r, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useState as
|
|
3
|
-
import { Collapsible as
|
|
4
|
-
import { MinusCircle as
|
|
5
|
-
import { useControlledState as
|
|
6
|
-
import { Truncate as
|
|
3
|
+
import { useState as I, useRef as g, useEffect as j } from "react";
|
|
4
|
+
import { Collapsible as n } from "@base-ui-components/react";
|
|
5
|
+
import { MinusCircle as M, PlusCircle as R } from "@bioturing/assets";
|
|
6
|
+
import { useControlledState as S } from "../hooks/useControlledState.js";
|
|
7
|
+
import { Truncate as A } from "../Truncate/component.js";
|
|
7
8
|
import './style.css';/* empty css */
|
|
8
9
|
import { Transition as E } from "../Transition/component.js";
|
|
9
|
-
import { useCls as
|
|
10
|
-
import { useAnimationsFinished as
|
|
11
|
-
import { clsx as
|
|
10
|
+
import { useCls as T } from "../utils/antdUtils.js";
|
|
11
|
+
import { useAnimationsFinished as V } from "../hooks/base-ui.js";
|
|
12
|
+
import { clsx as a } from "../utils/cn.js";
|
|
12
13
|
import { IconButton as f } from "../IconButton/component.js";
|
|
13
|
-
const
|
|
14
|
+
const X = ({
|
|
14
15
|
children: h,
|
|
15
|
-
title:
|
|
16
|
+
title: i,
|
|
16
17
|
defaultOpen: b = !1,
|
|
17
18
|
open: u,
|
|
18
19
|
onOpenChange: N,
|
|
19
|
-
className:
|
|
20
|
+
className: x,
|
|
20
21
|
headerClassName: y,
|
|
21
|
-
headerInnerClassName:
|
|
22
|
-
bodyClassName:
|
|
23
|
-
contentPadding:
|
|
22
|
+
headerInnerClassName: C,
|
|
23
|
+
bodyClassName: v,
|
|
24
|
+
contentPadding: o = "16px",
|
|
24
25
|
afterTitle: p,
|
|
25
26
|
actions: O,
|
|
26
27
|
useTitleAsTrigger: c = !0,
|
|
27
28
|
keepMounted: w = !1
|
|
28
29
|
}) => {
|
|
29
|
-
const e =
|
|
30
|
+
const e = T(), [s, t] = S(
|
|
30
31
|
u,
|
|
31
32
|
N,
|
|
32
33
|
b
|
|
33
|
-
), [
|
|
34
|
-
|
|
34
|
+
), [k, B] = I(s), m = g(null), d = V(m, {
|
|
35
|
+
waitForNextTick: s
|
|
36
|
+
});
|
|
37
|
+
return j(() => {
|
|
35
38
|
d(() => {
|
|
36
|
-
|
|
39
|
+
B(s);
|
|
37
40
|
});
|
|
38
41
|
}, [s, d]), /* @__PURE__ */ r(
|
|
39
|
-
|
|
42
|
+
n.Root,
|
|
40
43
|
{
|
|
41
|
-
className:
|
|
44
|
+
className: a(e("collapsible-panel"), x),
|
|
42
45
|
open: s,
|
|
43
46
|
onOpenChange: t,
|
|
44
47
|
ref: m,
|
|
45
48
|
children: [
|
|
46
|
-
/* @__PURE__ */ r("div", { className:
|
|
49
|
+
/* @__PURE__ */ r("div", { className: a(e("collapsible-panel-header"), y), children: [
|
|
47
50
|
/* @__PURE__ */ r(
|
|
48
51
|
"div",
|
|
49
52
|
{
|
|
50
|
-
className:
|
|
53
|
+
className: a(
|
|
51
54
|
e("collapsible-panel-header-inner"),
|
|
52
|
-
|
|
55
|
+
C
|
|
53
56
|
),
|
|
54
57
|
children: [
|
|
55
58
|
/* @__PURE__ */ l(
|
|
56
59
|
"div",
|
|
57
60
|
{
|
|
58
61
|
className: e("collapsible-panel-header-text"),
|
|
59
|
-
onClick: c ? () => t((
|
|
62
|
+
onClick: c ? () => t((F) => !F) : void 0,
|
|
60
63
|
style: c ? {
|
|
61
64
|
cursor: "pointer"
|
|
62
65
|
} : {},
|
|
63
|
-
children: typeof
|
|
66
|
+
children: typeof i == "string" ? /* @__PURE__ */ l(A, { children: i }) : i
|
|
64
67
|
}
|
|
65
68
|
),
|
|
66
69
|
/* @__PURE__ */ r("div", { className: e("collapsible-panel-header-actions"), children: [
|
|
67
70
|
s && O,
|
|
68
71
|
/* @__PURE__ */ l(
|
|
69
|
-
|
|
72
|
+
n.Trigger,
|
|
70
73
|
{
|
|
71
74
|
className: e("collapsible-panel-trigger"),
|
|
72
75
|
render: s ? /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
73
|
-
|
|
76
|
+
M,
|
|
74
77
|
{
|
|
75
78
|
weight: "bold",
|
|
76
|
-
className:
|
|
79
|
+
className: a(
|
|
77
80
|
e("collapsible-panel-caret"),
|
|
78
81
|
s && e("collapsible-panel-caret-open")
|
|
79
82
|
)
|
|
80
83
|
}
|
|
81
84
|
) }) : /* @__PURE__ */ l(f, { children: /* @__PURE__ */ l(
|
|
82
|
-
|
|
85
|
+
R,
|
|
83
86
|
{
|
|
84
87
|
weight: "bold",
|
|
85
|
-
className:
|
|
88
|
+
className: a(
|
|
86
89
|
e("collapsible-panel-caret"),
|
|
87
90
|
s && e("collapsible-panel-caret-open")
|
|
88
91
|
)
|
|
@@ -97,18 +100,18 @@ const Z = ({
|
|
|
97
100
|
s && p && /* @__PURE__ */ l("div", { className: e("collapsible-panel-header-after"), children: p })
|
|
98
101
|
] }),
|
|
99
102
|
/* @__PURE__ */ l(
|
|
100
|
-
|
|
103
|
+
n.Panel,
|
|
101
104
|
{
|
|
102
105
|
className: e("collapsible-panel-content"),
|
|
103
|
-
style: typeof
|
|
104
|
-
"--ds-content-padding":
|
|
106
|
+
style: typeof o < "u" ? {
|
|
107
|
+
"--ds-content-padding": o === !1 || o === 0 ? "0" : typeof o == "number" ? `${o}px` : o
|
|
105
108
|
} : {},
|
|
106
109
|
keepMounted: w,
|
|
107
110
|
children: /* @__PURE__ */ l(
|
|
108
111
|
E,
|
|
109
112
|
{
|
|
110
|
-
show:
|
|
111
|
-
className:
|
|
113
|
+
show: k,
|
|
114
|
+
className: a(e("collapsible-panel-body"), v),
|
|
112
115
|
keepMounted: !0,
|
|
113
116
|
children: /* @__PURE__ */ l("div", { children: h })
|
|
114
117
|
}
|
|
@@ -120,6 +123,6 @@ const Z = ({
|
|
|
120
123
|
);
|
|
121
124
|
};
|
|
122
125
|
export {
|
|
123
|
-
|
|
126
|
+
X as VerticalCollapsiblePanel
|
|
124
127
|
};
|
|
125
128
|
//# sourceMappingURL=component.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"component.js","sources":["../../../src/components/VerticalCollapsiblePanel/component.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { Collapsible } from \"@base-ui-components/react\";\nimport { MinusCircle, PlusCircle } from \"@bioturing/assets\";\nimport { useCls, clsx
|
|
1
|
+
{"version":3,"file":"component.js","sources":["../../../src/components/VerticalCollapsiblePanel/component.tsx"],"sourcesContent":["\"use client\";\nimport React, { useEffect, useRef, useState } from \"react\";\nimport { Collapsible } from \"@base-ui-components/react\";\nimport { MinusCircle, PlusCircle } from \"@bioturing/assets\";\nimport { useCls, clsx } from \"../utils\";\nimport { useControlledState } from \"../hooks/useControlledState\";\nimport { Transition } from \"../Transition\";\nimport { useAnimationsFinished } from \"../hooks\";\nimport { IconButton } from \"../IconButton\";\nimport { Truncate } from \"../Truncate/component\";\n\n// Import component-specific styles\nimport \"./style.css\";\n\nexport interface VerticalCollapsiblePanelProps {\n /**\n * The content of the panel that will be toggled\n */\n children: React.ReactNode;\n /**\n * The header of the panel\n */\n title?: React.ReactNode;\n /**\n * Indicate if the title should be used as a trigger\n * @default true\n */\n useTitleAsTrigger?: boolean;\n /**\n * Custom Content Padding\n * @default \"24px\"\n */\n contentPadding?: number | string | boolean;\n /**\n * Add more content below the title\n * Only show when panel is open\n */\n afterTitle?: React.ReactNode;\n\n /**\n * Whether the panel is expanded by default\n */\n defaultOpen?: boolean;\n /**\n * Control the open state (makes the component controlled)\n */\n open?: boolean;\n /**\n * Callback when the open state changes\n */\n onOpenChange?: (open: boolean) => void;\n /**\n * Additional class name for the component\n */\n className?: string;\n /**\n * Addtional class name for the header\n */\n headerClassName?: string;\n /**\n * Addtional class name for the header\n */\n headerInnerClassName?: string;\n /**\n * Addtional class name for the body\n * */\n bodyClassName?: string;\n /**\n * Actions to be displayed in the header\n * Only show when panel is open\n */\n actions?: React.ReactNode;\n /**\n * Keeping it as mounted, just hide the content\n */\n keepMounted?: boolean;\n}\n\nexport const VerticalCollapsiblePanel: React.FC<\n VerticalCollapsiblePanelProps\n> = ({\n children,\n title,\n defaultOpen = false,\n open: controlledOpen,\n onOpenChange,\n className,\n headerClassName,\n headerInnerClassName,\n bodyClassName,\n contentPadding = \"16px\",\n afterTitle,\n actions,\n useTitleAsTrigger = true,\n keepMounted = false,\n}) => {\n const cls = useCls();\n // Use useControlledState for open state\n const [isOpen, setIsOpen] = useControlledState(\n controlledOpen,\n onOpenChange,\n defaultOpen\n );\n const [isBodyOpen, setIsBodyOpen] = useState(isOpen);\n const ref = useRef<HTMLDivElement>(null);\n const runOnceAnimationsFinish = useAnimationsFinished(ref, {\n waitForNextTick: isOpen,\n });\n useEffect(() => {\n runOnceAnimationsFinish(() => {\n setIsBodyOpen(isOpen);\n });\n }, [isOpen, runOnceAnimationsFinish]);\n return (\n <Collapsible.Root\n className={clsx(cls(\"collapsible-panel\"), className)}\n open={isOpen}\n onOpenChange={setIsOpen}\n ref={ref}\n >\n <div className={clsx(cls(\"collapsible-panel-header\"), headerClassName)}>\n <div\n className={clsx(\n cls(\"collapsible-panel-header-inner\"),\n headerInnerClassName\n )}\n >\n <div\n className={cls(\"collapsible-panel-header-text\")}\n onClick={\n useTitleAsTrigger ? () => setIsOpen((open) => !open) : undefined\n }\n style={\n useTitleAsTrigger\n ? {\n cursor: \"pointer\",\n }\n : {}\n }\n >\n {typeof title == \"string\" ? <Truncate>{title}</Truncate> : title}\n </div>\n <div className={cls(\"collapsible-panel-header-actions\")}>\n {isOpen && actions}\n <Collapsible.Trigger\n className={cls(\"collapsible-panel-trigger\")}\n render={\n isOpen ? (\n <IconButton>\n <MinusCircle\n weight=\"bold\"\n className={clsx(\n cls(\"collapsible-panel-caret\"),\n isOpen && cls(\"collapsible-panel-caret-open\")\n )}\n />\n </IconButton>\n ) : (\n <IconButton>\n <PlusCircle\n weight=\"bold\"\n className={clsx(\n cls(\"collapsible-panel-caret\"),\n isOpen && cls(\"collapsible-panel-caret-open\")\n )}\n />\n </IconButton>\n )\n }\n ></Collapsible.Trigger>\n </div>\n </div>\n {isOpen && afterTitle && (\n <div className={cls(\"collapsible-panel-header-after\")}>\n {afterTitle}\n </div>\n )}\n </div>\n <Collapsible.Panel\n className={cls(\"collapsible-panel-content\")}\n style={\n (typeof contentPadding != \"undefined\"\n ? {\n \"--ds-content-padding\":\n contentPadding === false || contentPadding === 0\n ? \"0\"\n : typeof contentPadding == \"number\"\n ? `${contentPadding}px`\n : contentPadding,\n }\n : {}) as React.CSSProperties\n }\n keepMounted={keepMounted}\n >\n <Transition\n show={isBodyOpen}\n className={clsx(cls(\"collapsible-panel-body\"), bodyClassName)}\n keepMounted\n >\n <div>{children}</div>\n </Transition>\n </Collapsible.Panel>\n </Collapsible.Root>\n );\n};\n"],"names":["VerticalCollapsiblePanel","children","title","defaultOpen","controlledOpen","onOpenChange","className","headerClassName","headerInnerClassName","bodyClassName","contentPadding","afterTitle","actions","useTitleAsTrigger","keepMounted","cls","useCls","isOpen","setIsOpen","useControlledState","isBodyOpen","setIsBodyOpen","useState","ref","useRef","runOnceAnimationsFinish","useAnimationsFinished","useEffect","jsxs","Collapsible","clsx","jsx","open","Truncate","IconButton","MinusCircle","PlusCircle","Transition"],"mappings":";;;;;;;;;;;;;AA8EO,MAAMA,IAET,CAAC;AAAA,EACH,UAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,MAAMC;AAAA,EACN,cAAAC;AAAA,EACA,WAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,sBAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC,IAAiB;AAAA,EACjB,YAAAC;AAAA,EACA,SAAAC;AAAA,EACA,mBAAAC,IAAoB;AAAA,EACpB,aAAAC,IAAc;AAChB,MAAM;AACJ,QAAMC,IAAMC,EAAO,GAEb,CAACC,GAAQC,CAAS,IAAIC;AAAA,IAC1Bf;AAAA,IACAC;AAAA,IACAF;AAAA,EACF,GACM,CAACiB,GAAYC,CAAa,IAAIC,EAASL,CAAM,GAC7CM,IAAMC,EAAuB,IAAI,GACjCC,IAA0BC,EAAsBH,GAAK;AAAA,IACzD,iBAAiBN;AAAA,EAAA,CAClB;AACD,SAAAU,EAAU,MAAM;AACd,IAAAF,EAAwB,MAAM;AAC5B,MAAAJ,EAAcJ,CAAM;AAAA,IAAA,CACrB;AAAA,EAAA,GACA,CAACA,GAAQQ,CAAuB,CAAC,GAElC,gBAAAG;AAAA,IAACC,EAAY;AAAA,IAAZ;AAAA,MACC,WAAWC,EAAKf,EAAI,mBAAmB,GAAGT,CAAS;AAAA,MACnD,MAAMW;AAAA,MACN,cAAcC;AAAA,MACd,KAAAK;AAAA,MAEA,UAAA;AAAA,QAAA,gBAAAK,EAAC,S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;AAAA,cAAA;AAAA,YAAA;AAAA,UACF;AAAA,UACCE,KAAUN,KACR,gBAAAoB,EAAA,OAAA,EAAI,WAAWhB,EAAI,gCAAgC,GACjD,UACHJ,EAAA,CAAA;AAAA,QAAA,GAEJ;AAAA,QACA,gBAAAoB;AAAA,UAACF,EAAY;AAAA,UAAZ;AAAA,YACC,WAAWd,EAAI,2BAA2B;AAAA,YAC1C,OACG,OAAOL,IAAkB,MACtB;AAAA,cACE,wBACEA,MAAmB,MAASA,MAAmB,IAC3C,MACA,OAAOA,KAAkB,WACzB,GAAGA,CAAc,OACjBA;AAAA,YAAA,IAER,CAAC;AAAA,YAEP,aAAAI;AAAA,YAEA,UAAA,gBAAAiB;AAAA,cAACM;AAAA,cAAA;AAAA,gBACC,MAAMjB;AAAA,gBACN,WAAWU,EAAKf,EAAI,wBAAwB,GAAGN,CAAa;AAAA,gBAC5D,aAAW;AAAA,gBAEX,UAAA,gBAAAsB,EAAC,SAAK,UAAA9B,EAAS,CAAA;AAAA,cAAA;AAAA,YAAA;AAAA,UACjB;AAAA,QAAA;AAAA,MACF;AAAA,IAAA;AAAA,EACF;AAEJ;"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
"use client";
|
|
1
2
|
import s from "antd/es/theme";
|
|
2
|
-
import
|
|
3
|
+
import t from "antd/es/grid";
|
|
3
4
|
import o from "antd/es/app/useApp";
|
|
4
5
|
import { default as d } from "antd/es/app/useApp";
|
|
5
6
|
import { useForm as l, useWatch as x } from "antd/es/form/Form";
|
|
6
|
-
const
|
|
7
|
+
const m = s.useToken, p = t.useBreakpoint, a = () => {
|
|
7
8
|
const { message: e } = o();
|
|
8
9
|
return e;
|
|
9
10
|
}, c = () => {
|
|
@@ -16,7 +17,7 @@ export {
|
|
|
16
17
|
l as useForm,
|
|
17
18
|
a as useMessage,
|
|
18
19
|
c as useModal,
|
|
19
|
-
|
|
20
|
+
m as useToken,
|
|
20
21
|
x as useWatch
|
|
21
22
|
};
|
|
22
23
|
//# sourceMappingURL=antd.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"antd.js","sources":["../../../src/components/hooks/antd.ts"],"sourcesContent":["\"use client\";\nimport theme from \"antd/es/theme\";\nimport Grid from \"antd/es/grid\";\nimport useApp from \"antd/es/app/useApp\";\n\nexport const useToken = theme.useToken;\nexport const useBreakpoint = Grid.useBreakpoint;\n\nexport { useForm, useWatch } from \"antd/es/form/Form\";\n\nexport const useMessage = () => {\n const { message } = useApp();\n return message;\n};\n\nexport const useModal = () => {\n const { modal } = useApp();\n return modal;\n};\n\nexport { useApp };\n"],"names":["useToken","theme","useBreakpoint","Grid","useMessage","message","useApp","useModal","modal"],"mappings":"
|
|
1
|
+
{"version":3,"file":"antd.js","sources":["../../../src/components/hooks/antd.ts"],"sourcesContent":["\"use client\";\nimport theme from \"antd/es/theme\";\nimport Grid from \"antd/es/grid\";\nimport useApp from \"antd/es/app/useApp\";\n\nexport const useToken = theme.useToken;\nexport const useBreakpoint = Grid.useBreakpoint;\n\nexport { useForm, useWatch } from \"antd/es/form/Form\";\n\nexport const useMessage = () => {\n const { message } = useApp();\n return message;\n};\n\nexport const useModal = () => {\n const { modal } = useApp();\n return modal;\n};\n\nexport { useApp };\n"],"names":["useToken","theme","useBreakpoint","Grid","useMessage","message","useApp","useModal","modal"],"mappings":";;;;;;AAKO,MAAMA,IAAWC,EAAM,UACjBC,IAAgBC,EAAK,eAIrBC,IAAa,MAAM;AACxB,QAAA,EAAE,SAAAC,EAAQ,IAAIC,EAAO;AACpB,SAAAD;AACT,GAEaE,IAAW,MAAM;AACtB,QAAA,EAAE,OAAAC,EAAM,IAAIF,EAAO;AAClB,SAAAE;AACT;"}
|
|
@@ -1,47 +1,53 @@
|
|
|
1
|
-
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
1
|
+
"use client";
|
|
2
|
+
import { useLayoutEffect as p, useEffect as m, useRef as c, useCallback as h } from "react";
|
|
3
|
+
import { flushSync as A } from "react-dom";
|
|
4
|
+
const l = typeof window < "u" ? p : m;
|
|
5
|
+
function a(t) {
|
|
6
|
+
const e = c(t);
|
|
7
|
+
return l(() => {
|
|
7
8
|
e.current = t;
|
|
8
|
-
}),
|
|
9
|
-
(...
|
|
9
|
+
}), h(
|
|
10
|
+
(...i) => {
|
|
10
11
|
var n;
|
|
11
|
-
return (n = e.current) == null ? void 0 : n.call(e, ...
|
|
12
|
+
return (n = e.current) == null ? void 0 : n.call(e, ...i);
|
|
12
13
|
},
|
|
13
14
|
[]
|
|
14
15
|
);
|
|
15
16
|
}
|
|
16
|
-
function
|
|
17
|
-
const e =
|
|
18
|
-
return
|
|
17
|
+
function E(t) {
|
|
18
|
+
const e = c(t);
|
|
19
|
+
return l(() => {
|
|
19
20
|
e.current = t;
|
|
20
21
|
}), e;
|
|
21
22
|
}
|
|
22
|
-
function
|
|
23
|
-
|
|
24
|
-
|
|
23
|
+
function R(t, {
|
|
24
|
+
waitForNextTick: e = !1,
|
|
25
|
+
subtree: i = !1
|
|
26
|
+
}) {
|
|
27
|
+
const n = c(-1), u = c(-1), s = a(() => {
|
|
28
|
+
cancelAnimationFrame(n.current), clearTimeout(u.current);
|
|
25
29
|
});
|
|
26
|
-
return
|
|
27
|
-
|
|
28
|
-
const
|
|
29
|
-
|
|
30
|
-
function
|
|
31
|
-
|
|
32
|
-
|
|
30
|
+
return m(() => s, [s]), a((o) => {
|
|
31
|
+
s();
|
|
32
|
+
const r = t.current;
|
|
33
|
+
r && (typeof r.getAnimations != "function" ? o() : n.current = requestAnimationFrame(() => {
|
|
34
|
+
function f() {
|
|
35
|
+
r && Promise.allSettled(
|
|
36
|
+
r.getAnimations({
|
|
37
|
+
subtree: i
|
|
38
|
+
}).map((d) => d.finished)
|
|
33
39
|
).then(() => {
|
|
34
|
-
|
|
40
|
+
A(o);
|
|
35
41
|
});
|
|
36
42
|
}
|
|
37
|
-
e ?
|
|
43
|
+
e ? u.current = window.setTimeout(f) : f();
|
|
38
44
|
}));
|
|
39
45
|
});
|
|
40
46
|
}
|
|
41
47
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
48
|
+
R as useAnimationsFinished,
|
|
49
|
+
l as useEnhancedEffect,
|
|
50
|
+
a as useEventCallback,
|
|
51
|
+
E as useLatestRef
|
|
46
52
|
};
|
|
47
53
|
//# sourceMappingURL=base-ui.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base-ui.js","sources":["../../../src/components/hooks/base-ui.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useEffect, useRef, useCallback } from \"react\";\nimport { flushSync } from \"react-dom\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyFunction = (...args: any[]) => any;\n\nexport const useEnhancedEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useEventCallback<Fn extends AnyFunction>(fn?: Fn) {\n const ref = useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return useCallback<AnyFunction>(\n (...args) => ref.current?.(...args),\n []\n ) as Fn;\n}\n\nexport function useLatestRef<T>(value: T) {\n const ref = useRef(value);\n useEnhancedEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\nexport function useAnimationsFinished(\n ref: React.RefObject<HTMLElement | null>,\n waitForNextTick = false\n) {\n const frameRef = useRef(-1);\n const timeoutRef = useRef(-1);\n\n const cancelTasks = useEventCallback(() => {\n cancelAnimationFrame(frameRef.current);\n clearTimeout(timeoutRef.current);\n });\n\n useEffect(() => cancelTasks, [cancelTasks]);\n\n return useEventCallback((fnToExecute: () => void) => {\n cancelTasks();\n\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n if (typeof element.getAnimations !== \"function\") {\n fnToExecute();\n } else {\n frameRef.current = requestAnimationFrame(() => {\n function exec() {\n if (!element) {\n return;\n }\n\n Promise.allSettled(\n element.getAnimations().map((anim) => anim.finished)\n ).then(() => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n flushSync(fnToExecute);\n });\n }\n\n // `open: true` animations need to wait for the next tick to be detected\n if (waitForNextTick) {\n timeoutRef.current = window.setTimeout(exec);\n } else {\n exec();\n }\n });\n }\n });\n}\n"],"names":["useEnhancedEffect","useLayoutEffect","useEffect","useEventCallback","fn","ref","useRef","useCallback","args","_a","useLatestRef","value","useAnimationsFinished","waitForNextTick","frameRef","timeoutRef","cancelTasks","fnToExecute","element","exec","anim","flushSync"],"mappings":"
|
|
1
|
+
{"version":3,"file":"base-ui.js","sources":["../../../src/components/hooks/base-ui.ts"],"sourcesContent":["\"use client\";\nimport { useLayoutEffect, useEffect, useRef, useCallback } from \"react\";\nimport { flushSync } from \"react-dom\";\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\ntype AnyFunction = (...args: any[]) => any;\n\nexport const useEnhancedEffect =\n typeof window !== \"undefined\" ? useLayoutEffect : useEffect;\n\nexport function useEventCallback<Fn extends AnyFunction>(fn?: Fn) {\n const ref = useRef(fn);\n useEnhancedEffect(() => {\n ref.current = fn;\n });\n return useCallback<AnyFunction>(\n (...args) => ref.current?.(...args),\n []\n ) as Fn;\n}\n\nexport function useLatestRef<T>(value: T) {\n const ref = useRef(value);\n useEnhancedEffect(() => {\n ref.current = value;\n });\n return ref;\n}\n\nexport function useAnimationsFinished(\n ref: React.RefObject<HTMLElement | null>,\n {\n waitForNextTick = false,\n subtree = false,\n }: {\n waitForNextTick?: boolean;\n subtree?: boolean;\n }\n) {\n const frameRef = useRef(-1);\n const timeoutRef = useRef(-1);\n\n const cancelTasks = useEventCallback(() => {\n cancelAnimationFrame(frameRef.current);\n clearTimeout(timeoutRef.current);\n });\n\n useEffect(() => cancelTasks, [cancelTasks]);\n\n return useEventCallback((fnToExecute: () => void) => {\n cancelTasks();\n\n const element = ref.current;\n\n if (!element) {\n return;\n }\n\n if (typeof element.getAnimations !== \"function\") {\n fnToExecute();\n } else {\n frameRef.current = requestAnimationFrame(() => {\n function exec() {\n if (!element) {\n return;\n }\n\n Promise.allSettled(\n element\n .getAnimations({\n subtree,\n })\n .map((anim) => anim.finished)\n ).then(() => {\n // Synchronously flush the unmounting of the component so that the browser doesn't\n // paint: https://github.com/mui/base-ui/issues/979\n flushSync(fnToExecute);\n });\n }\n\n // `open: true` animations need to wait for the next tick to be detected\n if (waitForNextTick) {\n timeoutRef.current = window.setTimeout(exec);\n } else {\n exec();\n }\n });\n }\n });\n}\n"],"names":["useEnhancedEffect","useLayoutEffect","useEffect","useEventCallback","fn","ref","useRef","useCallback","args","_a","useLatestRef","value","useAnimationsFinished","waitForNextTick","subtree","frameRef","timeoutRef","cancelTasks","fnToExecute","element","exec","anim","flushSync"],"mappings":";;;AAOO,MAAMA,IACX,OAAO,SAAW,MAAcC,IAAkBC;AAE7C,SAASC,EAAyCC,GAAS;AAC1D,QAAAC,IAAMC,EAAOF,CAAE;AACrB,SAAAJ,EAAkB,MAAM;AACtB,IAAAK,EAAI,UAAUD;AAAA,EAAA,CACf,GACMG;AAAA,IACL,IAAIC,MAAS;;AAAA,cAAAC,IAAAJ,EAAI,YAAJ,gBAAAI,EAAA,KAAAJ,GAAc,GAAGG;AAAA;AAAA,IAC9B,CAAA;AAAA,EACF;AACF;AAEO,SAASE,EAAgBC,GAAU;AAClC,QAAAN,IAAMC,EAAOK,CAAK;AACxB,SAAAX,EAAkB,MAAM;AACtB,IAAAK,EAAI,UAAUM;AAAA,EAAA,CACf,GACMN;AACT;AAEO,SAASO,EACdP,GACA;AAAA,EACE,iBAAAQ,IAAkB;AAAA,EAClB,SAAAC,IAAU;AACZ,GAIA;AACM,QAAAC,IAAWT,EAAO,EAAE,GACpBU,IAAaV,EAAO,EAAE,GAEtBW,IAAcd,EAAiB,MAAM;AACzC,yBAAqBY,EAAS,OAAO,GACrC,aAAaC,EAAW,OAAO;AAAA,EAAA,CAChC;AAED,SAAAd,EAAU,MAAMe,GAAa,CAACA,CAAW,CAAC,GAEnCd,EAAiB,CAACe,MAA4B;AACvC,IAAAD,EAAA;AAEZ,UAAME,IAAUd,EAAI;AAEpB,IAAKc,MAID,OAAOA,EAAQ,iBAAkB,aACvBD,EAAA,IAEHH,EAAA,UAAU,sBAAsB,MAAM;AAC7C,eAASK,IAAO;AACd,QAAKD,KAIG,QAAA;AAAA,UACNA,EACG,cAAc;AAAA,YACb,SAAAL;AAAA,UACD,CAAA,EACA,IAAI,CAACO,MAASA,EAAK,QAAQ;AAAA,QAChC,EAAE,KAAK,MAAM;AAGX,UAAAC,EAAUJ,CAAW;AAAA,QAAA,CACtB;AAAA,MAAA;AAIH,MAAIL,IACSG,EAAA,UAAU,OAAO,WAAWI,CAAI,IAEtCA,EAAA;AAAA,IACP,CACD;AAAA,EACH,CACD;AACH;"}
|
|
@@ -1,28 +1,30 @@
|
|
|
1
|
-
import { useDS as
|
|
2
|
-
import { getTokensByTheme as
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
)
|
|
1
|
+
import { useDS as c } from "../DSRoot/context.js";
|
|
2
|
+
import { getTokensByTheme as C } from "../../tokens/utils.js";
|
|
3
|
+
import { chartColorTokens as h } from "../../tokens/charts/palettes/cloudscape.js";
|
|
4
|
+
import { CATEGORICAL_PALETTE_NAMES as m, getCategoricalChartColors as L, SEQUENTIAL_PALETTE_NAMES as A, getSequentialChartColors as p } from "../../tokens/charts/palettes/index.js";
|
|
5
|
+
const S = (r = {
|
|
6
|
+
palette: "cloudscape",
|
|
7
|
+
theme: void 0
|
|
8
|
+
}) => {
|
|
9
|
+
const { theme: a } = c(), o = r.theme || a, t = C(h, o), s = t.colorChartsLineAxis, l = t.colorChartsLineGrid, i = t.colorChartsLabelAxis, e = r.palette, n = m.includes(
|
|
10
|
+
e
|
|
11
|
+
) ? L(e, o) : A.includes(e) ? p(e, o) : [];
|
|
10
12
|
return {
|
|
11
|
-
axisLineColor:
|
|
12
|
-
splitLineColor:
|
|
13
|
-
axisLabelColor:
|
|
14
|
-
|
|
13
|
+
axisLineColor: s,
|
|
14
|
+
splitLineColor: l,
|
|
15
|
+
axisLabelColor: i,
|
|
16
|
+
chartColors: n,
|
|
15
17
|
echartsAxisConfig: {
|
|
16
|
-
axisLine: { lineStyle: { color:
|
|
17
|
-
splitLine: { lineStyle: { color:
|
|
18
|
+
axisLine: { lineStyle: { color: s } },
|
|
19
|
+
splitLine: { lineStyle: { color: l } },
|
|
18
20
|
axisLabel: {
|
|
19
|
-
color:
|
|
21
|
+
color: i,
|
|
20
22
|
fontFamily: "InterVariable, Inter, Helvetica, Arial, sans-serif"
|
|
21
23
|
}
|
|
22
24
|
}
|
|
23
25
|
};
|
|
24
26
|
};
|
|
25
27
|
export {
|
|
26
|
-
|
|
28
|
+
S as useCharts
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=useCharts.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCharts.js","sources":["../../../src/components/hooks/useCharts.ts"],"sourcesContent":["import { useDS } from \"../DSRoot/context\";\nimport { getColorsByTheme, getTokensByTheme } from \"../../tokens/utils\";\nimport {\n chartColorTokens,\n categoricalChartColorTokens,\n} from \"../../tokens/charts\";\n\nexport const useCharts = () => {\n const { theme } = useDS();\n const themedChartColorTokens = getTokensByTheme(chartColorTokens, theme);\n const axisLineColor = themedChartColorTokens[\"colorChartsLineAxis\"];\n const splitLineColor = themedChartColorTokens[\"colorChartsLineGrid\"];\n const axisLabelColor = themedChartColorTokens[\"colorChartsLabelAxis\"];\n const
|
|
1
|
+
{"version":3,"file":"useCharts.js","sources":["../../../src/components/hooks/useCharts.ts"],"sourcesContent":["import { useDS } from \"../DSRoot/context\";\nimport { getColorsByTheme, getTokensByTheme } from \"../../tokens/utils\";\nimport {\n chartColorTokens,\n categoricalChartColorTokens,\n} from \"../../tokens/charts/palettes/cloudscape\";\n\nimport {\n SequentialPaletteName,\n CategoricalPaletteName,\n CATEGORICAL_PALETTE_NAMES,\n getCategoricalChartColors,\n getSequentialChartColors,\n SEQUENTIAL_PALETTE_NAMES,\n Theme,\n} from \"../../tokens\";\n\nexport interface UseChartsOptions {\n /**\n * The palette to use for the charts.\n * @default \"cloudscape\"\n */\n palette?: SequentialPaletteName | CategoricalPaletteName;\n /**\n * The theme to use for the charts.\n * @default \"light\"\n */\n theme?: Theme;\n}\n\n/**\n * Get chart colors and axis configuration based on the current theme.\n * @param options\n * @returns\n */\nexport const useCharts = (\n options: UseChartsOptions = {\n palette: \"cloudscape\",\n theme: undefined,\n }\n) => {\n const { theme: themeContext } = useDS();\n const theme = options.theme || themeContext;\n const themedChartColorTokens = getTokensByTheme(chartColorTokens, theme);\n const axisLineColor = themedChartColorTokens[\"colorChartsLineAxis\"];\n const splitLineColor = themedChartColorTokens[\"colorChartsLineGrid\"];\n const axisLabelColor = themedChartColorTokens[\"colorChartsLabelAxis\"];\n\n const palette = options.palette;\n\n const chartColors = CATEGORICAL_PALETTE_NAMES.includes(\n palette as CategoricalPaletteName\n )\n ? getCategoricalChartColors(palette as CategoricalPaletteName, theme)\n : SEQUENTIAL_PALETTE_NAMES.includes(palette as SequentialPaletteName)\n ? getSequentialChartColors(palette as SequentialPaletteName, theme)\n : [];\n const echartsAxisConfig = {\n axisLine: { lineStyle: { color: axisLineColor } },\n splitLine: { lineStyle: { color: splitLineColor } },\n axisLabel: {\n color: axisLabelColor,\n fontFamily: \"InterVariable, Inter, Helvetica, Arial, sans-serif\",\n },\n };\n\n return {\n axisLineColor,\n splitLineColor,\n axisLabelColor,\n chartColors,\n echartsAxisConfig,\n };\n};\n"],"names":["useCharts","options","themeContext","useDS","theme","themedChartColorTokens","getTokensByTheme","chartColorTokens","axisLineColor","splitLineColor","axisLabelColor","palette","chartColors","CATEGORICAL_PALETTE_NAMES","getCategoricalChartColors","SEQUENTIAL_PALETTE_NAMES","getSequentialChartColors"],"mappings":";;;;AAmCa,MAAAA,IAAY,CACvBC,IAA4B;AAAA,EAC1B,SAAS;AAAA,EACT,OAAO;AACT,MACG;AACH,QAAM,EAAE,OAAOC,EAAa,IAAIC,EAAM,GAChCC,IAAQH,EAAQ,SAASC,GACzBG,IAAyBC,EAAiBC,GAAkBH,CAAK,GACjEI,IAAgBH,EAAuB,qBACvCI,IAAiBJ,EAAuB,qBACxCK,IAAiBL,EAAuB,sBAExCM,IAAUV,EAAQ,SAElBW,IAAcC,EAA0B;AAAA,IAC5CF;AAAA,EAEE,IAAAG,EAA0BH,GAAmCP,CAAK,IAClEW,EAAyB,SAASJ,CAAgC,IAClEK,EAAyBL,GAAkCP,CAAK,IAChE,CAAC;AAUE,SAAA;AAAA,IACL,eAAAI;AAAA,IACA,gBAAAC;AAAA,IACA,gBAAAC;AAAA,IACA,aAAAE;AAAA,IACA,mBAdwB;AAAA,MACxB,UAAU,EAAE,WAAW,EAAE,OAAOJ,IAAgB;AAAA,MAChD,WAAW,EAAE,WAAW,EAAE,OAAOC,IAAiB;AAAA,MAClD,WAAW;AAAA,QACT,OAAOC;AAAA,QACP,YAAY;AAAA,MAAA;AAAA,IAEhB;AAAA,EAQA;AACF;"}
|