@rebasepro/ui 0.24.0 → 0.24.1-canary.gcb918fc
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/Alert.d.ts +6 -0
- package/dist/components/Alert.es.js +82 -0
- package/dist/components/Alert.es.js.map +1 -0
- package/dist/components/Autocomplete.es.js +53 -0
- package/dist/components/Autocomplete.es.js.map +1 -0
- package/dist/components/Avatar.d.ts +3 -1
- package/dist/components/Avatar.es.js +37 -0
- package/dist/components/Avatar.es.js.map +1 -0
- package/dist/components/Badge.es.js +27 -0
- package/dist/components/Badge.es.js.map +1 -0
- package/dist/components/BooleanSwitch.es.js +75 -0
- package/dist/components/BooleanSwitch.es.js.map +1 -0
- package/dist/components/BooleanSwitchWithLabel.es.js +55 -0
- package/dist/components/BooleanSwitchWithLabel.es.js.map +1 -0
- package/dist/components/Button.es.js +58 -0
- package/dist/components/Button.es.js.map +1 -0
- package/dist/components/Card.es.js +26 -0
- package/dist/components/Card.es.js.map +1 -0
- package/dist/components/CenteredView.es.js +23 -0
- package/dist/components/CenteredView.es.js.map +1 -0
- package/dist/components/Checkbox.es.js +62 -0
- package/dist/components/Checkbox.es.js.map +1 -0
- package/dist/components/Chip.es.js +72 -0
- package/dist/components/Chip.es.js.map +1 -0
- package/dist/components/CircularProgress.es.js +28 -0
- package/dist/components/CircularProgress.es.js.map +1 -0
- package/dist/components/CircularProgressCenter.es.js +30 -0
- package/dist/components/CircularProgressCenter.es.js.map +1 -0
- package/dist/components/Collapse.es.js +57 -0
- package/dist/components/Collapse.es.js.map +1 -0
- package/dist/components/ColorPicker.es.js +89 -0
- package/dist/components/ColorPicker.es.js.map +1 -0
- package/dist/components/Container.es.js +31 -0
- package/dist/components/Container.es.js.map +1 -0
- package/dist/components/DateTimeField.d.ts +11 -1
- package/dist/components/DateTimeField.es.js +253 -0
- package/dist/components/DateTimeField.es.js.map +1 -0
- package/dist/components/DebouncedTextField.es.js +93 -0
- package/dist/components/DebouncedTextField.es.js.map +1 -0
- package/dist/components/Dialog.es.js +98 -0
- package/dist/components/Dialog.es.js.map +1 -0
- package/dist/components/DialogActions.es.js +15 -0
- package/dist/components/DialogActions.es.js.map +1 -0
- package/dist/components/DialogContent.es.js +18 -0
- package/dist/components/DialogContent.es.js.map +1 -0
- package/dist/components/DialogTitle.es.js +26 -0
- package/dist/components/DialogTitle.es.js.map +1 -0
- package/dist/components/ErrorBoundary.es.js +158 -0
- package/dist/components/ErrorBoundary.es.js.map +1 -0
- package/dist/components/ExpandablePanel.es.js +91 -0
- package/dist/components/ExpandablePanel.es.js.map +1 -0
- package/dist/components/FileUpload.es.js +58 -0
- package/dist/components/FileUpload.es.js.map +1 -0
- package/dist/components/FilterChip.es.js +31 -0
- package/dist/components/FilterChip.es.js.map +1 -0
- package/dist/components/IconButton.es.js +52 -0
- package/dist/components/IconButton.es.js.map +1 -0
- package/dist/components/InfoLabel.es.js +18 -0
- package/dist/components/InfoLabel.es.js.map +1 -0
- package/dist/components/InputLabel.es.js +27 -0
- package/dist/components/InputLabel.es.js.map +1 -0
- package/dist/components/Label.es.js +18 -0
- package/dist/components/Label.es.js.map +1 -0
- package/dist/components/LoadingButton.es.js +21 -0
- package/dist/components/LoadingButton.es.js.map +1 -0
- package/dist/components/Markdown.es.js +88 -0
- package/dist/components/Markdown.es.js.map +1 -0
- package/dist/components/Menu.es.js +46 -0
- package/dist/components/Menu.es.js.map +1 -0
- package/dist/components/Menubar.es.js +142 -0
- package/dist/components/Menubar.es.js.map +1 -0
- package/dist/components/MultiSelect.d.ts +1 -7
- package/dist/components/MultiSelect.es.js +271 -0
- package/dist/components/MultiSelect.es.js.map +1 -0
- package/dist/components/Paper.es.js +16 -0
- package/dist/components/Paper.es.js.map +1 -0
- package/dist/components/Popover.es.js +113 -0
- package/dist/components/Popover.es.js.map +1 -0
- package/dist/components/RadioGroup.es.js +30 -0
- package/dist/components/RadioGroup.es.js.map +1 -0
- package/dist/components/ResizablePanels.d.ts +3 -1
- package/dist/components/ResizablePanels.es.js +137 -0
- package/dist/components/ResizablePanels.es.js.map +1 -0
- package/dist/components/SearchBar.es.js +82 -0
- package/dist/components/SearchBar.es.js.map +1 -0
- package/dist/components/Select.d.ts +8 -1
- package/dist/components/Select.es.js +300 -0
- package/dist/components/Select.es.js.map +1 -0
- package/dist/components/Separator.es.js +20 -0
- package/dist/components/Separator.es.js.map +1 -0
- package/dist/components/Sheet.es.js +73 -0
- package/dist/components/Sheet.es.js.map +1 -0
- package/dist/components/Skeleton.es.js +33 -0
- package/dist/components/Skeleton.es.js.map +1 -0
- package/dist/components/Slider.es.js +56 -0
- package/dist/components/Slider.es.js.map +1 -0
- package/dist/components/Table.d.ts +18 -3
- package/dist/components/Table.es.js +69 -0
- package/dist/components/Table.es.js.map +1 -0
- package/dist/components/Tabs.es.js +101 -0
- package/dist/components/Tabs.es.js.map +1 -0
- package/dist/components/TextField.d.ts +0 -8
- package/dist/components/TextField.es.js +111 -0
- package/dist/components/TextField.es.js.map +1 -0
- package/dist/components/TextareaAutosize.es.js +187 -0
- package/dist/components/TextareaAutosize.es.js.map +1 -0
- package/dist/components/ToggleButtonGroup.d.ts +6 -1
- package/dist/components/ToggleButtonGroup.es.js +35 -0
- package/dist/components/ToggleButtonGroup.es.js.map +1 -0
- package/dist/components/Tooltip.d.ts +24 -0
- package/dist/components/Tooltip.es.js +165 -0
- package/dist/components/Tooltip.es.js.map +1 -0
- package/dist/components/Typography.es.js +85 -0
- package/dist/components/Typography.es.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTable.es.js +516 -0
- package/dist/components/VirtualTable/VirtualTable.es.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTableCell.d.ts +1 -1
- package/dist/components/VirtualTable/VirtualTableCell.es.js +40 -0
- package/dist/components/VirtualTable/VirtualTableCell.es.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTableHeader.es.js +209 -0
- package/dist/components/VirtualTable/VirtualTableHeader.es.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTableHeaderRow.es.js +166 -0
- package/dist/components/VirtualTable/VirtualTableHeaderRow.es.js.map +1 -0
- package/dist/components/VirtualTable/VirtualTableProps.d.ts +13 -2
- package/dist/components/VirtualTable/VirtualTableRow.d.ts +6 -7
- package/dist/components/VirtualTable/VirtualTableRow.es.js +41 -0
- package/dist/components/VirtualTable/VirtualTableRow.es.js.map +1 -0
- package/dist/components/VirtualTable/fields/VirtualTableDateField.d.ts +2 -1
- package/dist/components/VirtualTable/fields/VirtualTableDateField.es.js +71 -0
- package/dist/components/VirtualTable/fields/VirtualTableDateField.es.js.map +1 -0
- package/dist/components/VirtualTable/fields/VirtualTableInput.es.js +73 -0
- package/dist/components/VirtualTable/fields/VirtualTableInput.es.js.map +1 -0
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.es.js +47 -0
- package/dist/components/VirtualTable/fields/VirtualTableNumberInput.es.js.map +1 -0
- package/dist/components/VirtualTable/fields/VirtualTableSelect.es.js +83 -0
- package/dist/components/VirtualTable/fields/VirtualTableSelect.es.js.map +1 -0
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.es.js +22 -0
- package/dist/components/VirtualTable/fields/VirtualTableSwitch.es.js.map +1 -0
- package/dist/components/VirtualTable/selection/SelectionContext.es.js +23 -0
- package/dist/components/VirtualTable/selection/SelectionContext.es.js.map +1 -0
- package/dist/components/VirtualTable/selection/SelectionStore.es.js +43 -0
- package/dist/components/VirtualTable/selection/SelectionStore.es.js.map +1 -0
- package/dist/components/VirtualTable/types.d.ts +1 -1
- package/dist/components/common/SelectInputLabel.es.js +28 -0
- package/dist/components/common/SelectInputLabel.es.js.map +1 -0
- package/dist/components/index.es.js +64 -0
- package/dist/hooks/PortalContainerContext.es.js +40 -0
- package/dist/hooks/PortalContainerContext.es.js.map +1 -0
- package/dist/hooks/UiLabelsContext.d.ts +63 -0
- package/dist/hooks/UiLabelsContext.es.js +59 -0
- package/dist/hooks/UiLabelsContext.es.js.map +1 -0
- package/dist/hooks/useDebounceCallback.es.js +15 -0
- package/dist/hooks/useDebounceCallback.es.js.map +1 -0
- package/dist/hooks/useDebounceValue.es.js +19 -0
- package/dist/hooks/useDebounceValue.es.js.map +1 -0
- package/dist/hooks/useDebouncedCallback.es.js +36 -0
- package/dist/hooks/useDebouncedCallback.es.js.map +1 -0
- package/dist/hooks/useInjectStyles.es.js +27 -0
- package/dist/hooks/useInjectStyles.es.js.map +1 -0
- package/dist/hooks/useIsDarkMode.es.js +61 -0
- package/dist/hooks/useIsDarkMode.es.js.map +1 -0
- package/dist/hooks/useModalFocus.es.js +81 -0
- package/dist/hooks/useModalFocus.es.js.map +1 -0
- package/dist/hooks/useOutsideAlerter.es.js +41 -0
- package/dist/hooks/useOutsideAlerter.es.js.map +1 -0
- package/dist/hooks/useRestoreInterruptedFocus.es.js +61 -0
- package/dist/hooks/useRestoreInterruptedFocus.es.js.map +1 -0
- package/dist/icons/GitHubIcon.es.js +23 -0
- package/dist/icons/GitHubIcon.es.js.map +1 -0
- package/dist/icons/HandleIcon.es.js +60 -0
- package/dist/icons/HandleIcon.es.js.map +1 -0
- package/dist/icons/Icon.es.js +25 -0
- package/dist/icons/Icon.es.js.map +1 -0
- package/dist/icons/LucideIconByName.d.ts +12 -9
- package/dist/icons/LucideIconByName.es.js +83 -0
- package/dist/icons/LucideIconByName.es.js.map +1 -0
- package/dist/icons/cool_icon_keys.es.js +55 -0
- package/dist/icons/cool_icon_keys.es.js.map +1 -0
- package/dist/icons/icon_keys.es.js +1941 -0
- package/dist/icons/icon_keys.es.js.map +1 -0
- package/dist/icons/index.d.ts +4 -3
- package/dist/icons/index.es.js +8 -0
- package/dist/icons/lucide_icon_map.d.ts +12 -0
- package/dist/icons/lucide_icon_map.es.js +2 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.es.js +87 -9563
- package/dist/styles.es.js +158 -0
- package/dist/styles.es.js.map +1 -0
- package/dist/util/chip_colors.es.js +290 -0
- package/dist/util/chip_colors.es.js.map +1 -0
- package/dist/util/cls.es.js +10 -0
- package/dist/util/cls.es.js.map +1 -0
- package/dist/util/debounce.es.js +22 -0
- package/dist/util/debounce.es.js.map +1 -0
- package/dist/util/hash.es.js +16 -0
- package/dist/util/hash.es.js.map +1 -0
- package/dist/util/keys.es.js +37 -0
- package/dist/util/keys.es.js.map +1 -0
- package/dist/util/lazy_chunk.es.js +96 -0
- package/dist/util/lazy_chunk.es.js.map +1 -0
- package/dist/views/CardView.d.ts +26 -2
- package/dist/views/CardView.es.js +435 -0
- package/dist/views/CardView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionCardView.es.js +179 -0
- package/dist/views/CollectionView/CollectionCardView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionKanbanView.es.js +172 -0
- package/dist/views/CollectionView/CollectionKanbanView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionListView.es.js +156 -0
- package/dist/views/CollectionView/CollectionListView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionTableView.es.js +149 -0
- package/dist/views/CollectionView/CollectionTableView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionView.es.js +197 -0
- package/dist/views/CollectionView/CollectionView.es.js.map +1 -0
- package/dist/views/CollectionView/CollectionViewToolbar.es.js +155 -0
- package/dist/views/CollectionView/CollectionViewToolbar.es.js.map +1 -0
- package/dist/views/CollectionView/DefaultCellRenderer.es.js +302 -0
- package/dist/views/CollectionView/DefaultCellRenderer.es.js.map +1 -0
- package/dist/views/CollectionView/resolveTitleProperty.es.js +56 -0
- package/dist/views/CollectionView/resolveTitleProperty.es.js.map +1 -0
- package/dist/views/CollectionView/utils.es.js +19 -0
- package/dist/views/CollectionView/utils.es.js.map +1 -0
- package/dist/views/Kanban/Board.es.js +237 -0
- package/dist/views/Kanban/Board.es.js.map +1 -0
- package/dist/views/Kanban/BoardColumn.es.js +81 -0
- package/dist/views/Kanban/BoardColumn.es.js.map +1 -0
- package/dist/views/Kanban/BoardColumnTitle.es.js +27 -0
- package/dist/views/Kanban/BoardColumnTitle.es.js.map +1 -0
- package/dist/views/Kanban/BoardSortableList.es.js +98 -0
- package/dist/views/Kanban/BoardSortableList.es.js.map +1 -0
- package/dist/views/Kanban/placement.es.js +27 -0
- package/dist/views/Kanban/placement.es.js.map +1 -0
- package/dist/views/KanbanView.es.js +11 -0
- package/dist/views/KanbanView.es.js.map +1 -0
- package/dist/views/ListView.d.ts +15 -2
- package/dist/views/ListView.es.js +245 -0
- package/dist/views/ListView.es.js.map +1 -0
- package/dist/views/useScrollParentRestoration.d.ts +8 -1
- package/dist/views/useScrollParentRestoration.es.js +75 -0
- package/dist/views/useScrollParentRestoration.es.js.map +1 -0
- package/package.json +2 -2
- package/dist/index.es.js.map +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TextareaAutosize.es.js","names":[],"sources":["../../src/components/TextareaAutosize.tsx"],"sourcesContent":["\"use client\";\nimport * as React from \"react\";\nimport { useLayoutEffect } from \"react\";\nimport * as ReactDOM from \"react-dom\";\nimport { cls, debounce } from \"../util\";\n\ntype State = {\n outerHeightStyle: number;\n overflow?: boolean | undefined;\n};\n\nfunction getStyleValue(value: string) {\n return parseInt(value, 10) || 0;\n}\n\nconst styles: {\n shadow: React.CSSProperties;\n} = {\n shadow: {\n // Visibility needed to hide the extra text area on iPads\n visibility: \"hidden\",\n // Remove from the content flow\n position: \"absolute\",\n // Ignore the scrollbar width\n overflow: \"hidden\",\n height: 0,\n top: 0,\n left: 0,\n // Create a new layer, increase the isolation of the computed values\n transform: \"translateZ(0)\"\n }\n};\n\nfunction isEmpty(obj: State) {\n return (\n obj === undefined ||\n obj === null ||\n Object.keys(obj).length === 0 ||\n (obj.outerHeightStyle === 0 && !obj.overflow)\n );\n}\n\nexport const TextareaAutosize = React.forwardRef(function TextareaAutosize(\n props: TextareaAutosizeProps,\n ref: React.ForwardedRef<Element>\n) {\n const {\n onChange,\n onScroll,\n onResize,\n maxRows,\n minRows = 1,\n style,\n value,\n onFocus,\n onBlur,\n sizeRef,\n ignoreBoxSizing,\n ...other\n } = props;\n\n const { current: isControlled } = React.useRef(value != null);\n const inputRef = React.useRef<HTMLInputElement>(null);\n const handleRef = useForkRef(ref, inputRef);\n const shadowRef = React.useRef<HTMLTextAreaElement>(null);\n const renders = React.useRef(0);\n const [state, setState] = React.useState<State>({\n outerHeightStyle: 0\n });\n\n const getUpdatedState = React.useCallback(() => {\n\n const input = inputRef.current!;\n if (typeof window === \"undefined\") {\n return {\n outerHeightStyle: 0\n };\n }\n\n const containerWindow = window;\n const computedStyle = containerWindow.getComputedStyle(input);\n\n // If input's width is shrunk and it's not visible, don't sync height.\n if (computedStyle.width === \"0px\") {\n return {\n outerHeightStyle: 0\n };\n }\n\n const sizeReferenceElement = sizeRef?.current ?? shadowRef.current!;\n const inputShallow = shadowRef.current!;\n\n sizeReferenceElement.style.width = computedStyle.width;\n inputShallow.value = input.value || props.placeholder || \"x\";\n if (inputShallow.value.slice(-1) === \"\\n\") {\n // Certain fonts which overflow the line height will cause the textarea\n // to report a different scrollHeight depending on whether the last line\n // is empty. Make it non-empty to avoid this issue.\n inputShallow.value += \" \";\n }\n\n const boxSizing = computedStyle.boxSizing;\n const padding =\n getStyleValue(computedStyle.paddingBottom) + getStyleValue(computedStyle.paddingTop);\n const border =\n getStyleValue(computedStyle.borderBottomWidth) + getStyleValue(computedStyle.borderTopWidth);\n const minHeight = getStyleValue(computedStyle.minHeight);\n\n // The height of the inner content\n const innerHeight = sizeReferenceElement.scrollHeight;\n\n // Measure height of a textarea with a single row\n inputShallow.value = \"x\";\n const singleRowHeight = sizeReferenceElement.scrollHeight;\n\n // The height of the outer content\n let outerHeight = innerHeight;\n\n if (minRows) {\n outerHeight = Math.max(Number(minRows) * singleRowHeight, outerHeight);\n }\n if (maxRows) {\n outerHeight = Math.min(Number(maxRows) * singleRowHeight, outerHeight);\n }\n outerHeight = Math.max(outerHeight, singleRowHeight, minHeight);\n\n // Take the box sizing into account for applying this value as a style.\n const outerHeightStyle = outerHeight + (!ignoreBoxSizing && boxSizing === \"border-box\" ? padding + border : 0);\n\n const overflow = Math.abs(outerHeight - innerHeight) <= 1;\n\n return {\n outerHeightStyle,\n overflow\n };\n }, [maxRows, minRows, props.placeholder]);\n\n const updateState = React.useCallback((prevState: State, newState: State) => {\n const {\n outerHeightStyle,\n overflow\n } = newState;\n // Need a large enough difference to update the height.\n // This prevents infinite rendering loop.\n if (\n renders.current < 20 &&\n ((outerHeightStyle > 0 &&\n Math.abs((prevState.outerHeightStyle || 0) - outerHeightStyle) > 1) ||\n prevState.overflow !== overflow)\n ) {\n renders.current += 1;\n return {\n overflow,\n outerHeightStyle\n };\n }\n if (process.env.NODE_ENV !== \"production\") {\n if (renders.current === 20) {\n console.error(\n [\n \"MUI: Too many re-renders. The layout is unstable.\",\n \"TextareaAutosize limits the number of renders to prevent an infinite loop.\"\n ].join(\"\\n\")\n );\n }\n }\n return prevState;\n }, []);\n\n const syncHeight = React.useCallback(() => {\n const newState = getUpdatedState();\n\n if (isEmpty(newState)) {\n return;\n }\n if (onResize) {\n onResize(newState);\n }\n\n setState((prevState) => {\n return updateState(prevState, newState);\n });\n }, [getUpdatedState, onResize, updateState]);\n\n const syncHeightWithFlushSync = React.useCallback(() => {\n const newState = getUpdatedState();\n\n if (isEmpty(newState)) {\n return;\n }\n\n // In React 18, state updates in a ResizeObserver's callback are happening after the paint which causes flickering\n // when doing some visual updates in it. Using flushSync ensures that the dom will be painted after the states updates happen\n // Related issue - https://github.com/facebook/react/issues/24331\n ReactDOM.flushSync(() => {\n setState((prevState) => {\n return updateState(prevState, newState);\n });\n });\n }, [getUpdatedState, updateState]);\n\n React.useEffect(() => {\n const handleResize = debounce(() => {\n renders.current = 0;\n\n // If the TextareaAutosize component is replaced by Suspense with a fallback, the last\n // ResizeObserver's handler that runs because of the change in the layout is trying to\n // access a dom node that is no longer there (as the fallback component is being shown instead).\n if (inputRef.current) {\n syncHeightWithFlushSync();\n }\n });\n let resizeObserver: ResizeObserver;\n\n const input = inputRef.current!;\n const containerWindow = window;\n if (typeof window === \"undefined\") {\n return;\n }\n\n containerWindow.addEventListener(\"resize\", handleResize);\n\n if (typeof ResizeObserver !== \"undefined\") {\n resizeObserver = new ResizeObserver(handleResize);\n resizeObserver.observe(input);\n }\n\n return () => {\n handleResize.clear();\n containerWindow.removeEventListener(\"resize\", handleResize);\n if (resizeObserver) {\n resizeObserver.disconnect();\n }\n };\n }, [syncHeightWithFlushSync]);\n\n // Measuring is a forced synchronous layout (write the shadow, read\n // `getComputedStyle` and `scrollHeight`), so it runs when something that\n // decides the height changes — not on every render, which made each\n // multiline field pay one per re-render of the form around it. Width\n // changes re-sync through the ResizeObserver above; an uncontrolled\n // textarea re-syncs in `handleChange`. The style is compared by content:\n // callers pass it inline.\n const styleKey = style ? JSON.stringify(style) : \"\";\n useLayoutEffect(() => {\n syncHeight();\n }, [syncHeight, value, props.className, props.shadowClassName, styleKey, sizeRef, ignoreBoxSizing]);\n\n React.useEffect(() => {\n renders.current = 0;\n }, [value]);\n\n const handleChange = (event: React.ChangeEvent<HTMLTextAreaElement>) => {\n renders.current = 0;\n\n if (!isControlled) {\n syncHeight();\n }\n\n if (onChange) {\n onChange(event);\n }\n };\n\n return (\n <React.Fragment>\n <textarea\n value={value}\n onChange={handleChange}\n className={props.className}\n ref={handleRef as React.Ref<HTMLTextAreaElement>}\n onFocus={onFocus}\n onBlur={onBlur}\n // Apply the rows prop to get a \"correct\" first SSR paint\n rows={minRows as number}\n style={{\n height: state.outerHeightStyle,\n // Need a large enough difference to allow scrolling.\n // This prevents infinite rendering loop.\n overflow: state.overflow ? \"hidden\" : undefined,\n ...style\n }}\n onScroll={onScroll}\n {...other}\n />\n <textarea\n aria-hidden\n className={cls(props.className, props.shadowClassName)}\n readOnly\n ref={shadowRef}\n tabIndex={-1}\n style={{\n padding: 0,\n ...styles.shadow,\n ...style\n }}\n />\n </React.Fragment>\n );\n}) as React.FC<TextareaAutosizeProps & { ref?: React.ForwardedRef<Element> }>;\n\nexport type TextareaAutosizeProps = Omit<React.InputHTMLAttributes<HTMLTextAreaElement>, \"onResize\"> & {\n\n className?: string;\n\n shadowClassName?: string;\n\n /**\n * Maximum number of rows to display.\n */\n maxRows?: number | string;\n /**\n * Minimum number of rows to display.\n * @default 1\n */\n minRows?: number | string;\n /**\n * @ignore\n */\n onChange?: (event: React.ChangeEvent<HTMLTextAreaElement>) => void;\n /**\n * @ignore\n */\n placeholder?: string;\n /**\n * @ignore\n */\n style?: object;\n /**\n * @ignore\n */\n value?: string[] | number | string;\n\n sizeRef?: React.RefObject<HTMLDivElement>;\n\n onScroll?: (event: React.UIEvent<HTMLTextAreaElement>) => void;\n\n onResize?: (state: State) => void;\n\n autoFocus?: boolean;\n\n ignoreBoxSizing?: boolean;\n}\n\nfunction useForkRef<Instance>(\n ...refs: Array<React.Ref<Instance> | undefined>\n): React.RefCallback<Instance> | null {\n /**\n * This will create a new function if the refs passed to this hook change and are all defined.\n * This means react will call the old forkRef with `null` and the new forkRef\n * with the ref. Cleanup naturally emerges from this behavior.\n */\n return React.useMemo(() => {\n if (refs.every((ref) => ref == null)) {\n return null;\n }\n\n return (instance) => {\n refs.forEach((ref) => {\n setRef(ref, instance);\n });\n };\n\n }, refs);\n}\n\nfunction setRef<T>(\n ref: React.MutableRefObject<T | null> | ((instance: T | null) => void) | null | undefined,\n value: T | null\n): void {\n if (typeof ref === \"function\") {\n ref(value);\n } else if (ref) {\n ref.current = value;\n }\n}\n"],"mappings":";;;;;;;;AAWA,SAAS,cAAc,OAAe;CAClC,OAAO,SAAS,OAAO,EAAE,KAAK;AAClC;AAEA,IAAM,SAEF,EACA,QAAQ;CAEJ,YAAY;CAEZ,UAAU;CAEV,UAAU;CACV,QAAQ;CACR,KAAK;CACL,MAAM;CAEN,WAAW;AACf,EACJ;AAEA,SAAS,QAAQ,KAAY;CACzB,OACI,QAAQ,KAAA,KACR,QAAQ,QACR,OAAO,KAAK,GAAG,CAAC,CAAC,WAAW,KAC3B,IAAI,qBAAqB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/B,OAAO;EAGX,QAAQ,aAAa;GACjB,KAAK,SAAS,QAAQ;IAClB,OAAO,KAAK,QAAQ;GACxB,CAAC;EACL;CAEJ,GAAG,IAAI;AACX;AAEA,SAAS,OACL,KACA,OACI;CACJ,IAAI,OAAO,QAAQ,YACf,IAAI,KAAK;MACN,IAAI,KACP,IAAI,UAAU;AAEtB"}
|
|
@@ -22,9 +22,14 @@ export type ToggleButtonGroupProps<T extends string = string> = {
|
|
|
22
22
|
* Additional class names for the container
|
|
23
23
|
*/
|
|
24
24
|
className?: string;
|
|
25
|
+
/** Names the group: what it chooses between, e.g. "View mode". */
|
|
26
|
+
"aria-label"?: string;
|
|
27
|
+
"aria-labelledby"?: string;
|
|
28
|
+
/** Stretch the track to its container and split it evenly between the options. */
|
|
29
|
+
fullWidth?: boolean;
|
|
25
30
|
};
|
|
26
31
|
/**
|
|
27
32
|
* A toggle button group component for selecting one option from a set.
|
|
28
33
|
* Displays options as buttons in a horizontal row with active state styling.
|
|
29
34
|
*/
|
|
30
|
-
export declare function ToggleButtonGroup<T extends string = string>({ value, onValueChange, options, className }: ToggleButtonGroupProps<T>): React.JSX.Element;
|
|
35
|
+
export declare function ToggleButtonGroup<T extends string = string>({ value, onValueChange, options, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, fullWidth }: ToggleButtonGroupProps<T>): React.JSX.Element;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { cls } from "../util/cls.es.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx, jsxs } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/ToggleButtonGroup.tsx
|
|
5
|
+
/**
|
|
6
|
+
* A toggle button group component for selecting one option from a set.
|
|
7
|
+
* Displays options as buttons in a horizontal row with active state styling.
|
|
8
|
+
*/
|
|
9
|
+
function ToggleButtonGroup({ value, onValueChange, options, className, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledBy, fullWidth }) {
|
|
10
|
+
return /* @__PURE__ */ jsx("div", {
|
|
11
|
+
role: "group",
|
|
12
|
+
"aria-label": ariaLabel,
|
|
13
|
+
"aria-labelledby": ariaLabelledBy,
|
|
14
|
+
className: cls(fullWidth ? "flex w-full" : "inline-flex", "flex-row bg-surface-field rounded-lg p-1 gap-1", className),
|
|
15
|
+
children: options.map((option) => /* @__PURE__ */ jsxs("button", {
|
|
16
|
+
type: "button",
|
|
17
|
+
onClick: (e) => {
|
|
18
|
+
e.stopPropagation();
|
|
19
|
+
if (!option.disabled) onValueChange(option.value);
|
|
20
|
+
},
|
|
21
|
+
disabled: option.disabled,
|
|
22
|
+
"aria-pressed": value === option.value,
|
|
23
|
+
"aria-disabled": option.disabled || void 0,
|
|
24
|
+
className: cls(fullWidth && "flex-1", "flex flex-row items-center justify-center gap-2 h-6 px-3.5 rounded-md transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50", value === option.value ? "bg-surface-lifted text-text-primary dark:text-text-primary-dark shadow-sm" : "text-text-secondary dark:text-text-secondary-dark hover:bg-surface-hover", option.disabled && "opacity-50 cursor-not-allowed"),
|
|
25
|
+
children: [option.icon, /* @__PURE__ */ jsx("span", {
|
|
26
|
+
className: "text-xs font-medium",
|
|
27
|
+
children: option.label
|
|
28
|
+
})]
|
|
29
|
+
}, option.value))
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
//#endregion
|
|
33
|
+
export { ToggleButtonGroup };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=ToggleButtonGroup.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ToggleButtonGroup.es.js","names":[],"sources":["../../src/components/ToggleButtonGroup.tsx"],"sourcesContent":["import React from \"react\";\nimport { cls } from \"../util\";\n\nexport type ToggleButtonOption<T extends string = string> = {\n value: T;\n label: string;\n icon?: React.ReactNode;\n disabled?: boolean;\n}\n\nexport type ToggleButtonGroupProps<T extends string = string> = {\n /**\n * Currently selected value\n */\n value: T;\n /**\n * Callback when value changes\n */\n onValueChange: (value: T) => void;\n /**\n * Options to display\n */\n options: ToggleButtonOption<T>[];\n /**\n * Additional class names for the container\n */\n className?: string;\n /** Names the group: what it chooses between, e.g. \"View mode\". */\n \"aria-label\"?: string;\n \"aria-labelledby\"?: string;\n /** Stretch the track to its container and split it evenly between the options. */\n fullWidth?: boolean;\n}\n\n/**\n * A toggle button group component for selecting one option from a set.\n * Displays options as buttons in a horizontal row with active state styling.\n */\nexport function ToggleButtonGroup<T extends string = string>({\n value,\n onValueChange,\n options,\n className,\n \"aria-label\": ariaLabel,\n \"aria-labelledby\": ariaLabelledBy,\n fullWidth\n}: ToggleButtonGroupProps<T>) {\n return (\n // A 32px rounded track (`lg`) with `md` segments. It was 48px with a\n // blue label on the active segment; the lifted fill already says which\n // segment is on, so the label stays in the primary ink and the hue is\n // not spent twice.\n <div role=\"group\" aria-label={ariaLabel} aria-labelledby={ariaLabelledBy} className={cls(fullWidth ? \"flex w-full\" : \"inline-flex\", \"flex-row bg-surface-field rounded-lg p-1 gap-1\", className)}>\n {options.map((option) => (\n <button\n key={option.value}\n type=\"button\"\n onClick={(e) => {\n e.stopPropagation();\n if (!option.disabled) {\n onValueChange(option.value);\n }\n }}\n disabled={option.disabled}\n aria-pressed={value === option.value}\n aria-disabled={option.disabled || undefined}\n className={cls(\n fullWidth && \"flex-1\",\n \"flex flex-row items-center justify-center gap-2 h-6 px-3.5 rounded-md transition-colors duration-150 focus:outline-none focus-visible:ring-2 focus-visible:ring-primary/50\",\n value === option.value\n ? \"bg-surface-lifted text-text-primary dark:text-text-primary-dark shadow-sm\"\n : \"text-text-secondary dark:text-text-secondary-dark hover:bg-surface-hover\",\n option.disabled && \"opacity-50 cursor-not-allowed\"\n )}\n >\n {option.icon}\n <span className=\"text-xs font-medium\">{option.label}</span>\n </button>\n ))}\n </div>\n );\n}\n"],"mappings":";;;;;;;;AAsCA,SAAgB,kBAA6C,EACzD,OACA,eACA,SACA,WACA,cAAc,WACd,mBAAmB,gBACnB,aAC0B;CAC1B,OAKI,oBAAC,OAAD;EAAK,MAAK;EAAQ,cAAY;EAAW,mBAAiB;EAAgB,WAAW,IAAI,YAAY,gBAAgB,eAAe,kDAAkD,SAAS;YAC1L,QAAQ,KAAK,WACV,qBAAC,UAAD;GAEI,MAAK;GACL,UAAU,MAAM;IACZ,EAAE,gBAAgB;IAClB,IAAI,CAAC,OAAO,UACR,cAAc,OAAO,KAAK;GAElC;GACA,UAAU,OAAO;GACjB,gBAAc,UAAU,OAAO;GAC/B,iBAAe,OAAO,YAAY,KAAA;GAClC,WAAW,IACP,aAAa,UACb,8KACA,UAAU,OAAO,QACX,8EACA,4EACN,OAAO,YAAY,+BACvB;aAnBJ,CAqBK,OAAO,MACR,oBAAC,QAAD;IAAM,WAAU;cAAuB,OAAO;GAAY,CAAA,CACtD;KAtBC,OAAO,KAsBR,CACX;CACA,CAAA;AAEb"}
|
|
@@ -1,4 +1,28 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
+
export type TooltipProviderProps = {
|
|
3
|
+
children: React.ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* How long, in ms, the pointer rests on a trigger before its tooltip opens.
|
|
6
|
+
* A `Tooltip`'s own `delayDuration` wins over it.
|
|
7
|
+
*/
|
|
8
|
+
delayDuration?: number;
|
|
9
|
+
/**
|
|
10
|
+
* How long, in ms, after one tooltip closes the next one opens without the
|
|
11
|
+
* delay — so moving along a row of icons does not wait on each.
|
|
12
|
+
*/
|
|
13
|
+
skipDelayDuration?: number;
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* One provider for every `Tooltip` below it. `<Rebase>` mounts one around the
|
|
17
|
+
* whole admin; mount one yourself around a screen that renders kit tooltips
|
|
18
|
+
* outside it. A `Tooltip` with no provider above still works: it brings its
|
|
19
|
+
* own, as before.
|
|
20
|
+
*
|
|
21
|
+
* Without one, every tooltip mounted a provider of its own — hundreds on a
|
|
22
|
+
* page of table rows — and the skip-delay between neighbouring tooltips never
|
|
23
|
+
* applied, since each provider timed only its own tooltip.
|
|
24
|
+
*/
|
|
25
|
+
export declare function TooltipProvider({ children, delayDuration, skipDelayDuration }: TooltipProviderProps): React.JSX.Element;
|
|
2
26
|
export type TooltipProps = {
|
|
3
27
|
open?: boolean;
|
|
4
28
|
defaultOpen?: boolean;
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { cls } from "../util/cls.es.js";
|
|
3
|
+
import { usePortalContainer } from "../hooks/PortalContainerContext.es.js";
|
|
4
|
+
import { useInjectStyles } from "../hooks/useInjectStyles.es.js";
|
|
5
|
+
import { IconButton } from "./IconButton.es.js";
|
|
6
|
+
import React from "react";
|
|
7
|
+
import { Fragment, jsx, jsxs } from "react/jsx-runtime";
|
|
8
|
+
import * as TooltipPrimitive from "@radix-ui/react-tooltip";
|
|
9
|
+
//#region src/components/Tooltip.tsx
|
|
10
|
+
/**
|
|
11
|
+
* A Radix tooltip only describes its trigger (`aria-describedby`, and only
|
|
12
|
+
* while open); it never names it. Wrapped around an icon-only button with no
|
|
13
|
+
* name of its own, the title was the one word that said what the button does,
|
|
14
|
+
* and a screen reader announced "button". So a string title names an
|
|
15
|
+
* icon-only button (no text, no `aria-label`/`aria-labelledby`) it wraps.
|
|
16
|
+
*/
|
|
17
|
+
function nameFromTitle(children, title) {
|
|
18
|
+
if (typeof title !== "string" || !React.isValidElement(children)) return children;
|
|
19
|
+
const type = children.type;
|
|
20
|
+
if (type !== IconButton && type !== "button" && type !== "a") return children;
|
|
21
|
+
const props = children.props;
|
|
22
|
+
if (props["aria-label"] || props["aria-labelledby"]) return children;
|
|
23
|
+
if (React.Children.toArray(props.children).some((child) => typeof child === "string" || typeof child === "number")) return children;
|
|
24
|
+
return React.cloneElement(children, { "aria-label": title });
|
|
25
|
+
}
|
|
26
|
+
/** Whether a {@link TooltipProvider} is above: a tooltip under one does not mount its own. */
|
|
27
|
+
var SharedTooltipProvider = React.createContext(false);
|
|
28
|
+
/**
|
|
29
|
+
* One provider for every `Tooltip` below it. `<Rebase>` mounts one around the
|
|
30
|
+
* whole admin; mount one yourself around a screen that renders kit tooltips
|
|
31
|
+
* outside it. A `Tooltip` with no provider above still works: it brings its
|
|
32
|
+
* own, as before.
|
|
33
|
+
*
|
|
34
|
+
* Without one, every tooltip mounted a provider of its own — hundreds on a
|
|
35
|
+
* page of table rows — and the skip-delay between neighbouring tooltips never
|
|
36
|
+
* applied, since each provider timed only its own tooltip.
|
|
37
|
+
*/
|
|
38
|
+
function TooltipProvider({ children, delayDuration = 200, skipDelayDuration = 300 }) {
|
|
39
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
40
|
+
delayDuration,
|
|
41
|
+
skipDelayDuration,
|
|
42
|
+
children: /* @__PURE__ */ jsx(SharedTooltipProvider.Provider, {
|
|
43
|
+
value: true,
|
|
44
|
+
children
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
}
|
|
48
|
+
var Tooltip = ({ open, defaultOpen, side = "bottom", delayDuration = 200, sideOffset, align, onOpenChange, title, tooltipClassName, tooltipStyle, children, asChild = false, container, className, style }) => {
|
|
49
|
+
useInjectStyles("Tooltip", styles);
|
|
50
|
+
const sharedProvider = React.useContext(SharedTooltipProvider);
|
|
51
|
+
const contextContainer = usePortalContainer();
|
|
52
|
+
const finalContainer = container ?? contextContainer ?? void 0;
|
|
53
|
+
if (!title) return /* @__PURE__ */ jsx(Fragment, { children });
|
|
54
|
+
children = nameFromTitle(children, title);
|
|
55
|
+
const trigger = asChild ? /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
|
|
56
|
+
asChild: true,
|
|
57
|
+
children
|
|
58
|
+
}) : /* @__PURE__ */ jsx(TooltipPrimitive.Trigger, {
|
|
59
|
+
asChild: true,
|
|
60
|
+
children: /* @__PURE__ */ jsx("div", {
|
|
61
|
+
style,
|
|
62
|
+
className,
|
|
63
|
+
children
|
|
64
|
+
})
|
|
65
|
+
});
|
|
66
|
+
const root = /* @__PURE__ */ jsxs(TooltipPrimitive.Root, {
|
|
67
|
+
...open !== void 0 ? {
|
|
68
|
+
open,
|
|
69
|
+
onOpenChange
|
|
70
|
+
} : {},
|
|
71
|
+
defaultOpen,
|
|
72
|
+
delayDuration,
|
|
73
|
+
children: [trigger, /* @__PURE__ */ jsx(TooltipPrimitive.Portal, {
|
|
74
|
+
container: finalContainer,
|
|
75
|
+
children: /* @__PURE__ */ jsx(TooltipPrimitive.Content, {
|
|
76
|
+
className: cls("TooltipContent", "max-w-lg leading-relaxed", "z-50 rounded-md px-3 py-2 text-xs leading-none bg-surface-800/95 dark:bg-surface-raised-hover font-medium text-white shadow-2xl select-none duration-400 ease-in transform opacity-100", tooltipClassName),
|
|
77
|
+
style: tooltipStyle,
|
|
78
|
+
sideOffset: sideOffset === void 0 ? 4 : sideOffset,
|
|
79
|
+
align,
|
|
80
|
+
side,
|
|
81
|
+
children: title
|
|
82
|
+
})
|
|
83
|
+
})]
|
|
84
|
+
});
|
|
85
|
+
if (sharedProvider) return root;
|
|
86
|
+
return /* @__PURE__ */ jsx(TooltipPrimitive.Provider, {
|
|
87
|
+
delayDuration,
|
|
88
|
+
children: root
|
|
89
|
+
});
|
|
90
|
+
};
|
|
91
|
+
var styles = `
|
|
92
|
+
|
|
93
|
+
.TooltipContent {
|
|
94
|
+
animation-duration: 220ms;
|
|
95
|
+
animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
|
|
96
|
+
will-change: transform, opacity;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
.TooltipContent[data-state='delayed-open'][data-side='top'] {
|
|
100
|
+
animation-name: tooltipSlideDownAndFade;
|
|
101
|
+
}
|
|
102
|
+
.TooltipContent[data-state='delayed-open'][data-side='right'] {
|
|
103
|
+
animation-name: tooltipSlideLeftAndFade;
|
|
104
|
+
}
|
|
105
|
+
.TooltipContent[data-state='delayed-open'][data-side='bottom'] {
|
|
106
|
+
animation-name: tooltipSlideUpAndFade;
|
|
107
|
+
}
|
|
108
|
+
.TooltipContent[data-state='delayed-open'][data-side='left'] {
|
|
109
|
+
animation-name: tooltipSlideRightAndFade;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
|
|
113
|
+
@keyframes tooltipSlideUpAndFade {
|
|
114
|
+
from {
|
|
115
|
+
opacity: 0;
|
|
116
|
+
transform: translateY(4px);
|
|
117
|
+
}
|
|
118
|
+
to {
|
|
119
|
+
opacity: 1;
|
|
120
|
+
transform: translateY(0);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
@keyframes tooltipSlideRightAndFade {
|
|
125
|
+
from {
|
|
126
|
+
opacity: 0;
|
|
127
|
+
transform: translateX(-4px);
|
|
128
|
+
}
|
|
129
|
+
to {
|
|
130
|
+
opacity: 1;
|
|
131
|
+
transform: translateX(0);
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
@keyframes tooltipSlideDownAndFade {
|
|
136
|
+
from {
|
|
137
|
+
opacity: 0;
|
|
138
|
+
transform: translateY(-4px);
|
|
139
|
+
}
|
|
140
|
+
to {
|
|
141
|
+
opacity: 1;
|
|
142
|
+
transform: translateY(0);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
@keyframes tooltipSlideLeftAndFade {
|
|
147
|
+
from {
|
|
148
|
+
opacity: 0;
|
|
149
|
+
transform: translateX(4px);
|
|
150
|
+
}
|
|
151
|
+
to {
|
|
152
|
+
opacity: 1;
|
|
153
|
+
transform: translateX(0);
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
@media (prefers-reduced-motion: reduce) {
|
|
158
|
+
.TooltipContent[data-state] {
|
|
159
|
+
animation: none;
|
|
160
|
+
}
|
|
161
|
+
}`;
|
|
162
|
+
//#endregion
|
|
163
|
+
export { Tooltip, TooltipProvider };
|
|
164
|
+
|
|
165
|
+
//# sourceMappingURL=Tooltip.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Tooltip.es.js","names":[],"sources":["../../src/components/Tooltip.tsx"],"sourcesContent":["\"use client\";\nimport React from \"react\";\nimport * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\n\nimport { cls } from \"../util\";\nimport { useInjectStyles } from \"../hooks\";\nimport { usePortalContainer } from \"../hooks/PortalContainerContext\";\nimport { IconButton } from \"./IconButton\";\n\n/**\n * A Radix tooltip only describes its trigger (`aria-describedby`, and only\n * while open); it never names it. Wrapped around an icon-only button with no\n * name of its own, the title was the one word that said what the button does,\n * and a screen reader announced \"button\". So a string title names an\n * icon-only button (no text, no `aria-label`/`aria-labelledby`) it wraps.\n */\nfunction nameFromTitle(children: React.ReactNode, title: React.ReactNode): React.ReactNode {\n if (typeof title !== \"string\" || !React.isValidElement<Record<string, unknown>>(children)) return children;\n const type = children.type;\n if (type !== IconButton && type !== \"button\" && type !== \"a\") return children;\n const props = children.props;\n if (props[\"aria-label\"] || props[\"aria-labelledby\"]) return children;\n const hasText = React.Children.toArray(props.children as React.ReactNode)\n .some((child) => typeof child === \"string\" || typeof child === \"number\");\n if (hasText) return children;\n return React.cloneElement(children, { \"aria-label\": title });\n}\n\n/** Whether a {@link TooltipProvider} is above: a tooltip under one does not mount its own. */\nconst SharedTooltipProvider = React.createContext(false);\n\nexport type TooltipProviderProps = {\n children: React.ReactNode,\n /**\n * How long, in ms, the pointer rests on a trigger before its tooltip opens.\n * A `Tooltip`'s own `delayDuration` wins over it.\n */\n delayDuration?: number,\n /**\n * How long, in ms, after one tooltip closes the next one opens without the\n * delay — so moving along a row of icons does not wait on each.\n */\n skipDelayDuration?: number\n};\n\n/**\n * One provider for every `Tooltip` below it. `<Rebase>` mounts one around the\n * whole admin; mount one yourself around a screen that renders kit tooltips\n * outside it. A `Tooltip` with no provider above still works: it brings its\n * own, as before.\n *\n * Without one, every tooltip mounted a provider of its own — hundreds on a\n * page of table rows — and the skip-delay between neighbouring tooltips never\n * applied, since each provider timed only its own tooltip.\n */\nexport function TooltipProvider({\n children,\n delayDuration = 200,\n skipDelayDuration = 300\n}: TooltipProviderProps) {\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration} skipDelayDuration={skipDelayDuration}>\n <SharedTooltipProvider.Provider value={true}>\n {children}\n </SharedTooltipProvider.Provider>\n </TooltipPrimitive.Provider>\n );\n}\n\nexport type TooltipProps = {\n open?: boolean,\n defaultOpen?: boolean,\n onOpenChange?: (open: boolean) => void,\n side?: \"top\" | \"bottom\" | \"left\" | \"right\",\n align?: \"start\" | \"center\" | \"end\",\n sideOffset?: number,\n title?: string | React.ReactNode,\n delayDuration?: number;\n asChild?: boolean;\n tooltipClassName?: string,\n tooltipStyle?: React.CSSProperties;\n children: React.ReactNode,\n className?: string,\n container?: HTMLElement,\n style?: React.CSSProperties;\n};\n\nexport const Tooltip = ({\n open,\n defaultOpen,\n side = \"bottom\",\n delayDuration = 200,\n sideOffset,\n align,\n onOpenChange,\n title,\n tooltipClassName,\n tooltipStyle,\n children,\n asChild = false,\n container,\n className,\n style\n }: TooltipProps) => {\n\n useInjectStyles(\"Tooltip\", styles);\n\n const sharedProvider = React.useContext(SharedTooltipProvider);\n\n // Get the portal container from context\n const contextContainer = usePortalContainer();\n\n // Prioritize manual prop, fallback to context container\n const finalContainer = (container ?? contextContainer ?? undefined) as HTMLElement | undefined;\n\n if (!title)\n return <>{children}</>;\n\n children = nameFromTitle(children, title);\n\n const trigger = asChild\n ? <TooltipPrimitive.Trigger asChild={true}>\n {children}\n </TooltipPrimitive.Trigger>\n : <TooltipPrimitive.Trigger asChild={true}>\n <div style={style} className={className}>\n {children}\n </div>\n </TooltipPrimitive.Trigger>;\n\n const root = (\n <TooltipPrimitive.Root {...(open !== undefined ? { open,\nonOpenChange } : {})} defaultOpen={defaultOpen} delayDuration={delayDuration}>\n {trigger}\n <TooltipPrimitive.Portal container={finalContainer}>\n <TooltipPrimitive.Content\n className={cls(\"TooltipContent\",\n \"max-w-lg leading-relaxed\",\n \"z-50 rounded-md px-3 py-2 text-xs leading-none bg-surface-800/95 dark:bg-surface-raised-hover font-medium text-white shadow-2xl select-none duration-400 ease-in transform opacity-100\",\n tooltipClassName)}\n style={tooltipStyle}\n sideOffset={sideOffset === undefined ? 4 : sideOffset}\n align={align}\n side={side}>\n {title}\n </TooltipPrimitive.Content>\n </TooltipPrimitive.Portal>\n </TooltipPrimitive.Root>\n );\n\n // Under a TooltipProvider the shared one times this tooltip; alone, it\n // brings its own, as every tooltip used to.\n if (sharedProvider) return root;\n return (\n <TooltipPrimitive.Provider delayDuration={delayDuration}>\n {root}\n </TooltipPrimitive.Provider>\n );\n};\n\nconst styles = `\n\n.TooltipContent {\n animation-duration: 220ms;\n animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1);\n will-change: transform, opacity;\n}\n\n.TooltipContent[data-state='delayed-open'][data-side='top'] {\n animation-name: tooltipSlideDownAndFade;\n}\n.TooltipContent[data-state='delayed-open'][data-side='right'] {\n animation-name: tooltipSlideLeftAndFade;\n}\n.TooltipContent[data-state='delayed-open'][data-side='bottom'] {\n animation-name: tooltipSlideUpAndFade;\n}\n.TooltipContent[data-state='delayed-open'][data-side='left'] {\n animation-name: tooltipSlideRightAndFade;\n}\n\n\n@keyframes tooltipSlideUpAndFade {\n from {\n opacity: 0;\n transform: translateY(4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes tooltipSlideRightAndFade {\n from {\n opacity: 0;\n transform: translateX(-4px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@keyframes tooltipSlideDownAndFade {\n from {\n opacity: 0;\n transform: translateY(-4px);\n }\n to {\n opacity: 1;\n transform: translateY(0);\n }\n}\n\n@keyframes tooltipSlideLeftAndFade {\n from {\n opacity: 0;\n transform: translateX(4px);\n }\n to {\n opacity: 1;\n transform: translateX(0);\n }\n}\n\n@media (prefers-reduced-motion: reduce) {\n .TooltipContent[data-state] {\n animation: none;\n }\n}`;\n"],"mappings":";;;;;;;;;;;;;;;;AAgBA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BAAiB,MAAlB;EAAuB,GAAK,SAAS,KAAA,IAAY;GAAE;GAC3D;EAAa,IAAI,CAAC;EAAiB;EAA4B;YADvD,CAEK,SACD,oBAAC,iBAAiB,QAAlB;GAAyB,WAAW;aAChC,oBAAC,iBAAiB,SAAlB;IACI,WAAW,IAAI,kBACX,4BACA,0LACA,gBAAgB;IACpB,OAAO;IACP,YAAY,eAAe,KAAA,IAAY,IAAI;IACpC;IACD;cACL;GACqB,CAAA;EACL,CAAA,CACN;;CAK3B,IAAI,gBAAgB,OAAO;CAC3B,OACI,oBAAC,iBAAiB,UAAlB;EAA0C;YACrC;CACsB,CAAA;AAEnC;AAEA,IAAM,SAAS"}
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { cls } from "../util/cls.es.js";
|
|
2
|
+
import "react";
|
|
3
|
+
import { jsx } from "react/jsx-runtime";
|
|
4
|
+
//#region src/components/Typography.tsx
|
|
5
|
+
var typographyVariants = {
|
|
6
|
+
h1: "h1",
|
|
7
|
+
h2: "h2",
|
|
8
|
+
h3: "h3",
|
|
9
|
+
h4: "h4",
|
|
10
|
+
h5: "h5",
|
|
11
|
+
h6: "h6",
|
|
12
|
+
subtitle1: "h6",
|
|
13
|
+
subtitle2: "h6",
|
|
14
|
+
label: "label",
|
|
15
|
+
body1: "p",
|
|
16
|
+
body2: "p",
|
|
17
|
+
inherit: "p",
|
|
18
|
+
caption: "p",
|
|
19
|
+
button: "span",
|
|
20
|
+
lead: "p",
|
|
21
|
+
micro: "span",
|
|
22
|
+
mono: "span",
|
|
23
|
+
stat: "span"
|
|
24
|
+
};
|
|
25
|
+
var colorToClasses = {
|
|
26
|
+
inherit: "text-inherit",
|
|
27
|
+
initial: "text-current",
|
|
28
|
+
primary: "text-text-primary dark:text-text-primary-dark",
|
|
29
|
+
secondary: "text-text-secondary dark:text-text-secondary-dark",
|
|
30
|
+
disabled: "text-text-disabled dark:text-text-disabled-dark",
|
|
31
|
+
error: "text-red-600 dark:text-red-500"
|
|
32
|
+
};
|
|
33
|
+
var gutterBottomClasses = {
|
|
34
|
+
h1: "mb-5",
|
|
35
|
+
h2: "mb-4",
|
|
36
|
+
h3: "mb-4",
|
|
37
|
+
h4: "mb-4",
|
|
38
|
+
h5: "mb-3",
|
|
39
|
+
h6: "mb-3",
|
|
40
|
+
subtitle1: "mb-3",
|
|
41
|
+
subtitle2: "mb-3",
|
|
42
|
+
body1: "mb-3",
|
|
43
|
+
body2: "mb-3",
|
|
44
|
+
inherit: "mb-3",
|
|
45
|
+
caption: "mb-2",
|
|
46
|
+
button: "mb-2",
|
|
47
|
+
label: "mb-2",
|
|
48
|
+
lead: "mb-4",
|
|
49
|
+
micro: "mb-1",
|
|
50
|
+
mono: "mb-2",
|
|
51
|
+
stat: "mb-1"
|
|
52
|
+
};
|
|
53
|
+
var variantToClasses = {
|
|
54
|
+
h1: "typography-h1",
|
|
55
|
+
h2: "typography-h2",
|
|
56
|
+
h3: "typography-h3",
|
|
57
|
+
h4: "typography-h4",
|
|
58
|
+
h5: "typography-h5",
|
|
59
|
+
h6: "typography-h6",
|
|
60
|
+
subtitle1: "typography-subtitle1",
|
|
61
|
+
subtitle2: "typography-subtitle2",
|
|
62
|
+
body1: "typography-body1",
|
|
63
|
+
body2: "typography-body2",
|
|
64
|
+
label: "typography-label",
|
|
65
|
+
inherit: "typography-inherit",
|
|
66
|
+
caption: "typography-caption",
|
|
67
|
+
button: "typography-button",
|
|
68
|
+
lead: "typography-lead",
|
|
69
|
+
micro: "typography-micro",
|
|
70
|
+
mono: "typography-mono",
|
|
71
|
+
stat: "typography-stat"
|
|
72
|
+
};
|
|
73
|
+
function Typography({ align = "inherit", color = "primary", children, className, component, gutterBottom = false, noWrap = false, paragraph = false, variant = "body1", variantMapping = typographyVariants, style, onClick, ...other }) {
|
|
74
|
+
return /* @__PURE__ */ jsx(component || (paragraph ? "p" : variantMapping[variant] || typographyVariants[variant]) || "span", {
|
|
75
|
+
className: cls(variantToClasses[variant], color ? colorToClasses[color] : "", align !== "inherit" && `text-${align}`, gutterBottom && gutterBottomClasses[variant], noWrap && "truncate", paragraph && "mb-3", className),
|
|
76
|
+
onClick,
|
|
77
|
+
style,
|
|
78
|
+
...other,
|
|
79
|
+
children
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
//#endregion
|
|
83
|
+
export { Typography };
|
|
84
|
+
|
|
85
|
+
//# sourceMappingURL=Typography.es.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Typography.es.js","names":[],"sources":["../../src/components/Typography.tsx"],"sourcesContent":["import React, { ReactEventHandler } from \"react\";\nimport { cls } from \"../util\";\n\nexport type TypographyVariant = keyof typeof typographyVariants;\nexport type TypographyProps<C extends React.ElementType = \"span\"> = {\n align?: \"center\" | \"inherit\" | \"justify\" | \"left\" | \"right\";\n children?: React.ReactNode;\n className?: string;\n component?: C;\n gutterBottom?: boolean;\n noWrap?: boolean;\n paragraph?: boolean;\n variant?: TypographyVariant;\n variantMapping?: { [key: string]: string };\n color?: \"inherit\" | \"initial\" | \"primary\" | \"secondary\" | \"disabled\" | \"error\";\n onClick?: ReactEventHandler<HTMLElement>;\n style?: React.CSSProperties;\n} & React.ComponentPropsWithoutRef<C>;\n\nconst typographyVariants = {\n h1: \"h1\",\n h2: \"h2\",\n h3: \"h3\",\n h4: \"h4\",\n h5: \"h5\",\n h6: \"h6\",\n subtitle1: \"h6\",\n subtitle2: \"h6\",\n label: \"label\",\n body1: \"p\",\n body2: \"p\",\n inherit: \"p\",\n caption: \"p\",\n button: \"span\",\n lead: \"p\",\n micro: \"span\",\n mono: \"span\",\n stat: \"span\"\n};\n\nconst colorToClasses = {\n inherit: \"text-inherit\",\n initial: \"text-current\",\n primary: \"text-text-primary dark:text-text-primary-dark\",\n secondary: \"text-text-secondary dark:text-text-secondary-dark\",\n disabled: \"text-text-disabled dark:text-text-disabled-dark\",\n error: \"text-red-600 dark:text-red-500\"\n};\n\nconst gutterBottomClasses = {\n h1: \"mb-5\",\n h2: \"mb-4\",\n h3: \"mb-4\",\n h4: \"mb-4\",\n h5: \"mb-3\",\n h6: \"mb-3\",\n subtitle1: \"mb-3\",\n subtitle2: \"mb-3\",\n body1: \"mb-3\",\n body2: \"mb-3\",\n inherit: \"mb-3\",\n caption: \"mb-2\",\n button: \"mb-2\",\n label: \"mb-2\",\n lead: \"mb-4\",\n micro: \"mb-1\",\n mono: \"mb-2\",\n stat: \"mb-1\"\n};\n\nconst variantToClasses = {\n h1: \"typography-h1\",\n h2: \"typography-h2\",\n h3: \"typography-h3\",\n h4: \"typography-h4\",\n h5: \"typography-h5\",\n h6: \"typography-h6\",\n subtitle1: \"typography-subtitle1\",\n subtitle2: \"typography-subtitle2\",\n body1: \"typography-body1\",\n body2: \"typography-body2\",\n label: \"typography-label\",\n inherit: \"typography-inherit\",\n caption: \"typography-caption\",\n button: \"typography-button\",\n lead: \"typography-lead\",\n micro: \"typography-micro\",\n mono: \"typography-mono\",\n stat: \"typography-stat\"\n};\n\nexport function Typography<C extends React.ElementType = \"span\">(\n {\n align = \"inherit\",\n color = \"primary\",\n children,\n className,\n component,\n gutterBottom = false,\n noWrap = false,\n paragraph = false,\n variant = \"body1\",\n variantMapping = typographyVariants,\n style,\n onClick,\n ...other\n }: TypographyProps<C>\n) {\n const Component =\n component ||\n (paragraph ? \"p\" : variantMapping[variant] || typographyVariants[variant]) ||\n \"span\";\n\n const classes = cls(\n variantToClasses[variant],\n color ? colorToClasses[color] : \"\",\n align !== \"inherit\" && `text-${align}`,\n gutterBottom && gutterBottomClasses[variant],\n noWrap && \"truncate\",\n paragraph && \"mb-3\",\n className\n );\n\n return (\n <Component className={classes}\n onClick={onClick}\n style={style}\n {...other}>\n {children}\n </Component>\n );\n}\n"],"mappings":";;;;AAmBA,IAAM,qBAAqB;CACvB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,WAAW;CACX,WAAW;CACX,OAAO;CACP,OAAO;CACP,OAAO;CACP,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,OAAO;CACP,MAAM;CACN,MAAM;AACV;AAEA,IAAM,iBAAiB;CACnB,SAAS;CACT,SAAS;CACT,SAAS;CACT,WAAW;CACX,UAAU;CACV,OAAO;AACX;AAEA,IAAM,sBAAsB;CACxB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,WAAW;CACX,WAAW;CACX,OAAO;CACP,OAAO;CACP,SAAS;CACT,SAAS;CACT,QAAQ;CACR,OAAO;CACP,MAAM;CACN,OAAO;CACP,MAAM;CACN,MAAM;AACV;AAEA,IAAM,mBAAmB;CACrB,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,IAAI;CACJ,WAAW;CACX,WAAW;CACX,OAAO;CACP,OAAO;CACP,OAAO;CACP,SAAS;CACT,SAAS;CACT,QAAQ;CACR,MAAM;CACN,OAAO;CACP,MAAM;CACN,MAAM;AACV;AAEA,SAAgB,WACZ,EACI,QAAQ,WACR,QAAQ,WACR,UACA,WACA,WACA,eAAe,OACf,SAAS,OACT,YAAY,OACZ,UAAU,SACV,iBAAiB,oBACjB,OACA,SACA,GAAG,SAET;CAgBE,OACI,oBAfA,cACC,YAAY,MAAM,eAAe,YAAY,mBAAmB,aACjE,QAaA;EAAW,WAXC,IACZ,iBAAiB,UACjB,QAAQ,eAAe,SAAS,IAChC,UAAU,aAAa,QAAQ,SAC/B,gBAAgB,oBAAoB,UACpC,UAAU,YACV,aAAa,QACb,SAIsB;EACF;EACF;EACP,GAAI;EACV;CACM,CAAA;AAEnB"}
|