@ngrok/mantle 0.60.1 → 0.60.3

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 (122) hide show
  1. package/dist/accordion.js +1 -1
  2. package/dist/accordion.js.map +1 -1
  3. package/dist/alert-dialog.js +1 -1
  4. package/dist/alert-dialog.js.map +1 -1
  5. package/dist/alert.js +1 -1
  6. package/dist/alert.js.map +1 -1
  7. package/dist/anchor.js +1 -1
  8. package/dist/anchor.js.map +1 -1
  9. package/dist/auto-scroll-to-hash.js +1 -1
  10. package/dist/auto-scroll-to-hash.js.map +1 -1
  11. package/dist/badge.js +1 -1
  12. package/dist/badge.js.map +1 -1
  13. package/dist/button.js +1 -1
  14. package/dist/calendar.js +1 -1
  15. package/dist/calendar.js.map +1 -1
  16. package/dist/card.js +1 -1
  17. package/dist/card.js.map +1 -1
  18. package/dist/checkbox.js.map +1 -1
  19. package/dist/{chunk-GYPSB3OK.js → chunk-7MJQGBE4.js} +1 -1
  20. package/dist/chunk-7MJQGBE4.js.map +1 -0
  21. package/dist/chunk-B2CXQETQ.js +2 -0
  22. package/dist/chunk-B2CXQETQ.js.map +1 -0
  23. package/dist/{chunk-EVAIBP32.js → chunk-ERCBHCUY.js} +2 -2
  24. package/dist/chunk-ERCBHCUY.js.map +1 -0
  25. package/dist/{chunk-X7RUBITL.js → chunk-GLSHD37P.js} +1 -1
  26. package/dist/chunk-GLSHD37P.js.map +1 -0
  27. package/dist/chunk-HG2MWNPU.js +2 -0
  28. package/dist/chunk-HG2MWNPU.js.map +1 -0
  29. package/dist/{chunk-2PHWBRBD.js → chunk-HL2HWYKP.js} +2 -2
  30. package/dist/{chunk-2PHWBRBD.js.map → chunk-HL2HWYKP.js.map} +1 -1
  31. package/dist/{chunk-YKYEISYH.js → chunk-LURP5WQR.js} +2 -2
  32. package/dist/{chunk-YKYEISYH.js.map → chunk-LURP5WQR.js.map} +1 -1
  33. package/dist/{chunk-OE4YWO7O.js → chunk-NQZYWYVH.js} +2 -2
  34. package/dist/chunk-NQZYWYVH.js.map +1 -0
  35. package/dist/{chunk-UNFO4DZV.js → chunk-ODDNPNLN.js} +1 -1
  36. package/dist/chunk-ODDNPNLN.js.map +1 -0
  37. package/dist/{chunk-3C5O3AQA.js → chunk-OP6JMBKJ.js} +1 -1
  38. package/dist/{chunk-3C5O3AQA.js.map → chunk-OP6JMBKJ.js.map} +1 -1
  39. package/dist/{chunk-EE3FMPPW.js → chunk-RLW7NBZU.js} +2 -2
  40. package/dist/chunk-RLW7NBZU.js.map +1 -0
  41. package/dist/{chunk-2NIR7PCL.js → chunk-SBVSECWW.js} +1 -1
  42. package/dist/{chunk-2NIR7PCL.js.map → chunk-SBVSECWW.js.map} +1 -1
  43. package/dist/{chunk-M6TUHYJA.js → chunk-SK2YHT6N.js} +2 -2
  44. package/dist/{chunk-M6TUHYJA.js.map → chunk-SK2YHT6N.js.map} +1 -1
  45. package/dist/{chunk-V4TWM6RF.js → chunk-SMYI7SUP.js} +1 -1
  46. package/dist/{chunk-V4TWM6RF.js.map → chunk-SMYI7SUP.js.map} +1 -1
  47. package/dist/{chunk-STC52KT6.js → chunk-U5GD6FHU.js} +1 -1
  48. package/dist/chunk-U5GD6FHU.js.map +1 -0
  49. package/dist/chunk-Y7RHMF43.js +2 -0
  50. package/dist/chunk-Y7RHMF43.js.map +1 -0
  51. package/dist/{chunk-3AUCEZTZ.js → chunk-ZCTK5X4D.js} +2 -2
  52. package/dist/{chunk-3AUCEZTZ.js.map → chunk-ZCTK5X4D.js.map} +1 -1
  53. package/dist/code-block.js +1 -1
  54. package/dist/code-block.js.map +1 -1
  55. package/dist/color.js.map +1 -1
  56. package/dist/combobox.js +1 -1
  57. package/dist/combobox.js.map +1 -1
  58. package/dist/command.js +1 -1
  59. package/dist/command.js.map +1 -1
  60. package/dist/data-table.d.ts +1 -1
  61. package/dist/data-table.js +1 -1
  62. package/dist/data-table.js.map +1 -1
  63. package/dist/dialog.js +1 -1
  64. package/dist/dropdown-menu.js +1 -1
  65. package/dist/dropdown-menu.js.map +1 -1
  66. package/dist/flag.js +1 -1
  67. package/dist/flag.js.map +1 -1
  68. package/dist/hooks.js +1 -1
  69. package/dist/hooks.js.map +1 -1
  70. package/dist/hover-card.js.map +1 -1
  71. package/dist/icon.js +1 -1
  72. package/dist/icons.js +1 -1
  73. package/dist/icons.js.map +1 -1
  74. package/dist/input.js +1 -1
  75. package/dist/input.js.map +1 -1
  76. package/dist/label.js +1 -1
  77. package/dist/label.js.map +1 -1
  78. package/dist/mantle.css +97 -101
  79. package/dist/media-object.js +1 -1
  80. package/dist/media-object.js.map +1 -1
  81. package/dist/pagination.js +1 -1
  82. package/dist/pagination.js.map +1 -1
  83. package/dist/popover.js.map +1 -1
  84. package/dist/progress.js.map +1 -1
  85. package/dist/radio-group.js +1 -1
  86. package/dist/radio-group.js.map +1 -1
  87. package/dist/sandboxed-on-click.d.ts +1 -1
  88. package/dist/sandboxed-on-click.js +1 -1
  89. package/dist/sandboxed-on-click.js.map +1 -1
  90. package/dist/select.js +1 -1
  91. package/dist/separator.js +1 -1
  92. package/dist/sheet.js +1 -1
  93. package/dist/sheet.js.map +1 -1
  94. package/dist/skeleton.js +1 -1
  95. package/dist/skeleton.js.map +1 -1
  96. package/dist/slot.js +1 -1
  97. package/dist/sorting.js +1 -1
  98. package/dist/switch.js +1 -1
  99. package/dist/switch.js.map +1 -1
  100. package/dist/table.js +1 -1
  101. package/dist/tabs.js +1 -1
  102. package/dist/tabs.js.map +1 -1
  103. package/dist/theme.d.ts +1 -23
  104. package/dist/theme.js +1 -1
  105. package/dist/toast.d.ts +13 -0
  106. package/dist/toast.js +1 -1
  107. package/dist/tooltip.js.map +1 -1
  108. package/dist/types.js +1 -1
  109. package/package.json +165 -165
  110. package/dist/chunk-EE3FMPPW.js.map +0 -1
  111. package/dist/chunk-EVAIBP32.js.map +0 -1
  112. package/dist/chunk-GC6NS32Q.js +0 -2
  113. package/dist/chunk-GC6NS32Q.js.map +0 -1
  114. package/dist/chunk-GYPSB3OK.js.map +0 -1
  115. package/dist/chunk-OE4YWO7O.js.map +0 -1
  116. package/dist/chunk-STC52KT6.js.map +0 -1
  117. package/dist/chunk-UKS7NFNC.js +0 -2
  118. package/dist/chunk-UKS7NFNC.js.map +0 -1
  119. package/dist/chunk-UNFO4DZV.js.map +0 -1
  120. package/dist/chunk-VBNDWNIJ.js +0 -2
  121. package/dist/chunk-VBNDWNIJ.js.map +0 -1
  122. package/dist/chunk-X7RUBITL.js.map +0 -1
package/dist/tabs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import {\n\tContent as TabsPrimitiveContent,\n\tList as TabsPrimitiveList,\n\tRoot as TabsPrimitiveRoot,\n\tTrigger as TabsPrimitiveTrigger,\n} from \"@radix-ui/react-tabs\";\nimport { cva } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport type {\n\tComponentPropsWithoutRef,\n\tComponentRef,\n\tHTMLAttributes,\n} from \"react\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { parseBooleanish } from \"../../types/booleanish.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\ntype Appearance = \"classic\" | \"pill\";\n\ntype TabsStateContextValue = {\n\torientation: Orientation;\n\tappearance: Appearance;\n};\n\nconst TabsStateContext = createContext<TabsStateContextValue>({\n\torientation: \"horizontal\",\n\tappearance: \"classic\",\n});\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Root = forwardRef<\n\tComponentRef<typeof TabsPrimitiveRoot>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveRoot> & {\n\t\t/**\n\t\t * The appearance of the tabs. Classic appearance shows the tab\n\t\t * list with an underline; pill appearance shows each tab as a pill.\n\t\t * @default \"classic\"\n\t\t */\n\t\tappearance?: \"classic\" | \"pill\";\n\t}\n>(\n\t(\n\t\t{\n\t\t\tclassName,\n\t\t\tchildren,\n\t\t\torientation = \"horizontal\",\n\t\t\tappearance = \"classic\",\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => (\n\t\t<TabsPrimitiveRoot\n\t\t\tclassName={cx(\n\t\t\t\t\"flex gap-4\",\n\t\t\t\torientation === \"horizontal\" ? \"flex-col\" : \"flex-row\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\torientation={orientation}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t>\n\t\t\t<TabsStateContext.Provider value={{ orientation, appearance }}>\n\t\t\t\t{children}\n\t\t\t</TabsStateContext.Provider>\n\t\t</TabsPrimitiveRoot>\n\t),\n);\nRoot.displayName = \"Tabs\";\n\n/**\n * Variants for the List component\n */\nconst listVariants = cva(\"flex border-gray-200\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"flex-row items-center\",\n\t\t\tvertical: \"flex-col items-end gap-3.5 self-stretch\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"\",\n\t\t\tpill: \"\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"pill\",\n\t\t\tclassName: \"gap-1\",\n\t\t},\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"gap-6 border-b\",\n\t\t},\n\t\t{\n\t\t\torientation: \"vertical\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"border-r\",\n\t\t},\n\t],\n});\n\n/**\n * Contains the triggers that are aligned along the edge of the active content.\n * The container for tab triggers that provides the visual layout for tab navigation.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst List = forwardRef<\n\tComponentRef<typeof TabsPrimitiveList>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveList>\n>(({ className, ...props }, ref) => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<TabsPrimitiveList\n\t\t\taria-orientation={orientation}\n\t\t\tclassName={cx(listVariants({ orientation, appearance }), className)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nList.displayName = \"TabsList\";\n\ntype TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitiveTrigger>;\n\n/**\n * Variants for the TabsTriggerDecoration component\n */\nconst triggerDecorationVariants = cva(\"absolute z-0\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"-bottom-px left-0 right-0 h-[0.1875rem]\",\n\t\t\tvertical: \"-right-px bottom-0 top-0 w-[0.1875rem]\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"group-data-state-active/tab-trigger:bg-blue-600\",\n\t\t\tpill: \"hidden\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n});\n\nconst TabsTriggerDecoration = () => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<span\n\t\t\taria-hidden\n\t\t\tclassName={clsx(triggerDecorationVariants({ orientation, appearance }))}\n\t\t/>\n\t);\n};\nTabsTriggerDecoration.displayName = \"TabsTriggerDecoration\";\n\n/**\n * Variants for the Trigger component\n */\nconst triggerVariants = cva(\n\tcx(\n\t\t\"group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600\",\n\t\t\"ring-focus-accent outline-hidden\",\n\t\t\"aria-disabled:cursor-default aria-disabled:opacity-50\",\n\t\t\"focus-visible:ring-4\",\n\t\t\"[&>svg]:shrink-0 [&>svg]:size-5\",\n\t\t\"not-aria-disabled:hover:text-gray-900\",\n\t),\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal: \"rounded-tl-md rounded-tr-md\",\n\t\t\t\tvertical: \"rounded-bl-md rounded-tl-md pr-3\",\n\t\t\t} as const satisfies Record<Orientation, string>,\n\t\t\tappearance: {\n\t\t\t\tclassic: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-600\",\n\t\t\t\t\t\"data-state-active:text-blue-600\",\n\t\t\t\t),\n\t\t\t\tpill: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-700\",\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"data-state-active:text-blue-700\",\n\t\t\t\t\t\"data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"rounded-full py-2 px-3\",\n\t\t\t\t),\n\t\t\t} as const satisfies Record<Appearance, string>,\n\t\t},\n\t},\n);\n\n/**\n * The button that activates its associated content.\n * A clickable tab trigger that switches between different tab content panels.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Trigger = forwardRef<\n\tComponentRef<typeof TabsPrimitiveTrigger>,\n\tTabsTriggerProps\n>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { orientation, appearance } = useContext(TabsStateContext);\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled);\n\n\t\tconst tabsTriggerProps = {\n\t\t\t\"aria-disabled\": _ariaDisabled ?? _disabled,\n\t\t\tclassName: cx(triggerVariants({ orientation, appearance }), className),\n\t\t\tdisabled,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tinvariant(\n\t\t\t\tisValidElement<TabsTriggerProps>(singleChild),\n\t\t\t\t\"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag.\",\n\t\t\t);\n\t\t\tconst grandchildren = singleChild.props?.children;\n\n\t\t\tconst cloneProps = {\n\t\t\t\t...(disabled\n\t\t\t\t\t? /**\n\t\t\t\t\t\t * When disabled, prevent anchor/link children from being clickable by\n\t\t\t\t\t\t * removing their href/to props!\n\t\t\t\t\t\t * This is necessary because `<a>` doesn't support the `disabled`\n\t\t\t\t\t\t * attribute and would be navigable. We could use `pointer-events-none`\n\t\t\t\t\t\t * instead, but don't by default because it would also prevent tooltip\n\t\t\t\t\t\t * interactions, which may be surprising.\n\t\t\t\t\t\t */\n\t\t\t\t\t\t{ href: undefined, to: undefined }\n\t\t\t\t\t: /**\n\t\t\t\t\t\t * when NOT disabled, allow keyboard navigation to the trigger,\n\t\t\t\t\t\t * even for asChild anchors/links\n\t\t\t\t\t\t */\n\t\t\t\t\t\t{ tabIndex: 0 }),\n\t\t\t};\n\n\t\t\treturn (\n\t\t\t\t<TabsPrimitiveTrigger asChild {...tabsTriggerProps} ref={ref}>\n\t\t\t\t\t{cloneElement(\n\t\t\t\t\t\tdisabled ? <button type=\"button\" /> : singleChild,\n\t\t\t\t\t\tcloneProps,\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t\t</>,\n\t\t\t\t\t)}\n\t\t\t\t</TabsPrimitiveTrigger>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TabsPrimitiveTrigger ref={ref} {...tabsTriggerProps}>\n\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t{children}\n\t\t\t</TabsPrimitiveTrigger>\n\t\t);\n\t},\n);\nTrigger.displayName = \"TabsTrigger\";\n\n/**\n * A badge component that can be used inside tab triggers to display additional information.\n * Typically used to show counts or status indicators within tab headers.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">\n * Account <Tabs.Badge>5</Tabs.Badge>\n * </Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * </Tabs.Root>\n * ```\n */\nconst Badge = ({\n\tclassName,\n\tchildren,\n\t...props\n}: HTMLAttributes<HTMLSpanElement>) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"rounded-full bg-gray-500/20 px-1.5 text-xs font-medium text-gray-600\",\n\t\t\t\"group-data-state-active/tab-trigger:bg-blue-500/20 group-data-state-active/tab-trigger:text-blue-700 group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-blue-700\",\n\t\t\t\"group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</span>\n);\nBadge.displayName = \"TabBadge\";\n\n/**\n * Contains the content associated with each trigger.\n * The content panel that displays when its corresponding tab trigger is active.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TabsPrimitiveContent>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveContent>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitiveContent\n\t\tref={ref}\n\t\tclassName={cx(\n\t\t\t\"focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t/>\n));\nContent.displayName = \"TabsContent\";\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Tabs = {\n\t/**\n\t * The root container of the tabs component that provides context for all tab components.\n\t * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * Contains the content associated with each trigger.\n\t * The content panel that displays when its corresponding tab trigger is active.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * Contains the triggers that are aligned along the edge of the active content.\n\t * The container for tab triggers that provides the visual layout for tab navigation.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * The button that activates its associated content.\n\t * A clickable tab trigger that switches between different tab content panels.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tTrigger,\n\t/**\n\t * A badge component that can be used inside tab triggers to display additional information.\n\t * Typically used to show counts or status indicators within tab headers.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">\n\t * Account <Tabs.Badge>5</Tabs.Badge>\n\t * </Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tBadge,\n} as const;\n\nexport {\n\t//\n\tTabs,\n};\n"],"mappings":"gFAAA,OACC,WAAWA,EACX,QAAQC,EACR,QAAQC,EACR,WAAWC,MACL,uBACP,OAAS,OAAAC,MAAW,2BACpB,OAAOC,MAAU,OAMjB,OACC,YAAAC,EACA,gBAAAC,EACA,iBAAAC,EACA,cAAAC,EACA,kBAAAC,EACA,cAAAC,MACM,QACP,OAAOC,MAAe,iBAsEnB,OAyNG,YAAAC,EAzNH,OAAAC,EAyNG,QAAAC,MAzNH,oBA1DH,IAAMC,EAAmBC,EAAqC,CAC7D,YAAa,aACb,WAAY,SACb,CAAC,EAwBKC,EAAOC,EAWZ,CACC,CACC,UAAAC,EACA,SAAAC,EACA,YAAAC,EAAc,aACd,WAAAC,EAAa,UACb,GAAGC,CACJ,EACAC,IAEAX,EAACY,EAAA,CACA,UAAWC,EACV,aACAL,IAAgB,aAAe,WAAa,WAC5CF,CACD,EACA,YAAaE,EACb,IAAKG,EACJ,GAAGD,EAEJ,SAAAV,EAACE,EAAiB,SAAjB,CAA0B,MAAO,CAAE,YAAAM,EAAa,WAAAC,CAAW,EAC1D,SAAAF,EACF,EACD,CAEF,EACAH,EAAK,YAAc,OAKnB,IAAMU,EAAeC,EAAI,uBAAwB,CAChD,SAAU,CACT,YAAa,CACZ,WAAY,wBACZ,SAAU,yCACX,EACA,WAAY,CACX,QAAS,GACT,KAAM,EACP,CACD,EACA,iBAAkB,CACjB,CACC,YA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BA,QAAAO,EAkBA,MAAAe,CACD","names":["TabsPrimitiveContent","TabsPrimitiveList","TabsPrimitiveRoot","TabsPrimitiveTrigger","cva","clsx","Children","cloneElement","createContext","forwardRef","isValidElement","useContext","invariant","Fragment","jsx","jsxs","TabsStateContext","createContext","Root","forwardRef","className","children","orientation","appearance","props","ref","TabsPrimitiveRoot","cx","listVariants","cva","List","useContext","TabsPrimitiveList","triggerDecorationVariants","TabsTriggerDecoration","clsx","triggerVariants","Trigger","_ariaDisabled","asChild","_disabled","disabled","parseBooleanish","tabsTriggerProps","singleChild","Children","invariant","isValidElement","grandchildren","cloneProps","TabsPrimitiveTrigger","cloneElement","Badge","Content","TabsPrimitiveContent","Tabs"]}
1
+ {"version":3,"sources":["../src/components/tabs/tabs.tsx"],"sourcesContent":["import {\n\tContent as TabsPrimitiveContent,\n\tList as TabsPrimitiveList,\n\tRoot as TabsPrimitiveRoot,\n\tTrigger as TabsPrimitiveTrigger,\n} from \"@radix-ui/react-tabs\";\nimport { cva } from \"class-variance-authority\";\nimport clsx from \"clsx\";\nimport type { ComponentPropsWithoutRef, ComponentRef, HTMLAttributes } from \"react\";\nimport {\n\tChildren,\n\tcloneElement,\n\tcreateContext,\n\tforwardRef,\n\tisValidElement,\n\tuseContext,\n} from \"react\";\nimport invariant from \"tiny-invariant\";\nimport { parseBooleanish } from \"../../types/booleanish.js\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\ntype Orientation = \"horizontal\" | \"vertical\";\ntype Appearance = \"classic\" | \"pill\";\n\ntype TabsStateContextValue = {\n\torientation: Orientation;\n\tappearance: Appearance;\n};\n\nconst TabsStateContext = createContext<TabsStateContextValue>({\n\torientation: \"horizontal\",\n\tappearance: \"classic\",\n});\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Root = forwardRef<\n\tComponentRef<typeof TabsPrimitiveRoot>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveRoot> & {\n\t\t/**\n\t\t * The appearance of the tabs. Classic appearance shows the tab\n\t\t * list with an underline; pill appearance shows each tab as a pill.\n\t\t * @default \"classic\"\n\t\t */\n\t\tappearance?: \"classic\" | \"pill\";\n\t}\n>(({ className, children, orientation = \"horizontal\", appearance = \"classic\", ...props }, ref) => (\n\t<TabsPrimitiveRoot\n\t\tclassName={cx(\"flex gap-4\", orientation === \"horizontal\" ? \"flex-col\" : \"flex-row\", className)}\n\t\torientation={orientation}\n\t\tref={ref}\n\t\t{...props}\n\t>\n\t\t<TabsStateContext.Provider value={{ orientation, appearance }}>\n\t\t\t{children}\n\t\t</TabsStateContext.Provider>\n\t</TabsPrimitiveRoot>\n));\nRoot.displayName = \"Tabs\";\n\n/**\n * Variants for the List component\n */\nconst listVariants = cva(\"flex border-gray-200\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"flex-row items-center\",\n\t\t\tvertical: \"flex-col items-end gap-3.5 self-stretch\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"\",\n\t\t\tpill: \"\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n\tcompoundVariants: [\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"pill\",\n\t\t\tclassName: \"gap-1\",\n\t\t},\n\t\t{\n\t\t\torientation: \"horizontal\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"gap-6 border-b\",\n\t\t},\n\t\t{\n\t\t\torientation: \"vertical\",\n\t\t\tappearance: \"classic\",\n\t\t\tclassName: \"border-r\",\n\t\t},\n\t],\n});\n\n/**\n * Contains the triggers that are aligned along the edge of the active content.\n * The container for tab triggers that provides the visual layout for tab navigation.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst List = forwardRef<\n\tComponentRef<typeof TabsPrimitiveList>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveList>\n>(({ className, ...props }, ref) => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<TabsPrimitiveList\n\t\t\taria-orientation={orientation}\n\t\t\tclassName={cx(listVariants({ orientation, appearance }), className)}\n\t\t\tref={ref}\n\t\t\t{...props}\n\t\t/>\n\t);\n});\nList.displayName = \"TabsList\";\n\ntype TabsTriggerProps = ComponentPropsWithoutRef<typeof TabsPrimitiveTrigger>;\n\n/**\n * Variants for the TabsTriggerDecoration component\n */\nconst triggerDecorationVariants = cva(\"absolute z-0\", {\n\tvariants: {\n\t\torientation: {\n\t\t\thorizontal: \"-bottom-px left-0 right-0 h-0.75\",\n\t\t\tvertical: \"-right-px bottom-0 top-0 w-0.75\",\n\t\t} as const satisfies Record<Orientation, string>,\n\t\tappearance: {\n\t\t\tclassic: \"group-data-state-active/tab-trigger:bg-blue-600\",\n\t\t\tpill: \"hidden\",\n\t\t} as const satisfies Record<Appearance, string>,\n\t},\n});\n\nconst TabsTriggerDecoration = () => {\n\tconst { orientation, appearance } = useContext(TabsStateContext);\n\n\treturn (\n\t\t<span aria-hidden className={clsx(triggerDecorationVariants({ orientation, appearance }))} />\n\t);\n};\nTabsTriggerDecoration.displayName = \"TabsTriggerDecoration\";\n\n/**\n * Variants for the Trigger component\n */\nconst triggerVariants = cva(\n\tcx(\n\t\t\"group/tab-trigger relative flex cursor-pointer items-center gap-1 whitespace-nowrap py-3 text-sm font-medium text-gray-600\",\n\t\t\"ring-focus-accent outline-hidden\",\n\t\t\"aria-disabled:cursor-default aria-disabled:opacity-50\",\n\t\t\"focus-visible:ring-4\",\n\t\t\"[&>svg]:shrink-0 [&>svg]:size-5\",\n\t\t\"not-aria-disabled:hover:text-gray-900\",\n\t),\n\t{\n\t\tvariants: {\n\t\t\torientation: {\n\t\t\t\thorizontal: \"rounded-tl-md rounded-tr-md\",\n\t\t\t\tvertical: \"rounded-bl-md rounded-tl-md pr-3\",\n\t\t\t} as const satisfies Record<Orientation, string>,\n\t\t\tappearance: {\n\t\t\t\tclassic: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-600\",\n\t\t\t\t\t\"data-state-active:text-blue-600\",\n\t\t\t\t),\n\t\t\t\tpill: cx(\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:text-blue-700\",\n\t\t\t\t\t\"not-aria-disabled:hover:data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"data-state-active:text-blue-700\",\n\t\t\t\t\t\"data-state-active:bg-accent-500/20\",\n\t\t\t\t\t\"rounded-full py-2 px-3\",\n\t\t\t\t),\n\t\t\t} as const satisfies Record<Appearance, string>,\n\t\t},\n\t},\n);\n\n/**\n * The button that activates its associated content.\n * A clickable tab trigger that switches between different tab content panels.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Trigger = forwardRef<ComponentRef<typeof TabsPrimitiveTrigger>, TabsTriggerProps>(\n\t(\n\t\t{\n\t\t\t\"aria-disabled\": _ariaDisabled,\n\t\t\tasChild = false,\n\t\t\tchildren,\n\t\t\tclassName,\n\t\t\tdisabled: _disabled,\n\t\t\t...props\n\t\t},\n\t\tref,\n\t) => {\n\t\tconst { orientation, appearance } = useContext(TabsStateContext);\n\t\tconst disabled = parseBooleanish(_ariaDisabled ?? _disabled);\n\n\t\tconst tabsTriggerProps = {\n\t\t\t\"aria-disabled\": _ariaDisabled ?? _disabled,\n\t\t\tclassName: cx(triggerVariants({ orientation, appearance }), className),\n\t\t\tdisabled,\n\t\t\t...props,\n\t\t};\n\n\t\tif (asChild) {\n\t\t\tconst singleChild = Children.only(children);\n\t\t\tinvariant(\n\t\t\t\tisValidElement<TabsTriggerProps>(singleChild),\n\t\t\t\t\"When using `asChild`, TabsTrigger must be passed a single child as a JSX tag.\",\n\t\t\t);\n\t\t\tconst grandchildren = singleChild.props?.children;\n\n\t\t\tconst cloneProps = disabled\n\t\t\t\t? /**\n\t\t\t\t\t * When disabled, prevent anchor/link children from being clickable by\n\t\t\t\t\t * removing their href/to props!\n\t\t\t\t\t * This is necessary because `<a>` doesn't support the `disabled`\n\t\t\t\t\t * attribute and would be navigable. We could use `pointer-events-none`\n\t\t\t\t\t * instead, but don't by default because it would also prevent tooltip\n\t\t\t\t\t * interactions, which may be surprising.\n\t\t\t\t\t */\n\t\t\t\t\t{ href: undefined, to: undefined }\n\t\t\t\t: /**\n\t\t\t\t\t * when NOT disabled, allow keyboard navigation to the trigger,\n\t\t\t\t\t * even for asChild anchors/links\n\t\t\t\t\t */\n\t\t\t\t\t{ tabIndex: 0 };\n\n\t\t\treturn (\n\t\t\t\t<TabsPrimitiveTrigger asChild {...tabsTriggerProps} ref={ref}>\n\t\t\t\t\t{cloneElement(\n\t\t\t\t\t\tdisabled ? <button type=\"button\" /> : singleChild,\n\t\t\t\t\t\tcloneProps,\n\t\t\t\t\t\t<>\n\t\t\t\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t\t\t\t{grandchildren}\n\t\t\t\t\t\t</>,\n\t\t\t\t\t)}\n\t\t\t\t</TabsPrimitiveTrigger>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<TabsPrimitiveTrigger ref={ref} {...tabsTriggerProps}>\n\t\t\t\t<TabsTriggerDecoration />\n\t\t\t\t{children}\n\t\t\t</TabsPrimitiveTrigger>\n\t\t);\n\t},\n);\nTrigger.displayName = \"TabsTrigger\";\n\n/**\n * A badge component that can be used inside tab triggers to display additional information.\n * Typically used to show counts or status indicators within tab headers.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">\n * Account <Tabs.Badge>5</Tabs.Badge>\n * </Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * </Tabs.Root>\n * ```\n */\nconst Badge = ({ className, children, ...props }: HTMLAttributes<HTMLSpanElement>) => (\n\t<span\n\t\tclassName={cx(\n\t\t\t\"rounded-full bg-gray-500/20 px-1.5 text-xs font-medium text-gray-600\",\n\t\t\t\"group-data-state-active/tab-trigger:bg-blue-500/20 group-data-state-active/tab-trigger:text-blue-700 group-hover/tab-trigger:group-enabled/tab-trigger:group-data-state-active/tab-trigger:text-blue-700\",\n\t\t\t\"group-hover/tab-trigger:group-enabled/tab-trigger:text-gray-700\",\n\t\t\tclassName,\n\t\t)}\n\t\t{...props}\n\t>\n\t\t{children}\n\t</span>\n);\nBadge.displayName = \"TabBadge\";\n\n/**\n * Contains the content associated with each trigger.\n * The content panel that displays when its corresponding tab trigger is active.\n *\n * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TabsPrimitiveContent>,\n\tComponentPropsWithoutRef<typeof TabsPrimitiveContent>\n>(({ className, ...props }, ref) => (\n\t<TabsPrimitiveContent\n\t\tref={ref}\n\t\tclassName={cx(\"focus-visible:ring-focus-accent outline-hidden focus-visible:ring-4\", className)}\n\t\t{...props}\n\t/>\n));\nContent.displayName = \"TabsContent\";\n\n/**\n * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n * The root component that provides context for all tab components.\n *\n * @see https://mantle.ngrok.com/components/tabs\n *\n * @example\n * ```tsx\n * <Tabs.Root defaultValue=\"account\">\n * <Tabs.List>\n * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n * </Tabs.List>\n * <Tabs.Content value=\"account\">\n * <p>Make changes to your account here.</p>\n * </Tabs.Content>\n * <Tabs.Content value=\"password\">\n * <p>Change your password here.</p>\n * </Tabs.Content>\n * </Tabs.Root>\n * ```\n */\nconst Tabs = {\n\t/**\n\t * The root container of the tabs component that provides context for all tab components.\n\t * A set of layered sections of content—known as tab panels—that are displayed one at a time.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * Contains the content associated with each trigger.\n\t * The content panel that displays when its corresponding tab trigger is active.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * </Tabs.List>\n\t * <Tabs.Content value=\"account\">\n\t * <p>Make changes to your account here.</p>\n\t * </Tabs.Content>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * Contains the triggers that are aligned along the edge of the active content.\n\t * The container for tab triggers that provides the visual layout for tab navigation.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-list\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tList,\n\t/**\n\t * The button that activates its associated content.\n\t * A clickable tab trigger that switches between different tab content panels.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tabs-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">Account</Tabs.Trigger>\n\t * <Tabs.Trigger value=\"password\">Password</Tabs.Trigger>\n\t * </Tabs.List>\n\t * </Tabs.Root>\n\t * ```\n\t */\n\tTrigger,\n\t/**\n\t * A badge component that can be used inside tab triggers to display additional information.\n\t * Typically used to show counts or status indicators within tab headers.\n\t *\n\t * @see https://mantle.ngrok.com/components/tabs#api-tab-badge\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tabs.Root defaultValue=\"account\">\n\t * <Tabs.List>\n\t * <Tabs.Trigger value=\"account\">\n\t * Account <Tabs.Badge>5</Tabs.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ACZ,IAAMK,EAAcC,EAAS,KAAKxB,CAAQ,EAC1CyB,EACCC,EAAiCH,CAAW,EAC5C,+EACD,EACA,IAAMI,EAAgBJ,EAAY,OAAO,SAkBzC,OACC9B,EAACmC,EAAA,CAAqB,QAAO,GAAE,GAAGN,EAAkB,IAAKlB,EACvD,SAAAyB,EACAT,EAAW3B,EAAC,UAAO,KAAK,SAAS,EAAK8B,EAnBtBH,EASjB,CAAE,KAAM,OAAW,GAAI,MAAU,EAKjC,CAAE,SAAU,CAAE,EAOb1B,EAAAF,EAAA,CACC,UAAAC,EAACoB,EAAA,EAAsB,EACtBc,GACF,CACD,EACD,CAEF,CAEA,OACCjC,EAACkC,EAAA,CAAqB,IAAKxB,EAAM,GAAGkB,EACnC,UAAA7B,EAACoB,EAAA,EAAsB,EACtBb,GACF,CAEF,CACD,EACAgB,EAAQ,YAAc,cAoBtB,IAAMc,EAAQ,CAAC,CAAE,UAAA/B,EAAW,SAAAC,EAAU,GAAGG,CAAM,IAC9CV,EAAC,QACA,UAAWa,EACV,uEACA,2MACA,kEACAP,CACD,EACC,GAAGI,EAEH,SAAAH,EACF,EAED8B,EAAM,YAAc,WAwBpB,IAAMC,EAAUjC,EAGd,CAAC,CAAE,UAAAC,EAAW,GAAGI,CAAM,EAAGC,IAC3BX,EAACuC,EAAA,CACA,IAAK5B,EACL,UAAWE,EAAG,sEAAuEP,CAAS,EAC7F,GAAGI,EACL,CACA,EACD4B,EAAQ,YAAc,cAwBtB,IAAME,EAAO,CAoBZ,KAAApC,EAmBA,QAAAkC,EAiBA,KAAAtB,EAiBA,QAAAO,EAkBA,MAAAc,CACD","names":["TabsPrimitiveContent","TabsPrimitiveList","TabsPrimitiveRoot","TabsPrimitiveTrigger","cva","clsx","Children","cloneElement","createContext","forwardRef","isValidElement","useContext","invariant","Fragment","jsx","jsxs","TabsStateContext","createContext","Root","forwardRef","className","children","orientation","appearance","props","ref","TabsPrimitiveRoot","cx","listVariants","cva","List","useContext","TabsPrimitiveList","triggerDecorationVariants","TabsTriggerDecoration","clsx","triggerVariants","Trigger","_ariaDisabled","asChild","_disabled","disabled","parseBooleanish","tabsTriggerProps","singleChild","Children","invariant","isValidElement","grandchildren","TabsPrimitiveTrigger","cloneElement","Badge","Content","TabsPrimitiveContent","Tabs"]}
package/dist/theme.d.ts CHANGED
@@ -179,27 +179,5 @@ declare const PreloadCoreFonts: {
179
179
  (): react_jsx_runtime.JSX.Element;
180
180
  displayName: string;
181
181
  };
182
- /**
183
- * Preload optional Inter variable fonts (roman + italic).
184
- *
185
- * Use this when the UI opts into the Inter typeface. Keep it near other font
186
- * preloads and add `preconnect`/`dns-prefetch` for the CDN to minimize latency.
187
- *
188
- * @example
189
- * ```tsx
190
- * <head>
191
- * <meta charSet="utf-8" />
192
- * <meta name="viewport" content="width=device-width, initial-scale=1" />
193
- *
194
- * // Preconnect and DNS-prefetch to the assets CDN
195
- * // either here or in app root headers
196
- * <link rel="preconnect" href={assetsCdnOrigin} crossOrigin="anonymous" />
197
- * <link rel="dns-prefetch" href={assetsCdnOrigin} />
198
- * <MantleThemeHeadContent />
199
- * <PreloadInterFonts />
200
- * </head>
201
- * ```
202
- */
203
- declare const PreloadInterFonts: () => react_jsx_runtime.JSX.Element;
204
182
 
205
- export { MantleThemeHeadContent, PreloadCoreFonts, PreloadInterFonts, ResolvedTheme, Theme, ThemeProvider, assetsCdnOrigin, fontHref, getStoredTheme, preventWrongThemeFlashScriptContent, readThemeFromHtmlElement, useAppliedTheme, useInitialHtmlThemeProps, useTheme };
183
+ export { MantleThemeHeadContent, PreloadCoreFonts, ResolvedTheme, Theme, ThemeProvider, assetsCdnOrigin, fontHref, getStoredTheme, preventWrongThemeFlashScriptContent, readThemeFromHtmlElement, useAppliedTheme, useInitialHtmlThemeProps, useTheme };
package/dist/theme.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as e,b as t,c as m,d as o,e as r,f as s,g as h,h as n,i as T,j as l,k as d,l as p,m as i,n as a,o as f,p as v,q as x,r as C}from"./chunk-VBNDWNIJ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-PFXFESEN.js";export{T as $resolvedTheme,h as $theme,v as MantleThemeHeadContent,m as PreloadCoreFonts,o as PreloadInterFonts,d as ThemeProvider,e as assetsCdnOrigin,t as fontHref,C as getStoredTheme,l as isResolvedTheme,n as isTheme,f as preventWrongThemeFlashScriptContent,i as readThemeFromHtmlElement,r as resolvedThemes,s as themes,a as useAppliedTheme,x as useInitialHtmlThemeProps,p as useTheme};
1
+ import{a as e,b as m,c as t,d as o,e as r,f as s,g as h,h as T,i as n,j as l,k as d,l as p,m as i,n as a,o as f,p as v,q as x}from"./chunk-B2CXQETQ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-PFXFESEN.js";export{T as $resolvedTheme,s as $theme,f as MantleThemeHeadContent,t as PreloadCoreFonts,l as ThemeProvider,e as assetsCdnOrigin,m as fontHref,x as getStoredTheme,n as isResolvedTheme,h as isTheme,a as preventWrongThemeFlashScriptContent,p as readThemeFromHtmlElement,o as resolvedThemes,r as themes,i as useAppliedTheme,v as useInitialHtmlThemeProps,d as useTheme};
2
2
  //# sourceMappingURL=theme.js.map
package/dist/toast.d.ts CHANGED
@@ -40,6 +40,8 @@ type MakeToastOptions = {
40
40
  /**
41
41
  * Time in milliseconds that should elapse before automatically closing the toast.
42
42
  * Will default to the `<Toaster />`'s `duration_ms` if not provided.
43
+ *
44
+ * You can keep the toast open until manually dismissed by passing a value <= 0 or Number.POSITIVE_INFINITY
43
45
  */
44
46
  duration_ms?: number;
45
47
  /**
@@ -55,6 +57,7 @@ type MakeToastOptions = {
55
57
  *
56
58
  * @example
57
59
  * ```tsx
60
+ * // Basic toast with auto-dismiss (default 4000ms, inherits from `<Toaster>`)
58
61
  * makeToast(
59
62
  * <Toast.Root priority="success">
60
63
  * <Toast.Icon />
@@ -62,6 +65,16 @@ type MakeToastOptions = {
62
65
  * <Toast.Action>Dismiss</Toast.Action>
63
66
  * </Toast.Root>
64
67
  * );
68
+ *
69
+ * // Toast that stays open until manually dismissed
70
+ * makeToast(
71
+ * <Toast.Root priority="warning">
72
+ * <Toast.Icon />
73
+ * <Toast.Message>Action required</Toast.Message>
74
+ * <Toast.Action>Dismiss</Toast.Action>
75
+ * </Toast.Root>,
76
+ * { duration_ms: Number.POSITIVE_INFINITY }
77
+ * );
65
78
  * ```
66
79
  */
67
80
  declare function makeToast(children: ReactNode, options?: MakeToastOptions): string | number;
package/dist/toast.js CHANGED
@@ -1,2 +1,2 @@
1
- import{a as o,b as t,c as r}from"./chunk-UKS7NFNC.js";import"./chunk-VBNDWNIJ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-2NIR7PCL.js";import"./chunk-UNFO4DZV.js";import"./chunk-NZ6DRFAL.js";import"./chunk-PFXFESEN.js";export{r as Toast,o as Toaster,t as makeToast};
1
+ import{a as o,b as t,c as r}from"./chunk-HG2MWNPU.js";import"./chunk-B2CXQETQ.js";import"./chunk-6J7D73WA.js";import"./chunk-NJNFZ2EG.js";import"./chunk-KMNACVH6.js";import"./chunk-SBVSECWW.js";import"./chunk-ODDNPNLN.js";import"./chunk-NZ6DRFAL.js";import"./chunk-PFXFESEN.js";export{r as Toast,o as Toaster,t as makeToast};
2
2
  //# sourceMappingURL=toast.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { forwardRef } from \"react\";\nimport type {\n\tComponentProps,\n\tComponentPropsWithoutRef,\n\tComponentRef,\n} from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\n/**\n * Wraps your app to provide global functionality to your tooltips.\n * Only one instance of this component should be rendered in your app, preferably at the root.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-provider\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <App />\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = ({\n\tdelayDuration = 0,\n\t...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n\t<TooltipPrimitive.Provider\n\t\tdata-slot=\"tooltip-provider\"\n\t\tdelayDuration={delayDuration ?? 0}\n\t\t{...props}\n\t/>\n);\nTooltipProvider.displayName = \"Tooltip.Provider\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Root(props: ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\nRoot.displayName = \"Tooltip.Root\";\n\n/**\n * The trigger button that opens the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\nTrigger.displayName = \"Tooltip.Trigger\";\n\n/**\n * The content to render inside the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TooltipPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Portal>\n\t\t<TooltipPrimitive.Content\n\t\t\tclassName={cx(\n\t\t\t\t\"bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"tooltip-content\"\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<TooltipPrimitive.Arrow asChild>\n\t\t\t\t<div className=\"bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs\" />\n\t\t\t</TooltipPrimitive.Arrow>\n\t\t</TooltipPrimitive.Content>\n\t</TooltipPrimitive.Portal>\n));\nContent.displayName = \"Tooltip.Content\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Tooltip = {\n\t/**\n\t * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n\t * This is the root, stateful component that manages the open/closed state of the tooltip.\n\t * Will throw if you have not wrapped your app in a `TooltipProvider`.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * The content to render inside the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * The trigger button that opens the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tTooltip,\n\tTooltipProvider,\n};\n"],"mappings":"wCAAA,UAAYA,MAAsB,0BAClC,OAAS,cAAAC,MAAkB,QAyB1B,cAAAC,EAkFC,QAAAC,MAlFD,oBAJD,IAAMC,EAAkB,CAAC,CACxB,cAAAC,EAAgB,EAChB,GAAGC,CACJ,IACCJ,EAAkB,WAAjB,CACA,YAAU,mBACV,cAAeG,GAAiB,EAC/B,GAAGC,EACL,EAEDF,EAAgB,YAAc,mBAuB9B,SAASG,EAAKD,EAAqD,CAClE,OAAOJ,EAAkB,OAAjB,CAAsB,YAAU,UAAW,GAAGI,EAAO,CAC9D,CACAC,EAAK,YAAc,eAqBnB,SAASC,EAAQF,EAAwD,CACxE,OAAOJ,EAAkB,UAAjB,CAAyB,YAAU,kBAAmB,GAAGI,EAAO,CACzE,CACAE,EAAQ,YAAc,kBAqBtB,IAAMC,EAAUC,EAGd,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGP,CAAM,EAAGQ,IACrDZ,EAAkB,SAAjB,CACA,SAAAC,EAAkB,UAAjB,CACA,UAAWY,EACV,sYACAH,CACD,EACA,YAAU,kBACV,IAAKE,EACL,WAAYD,EACX,GAAGP,EAEH,UAAAK,EACDT,EAAkB,QAAjB,CAAuB,QAAO,GAC9B,SAAAA,EAAC,OAAI,UAAU,6EAA6E,EAC7F,GACD,EACD,CACA,EACDO,EAAQ,YAAc,kBAuBtB,IAAMO,EAAU,CAsBf,KAAAT,EAoBA,QAAAE,EAoBA,QAAAD,CACD","names":["TooltipPrimitive","forwardRef","jsx","jsxs","TooltipProvider","delayDuration","props","Root","Trigger","Content","forwardRef","children","className","sideOffset","ref","cx","Tooltip"]}
1
+ {"version":3,"sources":["../src/components/tooltip/tooltip.tsx"],"sourcesContent":["import * as TooltipPrimitive from \"@radix-ui/react-tooltip\";\nimport { forwardRef } from \"react\";\nimport type { ComponentProps, ComponentPropsWithoutRef, ComponentRef } from \"react\";\nimport { cx } from \"../../utils/cx/cx.js\";\n\n/**\n * Wraps your app to provide global functionality to your tooltips.\n * Only one instance of this component should be rendered in your app, preferably at the root.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-provider\n *\n * @example\n * ```tsx\n * <TooltipProvider>\n * <App />\n * </TooltipProvider>\n * ```\n */\nconst TooltipProvider = ({\n\tdelayDuration = 0,\n\t...props\n}: ComponentPropsWithoutRef<typeof TooltipPrimitive.Provider>) => (\n\t<TooltipPrimitive.Provider\n\t\tdata-slot=\"tooltip-provider\"\n\t\tdelayDuration={delayDuration ?? 0}\n\t\t{...props}\n\t/>\n);\nTooltipProvider.displayName = \"Tooltip.Provider\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Root(props: ComponentProps<typeof TooltipPrimitive.Root>) {\n\treturn <TooltipPrimitive.Root data-slot=\"tooltip\" {...props} />;\n}\nRoot.displayName = \"Tooltip.Root\";\n\n/**\n * The trigger button that opens the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nfunction Trigger(props: ComponentProps<typeof TooltipPrimitive.Trigger>) {\n\treturn <TooltipPrimitive.Trigger data-slot=\"tooltip-trigger\" {...props} />;\n}\nTrigger.displayName = \"Tooltip.Trigger\";\n\n/**\n * The content to render inside the tooltip.\n *\n * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Content = forwardRef<\n\tComponentRef<typeof TooltipPrimitive.Content>,\n\tComponentPropsWithoutRef<typeof TooltipPrimitive.Content>\n>(({ children, className, sideOffset = 4, ...props }, ref) => (\n\t<TooltipPrimitive.Portal>\n\t\t<TooltipPrimitive.Content\n\t\t\tclassName={cx(\n\t\t\t\t\"bg-tooltip text-tooltip animate-in fade-in-0 zoom-in-95 data-side-bottom:slide-in-from-top-2 data-side-left:slide-in-from-right-2 data-side-right:slide-in-from-left-2 data-side-top:slide-in-from-bottom-2 data-state-closed:animate-out data-state-closed:fade-out-0 data-state-closed:zoom-out-95 z-50 max-w-72 overflow-visible wrap-break-word rounded-md px-3 py-1.5 text-sm font-sans shadow\",\n\t\t\t\tclassName,\n\t\t\t)}\n\t\t\tdata-slot=\"tooltip-content\"\n\t\t\tref={ref}\n\t\t\tsideOffset={sideOffset}\n\t\t\t{...props}\n\t\t>\n\t\t\t{children}\n\t\t\t<TooltipPrimitive.Arrow asChild>\n\t\t\t\t<div className=\"bg-tooltip z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-xs\" />\n\t\t\t</TooltipPrimitive.Arrow>\n\t\t</TooltipPrimitive.Content>\n\t</TooltipPrimitive.Portal>\n));\nContent.displayName = \"Tooltip.Content\";\n\n/**\n * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n * This is the root, stateful component that manages the open/closed state of the tooltip.\n * Will throw if you have not wrapped your app in a `TooltipProvider`.\n *\n * @see https://mantle.ngrok.com/components/tooltip\n *\n * @example\n * ```tsx\n * <Tooltip.Root>\n * <Tooltip.Trigger asChild>\n * <Button type=\"button\" appearance=\"outlined\">\n * Hover me\n * </Button>\n * </Tooltip.Trigger>\n * <Tooltip.Content>\n * This is a tooltip\n * </Tooltip.Content>\n * </Tooltip.Root>\n * ```\n */\nconst Tooltip = {\n\t/**\n\t * A popup that displays information related to an element when the element receives keyboard focus or the mouse hovers over it.\n\t * This is the root, stateful component that manages the open/closed state of the tooltip.\n\t * Will throw if you have not wrapped your app in a `TooltipProvider`.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-root\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tRoot,\n\t/**\n\t * The content to render inside the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-content\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tContent,\n\t/**\n\t * The trigger button that opens the tooltip.\n\t *\n\t * @see https://mantle.ngrok.com/components/tooltip#tooltip-trigger\n\t *\n\t * @example\n\t * ```tsx\n\t * <Tooltip.Root>\n\t * <Tooltip.Trigger asChild>\n\t * <Button type=\"button\" appearance=\"outlined\">\n\t * Hover me\n\t * </Button>\n\t * </Tooltip.Trigger>\n\t * <Tooltip.Content>\n\t * This is a tooltip\n\t * </Tooltip.Content>\n\t * </Tooltip.Root>\n\t * ```\n\t */\n\tTrigger,\n} as const;\n\nexport {\n\t//,\n\tTooltip,\n\tTooltipProvider,\n};\n"],"mappings":"wCAAA,UAAYA,MAAsB,0BAClC,OAAS,cAAAC,MAAkB,QAqB1B,cAAAC,EAkFC,QAAAC,MAlFD,oBAJD,IAAMC,EAAkB,CAAC,CACxB,cAAAC,EAAgB,EAChB,GAAGC,CACJ,IACCJ,EAAkB,WAAjB,CACA,YAAU,mBACV,cAAeG,GAAiB,EAC/B,GAAGC,EACL,EAEDF,EAAgB,YAAc,mBAuB9B,SAASG,EAAKD,EAAqD,CAClE,OAAOJ,EAAkB,OAAjB,CAAsB,YAAU,UAAW,GAAGI,EAAO,CAC9D,CACAC,EAAK,YAAc,eAqBnB,SAASC,EAAQF,EAAwD,CACxE,OAAOJ,EAAkB,UAAjB,CAAyB,YAAU,kBAAmB,GAAGI,EAAO,CACzE,CACAE,EAAQ,YAAc,kBAqBtB,IAAMC,EAAUC,EAGd,CAAC,CAAE,SAAAC,EAAU,UAAAC,EAAW,WAAAC,EAAa,EAAG,GAAGP,CAAM,EAAGQ,IACrDZ,EAAkB,SAAjB,CACA,SAAAC,EAAkB,UAAjB,CACA,UAAWY,EACV,sYACAH,CACD,EACA,YAAU,kBACV,IAAKE,EACL,WAAYD,EACX,GAAGP,EAEH,UAAAK,EACDT,EAAkB,QAAjB,CAAuB,QAAO,GAC9B,SAAAA,EAAC,OAAI,UAAU,6EAA6E,EAC7F,GACD,EACD,CACA,EACDO,EAAQ,YAAc,kBAuBtB,IAAMO,EAAU,CAsBf,KAAAT,EAoBA,QAAAE,EAoBA,QAAAD,CACD","names":["TooltipPrimitive","forwardRef","jsx","jsxs","TooltipProvider","delayDuration","props","Root","Trigger","Content","forwardRef","children","className","sideOffset","ref","cx","Tooltip"]}
package/dist/types.js CHANGED
@@ -1,2 +1,2 @@
1
- import"./chunk-4LSFAAZW.js";import{a}from"./chunk-3C5O3AQA.js";export{a as parseBooleanish};
1
+ import"./chunk-4LSFAAZW.js";import{a}from"./chunk-OP6JMBKJ.js";export{a as parseBooleanish};
2
2
  //# sourceMappingURL=types.js.map