From 2dae4b22a2dfcf778d1fff6614df6a8855b74c7c Mon Sep 17 00:00:00 2001 From: Sivin Varghese <64252451+iamsivin@users.noreply.github.com> Date: Fri, 22 Nov 2024 03:27:43 +0530 Subject: [PATCH] feat: Add Label Input components (#10480) --- .../components-next/Label/AddLabel.vue | 49 +++++++++++++++ .../components-next/Label/LabelItem.vue | 22 +++++++ .../Label/story/AddLabel.story.vue | 27 ++++++++ .../Label/story/Label.story.vue | 21 +++++++ .../components-next/Label/story/fixtures.js | 62 +++++++++++++++++++ .../dashboard/i18n/locale/en/components.json | 3 + 6 files changed, 184 insertions(+) create mode 100644 app/javascript/dashboard/components-next/Label/AddLabel.vue create mode 100644 app/javascript/dashboard/components-next/Label/LabelItem.vue create mode 100644 app/javascript/dashboard/components-next/Label/story/AddLabel.story.vue create mode 100644 app/javascript/dashboard/components-next/Label/story/Label.story.vue create mode 100644 app/javascript/dashboard/components-next/Label/story/fixtures.js diff --git a/app/javascript/dashboard/components-next/Label/AddLabel.vue b/app/javascript/dashboard/components-next/Label/AddLabel.vue new file mode 100644 index 000000000..c9571e771 --- /dev/null +++ b/app/javascript/dashboard/components-next/Label/AddLabel.vue @@ -0,0 +1,49 @@ + + + diff --git a/app/javascript/dashboard/components-next/Label/LabelItem.vue b/app/javascript/dashboard/components-next/Label/LabelItem.vue new file mode 100644 index 000000000..b96b9b368 --- /dev/null +++ b/app/javascript/dashboard/components-next/Label/LabelItem.vue @@ -0,0 +1,22 @@ + + + diff --git a/app/javascript/dashboard/components-next/Label/story/AddLabel.story.vue b/app/javascript/dashboard/components-next/Label/story/AddLabel.story.vue new file mode 100644 index 000000000..ea6466feb --- /dev/null +++ b/app/javascript/dashboard/components-next/Label/story/AddLabel.story.vue @@ -0,0 +1,27 @@ + + + diff --git a/app/javascript/dashboard/components-next/Label/story/Label.story.vue b/app/javascript/dashboard/components-next/Label/story/Label.story.vue new file mode 100644 index 000000000..5319d56ae --- /dev/null +++ b/app/javascript/dashboard/components-next/Label/story/Label.story.vue @@ -0,0 +1,21 @@ + + + diff --git a/app/javascript/dashboard/components-next/Label/story/fixtures.js b/app/javascript/dashboard/components-next/Label/story/fixtures.js new file mode 100644 index 000000000..980ba8c0d --- /dev/null +++ b/app/javascript/dashboard/components-next/Label/story/fixtures.js @@ -0,0 +1,62 @@ +export const label = { + id: 1, + title: 'delivery', + color: '#A2FDD5', +}; + +export const labelMenuItems = [ + { + label: 'delivery', + value: 3, + thumbnail: { + color: '#A2FDD5', + }, + isSelected: true, + action: 'addLabel', + }, + { + label: 'lead', + value: 6, + thumbnail: { + color: '#F161C8', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'ops-handover', + value: 4, + thumbnail: { + color: '#A53326', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'billing', + value: 1, + thumbnail: { + color: '#28AD21', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'premium-customer', + value: 5, + thumbnail: { + color: '#6FD4EF', + }, + isSelected: false, + action: 'addLabel', + }, + { + label: 'software', + value: 2, + thumbnail: { + color: '#8F6EF2', + }, + isSelected: false, + action: 'addLabel', + }, +]; diff --git a/app/javascript/dashboard/i18n/locale/en/components.json b/app/javascript/dashboard/i18n/locale/en/components.json index 7a0533cef..f5207fde9 100644 --- a/app/javascript/dashboard/i18n/locale/en/components.json +++ b/app/javascript/dashboard/i18n/locale/en/components.json @@ -30,5 +30,8 @@ }, "BREADCRUMB": { "ARIA_LABEL": "Breadcrumb" + }, + "LABEL": { + "TAG_BUTTON": "tag" } }