@c2n/mcp 0.0.10 → 0.0.11
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 +838 -13
- 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.11",
|
|
4
4
|
"categories": [
|
|
5
5
|
"Inputs",
|
|
6
6
|
"Buttons",
|
|
@@ -14062,6 +14062,812 @@
|
|
|
14062
14062
|
],
|
|
14063
14063
|
"hasGallery": true
|
|
14064
14064
|
},
|
|
14065
|
+
"dashboard": {
|
|
14066
|
+
"id": "dashboard",
|
|
14067
|
+
"package": "@c2n/dashboard",
|
|
14068
|
+
"title": "Dashboard",
|
|
14069
|
+
"description": "Grid of resizable panes, dragged by the edges they share.",
|
|
14070
|
+
"intro": "`c2-dashboard` is a CSS grid whose tracks the user can drag. Its children are `c2-dash-card` panes, each placed by",
|
|
14071
|
+
"category": "Layout",
|
|
14072
|
+
"status": "stable",
|
|
14073
|
+
"docsUrl": "https://code2nguyen.github.io/web-components/components/dashboard",
|
|
14074
|
+
"elements": [
|
|
14075
|
+
{
|
|
14076
|
+
"tag": "c2-dashboard",
|
|
14077
|
+
"className": "Dashboard",
|
|
14078
|
+
"modulePath": "@c2n/dashboard",
|
|
14079
|
+
"description": "Grid of resizable panes. The children are `c2-dash-card` elements, placed by their `col`/`row` attributes; each\none draws drag handles on the edges it shares with a neighbour, and dragging one resizes the whole track, so the\ncards on either side stay aligned. `columns` and `rows` take a track count (`columns=\"3\"` is three equal columns)\nor an explicit track list (`columns=\"320px 1fr\"`); a track is switched to pixels the first time it is dragged, and\nthe `fr` tracks around it give up the space in proportion to their weight, down to the minimums. With a\n`storage-key` the sizes survive a reload.\n\nThe grid is the sizing authority: a card never sets its own width. Give the element a height (or place it in a\nflex/grid parent that does) whenever the rows use `fr`, since the row tracks divide the host's height.",
|
|
14080
|
+
"attributes": [
|
|
14081
|
+
{
|
|
14082
|
+
"name": "columns",
|
|
14083
|
+
"type": "number | string | string[]",
|
|
14084
|
+
"default": "2",
|
|
14085
|
+
"description": "Column count (`3`) or an explicit track list (`'320px 1fr'`). Each entry must be one simple size."
|
|
14086
|
+
},
|
|
14087
|
+
{
|
|
14088
|
+
"name": "rows",
|
|
14089
|
+
"type": "number | string | string[]",
|
|
14090
|
+
"default": "1",
|
|
14091
|
+
"description": "Row count (`2`) or an explicit track list (`'auto 1fr'`)."
|
|
14092
|
+
},
|
|
14093
|
+
{
|
|
14094
|
+
"name": "min-column-width",
|
|
14095
|
+
"type": "number",
|
|
14096
|
+
"default": "50",
|
|
14097
|
+
"description": "Floor for every column, in pixels. A card's own `min-width` raises it for the tracks that card covers."
|
|
14098
|
+
},
|
|
14099
|
+
{
|
|
14100
|
+
"name": "min-row-height",
|
|
14101
|
+
"type": "number",
|
|
14102
|
+
"default": "50",
|
|
14103
|
+
"description": "Floor for every row, in pixels. A card's own `min-height` raises it for the tracks that card covers."
|
|
14104
|
+
},
|
|
14105
|
+
{
|
|
14106
|
+
"name": "storage-key",
|
|
14107
|
+
"type": "string | undefined",
|
|
14108
|
+
"default": "undefined",
|
|
14109
|
+
"description": "`localStorage` key the track sizes are stored under. Without it the grid starts from the authored tracks."
|
|
14110
|
+
}
|
|
14111
|
+
],
|
|
14112
|
+
"slots": [
|
|
14113
|
+
{
|
|
14114
|
+
"name": "",
|
|
14115
|
+
"description": "The `c2-dash-card` panes. Anything else becomes an ordinary grid item, placed by your own CSS."
|
|
14116
|
+
}
|
|
14117
|
+
],
|
|
14118
|
+
"events": [
|
|
14119
|
+
{
|
|
14120
|
+
"name": "layout-change",
|
|
14121
|
+
"type": "CustomEvent<DashboardLayoutChangeDetail>",
|
|
14122
|
+
"description": "The track sizes changed and the gesture ended. Does not bubble: listen on the element."
|
|
14123
|
+
}
|
|
14124
|
+
],
|
|
14125
|
+
"cssParts": [],
|
|
14126
|
+
"cssProperties": [
|
|
14127
|
+
{
|
|
14128
|
+
"name": "--c2-dashboard--gap",
|
|
14129
|
+
"type": "pixel",
|
|
14130
|
+
"default": "8px",
|
|
14131
|
+
"part": "",
|
|
14132
|
+
"property": "gap",
|
|
14133
|
+
"description": "Gutter between the cards. The drag handles sit inside the cards, so a gutter under ~6px is hard to grab."
|
|
14134
|
+
},
|
|
14135
|
+
{
|
|
14136
|
+
"name": "--c2-dashboard--padding",
|
|
14137
|
+
"type": "padding",
|
|
14138
|
+
"default": "0px",
|
|
14139
|
+
"part": "",
|
|
14140
|
+
"property": "padding",
|
|
14141
|
+
"description": "Inset around the tracks. With a `background` it is what turns the gutters into a visible frame between the panes."
|
|
14142
|
+
},
|
|
14143
|
+
{
|
|
14144
|
+
"name": "--c2-dashboard--background",
|
|
14145
|
+
"type": "background",
|
|
14146
|
+
"default": "transparent",
|
|
14147
|
+
"part": "",
|
|
14148
|
+
"property": "background"
|
|
14149
|
+
},
|
|
14150
|
+
{
|
|
14151
|
+
"name": "--c2-dashboard--border",
|
|
14152
|
+
"type": "border",
|
|
14153
|
+
"default": "none",
|
|
14154
|
+
"part": "",
|
|
14155
|
+
"property": "border"
|
|
14156
|
+
},
|
|
14157
|
+
{
|
|
14158
|
+
"name": "--c2-dashboard--border-radius",
|
|
14159
|
+
"type": "border-radius",
|
|
14160
|
+
"default": "0px",
|
|
14161
|
+
"part": "",
|
|
14162
|
+
"property": "border-radius"
|
|
14163
|
+
}
|
|
14164
|
+
]
|
|
14165
|
+
},
|
|
14166
|
+
{
|
|
14167
|
+
"tag": "c2-dash-card",
|
|
14168
|
+
"className": "DashCard",
|
|
14169
|
+
"modulePath": "@c2n/dashboard/dash-card.js",
|
|
14170
|
+
"description": "One pane of a `c2-dashboard`. It owns its place in the grid (`col`, `row`, `col-span`, `row-span`), the drag\nhandles on the edges it shares with a neighbour, and the optional expand controls; it draws no surface of its\nown, so put a `c2-card` — or any markup — in the default slot.\n\nA handle resizes the whole grid track, never just this card, and it only appears where there is a neighbour to\ntake the space from: the right edge has one when another column follows, the left edge when one precedes. Drag\nit, or focus it and use the arrow keys (10px a step, 1px with Shift).\n\nFilling the `header`, `actions` or `footer` slot turns on that row; with the header and actions both empty the\nexpand controls float over the top-right corner of the pane instead. An expanded card covers its neighbours, so\ngive it — or the card inside it — a background.\n\nEvery built-in icon is a slot whose fallback is the default drawing, so a pane can use the host application's own\nicon set without giving up the behaviour.",
|
|
14171
|
+
"attributes": [
|
|
14172
|
+
{
|
|
14173
|
+
"name": "card-id",
|
|
14174
|
+
"type": "string | undefined",
|
|
14175
|
+
"default": "undefined",
|
|
14176
|
+
"description": "Identifier the grid's `layout` record is keyed by."
|
|
14177
|
+
},
|
|
14178
|
+
{
|
|
14179
|
+
"name": "col",
|
|
14180
|
+
"type": "number",
|
|
14181
|
+
"default": "1",
|
|
14182
|
+
"description": "1-based column the card starts in."
|
|
14183
|
+
},
|
|
14184
|
+
{
|
|
14185
|
+
"name": "row",
|
|
14186
|
+
"type": "number",
|
|
14187
|
+
"default": "1",
|
|
14188
|
+
"description": "1-based row the card starts in."
|
|
14189
|
+
},
|
|
14190
|
+
{
|
|
14191
|
+
"name": "col-span",
|
|
14192
|
+
"type": "number",
|
|
14193
|
+
"default": "1",
|
|
14194
|
+
"description": "Number of columns the card occupies."
|
|
14195
|
+
},
|
|
14196
|
+
{
|
|
14197
|
+
"name": "row-span",
|
|
14198
|
+
"type": "number",
|
|
14199
|
+
"default": "1",
|
|
14200
|
+
"description": "Number of rows the card occupies."
|
|
14201
|
+
},
|
|
14202
|
+
{
|
|
14203
|
+
"name": "min-width",
|
|
14204
|
+
"type": "number",
|
|
14205
|
+
"default": "0",
|
|
14206
|
+
"description": "Smallest width in pixels the card accepts; it raises the minimum of every column it covers."
|
|
14207
|
+
},
|
|
14208
|
+
{
|
|
14209
|
+
"name": "min-height",
|
|
14210
|
+
"type": "number",
|
|
14211
|
+
"default": "0",
|
|
14212
|
+
"description": "Smallest height in pixels the card accepts; it raises the minimum of every row it covers."
|
|
14213
|
+
},
|
|
14214
|
+
{
|
|
14215
|
+
"name": "resize",
|
|
14216
|
+
"type": "DashCardResize",
|
|
14217
|
+
"default": "'both'",
|
|
14218
|
+
"description": "Which edges carry a drag handle."
|
|
14219
|
+
},
|
|
14220
|
+
{
|
|
14221
|
+
"name": "expand-width",
|
|
14222
|
+
"type": "boolean",
|
|
14223
|
+
"default": "false",
|
|
14224
|
+
"description": "Offers a control that expands the card across every column."
|
|
14225
|
+
},
|
|
14226
|
+
{
|
|
14227
|
+
"name": "expand-height",
|
|
14228
|
+
"type": "boolean",
|
|
14229
|
+
"default": "false",
|
|
14230
|
+
"description": "Offers a control that expands the card across every row."
|
|
14231
|
+
},
|
|
14232
|
+
{
|
|
14233
|
+
"name": "expand-full",
|
|
14234
|
+
"type": "boolean",
|
|
14235
|
+
"default": "false",
|
|
14236
|
+
"description": "Offers a control that expands the card over the whole grid."
|
|
14237
|
+
},
|
|
14238
|
+
{
|
|
14239
|
+
"name": "expanded",
|
|
14240
|
+
"type": "DashCardExpanded",
|
|
14241
|
+
"default": "'none'",
|
|
14242
|
+
"description": "How far the card is currently expanded. Settable, so an app can expand a card from its own control."
|
|
14243
|
+
}
|
|
14244
|
+
],
|
|
14245
|
+
"slots": [
|
|
14246
|
+
{
|
|
14247
|
+
"name": "",
|
|
14248
|
+
"description": "Pane content. Give it `height: 100%` (a `c2-card` already stretches) so it follows the row track."
|
|
14249
|
+
},
|
|
14250
|
+
{
|
|
14251
|
+
"name": "header",
|
|
14252
|
+
"description": "Title area of the header row; filling it turns the row on."
|
|
14253
|
+
},
|
|
14254
|
+
{
|
|
14255
|
+
"name": "actions",
|
|
14256
|
+
"description": "Your own controls at the end of the header row, before the built-in expand buttons and separated from them by `--c2-dash-card__actions--gap`."
|
|
14257
|
+
},
|
|
14258
|
+
{
|
|
14259
|
+
"name": "controls",
|
|
14260
|
+
"description": "Your own controls inside the built-in group, immediately before the expand buttons — for a button that belongs with them, such as a refresh or a close."
|
|
14261
|
+
},
|
|
14262
|
+
{
|
|
14263
|
+
"name": "footer",
|
|
14264
|
+
"description": "Status bar under the pane content; filling it turns the row on."
|
|
14265
|
+
},
|
|
14266
|
+
{
|
|
14267
|
+
"name": "expand-width-icon",
|
|
14268
|
+
"description": "Icon of the full-width control while the card is not expanded that way."
|
|
14269
|
+
},
|
|
14270
|
+
{
|
|
14271
|
+
"name": "collapse-width-icon",
|
|
14272
|
+
"description": "Icon of the full-width control while it is."
|
|
14273
|
+
},
|
|
14274
|
+
{
|
|
14275
|
+
"name": "expand-height-icon",
|
|
14276
|
+
"description": "Icon of the full-height control while the card is not expanded that way."
|
|
14277
|
+
},
|
|
14278
|
+
{
|
|
14279
|
+
"name": "collapse-height-icon",
|
|
14280
|
+
"description": "Icon of the full-height control while it is."
|
|
14281
|
+
},
|
|
14282
|
+
{
|
|
14283
|
+
"name": "expand-full-icon",
|
|
14284
|
+
"description": "Icon of the fullscreen control while the card is not expanded."
|
|
14285
|
+
},
|
|
14286
|
+
{
|
|
14287
|
+
"name": "collapse-full-icon",
|
|
14288
|
+
"description": "Icon of the fullscreen control while it is."
|
|
14289
|
+
}
|
|
14290
|
+
],
|
|
14291
|
+
"events": [
|
|
14292
|
+
{
|
|
14293
|
+
"name": "expand-change",
|
|
14294
|
+
"type": "CustomEvent<DashCardExpandChangeDetail>",
|
|
14295
|
+
"description": "The card was expanded or collapsed through one of its own controls. Does not bubble: listen on the element."
|
|
14296
|
+
}
|
|
14297
|
+
],
|
|
14298
|
+
"cssParts": [
|
|
14299
|
+
{
|
|
14300
|
+
"name": "header",
|
|
14301
|
+
"description": "The header row, or the floating control group when the header and actions slots are empty."
|
|
14302
|
+
},
|
|
14303
|
+
{
|
|
14304
|
+
"name": "body",
|
|
14305
|
+
"description": "The wrapper around the default slot."
|
|
14306
|
+
},
|
|
14307
|
+
{
|
|
14308
|
+
"name": "footer",
|
|
14309
|
+
"description": "The footer row."
|
|
14310
|
+
},
|
|
14311
|
+
{
|
|
14312
|
+
"name": "controls",
|
|
14313
|
+
"description": "The group holding the `controls` slot and the built-in expand buttons."
|
|
14314
|
+
},
|
|
14315
|
+
{
|
|
14316
|
+
"name": "control",
|
|
14317
|
+
"description": "One built-in expand button."
|
|
14318
|
+
},
|
|
14319
|
+
{
|
|
14320
|
+
"name": "handle",
|
|
14321
|
+
"description": "Every drag handle. Each also carries the part of its edge."
|
|
14322
|
+
},
|
|
14323
|
+
{
|
|
14324
|
+
"name": "handle-left",
|
|
14325
|
+
"description": "The handle on the left edge."
|
|
14326
|
+
},
|
|
14327
|
+
{
|
|
14328
|
+
"name": "handle-right",
|
|
14329
|
+
"description": "The handle on the right edge."
|
|
14330
|
+
},
|
|
14331
|
+
{
|
|
14332
|
+
"name": "handle-top",
|
|
14333
|
+
"description": "The handle on the top edge."
|
|
14334
|
+
},
|
|
14335
|
+
{
|
|
14336
|
+
"name": "handle-bottom",
|
|
14337
|
+
"description": "The handle on the bottom edge."
|
|
14338
|
+
}
|
|
14339
|
+
],
|
|
14340
|
+
"cssProperties": [
|
|
14341
|
+
{
|
|
14342
|
+
"name": "--c2-dash-card--background",
|
|
14343
|
+
"type": "background",
|
|
14344
|
+
"default": "transparent",
|
|
14345
|
+
"part": "",
|
|
14346
|
+
"property": "background"
|
|
14347
|
+
},
|
|
14348
|
+
{
|
|
14349
|
+
"name": "--c2-dash-card--border",
|
|
14350
|
+
"type": "border",
|
|
14351
|
+
"default": "none",
|
|
14352
|
+
"part": "",
|
|
14353
|
+
"property": "border"
|
|
14354
|
+
},
|
|
14355
|
+
{
|
|
14356
|
+
"name": "--c2-dash-card--border-radius",
|
|
14357
|
+
"type": "border-radius",
|
|
14358
|
+
"default": "0px",
|
|
14359
|
+
"part": "",
|
|
14360
|
+
"property": "border-radius"
|
|
14361
|
+
},
|
|
14362
|
+
{
|
|
14363
|
+
"name": "--c2-dash-card--box-shadow",
|
|
14364
|
+
"type": "box-shadow",
|
|
14365
|
+
"default": "none",
|
|
14366
|
+
"part": "",
|
|
14367
|
+
"property": "box-shadow"
|
|
14368
|
+
},
|
|
14369
|
+
{
|
|
14370
|
+
"name": "--c2-dash-card--padding",
|
|
14371
|
+
"type": "padding",
|
|
14372
|
+
"default": "0px",
|
|
14373
|
+
"part": "",
|
|
14374
|
+
"property": "padding"
|
|
14375
|
+
},
|
|
14376
|
+
{
|
|
14377
|
+
"name": "--c2-dash-card--overflow",
|
|
14378
|
+
"type": "overflow",
|
|
14379
|
+
"default": "hidden",
|
|
14380
|
+
"part": "",
|
|
14381
|
+
"property": "overflow",
|
|
14382
|
+
"description": "`hidden` keeps the content inside the track; switch it to `visible` for a pane that has to overflow, such as one holding a menu."
|
|
14383
|
+
},
|
|
14384
|
+
{
|
|
14385
|
+
"name": "--c2-dash-card__expanded--background",
|
|
14386
|
+
"type": "background",
|
|
14387
|
+
"part": "",
|
|
14388
|
+
"state": "expanded",
|
|
14389
|
+
"property": "background",
|
|
14390
|
+
"description": "Fill while the card is expanded over its neighbours; falls back to `--c2-dash-card--background`, which is transparent, so set one of the two."
|
|
14391
|
+
},
|
|
14392
|
+
{
|
|
14393
|
+
"name": "--c2-dash-card__expanded--z-index",
|
|
14394
|
+
"type": "number",
|
|
14395
|
+
"default": "20",
|
|
14396
|
+
"part": "",
|
|
14397
|
+
"state": "expanded",
|
|
14398
|
+
"property": "z-index"
|
|
14399
|
+
},
|
|
14400
|
+
{
|
|
14401
|
+
"name": "--c2-dash-card__expanded--animation-duration",
|
|
14402
|
+
"type": "duration",
|
|
14403
|
+
"default": "200ms",
|
|
14404
|
+
"part": "",
|
|
14405
|
+
"state": "expanded",
|
|
14406
|
+
"property": "animation-duration",
|
|
14407
|
+
"token": "--c2-theme--motion-scale",
|
|
14408
|
+
"description": "Length of the scale-in the card plays when it expands or collapses. Ignored under `prefers-reduced-motion`."
|
|
14409
|
+
},
|
|
14410
|
+
{
|
|
14411
|
+
"name": "--c2-dash-card__header--min-height",
|
|
14412
|
+
"type": "pixel",
|
|
14413
|
+
"default": "44px",
|
|
14414
|
+
"part": "header",
|
|
14415
|
+
"property": "min-height"
|
|
14416
|
+
},
|
|
14417
|
+
{
|
|
14418
|
+
"name": "--c2-dash-card__header--padding-block",
|
|
14419
|
+
"type": "padding",
|
|
14420
|
+
"default": "8px",
|
|
14421
|
+
"part": "header",
|
|
14422
|
+
"property": "padding-block"
|
|
14423
|
+
},
|
|
14424
|
+
{
|
|
14425
|
+
"name": "--c2-dash-card__header--padding-inline",
|
|
14426
|
+
"type": "padding",
|
|
14427
|
+
"default": "12px",
|
|
14428
|
+
"part": "header",
|
|
14429
|
+
"property": "padding-inline"
|
|
14430
|
+
},
|
|
14431
|
+
{
|
|
14432
|
+
"name": "--c2-dash-card__header--gap",
|
|
14433
|
+
"type": "pixel",
|
|
14434
|
+
"default": "12px",
|
|
14435
|
+
"part": "header",
|
|
14436
|
+
"property": "gap"
|
|
14437
|
+
},
|
|
14438
|
+
{
|
|
14439
|
+
"name": "--c2-dash-card__header--background",
|
|
14440
|
+
"type": "background",
|
|
14441
|
+
"default": "transparent",
|
|
14442
|
+
"part": "header",
|
|
14443
|
+
"property": "background"
|
|
14444
|
+
},
|
|
14445
|
+
{
|
|
14446
|
+
"name": "--c2-dash-card__header--border-bottom",
|
|
14447
|
+
"type": "border",
|
|
14448
|
+
"default": "none",
|
|
14449
|
+
"part": "header",
|
|
14450
|
+
"property": "border-bottom"
|
|
14451
|
+
},
|
|
14452
|
+
{
|
|
14453
|
+
"name": "--c2-dash-card__header--color",
|
|
14454
|
+
"type": "color",
|
|
14455
|
+
"default": "#18181b",
|
|
14456
|
+
"part": "header",
|
|
14457
|
+
"property": "color",
|
|
14458
|
+
"token": "--c2-theme--color-on-surface"
|
|
14459
|
+
},
|
|
14460
|
+
{
|
|
14461
|
+
"name": "--c2-dash-card__header--font-size",
|
|
14462
|
+
"type": "pixel",
|
|
14463
|
+
"default": "14px",
|
|
14464
|
+
"part": "header",
|
|
14465
|
+
"property": "font-size",
|
|
14466
|
+
"token": "--c2-theme--font-size-md"
|
|
14467
|
+
},
|
|
14468
|
+
{
|
|
14469
|
+
"name": "--c2-dash-card__header--font-weight",
|
|
14470
|
+
"type": "font-weight",
|
|
14471
|
+
"default": "600",
|
|
14472
|
+
"part": "header",
|
|
14473
|
+
"property": "font-weight",
|
|
14474
|
+
"token": "--c2-theme--font-weight-semibold"
|
|
14475
|
+
},
|
|
14476
|
+
{
|
|
14477
|
+
"name": "--c2-dash-card__footer--min-height",
|
|
14478
|
+
"type": "pixel",
|
|
14479
|
+
"default": "36px",
|
|
14480
|
+
"part": "footer",
|
|
14481
|
+
"property": "min-height"
|
|
14482
|
+
},
|
|
14483
|
+
{
|
|
14484
|
+
"name": "--c2-dash-card__footer--padding-block",
|
|
14485
|
+
"type": "padding",
|
|
14486
|
+
"default": "6px",
|
|
14487
|
+
"part": "footer",
|
|
14488
|
+
"property": "padding-block"
|
|
14489
|
+
},
|
|
14490
|
+
{
|
|
14491
|
+
"name": "--c2-dash-card__footer--padding-inline",
|
|
14492
|
+
"type": "padding",
|
|
14493
|
+
"default": "12px",
|
|
14494
|
+
"part": "footer",
|
|
14495
|
+
"property": "padding-inline"
|
|
14496
|
+
},
|
|
14497
|
+
{
|
|
14498
|
+
"name": "--c2-dash-card__footer--gap",
|
|
14499
|
+
"type": "pixel",
|
|
14500
|
+
"default": "8px",
|
|
14501
|
+
"part": "footer",
|
|
14502
|
+
"property": "gap"
|
|
14503
|
+
},
|
|
14504
|
+
{
|
|
14505
|
+
"name": "--c2-dash-card__footer--background",
|
|
14506
|
+
"type": "background",
|
|
14507
|
+
"default": "transparent",
|
|
14508
|
+
"part": "footer",
|
|
14509
|
+
"property": "background"
|
|
14510
|
+
},
|
|
14511
|
+
{
|
|
14512
|
+
"name": "--c2-dash-card__footer--border-top",
|
|
14513
|
+
"type": "border",
|
|
14514
|
+
"default": "none",
|
|
14515
|
+
"part": "footer",
|
|
14516
|
+
"property": "border-top"
|
|
14517
|
+
},
|
|
14518
|
+
{
|
|
14519
|
+
"name": "--c2-dash-card__footer--color",
|
|
14520
|
+
"type": "color",
|
|
14521
|
+
"default": "#71717a",
|
|
14522
|
+
"part": "footer",
|
|
14523
|
+
"property": "color",
|
|
14524
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
14525
|
+
},
|
|
14526
|
+
{
|
|
14527
|
+
"name": "--c2-dash-card__footer--font-size",
|
|
14528
|
+
"type": "pixel",
|
|
14529
|
+
"default": "12px",
|
|
14530
|
+
"part": "footer",
|
|
14531
|
+
"property": "font-size",
|
|
14532
|
+
"token": "--c2-theme--font-size-sm"
|
|
14533
|
+
},
|
|
14534
|
+
{
|
|
14535
|
+
"name": "--c2-dash-card__actions--gap",
|
|
14536
|
+
"type": "pixel",
|
|
14537
|
+
"default": "8px",
|
|
14538
|
+
"part": "actions",
|
|
14539
|
+
"property": "gap"
|
|
14540
|
+
},
|
|
14541
|
+
{
|
|
14542
|
+
"name": "--c2-dash-card__controls--gap",
|
|
14543
|
+
"type": "pixel",
|
|
14544
|
+
"default": "2px",
|
|
14545
|
+
"part": "controls",
|
|
14546
|
+
"property": "gap"
|
|
14547
|
+
},
|
|
14548
|
+
{
|
|
14549
|
+
"name": "--c2-dash-card__controls--offset",
|
|
14550
|
+
"type": "pixel",
|
|
14551
|
+
"default": "4px",
|
|
14552
|
+
"part": "controls",
|
|
14553
|
+
"property": "offset",
|
|
14554
|
+
"description": "Inset of the floating control group from the top-right corner, used only while the header row is off."
|
|
14555
|
+
},
|
|
14556
|
+
{
|
|
14557
|
+
"name": "--c2-dash-card__control--size",
|
|
14558
|
+
"type": "pixel",
|
|
14559
|
+
"default": "24px",
|
|
14560
|
+
"part": "control",
|
|
14561
|
+
"property": "size"
|
|
14562
|
+
},
|
|
14563
|
+
{
|
|
14564
|
+
"name": "--c2-dash-card__control--icon-size",
|
|
14565
|
+
"type": "pixel",
|
|
14566
|
+
"default": "16px",
|
|
14567
|
+
"part": "control",
|
|
14568
|
+
"property": "icon-size"
|
|
14569
|
+
},
|
|
14570
|
+
{
|
|
14571
|
+
"name": "--c2-dash-card__control--border-radius",
|
|
14572
|
+
"type": "border-radius",
|
|
14573
|
+
"default": "6px",
|
|
14574
|
+
"part": "control",
|
|
14575
|
+
"property": "border-radius",
|
|
14576
|
+
"token": "--c2-theme--radius-md"
|
|
14577
|
+
},
|
|
14578
|
+
{
|
|
14579
|
+
"name": "--c2-dash-card__control--color",
|
|
14580
|
+
"type": "color",
|
|
14581
|
+
"default": "#71717a",
|
|
14582
|
+
"part": "control",
|
|
14583
|
+
"property": "color",
|
|
14584
|
+
"token": "--c2-theme--color-on-surface-variant"
|
|
14585
|
+
},
|
|
14586
|
+
{
|
|
14587
|
+
"name": "--c2-dash-card__control--background",
|
|
14588
|
+
"type": "background",
|
|
14589
|
+
"default": "transparent",
|
|
14590
|
+
"part": "control",
|
|
14591
|
+
"property": "background"
|
|
14592
|
+
},
|
|
14593
|
+
{
|
|
14594
|
+
"name": "--c2-dash-card__control__hover--background",
|
|
14595
|
+
"type": "background",
|
|
14596
|
+
"default": "#f4f4f5",
|
|
14597
|
+
"part": "control",
|
|
14598
|
+
"state": "hover",
|
|
14599
|
+
"property": "background",
|
|
14600
|
+
"token": "--c2-theme--color-surface-container"
|
|
14601
|
+
},
|
|
14602
|
+
{
|
|
14603
|
+
"name": "--c2-dash-card__control__hover--color",
|
|
14604
|
+
"type": "color",
|
|
14605
|
+
"default": "#18181b",
|
|
14606
|
+
"part": "control",
|
|
14607
|
+
"state": "hover",
|
|
14608
|
+
"property": "color",
|
|
14609
|
+
"token": "--c2-theme--color-on-surface"
|
|
14610
|
+
},
|
|
14611
|
+
{
|
|
14612
|
+
"name": "--c2-dash-card__control__focus--outline",
|
|
14613
|
+
"type": "outline",
|
|
14614
|
+
"default": "2px solid rgba(2, 101, 220, 0.4)",
|
|
14615
|
+
"part": "control",
|
|
14616
|
+
"state": "focus",
|
|
14617
|
+
"property": "outline",
|
|
14618
|
+
"token": "--c2-theme--focus-ring"
|
|
14619
|
+
},
|
|
14620
|
+
{
|
|
14621
|
+
"name": "--c2-dash-card__control__focus--outline-offset",
|
|
14622
|
+
"type": "pixel",
|
|
14623
|
+
"default": "2px",
|
|
14624
|
+
"part": "control",
|
|
14625
|
+
"state": "focus",
|
|
14626
|
+
"property": "outline-offset"
|
|
14627
|
+
},
|
|
14628
|
+
{
|
|
14629
|
+
"name": "--c2-dash-card__handle--size",
|
|
14630
|
+
"type": "pixel",
|
|
14631
|
+
"default": "6px",
|
|
14632
|
+
"part": "handle",
|
|
14633
|
+
"property": "size",
|
|
14634
|
+
"description": "Thickness of the grab area on an edge. It reaches into the pane, so it stays grabbable however wide the grid gutter is."
|
|
14635
|
+
},
|
|
14636
|
+
{
|
|
14637
|
+
"name": "--c2-dash-card__handle--inset",
|
|
14638
|
+
"type": "pixel",
|
|
14639
|
+
"default": "2px",
|
|
14640
|
+
"part": "handle",
|
|
14641
|
+
"property": "inset",
|
|
14642
|
+
"description": "Gap between the handle's visible bar and the ends of the edge."
|
|
14643
|
+
},
|
|
14644
|
+
{
|
|
14645
|
+
"name": "--c2-dash-card__handle--background",
|
|
14646
|
+
"type": "background",
|
|
14647
|
+
"default": "transparent",
|
|
14648
|
+
"part": "handle",
|
|
14649
|
+
"property": "background"
|
|
14650
|
+
},
|
|
14651
|
+
{
|
|
14652
|
+
"name": "--c2-dash-card__handle__hover--background",
|
|
14653
|
+
"type": "background",
|
|
14654
|
+
"default": "rgba(2, 101, 220, 0.2)",
|
|
14655
|
+
"part": "handle",
|
|
14656
|
+
"state": "hover",
|
|
14657
|
+
"property": "background",
|
|
14658
|
+
"token": "--c2-theme--color-primary-glow"
|
|
14659
|
+
},
|
|
14660
|
+
{
|
|
14661
|
+
"name": "--c2-dash-card__handle__active--background",
|
|
14662
|
+
"type": "background",
|
|
14663
|
+
"default": "rgb(2, 101, 220)",
|
|
14664
|
+
"part": "handle",
|
|
14665
|
+
"state": "active",
|
|
14666
|
+
"property": "background",
|
|
14667
|
+
"token": "--c2-theme--color-primary"
|
|
14668
|
+
},
|
|
14669
|
+
{
|
|
14670
|
+
"name": "--c2-dash-card__handle--border-radius",
|
|
14671
|
+
"type": "border-radius",
|
|
14672
|
+
"default": "999px",
|
|
14673
|
+
"part": "handle",
|
|
14674
|
+
"property": "border-radius",
|
|
14675
|
+
"token": "--c2-theme--radius-full"
|
|
14676
|
+
},
|
|
14677
|
+
{
|
|
14678
|
+
"name": "--c2-dash-card__handle--transition-duration",
|
|
14679
|
+
"type": "duration",
|
|
14680
|
+
"default": "150ms",
|
|
14681
|
+
"part": "handle",
|
|
14682
|
+
"property": "transition-duration",
|
|
14683
|
+
"token": "--c2-theme--motion-scale"
|
|
14684
|
+
},
|
|
14685
|
+
{
|
|
14686
|
+
"name": "--c2-dash-card__handle__focus--outline",
|
|
14687
|
+
"type": "outline",
|
|
14688
|
+
"default": "2px solid rgba(2, 101, 220, 0.4)",
|
|
14689
|
+
"part": "handle",
|
|
14690
|
+
"state": "focus",
|
|
14691
|
+
"property": "outline",
|
|
14692
|
+
"token": "--c2-theme--focus-ring"
|
|
14693
|
+
}
|
|
14694
|
+
]
|
|
14695
|
+
}
|
|
14696
|
+
],
|
|
14697
|
+
"composition": {
|
|
14698
|
+
"internal": [],
|
|
14699
|
+
"slotted": [],
|
|
14700
|
+
"usedBy": []
|
|
14701
|
+
},
|
|
14702
|
+
"install": {
|
|
14703
|
+
"npm": "npm install @c2n/dashboard @c2n/theme",
|
|
14704
|
+
"import": "import '@c2n/dashboard'",
|
|
14705
|
+
"importClass": "import { Dashboard } from '@c2n/dashboard'"
|
|
14706
|
+
},
|
|
14707
|
+
"presets": {
|
|
14708
|
+
"html": "<c2-dashboard style=\"height:200px\" columns=\"1fr 2fr\" rows=\"1fr 1fr\"><c2-dash-card col=\"1\" row=\"1\" row-span=\"2\"><span slot=\"header\">Watchlist</span></c2-dash-card><c2-dash-card col=\"2\" row=\"1\"><span slot=\"header\">Price</span></c2-dash-card><c2-dash-card col=\"2\" row=\"2\"><span slot=\"header\">Orders</span></c2-dash-card></c2-dashboard>",
|
|
14709
|
+
"items": [
|
|
14710
|
+
{
|
|
14711
|
+
"name": "Panes",
|
|
14712
|
+
"description": "A bordered white surface per pane, set off against a light canvas the gutters show through.",
|
|
14713
|
+
"css": {
|
|
14714
|
+
"--c2-dashboard--gap": "10px",
|
|
14715
|
+
"--c2-dashboard--padding": "10px",
|
|
14716
|
+
"--c2-dashboard--background": "#f1f2f4",
|
|
14717
|
+
"--c2-dashboard--border-radius": "12px",
|
|
14718
|
+
"--c2-dash-card--background": "#ffffff",
|
|
14719
|
+
"--c2-dash-card--border": "1px solid #e4e4e7",
|
|
14720
|
+
"--c2-dash-card--border-radius": "8px",
|
|
14721
|
+
"--c2-dash-card__expanded--background": "#ffffff",
|
|
14722
|
+
"--c2-dash-card__header--border-bottom": "1px solid #e4e4e7"
|
|
14723
|
+
}
|
|
14724
|
+
},
|
|
14725
|
+
{
|
|
14726
|
+
"name": "Seamless",
|
|
14727
|
+
"description": "No gutter to speak of: the grid background shows through as a hairline and the handle is what you aim at.",
|
|
14728
|
+
"css": {
|
|
14729
|
+
"--c2-dashboard--gap": "1px",
|
|
14730
|
+
"--c2-dashboard--padding": "1px",
|
|
14731
|
+
"--c2-dashboard--background": "#d4d4d8",
|
|
14732
|
+
"--c2-dashboard--border-radius": "10px",
|
|
14733
|
+
"--c2-dash-card--background": "#ffffff",
|
|
14734
|
+
"--c2-dash-card__expanded--background": "#ffffff",
|
|
14735
|
+
"--c2-dash-card__handle--size": "9px",
|
|
14736
|
+
"--c2-dash-card__handle__hover--background": "#0265dc"
|
|
14737
|
+
}
|
|
14738
|
+
},
|
|
14739
|
+
{
|
|
14740
|
+
"name": "Terminal",
|
|
14741
|
+
"description": "Dark panes, a compact monospace header row and a green handle under the pointer.",
|
|
14742
|
+
"css": {
|
|
14743
|
+
"--c2-dashboard--gap": "6px",
|
|
14744
|
+
"--c2-dashboard--padding": "6px",
|
|
14745
|
+
"--c2-dashboard--background": "#09090b",
|
|
14746
|
+
"--c2-dash-card--background": "#18181b",
|
|
14747
|
+
"--c2-dash-card--border": "1px solid #27272a",
|
|
14748
|
+
"--c2-dash-card--border-radius": "4px",
|
|
14749
|
+
"--c2-dash-card__expanded--background": "#18181b",
|
|
14750
|
+
"--c2-dash-card__header--color": "#a1a1aa",
|
|
14751
|
+
"--c2-dash-card__header--font-size": "12px",
|
|
14752
|
+
"--c2-dash-card__header--min-height": "28px",
|
|
14753
|
+
"--c2-dash-card__header--border-bottom": "1px solid #27272a",
|
|
14754
|
+
"--c2-dash-card__handle__hover--background": "#22c55e",
|
|
14755
|
+
"--c2-dash-card__handle__active--background": "#4ade80"
|
|
14756
|
+
}
|
|
14757
|
+
},
|
|
14758
|
+
{
|
|
14759
|
+
"name": "Soft",
|
|
14760
|
+
"description": "Floating cards: no border, a large radius and a shadow, over a generous gutter.",
|
|
14761
|
+
"css": {
|
|
14762
|
+
"--c2-dashboard--gap": "14px",
|
|
14763
|
+
"--c2-dashboard--padding": "14px",
|
|
14764
|
+
"--c2-dashboard--background": "#f1f2f4",
|
|
14765
|
+
"--c2-dashboard--border-radius": "18px",
|
|
14766
|
+
"--c2-dash-card--background": "#ffffff",
|
|
14767
|
+
"--c2-dash-card--border-radius": "14px",
|
|
14768
|
+
"--c2-dash-card--box-shadow": "0 1px 2px rgba(9, 9, 11, 0.06), 0 8px 24px rgba(9, 9, 11, 0.06)",
|
|
14769
|
+
"--c2-dash-card__expanded--background": "#ffffff",
|
|
14770
|
+
"--c2-dash-card__header--font-weight": "500",
|
|
14771
|
+
"--c2-dash-card__handle__hover--background": "rgba(9, 9, 11, 0.18)",
|
|
14772
|
+
"--c2-dash-card__handle__active--background": "rgba(9, 9, 11, 0.38)"
|
|
14773
|
+
}
|
|
14774
|
+
}
|
|
14775
|
+
]
|
|
14776
|
+
},
|
|
14777
|
+
"examples": [
|
|
14778
|
+
{
|
|
14779
|
+
"kind": "usage",
|
|
14780
|
+
"label": "Three panes, drag any shared edge",
|
|
14781
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"demo-grid\" columns=\"320px 1fr\" rows=\"1fr 1fr\">\n <c2-dash-card col=\"1\" row=\"1\" row-span=\"2\" min-width=\"200\">\n <span slot=\"header\">Watchlist</span>\n <div class=\"demo-pane\">column, both rows</div>\n </c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\" min-height=\"60\">\n <span slot=\"header\">Price</span>\n <div class=\"demo-pane\">top right</div>\n </c2-dash-card>\n <c2-dash-card col=\"2\" row=\"2\">\n <span slot=\"header\">Orders</span>\n <div class=\"demo-pane\">bottom right</div>\n </c2-dash-card>\n</c2-dashboard>",
|
|
14782
|
+
"css": ".demo-grid {\n height: 220px;\n --c2-dashboard--gap: 10px;\n --c2-dashboard--padding: 10px;\n --c2-dashboard--background: var(--c2-theme--color-surface-container);\n --c2-dashboard--border-radius: var(--c2-theme--radius-lg);\n --c2-dash-card--background: var(--c2-theme--color-surface);\n --c2-dash-card--border: var(--c2-theme--border);\n --c2-dash-card--border-radius: var(--c2-theme--radius-md);\n --c2-dash-card__expanded--background: var(--c2-theme--color-surface);\n --c2-dash-card__header--border-bottom: var(--c2-theme--border);\n}\n\n.demo-pane {\n display: grid;\n height: 100%;\n place-items: center;\n font-size: 13px;\n color: var(--c2-theme--color-on-surface-variant);\n}"
|
|
14783
|
+
},
|
|
14784
|
+
{
|
|
14785
|
+
"kind": "usage",
|
|
14786
|
+
"label": "Expand controls, and a pane that cannot be resized",
|
|
14787
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"demo-grid\" columns=\"2\" rows=\"1\">\n <c2-dash-card col=\"1\" row=\"1\" expand-full>\n <span slot=\"header\">Chart</span>\n <div class=\"demo-pane\">expand me over the grid</div>\n </c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\" resize=\"none\">\n <div class=\"demo-pane\">resize=\"none\", controls float</div>\n </c2-dash-card>\n</c2-dashboard>",
|
|
14788
|
+
"css": ".demo-grid {\n height: 220px;\n --c2-dashboard--gap: 10px;\n --c2-dashboard--padding: 10px;\n --c2-dashboard--background: var(--c2-theme--color-surface-container);\n --c2-dashboard--border-radius: var(--c2-theme--radius-lg);\n --c2-dash-card--background: var(--c2-theme--color-surface);\n --c2-dash-card--border: var(--c2-theme--border);\n --c2-dash-card--border-radius: var(--c2-theme--radius-md);\n --c2-dash-card__expanded--background: var(--c2-theme--color-surface);\n --c2-dash-card__header--border-bottom: var(--c2-theme--border);\n}\n\n.demo-pane {\n display: grid;\n height: 100%;\n place-items: center;\n font-size: 13px;\n color: var(--c2-theme--color-on-surface-variant);\n}"
|
|
14789
|
+
},
|
|
14790
|
+
{
|
|
14791
|
+
"kind": "gallery",
|
|
14792
|
+
"label": "Trading desk",
|
|
14793
|
+
"section": "Presets",
|
|
14794
|
+
"description": "Trading desk Presets example for c2-dashboard.",
|
|
14795
|
+
"isDefault": false,
|
|
14796
|
+
"tags": [
|
|
14797
|
+
"c2-dashboard",
|
|
14798
|
+
"c2-dash-card",
|
|
14799
|
+
"c2-badge",
|
|
14800
|
+
"c2-list",
|
|
14801
|
+
"c2-list-item",
|
|
14802
|
+
"c2-icon-button",
|
|
14803
|
+
"c2-line-chart",
|
|
14804
|
+
"c2-chart-series",
|
|
14805
|
+
"c2-table",
|
|
14806
|
+
"c2-table-column"
|
|
14807
|
+
],
|
|
14808
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"desk\" columns=\"260px 1fr\" rows=\"1fr 1fr\" storage-key=\"c2n-demo-desk\">\n <c2-dash-card col=\"1\" row=\"1\" row-span=\"2\" min-width=\"200\" card-id=\"watchlist\" expand-full>\n <span slot=\"header\">Watchlist</span>\n <c2-badge slot=\"actions\" tone=\"success\">Live</c2-badge>\n <c2-list value=\"aapl\">\n <c2-list-item value=\"aapl\"><span class=\"desk-quote\">AAPL <span class=\"desk-up\">+1.24%</span></span></c2-list-item>\n <c2-list-item value=\"msft\"><span class=\"desk-quote\">MSFT <span class=\"desk-up\">+0.62%</span></span></c2-list-item>\n <c2-list-item value=\"nvda\"><span class=\"desk-quote\">NVDA <span class=\"desk-down\">−2.08%</span></span></c2-list-item>\n <c2-list-item value=\"amzn\"><span class=\"desk-quote\">AMZN <span class=\"desk-up\">+0.41%</span></span></c2-list-item>\n <c2-list-item value=\"tsla\"><span class=\"desk-quote\">TSLA <span class=\"desk-down\">−1.13%</span></span></c2-list-item>\n </c2-list>\n <span slot=\"footer\">5 instruments</span>\n </c2-dash-card>\n\n <c2-dash-card col=\"2\" row=\"1\" min-height=\"120\" card-id=\"price\" expand-full>\n <span slot=\"header\">AAPL · quarterly revenue</span>\n <c2-icon-button slot=\"actions\" aria-label=\"Refresh\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><polyline points=\"23 4 23 10 17 10\"></polyline><polyline points=\"1 20 1 14 7 14\"></polyline><path d=\"M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15\"></path></svg>\n </c2-icon-button>\n <c2-line-chart\n x-field=\"date\"\n x-type=\"time\"\n curve=\"smooth\"\n points=\"none\"\n legend=\"none\"\n data='[{\"date\":\"2023-12-30\",\"revenue\":119.575},{\"date\":\"2024-03-30\",\"revenue\":90.753},{\"date\":\"2024-06-29\",\"revenue\":85.777},{\"date\":\"2024-09-28\",\"revenue\":94.93},{\"date\":\"2024-12-28\",\"revenue\":124.3},{\"date\":\"2025-03-29\",\"revenue\":95.359},{\"date\":\"2025-06-28\",\"revenue\":94.036},{\"date\":\"2025-09-27\",\"revenue\":102.466}]'\n >\n <c2-chart-series field=\"revenue\" label=\"Revenue\"></c2-chart-series>\n </c2-line-chart>\n <span slot=\"footer\">USD billions · FY2024–25</span>\n </c2-dash-card>\n\n <c2-dash-card col=\"2\" row=\"2\" card-id=\"orders\" expand-full>\n <span slot=\"header\">Working orders</span>\n <c2-icon-button slot=\"controls\" aria-label=\"Order settings\">\n <svg viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\"><circle cx=\"12\" cy=\"12\" r=\"1\"></circle><circle cx=\"19\" cy=\"12\" r=\"1\"></circle><circle cx=\"5\" cy=\"12\" r=\"1\"></circle></svg>\n </c2-icon-button>\n <c2-table row-key=\"id\" rows='[{\"id\":\"1\",\"symbol\":\"AAPL\",\"side\":\"Buy\",\"qty\":1200,\"limit\":214.5,\"status\":\"Working\"},{\"id\":\"2\",\"symbol\":\"NVDA\",\"side\":\"Sell\",\"qty\":400,\"limit\":118.2,\"status\":\"Working\"},{\"id\":\"3\",\"symbol\":\"MSFT\",\"side\":\"Buy\",\"qty\":250,\"limit\":402.1,\"status\":\"Partial\"},{\"id\":\"4\",\"symbol\":\"TSLA\",\"side\":\"Sell\",\"qty\":900,\"limit\":241,\"status\":\"Working\"},{\"id\":\"5\",\"symbol\":\"AMZN\",\"side\":\"Buy\",\"qty\":150,\"limit\":186.75,\"status\":\"Queued\"}]'>\n <c2-table-column field=\"symbol\" header=\"Symbol\" width=\"100px\"></c2-table-column>\n <c2-table-column field=\"side\" header=\"Side\" width=\"80px\"></c2-table-column>\n <c2-table-column field=\"qty\" header=\"Qty\" width=\"1fr\" align=\"end\" format=\"number\"></c2-table-column>\n <c2-table-column field=\"limit\" header=\"Limit\" width=\"1fr\" align=\"end\" format=\"number\"></c2-table-column>\n <c2-table-column field=\"status\" header=\"Status\" width=\"110px\"></c2-table-column>\n </c2-table>\n <span slot=\"footer\">5 orders · updated 14:32</span>\n </c2-dash-card>\n</c2-dashboard>",
|
|
14809
|
+
"css": ".desk {\n height: 460px;\n --c2-dashboard--gap: 10px;\n --c2-dashboard--padding: 10px;\n --c2-dashboard--background: #f1f2f4;\n --c2-dashboard--border-radius: 14px;\n --c2-dash-card--background: #ffffff;\n --c2-dash-card--border: 1px solid #e4e4e7;\n --c2-dash-card--border-radius: 10px;\n --c2-dash-card__expanded--background: #ffffff;\n --c2-dash-card__header--min-height: 40px;\n --c2-dash-card__header--font-size: 13px;\n --c2-dash-card__header--border-bottom: 1px solid #e4e4e7;\n --c2-dash-card__footer--border-top: 1px solid #e4e4e7;\n}\n\n/* `body` is a part, so the pane's content area can be made to stretch whatever is inside it. */\n.desk c2-dash-card::part(body) {\n display: grid;\n min-height: 0;\n overflow: hidden;\n}\n\n.desk c2-line-chart {\n --c2-chart--height: 100%;\n --c2-chart--padding: 8px;\n --c2-chart--background: transparent;\n --c2-chart--border-top: none;\n --c2-chart--border-right: none;\n --c2-chart--border-bottom: none;\n --c2-chart--border-left: none;\n}\n\n.desk c2-table {\n width: 100%;\n height: 100%;\n --c2-table--border-top: none;\n --c2-table--border-right: none;\n --c2-table--border-bottom: none;\n --c2-table--border-left: none;\n --c2-table--font-size: 12px;\n}\n\n.desk c2-list {\n height: 100%;\n overflow: auto;\n --c2-list--border-top: none;\n --c2-list--border-right: none;\n --c2-list--border-bottom: none;\n --c2-list--border-left: none;\n --c2-list--padding-top: 6px;\n --c2-list--padding-bottom: 6px;\n}\n\n.desk-quote {\n display: flex;\n width: 100%;\n justify-content: space-between;\n gap: 12px;\n font-size: 13px;\n}\n\n.desk-up {\n color: #16a34a;\n}\n\n.desk-down {\n color: #dc2626;\n}"
|
|
14810
|
+
},
|
|
14811
|
+
{
|
|
14812
|
+
"kind": "gallery",
|
|
14813
|
+
"label": "Default",
|
|
14814
|
+
"section": "Presets",
|
|
14815
|
+
"description": "Default Presets example for c2-dashboard.",
|
|
14816
|
+
"isDefault": true,
|
|
14817
|
+
"tags": [
|
|
14818
|
+
"c2-dashboard",
|
|
14819
|
+
"c2-dash-card"
|
|
14820
|
+
],
|
|
14821
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"bare\" columns=\"2\" rows=\"1\">\n <c2-dash-card col=\"1\" row=\"1\"><div class=\"bare-pane\">Pane one</div></c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\"><div class=\"bare-pane\">Pane two</div></c2-dash-card>\n</c2-dashboard>",
|
|
14822
|
+
"css": ".bare {\n height: 220px;\n padding: 10px;\n background: #f4f4f5;\n border-radius: 12px;\n}\n\n.bare-pane {\n display: grid;\n height: 100%;\n place-items: center;\n font-size: 13px;\n color: #71717a;\n background: #ffffff;\n border: 1px solid #e4e4e7;\n border-radius: 8px;\n}"
|
|
14823
|
+
},
|
|
14824
|
+
{
|
|
14825
|
+
"kind": "gallery",
|
|
14826
|
+
"label": "Seamless",
|
|
14827
|
+
"section": "Presets",
|
|
14828
|
+
"description": "Seamless Presets example for c2-dashboard.",
|
|
14829
|
+
"isDefault": false,
|
|
14830
|
+
"tags": [
|
|
14831
|
+
"c2-dashboard",
|
|
14832
|
+
"c2-dash-card"
|
|
14833
|
+
],
|
|
14834
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"seamless\" columns=\"1fr 1fr 1fr\" rows=\"1\">\n <c2-dash-card col=\"1\" row=\"1\"><span slot=\"header\">Markets</span></c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\"><span slot=\"header\">Positions</span></c2-dash-card>\n <c2-dash-card col=\"3\" row=\"1\"><span slot=\"header\">Activity</span></c2-dash-card>\n</c2-dashboard>",
|
|
14835
|
+
"css": ".seamless {\n height: 220px;\n --c2-dashboard--gap: 1px;\n --c2-dashboard--padding: 1px;\n --c2-dashboard--background: #d4d4d8;\n --c2-dashboard--border-radius: 10px;\n --c2-dash-card--background: #ffffff;\n --c2-dash-card__expanded--background: #ffffff;\n --c2-dash-card__header--color: #52525b;\n --c2-dash-card__header--font-size: 13px;\n --c2-dash-card__header--min-height: 34px;\n --c2-dash-card__handle--size: 9px;\n --c2-dash-card__handle__hover--background: #0265dc;\n}"
|
|
14836
|
+
},
|
|
14837
|
+
{
|
|
14838
|
+
"kind": "gallery",
|
|
14839
|
+
"label": "Terminal",
|
|
14840
|
+
"section": "Presets",
|
|
14841
|
+
"description": "Terminal Presets example for c2-dashboard.",
|
|
14842
|
+
"isDefault": false,
|
|
14843
|
+
"tags": [
|
|
14844
|
+
"c2-dashboard",
|
|
14845
|
+
"c2-dash-card"
|
|
14846
|
+
],
|
|
14847
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"terminal\" columns=\"1fr 2fr\" rows=\"1fr 1fr\">\n <c2-dash-card col=\"1\" row=\"1\" row-span=\"2\" expand-full>\n <span slot=\"header\">processes</span>\n </c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\" expand-full>\n <span slot=\"header\">output</span>\n </c2-dash-card>\n <c2-dash-card col=\"2\" row=\"2\">\n <span slot=\"header\">logs</span>\n </c2-dash-card>\n</c2-dashboard>",
|
|
14848
|
+
"css": ".terminal {\n height: 220px;\n --c2-dashboard--gap: 6px;\n --c2-dashboard--padding: 6px;\n --c2-dashboard--background: #09090b;\n --c2-dashboard--border-radius: 6px;\n --c2-dash-card--background: #18181b;\n --c2-dash-card--border: 1px solid #27272a;\n --c2-dash-card--border-radius: 4px;\n --c2-dash-card__expanded--background: #18181b;\n --c2-dash-card__header--color: #a1a1aa;\n --c2-dash-card__header--font-size: 12px;\n --c2-dash-card__header--min-height: 28px;\n --c2-dash-card__header--border-bottom: 1px solid #27272a;\n --c2-dash-card__control--color: #71717a;\n --c2-dash-card__control__hover--background: #27272a;\n --c2-dash-card__control__hover--color: #fafafa;\n --c2-dash-card__handle__hover--background: #22c55e;\n --c2-dash-card__handle__active--background: #4ade80;\n}"
|
|
14849
|
+
},
|
|
14850
|
+
{
|
|
14851
|
+
"kind": "gallery",
|
|
14852
|
+
"label": "Soft",
|
|
14853
|
+
"section": "Presets",
|
|
14854
|
+
"description": "Soft Presets example for c2-dashboard.",
|
|
14855
|
+
"isDefault": false,
|
|
14856
|
+
"tags": [
|
|
14857
|
+
"c2-dashboard",
|
|
14858
|
+
"c2-dash-card"
|
|
14859
|
+
],
|
|
14860
|
+
"html": "<c2-dashboard client:only=\"lit\" class=\"soft\" columns=\"1fr 1fr\" rows=\"1\">\n <c2-dash-card col=\"1\" row=\"1\" expand-full><span slot=\"header\">Revenue</span></c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\" expand-full><span slot=\"header\">Churn</span></c2-dash-card>\n</c2-dashboard>",
|
|
14861
|
+
"css": ".soft {\n height: 220px;\n --c2-dashboard--gap: 14px;\n --c2-dashboard--padding: 14px;\n --c2-dashboard--background: #f1f2f4;\n --c2-dashboard--border-radius: 18px;\n --c2-dash-card--background: #ffffff;\n --c2-dash-card--border-radius: 14px;\n --c2-dash-card--box-shadow: 0 1px 2px rgba(9, 9, 11, 0.06), 0 8px 24px rgba(9, 9, 11, 0.08);\n --c2-dash-card__expanded--background: #ffffff;\n --c2-dash-card__header--font-weight: 500;\n --c2-dash-card__handle__hover--background: rgba(9, 9, 11, 0.18);\n --c2-dash-card__handle__active--background: rgba(9, 9, 11, 0.38);\n}"
|
|
14862
|
+
},
|
|
14863
|
+
{
|
|
14864
|
+
"kind": "preview",
|
|
14865
|
+
"label": "Preview",
|
|
14866
|
+
"html": "<c2-dashboard columns=\"1fr 1fr\" rows=\"1fr 1fr\" style=\"width:260px;height:150px;--c2-dashboard--gap:6px;--c2-dashboard--padding:6px;--c2-dashboard--background:var(--c2-theme--color-surface-container);--c2-dashboard--border-radius:10px;--c2-dash-card--background:var(--c2-theme--color-surface);--c2-dash-card--border:var(--c2-theme--border);--c2-dash-card--border-radius:6px;--c2-dash-card__header--font-size:11px;--c2-dash-card__header--min-height:0;--c2-dash-card__header--padding-block:6px;--c2-dash-card__header--padding-inline:8px\">\n <c2-dash-card col=\"1\" row=\"1\" row-span=\"2\"><span slot=\"header\">Watchlist</span></c2-dash-card>\n <c2-dash-card col=\"2\" row=\"1\"><span slot=\"header\">Price</span></c2-dash-card>\n <c2-dash-card col=\"2\" row=\"2\"><span slot=\"header\">Orders</span></c2-dash-card>\n</c2-dashboard>"
|
|
14867
|
+
}
|
|
14868
|
+
],
|
|
14869
|
+
"hasGallery": true
|
|
14870
|
+
},
|
|
14065
14871
|
"date-input": {
|
|
14066
14872
|
"id": "date-input",
|
|
14067
14873
|
"package": "@c2n/date-input",
|
|
@@ -49472,6 +50278,8 @@
|
|
|
49472
50278
|
"c2-color-select": "color-select",
|
|
49473
50279
|
"c2-color-slider": "color-slider",
|
|
49474
50280
|
"c2-copy-button": "copy-button",
|
|
50281
|
+
"c2-dash-card": "dashboard",
|
|
50282
|
+
"c2-dashboard": "dashboard",
|
|
49475
50283
|
"c2-date-input": "date-input",
|
|
49476
50284
|
"c2-date-selector": "date-selector",
|
|
49477
50285
|
"c2-details": "details",
|
|
@@ -49557,6 +50365,7 @@
|
|
|
49557
50365
|
"@c2n/color-select": "color-select",
|
|
49558
50366
|
"@c2n/color-slider": "color-slider",
|
|
49559
50367
|
"@c2n/copy-button": "copy-button",
|
|
50368
|
+
"@c2n/dashboard": "dashboard",
|
|
49560
50369
|
"@c2n/date-input": "date-input",
|
|
49561
50370
|
"@c2n/date-selector": "date-selector",
|
|
49562
50371
|
"@c2n/details": "details",
|
|
@@ -49622,7 +50431,7 @@
|
|
|
49622
50431
|
"light": "#0265dc",
|
|
49623
50432
|
"dark": "#5aa3ff",
|
|
49624
50433
|
"description": "Accent colour: filled buttons, selected states, focused borders, links.",
|
|
49625
|
-
"usedBy":
|
|
50434
|
+
"usedBy": 57
|
|
49626
50435
|
},
|
|
49627
50436
|
{
|
|
49628
50437
|
"name": "--c2-theme--color-primary-hover",
|
|
@@ -49662,7 +50471,7 @@
|
|
|
49662
50471
|
"light": "rgba(2, 101, 220, 0.2)",
|
|
49663
50472
|
"dark": "rgba(90, 163, 255, 0.28)",
|
|
49664
50473
|
"description": "Accent tint for luminous borders and decorative glows.",
|
|
49665
|
-
"usedBy":
|
|
50474
|
+
"usedBy": 1
|
|
49666
50475
|
},
|
|
49667
50476
|
{
|
|
49668
50477
|
"name": "--c2-theme--color-surface",
|
|
@@ -49686,7 +50495,7 @@
|
|
|
49686
50495
|
"light": "#f4f4f5",
|
|
49687
50496
|
"dark": "#27272a",
|
|
49688
50497
|
"description": "Hover surface for rows and icon buttons.",
|
|
49689
|
-
"usedBy":
|
|
50498
|
+
"usedBy": 35
|
|
49690
50499
|
},
|
|
49691
50500
|
{
|
|
49692
50501
|
"name": "--c2-theme--color-on-surface",
|
|
@@ -49694,7 +50503,7 @@
|
|
|
49694
50503
|
"light": "#18181b",
|
|
49695
50504
|
"dark": "#f4f4f5",
|
|
49696
50505
|
"description": "Primary text colour.",
|
|
49697
|
-
"usedBy":
|
|
50506
|
+
"usedBy": 63
|
|
49698
50507
|
},
|
|
49699
50508
|
{
|
|
49700
50509
|
"name": "--c2-theme--color-on-surface-variant",
|
|
@@ -49702,7 +50511,7 @@
|
|
|
49702
50511
|
"light": "#71717a",
|
|
49703
50512
|
"dark": "#a1a1aa",
|
|
49704
50513
|
"description": "Secondary text, placeholders, icons, supporting text.",
|
|
49705
|
-
"usedBy":
|
|
50514
|
+
"usedBy": 96
|
|
49706
50515
|
},
|
|
49707
50516
|
{
|
|
49708
50517
|
"name": "--c2-theme--color-outline",
|
|
@@ -49772,14 +50581,14 @@
|
|
|
49772
50581
|
"category": "font",
|
|
49773
50582
|
"light": "12px",
|
|
49774
50583
|
"description": "Small text: supporting text, tooltips, descriptions, timestamps.",
|
|
49775
|
-
"usedBy":
|
|
50584
|
+
"usedBy": 35
|
|
49776
50585
|
},
|
|
49777
50586
|
{
|
|
49778
50587
|
"name": "--c2-theme--font-size-md",
|
|
49779
50588
|
"category": "font",
|
|
49780
50589
|
"light": "14px",
|
|
49781
50590
|
"description": "Body text: buttons, inputs, list items, dialog content.",
|
|
49782
|
-
"usedBy":
|
|
50591
|
+
"usedBy": 45
|
|
49783
50592
|
},
|
|
49784
50593
|
{
|
|
49785
50594
|
"name": "--c2-theme--font-weight-medium",
|
|
@@ -49793,7 +50602,7 @@
|
|
|
49793
50602
|
"category": "font",
|
|
49794
50603
|
"light": "600",
|
|
49795
50604
|
"description": "Semibold weight: dialog titles, list headings, avatars.",
|
|
49796
|
-
"usedBy":
|
|
50605
|
+
"usedBy": 22
|
|
49797
50606
|
},
|
|
49798
50607
|
{
|
|
49799
50608
|
"name": "--c2-theme--radius-sm",
|
|
@@ -49807,7 +50616,7 @@
|
|
|
49807
50616
|
"category": "radius",
|
|
49808
50617
|
"light": "6px",
|
|
49809
50618
|
"description": "Default radius: buttons, inputs, list items, tooltips.",
|
|
49810
|
-
"usedBy":
|
|
50619
|
+
"usedBy": 51
|
|
49811
50620
|
},
|
|
49812
50621
|
{
|
|
49813
50622
|
"name": "--c2-theme--radius-lg",
|
|
@@ -49828,7 +50637,7 @@
|
|
|
49828
50637
|
"category": "radius",
|
|
49829
50638
|
"light": "999px",
|
|
49830
50639
|
"description": "Pill / circle radius: avatars, icon buttons.",
|
|
49831
|
-
"usedBy":
|
|
50640
|
+
"usedBy": 20
|
|
49832
50641
|
},
|
|
49833
50642
|
{
|
|
49834
50643
|
"name": "--c2-theme--border-width",
|
|
@@ -49850,7 +50659,7 @@
|
|
|
49850
50659
|
"light": "2px solid rgba(2, 101, 220, 0.4)",
|
|
49851
50660
|
"dark": "2px solid rgba(90, 163, 255, 0.5)",
|
|
49852
50661
|
"description": "Focus-visible outline of every component.",
|
|
49853
|
-
"usedBy":
|
|
50662
|
+
"usedBy": 39
|
|
49854
50663
|
},
|
|
49855
50664
|
{
|
|
49856
50665
|
"name": "--c2-theme--disabled-opacity",
|
|
@@ -49864,7 +50673,7 @@
|
|
|
49864
50673
|
"category": "motion",
|
|
49865
50674
|
"light": "1",
|
|
49866
50675
|
"description": "Multiplier applied to every transition and animation duration (0 disables motion).",
|
|
49867
|
-
"usedBy":
|
|
50676
|
+
"usedBy": 21
|
|
49868
50677
|
},
|
|
49869
50678
|
{
|
|
49870
50679
|
"name": "--c2-theme--shadow-md",
|
|
@@ -50251,6 +51060,22 @@
|
|
|
50251
51060
|
"--c2-copy-button__container__focus--outline": "--c2-theme--focus-ring",
|
|
50252
51061
|
"--c2-copy-button__container__disabled--opacity": "--c2-theme--disabled-opacity",
|
|
50253
51062
|
"--c2-copy-button--transition-duration": "--c2-theme--motion-scale",
|
|
51063
|
+
"--c2-dash-card__expanded--animation-duration": "--c2-theme--motion-scale",
|
|
51064
|
+
"--c2-dash-card__header--color": "--c2-theme--color-on-surface",
|
|
51065
|
+
"--c2-dash-card__header--font-size": "--c2-theme--font-size-md",
|
|
51066
|
+
"--c2-dash-card__header--font-weight": "--c2-theme--font-weight-semibold",
|
|
51067
|
+
"--c2-dash-card__footer--color": "--c2-theme--color-on-surface-variant",
|
|
51068
|
+
"--c2-dash-card__footer--font-size": "--c2-theme--font-size-sm",
|
|
51069
|
+
"--c2-dash-card__control--border-radius": "--c2-theme--radius-md",
|
|
51070
|
+
"--c2-dash-card__control--color": "--c2-theme--color-on-surface-variant",
|
|
51071
|
+
"--c2-dash-card__control__hover--background": "--c2-theme--color-surface-container",
|
|
51072
|
+
"--c2-dash-card__control__hover--color": "--c2-theme--color-on-surface",
|
|
51073
|
+
"--c2-dash-card__control__focus--outline": "--c2-theme--focus-ring",
|
|
51074
|
+
"--c2-dash-card__handle__hover--background": "--c2-theme--color-primary-glow",
|
|
51075
|
+
"--c2-dash-card__handle__active--background": "--c2-theme--color-primary",
|
|
51076
|
+
"--c2-dash-card__handle--border-radius": "--c2-theme--radius-full",
|
|
51077
|
+
"--c2-dash-card__handle--transition-duration": "--c2-theme--motion-scale",
|
|
51078
|
+
"--c2-dash-card__handle__focus--outline": "--c2-theme--focus-ring",
|
|
50254
51079
|
"--c2-date-input--border": "--c2-theme--border",
|
|
50255
51080
|
"--c2-date-input--border-radius": "--c2-theme--radius-md",
|
|
50256
51081
|
"--c2-date-input--color": "--c2-theme--color-on-surface",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@c2n/mcp",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "MCP server exposing the c2n web components (API, examples, presets, theme tokens, variant generation) to AI agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -101,5 +101,5 @@
|
|
|
101
101
|
"@c2n/config": "*",
|
|
102
102
|
"custom-elements-manifest": "2.1.0"
|
|
103
103
|
},
|
|
104
|
-
"gitHead": "
|
|
104
|
+
"gitHead": "bf962fba5e49a0ac7555a082584e262949d323a5"
|
|
105
105
|
}
|