From 7208c8bb4063be15aea5c06728caccd7f1e8768d Mon Sep 17 00:00:00 2001 From: Mateusz Rybczonek Date: Tue, 16 Jan 2024 12:06:49 +0100 Subject: [PATCH 1/5] feat: add BaseCombobox component and use it for Jurisdiction selection --- package.json | 1 + src/components/BaseCombobox.vue | 278 ++++++++++++++++++ src/components/CategoryChip.vue | 9 +- .../HAppSelectionSection.vue | 149 +++++++++- src/constants/countries.ts | 238 +++++++++++++++ yarn.lock | 19 ++ 6 files changed, 688 insertions(+), 6 deletions(-) create mode 100644 src/components/BaseCombobox.vue create mode 100644 src/constants/countries.ts diff --git a/package.json b/package.json index d6828656..58b324b9 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "start-mock-hpos-api-with-auth": "node mock-hpos-api/runMockHposApi.js --email test@test.com --password asasas" }, "dependencies": { + "@headlessui/vue": "^1.7.17", "@heroicons/vue": "^2.0.17", "@holo-host/hp-admin-keypair": "^0.3.0", "@vueuse/components": "^10.1.2", diff --git a/src/components/BaseCombobox.vue b/src/components/BaseCombobox.vue new file mode 100644 index 00000000..3a174e2f --- /dev/null +++ b/src/components/BaseCombobox.vue @@ -0,0 +1,278 @@ + + + + + diff --git a/src/components/CategoryChip.vue b/src/components/CategoryChip.vue index 8712c74b..e9ffa056 100644 --- a/src/components/CategoryChip.vue +++ b/src/components/CategoryChip.vue @@ -1,8 +1,9 @@ @@ -11,7 +12,11 @@ const props = defineProps({ label: { type: String, required: true - } + }, + withDot: { + type: Boolean, + default: true + } }) diff --git a/src/components/settings/hostingPreferences/HAppSelectionSection.vue b/src/components/settings/hostingPreferences/HAppSelectionSection.vue index 43bc50b4..a66afb57 100644 --- a/src/components/settings/hostingPreferences/HAppSelectionSection.vue +++ b/src/components/settings/hostingPreferences/HAppSelectionSection.vue @@ -1,21 +1,126 @@