@brightlocal/ui-components 2.25.0 → 2.26.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/README.md +1 -1
- package/component-meta.json +239 -13
- package/dist/alert.cjs +1 -1
- package/dist/alert.d.ts +23 -9
- package/dist/alert.d.ts.map +1 -1
- package/dist/alert.js +95 -87
- package/dist/data-table.cjs +1 -1
- package/dist/data-table.d.ts +17 -1
- package/dist/data-table.d.ts.map +1 -1
- package/dist/data-table.js +8 -1
- package/dist/link.cjs +1 -1
- package/dist/link.d.ts +6 -5
- package/dist/link.d.ts.map +1 -1
- package/dist/link.js +65 -91
- package/package.json +3 -6
- package/src/components/alert.tsx +68 -33
- package/src/components/data-table.tsx +25 -2
- package/src/components/link.tsx +57 -66
- package/dist/browser-entry.d.ts +0 -19
- package/dist/browser-entry.d.ts.map +0 -1
- package/src/browser-entry.ts +0 -99
- package/src/browser-tokens.css +0 -1
package/README.md
CHANGED
|
@@ -42,7 +42,7 @@ This package includes 69 components and 2 blocks built on Radix UI primitives an
|
|
|
42
42
|
### Navigation Components
|
|
43
43
|
|
|
44
44
|
- **Breadcrumb** - Hierarchical navigation trail
|
|
45
|
-
- **Link** - Styled anchor links with inline, button-styled and icon-only variants
|
|
45
|
+
- **Link** - Styled anchor links with inline, button-styled (incl. primary brand CTA) and icon-only variants
|
|
46
46
|
- **NavigationMenu** - Complex navigation menus
|
|
47
47
|
- **Menubar** - Application menu bars
|
|
48
48
|
- **Pagination** - Page navigation controls
|
package/component-meta.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@brightlocal/ui-components",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.26.0",
|
|
4
4
|
"description": "Machine-readable registry of all components in the BrightLocal Design System",
|
|
5
5
|
"components": [
|
|
6
6
|
{
|
|
@@ -185,7 +185,7 @@
|
|
|
185
185
|
"dataHookRequired": true,
|
|
186
186
|
"variants": {
|
|
187
187
|
"variant": [
|
|
188
|
-
"
|
|
188
|
+
"primary",
|
|
189
189
|
"secondary",
|
|
190
190
|
"destructive",
|
|
191
191
|
"outline"
|
|
@@ -298,7 +298,7 @@
|
|
|
298
298
|
"dataHookRequired": true,
|
|
299
299
|
"variants": {
|
|
300
300
|
"variant": [
|
|
301
|
-
"
|
|
301
|
+
"primary",
|
|
302
302
|
"destructive",
|
|
303
303
|
"outline",
|
|
304
304
|
"secondary",
|
|
@@ -374,6 +374,40 @@
|
|
|
374
374
|
"Enter",
|
|
375
375
|
"Space"
|
|
376
376
|
]
|
|
377
|
+
},
|
|
378
|
+
"figma": {
|
|
379
|
+
"fileKey": "p3krmC8DBUgqpbq6cLzaal",
|
|
380
|
+
"nodes": [
|
|
381
|
+
{
|
|
382
|
+
"nodeId": "37:931",
|
|
383
|
+
"figmaName": "Button",
|
|
384
|
+
"kind": "componentSet",
|
|
385
|
+
"export": "Button",
|
|
386
|
+
"axes": [
|
|
387
|
+
{
|
|
388
|
+
"figma": "Variant",
|
|
389
|
+
"code": "variant"
|
|
390
|
+
},
|
|
391
|
+
{
|
|
392
|
+
"figma": "Size",
|
|
393
|
+
"code": "size",
|
|
394
|
+
"valueToProp": {
|
|
395
|
+
"icon": "iconOnly"
|
|
396
|
+
}
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"figma": "State",
|
|
400
|
+
"exempt": "interaction-state",
|
|
401
|
+
"valueToProp": {
|
|
402
|
+
"Loading": "loading",
|
|
403
|
+
"Disabled": "disabled"
|
|
404
|
+
}
|
|
405
|
+
}
|
|
406
|
+
]
|
|
407
|
+
}
|
|
408
|
+
],
|
|
409
|
+
"unmappedExports": [],
|
|
410
|
+
"figmaOnly": []
|
|
377
411
|
}
|
|
378
412
|
},
|
|
379
413
|
{
|
|
@@ -488,6 +522,91 @@
|
|
|
488
522
|
"role": "region",
|
|
489
523
|
"requiresLabel": false,
|
|
490
524
|
"keyboardInteraction": []
|
|
525
|
+
},
|
|
526
|
+
"figma": {
|
|
527
|
+
"fileKey": "p3krmC8DBUgqpbq6cLzaal",
|
|
528
|
+
"nodes": [
|
|
529
|
+
{
|
|
530
|
+
"nodeId": "22519:1849",
|
|
531
|
+
"figmaName": "Card",
|
|
532
|
+
"kind": "componentSet",
|
|
533
|
+
"export": "Card",
|
|
534
|
+
"axes": [
|
|
535
|
+
{
|
|
536
|
+
"figma": "Variant",
|
|
537
|
+
"code": "variant"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
"figma": "Density",
|
|
541
|
+
"code": "density"
|
|
542
|
+
}
|
|
543
|
+
]
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
"nodeId": "29376:4497",
|
|
547
|
+
"figmaName": "Card Header",
|
|
548
|
+
"kind": "componentSet",
|
|
549
|
+
"export": "CardHeader",
|
|
550
|
+
"axes": [
|
|
551
|
+
{
|
|
552
|
+
"figma": "Align",
|
|
553
|
+
"code": "align",
|
|
554
|
+
"valueAliases": {
|
|
555
|
+
"Default": "left"
|
|
556
|
+
}
|
|
557
|
+
}
|
|
558
|
+
]
|
|
559
|
+
},
|
|
560
|
+
{
|
|
561
|
+
"nodeId": "29027:338",
|
|
562
|
+
"figmaName": "Card Title",
|
|
563
|
+
"kind": "componentSet",
|
|
564
|
+
"export": "CardTitle",
|
|
565
|
+
"axes": [
|
|
566
|
+
{
|
|
567
|
+
"figma": "Font Size",
|
|
568
|
+
"code": "size",
|
|
569
|
+
"note": "CardTitle's size prop is not registered in component-meta variants (sub-part variants are flat on the parent today); watchdog treats a missing registry axis as info, not drift — revisit at rollout with DS-828"
|
|
570
|
+
}
|
|
571
|
+
]
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
"nodeId": "29397:4670",
|
|
575
|
+
"figmaName": "Card Description",
|
|
576
|
+
"kind": "component",
|
|
577
|
+
"export": "CardDescription"
|
|
578
|
+
}
|
|
579
|
+
],
|
|
580
|
+
"unmappedExports": [
|
|
581
|
+
{
|
|
582
|
+
"export": "CardContent",
|
|
583
|
+
"reason": "Represented as BOOLEAN toggle 'Card Content' on the Card set, not a standalone Figma component"
|
|
584
|
+
},
|
|
585
|
+
{
|
|
586
|
+
"export": "CardFooter",
|
|
587
|
+
"reason": "Represented as BOOLEAN toggle 'Card Footer' on the Card set"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
"export": "CardMedia",
|
|
591
|
+
"reason": "Represented as BOOLEAN toggle 'Show Media' on the Card set"
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
"export": "CardAction",
|
|
595
|
+
"reason": "No Figma representation found (2026-08-13) — candidate designer task at rollout"
|
|
596
|
+
}
|
|
597
|
+
],
|
|
598
|
+
"figmaOnly": [
|
|
599
|
+
{
|
|
600
|
+
"nodeId": "17845:14104",
|
|
601
|
+
"figmaName": "Card / Example Content",
|
|
602
|
+
"reason": "Figma demo helper"
|
|
603
|
+
},
|
|
604
|
+
{
|
|
605
|
+
"nodeId": "17845:14105",
|
|
606
|
+
"figmaName": "Card / Example Footer",
|
|
607
|
+
"reason": "Figma demo helper"
|
|
608
|
+
}
|
|
609
|
+
]
|
|
491
610
|
}
|
|
492
611
|
},
|
|
493
612
|
{
|
|
@@ -1153,6 +1272,110 @@
|
|
|
1153
1272
|
"Enter",
|
|
1154
1273
|
"Escape"
|
|
1155
1274
|
]
|
|
1275
|
+
},
|
|
1276
|
+
"figma": {
|
|
1277
|
+
"fileKey": "p3krmC8DBUgqpbq6cLzaal",
|
|
1278
|
+
"nodes": [
|
|
1279
|
+
{
|
|
1280
|
+
"nodeId": "336:5077",
|
|
1281
|
+
"figmaName": "DropdownMenu",
|
|
1282
|
+
"kind": "component",
|
|
1283
|
+
"export": "DropdownMenu",
|
|
1284
|
+
"note": "Figma node is a demo composition; 'Open' (BOOLEAN) and 'Instance' (INSTANCE_SWAP) are composition props, exempt by convention"
|
|
1285
|
+
},
|
|
1286
|
+
{
|
|
1287
|
+
"nodeId": "105:55",
|
|
1288
|
+
"figmaName": "DropdownMenu / Menu",
|
|
1289
|
+
"kind": "component",
|
|
1290
|
+
"export": "DropdownMenuContent"
|
|
1291
|
+
},
|
|
1292
|
+
{
|
|
1293
|
+
"nodeId": "330:8549",
|
|
1294
|
+
"figmaName": "DropdownMenu / Item / Default",
|
|
1295
|
+
"kind": "componentSet",
|
|
1296
|
+
"export": "DropdownMenuItem",
|
|
1297
|
+
"alsoRepresents": [
|
|
1298
|
+
"DropdownMenuCheckboxItem",
|
|
1299
|
+
"DropdownMenuRadioGroup"
|
|
1300
|
+
],
|
|
1301
|
+
"axes": [
|
|
1302
|
+
{
|
|
1303
|
+
"figma": "Variant",
|
|
1304
|
+
"exempt": "export-discriminator",
|
|
1305
|
+
"note": "Default/Checkbox/Radio/Icon select between DropdownMenuItem, DropdownMenuCheckboxItem and DropdownMenuRadioGroup"
|
|
1306
|
+
},
|
|
1307
|
+
{
|
|
1308
|
+
"figma": "State",
|
|
1309
|
+
"exempt": "interaction-state"
|
|
1310
|
+
}
|
|
1311
|
+
]
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"nodeId": "17398:40525",
|
|
1315
|
+
"figmaName": "DropdownMenu / Item / Label",
|
|
1316
|
+
"kind": "componentSet",
|
|
1317
|
+
"export": "DropdownMenuLabel",
|
|
1318
|
+
"axes": [
|
|
1319
|
+
{
|
|
1320
|
+
"figma": "Level",
|
|
1321
|
+
"exempt": "figma-only-style",
|
|
1322
|
+
"note": "Level 1/2 has no code counterpart; candidate code-side gap at rollout"
|
|
1323
|
+
}
|
|
1324
|
+
]
|
|
1325
|
+
},
|
|
1326
|
+
{
|
|
1327
|
+
"nodeId": "91:272",
|
|
1328
|
+
"figmaName": "DropdownMenu / Item / Separator",
|
|
1329
|
+
"kind": "component",
|
|
1330
|
+
"export": "DropdownMenuSeparator"
|
|
1331
|
+
},
|
|
1332
|
+
{
|
|
1333
|
+
"nodeId": "330:24002",
|
|
1334
|
+
"figmaName": "DropdownMenu / Item / SubTrigger",
|
|
1335
|
+
"kind": "componentSet",
|
|
1336
|
+
"export": "DropdownMenuSubTrigger",
|
|
1337
|
+
"axes": [
|
|
1338
|
+
{
|
|
1339
|
+
"figma": "Active",
|
|
1340
|
+
"exempt": "interaction-state"
|
|
1341
|
+
}
|
|
1342
|
+
]
|
|
1343
|
+
}
|
|
1344
|
+
],
|
|
1345
|
+
"unmappedExports": [
|
|
1346
|
+
{
|
|
1347
|
+
"export": "DropdownMenuTrigger",
|
|
1348
|
+
"reason": "Unstyled asChild wrapper in code; Figma shows concrete trigger examples instead (see figmaOnly)"
|
|
1349
|
+
},
|
|
1350
|
+
{
|
|
1351
|
+
"export": "DropdownMenuGroup",
|
|
1352
|
+
"reason": "Structural wrapper with no visual representation in Figma"
|
|
1353
|
+
},
|
|
1354
|
+
{
|
|
1355
|
+
"export": "DropdownMenuShortcut",
|
|
1356
|
+
"reason": "Represented as 'Shortcut Text' TEXT prop on the Item set"
|
|
1357
|
+
},
|
|
1358
|
+
{
|
|
1359
|
+
"export": "DropdownMenuSub",
|
|
1360
|
+
"reason": "Structural wrapper with no visual representation in Figma"
|
|
1361
|
+
},
|
|
1362
|
+
{
|
|
1363
|
+
"export": "DropdownMenuSubContent",
|
|
1364
|
+
"reason": "Composed in Figma from Menu component instances"
|
|
1365
|
+
}
|
|
1366
|
+
],
|
|
1367
|
+
"figmaOnly": [
|
|
1368
|
+
{
|
|
1369
|
+
"nodeId": "17402:8153",
|
|
1370
|
+
"figmaName": "DropdownMenu / Item / User",
|
|
1371
|
+
"reason": "Figma-only composition example"
|
|
1372
|
+
},
|
|
1373
|
+
{
|
|
1374
|
+
"nodeId": "17402:26397",
|
|
1375
|
+
"figmaName": "DropdownMenu Trigger / Avatar",
|
|
1376
|
+
"reason": "Trigger styling example; code Trigger is an unstyled asChild wrapper"
|
|
1377
|
+
}
|
|
1378
|
+
]
|
|
1156
1379
|
}
|
|
1157
1380
|
},
|
|
1158
1381
|
{
|
|
@@ -1428,7 +1651,10 @@
|
|
|
1428
1651
|
"import": "@brightlocal/ui-components/input-password",
|
|
1429
1652
|
"category": "form",
|
|
1430
1653
|
"exports": [
|
|
1431
|
-
"
|
|
1654
|
+
"InputPasswordRoot",
|
|
1655
|
+
"InputPasswordField",
|
|
1656
|
+
"InputPasswordToggle",
|
|
1657
|
+
"InputPasswordStrength"
|
|
1432
1658
|
],
|
|
1433
1659
|
"compound": false,
|
|
1434
1660
|
"dataHookRequired": true,
|
|
@@ -1493,6 +1719,7 @@
|
|
|
1493
1719
|
"variants": {
|
|
1494
1720
|
"variant": [
|
|
1495
1721
|
"inline",
|
|
1722
|
+
"primary",
|
|
1496
1723
|
"filled",
|
|
1497
1724
|
"outline",
|
|
1498
1725
|
"ghost",
|
|
@@ -1505,10 +1732,11 @@
|
|
|
1505
1732
|
"showExternalIcon",
|
|
1506
1733
|
"asChild"
|
|
1507
1734
|
],
|
|
1508
|
-
"description": "Styled hyperlink with inline, button-styled and icon-only variants and external link support",
|
|
1735
|
+
"description": "Styled hyperlink with inline, button-styled (incl. primary brand CTA) and icon-only variants and external link support",
|
|
1509
1736
|
"whenToUse": [
|
|
1510
1737
|
"Inline text links within paragraphs or sentences (inline variant)",
|
|
1511
1738
|
"Navigation to internal or external URLs",
|
|
1739
|
+
"Primary brand CTA that navigates (primary variant — visually identical to Button primary)",
|
|
1512
1740
|
"Button-styled navigation or inline actions that need a button appearance (filled, outline, ghost variants)",
|
|
1513
1741
|
"Icon-only navigation links such as back buttons (icon variant — provide an aria-label)",
|
|
1514
1742
|
"Links inside i18n <Trans> blocks — use Link as a component in the components map"
|
|
@@ -1519,7 +1747,7 @@
|
|
|
1519
1747
|
"alternatives": [
|
|
1520
1748
|
{
|
|
1521
1749
|
"component": "Button",
|
|
1522
|
-
"rule": "Use Button for actions (submit, delete, open). Use a button-styled Link (variant filled/outline/ghost) for navigation that needs a button appearance"
|
|
1750
|
+
"rule": "Use Button for actions (submit, delete, open). Use a button-styled Link (variant primary/filled/outline/ghost) for navigation that needs a button appearance"
|
|
1523
1751
|
}
|
|
1524
1752
|
]
|
|
1525
1753
|
},
|
|
@@ -1713,7 +1941,6 @@
|
|
|
1713
1941
|
"MenubarMenu",
|
|
1714
1942
|
"MenubarTrigger",
|
|
1715
1943
|
"MenubarContent",
|
|
1716
|
-
"MenubarGroup",
|
|
1717
1944
|
"MenubarItem",
|
|
1718
1945
|
"MenubarCheckboxItem",
|
|
1719
1946
|
"MenubarRadioGroup",
|
|
@@ -1873,15 +2100,13 @@
|
|
|
1873
2100
|
"category": "form",
|
|
1874
2101
|
"exports": [
|
|
1875
2102
|
"RadioGroup",
|
|
1876
|
-
"RadioGroupItem"
|
|
1877
|
-
"RadioGroupLabel",
|
|
1878
|
-
"RadioGroupItemWithLabel"
|
|
2103
|
+
"RadioGroupItem"
|
|
1879
2104
|
],
|
|
1880
2105
|
"compound": true,
|
|
1881
2106
|
"dataHookRequired": true,
|
|
1882
2107
|
"variants": {
|
|
1883
2108
|
"variant": [
|
|
1884
|
-
"
|
|
2109
|
+
"simple",
|
|
1885
2110
|
"box",
|
|
1886
2111
|
"boxIconVertical",
|
|
1887
2112
|
"boxIconHorizontal"
|
|
@@ -2521,7 +2746,7 @@
|
|
|
2521
2746
|
"dataHookRequired": true,
|
|
2522
2747
|
"variants": {
|
|
2523
2748
|
"variant": [
|
|
2524
|
-
"
|
|
2749
|
+
"simple",
|
|
2525
2750
|
"outline"
|
|
2526
2751
|
],
|
|
2527
2752
|
"size": [
|
|
@@ -2797,6 +3022,7 @@
|
|
|
2797
3022
|
"styling": "Prefer semantic color tokens (primary, secondary, muted, etc.). Fall back to Tailwind color utilities (e.g., text-blue-600) when no token fits. Never use raw hex/rgb values.",
|
|
2798
3023
|
"transitions": "Always specify property (transition-colors, transition-opacity). Never use transition-all.",
|
|
2799
3024
|
"focus": "Use focus-visible: prefix. Never use bare focus: prefix.",
|
|
2800
|
-
"icons": "@brightlocal/icons package. Default 16px, no size/strokeWidth override needed."
|
|
3025
|
+
"icons": "@brightlocal/icons package. Default 16px, no size/strokeWidth override needed.",
|
|
3026
|
+
"figmaMapping": "Some components carry an optional figma entry (fileKey + node IDs + axis rules) mapping code exports to the Figma library for the DS-824 drift watchdog (scripts/figma-sync/). Note for DS engineers: this file ships in the public npm tarball, so those Figma file keys and node IDs are public metadata. That is intentional and harmless — Figma permissions still gate all file access — but do not add anything sensitive to figma entries (no tokens, no internal URLs). Rules: docs/figma-sync/conventions.md in the design-system repo."
|
|
2801
3027
|
}
|
|
2802
3028
|
}
|
package/dist/alert.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),g=require("react"),h=require("class-variance-authority"),u=require("@brightlocal/icons"),c=require("@brightlocal/ui-components/lib/utils");function j(t){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(a,r,s.get?s:{enumerable:!0,get:()=>t[r]})}}return a.default=t,Object.freeze(a)}const x=j(g),m=h.cva("relative w-full rounded-lg px-4 py-3 text-sm flex gap-3 items-start",{variants:{variant:{default:"bg-muted text-foreground",success:"bg-success-background text-success-foreground",info:"bg-info-background text-info-foreground",destructive:"bg-destructive text-destructive-foreground",warning:"bg-warning-background text-warning-foreground"}},defaultVariants:{variant:"default"}}),d=x.forwardRef(({className:t,variant:a,...r},s)=>e.jsx("div",{ref:s,className:c.cn(m({variant:a}),t),"data-slot":"alert","data-tracking-el":`alert-${a}`,role:"alert",...r}));d.displayName="Alert";const o=x.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:c.cn("leading-5 font-medium break-words",t),"data-slot":"alert-title",...a}));o.displayName="AlertTitle";const f=x.forwardRef(({className:t,...a},r)=>e.jsx("div",{ref:r,className:c.cn("text-sm leading-5 font-normal [&_p]:leading-5",t),"data-slot":"alert-description",...a}));f.displayName="AlertDescription";function v({title:t,description:a,action:r,className:s,dataHook:l,trackingEl:n,trackingLabel:i}){return e.jsxs(d,{className:c.cn("items-center",s),"data-hook":l,"data-tracking-el":n,"data-tracking-label":i,variant:"success",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[e.jsx(u.CircleCheck,{className:"text-success-foreground shrink-0 translate-y-0.5"}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t&&e.jsx(o,{children:t}),a!=null&&e.jsx(f,{children:a})]})]}),r&&e.jsx("div",{className:"shrink-0 self-center",children:r})]})}function k({title:t,description:a,action:r,className:s,dataHook:l,trackingEl:n,trackingLabel:i}){return e.jsxs(d,{className:c.cn("items-center",s),"data-hook":l,"data-tracking-el":n,"data-tracking-label":i,variant:"info",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[e.jsx(u.Info,{className:"text-info-foreground shrink-0 translate-y-0.5"}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t&&e.jsx(o,{children:t}),a!=null&&e.jsx(f,{children:a})]})]}),r&&e.jsx("div",{className:"shrink-0 self-center",children:r})]})}function N({title:t,description:a,action:r,className:s,dataHook:l,trackingEl:n,trackingLabel:i}){return e.jsxs(d,{className:c.cn("items-center",s),"data-hook":l,"data-tracking-el":n,"data-tracking-label":i,variant:"destructive",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[e.jsx(u.CircleX,{className:"text-destructive-foreground shrink-0 translate-y-0.5"}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t&&e.jsx(o,{children:t}),a!=null&&e.jsx(f,{children:a})]})]}),r&&e.jsx("div",{className:"shrink-0 self-center",children:r})]})}function p({title:t,description:a,action:r,className:s,dataHook:l,trackingEl:n,trackingLabel:i}){return e.jsxs(d,{className:c.cn("items-center",s),"data-hook":l,"data-tracking-el":n,"data-tracking-label":i,variant:"warning",children:[e.jsxs("div",{className:"flex min-w-0 flex-1 items-start gap-3",children:[e.jsx(u.TriangleAlert,{className:"text-warning-foreground shrink-0 translate-y-0.5"}),e.jsxs("div",{className:"flex min-w-0 flex-1 flex-col gap-1",children:[t&&e.jsx(o,{children:t}),a!=null&&e.jsx(f,{children:a})]})]}),r&&e.jsx("div",{className:"shrink-0 self-center",children:r})]})}exports.Alert=d;exports.AlertDescription=f;exports.AlertDestructive=N;exports.AlertInfo=k;exports.AlertSuccess=v;exports.AlertTitle=o;exports.AlertWarning=p;exports.alertVariants=m;
|
package/dist/alert.d.ts
CHANGED
|
@@ -8,15 +8,7 @@ declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDi
|
|
|
8
8
|
} & import('class-variance-authority/types').ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
9
9
|
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
10
10
|
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
11
|
-
interface
|
|
12
|
-
/**
|
|
13
|
-
* Optional title for the alert
|
|
14
|
-
*/
|
|
15
|
-
title?: string;
|
|
16
|
-
/**
|
|
17
|
-
* Description text for the alert (REQUIRED)
|
|
18
|
-
*/
|
|
19
|
-
description: React.ReactNode;
|
|
11
|
+
interface AlertContentBaseProps {
|
|
20
12
|
/**
|
|
21
13
|
* Additional CSS classes
|
|
22
14
|
*/
|
|
@@ -38,6 +30,28 @@ interface AlertContentProps {
|
|
|
38
30
|
*/
|
|
39
31
|
trackingLabel?: string;
|
|
40
32
|
}
|
|
33
|
+
/**
|
|
34
|
+
* At least one of `title` or `description` must be provided.
|
|
35
|
+
*/
|
|
36
|
+
type AlertContentProps = AlertContentBaseProps & ({
|
|
37
|
+
/**
|
|
38
|
+
* Title for the alert
|
|
39
|
+
*/
|
|
40
|
+
title: string;
|
|
41
|
+
/**
|
|
42
|
+
* Optional description text for the alert
|
|
43
|
+
*/
|
|
44
|
+
description?: React.ReactNode;
|
|
45
|
+
} | {
|
|
46
|
+
/**
|
|
47
|
+
* Optional title for the alert
|
|
48
|
+
*/
|
|
49
|
+
title?: string;
|
|
50
|
+
/**
|
|
51
|
+
* Description text for the alert
|
|
52
|
+
*/
|
|
53
|
+
description: React.ReactNode;
|
|
54
|
+
});
|
|
41
55
|
declare function AlertSuccess({ title, description, action, className, dataHook, trackingEl, trackingLabel, }: AlertContentProps): import("react/jsx-runtime").JSX.Element;
|
|
42
56
|
declare function AlertInfo({ title, description, action, className, dataHook, trackingEl, trackingLabel, }: AlertContentProps): import("react/jsx-runtime").JSX.Element;
|
|
43
57
|
declare function AlertDestructive({ title, description, action, className, dataHook, trackingEl, trackingLabel, }: AlertContentProps): import("react/jsx-runtime").JSX.Element;
|
package/dist/alert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,aAAa;;8EAgBlB,CAAC;AAEF,QAAA,MAAM,KAAK;;sHAYT,CAAC;AAGH,QAAA,MAAM,UAAU,6GAUd,CAAC;AAGH,QAAA,MAAM,gBAAgB,6GAUpB,CAAC;AAGH,UAAU,
|
|
1
|
+
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../src/components/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAKlE,QAAA,MAAM,aAAa;;8EAgBlB,CAAC;AAEF,QAAA,MAAM,KAAK;;sHAYT,CAAC;AAGH,QAAA,MAAM,UAAU,6GAUd,CAAC;AAGH,QAAA,MAAM,gBAAgB,6GAUpB,CAAC;AAGH,UAAU,qBAAqB;IAC7B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACzB;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,KAAK,iBAAiB,GAAG,qBAAqB,GAC5C,CACI;IACE;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC/B,GACD;IACE;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,EAAE,KAAK,CAAC,SAAS,CAAC;CAC9B,CACJ,CAAC;AAEJ,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,iBAAiB,2CAqBnB;AAED,iBAAS,SAAS,CAAC,EACjB,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,iBAAiB,2CAqBnB;AAED,iBAAS,gBAAgB,CAAC,EACxB,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,iBAAiB,2CAqBnB;AAED,iBAAS,YAAY,CAAC,EACpB,KAAK,EACL,WAAW,EACX,MAAM,EACN,SAAS,EACT,QAAQ,EACR,UAAU,EACV,aAAa,GACd,EAAE,iBAAiB,2CAqBnB;AAED,OAAO,EACL,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,aAAa,EACb,YAAY,EACZ,SAAS,EACT,gBAAgB,EAChB,YAAY,GACb,CAAC"}
|