@cscfi/csc-ui 4.0.0-rc.6 → 4.0.0-rc.8

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.
@@ -816,7 +816,7 @@
816
816
  },
817
817
  {
818
818
  "name": "c-file-upload",
819
- "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 - **focus()** - Focus its drop zone's button, as `focus()` does on a native control: the element renders\nno box of its own to take it.\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-message`)\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",
819
+ "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 - **focus()** - Focus its drop zone's button, as `focus()` does on a native control: the element renders\nno box of its own to take it.\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-message`)\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 track along an uploading row's bottom edge\n- **progress-bar** - The bar inside it showing the row's upload progress, or its looping sweep while indeterminate",
820
820
  "attributes": [
821
821
  {
822
822
  "name": "accept",
@@ -902,7 +902,11 @@
902
902
  "description": "Svg `path` `d` attribute value.",
903
903
  "values": []
904
904
  },
905
- { "name": "size", "description": "Icon size in pixels.", "values": [] }
905
+ {
906
+ "name": "size",
907
+ "description": "Icon size in pixels. Unset, the icon takes the size of the icon slot it\nsits in.",
908
+ "values": []
909
+ }
906
910
  ],
907
911
  "references": []
908
912
  },
@@ -1664,16 +1668,16 @@
1664
1668
  },
1665
1669
  {
1666
1670
  "name": "c-progress-bar",
1667
- "description": "A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label.\n---\n\n\n### **CSS Parts:**\n - **root** - The outer flex wrapper around the bar and the details line\n- **bar** - The visible track of the progress bar, wrapping the native `<progress>` element\n- **details** - The percentage and label text line",
1671
+ "description": "A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label.\n---\n\n\n### **CSS Parts:**\n - **root** - The outer flex wrapper around the progress track and the details line\n- **track** - The progress track: the ground the bar grows along, carrying the progressbar role. Its padding is the frame around the bar\n- **bar** - The bar showing the value: the fill, or the looping sweep while indeterminate\n- **details** - The percentage and label text line",
1668
1672
  "attributes": [
1669
1673
  {
1670
1674
  "name": "hide-details",
1671
- "description": "Hides the details line (the percentage and `label`); `label` still\nnames the bar.",
1675
+ "description": "Hides the details line (the percentage and `label`); `label` still\nnames the progress bar.",
1672
1676
  "values": []
1673
1677
  },
1674
1678
  {
1675
1679
  "name": "indeterminate",
1676
- "description": "Replaces the fill with a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
1680
+ "description": "Turns the bar into a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
1677
1681
  "values": []
1678
1682
  },
1679
1683
  {
@@ -1683,12 +1687,12 @@
1683
1687
  },
1684
1688
  {
1685
1689
  "name": "single-line",
1686
- "description": "Places the details line beside the bar instead of below it.",
1690
+ "description": "Places the details line beside the progress track instead of below it.",
1687
1691
  "values": []
1688
1692
  },
1689
1693
  {
1690
1694
  "name": "value",
1691
- "description": "Completion percentage, 0 to 100. The fill clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
1695
+ "description": "Completion percentage, 0 to 100. The bar clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
1692
1696
  "values": []
1693
1697
  }
1694
1698
  ],
@@ -2042,8 +2046,27 @@
2042
2046
  },
2043
2047
  {
2044
2048
  "name": "c-status",
2045
- "description": "A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type.\n---\n\n\n### **Slots:**\n - **default** - The status text, such as Active or Failed\n\n### **CSS Parts:**\n - **root** - The status pill wrapping the slotted text",
2049
+ "description": "A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type.\n---\n\n\n### **Slots:**\n - **default** - The status text, such as Active or Failed\n- **icon** - An icon, such as a `c-icon`, that replaces the marker\n\n### **CSS Parts:**\n - **root** - The status pill wrapping the marker and the slotted text\n- **marker** - The marker before the text: the icon's halo, or the dot",
2046
2050
  "attributes": [
2051
+ {
2052
+ "name": "appearance",
2053
+ "description": "`filled` (unless set, or changed app-wide) paints the status tint;\n`outlined` keeps the ground behind the pill and colours only the marker.",
2054
+ "values": [{ "name": "filled" }, { "name": "outlined" }]
2055
+ },
2056
+ {
2057
+ "name": "marker",
2058
+ "description": "The symbol before the text: `icon` (the status icon on a tinted halo),\n`dot`, or `none` (unless set, or changed app-wide). A slotted icon\nreplaces it.",
2059
+ "values": [{ "name": "dot" }, { "name": "icon" }, { "name": "none" }]
2060
+ },
2061
+ {
2062
+ "name": "size",
2063
+ "description": "Size of the pill: `small`, `default` (unless set, or changed app-wide)\nor `large`.",
2064
+ "values": [
2065
+ { "name": "default" },
2066
+ { "name": "large" },
2067
+ { "name": "small" }
2068
+ ]
2069
+ },
2047
2070
  {
2048
2071
  "name": "type",
2049
2072
  "description": "The status family whose tint and ink paint the pill; without it the\npill is neutral grey.",
@@ -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-rc.6",
4
+ "version": "4.0.0-rc.8",
5
5
  "description-markup": "markdown",
6
6
  "contributions": {
7
7
  "html": {
@@ -2483,7 +2483,7 @@
2483
2483
  },
2484
2484
  {
2485
2485
  "name": "c-file-upload",
2486
- "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 - **focus()** - Focus its drop zone's button, as `focus()` does on a native control: the element renders\nno box of its own to take it.\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-message`)\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",
2486
+ "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 - **focus()** - Focus its drop zone's button, as `focus()` does on a native control: the element renders\nno box of its own to take it.\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-message`)\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 track along an uploading row's bottom edge\n- **progress-bar** - The bar inside it showing the row's upload progress, or its looping sweep while indeterminate",
2487
2487
  "doc-url": "",
2488
2488
  "attributes": [
2489
2489
  {
@@ -2770,7 +2770,7 @@
2770
2770
  },
2771
2771
  {
2772
2772
  "name": "size",
2773
- "description": "Icon size in pixels.",
2773
+ "description": "Icon size in pixels. Unset, the icon takes the size of the icon slot it\nsits in.",
2774
2774
  "value": {
2775
2775
  "type": "number",
2776
2776
  "default": "24"
@@ -2793,7 +2793,7 @@
2793
2793
  },
2794
2794
  {
2795
2795
  "name": "size",
2796
- "description": "Icon size in pixels.",
2796
+ "description": "Icon size in pixels. Unset, the icon takes the size of the icon slot it\nsits in.",
2797
2797
  "type": "number"
2798
2798
  }
2799
2799
  ],
@@ -4845,12 +4845,12 @@
4845
4845
  },
4846
4846
  {
4847
4847
  "name": "c-progress-bar",
4848
- "description": "A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label.\n---\n\n\n### **CSS Parts:**\n - **root** - The outer flex wrapper around the bar and the details line\n- **bar** - The visible track of the progress bar, wrapping the native `<progress>` element\n- **details** - The percentage and label text line",
4848
+ "description": "A horizontal progress bar that fills a track to a known completion percentage, with an optional details line showing the value and a label.\n---\n\n\n### **CSS Parts:**\n - **root** - The outer flex wrapper around the progress track and the details line\n- **track** - The progress track: the ground the bar grows along, carrying the progressbar role. Its padding is the frame around the bar\n- **bar** - The bar showing the value: the fill, or the looping sweep while indeterminate\n- **details** - The percentage and label text line",
4849
4849
  "doc-url": "",
4850
4850
  "attributes": [
4851
4851
  {
4852
4852
  "name": "hide-details",
4853
- "description": "Hides the details line (the percentage and `label`); `label` still\nnames the bar.",
4853
+ "description": "Hides the details line (the percentage and `label`); `label` still\nnames the progress bar.",
4854
4854
  "value": {
4855
4855
  "type": "boolean",
4856
4856
  "default": "false"
@@ -4858,7 +4858,7 @@
4858
4858
  },
4859
4859
  {
4860
4860
  "name": "indeterminate",
4861
- "description": "Replaces the fill with a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
4861
+ "description": "Turns the bar into a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
4862
4862
  "value": {
4863
4863
  "type": "boolean",
4864
4864
  "default": "false"
@@ -4874,7 +4874,7 @@
4874
4874
  },
4875
4875
  {
4876
4876
  "name": "single-line",
4877
- "description": "Places the details line beside the bar instead of below it.",
4877
+ "description": "Places the details line beside the progress track instead of below it.",
4878
4878
  "value": {
4879
4879
  "type": "boolean",
4880
4880
  "default": "false"
@@ -4882,7 +4882,7 @@
4882
4882
  },
4883
4883
  {
4884
4884
  "name": "value",
4885
- "description": "Completion percentage, 0 to 100. The fill clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
4885
+ "description": "Completion percentage, 0 to 100. The bar clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
4886
4886
  "value": {
4887
4887
  "type": "number",
4888
4888
  "default": "0"
@@ -4895,12 +4895,12 @@
4895
4895
  "properties": [
4896
4896
  {
4897
4897
  "name": "hideDetails",
4898
- "description": "Hides the details line (the percentage and `label`); `label` still\nnames the bar.",
4898
+ "description": "Hides the details line (the percentage and `label`); `label` still\nnames the progress bar.",
4899
4899
  "type": "boolean"
4900
4900
  },
4901
4901
  {
4902
4902
  "name": "indeterminate",
4903
- "description": "Replaces the fill with a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
4903
+ "description": "Turns the bar into a looping sweep for work of unknown duration,\nhiding the details line and exposing no value.",
4904
4904
  "type": "boolean"
4905
4905
  },
4906
4906
  {
@@ -4910,12 +4910,12 @@
4910
4910
  },
4911
4911
  {
4912
4912
  "name": "singleLine",
4913
- "description": "Places the details line beside the bar instead of below it.",
4913
+ "description": "Places the details line beside the progress track instead of below it.",
4914
4914
  "type": "boolean"
4915
4915
  },
4916
4916
  {
4917
4917
  "name": "value",
4918
- "description": "Completion percentage, 0 to 100. The fill clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
4918
+ "description": "Completion percentage, 0 to 100. The bar clamps a value outside that\nrange; the details line shows it as given, a negative one in the error\ncolour.",
4919
4919
  "type": "number"
4920
4920
  }
4921
4921
  ],
@@ -6059,9 +6059,33 @@
6059
6059
  },
6060
6060
  {
6061
6061
  "name": "c-status",
6062
- "description": "A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type.\n---\n\n\n### **Slots:**\n - **default** - The status text, such as Active or Failed\n\n### **CSS Parts:**\n - **root** - The status pill wrapping the slotted text",
6062
+ "description": "A status pill: a short word naming the state of a record, such as Active, Pending or Failed, tinted with the colours of its status type.\n---\n\n\n### **Slots:**\n - **default** - The status text, such as Active or Failed\n- **icon** - An icon, such as a `c-icon`, that replaces the marker\n\n### **CSS Parts:**\n - **root** - The status pill wrapping the marker and the slotted text\n- **marker** - The marker before the text: the icon's halo, or the dot",
6063
6063
  "doc-url": "",
6064
6064
  "attributes": [
6065
+ {
6066
+ "name": "appearance",
6067
+ "description": "`filled` (unless set, or changed app-wide) paints the status tint;\n`outlined` keeps the ground behind the pill and colours only the marker.",
6068
+ "value": {
6069
+ "type": "'filled' | 'outlined'",
6070
+ "default": "'filled'"
6071
+ }
6072
+ },
6073
+ {
6074
+ "name": "marker",
6075
+ "description": "The symbol before the text: `icon` (the status icon on a tinted halo),\n`dot`, or `none` (unless set, or changed app-wide). A slotted icon\nreplaces it.",
6076
+ "value": {
6077
+ "type": "'dot' | 'icon' | 'none'",
6078
+ "default": "'none'"
6079
+ }
6080
+ },
6081
+ {
6082
+ "name": "size",
6083
+ "description": "Size of the pill: `small`, `default` (unless set, or changed app-wide)\nor `large`.",
6084
+ "value": {
6085
+ "type": "'default' | 'large' | 'small'",
6086
+ "default": "'default'"
6087
+ }
6088
+ },
6065
6089
  {
6066
6090
  "name": "type",
6067
6091
  "description": "The status family whose tint and ink paint the pill; without it the\npill is neutral grey.",
@@ -6074,11 +6098,30 @@
6074
6098
  {
6075
6099
  "name": "default",
6076
6100
  "description": "The status text, such as Active or Failed"
6101
+ },
6102
+ {
6103
+ "name": "icon",
6104
+ "description": "An icon, such as a `c-icon`, that replaces the marker"
6077
6105
  }
6078
6106
  ],
6079
6107
  "events": [],
6080
6108
  "js": {
6081
6109
  "properties": [
6110
+ {
6111
+ "name": "appearance",
6112
+ "description": "`filled` (unless set, or changed app-wide) paints the status tint;\n`outlined` keeps the ground behind the pill and colours only the marker.",
6113
+ "type": "'filled' | 'outlined'"
6114
+ },
6115
+ {
6116
+ "name": "marker",
6117
+ "description": "The symbol before the text: `icon` (the status icon on a tinted halo),\n`dot`, or `none` (unless set, or changed app-wide). A slotted icon\nreplaces it.",
6118
+ "type": "'dot' | 'icon' | 'none'"
6119
+ },
6120
+ {
6121
+ "name": "size",
6122
+ "description": "Size of the pill: `small`, `default` (unless set, or changed app-wide)\nor `large`.",
6123
+ "type": "'default' | 'large' | 'small'"
6124
+ },
6082
6125
  {
6083
6126
  "name": "type",
6084
6127
  "description": "The status family whose tint and ink paint the pill; without it the\npill is neutral grey.",
@@ -8733,7 +8776,11 @@
8733
8776
  },
8734
8777
  {
8735
8778
  "name": "part(progress)",
8736
- "description": "The progress bar along an uploading row's bottom edge"
8779
+ "description": "The progress track along an uploading row's bottom edge"
8780
+ },
8781
+ {
8782
+ "name": "part(progress-bar)",
8783
+ "description": "The bar inside it showing the row's upload progress, or its looping sweep while indeterminate"
8737
8784
  },
8738
8785
  {
8739
8786
  "name": "part(root)",
@@ -8953,11 +9000,15 @@
8953
9000
  },
8954
9001
  {
8955
9002
  "name": "part(root)",
8956
- "description": "The outer flex wrapper around the bar and the details line"
9003
+ "description": "The outer flex wrapper around the progress track and the details line"
9004
+ },
9005
+ {
9006
+ "name": "part(track)",
9007
+ "description": "The progress track: the ground the bar grows along, carrying the progressbar role. Its padding is the frame around the bar"
8957
9008
  },
8958
9009
  {
8959
9010
  "name": "part(bar)",
8960
- "description": "The visible track of the progress bar, wrapping the native `<progress>` element"
9011
+ "description": "The bar showing the value: the fill, or the looping sweep while indeterminate"
8961
9012
  },
8962
9013
  {
8963
9014
  "name": "part(details)",
@@ -9113,7 +9164,11 @@
9113
9164
  },
9114
9165
  {
9115
9166
  "name": "part(root)",
9116
- "description": "The status pill wrapping the slotted text"
9167
+ "description": "The status pill wrapping the marker and the slotted text"
9168
+ },
9169
+ {
9170
+ "name": "part(marker)",
9171
+ "description": "The marker before the text: the icon's halo, or the dot"
9117
9172
  },
9118
9173
  {
9119
9174
  "name": "part(root)",
@@ -32,7 +32,9 @@ interface CAccordionItemProps {
32
32
  */
33
33
  value?: number | string;
34
34
  }
35
- declare var __VLS_1: {}, __VLS_3: {}, __VLS_5: {};
35
+ declare var __VLS_1: {
36
+ class: string;
37
+ }, __VLS_3: {}, __VLS_5: {};
36
38
  type __VLS_Slots = {} & {
37
39
  icon?: (props: typeof __VLS_1) => any;
38
40
  } & {
@@ -20,7 +20,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CBread
20
20
  href: string;
21
21
  target: string;
22
22
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
23
- icon?: (props: {}) => any;
23
+ icon?: (props: {
24
+ class: string;
25
+ }) => any;
24
26
  } & {
25
27
  default?: (props: {}) => any;
26
28
  }>;
@@ -145,10 +145,10 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
145
145
  size: CButtonSize;
146
146
  fit: boolean;
147
147
  variant: CButtonVariant;
148
+ appearance: CButtonAppearance;
148
149
  disabled: boolean;
149
150
  loading: boolean;
150
151
  active: boolean;
151
- appearance: CButtonAppearance;
152
152
  asTab: boolean;
153
153
  danger: boolean;
154
154
  ghost: boolean;
@@ -158,7 +158,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CButto
158
158
  noRipple: boolean;
159
159
  target: string;
160
160
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
161
- icon?: (props: {}) => any;
161
+ icon?: (props: {
162
+ class: string;
163
+ }) => any;
162
164
  } & {
163
165
  default?: (props: {
164
166
  class: string;
@@ -12,7 +12,7 @@ export interface CFileUploadContext {
12
12
  export interface CFileUploadEntry {
13
13
  /** The rejection text shown for a failed upload. */
14
14
  error?: string;
15
- /** The browser file, for a file the user added. Absent on a server file. */
15
+ /** The browser file, for a file the user added, typed as `type` says. Absent on a server file. */
16
16
  file?: File;
17
17
  /** Stable identity: generated for an added file, the consumer's own for a server file. */
18
18
  id: string;
@@ -24,14 +24,14 @@ export interface CFileUploadEntry {
24
24
  size: number;
25
25
  /** Where the entry stands. */
26
26
  status: CFileUploadStatus;
27
- /** The media type, as the browser reported it. */
27
+ /** The media type: the browser's, or the one its extension implies when the browser reports none. */
28
28
  type?: string;
29
29
  }
30
30
  /** Sends one file; resolves to the entry's `result` or rejects to mark it failed. */
31
31
  export type CFileUploadFunction = (file: File, context: CFileUploadContext) => Promise<unknown>;
32
32
  /** One rejected file, as the `reject` event reports it. */
33
33
  export interface CFileUploadRejection {
34
- /** The refused file. */
34
+ /** The refused file, as the browser handed it. */
35
35
  file: File;
36
36
  /** Why it was refused. */
37
37
  reason: CFileUploadRejectReason;
@@ -1,8 +1,9 @@
1
1
  /**
2
- * The pure half of `c-file-upload` (ADR-0071): `accept` matching, the decimal
3
- * byte formatter, the file-type icon category, the name split that keeps an
4
- * extension visible, the upload-error wording rule and the screening of one
5
- * add into accepted and rejected files. No DOM — `files.node.spec.ts`.
2
+ * The pure half of `c-file-upload` (ADR-0071): `accept` matching, the media
3
+ * type an added file carries, the decimal byte formatter, the file-type icon
4
+ * category, the name split that keeps an extension visible, the upload-error
5
+ * wording rule and the screening of one add into accepted and rejected files.
6
+ * No DOM — `files.node.spec.ts`.
6
7
  */
7
8
  /** The icon family a file belongs to (decision 19 of `_plan/c-file-upload.md`). */
8
9
  export type FileCategory = 'archive' | 'audio' | 'code' | 'document' | 'generic' | 'image' | 'spreadsheet' | 'video';
@@ -18,6 +19,13 @@ export interface FileFacts {
18
19
  export type RejectReason = 'count' | 'duplicate' | 'folder' | 'size' | 'type';
19
20
  /** The file's media type, else the one its extension suggests, else `''`; lowercase. */
20
21
  export declare const mediaType: (file: Pick<FileFacts, "name" | "type">) => string;
22
+ /**
23
+ * The file typed by `mediaType`: the same `File` when the browser reported a
24
+ * type or the extension implies none, else a new `File` over the same bytes —
25
+ * so a `.pptx` Chrome on Windows reports untyped is sent as one, not as
26
+ * `application/octet-stream`.
27
+ */
28
+ export declare const withMediaType: (file: File) => File;
21
29
  /**
22
30
  * Whether a file passes an `accept` list in the native syntax — `.pdf`,
23
31
  * `image/*`, `application/json`, comma separated, case-insensitive. An empty
@@ -11,7 +11,12 @@ interface CIconProps {
11
11
  * @freeform SVG path data
12
12
  */
13
13
  path: string;
14
- /** Icon size in pixels. */
14
+ /**
15
+ * Icon size in pixels. Unset, the icon takes the size of the icon slot it
16
+ * sits in.
17
+ *
18
+ * @default 24
19
+ */
15
20
  size?: number;
16
21
  }
17
22
  declare const __VLS_export: import("vue").DefineComponent<CIconProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CIconProps> & Readonly<{}>, {
@@ -96,9 +96,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CIconB
96
96
  outlined: boolean;
97
97
  size: CIconButtonSize;
98
98
  variant: CIconButtonVariant;
99
+ appearance: CIconButtonAppearance;
99
100
  disabled: boolean;
100
101
  loading: boolean;
101
- appearance: CIconButtonAppearance;
102
102
  danger: boolean;
103
103
  ghost: boolean;
104
104
  inverted: boolean;
@@ -39,7 +39,9 @@ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CMenuI
39
39
  danger: boolean;
40
40
  checked: boolean;
41
41
  }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
42
- icon?: (props: {}) => any;
42
+ icon?: (props: {
43
+ class: string;
44
+ }) => any;
43
45
  } & {
44
46
  default?: (props: {}) => any;
45
47
  } & {
@@ -1,11 +1,11 @@
1
1
  interface CProgressBarProps {
2
2
  /**
3
3
  * Hides the details line (the percentage and `label`); `label` still
4
- * names the bar.
4
+ * names the progress bar.
5
5
  */
6
6
  hideDetails?: boolean;
7
7
  /**
8
- * Replaces the fill with a looping sweep for work of unknown duration,
8
+ * Turns the bar into a looping sweep for work of unknown duration,
9
9
  * hiding the details line and exposing no value.
10
10
  */
11
11
  indeterminate?: boolean;
@@ -17,11 +17,11 @@ interface CProgressBarProps {
17
17
  */
18
18
  label?: string;
19
19
  /**
20
- * Places the details line beside the bar instead of below it.
20
+ * Places the details line beside the progress track instead of below it.
21
21
  */
22
22
  singleLine?: boolean;
23
23
  /**
24
- * Completion percentage, 0 to 100. The fill clamps a value outside that
24
+ * Completion percentage, 0 to 100. The bar clamps a value outside that
25
25
  * range; the details line shows it as given, a negative one in the error
26
26
  * colour.
27
27
  */
@@ -1,9 +1,43 @@
1
+ /**
2
+ * How the pill reads: `filled` paints the status tint, `outlined` keeps the
3
+ * ground and colours only the marker.
4
+ */
5
+ export type CStatusAppearance = 'filled' | 'outlined';
6
+ /**
7
+ * The symbol before the text: the status icon on a tinted halo, a dot in the
8
+ * status colour, or none.
9
+ */
10
+ export type CStatusMarker = 'dot' | 'icon' | 'none';
11
+ /** Size of the pill: 20px `small`, 24px `default` or 32px `large`. */
12
+ export type CStatusSize = 'default' | 'large' | 'small';
1
13
  /**
2
14
  * Status type of the pill. Each value paints the matching semantic status
3
15
  * colours; omitting the attribute renders the neutral grey pill.
4
16
  */
5
17
  export type CStatusType = 'error' | 'info' | 'success' | 'warning';
6
18
  interface CStatusProps {
19
+ /**
20
+ * `filled` (unless set, or changed app-wide) paints the status tint;
21
+ * `outlined` keeps the ground behind the pill and colours only the marker.
22
+ *
23
+ * @defaultable 'filled'
24
+ */
25
+ appearance?: CStatusAppearance;
26
+ /**
27
+ * The symbol before the text: `icon` (the status icon on a tinted halo),
28
+ * `dot`, or `none` (unless set, or changed app-wide). A slotted icon
29
+ * replaces it.
30
+ *
31
+ * @defaultable 'none'
32
+ */
33
+ marker?: CStatusMarker;
34
+ /**
35
+ * Size of the pill: `small`, `default` (unless set, or changed app-wide)
36
+ * or `large`.
37
+ *
38
+ * @defaultable 'default'
39
+ */
40
+ size?: CStatusSize;
7
41
  /**
8
42
  * The status family whose tint and ink paint the pill; without it the
9
43
  * pill is neutral grey.
@@ -12,7 +46,16 @@ interface CStatusProps {
12
46
  }
13
47
  declare const _default: typeof __VLS_export;
14
48
  export default _default;
15
- declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CStatusProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CStatusProps> & Readonly<{}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
49
+ declare const __VLS_export: __VLS_WithSlots<import("vue").DefineComponent<CStatusProps, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").PublicProps, Readonly<CStatusProps> & Readonly<{}>, {
50
+ marker: CStatusMarker;
51
+ type: CStatusType;
52
+ size: CStatusSize;
53
+ appearance: CStatusAppearance;
54
+ }, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>, {
55
+ icon?: (props: {
56
+ class: string;
57
+ }) => any;
58
+ } & {
16
59
  default?: (props: {}) => any;
17
60
  }>;
18
61
  type __VLS_WithSlots<T, S> = T & {
@@ -19,7 +19,7 @@ export type { CNumberFieldTexts } from './components/c-number-field/CNumberField
19
19
  export type { CPaginationOptions, CPaginationSize, CPaginationTexts, } from './components/c-pagination/CPagination.vue';
20
20
  export type { CPopoverPosition } from './components/c-popover/CPopover.vue';
21
21
  export type { CSelectTexts, CSelectValue, } from './components/c-select/CSelect.vue';
22
- export type { CStatusType } from './components/c-status/CStatus.vue';
22
+ export type { CStatusAppearance, CStatusMarker, CStatusSize, CStatusType, } from './components/c-status/CStatus.vue';
23
23
  export type { CTabButtonsSize } from './components/c-tab-buttons/CTabButtons.vue';
24
24
  export type { CTabsJustify } from './components/c-tabs/CTabs.vue';
25
25
  export type { CTagSize } from './components/c-tag/CTag.vue';
@@ -0,0 +1,4 @@
1
+ /** A status type, as c-alert, c-toast and c-status spell it. */
2
+ type StatusType = 'error' | 'info' | 'success' | 'warning';
3
+ export declare const STATUS_ICONS: Readonly<Record<StatusType, string>>;
4
+ export {};