@pipe0/react 1.0.37 → 1.0.39
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/CHANGELOG.md +18 -0
- package/dist/components/compound/effect-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/effect-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/effect-catalog/search-filter.mjs +1 -1
- package/dist/components/compound/effect-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/input-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.mjs +1 -1
- package/dist/components/compound/pipe-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/category-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/category-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/output-field-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/provider-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/provider-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/search-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/search-filter.mjs.map +1 -1
- package/dist/components/compound/search-catalog/tag-filter.mjs +1 -1
- package/dist/components/compound/search-catalog/tag-filter.mjs.map +1 -1
- package/dist/components/defaults/adapters/json-extraction-input.mjs +1 -1
- package/dist/components/defaults/adapters/loose-object-input.mjs +1 -1
- package/dist/components/defaults/adapters/loose-object-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/pipes-run-if-input.mjs +1 -1
- package/dist/components/defaults/adapters/prompt-input.mjs +1 -1
- package/dist/components/defaults/adapters/providers-input.mjs +1 -2
- package/dist/components/defaults/adapters/providers-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/select-input.mjs +1 -1
- package/dist/components/defaults/adapters/select-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/tagged-ordered-multi-create-input.mjs +2 -3
- package/dist/components/defaults/adapters/tagged-ordered-multi-create-input.mjs.map +1 -1
- package/dist/components/defaults/adapters/tagged-text-input.mjs +1 -1
- package/dist/components/defaults/adapters/tagged-text-input.mjs.map +1 -1
- package/dist/components/defaults/catalog/active-filter-pill.mjs +1 -1
- package/dist/components/defaults/catalog/active-filter-pill.mjs.map +1 -1
- package/dist/components/defaults/catalog/card-derived.d.mts.map +1 -1
- package/dist/components/defaults/catalog/card-derived.mjs +9 -6
- package/dist/components/defaults/catalog/card-derived.mjs.map +1 -1
- package/dist/components/defaults/catalog/category-section.d.mts +2 -2
- package/dist/components/defaults/catalog/category-section.d.mts.map +1 -1
- package/dist/components/defaults/catalog/category-section.mjs +10 -15
- package/dist/components/defaults/catalog/category-section.mjs.map +1 -1
- package/dist/components/defaults/catalog/provider-avatars.mjs +1 -1
- package/dist/components/defaults/catalog/provider-avatars.mjs.map +1 -1
- package/dist/components/defaults/layout/field-wrapper.mjs +2 -2
- package/dist/components/defaults/layout/field-wrapper.mjs.map +1 -1
- package/dist/components/defaults/layout/group.mjs +2 -1
- package/dist/components/defaults/layout/group.mjs.map +1 -1
- package/dist/components/defaults/layout/section.mjs +5 -8
- package/dist/components/defaults/layout/section.mjs.map +1 -1
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs +1 -1
- package/dist/components/internal/LiquidEditor/ChipEditPopover.mjs.map +1 -1
- package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs +1 -1
- package/dist/components/internal/LiquidEditor/UnifiedReferencePicker.mjs.map +1 -1
- package/dist/components/internal/combobox/include-exclude-combobox.mjs +2 -3
- package/dist/components/internal/combobox/include-exclude-combobox.mjs.map +1 -1
- package/dist/components/internal/combobox/suggest-combobox.mjs +2 -3
- package/dist/components/internal/combobox/suggest-combobox.mjs.map +1 -1
- package/dist/components/internal/icons.d.mts +14 -0
- package/dist/components/internal/icons.d.mts.map +1 -0
- package/dist/components/internal/icons.mjs +137 -185
- package/dist/components/internal/icons.mjs.map +1 -1
- package/dist/components/ui/alert.d.mts +1 -1
- package/dist/components/ui/button.d.mts +1 -1
- package/dist/components/ui/combobox.mjs +4 -4
- package/dist/components/ui/combobox.mjs.map +1 -1
- package/dist/components/ui/select.mjs +5 -5
- package/dist/components/ui/select.mjs.map +1 -1
- package/dist/hooks/use-pipe-catalog-table.d.mts +8 -8
- package/dist/hooks/use-search-catalog-table.d.mts +6 -6
- package/dist/styles/pipe0-form.css +1 -1
- package/dist/utils/catalog-helpers.d.mts +4 -5
- package/dist/utils/catalog-helpers.d.mts.map +1 -1
- package/dist/utils/catalog-helpers.mjs +4 -4
- package/dist/utils/catalog-helpers.mjs.map +1 -1
- package/dist/widgets/avatar-group.d.mts +12 -3
- package/dist/widgets/avatar-group.d.mts.map +1 -1
- package/dist/widgets/avatar-group.mjs +173 -50
- package/dist/widgets/avatar-group.mjs.map +1 -1
- package/dist/widgets/field-type-badge.d.mts.map +1 -1
- package/dist/widgets/field-type-badge.mjs +1 -1
- package/dist/widgets/field-type-badge.mjs.map +1 -1
- package/dist/widgets/icon-glyph.mjs +2 -3
- package/dist/widgets/icon-glyph.mjs.map +1 -1
- package/dist/widgets/token-pricing-badge.mjs +1 -1
- package/dist/widgets/token-pricing-badge.mjs.map +1 -1
- package/package.json +4 -3
- package/dist/widgets/glyphs/linkedin.mjs +0 -32
- package/dist/widgets/glyphs/linkedin.mjs.map +0 -1
|
@@ -10,6 +10,7 @@ import { getProviderEntry } from "@pipe0/base";
|
|
|
10
10
|
const avatarGroupVariants = cva("pz:relative pz:inline-flex pz:items-center", {
|
|
11
11
|
variants: { size: {
|
|
12
12
|
sm: "",
|
|
13
|
+
base: "",
|
|
13
14
|
md: "",
|
|
14
15
|
lg: ""
|
|
15
16
|
} },
|
|
@@ -17,47 +18,58 @@ const avatarGroupVariants = cva("pz:relative pz:inline-flex pz:items-center", {
|
|
|
17
18
|
});
|
|
18
19
|
const tileSize = {
|
|
19
20
|
sm: "pz:h-5 pz:w-5",
|
|
21
|
+
base: "pz:h-6 pz:w-6",
|
|
20
22
|
md: "pz:h-8 pz:w-8",
|
|
21
23
|
lg: "pz:h-12 pz:w-12"
|
|
22
24
|
};
|
|
23
25
|
const tileLogoSize = {
|
|
24
|
-
sm: "pz:size-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
sm: "pz:size-[14px]",
|
|
27
|
+
base: "pz:size-[18px]",
|
|
28
|
+
md: "pz:size-[22px]",
|
|
29
|
+
lg: "pz:size-8"
|
|
30
|
+
};
|
|
31
|
+
const tileRadius = {
|
|
32
|
+
sm: "pz:rounded-[6px]",
|
|
33
|
+
base: "pz:rounded-[7px]",
|
|
34
|
+
md: "pz:rounded-[9px]",
|
|
35
|
+
lg: "pz:rounded-[12px]"
|
|
27
36
|
};
|
|
28
37
|
const tileOverlap = {
|
|
29
|
-
sm: "pz:-ml-1
|
|
30
|
-
|
|
38
|
+
sm: "pz:-ml-1",
|
|
39
|
+
base: "pz:-ml-[5px]",
|
|
40
|
+
md: "pz:-ml-1.5",
|
|
31
41
|
lg: "pz:-ml-2.5"
|
|
32
42
|
};
|
|
33
43
|
const tileSpread = {
|
|
34
44
|
sm: "pz:group-hover/p0ag:ml-0.5",
|
|
45
|
+
base: "pz:group-hover/p0ag:ml-0.5",
|
|
35
46
|
md: "pz:group-hover/p0ag:ml-0.5",
|
|
36
47
|
lg: "pz:group-hover/p0ag:ml-1"
|
|
37
48
|
};
|
|
38
49
|
const tileShadow = [
|
|
39
|
-
"
|
|
40
|
-
"
|
|
41
|
-
"0 0 0 .5px
|
|
42
|
-
"0 0 0 2px var(--background, var(--pz-color-background, #fff))"
|
|
50
|
+
"0 1px 2px rgba(14,17,23,.10)",
|
|
51
|
+
"0 1px 1px rgba(14,17,23,.04)",
|
|
52
|
+
"0 0 0 1.5px var(--background, var(--pz-color-background, #fff))"
|
|
43
53
|
].join(", ");
|
|
44
|
-
const tileGlare = "linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 45%, rgba(0,0,0,.07))";
|
|
45
54
|
const overflowText = {
|
|
46
|
-
sm: "pz:text-[
|
|
55
|
+
sm: "pz:text-[9.5px]",
|
|
56
|
+
base: "pz:text-[10.5px]",
|
|
47
57
|
md: "pz:text-xs",
|
|
48
58
|
lg: "pz:text-sm"
|
|
49
59
|
};
|
|
50
60
|
const DEFAULT_MAX_TILES = 4;
|
|
51
61
|
/**
|
|
52
|
-
* Horizontal stack of provider
|
|
53
|
-
*
|
|
62
|
+
* Horizontal stack of provider cards: each a tinted tile with the provider's
|
|
63
|
+
* logo, a same-hue hairline and a soft shadow. All cards share one size and
|
|
64
|
+
* one axis; each sits under the one before it, so the group reads as a stack.
|
|
54
65
|
* Defaults to a maximum of 4 tiles, then a "+N" overflow tile.
|
|
55
66
|
*
|
|
56
67
|
* Pure visual — no popover. For a hover-card with cost-per-provider, see
|
|
57
68
|
* `<CatalogProviderAvatars>`.
|
|
58
69
|
*/
|
|
59
|
-
const AvatarGroup = forwardRef(function AvatarGroup({ providers, size, max = DEFAULT_MAX_TILES, showCount = true, className, render, ...rest }, ref) {
|
|
70
|
+
const AvatarGroup = forwardRef(function AvatarGroup({ providers, size, max = DEFAULT_MAX_TILES, showCount = true, variant = "stack", className, render, ...rest }, ref) {
|
|
60
71
|
const sizeKey = size ?? "md";
|
|
72
|
+
const isDeck = variant === "deck";
|
|
61
73
|
const overflows = providers.length > max;
|
|
62
74
|
const renderOverflow = overflows && showCount;
|
|
63
75
|
const visibleSlots = renderOverflow ? max - 1 : max;
|
|
@@ -73,62 +85,173 @@ const AvatarGroup = forwardRef(function AvatarGroup({ providers, size, max = DEF
|
|
|
73
85
|
},
|
|
74
86
|
props: mergeProps({
|
|
75
87
|
className: cn("pz:group/p0ag", avatarGroupVariants({ size }), className),
|
|
76
|
-
children:
|
|
88
|
+
children: isDeck ? /* @__PURE__ */ jsx(Deck, {
|
|
89
|
+
providers,
|
|
90
|
+
size: sizeKey
|
|
91
|
+
}) : /* @__PURE__ */ jsxs(Fragment$1, { children: [shown.map((provider, i) => /* @__PURE__ */ jsx(ProviderTile, {
|
|
77
92
|
provider,
|
|
78
93
|
size: sizeKey,
|
|
79
|
-
|
|
94
|
+
index: i,
|
|
95
|
+
count: shown.length + (renderOverflow ? 1 : 0)
|
|
80
96
|
}, provider)), renderOverflow ? /* @__PURE__ */ jsx(OverflowTile, {
|
|
81
97
|
size: sizeKey,
|
|
82
98
|
count: remaining,
|
|
83
|
-
|
|
99
|
+
index: shown.length
|
|
84
100
|
}) : null] }),
|
|
85
|
-
"data-p0": "avatar-group"
|
|
101
|
+
"data-p0": "avatar-group",
|
|
102
|
+
"data-variant": variant,
|
|
103
|
+
...isDeck ? { title: providers.map((p) => getProviderEntry(p)?.label ?? p).join(", ") } : {}
|
|
86
104
|
}, rest)
|
|
87
105
|
});
|
|
88
106
|
if (!providers.length) return null;
|
|
89
107
|
return element;
|
|
90
108
|
});
|
|
91
|
-
const
|
|
92
|
-
|
|
109
|
+
const deckTileSize = {
|
|
110
|
+
sm: "pz:size-[22px]",
|
|
111
|
+
base: "pz:size-[26px]",
|
|
112
|
+
md: "pz:size-9",
|
|
113
|
+
lg: "pz:size-14"
|
|
114
|
+
};
|
|
115
|
+
const deckLogoSize = {
|
|
116
|
+
sm: "pz:size-4",
|
|
117
|
+
base: "pz:size-5",
|
|
118
|
+
md: "pz:size-6",
|
|
119
|
+
lg: "pz:size-9"
|
|
120
|
+
};
|
|
121
|
+
const deckRadius = {
|
|
122
|
+
sm: "pz:rounded-[6.5px]",
|
|
123
|
+
base: "pz:rounded-[7.5px]",
|
|
124
|
+
md: "pz:rounded-[10px]",
|
|
125
|
+
lg: "pz:rounded-[14px]"
|
|
126
|
+
};
|
|
127
|
+
/** Each card behind is the front card's size in px, for the fan geometry. */
|
|
128
|
+
const DECK_TILE_PX = {
|
|
129
|
+
sm: 22,
|
|
130
|
+
base: 26,
|
|
131
|
+
md: 36,
|
|
132
|
+
lg: 56
|
|
133
|
+
};
|
|
134
|
+
const DECK_TURN_DEG = 6;
|
|
135
|
+
const DECK_SHIFT = .16;
|
|
136
|
+
const DECK_MAX_BEHIND = 2;
|
|
137
|
+
/** Room the fan needs to the right of the front card, as a share of its width. */
|
|
138
|
+
const DECK_OVERHANG = .2;
|
|
139
|
+
const deckCardLight = ["#F4F4F8", "#ECECF2"];
|
|
140
|
+
const deckCardDark = ["#2A2A2F", "#303036"];
|
|
141
|
+
const deckFrontShadow = ["0 1px 2px rgba(14,17,23,.10)", "0 1px 1px rgba(14,17,23,.04)"].join(", ");
|
|
142
|
+
/**
|
|
143
|
+
* The front card is the first provider; behind it, one blank card per further
|
|
144
|
+
* provider (at most two), same size, fanned out to the right.
|
|
145
|
+
*/
|
|
146
|
+
function Deck({ providers, size }) {
|
|
147
|
+
const behind = Math.min(providers.length - 1, DECK_MAX_BEHIND);
|
|
148
|
+
const entry = getProviderEntry(providers[0]);
|
|
149
|
+
const px = DECK_TILE_PX[size];
|
|
150
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
151
|
+
className: "pz:relative pz:flex pz:shrink-0",
|
|
152
|
+
style: { paddingRight: behind * px * DECK_OVERHANG },
|
|
153
|
+
children: [Array.from({ length: behind }, (_, i) => {
|
|
154
|
+
const depth = i + 1;
|
|
155
|
+
const shade = depth - 1;
|
|
156
|
+
return /* @__PURE__ */ jsxs("div", {
|
|
157
|
+
"aria-hidden": "true",
|
|
158
|
+
"data-p0": "avatar-group-deck-card",
|
|
159
|
+
className: cn("pz:absolute pz:top-0 pz:left-0", deckTileSize[size]),
|
|
160
|
+
style: {
|
|
161
|
+
zIndex: DECK_MAX_BEHIND - depth,
|
|
162
|
+
transform: `translateX(${depth * DECK_SHIFT * px}px) rotate(${depth * DECK_TURN_DEG}deg)`,
|
|
163
|
+
transformOrigin: "50% 100%"
|
|
164
|
+
},
|
|
165
|
+
children: [/* @__PURE__ */ jsx("div", {
|
|
166
|
+
className: cn("pz:absolute pz:inset-0 pz:dark:hidden", deckRadius[size]),
|
|
167
|
+
style: {
|
|
168
|
+
backgroundColor: deckCardLight[shade],
|
|
169
|
+
boxShadow: "inset 0 0 0 1px rgba(30,30,60,.13), 0 1px 2px rgba(14,17,23,.06)"
|
|
170
|
+
}
|
|
171
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
172
|
+
className: cn("pz:absolute pz:inset-0 pz:hidden pz:dark:block", deckRadius[size]),
|
|
173
|
+
style: {
|
|
174
|
+
backgroundColor: deckCardDark[shade],
|
|
175
|
+
boxShadow: "inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.3)"
|
|
176
|
+
}
|
|
177
|
+
})]
|
|
178
|
+
}, depth);
|
|
179
|
+
}), /* @__PURE__ */ jsxs("div", {
|
|
180
|
+
"data-p0": "avatar-group-tile",
|
|
181
|
+
className: cn(tileBase, deckTileSize[size], deckRadius[size]),
|
|
182
|
+
style: {
|
|
183
|
+
boxShadow: behind > 0 ? deckFrontShadow : void 0,
|
|
184
|
+
zIndex: DECK_MAX_BEHIND + 1
|
|
185
|
+
},
|
|
186
|
+
children: [/* @__PURE__ */ jsx(TileSurface, {
|
|
187
|
+
light: entry?.background?.light,
|
|
188
|
+
dark: entry?.background?.dark,
|
|
189
|
+
radius: deckRadius[size]
|
|
190
|
+
}), entry?.logoUrl ? /* @__PURE__ */ jsx("img", {
|
|
191
|
+
src: entry.logoUrl,
|
|
192
|
+
alt: entry.label ?? providers[0],
|
|
193
|
+
className: cn("pz:relative pz:object-contain", entry.invertLogoInDark && invertInDark, deckLogoSize[size])
|
|
194
|
+
}) : null]
|
|
195
|
+
})]
|
|
196
|
+
});
|
|
197
|
+
}
|
|
198
|
+
const invertInDark = "pz:dark:invert pz:dark:hue-rotate-180";
|
|
199
|
+
const tileBase = "pz:relative pz:flex pz:items-center pz:justify-center pz:shrink-0 pz:transition-[margin-left] pz:duration-200 pz:ease-out";
|
|
200
|
+
function ProviderTile({ provider, size, index, count }) {
|
|
93
201
|
const entry = getProviderEntry(provider);
|
|
94
202
|
const bg = entry?.background;
|
|
95
203
|
return /* @__PURE__ */ jsxs("div", {
|
|
96
204
|
"data-p0": "avatar-group-tile",
|
|
97
|
-
className: cn(tileBase, tileSize[size],
|
|
98
|
-
style: {
|
|
205
|
+
className: cn(tileBase, tileSize[size], tileRadius[size], index === 0 ? void 0 : [tileOverlap[size], tileSpread[size]]),
|
|
206
|
+
style: {
|
|
207
|
+
boxShadow: count > 1 ? tileShadow : void 0,
|
|
208
|
+
zIndex: count - index
|
|
209
|
+
},
|
|
99
210
|
title: entry?.label ?? provider,
|
|
100
|
-
children: [
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
})] }) : /* @__PURE__ */ jsx("div", {
|
|
110
|
-
"aria-hidden": "true",
|
|
111
|
-
className: "pz:absolute pz:inset-0 pz:bg-muted"
|
|
112
|
-
}),
|
|
113
|
-
/* @__PURE__ */ jsx("div", {
|
|
114
|
-
"aria-hidden": "true",
|
|
115
|
-
className: "pz:absolute pz:inset-0",
|
|
116
|
-
style: { background: tileGlare }
|
|
117
|
-
}),
|
|
118
|
-
entry?.logoUrl ? /* @__PURE__ */ jsx("img", {
|
|
119
|
-
src: entry.logoUrl,
|
|
120
|
-
alt: entry.label ?? provider,
|
|
121
|
-
className: cn("pz:relative pz:object-contain", tileLogoSize[size])
|
|
122
|
-
}) : null
|
|
123
|
-
]
|
|
211
|
+
children: [/* @__PURE__ */ jsx(TileSurface, {
|
|
212
|
+
light: bg?.light,
|
|
213
|
+
dark: bg?.dark,
|
|
214
|
+
radius: tileRadius[size]
|
|
215
|
+
}), entry?.logoUrl ? /* @__PURE__ */ jsx("img", {
|
|
216
|
+
src: entry.logoUrl,
|
|
217
|
+
alt: entry.label ?? provider,
|
|
218
|
+
className: cn("pz:relative pz:object-contain", entry.invertLogoInDark && invertInDark, tileLogoSize[size])
|
|
219
|
+
}) : null]
|
|
124
220
|
});
|
|
125
221
|
}
|
|
126
|
-
|
|
222
|
+
/** The card face: a white card (dark: neutral), or the provider's own logo
|
|
223
|
+
background, in the outline button's material, per colour scheme. */
|
|
224
|
+
function TileSurface({ light = "#FFFFFF", dark = "#1F1F23", radius }) {
|
|
225
|
+
return /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx("div", {
|
|
226
|
+
"aria-hidden": "true",
|
|
227
|
+
className: cn("pz:absolute pz:inset-0 pz:box-border pz:dark:hidden", radius),
|
|
228
|
+
style: {
|
|
229
|
+
border: "1px solid transparent",
|
|
230
|
+
background: [`linear-gradient(180deg, ${light}, color-mix(in srgb, ${light}, #0e1117 2%)) padding-box`, "linear-gradient(180deg, rgba(14,17,23,.10), rgba(14,17,23,.24)) border-box"].join(", "),
|
|
231
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,.6)"
|
|
232
|
+
}
|
|
233
|
+
}), /* @__PURE__ */ jsx("div", {
|
|
234
|
+
"aria-hidden": "true",
|
|
235
|
+
className: cn("pz:absolute pz:inset-0 pz:box-border pz:hidden pz:dark:block", radius),
|
|
236
|
+
style: {
|
|
237
|
+
border: "1px solid transparent",
|
|
238
|
+
background: [`linear-gradient(180deg, color-mix(in srgb, ${dark}, #ffffff 5%), ${dark}) padding-box`, "linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.09)) border-box"].join(", "),
|
|
239
|
+
boxShadow: "inset 0 1px 0 rgba(255,255,255,.1)"
|
|
240
|
+
}
|
|
241
|
+
})] });
|
|
242
|
+
}
|
|
243
|
+
function OverflowTile({ size, count, index }) {
|
|
127
244
|
return /* @__PURE__ */ jsxs("div", {
|
|
128
245
|
"data-p0": "avatar-group-overflow",
|
|
129
|
-
className: cn(tileBase, "pz:
|
|
130
|
-
style: {
|
|
131
|
-
|
|
246
|
+
className: cn(tileBase, tileSize[size], tileRadius[size], "pz:font-semibold pz:tabular-nums pz:text-muted-foreground", overflowText[size], index === 0 ? void 0 : [tileOverlap[size], tileSpread[size]]),
|
|
247
|
+
style: {
|
|
248
|
+
boxShadow: tileShadow,
|
|
249
|
+
zIndex: 0
|
|
250
|
+
},
|
|
251
|
+
children: [/* @__PURE__ */ jsx(TileSurface, { radius: tileRadius[size] }), /* @__PURE__ */ jsxs("span", {
|
|
252
|
+
className: "pz:relative",
|
|
253
|
+
children: ["+", count]
|
|
254
|
+
})]
|
|
132
255
|
});
|
|
133
256
|
}
|
|
134
257
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"avatar-group.mjs","names":[],"sources":["../../src/widgets/avatar-group.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type CSSProperties, forwardRef } from \"react\";\nimport { cn } from \"../lib/utils.js\";\n\nconst avatarGroupVariants = cva(\"pz:relative pz:inline-flex pz:items-center\", {\n variants: {\n size: {\n sm: \"\",\n md: \"\",\n lg: \"\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nconst tileSize = {\n sm: \"pz:h-5 pz:w-5\",\n md: \"pz:h-8 pz:w-8\",\n lg: \"pz:h-12 pz:w-12\",\n} as const;\n\nconst tileLogoSize = {\n sm: \"pz:size-3\",\n md: \"pz:size-5\",\n lg: \"pz:size-7\",\n} as const;\n\nconst tileOverlap = {\n sm: \"pz:-ml-1.5\",\n md: \"pz:-ml-2\",\n lg: \"pz:-ml-2.5\",\n} as const;\n\n/* Stacked tiles fan apart when the group is hovered (marker: group/p0ag). */\nconst tileSpread = {\n sm: \"pz:group-hover/p0ag:ml-0.5\",\n md: \"pz:group-hover/p0ag:ml-0.5\",\n lg: \"pz:group-hover/p0ag:ml-1\",\n} as const;\n\n/* Convex \"glass\" material: top glare + bottom inner shade + hairline ring +\n a 2px separation ring in the host's background color. One paint per tile. */\nconst tileShadow = [\n \"inset 0 1px 0 rgba(255,255,255,.5)\",\n \"inset 0 -1px 0 rgba(0,0,0,.1)\",\n \"0 0 0 .5px rgba(17,17,17,.14)\",\n \"0 0 0 2px var(--background, var(--pz-color-background, #fff))\",\n].join(\", \");\n\nconst tileGlare =\n \"linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,0) 45%, rgba(0,0,0,.07))\";\n\nconst overflowText = {\n sm: \"pz:text-[9px]\",\n md: \"pz:text-xs\",\n lg: \"pz:text-sm\",\n} as const;\n\nconst DEFAULT_MAX_TILES = 4;\n\nexport interface AvatarGroupState {\n overflows: boolean;\n remaining: number;\n}\n\nexport interface AvatarGroupProps\n extends VariantProps<typeof avatarGroupVariants>,\n useRender.ComponentProps<\"div\", AvatarGroupState> {\n providers: readonly ProviderName[];\n /** Maximum tile slots before the overflow indicator. Default 4. */\n max?: number;\n /** Show the +N overflow tile when providers exceed `max`. Default true. */\n showCount?: boolean;\n}\n\n/**\n * Horizontal stack of provider tiles. Each tile is a brand-colored rectangle\n * with the provider's logo on top; tiles overlap slightly to read as a group.\n * Defaults to a maximum of 4 tiles, then a \"+N\" overflow tile.\n *\n * Pure visual — no popover. For a hover-card with cost-per-provider, see\n * `<CatalogProviderAvatars>`.\n */\nexport const AvatarGroup = forwardRef<HTMLDivElement, AvatarGroupProps>(function AvatarGroup(\n { providers, size, max = DEFAULT_MAX_TILES, showCount = true, className, render, ...rest },\n ref,\n) {\n const sizeKey = size ?? \"md\";\n const overflows = providers.length > max;\n const renderOverflow = overflows && showCount;\n const visibleSlots = renderOverflow ? max - 1 : max;\n const shown = providers.slice(0, visibleSlots);\n const remaining = providers.length - shown.length;\n\n const element = useRender({\n ref,\n defaultTagName: \"div\",\n render,\n state: { overflows, remaining },\n props: mergeProps<\"div\">(\n {\n className: cn(\"pz:group/p0ag\", avatarGroupVariants({ size }), className),\n children: (\n <>\n {shown.map((provider, i) => (\n <ProviderTile key={provider} provider={provider} size={sizeKey} first={i === 0} />\n ))}\n {renderOverflow ? (\n <OverflowTile size={sizeKey} count={remaining} first={shown.length === 0} />\n ) : null}\n </>\n ),\n ...({ \"data-p0\": \"avatar-group\" } as Record<string, string>),\n },\n rest as Record<string, unknown>,\n ),\n });\n\n if (!providers.length) return null;\n return element;\n});\n\nconst tileBase =\n \"pz:relative pz:flex pz:items-center pz:justify-center pz:rounded-md pz:overflow-hidden pz:shrink-0 pz:transition-[margin-left] pz:duration-200 pz:ease-out\";\n\nfunction ProviderTile({\n provider,\n size,\n first,\n}: {\n provider: ProviderName;\n size: \"sm\" | \"md\" | \"lg\";\n first: boolean;\n}) {\n const entry = getProviderEntry(provider);\n const bg = entry?.background;\n return (\n <div\n data-p0=\"avatar-group-tile\"\n className={cn(\n tileBase,\n tileSize[size],\n first ? undefined : [tileOverlap[size], tileSpread[size]],\n )}\n style={{ boxShadow: tileShadow } as CSSProperties}\n title={entry?.label ?? provider}\n >\n {bg ? (\n <>\n <div\n aria-hidden=\"true\"\n className=\"pz:absolute pz:inset-0 pz:dark:hidden\"\n style={{ backgroundColor: bg.light } as CSSProperties}\n />\n <div\n aria-hidden=\"true\"\n className=\"pz:absolute pz:inset-0 pz:hidden pz:dark:block\"\n style={{ backgroundColor: bg.dark } as CSSProperties}\n />\n </>\n ) : (\n <div aria-hidden=\"true\" className=\"pz:absolute pz:inset-0 pz:bg-muted\" />\n )}\n <div\n aria-hidden=\"true\"\n className=\"pz:absolute pz:inset-0\"\n style={{ background: tileGlare }}\n />\n {entry?.logoUrl ? (\n <img\n src={entry.logoUrl}\n alt={entry.label ?? provider}\n className={cn(\"pz:relative pz:object-contain\", tileLogoSize[size])}\n />\n ) : null}\n </div>\n );\n}\n\nfunction OverflowTile({\n size,\n count,\n first,\n}: {\n size: \"sm\" | \"md\" | \"lg\";\n count: number;\n first: boolean;\n}) {\n return (\n <div\n data-p0=\"avatar-group-overflow\"\n className={cn(\n tileBase,\n \"pz:bg-muted pz:text-muted-foreground pz:font-medium\",\n tileSize[size],\n overflowText[size],\n first ? undefined : [tileOverlap[size], tileSpread[size]],\n )}\n style={{\n boxShadow:\n \"0 0 0 .5px rgba(17,17,17,.1), 0 0 0 2px var(--background, var(--pz-color-background, #fff))\",\n }}\n >\n +{count}\n </div>\n );\n}\n\nexport { avatarGroupVariants, tileSize as avatarSize };\n"],"mappings":";;;;;;;;;AAOA,MAAM,sBAAsB,IAAI,8CAA8C;CAC5E,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;EACL,EACF;CACD,iBAAiB,EAAE,MAAM,MAAM;CAChC,CAAC;AAEF,MAAM,WAAW;CACf,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,eAAe;CACnB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,cAAc;CAClB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAGD,MAAM,aAAa;CACjB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAID,MAAM,aAAa;CACjB;CACA;CACA;CACA;CACD,CAAC,KAAK,KAAK;AAEZ,MAAM,YACJ;AAEF,MAAM,eAAe;CACnB,IAAI;CACJ,IAAI;CACJ,IAAI;CACL;AAED,MAAM,oBAAoB;;;;;;;;;AAyB1B,MAAa,cAAc,WAA6C,SAAS,YAC/E,EAAE,WAAW,MAAM,MAAM,mBAAmB,YAAY,MAAM,WAAW,QAAQ,GAAG,QACpF,KACA;CACA,MAAM,UAAU,QAAQ;CACxB,MAAM,YAAY,UAAU,SAAS;CACrC,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AAD;IACE,KAAK,MAAM;IACX,KAAK,MAAM,SAAS;IACpB,WAAW,GAAG,iCAAiC,aAAa,MAAM;IAClE,IACA;GACA;;;AAIV,SAAS,aAAa,EACpB,MACA,OACA,SAKC;AACD,QACE,qBAAC,OAAD;EACE,WAAQ;EACR,WAAW,GACT,UACA,uDACA,SAAS,OACT,aAAa,OACb,QAAQ,SAAY,CAAC,YAAY,OAAO,WAAW,MAAM,CAC1D;EACD,OAAO,EACL,WACE,+FACH;YAZH,CAaC,KACG,MACE"}
|
|
1
|
+
{"version":3,"file":"avatar-group.mjs","names":[],"sources":["../../src/widgets/avatar-group.tsx"],"sourcesContent":["import { mergeProps } from \"@base-ui/react/merge-props\";\nimport { useRender } from \"@base-ui/react/use-render\";\nimport { getProviderEntry, type ProviderName } from \"@pipe0/base\";\nimport { cva, type VariantProps } from \"class-variance-authority\";\nimport { type CSSProperties, forwardRef } from \"react\";\nimport { cn } from \"../lib/utils.js\";\n\nconst avatarGroupVariants = cva(\"pz:relative pz:inline-flex pz:items-center\", {\n variants: {\n size: {\n sm: \"\",\n base: \"\",\n md: \"\",\n lg: \"\",\n },\n },\n defaultVariants: { size: \"md\" },\n});\n\nconst tileSize = {\n sm: \"pz:h-5 pz:w-5\",\n base: \"pz:h-6 pz:w-6\",\n md: \"pz:h-8 pz:w-8\",\n lg: \"pz:h-12 pz:w-12\",\n} as const;\n\n// As large as the tile allows: the tile is the footprint, so a bigger logo\n// costs no space around it — only a hair of padding is kept for the edge.\nconst tileLogoSize = {\n sm: \"pz:size-[14px]\",\n base: \"pz:size-[18px]\",\n md: \"pz:size-[22px]\",\n lg: \"pz:size-8\",\n} as const;\n\nconst tileRadius = {\n sm: \"pz:rounded-[6px]\",\n base: \"pz:rounded-[7px]\",\n md: \"pz:rounded-[9px]\",\n lg: \"pz:rounded-[12px]\",\n} as const;\n\n// ~22% overlap: each card sits under the one before it, and its centred logo\n// must stay clear of that edge.\nconst tileOverlap = {\n sm: \"pz:-ml-1\",\n base: \"pz:-ml-[5px]\",\n md: \"pz:-ml-1.5\",\n lg: \"pz:-ml-2.5\",\n} as const;\n\n/* Stacked tiles fan apart when the group is hovered (marker: group/p0ag). */\nconst tileSpread = {\n sm: \"pz:group-hover/p0ag:ml-0.5\",\n base: \"pz:group-hover/p0ag:ml-0.5\",\n md: \"pz:group-hover/p0ag:ml-0.5\",\n lg: \"pz:group-hover/p0ag:ml-1\",\n} as const;\n\n/* A physical card in the outline button's material (`p0-glass` in the dash):\n see `TileSurface` for the face and edge. Here: a soft drop shadow and a\n 1.5px separation ring in the host background so cards read as separate\n where they overlap. */\nconst tileShadow = [\n \"0 1px 2px rgba(14,17,23,.10)\",\n \"0 1px 1px rgba(14,17,23,.04)\",\n \"0 0 0 1.5px var(--background, var(--pz-color-background, #fff))\",\n].join(\", \");\n\nconst overflowText = {\n sm: \"pz:text-[9.5px]\",\n base: \"pz:text-[10.5px]\",\n md: \"pz:text-xs\",\n lg: \"pz:text-sm\",\n} as const;\n\nconst DEFAULT_MAX_TILES = 4;\n\nexport interface AvatarGroupState {\n overflows: boolean;\n remaining: number;\n}\n\nexport interface AvatarGroupProps\n extends VariantProps<typeof avatarGroupVariants>,\n useRender.ComponentProps<\"div\", AvatarGroupState> {\n providers: readonly ProviderName[];\n /** Maximum tile slots before the overflow indicator. Default 4. */\n max?: number;\n /** Show the +N overflow tile when providers exceed `max`. Default true. */\n showCount?: boolean;\n /**\n * - `stack` (default): every provider's tile side by side, then \"+N\".\n * - `deck`: only the first provider's tile, with up to two blank cards\n * peeking out behind it on the same horizontal line — \"this runs on\n * several providers\" in a fraction of the width. For dense chrome (column\n * headers) where the label matters more than the provider list.\n */\n variant?: \"stack\" | \"deck\";\n}\n\n/**\n * Horizontal stack of provider cards: each a tinted tile with the provider's\n * logo, a same-hue hairline and a soft shadow. All cards share one size and\n * one axis; each sits under the one before it, so the group reads as a stack.\n * Defaults to a maximum of 4 tiles, then a \"+N\" overflow tile.\n *\n * Pure visual — no popover. For a hover-card with cost-per-provider, see\n * `<CatalogProviderAvatars>`.\n */\nexport const AvatarGroup = forwardRef<HTMLDivElement, AvatarGroupProps>(function AvatarGroup(\n {\n providers,\n size,\n max = DEFAULT_MAX_TILES,\n showCount = true,\n variant = \"stack\",\n className,\n render,\n ...rest\n },\n ref,\n) {\n const sizeKey = size ?? \"md\";\n const isDeck = variant === \"deck\";\n const overflows = providers.length > max;\n const renderOverflow = overflows && showCount;\n const visibleSlots = renderOverflow ? max - 1 : max;\n const shown = providers.slice(0, visibleSlots);\n const remaining = providers.length - shown.length;\n\n const element = useRender({\n ref,\n defaultTagName: \"div\",\n render,\n state: { overflows, remaining },\n props: mergeProps<\"div\">(\n {\n className: cn(\"pz:group/p0ag\", avatarGroupVariants({ size }), className),\n children: isDeck ? (\n <Deck providers={providers} size={sizeKey} />\n ) : (\n <>\n {shown.map((provider, i) => (\n <ProviderTile\n key={provider}\n provider={provider}\n size={sizeKey}\n index={i}\n count={shown.length + (renderOverflow ? 1 : 0)}\n />\n ))}\n {renderOverflow ? (\n <OverflowTile size={sizeKey} count={remaining} index={shown.length} />\n ) : null}\n </>\n ),\n ...({ \"data-p0\": \"avatar-group\", \"data-variant\": variant } as Record<string, string>),\n ...(isDeck\n ? {\n title: providers.map((p) => getProviderEntry(p)?.label ?? p).join(\", \"),\n }\n : {}),\n },\n rest as Record<string, unknown>,\n ),\n });\n\n if (!providers.length) return null;\n return element;\n});\n\n/* Deck: one step larger than the stack at the same size key — it holds a\n single logo, so the footprint goes to the logo instead of to more tiles. */\nconst deckTileSize = {\n sm: \"pz:size-[22px]\",\n base: \"pz:size-[26px]\",\n md: \"pz:size-9\",\n lg: \"pz:size-14\",\n} as const;\nconst deckLogoSize = {\n sm: \"pz:size-4\",\n base: \"pz:size-5\",\n md: \"pz:size-6\",\n lg: \"pz:size-9\",\n} as const;\nconst deckRadius = {\n sm: \"pz:rounded-[6.5px]\",\n base: \"pz:rounded-[7.5px]\",\n md: \"pz:rounded-[10px]\",\n lg: \"pz:rounded-[14px]\",\n} as const;\n/** Each card behind is the front card's size in px, for the fan geometry. */\nconst DECK_TILE_PX = { sm: 22, base: 26, md: 36, lg: 56 } as const;\n/* A fanned hand, not a sideways slide: each card behind turns a further 6°\n around its bottom edge and shifts right by 16% of its width, so it peeks\n out at the top-right and the bottom-right. Flat copies slid along one axis\n read as grey slabs at header size; the turn is what reads as a stack. */\nconst DECK_TURN_DEG = 6;\nconst DECK_SHIFT = 0.16;\nconst DECK_MAX_BEHIND = 2;\n/** Room the fan needs to the right of the front card, as a share of its width. */\nconst DECK_OVERHANG = 0.2;\n/* Cool greys, lighter toward the front, with a hairline — blank cards that\n recede behind the logo card instead of competing with it. */\nconst deckCardLight = [\"#F4F4F8\", \"#ECECF2\"] as const;\nconst deckCardDark = [\"#2A2A2F\", \"#303036\"] as const;\n/* The stack's separation ring would cut a gap into the fan; the front card\n only needs its drop shadow here. */\nconst deckFrontShadow = [\"0 1px 2px rgba(14,17,23,.10)\", \"0 1px 1px rgba(14,17,23,.04)\"].join(\", \");\n\n/**\n * The front card is the first provider; behind it, one blank card per further\n * provider (at most two), same size, fanned out to the right.\n */\nfunction Deck({\n providers,\n size,\n}: {\n providers: readonly ProviderName[];\n size: \"sm\" | \"base\" | \"md\" | \"lg\";\n}) {\n const behind = Math.min(providers.length - 1, DECK_MAX_BEHIND);\n const entry = getProviderEntry(providers[0]!);\n const px = DECK_TILE_PX[size];\n return (\n <div\n className=\"pz:relative pz:flex pz:shrink-0\"\n style={{ paddingRight: behind * px * DECK_OVERHANG }}\n >\n {Array.from({ length: behind }, (_, i) => {\n const depth = i + 1;\n const shade = depth - 1;\n return (\n <div\n key={depth}\n aria-hidden=\"true\"\n data-p0=\"avatar-group-deck-card\"\n className={cn(\"pz:absolute pz:top-0 pz:left-0\", deckTileSize[size])}\n style={{\n zIndex: DECK_MAX_BEHIND - depth,\n transform: `translateX(${depth * DECK_SHIFT * px}px) rotate(${depth * DECK_TURN_DEG}deg)`,\n transformOrigin: \"50% 100%\",\n }}\n >\n <div\n className={cn(\"pz:absolute pz:inset-0 pz:dark:hidden\", deckRadius[size])}\n style={{\n backgroundColor: deckCardLight[shade],\n boxShadow: \"inset 0 0 0 1px rgba(30,30,60,.13), 0 1px 2px rgba(14,17,23,.06)\",\n }}\n />\n <div\n className={cn(\"pz:absolute pz:inset-0 pz:hidden pz:dark:block\", deckRadius[size])}\n style={{\n backgroundColor: deckCardDark[shade],\n boxShadow: \"inset 0 0 0 1px rgba(255,255,255,.14), 0 1px 2px rgba(0,0,0,.3)\",\n }}\n />\n </div>\n );\n })}\n <div\n data-p0=\"avatar-group-tile\"\n className={cn(tileBase, deckTileSize[size], deckRadius[size])}\n // A lone card is not a stack: nothing to lift it off, so no shadow.\n style={{ boxShadow: behind > 0 ? deckFrontShadow : undefined, zIndex: DECK_MAX_BEHIND + 1 }}\n >\n <TileSurface\n light={entry?.background?.light}\n dark={entry?.background?.dark}\n radius={deckRadius[size]}\n />\n {entry?.logoUrl ? (\n <img\n src={entry.logoUrl}\n alt={entry.label ?? providers[0]}\n className={cn(\n \"pz:relative pz:object-contain\",\n entry.invertLogoInDark && invertInDark,\n deckLogoSize[size],\n )}\n />\n ) : null}\n </div>\n </div>\n );\n}\n\n/* Flips a dark glyph's lightness on the dark card; the hue rotation undoes the\n hue shift invert causes, so a dark green logo turns light green, not pink. */\nconst invertInDark = \"pz:dark:invert pz:dark:hue-rotate-180\";\n\nconst tileBase =\n \"pz:relative pz:flex pz:items-center pz:justify-center pz:shrink-0 pz:transition-[margin-left] pz:duration-200 pz:ease-out\";\n\nfunction ProviderTile({\n provider,\n size,\n index,\n count,\n}: {\n provider: ProviderName;\n size: \"sm\" | \"base\" | \"md\" | \"lg\";\n index: number;\n count: number;\n}) {\n const entry = getProviderEntry(provider);\n const bg = entry?.background;\n return (\n <div\n data-p0=\"avatar-group-tile\"\n className={cn(\n tileBase,\n tileSize[size],\n tileRadius[size],\n index === 0 ? undefined : [tileOverlap[size], tileSpread[size]],\n )}\n style={\n {\n // The shadow and separation ring exist for overlap; a lone tile\n // (count 1 — a single provider) sits flat on the surface.\n boxShadow: count > 1 ? tileShadow : undefined,\n zIndex: count - index,\n } as CSSProperties\n }\n title={entry?.label ?? provider}\n >\n <TileSurface light={bg?.light} dark={bg?.dark} radius={tileRadius[size]} />\n {entry?.logoUrl ? (\n <img\n src={entry.logoUrl}\n alt={entry.label ?? provider}\n className={cn(\n \"pz:relative pz:object-contain\",\n entry.invertLogoInDark && invertInDark,\n tileLogoSize[size],\n )}\n />\n ) : null}\n </div>\n );\n}\n\n/** The card face: a white card (dark: neutral), or the provider's own logo\n background, in the outline button's material, per colour scheme. */\nfunction TileSurface({\n light = \"#FFFFFF\",\n dark = \"#1F1F23\",\n radius,\n}: {\n light?: string;\n dark?: string;\n radius: string;\n}) {\n // The outline button's material: a 1px border that darkens toward the\n // bottom edge (light catches the top), a faint vertical shade on the face,\n // and a highlight along the top inner edge.\n return (\n <>\n <div\n aria-hidden=\"true\"\n className={cn(\"pz:absolute pz:inset-0 pz:box-border pz:dark:hidden\", radius)}\n style={\n {\n border: \"1px solid transparent\",\n background: [\n `linear-gradient(180deg, ${light}, color-mix(in srgb, ${light}, #0e1117 2%)) padding-box`,\n \"linear-gradient(180deg, rgba(14,17,23,.10), rgba(14,17,23,.24)) border-box\",\n ].join(\", \"),\n boxShadow: \"inset 0 1px 0 rgba(255,255,255,.6)\",\n } as CSSProperties\n }\n />\n <div\n aria-hidden=\"true\"\n className={cn(\"pz:absolute pz:inset-0 pz:box-border pz:hidden pz:dark:block\", radius)}\n style={\n {\n border: \"1px solid transparent\",\n background: [\n `linear-gradient(180deg, color-mix(in srgb, ${dark}, #ffffff 5%), ${dark}) padding-box`,\n \"linear-gradient(180deg, rgba(255,255,255,.22), rgba(255,255,255,.09)) border-box\",\n ].join(\", \"),\n boxShadow: \"inset 0 1px 0 rgba(255,255,255,.1)\",\n } as CSSProperties\n }\n />\n </>\n );\n}\n\nfunction OverflowTile({\n size,\n count,\n index,\n}: {\n size: \"sm\" | \"base\" | \"md\" | \"lg\";\n count: number;\n index: number;\n}) {\n return (\n <div\n data-p0=\"avatar-group-overflow\"\n className={cn(\n tileBase,\n tileSize[size],\n tileRadius[size],\n \"pz:font-semibold pz:tabular-nums pz:text-muted-foreground\",\n overflowText[size],\n index === 0 ? undefined : [tileOverlap[size], tileSpread[size]],\n )}\n style={{\n boxShadow: tileShadow,\n zIndex: 0,\n }}\n >\n <TileSurface radius={tileRadius[size]} />\n <span className=\"pz:relative\">+{count}</span>\n </div>\n );\n}\n\nexport { avatarGroupVariants, tileSize as avatarSize };\n"],"mappings":";;;;;;;;;AAOA,MAAM,sBAAsB,IAAI,8CAA8C;CAC5E,UAAU,EACR,MAAM;EACJ,IAAI;EACJ,MAAM;EACN,IAAI;EACJ,IAAI;EACL,EACF;CACD,iBAAiB,EAAE,MAAM,MAAM;CAChC,CAAC;AAEF,MAAM,WAAW;CACf,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAID,MAAM,eAAe;CACnB,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAED,MAAM,aAAa;CACjB,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAID,MAAM,cAAc;CAClB,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAGD,MAAM,aAAa;CACjB,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAMD,MAAM,aAAa;CACjB;CACA;CACA;CACD,CAAC,KAAK,KAAK;AAEZ,MAAM,eAAe;CACnB,IAAI;CACJ,MAAM;CACN,IAAI;CACJ,IAAI;CACL;AAED,MAAM,oBAAoB;;;;;;;;;;AAkC1B,MAAa,cAAc,WAA6C,SAAS,YAC/E,EACE,WACA,MACA,MAAM,mBACN,YAAY,MACZ,UAAU,SACV,WACA,QACA,GAAG,QAEL,KACA;CACA,MAAM,UAAU,QAAQ;CACxB,MAAM,SAAS,YAAY;CAC3B,MAAM,YAAY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AAU,IAAI,SAAY,CAAC,YAAY,OAAO,WAAW,MAAM,CAChE;EACD,OAAO;GACL,WAAW;GACX,QAAQ;GACT;YAbH,CAeE,oBAAC,aAAD,EAAa,QAAQ,WAAW,OAAS,GACzC,qBAAC,QAAD;GAAM,WAAU;aAAhB,CAA8B,KAAE,MAAa;KACzC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-type-badge.d.mts","names":[],"sources":["../../src/widgets/field-type-badge.tsx"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"field-type-badge.d.mts","names":[],"sources":["../../src/widgets/field-type-badge.tsx"],"mappings":";;;iBAkBgB,cAAA,CAAA;EAAiB,IAAA;EAAM;AAAA;EAAY,IAAA;EAAc,MAAA;AAAA,IAAiB,oBAAA,CAAA,GAAA,CAAA,OAAA"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import { Braces, CircleHelp, Hash, ToggleLeft, Type } from "../components/internal/icons.mjs";
|
|
1
2
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { Braces, CircleHelp, Hash, ToggleLeft, Type } from "lucide-react";
|
|
3
3
|
|
|
4
4
|
//#region src/widgets/field-type-badge.tsx
|
|
5
5
|
const ICON_BY_TYPE = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"field-type-badge.mjs","names":[],"sources":["../../src/widgets/field-type-badge.tsx"],"sourcesContent":["import {
|
|
1
|
+
{"version":3,"file":"field-type-badge.mjs","names":[],"sources":["../../src/widgets/field-type-badge.tsx"],"sourcesContent":["import {\n Braces,\n CircleHelp,\n Hash,\n type Icon,\n ToggleLeft,\n Type,\n} from \"../components/internal/icons.js\";\n\n// Pictograms for the canonical `RecordFieldType` values. `unknown` and\n// anything unmapped fall back to a question-mark glyph.\nconst ICON_BY_TYPE: Record<string, Icon> = {\n string: Type,\n number: Hash,\n boolean: ToggleLeft,\n json: Braces,\n};\n\nexport function FieldTypeBadge({ type, format }: { type: string; format?: string }) {\n const Icon = ICON_BY_TYPE[type] ?? CircleHelp;\n const title = format ? `${type}:${format}` : type;\n return (\n <span\n title={title}\n aria-label={title}\n className=\"pz:inline-flex pz:items-center pz:gap-1 pz:text-xs pz:text-muted-foreground\"\n >\n <Icon className=\"pz:size-3.5\" strokeWidth={1.5} />\n {format ? <span className=\"pz:font-mono\">{format}</span> : null}\n </span>\n );\n}\n"],"mappings":";;;;AAWA,MAAM,eAAqC;CACzC,QAAQ;CACR,QAAQ;CACR,SAAS;CACT,MAAM;CACP;AAED,SAAgB,eAAe,EAAE,MAAM,UAA6C;CAClF,MAAM,OAAO,aAAa,SAAS;CACnC,MAAM,QAAQ,SAAS,GAAG,KAAK,GAAG,WAAW;AAC7C,QACE,qBAAC,QAAD;EACS;EACP,cAAY;EACZ,WAAU;YAHZ,CAKE,oBAAC,MAAD;GAAM,WAAU;GAAc,aAAa;GAAO,GACjD,SAAS,oBAAC,QAAD;GAAM,WAAU;aAAgB;GAAc,IAAG,KACtD"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Activity, Award, Banknote, BarChart3, BookOpen, Boxes, Braces, Brain, Briefcase, BriefcaseBusiness, Building2, Calendar, Code2, Compass, Contact, Download, Factory, Filter, GraduationCap, Handshake, History, Languages, LetterText, Library, Linkedin, List, Mail, MapPin, Medal, Plug, Search, Shuffle, Sigma, SlidersHorizontal, Sparkles, Star, Swords, Tags, Type, Upload, User, Workflow, Zap } from "../components/internal/icons.mjs";
|
|
2
2
|
import { jsx } from "react/jsx-runtime";
|
|
3
|
-
import { Activity, Award, Banknote, BarChart3, BookOpen, Boxes, Braces, Brain, Briefcase, BriefcaseBusiness, Building2, Calendar, Code2, Compass, Contact, Download, Factory, Filter, GraduationCap, Handshake, History, Languages, LetterText, Library, List, Mail, MapPin, Medal, Plug, Search, Shuffle, Sigma, SlidersHorizontal, Sparkles, Star, Swords, Tags, Type, Upload, User, Workflow, Zap } from "lucide-react";
|
|
4
3
|
|
|
5
4
|
//#region src/widgets/icon-glyph.tsx
|
|
6
5
|
const iconMap = {
|
|
@@ -18,7 +17,7 @@ const iconMap = {
|
|
|
18
17
|
plug: Plug,
|
|
19
18
|
mix: Shuffle,
|
|
20
19
|
job: BriefcaseBusiness,
|
|
21
|
-
linkedin:
|
|
20
|
+
linkedin: Linkedin,
|
|
22
21
|
text: Type,
|
|
23
22
|
workflow: Workflow,
|
|
24
23
|
letter: LetterText,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"icon-glyph.mjs","names":[],"sources":["../../src/widgets/icon-glyph.tsx"],"sourcesContent":["import type { IconKey } from \"@pipe0/base\";\nimport {\n Activity,\n Award,\n Banknote,\n BarChart3,\n BookOpen,\n Boxes,\n Braces,\n Brain,\n Briefcase,\n BriefcaseBusiness,\n Building2,\n Calendar,\n Code2,\n Compass,\n Contact,\n Download,\n Factory,\n Filter,\n GraduationCap,\n Handshake,\n History,\n Languages,\n LetterText,\n Library,\n List,\n Mail,\n MapPin,\n Medal,\n Plug,\n Search,\n Shuffle,\n Sigma,\n SlidersHorizontal,\n Sparkles,\n Star,\n Swords,\n Tags,\n Type,\n Upload,\n User,\n Workflow,\n Zap,\n} from \"
|
|
1
|
+
{"version":3,"file":"icon-glyph.mjs","names":[],"sources":["../../src/widgets/icon-glyph.tsx"],"sourcesContent":["import type { IconKey } from \"@pipe0/base\";\nimport type { ComponentType } from \"react\";\nimport {\n Activity,\n Award,\n Banknote,\n BarChart3,\n BookOpen,\n Boxes,\n Braces,\n Brain,\n Briefcase,\n BriefcaseBusiness,\n Building2,\n Calendar,\n Code2,\n Compass,\n Contact,\n Download,\n Factory,\n Filter,\n GraduationCap,\n Handshake,\n History,\n Languages,\n LetterText,\n Library,\n Linkedin,\n List,\n Mail,\n MapPin,\n Medal,\n Plug,\n Search,\n Shuffle,\n Sigma,\n SlidersHorizontal,\n Sparkles,\n Star,\n Swords,\n Tags,\n Type,\n Upload,\n User,\n Workflow,\n Zap,\n} from \"../components/internal/icons.js\";\n\nconst iconMap: Record<IconKey, ComponentType<{ className?: string; size?: number }>> = {\n school: GraduationCap,\n user: User,\n location: MapPin,\n language: Languages,\n brain: Brain,\n book: BookOpen,\n money: Banknote,\n office: Building2,\n search: Search,\n output: Upload,\n input: Download,\n plug: Plug,\n mix: Shuffle,\n job: BriefcaseBusiness,\n linkedin: Linkedin,\n text: Type,\n workflow: Workflow,\n letter: LetterText,\n source: Sigma,\n web: Compass,\n activity: Activity,\n boxes: Boxes,\n competition: Swords,\n bill: Banknote,\n bolt: Zap,\n star: Star,\n scholar: Library,\n // expanded set\n briefcase: Briefcase,\n history: History,\n sparkles: Sparkles,\n list: List,\n sliders: SlidersHorizontal,\n factory: Factory,\n award: Award,\n tags: Tags,\n handshake: Handshake,\n contact: Contact,\n mail: Mail,\n calendar: Calendar,\n chart: BarChart3,\n code: Code2,\n braces: Braces,\n filter: Filter,\n};\n\nexport function IconGlyph({\n keyName,\n className,\n size,\n}: {\n keyName: IconKey;\n className?: string;\n size?: number;\n}) {\n const Icon = iconMap[keyName] ?? Medal;\n return <Icon className={className} size={size} />;\n}\n"],"mappings":";;;;AAgDA,MAAM,UAAiF;CACrF,QAAQ;CACR,MAAM;CACN,UAAU;CACV,UAAU;CACV,OAAO;CACP,MAAM;CACN,OAAO;CACP,QAAQ;CACR,QAAQ;CACR,QAAQ;CACR,OAAO;CACP,MAAM;CACN,KAAK;CACL,KAAK;CACL,UAAU;CACV,MAAM;CACN,UAAU;CACV,QAAQ;CACR,QAAQ;CACR,KAAK;CACL,UAAU;CACV,OAAO;CACP,aAAa;CACb,MAAM;CACN,MAAM;CACN,MAAM;CACN,SAAS;CAET,WAAW;CACX,SAAS;CACT,UAAU;CACV,MAAM;CACN,SAAS;CACT,SAAS;CACT,OAAO;CACP,MAAM;CACN,WAAW;CACX,SAAS;CACT,MAAM;CACN,UAAU;CACV,OAAO;CACP,MAAM;CACN,QAAQ;CACR,QAAQ;CACT;AAED,SAAgB,UAAU,EACxB,SACA,WACA,QAKC;AAED,QAAO,oBADM,QAAQ,YAAY,OAC1B;EAAiB;EAAiB;EAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Tooltip, TooltipContent, TooltipTrigger } from "../components/ui/tooltip.mjs";
|
|
2
|
+
import { Coins } from "../components/internal/icons.mjs";
|
|
2
3
|
import { jsx, jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { Coins } from "lucide-react";
|
|
4
4
|
|
|
5
5
|
//#region src/widgets/token-pricing-badge.tsx
|
|
6
6
|
/** Trim floating-point noise to a few significant figures for display. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"token-pricing-badge.mjs","names":[],"sources":["../../src/widgets/token-pricing-badge.tsx"],"sourcesContent":["import { Coins } from \"
|
|
1
|
+
{"version":3,"file":"token-pricing-badge.mjs","names":[],"sources":["../../src/widgets/token-pricing-badge.tsx"],"sourcesContent":["import { Coins } from \"../components/internal/icons.js\";\nimport { Tooltip, TooltipContent, TooltipTrigger } from \"../components/ui/tooltip\";\n\n/** Trim floating-point noise to a few significant figures for display. */\nfunction fmt(n: number): number {\n return Number(n.toPrecision(3));\n}\n\n/**\n * Usage-based pricing badge for the LLM model picker. Inline it just reads\n * \"Usage-based\"; the absolute per-billing-block (per `blockSize` tokens) input\n * and output credit rates appear on hover.\n */\nexport function TokenPricingBadge({\n inputPerBlock,\n outputPerBlock,\n blockSize,\n}: {\n inputPerBlock: number;\n outputPerBlock: number;\n blockSize: number;\n}) {\n return (\n <Tooltip>\n <TooltipTrigger\n render={\n <span className=\"pz:inline-flex pz:items-center pz:gap-1 pz:text-xs pz:text-muted-foreground pz:cursor-help pz:whitespace-nowrap\">\n <Coins className=\"pz:size-3\" />\n Usage\n </span>\n }\n />\n <TooltipContent side=\"top\" align=\"center\">\n <div className=\"pz:text-xs pz:leading-snug pz:flex pz:flex-col pz:gap-0.5\">\n <span className=\"pz:inline-flex pz:items-center pz:gap-1 pz:tabular-nums\">\n {fmt(inputPerBlock)} <Coins className=\"pz:size-3\" /> / {blockSize} input tokens\n </span>\n <span className=\"pz:inline-flex pz:items-center pz:gap-1 pz:tabular-nums\">\n {fmt(outputPerBlock)} <Coins className=\"pz:size-3\" /> / {blockSize} output tokens\n </span>\n <span className=\"pz:text-muted-foreground pz:mt-1\"></span>\n </div>\n </TooltipContent>\n </Tooltip>\n );\n}\n"],"mappings":";;;;;;AAIA,SAAS,IAAI,GAAmB;AAC9B,QAAO,OAAO,EAAE,YAAY,EAAE,CAAC;;;;;;;AAQjC,SAAgB,kBAAkB,EAChC,eACA,gBACA,aAKC;AACD,QACE,qBAAC,SAAD,aACE,oBAAC,gBAAD,EACE,QACE,qBAAC,QAAD;EAAM,WAAU;YAAhB,CACE,oBAAC,OAAD,EAAO,WAAU,aAAc,WAE1B;KAET,GACF,oBAAC,gBAAD;EAAgB,MAAK;EAAM,OAAM;YAC/B,qBAAC,OAAD;GAAK,WAAU;aAAf;IACE,qBAAC,QAAD;KAAM,WAAU;eAAhB;MACG,IAAI,cAAc;MAAC;MAAC,oBAAC,OAAD,EAAO,WAAU,aAAc;;MAAI;MAAU;MAC7D;;IACP,qBAAC,QAAD;KAAM,WAAU;eAAhB;MACG,IAAI,eAAe;MAAC;MAAC,oBAAC,OAAD,EAAO,WAAU,aAAc;;MAAI;MAAU;MAC9D;;IACP,oBAAC,QAAD,EAAM,WAAU,oCAA0C;IACtD;;EACS,EACT"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipe0/react",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.39",
|
|
4
4
|
"description": "React component library for building forms and catalogs powered by pipe0 pipes and searches.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "pipe0",
|
|
@@ -69,6 +69,8 @@
|
|
|
69
69
|
"@dnd-kit/utilities": "^3.2.2",
|
|
70
70
|
"@floating-ui/react": "^0.27.0",
|
|
71
71
|
"@hookform/resolvers": "^5.2.1",
|
|
72
|
+
"@hugeicons/core-free-icons": "^4.3.5",
|
|
73
|
+
"@hugeicons/react": "^1.1.10",
|
|
72
74
|
"@radix-ui/react-slot": "^1.2.2",
|
|
73
75
|
"@tanstack/match-sorter-utils": "^8.19.4",
|
|
74
76
|
"@tanstack/react-table": "^9.2.4",
|
|
@@ -81,11 +83,10 @@
|
|
|
81
83
|
"clsx": "^2.1.1",
|
|
82
84
|
"cmdk": "^1.1.1",
|
|
83
85
|
"jsonata": "^2.1.0",
|
|
84
|
-
"lucide-react": "^1.33.0",
|
|
85
86
|
"react-hook-form": "^7.62.0",
|
|
86
87
|
"swr": "^2.4.1",
|
|
87
88
|
"tailwind-merge": "^3.3.1",
|
|
88
|
-
"@pipe0/base": "1.0.
|
|
89
|
+
"@pipe0/base": "1.0.39"
|
|
89
90
|
},
|
|
90
91
|
"devDependencies": {
|
|
91
92
|
"@base-ui/react": "^1.6.0",
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { jsx } from "react/jsx-runtime";
|
|
2
|
-
|
|
3
|
-
//#region src/widgets/glyphs/linkedin.tsx
|
|
4
|
-
/**
|
|
5
|
-
* The LinkedIn mark.
|
|
6
|
-
*
|
|
7
|
-
* Carried here because lucide REMOVED every brand icon in v1 — they are
|
|
8
|
-
* trademarks, and lucide chose not to ship them rather than police their use.
|
|
9
|
-
* The dash gets this from `@phosphor-icons/react`, which still does; this
|
|
10
|
-
* package has no icon dependency beyond lucide, so adding one for a single
|
|
11
|
-
* glyph would cost more than the glyph.
|
|
12
|
-
*
|
|
13
|
-
* Sized and stroked like the lucide icons around it in `iconGlyphs`, so it does
|
|
14
|
-
* not stand out as the one that came from somewhere else. Filled rather than
|
|
15
|
-
* stroked because that is how the mark is drawn.
|
|
16
|
-
*/
|
|
17
|
-
function LinkedinGlyph({ size = 24, ...props }) {
|
|
18
|
-
return /* @__PURE__ */ jsx("svg", {
|
|
19
|
-
xmlns: "http://www.w3.org/2000/svg",
|
|
20
|
-
width: size,
|
|
21
|
-
height: size,
|
|
22
|
-
viewBox: "0 0 24 24",
|
|
23
|
-
fill: "currentColor",
|
|
24
|
-
"aria-hidden": "true",
|
|
25
|
-
...props,
|
|
26
|
-
children: /* @__PURE__ */ jsx("path", { d: "M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.13 1.45-2.13 2.94v5.67H9.35V9h3.41v1.56h.05a3.74 3.74 0 0 1 3.37-1.85c3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zm1.78 13.02H3.55V9h3.57v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.72V1.72C24 .77 23.2 0 22.22 0z" })
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
//#endregion
|
|
31
|
-
export { LinkedinGlyph };
|
|
32
|
-
//# sourceMappingURL=linkedin.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"linkedin.mjs","names":[],"sources":["../../../src/widgets/glyphs/linkedin.tsx"],"sourcesContent":["import type { SVGProps } from \"react\";\n\n/**\n * The LinkedIn mark.\n *\n * Carried here because lucide REMOVED every brand icon in v1 — they are\n * trademarks, and lucide chose not to ship them rather than police their use.\n * The dash gets this from `@phosphor-icons/react`, which still does; this\n * package has no icon dependency beyond lucide, so adding one for a single\n * glyph would cost more than the glyph.\n *\n * Sized and stroked like the lucide icons around it in `iconGlyphs`, so it does\n * not stand out as the one that came from somewhere else. Filled rather than\n * stroked because that is how the mark is drawn.\n */\nexport function LinkedinGlyph({\n size = 24,\n ...props\n}: SVGProps<SVGSVGElement> & { size?: number | string }) {\n return (\n <svg\n xmlns=\"http://www.w3.org/2000/svg\"\n width={size}\n height={size}\n viewBox=\"0 0 24 24\"\n fill=\"currentColor\"\n aria-hidden=\"true\"\n {...props}\n >\n <path d=\"M20.45 20.45h-3.56v-5.57c0-1.33-.02-3.04-1.85-3.04-1.85 0-2.13 1.45-2.13 2.94v5.67H9.35V9h3.41v1.56h.05a3.74 3.74 0 0 1 3.37-1.85c3.6 0 4.27 2.37 4.27 5.46v6.28zM5.34 7.43a2.06 2.06 0 1 1 0-4.13 2.06 2.06 0 0 1 0 4.13zm1.78 13.02H3.55V9h3.57v11.45zM22.22 0H1.77C.79 0 0 .77 0 1.72v20.56C0 23.23.79 24 1.77 24h20.45c.98 0 1.78-.77 1.78-1.72V1.72C24 .77 23.2 0 22.22 0z\" />\n </svg>\n );\n}\n"],"mappings":";;;;;;;;;;;;;;;;AAeA,SAAgB,cAAc,EAC5B,OAAO,IACP,GAAG,SACoD;AACvD,QACE,oBAAC,OAAD;EACE,OAAM;EACN,OAAO;EACP,QAAQ;EACR,SAAQ;EACR,MAAK;EACL,eAAY;EACZ,GAAI;YAEJ,oBAAC,QAAD,EAAM,GAAE,mXAAoX;EACxX"}
|