@lobehub/ui 6.0.0 → 6.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/es/Accordion/style.d.mts +1 -1
  2. package/es/Drawer/atoms.mjs +2 -1
  3. package/es/Drawer/atoms.mjs.map +1 -1
  4. package/es/DropdownMenu/atoms.mjs +2 -1
  5. package/es/DropdownMenu/atoms.mjs.map +1 -1
  6. package/es/Modal/atoms.mjs +2 -1
  7. package/es/Modal/atoms.mjs.map +1 -1
  8. package/es/Popover/PopoverInGroup.mjs +2 -1
  9. package/es/Popover/PopoverInGroup.mjs.map +1 -1
  10. package/es/Popover/atoms.mjs +2 -1
  11. package/es/Popover/atoms.mjs.map +1 -1
  12. package/es/Segmented/Segmented.mjs +2 -1
  13. package/es/Segmented/Segmented.mjs.map +1 -1
  14. package/es/Segmented/type.d.mts +7 -0
  15. package/es/Select/atoms.mjs +2 -1
  16. package/es/Select/atoms.mjs.map +1 -1
  17. package/es/Text/style.d.mts +3 -3
  18. package/es/Tooltip/TooltipInGroup.mjs +2 -1
  19. package/es/Tooltip/TooltipInGroup.mjs.map +1 -1
  20. package/es/Tooltip/TooltipStandalone.mjs +2 -1
  21. package/es/Tooltip/TooltipStandalone.mjs.map +1 -1
  22. package/es/hooks/useNativeButton.mjs +1 -0
  23. package/es/hooks/useNativeButton.mjs.map +1 -1
  24. package/es/index.d.mts +3 -2
  25. package/es/index.mjs +3 -2
  26. package/es/styles/index.d.mts +3 -2
  27. package/es/styles/index.mjs +3 -2
  28. package/es/styles/theme/createLobeToken.d.mts +2 -2
  29. package/es/styles/theme/createLobeToken.mjs.map +1 -1
  30. package/es/styles/theme/customNeutral.d.mts +28 -0
  31. package/es/styles/theme/customNeutral.mjs +84 -0
  32. package/es/styles/theme/customNeutral.mjs.map +1 -0
  33. package/es/styles/theme/customPalette.mjs +5 -1
  34. package/es/styles/theme/customPalette.mjs.map +1 -1
  35. package/es/styles/theme/scope.d.mts +3 -3
  36. package/es/styles/theme/scope.mjs +55 -5
  37. package/es/styles/theme/scope.mjs.map +1 -1
  38. package/es/styles/theme/themeCss.d.mts +2 -0
  39. package/es/styles/theme/themeCss.mjs +31 -1
  40. package/es/styles/theme/themeCss.mjs.map +1 -1
  41. package/es/styles/theme/token/neutral.mjs +3 -5
  42. package/es/styles/theme/token/neutral.mjs.map +1 -1
  43. package/es/styles/theme/token/neutralText.d.mts +4 -0
  44. package/es/utils/getElementRef.mjs +17 -0
  45. package/es/utils/getElementRef.mjs.map +1 -0
  46. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"atoms.mjs","names":["clsx"],"sources":["../../src/Select/atoms.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Select } from '@base-ui/react/select';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n type ComponentProps,\n type ComponentPropsWithRef,\n isValidElement,\n} from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { menuClassNames, menuStyles } from '@/DropdownMenu/sharedStyle';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { styleProps } from '@/styles/stylex/props';\nimport { useThemeMode } from '@/styles/theme/scope';\nimport { mergeRefs, useMergeRefs } from '@/utils/mergeRefs';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { styles, triggerStyles } from './style';\nimport { type SelectSize, type SelectVariant } from './type';\n\nconst mergeStateClassName = <TState,>(\n base: Parameters<typeof styleProps>[0],\n className: string | ((state: TState) => string | undefined) | undefined,\n extra?: string,\n) => {\n const baseClassName = styleProps(base, extra).className;\n if (typeof className === 'function')\n return (state: TState) => clsx(baseClassName, className(state));\n return clsx(baseClassName, className);\n};\n\nexport const SelectRoot = Select.Root;\nexport const SelectBackdrop = Select.Backdrop;\nexport const SelectSeparator = Select.Separator;\n\nexport type SelectTriggerProps = Omit<\n ComponentPropsWithRef<typeof Select.Trigger>,\n 'children' | 'render'\n> & {\n children: ComponentProps<typeof Select.Trigger>['children'];\n shadow?: boolean;\n size?: SelectSize;\n variant?: SelectVariant;\n};\n\nexport const SelectTrigger = ({\n children,\n className,\n nativeButton,\n shadow,\n size = 'middle',\n variant,\n ref: refProp,\n ...rest\n}: SelectTriggerProps) => {\n const { isDarkMode } = useThemeMode();\n const resolvedVariant = variant ?? (isDarkMode ? 'filled' : 'outlined');\n const triggerStyle = triggerStyles({ shadow, size, variant: resolvedVariant });\n const baseClassName = stylex.props(triggerStyle).className;\n\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n if (isValidElement(children)) {\n return (\n <Select.Trigger\n {...rest}\n nativeButton={resolvedNativeButton}\n render={(props, state) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n const childClassName =\n typeof (mergedProps as any).className === 'function'\n ? (mergedProps as any).className(state)\n : (mergedProps as any).className;\n const extraClassName = typeof className === 'function' ? className(state) : className;\n\n return cloneElement(children as any, {\n ...mergedProps,\n className: clsx(baseClassName, childClassName, extraClassName),\n ref: mergeRefs([(children as any).ref, (props as any).ref, refProp]),\n });\n }}\n />\n );\n }\n\n return (\n <Select.Trigger\n {...rest}\n className={mergeStateClassName([triggerStyle], className) as any}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Select.Trigger>\n );\n};\n\nSelectTrigger.displayName = 'SelectTrigger';\n\nexport type SelectIconProps = ComponentProps<typeof Select.Icon>;\n\nexport const SelectIcon = ({ className, ...rest }: SelectIconProps) => {\n return <Select.Icon className={mergeStateClassName([styles.icon], className) as any} {...rest} />;\n};\n\nSelectIcon.displayName = 'SelectIcon';\n\nexport type SelectValueProps = ComponentProps<typeof Select.Value>;\n\nexport const SelectValue = ({ className, ...rest }: SelectValueProps) => {\n return (\n <Select.Value className={mergeStateClassName([styles.value], className) as any} {...rest} />\n );\n};\n\nSelectValue.displayName = 'SelectValue';\n\nexport type SelectPortalProps = ComponentProps<typeof Select.Portal> & {\n /**\n * When `container` is not provided, it uses a shared container created by `usePortalContainer`.\n */\n container?: HTMLElement | null;\n};\n\nexport const SelectPortal = ({ container, ...rest }: SelectPortalProps) => {\n const appElement = useAppElement();\n return <Select.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nSelectPortal.displayName = 'SelectPortal';\n\nexport type SelectPositionerProps = ComponentProps<typeof Select.Positioner>;\n\nexport const SelectPositioner = ({\n align,\n alignItemWithTrigger,\n className,\n collisionPadding,\n side,\n sideOffset,\n style,\n ref: forwardedRef,\n ...rest\n}: SelectPositionerProps) => {\n const explicitZIndex =\n typeof style !== 'function' && style?.zIndex != null && typeof style.zIndex === 'number'\n ? style.zIndex\n : undefined;\n const { zIndex, ref: zRef } = useLayerZIndex<HTMLDivElement>('floating', explicitZIndex);\n const composedRef = useMergeRefs([forwardedRef, zRef]);\n\n const resolvedStyle =\n typeof style === 'function'\n ? (state: any) => ({ zIndex, ...style(state) })\n : { zIndex, ...style };\n\n return (\n <Select.Positioner\n align={align ?? 'start'}\n alignItemWithTrigger={alignItemWithTrigger ?? false}\n className={mergeStateClassName([styles.positioner], className) as any}\n collisionPadding={collisionPadding ?? getFloatingCollisionPadding()}\n ref={composedRef as any}\n side={side ?? 'bottom'}\n sideOffset={sideOffset ?? 6}\n style={resolvedStyle}\n {...rest}\n />\n );\n};\n\nSelectPositioner.displayName = 'SelectPositioner';\n\nexport type SelectPopupProps = ComponentProps<typeof Select.Popup>;\n\nexport const SelectPopup = ({ className, ...rest }: SelectPopupProps) => {\n return (\n <Select.Popup\n className={\n mergeStateClassName(\n [menuStyles.popup, styles.popup],\n className,\n menuClassNames.popup,\n ) as any\n }\n {...rest}\n />\n );\n};\n\nSelectPopup.displayName = 'SelectPopup';\n\nexport type SelectListProps = ComponentProps<typeof Select.List>;\n\nexport const SelectList = ({ className, ...rest }: SelectListProps) => {\n return <Select.List className={mergeStateClassName([styles.list], className) as any} {...rest} />;\n};\n\nSelectList.displayName = 'SelectList';\n\nexport type SelectItemProps = ComponentProps<typeof Select.Item>;\n\nexport const SelectItem = ({ className, ...rest }: SelectItemProps) => {\n return (\n <Select.Item className={mergeStateClassName([menuStyles.item], className) as any} {...rest} />\n );\n};\n\nSelectItem.displayName = 'SelectItem';\n\nexport type SelectItemTextProps = ComponentProps<typeof Select.ItemText>;\n\nexport const SelectItemText = ({ className, ...rest }: SelectItemTextProps) => {\n return (\n <Select.ItemText\n className={mergeStateClassName([menuStyles.label], className, menuClassNames.label) as any}\n {...rest}\n />\n );\n};\n\nSelectItemText.displayName = 'SelectItemText';\n\nexport type SelectItemIndicatorProps = ComponentProps<typeof Select.ItemIndicator>;\n\nexport const SelectItemIndicator = ({ className, ...rest }: SelectItemIndicatorProps) => {\n return (\n <Select.ItemIndicator\n className={mergeStateClassName([styles.itemIndicator], className) as any}\n {...rest}\n />\n );\n};\n\nSelectItemIndicator.displayName = 'SelectItemIndicator';\n\nexport type SelectGroupProps = ComponentProps<typeof Select.Group>;\n\nexport const SelectGroup = ({ className, ...rest }: SelectGroupProps) => {\n return <Select.Group className={className} {...rest} />;\n};\n\nSelectGroup.displayName = 'SelectGroup';\n\nexport type SelectGroupLabelProps = ComponentProps<typeof Select.GroupLabel>;\n\nexport const SelectGroupLabel = ({ className, ...rest }: SelectGroupLabelProps) => {\n return (\n <Select.GroupLabel\n className={mergeStateClassName([menuStyles.groupLabel], className) as any}\n {...rest}\n />\n );\n};\n\nSelectGroupLabel.displayName = 'SelectGroupLabel';\n\nexport type SelectScrollUpArrowProps = ComponentProps<typeof Select.ScrollUpArrow>;\n\nexport const SelectScrollUpArrow = ({ className, ...rest }: SelectScrollUpArrowProps) => {\n return (\n <Select.ScrollUpArrow\n className={mergeStateClassName([styles.scrollArrow], className) as any}\n {...rest}\n />\n );\n};\n\nSelectScrollUpArrow.displayName = 'SelectScrollUpArrow';\n\nexport type SelectScrollDownArrowProps = ComponentProps<typeof Select.ScrollDownArrow>;\n\nexport const SelectScrollDownArrow = ({ className, ...rest }: SelectScrollDownArrowProps) => {\n return (\n <Select.ScrollDownArrow\n className={mergeStateClassName([styles.scrollArrow], className) as any}\n {...rest}\n />\n );\n};\n\nSelectScrollDownArrow.displayName = 'SelectScrollDownArrow';\n\nexport type SelectArrowProps = ComponentProps<typeof Select.Arrow>;\n\nexport const SelectArrow = ({ className, ...rest }: SelectArrowProps) => {\n return (\n <Select.Arrow\n className={mergeStateClassName([styles.arrow], className, 'lobe-select-arrow') as any}\n {...rest}\n />\n );\n};\n\nSelectArrow.displayName = 'SelectArrow';\n"],"mappings":";;;;;;;;;;;;;;;;;AAiBA,MAAM,uBAAgC,MAAwC,WAAyE,UAAmB;CACxK,MAAM,gBAAgB,WAAW,MAAM,KAAK,CAAC,CAAC;CAC9C,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkBA,OAAK,eAAe,UAAU,KAAK,CAAC;CACnG,OAAOA,OAAK,eAAe,SAAS;AACtC;AACA,MAAa,aAAa,OAAO;AACjC,MAAa,iBAAiB,OAAO;AACrC,MAAa,kBAAkB,OAAO;AAOtC,MAAa,iBAAiB,EAC5B,UACA,WACA,cACA,QACA,OAAO,UACP,SACA,KAAK,SACL,GAAG,WACqB;CACxB,MAAM,EACJ,eACE,aAAa;CAEjB,MAAM,eAAe,cAAc;EACjC;EACA;EACA,SAJsB,YAAY,aAAa,WAAW;CAK5D,CAAC;CACD,MAAM,gBAAgB,OAAO,MAAM,YAAY,CAAC,CAAC;CACjD,MAAM,EACJ,8BACA,yBACE,gBAAgB;EAClB;EACA;CACF,CAAC;CACD,IAAI,eAAe,QAAQ,GACzB,OAAO,oBA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esContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Select } from '@base-ui/react/select';\nimport * as stylex from '@stylexjs/stylex';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n type ComponentProps,\n type ComponentPropsWithRef,\n isValidElement,\n} from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { menuClassNames, menuStyles } from '@/DropdownMenu/sharedStyle';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { styleProps } from '@/styles/stylex/props';\nimport { useThemeMode } from '@/styles/theme/scope';\nimport { getElementRef } from '@/utils/getElementRef';\nimport { mergeRefs, useMergeRefs } from '@/utils/mergeRefs';\n\nimport { useLayerZIndex } from '../internal/zIndex';\nimport { styles, triggerStyles } from './style';\nimport { type SelectSize, type SelectVariant } from './type';\n\nconst mergeStateClassName = <TState,>(\n base: Parameters<typeof styleProps>[0],\n className: string | ((state: TState) => string | undefined) | undefined,\n extra?: string,\n) => {\n const baseClassName = styleProps(base, extra).className;\n if (typeof className === 'function')\n return (state: TState) => clsx(baseClassName, className(state));\n return clsx(baseClassName, className);\n};\n\nexport const SelectRoot = Select.Root;\nexport const SelectBackdrop = Select.Backdrop;\nexport const SelectSeparator = Select.Separator;\n\nexport type SelectTriggerProps = Omit<\n ComponentPropsWithRef<typeof Select.Trigger>,\n 'children' | 'render'\n> & {\n children: ComponentProps<typeof Select.Trigger>['children'];\n shadow?: boolean;\n size?: SelectSize;\n variant?: SelectVariant;\n};\n\nexport const SelectTrigger = ({\n children,\n className,\n nativeButton,\n shadow,\n size = 'middle',\n variant,\n ref: refProp,\n ...rest\n}: SelectTriggerProps) => {\n const { isDarkMode } = useThemeMode();\n const resolvedVariant = variant ?? (isDarkMode ? 'filled' : 'outlined');\n const triggerStyle = triggerStyles({ shadow, size, variant: resolvedVariant });\n const baseClassName = stylex.props(triggerStyle).className;\n\n const { isNativeButtonTriggerElement, resolvedNativeButton } = useNativeButton({\n children,\n nativeButton,\n });\n\n if (isValidElement(children)) {\n return (\n <Select.Trigger\n {...rest}\n nativeButton={resolvedNativeButton}\n render={(props, state) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...restProps } = props as any;\n return restProps;\n })();\n\n const mergedProps = mergeProps((children as any).props, resolvedProps);\n const childClassName =\n typeof (mergedProps as any).className === 'function'\n ? (mergedProps as any).className(state)\n : (mergedProps as any).className;\n const extraClassName = typeof className === 'function' ? className(state) : className;\n\n return cloneElement(children as any, {\n ...mergedProps,\n className: clsx(baseClassName, childClassName, extraClassName),\n ref: mergeRefs([getElementRef(children), (props as any).ref, refProp]),\n });\n }}\n />\n );\n }\n\n return (\n <Select.Trigger\n {...rest}\n className={mergeStateClassName([triggerStyle], className) as any}\n nativeButton={resolvedNativeButton}\n ref={refProp as any}\n >\n {children}\n </Select.Trigger>\n );\n};\n\nSelectTrigger.displayName = 'SelectTrigger';\n\nexport type SelectIconProps = ComponentProps<typeof Select.Icon>;\n\nexport const SelectIcon = ({ className, ...rest }: SelectIconProps) => {\n return <Select.Icon className={mergeStateClassName([styles.icon], className) as any} {...rest} />;\n};\n\nSelectIcon.displayName = 'SelectIcon';\n\nexport type SelectValueProps = ComponentProps<typeof Select.Value>;\n\nexport const SelectValue = ({ className, ...rest }: SelectValueProps) => {\n return (\n <Select.Value className={mergeStateClassName([styles.value], className) as any} {...rest} />\n );\n};\n\nSelectValue.displayName = 'SelectValue';\n\nexport type SelectPortalProps = ComponentProps<typeof Select.Portal> & {\n /**\n * When `container` is not provided, it uses a shared container created by `usePortalContainer`.\n */\n container?: HTMLElement | null;\n};\n\nexport const SelectPortal = ({ container, ...rest }: SelectPortalProps) => {\n const appElement = useAppElement();\n return <Select.Portal container={container ?? appElement ?? undefined} {...rest} />;\n};\n\nSelectPortal.displayName = 'SelectPortal';\n\nexport type SelectPositionerProps = ComponentProps<typeof Select.Positioner>;\n\nexport const SelectPositioner = ({\n align,\n alignItemWithTrigger,\n className,\n collisionPadding,\n side,\n sideOffset,\n style,\n ref: forwardedRef,\n ...rest\n}: SelectPositionerProps) => {\n const explicitZIndex =\n typeof style !== 'function' && style?.zIndex != null && typeof style.zIndex === 'number'\n ? style.zIndex\n : undefined;\n const { zIndex, ref: zRef } = useLayerZIndex<HTMLDivElement>('floating', explicitZIndex);\n const composedRef = useMergeRefs([forwardedRef, zRef]);\n\n const resolvedStyle =\n typeof style === 'function'\n ? (state: any) => ({ zIndex, ...style(state) })\n : { zIndex, ...style };\n\n return (\n <Select.Positioner\n align={align ?? 'start'}\n alignItemWithTrigger={alignItemWithTrigger ?? false}\n className={mergeStateClassName([styles.positioner], className) as any}\n collisionPadding={collisionPadding ?? getFloatingCollisionPadding()}\n ref={composedRef as any}\n side={side ?? 'bottom'}\n sideOffset={sideOffset ?? 6}\n style={resolvedStyle}\n {...rest}\n />\n );\n};\n\nSelectPositioner.displayName = 'SelectPositioner';\n\nexport type SelectPopupProps = ComponentProps<typeof Select.Popup>;\n\nexport const SelectPopup = ({ className, ...rest }: SelectPopupProps) => {\n return (\n <Select.Popup\n className={\n mergeStateClassName(\n [menuStyles.popup, styles.popup],\n className,\n menuClassNames.popup,\n ) as any\n }\n {...rest}\n />\n );\n};\n\nSelectPopup.displayName = 'SelectPopup';\n\nexport type SelectListProps = ComponentProps<typeof Select.List>;\n\nexport const SelectList = ({ className, ...rest }: SelectListProps) => {\n return <Select.List className={mergeStateClassName([styles.list], className) as any} {...rest} />;\n};\n\nSelectList.displayName = 'SelectList';\n\nexport type SelectItemProps = ComponentProps<typeof Select.Item>;\n\nexport const SelectItem = ({ className, ...rest }: SelectItemProps) => {\n return (\n <Select.Item className={mergeStateClassName([menuStyles.item], className) as any} {...rest} />\n );\n};\n\nSelectItem.displayName = 'SelectItem';\n\nexport type SelectItemTextProps = ComponentProps<typeof Select.ItemText>;\n\nexport const SelectItemText = ({ className, ...rest }: SelectItemTextProps) => {\n return (\n <Select.ItemText\n className={mergeStateClassName([menuStyles.label], className, menuClassNames.label) as any}\n {...rest}\n />\n );\n};\n\nSelectItemText.displayName = 'SelectItemText';\n\nexport type SelectItemIndicatorProps = ComponentProps<typeof Select.ItemIndicator>;\n\nexport const SelectItemIndicator = ({ className, ...rest }: SelectItemIndicatorProps) => {\n return (\n <Select.ItemIndicator\n className={mergeStateClassName([styles.itemIndicator], className) as any}\n {...rest}\n />\n );\n};\n\nSelectItemIndicator.displayName = 'SelectItemIndicator';\n\nexport type SelectGroupProps = ComponentProps<typeof Select.Group>;\n\nexport const SelectGroup = ({ className, ...rest }: SelectGroupProps) => {\n return <Select.Group className={className} {...rest} />;\n};\n\nSelectGroup.displayName = 'SelectGroup';\n\nexport type SelectGroupLabelProps = ComponentProps<typeof Select.GroupLabel>;\n\nexport const SelectGroupLabel = ({ className, ...rest }: SelectGroupLabelProps) => {\n return (\n <Select.GroupLabel\n className={mergeStateClassName([menuStyles.groupLabel], className) as any}\n {...rest}\n />\n );\n};\n\nSelectGroupLabel.displayName = 'SelectGroupLabel';\n\nexport type SelectScrollUpArrowProps = ComponentProps<typeof Select.ScrollUpArrow>;\n\nexport const SelectScrollUpArrow = ({ className, ...rest }: SelectScrollUpArrowProps) => {\n return (\n <Select.ScrollUpArrow\n className={mergeStateClassName([styles.scrollArrow], className) as any}\n {...rest}\n />\n );\n};\n\nSelectScrollUpArrow.displayName = 'SelectScrollUpArrow';\n\nexport type SelectScrollDownArrowProps = ComponentProps<typeof Select.ScrollDownArrow>;\n\nexport const SelectScrollDownArrow = ({ className, ...rest }: SelectScrollDownArrowProps) => {\n return (\n <Select.ScrollDownArrow\n className={mergeStateClassName([styles.scrollArrow], className) as any}\n {...rest}\n />\n );\n};\n\nSelectScrollDownArrow.displayName = 'SelectScrollDownArrow';\n\nexport type SelectArrowProps = ComponentProps<typeof Select.Arrow>;\n\nexport const SelectArrow = ({ className, ...rest }: SelectArrowProps) => {\n return (\n <Select.Arrow\n className={mergeStateClassName([styles.arrow], className, 'lobe-select-arrow') as any}\n {...rest}\n />\n );\n};\n\nSelectArrow.displayName = 'SelectArrow';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAkBA,MAAM,uBAAgC,MAAwC,WAAyE,UAAmB;CACxK,MAAM,gBAAgB,WAAW,MAAM,KAAK,CAAC,CAAC;CAC9C,IAAI,OAAO,cAAc,YAAY,QAAQ,UAAkBA,OAAK,eAAe,UAAU,KAAK,CAAC;CACnG,OAAOA,OAAK,eAAe,SAAS;AACtC;AACA,MAAa,aAAa,OAAO;AACjC,MAAa,iBAAiB,OAAO;AACrC,MAAa,kBAAkB,OAAO;AAOtC,MAAa,iBAAiB,EAC5B,UACA,WACA,cACA,QACA,OAAO,UACP,SACA,KAAK,SACL,GAAG,WACqB;CACxB,MAAM,EACJ,eACE,aAAa;CAEjB,MAAM,eAAe,cAAc;EACjC;EACA;EACA,SAJsB,YAAY,aAAa,WAAW;CAK5D,CAAC;CACD,MAAM,gBAAgB,OAAO,MAAM,YAAY,CAAC,CAAC;CACjD,MAAM,EACJ,8BACA,yBACE,gBAAgB;EAClB;EACA;CACF,CAAC;CACD,IAAI,eAAe,QAAQ,GACzB,OAAO,oBAAC,OAAO,SAAR;EAAgB,GAAI;EAAM,cAAc;EAAsB,SAAS,OAAO,UAAU;GAG7F,MAAM,uBAAuB;IAC3B,IAAI,8BAA8B,OAAO;IAEzC,MAAM,EACJ,MACA,KAAK,YACL,GAAG,cACD;IACJ,OAAO;GACT,EAAA,CAAG;GACH,MAAM,cAAc,WAAY,SAAiB,OAAO,aAAa;GACrE,MAAM,iBAAiB,OAAQ,YAAoB,cAAc,aAAc,YAAoB,UAAU,KAAK,IAAK,YAAoB;GAC3I,MAAM,iBAAiB,OAAO,cAAc,aAAa,UAAU,KAAK,IAAI;GAC5E,OAAO,aAAa,UAAiB;IACnC,GAAG;IACH,WAA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;CAAO,CAAA;AACxD;AACA,YAAY,cAAc;AAE1B,MAAa,oBAAoB,EAC/B,WACA,GAAG,WACwB;CAC3B,OAAO,oBAAC,OAAO,YAAR;EAAmB,WAAW,oBAAoB,CAAC,WAAW,UAAU,GAAG,SAAS;EAAU,GAAI;CAAO,CAAA;AAClH;AACA,iBAAiB,cAAc;AAE/B,MAAa,uBAAuB,EAClC,WACA,GAAG,WAC2B;CAC9B,OAAO,oBAAC,OAAO,eAAR;EAAsB,WAAW,oBAAoB,CAAC,OAAO,WAAW,GAAG,SAAS;EAAU,GAAI;CAAO,CAAA;AAClH;AACA,oBAAoB,cAAc;AAElC,MAAa,yBAAyB,EACpC,WACA,GAAG,WAC6B;CAChC,OAAO,oBAAC,OAAO,iBAAR;EAAwB,WAAW,oBAAoB,CAAC,OAAO,WAAW,GAAG,SAAS;EAAU,GAAI;CAAO,CAAA;AACpH;AACA,sBAAsB,cAAc;AAEpC,MAAa,eAAe,EAC1B,WACA,GAAG,WACmB;CACtB,OAAO,oBAAC,OAAO,OAAR;EAAc,WAAW,oBAAoB,CAAC,OAAO,KAAK,GAAG,WAAW,mBAAmB;EAAU,GAAI;CAAO,CAAA;AACzH;AACA,YAAY,cAAc"}
@@ -14,13 +14,13 @@ export declare const textStyles: {
14
14
  text: string;
15
15
  disabled: string;
16
16
  danger: string;
17
- success: string;
18
- info: string;
19
- warning: string;
20
17
  delete: string;
21
18
  ellipsis: string;
22
19
  italic: string;
23
20
  underline: string;
21
+ success: string;
22
+ warning: string;
23
+ info: string;
24
24
  ellipsisMulti: string;
25
25
  secondary: string;
26
26
  };
@@ -1,6 +1,7 @@
1
1
  "use client";
2
2
  import { TooltipGroupHandleContext } from "./groupContext.mjs";
3
3
  import { useNativeButton } from "../hooks/useNativeButton.mjs";
4
+ import { getElementRef } from "../utils/getElementRef.mjs";
4
5
  import { mergeRefs } from "../utils/mergeRefs.mjs";
5
6
  import { useMergedTooltipProps } from "./useMergedTooltipProps.mjs";
6
7
  import { cloneElement, isValidElement, use, useCallback, useMemo } from "react";
@@ -89,7 +90,7 @@ const TooltipInGroup = ({ children, ref: refProp, arrow, className, classNames,
89
90
  ...mergedProps,
90
91
  id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,
91
92
  ref: mergeRefs([
92
- childElement.ref,
93
+ getElementRef(childElement),
93
94
  renderProps.ref,
94
95
  refProp
95
96
  ])
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipInGroup.mjs","names":["BaseTooltip"],"sources":["../../src/Tooltip/TooltipInGroup.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cloneElement, type FC, isValidElement, use, useCallback, useMemo } from 'react';\n\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nimport { TooltipGroupHandleContext } from './groupContext';\nimport { type TooltipProps } from './type';\nimport { useMergedTooltipProps } from './useMergedTooltipProps';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\nexport const TooltipInGroup: FC<TooltipProps> = ({\n children,\n ref: refProp,\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabled: disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n standalone: _standalone,\n styles,\n title,\n triggerProps: triggerPropsProp,\n zIndex,\n ...restProps\n}) => {\n const tooltipProps = useMemo(\n () => ({\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabled: disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n styles,\n title,\n triggerProps: triggerPropsProp,\n zIndex,\n }),\n [\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n styles,\n title,\n triggerPropsProp,\n zIndex,\n ],\n );\n\n const group = use(TooltipGroupHandleContext);\n const item = useMergedTooltipProps(tooltipProps);\n\n const resolvedOpenDelay = useMemo(() => {\n if (item.openDelay !== undefined) return item.openDelay;\n if (item.mouseEnterDelay !== undefined) return item.mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [item.mouseEnterDelay, item.openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (item.closeDelay !== undefined) return item.closeDelay;\n if (item.mouseLeaveDelay !== undefined) return item.mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [item.closeDelay, item.mouseLeaveDelay]);\n\n const disabled = Boolean(item.disabled);\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const childElement = isValidElement(children) ? children : null;\n const popupTriggerId =\n childElement &&\n (childElement as any).props['aria-haspopup'] !== undefined &&\n (childElement as any).props.id !== undefined\n ? (childElement as any).props.id\n : undefined;\n\n const renderTrigger = useCallback(\n (renderProps: unknown) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return renderProps as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = renderProps as any;\n return triggerRest;\n })();\n\n const childProps = (childElement as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(childElement as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([(childElement as any).ref, (renderProps as any).ref, refProp]),\n });\n },\n [childElement, isNativeButtonTriggerElement, refProp, restProps],\n );\n\n // Don't render trigger behavior if no content\n\n if (item.title == null && !item.hotkey) {\n return children as any;\n }\n\n const triggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...item.triggerProps,\n id: popupTriggerId ?? item.triggerProps?.id,\n payload: item,\n };\n\n if (childElement) {\n return (\n <BaseTooltip.Trigger handle={group ?? undefined} {...triggerProps} render={renderTrigger} />\n );\n }\n\n return (\n <BaseTooltip.Trigger handle={group ?? undefined} {...triggerProps} ref={refProp}>\n {children}\n </BaseTooltip.Trigger>\n );\n};\n\nTooltipInGroup.displayName = 'TooltipInGroup';\n"],"mappings":";;;;;;;;;;AAaA,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAE5B,MAAa,kBAAoC,EAC/C,UACA,KAAK,SACL,OACA,WACA,YACA,YACA,aACA,UAAU,cACV,mBACA,QACA,aACA,iBACA,iBACA,cACA,MACA,WACA,WACA,gBACA,YACA,aACA,iBACA,YAAY,aACZ,QACA,OACA,cAAc,kBACd,QACA,GAAG,gBACC;CACJ,MAAM,eAAe,eACZ;EACL;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;CACF,IACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,MAAM,QAAQ,IAAI,yBAAyB;CAC3C,MAAM,OAAO,sBAAsB,YAAY;CAE/C,MAAM,oBAAoB,cAAc;EACtC,IAAI,KAAK,cAAc,KAAA,GAAW,OAAO,KAAK;EAC9C,IAAI,KAAK,oBAAoB,KAAA,GAAW,OAAO,KAAK,kBAAkB;EACtE,OAAO;CACT,GA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I;EAAc,QAAQ;CAAgB,CAAA;CAI/F,OACE,oBAACA,QAAY,SAAb;EAAqB,QAAQ,SAAS,KAAA;EAAW,GAAI;EAAc,KAAK;EACrE;CACkB,CAAA;AAEzB;AAEA,eAAe,cAAc"}
1
+ {"version":3,"file":"TooltipInGroup.mjs","names":["BaseTooltip"],"sources":["../../src/Tooltip/TooltipInGroup.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport { cloneElement, type FC, isValidElement, use, useCallback, useMemo } from 'react';\n\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getElementRef } from '@/utils/getElementRef';\nimport { mergeRefs } from '@/utils/mergeRefs';\n\nimport { TooltipGroupHandleContext } from './groupContext';\nimport { type TooltipProps } from './type';\nimport { useMergedTooltipProps } from './useMergedTooltipProps';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\nexport const TooltipInGroup: FC<TooltipProps> = ({\n children,\n ref: refProp,\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabled: disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n standalone: _standalone,\n styles,\n title,\n triggerProps: triggerPropsProp,\n zIndex,\n ...restProps\n}) => {\n const tooltipProps = useMemo(\n () => ({\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabled: disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n styles,\n title,\n triggerProps: triggerPropsProp,\n zIndex,\n }),\n [\n arrow,\n className,\n classNames,\n closeDelay,\n defaultOpen,\n disabledProp,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement,\n popupContainer,\n popupProps,\n portalProps,\n positionerProps,\n styles,\n title,\n triggerPropsProp,\n zIndex,\n ],\n );\n\n const group = use(TooltipGroupHandleContext);\n const item = useMergedTooltipProps(tooltipProps);\n\n const resolvedOpenDelay = useMemo(() => {\n if (item.openDelay !== undefined) return item.openDelay;\n if (item.mouseEnterDelay !== undefined) return item.mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [item.mouseEnterDelay, item.openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (item.closeDelay !== undefined) return item.closeDelay;\n if (item.mouseLeaveDelay !== undefined) return item.mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [item.closeDelay, item.mouseLeaveDelay]);\n\n const disabled = Boolean(item.disabled);\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const childElement = isValidElement(children) ? children : null;\n const popupTriggerId =\n childElement &&\n (childElement as any).props['aria-haspopup'] !== undefined &&\n (childElement as any).props.id !== undefined\n ? (childElement as any).props.id\n : undefined;\n\n const renderTrigger = useCallback(\n (renderProps: unknown) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return renderProps as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = renderProps as any;\n return triggerRest;\n })();\n\n const childProps = (childElement as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(childElement as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([getElementRef(childElement), (renderProps as any).ref, refProp]),\n });\n },\n [childElement, isNativeButtonTriggerElement, refProp, restProps],\n );\n\n // Don't render trigger behavior if no content\n\n if (item.title == null && !item.hotkey) {\n return children as any;\n }\n\n const triggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...item.triggerProps,\n id: popupTriggerId ?? item.triggerProps?.id,\n payload: item,\n };\n\n if (childElement) {\n return (\n <BaseTooltip.Trigger handle={group ?? undefined} {...triggerProps} render={renderTrigger} />\n );\n }\n\n return (\n <BaseTooltip.Trigger handle={group ?? undefined} {...triggerProps} ref={refProp}>\n {children}\n </BaseTooltip.Trigger>\n );\n};\n\nTooltipInGroup.displayName = 'TooltipInGroup';\n"],"mappings":";;;;;;;;;;;AAcA,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;AAE5B,MAAa,kBAAoC,EAC/C,UACA,KAAK,SACL,OACA,WACA,YACA,YACA,aACA,UAAU,cACV,mBACA,QACA,aACA,iBACA,iBACA,cACA,MACA,WACA,WACA,gBACA,YACA,aACA,iBACA,YAAY,aACZ,QACA,OACA,cAAc,kBACd,QACA,GAAG,gBACC;CACJ,MAAM,eAAe,eACZ;EACL;EACA;EACA;EACA;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;CACF,IACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;CACF,CACF;CAEA,MAAM,QAAQ,IAAI,yBAAyB;CAC3C,MAAM,OAAO,sBAAsB,YAAY;CAE/C,MAAM,oBAAoB,cAAc;EACtC,IAAI,KAAK,cAAc,KAAA,GAAW,OAAO,KAAK;EAC9C,IAAI,KAAK,oBAAoB,KAAA,GAAW,OAAO,KAAK,kBAAkB;EACtE,OAAO;CACT,GAAG,CAAC,KAAK,iBAAiB,KAAK,SAAS,CAAC;CAEzC,MAAM,qBAAqB,cAA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qB,QAAQ,SAAS,KAAA;EAAW,GAAI;EAAc,KAAK;EACrE;CACkB,CAAA;AAEzB;AAEA,eAAe,cAAc"}
@@ -2,6 +2,7 @@
2
2
  import { useAppElement } from "../ConfigProvider/AppElementContext.mjs";
3
3
  import { styleProps } from "../styles/stylex/props.mjs";
4
4
  import { useNativeButton } from "../hooks/useNativeButton.mjs";
5
+ import { getElementRef } from "../utils/getElementRef.mjs";
5
6
  import { mergeRefs } from "../utils/mergeRefs.mjs";
6
7
  import { useFloatingLayer } from "../hooks/useFloatingLayer.mjs";
7
8
  import { useIsClient } from "../hooks/useIsClient.mjs";
@@ -98,7 +99,7 @@ const TooltipStandalone = memo(({ children, title, arrow = false, className, cla
98
99
  ...mergedProps,
99
100
  id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,
100
101
  ref: mergeRefs([
101
- children.ref,
102
+ getElementRef(children),
102
103
  props.ref,
103
104
  refProp,
104
105
  triggerCallbackRef
@@ -1 +1 @@
1
- {"version":3,"file":"TooltipStandalone.mjs","names":["clsx","BaseTooltip"],"sources":["../../src/Tooltip/TooltipStandalone.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n isValidElement,\n memo,\n type Ref,\n useCallback,\n useMemo,\n useState,\n} from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { styleProps } from '@/styles/stylex/props';\nimport { mergeRefs } from '@/utils/mergeRefs';\nimport { placementMap } from '@/utils/placement';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipProps } from './type';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\n/**\n * Tooltip component - displays small contextual hints on hover/focus\n * Compatible with Ant Design Tooltip-like API (subset)\n */\nexport const TooltipStandalone = memo<TooltipProps>(\n ({\n children,\n title,\n arrow = false,\n className,\n classNames,\n closeDelay,\n defaultOpen = false,\n disabled = false,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement = 'top',\n popupContainer,\n styles: customStylesProp,\n zIndex,\n ref: refProp,\n positionerProps,\n triggerProps,\n popupProps,\n portalProps,\n standalone: _standalone,\n ...restProps\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n const [triggerNode, setTriggerNode] = useState<HTMLElement | null>(null);\n const triggerCallbackRef = useCallback((node: HTMLElement | null) => {\n if (node) setTriggerNode(node);\n }, []);\n\n const mergedOpen = open ?? uncontrolledOpen;\n const resolvedOpen = disabled ? false : mergedOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (disabled && nextOpen) return;\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [disabled, onOpenChange, open],\n );\n\n const resolvedOpenDelay = useMemo(() => {\n if (openDelay !== undefined) return openDelay;\n if (mouseEnterDelay !== undefined) return mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [mouseEnterDelay, openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (closeDelay !== undefined) return closeDelay;\n if (mouseLeaveDelay !== undefined) return mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [closeDelay, mouseLeaveDelay]);\n\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const slots = useMemo(() => {\n const customStyles = typeof customStylesProp === 'function' ? undefined : customStylesProp;\n return {\n arrow: styleProps(styles.arrow, classNames?.arrow, customStyles?.arrow),\n popup: styleProps(styles.popup, clsx(className, classNames?.root, classNames?.container), {\n ...customStyles?.root,\n ...customStyles?.container,\n }),\n positioner: styleProps(styles.positioner, undefined, { zIndex: zIndex ?? 114_514 }),\n viewport: styleProps(\n styles.viewport,\n clsx('lobe-tooltip-viewport', classNames?.content),\n customStyles?.content,\n ),\n };\n }, [\n className,\n classNames?.arrow,\n classNames?.container,\n classNames?.content,\n classNames?.root,\n customStylesProp,\n zIndex,\n ]);\n\n const triggerElement = useMemo(() => {\n const popupTriggerId =\n isValidElement(children) &&\n (children as any).props['aria-haspopup'] !== undefined &&\n (children as any).props.id !== undefined\n ? (children as any).props.id\n : undefined;\n\n const baseTriggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...triggerProps,\n id: popupTriggerId ?? triggerProps?.id,\n };\n\n if (isValidElement(children)) {\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n render={(props) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = props as any;\n return triggerRest;\n })();\n\n const childProps = (children as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(children as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([\n (children as any).ref,\n (props as any).ref,\n refProp,\n triggerCallbackRef,\n ]),\n });\n }}\n />\n );\n }\n\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n ref={mergeRefs([refProp, triggerCallbackRef]) as Ref<HTMLButtonElement>}\n >\n {children}\n </BaseTooltip.Trigger>\n );\n }, [\n children,\n disabled,\n isNativeButtonTriggerElement,\n refProp,\n resolvedCloseDelay,\n resolvedOpenDelay,\n restProps,\n triggerCallbackRef,\n triggerProps,\n ]);\n\n const customContainer = useMemo(() => {\n if (popupContainer) return popupContainer;\n if (!getPopupContainer || !isClient || !triggerNode) return undefined;\n return getPopupContainer(triggerNode);\n }, [popupContainer, getPopupContainer, isClient, triggerNode]);\n\n const popup = useMemo(\n () => (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n data-placement={placement}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n {...slots.positioner}\n {...positionerProps}\n collisionPadding={positionerProps?.collisionPadding ?? getFloatingCollisionPadding()}\n >\n <BaseTooltip.Popup {...slots.popup} {...popupProps}>\n {arrow && <BaseTooltip.Arrow {...slots.arrow}>{TooltipArrowIcon}</BaseTooltip.Arrow>}\n <BaseTooltip.Viewport {...slots.viewport}>\n <TooltipContent hotkey={hotkey} hotkeyProps={hotkeyProps} title={title} />\n </BaseTooltip.Viewport>\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n ),\n [\n arrow,\n baseSideOffset,\n hotkey,\n hotkeyProps,\n placement,\n placementConfig.align,\n placementConfig.side,\n popupProps,\n positionerProps,\n slots,\n title,\n ],\n );\n\n if (title == null && !hotkey) {\n return children;\n }\n\n const resolvedPortalContainer = customContainer ?? portalContainer;\n\n return (\n <BaseTooltip.Root\n defaultOpen={defaultOpen}\n disabled={disabled}\n open={resolvedOpen}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer} {...portalProps}>\n {popup}\n </BaseTooltip.Portal>\n ) : null}\n </BaseTooltip.Root>\n );\n },\n);\n\nTooltipStandalone.displayName = 'TooltipStandalone';\n"],"mappings":";;;;;;;;;;;;;;;;;;AA6B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["clsx","BaseTooltip"],"sources":["../../src/Tooltip/TooltipStandalone.tsx"],"sourcesContent":["'use client';\n\nimport { mergeProps } from '@base-ui/react/merge-props';\nimport { Tooltip as BaseTooltip } from '@base-ui/react/tooltip';\nimport clsx from 'clsx';\nimport {\n cloneElement,\n isValidElement,\n memo,\n type Ref,\n useCallback,\n useMemo,\n useState,\n} from 'react';\n\nimport { useAppElement } from '@/ConfigProvider/AppElementContext';\nimport { useFloatingLayer } from '@/hooks/useFloatingLayer';\nimport { useIsClient } from '@/hooks/useIsClient';\nimport { useNativeButton } from '@/hooks/useNativeButton';\nimport { getFloatingCollisionPadding } from '@/internal/floating';\nimport { styleProps } from '@/styles/stylex/props';\nimport { getElementRef } from '@/utils/getElementRef';\nimport { mergeRefs } from '@/utils/mergeRefs';\nimport { placementMap } from '@/utils/placement';\n\nimport { TooltipArrowIcon } from './ArrowIcon';\nimport { styles } from './style';\nimport TooltipContent from './TooltipContent';\nimport { type TooltipProps } from './type';\n\nconst DEFAULT_OPEN_DELAY = 400;\nconst DEFAULT_CLOSE_DELAY = 100;\n\n/**\n * Tooltip component - displays small contextual hints on hover/focus\n * Compatible with Ant Design Tooltip-like API (subset)\n */\nexport const TooltipStandalone = memo<TooltipProps>(\n ({\n children,\n title,\n arrow = false,\n className,\n classNames,\n closeDelay,\n defaultOpen = false,\n disabled = false,\n getPopupContainer,\n hotkey,\n hotkeyProps,\n mouseEnterDelay,\n mouseLeaveDelay,\n onOpenChange,\n open,\n openDelay,\n placement = 'top',\n popupContainer,\n styles: customStylesProp,\n zIndex,\n ref: refProp,\n positionerProps,\n triggerProps,\n popupProps,\n portalProps,\n standalone: _standalone,\n ...restProps\n }) => {\n const isClient = useIsClient();\n const [uncontrolledOpen, setUncontrolledOpen] = useState(Boolean(defaultOpen));\n const [triggerNode, setTriggerNode] = useState<HTMLElement | null>(null);\n const triggerCallbackRef = useCallback((node: HTMLElement | null) => {\n if (node) setTriggerNode(node);\n }, []);\n\n const mergedOpen = open ?? uncontrolledOpen;\n const resolvedOpen = disabled ? false : mergedOpen;\n\n const handleOpenChange = useCallback(\n (nextOpen: boolean) => {\n if (disabled && nextOpen) return;\n onOpenChange?.(nextOpen);\n if (open === undefined) {\n setUncontrolledOpen(nextOpen);\n }\n },\n [disabled, onOpenChange, open],\n );\n\n const resolvedOpenDelay = useMemo(() => {\n if (openDelay !== undefined) return openDelay;\n if (mouseEnterDelay !== undefined) return mouseEnterDelay * 1000;\n return DEFAULT_OPEN_DELAY;\n }, [mouseEnterDelay, openDelay]);\n\n const resolvedCloseDelay = useMemo(() => {\n if (closeDelay !== undefined) return closeDelay;\n if (mouseLeaveDelay !== undefined) return mouseLeaveDelay * 1000;\n return DEFAULT_CLOSE_DELAY;\n }, [closeDelay, mouseLeaveDelay]);\n\n const placementConfig = placementMap[placement] ?? placementMap.top;\n const baseSideOffset = arrow ? 8 : 6;\n\n const appElement = useAppElement();\n const floatingLayerContainer = useFloatingLayer();\n const portalContainer = floatingLayerContainer ?? appElement;\n\n const { isNativeButtonTriggerElement } = useNativeButton({\n children,\n });\n\n const slots = useMemo(() => {\n const customStyles = typeof customStylesProp === 'function' ? undefined : customStylesProp;\n return {\n arrow: styleProps(styles.arrow, classNames?.arrow, customStyles?.arrow),\n popup: styleProps(styles.popup, clsx(className, classNames?.root, classNames?.container), {\n ...customStyles?.root,\n ...customStyles?.container,\n }),\n positioner: styleProps(styles.positioner, undefined, { zIndex: zIndex ?? 114_514 }),\n viewport: styleProps(\n styles.viewport,\n clsx('lobe-tooltip-viewport', classNames?.content),\n customStyles?.content,\n ),\n };\n }, [\n className,\n classNames?.arrow,\n classNames?.container,\n classNames?.content,\n classNames?.root,\n customStylesProp,\n zIndex,\n ]);\n\n const triggerElement = useMemo(() => {\n const popupTriggerId =\n isValidElement(children) &&\n (children as any).props['aria-haspopup'] !== undefined &&\n (children as any).props.id !== undefined\n ? (children as any).props.id\n : undefined;\n\n const baseTriggerProps = {\n closeDelay: resolvedCloseDelay,\n delay: resolvedOpenDelay,\n disabled,\n ...triggerProps,\n id: popupTriggerId ?? triggerProps?.id,\n };\n\n if (isValidElement(children)) {\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n render={(props) => {\n // Base UI's trigger props include `type=\"button\"` by default.\n // If we render into a non-<button> element, that prop is invalid and can warn.\n const resolvedProps = (() => {\n if (isNativeButtonTriggerElement) return props as any;\n // eslint-disable-next-line unused-imports/no-unused-vars\n const { type, ref: triggerRef, ...triggerRest } = props as any;\n return triggerRest;\n })();\n\n const childProps = (children as any).props;\n const mergedProps = mergeProps(restProps, childProps, resolvedProps);\n const shouldPreservePopupTriggerId =\n childProps['aria-haspopup'] !== undefined && childProps.id !== undefined;\n\n return cloneElement(children as any, {\n ...mergedProps,\n id: shouldPreservePopupTriggerId ? childProps.id : mergedProps.id,\n ref: mergeRefs([\n getElementRef(children),\n (props as any).ref,\n refProp,\n triggerCallbackRef,\n ]),\n });\n }}\n />\n );\n }\n\n return (\n <BaseTooltip.Trigger\n {...baseTriggerProps}\n ref={mergeRefs([refProp, triggerCallbackRef]) as Ref<HTMLButtonElement>}\n >\n {children}\n </BaseTooltip.Trigger>\n );\n }, [\n children,\n disabled,\n isNativeButtonTriggerElement,\n refProp,\n resolvedCloseDelay,\n resolvedOpenDelay,\n restProps,\n triggerCallbackRef,\n triggerProps,\n ]);\n\n const customContainer = useMemo(() => {\n if (popupContainer) return popupContainer;\n if (!getPopupContainer || !isClient || !triggerNode) return undefined;\n return getPopupContainer(triggerNode);\n }, [popupContainer, getPopupContainer, isClient, triggerNode]);\n\n const popup = useMemo(\n () => (\n <BaseTooltip.Positioner\n align={placementConfig.align}\n data-placement={placement}\n side={placementConfig.side}\n sideOffset={baseSideOffset}\n {...slots.positioner}\n {...positionerProps}\n collisionPadding={positionerProps?.collisionPadding ?? getFloatingCollisionPadding()}\n >\n <BaseTooltip.Popup {...slots.popup} {...popupProps}>\n {arrow && <BaseTooltip.Arrow {...slots.arrow}>{TooltipArrowIcon}</BaseTooltip.Arrow>}\n <BaseTooltip.Viewport {...slots.viewport}>\n <TooltipContent hotkey={hotkey} hotkeyProps={hotkeyProps} title={title} />\n </BaseTooltip.Viewport>\n </BaseTooltip.Popup>\n </BaseTooltip.Positioner>\n ),\n [\n arrow,\n baseSideOffset,\n hotkey,\n hotkeyProps,\n placement,\n placementConfig.align,\n placementConfig.side,\n popupProps,\n positionerProps,\n slots,\n title,\n ],\n );\n\n if (title == null && !hotkey) {\n return children;\n }\n\n const resolvedPortalContainer = customContainer ?? portalContainer;\n\n return (\n <BaseTooltip.Root\n defaultOpen={defaultOpen}\n disabled={disabled}\n open={resolvedOpen}\n onOpenChange={handleOpenChange}\n >\n {triggerElement}\n {resolvedPortalContainer ? (\n <BaseTooltip.Portal container={resolvedPortalContainer} {...portalProps}>\n {popup}\n </BaseTooltip.Portal>\n ) : null}\n </BaseTooltip.Root>\n );\n },\n);\n\nTooltipStandalone.displayName = 'TooltipStandalone';\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA8BA,MAAM,qBAAqB;AAC3B,MAAM,sBAAsB;;;;;AAM5B,MAAa,oBAAoB,MAC9B,EACC,UACA,OACA,QAAQ,OACR,WACA,YACA,YACA,cAAc,OACd,WAAW,OACX,mBACA,QACA,aACA,iBACA,iBACA,cACA,MACA,WACA,YAAY,OACZ,gBACA,QAAQ,kBACR,QACA,KAAK,SACL,iBACA,cACA,YACA,aACA,YAAY,aACZ,GAAG,gBACC;CACJ,MAAM,WAAW,YAAY;CAC7B,MAAM,CAAC,kBAAkB,uBAAuB,SAAS,QAAQ,WAAW,CAAC;CAC7E,MAAM,CAAC,aAAa,kBAAkB,SAA6B,IAAI;CACvE,MAAM,qBAAqB,aAAa,SAA6B;EACnE,IAAI,MAAM,eAAe,IAAI;CAC/B,GAAG,CAAC,CAAC;CAGL,MAAM,eAAe,WAAW,QADb,QAAQ;CAG3B,MAAM,mBAAmB,aACtB,aAAsB;EACrB,IAAI,YAAY,UAAU;EAC1B,eAAe,QAAQ;EACvB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C,UAAA,CACG,SAAS,oBAACA,QAAY,OAAb;IAAmB,GAAI,MAAM;IAAQ,UAAA;GAAoC,CAAA,GACnF,oBAACA,QAAY,UAAb;IAAsB,GAAI,MAAM;IAC9B,UAAA,oBAAC,gBAAD;KAAwB;KAAqB;KAAoB;IAAQ,CAAA;GACrD,CAAA,CACL;;CACG,CAAA,GAE1B;EACE;EACA;EACA;EACA;EACA;EACA,gBAAgB;EAChB,gBAAgB;EAChB;EACA;EACA;EACA;CACF,CACF;CAEA,IAAI,SAAS,QAAQ,CAAC,QACpB,OAAO;CAGT,MAAM,0BAA0B,mBAAmB;CAEnD,OACE,qBAACA,QAAY,MAAb;EACe;EACH;EACV,MAAM;EACN,cAAc;EAJhB,UAAA,CAMG,gBACA,0BACC,oBAACA,QAAY,QAAb;GAAoB,WAAW;GAAyB,GAAI;GACzD,UAAA;EACiB,CAAA,IAClB,IACY;;AAEtB,CACF;AAEA,kBAAkB,cAAc"}
@@ -90,6 +90,7 @@ function useNativeButton({ children, nativeButton, triggerNativeButton }) {
90
90
  if (isNativeButtonTriggerElement) return true;
91
91
  if (!isValidElement(children)) return void 0;
92
92
  if (typeof children.type === "string") return false;
93
+ if (children.props?.href !== void 0) return false;
93
94
  const displayName = getComponentDisplayName(children);
94
95
  if (displayName && displayName in NATIVE_BUTTON_MAP) return NATIVE_BUTTON_MAP[displayName];
95
96
  return false;
@@ -1 +1 @@
1
- {"version":3,"file":"useNativeButton.mjs","names":[],"sources":["../../src/hooks/useNativeButton.ts"],"sourcesContent":["import { isValidElement, type ReactElement, type ReactNode, useMemo } from 'react';\n\nexport interface UseNativeButtonOptions {\n /**\n * The children element that will be used as the trigger\n */\n children: ReactNode;\n /**\n * User-provided nativeButton prop\n */\n nativeButton?: boolean;\n /**\n * Additional nativeButton from trigger props (for DropdownMenu)\n */\n triggerNativeButton?: boolean;\n}\n\nexport interface UseNativeButtonResult {\n /**\n * Whether the trigger element is a native button\n */\n isNativeButtonTriggerElement: boolean;\n /**\n * The resolved nativeButton value to pass to Base UI components\n */\n resolvedNativeButton: boolean | undefined;\n}\n\n/**\n * Map of component displayNames to their nativeButton values.\n * Components that render native <button> elements should be true,\n * components that render non-button elements should be false.\n */\nconst NATIVE_BUTTON_MAP: Record<string, boolean> = {\n A: false,\n ActionIcon: false,\n ActionIconGroup: false,\n Alert: false,\n Avatar: false,\n AvatarGroup: false,\n BaseActionIcon: true,\n BaseButton: true,\n Block: false,\n BottomGradientButton: true,\n Burger: false,\n Button: true,\n Center: false,\n Checkbox: false,\n CheckboxGroup: false,\n Collapse: false,\n ColorSwatches: false,\n CopyButton: false,\n DownloadButton: false,\n EditableText: false,\n Empty: false,\n FileTypeIcon: false,\n Flexbox: false,\n FluentEmoji: false,\n GradientButton: true,\n Highlighter: false,\n Hotkey: false,\n Icon: false,\n Image: false,\n Img: false,\n Input: false,\n InputNumber: false,\n InputPassword: false,\n List: false,\n ListItem: false,\n Select: false,\n Switch: false,\n Markdown: false,\n MaterialFileTypeIcon: false,\n Segmented: false,\n Skeleton: false,\n SkeletonAvatar: false,\n SkeletonBlock: false,\n SkeletonButton: false,\n SkeletonParagraph: false,\n SkeletonTags: false,\n SkeletonText: false,\n SkeletonTitle: false,\n Snippet: false,\n Tag: false,\n Text: false,\n TextArea: false,\n ThemeSwitch: false,\n Video: false,\n};\n\n/**\n * Get the displayName of a React component from an element.\n * Handles function components, forwardRef, memo, etc.\n */\nfunction getComponentDisplayName(element: ReactElement): string | undefined {\n const type = element.type;\n\n if (typeof type === 'string') return undefined;\n\n if (typeof type === 'function') {\n return (type as any).displayName || type.name;\n }\n\n if (typeof type === 'object' && type !== null) {\n // Handle forwardRef, memo, etc.\n const displayName =\n (type as any).displayName ||\n (type as any).render?.displayName ||\n (type as any).render?.name ||\n (type as any).type?.displayName ||\n (type as any).type?.name;\n return displayName;\n }\n\n return undefined;\n}\n\n/**\n * Hook to resolve nativeButton prop for Base UI trigger components.\n *\n * When using `render`, Base UI expects the rendered element to be a native <button> by default.\n * If we can infer it's not, we opt out to avoid warnings (users can still override via `nativeButton`).\n */\nexport function useNativeButton({\n children,\n nativeButton,\n triggerNativeButton,\n}: UseNativeButtonOptions): UseNativeButtonResult {\n const isNativeButtonTriggerElement = useMemo(() => {\n if (!isValidElement(children)) return false;\n return typeof children.type === 'string' && children.type === 'button';\n }, [children]);\n\n const resolvedNativeButton = useMemo(() => {\n // User-provided nativeButton takes highest priority\n if (nativeButton !== undefined) return nativeButton;\n // Trigger props nativeButton (for DropdownMenu) takes second priority\n if (triggerNativeButton !== undefined) return triggerNativeButton;\n // If it's a native button element, return true\n if (isNativeButtonTriggerElement) return true;\n // If children is not a valid element, let Base UI decide\n if (!isValidElement(children)) return undefined;\n // If it's a string type but not a button (e.g., 'div'), return false\n if (typeof children.type === 'string') return false;\n\n // Check if it's a known component from the library\n const displayName = getComponentDisplayName(children);\n if (displayName && displayName in NATIVE_BUTTON_MAP) {\n return NATIVE_BUTTON_MAP[displayName];\n }\n\n // For unknown React components, default to false to avoid warnings\n // since most custom components don't render native buttons\n return false;\n }, [children, isNativeButtonTriggerElement, nativeButton, triggerNativeButton]);\n\n return {\n isNativeButtonTriggerElement,\n resolvedNativeButton,\n };\n}\n"],"mappings":";;;;;;;AAiCA,MAAM,oBAA6C;CACjD,GAAG;CACH,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,QAAQ;CACR,aAAa;CACb,gBAAgB;CAChB,YAAY;CACZ,OAAO;CACP,sBAAsB;CACtB,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,eAAe;CACf,UAAU;CACV,eAAe;CACf,YAAY;CACZ,gBAAgB;CAChB,cAAc;CACd,OAAO;CACP,cAAc;CACd,SAAS;CACT,aAAa;CACb,gBAAgB;CAChB,aAAa;CACb,QAAQ;CACR,MAAM;CACN,OAAO;CACP,KAAK;CACL,OAAO;CACP,aAAa;CACb,eAAe;CACf,MAAM;CACN,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,UAAU;CACV,sBAAsB;CACtB,WAAW;CACX,UAAU;CACV,gBAAgB;CAChB,eAAe;CACf,gBAAgB;CAChB,mBAAmB;CACnB,cAAc;CACd,cAAc;CACd,eAAe;CACf,SAAS;CACT,KAAK;CACL,MAAM;CACN,UAAU;CACV,aAAa;CACb,OAAO;AACT;;;;;AAMA,SAAS,wBAAwB,SAA2C;CAC1E,MAAM,OAAO,QAAQ;CAErB,IAAI,OAAO,SAAS,UAAU,OAAO,KAAA;CAErC,IAAI,OAAO,SAAS,YAClB,OAAQ,KAAa,eAAe,KAAK;CAG3C,IAAI,OAAO,SAAS,YAAY,SAAS,MAQvC,OALG,KAAa,eACb,KAAa,QAAQ,eACrB,KAAa,QAAQ,QACrB,KAAa,MAAM,eACnB,KAAa,MAAM;AAK1B;;;;;;;AAQA,SAAgB,gBAAgB,EAC9B,UACA,cACA,uBACgD;CAChD,MAAM,+BAA+B,cAAc;EACjD,IAAI,CAAC,eAAe,QAAQ,GAAG,OAAO;EACtC,OAAO,OAAO,SAAS,SAAS,YAAY,SAAS,SAAS;CAChE,GAAG,CAAC,QAAQ,CAAC;CAyBb,OAAO;EACL;EACA,sBAzB2B,cAAc;GAEzC,IAAI,iBAAiB,KAAA,GAAW,OAAO;GAEvC,IAAI,wBAAwB,KAAA,GAAW,OAAO;GAE9C,IAAI,8BAA8B,OAAO;GAEzC,IAAI,CAAC,eAAe,QAAQ,GAAG,OAAO,KAAA;GAEtC,IAAI,OAAO,SAAS,SAAS,UAAU,OAAO;GAG9C,MAAM,cAAc,wBAAwB,QAAQ;GACpD,IAAI,eAAe,eAAe,mBAChC,OAAO,kBAAkB;GAK3B,OAAO;EACT,GAAG;GAAC;GAAU;GAA8B;GAAc;EAAmB,CAIxD;CACrB;AACF"}
1
+ {"version":3,"file":"useNativeButton.mjs","names":[],"sources":["../../src/hooks/useNativeButton.ts"],"sourcesContent":["import { isValidElement, type ReactElement, type ReactNode, useMemo } from 'react';\n\nexport interface UseNativeButtonOptions {\n /**\n * The children element that will be used as the trigger\n */\n children: ReactNode;\n /**\n * User-provided nativeButton prop\n */\n nativeButton?: boolean;\n /**\n * Additional nativeButton from trigger props (for DropdownMenu)\n */\n triggerNativeButton?: boolean;\n}\n\nexport interface UseNativeButtonResult {\n /**\n * Whether the trigger element is a native button\n */\n isNativeButtonTriggerElement: boolean;\n /**\n * The resolved nativeButton value to pass to Base UI components\n */\n resolvedNativeButton: boolean | undefined;\n}\n\n/**\n * Map of component displayNames to their nativeButton values.\n * Components that render native <button> elements should be true,\n * components that render non-button elements should be false.\n */\nconst NATIVE_BUTTON_MAP: Record<string, boolean> = {\n A: false,\n ActionIcon: false,\n ActionIconGroup: false,\n Alert: false,\n Avatar: false,\n AvatarGroup: false,\n BaseActionIcon: true,\n BaseButton: true,\n Block: false,\n BottomGradientButton: true,\n Burger: false,\n Button: true,\n Center: false,\n Checkbox: false,\n CheckboxGroup: false,\n Collapse: false,\n ColorSwatches: false,\n CopyButton: false,\n DownloadButton: false,\n EditableText: false,\n Empty: false,\n FileTypeIcon: false,\n Flexbox: false,\n FluentEmoji: false,\n GradientButton: true,\n Highlighter: false,\n Hotkey: false,\n Icon: false,\n Image: false,\n Img: false,\n Input: false,\n InputNumber: false,\n InputPassword: false,\n List: false,\n ListItem: false,\n Select: false,\n Switch: false,\n Markdown: false,\n MaterialFileTypeIcon: false,\n Segmented: false,\n Skeleton: false,\n SkeletonAvatar: false,\n SkeletonBlock: false,\n SkeletonButton: false,\n SkeletonParagraph: false,\n SkeletonTags: false,\n SkeletonText: false,\n SkeletonTitle: false,\n Snippet: false,\n Tag: false,\n Text: false,\n TextArea: false,\n ThemeSwitch: false,\n Video: false,\n};\n\n/**\n * Get the displayName of a React component from an element.\n * Handles function components, forwardRef, memo, etc.\n */\nfunction getComponentDisplayName(element: ReactElement): string | undefined {\n const type = element.type;\n\n if (typeof type === 'string') return undefined;\n\n if (typeof type === 'function') {\n return (type as any).displayName || type.name;\n }\n\n if (typeof type === 'object' && type !== null) {\n // Handle forwardRef, memo, etc.\n const displayName =\n (type as any).displayName ||\n (type as any).render?.displayName ||\n (type as any).render?.name ||\n (type as any).type?.displayName ||\n (type as any).type?.name;\n return displayName;\n }\n\n return undefined;\n}\n\n/**\n * Hook to resolve nativeButton prop for Base UI trigger components.\n *\n * When using `render`, Base UI expects the rendered element to be a native <button> by default.\n * If we can infer it's not, we opt out to avoid warnings (users can still override via `nativeButton`).\n */\nexport function useNativeButton({\n children,\n nativeButton,\n triggerNativeButton,\n}: UseNativeButtonOptions): UseNativeButtonResult {\n const isNativeButtonTriggerElement = useMemo(() => {\n if (!isValidElement(children)) return false;\n return typeof children.type === 'string' && children.type === 'button';\n }, [children]);\n\n const resolvedNativeButton = useMemo(() => {\n // User-provided nativeButton takes highest priority\n if (nativeButton !== undefined) return nativeButton;\n // Trigger props nativeButton (for DropdownMenu) takes second priority\n if (triggerNativeButton !== undefined) return triggerNativeButton;\n // If it's a native button element, return true\n if (isNativeButtonTriggerElement) return true;\n // If children is not a valid element, let Base UI decide\n if (!isValidElement(children)) return undefined;\n // If it's a string type but not a button (e.g., 'div'), return false\n if (typeof children.type === 'string') return false;\n\n // Button / ActionIcon (and most link-capable components) render an <a> when given `href`.\n if ((children.props as { href?: unknown } | null)?.href !== undefined) return false;\n\n // Check if it's a known component from the library\n const displayName = getComponentDisplayName(children);\n if (displayName && displayName in NATIVE_BUTTON_MAP) {\n return NATIVE_BUTTON_MAP[displayName];\n }\n\n // For unknown React components, default to false to avoid warnings\n // since most custom components don't render native buttons\n return false;\n }, [children, isNativeButtonTriggerElement, nativeButton, triggerNativeButton]);\n\n return {\n isNativeButtonTriggerElement,\n resolvedNativeButton,\n };\n}\n"],"mappings":";;;;;;;AAiCA,MAAM,oBAA6C;CACjD,GAAG;CACH,YAAY;CACZ,iBAAiB;CACjB,OAAO;CACP,QAAQ;CACR,aAAa;CACb,gBAAgB;CAChB,YAAY;CACZ,OAAO;CACP,sBAAsB;CACtB,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,UAAU;C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AAA,GAAW,OAAO;GAG9E,MAAM,cAAc,wBAAwB,QAAQ;GACpD,IAAI,eAAe,eAAe,mBAChC,OAAO,kBAAkB;GAK3B,OAAO;EACT,GAAG;GAAC;GAAU;GAA8B;GAAc;EAAmB,CAIxD;CACrB;AACF"}
package/es/index.d.mts CHANGED
@@ -365,6 +365,7 @@ import { StepItem, StepStatus, StepsProps } from "./Steps/type.mjs";
365
365
  import Steps from "./Steps/Steps.mjs";
366
366
  import "./Steps/index.mjs";
367
367
  import { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./styles/customTheme.mjs";
368
+ import { CustomNeutralColor, LobeNeutralColor, LobeNeutralScale, generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from "./styles/theme/customNeutral.mjs";
368
369
  import { CustomPrimaryColor, LobePrimaryColor, isCustomPrimaryColor } from "./styles/theme/customPrimary.mjs";
369
370
  import { CreateLobeTokenParams, LobeToken, createLobeToken } from "./styles/theme/createLobeToken.mjs";
370
371
  import { LobeAppearance, LobeTheme, LobeThemeScript, LobeThemeScriptProps, LobeThemeState, ResponsiveState, ThemeScope, ThemeScopeProps, setLobeTheme, useResponsive, useTheme, useThemeMode } from "./styles/theme/scope.mjs";
@@ -373,7 +374,7 @@ import { LobeCssVar, StaticStyleExtract, StaticStyleUtils, createStaticStyles, c
373
374
  import { LobeStatusPalette, registerLobePalette } from "./styles/theme/customPalette.mjs";
374
375
  import { staticStylish } from "./styles/theme/customStylishStatic.mjs";
375
376
  import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
376
- import { getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
377
+ import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
377
378
  import "./styles/index.mjs";
378
379
  import { CLASSNAMES } from "./styles/classNames.mjs";
379
380
  import { SwitchChangeEventHandler, SwitchClassNames, SwitchClickEventHandler, SwitchContextType, SwitchIconPosition, SwitchIconProps, SwitchProps, SwitchRootProps, SwitchSize, SwitchStyles, SwitchThumbProps } from "./Switch/type.mjs";
@@ -417,4 +418,4 @@ import { useFormContext } from "./Form/context.mjs";
417
418
  import { Form } from "./Form/index.mjs";
418
419
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
419
420
  import { ErrorBoundary, ErrorBoundaryProps } from "react-error-boundary";
420
- export { A, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, type LegacyDateInput, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
421
+ export { A, type AProps, Accordion, type AccordionClassNames, AccordionHeader, type AccordionHeaderProps, type AccordionIndicatorPlacement, AccordionItem, type AccordionItemProps, type AccordionItemType, AccordionPanel, type AccordionPanelProps, type AccordionProps, AccordionRoot, type AccordionRootProps, type AccordionStyles, AccordionTrigger, type AccordionTriggerProps, type AccordionVariant, ActionIcon, type ActionIconClassNames, ActionIconGroup, type ActionIconGroupEvent, type MenuItemType as ActionIconGroupItemType, type ActionIconGroupProps, type ActionIconOutdent, type ActionIconProps, type ActionIconSize, type ActionIconStyles, type ActionIconVariant, Alert, type AlertClassNames, type AlertCloseConfig, type AlertProps, type AlertRef, type AlertStyles, type AlertType, type AlertVariant, Anchor, type AnchorItem, type AnchorProps, AutoComplete, type AutoCompleteOption, type AutoCompleteProps, Avatar, type AvatarClassNames, AvatarGroup, type AvatarGroupItemType, type AvatarGroupProps, type AvatarProps, type AvatarStyles, Badge, type BadgeProps, type BadgeSize, type BadgeStatus, type BaseMenuItemGroupType, type BaseMenuItemType, type BaseModalProps, type BaseSubMenuType, Block, type BlockProps, Breadcrumb, type BreadcrumbItem, type BreadcrumbProps, Burger, type BurgerProps, Button, type ButtonIconPosition, type ButtonOutdent, type ButtonProps, type ButtonShape, type ButtonSize, type ButtonType, type CDN, CLASSNAMES, type CalendarMode, Carousel, type CarouselProps, type CarouselRef, type CellRender, type CellRenderInfo, Center, type CenterProps, _default as Checkbox, CheckboxGroup, type CheckboxGroupOption, type CheckboxGroupProps, type CheckboxProps, type CheckboxShape, CodeDiff, type CodeDiffProps, CodeEditor, type CodeEditorProps, Collapsible, type CollapsibleProps, type ColorPalettes, type ColorPalettesAlpha, ColorPicker, type ColorPickerProps, ColorSwatches, type ColorSwatchesProps, type ColorToken, type Config, ConfigProvider, type ConfigProviderProps, type ContextMenuCheckboxItem, ContextMenuHost, type ContextMenuInterceptor, type ContextMenuItem, ContextMenuTrigger, type ControlSize, CopyButton, type CopyButtonProps, type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, DatePicker, type DatePickerBaseProps, type DatePickerProps, type DatePickerSemanticType, type DatePickerType, DateRangePicker, type DateRangePickerProps, type DateRangeValue, DayjsDatePicker, type DayjsDatePickerProps, type DayjsDatePickerType, DayjsDateRangePicker, type DayjsDateRangePickerProps, type DayjsDateRangeValue, Descriptions, type DescriptionsItem, type DescriptionsProps, type DiffViewMode, type Direction, type DistributiveOmit, type DivProps, Divider, type DividerOrientation, type DividerProps, DownloadButton, type DownloadButtonProps, DraggablePanel, DraggablePanelBody, type DraggablePanelBodyProps, DraggablePanelContainer, type DraggablePanelContainerProps, DraggablePanelContent, type DraggablePanelContentProps, DraggablePanelFooter, type DraggablePanelFooterProps, DraggablePanelHandle, type DraggablePanelHandleProps, DraggablePanelHeader, type DraggablePanelHeaderProps, type DraggablePanelPlacement, type DraggablePanelProps, DraggablePanelRoot, type DraggablePanelRootProps, type DraggablePanelSize, DraggablePanelToggle, type DraggablePanelToggleProps, DraggableSideNav, type DraggableSideNavProps, Drawer, DrawerBackdrop, type DrawerBackdropProps, DrawerClose, type DrawerCloseProps, DrawerContent, type DrawerContentProps, DrawerDescription, type DrawerDescriptionProps, DrawerFooter, type DrawerFooterProps, DrawerHeader, type DrawerHeaderProps, type DrawerPlacement, DrawerPopup, type DrawerPopupProps, DrawerPortal, type DrawerPortalProps, type DrawerProps, type DrawerPush, DrawerRoot, type DrawerRootProps, type DrawerSemanticNames, type DrawerSemanticStyles, DrawerTitle, type DrawerTitleProps, DrawerTrigger, type DrawerTriggerProps, type DropdownItem, DropdownMenu, type DropdownMenuCheckboxItem, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, type DropdownMenuCheckboxItemProps, DropdownMenuFooter, type DropdownMenuFooterProps, DropdownMenuGroup, DropdownMenuGroupLabel, type DropdownMenuGroupLabelProps, DropdownMenuHeader, type DropdownMenuHeaderProps, DropdownMenuItem, DropdownMenuItemContent, type DropdownMenuItemContentProps, DropdownMenuItemDesc, type DropdownMenuItemDescProps, DropdownMenuItemExtra, type DropdownMenuItemExtraProps, DropdownMenuItemIcon, type DropdownMenuItemIconProps, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, type DropdownMenuItemLabelGroupProps, type DropdownMenuItemLabelProps, type DropdownMenuItemProps, type DropdownMenuPlacement, DropdownMenuPopup, type DropdownMenuPopupProps, DropdownMenuPortal, type DropdownMenuPortalProps, DropdownMenuPositioner, type DropdownMenuPositionerProps, type DropdownMenuProps, DropdownMenuRoot, DropdownMenuScrollViewport, type DropdownMenuScrollViewportProps, DropdownMenuSeparator, type DropdownMenuSeparatorProps, DropdownMenuSubmenuArrow, type DropdownMenuSubmenuArrowProps, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, type DropdownMenuSubmenuTriggerProps, DropdownMenuSwitchItem, type DropdownMenuSwitchItemProps, type DropdownMenuSwitchItem$1 as DropdownMenuSwitchItemType, DropdownMenuTrigger, type DropdownMenuTriggerProps, EditableText, type EditableTextProps, EditorSlashMenu, type EditorSlashMenuGroup, type EditorSlashMenuItems, type EditorSlashMenuOption, EmojiPicker, type EmojiPickerProps, Empty, type EmptyProps, ErrorBoundary, type ErrorBoundaryProps, FileTypeIcon, type FileTypeIconProps, type FilterValue, _default$1 as FlexBasic, type FlexBasicProps, _default$1 as Flexbox, type FlexboxProps, type FloatingCollisionPadding, FloatingPanel, type FloatingPanelOffset, type FloatingPanelPlacement, type FloatingPanelProps, FloatingSheet, type FloatingSheetProps, FluentEmoji, type FluentEmojiProps, FocusScope, type FocusScopeProps, FontLoader, type FontLoaderProps, Form, type FormContextValue, FormDivider, type FormDividerProps, FormField, type FormFieldProps, FormFlatGroup, type FormFlatGroupProps, FormFooter, type FormFooterProps, FormGroup, type FormGroupItemType, type FormGroupProps, type FormLayout, type FormProps, FormSubmitFooter, type FormSubmitFooterProps, FormTitle, type FormTitleProps, type FormValues, type FormVariant, Freeze, type FreezeProps, type GenerateConfig, type GeneratedDatePicker, type GenericItemType, type GenericTimePickerProps, Grid, type GridProps, GroupAvatar, type GroupAvatarProps, GuideCard, type GuideCardProps, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, type HeaderProps, Highlighter, type HighlighterProps, Hotkey, HotkeyInput, type HotkeyInputProps, type HotkeyProps, HtmlPreview, HtmlPreviewIframe, type HtmlPreviewIframeProps, type HtmlPreviewMode, type HtmlPreviewProps, type HtmlPreviewStreamingMode, I18nProvider, type I18nProviderProps, Icon, type IconAlign, type IconProps, IconProvider, type IconSize, type IconSpaceMode, Image, type ImagePreviewOptions, type ImageProps, ImageSelect, type ImageSelectItem, type ImageSelectProps, type ImgProps, type ImperativeModalProps, _default$2 as Input, type InputClassNames, _default$3 as InputNumber, type InputNumberProps, InputOTP, type InputOTPProps, _default$4 as InputPassword, type InputPasswordProps, type InputProps, type InputSize, type InputStyles, type InputVariant, type ItemType, type ItemsType, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, type LayoutFooterProps, LayoutHeader, type LayoutHeaderProps, LayoutMain, type LayoutMainProps, type LayoutProps, LayoutSidebar, LayoutSidebarInner, type LayoutSidebarInnerProps, type LayoutSidebarProps, LayoutToc, type LayoutTocProps, type LegacyDateInput, List, type ListClickInfo, type ListDividerType, type ListItem, type ListItemType, type ListProps, type ListSemanticName, type LobeAppearance, type LobeCssVar, type LobeCustomStylish, type LobeCustomToken, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, I18nProvider as LobeUIProvider, Markdown, type MarkdownProps, MaskShadow, type MaskShadowProps, MaterialFileTypeIcon, type MaterialFileTypeIconProps, type MenuCheckboxItemType, type MenuDividerType, type MenuInfo, type MenuItemGroupType, type MenuItemType, type MenuSwitchItemType, Mermaid, type MermaidProps, Modal, ModalBackdrop, type ModalBackdropProps, ModalClose, type ModalCloseProps, type ModalComponentProps, type ModalConfirmConfig, ModalContent, type ModalContentProps, ModalContext, type ModalContextValue, ModalDescription, type ModalDescriptionProps, ModalFooter, type ModalFooterProps, ModalHeader, type ModalHeaderProps, ModalHost, type ModalHostProps, type ModalInstance, ModalPopup, type ModalPopupProps, ModalPortal, type ModalPortalProps, ModalRoot, type ModalRootProps, type ModalSystem, ModalTitle, type ModalTitleProps, ModalTrigger, type ModalTriggerProps, ModalViewport, type ModalViewportProps, type MonthPickerProps, MotionComponent, type MotionComponentType, MotionProvider, NeutralColors, NeutralColorsObj, Pagination, type PaginationAlign, type PaginationItemType, type PaginationProps, type PaginationSemanticName, type PaginationSize, type PaginationSizeChangerProps, type PanelMode, PatchDiff, type PatchDiffProps, type PickerClassNames, type PickerComponents, type PickerDateInput, type PickerDateStrings, type PickerLocale, type PickerLocaleInput, type PickerLocaleLang, type PickerMode, type PickerPanelProps, type PickerPlacement, type PickerPopupSemanticName, type PickerProps, type PickerPropsWithMultiple, type PickerRef, type PickerSemanticClassNames, type PickerSemanticName, type PickerSemanticStyles, type PickerSize, type PickerStatus, type PickerStyles, type PickerTagProps, type PickerValueInput, type PickerVariant, type Placement, type PlacementConfig, Popover, PopoverArrow, type PopoverArrowAtomProps, PopoverArrowIcon, PopoverBackdrop, type PopoverBackdropProps, type PopoverContextValue, PopoverGroup, type PopoverGroupHandle, type PopoverGroupItem, type PopoverPlacement, PopoverPopup, type PopoverPopupAtomProps, type PopoverPopupProps, PopoverPortal, type PopoverPortalAtomProps, type PopoverPortalProps, PopoverPositioner, type PopoverPositionerAtomProps, type PopoverPositionerProps, type PopoverProps, PopoverProvider, PopoverRoot, type PopoverTrigger, type PopoverTriggerComponentProps, PopoverTriggerElement, type PopoverTriggerElementProps, PopoverViewport, type PopoverViewportAtomProps, type PresetColorKey, type PresetColorType, type PresetDate, type PresetPickerProps, type PresetSystemColorKey, type PresetSystemColorType, PreviewGroup, type PreviewGroupProps, PrimaryColors, PrimaryColorsObj, Progress, type ProgressProps, type ProgressSize, type ProgressStatus, type ProgressType, type ProgressVariant, QRCode, type QRCodeErrorLevel, type QRCodeProps, type QRCodeStatus, type QuarterPickerProps, Radio, RadioGroup, type RadioGroupOption, type RadioGroupProps, type RadioProps, type RangeChangeDates, type RangeChangeStrings, type RangeDisabledDate, type RangeInfo, type RangePickerComponent, type RangePickerProps, type RangePickerRef, Rate, type RateProps, type RenderItemContentOptions, type RenderOptions, type ResponsiveState, Result, type ResultProps, type ResultStatus, ScrollArea, ScrollAreaContent, type ScrollAreaContentProps, ScrollAreaCorner, type ScrollAreaCornerProps, type ScrollAreaProps, ScrollAreaRoot, type ScrollAreaRootProps, ScrollAreaScrollbar, type ScrollAreaScrollbarProps, ScrollAreaThumb, type ScrollAreaThumbProps, ScrollAreaViewport, type ScrollAreaViewportProps, ScrollShadow, type ScrollShadowProps, SearchBar, type SearchBarProps, SearchResultCards, type SearchResultCardsProps, Segmented, type SegmentedClassNames, SegmentedIndicator, type SegmentedIndicatorProps, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, type SegmentedItemProps, type SegmentedOption, type SegmentedOptions, type SegmentedOrientation, type SegmentedProps, SegmentedRoot, type SegmentedRootProps, type SegmentedSize, type SegmentedStyles, type SegmentedVariant, Select, SelectArrow, type SelectArrowProps, SelectBackdrop, type SelectBehaviorVariant, type SelectClassNames, SelectGroup, SelectGroupLabel, type SelectGroupLabelProps, type SelectGroupProps, SelectIcon, type SelectIconProps, type SelectIndicatorVariant, SelectItem, SelectItemIndicator, type SelectItemIndicatorProps, type SelectItemProps, SelectItemText, type SelectItemTextProps, SelectList, type SelectListProps, type SelectOption, type SelectOptionGroup, type SelectOptions, SelectPopup, type SelectPopupProps, SelectPortal, type SelectPortalProps, SelectPositioner, type SelectPositionerProps, type SelectProps, SelectRoot, type SelectRootChangeEventDetails, SelectScrollDownArrow, type SelectScrollDownArrowProps, SelectScrollUpArrow, type SelectScrollUpArrowProps, SelectSeparator, type SelectSize, SelectTrigger, type SelectTriggerProps, SelectValue, type SelectValueProps, type SelectVariant, _default$5 as ShikiLobeTheme, SideNav, type SideNavProps, type SinglePickerComponent, Skeleton, type SkeletonAnimation, SkeletonAvatar, type SkeletonAvatarProps, type SkeletonProps, SkeletonText, type SkeletonTextProps, Slider, type SliderProps, SliderWithInput, type SliderWithInputProps, Snippet, type SnippetProps, type SortOrder, SortableList, type SortableListProps, type SpanProps, Spin, type SpinProps, type SpinSize, type SpinVariant, _default$6 as SplitButton, type SplitButtonMenuProps, type SplitButtonProps, type StaticStyleExtract, type StaticStyleUtils, Statistic, type StatisticProps, type StepItem, type StepStatus, Steps, type StepsProps, type SubMenuType, type SvgProps, Switch, type SwitchChangeEventHandler, type SwitchClassNames, type SwitchClickEventHandler, type SwitchContextType, SwitchIcon, type SwitchIconPosition, type SwitchIconProps, type SwitchProps, SwitchRoot, type SwitchRootProps, type SwitchSize, type SwitchStyles, SwitchThumb, type SwitchThumbProps, SyntaxHighlighter, type SyntaxHighlighterProps, SyntaxMermaid, type SyntaxMermaidProps, type SystemColorToken, Table, TableBody, type TableBreakpoint, TableCell, type TableCellAttributes, type TableCellProps, type TableClassNames, TableColGroup, type TableColGroupColumn, type TableColGroupProps, type TableColumn, type TableColumnAlign, type TableColumnEllipsis, type TableColumnFilterItem, type TableColumnFixed, type TableColumnGroupProps, type TableColumnGroupType, type TableColumnProps, type TableColumnSorter, type TableColumnTitle, type TableColumnTitleProps, type TableColumnType, type TableColumnsType, type TableCompareFn, type TableComponents, type TableComponentsSemanticName, TableContainer, type TableCurrentDataSource, type TableCustomizeComponent, type TableDataIndex, TableElement, type TableElementProps, type TableExpandIconProps, type TableExpandableConfig, TableExpandedRow, type TableExpandedRowProps, type TableExpandedRowRender, type TableFilterDropdownPopupProps, type TableFilterDropdownProps, type TableFilters, TableFooter, TableHeader, TableHeaderCell, type TableHeaderCellAttributes, type TableLoadingConfig, type TableLocale, type TableMultipleSorterResult, type TablePaginationConfig, type TablePaginationPlacement, type TablePartProps, type TableProps, type TableRef, type TableRenderedCell, TableRoot, type TableRootProps, TableRow, type TableRowClassName, type TableRowProps, type TableRowSelectMethod, type TableRowSelection, type TableRowSelectionCheckboxProps, type TableRowSelectionType, TableScroll, type TableScrollProps, type TableScrollToConfig, type TableSectionProps, type TableSelectionItem, type TableSelectionPreset, type TableSemanticInfo, type TableSemanticName, type TableSize, type TableSorterResult, type TableSorterTooltipProps, type TableSticky, type TableStyles, type TableSummaryCellProps, TableSummaryFoot, type TableSummaryProps, type TableSummaryRowProps, TableTitle, type TableVariant, Tabs, type TabsClassNames, TabsIndicator, type TabsIndicatorProps, type TabsItem, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsPanelProps, type TabsProps, TabsRoot, type TabsRootProps, type TabsSize, type TabsStyles, TabsTab, type TabsTabProps, type TabsVariant, Tag, type TagClassNames, type TagProps, type TagShape, type TagSize, type TagStyles, type TagVariant, Text, _default$7 as TextArea, type TextAreaAutoSize, type TextAreaProps, type TextClassNames, type TextProps, type TextStyles, ThemeScope, type ThemeScopeProps, type TimePickerLocale, type TimePickerProps, type ToastAPI, ToastHost, type ToastHostProps, type ToastInstance, type ToastOptions, type ToastPosition, type ToastPromiseOptions, type ToastProps, type ToastType, ToggleGroup, type ToggleGroupClassNames, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, type ToggleGroupItemProps, type ToggleGroupOption, type ToggleGroupProps, ToggleGroupRoot, type ToggleGroupRootProps, type ToggleGroupSize, type ToggleGroupStyles, type ToggleGroupVariant, Tooltip, TooltipGroup, type TooltipGroupProps, type TooltipPlacement, type TooltipPopupComponentProps, type TooltipPortalProps, type TooltipPositionerProps, type TooltipProps, type TooltipTriggerComponentProps, Tree, type TreeClassNames, type TreeDataNode, type TreeFlatRow, type TreeProps, type TreeStyles, type Trigger, Typography, type TypographyProps, Upload, type UploadChangeInfo, UploadDragger, type UploadProps, type UseImagePreviewResult, type UseScopeArrowNavOptions, type UseScopeSwitcherOptions, Video, type VideoMarker, type VideoPlayer, type VideoProps, type VideoSection, type VideoState, type VirtualListProps, type WeekPickerProps, type YearPickerProps, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
package/es/index.mjs CHANGED
@@ -18,12 +18,13 @@ import { KeyMapEnum } from "./Hotkey/const.mjs";
18
18
  import FlexBasic_default from "./Flex/FlexBasic.mjs";
19
19
  import Center from "./Flex/Center.mjs";
20
20
  import { registerLobePalette } from "./styles/theme/customPalette.mjs";
21
+ import { generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from "./styles/theme/customNeutral.mjs";
21
22
  import { generateColorNeutralPalette, generateColorPalette } from "./styles/theme/generateColorPalette.mjs";
22
23
  import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./styles/customTheme.mjs";
23
24
  import { isCustomPrimaryColor } from "./styles/theme/customPrimary.mjs";
24
25
  import { createLobeToken } from "./styles/theme/createLobeToken.mjs";
25
26
  import { createStaticStyles, css, cssVar, cx, extractStaticStyle, injectGlobal, keyframes, responsive } from "./styles/css.mjs";
26
- import { getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
27
+ import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./styles/theme/themeCss.mjs";
27
28
  import { LobeThemeScript, ThemeScope, setLobeTheme, useResponsive, useTheme, useThemeMode } from "./styles/theme/scope.mjs";
28
29
  import { combineKeys } from "./Hotkey/utils.mjs";
29
30
  import Hotkey from "./Hotkey/Hotkey.mjs";
@@ -223,4 +224,4 @@ import { ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroup
223
224
  import ToggleGroup from "./ToggleGroup/ToggleGroup.mjs";
224
225
  import { rehypeStreamAnimated } from "@lobehub/streamdown";
225
226
  import { ErrorBoundary } from "react-error-boundary";
226
- export { A, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generatePicker, getActiveScopeId, getAllKeys, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
227
+ export { A, Accordion, AccordionHeader, AccordionItem, AccordionPanel, AccordionRoot, AccordionTrigger, ActionIcon, ActionIconGroup, Alert, Anchor, AutoComplete, Avatar, AvatarGroup, Badge, Block, Breadcrumb, Burger, Button, CLASSNAMES, Carousel, Center, Checkbox_default as Checkbox, CheckboxGroup, CodeDiff, CodeEditor, Collapsible, ColorPicker, ColorSwatches, ConfigProvider, ContextMenuHost, ContextMenuTrigger, CopyButton, DatePicker, DateRangePicker, DayjsDatePicker, DayjsDateRangePicker, Descriptions, Divider, DownloadButton, DraggablePanel, DraggablePanelBody, DraggablePanelContainer, DraggablePanelContent, DraggablePanelFooter, DraggablePanelHandle, DraggablePanelHeader, DraggablePanelRoot, DraggablePanelToggle, DraggableSideNav, Drawer, DrawerBackdrop, DrawerClose, DrawerContent, DrawerDescription, DrawerFooter, DrawerHeader, DrawerPopup, DrawerPortal, DrawerRoot, DrawerTitle, DrawerTrigger, DropdownMenu, DropdownMenuCheckboxItemIndicator, DropdownMenuCheckboxItemPrimitive, DropdownMenuFooter, DropdownMenuGroup, DropdownMenuGroupLabel, DropdownMenuHeader, DropdownMenuItem, DropdownMenuItemContent, DropdownMenuItemDesc, DropdownMenuItemExtra, DropdownMenuItemIcon, DropdownMenuItemLabel, DropdownMenuItemLabelGroup, DropdownMenuPopup, DropdownMenuPortal, DropdownMenuPositioner, DropdownMenuRoot, DropdownMenuScrollViewport, DropdownMenuSeparator, DropdownMenuSubmenuArrow, DropdownMenuSubmenuRoot, DropdownMenuSubmenuTrigger, DropdownMenuSwitchItem, DropdownMenuTrigger, EditableText, EditorSlashMenu, EmojiPicker, Empty, ErrorBoundary, FileTypeIcon, FlexBasic_default as FlexBasic, FlexBasic_default as Flexbox, FloatingPanel, FloatingSheet, FluentEmoji, FocusScope, FontLoader, Form, FormDivider, FormField, FormFlatGroup, FormFooter, FormGroup, FormSubmitFooter, FormTitle, Freeze, Grid, GroupAvatar, GuideCard, DEFAULT_HEIGHT as HTML_PREVIEW_DEFAULT_HEIGHT, DEFAULT_SANDBOX as HTML_PREVIEW_DEFAULT_SANDBOX, AUTO_HEIGHT_MESSAGE_TYPE as HTML_PREVIEW_RESIZE_MESSAGE, Header, Highlighter, Hotkey, HotkeyInput, HtmlPreview, HtmlPreviewIframe, I18nProvider, Icon, IconProvider, Image, ImageSelect, Input_default as Input, InputNumber_default as InputNumber, InputOTP, InputPassword_default as InputPassword, KeyMapEnum, LOBE_THEME_APP_ID, Layout, LayoutFooter, LayoutHeader, LayoutMain, LayoutSidebar, LayoutSidebarInner, LayoutToc, List, LobeThemeScript, I18nProvider as LobeUIProvider, Markdown, MaskShadow, MaterialFileTypeIcon, Mermaid, Modal, ModalBackdrop, ModalClose, ModalContent, ModalContext, ModalDescription, ModalFooter, ModalHeader, ModalHost, ModalPopup, ModalPortal, ModalRoot, ModalTitle, ModalTrigger, ModalViewport, MotionComponent, MotionProvider, Pagination, PatchDiff, Popover, PopoverArrow, PopoverArrowIcon, PopoverBackdrop, PopoverGroup, PopoverPopup, PopoverPortal, PopoverPositioner, PopoverProvider, PopoverRoot, PopoverTriggerElement, PopoverViewport, PreviewGroup, Progress, QRCode, Radio, RadioGroup, Rate, Result, ScrollArea, ScrollAreaContent, ScrollAreaCorner, ScrollAreaRoot, ScrollAreaScrollbar, ScrollAreaThumb, ScrollAreaViewport, ScrollShadow, SearchBar, SearchResultCards, Segmented, SegmentedIndicator, SegmentedItem, SegmentedItemIcon, SegmentedItemLabel, SegmentedRoot, Select, SelectArrow, SelectBackdrop, SelectGroup, SelectGroupLabel, SelectIcon, SelectItem, SelectItemIndicator, SelectItemText, SelectList, SelectPopup, SelectPortal, SelectPositioner, SelectRoot, SelectScrollDownArrow, SelectScrollUpArrow, SelectSeparator, SelectTrigger, SelectValue, lobe_theme_default as ShikiLobeTheme, SideNav, Skeleton, SkeletonAvatar, SkeletonText, Slider, SliderWithInput, Snippet, SortableList, Spin, SplitButton, Statistic, Steps, Switch, SwitchIcon, SwitchRoot, SwitchThumb, SyntaxHighlighter, SyntaxMermaid, Table, TableBody, TableCell, TableColGroup, TableContainer, TableElement, TableExpandedRow, TableFooter, TableHeader, TableHeaderCell, TableRoot, TableRow, TableScroll, TableSummaryFoot, TableTitle, Tabs, TabsIndicator, TabsList, TabsPanel, TabsRoot, TabsTab, Tag, Text, TextArea_default as TextArea, ThemeScope, ToastHost, ToggleGroup, ToggleGroupItem, ToggleGroupItemIcon, ToggleGroupItemLabel, ToggleGroupRoot, Tooltip, TooltipGroup, Tree, Typography, Upload, UploadDragger, Video, accordionStyles, actionIconStyles, alertStyles, styles as autoCompleteStyles, backdropTransition, buttonPaddingInline, buttonStyles, checkboxStyles, closeContextMenu, colorsPreset, colorsPresetSystem, combineKeys, conductCheck, confirmModal, controlHeight, copyToClipboard, createGlobalStyle, createLobeToken, createModal, createModalSystem, createPickerLocale, createStaticStyles, css, cssVar, cx, datePickerLocaleEnUS, datePickerLocaleZhCN, drawerBackdropTransition, extractStaticStyle, findCustomThemeName, flattenVisible, focusScopeItem, styles$1 as focusScopeStyles, formatStatisticValue, genCdnUrl, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, generatePicker, getActiveScopeId, getAllKeys, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getDrawerMotionConfig, getFloatingCollisionPadding, getGlobalCss, getItemKey, getItemLabel, getLastFocusedItem, getThemeCss, hasAnyIcon, hasCheckboxAndIcon, highlighterThemes, containsScript as htmlPreviewContainsScript, injectGlobal, inputClassNames as inputStyles, rootVariants as inputVariants, installGlobalFocusRing, isCustomNeutralColor, isCustomPrimaryColor, isFullHtmlDocument, isHtmlContentClosed, keyframes, staticStylish as lobeStaticStylish, styles$2 as menuSharedStyles, mermaidThemes, modalMotionConfig, neutralColors, neutralColorsSwatches, notifyScopeItemFocus, parseTrigger, placementMap, preprocessMarkdownContent, presetColors, presetSystemColors, preventDefault, preventDefaultAndStopPropagation, primaryColors, primaryColorsSwatches, radioStyles, registerLobeNeutral, registerLobePalette, registerScope, rehypeCustomFootnotes, rehypeKatexDir, rehypeStreamAnimated, remarkBr, remarkColor, remarkCustomFootnotes, remarkGfmPlus, remarkVideo, renderDropdownMenuItems, renderIcon, responsive, setActiveScope, setContextMenuInterceptor, setFloatingCollisionPadding, setLastFocusedItem, setLobeTheme, showContextMenu, sliderStyles, stopPropagation, switchStyles, tabsStyles, groupStyles as textGroupStyles, textStyles, variants as textVariants, toFloatingUIPlacement, toast, toggleGroupStyles, styles$3 as treeStyles, updateContextMenuItems, useAccordionContext, useActiveScopeId, useAppElement, useCdnFn, useDirection, useDraggablePanelContext, useDrawerActions, useDrawerOpen, useFocusScopeActive, useFocusScopeId, useFormContext, useImagePreview, useModalActions, useModalContext, useModalOpen, useMotionComponent, usePopoverContext, usePopoverGroupHandle, usePopoverPortalContainer, useResponsive, useScopeArrowNav, useScopeSwitcher, useSwitchContext, useTabsContext, useTheme, useThemeMode, useToast, useTranslation, useVideo, useVideoPlayer, useVideoState };
@@ -1,4 +1,5 @@
1
1
  import { NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./customTheme.mjs";
2
+ import { CustomNeutralColor, LobeNeutralColor, LobeNeutralScale, generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from "./theme/customNeutral.mjs";
2
3
  import { CustomPrimaryColor, LobePrimaryColor, isCustomPrimaryColor } from "./theme/customPrimary.mjs";
3
4
  import { CreateLobeTokenParams, LobeToken, createLobeToken } from "./theme/createLobeToken.mjs";
4
5
  import { LobeAppearance, LobeTheme, LobeThemeScript, LobeThemeScriptProps, LobeThemeState, ResponsiveState, ThemeScope, ThemeScopeProps, setLobeTheme, useResponsive, useTheme, useThemeMode } from "./theme/scope.mjs";
@@ -7,5 +8,5 @@ import { LobeCssVar, StaticStyleExtract, StaticStyleUtils, createStaticStyles, c
7
8
  import { LobeStatusPalette, registerLobePalette } from "./theme/customPalette.mjs";
8
9
  import { staticStylish } from "./theme/customStylishStatic.mjs";
9
10
  import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
10
- import { getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
11
- export { type CreateLobeTokenParams, type CustomPrimaryColor, type LobeAppearance, type LobeCssVar, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, type ResponsiveState, type StaticStyleExtract, type StaticStyleUtils, ThemeScope, type ThemeScopeProps, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
11
+ import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
12
+ export { type CreateLobeTokenParams, type CustomNeutralColor, type CustomPrimaryColor, type LobeAppearance, type LobeCssVar, type LobeNeutralColor, type LobeNeutralScale, type LobePrimaryColor, type LobeStatusPalette, type LobeTheme, LobeThemeScript, type LobeThemeScriptProps, type LobeThemeState, type LobeToken, NeutralColors, NeutralColorsObj, PrimaryColors, PrimaryColorsObj, type ResponsiveState, type StaticStyleExtract, type StaticStyleUtils, ThemeScope, type ThemeScopeProps, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
@@ -1,11 +1,12 @@
1
1
  import { registerLobePalette } from "./theme/customPalette.mjs";
2
+ import { generateNeutralScale, isCustomNeutralColor, registerLobeNeutral } from "./theme/customNeutral.mjs";
2
3
  import { generateColorNeutralPalette, generateColorPalette } from "./theme/generateColorPalette.mjs";
3
4
  import { findCustomThemeName, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches } from "./customTheme.mjs";
4
5
  import { isCustomPrimaryColor } from "./theme/customPrimary.mjs";
5
6
  import { createLobeToken } from "./theme/createLobeToken.mjs";
6
7
  import { createStaticStyles, css, cssVar, cx, extractStaticStyle, injectGlobal, keyframes, responsive } from "./css.mjs";
7
- import { getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
8
+ import { getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss } from "./theme/themeCss.mjs";
8
9
  import { LobeThemeScript, ThemeScope, setLobeTheme, useResponsive, useTheme, useThemeMode } from "./theme/scope.mjs";
9
10
  import { createGlobalStyle } from "./createGlobalStyle.mjs";
10
11
  import { staticStylish } from "./theme/customStylishStatic.mjs";
11
- export { LobeThemeScript, ThemeScope, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
12
+ export { LobeThemeScript, ThemeScope, createGlobalStyle, createLobeToken, createStaticStyles, css, cssVar, cx, extractStaticStyle, findCustomThemeName, generateColorNeutralPalette, generateColorPalette, generateNeutralScale, getCustomNeutralCss, getCustomPaletteCss, getCustomPrimaryCss, getGlobalCss, getThemeCss, injectGlobal, isCustomNeutralColor, isCustomPrimaryColor, keyframes, staticStylish as lobeStaticStylish, neutralColors, neutralColorsSwatches, primaryColors, primaryColorsSwatches, registerLobeNeutral, registerLobePalette, responsive, setLobeTheme, useResponsive, useTheme, useThemeMode };
@@ -1,9 +1,9 @@
1
- import { NeutralColors } from "../customTheme.mjs";
1
+ import { LobeNeutralColor } from "./customNeutral.mjs";
2
2
  import { LobePrimaryColor } from "./customPrimary.mjs";
3
3
  //#region src/styles/theme/createLobeToken.d.ts
4
4
  export interface CreateLobeTokenParams {
5
5
  appearance: 'light' | 'dark';
6
- neutralColor?: NeutralColors;
6
+ neutralColor?: LobeNeutralColor;
7
7
  palette?: string;
8
8
  primaryColor?: LobePrimaryColor;
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"createLobeToken.mjs","names":[],"sources":["../../../src/styles/theme/createLobeToken.ts"],"sourcesContent":["import type { NeutralColors } from '../customTheme';\nimport { resolveStatusScales } from './customPalette';\nimport type { LobePrimaryColor } from './customPrimary';\nimport { createNeutralToken } from './token/neutral';\nimport { createPaletteToken } from './token/palette';\nimport { createPrimaryToken } from './token/primary';\nimport { staticToken } from './token/static';\n\nexport interface CreateLobeTokenParams {\n appearance: 'light' | 'dark';\n neutralColor?: NeutralColors;\n palette?: string;\n primaryColor?: LobePrimaryColor;\n}\n\nexport const createLobeTokenGroups = ({\n appearance,\n neutralColor,\n palette: paletteName,\n primaryColor,\n}: CreateLobeTokenParams) => {\n const palette = createPaletteToken(appearance, resolveStatusScales(paletteName));\n\n return {\n neutral: createNeutralToken(appearance, neutralColor, palette),\n palette,\n primary: createPrimaryToken(appearance, primaryColor),\n static: staticToken,\n };\n};\n\nexport type LobeTokenGroups = ReturnType<typeof createLobeTokenGroups>;\n\nexport type LobeToken = LobeTokenGroups['static'] &\n LobeTokenGroups['palette'] &\n LobeTokenGroups['primary'] &\n LobeTokenGroups['neutral'];\n\nexport const createLobeToken = (params: CreateLobeTokenParams): LobeToken => {\n const groups = createLobeTokenGroups(params);\n\n return { ...groups.static, ...groups.palette, ...groups.primary, ...groups.neutral };\n};\n"],"mappings":";;;;;;AAeA,MAAa,yBAAyB,EACpC,YACA,cACA,SAAS,aACT,mBAC2B;CAC3B,MAAM,UAAU,mBAAmB,YAAY,oBAAoB,WAAW,CAAC;CAE/E,OAAO;EACL,SAAS,mBAAmB,YAAY,cAAc,OAAO;EAC7D;EACA,SAAS,mBAAmB,YAAY,YAAY;EACpD,QAAQ;CACV;AACF;AASA,MAAa,mBAAmB,WAA6C;CAC3E,MAAM,SAAS,sBAAsB,MAAM;CAE3C,OAAO;EAAE,GAAG,OAAO;EAAQ,GAAG,OAAO;EAAS,GAAG,OAAO;EAAS,GAAG,OAAO;CAAQ;AACrF"}
1
+ {"version":3,"file":"createLobeToken.mjs","names":[],"sources":["../../../src/styles/theme/createLobeToken.ts"],"sourcesContent":["import type { LobeNeutralColor } from './customNeutral';\nimport { resolveStatusScales } from './customPalette';\nimport type { LobePrimaryColor } from './customPrimary';\nimport { createNeutralToken } from './token/neutral';\nimport { createPaletteToken } from './token/palette';\nimport { createPrimaryToken } from './token/primary';\nimport { staticToken } from './token/static';\n\nexport interface CreateLobeTokenParams {\n appearance: 'light' | 'dark';\n neutralColor?: LobeNeutralColor;\n palette?: string;\n primaryColor?: LobePrimaryColor;\n}\n\nexport const createLobeTokenGroups = ({\n appearance,\n neutralColor,\n palette: paletteName,\n primaryColor,\n}: CreateLobeTokenParams) => {\n const palette = createPaletteToken(appearance, resolveStatusScales(paletteName));\n\n return {\n neutral: createNeutralToken(appearance, neutralColor, palette),\n palette,\n primary: createPrimaryToken(appearance, primaryColor),\n static: staticToken,\n };\n};\n\nexport type LobeTokenGroups = ReturnType<typeof createLobeTokenGroups>;\n\nexport type LobeToken = LobeTokenGroups['static'] &\n LobeTokenGroups['palette'] &\n LobeTokenGroups['primary'] &\n LobeTokenGroups['neutral'];\n\nexport const createLobeToken = (params: CreateLobeTokenParams): LobeToken => {\n const groups = createLobeTokenGroups(params);\n\n return { ...groups.static, ...groups.palette, ...groups.primary, ...groups.neutral };\n};\n"],"mappings":";;;;;;AAeA,MAAa,yBAAyB,EACpC,YACA,cACA,SAAS,aACT,mBAC2B;CAC3B,MAAM,UAAU,mBAAmB,YAAY,oBAAoB,WAAW,CAAC;CAE/E,OAAO;EACL,SAAS,mBAAmB,YAAY,cAAc,OAAO;EAC7D;EACA,SAAS,mBAAmB,YAAY,YAAY;EACpD,QAAQ;CACV;AACF;AASA,MAAa,mBAAmB,WAA6C;CAC3E,MAAM,SAAS,sBAAsB,MAAM;CAE3C,OAAO;EAAE,GAAG,OAAO;EAAQ,GAAG,OAAO;EAAS,GAAG,OAAO;EAAS,GAAG,OAAO;CAAQ;AACrF"}
@@ -0,0 +1,28 @@
1
+ import { ColorScaleItem } from "../../color/types.mjs";
2
+ import { NeutralColors } from "../customTheme.mjs";
3
+ import { NeutralTextLadder } from "./token/neutralText.mjs";
4
+ //#region src/styles/theme/customNeutral.d.ts
5
+ /** Any 6-digit hex: tints the default gray ladder with its hue and chroma. */
6
+ export type CustomNeutralColor = `#${string}`;
7
+ /** A preset, a 6-digit hex, or a name registered with `registerLobeNeutral`. */
8
+ export type LobeNeutralColor = NeutralColors | CustomNeutralColor | (string & {});
9
+ export interface LobeNeutralScale {
10
+ /** Full 13-step scale (light / dark solid + alpha), same shape as the presets. */
11
+ scale: ColorScaleItem;
12
+ /** Text ladder [text, secondary, tertiary, quaternary]; defaults to the scale's steps 12/10/8/6. */
13
+ text?: Partial<NeutralTextLadder>;
14
+ }
15
+ export interface ResolvedNeutral {
16
+ scale: ColorScaleItem;
17
+ text: NeutralTextLadder;
18
+ }
19
+ export declare const isCustomNeutralColor: (value?: string) => value is CustomNeutralColor;
20
+ /**
21
+ * Register a full custom neutral scale under `name`, then select it with
22
+ * `setLobeTheme({ neutralColor: name })` / `ThemeScope` / `LobeThemeScript`.
23
+ */
24
+ export declare const registerLobeNeutral: (name: string, neutral: LobeNeutralScale | ColorScaleItem) => void;
25
+ /** Same construction as the presets: the gray ladder's lightness, retinted to the hex's hue. */
26
+ export declare const generateNeutralScale: (color: CustomNeutralColor) => ResolvedNeutral;
27
+ //#endregion
28
+ //# sourceMappingURL=customNeutral.d.mts.map