From 78072a1c6660c3eaa22c077c3f4c08f545281928 Mon Sep 17 00:00:00 2001 From: metonym Date: Mon, 21 Feb 2022 13:40:57 -0800 Subject: [PATCH] Align v10.53 (#1109) * chore(deps): upgrade carbon-components to v10.53.0 * feat(text-area): add maxCount prop * docs(text-area): add maximum character count * feat(file-uploader): add disabled prop * docs(file-uploader): add disabled state example --- COMPONENT_INDEX.md | 2 ++ docs/package.json | 2 +- docs/src/COMPONENT_API.json | 21 +++++++++++++ docs/src/pages/components/FileUploader.svx | 4 +++ docs/src/pages/components/TextArea.svx | 8 +++++ docs/yarn.lock | 10 +++--- package.json | 2 +- src/FileUploader/FileUploader.svelte | 18 +++++++++-- src/TextArea/TextArea.svelte | 34 +++++++++++++++------ types/FileUploader/FileUploader.svelte.d.ts | 6 ++++ types/TextArea/TextArea.svelte.d.ts | 6 ++++ yarn.lock | 8 ++--- 12 files changed, 98 insertions(+), 23 deletions(-) diff --git a/COMPONENT_INDEX.md b/COMPONENT_INDEX.md index a57ead6f..c06f3057 100644 --- a/COMPONENT_INDEX.md +++ b/COMPONENT_INDEX.md @@ -1265,6 +1265,7 @@ None. | :--------------- | :----------------- | :------- | :----------------------------------------------------------------------------------------- | --------------------------------------- | ----------------------------------------------------------- | | files | let | Yes | File[] | [] | Obtain a reference to the uploaded files | | status | let | No | "uploading" | "edit" | "complete" | "uploading" | Specify the file uploader status | +| disabled | let | No | boolean | false | Set to `true` to disable the file uploader | | accept | let | No | string[] | [] | Specify the accepted file types | | multiple | let | No | boolean | false | Set to `true` to allow multiple files | | clearFiles | const | No | () => void | () => { files = []; } | Programmatically clear the uploaded files | @@ -4113,6 +4114,7 @@ None. | placeholder | let | No | string | "" | Specify the placeholder text | | cols | let | No | number | 50 | Specify the number of cols | | rows | let | No | number | 4 | Specify the number of rows | +| maxCount | let | No | number | undefined | Specify the max character count | | light | let | No | boolean | false | Set to `true` to enable the light variant | | disabled | let | No | boolean | false | Set to `true` to disable the input | | readonly | let | No | boolean | false | Set to `true` to use the read-only variant | diff --git a/docs/package.json b/docs/package.json index 124e8e03..6c38630a 100644 --- a/docs/package.json +++ b/docs/package.json @@ -12,7 +12,7 @@ "@sveltech/routify": "^1.9.9", "@sveltejs/vite-plugin-svelte": "^1.0.0-next.33", "autoprefixer": "^10.2.3", - "carbon-components": "10.52.0", + "carbon-components": "10.53.0", "carbon-components-10.47": "npm:carbon-components@10.47", "carbon-components-svelte": "../", "carbon-icons-svelte": "^10.44.3", diff --git a/docs/src/COMPONENT_API.json b/docs/src/COMPONENT_API.json index 1d907713..02745291 100644 --- a/docs/src/COMPONENT_API.json +++ b/docs/src/COMPONENT_API.json @@ -3467,6 +3467,17 @@ "constant": false, "reactive": false }, + { + "name": "disabled", + "kind": "let", + "description": "Set to `true` to disable the file uploader", + "type": "boolean", + "value": "false", + "isFunction": false, + "isFunctionDeclaration": false, + "constant": false, + "reactive": false + }, { "name": "accept", "kind": "let", @@ -11421,6 +11432,16 @@ "constant": false, "reactive": false }, + { + "name": "maxCount", + "kind": "let", + "description": "Specify the max character count", + "type": "number", + "isFunction": false, + "isFunctionDeclaration": false, + "constant": false, + "reactive": false + }, { "name": "light", "kind": "let", diff --git a/docs/src/pages/components/FileUploader.svx b/docs/src/pages/components/FileUploader.svx index ad6b97a5..cb7390a3 100644 --- a/docs/src/pages/components/FileUploader.svx +++ b/docs/src/pages/components/FileUploader.svx @@ -15,6 +15,10 @@ components: ["FileUploaderButton", "FileUploader", "FileUploaderDropContainer", +### File uploader (disabled state) + + + ### Item (uploading) diff --git a/docs/src/pages/components/TextArea.svx b/docs/src/pages/components/TextArea.svx index a2babc64..097afb33 100644 --- a/docs/src/pages/components/TextArea.svx +++ b/docs/src/pages/components/TextArea.svx @@ -11,6 +11,14 @@ components: ["TextArea", "TextAreaSkeleton"]