Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into benelan/8359-track-mil…
Browse files Browse the repository at this point in the history
…estone-estimates

* origin/dev: (29 commits)
  fix(input-time-zone): fix region mode labeling and value mapping (#10345)
  fix(dropdown): open dropdown on `ArrowDown` & `ArrowUp` keys (#10264)
  refactor(components): reduce post-migration TypeScript errors (#10356)
  refactor: do not use Host in functional components (#10352)
  refactor(tests): reduce TypeScript errors (#10344)
  feat(alert): add component tokens (#10218)
  fix(card): properly handle slotted elements (#10378)
  refactor(panel): remove duplicate tailwind class (#10379)
  feat(popover, action): add component tokens (#10253)
  chore(t9n): add translations (#10339)
  feat: add 3d building, 3d building parameter, divide, parcel, spaces, spaces parameter, square brackets x, n variable, zoning parameter (#10373)
  build: update browserslist db (#10370)
  ci: resolve husky pre-push and pre-commit errors (#10365)
  docs: update component READMEs (#10371)
  feat(text-area): add component tokens (#10343)
  fix(action): prefer `disabled` in favor of `aria-disabled` (#10367)
  docs(a11y): add reference to a11y guidance to issue template (#10372)
  chore(action): add new string for accessible indicator label (#10360)
  feat(chip): add component tokens (#10179)
  feat(avatar): add component tokens (#10280)
  ...
  • Loading branch information
benelan committed Sep 25, 2024
2 parents b9a18cb + cf36299 commit 22a09da
Show file tree
Hide file tree
Showing 168 changed files with 3,016 additions and 1,090 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/accessibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ body:
label: Check existing issues
description: If someone has already opened an issue for what you are experiencing, please add a 👍 reaction to the existing issue instead of creating a new one. For support, please check the [community forum](https://developers.arcgis.com/calcite-design-system/community/).
options:
- label: I have [checked for existing issues](https://github.com/Esri/calcite-design-system/issues) to avoid duplicates
- label: I have [checked for existing issues](https://github.com/Esri/calcite-design-system/issues) to avoid duplicates and reviewed the [Accessibility page](https://developers.arcgis.com/calcite-design-system/foundations/accessibility) for guidance.
validations:
required: true
- type: textarea
Expand Down
64 changes: 33 additions & 31 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,60 +1,62 @@
#!/usr/bin/env bash
#!/usr/bin/env sh

ensure_types_are_up_to_date() {
types_path="packages/calcite-components/src/components.d.ts"

if [ -n "$(git diff --name-only -- "$types_path")" ]; then
echo "Automatically staging changes to \"$types_path\""
git add "$types_path"
git add "$types_path" >/dev/null 2>&1 || true
fi
}

update_stylelint_config_if_sass_file_edited() {
staged_files="$(git diff --cached --name-only --diff-filter=ACM)"
staged_files="$(
git diff --cached --name-only --diff-filter=ACM -- packages/**/*.scss
)"

for file in $staged_files; do
if [[ "$file" == *.scss ]]; then
npm run util:update-stylelint-custom-sass-functions
break
fi
done

if [ -n "$(git diff --name-only -- "packages/calcite-components/.stylelintrc.json")" ]; then
git add "packages/calcite-components/.stylelintrc.json"
if [ -n "$staged_files" ]; then
npm run util:update-stylelint-custom-sass-functions
git add "packages/calcite-components/.stylelintrc.cjs" >/dev/null 2>&1 || true
fi

unset staged_files
}

check_ui_icon_name_consistency() {
svg_icon_dir="packages/calcite-ui-icons/icons"

# this pattern checks for `<iconName>-<size>.svg` or `<iconName>-<size>-f.svg` for filled icons
# where `<iconName>` is kebab-case, `<size>` is 16, 24, or 32
valid_pattern="^[a-z0-9-]+-(16|24|32)(-f)?\\.svg$"

# this pattern will check for invalid use of "-f-" anywhere except right before the size
invalid_pattern="-[a-z0-9]+-f-"

staged_files="$(git diff --cached --name-only --diff-filter=ACM)"
staged_files="$(
git diff --cached --name-only --diff-filter=ACM -- packages/calcite-ui-icons/icons/*.svg
)"

for file in $staged_files; do
if [[ "$file" == "$svg_icon_dir"* ]]; then
if [[ "$file" == *.svg ]]; then
filename="$(basename "$file")"
if [ -n "$staged_files" ]; then
for file in $staged_files; do
filename="$(basename "$file")"

# first, ensure the filename follows the valid pattern
if ! [[ "$filename" =~ $valid_pattern ]]; then
echo "Error: File '$file' does not follow the naming convention (<iconName>-<size>.svg or <iconName>-<size>-f.svg)."
exit 1
fi
# first, ensure the filename follows the valid pattern
if ! echo "$filename" | grep -qE "$valid_pattern"; then
printf "%s\n%s" \
"error: file '$file' does not follow the naming convention:" \
"(<iconname>-<size>.svg | <iconname>-<size>-f.svg)"
exit 1
fi

# then, ensure there's no invalid use of "-f-" anywhere except right before the size
if [[ "$filename" =~ $invalid_pattern ]]; then
echo "Error: File '$file' has an invalid '-f-' and does not follow the naming convention (<iconName>-<size>.svg or <iconName>-<size>-f.svg)."
exit 1
fi
# then, ensure there's no invalid use of "-f-" anywhere except right before the size
if echo "$filename" | grep -qE "$invalid_pattern"; then
printf '%s\n%s' \
"error: file '$file' has an invalid '-f-' and does not follow the naming convention:" \
"(<iconname>-<size>.svg | <iconname>-<size>-f.svg)"
exit 1
fi
fi
done
done
fi

unset staged_files
}

lint-staged
Expand Down
32 changes: 19 additions & 13 deletions .husky/pre-push
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
#!/usr/bin/env bash
# from https://riptutorial.com/git/example/16164/pre-push

protected_branch="main"
current_branch=$(git rev-parse --abbrev-ref HEAD)

if [ "$protected_branch" = "$current_branch" ] && bash -c ': >/dev/tty'; then
read -p "You're about to push main, is that what you intended? [y|n] " -n 1 -r </dev/tty
echo
if echo "$REPLY" | grep -E "^[Yy]$" >/dev/null; then
exit 0
fi
exit 1
#!/usr/bin/env sh

if ! bash -c ': >/dev/tty'; then
exit 0
fi

current_branch="$(git rev-parse --abbrev-ref HEAD)"

case "$current_branch" in
dev | main | rc)
printf "You're about to push a protected branch, is that what you intended? [y|n] "
read -r response

case "$response" in
y | Y) exit 0 ;;
*) exit 1 ;;
esac
;;
*) exit 0 ;;
esac
43 changes: 22 additions & 21 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.13.0-next.15](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.13.0-next.14...@esri/calcite-components-angular@2.13.0-next.15) (2024-09-18)

**Note:** Version bump only for package @esri/calcite-components-angular

## [2.13.0-next.14](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-angular@2.13.0-next.13...@esri/calcite-components-angular@2.13.0-next.14) (2024-09-13)

**Note:** Version bump only for package @esri/calcite-components-angular
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components-angular",
"version": "2.13.0-next.14",
"version": "2.13.0-next.15",
"description": "A set of Angular components that wrap Esri's Calcite Components.",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"bugs": {
Expand All @@ -17,7 +17,7 @@
},
"sideEffects": false,
"dependencies": {
"@esri/calcite-components": "2.13.0-next.14",
"@esri/calcite-components": "2.13.0-next.15",
"tslib": "2.6.3"
},
"peerDependencies": {
Expand Down
4 changes: 4 additions & 0 deletions packages/calcite-components-react/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.13.0-next.15](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.13.0-next.14...@esri/calcite-components-react@2.13.0-next.15) (2024-09-18)

**Note:** Version bump only for package @esri/calcite-components-react

## [2.13.0-next.14](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components-react@2.13.0-next.13...@esri/calcite-components-react@2.13.0-next.14) (2024-09-13)

**Note:** Version bump only for package @esri/calcite-components-react
Expand Down
4 changes: 2 additions & 2 deletions packages/calcite-components-react/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components-react",
"version": "2.13.0-next.14",
"version": "2.13.0-next.15",
"description": "A set of React components that wrap calcite components",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"repository": {
Expand Down Expand Up @@ -28,7 +28,7 @@
"tsc": "tsc"
},
"dependencies": {
"@esri/calcite-components": "2.13.0-next.14"
"@esri/calcite-components": "2.13.0-next.15"
},
"peerDependencies": {
"react": ">=16.7",
Expand Down
5 changes: 4 additions & 1 deletion packages/calcite-components/.stylelintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
// ⚠️ AUTO-GENERATED CODE - DO NOT EDIT
const customFunctions = [
"get-trailing-text-input-padding",
"scale-duration"
"medium-modular-scale",
"modular-scale",
"scale-duration",
"small-modular-scale"
];
// ⚠️ END OF AUTO-GENERATED CODE

Expand Down
10 changes: 10 additions & 0 deletions packages/calcite-components/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,16 @@
All notable changes to this project will be documented in this file.
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.

## [2.13.0-next.15](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.13.0-next.14...@esri/calcite-components@2.13.0-next.15) (2024-09-18)

### Features

- **carousel:** Improve support for high item counts ([#10315](https://github.com/Esri/calcite-design-system/issues/10315)) ([6ad2612](https://github.com/Esri/calcite-design-system/commit/6ad261276c2a1ece4ce8f23cc29234becd4869c1)), closes [#9121](https://github.com/Esri/calcite-design-system/issues/9121)

### Bug Fixes

- **panel:** initially closed panel should be hidden ([#10308](https://github.com/Esri/calcite-design-system/issues/10308)) ([46de96b](https://github.com/Esri/calcite-design-system/commit/46de96b24926415ea71cf77d23699269be83d258)), closes [#10320](https://github.com/Esri/calcite-design-system/issues/10320)

## [2.13.0-next.14](https://github.com/Esri/calcite-design-system/compare/@esri/calcite-components@2.13.0-next.13...@esri/calcite-components@2.13.0-next.14) (2024-09-13)

### Features
Expand Down
10 changes: 5 additions & 5 deletions packages/calcite-components/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@esri/calcite-components",
"version": "2.13.0-next.14",
"version": "2.13.0-next.15",
"homepage": "https://developers.arcgis.com/calcite-design-system/",
"description": "Web Components for Esri's Calcite Design System.",
"main": "dist/index.cjs.js",
Expand Down Expand Up @@ -60,8 +60,8 @@
"directory": "packages/calcite-components"
},
"dependencies": {
"@esri/calcite-ui-icons": "3.32.0-next.4",
"@floating-ui/dom": "1.6.10",
"@esri/calcite-ui-icons": "3.32.0-next.5",
"@floating-ui/dom": "1.6.11",
"@stencil/core": "4.20.0",
"@types/color": "3.0.6",
"@types/sortablejs": "1.15.8",
Expand All @@ -72,12 +72,12 @@
"interactjs": "1.10.27",
"lodash-es": "4.17.21",
"sortablejs": "1.15.3",
"timezone-groups": "0.9.1",
"timezone-groups": "0.10.2",
"type-fest": "4.18.2"
},
"devDependencies": {
"@esri/calcite-design-tokens": "2.2.1-next.4",
"@esri/eslint-plugin-calcite-components": "^1.2.1-next.3",
"@esri/eslint-plugin-calcite-components": "1.2.1-next.4",
"@stencil-community/eslint-plugin": "0.8.0",
"@stencil-community/postcss": "2.2.0",
"@stencil/angular-output-target": "0.8.4",
Expand Down
Loading

0 comments on commit 22a09da

Please sign in to comment.