@womp/kookie-ui 0.14.4 → 0.14.5

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 (114) hide show
  1. package/dist/cjs/components/_internal/base-button.js +1 -1
  2. package/dist/cjs/components/_internal/base-button.js.map +2 -2
  3. package/dist/cjs/components/_internal/base-button.props.d.ts +1 -1
  4. package/dist/cjs/components/_internal/base-button.props.js +1 -1
  5. package/dist/cjs/components/_internal/base-button.props.js.map +2 -2
  6. package/dist/cjs/components/button.d.ts +1 -1
  7. package/dist/cjs/components/button.js +1 -1
  8. package/dist/cjs/components/button.js.map +2 -2
  9. package/dist/cjs/components/button.props.js +1 -1
  10. package/dist/cjs/components/button.props.js.map +2 -2
  11. package/dist/cjs/components/chatbar.js +1 -1
  12. package/dist/cjs/components/chatbar.js.map +2 -2
  13. package/dist/cjs/components/icon-button.js +1 -1
  14. package/dist/cjs/components/icon-button.js.map +2 -2
  15. package/dist/cjs/components/icon-button.props.js +1 -1
  16. package/dist/cjs/components/icon-button.props.js.map +2 -2
  17. package/dist/cjs/components/index.js +1 -1
  18. package/dist/cjs/components/index.js.map +2 -2
  19. package/dist/cjs/components/message-scroller.js +1 -1
  20. package/dist/cjs/components/message-scroller.js.map +2 -2
  21. package/dist/cjs/components/notice.js +1 -1
  22. package/dist/cjs/components/notice.js.map +2 -2
  23. package/dist/cjs/components/schemas/base-button.schema.js +1 -1
  24. package/dist/cjs/components/schemas/base-button.schema.js.map +2 -2
  25. package/dist/cjs/components/schemas/button.schema.js +1 -1
  26. package/dist/cjs/components/schemas/button.schema.js.map +2 -2
  27. package/dist/cjs/components/schemas/icon-button.schema.js +1 -1
  28. package/dist/cjs/components/schemas/icon-button.schema.js.map +2 -2
  29. package/dist/cjs/components/schemas/index.js +1 -1
  30. package/dist/cjs/components/schemas/index.js.map +2 -2
  31. package/dist/cjs/components/schemas/toggle-button.schema.js +1 -1
  32. package/dist/cjs/components/schemas/toggle-button.schema.js.map +2 -2
  33. package/dist/cjs/components/schemas/toggle-icon-button.schema.js +1 -1
  34. package/dist/cjs/components/schemas/toggle-icon-button.schema.js.map +2 -2
  35. package/dist/cjs/components/theme-panel.js +1 -1
  36. package/dist/cjs/components/theme-panel.js.map +2 -2
  37. package/dist/cjs/components/toggle-button.js +1 -1
  38. package/dist/cjs/components/toggle-button.js.map +2 -2
  39. package/dist/cjs/components/toggle-icon-button.js +1 -1
  40. package/dist/cjs/components/toggle-icon-button.js.map +2 -2
  41. package/dist/cjs/components/toolbar.js +1 -1
  42. package/dist/cjs/components/toolbar.js.map +2 -2
  43. package/dist/cjs/index.js +1 -1
  44. package/dist/cjs/index.js.map +2 -2
  45. package/dist/cjs/props/index.js +1 -1
  46. package/dist/cjs/props/index.js.map +2 -2
  47. package/dist/esm/{chunk-57XCVY6J.js → chunk-5NARBZRI.js} +2 -2
  48. package/dist/esm/{chunk-T7Q6DQRD.js → chunk-ADFUYK3U.js} +2 -2
  49. package/dist/esm/{chunk-7ZCQAMHZ.js → chunk-ALG6R3ZX.js} +2 -2
  50. package/dist/esm/{chunk-RA2XCS3M.js → chunk-ARDKQL7Q.js} +2 -2
  51. package/dist/esm/{chunk-F7TOKXKZ.js → chunk-BBMENJM3.js} +2 -2
  52. package/dist/esm/{chunk-E7LJHM3S.js → chunk-BGVGSALM.js} +2 -2
  53. package/dist/esm/{chunk-E7LJHM3S.js.map → chunk-BGVGSALM.js.map} +2 -2
  54. package/dist/esm/{chunk-T6Z4JUH6.js → chunk-BWVYB64R.js} +2 -2
  55. package/dist/esm/{chunk-6SVNBGZ6.js → chunk-BXX2NVQD.js} +2 -2
  56. package/dist/esm/{chunk-6SVNBGZ6.js.map → chunk-BXX2NVQD.js.map} +1 -1
  57. package/dist/esm/{chunk-3OQM7SLQ.js → chunk-EUH5MK4Q.js} +2 -2
  58. package/dist/esm/{chunk-TCEQ5VVE.js → chunk-JGR3L4SN.js} +2 -2
  59. package/dist/esm/{chunk-CYSDGVKF.js → chunk-LHGT24A5.js} +2 -2
  60. package/dist/esm/{chunk-VJXHEDCE.js → chunk-LOLLL7AV.js} +2 -2
  61. package/dist/esm/chunk-P3KYZBOB.js +2 -0
  62. package/dist/esm/chunk-P3KYZBOB.js.map +7 -0
  63. package/dist/esm/{chunk-77TGP2LO.js → chunk-QXEQ2C6A.js} +2 -2
  64. package/dist/esm/{chunk-FMMKOOS7.js → chunk-TUKX2BRO.js} +2 -2
  65. package/dist/esm/{chunk-BKES3M4Y.js → chunk-UGGAAL4V.js} +2 -2
  66. package/dist/esm/components/_internal/base-button.js +1 -1
  67. package/dist/esm/components/_internal/base-button.props.d.ts +1 -1
  68. package/dist/esm/components/_internal/base-button.props.js +1 -1
  69. package/dist/esm/components/button.d.ts +1 -1
  70. package/dist/esm/components/button.js +1 -1
  71. package/dist/esm/components/button.props.js +1 -1
  72. package/dist/esm/components/chatbar.js +1 -1
  73. package/dist/esm/components/icon-button.js +1 -1
  74. package/dist/esm/components/icon-button.props.js +1 -1
  75. package/dist/esm/components/index.js +1 -1
  76. package/dist/esm/components/message-scroller.js +1 -1
  77. package/dist/esm/components/notice.js +1 -1
  78. package/dist/esm/components/schemas/base-button.schema.js +1 -1
  79. package/dist/esm/components/schemas/button.schema.js +1 -1
  80. package/dist/esm/components/schemas/icon-button.schema.js +1 -1
  81. package/dist/esm/components/schemas/index.js +1 -1
  82. package/dist/esm/components/schemas/toggle-button.schema.js +1 -1
  83. package/dist/esm/components/schemas/toggle-icon-button.schema.js +1 -1
  84. package/dist/esm/components/theme-panel.js +1 -1
  85. package/dist/esm/components/toggle-button.js +1 -1
  86. package/dist/esm/components/toggle-icon-button.js +1 -1
  87. package/dist/esm/components/toolbar.js +1 -1
  88. package/dist/esm/index.js +1 -1
  89. package/dist/esm/props/index.js +1 -1
  90. package/package.json +1 -1
  91. package/schemas/base-button.json +1 -1
  92. package/schemas/button.json +1 -1
  93. package/schemas/icon-button.json +1 -1
  94. package/schemas/index.json +5 -5
  95. package/schemas/toggle-button.json +1 -1
  96. package/schemas/toggle-icon-button.json +1 -1
  97. package/src/components/_internal/base-button.props.ts +3 -3
  98. package/src/components/button.tsx +1 -1
  99. package/src/components/schemas/base-button.schema.ts +2 -2
  100. package/dist/esm/chunk-2D5QJ6MX.js +0 -2
  101. package/dist/esm/chunk-2D5QJ6MX.js.map +0 -7
  102. /package/dist/esm/{chunk-57XCVY6J.js.map → chunk-5NARBZRI.js.map} +0 -0
  103. /package/dist/esm/{chunk-T7Q6DQRD.js.map → chunk-ADFUYK3U.js.map} +0 -0
  104. /package/dist/esm/{chunk-7ZCQAMHZ.js.map → chunk-ALG6R3ZX.js.map} +0 -0
  105. /package/dist/esm/{chunk-RA2XCS3M.js.map → chunk-ARDKQL7Q.js.map} +0 -0
  106. /package/dist/esm/{chunk-F7TOKXKZ.js.map → chunk-BBMENJM3.js.map} +0 -0
  107. /package/dist/esm/{chunk-T6Z4JUH6.js.map → chunk-BWVYB64R.js.map} +0 -0
  108. /package/dist/esm/{chunk-3OQM7SLQ.js.map → chunk-EUH5MK4Q.js.map} +0 -0
  109. /package/dist/esm/{chunk-TCEQ5VVE.js.map → chunk-JGR3L4SN.js.map} +0 -0
  110. /package/dist/esm/{chunk-CYSDGVKF.js.map → chunk-LHGT24A5.js.map} +0 -0
  111. /package/dist/esm/{chunk-VJXHEDCE.js.map → chunk-LOLLL7AV.js.map} +0 -0
  112. /package/dist/esm/{chunk-77TGP2LO.js.map → chunk-QXEQ2C6A.js.map} +0 -0
  113. /package/dist/esm/{chunk-FMMKOOS7.js.map → chunk-TUKX2BRO.js.map} +0 -0
  114. /package/dist/esm/{chunk-BKES3M4Y.js.map → chunk-UGGAAL4V.js.map} +0 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../../src/components/_internal/base-button.props.ts", "../../../../src/helpers/parse-variant.ts", "../../../../src/props/as-child.prop.ts", "../../../../src/props/color.prop.ts", "../../../../src/props/radius.prop.ts"],
4
- "sourcesContent": ["import { parseVariant } from '../../helpers/parse-variant.js';\nimport { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - raised: lifted off its ground, with an edge and a shadow (the default)\n * - solid: Primary actions that should be noticed first\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override', 'classic'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with translucent material\n * <BaseButton material=\"translucent\">Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'raised', parseValue: parseVariant },\n ...accentColorPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import { warnDeprecated } from './warn-deprecated.js';\n\n/**\n * `classic` was renamed `raised` in 0.14.0. The old name still renders, as `raised`, with a\n * one-time warning in development. Button's `override` is not a look but a way out of the\n * styles, so it warns too. Both are removed in 0.15.0.\n */\nfunction parseVariant(value: string): string {\n if (value === 'classic') {\n warnDeprecated('`variant=\"classic\"` is deprecated and will be removed in 0.15.0. Use `variant=\"raised\"`.');\n return 'raised';\n }\n if (value === 'override') {\n warnDeprecated(\n '`variant=\"override\"` is deprecated and will be removed in 0.15.0. Style the component with `className`, `style` or its CSS variables instead.',\n );\n }\n return value;\n}\n\nexport { parseVariant };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code, Callout,\n// UserCard): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n"],
5
- "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GCOA,SAASI,EAAaC,EAAuB,CAC3C,OAAIA,IAAU,UAEL,UAELA,IAAU,YACZ,OAIKA,EACT,CChBA,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAgBvP,IAAMC,EAAqB,CACzB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,EACX,CACF,ECvBA,IAAMC,EAAQ,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,EAEnDC,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,OAAQD,EACR,QAAS,MACX,CACF,EJIA,IAAME,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,QAAS,WAAY,SAAS,EAM3FC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,SAAU,WAAYK,CAAa,EAChH,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQL,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
4
+ "sourcesContent": ["import { parseVariant } from '../../helpers/parse-variant.js';\nimport { asChildPropDef } from '../../props/as-child.prop.js';\nimport { accentColorPropDef } from '../../props/color.prop.js';\nimport { radiusPropDef } from '../../props/radius.prop.js';\n\nimport type { PropDef } from '../../props/prop-def.js';\n\n/**\n * Available button sizes for responsive design\n * Size 1: 24px - Compact for toolbars and dense interfaces\n * Size 2: 32px - Standard for most interface contexts\n * Size 3: 40px - Large for important actions and mobile touch targets\n * Size 4: 48px - Extra large for hero sections and maximum impact\n */\nconst sizes = ['1', '2', '3', '4'] as const;\n\n/**\n * Available button variants for different visual contexts\n * - raised: lifted off its ground, with an edge and a shadow\n * - solid: Primary actions that should be noticed first (the default)\n * - soft: Content-heavy interfaces, natural integration\n * - surface: Elevated appearance with subtle depth\n * - outline: Secondary actions that support primary actions\n * - ghost: Utility functions that don't compete for attention\n */\nconst variants = ['raised', 'solid', 'soft', 'surface', 'outline', 'ghost', 'override', 'classic'] as const;\n\n/**\n * Available panel background options (deprecated)\n * @deprecated Use `materials` instead\n */\nconst panelBackgrounds = ['solid', 'translucent'] as const;\n\n/**\n * Available material options for visual rendering\n * - solid: Opaque backgrounds and borders\n * - translucent: Elevated effects with depth and visual separation\n */\nconst materials = ['solid', 'translucent'] as const;\n\n/**\n * Base button prop definitions that define the component's API\n * \n * These props are used by all button variants (Button, IconButton, etc.)\n * to ensure consistent behavior and styling across the design system.\n * \n * Key features:\n * - Responsive sizing with mobile-first approach\n * - Six visual variants for different interface contexts\n * - Comprehensive color system with semantic meanings\n * - Loading states with automatic accessibility\n * - Material system for visual depth and elevation\n * - Polymorphic rendering support via asChild\n * \n * @example\n * ```tsx\n * // Basic button with default props\n * <BaseButton>Click me</BaseButton>\n * \n * // Button with custom size and variant\n * <BaseButton size=\"3\" variant=\"solid\">Primary Action</BaseButton>\n * \n * // Button with loading state\n * <BaseButton loading>Processing...</BaseButton>\n * \n * // Button with translucent material\n * <BaseButton material=\"translucent\">Elevated Button</BaseButton>\n * ```\n */\nconst baseButtonPropDefs = {\n ...asChildPropDef,\n /**\n * Button size for responsive design and interface density\n * Supports responsive objects: { initial: '1', sm: '2', md: '3', lg: '4' }\n */\n size: { type: 'enum', className: 'rt-r-size', values: sizes, default: '2', responsive: true },\n /**\n * Visual variant that determines the button's appearance and context\n */\n variant: { type: 'enum', className: 'rt-variant', values: variants, default: 'solid', parseValue: parseVariant },\n ...accentColorPropDef,\n ...radiusPropDef,\n /**\n * Loading state that shows a spinner and disables interaction\n * Automatically sets disabled=true and provides accessibility announcements\n */\n loading: { type: 'boolean', className: 'rt-loading', default: false },\n /**\n * Full width mode that expands the button to fill its container\n * Useful for mobile layouts and form submissions\n */\n fullWidth: { type: 'boolean', className: 'rt-full-width', default: false },\n /**\n * Material type for visual rendering and depth effects\n * Controls how the button renders its visual elements\n */\n material: { type: 'enum', values: materials, default: undefined },\n /**\n * Panel background type (deprecated)\n * @deprecated Use `material` prop instead. This prop will be removed in a future version.\n */\n panelBackground: { type: 'enum', values: panelBackgrounds, default: undefined },\n /**\n * Flush mode that removes visual padding for seamless text integration\n * Only effective with ghost variant\n */\n flush: { type: 'boolean', default: false },\n} satisfies {\n size: PropDef<(typeof sizes)[number]>;\n variant: PropDef<(typeof variants)[number]>;\n loading: PropDef<boolean>;\n fullWidth: PropDef<boolean>;\n material: PropDef<(typeof materials)[number] | undefined>;\n panelBackground: PropDef<(typeof panelBackgrounds)[number] | undefined>;\n flush: PropDef<boolean>;\n};\n\nexport { baseButtonPropDefs };\n", "import { warnDeprecated } from './warn-deprecated.js';\n\n/**\n * `classic` was renamed `raised` in 0.14.0. The old name still renders, as `raised`, with a\n * one-time warning in development. Button's `override` is not a look but a way out of the\n * styles, so it warns too. Both are removed in 0.15.0.\n */\nfunction parseVariant(value: string): string {\n if (value === 'classic') {\n warnDeprecated('`variant=\"classic\"` is deprecated and will be removed in 0.15.0. Use `variant=\"raised\"`.');\n return 'raised';\n }\n if (value === 'override') {\n warnDeprecated(\n '`variant=\"override\"` is deprecated and will be removed in 0.15.0. Style the component with `className`, `style` or its CSS variables instead.',\n );\n }\n return value;\n}\n\nexport { parseVariant };\n", "import type { PropDef } from './prop-def.js';\n\nconst asChildPropDef = {\n /**\n * Composes the component into its immediate child instead of rendering its own HTML element.\n * You\u2019ll have to provide a single React Element child.\n */\n asChild: {\n type: 'boolean',\n },\n} satisfies {\n asChild: PropDef<boolean>;\n};\n\nexport { asChildPropDef };\n", "import type { PropDef } from './prop-def.js';\n\n// prettier-ignore\nconst accentColors = ['gray', 'gold', 'bronze', 'brown', 'yellow', 'amber', 'orange', 'tomato', 'red', 'ruby', 'crimson', 'pink', 'plum', 'purple', 'violet', 'iris', 'indigo', 'blue', 'cyan', 'teal', 'jade', 'green', 'grass', 'lime', 'mint', 'sky'] as const;\n\nconst grayColors = ['auto', 'gray', 'mauve', 'slate', 'sage', 'olive', 'sand'] as const;\n\nconst colorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: undefined as (typeof accentColors)[number] | undefined,\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// 1. When used on components that compose Text, sets the color of the text to the current accent.\n// 2. Re-declares the accent role tokens (`--accent-ink`, `--accent-solid`, ...) that descendants read.\nconst accentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: '' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\n// For components whose colour comes from their content (Badge, Avatar, Code, Callout,\n// UserCard): they rest gray, and `color` picks a category when it means something.\nconst grayAccentColorPropDef = {\n color: {\n type: 'enum',\n values: accentColors,\n default: 'gray' as (typeof accentColors)[number],\n },\n} satisfies {\n color: PropDef<(typeof accentColors)[number]>;\n};\n\nexport {\n accentColorPropDef,\n grayAccentColorPropDef,\n colorPropDef,\n //\n accentColors,\n grayColors,\n};\n", "import type { PropDef } from './prop-def.js';\n\nconst radii = ['none', 'small', 'medium', 'large', 'full'] as const;\n\nconst radiusPropDef = {\n radius: {\n type: 'enum',\n values: radii,\n default: undefined,\n },\n} satisfies {\n radius: PropDef<(typeof radii)[number]>;\n};\n\nexport { radiusPropDef, radii };\n"],
5
+ "mappings": "yaAAA,IAAAA,EAAA,GAAAC,EAAAD,EAAA,wBAAAE,IAAA,eAAAC,EAAAH,GCOA,SAASI,EAAaC,EAAuB,CAC3C,OAAIA,IAAU,UAEL,UAELA,IAAU,YACZ,OAIKA,EACT,CChBA,IAAMC,EAAiB,CAKrB,QAAS,CACP,KAAM,SACR,CACF,ECPA,IAAMC,EAAe,CAAC,OAAQ,OAAQ,SAAU,QAAS,SAAU,QAAS,SAAU,SAAU,MAAO,OAAQ,UAAW,OAAQ,OAAQ,SAAU,SAAU,OAAQ,SAAU,OAAQ,OAAQ,OAAQ,OAAQ,QAAS,QAAS,OAAQ,OAAQ,KAAK,EAgBvP,IAAMC,EAAqB,CACzB,MAAO,CACL,KAAM,OACN,OAAQC,EACR,QAAS,EACX,CACF,ECvBA,IAAMC,EAAQ,CAAC,OAAQ,QAAS,SAAU,QAAS,MAAM,EAEnDC,EAAgB,CACpB,OAAQ,CACN,KAAM,OACN,OAAQD,EACR,QAAS,MACX,CACF,EJIA,IAAME,EAAQ,CAAC,IAAK,IAAK,IAAK,GAAG,EAW3BC,EAAW,CAAC,SAAU,QAAS,OAAQ,UAAW,UAAW,QAAS,WAAY,SAAS,EAM3FC,EAAmB,CAAC,QAAS,aAAa,EAO1CC,EAAY,CAAC,QAAS,aAAa,EA+BnCC,EAAqB,CACzB,GAAGC,EAKH,KAAM,CAAE,KAAM,OAAQ,UAAW,YAAa,OAAQL,EAAO,QAAS,IAAK,WAAY,EAAK,EAI5F,QAAS,CAAE,KAAM,OAAQ,UAAW,aAAc,OAAQC,EAAU,QAAS,QAAS,WAAYK,CAAa,EAC/G,GAAGC,EACH,GAAGC,EAKH,QAAS,CAAE,KAAM,UAAW,UAAW,aAAc,QAAS,EAAM,EAKpE,UAAW,CAAE,KAAM,UAAW,UAAW,gBAAiB,QAAS,EAAM,EAKzE,SAAU,CAAE,KAAM,OAAQ,OAAQL,EAAW,QAAS,MAAU,EAKhE,gBAAiB,CAAE,KAAM,OAAQ,OAAQD,EAAkB,QAAS,MAAU,EAK9E,MAAO,CAAE,KAAM,UAAW,QAAS,EAAM,CAC3C",
6
6
  "names": ["base_button_props_exports", "__export", "baseButtonPropDefs", "__toCommonJS", "parseVariant", "value", "asChildPropDef", "accentColors", "accentColorPropDef", "accentColors", "radii", "radiusPropDef", "sizes", "variants", "panelBackgrounds", "materials", "baseButtonPropDefs", "asChildPropDef", "parseVariant", "accentColorPropDef", "radiusPropDef"]
7
7
  }
@@ -63,7 +63,7 @@ type ButtonRankProps = {
63
63
  variant?: BaseButtonProps['variant'];
64
64
  emphasis?: never;
65
65
  } | {
66
- /** The button's rank: `loud` (solid), `medium` (raised, the default) or `quiet` (ghost). */
66
+ /** The button's rank: `loud` (solid, the default), `medium` (raised) or `quiet` (ghost). */
67
67
  emphasis?: ButtonEmphasis;
68
68
  variant?: never;
69
69
  };
@@ -1,4 +1,4 @@
1
- "use strict";var gt=Object.create;var Y=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var ht=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var bt=(e,t)=>{for(var o in t)Y(e,o,{get:t[o],enumerable:!0})},Se=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ht(t))!Dt.call(e,r)&&r!==o&&Y(e,r,{get:()=>t[r],enumerable:!(a=Pt(t,r))||a.enumerable});return e};var h=(e,t,o)=>(o=e!=null?gt(vt(e)):{},Se(t||!e||!e.__esModule?Y(o,"default",{value:e,enumerable:!0}):o,e)),Ct=e=>Se(Y({},"__esModule",{value:!0}),e);var fo={};bt(fo,{Button:()=>yt});module.exports=Ct(fo);var G=h(require("react")),dt=h(require("classnames"));var d=h(require("react")),Xe=h(require("classnames")),Je=require("radix-ui");function Ne(e){return e==="classic"?"raised":(e==="override"&&void 0,e)}var O={asChild:{type:"boolean"}};var X=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],we=["auto","gray","mauve","slate","sage","olive","sand"],Be={color:{type:"enum",values:X,default:void 0}},Ve={color:{type:"enum",values:X,default:""}};var pe=["none","small","medium","large","full"],ke={radius:{type:"enum",values:pe,default:void 0}};var xt=["1","2","3","4"],Rt=["raised","solid","soft","surface","outline","ghost","override","classic"],Tt=["solid","translucent"],St=["solid","translucent"],le={...O,size:{type:"enum",className:"rt-r-size",values:xt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Rt,default:"raised",parseValue:Ne},...Ve,...ke,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:St,default:void 0},panelBackground:{type:"enum",values:Tt,default:void 0},flush:{type:"boolean",default:!1}};var Z=h(require("react")),He=h(require("classnames"));var Ee=h(require("classnames"));var Nt=[],wt=new Set;function Bt(e){let t=Object.assign({},...e),o=[],a=[],r=new Set;for(let p in t){let s=t[p],i=s.values??Nt,l={key:p,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:i,valueSet:i.length>0?new Set(i):wt,enumValueSet:s.type==="enum"?new Set([s.default,...i]):void 0};s.className?(o.push(l),r.add(p)):(l.hasDefault||s.type==="enum")&&a.push(l)}return{styling:o,passthrough:a,stylingKeys:r}}var Vt={children:new WeakMap};function Fe(e){let t=Vt;for(let o=0;o<e.length;o++){let a=e[o],r=t.children.get(a);r===void 0&&(r={children:new WeakMap},t.children.set(a,r)),t=r}return t.compiled??(t.compiled=Bt(e))}var kt=["initial","xs","sm","md","lg","xl"],ue=new Set(kt);function me(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ft=new Set(["initial","xs","sm","md","lg","xl"]);function W(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Ft.has(t))return!0;return!1}function J(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Oe({className:e,customProperties:t,...o}){let a=fe({allowArbitraryValues:!0,className:e,...o}),r=jt({customProperties:t,...o});return[a,r]}function fe({allowArbitraryValues:e,value:t,className:o,propValues:a,propValueSet:r,parseValue:p=s=>s}){if(t){if(typeof t=="string")return J(a,r,t)?je(o,t,p):e?o:void 0;if(W(t)){let s=t,i=[];for(let l in s){if(!me(s,l)||!ue.has(l))continue;let n=s[l];if(n!==void 0){if(J(a,r,n)){let u=je(o,n,p),f=l==="initial"?u:`${l}:${u}`;i.push(f)}else if(e){let u=l==="initial"?o:`${l}:${o}`;i.push(u)}}}return i.length>0?i.join(" "):""}if(e)return o}}function je(e,t,o){let a=e?"-":"",r=o(t),p=r?.startsWith("-"),s=p?"-":"",i=p?r?.substring(1):r;return`${s}${e}${a}${i}`}function jt({customProperties:e,value:t,propValues:o,propValueSet:a,parseValue:r=p=>p}){if(!t||typeof t=="string"&&J(o,a,t))return;let p;if(typeof t=="string"){let s=r(t);p={};for(let i of e)p[i]=s;return p}if(W(t)){let s=t;for(let i in s){if(!me(s,i)||!ue.has(i))continue;let l=s[i];if(l===void 0||J(o,a,l))continue;let n=r(l);p??(p={});for(let u of e){let f=i==="initial"?u:`${u}-${i}`;p[f]=n}}}return p??{}}function ce(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Ot(e,t){let o=e.initial,a=!1;return t.hasDefault&&o===void 0&&(o=t.default,a=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,a=!0),a?{...e,initial:o}:e}function N(e,...t){let{styling:o,passthrough:a,stylingKeys:r}=Fe(t),p={};for(let l in e)r.has(l)||(p[l]=e[l]);for(let l=0;l<a.length;l++){let n=a[l],u=p[n.key];if(u===void 0){n.hasDefault&&(p[n.key]=n.default);continue}n.enumValueSet!==void 0&&!n.enumValueSet.has(u)&&!W(u)&&(p[n.key]=n.default)}let s,i=[];for(let l=0;l<o.length;l++){let n=o[l],u=e[n.key];if(u===void 0&&n.hasDefault&&(u=n.default),n.enumValueSet!==void 0&&!n.enumValueSet.has(u)&&!W(u)&&(u=n.default),!!u){if(W(u)){if(!n.responsive)continue;u=Ot(u,n)}if(n.type==="enum"){let f=fe({allowArbitraryValues:!1,value:u,className:n.className,propValues:n.values,propValueSet:n.valueSet,parseValue:n.parseValue});f&&i.push(f);continue}if(n.type==="string"||n.type==="enum | string"){let[f,D]=Oe({className:n.className,customProperties:n.customProperties,propValues:n.type==="string"?[]:n.values,propValueSet:n.type==="string"?void 0:n.valueSet,parseValue:n.parseValue,value:u});D&&(s=ce(s,D)),f&&i.push(f);continue}if(n.type==="boolean"){i.push(n.className);continue}}}return p.className=(0,Ee.default)(i.length>0?i.join(" "):void 0,e.className),p.style=ce(s,e.style),p}var A=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ge={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:A,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:A,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:A,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:A,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:A,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:A,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:A,responsive:!0}};var We={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var H={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var de=["visible","hidden","clip","scroll","auto"],Et=["static","relative","absolute","fixed","sticky"],U=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Gt=["0","1"],Wt=["0","1"],At=["start","center","end","baseline","stretch"],Mt=["start","center","end","baseline","stretch"],Ae={...Ge,...H,...We,position:{type:"enum",className:"rt-r-position",values:Et,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:U,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:U,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:U,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:U,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:U,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:de,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:de,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:de,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:Gt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:Wt,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:At,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Mt,responsive:!0}};var M=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],E={m:{type:"enum | string",values:M,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:M,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:M,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var Q=require("radix-ui"),Uo=Q.Slot.Root,Me=Q.Slot.Root,qo=Q.Slot.Slottable;var ye=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ie={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:ye,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:ye,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:ye,responsive:!0}};var It=["div","span"],zt=["none","inline-flex","flex"],Ht=["row","column","row-reverse","column-reverse"],$t=["start","center","end","baseline","stretch"],Lt=["start","center","end","between"],Kt=["nowrap","wrap","wrap-reverse"],ze={as:{type:"enum",values:It,default:"div"},...O,display:{type:"enum",className:"rt-r-display",values:zt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:Ht,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:$t,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:Lt,parseValue:Ut,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:Kt,responsive:!0},...Ie};function Ut(e){return e==="between"?"space-between":e}var $=Z.forwardRef((e,t)=>{let{className:o,asChild:a,as:r="div",...p}=N(e,ze,Ae,E);return Z.createElement(a?Me:r,{...p,ref:t,className:(0,He.default)("rt-Flex",o)})});$.displayName="Flex";var v=h(require("react")),Le=h(require("classnames"));var qt=["1","2","3"],$e={size:{type:"enum",className:"rt-r-size",values:qt,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var ge=v.forwardRef((e,t)=>{let{className:o,children:a,loading:r,...p}=N(e,$e,E);if(!r)return a;let s=v.createElement("span",{...p,ref:t,className:(0,Le.default)("rt-Spinner",o)},v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}));return a===void 0?s:v.createElement($,{asChild:!0,position:"relative",align:"center",justify:"center"},v.createElement("span",null,v.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},a),v.createElement($,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,s))))});ge.displayName="Spinner";var Pe=require("radix-ui"),Ke=Pe.VisuallyHidden.Root,mr=Pe.VisuallyHidden.Root;var qe=h(require("react")),_t="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",Ue=new Set;function Yt(e){Ue.has(e)||(Ue.add(e),console.warn(e))}function ee(e){qe.useEffect(()=>{},[e])}function _e(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,a])=>[o,t(a)]))}function Ye(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var he=d.forwardRef((e,t)=>{let{size:o=le.size.default}=e,{className:a,children:r,asChild:p,as:s,color:i,radius:l,material:n,panelBackground:u,flush:f,disabled:D=e.loading,...x}=N(e,le,E);ee(e.panelBackground);let T=n??u,k=p?Je.Slot.Root:s||"button",S=p||!s||["button","input","textarea","select"].includes(s),F=!p&&(!s||s==="button"),j="type"in x,V=d.useId(),R=e.loading?`${V}-loading`:void 0,y=d.useMemo(()=>typeof r=="string"?r:d.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),C=d.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":R,"aria-label":`${y} (loading)`}:{},[e.loading,R,y]);return d.createElement(k,{"data-disabled":D||void 0,"data-accent-color":i,"data-radius":l,"data-material":T,"data-panel-background":T,"data-flush":f?"true":void 0,...x,...C,ref:t,className:(0,Xe.default)("rt-reset","rt-BaseButton",a),...S&&{disabled:D},...F&&!j?{type:"button"}:{}},e.loading?d.createElement(d.Fragment,null,d.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),d.createElement(Ke,null,d.createElement("span",{id:R},y," is loading, please wait..."),r),d.createElement($,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},d.createElement("span",null,d.createElement(ge,{size:_e(o,Ye),"aria-hidden":"true"})))):r)});he.displayName="BaseButton";var B=h(require("react")),ft=h(require("classnames")),L=require("radix-ui");var I=h(require("react")),at=require("radix-ui");var Xt=["loud","medium","quiet"],Qe={emphasis:{type:"enum",className:"rt-emphasis",values:Xt,default:void 0}};var Jt=["normal","start","end","both"],Ze={trim:{type:"enum",className:"rt-r-lt",values:Jt,responsive:!0}};var Qt=["left","center","right"],et={align:{type:"enum",className:"rt-r-ta",values:Qt,responsive:!0}};var Zt=["wrap","nowrap","pretty","balance"],tt={wrap:{type:"enum",className:"rt-r-tw",values:Zt,responsive:!0}};var ot={truncate:{type:"boolean",className:"rt-truncate"}};var eo=["sans","mono","serif"],rt={font:{type:"enum",className:"rt-r-ff",values:eo}};var to=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],st={weight:{type:"enum",className:"rt-r-weight",values:to,responsive:!0}};var oo=["span","div","label","p"],ro=["0","1","2","3","4","5","6","7","8","9","10","11","12"],nt={as:{type:"enum",values:oo,default:"span"},...O,size:{type:"enum",className:"rt-r-size",values:ro,responsive:!0},...rt,...st,...et,...Ze,...ot,...tt,...Be,...Qe};var so={...nt,...E},ve=I.memo(I.forwardRef((e,t)=>{let{children:o,className:a,asChild:r,as:p="span",color:s,...i}=N(e,so),l=a?`rt-Text ${a}`:"rt-Text";return r?I.createElement(at.Slot.Root,{"data-accent-color":s,...i,ref:t,className:l},o):I.createElement(p,{"data-accent-color":s,...i,ref:t,className:l},o)}));ve.displayName="Text";var c=h(require("react")),lt=h(require("classnames")),z=require("radix-ui"),te=require("radix-ui/internal");function it(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var De=h(require("react"));function w(e){let[t,o]=De.useState(e),[a,r]=De.useState(e);return Object.is(e,a)||(r(e),o(e)),[t,o]}var no=["inherit","light","dark"],ao=["solid","translucent"],io=["solid","translucent"],po=["90%","95%","100%","105%","110%"],pt=["sans","mono","serif"],m={...O,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:no,default:"inherit"},accentColor:{type:"enum",values:X,default:"gray"},grayColor:{type:"enum",values:we,default:"gray"},material:{type:"enum",values:io,default:"solid"},panelBackground:{type:"enum",values:ao,default:"solid"},radius:{type:"enum",values:pe,default:"full"},scaling:{type:"enum",values:po,default:"100%"},fontFamily:{type:"enum",values:pt,default:"sans"},headingFontFamily:{type:"enum",values:pt}};var P=()=>{},ts={appearance:m.appearance.default,accentColor:m.accentColor.default,grayColor:m.grayColor.default,resolvedGrayColor:m.grayColor.default,material:m.material.default,panelBackground:m.panelBackground.default,radius:m.radius.default,scaling:m.scaling.default,fontFamily:m.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:P,onAccentColorChange:P,onGrayColorChange:P,onMaterialChange:P,onPanelBackgroundChange:P,onRadiusChange:P,onScalingChange:P,onFontFamilyChange:P,onHeadingFontFamilyChange:P},be=c.createContext(void 0);var Ce=c.forwardRef((e,t)=>{let o=c.useContext(be),a=z.Direction.useDirection();return o===void 0?c.createElement(z.Tooltip.Provider,{delayDuration:200},c.createElement(z.Direction.Provider,{dir:a},c.createElement(ut,{...e,ref:t}))):c.createElement(xe,{...e,ref:t})});Ce.displayName="Theme";var ut=c.forwardRef((e,t)=>{let{appearance:o=m.appearance.default,accentColor:a=m.accentColor.default,grayColor:r=m.grayColor.default,material:p=m.material.default,panelBackground:s=m.panelBackground.default,radius:i=m.radius.default,scaling:l=m.scaling.default,fontFamily:n=m.fontFamily.default,headingFontFamily:u,hasBackground:f=m.hasBackground.default,...D}=e;ee(e.panelBackground);let[x,T]=w(o),[k,S]=w(a),[F,j]=w(r),V=p!==m.material.default?p:s,[R,y]=w(V),[C,b]=w(R),[g,re]=w(i),[K,se]=w(l),[ne,q]=w(n),[ae,_]=w(u);return c.createElement(xe,{...D,ref:t,isRoot:!0,hasBackground:f,appearance:x,accentColor:k,grayColor:F,material:R,panelBackground:C,radius:g,scaling:K,fontFamily:ne,headingFontFamily:ae,onAppearanceChange:T,onAccentColorChange:S,onGrayColorChange:j,onMaterialChange:y,onPanelBackgroundChange:b,onRadiusChange:re,onScalingChange:se,onFontFamilyChange:q,onHeadingFontFamilyChange:_})});ut.displayName="ThemeRoot";function lo(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var xe=c.forwardRef((e,t)=>{let o=c.useContext(be),{asChild:a,isRoot:r,hasBackground:p,appearance:s=e.appearance??o?.appearance??m.appearance.default,accentColor:i=e.accentColor??o?.accentColor??m.accentColor.default,grayColor:l=e.grayColor??o?.resolvedGrayColor??m.grayColor.default,material:n=e.material??o?.material??m.material.default,panelBackground:u=e.panelBackground??o?.panelBackground??m.panelBackground.default,radius:f=e.radius??o?.radius??m.radius.default,scaling:D=e.scaling??o?.scaling??m.scaling.default,fontFamily:x=e.fontFamily??o?.fontFamily??m.fontFamily.default,headingFontFamily:T=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:k=P,onAccentColorChange:S=P,onGrayColorChange:F=P,onMaterialChange:j=P,onPanelBackgroundChange:V=P,onRadiusChange:R=P,onScalingChange:y=P,onFontFamilyChange:C=P,onHeadingFontFamilyChange:b=P,...g}=e,re=a?z.Slot.Root:"div",K=l==="auto"?it(i):l,se=e.appearance==="light"||e.appearance==="dark",ne=p===void 0?r||se:p,q=c.useRef(null),ae=(0,te.useComposedRefs)(t,q),_="data-os"in g;return(0,te.useLayoutEffect)(()=>{if(!r||_)return;let ie=q.current;if(!ie)return;let Te=lo();if(Te)return ie.setAttribute("data-os",Te),()=>ie.removeAttribute("data-os")},[r,_]),c.createElement(be.Provider,{value:c.useMemo(()=>({appearance:s,accentColor:i,grayColor:l,resolvedGrayColor:K,material:n,panelBackground:u,radius:f,scaling:D,fontFamily:x,headingFontFamily:T,onAppearanceChange:k,onAccentColorChange:S,onGrayColorChange:F,onMaterialChange:j,onPanelBackgroundChange:V,onRadiusChange:R,onScalingChange:y,onFontFamilyChange:C,onHeadingFontFamilyChange:b}),[s,i,l,K,n,u,f,D,x,T,k,S,F,j,V,R,y,C,b])},c.createElement(re,{"data-is-root-theme":r?"true":"false","data-accent-color":i,"data-gray-color":K,"data-has-background":ne?"true":"false","data-material":n,"data-panel-background":u,"data-radius":f,"data-scaling":D,"data-font-family":x,"data-heading-font-family":T,ref:ae,...g,className:(0,lt.default)("radix-themes",{light:s==="light",dark:s==="dark"},g.className)}))});xe.displayName="ThemeImpl";var mt={content:{type:"ReactNode",required:!0},width:H.width,minWidth:H.minWidth,maxWidth:{...H.maxWidth,default:"360px"}};var Re=B.forwardRef((e,t)=>{let{children:o,className:a,open:r,defaultOpen:p,onOpenChange:s,delayDuration:i,disableHoverableContent:l,content:n,container:u,forceMount:f,...D}=N(e,mt),x={open:r,defaultOpen:p,onOpenChange:s,delayDuration:i,disableHoverableContent:l};return B.createElement(L.Tooltip.Root,{...x},B.createElement(L.Tooltip.Trigger,{asChild:!0},o),B.createElement(L.Tooltip.Portal,{container:u,forceMount:f},B.createElement(Ce,{asChild:!0},B.createElement(L.Tooltip.Content,{sideOffset:4,collisionPadding:10,...D,asChild:!1,ref:t,className:(0,ft.default)("rt-TooltipContent",a)},B.createElement(ve,{as:"p",className:"rt-TooltipText",size:"1"},n),B.createElement(L.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});Re.displayName="Tooltip";var oe=h(require("react"));function ct(e){let t=oe.useId(),o=!!e,a=oe.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:a}}var uo={loud:"solid",medium:"raised",quiet:"ghost"};function mo(e){if(e["aria-label"]||e["aria-labelledby"]||e.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
1
+ "use strict";var gt=Object.create;var Y=Object.defineProperty;var Pt=Object.getOwnPropertyDescriptor;var ht=Object.getOwnPropertyNames;var vt=Object.getPrototypeOf,Dt=Object.prototype.hasOwnProperty;var bt=(e,t)=>{for(var o in t)Y(e,o,{get:t[o],enumerable:!0})},Se=(e,t,o,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of ht(t))!Dt.call(e,r)&&r!==o&&Y(e,r,{get:()=>t[r],enumerable:!(a=Pt(t,r))||a.enumerable});return e};var h=(e,t,o)=>(o=e!=null?gt(vt(e)):{},Se(t||!e||!e.__esModule?Y(o,"default",{value:e,enumerable:!0}):o,e)),Ct=e=>Se(Y({},"__esModule",{value:!0}),e);var fo={};bt(fo,{Button:()=>yt});module.exports=Ct(fo);var G=h(require("react")),dt=h(require("classnames"));var d=h(require("react")),Xe=h(require("classnames")),Je=require("radix-ui");function Ne(e){return e==="classic"?"raised":(e==="override"&&void 0,e)}var O={asChild:{type:"boolean"}};var X=["gray","gold","bronze","brown","yellow","amber","orange","tomato","red","ruby","crimson","pink","plum","purple","violet","iris","indigo","blue","cyan","teal","jade","green","grass","lime","mint","sky"],we=["auto","gray","mauve","slate","sage","olive","sand"],Be={color:{type:"enum",values:X,default:void 0}},Ve={color:{type:"enum",values:X,default:""}};var pe=["none","small","medium","large","full"],ke={radius:{type:"enum",values:pe,default:void 0}};var xt=["1","2","3","4"],Rt=["raised","solid","soft","surface","outline","ghost","override","classic"],Tt=["solid","translucent"],St=["solid","translucent"],le={...O,size:{type:"enum",className:"rt-r-size",values:xt,default:"2",responsive:!0},variant:{type:"enum",className:"rt-variant",values:Rt,default:"solid",parseValue:Ne},...Ve,...ke,loading:{type:"boolean",className:"rt-loading",default:!1},fullWidth:{type:"boolean",className:"rt-full-width",default:!1},material:{type:"enum",values:St,default:void 0},panelBackground:{type:"enum",values:Tt,default:void 0},flush:{type:"boolean",default:!1}};var Z=h(require("react")),He=h(require("classnames"));var Ee=h(require("classnames"));var Nt=[],wt=new Set;function Bt(e){let t=Object.assign({},...e),o=[],a=[],r=new Set;for(let p in t){let s=t[p],i=s.values??Nt,l={key:p,type:s.type,default:s.default,hasDefault:s.default!==void 0,responsive:"responsive"in s,className:s.className,customProperties:s.customProperties,parseValue:s.parseValue,values:i,valueSet:i.length>0?new Set(i):wt,enumValueSet:s.type==="enum"?new Set([s.default,...i]):void 0};s.className?(o.push(l),r.add(p)):(l.hasDefault||s.type==="enum")&&a.push(l)}return{styling:o,passthrough:a,stylingKeys:r}}var Vt={children:new WeakMap};function Fe(e){let t=Vt;for(let o=0;o<e.length;o++){let a=e[o],r=t.children.get(a);r===void 0&&(r={children:new WeakMap},t.children.set(a,r)),t=r}return t.compiled??(t.compiled=Bt(e))}var kt=["initial","xs","sm","md","lg","xl"],ue=new Set(kt);function me(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var Ft=new Set(["initial","xs","sm","md","lg","xl"]);function W(e){if(typeof e!="object"||e===null)return!1;for(let t in e)if(Ft.has(t))return!0;return!1}function J(e,t,o){return t!==void 0?t.has(o):e.includes(o)}function Oe({className:e,customProperties:t,...o}){let a=fe({allowArbitraryValues:!0,className:e,...o}),r=jt({customProperties:t,...o});return[a,r]}function fe({allowArbitraryValues:e,value:t,className:o,propValues:a,propValueSet:r,parseValue:p=s=>s}){if(t){if(typeof t=="string")return J(a,r,t)?je(o,t,p):e?o:void 0;if(W(t)){let s=t,i=[];for(let l in s){if(!me(s,l)||!ue.has(l))continue;let n=s[l];if(n!==void 0){if(J(a,r,n)){let u=je(o,n,p),f=l==="initial"?u:`${l}:${u}`;i.push(f)}else if(e){let u=l==="initial"?o:`${l}:${o}`;i.push(u)}}}return i.length>0?i.join(" "):""}if(e)return o}}function je(e,t,o){let a=e?"-":"",r=o(t),p=r?.startsWith("-"),s=p?"-":"",i=p?r?.substring(1):r;return`${s}${e}${a}${i}`}function jt({customProperties:e,value:t,propValues:o,propValueSet:a,parseValue:r=p=>p}){if(!t||typeof t=="string"&&J(o,a,t))return;let p;if(typeof t=="string"){let s=r(t);p={};for(let i of e)p[i]=s;return p}if(W(t)){let s=t;for(let i in s){if(!me(s,i)||!ue.has(i))continue;let l=s[i];if(l===void 0||J(o,a,l))continue;let n=r(l);p??(p={});for(let u of e){let f=i==="initial"?u:`${u}-${i}`;p[f]=n}}}return p??{}}function ce(...e){let t;for(let o of e)o&&(t===void 0&&(t={}),Object.assign(t,o));return t}function Ot(e,t){let o=e.initial,a=!1;return t.hasDefault&&o===void 0&&(o=t.default,a=!0),t.enumValueSet!==void 0&&!t.enumValueSet.has(o)&&(o=t.default,a=!0),a?{...e,initial:o}:e}function N(e,...t){let{styling:o,passthrough:a,stylingKeys:r}=Fe(t),p={};for(let l in e)r.has(l)||(p[l]=e[l]);for(let l=0;l<a.length;l++){let n=a[l],u=p[n.key];if(u===void 0){n.hasDefault&&(p[n.key]=n.default);continue}n.enumValueSet!==void 0&&!n.enumValueSet.has(u)&&!W(u)&&(p[n.key]=n.default)}let s,i=[];for(let l=0;l<o.length;l++){let n=o[l],u=e[n.key];if(u===void 0&&n.hasDefault&&(u=n.default),n.enumValueSet!==void 0&&!n.enumValueSet.has(u)&&!W(u)&&(u=n.default),!!u){if(W(u)){if(!n.responsive)continue;u=Ot(u,n)}if(n.type==="enum"){let f=fe({allowArbitraryValues:!1,value:u,className:n.className,propValues:n.values,propValueSet:n.valueSet,parseValue:n.parseValue});f&&i.push(f);continue}if(n.type==="string"||n.type==="enum | string"){let[f,D]=Oe({className:n.className,customProperties:n.customProperties,propValues:n.type==="string"?[]:n.values,propValueSet:n.type==="string"?void 0:n.valueSet,parseValue:n.parseValue,value:u});D&&(s=ce(s,D)),f&&i.push(f);continue}if(n.type==="boolean"){i.push(n.className);continue}}}return p.className=(0,Ee.default)(i.length>0?i.join(" "):void 0,e.className),p.style=ce(s,e.style),p}var A=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ge={p:{type:"enum | string",className:"rt-r-p",customProperties:["--p"],values:A,responsive:!0},px:{type:"enum | string",className:"rt-r-px",customProperties:["--pl","--pr"],values:A,responsive:!0},py:{type:"enum | string",className:"rt-r-py",customProperties:["--pt","--pb"],values:A,responsive:!0},pt:{type:"enum | string",className:"rt-r-pt",customProperties:["--pt"],values:A,responsive:!0},pr:{type:"enum | string",className:"rt-r-pr",customProperties:["--pr"],values:A,responsive:!0},pb:{type:"enum | string",className:"rt-r-pb",customProperties:["--pb"],values:A,responsive:!0},pl:{type:"enum | string",className:"rt-r-pl",customProperties:["--pl"],values:A,responsive:!0}};var We={height:{type:"string",className:"rt-r-h",customProperties:["--height"],responsive:!0},minHeight:{type:"string",className:"rt-r-min-h",customProperties:["--min-height"],responsive:!0},maxHeight:{type:"string",className:"rt-r-max-h",customProperties:["--max-height"],responsive:!0}};var H={width:{type:"string",className:"rt-r-w",customProperties:["--width"],responsive:!0},minWidth:{type:"string",className:"rt-r-min-w",customProperties:["--min-width"],responsive:!0},maxWidth:{type:"string",className:"rt-r-max-w",customProperties:["--max-width"],responsive:!0}};var de=["visible","hidden","clip","scroll","auto"],Et=["static","relative","absolute","fixed","sticky"],U=["0","1","2","3","4","5","6","7","8","9","-1","-2","-3","-4","-5","-6","-7","-8","-9"],Gt=["0","1"],Wt=["0","1"],At=["start","center","end","baseline","stretch"],Mt=["start","center","end","baseline","stretch"],Ae={...Ge,...H,...We,position:{type:"enum",className:"rt-r-position",values:Et,responsive:!0},inset:{type:"enum | string",className:"rt-r-inset",customProperties:["--inset"],values:U,responsive:!0},top:{type:"enum | string",className:"rt-r-top",customProperties:["--top"],values:U,responsive:!0},right:{type:"enum | string",className:"rt-r-right",customProperties:["--right"],values:U,responsive:!0},bottom:{type:"enum | string",className:"rt-r-bottom",customProperties:["--bottom"],values:U,responsive:!0},left:{type:"enum | string",className:"rt-r-left",customProperties:["--left"],values:U,responsive:!0},overflow:{type:"enum",className:"rt-r-overflow",values:de,responsive:!0},overflowX:{type:"enum",className:"rt-r-ox",values:de,responsive:!0},overflowY:{type:"enum",className:"rt-r-oy",values:de,responsive:!0},flexBasis:{type:"string",className:"rt-r-fb",customProperties:["--flex-basis"],responsive:!0},flexShrink:{type:"enum | string",className:"rt-r-fs",customProperties:["--flex-shrink"],values:Gt,responsive:!0},flexGrow:{type:"enum | string",className:"rt-r-fg",customProperties:["--flex-grow"],values:Wt,responsive:!0},gridArea:{type:"string",className:"rt-r-ga",customProperties:["--grid-area"],responsive:!0},gridColumn:{type:"string",className:"rt-r-gc",customProperties:["--grid-column"],responsive:!0},gridColumnStart:{type:"string",className:"rt-r-gcs",customProperties:["--grid-column-start"],responsive:!0},gridColumnEnd:{type:"string",className:"rt-r-gce",customProperties:["--grid-column-end"],responsive:!0},gridRow:{type:"string",className:"rt-r-gr",customProperties:["--grid-row"],responsive:!0},gridRowStart:{type:"string",className:"rt-r-grs",customProperties:["--grid-row-start"],responsive:!0},gridRowEnd:{type:"string",className:"rt-r-gre",customProperties:["--grid-row-end"],responsive:!0},alignSelf:{type:"enum",className:"rt-r-as",values:At,responsive:!0},justifySelf:{type:"enum",className:"rt-r-js",values:Mt,responsive:!0}};var M=["0","1","2","3","4","5","6","7","8","9","10","11","12","-1","-2","-3","-4","-5","-6","-7","-8","-9","-10","-11","-12"],E={m:{type:"enum | string",values:M,responsive:!0,className:"rt-r-m",customProperties:["--m"]},mx:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mx",customProperties:["--ml","--mr"]},my:{type:"enum | string",values:M,responsive:!0,className:"rt-r-my",customProperties:["--mt","--mb"]},mt:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mt",customProperties:["--mt"]},mr:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mr",customProperties:["--mr"]},mb:{type:"enum | string",values:M,responsive:!0,className:"rt-r-mb",customProperties:["--mb"]},ml:{type:"enum | string",values:M,responsive:!0,className:"rt-r-ml",customProperties:["--ml"]}};var Q=require("radix-ui"),Uo=Q.Slot.Root,Me=Q.Slot.Root,qo=Q.Slot.Slottable;var ye=["0","1","2","3","4","5","6","7","8","9","10","11","12"],Ie={gap:{type:"enum | string",className:"rt-r-gap",customProperties:["--gap"],values:ye,responsive:!0},gapX:{type:"enum | string",className:"rt-r-cg",customProperties:["--column-gap"],values:ye,responsive:!0},gapY:{type:"enum | string",className:"rt-r-rg",customProperties:["--row-gap"],values:ye,responsive:!0}};var It=["div","span"],zt=["none","inline-flex","flex"],Ht=["row","column","row-reverse","column-reverse"],$t=["start","center","end","baseline","stretch"],Lt=["start","center","end","between"],Kt=["nowrap","wrap","wrap-reverse"],ze={as:{type:"enum",values:It,default:"div"},...O,display:{type:"enum",className:"rt-r-display",values:zt,responsive:!0},direction:{type:"enum",className:"rt-r-fd",values:Ht,responsive:!0},align:{type:"enum",className:"rt-r-ai",values:$t,responsive:!0},justify:{type:"enum",className:"rt-r-jc",values:Lt,parseValue:Ut,responsive:!0},wrap:{type:"enum",className:"rt-r-fw",values:Kt,responsive:!0},...Ie};function Ut(e){return e==="between"?"space-between":e}var $=Z.forwardRef((e,t)=>{let{className:o,asChild:a,as:r="div",...p}=N(e,ze,Ae,E);return Z.createElement(a?Me:r,{...p,ref:t,className:(0,He.default)("rt-Flex",o)})});$.displayName="Flex";var v=h(require("react")),Le=h(require("classnames"));var qt=["1","2","3"],$e={size:{type:"enum",className:"rt-r-size",values:qt,default:"2",responsive:!0},loading:{type:"boolean",default:!0}};var ge=v.forwardRef((e,t)=>{let{className:o,children:a,loading:r,...p}=N(e,$e,E);if(!r)return a;let s=v.createElement("span",{...p,ref:t,className:(0,Le.default)("rt-Spinner",o)},v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}),v.createElement("span",{className:"rt-SpinnerLeaf"}));return a===void 0?s:v.createElement($,{asChild:!0,position:"relative",align:"center",justify:"center"},v.createElement("span",null,v.createElement("span",{"aria-hidden":!0,style:{display:"contents",visibility:"hidden"},inert:void 0},a),v.createElement($,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},v.createElement("span",null,s))))});ge.displayName="Spinner";var Pe=require("radix-ui"),Ke=Pe.VisuallyHidden.Root,mr=Pe.VisuallyHidden.Root;var qe=h(require("react")),_t="Warning: The `panelBackground` prop is deprecated and will be removed in a future version. Use `material` prop instead.",Ue=new Set;function Yt(e){Ue.has(e)||(Ue.add(e),console.warn(e))}function ee(e){qe.useEffect(()=>{},[e])}function _e(e,t){if(e!==void 0)return typeof e=="string"?t(e):Object.fromEntries(Object.entries(e).map(([o,a])=>[o,t(a)]))}function Ye(e){switch(e){case"1":return"1";case"2":case"3":return"2";case"4":return"3"}}var he=d.forwardRef((e,t)=>{let{size:o=le.size.default}=e,{className:a,children:r,asChild:p,as:s,color:i,radius:l,material:n,panelBackground:u,flush:f,disabled:D=e.loading,...x}=N(e,le,E);ee(e.panelBackground);let T=n??u,k=p?Je.Slot.Root:s||"button",S=p||!s||["button","input","textarea","select"].includes(s),F=!p&&(!s||s==="button"),j="type"in x,V=d.useId(),R=e.loading?`${V}-loading`:void 0,y=d.useMemo(()=>typeof r=="string"?r:d.isValidElement(r)&&typeof r.props?.children=="string"?r.props.children:"button",[r]),C=d.useMemo(()=>e.loading?{"aria-busy":!0,"aria-disabled":!0,"aria-describedby":R,"aria-label":`${y} (loading)`}:{},[e.loading,R,y]);return d.createElement(k,{"data-disabled":D||void 0,"data-accent-color":i,"data-radius":l,"data-material":T,"data-panel-background":T,"data-flush":f?"true":void 0,...x,...C,ref:t,className:(0,Xe.default)("rt-reset","rt-BaseButton",a),...S&&{disabled:D},...F&&!j?{type:"button"}:{}},e.loading?d.createElement(d.Fragment,null,d.createElement("span",{style:{display:"contents",visibility:"hidden"},"aria-hidden":!0},r),d.createElement(Ke,null,d.createElement("span",{id:R},y," is loading, please wait..."),r),d.createElement($,{asChild:!0,align:"center",justify:"center",position:"absolute",inset:"0"},d.createElement("span",null,d.createElement(ge,{size:_e(o,Ye),"aria-hidden":"true"})))):r)});he.displayName="BaseButton";var B=h(require("react")),ft=h(require("classnames")),L=require("radix-ui");var I=h(require("react")),at=require("radix-ui");var Xt=["loud","medium","quiet"],Qe={emphasis:{type:"enum",className:"rt-emphasis",values:Xt,default:void 0}};var Jt=["normal","start","end","both"],Ze={trim:{type:"enum",className:"rt-r-lt",values:Jt,responsive:!0}};var Qt=["left","center","right"],et={align:{type:"enum",className:"rt-r-ta",values:Qt,responsive:!0}};var Zt=["wrap","nowrap","pretty","balance"],tt={wrap:{type:"enum",className:"rt-r-tw",values:Zt,responsive:!0}};var ot={truncate:{type:"boolean",className:"rt-truncate"}};var eo=["sans","mono","serif"],rt={font:{type:"enum",className:"rt-r-ff",values:eo}};var to=["thin","extralight","light","regular","medium","semibold","bold","extrabold"],st={weight:{type:"enum",className:"rt-r-weight",values:to,responsive:!0}};var oo=["span","div","label","p"],ro=["0","1","2","3","4","5","6","7","8","9","10","11","12"],nt={as:{type:"enum",values:oo,default:"span"},...O,size:{type:"enum",className:"rt-r-size",values:ro,responsive:!0},...rt,...st,...et,...Ze,...ot,...tt,...Be,...Qe};var so={...nt,...E},ve=I.memo(I.forwardRef((e,t)=>{let{children:o,className:a,asChild:r,as:p="span",color:s,...i}=N(e,so),l=a?`rt-Text ${a}`:"rt-Text";return r?I.createElement(at.Slot.Root,{"data-accent-color":s,...i,ref:t,className:l},o):I.createElement(p,{"data-accent-color":s,...i,ref:t,className:l},o)}));ve.displayName="Text";var c=h(require("react")),lt=h(require("classnames")),z=require("radix-ui"),te=require("radix-ui/internal");function it(e){switch(e){case"tomato":case"red":case"ruby":case"crimson":case"pink":case"plum":case"purple":case"violet":return"mauve";case"iris":case"indigo":case"blue":case"sky":case"cyan":return"slate";case"teal":case"jade":case"mint":case"green":return"sage";case"grass":case"lime":return"olive";case"yellow":case"amber":case"orange":case"brown":case"gold":case"bronze":return"sand";case"gray":return"gray"}}var De=h(require("react"));function w(e){let[t,o]=De.useState(e),[a,r]=De.useState(e);return Object.is(e,a)||(r(e),o(e)),[t,o]}var no=["inherit","light","dark"],ao=["solid","translucent"],io=["solid","translucent"],po=["90%","95%","100%","105%","110%"],pt=["sans","mono","serif"],m={...O,hasBackground:{type:"boolean",default:!0},appearance:{type:"enum",values:no,default:"inherit"},accentColor:{type:"enum",values:X,default:"gray"},grayColor:{type:"enum",values:we,default:"gray"},material:{type:"enum",values:io,default:"solid"},panelBackground:{type:"enum",values:ao,default:"solid"},radius:{type:"enum",values:pe,default:"full"},scaling:{type:"enum",values:po,default:"100%"},fontFamily:{type:"enum",values:pt,default:"sans"},headingFontFamily:{type:"enum",values:pt}};var P=()=>{},ts={appearance:m.appearance.default,accentColor:m.accentColor.default,grayColor:m.grayColor.default,resolvedGrayColor:m.grayColor.default,material:m.material.default,panelBackground:m.panelBackground.default,radius:m.radius.default,scaling:m.scaling.default,fontFamily:m.fontFamily.default,headingFontFamily:void 0,onAppearanceChange:P,onAccentColorChange:P,onGrayColorChange:P,onMaterialChange:P,onPanelBackgroundChange:P,onRadiusChange:P,onScalingChange:P,onFontFamilyChange:P,onHeadingFontFamilyChange:P},be=c.createContext(void 0);var Ce=c.forwardRef((e,t)=>{let o=c.useContext(be),a=z.Direction.useDirection();return o===void 0?c.createElement(z.Tooltip.Provider,{delayDuration:200},c.createElement(z.Direction.Provider,{dir:a},c.createElement(ut,{...e,ref:t}))):c.createElement(xe,{...e,ref:t})});Ce.displayName="Theme";var ut=c.forwardRef((e,t)=>{let{appearance:o=m.appearance.default,accentColor:a=m.accentColor.default,grayColor:r=m.grayColor.default,material:p=m.material.default,panelBackground:s=m.panelBackground.default,radius:i=m.radius.default,scaling:l=m.scaling.default,fontFamily:n=m.fontFamily.default,headingFontFamily:u,hasBackground:f=m.hasBackground.default,...D}=e;ee(e.panelBackground);let[x,T]=w(o),[k,S]=w(a),[F,j]=w(r),V=p!==m.material.default?p:s,[R,y]=w(V),[C,b]=w(R),[g,re]=w(i),[K,se]=w(l),[ne,q]=w(n),[ae,_]=w(u);return c.createElement(xe,{...D,ref:t,isRoot:!0,hasBackground:f,appearance:x,accentColor:k,grayColor:F,material:R,panelBackground:C,radius:g,scaling:K,fontFamily:ne,headingFontFamily:ae,onAppearanceChange:T,onAccentColorChange:S,onGrayColorChange:j,onMaterialChange:y,onPanelBackgroundChange:b,onRadiusChange:re,onScalingChange:se,onFontFamilyChange:q,onHeadingFontFamilyChange:_})});ut.displayName="ThemeRoot";function lo(){if(typeof navigator>"u")return;let e=navigator.userAgent;if(e.includes("Win"))return"windows";if(e.includes("Mac"))return"macos";if(e.includes("Linux"))return"linux"}var xe=c.forwardRef((e,t)=>{let o=c.useContext(be),{asChild:a,isRoot:r,hasBackground:p,appearance:s=e.appearance??o?.appearance??m.appearance.default,accentColor:i=e.accentColor??o?.accentColor??m.accentColor.default,grayColor:l=e.grayColor??o?.resolvedGrayColor??m.grayColor.default,material:n=e.material??o?.material??m.material.default,panelBackground:u=e.panelBackground??o?.panelBackground??m.panelBackground.default,radius:f=e.radius??o?.radius??m.radius.default,scaling:D=e.scaling??o?.scaling??m.scaling.default,fontFamily:x=e.fontFamily??o?.fontFamily??m.fontFamily.default,headingFontFamily:T=e.headingFontFamily??o?.headingFontFamily,onAppearanceChange:k=P,onAccentColorChange:S=P,onGrayColorChange:F=P,onMaterialChange:j=P,onPanelBackgroundChange:V=P,onRadiusChange:R=P,onScalingChange:y=P,onFontFamilyChange:C=P,onHeadingFontFamilyChange:b=P,...g}=e,re=a?z.Slot.Root:"div",K=l==="auto"?it(i):l,se=e.appearance==="light"||e.appearance==="dark",ne=p===void 0?r||se:p,q=c.useRef(null),ae=(0,te.useComposedRefs)(t,q),_="data-os"in g;return(0,te.useLayoutEffect)(()=>{if(!r||_)return;let ie=q.current;if(!ie)return;let Te=lo();if(Te)return ie.setAttribute("data-os",Te),()=>ie.removeAttribute("data-os")},[r,_]),c.createElement(be.Provider,{value:c.useMemo(()=>({appearance:s,accentColor:i,grayColor:l,resolvedGrayColor:K,material:n,panelBackground:u,radius:f,scaling:D,fontFamily:x,headingFontFamily:T,onAppearanceChange:k,onAccentColorChange:S,onGrayColorChange:F,onMaterialChange:j,onPanelBackgroundChange:V,onRadiusChange:R,onScalingChange:y,onFontFamilyChange:C,onHeadingFontFamilyChange:b}),[s,i,l,K,n,u,f,D,x,T,k,S,F,j,V,R,y,C,b])},c.createElement(re,{"data-is-root-theme":r?"true":"false","data-accent-color":i,"data-gray-color":K,"data-has-background":ne?"true":"false","data-material":n,"data-panel-background":u,"data-radius":f,"data-scaling":D,"data-font-family":x,"data-heading-font-family":T,ref:ae,...g,className:(0,lt.default)("radix-themes",{light:s==="light",dark:s==="dark"},g.className)}))});xe.displayName="ThemeImpl";var mt={content:{type:"ReactNode",required:!0},width:H.width,minWidth:H.minWidth,maxWidth:{...H.maxWidth,default:"360px"}};var Re=B.forwardRef((e,t)=>{let{children:o,className:a,open:r,defaultOpen:p,onOpenChange:s,delayDuration:i,disableHoverableContent:l,content:n,container:u,forceMount:f,...D}=N(e,mt),x={open:r,defaultOpen:p,onOpenChange:s,delayDuration:i,disableHoverableContent:l};return B.createElement(L.Tooltip.Root,{...x},B.createElement(L.Tooltip.Trigger,{asChild:!0},o),B.createElement(L.Tooltip.Portal,{container:u,forceMount:f},B.createElement(Ce,{asChild:!0},B.createElement(L.Tooltip.Content,{sideOffset:4,collisionPadding:10,...D,asChild:!1,ref:t,className:(0,ft.default)("rt-TooltipContent",a)},B.createElement(ve,{as:"p",className:"rt-TooltipText",size:"1"},n),B.createElement(L.Tooltip.Arrow,{className:"rt-TooltipArrow"})))))});Re.displayName="Tooltip";var oe=h(require("react"));function ct(e){let t=oe.useId(),o=!!e,a=oe.useMemo(()=>o?{"aria-describedby":t}:{},[o,t]);return{tooltipId:t,hasTooltip:o,accessibilityProps:a}}var uo={loud:"solid",medium:"raised",quiet:"ghost"};function mo(e){if(e["aria-label"]||e["aria-labelledby"]||e.children)return;console.error(`IconButton: Icon buttons must have an accessible name. Please provide either:
2
2
  - aria-label prop with descriptive text
3
3
  - aria-labelledby prop referencing a label element
4
4
  - or visible text children`)}var yt=G.forwardRef(({className:e,style:t,tooltip:o,tooltipSide:a="top",tooltipAlign:r="center",tooltipDelayDuration:p,tooltipDisableHoverableContent:s,overrideStyles:i,iconOnly:l=!1,emphasis:n,variant:u,...f},D)=>{let{tooltipId:x,hasTooltip:T,accessibilityProps:k}=ct(o),S=G.useMemo(()=>{if(!i)return;let R={},y=(b,g)=>{g!==void 0&&(R[b]=g)},C=(b,g)=>{g&&(y(`--button-override-${b}color`,g.color),y(`--button-override-${b}background`,g.background),y(`--button-override-${b}background-color`,g.backgroundColor),y(`--button-override-${b}box-shadow`,g.boxShadow),y(`--button-override-${b}filter`,g.filter),y(`--button-override-${b}outline`,g.outline),y(`--button-override-${b}outline-offset`,g.outlineOffset),y(`--button-override-${b}opacity`,g.opacity))};return C("",i.normal),C("hover-",i.hover),C("active-",i.active),C("pressed-",i.pressed),C("open-",i.open),C("disabled-",i.disabled),i.focus&&(y("--button-override-focus-outline",i.focus.outline),y("--button-override-focus-outline-offset",i.focus.outlineOffset)),R},[i]),F=G.useMemo(()=>S?{...S,...t}:t,[S,t]);if(l&&(mo(f),f.fullWidth&&void 0),n!==void 0&&u!==void 0)throw new Error("Button: pass `emphasis` or `variant`, not both. They set the same thing.");let j=n!==void 0?uo[n]:u,V=G.createElement(he,{...f,variant:j,...k,ref:D,className:(0,dt.default)(l?"rt-IconButton":"rt-Button",e),style:F});return T?G.createElement(Re,{content:o,side:a,align:r,delayDuration:p,disableHoverableContent:s,id:x},V):V});yt.displayName="Button";