From ad35c5718bd1dc42185b5426732ca2081245744e Mon Sep 17 00:00:00 2001 From: Joshua Graber <68428039+joshuagraber@users.noreply.github.com> Date: Thu, 10 Oct 2024 21:33:30 -0400 Subject: [PATCH] feat(components): create SelectInput (#110) --- .husky/post-commit | 6 + .husky/pre-push | 2 +- docs/components.md | 1 + scripts/update-docs.sh | 4 +- .../FormV2/__snapshots__/formv2.spec.ts.snap | 24 +- .../InputCheckbox/PdapInputCheckbox.vue | 4 +- .../InputPassword/PdapInputPassword.vue | 9 +- .../InputSelect/PdapInputSelect.vue | 281 ++++++++++++++++++ src/components/InputSelect/README.md | 84 ++++++ src/components/InputSelect/index.ts | 1 + .../InputSelect/input-select.spec.ts | 275 +++++++++++++++++ src/components/InputSelect/types.ts | 12 + src/components/InputText/PdapInputText.vue | 9 +- src/demo/pages/FormV2Demo.vue | 61 +++- src/styles/components.css | 3 +- 15 files changed, 749 insertions(+), 27 deletions(-) create mode 100755 .husky/post-commit create mode 100644 src/components/InputSelect/PdapInputSelect.vue create mode 100644 src/components/InputSelect/README.md create mode 100644 src/components/InputSelect/index.ts create mode 100644 src/components/InputSelect/input-select.spec.ts create mode 100644 src/components/InputSelect/types.ts diff --git a/.husky/post-commit b/.husky/post-commit new file mode 100755 index 0000000..6bff3d4 --- /dev/null +++ b/.husky/post-commit @@ -0,0 +1,6 @@ +#!/usr/bin/env sh +[ -n "$CI" ] && exit 0 + +. "$(dirname -- "$0")/_/husky.sh" + +npm run docs \ No newline at end of file diff --git a/.husky/pre-push b/.husky/pre-push index 858630c..115cd65 100755 --- a/.husky/pre-push +++ b/.husky/pre-push @@ -1,4 +1,4 @@ #!/usr/bin/env sh . "$(dirname -- "$0")/_/husky.sh" -npm run docs && npm run test:ci +npm run test:ci diff --git a/docs/components.md b/docs/components.md index d573de4..3c9303f 100644 --- a/docs/components.md +++ b/docs/components.md @@ -9,6 +9,7 @@ - [Form](../src/components/Form//README.md) - [Header](../src/components/Header//README.md) - [Input](../src/components/Input//README.md) +- [InputSelect](../src/components/InputSelect//README.md) - [Nav](../src/components/Nav//README.md) - [QuickSearchForm](../src/components/QuickSearchForm//README.md) - [Spinner](../src/components/Spinner//README.md) diff --git a/scripts/update-docs.sh b/scripts/update-docs.sh index c17de7f..e00374f 100644 --- a/scripts/update-docs.sh +++ b/scripts/update-docs.sh @@ -20,11 +20,11 @@ done # create a commit, only if there are changes if git diff --quiet docs/$output_file; then - echo -e "No new component README files detected.\nProceeding with push" + echo -e "No new component README files detected.\nNo new commit will be created." exit 0 else commit_msg="chore(docs): auto-update to component docs" echo "New README files detected, committing updated docs/$output_file file..." - git add docs/$output_file && git commit -m "$commit_msg" --no-verify && echo "Commit finished, proceeding with push" + git add docs/$output_file && git commit -m "$commit_msg" --no-verify && echo "Updated documentation added to the TOC in \`docs/components.md\` and committed." fi diff --git a/src/components/FormV2/__snapshots__/formv2.spec.ts.snap b/src/components/FormV2/__snapshots__/formv2.spec.ts.snap index b04c310..096aa7d 100644 --- a/src/components/FormV2/__snapshots__/formv2.spec.ts.snap +++ b/src/components/FormV2/__snapshots__/formv2.spec.ts.snap @@ -4,16 +4,17 @@ exports[`PdapFormV2 > calls submit event with form values on valid submission 1`