liquent 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.fa.md +34 -19
- package/README.md +13 -2
- package/dist/index.cjs +255 -35
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +255 -35
- package/dist/styles.css +80 -9
- package/package.json +14 -5
package/README.fa.md
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
<div dir="rtl" align="right">
|
|
2
2
|
|
|
3
3
|
<p align="center">
|
|
4
|
-
<img src=".github/assets/hero-fa.jpg" alt="Liquent،
|
|
4
|
+
<img src=".github/assets/hero-fa.jpg" alt="Liquent، Liquid Glass برای React" width="100%" />
|
|
5
5
|
</p>
|
|
6
6
|
|
|
7
7
|
<h1 align="center">Liquent</h1>
|
|
8
8
|
|
|
9
9
|
<p align="center">
|
|
10
|
-
<b
|
|
11
|
-
کامپوننتهایی که از
|
|
10
|
+
<b>Liquid Glass برای React</b><br />
|
|
11
|
+
کامپوننتهایی که از اول با فارسی و راستبهچپ هم درست کار میکنند.
|
|
12
12
|
</p>
|
|
13
13
|
|
|
14
14
|
<p align="center">
|
|
@@ -21,13 +21,13 @@
|
|
|
21
21
|
|
|
22
22
|
<br />
|
|
23
23
|
|
|
24
|
-
##
|
|
24
|
+
## شیشهای که واقعی به نظر میرسد
|
|
25
25
|
|
|
26
|
-
شیشهی Liquent
|
|
26
|
+
شیشهی Liquent مثل یک شیشهی واقعی رفتار میکند: پشت خودش را در لبهها کج میکند، وسطش کمی مات است و لبههایش برق میزند. وقتی انگشتتان را روی یک کنترل نگه دارید، به یک عدسی کوچک تبدیل میشود و وقتی رها کنید، نرم سر جایش برمیگردد. در Chrome و Safari هم یکسان دیده میشود.
|
|
27
27
|
|
|
28
|
-
##
|
|
28
|
+
## با فارسی مشکلی ندارد
|
|
29
29
|
|
|
30
|
-
|
|
30
|
+
راستبهچپ از اول در خود کتابخانه در نظر گرفته شده. همهی کامپوننتها در صفحهی فارسی درست چیده میشوند، درست حرکت میکنند و با کلیدهای جهتنما هم درست کار میکنند. حروف فارسی حتی زیر شیشه هم به هم چسبیده میمانند.
|
|
31
31
|
|
|
32
32
|
<p align="center">
|
|
33
33
|
<img src=".github/assets/rtl-fa.jpg" alt="مقایسهی کنترلها در صفحهی راستبهچپ" width="100%" />
|
|
@@ -82,9 +82,9 @@
|
|
|
82
82
|
|
|
83
83
|
| دسته | کامپوننتها |
|
|
84
84
|
| --: | --: |
|
|
85
|
-
|
|
|
85
|
+
| **پنلها** | <code>Glass</code> · <code>Sheet</code> · <code>Dialog</code> · <code>Modal</code> · <code>ScrollArea</code> |
|
|
86
86
|
| **ناوبری** | <code>TabBar</code> · <code>Toolbar</code> · <code>Sidebar</code> · <code>SegmentedControl</code> |
|
|
87
|
-
|
|
|
87
|
+
| **دکمهها و منوها** | <code>Button</code> · <code>Menu</code> · <code>ContextMenu</code> |
|
|
88
88
|
| **ورودی** | <code>Input</code> · <code>SearchField</code> · <code>Combobox</code> · <code>Select</code> |
|
|
89
89
|
| **انتخاب** | <code>Switch</code> · <code>Checkbox</code> · <code>RadioGroup</code> · <code>Slider</code> · <code>Stepper</code> |
|
|
90
90
|
| **وضعیت** | <code>Progress</code> · <code>Spinner</code> |
|
|
@@ -112,7 +112,7 @@ export function Settings() {
|
|
|
112
112
|
|
|
113
113
|
<div dir="rtl" align="right">
|
|
114
114
|
|
|
115
|
-
استایلها همراه کامپوننتها
|
|
115
|
+
استایلها خودشان همراه کامپوننتها میآیند و لازم نیست کار دیگری بکنید. فقط اگر پروژهتان رندر سمت سرور (SSR) دارد، فایل `liquent/styles.css` را هم در layout اصلی import کنید.
|
|
116
116
|
|
|
117
117
|
### فارسی و راستبهچپ
|
|
118
118
|
|
|
@@ -129,16 +129,31 @@ export default function Root({ children }) {
|
|
|
129
129
|
|
|
130
130
|
<div dir="rtl" align="right">
|
|
131
131
|
|
|
132
|
-
با `LiquentProvider`
|
|
132
|
+
با `LiquentProvider` متنهایی که خود کامپوننتها دارند فارسی میشوند؛ مثل دکمهی پاک کردن، کلمهی «جستجو» در فیلد جستجو و پیام «نتیجهای پیدا نشد». اگر خودتان متنی بدهید، همان نمایش داده میشود.
|
|
133
|
+
|
|
134
|
+
### شفاف یا مات
|
|
135
|
+
|
|
136
|
+
مثل تنظیم Liquid Glass در iOS، خودتان انتخاب میکنید شیشه چقدر شفاف باشد:
|
|
137
|
+
|
|
138
|
+
</div>
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
<LiquentProvider glass="clear">…</LiquentProvider> // "clear"، "tinted" یا عددی از 0 تا 1
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
<div dir="rtl" align="right">
|
|
145
|
+
|
|
146
|
+
یا در CSS مقدار `--lq-glass-tint` را بدهید: `0` شفاف، `0.5` حالت پیشفرض iOS و `1` مات.
|
|
133
147
|
|
|
134
148
|
## ویژگیها
|
|
135
149
|
|
|
136
|
-
-
|
|
137
|
-
-
|
|
138
|
-
-
|
|
139
|
-
-
|
|
140
|
-
-
|
|
141
|
-
-
|
|
150
|
+
- **تببار iOS 27، اندازهگیریشده:** انگشت را روی تب نگه دارید تا لنز بالا بیاید و زیرش را بزرگتر نشان دهد. نوار پشت لنز با همان منحنی، نوارهای تیره و هالهی iOS باریکتر دیده میشود. همه از روی اسکرینشاتهای iOS 27.2 اندازه گرفته شدهاند.
|
|
151
|
+
- **فرم:** به `Switch` و `SegmentedControl` یک `name` بدهید تا مقدارشان با فرم ارسال شود.
|
|
152
|
+
- **جستجوی فارسی:** در `Combobox` فرقی نمیکند کاربر «ي» تایپ کند یا «ی»، «ك» یا «ک»، با نیمفاصله یا بدون آن، یا عدد را فارسی بنویسد یا انگلیسی؛ همه پیدا میشوند.
|
|
153
|
+
- **رنگ درست:** شیشه دور خودش هالهی رنگی نمیاندازد و رنگ عکسهای پشتش را خراب نمیکند.
|
|
154
|
+
- **منوی باهوش:** اگر منو کنار لبهی صفحه باشد، خودش به طرف دیگر باز میشود.
|
|
155
|
+
- **برای همه:** با صفحهکلید کار میکند و تنظیمات دسترسپذیری سیستم مثل کاهش حرکت و کاهش شفافیت را رعایت میکند.
|
|
156
|
+
- **تم روشن و تیره:** هر دو آمادهاند و ظاهر را میشود با متغیرهای CSS تغییر داد.
|
|
142
157
|
|
|
143
158
|
## توسعه
|
|
144
159
|
|
|
@@ -154,8 +169,8 @@ cd site && npm install && npm run dev # http://localhost:5199
|
|
|
154
169
|
|
|
155
170
|
## مجوز
|
|
156
171
|
|
|
157
|
-
|
|
172
|
+
با مجوز [MIT](LICENSE) منتشر شده و استفاده از آن آزاد است. توضیح کدهایی که از پروژههای دیگر آمده در فایل [NOTICE](NOTICE) است.
|
|
158
173
|
|
|
159
|
-
<sub>Liquid Glass
|
|
174
|
+
<sub>Liquid Glass طراحی شرکت Apple است. Liquent یک پروژهی مستقل است و ربطی به Apple ندارد.</sub>
|
|
160
175
|
|
|
161
176
|
</div>
|
package/README.md
CHANGED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
<h1 align="center">Liquent</h1>
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
|
-
<b>Liquid Glass for
|
|
9
|
-
|
|
8
|
+
<b>Liquid Glass for the web.</b><br />
|
|
9
|
+
iOS 26 and iOS 27 style glass components for React: glass that bends, frosts and catches the light, in every direction you write.
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
@@ -129,8 +129,19 @@ export default function Root({ children }) {
|
|
|
129
129
|
|
|
130
130
|
The provider sets the words components carry on their own: the clear button's name, the search placeholder, the empty-list message. Anything you pass as a prop still wins.
|
|
131
131
|
|
|
132
|
+
### Clear or tinted
|
|
133
|
+
|
|
134
|
+
Like iOS's Liquid Glass setting, you choose how see-through the glass is:
|
|
135
|
+
|
|
136
|
+
```tsx
|
|
137
|
+
<LiquentProvider glass="clear">…</LiquentProvider> // "clear", "tinted", or 0 to 1
|
|
138
|
+
```
|
|
139
|
+
|
|
140
|
+
Or set `--lq-glass-tint` in CSS: `0` is clear, `0.5` is iOS's default, `1` is tinted.
|
|
141
|
+
|
|
132
142
|
## Thoughtful details.
|
|
133
143
|
|
|
144
|
+
- **The iOS 27 tab bar, measured.** Hold a tab and the lens lifts and magnifies what's under it. The bar behind it bends thinner, with iOS's curve, bands and halo, all fitted to iOS 27.2 screenshots.
|
|
134
145
|
- **Forms, natively.** `Switch` and `SegmentedControl` take a `name` and submit with a plain `<form>`.
|
|
135
146
|
- **Search that understands Persian.** `Combobox` matches «ي» and «ی», «ك» and «ک», half-spaces, and Persian, Arabic or Latin digits. `foldText` is exported for your server.
|
|
136
147
|
- **True colour.** Resting glass adds no colour fringe, and on wide-gamut screens Display P3 photos stay vivid behind it.
|