feat: Upgrade to TailwindCSS 4 & DaisyUI 5 (#263)
Also fixes #251 Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/263 Co-authored-by: joostdecock <joost@joost.at> Co-committed-by: joostdecock <joost@joost.at>
This commit is contained in:
parent
a2863e5158
commit
44e04a4cef
164 changed files with 2361 additions and 2658 deletions
|
@ -89,16 +89,16 @@ export const Patterns = ({ Link = false }) => {
|
|||
|
||||
return (
|
||||
<>
|
||||
<div className="tw-flex tw-flex-row tw-flex-wrap tw-gap-2 tw-items-center tw-justify-between tw-mb-4">
|
||||
<div className="tw:flex tw:flex-row tw:flex-wrap tw:gap-2 tw:items-center tw:justify-between tw:mb-4">
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-error"
|
||||
className="tw:daisy-btn tw:daisy-btn-error"
|
||||
onClick={removeSelectedPatterns}
|
||||
disabled={count < 1}
|
||||
>
|
||||
<TrashIcon /> {count} {t('patterns')}
|
||||
</button>
|
||||
<Link
|
||||
className="tw-daisy-btn tw-daisy-btn-primary tw-capitalize tw-w-full md:tw-w-auto hover:tw-text-primary-content"
|
||||
className="tw:daisy-btn tw:daisy-btn-primary tw:capitalize tw:w-full tw:md:w-auto tw:hover:text-primary-content"
|
||||
href="/editor/"
|
||||
>
|
||||
<PlusIcon />
|
||||
|
@ -106,13 +106,13 @@ export const Patterns = ({ Link = false }) => {
|
|||
</Link>
|
||||
</div>
|
||||
<TableWrapper>
|
||||
<table className="tw-table tw-table-auto">
|
||||
<thead className="tw-border tw-border-base-300 tw-border-b-2 tw-border-t-0 tw-border-x-0">
|
||||
<table className="tw:table tw:table-auto">
|
||||
<thead className="tw:border tw:border-base-300 tw:border-b-2 tw:border-t-0 tw:border-x-0">
|
||||
<tr className="">
|
||||
<th className="">
|
||||
<input
|
||||
type="checkbox"
|
||||
className="tw-daisy-checkbox tw-daisy-checkbox-secondary"
|
||||
className="tw:daisy-checkbox tw:daisy-checkbox-secondary"
|
||||
onClick={toggleAll}
|
||||
checked={patterns.length === count}
|
||||
/>
|
||||
|
@ -120,13 +120,13 @@ export const Patterns = ({ Link = false }) => {
|
|||
{Object.keys(fields).map((field) => (
|
||||
<th key={field}>
|
||||
<button
|
||||
className="tw-daisy-btn tw-daisy-btn-link tw-capitalize tw-px-0 tw-underline hover:tw-decoration-4 tw-decoration-2 tw-text-secondary"
|
||||
className="tw:daisy-btn tw:daisy-btn-link tw:capitalize tw:px-0 tw:underline tw:hover:decoration-4 tw:decoration-2 tw:text-secondary"
|
||||
onClick={() => (order === field ? setDesc(!desc) : setOrder(field))}
|
||||
>
|
||||
{fields[field]}{' '}
|
||||
<RightIcon
|
||||
stroke={3}
|
||||
className={`tw-w-4 tw-h-4 ${desc ? 'tw--' : 'tw-'}rotate-90 ${order === field ? '' : 'tw-opacity-0'}`}
|
||||
className={`tw:w-4 tw:h-4 ${desc ? 'tw:-' : 'tw:'}rotate-90 ${order === field ? '' : 'tw:opacity-0'}`}
|
||||
/>
|
||||
</button>
|
||||
</th>
|
||||
|
@ -136,16 +136,16 @@ export const Patterns = ({ Link = false }) => {
|
|||
<tbody>
|
||||
{orderBy(patterns, order, desc ? 'desc' : 'asc').map((pattern, i) => (
|
||||
<tr key={i}>
|
||||
<td className="tw-text-base tw-font-medium">
|
||||
<td className="tw:text-base tw:font-medium">
|
||||
<input
|
||||
type="checkbox"
|
||||
checked={selection[pattern.id] ? true : false}
|
||||
className="tw-daisy-checkbox tw-daisy-checkbox-secondary"
|
||||
className="tw:daisy-checkbox tw:daisy-checkbox-secondary"
|
||||
onClick={() => toggle(pattern.id)}
|
||||
/>
|
||||
</td>
|
||||
<td className="tw-text-base tw-font-medium">{pattern.id}</td>
|
||||
<td className="tw-text-base tw-font-medium">
|
||||
<td className="tw:text-base tw:font-medium">{pattern.id}</td>
|
||||
<td className="tw:text-base tw:font-medium">
|
||||
<PatternCard
|
||||
href={`/account/data/patterns/pattern?id=${pattern.id}`}
|
||||
pattern={pattern}
|
||||
|
@ -153,24 +153,24 @@ export const Patterns = ({ Link = false }) => {
|
|||
Link={Link}
|
||||
/>
|
||||
</td>
|
||||
<td className="tw-text-base tw-font-medium">
|
||||
<td className="tw:text-base tw:font-medium">
|
||||
<Link
|
||||
href={`/account/data/patterns/pattern?id=${pattern.id}`}
|
||||
className="tw-text-secondary tw-underline tw-decoration-2 hover:tw-decoration-4"
|
||||
className="tw:text-secondary tw:underline tw:decoration-2 tw:hover:decoration-4"
|
||||
>
|
||||
{pattern.name}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="tw-text-base tw-font-medium">
|
||||
<td className="tw:text-base tw:font-medium">
|
||||
<Link
|
||||
href={`/designs/${pattern.design}`}
|
||||
className="tw-text-secondary tw-underline tw-decoration-2 hover:tw-decoration-4"
|
||||
className="tw:text-secondary tw:underline tw:decoration-2 tw:hover:decoration-4"
|
||||
>
|
||||
{capitalize(pattern.design)}
|
||||
</Link>
|
||||
</td>
|
||||
<td className="tw-text-base tw-font-medium">{shortDate(pattern.createdAt)}</td>
|
||||
<td className="tw-text-base tw-font-medium">
|
||||
<td className="tw:text-base tw:font-medium">{shortDate(pattern.createdAt)}</td>
|
||||
<td className="tw:text-base tw:font-medium">
|
||||
{pattern.public ? <BoolYesIcon /> : <BoolNoIcon />}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue