impact-nova 2.6.3 → 3.0.0-alpha.0

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 (254) hide show
  1. package/dist/components/data/ag-grid-react/ag-grid-cell-components.d.ts +9 -0
  2. package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +16 -0
  3. package/dist/components/data/ag-grid-react/ag-grid-list.js +23 -0
  4. package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +7 -0
  5. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.d.ts +14 -0
  6. package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +70 -0
  7. package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.d.ts +10 -5
  8. package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +73 -41
  9. package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +7 -0
  10. package/dist/components/data/ag-grid-react/cell-renderers/index.js +42 -36
  11. package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.d.ts +19 -0
  12. package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +89 -0
  13. package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.d.ts +28 -0
  14. package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.js +96 -0
  15. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +30 -10
  16. package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +72 -24
  17. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +42 -0
  18. package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +86 -0
  19. package/dist/components/data/ag-grid-react/index.d.ts +1 -1
  20. package/dist/components/data/ag-grid-react/index.js +162 -146
  21. package/dist/components/data/data-table/data-table.js +85 -82
  22. package/dist/components/data/data-table/data-table.types.d.ts +5 -0
  23. package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
  24. package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
  25. package/dist/components/data/expandable-list-item/sku-next-page-coordinator.d.ts +14 -0
  26. package/dist/components/data/expandable-list-item/sku-strip-lookahead.d.ts +26 -0
  27. package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +10 -0
  28. package/dist/components/data/expandable-list-item/useSkuStripVirtualizer.d.ts +30 -0
  29. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +81 -0
  30. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.item-grid.d.ts +1 -0
  31. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.product-card.d.ts +7 -0
  32. package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +2 -0
  33. package/dist/components/data-display/chart/chart-heatmap-demos.d.ts +3 -0
  34. package/dist/components/data-display/chart/chart-heatmap-play.d.ts +9 -0
  35. package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +22 -0
  36. package/dist/components/data-display/chart/chart.diverging-heatmap.stories-data.d.ts +43 -0
  37. package/dist/components/data-display/chart/chart.js +100 -93
  38. package/dist/components/data-display/chart/chart.types.d.ts +10 -0
  39. package/dist/components/data-display/chart/chart.utils.d.ts +14 -2
  40. package/dist/components/data-display/chart/chart.utils.js +132 -35
  41. package/dist/components/data-display/chart/index.js +15 -13
  42. package/dist/components/data-display/chart/resolve-highcharts-options.js +19 -14
  43. package/dist/components/data-display/globe-map/globe-map.d.ts +8 -0
  44. package/dist/components/data-display/globe-map/globe-map.js +161 -0
  45. package/dist/components/data-display/globe-map/globe-map.stories-data.d.ts +12 -0
  46. package/dist/components/data-display/globe-map/globe-map.types.d.ts +83 -0
  47. package/dist/components/data-display/globe-map/globe-map.utils.d.ts +115 -0
  48. package/dist/components/data-display/globe-map/globe-map.utils.js +259 -0
  49. package/dist/components/data-display/globe-map/globe-map.variants.d.ts +19 -0
  50. package/dist/components/data-display/globe-map/globe-map.variants.js +80 -0
  51. package/dist/components/data-display/globe-map/index.d.ts +2 -0
  52. package/dist/components/data-display/globe-map/index.js +10 -0
  53. package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.d.ts +4 -0
  54. package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.js +7 -0
  55. package/dist/components/data-display/globe-map/internals/globe-map-context.d.ts +25 -0
  56. package/dist/components/data-display/globe-map/internals/globe-map-context.js +19 -0
  57. package/dist/components/data-display/globe-map/internals/globe-map-legend.d.ts +2 -0
  58. package/dist/components/data-display/globe-map/internals/globe-map-legend.js +51 -0
  59. package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.d.ts +6 -0
  60. package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.js +119 -0
  61. package/dist/components/data-display/globe-map/internals/globe-map-point-card.d.ts +2 -0
  62. package/dist/components/data-display/globe-map/internals/globe-map-point-card.js +106 -0
  63. package/dist/components/data-display/globe-map/internals/globe-map-scene.d.ts +17 -0
  64. package/dist/components/data-display/globe-map/internals/globe-map-scene.js +218 -0
  65. package/dist/components/data-display/globe-map/internals/globe-map-tooltip.d.ts +2 -0
  66. package/dist/components/data-display/globe-map/internals/globe-map-tooltip.js +33 -0
  67. package/dist/components/data-display/globe-map/internals/use-globe-map-scene.d.ts +45 -0
  68. package/dist/components/data-display/globe-map/internals/use-globe-map-scene.js +270 -0
  69. package/dist/components/data-display/hex-tilemap/hex-tilemap.d.ts +9 -0
  70. package/dist/components/data-display/hex-tilemap/hex-tilemap.js +94 -0
  71. package/dist/components/data-display/hex-tilemap/hex-tilemap.stories-data.d.ts +7 -0
  72. package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +43 -0
  73. package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.d.ts +11 -0
  74. package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.js +47 -0
  75. package/dist/components/data-display/hex-tilemap/index.d.ts +2 -0
  76. package/dist/components/data-display/hex-tilemap/index.js +12 -0
  77. package/dist/components/data-display/hex-tilemap/internals/hex-camera.d.ts +40 -0
  78. package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +103 -0
  79. package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.d.ts +9 -0
  80. package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.js +1387 -0
  81. package/dist/components/data-display/hex-tilemap/internals/hex-geometry.d.ts +21 -0
  82. package/dist/components/data-display/hex-tilemap/internals/hex-geometry.js +82 -0
  83. package/dist/components/data-display/hex-tilemap/internals/hex-lattice.d.ts +18 -0
  84. package/dist/components/data-display/hex-tilemap/internals/hex-lattice.js +47 -0
  85. package/dist/components/data-display/hex-tilemap/internals/hex-layout.d.ts +10 -0
  86. package/dist/components/data-display/hex-tilemap/internals/hex-layout.js +35 -0
  87. package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.d.ts +31 -0
  88. package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.js +138 -0
  89. package/dist/components/data-display/hex-tilemap/internals/hex-regions.d.ts +6 -0
  90. package/dist/components/data-display/hex-tilemap/internals/hex-regions.js +18 -0
  91. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +24 -0
  92. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.js +19 -0
  93. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.d.ts +2 -0
  94. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.js +51 -0
  95. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.d.ts +2 -0
  96. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.js +36 -0
  97. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.d.ts +3 -0
  98. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +147 -0
  99. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.d.ts +13 -0
  100. package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.js +99 -0
  101. package/dist/components/data-display/hex-tilemap/internals/hex-world-grid.d.ts +8 -0
  102. package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +27 -0
  103. package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +137 -0
  104. package/dist/components/data-display/notch-card/index.d.ts +2 -0
  105. package/dist/components/data-display/notch-card/index.js +6 -0
  106. package/dist/components/data-display/notch-card/notch-card.d.ts +7 -0
  107. package/dist/components/data-display/notch-card/notch-card.js +151 -0
  108. package/dist/components/data-display/notch-card/notch-card.path.d.ts +19 -0
  109. package/dist/components/data-display/notch-card/notch-card.path.js +118 -0
  110. package/dist/components/data-display/notch-card/notch-card.types.d.ts +15 -0
  111. package/dist/components/data-display/notch-card/notch-card.variants.d.ts +15 -0
  112. package/dist/components/data-display/notch-card/notch-card.variants.js +86 -0
  113. package/dist/components/feedback/hover-card/hover-card.d.ts +3 -1
  114. package/dist/components/feedback/hover-card/hover-card.js +28 -24
  115. package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +1 -1
  116. package/dist/components/feedback/tooltip/overflow-tooltip.js +63 -57
  117. package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +4 -0
  118. package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
  119. package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
  120. package/dist/components/flows/filter-panel/filter-panel.js +4 -4
  121. package/dist/components/flows/filter-strip/index.d.ts +1 -0
  122. package/dist/components/flows/filter-strip/index.js +4 -2
  123. package/dist/components/flows/iris-chat/index.d.ts +10 -0
  124. package/dist/components/flows/iris-chat/index.js +55 -0
  125. package/dist/components/flows/iris-chat/iris-chat-artifact.d.ts +4 -0
  126. package/dist/components/flows/iris-chat/iris-chat-artifact.js +125 -0
  127. package/dist/components/flows/iris-chat/iris-chat-composer.d.ts +3 -0
  128. package/dist/components/flows/iris-chat/iris-chat-composer.js +297 -0
  129. package/dist/components/flows/iris-chat/iris-chat-context.d.ts +14 -0
  130. package/dist/components/flows/iris-chat/iris-chat-context.js +23 -0
  131. package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +18 -0
  132. package/dist/components/flows/iris-chat/iris-chat-icons.js +176 -0
  133. package/dist/components/flows/iris-chat/iris-chat-markdown.d.ts +3 -0
  134. package/dist/components/flows/iris-chat/iris-chat-markdown.js +62 -0
  135. package/dist/components/flows/iris-chat/iris-chat-menu.d.ts +15 -0
  136. package/dist/components/flows/iris-chat/iris-chat-menu.js +259 -0
  137. package/dist/components/flows/iris-chat/iris-chat-prompt.d.ts +3 -0
  138. package/dist/components/flows/iris-chat/iris-chat-prompt.js +46 -0
  139. package/dist/components/flows/iris-chat/iris-chat-thinking.d.ts +12 -0
  140. package/dist/components/flows/iris-chat/iris-chat-thinking.js +202 -0
  141. package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +37 -0
  142. package/dist/components/flows/iris-chat/iris-chat-thread.js +493 -0
  143. package/dist/components/flows/iris-chat/iris-chat.d.ts +43 -0
  144. package/dist/components/flows/iris-chat/iris-chat.js +336 -0
  145. package/dist/components/flows/iris-chat/iris-chat.types.d.ts +208 -0
  146. package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +14 -0
  147. package/dist/components/flows/iris-chat/iris-chat.variants.js +78 -0
  148. package/dist/components/flows/iris-chat/read-iris-greeting-period.d.ts +4 -0
  149. package/dist/components/flows/iris-chat/read-iris-greeting-period.js +16 -0
  150. package/dist/components/flows/wizard/index.d.ts +2 -2
  151. package/dist/components/flows/wizard/index.js +17 -13
  152. package/dist/components/flows/wizard/wizard-context.d.ts +6 -1
  153. package/dist/components/flows/wizard/wizard-context.js +15 -7
  154. package/dist/components/flows/wizard/wizard.d.ts +22 -4
  155. package/dist/components/flows/wizard/wizard.js +278 -174
  156. package/dist/components/flows/wizard/wizard.types.d.ts +40 -0
  157. package/dist/components/forms/choice-card/assets/featured-backdrop-baked.webp.js +4 -0
  158. package/dist/components/forms/choice-card/assets/featured-noise.webp.js +4 -0
  159. package/dist/components/forms/choice-card/choice-card-featured-arcs.d.ts +4 -0
  160. package/dist/components/forms/choice-card/choice-card-featured-arcs.js +42 -0
  161. package/dist/components/forms/choice-card/choice-card-featured-backdrop.d.ts +4 -0
  162. package/dist/components/forms/choice-card/choice-card-featured-backdrop.js +45 -0
  163. package/dist/components/forms/choice-card/choice-card-indicator.variants.d.ts +8 -0
  164. package/dist/components/forms/choice-card/choice-card-indicator.variants.js +5 -0
  165. package/dist/components/forms/choice-card/choice-card-percent.d.ts +11 -0
  166. package/dist/components/forms/choice-card/choice-card-percent.js +80 -0
  167. package/dist/components/forms/choice-card/choice-card.d.ts +40 -3
  168. package/dist/components/forms/choice-card/choice-card.js +651 -170
  169. package/dist/components/forms/choice-card/choice-card.types.d.ts +40 -0
  170. package/dist/components/forms/choice-card/choice-card.variants.d.ts +7 -0
  171. package/dist/components/forms/choice-card/choice-card.variants.js +100 -0
  172. package/dist/components/forms/choice-card/index.d.ts +2 -1
  173. package/dist/components/forms/choice-card/index.js +27 -10
  174. package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
  175. package/dist/components/forms/select/components/Submenu.js +2 -3
  176. package/dist/components/layout/header/header.d.ts +3 -2
  177. package/dist/components/layout/header/header.js +67 -47
  178. package/dist/components/layout/header/header.types.d.ts +1 -0
  179. package/dist/components/primitives/iris/iris-agent-cursor.d.ts +3 -0
  180. package/dist/components/primitives/iris/iris-agent-cursor.js +89 -0
  181. package/dist/components/primitives/iris/iris-alan-gradient-icon.d.ts +5 -0
  182. package/dist/components/primitives/iris/iris-alan-gradient-icon.js +69 -0
  183. package/dist/components/primitives/iris/iris-control-context.d.ts +15 -0
  184. package/dist/components/primitives/iris/iris-control-context.js +44 -0
  185. package/dist/components/primitives/iris/iris-control-region.d.ts +10 -0
  186. package/dist/components/primitives/iris/iris-control-region.js +102 -0
  187. package/dist/components/primitives/iris/iris-control.types.d.ts +24 -0
  188. package/dist/components/primitives/iris/iris-control.variants.d.ts +4 -0
  189. package/dist/components/primitives/iris/iris-control.variants.js +20 -0
  190. package/dist/components/primitives/iris/iris.d.ts +24 -0
  191. package/dist/components/primitives/iris/iris.js +232 -0
  192. package/dist/components/primitives/iris/iris.types.d.ts +35 -0
  193. package/dist/components/primitives/iris/iris.variants.d.ts +30 -0
  194. package/dist/components/primitives/iris/iris.variants.js +120 -0
  195. package/dist/components/primitives/stepper/internals/pipeline-current-mark.d.ts +6 -0
  196. package/dist/components/primitives/stepper/internals/pipeline-current-mark.js +35 -0
  197. package/dist/components/primitives/stepper/internals/rail-status-dot.d.ts +13 -0
  198. package/dist/components/primitives/stepper/internals/rail-status-dot.js +70 -0
  199. package/dist/components/primitives/stepper/internals/step-hit-target.d.ts +15 -0
  200. package/dist/components/primitives/stepper/internals/step-hit-target.js +51 -0
  201. package/dist/components/primitives/stepper/internals/step-model.d.ts +3 -0
  202. package/dist/components/primitives/stepper/internals/step-model.js +10 -0
  203. package/dist/components/primitives/stepper/internals/stepper-compact.d.ts +5 -0
  204. package/dist/components/primitives/stepper/internals/stepper-compact.js +68 -0
  205. package/dist/components/primitives/stepper/internals/stepper-pipeline.d.ts +7 -0
  206. package/dist/components/primitives/stepper/internals/stepper-pipeline.js +87 -0
  207. package/dist/components/primitives/stepper/internals/stepper-rail.d.ts +5 -0
  208. package/dist/components/primitives/stepper/internals/stepper-rail.js +105 -0
  209. package/dist/components/primitives/stepper/internals/stepper-summary.d.ts +5 -0
  210. package/dist/components/primitives/stepper/internals/stepper-summary.js +103 -0
  211. package/dist/components/primitives/stepper/internals/stepper-track.d.ts +8 -0
  212. package/dist/components/primitives/stepper/internals/stepper-track.js +170 -0
  213. package/dist/components/primitives/stepper/stepper.d.ts +1 -0
  214. package/dist/components/primitives/stepper/stepper.js +134 -52
  215. package/dist/components/primitives/stepper/stepper.types.d.ts +17 -0
  216. package/dist/components/primitives/stepper/stepper.variants.d.ts +26 -0
  217. package/dist/components/primitives/stepper/stepper.variants.js +165 -5
  218. package/dist/components/primitives/tabs/tabs.d.ts +4 -1
  219. package/dist/components/primitives/tabs/tabs.js +131 -59
  220. package/dist/components/primitives/tabs/tabs.types.d.ts +5 -1
  221. package/dist/i18n/defaultMessages.d.ts +100 -0
  222. package/dist/i18n/defaultMessages.js +118 -21
  223. package/dist/i18n/index.d.ts +1 -1
  224. package/dist/i18n/locales/de.js +99 -2
  225. package/dist/i18n/locales/es.js +99 -2
  226. package/dist/i18n/locales/hi.js +99 -2
  227. package/dist/i18n/locales/kn.js +99 -2
  228. package/dist/impact-nova-components.css +972 -2
  229. package/dist/impact-nova-tokens.scss +109 -1
  230. package/dist/impact-nova.css +1 -1
  231. package/dist/index.d.ts +1 -1
  232. package/dist/index.js +585 -551
  233. package/dist/lib/virtualized/directional-range-extractor.d.ts +26 -0
  234. package/dist/lib/virtualized/directional-range-extractor.js +39 -0
  235. package/dist/lib/virtualized/index.d.ts +3 -0
  236. package/dist/lib/virtualized/index.js +35 -27
  237. package/dist/lib/virtualized/scroll-seek.d.ts +61 -0
  238. package/dist/lib/virtualized/scroll-seek.js +61 -0
  239. package/dist/lib/virtualized/usePaintedRangeVirtualizer.d.ts +19 -0
  240. package/dist/lib/virtualized/usePaintedRangeVirtualizer.js +30 -0
  241. package/dist/lib/virtualized/useResponsiveColumnCount.d.ts +35 -0
  242. package/dist/lib/virtualized/useResponsiveColumnCount.js +51 -0
  243. package/dist/lib/virtualized/useScrollSeekPaintedRange.d.ts +13 -0
  244. package/dist/lib/virtualized/useScrollSeekPaintedRange.js +45 -0
  245. package/dist/lib/virtualized/useVirtualizedList.d.ts +7 -0
  246. package/dist/lib/virtualized/useVirtualizedList.js +89 -87
  247. package/dist/lib/virtualized/useVirtualizedRows.d.ts +9 -2
  248. package/dist/lib/virtualized/useVirtualizedRows.js +15 -13
  249. package/dist/lib/virtualized/virtualized.types.d.ts +2 -0
  250. package/dist/llms/rules/installation.js +1 -1
  251. package/dist/llms/rules/requirements.js +1 -1
  252. package/dist/tailwind.config.js +3 -1
  253. package/dist/theme/tailwind-colors.js +2 -1
  254. package/package.json +39 -4
@@ -1,268 +1,749 @@
1
- import { jsx as a } from "react/jsx-runtime";
2
- import * as i from "react";
3
- import * as x from "@radix-ui/react-radio-group";
4
- import { useControllableState as y } from "@radix-ui/react-use-controllable-state";
5
- import { Check as M } from "impact-nova-icons";
1
+ import { jsx as o, jsxs as g } from "react/jsx-runtime";
2
+ import * as n from "react";
3
+ import * as L from "@radix-ui/react-checkbox";
4
+ import * as G from "@radix-ui/react-radio-group";
5
+ import { Slot as T } from "@radix-ui/react-slot";
6
+ import { useControllableState as M } from "@radix-ui/react-use-controllable-state";
7
+ import { Checkmark as V } from "impact-nova-icons";
8
+ import { Badge as F } from "../../data-display/badge/badge.js";
6
9
  import { createComponent as p } from "../../../lib/primitives/create-component.js";
7
- import { cn as h } from "../../../lib/utils.js";
8
- const v = i.createContext(null), g = i.createContext({
10
+ import { useComposedRefs as _ } from "../../../lib/compose-refs.js";
11
+ import { cn as l } from "../../../lib/utils.js";
12
+ import { choiceCardCheckboxIndicatorClassName as H, choiceCardRadioIndicatorClassName as $ } from "./choice-card-indicator.variants.js";
13
+ import { ChoiceCardFeaturedBackdrop as K } from "./choice-card-featured-backdrop.js";
14
+ import { choiceCardVariants as W } from "./choice-card.variants.js";
15
+ const y = n.createContext(null), x = n.createContext({
16
+ value: "",
9
17
  selected: !1,
10
- type: "single"
11
- }), k = () => {
12
- const e = i.useContext(v);
18
+ type: "single",
19
+ size: "md",
20
+ variant: "default",
21
+ labelIsExplicit: !1,
22
+ setAccessibleName: () => {
23
+ }
24
+ }), v = n.createContext({
25
+ inCompare: !1,
26
+ rows: 0,
27
+ fit: "scroll"
28
+ }), B = () => {
29
+ const e = n.useContext(y);
13
30
  if (!e)
14
31
  throw new Error("ChoiceCard components must be used within ChoiceCardGroup");
15
32
  return e;
16
33
  };
17
- function T() {
18
- const { value: e, type: o, setValue: t, isSelected: r } = k();
19
- return i.useMemo(
34
+ function Ce() {
35
+ const { value: e, type: a, setValue: t, isSelected: r } = B();
36
+ return n.useMemo(
20
37
  () => ({
21
38
  value: e,
22
- type: o,
39
+ type: a,
23
40
  setValue: t,
24
41
  isSelected: r
25
42
  }),
26
- [e, o, t, r]
43
+ [e, a, t, r]
44
+ );
45
+ }
46
+ function pe() {
47
+ return n.useContext(x);
48
+ }
49
+ function Z({
50
+ selected: e,
51
+ disabled: a,
52
+ mode: t,
53
+ size: r,
54
+ variant: c,
55
+ className: i
56
+ }) {
57
+ return l(
58
+ W({
59
+ variant: c,
60
+ size: r,
61
+ selected: e,
62
+ mode: t,
63
+ disabled: !!a
64
+ }),
65
+ i
27
66
  );
28
67
  }
29
- const w = (e, o, t) => h(
30
- "relative flex flex-col items-start gap-3 p-3 rounded-xl",
31
- "border-t border-r border-b-2 border-l-4",
32
- "cursor-pointer select-none transition-[border-color,background-color] duration-150",
33
- "focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-focus-ring",
34
- e ? "border-brand bg-brand-tint hover:bg-brand-tint-hover" : "border-stroke-subtle bg-canvas-elevated hover:border-brand hover:bg-canvas-muted",
35
- o && "cursor-not-allowed opacity-60",
36
- t
37
- ), S = ({
68
+ const q = ({
38
69
  value: e,
39
- defaultValue: o = "",
70
+ defaultValue: a = "",
40
71
  onValueChange: t,
41
72
  disabled: r,
42
- orientation: m = "horizontal",
43
- wrap: u = !1,
44
- className: s,
45
- children: l
73
+ orientation: c = "horizontal",
74
+ wrap: i = !1,
75
+ className: m,
76
+ children: h
46
77
  }) => {
47
- const [c, n] = y({
78
+ const [C, s] = M({
48
79
  prop: e,
49
- defaultProp: o,
80
+ defaultProp: a,
50
81
  onChange: t
51
- }), d = i.useCallback(
52
- (C) => c === C,
53
- [c]
54
- ), f = i.useMemo(
82
+ }), u = n.useCallback(
83
+ (d) => C === d,
84
+ [C]
85
+ ), f = n.useMemo(
55
86
  () => ({
56
87
  type: "single",
57
88
  disabled: r,
58
- value: c,
59
- setValue: (C) => n(C),
60
- isSelected: d,
61
- toggle: (C) => n(C)
89
+ value: C,
90
+ setValue: (d) => s(d),
91
+ isSelected: u,
92
+ toggle: (d) => s(d)
62
93
  }),
63
- [r, c, n, d]
94
+ [r, C, s, u]
64
95
  );
65
- return /* @__PURE__ */ a(v.Provider, { value: f, children: /* @__PURE__ */ a(
66
- x.Root,
96
+ return /* @__PURE__ */ o(y.Provider, { value: f, children: /* @__PURE__ */ o(
97
+ G.Root,
67
98
  {
68
- value: c,
69
- onValueChange: n,
99
+ value: C,
100
+ onValueChange: s,
70
101
  disabled: r,
71
- className: s,
102
+ className: m,
72
103
  "data-component": "choice-card-group",
73
104
  "data-type": "single",
74
- "data-layout": u ? "wrap" : m === "vertical" ? "column" : "row",
75
- children: l
105
+ "data-layout": i ? "wrap" : c === "vertical" ? "column" : "row",
106
+ children: h
76
107
  }
77
108
  ) });
78
- }, P = ({
109
+ }, J = ({
79
110
  value: e,
80
- defaultValue: o = [],
111
+ defaultValue: a = [],
81
112
  onValueChange: t,
82
113
  disabled: r,
83
- orientation: m = "horizontal",
84
- wrap: u = !1,
85
- className: s,
86
- children: l
114
+ orientation: c = "horizontal",
115
+ wrap: i = !1,
116
+ className: m,
117
+ children: h
87
118
  }) => {
88
- const [c, n] = y({
119
+ const [C, s] = M({
89
120
  prop: e,
90
- defaultProp: o,
121
+ defaultProp: a,
91
122
  onChange: t
92
- }), d = i.useMemo(() => c ?? [], [c]), f = i.useCallback(
93
- (b) => d.includes(b),
94
- [d]
95
- ), C = i.useCallback(
123
+ }), u = n.useMemo(() => C ?? [], [C]), f = n.useCallback(
124
+ (b) => u.includes(b),
125
+ [u]
126
+ ), d = n.useCallback(
96
127
  (b) => {
97
- if (d.includes(b)) {
98
- n(d.filter((N) => N !== b));
128
+ if (u.includes(b)) {
129
+ s(u.filter((N) => N !== b));
99
130
  return;
100
131
  }
101
- n([...d, b]);
132
+ s([...u, b]);
102
133
  },
103
- [d, n]
104
- ), G = i.useMemo(
134
+ [u, s]
135
+ ), k = n.useMemo(
105
136
  () => ({
106
137
  type: "multiple",
107
138
  disabled: r,
108
- value: d,
109
- setValue: (b) => n(b),
139
+ value: u,
140
+ setValue: (b) => s(b),
110
141
  isSelected: f,
111
- toggle: C
142
+ toggle: d
112
143
  }),
113
- [r, d, n, f, C]
144
+ [r, u, s, f, d]
114
145
  );
115
- return /* @__PURE__ */ a(v.Provider, { value: G, children: /* @__PURE__ */ a(
146
+ return /* @__PURE__ */ o(y.Provider, { value: k, children: /* @__PURE__ */ o(
116
147
  "div",
117
148
  {
118
149
  role: "group",
119
- className: s,
150
+ className: m,
120
151
  "data-component": "choice-card-group",
121
152
  "data-type": "multiple",
122
- "data-layout": u ? "wrap" : m === "vertical" ? "column" : "row",
123
- children: l
153
+ "data-layout": i ? "wrap" : c === "vertical" ? "column" : "row",
154
+ children: h
124
155
  }
125
156
  ) });
126
- }, V = (e) => e.type === "multiple" ? /* @__PURE__ */ a(P, { ...e }) : /* @__PURE__ */ a(S, { ...e });
127
- V.displayName = "ChoiceCardGroup";
128
- const j = p("ChoiceCardSurface", ({ className: e, selected: o, disabled: t, children: r, ...m }, u) => /* @__PURE__ */ a(
129
- "div",
130
- {
131
- ref: u,
132
- className: w(o, t, e),
133
- "data-component": "choice-card",
134
- "data-selected": o || void 0,
135
- ...m,
136
- children: r
157
+ }, O = (e) => e.type === "multiple" ? /* @__PURE__ */ o(J, { ...e }) : /* @__PURE__ */ o(q, { ...e });
158
+ O.displayName = "ChoiceCardGroup";
159
+ function E(e, a, t) {
160
+ if (e) {
161
+ a.preventDefault(), a.stopPropagation();
162
+ return;
137
163
  }
138
- )), E = p(
164
+ t?.(a);
165
+ }
166
+ function Q(e) {
167
+ return e instanceof Element && !!e.closest(
168
+ 'a, button, input, textarea, select, [role="button"], [data-slot="choice-card-control"]'
169
+ );
170
+ }
171
+ const U = p(
172
+ "ChoiceCardSurface",
173
+ ({
174
+ className: e,
175
+ selected: a,
176
+ disabled: t = !1,
177
+ mode: r,
178
+ size: c,
179
+ variant: i,
180
+ children: m,
181
+ onClick: h,
182
+ onPointerDown: C,
183
+ onKeyDown: s,
184
+ ...u
185
+ }, f) => /* @__PURE__ */ o(
186
+ "div",
187
+ {
188
+ ref: f,
189
+ className: Z({
190
+ selected: a,
191
+ disabled: t,
192
+ mode: r,
193
+ size: c,
194
+ variant: i,
195
+ className: e
196
+ }),
197
+ "data-component": "choice-card",
198
+ "data-selected": a || void 0,
199
+ "data-disabled": t || void 0,
200
+ "data-size": c,
201
+ "data-variant": i,
202
+ "aria-disabled": t || void 0,
203
+ onClick: (d) => E(t, d, h),
204
+ onPointerDown: (d) => E(t, d, C),
205
+ onKeyDown: (d) => {
206
+ if (t && (d.key === " " || d.key === "Enter")) {
207
+ d.preventDefault(), d.stopPropagation();
208
+ return;
209
+ }
210
+ s?.(d);
211
+ },
212
+ ...u,
213
+ children: m
214
+ }
215
+ )
216
+ ), he = p(
139
217
  "ChoiceCard",
140
- ({ value: e, className: o, children: t, disabled: r, ...m }, u) => {
141
- const s = k(), l = r || s.disabled, c = s.isSelected(e), n = i.useMemo(
218
+ ({
219
+ value: e,
220
+ className: a,
221
+ children: t,
222
+ disabled: r,
223
+ size: c = "md",
224
+ variant: i = "default",
225
+ "aria-label": m,
226
+ ...h
227
+ }, C) => {
228
+ const s = B(), u = n.useContext(v), f = r || s.disabled, d = s.isSelected(e), [k, b] = n.useState(""), N = n.useCallback((w) => {
229
+ b((P) => P === w ? P : w);
230
+ }, []), S = !!m, j = n.useMemo(
142
231
  () => ({
143
- selected: c,
144
- disabled: l,
145
- type: s.type
232
+ value: e,
233
+ selected: d,
234
+ disabled: f,
235
+ type: s.type,
236
+ size: c,
237
+ variant: i,
238
+ labelIsExplicit: S,
239
+ setAccessibleName: N
146
240
  }),
147
- [c, l, s.type]
148
- );
149
- return s.type === "single" ? /* @__PURE__ */ a(g.Provider, { value: n, children: /* @__PURE__ */ a(x.Item, { value: e, asChild: !0, disabled: l, children: /* @__PURE__ */ a(
150
- j,
241
+ [e, d, f, s.type, c, i, S, N]
242
+ ), z = m ?? (k || e), R = () => {
243
+ f || s.toggle(e);
244
+ }, A = (w) => {
245
+ Q(w.target) || R(), h.onClick?.(w);
246
+ }, I = l(
247
+ "pointer-events-none absolute inset-0 z-0 opacity-0 outline-none",
248
+ u.inCompare && "[grid-column:1] [grid-row:1/-1]"
249
+ ), D = s.type === "single" ? /* @__PURE__ */ o(
250
+ G.Item,
151
251
  {
152
- ref: u,
153
- selected: c,
154
- disabled: l,
155
- className: o,
156
- ...m,
157
- children: t
252
+ value: e,
253
+ disabled: f,
254
+ className: I,
255
+ "data-slot": "choice-card-control",
256
+ "aria-label": z
158
257
  }
159
- ) }) }) : /* @__PURE__ */ a(g.Provider, { value: n, children: /* @__PURE__ */ a(
160
- "button",
258
+ ) : /* @__PURE__ */ o(
259
+ L.Root,
161
260
  {
162
- ref: u,
163
- type: "button",
164
- role: "checkbox",
165
- "aria-checked": c,
166
- disabled: l,
167
- className: w(c, l, o),
168
- "data-component": "choice-card",
169
- "data-selected": c || void 0,
170
- onClick: () => s.toggle(e),
171
- children: t
261
+ checked: d,
262
+ disabled: f,
263
+ onCheckedChange: R,
264
+ className: I,
265
+ "data-slot": "choice-card-control",
266
+ "aria-label": z
267
+ }
268
+ );
269
+ return /* @__PURE__ */ o(x.Provider, { value: j, children: /* @__PURE__ */ g(
270
+ U,
271
+ {
272
+ ref: C,
273
+ selected: d,
274
+ disabled: f,
275
+ mode: s.type,
276
+ size: c,
277
+ variant: i,
278
+ className: l(
279
+ a,
280
+ u.inCompare && l(
281
+ "isolate grid w-full grid-rows-subgrid [grid-row:1/-1] gap-0",
282
+ u.fit === "auto" ? "min-w-0 max-w-[420px]" : "min-w-[411px]"
283
+ )
284
+ ),
285
+ ...h,
286
+ onClick: A,
287
+ children: [
288
+ D,
289
+ i === "featured" ? /* @__PURE__ */ o(K, {}) : null,
290
+ t
291
+ ]
172
292
  }
173
293
  ) });
174
294
  }
175
- ), q = p(
295
+ ), fe = p(
176
296
  "ChoiceCardIndicator",
177
- ({ className: e }, o) => {
178
- const { selected: t, type: r } = i.useContext(g);
179
- return r === "multiple" ? /* @__PURE__ */ a(
180
- "div",
297
+ ({ className: e }, a) => {
298
+ const { selected: t, type: r, disabled: c } = n.useContext(x);
299
+ return r === "multiple" ? /* @__PURE__ */ o(
300
+ "span",
181
301
  {
182
- ref: o,
183
- className: h(
184
- "w-5 h-5 rounded border-2 flex items-center justify-center shrink-0 transition-colors",
185
- t ? "border-brand bg-brand text-brand-foreground" : "border-stroke-field bg-transparent",
302
+ ref: a,
303
+ className: l(
304
+ H,
305
+ t && "border-brand bg-accent text-brand",
306
+ c && "border-stroke bg-disabled-surface text-disabled-foreground data-[state=checked]:border-stroke data-[state=checked]:bg-disabled-surface",
186
307
  e
187
308
  ),
309
+ "data-slot": "choice-card-indicator",
310
+ "data-state": t ? "checked" : "unchecked",
188
311
  "aria-hidden": "true",
189
- children: t && /* @__PURE__ */ a(M, { size: 12 })
312
+ children: t ? /* @__PURE__ */ o(V, { className: "h-3.5 w-3.5" }) : null
190
313
  }
191
- ) : /* @__PURE__ */ a(
192
- "div",
314
+ ) : /* @__PURE__ */ o(
315
+ "span",
193
316
  {
194
- ref: o,
195
- className: h(
196
- "w-5 h-5 rounded-full border-2 flex items-center justify-center shrink-0 transition-colors",
197
- t ? "border-brand" : "border-stroke-field",
317
+ ref: a,
318
+ className: l(
319
+ $,
320
+ t && "ring-brand",
321
+ c && "bg-disabled-surface ring-stroke",
198
322
  e
199
323
  ),
324
+ "data-slot": "choice-card-indicator",
200
325
  "aria-hidden": "true",
201
- children: t && /* @__PURE__ */ a("div", { className: "w-2.5 h-2.5 rounded-full bg-brand" })
326
+ children: t ? /* @__PURE__ */ o("span", { className: "absolute inset-[3px] rounded-full bg-current" }) : null
202
327
  }
203
328
  );
204
329
  }
205
- ), A = p(
206
- "ChoiceCardContent",
207
- ({ className: e, children: o, ...t }, r) => /* @__PURE__ */ a(
330
+ ), be = p(
331
+ "ChoiceCardBackground",
332
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ o(
208
333
  "div",
209
334
  {
210
335
  ref: r,
211
- className: h("flex flex-col items-start gap-2 w-full", e),
212
- "data-slot": "choice-card-content",
336
+ className: l("pointer-events-none absolute inset-0 overflow-hidden", e),
337
+ "data-slot": "choice-card-background",
338
+ "aria-hidden": "true",
213
339
  ...t,
214
- children: o
340
+ children: a
215
341
  }
216
342
  )
217
- ), B = p("ChoiceCardMedia", ({ className: e, children: o, ...t }, r) => /* @__PURE__ */ a(
343
+ );
344
+ function X({ className: e }) {
345
+ return /* @__PURE__ */ o(
346
+ "svg",
347
+ {
348
+ width: 28,
349
+ height: 32,
350
+ viewBox: "0 0 28 32",
351
+ className: l("relative z-0 block h-8 w-7 shrink-0", e),
352
+ "data-slot": "choice-card-ribbon-wedge",
353
+ "aria-hidden": "true",
354
+ children: /* @__PURE__ */ o(
355
+ "path",
356
+ {
357
+ d: "M11 16 0 0h28v32H0l11-16Z",
358
+ fill: "var(--color-choice-card-ribbon-wedge)"
359
+ }
360
+ )
361
+ }
362
+ );
363
+ }
364
+ const ge = p(
365
+ "ChoiceCardRibbon",
366
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
367
+ "div",
368
+ {
369
+ ref: r,
370
+ className: l("pointer-events-none absolute bottom-0 right-0 flex h-8 items-stretch", e),
371
+ "data-slot": "choice-card-ribbon",
372
+ ...t,
373
+ children: [
374
+ /* @__PURE__ */ o(X, {}),
375
+ /* @__PURE__ */ o(
376
+ "div",
377
+ {
378
+ className: l(
379
+ // Start fill at the chevron tip (28 − 11) so no empty purple band sits before the label
380
+ "relative z-[1] -ms-[17px] flex h-8 items-center rounded-br-xl pe-2 ps-1",
381
+ "bg-[linear-gradient(90deg,var(--color-choice-card-ribbon-from)_0%,var(--color-choice-card-ribbon-to)_100%)]"
382
+ ),
383
+ "data-slot": "choice-card-ribbon-fill",
384
+ children: /* @__PURE__ */ o("span", { className: "text-xs font-bold leading-5 text-content capitalize whitespace-nowrap", children: a })
385
+ }
386
+ )
387
+ ]
388
+ }
389
+ )
390
+ ), xe = p(
391
+ "ChoiceCardFooter",
392
+ ({ className: e, children: a, ...t }, r) => {
393
+ const c = n.useContext(v);
394
+ return /* @__PURE__ */ o(
395
+ "div",
396
+ {
397
+ ref: r,
398
+ className: l(
399
+ "flex flex-wrap items-start gap-2",
400
+ c.inCompare && "[grid-row:-1] self-end pt-4",
401
+ e
402
+ ),
403
+ "data-slot": "choice-card-footer",
404
+ ...t,
405
+ children: a
406
+ }
407
+ );
408
+ }
409
+ ), we = p(
410
+ "ChoiceCardContent",
411
+ ({ className: e, children: a, ...t }, r) => {
412
+ const { variant: c } = n.useContext(x);
413
+ return n.useContext(v).inCompare ? /* @__PURE__ */ o(
414
+ "div",
415
+ {
416
+ ref: r,
417
+ className: l("contents", e),
418
+ "data-slot": "choice-card-content",
419
+ ...t,
420
+ children: a
421
+ }
422
+ ) : /* @__PURE__ */ o(
423
+ "div",
424
+ {
425
+ ref: r,
426
+ className: l(
427
+ "relative z-[1] flex min-w-0 flex-1 flex-col items-start gap-1",
428
+ c === "featured" && "w-full flex-none gap-2 p-3",
429
+ c === "compare" && "w-full flex-none gap-4",
430
+ e
431
+ ),
432
+ "data-slot": "choice-card-content",
433
+ ...t,
434
+ children: a
435
+ }
436
+ );
437
+ }
438
+ ), ve = p("ChoiceCardMedia", ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ o(
218
439
  "div",
219
440
  {
220
441
  ref: r,
221
- className: h("flex items-center justify-center shrink-0", e),
442
+ className: l("flex shrink-0 items-center justify-center", e),
222
443
  "data-slot": "choice-card-media",
223
444
  ...t,
224
- children: o
445
+ children: a
225
446
  }
226
- )), F = p("ChoiceCardTitle", ({ className: e, children: o, ...t }, r) => /* @__PURE__ */ a(
227
- "h3",
228
- {
229
- ref: r,
230
- className: h(
231
- "text-base font-medium leading-tight text-content capitalize",
232
- e
233
- ),
234
- ...t,
235
- children: o
236
- }
237
- )), J = p(
447
+ )), Ne = p("ChoiceCardTitle", ({ className: e, children: a, ...t }, r) => {
448
+ const { selected: c, disabled: i, size: m, variant: h, labelIsExplicit: C, setAccessibleName: s } = n.useContext(x), u = n.useRef(null), f = _(r, u);
449
+ return n.useLayoutEffect(() => {
450
+ if (C) return;
451
+ const d = u.current?.textContent?.trim();
452
+ d && s(d);
453
+ }, [a, C, s]), /* @__PURE__ */ o(
454
+ "h3",
455
+ {
456
+ ref: f,
457
+ className: l(
458
+ "capitalize text-content",
459
+ m === "sm" ? "text-sm font-semibold leading-6" : "text-base font-bold leading-6",
460
+ (h === "featured" || h === "compare") && "text-base font-semibold leading-6",
461
+ i && !c && "text-content-secondary",
462
+ e
463
+ ),
464
+ ...t,
465
+ children: a
466
+ }
467
+ );
468
+ }), ke = p(
238
469
  "ChoiceCardHeader",
239
- ({ className: e, children: o, ...t }, r) => /* @__PURE__ */ a(
470
+ ({ className: e, children: a, ...t }, r) => {
471
+ const c = n.useContext(v);
472
+ return /* @__PURE__ */ o(
473
+ "div",
474
+ {
475
+ ref: r,
476
+ className: l(
477
+ "flex w-full items-center gap-2",
478
+ c.inCompare && "[grid-row:1] min-w-0 overflow-hidden",
479
+ e
480
+ ),
481
+ "data-slot": "choice-card-header",
482
+ ...t,
483
+ children: a
484
+ }
485
+ );
486
+ }
487
+ ), ye = p("ChoiceCardDescription", ({ className: e, children: a, ...t }, r) => {
488
+ const { selected: c, disabled: i, variant: m } = n.useContext(x);
489
+ return /* @__PURE__ */ o(
490
+ "p",
491
+ {
492
+ ref: r,
493
+ className: l(
494
+ "text-xs font-medium leading-4 text-content-secondary",
495
+ m === "featured" && "leading-[18px]",
496
+ m === "compare" && "capitalize font-bold leading-5 text-content-icon",
497
+ i && !c && m !== "featured" && "text-content-muted",
498
+ e
499
+ ),
500
+ ...t,
501
+ children: a
502
+ }
503
+ );
504
+ }), Se = p(
505
+ "ChoiceCardStatus",
506
+ ({
507
+ className: e,
508
+ asChild: a = !1,
509
+ placement: t = "start",
510
+ icon: r,
511
+ children: c = "Selected",
512
+ ...i
513
+ }, m) => {
514
+ const { selected: h } = n.useContext(x);
515
+ return h ? /* @__PURE__ */ o(
516
+ a ? T : "div",
517
+ {
518
+ ref: m,
519
+ "data-slot": "choice-card-status",
520
+ "data-placement": t,
521
+ className: l(
522
+ "pointer-events-none absolute z-10 -top-4",
523
+ t === "center" ? "left-1/2 -translate-x-1/2" : "start-3",
524
+ e
525
+ ),
526
+ ...i,
527
+ children: a ? c : /* @__PURE__ */ o(F, { variant: "solid", color: "success", size: "md", icon: r ?? /* @__PURE__ */ o(V, { className: "size-4" }), children: c })
528
+ }
529
+ ) : null;
530
+ }
531
+ ), ze = p(
532
+ "ChoiceCardIndex",
533
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ o(
534
+ "span",
535
+ {
536
+ ref: r,
537
+ "data-slot": "choice-card-index",
538
+ className: l(
539
+ "inline-flex size-[22px] shrink-0 items-center justify-center rounded-md bg-content-icon text-[12px] font-bold leading-none tracking-[-0.12px] text-brand-foreground group-data-[selected]:bg-success",
540
+ e
541
+ ),
542
+ ...t,
543
+ children: a
544
+ }
545
+ )
546
+ ), Re = p(
547
+ "ChoiceCardStats",
548
+ ({ className: e, children: a, ...t }, r) => {
549
+ const c = n.Children.toArray(a);
550
+ return /* @__PURE__ */ o(
551
+ "div",
552
+ {
553
+ ref: r,
554
+ "data-slot": "choice-card-stats",
555
+ className: l(
556
+ "flex h-[46px] w-full items-center rounded-lg bg-canvas-muted",
557
+ e
558
+ ),
559
+ ...t,
560
+ children: c.map((i, m) => /* @__PURE__ */ g(n.Fragment, { children: [
561
+ m > 0 ? /* @__PURE__ */ o("div", { className: "h-3 w-px shrink-0 bg-stroke-field", "aria-hidden": "true" }) : null,
562
+ i
563
+ ] }, m))
564
+ }
565
+ );
566
+ }
567
+ ), Ie = p(
568
+ "ChoiceCardStat",
569
+ ({ className: e, value: a, label: t, ...r }, c) => /* @__PURE__ */ g(
570
+ "div",
571
+ {
572
+ ref: c,
573
+ "data-slot": "choice-card-stat",
574
+ className: l(
575
+ "flex min-w-0 flex-1 flex-col items-center gap-0.5 p-1",
576
+ e
577
+ ),
578
+ ...r,
579
+ children: [
580
+ /* @__PURE__ */ o("p", { className: "text-sm font-medium leading-5 text-content-secondary", children: a }),
581
+ /* @__PURE__ */ o("p", { className: "text-xs font-medium leading-4 text-content-heading capitalize", children: t })
582
+ ]
583
+ }
584
+ )
585
+ );
586
+ function Y(e, a) {
587
+ if (e <= 0) return "max-content";
588
+ const t = a === "auto" ? "minmax(0, 420px)" : "minmax(411px, 1fr)";
589
+ return `max-content ${Array.from(
590
+ { length: e },
591
+ (c, i) => i === 0 ? t : `1rem ${t}`
592
+ ).join(" ")}`;
593
+ }
594
+ function ee({ rows: e }) {
595
+ return /* @__PURE__ */ g(
596
+ "div",
597
+ {
598
+ "data-slot": "choice-card-compare-gutter",
599
+ className: "grid w-4 grid-rows-subgrid [grid-row:1/-1]",
600
+ "aria-hidden": "true",
601
+ children: [
602
+ /* @__PURE__ */ o("span", { className: "[grid-row:1]" }),
603
+ /* @__PURE__ */ o("span", { className: "[grid-row:2]" }),
604
+ Array.from({ length: e }, (a, t) => /* @__PURE__ */ o(
605
+ "span",
606
+ {
607
+ className: "w-full self-center border-t border-dashed border-canvas-accordion"
608
+ },
609
+ t
610
+ )),
611
+ /* @__PURE__ */ o("span", { className: "[grid-row:-1]" })
612
+ ]
613
+ }
614
+ );
615
+ }
616
+ const te = p(
617
+ "ChoiceCardCompareLabels",
618
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
240
619
  "div",
241
620
  {
242
621
  ref: r,
243
- className: h("flex items-center gap-1 w-full", e),
244
- "data-slot": "choice-card-header",
622
+ "data-slot": "choice-card-compare-labels",
623
+ className: l(
624
+ "sticky start-0 z-20 grid grid-rows-subgrid items-center justify-items-end bg-canvas [grid-row:1/-1]",
625
+ e
626
+ ),
245
627
  ...t,
246
- children: o
628
+ children: [
629
+ /* @__PURE__ */ o("span", { className: "[grid-row:1]", "aria-hidden": "true" }),
630
+ /* @__PURE__ */ o("span", { className: "[grid-row:2]", "aria-hidden": "true" }),
631
+ a,
632
+ /* @__PURE__ */ o("span", { className: "[grid-row:-1]", "aria-hidden": "true" })
633
+ ]
247
634
  }
248
635
  )
249
- ), K = p("ChoiceCardDescription", ({ className: e, children: o, ...t }, r) => /* @__PURE__ */ a(
250
- "p",
251
- {
252
- ref: r,
253
- className: h("text-xs font-medium leading-4 text-content-secondary", e),
254
- ...t,
255
- children: o
636
+ ), Pe = p(
637
+ "ChoiceCardCompareLabel",
638
+ ({ className: e, children: a, ...t }, r) => /* @__PURE__ */ g(
639
+ "div",
640
+ {
641
+ ref: r,
642
+ "data-slot": "choice-card-compare-label",
643
+ className: l("flex items-center self-center", e),
644
+ ...t,
645
+ children: [
646
+ /* @__PURE__ */ o("span", { className: "rounded-full border border-canvas-accordion bg-accent px-2 py-1 text-sm font-medium leading-[21px] text-accent-foreground capitalize whitespace-nowrap", children: a }),
647
+ /* @__PURE__ */ o(
648
+ "span",
649
+ {
650
+ className: "w-[18px] shrink-0 border-t border-dashed border-canvas-accordion",
651
+ "aria-hidden": "true"
652
+ }
653
+ )
654
+ ]
655
+ }
656
+ )
657
+ ), Ee = p(
658
+ "ChoiceCardCompareLead",
659
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
660
+ "div",
661
+ {
662
+ ref: t,
663
+ "data-slot": "choice-card-compare-lead",
664
+ className: l("[grid-row:2] min-h-4 min-w-0", e),
665
+ ...a
666
+ }
667
+ )
668
+ ), Ge = p(
669
+ "ChoiceCardCompareRow",
670
+ ({ className: e, ...a }, t) => /* @__PURE__ */ o(
671
+ "div",
672
+ {
673
+ ref: t,
674
+ "data-slot": "choice-card-compare-row",
675
+ className: l("flex w-full min-w-0 items-center justify-center self-stretch", e),
676
+ ...a
677
+ }
678
+ )
679
+ ), Me = p(
680
+ "ChoiceCardCompare",
681
+ ({ className: e, children: a, fit: t = "scroll", ...r }, c) => {
682
+ const i = n.Children.toArray(a), m = i.find(
683
+ (s) => n.isValidElement(s) && s.type === te
684
+ ), h = i.filter((s) => s !== m), C = n.isValidElement(m) && m.props ? n.Children.count(
685
+ m.props.children
686
+ ) : 0;
687
+ return /* @__PURE__ */ o(v.Provider, { value: { inCompare: !0, rows: C, fit: t }, children: /* @__PURE__ */ o(
688
+ "div",
689
+ {
690
+ ref: c,
691
+ "data-slot": "choice-card-compare",
692
+ "data-fit": t,
693
+ className: l(
694
+ "w-full min-w-0 overscroll-x-contain pt-5 pb-2",
695
+ t === "auto" ? "overflow-x-auto" : "overflow-x-scroll",
696
+ "[scrollbar-width:thin] [scrollbar-color:var(--color-stroke)_transparent]",
697
+ "[&::-webkit-scrollbar]:h-2 [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb]:bg-stroke",
698
+ e
699
+ ),
700
+ ...r,
701
+ children: /* @__PURE__ */ g(
702
+ "div",
703
+ {
704
+ className: l(
705
+ "grid w-full grid-flow-col items-stretch",
706
+ t === "auto" ? "min-w-0" : "min-w-max"
707
+ ),
708
+ style: {
709
+ gridTemplateColumns: Y(h.length, t),
710
+ gridTemplateRows: `auto auto repeat(${Math.max(C, 1)}, minmax(3.5rem, auto)) auto`
711
+ },
712
+ children: [
713
+ m,
714
+ h.map((s, u) => /* @__PURE__ */ g(n.Fragment, { children: [
715
+ u > 0 && C > 0 ? /* @__PURE__ */ o(ee, { rows: C }) : null,
716
+ s
717
+ ] }, u))
718
+ ]
719
+ }
720
+ )
721
+ }
722
+ ) });
256
723
  }
257
- ));
724
+ );
258
725
  export {
259
- E as ChoiceCard,
260
- A as ChoiceCardContent,
261
- K as ChoiceCardDescription,
262
- V as ChoiceCardGroup,
263
- J as ChoiceCardHeader,
264
- q as ChoiceCardIndicator,
265
- B as ChoiceCardMedia,
266
- F as ChoiceCardTitle,
267
- T as useChoiceCardGroup
726
+ he as ChoiceCard,
727
+ be as ChoiceCardBackground,
728
+ Me as ChoiceCardCompare,
729
+ Pe as ChoiceCardCompareLabel,
730
+ te as ChoiceCardCompareLabels,
731
+ Ee as ChoiceCardCompareLead,
732
+ Ge as ChoiceCardCompareRow,
733
+ we as ChoiceCardContent,
734
+ ye as ChoiceCardDescription,
735
+ K as ChoiceCardFeaturedBackdrop,
736
+ xe as ChoiceCardFooter,
737
+ O as ChoiceCardGroup,
738
+ ke as ChoiceCardHeader,
739
+ ze as ChoiceCardIndex,
740
+ fe as ChoiceCardIndicator,
741
+ ve as ChoiceCardMedia,
742
+ ge as ChoiceCardRibbon,
743
+ Ie as ChoiceCardStat,
744
+ Re as ChoiceCardStats,
745
+ Se as ChoiceCardStatus,
746
+ Ne as ChoiceCardTitle,
747
+ Ce as useChoiceCardGroup,
748
+ pe as useChoiceCardItem
268
749
  };