diff --git a/src/components/dialogs/InviteDialog/EditAndSendInviteDialog.vue b/src/components/dialogs/InviteDialog/EditAndSendInviteDialog.vue index d0b59b56..601603f5 100644 --- a/src/components/dialogs/InviteDialog/EditAndSendInviteDialog.vue +++ b/src/components/dialogs/InviteDialog/EditAndSendInviteDialog.vue @@ -10,18 +10,16 @@ {{ t('dialog.edit_send_invite_message.description') }} - + :maxlength="64" + multiline + rows="2" + class="mt-2.5" + placeholder="" /> - + {{ t('dialog.edit_send_invite_message.cancel') }} @@ -33,6 +31,7 @@ + + + + + + diff --git a/src/components/ui/input-group/InputGroupAddon.vue b/src/components/ui/input-group/InputGroupAddon.vue new file mode 100644 index 00000000..b41e38ee --- /dev/null +++ b/src/components/ui/input-group/InputGroupAddon.vue @@ -0,0 +1,32 @@ + + + + + + + diff --git a/src/components/ui/input-group/InputGroupButton.vue b/src/components/ui/input-group/InputGroupButton.vue new file mode 100644 index 00000000..e07b1f1d --- /dev/null +++ b/src/components/ui/input-group/InputGroupButton.vue @@ -0,0 +1,21 @@ + + + + + + + diff --git a/src/components/ui/input-group/InputGroupCharCount.vue b/src/components/ui/input-group/InputGroupCharCount.vue new file mode 100644 index 00000000..79d4db13 --- /dev/null +++ b/src/components/ui/input-group/InputGroupCharCount.vue @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + Clear + + + + + {{ valueLength }} + / {{ props.maxlength }} + + + + diff --git a/src/components/ui/input-group/InputGroupInput.vue b/src/components/ui/input-group/InputGroupInput.vue new file mode 100644 index 00000000..5b846bb2 --- /dev/null +++ b/src/components/ui/input-group/InputGroupInput.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/components/ui/input-group/InputGroupText.vue b/src/components/ui/input-group/InputGroupText.vue new file mode 100644 index 00000000..4d94f7e2 --- /dev/null +++ b/src/components/ui/input-group/InputGroupText.vue @@ -0,0 +1,19 @@ + + + + + + + diff --git a/src/components/ui/input-group/InputGroupTextarea.vue b/src/components/ui/input-group/InputGroupTextarea.vue new file mode 100644 index 00000000..a2083668 --- /dev/null +++ b/src/components/ui/input-group/InputGroupTextarea.vue @@ -0,0 +1,19 @@ + + + + + diff --git a/src/components/ui/input-group/index.js b/src/components/ui/input-group/index.js new file mode 100644 index 00000000..c956624e --- /dev/null +++ b/src/components/ui/input-group/index.js @@ -0,0 +1,48 @@ +import { cva } from 'class-variance-authority'; + +export { default as InputGroup } from './InputGroup.vue'; +export { default as InputGroupAddon } from './InputGroupAddon.vue'; +export { default as InputGroupButton } from './InputGroupButton.vue'; +export { default as InputGroupInput } from './InputGroupInput.vue'; +export { default as InputGroupText } from './InputGroupText.vue'; +export { default as InputGroupTextarea } from './InputGroupTextarea.vue'; +export { default as InputGroupCharCount } from './InputGroupCharCount.vue'; + +export const inputGroupAddonVariants = cva( + "text-muted-foreground flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium select-none [&>svg:not([class*='size-'])]:size-4 [&>kbd]:rounded-[calc(var(--radius)-5px)] group-data-[disabled=true]/input-group:opacity-50", + { + variants: { + align: { + 'inline-start': + 'order-first pl-3 has-[>button]:ml-[-0.45rem] has-[>kbd]:ml-[-0.35rem]', + 'inline-end': + 'order-last pr-3 has-[>button]:mr-[-0.45rem] has-[>kbd]:mr-[-0.35rem]', + 'block-start': + 'order-first w-full justify-start px-3 pt-3 [.border-b]:pb-3 group-has-[>input]/input-group:pt-2.5', + 'block-end': + 'order-last w-full justify-start px-3 pb-3 [.border-t]:pt-3 group-has-[>input]/input-group:pb-2.5' + } + }, + defaultVariants: { + align: 'inline-start' + } + } +); + +export const inputGroupButtonVariants = cva( + 'text-sm shadow-none flex gap-2 items-center', + { + variants: { + size: { + xs: "h-6 gap-1 px-2 rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-3.5 has-[>svg]:px-2", + sm: 'h-8 px-2.5 gap-1.5 rounded-md has-[>svg]:px-2.5', + 'icon-xs': + 'size-6 rounded-[calc(var(--radius)-5px)] p-0 has-[>svg]:p-0', + 'icon-sm': 'size-8 p-0 has-[>svg]:p-0' + } + }, + defaultVariants: { + size: 'xs' + } + } +); diff --git a/src/components/ui/input/Input.vue b/src/components/ui/input/Input.vue index 64deba91..86f30b92 100644 --- a/src/components/ui/input/Input.vue +++ b/src/components/ui/input/Input.vue @@ -1,32 +1,31 @@ - + diff --git a/src/components/ui/textarea/Textarea.vue b/src/components/ui/textarea/Textarea.vue new file mode 100644 index 00000000..0562cbfc --- /dev/null +++ b/src/components/ui/textarea/Textarea.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/src/components/ui/textarea/index.js b/src/components/ui/textarea/index.js new file mode 100644 index 00000000..e2d47739 --- /dev/null +++ b/src/components/ui/textarea/index.js @@ -0,0 +1 @@ +export { default as Textarea } from './Textarea.vue'; diff --git a/src/views/Notifications/dialogs/EditAndSendInviteResponseDialog.vue b/src/views/Notifications/dialogs/EditAndSendInviteResponseDialog.vue index aeaa38bd..e88d7ae0 100644 --- a/src/views/Notifications/dialogs/EditAndSendInviteResponseDialog.vue +++ b/src/views/Notifications/dialogs/EditAndSendInviteResponseDialog.vue @@ -9,16 +9,13 @@ {{ t('dialog.edit_send_invite_response_message.description') }} - - + :maxlength="64" + multiline + rows="2" + class="mt-2.5" + placeholder="" /> {{ t('dialog.edit_send_invite_response_message.cancel') @@ -32,6 +29,7 @@