@cscfi/csc-ui 4.0.0-alpha.30 → 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 +20450 -18713
- 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/useKeyboardModality.d.ts +7 -0
- 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
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
},
|
|
212
212
|
{
|
|
213
213
|
"name": "c-button",
|
|
214
|
-
"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
|
|
214
|
+
"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.",
|
|
215
215
|
"attributes": [
|
|
216
216
|
{
|
|
217
217
|
"name": "active",
|
|
@@ -451,6 +451,87 @@
|
|
|
451
451
|
],
|
|
452
452
|
"references": []
|
|
453
453
|
},
|
|
454
|
+
{
|
|
455
|
+
"name": "c-color-picker",
|
|
456
|
+
"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",
|
|
457
|
+
"attributes": [
|
|
458
|
+
{
|
|
459
|
+
"name": "alpha",
|
|
460
|
+
"description": "Let the colour carry transparency: an alpha slider and an A channel join\nthe panel. Without it typed alpha is dropped",
|
|
461
|
+
"values": []
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
"name": "clearable",
|
|
465
|
+
"description": "Make the value clearable",
|
|
466
|
+
"values": []
|
|
467
|
+
},
|
|
468
|
+
{
|
|
469
|
+
"name": "disabled",
|
|
470
|
+
"description": "Disable the field",
|
|
471
|
+
"values": []
|
|
472
|
+
},
|
|
473
|
+
{
|
|
474
|
+
"name": "error-message",
|
|
475
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
476
|
+
"values": []
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "format",
|
|
480
|
+
"description": "The notation the value is written in — and every emission with it:\n`#rrggbb`, `rgb(r g b)` or `oklch(l c h)`",
|
|
481
|
+
"values": [{ "name": "hex" }, { "name": "oklch" }, { "name": "rgb" }]
|
|
482
|
+
},
|
|
483
|
+
{
|
|
484
|
+
"name": "hide-details",
|
|
485
|
+
"description": "Hide the hint and error messages",
|
|
486
|
+
"values": []
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
"name": "hint",
|
|
490
|
+
"description": "Hint text for the field",
|
|
491
|
+
"values": []
|
|
492
|
+
},
|
|
493
|
+
{ "name": "host-id", "description": "Id of the element", "values": [] },
|
|
494
|
+
{ "name": "label", "description": "Element label", "values": [] },
|
|
495
|
+
{
|
|
496
|
+
"name": "label-on-top",
|
|
497
|
+
"description": "Label on top of the field",
|
|
498
|
+
"values": []
|
|
499
|
+
},
|
|
500
|
+
{ "name": "name", "description": "Input field name", "values": [] },
|
|
501
|
+
{
|
|
502
|
+
"name": "placeholder",
|
|
503
|
+
"description": "Placeholder of the input; an example of the notation when empty",
|
|
504
|
+
"values": []
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"name": "required",
|
|
508
|
+
"description": "Set the field as required",
|
|
509
|
+
"values": []
|
|
510
|
+
},
|
|
511
|
+
{ "name": "shadow", "description": "Shadow variant", "values": [] },
|
|
512
|
+
{
|
|
513
|
+
"name": "size",
|
|
514
|
+
"description": "Field height: the 52px default (the shared control height) or the 36px `small` box",
|
|
515
|
+
"values": [{ "name": "default" }, { "name": "small" }]
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
"name": "swatches-only",
|
|
519
|
+
"description": "Limit the choice to the swatches: the field becomes readonly and opens\na panel of the swatches alone",
|
|
520
|
+
"values": []
|
|
521
|
+
},
|
|
522
|
+
{
|
|
523
|
+
"name": "valid",
|
|
524
|
+
"description": "Set the validity of the field",
|
|
525
|
+
"values": []
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"name": "value",
|
|
529
|
+
"description": "The colour in the `format` notation, or `null` when empty. Any CSS\ncolour is accepted and shown in the notation",
|
|
530
|
+
"values": [{ "name": "CColorPickerValue" }]
|
|
531
|
+
}
|
|
532
|
+
],
|
|
533
|
+
"references": []
|
|
534
|
+
},
|
|
454
535
|
{
|
|
455
536
|
"name": "c-csc-logo",
|
|
456
537
|
"description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element rendering the CSC logo",
|
|
@@ -714,6 +795,79 @@
|
|
|
714
795
|
],
|
|
715
796
|
"references": []
|
|
716
797
|
},
|
|
798
|
+
{
|
|
799
|
+
"name": "c-file-upload",
|
|
800
|
+
"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",
|
|
801
|
+
"attributes": [
|
|
802
|
+
{
|
|
803
|
+
"name": "accept",
|
|
804
|
+
"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",
|
|
805
|
+
"values": []
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
"name": "compact",
|
|
809
|
+
"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",
|
|
810
|
+
"values": []
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
"name": "disabled",
|
|
814
|
+
"description": "Disable the field. Uploads already running continue",
|
|
815
|
+
"values": []
|
|
816
|
+
},
|
|
817
|
+
{
|
|
818
|
+
"name": "error-message",
|
|
819
|
+
"description": "Error message shown in place of the hint while the field is invalid",
|
|
820
|
+
"values": []
|
|
821
|
+
},
|
|
822
|
+
{
|
|
823
|
+
"name": "hide-details",
|
|
824
|
+
"description": "Hide the hint and error messages",
|
|
825
|
+
"values": []
|
|
826
|
+
},
|
|
827
|
+
{
|
|
828
|
+
"name": "hint",
|
|
829
|
+
"description": "Hint text under the drop zone — the place to name the accepted types and limits",
|
|
830
|
+
"values": []
|
|
831
|
+
},
|
|
832
|
+
{ "name": "label", "description": "Label of the field", "values": [] },
|
|
833
|
+
{
|
|
834
|
+
"name": "manual",
|
|
835
|
+
"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",
|
|
836
|
+
"values": []
|
|
837
|
+
},
|
|
838
|
+
{
|
|
839
|
+
"name": "max-files",
|
|
840
|
+
"description": "The most file entries a `multiple` field holds; files beyond it are rejected",
|
|
841
|
+
"values": []
|
|
842
|
+
},
|
|
843
|
+
{
|
|
844
|
+
"name": "max-size",
|
|
845
|
+
"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\")",
|
|
846
|
+
"values": []
|
|
847
|
+
},
|
|
848
|
+
{
|
|
849
|
+
"name": "multiple",
|
|
850
|
+
"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",
|
|
851
|
+
"values": []
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
"name": "required",
|
|
855
|
+
"description": "Set the field as required",
|
|
856
|
+
"values": []
|
|
857
|
+
},
|
|
858
|
+
{
|
|
859
|
+
"name": "size",
|
|
860
|
+
"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",
|
|
861
|
+
"values": [{ "name": "default" }, { "name": "small" }]
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
"name": "valid",
|
|
865
|
+
"description": "Set the validity of the field",
|
|
866
|
+
"values": []
|
|
867
|
+
}
|
|
868
|
+
],
|
|
869
|
+
"references": []
|
|
870
|
+
},
|
|
717
871
|
{
|
|
718
872
|
"name": "c-icon",
|
|
719
873
|
"description": "\n---\n\n\n### **CSS Parts:**\n - **root** - The `<svg>` element rendering the icon",
|