@c2n/mcp 0.0.13 → 0.0.15
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/data/registry.json +811 -275
- package/package.json +2 -2
package/data/registry.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"c2nVersion": "0.0.
|
|
3
|
+
"c2nVersion": "0.0.15",
|
|
4
4
|
"categories": [
|
|
5
5
|
"Inputs",
|
|
6
6
|
"Buttons",
|
|
@@ -561,7 +561,7 @@
|
|
|
561
561
|
},
|
|
562
562
|
{
|
|
563
563
|
"name": "tooltip",
|
|
564
|
-
"description": "
|
|
564
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
565
565
|
},
|
|
566
566
|
{
|
|
567
567
|
"name": "actions",
|
|
@@ -569,11 +569,11 @@
|
|
|
569
569
|
},
|
|
570
570
|
{
|
|
571
571
|
"name": "state",
|
|
572
|
-
"description": "
|
|
572
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
573
573
|
},
|
|
574
574
|
{
|
|
575
575
|
"name": "legend",
|
|
576
|
-
"description": "
|
|
576
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
577
577
|
},
|
|
578
578
|
{
|
|
579
579
|
"name": "legend-item",
|
|
@@ -1550,7 +1550,28 @@
|
|
|
1550
1550
|
"description": "Fired when the image preview cannot be loaded; the file fallback is shown."
|
|
1551
1551
|
}
|
|
1552
1552
|
],
|
|
1553
|
-
"cssParts": [
|
|
1553
|
+
"cssParts": [
|
|
1554
|
+
{
|
|
1555
|
+
"name": "media",
|
|
1556
|
+
"description": "Media region wrapping the `media` slot and thumbnail or file-icon fallback."
|
|
1557
|
+
},
|
|
1558
|
+
{
|
|
1559
|
+
"name": "content",
|
|
1560
|
+
"description": "Text and status region containing the name and metadata."
|
|
1561
|
+
},
|
|
1562
|
+
{
|
|
1563
|
+
"name": "name",
|
|
1564
|
+
"description": "File-name region wrapping the `name` slot and fallback name."
|
|
1565
|
+
},
|
|
1566
|
+
{
|
|
1567
|
+
"name": "metadata",
|
|
1568
|
+
"description": "Metadata region wrapping the `metadata` slot and type/size fallback."
|
|
1569
|
+
},
|
|
1570
|
+
{
|
|
1571
|
+
"name": "actions",
|
|
1572
|
+
"description": "Actions region wrapping the `actions` slot and built-in action fallback."
|
|
1573
|
+
}
|
|
1574
|
+
],
|
|
1554
1575
|
"cssProperties": [
|
|
1555
1576
|
{
|
|
1556
1577
|
"name": "--c2-attachment--min-height",
|
|
@@ -1804,7 +1825,12 @@
|
|
|
1804
1825
|
}
|
|
1805
1826
|
],
|
|
1806
1827
|
"events": [],
|
|
1807
|
-
"cssParts": [
|
|
1828
|
+
"cssParts": [
|
|
1829
|
+
{
|
|
1830
|
+
"name": "list",
|
|
1831
|
+
"description": "List region wrapping the default attachment slot."
|
|
1832
|
+
}
|
|
1833
|
+
],
|
|
1808
1834
|
"cssProperties": [
|
|
1809
1835
|
{
|
|
1810
1836
|
"name": "--c2-attachment-group--gap",
|
|
@@ -3616,7 +3642,7 @@
|
|
|
3616
3642
|
"cssParts": [
|
|
3617
3643
|
{
|
|
3618
3644
|
"name": "badge",
|
|
3619
|
-
"description": "
|
|
3645
|
+
"description": "The visible badge pill or dot, including its anchored overlay positioning."
|
|
3620
3646
|
}
|
|
3621
3647
|
],
|
|
3622
3648
|
"cssProperties": [
|
|
@@ -4358,7 +4384,7 @@
|
|
|
4358
4384
|
},
|
|
4359
4385
|
{
|
|
4360
4386
|
"name": "tooltip",
|
|
4361
|
-
"description": "
|
|
4387
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
4362
4388
|
},
|
|
4363
4389
|
{
|
|
4364
4390
|
"name": "actions",
|
|
@@ -4366,11 +4392,11 @@
|
|
|
4366
4392
|
},
|
|
4367
4393
|
{
|
|
4368
4394
|
"name": "state",
|
|
4369
|
-
"description": "
|
|
4395
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
4370
4396
|
},
|
|
4371
4397
|
{
|
|
4372
4398
|
"name": "legend",
|
|
4373
|
-
"description": "
|
|
4399
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
4374
4400
|
},
|
|
4375
4401
|
{
|
|
4376
4402
|
"name": "legend-item",
|
|
@@ -5514,19 +5540,19 @@
|
|
|
5514
5540
|
"cssParts": [
|
|
5515
5541
|
{
|
|
5516
5542
|
"name": "separator",
|
|
5517
|
-
"description": "
|
|
5543
|
+
"description": "Component-owned region containing the `separator` slot or its fallback between breadcrumb items."
|
|
5518
5544
|
},
|
|
5519
5545
|
{
|
|
5520
5546
|
"name": "item",
|
|
5521
|
-
"description": "
|
|
5547
|
+
"description": "A list item containing one breadcrumb and its following separator."
|
|
5522
5548
|
},
|
|
5523
5549
|
{
|
|
5524
5550
|
"name": "ellipsis",
|
|
5525
|
-
"description": "
|
|
5551
|
+
"description": "The control that reveals breadcrumb items hidden by overflow or `max-items`."
|
|
5526
5552
|
},
|
|
5527
5553
|
{
|
|
5528
5554
|
"name": "list",
|
|
5529
|
-
"description": "
|
|
5555
|
+
"description": "The ordered list containing the complete breadcrumb trail."
|
|
5530
5556
|
}
|
|
5531
5557
|
],
|
|
5532
5558
|
"cssProperties": [
|
|
@@ -5926,6 +5952,24 @@
|
|
|
5926
5952
|
"type": "boolean",
|
|
5927
5953
|
"default": "false",
|
|
5928
5954
|
"description": "Declares a toggle button: `aria-pressed` is announced as `false` while not selected. Set by `c2-button-group` in selection modes."
|
|
5955
|
+
},
|
|
5956
|
+
{
|
|
5957
|
+
"name": "type",
|
|
5958
|
+
"type": "'button' | 'submit' | 'reset'",
|
|
5959
|
+
"default": "'button'",
|
|
5960
|
+
"description": "Native button behavior. `submit` submits the nearest form and `reset` restores it."
|
|
5961
|
+
},
|
|
5962
|
+
{
|
|
5963
|
+
"name": "value",
|
|
5964
|
+
"type": "string",
|
|
5965
|
+
"default": "''",
|
|
5966
|
+
"description": "Stable identity used by `c2-button-group` and included in submitted form data when `name` is set."
|
|
5967
|
+
},
|
|
5968
|
+
{
|
|
5969
|
+
"name": "name",
|
|
5970
|
+
"type": "string",
|
|
5971
|
+
"default": "''",
|
|
5972
|
+
"description": "Form field name used with `value` when the button is the control that submits the form."
|
|
5929
5973
|
}
|
|
5930
5974
|
],
|
|
5931
5975
|
"slots": [
|
|
@@ -5950,11 +5994,11 @@
|
|
|
5950
5994
|
"cssParts": [
|
|
5951
5995
|
{
|
|
5952
5996
|
"name": "button",
|
|
5953
|
-
"description": "
|
|
5997
|
+
"description": "The native button that provides the interactive surface."
|
|
5954
5998
|
},
|
|
5955
5999
|
{
|
|
5956
6000
|
"name": "running-icon",
|
|
5957
|
-
"description": "
|
|
6001
|
+
"description": "Wrapper containing the `running-icon` slot or spinner fallback while `running` is set."
|
|
5958
6002
|
}
|
|
5959
6003
|
],
|
|
5960
6004
|
"cssProperties": [
|
|
@@ -7026,7 +7070,7 @@
|
|
|
7026
7070
|
"part": "indicator",
|
|
7027
7071
|
"property": "transition-duration",
|
|
7028
7072
|
"token": "--c2-theme--motion-scale",
|
|
7029
|
-
"description": "Sliding selection indicator animation duration."
|
|
7073
|
+
"description": "Sliding selection indicator animation duration. In the segmented appearance the group owns its children's surface variables with an important cascade layer. Theme the control through the `segmented-*` and `indicator-*` variables above; app-wide `c2-button` defaults will not leak into the segmented surface."
|
|
7030
7074
|
}
|
|
7031
7075
|
]
|
|
7032
7076
|
}
|
|
@@ -7522,7 +7566,7 @@
|
|
|
7522
7566
|
},
|
|
7523
7567
|
{
|
|
7524
7568
|
"name": "tooltip",
|
|
7525
|
-
"description": "
|
|
7569
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
7526
7570
|
},
|
|
7527
7571
|
{
|
|
7528
7572
|
"name": "actions",
|
|
@@ -7530,11 +7574,11 @@
|
|
|
7530
7574
|
},
|
|
7531
7575
|
{
|
|
7532
7576
|
"name": "state",
|
|
7533
|
-
"description": "
|
|
7577
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
7534
7578
|
},
|
|
7535
7579
|
{
|
|
7536
7580
|
"name": "legend",
|
|
7537
|
-
"description": "
|
|
7581
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
7538
7582
|
},
|
|
7539
7583
|
{
|
|
7540
7584
|
"name": "legend-item",
|
|
@@ -8386,7 +8430,24 @@
|
|
|
8386
8430
|
}
|
|
8387
8431
|
],
|
|
8388
8432
|
"events": [],
|
|
8389
|
-
"cssParts": [
|
|
8433
|
+
"cssParts": [
|
|
8434
|
+
{
|
|
8435
|
+
"name": "media",
|
|
8436
|
+
"description": "Wrapper around the `media` slot; present when media content is assigned and clipped by the card surface."
|
|
8437
|
+
},
|
|
8438
|
+
{
|
|
8439
|
+
"name": "header",
|
|
8440
|
+
"description": "Wrapper around the `header` slot; present when header content is assigned."
|
|
8441
|
+
},
|
|
8442
|
+
{
|
|
8443
|
+
"name": "body",
|
|
8444
|
+
"description": "Wrapper around the default slot; present when body content is assigned."
|
|
8445
|
+
},
|
|
8446
|
+
{
|
|
8447
|
+
"name": "footer",
|
|
8448
|
+
"description": "Wrapper around the `footer` slot; present when footer content is assigned."
|
|
8449
|
+
}
|
|
8450
|
+
],
|
|
8390
8451
|
"cssProperties": [
|
|
8391
8452
|
{
|
|
8392
8453
|
"name": "--c2-card--padding-top",
|
|
@@ -9586,13 +9647,13 @@
|
|
|
9586
9647
|
"description": "Requires a nonempty message for form validation."
|
|
9587
9648
|
},
|
|
9588
9649
|
{
|
|
9589
|
-
"name": "
|
|
9650
|
+
"name": "maxlength",
|
|
9590
9651
|
"type": "number",
|
|
9591
9652
|
"default": "-1",
|
|
9592
9653
|
"description": "Maximum message length; -1 means unlimited."
|
|
9593
9654
|
},
|
|
9594
9655
|
{
|
|
9595
|
-
"name": "
|
|
9656
|
+
"name": "minlength",
|
|
9596
9657
|
"type": "number",
|
|
9597
9658
|
"default": "-1",
|
|
9598
9659
|
"description": "Minimum message length; -1 means no minimum."
|
|
@@ -9657,23 +9718,23 @@
|
|
|
9657
9718
|
"cssParts": [
|
|
9658
9719
|
{
|
|
9659
9720
|
"name": "container",
|
|
9660
|
-
"description": "
|
|
9721
|
+
"description": "Outer composer surface containing the textarea and actions."
|
|
9661
9722
|
},
|
|
9662
9723
|
{
|
|
9663
9724
|
"name": "textarea",
|
|
9664
|
-
"description": "
|
|
9725
|
+
"description": "The native auto-growing textarea."
|
|
9665
9726
|
},
|
|
9666
9727
|
{
|
|
9667
9728
|
"name": "actions",
|
|
9668
|
-
"description": "
|
|
9729
|
+
"description": "Row containing the toolbar and send button."
|
|
9669
9730
|
},
|
|
9670
9731
|
{
|
|
9671
9732
|
"name": "toolbar",
|
|
9672
|
-
"description": "
|
|
9733
|
+
"description": "Container for the `toolbar` slot."
|
|
9673
9734
|
},
|
|
9674
9735
|
{
|
|
9675
9736
|
"name": "send-button",
|
|
9676
|
-
"description": "
|
|
9737
|
+
"description": "The native button that submits the current message."
|
|
9677
9738
|
}
|
|
9678
9739
|
],
|
|
9679
9740
|
"cssProperties": [
|
|
@@ -10066,11 +10127,11 @@
|
|
|
10066
10127
|
},
|
|
10067
10128
|
{
|
|
10068
10129
|
"name": "avatar",
|
|
10069
|
-
"description": "
|
|
10130
|
+
"description": "Component-owned region wrapping the assigned `avatar` slot."
|
|
10070
10131
|
},
|
|
10071
10132
|
{
|
|
10072
10133
|
"name": "body",
|
|
10073
|
-
"description": "
|
|
10134
|
+
"description": "Component-owned column wrapping the default slot between the header and footer."
|
|
10074
10135
|
},
|
|
10075
10136
|
{
|
|
10076
10137
|
"name": "header",
|
|
@@ -10466,7 +10527,7 @@
|
|
|
10466
10527
|
"package": "@c2n/chatbot",
|
|
10467
10528
|
"title": "Chatbot",
|
|
10468
10529
|
"description": "",
|
|
10469
|
-
"intro": "
|
|
10530
|
+
"intro": "`c2-chatbot` provides a minimal support-chat shell. Application-owned conversation content goes in the default slot; use ordinary classes for those assigned messages and the public `messages` part for the component-owned conversation region.",
|
|
10470
10531
|
"category": "Layout",
|
|
10471
10532
|
"status": "stable",
|
|
10472
10533
|
"docsUrl": "https://code2nguyen.github.io/web-components/components/chatbot",
|
|
@@ -10486,13 +10547,106 @@
|
|
|
10486
10547
|
],
|
|
10487
10548
|
"slots": [
|
|
10488
10549
|
{
|
|
10489
|
-
"name": "
|
|
10550
|
+
"name": "",
|
|
10490
10551
|
"description": "Conversation content rendered inside the chatbot shell."
|
|
10491
10552
|
}
|
|
10492
10553
|
],
|
|
10493
10554
|
"events": [],
|
|
10494
|
-
"cssParts": [
|
|
10495
|
-
|
|
10555
|
+
"cssParts": [
|
|
10556
|
+
{
|
|
10557
|
+
"name": "messages",
|
|
10558
|
+
"description": "Always-present conversation container around the default slot; controls assigned-content placement, has no fallback, and does not style inside assigned nodes."
|
|
10559
|
+
}
|
|
10560
|
+
],
|
|
10561
|
+
"cssProperties": [
|
|
10562
|
+
{
|
|
10563
|
+
"name": "--c2-chatbot--border-top-left-radius",
|
|
10564
|
+
"type": "border-radius",
|
|
10565
|
+
"default": "8px",
|
|
10566
|
+
"part": "",
|
|
10567
|
+
"property": "border-top-left-radius",
|
|
10568
|
+
"token": "--c2-theme--radius-lg"
|
|
10569
|
+
},
|
|
10570
|
+
{
|
|
10571
|
+
"name": "--c2-chatbot--border-top-right-radius",
|
|
10572
|
+
"type": "border-radius",
|
|
10573
|
+
"default": "8px",
|
|
10574
|
+
"part": "",
|
|
10575
|
+
"property": "border-top-right-radius",
|
|
10576
|
+
"token": "--c2-theme--radius-lg"
|
|
10577
|
+
},
|
|
10578
|
+
{
|
|
10579
|
+
"name": "--c2-chatbot--border-bottom-left-radius",
|
|
10580
|
+
"type": "border-radius",
|
|
10581
|
+
"default": "8px",
|
|
10582
|
+
"part": "",
|
|
10583
|
+
"property": "border-bottom-left-radius",
|
|
10584
|
+
"token": "--c2-theme--radius-lg"
|
|
10585
|
+
},
|
|
10586
|
+
{
|
|
10587
|
+
"name": "--c2-chatbot--border-bottom-right-radius",
|
|
10588
|
+
"type": "border-radius",
|
|
10589
|
+
"default": "8px",
|
|
10590
|
+
"part": "",
|
|
10591
|
+
"property": "border-bottom-right-radius",
|
|
10592
|
+
"token": "--c2-theme--radius-lg"
|
|
10593
|
+
},
|
|
10594
|
+
{
|
|
10595
|
+
"name": "--c2-chatbot--border-top",
|
|
10596
|
+
"type": "border",
|
|
10597
|
+
"default": "1px solid #e4e4e7",
|
|
10598
|
+
"part": "",
|
|
10599
|
+
"property": "border-top",
|
|
10600
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10601
|
+
},
|
|
10602
|
+
{
|
|
10603
|
+
"name": "--c2-chatbot--border-right",
|
|
10604
|
+
"type": "border",
|
|
10605
|
+
"default": "1px solid #e4e4e7",
|
|
10606
|
+
"part": "",
|
|
10607
|
+
"property": "border-right",
|
|
10608
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10609
|
+
},
|
|
10610
|
+
{
|
|
10611
|
+
"name": "--c2-chatbot--border-bottom",
|
|
10612
|
+
"type": "border",
|
|
10613
|
+
"default": "1px solid #e4e4e7",
|
|
10614
|
+
"part": "",
|
|
10615
|
+
"property": "border-bottom",
|
|
10616
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10617
|
+
},
|
|
10618
|
+
{
|
|
10619
|
+
"name": "--c2-chatbot--border-left",
|
|
10620
|
+
"type": "border",
|
|
10621
|
+
"default": "1px solid #e4e4e7",
|
|
10622
|
+
"part": "",
|
|
10623
|
+
"property": "border-left",
|
|
10624
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10625
|
+
},
|
|
10626
|
+
{
|
|
10627
|
+
"name": "--c2-chatbot__header--padding",
|
|
10628
|
+
"type": "padding",
|
|
10629
|
+
"default": "16px",
|
|
10630
|
+
"part": "header",
|
|
10631
|
+
"property": "padding"
|
|
10632
|
+
},
|
|
10633
|
+
{
|
|
10634
|
+
"name": "--c2-chatbot__header--background",
|
|
10635
|
+
"type": "color",
|
|
10636
|
+
"default": "#ffffff",
|
|
10637
|
+
"part": "header",
|
|
10638
|
+
"property": "background",
|
|
10639
|
+
"token": "--c2-theme--color-surface"
|
|
10640
|
+
},
|
|
10641
|
+
{
|
|
10642
|
+
"name": "--c2-chatbot__header--border-bottom",
|
|
10643
|
+
"type": "border",
|
|
10644
|
+
"default": "1px solid #e4e4e7",
|
|
10645
|
+
"part": "header",
|
|
10646
|
+
"property": "border-bottom",
|
|
10647
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10648
|
+
}
|
|
10649
|
+
]
|
|
10496
10650
|
}
|
|
10497
10651
|
],
|
|
10498
10652
|
"composition": {
|
|
@@ -10600,15 +10754,15 @@
|
|
|
10600
10754
|
"cssParts": [
|
|
10601
10755
|
{
|
|
10602
10756
|
"name": "checkmark",
|
|
10603
|
-
"description": "
|
|
10757
|
+
"description": "Wrapper containing the `checkmark` slot or fallback mark while checked."
|
|
10604
10758
|
},
|
|
10605
10759
|
{
|
|
10606
10760
|
"name": "mixedmark",
|
|
10607
|
-
"description": "
|
|
10761
|
+
"description": "Wrapper containing the `mixedmark` slot or fallback mark while indeterminate."
|
|
10608
10762
|
},
|
|
10609
10763
|
{
|
|
10610
10764
|
"name": "uncheckmark",
|
|
10611
|
-
"description": "
|
|
10765
|
+
"description": "Wrapper containing the optional `uncheckmark` slot while unchecked."
|
|
10612
10766
|
}
|
|
10613
10767
|
],
|
|
10614
10768
|
"cssProperties": [
|
|
@@ -11548,7 +11702,7 @@
|
|
|
11548
11702
|
},
|
|
11549
11703
|
{
|
|
11550
11704
|
"name": "label",
|
|
11551
|
-
"description": "
|
|
11705
|
+
"description": "Component-owned text region containing the `label` slot above the editor."
|
|
11552
11706
|
},
|
|
11553
11707
|
{
|
|
11554
11708
|
"name": "editor",
|
|
@@ -11556,11 +11710,7 @@
|
|
|
11556
11710
|
},
|
|
11557
11711
|
{
|
|
11558
11712
|
"name": "supporting-text",
|
|
11559
|
-
"description": "
|
|
11560
|
-
},
|
|
11561
|
-
{
|
|
11562
|
-
"name": "ready",
|
|
11563
|
-
"description": "Shadow DOM styling hook for the ready element."
|
|
11713
|
+
"description": "Help and error row containing the `supporting-text` slot or generated fallback."
|
|
11564
11714
|
}
|
|
11565
11715
|
],
|
|
11566
11716
|
"cssProperties": [
|
|
@@ -12193,7 +12343,24 @@
|
|
|
12193
12343
|
"description": "Fired after the copy button put the code on the clipboard."
|
|
12194
12344
|
}
|
|
12195
12345
|
],
|
|
12196
|
-
"cssParts": [
|
|
12346
|
+
"cssParts": [
|
|
12347
|
+
{
|
|
12348
|
+
"name": "header",
|
|
12349
|
+
"description": "Header region containing the title, terminal controls, and copy action."
|
|
12350
|
+
},
|
|
12351
|
+
{
|
|
12352
|
+
"name": "title",
|
|
12353
|
+
"description": "Title boundary exposing the `title` slot."
|
|
12354
|
+
},
|
|
12355
|
+
{
|
|
12356
|
+
"name": "body",
|
|
12357
|
+
"description": "Code body region containing the default slot or rendered-source fallback and inline copy action."
|
|
12358
|
+
},
|
|
12359
|
+
{
|
|
12360
|
+
"name": "copy-button",
|
|
12361
|
+
"description": "Copy action containing the `copy-icon` or `copied-icon` fallback."
|
|
12362
|
+
}
|
|
12363
|
+
],
|
|
12197
12364
|
"cssProperties": [
|
|
12198
12365
|
{
|
|
12199
12366
|
"name": "--c2-code-viewer--background",
|
|
@@ -12967,7 +13134,14 @@
|
|
|
12967
13134
|
{
|
|
12968
13135
|
"kind": "usage",
|
|
12969
13136
|
"label": "Default",
|
|
12970
|
-
"html": "<c2-color-area></c2-color-area>"
|
|
13137
|
+
"html": "<c2-color-area></c2-color-area>",
|
|
13138
|
+
"css": ".wide-color-area {\n --c2-color-area--width: 280px;\n --c2-color-area--height: 180px;\n --c2-color-area__color-handle--size: 16px;\n}"
|
|
13139
|
+
},
|
|
13140
|
+
{
|
|
13141
|
+
"kind": "usage",
|
|
13142
|
+
"label": "Wide landscape",
|
|
13143
|
+
"html": "<c2-color-area class=\"wide-color-area\"></c2-color-area>",
|
|
13144
|
+
"css": ".wide-color-area {\n --c2-color-area--width: 280px;\n --c2-color-area--height: 180px;\n --c2-color-area__color-handle--size: 16px;\n}"
|
|
12971
13145
|
},
|
|
12972
13146
|
{
|
|
12973
13147
|
"kind": "gallery",
|
|
@@ -13268,7 +13442,14 @@
|
|
|
13268
13442
|
{
|
|
13269
13443
|
"kind": "usage",
|
|
13270
13444
|
"label": "Default",
|
|
13271
|
-
"html": "<c2-color-select color=\"#ff726b\"></c2-color-select>"
|
|
13445
|
+
"html": "<c2-color-select color=\"#ff726b\"></c2-color-select>",
|
|
13446
|
+
"css": ".large-swatch {\n --c2-color-select--width: 32px;\n --c2-color-select--height: 32px;\n --c2-color-select--border-top-left-radius: 8px;\n --c2-color-select--border-top-right-radius: 8px;\n --c2-color-select--border-bottom-left-radius: 8px;\n --c2-color-select--border-bottom-right-radius: 8px;\n}"
|
|
13447
|
+
},
|
|
13448
|
+
{
|
|
13449
|
+
"kind": "usage",
|
|
13450
|
+
"label": "Large swatch",
|
|
13451
|
+
"html": "<c2-color-select class=\"large-swatch\" color=\"#2563eb\"></c2-color-select>",
|
|
13452
|
+
"css": ".large-swatch {\n --c2-color-select--width: 32px;\n --c2-color-select--height: 32px;\n --c2-color-select--border-top-left-radius: 8px;\n --c2-color-select--border-top-right-radius: 8px;\n --c2-color-select--border-bottom-left-radius: 8px;\n --c2-color-select--border-bottom-right-radius: 8px;\n}"
|
|
13272
13453
|
},
|
|
13273
13454
|
{
|
|
13274
13455
|
"kind": "gallery",
|
|
@@ -13496,7 +13677,14 @@
|
|
|
13496
13677
|
{
|
|
13497
13678
|
"kind": "usage",
|
|
13498
13679
|
"label": "Default",
|
|
13499
|
-
"html": "<c2-color-slider></c2-color-slider>"
|
|
13680
|
+
"html": "<c2-color-slider></c2-color-slider>",
|
|
13681
|
+
"css": ".compact-hue-slider {\n --c2-color-slider--width: 180px;\n --c2-color-slider--height: 12px;\n --c2-color-slider__color-handle--width: 16px;\n --c2-color-slider__color-handle--height: 16px;\n}"
|
|
13682
|
+
},
|
|
13683
|
+
{
|
|
13684
|
+
"kind": "usage",
|
|
13685
|
+
"label": "Compact",
|
|
13686
|
+
"html": "<c2-color-slider class=\"compact-hue-slider\"></c2-color-slider>",
|
|
13687
|
+
"css": ".compact-hue-slider {\n --c2-color-slider--width: 180px;\n --c2-color-slider--height: 12px;\n --c2-color-slider__color-handle--width: 16px;\n --c2-color-slider__color-handle--height: 16px;\n}"
|
|
13500
13688
|
},
|
|
13501
13689
|
{
|
|
13502
13690
|
"kind": "gallery",
|
|
@@ -13620,11 +13808,11 @@
|
|
|
13620
13808
|
"cssParts": [
|
|
13621
13809
|
{
|
|
13622
13810
|
"name": "button",
|
|
13623
|
-
"description": "
|
|
13811
|
+
"description": "The native button that performs the copy action."
|
|
13624
13812
|
},
|
|
13625
13813
|
{
|
|
13626
13814
|
"name": "icon",
|
|
13627
|
-
"description": "
|
|
13815
|
+
"description": "Wrapper that switches between the copy and copied icons."
|
|
13628
13816
|
}
|
|
13629
13817
|
],
|
|
13630
13818
|
"cssProperties": [
|
|
@@ -14076,7 +14264,7 @@
|
|
|
14076
14264
|
"tag": "c2-dashboard",
|
|
14077
14265
|
"className": "Dashboard",
|
|
14078
14266
|
"modulePath": "@c2n/dashboard",
|
|
14079
|
-
"description": "Grid of resizable panes. The children are `c2-dash-card` elements, placed by their `col`/`row` attributes; each\none draws drag handles on the edges it shares with a neighbour, and dragging one resizes the whole track, so the\ncards on either side stay aligned. `columns` and `rows` take a track count (`columns=\"3\"` is three equal columns)\nor an explicit track list (`columns=\"320px 1fr\"`); a track is switched to pixels the first time it is dragged, and\nthe `fr` tracks around it give up the space in proportion to their weight, down to the minimums. With a\n`storage-key` the sizes survive a reload.\n\n`layouts` makes the grid responsive without a remount: each entry names a media query and the tracks and card\nplacements to use while it matches, the first match wins, and every entry keeps its own stored sizes under\n`<storage-key>@<media
|
|
14267
|
+
"description": "Grid of resizable panes. The children are `c2-dash-card` elements, placed by their `col`/`row` attributes; each\none draws drag handles on the edges it shares with a neighbour, and dragging one resizes the whole track, so the\ncards on either side stay aligned. `columns` and `rows` take a track count (`columns=\"3\"` is three equal columns)\nor an explicit track list (`columns=\"320px 1fr\"`); a track is switched to pixels the first time it is dragged, and\nthe `fr` tracks around it give up the space in proportion to their weight, down to the minimums. With a\n`storage-key` the sizes survive a reload.\n\n`layouts` makes the grid responsive without a remount: each entry names a media query and the tracks and card\nplacements to use while it matches, the first match wins, and every entry keeps its own stored sizes under\n`<storage-key>@<media>`. Stored payloads are versioned and include stable card order; `serializeLayout` and\n`deserializeLayout` can preserve application metadata such as named sizes without coupling it to the component.\n\nPlacement is the application's: the grid never re-places cards on its own. A pane removed or hidden at runtime\nleaves its cells empty and its neighbours where they were, and a pane added at runtime lands exactly where its\n`col`/`row` say, on top of whatever is already there if that cell is taken. To close a gap, or to make room, set\nthe cards' `col`/`row`/`col-span`/`row-span` or hand the grid a `layout` record — both are applied in place.\n\nThe grid is the sizing authority: a card never sets its own width. Give the element a height (or place it in a\nflex/grid parent that does) whenever the rows use `fr`, since the row tracks divide the host's height.",
|
|
14080
14268
|
"attributes": [
|
|
14081
14269
|
{
|
|
14082
14270
|
"name": "columns",
|
|
@@ -14106,7 +14294,7 @@
|
|
|
14106
14294
|
"name": "storage-key",
|
|
14107
14295
|
"type": "string | undefined",
|
|
14108
14296
|
"default": "undefined",
|
|
14109
|
-
"description": "`localStorage` key the track sizes are stored under. Without it the grid starts from the authored
|
|
14297
|
+
"description": "`localStorage` key the track sizes and stable card order are stored under. Without it the grid starts from the authored layout."
|
|
14110
14298
|
}
|
|
14111
14299
|
],
|
|
14112
14300
|
"slots": [
|
|
@@ -14119,7 +14307,7 @@
|
|
|
14119
14307
|
{
|
|
14120
14308
|
"name": "layout-change",
|
|
14121
14309
|
"type": "CustomEvent<DashboardLayoutChangeDetail>",
|
|
14122
|
-
"description": "The
|
|
14310
|
+
"description": "The tracks or stable card order changed: a gesture ended, `setPanelOrder()`/`reset()` was called, or another entry of `layouts` took over. Includes the active breakpoint. Does not bubble: listen on the element."
|
|
14123
14311
|
}
|
|
14124
14312
|
],
|
|
14125
14313
|
"cssParts": [],
|
|
@@ -14298,7 +14486,7 @@
|
|
|
14298
14486
|
"cssParts": [
|
|
14299
14487
|
{
|
|
14300
14488
|
"name": "header",
|
|
14301
|
-
"description": "
|
|
14489
|
+
"description": "Conditional row containing the `header` and `actions` slots, or the floating controls when both are empty."
|
|
14302
14490
|
},
|
|
14303
14491
|
{
|
|
14304
14492
|
"name": "body",
|
|
@@ -14306,11 +14494,11 @@
|
|
|
14306
14494
|
},
|
|
14307
14495
|
{
|
|
14308
14496
|
"name": "footer",
|
|
14309
|
-
"description": "
|
|
14497
|
+
"description": "Conditional row wrapping the assigned `footer` slot."
|
|
14310
14498
|
},
|
|
14311
14499
|
{
|
|
14312
14500
|
"name": "controls",
|
|
14313
|
-
"description": "
|
|
14501
|
+
"description": "Component-owned group containing the `controls` slot and built-in expand-button fallbacks."
|
|
14314
14502
|
},
|
|
14315
14503
|
{
|
|
14316
14504
|
"name": "control",
|
|
@@ -14947,7 +15135,7 @@
|
|
|
14947
15135
|
"description": "Requires a date before the form can be submitted."
|
|
14948
15136
|
},
|
|
14949
15137
|
{
|
|
14950
|
-
"name": "
|
|
15138
|
+
"name": "readonly",
|
|
14951
15139
|
"type": "boolean",
|
|
14952
15140
|
"default": "false",
|
|
14953
15141
|
"description": "Prevents editing while keeping the value in form submission."
|
|
@@ -15778,7 +15966,28 @@
|
|
|
15778
15966
|
"description": "Re-dispatched from the native details after it opens or closes (`newState` is `open` or `closed`)."
|
|
15779
15967
|
}
|
|
15780
15968
|
],
|
|
15781
|
-
"cssParts": [
|
|
15969
|
+
"cssParts": [
|
|
15970
|
+
{
|
|
15971
|
+
"name": "summary",
|
|
15972
|
+
"description": "Interactive summary containing the title, icon, and optional header content."
|
|
15973
|
+
},
|
|
15974
|
+
{
|
|
15975
|
+
"name": "title",
|
|
15976
|
+
"description": "Component-owned title region wrapping the `title` slot or label fallback."
|
|
15977
|
+
},
|
|
15978
|
+
{
|
|
15979
|
+
"name": "icon",
|
|
15980
|
+
"description": "Icon region containing the `icon` and `expanded-icon` slots and fallback chevron."
|
|
15981
|
+
},
|
|
15982
|
+
{
|
|
15983
|
+
"name": "header-content",
|
|
15984
|
+
"description": "Conditional secondary header region wrapping the `header-content` slot."
|
|
15985
|
+
},
|
|
15986
|
+
{
|
|
15987
|
+
"name": "body",
|
|
15988
|
+
"description": "Collapsible body region wrapping the default slot."
|
|
15989
|
+
}
|
|
15990
|
+
],
|
|
15782
15991
|
"cssProperties": [
|
|
15783
15992
|
{
|
|
15784
15993
|
"name": "--c2-details--border-top",
|
|
@@ -16376,51 +16585,6 @@
|
|
|
16376
16585
|
],
|
|
16377
16586
|
"hasGallery": true
|
|
16378
16587
|
},
|
|
16379
|
-
"dropdown-list": {
|
|
16380
|
-
"id": "dropdown-list",
|
|
16381
|
-
"package": "@c2n/dropdown-list",
|
|
16382
|
-
"title": "dropdown-list",
|
|
16383
|
-
"description": "",
|
|
16384
|
-
"category": "Layout",
|
|
16385
|
-
"status": "undocumented",
|
|
16386
|
-
"docsUrl": "https://code2nguyen.github.io/web-components/components/dropdown-list",
|
|
16387
|
-
"elements": [
|
|
16388
|
-
{
|
|
16389
|
-
"tag": "c2-dropdown-list",
|
|
16390
|
-
"className": "DropdownList",
|
|
16391
|
-
"modulePath": "@c2n/dropdown-list",
|
|
16392
|
-
"description": "",
|
|
16393
|
-
"attributes": [
|
|
16394
|
-
{
|
|
16395
|
-
"name": "value",
|
|
16396
|
-
"type": "string[]",
|
|
16397
|
-
"default": "[]"
|
|
16398
|
-
}
|
|
16399
|
-
],
|
|
16400
|
-
"slots": [
|
|
16401
|
-
{
|
|
16402
|
-
"name": "default",
|
|
16403
|
-
"description": "This is a default/unnamed slot"
|
|
16404
|
-
}
|
|
16405
|
-
],
|
|
16406
|
-
"events": [],
|
|
16407
|
-
"cssParts": [],
|
|
16408
|
-
"cssProperties": []
|
|
16409
|
-
}
|
|
16410
|
-
],
|
|
16411
|
-
"composition": {
|
|
16412
|
-
"internal": [],
|
|
16413
|
-
"slotted": [],
|
|
16414
|
-
"usedBy": []
|
|
16415
|
-
},
|
|
16416
|
-
"install": {
|
|
16417
|
-
"npm": "npm install @c2n/dropdown-list @c2n/theme",
|
|
16418
|
-
"import": "import '@c2n/dropdown-list'",
|
|
16419
|
-
"importClass": "import { DropdownList } from '@c2n/dropdown-list'"
|
|
16420
|
-
},
|
|
16421
|
-
"examples": [],
|
|
16422
|
-
"hasGallery": false
|
|
16423
|
-
},
|
|
16424
16588
|
"feather-icons": {
|
|
16425
16589
|
"id": "feather-icons",
|
|
16426
16590
|
"package": "@c2n/feather-icons",
|
|
@@ -17035,7 +17199,7 @@
|
|
|
17035
17199
|
},
|
|
17036
17200
|
{
|
|
17037
17201
|
"name": "tooltip",
|
|
17038
|
-
"description": "
|
|
17202
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
17039
17203
|
},
|
|
17040
17204
|
{
|
|
17041
17205
|
"name": "actions",
|
|
@@ -17043,11 +17207,11 @@
|
|
|
17043
17207
|
},
|
|
17044
17208
|
{
|
|
17045
17209
|
"name": "state",
|
|
17046
|
-
"description": "
|
|
17210
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
17047
17211
|
},
|
|
17048
17212
|
{
|
|
17049
17213
|
"name": "legend",
|
|
17050
|
-
"description": "
|
|
17214
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
17051
17215
|
},
|
|
17052
17216
|
{
|
|
17053
17217
|
"name": "legend-item",
|
|
@@ -17921,27 +18085,27 @@
|
|
|
17921
18085
|
"cssParts": [
|
|
17922
18086
|
{
|
|
17923
18087
|
"name": "header",
|
|
17924
|
-
"description": "
|
|
18088
|
+
"description": "The outer page-header landmark."
|
|
17925
18089
|
},
|
|
17926
18090
|
{
|
|
17927
18091
|
"name": "content",
|
|
17928
|
-
"description": "
|
|
18092
|
+
"description": "Inner layout container wrapping and aligning the assigned default slot."
|
|
17929
18093
|
},
|
|
17930
18094
|
{
|
|
17931
18095
|
"name": "brand",
|
|
17932
|
-
"description": "
|
|
18096
|
+
"description": "Container for the `brand` slot."
|
|
17933
18097
|
},
|
|
17934
18098
|
{
|
|
17935
18099
|
"name": "navigation",
|
|
17936
|
-
"description": "
|
|
18100
|
+
"description": "Primary navigation landmark containing the default slot."
|
|
17937
18101
|
},
|
|
17938
18102
|
{
|
|
17939
18103
|
"name": "actions",
|
|
17940
|
-
"description": "
|
|
18104
|
+
"description": "Container for the trailing `actions` slot."
|
|
17941
18105
|
},
|
|
17942
18106
|
{
|
|
17943
18107
|
"name": "mobile-trigger",
|
|
17944
|
-
"description": "
|
|
18108
|
+
"description": "Container for the responsive `mobile-trigger` slot."
|
|
17945
18109
|
}
|
|
17946
18110
|
],
|
|
17947
18111
|
"cssProperties": [
|
|
@@ -18204,7 +18368,7 @@
|
|
|
18204
18368
|
"cssParts": [
|
|
18205
18369
|
{
|
|
18206
18370
|
"name": "button",
|
|
18207
|
-
"description": "
|
|
18371
|
+
"description": "The native button that provides the icon-only interactive surface."
|
|
18208
18372
|
}
|
|
18209
18373
|
],
|
|
18210
18374
|
"cssProperties": [
|
|
@@ -18688,7 +18852,7 @@
|
|
|
18688
18852
|
"cssParts": [
|
|
18689
18853
|
{
|
|
18690
18854
|
"name": "kbd",
|
|
18691
|
-
"description": "
|
|
18855
|
+
"description": "The native `<kbd>` element containing the key or shortcut."
|
|
18692
18856
|
}
|
|
18693
18857
|
],
|
|
18694
18858
|
"cssProperties": [
|
|
@@ -19084,11 +19248,11 @@
|
|
|
19084
19248
|
"cssParts": [
|
|
19085
19249
|
{
|
|
19086
19250
|
"name": "label",
|
|
19087
|
-
"description": "
|
|
19251
|
+
"description": "The label text and optional required marker."
|
|
19088
19252
|
},
|
|
19089
19253
|
{
|
|
19090
19254
|
"name": "required-indicator",
|
|
19091
|
-
"description": "
|
|
19255
|
+
"description": "Marker containing the `required-indicator` slot or fallback asterisk while `required` is set."
|
|
19092
19256
|
}
|
|
19093
19257
|
],
|
|
19094
19258
|
"cssProperties": [
|
|
@@ -19676,7 +19840,7 @@
|
|
|
19676
19840
|
},
|
|
19677
19841
|
{
|
|
19678
19842
|
"name": "tooltip",
|
|
19679
|
-
"description": "
|
|
19843
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
19680
19844
|
},
|
|
19681
19845
|
{
|
|
19682
19846
|
"name": "actions",
|
|
@@ -19684,11 +19848,11 @@
|
|
|
19684
19848
|
},
|
|
19685
19849
|
{
|
|
19686
19850
|
"name": "state",
|
|
19687
|
-
"description": "
|
|
19851
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
19688
19852
|
},
|
|
19689
19853
|
{
|
|
19690
19854
|
"name": "legend",
|
|
19691
|
-
"description": "
|
|
19855
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
19692
19856
|
},
|
|
19693
19857
|
{
|
|
19694
19858
|
"name": "legend-item",
|
|
@@ -20671,11 +20835,11 @@
|
|
|
20671
20835
|
"cssParts": [
|
|
20672
20836
|
{
|
|
20673
20837
|
"name": "link",
|
|
20674
|
-
"description": "
|
|
20838
|
+
"description": "The anchor rendered when `href` is set and the control is enabled."
|
|
20675
20839
|
},
|
|
20676
20840
|
{
|
|
20677
20841
|
"name": "button",
|
|
20678
|
-
"description": "
|
|
20842
|
+
"description": "The native button rendered without `href` or while disabled."
|
|
20679
20843
|
}
|
|
20680
20844
|
],
|
|
20681
20845
|
"cssProperties": [
|
|
@@ -22518,9 +22682,14 @@
|
|
|
22518
22682
|
"tag": "c2-mat-icon",
|
|
22519
22683
|
"className": "MatIcon",
|
|
22520
22684
|
"modulePath": "@c2n/mat-icon",
|
|
22521
|
-
"description": "",
|
|
22685
|
+
"description": "Renders a Material Symbols ligature supplied as consumer-owned text.",
|
|
22522
22686
|
"attributes": [],
|
|
22523
|
-
"slots": [
|
|
22687
|
+
"slots": [
|
|
22688
|
+
{
|
|
22689
|
+
"name": "",
|
|
22690
|
+
"description": "Material Symbols ligature text; style the assigned text through the host's inherited typography."
|
|
22691
|
+
}
|
|
22692
|
+
],
|
|
22524
22693
|
"events": [],
|
|
22525
22694
|
"cssParts": [],
|
|
22526
22695
|
"cssProperties": [
|
|
@@ -23672,7 +23841,32 @@
|
|
|
23672
23841
|
"description": "Native, cancelable: fired on Escape before closing."
|
|
23673
23842
|
}
|
|
23674
23843
|
],
|
|
23675
|
-
"cssParts": [
|
|
23844
|
+
"cssParts": [
|
|
23845
|
+
{
|
|
23846
|
+
"name": "panel",
|
|
23847
|
+
"description": "Dialog panel containing the header, body, and conditional footer regions."
|
|
23848
|
+
},
|
|
23849
|
+
{
|
|
23850
|
+
"name": "header",
|
|
23851
|
+
"description": "Header region containing the title slot and close button."
|
|
23852
|
+
},
|
|
23853
|
+
{
|
|
23854
|
+
"name": "title",
|
|
23855
|
+
"description": "Component-owned title region wrapping the `title` slot."
|
|
23856
|
+
},
|
|
23857
|
+
{
|
|
23858
|
+
"name": "close-button",
|
|
23859
|
+
"description": "Close button containing the `close-icon` slot or its fallback icon."
|
|
23860
|
+
},
|
|
23861
|
+
{
|
|
23862
|
+
"name": "body",
|
|
23863
|
+
"description": "Component-owned body region wrapping the default slot."
|
|
23864
|
+
},
|
|
23865
|
+
{
|
|
23866
|
+
"name": "footer",
|
|
23867
|
+
"description": "Conditional footer region wrapping the `footer` slot."
|
|
23868
|
+
}
|
|
23869
|
+
],
|
|
23676
23870
|
"cssProperties": [
|
|
23677
23871
|
{
|
|
23678
23872
|
"name": "--c2-modal--width",
|
|
@@ -25925,7 +26119,7 @@
|
|
|
25925
26119
|
"description": "Requires a number before the form can be submitted."
|
|
25926
26120
|
},
|
|
25927
26121
|
{
|
|
25928
|
-
"name": "
|
|
26122
|
+
"name": "readonly",
|
|
25929
26123
|
"type": "boolean",
|
|
25930
26124
|
"default": "false",
|
|
25931
26125
|
"description": "Prevents editing while keeping the value in form submission."
|
|
@@ -26724,27 +26918,27 @@
|
|
|
26724
26918
|
"cssParts": [
|
|
26725
26919
|
{
|
|
26726
26920
|
"name": "nav",
|
|
26727
|
-
"description": "
|
|
26921
|
+
"description": "A first, previous, next or last page button."
|
|
26728
26922
|
},
|
|
26729
26923
|
{
|
|
26730
26924
|
"name": "item",
|
|
26731
|
-
"description": "
|
|
26925
|
+
"description": "A numbered page button."
|
|
26732
26926
|
},
|
|
26733
26927
|
{
|
|
26734
26928
|
"name": "ellipsis",
|
|
26735
|
-
"description": "
|
|
26929
|
+
"description": "A control that jumps across a hidden range of pages."
|
|
26736
26930
|
},
|
|
26737
26931
|
{
|
|
26738
26932
|
"name": "label",
|
|
26739
|
-
"description": "
|
|
26933
|
+
"description": "Current-page, item-range or page-size text."
|
|
26740
26934
|
},
|
|
26741
26935
|
{
|
|
26742
26936
|
"name": "page-size",
|
|
26743
|
-
"description": "
|
|
26937
|
+
"description": "The `c2-select` used to change the number of items per page."
|
|
26744
26938
|
},
|
|
26745
26939
|
{
|
|
26746
26940
|
"name": "pagination",
|
|
26747
|
-
"description": "
|
|
26941
|
+
"description": "The outer pagination navigation landmark."
|
|
26748
26942
|
}
|
|
26749
26943
|
],
|
|
26750
26944
|
"cssProperties": [
|
|
@@ -29154,7 +29348,7 @@
|
|
|
29154
29348
|
},
|
|
29155
29349
|
{
|
|
29156
29350
|
"name": "tooltip",
|
|
29157
|
-
"description": "
|
|
29351
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
29158
29352
|
},
|
|
29159
29353
|
{
|
|
29160
29354
|
"name": "actions",
|
|
@@ -29162,11 +29356,11 @@
|
|
|
29162
29356
|
},
|
|
29163
29357
|
{
|
|
29164
29358
|
"name": "state",
|
|
29165
|
-
"description": "
|
|
29359
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
29166
29360
|
},
|
|
29167
29361
|
{
|
|
29168
29362
|
"name": "legend",
|
|
29169
|
-
"description": "
|
|
29363
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
29170
29364
|
},
|
|
29171
29365
|
{
|
|
29172
29366
|
"name": "legend-item",
|
|
@@ -30104,23 +30298,23 @@
|
|
|
30104
30298
|
"cssParts": [
|
|
30105
30299
|
{
|
|
30106
30300
|
"name": "header",
|
|
30107
|
-
"description": "
|
|
30301
|
+
"description": "Row containing the label and displayed value."
|
|
30108
30302
|
},
|
|
30109
30303
|
{
|
|
30110
30304
|
"name": "label",
|
|
30111
|
-
"description": "
|
|
30305
|
+
"description": "Container for the default label slot."
|
|
30112
30306
|
},
|
|
30113
30307
|
{
|
|
30114
30308
|
"name": "value",
|
|
30115
|
-
"description": "
|
|
30309
|
+
"description": "Text region containing the custom `value` slot or displayed-percentage fallback."
|
|
30116
30310
|
},
|
|
30117
30311
|
{
|
|
30118
30312
|
"name": "track",
|
|
30119
|
-
"description": "
|
|
30313
|
+
"description": "The full progress track."
|
|
30120
30314
|
},
|
|
30121
30315
|
{
|
|
30122
30316
|
"name": "indicator",
|
|
30123
|
-
"description": "
|
|
30317
|
+
"description": "The filled portion of the progress track."
|
|
30124
30318
|
}
|
|
30125
30319
|
],
|
|
30126
30320
|
"cssProperties": [
|
|
@@ -30829,19 +31023,19 @@
|
|
|
30829
31023
|
"cssParts": [
|
|
30830
31024
|
{
|
|
30831
31025
|
"name": "previous-button",
|
|
30832
|
-
"description": "
|
|
31026
|
+
"description": "Fallback button inside the `previous-button` slot when no assigned replacement is present."
|
|
30833
31027
|
},
|
|
30834
31028
|
{
|
|
30835
31029
|
"name": "skip-button",
|
|
30836
|
-
"description": "
|
|
31030
|
+
"description": "Fallback button inside the `skip-button` slot when no assigned replacement is present."
|
|
30837
31031
|
},
|
|
30838
31032
|
{
|
|
30839
31033
|
"name": "next-button",
|
|
30840
|
-
"description": "
|
|
31034
|
+
"description": "Fallback button inside the `next-button` slot when no assigned replacement is present."
|
|
30841
31035
|
},
|
|
30842
31036
|
{
|
|
30843
31037
|
"name": "submit-button",
|
|
30844
|
-
"description": "
|
|
31038
|
+
"description": "Fallback button inside the `submit-button` slot when no assigned replacement is present."
|
|
30845
31039
|
}
|
|
30846
31040
|
],
|
|
30847
31041
|
"cssProperties": [
|
|
@@ -31457,7 +31651,7 @@
|
|
|
31457
31651
|
},
|
|
31458
31652
|
{
|
|
31459
31653
|
"name": "tooltip",
|
|
31460
|
-
"description": "
|
|
31654
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
31461
31655
|
},
|
|
31462
31656
|
{
|
|
31463
31657
|
"name": "actions",
|
|
@@ -31465,11 +31659,11 @@
|
|
|
31465
31659
|
},
|
|
31466
31660
|
{
|
|
31467
31661
|
"name": "state",
|
|
31468
|
-
"description": "
|
|
31662
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
31469
31663
|
},
|
|
31470
31664
|
{
|
|
31471
31665
|
"name": "legend",
|
|
31472
|
-
"description": "
|
|
31666
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
31473
31667
|
},
|
|
31474
31668
|
{
|
|
31475
31669
|
"name": "legend-item",
|
|
@@ -32276,27 +32470,27 @@
|
|
|
32276
32470
|
"cssParts": [
|
|
32277
32471
|
{
|
|
32278
32472
|
"name": "control",
|
|
32279
|
-
"description": "
|
|
32473
|
+
"description": "The default circular radio indicator."
|
|
32280
32474
|
},
|
|
32281
32475
|
{
|
|
32282
32476
|
"name": "dot",
|
|
32283
|
-
"description": "
|
|
32477
|
+
"description": "Checked-mark region containing the `dot` slot or fallback inside the default control."
|
|
32284
32478
|
},
|
|
32285
32479
|
{
|
|
32286
32480
|
"name": "icon",
|
|
32287
|
-
"description": "
|
|
32481
|
+
"description": "Custom indicator shown from the `icon` slot."
|
|
32288
32482
|
},
|
|
32289
32483
|
{
|
|
32290
32484
|
"name": "checked-icon",
|
|
32291
|
-
"description": "
|
|
32485
|
+
"description": "Custom indicator shown from the `checked-icon` slot while checked."
|
|
32292
32486
|
},
|
|
32293
32487
|
{
|
|
32294
32488
|
"name": "label",
|
|
32295
|
-
"description": "
|
|
32489
|
+
"description": "The option label."
|
|
32296
32490
|
},
|
|
32297
32491
|
{
|
|
32298
32492
|
"name": "description",
|
|
32299
|
-
"description": "
|
|
32493
|
+
"description": "Supporting-text region containing the `description` slot below the label."
|
|
32300
32494
|
}
|
|
32301
32495
|
],
|
|
32302
32496
|
"cssProperties": [
|
|
@@ -33360,43 +33554,277 @@
|
|
|
33360
33554
|
"reorder-list": {
|
|
33361
33555
|
"id": "reorder-list",
|
|
33362
33556
|
"package": "@c2n/reorder-list",
|
|
33363
|
-
"title": "
|
|
33364
|
-
"description": "",
|
|
33365
|
-
"
|
|
33366
|
-
"
|
|
33557
|
+
"title": "Reorder List",
|
|
33558
|
+
"description": "Reorder a vertical queue with pointer or keyboard input while the application owns persistence.",
|
|
33559
|
+
"intro": "Use `c2-reorder-list` for one vertical queue whose ordinary direct children need pointer and keyboard reordering. The component keeps the committed visual order immediately; listen for `reorder` and persist `event.detail.order` in application state. It never physically moves application-owned light DOM.",
|
|
33560
|
+
"category": "Data display",
|
|
33561
|
+
"status": "stable",
|
|
33367
33562
|
"docsUrl": "https://code2nguyen.github.io/web-components/components/reorder-list",
|
|
33368
33563
|
"elements": [
|
|
33369
33564
|
{
|
|
33370
33565
|
"tag": "c2-reorder-list",
|
|
33371
33566
|
"className": "ReorderList",
|
|
33372
33567
|
"modulePath": "@c2n/reorder-list",
|
|
33373
|
-
"description": "",
|
|
33568
|
+
"description": "Presents consumer-owned direct children as one vertical list and lets users reorder movable items with pointer or\nkeyboard input when `editable`. The component commits visual order immediately without moving consumer-owned light\nDOM. Applications persist the typed `reorder` result and may later reconcile their authored children.\n\nUse `data-fixed` to pin an item at its absolute position, `data-reorder-key` for optional stable application\nidentity, and `data-reorder-label` for announcements. Non-empty keys must be unique. Editable lists need an\naccessible name through `aria-label` or `aria-labelledby`. Whole-row touch reordering owns the vertical gesture;\ninteractive descendants retain their native behavior and never arm a reorder.",
|
|
33374
33569
|
"attributes": [
|
|
33375
33570
|
{
|
|
33376
33571
|
"name": "editable",
|
|
33377
33572
|
"type": "boolean",
|
|
33378
|
-
"default": "false"
|
|
33573
|
+
"default": "false",
|
|
33574
|
+
"description": "Enables pointer and keyboard reordering."
|
|
33379
33575
|
},
|
|
33380
33576
|
{
|
|
33381
|
-
"name": "
|
|
33577
|
+
"name": "dragstartthreshold",
|
|
33382
33578
|
"type": "number",
|
|
33383
|
-
"default": "10"
|
|
33579
|
+
"default": "10",
|
|
33580
|
+
"description": "Minimum summed pointer movement in CSS pixels before pickup. Invalid values use 10."
|
|
33384
33581
|
},
|
|
33385
33582
|
{
|
|
33386
|
-
"name": "
|
|
33583
|
+
"name": "autoscrolldisabled",
|
|
33387
33584
|
"type": "boolean",
|
|
33388
|
-
"default": "false"
|
|
33585
|
+
"default": "false",
|
|
33586
|
+
"description": "Prevents component-driven scrolling of the nearest eligible vertical ancestor."
|
|
33587
|
+
}
|
|
33588
|
+
],
|
|
33589
|
+
"slots": [
|
|
33590
|
+
{
|
|
33591
|
+
"name": "",
|
|
33592
|
+
"description": "Ordinary direct-child items. Numeric or private slot metadata is assigned internally and is not consumer API."
|
|
33593
|
+
},
|
|
33594
|
+
{
|
|
33595
|
+
"name": "placeholder",
|
|
33596
|
+
"description": "Optional destination feedback shown only during pointer reordering."
|
|
33597
|
+
},
|
|
33598
|
+
{
|
|
33599
|
+
"name": "dragging-item",
|
|
33600
|
+
"description": "Optional pointer preview shown only during pointer reordering."
|
|
33389
33601
|
}
|
|
33390
33602
|
],
|
|
33391
|
-
"slots": [],
|
|
33392
33603
|
"events": [
|
|
33604
|
+
{
|
|
33605
|
+
"name": "reorder",
|
|
33606
|
+
"type": "CustomEvent<ReorderEventDetail>",
|
|
33607
|
+
"description": "Fired once after a real committed user reorder. Bubbles and crosses shadow boundaries; not cancelable."
|
|
33608
|
+
},
|
|
33393
33609
|
{
|
|
33394
33610
|
"name": "change",
|
|
33395
|
-
"type": "CustomEvent"
|
|
33611
|
+
"type": "CustomEvent<number[]>",
|
|
33612
|
+
"description": "Deprecated numeric permutation emitted with `reorder` during the compatibility window."
|
|
33613
|
+
},
|
|
33614
|
+
{
|
|
33615
|
+
"name": "reorder-error",
|
|
33616
|
+
"type": "CustomEvent<ReorderErrorEventDetail>",
|
|
33617
|
+
"description": "Fired when duplicate non-empty item keys prevent pickup."
|
|
33396
33618
|
}
|
|
33397
33619
|
],
|
|
33398
|
-
"cssParts": [
|
|
33399
|
-
|
|
33620
|
+
"cssParts": [
|
|
33621
|
+
{
|
|
33622
|
+
"name": "container",
|
|
33623
|
+
"description": "Ordered-list layout and component-owned spacing boundary."
|
|
33624
|
+
},
|
|
33625
|
+
{
|
|
33626
|
+
"name": "item",
|
|
33627
|
+
"description": "Repeated component-owned placement wrapper around the default slot's assigned ordinary item; styles placement, not assigned content."
|
|
33628
|
+
},
|
|
33629
|
+
{
|
|
33630
|
+
"name": "placeholder",
|
|
33631
|
+
"description": "Component-owned destination marker wrapping the `placeholder` slot or its visible fallback; styles placement, not assigned content."
|
|
33632
|
+
},
|
|
33633
|
+
{
|
|
33634
|
+
"name": "dragging-item",
|
|
33635
|
+
"description": "Fixed-position component-owned preview region wrapping the `dragging-item` slot or its recognizable fallback; styles placement, not assigned content."
|
|
33636
|
+
}
|
|
33637
|
+
],
|
|
33638
|
+
"cssProperties": [
|
|
33639
|
+
{
|
|
33640
|
+
"name": "--c2-reorder-list--container-border-width",
|
|
33641
|
+
"type": "length",
|
|
33642
|
+
"default": "0px",
|
|
33643
|
+
"part": "",
|
|
33644
|
+
"property": "container-border-width",
|
|
33645
|
+
"description": "Container border width."
|
|
33646
|
+
},
|
|
33647
|
+
{
|
|
33648
|
+
"name": "--c2-reorder-list--container-border-color",
|
|
33649
|
+
"type": "color",
|
|
33650
|
+
"default": "#bcbcc6",
|
|
33651
|
+
"part": "",
|
|
33652
|
+
"property": "container-border-color",
|
|
33653
|
+
"description": "Container border color."
|
|
33654
|
+
},
|
|
33655
|
+
{
|
|
33656
|
+
"name": "--c2-reorder-list--container-border-radius",
|
|
33657
|
+
"type": "length",
|
|
33658
|
+
"default": "8px",
|
|
33659
|
+
"part": "",
|
|
33660
|
+
"property": "container-border-radius",
|
|
33661
|
+
"description": "Container corner radius."
|
|
33662
|
+
},
|
|
33663
|
+
{
|
|
33664
|
+
"name": "--c2-reorder-list--container-padding",
|
|
33665
|
+
"type": "length",
|
|
33666
|
+
"default": "0px",
|
|
33667
|
+
"part": "",
|
|
33668
|
+
"property": "container-padding",
|
|
33669
|
+
"description": "Container padding."
|
|
33670
|
+
},
|
|
33671
|
+
{
|
|
33672
|
+
"name": "--c2-reorder-list--container-margin",
|
|
33673
|
+
"type": "length",
|
|
33674
|
+
"default": "0px",
|
|
33675
|
+
"part": "",
|
|
33676
|
+
"property": "container-margin",
|
|
33677
|
+
"description": "Container margin."
|
|
33678
|
+
},
|
|
33679
|
+
{
|
|
33680
|
+
"name": "--c2-reorder-list--container-gap",
|
|
33681
|
+
"type": "length",
|
|
33682
|
+
"default": "0px",
|
|
33683
|
+
"part": "",
|
|
33684
|
+
"property": "container-gap",
|
|
33685
|
+
"description": "Space between item placements."
|
|
33686
|
+
},
|
|
33687
|
+
{
|
|
33688
|
+
"name": "--c2-reorder-list--item-background",
|
|
33689
|
+
"type": "color",
|
|
33690
|
+
"default": "transparent",
|
|
33691
|
+
"part": "",
|
|
33692
|
+
"property": "item-background",
|
|
33693
|
+
"description": "Item placement background."
|
|
33694
|
+
},
|
|
33695
|
+
{
|
|
33696
|
+
"name": "--c2-reorder-list--item-padding",
|
|
33697
|
+
"type": "length",
|
|
33698
|
+
"default": "0px",
|
|
33699
|
+
"part": "",
|
|
33700
|
+
"property": "item-padding",
|
|
33701
|
+
"description": "Item placement padding."
|
|
33702
|
+
},
|
|
33703
|
+
{
|
|
33704
|
+
"name": "--c2-reorder-list--divider-height",
|
|
33705
|
+
"type": "length",
|
|
33706
|
+
"default": "0px",
|
|
33707
|
+
"part": "",
|
|
33708
|
+
"property": "divider-height",
|
|
33709
|
+
"description": "Divider thickness."
|
|
33710
|
+
},
|
|
33711
|
+
{
|
|
33712
|
+
"name": "--c2-reorder-list--divider-color",
|
|
33713
|
+
"type": "color",
|
|
33714
|
+
"default": "#bcbcc6",
|
|
33715
|
+
"part": "",
|
|
33716
|
+
"property": "divider-color",
|
|
33717
|
+
"description": "Divider color."
|
|
33718
|
+
},
|
|
33719
|
+
{
|
|
33720
|
+
"name": "--c2-reorder-list--placeholder-background",
|
|
33721
|
+
"type": "color",
|
|
33722
|
+
"default": "rgb(37 99 235 / 8%)",
|
|
33723
|
+
"part": "",
|
|
33724
|
+
"property": "placeholder-background",
|
|
33725
|
+
"description": "Placeholder background."
|
|
33726
|
+
},
|
|
33727
|
+
{
|
|
33728
|
+
"name": "--c2-reorder-list--dragging-item-background",
|
|
33729
|
+
"type": "color",
|
|
33730
|
+
"default": "transparent",
|
|
33731
|
+
"part": "",
|
|
33732
|
+
"property": "dragging-item-background",
|
|
33733
|
+
"description": "Pointer-preview background."
|
|
33734
|
+
},
|
|
33735
|
+
{
|
|
33736
|
+
"name": "--c2-reorder-list__item__focus--outline-width",
|
|
33737
|
+
"type": "length",
|
|
33738
|
+
"default": "2px",
|
|
33739
|
+
"part": "item",
|
|
33740
|
+
"state": "focus",
|
|
33741
|
+
"property": "outline-width",
|
|
33742
|
+
"description": "Keyboard focus-ring width."
|
|
33743
|
+
},
|
|
33744
|
+
{
|
|
33745
|
+
"name": "--c2-reorder-list__item__focus--outline-color",
|
|
33746
|
+
"type": "color",
|
|
33747
|
+
"default": "#2563eb",
|
|
33748
|
+
"part": "item",
|
|
33749
|
+
"state": "focus",
|
|
33750
|
+
"property": "outline-color",
|
|
33751
|
+
"description": "Keyboard focus-ring color."
|
|
33752
|
+
},
|
|
33753
|
+
{
|
|
33754
|
+
"name": "--c2-reorder-list__item__focus--outline-offset",
|
|
33755
|
+
"type": "length",
|
|
33756
|
+
"default": "2px",
|
|
33757
|
+
"part": "item",
|
|
33758
|
+
"state": "focus",
|
|
33759
|
+
"property": "outline-offset",
|
|
33760
|
+
"description": "Keyboard focus-ring offset."
|
|
33761
|
+
},
|
|
33762
|
+
{
|
|
33763
|
+
"name": "--c2-reorder-list__item__active--opacity",
|
|
33764
|
+
"type": "number",
|
|
33765
|
+
"default": "0.45",
|
|
33766
|
+
"part": "item",
|
|
33767
|
+
"state": "active",
|
|
33768
|
+
"property": "opacity",
|
|
33769
|
+
"description": "Active source opacity."
|
|
33770
|
+
},
|
|
33771
|
+
{
|
|
33772
|
+
"name": "--c2-reorder-list__placeholder--border-width",
|
|
33773
|
+
"type": "length",
|
|
33774
|
+
"default": "2px",
|
|
33775
|
+
"part": "placeholder",
|
|
33776
|
+
"property": "border-width",
|
|
33777
|
+
"description": "Destination border width."
|
|
33778
|
+
},
|
|
33779
|
+
{
|
|
33780
|
+
"name": "--c2-reorder-list__placeholder--border-style",
|
|
33781
|
+
"type": "string",
|
|
33782
|
+
"default": "dashed",
|
|
33783
|
+
"part": "placeholder",
|
|
33784
|
+
"property": "border-style",
|
|
33785
|
+
"description": "Destination border style."
|
|
33786
|
+
},
|
|
33787
|
+
{
|
|
33788
|
+
"name": "--c2-reorder-list__placeholder--border-color",
|
|
33789
|
+
"type": "color",
|
|
33790
|
+
"default": "#2563eb",
|
|
33791
|
+
"part": "placeholder",
|
|
33792
|
+
"property": "border-color",
|
|
33793
|
+
"description": "Destination border color."
|
|
33794
|
+
},
|
|
33795
|
+
{
|
|
33796
|
+
"name": "--c2-reorder-list__dragging-item--opacity",
|
|
33797
|
+
"type": "number",
|
|
33798
|
+
"default": "0.92",
|
|
33799
|
+
"part": "dragging-item",
|
|
33800
|
+
"property": "opacity",
|
|
33801
|
+
"description": "Pointer-preview opacity."
|
|
33802
|
+
},
|
|
33803
|
+
{
|
|
33804
|
+
"name": "--c2-reorder-list__dragging-item--box-shadow",
|
|
33805
|
+
"type": "box-shadow",
|
|
33806
|
+
"default": "0 12px 28px rgb(15 23 42 / 24%)",
|
|
33807
|
+
"part": "dragging-item",
|
|
33808
|
+
"property": "box-shadow",
|
|
33809
|
+
"description": "Pointer-preview shadow."
|
|
33810
|
+
},
|
|
33811
|
+
{
|
|
33812
|
+
"name": "--c2-reorder-list__motion--duration",
|
|
33813
|
+
"type": "time",
|
|
33814
|
+
"default": "160ms",
|
|
33815
|
+
"part": "motion",
|
|
33816
|
+
"property": "duration",
|
|
33817
|
+
"description": "Decorative transition duration; zero under reduced motion."
|
|
33818
|
+
},
|
|
33819
|
+
{
|
|
33820
|
+
"name": "--c2-reorder-list__motion--timing-function",
|
|
33821
|
+
"type": "easing-function",
|
|
33822
|
+
"default": "ease",
|
|
33823
|
+
"part": "motion",
|
|
33824
|
+
"property": "timing-function",
|
|
33825
|
+
"description": "Decorative transition easing."
|
|
33826
|
+
}
|
|
33827
|
+
]
|
|
33400
33828
|
}
|
|
33401
33829
|
],
|
|
33402
33830
|
"composition": {
|
|
@@ -33409,8 +33837,50 @@
|
|
|
33409
33837
|
"import": "import '@c2n/reorder-list'",
|
|
33410
33838
|
"importClass": "import { ReorderList } from '@c2n/reorder-list'"
|
|
33411
33839
|
},
|
|
33412
|
-
"examples": [
|
|
33413
|
-
|
|
33840
|
+
"examples": [
|
|
33841
|
+
{
|
|
33842
|
+
"kind": "usage",
|
|
33843
|
+
"label": "Deployment queue",
|
|
33844
|
+
"html": "\n<c2-reorder-list client:only=\"lit\" class=\"release-queue\" editable aria-label=\"Deployment queue\">\n <div class=\"release-task\" data-reorder-key=\"scope\">Confirm scope</div>\n <div class=\"release-task\" data-reorder-key=\"changelog\">Update changelog</div>\n <div class=\"release-task\" data-reorder-key=\"test\">Run tests</div>\n <div class=\"release-task\" data-reorder-key=\"build\">Build packages</div>\n <div class=\"release-task\" data-reorder-key=\"publish\">Publish packages</div>\n <div class=\"release-task\" data-reorder-key=\"verify\">Verify deployment</div>\n</c2-reorder-list>",
|
|
33845
|
+
"css": ".release-queue {\n --c2-reorder-list--container-gap: 6px;\n}\n.release-task {\n padding: 12px;\n border: 1px solid #d4d4d8;\n border-radius: 8px;\n background: white;\n color: #18181b;\n}"
|
|
33846
|
+
},
|
|
33847
|
+
{
|
|
33848
|
+
"kind": "gallery",
|
|
33849
|
+
"label": "Default",
|
|
33850
|
+
"section": "Presets",
|
|
33851
|
+
"description": "Default Presets example for c2-reorder-list.",
|
|
33852
|
+
"isDefault": true,
|
|
33853
|
+
"tags": [
|
|
33854
|
+
"c2-reorder-list"
|
|
33855
|
+
],
|
|
33856
|
+
"html": "<c2-reorder-list client:only=\"lit\" editable aria-label=\"Release queue\">\n <div data-reorder-key=\"verify\" data-reorder-label=\"Verify release\">Verify release</div>\n <div data-fixed data-reorder-key=\"approval\" data-reorder-label=\"Required approval\">Required approval · pinned</div>\n <div data-reorder-key=\"publish\" data-reorder-label=\"Publish package\">Publish package</div>\n</c2-reorder-list>"
|
|
33857
|
+
},
|
|
33858
|
+
{
|
|
33859
|
+
"kind": "gallery",
|
|
33860
|
+
"label": "Operations queue",
|
|
33861
|
+
"section": "Presets",
|
|
33862
|
+
"description": "Operations queue Presets example for c2-reorder-list.",
|
|
33863
|
+
"isDefault": false,
|
|
33864
|
+
"tags": [
|
|
33865
|
+
"c2-reorder-list"
|
|
33866
|
+
],
|
|
33867
|
+
"html": "<c2-reorder-list client:only=\"lit\" class=\"operations-queue\" editable aria-label=\"Incident response queue\">\n <article class=\"operation\" data-reorder-key=\"triage\" data-reorder-label=\"Triage incident\"><strong>Triage incident</strong><span>Now</span></article>\n <article class=\"operation\" data-fixed data-reorder-key=\"review\" data-reorder-label=\"Security review\">\n <strong>Security review</strong><span>Pinned</span>\n </article>\n <article class=\"operation\" data-reorder-key=\"notify\" data-reorder-label=\"Notify customers\"><strong>Notify customers</strong><span>Waiting</span></article>\n <div class=\"operation\" slot=\"placeholder\">Drop response step here</div>\n <div class=\"operation\" slot=\"dragging-item\">Moving response step</div>\n</c2-reorder-list>",
|
|
33868
|
+
"css": ".operations-queue {\n --c2-reorder-list--container-gap: 10px;\n --c2-reorder-list--container-padding: 12px;\n --c2-reorder-list__item__focus--outline-color: #7c3aed;\n --c2-reorder-list__placeholder--border-color: #7c3aed;\n --c2-reorder-list__dragging-item--box-shadow: 0 18px 40px rgb(76 29 149 / 28%);\n}\n.operations-queue::part(container) {\n border: 1px solid #ddd6fe;\n border-radius: 14px;\n background: #faf5ff;\n}\n.operations-queue::part(item),\n.operations-queue::part(dragging-item) {\n border-radius: 10px;\n}\n.operation {\n display: flex;\n justify-content: space-between;\n gap: 16px;\n padding: 14px;\n border: 1px solid #ddd6fe;\n border-radius: 10px;\n background: white;\n color: #2e1065;\n}\n.operation[data-fixed] {\n background: #f3e8ff;\n}"
|
|
33869
|
+
},
|
|
33870
|
+
{
|
|
33871
|
+
"kind": "gallery",
|
|
33872
|
+
"label": "Compact backlog",
|
|
33873
|
+
"section": "Presets",
|
|
33874
|
+
"description": "Compact backlog Presets example for c2-reorder-list.",
|
|
33875
|
+
"isDefault": false,
|
|
33876
|
+
"tags": [
|
|
33877
|
+
"c2-reorder-list"
|
|
33878
|
+
],
|
|
33879
|
+
"html": "<c2-reorder-list client:only=\"lit\" class=\"compact-backlog\" editable aria-label=\"Compact backlog\">\n <span data-reorder-key=\"one\">Confirm scope</span>\n <span data-reorder-key=\"two\">Ship implementation</span>\n <span data-reorder-key=\"three\">Review metrics</span>\n</c2-reorder-list>",
|
|
33880
|
+
"css": ".compact-backlog {\n --c2-reorder-list--container-gap: 4px;\n --c2-reorder-list--item-padding: 8px 10px;\n --c2-reorder-list__motion--duration: 100ms;\n}\n.compact-backlog::part(item) {\n border: 1px solid #d4d4d8;\n border-radius: 7px;\n background: white;\n}"
|
|
33881
|
+
}
|
|
33882
|
+
],
|
|
33883
|
+
"hasGallery": true
|
|
33414
33884
|
},
|
|
33415
33885
|
"scatter-chart": {
|
|
33416
33886
|
"id": "scatter-chart",
|
|
@@ -33637,7 +34107,7 @@
|
|
|
33637
34107
|
},
|
|
33638
34108
|
{
|
|
33639
34109
|
"name": "tooltip",
|
|
33640
|
-
"description": "
|
|
34110
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
33641
34111
|
},
|
|
33642
34112
|
{
|
|
33643
34113
|
"name": "actions",
|
|
@@ -33645,11 +34115,11 @@
|
|
|
33645
34115
|
},
|
|
33646
34116
|
{
|
|
33647
34117
|
"name": "state",
|
|
33648
|
-
"description": "
|
|
34118
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
33649
34119
|
},
|
|
33650
34120
|
{
|
|
33651
34121
|
"name": "legend",
|
|
33652
|
-
"description": "
|
|
34122
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
33653
34123
|
},
|
|
33654
34124
|
{
|
|
33655
34125
|
"name": "legend-item",
|
|
@@ -35573,15 +36043,15 @@
|
|
|
35573
36043
|
"cssParts": [
|
|
35574
36044
|
{
|
|
35575
36045
|
"name": "seperator",
|
|
35576
|
-
"description": "
|
|
36046
|
+
"description": "The outer separator layout container."
|
|
35577
36047
|
},
|
|
35578
36048
|
{
|
|
35579
36049
|
"name": "line",
|
|
35580
|
-
"description": "
|
|
36050
|
+
"description": "Each line segment on either side of the optional label."
|
|
35581
36051
|
},
|
|
35582
36052
|
{
|
|
35583
36053
|
"name": "label",
|
|
35584
|
-
"description": "
|
|
36054
|
+
"description": "Container for the optional default slot."
|
|
35585
36055
|
}
|
|
35586
36056
|
],
|
|
35587
36057
|
"cssProperties": [
|
|
@@ -36010,23 +36480,23 @@
|
|
|
36010
36480
|
"cssParts": [
|
|
36011
36481
|
{
|
|
36012
36482
|
"name": "panel",
|
|
36013
|
-
"description": "
|
|
36483
|
+
"description": "The sheet surface positioned over the overlay."
|
|
36014
36484
|
},
|
|
36015
36485
|
{
|
|
36016
36486
|
"name": "header",
|
|
36017
|
-
"description": "
|
|
36487
|
+
"description": "Header containing the title and optional close button."
|
|
36018
36488
|
},
|
|
36019
36489
|
{
|
|
36020
36490
|
"name": "close",
|
|
36021
|
-
"description": "
|
|
36491
|
+
"description": "The native close button."
|
|
36022
36492
|
},
|
|
36023
36493
|
{
|
|
36024
36494
|
"name": "body",
|
|
36025
|
-
"description": "
|
|
36495
|
+
"description": "Scrollable container for the default slot."
|
|
36026
36496
|
},
|
|
36027
36497
|
{
|
|
36028
36498
|
"name": "footer",
|
|
36029
|
-
"description": "
|
|
36499
|
+
"description": "Container wrapping the assigned `footer` slot actions."
|
|
36030
36500
|
}
|
|
36031
36501
|
],
|
|
36032
36502
|
"cssProperties": [
|
|
@@ -37150,7 +37620,7 @@
|
|
|
37150
37620
|
"cssParts": [
|
|
37151
37621
|
{
|
|
37152
37622
|
"name": "block",
|
|
37153
|
-
"description": "
|
|
37623
|
+
"description": "Each animated placeholder block."
|
|
37154
37624
|
}
|
|
37155
37625
|
],
|
|
37156
37626
|
"cssProperties": [
|
|
@@ -37565,19 +38035,19 @@
|
|
|
37565
38035
|
"cssParts": [
|
|
37566
38036
|
{
|
|
37567
38037
|
"name": "track",
|
|
37568
|
-
"description": "
|
|
38038
|
+
"description": "The complete slider track."
|
|
37569
38039
|
},
|
|
37570
38040
|
{
|
|
37571
38041
|
"name": "fill",
|
|
37572
|
-
"description": "
|
|
38042
|
+
"description": "The track segment before the current value."
|
|
37573
38043
|
},
|
|
37574
38044
|
{
|
|
37575
38045
|
"name": "thumb",
|
|
37576
|
-
"description": "
|
|
38046
|
+
"description": "The draggable value handle."
|
|
37577
38047
|
},
|
|
37578
38048
|
{
|
|
37579
38049
|
"name": "value",
|
|
37580
|
-
"description": "
|
|
38050
|
+
"description": "The value bubble shown above the thumb when `show-value` is set."
|
|
37581
38051
|
}
|
|
37582
38052
|
],
|
|
37583
38053
|
"cssProperties": [
|
|
@@ -38259,7 +38729,7 @@
|
|
|
38259
38729
|
},
|
|
38260
38730
|
{
|
|
38261
38731
|
"name": "tooltip",
|
|
38262
|
-
"description": "
|
|
38732
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
38263
38733
|
},
|
|
38264
38734
|
{
|
|
38265
38735
|
"name": "actions",
|
|
@@ -38267,11 +38737,11 @@
|
|
|
38267
38737
|
},
|
|
38268
38738
|
{
|
|
38269
38739
|
"name": "state",
|
|
38270
|
-
"description": "
|
|
38740
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
38271
38741
|
},
|
|
38272
38742
|
{
|
|
38273
38743
|
"name": "legend",
|
|
38274
|
-
"description": "
|
|
38744
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
38275
38745
|
},
|
|
38276
38746
|
{
|
|
38277
38747
|
"name": "legend-item",
|
|
@@ -39163,19 +39633,19 @@
|
|
|
39163
39633
|
"cssParts": [
|
|
39164
39634
|
{
|
|
39165
39635
|
"name": "ring",
|
|
39166
|
-
"description": "
|
|
39636
|
+
"description": "The SVG containing the spinner track and animated arc."
|
|
39167
39637
|
},
|
|
39168
39638
|
{
|
|
39169
39639
|
"name": "track",
|
|
39170
|
-
"description": "
|
|
39640
|
+
"description": "The stationary background circle."
|
|
39171
39641
|
},
|
|
39172
39642
|
{
|
|
39173
39643
|
"name": "arc",
|
|
39174
|
-
"description": "
|
|
39644
|
+
"description": "The animated foreground circle."
|
|
39175
39645
|
},
|
|
39176
39646
|
{
|
|
39177
39647
|
"name": "label",
|
|
39178
|
-
"description": "
|
|
39648
|
+
"description": "Container for the optional loading text."
|
|
39179
39649
|
}
|
|
39180
39650
|
],
|
|
39181
39651
|
"cssProperties": [
|
|
@@ -39549,27 +40019,27 @@
|
|
|
39549
40019
|
"cssParts": [
|
|
39550
40020
|
{
|
|
39551
40021
|
"name": "container",
|
|
39552
|
-
"description": "
|
|
40022
|
+
"description": "The outer statistic layout container."
|
|
39553
40023
|
},
|
|
39554
40024
|
{
|
|
39555
40025
|
"name": "icon",
|
|
39556
|
-
"description": "
|
|
40026
|
+
"description": "Container wrapping the assigned leading `icon` slot."
|
|
39557
40027
|
},
|
|
39558
40028
|
{
|
|
39559
40029
|
"name": "value",
|
|
39560
|
-
"description": "
|
|
40030
|
+
"description": "Container wrapping the assigned primary `value` slot."
|
|
39561
40031
|
},
|
|
39562
40032
|
{
|
|
39563
40033
|
"name": "trend",
|
|
39564
|
-
"description": "
|
|
40034
|
+
"description": "Container wrapping the assigned `trend` slot badge or text."
|
|
39565
40035
|
},
|
|
39566
40036
|
{
|
|
39567
40037
|
"name": "label",
|
|
39568
|
-
"description": "
|
|
40038
|
+
"description": "Container wrapping the assigned statistic `label` slot."
|
|
39569
40039
|
},
|
|
39570
40040
|
{
|
|
39571
40041
|
"name": "description",
|
|
39572
|
-
"description": "
|
|
40042
|
+
"description": "Container wrapping the assigned supporting `description` slot."
|
|
39573
40043
|
}
|
|
39574
40044
|
],
|
|
39575
40045
|
"cssProperties": [
|
|
@@ -39945,7 +40415,28 @@
|
|
|
39945
40415
|
}
|
|
39946
40416
|
],
|
|
39947
40417
|
"events": [],
|
|
39948
|
-
"cssParts": [
|
|
40418
|
+
"cssParts": [
|
|
40419
|
+
{
|
|
40420
|
+
"name": "media",
|
|
40421
|
+
"description": "Container for the `media` slot and its status-icon fallback; always present."
|
|
40422
|
+
},
|
|
40423
|
+
{
|
|
40424
|
+
"name": "title",
|
|
40425
|
+
"description": "Heading region for the `title` slot or `heading` fallback; hidden when both are empty."
|
|
40426
|
+
},
|
|
40427
|
+
{
|
|
40428
|
+
"name": "description",
|
|
40429
|
+
"description": "Supporting-copy region for the `description` slot or attribute fallback; hidden when both are empty."
|
|
40430
|
+
},
|
|
40431
|
+
{
|
|
40432
|
+
"name": "content",
|
|
40433
|
+
"description": "Additional-details region around the `content` slot; hidden while the slot is empty."
|
|
40434
|
+
},
|
|
40435
|
+
{
|
|
40436
|
+
"name": "actions",
|
|
40437
|
+
"description": "Action row around the `actions` slot; hidden while the slot is empty."
|
|
40438
|
+
}
|
|
40439
|
+
],
|
|
39949
40440
|
"cssProperties": [
|
|
39950
40441
|
{
|
|
39951
40442
|
"name": "--c2-status-panel__container--width",
|
|
@@ -40584,11 +41075,11 @@
|
|
|
40584
41075
|
},
|
|
40585
41076
|
{
|
|
40586
41077
|
"name": "toggle",
|
|
40587
|
-
"description": "
|
|
41078
|
+
"description": "Disclosure region containing the assigned `toggle` slot for a group."
|
|
40588
41079
|
},
|
|
40589
41080
|
{
|
|
40590
41081
|
"name": "marker",
|
|
40591
|
-
"description": "
|
|
41082
|
+
"description": "Round marker region containing the `marker` slot or status fallback at the start of the row."
|
|
40592
41083
|
},
|
|
40593
41084
|
{
|
|
40594
41085
|
"name": "rail",
|
|
@@ -40596,15 +41087,15 @@
|
|
|
40596
41087
|
},
|
|
40597
41088
|
{
|
|
40598
41089
|
"name": "label",
|
|
40599
|
-
"description": "
|
|
41090
|
+
"description": "Primary-text region containing the `label` slot or property fallback."
|
|
40600
41091
|
},
|
|
40601
41092
|
{
|
|
40602
41093
|
"name": "detail",
|
|
40603
|
-
"description": "
|
|
41094
|
+
"description": "Secondary-text region containing the `detail` slot or property fallback."
|
|
40604
41095
|
},
|
|
40605
41096
|
{
|
|
40606
41097
|
"name": "trailing",
|
|
40607
|
-
"description": "
|
|
41098
|
+
"description": "End-aligned text region containing the `trailing` slot or property fallback."
|
|
40608
41099
|
},
|
|
40609
41100
|
{
|
|
40610
41101
|
"name": "children",
|
|
@@ -41358,31 +41849,31 @@
|
|
|
41358
41849
|
"cssParts": [
|
|
41359
41850
|
{
|
|
41360
41851
|
"name": "control",
|
|
41361
|
-
"description": "
|
|
41852
|
+
"description": "The switch control, excluding its label and description."
|
|
41362
41853
|
},
|
|
41363
41854
|
{
|
|
41364
41855
|
"name": "track",
|
|
41365
|
-
"description": "
|
|
41856
|
+
"description": "The switch track."
|
|
41366
41857
|
},
|
|
41367
41858
|
{
|
|
41368
41859
|
"name": "thumb",
|
|
41369
|
-
"description": "
|
|
41860
|
+
"description": "The movable switch thumb."
|
|
41370
41861
|
},
|
|
41371
41862
|
{
|
|
41372
41863
|
"name": "unchecked-icon",
|
|
41373
|
-
"description": "
|
|
41864
|
+
"description": "Icon region containing the `unchecked-icon` slot inside the thumb while off."
|
|
41374
41865
|
},
|
|
41375
41866
|
{
|
|
41376
41867
|
"name": "checked-icon",
|
|
41377
|
-
"description": "
|
|
41868
|
+
"description": "Icon region containing the `checked-icon` slot inside the thumb while on."
|
|
41378
41869
|
},
|
|
41379
41870
|
{
|
|
41380
41871
|
"name": "label",
|
|
41381
|
-
"description": "
|
|
41872
|
+
"description": "The switch label."
|
|
41382
41873
|
},
|
|
41383
41874
|
{
|
|
41384
41875
|
"name": "description",
|
|
41385
|
-
"description": "
|
|
41876
|
+
"description": "Supporting-text region containing the `description` slot below the label."
|
|
41386
41877
|
}
|
|
41387
41878
|
],
|
|
41388
41879
|
"cssProperties": [
|
|
@@ -42067,6 +42558,10 @@
|
|
|
42067
42558
|
"name": "error",
|
|
42068
42559
|
"description": "Replaces the built-in message shown when `error` is set."
|
|
42069
42560
|
},
|
|
42561
|
+
{
|
|
42562
|
+
"name": "fallback",
|
|
42563
|
+
"description": "Meaningful server-rendered table content. It remains visible before custom-element upgrade and is retained in the light DOM but hidden after the interactive grid mounts, avoiding duplicate client content."
|
|
42564
|
+
},
|
|
42070
42565
|
{
|
|
42071
42566
|
"name": "cell:{rowKey}:{field}",
|
|
42072
42567
|
"description": "Body of one cell of a column marked `cell-slot`, e.g. `slot=\"cell:AAPL:change\"`. Lets a framework render a cell with its own template language instead of a `renderCell` function; the column's `renderCell` or formatted value stays as the fallback."
|
|
@@ -42107,67 +42602,67 @@
|
|
|
42107
42602
|
"cssParts": [
|
|
42108
42603
|
{
|
|
42109
42604
|
"name": "toolbar",
|
|
42110
|
-
"description": "
|
|
42605
|
+
"description": "Row above the grid containing the `toolbar` slot."
|
|
42111
42606
|
},
|
|
42112
42607
|
{
|
|
42113
42608
|
"name": "viewport",
|
|
42114
|
-
"description": "
|
|
42609
|
+
"description": "Scrollable container around the grid."
|
|
42115
42610
|
},
|
|
42116
42611
|
{
|
|
42117
42612
|
"name": "grid",
|
|
42118
|
-
"description": "
|
|
42613
|
+
"description": "The ARIA grid containing the header and body rows."
|
|
42119
42614
|
},
|
|
42120
42615
|
{
|
|
42121
42616
|
"name": "footer",
|
|
42122
|
-
"description": "
|
|
42617
|
+
"description": "Row below the grid containing the `footer` slot."
|
|
42123
42618
|
},
|
|
42124
42619
|
{
|
|
42125
42620
|
"name": "state",
|
|
42126
|
-
"description": "
|
|
42621
|
+
"description": "Shared cell containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
42127
42622
|
},
|
|
42128
42623
|
{
|
|
42129
42624
|
"name": "header-row",
|
|
42130
|
-
"description": "
|
|
42625
|
+
"description": "The grid header row."
|
|
42131
42626
|
},
|
|
42132
42627
|
{
|
|
42133
42628
|
"name": "header-cell",
|
|
42134
|
-
"description": "
|
|
42629
|
+
"description": "Every column header cell."
|
|
42135
42630
|
},
|
|
42136
42631
|
{
|
|
42137
42632
|
"name": "selection-header-cell",
|
|
42138
|
-
"description": "
|
|
42633
|
+
"description": "The header cell containing the select-all checkbox."
|
|
42139
42634
|
},
|
|
42140
42635
|
{
|
|
42141
42636
|
"name": "resizer",
|
|
42142
|
-
"description": "
|
|
42637
|
+
"description": "The pointer target used to resize a column."
|
|
42143
42638
|
},
|
|
42144
42639
|
{
|
|
42145
42640
|
"name": "sort-icon",
|
|
42146
|
-
"description": "
|
|
42641
|
+
"description": "The sort-direction indicator in a sortable header."
|
|
42147
42642
|
},
|
|
42148
42643
|
{
|
|
42149
42644
|
"name": "cell",
|
|
42150
|
-
"description": "
|
|
42645
|
+
"description": "Every body grid cell."
|
|
42151
42646
|
},
|
|
42152
42647
|
{
|
|
42153
42648
|
"name": "selection-cell",
|
|
42154
|
-
"description": "
|
|
42649
|
+
"description": "A body cell containing a row-selection checkbox."
|
|
42155
42650
|
},
|
|
42156
42651
|
{
|
|
42157
42652
|
"name": "skeleton",
|
|
42158
|
-
"description": "
|
|
42653
|
+
"description": "Placeholder displayed while a remote row is loading."
|
|
42159
42654
|
},
|
|
42160
42655
|
{
|
|
42161
42656
|
"name": "cell-content",
|
|
42162
|
-
"description": "
|
|
42657
|
+
"description": "The content wrapper inside a body cell."
|
|
42163
42658
|
},
|
|
42164
42659
|
{
|
|
42165
42660
|
"name": "row",
|
|
42166
|
-
"description": "
|
|
42661
|
+
"description": "Every rendered body row."
|
|
42167
42662
|
},
|
|
42168
42663
|
{
|
|
42169
42664
|
"name": "row-selected",
|
|
42170
|
-
"description": "
|
|
42665
|
+
"description": "A body row while it is selected; exposed in addition to `row`."
|
|
42171
42666
|
}
|
|
42172
42667
|
],
|
|
42173
42668
|
"cssProperties": [
|
|
@@ -42754,12 +43249,12 @@
|
|
|
42754
43249
|
{
|
|
42755
43250
|
"name": "sortable",
|
|
42756
43251
|
"type": "boolean | undefined",
|
|
42757
|
-
"description": "Lets the user sort by this column.
|
|
43252
|
+
"description": "Lets the user sort by this column. Absent inherits the table's `sortable`; `sortable=\"false\"` opts out."
|
|
42758
43253
|
},
|
|
42759
43254
|
{
|
|
42760
43255
|
"name": "resizable",
|
|
42761
43256
|
"type": "boolean | undefined",
|
|
42762
|
-
"description": "Lets the user drag the column's trailing edge.
|
|
43257
|
+
"description": "Lets the user drag the column's trailing edge. Absent inherits the table's `resizable`; `resizable=\"false\"` opts out."
|
|
42763
43258
|
},
|
|
42764
43259
|
{
|
|
42765
43260
|
"name": "pinned",
|
|
@@ -44108,7 +44603,7 @@
|
|
|
44108
44603
|
"description": "A single-line input wrapped in a themeable field. The native `<input>` keeps its behaviour (`type`, `name`,\n`autocomplete`, `maxlength`, `pattern`, `input`/`change` events); the field adds `prefix-icon` / `suffix-icon` slots\nsized by `--c2-text-field__icon--size`, an optional clear button (`clearable`), helper text (`help`), an error\nmessage (`error` + `error-text`), a character counter when `maxlength` is set, and a `help-icon` slot beside the\nfield. Pair it with `c2-label` for a caption. Give the host a `width`: the field fills it.",
|
|
44109
44604
|
"attributes": [
|
|
44110
44605
|
{
|
|
44111
|
-
"name": "
|
|
44606
|
+
"name": "readonly",
|
|
44112
44607
|
"type": "boolean",
|
|
44113
44608
|
"default": "false",
|
|
44114
44609
|
"description": "Shows the value but refuses edits. Rendered on a light grey background."
|
|
@@ -44126,13 +44621,13 @@
|
|
|
44126
44621
|
"description": "Marks the field invalid: red border and, when set, `error-text` replaces the helper text."
|
|
44127
44622
|
},
|
|
44128
44623
|
{
|
|
44129
|
-
"name": "
|
|
44624
|
+
"name": "maxlength",
|
|
44130
44625
|
"type": "number",
|
|
44131
44626
|
"default": "-1",
|
|
44132
44627
|
"description": "Maximum number of characters. Forwarded to the input and shown as a `n / max` counter under the field."
|
|
44133
44628
|
},
|
|
44134
44629
|
{
|
|
44135
|
-
"name": "
|
|
44630
|
+
"name": "minlength",
|
|
44136
44631
|
"type": "number",
|
|
44137
44632
|
"default": "-1",
|
|
44138
44633
|
"description": "Minimum number of characters, forwarded to the input."
|
|
@@ -44761,7 +45256,7 @@
|
|
|
44761
45256
|
"description": "A `c2-text-field` that always shows a clear button while it has a value. Prefer `c2-text-field` with the\n`clearable` attribute; this element remains for markup that cannot toggle attributes. Inherits every attribute,\nslot, event and CSS variable of `c2-text-field`.",
|
|
44762
45257
|
"attributes": [
|
|
44763
45258
|
{
|
|
44764
|
-
"name": "
|
|
45259
|
+
"name": "readonly",
|
|
44765
45260
|
"type": "boolean",
|
|
44766
45261
|
"default": "false",
|
|
44767
45262
|
"description": "Shows the value but refuses edits. Rendered on a light grey background."
|
|
@@ -44779,13 +45274,13 @@
|
|
|
44779
45274
|
"description": "Marks the field invalid: red border and, when set, `error-text` replaces the helper text."
|
|
44780
45275
|
},
|
|
44781
45276
|
{
|
|
44782
|
-
"name": "
|
|
45277
|
+
"name": "maxlength",
|
|
44783
45278
|
"type": "number",
|
|
44784
45279
|
"default": "-1",
|
|
44785
45280
|
"description": "Maximum number of characters. Forwarded to the input and shown as a `n / max` counter under the field."
|
|
44786
45281
|
},
|
|
44787
45282
|
{
|
|
44788
|
-
"name": "
|
|
45283
|
+
"name": "minlength",
|
|
44789
45284
|
"type": "number",
|
|
44790
45285
|
"default": "-1",
|
|
44791
45286
|
"description": "Minimum number of characters, forwarded to the input."
|
|
@@ -46130,7 +46625,7 @@
|
|
|
46130
46625
|
"description": "Prevents editing and removes the control from keyboard navigation."
|
|
46131
46626
|
},
|
|
46132
46627
|
{
|
|
46133
|
-
"name": "
|
|
46628
|
+
"name": "readonly",
|
|
46134
46629
|
"type": "boolean",
|
|
46135
46630
|
"default": "false",
|
|
46136
46631
|
"description": "Prevents editing while allowing selection."
|
|
@@ -46142,13 +46637,13 @@
|
|
|
46142
46637
|
"description": "Requires a nonempty value for native validation."
|
|
46143
46638
|
},
|
|
46144
46639
|
{
|
|
46145
|
-
"name": "
|
|
46640
|
+
"name": "maxlength",
|
|
46146
46641
|
"type": "number",
|
|
46147
46642
|
"default": "-1",
|
|
46148
46643
|
"description": "Maximum character count; -1 means unlimited."
|
|
46149
46644
|
},
|
|
46150
46645
|
{
|
|
46151
|
-
"name": "
|
|
46646
|
+
"name": "minlength",
|
|
46152
46647
|
"type": "number",
|
|
46153
46648
|
"default": "-1",
|
|
46154
46649
|
"description": "Minimum character count; -1 means no minimum."
|
|
@@ -46198,11 +46693,11 @@
|
|
|
46198
46693
|
"cssParts": [
|
|
46199
46694
|
{
|
|
46200
46695
|
"name": "textarea",
|
|
46201
|
-
"description": "
|
|
46696
|
+
"description": "The native textarea control."
|
|
46202
46697
|
},
|
|
46203
46698
|
{
|
|
46204
46699
|
"name": "supporting-text",
|
|
46205
|
-
"description": "
|
|
46700
|
+
"description": "Container wrapping the `supporting-text` slot or generated help and validation fallback."
|
|
46206
46701
|
}
|
|
46207
46702
|
],
|
|
46208
46703
|
"cssProperties": [
|
|
@@ -46610,7 +47105,7 @@
|
|
|
46610
47105
|
},
|
|
46611
47106
|
{
|
|
46612
47107
|
"name": "check",
|
|
46613
|
-
"description": "
|
|
47108
|
+
"description": "Marker region containing the `check` slot or fallback beside the selected row."
|
|
46614
47109
|
}
|
|
46615
47110
|
],
|
|
46616
47111
|
"cssProperties": [
|
|
@@ -47199,35 +47694,35 @@
|
|
|
47199
47694
|
"cssParts": [
|
|
47200
47695
|
{
|
|
47201
47696
|
"name": "container",
|
|
47202
|
-
"description": "
|
|
47697
|
+
"description": "The notification card surface."
|
|
47203
47698
|
},
|
|
47204
47699
|
{
|
|
47205
47700
|
"name": "icon",
|
|
47206
|
-
"description": "
|
|
47701
|
+
"description": "Container wrapping the assigned leading `icon` slot."
|
|
47207
47702
|
},
|
|
47208
47703
|
{
|
|
47209
47704
|
"name": "heading",
|
|
47210
|
-
"description": "
|
|
47705
|
+
"description": "The optional notification heading."
|
|
47211
47706
|
},
|
|
47212
47707
|
{
|
|
47213
47708
|
"name": "message",
|
|
47214
|
-
"description": "
|
|
47709
|
+
"description": "Container for the notification message."
|
|
47215
47710
|
},
|
|
47216
47711
|
{
|
|
47217
47712
|
"name": "action",
|
|
47218
|
-
"description": "
|
|
47713
|
+
"description": "Button region containing the optional assigned `action` slot."
|
|
47219
47714
|
},
|
|
47220
47715
|
{
|
|
47221
47716
|
"name": "close",
|
|
47222
|
-
"description": "
|
|
47717
|
+
"description": "The dismiss button."
|
|
47223
47718
|
},
|
|
47224
47719
|
{
|
|
47225
47720
|
"name": "progress",
|
|
47226
|
-
"description": "
|
|
47721
|
+
"description": "The countdown track shown while progress is enabled."
|
|
47227
47722
|
},
|
|
47228
47723
|
{
|
|
47229
47724
|
"name": "progress-bar",
|
|
47230
|
-
"description": "
|
|
47725
|
+
"description": "The remaining-time fill inside the countdown track."
|
|
47231
47726
|
}
|
|
47232
47727
|
],
|
|
47233
47728
|
"cssProperties": [
|
|
@@ -47492,7 +47987,7 @@
|
|
|
47492
47987
|
"cssParts": [
|
|
47493
47988
|
{
|
|
47494
47989
|
"name": "stack",
|
|
47495
|
-
"description": "
|
|
47990
|
+
"description": "The live-region container that positions and stacks visible toasts."
|
|
47496
47991
|
}
|
|
47497
47992
|
],
|
|
47498
47993
|
"cssProperties": [
|
|
@@ -48587,11 +49082,11 @@
|
|
|
48587
49082
|
},
|
|
48588
49083
|
{
|
|
48589
49084
|
"name": "label",
|
|
48590
|
-
"description": "
|
|
49085
|
+
"description": "Text box containing the `label` slot or label-property fallback."
|
|
48591
49086
|
},
|
|
48592
49087
|
{
|
|
48593
49088
|
"name": "actions",
|
|
48594
|
-
"description": "
|
|
49089
|
+
"description": "Trailing box wrapping the assigned `actions` slot."
|
|
48595
49090
|
},
|
|
48596
49091
|
{
|
|
48597
49092
|
"name": "group",
|
|
@@ -48599,7 +49094,7 @@
|
|
|
48599
49094
|
},
|
|
48600
49095
|
{
|
|
48601
49096
|
"name": "checkbox",
|
|
48602
|
-
"description": "
|
|
49097
|
+
"description": "The selection checkbox rendered when checkbox selection is enabled."
|
|
48603
49098
|
}
|
|
48604
49099
|
],
|
|
48605
49100
|
"cssProperties": [
|
|
@@ -49226,7 +49721,40 @@
|
|
|
49226
49721
|
"description": "Fired after an item is removed or an active upload is cancelled."
|
|
49227
49722
|
}
|
|
49228
49723
|
],
|
|
49229
|
-
"cssParts": [
|
|
49724
|
+
"cssParts": [
|
|
49725
|
+
{
|
|
49726
|
+
"name": "dropzone",
|
|
49727
|
+
"description": "Interactive drop-zone region containing the icon, prompt, and hint."
|
|
49728
|
+
},
|
|
49729
|
+
{
|
|
49730
|
+
"name": "drop-icon",
|
|
49731
|
+
"description": "Icon boundary wrapping the `drop-icon` slot and fallback icon."
|
|
49732
|
+
},
|
|
49733
|
+
{
|
|
49734
|
+
"name": "prompt",
|
|
49735
|
+
"description": "Instruction region wrapping the `prompt` slot and fallback prompt."
|
|
49736
|
+
},
|
|
49737
|
+
{
|
|
49738
|
+
"name": "hint",
|
|
49739
|
+
"description": "Supporting-text region wrapping the `hint` slot and generated fallback hint."
|
|
49740
|
+
},
|
|
49741
|
+
{
|
|
49742
|
+
"name": "action",
|
|
49743
|
+
"description": "Compact picker label boundary wrapping the `action` slot and fallback label."
|
|
49744
|
+
},
|
|
49745
|
+
{
|
|
49746
|
+
"name": "empty",
|
|
49747
|
+
"description": "Empty-state boundary exposing the `empty` slot."
|
|
49748
|
+
},
|
|
49749
|
+
{
|
|
49750
|
+
"name": "errors",
|
|
49751
|
+
"description": "Validation-error status region."
|
|
49752
|
+
},
|
|
49753
|
+
{
|
|
49754
|
+
"name": "list",
|
|
49755
|
+
"description": "Selected-file list region."
|
|
49756
|
+
}
|
|
49757
|
+
],
|
|
49230
49758
|
"cssProperties": [
|
|
49231
49759
|
{
|
|
49232
49760
|
"name": "--c2-upload--width",
|
|
@@ -49769,41 +50297,41 @@
|
|
|
49769
50297
|
}
|
|
49770
50298
|
],
|
|
49771
50299
|
"cssParts": [
|
|
49772
|
-
{
|
|
49773
|
-
"name": "highlight",
|
|
49774
|
-
"description": "Shadow DOM styling hook for the highlight element."
|
|
49775
|
-
},
|
|
49776
50300
|
{
|
|
49777
50301
|
"name": "search",
|
|
49778
|
-
"description": "
|
|
50302
|
+
"description": "Header row containing the built-in search field and the `search` and `toolbar` slots."
|
|
49779
50303
|
},
|
|
49780
50304
|
{
|
|
49781
50305
|
"name": "viewport",
|
|
49782
|
-
"description": "
|
|
50306
|
+
"description": "Scroll container that holds the listbox and its empty, loading or error state."
|
|
49783
50307
|
},
|
|
49784
50308
|
{
|
|
49785
50309
|
"name": "items",
|
|
49786
|
-
"description": "
|
|
50310
|
+
"description": "Inner listbox containing the rendered rows and virtual-scroll spacers."
|
|
49787
50311
|
},
|
|
49788
50312
|
{
|
|
49789
|
-
"name": "
|
|
49790
|
-
"description": "
|
|
50313
|
+
"name": "item",
|
|
50314
|
+
"description": "Every rendered `c2-list-item`, including loading placeholders."
|
|
49791
50315
|
},
|
|
49792
50316
|
{
|
|
49793
|
-
"name": "
|
|
49794
|
-
"description": "
|
|
50317
|
+
"name": "item-selected",
|
|
50318
|
+
"description": "A rendered item while it is selected; exposed in addition to `item`."
|
|
49795
50319
|
},
|
|
49796
50320
|
{
|
|
49797
|
-
"name": "
|
|
49798
|
-
"description": "
|
|
50321
|
+
"name": "skeleton",
|
|
50322
|
+
"description": "Placeholder shown inside an item while its remote data block is loading."
|
|
49799
50323
|
},
|
|
49800
50324
|
{
|
|
49801
|
-
"name": "
|
|
49802
|
-
"description": "
|
|
50325
|
+
"name": "state",
|
|
50326
|
+
"description": "Shared container for the `empty`, `loading`, or `error` slot and its fallback message."
|
|
49803
50327
|
},
|
|
49804
50328
|
{
|
|
49805
|
-
"name": "
|
|
49806
|
-
"description": "
|
|
50329
|
+
"name": "highlight",
|
|
50330
|
+
"description": "A `<mark>` around text that matches the active search query."
|
|
50331
|
+
},
|
|
50332
|
+
{
|
|
50333
|
+
"name": "footer",
|
|
50334
|
+
"description": "Footer row containing the `footer` slot."
|
|
49807
50335
|
}
|
|
49808
50336
|
],
|
|
49809
50337
|
"cssProperties": [
|
|
@@ -50316,7 +50844,6 @@
|
|
|
50316
50844
|
"c2-date-input": "date-input",
|
|
50317
50845
|
"c2-date-selector": "date-selector",
|
|
50318
50846
|
"c2-details": "details",
|
|
50319
|
-
"c2-dropdown-list": "dropdown-list",
|
|
50320
50847
|
"c2-gauge-chart": "gauge-chart",
|
|
50321
50848
|
"c2-header": "header",
|
|
50322
50849
|
"c2-icon-button": "icon-button",
|
|
@@ -50402,7 +50929,6 @@
|
|
|
50402
50929
|
"@c2n/date-input": "date-input",
|
|
50403
50930
|
"@c2n/date-selector": "date-selector",
|
|
50404
50931
|
"@c2n/details": "details",
|
|
50405
|
-
"@c2n/dropdown-list": "dropdown-list",
|
|
50406
50932
|
"@c2n/feather-icons": "feather-icons",
|
|
50407
50933
|
"@c2n/header": "header",
|
|
50408
50934
|
"@c2n/icon-button": "icon-button",
|
|
@@ -50512,7 +51038,7 @@
|
|
|
50512
51038
|
"light": "#ffffff",
|
|
50513
51039
|
"dark": "#18181b",
|
|
50514
51040
|
"description": "Default surface of inputs, lists, cards, dialogs.",
|
|
50515
|
-
"usedBy":
|
|
51041
|
+
"usedBy": 49
|
|
50516
51042
|
},
|
|
50517
51043
|
{
|
|
50518
51044
|
"name": "--c2-theme--color-surface-container-low",
|
|
@@ -50560,7 +51086,7 @@
|
|
|
50560
51086
|
"light": "#e4e4e7",
|
|
50561
51087
|
"dark": "#27272a",
|
|
50562
51088
|
"description": "Hairline dividers and light borders.",
|
|
50563
|
-
"usedBy":
|
|
51089
|
+
"usedBy": 79
|
|
50564
51090
|
},
|
|
50565
51091
|
{
|
|
50566
51092
|
"name": "--c2-theme--color-outline-strong",
|
|
@@ -50656,7 +51182,7 @@
|
|
|
50656
51182
|
"category": "radius",
|
|
50657
51183
|
"light": "8px",
|
|
50658
51184
|
"description": "Large radius: cards, panels, popovers.",
|
|
50659
|
-
"usedBy":
|
|
51185
|
+
"usedBy": 72
|
|
50660
51186
|
},
|
|
50661
51187
|
{
|
|
50662
51188
|
"name": "--c2-theme--radius-xl",
|
|
@@ -51007,6 +51533,16 @@
|
|
|
51007
51533
|
"--c2-chat-message__header__title--font-weight": "--c2-theme--font-weight-semibold",
|
|
51008
51534
|
"--c2-chat-message__time--color": "--c2-theme--color-on-surface-variant",
|
|
51009
51535
|
"--c2-chat-message__time--font-size": "--c2-theme--font-size-sm",
|
|
51536
|
+
"--c2-chatbot--border-top-left-radius": "--c2-theme--radius-lg",
|
|
51537
|
+
"--c2-chatbot--border-top-right-radius": "--c2-theme--radius-lg",
|
|
51538
|
+
"--c2-chatbot--border-bottom-left-radius": "--c2-theme--radius-lg",
|
|
51539
|
+
"--c2-chatbot--border-bottom-right-radius": "--c2-theme--radius-lg",
|
|
51540
|
+
"--c2-chatbot--border-top": "--c2-theme--color-outline-variant",
|
|
51541
|
+
"--c2-chatbot--border-right": "--c2-theme--color-outline-variant",
|
|
51542
|
+
"--c2-chatbot--border-bottom": "--c2-theme--color-outline-variant",
|
|
51543
|
+
"--c2-chatbot--border-left": "--c2-theme--color-outline-variant",
|
|
51544
|
+
"--c2-chatbot__header--background": "--c2-theme--color-surface",
|
|
51545
|
+
"--c2-chatbot__header--border-bottom": "--c2-theme--color-outline-variant",
|
|
51010
51546
|
"--c2-checkbox__container--border-top-left-radius": "--c2-theme--radius-sm",
|
|
51011
51547
|
"--c2-checkbox__container--border-top-right-radius": "--c2-theme--radius-sm",
|
|
51012
51548
|
"--c2-checkbox__container--border-bottom-left-radius": "--c2-theme--radius-sm",
|
|
@@ -51751,6 +52287,6 @@
|
|
|
51751
52287
|
"workflow": "# The c2n application workflow\n\nBuild screens from `@c2n/*` web components with as little code as possible. Three layers, applied in this order.\n\n## 1. Theme once\n\n- Install `@c2n/theme` next to the component packages you use.\n- Import `@c2n/theme/theme.css` once at the application root (tokens + base theme). If the app already owns a token system, import only `@c2n/theme/base.css` and bridge your tokens onto the `--c2-theme--*` names.\n- Override the tokens that differ from the defaults on `:root` (light) and under your dark-mode selector. About 35 tokens (`--c2-theme--color-primary`, `--c2-theme--radius-md`, `--c2-theme--font-family`, `--c2-theme--focus-ring`, …) drive every component.\n- Never set component variables globally when a token exists for the job.\n\n## 2. Use the tags directly\n\n- Register an element with a side-effect import (`import '@c2n/button'`) at the application entry, or in the module that renders it.\n- Write plain markup: `<c2-button>Save</c2-button>`. Attributes, slots and events come from the component API (MCP `get_component`, or `node_modules/@c2n/<name>/custom-elements.json`).\n- Retrieve `get_examples` next: begin from the unmodified Default sample, then select gallery examples by use case. Use `get_presets` when structured values are more useful than a complete pattern.\n- Icons are components: `c2-feather-<name>` from `@c2n/feather-icons/icons/<name>.js`, sized and coloured through `--c2-feather-icon--size|color|stroke-width`.\n- A component that appears once with the themed default look needs nothing else.\n\n## 3. Name what repeats\n\nThe decision rule, cheapest first:\n\n| Situation | Do this |\n| --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |\n| The element appears once, default look is fine | plain tag |\n| Same look repeats, markup is otherwise plain | **CSS-class variant**: a class that sets `--c2-<component>__…` variables |\n| Same look **and** the same attributes / slots / accessible name repeat | **wrapper component** in your framework (Astro/React/Vue/Lit) that renders the c2 element |\n| The variant must be its own tag (used from strings, other Lit templates, shipped) | **Lit subclass** of the component with the variables baked into `static styles` |\n| Several c2 components plus some logic repeat | **composed component**: children's variables set on `:host`/a class, attributes forwarded, events re-emitted |\n| No c2 component fits | app-level component styled with the same `--c2-theme--*` tokens; avoid patching installed packages locally |\n\nEvery variant lives in one directory (`src/components/ui/`, `src/ui/`…), one file per variant, under the app's own prefix (`app-*`, `site-*`, `my-*`), never `c2-*`.\n\n## 4. Verify\n\n- Every element used is registered (no `HTMLUnknownElement`, no empty tags).\n- `@c2n/theme` is imported exactly once; tokens overridden on `:root` and the dark selector.\n- Prefer CSS custom properties. Every `::part()` selector must name a CSS part documented by `get_component`; no repeated inline `style=\"--c2-…\"`.\n- Every variable, attribute, slot and event name exists in the component API.\n- Variant tags contain a hyphen and do not start with `c2-`.\n- Light and dark both look right; build, lint and type-check pass.\n",
|
|
51752
52288
|
"theming": "# Theming c2n components\n\n## Layers\n\n1. **Tokens** `--c2-theme--<name>` (from `@c2n/theme/tokens.css`, ~35 of them). Set by the application.\n2. **Base theme** `@c2n/theme/base.css`: `--c2-<component>__<part>--<prop>: var(--c2-theme--<token>, <component default>)` on `:root`/`:host` for every mapped component variable. Generated from the component manifests.\n3. **Component variables** `--c2-<component>__<part>[__<state>]--<property>`: the fine-grained escape hatch. Set on an element, a class or any ancestor; they always win over the base theme.\n4. **Variant components** built from 2 and 3.\n\n## Install\n\n```ts\nimport '@c2n/theme/theme.css' // tokens + base theme, once\n```\n\n```css\n:root {\n --c2-theme--color-primary: #7c3aed;\n --c2-theme--color-primary-hover: #6d28d9;\n --c2-theme--radius-md: 10px;\n --c2-theme--font-family: 'Inter', system-ui, sans-serif;\n}\n```\n\n## Bring your own tokens\n\n```css\n@import '@c2n/theme/base.css';\n:root {\n --c2-theme--color-primary: var(--brand-600);\n --c2-theme--color-on-primary: var(--brand-on-600);\n --c2-theme--color-surface: var(--surface);\n --c2-theme--color-on-surface: var(--text);\n --c2-theme--color-outline: var(--border);\n --c2-theme--radius-md: var(--radius);\n --c2-theme--font-family: var(--font-sans);\n --c2-theme--focus-ring: 2px solid var(--brand-600);\n}\n```\n\nDark mode then follows the app's own switch because the bridged values flip.\n\n## Dark mode with the shipped tokens\n\n`tokens.css` sets light values on `:root` and dark values under `[data-theme='dark']` and `.c2-dark`, with `prefers-color-scheme: dark` as the fallback when no `data-theme` attribute is present. `data-theme=\"light\"` / `.c2-light` opts a subtree out. Selectors are not tied to the root element, so any subtree can be inverted.\n\n## Token groups\n\n- Colour roles: `color-primary`, `color-primary-hover`, `color-primary-active`, `color-on-primary`, `color-primary-container`, `color-surface`, `color-surface-container-low`, `color-surface-container`, `color-on-surface`, `color-on-surface-variant`, `color-outline`, `color-outline-variant`, `color-outline-strong`, `color-error`, `color-scrim`, `color-inverse-surface`, `color-on-inverse-surface`.\n- Typography: `font-family` (unset by default: components inherit the page font), `font-size-sm|md`, `font-weight-medium|semibold`.\n- Shape: `radius-sm|md|lg|xl|full`.\n- Borders: `border-width`, `border` (composite: the whole resting border shorthand; falls back to `border-width solid color-outline`).\n- Interaction: `focus-ring` (outline shorthand), `disabled-opacity`, `motion-scale` (multiplies every duration; `0` disables motion).\n- Elevation: `shadow-md`, `shadow-lg`.\n\nComposite tokens wrap their primitives: `var(--c2-theme--border, var(--c2-theme--border-width, 1px) solid var(--c2-theme--color-outline, #bcbcc6))`, so set the shorthand or just the colour.\n\n## What the base theme does not cover\n\nSizes, paddings, gaps, identity colours (avatar fallbacks), status colours, the code viewer's syntax theme, and variables without a default (they inherit). Use component variables or a variant for those. `@c2n/theme/report.json` lists what is mapped per package; MCP `get_theme` with a `tag` shows the mapping of one component.\n\n## Grammar and states\n\n`--c2-<component>__<part>[__<state>]--<property>`: `__` separates component / part / state, `--` separates the CSS property. States: `hover`, `active`, `focus`, `selected`, `disabled`, `open`, `error`, `read-only`. Example: `--c2-checkbox__container__selected--background-color`.\n",
|
|
51753
52289
|
"variant-components": "# Variant and composed components\n\nA variant is one c2 component with a fixed look (CSS variables) and, sometimes, fixed attributes, slots or accessible name. A composed component is several c2 components plus glue. Both normally set children's CSS variables on the host element or a class. Use `::part()` only for a part documented by `get_component` and only when the public variables cannot express the change.\n\n## Shape 1: CSS-class variant\n\n```css\n.danger-button {\n --c2-button__container--background-color: var(--c2-theme--color-error);\n --c2-button__container__hover--background-color: color-mix(in srgb, var(--c2-theme--color-error), black 12%);\n}\n```\n\n```html\n<c2-button class=\"danger-button\">Delete</c2-button>\n```\n\nUse when only the look differs. Keep variant classes in one stylesheet (`ui/variants.css`). Read variable names from the component API; do not invent them.\n\n## Shape 2: wrapper component\n\nWhen attributes, slots or the accessible name repeat as well. Framework-native, zero runtime cost beyond the c2 element. Example (Astro; the same idea in React/Vue/Svelte):\n\n```astro\n---\n// SiteIconButton.astro — c2-icon-button with the app's size and a tooltip that defaults to the label.\ninterface Props {\n label: string\n size?: 'sm' | 'md'\n class?: string\n [attr: string]: unknown\n}\nconst { label, size = 'md', class: className = '', ...rest } = Astro.props\n---\n\n<c2-icon-button class={`site-icon-button site-icon-button--${size} ${className}`} aria-label={label} tooltip={label} {...rest}>\n <slot />\n</c2-icon-button>\n<style is:global>\n .site-icon-button {\n --c2-icon-button--border-radius: var(--c2-theme--radius-sm);\n --c2-icon-button__hover--background-color: var(--c2-theme--color-surface-container);\n }\n .site-icon-button--sm {\n --c2-icon-button__state-layer--size: 30px;\n --c2-icon-button__icon--width: 16px;\n --c2-icon-button__icon--height: 16px;\n }\n .site-icon-button--md {\n --c2-icon-button__state-layer--size: 36px;\n --c2-icon-button__icon--width: 18px;\n --c2-icon-button__icon--height: 18px;\n }\n</style>\n```\n\nForward unknown props as attributes (`{...rest}`) so callers keep the full c2 API (`disabled`, `data-*`, `aria-*`).\n\n## Shape 3: Lit subclass\n\nWhen the variant must be a tag of its own. The docs studio's Code tab and MCP `generate_variant` produce this:\n\n```ts\nimport { css } from 'lit'\nimport { Button } from '@c2n/button'\n\nexport class DangerButton extends Button {\n static override styles = [\n Button.styles,\n css`\n :host {\n --c2-button__container--background-color: var(--c2-theme--color-error);\n }\n `,\n ]\n override connectedCallback() {\n super.connectedCallback()\n this.setAttribute('running', '') // fixed attributes go here\n }\n}\nif (!customElements.get('app-danger-button')) customElements.define('app-danger-button', DangerButton)\n```\n\nImport the class from the module that defines the element (`@c2n/tabs/tab.js` for `c2-tab`, `@c2n/feather-icons/icons/<name>.js` for icons). Importing it also registers the original `c2-*` tag, which is fine. Never `customElements.define` a `c2-` name.\nGuard registration with `customElements.get()` so development HMR or repeated module evaluation cannot define the same tag twice.\n\n## Composed components\n\nSeveral c2 components and some logic repeat: a search field (`c2-text-field` + `c2-list`), a settings dialog (`c2-modal` + form controls), a toolbar (`c2-icon-button`s + `c2-tooltip`s).\n\n- Set the children's variables on the composed component's class or `:host` (custom properties inherit through shadow boundaries): `.search-palette__field { --c2-text-field--border-top: none; }`.\n- Forward the attributes callers should control as properties/attributes of the composed component.\n- Re-emit the child events callers need. In Lit use `redispatchEvent(this, event)` from `@c2n/core/dom-helper.js`; elsewhere `dispatchEvent(new CustomEvent(...))`.\n- Let the primitives keep their responsibilities (a `c2-modal` already traps focus, closes on Escape and backdrop click, locks scrolling and restores focus): write only the glue.\n- Declare composition in JSDoc (`@internalcomponent c2-list`, `@slotcomponent c2-list-item`) when the composed component is itself a Lit element with a manifest.\n\n## Naming and placement\n\n- Own prefix: `app-*`, `site-*`, `my-*`. A custom element name must contain a hyphen.\n- One file per variant, one directory (`src/components/ui/`), exported from a barrel.\n- Three-line header comment: what it wraps, which variables it fixes, where it is used.\n",
|
|
51754
|
-
"frameworks": "# Using c2n components per framework\n\nAll components are standard custom elements (Lit 3). Register with a side-effect import; then they are plain HTML.\n\n## Events (every framework)\n\nEach component that fires events exports an event map (`TableEventMap`, `SelectEventMap`, …) from the same module as its class, and declares typed `addEventListener` overloads, so the detail narrows with no cast:\n\n```ts\ntable.addEventListener('selection-change', (event) => event.detail.rows) // TableRow[]\n```\n\n`EventMapOf<T>` from `@c2n/core/event-helper.js` recovers a component's map for code that is generic over elements. Use the map type instead of hand-writing `CustomEvent<{ value: string[] }>`.\n\n`selection-change` **does not bubble** — `c2-list`, `c2-select`, `c2-table`, `c2-tabs` and `c2-virtual-list` all fire it, so a listener goes on the element itself, never on an ancestor. `c2-tabs` fires `selection-change`, not `change`.\n\nEvery form-associated component fires plain `input` and `change` alongside its semantic event, which is what generic two-way bindings listen for.\n\nA duplicate `customElements.define` warns and keeps the first definition instead of throwing.\n\n## Plain HTML / Vite / any bundler\n\n```html\n<script type=\"module\">\n import '@c2n/theme/theme.css'\n import '@c2n/button'\n</script>\n<c2-button>Save</c2-button>\n```\n\nWith a bundler, put the imports in the entry module (`main.ts`). CSS imports work through the bundler's CSS handling.\n\n## Lit\n\nImport what you render at the top of the component module (`import '@c2n/text-field'`). Extend a component for a tag variant (`class AppField extends TextField`). Re-emit child events with `redispatchEvent` from `@c2n/core/dom-helper.js`. Set child variables in your `static styles` on `:host` or on a class.\n\n## Astro\n\n- Islands (`@astrojs/lit`): `import { Button } from '@c2n/button'` in the frontmatter, `<Button client:load>` in the template. SSR'd with declarative shadow DOM, hydrated on load. Pass **kebab-case attributes** only (a prop whose name matches an element property is set as a property and forces `defer-hydration`). A `client:only` island must not contain islands: its children end up in a `<template>` and nothing hydrates; the parent module registers the children instead.\n- Plain tags + client script: `<c2-button>` in the template and `import '@c2n/button'` inside a `<script>`. Cheaper for repeated markup (no shadow-DOM copy per instance); guard the flash with `c2-button:not(:defined) { visibility: hidden }`.\n- Scoped `<style>` does not reach elements rendered by child components; use `is:global` (or `:global()`) for variant classes.\n\n## React 19\n\nCustom elements work as JSX tags. React 19 passes primitive props as attributes and functions as event listeners for `on*` names; for custom events attach listeners with a `ref` (`ref.current.addEventListener('selection-change', …)`).\n\nTypes: `import '@c2n/<name>/react'` — one line per package, in any `.d.ts` — declares the tags in `JSX.IntrinsicElements` with props derived from the element class, plus each kebab-case attribute name (`row-key` next to `rowKey`). Do not hand-write the mapping. React 18 and older: pass attributes as strings and use refs for events and properties.\n\n**Server-rendered React (Next.js, React Router SSR):** write a camelCase property by its kebab-case attribute name — `min-width`, `expand-full`, `storage-key`, not `minWidth`. The server writes a custom element's props into the HTML verbatim, the parser lowercases them (`minwidth`) and hydration does not set properties, so the camelCase spelling reaches the element as an attribute it does not declare. The component forwards that lookalike to the real attribute and logs a warning, so the value is not lost, but the kebab-case name is what the types list and what needs no forwarding. Object and array props (`rows`) stringify on the server: set them in an effect through a ref.\n\n## Vue 3\n\nTell the compiler about the tags: `compilerOptions.isCustomElement = (tag) => tag.startsWith('c2-')` (in `@vitejs/plugin-vue`'s `template.compilerOptions`); without it every `c2-*` tag is treated as a Vue component and renders nothing. Register the elements at module scope before `mount()`: Vue chooses between a property and an attribute with `key in el`, so a binding on an element that has not upgraded yet falls back to an attribute.\n\nTypes: `import '@c2n/<name>/vue'` registers the tags with Volar, and `\"extends\": [..., \"@c2n/framework-types/tsconfig.vue.json\"]` supplies the matching `vueCompilerOptions` (`strictTemplates`, plus the `v-model` prop mapping so `v-model` binds `value`/`checked` rather than `modelValue`). Declare no local `vueCompilerOptions` next to it — a local one replaces the inherited object rather than merging.\n\n- Events: `@selection-change`, `@submit-message` bind by their real kebab-case name — Vue calls `addEventListener` with the name as written. The handler gets a plain `Event`, so narrow it (`(event as CustomEvent<{ value: string[] }>).detail`).\n- `v-model` works on `c2-text-field` / `c2-textarea`: on a custom element Vue compiles it to the plain-text model directive, which sets `el.value` and listens for `input`, and both components expose `value` and re-emit the native `input` event.\n- `.prop` forces a DOM property (`:value.prop=\"selected\"` for array/object values); `.attr` forces an attribute (`:align.attr=\"side\"`), needed when a property is not reflected but the component styles it with `:host([attr])` — `c2-chat-message`'s `align` is the case to know.\n- A static attribute stays an attribute, so spell it the way the component declares it (`row-key`, not `rowKey`).\n\n## Angular\n\n`CUSTOM_ELEMENTS_SCHEMA` on the component is the only required configuration. `[rows]=\"…\"` writes a property with `setProperty`; `(selection-change)` binds the event by its real name. A **static** attribute stays an attribute, so a camelCase property needs `[rowKey]=\"'id'\"` or the real attribute name (`row-key`) — the lowercase spelling `rowkey` is forwarded to `row-key` with a warning.\n\nForms: Angular's built-in value accessors match `input`/`select`/`textarea` only, so `ngModel` and `formControlName` do nothing on a c2 control without `@c2n/angular`. Add `imports: [FormsModule, ...C2_FORM_ACCESSORS]`.\n\nThe schema turns off template type checking, so `$event` is a bare `Event`: take the component's event-map type in the handler rather than `$any` at the call site.\n\n## Svelte\n\nSvelte binds attributes and `on:` events directly.\n\n## Table cells\n\n`renderCell` cannot return framework markup (it is handed to Lit). Mark the column `cell-slot` and render one light-DOM child per row into `slot=\"cell:<row key>:<field>\"`; the children stay in the document, so ordinary CSS reaches them. Requires `row-key`; `renderCell`/the column format is the fallback.\n\n## Editor support outside TypeScript\n\n`@c2n/framework-types` ships `dist/html-custom-data.json` (point `html.customData` at it for VS Code / Volar) and `dist/web-types.json` (picked up automatically by the JetBrains IDEs). Both are generated from the custom-elements manifests, and cover plain HTML, Angular templates and Vue SFCs.\n\n## Server-side rendering and static HTML\n\n- Components must not touch `document`/`window` at module scope; the c2 components guard with `isServer`.\n- Without SSR of the shadow DOM, hide unregistered tags until they upgrade: `c2-modal:not(:defined) { display: none }` (dialogs, lists) or `visibility: hidden` (layout-stable chrome).\n- Server-rendered markup only carries attributes, so spell camelCase properties as their kebab-case attribute (`row-key`); see the React section for why the camelCase spelling is lost on the way.\n- Theme CSS is plain CSS; load it in the document head so the first paint is themed.\n- \"Lit is in dev mode. Not recommended for production!\" in a dev server (Next.js, Vite) is expected: Lit publishes a `development` export condition with extra checks and warnings, and dev servers resolve it. A production build resolves the default condition and the message is gone; nothing to configure.\n"
|
|
52290
|
+
"frameworks": "# Using c2n components per framework\n\nAll components are standard custom elements (Lit 3). Register with a side-effect import; then they are plain HTML.\n\n## Slots and bare text\n\nStyle elements assigned to slots with consumer-owned classes and style component-owned placement or fallback regions through documented CSS parts or custom properties. Bare text nodes cannot receive a class or be targeted directly: use inherited host styling or a documented host property, or wrap the text in an element you own. A parent part never reaches inside an assigned custom element's shadow root.\n\n## Events (every framework)\n\nEach component that fires events exports an event map (`TableEventMap`, `SelectEventMap`, …) from the same module as its class, and declares typed `addEventListener` overloads, so the detail narrows with no cast:\n\n```ts\ntable.addEventListener('selection-change', (event) => event.detail.rows) // TableRow[]\n```\n\n`EventMapOf<T>` from `@c2n/core/event-helper.js` recovers a component's map for code that is generic over elements. Use the map type instead of hand-writing `CustomEvent<{ value: string[] }>`.\n\n`selection-change` **does not bubble** — `c2-list`, `c2-select`, `c2-table`, `c2-tabs` and `c2-virtual-list` all fire it, so a listener goes on the element itself, never on an ancestor. `c2-tabs` fires `selection-change`, not `change`.\n\nEvery form-associated component fires plain `input` and `change` alongside its semantic event, which is what generic two-way bindings listen for.\n\nA duplicate `customElements.define` warns and keeps the first definition instead of throwing.\n\n## Attributes and properties (every framework)\n\nTwo conversions differ from stock Lit, and both exist so one binding is correct on the server and on the client.\n\n**A boolean attribute written as `\"false\"` is false.** Lit's default is presence-based, so `disabled=\"false\"`\nwould _enable_ the flag. Every c2n boolean reads the literal strings `\"false\"` and `\"0\"` as false; a bare\n`disabled`, or `disabled=\"\"`, is still true. This matters wherever a framework stringifies a non-boolean\nattribute name — Svelte 5 does it for every name outside the HTML boolean list, and so does any server renderer.\n\nIt also gives the table's column flags a third state: `sortable` and `resizable` on `c2-table-column` inherit the\ntable's setting when absent, and `sortable=\"false\"` is how a single column opts out.\n\n**An array or object property accepts a JSON string.** `rows`, `columns`, `items`, `options`, `series` and\n`steps` parse JSON from their attribute _and_ from a string assigned straight to the property, so\n`JSON.stringify(rows)` is a single binding that works both ways: the server writes it as an attribute, the\nclient sets it as a property, both parse. Pass the array itself where the framework can write a property. A\nstring that is not valid JSON is left untouched rather than silently becoming `undefined`.\n\nMulti-value string properties (`value` on `c2-list`, `c2-select`, `c2-tree`, `c2-virtual-list`) work the same\nway with their `;`-separated attribute form: `value=\"a;b\"` and `el.value = 'a;b'` both yield `['a', 'b']`.\n\n**camelCase properties are not attributes.** Lit derives an attribute by lowercasing the property, so `readOnly`\nis the attribute `readonly` and `maxLength` is `maxlength`; where the component renamed one it is kebab-case\n(`row-key`). The manifests list the real attribute name under `name` and the property under `fieldName`. A\nlookalike such as `rowkey` is forwarded to the real attribute with a warning rather than dropped.\n\n## Plain HTML / Vite / any bundler\n\n```html\n<script type=\"module\">\n import '@c2n/theme/theme.css'\n import '@c2n/button'\n</script>\n<c2-button>Save</c2-button>\n```\n\nWith a bundler, put the imports in the entry module (`main.ts`). CSS imports work through the bundler's CSS handling.\n\n## Lit\n\nImport what you render at the top of the component module (`import '@c2n/text-field'`). Extend a component for a tag variant (`class AppField extends TextField`). Re-emit child events with `redispatchEvent` from `@c2n/core/dom-helper.js`. Set child variables in your `static styles` on `:host` or on a class.\n\n## Astro\n\n- Islands (`@astrojs/lit`): `import { Button } from '@c2n/button'` in the frontmatter, `<Button client:load>` in the template. SSR'd with declarative shadow DOM, hydrated on load. Pass **kebab-case attributes** only (a prop whose name matches an element property is set as a property and forces `defer-hydration`). A `client:only` island must not contain islands: its children end up in a `<template>` and nothing hydrates; the parent module registers the children instead.\n- Plain tags + client script: `<c2-button>` in the template and `import '@c2n/button'` inside a `<script>`. Cheaper for repeated markup (no shadow-DOM copy per instance); guard the flash with `c2-button:not(:defined) { visibility: hidden }`.\n- Scoped `<style>` does not reach elements rendered by child components; use `is:global` (or `:global()`) for variant classes.\n\n## React 19\n\nCustom elements work as JSX tags. React 19 passes primitive props as attributes and functions as event listeners for `on*` names; for custom events attach listeners with a `ref` (`ref.current.addEventListener('selection-change', …)`).\n\nTypes: `import '@c2n/<name>/react'` — one line per package, in any `.d.ts` — declares the tags in `JSX.IntrinsicElements` with props derived from the element class, plus each kebab-case attribute name (`row-key` next to `rowKey`). Do not hand-write the mapping. React 18 and older: pass attributes as strings and use refs for events and properties.\n\n**Server-rendered React (Next.js, React Router SSR):** write a camelCase property by its kebab-case attribute name — `min-width`, `expand-full`, `storage-key`, not `minWidth`. The server writes a custom element's props into the HTML verbatim, the parser lowercases them (`minwidth`) and hydration does not set properties, so the camelCase spelling reaches the element as an attribute it does not declare. The component forwards that lookalike to the real attribute and logs a warning, so the value is not lost, but the kebab-case name is what the types list and what needs no forwarding. Object and array props (`rows`) stringify on the server: pass `JSON.stringify(rows)`, which parses from the attribute the server writes and from the property the client sets, or assign the array in an effect through a ref.\n\n## Vue 3\n\n### Scoped slot styling\n\nTreat assigned nodes and component-owned regions separately. A slotted node remains in application light DOM, so a Vue scoped class can style it. Use only a documented host `::part(name)` selector for the shadow-owned wrapper or fallback, and place that rule in a global stylesheet because Vue's scoped attribute is not present inside the shadow root. Parts stop at nested custom-element shadow roots; consult the nested component's own manifest instead of chaining private selectors.\n\nTell the compiler about the tags: `compilerOptions.isCustomElement = (tag) => tag.startsWith('c2-')` (in `@vitejs/plugin-vue`'s `template.compilerOptions`); without it every `c2-*` tag is treated as a Vue component and renders nothing. Register the elements at module scope before `mount()`: Vue chooses between a property and an attribute with `key in el`, so a binding on an element that has not upgraded yet falls back to an attribute.\n\nTypes: `import '@c2n/<name>/vue'` registers the tags with Volar, and `\"extends\": [..., \"@c2n/framework-types/tsconfig.vue.json\"]` supplies the matching `vueCompilerOptions` (`strictTemplates`, plus the `v-model` prop mapping so `v-model` binds `value`/`checked` rather than `modelValue`). Declare no local `vueCompilerOptions` next to it — a local one replaces the inherited object rather than merging.\n\n- Events: `@selection-change`, `@submit-message` bind by their real kebab-case name — Vue calls `addEventListener` with the name as written. The handler gets a plain `Event`, so narrow it (`(event as CustomEvent<{ value: string[] }>).detail`).\n- `v-model` works on `c2-text-field` / `c2-textarea`: on a custom element Vue compiles it to the plain-text model directive, which sets `el.value` and listens for `input`, and both components expose `value` and re-emit the native `input` event.\n- `.prop` forces a DOM property (`:value.prop=\"selected\"` for array/object values); `.attr` forces an attribute (`:align.attr=\"side\"`), needed when a property is not reflected but the component styles it with `:host([attr])` — `c2-chat-message`'s `align` is the case to know.\n- A static attribute stays an attribute, so spell it the way the component declares it (`row-key`, not `rowKey`).\n\n## Angular\n\nWith Emulated encapsulation, keep host `::part(name)` rules in a global stylesheet (or use `ViewEncapsulation.None` for the owning stylesheet); Angular's generated scope attribute cannot appear on nodes inside a custom element's shadow root. Classes on consumer-owned assigned nodes can remain component-local. Never use deep/private selectors to cross a nested custom-element boundary.\n\n`CUSTOM_ELEMENTS_SCHEMA` on the component is the only required configuration. `[rows]=\"…\"` writes a property with `setProperty`; `(selection-change)` binds the event by its real name. A **static** attribute stays an attribute, so a camelCase property needs `[rowKey]=\"'id'\"` or the real attribute name (`row-key`) — the lowercase spelling `rowkey` is forwarded to `row-key` with a warning.\n\nForms: Angular's built-in value accessors match `input`/`select`/`textarea` only, so `ngModel` and `formControlName` do nothing on a c2 control without `@c2n/angular`. Add `imports: [FormsModule, ...C2_FORM_ACCESSORS]`.\n\nThe schema turns off template type checking, so `$event` is a bare `Event`: take the component's event-map type in the handler rather than `$any` at the call site.\n\n## Svelte 5 / SvelteKit\n\nRegister the elements at module scope before anything renders — a root `+layout.svelte` script, or\n`src/lib/c2n.ts` imported from it. Svelte picks between a property and an attribute with `key in element`, so a\nbinding on a tag that has not upgraded yet silently falls back to an attribute.\n\n```svelte\n<script lang=\"ts\">\n import '@c2n/table'\n import '@c2n/table/table-column.js'\n import type { TableEventMap } from '@c2n/table'\n\n let { rows } = $props()\n let selected = $state<string[]>([])\n</script>\n\n<c2-table\n row-key=\"id\"\n rows={rows}\n sortable\n onselection-change={(event: TableEventMap['selection-change']) => (selected = event.detail.rows.map((r) => r.id))}\n>\n <c2-table-column field=\"name\" header=\"Name\"></c2-table-column>\n</c2-table>\n```\n\n- **Events** use the `on` prefix and the event's real name, no colon: `onclick`, `onselection-change`,\n `oninput`. (Svelte 4's `on:selection-change` still works but is deprecated.) `selection-change` does not\n bubble, so the handler goes on the element itself.\n- **Booleans**: Svelte writes `running=\"false\"` rather than omitting the attribute for any name outside the HTML\n boolean list. That reads as false — see \"Attributes and properties\" above — so `disabled={isDisabled}` behaves.\n- **Arrays and objects**: on the client `rows={rows}` lands as a property because `rows in element` is true.\n Server rendering writes attributes only, and `String(rows)` is `[object Object]`, so a route that\n server-renders its data passes `rows={JSON.stringify(rows)}` — parsed as an attribute on the server and as a\n property on the client.\n- **camelCase properties**: spell the attribute the component declares (`row-key`, not `rowKey`).\n- **Two-way binding**: `bind:value` applies to form elements and Svelte components, not to a custom element, so\n bind by hand. Every c2n form control re-emits the inner control's native `input` and `change`, which is what\n makes `value={draft} oninput={(event) => (draft = event.currentTarget.value)}` enough.\n- **Types**: there is no JSX-style declaration file to maintain. Svelte accepts unknown elements; point the\n editor at `@c2n/framework-types`' `dist/html-custom-data.json` for attribute completion, and take event detail\n types from each package's event map.\n\n## Table cells\n\n`renderCell` cannot return framework markup (it is handed to Lit). To build one with a Lit template, take `html`\nfrom `@c2n/core/lit-helper.js` rather than adding `lit` to the application: it is the same instance the\ncomponents render with, so there is no version to pin by hand and no second copy of Lit in the bundle.\nMark the column `cell-slot` and render one light-DOM child per row into `slot=\"cell:<row key>:<field>\"`; the children stay in the document, so ordinary CSS reaches them. Requires `row-key`; `renderCell`/the column format is the fallback.\n\n## Editor support outside TypeScript\n\n`@c2n/framework-types` ships `dist/html-custom-data.json` (point `html.customData` at it for VS Code / Volar) and `dist/web-types.json` (picked up automatically by the JetBrains IDEs). Both are generated from the custom-elements manifests, and cover plain HTML, Angular templates and Vue SFCs.\n\n## Server-side rendering and static HTML\n\n- Components must not touch `document`/`window` at module scope; the c2 components guard with `isServer`.\n- Without SSR of the shadow DOM, hide unregistered tags until they upgrade: `c2-modal:not(:defined) { display: none }` (dialogs, lists) or `visibility: hidden` (layout-stable chrome).\n- Server-rendered markup only carries attributes, so spell camelCase properties as their kebab-case attribute (`row-key`); see the React section for why the camelCase spelling is lost on the way.\n- Theme CSS is plain CSS; load it in the document head so the first paint is themed.\n- \"Lit is in dev mode. Not recommended for production!\" in a dev server (Next.js, Vite) is expected: Lit publishes a `development` export condition with extra checks and warnings, and dev servers resolve it. A production build resolves the default condition and the message is gone; nothing to configure.\n"
|
|
51755
52291
|
}
|
|
51756
52292
|
}
|