@c2n/mcp 0.0.12 → 0.0.14
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 +798 -271
- 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.14",
|
|
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": [
|
|
@@ -5950,11 +5976,11 @@
|
|
|
5950
5976
|
"cssParts": [
|
|
5951
5977
|
{
|
|
5952
5978
|
"name": "button",
|
|
5953
|
-
"description": "
|
|
5979
|
+
"description": "The native button that provides the interactive surface."
|
|
5954
5980
|
},
|
|
5955
5981
|
{
|
|
5956
5982
|
"name": "running-icon",
|
|
5957
|
-
"description": "
|
|
5983
|
+
"description": "Wrapper containing the `running-icon` slot or spinner fallback while `running` is set."
|
|
5958
5984
|
}
|
|
5959
5985
|
],
|
|
5960
5986
|
"cssProperties": [
|
|
@@ -7522,7 +7548,7 @@
|
|
|
7522
7548
|
},
|
|
7523
7549
|
{
|
|
7524
7550
|
"name": "tooltip",
|
|
7525
|
-
"description": "
|
|
7551
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
7526
7552
|
},
|
|
7527
7553
|
{
|
|
7528
7554
|
"name": "actions",
|
|
@@ -7530,11 +7556,11 @@
|
|
|
7530
7556
|
},
|
|
7531
7557
|
{
|
|
7532
7558
|
"name": "state",
|
|
7533
|
-
"description": "
|
|
7559
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
7534
7560
|
},
|
|
7535
7561
|
{
|
|
7536
7562
|
"name": "legend",
|
|
7537
|
-
"description": "
|
|
7563
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
7538
7564
|
},
|
|
7539
7565
|
{
|
|
7540
7566
|
"name": "legend-item",
|
|
@@ -8386,7 +8412,24 @@
|
|
|
8386
8412
|
}
|
|
8387
8413
|
],
|
|
8388
8414
|
"events": [],
|
|
8389
|
-
"cssParts": [
|
|
8415
|
+
"cssParts": [
|
|
8416
|
+
{
|
|
8417
|
+
"name": "media",
|
|
8418
|
+
"description": "Wrapper around the `media` slot; present when media content is assigned and clipped by the card surface."
|
|
8419
|
+
},
|
|
8420
|
+
{
|
|
8421
|
+
"name": "header",
|
|
8422
|
+
"description": "Wrapper around the `header` slot; present when header content is assigned."
|
|
8423
|
+
},
|
|
8424
|
+
{
|
|
8425
|
+
"name": "body",
|
|
8426
|
+
"description": "Wrapper around the default slot; present when body content is assigned."
|
|
8427
|
+
},
|
|
8428
|
+
{
|
|
8429
|
+
"name": "footer",
|
|
8430
|
+
"description": "Wrapper around the `footer` slot; present when footer content is assigned."
|
|
8431
|
+
}
|
|
8432
|
+
],
|
|
8390
8433
|
"cssProperties": [
|
|
8391
8434
|
{
|
|
8392
8435
|
"name": "--c2-card--padding-top",
|
|
@@ -9586,13 +9629,13 @@
|
|
|
9586
9629
|
"description": "Requires a nonempty message for form validation."
|
|
9587
9630
|
},
|
|
9588
9631
|
{
|
|
9589
|
-
"name": "
|
|
9632
|
+
"name": "maxlength",
|
|
9590
9633
|
"type": "number",
|
|
9591
9634
|
"default": "-1",
|
|
9592
9635
|
"description": "Maximum message length; -1 means unlimited."
|
|
9593
9636
|
},
|
|
9594
9637
|
{
|
|
9595
|
-
"name": "
|
|
9638
|
+
"name": "minlength",
|
|
9596
9639
|
"type": "number",
|
|
9597
9640
|
"default": "-1",
|
|
9598
9641
|
"description": "Minimum message length; -1 means no minimum."
|
|
@@ -9657,23 +9700,23 @@
|
|
|
9657
9700
|
"cssParts": [
|
|
9658
9701
|
{
|
|
9659
9702
|
"name": "container",
|
|
9660
|
-
"description": "
|
|
9703
|
+
"description": "Outer composer surface containing the textarea and actions."
|
|
9661
9704
|
},
|
|
9662
9705
|
{
|
|
9663
9706
|
"name": "textarea",
|
|
9664
|
-
"description": "
|
|
9707
|
+
"description": "The native auto-growing textarea."
|
|
9665
9708
|
},
|
|
9666
9709
|
{
|
|
9667
9710
|
"name": "actions",
|
|
9668
|
-
"description": "
|
|
9711
|
+
"description": "Row containing the toolbar and send button."
|
|
9669
9712
|
},
|
|
9670
9713
|
{
|
|
9671
9714
|
"name": "toolbar",
|
|
9672
|
-
"description": "
|
|
9715
|
+
"description": "Container for the `toolbar` slot."
|
|
9673
9716
|
},
|
|
9674
9717
|
{
|
|
9675
9718
|
"name": "send-button",
|
|
9676
|
-
"description": "
|
|
9719
|
+
"description": "The native button that submits the current message."
|
|
9677
9720
|
}
|
|
9678
9721
|
],
|
|
9679
9722
|
"cssProperties": [
|
|
@@ -10066,11 +10109,11 @@
|
|
|
10066
10109
|
},
|
|
10067
10110
|
{
|
|
10068
10111
|
"name": "avatar",
|
|
10069
|
-
"description": "
|
|
10112
|
+
"description": "Component-owned region wrapping the assigned `avatar` slot."
|
|
10070
10113
|
},
|
|
10071
10114
|
{
|
|
10072
10115
|
"name": "body",
|
|
10073
|
-
"description": "
|
|
10116
|
+
"description": "Component-owned column wrapping the default slot between the header and footer."
|
|
10074
10117
|
},
|
|
10075
10118
|
{
|
|
10076
10119
|
"name": "header",
|
|
@@ -10466,7 +10509,7 @@
|
|
|
10466
10509
|
"package": "@c2n/chatbot",
|
|
10467
10510
|
"title": "Chatbot",
|
|
10468
10511
|
"description": "",
|
|
10469
|
-
"intro": "
|
|
10512
|
+
"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
10513
|
"category": "Layout",
|
|
10471
10514
|
"status": "stable",
|
|
10472
10515
|
"docsUrl": "https://code2nguyen.github.io/web-components/components/chatbot",
|
|
@@ -10486,13 +10529,106 @@
|
|
|
10486
10529
|
],
|
|
10487
10530
|
"slots": [
|
|
10488
10531
|
{
|
|
10489
|
-
"name": "
|
|
10532
|
+
"name": "",
|
|
10490
10533
|
"description": "Conversation content rendered inside the chatbot shell."
|
|
10491
10534
|
}
|
|
10492
10535
|
],
|
|
10493
10536
|
"events": [],
|
|
10494
|
-
"cssParts": [
|
|
10495
|
-
|
|
10537
|
+
"cssParts": [
|
|
10538
|
+
{
|
|
10539
|
+
"name": "messages",
|
|
10540
|
+
"description": "Always-present conversation container around the default slot; controls assigned-content placement, has no fallback, and does not style inside assigned nodes."
|
|
10541
|
+
}
|
|
10542
|
+
],
|
|
10543
|
+
"cssProperties": [
|
|
10544
|
+
{
|
|
10545
|
+
"name": "--c2-chatbot--border-top-left-radius",
|
|
10546
|
+
"type": "border-radius",
|
|
10547
|
+
"default": "8px",
|
|
10548
|
+
"part": "",
|
|
10549
|
+
"property": "border-top-left-radius",
|
|
10550
|
+
"token": "--c2-theme--radius-lg"
|
|
10551
|
+
},
|
|
10552
|
+
{
|
|
10553
|
+
"name": "--c2-chatbot--border-top-right-radius",
|
|
10554
|
+
"type": "border-radius",
|
|
10555
|
+
"default": "8px",
|
|
10556
|
+
"part": "",
|
|
10557
|
+
"property": "border-top-right-radius",
|
|
10558
|
+
"token": "--c2-theme--radius-lg"
|
|
10559
|
+
},
|
|
10560
|
+
{
|
|
10561
|
+
"name": "--c2-chatbot--border-bottom-left-radius",
|
|
10562
|
+
"type": "border-radius",
|
|
10563
|
+
"default": "8px",
|
|
10564
|
+
"part": "",
|
|
10565
|
+
"property": "border-bottom-left-radius",
|
|
10566
|
+
"token": "--c2-theme--radius-lg"
|
|
10567
|
+
},
|
|
10568
|
+
{
|
|
10569
|
+
"name": "--c2-chatbot--border-bottom-right-radius",
|
|
10570
|
+
"type": "border-radius",
|
|
10571
|
+
"default": "8px",
|
|
10572
|
+
"part": "",
|
|
10573
|
+
"property": "border-bottom-right-radius",
|
|
10574
|
+
"token": "--c2-theme--radius-lg"
|
|
10575
|
+
},
|
|
10576
|
+
{
|
|
10577
|
+
"name": "--c2-chatbot--border-top",
|
|
10578
|
+
"type": "border",
|
|
10579
|
+
"default": "1px solid #e4e4e7",
|
|
10580
|
+
"part": "",
|
|
10581
|
+
"property": "border-top",
|
|
10582
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10583
|
+
},
|
|
10584
|
+
{
|
|
10585
|
+
"name": "--c2-chatbot--border-right",
|
|
10586
|
+
"type": "border",
|
|
10587
|
+
"default": "1px solid #e4e4e7",
|
|
10588
|
+
"part": "",
|
|
10589
|
+
"property": "border-right",
|
|
10590
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10591
|
+
},
|
|
10592
|
+
{
|
|
10593
|
+
"name": "--c2-chatbot--border-bottom",
|
|
10594
|
+
"type": "border",
|
|
10595
|
+
"default": "1px solid #e4e4e7",
|
|
10596
|
+
"part": "",
|
|
10597
|
+
"property": "border-bottom",
|
|
10598
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10599
|
+
},
|
|
10600
|
+
{
|
|
10601
|
+
"name": "--c2-chatbot--border-left",
|
|
10602
|
+
"type": "border",
|
|
10603
|
+
"default": "1px solid #e4e4e7",
|
|
10604
|
+
"part": "",
|
|
10605
|
+
"property": "border-left",
|
|
10606
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10607
|
+
},
|
|
10608
|
+
{
|
|
10609
|
+
"name": "--c2-chatbot__header--padding",
|
|
10610
|
+
"type": "padding",
|
|
10611
|
+
"default": "16px",
|
|
10612
|
+
"part": "header",
|
|
10613
|
+
"property": "padding"
|
|
10614
|
+
},
|
|
10615
|
+
{
|
|
10616
|
+
"name": "--c2-chatbot__header--background",
|
|
10617
|
+
"type": "color",
|
|
10618
|
+
"default": "#ffffff",
|
|
10619
|
+
"part": "header",
|
|
10620
|
+
"property": "background",
|
|
10621
|
+
"token": "--c2-theme--color-surface"
|
|
10622
|
+
},
|
|
10623
|
+
{
|
|
10624
|
+
"name": "--c2-chatbot__header--border-bottom",
|
|
10625
|
+
"type": "border",
|
|
10626
|
+
"default": "1px solid #e4e4e7",
|
|
10627
|
+
"part": "header",
|
|
10628
|
+
"property": "border-bottom",
|
|
10629
|
+
"token": "--c2-theme--color-outline-variant"
|
|
10630
|
+
}
|
|
10631
|
+
]
|
|
10496
10632
|
}
|
|
10497
10633
|
],
|
|
10498
10634
|
"composition": {
|
|
@@ -10600,15 +10736,15 @@
|
|
|
10600
10736
|
"cssParts": [
|
|
10601
10737
|
{
|
|
10602
10738
|
"name": "checkmark",
|
|
10603
|
-
"description": "
|
|
10739
|
+
"description": "Wrapper containing the `checkmark` slot or fallback mark while checked."
|
|
10604
10740
|
},
|
|
10605
10741
|
{
|
|
10606
10742
|
"name": "mixedmark",
|
|
10607
|
-
"description": "
|
|
10743
|
+
"description": "Wrapper containing the `mixedmark` slot or fallback mark while indeterminate."
|
|
10608
10744
|
},
|
|
10609
10745
|
{
|
|
10610
10746
|
"name": "uncheckmark",
|
|
10611
|
-
"description": "
|
|
10747
|
+
"description": "Wrapper containing the optional `uncheckmark` slot while unchecked."
|
|
10612
10748
|
}
|
|
10613
10749
|
],
|
|
10614
10750
|
"cssProperties": [
|
|
@@ -11548,7 +11684,7 @@
|
|
|
11548
11684
|
},
|
|
11549
11685
|
{
|
|
11550
11686
|
"name": "label",
|
|
11551
|
-
"description": "
|
|
11687
|
+
"description": "Component-owned text region containing the `label` slot above the editor."
|
|
11552
11688
|
},
|
|
11553
11689
|
{
|
|
11554
11690
|
"name": "editor",
|
|
@@ -11556,11 +11692,7 @@
|
|
|
11556
11692
|
},
|
|
11557
11693
|
{
|
|
11558
11694
|
"name": "supporting-text",
|
|
11559
|
-
"description": "
|
|
11560
|
-
},
|
|
11561
|
-
{
|
|
11562
|
-
"name": "ready",
|
|
11563
|
-
"description": "Shadow DOM styling hook for the ready element."
|
|
11695
|
+
"description": "Help and error row containing the `supporting-text` slot or generated fallback."
|
|
11564
11696
|
}
|
|
11565
11697
|
],
|
|
11566
11698
|
"cssProperties": [
|
|
@@ -12193,7 +12325,24 @@
|
|
|
12193
12325
|
"description": "Fired after the copy button put the code on the clipboard."
|
|
12194
12326
|
}
|
|
12195
12327
|
],
|
|
12196
|
-
"cssParts": [
|
|
12328
|
+
"cssParts": [
|
|
12329
|
+
{
|
|
12330
|
+
"name": "header",
|
|
12331
|
+
"description": "Header region containing the title, terminal controls, and copy action."
|
|
12332
|
+
},
|
|
12333
|
+
{
|
|
12334
|
+
"name": "title",
|
|
12335
|
+
"description": "Title boundary exposing the `title` slot."
|
|
12336
|
+
},
|
|
12337
|
+
{
|
|
12338
|
+
"name": "body",
|
|
12339
|
+
"description": "Code body region containing the default slot or rendered-source fallback and inline copy action."
|
|
12340
|
+
},
|
|
12341
|
+
{
|
|
12342
|
+
"name": "copy-button",
|
|
12343
|
+
"description": "Copy action containing the `copy-icon` or `copied-icon` fallback."
|
|
12344
|
+
}
|
|
12345
|
+
],
|
|
12197
12346
|
"cssProperties": [
|
|
12198
12347
|
{
|
|
12199
12348
|
"name": "--c2-code-viewer--background",
|
|
@@ -12967,7 +13116,14 @@
|
|
|
12967
13116
|
{
|
|
12968
13117
|
"kind": "usage",
|
|
12969
13118
|
"label": "Default",
|
|
12970
|
-
"html": "<c2-color-area></c2-color-area>"
|
|
13119
|
+
"html": "<c2-color-area></c2-color-area>",
|
|
13120
|
+
"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}"
|
|
13121
|
+
},
|
|
13122
|
+
{
|
|
13123
|
+
"kind": "usage",
|
|
13124
|
+
"label": "Wide landscape",
|
|
13125
|
+
"html": "<c2-color-area class=\"wide-color-area\"></c2-color-area>",
|
|
13126
|
+
"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
13127
|
},
|
|
12972
13128
|
{
|
|
12973
13129
|
"kind": "gallery",
|
|
@@ -13268,7 +13424,14 @@
|
|
|
13268
13424
|
{
|
|
13269
13425
|
"kind": "usage",
|
|
13270
13426
|
"label": "Default",
|
|
13271
|
-
"html": "<c2-color-select color=\"#ff726b\"></c2-color-select>"
|
|
13427
|
+
"html": "<c2-color-select color=\"#ff726b\"></c2-color-select>",
|
|
13428
|
+
"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}"
|
|
13429
|
+
},
|
|
13430
|
+
{
|
|
13431
|
+
"kind": "usage",
|
|
13432
|
+
"label": "Large swatch",
|
|
13433
|
+
"html": "<c2-color-select class=\"large-swatch\" color=\"#2563eb\"></c2-color-select>",
|
|
13434
|
+
"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
13435
|
},
|
|
13273
13436
|
{
|
|
13274
13437
|
"kind": "gallery",
|
|
@@ -13496,7 +13659,14 @@
|
|
|
13496
13659
|
{
|
|
13497
13660
|
"kind": "usage",
|
|
13498
13661
|
"label": "Default",
|
|
13499
|
-
"html": "<c2-color-slider></c2-color-slider>"
|
|
13662
|
+
"html": "<c2-color-slider></c2-color-slider>",
|
|
13663
|
+
"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}"
|
|
13664
|
+
},
|
|
13665
|
+
{
|
|
13666
|
+
"kind": "usage",
|
|
13667
|
+
"label": "Compact",
|
|
13668
|
+
"html": "<c2-color-slider class=\"compact-hue-slider\"></c2-color-slider>",
|
|
13669
|
+
"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
13670
|
},
|
|
13501
13671
|
{
|
|
13502
13672
|
"kind": "gallery",
|
|
@@ -13620,11 +13790,11 @@
|
|
|
13620
13790
|
"cssParts": [
|
|
13621
13791
|
{
|
|
13622
13792
|
"name": "button",
|
|
13623
|
-
"description": "
|
|
13793
|
+
"description": "The native button that performs the copy action."
|
|
13624
13794
|
},
|
|
13625
13795
|
{
|
|
13626
13796
|
"name": "icon",
|
|
13627
|
-
"description": "
|
|
13797
|
+
"description": "Wrapper that switches between the copy and copied icons."
|
|
13628
13798
|
}
|
|
13629
13799
|
],
|
|
13630
13800
|
"cssProperties": [
|
|
@@ -14298,7 +14468,7 @@
|
|
|
14298
14468
|
"cssParts": [
|
|
14299
14469
|
{
|
|
14300
14470
|
"name": "header",
|
|
14301
|
-
"description": "
|
|
14471
|
+
"description": "Conditional row containing the `header` and `actions` slots, or the floating controls when both are empty."
|
|
14302
14472
|
},
|
|
14303
14473
|
{
|
|
14304
14474
|
"name": "body",
|
|
@@ -14306,11 +14476,11 @@
|
|
|
14306
14476
|
},
|
|
14307
14477
|
{
|
|
14308
14478
|
"name": "footer",
|
|
14309
|
-
"description": "
|
|
14479
|
+
"description": "Conditional row wrapping the assigned `footer` slot."
|
|
14310
14480
|
},
|
|
14311
14481
|
{
|
|
14312
14482
|
"name": "controls",
|
|
14313
|
-
"description": "
|
|
14483
|
+
"description": "Component-owned group containing the `controls` slot and built-in expand-button fallbacks."
|
|
14314
14484
|
},
|
|
14315
14485
|
{
|
|
14316
14486
|
"name": "control",
|
|
@@ -14947,7 +15117,7 @@
|
|
|
14947
15117
|
"description": "Requires a date before the form can be submitted."
|
|
14948
15118
|
},
|
|
14949
15119
|
{
|
|
14950
|
-
"name": "
|
|
15120
|
+
"name": "readonly",
|
|
14951
15121
|
"type": "boolean",
|
|
14952
15122
|
"default": "false",
|
|
14953
15123
|
"description": "Prevents editing while keeping the value in form submission."
|
|
@@ -15778,7 +15948,28 @@
|
|
|
15778
15948
|
"description": "Re-dispatched from the native details after it opens or closes (`newState` is `open` or `closed`)."
|
|
15779
15949
|
}
|
|
15780
15950
|
],
|
|
15781
|
-
"cssParts": [
|
|
15951
|
+
"cssParts": [
|
|
15952
|
+
{
|
|
15953
|
+
"name": "summary",
|
|
15954
|
+
"description": "Interactive summary containing the title, icon, and optional header content."
|
|
15955
|
+
},
|
|
15956
|
+
{
|
|
15957
|
+
"name": "title",
|
|
15958
|
+
"description": "Component-owned title region wrapping the `title` slot or label fallback."
|
|
15959
|
+
},
|
|
15960
|
+
{
|
|
15961
|
+
"name": "icon",
|
|
15962
|
+
"description": "Icon region containing the `icon` and `expanded-icon` slots and fallback chevron."
|
|
15963
|
+
},
|
|
15964
|
+
{
|
|
15965
|
+
"name": "header-content",
|
|
15966
|
+
"description": "Conditional secondary header region wrapping the `header-content` slot."
|
|
15967
|
+
},
|
|
15968
|
+
{
|
|
15969
|
+
"name": "body",
|
|
15970
|
+
"description": "Collapsible body region wrapping the default slot."
|
|
15971
|
+
}
|
|
15972
|
+
],
|
|
15782
15973
|
"cssProperties": [
|
|
15783
15974
|
{
|
|
15784
15975
|
"name": "--c2-details--border-top",
|
|
@@ -16376,51 +16567,6 @@
|
|
|
16376
16567
|
],
|
|
16377
16568
|
"hasGallery": true
|
|
16378
16569
|
},
|
|
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
16570
|
"feather-icons": {
|
|
16425
16571
|
"id": "feather-icons",
|
|
16426
16572
|
"package": "@c2n/feather-icons",
|
|
@@ -17035,7 +17181,7 @@
|
|
|
17035
17181
|
},
|
|
17036
17182
|
{
|
|
17037
17183
|
"name": "tooltip",
|
|
17038
|
-
"description": "
|
|
17184
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
17039
17185
|
},
|
|
17040
17186
|
{
|
|
17041
17187
|
"name": "actions",
|
|
@@ -17043,11 +17189,11 @@
|
|
|
17043
17189
|
},
|
|
17044
17190
|
{
|
|
17045
17191
|
"name": "state",
|
|
17046
|
-
"description": "
|
|
17192
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
17047
17193
|
},
|
|
17048
17194
|
{
|
|
17049
17195
|
"name": "legend",
|
|
17050
|
-
"description": "
|
|
17196
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
17051
17197
|
},
|
|
17052
17198
|
{
|
|
17053
17199
|
"name": "legend-item",
|
|
@@ -17921,27 +18067,27 @@
|
|
|
17921
18067
|
"cssParts": [
|
|
17922
18068
|
{
|
|
17923
18069
|
"name": "header",
|
|
17924
|
-
"description": "
|
|
18070
|
+
"description": "The outer page-header landmark."
|
|
17925
18071
|
},
|
|
17926
18072
|
{
|
|
17927
18073
|
"name": "content",
|
|
17928
|
-
"description": "
|
|
18074
|
+
"description": "Inner layout container wrapping and aligning the assigned default slot."
|
|
17929
18075
|
},
|
|
17930
18076
|
{
|
|
17931
18077
|
"name": "brand",
|
|
17932
|
-
"description": "
|
|
18078
|
+
"description": "Container for the `brand` slot."
|
|
17933
18079
|
},
|
|
17934
18080
|
{
|
|
17935
18081
|
"name": "navigation",
|
|
17936
|
-
"description": "
|
|
18082
|
+
"description": "Primary navigation landmark containing the default slot."
|
|
17937
18083
|
},
|
|
17938
18084
|
{
|
|
17939
18085
|
"name": "actions",
|
|
17940
|
-
"description": "
|
|
18086
|
+
"description": "Container for the trailing `actions` slot."
|
|
17941
18087
|
},
|
|
17942
18088
|
{
|
|
17943
18089
|
"name": "mobile-trigger",
|
|
17944
|
-
"description": "
|
|
18090
|
+
"description": "Container for the responsive `mobile-trigger` slot."
|
|
17945
18091
|
}
|
|
17946
18092
|
],
|
|
17947
18093
|
"cssProperties": [
|
|
@@ -18204,7 +18350,7 @@
|
|
|
18204
18350
|
"cssParts": [
|
|
18205
18351
|
{
|
|
18206
18352
|
"name": "button",
|
|
18207
|
-
"description": "
|
|
18353
|
+
"description": "The native button that provides the icon-only interactive surface."
|
|
18208
18354
|
}
|
|
18209
18355
|
],
|
|
18210
18356
|
"cssProperties": [
|
|
@@ -18688,7 +18834,7 @@
|
|
|
18688
18834
|
"cssParts": [
|
|
18689
18835
|
{
|
|
18690
18836
|
"name": "kbd",
|
|
18691
|
-
"description": "
|
|
18837
|
+
"description": "The native `<kbd>` element containing the key or shortcut."
|
|
18692
18838
|
}
|
|
18693
18839
|
],
|
|
18694
18840
|
"cssProperties": [
|
|
@@ -19084,11 +19230,11 @@
|
|
|
19084
19230
|
"cssParts": [
|
|
19085
19231
|
{
|
|
19086
19232
|
"name": "label",
|
|
19087
|
-
"description": "
|
|
19233
|
+
"description": "The label text and optional required marker."
|
|
19088
19234
|
},
|
|
19089
19235
|
{
|
|
19090
19236
|
"name": "required-indicator",
|
|
19091
|
-
"description": "
|
|
19237
|
+
"description": "Marker containing the `required-indicator` slot or fallback asterisk while `required` is set."
|
|
19092
19238
|
}
|
|
19093
19239
|
],
|
|
19094
19240
|
"cssProperties": [
|
|
@@ -19676,7 +19822,7 @@
|
|
|
19676
19822
|
},
|
|
19677
19823
|
{
|
|
19678
19824
|
"name": "tooltip",
|
|
19679
|
-
"description": "
|
|
19825
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
19680
19826
|
},
|
|
19681
19827
|
{
|
|
19682
19828
|
"name": "actions",
|
|
@@ -19684,11 +19830,11 @@
|
|
|
19684
19830
|
},
|
|
19685
19831
|
{
|
|
19686
19832
|
"name": "state",
|
|
19687
|
-
"description": "
|
|
19833
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
19688
19834
|
},
|
|
19689
19835
|
{
|
|
19690
19836
|
"name": "legend",
|
|
19691
|
-
"description": "
|
|
19837
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
19692
19838
|
},
|
|
19693
19839
|
{
|
|
19694
19840
|
"name": "legend-item",
|
|
@@ -20671,11 +20817,11 @@
|
|
|
20671
20817
|
"cssParts": [
|
|
20672
20818
|
{
|
|
20673
20819
|
"name": "link",
|
|
20674
|
-
"description": "
|
|
20820
|
+
"description": "The anchor rendered when `href` is set and the control is enabled."
|
|
20675
20821
|
},
|
|
20676
20822
|
{
|
|
20677
20823
|
"name": "button",
|
|
20678
|
-
"description": "
|
|
20824
|
+
"description": "The native button rendered without `href` or while disabled."
|
|
20679
20825
|
}
|
|
20680
20826
|
],
|
|
20681
20827
|
"cssProperties": [
|
|
@@ -22518,9 +22664,14 @@
|
|
|
22518
22664
|
"tag": "c2-mat-icon",
|
|
22519
22665
|
"className": "MatIcon",
|
|
22520
22666
|
"modulePath": "@c2n/mat-icon",
|
|
22521
|
-
"description": "",
|
|
22667
|
+
"description": "Renders a Material Symbols ligature supplied as consumer-owned text.",
|
|
22522
22668
|
"attributes": [],
|
|
22523
|
-
"slots": [
|
|
22669
|
+
"slots": [
|
|
22670
|
+
{
|
|
22671
|
+
"name": "",
|
|
22672
|
+
"description": "Material Symbols ligature text; style the assigned text through the host's inherited typography."
|
|
22673
|
+
}
|
|
22674
|
+
],
|
|
22524
22675
|
"events": [],
|
|
22525
22676
|
"cssParts": [],
|
|
22526
22677
|
"cssProperties": [
|
|
@@ -23672,7 +23823,32 @@
|
|
|
23672
23823
|
"description": "Native, cancelable: fired on Escape before closing."
|
|
23673
23824
|
}
|
|
23674
23825
|
],
|
|
23675
|
-
"cssParts": [
|
|
23826
|
+
"cssParts": [
|
|
23827
|
+
{
|
|
23828
|
+
"name": "panel",
|
|
23829
|
+
"description": "Dialog panel containing the header, body, and conditional footer regions."
|
|
23830
|
+
},
|
|
23831
|
+
{
|
|
23832
|
+
"name": "header",
|
|
23833
|
+
"description": "Header region containing the title slot and close button."
|
|
23834
|
+
},
|
|
23835
|
+
{
|
|
23836
|
+
"name": "title",
|
|
23837
|
+
"description": "Component-owned title region wrapping the `title` slot."
|
|
23838
|
+
},
|
|
23839
|
+
{
|
|
23840
|
+
"name": "close-button",
|
|
23841
|
+
"description": "Close button containing the `close-icon` slot or its fallback icon."
|
|
23842
|
+
},
|
|
23843
|
+
{
|
|
23844
|
+
"name": "body",
|
|
23845
|
+
"description": "Component-owned body region wrapping the default slot."
|
|
23846
|
+
},
|
|
23847
|
+
{
|
|
23848
|
+
"name": "footer",
|
|
23849
|
+
"description": "Conditional footer region wrapping the `footer` slot."
|
|
23850
|
+
}
|
|
23851
|
+
],
|
|
23676
23852
|
"cssProperties": [
|
|
23677
23853
|
{
|
|
23678
23854
|
"name": "--c2-modal--width",
|
|
@@ -25925,7 +26101,7 @@
|
|
|
25925
26101
|
"description": "Requires a number before the form can be submitted."
|
|
25926
26102
|
},
|
|
25927
26103
|
{
|
|
25928
|
-
"name": "
|
|
26104
|
+
"name": "readonly",
|
|
25929
26105
|
"type": "boolean",
|
|
25930
26106
|
"default": "false",
|
|
25931
26107
|
"description": "Prevents editing while keeping the value in form submission."
|
|
@@ -26724,27 +26900,27 @@
|
|
|
26724
26900
|
"cssParts": [
|
|
26725
26901
|
{
|
|
26726
26902
|
"name": "nav",
|
|
26727
|
-
"description": "
|
|
26903
|
+
"description": "A first, previous, next or last page button."
|
|
26728
26904
|
},
|
|
26729
26905
|
{
|
|
26730
26906
|
"name": "item",
|
|
26731
|
-
"description": "
|
|
26907
|
+
"description": "A numbered page button."
|
|
26732
26908
|
},
|
|
26733
26909
|
{
|
|
26734
26910
|
"name": "ellipsis",
|
|
26735
|
-
"description": "
|
|
26911
|
+
"description": "A control that jumps across a hidden range of pages."
|
|
26736
26912
|
},
|
|
26737
26913
|
{
|
|
26738
26914
|
"name": "label",
|
|
26739
|
-
"description": "
|
|
26915
|
+
"description": "Current-page, item-range or page-size text."
|
|
26740
26916
|
},
|
|
26741
26917
|
{
|
|
26742
26918
|
"name": "page-size",
|
|
26743
|
-
"description": "
|
|
26919
|
+
"description": "The `c2-select` used to change the number of items per page."
|
|
26744
26920
|
},
|
|
26745
26921
|
{
|
|
26746
26922
|
"name": "pagination",
|
|
26747
|
-
"description": "
|
|
26923
|
+
"description": "The outer pagination navigation landmark."
|
|
26748
26924
|
}
|
|
26749
26925
|
],
|
|
26750
26926
|
"cssProperties": [
|
|
@@ -29154,7 +29330,7 @@
|
|
|
29154
29330
|
},
|
|
29155
29331
|
{
|
|
29156
29332
|
"name": "tooltip",
|
|
29157
|
-
"description": "
|
|
29333
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
29158
29334
|
},
|
|
29159
29335
|
{
|
|
29160
29336
|
"name": "actions",
|
|
@@ -29162,11 +29338,11 @@
|
|
|
29162
29338
|
},
|
|
29163
29339
|
{
|
|
29164
29340
|
"name": "state",
|
|
29165
|
-
"description": "
|
|
29341
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
29166
29342
|
},
|
|
29167
29343
|
{
|
|
29168
29344
|
"name": "legend",
|
|
29169
|
-
"description": "
|
|
29345
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
29170
29346
|
},
|
|
29171
29347
|
{
|
|
29172
29348
|
"name": "legend-item",
|
|
@@ -30104,23 +30280,23 @@
|
|
|
30104
30280
|
"cssParts": [
|
|
30105
30281
|
{
|
|
30106
30282
|
"name": "header",
|
|
30107
|
-
"description": "
|
|
30283
|
+
"description": "Row containing the label and displayed value."
|
|
30108
30284
|
},
|
|
30109
30285
|
{
|
|
30110
30286
|
"name": "label",
|
|
30111
|
-
"description": "
|
|
30287
|
+
"description": "Container for the default label slot."
|
|
30112
30288
|
},
|
|
30113
30289
|
{
|
|
30114
30290
|
"name": "value",
|
|
30115
|
-
"description": "
|
|
30291
|
+
"description": "Text region containing the custom `value` slot or displayed-percentage fallback."
|
|
30116
30292
|
},
|
|
30117
30293
|
{
|
|
30118
30294
|
"name": "track",
|
|
30119
|
-
"description": "
|
|
30295
|
+
"description": "The full progress track."
|
|
30120
30296
|
},
|
|
30121
30297
|
{
|
|
30122
30298
|
"name": "indicator",
|
|
30123
|
-
"description": "
|
|
30299
|
+
"description": "The filled portion of the progress track."
|
|
30124
30300
|
}
|
|
30125
30301
|
],
|
|
30126
30302
|
"cssProperties": [
|
|
@@ -30829,19 +31005,19 @@
|
|
|
30829
31005
|
"cssParts": [
|
|
30830
31006
|
{
|
|
30831
31007
|
"name": "previous-button",
|
|
30832
|
-
"description": "
|
|
31008
|
+
"description": "Fallback button inside the `previous-button` slot when no assigned replacement is present."
|
|
30833
31009
|
},
|
|
30834
31010
|
{
|
|
30835
31011
|
"name": "skip-button",
|
|
30836
|
-
"description": "
|
|
31012
|
+
"description": "Fallback button inside the `skip-button` slot when no assigned replacement is present."
|
|
30837
31013
|
},
|
|
30838
31014
|
{
|
|
30839
31015
|
"name": "next-button",
|
|
30840
|
-
"description": "
|
|
31016
|
+
"description": "Fallback button inside the `next-button` slot when no assigned replacement is present."
|
|
30841
31017
|
},
|
|
30842
31018
|
{
|
|
30843
31019
|
"name": "submit-button",
|
|
30844
|
-
"description": "
|
|
31020
|
+
"description": "Fallback button inside the `submit-button` slot when no assigned replacement is present."
|
|
30845
31021
|
}
|
|
30846
31022
|
],
|
|
30847
31023
|
"cssProperties": [
|
|
@@ -31457,7 +31633,7 @@
|
|
|
31457
31633
|
},
|
|
31458
31634
|
{
|
|
31459
31635
|
"name": "tooltip",
|
|
31460
|
-
"description": "
|
|
31636
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
31461
31637
|
},
|
|
31462
31638
|
{
|
|
31463
31639
|
"name": "actions",
|
|
@@ -31465,11 +31641,11 @@
|
|
|
31465
31641
|
},
|
|
31466
31642
|
{
|
|
31467
31643
|
"name": "state",
|
|
31468
|
-
"description": "
|
|
31644
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
31469
31645
|
},
|
|
31470
31646
|
{
|
|
31471
31647
|
"name": "legend",
|
|
31472
|
-
"description": "
|
|
31648
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
31473
31649
|
},
|
|
31474
31650
|
{
|
|
31475
31651
|
"name": "legend-item",
|
|
@@ -32276,27 +32452,27 @@
|
|
|
32276
32452
|
"cssParts": [
|
|
32277
32453
|
{
|
|
32278
32454
|
"name": "control",
|
|
32279
|
-
"description": "
|
|
32455
|
+
"description": "The default circular radio indicator."
|
|
32280
32456
|
},
|
|
32281
32457
|
{
|
|
32282
32458
|
"name": "dot",
|
|
32283
|
-
"description": "
|
|
32459
|
+
"description": "Checked-mark region containing the `dot` slot or fallback inside the default control."
|
|
32284
32460
|
},
|
|
32285
32461
|
{
|
|
32286
32462
|
"name": "icon",
|
|
32287
|
-
"description": "
|
|
32463
|
+
"description": "Custom indicator shown from the `icon` slot."
|
|
32288
32464
|
},
|
|
32289
32465
|
{
|
|
32290
32466
|
"name": "checked-icon",
|
|
32291
|
-
"description": "
|
|
32467
|
+
"description": "Custom indicator shown from the `checked-icon` slot while checked."
|
|
32292
32468
|
},
|
|
32293
32469
|
{
|
|
32294
32470
|
"name": "label",
|
|
32295
|
-
"description": "
|
|
32471
|
+
"description": "The option label."
|
|
32296
32472
|
},
|
|
32297
32473
|
{
|
|
32298
32474
|
"name": "description",
|
|
32299
|
-
"description": "
|
|
32475
|
+
"description": "Supporting-text region containing the `description` slot below the label."
|
|
32300
32476
|
}
|
|
32301
32477
|
],
|
|
32302
32478
|
"cssProperties": [
|
|
@@ -33360,43 +33536,277 @@
|
|
|
33360
33536
|
"reorder-list": {
|
|
33361
33537
|
"id": "reorder-list",
|
|
33362
33538
|
"package": "@c2n/reorder-list",
|
|
33363
|
-
"title": "
|
|
33364
|
-
"description": "",
|
|
33365
|
-
"
|
|
33366
|
-
"
|
|
33539
|
+
"title": "Reorder List",
|
|
33540
|
+
"description": "Reorder a vertical queue with pointer or keyboard input while the application owns persistence.",
|
|
33541
|
+
"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.",
|
|
33542
|
+
"category": "Data display",
|
|
33543
|
+
"status": "stable",
|
|
33367
33544
|
"docsUrl": "https://code2nguyen.github.io/web-components/components/reorder-list",
|
|
33368
33545
|
"elements": [
|
|
33369
33546
|
{
|
|
33370
33547
|
"tag": "c2-reorder-list",
|
|
33371
33548
|
"className": "ReorderList",
|
|
33372
33549
|
"modulePath": "@c2n/reorder-list",
|
|
33373
|
-
"description": "",
|
|
33550
|
+
"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
33551
|
"attributes": [
|
|
33375
33552
|
{
|
|
33376
33553
|
"name": "editable",
|
|
33377
33554
|
"type": "boolean",
|
|
33378
|
-
"default": "false"
|
|
33555
|
+
"default": "false",
|
|
33556
|
+
"description": "Enables pointer and keyboard reordering."
|
|
33379
33557
|
},
|
|
33380
33558
|
{
|
|
33381
|
-
"name": "
|
|
33559
|
+
"name": "dragstartthreshold",
|
|
33382
33560
|
"type": "number",
|
|
33383
|
-
"default": "10"
|
|
33561
|
+
"default": "10",
|
|
33562
|
+
"description": "Minimum summed pointer movement in CSS pixels before pickup. Invalid values use 10."
|
|
33384
33563
|
},
|
|
33385
33564
|
{
|
|
33386
|
-
"name": "
|
|
33565
|
+
"name": "autoscrolldisabled",
|
|
33387
33566
|
"type": "boolean",
|
|
33388
|
-
"default": "false"
|
|
33567
|
+
"default": "false",
|
|
33568
|
+
"description": "Prevents component-driven scrolling of the nearest eligible vertical ancestor."
|
|
33569
|
+
}
|
|
33570
|
+
],
|
|
33571
|
+
"slots": [
|
|
33572
|
+
{
|
|
33573
|
+
"name": "",
|
|
33574
|
+
"description": "Ordinary direct-child items. Numeric or private slot metadata is assigned internally and is not consumer API."
|
|
33575
|
+
},
|
|
33576
|
+
{
|
|
33577
|
+
"name": "placeholder",
|
|
33578
|
+
"description": "Optional destination feedback shown only during pointer reordering."
|
|
33579
|
+
},
|
|
33580
|
+
{
|
|
33581
|
+
"name": "dragging-item",
|
|
33582
|
+
"description": "Optional pointer preview shown only during pointer reordering."
|
|
33389
33583
|
}
|
|
33390
33584
|
],
|
|
33391
|
-
"slots": [],
|
|
33392
33585
|
"events": [
|
|
33586
|
+
{
|
|
33587
|
+
"name": "reorder",
|
|
33588
|
+
"type": "CustomEvent<ReorderEventDetail>",
|
|
33589
|
+
"description": "Fired once after a real committed user reorder. Bubbles and crosses shadow boundaries; not cancelable."
|
|
33590
|
+
},
|
|
33393
33591
|
{
|
|
33394
33592
|
"name": "change",
|
|
33395
|
-
"type": "CustomEvent"
|
|
33593
|
+
"type": "CustomEvent<number[]>",
|
|
33594
|
+
"description": "Deprecated numeric permutation emitted with `reorder` during the compatibility window."
|
|
33595
|
+
},
|
|
33596
|
+
{
|
|
33597
|
+
"name": "reorder-error",
|
|
33598
|
+
"type": "CustomEvent<ReorderErrorEventDetail>",
|
|
33599
|
+
"description": "Fired when duplicate non-empty item keys prevent pickup."
|
|
33396
33600
|
}
|
|
33397
33601
|
],
|
|
33398
|
-
"cssParts": [
|
|
33399
|
-
|
|
33602
|
+
"cssParts": [
|
|
33603
|
+
{
|
|
33604
|
+
"name": "container",
|
|
33605
|
+
"description": "Ordered-list layout and component-owned spacing boundary."
|
|
33606
|
+
},
|
|
33607
|
+
{
|
|
33608
|
+
"name": "item",
|
|
33609
|
+
"description": "Repeated component-owned placement wrapper around the default slot's assigned ordinary item; styles placement, not assigned content."
|
|
33610
|
+
},
|
|
33611
|
+
{
|
|
33612
|
+
"name": "placeholder",
|
|
33613
|
+
"description": "Component-owned destination marker wrapping the `placeholder` slot or its visible fallback; styles placement, not assigned content."
|
|
33614
|
+
},
|
|
33615
|
+
{
|
|
33616
|
+
"name": "dragging-item",
|
|
33617
|
+
"description": "Fixed-position component-owned preview region wrapping the `dragging-item` slot or its recognizable fallback; styles placement, not assigned content."
|
|
33618
|
+
}
|
|
33619
|
+
],
|
|
33620
|
+
"cssProperties": [
|
|
33621
|
+
{
|
|
33622
|
+
"name": "--c2-reorder-list--container-border-width",
|
|
33623
|
+
"type": "length",
|
|
33624
|
+
"default": "0px",
|
|
33625
|
+
"part": "",
|
|
33626
|
+
"property": "container-border-width",
|
|
33627
|
+
"description": "Container border width."
|
|
33628
|
+
},
|
|
33629
|
+
{
|
|
33630
|
+
"name": "--c2-reorder-list--container-border-color",
|
|
33631
|
+
"type": "color",
|
|
33632
|
+
"default": "#bcbcc6",
|
|
33633
|
+
"part": "",
|
|
33634
|
+
"property": "container-border-color",
|
|
33635
|
+
"description": "Container border color."
|
|
33636
|
+
},
|
|
33637
|
+
{
|
|
33638
|
+
"name": "--c2-reorder-list--container-border-radius",
|
|
33639
|
+
"type": "length",
|
|
33640
|
+
"default": "8px",
|
|
33641
|
+
"part": "",
|
|
33642
|
+
"property": "container-border-radius",
|
|
33643
|
+
"description": "Container corner radius."
|
|
33644
|
+
},
|
|
33645
|
+
{
|
|
33646
|
+
"name": "--c2-reorder-list--container-padding",
|
|
33647
|
+
"type": "length",
|
|
33648
|
+
"default": "0px",
|
|
33649
|
+
"part": "",
|
|
33650
|
+
"property": "container-padding",
|
|
33651
|
+
"description": "Container padding."
|
|
33652
|
+
},
|
|
33653
|
+
{
|
|
33654
|
+
"name": "--c2-reorder-list--container-margin",
|
|
33655
|
+
"type": "length",
|
|
33656
|
+
"default": "0px",
|
|
33657
|
+
"part": "",
|
|
33658
|
+
"property": "container-margin",
|
|
33659
|
+
"description": "Container margin."
|
|
33660
|
+
},
|
|
33661
|
+
{
|
|
33662
|
+
"name": "--c2-reorder-list--container-gap",
|
|
33663
|
+
"type": "length",
|
|
33664
|
+
"default": "0px",
|
|
33665
|
+
"part": "",
|
|
33666
|
+
"property": "container-gap",
|
|
33667
|
+
"description": "Space between item placements."
|
|
33668
|
+
},
|
|
33669
|
+
{
|
|
33670
|
+
"name": "--c2-reorder-list--item-background",
|
|
33671
|
+
"type": "color",
|
|
33672
|
+
"default": "transparent",
|
|
33673
|
+
"part": "",
|
|
33674
|
+
"property": "item-background",
|
|
33675
|
+
"description": "Item placement background."
|
|
33676
|
+
},
|
|
33677
|
+
{
|
|
33678
|
+
"name": "--c2-reorder-list--item-padding",
|
|
33679
|
+
"type": "length",
|
|
33680
|
+
"default": "0px",
|
|
33681
|
+
"part": "",
|
|
33682
|
+
"property": "item-padding",
|
|
33683
|
+
"description": "Item placement padding."
|
|
33684
|
+
},
|
|
33685
|
+
{
|
|
33686
|
+
"name": "--c2-reorder-list--divider-height",
|
|
33687
|
+
"type": "length",
|
|
33688
|
+
"default": "0px",
|
|
33689
|
+
"part": "",
|
|
33690
|
+
"property": "divider-height",
|
|
33691
|
+
"description": "Divider thickness."
|
|
33692
|
+
},
|
|
33693
|
+
{
|
|
33694
|
+
"name": "--c2-reorder-list--divider-color",
|
|
33695
|
+
"type": "color",
|
|
33696
|
+
"default": "#bcbcc6",
|
|
33697
|
+
"part": "",
|
|
33698
|
+
"property": "divider-color",
|
|
33699
|
+
"description": "Divider color."
|
|
33700
|
+
},
|
|
33701
|
+
{
|
|
33702
|
+
"name": "--c2-reorder-list--placeholder-background",
|
|
33703
|
+
"type": "color",
|
|
33704
|
+
"default": "rgb(37 99 235 / 8%)",
|
|
33705
|
+
"part": "",
|
|
33706
|
+
"property": "placeholder-background",
|
|
33707
|
+
"description": "Placeholder background."
|
|
33708
|
+
},
|
|
33709
|
+
{
|
|
33710
|
+
"name": "--c2-reorder-list--dragging-item-background",
|
|
33711
|
+
"type": "color",
|
|
33712
|
+
"default": "transparent",
|
|
33713
|
+
"part": "",
|
|
33714
|
+
"property": "dragging-item-background",
|
|
33715
|
+
"description": "Pointer-preview background."
|
|
33716
|
+
},
|
|
33717
|
+
{
|
|
33718
|
+
"name": "--c2-reorder-list__item__focus--outline-width",
|
|
33719
|
+
"type": "length",
|
|
33720
|
+
"default": "2px",
|
|
33721
|
+
"part": "item",
|
|
33722
|
+
"state": "focus",
|
|
33723
|
+
"property": "outline-width",
|
|
33724
|
+
"description": "Keyboard focus-ring width."
|
|
33725
|
+
},
|
|
33726
|
+
{
|
|
33727
|
+
"name": "--c2-reorder-list__item__focus--outline-color",
|
|
33728
|
+
"type": "color",
|
|
33729
|
+
"default": "#2563eb",
|
|
33730
|
+
"part": "item",
|
|
33731
|
+
"state": "focus",
|
|
33732
|
+
"property": "outline-color",
|
|
33733
|
+
"description": "Keyboard focus-ring color."
|
|
33734
|
+
},
|
|
33735
|
+
{
|
|
33736
|
+
"name": "--c2-reorder-list__item__focus--outline-offset",
|
|
33737
|
+
"type": "length",
|
|
33738
|
+
"default": "2px",
|
|
33739
|
+
"part": "item",
|
|
33740
|
+
"state": "focus",
|
|
33741
|
+
"property": "outline-offset",
|
|
33742
|
+
"description": "Keyboard focus-ring offset."
|
|
33743
|
+
},
|
|
33744
|
+
{
|
|
33745
|
+
"name": "--c2-reorder-list__item__active--opacity",
|
|
33746
|
+
"type": "number",
|
|
33747
|
+
"default": "0.45",
|
|
33748
|
+
"part": "item",
|
|
33749
|
+
"state": "active",
|
|
33750
|
+
"property": "opacity",
|
|
33751
|
+
"description": "Active source opacity."
|
|
33752
|
+
},
|
|
33753
|
+
{
|
|
33754
|
+
"name": "--c2-reorder-list__placeholder--border-width",
|
|
33755
|
+
"type": "length",
|
|
33756
|
+
"default": "2px",
|
|
33757
|
+
"part": "placeholder",
|
|
33758
|
+
"property": "border-width",
|
|
33759
|
+
"description": "Destination border width."
|
|
33760
|
+
},
|
|
33761
|
+
{
|
|
33762
|
+
"name": "--c2-reorder-list__placeholder--border-style",
|
|
33763
|
+
"type": "string",
|
|
33764
|
+
"default": "dashed",
|
|
33765
|
+
"part": "placeholder",
|
|
33766
|
+
"property": "border-style",
|
|
33767
|
+
"description": "Destination border style."
|
|
33768
|
+
},
|
|
33769
|
+
{
|
|
33770
|
+
"name": "--c2-reorder-list__placeholder--border-color",
|
|
33771
|
+
"type": "color",
|
|
33772
|
+
"default": "#2563eb",
|
|
33773
|
+
"part": "placeholder",
|
|
33774
|
+
"property": "border-color",
|
|
33775
|
+
"description": "Destination border color."
|
|
33776
|
+
},
|
|
33777
|
+
{
|
|
33778
|
+
"name": "--c2-reorder-list__dragging-item--opacity",
|
|
33779
|
+
"type": "number",
|
|
33780
|
+
"default": "0.92",
|
|
33781
|
+
"part": "dragging-item",
|
|
33782
|
+
"property": "opacity",
|
|
33783
|
+
"description": "Pointer-preview opacity."
|
|
33784
|
+
},
|
|
33785
|
+
{
|
|
33786
|
+
"name": "--c2-reorder-list__dragging-item--box-shadow",
|
|
33787
|
+
"type": "box-shadow",
|
|
33788
|
+
"default": "0 12px 28px rgb(15 23 42 / 24%)",
|
|
33789
|
+
"part": "dragging-item",
|
|
33790
|
+
"property": "box-shadow",
|
|
33791
|
+
"description": "Pointer-preview shadow."
|
|
33792
|
+
},
|
|
33793
|
+
{
|
|
33794
|
+
"name": "--c2-reorder-list__motion--duration",
|
|
33795
|
+
"type": "time",
|
|
33796
|
+
"default": "160ms",
|
|
33797
|
+
"part": "motion",
|
|
33798
|
+
"property": "duration",
|
|
33799
|
+
"description": "Decorative transition duration; zero under reduced motion."
|
|
33800
|
+
},
|
|
33801
|
+
{
|
|
33802
|
+
"name": "--c2-reorder-list__motion--timing-function",
|
|
33803
|
+
"type": "easing-function",
|
|
33804
|
+
"default": "ease",
|
|
33805
|
+
"part": "motion",
|
|
33806
|
+
"property": "timing-function",
|
|
33807
|
+
"description": "Decorative transition easing."
|
|
33808
|
+
}
|
|
33809
|
+
]
|
|
33400
33810
|
}
|
|
33401
33811
|
],
|
|
33402
33812
|
"composition": {
|
|
@@ -33409,8 +33819,50 @@
|
|
|
33409
33819
|
"import": "import '@c2n/reorder-list'",
|
|
33410
33820
|
"importClass": "import { ReorderList } from '@c2n/reorder-list'"
|
|
33411
33821
|
},
|
|
33412
|
-
"examples": [
|
|
33413
|
-
|
|
33822
|
+
"examples": [
|
|
33823
|
+
{
|
|
33824
|
+
"kind": "usage",
|
|
33825
|
+
"label": "Deployment queue",
|
|
33826
|
+
"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>",
|
|
33827
|
+
"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}"
|
|
33828
|
+
},
|
|
33829
|
+
{
|
|
33830
|
+
"kind": "gallery",
|
|
33831
|
+
"label": "Default",
|
|
33832
|
+
"section": "Presets",
|
|
33833
|
+
"description": "Default Presets example for c2-reorder-list.",
|
|
33834
|
+
"isDefault": true,
|
|
33835
|
+
"tags": [
|
|
33836
|
+
"c2-reorder-list"
|
|
33837
|
+
],
|
|
33838
|
+
"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>"
|
|
33839
|
+
},
|
|
33840
|
+
{
|
|
33841
|
+
"kind": "gallery",
|
|
33842
|
+
"label": "Operations queue",
|
|
33843
|
+
"section": "Presets",
|
|
33844
|
+
"description": "Operations queue Presets example for c2-reorder-list.",
|
|
33845
|
+
"isDefault": false,
|
|
33846
|
+
"tags": [
|
|
33847
|
+
"c2-reorder-list"
|
|
33848
|
+
],
|
|
33849
|
+
"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>",
|
|
33850
|
+
"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}"
|
|
33851
|
+
},
|
|
33852
|
+
{
|
|
33853
|
+
"kind": "gallery",
|
|
33854
|
+
"label": "Compact backlog",
|
|
33855
|
+
"section": "Presets",
|
|
33856
|
+
"description": "Compact backlog Presets example for c2-reorder-list.",
|
|
33857
|
+
"isDefault": false,
|
|
33858
|
+
"tags": [
|
|
33859
|
+
"c2-reorder-list"
|
|
33860
|
+
],
|
|
33861
|
+
"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>",
|
|
33862
|
+
"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}"
|
|
33863
|
+
}
|
|
33864
|
+
],
|
|
33865
|
+
"hasGallery": true
|
|
33414
33866
|
},
|
|
33415
33867
|
"scatter-chart": {
|
|
33416
33868
|
"id": "scatter-chart",
|
|
@@ -33637,7 +34089,7 @@
|
|
|
33637
34089
|
},
|
|
33638
34090
|
{
|
|
33639
34091
|
"name": "tooltip",
|
|
33640
|
-
"description": "
|
|
34092
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
33641
34093
|
},
|
|
33642
34094
|
{
|
|
33643
34095
|
"name": "actions",
|
|
@@ -33645,11 +34097,11 @@
|
|
|
33645
34097
|
},
|
|
33646
34098
|
{
|
|
33647
34099
|
"name": "state",
|
|
33648
|
-
"description": "
|
|
34100
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
33649
34101
|
},
|
|
33650
34102
|
{
|
|
33651
34103
|
"name": "legend",
|
|
33652
|
-
"description": "
|
|
34104
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
33653
34105
|
},
|
|
33654
34106
|
{
|
|
33655
34107
|
"name": "legend-item",
|
|
@@ -35500,6 +35952,19 @@
|
|
|
35500
35952
|
"html": "<c2-select multiple value=\"design;engineering\" placeholder=\"Teams\" class=\"multiple\" client:only=\"lit\"><c2-list-item value=\"design\">Design</c2-list-item><c2-list-item value=\"engineering\">Engineering</c2-list-item><c2-list-item value=\"marketing\">Marketing</c2-list-item><c2-list-item value=\"sales\">Sales</c2-list-item></c2-select>",
|
|
35501
35953
|
"css": ".multiple {\n width: 220px;\n}"
|
|
35502
35954
|
},
|
|
35955
|
+
{
|
|
35956
|
+
"kind": "gallery",
|
|
35957
|
+
"label": "Checkbox multiple",
|
|
35958
|
+
"section": "Options",
|
|
35959
|
+
"description": "Checkbox multiple Options example for c2-select.",
|
|
35960
|
+
"isDefault": false,
|
|
35961
|
+
"tags": [
|
|
35962
|
+
"c2-select",
|
|
35963
|
+
"c2-list-item"
|
|
35964
|
+
],
|
|
35965
|
+
"html": "<c2-select multiple value=\"design;engineering\" placeholder=\"Teams\" class=\"checkbox-multiple\" client:only=\"lit\">\n <c2-list-item value=\"design\"><span slot=\"prefix-icon\" class=\"box\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg></span>Design</c2-list-item>\n <c2-list-item value=\"engineering\"><span slot=\"prefix-icon\" class=\"box\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg></span>Engineering</c2-list-item>\n <c2-list-item value=\"marketing\"><span slot=\"prefix-icon\" class=\"box\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg></span>Marketing</c2-list-item>\n <c2-list-item value=\"sales\"><span slot=\"prefix-icon\" class=\"box\"><svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"3\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"20 6 9 17 4 12\"></polyline></svg></span>Sales</c2-list-item>\n</c2-select>",
|
|
35966
|
+
"css": ".checkbox-multiple {\n width: 220px;\n --c2-list-item--gap: 10px;\n --c2-list-item__selected--background: transparent;\n --c2-list-item__selected--color: #18181b;\n --c2-list-item__selected__hover--background: #f4f4f5;\n}\n.checkbox-multiple .box {\n display: inline-flex;\n align-items: center;\n justify-content: center;\n box-sizing: border-box;\n width: 16px;\n height: 16px;\n border: 1px solid #bcbcc6;\n border-radius: 4px;\n color: #ffffff;\n transition:\n background 120ms ease,\n border-color 120ms ease;\n}\n.checkbox-multiple .box svg {\n width: 12px;\n height: 12px;\n visibility: hidden;\n}\n.checkbox-multiple c2-list-item[selected] .box {\n background: #476ef9;\n border-color: #476ef9;\n}\n.checkbox-multiple c2-list-item[selected] .box svg {\n visibility: visible;\n}"
|
|
35967
|
+
},
|
|
35503
35968
|
{
|
|
35504
35969
|
"kind": "gallery",
|
|
35505
35970
|
"label": "Flat rows",
|
|
@@ -35560,15 +36025,15 @@
|
|
|
35560
36025
|
"cssParts": [
|
|
35561
36026
|
{
|
|
35562
36027
|
"name": "seperator",
|
|
35563
|
-
"description": "
|
|
36028
|
+
"description": "The outer separator layout container."
|
|
35564
36029
|
},
|
|
35565
36030
|
{
|
|
35566
36031
|
"name": "line",
|
|
35567
|
-
"description": "
|
|
36032
|
+
"description": "Each line segment on either side of the optional label."
|
|
35568
36033
|
},
|
|
35569
36034
|
{
|
|
35570
36035
|
"name": "label",
|
|
35571
|
-
"description": "
|
|
36036
|
+
"description": "Container for the optional default slot."
|
|
35572
36037
|
}
|
|
35573
36038
|
],
|
|
35574
36039
|
"cssProperties": [
|
|
@@ -35997,23 +36462,23 @@
|
|
|
35997
36462
|
"cssParts": [
|
|
35998
36463
|
{
|
|
35999
36464
|
"name": "panel",
|
|
36000
|
-
"description": "
|
|
36465
|
+
"description": "The sheet surface positioned over the overlay."
|
|
36001
36466
|
},
|
|
36002
36467
|
{
|
|
36003
36468
|
"name": "header",
|
|
36004
|
-
"description": "
|
|
36469
|
+
"description": "Header containing the title and optional close button."
|
|
36005
36470
|
},
|
|
36006
36471
|
{
|
|
36007
36472
|
"name": "close",
|
|
36008
|
-
"description": "
|
|
36473
|
+
"description": "The native close button."
|
|
36009
36474
|
},
|
|
36010
36475
|
{
|
|
36011
36476
|
"name": "body",
|
|
36012
|
-
"description": "
|
|
36477
|
+
"description": "Scrollable container for the default slot."
|
|
36013
36478
|
},
|
|
36014
36479
|
{
|
|
36015
36480
|
"name": "footer",
|
|
36016
|
-
"description": "
|
|
36481
|
+
"description": "Container wrapping the assigned `footer` slot actions."
|
|
36017
36482
|
}
|
|
36018
36483
|
],
|
|
36019
36484
|
"cssProperties": [
|
|
@@ -37137,7 +37602,7 @@
|
|
|
37137
37602
|
"cssParts": [
|
|
37138
37603
|
{
|
|
37139
37604
|
"name": "block",
|
|
37140
|
-
"description": "
|
|
37605
|
+
"description": "Each animated placeholder block."
|
|
37141
37606
|
}
|
|
37142
37607
|
],
|
|
37143
37608
|
"cssProperties": [
|
|
@@ -37552,19 +38017,19 @@
|
|
|
37552
38017
|
"cssParts": [
|
|
37553
38018
|
{
|
|
37554
38019
|
"name": "track",
|
|
37555
|
-
"description": "
|
|
38020
|
+
"description": "The complete slider track."
|
|
37556
38021
|
},
|
|
37557
38022
|
{
|
|
37558
38023
|
"name": "fill",
|
|
37559
|
-
"description": "
|
|
38024
|
+
"description": "The track segment before the current value."
|
|
37560
38025
|
},
|
|
37561
38026
|
{
|
|
37562
38027
|
"name": "thumb",
|
|
37563
|
-
"description": "
|
|
38028
|
+
"description": "The draggable value handle."
|
|
37564
38029
|
},
|
|
37565
38030
|
{
|
|
37566
38031
|
"name": "value",
|
|
37567
|
-
"description": "
|
|
38032
|
+
"description": "The value bubble shown above the thumb when `show-value` is set."
|
|
37568
38033
|
}
|
|
37569
38034
|
],
|
|
37570
38035
|
"cssProperties": [
|
|
@@ -38246,7 +38711,7 @@
|
|
|
38246
38711
|
},
|
|
38247
38712
|
{
|
|
38248
38713
|
"name": "tooltip",
|
|
38249
|
-
"description": "
|
|
38714
|
+
"description": "Component-owned bubble containing the `tooltip` slot and its generated fallback content."
|
|
38250
38715
|
},
|
|
38251
38716
|
{
|
|
38252
38717
|
"name": "actions",
|
|
@@ -38254,11 +38719,11 @@
|
|
|
38254
38719
|
},
|
|
38255
38720
|
{
|
|
38256
38721
|
"name": "state",
|
|
38257
|
-
"description": "
|
|
38722
|
+
"description": "Shared message layer containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
38258
38723
|
},
|
|
38259
38724
|
{
|
|
38260
38725
|
"name": "legend",
|
|
38261
|
-
"description": "
|
|
38726
|
+
"description": "Component-owned container wrapping the `legend` slot and generated legend fallback."
|
|
38262
38727
|
},
|
|
38263
38728
|
{
|
|
38264
38729
|
"name": "legend-item",
|
|
@@ -39150,19 +39615,19 @@
|
|
|
39150
39615
|
"cssParts": [
|
|
39151
39616
|
{
|
|
39152
39617
|
"name": "ring",
|
|
39153
|
-
"description": "
|
|
39618
|
+
"description": "The SVG containing the spinner track and animated arc."
|
|
39154
39619
|
},
|
|
39155
39620
|
{
|
|
39156
39621
|
"name": "track",
|
|
39157
|
-
"description": "
|
|
39622
|
+
"description": "The stationary background circle."
|
|
39158
39623
|
},
|
|
39159
39624
|
{
|
|
39160
39625
|
"name": "arc",
|
|
39161
|
-
"description": "
|
|
39626
|
+
"description": "The animated foreground circle."
|
|
39162
39627
|
},
|
|
39163
39628
|
{
|
|
39164
39629
|
"name": "label",
|
|
39165
|
-
"description": "
|
|
39630
|
+
"description": "Container for the optional loading text."
|
|
39166
39631
|
}
|
|
39167
39632
|
],
|
|
39168
39633
|
"cssProperties": [
|
|
@@ -39536,27 +40001,27 @@
|
|
|
39536
40001
|
"cssParts": [
|
|
39537
40002
|
{
|
|
39538
40003
|
"name": "container",
|
|
39539
|
-
"description": "
|
|
40004
|
+
"description": "The outer statistic layout container."
|
|
39540
40005
|
},
|
|
39541
40006
|
{
|
|
39542
40007
|
"name": "icon",
|
|
39543
|
-
"description": "
|
|
40008
|
+
"description": "Container wrapping the assigned leading `icon` slot."
|
|
39544
40009
|
},
|
|
39545
40010
|
{
|
|
39546
40011
|
"name": "value",
|
|
39547
|
-
"description": "
|
|
40012
|
+
"description": "Container wrapping the assigned primary `value` slot."
|
|
39548
40013
|
},
|
|
39549
40014
|
{
|
|
39550
40015
|
"name": "trend",
|
|
39551
|
-
"description": "
|
|
40016
|
+
"description": "Container wrapping the assigned `trend` slot badge or text."
|
|
39552
40017
|
},
|
|
39553
40018
|
{
|
|
39554
40019
|
"name": "label",
|
|
39555
|
-
"description": "
|
|
40020
|
+
"description": "Container wrapping the assigned statistic `label` slot."
|
|
39556
40021
|
},
|
|
39557
40022
|
{
|
|
39558
40023
|
"name": "description",
|
|
39559
|
-
"description": "
|
|
40024
|
+
"description": "Container wrapping the assigned supporting `description` slot."
|
|
39560
40025
|
}
|
|
39561
40026
|
],
|
|
39562
40027
|
"cssProperties": [
|
|
@@ -39932,7 +40397,28 @@
|
|
|
39932
40397
|
}
|
|
39933
40398
|
],
|
|
39934
40399
|
"events": [],
|
|
39935
|
-
"cssParts": [
|
|
40400
|
+
"cssParts": [
|
|
40401
|
+
{
|
|
40402
|
+
"name": "media",
|
|
40403
|
+
"description": "Container for the `media` slot and its status-icon fallback; always present."
|
|
40404
|
+
},
|
|
40405
|
+
{
|
|
40406
|
+
"name": "title",
|
|
40407
|
+
"description": "Heading region for the `title` slot or `heading` fallback; hidden when both are empty."
|
|
40408
|
+
},
|
|
40409
|
+
{
|
|
40410
|
+
"name": "description",
|
|
40411
|
+
"description": "Supporting-copy region for the `description` slot or attribute fallback; hidden when both are empty."
|
|
40412
|
+
},
|
|
40413
|
+
{
|
|
40414
|
+
"name": "content",
|
|
40415
|
+
"description": "Additional-details region around the `content` slot; hidden while the slot is empty."
|
|
40416
|
+
},
|
|
40417
|
+
{
|
|
40418
|
+
"name": "actions",
|
|
40419
|
+
"description": "Action row around the `actions` slot; hidden while the slot is empty."
|
|
40420
|
+
}
|
|
40421
|
+
],
|
|
39936
40422
|
"cssProperties": [
|
|
39937
40423
|
{
|
|
39938
40424
|
"name": "--c2-status-panel__container--width",
|
|
@@ -40571,11 +41057,11 @@
|
|
|
40571
41057
|
},
|
|
40572
41058
|
{
|
|
40573
41059
|
"name": "toggle",
|
|
40574
|
-
"description": "
|
|
41060
|
+
"description": "Disclosure region containing the assigned `toggle` slot for a group."
|
|
40575
41061
|
},
|
|
40576
41062
|
{
|
|
40577
41063
|
"name": "marker",
|
|
40578
|
-
"description": "
|
|
41064
|
+
"description": "Round marker region containing the `marker` slot or status fallback at the start of the row."
|
|
40579
41065
|
},
|
|
40580
41066
|
{
|
|
40581
41067
|
"name": "rail",
|
|
@@ -40583,15 +41069,15 @@
|
|
|
40583
41069
|
},
|
|
40584
41070
|
{
|
|
40585
41071
|
"name": "label",
|
|
40586
|
-
"description": "
|
|
41072
|
+
"description": "Primary-text region containing the `label` slot or property fallback."
|
|
40587
41073
|
},
|
|
40588
41074
|
{
|
|
40589
41075
|
"name": "detail",
|
|
40590
|
-
"description": "
|
|
41076
|
+
"description": "Secondary-text region containing the `detail` slot or property fallback."
|
|
40591
41077
|
},
|
|
40592
41078
|
{
|
|
40593
41079
|
"name": "trailing",
|
|
40594
|
-
"description": "
|
|
41080
|
+
"description": "End-aligned text region containing the `trailing` slot or property fallback."
|
|
40595
41081
|
},
|
|
40596
41082
|
{
|
|
40597
41083
|
"name": "children",
|
|
@@ -41345,31 +41831,31 @@
|
|
|
41345
41831
|
"cssParts": [
|
|
41346
41832
|
{
|
|
41347
41833
|
"name": "control",
|
|
41348
|
-
"description": "
|
|
41834
|
+
"description": "The switch control, excluding its label and description."
|
|
41349
41835
|
},
|
|
41350
41836
|
{
|
|
41351
41837
|
"name": "track",
|
|
41352
|
-
"description": "
|
|
41838
|
+
"description": "The switch track."
|
|
41353
41839
|
},
|
|
41354
41840
|
{
|
|
41355
41841
|
"name": "thumb",
|
|
41356
|
-
"description": "
|
|
41842
|
+
"description": "The movable switch thumb."
|
|
41357
41843
|
},
|
|
41358
41844
|
{
|
|
41359
41845
|
"name": "unchecked-icon",
|
|
41360
|
-
"description": "
|
|
41846
|
+
"description": "Icon region containing the `unchecked-icon` slot inside the thumb while off."
|
|
41361
41847
|
},
|
|
41362
41848
|
{
|
|
41363
41849
|
"name": "checked-icon",
|
|
41364
|
-
"description": "
|
|
41850
|
+
"description": "Icon region containing the `checked-icon` slot inside the thumb while on."
|
|
41365
41851
|
},
|
|
41366
41852
|
{
|
|
41367
41853
|
"name": "label",
|
|
41368
|
-
"description": "
|
|
41854
|
+
"description": "The switch label."
|
|
41369
41855
|
},
|
|
41370
41856
|
{
|
|
41371
41857
|
"name": "description",
|
|
41372
|
-
"description": "
|
|
41858
|
+
"description": "Supporting-text region containing the `description` slot below the label."
|
|
41373
41859
|
}
|
|
41374
41860
|
],
|
|
41375
41861
|
"cssProperties": [
|
|
@@ -42094,67 +42580,67 @@
|
|
|
42094
42580
|
"cssParts": [
|
|
42095
42581
|
{
|
|
42096
42582
|
"name": "toolbar",
|
|
42097
|
-
"description": "
|
|
42583
|
+
"description": "Row above the grid containing the `toolbar` slot."
|
|
42098
42584
|
},
|
|
42099
42585
|
{
|
|
42100
42586
|
"name": "viewport",
|
|
42101
|
-
"description": "
|
|
42587
|
+
"description": "Scrollable container around the grid."
|
|
42102
42588
|
},
|
|
42103
42589
|
{
|
|
42104
42590
|
"name": "grid",
|
|
42105
|
-
"description": "
|
|
42591
|
+
"description": "The ARIA grid containing the header and body rows."
|
|
42106
42592
|
},
|
|
42107
42593
|
{
|
|
42108
42594
|
"name": "footer",
|
|
42109
|
-
"description": "
|
|
42595
|
+
"description": "Row below the grid containing the `footer` slot."
|
|
42110
42596
|
},
|
|
42111
42597
|
{
|
|
42112
42598
|
"name": "state",
|
|
42113
|
-
"description": "
|
|
42599
|
+
"description": "Shared cell containing the `empty`, `loading`, or `error` slot and its fallback state."
|
|
42114
42600
|
},
|
|
42115
42601
|
{
|
|
42116
42602
|
"name": "header-row",
|
|
42117
|
-
"description": "
|
|
42603
|
+
"description": "The grid header row."
|
|
42118
42604
|
},
|
|
42119
42605
|
{
|
|
42120
42606
|
"name": "header-cell",
|
|
42121
|
-
"description": "
|
|
42607
|
+
"description": "Every column header cell."
|
|
42122
42608
|
},
|
|
42123
42609
|
{
|
|
42124
42610
|
"name": "selection-header-cell",
|
|
42125
|
-
"description": "
|
|
42611
|
+
"description": "The header cell containing the select-all checkbox."
|
|
42126
42612
|
},
|
|
42127
42613
|
{
|
|
42128
42614
|
"name": "resizer",
|
|
42129
|
-
"description": "
|
|
42615
|
+
"description": "The pointer target used to resize a column."
|
|
42130
42616
|
},
|
|
42131
42617
|
{
|
|
42132
42618
|
"name": "sort-icon",
|
|
42133
|
-
"description": "
|
|
42619
|
+
"description": "The sort-direction indicator in a sortable header."
|
|
42134
42620
|
},
|
|
42135
42621
|
{
|
|
42136
42622
|
"name": "cell",
|
|
42137
|
-
"description": "
|
|
42623
|
+
"description": "Every body grid cell."
|
|
42138
42624
|
},
|
|
42139
42625
|
{
|
|
42140
42626
|
"name": "selection-cell",
|
|
42141
|
-
"description": "
|
|
42627
|
+
"description": "A body cell containing a row-selection checkbox."
|
|
42142
42628
|
},
|
|
42143
42629
|
{
|
|
42144
42630
|
"name": "skeleton",
|
|
42145
|
-
"description": "
|
|
42631
|
+
"description": "Placeholder displayed while a remote row is loading."
|
|
42146
42632
|
},
|
|
42147
42633
|
{
|
|
42148
42634
|
"name": "cell-content",
|
|
42149
|
-
"description": "
|
|
42635
|
+
"description": "The content wrapper inside a body cell."
|
|
42150
42636
|
},
|
|
42151
42637
|
{
|
|
42152
42638
|
"name": "row",
|
|
42153
|
-
"description": "
|
|
42639
|
+
"description": "Every rendered body row."
|
|
42154
42640
|
},
|
|
42155
42641
|
{
|
|
42156
42642
|
"name": "row-selected",
|
|
42157
|
-
"description": "
|
|
42643
|
+
"description": "A body row while it is selected; exposed in addition to `row`."
|
|
42158
42644
|
}
|
|
42159
42645
|
],
|
|
42160
42646
|
"cssProperties": [
|
|
@@ -42741,12 +43227,12 @@
|
|
|
42741
43227
|
{
|
|
42742
43228
|
"name": "sortable",
|
|
42743
43229
|
"type": "boolean | undefined",
|
|
42744
|
-
"description": "Lets the user sort by this column.
|
|
43230
|
+
"description": "Lets the user sort by this column. Absent inherits the table's `sortable`; `sortable=\"false\"` opts out."
|
|
42745
43231
|
},
|
|
42746
43232
|
{
|
|
42747
43233
|
"name": "resizable",
|
|
42748
43234
|
"type": "boolean | undefined",
|
|
42749
|
-
"description": "Lets the user drag the column's trailing edge.
|
|
43235
|
+
"description": "Lets the user drag the column's trailing edge. Absent inherits the table's `resizable`; `resizable=\"false\"` opts out."
|
|
42750
43236
|
},
|
|
42751
43237
|
{
|
|
42752
43238
|
"name": "pinned",
|
|
@@ -44095,7 +44581,7 @@
|
|
|
44095
44581
|
"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.",
|
|
44096
44582
|
"attributes": [
|
|
44097
44583
|
{
|
|
44098
|
-
"name": "
|
|
44584
|
+
"name": "readonly",
|
|
44099
44585
|
"type": "boolean",
|
|
44100
44586
|
"default": "false",
|
|
44101
44587
|
"description": "Shows the value but refuses edits. Rendered on a light grey background."
|
|
@@ -44113,13 +44599,13 @@
|
|
|
44113
44599
|
"description": "Marks the field invalid: red border and, when set, `error-text` replaces the helper text."
|
|
44114
44600
|
},
|
|
44115
44601
|
{
|
|
44116
|
-
"name": "
|
|
44602
|
+
"name": "maxlength",
|
|
44117
44603
|
"type": "number",
|
|
44118
44604
|
"default": "-1",
|
|
44119
44605
|
"description": "Maximum number of characters. Forwarded to the input and shown as a `n / max` counter under the field."
|
|
44120
44606
|
},
|
|
44121
44607
|
{
|
|
44122
|
-
"name": "
|
|
44608
|
+
"name": "minlength",
|
|
44123
44609
|
"type": "number",
|
|
44124
44610
|
"default": "-1",
|
|
44125
44611
|
"description": "Minimum number of characters, forwarded to the input."
|
|
@@ -44748,7 +45234,7 @@
|
|
|
44748
45234
|
"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`.",
|
|
44749
45235
|
"attributes": [
|
|
44750
45236
|
{
|
|
44751
|
-
"name": "
|
|
45237
|
+
"name": "readonly",
|
|
44752
45238
|
"type": "boolean",
|
|
44753
45239
|
"default": "false",
|
|
44754
45240
|
"description": "Shows the value but refuses edits. Rendered on a light grey background."
|
|
@@ -44766,13 +45252,13 @@
|
|
|
44766
45252
|
"description": "Marks the field invalid: red border and, when set, `error-text` replaces the helper text."
|
|
44767
45253
|
},
|
|
44768
45254
|
{
|
|
44769
|
-
"name": "
|
|
45255
|
+
"name": "maxlength",
|
|
44770
45256
|
"type": "number",
|
|
44771
45257
|
"default": "-1",
|
|
44772
45258
|
"description": "Maximum number of characters. Forwarded to the input and shown as a `n / max` counter under the field."
|
|
44773
45259
|
},
|
|
44774
45260
|
{
|
|
44775
|
-
"name": "
|
|
45261
|
+
"name": "minlength",
|
|
44776
45262
|
"type": "number",
|
|
44777
45263
|
"default": "-1",
|
|
44778
45264
|
"description": "Minimum number of characters, forwarded to the input."
|
|
@@ -46117,7 +46603,7 @@
|
|
|
46117
46603
|
"description": "Prevents editing and removes the control from keyboard navigation."
|
|
46118
46604
|
},
|
|
46119
46605
|
{
|
|
46120
|
-
"name": "
|
|
46606
|
+
"name": "readonly",
|
|
46121
46607
|
"type": "boolean",
|
|
46122
46608
|
"default": "false",
|
|
46123
46609
|
"description": "Prevents editing while allowing selection."
|
|
@@ -46129,13 +46615,13 @@
|
|
|
46129
46615
|
"description": "Requires a nonempty value for native validation."
|
|
46130
46616
|
},
|
|
46131
46617
|
{
|
|
46132
|
-
"name": "
|
|
46618
|
+
"name": "maxlength",
|
|
46133
46619
|
"type": "number",
|
|
46134
46620
|
"default": "-1",
|
|
46135
46621
|
"description": "Maximum character count; -1 means unlimited."
|
|
46136
46622
|
},
|
|
46137
46623
|
{
|
|
46138
|
-
"name": "
|
|
46624
|
+
"name": "minlength",
|
|
46139
46625
|
"type": "number",
|
|
46140
46626
|
"default": "-1",
|
|
46141
46627
|
"description": "Minimum character count; -1 means no minimum."
|
|
@@ -46185,11 +46671,11 @@
|
|
|
46185
46671
|
"cssParts": [
|
|
46186
46672
|
{
|
|
46187
46673
|
"name": "textarea",
|
|
46188
|
-
"description": "
|
|
46674
|
+
"description": "The native textarea control."
|
|
46189
46675
|
},
|
|
46190
46676
|
{
|
|
46191
46677
|
"name": "supporting-text",
|
|
46192
|
-
"description": "
|
|
46678
|
+
"description": "Container wrapping the `supporting-text` slot or generated help and validation fallback."
|
|
46193
46679
|
}
|
|
46194
46680
|
],
|
|
46195
46681
|
"cssProperties": [
|
|
@@ -46597,7 +47083,7 @@
|
|
|
46597
47083
|
},
|
|
46598
47084
|
{
|
|
46599
47085
|
"name": "check",
|
|
46600
|
-
"description": "
|
|
47086
|
+
"description": "Marker region containing the `check` slot or fallback beside the selected row."
|
|
46601
47087
|
}
|
|
46602
47088
|
],
|
|
46603
47089
|
"cssProperties": [
|
|
@@ -47186,35 +47672,35 @@
|
|
|
47186
47672
|
"cssParts": [
|
|
47187
47673
|
{
|
|
47188
47674
|
"name": "container",
|
|
47189
|
-
"description": "
|
|
47675
|
+
"description": "The notification card surface."
|
|
47190
47676
|
},
|
|
47191
47677
|
{
|
|
47192
47678
|
"name": "icon",
|
|
47193
|
-
"description": "
|
|
47679
|
+
"description": "Container wrapping the assigned leading `icon` slot."
|
|
47194
47680
|
},
|
|
47195
47681
|
{
|
|
47196
47682
|
"name": "heading",
|
|
47197
|
-
"description": "
|
|
47683
|
+
"description": "The optional notification heading."
|
|
47198
47684
|
},
|
|
47199
47685
|
{
|
|
47200
47686
|
"name": "message",
|
|
47201
|
-
"description": "
|
|
47687
|
+
"description": "Container for the notification message."
|
|
47202
47688
|
},
|
|
47203
47689
|
{
|
|
47204
47690
|
"name": "action",
|
|
47205
|
-
"description": "
|
|
47691
|
+
"description": "Button region containing the optional assigned `action` slot."
|
|
47206
47692
|
},
|
|
47207
47693
|
{
|
|
47208
47694
|
"name": "close",
|
|
47209
|
-
"description": "
|
|
47695
|
+
"description": "The dismiss button."
|
|
47210
47696
|
},
|
|
47211
47697
|
{
|
|
47212
47698
|
"name": "progress",
|
|
47213
|
-
"description": "
|
|
47699
|
+
"description": "The countdown track shown while progress is enabled."
|
|
47214
47700
|
},
|
|
47215
47701
|
{
|
|
47216
47702
|
"name": "progress-bar",
|
|
47217
|
-
"description": "
|
|
47703
|
+
"description": "The remaining-time fill inside the countdown track."
|
|
47218
47704
|
}
|
|
47219
47705
|
],
|
|
47220
47706
|
"cssProperties": [
|
|
@@ -47479,7 +47965,7 @@
|
|
|
47479
47965
|
"cssParts": [
|
|
47480
47966
|
{
|
|
47481
47967
|
"name": "stack",
|
|
47482
|
-
"description": "
|
|
47968
|
+
"description": "The live-region container that positions and stacks visible toasts."
|
|
47483
47969
|
}
|
|
47484
47970
|
],
|
|
47485
47971
|
"cssProperties": [
|
|
@@ -48574,11 +49060,11 @@
|
|
|
48574
49060
|
},
|
|
48575
49061
|
{
|
|
48576
49062
|
"name": "label",
|
|
48577
|
-
"description": "
|
|
49063
|
+
"description": "Text box containing the `label` slot or label-property fallback."
|
|
48578
49064
|
},
|
|
48579
49065
|
{
|
|
48580
49066
|
"name": "actions",
|
|
48581
|
-
"description": "
|
|
49067
|
+
"description": "Trailing box wrapping the assigned `actions` slot."
|
|
48582
49068
|
},
|
|
48583
49069
|
{
|
|
48584
49070
|
"name": "group",
|
|
@@ -48586,7 +49072,7 @@
|
|
|
48586
49072
|
},
|
|
48587
49073
|
{
|
|
48588
49074
|
"name": "checkbox",
|
|
48589
|
-
"description": "
|
|
49075
|
+
"description": "The selection checkbox rendered when checkbox selection is enabled."
|
|
48590
49076
|
}
|
|
48591
49077
|
],
|
|
48592
49078
|
"cssProperties": [
|
|
@@ -49213,7 +49699,40 @@
|
|
|
49213
49699
|
"description": "Fired after an item is removed or an active upload is cancelled."
|
|
49214
49700
|
}
|
|
49215
49701
|
],
|
|
49216
|
-
"cssParts": [
|
|
49702
|
+
"cssParts": [
|
|
49703
|
+
{
|
|
49704
|
+
"name": "dropzone",
|
|
49705
|
+
"description": "Interactive drop-zone region containing the icon, prompt, and hint."
|
|
49706
|
+
},
|
|
49707
|
+
{
|
|
49708
|
+
"name": "drop-icon",
|
|
49709
|
+
"description": "Icon boundary wrapping the `drop-icon` slot and fallback icon."
|
|
49710
|
+
},
|
|
49711
|
+
{
|
|
49712
|
+
"name": "prompt",
|
|
49713
|
+
"description": "Instruction region wrapping the `prompt` slot and fallback prompt."
|
|
49714
|
+
},
|
|
49715
|
+
{
|
|
49716
|
+
"name": "hint",
|
|
49717
|
+
"description": "Supporting-text region wrapping the `hint` slot and generated fallback hint."
|
|
49718
|
+
},
|
|
49719
|
+
{
|
|
49720
|
+
"name": "action",
|
|
49721
|
+
"description": "Compact picker label boundary wrapping the `action` slot and fallback label."
|
|
49722
|
+
},
|
|
49723
|
+
{
|
|
49724
|
+
"name": "empty",
|
|
49725
|
+
"description": "Empty-state boundary exposing the `empty` slot."
|
|
49726
|
+
},
|
|
49727
|
+
{
|
|
49728
|
+
"name": "errors",
|
|
49729
|
+
"description": "Validation-error status region."
|
|
49730
|
+
},
|
|
49731
|
+
{
|
|
49732
|
+
"name": "list",
|
|
49733
|
+
"description": "Selected-file list region."
|
|
49734
|
+
}
|
|
49735
|
+
],
|
|
49217
49736
|
"cssProperties": [
|
|
49218
49737
|
{
|
|
49219
49738
|
"name": "--c2-upload--width",
|
|
@@ -49756,41 +50275,41 @@
|
|
|
49756
50275
|
}
|
|
49757
50276
|
],
|
|
49758
50277
|
"cssParts": [
|
|
49759
|
-
{
|
|
49760
|
-
"name": "highlight",
|
|
49761
|
-
"description": "Shadow DOM styling hook for the highlight element."
|
|
49762
|
-
},
|
|
49763
50278
|
{
|
|
49764
50279
|
"name": "search",
|
|
49765
|
-
"description": "
|
|
50280
|
+
"description": "Header row containing the built-in search field and the `search` and `toolbar` slots."
|
|
49766
50281
|
},
|
|
49767
50282
|
{
|
|
49768
50283
|
"name": "viewport",
|
|
49769
|
-
"description": "
|
|
50284
|
+
"description": "Scroll container that holds the listbox and its empty, loading or error state."
|
|
49770
50285
|
},
|
|
49771
50286
|
{
|
|
49772
50287
|
"name": "items",
|
|
49773
|
-
"description": "
|
|
50288
|
+
"description": "Inner listbox containing the rendered rows and virtual-scroll spacers."
|
|
49774
50289
|
},
|
|
49775
50290
|
{
|
|
49776
|
-
"name": "
|
|
49777
|
-
"description": "
|
|
50291
|
+
"name": "item",
|
|
50292
|
+
"description": "Every rendered `c2-list-item`, including loading placeholders."
|
|
49778
50293
|
},
|
|
49779
50294
|
{
|
|
49780
|
-
"name": "
|
|
49781
|
-
"description": "
|
|
50295
|
+
"name": "item-selected",
|
|
50296
|
+
"description": "A rendered item while it is selected; exposed in addition to `item`."
|
|
49782
50297
|
},
|
|
49783
50298
|
{
|
|
49784
|
-
"name": "
|
|
49785
|
-
"description": "
|
|
50299
|
+
"name": "skeleton",
|
|
50300
|
+
"description": "Placeholder shown inside an item while its remote data block is loading."
|
|
49786
50301
|
},
|
|
49787
50302
|
{
|
|
49788
|
-
"name": "
|
|
49789
|
-
"description": "
|
|
50303
|
+
"name": "state",
|
|
50304
|
+
"description": "Shared container for the `empty`, `loading`, or `error` slot and its fallback message."
|
|
49790
50305
|
},
|
|
49791
50306
|
{
|
|
49792
|
-
"name": "
|
|
49793
|
-
"description": "
|
|
50307
|
+
"name": "highlight",
|
|
50308
|
+
"description": "A `<mark>` around text that matches the active search query."
|
|
50309
|
+
},
|
|
50310
|
+
{
|
|
50311
|
+
"name": "footer",
|
|
50312
|
+
"description": "Footer row containing the `footer` slot."
|
|
49794
50313
|
}
|
|
49795
50314
|
],
|
|
49796
50315
|
"cssProperties": [
|
|
@@ -50303,7 +50822,6 @@
|
|
|
50303
50822
|
"c2-date-input": "date-input",
|
|
50304
50823
|
"c2-date-selector": "date-selector",
|
|
50305
50824
|
"c2-details": "details",
|
|
50306
|
-
"c2-dropdown-list": "dropdown-list",
|
|
50307
50825
|
"c2-gauge-chart": "gauge-chart",
|
|
50308
50826
|
"c2-header": "header",
|
|
50309
50827
|
"c2-icon-button": "icon-button",
|
|
@@ -50389,7 +50907,6 @@
|
|
|
50389
50907
|
"@c2n/date-input": "date-input",
|
|
50390
50908
|
"@c2n/date-selector": "date-selector",
|
|
50391
50909
|
"@c2n/details": "details",
|
|
50392
|
-
"@c2n/dropdown-list": "dropdown-list",
|
|
50393
50910
|
"@c2n/feather-icons": "feather-icons",
|
|
50394
50911
|
"@c2n/header": "header",
|
|
50395
50912
|
"@c2n/icon-button": "icon-button",
|
|
@@ -50499,7 +51016,7 @@
|
|
|
50499
51016
|
"light": "#ffffff",
|
|
50500
51017
|
"dark": "#18181b",
|
|
50501
51018
|
"description": "Default surface of inputs, lists, cards, dialogs.",
|
|
50502
|
-
"usedBy":
|
|
51019
|
+
"usedBy": 49
|
|
50503
51020
|
},
|
|
50504
51021
|
{
|
|
50505
51022
|
"name": "--c2-theme--color-surface-container-low",
|
|
@@ -50547,7 +51064,7 @@
|
|
|
50547
51064
|
"light": "#e4e4e7",
|
|
50548
51065
|
"dark": "#27272a",
|
|
50549
51066
|
"description": "Hairline dividers and light borders.",
|
|
50550
|
-
"usedBy":
|
|
51067
|
+
"usedBy": 79
|
|
50551
51068
|
},
|
|
50552
51069
|
{
|
|
50553
51070
|
"name": "--c2-theme--color-outline-strong",
|
|
@@ -50643,7 +51160,7 @@
|
|
|
50643
51160
|
"category": "radius",
|
|
50644
51161
|
"light": "8px",
|
|
50645
51162
|
"description": "Large radius: cards, panels, popovers.",
|
|
50646
|
-
"usedBy":
|
|
51163
|
+
"usedBy": 72
|
|
50647
51164
|
},
|
|
50648
51165
|
{
|
|
50649
51166
|
"name": "--c2-theme--radius-xl",
|
|
@@ -50994,6 +51511,16 @@
|
|
|
50994
51511
|
"--c2-chat-message__header__title--font-weight": "--c2-theme--font-weight-semibold",
|
|
50995
51512
|
"--c2-chat-message__time--color": "--c2-theme--color-on-surface-variant",
|
|
50996
51513
|
"--c2-chat-message__time--font-size": "--c2-theme--font-size-sm",
|
|
51514
|
+
"--c2-chatbot--border-top-left-radius": "--c2-theme--radius-lg",
|
|
51515
|
+
"--c2-chatbot--border-top-right-radius": "--c2-theme--radius-lg",
|
|
51516
|
+
"--c2-chatbot--border-bottom-left-radius": "--c2-theme--radius-lg",
|
|
51517
|
+
"--c2-chatbot--border-bottom-right-radius": "--c2-theme--radius-lg",
|
|
51518
|
+
"--c2-chatbot--border-top": "--c2-theme--color-outline-variant",
|
|
51519
|
+
"--c2-chatbot--border-right": "--c2-theme--color-outline-variant",
|
|
51520
|
+
"--c2-chatbot--border-bottom": "--c2-theme--color-outline-variant",
|
|
51521
|
+
"--c2-chatbot--border-left": "--c2-theme--color-outline-variant",
|
|
51522
|
+
"--c2-chatbot__header--background": "--c2-theme--color-surface",
|
|
51523
|
+
"--c2-chatbot__header--border-bottom": "--c2-theme--color-outline-variant",
|
|
50997
51524
|
"--c2-checkbox__container--border-top-left-radius": "--c2-theme--radius-sm",
|
|
50998
51525
|
"--c2-checkbox__container--border-top-right-radius": "--c2-theme--radius-sm",
|
|
50999
51526
|
"--c2-checkbox__container--border-bottom-left-radius": "--c2-theme--radius-sm",
|
|
@@ -51738,6 +52265,6 @@
|
|
|
51738
52265
|
"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",
|
|
51739
52266
|
"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",
|
|
51740
52267
|
"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",
|
|
51741
|
-
"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"
|
|
52268
|
+
"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"
|
|
51742
52269
|
}
|
|
51743
52270
|
}
|