@supersoniks/concorde 5.0.1 → 5.0.2

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.
Files changed (50) hide show
  1. package/build-infos.json +1 -1
  2. package/concorde-core.bundle.js +519 -586
  3. package/concorde-core.es.js +3783 -3689
  4. package/dist/concorde-core.bundle.js +519 -586
  5. package/dist/concorde-core.es.js +3783 -3689
  6. package/index.html +2 -2
  7. package/package.json +14 -1
  8. package/src/core/components/ui/_css/rounded.ts +36 -0
  9. package/src/core/components/ui/_css/type.ts +49 -0
  10. package/src/core/components/ui/_i18n/ui-aria-labels.ts +104 -0
  11. package/src/core/components/ui/alert/alert.md +128 -72
  12. package/src/core/components/ui/alert/alert.spec.ts +145 -0
  13. package/src/core/components/ui/alert/alert.ts +86 -91
  14. package/src/core/components/ui/alert-messages/alert-messages.ts +1 -1
  15. package/src/core/components/ui/badge/badge.md +126 -78
  16. package/src/core/components/ui/badge/badge.ts +29 -81
  17. package/src/core/components/ui/button/button.md +1 -0
  18. package/src/core/components/ui/button/button.ts +11 -8
  19. package/src/core/components/ui/card/card-header.ts +7 -2
  20. package/src/core/components/ui/card/card.md +120 -65
  21. package/src/core/components/ui/divider/divider.ts +4 -9
  22. package/src/core/components/ui/form/fieldset/legend-description.ts +1 -1
  23. package/src/core/components/ui/form/fieldset/legend.ts +1 -1
  24. package/src/core/components/ui/form/input/input.md +1 -1
  25. package/src/core/components/ui/form/input/input.ts +19 -15
  26. package/src/core/components/ui/form/textarea/textarea.md +1 -1
  27. package/src/core/components/ui/image/image.md +147 -53
  28. package/src/core/components/ui/image/image.ts +10 -44
  29. package/src/core/components/ui/link/link.md +2 -2
  30. package/src/core/components/ui/link/link.ts +42 -37
  31. package/src/core/components/ui/modal/modal-close.ts +8 -12
  32. package/src/core/components/ui/modal/modal.ts +18 -18
  33. package/src/core/components/ui/pop/pop.md +7 -5
  34. package/src/core/components/ui/pop/pop.ts +78 -38
  35. package/src/core/components/ui/table/table.ts +2 -8
  36. package/src/core/components/ui/toast/dismissed.ts +14 -0
  37. package/src/core/components/ui/toast/toast-item.ts +139 -91
  38. package/src/core/components/ui/toast/toast.ts +4 -7
  39. package/src/core/components/ui/tooltip/tooltip.ts +6 -8
  40. package/src/core/utils/LocationHandler.ts +12 -5
  41. package/src/core/utils/dismissed.ts +22 -0
  42. package/src/core/utils/positioning.spec.ts +28 -0
  43. package/src/core/utils/positioning.ts +19 -0
  44. package/src/docs/_getting-started/concorde-outside.md +3 -3
  45. package/src/docs/code.ts +3 -1
  46. package/src/docs/search/docs-search.json +541 -1
  47. package/src/docs/tailwind/css/tailwind.css +6 -0
  48. package/src/tsconfig.json +422 -383
  49. package/src/tsconfig.tsbuildinfo +1 -1
  50. package/tailwind.config.js +50 -3
@@ -2414,6 +2414,171 @@
2414
2414
  }
2415
2415
  }
2416
2416
  },
2417
+ {
2418
+ "search": "Inline message in the page: title (label), body (text or default slot), icon from status. For HTML or actions, use the slot instead of label / text (plain text only).\n",
2419
+ "files": {
2420
+ "core/components/ui/alert/alert.md": {
2421
+ "title": "Alert",
2422
+ "hashes": {
2423
+ "alert": {
2424
+ "count": 1,
2425
+ "title": "",
2426
+ "type": "paragraph"
2427
+ }
2428
+ }
2429
+ }
2430
+ }
2431
+ },
2432
+ {
2433
+ "search": "Use status: default, info, success, warning, error.\n",
2434
+ "files": {
2435
+ "core/components/ui/alert/alert.md": {
2436
+ "title": "Alert",
2437
+ "hashes": {
2438
+ "alert": {
2439
+ "count": 1,
2440
+ "title": "",
2441
+ "type": "paragraph"
2442
+ }
2443
+ }
2444
+ }
2445
+ }
2446
+ },
2447
+ {
2448
+ "search": "Color and icon follow status. With no status, behavior is default.\n",
2449
+ "files": {
2450
+ "core/components/ui/alert/alert.md": {
2451
+ "title": "Alert",
2452
+ "hashes": {
2453
+ "status": {
2454
+ "count": 1,
2455
+ "title": "Status",
2456
+ "type": "paragraph"
2457
+ }
2458
+ }
2459
+ }
2460
+ }
2461
+ },
2462
+ {
2463
+ "search": "By default, an alert already in the DOM is not announced (no role / aria-live). Set announce when the message appears after user action (API response, validation, etc.): screen readers get role="alert" for error, otherwise role="status" and aria-live="polite".\n",
2464
+ "files": {
2465
+ "core/components/ui/alert/alert.md": {
2466
+ "title": "Alert",
2467
+ "hashes": {
2468
+ "accessibility-announce": {
2469
+ "count": 1,
2470
+ "title": "Accessibility (`announce`)",
2471
+ "type": "paragraph"
2472
+ }
2473
+ }
2474
+ }
2475
+ }
2476
+ },
2477
+ {
2478
+ "search": "sonic-alert-messages sets announce on every rendered alert.\n",
2479
+ "files": {
2480
+ "core/components/ui/alert/alert.md": {
2481
+ "title": "Alert",
2482
+ "hashes": {
2483
+ "accessibility-announce": {
2484
+ "count": 1,
2485
+ "title": "Accessibility (`announce`)",
2486
+ "type": "paragraph"
2487
+ }
2488
+ }
2489
+ }
2490
+ }
2491
+ },
2492
+ {
2493
+ "search": "label and text accept plain text only. The default slot is rendered after text. Use the icon slot to replace the default sonic-icon. noIcon hides the icon.\n",
2494
+ "files": {
2495
+ "core/components/ui/alert/alert.md": {
2496
+ "title": "Alert",
2497
+ "hashes": {
2498
+ "content-and-icon": {
2499
+ "count": 1,
2500
+ "title": "Content and icon",
2501
+ "type": "paragraph"
2502
+ }
2503
+ }
2504
+ }
2505
+ }
2506
+ },
2507
+ {
2508
+ "search": "Project any markup into slot="icon" (emoji, image, custom component). Keep it decorative with aria-hidden="true" when the message text already conveys meaning.\n",
2509
+ "files": {
2510
+ "core/components/ui/alert/alert.md": {
2511
+ "title": "Alert",
2512
+ "hashes": {
2513
+ "custom-icon-slot": {
2514
+ "count": 1,
2515
+ "title": "Custom icon slot",
2516
+ "type": "paragraph"
2517
+ }
2518
+ }
2519
+ }
2520
+ }
2521
+ },
2522
+ {
2523
+ "search": "Rich content in the slot (buttons, links).\n",
2524
+ "files": {
2525
+ "core/components/ui/alert/alert.md": {
2526
+ "title": "Alert",
2527
+ "hashes": {
2528
+ "alert-with-link": {
2529
+ "count": 1,
2530
+ "title": "Alert with link",
2531
+ "type": "paragraph"
2532
+ }
2533
+ }
2534
+ }
2535
+ }
2536
+ },
2537
+ {
2538
+ "search": "Tinted background from the status color (color-mix on currentColor).\n",
2539
+ "files": {
2540
+ "core/components/ui/alert/alert.md": {
2541
+ "title": "Alert",
2542
+ "hashes": {
2543
+ "background": {
2544
+ "count": 1,
2545
+ "title": "Background",
2546
+ "type": "paragraph"
2547
+ }
2548
+ }
2549
+ }
2550
+ }
2551
+ },
2552
+ {
2553
+ "search": "dismissible removes the alert from the DOM when the close control is clicked (i18n aria label). dismissible and background are independent: without background, close sits at the end of the row; with background, top-right.\n",
2554
+ "files": {
2555
+ "core/components/ui/alert/alert.md": {
2556
+ "title": "Alert",
2557
+ "hashes": {
2558
+ "dismissible": {
2559
+ "count": 1,
2560
+ "title": "Dismissible",
2561
+ "type": "paragraph"
2562
+ }
2563
+ }
2564
+ }
2565
+ }
2566
+ },
2567
+ {
2568
+ "search": "With dismissForever, dismissal is stored in localStorage (key sonic-alert-dismissed). A stable id on the element is required; without id, a warning is logged and nothing is persisted.\n",
2569
+ "files": {
2570
+ "core/components/ui/alert/alert.md": {
2571
+ "title": "Alert",
2572
+ "hashes": {
2573
+ "dismiss-forever": {
2574
+ "count": 1,
2575
+ "title": "Dismiss forever",
2576
+ "type": "paragraph"
2577
+ }
2578
+ }
2579
+ }
2580
+ }
2581
+ },
2417
2582
  {
2418
2583
  "search": "Badge",
2419
2584
  "files": {
@@ -2429,6 +2594,141 @@
2429
2594
  }
2430
2595
  }
2431
2596
  },
2597
+ {
2598
+ "search": "A non-interactive pill for labels, counts, or highlights (counter, status, category). The API mirrors sonic-button (type, variant, size) without focus or click states.\n",
2599
+ "files": {
2600
+ "core/components/ui/badge/badge.md": {
2601
+ "title": "Badge",
2602
+ "hashes": {
2603
+ "badge": {
2604
+ "count": 1,
2605
+ "title": "",
2606
+ "type": "paragraph"
2607
+ }
2608
+ }
2609
+ }
2610
+ }
2611
+ },
2612
+ {
2613
+ "search": "Colors come from theme tokens (--sc-primary, --sc-danger, …) or the semantic type values below. \n",
2614
+ "files": {
2615
+ "core/components/ui/badge/badge.md": {
2616
+ "title": "Badge",
2617
+ "hashes": {
2618
+ "badge": {
2619
+ "count": 1,
2620
+ "title": "",
2621
+ "type": "paragraph"
2622
+ }
2623
+ }
2624
+ }
2625
+ }
2626
+ },
2627
+ {
2628
+ "search": "default — subtle background (base-100). neutral — dark fill (base-content) with light text, useful on light backgrounds.\n",
2629
+ "files": {
2630
+ "core/components/ui/badge/badge.md": {
2631
+ "title": "Badge",
2632
+ "hashes": {
2633
+ "type": {
2634
+ "count": 1,
2635
+ "title": "Type",
2636
+ "type": "paragraph"
2637
+ }
2638
+ }
2639
+ }
2640
+ }
2641
+ },
2642
+ {
2643
+ "search": "outline — border and text in the type color. ghost — text only, no padding (except in forced-colors mode).\n",
2644
+ "files": {
2645
+ "core/components/ui/badge/badge.md": {
2646
+ "title": "Badge",
2647
+ "hashes": {
2648
+ "variant": {
2649
+ "count": 1,
2650
+ "title": "Variant",
2651
+ "type": "paragraph"
2652
+ }
2653
+ }
2654
+ }
2655
+ }
2656
+ },
2657
+ {
2658
+ "search": "Default size is md (omit the size attribute). Typography and padding follow sonic-button.\n",
2659
+ "files": {
2660
+ "core/components/ui/badge/badge.md": {
2661
+ "title": "Badge",
2662
+ "hashes": {
2663
+ "size": {
2664
+ "count": 1,
2665
+ "title": "Size",
2666
+ "type": "paragraph"
2667
+ }
2668
+ }
2669
+ }
2670
+ }
2671
+ },
2672
+ {
2673
+ "search": "Icons or short text before / after the main label.\n",
2674
+ "files": {
2675
+ "core/components/ui/badge/badge.md": {
2676
+ "title": "Badge",
2677
+ "hashes": {
2678
+ "prefix-and-suffix-slots": {
2679
+ "count": 1,
2680
+ "title": "Prefix and suffix slots",
2681
+ "type": "paragraph"
2682
+ }
2683
+ }
2684
+ }
2685
+ }
2686
+ },
2687
+ {
2688
+ "search": "Badge with no text (visual dot). min-width / min-height keep a readable shape.\n",
2689
+ "files": {
2690
+ "core/components/ui/badge/badge.md": {
2691
+ "title": "Badge",
2692
+ "hashes": {
2693
+ "empty-badges": {
2694
+ "count": 1,
2695
+ "title": "Empty badges",
2696
+ "type": "paragraph"
2697
+ }
2698
+ }
2699
+ }
2700
+ }
2701
+ },
2702
+ {
2703
+ "search": "With ellipsis, long labels truncate. The parent must constrain width (max-width, grid, etc.).\n",
2704
+ "files": {
2705
+ "core/components/ui/badge/badge.md": {
2706
+ "title": "Badge",
2707
+ "hashes": {
2708
+ "ellipsis": {
2709
+ "count": 1,
2710
+ "title": "Ellipsis",
2711
+ "type": "paragraph"
2712
+ }
2713
+ }
2714
+ }
2715
+ }
2716
+ },
2717
+ {
2718
+ "search": "Count inside a button (slot="suffix") or a badge absolutely positioned on a button / icon.\n",
2719
+ "files": {
2720
+ "core/components/ui/badge/badge.md": {
2721
+ "title": "Badge",
2722
+ "hashes": {
2723
+ "badge-in-button": {
2724
+ "count": 1,
2725
+ "title": "Badge in button",
2726
+ "type": "paragraph"
2727
+ }
2728
+ }
2729
+ }
2730
+ }
2731
+ },
2432
2732
  {
2433
2733
  "search": "Button",
2434
2734
  "files": {
@@ -2489,6 +2789,111 @@
2489
2789
  }
2490
2790
  }
2491
2791
  },
2792
+ {
2793
+ "search": "A surface for grouped content: padding, radius, shadow, and semantic type colors via shared theme tokens. Compose sonic-card-header, sonic-card-main, and sonic-card-footer inside the card, or put any markup in the default slot.\n",
2794
+ "files": {
2795
+ "core/components/ui/card/card.md": {
2796
+ "title": "Card",
2797
+ "hashes": {
2798
+ "card": {
2799
+ "count": 1,
2800
+ "title": "",
2801
+ "type": "paragraph"
2802
+ }
2803
+ }
2804
+ }
2805
+ }
2806
+ },
2807
+ {
2808
+ "search": "Default type is base (page background). Use light for a subtle gray panel, invert / neutral for high-contrast blocks, and primary, info, success, warning, or danger for tinted surfaces (divider tokens apply on colored types).\n",
2809
+ "files": {
2810
+ "core/components/ui/card/card.md": {
2811
+ "title": "Card",
2812
+ "hashes": {
2813
+ "card": {
2814
+ "count": 1,
2815
+ "title": "",
2816
+ "type": "paragraph"
2817
+ }
2818
+ }
2819
+ }
2820
+ }
2821
+ },
2822
+ {
2823
+ "search": "Quick titles with label and description attributes, or full control through the default slot. slot="suffix" aligns badges or actions on the right; suffix content does not shrink when the title wraps.\n",
2824
+ "files": {
2825
+ "core/components/ui/card/card.md": {
2826
+ "title": "Card",
2827
+ "hashes": {
2828
+ "header": {
2829
+ "count": 1,
2830
+ "title": "Header",
2831
+ "type": "paragraph"
2832
+ }
2833
+ }
2834
+ }
2835
+ }
2836
+ },
2837
+ {
2838
+ "search": "label and description accept HTML (rendered as markup). Prefer plain text when possible; use the slot for structured content.\n",
2839
+ "files": {
2840
+ "core/components/ui/card/card.md": {
2841
+ "title": "Card",
2842
+ "hashes": {
2843
+ "header": {
2844
+ "count": 1,
2845
+ "title": "Header",
2846
+ "type": "paragraph"
2847
+ }
2848
+ }
2849
+ }
2850
+ }
2851
+ },
2852
+ {
2853
+ "search": "Optional wrapper for the primary content area (typography, media, forms).\n",
2854
+ "files": {
2855
+ "core/components/ui/card/card.md": {
2856
+ "title": "Card",
2857
+ "hashes": {
2858
+ "main": {
2859
+ "count": 1,
2860
+ "title": "Main",
2861
+ "type": "paragraph"
2862
+ }
2863
+ }
2864
+ }
2865
+ }
2866
+ },
2867
+ {
2868
+ "search": "Optional footer for actions, metadata, or secondary text.\n",
2869
+ "files": {
2870
+ "core/components/ui/card/card.md": {
2871
+ "title": "Card",
2872
+ "hashes": {
2873
+ "footer": {
2874
+ "count": 1,
2875
+ "title": "Footer",
2876
+ "type": "paragraph"
2877
+ }
2878
+ }
2879
+ }
2880
+ }
2881
+ },
2882
+ {
2883
+ "search": "Header, media, body, and footer together.\n",
2884
+ "files": {
2885
+ "core/components/ui/card/card.md": {
2886
+ "title": "Card",
2887
+ "hashes": {
2888
+ "full-example": {
2889
+ "count": 1,
2890
+ "title": "Full example",
2891
+ "type": "paragraph"
2892
+ }
2893
+ }
2894
+ }
2895
+ }
2896
+ },
2492
2897
  {
2493
2898
  "search": "Divider",
2494
2899
  "files": {
@@ -2879,6 +3284,126 @@
2879
3284
  }
2880
3285
  }
2881
3286
  },
3287
+ {
3288
+ "search": "Responsive <img> wrapper: aspect ratio, object-fit: cover, rounded corners, and optional fade-in on load. The host uses a light placeholder background (--sc-placeholder-bg) until the file is ready. Default loading is lazy; set loading="eager" for above-the-fold heroes.\n",
3289
+ "files": {
3290
+ "core/components/ui/image/image.md": {
3291
+ "title": "Image",
3292
+ "hashes": {
3293
+ "image": {
3294
+ "count": 1,
3295
+ "title": "",
3296
+ "type": "paragraph"
3297
+ }
3298
+ }
3299
+ }
3300
+ }
3301
+ },
3302
+ {
3303
+ "search": "Omit rounded for square corners. Boolean rounded uses the theme token --sc-rounded. Sizes: sm, md, lg, xl, full (circle — pair with ratio="1/1"), none (explicit reset).\n",
3304
+ "files": {
3305
+ "core/components/ui/image/image.md": {
3306
+ "title": "Image",
3307
+ "hashes": {
3308
+ "rounded": {
3309
+ "count": 1,
3310
+ "title": "Rounded",
3311
+ "type": "paragraph"
3312
+ }
3313
+ }
3314
+ }
3315
+ }
3316
+ },
3317
+ {
3318
+ "search": "ratio sets CSS aspect-ratio on the image (default auto). The image still fills the host width (width: 100%).\n",
3319
+ "files": {
3320
+ "core/components/ui/image/image.md": {
3321
+ "title": "Image",
3322
+ "hashes": {
3323
+ "aspect-ratio": {
3324
+ "count": 1,
3325
+ "title": "Aspect ratio",
3326
+ "type": "paragraph"
3327
+ }
3328
+ }
3329
+ }
3330
+ }
3331
+ },
3332
+ {
3333
+ "search": "objectPosition maps to CSS object-position (default center center). Useful on wide crops when the subject sits off-center.\n",
3334
+ "files": {
3335
+ "core/components/ui/image/image.md": {
3336
+ "title": "Image",
3337
+ "hashes": {
3338
+ "object-position": {
3339
+ "count": 1,
3340
+ "title": "Object position",
3341
+ "type": "paragraph"
3342
+ }
3343
+ }
3344
+ }
3345
+ }
3346
+ },
3347
+ {
3348
+ "search": "cover stretches the image to fill a positioned parent (position: relative + fixed height or inset). Aspect ratio on the host is ignored while cover is set.\n",
3349
+ "files": {
3350
+ "core/components/ui/image/image.md": {
3351
+ "title": "Image",
3352
+ "hashes": {
3353
+ "cover": {
3354
+ "count": 1,
3355
+ "title": "Cover",
3356
+ "type": "paragraph"
3357
+ }
3358
+ }
3359
+ }
3360
+ }
3361
+ },
3362
+ {
3363
+ "search": "Set transition to fade (default when the attribute is present) or fade-scale-out. The image stays at opacity: 0 until the browser fires load, then the loaded class runs the animation. Changing src on an existing element does not replay the effect — mount a new sonic-image when you need another entrance (galleries, infinite scroll).\n",
3364
+ "files": {
3365
+ "core/components/ui/image/image.md": {
3366
+ "title": "Image",
3367
+ "hashes": {
3368
+ "load-transition": {
3369
+ "count": 1,
3370
+ "title": "Load transition",
3371
+ "type": "paragraph"
3372
+ }
3373
+ }
3374
+ }
3375
+ }
3376
+ },
3377
+ {
3378
+ "search": "Click Add image to append small thumbnails and replay the transition. Clear resets the row.\n",
3379
+ "files": {
3380
+ "core/components/ui/image/image.md": {
3381
+ "title": "Image",
3382
+ "hashes": {
3383
+ "load-transition": {
3384
+ "count": 1,
3385
+ "title": "Load transition",
3386
+ "type": "paragraph"
3387
+ }
3388
+ }
3389
+ }
3390
+ }
3391
+ },
3392
+ {
3393
+ "search": "Always set meaningful alt text (empty string only for decorative images). \n",
3394
+ "files": {
3395
+ "core/components/ui/image/image.md": {
3396
+ "title": "Image",
3397
+ "hashes": {
3398
+ "accessibility-and-parts": {
3399
+ "count": 1,
3400
+ "title": "Accessibility and parts",
3401
+ "type": "paragraph"
3402
+ }
3403
+ }
3404
+ }
3405
+ }
3406
+ },
2882
3407
  {
2883
3408
  "search": "Link",
2884
3409
  "files": {
@@ -2955,7 +3480,22 @@
2955
3480
  }
2956
3481
  },
2957
3482
  {
2958
- "search": "Default placement is bottom. Content is aligned on the start of the trigger, add center to center it. If there is not enough room, content flips to the opposite side and stays inside the viewport.\n",
3483
+ "search": "Default placement is bottom. Placement is written side-align, like sonic-tooltip: side is top, right, bottom or left, align is start, center or end. Without align, content is aligned on the start of the trigger. If there is not enough room, content flips to the opposite side and stays inside the viewport.\n",
3484
+ "files": {
3485
+ "core/components/ui/pop/pop.md": {
3486
+ "title": "Pop",
3487
+ "hashes": {
3488
+ "placement": {
3489
+ "count": 1,
3490
+ "title": "Placement",
3491
+ "type": "paragraph"
3492
+ }
3493
+ }
3494
+ }
3495
+ }
3496
+ },
3497
+ {
3498
+ "search": "The former space syntax (placement="bottom center") still works but is deprecated.\n",
2959
3499
  "files": {
2960
3500
  "core/components/ui/pop/pop.md": {
2961
3501
  "title": "Pop",
@@ -179,3 +179,9 @@ html {
179
179
  p {
180
180
  text-wrap: pretty;
181
181
  }
182
+
183
+ /* Markdown inline code in docs (shadcn-style pills; theme tokens follow light/dark) */
184
+ .prose :where(code):not(:where(pre *)) {
185
+ box-decoration-break: clone;
186
+ -webkit-box-decoration-break: clone;
187
+ }