:focus]:border-ring has-[>:focus]:ring-[3px] has-[>:focus]:ring-ring/50',
45 | className,
46 | )}
47 | >
48 |
51 |
{
57 | onSearch(e.target.value)
58 | }}
59 | placeholder={t('search')}
60 | className={clsx(
61 | 'w-[.1%] grow bg-transparent pl-0.5 leading-4 outline-hidden dark:placeholder:text-neutral-600',
62 | !value && 'select-none',
63 | )}
64 | />
65 | {value ? (
66 |
{
69 | onSearch('')
70 | }}
71 | />
72 | ) : null}
73 |
74 | {
80 | onRegex(!isUsingRegex)
81 | }}
82 | >
83 |
86 |
87 |
88 |
89 | )
90 | }
91 |
--------------------------------------------------------------------------------
/apps/ui/app/[locale]/(vocabulary)/_lib/LexiconTrie.test.ts:
--------------------------------------------------------------------------------
1 | import { describe, expect, it } from 'vitest'
2 |
3 | import type { Leaf, TrackedWord } from '@/app/[locale]/(vocabulary)/_lib/LexiconTrie'
4 |
5 | import { buildTrackedWord, LEARNING_PHASE, LexiconTrie } from '@/app/[locale]/(vocabulary)/_lib/LexiconTrie'
6 | import { createFactory } from '@sub-vocab/utils/lib'
7 |
8 | const mockTrackedWord = createFactory