impact-nova 3.0.0-alpha.17 → 3.0.0-alpha.18
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.types.d.ts +9 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.d.ts +2 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-cell-renderer.js +15 -14
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.d.ts +10 -0
- package/dist/components/data/ag-grid-react/cell-renderers/badge-icon-registry.js +17 -0
- package/dist/components/data/ag-grid-react/cell-renderers/index.d.ts +45 -7
- package/dist/components/data/ag-grid-react/cell-renderers/index.js +70 -58
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.d.ts +5 -11
- package/dist/components/data/ag-grid-react/cell-renderers/style-description-display-renderer.js +127 -51
- package/dist/components/data/ag-grid-react/index.d.ts +1 -1
- package/dist/components/data/ag-grid-react/index.js +150 -147
- package/dist/components/data/ag-grid-react/list-drag-grid-options.d.ts +14 -1
- package/dist/components/data/ag-grid-react/list-drag-grid-options.js +95 -31
- package/dist/components/data/ag-grid-react/list-drag-preview-card.d.ts +4 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-card.js +14 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.d.ts +20 -0
- package/dist/components/data/ag-grid-react/list-drag-preview-snapshot.js +42 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.d.ts +6 -0
- package/dist/components/data/ag-grid-react/list-find-highlight.js +7 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.d.ts +4 -0
- package/dist/components/data/ag-grid-react/process-backend-columndefs.js +78 -0
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.d.ts +10 -2
- package/dist/components/data/ag-grid-react/use-ag-grid-list-drag.js +130 -107
- package/dist/components/data/ag-grid-react/use-list-drag-preview.d.ts +4 -1
- package/dist/components/data/ag-grid-react/use-list-drag-preview.js +131 -32
- package/dist/components/data/ag-grid-react/use-list-find.d.ts +36 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.d.ts +2 -0
- package/dist/components/data/ag-grid-react/use-list-row-drop-zones.js +60 -41
- package/dist/components/data/data-table/data-table-list-header.js +1 -1
- package/dist/components/data/data-table/data-table-overlay.d.ts +6 -0
- package/dist/components/data/data-table/data-table-overlay.js +18 -0
- package/dist/components/data/data-table/data-table.types.d.ts +1 -0
- package/dist/components/data/data-table/index.d.ts +3 -0
- package/dist/components/data/data-table/index.js +67 -63
- package/dist/components/data/expandable-list-item/expandable-list-item-attributes.js +3 -2
- package/dist/components/data/expandable-list-item/expandable-list-item-metrics.js +3 -2
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.d.ts +2 -0
- package/dist/components/data/scenario-comparison/flatten-scenario-comparison-rows.js +16 -0
- package/dist/components/data/scenario-comparison/index.d.ts +3 -0
- package/dist/components/data/scenario-comparison/index.js +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.d.ts +12 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-column.js +172 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.d.ts +6 -0
- package/dist/components/data/scenario-comparison/scenario-comparison-label.js +64 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.d.ts +5 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.js +127 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.types.d.ts +56 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.d.ts +7 -0
- package/dist/components/data/scenario-comparison/scenario-comparison.variants.js +29 -0
- package/dist/components/data-display/badge/index.d.ts +2 -0
- package/dist/components/data-display/badge/index.js +4 -2
- package/dist/components/data-display/badge/trophy-icon.d.ts +6 -0
- package/dist/components/data-display/badge/trophy-icon.js +28 -0
- package/dist/components/feedback/find-bar/collect-find-matches.d.ts +35 -0
- package/dist/components/feedback/find-bar/collect-find-matches.js +68 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.d.ts +5 -0
- package/dist/components/feedback/find-bar/find-bar-shortcuts.js +27 -0
- package/dist/components/feedback/find-bar/find-bar.d.ts +7 -0
- package/dist/components/feedback/find-bar/find-bar.js +266 -0
- package/dist/components/feedback/find-bar/find-bar.types.d.ts +32 -0
- package/dist/components/feedback/find-bar/index.d.ts +4 -0
- package/dist/components/feedback/find-bar/index.js +11 -0
- package/dist/components/feedback/tooltip/tab-tooltip-render.js +3 -2
- 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/forms/choice-card/choice-card-compare-scroll.d.ts +4 -0
- package/dist/components/forms/choice-card/choice-card-compare-scroll.js +6 -0
- package/dist/components/forms/choice-card/choice-card.d.ts +13 -2
- package/dist/components/forms/choice-card/choice-card.js +432 -342
- package/dist/components/forms/choice-card/choice-card.types.d.ts +9 -2
- package/dist/components/forms/select/components/SelectTriggerValue.js +3 -2
- package/dist/components/forms/select/components/Submenu.js +3 -2
- package/dist/components/primitives/tabs/folder-tab-path.d.ts +6 -0
- package/dist/components/primitives/tabs/folder-tab-path.js +16 -0
- package/dist/components/primitives/tabs/tabs.js +164 -111
- package/dist/components/primitives/tabs/tabs.types.d.ts +1 -1
- package/dist/i18n/defaultMessages.d.ts +17 -0
- package/dist/i18n/defaultMessages.js +52 -38
- package/dist/i18n/impact-nova-i18n-defaults.d.ts +5 -0
- package/dist/i18n/impact-nova-i18n-defaults.js +4 -9
- package/dist/i18n/index.d.ts +1 -1
- package/dist/i18n/locales/de.js +15 -1
- package/dist/i18n/locales/es.js +15 -1
- package/dist/i18n/locales/hi.js +15 -1
- package/dist/i18n/locales/kn.js +15 -1
- package/dist/impact-nova-components.css +189 -14
- package/dist/impact-nova-tokens.scss +2 -0
- package/dist/impact-nova.css +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +621 -607
- package/dist/lib/virtualized/index.d.ts +2 -0
- package/dist/lib/virtualized/index.js +35 -31
- package/dist/lib/virtualized/list-index.d.ts +5 -0
- package/dist/lib/virtualized/list-index.js +13 -0
- package/dist/lib/virtualized/read-infinite-query-list.d.ts +14 -0
- package/dist/lib/virtualized/read-infinite-query-list.js +12 -0
- package/dist/lib/virtualized/types.d.ts +4 -2
- package/dist/lib/virtualized/useRowState.js +60 -56
- package/dist/lib/virtualized/useVirtualizedList.d.ts +5 -0
- package/dist/llms/rules/installation.js +1 -1
- package/dist/llms/rules/requirements.js +1 -1
- package/package.json +1 -1
|
@@ -59,10 +59,17 @@ export type ChoiceCardPercentProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
|
59
59
|
decreaseLabel?: string;
|
|
60
60
|
disabled?: boolean;
|
|
61
61
|
};
|
|
62
|
-
export type ChoiceCardCompareFit = "scroll" | "auto";
|
|
62
|
+
export type ChoiceCardCompareFit = "scroll" | "auto" | "fill";
|
|
63
63
|
export type ChoiceCardCompareProps = React.HTMLAttributes<HTMLDivElement> & {
|
|
64
|
-
/** `scroll` keeps Figma 411px tiles. `auto` caps tiles at 420px and shrinks them to the row. */
|
|
64
|
+
/** `scroll` keeps Figma 411px tiles. `auto` caps tiles at 420px and shrinks them to the row. `fill` shares leftover width. */
|
|
65
65
|
fit?: ChoiceCardCompareFit;
|
|
66
|
+
/** Min height of each metric row. Default `3.5rem`. With `scrollRows`, this is the height of each line inside the shared scroller. */
|
|
67
|
+
rowMinHeight?: string;
|
|
68
|
+
/**
|
|
69
|
+
* One shared row scroller across the label column, gutters, and cards.
|
|
70
|
+
* Card title and footer stay put. Default off, so short compare rows keep one grid track each.
|
|
71
|
+
*/
|
|
72
|
+
scrollRows?: boolean;
|
|
66
73
|
};
|
|
67
74
|
export type ChoiceCardCompareLabelsProps = React.HTMLAttributes<HTMLDivElement>;
|
|
68
75
|
export type ChoiceCardCompareLabelProps = React.HTMLAttributes<HTMLDivElement>;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { jsx as r } from "react/jsx-runtime";
|
|
2
2
|
import { cn as x } from "../../../../lib/utils.js";
|
|
3
|
+
import "react";
|
|
3
4
|
import { OverflowTooltip as m } from "../../../feedback/tooltip/overflow-tooltip.js";
|
|
4
5
|
import { isInvertedSelection as h, isOptionArray as d } from "../utils/select.js";
|
|
5
|
-
function
|
|
6
|
+
function C({
|
|
6
7
|
isMulti: u,
|
|
7
8
|
isDisabled: p,
|
|
8
9
|
internalValue: o,
|
|
@@ -52,5 +53,5 @@ function w({
|
|
|
52
53
|
);
|
|
53
54
|
}
|
|
54
55
|
export {
|
|
55
|
-
|
|
56
|
+
C as SelectTriggerValue
|
|
56
57
|
};
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { jsxs as s, jsx as t } from "react/jsx-runtime";
|
|
2
2
|
import * as i from "@radix-ui/react-popover";
|
|
3
3
|
import { Checkbox as P } from "../../checkbox/checkbox.js";
|
|
4
|
+
import "react";
|
|
4
5
|
import { OverflowTooltip as y } from "../../../feedback/tooltip/overflow-tooltip.js";
|
|
5
6
|
import { ChevronRight as A, Checkmark as O } from "impact-nova-icons";
|
|
6
7
|
import { cn as v } from "../../../../lib/utils.js";
|
|
7
8
|
import { useOverlayPortalContainer as T } from "../../../../lib/overlay/overlay-portal-context.js";
|
|
8
9
|
import { OVERLAY_NESTED_FLOATING_INSTANT_HIDE_CLASS as _ } from "../../../../lib/overlay/overlay-host.constants.js";
|
|
9
10
|
import { useSuppressOptionClickForTextSelection as E } from "../hooks/useSuppressOptionClickForTextSelection.js";
|
|
10
|
-
const
|
|
11
|
+
const R = ({
|
|
11
12
|
parentOption: n,
|
|
12
13
|
isMulti: u,
|
|
13
14
|
isReadOnly: l,
|
|
@@ -105,5 +106,5 @@ const G = ({
|
|
|
105
106
|
] });
|
|
106
107
|
};
|
|
107
108
|
export {
|
|
108
|
-
|
|
109
|
+
R as Submenu
|
|
109
110
|
};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare function folderTabPaths(width: number, bothSides: boolean): {
|
|
2
|
+
fill: string;
|
|
3
|
+
border: string;
|
|
4
|
+
};
|
|
5
|
+
/** One clip path, same idea as pinned KPI cards: the corner curve is part of the shape. */
|
|
6
|
+
export declare function folderTabClipPath(width: number, bothSides: boolean): string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
function F(A, E) {
|
|
2
|
+
const R = A - 16, t = `C${R} ${55 - 7.16344} ${R + 7.16344} 55 ${A} 55`, D = `H${R - 16} Q${R} 0 ${R} 16 V39 ${t}`;
|
|
3
|
+
if (!E)
|
|
4
|
+
return {
|
|
5
|
+
fill: `M16 0 ${D} H0 V16 Q0 0 16 0 Z`,
|
|
6
|
+
border: `M0 55 V16 Q0 0 16 0 ${D}`
|
|
7
|
+
};
|
|
8
|
+
const _ = 16, $ = `C${8.83656} 55 ${_} ${55 - 7.16344} ${_} 39`;
|
|
9
|
+
return {
|
|
10
|
+
fill: `M${_ + 16} 0 ${D} H0 ${$} V16 Q${_} 0 ${_ + 16} 0 Z`,
|
|
11
|
+
border: `M0 55 ${$} V16 Q${_} 0 ${_ + 16} 0 ${D}`
|
|
12
|
+
};
|
|
13
|
+
}
|
|
14
|
+
export {
|
|
15
|
+
F as folderTabPaths
|
|
16
|
+
};
|
|
@@ -1,44 +1,45 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import * as
|
|
3
|
-
import * as
|
|
4
|
-
import { useControllableState as
|
|
5
|
-
import { createComponent as
|
|
6
|
-
import { cn as
|
|
7
|
-
|
|
1
|
+
import { jsx as e, jsxs as h, Fragment as z } from "react/jsx-runtime";
|
|
2
|
+
import * as i from "react";
|
|
3
|
+
import * as v from "@radix-ui/react-tabs";
|
|
4
|
+
import { useControllableState as H } from "@radix-ui/react-use-controllable-state";
|
|
5
|
+
import { createComponent as O } from "../../../lib/primitives/create-component.js";
|
|
6
|
+
import { cn as l } from "../../../lib/utils.js";
|
|
7
|
+
import { folderTabPaths as Z } from "./folder-tab-path.js";
|
|
8
|
+
const w = i.createContext({
|
|
8
9
|
variant: "line",
|
|
9
10
|
size: "default"
|
|
10
|
-
}),
|
|
11
|
-
const
|
|
12
|
-
return
|
|
13
|
-
},
|
|
14
|
-
function
|
|
15
|
-
fillVar:
|
|
16
|
-
className:
|
|
11
|
+
}), q = (o, s) => {
|
|
12
|
+
const a = o.split(/\s+/);
|
|
13
|
+
return a.length <= s ? o : a.slice(0, s).join(" ") + "...";
|
|
14
|
+
}, D = "M5.98893 0.639668C6.62899 -0.213253 7.90856 -0.213192 8.5485 0.639668L14.2155 8.19533C15.0056 9.25033 14.2517 10.7546 12.9342 10.7549H1.60221C0.283983 10.7546 -0.467977 9.25001 0.322916 8.19533L5.98893 0.639668Z";
|
|
15
|
+
function W({
|
|
16
|
+
fillVar: o,
|
|
17
|
+
className: s
|
|
17
18
|
}) {
|
|
18
|
-
return /* @__PURE__ */
|
|
19
|
+
return /* @__PURE__ */ e(
|
|
19
20
|
"svg",
|
|
20
21
|
{
|
|
21
22
|
"aria-hidden": !0,
|
|
22
23
|
viewBox: "0 0 14.5376 10.7549",
|
|
23
|
-
className:
|
|
24
|
+
className: l(
|
|
24
25
|
"pointer-events-none absolute start-6 bottom-0 z-[1] h-[10.75px] w-[14.54px] translate-y-[calc(100%-0.5px)]",
|
|
25
|
-
|
|
26
|
+
s
|
|
26
27
|
),
|
|
27
|
-
children: /* @__PURE__ */
|
|
28
|
+
children: /* @__PURE__ */ e("g", { transform: "translate(0 10.7549) scale(1 -1)", children: /* @__PURE__ */ e("path", { d: D, fill: o, shapeRendering: "geometricPrecision" }) })
|
|
28
29
|
}
|
|
29
30
|
);
|
|
30
31
|
}
|
|
31
|
-
function
|
|
32
|
-
return /* @__PURE__ */
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
|
|
32
|
+
function G() {
|
|
33
|
+
return /* @__PURE__ */ h(z, { children: [
|
|
34
|
+
/* @__PURE__ */ e(
|
|
35
|
+
W,
|
|
35
36
|
{
|
|
36
37
|
fillVar: "var(--tab-hover-border, var(--color-tab-soft-accent-muted))",
|
|
37
38
|
className: "hidden group-hover:block group-data-[state=active]:hidden"
|
|
38
39
|
}
|
|
39
40
|
),
|
|
40
|
-
/* @__PURE__ */
|
|
41
|
-
|
|
41
|
+
/* @__PURE__ */ e(
|
|
42
|
+
W,
|
|
42
43
|
{
|
|
43
44
|
fillVar: "var(--tab-border, var(--color-tab-soft-accent))",
|
|
44
45
|
className: "hidden group-data-[state=active]:block"
|
|
@@ -46,95 +47,113 @@ function M() {
|
|
|
46
47
|
)
|
|
47
48
|
] });
|
|
48
49
|
}
|
|
49
|
-
const
|
|
50
|
-
const [
|
|
50
|
+
const J = i.forwardRef(({ variant: o = "line", size: s = "default", hideInactiveLabel: a = !1, tooltipClassName: r, maxWords: n, renderTabTooltip: f, value: p, defaultValue: u, onValueChange: t, ...k }, N) => {
|
|
51
|
+
const [b, T] = H({
|
|
51
52
|
prop: p,
|
|
52
|
-
defaultProp:
|
|
53
|
-
onChange: (
|
|
54
|
-
|
|
53
|
+
defaultProp: u,
|
|
54
|
+
onChange: (x) => {
|
|
55
|
+
x !== void 0 && t?.(x);
|
|
55
56
|
}
|
|
56
|
-
}),
|
|
57
|
-
() => ({ variant:
|
|
58
|
-
[
|
|
57
|
+
}), C = i.useMemo(
|
|
58
|
+
() => ({ variant: o, size: s, activeValue: b, hideInactiveLabel: a, tooltipClassName: r, maxWords: n, renderTabTooltip: f }),
|
|
59
|
+
[o, s, b, a, r, n, f]
|
|
59
60
|
);
|
|
60
|
-
return /* @__PURE__ */
|
|
61
|
-
|
|
61
|
+
return /* @__PURE__ */ e(w.Provider, { value: C, children: /* @__PURE__ */ e(
|
|
62
|
+
v.Root,
|
|
62
63
|
{
|
|
63
|
-
ref:
|
|
64
|
-
value:
|
|
65
|
-
onValueChange:
|
|
64
|
+
ref: N,
|
|
65
|
+
value: b,
|
|
66
|
+
onValueChange: T,
|
|
66
67
|
"data-component": "tabs",
|
|
67
|
-
"data-variant":
|
|
68
|
-
...
|
|
68
|
+
"data-variant": o,
|
|
69
|
+
...k
|
|
69
70
|
}
|
|
70
71
|
) });
|
|
71
72
|
});
|
|
72
|
-
|
|
73
|
-
const
|
|
74
|
-
const { variant:
|
|
75
|
-
return /* @__PURE__ */
|
|
76
|
-
|
|
73
|
+
J.displayName = v.Root.displayName;
|
|
74
|
+
const rt = i.forwardRef(({ className: o, ...s }, a) => {
|
|
75
|
+
const { variant: r } = i.useContext(w);
|
|
76
|
+
return /* @__PURE__ */ e(
|
|
77
|
+
v.List,
|
|
77
78
|
{
|
|
78
|
-
ref:
|
|
79
|
+
ref: a,
|
|
79
80
|
"data-tabs": "list",
|
|
80
|
-
className:
|
|
81
|
+
className: l(
|
|
81
82
|
"inline-flex items-center justify-center rounded-lg",
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
83
|
+
r === "line" && "h-[38px] bg-canvas-elevated border w-full justify-start gap-2 px-2 shrink-0 py-0",
|
|
84
|
+
r === "lineBorderless" && "h-[38px] w-full justify-start gap-2 shrink-0 py-0 bg-transparent border-0",
|
|
85
|
+
r === "pill" && "h-[38px] p-1 bg-brand-tint text-brand gap-1",
|
|
86
|
+
r === "outline" && "bg-transparent gap-2 w-full justify-start",
|
|
87
|
+
r === "box" && "h-auto bg-transparent border-0 w-full justify-start gap-[16px] p-0 shrink-0",
|
|
88
|
+
r === "soft" && "h-auto bg-transparent border-0 w-full justify-start gap-2 p-0 shrink-0 overflow-visible",
|
|
89
|
+
r === "folder" && "h-[55px] min-h-0 w-fit bg-transparent border-0 items-start justify-start gap-3 p-0 shrink-0 overflow-visible",
|
|
90
|
+
o
|
|
89
91
|
),
|
|
90
92
|
style: { overflow: "visible" },
|
|
91
|
-
...
|
|
93
|
+
...s
|
|
92
94
|
}
|
|
93
95
|
);
|
|
94
|
-
}),
|
|
95
|
-
const { variant:
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
96
|
+
}), K = i.forwardRef(({ className: o, icon: s, children: a, maxWords: r, activeColor: n, style: f, ...p }, u) => {
|
|
97
|
+
const { variant: t, size: k, activeValue: N, hideInactiveLabel: b, tooltipClassName: T, maxWords: C, renderTabTooltip: x } = i.useContext(w), R = i.useRef(null), _ = i.useId().replace(/:/g, ""), [g, A] = i.useState({ clip: "", fill: "", border: "" });
|
|
98
|
+
i.useEffect(() => {
|
|
99
|
+
if (t !== "folder") return;
|
|
100
|
+
const c = R.current;
|
|
101
|
+
if (!c) return;
|
|
102
|
+
const I = () => {
|
|
103
|
+
const V = c.offsetWidth;
|
|
104
|
+
if (V <= 0) return;
|
|
105
|
+
const j = Z(V, !c.matches(":first-child"));
|
|
106
|
+
A({ clip: `path('${j.fill}')`, fill: j.fill, border: j.border });
|
|
107
|
+
};
|
|
108
|
+
I();
|
|
109
|
+
const L = new ResizeObserver(I);
|
|
110
|
+
return L.observe(c), () => L.disconnect();
|
|
111
|
+
}, [t]);
|
|
112
|
+
const B = t === "line" || t === "lineBorderless", y = r ?? C, m = N === p.value, S = typeof a == "string", F = S && y ? q(a, y) : a, M = S && y && a.split(/\s+/).length > y, E = b && !m || M, d = { ...f }, P = t === "box" || t === "soft";
|
|
113
|
+
(P || t === "folder") && n && (d["--tab-border"] = n.border, d["--tab-bg"] = n.bg, d["--tab-text"] = n.text, d["--tab-hover-border"] = `color-mix(in srgb, ${n.border} 40%, var(--color-background))`, d["--tab-hover-pedestal"] = `color-mix(in srgb, ${n.border} 40%, var(--color-stroke-field))`, d["--tab-pedestal-fill"] = `color-mix(in srgb, ${n.border} 40%, var(--color-background))`, d["--tab-hover-bg"] = `color-mix(in srgb, ${n.bg} 50%, white)`, d["--tab-hover-text"] = `color-mix(in srgb, ${n.text} 60%, var(--color-foreground-tertiary))`), t === "folder" && (d["--tab-gradient-from"] = "color-mix(in srgb, var(--tab-bg, var(--color-tab-folder-accent)) 46%, var(--color-background))", g.clip && (d["--folder-clip"] = g.clip));
|
|
114
|
+
const $ = P ? /* @__PURE__ */ h(z, { children: [
|
|
115
|
+
a,
|
|
116
|
+
t === "soft" && /* @__PURE__ */ e(G, {}),
|
|
117
|
+
t === "box" && m && /* @__PURE__ */ e(
|
|
101
118
|
"span",
|
|
102
119
|
{
|
|
103
|
-
className:
|
|
120
|
+
className: l(
|
|
104
121
|
"absolute -bottom-[5.5px] start-1/2 -translate-x-1/2 w-[11px] h-[11px] rotate-45 pointer-events-none",
|
|
105
122
|
"border-b border-e bg-inherit border-b-inherit border-e-inherit"
|
|
106
123
|
)
|
|
107
124
|
}
|
|
108
125
|
)
|
|
109
|
-
] }) : /* @__PURE__ */
|
|
110
|
-
|
|
111
|
-
/* @__PURE__ */
|
|
126
|
+
] }) : /* @__PURE__ */ h(z, { children: [
|
|
127
|
+
s && /* @__PURE__ */ e("span", { className: l("h-4 w-4 shrink-0", !b || m ? "me-2" : "me-0"), children: s }),
|
|
128
|
+
/* @__PURE__ */ e("span", { className: l(b && !m && "sr-only"), children: F })
|
|
112
129
|
] });
|
|
113
|
-
return /* @__PURE__ */
|
|
114
|
-
|
|
130
|
+
return /* @__PURE__ */ h(
|
|
131
|
+
v.Trigger,
|
|
115
132
|
{
|
|
116
|
-
ref:
|
|
133
|
+
ref: (c) => {
|
|
134
|
+
R.current = c, typeof u == "function" ? u(c) : u && (u.current = c);
|
|
135
|
+
},
|
|
117
136
|
"data-tabs": "trigger",
|
|
118
|
-
className:
|
|
137
|
+
className: l(
|
|
119
138
|
"relative inline-flex items-center justify-center whitespace-nowrap text-sm font-medium transition-all focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50",
|
|
120
|
-
|
|
139
|
+
B && [
|
|
121
140
|
"h-full rounded-none border-b-2 border-transparent px-1 text-[13px] font-medium capitalize text-content-tertiary",
|
|
122
|
-
|
|
141
|
+
t === "line" && "-mb-[1px]",
|
|
123
142
|
"data-[state=active]:border-brand data-[state=active]:text-brand data-[state=active]:shadow-none",
|
|
124
143
|
"hover:text-brand py-1.5 px-3"
|
|
125
144
|
],
|
|
126
|
-
|
|
145
|
+
t === "pill" && [
|
|
127
146
|
"rounded-md text-brand/70 text-[13px]",
|
|
128
147
|
"data-[state=active]:bg-canvas-elevated data-[state=active]:text-brand data-[state=active]:shadow-sm",
|
|
129
148
|
"py-1.5 px-3"
|
|
130
149
|
],
|
|
131
|
-
|
|
150
|
+
t === "outline" && [
|
|
132
151
|
"rounded-full border border-content-badge bg-canvas-elevated text-content-badge font-['Manrope']",
|
|
133
152
|
"hover:bg-canvas-muted hover:text-content",
|
|
134
153
|
"data-[state=active]:border-brand data-[state=active]:text-brand",
|
|
135
|
-
|
|
154
|
+
k === "sm" ? "h-[24px] px-[8px] py-[2px] text-xs" : "h-9 px-4 py-2"
|
|
136
155
|
],
|
|
137
|
-
|
|
156
|
+
t === "box" && [
|
|
138
157
|
"group flex flex-row items-center justify-between min-w-[231px] w-fit gap-4 min-h-[45px] h-auto py-2 px-[16px] rounded-[8px] bg-canvas-elevated text-content-tertiary transition-none overflow-visible",
|
|
139
158
|
"border border-stroke-field",
|
|
140
159
|
"text-[16px]",
|
|
@@ -143,7 +162,7 @@ const D = d.forwardRef(({ className: e, ...a }, t) => {
|
|
|
143
162
|
"data-[state=active]:bg-[color:var(--tab-bg,var(--color-tab-active-surface))]",
|
|
144
163
|
"data-[state=active]:text-[color:var(--tab-text,var(--color-tab-active-foreground))]"
|
|
145
164
|
],
|
|
146
|
-
|
|
165
|
+
t === "soft" && [
|
|
147
166
|
"tabs-soft-trigger group flex flex-row items-center justify-between gap-3 h-[54px] w-full min-w-0 py-1 px-4 rounded-2xl overflow-visible",
|
|
148
167
|
"border-[1.5px] border-stroke",
|
|
149
168
|
"text-base font-semibold capitalize text-secondary-foreground",
|
|
@@ -153,58 +172,92 @@ const D = d.forwardRef(({ className: e, ...a }, t) => {
|
|
|
153
172
|
"data-[state=active]:border-[color:var(--tab-border,var(--color-tab-soft-accent))]",
|
|
154
173
|
"data-[state=active]:text-[color:var(--tab-text,var(--color-content))]"
|
|
155
174
|
],
|
|
156
|
-
|
|
175
|
+
t === "folder" && [
|
|
176
|
+
"group h-12 w-fit shrink-0 overflow-visible bg-canvas-elevated px-3 text-sm font-bold capitalize leading-[21px] text-secondary-foreground transition-none",
|
|
177
|
+
"data-[state=inactive]:rounded-xl",
|
|
178
|
+
"hover:data-[state=inactive]:z-[1] hover:data-[state=inactive]:text-brand",
|
|
179
|
+
"hover:data-[state=inactive]:bg-gradient-to-b hover:data-[state=inactive]:from-canvas-muted hover:data-[state=inactive]:to-canvas-elevated",
|
|
180
|
+
"hover:data-[state=inactive]:shadow-[inset_0_-2px_0_0_var(--color-primary)]",
|
|
181
|
+
"data-[state=active]:z-[1] data-[state=active]:h-[55px] data-[state=active]:isolate data-[state=active]:border-0 data-[state=active]:bg-transparent data-[state=active]:px-6 data-[state=active]:shadow-none",
|
|
182
|
+
"data-[state=active]:text-[color:var(--tab-text,var(--color-content))]",
|
|
183
|
+
"[&:not(:first-child)[data-state=active]]:ps-10 data-[state=active]:pe-10",
|
|
184
|
+
// ponytail: list gap-3 (12px) + -20px active margin = Figma's 8px folder overlap.
|
|
185
|
+
"[&:not(:first-child)[data-state=active]]:-ms-5 data-[state=active]:-me-5",
|
|
186
|
+
"data-[state=active]:before:pointer-events-none data-[state=active]:before:absolute data-[state=active]:before:inset-0 data-[state=active]:before:-z-[1] data-[state=active]:before:content-['']",
|
|
187
|
+
"data-[state=active]:before:bg-[linear-gradient(to_top,var(--color-background),var(--tab-gradient-from)_216%)]",
|
|
188
|
+
"data-[state=active]:before:[clip-path:var(--folder-clip)]"
|
|
189
|
+
],
|
|
190
|
+
o
|
|
157
191
|
),
|
|
158
192
|
...p,
|
|
159
|
-
style:
|
|
160
|
-
children:
|
|
193
|
+
style: d,
|
|
194
|
+
children: [
|
|
195
|
+
t === "folder" && m && g.border ? /* @__PURE__ */ h("svg", { "aria-hidden": !0, className: "pointer-events-none absolute inset-0 z-[1] size-full", children: [
|
|
196
|
+
/* @__PURE__ */ e("defs", { children: /* @__PURE__ */ e("clipPath", { id: _, children: /* @__PURE__ */ e("path", { d: g.fill }) }) }),
|
|
197
|
+
/* @__PURE__ */ e(
|
|
198
|
+
"path",
|
|
199
|
+
{
|
|
200
|
+
d: g.border,
|
|
201
|
+
fill: "none",
|
|
202
|
+
stroke: "var(--tab-border, var(--color-background))",
|
|
203
|
+
strokeWidth: "6",
|
|
204
|
+
clipPath: `url(#${_})`
|
|
205
|
+
}
|
|
206
|
+
)
|
|
207
|
+
] }) : null,
|
|
208
|
+
E && x ? x($, a, T) : $
|
|
209
|
+
]
|
|
161
210
|
}
|
|
162
211
|
);
|
|
163
212
|
});
|
|
164
|
-
|
|
165
|
-
const
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
)
|
|
178
|
-
|
|
179
|
-
|
|
213
|
+
K.displayName = v.Trigger.displayName;
|
|
214
|
+
const Q = i.forwardRef(({ className: o, ...s }, a) => {
|
|
215
|
+
const { variant: r } = i.useContext(w);
|
|
216
|
+
return /* @__PURE__ */ e(
|
|
217
|
+
v.Content,
|
|
218
|
+
{
|
|
219
|
+
ref: a,
|
|
220
|
+
"data-tabs": "content",
|
|
221
|
+
tabIndex: -1,
|
|
222
|
+
className: l(
|
|
223
|
+
r === "folder" ? "mt-0" : "mt-2",
|
|
224
|
+
"focus-visible:outline-none focus:outline-none",
|
|
225
|
+
o
|
|
226
|
+
),
|
|
227
|
+
...s
|
|
228
|
+
}
|
|
229
|
+
);
|
|
230
|
+
});
|
|
231
|
+
Q.displayName = v.Content.displayName;
|
|
232
|
+
const ot = O(
|
|
180
233
|
"TabsImage",
|
|
181
|
-
({ className:
|
|
234
|
+
({ className: o, activeImage: s, inactiveImage: a, activeOnHover: r = !1, grayscaleInactive: n = !1, ...f }, p) => /* @__PURE__ */ h(
|
|
182
235
|
"div",
|
|
183
236
|
{
|
|
184
237
|
ref: p,
|
|
185
238
|
"data-component": "tabs-image",
|
|
186
|
-
className:
|
|
187
|
-
...
|
|
239
|
+
className: l("relative flex items-center justify-center shrink-0", o),
|
|
240
|
+
...f,
|
|
188
241
|
children: [
|
|
189
|
-
/* @__PURE__ */
|
|
242
|
+
/* @__PURE__ */ e(
|
|
190
243
|
"div",
|
|
191
244
|
{
|
|
192
|
-
className:
|
|
245
|
+
className: l(
|
|
193
246
|
"flex group-data-[state=active]:hidden",
|
|
194
|
-
|
|
247
|
+
r && "group-hover:hidden",
|
|
195
248
|
n && "grayscale"
|
|
196
249
|
),
|
|
197
|
-
children:
|
|
250
|
+
children: a
|
|
198
251
|
}
|
|
199
252
|
),
|
|
200
|
-
/* @__PURE__ */
|
|
253
|
+
/* @__PURE__ */ e(
|
|
201
254
|
"div",
|
|
202
255
|
{
|
|
203
|
-
className:
|
|
256
|
+
className: l(
|
|
204
257
|
"hidden group-data-[state=active]:flex",
|
|
205
|
-
|
|
258
|
+
r && "group-hover:flex"
|
|
206
259
|
),
|
|
207
|
-
children:
|
|
260
|
+
children: s
|
|
208
261
|
}
|
|
209
262
|
)
|
|
210
263
|
]
|
|
@@ -212,9 +265,9 @@ const G = z(
|
|
|
212
265
|
)
|
|
213
266
|
);
|
|
214
267
|
export {
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
268
|
+
J as Tabs,
|
|
269
|
+
Q as TabsContent,
|
|
270
|
+
ot as TabsImage,
|
|
271
|
+
rt as TabsList,
|
|
272
|
+
K as TabsTrigger
|
|
220
273
|
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { InfoTooltipRender } from '../../../lib/primitives/info-slot.types';
|
|
2
2
|
import type * as React from "react";
|
|
3
3
|
import type * as TabsPrimitive from "@radix-ui/react-tabs";
|
|
4
|
-
export type TabsVariant = "line" | "lineBorderless" | "pill" | "outline" | "box" | "soft";
|
|
4
|
+
export type TabsVariant = "line" | "lineBorderless" | "pill" | "outline" | "box" | "soft" | "folder";
|
|
5
5
|
export type TabsSize = "default" | "sm";
|
|
6
6
|
export type ActiveColorConfig = {
|
|
7
7
|
text: string;
|
|
@@ -115,6 +115,12 @@ export interface NestedListMessages {
|
|
|
115
115
|
releaseToDrop: string;
|
|
116
116
|
dragHere: string;
|
|
117
117
|
}
|
|
118
|
+
export interface ScenarioComparisonMessages {
|
|
119
|
+
select: string;
|
|
120
|
+
selected: string;
|
|
121
|
+
optionCount: string;
|
|
122
|
+
contribution: string;
|
|
123
|
+
}
|
|
118
124
|
export interface DataTableMessages {
|
|
119
125
|
frozenColumns: string;
|
|
120
126
|
scrollableColumns: string;
|
|
@@ -171,6 +177,15 @@ export interface DataTableMessages {
|
|
|
171
177
|
savedViewsDeleteConfirmTitle: string;
|
|
172
178
|
savedViewsDeleteConfirmDescription: string;
|
|
173
179
|
savedViewsDeleteConfirmButton: string;
|
|
180
|
+
/** Live region after Alt+Arrow or drop reorder on `variant="list"`. Use {{position}}. */
|
|
181
|
+
listMovedToPosition: string;
|
|
182
|
+
}
|
|
183
|
+
export interface FindBarMessages {
|
|
184
|
+
find: string;
|
|
185
|
+
previousMatch: string;
|
|
186
|
+
nextMatch: string;
|
|
187
|
+
closeFind: string;
|
|
188
|
+
noResults: string;
|
|
174
189
|
}
|
|
175
190
|
export interface AriaMessages {
|
|
176
191
|
close: string;
|
|
@@ -488,7 +503,9 @@ export interface ImpactNovaMessages {
|
|
|
488
503
|
filter: FilterMessages;
|
|
489
504
|
select: SelectMessages;
|
|
490
505
|
nestedList: NestedListMessages;
|
|
506
|
+
scenarioComparison: ScenarioComparisonMessages;
|
|
491
507
|
dataTable: DataTableMessages;
|
|
508
|
+
findBar: FindBarMessages;
|
|
492
509
|
aria: AriaMessages;
|
|
493
510
|
prompt: PromptMessages;
|
|
494
511
|
fileUpload: FileUploadMessages;
|