@kashi-ui/css 2.16.0 → 2.18.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.md +1 -1
- package/dist/components/time-picker.css +123 -0
- package/dist/font.css +13 -1
- package/dist/fonts/Kashi-OFL.txt +93 -0
- package/dist/fonts/Kashi.woff2 +0 -0
- package/dist/kashi.css +139 -3
- package/dist/kashi.nofont.css +126 -2
- package/dist/tokens.css +2 -2
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -22,6 +22,6 @@ import "@kashi-ui/css";
|
|
|
22
22
|
- راستبهچپ از پایه با Logical Properties
|
|
23
23
|
- تم تیره (پیشفرض) و روشن با `data-theme="light"`
|
|
24
24
|
- همهٔ استایلها در Cascade Layer؛ CSS شما همیشه اولویت دارد
|
|
25
|
-
- فونت متغیر
|
|
25
|
+
- فونت متغیر کاشی همراه پکیج ([@kashi-ui/font](https://kashi.sepantapouya.com/font/)، لایسنس SIL OFL 1.1، بر پایهٔ دستخط و وزیرمتن)؛ وزیرمتن هم برای سازگاری با نسخههای قبل تعریف شده و فقط اگر نامش را به کار ببرید دانلود میشود
|
|
26
26
|
|
|
27
27
|
مستندات کامل: [kashi.sepantapouya.com](https://kashi.sepantapouya.com) · کد: [GitHub](https://github.com/Sepantapouya/Kashi) · لایسنس MIT
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* صفحهٔ ساعت (TimeClock) و انتخاب ساعت (TimePicker)
|
|
3
|
+
* متغیرها: --k-clock-size --k-clock-bg
|
|
4
|
+
*/
|
|
5
|
+
.k-clock {
|
|
6
|
+
display: grid;
|
|
7
|
+
justify-items: center;
|
|
8
|
+
gap: var(--k-space-3);
|
|
9
|
+
color: var(--k-text-primary);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
.k-clock__header { display: flex; align-items: center; gap: var(--k-space-1); }
|
|
13
|
+
.k-clock__unit {
|
|
14
|
+
min-inline-size: 3.5rem;
|
|
15
|
+
padding: var(--k-space-1) var(--k-space-2);
|
|
16
|
+
border: 0;
|
|
17
|
+
border-radius: var(--k-radius-md);
|
|
18
|
+
background: transparent;
|
|
19
|
+
color: var(--k-text-tertiary);
|
|
20
|
+
font: inherit;
|
|
21
|
+
font-size: var(--k-text-3xl);
|
|
22
|
+
font-weight: var(--k-weight-semibold);
|
|
23
|
+
font-variant-numeric: tabular-nums;
|
|
24
|
+
line-height: 1.1;
|
|
25
|
+
cursor: pointer;
|
|
26
|
+
}
|
|
27
|
+
.k-clock__unit:hover { background: var(--k-bg-hover); color: var(--k-text-secondary); }
|
|
28
|
+
.k-clock__unit[aria-pressed="true"] { background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
|
|
29
|
+
.k-clock__unit:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
30
|
+
.k-clock__sep { color: var(--k-text-tertiary); font-size: var(--k-text-3xl); font-weight: var(--k-weight-semibold); line-height: 1; }
|
|
31
|
+
|
|
32
|
+
.k-clock__dial {
|
|
33
|
+
--_num: 2.25rem;
|
|
34
|
+
|
|
35
|
+
position: relative;
|
|
36
|
+
inline-size: var(--k-clock-size, 16rem);
|
|
37
|
+
max-inline-size: 100%;
|
|
38
|
+
aspect-ratio: 1;
|
|
39
|
+
border-radius: var(--k-radius-full);
|
|
40
|
+
background: var(--k-clock-bg, var(--k-bg-secondary));
|
|
41
|
+
touch-action: none;
|
|
42
|
+
user-select: none;
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
}
|
|
45
|
+
.k-clock__dial:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
46
|
+
|
|
47
|
+
.k-clock__center {
|
|
48
|
+
position: absolute;
|
|
49
|
+
inset: 50% auto auto 50%;
|
|
50
|
+
inline-size: 0.5rem;
|
|
51
|
+
block-size: 0.5rem;
|
|
52
|
+
border-radius: var(--k-radius-full);
|
|
53
|
+
background: var(--k-bg-brand);
|
|
54
|
+
translate: -50% -50%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/* عقربه از مرکز تا عدد انتخابشده؛ دایرهٔ سرش زیر همان عدد مینشیند */
|
|
58
|
+
.k-clock__hand {
|
|
59
|
+
position: absolute;
|
|
60
|
+
left: 50%;
|
|
61
|
+
bottom: 50%;
|
|
62
|
+
inline-size: 2px;
|
|
63
|
+
margin-inline-start: -1px;
|
|
64
|
+
background: var(--k-bg-brand);
|
|
65
|
+
transform-origin: 50% 100%;
|
|
66
|
+
transition: rotate var(--k-duration-fast) var(--k-ease-standard), height var(--k-duration-fast) var(--k-ease-standard);
|
|
67
|
+
}
|
|
68
|
+
.k-clock__hand::after {
|
|
69
|
+
content: "";
|
|
70
|
+
position: absolute;
|
|
71
|
+
top: 0;
|
|
72
|
+
left: 50%;
|
|
73
|
+
inline-size: var(--_num);
|
|
74
|
+
block-size: var(--_num);
|
|
75
|
+
border-radius: var(--k-radius-full);
|
|
76
|
+
background: var(--k-bg-brand);
|
|
77
|
+
translate: -50% -50%;
|
|
78
|
+
}
|
|
79
|
+
/* دقیقهای که عدد ندارد (مثل ۰۷): نقطهٔ کوچک وسط دایره */
|
|
80
|
+
.k-clock__hand[data-free]::after { background: radial-gradient(circle, var(--k-text-on-brand) 0 3px, var(--k-bg-brand) 3.5px); }
|
|
81
|
+
|
|
82
|
+
.k-clock__num {
|
|
83
|
+
position: absolute;
|
|
84
|
+
z-index: 1;
|
|
85
|
+
display: grid;
|
|
86
|
+
place-items: center;
|
|
87
|
+
inline-size: var(--_num);
|
|
88
|
+
block-size: var(--_num);
|
|
89
|
+
border-radius: var(--k-radius-full);
|
|
90
|
+
color: var(--k-text-primary);
|
|
91
|
+
font-size: var(--k-text-md);
|
|
92
|
+
font-weight: var(--k-weight-medium);
|
|
93
|
+
font-variant-numeric: tabular-nums;
|
|
94
|
+
translate: -50% -50%;
|
|
95
|
+
pointer-events: none;
|
|
96
|
+
}
|
|
97
|
+
.k-clock__num[data-ring="outer"] { color: var(--k-text-secondary); }
|
|
98
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="outer"] { font-size: var(--k-text-sm); }
|
|
99
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="inner"] { color: var(--k-text-primary); }
|
|
100
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
|
|
101
|
+
.k-clock__num[data-disabled] { color: var(--k-text-quaternary); text-decoration: line-through; }
|
|
102
|
+
|
|
103
|
+
/* انتخاب ساعت: همان فیلد و پنل شناور دیتپیکر، با پانویس «اکنون» و «تأیید» */
|
|
104
|
+
/* فیلد ساعت باریک است؛ پنل از لبهٔ شروع فیلد باز میشود تا از صفحه بیرون نزند */
|
|
105
|
+
.k-timepicker__popover { inset-inline: 0 auto; display: grid; gap: var(--k-space-3); }
|
|
106
|
+
.k-timepicker__footer {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: space-between;
|
|
110
|
+
gap: var(--k-space-2);
|
|
111
|
+
padding-block-start: var(--k-space-3);
|
|
112
|
+
border-block-start: 1px solid var(--k-border-secondary);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
@media (prefers-reduced-motion: reduce) {
|
|
116
|
+
.k-clock__hand { transition: none; }
|
|
117
|
+
}
|
|
118
|
+
@media (forced-colors: active) {
|
|
119
|
+
.k-clock__dial { border: 1px solid CanvasText; }
|
|
120
|
+
.k-clock__hand, .k-clock__hand::after, .k-clock__center { forced-color-adjust: none; background: Highlight; }
|
|
121
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { forced-color-adjust: none; color: HighlightText; }
|
|
122
|
+
.k-clock__unit[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
123
|
+
}
|
package/dist/font.css
CHANGED
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
/* فونت
|
|
1
|
+
/* فونت کاشی (Variable، وزن ۱۰۰ تا ۹۰۰، پهنای معمولی) — فونت پیشفرض کاشی؛ لایسنس OFL (fonts/Kashi-OFL.txt)
|
|
2
|
+
پهنای کشیده، نسخهٔ FaNum و NoEn در پکیج @kashi-ui/font است */
|
|
3
|
+
@font-face {
|
|
4
|
+
font-family: "Kashi";
|
|
5
|
+
src: url("./fonts/Kashi.woff2") format("woff2-variations"),
|
|
6
|
+
url("./fonts/Kashi.woff2") format("woff2");
|
|
7
|
+
font-weight: 100 900;
|
|
8
|
+
font-stretch: 100%;
|
|
9
|
+
font-style: normal;
|
|
10
|
+
font-display: swap;
|
|
11
|
+
}
|
|
12
|
+
/* وزیرمتن، فونت پیشفرض نسخههای قبلی؛ برای پروژههایی که نامش را مستقیم به کار بردهاند.
|
|
13
|
+
مرورگر فقط وقتی دانلودش میکند که واقعاً جایی استفاده شود. لایسنس OFL (fonts/Vazirmatn-OFL.txt) */
|
|
2
14
|
@font-face {
|
|
3
15
|
font-family: "Vazirmatn";
|
|
4
16
|
src: url("./fonts/Vazirmatn.woff2") format("woff2-variations"),
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
Copyright 2026 The Kashi Project Authors (https://github.com/Sepantapouya/Kashi), Copyright 2015 The Vazirmatn Project Authors (https://github.com/rastikerdar/vazirmatn), Copyright 2026 The Dastkhat Project Authors (https://github.com/dastyar-io/dastkhat-font)
|
|
2
|
+
|
|
3
|
+
This Font Software is licensed under the SIL Open Font License, Version 1.1.
|
|
4
|
+
This license is copied below, and is also available with a FAQ at:
|
|
5
|
+
https://openfontlicense.org
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
-----------------------------------------------------------
|
|
9
|
+
SIL OPEN FONT LICENSE Version 1.1 - 26 February 2007
|
|
10
|
+
-----------------------------------------------------------
|
|
11
|
+
|
|
12
|
+
PREAMBLE
|
|
13
|
+
The goals of the Open Font License (OFL) are to stimulate worldwide
|
|
14
|
+
development of collaborative font projects, to support the font creation
|
|
15
|
+
efforts of academic and linguistic communities, and to provide a free and
|
|
16
|
+
open framework in which fonts may be shared and improved in partnership
|
|
17
|
+
with others.
|
|
18
|
+
|
|
19
|
+
The OFL allows the licensed fonts to be used, studied, modified and
|
|
20
|
+
redistributed freely as long as they are not sold by themselves. The
|
|
21
|
+
fonts, including any derivative works, can be bundled, embedded,
|
|
22
|
+
redistributed and/or sold with any software provided that any reserved
|
|
23
|
+
names are not used by derivative works. The fonts and derivatives,
|
|
24
|
+
however, cannot be released under any other type of license. The
|
|
25
|
+
requirement for fonts to remain under this license does not apply
|
|
26
|
+
to any document created using the fonts or their derivatives.
|
|
27
|
+
|
|
28
|
+
DEFINITIONS
|
|
29
|
+
"Font Software" refers to the set of files released by the Copyright
|
|
30
|
+
Holder(s) under this license and clearly marked as such. This may
|
|
31
|
+
include source files, build scripts and documentation.
|
|
32
|
+
|
|
33
|
+
"Reserved Font Name" refers to any names specified as such after the
|
|
34
|
+
copyright statement(s).
|
|
35
|
+
|
|
36
|
+
"Original Version" refers to the collection of Font Software components as
|
|
37
|
+
distributed by the Copyright Holder(s).
|
|
38
|
+
|
|
39
|
+
"Modified Version" refers to any derivative made by adding to, deleting,
|
|
40
|
+
or substituting -- in part or in whole -- any of the components of the
|
|
41
|
+
Original Version, by changing formats or by porting the Font Software to a
|
|
42
|
+
new environment.
|
|
43
|
+
|
|
44
|
+
"Author" refers to any designer, engineer, programmer, technical
|
|
45
|
+
writer or other person who contributed to the Font Software.
|
|
46
|
+
|
|
47
|
+
PERMISSION & CONDITIONS
|
|
48
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
49
|
+
a copy of the Font Software, to use, study, copy, merge, embed, modify,
|
|
50
|
+
redistribute, and sell modified and unmodified copies of the Font
|
|
51
|
+
Software, subject to the following conditions:
|
|
52
|
+
|
|
53
|
+
1) Neither the Font Software nor any of its individual components,
|
|
54
|
+
in Original or Modified Versions, may be sold by itself.
|
|
55
|
+
|
|
56
|
+
2) Original or Modified Versions of the Font Software may be bundled,
|
|
57
|
+
redistributed and/or sold with any software, provided that each copy
|
|
58
|
+
contains the above copyright notice and this license. These can be
|
|
59
|
+
included either as stand-alone text files, human-readable headers or
|
|
60
|
+
in the appropriate machine-readable metadata fields within text or
|
|
61
|
+
binary files as long as those fields can be easily viewed by the user.
|
|
62
|
+
|
|
63
|
+
3) No Modified Version of the Font Software may use the Reserved Font
|
|
64
|
+
Name(s) unless explicit written permission is granted by the corresponding
|
|
65
|
+
Copyright Holder. This restriction only applies to the primary font name as
|
|
66
|
+
presented to the users.
|
|
67
|
+
|
|
68
|
+
4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
|
|
69
|
+
Software shall not be used to promote, endorse or advertise any
|
|
70
|
+
Modified Version, except to acknowledge the contribution(s) of the
|
|
71
|
+
Copyright Holder(s) and the Author(s) or with their explicit written
|
|
72
|
+
permission.
|
|
73
|
+
|
|
74
|
+
5) The Font Software, modified or unmodified, in part or in whole,
|
|
75
|
+
must be distributed entirely under this license, and must not be
|
|
76
|
+
distributed under any other license. The requirement for fonts to
|
|
77
|
+
remain under this license does not apply to any document created
|
|
78
|
+
using the Font Software.
|
|
79
|
+
|
|
80
|
+
TERMINATION
|
|
81
|
+
This license becomes null and void if any of the above conditions are
|
|
82
|
+
not met.
|
|
83
|
+
|
|
84
|
+
DISCLAIMER
|
|
85
|
+
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
86
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
|
|
87
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
|
|
88
|
+
OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
|
|
89
|
+
COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
90
|
+
INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
|
|
91
|
+
DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
92
|
+
FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
|
|
93
|
+
OTHER DEALINGS IN THE FONT SOFTWARE.
|
|
Binary file
|
package/dist/kashi.css
CHANGED
|
@@ -1,6 +1,18 @@
|
|
|
1
1
|
@layer kashi.tokens, kashi.base, kashi.components;
|
|
2
2
|
|
|
3
|
-
/* فونت
|
|
3
|
+
/* فونت کاشی (Variable، وزن ۱۰۰ تا ۹۰۰، پهنای معمولی) — فونت پیشفرض کاشی؛ لایسنس OFL (fonts/Kashi-OFL.txt)
|
|
4
|
+
پهنای کشیده، نسخهٔ FaNum و NoEn در پکیج @kashi-ui/font است */
|
|
5
|
+
@font-face {
|
|
6
|
+
font-family: "Kashi";
|
|
7
|
+
src: url("./fonts/Kashi.woff2") format("woff2-variations"),
|
|
8
|
+
url("./fonts/Kashi.woff2") format("woff2");
|
|
9
|
+
font-weight: 100 900;
|
|
10
|
+
font-stretch: 100%;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
font-display: swap;
|
|
13
|
+
}
|
|
14
|
+
/* وزیرمتن، فونت پیشفرض نسخههای قبلی؛ برای پروژههایی که نامش را مستقیم به کار بردهاند.
|
|
15
|
+
مرورگر فقط وقتی دانلودش میکند که واقعاً جایی استفاده شود. لایسنس OFL (fonts/Vazirmatn-OFL.txt) */
|
|
4
16
|
@font-face {
|
|
5
17
|
font-family: "Vazirmatn";
|
|
6
18
|
src: url("./fonts/Vazirmatn.woff2") format("woff2-variations"),
|
|
@@ -124,9 +136,9 @@
|
|
|
124
136
|
--k-radius-full: 9999px;
|
|
125
137
|
--k-radius-control: var(--k-radius-md);
|
|
126
138
|
--k-radius-surface: var(--k-radius-xl);
|
|
127
|
-
--k-font-sans: "
|
|
139
|
+
--k-font-sans: "Kashi", Tahoma, system-ui, sans-serif;
|
|
128
140
|
--k-font-display: var(--k-font-sans);
|
|
129
|
-
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "
|
|
141
|
+
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Kashi", monospace;
|
|
130
142
|
--k-text-xs: calc(0.75rem * var(--k-text-scale));
|
|
131
143
|
--k-text-sm: calc(0.875rem * var(--k-text-scale));
|
|
132
144
|
--k-text-md: calc(0.9375rem * var(--k-text-scale));
|
|
@@ -5628,6 +5640,130 @@ html:has(.k-dialog[open]) { overflow: hidden; }
|
|
|
5628
5640
|
.k-tag-input__control::placeholder { color: var(--k-text-tertiary); }
|
|
5629
5641
|
.k-tag-input .k-badge { font-size: var(--k-text-sm); }
|
|
5630
5642
|
|
|
5643
|
+
/*
|
|
5644
|
+
* صفحهٔ ساعت (TimeClock) و انتخاب ساعت (TimePicker)
|
|
5645
|
+
* متغیرها: --k-clock-size --k-clock-bg
|
|
5646
|
+
*/
|
|
5647
|
+
.k-clock {
|
|
5648
|
+
display: grid;
|
|
5649
|
+
justify-items: center;
|
|
5650
|
+
gap: var(--k-space-3);
|
|
5651
|
+
color: var(--k-text-primary);
|
|
5652
|
+
}
|
|
5653
|
+
|
|
5654
|
+
.k-clock__header { display: flex; align-items: center; gap: var(--k-space-1); }
|
|
5655
|
+
.k-clock__unit {
|
|
5656
|
+
min-inline-size: 3.5rem;
|
|
5657
|
+
padding: var(--k-space-1) var(--k-space-2);
|
|
5658
|
+
border: 0;
|
|
5659
|
+
border-radius: var(--k-radius-md);
|
|
5660
|
+
background: transparent;
|
|
5661
|
+
color: var(--k-text-tertiary);
|
|
5662
|
+
font: inherit;
|
|
5663
|
+
font-size: var(--k-text-3xl);
|
|
5664
|
+
font-weight: var(--k-weight-semibold);
|
|
5665
|
+
font-variant-numeric: tabular-nums;
|
|
5666
|
+
line-height: 1.1;
|
|
5667
|
+
cursor: pointer;
|
|
5668
|
+
}
|
|
5669
|
+
.k-clock__unit:hover { background: var(--k-bg-hover); color: var(--k-text-secondary); }
|
|
5670
|
+
.k-clock__unit[aria-pressed="true"] { background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
|
|
5671
|
+
.k-clock__unit:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
5672
|
+
.k-clock__sep { color: var(--k-text-tertiary); font-size: var(--k-text-3xl); font-weight: var(--k-weight-semibold); line-height: 1; }
|
|
5673
|
+
|
|
5674
|
+
.k-clock__dial {
|
|
5675
|
+
--_num: 2.25rem;
|
|
5676
|
+
|
|
5677
|
+
position: relative;
|
|
5678
|
+
inline-size: var(--k-clock-size, 16rem);
|
|
5679
|
+
max-inline-size: 100%;
|
|
5680
|
+
aspect-ratio: 1;
|
|
5681
|
+
border-radius: var(--k-radius-full);
|
|
5682
|
+
background: var(--k-clock-bg, var(--k-bg-secondary));
|
|
5683
|
+
touch-action: none;
|
|
5684
|
+
user-select: none;
|
|
5685
|
+
cursor: pointer;
|
|
5686
|
+
}
|
|
5687
|
+
.k-clock__dial:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
5688
|
+
|
|
5689
|
+
.k-clock__center {
|
|
5690
|
+
position: absolute;
|
|
5691
|
+
inset: 50% auto auto 50%;
|
|
5692
|
+
inline-size: 0.5rem;
|
|
5693
|
+
block-size: 0.5rem;
|
|
5694
|
+
border-radius: var(--k-radius-full);
|
|
5695
|
+
background: var(--k-bg-brand);
|
|
5696
|
+
translate: -50% -50%;
|
|
5697
|
+
}
|
|
5698
|
+
|
|
5699
|
+
/* عقربه از مرکز تا عدد انتخابشده؛ دایرهٔ سرش زیر همان عدد مینشیند */
|
|
5700
|
+
.k-clock__hand {
|
|
5701
|
+
position: absolute;
|
|
5702
|
+
left: 50%;
|
|
5703
|
+
bottom: 50%;
|
|
5704
|
+
inline-size: 2px;
|
|
5705
|
+
margin-inline-start: -1px;
|
|
5706
|
+
background: var(--k-bg-brand);
|
|
5707
|
+
transform-origin: 50% 100%;
|
|
5708
|
+
transition: rotate var(--k-duration-fast) var(--k-ease-standard), height var(--k-duration-fast) var(--k-ease-standard);
|
|
5709
|
+
}
|
|
5710
|
+
.k-clock__hand::after {
|
|
5711
|
+
content: "";
|
|
5712
|
+
position: absolute;
|
|
5713
|
+
top: 0;
|
|
5714
|
+
left: 50%;
|
|
5715
|
+
inline-size: var(--_num);
|
|
5716
|
+
block-size: var(--_num);
|
|
5717
|
+
border-radius: var(--k-radius-full);
|
|
5718
|
+
background: var(--k-bg-brand);
|
|
5719
|
+
translate: -50% -50%;
|
|
5720
|
+
}
|
|
5721
|
+
/* دقیقهای که عدد ندارد (مثل ۰۷): نقطهٔ کوچک وسط دایره */
|
|
5722
|
+
.k-clock__hand[data-free]::after { background: radial-gradient(circle, var(--k-text-on-brand) 0 3px, var(--k-bg-brand) 3.5px); }
|
|
5723
|
+
|
|
5724
|
+
.k-clock__num {
|
|
5725
|
+
position: absolute;
|
|
5726
|
+
z-index: 1;
|
|
5727
|
+
display: grid;
|
|
5728
|
+
place-items: center;
|
|
5729
|
+
inline-size: var(--_num);
|
|
5730
|
+
block-size: var(--_num);
|
|
5731
|
+
border-radius: var(--k-radius-full);
|
|
5732
|
+
color: var(--k-text-primary);
|
|
5733
|
+
font-size: var(--k-text-md);
|
|
5734
|
+
font-weight: var(--k-weight-medium);
|
|
5735
|
+
font-variant-numeric: tabular-nums;
|
|
5736
|
+
translate: -50% -50%;
|
|
5737
|
+
pointer-events: none;
|
|
5738
|
+
}
|
|
5739
|
+
.k-clock__num[data-ring="outer"] { color: var(--k-text-secondary); }
|
|
5740
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="outer"] { font-size: var(--k-text-sm); }
|
|
5741
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="inner"] { color: var(--k-text-primary); }
|
|
5742
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
|
|
5743
|
+
.k-clock__num[data-disabled] { color: var(--k-text-quaternary); text-decoration: line-through; }
|
|
5744
|
+
|
|
5745
|
+
/* انتخاب ساعت: همان فیلد و پنل شناور دیتپیکر، با پانویس «اکنون» و «تأیید» */
|
|
5746
|
+
/* فیلد ساعت باریک است؛ پنل از لبهٔ شروع فیلد باز میشود تا از صفحه بیرون نزند */
|
|
5747
|
+
.k-timepicker__popover { inset-inline: 0 auto; display: grid; gap: var(--k-space-3); }
|
|
5748
|
+
.k-timepicker__footer {
|
|
5749
|
+
display: flex;
|
|
5750
|
+
align-items: center;
|
|
5751
|
+
justify-content: space-between;
|
|
5752
|
+
gap: var(--k-space-2);
|
|
5753
|
+
padding-block-start: var(--k-space-3);
|
|
5754
|
+
border-block-start: 1px solid var(--k-border-secondary);
|
|
5755
|
+
}
|
|
5756
|
+
|
|
5757
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5758
|
+
.k-clock__hand { transition: none; }
|
|
5759
|
+
}
|
|
5760
|
+
@media (forced-colors: active) {
|
|
5761
|
+
.k-clock__dial { border: 1px solid CanvasText; }
|
|
5762
|
+
.k-clock__hand, .k-clock__hand::after, .k-clock__center { forced-color-adjust: none; background: Highlight; }
|
|
5763
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { forced-color-adjust: none; color: HighlightText; }
|
|
5764
|
+
.k-clock__unit[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
5765
|
+
}
|
|
5766
|
+
|
|
5631
5767
|
/* خط زمانی و فعالیتها */
|
|
5632
5768
|
.k-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
|
|
5633
5769
|
.k-timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--k-space-3); padding-block-end: var(--k-space-6); }
|
package/dist/kashi.nofont.css
CHANGED
|
@@ -116,9 +116,9 @@
|
|
|
116
116
|
--k-radius-full: 9999px;
|
|
117
117
|
--k-radius-control: var(--k-radius-md);
|
|
118
118
|
--k-radius-surface: var(--k-radius-xl);
|
|
119
|
-
--k-font-sans: "
|
|
119
|
+
--k-font-sans: "Kashi", Tahoma, system-ui, sans-serif;
|
|
120
120
|
--k-font-display: var(--k-font-sans);
|
|
121
|
-
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "
|
|
121
|
+
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Kashi", monospace;
|
|
122
122
|
--k-text-xs: calc(0.75rem * var(--k-text-scale));
|
|
123
123
|
--k-text-sm: calc(0.875rem * var(--k-text-scale));
|
|
124
124
|
--k-text-md: calc(0.9375rem * var(--k-text-scale));
|
|
@@ -5620,6 +5620,130 @@ html:has(.k-dialog[open]) { overflow: hidden; }
|
|
|
5620
5620
|
.k-tag-input__control::placeholder { color: var(--k-text-tertiary); }
|
|
5621
5621
|
.k-tag-input .k-badge { font-size: var(--k-text-sm); }
|
|
5622
5622
|
|
|
5623
|
+
/*
|
|
5624
|
+
* صفحهٔ ساعت (TimeClock) و انتخاب ساعت (TimePicker)
|
|
5625
|
+
* متغیرها: --k-clock-size --k-clock-bg
|
|
5626
|
+
*/
|
|
5627
|
+
.k-clock {
|
|
5628
|
+
display: grid;
|
|
5629
|
+
justify-items: center;
|
|
5630
|
+
gap: var(--k-space-3);
|
|
5631
|
+
color: var(--k-text-primary);
|
|
5632
|
+
}
|
|
5633
|
+
|
|
5634
|
+
.k-clock__header { display: flex; align-items: center; gap: var(--k-space-1); }
|
|
5635
|
+
.k-clock__unit {
|
|
5636
|
+
min-inline-size: 3.5rem;
|
|
5637
|
+
padding: var(--k-space-1) var(--k-space-2);
|
|
5638
|
+
border: 0;
|
|
5639
|
+
border-radius: var(--k-radius-md);
|
|
5640
|
+
background: transparent;
|
|
5641
|
+
color: var(--k-text-tertiary);
|
|
5642
|
+
font: inherit;
|
|
5643
|
+
font-size: var(--k-text-3xl);
|
|
5644
|
+
font-weight: var(--k-weight-semibold);
|
|
5645
|
+
font-variant-numeric: tabular-nums;
|
|
5646
|
+
line-height: 1.1;
|
|
5647
|
+
cursor: pointer;
|
|
5648
|
+
}
|
|
5649
|
+
.k-clock__unit:hover { background: var(--k-bg-hover); color: var(--k-text-secondary); }
|
|
5650
|
+
.k-clock__unit[aria-pressed="true"] { background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
|
|
5651
|
+
.k-clock__unit:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
5652
|
+
.k-clock__sep { color: var(--k-text-tertiary); font-size: var(--k-text-3xl); font-weight: var(--k-weight-semibold); line-height: 1; }
|
|
5653
|
+
|
|
5654
|
+
.k-clock__dial {
|
|
5655
|
+
--_num: 2.25rem;
|
|
5656
|
+
|
|
5657
|
+
position: relative;
|
|
5658
|
+
inline-size: var(--k-clock-size, 16rem);
|
|
5659
|
+
max-inline-size: 100%;
|
|
5660
|
+
aspect-ratio: 1;
|
|
5661
|
+
border-radius: var(--k-radius-full);
|
|
5662
|
+
background: var(--k-clock-bg, var(--k-bg-secondary));
|
|
5663
|
+
touch-action: none;
|
|
5664
|
+
user-select: none;
|
|
5665
|
+
cursor: pointer;
|
|
5666
|
+
}
|
|
5667
|
+
.k-clock__dial:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
|
|
5668
|
+
|
|
5669
|
+
.k-clock__center {
|
|
5670
|
+
position: absolute;
|
|
5671
|
+
inset: 50% auto auto 50%;
|
|
5672
|
+
inline-size: 0.5rem;
|
|
5673
|
+
block-size: 0.5rem;
|
|
5674
|
+
border-radius: var(--k-radius-full);
|
|
5675
|
+
background: var(--k-bg-brand);
|
|
5676
|
+
translate: -50% -50%;
|
|
5677
|
+
}
|
|
5678
|
+
|
|
5679
|
+
/* عقربه از مرکز تا عدد انتخابشده؛ دایرهٔ سرش زیر همان عدد مینشیند */
|
|
5680
|
+
.k-clock__hand {
|
|
5681
|
+
position: absolute;
|
|
5682
|
+
left: 50%;
|
|
5683
|
+
bottom: 50%;
|
|
5684
|
+
inline-size: 2px;
|
|
5685
|
+
margin-inline-start: -1px;
|
|
5686
|
+
background: var(--k-bg-brand);
|
|
5687
|
+
transform-origin: 50% 100%;
|
|
5688
|
+
transition: rotate var(--k-duration-fast) var(--k-ease-standard), height var(--k-duration-fast) var(--k-ease-standard);
|
|
5689
|
+
}
|
|
5690
|
+
.k-clock__hand::after {
|
|
5691
|
+
content: "";
|
|
5692
|
+
position: absolute;
|
|
5693
|
+
top: 0;
|
|
5694
|
+
left: 50%;
|
|
5695
|
+
inline-size: var(--_num);
|
|
5696
|
+
block-size: var(--_num);
|
|
5697
|
+
border-radius: var(--k-radius-full);
|
|
5698
|
+
background: var(--k-bg-brand);
|
|
5699
|
+
translate: -50% -50%;
|
|
5700
|
+
}
|
|
5701
|
+
/* دقیقهای که عدد ندارد (مثل ۰۷): نقطهٔ کوچک وسط دایره */
|
|
5702
|
+
.k-clock__hand[data-free]::after { background: radial-gradient(circle, var(--k-text-on-brand) 0 3px, var(--k-bg-brand) 3.5px); }
|
|
5703
|
+
|
|
5704
|
+
.k-clock__num {
|
|
5705
|
+
position: absolute;
|
|
5706
|
+
z-index: 1;
|
|
5707
|
+
display: grid;
|
|
5708
|
+
place-items: center;
|
|
5709
|
+
inline-size: var(--_num);
|
|
5710
|
+
block-size: var(--_num);
|
|
5711
|
+
border-radius: var(--k-radius-full);
|
|
5712
|
+
color: var(--k-text-primary);
|
|
5713
|
+
font-size: var(--k-text-md);
|
|
5714
|
+
font-weight: var(--k-weight-medium);
|
|
5715
|
+
font-variant-numeric: tabular-nums;
|
|
5716
|
+
translate: -50% -50%;
|
|
5717
|
+
pointer-events: none;
|
|
5718
|
+
}
|
|
5719
|
+
.k-clock__num[data-ring="outer"] { color: var(--k-text-secondary); }
|
|
5720
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="outer"] { font-size: var(--k-text-sm); }
|
|
5721
|
+
.k-clock__dial[data-view="hour"] .k-clock__num[data-ring="inner"] { color: var(--k-text-primary); }
|
|
5722
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
|
|
5723
|
+
.k-clock__num[data-disabled] { color: var(--k-text-quaternary); text-decoration: line-through; }
|
|
5724
|
+
|
|
5725
|
+
/* انتخاب ساعت: همان فیلد و پنل شناور دیتپیکر، با پانویس «اکنون» و «تأیید» */
|
|
5726
|
+
/* فیلد ساعت باریک است؛ پنل از لبهٔ شروع فیلد باز میشود تا از صفحه بیرون نزند */
|
|
5727
|
+
.k-timepicker__popover { inset-inline: 0 auto; display: grid; gap: var(--k-space-3); }
|
|
5728
|
+
.k-timepicker__footer {
|
|
5729
|
+
display: flex;
|
|
5730
|
+
align-items: center;
|
|
5731
|
+
justify-content: space-between;
|
|
5732
|
+
gap: var(--k-space-2);
|
|
5733
|
+
padding-block-start: var(--k-space-3);
|
|
5734
|
+
border-block-start: 1px solid var(--k-border-secondary);
|
|
5735
|
+
}
|
|
5736
|
+
|
|
5737
|
+
@media (prefers-reduced-motion: reduce) {
|
|
5738
|
+
.k-clock__hand { transition: none; }
|
|
5739
|
+
}
|
|
5740
|
+
@media (forced-colors: active) {
|
|
5741
|
+
.k-clock__dial { border: 1px solid CanvasText; }
|
|
5742
|
+
.k-clock__hand, .k-clock__hand::after, .k-clock__center { forced-color-adjust: none; background: Highlight; }
|
|
5743
|
+
.k-clock__dial[data-view] .k-clock__num[data-selected] { forced-color-adjust: none; color: HighlightText; }
|
|
5744
|
+
.k-clock__unit[aria-pressed="true"] { outline: 2px solid Highlight; }
|
|
5745
|
+
}
|
|
5746
|
+
|
|
5623
5747
|
/* خط زمانی و فعالیتها */
|
|
5624
5748
|
.k-timeline { display: grid; margin: 0; padding: 0; list-style: none; }
|
|
5625
5749
|
.k-timeline__item { position: relative; display: grid; grid-template-columns: auto 1fr; gap: var(--k-space-3); padding-block-end: var(--k-space-6); }
|
package/dist/tokens.css
CHANGED
|
@@ -111,9 +111,9 @@
|
|
|
111
111
|
--k-radius-full: 9999px;
|
|
112
112
|
--k-radius-control: var(--k-radius-md);
|
|
113
113
|
--k-radius-surface: var(--k-radius-xl);
|
|
114
|
-
--k-font-sans: "
|
|
114
|
+
--k-font-sans: "Kashi", Tahoma, system-ui, sans-serif;
|
|
115
115
|
--k-font-display: var(--k-font-sans);
|
|
116
|
-
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "
|
|
116
|
+
--k-font-mono: ui-monospace, "SF Mono", Menlo, Consolas, "Kashi", monospace;
|
|
117
117
|
--k-text-xs: calc(0.75rem * var(--k-text-scale));
|
|
118
118
|
--k-text-sm: calc(0.875rem * var(--k-text-scale));
|
|
119
119
|
--k-text-md: calc(0.9375rem * var(--k-text-scale));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kashi-ui/css",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.18.0",
|
|
4
4
|
"description": "استایل کامپوننتهای کاشی با CSS خالص — برای هر فریمورکی",
|
|
5
5
|
"main": "./dist/kashi.css",
|
|
6
6
|
"style": "./dist/kashi.css",
|
|
@@ -21,10 +21,11 @@
|
|
|
21
21
|
"build": "node build.mjs"
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
|
-
"@kashi-ui/tokens": "^2.
|
|
24
|
+
"@kashi-ui/tokens": "^2.18.0"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
|
-
"vazirmatn": "^33.0.3"
|
|
27
|
+
"vazirmatn": "^33.0.3",
|
|
28
|
+
"@kashi-ui/font": "*"
|
|
28
29
|
},
|
|
29
30
|
"license": "MIT",
|
|
30
31
|
"repository": {
|