@f-ewald/components 0.1.0 → 0.2.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 CHANGED
@@ -50,11 +50,15 @@ import "@f-ewald/components/roman-numeral.js";
50
50
  | `<distribution-chart>` | [docs/distribution-chart.md](./docs/distribution-chart.md) |
51
51
  | `<percent-bar-chart>` | [docs/percent-bar-chart.md](./docs/percent-bar-chart.md) |
52
52
  | `<price-history-chart>` | [docs/price-history-chart.md](./docs/price-history-chart.md) |
53
+ | `<radio-cards>` | [docs/radio-cards.md](./docs/radio-cards.md) |
54
+ | `<radio-pills>` | [docs/radio-pills.md](./docs/radio-pills.md) |
53
55
  | `<relative-time>` | [docs/relative-time.md](./docs/relative-time.md) |
54
56
  | `<reveal-button>` | [docs/reveal-button.md](./docs/reveal-button.md) |
55
57
  | `<roman-numeral>` | [docs/roman-numeral.md](./docs/roman-numeral.md) |
56
58
  | `<slide-panel>` | [docs/slide-panel.md](./docs/slide-panel.md) |
57
59
  | `<toast-notification>` | [docs/toast-notification.md](./docs/toast-notification.md) |
60
+ | `<ui-button>` | [docs/ui-button.md](./docs/ui-button.md) |
61
+ | `<user-avatar>` | [docs/user-avatar.md](./docs/user-avatar.md) |
58
62
  | `<weight-bar-chart>` | [docs/weight-bar-chart.md](./docs/weight-bar-chart.md) |
59
63
 
60
64
  Each doc lists the component's attributes/properties, events, slots, and the
@@ -2480,6 +2480,62 @@
2480
2480
  "module": "./autocomplete-input.js"
2481
2481
  }
2482
2482
  },
2483
+ {
2484
+ "kind": "js",
2485
+ "name": "UserAvatar",
2486
+ "declaration": {
2487
+ "name": "UserAvatar",
2488
+ "module": "./user-avatar.js"
2489
+ }
2490
+ },
2491
+ {
2492
+ "kind": "js",
2493
+ "name": "RadioCards",
2494
+ "declaration": {
2495
+ "name": "RadioCards",
2496
+ "module": "./radio-cards.js"
2497
+ }
2498
+ },
2499
+ {
2500
+ "kind": "js",
2501
+ "name": "RadioCardOption",
2502
+ "declaration": {
2503
+ "name": "RadioCardOption",
2504
+ "module": "./radio-cards.js"
2505
+ }
2506
+ },
2507
+ {
2508
+ "kind": "js",
2509
+ "name": "RadioPills",
2510
+ "declaration": {
2511
+ "name": "RadioPills",
2512
+ "module": "./radio-pills.js"
2513
+ }
2514
+ },
2515
+ {
2516
+ "kind": "js",
2517
+ "name": "RadioPillOption",
2518
+ "declaration": {
2519
+ "name": "RadioPillOption",
2520
+ "module": "./radio-pills.js"
2521
+ }
2522
+ },
2523
+ {
2524
+ "kind": "js",
2525
+ "name": "UiButton",
2526
+ "declaration": {
2527
+ "name": "UiButton",
2528
+ "module": "./ui-button.js"
2529
+ }
2530
+ },
2531
+ {
2532
+ "kind": "js",
2533
+ "name": "ButtonVariant",
2534
+ "declaration": {
2535
+ "name": "ButtonVariant",
2536
+ "module": "./ui-button.js"
2537
+ }
2538
+ },
2483
2539
  {
2484
2540
  "kind": "js",
2485
2541
  "name": "tokens",
@@ -2716,6 +2772,198 @@
2716
2772
  }
2717
2773
  ]
2718
2774
  },
2775
+ {
2776
+ "kind": "javascript-module",
2777
+ "path": "src/radio-cards.ts",
2778
+ "declarations": [
2779
+ {
2780
+ "kind": "class",
2781
+ "description": "Single-select group of full-width cards, each with a label and optional\ndescription — for a handful of meaningfully different choices where the\ndescription matters. For many short, same-shaped options (a color swatch,\na basemap style), use `radio-pills` instead. Wraps native radio inputs for\nkeyboard/a11y and fires `change` rather than relying on form submission.",
2782
+ "name": "RadioCards",
2783
+ "members": [
2784
+ {
2785
+ "kind": "field",
2786
+ "name": "options",
2787
+ "type": {
2788
+ "text": "RadioCardOption[]"
2789
+ },
2790
+ "default": "[]",
2791
+ "description": "Options to render, one card each."
2792
+ },
2793
+ {
2794
+ "kind": "field",
2795
+ "name": "value",
2796
+ "type": {
2797
+ "text": "string"
2798
+ },
2799
+ "default": "\"\"",
2800
+ "description": "Currently selected value.",
2801
+ "attribute": "value"
2802
+ },
2803
+ {
2804
+ "kind": "field",
2805
+ "name": "#name",
2806
+ "privacy": "private",
2807
+ "readonly": true,
2808
+ "default": "`radio-cards-${++instanceCount}`"
2809
+ },
2810
+ {
2811
+ "kind": "method",
2812
+ "name": "_onChange",
2813
+ "privacy": "private",
2814
+ "parameters": [
2815
+ {
2816
+ "name": "value",
2817
+ "type": {
2818
+ "text": "string"
2819
+ }
2820
+ }
2821
+ ]
2822
+ }
2823
+ ],
2824
+ "events": [
2825
+ {
2826
+ "name": "change",
2827
+ "type": {
2828
+ "text": "CustomEvent"
2829
+ },
2830
+ "description": "A card was selected; detail: { value }."
2831
+ }
2832
+ ],
2833
+ "attributes": [
2834
+ {
2835
+ "name": "value",
2836
+ "type": {
2837
+ "text": "string"
2838
+ },
2839
+ "default": "\"\"",
2840
+ "description": "Currently selected value.",
2841
+ "fieldName": "value"
2842
+ }
2843
+ ],
2844
+ "superclass": {
2845
+ "name": "LitElement",
2846
+ "package": "lit"
2847
+ },
2848
+ "tagName": "radio-cards",
2849
+ "customElement": true
2850
+ }
2851
+ ],
2852
+ "exports": [
2853
+ {
2854
+ "kind": "js",
2855
+ "name": "RadioCards",
2856
+ "declaration": {
2857
+ "name": "RadioCards",
2858
+ "module": "src/radio-cards.ts"
2859
+ }
2860
+ },
2861
+ {
2862
+ "kind": "custom-element-definition",
2863
+ "name": "radio-cards",
2864
+ "declaration": {
2865
+ "name": "RadioCards",
2866
+ "module": "src/radio-cards.ts"
2867
+ }
2868
+ }
2869
+ ]
2870
+ },
2871
+ {
2872
+ "kind": "javascript-module",
2873
+ "path": "src/radio-pills.ts",
2874
+ "declarations": [
2875
+ {
2876
+ "kind": "class",
2877
+ "description": "Single-select group of compact pill-shaped options — for many short,\nsame-shaped choices (a basemap style, a unit toggle). For a handful of\nchoices where a description matters, use `radio-cards` instead. Wraps\nnative radio inputs for keyboard/a11y and fires `change` rather than\nrelying on form submission.",
2878
+ "name": "RadioPills",
2879
+ "members": [
2880
+ {
2881
+ "kind": "field",
2882
+ "name": "options",
2883
+ "type": {
2884
+ "text": "RadioPillOption[]"
2885
+ },
2886
+ "default": "[]",
2887
+ "description": "Options to render, one pill each."
2888
+ },
2889
+ {
2890
+ "kind": "field",
2891
+ "name": "value",
2892
+ "type": {
2893
+ "text": "string"
2894
+ },
2895
+ "default": "\"\"",
2896
+ "description": "Currently selected value.",
2897
+ "attribute": "value"
2898
+ },
2899
+ {
2900
+ "kind": "field",
2901
+ "name": "#name",
2902
+ "privacy": "private",
2903
+ "readonly": true,
2904
+ "default": "`radio-pills-${++instanceCount}`"
2905
+ },
2906
+ {
2907
+ "kind": "method",
2908
+ "name": "_onChange",
2909
+ "privacy": "private",
2910
+ "parameters": [
2911
+ {
2912
+ "name": "value",
2913
+ "type": {
2914
+ "text": "string"
2915
+ }
2916
+ }
2917
+ ]
2918
+ }
2919
+ ],
2920
+ "events": [
2921
+ {
2922
+ "name": "change",
2923
+ "type": {
2924
+ "text": "CustomEvent"
2925
+ },
2926
+ "description": "A pill was selected; detail: { value }."
2927
+ }
2928
+ ],
2929
+ "attributes": [
2930
+ {
2931
+ "name": "value",
2932
+ "type": {
2933
+ "text": "string"
2934
+ },
2935
+ "default": "\"\"",
2936
+ "description": "Currently selected value.",
2937
+ "fieldName": "value"
2938
+ }
2939
+ ],
2940
+ "superclass": {
2941
+ "name": "LitElement",
2942
+ "package": "lit"
2943
+ },
2944
+ "tagName": "radio-pills",
2945
+ "customElement": true
2946
+ }
2947
+ ],
2948
+ "exports": [
2949
+ {
2950
+ "kind": "js",
2951
+ "name": "RadioPills",
2952
+ "declaration": {
2953
+ "name": "RadioPills",
2954
+ "module": "src/radio-pills.ts"
2955
+ }
2956
+ },
2957
+ {
2958
+ "kind": "custom-element-definition",
2959
+ "name": "radio-pills",
2960
+ "declaration": {
2961
+ "name": "RadioPills",
2962
+ "module": "src/radio-pills.ts"
2963
+ }
2964
+ }
2965
+ ]
2966
+ },
2719
2967
  {
2720
2968
  "kind": "javascript-module",
2721
2969
  "path": "src/relative-time.ts",
@@ -3221,6 +3469,255 @@
3221
3469
  }
3222
3470
  ]
3223
3471
  },
3472
+ {
3473
+ "kind": "javascript-module",
3474
+ "path": "src/ui-button.ts",
3475
+ "declarations": [
3476
+ {
3477
+ "kind": "class",
3478
+ "description": "Button (or link styled as one) with an optional leading icon, in three\nvisual weights. Set `href` to render an `<a>` instead of a `<button>` —\nsame styling either way — for cross-page navigation that should look like\nan action button; a disabled/busy link stays a real `<a>` with\n`aria-disabled` + `pointer-events: none` rather than losing its href.\nPut the icon in the `icon` slot and the label in the default slot.",
3479
+ "name": "UiButton",
3480
+ "slots": [
3481
+ {
3482
+ "description": "Optional leading icon (e.g. an inline SVG).",
3483
+ "name": "icon"
3484
+ },
3485
+ {
3486
+ "description": "Button label.",
3487
+ "name": ""
3488
+ }
3489
+ ],
3490
+ "members": [
3491
+ {
3492
+ "kind": "field",
3493
+ "name": "variant",
3494
+ "type": {
3495
+ "text": "ButtonVariant"
3496
+ },
3497
+ "default": "\"primary\"",
3498
+ "description": "Visual weight.",
3499
+ "attribute": "variant"
3500
+ },
3501
+ {
3502
+ "kind": "field",
3503
+ "name": "href",
3504
+ "type": {
3505
+ "text": "string | null"
3506
+ },
3507
+ "default": "null",
3508
+ "description": "Renders an `<a href=\"...\">` instead of a `<button>` when set.",
3509
+ "attribute": "href"
3510
+ },
3511
+ {
3512
+ "kind": "field",
3513
+ "name": "type",
3514
+ "type": {
3515
+ "text": "\"button\" | \"submit\" | \"reset\""
3516
+ },
3517
+ "default": "\"button\"",
3518
+ "description": "Native button `type`. Ignored when `href` is set.",
3519
+ "attribute": "type"
3520
+ },
3521
+ {
3522
+ "kind": "field",
3523
+ "name": "disabled",
3524
+ "type": {
3525
+ "text": "boolean"
3526
+ },
3527
+ "default": "false",
3528
+ "description": "Disables the control and dims it.",
3529
+ "attribute": "disabled"
3530
+ },
3531
+ {
3532
+ "kind": "field",
3533
+ "name": "busy",
3534
+ "type": {
3535
+ "text": "boolean"
3536
+ },
3537
+ "default": "false",
3538
+ "description": "Shows a spinner in place of the icon slot and disables the control.",
3539
+ "attribute": "busy"
3540
+ }
3541
+ ],
3542
+ "attributes": [
3543
+ {
3544
+ "name": "variant",
3545
+ "type": {
3546
+ "text": "ButtonVariant"
3547
+ },
3548
+ "default": "\"primary\"",
3549
+ "description": "Visual weight.",
3550
+ "fieldName": "variant"
3551
+ },
3552
+ {
3553
+ "name": "href",
3554
+ "type": {
3555
+ "text": "string | null"
3556
+ },
3557
+ "default": "null",
3558
+ "description": "Renders an `<a href=\"...\">` instead of a `<button>` when set.",
3559
+ "fieldName": "href"
3560
+ },
3561
+ {
3562
+ "name": "type",
3563
+ "type": {
3564
+ "text": "\"button\" | \"submit\" | \"reset\""
3565
+ },
3566
+ "default": "\"button\"",
3567
+ "description": "Native button `type`. Ignored when `href` is set.",
3568
+ "fieldName": "type"
3569
+ },
3570
+ {
3571
+ "name": "disabled",
3572
+ "type": {
3573
+ "text": "boolean"
3574
+ },
3575
+ "default": "false",
3576
+ "description": "Disables the control and dims it.",
3577
+ "fieldName": "disabled"
3578
+ },
3579
+ {
3580
+ "name": "busy",
3581
+ "type": {
3582
+ "text": "boolean"
3583
+ },
3584
+ "default": "false",
3585
+ "description": "Shows a spinner in place of the icon slot and disables the control.",
3586
+ "fieldName": "busy"
3587
+ }
3588
+ ],
3589
+ "superclass": {
3590
+ "name": "LitElement",
3591
+ "package": "lit"
3592
+ },
3593
+ "tagName": "ui-button",
3594
+ "customElement": true
3595
+ }
3596
+ ],
3597
+ "exports": [
3598
+ {
3599
+ "kind": "js",
3600
+ "name": "UiButton",
3601
+ "declaration": {
3602
+ "name": "UiButton",
3603
+ "module": "src/ui-button.ts"
3604
+ }
3605
+ },
3606
+ {
3607
+ "kind": "custom-element-definition",
3608
+ "name": "ui-button",
3609
+ "declaration": {
3610
+ "name": "UiButton",
3611
+ "module": "src/ui-button.ts"
3612
+ }
3613
+ }
3614
+ ]
3615
+ },
3616
+ {
3617
+ "kind": "javascript-module",
3618
+ "path": "src/user-avatar.ts",
3619
+ "declarations": [
3620
+ {
3621
+ "kind": "class",
3622
+ "description": "Circular avatar. Shows `src` when it loads successfully; falls back to the\nfirst letter of `name` (uppercased) if `src` is unset or fails to load\n(e.g. an expired OAuth profile-photo URL); falls back further to a generic\nperson icon if `name` is also unset. A broken image never leaves a blank\ncircle.",
3623
+ "name": "UserAvatar",
3624
+ "members": [
3625
+ {
3626
+ "kind": "field",
3627
+ "name": "src",
3628
+ "type": {
3629
+ "text": "string | null"
3630
+ },
3631
+ "default": "null",
3632
+ "description": "Image URL to show. Falls back to initials/icon if unset or it fails to load.",
3633
+ "attribute": "src"
3634
+ },
3635
+ {
3636
+ "kind": "field",
3637
+ "name": "name",
3638
+ "type": {
3639
+ "text": "string | null"
3640
+ },
3641
+ "default": "null",
3642
+ "description": "Source string for the fallback initial (e.g. a display name or email) — first character, uppercased.",
3643
+ "attribute": "name"
3644
+ },
3645
+ {
3646
+ "kind": "field",
3647
+ "name": "size",
3648
+ "type": {
3649
+ "text": "number"
3650
+ },
3651
+ "default": "32",
3652
+ "description": "Diameter in CSS pixels.",
3653
+ "attribute": "size"
3654
+ },
3655
+ {
3656
+ "kind": "field",
3657
+ "name": "_imgError",
3658
+ "type": {
3659
+ "text": "boolean"
3660
+ },
3661
+ "privacy": "private",
3662
+ "default": "false"
3663
+ }
3664
+ ],
3665
+ "attributes": [
3666
+ {
3667
+ "name": "src",
3668
+ "type": {
3669
+ "text": "string | null"
3670
+ },
3671
+ "default": "null",
3672
+ "description": "Image URL to show. Falls back to initials/icon if unset or it fails to load.",
3673
+ "fieldName": "src"
3674
+ },
3675
+ {
3676
+ "name": "name",
3677
+ "type": {
3678
+ "text": "string | null"
3679
+ },
3680
+ "default": "null",
3681
+ "description": "Source string for the fallback initial (e.g. a display name or email) — first character, uppercased.",
3682
+ "fieldName": "name"
3683
+ },
3684
+ {
3685
+ "name": "size",
3686
+ "type": {
3687
+ "text": "number"
3688
+ },
3689
+ "default": "32",
3690
+ "description": "Diameter in CSS pixels.",
3691
+ "fieldName": "size"
3692
+ }
3693
+ ],
3694
+ "superclass": {
3695
+ "name": "LitElement",
3696
+ "package": "lit"
3697
+ },
3698
+ "tagName": "user-avatar",
3699
+ "customElement": true
3700
+ }
3701
+ ],
3702
+ "exports": [
3703
+ {
3704
+ "kind": "js",
3705
+ "name": "UserAvatar",
3706
+ "declaration": {
3707
+ "name": "UserAvatar",
3708
+ "module": "src/user-avatar.ts"
3709
+ }
3710
+ },
3711
+ {
3712
+ "kind": "custom-element-definition",
3713
+ "name": "user-avatar",
3714
+ "declaration": {
3715
+ "name": "UserAvatar",
3716
+ "module": "src/user-avatar.ts"
3717
+ }
3718
+ }
3719
+ ]
3720
+ },
3224
3721
  {
3225
3722
  "kind": "javascript-module",
3226
3723
  "path": "src/weight-bar-chart.ts",
package/dist/index.d.ts CHANGED
@@ -13,6 +13,10 @@ export { PercentBarChart, type PercentBarGroup } from "./percent-bar-chart.js";
13
13
  export { WeightBarChart, type WeightBarItem } from "./weight-bar-chart.js";
14
14
  export { AddressAutocomplete, type AddressSuggestion, } from "./address-autocomplete.js";
15
15
  export { AutocompleteInput, type AutocompleteOption, } from "./autocomplete-input.js";
16
+ export { UserAvatar } from "./user-avatar.js";
17
+ export { RadioCards, type RadioCardOption } from "./radio-cards.js";
18
+ export { RadioPills, type RadioPillOption } from "./radio-pills.js";
19
+ export { UiButton, type ButtonVariant } from "./ui-button.js";
16
20
  export { tokens, tokenValues } from "./tokens.js";
17
21
  export * from "./icons.js";
18
22
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,EACV,KAAK,YAAY,GAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAAE,KAAK,iBAAiB,EAAE,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAE,KAAK,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAE,KAAK,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,mBAAmB,EACnB,KAAK,iBAAiB,GACvB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,EACjB,KAAK,kBAAkB,GACxB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAE,KAAK,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAE,KAAK,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,cAAc,YAAY,CAAC"}
package/dist/index.js CHANGED
@@ -13,6 +13,10 @@ export { PercentBarChart } from "./percent-bar-chart.js";
13
13
  export { WeightBarChart } from "./weight-bar-chart.js";
14
14
  export { AddressAutocomplete, } from "./address-autocomplete.js";
15
15
  export { AutocompleteInput, } from "./autocomplete-input.js";
16
+ export { UserAvatar } from "./user-avatar.js";
17
+ export { RadioCards } from "./radio-cards.js";
18
+ export { RadioPills } from "./radio-pills.js";
19
+ export { UiButton } from "./ui-button.js";
16
20
  export { tokens, tokenValues } from "./tokens.js";
17
21
  export * from "./icons.js";
18
22
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAmB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,mBAAmB,GAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,cAAc,YAAY,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { tokens, tokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,WAAW,EACX,UAAU,GAEX,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAmB,MAAM,0BAA0B,CAAC;AAC9E,OAAO,EAAE,iBAAiB,EAA0B,MAAM,yBAAyB,CAAC;AACpF,OAAO,EAAE,eAAe,EAAwB,MAAM,wBAAwB,CAAC;AAC/E,OAAO,EAAE,cAAc,EAAsB,MAAM,uBAAuB,CAAC;AAC3E,OAAO,EACL,mBAAmB,GAEpB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,iBAAiB,GAElB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,UAAU,EAAwB,MAAM,kBAAkB,CAAC;AACpE,OAAO,EAAE,QAAQ,EAAsB,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAClD,cAAc,YAAY,CAAC","sourcesContent":["export { AnimateConfetti } from \"./animate-confetti.js\";\nexport { RevealButton } from \"./reveal-button.js\";\nexport { RomanNumeral } from \"./roman-numeral.js\";\nexport { ConfirmDialog } from \"./confirm-dialog.js\";\nexport {\n ToastNotification,\n notifySuccess,\n notifyError,\n notifyInfo,\n type ToastVariant,\n} from \"./toast-notification.js\";\nexport { SlidePanel } from \"./slide-panel.js\";\nexport { CopyLinkButton } from \"./copy-link-button.js\";\nexport { RelativeTime } from \"./relative-time.js\";\nexport { DistanceValue } from \"./distance-value.js\";\nexport { PriceHistoryChart, type PricePoint } from \"./price-history-chart.js\";\nexport { DistributionChart, type DistributionValue } from \"./distribution-chart.js\";\nexport { PercentBarChart, type PercentBarGroup } from \"./percent-bar-chart.js\";\nexport { WeightBarChart, type WeightBarItem } from \"./weight-bar-chart.js\";\nexport {\n AddressAutocomplete,\n type AddressSuggestion,\n} from \"./address-autocomplete.js\";\nexport {\n AutocompleteInput,\n type AutocompleteOption,\n} from \"./autocomplete-input.js\";\nexport { UserAvatar } from \"./user-avatar.js\";\nexport { RadioCards, type RadioCardOption } from \"./radio-cards.js\";\nexport { RadioPills, type RadioPillOption } from \"./radio-pills.js\";\nexport { UiButton, type ButtonVariant } from \"./ui-button.js\";\nexport { tokens, tokenValues } from \"./tokens.js\";\nexport * from \"./icons.js\";\n"]}
@@ -0,0 +1,32 @@
1
+ import { LitElement } from "lit";
2
+ export interface RadioCardOption {
3
+ value: string;
4
+ label: string;
5
+ description?: string;
6
+ }
7
+ /**
8
+ * Single-select group of full-width cards, each with a label and optional
9
+ * description — for a handful of meaningfully different choices where the
10
+ * description matters. For many short, same-shaped options (a color swatch,
11
+ * a basemap style), use `radio-pills` instead. Wraps native radio inputs for
12
+ * keyboard/a11y and fires `change` rather than relying on form submission.
13
+ *
14
+ * @element radio-cards
15
+ * @fires change - A card was selected; detail: { value }.
16
+ */
17
+ export declare class RadioCards extends LitElement {
18
+ #private;
19
+ static styles: import("lit").CSSResult[];
20
+ /** Options to render, one card each. */
21
+ options: RadioCardOption[];
22
+ /** Currently selected value. */
23
+ value: string;
24
+ private _onChange;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ "radio-cards": RadioCards;
30
+ }
31
+ }
32
+ //# sourceMappingURL=radio-cards.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"radio-cards.d.ts","sourceRoot":"","sources":["../src/radio-cards.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAsB,MAAM,KAAK,CAAC;AAKrD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAID;;;;;;;;;GASG;AACH,qBACa,UAAW,SAAQ,UAAU;;IACxC,OAAgB,MAAM,4BA2CpB;IAEF,wCAAwC;IACR,OAAO,EAAE,eAAe,EAAE,CAAM;IAChE,gCAAgC;IACpB,KAAK,SAAM;IAIvB,OAAO,CAAC,SAAS;IAKR,MAAM,yCAuBd;CACF;AAED,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,qBAAqB;QAC7B,aAAa,EAAE,UAAU,CAAC;KAC3B;CACF"}