Skip to content

Commit 908dbff

Browse files
committed
docs
1 parent e5642be commit 908dbff

9 files changed

Lines changed: 68 additions & 65 deletions

File tree

packages/docs/src/components/ChangelogMenu.svelte

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,16 @@
77
dir="ltr"
88
tabindex="0"
99
role="button"
10-
class="link link-hover text-base-content/60 inline-block font-mono text-[0.6875rem]"
10+
class="link link-hover text-base-content/60 inline-block font-mono text-[0.625rem]"
1111
>
1212
{version.version}
13+
<svg
14+
class="text-base-content/60 -mt-0.25 hidden size-2 fill-current sm:inline-block"
15+
xmlns="http://www.w3.org/2000/svg"
16+
viewBox="0 0 2048 2048"
17+
>
18+
<path d="M1799 349l242 241-1017 1017L7 590l242-241 775 775 775-775z"></path>
19+
</svg>
1320
</div>
1421
<ul
1522
tabindex="0"

packages/docs/src/components/ComponentFooter.svelte

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -372,9 +372,9 @@
372372
</div> -->
373373

374374
<div
375-
class="card not-prose outline-base-content/5 bg-primary/5 relative overflow-hidden font-sans shadow-lg outline -outline-offset-1 md:flex-row-reverse"
375+
class="card not-prose outline-base-content/5 bg-primary/5 relative overflow-hidden font-sans shadow-lg outline -outline-offset-1 [direction:ltr] md:flex-row-reverse"
376376
>
377-
<figure class="max-md:bg-primary/10 isolate shrink-0 md:w-2/3">
377+
<figure class="max-md:bg-primary/10 isolate md:w-2/3">
378378
<img
379379
class="pointer-events-none"
380380
alt="daisyUI store"
@@ -460,7 +460,7 @@
460460
<span class="text-2xl font-light"> Official daisyUI Dashboard Template </span>
461461
</span>
462462
</h2>
463-
<div class="grow">
463+
<div class="mb-4 grow">
464464
<h2
465465
class="card-title text-sm font-light opacity-50 sm:w-[250%] sm:text-lg md:text-lg lg:text-lg xl:text-xl"
466466
>

packages/docs/src/components/LangChange.svelte

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,23 @@
1414
<div
1515
tabindex="0"
1616
role="button"
17-
class="btn btn-sm btn-ghost"
17+
class="btn btn-sm btn-ghost gap-1 text-[.5625rem] font-bold"
1818
aria-label="Language"
1919
title="Change Language"
2020
>
21-
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" class="h-4 w-4">
21+
<svg class="text-base-content/70 size-4" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24">
2222
<path
23-
fill-rule="evenodd"
24-
d="M11 5a.75.75 0 0 1 .688.452l3.25 7.5a.75.75 0 1 1-1.376.596L12.89 12H9.109l-.67 1.548a.75.75 0 1 1-1.377-.596l3.25-7.5A.75.75 0 0 1 11 5Zm-1.24 5.5h2.48L11 7.636 9.76 10.5ZM5 1a.75.75 0 0 1 .75.75v1.261a25.27 25.27 0 0 1 2.598.211.75.75 0 1 1-.2 1.487c-.22-.03-.44-.056-.662-.08A12.939 12.939 0 0 1 5.92 8.058c.237.304.488.595.752.873a.75.75 0 0 1-1.086 1.035A13.075 13.075 0 0 1 5 9.307a13.068 13.068 0 0 1-2.841 2.546.75.75 0 0 1-.827-1.252A11.566 11.566 0 0 0 4.08 8.057a12.991 12.991 0 0 1-.554-.938.75.75 0 1 1 1.323-.707c.049.09.099.181.15.271.388-.68.708-1.405.952-2.164a23.941 23.941 0 0 0-4.1.19.75.75 0 0 1-.2-1.487c.853-.114 1.72-.185 2.598-.211V1.75A.75.75 0 0 1 5 1Z"
25-
clip-rule="evenodd"
26-
>
27-
</path>
23+
stroke-linejoin="round"
24+
stroke-linecap="round"
25+
stroke-width="2"
26+
fill="none"
27+
stroke="currentColor"
28+
d="M12 21a9 9 0 1 0 0-18m0 18a9 9 0 1 1 0-18m0 18c2.761 0 3.941-5.163 3.941-9S14.761 3 12 3m0 18c-2.761 0-3.941-5.163-3.941-9S9.239 3 12 3M3.5 9h17m-17 6h17"
29+
></path>
2830
</svg>
29-
31+
<!-- {$t("__code")} -->
3032
<svg
31-
width="12px"
32-
height="12px"
33-
class="hidden h-2 w-2 fill-current opacity-60 sm:inline-block"
33+
class="mt-px hidden size-2 fill-current opacity-60 sm:inline-block"
3434
xmlns="http://www.w3.org/2000/svg"
3535
viewBox="0 0 2048 2048"
3636
>

packages/docs/src/components/ThemeChange.svelte

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,28 +14,19 @@
1414
</script>
1515

1616
<div title="Change Theme" class={`dropdown dropdown-end block ${dropdownClasses}`}>
17-
<div tabindex="0" role="button" class={`btn btn-sm ${btnClasses}`}>
18-
<svg
19-
width="20"
20-
height="20"
21-
xmlns="http://www.w3.org/2000/svg"
22-
fill="none"
23-
viewBox="0 0 24 24"
24-
class="h-5 w-5 stroke-current md:hidden"
17+
<div tabindex="0" role="button" class={`btn btn-sm gap-1 ${btnClasses}`}>
18+
<div
19+
class="bg-base-100 border-base-content/10 grid shrink-0 grid-cols-2 gap-0.5 rounded-md border p-1"
2520
>
26-
<path
27-
stroke-linecap="round"
28-
stroke-linejoin="round"
29-
stroke-width="2"
30-
d="M7 21a4 4 0 01-4-4V5a2 2 0 012-2h4a2 2 0 012 2v12a4 4 0 01-4 4zm0 0h12a2 2 0 002-2v-4a2 2 0 00-2-2h-2.343M11 7.343l1.657-1.657a2 2 0 012.828 0l2.829 2.829a2 2 0 010 2.828l-8.486 8.485M7 17h.01"
31-
>
32-
</path>
33-
</svg>
34-
<span class="hidden font-normal md:inline">{$t("change-theme-btn")}</span>
21+
<div class="bg-base-content size-1 rounded-full"></div>
22+
<div class="bg-primary size-1 rounded-full"></div>
23+
<div class="bg-secondary size-1 rounded-full"></div>
24+
<div class="bg-accent size-1 rounded-full"></div>
25+
</div>
3526
<svg
3627
width="12px"
3728
height="12px"
38-
class="hidden h-2 w-2 fill-current opacity-60 sm:inline-block"
29+
class="mt-px hidden h-2 w-2 fill-current opacity-60 sm:inline-block"
3930
xmlns="http://www.w3.org/2000/svg"
4031
viewBox="0 0 2048 2048"
4132
>
@@ -47,6 +38,7 @@
4738
class={`dropdown-content bg-base-200 text-base-content rounded-box top-px h-[30.5rem] max-h-[calc(100vh-8.6rem)] overflow-y-auto border border-white/5 shadow-2xl outline-1 outline-black/5 ${contentClasses}`}
4839
>
4940
<ul class="menu w-56">
41+
<li class="menu-title text-xs">{$t("change-theme-btn")}</li>
5042
{#each themes as theme}
5143
<li>
5244
<button class="gap-3 px-2" data-set-theme={theme} data-act-class="[&_svg]:visible">
@@ -73,6 +65,7 @@
7365
</button>
7466
</li>
7567
{/each}
68+
<li></li>
7669
<li>
7770
<a href="/theme-generator/">
7871
<svg

packages/docs/src/lib/mdsvex/mdsvex.config.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,7 @@ const rehypePlugins = [
123123
]
124124

125125
const remarkPlugins = [
126+
replacePlaceholders,
126127
remarkRenderComponent,
127128
remarkTranslate,
128129
[remarkGithub, { repository: "https://github.com/saadeghi/daisyui" }],
@@ -139,8 +140,6 @@ const remarkPlugins = [
139140
blockquote: "alert not-italic items-start text-xs leading-loose *:m-0!",
140141
},
141142
],
142-
replacePlaceholders,
143-
144143
remarkLinkHeadings,
145144
]
146145

packages/docs/src/routes/(routes)/docs/cdn/+page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ desc: How to use daisyUI from a CDN?
5555
<div class="tab-content border-none">
5656
<div class="bg-neutral text-neutral-content rounded-se-box rounded-b-box">
5757
<div class="grid *:[grid-area:1/1]">
58-
<div class="overflow-x-auto pt-16 pb-8 px-6">
58+
<div class="overflow-x-auto pt-16 pb-8 px-6 [direction:ltr]">
5959

6060
<pre class="shiki tokyo-night" style="background-color:var(--shiki-bg);color:var(--shiki-punctuation)" tabindex="0"><code><span class="line"><span style="color:var(--shiki-punctuation)">&lt;link</span><span style="color:var(--shiki-attr-name)"> href</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">https://cdn.jsdelivr.net/npm/daisyui@5</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-name)"> rel</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">stylesheet</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-name)"> type</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">text/css</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-punctuation)"> /&gt;</span></span>
6161
<span class="line"><span style="color:var(--shiki-punctuation)">&lt;script</span><span style="color:var(--shiki-attr-name)"> src</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-punctuation)">&gt;&lt;/script&gt;</span></span></code></pre>
@@ -76,7 +76,7 @@ desc: How to use daisyUI from a CDN?
7676

7777
<p class="mt-6">daisyui.css includes light and dark themes. For other themes, add themes.css file as well:</p>
7878
<div class="grid *:[grid-area:1/1]">
79-
<div class="overflow-x-auto pt-12 pb-8 px-6 bg-neutral text-neutral-content rounded-box">
79+
<div class="overflow-x-auto [direction:ltr] pt-12 pb-8 px-6 bg-neutral text-neutral-content rounded-box">
8080
<pre class="shiki tokyo-night" style="background-color:var(--shiki-bg);color:var(--shiki-punctuation)" tabindex="0"><code><span class="line"><span style="color:var(--shiki-punctuation)">&lt;link</span><span style="color:var(--shiki-attr-name)"> href</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">https://cdn.jsdelivr.net/npm/daisyui@5/themes.css</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-name)"> rel</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">stylesheet</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-name)"> type</span><span style="color:var(--shiki-punctuation)">=</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-attr-value)">text/css</span><span style="color:var(--shiki-punctuation)">"</span><span style="color:var(--shiki-punctuation)"> /&gt;</span></span></code></pre>
8181
</div>
8282
{#if onMount}
@@ -96,7 +96,7 @@ desc: How to use daisyUI from a CDN?
9696
<div class="tab-content border-none bg-neutral text-neutral-content">
9797
<div class="grid *:[grid-area:1/1]">
9898
99-
<div class="overflow-x-auto pt-16 pb-2 mb-6 px-6">
99+
<div class="overflow-x-auto [direction:ltr] pt-16 pb-2 mb-6 px-6">
100100
101101
{#if $combinedUrl}
102102

packages/docs/src/routes/(routes)/docs/themes/+page.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ You can manage themes by adding brackets in front of `@plugin "daisyui"` in your
2121
+ themes: light --default, dark --prefersdark;
2222
+ }
2323
```
24-
`themes` is a comma-separated list of theme names you want to enable.
25-
You can set `--default` flag for a theme to make it the default theme.
26-
You can also set `--prefersdark` flag for a theme to make it the default theme for dark mode (prefers-color-scheme: dark).
24+
- `themes` is a comma-separated list of theme names you want to enable.
25+
- You can set `--default` flag for a theme to make it the default theme.
26+
- You can also set `--prefersdark` flag for a theme to make it the default theme for dark mode (prefers-color-scheme: dark).
2727

2828
## Enable a built-in theme
2929

packages/docs/src/routes/(routes)/store/[productId]/+page.svelte

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,9 @@
122122
class="inline-block size-4 transition-transform group-hover:-translate-x-0.5"
123123
xmlns="http://www.w3.org/2000/svg"
124124
viewBox="0 0 20 20"
125-
><g fill="currentColor"
126-
><line
125+
>
126+
<g fill="currentColor">
127+
<line
127128
x1="17"
128129
y1="10"
129130
x2="3"
@@ -133,16 +134,19 @@
133134
stroke-linecap="round"
134135
stroke-linejoin="round"
135136
stroke-width="1.5"
136-
></line><polyline
137+
>
138+
</line>
139+
<polyline
137140
points="8 5 3 10 8 15"
138141
fill="none"
139142
stroke="currentColor"
140143
stroke-linecap="round"
141144
stroke-linejoin="round"
142145
stroke-width="1.5"
143-
></polyline></g
144-
></svg
145-
>
146+
>
147+
</polyline>
148+
</g>
149+
</svg>
146150
<span class="text-sm">Back to store</span>
147151
</a>
148152
</div>
@@ -402,7 +406,7 @@
402406
viewBox="0 0 24 24"
403407
stroke-width="1.5"
404408
stroke="currentColor"
405-
class="hidden size-6 transition-transform duration-300 group-hover:translate-x-1 md:inline-block rtl:rotate-180 group-hover:rtl:-translate-x-1"
409+
class="hidden size-6 transition-transform duration-300 group-hover:translate-x-1 md:inline-block"
406410
>
407411
<path
408412
stroke-linecap="round"

packages/docs/src/translation/fa.json

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -540,39 +540,39 @@
540540
"These variables are for internal use. They are not subject of semantic versioning and some of them may be modified or removed in future minor versions, in which case your custom styles might lose their effect, so if you want to modify these variables and your UI really depends on the customized value, make sure you are using a fixed version of daisyUI, not the latest version.": "این متغیرها برای استفاده داخلی هستند. آنها مشمول نسخه معنایی نیستند و ممکن است برخی از آنها در نسخه‌های فرعی آینده تغییر یا حذف شوند، در این صورت استایل‌های سفارشی شما ممکن است اثر خود را از دست بدهند، بنابراین اگر می‌خواهید این متغیرها را تغییر دهید و UI شما واقعاً به مقدار سفارشی‌شده بستگی دارد، مطمئن شوید که از یک نسخه ثابت از daisyUI استفاده می‌کنید، نه آخرین نسخه.",
541541
"Class Name": "نام کلاس",
542542
"bg-primary": "bg-primary",
543-
"Sets the background color to the primary color": "رنگ پس‌زمینه را به رنگ اصلی تنظیم می‌کند",
543+
"Sets the background color to the primary color": "رنگ پس‌زمینه را برای رنگ primary تنظیم می‌کند",
544544
"to-primary": "to-primary",
545-
"Sets the ending color for a gradient to the primary color": "رنگ پایانی یک گرادیان را به رنگ اصلی تنظیم می‌کند",
545+
"Sets the ending color for a gradient to the primary color": "رنگ پایانی یک گرادیان را برای رنگ primary تنظیم می‌کند",
546546
"via-primary": "via-primary",
547-
"Sets the middle color for a gradient to the primary color": "رنگ میانی یک گرادیان را به رنگ اصلی تنظیم می‌کند",
547+
"Sets the middle color for a gradient to the primary color": "رنگ میانی یک گرادیان را برای رنگ primary تنظیم می‌کند",
548548
"from-primary": "from-primary",
549-
"Sets the starting color for a gradient to the primary color": "رنگ شروع یک گرادیان را به رنگ اصلی تنظیم می‌کند",
549+
"Sets the starting color for a gradient to the primary color": "رنگ شروع یک گرادیان را برای رنگ primary تنظیم می‌کند",
550550
"text-primary": "text-primary",
551-
"Sets the text color to the primary color": "رنگ متن را به رنگ اصلی تنظیم می‌کند",
551+
"Sets the text color to the primary color": "رنگ متن را برای رنگ primary تنظیم می‌کند",
552552
"ring-primary": "ring-primary",
553-
"Sets the ring color to the primary color": "رنگ ring را به رنگ اصلی تنظیم می‌کند",
553+
"Sets the ring color to the primary color": "رنگ ring را برای رنگ primary تنظیم می‌کند",
554554
"fill-primary": "fill-primary",
555-
"Sets the fill color for SVG elements to the primary color": "رنگ fill برای عناصر SVG را به رنگ اصلی تنظیم می‌کند",
555+
"Sets the fill color for SVG elements to the primary color": "رنگ fill برای عناصر SVG را برای رنگ primary تنظیم می‌کند",
556556
"caret-primary": "caret-primary",
557-
"Sets the caret color to the primary color": "رنگ caret را به رنگ اصلی تنظیم می‌کند",
557+
"Sets the caret color to the primary color": "رنگ caret را برای رنگ primary تنظیم می‌کند",
558558
"stroke-primary": "stroke-primary",
559-
"Sets the stroke color for SVG elements to the primary color": "رنگ stroke برای عناصر SVG را به رنگ اصلی تنظیم می‌کند",
559+
"Sets the stroke color for SVG elements to the primary color": "رنگ stroke برای عناصر SVG را برای رنگ primary تنظیم می‌کند",
560560
"border-primary": "border-primary",
561-
"Sets the border color to the primary color": "رنگ border را به رنگ اصلی تنظیم می‌کند",
561+
"Sets the border color to the primary color": "رنگ border را برای رنگ primary تنظیم می‌کند",
562562
"divide-primary": "divide-primary",
563-
"Sets the color for dividing borders to the primary color": "رنگ برای تقسیم borderها را به رنگ اصلی تنظیم می‌کند",
563+
"Sets the color for dividing borders to the primary color": "رنگ برای تقسیم borderها را برای رنگ primary تنظیم می‌کند",
564564
"accent-primary": "accent-primary",
565-
"Sets the accent color to the primary color": "رنگ accent را به رنگ اصلی تنظیم می‌کند",
565+
"Sets the accent color to the primary color": "رنگ accent را برای رنگ primary تنظیم می‌کند",
566566
"shadow-primary": "shadow-primary",
567-
"Sets the shadow color to the primary color": "رنگ shadow را به رنگ اصلی تنظیم می‌کند",
567+
"Sets the shadow color to the primary color": "رنگ shadow را برای رنگ primary تنظیم می‌کند",
568568
"outline-primary": "outline-primary",
569-
"Sets the outline color to the primary color": "رنگ outline را به رنگ اصلی تنظیم می‌کند",
569+
"Sets the outline color to the primary color": "رنگ outline را برای رنگ primary تنظیم می‌کند",
570570
"decoration-primary": "decoration-primary",
571-
"Sets the text decoration color to the primary color": "رنگ تزئین متن را به رنگ اصلی تنظیم می‌کند",
571+
"Sets the text decoration color to the primary color": "رنگ تزئین متن را برای رنگ primary تنظیم می‌کند",
572572
"placeholder-primary": "placeholder-primary",
573-
"Sets the placeholder text color to the primary color": "رنگ متن placeholder را به رنگ اصلی تنظیم می‌کند",
573+
"Sets the placeholder text color to the primary color": "رنگ متن placeholder را برای رنگ primary تنظیم می‌کند",
574574
"ring-offset-primary": "ring-offset-primary",
575-
"Sets the ring offset color to the primary color": "رنگ ring offset را به رنگ اصلی تنظیم می‌کند",
575+
"Sets the ring offset color to the primary color": "رنگ ring offset را برای رنگ primary تنظیم می‌کند",
576576
"CSS Variable": "متغیر CSS",
577577
"rounded-box": "rounded-box",
578578
"var(--radius-box)": "var(--radius-box)",

0 commit comments

Comments
 (0)