@yamada-ui/react 2.2.1-dev-20260511183442 → 2.2.1-dev-20260511183728

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 (52) hide show
  1. package/dist/cjs/components/number-input/number-input.cjs +1 -4
  2. package/dist/cjs/components/number-input/number-input.cjs.map +1 -1
  3. package/dist/cjs/components/sidebar/sidebar.cjs +1 -4
  4. package/dist/cjs/components/sidebar/sidebar.cjs.map +1 -1
  5. package/dist/cjs/components/tree/tree.cjs +6 -20
  6. package/dist/cjs/components/tree/tree.cjs.map +1 -1
  7. package/dist/esm/components/number-input/number-input.js +1 -4
  8. package/dist/esm/components/number-input/number-input.js.map +1 -1
  9. package/dist/esm/components/sidebar/sidebar.js +1 -4
  10. package/dist/esm/components/sidebar/sidebar.js.map +1 -1
  11. package/dist/esm/components/tree/tree.js +6 -20
  12. package/dist/esm/components/tree/tree.js.map +1 -1
  13. package/dist/types/components/accordion/accordion.style.d.ts +1 -1
  14. package/dist/types/components/alert/alert.style.d.ts +1 -1
  15. package/dist/types/components/autocomplete/autocomplete.style.d.ts +1 -1
  16. package/dist/types/components/avatar/avatar.d.ts +1 -1
  17. package/dist/types/components/breadcrumb/breadcrumb.style.d.ts +1 -1
  18. package/dist/types/components/calendar/calendar.style.d.ts +2 -2
  19. package/dist/types/components/carousel/carousel.style.d.ts +2 -2
  20. package/dist/types/components/chart/cartesian-chart.style.d.ts +1 -1
  21. package/dist/types/components/chart/polar-chart.style.d.ts +1 -1
  22. package/dist/types/components/checkbox/checkbox.d.ts +1 -1
  23. package/dist/types/components/checkbox-card/checkbox-card.d.ts +3 -3
  24. package/dist/types/components/checkbox-card/checkbox-card.style.d.ts +1 -1
  25. package/dist/types/components/data-list/data-list.style.d.ts +1 -1
  26. package/dist/types/components/dropzone/dropzone.d.ts +1 -1
  27. package/dist/types/components/dropzone/dropzone.style.d.ts +1 -1
  28. package/dist/types/components/empty-state/empty-state.style.d.ts +2 -2
  29. package/dist/types/components/flip/flip.d.ts +1 -1
  30. package/dist/types/components/flip/flip.style.d.ts +1 -1
  31. package/dist/types/components/form/form.style.d.ts +1 -1
  32. package/dist/types/components/icon/icon.d.ts +2 -2
  33. package/dist/types/components/list/list.style.d.ts +2 -2
  34. package/dist/types/components/loading/loading.d.ts +1 -1
  35. package/dist/types/components/native-accordion/native-accordion.style.d.ts +2 -2
  36. package/dist/types/components/notice/notice.style.d.ts +1 -1
  37. package/dist/types/components/pagination/pagination.style.d.ts +1 -1
  38. package/dist/types/components/radio/radio.d.ts +1 -1
  39. package/dist/types/components/radio-card/radio-card.d.ts +3 -3
  40. package/dist/types/components/radio-card/radio-card.style.d.ts +1 -1
  41. package/dist/types/components/rating/rating.style.d.ts +2 -2
  42. package/dist/types/components/reorder/reorder.style.d.ts +1 -1
  43. package/dist/types/components/resizable/resizable.style.d.ts +2 -2
  44. package/dist/types/components/segmented-control/segmented-control.style.d.ts +2 -2
  45. package/dist/types/components/select/select.style.d.ts +1 -1
  46. package/dist/types/components/steps/steps.style.d.ts +1 -1
  47. package/dist/types/components/timeline/timeline.d.ts +1 -1
  48. package/dist/types/components/timeline/timeline.style.d.ts +1 -1
  49. package/dist/types/components/toggle/toggle.d.ts +1 -1
  50. package/dist/types/components/tree/tree.style.d.ts +1 -1
  51. package/dist/types/providers/i18n-provider/i18n-provider.d.ts +1 -1
  52. package/package.json +2 -2
@@ -1 +1 @@
1
- {"version":3,"file":"sidebar.js","names":["createContext","Drawer.Root","Drawer.Content"],"sources":["../../../../src/components/sidebar/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren, ReactNode } from \"react\"\nimport type {\n Breakpoint,\n ExtractStyleValue,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { ReactNodeOrFunction } from \"../../utils\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type {\n UseSidebarGroupProps,\n UseSidebarGroupReturn,\n UseSidebarItemProps,\n UseSidebarItemReturn,\n UseSidebarProps,\n UseSidebarReturn,\n} from \"./use-sidebar\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport { useBreakpointValue } from \"../../hooks/use-breakpoint\"\nimport { useValue } from \"../../hooks/use-value\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n runIfFn,\n useIncludesChildren,\n useSplitChildren,\n useValidChildren,\n} from \"../../utils\"\nimport { Collapse } from \"../collapse\"\nimport { Drawer } from \"../drawer\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { Tooltip, type TooltipProps } from \"../tooltip\"\nimport { sidebarStyle, type SidebarStyle } from \"./sidebar.style\"\nimport {\n SidebarContext,\n SidebarDescendantsContext,\n SidebarItemContext,\n useSidebar,\n useSidebarContext,\n useSidebarGroup,\n useSidebarItem,\n} from \"./use-sidebar\"\n\ninterface SidebarItemCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype SidebarItemReactNode =\n | ReactNodeOrFunction<SidebarItemCallBackProps>\n | {\n group: ReactNodeOrFunction<SidebarItemCallBackProps>\n item?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<SidebarItemCallBackProps>\n group?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n\ninterface SidebarItemSharedRenderProps\n extends\n Pick<SidebarItemProps, \"label\">,\n Pick<\n UseSidebarItemReturn,\n | \"expanded\"\n | \"expandedValue\"\n | \"onExpandedChange\"\n | \"onSelectedChange\"\n | \"selected\"\n | \"selectedValue\"\n | \"value\"\n > {\n itemProps: HTMLStyledProps<\"li\">\n linkProps: HTMLStyledProps<\"a\">\n triggerProps: HTMLStyledProps<\"button\">\n endElement?: ReactNode\n startElement?: ReactNode\n}\n\ninterface SidebarItemRenderProps\n extends\n PropsWithChildren,\n Omit<SidebarItemSharedRenderProps, \"endElement\" | \"startElement\">,\n Pick<\n UseSidebarItemReturn,\n | \"group\"\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n endElement: { group?: ReactNode; item?: ReactNode }\n startElement: { group?: ReactNode; item?: ReactNode }\n indicator?: ReactNode\n link?: ReactNode\n trigger?: ReactNode\n}\n\ninterface SidebarItemLinkRenderProps extends Omit<\n SidebarItemSharedRenderProps,\n \"itemProps\" | \"triggerProps\"\n> {}\n\ninterface SidebarItemTriggerRenderProps\n extends\n Omit<SidebarItemSharedRenderProps, \"itemProps\" | \"linkProps\">,\n Pick<\n UseSidebarItemReturn,\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n indicator?: ReactNode\n}\n\ninterface SidebarItemRender {\n item?: ReactNodeOrFunction<SidebarItemRenderProps>\n link?: ReactNodeOrFunction<SidebarItemLinkRenderProps>\n trigger?: ReactNodeOrFunction<SidebarItemTriggerRenderProps>\n}\n\ninterface SidebarGroup extends Omit<SidebarGroupProps, \"children\" | \"value\"> {\n children: SidebarItemWithValue[]\n group: true\n}\n\nexport interface SidebarItemWithValue extends Omit<\n SidebarItemProps,\n \"children\"\n> {\n children?: SidebarItemWithValue[]\n}\n\nexport type SidebarItem = SidebarGroup | SidebarItemWithValue\n\nconst createKey = (props: SidebarItem, index: number) => {\n return \"value\" in props ? props.value || index : index\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: SidebarItemReactNode,\n root?: SidebarItemReactNode,\n): ReactNodeOrFunction<SidebarItemCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom)) {\n return custom[type]\n } else if (custom) {\n return custom\n } else if (isObject(root) && (\"group\" in root || \"item\" in root)) {\n return root[type]\n } else {\n return root\n }\n}\n\ninterface ComponentContext extends Pick<\n UseSidebarReturn,\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getSidePanelProps\"\n | \"getTriggerProps\"\n> {\n breakpoint: ExtractStyleValue<NonNullable<SidebarRootProps[\"breakpoint\"]>>\n mode: ExtractStyleValue<NonNullable<SidebarRootProps[\"mode\"]>>\n placement: ExtractStyleValue<NonNullable<SidebarRootProps[\"placement\"]>>\n}\n\ninterface GroupComponentContext\n extends\n Pick<SidebarGroupProps, \"contentProps\" | \"labelProps\">,\n Pick<UseSidebarGroupReturn, \"getContentProps\" | \"getLabelProps\"> {}\n\nconst [GroupComponentContext, useGroupComponentContext] =\n createContext<GroupComponentContext>({ name: \"GroupComponentContext\" })\n\ninterface ItemComponentContext {\n contentProps: SidebarItemContentProps\n endElementProps: SidebarItemEndElementProps\n indicatorProps: SidebarItemIndicatorProps\n labelProps: SidebarItemLabelProps\n startElementProps: SidebarItemStartElementProps\n tooltipProps: SidebarItemTooltipProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\ninterface SidePanelComponentContext extends Pick<\n SidebarSidePanelProps,\n | \"animated\"\n | \"contentProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"footerProps\"\n | \"groupContentProps\"\n | \"groupProps\"\n | \"handleProps\"\n | \"headerProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemContentProps\"\n | \"itemProps\"\n | \"items\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"menuProps\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n> {}\n\nconst [SidePanelComponentContext, useSidePanelComponentContext] =\n createContext<SidePanelComponentContext>({\n name: \"SidePanelComponentContext\",\n })\n\nexport interface SidebarRootProps\n extends\n HTMLStyledProps<\"div\">,\n ThemeProps<SidebarStyle>,\n Omit<UseSidebarProps, \"mobile\"> {\n /**\n * The breakpoint to use for the sidebar. If `false`, the sidebar will be always visible.\n *\n * @default 'md'\n */\n breakpoint?: Exclude<Breakpoint, \"base\"> | false\n}\n\nconst {\n ComponentContext,\n PropsContext: SidebarPropsContext,\n useComponentContext,\n usePropsContext: useSidebarPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SidebarRootProps, SidebarStyle, ComponentContext>(\n \"sidebar\",\n sidebarStyle,\n)\n\nexport { SidebarPropsContext, useSidebarPropsContext }\n\n/**\n * `Sidebar` is a component that is used to display a list of items in a sidebar.\n *\n * @see https://yamada-ui.com/docs/components/sidebar\n */\nexport const SidebarRoot = withProvider<\n \"div\",\n SidebarRootProps,\n \"mode\" | \"placement\"\n>(\n ({\n breakpoint = \"md\",\n mode: modeProp = \"offcanvas\",\n placement: placementProp = \"start\",\n ...rest\n }) => {\n const mobile =\n useBreakpointValue<boolean | undefined>(\n breakpoint ? { [breakpoint]: true } : { base: false },\n ) ?? false\n const mode = useValue(modeProp)\n const placement = useValue(placementProp)\n const {\n descendants,\n expandedValue,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n } = useSidebar({ mobile, ...rest })\n const context = useMemo(\n () => ({\n expandedValue,\n mobile,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }),\n [\n mobile,\n expandedValue,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n ],\n )\n const componentContext = useMemo(\n () => ({\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n }),\n [\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n ],\n )\n\n return (\n <SidebarDescendantsContext value={descendants}>\n <SidebarContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div data-group {...getRootProps()} />\n </ComponentContext>\n </SidebarContext>\n </SidebarDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"mode\", \"placement\"] },\n)()\n\nexport interface SidebarMainPanelProps extends HTMLStyledProps {}\n\nexport const SidebarMainPanel = withContext<\"div\", SidebarMainPanelProps>(\n \"div\",\n \"mainPanel\",\n)()\n\nexport interface SidebarTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarTrigger = withContext<\"button\", SidebarTriggerProps>(\n \"button\",\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return { asChild: true, ...getTriggerProps(props) }\n})\n\nexport interface SidebarSidePanelProps\n extends\n Omit<HTMLStyledProps<\"aside\">, \"content\">,\n Pick<SidebarContentProps, \"items\">,\n Pick<\n SidebarItemProps,\n | \"animated\"\n | \"endElement\"\n | \"endElementProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n > {\n /**\n * The content of the sidebar.\n */\n content?: ReactNode\n /**\n * The footer of the sidebar.\n */\n footer?: ReactNode\n /**\n * The header of the sidebar.\n */\n header?: ReactNode\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If `true`, the sidebar will be rendered with a handle.\n *\n * @default true\n */\n withHandle?: boolean\n /**\n * Props for the content component.\n */\n contentProps?: SidebarContentProps\n /**\n * Props for the drawer component.\n */\n drawerProps?: Omit<\n Drawer.RootProps,\n | \"body\"\n | \"cancel\"\n | \"children\"\n | \"footer\"\n | \"header\"\n | \"middle\"\n | \"onCancel\"\n | \"onClose\"\n | \"onMiddle\"\n | \"onOpen\"\n | \"onSuccess\"\n | \"open\"\n | \"success\"\n | \"title\"\n | \"trigger\"\n >\n /**\n * Props for the footer component.\n */\n footerProps?: SidebarFooterProps\n /**\n * Props for the group content component.\n */\n groupContentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the group component.\n */\n groupProps?: Omit<SidebarGroupProps, \"children\" | \"label\" | \"value\">\n /**\n * Props for the handle component.\n */\n handleProps?: SidebarHandleProps\n /**\n * Props for the header component.\n */\n headerProps?: SidebarHeaderProps\n /**\n * Props for the item content component.\n */\n itemContentProps?: SidebarItemContentProps\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n SidebarItemProps,\n \"children\" | \"items\" | \"label\" | \"open\" | \"value\"\n >\n /**\n * Props for the menu component.\n *\n * @default 'md'\n */\n menuProps?: SidebarMenuProps\n}\n\nexport const SidebarSidePanel = withContext<\"aside\", SidebarSidePanelProps>(\n ({\n animated = true,\n children,\n content,\n endElement,\n footer,\n header,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n withHandle = true,\n contentProps,\n drawerProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mobile, open, onClose } = useSidebarContext()\n const { breakpoint, placement, getSidePanelProps } = useComponentContext()\n const [\n omittedChildren,\n customHeader,\n customContent,\n customFooter,\n customHandle,\n ] = useSplitChildren(\n children,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarHandle,\n )\n const context = useMemo(\n () => ({\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n }),\n [\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n render,\n loadingScheme,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ],\n )\n\n return (\n <SidePanelComponentContext value={context}>\n {mobile ? (\n <Drawer.Root\n size=\"sm\"\n autoFocus={false}\n duration={!animated ? 0 : undefined}\n open={open}\n placement={`inline-${placement}`}\n withCloseButton={false}\n portalProps={{ disabled: true }}\n onClose={onClose}\n {...drawerProps}\n >\n <Drawer.Content>\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n </Drawer.Content>\n </Drawer.Root>\n ) : (\n <>\n <SidebarGap\n data-animated={dataAttr(animated)}\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n />\n\n <styled.aside\n data-animated={dataAttr(animated)}\n data-group\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n {...getSidePanelProps(rest)}\n >\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n {customHandle ?? (withHandle ? <SidebarHandle /> : null)}\n\n {omittedChildren}\n </styled.aside>\n </>\n )}\n </SidePanelComponentContext>\n )\n },\n \"sidePanel\",\n)()\n\ninterface SidebarGapProps extends HTMLStyledProps<\"div\"> {}\n\nconst SidebarGap = withContext<\"div\", SidebarGapProps>(\"div\", \"gap\")()\n\nexport interface SidebarHeaderProps extends HTMLStyledProps<\"header\"> {}\n\nexport const SidebarHeader = withContext<\"header\", SidebarHeaderProps>(\n \"header\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n const { headerProps } = useSidePanelComponentContext()\n\n return getHeaderProps(mergeProps(headerProps, props)())\n})\n\nexport interface SidebarFooterProps extends HTMLStyledProps<\"footer\"> {}\n\nexport const SidebarFooter = withContext<\"footer\", SidebarFooterProps>(\n \"footer\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext()\n const { footerProps } = useSidePanelComponentContext()\n\n return getFooterProps(mergeProps(footerProps, props)())\n})\n\nexport interface SidebarContentProps extends HTMLStyledProps<\"ul\"> {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItem[]\n}\n\nexport const SidebarContent = withContext<\"ul\", SidebarContentProps>(\n ({ children, items, ...rest }) => {\n const { getContentProps } = useComponentContext()\n const { items: rootItems, contentProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (items ?? rootItems)?.map((props, index) => {\n const key = createKey(props, index)\n\n if (\"group\" in props) {\n const { children, group: _, ...rest } = props\n\n return <SidebarGroup key={key} items={children} {...rest} />\n } else {\n const { children, ...rest } = props\n\n return <SidebarItem key={key} items={children} {...rest} />\n }\n })\n }, [children, items, rootItems])\n\n return (\n <styled.ul {...getContentProps(mergeProps(contentProps, rest)())}>\n {computedChildren}\n </styled.ul>\n )\n },\n \"content\",\n)()\n\nexport interface SidebarHandleProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarHandle = withContext<\"button\", SidebarHandleProps>(\n (props) => {\n const { handleProps } = useSidePanelComponentContext()\n\n return (\n <SidebarTrigger {...mergeProps(handleProps, props)()}>\n <styled.button tabIndex={-1} />\n </SidebarTrigger>\n )\n },\n \"handle\",\n)()\n\nexport interface SidebarGroupProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"content\" | \"value\">,\n UseSidebarGroupProps {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the label component.\n */\n labelProps?: HTMLStyledProps<\"span\">\n}\n\nexport const SidebarGroup = withContext<\"li\", SidebarGroupProps>(\n ({\n children,\n items,\n label,\n value: valueProp = isString(label) ? label : undefined,\n contentProps,\n labelProps,\n ...rest\n }) => {\n const { groupProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [children, items])\n const [omittedChildren, customLabel, customContent] = useSplitChildren(\n computedChildren,\n SidebarGroupLabel,\n SidebarGroupContent,\n )\n const { getContentProps, getLabelProps, getRootProps } = useSidebarGroup({\n ...mergeProps(groupProps, rest)(),\n value: valueProp,\n })\n const context = useMemo(\n () => ({ contentProps, getContentProps, getLabelProps, labelProps }),\n [getLabelProps, labelProps, getContentProps, contentProps],\n )\n\n return (\n <GroupComponentContext value={context}>\n <styled.li {...getRootProps()}>\n {customLabel ??\n (label ? <SidebarGroupLabel>{label}</SidebarGroupLabel> : null)}\n {customContent ?? (\n <SidebarGroupContent>{omittedChildren}</SidebarGroupContent>\n )}\n </styled.li>\n </GroupComponentContext>\n )\n },\n \"group\",\n)()\n\nexport interface SidebarGroupLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarGroupLabel = withContext<\"span\", SidebarGroupLabelProps>(\n \"span\",\n \"groupLabel\",\n)(undefined, (props) => {\n const { getLabelProps, labelProps } = useGroupComponentContext()\n\n return getLabelProps(mergeProps(labelProps, props)())\n})\n\nexport interface SidebarGroupContentProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarGroupContent = withContext<\"div\", SidebarGroupContentProps>(\n \"div\",\n \"groupContent\",\n)(undefined, ({ children, ...rest }) => {\n const validChildren = useValidChildren(children)\n const list = useIncludesChildren(validChildren, SidebarItem)\n const { groupContentProps } = useSidePanelComponentContext()\n const { contentProps, getContentProps } = useGroupComponentContext()\n\n return {\n as: list ? \"ul\" : \"div\",\n children,\n ...getContentProps(mergeProps(groupContentProps, contentProps, rest)()),\n }\n})\n\nexport interface SidebarMenuProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarMenu = withContext<\"div\", SidebarMenuProps>(\"div\", \"menu\")(\n undefined,\n (props) => {\n const { menuProps } = useSidePanelComponentContext()\n\n return { \"data-menu\": \"\", ...mergeProps(menuProps, props)() }\n },\n)\n\nexport interface SidebarMenuButtonProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarMenuButton = withContext<\"button\", SidebarMenuButtonProps>(\n \"button\",\n [\"menu\", \"button\"],\n)(undefined, (props) => {\n const { open } = useSidebarContext()\n const { mode } = useComponentContext()\n const { menuProps } = useSidePanelComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const { disabled, ...rest } = mergeProps(menuProps, props)()\n\n return {\n \"data-menu\": \"\",\n disabled,\n ...rest,\n tabIndex: (!offcanvas || open) && !disabled ? 0 : -1,\n }\n})\n\nexport interface SidebarItemProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"value\">,\n Omit<UseSidebarItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the sidebar item will be animated.\n *\n * @default true\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: SidebarItemReactNode\n /**\n * The sidebar item indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<SidebarItemCallBackProps>\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * If provided, the sidebar item will be rendered with custom components.\n */\n render?: SidebarItemRender\n /**\n * The element to display at the start of the item.\n */\n startElement?: SidebarItemReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarItemContentProps, \"children\">\n /**\n * Props for the end component.\n */\n endElementProps?: SidebarItemEndElementProps\n /**\n * Props for the indicator component.\n */\n indicatorProps?: SidebarItemIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: SidebarItemLabelProps\n /**\n * Props for the link component.\n */\n linkProps?: SidebarItemLinkProps\n /**\n * Props for the start component.\n */\n startElementProps?: SidebarItemStartElementProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: Omit<SidebarItemTooltipProps, \"children\" | \"content\">\n /**\n * Props for the trigger component.\n */\n triggerProps?: SidebarItemTriggerProps\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<SidebarItemWithValue[]>\n}\n\nexport const SidebarItem = withContext<\"li\", SidebarItemProps>(\n ({\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n children: childrenProp,\n endElement,\n indicator: indicatorProp,\n items,\n label,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n indicatorProps,\n labelProps,\n linkProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mode } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const componentContext = useSidePanelComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const computedChildren = useMemo(() => {\n if (childrenProp) return childrenProp\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [childrenProp, items])\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n } = useSidebarItem({\n ...mergeProps(componentContext.itemProps, rest)(),\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n children: computedChildren,\n })\n const animated = animatedProp ?? componentContext.animated ?? true\n const tabIndex = offcanvas\n ? open && expanded && !disabled\n ? 0\n : -1\n : expanded && !disabled\n ? 0\n : -1\n const callbackProps = useMemo(\n () => ({ disabled, expanded: groupOpen }),\n [disabled, groupOpen],\n )\n const mergedTriggerProps = useMemo(() => {\n return getTriggerProps({\n tabIndex,\n ...mergeProps(componentContext.triggerProps, triggerProps)(),\n }) as SidebarItemTriggerProps\n }, [getTriggerProps, tabIndex, componentContext.triggerProps, triggerProps])\n const mergedLinkProps = useMemo(() => {\n return getLinkProps({\n tabIndex,\n ...mergeProps(componentContext.linkProps, linkProps)(),\n }) as SidebarItemLinkProps\n }, [getLinkProps, tabIndex, componentContext.linkProps, linkProps])\n const indicator = useMemo<ReactNode>(\n () => runIfFn(indicatorProp ?? componentContext.indicator, callbackProps),\n [indicatorProp, componentContext.indicator, callbackProps],\n )\n const groupStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const groupEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const itemStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const itemEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const trigger = useMemo<ReactNode>(\n () =>\n runIfFn(render?.trigger ?? componentContext.render?.trigger, {\n endElement: groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n startElement: groupStartElement,\n value,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.trigger,\n componentContext.render?.trigger,\n groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n groupStartElement,\n value,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const link = useMemo<ReactNode>(\n () =>\n runIfFn(render?.link ?? componentContext.render?.link, {\n endElement: itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n startElement: itemStartElement,\n value,\n linkProps: mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n }),\n [\n render?.link,\n componentContext.render?.link,\n itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n itemStartElement,\n value,\n mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const item = useMemo<ReactNode>(\n () =>\n runIfFn(render?.item ?? componentContext.render?.item, {\n children,\n endElement: { group: groupEndElement, item: itemEndElement },\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n startElement: { group: groupStartElement, item: itemStartElement },\n trigger,\n value,\n itemProps: getItemProps() as HTMLStyledProps<\"li\">,\n linkProps: mergedLinkProps,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.item,\n componentContext.render?.item,\n children,\n groupEndElement,\n itemEndElement,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n groupStartElement,\n itemStartElement,\n trigger,\n value,\n getItemProps,\n mergedLinkProps,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const context = useMemo(\n () => ({ branchOpen, groupOpen }),\n [branchOpen, groupOpen],\n )\n const itemComponentContext = useMemo(\n () => ({\n contentProps: {\n duration: !animated ? 0 : undefined,\n open: groupOpen,\n ...getContentProps(\n mergeProps(componentContext.itemContentProps, contentProps)(),\n ),\n },\n endElementProps: mergeProps(\n componentContext.endElementProps,\n endElementProps,\n )(),\n indicatorProps: getIndicatorProps({\n \"data-animated\": dataAttr(animated),\n ...mergeProps(componentContext.indicatorProps, indicatorProps)(),\n }) as SidebarItemIndicatorProps,\n labelProps: getLabelProps(\n mergeProps(componentContext.labelProps, labelProps)(),\n ) as SidebarItemLabelProps,\n startElementProps: mergeProps(\n componentContext.startElementProps,\n startElementProps,\n )(),\n tooltipProps: {\n content: label,\n disabled: open,\n ...mergeProps(componentContext.tooltipProps, tooltipProps)(),\n },\n }),\n [\n animated,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.itemContentProps,\n componentContext.labelProps,\n componentContext.startElementProps,\n componentContext.tooltipProps,\n contentProps,\n endElementProps,\n getContentProps,\n getIndicatorProps,\n getLabelProps,\n groupOpen,\n indicatorProps,\n label,\n labelProps,\n open,\n startElementProps,\n tooltipProps,\n ],\n )\n\n return (\n <SidebarItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {item ?? (\n <styled.li {...getItemProps()}>\n {group ? (\n <>\n {trigger ?? (\n <SidebarItemTrigger {...mergedTriggerProps}>\n {groupStartElement ? (\n <SidebarItemStartElement>\n {groupStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {groupEndElement ? (\n <SidebarItemEndElement>\n {groupEndElement}\n </SidebarItemEndElement>\n ) : null}\n <SidebarItemIndicator>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </SidebarItemIndicator>\n </SidebarItemTrigger>\n )}\n\n <SidebarItemContent>{children}</SidebarItemContent>\n </>\n ) : (\n (link ?? (\n <SidebarItemLink {...mergedLinkProps}>\n {itemStartElement ? (\n <SidebarItemStartElement>\n {itemStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {itemEndElement ? (\n <SidebarItemEndElement>\n {itemEndElement}\n </SidebarItemEndElement>\n ) : null}\n </SidebarItemLink>\n ))\n )}\n </styled.li>\n )}\n </ItemComponentContext>\n </SidebarItemContext>\n )\n },\n \"item\",\n)()\n\ninterface SidebarItemTooltipProps extends TooltipProps {}\n\nconst SidebarItemTooltip: FC<SidebarItemTooltipProps> = (props) => {\n const { tooltipProps } = useItemComponentContext()\n const { children, disabled, ...rest } = { ...tooltipProps, ...props }\n const { mode, placement } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n\n if (offcanvas || disabled) {\n return children\n } else {\n return (\n <Tooltip\n closeOnClick={false}\n gutter={16}\n placement={`center-${placement === \"start\" ? \"end\" : \"start\"}`}\n {...rest}\n >\n {children}\n </Tooltip>\n )\n }\n}\n\nexport interface SidebarItemTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarItemTrigger = withContext<\n \"button\",\n SidebarItemTriggerProps\n>((props) => {\n return (\n <SidebarItemTooltip>\n <styled.button {...props} />\n </SidebarItemTooltip>\n )\n}, \"itemTrigger\")()\n\nexport interface SidebarItemLinkProps extends HTMLStyledProps<\"a\"> {}\n\nexport const SidebarItemLink = withContext<\"a\", SidebarItemLinkProps>(\n (props) => {\n return (\n <SidebarItemTooltip>\n <styled.a {...props} />\n </SidebarItemTooltip>\n )\n },\n \"itemLink\",\n)()\n\nexport interface SidebarItemContentProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nexport const SidebarItemContent = withContext<\"ul\", SidebarItemContentProps>(\n (props) => {\n const { contentProps } = useItemComponentContext()\n\n return (\n <Collapse\n as=\"ul\"\n {...cast<CollapseProps>(mergeProps(contentProps, props)())}\n />\n )\n },\n \"itemContent\",\n)()\n\nexport interface SidebarItemIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nexport const SidebarItemIndicator = withContext<\n \"svg\",\n SidebarItemIndicatorProps\n>(({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useSidePanelComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n}, \"itemIndicator\")(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return mergeProps(indicatorProps, props)()\n})\n\nexport interface SidebarItemStartElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemStartElement = withContext<\n \"div\",\n SidebarItemStartElementProps\n>(\"div\", {\n name: \"ItemStartElement\",\n slot: [\"itemElement\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return mergeProps(startElementProps, props)()\n})\n\nexport interface SidebarItemEndElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemEndElement = withContext<\n \"div\",\n SidebarItemEndElementProps\n>(\"div\", {\n name: \"ItemEndElement\",\n slot: [\"itemElement\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return mergeProps(endElementProps, props)()\n})\n\nexport interface SidebarItemLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarItemLabel = withContext<\"span\", SidebarItemLabelProps>(\n \"span\",\n \"itemLabel\",\n)(undefined, (props) => {\n const { labelProps } = useItemComponentContext()\n\n return mergeProps(labelProps, props)()\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0JA,MAAM,aAAa,OAAoB,UAAkB;CACvD,OAA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KACA;KACA;KACA;KACA;KACA;KACA;KACD,CAM4C;cACvC,oBAAC,OAAO,KAAR;KAAY,cAAA;KAAW,GAAI,cAAc;KAAI,CAAA;IAC5B,CAAA;GACJ,CAAA;EACS,CAAA;GAGhC,QACA,EAAE,eAAe,CAAC,QAAQ,YAAY,EAAE,CACzC,EAAE;AAIH,MAAa,mBAAmB,YAC9B,OACA,YACD,EAAE;AAIH,MAAa,iBAAiB,YAC5B,UACA,UACD,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,oBAAoB,qBAAqB;CAEjD,OAAO;EAAE,SAAS;EAAM,GAAG,gBAAgB,MAAM;EAAE;EACnD;AA8GF,MAAa,mBAAmB,aAC7B,EACC,WAAW,MACX,UACA,SACA,YACA,QACA,QACA,WACA,iBACA,OACA,eACA,QACA,cACA,aAAa,MACb,cACA,aACA,iBACA,aACA,mBACA,YACA,aACA,aACA,gBACA,kBACA,WACA,YACA,WACA,WACA,mBACA,cACA,cACA,GAAG,WACC;CACJ,MAAM,EAAE,QAAQ,MAAM,YAAY,mBAAmB;CACrD,MAAM,EAAE,YAAY,WAAW,sBAAsB,qBAAqB;CAC1E,MAAM,CACJ,iBACA,cACA,eACA,cACA,gBACE,iBACF,UACA,eACA,gBACA,eACA,cACD;CAwDD,OACE,oBAAC,2BAAD;EAA2B,OAxDb,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAIwC;YACtC,SACC,oBAACC,YAAD;GACE,MAAK;GACL,WAAW;GACX,UAAU,CAAC,WAAW,IAAI,KAAA;GACpB;GACN,WAAW,UAAU;GACrB,iBAAiB;GACjB,aAAa,EAAE,UAAU,MAAM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;EAAc;EAAc,CAC7D;CACD,MAAM,iBAAiB,eAAA,GAAA,cAAA,SAGjB,uBACE,QACA,YACA,iBAAiB,WAClB,EACD,cACD,EACH;EAAC;EAAY,iBAAiB;EAAY;EAAc,CACzD;CACD,MAAM,UAAU,eAAA,GAAA,cAAA,SAEJ,QAAQ,WAAW,iBAAiB,QAAQ,SAAS;EAC3D,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CACD,MAAM,OAAO,eAAA,GAAA,cAAA,SAED,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,WAAW;EACX;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CACD,MAAM,OAAO,eAAA,GAAA,cAAA,SAED,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD;EACA,YAAY;GAAE,OAAO;GAAiB,MAAM;GAAgB;EAC5D;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;GAAE,OAAO;GAAmB,MAAM;GAAkB;EAClE;EACA;EACA,WAAW,cAAc;EACzB,WAAW;EACX,cAAc;EACd;EACA;EACA;EACA;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CA0DD,OACE,oBAAC,oBAAD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I,eAAiC,SAAS,EAC5C,OAAO,aAAa,UAAU;EAAE,GAAG;EAAM,GAAG,SAAS;EAAO,CAAC;CAE/D,OAAO,SAAS,MAAM,SAAS,GAAG,IAAI,SAAS,KAAK,KAAK,GAAG;GAC3D,gBAAgB,CAAC,KAAA,IAAY,UAAU;CACxC,MAAM,EAAE,mBAAmB,yBAAyB;CAEpD,OAAO,WAAW,gBAAgB,MAAM,EAAE;EAC1C;AAIF,MAAa,0BAA0B,YAGrC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,QAAQ;CAC/B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,sBAAsB,yBAAyB;CAEvD,OAAO,WAAW,mBAAmB,MAAM,EAAE;EAC7C;AAIF,MAAa,wBAAwB,YAGnC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,MAAM;CAC7B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,yBAAyB;CAErD,OAAO,WAAW,iBAAiB,MAAM,EAAE;EAC3C;AAIF,MAAa,mBAAmB,YAC9B,QACA,YACD,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,eAAe,yBAAyB;CAEhD,OAAO,WAAW,YAAY,MAAM,EAAE;EACtC"}
1
+ {"version":3,"file":"sidebar.js","names":["createContext","Drawer.Root","Drawer.Content"],"sources":["../../../../src/components/sidebar/sidebar.tsx"],"sourcesContent":["\"use client\"\n\nimport type { FC, PropsWithChildren, ReactNode } from \"react\"\nimport type {\n Breakpoint,\n ExtractStyleValue,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { ReactNodeOrFunction } from \"../../utils\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type {\n UseSidebarGroupProps,\n UseSidebarGroupReturn,\n UseSidebarItemProps,\n UseSidebarItemReturn,\n UseSidebarProps,\n UseSidebarReturn,\n} from \"./use-sidebar\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport { useBreakpointValue } from \"../../hooks/use-breakpoint\"\nimport { useValue } from \"../../hooks/use-value\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n runIfFn,\n useIncludesChildren,\n useSplitChildren,\n useValidChildren,\n} from \"../../utils\"\nimport { Collapse } from \"../collapse\"\nimport { Drawer } from \"../drawer\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { Tooltip, type TooltipProps } from \"../tooltip\"\nimport { sidebarStyle, type SidebarStyle } from \"./sidebar.style\"\nimport {\n SidebarContext,\n SidebarDescendantsContext,\n SidebarItemContext,\n useSidebar,\n useSidebarContext,\n useSidebarGroup,\n useSidebarItem,\n} from \"./use-sidebar\"\n\ninterface SidebarItemCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype SidebarItemReactNode =\n | ReactNodeOrFunction<SidebarItemCallBackProps>\n | {\n group: ReactNodeOrFunction<SidebarItemCallBackProps>\n item?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<SidebarItemCallBackProps>\n group?: ReactNodeOrFunction<SidebarItemCallBackProps>\n }\n\ninterface SidebarItemSharedRenderProps\n extends\n Pick<SidebarItemProps, \"label\">,\n Pick<\n UseSidebarItemReturn,\n | \"expanded\"\n | \"expandedValue\"\n | \"onExpandedChange\"\n | \"onSelectedChange\"\n | \"selected\"\n | \"selectedValue\"\n | \"value\"\n > {\n itemProps: HTMLStyledProps<\"li\">\n linkProps: HTMLStyledProps<\"a\">\n triggerProps: HTMLStyledProps<\"button\">\n endElement?: ReactNode\n startElement?: ReactNode\n}\n\ninterface SidebarItemRenderProps\n extends\n PropsWithChildren,\n Omit<SidebarItemSharedRenderProps, \"endElement\" | \"startElement\">,\n Pick<\n UseSidebarItemReturn,\n | \"group\"\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n endElement: { group?: ReactNode; item?: ReactNode }\n startElement: { group?: ReactNode; item?: ReactNode }\n indicator?: ReactNode\n link?: ReactNode\n trigger?: ReactNode\n}\n\ninterface SidebarItemLinkRenderProps extends Omit<\n SidebarItemSharedRenderProps,\n \"itemProps\" | \"triggerProps\"\n> {}\n\ninterface SidebarItemTriggerRenderProps\n extends\n Omit<SidebarItemSharedRenderProps, \"itemProps\" | \"linkProps\">,\n Pick<\n UseSidebarItemReturn,\n | \"groupLoading\"\n | \"groupOpen\"\n | \"onGroupClose\"\n | \"onGroupOpen\"\n | \"onGroupToggle\"\n > {\n indicator?: ReactNode\n}\n\ninterface SidebarItemRender {\n item?: ReactNodeOrFunction<SidebarItemRenderProps>\n link?: ReactNodeOrFunction<SidebarItemLinkRenderProps>\n trigger?: ReactNodeOrFunction<SidebarItemTriggerRenderProps>\n}\n\ninterface SidebarGroup extends Omit<SidebarGroupProps, \"children\" | \"value\"> {\n children: SidebarItemWithValue[]\n group: true\n}\n\nexport interface SidebarItemWithValue extends Omit<\n SidebarItemProps,\n \"children\"\n> {\n children?: SidebarItemWithValue[]\n}\n\nexport type SidebarItem = SidebarGroup | SidebarItemWithValue\n\nconst createKey = (props: SidebarItem, index: number) => {\n return \"value\" in props ? props.value || index : index\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: SidebarItemReactNode,\n root?: SidebarItemReactNode,\n): ReactNodeOrFunction<SidebarItemCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom)) {\n return custom[type]\n } else if (custom) {\n return custom\n } else if (isObject(root) && (\"group\" in root || \"item\" in root)) {\n return root[type]\n } else {\n return root\n }\n}\n\ninterface ComponentContext extends Pick<\n UseSidebarReturn,\n | \"getContentProps\"\n | \"getFooterProps\"\n | \"getHeaderProps\"\n | \"getSidePanelProps\"\n | \"getTriggerProps\"\n> {\n breakpoint: ExtractStyleValue<NonNullable<SidebarRootProps[\"breakpoint\"]>>\n mode: ExtractStyleValue<NonNullable<SidebarRootProps[\"mode\"]>>\n placement: ExtractStyleValue<NonNullable<SidebarRootProps[\"placement\"]>>\n}\n\ninterface GroupComponentContext\n extends\n Pick<SidebarGroupProps, \"contentProps\" | \"labelProps\">,\n Pick<UseSidebarGroupReturn, \"getContentProps\" | \"getLabelProps\"> {}\n\nconst [GroupComponentContext, useGroupComponentContext] =\n createContext<GroupComponentContext>({ name: \"GroupComponentContext\" })\n\ninterface ItemComponentContext {\n contentProps: SidebarItemContentProps\n endElementProps: SidebarItemEndElementProps\n indicatorProps: SidebarItemIndicatorProps\n labelProps: SidebarItemLabelProps\n startElementProps: SidebarItemStartElementProps\n tooltipProps: SidebarItemTooltipProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\ninterface SidePanelComponentContext extends Pick<\n SidebarSidePanelProps,\n | \"animated\"\n | \"contentProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"footerProps\"\n | \"groupContentProps\"\n | \"groupProps\"\n | \"handleProps\"\n | \"headerProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemContentProps\"\n | \"itemProps\"\n | \"items\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"menuProps\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n> {}\n\nconst [SidePanelComponentContext, useSidePanelComponentContext] =\n createContext<SidePanelComponentContext>({\n name: \"SidePanelComponentContext\",\n })\n\nexport interface SidebarRootProps\n extends\n HTMLStyledProps<\"div\">,\n ThemeProps<SidebarStyle>,\n Omit<UseSidebarProps, \"mobile\"> {\n /**\n * The breakpoint to use for the sidebar. If `false`, the sidebar will be always visible.\n *\n * @default 'md'\n */\n breakpoint?: Exclude<Breakpoint, \"base\"> | false\n}\n\nconst {\n ComponentContext,\n PropsContext: SidebarPropsContext,\n useComponentContext,\n usePropsContext: useSidebarPropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<SidebarRootProps, SidebarStyle, ComponentContext>(\n \"sidebar\",\n sidebarStyle,\n)\n\nexport { SidebarPropsContext, useSidebarPropsContext }\n\n/**\n * `Sidebar` is a component that is used to display a list of items in a sidebar.\n *\n * @see https://yamada-ui.com/docs/components/sidebar\n */\nexport const SidebarRoot = withProvider<\n \"div\",\n SidebarRootProps,\n \"mode\" | \"placement\"\n>(\n ({\n breakpoint = \"md\",\n mode: modeProp = \"offcanvas\",\n placement: placementProp = \"start\",\n ...rest\n }) => {\n const mobile =\n useBreakpointValue<boolean | undefined>(\n breakpoint ? { [breakpoint]: true } : { base: false },\n ) ?? false\n const mode = useValue(modeProp)\n const placement = useValue(placementProp)\n const {\n descendants,\n expandedValue,\n open,\n selectedValue,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getRootProps,\n getSidePanelProps,\n getTriggerProps,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n } = useSidebar({ mobile, ...rest })\n const context = useMemo(\n () => ({\n expandedValue,\n mobile,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n }),\n [\n mobile,\n expandedValue,\n open,\n selectedValue,\n onClose,\n onExpandedChange,\n onOpen,\n onSelectedChange,\n onToggle,\n ],\n )\n const componentContext = useMemo(\n () => ({\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n }),\n [\n breakpoint,\n mode,\n placement,\n getContentProps,\n getFooterProps,\n getHeaderProps,\n getSidePanelProps,\n getTriggerProps,\n ],\n )\n\n return (\n <SidebarDescendantsContext value={descendants}>\n <SidebarContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.div data-group {...getRootProps()} />\n </ComponentContext>\n </SidebarContext>\n </SidebarDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"mode\", \"placement\"] },\n)()\n\nexport interface SidebarMainPanelProps extends HTMLStyledProps {}\n\nexport const SidebarMainPanel = withContext<\"div\", SidebarMainPanelProps>(\n \"div\",\n \"mainPanel\",\n)()\n\nexport interface SidebarTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarTrigger = withContext<\"button\", SidebarTriggerProps>(\n \"button\",\n \"trigger\",\n)(undefined, (props) => {\n const { getTriggerProps } = useComponentContext()\n\n return { asChild: true, ...getTriggerProps(props) }\n})\n\nexport interface SidebarSidePanelProps\n extends\n Omit<HTMLStyledProps<\"aside\">, \"content\">,\n Pick<SidebarContentProps, \"items\">,\n Pick<\n SidebarItemProps,\n | \"animated\"\n | \"endElement\"\n | \"endElementProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"linkProps\"\n | \"loadingScheme\"\n | \"render\"\n | \"startElement\"\n | \"startElementProps\"\n | \"tooltipProps\"\n | \"triggerProps\"\n > {\n /**\n * The content of the sidebar.\n */\n content?: ReactNode\n /**\n * The footer of the sidebar.\n */\n footer?: ReactNode\n /**\n * The header of the sidebar.\n */\n header?: ReactNode\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If `true`, the sidebar will be rendered with a handle.\n *\n * @default true\n */\n withHandle?: boolean\n /**\n * Props for the content component.\n */\n contentProps?: SidebarContentProps\n /**\n * Props for the drawer component.\n */\n drawerProps?: Omit<\n Drawer.RootProps,\n | \"body\"\n | \"cancel\"\n | \"children\"\n | \"footer\"\n | \"header\"\n | \"middle\"\n | \"onCancel\"\n | \"onClose\"\n | \"onMiddle\"\n | \"onOpen\"\n | \"onSuccess\"\n | \"open\"\n | \"success\"\n | \"title\"\n | \"trigger\"\n >\n /**\n * Props for the footer component.\n */\n footerProps?: SidebarFooterProps\n /**\n * Props for the group content component.\n */\n groupContentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the group component.\n */\n groupProps?: Omit<SidebarGroupProps, \"children\" | \"label\" | \"value\">\n /**\n * Props for the handle component.\n */\n handleProps?: SidebarHandleProps\n /**\n * Props for the header component.\n */\n headerProps?: SidebarHeaderProps\n /**\n * Props for the item content component.\n */\n itemContentProps?: SidebarItemContentProps\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n SidebarItemProps,\n \"children\" | \"items\" | \"label\" | \"open\" | \"value\"\n >\n /**\n * Props for the menu component.\n *\n * @default 'md'\n */\n menuProps?: SidebarMenuProps\n}\n\nexport const SidebarSidePanel = withContext<\"aside\", SidebarSidePanelProps>(\n ({\n animated = true,\n children,\n content,\n endElement,\n footer,\n header,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n withHandle = true,\n contentProps,\n drawerProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mobile, open, onClose } = useSidebarContext()\n const { breakpoint, placement, getSidePanelProps } = useComponentContext()\n const [\n omittedChildren,\n customHeader,\n customContent,\n customFooter,\n customHandle,\n ] = useSplitChildren(\n children,\n SidebarHeader,\n SidebarContent,\n SidebarFooter,\n SidebarHandle,\n )\n const context = useMemo(\n () => ({\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n }),\n [\n animated,\n endElement,\n indicator,\n indicatorHidden,\n items,\n render,\n loadingScheme,\n startElement,\n contentProps,\n endElementProps,\n footerProps,\n groupContentProps,\n groupProps,\n handleProps,\n headerProps,\n indicatorProps,\n itemContentProps,\n itemProps,\n labelProps,\n linkProps,\n menuProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ],\n )\n\n return (\n <SidePanelComponentContext value={context}>\n {mobile ? (\n <Drawer.Root\n size=\"sm\"\n autoFocus={false}\n duration={!animated ? 0 : undefined}\n open={open}\n placement={`inline-${placement}`}\n withCloseButton={false}\n portalProps={{ disabled: true }}\n onClose={onClose}\n {...drawerProps}\n >\n <Drawer.Content>\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n </Drawer.Content>\n </Drawer.Root>\n ) : (\n <>\n <SidebarGap\n data-animated={dataAttr(animated)}\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n />\n\n <styled.aside\n data-animated={dataAttr(animated)}\n data-group\n display={\n breakpoint\n ? { base: undefined, [breakpoint]: \"none\" }\n : undefined\n }\n {...getSidePanelProps(rest)}\n >\n {customHeader ??\n (header ? <SidebarHeader>{header}</SidebarHeader> : null)}\n {customContent ??\n (content || items ? (\n <SidebarContent>{content}</SidebarContent>\n ) : null)}\n {customFooter ??\n (footer ? <SidebarFooter>{footer}</SidebarFooter> : null)}\n {customHandle ?? (withHandle ? <SidebarHandle /> : null)}\n\n {omittedChildren}\n </styled.aside>\n </>\n )}\n </SidePanelComponentContext>\n )\n },\n \"sidePanel\",\n)()\n\ninterface SidebarGapProps extends HTMLStyledProps<\"div\"> {}\n\nconst SidebarGap = withContext<\"div\", SidebarGapProps>(\"div\", \"gap\")()\n\nexport interface SidebarHeaderProps extends HTMLStyledProps<\"header\"> {}\n\nexport const SidebarHeader = withContext<\"header\", SidebarHeaderProps>(\n \"header\",\n \"header\",\n)(undefined, (props) => {\n const { getHeaderProps } = useComponentContext()\n const { headerProps } = useSidePanelComponentContext()\n\n return getHeaderProps(mergeProps(headerProps, props)())\n})\n\nexport interface SidebarFooterProps extends HTMLStyledProps<\"footer\"> {}\n\nexport const SidebarFooter = withContext<\"footer\", SidebarFooterProps>(\n \"footer\",\n \"footer\",\n)(undefined, (props) => {\n const { getFooterProps } = useComponentContext()\n const { footerProps } = useSidePanelComponentContext()\n\n return getFooterProps(mergeProps(footerProps, props)())\n})\n\nexport interface SidebarContentProps extends HTMLStyledProps<\"ul\"> {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItem[]\n}\n\nexport const SidebarContent = withContext<\"ul\", SidebarContentProps>(\n ({ children, items, ...rest }) => {\n const { getContentProps } = useComponentContext()\n const { items: rootItems, contentProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return (items ?? rootItems)?.map((props, index) => {\n const key = createKey(props, index)\n\n if (\"group\" in props) {\n const { children, group: _, ...rest } = props\n\n return <SidebarGroup key={key} items={children} {...rest} />\n } else {\n const { children, ...rest } = props\n\n return <SidebarItem key={key} items={children} {...rest} />\n }\n })\n }, [children, items, rootItems])\n\n return (\n <styled.ul {...getContentProps(mergeProps(contentProps, rest)())}>\n {computedChildren}\n </styled.ul>\n )\n },\n \"content\",\n)()\n\nexport interface SidebarHandleProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarHandle = withContext<\"button\", SidebarHandleProps>(\n (props) => {\n const { handleProps } = useSidePanelComponentContext()\n\n return (\n <SidebarTrigger {...mergeProps(handleProps, props)()}>\n <styled.button tabIndex={-1} />\n </SidebarTrigger>\n )\n },\n \"handle\",\n)()\n\nexport interface SidebarGroupProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"content\" | \"value\">,\n UseSidebarGroupProps {\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The label of the group.\n */\n label?: ReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarGroupContentProps, \"children\">\n /**\n * Props for the label component.\n */\n labelProps?: HTMLStyledProps<\"span\">\n}\n\nexport const SidebarGroup = withContext<\"li\", SidebarGroupProps>(\n ({\n children,\n items,\n label,\n value: valueProp = isString(label) ? label : undefined,\n contentProps,\n labelProps,\n ...rest\n }) => {\n const { groupProps } = useSidePanelComponentContext()\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [children, items])\n const [omittedChildren, customLabel, customContent] = useSplitChildren(\n computedChildren,\n SidebarGroupLabel,\n SidebarGroupContent,\n )\n const { getContentProps, getLabelProps, getRootProps } = useSidebarGroup({\n ...mergeProps(groupProps, rest)(),\n value: valueProp,\n })\n const context = useMemo(\n () => ({ contentProps, getContentProps, getLabelProps, labelProps }),\n [getLabelProps, labelProps, getContentProps, contentProps],\n )\n\n return (\n <GroupComponentContext value={context}>\n <styled.li {...getRootProps()}>\n {customLabel ??\n (label ? <SidebarGroupLabel>{label}</SidebarGroupLabel> : null)}\n {customContent ?? (\n <SidebarGroupContent>{omittedChildren}</SidebarGroupContent>\n )}\n </styled.li>\n </GroupComponentContext>\n )\n },\n \"group\",\n)()\n\nexport interface SidebarGroupLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarGroupLabel = withContext<\"span\", SidebarGroupLabelProps>(\n \"span\",\n \"groupLabel\",\n)(undefined, (props) => {\n const { getLabelProps, labelProps } = useGroupComponentContext()\n\n return getLabelProps(mergeProps(labelProps, props)())\n})\n\nexport interface SidebarGroupContentProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarGroupContent = withContext<\"div\", SidebarGroupContentProps>(\n \"div\",\n \"groupContent\",\n)(undefined, ({ children, ...rest }) => {\n const validChildren = useValidChildren(children)\n const list = useIncludesChildren(validChildren, SidebarItem)\n const { groupContentProps } = useSidePanelComponentContext()\n const { contentProps, getContentProps } = useGroupComponentContext()\n\n return {\n as: list ? \"ul\" : \"div\",\n children,\n ...getContentProps(mergeProps(groupContentProps, contentProps, rest)()),\n }\n})\n\nexport interface SidebarMenuProps extends HTMLStyledProps<\"div\"> {}\n\nexport const SidebarMenu = withContext<\"div\", SidebarMenuProps>(\"div\", \"menu\")(\n undefined,\n (props) => {\n const { menuProps } = useSidePanelComponentContext()\n\n return { \"data-menu\": \"\", ...mergeProps(menuProps, props)() }\n },\n)\n\nexport interface SidebarMenuButtonProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarMenuButton = withContext<\"button\", SidebarMenuButtonProps>(\n \"button\",\n [\"menu\", \"button\"],\n)(undefined, (props) => {\n const { open } = useSidebarContext()\n const { mode } = useComponentContext()\n const { menuProps } = useSidePanelComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const { disabled, ...rest } = mergeProps(menuProps, props)()\n\n return {\n \"data-menu\": \"\",\n disabled,\n ...rest,\n tabIndex: (!offcanvas || open) && !disabled ? 0 : -1,\n }\n})\n\nexport interface SidebarItemProps\n extends\n Omit<HTMLStyledProps<\"li\">, \"value\">,\n Omit<UseSidebarItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the sidebar item will be animated.\n *\n * @default true\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: SidebarItemReactNode\n /**\n * The sidebar item indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<SidebarItemCallBackProps>\n /**\n * If provided, generate elements based on items.\n */\n items?: SidebarItemWithValue[]\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * If provided, the sidebar item will be rendered with custom components.\n */\n render?: SidebarItemRender\n /**\n * The element to display at the start of the item.\n */\n startElement?: SidebarItemReactNode\n /**\n * Props for the content component.\n */\n contentProps?: Omit<SidebarItemContentProps, \"children\">\n /**\n * Props for the end component.\n */\n endElementProps?: SidebarItemEndElementProps\n /**\n * Props for the indicator component.\n */\n indicatorProps?: SidebarItemIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: SidebarItemLabelProps\n /**\n * Props for the link component.\n */\n linkProps?: SidebarItemLinkProps\n /**\n * Props for the start component.\n */\n startElementProps?: SidebarItemStartElementProps\n /**\n * Props for the tooltip component.\n */\n tooltipProps?: Omit<SidebarItemTooltipProps, \"children\" | \"content\">\n /**\n * Props for the trigger component.\n */\n triggerProps?: SidebarItemTriggerProps\n /**\n * If provided, the sidebar item will be rendered as an async sidebar item.\n */\n asyncChildren?: () => Promise<SidebarItemWithValue[]>\n}\n\nexport const SidebarItem = withContext<\"li\", SidebarItemProps>(\n ({\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n children: childrenProp,\n endElement,\n indicator: indicatorProp,\n items,\n label,\n loadingScheme,\n render,\n startElement,\n contentProps,\n endElementProps,\n indicatorProps,\n labelProps,\n linkProps,\n startElementProps,\n tooltipProps,\n triggerProps,\n ...rest\n }) => {\n const { mode } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n const componentContext = useSidePanelComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const computedChildren = useMemo(() => {\n if (childrenProp) return childrenProp\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [childrenProp, items])\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return items?.map(({ children, ...rest }, index) => {\n const key = createKey(rest, index)\n\n return <SidebarItem key={key} items={children} {...rest} />\n })\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n open,\n selected,\n selectedValue,\n value,\n getContentProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n getLinkProps,\n getTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n } = useSidebarItem({\n ...mergeProps(componentContext.itemProps, rest)(),\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n children: computedChildren,\n })\n const animated = animatedProp ?? componentContext.animated ?? true\n const tabIndex = offcanvas\n ? open && expanded && !disabled\n ? 0\n : -1\n : expanded && !disabled\n ? 0\n : -1\n const callbackProps = useMemo(\n () => ({ disabled, expanded: groupOpen }),\n [disabled, groupOpen],\n )\n const mergedTriggerProps = useMemo(() => {\n return getTriggerProps({\n tabIndex,\n ...mergeProps(componentContext.triggerProps, triggerProps)(),\n }) as SidebarItemTriggerProps\n }, [getTriggerProps, tabIndex, componentContext.triggerProps, triggerProps])\n const mergedLinkProps = useMemo(() => {\n return getLinkProps({\n tabIndex,\n ...mergeProps(componentContext.linkProps, linkProps)(),\n }) as SidebarItemLinkProps\n }, [getLinkProps, tabIndex, componentContext.linkProps, linkProps])\n const indicator = useMemo<ReactNode>(\n () => runIfFn(indicatorProp ?? componentContext.indicator, callbackProps),\n [indicatorProp, componentContext.indicator, callbackProps],\n )\n const groupStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const groupEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const itemStartElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n ),\n callbackProps,\n ),\n [startElement, componentContext.startElement, callbackProps],\n )\n const itemEndElement = useMemo<ReactNode>(\n () =>\n runIfFn(\n getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n ),\n callbackProps,\n ),\n [endElement, componentContext.endElement, callbackProps],\n )\n const trigger = useMemo<ReactNode>(\n () =>\n runIfFn(render?.trigger ?? componentContext.render?.trigger, {\n endElement: groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n startElement: groupStartElement,\n value,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.trigger,\n componentContext.render?.trigger,\n groupEndElement,\n expanded,\n expandedValue,\n groupLoading,\n groupOpen,\n indicator,\n label,\n selected,\n selectedValue,\n groupStartElement,\n value,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const link = useMemo<ReactNode>(\n () =>\n runIfFn(render?.link ?? componentContext.render?.link, {\n endElement: itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n startElement: itemStartElement,\n value,\n linkProps: mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n }),\n [\n render?.link,\n componentContext.render?.link,\n itemEndElement,\n expanded,\n expandedValue,\n label,\n selected,\n selectedValue,\n itemStartElement,\n value,\n mergedLinkProps,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const item = useMemo<ReactNode>(\n () =>\n runIfFn(render?.item ?? componentContext.render?.item, {\n children,\n endElement: { group: groupEndElement, item: itemEndElement },\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n startElement: { group: groupStartElement, item: itemStartElement },\n trigger,\n value,\n itemProps: getItemProps() as HTMLStyledProps<\"li\">,\n linkProps: mergedLinkProps,\n triggerProps: mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n }),\n [\n render?.item,\n componentContext.render?.item,\n children,\n groupEndElement,\n itemEndElement,\n expanded,\n expandedValue,\n group,\n groupLoading,\n groupOpen,\n indicator,\n label,\n link,\n selected,\n selectedValue,\n groupStartElement,\n itemStartElement,\n trigger,\n value,\n getItemProps,\n mergedLinkProps,\n mergedTriggerProps,\n onExpandedChange,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n onSelectedChange,\n ],\n )\n const context = useMemo(\n () => ({ branchOpen, groupOpen }),\n [branchOpen, groupOpen],\n )\n const itemComponentContext = useMemo(\n () => ({\n contentProps: {\n duration: !animated ? 0 : undefined,\n open: groupOpen,\n ...getContentProps(\n mergeProps(componentContext.itemContentProps, contentProps)(),\n ),\n },\n endElementProps: mergeProps(\n componentContext.endElementProps,\n endElementProps,\n )(),\n indicatorProps: getIndicatorProps({\n \"data-animated\": dataAttr(animated),\n ...mergeProps(componentContext.indicatorProps, indicatorProps)(),\n }) as SidebarItemIndicatorProps,\n labelProps: getLabelProps(\n mergeProps(componentContext.labelProps, labelProps)(),\n ) as SidebarItemLabelProps,\n startElementProps: mergeProps(\n componentContext.startElementProps,\n startElementProps,\n )(),\n tooltipProps: {\n content: label,\n disabled: open,\n ...mergeProps(componentContext.tooltipProps, tooltipProps)(),\n },\n }),\n [\n animated,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.itemContentProps,\n componentContext.labelProps,\n componentContext.startElementProps,\n componentContext.tooltipProps,\n contentProps,\n endElementProps,\n getContentProps,\n getIndicatorProps,\n getLabelProps,\n groupOpen,\n indicatorProps,\n label,\n labelProps,\n open,\n startElementProps,\n tooltipProps,\n ],\n )\n\n return (\n <SidebarItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {item ?? (\n <styled.li {...getItemProps()}>\n {group ? (\n <>\n {trigger ?? (\n <SidebarItemTrigger {...mergedTriggerProps}>\n {groupStartElement ? (\n <SidebarItemStartElement>\n {groupStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {groupEndElement ? (\n <SidebarItemEndElement>\n {groupEndElement}\n </SidebarItemEndElement>\n ) : null}\n <SidebarItemIndicator>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </SidebarItemIndicator>\n </SidebarItemTrigger>\n )}\n\n <SidebarItemContent>{children}</SidebarItemContent>\n </>\n ) : (\n (link ?? (\n <SidebarItemLink {...mergedLinkProps}>\n {itemStartElement ? (\n <SidebarItemStartElement>\n {itemStartElement}\n </SidebarItemStartElement>\n ) : null}\n {label ? (\n <SidebarItemLabel>{label}</SidebarItemLabel>\n ) : null}\n {itemEndElement ? (\n <SidebarItemEndElement>\n {itemEndElement}\n </SidebarItemEndElement>\n ) : null}\n </SidebarItemLink>\n ))\n )}\n </styled.li>\n )}\n </ItemComponentContext>\n </SidebarItemContext>\n )\n },\n \"item\",\n)()\n\ninterface SidebarItemTooltipProps extends TooltipProps {}\n\nconst SidebarItemTooltip: FC<SidebarItemTooltipProps> = (props) => {\n const { tooltipProps } = useItemComponentContext()\n const { children, disabled, ...rest } = mergeProps(tooltipProps, props)()\n const { mode, placement } = useComponentContext()\n const offcanvas = mode === \"offcanvas\"\n\n if (offcanvas || disabled) {\n return children\n } else {\n return (\n <Tooltip\n closeOnClick={false}\n gutter={16}\n placement={`center-${placement === \"start\" ? \"end\" : \"start\"}`}\n {...rest}\n >\n {children}\n </Tooltip>\n )\n }\n}\n\nexport interface SidebarItemTriggerProps extends HTMLStyledProps<\"button\"> {}\n\nexport const SidebarItemTrigger = withContext<\n \"button\",\n SidebarItemTriggerProps\n>((props) => {\n return (\n <SidebarItemTooltip>\n <styled.button {...props} />\n </SidebarItemTooltip>\n )\n}, \"itemTrigger\")()\n\nexport interface SidebarItemLinkProps extends HTMLStyledProps<\"a\"> {}\n\nexport const SidebarItemLink = withContext<\"a\", SidebarItemLinkProps>(\n (props) => {\n return (\n <SidebarItemTooltip>\n <styled.a {...props} />\n </SidebarItemTooltip>\n )\n },\n \"itemLink\",\n)()\n\nexport interface SidebarItemContentProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nexport const SidebarItemContent = withContext<\"ul\", SidebarItemContentProps>(\n (props) => {\n const { contentProps } = useItemComponentContext()\n\n return (\n <Collapse\n as=\"ul\"\n {...cast<CollapseProps>(mergeProps(contentProps, props)())}\n />\n )\n },\n \"itemContent\",\n)()\n\nexport interface SidebarItemIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nexport const SidebarItemIndicator = withContext<\n \"svg\",\n SidebarItemIndicatorProps\n>(({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useSidePanelComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n}, \"itemIndicator\")(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return mergeProps(indicatorProps, props)()\n})\n\nexport interface SidebarItemStartElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemStartElement = withContext<\n \"div\",\n SidebarItemStartElementProps\n>(\"div\", {\n name: \"ItemStartElement\",\n slot: [\"itemElement\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return mergeProps(startElementProps, props)()\n})\n\nexport interface SidebarItemEndElementProps extends HTMLStyledProps {}\n\nexport const SidebarItemEndElement = withContext<\n \"div\",\n SidebarItemEndElementProps\n>(\"div\", {\n name: \"ItemEndElement\",\n slot: [\"itemElement\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return mergeProps(endElementProps, props)()\n})\n\nexport interface SidebarItemLabelProps extends HTMLStyledProps<\"span\"> {}\n\nexport const SidebarItemLabel = withContext<\"span\", SidebarItemLabelProps>(\n \"span\",\n \"itemLabel\",\n)(undefined, (props) => {\n const { labelProps } = useItemComponentContext()\n\n return mergeProps(labelProps, props)()\n})\n"],"mappings":";;;;;;;;;;;;;;;;;;;AA0JA,MAAM,aAAa,OAAoB,UAAkB;CACvD,OAAO,WAAW,QAAQ,MAAM,SAAS,QAAQ;;AAGnD,MAAM,0BACJ,MACA,QACA,SACkD;CAClD,KAAA,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GAAI,cAAc;KAAI,CAAA;IAC5B,CAAA;GACJ,CAAA;EACS,CAAA;GAGhC,QACA,EAAE,eAAe,CAAC,QAAQ,YAAY,EAAE,CACzC,EAAE;AAIH,MAAa,mBAAmB,YAC9B,OACA,YACD,EAAE;AAIH,MAAa,iBAAiB,YAC5B,UACA,UACD,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,oBAAoB,qBAAqB;CAEjD,OAAO;EAAE,SAAS;EAAM,GAAG,gBAAgB,MAAM;EAAE;EACnD;AA8GF,MAAa,mBAAmB,aAC7B,EACC,WAAW,MACX,UACA,SACA,YACA,QACA,QACA,WACA,iBACA,OACA,eACA,QACA,cACA,aAAa,MACb,cACA,aACA,iBACA,aACA,mBACA,YACA,aACA,aACA,gBACA,kBACA,WACA,YACA,WACA,WACA,mBACA,cACA,cACA,GAAG,WACC;CACJ,MAAM,EAAE,QAAQ,MAAM,YAAY,mBAAmB;CACrD,MAAM,EAAE,YAAY,WAAW,sBAAsB,qBAAqB;CAC1E,MAAM,CACJ,iBACA,cACA,eACA,cACA,gBACE,iBACF,UACA,eACA,gBACA,eACA,cACD;CAwDD,OACE,oBAAC,2BAAD;EAA2B,OAxDb,eACP;GACL;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,GACD;GACE;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACA;GACD,CAIwC;YACtC,SACC,oBAACC,YAAD;GACE,MAAK;GACL,WAAW;GACX,UAAU,CAAC,WAAW,IAAI,KAAA;GACpB;GACN,WAAW,UAAU;GACrB,iBAAiB;GACjB,aAAa,EAAE,UAAU,MAAM;GACtB;GACT,GAAI;aAEJ,qBAACC,eAAD,EAAA,UAAA;IACG,iBACE,SAAS,oBAAC,eAAD,EAA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AiB,WAClB,EACD,cACD,EACH;EAAC;EAAY,iBAAiB;EAAY;EAAc,CACzD;CACD,MAAM,UAAU,eAAA,GAAA,cAAA,SAEJ,QAAQ,WAAW,iBAAiB,QAAQ,SAAS;EAC3D,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,cAAc;EACd;EACA;EACA;EACA;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CACD,MAAM,OAAO,eAAA,GAAA,cAAA,SAED,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD,YAAY;EACZ;EACA;EACA;EACA;EACA;EACA,cAAc;EACd;EACA,WAAW;EACX;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CACD,MAAM,OAAO,eAAA,GAAA,cAAA,SAED,QAAQ,QAAQ,iBAAiB,QAAQ,MAAM;EACrD;EACA,YAAY;GAAE,OAAO;GAAiB,MAAM;GAAgB;EAC5D;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,cAAc;GAAE,OAAO;GAAmB,MAAM;GAAkB;EAClE;EACA;EACA,WAAW,cAAc;EACzB,WAAW;EACX,cAAc;EACd;EACA;EACA;EACA;EACA;EACD,CAAC,EACJ;EACE,QAAQ;EACR,iBAAiB,QAAQ;EACzB;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACD,CACF;CA0DD,OACE,oBAAC,oBAAD;EAAoB,OA1DN,eACP;GAAE;GAAY;GAAW,GAChC,CAAC,YAAY,UAAU,CAwDW;YAChC,oBAAC,s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OAAO,SAAS,MAAM,SAAS,GAAG,IAAI,SAAS,KAAK,KAAK,GAAG;GAC3D,gBAAgB,CAAC,KAAA,IAAY,UAAU;CACxC,MAAM,EAAE,mBAAmB,yBAAyB;CAEpD,OAAO,WAAW,gBAAgB,MAAM,EAAE;EAC1C;AAIF,MAAa,0BAA0B,YAGrC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,QAAQ;CAC/B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,sBAAsB,yBAAyB;CAEvD,OAAO,WAAW,mBAAmB,MAAM,EAAE;EAC7C;AAIF,MAAa,wBAAwB,YAGnC,OAAO;CACP,MAAM;CACN,MAAM,CAAC,eAAe,MAAM;CAC7B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,yBAAyB;CAErD,OAAO,WAAW,iBAAiB,MAAM,EAAE;EAC3C;AAIF,MAAa,mBAAmB,YAC9B,QACA,YACD,CAAC,KAAA,IAAY,UAAU;CACtB,MAAM,EAAE,eAAe,yBAAyB;CAEhD,OAAO,WAAW,YAAY,MAAM,EAAE;EACtC"}
@@ -2,6 +2,7 @@
2
2
  import { createContext as createContext$1 } from "../../utils/context.js";
3
3
  import { utils_exports } from "../../utils/index.js";
4
4
  import { styled } from "../../core/system/factory.js";
5
+ import { mergeProps } from "../../core/components/props.js";
5
6
  import { createSlotComponent } from "../../core/components/create-component.js";
6
7
  import { ChevronRightIcon } from "../icon/icons/chevron-right-icon.js";
7
8
  import { Collapse } from "../collapse/collapse.js";
@@ -262,44 +263,29 @@ const TreeIndicator = withContext(({ children = /* @__PURE__ */ jsx(ChevronRight
262
263
  return Children.count(children) > 1 ? Children.only(null) : null;
263
264
  }, "indicator")(void 0, (props) => {
264
265
  const { indicatorProps } = useItemComponentContext();
265
- return {
266
- ...indicatorProps,
267
- ...props
268
- };
266
+ return mergeProps(indicatorProps, props)();
269
267
  });
270
268
  const TreeCheckbox = withContext(Checkbox, "checkbox")(void 0, (props) => {
271
269
  const { checkboxProps } = useItemComponentContext();
272
- return {
273
- ...checkboxProps,
274
- ...props
275
- };
270
+ return mergeProps(checkboxProps, props)();
276
271
  });
277
272
  const TreeStartElement = withContext("div", {
278
273
  name: "StartElement",
279
274
  slot: ["element", "start"]
280
275
  })(void 0, (props) => {
281
276
  const { startElementProps } = useItemComponentContext();
282
- return {
283
- ...startElementProps,
284
- ...props
285
- };
277
+ return mergeProps(startElementProps, props)();
286
278
  });
287
279
  const TreeEndElement = withContext("div", {
288
280
  name: "EndElement",
289
281
  slot: ["element", "end"]
290
282
  })(void 0, (props) => {
291
283
  const { endElementProps } = useItemComponentContext();
292
- return {
293
- ...endElementProps,
294
- ...props
295
- };
284
+ return mergeProps(endElementProps, props)();
296
285
  });
297
286
  const TreeLabel = withContext("span", "label")(void 0, (props) => {
298
287
  const { labelProps } = useItemComponentContext();
299
- return {
300
- ...labelProps,
301
- ...props
302
- };
288
+ return mergeProps(labelProps, props)();
303
289
  });
304
290
  //#endregion
305
291
  export { TreeItem, TreePropsContext, TreeRoot, useTreePropsContext };
@@ -1 +1 @@
1
- {"version":3,"file":"tree.js","names":["createContext"],"sources":["../../../../src/components/tree/tree.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { CheckboxProps } from \"../checkbox\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type { TreeStyle } from \"./tree.style\"\nimport type { UseTreeItemProps, UseTreeProps } from \"./use-tree\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, styled } from \"../../core\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n type ReactNodeOrFunction,\n runIfFn,\n} from \"../../utils\"\nimport { Checkbox } from \"../checkbox\"\nimport { Collapse } from \"../collapse\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { treeStyle } from \"./tree.style\"\nimport {\n TreeContext,\n TreeDescendantsContext,\n TreeItemContext,\n useTree,\n useTreeContext,\n useTreeItem,\n} from \"./use-tree\"\n\ninterface TreeCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype TreeItemReactNode =\n | ReactNodeOrFunction<TreeCallBackProps>\n | {\n group: ReactNodeOrFunction<TreeCallBackProps>\n item?: ReactNodeOrFunction<TreeCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<TreeCallBackProps>\n group?: ReactNodeOrFunction<TreeCallBackProps>\n }\n\ninterface TreeItemWithValue extends Omit<TreeItemProps, \"children\"> {}\n\ninterface TreeItemWithChildren extends TreeItemWithValue {\n children: TreeItem[]\n}\n\nexport type TreeItem = TreeItemWithChildren | TreeItemWithValue\n\nconst recursiveTreeItem = (items?: TreeItem[]) => {\n return items?.map((props, index) => {\n const key =\n props.value || (isString(props.label) ? `${props.label}-${index}` : index)\n\n if (\"children\" in props) {\n const { children, ...rest } = props\n\n return (\n <TreeItem key={key} {...rest}>\n {recursiveTreeItem(children)}\n </TreeItem>\n )\n } else {\n return <TreeItem key={key} {...props} />\n }\n })\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: TreeItemReactNode,\n root?: TreeItemReactNode,\n): ReactNodeOrFunction<TreeCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom)) {\n return custom[type]\n } else if (custom) {\n return custom\n } else if (isObject(root) && (\"group\" in root || \"item\" in root)) {\n return root[type]\n } else {\n return root\n }\n}\n\ninterface ComponentContext extends Pick<\n TreeRootProps,\n | \"animated\"\n | \"checkboxProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"groupProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemProps\"\n | \"labelProps\"\n | \"loadingScheme\"\n | \"size\"\n | \"startElement\"\n | \"startElementProps\"\n> {}\n\ninterface ItemComponentContext {\n checkboxProps: TreeCheckboxProps\n endElementProps: TreeEndElementProps\n indicatorProps: TreeIndicatorProps\n labelProps: TreeLabelProps\n startElementProps: TreeStartElementProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\nexport interface TreeRootProps<Multiple extends boolean = false>\n extends\n HTMLStyledProps<\"ul\">,\n ThemeProps<TreeStyle>,\n UseTreeProps<Multiple>,\n Pick<\n TreeItemProps,\n | \"animated\"\n | \"checkboxProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"groupProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"loadingScheme\"\n | \"startElement\"\n | \"startElementProps\"\n > {\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If provided, generate elements based on items.\n */\n items?: TreeItem[]\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n TreeItemProps,\n \"children\" | \"label\" | \"open\" | \"query\" | \"value\"\n >\n}\n\nconst {\n ComponentContext,\n PropsContext: TreePropsContext,\n useComponentContext,\n usePropsContext: useTreePropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<TreeRootProps, TreeStyle, ComponentContext>(\n \"tree\",\n treeStyle,\n)\n\nexport { TreePropsContext, useTreePropsContext }\n\n/**\n * `Tree` is a component used to display hierarchical data structures in an expandable tree format.\n *\n * @see https://yamada-ui.com/docs/components/tree\n */\nexport const TreeRoot = withProvider<\"ul\", TreeRootProps, \"size\">(\n <Multiple extends boolean = false>({\n size,\n animated,\n children,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n startElement,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n ...rest\n }: TreeRootProps<Multiple>) => {\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return recursiveTreeItem(items)\n }, [children, items])\n const {\n activeDescendant,\n checkable,\n checkedValue,\n descendants,\n expandedValue,\n multiple,\n selectedValue,\n getRootProps,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n } = useTree({ ...rest, children: computedChildren })\n const context = useMemo(\n () => ({\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n }),\n [\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onSearch,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const componentContext = useMemo(\n () => ({\n size,\n animated,\n endElement,\n indicator,\n indicatorHidden,\n loadingScheme,\n startElement,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n }),\n [\n size,\n animated,\n endElement,\n indicator,\n indicatorHidden,\n startElement,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n checkboxProps,\n loadingScheme,\n ],\n )\n\n return (\n <TreeDescendantsContext value={descendants}>\n <TreeContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.ul {...getRootProps()} />\n </ComponentContext>\n </TreeContext>\n </TreeDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"size\"] },\n)() as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: TreeRootProps<Multiple>,\n ): ReactElement\n}>\n\nexport interface TreeItemProps\n extends HTMLStyledProps<\"div\">, Omit<UseTreeItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the tree item will be animated.\n *\n * @default false\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: TreeItemReactNode\n /**\n * The tree indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<TreeCallBackProps>\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * The element to display at the start of the item.\n */\n startElement?: TreeItemReactNode\n /**\n * Props for the checkbox component.\n */\n checkboxProps?: Omit<CheckboxProps, \"checked\" | \"defaultChecked\" | \"value\">\n /**\n * Props for the end component.\n */\n endElementProps?: TreeEndElementProps\n /**\n * Props for the group component.\n */\n groupProps?: Omit<TreeGroupProps, \"children\">\n /**\n * Props for the indicator component.\n */\n indicatorProps?: TreeIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: TreeLabelProps\n /**\n * Props for the root element.\n */\n rootProps?: HTMLStyledProps<\"li\">\n /**\n * Props for the start component.\n */\n startElementProps?: TreeStartElementProps\n /**\n * If provided, the tree item will be rendered as an async tree item.\n */\n asyncChildren?: () => Promise<TreeItem[]>\n}\n\nexport const TreeItem = withContext<\"div\", TreeItemProps>(\n ({\n className,\n css,\n colorScheme,\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n endElement,\n indicator: indicatorProp,\n label,\n loadingScheme,\n query,\n startElement,\n value: valueProp = isString(label) ? label : undefined,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n labelProps,\n rootProps,\n startElementProps,\n ...rest\n }) => {\n const { checkable } = useTreeContext()\n const componentContext = useComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const animated = animatedProp ?? componentContext.animated\n const indicator = indicatorProp ?? componentContext.indicator\n const groupStartElement = getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n )\n const groupEndElement = getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n )\n const itemStartElement = getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n )\n const itemEndElement = getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n )\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return recursiveTreeItem(items)\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n group,\n groupLoading,\n groupOpen,\n level,\n props,\n value,\n getCheckboxProps,\n getGroupItemProps,\n getGroupProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n } = useTreeItem({\n ...componentContext.itemProps,\n ...rest,\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n query: query ?? (isString(label) ? label : undefined),\n value: valueProp,\n })\n const itemProps = {\n className,\n css,\n colorScheme,\n \"--level\": level.toString(),\n ...rootProps,\n }\n const callbackProps = { disabled, expanded: groupOpen }\n const context = useMemo(\n () => ({\n branchOpen,\n groupOpen,\n level,\n value,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n }),\n [\n branchOpen,\n groupOpen,\n level,\n value,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n ],\n )\n const itemComponentContext = useMemo(\n () => ({\n checkboxProps: {\n size: componentContext.size,\n ...getCheckboxProps({\n ...componentContext.checkboxProps,\n ...checkboxProps,\n }),\n },\n endElementProps: {\n ...componentContext.endElementProps,\n ...endElementProps,\n },\n indicatorProps: {\n ...getIndicatorProps({\n ...componentContext.indicatorProps,\n ...indicatorProps,\n }),\n },\n labelProps: {\n ...getLabelProps({\n ...componentContext.labelProps,\n ...labelProps,\n }),\n },\n startElementProps: {\n ...componentContext.startElementProps,\n ...startElementProps,\n },\n }),\n [\n checkboxProps,\n componentContext.checkboxProps,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.labelProps,\n componentContext.size,\n componentContext.startElementProps,\n endElementProps,\n getCheckboxProps,\n getIndicatorProps,\n getLabelProps,\n indicatorProps,\n labelProps,\n startElementProps,\n ],\n )\n\n return (\n <TreeItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {group ? (\n <styled.li {...getGroupItemProps(itemProps)}>\n <styled.div data-content {...props}>\n <TreeIndicator data-animated={dataAttr(animated)}>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </TreeIndicator>\n {checkable ? <TreeCheckbox /> : null}\n {groupStartElement ? (\n <TreeStartElement>\n {runIfFn(groupStartElement, callbackProps)}\n </TreeStartElement>\n ) : null}\n {label ? <TreeLabel>{label}</TreeLabel> : null}\n {groupEndElement ? (\n <TreeEndElement>\n {runIfFn(groupEndElement, callbackProps)}\n </TreeEndElement>\n ) : null}\n </styled.div>\n\n <TreeGroup\n duration={!animated ? 0 : undefined}\n open={groupOpen}\n {...getGroupProps({\n ...componentContext.groupProps,\n ...groupProps,\n })}\n >\n {children}\n </TreeGroup>\n </styled.li>\n ) : (\n <styled.li {...getItemProps(itemProps)}>\n <styled.div data-content {...props}>\n <TreeIndicator data-hidden />\n {checkable ? <TreeCheckbox /> : null}\n {itemStartElement ? (\n <TreeStartElement>\n {runIfFn(itemStartElement, callbackProps)}\n </TreeStartElement>\n ) : null}\n {label ? <TreeLabel>{label}</TreeLabel> : null}\n {itemEndElement ? (\n <TreeEndElement>\n {runIfFn(itemEndElement, callbackProps)}\n </TreeEndElement>\n ) : null}\n </styled.div>\n </styled.li>\n )}\n </ItemComponentContext>\n </TreeItemContext>\n )\n },\n \"item\",\n)()\n\ninterface TreeGroupProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nconst TreeGroup = withContext<\"ul\", TreeGroupProps>((props) => {\n return <Collapse as=\"ul\" {...cast<CollapseProps>(props)} />\n}, \"group\")()\n\ninterface TreeIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nconst TreeIndicator = withContext<\"svg\", TreeIndicatorProps>(\n ({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n },\n \"indicator\",\n)(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return { ...indicatorProps, ...props }\n})\n\ninterface TreeCheckboxProps extends CheckboxProps {}\n\nconst TreeCheckbox = withContext<\"input\", TreeCheckboxProps>(\n Checkbox,\n \"checkbox\",\n)(undefined, (props) => {\n const { checkboxProps } = useItemComponentContext()\n\n return { ...checkboxProps, ...props }\n})\n\ninterface TreeStartElementProps extends HTMLStyledProps {}\n\nconst TreeStartElement = withContext<\"div\", TreeStartElementProps>(\"div\", {\n name: \"StartElement\",\n slot: [\"element\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return { ...startElementProps, ...props }\n})\n\ninterface TreeEndElementProps extends HTMLStyledProps {}\n\nconst TreeEndElement = withContext<\"div\", TreeEndElementProps>(\"div\", {\n name: \"EndElement\",\n slot: [\"element\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return { ...endElementProps, ...props }\n})\n\ninterface TreeLabelProps extends HTMLStyledProps<\"span\"> {}\n\nconst TreeLabel = withContext<\"span\", TreeLabelProps>(\"span\", \"label\")(\n undefined,\n (props) => {\n const { labelProps } = useItemComponentContext()\n\n return { ...labelProps, ...props }\n },\n)\n"],"mappings":";;;;;;;;;;;;;;AAsEA,MAAM,qBAAqB,UAAuB;CAChD,OAAO,OAAO,KAAK,OAAO,UAAU;EAClC,MAAM,MACJ,MAAM,WAAA,GAAA,cAAA,UAAmB,MAAM,MAAM,GAAG,GAAG,MAAM,MAAM,GAAG,UAAU;EAEtE,IAAI,cAAc,OAAO;GACvB,MAAM,EAAE,UAAU,GAAG,SAAS;GAE9B,OACE,oBAAC,UAAD;IAAoB,GAAI;cACrB,kBAAkB,SAAS;IACnB,EAFI,IAEJ;SAGb,OAAO,oBAAC,UAAD,EAAoB,GAAI,OAAS,EAAlB,IAAkB;GAE1C;;AAGJ,MAAM,0BACJ,MACA,QACA,SAC2C;CAC3C,KAAA,GAAA,cAAA,UAAa,OAAO,KAAK,WAAW,UAAU,UAAU,SACtD,OAAO,OAAO;MACT,IAAI,QACT,OAAO;MACF,KAAA,GAAA,cAAA,UAAa,KAAK,KAAK,WAAW,QAAQ,UAAU,OACzD,OAAO,KAAK;MAEZ,OAAO;;AA8BX,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAoC,EAAE,MAAM,wBAAwB,CAAC;AAwCvE,MAAM,EACJ,kBACA,cAAc,kBACd,qBACA,iBAAiB,qBACjB,aACA,iBACE,oBACF,QACA,UACD;;;;;;AASD,MAAa,WAAW,cACa,EACjC,MACA,UACA,UACA,YACA,WACA,iBACA,OACA,eACA,cACA,eACA,iBACA,YACA,gBACA,WACA,YACA,mBACA,GAAG,WAC0B;CAC7B,MAAM,mBAAmB,cAAc;EACrC,IAAI,UAAU,OAAO;EAErB,OAAO,kBAAkB,MAAM;IAC9B,CAAC,UAAU,MAAM,CAAC;CACrB,MAAM,EACJ,kBACA,WACA,cACA,aACA,eACA,UACA,eACA,cACA,oBACA,iBACA,eACA,aACA,kBACA,UACA,qBACE,QAAQ;EAAE,GAAG;EAAM,UAAU;EAAkB,CAAC;CAoEpD,OACE,oBAAC,wBAAD;EAAwB,OAAO;YAC7B,oBAAC,aAAD;GAAa,OArED,eACP;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,GACD;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAuC4B;aACzB,oBAAC,kBAAD;IAAkB,OAtCC,eAChB;KACL;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,GACD;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,CAM4C;cACvC,oBAAC,OAAO,IAAR,EAAW,GAAI,cAAc,EAAI,CAA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kB,yBAAyB;CAEnD,OAAO;EAAE,GAAG;EAAe,GAAG;EAAO;EACrC;AAIF,MAAM,mBAAmB,YAA0C,OAAO;CACxE,MAAM;CACN,MAAM,CAAC,WAAW,QAAQ;CAC3B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,sBAAsB,yBAAyB;CAEvD,OAAO;EAAE,GAAG;EAAmB,GAAG;EAAO;EACzC;AAIF,MAAM,iBAAiB,YAAwC,OAAO;CACpE,MAAM;CACN,MAAM,CAAC,WAAW,MAAM;CACzB,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,yBAAyB;CAErD,OAAO;EAAE,GAAG;EAAiB,GAAG;EAAO;EACvC;AAIF,MAAM,YAAY,YAAoC,QAAQ,QAAQ,CACpE,KAAA,IACC,UAAU;CACT,MAAM,EAAE,eAAe,yBAAyB;CAEhD,OAAO;EAAE,GAAG;EAAY,GAAG;EAAO;EAErC"}
1
+ {"version":3,"file":"tree.js","names":["createContext"],"sources":["../../../../src/components/tree/tree.tsx"],"sourcesContent":["\"use client\"\n\nimport type { ReactElement, ReactNode } from \"react\"\nimport type {\n GenericsComponent,\n HTMLProps,\n HTMLStyledProps,\n ThemeProps,\n} from \"../../core\"\nimport type { CheckboxProps } from \"../checkbox\"\nimport type { CollapseProps } from \"../collapse\"\nimport type { Loading } from \"../loading\"\nimport type { WithTransitionProps } from \"../motion\"\nimport type { TreeStyle } from \"./tree.style\"\nimport type { UseTreeItemProps, UseTreeProps } from \"./use-tree\"\nimport {\n Children,\n cloneElement,\n isValidElement,\n useCallback,\n useMemo,\n} from \"react\"\nimport { createSlotComponent, mergeProps, styled } from \"../../core\"\nimport {\n cast,\n createContext,\n dataAttr,\n isObject,\n isString,\n type ReactNodeOrFunction,\n runIfFn,\n} from \"../../utils\"\nimport { Checkbox } from \"../checkbox\"\nimport { Collapse } from \"../collapse\"\nimport { ChevronRightIcon } from \"../icon\"\nimport { useLoadingComponent } from \"../loading\"\nimport { treeStyle } from \"./tree.style\"\nimport {\n TreeContext,\n TreeDescendantsContext,\n TreeItemContext,\n useTree,\n useTreeContext,\n useTreeItem,\n} from \"./use-tree\"\n\ninterface TreeCallBackProps {\n disabled?: boolean\n expanded?: boolean\n}\n\ntype TreeItemReactNode =\n | ReactNodeOrFunction<TreeCallBackProps>\n | {\n group: ReactNodeOrFunction<TreeCallBackProps>\n item?: ReactNodeOrFunction<TreeCallBackProps>\n }\n | {\n item: ReactNodeOrFunction<TreeCallBackProps>\n group?: ReactNodeOrFunction<TreeCallBackProps>\n }\n\ninterface TreeItemWithValue extends Omit<TreeItemProps, \"children\"> {}\n\ninterface TreeItemWithChildren extends TreeItemWithValue {\n children: TreeItem[]\n}\n\nexport type TreeItem = TreeItemWithChildren | TreeItemWithValue\n\nconst recursiveTreeItem = (items?: TreeItem[]) => {\n return items?.map((props, index) => {\n const key =\n props.value || (isString(props.label) ? `${props.label}-${index}` : index)\n\n if (\"children\" in props) {\n const { children, ...rest } = props\n\n return (\n <TreeItem key={key} {...rest}>\n {recursiveTreeItem(children)}\n </TreeItem>\n )\n } else {\n return <TreeItem key={key} {...props} />\n }\n })\n}\n\nconst getReactNodeOrFunction = (\n type: \"group\" | \"item\",\n custom?: TreeItemReactNode,\n root?: TreeItemReactNode,\n): ReactNodeOrFunction<TreeCallBackProps> => {\n if (isObject(custom) && (\"group\" in custom || \"item\" in custom)) {\n return custom[type]\n } else if (custom) {\n return custom\n } else if (isObject(root) && (\"group\" in root || \"item\" in root)) {\n return root[type]\n } else {\n return root\n }\n}\n\ninterface ComponentContext extends Pick<\n TreeRootProps,\n | \"animated\"\n | \"checkboxProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"groupProps\"\n | \"indicator\"\n | \"indicatorHidden\"\n | \"indicatorProps\"\n | \"itemProps\"\n | \"labelProps\"\n | \"loadingScheme\"\n | \"size\"\n | \"startElement\"\n | \"startElementProps\"\n> {}\n\ninterface ItemComponentContext {\n checkboxProps: TreeCheckboxProps\n endElementProps: TreeEndElementProps\n indicatorProps: TreeIndicatorProps\n labelProps: TreeLabelProps\n startElementProps: TreeStartElementProps\n}\n\nconst [ItemComponentContext, useItemComponentContext] =\n createContext<ItemComponentContext>({ name: \"ItemComponentContext\" })\n\nexport interface TreeRootProps<Multiple extends boolean = false>\n extends\n HTMLStyledProps<\"ul\">,\n ThemeProps<TreeStyle>,\n UseTreeProps<Multiple>,\n Pick<\n TreeItemProps,\n | \"animated\"\n | \"checkboxProps\"\n | \"endElement\"\n | \"endElementProps\"\n | \"groupProps\"\n | \"indicator\"\n | \"indicatorProps\"\n | \"labelProps\"\n | \"loadingScheme\"\n | \"startElement\"\n | \"startElementProps\"\n > {\n /**\n * If `true`, hide the tree indicator icon for all items.\n *\n * @default false\n */\n indicatorHidden?: boolean\n /**\n * If provided, generate elements based on items.\n */\n items?: TreeItem[]\n /**\n * Props for the item component.\n */\n itemProps?: Omit<\n TreeItemProps,\n \"children\" | \"label\" | \"open\" | \"query\" | \"value\"\n >\n}\n\nconst {\n ComponentContext,\n PropsContext: TreePropsContext,\n useComponentContext,\n usePropsContext: useTreePropsContext,\n withContext,\n withProvider,\n} = createSlotComponent<TreeRootProps, TreeStyle, ComponentContext>(\n \"tree\",\n treeStyle,\n)\n\nexport { TreePropsContext, useTreePropsContext }\n\n/**\n * `Tree` is a component used to display hierarchical data structures in an expandable tree format.\n *\n * @see https://yamada-ui.com/docs/components/tree\n */\nexport const TreeRoot = withProvider<\"ul\", TreeRootProps, \"size\">(\n <Multiple extends boolean = false>({\n size,\n animated,\n children,\n endElement,\n indicator,\n indicatorHidden,\n items,\n loadingScheme,\n startElement,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n ...rest\n }: TreeRootProps<Multiple>) => {\n const computedChildren = useMemo(() => {\n if (children) return children\n\n return recursiveTreeItem(items)\n }, [children, items])\n const {\n activeDescendant,\n checkable,\n checkedValue,\n descendants,\n expandedValue,\n multiple,\n selectedValue,\n getRootProps,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n } = useTree({ ...rest, children: computedChildren })\n const context = useMemo(\n () => ({\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSearch,\n onSelectedChange,\n }),\n [\n activeDescendant,\n checkable,\n checkedValue,\n expandedValue,\n multiple,\n selectedValue,\n onActiveDescendant,\n onCheckedChange,\n onSearch,\n onCollapseAll,\n onExpandAll,\n onExpandedChange,\n onSelectedChange,\n ],\n )\n const componentContext = useMemo(\n () => ({\n size,\n animated,\n endElement,\n indicator,\n indicatorHidden,\n loadingScheme,\n startElement,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n }),\n [\n size,\n animated,\n endElement,\n indicator,\n indicatorHidden,\n startElement,\n endElementProps,\n groupProps,\n indicatorProps,\n itemProps,\n labelProps,\n startElementProps,\n checkboxProps,\n loadingScheme,\n ],\n )\n\n return (\n <TreeDescendantsContext value={descendants}>\n <TreeContext value={context}>\n <ComponentContext value={componentContext}>\n <styled.ul {...getRootProps()} />\n </ComponentContext>\n </TreeContext>\n </TreeDescendantsContext>\n )\n },\n \"root\",\n { transferProps: [\"size\"] },\n)() as GenericsComponent<{\n <Multiple extends boolean = false>(\n props: TreeRootProps<Multiple>,\n ): ReactElement\n}>\n\nexport interface TreeItemProps\n extends HTMLStyledProps<\"div\">, Omit<UseTreeItemProps, \"asyncChildren\"> {\n /**\n * The label to display in the item.\n */\n label: ReactNode\n /**\n * If `true`, the tree item will be animated.\n *\n * @default false\n */\n animated?: boolean\n /**\n * The element to display at the end of the item.\n */\n endElement?: TreeItemReactNode\n /**\n * The tree indicator icon to use.\n */\n indicator?: ReactNodeOrFunction<TreeCallBackProps>\n /**\n * The loading scheme.\n *\n * @default 'oval'\n */\n loadingScheme?: Loading.Scheme\n /**\n * The element to display at the start of the item.\n */\n startElement?: TreeItemReactNode\n /**\n * Props for the checkbox component.\n */\n checkboxProps?: Omit<CheckboxProps, \"checked\" | \"defaultChecked\" | \"value\">\n /**\n * Props for the end component.\n */\n endElementProps?: TreeEndElementProps\n /**\n * Props for the group component.\n */\n groupProps?: Omit<TreeGroupProps, \"children\">\n /**\n * Props for the indicator component.\n */\n indicatorProps?: TreeIndicatorProps\n /**\n * Props for the label component.\n */\n labelProps?: TreeLabelProps\n /**\n * Props for the root element.\n */\n rootProps?: HTMLStyledProps<\"li\">\n /**\n * Props for the start component.\n */\n startElementProps?: TreeStartElementProps\n /**\n * If provided, the tree item will be rendered as an async tree item.\n */\n asyncChildren?: () => Promise<TreeItem[]>\n}\n\nexport const TreeItem = withContext<\"div\", TreeItemProps>(\n ({\n className,\n css,\n colorScheme,\n animated: animatedProp,\n asyncChildren: asyncChildrenProp,\n endElement,\n indicator: indicatorProp,\n label,\n loadingScheme,\n query,\n startElement,\n value: valueProp = isString(label) ? label : undefined,\n checkboxProps,\n endElementProps,\n groupProps,\n indicatorProps,\n labelProps,\n rootProps,\n startElementProps,\n ...rest\n }) => {\n const { checkable } = useTreeContext()\n const componentContext = useComponentContext()\n const Loading = useLoadingComponent(\n loadingScheme ?? componentContext.loadingScheme ?? \"oval\",\n )\n const animated = animatedProp ?? componentContext.animated\n const indicator = indicatorProp ?? componentContext.indicator\n const groupStartElement = getReactNodeOrFunction(\n \"group\",\n startElement,\n componentContext.startElement,\n )\n const groupEndElement = getReactNodeOrFunction(\n \"group\",\n endElement,\n componentContext.endElement,\n )\n const itemStartElement = getReactNodeOrFunction(\n \"item\",\n startElement,\n componentContext.startElement,\n )\n const itemEndElement = getReactNodeOrFunction(\n \"item\",\n endElement,\n componentContext.endElement,\n )\n const asyncChildren = useCallback(async () => {\n const items = await asyncChildrenProp?.()\n\n return recursiveTreeItem(items)\n }, [asyncChildrenProp])\n const {\n branchOpen,\n children,\n disabled,\n group,\n groupLoading,\n groupOpen,\n level,\n props,\n value,\n getCheckboxProps,\n getGroupItemProps,\n getGroupProps,\n getIndicatorProps,\n getItemProps,\n getLabelProps,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n } = useTreeItem({\n ...componentContext.itemProps,\n ...rest,\n asyncChildren: asyncChildrenProp ? asyncChildren : undefined,\n query: query ?? (isString(label) ? label : undefined),\n value: valueProp,\n })\n const itemProps = {\n className,\n css,\n colorScheme,\n \"--level\": level.toString(),\n ...rootProps,\n }\n const callbackProps = { disabled, expanded: groupOpen }\n const context = useMemo(\n () => ({\n branchOpen,\n groupOpen,\n level,\n value,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n }),\n [\n branchOpen,\n groupOpen,\n level,\n value,\n onGroupClose,\n onGroupOpen,\n onGroupToggle,\n ],\n )\n const itemComponentContext = useMemo(\n () => ({\n checkboxProps: {\n size: componentContext.size,\n ...getCheckboxProps({\n ...componentContext.checkboxProps,\n ...checkboxProps,\n }),\n },\n endElementProps: {\n ...componentContext.endElementProps,\n ...endElementProps,\n },\n indicatorProps: {\n ...getIndicatorProps({\n ...componentContext.indicatorProps,\n ...indicatorProps,\n }),\n },\n labelProps: {\n ...getLabelProps({\n ...componentContext.labelProps,\n ...labelProps,\n }),\n },\n startElementProps: {\n ...componentContext.startElementProps,\n ...startElementProps,\n },\n }),\n [\n checkboxProps,\n componentContext.checkboxProps,\n componentContext.endElementProps,\n componentContext.indicatorProps,\n componentContext.labelProps,\n componentContext.size,\n componentContext.startElementProps,\n endElementProps,\n getCheckboxProps,\n getIndicatorProps,\n getLabelProps,\n indicatorProps,\n labelProps,\n startElementProps,\n ],\n )\n\n return (\n <TreeItemContext value={context}>\n <ItemComponentContext value={itemComponentContext}>\n {group ? (\n <styled.li {...getGroupItemProps(itemProps)}>\n <styled.div data-content {...props}>\n <TreeIndicator data-animated={dataAttr(animated)}>\n {groupLoading ? (\n <Loading />\n ) : (\n runIfFn(indicator, callbackProps)\n )}\n </TreeIndicator>\n {checkable ? <TreeCheckbox /> : null}\n {groupStartElement ? (\n <TreeStartElement>\n {runIfFn(groupStartElement, callbackProps)}\n </TreeStartElement>\n ) : null}\n {label ? <TreeLabel>{label}</TreeLabel> : null}\n {groupEndElement ? (\n <TreeEndElement>\n {runIfFn(groupEndElement, callbackProps)}\n </TreeEndElement>\n ) : null}\n </styled.div>\n\n <TreeGroup\n duration={!animated ? 0 : undefined}\n open={groupOpen}\n {...getGroupProps({\n ...componentContext.groupProps,\n ...groupProps,\n })}\n >\n {children}\n </TreeGroup>\n </styled.li>\n ) : (\n <styled.li {...getItemProps(itemProps)}>\n <styled.div data-content {...props}>\n <TreeIndicator data-hidden />\n {checkable ? <TreeCheckbox /> : null}\n {itemStartElement ? (\n <TreeStartElement>\n {runIfFn(itemStartElement, callbackProps)}\n </TreeStartElement>\n ) : null}\n {label ? <TreeLabel>{label}</TreeLabel> : null}\n {itemEndElement ? (\n <TreeEndElement>\n {runIfFn(itemEndElement, callbackProps)}\n </TreeEndElement>\n ) : null}\n </styled.div>\n </styled.li>\n )}\n </ItemComponentContext>\n </TreeItemContext>\n )\n },\n \"item\",\n)()\n\ninterface TreeGroupProps\n extends\n Omit<HTMLStyledProps<\"ul\">, \"transition\">,\n Pick<CollapseProps, \"animationOpacity\" | keyof WithTransitionProps> {}\n\nconst TreeGroup = withContext<\"ul\", TreeGroupProps>((props) => {\n return <Collapse as=\"ul\" {...cast<CollapseProps>(props)} />\n}, \"group\")()\n\ninterface TreeIndicatorProps extends HTMLStyledProps<\"svg\"> {}\n\nconst TreeIndicator = withContext<\"svg\", TreeIndicatorProps>(\n ({ children = <ChevronRightIcon />, ...rest }) => {\n const { indicatorHidden } = useComponentContext()\n\n if (indicatorHidden) return null\n\n if (isValidElement<HTMLProps<\"svg\">>(children))\n return cloneElement(children, { ...rest, ...children.props })\n\n return Children.count(children) > 1 ? Children.only(null) : null\n },\n \"indicator\",\n)(undefined, (props) => {\n const { indicatorProps } = useItemComponentContext()\n\n return mergeProps(indicatorProps, props)()\n})\n\ninterface TreeCheckboxProps extends CheckboxProps {}\n\nconst TreeCheckbox = withContext<\"input\", TreeCheckboxProps>(\n Checkbox,\n \"checkbox\",\n)(undefined, (props) => {\n const { checkboxProps } = useItemComponentContext()\n\n return mergeProps(checkboxProps, props)()\n})\n\ninterface TreeStartElementProps extends HTMLStyledProps {}\n\nconst TreeStartElement = withContext<\"div\", TreeStartElementProps>(\"div\", {\n name: \"StartElement\",\n slot: [\"element\", \"start\"],\n})(undefined, (props) => {\n const { startElementProps } = useItemComponentContext()\n\n return mergeProps(startElementProps, props)()\n})\n\ninterface TreeEndElementProps extends HTMLStyledProps {}\n\nconst TreeEndElement = withContext<\"div\", TreeEndElementProps>(\"div\", {\n name: \"EndElement\",\n slot: [\"element\", \"end\"],\n})(undefined, (props) => {\n const { endElementProps } = useItemComponentContext()\n\n return mergeProps(endElementProps, props)()\n})\n\ninterface TreeLabelProps extends HTMLStyledProps<\"span\"> {}\n\nconst TreeLabel = withContext<\"span\", TreeLabelProps>(\"span\", \"label\")(\n undefined,\n (props) => {\n const { labelProps } = useItemComponentContext()\n\n return mergeProps(labelProps, props)()\n },\n)\n"],"mappings":";;;;;;;;;;;;;;;AAsEA,MAAM,qBAAqB,UAAuB;CAChD,OAAO,OAAO,KAAK,OAAO,UAAU;EAClC,MAAM,MACJ,MAAM,WAAA,GAAA,cAAA,UAAmB,MAAM,MAAM,GAAG,GAAG,MAAM,MAAM,GAAG,UAAU;EAEtE,IAAI,cAAc,OAAO;GACvB,MAAM,EAAE,UAAU,GAAG,SAAS;GAE9B,OACE,oBAAC,UAAD;IAAoB,GAAI;cACrB,kBAAkB,SAAS;IACnB,EAFI,IAEJ;SAGb,OAAO,oBAAC,UAAD,EAAoB,GAAI,OAAS,EAAlB,IAAkB;GAE1C;;AAGJ,MAAM,0BACJ,MACA,QACA,SAC2C;CAC3C,KAAA,GAAA,cAAA,UAAa,OAAO,KAAK,WAAW,UAAU,UAAU,SACtD,OAAO,OAAO;MACT,IAAI,QACT,OAAO;MACF,KAAA,GAAA,cAAA,UAAa,KAAK,KAAK,WAAW,QAAQ,UAAU,OACzD,OAAO,KAAK;MAEZ,OAAO;;AA8BX,MAAM,CAAC,sBAAsB,2BAC3BA,gBAAoC,EAAE,MAAM,wBAAwB,CAAC;AAwCvE,MAAM,EACJ,kBACA,cAAc,kBACd,qBACA,iBAAiB,qBACjB,aACA,iBACE,oBACF,QACA,UACD;;;;;;AASD,MAAa,WAAW,cACa,EACjC,MACA,UACA,UACA,YACA,WACA,iBACA,OACA,eACA,cACA,eACA,iBACA,YACA,gBACA,WACA,YACA,mBACA,GAAG,WAC0B;CAC7B,MAAM,mBAAmB,cAAc;EACrC,IAAI,UAAU,OAAO;EAErB,OAAO,kBAAkB,MAAM;IAC9B,CAAC,UAAU,MAAM,CAAC;CACrB,MAAM,EACJ,kBACA,WACA,cACA,aACA,eACA,UACA,eACA,cACA,oBACA,iBACA,eACA,aACA,kBACA,UACA,qBACE,QAAQ;EAAE,GAAG;EAAM,UAAU;EAAkB,CAAC;CAoEpD,OACE,oBAAC,wBAAD;EAAwB,OAAO;YAC7B,oBAAC,aAAD;GAAa,OArED,eACP;IACL;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,GACD;IACE;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACD,CAuC4B;aACzB,oBAAC,kBAAD;IAAkB,OAtCC,eAChB;KACL;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,GACD;KACE;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACA;KACD,CAM4C;cACvC,oBAAC,OAAO,IAAR,EAAW,GAAI,cAAc,EAAI,CAAA;IAChB,CAAA;GACP,CAAA;EACS,CAAA;GAG7B,QACA,EAAE,eAAe,CAAC,OA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mB,YAA0C,OAAO;CACxE,MAAM;CACN,MAAM,CAAC,WAAW,QAAQ;CAC3B,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,sBAAsB,yBAAyB;CAEvD,OAAO,WAAW,mBAAmB,MAAM,EAAE;EAC7C;AAIF,MAAM,iBAAiB,YAAwC,OAAO;CACpE,MAAM;CACN,MAAM,CAAC,WAAW,MAAM;CACzB,CAAC,CAAC,KAAA,IAAY,UAAU;CACvB,MAAM,EAAE,oBAAoB,yBAAyB;CAErD,OAAO,WAAW,iBAAiB,MAAM,EAAE;EAC3C;AAIF,MAAM,YAAY,YAAoC,QAAQ,QAAQ,CACpE,KAAA,IACC,UAAU;CACT,MAAM,EAAE,eAAe,yBAAyB;CAEhD,OAAO,WAAW,YAAY,MAAM,EAAE;EAEzC"}
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/accordion/accordion.style.d.ts
4
- declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "item" | "root", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "item" | "root">>, {
4
+ declare const accordionStyle: ComponentSlotStyle<"button" | "panel" | "icon" | "root" | "item", CSSPropObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, CSSModifierObject<CSSSlotObject<"button" | "panel" | "icon" | "root" | "item">>, {
5
5
  panel: {
6
6
  button: {
7
7
  rounded: "l2";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/alert/alert.style.d.ts
4
- declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "root" | "description", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "root" | "description">>, {
4
+ declare const alertStyle: ComponentSlotStyle<"title" | "loading" | "icon" | "description" | "root", CSSPropObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, CSSModifierObject<CSSSlotObject<"title" | "loading" | "icon" | "description" | "root">>, {
5
5
  island: {
6
6
  description: {
7
7
  color: "fg.muted";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/autocomplete/autocomplete.style.d.ts
4
- declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "empty" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "indicator" | "field" | "empty" | "valueText">>, {
4
+ declare const autocompleteStyle: ComponentSlotStyle<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "indicator" | "empty" | "valueText", CSSPropObject<CSSSlotObject<"input" | "label" | "option" | "content" | "group" | "separator" | "icon" | "root" | "field" | "indicator" | "empty" | "valueText">>, {
5
5
  xs: {
6
6
  empty: {
7
7
  gap: "1.5";
@@ -23,7 +23,7 @@ interface AvatarProps extends HTMLStyledProps, ThemeProps<AvatarStyle>, UseAvata
23
23
  */
24
24
  imageProps?: AvatarImageProps;
25
25
  }
26
- declare const component: <H extends "fragment" | As = "div", R extends _$_yamada_ui_utils0.Dict = _$_yamada_ui_utils0.Dict<any>>(el: H | _$react.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
26
+ declare const component: <H extends As | "fragment" = "div", R extends _$_yamada_ui_utils0.Dict = _$_yamada_ui_utils0.Dict<any>>(el: H | _$react.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"image" | "group" | "root" | "fallback", {
27
27
  shape: {
28
28
  circle: {
29
29
  root: {
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/breadcrumb/breadcrumb.style.d.ts
4
- declare const breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "item" | "root", CSSPropObject<CSSSlotObject<"link" | "list" | "separator" | "ellipsis" | "item" | "root">>, {
4
+ declare const breadcrumbStyle: ComponentSlotStyle<"link" | "list" | "separator" | "ellipsis" | "root" | "item", CSSPropObject<CSSSlotObject<"link" | "list" | "separator" | "ellipsis" | "root" | "item">>, {
5
5
  sm: {
6
6
  list: {
7
7
  fontSize: "sm";
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/calendar/calendar.style.d.ts
4
- declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "weekday" | "day" | "control" | "months" | "prev" | "weeks" | "years", {
4
+ declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "control" | "weekday" | "day" | "months" | "years" | "weeks" | "prev", {
5
5
  /**
6
6
  * If `true`, the calendar will be fixed rows.
7
7
  *
@@ -73,7 +73,7 @@ declare const calendarStyle: ComponentSlotStyle<"button" | "select" | "cell" | "
73
73
  "--font-size": "fontSizes.xl";
74
74
  };
75
75
  };
76
- }, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "weekday" | "day" | "control" | "months" | "prev" | "weeks" | "years">>>;
76
+ }, CSSModifierObject<CSSSlotObject<"button" | "select" | "cell" | "navigation" | "row" | "separator" | "next" | "root" | "month" | "week" | "control" | "weekday" | "day" | "months" | "years" | "weeks" | "prev">>>;
77
77
  type CalendarStyle = typeof calendarStyle;
78
78
  //#endregion
79
79
  export { CalendarStyle, calendarStyle };
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/carousel/carousel.style.d.ts
4
- declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "item" | "root" | "trigger" | "indicator" | "prev" | "indicators", CSSPropObject<CSSSlotObject<"list" | "next" | "item" | "root" | "trigger" | "indicator" | "prev" | "indicators">>, {
4
+ declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "root" | "item" | "indicator" | "trigger" | "indicators" | "prev", CSSPropObject<CSSSlotObject<"list" | "next" | "root" | "item" | "indicator" | "trigger" | "indicators" | "prev">>, {
5
5
  sm: {
6
6
  root: {
7
7
  h: "sm";
@@ -17,7 +17,7 @@ declare const carouselStyle: ComponentSlotStyle<"list" | "next" | "item" | "root
17
17
  h: "lg";
18
18
  };
19
19
  };
20
- }, CSSModifierObject<CSSSlotObject<"list" | "next" | "item" | "root" | "trigger" | "indicator" | "prev" | "indicators">>>;
20
+ }, CSSModifierObject<CSSSlotObject<"list" | "next" | "root" | "item" | "indicator" | "trigger" | "indicators" | "prev">>>;
21
21
  type CarouselStyle = typeof carouselStyle;
22
22
  //#endregion
23
23
  export { CarouselStyle, carouselStyle };
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/chart/cartesian-chart.style.d.ts
4
- declare const cartesianChartStyle: ComponentSlotStyle<"area" | "line" | "grid" | "bar" | "dot" | "root" | "labelList" | "activeDot" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine", CSSPropObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "labelList" | "activeDot" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "labelList" | "activeDot" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "labelList" | "activeDot" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>>;
4
+ declare const cartesianChartStyle: ComponentSlotStyle<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine", CSSPropObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>, CSSModifierObject<CSSSlotObject<"area" | "line" | "grid" | "bar" | "dot" | "root" | "activeDot" | "labelList" | "referenceLine" | "referenceLineLabel" | "xAxis" | "xAxisLabel" | "xAxisTick" | "xAxisTickLine" | "yAxis" | "yAxisLabel" | "yAxisTick" | "yAxisTickLine">>>;
5
5
  type CartesianChartStyle = typeof cartesianChartStyle;
6
6
  //#endregion
7
7
  export { CartesianChartStyle, cartesianChartStyle };
@@ -1,7 +1,7 @@
1
1
  import { ComponentSlotStyle } from "../../core/system/index.types.js";
2
2
  import { CSSModifierObject, CSSPropObject, CSSSlotObject } from "../../core/css/index.types.js";
3
3
  //#region src/components/chart/polar-chart.style.d.ts
4
- declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "labelList" | "activeDot" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "labelLine" | "pie" | "radar" | "radial" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
4
+ declare const polarChartStyle: ComponentSlotStyle<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector", CSSPropObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>, CSSModifierObject<CSSSlotObject<"label" | "grid" | "dot" | "root" | "radial" | "labelLine" | "activeDot" | "labelList" | "angleAxis" | "angleAxisLabel" | "angleAxisLine" | "angleAxisTick" | "angleAxisTickLine" | "pie" | "radar" | "radialBackground" | "radiusAxis" | "radiusAxisLabel" | "radiusAxisLine" | "radiusAxisTick" | "radiusAxisTickLine" | "sector">>>;
5
5
  type PolarChartStyle = typeof polarChartStyle;
6
6
  //#endregion
7
7
  export { PolarChartStyle, polarChartStyle };
@@ -37,7 +37,7 @@ interface CheckboxProps<Y extends string = string> extends Merge<HTMLStyledProps
37
37
  */
38
38
  rootProps?: HTMLStyledProps<"label">;
39
39
  }
40
- declare const component: <H extends "fragment" | As = "div", R extends _$_yamada_ui_utils0.Dict = _$_yamada_ui_utils0.Dict<any>>(el: H | _$react.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
40
+ declare const component: <H extends As | "fragment" = "div", R extends _$_yamada_ui_utils0.Dict = _$_yamada_ui_utils0.Dict<any>>(el: H | _$react.FC<R>, slot?: ComponentSlot<ComponentSlotName<ComponentSlotStyle<"label" | "group" | "root" | "indicator", {
41
41
  shape: {
42
42
  rounded: {
43
43
  indicator: {