@cntyclub/ui-react 0.3.0 → 0.3.1
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/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/ui/tag.tsx +14 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cntyclub/ui-react",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
4
4
|
"description": "React component library for the Country Club UI Kit — Base UI primitives styled with the Country Club design system (Tailwind CSS v4)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": [
|
|
@@ -114,6 +114,8 @@ const countSize = {
|
|
|
114
114
|
md: "h-[18px] min-w-[18px] text-xs",
|
|
115
115
|
lg: "h-5 min-w-5 text-sm",
|
|
116
116
|
} as const;
|
|
117
|
+
// Gap between an icon child and the label text, matching the root gap per size.
|
|
118
|
+
const labelGap = { sm: "gap-1", md: "gap-1.5", lg: "gap-2" } as const;
|
|
117
119
|
|
|
118
120
|
interface TagProps extends Omit<React.ComponentProps<"span">, "children"> {
|
|
119
121
|
/** Unique value used for selection and removal tracking. */
|
|
@@ -186,7 +188,18 @@ function Tag({
|
|
|
186
188
|
strokeWidth={2.5}
|
|
187
189
|
/>
|
|
188
190
|
)}
|
|
189
|
-
|
|
191
|
+
{/* Flex label wrapper so icon children sit inline beside the text —
|
|
192
|
+
Tailwind preflight makes SVGs display:block, which would otherwise
|
|
193
|
+
stack them above the label. */}
|
|
194
|
+
<span
|
|
195
|
+
className={cn(
|
|
196
|
+
"inline-flex min-w-0 items-center [&_svg]:shrink-0",
|
|
197
|
+
labelGap[size],
|
|
198
|
+
)}
|
|
199
|
+
data-slot="tag-label"
|
|
200
|
+
>
|
|
201
|
+
{children}
|
|
202
|
+
</span>
|
|
190
203
|
{count !== undefined && (
|
|
191
204
|
<span
|
|
192
205
|
className={cn(
|