@c2n/mcp 0.0.9 → 0.0.10
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 +2746 -51
- 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.10",
|
|
4
4
|
"categories": [
|
|
5
5
|
"Inputs",
|
|
6
6
|
"Buttons",
|
|
@@ -1309,7 +1309,9 @@
|
|
|
1309
1309
|
],
|
|
1310
1310
|
"composition": {
|
|
1311
1311
|
"internal": [],
|
|
1312
|
-
"slotted": [
|
|
1312
|
+
"slotted": [
|
|
1313
|
+
"c2-chart-series"
|
|
1314
|
+
],
|
|
1313
1315
|
"usedBy": []
|
|
1314
1316
|
},
|
|
1315
1317
|
"install": {
|
|
@@ -2657,7 +2659,7 @@
|
|
|
2657
2659
|
"package": "@c2n/avatar",
|
|
2658
2660
|
"title": "Avatar",
|
|
2659
2661
|
"description": "Image, initials or icon for a person, with status dot and badge.",
|
|
2660
|
-
"intro": "`c2-avatar` shows a person or entity. It resolves its content in order: the `src` image (a broken image fires `error` and falls back to the initials), then slotted content such as an icon or emoji, then the initials computed from `name`. `initial-count=\"2\"` picks the first and last word of a longer name, and `initials` overrides the computation. `auto-color` derives a stable background hue from the name, `status` adds a presence dot, and the `badge` slot replaces the dot with your own element. One `--c2-avatar--size` token drives the width, height and font size.",
|
|
2662
|
+
"intro": "`c2-avatar` shows a person or entity. It resolves its content in order: the `src` image (a broken image fires `error` and falls back to the initials), then slotted content such as an icon or emoji, then the initials computed from `name`. `initial-count=\"2\"` picks the first and last word of a longer name, and `initials` overrides the computation. `auto-color` derives a stable background hue from the name, `status` adds a presence dot, and the `badge` slot replaces the dot with your own element. One `--c2-avatar--size` token drives the width, height and font size. The same package also exports `c2-avatar-group`, which stacks avatars responsively and replaces those that no longer fit with an automatic count.",
|
|
2661
2663
|
"category": "Data display",
|
|
2662
2664
|
"status": "stable",
|
|
2663
2665
|
"docsUrl": "https://code2nguyen.github.io/web-components/components/avatar",
|
|
@@ -3070,12 +3072,148 @@
|
|
|
3070
3072
|
"property": "color"
|
|
3071
3073
|
}
|
|
3072
3074
|
]
|
|
3075
|
+
},
|
|
3076
|
+
{
|
|
3077
|
+
"tag": "c2-avatar-group",
|
|
3078
|
+
"className": "AvatarGroup",
|
|
3079
|
+
"modulePath": "@c2n/avatar",
|
|
3080
|
+
"description": "Responsive stack of `c2-avatar` elements. It observes its rendered width and each avatar's actual size, then hides\nthe avatars that no longer fit and replaces them with a count. The host fills the available inline space up to\n`--c2-avatar-group--max-width`, so it also reacts when its parent becomes narrower.",
|
|
3081
|
+
"attributes": [
|
|
3082
|
+
{
|
|
3083
|
+
"name": "max-visible",
|
|
3084
|
+
"type": "number",
|
|
3085
|
+
"default": "0",
|
|
3086
|
+
"description": "Optional hard cap in addition to the automatically calculated responsive limit. Zero means no hard cap."
|
|
3087
|
+
},
|
|
3088
|
+
{
|
|
3089
|
+
"name": "count-mode",
|
|
3090
|
+
"type": "AvatarGroupCountMode",
|
|
3091
|
+
"default": "'hidden'",
|
|
3092
|
+
"description": "Whether the overflow indicator shows `+hidden` or the total number of avatars."
|
|
3093
|
+
},
|
|
3094
|
+
{
|
|
3095
|
+
"name": "aria-label",
|
|
3096
|
+
"type": "string",
|
|
3097
|
+
"default": "'Avatar group'",
|
|
3098
|
+
"description": "Accessible name for the group."
|
|
3099
|
+
}
|
|
3100
|
+
],
|
|
3101
|
+
"slots": [
|
|
3102
|
+
{
|
|
3103
|
+
"name": "",
|
|
3104
|
+
"description": "`c2-avatar` elements displayed in source order."
|
|
3105
|
+
}
|
|
3106
|
+
],
|
|
3107
|
+
"events": [
|
|
3108
|
+
{
|
|
3109
|
+
"name": "overflow-change",
|
|
3110
|
+
"type": "CustomEvent<AvatarGroupOverflowDetail>",
|
|
3111
|
+
"description": "Fired when resizing changes the visible or hidden counts."
|
|
3112
|
+
}
|
|
3113
|
+
],
|
|
3114
|
+
"cssParts": [
|
|
3115
|
+
{
|
|
3116
|
+
"name": "overflow",
|
|
3117
|
+
"description": "Count shown after the visible avatars."
|
|
3118
|
+
}
|
|
3119
|
+
],
|
|
3120
|
+
"cssProperties": [
|
|
3121
|
+
{
|
|
3122
|
+
"name": "--c2-avatar-group--max-width",
|
|
3123
|
+
"type": "pixel",
|
|
3124
|
+
"default": "320px",
|
|
3125
|
+
"part": "",
|
|
3126
|
+
"property": "max-width",
|
|
3127
|
+
"description": "Maximum responsive width of the group."
|
|
3128
|
+
},
|
|
3129
|
+
{
|
|
3130
|
+
"name": "--c2-avatar-group--overlap",
|
|
3131
|
+
"type": "pixel",
|
|
3132
|
+
"default": "10px",
|
|
3133
|
+
"part": "",
|
|
3134
|
+
"property": "overlap",
|
|
3135
|
+
"description": "Amount that adjacent avatars overlap."
|
|
3136
|
+
},
|
|
3137
|
+
{
|
|
3138
|
+
"name": "--c2-avatar-group__avatar--box-shadow",
|
|
3139
|
+
"type": "box-shadow",
|
|
3140
|
+
"default": "0 0 0 2px #ffffff",
|
|
3141
|
+
"part": "avatar",
|
|
3142
|
+
"property": "box-shadow",
|
|
3143
|
+
"description": "Ring applied to slotted avatars so overlaps stay distinct."
|
|
3144
|
+
},
|
|
3145
|
+
{
|
|
3146
|
+
"name": "--c2-avatar-group__overflow--size",
|
|
3147
|
+
"type": "pixel",
|
|
3148
|
+
"default": "32px",
|
|
3149
|
+
"part": "overflow",
|
|
3150
|
+
"property": "size",
|
|
3151
|
+
"description": "Width and height of the overflow count."
|
|
3152
|
+
},
|
|
3153
|
+
{
|
|
3154
|
+
"name": "--c2-avatar-group__overflow--background",
|
|
3155
|
+
"type": "color",
|
|
3156
|
+
"default": "#52525b",
|
|
3157
|
+
"part": "overflow",
|
|
3158
|
+
"property": "background",
|
|
3159
|
+
"token": "--c2-theme--color-inverse-surface",
|
|
3160
|
+
"description": "Overflow count background."
|
|
3161
|
+
},
|
|
3162
|
+
{
|
|
3163
|
+
"name": "--c2-avatar-group__overflow--color",
|
|
3164
|
+
"type": "color",
|
|
3165
|
+
"default": "#ffffff",
|
|
3166
|
+
"part": "overflow",
|
|
3167
|
+
"property": "color",
|
|
3168
|
+
"token": "--c2-theme--color-on-inverse-surface",
|
|
3169
|
+
"description": "Overflow count text colour."
|
|
3170
|
+
},
|
|
3171
|
+
{
|
|
3172
|
+
"name": "--c2-avatar-group__overflow--border",
|
|
3173
|
+
"type": "border",
|
|
3174
|
+
"default": "2px solid #ffffff",
|
|
3175
|
+
"part": "overflow",
|
|
3176
|
+
"property": "border",
|
|
3177
|
+
"token": "--c2-theme--color-surface",
|
|
3178
|
+
"description": "Ring around the overflow count."
|
|
3179
|
+
},
|
|
3180
|
+
{
|
|
3181
|
+
"name": "--c2-avatar-group__overflow--border-radius",
|
|
3182
|
+
"type": "border-radius",
|
|
3183
|
+
"default": "999px",
|
|
3184
|
+
"part": "overflow",
|
|
3185
|
+
"property": "border-radius",
|
|
3186
|
+
"token": "--c2-theme--radius-full",
|
|
3187
|
+
"description": "Overflow count corner radius."
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
"name": "--c2-avatar-group__overflow--font-size",
|
|
3191
|
+
"type": "font-size",
|
|
3192
|
+
"default": "12px",
|
|
3193
|
+
"part": "overflow",
|
|
3194
|
+
"property": "font-size",
|
|
3195
|
+
"token": "--c2-theme--font-size-sm",
|
|
3196
|
+
"description": "Overflow count text size."
|
|
3197
|
+
},
|
|
3198
|
+
{
|
|
3199
|
+
"name": "--c2-avatar-group__overflow--font-weight",
|
|
3200
|
+
"type": "font-weight",
|
|
3201
|
+
"default": "600",
|
|
3202
|
+
"part": "overflow",
|
|
3203
|
+
"property": "font-weight",
|
|
3204
|
+
"token": "--c2-theme--font-weight-semibold",
|
|
3205
|
+
"description": "Overflow count text weight."
|
|
3206
|
+
}
|
|
3207
|
+
]
|
|
3073
3208
|
}
|
|
3074
3209
|
],
|
|
3075
3210
|
"composition": {
|
|
3076
3211
|
"internal": [],
|
|
3077
|
-
"slotted": [
|
|
3212
|
+
"slotted": [
|
|
3213
|
+
"c2-avatar"
|
|
3214
|
+
],
|
|
3078
3215
|
"usedBy": [
|
|
3216
|
+
"c2-avatar",
|
|
3079
3217
|
"c2-chat-message"
|
|
3080
3218
|
]
|
|
3081
3219
|
},
|
|
@@ -3147,43 +3285,49 @@
|
|
|
3147
3285
|
"kind": "usage",
|
|
3148
3286
|
"label": "Initials",
|
|
3149
3287
|
"html": "<c2-avatar name=\"Nguyen Thai Vinh\"></c2-avatar>\n<c2-avatar name=\"Nguyen Thai Vinh\" initial-count=\"2\"></c2-avatar>\n<c2-avatar name=\"Nguyen Thai Vinh\" initials=\"TV\"></c2-avatar>",
|
|
3150
|
-
"css": ".
|
|
3288
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3151
3289
|
},
|
|
3152
3290
|
{
|
|
3153
3291
|
"kind": "usage",
|
|
3154
3292
|
"label": "Sizes",
|
|
3155
3293
|
"html": "<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" style=\"--c2-avatar--size: 20px\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" style=\"--c2-avatar--size: 48px\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" style=\"--c2-avatar--size: 64px\"></c2-avatar>",
|
|
3156
|
-
"css": ".
|
|
3294
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3157
3295
|
},
|
|
3158
3296
|
{
|
|
3159
3297
|
"kind": "usage",
|
|
3160
3298
|
"label": "Image and fallbacks",
|
|
3161
3299
|
"html": "<c2-avatar name=\"Elisa Jasmin\" src=\"/web-components/chat.avif\" style=\"--c2-avatar--size: 48px\"></c2-avatar>\n<c2-avatar name=\"Elisa Jasmin\" initial-count=\"2\" src=\"/web-components/missing.png\" style=\"--c2-avatar--size: 48px\"></c2-avatar>\n<c2-avatar name=\"Assistant\" style=\"--c2-avatar--size: 48px; --c2-avatar--background: #18181b\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><rect x=\"3\" y=\"8\" width=\"18\" height=\"12\" rx=\"2\"></rect><path d=\"M12 8V4M8 14h.01M16 14h.01\"></path></svg>\n</c2-avatar>",
|
|
3162
|
-
"css": ".
|
|
3300
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3163
3301
|
},
|
|
3164
3302
|
{
|
|
3165
3303
|
"kind": "usage",
|
|
3166
3304
|
"label": "Auto color",
|
|
3167
3305
|
"html": "<c2-avatar auto-color name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>\n<c2-avatar auto-color name=\"Grace Hopper\" initial-count=\"2\"></c2-avatar>\n<c2-avatar auto-color name=\"Alan Turing\" initial-count=\"2\"></c2-avatar>\n<c2-avatar auto-color name=\"Katherine Johnson\" initial-count=\"2\"></c2-avatar>\n<c2-avatar auto-color name=\"Linus Torvalds\" initial-count=\"2\"></c2-avatar>",
|
|
3168
|
-
"css": ".
|
|
3306
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3169
3307
|
},
|
|
3170
3308
|
{
|
|
3171
3309
|
"kind": "usage",
|
|
3172
3310
|
"label": "Status and badge",
|
|
3173
3311
|
"html": "<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" status=\"online\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" status=\"away\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" status=\"busy\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" status=\"offline\"></c2-avatar>\n<c2-avatar name=\"Ada Lovelace\" initial-count=\"2\" style=\"--c2-avatar--size: 40px\"><span slot=\"badge\" class=\"badge\">3</span></c2-avatar>",
|
|
3174
|
-
"css": ".
|
|
3312
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3175
3313
|
},
|
|
3176
3314
|
{
|
|
3177
3315
|
"kind": "usage",
|
|
3178
3316
|
"label": "Editable",
|
|
3179
3317
|
"html": "<c2-avatar class=\"editable-avatar\" editable name=\"Elisa Jasmin\" src=\"/web-components/chat.avif\"></c2-avatar>\n<c2-avatar class=\"editable-avatar\" editable auto-color name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>",
|
|
3180
|
-
"css": ".
|
|
3318
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3181
3319
|
},
|
|
3182
3320
|
{
|
|
3183
3321
|
"kind": "usage",
|
|
3184
|
-
"label": "
|
|
3185
|
-
"html": "<
|
|
3186
|
-
"css": ".
|
|
3322
|
+
"label": "Responsive group",
|
|
3323
|
+
"html": "<c2-avatar-group class=\"responsive-group\" aria-label=\"Project contributors\" client:only=\"lit\">\n <c2-avatar auto-color name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Grace Hopper\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Alan Turing\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Katherine Johnson\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Margaret Hamilton\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Radia Perlman\" initial-count=\"2\"></c2-avatar>\n</c2-avatar-group>",
|
|
3324
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3325
|
+
},
|
|
3326
|
+
{
|
|
3327
|
+
"kind": "usage",
|
|
3328
|
+
"label": "Total count",
|
|
3329
|
+
"html": "<c2-avatar-group class=\"responsive-group\" count-mode=\"total\" max-visible=\"3\" aria-label=\"Design team\" client:only=\"lit\">\n <c2-avatar auto-color name=\"Dieter Rams\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Susan Kare\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Paula Scher\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Don Norman\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Irene Au\" initial-count=\"2\"></c2-avatar>\n</c2-avatar-group>",
|
|
3330
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 150px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}\n.badge {\n background: #dc2626;\n color: #ffffff;\n font-size: 10px;\n font-weight: 700;\n line-height: 1;\n padding: 2px 5px;\n}\n.editable-avatar {\n --c2-avatar--size: 72px;\n}"
|
|
3187
3331
|
},
|
|
3188
3332
|
{
|
|
3189
3333
|
"kind": "gallery",
|
|
@@ -3345,15 +3489,29 @@
|
|
|
3345
3489
|
},
|
|
3346
3490
|
{
|
|
3347
3491
|
"kind": "gallery",
|
|
3348
|
-
"label": "
|
|
3492
|
+
"label": "Responsive group",
|
|
3493
|
+
"section": "Presets",
|
|
3494
|
+
"description": "Responsive group Presets example for c2-avatar.",
|
|
3495
|
+
"isDefault": false,
|
|
3496
|
+
"tags": [
|
|
3497
|
+
"c2-avatar-group",
|
|
3498
|
+
"c2-avatar"
|
|
3499
|
+
],
|
|
3500
|
+
"html": "<c2-avatar-group class=\"responsive-group\" aria-label=\"Project contributors\" client:only=\"lit\">\n <c2-avatar auto-color name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Grace Hopper\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Alan Turing\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Katherine Johnson\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Margaret Hamilton\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Radia Perlman\" initial-count=\"2\"></c2-avatar>\n</c2-avatar-group>",
|
|
3501
|
+
"css": ".responsive-group {\n --c2-avatar-group--max-width: 152px;\n --c2-avatar-group--overlap: 12px;\n}\n.responsive-group c2-avatar {\n --c2-avatar--size: 36px;\n}"
|
|
3502
|
+
},
|
|
3503
|
+
{
|
|
3504
|
+
"kind": "gallery",
|
|
3505
|
+
"label": "Total count",
|
|
3349
3506
|
"section": "Presets",
|
|
3350
|
-
"description": "
|
|
3507
|
+
"description": "Total count Presets example for c2-avatar.",
|
|
3351
3508
|
"isDefault": false,
|
|
3352
3509
|
"tags": [
|
|
3510
|
+
"c2-avatar-group",
|
|
3353
3511
|
"c2-avatar"
|
|
3354
3512
|
],
|
|
3355
|
-
"html": "<
|
|
3356
|
-
"css": ".
|
|
3513
|
+
"html": "<c2-avatar-group class=\"total-group\" count-mode=\"total\" max-visible=\"3\" aria-label=\"Design team\" client:only=\"lit\">\n <c2-avatar auto-color name=\"Dieter Rams\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Susan Kare\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Paula Scher\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Don Norman\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Irene Au\" initial-count=\"2\"></c2-avatar>\n</c2-avatar-group>",
|
|
3514
|
+
"css": ".total-group {\n --c2-avatar-group--max-width: 132px;\n --c2-avatar-group--overlap: 8px;\n --c2-avatar-group__overflow--background: #18181b;\n}\n.total-group c2-avatar {\n --c2-avatar--size: 32px;\n}"
|
|
3357
3515
|
},
|
|
3358
3516
|
{
|
|
3359
3517
|
"kind": "gallery",
|
|
@@ -3370,7 +3528,7 @@
|
|
|
3370
3528
|
{
|
|
3371
3529
|
"kind": "preview",
|
|
3372
3530
|
"label": "Preview",
|
|
3373
|
-
"html": "<
|
|
3531
|
+
"html": "<c2-avatar-group aria-label=\"Project contributors\" style=\"--c2-avatar-group--max-width:150px\">\n <c2-avatar name=\"Nguyen Thai Vinh\" status=\"online\"></c2-avatar>\n <c2-avatar auto-color name=\"Elisa Jasmin\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Ada Lovelace\" initial-count=\"2\"></c2-avatar>\n <c2-avatar name=\"Grace Hopper\" src=\"/web-components/chat.avif\"></c2-avatar>\n <c2-avatar auto-color name=\"Katherine Johnson\" initial-count=\"2\"></c2-avatar>\n <c2-avatar auto-color name=\"Margaret Hamilton\" initial-count=\"2\"></c2-avatar>\n</c2-avatar-group>"
|
|
3374
3532
|
}
|
|
3375
3533
|
],
|
|
3376
3534
|
"hasGallery": true
|
|
@@ -4948,7 +5106,9 @@
|
|
|
4948
5106
|
],
|
|
4949
5107
|
"composition": {
|
|
4950
5108
|
"internal": [],
|
|
4951
|
-
"slotted": [
|
|
5109
|
+
"slotted": [
|
|
5110
|
+
"c2-chart-series"
|
|
5111
|
+
],
|
|
4952
5112
|
"usedBy": []
|
|
4953
5113
|
},
|
|
4954
5114
|
"install": {
|
|
@@ -5066,6 +5226,252 @@
|
|
|
5066
5226
|
],
|
|
5067
5227
|
"hasGallery": true
|
|
5068
5228
|
},
|
|
5229
|
+
"border-beam": {
|
|
5230
|
+
"id": "border-beam",
|
|
5231
|
+
"package": "@c2n/border-beam",
|
|
5232
|
+
"title": "Border Beam",
|
|
5233
|
+
"description": "A decorative beam that travels around the border of any positioned container.",
|
|
5234
|
+
"intro": "`c2-border-beam` is a pointer-transparent decorative overlay for cards, panels and callouts. Place it inside a container with `position: relative`; a masked gradient follows the real border and inherits its corner radius without drawing a second outline. The default `side=\"all\"` loops around the full perimeter. Set one edge, such as `side=\"top\"`, and the beam travels forward then backward along only that border. Geometry and timing are presentation concerns configured with CSS variables; `side`, `count`, `reverse` and `paused` remain behavioral attributes. Reduced-motion preferences hide the decorative effect automatically.",
|
|
5235
|
+
"category": "Layout",
|
|
5236
|
+
"status": "stable",
|
|
5237
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/border-beam",
|
|
5238
|
+
"elements": [
|
|
5239
|
+
{
|
|
5240
|
+
"tag": "c2-border-beam",
|
|
5241
|
+
"className": "BorderBeam",
|
|
5242
|
+
"modulePath": "@c2n/border-beam",
|
|
5243
|
+
"description": "Decorative overlay that sends one or more soft highlights around the border of its containing block. Place it as\na direct child of a positioned container. The component inherits the container radius and uses a border mask, so\nthe highlight sits on the real border instead of drawing a second, offset outline.",
|
|
5244
|
+
"attributes": [
|
|
5245
|
+
{
|
|
5246
|
+
"name": "count",
|
|
5247
|
+
"type": "number",
|
|
5248
|
+
"default": "1",
|
|
5249
|
+
"description": "Number of beams distributed evenly around the perimeter."
|
|
5250
|
+
},
|
|
5251
|
+
{
|
|
5252
|
+
"name": "side",
|
|
5253
|
+
"type": "BorderBeamSide",
|
|
5254
|
+
"default": "'all'",
|
|
5255
|
+
"description": "Border followed by the beam. `all` loops around the perimeter; one edge moves forward then backward."
|
|
5256
|
+
},
|
|
5257
|
+
{
|
|
5258
|
+
"name": "reverse",
|
|
5259
|
+
"type": "boolean",
|
|
5260
|
+
"default": "false",
|
|
5261
|
+
"description": "Sends the beams around the perimeter in the opposite direction."
|
|
5262
|
+
},
|
|
5263
|
+
{
|
|
5264
|
+
"name": "paused",
|
|
5265
|
+
"type": "boolean",
|
|
5266
|
+
"default": "false",
|
|
5267
|
+
"description": "Freezes the beams at their current positions."
|
|
5268
|
+
}
|
|
5269
|
+
],
|
|
5270
|
+
"slots": [],
|
|
5271
|
+
"events": [],
|
|
5272
|
+
"cssParts": [
|
|
5273
|
+
{
|
|
5274
|
+
"name": "beam",
|
|
5275
|
+
"description": "Each animated gradient beam."
|
|
5276
|
+
}
|
|
5277
|
+
],
|
|
5278
|
+
"cssProperties": [
|
|
5279
|
+
{
|
|
5280
|
+
"name": "--c2-border-beam--outset",
|
|
5281
|
+
"type": "pixel",
|
|
5282
|
+
"default": "0px",
|
|
5283
|
+
"part": "",
|
|
5284
|
+
"property": "outset",
|
|
5285
|
+
"description": "Distance between the beam layer and the container edge."
|
|
5286
|
+
},
|
|
5287
|
+
{
|
|
5288
|
+
"name": "--c2-border-beam__beam--size",
|
|
5289
|
+
"type": "pixel",
|
|
5290
|
+
"default": "100px",
|
|
5291
|
+
"part": "beam",
|
|
5292
|
+
"property": "size",
|
|
5293
|
+
"description": "Length of the visible highlight."
|
|
5294
|
+
},
|
|
5295
|
+
{
|
|
5296
|
+
"name": "--c2-border-beam__beam--width",
|
|
5297
|
+
"type": "pixel",
|
|
5298
|
+
"default": "1px",
|
|
5299
|
+
"part": "beam",
|
|
5300
|
+
"property": "width",
|
|
5301
|
+
"description": "Width of the border channel that reveals the beam."
|
|
5302
|
+
},
|
|
5303
|
+
{
|
|
5304
|
+
"name": "--c2-border-beam__beam--radius",
|
|
5305
|
+
"type": "border-radius",
|
|
5306
|
+
"default": "12px",
|
|
5307
|
+
"part": "beam",
|
|
5308
|
+
"property": "radius",
|
|
5309
|
+
"token": "--c2-theme--radius-lg",
|
|
5310
|
+
"description": "Corner radius of the motion path."
|
|
5311
|
+
},
|
|
5312
|
+
{
|
|
5313
|
+
"name": "--c2-border-beam__beam--color-from",
|
|
5314
|
+
"type": "color",
|
|
5315
|
+
"default": "#0265dc",
|
|
5316
|
+
"part": "beam",
|
|
5317
|
+
"property": "color-from",
|
|
5318
|
+
"token": "--c2-theme--color-primary",
|
|
5319
|
+
"description": "Leading gradient colour."
|
|
5320
|
+
},
|
|
5321
|
+
{
|
|
5322
|
+
"name": "--c2-border-beam__beam--color-to",
|
|
5323
|
+
"type": "color",
|
|
5324
|
+
"default": "#60a5fa",
|
|
5325
|
+
"part": "beam",
|
|
5326
|
+
"property": "color-to",
|
|
5327
|
+
"description": "Trailing gradient colour."
|
|
5328
|
+
},
|
|
5329
|
+
{
|
|
5330
|
+
"name": "--c2-border-beam__beam--opacity",
|
|
5331
|
+
"type": "opacity",
|
|
5332
|
+
"default": "0.95",
|
|
5333
|
+
"part": "beam",
|
|
5334
|
+
"property": "opacity",
|
|
5335
|
+
"description": "Opacity of each beam."
|
|
5336
|
+
},
|
|
5337
|
+
{
|
|
5338
|
+
"name": "--c2-border-beam__beam--filter",
|
|
5339
|
+
"type": "filter",
|
|
5340
|
+
"default": "drop-shadow(0 0 3px rgba(2, 101, 220, 0.35))",
|
|
5341
|
+
"part": "beam",
|
|
5342
|
+
"property": "filter",
|
|
5343
|
+
"description": "Glow or other filter applied to each beam."
|
|
5344
|
+
},
|
|
5345
|
+
{
|
|
5346
|
+
"name": "--c2-border-beam__beam--duration",
|
|
5347
|
+
"type": "time",
|
|
5348
|
+
"default": "6s",
|
|
5349
|
+
"part": "beam",
|
|
5350
|
+
"property": "duration",
|
|
5351
|
+
"description": "Time taken to travel once around the perimeter."
|
|
5352
|
+
},
|
|
5353
|
+
{
|
|
5354
|
+
"name": "--c2-border-beam__beam--delay",
|
|
5355
|
+
"type": "time",
|
|
5356
|
+
"default": "0s",
|
|
5357
|
+
"part": "beam",
|
|
5358
|
+
"property": "delay",
|
|
5359
|
+
"description": "Delay before animation; a negative value starts partway around."
|
|
5360
|
+
},
|
|
5361
|
+
{
|
|
5362
|
+
"name": "--c2-border-beam--z-index",
|
|
5363
|
+
"type": "integer",
|
|
5364
|
+
"default": "1",
|
|
5365
|
+
"part": "",
|
|
5366
|
+
"property": "z-index",
|
|
5367
|
+
"description": "Stacking level of the decorative overlay."
|
|
5368
|
+
}
|
|
5369
|
+
]
|
|
5370
|
+
}
|
|
5371
|
+
],
|
|
5372
|
+
"composition": {
|
|
5373
|
+
"internal": [],
|
|
5374
|
+
"slotted": [],
|
|
5375
|
+
"usedBy": []
|
|
5376
|
+
},
|
|
5377
|
+
"install": {
|
|
5378
|
+
"npm": "npm install @c2n/border-beam @c2n/theme",
|
|
5379
|
+
"import": "import '@c2n/border-beam'",
|
|
5380
|
+
"importClass": "import { BorderBeam } from '@c2n/border-beam'"
|
|
5381
|
+
},
|
|
5382
|
+
"examples": [
|
|
5383
|
+
{
|
|
5384
|
+
"kind": "usage",
|
|
5385
|
+
"label": "Default",
|
|
5386
|
+
"html": "<div class=\"beam-card\">\n <strong>Workspace overview</strong>\n <p>Review task status, deployment health, and recent automation activity.</p>\n <c2-border-beam></c2-border-beam>\n</div>",
|
|
5387
|
+
"css": ".beam-card {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 420px);\n overflow: hidden;\n padding: 22px;\n border: 1px solid #e4e4e7;\n border-radius: 12px;\n background: #ffffff;\n}\n.beam-card strong {\n display: block;\n margin-bottom: 8px;\n font-size: 15px;\n}\n.beam-card p {\n margin: 0;\n color: #71717a;\n font-size: 14px;\n line-height: 1.5;\n}\n.violet-beam {\n --c2-border-beam__beam--color-from: #7c3aed;\n --c2-border-beam__beam--color-to: #ec4899;\n --c2-border-beam__beam--size: 120px;\n --c2-border-beam__beam--filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));\n --c2-border-beam__beam--duration: 4s;\n}\n.slow-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 7s;\n}\n.single-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 5s;\n}"
|
|
5388
|
+
},
|
|
5389
|
+
{
|
|
5390
|
+
"kind": "usage",
|
|
5391
|
+
"label": "Reverse",
|
|
5392
|
+
"html": "<div class=\"beam-card\">\n <strong>Protected checkout</strong>\n <p>The beam can travel in either direction without changing the layout.</p>\n <c2-border-beam class=\"slow-beam\" reverse></c2-border-beam>\n</div>",
|
|
5393
|
+
"css": ".beam-card {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 420px);\n overflow: hidden;\n padding: 22px;\n border: 1px solid #e4e4e7;\n border-radius: 12px;\n background: #ffffff;\n}\n.beam-card strong {\n display: block;\n margin-bottom: 8px;\n font-size: 15px;\n}\n.beam-card p {\n margin: 0;\n color: #71717a;\n font-size: 14px;\n line-height: 1.5;\n}\n.violet-beam {\n --c2-border-beam__beam--color-from: #7c3aed;\n --c2-border-beam__beam--color-to: #ec4899;\n --c2-border-beam__beam--size: 120px;\n --c2-border-beam__beam--filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));\n --c2-border-beam__beam--duration: 4s;\n}\n.slow-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 7s;\n}\n.single-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 5s;\n}"
|
|
5394
|
+
},
|
|
5395
|
+
{
|
|
5396
|
+
"kind": "usage",
|
|
5397
|
+
"label": "Themed",
|
|
5398
|
+
"html": "<div class=\"beam-card\">\n <strong>New automation</strong>\n <p>Use CSS variables to create a stronger accent for important content.</p>\n <c2-border-beam class=\"violet-beam\" count=\"2\"></c2-border-beam>\n</div>",
|
|
5399
|
+
"css": ".beam-card {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 420px);\n overflow: hidden;\n padding: 22px;\n border: 1px solid #e4e4e7;\n border-radius: 12px;\n background: #ffffff;\n}\n.beam-card strong {\n display: block;\n margin-bottom: 8px;\n font-size: 15px;\n}\n.beam-card p {\n margin: 0;\n color: #71717a;\n font-size: 14px;\n line-height: 1.5;\n}\n.violet-beam {\n --c2-border-beam__beam--color-from: #7c3aed;\n --c2-border-beam__beam--color-to: #ec4899;\n --c2-border-beam__beam--size: 120px;\n --c2-border-beam__beam--filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));\n --c2-border-beam__beam--duration: 4s;\n}\n.slow-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 7s;\n}\n.single-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 5s;\n}"
|
|
5400
|
+
},
|
|
5401
|
+
{
|
|
5402
|
+
"kind": "usage",
|
|
5403
|
+
"label": "Single border",
|
|
5404
|
+
"html": "<div class=\"beam-card\">\n <strong>Active workspace</strong>\n <p>The highlight moves forward and backward along the top edge.</p>\n <c2-border-beam class=\"single-beam\" side=\"top\"></c2-border-beam>\n</div>",
|
|
5405
|
+
"css": ".beam-card {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 420px);\n overflow: hidden;\n padding: 22px;\n border: 1px solid #e4e4e7;\n border-radius: 12px;\n background: #ffffff;\n}\n.beam-card strong {\n display: block;\n margin-bottom: 8px;\n font-size: 15px;\n}\n.beam-card p {\n margin: 0;\n color: #71717a;\n font-size: 14px;\n line-height: 1.5;\n}\n.violet-beam {\n --c2-border-beam__beam--color-from: #7c3aed;\n --c2-border-beam__beam--color-to: #ec4899;\n --c2-border-beam__beam--size: 120px;\n --c2-border-beam__beam--filter: drop-shadow(0 0 6px rgba(124, 58, 237, 0.55));\n --c2-border-beam__beam--duration: 4s;\n}\n.slow-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 7s;\n}\n.single-beam {\n --c2-border-beam__beam--size: 72px;\n --c2-border-beam__beam--duration: 5s;\n}"
|
|
5406
|
+
},
|
|
5407
|
+
{
|
|
5408
|
+
"kind": "gallery",
|
|
5409
|
+
"label": "Default",
|
|
5410
|
+
"section": "Presets",
|
|
5411
|
+
"description": "Default Presets example for c2-border-beam.",
|
|
5412
|
+
"isDefault": true,
|
|
5413
|
+
"tags": [
|
|
5414
|
+
"c2-border-beam"
|
|
5415
|
+
],
|
|
5416
|
+
"html": "<div class=\"beam-panel-default\">\n <strong>Workspace overview</strong>\n <p>Review tasks, deployment health, and recent automation activity.</p>\n <c2-border-beam></c2-border-beam>\n</div>",
|
|
5417
|
+
"css": ".beam-panel-default {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 380px);\n overflow: hidden;\n padding: 24px;\n border: 1px solid #e4e4e7;\n border-radius: 12px;\n background: #ffffff;\n}\n.beam-panel-default strong {\n display: block;\n margin-bottom: 8px;\n}\n.beam-panel-default p {\n margin: 0;\n color: #71717a;\n font-size: 14px;\n line-height: 1.5;\n}"
|
|
5418
|
+
},
|
|
5419
|
+
{
|
|
5420
|
+
"kind": "gallery",
|
|
5421
|
+
"label": "Electric violet",
|
|
5422
|
+
"section": "Presets",
|
|
5423
|
+
"description": "Electric violet Presets example for c2-border-beam.",
|
|
5424
|
+
"isDefault": false,
|
|
5425
|
+
"tags": [
|
|
5426
|
+
"c2-border-beam"
|
|
5427
|
+
],
|
|
5428
|
+
"html": "<div class=\"beam-panel-violet\">\n <strong>AI workflow is live</strong>\n <p>Three agents are coordinating the release.</p>\n <c2-border-beam class=\"beam-violet\"></c2-border-beam>\n</div>",
|
|
5429
|
+
"css": ".beam-panel-violet {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 380px);\n overflow: hidden;\n padding: 24px;\n border: 1px solid #2e1065;\n border-radius: 16px;\n color: #faf5ff;\n background: linear-gradient(145deg, #1e1235, #0f0b18);\n}\n.beam-panel-violet p {\n margin: 8px 0 0;\n color: #c4b5fd;\n font-size: 14px;\n}\n.beam-violet {\n --c2-border-beam__beam--radius: 14px;\n --c2-border-beam__beam--width: 2px;\n --c2-border-beam__beam--size: 120px;\n --c2-border-beam__beam--color-from: #8b5cf6;\n --c2-border-beam__beam--color-to: #f0abfc;\n --c2-border-beam__beam--filter: drop-shadow(0 0 7px rgba(192, 132, 252, 0.7));\n --c2-border-beam__beam--duration: 3.8s;\n}"
|
|
5430
|
+
},
|
|
5431
|
+
{
|
|
5432
|
+
"kind": "gallery",
|
|
5433
|
+
"label": "Warm signal",
|
|
5434
|
+
"section": "Presets",
|
|
5435
|
+
"description": "Warm signal Presets example for c2-border-beam.",
|
|
5436
|
+
"isDefault": false,
|
|
5437
|
+
"tags": [
|
|
5438
|
+
"c2-border-beam"
|
|
5439
|
+
],
|
|
5440
|
+
"html": "<div class=\"beam-panel-warm\">\n <strong>Deployment needs attention</strong>\n <p>One environment is waiting for approval.</p>\n <c2-border-beam class=\"beam-warm\" reverse></c2-border-beam>\n</div>",
|
|
5441
|
+
"css": ".beam-panel-warm {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 380px);\n overflow: hidden;\n padding: 24px;\n border: 1px solid #fed7aa;\n border-radius: 14px;\n background: #fffaf5;\n}\n.beam-panel-warm p {\n margin: 8px 0 0;\n color: #9a3412;\n font-size: 14px;\n}\n.beam-warm {\n --c2-border-beam__beam--radius: 12px;\n --c2-border-beam__beam--size: 88px;\n --c2-border-beam__beam--color-from: #f97316;\n --c2-border-beam__beam--color-to: #facc15;\n --c2-border-beam__beam--filter: drop-shadow(0 0 5px rgba(249, 115, 22, 0.45));\n --c2-border-beam__beam--duration: 6s;\n}"
|
|
5442
|
+
},
|
|
5443
|
+
{
|
|
5444
|
+
"kind": "gallery",
|
|
5445
|
+
"label": "Dual orbit",
|
|
5446
|
+
"section": "Presets",
|
|
5447
|
+
"description": "Dual orbit Presets example for c2-border-beam.",
|
|
5448
|
+
"isDefault": false,
|
|
5449
|
+
"tags": [
|
|
5450
|
+
"c2-border-beam"
|
|
5451
|
+
],
|
|
5452
|
+
"html": "<div class=\"beam-panel-dual\">\n <strong>Realtime sync</strong>\n <p>Multiple beams can be distributed evenly around the same perimeter.</p>\n <c2-border-beam class=\"beam-dual\" count=\"2\"></c2-border-beam>\n</div>",
|
|
5453
|
+
"css": ".beam-panel-dual {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 380px);\n overflow: hidden;\n padding: 24px;\n border: 1px solid #dbeafe;\n border-radius: 18px;\n background: linear-gradient(145deg, #eff6ff, #ffffff);\n}\n.beam-panel-dual p {\n margin: 8px 0 0;\n color: #475569;\n font-size: 14px;\n}\n.beam-dual {\n --c2-border-beam__beam--radius: 16px;\n --c2-border-beam__beam--size: 70px;\n --c2-border-beam__beam--filter: drop-shadow(0 0 5px rgba(14, 165, 233, 0.5));\n --c2-border-beam__beam--duration: 7s;\n}"
|
|
5454
|
+
},
|
|
5455
|
+
{
|
|
5456
|
+
"kind": "gallery",
|
|
5457
|
+
"label": "Single border",
|
|
5458
|
+
"section": "Presets",
|
|
5459
|
+
"description": "Single border Presets example for c2-border-beam.",
|
|
5460
|
+
"isDefault": false,
|
|
5461
|
+
"tags": [
|
|
5462
|
+
"c2-border-beam"
|
|
5463
|
+
],
|
|
5464
|
+
"html": "<div class=\"beam-panel-sides\">\n <strong>Selective emphasis</strong>\n <p>This beam moves forward and backward along only the top border.</p>\n <c2-border-beam class=\"beam-single\" side=\"top\"></c2-border-beam>\n</div>",
|
|
5465
|
+
"css": ".beam-panel-sides {\n position: relative;\n box-sizing: border-box;\n width: min(100%, 380px);\n overflow: hidden;\n padding: 24px;\n border: 1px solid #dbeafe;\n border-radius: 12px;\n background: #f8fbff;\n}\n.beam-panel-sides p {\n margin: 8px 0 0;\n color: #64748b;\n font-size: 14px;\n}\n.beam-single {\n --c2-border-beam__beam--size: 76px;\n --c2-border-beam__beam--duration: 5s;\n}"
|
|
5466
|
+
},
|
|
5467
|
+
{
|
|
5468
|
+
"kind": "preview",
|
|
5469
|
+
"label": "Preview",
|
|
5470
|
+
"html": "<div style=\"position:relative;box-sizing:border-box;width:270px;overflow:hidden;padding:20px;border:1px solid #e4e4e7;border-radius:12px;background:#fff\"><strong style=\"display:block;margin-bottom:7px;font-size:14px\">Workspace overview</strong><span style=\"color:#71717a;font-size:12px;line-height:1.45\">Review task status and deployment health.</span><c2-border-beam></c2-border-beam></div>"
|
|
5471
|
+
}
|
|
5472
|
+
],
|
|
5473
|
+
"hasGallery": true
|
|
5474
|
+
},
|
|
5069
5475
|
"breadcrumb": {
|
|
5070
5476
|
"id": "breadcrumb",
|
|
5071
5477
|
"package": "@c2n/breadcrumb",
|
|
@@ -7855,7 +8261,9 @@
|
|
|
7855
8261
|
],
|
|
7856
8262
|
"composition": {
|
|
7857
8263
|
"internal": [],
|
|
7858
|
-
"slotted": [
|
|
8264
|
+
"slotted": [
|
|
8265
|
+
"c2-chart-series"
|
|
8266
|
+
],
|
|
7859
8267
|
"usedBy": []
|
|
7860
8268
|
},
|
|
7861
8269
|
"install": {
|
|
@@ -10695,6 +11103,20 @@
|
|
|
10695
11103
|
"html": "<c2-checkbox checked class=\"soft-tint\"></c2-checkbox>",
|
|
10696
11104
|
"css": ".soft-tint {\n --c2-checkbox__container--background-color: #f4f4f5;\n --c2-checkbox__container--border-top: 1px solid transparent;\n --c2-checkbox__container--border-right: 1px solid transparent;\n --c2-checkbox__container--border-bottom: 1px solid transparent;\n --c2-checkbox__container--border-left: 1px solid transparent;\n --c2-checkbox__container__selected--background-color: #dbeafe;\n --c2-checkbox__checkmark--color: #1d4ed8;\n --c2-checkbox__mixedmark--color: #1d4ed8;\n}"
|
|
10697
11105
|
},
|
|
11106
|
+
{
|
|
11107
|
+
"kind": "gallery",
|
|
11108
|
+
"label": "Notification toggle",
|
|
11109
|
+
"section": "Toggle button",
|
|
11110
|
+
"description": "Notification toggle Toggle button example for c2-checkbox.",
|
|
11111
|
+
"isDefault": false,
|
|
11112
|
+
"tags": [
|
|
11113
|
+
"c2-checkbox",
|
|
11114
|
+
"c2-feather-bell",
|
|
11115
|
+
"c2-feather-bell-off"
|
|
11116
|
+
],
|
|
11117
|
+
"html": "<c2-checkbox class=\"notification-toggle\" aria-label=\"Toggle notifications\">\n <c2-feather-bell slot=\"checkmark\"></c2-feather-bell>\n <c2-feather-bell-off slot=\"uncheckmark\"></c2-feather-bell-off>\n</c2-checkbox>\n<c2-checkbox class=\"notification-toggle\" aria-label=\"Toggle notifications\" checked>\n <c2-feather-bell slot=\"checkmark\"></c2-feather-bell>\n <c2-feather-bell-off slot=\"uncheckmark\"></c2-feather-bell-off>\n</c2-checkbox>",
|
|
11118
|
+
"css": ".notification-toggle {\n --c2-checkbox__container--width: 40px;\n --c2-checkbox__container--height: 40px;\n --c2-checkbox__state-layer--size: 40px;\n --c2-checkbox__container--border-top-left-radius: 10px;\n --c2-checkbox__container--border-top-right-radius: 10px;\n --c2-checkbox__container--border-bottom-left-radius: 10px;\n --c2-checkbox__container--border-bottom-right-radius: 10px;\n --c2-checkbox__container--border-top: 1px solid #d4d4d8;\n --c2-checkbox__container--border-right: 1px solid #d4d4d8;\n --c2-checkbox__container--border-bottom: 1px solid #d4d4d8;\n --c2-checkbox__container--border-left: 1px solid #d4d4d8;\n --c2-checkbox__container--background-color: #ffffff;\n --c2-checkbox__container__selected--background-color: #18181b;\n --c2-checkbox__container__selected--border-top: 1px solid #18181b;\n --c2-checkbox__container__selected--border-right: 1px solid #18181b;\n --c2-checkbox__container__selected--border-bottom: 1px solid #18181b;\n --c2-checkbox__container__selected--border-left: 1px solid #18181b;\n --c2-checkbox__checkmark--size: 18px;\n --c2-checkbox__checkmark--color: #ffffff;\n --c2-checkbox__uncheckmark--size: 18px;\n --c2-checkbox__uncheckmark--color: #3f3f46;\n --c2-checkbox__state-layer--border-top-left-radius: 10px;\n --c2-checkbox__state-layer--border-top-right-radius: 10px;\n --c2-checkbox__state-layer--border-bottom-left-radius: 10px;\n --c2-checkbox__state-layer--border-bottom-right-radius: 10px;\n --c2-checkbox__state-layer__hover__unselected--color: #18181b;\n --c2-checkbox__state-layer__hover__selected--color: #ffffff;\n --c2-checkbox__container__focus--outline: 2px solid rgba(24, 24, 27, 0.3);\n}"
|
|
11119
|
+
},
|
|
10698
11120
|
{
|
|
10699
11121
|
"kind": "gallery",
|
|
10700
11122
|
"label": "Square hover tint",
|
|
@@ -10979,6 +11401,684 @@
|
|
|
10979
11401
|
],
|
|
10980
11402
|
"hasGallery": true
|
|
10981
11403
|
},
|
|
11404
|
+
"code-editor": {
|
|
11405
|
+
"id": "code-editor",
|
|
11406
|
+
"package": "@c2n/code-editor",
|
|
11407
|
+
"title": "Code Editor",
|
|
11408
|
+
"description": "Editable, syntax-highlighted source field on CodeMirror 6, themed entirely through CSS variables.",
|
|
11409
|
+
"intro": "`c2-code-editor` is a form control for source code: highlighting, a line-number gutter, bracket matching, undo,",
|
|
11410
|
+
"category": "Inputs",
|
|
11411
|
+
"status": "stable",
|
|
11412
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/code-editor",
|
|
11413
|
+
"elements": [
|
|
11414
|
+
{
|
|
11415
|
+
"tag": "c2-code-editor",
|
|
11416
|
+
"className": "CodeEditor",
|
|
11417
|
+
"modulePath": "@c2n/code-editor",
|
|
11418
|
+
"description": "Source-code field built on CodeMirror 6, which is an **optional peer dependency**: nothing is imported until an\neditor mounts, and when the peer is absent the element degrades to a plain `<textarea>` carrying the same value,\nthe same events and the same form behaviour — only without highlighting. Install what you need alongside it:\n\n```sh\nnpm install",
|
|
11419
|
+
"attributes": [
|
|
11420
|
+
{
|
|
11421
|
+
"name": "value",
|
|
11422
|
+
"type": "string",
|
|
11423
|
+
"default": "''",
|
|
11424
|
+
"description": "The source code. Assigning it replaces the document without losing scroll position or undo history."
|
|
11425
|
+
},
|
|
11426
|
+
{
|
|
11427
|
+
"name": "language",
|
|
11428
|
+
"type": "string",
|
|
11429
|
+
"default": "''",
|
|
11430
|
+
"description": "Language id: one of `BUILT_IN_LANGUAGES`, anything `languageLoader` resolves, or empty for no highlighting."
|
|
11431
|
+
},
|
|
11432
|
+
{
|
|
11433
|
+
"name": "name",
|
|
11434
|
+
"type": "string",
|
|
11435
|
+
"default": "''",
|
|
11436
|
+
"description": "Form field name."
|
|
11437
|
+
},
|
|
11438
|
+
{
|
|
11439
|
+
"name": "label",
|
|
11440
|
+
"type": "string",
|
|
11441
|
+
"default": "''",
|
|
11442
|
+
"description": "Label above the editor, when the `label` slot is empty."
|
|
11443
|
+
},
|
|
11444
|
+
{
|
|
11445
|
+
"name": "aria-label",
|
|
11446
|
+
"type": "string | null",
|
|
11447
|
+
"default": "null",
|
|
11448
|
+
"description": "Accessible name when nothing visible labels the editor."
|
|
11449
|
+
},
|
|
11450
|
+
{
|
|
11451
|
+
"name": "placeholder",
|
|
11452
|
+
"type": "string",
|
|
11453
|
+
"default": "''",
|
|
11454
|
+
"description": "Text shown while the document is empty."
|
|
11455
|
+
},
|
|
11456
|
+
{
|
|
11457
|
+
"name": "readonly",
|
|
11458
|
+
"type": "boolean",
|
|
11459
|
+
"default": "false",
|
|
11460
|
+
"description": "The document cannot be edited, but is still selectable and focusable."
|
|
11461
|
+
},
|
|
11462
|
+
{
|
|
11463
|
+
"name": "disabled",
|
|
11464
|
+
"type": "boolean",
|
|
11465
|
+
"default": "false",
|
|
11466
|
+
"description": "Blocks interaction entirely and dims the editor."
|
|
11467
|
+
},
|
|
11468
|
+
{
|
|
11469
|
+
"name": "required",
|
|
11470
|
+
"type": "boolean",
|
|
11471
|
+
"default": "false",
|
|
11472
|
+
"description": "The form is invalid while the value is empty."
|
|
11473
|
+
},
|
|
11474
|
+
{
|
|
11475
|
+
"name": "line-numbers",
|
|
11476
|
+
"type": "boolean",
|
|
11477
|
+
"default": "false",
|
|
11478
|
+
"description": "Show the line-number gutter."
|
|
11479
|
+
},
|
|
11480
|
+
{
|
|
11481
|
+
"name": "wrap",
|
|
11482
|
+
"type": "boolean",
|
|
11483
|
+
"default": "false",
|
|
11484
|
+
"description": "Wrap long lines instead of scrolling horizontally."
|
|
11485
|
+
},
|
|
11486
|
+
{
|
|
11487
|
+
"name": "autocomplete",
|
|
11488
|
+
"type": "boolean",
|
|
11489
|
+
"default": "false",
|
|
11490
|
+
"description": "Offer completions while typing (identifiers, and whatever the grammar contributes)."
|
|
11491
|
+
},
|
|
11492
|
+
{
|
|
11493
|
+
"name": "tab-size",
|
|
11494
|
+
"type": "number",
|
|
11495
|
+
"default": "2",
|
|
11496
|
+
"description": "Width of a tab stop, in characters."
|
|
11497
|
+
},
|
|
11498
|
+
{
|
|
11499
|
+
"name": "error",
|
|
11500
|
+
"type": "boolean",
|
|
11501
|
+
"default": "false",
|
|
11502
|
+
"description": "Renders the error styling; `error-text` replaces the supporting text."
|
|
11503
|
+
},
|
|
11504
|
+
{
|
|
11505
|
+
"name": "error-text",
|
|
11506
|
+
"type": "string",
|
|
11507
|
+
"default": "''",
|
|
11508
|
+
"description": "Message shown in place of the supporting text while `error` is set."
|
|
11509
|
+
},
|
|
11510
|
+
{
|
|
11511
|
+
"name": "help",
|
|
11512
|
+
"type": "string",
|
|
11513
|
+
"default": "''",
|
|
11514
|
+
"description": "Help text under the editor, when the `supporting-text` slot is empty."
|
|
11515
|
+
}
|
|
11516
|
+
],
|
|
11517
|
+
"slots": [
|
|
11518
|
+
{
|
|
11519
|
+
"name": "label",
|
|
11520
|
+
"description": "Label shown above the editor. Falls back to the `label` attribute."
|
|
11521
|
+
},
|
|
11522
|
+
{
|
|
11523
|
+
"name": "supporting-text",
|
|
11524
|
+
"description": "Help text under the editor. Replaced by `error-text` while `error` is set."
|
|
11525
|
+
}
|
|
11526
|
+
],
|
|
11527
|
+
"events": [
|
|
11528
|
+
{
|
|
11529
|
+
"name": "ready",
|
|
11530
|
+
"type": "CustomEvent<{ engine: 'codemirror' | 'basic' }>",
|
|
11531
|
+
"description": "The engine settled, so tests and hosts can wait for it. Does not bubble."
|
|
11532
|
+
},
|
|
11533
|
+
{
|
|
11534
|
+
"name": "input",
|
|
11535
|
+
"type": "Event",
|
|
11536
|
+
"description": "The document changed. Fires on every edit."
|
|
11537
|
+
},
|
|
11538
|
+
{
|
|
11539
|
+
"name": "change",
|
|
11540
|
+
"type": "Event",
|
|
11541
|
+
"description": "The value was committed: the editor lost focus after an edit, as a native control does."
|
|
11542
|
+
}
|
|
11543
|
+
],
|
|
11544
|
+
"cssParts": [
|
|
11545
|
+
{
|
|
11546
|
+
"name": "container",
|
|
11547
|
+
"description": "The box around the label, editor and supporting text."
|
|
11548
|
+
},
|
|
11549
|
+
{
|
|
11550
|
+
"name": "label",
|
|
11551
|
+
"description": "The label above the editor."
|
|
11552
|
+
},
|
|
11553
|
+
{
|
|
11554
|
+
"name": "editor",
|
|
11555
|
+
"description": "The element CodeMirror renders into, or the fallback textarea."
|
|
11556
|
+
},
|
|
11557
|
+
{
|
|
11558
|
+
"name": "supporting-text",
|
|
11559
|
+
"description": "The help / error row under the editor."
|
|
11560
|
+
},
|
|
11561
|
+
{
|
|
11562
|
+
"name": "ready",
|
|
11563
|
+
"description": "Shadow DOM styling hook for the ready element."
|
|
11564
|
+
}
|
|
11565
|
+
],
|
|
11566
|
+
"cssProperties": [
|
|
11567
|
+
{
|
|
11568
|
+
"name": "--c2-code-editor--background",
|
|
11569
|
+
"type": "color",
|
|
11570
|
+
"default": "#ffffff",
|
|
11571
|
+
"part": "",
|
|
11572
|
+
"property": "background",
|
|
11573
|
+
"token": "--c2-theme--color-surface"
|
|
11574
|
+
},
|
|
11575
|
+
{
|
|
11576
|
+
"name": "--c2-code-editor--color",
|
|
11577
|
+
"type": "color",
|
|
11578
|
+
"default": "#24292e",
|
|
11579
|
+
"part": "",
|
|
11580
|
+
"property": "color",
|
|
11581
|
+
"description": "Foreground of text no token class matched."
|
|
11582
|
+
},
|
|
11583
|
+
{
|
|
11584
|
+
"name": "--c2-code-editor--border",
|
|
11585
|
+
"type": "border",
|
|
11586
|
+
"default": "1px solid #bcbcc6",
|
|
11587
|
+
"part": "",
|
|
11588
|
+
"property": "border",
|
|
11589
|
+
"token": "--c2-theme--border"
|
|
11590
|
+
},
|
|
11591
|
+
{
|
|
11592
|
+
"name": "--c2-code-editor__focus--border",
|
|
11593
|
+
"type": "border",
|
|
11594
|
+
"default": "1px solid rgb(2, 101, 220)",
|
|
11595
|
+
"part": "",
|
|
11596
|
+
"state": "focus",
|
|
11597
|
+
"property": "border",
|
|
11598
|
+
"token": "--c2-theme--color-primary"
|
|
11599
|
+
},
|
|
11600
|
+
{
|
|
11601
|
+
"name": "--c2-code-editor__focus--outline",
|
|
11602
|
+
"type": "outline",
|
|
11603
|
+
"default": "2px solid rgba(2, 101, 220, 0.4)",
|
|
11604
|
+
"part": "",
|
|
11605
|
+
"state": "focus",
|
|
11606
|
+
"property": "outline",
|
|
11607
|
+
"token": "--c2-theme--focus-ring"
|
|
11608
|
+
},
|
|
11609
|
+
{
|
|
11610
|
+
"name": "--c2-code-editor--border-radius",
|
|
11611
|
+
"type": "border-radius",
|
|
11612
|
+
"default": "6px",
|
|
11613
|
+
"part": "",
|
|
11614
|
+
"property": "border-radius",
|
|
11615
|
+
"token": "--c2-theme--radius-md"
|
|
11616
|
+
},
|
|
11617
|
+
{
|
|
11618
|
+
"name": "--c2-code-editor--box-shadow",
|
|
11619
|
+
"type": "box-shadow",
|
|
11620
|
+
"part": "",
|
|
11621
|
+
"property": "box-shadow"
|
|
11622
|
+
},
|
|
11623
|
+
{
|
|
11624
|
+
"name": "--c2-code-editor__disabled--opacity",
|
|
11625
|
+
"type": "opacity",
|
|
11626
|
+
"default": "0.38",
|
|
11627
|
+
"part": "",
|
|
11628
|
+
"state": "disabled",
|
|
11629
|
+
"property": "opacity",
|
|
11630
|
+
"token": "--c2-theme--disabled-opacity"
|
|
11631
|
+
},
|
|
11632
|
+
{
|
|
11633
|
+
"name": "--c2-code-editor--font-family",
|
|
11634
|
+
"type": "font-family",
|
|
11635
|
+
"default": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
11636
|
+
"part": "",
|
|
11637
|
+
"property": "font-family",
|
|
11638
|
+
"token": "--c2-theme--font-family"
|
|
11639
|
+
},
|
|
11640
|
+
{
|
|
11641
|
+
"name": "--c2-code-editor--font-size",
|
|
11642
|
+
"type": "font-size",
|
|
11643
|
+
"default": "13px",
|
|
11644
|
+
"part": "",
|
|
11645
|
+
"property": "font-size"
|
|
11646
|
+
},
|
|
11647
|
+
{
|
|
11648
|
+
"name": "--c2-code-editor--line-height",
|
|
11649
|
+
"type": "line-height",
|
|
11650
|
+
"default": "1.6",
|
|
11651
|
+
"part": "",
|
|
11652
|
+
"property": "line-height"
|
|
11653
|
+
},
|
|
11654
|
+
{
|
|
11655
|
+
"name": "--c2-code-editor--min-height",
|
|
11656
|
+
"type": "pixel",
|
|
11657
|
+
"default": "120px",
|
|
11658
|
+
"part": "",
|
|
11659
|
+
"property": "min-height"
|
|
11660
|
+
},
|
|
11661
|
+
{
|
|
11662
|
+
"name": "--c2-code-editor--max-height",
|
|
11663
|
+
"type": "pixel",
|
|
11664
|
+
"default": "420px",
|
|
11665
|
+
"part": "",
|
|
11666
|
+
"property": "max-height",
|
|
11667
|
+
"description": "The editor scrolls past this height."
|
|
11668
|
+
},
|
|
11669
|
+
{
|
|
11670
|
+
"name": "--c2-code-editor--padding-block",
|
|
11671
|
+
"type": "padding",
|
|
11672
|
+
"default": "10px",
|
|
11673
|
+
"part": "",
|
|
11674
|
+
"property": "padding-block"
|
|
11675
|
+
},
|
|
11676
|
+
{
|
|
11677
|
+
"name": "--c2-code-editor--padding-inline",
|
|
11678
|
+
"type": "padding",
|
|
11679
|
+
"default": "12px",
|
|
11680
|
+
"part": "",
|
|
11681
|
+
"property": "padding-inline"
|
|
11682
|
+
},
|
|
11683
|
+
{
|
|
11684
|
+
"name": "--c2-code-editor__gutter--background",
|
|
11685
|
+
"type": "color",
|
|
11686
|
+
"default": "transparent",
|
|
11687
|
+
"part": "gutter",
|
|
11688
|
+
"property": "background"
|
|
11689
|
+
},
|
|
11690
|
+
{
|
|
11691
|
+
"name": "--c2-code-editor__gutter--color",
|
|
11692
|
+
"type": "color",
|
|
11693
|
+
"default": "#71717a",
|
|
11694
|
+
"part": "gutter",
|
|
11695
|
+
"property": "color",
|
|
11696
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
11697
|
+
},
|
|
11698
|
+
{
|
|
11699
|
+
"name": "--c2-code-editor__gutter__active--color",
|
|
11700
|
+
"type": "color",
|
|
11701
|
+
"default": "#18181b",
|
|
11702
|
+
"part": "gutter",
|
|
11703
|
+
"state": "active",
|
|
11704
|
+
"property": "color",
|
|
11705
|
+
"token": "--c2-theme--color-on-surface"
|
|
11706
|
+
},
|
|
11707
|
+
{
|
|
11708
|
+
"name": "--c2-code-editor__gutter--border-right",
|
|
11709
|
+
"type": "border",
|
|
11710
|
+
"default": "1px solid #e4e4e7",
|
|
11711
|
+
"part": "gutter",
|
|
11712
|
+
"property": "border-right",
|
|
11713
|
+
"token": "--c2-theme--color-outline-variant"
|
|
11714
|
+
},
|
|
11715
|
+
{
|
|
11716
|
+
"name": "--c2-code-editor__gutter--min-width",
|
|
11717
|
+
"type": "pixel",
|
|
11718
|
+
"default": "32px",
|
|
11719
|
+
"part": "gutter",
|
|
11720
|
+
"property": "min-width"
|
|
11721
|
+
},
|
|
11722
|
+
{
|
|
11723
|
+
"name": "--c2-code-editor__active-line--background",
|
|
11724
|
+
"type": "color",
|
|
11725
|
+
"default": "rgba(2, 101, 220, 0.04)",
|
|
11726
|
+
"part": "active-line",
|
|
11727
|
+
"property": "background",
|
|
11728
|
+
"token": "--c2-theme--color-primary"
|
|
11729
|
+
},
|
|
11730
|
+
{
|
|
11731
|
+
"name": "--c2-code-editor__selection--background",
|
|
11732
|
+
"type": "color",
|
|
11733
|
+
"default": "rgba(2, 101, 220, 0.18)",
|
|
11734
|
+
"part": "selection",
|
|
11735
|
+
"property": "background",
|
|
11736
|
+
"token": "--c2-theme--color-primary"
|
|
11737
|
+
},
|
|
11738
|
+
{
|
|
11739
|
+
"name": "--c2-code-editor__cursor--color",
|
|
11740
|
+
"type": "color",
|
|
11741
|
+
"default": "#18181b",
|
|
11742
|
+
"part": "cursor",
|
|
11743
|
+
"property": "color",
|
|
11744
|
+
"token": "--c2-theme--color-on-surface"
|
|
11745
|
+
},
|
|
11746
|
+
{
|
|
11747
|
+
"name": "--c2-code-editor__matching-bracket--background",
|
|
11748
|
+
"type": "color",
|
|
11749
|
+
"default": "rgba(2, 101, 220, 0.16)",
|
|
11750
|
+
"part": "matching-bracket",
|
|
11751
|
+
"property": "background",
|
|
11752
|
+
"token": "--c2-theme--color-primary"
|
|
11753
|
+
},
|
|
11754
|
+
{
|
|
11755
|
+
"name": "--c2-code-editor__placeholder--color",
|
|
11756
|
+
"type": "color",
|
|
11757
|
+
"default": "#71717a",
|
|
11758
|
+
"part": "placeholder",
|
|
11759
|
+
"property": "color",
|
|
11760
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
11761
|
+
},
|
|
11762
|
+
{
|
|
11763
|
+
"name": "--c2-code-editor__theme--token-keyword",
|
|
11764
|
+
"type": "color",
|
|
11765
|
+
"default": "#cf222e",
|
|
11766
|
+
"part": "theme",
|
|
11767
|
+
"property": "token-keyword"
|
|
11768
|
+
},
|
|
11769
|
+
{
|
|
11770
|
+
"name": "--c2-code-editor__theme--token-string",
|
|
11771
|
+
"type": "color",
|
|
11772
|
+
"default": "#032f62",
|
|
11773
|
+
"part": "theme",
|
|
11774
|
+
"property": "token-string"
|
|
11775
|
+
},
|
|
11776
|
+
{
|
|
11777
|
+
"name": "--c2-code-editor__theme--token-comment",
|
|
11778
|
+
"type": "color",
|
|
11779
|
+
"default": "#636c76",
|
|
11780
|
+
"part": "theme",
|
|
11781
|
+
"property": "token-comment"
|
|
11782
|
+
},
|
|
11783
|
+
{
|
|
11784
|
+
"name": "--c2-code-editor__theme--token-constant",
|
|
11785
|
+
"type": "color",
|
|
11786
|
+
"default": "#0550ae",
|
|
11787
|
+
"part": "theme",
|
|
11788
|
+
"property": "token-constant"
|
|
11789
|
+
},
|
|
11790
|
+
{
|
|
11791
|
+
"name": "--c2-code-editor__theme--token-function",
|
|
11792
|
+
"type": "color",
|
|
11793
|
+
"default": "#6f42c1",
|
|
11794
|
+
"part": "theme",
|
|
11795
|
+
"property": "token-function"
|
|
11796
|
+
},
|
|
11797
|
+
{
|
|
11798
|
+
"name": "--c2-code-editor__theme--token-type",
|
|
11799
|
+
"type": "color",
|
|
11800
|
+
"default": "#953800",
|
|
11801
|
+
"part": "theme",
|
|
11802
|
+
"property": "token-type"
|
|
11803
|
+
},
|
|
11804
|
+
{
|
|
11805
|
+
"name": "--c2-code-editor__theme--token-property",
|
|
11806
|
+
"type": "color",
|
|
11807
|
+
"default": "#0550ae",
|
|
11808
|
+
"part": "theme",
|
|
11809
|
+
"property": "token-property"
|
|
11810
|
+
},
|
|
11811
|
+
{
|
|
11812
|
+
"name": "--c2-code-editor__theme--token-variable",
|
|
11813
|
+
"type": "color",
|
|
11814
|
+
"default": "#24292e",
|
|
11815
|
+
"part": "theme",
|
|
11816
|
+
"property": "token-variable"
|
|
11817
|
+
},
|
|
11818
|
+
{
|
|
11819
|
+
"name": "--c2-code-editor__theme--token-tag",
|
|
11820
|
+
"type": "color",
|
|
11821
|
+
"default": "#116329",
|
|
11822
|
+
"part": "theme",
|
|
11823
|
+
"property": "token-tag"
|
|
11824
|
+
},
|
|
11825
|
+
{
|
|
11826
|
+
"name": "--c2-code-editor__theme--token-punctuation",
|
|
11827
|
+
"type": "color",
|
|
11828
|
+
"default": "#24292e",
|
|
11829
|
+
"part": "theme",
|
|
11830
|
+
"property": "token-punctuation"
|
|
11831
|
+
},
|
|
11832
|
+
{
|
|
11833
|
+
"name": "--c2-code-editor__theme--token-link",
|
|
11834
|
+
"type": "color",
|
|
11835
|
+
"default": "#032f62",
|
|
11836
|
+
"part": "theme",
|
|
11837
|
+
"property": "token-link"
|
|
11838
|
+
},
|
|
11839
|
+
{
|
|
11840
|
+
"name": "--c2-code-editor__theme--token-invalid",
|
|
11841
|
+
"type": "color",
|
|
11842
|
+
"default": "#cf222e",
|
|
11843
|
+
"part": "theme",
|
|
11844
|
+
"property": "token-invalid"
|
|
11845
|
+
},
|
|
11846
|
+
{
|
|
11847
|
+
"name": "--c2-code-editor__label--color",
|
|
11848
|
+
"type": "color",
|
|
11849
|
+
"default": "#18181b",
|
|
11850
|
+
"part": "label",
|
|
11851
|
+
"property": "color",
|
|
11852
|
+
"token": "--c2-theme--color-on-surface"
|
|
11853
|
+
},
|
|
11854
|
+
{
|
|
11855
|
+
"name": "--c2-code-editor__label--font-size",
|
|
11856
|
+
"type": "font-size",
|
|
11857
|
+
"default": "12px",
|
|
11858
|
+
"part": "label",
|
|
11859
|
+
"property": "font-size",
|
|
11860
|
+
"token": "--c2-theme--font-size-sm"
|
|
11861
|
+
},
|
|
11862
|
+
{
|
|
11863
|
+
"name": "--c2-code-editor__label--font-weight",
|
|
11864
|
+
"type": "font-weight",
|
|
11865
|
+
"default": "500",
|
|
11866
|
+
"part": "label",
|
|
11867
|
+
"property": "font-weight",
|
|
11868
|
+
"token": "--c2-theme--font-weight-medium"
|
|
11869
|
+
},
|
|
11870
|
+
{
|
|
11871
|
+
"name": "--c2-code-editor__supporting-text--color",
|
|
11872
|
+
"type": "color",
|
|
11873
|
+
"default": "#71717a",
|
|
11874
|
+
"part": "supporting-text",
|
|
11875
|
+
"property": "color",
|
|
11876
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
11877
|
+
},
|
|
11878
|
+
{
|
|
11879
|
+
"name": "--c2-code-editor__supporting-text--font-size",
|
|
11880
|
+
"type": "font-size",
|
|
11881
|
+
"default": "12px",
|
|
11882
|
+
"part": "supporting-text",
|
|
11883
|
+
"property": "font-size",
|
|
11884
|
+
"token": "--c2-theme--font-size-sm"
|
|
11885
|
+
},
|
|
11886
|
+
{
|
|
11887
|
+
"name": "--c2-code-editor__error--color",
|
|
11888
|
+
"type": "color",
|
|
11889
|
+
"default": "#dc2626",
|
|
11890
|
+
"part": "",
|
|
11891
|
+
"state": "error",
|
|
11892
|
+
"property": "color",
|
|
11893
|
+
"token": "--c2-theme--color-error"
|
|
11894
|
+
},
|
|
11895
|
+
{
|
|
11896
|
+
"name": "--c2-code-editor__error--border",
|
|
11897
|
+
"type": "border",
|
|
11898
|
+
"default": "1px solid #dc2626",
|
|
11899
|
+
"part": "",
|
|
11900
|
+
"state": "error",
|
|
11901
|
+
"property": "border",
|
|
11902
|
+
"token": "--c2-theme--color-error"
|
|
11903
|
+
},
|
|
11904
|
+
{
|
|
11905
|
+
"name": "--c2-code-editor--gap",
|
|
11906
|
+
"type": "pixel",
|
|
11907
|
+
"default": "6px",
|
|
11908
|
+
"part": "",
|
|
11909
|
+
"property": "gap",
|
|
11910
|
+
"description": "Space between the label, the editor and the supporting text."
|
|
11911
|
+
}
|
|
11912
|
+
]
|
|
11913
|
+
}
|
|
11914
|
+
],
|
|
11915
|
+
"composition": {
|
|
11916
|
+
"internal": [],
|
|
11917
|
+
"slotted": [],
|
|
11918
|
+
"usedBy": []
|
|
11919
|
+
},
|
|
11920
|
+
"install": {
|
|
11921
|
+
"npm": "npm install @c2n/code-editor @c2n/theme",
|
|
11922
|
+
"import": "import '@c2n/code-editor'",
|
|
11923
|
+
"importClass": "import { CodeEditor } from '@c2n/code-editor'"
|
|
11924
|
+
},
|
|
11925
|
+
"presets": {
|
|
11926
|
+
"html": "<c2-code-editor language=\"javascript\" line-numbers aria-label=\"Example editor\" value=\"const greet = (name) => `hello ${name}`\"></c2-code-editor>",
|
|
11927
|
+
"items": [
|
|
11928
|
+
{
|
|
11929
|
+
"name": "Midnight",
|
|
11930
|
+
"description": "A dark editor built only from variables — there is no JavaScript theme to switch.",
|
|
11931
|
+
"css": {
|
|
11932
|
+
"--c2-code-editor--background": "#0d1117",
|
|
11933
|
+
"--c2-code-editor--color": "#c9d1d9",
|
|
11934
|
+
"--c2-code-editor--border": "1px solid #30363d",
|
|
11935
|
+
"--c2-code-editor__gutter--color": "#6e7681",
|
|
11936
|
+
"--c2-code-editor__gutter--border-right": "1px solid #21262d",
|
|
11937
|
+
"--c2-code-editor__gutter__active--color": "#c9d1d9",
|
|
11938
|
+
"--c2-code-editor__active-line--background": "rgba(110, 118, 129, 0.1)",
|
|
11939
|
+
"--c2-code-editor__cursor--color": "#c9d1d9",
|
|
11940
|
+
"--c2-code-editor__theme--token-keyword": "#ff7b72",
|
|
11941
|
+
"--c2-code-editor__theme--token-string": "#a5d6ff",
|
|
11942
|
+
"--c2-code-editor__theme--token-comment": "#8b949e",
|
|
11943
|
+
"--c2-code-editor__theme--token-constant": "#79c0ff",
|
|
11944
|
+
"--c2-code-editor__theme--token-function": "#d2a8ff",
|
|
11945
|
+
"--c2-code-editor__theme--token-variable": "#c9d1d9",
|
|
11946
|
+
"--c2-code-editor__theme--token-punctuation": "#c9d1d9"
|
|
11947
|
+
}
|
|
11948
|
+
},
|
|
11949
|
+
{
|
|
11950
|
+
"name": "Borderless",
|
|
11951
|
+
"description": "A tinted panel with no frame, for an editor embedded in a card.",
|
|
11952
|
+
"css": {
|
|
11953
|
+
"--c2-code-editor--border": "1px solid transparent",
|
|
11954
|
+
"--c2-code-editor--background": "#f8f8f8",
|
|
11955
|
+
"--c2-code-editor--border-radius": "10px",
|
|
11956
|
+
"--c2-code-editor__active-line--background": "transparent"
|
|
11957
|
+
}
|
|
11958
|
+
},
|
|
11959
|
+
{
|
|
11960
|
+
"name": "Dense",
|
|
11961
|
+
"description": "Smaller type and tighter padding for a code field in a form.",
|
|
11962
|
+
"css": {
|
|
11963
|
+
"--c2-code-editor--font-size": "11px",
|
|
11964
|
+
"--c2-code-editor--line-height": "1.4",
|
|
11965
|
+
"--c2-code-editor--min-height": "84px",
|
|
11966
|
+
"--c2-code-editor--padding-block": "6px",
|
|
11967
|
+
"--c2-code-editor--padding-inline": "8px",
|
|
11968
|
+
"--c2-code-editor__gutter--min-width": "24px"
|
|
11969
|
+
}
|
|
11970
|
+
},
|
|
11971
|
+
{
|
|
11972
|
+
"name": "Accented frame",
|
|
11973
|
+
"description": "A focused-looking frame with a soft ring, for the primary field on a page.",
|
|
11974
|
+
"css": {
|
|
11975
|
+
"--c2-code-editor--border": "1px solid #0265dc",
|
|
11976
|
+
"--c2-code-editor--border-radius": "8px",
|
|
11977
|
+
"--c2-code-editor--box-shadow": "0 0 0 4px rgba(2, 101, 220, 0.08)",
|
|
11978
|
+
"--c2-code-editor__gutter--background": "rgba(2, 101, 220, 0.04)",
|
|
11979
|
+
"--c2-code-editor__gutter--border-right": "1px solid rgba(2, 101, 220, 0.16)"
|
|
11980
|
+
}
|
|
11981
|
+
}
|
|
11982
|
+
]
|
|
11983
|
+
},
|
|
11984
|
+
"examples": [
|
|
11985
|
+
{
|
|
11986
|
+
"kind": "usage",
|
|
11987
|
+
"label": "JavaScript with a gutter and completion",
|
|
11988
|
+
"html": " <c2-code-editor\n label=\"Handler\"\n language=\"javascript\"\n line-numbers\n autocomplete\n help=\"Tab indents, ⌘F searches.\"\n value=\"const greeting = 'hello'\n\n// Click the button to count.\nexport function counter(host) {\n let count = 0\n host.addEventListener('click', () => (count += 1))\n return () => count\n}\"\n ></c2-code-editor>",
|
|
11989
|
+
"css": ".midnight {\n --c2-code-editor--background: #0d1117;\n --c2-code-editor--color: #c9d1d9;\n --c2-code-editor--border: 1px solid #30363d;\n --c2-code-editor__gutter--color: #6e7681;\n --c2-code-editor__gutter--border-right: 1px solid #21262d;\n --c2-code-editor__gutter__active--color: #c9d1d9;\n --c2-code-editor__active-line--background: rgba(110, 118, 129, 0.1);\n --c2-code-editor__cursor--color: #c9d1d9;\n --c2-code-editor__theme--token-keyword: #ff7b72;\n --c2-code-editor__theme--token-string: #a5d6ff;\n --c2-code-editor__theme--token-comment: #8b949e;\n --c2-code-editor__theme--token-constant: #79c0ff;\n --c2-code-editor__theme--token-function: #d2a8ff;\n --c2-code-editor__theme--token-property: #79c0ff;\n --c2-code-editor__theme--token-variable: #c9d1d9;\n --c2-code-editor__theme--token-punctuation: #c9d1d9;\n}\n.compact {\n --c2-code-editor--min-height: 84px;\n --c2-code-editor--font-size: 12px;\n}"
|
|
11990
|
+
},
|
|
11991
|
+
{
|
|
11992
|
+
"kind": "usage",
|
|
11993
|
+
"label": "The same component, a dark palette — CSS variables only",
|
|
11994
|
+
"html": "<c2-code-editor\n class=\"midnight\"\n label=\"Configuration\"\n language=\"json\"\n line-numbers\n wrap\n value='{ \"name\": \"@c2n/code-editor\", \"engine\": \"codemirror\", \"themed\": \"with css variables\" }'\n></c2-code-editor>",
|
|
11995
|
+
"css": ".midnight {\n --c2-code-editor--background: #0d1117;\n --c2-code-editor--color: #c9d1d9;\n --c2-code-editor--border: 1px solid #30363d;\n --c2-code-editor__gutter--color: #6e7681;\n --c2-code-editor__gutter--border-right: 1px solid #21262d;\n --c2-code-editor__gutter__active--color: #c9d1d9;\n --c2-code-editor__active-line--background: rgba(110, 118, 129, 0.1);\n --c2-code-editor__cursor--color: #c9d1d9;\n --c2-code-editor__theme--token-keyword: #ff7b72;\n --c2-code-editor__theme--token-string: #a5d6ff;\n --c2-code-editor__theme--token-comment: #8b949e;\n --c2-code-editor__theme--token-constant: #79c0ff;\n --c2-code-editor__theme--token-function: #d2a8ff;\n --c2-code-editor__theme--token-property: #79c0ff;\n --c2-code-editor__theme--token-variable: #c9d1d9;\n --c2-code-editor__theme--token-punctuation: #c9d1d9;\n}\n.compact {\n --c2-code-editor--min-height: 84px;\n --c2-code-editor--font-size: 12px;\n}"
|
|
11996
|
+
},
|
|
11997
|
+
{
|
|
11998
|
+
"kind": "usage",
|
|
11999
|
+
"label": "Read-only, and an error state",
|
|
12000
|
+
"html": "<c2-code-editor class=\"compact\" language=\"css\" readonly label=\"Generated\" value=\".card { border-radius: 8px }\"></c2-code-editor>\n<c2-code-editor class=\"compact\" language=\"css\" error error-text=\"Unexpected token at line 1.\" value=\".a { color }\"></c2-code-editor>",
|
|
12001
|
+
"css": ".midnight {\n --c2-code-editor--background: #0d1117;\n --c2-code-editor--color: #c9d1d9;\n --c2-code-editor--border: 1px solid #30363d;\n --c2-code-editor__gutter--color: #6e7681;\n --c2-code-editor__gutter--border-right: 1px solid #21262d;\n --c2-code-editor__gutter__active--color: #c9d1d9;\n --c2-code-editor__active-line--background: rgba(110, 118, 129, 0.1);\n --c2-code-editor__cursor--color: #c9d1d9;\n --c2-code-editor__theme--token-keyword: #ff7b72;\n --c2-code-editor__theme--token-string: #a5d6ff;\n --c2-code-editor__theme--token-comment: #8b949e;\n --c2-code-editor__theme--token-constant: #79c0ff;\n --c2-code-editor__theme--token-function: #d2a8ff;\n --c2-code-editor__theme--token-property: #79c0ff;\n --c2-code-editor__theme--token-variable: #c9d1d9;\n --c2-code-editor__theme--token-punctuation: #c9d1d9;\n}\n.compact {\n --c2-code-editor--min-height: 84px;\n --c2-code-editor--font-size: 12px;\n}"
|
|
12002
|
+
},
|
|
12003
|
+
{
|
|
12004
|
+
"kind": "gallery",
|
|
12005
|
+
"label": "Default",
|
|
12006
|
+
"section": "Presets",
|
|
12007
|
+
"description": "Default Presets example for c2-code-editor.",
|
|
12008
|
+
"isDefault": true,
|
|
12009
|
+
"tags": [
|
|
12010
|
+
"c2-code-editor"
|
|
12011
|
+
],
|
|
12012
|
+
"html": "<c2-code-editor\n language=\"javascript\"\n line-numbers\n value=\"// The default palette, on the default surface.\nexport function debounce(fn, wait = 200) {\n let timer\n return (...args) => {\n clearTimeout(timer)\n timer = setTimeout(() => fn(...args), wait)\n }\n}\"\n></c2-code-editor>"
|
|
12013
|
+
},
|
|
12014
|
+
{
|
|
12015
|
+
"kind": "gallery",
|
|
12016
|
+
"label": "Midnight",
|
|
12017
|
+
"section": "Presets",
|
|
12018
|
+
"description": "Midnight Presets example for c2-code-editor.",
|
|
12019
|
+
"isDefault": false,
|
|
12020
|
+
"tags": [
|
|
12021
|
+
"c2-code-editor"
|
|
12022
|
+
],
|
|
12023
|
+
"html": "<c2-code-editor\n class=\"midnight\"\n language=\"javascript\"\n line-numbers\n value=\"// Dark is a different set of variable values — no JavaScript theme.\nconst palette = {\n keyword: '#ff7b72',\n string: '#a5d6ff',\n comment: '#8b949e',\n}\nexport default palette\"\n></c2-code-editor>",
|
|
12024
|
+
"css": ".midnight {\n --c2-code-editor--background: #0d1117;\n --c2-code-editor--color: #c9d1d9;\n --c2-code-editor--border: 1px solid #30363d;\n --c2-code-editor__gutter--color: #6e7681;\n --c2-code-editor__gutter--border-right: 1px solid #21262d;\n --c2-code-editor__gutter__active--color: #c9d1d9;\n --c2-code-editor__active-line--background: rgba(110, 118, 129, 0.1);\n --c2-code-editor__selection--background: rgba(56, 139, 253, 0.3);\n --c2-code-editor__cursor--color: #c9d1d9;\n --c2-code-editor__theme--token-keyword: #ff7b72;\n --c2-code-editor__theme--token-string: #a5d6ff;\n --c2-code-editor__theme--token-comment: #8b949e;\n --c2-code-editor__theme--token-constant: #79c0ff;\n --c2-code-editor__theme--token-function: #d2a8ff;\n --c2-code-editor__theme--token-variable: #c9d1d9;\n --c2-code-editor__theme--token-punctuation: #c9d1d9;\n}"
|
|
12025
|
+
},
|
|
12026
|
+
{
|
|
12027
|
+
"kind": "gallery",
|
|
12028
|
+
"label": "Terminal",
|
|
12029
|
+
"section": "Presets",
|
|
12030
|
+
"description": "Terminal Presets example for c2-code-editor.",
|
|
12031
|
+
"isDefault": false,
|
|
12032
|
+
"tags": [
|
|
12033
|
+
"c2-code-editor"
|
|
12034
|
+
],
|
|
12035
|
+
"html": "<c2-code-editor\n class=\"terminal\"\n language=\"javascript\"\n line-numbers\n value=\"const log = (msg) => process.stdout.write(`${msg}\\n`)\n\n// Green on near-black, the way a terminal reads.\nfor (const step of ['build', 'test', 'deploy']) {\n log(`→ ${step}`)\n}\"\n></c2-code-editor>",
|
|
12036
|
+
"css": ".terminal {\n --c2-code-editor--background: #10100e;\n --c2-code-editor--color: #d8d8c0;\n --c2-code-editor--border: 1px solid #2c2c26;\n --c2-code-editor--border-radius: 4px;\n --c2-code-editor--font-size: 12px;\n --c2-code-editor__gutter--color: #55554a;\n --c2-code-editor__gutter--border-right: 1px solid #2c2c26;\n --c2-code-editor__gutter__active--color: #d8d8c0;\n --c2-code-editor__cursor--color: #8fc46b;\n --c2-code-editor__active-line--background: rgba(143, 196, 107, 0.07);\n --c2-code-editor__theme--token-keyword: #8fc46b;\n --c2-code-editor__theme--token-string: #e6c384;\n --c2-code-editor__theme--token-comment: #6a6a5a;\n --c2-code-editor__theme--token-constant: #7fb4ca;\n --c2-code-editor__theme--token-function: #e6c384;\n --c2-code-editor__theme--token-variable: #d8d8c0;\n --c2-code-editor__theme--token-punctuation: #938f79;\n}"
|
|
12037
|
+
},
|
|
12038
|
+
{
|
|
12039
|
+
"kind": "gallery",
|
|
12040
|
+
"label": "Borderless",
|
|
12041
|
+
"section": "Presets",
|
|
12042
|
+
"description": "Borderless Presets example for c2-code-editor.",
|
|
12043
|
+
"isDefault": false,
|
|
12044
|
+
"tags": [
|
|
12045
|
+
"c2-code-editor"
|
|
12046
|
+
],
|
|
12047
|
+
"html": "<c2-code-editor\n class=\"borderless\"\n language=\"css\"\n value=\".card {\n border-radius: 10px;\n padding: 16px;\n background: var(--surface);\n box-shadow: 0 8px 24px rgb(24 24 27 / 8%);\n}\"\n></c2-code-editor>",
|
|
12048
|
+
"css": ".borderless {\n --c2-code-editor--border: 1px solid transparent;\n --c2-code-editor--background: #f8f8f8;\n --c2-code-editor--border-radius: 10px;\n --c2-code-editor--min-height: 96px;\n --c2-code-editor__active-line--background: transparent;\n}"
|
|
12049
|
+
},
|
|
12050
|
+
{
|
|
12051
|
+
"kind": "gallery",
|
|
12052
|
+
"label": "Dense",
|
|
12053
|
+
"section": "Presets",
|
|
12054
|
+
"description": "Dense Presets example for c2-code-editor.",
|
|
12055
|
+
"isDefault": false,
|
|
12056
|
+
"tags": [
|
|
12057
|
+
"c2-code-editor"
|
|
12058
|
+
],
|
|
12059
|
+
"html": "<c2-code-editor\n class=\"dense\"\n language=\"json\"\n line-numbers\n value='{\n \"name\": \"@c2n/code-editor\",\n \"engine\": \"codemirror\",\n \"dense\": true,\n \"rows\": 24\n}'\n></c2-code-editor>",
|
|
12060
|
+
"css": ".dense {\n --c2-code-editor--font-size: 11px;\n --c2-code-editor--line-height: 1.4;\n --c2-code-editor--min-height: 84px;\n --c2-code-editor--padding-block: 6px;\n --c2-code-editor--padding-inline: 8px;\n --c2-code-editor--border-radius: 4px;\n --c2-code-editor__gutter--min-width: 24px;\n}"
|
|
12061
|
+
},
|
|
12062
|
+
{
|
|
12063
|
+
"kind": "gallery",
|
|
12064
|
+
"label": "Accented frame",
|
|
12065
|
+
"section": "Presets",
|
|
12066
|
+
"description": "Accented frame Presets example for c2-code-editor.",
|
|
12067
|
+
"isDefault": false,
|
|
12068
|
+
"tags": [
|
|
12069
|
+
"c2-code-editor"
|
|
12070
|
+
],
|
|
12071
|
+
"html": "<c2-code-editor\n class=\"accented\"\n language=\"html\"\n line-numbers\n value=\"<form>\n <c2-text-field name="title" label="Title"></c2-text-field>\n <c2-button type="submit">Save</c2-button>\n</form>\"\n></c2-code-editor>",
|
|
12072
|
+
"css": ".accented {\n --c2-code-editor--border: 1px solid #0265dc;\n --c2-code-editor--border-radius: 8px;\n --c2-code-editor--box-shadow: 0 0 0 4px rgba(2, 101, 220, 0.08);\n --c2-code-editor__gutter--background: rgba(2, 101, 220, 0.04);\n --c2-code-editor__gutter--border-right: 1px solid rgba(2, 101, 220, 0.16);\n}"
|
|
12073
|
+
},
|
|
12074
|
+
{
|
|
12075
|
+
"kind": "preview",
|
|
12076
|
+
"label": "Preview",
|
|
12077
|
+
"html": "<c2-code-editor style=\"width:300px;--c2-code-editor--min-height:132px;--c2-code-editor--font-size:12px\" language=\"javascript\" line-numbers aria-label=\"Example editor\" value=\"const greet = (name) =>\n `hello ${name}`\n\n// editable, highlighted\ngreet('world')\"></c2-code-editor>"
|
|
12078
|
+
}
|
|
12079
|
+
],
|
|
12080
|
+
"hasGallery": true
|
|
12081
|
+
},
|
|
10982
12082
|
"code-viewer": {
|
|
10983
12083
|
"id": "code-viewer",
|
|
10984
12084
|
"package": "@c2n/code-viewer",
|
|
@@ -15848,7 +16948,9 @@
|
|
|
15848
16948
|
],
|
|
15849
16949
|
"composition": {
|
|
15850
16950
|
"internal": [],
|
|
15851
|
-
"slotted": [
|
|
16951
|
+
"slotted": [
|
|
16952
|
+
"c2-chart-series"
|
|
16953
|
+
],
|
|
15852
16954
|
"usedBy": []
|
|
15853
16955
|
},
|
|
15854
16956
|
"install": {
|
|
@@ -18496,8 +19598,20 @@
|
|
|
18496
19598
|
],
|
|
18497
19599
|
"composition": {
|
|
18498
19600
|
"internal": [],
|
|
18499
|
-
"slotted": [
|
|
18500
|
-
|
|
19601
|
+
"slotted": [
|
|
19602
|
+
"c2-chart-series"
|
|
19603
|
+
],
|
|
19604
|
+
"usedBy": [
|
|
19605
|
+
"c2-line-chart",
|
|
19606
|
+
"c2-area-chart",
|
|
19607
|
+
"c2-bar-chart",
|
|
19608
|
+
"c2-sparkline",
|
|
19609
|
+
"c2-pie-chart",
|
|
19610
|
+
"c2-gauge-chart",
|
|
19611
|
+
"c2-radar-chart",
|
|
19612
|
+
"c2-scatter-chart",
|
|
19613
|
+
"c2-candlestick-chart"
|
|
19614
|
+
]
|
|
18501
19615
|
},
|
|
18502
19616
|
"install": {
|
|
18503
19617
|
"npm": "npm install @c2n/chart @c2n/theme",
|
|
@@ -27962,7 +29076,9 @@
|
|
|
27962
29076
|
],
|
|
27963
29077
|
"composition": {
|
|
27964
29078
|
"internal": [],
|
|
27965
|
-
"slotted": [
|
|
29079
|
+
"slotted": [
|
|
29080
|
+
"c2-chart-series"
|
|
29081
|
+
],
|
|
27966
29082
|
"usedBy": []
|
|
27967
29083
|
},
|
|
27968
29084
|
"install": {
|
|
@@ -30152,7 +31268,9 @@
|
|
|
30152
31268
|
],
|
|
30153
31269
|
"composition": {
|
|
30154
31270
|
"internal": [],
|
|
30155
|
-
"slotted": [
|
|
31271
|
+
"slotted": [
|
|
31272
|
+
"c2-chart-series"
|
|
31273
|
+
],
|
|
30156
31274
|
"usedBy": []
|
|
30157
31275
|
},
|
|
30158
31276
|
"install": {
|
|
@@ -32432,7 +33550,9 @@
|
|
|
32432
33550
|
],
|
|
32433
33551
|
"composition": {
|
|
32434
33552
|
"internal": [],
|
|
32435
|
-
"slotted": [
|
|
33553
|
+
"slotted": [
|
|
33554
|
+
"c2-chart-series"
|
|
33555
|
+
],
|
|
32436
33556
|
"usedBy": []
|
|
32437
33557
|
},
|
|
32438
33558
|
"install": {
|
|
@@ -37066,7 +38186,9 @@
|
|
|
37066
38186
|
],
|
|
37067
38187
|
"composition": {
|
|
37068
38188
|
"internal": [],
|
|
37069
|
-
"slotted": [
|
|
38189
|
+
"slotted": [
|
|
38190
|
+
"c2-chart-series"
|
|
38191
|
+
],
|
|
37070
38192
|
"usedBy": []
|
|
37071
38193
|
},
|
|
37072
38194
|
"install": {
|
|
@@ -38429,6 +39551,878 @@
|
|
|
38429
39551
|
],
|
|
38430
39552
|
"hasGallery": true
|
|
38431
39553
|
},
|
|
39554
|
+
"steps": {
|
|
39555
|
+
"id": "steps",
|
|
39556
|
+
"package": "@c2n/steps",
|
|
39557
|
+
"title": "Steps",
|
|
39558
|
+
"description": "A vertical trace of a task as it runs: statuses, durations, and stages that open while they work and close when they are done.",
|
|
39559
|
+
"intro": "`c2-steps` is a vertical list of `c2-step` rows. Each row is a marker, a label, an optional dimmed `detail` beside",
|
|
39560
|
+
"category": "Data display",
|
|
39561
|
+
"status": "stable",
|
|
39562
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/steps",
|
|
39563
|
+
"elements": [
|
|
39564
|
+
{
|
|
39565
|
+
"tag": "c2-steps",
|
|
39566
|
+
"className": "Steps",
|
|
39567
|
+
"modulePath": "@c2n/steps",
|
|
39568
|
+
"description": "A vertical list of steps: the trace of a task as it runs, or a wizard's progress. Each row is a marker, a label,\nan optional dimmed `detail` beside it and `trailing` text at the end — a duration, a count, a timestamp.\n\n**A step with sub-steps is a group**, and a group is a disclosure: its own row is the summary and its sub-steps\nare the detail. **Every step is a row, and every row is visible** — a group starts expanded and nothing ever\nfolds one away on its own. The chevron is there for the reader, `collapsed` in the markup starts a stage folded,\nand the run only ever brings a folded stage *back* into view when it starts running or something in it fails.\n\nAuthor it either way, and mix them freely:\n\n- **Declarative** — slot `c2-step` children and nest them for sub-steps.\n- **Data-driven** — hand it a `steps` array of `{ id, label, detail, trailing, status, children }` and it renders\n the tree itself. The array wins when both are present. During a run, `updateStep(id, patch)` changes one step\n without rebuilding the array.\n\nEverything the markup fills with a slot, the data-driven mode fills with a renderer: `renderMarker` for the\n`marker` slot, `renderToggle` for `toggle`, `renderLabel` / `renderDetail` / `renderTrailing` for the text, and\n`renderItem` for that text all at once. Each is handed the node, its depth, its position, its dotted path and\nthe status actually in effect.\n\nA parent step that does not author a `status` takes one from its children: the most urgent thing inside wins, so\na stage reports that it is running, or that something under it failed, without you setting it.\n\n`current` is the shortcut a wizard wants: set it to the index of the active step and every top-level step that\nhas neither an explicit `status` nor sub-steps becomes `success` before it, `current` at it and `pending` after.\n\nA step that arrives while the list is already on screen grows into place rather than appearing, and a marker\ngives one beat as its status settles — which is what a trace being written in front of you should look like.\n`--c2-step--enter-duration: 0s` turns the first off, and `prefers-reduced-motion` turns both off.\n\nThe connector rail between markers is drawn by CSS and off by default, because a trace does not want one — give\n`--c2-step__rail--width` a width and a stepper gets its rail.\n\nNumbering follows the tree: `marker=\"number\"` draws a dotted path, so the first child of the third step reads\n`3.1` rather than a second `1`.",
|
|
39569
|
+
"attributes": [
|
|
39570
|
+
{
|
|
39571
|
+
"name": "marker",
|
|
39572
|
+
"type": "StepsMarker",
|
|
39573
|
+
"default": "'icon'",
|
|
39574
|
+
"description": "How each marker is drawn: a status glyph, the step's number, or nothing."
|
|
39575
|
+
},
|
|
39576
|
+
{
|
|
39577
|
+
"name": "current",
|
|
39578
|
+
"type": "number",
|
|
39579
|
+
"default": "-1",
|
|
39580
|
+
"description": "Index of the active step, for a wizard. `-1` (the default) leaves every status alone; otherwise a top-level\nstep with neither an explicit `status` nor sub-steps becomes `success` before this index, `current` at it and\n`pending` after it."
|
|
39581
|
+
},
|
|
39582
|
+
{
|
|
39583
|
+
"name": "steps",
|
|
39584
|
+
"type": "StepNode[] | undefined",
|
|
39585
|
+
"default": "undefined",
|
|
39586
|
+
"description": "The steps as data, instead of `c2-step` children. Takes precedence over the slot."
|
|
39587
|
+
},
|
|
39588
|
+
{
|
|
39589
|
+
"name": "aria-label",
|
|
39590
|
+
"type": "string | null",
|
|
39591
|
+
"default": "null",
|
|
39592
|
+
"description": "Accessible name for the list."
|
|
39593
|
+
}
|
|
39594
|
+
],
|
|
39595
|
+
"slots": [
|
|
39596
|
+
{
|
|
39597
|
+
"name": "",
|
|
39598
|
+
"description": "The `c2-step` children. Ignored when `steps` is set."
|
|
39599
|
+
}
|
|
39600
|
+
],
|
|
39601
|
+
"events": [
|
|
39602
|
+
{
|
|
39603
|
+
"name": "step-toggle",
|
|
39604
|
+
"type": "CustomEvent<StepToggleEventDetail>",
|
|
39605
|
+
"description": "Fired by a `c2-step` when a group opens or closes, and bubbling to here. `event.target` is the step; `detail.path` says where it sits."
|
|
39606
|
+
}
|
|
39607
|
+
],
|
|
39608
|
+
"cssParts": [],
|
|
39609
|
+
"cssProperties": [
|
|
39610
|
+
{
|
|
39611
|
+
"name": "--c2-steps--gap",
|
|
39612
|
+
"type": "pixel",
|
|
39613
|
+
"default": "0px",
|
|
39614
|
+
"part": "",
|
|
39615
|
+
"property": "gap",
|
|
39616
|
+
"description": "Space between rows. A stepper usually wants some; a trace does not."
|
|
39617
|
+
},
|
|
39618
|
+
{
|
|
39619
|
+
"name": "--c2-steps--background",
|
|
39620
|
+
"type": "color",
|
|
39621
|
+
"part": "",
|
|
39622
|
+
"property": "background"
|
|
39623
|
+
},
|
|
39624
|
+
{
|
|
39625
|
+
"name": "--c2-steps--border",
|
|
39626
|
+
"type": "border",
|
|
39627
|
+
"part": "",
|
|
39628
|
+
"property": "border"
|
|
39629
|
+
},
|
|
39630
|
+
{
|
|
39631
|
+
"name": "--c2-steps--border-radius",
|
|
39632
|
+
"type": "border-radius",
|
|
39633
|
+
"part": "",
|
|
39634
|
+
"property": "border-radius"
|
|
39635
|
+
},
|
|
39636
|
+
{
|
|
39637
|
+
"name": "--c2-steps--padding-block",
|
|
39638
|
+
"type": "padding",
|
|
39639
|
+
"default": "0px",
|
|
39640
|
+
"part": "",
|
|
39641
|
+
"property": "padding-block"
|
|
39642
|
+
},
|
|
39643
|
+
{
|
|
39644
|
+
"name": "--c2-steps--padding-inline",
|
|
39645
|
+
"type": "padding",
|
|
39646
|
+
"default": "0px",
|
|
39647
|
+
"part": "",
|
|
39648
|
+
"property": "padding-inline"
|
|
39649
|
+
},
|
|
39650
|
+
{
|
|
39651
|
+
"name": "--c2-steps--overflow-y",
|
|
39652
|
+
"type": "overflow",
|
|
39653
|
+
"default": "visible",
|
|
39654
|
+
"part": "",
|
|
39655
|
+
"property": "overflow-y",
|
|
39656
|
+
"description": "`auto` with a `max-height` keeps a long run in its own scroller."
|
|
39657
|
+
},
|
|
39658
|
+
{
|
|
39659
|
+
"name": "--c2-steps--max-height",
|
|
39660
|
+
"type": "max-height",
|
|
39661
|
+
"default": "none",
|
|
39662
|
+
"part": "",
|
|
39663
|
+
"property": "max-height"
|
|
39664
|
+
}
|
|
39665
|
+
]
|
|
39666
|
+
},
|
|
39667
|
+
{
|
|
39668
|
+
"tag": "c2-step",
|
|
39669
|
+
"className": "Step",
|
|
39670
|
+
"modulePath": "@c2n/steps/step.js",
|
|
39671
|
+
"description": "One row of a Steps list: a marker, a label with optional dimmed `detail`, and `trailing` text at the end\nof the row — a duration, a count, a timestamp.\n\n**A step with sub-steps is a group.** Nest `c2-step` children and the row becomes the summary of a disclosure\nand the children its detail, so a long run collapses to the shape of the task rather than to a wall of lines.\nThere is no second element to learn: the same tag is a leaf or a group depending on what is inside it.\n\n**Every step is a row, and every row is visible.** A group starts expanded and nothing ever folds one away on\nits own: the chevron is there for the reader, and `collapsed` in the markup starts a stage folded. The run only\never brings a stage *back* into view — a folded one reopens when it starts running (`running`, `current`) or\nwhen something in it goes wrong (`error`, `warning`).\n\n**A step is one row.** Label, detail and trailing text sit on a single line and truncate with an ellipsis rather\nthan wrapping, so a hundred-step trace stays scannable, and a sub-step is indented far enough that its marker\nlands under its parent's label. `--c2-step__text--flex-direction: column` still stacks the detail under the\nlabel, which a wizard's descriptions want — that is two lines on purpose, and each of them is still one line.\n\nThe step never sets its own depth, position or marker mode: the parent `c2-steps` writes them on every pass, so\na step used on its own renders as a single root-level row.",
|
|
39672
|
+
"attributes": [
|
|
39673
|
+
{
|
|
39674
|
+
"name": "status",
|
|
39675
|
+
"type": "StepStatus",
|
|
39676
|
+
"default": "'pending'",
|
|
39677
|
+
"description": "State of the step. Drives the marker glyph and the accent colour, and reopens a folded group."
|
|
39678
|
+
},
|
|
39679
|
+
{
|
|
39680
|
+
"name": "label",
|
|
39681
|
+
"type": "string",
|
|
39682
|
+
"default": "''",
|
|
39683
|
+
"description": "Primary text, when the `label` slot is empty."
|
|
39684
|
+
},
|
|
39685
|
+
{
|
|
39686
|
+
"name": "detail",
|
|
39687
|
+
"type": "string",
|
|
39688
|
+
"default": "''",
|
|
39689
|
+
"description": "Dimmed secondary text beside the label, when the `detail` slot is empty."
|
|
39690
|
+
},
|
|
39691
|
+
{
|
|
39692
|
+
"name": "trailing",
|
|
39693
|
+
"type": "string",
|
|
39694
|
+
"default": "''",
|
|
39695
|
+
"description": "Text at the end of the row, when the `trailing` slot is empty."
|
|
39696
|
+
},
|
|
39697
|
+
{
|
|
39698
|
+
"name": "collapsed",
|
|
39699
|
+
"type": "boolean",
|
|
39700
|
+
"default": "false",
|
|
39701
|
+
"description": "Whether this group is folded away. A group is expanded by default — every step in the list is a row you can\nsee — and only the reader, the markup or a reopening status ever changes that."
|
|
39702
|
+
}
|
|
39703
|
+
],
|
|
39704
|
+
"slots": [
|
|
39705
|
+
{
|
|
39706
|
+
"name": "",
|
|
39707
|
+
"description": "Sub-steps. A step that has them is a group."
|
|
39708
|
+
},
|
|
39709
|
+
{
|
|
39710
|
+
"name": "label",
|
|
39711
|
+
"description": "Primary text. Falls back to the `label` attribute."
|
|
39712
|
+
},
|
|
39713
|
+
{
|
|
39714
|
+
"name": "detail",
|
|
39715
|
+
"description": "Secondary text beside the label. Falls back to the `detail` attribute."
|
|
39716
|
+
},
|
|
39717
|
+
{
|
|
39718
|
+
"name": "trailing",
|
|
39719
|
+
"description": "Content at the end of the row. Falls back to the `trailing` attribute."
|
|
39720
|
+
},
|
|
39721
|
+
{
|
|
39722
|
+
"name": "marker",
|
|
39723
|
+
"description": "Replaces the whole marker: a custom icon, an avatar, a number of your own."
|
|
39724
|
+
},
|
|
39725
|
+
{
|
|
39726
|
+
"name": "toggle",
|
|
39727
|
+
"description": "A disclosure affordance of your own — a chevron, a caret. Empty by default: a trace is a list of rows, and the row is already clickable. It is filled per step, so give a leaf an empty `<span slot=\"toggle\"></span>` to keep its rows lined up with the groups above them."
|
|
39728
|
+
}
|
|
39729
|
+
],
|
|
39730
|
+
"events": [
|
|
39731
|
+
{
|
|
39732
|
+
"name": "step-toggle",
|
|
39733
|
+
"type": "CustomEvent<StepToggleEventDetail>",
|
|
39734
|
+
"description": "A group was folded away or brought back. Bubbles."
|
|
39735
|
+
}
|
|
39736
|
+
],
|
|
39737
|
+
"cssParts": [
|
|
39738
|
+
{
|
|
39739
|
+
"name": "frame",
|
|
39740
|
+
"description": "The box around the whole step, which is what grows when a new step arrives."
|
|
39741
|
+
},
|
|
39742
|
+
{
|
|
39743
|
+
"name": "row",
|
|
39744
|
+
"description": "The row itself: toggle, marker, text and trailing content. A group's row is its `<summary>`."
|
|
39745
|
+
},
|
|
39746
|
+
{
|
|
39747
|
+
"name": "toggle",
|
|
39748
|
+
"description": "The disclosure chevron of a group."
|
|
39749
|
+
},
|
|
39750
|
+
{
|
|
39751
|
+
"name": "marker",
|
|
39752
|
+
"description": "The round marker at the start of the row."
|
|
39753
|
+
},
|
|
39754
|
+
{
|
|
39755
|
+
"name": "rail",
|
|
39756
|
+
"description": "The connector between this marker and the next."
|
|
39757
|
+
},
|
|
39758
|
+
{
|
|
39759
|
+
"name": "label",
|
|
39760
|
+
"description": "The primary text."
|
|
39761
|
+
},
|
|
39762
|
+
{
|
|
39763
|
+
"name": "detail",
|
|
39764
|
+
"description": "The dimmed secondary text."
|
|
39765
|
+
},
|
|
39766
|
+
{
|
|
39767
|
+
"name": "trailing",
|
|
39768
|
+
"description": "The text at the end of the row."
|
|
39769
|
+
},
|
|
39770
|
+
{
|
|
39771
|
+
"name": "children",
|
|
39772
|
+
"description": "The box holding the sub-steps."
|
|
39773
|
+
}
|
|
39774
|
+
],
|
|
39775
|
+
"cssProperties": [
|
|
39776
|
+
{
|
|
39777
|
+
"name": "--c2-step__row--gap",
|
|
39778
|
+
"type": "pixel",
|
|
39779
|
+
"default": "10px",
|
|
39780
|
+
"part": "row",
|
|
39781
|
+
"property": "gap",
|
|
39782
|
+
"description": "Space between the marker, the text and the trailing content."
|
|
39783
|
+
},
|
|
39784
|
+
{
|
|
39785
|
+
"name": "--c2-step__row--padding-block",
|
|
39786
|
+
"type": "padding",
|
|
39787
|
+
"default": "7px",
|
|
39788
|
+
"part": "row",
|
|
39789
|
+
"property": "padding-block"
|
|
39790
|
+
},
|
|
39791
|
+
{
|
|
39792
|
+
"name": "--c2-step__row--padding-inline",
|
|
39793
|
+
"type": "padding",
|
|
39794
|
+
"default": "12px",
|
|
39795
|
+
"part": "row",
|
|
39796
|
+
"property": "padding-inline"
|
|
39797
|
+
},
|
|
39798
|
+
{
|
|
39799
|
+
"name": "--c2-step__row--indent",
|
|
39800
|
+
"type": "pixel",
|
|
39801
|
+
"default": "marker size + row gap",
|
|
39802
|
+
"part": "row",
|
|
39803
|
+
"property": "indent",
|
|
39804
|
+
"description": "Extra inset per level of nesting. The default puts a sub-step's marker under its parent's label, which is what makes the nesting read without drawing anything."
|
|
39805
|
+
},
|
|
39806
|
+
{
|
|
39807
|
+
"name": "--c2-step__row--border-radius",
|
|
39808
|
+
"type": "border-radius",
|
|
39809
|
+
"part": "row",
|
|
39810
|
+
"property": "border-radius"
|
|
39811
|
+
},
|
|
39812
|
+
{
|
|
39813
|
+
"name": "--c2-step__row--background",
|
|
39814
|
+
"type": "color",
|
|
39815
|
+
"part": "row",
|
|
39816
|
+
"property": "background"
|
|
39817
|
+
},
|
|
39818
|
+
{
|
|
39819
|
+
"name": "--c2-step__row__hover--background",
|
|
39820
|
+
"type": "color",
|
|
39821
|
+
"part": "row",
|
|
39822
|
+
"state": "hover",
|
|
39823
|
+
"property": "background",
|
|
39824
|
+
"description": "Set it to make the rows respond to the pointer."
|
|
39825
|
+
},
|
|
39826
|
+
{
|
|
39827
|
+
"name": "--c2-step__row--border-bottom",
|
|
39828
|
+
"type": "border",
|
|
39829
|
+
"default": "1px solid #e4e4e7",
|
|
39830
|
+
"part": "row",
|
|
39831
|
+
"property": "border-bottom",
|
|
39832
|
+
"token": "--c2-theme--color-outline-variant",
|
|
39833
|
+
"description": "The hairline under each row."
|
|
39834
|
+
},
|
|
39835
|
+
{
|
|
39836
|
+
"name": "--c2-step__row--outline",
|
|
39837
|
+
"type": "border",
|
|
39838
|
+
"default": "2px solid rgb(2, 101, 220)",
|
|
39839
|
+
"part": "row",
|
|
39840
|
+
"property": "outline",
|
|
39841
|
+
"description": "Focus ring of a group's row, which is a button."
|
|
39842
|
+
},
|
|
39843
|
+
{
|
|
39844
|
+
"name": "--c2-step__toggle--size",
|
|
39845
|
+
"type": "pixel",
|
|
39846
|
+
"default": "14px",
|
|
39847
|
+
"part": "toggle",
|
|
39848
|
+
"property": "size",
|
|
39849
|
+
"description": "Width of the `toggle` slot's column, when it is filled."
|
|
39850
|
+
},
|
|
39851
|
+
{
|
|
39852
|
+
"name": "--c2-step__toggle--gap",
|
|
39853
|
+
"type": "pixel",
|
|
39854
|
+
"default": "4px",
|
|
39855
|
+
"part": "toggle",
|
|
39856
|
+
"property": "gap",
|
|
39857
|
+
"description": "Space between that column and the marker."
|
|
39858
|
+
},
|
|
39859
|
+
{
|
|
39860
|
+
"name": "--c2-step__toggle--color",
|
|
39861
|
+
"type": "color",
|
|
39862
|
+
"default": "#a1a1aa",
|
|
39863
|
+
"part": "toggle",
|
|
39864
|
+
"property": "color",
|
|
39865
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
39866
|
+
},
|
|
39867
|
+
{
|
|
39868
|
+
"name": "--c2-step__guide--color",
|
|
39869
|
+
"type": "color",
|
|
39870
|
+
"default": "#e4e4e7",
|
|
39871
|
+
"part": "guide",
|
|
39872
|
+
"property": "color",
|
|
39873
|
+
"token": "--c2-theme--color-outline-variant",
|
|
39874
|
+
"description": "A vertical rule at each ancestor's depth, for a file-tree look. Off by default."
|
|
39875
|
+
},
|
|
39876
|
+
{
|
|
39877
|
+
"name": "--c2-step__guide--width",
|
|
39878
|
+
"type": "pixel",
|
|
39879
|
+
"default": "0px",
|
|
39880
|
+
"part": "guide",
|
|
39881
|
+
"property": "width",
|
|
39882
|
+
"description": "Width of that rule. `1px` turns the guides on."
|
|
39883
|
+
},
|
|
39884
|
+
{
|
|
39885
|
+
"name": "--c2-step__marker--size",
|
|
39886
|
+
"type": "pixel",
|
|
39887
|
+
"default": "16px",
|
|
39888
|
+
"part": "marker",
|
|
39889
|
+
"property": "size"
|
|
39890
|
+
},
|
|
39891
|
+
{
|
|
39892
|
+
"name": "--c2-step__marker--font-size",
|
|
39893
|
+
"type": "font-size",
|
|
39894
|
+
"default": "10px",
|
|
39895
|
+
"part": "marker",
|
|
39896
|
+
"property": "font-size",
|
|
39897
|
+
"description": "Size of the dotted path in `marker=\"number\"`."
|
|
39898
|
+
},
|
|
39899
|
+
{
|
|
39900
|
+
"name": "--c2-step__marker--padding-inline",
|
|
39901
|
+
"type": "padding",
|
|
39902
|
+
"default": "3px",
|
|
39903
|
+
"part": "marker",
|
|
39904
|
+
"property": "padding-inline",
|
|
39905
|
+
"description": "Breathing room either side of a dotted path, which is what turns the circle into a pill when the number is long. Only `marker=\"number\"` uses it."
|
|
39906
|
+
},
|
|
39907
|
+
{
|
|
39908
|
+
"name": "--c2-step__marker--font-weight",
|
|
39909
|
+
"type": "font-weight",
|
|
39910
|
+
"default": "600",
|
|
39911
|
+
"part": "marker",
|
|
39912
|
+
"property": "font-weight",
|
|
39913
|
+
"token": "--c2-theme--font-weight-semibold"
|
|
39914
|
+
},
|
|
39915
|
+
{
|
|
39916
|
+
"name": "--c2-step__marker--border-radius",
|
|
39917
|
+
"type": "border-radius",
|
|
39918
|
+
"default": "999px",
|
|
39919
|
+
"part": "marker",
|
|
39920
|
+
"property": "border-radius",
|
|
39921
|
+
"token": "--c2-theme--radius-full"
|
|
39922
|
+
},
|
|
39923
|
+
{
|
|
39924
|
+
"name": "--c2-step__marker--border",
|
|
39925
|
+
"type": "border",
|
|
39926
|
+
"default": "1px solid #bcbcc6",
|
|
39927
|
+
"part": "marker",
|
|
39928
|
+
"property": "border",
|
|
39929
|
+
"token": "--c2-theme--border",
|
|
39930
|
+
"description": "The ring, drawn for the states that have no glyph of their own (`pending`, `current`, `running`) and for every `marker=\"number\"` step. A finished step is its glyph, so it has no ring."
|
|
39931
|
+
},
|
|
39932
|
+
{
|
|
39933
|
+
"name": "--c2-step__marker--background",
|
|
39934
|
+
"type": "color",
|
|
39935
|
+
"default": "transparent",
|
|
39936
|
+
"part": "marker",
|
|
39937
|
+
"property": "background"
|
|
39938
|
+
},
|
|
39939
|
+
{
|
|
39940
|
+
"name": "--c2-step__marker--color",
|
|
39941
|
+
"type": "color",
|
|
39942
|
+
"default": "#71717a",
|
|
39943
|
+
"part": "marker",
|
|
39944
|
+
"property": "color",
|
|
39945
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
39946
|
+
},
|
|
39947
|
+
{
|
|
39948
|
+
"name": "--c2-step__rail--width",
|
|
39949
|
+
"type": "pixel",
|
|
39950
|
+
"default": "0px",
|
|
39951
|
+
"part": "rail",
|
|
39952
|
+
"property": "width",
|
|
39953
|
+
"description": "Width of the connector. `0px` is the trace look; `2px` gives a stepper its rail."
|
|
39954
|
+
},
|
|
39955
|
+
{
|
|
39956
|
+
"name": "--c2-step__rail--color",
|
|
39957
|
+
"type": "color",
|
|
39958
|
+
"default": "#e4e4e7",
|
|
39959
|
+
"part": "rail",
|
|
39960
|
+
"property": "color",
|
|
39961
|
+
"token": "--c2-theme--color-outline-variant"
|
|
39962
|
+
},
|
|
39963
|
+
{
|
|
39964
|
+
"name": "--c2-step__rail--gap",
|
|
39965
|
+
"type": "pixel",
|
|
39966
|
+
"default": "4px",
|
|
39967
|
+
"part": "rail",
|
|
39968
|
+
"property": "gap",
|
|
39969
|
+
"description": "Space between the marker and the rail."
|
|
39970
|
+
},
|
|
39971
|
+
{
|
|
39972
|
+
"name": "--c2-step__label--color",
|
|
39973
|
+
"type": "color",
|
|
39974
|
+
"default": "#18181b",
|
|
39975
|
+
"part": "label",
|
|
39976
|
+
"property": "color",
|
|
39977
|
+
"token": "--c2-theme--color-on-surface"
|
|
39978
|
+
},
|
|
39979
|
+
{
|
|
39980
|
+
"name": "--c2-step__label--font-size",
|
|
39981
|
+
"type": "font-size",
|
|
39982
|
+
"default": "13px",
|
|
39983
|
+
"part": "label",
|
|
39984
|
+
"property": "font-size"
|
|
39985
|
+
},
|
|
39986
|
+
{
|
|
39987
|
+
"name": "--c2-step__label--font-weight",
|
|
39988
|
+
"type": "font-weight",
|
|
39989
|
+
"default": "500",
|
|
39990
|
+
"part": "label",
|
|
39991
|
+
"property": "font-weight",
|
|
39992
|
+
"token": "--c2-theme--font-weight-medium"
|
|
39993
|
+
},
|
|
39994
|
+
{
|
|
39995
|
+
"name": "--c2-step__label--font-family",
|
|
39996
|
+
"type": "font-family",
|
|
39997
|
+
"default": "ui-monospace, SFMono-Regular, Menlo, Consolas, monospace",
|
|
39998
|
+
"part": "label",
|
|
39999
|
+
"property": "font-family",
|
|
40000
|
+
"token": "--c2-theme--font-family"
|
|
40001
|
+
},
|
|
40002
|
+
{
|
|
40003
|
+
"name": "--c2-step__detail--color",
|
|
40004
|
+
"type": "color",
|
|
40005
|
+
"default": "#71717a",
|
|
40006
|
+
"part": "detail",
|
|
40007
|
+
"property": "color",
|
|
40008
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
40009
|
+
},
|
|
40010
|
+
{
|
|
40011
|
+
"name": "--c2-step__detail--font-size",
|
|
40012
|
+
"type": "font-size",
|
|
40013
|
+
"part": "detail",
|
|
40014
|
+
"property": "font-size",
|
|
40015
|
+
"description": "Falls back to the label size."
|
|
40016
|
+
},
|
|
40017
|
+
{
|
|
40018
|
+
"name": "--c2-step__detail--font-weight",
|
|
40019
|
+
"type": "font-weight",
|
|
40020
|
+
"default": "400",
|
|
40021
|
+
"part": "detail",
|
|
40022
|
+
"property": "font-weight"
|
|
40023
|
+
},
|
|
40024
|
+
{
|
|
40025
|
+
"name": "--c2-step__detail--gap",
|
|
40026
|
+
"type": "pixel",
|
|
40027
|
+
"default": "8px",
|
|
40028
|
+
"part": "detail",
|
|
40029
|
+
"property": "gap",
|
|
40030
|
+
"description": "Space between the label and the detail when they share a line."
|
|
40031
|
+
},
|
|
40032
|
+
{
|
|
40033
|
+
"name": "--c2-step__detail--row-gap",
|
|
40034
|
+
"type": "pixel",
|
|
40035
|
+
"default": "2px",
|
|
40036
|
+
"part": "detail",
|
|
40037
|
+
"property": "row-gap",
|
|
40038
|
+
"description": "Space between them when they are stacked."
|
|
40039
|
+
},
|
|
40040
|
+
{
|
|
40041
|
+
"name": "--c2-step__text--flex-direction",
|
|
40042
|
+
"type": "flex-direction-row",
|
|
40043
|
+
"default": "row",
|
|
40044
|
+
"part": "text",
|
|
40045
|
+
"property": "flex-direction",
|
|
40046
|
+
"description": "`column` puts the detail on its own line under the label, which a wizard's descriptions want. It is the only variable that switch needs: the gap and the alignment follow it."
|
|
40047
|
+
},
|
|
40048
|
+
{
|
|
40049
|
+
"name": "--c2-step__text--align-items",
|
|
40050
|
+
"type": "align-items",
|
|
40051
|
+
"default": "baseline",
|
|
40052
|
+
"part": "text",
|
|
40053
|
+
"property": "align-items",
|
|
40054
|
+
"description": "How the label and the detail line up across the row. Stacked, they are flush left whatever this says."
|
|
40055
|
+
},
|
|
40056
|
+
{
|
|
40057
|
+
"name": "--c2-step__trailing--color",
|
|
40058
|
+
"type": "color",
|
|
40059
|
+
"default": "#71717a",
|
|
40060
|
+
"part": "trailing",
|
|
40061
|
+
"property": "color",
|
|
40062
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
40063
|
+
},
|
|
40064
|
+
{
|
|
40065
|
+
"name": "--c2-step__trailing--font-size",
|
|
40066
|
+
"type": "font-size",
|
|
40067
|
+
"part": "trailing",
|
|
40068
|
+
"property": "font-size",
|
|
40069
|
+
"description": "Falls back to the label size."
|
|
40070
|
+
},
|
|
40071
|
+
{
|
|
40072
|
+
"name": "--c2-step__trailing--font-weight",
|
|
40073
|
+
"type": "font-weight",
|
|
40074
|
+
"default": "400",
|
|
40075
|
+
"part": "trailing",
|
|
40076
|
+
"property": "font-weight"
|
|
40077
|
+
},
|
|
40078
|
+
{
|
|
40079
|
+
"name": "--c2-step__success--color",
|
|
40080
|
+
"type": "color",
|
|
40081
|
+
"default": "#16a34a",
|
|
40082
|
+
"part": "success",
|
|
40083
|
+
"property": "color",
|
|
40084
|
+
"description": "Marker colour when the step succeeded."
|
|
40085
|
+
},
|
|
40086
|
+
{
|
|
40087
|
+
"name": "--c2-step__error--color",
|
|
40088
|
+
"type": "color",
|
|
40089
|
+
"default": "#dc2626",
|
|
40090
|
+
"part": "",
|
|
40091
|
+
"state": "error",
|
|
40092
|
+
"property": "color",
|
|
40093
|
+
"token": "--c2-theme--color-error"
|
|
40094
|
+
},
|
|
40095
|
+
{
|
|
40096
|
+
"name": "--c2-step__warning--color",
|
|
40097
|
+
"type": "color",
|
|
40098
|
+
"default": "#d97706",
|
|
40099
|
+
"part": "warning",
|
|
40100
|
+
"property": "color"
|
|
40101
|
+
},
|
|
40102
|
+
{
|
|
40103
|
+
"name": "--c2-step__running--color",
|
|
40104
|
+
"type": "color",
|
|
40105
|
+
"default": "rgb(2, 101, 220)",
|
|
40106
|
+
"part": "",
|
|
40107
|
+
"state": "running",
|
|
40108
|
+
"property": "color",
|
|
40109
|
+
"token": "--c2-theme--color-primary"
|
|
40110
|
+
},
|
|
40111
|
+
{
|
|
40112
|
+
"name": "--c2-step__current--color",
|
|
40113
|
+
"type": "color",
|
|
40114
|
+
"default": "rgb(2, 101, 220)",
|
|
40115
|
+
"part": "current",
|
|
40116
|
+
"property": "color",
|
|
40117
|
+
"token": "--c2-theme--color-primary"
|
|
40118
|
+
},
|
|
40119
|
+
{
|
|
40120
|
+
"name": "--c2-step__skipped--color",
|
|
40121
|
+
"type": "color",
|
|
40122
|
+
"default": "#71717a",
|
|
40123
|
+
"part": "skipped",
|
|
40124
|
+
"property": "color",
|
|
40125
|
+
"token": "--c2-theme--color-on-surface-variant",
|
|
40126
|
+
"description": "Marker and label colour when the step was skipped."
|
|
40127
|
+
},
|
|
40128
|
+
{
|
|
40129
|
+
"name": "--c2-step--transition-duration",
|
|
40130
|
+
"type": "time",
|
|
40131
|
+
"default": "150ms",
|
|
40132
|
+
"part": "",
|
|
40133
|
+
"property": "transition-duration",
|
|
40134
|
+
"token": "--c2-theme--motion-scale",
|
|
40135
|
+
"description": "Colour transitions, and the beat a marker gives when its status settles."
|
|
40136
|
+
},
|
|
40137
|
+
{
|
|
40138
|
+
"name": "--c2-step--enter-duration",
|
|
40139
|
+
"type": "time",
|
|
40140
|
+
"default": "260ms",
|
|
40141
|
+
"part": "",
|
|
40142
|
+
"property": "enter-duration",
|
|
40143
|
+
"description": "How long a step arriving in a running trace takes to grow into place. `0s` turns the animation off."
|
|
40144
|
+
},
|
|
40145
|
+
{
|
|
40146
|
+
"name": "--c2-step--enter-translate",
|
|
40147
|
+
"type": "translate",
|
|
40148
|
+
"default": "-4px",
|
|
40149
|
+
"part": "",
|
|
40150
|
+
"property": "enter-translate",
|
|
40151
|
+
"description": "How far it slides while it does."
|
|
40152
|
+
}
|
|
40153
|
+
]
|
|
40154
|
+
}
|
|
40155
|
+
],
|
|
40156
|
+
"composition": {
|
|
40157
|
+
"internal": [],
|
|
40158
|
+
"slotted": [
|
|
40159
|
+
"c2-step"
|
|
40160
|
+
],
|
|
40161
|
+
"usedBy": [
|
|
40162
|
+
"c2-steps"
|
|
40163
|
+
]
|
|
40164
|
+
},
|
|
40165
|
+
"install": {
|
|
40166
|
+
"npm": "npm install @c2n/steps @c2n/theme",
|
|
40167
|
+
"import": "import '@c2n/steps'",
|
|
40168
|
+
"importClass": "import { Steps } from '@c2n/steps'"
|
|
40169
|
+
},
|
|
40170
|
+
"presets": {
|
|
40171
|
+
"html": "<c2-steps aria-label=\"Pipeline\"><c2-step label=\"build\" trailing=\"24 s\"><c2-step status=\"success\" label=\"install dependencies\" trailing=\"19 s\"></c2-step><c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"></c2-step></c2-step><c2-step label=\"test\"><c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step><c2-step status=\"running\" label=\"e2e\"></c2-step></c2-step><c2-step status=\"pending\" label=\"ship\"></c2-step></c2-steps>",
|
|
40172
|
+
"items": [
|
|
40173
|
+
{
|
|
40174
|
+
"name": "Run log",
|
|
40175
|
+
"description": "The warm panel of a task runner: hairlines between rows, a monospace label and a muted check.",
|
|
40176
|
+
"css": {
|
|
40177
|
+
"--c2-steps--background": "#faf9f5",
|
|
40178
|
+
"--c2-steps--border": "1px solid #e8e6dd",
|
|
40179
|
+
"--c2-steps--border-radius": "8px",
|
|
40180
|
+
"--c2-steps--padding-block": "4px",
|
|
40181
|
+
"--c2-step__row--border-bottom": "1px solid #ecebe3",
|
|
40182
|
+
"--c2-step__row__hover--background": "#f3f1e8",
|
|
40183
|
+
"--c2-step__marker--size": "13px",
|
|
40184
|
+
"--c2-step__success--color": "#3f3f46",
|
|
40185
|
+
"--c2-step__label--font-weight": "400"
|
|
40186
|
+
}
|
|
40187
|
+
},
|
|
40188
|
+
{
|
|
40189
|
+
"name": "Numbered stages",
|
|
40190
|
+
"description": "Roomier numbered markers on a cool panel, with the hairlines dropped.",
|
|
40191
|
+
"attributes": {
|
|
40192
|
+
"marker": "number"
|
|
40193
|
+
},
|
|
40194
|
+
"css": {
|
|
40195
|
+
"--c2-steps--background": "#f8fafc",
|
|
40196
|
+
"--c2-steps--border": "1px solid #e2e8f0",
|
|
40197
|
+
"--c2-steps--border-radius": "10px",
|
|
40198
|
+
"--c2-steps--padding-block": "6px",
|
|
40199
|
+
"--c2-step__row--border-bottom": "none",
|
|
40200
|
+
"--c2-step__row--padding-block": "5px",
|
|
40201
|
+
"--c2-step__marker--size": "20px",
|
|
40202
|
+
"--c2-step__marker--font-size": "10px",
|
|
40203
|
+
"--c2-step__marker--background": "#ffffff",
|
|
40204
|
+
"--c2-step__label--font-family": "inherit",
|
|
40205
|
+
"--c2-step__label--font-size": "13px"
|
|
40206
|
+
}
|
|
40207
|
+
},
|
|
40208
|
+
{
|
|
40209
|
+
"name": "Vertical wizard",
|
|
40210
|
+
"description": "A rail down the markers, the body font, and the detail stacked under the label.",
|
|
40211
|
+
"attributes": {
|
|
40212
|
+
"marker": "number"
|
|
40213
|
+
},
|
|
40214
|
+
"css": {
|
|
40215
|
+
"--c2-step__rail--width": "2px",
|
|
40216
|
+
"--c2-step__rail--color": "#e4e4e7",
|
|
40217
|
+
"--c2-step__rail--gap": "6px",
|
|
40218
|
+
"--c2-step__marker--size": "26px",
|
|
40219
|
+
"--c2-step__marker--font-size": "12px",
|
|
40220
|
+
"--c2-step__marker--background": "#ffffff",
|
|
40221
|
+
"--c2-step__row--border-bottom": "none",
|
|
40222
|
+
"--c2-step__row--padding-block": "6px",
|
|
40223
|
+
"--c2-step__row--padding-inline": "0px",
|
|
40224
|
+
"--c2-step__row--gap": "14px",
|
|
40225
|
+
"--c2-step__label--font-family": "inherit",
|
|
40226
|
+
"--c2-step__label--font-size": "14px",
|
|
40227
|
+
"--c2-step__label--font-weight": "600",
|
|
40228
|
+
"--c2-step__text--flex-direction": "column"
|
|
40229
|
+
}
|
|
40230
|
+
},
|
|
40231
|
+
{
|
|
40232
|
+
"name": "Timeline",
|
|
40233
|
+
"description": "Small dots joined by a rail, for events rather than tasks.",
|
|
40234
|
+
"css": {
|
|
40235
|
+
"--c2-step__rail--width": "2px",
|
|
40236
|
+
"--c2-step__rail--color": "#e4e4e7",
|
|
40237
|
+
"--c2-step__rail--gap": "5px",
|
|
40238
|
+
"--c2-step__marker--size": "10px",
|
|
40239
|
+
"--c2-step__marker--background": "#ffffff",
|
|
40240
|
+
"--c2-step__row--border-bottom": "none",
|
|
40241
|
+
"--c2-step__row--padding-block": "5px",
|
|
40242
|
+
"--c2-step__row--gap": "12px",
|
|
40243
|
+
"--c2-step__label--font-family": "inherit",
|
|
40244
|
+
"--c2-step__label--font-size": "13px",
|
|
40245
|
+
"--c2-step__toggle--size": "12px"
|
|
40246
|
+
}
|
|
40247
|
+
},
|
|
40248
|
+
{
|
|
40249
|
+
"name": "Dark panel",
|
|
40250
|
+
"description": "The trace on a dark surface, with the status colours lifted to carry on it.",
|
|
40251
|
+
"css": {
|
|
40252
|
+
"--c2-steps--background": "#18181b",
|
|
40253
|
+
"--c2-steps--border": "1px solid #27272a",
|
|
40254
|
+
"--c2-steps--border-radius": "8px",
|
|
40255
|
+
"--c2-steps--padding-block": "4px",
|
|
40256
|
+
"--c2-step__row--border-bottom": "1px solid #27272a",
|
|
40257
|
+
"--c2-step__row__hover--background": "#232326",
|
|
40258
|
+
"--c2-step__marker--size": "13px",
|
|
40259
|
+
"--c2-step__marker--border": "1px solid #52525b",
|
|
40260
|
+
"--c2-step__label--color": "#e4e4e7",
|
|
40261
|
+
"--c2-step__label--font-weight": "400",
|
|
40262
|
+
"--c2-step__detail--color": "#a1a1aa",
|
|
40263
|
+
"--c2-step__trailing--color": "#a1a1aa",
|
|
40264
|
+
"--c2-step__guide--color": "#3f3f46",
|
|
40265
|
+
"--c2-step__guide--width": "1px",
|
|
40266
|
+
"--c2-step__success--color": "#4ade80",
|
|
40267
|
+
"--c2-step__error--color": "#f87171",
|
|
40268
|
+
"--c2-step__running--color": "#60a5fa"
|
|
40269
|
+
}
|
|
40270
|
+
}
|
|
40271
|
+
]
|
|
40272
|
+
},
|
|
40273
|
+
"examples": [
|
|
40274
|
+
{
|
|
40275
|
+
"kind": "usage",
|
|
40276
|
+
"label": "A task mid-run — every step is a row, indented under the stage it belongs to",
|
|
40277
|
+
"html": "<c2-steps class=\"trace\" aria-label=\"Pipeline\">\n <c2-step label=\"build\" trailing=\"24 s\">\n <c2-step status=\"success\" label=\"install dependencies\" trailing=\"19 s\"></c2-step>\n <c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"></c2-step>\n </c2-step>\n <c2-step label=\"test\">\n <c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step>\n <c2-step status=\"running\" label=\"e2e\"></c2-step>\n <c2-step status=\"pending\" label=\"visual\"></c2-step>\n </c2-step>\n <c2-step label=\"ship\">\n <c2-step status=\"pending\" label=\"upload\"></c2-step>\n </c2-step>\n</c2-steps>",
|
|
40278
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40279
|
+
},
|
|
40280
|
+
{
|
|
40281
|
+
"kind": "usage",
|
|
40282
|
+
"label": "A failure, rolled up to the stage that contains it",
|
|
40283
|
+
"html": "<c2-steps class=\"trace\" aria-label=\"Failed run\">\n <c2-step label=\"build\" trailing=\"24 s\">\n <c2-step status=\"success\" label=\"install dependencies\" trailing=\"19 s\"></c2-step>\n <c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"></c2-step>\n </c2-step>\n <c2-step label=\"test\" trailing=\"11 s\">\n <c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step>\n <c2-step status=\"error\" label=\"e2e\" detail=\"2 of 40 failed\" trailing=\"3 s\"></c2-step>\n </c2-step>\n <c2-step status=\"skipped\" label=\"ship\"></c2-step>\n</c2-steps>",
|
|
40284
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40285
|
+
},
|
|
40286
|
+
{
|
|
40287
|
+
"kind": "usage",
|
|
40288
|
+
"label": "Nested stages, numbered through the tree",
|
|
40289
|
+
"html": "<c2-steps class=\"trace\" marker=\"number\" aria-label=\"Numbered trace\">\n <c2-step status=\"success\" label=\"goto\" detail=\"[0].goto\" trailing=\"500 ms\"></c2-step>\n <c2-step label=\"pagination\" detail=\"[2].pagination\" trailing=\"1.53 s\">\n <c2-step status=\"success\" label=\"collect\" trailing=\"1 ms\"></c2-step>\n <c2-step label=\"page 2\" trailing=\"620 ms\">\n <c2-step status=\"success\" label=\"collect\" trailing=\"2 ms\"></c2-step>\n <c2-step status=\"warning\" label=\"append\" detail=\"1 duplicate\" trailing=\"1 ms\"></c2-step>\n </c2-step>\n </c2-step>\n <c2-step status=\"skipped\" label=\"notify\" detail=\"[5].notify\"></c2-step>\n</c2-steps>",
|
|
40290
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40291
|
+
},
|
|
40292
|
+
{
|
|
40293
|
+
"kind": "usage",
|
|
40294
|
+
"label": "An icon of your own in the marker slot",
|
|
40295
|
+
"html": "<c2-steps class=\"trace icons\" aria-label=\"Release\">\n <c2-step status=\"success\" label=\"checkout\" detail=\"main@8f2c1d\" trailing=\"1.2 s\">\n <c2-feather-git-branch slot=\"marker\"></c2-feather-git-branch>\n </c2-step>\n <c2-step status=\"success\" label=\"build\" detail=\"3 packages\" trailing=\"24 s\">\n <c2-feather-package slot=\"marker\"></c2-feather-package>\n </c2-step>\n <c2-step status=\"running\" label=\"publish\" detail=\"registry.npmjs.org\">\n <c2-feather-upload-cloud slot=\"marker\"></c2-feather-upload-cloud>\n </c2-step>\n <c2-step status=\"pending\" label=\"smoke test\">\n <c2-feather-terminal slot=\"marker\"></c2-feather-terminal>\n </c2-step>\n</c2-steps>",
|
|
40296
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40297
|
+
},
|
|
40298
|
+
{
|
|
40299
|
+
"kind": "usage",
|
|
40300
|
+
"label": "Anything in the label and trailing slots — a badge, a link, a number of your own",
|
|
40301
|
+
"html": "<c2-steps class=\"trace rich\" aria-label=\"Pull request checks\">\n <c2-step status=\"success\">\n <span slot=\"marker\">1</span>\n <span slot=\"label\"><a href=\"#usage\">lint</a></span>\n <c2-badge slot=\"trailing\" tone=\"success\">passed</c2-badge>\n </c2-step>\n <c2-step status=\"error\">\n <span slot=\"marker\">2</span>\n <span slot=\"label\"><a href=\"#usage\">type-check</a></span>\n <span slot=\"detail\">tsconfig.lib.json</span>\n <c2-badge slot=\"trailing\" tone=\"danger\" count=\"3\"></c2-badge>\n </c2-step>\n <c2-step status=\"pending\">\n <span slot=\"marker\">3</span>\n <span slot=\"label\"><a href=\"#usage\">test</a></span>\n <c2-badge slot=\"trailing\" tone=\"neutral\">queued</c2-badge>\n </c2-step>\n</c2-steps>",
|
|
40302
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40303
|
+
},
|
|
40304
|
+
{
|
|
40305
|
+
"kind": "usage",
|
|
40306
|
+
"label": "A chevron in the toggle slot — the disclosure affordance, which is off by default",
|
|
40307
|
+
"html": "<c2-steps class=\"trace chevrons\" aria-label=\"Pipeline with chevrons\">\n <c2-step label=\"build\" trailing=\"24 s\">\n <svg slot=\"toggle\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2.5\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><path d=\"m9 6 6 6-6 6\"></path></svg>\n <c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"><span slot=\"toggle\"></span></c2-step>\n <c2-step status=\"success\" label=\"bundle\" trailing=\"19 s\"><span slot=\"toggle\"></span></c2-step>\n </c2-step>\n <c2-step status=\"running\" label=\"test\"><span slot=\"toggle\"></span></c2-step>\n</c2-steps>",
|
|
40308
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40309
|
+
},
|
|
40310
|
+
{
|
|
40311
|
+
"kind": "usage",
|
|
40312
|
+
"label": "Label and detail on two lines — one variable switches it",
|
|
40313
|
+
"html": "<c2-steps class=\"trace stacked\" aria-label=\"Deployment stages\">\n <c2-step status=\"success\" label=\"Provision\" detail=\"Three nodes in eu-west-1\" trailing=\"1 m 12 s\"></c2-step>\n <c2-step status=\"running\" label=\"Migrate\" detail=\"Schema, then backfill 2.1 M rows\"></c2-step>\n <c2-step status=\"pending\" label=\"Cut over\" detail=\"Drain connections and promote the replica\"></c2-step>\n</c2-steps>",
|
|
40314
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40315
|
+
},
|
|
40316
|
+
{
|
|
40317
|
+
"kind": "usage",
|
|
40318
|
+
"label": "A wizard — no groups, so no chevron column",
|
|
40319
|
+
"html": "<c2-steps class=\"wizard\" marker=\"number\" current=\"1\" aria-label=\"Checkout\">\n <c2-step label=\"Account\" detail=\"Signed in as ada@example.com\"></c2-step>\n <c2-step label=\"Plan\" detail=\"Team, billed yearly\"></c2-step>\n <c2-step label=\"Payment\" detail=\"Card or invoice\"></c2-step>\n <c2-step label=\"Confirm\" detail=\"Review and place the order\"></c2-step>\n</c2-steps>",
|
|
40320
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40321
|
+
},
|
|
40322
|
+
{
|
|
40323
|
+
"kind": "usage",
|
|
40324
|
+
"label": "Every status",
|
|
40325
|
+
"html": "<c2-steps class=\"wizard\" aria-label=\"Statuses\">\n <c2-step status=\"success\" label=\"Completed\"></c2-step>\n <c2-step status=\"warning\" label=\"Completed with warnings\"></c2-step>\n <c2-step status=\"error\" label=\"Failed\"></c2-step>\n <c2-step status=\"running\" label=\"Running\"></c2-step>\n <c2-step status=\"current\" label=\"Current\"></c2-step>\n <c2-step status=\"pending\" label=\"Pending\"></c2-step>\n <c2-step status=\"skipped\" label=\"Skipped\"></c2-step>\n</c2-steps>",
|
|
40326
|
+
"css": ".trace {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}\n/* A marker slot holding an icon wants room and no ring around it. */\n.icons {\n --c2-step__marker--size: 16px;\n --c2-step__marker--border: 1px solid transparent;\n --c2-feather-icon--size: 16px;\n --c2-feather-icon--stroke-width: 2;\n}\n/* Slotted content sets its own type, so the row only has to make space for it. */\n.rich {\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--border: 1px solid #d6d3c4;\n}\n/* The chevron rotates on its own; the slot only says what to draw. */\n.chevrons {\n --c2-step__toggle--size: 12px;\n --c2-step__toggle--color: #a8a29a;\n}\n/* The detail on its own line under the label. Nothing else to set: the gap follows the direction. */\n.stacked {\n --c2-step__text--flex-direction: column;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__detail--font-size: 13px;\n}\n/* A wizard: a rail, roomier markers, and the body font instead of the trace's monospace. */\n.wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n --c2-step__current--color: #0265dc;\n --c2-step__success--color: #16a34a;\n}"
|
|
40327
|
+
},
|
|
40328
|
+
{
|
|
40329
|
+
"kind": "gallery",
|
|
40330
|
+
"label": "Default",
|
|
40331
|
+
"section": "Presets",
|
|
40332
|
+
"description": "Default Presets example for c2-steps.",
|
|
40333
|
+
"isDefault": true,
|
|
40334
|
+
"tags": [
|
|
40335
|
+
"c2-steps",
|
|
40336
|
+
"c2-step"
|
|
40337
|
+
],
|
|
40338
|
+
"html": "<c2-steps aria-label=\"Pipeline\">\n <c2-step label=\"build\" trailing=\"24 s\">\n <c2-step status=\"success\" label=\"install dependencies\" trailing=\"19 s\"></c2-step>\n <c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"></c2-step>\n </c2-step>\n <c2-step label=\"test\">\n <c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step>\n <c2-step status=\"running\" label=\"e2e\"></c2-step>\n </c2-step>\n</c2-steps>"
|
|
40339
|
+
},
|
|
40340
|
+
{
|
|
40341
|
+
"kind": "gallery",
|
|
40342
|
+
"label": "Run log",
|
|
40343
|
+
"section": "Presets",
|
|
40344
|
+
"description": "Run log Presets example for c2-steps.",
|
|
40345
|
+
"isDefault": false,
|
|
40346
|
+
"tags": [
|
|
40347
|
+
"c2-steps",
|
|
40348
|
+
"c2-step"
|
|
40349
|
+
],
|
|
40350
|
+
"html": "<c2-steps class=\"run-log\" aria-label=\"Run trace\">\n <c2-step status=\"success\" label=\"goto\" detail=\"[0].goto\" trailing=\"500 ms\"></c2-step>\n <c2-step status=\"success\" label=\"set\" detail=\"[1].set\" trailing=\"0 ms\"></c2-step>\n <c2-step label=\"pagination\" detail=\"[2].pagination\" trailing=\"1.53 s\">\n <c2-step status=\"success\" label=\"collect\" detail=\"[2].pagination[1][0].collect\" trailing=\"1 ms\"></c2-step>\n <c2-step status=\"success\" label=\"append\" detail=\"[2].pagination[1][1].append\" trailing=\"1 ms\"></c2-step>\n <c2-step status=\"success\" label=\"collect\" detail=\"[2].pagination[2][0].collect\" trailing=\"2 ms\"></c2-step>\n <c2-step status=\"success\" label=\"append\" detail=\"[2].pagination[2][1].append\" trailing=\"1 ms\"></c2-step>\n <c2-step status=\"success\" label=\"collect\" detail=\"[2].pagination[3][0].collect\" trailing=\"2 ms\"></c2-step>\n <c2-step status=\"success\" label=\"append\" detail=\"[2].pagination[3][1].append\" trailing=\"1 ms\"></c2-step>\n </c2-step>\n</c2-steps>",
|
|
40351
|
+
"css": ".run-log {\n --c2-steps--background: #faf9f5;\n --c2-steps--border: 1px solid #e8e6dd;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #ecebe3;\n --c2-step__row__hover--background: #f3f1e8;\n --c2-step__marker--size: 13px;\n --c2-step__success--color: #3f3f46;\n --c2-step__label--font-weight: 400;\n}"
|
|
40352
|
+
},
|
|
40353
|
+
{
|
|
40354
|
+
"kind": "gallery",
|
|
40355
|
+
"label": "Failed run",
|
|
40356
|
+
"section": "Presets",
|
|
40357
|
+
"description": "Failed run Presets example for c2-steps.",
|
|
40358
|
+
"isDefault": false,
|
|
40359
|
+
"tags": [
|
|
40360
|
+
"c2-steps",
|
|
40361
|
+
"c2-step"
|
|
40362
|
+
],
|
|
40363
|
+
"html": "<c2-steps class=\"failed\" aria-label=\"Failed run\">\n <c2-step label=\"build\" trailing=\"24 s\">\n <c2-step status=\"success\" label=\"compile\" trailing=\"5 s\"></c2-step>\n </c2-step>\n <c2-step label=\"test\" trailing=\"11 s\">\n <c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step>\n <c2-step status=\"error\" label=\"e2e\" detail=\"2 of 40 failed\" trailing=\"3 s\"></c2-step>\n </c2-step>\n <c2-step status=\"skipped\" label=\"ship\"></c2-step>\n</c2-steps>",
|
|
40364
|
+
"css": ".failed {\n --c2-steps--background: #fffbfb;\n --c2-steps--border: 1px solid #f3d6d6;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #f7e6e6;\n --c2-step__marker--size: 13px;\n --c2-step__label--font-weight: 400;\n --c2-step__toggle--color: #c98b8b;\n}"
|
|
40365
|
+
},
|
|
40366
|
+
{
|
|
40367
|
+
"kind": "gallery",
|
|
40368
|
+
"label": "Numbered stages",
|
|
40369
|
+
"section": "Presets",
|
|
40370
|
+
"description": "Numbered stages Presets example for c2-steps.",
|
|
40371
|
+
"isDefault": false,
|
|
40372
|
+
"tags": [
|
|
40373
|
+
"c2-steps",
|
|
40374
|
+
"c2-step"
|
|
40375
|
+
],
|
|
40376
|
+
"html": "<c2-steps class=\"numbered\" marker=\"number\" aria-label=\"Numbered trace\">\n <c2-step status=\"success\" label=\"Prepare\" trailing=\"24 s\">\n <c2-step status=\"success\" label=\"Install dependencies\"></c2-step>\n <c2-step status=\"success\" label=\"Configure\"></c2-step>\n </c2-step>\n <c2-step label=\"Migrate\">\n <c2-step status=\"success\" label=\"Schema\"></c2-step>\n <c2-step status=\"running\" label=\"Backfill\"></c2-step>\n <c2-step status=\"pending\" label=\"Verify\"></c2-step>\n </c2-step>\n</c2-steps>",
|
|
40377
|
+
"css": ".numbered {\n --c2-steps--background: #f8fafc;\n --c2-steps--border: 1px solid #e2e8f0;\n --c2-steps--border-radius: 10px;\n --c2-steps--padding-block: 6px;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 5px;\n --c2-step__marker--size: 20px;\n --c2-step__marker--font-size: 10px;\n --c2-step__marker--background: #ffffff;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n}"
|
|
40378
|
+
},
|
|
40379
|
+
{
|
|
40380
|
+
"kind": "gallery",
|
|
40381
|
+
"label": "Vertical wizard",
|
|
40382
|
+
"section": "Presets",
|
|
40383
|
+
"description": "Vertical wizard Presets example for c2-steps.",
|
|
40384
|
+
"isDefault": false,
|
|
40385
|
+
"tags": [
|
|
40386
|
+
"c2-steps",
|
|
40387
|
+
"c2-step"
|
|
40388
|
+
],
|
|
40389
|
+
"html": "<c2-steps class=\"wizard\" marker=\"number\" current=\"1\" aria-label=\"Checkout\">\n <c2-step label=\"Account\" detail=\"Signed in as ada@example.com\"></c2-step>\n <c2-step label=\"Plan\" detail=\"Team, billed yearly\"></c2-step>\n <c2-step label=\"Payment\" detail=\"Card or invoice\"></c2-step>\n <c2-step label=\"Confirm\" detail=\"Review and place the order\"></c2-step>\n</c2-steps>",
|
|
40390
|
+
"css": ".wizard {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 6px;\n --c2-step__marker--size: 26px;\n --c2-step__marker--font-size: 12px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 6px;\n --c2-step__row--padding-inline: 0px;\n --c2-step__row--gap: 14px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 14px;\n --c2-step__label--font-weight: 600;\n --c2-step__detail--font-size: 13px;\n --c2-step__text--flex-direction: column;\n}"
|
|
40391
|
+
},
|
|
40392
|
+
{
|
|
40393
|
+
"kind": "gallery",
|
|
40394
|
+
"label": "Timeline",
|
|
40395
|
+
"section": "Presets",
|
|
40396
|
+
"description": "Timeline Presets example for c2-steps.",
|
|
40397
|
+
"isDefault": false,
|
|
40398
|
+
"tags": [
|
|
40399
|
+
"c2-steps",
|
|
40400
|
+
"c2-step"
|
|
40401
|
+
],
|
|
40402
|
+
"html": "<c2-steps class=\"timeline\" aria-label=\"Deployment\">\n <c2-step status=\"success\" label=\"Queued\" detail=\"09:14\" trailing=\"2 s\"></c2-step>\n <c2-step label=\"Build\" detail=\"09:14\" trailing=\"1 m 20 s\">\n <c2-step status=\"success\" label=\"Restore cache\" trailing=\"4 s\"></c2-step>\n <c2-step status=\"success\" label=\"Compile\" trailing=\"1 m 16 s\"></c2-step>\n </c2-step>\n <c2-step status=\"running\" label=\"Deploy\" detail=\"09:17\"></c2-step>\n <c2-step status=\"pending\" label=\"Smoke tests\"></c2-step>\n</c2-steps>",
|
|
40403
|
+
"css": ".timeline {\n --c2-step__rail--width: 2px;\n --c2-step__rail--color: #e4e4e7;\n --c2-step__rail--gap: 5px;\n --c2-step__marker--size: 10px;\n --c2-step__marker--background: #ffffff;\n --c2-step__row--border-bottom: none;\n --c2-step__row--padding-block: 5px;\n --c2-step__row--gap: 12px;\n --c2-step__label--font-family: inherit;\n --c2-step__label--font-size: 13px;\n --c2-step__toggle--size: 12px;\n}"
|
|
40404
|
+
},
|
|
40405
|
+
{
|
|
40406
|
+
"kind": "gallery",
|
|
40407
|
+
"label": "Dark panel",
|
|
40408
|
+
"section": "Presets",
|
|
40409
|
+
"description": "Dark panel Presets example for c2-steps.",
|
|
40410
|
+
"isDefault": false,
|
|
40411
|
+
"tags": [
|
|
40412
|
+
"c2-steps",
|
|
40413
|
+
"c2-step"
|
|
40414
|
+
],
|
|
40415
|
+
"html": "<c2-steps class=\"dark-steps\" aria-label=\"Run trace\">\n <c2-step status=\"success\" label=\"goto\" detail=\"[0].goto\" trailing=\"500 ms\"></c2-step>\n <c2-step label=\"pagination\" detail=\"[2].pagination\" trailing=\"1.53 s\">\n <c2-step status=\"success\" label=\"collect\" trailing=\"1 ms\"></c2-step>\n <c2-step status=\"error\" label=\"append\" trailing=\"1 ms\"></c2-step>\n </c2-step>\n <c2-step status=\"skipped\" label=\"notify\" detail=\"[5].notify\"></c2-step>\n</c2-steps>",
|
|
40416
|
+
"css": ".dark-steps {\n --c2-steps--background: #18181b;\n --c2-steps--border: 1px solid #27272a;\n --c2-steps--border-radius: 8px;\n --c2-steps--padding-block: 4px;\n --c2-step__row--border-bottom: 1px solid #27272a;\n --c2-step__row__hover--background: #232326;\n --c2-step__marker--size: 13px;\n --c2-step__marker--border: 1px solid #52525b;\n --c2-step__label--color: #e4e4e7;\n --c2-step__label--font-weight: 400;\n --c2-step__detail--color: #a1a1aa;\n --c2-step__trailing--color: #a1a1aa;\n --c2-step__guide--color: #3f3f46;\n --c2-step__guide--width: 1px;\n --c2-step__success--color: #4ade80;\n --c2-step__error--color: #f87171;\n --c2-step__running--color: #60a5fa;\n}"
|
|
40417
|
+
},
|
|
40418
|
+
{
|
|
40419
|
+
"kind": "preview",
|
|
40420
|
+
"label": "Preview",
|
|
40421
|
+
"html": "<c2-steps style=\"width:300px;--c2-steps--background:#faf9f5;--c2-steps--border:1px solid #e8e6dd;--c2-steps--border-radius:8px;--c2-steps--padding-block:2px;--c2-step__row--border-bottom:1px solid #ecebe3;--c2-step__marker--size:12px;--c2-step__row--padding-block:5px;--c2-step__label--font-size:12px;--c2-step__label--font-weight:400;--c2-step__success--color:#3f3f46\" aria-label=\"Run trace\">\n <c2-step status=\"success\" label=\"build\" trailing=\"24 s\"></c2-step>\n <c2-step label=\"test\">\n <c2-step status=\"success\" label=\"unit\" trailing=\"8 s\"></c2-step>\n <c2-step status=\"running\" label=\"e2e\"></c2-step>\n </c2-step>\n <c2-step status=\"pending\" label=\"ship\"></c2-step>\n</c2-steps>"
|
|
40422
|
+
}
|
|
40423
|
+
],
|
|
40424
|
+
"hasGallery": true
|
|
40425
|
+
},
|
|
38432
40426
|
"switch": {
|
|
38433
40427
|
"id": "switch",
|
|
38434
40428
|
"package": "@c2n/switch",
|
|
@@ -40902,8 +42896,12 @@
|
|
|
40902
42896
|
],
|
|
40903
42897
|
"composition": {
|
|
40904
42898
|
"internal": [],
|
|
40905
|
-
"slotted": [
|
|
40906
|
-
|
|
42899
|
+
"slotted": [
|
|
42900
|
+
"c2-tab"
|
|
42901
|
+
],
|
|
42902
|
+
"usedBy": [
|
|
42903
|
+
"c2-tabs"
|
|
42904
|
+
]
|
|
40907
42905
|
},
|
|
40908
42906
|
"install": {
|
|
40909
42907
|
"npm": "npm install @c2n/tabs @c2n/theme",
|
|
@@ -43631,6 +45629,627 @@
|
|
|
43631
45629
|
],
|
|
43632
45630
|
"hasGallery": true
|
|
43633
45631
|
},
|
|
45632
|
+
"theme-select": {
|
|
45633
|
+
"id": "theme-select",
|
|
45634
|
+
"package": "@c2n/theme-select",
|
|
45635
|
+
"title": "Theme Select",
|
|
45636
|
+
"description": "Colour-theme switcher: click to step to the next mode, hover for the full menu.",
|
|
45637
|
+
"intro": "`c2-theme-select` shows the icon of the theme currently in effect. Clicking it steps to the next mode and wraps",
|
|
45638
|
+
"category": "Inputs",
|
|
45639
|
+
"status": "stable",
|
|
45640
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/theme-select",
|
|
45641
|
+
"elements": [
|
|
45642
|
+
{
|
|
45643
|
+
"tag": "c2-theme-select",
|
|
45644
|
+
"className": "ThemeSelect",
|
|
45645
|
+
"modulePath": "@c2n/theme-select",
|
|
45646
|
+
"description": "Colour-theme switcher. The trigger shows the icon of the mode currently in effect and clicking it steps to the next\none, wrapping around — a two-state control is therefore a plain light/dark toggle. With three or more modes the\ntrigger also opens a menu on hover (or focus, or ArrowDown) so any mode can be picked directly, while the click-to-\nadvance behaviour keeps working.\n\nBy default the component owns the page theme: it writes the resolved scheme to `data-theme` on `<html>`, remembers\nthe choice in `localStorage` under `storage-key`, restores it on load, follows the OS preference live while the\n`system` mode is selected, and stays in sync with other tabs and with other instances on the page. Set `manual` to\ntake that over yourself and only listen for `theme-change`.",
|
|
45647
|
+
"attributes": [
|
|
45648
|
+
{
|
|
45649
|
+
"name": "modes",
|
|
45650
|
+
"type": "Array<string | ThemeSelectMode>",
|
|
45651
|
+
"default": "['system', 'light', 'dark']",
|
|
45652
|
+
"description": "The states to cycle through: `\"system,light,dark\"`, a JSON array, or objects from script."
|
|
45653
|
+
},
|
|
45654
|
+
{
|
|
45655
|
+
"name": "value",
|
|
45656
|
+
"type": "string",
|
|
45657
|
+
"default": "''",
|
|
45658
|
+
"description": "The mode in effect. Assigning it selects that mode silently; `select()` and `next()` report the change."
|
|
45659
|
+
},
|
|
45660
|
+
{
|
|
45661
|
+
"name": "menu",
|
|
45662
|
+
"type": "'auto' | 'always' | 'never'",
|
|
45663
|
+
"default": "'auto'",
|
|
45664
|
+
"description": "When to offer the dropdown: `auto` (three or more modes), `always`, or `never`."
|
|
45665
|
+
},
|
|
45666
|
+
{
|
|
45667
|
+
"name": "placement",
|
|
45668
|
+
"type": "Placement",
|
|
45669
|
+
"default": "'bottom'",
|
|
45670
|
+
"description": "Preferred placement of the menu (floating-ui names)."
|
|
45671
|
+
},
|
|
45672
|
+
{
|
|
45673
|
+
"name": "show-label",
|
|
45674
|
+
"type": "boolean",
|
|
45675
|
+
"default": "false",
|
|
45676
|
+
"description": "Show the current mode's label beside its icon."
|
|
45677
|
+
},
|
|
45678
|
+
{
|
|
45679
|
+
"name": "disabled",
|
|
45680
|
+
"type": "boolean",
|
|
45681
|
+
"default": "false",
|
|
45682
|
+
"description": "Blocks interaction and dims the control."
|
|
45683
|
+
},
|
|
45684
|
+
{
|
|
45685
|
+
"name": "manual",
|
|
45686
|
+
"type": "boolean",
|
|
45687
|
+
"default": "false",
|
|
45688
|
+
"description": "Do not touch the document or storage; the host applies the theme itself from `theme-change`."
|
|
45689
|
+
},
|
|
45690
|
+
{
|
|
45691
|
+
"name": "target",
|
|
45692
|
+
"type": "string | HTMLElement | undefined",
|
|
45693
|
+
"default": "undefined",
|
|
45694
|
+
"description": "Element the scheme is written to, or the id of one. Defaults to `<html>`."
|
|
45695
|
+
},
|
|
45696
|
+
{
|
|
45697
|
+
"name": "theme-attribute",
|
|
45698
|
+
"type": "string",
|
|
45699
|
+
"default": "'data-theme'",
|
|
45700
|
+
"description": "Attribute written on the target, `data-theme` by default."
|
|
45701
|
+
},
|
|
45702
|
+
{
|
|
45703
|
+
"name": "storage-key",
|
|
45704
|
+
"type": "string",
|
|
45705
|
+
"default": "'c2n-theme'",
|
|
45706
|
+
"description": "`localStorage` key the chosen mode is remembered under. Empty disables persistence."
|
|
45707
|
+
},
|
|
45708
|
+
{
|
|
45709
|
+
"name": "open-delay",
|
|
45710
|
+
"type": "number",
|
|
45711
|
+
"default": "150",
|
|
45712
|
+
"description": "Milliseconds the pointer must rest on the trigger before the menu opens."
|
|
45713
|
+
},
|
|
45714
|
+
{
|
|
45715
|
+
"name": "close-delay",
|
|
45716
|
+
"type": "number",
|
|
45717
|
+
"default": "200",
|
|
45718
|
+
"description": "Milliseconds the menu stays open after the pointer leaves, so it can be crossed into."
|
|
45719
|
+
},
|
|
45720
|
+
{
|
|
45721
|
+
"name": "aria-label",
|
|
45722
|
+
"type": "string",
|
|
45723
|
+
"description": "Accessible name of the trigger. Defaults to `Theme: <current label>`."
|
|
45724
|
+
}
|
|
45725
|
+
],
|
|
45726
|
+
"slots": [
|
|
45727
|
+
{
|
|
45728
|
+
"name": "system-icon",
|
|
45729
|
+
"description": "Replaces the built-in monitor icon of the `system` mode, in the trigger and in its menu row. Every mode takes its icon from `<value>-icon`, so a custom mode brings its own."
|
|
45730
|
+
},
|
|
45731
|
+
{
|
|
45732
|
+
"name": "light-icon",
|
|
45733
|
+
"description": "Replaces the built-in sun icon of the `light` mode."
|
|
45734
|
+
},
|
|
45735
|
+
{
|
|
45736
|
+
"name": "dark-icon",
|
|
45737
|
+
"description": "Replaces the built-in moon icon of the `dark` mode."
|
|
45738
|
+
},
|
|
45739
|
+
{
|
|
45740
|
+
"name": "check",
|
|
45741
|
+
"description": "Mark shown beside the selected row in the menu. Defaults to a check."
|
|
45742
|
+
}
|
|
45743
|
+
],
|
|
45744
|
+
"events": [
|
|
45745
|
+
{
|
|
45746
|
+
"name": "theme-change",
|
|
45747
|
+
"type": "CustomEvent<ThemeSelectChangeDetail>",
|
|
45748
|
+
"description": "The scheme in effect changed: a mode was picked, or the OS preference moved while `system` was selected. `detail.value` is the mode, `detail.theme` the scheme it resolves to. Does not bubble; assigning `value` from script is silent."
|
|
45749
|
+
}
|
|
45750
|
+
],
|
|
45751
|
+
"cssParts": [
|
|
45752
|
+
{
|
|
45753
|
+
"name": "trigger",
|
|
45754
|
+
"description": "The button that shows the current mode and advances to the next one."
|
|
45755
|
+
},
|
|
45756
|
+
{
|
|
45757
|
+
"name": "icon",
|
|
45758
|
+
"description": "The icon box inside the trigger and inside every menu row."
|
|
45759
|
+
},
|
|
45760
|
+
{
|
|
45761
|
+
"name": "label",
|
|
45762
|
+
"description": "The trigger's text, rendered only with `show-label`."
|
|
45763
|
+
},
|
|
45764
|
+
{
|
|
45765
|
+
"name": "menu",
|
|
45766
|
+
"description": "The dropdown surface."
|
|
45767
|
+
},
|
|
45768
|
+
{
|
|
45769
|
+
"name": "menu-item",
|
|
45770
|
+
"description": "One row of the dropdown."
|
|
45771
|
+
},
|
|
45772
|
+
{
|
|
45773
|
+
"name": "check",
|
|
45774
|
+
"description": "The mark beside the selected row."
|
|
45775
|
+
}
|
|
45776
|
+
],
|
|
45777
|
+
"cssProperties": [
|
|
45778
|
+
{
|
|
45779
|
+
"name": "--c2-theme-select__trigger--size",
|
|
45780
|
+
"type": "pixel",
|
|
45781
|
+
"default": "32px",
|
|
45782
|
+
"part": "trigger",
|
|
45783
|
+
"property": "size",
|
|
45784
|
+
"description": "Height of the trigger, and its width while icon-only."
|
|
45785
|
+
},
|
|
45786
|
+
{
|
|
45787
|
+
"name": "--c2-theme-select__trigger--padding-inline",
|
|
45788
|
+
"type": "pixel",
|
|
45789
|
+
"default": "8px",
|
|
45790
|
+
"part": "trigger",
|
|
45791
|
+
"property": "padding-inline",
|
|
45792
|
+
"description": "Side padding, used only with `show-label`."
|
|
45793
|
+
},
|
|
45794
|
+
{
|
|
45795
|
+
"name": "--c2-theme-select__trigger--gap",
|
|
45796
|
+
"type": "pixel",
|
|
45797
|
+
"default": "8px",
|
|
45798
|
+
"part": "trigger",
|
|
45799
|
+
"property": "gap",
|
|
45800
|
+
"description": "Space between the icon and the label."
|
|
45801
|
+
},
|
|
45802
|
+
{
|
|
45803
|
+
"name": "--c2-theme-select__trigger--border-radius",
|
|
45804
|
+
"type": "border-radius",
|
|
45805
|
+
"default": "8px",
|
|
45806
|
+
"part": "trigger",
|
|
45807
|
+
"property": "border-radius",
|
|
45808
|
+
"token": "--c2-theme--radius-lg"
|
|
45809
|
+
},
|
|
45810
|
+
{
|
|
45811
|
+
"name": "--c2-theme-select__trigger--border",
|
|
45812
|
+
"type": "border",
|
|
45813
|
+
"default": "1px solid transparent",
|
|
45814
|
+
"part": "trigger",
|
|
45815
|
+
"property": "border"
|
|
45816
|
+
},
|
|
45817
|
+
{
|
|
45818
|
+
"name": "--c2-theme-select__trigger--background",
|
|
45819
|
+
"type": "color",
|
|
45820
|
+
"default": "transparent",
|
|
45821
|
+
"part": "trigger",
|
|
45822
|
+
"property": "background"
|
|
45823
|
+
},
|
|
45824
|
+
{
|
|
45825
|
+
"name": "--c2-theme-select__trigger--color",
|
|
45826
|
+
"type": "color",
|
|
45827
|
+
"default": "#18181b",
|
|
45828
|
+
"part": "trigger",
|
|
45829
|
+
"property": "color",
|
|
45830
|
+
"token": "--c2-theme--color-on-surface"
|
|
45831
|
+
},
|
|
45832
|
+
{
|
|
45833
|
+
"name": "--c2-theme-select__trigger__hover--background",
|
|
45834
|
+
"type": "color",
|
|
45835
|
+
"default": "#f4f4f5",
|
|
45836
|
+
"part": "trigger",
|
|
45837
|
+
"state": "hover",
|
|
45838
|
+
"property": "background",
|
|
45839
|
+
"token": "--c2-theme--color-surface-container"
|
|
45840
|
+
},
|
|
45841
|
+
{
|
|
45842
|
+
"name": "--c2-theme-select__trigger__hover--color",
|
|
45843
|
+
"type": "color",
|
|
45844
|
+
"part": "trigger",
|
|
45845
|
+
"state": "hover",
|
|
45846
|
+
"property": "color",
|
|
45847
|
+
"description": "Falls back to the resting colour."
|
|
45848
|
+
},
|
|
45849
|
+
{
|
|
45850
|
+
"name": "--c2-theme-select__trigger__active--background",
|
|
45851
|
+
"type": "color",
|
|
45852
|
+
"default": "#e4e4e7",
|
|
45853
|
+
"part": "trigger",
|
|
45854
|
+
"state": "active",
|
|
45855
|
+
"property": "background"
|
|
45856
|
+
},
|
|
45857
|
+
{
|
|
45858
|
+
"name": "--c2-theme-select__trigger__open--background",
|
|
45859
|
+
"type": "color",
|
|
45860
|
+
"part": "trigger",
|
|
45861
|
+
"state": "open",
|
|
45862
|
+
"property": "background",
|
|
45863
|
+
"description": "Trigger fill while the menu is open; falls back to the hover fill."
|
|
45864
|
+
},
|
|
45865
|
+
{
|
|
45866
|
+
"name": "--c2-theme-select__trigger__focus--outline",
|
|
45867
|
+
"type": "outline",
|
|
45868
|
+
"default": "2px solid rgba(2, 101, 220, 0.4)",
|
|
45869
|
+
"part": "trigger",
|
|
45870
|
+
"state": "focus",
|
|
45871
|
+
"property": "outline",
|
|
45872
|
+
"token": "--c2-theme--focus-ring"
|
|
45873
|
+
},
|
|
45874
|
+
{
|
|
45875
|
+
"name": "--c2-theme-select__trigger__focus--outline-offset",
|
|
45876
|
+
"type": "pixel",
|
|
45877
|
+
"default": "2px",
|
|
45878
|
+
"part": "trigger",
|
|
45879
|
+
"state": "focus",
|
|
45880
|
+
"property": "outline-offset"
|
|
45881
|
+
},
|
|
45882
|
+
{
|
|
45883
|
+
"name": "--c2-theme-select__trigger__disabled--opacity",
|
|
45884
|
+
"type": "opacity",
|
|
45885
|
+
"default": "0.38",
|
|
45886
|
+
"part": "trigger",
|
|
45887
|
+
"state": "disabled",
|
|
45888
|
+
"property": "opacity",
|
|
45889
|
+
"token": "--c2-theme--disabled-opacity"
|
|
45890
|
+
},
|
|
45891
|
+
{
|
|
45892
|
+
"name": "--c2-theme-select__icon--size",
|
|
45893
|
+
"type": "pixel",
|
|
45894
|
+
"default": "16px",
|
|
45895
|
+
"part": "icon",
|
|
45896
|
+
"property": "size",
|
|
45897
|
+
"description": "Side of the icon square, in the trigger and in the menu rows."
|
|
45898
|
+
},
|
|
45899
|
+
{
|
|
45900
|
+
"name": "--c2-theme-select__label--font-size",
|
|
45901
|
+
"type": "font-size",
|
|
45902
|
+
"default": "14px",
|
|
45903
|
+
"part": "label",
|
|
45904
|
+
"property": "font-size",
|
|
45905
|
+
"token": "--c2-theme--font-size-md"
|
|
45906
|
+
},
|
|
45907
|
+
{
|
|
45908
|
+
"name": "--c2-theme-select__label--font-weight",
|
|
45909
|
+
"type": "font-weight",
|
|
45910
|
+
"default": "500",
|
|
45911
|
+
"part": "label",
|
|
45912
|
+
"property": "font-weight",
|
|
45913
|
+
"token": "--c2-theme--font-weight-medium"
|
|
45914
|
+
},
|
|
45915
|
+
{
|
|
45916
|
+
"name": "--c2-theme-select__menu--background",
|
|
45917
|
+
"type": "color",
|
|
45918
|
+
"default": "#ffffff",
|
|
45919
|
+
"part": "menu",
|
|
45920
|
+
"property": "background",
|
|
45921
|
+
"token": "--c2-theme--color-surface"
|
|
45922
|
+
},
|
|
45923
|
+
{
|
|
45924
|
+
"name": "--c2-theme-select__menu--border",
|
|
45925
|
+
"type": "border",
|
|
45926
|
+
"default": "1px solid #e4e4e7",
|
|
45927
|
+
"part": "menu",
|
|
45928
|
+
"property": "border",
|
|
45929
|
+
"token": "--c2-theme--color-outline-variant"
|
|
45930
|
+
},
|
|
45931
|
+
{
|
|
45932
|
+
"name": "--c2-theme-select__menu--border-radius",
|
|
45933
|
+
"type": "border-radius",
|
|
45934
|
+
"default": "8px",
|
|
45935
|
+
"part": "menu",
|
|
45936
|
+
"property": "border-radius",
|
|
45937
|
+
"token": "--c2-theme--radius-lg"
|
|
45938
|
+
},
|
|
45939
|
+
{
|
|
45940
|
+
"name": "--c2-theme-select__menu--box-shadow",
|
|
45941
|
+
"type": "box-shadow",
|
|
45942
|
+
"default": "0 8px 24px rgba(24, 24, 27, 0.08)",
|
|
45943
|
+
"part": "menu",
|
|
45944
|
+
"property": "box-shadow",
|
|
45945
|
+
"token": "--c2-theme--shadow-md"
|
|
45946
|
+
},
|
|
45947
|
+
{
|
|
45948
|
+
"name": "--c2-theme-select__menu--padding",
|
|
45949
|
+
"type": "pixel",
|
|
45950
|
+
"default": "4px",
|
|
45951
|
+
"part": "menu",
|
|
45952
|
+
"property": "padding"
|
|
45953
|
+
},
|
|
45954
|
+
{
|
|
45955
|
+
"name": "--c2-theme-select__menu--min-width",
|
|
45956
|
+
"type": "pixel",
|
|
45957
|
+
"default": "148px",
|
|
45958
|
+
"part": "menu",
|
|
45959
|
+
"property": "min-width"
|
|
45960
|
+
},
|
|
45961
|
+
{
|
|
45962
|
+
"name": "--c2-theme-select__menu--gap",
|
|
45963
|
+
"type": "pixel",
|
|
45964
|
+
"default": "2px",
|
|
45965
|
+
"part": "menu",
|
|
45966
|
+
"property": "gap",
|
|
45967
|
+
"description": "Space between rows."
|
|
45968
|
+
},
|
|
45969
|
+
{
|
|
45970
|
+
"name": "--c2-theme-select__menu--offset",
|
|
45971
|
+
"type": "pixel",
|
|
45972
|
+
"default": "6px",
|
|
45973
|
+
"part": "menu",
|
|
45974
|
+
"property": "offset",
|
|
45975
|
+
"description": "Distance between the trigger and the menu."
|
|
45976
|
+
},
|
|
45977
|
+
{
|
|
45978
|
+
"name": "--c2-theme-select__menu-item--gap",
|
|
45979
|
+
"type": "pixel",
|
|
45980
|
+
"default": "8px",
|
|
45981
|
+
"part": "menu-item",
|
|
45982
|
+
"property": "gap"
|
|
45983
|
+
},
|
|
45984
|
+
{
|
|
45985
|
+
"name": "--c2-theme-select__menu-item--padding-block",
|
|
45986
|
+
"type": "pixel",
|
|
45987
|
+
"default": "6px",
|
|
45988
|
+
"part": "menu-item",
|
|
45989
|
+
"property": "padding-block"
|
|
45990
|
+
},
|
|
45991
|
+
{
|
|
45992
|
+
"name": "--c2-theme-select__menu-item--padding-inline",
|
|
45993
|
+
"type": "pixel",
|
|
45994
|
+
"default": "8px",
|
|
45995
|
+
"part": "menu-item",
|
|
45996
|
+
"property": "padding-inline"
|
|
45997
|
+
},
|
|
45998
|
+
{
|
|
45999
|
+
"name": "--c2-theme-select__menu-item--border-radius",
|
|
46000
|
+
"type": "border-radius",
|
|
46001
|
+
"default": "6px",
|
|
46002
|
+
"part": "menu-item",
|
|
46003
|
+
"property": "border-radius",
|
|
46004
|
+
"token": "--c2-theme--radius-md"
|
|
46005
|
+
},
|
|
46006
|
+
{
|
|
46007
|
+
"name": "--c2-theme-select__menu-item--color",
|
|
46008
|
+
"type": "color",
|
|
46009
|
+
"default": "#18181b",
|
|
46010
|
+
"part": "menu-item",
|
|
46011
|
+
"property": "color",
|
|
46012
|
+
"token": "--c2-theme--color-on-surface"
|
|
46013
|
+
},
|
|
46014
|
+
{
|
|
46015
|
+
"name": "--c2-theme-select__menu-item--font-size",
|
|
46016
|
+
"type": "font-size",
|
|
46017
|
+
"default": "14px",
|
|
46018
|
+
"part": "menu-item",
|
|
46019
|
+
"property": "font-size",
|
|
46020
|
+
"token": "--c2-theme--font-size-md"
|
|
46021
|
+
},
|
|
46022
|
+
{
|
|
46023
|
+
"name": "--c2-theme-select__menu-item--font-weight",
|
|
46024
|
+
"type": "font-weight",
|
|
46025
|
+
"default": "500",
|
|
46026
|
+
"part": "menu-item",
|
|
46027
|
+
"property": "font-weight",
|
|
46028
|
+
"token": "--c2-theme--font-weight-medium"
|
|
46029
|
+
},
|
|
46030
|
+
{
|
|
46031
|
+
"name": "--c2-theme-select__menu-item__hover--background",
|
|
46032
|
+
"type": "color",
|
|
46033
|
+
"default": "#f4f4f5",
|
|
46034
|
+
"part": "menu-item",
|
|
46035
|
+
"state": "hover",
|
|
46036
|
+
"property": "background",
|
|
46037
|
+
"token": "--c2-theme--color-surface-container"
|
|
46038
|
+
},
|
|
46039
|
+
{
|
|
46040
|
+
"name": "--c2-theme-select__menu-item__selected--color",
|
|
46041
|
+
"type": "color",
|
|
46042
|
+
"default": "rgb(2, 101, 220)",
|
|
46043
|
+
"part": "menu-item",
|
|
46044
|
+
"state": "selected",
|
|
46045
|
+
"property": "color",
|
|
46046
|
+
"token": "--c2-theme--color-primary"
|
|
46047
|
+
},
|
|
46048
|
+
{
|
|
46049
|
+
"name": "--c2-theme-select__menu-item__selected--background",
|
|
46050
|
+
"type": "color",
|
|
46051
|
+
"part": "menu-item",
|
|
46052
|
+
"state": "selected",
|
|
46053
|
+
"property": "background",
|
|
46054
|
+
"description": "Fill of the selected row; transparent by default."
|
|
46055
|
+
},
|
|
46056
|
+
{
|
|
46057
|
+
"name": "--c2-theme-select__check--size",
|
|
46058
|
+
"type": "pixel",
|
|
46059
|
+
"default": "14px",
|
|
46060
|
+
"part": "check",
|
|
46061
|
+
"property": "size"
|
|
46062
|
+
},
|
|
46063
|
+
{
|
|
46064
|
+
"name": "--c2-theme-select__check--color",
|
|
46065
|
+
"type": "color",
|
|
46066
|
+
"part": "check",
|
|
46067
|
+
"property": "color",
|
|
46068
|
+
"description": "Falls back to the selected row's colour."
|
|
46069
|
+
},
|
|
46070
|
+
{
|
|
46071
|
+
"name": "--c2-theme-select--transition-duration",
|
|
46072
|
+
"type": "time",
|
|
46073
|
+
"default": "150ms",
|
|
46074
|
+
"part": "",
|
|
46075
|
+
"property": "transition-duration",
|
|
46076
|
+
"token": "--c2-theme--motion-scale",
|
|
46077
|
+
"description": "Icon cross-fade and trigger colour change."
|
|
46078
|
+
}
|
|
46079
|
+
]
|
|
46080
|
+
}
|
|
46081
|
+
],
|
|
46082
|
+
"composition": {
|
|
46083
|
+
"internal": [],
|
|
46084
|
+
"slotted": [],
|
|
46085
|
+
"usedBy": []
|
|
46086
|
+
},
|
|
46087
|
+
"install": {
|
|
46088
|
+
"npm": "npm install @c2n/theme-select @c2n/theme",
|
|
46089
|
+
"import": "import '@c2n/theme-select'",
|
|
46090
|
+
"importClass": "import { ThemeSelect } from '@c2n/theme-select'"
|
|
46091
|
+
},
|
|
46092
|
+
"presets": {
|
|
46093
|
+
"html": "<c2-theme-select manual show-label></c2-theme-select>",
|
|
46094
|
+
"items": [
|
|
46095
|
+
{
|
|
46096
|
+
"name": "Outlined",
|
|
46097
|
+
"description": "A framed trigger that reads as a control rather than as bare chrome.",
|
|
46098
|
+
"css": {
|
|
46099
|
+
"--c2-theme-select__trigger--border": "1px solid #bcbcc6",
|
|
46100
|
+
"--c2-theme-select__trigger--border-radius": "6px"
|
|
46101
|
+
}
|
|
46102
|
+
},
|
|
46103
|
+
{
|
|
46104
|
+
"name": "Pill",
|
|
46105
|
+
"description": "Round tinted trigger with a larger icon, for a site header.",
|
|
46106
|
+
"css": {
|
|
46107
|
+
"--c2-theme-select__trigger--size": "36px",
|
|
46108
|
+
"--c2-theme-select__trigger--border-radius": "999px",
|
|
46109
|
+
"--c2-theme-select__trigger--background": "#f4f4f5",
|
|
46110
|
+
"--c2-theme-select__trigger__hover--background": "#e4e4e7",
|
|
46111
|
+
"--c2-theme-select__icon--size": "18px"
|
|
46112
|
+
}
|
|
46113
|
+
},
|
|
46114
|
+
{
|
|
46115
|
+
"name": "Solid",
|
|
46116
|
+
"description": "Accent-filled trigger for a primary placement.",
|
|
46117
|
+
"css": {
|
|
46118
|
+
"--c2-theme-select__trigger--background": "rgb(2, 101, 220)",
|
|
46119
|
+
"--c2-theme-select__trigger--color": "#ffffff",
|
|
46120
|
+
"--c2-theme-select__trigger__hover--background": "rgb(1, 84, 184)",
|
|
46121
|
+
"--c2-theme-select__trigger--padding-inline": "12px",
|
|
46122
|
+
"--c2-theme-select__trigger--border-radius": "6px"
|
|
46123
|
+
}
|
|
46124
|
+
},
|
|
46125
|
+
{
|
|
46126
|
+
"name": "Dark menu",
|
|
46127
|
+
"description": "Keeps the trigger light and drops the dropdown to a dark surface.",
|
|
46128
|
+
"css": {
|
|
46129
|
+
"--c2-theme-select__menu--background": "#18181b",
|
|
46130
|
+
"--c2-theme-select__menu--border": "1px solid #27272a",
|
|
46131
|
+
"--c2-theme-select__menu--border-radius": "12px",
|
|
46132
|
+
"--c2-theme-select__menu-item--color": "#fafafa",
|
|
46133
|
+
"--c2-theme-select__menu-item__hover--background": "#27272a",
|
|
46134
|
+
"--c2-theme-select__menu-item__selected--color": "#fafafa",
|
|
46135
|
+
"--c2-theme-select__menu-item__selected--background": "#3f3f46"
|
|
46136
|
+
}
|
|
46137
|
+
},
|
|
46138
|
+
{
|
|
46139
|
+
"name": "Compact",
|
|
46140
|
+
"description": "Small square trigger for a dense toolbar.",
|
|
46141
|
+
"css": {
|
|
46142
|
+
"--c2-theme-select__trigger--size": "24px",
|
|
46143
|
+
"--c2-theme-select__trigger--border-radius": "4px",
|
|
46144
|
+
"--c2-theme-select__icon--size": "14px"
|
|
46145
|
+
}
|
|
46146
|
+
}
|
|
46147
|
+
]
|
|
46148
|
+
},
|
|
46149
|
+
"examples": [
|
|
46150
|
+
{
|
|
46151
|
+
"kind": "usage",
|
|
46152
|
+
"label": "Three modes — click cycles, hover opens the menu",
|
|
46153
|
+
"html": "<c2-theme-select manual></c2-theme-select>\n<c2-theme-select manual show-label></c2-theme-select>\n<c2-theme-select manual class=\"boxed\" placement=\"bottom-end\"></c2-theme-select>",
|
|
46154
|
+
"css": ".boxed {\n --c2-theme-select__trigger--border: 1px solid #bcbcc6;\n}\n.pill {\n --c2-theme-select__trigger--border-radius: 999px;\n --c2-theme-select__trigger--background: #f4f4f5;\n}"
|
|
46155
|
+
},
|
|
46156
|
+
{
|
|
46157
|
+
"kind": "usage",
|
|
46158
|
+
"label": "Two modes — a plain toggle, no menu",
|
|
46159
|
+
"html": "<c2-theme-select manual modes=\"light,dark\" class=\"pill\"></c2-theme-select>\n<c2-theme-select manual modes=\"light,dark\" show-label></c2-theme-select>",
|
|
46160
|
+
"css": ".boxed {\n --c2-theme-select__trigger--border: 1px solid #bcbcc6;\n}\n.pill {\n --c2-theme-select__trigger--border-radius: 999px;\n --c2-theme-select__trigger--background: #f4f4f5;\n}"
|
|
46161
|
+
},
|
|
46162
|
+
{
|
|
46163
|
+
"kind": "usage",
|
|
46164
|
+
"label": "Menu for two modes, and disabled",
|
|
46165
|
+
"html": "<c2-theme-select manual modes=\"light,dark\" menu=\"always\" show-label></c2-theme-select>\n<c2-theme-select manual disabled></c2-theme-select>",
|
|
46166
|
+
"css": ".boxed {\n --c2-theme-select__trigger--border: 1px solid #bcbcc6;\n}\n.pill {\n --c2-theme-select__trigger--border-radius: 999px;\n --c2-theme-select__trigger--background: #f4f4f5;\n}"
|
|
46167
|
+
},
|
|
46168
|
+
{
|
|
46169
|
+
"kind": "usage",
|
|
46170
|
+
"label": "Own icons — each one shows in the trigger and in its menu row",
|
|
46171
|
+
"html": "<c2-theme-select manual show-label>\n <svg slot=\"system-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n <path d=\"M12 3v18\"></path>\n </svg>\n <svg slot=\"light-icon\" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\">\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n </svg>\n <svg slot=\"dark-icon\" viewBox=\"0 0 24 24\" fill=\"currentColor\" stroke=\"none\">\n <circle cx=\"12\" cy=\"12\" r=\"9\"></circle>\n </svg>\n</c2-theme-select>",
|
|
46172
|
+
"css": ".boxed {\n --c2-theme-select__trigger--border: 1px solid #bcbcc6;\n}\n.pill {\n --c2-theme-select__trigger--border-radius: 999px;\n --c2-theme-select__trigger--background: #f4f4f5;\n}"
|
|
46173
|
+
},
|
|
46174
|
+
{
|
|
46175
|
+
"kind": "gallery",
|
|
46176
|
+
"label": "Default",
|
|
46177
|
+
"section": "Presets",
|
|
46178
|
+
"description": "Default Presets example for c2-theme-select.",
|
|
46179
|
+
"isDefault": true,
|
|
46180
|
+
"tags": [
|
|
46181
|
+
"c2-theme-select"
|
|
46182
|
+
],
|
|
46183
|
+
"html": "<c2-theme-select manual></c2-theme-select>"
|
|
46184
|
+
},
|
|
46185
|
+
{
|
|
46186
|
+
"kind": "gallery",
|
|
46187
|
+
"label": "Outlined",
|
|
46188
|
+
"section": "Presets",
|
|
46189
|
+
"description": "Outlined Presets example for c2-theme-select.",
|
|
46190
|
+
"isDefault": false,
|
|
46191
|
+
"tags": [
|
|
46192
|
+
"c2-theme-select"
|
|
46193
|
+
],
|
|
46194
|
+
"html": "<c2-theme-select class=\"outlined\" manual show-label></c2-theme-select>",
|
|
46195
|
+
"css": ".outlined {\n --c2-theme-select__trigger--border: 1px solid #bcbcc6;\n --c2-theme-select__trigger--border-radius: 6px;\n}"
|
|
46196
|
+
},
|
|
46197
|
+
{
|
|
46198
|
+
"kind": "gallery",
|
|
46199
|
+
"label": "Pill",
|
|
46200
|
+
"section": "Presets",
|
|
46201
|
+
"description": "Pill Presets example for c2-theme-select.",
|
|
46202
|
+
"isDefault": false,
|
|
46203
|
+
"tags": [
|
|
46204
|
+
"c2-theme-select"
|
|
46205
|
+
],
|
|
46206
|
+
"html": "<c2-theme-select class=\"pill\" manual></c2-theme-select>",
|
|
46207
|
+
"css": ".pill {\n --c2-theme-select__trigger--size: 36px;\n --c2-theme-select__trigger--border-radius: 999px;\n --c2-theme-select__trigger--background: #f4f4f5;\n --c2-theme-select__trigger__hover--background: #e4e4e7;\n --c2-theme-select__icon--size: 18px;\n}"
|
|
46208
|
+
},
|
|
46209
|
+
{
|
|
46210
|
+
"kind": "gallery",
|
|
46211
|
+
"label": "Solid",
|
|
46212
|
+
"section": "Presets",
|
|
46213
|
+
"description": "Solid Presets example for c2-theme-select.",
|
|
46214
|
+
"isDefault": false,
|
|
46215
|
+
"tags": [
|
|
46216
|
+
"c2-theme-select"
|
|
46217
|
+
],
|
|
46218
|
+
"html": "<c2-theme-select class=\"solid\" manual show-label></c2-theme-select>",
|
|
46219
|
+
"css": ".solid {\n --c2-theme-select__trigger--background: rgb(2, 101, 220);\n --c2-theme-select__trigger--color: #ffffff;\n --c2-theme-select__trigger__hover--background: rgb(1, 84, 184);\n --c2-theme-select__trigger--padding-inline: 12px;\n --c2-theme-select__trigger--border-radius: 6px;\n}"
|
|
46220
|
+
},
|
|
46221
|
+
{
|
|
46222
|
+
"kind": "gallery",
|
|
46223
|
+
"label": "Dark menu",
|
|
46224
|
+
"section": "Presets",
|
|
46225
|
+
"description": "Dark menu Presets example for c2-theme-select.",
|
|
46226
|
+
"isDefault": false,
|
|
46227
|
+
"tags": [
|
|
46228
|
+
"c2-theme-select"
|
|
46229
|
+
],
|
|
46230
|
+
"html": "<c2-theme-select class=\"dark-menu\" manual></c2-theme-select>",
|
|
46231
|
+
"css": ".dark-menu {\n --c2-theme-select__menu--background: #18181b;\n --c2-theme-select__menu--border: 1px solid #27272a;\n --c2-theme-select__menu--border-radius: 12px;\n --c2-theme-select__menu-item--color: #fafafa;\n --c2-theme-select__menu-item__hover--background: #27272a;\n --c2-theme-select__menu-item__selected--color: #fafafa;\n --c2-theme-select__menu-item__selected--background: #3f3f46;\n}"
|
|
46232
|
+
},
|
|
46233
|
+
{
|
|
46234
|
+
"kind": "gallery",
|
|
46235
|
+
"label": "Compact toggle",
|
|
46236
|
+
"section": "Presets",
|
|
46237
|
+
"description": "Compact toggle Presets example for c2-theme-select.",
|
|
46238
|
+
"isDefault": false,
|
|
46239
|
+
"tags": [
|
|
46240
|
+
"c2-theme-select"
|
|
46241
|
+
],
|
|
46242
|
+
"html": "<c2-theme-select class=\"compact\" manual modes=\"light,dark\"></c2-theme-select>",
|
|
46243
|
+
"css": ".compact {\n --c2-theme-select__trigger--size: 24px;\n --c2-theme-select__trigger--border-radius: 4px;\n --c2-theme-select__icon--size: 14px;\n}"
|
|
46244
|
+
},
|
|
46245
|
+
{
|
|
46246
|
+
"kind": "preview",
|
|
46247
|
+
"label": "Preview",
|
|
46248
|
+
"html": "<div class=\"preview-row\"><c2-theme-select manual></c2-theme-select><c2-theme-select manual show-label style=\"--c2-theme-select__trigger--border:1px solid #bcbcc6;--c2-theme-select__trigger--border-radius:6px\"></c2-theme-select><c2-theme-select manual modes=\"light,dark\" style=\"--c2-theme-select__trigger--border-radius:999px;--c2-theme-select__trigger--background:#f4f4f5\"></c2-theme-select></div>"
|
|
46249
|
+
}
|
|
46250
|
+
],
|
|
46251
|
+
"hasGallery": true
|
|
46252
|
+
},
|
|
43634
46253
|
"toast": {
|
|
43635
46254
|
"id": "toast",
|
|
43636
46255
|
"package": "@c2n/toast",
|
|
@@ -46830,8 +49449,10 @@
|
|
|
46830
49449
|
"c2-attachment-group": "attachment",
|
|
46831
49450
|
"c2-autocomplete": "autocomplete",
|
|
46832
49451
|
"c2-avatar": "avatar",
|
|
49452
|
+
"c2-avatar-group": "avatar",
|
|
46833
49453
|
"c2-badge": "badge",
|
|
46834
49454
|
"c2-bar-chart": "bar-chart",
|
|
49455
|
+
"c2-border-beam": "border-beam",
|
|
46835
49456
|
"c2-breadcrumb": "breadcrumb",
|
|
46836
49457
|
"c2-button": "button",
|
|
46837
49458
|
"c2-button-group": "button-group",
|
|
@@ -46845,6 +49466,7 @@
|
|
|
46845
49466
|
"c2-chat-message": "chat-message",
|
|
46846
49467
|
"c2-chatbot": "chatbot",
|
|
46847
49468
|
"c2-checkbox": "checkbox",
|
|
49469
|
+
"c2-code-editor": "code-editor",
|
|
46848
49470
|
"c2-code-viewer": "code-viewer",
|
|
46849
49471
|
"c2-color-area": "color-area",
|
|
46850
49472
|
"c2-color-select": "color-select",
|
|
@@ -46893,6 +49515,8 @@
|
|
|
46893
49515
|
"c2-spinner": "spinner",
|
|
46894
49516
|
"c2-stat": "stat",
|
|
46895
49517
|
"c2-status-panel": "status-panel",
|
|
49518
|
+
"c2-step": "steps",
|
|
49519
|
+
"c2-steps": "steps",
|
|
46896
49520
|
"c2-switch": "switch",
|
|
46897
49521
|
"c2-tab": "tabs",
|
|
46898
49522
|
"c2-table": "table",
|
|
@@ -46901,6 +49525,7 @@
|
|
|
46901
49525
|
"c2-text-field": "text-field",
|
|
46902
49526
|
"c2-text-field-clear": "text-field",
|
|
46903
49527
|
"c2-textarea": "textarea",
|
|
49528
|
+
"c2-theme-select": "theme-select",
|
|
46904
49529
|
"c2-toast": "toast",
|
|
46905
49530
|
"c2-toast-region": "toast",
|
|
46906
49531
|
"c2-tooltip": "tooltip",
|
|
@@ -46915,6 +49540,7 @@
|
|
|
46915
49540
|
"@c2n/autocomplete": "autocomplete",
|
|
46916
49541
|
"@c2n/avatar": "avatar",
|
|
46917
49542
|
"@c2n/badge": "badge",
|
|
49543
|
+
"@c2n/border-beam": "border-beam",
|
|
46918
49544
|
"@c2n/breadcrumb": "breadcrumb",
|
|
46919
49545
|
"@c2n/button": "button",
|
|
46920
49546
|
"@c2n/button-group": "button-group",
|
|
@@ -46925,6 +49551,7 @@
|
|
|
46925
49551
|
"@c2n/chat-message": "chat-message",
|
|
46926
49552
|
"@c2n/chatbot": "chatbot",
|
|
46927
49553
|
"@c2n/checkbox": "checkbox",
|
|
49554
|
+
"@c2n/code-editor": "code-editor",
|
|
46928
49555
|
"@c2n/code-viewer": "code-viewer",
|
|
46929
49556
|
"@c2n/color-area": "color-area",
|
|
46930
49557
|
"@c2n/color-select": "color-select",
|
|
@@ -46965,11 +49592,13 @@
|
|
|
46965
49592
|
"@c2n/spinner": "spinner",
|
|
46966
49593
|
"@c2n/stat": "stat",
|
|
46967
49594
|
"@c2n/status-panel": "status-panel",
|
|
49595
|
+
"@c2n/steps": "steps",
|
|
46968
49596
|
"@c2n/switch": "switch",
|
|
46969
49597
|
"@c2n/table": "table",
|
|
46970
49598
|
"@c2n/tabs": "tabs",
|
|
46971
49599
|
"@c2n/text-field": "text-field",
|
|
46972
49600
|
"@c2n/textarea": "textarea",
|
|
49601
|
+
"@c2n/theme-select": "theme-select",
|
|
46973
49602
|
"@c2n/toast": "toast",
|
|
46974
49603
|
"@c2n/tooltip": "tooltip",
|
|
46975
49604
|
"@c2n/tree": "tree",
|
|
@@ -46993,7 +49622,7 @@
|
|
|
46993
49622
|
"light": "#0265dc",
|
|
46994
49623
|
"dark": "#5aa3ff",
|
|
46995
49624
|
"description": "Accent colour: filled buttons, selected states, focused borders, links.",
|
|
46996
|
-
"usedBy":
|
|
49625
|
+
"usedBy": 56
|
|
46997
49626
|
},
|
|
46998
49627
|
{
|
|
46999
49628
|
"name": "--c2-theme--color-primary-hover",
|
|
@@ -47041,7 +49670,7 @@
|
|
|
47041
49670
|
"light": "#ffffff",
|
|
47042
49671
|
"dark": "#18181b",
|
|
47043
49672
|
"description": "Default surface of inputs, lists, cards, dialogs.",
|
|
47044
|
-
"usedBy":
|
|
49673
|
+
"usedBy": 47
|
|
47045
49674
|
},
|
|
47046
49675
|
{
|
|
47047
49676
|
"name": "--c2-theme--color-surface-container-low",
|
|
@@ -47057,7 +49686,7 @@
|
|
|
47057
49686
|
"light": "#f4f4f5",
|
|
47058
49687
|
"dark": "#27272a",
|
|
47059
49688
|
"description": "Hover surface for rows and icon buttons.",
|
|
47060
|
-
"usedBy":
|
|
49689
|
+
"usedBy": 34
|
|
47061
49690
|
},
|
|
47062
49691
|
{
|
|
47063
49692
|
"name": "--c2-theme--color-on-surface",
|
|
@@ -47065,7 +49694,7 @@
|
|
|
47065
49694
|
"light": "#18181b",
|
|
47066
49695
|
"dark": "#f4f4f5",
|
|
47067
49696
|
"description": "Primary text colour.",
|
|
47068
|
-
"usedBy":
|
|
49697
|
+
"usedBy": 61
|
|
47069
49698
|
},
|
|
47070
49699
|
{
|
|
47071
49700
|
"name": "--c2-theme--color-on-surface-variant",
|
|
@@ -47073,7 +49702,7 @@
|
|
|
47073
49702
|
"light": "#71717a",
|
|
47074
49703
|
"dark": "#a1a1aa",
|
|
47075
49704
|
"description": "Secondary text, placeholders, icons, supporting text.",
|
|
47076
|
-
"usedBy":
|
|
49705
|
+
"usedBy": 94
|
|
47077
49706
|
},
|
|
47078
49707
|
{
|
|
47079
49708
|
"name": "--c2-theme--color-outline",
|
|
@@ -47089,7 +49718,7 @@
|
|
|
47089
49718
|
"light": "#e4e4e7",
|
|
47090
49719
|
"dark": "#27272a",
|
|
47091
49720
|
"description": "Hairline dividers and light borders.",
|
|
47092
|
-
"usedBy":
|
|
49721
|
+
"usedBy": 74
|
|
47093
49722
|
},
|
|
47094
49723
|
{
|
|
47095
49724
|
"name": "--c2-theme--color-outline-strong",
|
|
@@ -47105,7 +49734,7 @@
|
|
|
47105
49734
|
"light": "#dc2626",
|
|
47106
49735
|
"dark": "#f87171",
|
|
47107
49736
|
"description": "Error borders, error text, required indicators.",
|
|
47108
|
-
"usedBy":
|
|
49737
|
+
"usedBy": 25
|
|
47109
49738
|
},
|
|
47110
49739
|
{
|
|
47111
49740
|
"name": "--c2-theme--color-scrim",
|
|
@@ -47121,7 +49750,7 @@
|
|
|
47121
49750
|
"light": "#18181b",
|
|
47122
49751
|
"dark": "#f4f4f5",
|
|
47123
49752
|
"description": "High-contrast surface, e.g. tooltips.",
|
|
47124
|
-
"usedBy":
|
|
49753
|
+
"usedBy": 6
|
|
47125
49754
|
},
|
|
47126
49755
|
{
|
|
47127
49756
|
"name": "--c2-theme--color-on-inverse-surface",
|
|
@@ -47129,42 +49758,42 @@
|
|
|
47129
49758
|
"light": "#fafafa",
|
|
47130
49759
|
"dark": "#18181b",
|
|
47131
49760
|
"description": "Text drawn on the inverse surface.",
|
|
47132
|
-
"usedBy":
|
|
49761
|
+
"usedBy": 5
|
|
47133
49762
|
},
|
|
47134
49763
|
{
|
|
47135
49764
|
"name": "--c2-theme--font-family",
|
|
47136
49765
|
"category": "font",
|
|
47137
49766
|
"light": null,
|
|
47138
49767
|
"description": "Font family of every component. Unset by default so components inherit the page font.",
|
|
47139
|
-
"usedBy":
|
|
49768
|
+
"usedBy": 3
|
|
47140
49769
|
},
|
|
47141
49770
|
{
|
|
47142
49771
|
"name": "--c2-theme--font-size-sm",
|
|
47143
49772
|
"category": "font",
|
|
47144
49773
|
"light": "12px",
|
|
47145
49774
|
"description": "Small text: supporting text, tooltips, descriptions, timestamps.",
|
|
47146
|
-
"usedBy":
|
|
49775
|
+
"usedBy": 34
|
|
47147
49776
|
},
|
|
47148
49777
|
{
|
|
47149
49778
|
"name": "--c2-theme--font-size-md",
|
|
47150
49779
|
"category": "font",
|
|
47151
49780
|
"light": "14px",
|
|
47152
49781
|
"description": "Body text: buttons, inputs, list items, dialog content.",
|
|
47153
|
-
"usedBy":
|
|
49782
|
+
"usedBy": 44
|
|
47154
49783
|
},
|
|
47155
49784
|
{
|
|
47156
49785
|
"name": "--c2-theme--font-weight-medium",
|
|
47157
49786
|
"category": "font",
|
|
47158
49787
|
"light": "500",
|
|
47159
49788
|
"description": "Medium weight: buttons, headers, tooltips.",
|
|
47160
|
-
"usedBy":
|
|
49789
|
+
"usedBy": 24
|
|
47161
49790
|
},
|
|
47162
49791
|
{
|
|
47163
49792
|
"name": "--c2-theme--font-weight-semibold",
|
|
47164
49793
|
"category": "font",
|
|
47165
49794
|
"light": "600",
|
|
47166
49795
|
"description": "Semibold weight: dialog titles, list headings, avatars.",
|
|
47167
|
-
"usedBy":
|
|
49796
|
+
"usedBy": 21
|
|
47168
49797
|
},
|
|
47169
49798
|
{
|
|
47170
49799
|
"name": "--c2-theme--radius-sm",
|
|
@@ -47178,14 +49807,14 @@
|
|
|
47178
49807
|
"category": "radius",
|
|
47179
49808
|
"light": "6px",
|
|
47180
49809
|
"description": "Default radius: buttons, inputs, list items, tooltips.",
|
|
47181
|
-
"usedBy":
|
|
49810
|
+
"usedBy": 50
|
|
47182
49811
|
},
|
|
47183
49812
|
{
|
|
47184
49813
|
"name": "--c2-theme--radius-lg",
|
|
47185
49814
|
"category": "radius",
|
|
47186
49815
|
"light": "8px",
|
|
47187
49816
|
"description": "Large radius: cards, panels, popovers.",
|
|
47188
|
-
"usedBy":
|
|
49817
|
+
"usedBy": 68
|
|
47189
49818
|
},
|
|
47190
49819
|
{
|
|
47191
49820
|
"name": "--c2-theme--radius-xl",
|
|
@@ -47199,7 +49828,7 @@
|
|
|
47199
49828
|
"category": "radius",
|
|
47200
49829
|
"light": "999px",
|
|
47201
49830
|
"description": "Pill / circle radius: avatars, icon buttons.",
|
|
47202
|
-
"usedBy":
|
|
49831
|
+
"usedBy": 19
|
|
47203
49832
|
},
|
|
47204
49833
|
{
|
|
47205
49834
|
"name": "--c2-theme--border-width",
|
|
@@ -47213,7 +49842,7 @@
|
|
|
47213
49842
|
"category": "border",
|
|
47214
49843
|
"light": null,
|
|
47215
49844
|
"description": "Complete resting border shorthand. Unset by default: it falls back to `border-width solid color-outline`.",
|
|
47216
|
-
"usedBy":
|
|
49845
|
+
"usedBy": 48
|
|
47217
49846
|
},
|
|
47218
49847
|
{
|
|
47219
49848
|
"name": "--c2-theme--focus-ring",
|
|
@@ -47221,21 +49850,21 @@
|
|
|
47221
49850
|
"light": "2px solid rgba(2, 101, 220, 0.4)",
|
|
47222
49851
|
"dark": "2px solid rgba(90, 163, 255, 0.5)",
|
|
47223
49852
|
"description": "Focus-visible outline of every component.",
|
|
47224
|
-
"usedBy":
|
|
49853
|
+
"usedBy": 37
|
|
47225
49854
|
},
|
|
47226
49855
|
{
|
|
47227
49856
|
"name": "--c2-theme--disabled-opacity",
|
|
47228
49857
|
"category": "disabled",
|
|
47229
49858
|
"light": "0.38",
|
|
47230
49859
|
"description": "Opacity of disabled components.",
|
|
47231
|
-
"usedBy":
|
|
49860
|
+
"usedBy": 39
|
|
47232
49861
|
},
|
|
47233
49862
|
{
|
|
47234
49863
|
"name": "--c2-theme--motion-scale",
|
|
47235
49864
|
"category": "motion",
|
|
47236
49865
|
"light": "1",
|
|
47237
49866
|
"description": "Multiplier applied to every transition and animation duration (0 disables motion).",
|
|
47238
|
-
"usedBy":
|
|
49867
|
+
"usedBy": 19
|
|
47239
49868
|
},
|
|
47240
49869
|
{
|
|
47241
49870
|
"name": "--c2-theme--shadow-md",
|
|
@@ -47243,7 +49872,7 @@
|
|
|
47243
49872
|
"light": "0 8px 24px rgba(24, 24, 27, 0.08)",
|
|
47244
49873
|
"dark": "0 8px 24px rgba(0, 0, 0, 0.45)",
|
|
47245
49874
|
"description": "Shadow of popovers, menus and tooltips.",
|
|
47246
|
-
"usedBy":
|
|
49875
|
+
"usedBy": 10
|
|
47247
49876
|
},
|
|
47248
49877
|
{
|
|
47249
49878
|
"name": "--c2-theme--shadow-lg",
|
|
@@ -47394,6 +50023,12 @@
|
|
|
47394
50023
|
"--c2-avatar__remove--border": "--c2-theme--color-outline-variant",
|
|
47395
50024
|
"--c2-avatar__remove--box-shadow": "--c2-theme--shadow-sm",
|
|
47396
50025
|
"--c2-avatar__badge--border": "--c2-theme--color-surface",
|
|
50026
|
+
"--c2-avatar-group__overflow--background": "--c2-theme--color-inverse-surface",
|
|
50027
|
+
"--c2-avatar-group__overflow--color": "--c2-theme--color-on-inverse-surface",
|
|
50028
|
+
"--c2-avatar-group__overflow--border": "--c2-theme--color-surface",
|
|
50029
|
+
"--c2-avatar-group__overflow--border-radius": "--c2-theme--radius-full",
|
|
50030
|
+
"--c2-avatar-group__overflow--font-size": "--c2-theme--font-size-sm",
|
|
50031
|
+
"--c2-avatar-group__overflow--font-weight": "--c2-theme--font-weight-semibold",
|
|
47397
50032
|
"--c2-badge--border-radius": "--c2-theme--radius-full",
|
|
47398
50033
|
"--c2-badge--font-size": "--c2-theme--font-size-sm",
|
|
47399
50034
|
"--c2-badge--font-weight": "--c2-theme--font-weight-medium",
|
|
@@ -47404,6 +50039,8 @@
|
|
|
47404
50039
|
"--c2-badge__danger--color": "--c2-theme--color-error",
|
|
47405
50040
|
"--c2-badge__pulse--animation-duration": "--c2-theme--motion-scale",
|
|
47406
50041
|
"--c2-badge__anchor--border": "--c2-theme--color-surface",
|
|
50042
|
+
"--c2-border-beam__beam--radius": "--c2-theme--radius-lg",
|
|
50043
|
+
"--c2-border-beam__beam--color-from": "--c2-theme--color-primary",
|
|
47407
50044
|
"--c2-breadcrumb__separator--color": "--c2-theme--color-on-surface-variant",
|
|
47408
50045
|
"--c2-breadcrumb__item--color": "--c2-theme--color-on-surface-variant",
|
|
47409
50046
|
"--c2-breadcrumb__item--font-size": "--c2-theme--font-size-md",
|
|
@@ -47546,6 +50183,28 @@
|
|
|
47546
50183
|
"--c2-checkbox__state-layer--border-top-right-radius": "--c2-theme--radius-md",
|
|
47547
50184
|
"--c2-checkbox__state-layer--border-bottom-left-radius": "--c2-theme--radius-md",
|
|
47548
50185
|
"--c2-checkbox__state-layer--border-bottom-right-radius": "--c2-theme--radius-md",
|
|
50186
|
+
"--c2-code-editor--background": "--c2-theme--color-surface",
|
|
50187
|
+
"--c2-code-editor--border": "--c2-theme--border",
|
|
50188
|
+
"--c2-code-editor__focus--border": "--c2-theme--color-primary",
|
|
50189
|
+
"--c2-code-editor__focus--outline": "--c2-theme--focus-ring",
|
|
50190
|
+
"--c2-code-editor--border-radius": "--c2-theme--radius-md",
|
|
50191
|
+
"--c2-code-editor__disabled--opacity": "--c2-theme--disabled-opacity",
|
|
50192
|
+
"--c2-code-editor--font-family": "--c2-theme--font-family",
|
|
50193
|
+
"--c2-code-editor__gutter--color": "--c2-theme--color-on-surface-variant",
|
|
50194
|
+
"--c2-code-editor__gutter__active--color": "--c2-theme--color-on-surface",
|
|
50195
|
+
"--c2-code-editor__gutter--border-right": "--c2-theme--color-outline-variant",
|
|
50196
|
+
"--c2-code-editor__active-line--background": "--c2-theme--color-primary",
|
|
50197
|
+
"--c2-code-editor__selection--background": "--c2-theme--color-primary",
|
|
50198
|
+
"--c2-code-editor__cursor--color": "--c2-theme--color-on-surface",
|
|
50199
|
+
"--c2-code-editor__matching-bracket--background": "--c2-theme--color-primary",
|
|
50200
|
+
"--c2-code-editor__placeholder--color": "--c2-theme--color-on-surface-variant",
|
|
50201
|
+
"--c2-code-editor__label--color": "--c2-theme--color-on-surface",
|
|
50202
|
+
"--c2-code-editor__label--font-size": "--c2-theme--font-size-sm",
|
|
50203
|
+
"--c2-code-editor__label--font-weight": "--c2-theme--font-weight-medium",
|
|
50204
|
+
"--c2-code-editor__supporting-text--color": "--c2-theme--color-on-surface-variant",
|
|
50205
|
+
"--c2-code-editor__supporting-text--font-size": "--c2-theme--font-size-sm",
|
|
50206
|
+
"--c2-code-editor__error--color": "--c2-theme--color-error",
|
|
50207
|
+
"--c2-code-editor__error--border": "--c2-theme--color-error",
|
|
47549
50208
|
"--c2-code-viewer--border-top": "--c2-theme--border",
|
|
47550
50209
|
"--c2-code-viewer--border-right": "--c2-theme--border",
|
|
47551
50210
|
"--c2-code-viewer--border-bottom": "--c2-theme--border",
|
|
@@ -48002,6 +50661,24 @@
|
|
|
48002
50661
|
"--c2-status-panel__description--font-size": "--c2-theme--font-size-md",
|
|
48003
50662
|
"--c2-status-panel__content--border-radius": "--c2-theme--radius-lg",
|
|
48004
50663
|
"--c2-status-panel__content--background-color": "--c2-theme--color-surface-container",
|
|
50664
|
+
"--c2-step__row--border-bottom": "--c2-theme--color-outline-variant",
|
|
50665
|
+
"--c2-step__toggle--color": "--c2-theme--color-on-surface-variant",
|
|
50666
|
+
"--c2-step__guide--color": "--c2-theme--color-outline-variant",
|
|
50667
|
+
"--c2-step__marker--font-weight": "--c2-theme--font-weight-semibold",
|
|
50668
|
+
"--c2-step__marker--border-radius": "--c2-theme--radius-full",
|
|
50669
|
+
"--c2-step__marker--border": "--c2-theme--border",
|
|
50670
|
+
"--c2-step__marker--color": "--c2-theme--color-on-surface-variant",
|
|
50671
|
+
"--c2-step__rail--color": "--c2-theme--color-outline-variant",
|
|
50672
|
+
"--c2-step__label--color": "--c2-theme--color-on-surface",
|
|
50673
|
+
"--c2-step__label--font-weight": "--c2-theme--font-weight-medium",
|
|
50674
|
+
"--c2-step__label--font-family": "--c2-theme--font-family",
|
|
50675
|
+
"--c2-step__detail--color": "--c2-theme--color-on-surface-variant",
|
|
50676
|
+
"--c2-step__trailing--color": "--c2-theme--color-on-surface-variant",
|
|
50677
|
+
"--c2-step__error--color": "--c2-theme--color-error",
|
|
50678
|
+
"--c2-step__running--color": "--c2-theme--color-primary",
|
|
50679
|
+
"--c2-step__current--color": "--c2-theme--color-primary",
|
|
50680
|
+
"--c2-step__skipped--color": "--c2-theme--color-on-surface-variant",
|
|
50681
|
+
"--c2-step--transition-duration": "--c2-theme--motion-scale",
|
|
48005
50682
|
"--c2-switch__container__disabled--opacity": "--c2-theme--disabled-opacity",
|
|
48006
50683
|
"--c2-switch__track--border-radius": "--c2-theme--radius-full",
|
|
48007
50684
|
"--c2-switch__track--color": "--c2-theme--color-outline-variant",
|
|
@@ -48114,6 +50791,24 @@
|
|
|
48114
50791
|
"--c2-textarea__supporting-text--font-size": "--c2-theme--font-size-sm",
|
|
48115
50792
|
"--c2-textarea__supporting-text--color": "--c2-theme--color-on-surface-variant",
|
|
48116
50793
|
"--c2-textarea__supporting-text__error--color": "--c2-theme--color-error",
|
|
50794
|
+
"--c2-theme-select__trigger--border-radius": "--c2-theme--radius-lg",
|
|
50795
|
+
"--c2-theme-select__trigger--color": "--c2-theme--color-on-surface",
|
|
50796
|
+
"--c2-theme-select__trigger__hover--background": "--c2-theme--color-surface-container",
|
|
50797
|
+
"--c2-theme-select__trigger__focus--outline": "--c2-theme--focus-ring",
|
|
50798
|
+
"--c2-theme-select__trigger__disabled--opacity": "--c2-theme--disabled-opacity",
|
|
50799
|
+
"--c2-theme-select__label--font-size": "--c2-theme--font-size-md",
|
|
50800
|
+
"--c2-theme-select__label--font-weight": "--c2-theme--font-weight-medium",
|
|
50801
|
+
"--c2-theme-select__menu--background": "--c2-theme--color-surface",
|
|
50802
|
+
"--c2-theme-select__menu--border": "--c2-theme--color-outline-variant",
|
|
50803
|
+
"--c2-theme-select__menu--border-radius": "--c2-theme--radius-lg",
|
|
50804
|
+
"--c2-theme-select__menu--box-shadow": "--c2-theme--shadow-md",
|
|
50805
|
+
"--c2-theme-select__menu-item--border-radius": "--c2-theme--radius-md",
|
|
50806
|
+
"--c2-theme-select__menu-item--color": "--c2-theme--color-on-surface",
|
|
50807
|
+
"--c2-theme-select__menu-item--font-size": "--c2-theme--font-size-md",
|
|
50808
|
+
"--c2-theme-select__menu-item--font-weight": "--c2-theme--font-weight-medium",
|
|
50809
|
+
"--c2-theme-select__menu-item__hover--background": "--c2-theme--color-surface-container",
|
|
50810
|
+
"--c2-theme-select__menu-item__selected--color": "--c2-theme--color-primary",
|
|
50811
|
+
"--c2-theme-select--transition-duration": "--c2-theme--motion-scale",
|
|
48117
50812
|
"--c2-toast__container--background": "--c2-theme--color-surface",
|
|
48118
50813
|
"--c2-toast__container--color": "--c2-theme--color-on-surface",
|
|
48119
50814
|
"--c2-toast__container--border": "--c2-theme--color-outline-variant",
|