@@ -2,8 +2,8 @@ import { useEffect, useMemo, useState } from 'react';
22import { useFetcher , useRevalidator , type SubmitTarget } from 'react-router' ;
33import { Heading } from 'react-aria-components' ;
44import { useTranslation } from 'react-i18next' ;
5- import { Button , Dialog , Input , Modal } from '@plone/components/quanta' ;
6- import { CloseIcon , TagIcon } from '@plone/components/Icons' ;
5+ import { Button , Dialog , Modal } from '@plone/components/quanta' ;
6+ import { CloseIcon , TagIcon , ChevrondownIcon } from '@plone/components/Icons' ;
77import { type ToastItem } from '@plone/layout/config/toast' ;
88import { useContentsContext } from '../../providers/contents' ;
99import { buildTagsPayload , unionSubjects } from '../../helpers/tags' ;
@@ -114,12 +114,7 @@ export default function TagsModal() {
114114 < span className = "mb-2 block text-sm font-bold" >
115115 { t ( 'contents.modal_tags.current_label' ) }
116116 </ span >
117- < div
118- className = { `
119- mb-5 flex min-h-12 flex-wrap items-center gap-2 rounded-lg border border-quanta-silver
120- bg-quanta-snow p-2
121- ` }
122- >
117+ < div className = "mb-5 flex min-h-8 flex-wrap items-center gap-2" >
123118 { visibleExisting . map ( ( tag ) => (
124119 < TagChip
125120 key = { `e-${ tag } ` }
@@ -145,21 +140,40 @@ export default function TagsModal() {
145140 < label className = "mb-1 block text-sm font-bold" htmlFor = "tags-add" >
146141 { t ( 'contents.modal_tags.add_label' ) }
147142 </ label >
148- < Input
149- id = "tags-add"
150- type = "text"
151- list = "tags-vocabulary"
152- value = { input }
153- placeholder = { t ( 'contents.modal_tags.add_placeholder' ) }
154- onChange = { ( e ) => setInput ( e . target . value ) }
155- onKeyDown = { ( e ) => {
156- if ( e . key === 'Enter' ) {
157- e . preventDefault ( ) ;
158- addTag ( input ) ;
159- }
160- } }
161- aria-label = { t ( 'contents.modal_tags.add_label' ) }
162- />
143+ < div
144+ className = { `
145+ flex items-center gap-2 rounded-lg border border-quanta-silver bg-quanta-air pe-3
146+ transition-colors
147+ focus-within:border-quanta-sapphire
148+ ` }
149+ >
150+ < input
151+ id = "tags-add"
152+ type = "text"
153+ list = "tags-vocabulary"
154+ value = { input }
155+ placeholder = { t ( 'contents.modal_tags.add_placeholder' ) }
156+ onChange = { ( e ) => setInput ( e . target . value ) }
157+ onKeyDown = { ( e ) => {
158+ if ( e . key === 'Enter' ) {
159+ e . preventDefault ( ) ;
160+ addTag ( input ) ;
161+ }
162+ } }
163+ aria-label = { t ( 'contents.modal_tags.add_label' ) }
164+ className = { `
165+ min-w-0 flex-1 appearance-none bg-transparent py-2 ps-3 text-sm outline-0
166+ placeholder:text-quanta-pigeon
167+ [&::-webkit-calendar-picker-indicator]:hidden!
168+ [&::-webkit-calendar-picker-indicator]:appearance-none
169+ ` }
170+ />
171+ < ChevrondownIcon
172+ aria-hidden
173+ size = "base"
174+ className = "pointer-events-none shrink-0 text-quanta-pigeon"
175+ />
176+ </ div >
163177 < p className = "text-quanta-graphite mt-1 text-xs" >
164178 { t ( 'contents.modal_tags.add_hint' ) }
165179 </ p >
@@ -209,7 +223,8 @@ function TagChip({
209223 < span
210224 className = { `
211225 inline-flex items-center gap-1 rounded-full py-1 ps-3 pe-1 text-sm font-medium
212- ${ added ? 'bg-quanta-tiffany text-quanta-puya' : 'bg-quanta-azure text-quanta-puya' }
226+ text-quanta-space
227+ ${ added ? 'bg-quanta-tiffany' : 'bg-quanta-azure' }
213228 ` }
214229 >
215230 { label }
@@ -218,13 +233,12 @@ function TagChip({
218233 onClick = { onRemove }
219234 aria-label = { t ( 'contents.modal_tags.remove' , { tag : label } ) }
220235 className = { `
221- flex h-5 w-5 items-center justify-center rounded-full text-lg leading-none opacity-60
222- transition-colors
223- hover:bg-black/10 hover:opacity-100
236+ flex h-5 w-5 items-center justify-center rounded-full transition-colors
237+ hover:bg-black/10
224238 focus-visible:outline-2 focus-visible:outline-quanta-sapphire
225239 ` }
226240 >
227- < span aria-hidden = "true" > × </ span >
241+ < CloseIcon aria-hidden className = "h-3 w-3" / >
228242 </ button >
229243 </ span >
230244 ) ;
0 commit comments