diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 00000000000..15edb937f1d --- /dev/null +++ b/.editorconfig @@ -0,0 +1,19 @@ +root = true + +[*] + charset = utf-8 + insert_final_newline = true + end_of_line = lf + quote_type = double + indent_style = space + indent_size = 2 + max_line_length = 120 + curly_bracket_next_line = false + spaces_around_brackets = true + spaces_around_operators = true + indent_brace_style = K&R + +[*.tsx] + max_line_length = 100 + + diff --git a/.prettierrc.json b/.prettierrc.json deleted file mode 100644 index 2a5f9b07615..00000000000 --- a/.prettierrc.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "arrowParens": "always", - "bracketSameLine": false, - "bracketSpacing": true, - "printWidth": 120, - "semi": true, - "singleQuote": false, - "tabWidth": 2, - "trailingComma": "none", - "useTabs": false, - "overrides": [ - { - "files": "*.tsx", - "options": { - "printWidth": 100 - } - } - ] -} diff --git a/package-lock.json b/package-lock.json index 1ebcc47fd99..4aa0f9eba9f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -41319,7 +41319,7 @@ }, "packages/calcite-components": { "name": "@esri/calcite-components", - "version": "1.5.0-next.20", + "version": "1.5.0-next.22", "license": "SEE LICENSE.md", "dependencies": { "@floating-ui/dom": "1.4.4", @@ -41346,10 +41346,10 @@ }, "packages/calcite-components-react": { "name": "@esri/calcite-components-react", - "version": "1.5.0-next.20", + "version": "1.5.0-next.22", "license": "SEE LICENSE.md", "dependencies": { - "@esri/calcite-components": "^1.5.0-next.20" + "@esri/calcite-components": "^1.5.0-next.22" }, "peerDependencies": { "react": ">=16.7", @@ -43216,7 +43216,7 @@ "@esri/calcite-components-react": { "version": "file:packages/calcite-components-react", "requires": { - "@esri/calcite-components": "^1.5.0-next.20" + "@esri/calcite-components": "^1.5.0-next.22" } }, "@esri/calcite-design-tokens": { diff --git a/packages/calcite-components-react/CHANGELOG.md b/packages/calcite-components-react/CHANGELOG.md index a5903664c4c..a18daba6e1b 100644 --- a/packages/calcite-components-react/CHANGELOG.md +++ b/packages/calcite-components-react/CHANGELOG.md @@ -3,6 +3,14 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.0-next.22](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.5.0-next.21...@esri/calcite-components-react@1.5.0-next.22) (2023-07-14) + +**Note:** Version bump only for package @esri/calcite-components-react + +## [1.5.0-next.21](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.5.0-next.20...@esri/calcite-components-react@1.5.0-next.21) (2023-07-14) + +**Note:** Version bump only for package @esri/calcite-components-react + ## [1.5.0-next.20](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@1.5.0-next.19...@esri/calcite-components-react@1.5.0-next.20) (2023-07-12) **Note:** Version bump only for package @esri/calcite-components-react diff --git a/packages/calcite-components-react/package.json b/packages/calcite-components-react/package.json index f63fae3a18b..7cc39b25e36 100644 --- a/packages/calcite-components-react/package.json +++ b/packages/calcite-components-react/package.json @@ -1,7 +1,7 @@ { "name": "@esri/calcite-components-react", "sideEffects": false, - "version": "1.5.0-next.20", + "version": "1.5.0-next.22", "description": "A set of React components that wrap calcite components", "license": "SEE LICENSE.md", "scripts": { @@ -18,7 +18,7 @@ "dist/" ], "dependencies": { - "@esri/calcite-components": "^1.5.0-next.20" + "@esri/calcite-components": "^1.5.0-next.22" }, "peerDependencies": { "react": ">=16.7", diff --git a/packages/calcite-components/CHANGELOG.md b/packages/calcite-components/CHANGELOG.md index e6fe48ea5bc..cd0a720cfd4 100644 --- a/packages/calcite-components/CHANGELOG.md +++ b/packages/calcite-components/CHANGELOG.md @@ -3,6 +3,18 @@ All notable changes to this project will be documented in this file. See [Conventional Commits](https://conventionalcommits.org) for commit guidelines. +## [1.5.0-next.22](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.5.0-next.21...@esri/calcite-components@1.5.0-next.22) (2023-07-14) + +### Bug Fixes + +- **input-date-picker:** provides placeholder text context for AT users ([#7320](https://github.com/Esri/calcite-design-system/issues/7320)) ([31e0ba2](https://github.com/Esri/calcite-design-system/commit/31e0ba2c0e612e64130532203c5d73a7a0e37dc3)), closes [#5581](https://github.com/Esri/calcite-design-system/issues/5581) + +## [1.5.0-next.21](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.5.0-next.20...@esri/calcite-components@1.5.0-next.21) (2023-07-14) + +### Bug Fixes + +- **dropdown-item:** provides accessible label when href is not parsed ([#7316](https://github.com/Esri/calcite-design-system/issues/7316)) ([966b83d](https://github.com/Esri/calcite-design-system/commit/966b83d9514cdc284516909983b2c6ddf4e30286)), closes [#6921](https://github.com/Esri/calcite-design-system/issues/6921) + ## [1.5.0-next.20](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@1.5.0-next.19...@esri/calcite-components@1.5.0-next.20) (2023-07-12) ### Bug Fixes diff --git a/packages/calcite-components/package.json b/packages/calcite-components/package.json index c057efe921f..19f37def09c 100644 --- a/packages/calcite-components/package.json +++ b/packages/calcite-components/package.json @@ -1,6 +1,6 @@ { "name": "@esri/calcite-components", - "version": "1.5.0-next.20", + "version": "1.5.0-next.22", "description": "Web Components for Esri's Calcite Design System.", "main": "dist/index.cjs.js", "module": "dist/index.js", diff --git a/packages/calcite-components/src/components/dropdown-item/dropdown-item.tsx b/packages/calcite-components/src/components/dropdown-item/dropdown-item.tsx index bbe9ca200d7..d8135690468 100644 --- a/packages/calcite-components/src/components/dropdown-item/dropdown-item.tsx +++ b/packages/calcite-components/src/components/dropdown-item/dropdown-item.tsx @@ -128,10 +128,11 @@ export class DropdownItem implements LoadableComponent { render(): VNode { const scale = getElementProp(this.el, "scale", this.scale); + const { href, selectionMode, label, iconFlipRtl } = this; const iconStartEl = ( @@ -144,7 +145,7 @@ export class DropdownItem implements LoadableComponent { const iconEndEl = ( @@ -159,13 +160,13 @@ export class DropdownItem implements LoadableComponent { ? [contentNode, iconEndEl] : contentNode; - const contentEl = !this.href ? ( + const contentEl = !href ? ( slottedContent ) : ( ); - const itemRole = this.href + const itemRole = href ? null - : this.selectionMode === "single" + : selectionMode === "single" ? "menuitemradio" - : this.selectionMode === "multiple" + : selectionMode === "multiple" ? "menuitemcheckbox" : "menuitem"; - const itemAria = this.selectionMode !== "none" ? toAriaBoolean(this.selected) : null; + const itemAria = selectionMode !== "none" ? toAriaBoolean(this.selected) : null; return ( - +
- {this.selectionMode !== "none" ? ( + {selectionMode !== "none" ? ( ) : null} diff --git a/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages.json b/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages.json index dfa25e049e5..ab174e92d5b 100644 --- a/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages.json +++ b/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages.json @@ -1,3 +1,4 @@ { - "chooseDate": "Choose date" + "chooseDate": "Choose date", + "dateFormat": "Date Format:" } diff --git a/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages_en.json b/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages_en.json index dfa25e049e5..ab174e92d5b 100644 --- a/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages_en.json +++ b/packages/calcite-components/src/components/input-date-picker/assets/input-date-picker/t9n/messages_en.json @@ -1,3 +1,4 @@ { - "chooseDate": "Choose date" + "chooseDate": "Choose date", + "dateFormat": "Date Format:" } diff --git a/packages/calcite-components/src/components/input-date-picker/input-date-picker.scss b/packages/calcite-components/src/components/input-date-picker/input-date-picker.scss index 8fcb8292dcf..e36b4e6c476 100644 --- a/packages/calcite-components/src/components/input-date-picker/input-date-picker.scss +++ b/packages/calcite-components/src/components/input-date-picker/input-date-picker.scss @@ -153,3 +153,7 @@ } @include hidden-form-input(); + +.assistive-text { + @apply sr-only; +} diff --git a/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx b/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx index 042ad226303..f3f5a023608 100644 --- a/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx +++ b/packages/calcite-components/src/components/input-date-picker/input-date-picker.tsx @@ -528,6 +528,7 @@ export class InputDatePicker {this.renderToggleIcon(this.open && this.focusedInput === "start")} +