From c23cd094f9f11515306304529dc3c4b84695a6b5 Mon Sep 17 00:00:00 2001 From: Shivam Mishra Date: Tue, 26 Nov 2024 01:22:28 +0530 Subject: [PATCH] feat(v4): Add filter input components (#10493) This PR adds three components along with stories 1. MultiSelect - This is used for filter values, allowing multiple values and folding of values where there are too many items 2. SingleSelect - This is used for filter values, allows selecting and toggling a single item 3. FilterSelect - This is used for operators and others, it allows icons and labels as well as toggling them using props. The v-model for this binds just the final value unlike the previous two components with bind the entire object. --------- Co-authored-by: Pranav --- .../dropdown-menu/base/DropdownContainer.vue | 5 +- .../filter/inputs/FilterSelect.story.vue | 66 ++++++++ .../filter/inputs/FilterSelect.vue | 76 +++++++++ .../filter/inputs/MultiSelect.story.vue | 26 ++++ .../filter/inputs/MultiSelect.vue | 146 ++++++++++++++++++ .../filter/inputs/SingleSelect.story.vue | 33 ++++ .../filter/inputs/SingleSelect.vue | 124 +++++++++++++++ .../dashboard/i18n/locale/en/components.json | 4 +- package.json | 1 + pnpm-lock.yaml | 10 ++ tailwind.config.js | 2 +- 11 files changed, 489 insertions(+), 4 deletions(-) create mode 100644 app/javascript/dashboard/components-next/filter/inputs/FilterSelect.story.vue create mode 100644 app/javascript/dashboard/components-next/filter/inputs/FilterSelect.vue create mode 100644 app/javascript/dashboard/components-next/filter/inputs/MultiSelect.story.vue create mode 100644 app/javascript/dashboard/components-next/filter/inputs/MultiSelect.vue create mode 100644 app/javascript/dashboard/components-next/filter/inputs/SingleSelect.story.vue create mode 100644 app/javascript/dashboard/components-next/filter/inputs/SingleSelect.vue diff --git a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue index ee81e4b98..a3b53f955 100644 --- a/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue +++ b/app/javascript/dashboard/components-next/dropdown-menu/base/DropdownContainer.vue @@ -1,5 +1,6 @@