impact-nova 2.6.2 → 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.
- package/dist/components/data/ag-grid-react/ag-grid-cell-components.d.ts +9 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.d.ts +16 -0
- package/dist/components/data/ag-grid-react/ag-grid-list.js +23 -0
- package/dist/components/data/ag-grid-react/ag-grid.types.d.ts +21 -9
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.d.ts +14 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/list-select-cell-editor.js +70 -0
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.d.ts +10 -5
- package/dist/components/data/ag-grid-react/cell-renderers/editors/select-cell-editor.js +73 -41
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +7 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +42 -36
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.d.ts +19 -0
- package/dist/components/data/ag-grid-react/cell-renderers/list-select-display-renderer.js +89 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.d.ts +28 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-ai-insight-affordance.js +96 -0
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.d.ts +30 -10
- package/dist/components/data/ag-grid-react/cell-renderers/select-display-renderer.js +72 -24
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +42 -0
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +86 -0
- package/dist/components/data/ag-grid-react/headers/components/date-filter-picker.d.ts +2 -12
- package/dist/components/data/ag-grid-react/headers/header-search-input.js +200 -207
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +263 -244
- package/dist/components/data/data-table/data-table.js +85 -82
- package/dist/components/data/data-table/data-table.types.d.ts +5 -0
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +2 -3
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +2 -3
- package/dist/components/data/expandable-list-item/sku-next-page-coordinator.d.ts +14 -0
- package/dist/components/data/expandable-list-item/sku-strip-lookahead.d.ts +26 -0
- package/dist/components/data/expandable-list-item/useServerSkuInfinitePages.d.ts +10 -0
- package/dist/components/data/expandable-list-item/useSkuStripVirtualizer.d.ts +30 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.catalog.d.ts +81 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.item-grid.d.ts +1 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.product-card.d.ts +7 -0
- package/dist/components/data/expandable-list-item/virtualized-responsive-grid.sku-picker.d.ts +2 -0
- package/dist/components/data-display/chart/chart-heatmap-demos.d.ts +3 -0
- package/dist/components/data-display/chart/chart-heatmap-play.d.ts +9 -0
- package/dist/components/data-display/chart/chart.category-cluster-heatmap.stories-data.d.ts +22 -0
- package/dist/components/data-display/chart/chart.diverging-heatmap.stories-data.d.ts +43 -0
- package/dist/components/data-display/chart/chart.js +100 -93
- package/dist/components/data-display/chart/chart.types.d.ts +10 -0
- package/dist/components/data-display/chart/chart.utils.d.ts +14 -2
- package/dist/components/data-display/chart/chart.utils.js +132 -35
- package/dist/components/data-display/chart/index.js +15 -13
- package/dist/components/data-display/chart/resolve-highcharts-options.js +19 -14
- package/dist/components/data-display/globe-map/globe-map.d.ts +8 -0
- package/dist/components/data-display/globe-map/globe-map.js +161 -0
- package/dist/components/data-display/globe-map/globe-map.stories-data.d.ts +12 -0
- package/dist/components/data-display/globe-map/globe-map.types.d.ts +83 -0
- package/dist/components/data-display/globe-map/globe-map.utils.d.ts +115 -0
- package/dist/components/data-display/globe-map/globe-map.utils.js +259 -0
- package/dist/components/data-display/globe-map/globe-map.variants.d.ts +19 -0
- package/dist/components/data-display/globe-map/globe-map.variants.js +80 -0
- package/dist/components/data-display/globe-map/index.d.ts +2 -0
- package/dist/components/data-display/globe-map/index.js +10 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.d.ts +4 -0
- package/dist/components/data-display/globe-map/internals/globe-countries-110m.json.js +7 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.d.ts +25 -0
- package/dist/components/data-display/globe-map/internals/globe-map-context.js +19 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-legend.js +51 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.d.ts +6 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card-carousel.js +119 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-point-card.js +106 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.d.ts +17 -0
- package/dist/components/data-display/globe-map/internals/globe-map-scene.js +218 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.d.ts +2 -0
- package/dist/components/data-display/globe-map/internals/globe-map-tooltip.js +33 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.d.ts +45 -0
- package/dist/components/data-display/globe-map/internals/use-globe-map-scene.js +270 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.js +94 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.stories-data.d.ts +7 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.types.d.ts +43 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.d.ts +11 -0
- package/dist/components/data-display/hex-tilemap/hex-tilemap.variants.js +47 -0
- package/dist/components/data-display/hex-tilemap/index.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/index.js +12 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.d.ts +40 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-camera.js +103 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.d.ts +9 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-country-lattices.js +1387 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.d.ts +21 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-geometry.js +82 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.d.ts +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-lattice.js +47 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.d.ts +10 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-layout.js +35 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.d.ts +31 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-new-zealand-grid.js +138 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.d.ts +6 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-regions.js +18 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.d.ts +24 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-context.js +19 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-legend.js +51 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.d.ts +2 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-tooltip.js +36 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.d.ts +3 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-viewport.js +147 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.d.ts +13 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-tilemap-zoom.js +99 -0
- package/dist/components/data-display/hex-tilemap/internals/hex-world-grid.d.ts +8 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.d.ts +27 -0
- package/dist/components/data-display/hex-tilemap/internals/use-hex-camera.js +137 -0
- package/dist/components/data-display/notch-card/index.d.ts +2 -0
- package/dist/components/data-display/notch-card/index.js +6 -0
- package/dist/components/data-display/notch-card/notch-card.d.ts +7 -0
- package/dist/components/data-display/notch-card/notch-card.js +151 -0
- package/dist/components/data-display/notch-card/notch-card.path.d.ts +19 -0
- package/dist/components/data-display/notch-card/notch-card.path.js +118 -0
- package/dist/components/data-display/notch-card/notch-card.types.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.d.ts +15 -0
- package/dist/components/data-display/notch-card/notch-card.variants.js +86 -0
- package/dist/components/feedback/hover-card/hover-card.d.ts +3 -1
- package/dist/components/feedback/hover-card/hover-card.js +28 -24
- package/dist/components/feedback/tooltip/overflow-tooltip.d.ts +1 -1
- package/dist/components/feedback/tooltip/overflow-tooltip.js +63 -57
- package/dist/components/feedback/tooltip/overflow-tooltip.types.d.ts +4 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +2 -3
- package/dist/components/flows/command-palette/shortcut-settings.js +10 -10
- package/dist/components/flows/filter-panel/filter-panel.js +4 -4
- package/dist/components/flows/filter-strip/index.d.ts +1 -0
- package/dist/components/flows/filter-strip/index.js +4 -2
- package/dist/components/flows/guidance/renderers/guidance-tour-overlay.js +48 -46
- package/dist/components/flows/iris-chat/index.d.ts +10 -0
- package/dist/components/flows/iris-chat/index.js +55 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.d.ts +4 -0
- package/dist/components/flows/iris-chat/iris-chat-artifact.js +125 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-composer.js +297 -0
- package/dist/components/flows/iris-chat/iris-chat-context.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat-context.js +23 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.d.ts +18 -0
- package/dist/components/flows/iris-chat/iris-chat-icons.js +176 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-markdown.js +62 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.d.ts +15 -0
- package/dist/components/flows/iris-chat/iris-chat-menu.js +259 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.d.ts +3 -0
- package/dist/components/flows/iris-chat/iris-chat-prompt.js +46 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.d.ts +12 -0
- package/dist/components/flows/iris-chat/iris-chat-thinking.js +202 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.d.ts +37 -0
- package/dist/components/flows/iris-chat/iris-chat-thread.js +493 -0
- package/dist/components/flows/iris-chat/iris-chat.d.ts +43 -0
- package/dist/components/flows/iris-chat/iris-chat.js +336 -0
- package/dist/components/flows/iris-chat/iris-chat.types.d.ts +208 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.d.ts +14 -0
- package/dist/components/flows/iris-chat/iris-chat.variants.js +78 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.d.ts +4 -0
- package/dist/components/flows/iris-chat/read-iris-greeting-period.js +16 -0
- package/dist/components/flows/wizard/index.d.ts +2 -2
- package/dist/components/flows/wizard/index.js +17 -13
- package/dist/components/flows/wizard/wizard-context.d.ts +6 -1
- package/dist/components/flows/wizard/wizard-context.js +15 -7
- package/dist/components/flows/wizard/wizard.d.ts +22 -4
- package/dist/components/flows/wizard/wizard.js +278 -174
- package/dist/components/flows/wizard/wizard.types.d.ts +40 -0
- package/dist/components/forms/choice-card/assets/featured-backdrop-baked.webp.js +4 -0
- package/dist/components/forms/choice-card/assets/featured-noise.webp.js +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-arcs.js +42 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-featured-backdrop.js +45 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.d.ts +8 -0
- package/dist/components/forms/choice-card/choice-card-indicator.variants.js +5 -0
- package/dist/components/forms/choice-card/choice-card-percent.d.ts +11 -0
- package/dist/components/forms/choice-card/choice-card-percent.js +80 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +40 -3
- package/dist/components/forms/choice-card/choice-card.js +651 -170
- package/dist/components/forms/choice-card/choice-card.types.d.ts +40 -0
- package/dist/components/forms/choice-card/choice-card.variants.d.ts +7 -0
- package/dist/components/forms/choice-card/choice-card.variants.js +100 -0
- package/dist/components/forms/choice-card/index.d.ts +2 -1
- package/dist/components/forms/choice-card/index.js +27 -10
- package/dist/components/forms/select/components/SelectTriggerValue.js +2 -3
- package/dist/components/forms/select/components/Submenu.js +2 -3
- package/dist/components/layout/header/header.d.ts +3 -2
- package/dist/components/layout/header/header.js +67 -47
- package/dist/components/layout/header/header.types.d.ts +1 -0
- package/dist/components/primitives/iris/iris-agent-cursor.d.ts +3 -0
- package/dist/components/primitives/iris/iris-agent-cursor.js +89 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.d.ts +5 -0
- package/dist/components/primitives/iris/iris-alan-gradient-icon.js +69 -0
- package/dist/components/primitives/iris/iris-control-context.d.ts +15 -0
- package/dist/components/primitives/iris/iris-control-context.js +44 -0
- package/dist/components/primitives/iris/iris-control-region.d.ts +10 -0
- package/dist/components/primitives/iris/iris-control-region.js +102 -0
- package/dist/components/primitives/iris/iris-control.types.d.ts +24 -0
- package/dist/components/primitives/iris/iris-control.variants.d.ts +4 -0
- package/dist/components/primitives/iris/iris-control.variants.js +20 -0
- package/dist/components/primitives/iris/iris.d.ts +24 -0
- package/dist/components/primitives/iris/iris.js +232 -0
- package/dist/components/primitives/iris/iris.types.d.ts +35 -0
- package/dist/components/primitives/iris/iris.variants.d.ts +30 -0
- package/dist/components/primitives/iris/iris.variants.js +120 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.d.ts +6 -0
- package/dist/components/primitives/stepper/internals/pipeline-current-mark.js +35 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.d.ts +13 -0
- package/dist/components/primitives/stepper/internals/rail-status-dot.js +70 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.d.ts +15 -0
- package/dist/components/primitives/stepper/internals/step-hit-target.js +51 -0
- package/dist/components/primitives/stepper/internals/step-model.d.ts +3 -0
- package/dist/components/primitives/stepper/internals/step-model.js +10 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-compact.js +68 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.d.ts +7 -0
- package/dist/components/primitives/stepper/internals/stepper-pipeline.js +87 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-rail.js +105 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.d.ts +5 -0
- package/dist/components/primitives/stepper/internals/stepper-summary.js +103 -0
- package/dist/components/primitives/stepper/internals/stepper-track.d.ts +8 -0
- package/dist/components/primitives/stepper/internals/stepper-track.js +170 -0
- package/dist/components/primitives/stepper/stepper.d.ts +1 -0
- package/dist/components/primitives/stepper/stepper.js +134 -52
- package/dist/components/primitives/stepper/stepper.types.d.ts +17 -0
- package/dist/components/primitives/stepper/stepper.variants.d.ts +26 -0
- package/dist/components/primitives/stepper/stepper.variants.js +165 -5
- package/dist/components/primitives/tabs/tabs.d.ts +4 -1
- package/dist/components/primitives/tabs/tabs.js +131 -59
- package/dist/components/primitives/tabs/tabs.types.d.ts +5 -1
- package/dist/form-react/Fields/DateRangeField.js +20 -19
- package/dist/form-react/Fields/WeekRangePicker.js +36 -36
- package/dist/i18n/defaultMessages.d.ts +100 -0
- package/dist/i18n/defaultMessages.js +118 -21
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +99 -2
- package/dist/i18n/locales/es.js +99 -2
- package/dist/i18n/locales/hi.js +99 -2
- package/dist/i18n/locales/kn.js +99 -2
- package/dist/impact-nova-components.css +972 -2
- package/dist/impact-nova-tokens.scss +109 -1
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +585 -551
- package/dist/lib/virtualized/directional-range-extractor.d.ts +26 -0
- package/dist/lib/virtualized/directional-range-extractor.js +39 -0
- package/dist/lib/virtualized/index.d.ts +3 -0
- package/dist/lib/virtualized/index.js +35 -27
- package/dist/lib/virtualized/scroll-seek.d.ts +61 -0
- package/dist/lib/virtualized/scroll-seek.js +61 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.d.ts +19 -0
- package/dist/lib/virtualized/usePaintedRangeVirtualizer.js +30 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.d.ts +35 -0
- package/dist/lib/virtualized/useResponsiveColumnCount.js +51 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.d.ts +13 -0
- package/dist/lib/virtualized/useScrollSeekPaintedRange.js +45 -0
- package/dist/lib/virtualized/useVirtualizedList.d.ts +7 -0
- package/dist/lib/virtualized/useVirtualizedList.js +89 -87
- package/dist/lib/virtualized/useVirtualizedRows.d.ts +9 -2
- package/dist/lib/virtualized/useVirtualizedRows.js +15 -13
- package/dist/lib/virtualized/virtualized.types.d.ts +2 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/dist/tailwind.config.js +3 -1
- package/dist/theme/tailwind-colors.js +2 -1
- package/package.json +39 -4
|
@@ -1,268 +1,749 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import
|
|
5
|
-
import {
|
|
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 {
|
|
8
|
-
|
|
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
|
-
|
|
12
|
-
|
|
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
|
|
18
|
-
const { value: e, type:
|
|
19
|
-
return
|
|
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:
|
|
39
|
+
type: a,
|
|
23
40
|
setValue: t,
|
|
24
41
|
isSelected: r
|
|
25
42
|
}),
|
|
26
|
-
[e,
|
|
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
|
|
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:
|
|
70
|
+
defaultValue: a = "",
|
|
40
71
|
onValueChange: t,
|
|
41
72
|
disabled: r,
|
|
42
|
-
orientation:
|
|
43
|
-
wrap:
|
|
44
|
-
className:
|
|
45
|
-
children:
|
|
73
|
+
orientation: c = "horizontal",
|
|
74
|
+
wrap: i = !1,
|
|
75
|
+
className: m,
|
|
76
|
+
children: h
|
|
46
77
|
}) => {
|
|
47
|
-
const [
|
|
78
|
+
const [C, s] = M({
|
|
48
79
|
prop: e,
|
|
49
|
-
defaultProp:
|
|
80
|
+
defaultProp: a,
|
|
50
81
|
onChange: t
|
|
51
|
-
}),
|
|
52
|
-
(
|
|
53
|
-
[
|
|
54
|
-
), f =
|
|
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:
|
|
59
|
-
setValue: (
|
|
60
|
-
isSelected:
|
|
61
|
-
toggle: (
|
|
89
|
+
value: C,
|
|
90
|
+
setValue: (d) => s(d),
|
|
91
|
+
isSelected: u,
|
|
92
|
+
toggle: (d) => s(d)
|
|
62
93
|
}),
|
|
63
|
-
[r,
|
|
94
|
+
[r, C, s, u]
|
|
64
95
|
);
|
|
65
|
-
return /* @__PURE__ */
|
|
66
|
-
|
|
96
|
+
return /* @__PURE__ */ o(y.Provider, { value: f, children: /* @__PURE__ */ o(
|
|
97
|
+
G.Root,
|
|
67
98
|
{
|
|
68
|
-
value:
|
|
69
|
-
onValueChange:
|
|
99
|
+
value: C,
|
|
100
|
+
onValueChange: s,
|
|
70
101
|
disabled: r,
|
|
71
|
-
className:
|
|
102
|
+
className: m,
|
|
72
103
|
"data-component": "choice-card-group",
|
|
73
104
|
"data-type": "single",
|
|
74
|
-
"data-layout":
|
|
75
|
-
children:
|
|
105
|
+
"data-layout": i ? "wrap" : c === "vertical" ? "column" : "row",
|
|
106
|
+
children: h
|
|
76
107
|
}
|
|
77
108
|
) });
|
|
78
|
-
},
|
|
109
|
+
}, J = ({
|
|
79
110
|
value: e,
|
|
80
|
-
defaultValue:
|
|
111
|
+
defaultValue: a = [],
|
|
81
112
|
onValueChange: t,
|
|
82
113
|
disabled: r,
|
|
83
|
-
orientation:
|
|
84
|
-
wrap:
|
|
85
|
-
className:
|
|
86
|
-
children:
|
|
114
|
+
orientation: c = "horizontal",
|
|
115
|
+
wrap: i = !1,
|
|
116
|
+
className: m,
|
|
117
|
+
children: h
|
|
87
118
|
}) => {
|
|
88
|
-
const [
|
|
119
|
+
const [C, s] = M({
|
|
89
120
|
prop: e,
|
|
90
|
-
defaultProp:
|
|
121
|
+
defaultProp: a,
|
|
91
122
|
onChange: t
|
|
92
|
-
}),
|
|
93
|
-
(b) =>
|
|
94
|
-
[
|
|
95
|
-
),
|
|
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 (
|
|
98
|
-
|
|
128
|
+
if (u.includes(b)) {
|
|
129
|
+
s(u.filter((N) => N !== b));
|
|
99
130
|
return;
|
|
100
131
|
}
|
|
101
|
-
|
|
132
|
+
s([...u, b]);
|
|
102
133
|
},
|
|
103
|
-
[
|
|
104
|
-
),
|
|
134
|
+
[u, s]
|
|
135
|
+
), k = n.useMemo(
|
|
105
136
|
() => ({
|
|
106
137
|
type: "multiple",
|
|
107
138
|
disabled: r,
|
|
108
|
-
value:
|
|
109
|
-
setValue: (b) =>
|
|
139
|
+
value: u,
|
|
140
|
+
setValue: (b) => s(b),
|
|
110
141
|
isSelected: f,
|
|
111
|
-
toggle:
|
|
142
|
+
toggle: d
|
|
112
143
|
}),
|
|
113
|
-
[r,
|
|
144
|
+
[r, u, s, f, d]
|
|
114
145
|
);
|
|
115
|
-
return /* @__PURE__ */
|
|
146
|
+
return /* @__PURE__ */ o(y.Provider, { value: k, children: /* @__PURE__ */ o(
|
|
116
147
|
"div",
|
|
117
148
|
{
|
|
118
149
|
role: "group",
|
|
119
|
-
className:
|
|
150
|
+
className: m,
|
|
120
151
|
"data-component": "choice-card-group",
|
|
121
152
|
"data-type": "multiple",
|
|
122
|
-
"data-layout":
|
|
123
|
-
children:
|
|
153
|
+
"data-layout": i ? "wrap" : c === "vertical" ? "column" : "row",
|
|
154
|
+
children: h
|
|
124
155
|
}
|
|
125
156
|
) });
|
|
126
|
-
},
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
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
|
-
)
|
|
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
|
-
({
|
|
141
|
-
|
|
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
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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
|
-
[
|
|
148
|
-
)
|
|
149
|
-
|
|
150
|
-
|
|
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
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
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
|
-
)
|
|
160
|
-
|
|
258
|
+
) : /* @__PURE__ */ o(
|
|
259
|
+
L.Root,
|
|
161
260
|
{
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
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
|
-
),
|
|
295
|
+
), fe = p(
|
|
176
296
|
"ChoiceCardIndicator",
|
|
177
|
-
({ className: e },
|
|
178
|
-
const { selected: t, type: r } =
|
|
179
|
-
return r === "multiple" ? /* @__PURE__ */
|
|
180
|
-
"
|
|
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:
|
|
183
|
-
className:
|
|
184
|
-
|
|
185
|
-
t
|
|
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
|
|
312
|
+
children: t ? /* @__PURE__ */ o(V, { className: "h-3.5 w-3.5" }) : null
|
|
190
313
|
}
|
|
191
|
-
) : /* @__PURE__ */
|
|
192
|
-
"
|
|
314
|
+
) : /* @__PURE__ */ o(
|
|
315
|
+
"span",
|
|
193
316
|
{
|
|
194
|
-
ref:
|
|
195
|
-
className:
|
|
196
|
-
|
|
197
|
-
t
|
|
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
|
|
326
|
+
children: t ? /* @__PURE__ */ o("span", { className: "absolute inset-[3px] rounded-full bg-current" }) : null
|
|
202
327
|
}
|
|
203
328
|
);
|
|
204
329
|
}
|
|
205
|
-
),
|
|
206
|
-
"
|
|
207
|
-
({ className: e, children:
|
|
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:
|
|
212
|
-
"data-slot": "choice-card-
|
|
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:
|
|
340
|
+
children: a
|
|
215
341
|
}
|
|
216
342
|
)
|
|
217
|
-
)
|
|
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:
|
|
442
|
+
className: l("flex shrink-0 items-center justify-center", e),
|
|
222
443
|
"data-slot": "choice-card-media",
|
|
223
444
|
...t,
|
|
224
|
-
children:
|
|
445
|
+
children: a
|
|
225
446
|
}
|
|
226
|
-
)),
|
|
227
|
-
|
|
228
|
-
{
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
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:
|
|
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
|
-
|
|
244
|
-
|
|
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:
|
|
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
|
-
),
|
|
250
|
-
"
|
|
251
|
-
{
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
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
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
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
|
};
|