@cscfi/csc-ui 4.0.0-alpha.31 → 4.0.0-alpha.32
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/dist/csc-ui.js +20417 -18696
- package/dist/custom-elements.json +2141 -973
- package/dist/docs/c-color-picker/usage.md +160 -0
- package/dist/docs/c-file-upload/usage.md +189 -0
- package/dist/docs/c-modal/usage.md +1 -1
- package/dist/docs/c-progress-circle/usage.md +1 -1
- package/dist/docs/c-radio-group/usage.md +1 -1
- package/dist/styles/css/tokens.css +2 -1
- package/dist/vscode.css-custom-data.json +103 -5
- package/dist/vscode.html-custom-data.json +155 -1
- package/dist/web-types.json +570 -6
- package/dist-types/components/c-color-picker/CColorPicker.vue.d.ts +194 -0
- package/dist-types/components/c-color-picker/colors.d.ts +66 -0
- package/dist-types/components/c-date-picker/CDatePicker.vue.d.ts +1 -1
- package/dist-types/components/c-file-upload/CFileUpload.vue.d.ts +200 -0
- package/dist-types/components/c-file-upload/files.d.ts +99 -0
- package/dist-types/components/c-time-picker/times.d.ts +5 -5
- package/dist-types/index.d.ts +4 -2
- package/dist-types/shared/TypedField.vue.d.ts +1 -1
- package/dist-types/shared/emitModelValue.d.ts +12 -0
- package/dist-types/shared/selectAll.d.ts +1 -1
- package/dist-types/shared/useAnchoredPanel.d.ts +6 -1
- package/dist-types/shared/useTypedField.d.ts +21 -18
- package/dist-types/tag-name-map.d.ts +169 -1
- package/dist-types/theme/ramp.d.ts +12 -12
- package/dist-types/theme/themeMode.d.ts +24 -24
- package/package.json +3 -14
package/dist/web-types.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/JetBrains/web-types/master/schema/web-types.json",
|
|
3
3
|
"name": "@cscfi/csc-ui",
|
|
4
|
-
"version": "4.0.0-alpha.
|
|
4
|
+
"version": "4.0.0-alpha.32",
|
|
5
5
|
"description-markup": "markdown",
|
|
6
6
|
"contributions": {
|
|
7
7
|
"html": {
|
|
@@ -646,7 +646,7 @@
|
|
|
646
646
|
},
|
|
647
647
|
{
|
|
648
648
|
"name": "c-button",
|
|
649
|
-
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one primary (default appearance) button per view; secondary actions use the `outlined`, `ghost` or `text` appearances.\n---\n\n\n### **Slots:**\n - **default** - Button label content.\n- **icon** - Leading icon, vertically centered before the label.\n- **description** - Secondary text rendered below the label.\n\n### **CSS
|
|
649
|
+
"description": "Buttons trigger actions — submitting a form, opening a modal, confirming a choice. Use one primary (default appearance) button per view; secondary actions use the `outlined`, `ghost` or `text` appearances.\n---\n\n\n### **Slots:**\n - **default** - Button label content.\n- **icon** - Leading icon, vertically centered before the label.\n- **description** - Secondary text rendered below the label.\n\n### **CSS Parts:**\n - **root** - The native `<button>` / `<a>` element carrying the visual styling.\n- **content** - Layout wrapper for the label, icon and description.\n- **description** - Wrapper of the `description` slot.",
|
|
650
650
|
"doc-url": "",
|
|
651
651
|
"attributes": [
|
|
652
652
|
{
|
|
@@ -1255,6 +1255,257 @@
|
|
|
1255
1255
|
]
|
|
1256
1256
|
}
|
|
1257
1257
|
},
|
|
1258
|
+
{
|
|
1259
|
+
"name": "c-color-picker",
|
|
1260
|
+
"description": "A colour field that takes any typed CSS colour, or opens a panel for picking one: a colour area, hue and alpha sliders, per-channel inputs and swatches — or swatches alone under `swatches-only`.\n---\n\n\n### **Events:**\n - **change** - Fired when the value changes — a pick in the panel, typed text\ncommitted, the field cleared — carrying the colour in the `format`\nnotation, or `null`. A drag on the area or a slider fires it once, on\nrelease.\n- **change:text** - Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed. Read `badInput` to tell whether it named a colour.\n- **input** - Native bubbling input event dispatched alongside every value change —\neach move of a drag included — so a plain `v-model` stays in sync.\nCarries no detail.\n- **update:value** - Fired with every value change, each move of a drag included — the\n`v-model` contract.\n\n### **CSS Parts:**\n - **input** - The text input; under `swatches-only` the readonly field\n- **separator** - Unused: the shared typed field's range separator\n- **color-chip** - The colour painted in the colour button, or before the swatch-only field's text\n- **panel** - The top-layer popover container anchored below the field\n- **card** - The dialog surface inside the panel\n- **heading-row** - The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button\n- **heading** - The field label naming the fullscreen panel\n- **close** - The close button of the fullscreen panel\n- **area** - The saturation × brightness square at the current hue\n- **area-thumb** - The marker of the colour in the area\n- **hue-slider** - The hue slider\n- **alpha-slider** - The alpha slider (`alpha`)\n- **comparison** - The strip of the original colour beside the new one, when the panel opened on a colour\n- **original-color** - The colour the panel opened on; a click restores it\n- **new-color** - The colour the panel holds now\n- **notation-switch** - The HEX | RGB | OKLCH row choosing the channel editor\n- **notation** - One button of the notation switch\n- **channels** - The channel editor: the inputs of one notation\n- **channel** - One channel input\n- **swatches** - The list of swatches\n- **swatch** - One swatch\n- **actions** - The row under the panel body in the fullscreen panel (narrow viewports)\n- **done** - The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes",
|
|
1261
|
+
"doc-url": "",
|
|
1262
|
+
"attributes": [
|
|
1263
|
+
{
|
|
1264
|
+
"name": "alpha",
|
|
1265
|
+
"description": "Let the colour carry transparency: an alpha slider and an A channel join\nthe panel. Without it typed alpha is dropped",
|
|
1266
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1267
|
+
},
|
|
1268
|
+
{
|
|
1269
|
+
"name": "clearable",
|
|
1270
|
+
"description": "Make the value clearable",
|
|
1271
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1272
|
+
},
|
|
1273
|
+
{
|
|
1274
|
+
"name": "disabled",
|
|
1275
|
+
"description": "Disable the field",
|
|
1276
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1277
|
+
},
|
|
1278
|
+
{
|
|
1279
|
+
"name": "error-message",
|
|
1280
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
1281
|
+
"value": { "type": "string", "default": "''" }
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
"name": "format",
|
|
1285
|
+
"description": "The notation the value is written in — and every emission with it:\n`#rrggbb`, `rgb(r g b)` or `oklch(l c h)`",
|
|
1286
|
+
"value": { "type": "'hex' | 'oklch' | 'rgb'", "default": "'hex'" }
|
|
1287
|
+
},
|
|
1288
|
+
{
|
|
1289
|
+
"name": "hide-details",
|
|
1290
|
+
"description": "Hide the hint and error messages",
|
|
1291
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1292
|
+
},
|
|
1293
|
+
{
|
|
1294
|
+
"name": "hint",
|
|
1295
|
+
"description": "Hint text for the field",
|
|
1296
|
+
"value": { "type": "string", "default": "''" }
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
"name": "host-id",
|
|
1300
|
+
"description": "Id of the element",
|
|
1301
|
+
"value": { "type": "string", "default": "''" }
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
"name": "label",
|
|
1305
|
+
"description": "Element label",
|
|
1306
|
+
"value": { "type": "string", "default": "''" }
|
|
1307
|
+
},
|
|
1308
|
+
{
|
|
1309
|
+
"name": "label-on-top",
|
|
1310
|
+
"description": "Label on top of the field",
|
|
1311
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
"name": "name",
|
|
1315
|
+
"description": "Input field name",
|
|
1316
|
+
"value": { "type": "string", "default": "''" }
|
|
1317
|
+
},
|
|
1318
|
+
{
|
|
1319
|
+
"name": "placeholder",
|
|
1320
|
+
"description": "Placeholder of the input; an example of the notation when empty",
|
|
1321
|
+
"value": { "type": "string", "default": "''" }
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
"name": "required",
|
|
1325
|
+
"description": "Set the field as required",
|
|
1326
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1327
|
+
},
|
|
1328
|
+
{
|
|
1329
|
+
"name": "shadow",
|
|
1330
|
+
"description": "Shadow variant",
|
|
1331
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
"name": "size",
|
|
1335
|
+
"description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
|
|
1336
|
+
"value": { "type": "'default' | 'small'", "default": "'default'" }
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
"name": "swatches-only",
|
|
1340
|
+
"description": "Limit the choice to the swatches: the field becomes readonly and opens\na panel of the swatches alone",
|
|
1341
|
+
"value": { "type": "boolean", "default": "false" }
|
|
1342
|
+
},
|
|
1343
|
+
{
|
|
1344
|
+
"name": "valid",
|
|
1345
|
+
"description": "Set the validity of the field",
|
|
1346
|
+
"value": { "type": "boolean", "default": "true" }
|
|
1347
|
+
},
|
|
1348
|
+
{
|
|
1349
|
+
"name": "value",
|
|
1350
|
+
"description": "The colour in the `format` notation, or `null` when empty. Any CSS\ncolour is accepted and shown in the notation",
|
|
1351
|
+
"value": { "type": "CColorPickerValue", "default": "null" }
|
|
1352
|
+
}
|
|
1353
|
+
],
|
|
1354
|
+
"slots": [],
|
|
1355
|
+
"events": [
|
|
1356
|
+
{
|
|
1357
|
+
"name": "change",
|
|
1358
|
+
"type": "CustomEvent<CColorPickerValue>",
|
|
1359
|
+
"description": "Fired when the value changes — a pick in the panel, typed text\ncommitted, the field cleared — carrying the colour in the `format`\nnotation, or `null`. A drag on the area or a slider fires it once, on\nrelease."
|
|
1360
|
+
},
|
|
1361
|
+
{
|
|
1362
|
+
"name": "change:text",
|
|
1363
|
+
"type": "CustomEvent<string>",
|
|
1364
|
+
"description": "Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed. Read `badInput` to tell whether it named a colour."
|
|
1365
|
+
},
|
|
1366
|
+
{
|
|
1367
|
+
"name": "input",
|
|
1368
|
+
"type": "CustomEvent<void>",
|
|
1369
|
+
"description": "Native bubbling input event dispatched alongside every value change —\neach move of a drag included — so a plain `v-model` stays in sync.\nCarries no detail."
|
|
1370
|
+
},
|
|
1371
|
+
{
|
|
1372
|
+
"name": "update:value",
|
|
1373
|
+
"type": "CustomEvent<CColorPickerValue>",
|
|
1374
|
+
"description": "Fired with every value change, each move of a drag included — the\n`v-model` contract."
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
"js": {
|
|
1378
|
+
"properties": [
|
|
1379
|
+
{
|
|
1380
|
+
"name": "alpha",
|
|
1381
|
+
"description": "Let the colour carry transparency: an alpha slider and an A channel join\nthe panel. Without it typed alpha is dropped",
|
|
1382
|
+
"type": "boolean"
|
|
1383
|
+
},
|
|
1384
|
+
{
|
|
1385
|
+
"name": "clearable",
|
|
1386
|
+
"description": "Make the value clearable",
|
|
1387
|
+
"type": "boolean"
|
|
1388
|
+
},
|
|
1389
|
+
{
|
|
1390
|
+
"name": "disabled",
|
|
1391
|
+
"description": "Disable the field",
|
|
1392
|
+
"type": "boolean"
|
|
1393
|
+
},
|
|
1394
|
+
{
|
|
1395
|
+
"name": "errorMessage",
|
|
1396
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
1397
|
+
"type": "string"
|
|
1398
|
+
},
|
|
1399
|
+
{
|
|
1400
|
+
"name": "format",
|
|
1401
|
+
"description": "The notation the value is written in — and every emission with it:\n`#rrggbb`, `rgb(r g b)` or `oklch(l c h)`",
|
|
1402
|
+
"type": "'hex' | 'oklch' | 'rgb'"
|
|
1403
|
+
},
|
|
1404
|
+
{
|
|
1405
|
+
"name": "hideDetails",
|
|
1406
|
+
"description": "Hide the hint and error messages",
|
|
1407
|
+
"type": "boolean"
|
|
1408
|
+
},
|
|
1409
|
+
{
|
|
1410
|
+
"name": "hint",
|
|
1411
|
+
"description": "Hint text for the field",
|
|
1412
|
+
"type": "string"
|
|
1413
|
+
},
|
|
1414
|
+
{
|
|
1415
|
+
"name": "hostId",
|
|
1416
|
+
"description": "Id of the element",
|
|
1417
|
+
"type": "string"
|
|
1418
|
+
},
|
|
1419
|
+
{
|
|
1420
|
+
"name": "label",
|
|
1421
|
+
"description": "Element label",
|
|
1422
|
+
"type": "string"
|
|
1423
|
+
},
|
|
1424
|
+
{
|
|
1425
|
+
"name": "labelOnTop",
|
|
1426
|
+
"description": "Label on top of the field",
|
|
1427
|
+
"type": "boolean"
|
|
1428
|
+
},
|
|
1429
|
+
{
|
|
1430
|
+
"name": "name",
|
|
1431
|
+
"description": "Input field name",
|
|
1432
|
+
"type": "string"
|
|
1433
|
+
},
|
|
1434
|
+
{
|
|
1435
|
+
"name": "placeholder",
|
|
1436
|
+
"description": "Placeholder of the input; an example of the notation when empty",
|
|
1437
|
+
"type": "string"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
"name": "required",
|
|
1441
|
+
"description": "Set the field as required",
|
|
1442
|
+
"type": "boolean"
|
|
1443
|
+
},
|
|
1444
|
+
{
|
|
1445
|
+
"name": "shadow",
|
|
1446
|
+
"description": "Shadow variant",
|
|
1447
|
+
"type": "boolean"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
"name": "size",
|
|
1451
|
+
"description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
|
|
1452
|
+
"type": "'default' | 'small'"
|
|
1453
|
+
},
|
|
1454
|
+
{
|
|
1455
|
+
"name": "swatches",
|
|
1456
|
+
"description": "Predefined colours offered under the picker — CSS colours, or\n`{ value, name }` objects whose name is read out and shown. Arrays have\nno attribute form — bind as a DOM property",
|
|
1457
|
+
"type": "CColorPickerSwatch[]"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
"name": "swatchesOnly",
|
|
1461
|
+
"description": "Limit the choice to the swatches: the field becomes readonly and opens\na panel of the swatches alone",
|
|
1462
|
+
"type": "boolean"
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
"name": "texts",
|
|
1466
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have\nno attribute form — bind as a DOM property",
|
|
1467
|
+
"type": "CColorPickerTexts"
|
|
1468
|
+
},
|
|
1469
|
+
{
|
|
1470
|
+
"name": "valid",
|
|
1471
|
+
"description": "Set the validity of the field",
|
|
1472
|
+
"type": "boolean"
|
|
1473
|
+
},
|
|
1474
|
+
{
|
|
1475
|
+
"name": "value",
|
|
1476
|
+
"description": "The colour in the `format` notation, or `null` when empty. Any CSS\ncolour is accepted and shown in the notation",
|
|
1477
|
+
"type": "CColorPickerValue"
|
|
1478
|
+
},
|
|
1479
|
+
{
|
|
1480
|
+
"name": "badInput",
|
|
1481
|
+
"description": "Whether the committed text names no colour — the value is then `null` (CONTEXT.md \"Bad input\").",
|
|
1482
|
+
"type": "boolean"
|
|
1483
|
+
}
|
|
1484
|
+
],
|
|
1485
|
+
"events": [
|
|
1486
|
+
{
|
|
1487
|
+
"name": "change",
|
|
1488
|
+
"type": "CustomEvent<CColorPickerValue>",
|
|
1489
|
+
"description": "Fired when the value changes — a pick in the panel, typed text\ncommitted, the field cleared — carrying the colour in the `format`\nnotation, or `null`. A drag on the area or a slider fires it once, on\nrelease."
|
|
1490
|
+
},
|
|
1491
|
+
{
|
|
1492
|
+
"name": "change:text",
|
|
1493
|
+
"type": "CustomEvent<string>",
|
|
1494
|
+
"description": "Fired on every commit of typed text (Enter or leaving the input) with the\ntext as typed. Read `badInput` to tell whether it named a colour."
|
|
1495
|
+
},
|
|
1496
|
+
{
|
|
1497
|
+
"name": "input",
|
|
1498
|
+
"type": "CustomEvent<void>",
|
|
1499
|
+
"description": "Native bubbling input event dispatched alongside every value change —\neach move of a drag included — so a plain `v-model` stays in sync.\nCarries no detail."
|
|
1500
|
+
},
|
|
1501
|
+
{
|
|
1502
|
+
"name": "update:value",
|
|
1503
|
+
"type": "CustomEvent<CColorPickerValue>",
|
|
1504
|
+
"description": "Fired with every value change, each move of a drag included — the\n`v-model` contract."
|
|
1505
|
+
}
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
},
|
|
1258
1509
|
{
|
|
1259
1510
|
"name": "c-csc-logo",
|
|
1260
1511
|
"description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element rendering the CSC logo",
|
|
@@ -2037,6 +2288,217 @@
|
|
|
2037
2288
|
]
|
|
2038
2289
|
}
|
|
2039
2290
|
},
|
|
2291
|
+
{
|
|
2292
|
+
"name": "c-file-upload",
|
|
2293
|
+
"description": "A field the user adds files to by dropping them on it or choosing them from a file dialog — and, given an upload function, the place each file's upload shows its progress.\n---\n\n\n### **Events:**\n - **change** - Fired with the new list of file entries.\n- **input** - Native bubbling input event fired with every value change so a plain Vue\n`v-model` works. No detail.\n- **reject** - Fired after an add that refused files, listing each with its reason —\na type outside `accept`, a file over `max-size`, a file already held,\none beyond `max-files`, or a folder. The refused files never join the\nvalue.\n- **update:value** - v-model contract event, fired with `change`.\n\n### **Methods:**\n - **startUploads()** - Queue every `local` file entry for the upload function — how a `manual`\nfield starts; files added after the call wait for the next one. Fires the\nvalue events once when it starts any. Does nothing without an upload function\n\n### **CSS Parts:**\n - **root** - The field: label, drop zone, message line and file list. The whole of it takes a drop\n- **label** - The label above the drop zone\n- **drop-zone** - The dashed drop zone — the large button, or the `compact` row\n- **message** - The hint/error message area under the drop zone (always reserved unless `hide-details`)\n- **list** - The list of file entries and rejected files\n- **entry** - One file entry's row\n- **rejected** - One rejected file's row\n- **progress** - The progress bar along an uploading row's bottom edge",
|
|
2294
|
+
"doc-url": "",
|
|
2295
|
+
"attributes": [
|
|
2296
|
+
{
|
|
2297
|
+
"name": "accept",
|
|
2298
|
+
"description": "The file types the field takes, in the native `accept` syntax: extensions (`.pdf`) and media types (`image/*`, `application/json`), comma separated. It filters the file dialog and is checked again on a drop",
|
|
2299
|
+
"value": { "type": "string", "default": "''" }
|
|
2300
|
+
},
|
|
2301
|
+
{
|
|
2302
|
+
"name": "compact",
|
|
2303
|
+
"description": "Show the drop zone as a control-height row — a \"Choose files\" button and a drop prompt — that lines up with the fields beside it",
|
|
2304
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2305
|
+
},
|
|
2306
|
+
{
|
|
2307
|
+
"name": "disabled",
|
|
2308
|
+
"description": "Disable the field. Uploads already running continue",
|
|
2309
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2310
|
+
},
|
|
2311
|
+
{
|
|
2312
|
+
"name": "error-message",
|
|
2313
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
2314
|
+
"value": { "type": "string", "default": "''" }
|
|
2315
|
+
},
|
|
2316
|
+
{
|
|
2317
|
+
"name": "hide-details",
|
|
2318
|
+
"description": "Hide the hint and error messages",
|
|
2319
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2320
|
+
},
|
|
2321
|
+
{
|
|
2322
|
+
"name": "hint",
|
|
2323
|
+
"description": "Hint text under the drop zone — the place to name the accepted types and limits",
|
|
2324
|
+
"value": { "type": "string", "default": "''" }
|
|
2325
|
+
},
|
|
2326
|
+
{
|
|
2327
|
+
"name": "label",
|
|
2328
|
+
"description": "Label of the field",
|
|
2329
|
+
"value": { "type": "string", "default": "''" }
|
|
2330
|
+
},
|
|
2331
|
+
{
|
|
2332
|
+
"name": "manual",
|
|
2333
|
+
"description": "Hold added files as `local` even with an upload function, until `startUploads()` queues them — for a form that uploads on its own button. Files added after the call wait for the next one",
|
|
2334
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2335
|
+
},
|
|
2336
|
+
{
|
|
2337
|
+
"name": "max-files",
|
|
2338
|
+
"description": "The most file entries a `multiple` field holds; files beyond it are rejected",
|
|
2339
|
+
"value": { "type": "null | number", "default": "null" }
|
|
2340
|
+
},
|
|
2341
|
+
{
|
|
2342
|
+
"name": "max-size",
|
|
2343
|
+
"description": "The largest file in bytes; a larger one is rejected. Sizes are shown in decimal units, so write the limit in decimal bytes (`10000000` reads \"10 MB\")",
|
|
2344
|
+
"value": { "type": "null | number", "default": "null" }
|
|
2345
|
+
},
|
|
2346
|
+
{
|
|
2347
|
+
"name": "multiple",
|
|
2348
|
+
"description": "Let a pick or a drop add several files. Without it the field holds one file and a new pick replaces it; the value is a list either way",
|
|
2349
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2350
|
+
},
|
|
2351
|
+
{
|
|
2352
|
+
"name": "required",
|
|
2353
|
+
"description": "Set the field as required",
|
|
2354
|
+
"value": { "type": "boolean", "default": "false" }
|
|
2355
|
+
},
|
|
2356
|
+
{
|
|
2357
|
+
"name": "size",
|
|
2358
|
+
"description": "Height of the `compact` row: the 52px default (the shared control height) or the 36px `small` row. The large drop zone has one size",
|
|
2359
|
+
"value": { "type": "'default' | 'small'", "default": "'default'" }
|
|
2360
|
+
},
|
|
2361
|
+
{
|
|
2362
|
+
"name": "valid",
|
|
2363
|
+
"description": "Set the validity of the field",
|
|
2364
|
+
"value": { "type": "boolean", "default": "true" }
|
|
2365
|
+
}
|
|
2366
|
+
],
|
|
2367
|
+
"slots": [],
|
|
2368
|
+
"events": [
|
|
2369
|
+
{
|
|
2370
|
+
"name": "change",
|
|
2371
|
+
"type": "CustomEvent<CFileUploadEntry[]>",
|
|
2372
|
+
"description": "Fired with the new list of file entries."
|
|
2373
|
+
},
|
|
2374
|
+
{
|
|
2375
|
+
"name": "input",
|
|
2376
|
+
"type": "CustomEvent<void>",
|
|
2377
|
+
"description": "Native bubbling input event fired with every value change so a plain Vue\n`v-model` works. No detail."
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
"name": "reject",
|
|
2381
|
+
"type": "CustomEvent<CFileUploadRejection[]>",
|
|
2382
|
+
"description": "Fired after an add that refused files, listing each with its reason —\na type outside `accept`, a file over `max-size`, a file already held,\none beyond `max-files`, or a folder. The refused files never join the\nvalue."
|
|
2383
|
+
},
|
|
2384
|
+
{
|
|
2385
|
+
"name": "update:value",
|
|
2386
|
+
"type": "CustomEvent<CFileUploadEntry[]>",
|
|
2387
|
+
"description": "v-model contract event, fired with `change`."
|
|
2388
|
+
}
|
|
2389
|
+
],
|
|
2390
|
+
"js": {
|
|
2391
|
+
"properties": [
|
|
2392
|
+
{
|
|
2393
|
+
"name": "accept",
|
|
2394
|
+
"description": "The file types the field takes, in the native `accept` syntax: extensions (`.pdf`) and media types (`image/*`, `application/json`), comma separated. It filters the file dialog and is checked again on a drop",
|
|
2395
|
+
"type": "string"
|
|
2396
|
+
},
|
|
2397
|
+
{
|
|
2398
|
+
"name": "compact",
|
|
2399
|
+
"description": "Show the drop zone as a control-height row — a \"Choose files\" button and a drop prompt — that lines up with the fields beside it",
|
|
2400
|
+
"type": "boolean"
|
|
2401
|
+
},
|
|
2402
|
+
{
|
|
2403
|
+
"name": "disabled",
|
|
2404
|
+
"description": "Disable the field. Uploads already running continue",
|
|
2405
|
+
"type": "boolean"
|
|
2406
|
+
},
|
|
2407
|
+
{
|
|
2408
|
+
"name": "errorMessage",
|
|
2409
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
2410
|
+
"type": "string"
|
|
2411
|
+
},
|
|
2412
|
+
{
|
|
2413
|
+
"name": "hideDetails",
|
|
2414
|
+
"description": "Hide the hint and error messages",
|
|
2415
|
+
"type": "boolean"
|
|
2416
|
+
},
|
|
2417
|
+
{
|
|
2418
|
+
"name": "hint",
|
|
2419
|
+
"description": "Hint text under the drop zone — the place to name the accepted types and limits",
|
|
2420
|
+
"type": "string"
|
|
2421
|
+
},
|
|
2422
|
+
{
|
|
2423
|
+
"name": "label",
|
|
2424
|
+
"description": "Label of the field",
|
|
2425
|
+
"type": "string"
|
|
2426
|
+
},
|
|
2427
|
+
{
|
|
2428
|
+
"name": "manual",
|
|
2429
|
+
"description": "Hold added files as `local` even with an upload function, until `startUploads()` queues them — for a form that uploads on its own button. Files added after the call wait for the next one",
|
|
2430
|
+
"type": "boolean"
|
|
2431
|
+
},
|
|
2432
|
+
{
|
|
2433
|
+
"name": "maxFiles",
|
|
2434
|
+
"description": "The most file entries a `multiple` field holds; files beyond it are rejected",
|
|
2435
|
+
"type": "null | number"
|
|
2436
|
+
},
|
|
2437
|
+
{
|
|
2438
|
+
"name": "maxSize",
|
|
2439
|
+
"description": "The largest file in bytes; a larger one is rejected. Sizes are shown in decimal units, so write the limit in decimal bytes (`10000000` reads \"10 MB\")",
|
|
2440
|
+
"type": "null | number"
|
|
2441
|
+
},
|
|
2442
|
+
{
|
|
2443
|
+
"name": "multiple",
|
|
2444
|
+
"description": "Let a pick or a drop add several files. Without it the field holds one file and a new pick replaces it; the value is a list either way",
|
|
2445
|
+
"type": "boolean"
|
|
2446
|
+
},
|
|
2447
|
+
{
|
|
2448
|
+
"name": "required",
|
|
2449
|
+
"description": "Set the field as required",
|
|
2450
|
+
"type": "boolean"
|
|
2451
|
+
},
|
|
2452
|
+
{
|
|
2453
|
+
"name": "size",
|
|
2454
|
+
"description": "Height of the `compact` row: the 52px default (the shared control height) or the 36px `small` row. The large drop zone has one size",
|
|
2455
|
+
"type": "'default' | 'small'"
|
|
2456
|
+
},
|
|
2457
|
+
{
|
|
2458
|
+
"name": "texts",
|
|
2459
|
+
"description": "UI text overrides (i18n), merged over the English defaults. Objects have no attribute form — bind as a DOM property",
|
|
2460
|
+
"type": "CFileUploadTexts"
|
|
2461
|
+
},
|
|
2462
|
+
{
|
|
2463
|
+
"name": "upload",
|
|
2464
|
+
"description": "The upload function: called once per added file with an abort signal and a progress callback taking a fraction from 0 to 1; what it resolves to becomes the entry's `result`, an `Error` it rejects with becomes the entry's `error` text. Without one the field only holds the files. A function — bind as a DOM property",
|
|
2465
|
+
"type": "CFileUploadFunction"
|
|
2466
|
+
},
|
|
2467
|
+
{
|
|
2468
|
+
"name": "valid",
|
|
2469
|
+
"description": "Set the validity of the field",
|
|
2470
|
+
"type": "boolean"
|
|
2471
|
+
},
|
|
2472
|
+
{
|
|
2473
|
+
"name": "value",
|
|
2474
|
+
"description": "The file entries — always a list. A picked file's entry carries the browser `File`; a server file's entry is `{ id, name, size, status: 'done' }`. `''` reads as empty — what a plain `v-model` holding `null` writes. An array — bind as a DOM property",
|
|
2475
|
+
"type": "CFileUploadEntry[] | null | string"
|
|
2476
|
+
}
|
|
2477
|
+
],
|
|
2478
|
+
"events": [
|
|
2479
|
+
{
|
|
2480
|
+
"name": "change",
|
|
2481
|
+
"type": "CustomEvent<CFileUploadEntry[]>",
|
|
2482
|
+
"description": "Fired with the new list of file entries."
|
|
2483
|
+
},
|
|
2484
|
+
{
|
|
2485
|
+
"name": "input",
|
|
2486
|
+
"type": "CustomEvent<void>",
|
|
2487
|
+
"description": "Native bubbling input event fired with every value change so a plain Vue\n`v-model` works. No detail."
|
|
2488
|
+
},
|
|
2489
|
+
{
|
|
2490
|
+
"name": "reject",
|
|
2491
|
+
"type": "CustomEvent<CFileUploadRejection[]>",
|
|
2492
|
+
"description": "Fired after an add that refused files, listing each with its reason —\na type outside `accept`, a file over `max-size`, a file already held,\none beyond `max-files`, or a folder. The refused files never join the\nvalue."
|
|
2493
|
+
},
|
|
2494
|
+
{
|
|
2495
|
+
"name": "update:value",
|
|
2496
|
+
"type": "CustomEvent<CFileUploadEntry[]>",
|
|
2497
|
+
"description": "v-model contract event, fired with `change`."
|
|
2498
|
+
}
|
|
2499
|
+
]
|
|
2500
|
+
}
|
|
2501
|
+
},
|
|
2040
2502
|
{
|
|
2041
2503
|
"name": "c-icon",
|
|
2042
2504
|
"description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element rendering the icon",
|
|
@@ -6819,10 +7281,6 @@
|
|
|
6819
7281
|
},
|
|
6820
7282
|
"css": {
|
|
6821
7283
|
"properties": [
|
|
6822
|
-
{
|
|
6823
|
-
"name": "--c-font-family",
|
|
6824
|
-
"description": "Font stack applied to the label (native buttons do not inherit it)."
|
|
6825
|
-
},
|
|
6826
7284
|
{
|
|
6827
7285
|
"name": "--c-main-viewport-height",
|
|
6828
7286
|
"description": "Height of the scroll viewport the layout pins against (default `100dvh`); a bounded shell with its own scrollbar sets it to its box height"
|
|
@@ -7052,6 +7510,86 @@
|
|
|
7052
7510
|
"name": "part(message)",
|
|
7053
7511
|
"description": "The hint / error message area below the checkbox (always reserved unless `hide-details`)"
|
|
7054
7512
|
},
|
|
7513
|
+
{
|
|
7514
|
+
"name": "part(input)",
|
|
7515
|
+
"description": "The text input; under `swatches-only` the readonly field"
|
|
7516
|
+
},
|
|
7517
|
+
{
|
|
7518
|
+
"name": "part(separator)",
|
|
7519
|
+
"description": "Unused: the shared typed field's range separator"
|
|
7520
|
+
},
|
|
7521
|
+
{
|
|
7522
|
+
"name": "part(color-chip)",
|
|
7523
|
+
"description": "The colour painted in the colour button, or before the swatch-only field's text"
|
|
7524
|
+
},
|
|
7525
|
+
{
|
|
7526
|
+
"name": "part(panel)",
|
|
7527
|
+
"description": "The top-layer popover container anchored below the field"
|
|
7528
|
+
},
|
|
7529
|
+
{
|
|
7530
|
+
"name": "part(card)",
|
|
7531
|
+
"description": "The dialog surface inside the panel"
|
|
7532
|
+
},
|
|
7533
|
+
{
|
|
7534
|
+
"name": "part(heading-row)",
|
|
7535
|
+
"description": "The top row of the fullscreen panel (narrow viewports): the field label as heading and the close button"
|
|
7536
|
+
},
|
|
7537
|
+
{
|
|
7538
|
+
"name": "part(heading)",
|
|
7539
|
+
"description": "The field label naming the fullscreen panel"
|
|
7540
|
+
},
|
|
7541
|
+
{
|
|
7542
|
+
"name": "part(close)",
|
|
7543
|
+
"description": "The close button of the fullscreen panel"
|
|
7544
|
+
},
|
|
7545
|
+
{
|
|
7546
|
+
"name": "part(area)",
|
|
7547
|
+
"description": "The saturation × brightness square at the current hue"
|
|
7548
|
+
},
|
|
7549
|
+
{
|
|
7550
|
+
"name": "part(area-thumb)",
|
|
7551
|
+
"description": "The marker of the colour in the area"
|
|
7552
|
+
},
|
|
7553
|
+
{ "name": "part(hue-slider)", "description": "The hue slider" },
|
|
7554
|
+
{
|
|
7555
|
+
"name": "part(alpha-slider)",
|
|
7556
|
+
"description": "The alpha slider (`alpha`)"
|
|
7557
|
+
},
|
|
7558
|
+
{
|
|
7559
|
+
"name": "part(comparison)",
|
|
7560
|
+
"description": "The strip of the original colour beside the new one, when the panel opened on a colour"
|
|
7561
|
+
},
|
|
7562
|
+
{
|
|
7563
|
+
"name": "part(original-color)",
|
|
7564
|
+
"description": "The colour the panel opened on; a click restores it"
|
|
7565
|
+
},
|
|
7566
|
+
{
|
|
7567
|
+
"name": "part(new-color)",
|
|
7568
|
+
"description": "The colour the panel holds now"
|
|
7569
|
+
},
|
|
7570
|
+
{
|
|
7571
|
+
"name": "part(notation-switch)",
|
|
7572
|
+
"description": "The HEX | RGB | OKLCH row choosing the channel editor"
|
|
7573
|
+
},
|
|
7574
|
+
{
|
|
7575
|
+
"name": "part(notation)",
|
|
7576
|
+
"description": "One button of the notation switch"
|
|
7577
|
+
},
|
|
7578
|
+
{
|
|
7579
|
+
"name": "part(channels)",
|
|
7580
|
+
"description": "The channel editor: the inputs of one notation"
|
|
7581
|
+
},
|
|
7582
|
+
{ "name": "part(channel)", "description": "One channel input" },
|
|
7583
|
+
{ "name": "part(swatches)", "description": "The list of swatches" },
|
|
7584
|
+
{ "name": "part(swatch)", "description": "One swatch" },
|
|
7585
|
+
{
|
|
7586
|
+
"name": "part(actions)",
|
|
7587
|
+
"description": "The row under the panel body in the fullscreen panel (narrow viewports)"
|
|
7588
|
+
},
|
|
7589
|
+
{
|
|
7590
|
+
"name": "part(done)",
|
|
7591
|
+
"description": "The Done button of the fullscreen panel (narrow viewports): commits what the panel holds and closes"
|
|
7592
|
+
},
|
|
7055
7593
|
{
|
|
7056
7594
|
"name": "part(root)",
|
|
7057
7595
|
"description": "The `<svg>` element rendering the CSC logo"
|
|
@@ -7233,6 +7771,32 @@
|
|
|
7233
7771
|
"name": "part(mark)",
|
|
7234
7772
|
"description": "The check glyph inside a row indicator; draws with `currentColor`"
|
|
7235
7773
|
},
|
|
7774
|
+
{
|
|
7775
|
+
"name": "part(root)",
|
|
7776
|
+
"description": "The field: label, drop zone, message line and file list. The whole of it takes a drop"
|
|
7777
|
+
},
|
|
7778
|
+
{
|
|
7779
|
+
"name": "part(label)",
|
|
7780
|
+
"description": "The label above the drop zone"
|
|
7781
|
+
},
|
|
7782
|
+
{
|
|
7783
|
+
"name": "part(drop-zone)",
|
|
7784
|
+
"description": "The dashed drop zone — the large button, or the `compact` row"
|
|
7785
|
+
},
|
|
7786
|
+
{
|
|
7787
|
+
"name": "part(message)",
|
|
7788
|
+
"description": "The hint/error message area under the drop zone (always reserved unless `hide-details`)"
|
|
7789
|
+
},
|
|
7790
|
+
{
|
|
7791
|
+
"name": "part(list)",
|
|
7792
|
+
"description": "The list of file entries and rejected files"
|
|
7793
|
+
},
|
|
7794
|
+
{ "name": "part(entry)", "description": "One file entry's row" },
|
|
7795
|
+
{ "name": "part(rejected)", "description": "One rejected file's row" },
|
|
7796
|
+
{
|
|
7797
|
+
"name": "part(progress)",
|
|
7798
|
+
"description": "The progress bar along an uploading row's bottom edge"
|
|
7799
|
+
},
|
|
7236
7800
|
{
|
|
7237
7801
|
"name": "part(root)",
|
|
7238
7802
|
"description": "The `<svg>` element rendering the icon"
|