@kashi-ui/css 0.9.1 → 0.11.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.
@@ -0,0 +1,40 @@
1
+ /* نوار اطلاع‌رسانی بالای صفحه (Banner)
2
+ * <div class="k-banner k-banner--brand" role="region" aria-label="اطلاعیه">…</div>
3
+ * رنگ‌ها: neutral (پیش‌فرض) | brand | warning | error
4
+ */
5
+ .k-banner {
6
+ --_accent: var(--k-text-tertiary);
7
+ --_bg: var(--k-bg-secondary);
8
+ display: flex;
9
+ flex-wrap: wrap;
10
+ align-items: center;
11
+ gap: var(--k-space-2) var(--k-space-4);
12
+ padding: var(--k-space-3) var(--k-space-4);
13
+ border: 1px solid var(--k-border-secondary);
14
+ border-radius: var(--k-banner-radius, var(--k-radius-xl));
15
+ background: var(--_bg);
16
+ box-shadow: var(--k-shadow-xs), var(--k-highlight);
17
+ color: var(--k-text-secondary);
18
+ font-size: var(--k-text-sm);
19
+ }
20
+ .k-banner--flush { border-inline: 0; border-block-start: 0; border-radius: 0; box-shadow: none; }
21
+ .k-banner--brand { --_accent: var(--k-text-brand); --_bg: var(--k-bg-brand-subtle); }
22
+ .k-banner--warning { --_accent: var(--k-text-warning); --_bg: var(--k-bg-warning-subtle); }
23
+ .k-banner--error { --_accent: var(--k-text-error); --_bg: var(--k-bg-error-subtle); }
24
+ .k-banner__icon {
25
+ display: grid;
26
+ place-items: center;
27
+ flex-shrink: 0;
28
+ inline-size: 2rem;
29
+ block-size: 2rem;
30
+ border: 1px solid var(--k-border-primary);
31
+ border-radius: var(--k-radius-md);
32
+ background: var(--k-bg-elevated);
33
+ color: var(--_accent);
34
+ box-shadow: var(--k-shadow-xs);
35
+ }
36
+ .k-banner__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
37
+ .k-banner__text { flex: 1 1 16rem; min-inline-size: 0; margin: 0; }
38
+ .k-banner__text strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
39
+ .k-banner__actions { display: flex; align-items: center; gap: var(--k-space-2); }
40
+ .k-banner__close { margin-inline-start: auto; }
@@ -0,0 +1,11 @@
1
+ /* گروه دکمه‌های چسبیده (Button group)
2
+ * <div class="k-btn-group" role="group" aria-label="قالب‌بندی"><button class="k-btn">…</button>…</div>
3
+ */
4
+ .k-btn-group { display: inline-flex; isolation: isolate; border-radius: var(--k-btn-radius, var(--k-radius-md)); box-shadow: var(--k-shadow-xs); }
5
+ .k-btn-group > .k-btn { border-radius: 0; box-shadow: var(--k-shadow-skeuomorphic); }
6
+ .k-btn-group > .k-btn:not(:first-child) { margin-inline-start: -1px; }
7
+ .k-btn-group > .k-btn:first-child { border-start-start-radius: inherit; border-end-start-radius: inherit; }
8
+ .k-btn-group > .k-btn:last-child { border-start-end-radius: inherit; border-end-end-radius: inherit; }
9
+ .k-btn-group > .k-btn:is(:hover, :focus-visible) { z-index: 1; }
10
+ .k-btn-group > .k-btn:focus-visible { box-shadow: var(--k-shadow-skeuomorphic), var(--k-ring-brand); }
11
+ .k-btn-group > .k-btn[aria-pressed="true"], .k-btn-group > .k-btn[aria-current] { background: var(--k-bg-active); color: var(--k-text-primary); }
@@ -0,0 +1,34 @@
1
+ /* تراشه‌های فیلتر (Chips) — دکمه‌های aria-pressed
2
+ * <div class="k-chips" role="group" aria-label="دسته‌بندی"><button class="k-chip" aria-pressed="true">…</button></div>
3
+ */
4
+ .k-chips { display: flex; flex-wrap: wrap; gap: var(--k-space-2); }
5
+ .k-chip {
6
+ display: inline-flex;
7
+ align-items: center;
8
+ gap: var(--k-space-1_5);
9
+ block-size: 2rem;
10
+ padding-inline: var(--k-space-3);
11
+ border: 1px solid var(--k-border-primary);
12
+ border-radius: var(--k-radius-full);
13
+ background: var(--k-bg-elevated);
14
+ color: var(--k-text-secondary);
15
+ font: inherit;
16
+ font-size: var(--k-text-sm);
17
+ font-weight: var(--k-weight-medium);
18
+ white-space: nowrap;
19
+ cursor: pointer;
20
+ box-shadow: var(--k-shadow-xs);
21
+ transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast), color var(--k-duration-fast);
22
+ }
23
+ .k-chip:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
24
+ .k-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
25
+ .k-chip svg { inline-size: 1rem; block-size: 1rem; }
26
+ .k-chip[aria-pressed="true"] { border-color: var(--k-border-brand); background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
27
+ .k-chip__check { display: none; }
28
+ .k-chip[aria-pressed="true"] .k-chip__check { display: inline-flex; }
29
+ .k-chip__count { min-inline-size: 1.25rem; padding-inline: 0.375rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); color: var(--k-text-tertiary); font-size: var(--k-text-xs); line-height: 1.25rem; text-align: center; }
30
+ .k-chip[aria-pressed="true"] .k-chip__count { background: color-mix(in srgb, var(--k-text-brand) 18%, transparent); color: var(--k-text-brand); }
31
+ .k-chip:disabled { color: var(--k-text-quaternary); cursor: not-allowed; }
32
+ @media (forced-colors: active) {
33
+ .k-chip[aria-pressed="true"] { border-width: 2px; border-color: Highlight; }
34
+ }
@@ -0,0 +1,8 @@
1
+ /* شمارش معکوس */
2
+ .k-countdown { display: inline-flex; align-items: baseline; gap: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
3
+ .k-countdown--blocks { gap: var(--k-space-2); }
4
+ .k-countdown__unit { display: grid; justify-items: center; gap: var(--k-space-1); min-inline-size: 3.25rem; padding: var(--k-space-2) var(--k-space-3); border: 1px solid var(--k-border-secondary); border-radius: var(--k-radius-lg); background: var(--k-bg-elevated); box-shadow: var(--k-shadow-xs), var(--k-highlight); }
5
+ .k-countdown__num { color: var(--k-text-primary); font-size: var(--k-text-2xl); line-height: 1.1; }
6
+ .k-countdown__name { color: var(--k-text-tertiary); font-size: var(--k-text-xs); font-weight: var(--k-weight-medium); }
7
+ .k-countdown__sep { align-self: center; color: var(--k-text-quaternary); }
8
+ .k-countdown[data-done] { color: var(--k-text-tertiary); }
@@ -0,0 +1,24 @@
1
+ /* انتخاب ماه و سال شمسی */
2
+ .k-monthpicker { display: grid; gap: var(--k-space-3); inline-size: var(--k-monthpicker-width, 18rem); }
3
+ .k-monthpicker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-2); }
4
+ .k-monthpicker__year { color: var(--k-text-primary); font-size: var(--k-text-md); font-weight: var(--k-weight-semibold); }
5
+ .k-monthpicker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--k-space-1); }
6
+ .k-monthpicker__month {
7
+ block-size: 2.5rem;
8
+ border: 0;
9
+ border-radius: var(--k-radius-md);
10
+ background: transparent;
11
+ color: var(--k-text-secondary);
12
+ font: inherit;
13
+ font-size: var(--k-text-sm);
14
+ font-weight: var(--k-weight-medium);
15
+ cursor: pointer;
16
+ }
17
+ .k-monthpicker__month:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
18
+ .k-monthpicker__month:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
19
+ .k-monthpicker__month[aria-current="date"] { color: var(--k-text-brand); font-weight: var(--k-weight-bold); }
20
+ .k-monthpicker__month[aria-pressed="true"] { background: var(--k-bg-brand); color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
21
+ .k-monthpicker__month:disabled { color: var(--k-text-quaternary); text-decoration: line-through; cursor: not-allowed; }
22
+ @media (forced-colors: active) {
23
+ .k-monthpicker__month[aria-pressed="true"] { outline: 2px solid Highlight; }
24
+ }
@@ -0,0 +1,18 @@
1
+ /* قدرت رمز عبور: نوار چهارقسمتی + فهرست شرط‌ها */
2
+ .k-strength { display: grid; gap: var(--k-space-2); }
3
+ .k-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--k-space-1); }
4
+ .k-strength__bar { block-size: 0.25rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); transition: background-color var(--k-duration-normal); }
5
+ .k-strength[data-score="1"] .k-strength__bar:nth-child(-n + 1) { background: var(--k-text-error); }
6
+ .k-strength[data-score="2"] .k-strength__bar:nth-child(-n + 2) { background: var(--k-text-warning); }
7
+ .k-strength[data-score="3"] .k-strength__bar:nth-child(-n + 3) { background: var(--k-text-success); }
8
+ .k-strength[data-score="4"] .k-strength__bar { background: var(--k-text-success); }
9
+ .k-strength__label { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
10
+ .k-strength__label strong { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
11
+ .k-strength__rules { display: grid; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; }
12
+ .k-strength__rule { display: flex; align-items: center; gap: var(--k-space-1_5); color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
13
+ .k-strength__rule svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
14
+ .k-strength__rule[data-met] { color: var(--k-text-success); }
15
+ @media (forced-colors: active) {
16
+ .k-strength__bar { border: 1px solid CanvasText; }
17
+ .k-strength[data-score] .k-strength__bar { forced-color-adjust: none; }
18
+ }
@@ -0,0 +1,114 @@
1
+ /* پلاک خودروی ایران — نسبت واقعی ۵۲۰×۱۱۰ میلی‌متر و رنگ بر اساس نوع پلاک
2
+ * ترتیب فیزیکی چپ‌به‌راست: نوار آبی (پرچم و I.R. IRAN) | دو رقم | حرف | سه رقم | «ایران» و کد استان
3
+ * رنگ با data-type: private سفید، taxi/public/agricultural زرد، government قرمز، police سبز، army قهوه‌ای روشن، defense آبی روشن
4
+ */
5
+ .k-plate {
6
+ --_h: var(--k-plate-height, 3.5rem);
7
+ --_bg: #fff;
8
+ --_ink: #111;
9
+ display: inline-grid;
10
+ grid-template-columns: calc(var(--_h) * 0.42) 1fr auto 1.35fr auto;
11
+ /* ارتفاع بخش‌ها دقیقاً هم‌اندازهٔ پلاک؛ وگرنه input بلندتر می‌شود و پایینش بریده و متن بالا می‌رود */
12
+ grid-template-rows: minmax(0, 1fr);
13
+ align-items: stretch;
14
+ box-sizing: border-box;
15
+ justify-self: start;
16
+ /* ۵۲۰ ÷ ۱۱۰ */
17
+ inline-size: calc(var(--_h) * 4.73);
18
+ max-inline-size: 100%;
19
+ block-size: var(--_h);
20
+ direction: ltr;
21
+ border: 2px solid #111;
22
+ border-radius: calc(var(--_h) * 0.12);
23
+ background: var(--_bg);
24
+ color: var(--_ink);
25
+ box-shadow: var(--k-shadow-sm);
26
+ overflow: hidden;
27
+ transition: box-shadow var(--k-duration-fast);
28
+ }
29
+ .k-plate[data-type="taxi"], .k-plate[data-type="public"], .k-plate[data-type="agricultural"] { --_bg: #f7c600; }
30
+ .k-plate[data-type="government"] { --_bg: #c8102e; --_ink: #fff; }
31
+ .k-plate[data-type="police"] { --_bg: #0b5d3b; --_ink: #fff; }
32
+ .k-plate[data-type="army"] { --_bg: #c9a46a; }
33
+ .k-plate[data-type="defense"] { --_bg: #5aa7dc; --_ink: #fff; }
34
+ .k-plate:focus-within { box-shadow: var(--k-shadow-sm), var(--k-ring-brand); }
35
+ .k-plate[data-invalid] { box-shadow: var(--k-shadow-sm), var(--k-ring-error); }
36
+
37
+ .k-plate__flag {
38
+ display: grid;
39
+ grid-template-rows: auto 1fr;
40
+ justify-items: center;
41
+ align-content: start;
42
+ gap: calc(var(--_h) * 0.1);
43
+ padding-block: calc(var(--_h) * 0.1);
44
+ background: #1f4fa8;
45
+ color: #fff;
46
+ font: 700 calc(var(--_h) * 0.13)/1.15 system-ui, sans-serif;
47
+ text-align: center;
48
+ }
49
+ .k-plate__flag-colors {
50
+ inline-size: 70%;
51
+ aspect-ratio: 7 / 4;
52
+ background: linear-gradient(#239f40 0 33.3%, #fff 33.3% 66.6%, #da0000 66.6%);
53
+ }
54
+
55
+ .k-plate__seg {
56
+ box-sizing: border-box;
57
+ min-inline-size: 0;
58
+ inline-size: 100%;
59
+ block-size: 100%;
60
+ min-block-size: 0;
61
+ /* ارقام فارسی وزیرمتن حدود ۰٫۰۹em بالاتر از وسط جعبهٔ فونت‌اند (اندازه‌گیری با measureText) */
62
+ padding: 0.18em 0 0;
63
+ border: 0;
64
+ outline: 0;
65
+ background: transparent;
66
+ color: inherit;
67
+ font: inherit;
68
+ font-size: calc(var(--_h) * 0.62);
69
+ font-weight: var(--k-weight-bold);
70
+ line-height: 1;
71
+ text-align: center;
72
+ }
73
+ .k-plate__seg::placeholder { color: currentColor; opacity: 0.25; }
74
+ .k-plate__letter {
75
+ appearance: none;
76
+ box-sizing: border-box;
77
+ block-size: 100%;
78
+ min-block-size: 0;
79
+ /* حرف‌ها برعکسِ ارقام کمی پایین‌تر از وسط‌اند */
80
+ padding: 0 calc(var(--_h) * 0.08) 0.16em;
81
+ border: 0;
82
+ outline: 0;
83
+ background: transparent;
84
+ color: inherit;
85
+ font: inherit;
86
+ font-size: calc(var(--_h) * 0.5);
87
+ font-weight: var(--k-weight-bold);
88
+ text-align: center;
89
+ text-align-last: center;
90
+ cursor: pointer;
91
+ }
92
+ .k-plate__letter option { color: #111; background: #fff; }
93
+ .k-plate__seg:focus-visible, .k-plate__letter:focus-visible { background: rgb(0 0 0 / 0.07); }
94
+ .k-plate[data-type="government"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
95
+ .k-plate[data-type="police"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
96
+ .k-plate[data-type="defense"] :is(.k-plate__seg, .k-plate__letter):focus-visible { background: rgb(255 255 255 / 0.15); }
97
+
98
+ /* بخش استان: «ایران» بالا، دو رقم پایین، جدا با خط عمودی */
99
+ .k-plate__region {
100
+ display: grid;
101
+ grid-template-rows: auto minmax(0, 1fr);
102
+ align-items: center;
103
+ justify-items: center;
104
+ box-sizing: border-box;
105
+ inline-size: calc(var(--_h) * 0.95);
106
+ min-block-size: 0;
107
+ padding-block: calc(var(--_h) * 0.06) calc(var(--_h) * 0.04);
108
+ border-inline-start: 2px solid currentColor;
109
+ }
110
+ .k-plate__region-label { font-size: calc(var(--_h) * 0.2); font-weight: var(--k-weight-bold); line-height: 1; }
111
+ .k-plate__region .k-plate__seg { font-size: calc(var(--_h) * 0.48); padding-block-start: 0.1em; }
112
+ @media (forced-colors: active) {
113
+ .k-plate { border-color: CanvasText; }
114
+ }
@@ -0,0 +1,17 @@
1
+ /* امتیاز ستاره‌ای (Rating) — روی رادیوهای بومی؛ نسخهٔ فقط‌خواندنی با role="img" */
2
+ .k-rating { --_s: var(--k-rating-size, 1.5rem); display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 0; border: 0; }
3
+ .k-rating--sm { --_s: var(--k-rating-size, 1.125rem); }
4
+ .k-rating--lg { --_s: var(--k-rating-size, 2rem); }
5
+ .k-rating__star { position: relative; display: inline-grid; place-items: center; inline-size: var(--_s); block-size: var(--_s); border-radius: var(--k-radius-sm); color: var(--k-border-primary); cursor: pointer; transition: color var(--k-duration-fast), scale var(--k-duration-fast) var(--k-ease-emphasized); }
6
+ .k-rating__star svg { inline-size: 100%; block-size: 100%; }
7
+ .k-rating__star[data-filled] { color: var(--k-rating-color, var(--k-zafaran-400)); }
8
+ .k-rating__star[data-half] svg .k-rating__half { fill: var(--k-rating-color, var(--k-zafaran-400)); }
9
+ .k-rating__star:hover { scale: 1.12; }
10
+ .k-rating__star:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
11
+ .k-rating[data-readonly] .k-rating__star { cursor: default; }
12
+ .k-rating[data-readonly] .k-rating__star:hover { scale: none; }
13
+ .k-rating__value { margin-inline-start: var(--k-space-2); color: var(--k-text-secondary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
14
+ .k-rating:has(:disabled) .k-rating__star { cursor: not-allowed; opacity: 0.6; }
15
+ @media (forced-colors: active) {
16
+ .k-rating__star[data-filled] { color: Highlight; }
17
+ }
@@ -0,0 +1,48 @@
1
+ /* کنترل تکه‌ای (Segmented control) — روی رادیوهای بومی
2
+ * <div class="k-segmented" role="radiogroup" aria-label="نمایش">
3
+ * <label class="k-segmented__item"><input type="radio" name="v" class="k-sr-only" checked>فهرست</label>
4
+ * …
5
+ * </div>
6
+ * اندازه‌ها: k-segmented--sm | k-segmented--block (تمام‌عرض)
7
+ */
8
+ .k-segmented {
9
+ --_h: calc(2.5rem * var(--k-density));
10
+ display: inline-flex;
11
+ gap: 2px;
12
+ padding: 3px;
13
+ border: 1px solid var(--k-border-secondary);
14
+ border-radius: var(--k-radius-lg);
15
+ background: var(--k-bg-secondary);
16
+ }
17
+ .k-segmented--sm { --_h: calc(2.25rem * var(--k-density)); }
18
+ .k-segmented--block { display: flex; }
19
+ .k-segmented--block .k-segmented__item { flex: 1; }
20
+ .k-segmented__item {
21
+ position: relative;
22
+ display: inline-flex;
23
+ align-items: center;
24
+ justify-content: center;
25
+ gap: var(--k-space-1_5);
26
+ block-size: calc(var(--_h) - 8px);
27
+ padding-inline: var(--k-space-3);
28
+ border-radius: calc(var(--k-radius-lg) - 3px);
29
+ color: var(--k-text-tertiary);
30
+ font-size: var(--k-text-sm);
31
+ font-weight: var(--k-weight-semibold);
32
+ white-space: nowrap;
33
+ cursor: pointer;
34
+ user-select: none;
35
+ transition: background-color var(--k-duration-fast), color var(--k-duration-fast), box-shadow var(--k-duration-fast);
36
+ }
37
+ .k-segmented__item svg { inline-size: 1.125rem; block-size: 1.125rem; }
38
+ .k-segmented__item:hover { color: var(--k-text-primary); }
39
+ .k-segmented__item:has(:checked) {
40
+ background: var(--k-bg-elevated);
41
+ color: var(--k-text-primary);
42
+ box-shadow: var(--k-shadow-sm), inset 0 0 0 1px var(--k-border-secondary), var(--k-highlight);
43
+ }
44
+ .k-segmented__item:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
45
+ .k-segmented__item:has(:disabled) { color: var(--k-text-quaternary); cursor: not-allowed; }
46
+ @media (forced-colors: active) {
47
+ .k-segmented__item:has(:checked) { outline: 2px solid Highlight; }
48
+ }
@@ -0,0 +1,38 @@
1
+ /* درخت (Tree view) — الگوی Tree در WAI-ARIA
2
+ * <ul role="tree" class="k-tree"><li role="treeitem" aria-expanded="true" class="k-tree__item">…<ul role="group">…</ul></li></ul>
3
+ */
4
+ .k-tree, .k-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
5
+ .k-tree [role="group"] { padding-inline-start: var(--k-tree-indent, 1.25rem); }
6
+ .k-tree__item { outline: 0; }
7
+ .k-tree__row {
8
+ display: flex;
9
+ align-items: center;
10
+ gap: var(--k-space-1_5);
11
+ min-block-size: var(--k-tree-row-height, 2.25rem);
12
+ padding-inline: var(--k-space-2);
13
+ border-radius: var(--k-radius-md);
14
+ color: var(--k-text-secondary);
15
+ font-size: var(--k-text-sm);
16
+ font-weight: var(--k-weight-medium);
17
+ cursor: pointer;
18
+ user-select: none;
19
+ }
20
+ .k-tree__row:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
21
+ .k-tree__item:focus-visible > .k-tree__row { box-shadow: var(--k-ring-brand); }
22
+ .k-tree__item[aria-selected="true"] > .k-tree__row { background: var(--k-bg-active); color: var(--k-text-primary); }
23
+ .k-tree__item[aria-selected="true"] > .k-tree__row .k-tree__icon { color: var(--k-text-brand); }
24
+ .k-tree__toggle { display: grid; place-items: center; flex-shrink: 0; inline-size: 1.25rem; block-size: 1.25rem; color: var(--k-text-tertiary); transition: rotate var(--k-duration-fast); }
25
+ /* فلش «بسته» در RTL به چپ اشاره می‌کند */
26
+ .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
27
+ [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
28
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
29
+ [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
30
+ .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
31
+ .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
32
+ .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
33
+ .k-tree__label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
34
+ .k-tree__meta { color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
35
+ .k-tree__item[aria-disabled="true"] > .k-tree__row { color: var(--k-text-quaternary); cursor: not-allowed; }
36
+ @media (forced-colors: active) {
37
+ .k-tree__item[aria-selected="true"] > .k-tree__row { outline: 2px solid Highlight; }
38
+ }
package/dist/kashi.css CHANGED
@@ -661,6 +661,47 @@
661
661
  .k-badge { border-color: CanvasText; }
662
662
  }
663
663
 
664
+ /* نوار اطلاع‌رسانی بالای صفحه (Banner)
665
+ * <div class="k-banner k-banner--brand" role="region" aria-label="اطلاعیه">…</div>
666
+ * رنگ‌ها: neutral (پیش‌فرض) | brand | warning | error
667
+ */
668
+ .k-banner {
669
+ --_accent: var(--k-text-tertiary);
670
+ --_bg: var(--k-bg-secondary);
671
+ display: flex;
672
+ flex-wrap: wrap;
673
+ align-items: center;
674
+ gap: var(--k-space-2) var(--k-space-4);
675
+ padding: var(--k-space-3) var(--k-space-4);
676
+ border: 1px solid var(--k-border-secondary);
677
+ border-radius: var(--k-banner-radius, var(--k-radius-xl));
678
+ background: var(--_bg);
679
+ box-shadow: var(--k-shadow-xs), var(--k-highlight);
680
+ color: var(--k-text-secondary);
681
+ font-size: var(--k-text-sm);
682
+ }
683
+ .k-banner--flush { border-inline: 0; border-block-start: 0; border-radius: 0; box-shadow: none; }
684
+ .k-banner--brand { --_accent: var(--k-text-brand); --_bg: var(--k-bg-brand-subtle); }
685
+ .k-banner--warning { --_accent: var(--k-text-warning); --_bg: var(--k-bg-warning-subtle); }
686
+ .k-banner--error { --_accent: var(--k-text-error); --_bg: var(--k-bg-error-subtle); }
687
+ .k-banner__icon {
688
+ display: grid;
689
+ place-items: center;
690
+ flex-shrink: 0;
691
+ inline-size: 2rem;
692
+ block-size: 2rem;
693
+ border: 1px solid var(--k-border-primary);
694
+ border-radius: var(--k-radius-md);
695
+ background: var(--k-bg-elevated);
696
+ color: var(--_accent);
697
+ box-shadow: var(--k-shadow-xs);
698
+ }
699
+ .k-banner__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
700
+ .k-banner__text { flex: 1 1 16rem; min-inline-size: 0; margin: 0; }
701
+ .k-banner__text strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
702
+ .k-banner__actions { display: flex; align-items: center; gap: var(--k-space-2); }
703
+ .k-banner__close { margin-inline-start: auto; }
704
+
664
705
  /* مسیر صفحه (Breadcrumb)
665
706
  * <nav class="k-breadcrumb" aria-label="مسیر"><ol>
666
707
  * <li><a class="k-breadcrumb__link" href="/">خانه</a></li>
@@ -740,6 +781,18 @@ a.k-breadcrumb__link:hover, button.k-breadcrumb__link:hover { background: var(--
740
781
  .k-breadcrumb__link[aria-current="page"] { outline: 1px solid CanvasText; }
741
782
  }
742
783
 
784
+ /* گروه دکمه‌های چسبیده (Button group)
785
+ * <div class="k-btn-group" role="group" aria-label="قالب‌بندی"><button class="k-btn">…</button>…</div>
786
+ */
787
+ .k-btn-group { display: inline-flex; isolation: isolate; border-radius: var(--k-btn-radius, var(--k-radius-md)); box-shadow: var(--k-shadow-xs); }
788
+ .k-btn-group > .k-btn { border-radius: 0; box-shadow: var(--k-shadow-skeuomorphic); }
789
+ .k-btn-group > .k-btn:not(:first-child) { margin-inline-start: -1px; }
790
+ .k-btn-group > .k-btn:first-child { border-start-start-radius: inherit; border-end-start-radius: inherit; }
791
+ .k-btn-group > .k-btn:last-child { border-start-end-radius: inherit; border-end-end-radius: inherit; }
792
+ .k-btn-group > .k-btn:is(:hover, :focus-visible) { z-index: 1; }
793
+ .k-btn-group > .k-btn:focus-visible { box-shadow: var(--k-shadow-skeuomorphic), var(--k-ring-brand); }
794
+ .k-btn-group > .k-btn[aria-pressed="true"], .k-btn-group > .k-btn[aria-current] { background: var(--k-bg-active); color: var(--k-text-primary); }
795
+
743
796
  /* دکمه — به سبک Untitled UI: سایهٔ اسکئومورفیک و حلقهٔ فوکوس نرم
744
797
  * <button class="k-btn k-btn--primary k-btn--md">ثبت</button>
745
798
  * گونه‌ها: primary | secondary | tertiary | link | danger | danger-secondary
@@ -1306,6 +1359,41 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1306
1359
  .k-checkbox::before { display: none; }
1307
1360
  }
1308
1361
 
1362
+ /* تراشه‌های فیلتر (Chips) — دکمه‌های aria-pressed
1363
+ * <div class="k-chips" role="group" aria-label="دسته‌بندی"><button class="k-chip" aria-pressed="true">…</button></div>
1364
+ */
1365
+ .k-chips { display: flex; flex-wrap: wrap; gap: var(--k-space-2); }
1366
+ .k-chip {
1367
+ display: inline-flex;
1368
+ align-items: center;
1369
+ gap: var(--k-space-1_5);
1370
+ block-size: 2rem;
1371
+ padding-inline: var(--k-space-3);
1372
+ border: 1px solid var(--k-border-primary);
1373
+ border-radius: var(--k-radius-full);
1374
+ background: var(--k-bg-elevated);
1375
+ color: var(--k-text-secondary);
1376
+ font: inherit;
1377
+ font-size: var(--k-text-sm);
1378
+ font-weight: var(--k-weight-medium);
1379
+ white-space: nowrap;
1380
+ cursor: pointer;
1381
+ box-shadow: var(--k-shadow-xs);
1382
+ transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast), color var(--k-duration-fast);
1383
+ }
1384
+ .k-chip:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1385
+ .k-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1386
+ .k-chip svg { inline-size: 1rem; block-size: 1rem; }
1387
+ .k-chip[aria-pressed="true"] { border-color: var(--k-border-brand); background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
1388
+ .k-chip__check { display: none; }
1389
+ .k-chip[aria-pressed="true"] .k-chip__check { display: inline-flex; }
1390
+ .k-chip__count { min-inline-size: 1.25rem; padding-inline: 0.375rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); color: var(--k-text-tertiary); font-size: var(--k-text-xs); line-height: 1.25rem; text-align: center; }
1391
+ .k-chip[aria-pressed="true"] .k-chip__count { background: color-mix(in srgb, var(--k-text-brand) 18%, transparent); color: var(--k-text-brand); }
1392
+ .k-chip:disabled { color: var(--k-text-quaternary); cursor: not-allowed; }
1393
+ @media (forced-colors: active) {
1394
+ .k-chip[aria-pressed="true"] { border-width: 2px; border-color: Highlight; }
1395
+ }
1396
+
1309
1397
  /* جستجو و انتخاب (Combobox) و پالت فرمان — فهرست گزینه‌ها با الگوی listbox
1310
1398
  * متغیرها: --k-listbox-max-height --k-option-height
1311
1399
  */
@@ -1361,6 +1449,15 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1361
1449
  .k-command__footer { display: flex; gap: var(--k-space-4); padding: var(--k-space-2) var(--k-space-5); border-block-start: 1px solid var(--k-border-secondary); color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1362
1450
  .k-command__footer span { display: inline-flex; align-items: center; gap: var(--k-space-1); }
1363
1451
 
1452
+ /* شمارش معکوس */
1453
+ .k-countdown { display: inline-flex; align-items: baseline; gap: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1454
+ .k-countdown--blocks { gap: var(--k-space-2); }
1455
+ .k-countdown__unit { display: grid; justify-items: center; gap: var(--k-space-1); min-inline-size: 3.25rem; padding: var(--k-space-2) var(--k-space-3); border: 1px solid var(--k-border-secondary); border-radius: var(--k-radius-lg); background: var(--k-bg-elevated); box-shadow: var(--k-shadow-xs), var(--k-highlight); }
1456
+ .k-countdown__num { color: var(--k-text-primary); font-size: var(--k-text-2xl); line-height: 1.1; }
1457
+ .k-countdown__name { color: var(--k-text-tertiary); font-size: var(--k-text-xs); font-weight: var(--k-weight-medium); }
1458
+ .k-countdown__sep { align-self: center; color: var(--k-text-quaternary); }
1459
+ .k-countdown[data-done] { color: var(--k-text-tertiary); }
1460
+
1364
1461
  /* پنجرهٔ گفتگو — روی <dialog> بومی: تلهٔ فوکوس، Esc و غیرفعال شدن پس‌زمینه رایگان
1365
1462
  * اندازه‌ها: k-dialog--sm | k-dialog--md (پیش‌فرض) | k-dialog--lg
1366
1463
  *
@@ -1843,6 +1940,31 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1843
1940
  .k-menu__item:focus { outline: 2px solid Highlight; }
1844
1941
  }
1845
1942
 
1943
+ /* انتخاب ماه و سال شمسی */
1944
+ .k-monthpicker { display: grid; gap: var(--k-space-3); inline-size: var(--k-monthpicker-width, 18rem); }
1945
+ .k-monthpicker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-2); }
1946
+ .k-monthpicker__year { color: var(--k-text-primary); font-size: var(--k-text-md); font-weight: var(--k-weight-semibold); }
1947
+ .k-monthpicker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--k-space-1); }
1948
+ .k-monthpicker__month {
1949
+ block-size: 2.5rem;
1950
+ border: 0;
1951
+ border-radius: var(--k-radius-md);
1952
+ background: transparent;
1953
+ color: var(--k-text-secondary);
1954
+ font: inherit;
1955
+ font-size: var(--k-text-sm);
1956
+ font-weight: var(--k-weight-medium);
1957
+ cursor: pointer;
1958
+ }
1959
+ .k-monthpicker__month:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1960
+ .k-monthpicker__month:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1961
+ .k-monthpicker__month[aria-current="date"] { color: var(--k-text-brand); font-weight: var(--k-weight-bold); }
1962
+ .k-monthpicker__month[aria-pressed="true"] { background: var(--k-bg-brand); color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
1963
+ .k-monthpicker__month:disabled { color: var(--k-text-quaternary); text-decoration: line-through; cursor: not-allowed; }
1964
+ @media (forced-colors: active) {
1965
+ .k-monthpicker__month[aria-pressed="true"] { outline: 2px solid Highlight; }
1966
+ }
1967
+
1846
1968
  /* ورودی عدد با دکمه‌های افزایش و کاهش */
1847
1969
  .k-number .k-input { padding-inline: var(--k-space-1); }
1848
1970
  .k-number .k-input__control { text-align: center; }
@@ -1952,6 +2074,140 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1952
2074
  .k-pagination__summary { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
1953
2075
  @media (max-width: 36rem) { .k-pagination__pages li:not(:has([aria-current])):not(:first-child):not(:last-child) { display: none; } }
1954
2076
 
2077
+ /* قدرت رمز عبور: نوار چهارقسمتی + فهرست شرط‌ها */
2078
+ .k-strength { display: grid; gap: var(--k-space-2); }
2079
+ .k-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--k-space-1); }
2080
+ .k-strength__bar { block-size: 0.25rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); transition: background-color var(--k-duration-normal); }
2081
+ .k-strength[data-score="1"] .k-strength__bar:nth-child(-n + 1) { background: var(--k-text-error); }
2082
+ .k-strength[data-score="2"] .k-strength__bar:nth-child(-n + 2) { background: var(--k-text-warning); }
2083
+ .k-strength[data-score="3"] .k-strength__bar:nth-child(-n + 3) { background: var(--k-text-success); }
2084
+ .k-strength[data-score="4"] .k-strength__bar { background: var(--k-text-success); }
2085
+ .k-strength__label { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2086
+ .k-strength__label strong { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
2087
+ .k-strength__rules { display: grid; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; }
2088
+ .k-strength__rule { display: flex; align-items: center; gap: var(--k-space-1_5); color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2089
+ .k-strength__rule svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
2090
+ .k-strength__rule[data-met] { color: var(--k-text-success); }
2091
+ @media (forced-colors: active) {
2092
+ .k-strength__bar { border: 1px solid CanvasText; }
2093
+ .k-strength[data-score] .k-strength__bar { forced-color-adjust: none; }
2094
+ }
2095
+
2096
+ /* پلاک خودروی ایران — نسبت واقعی ۵۲۰×۱۱۰ میلی‌متر و رنگ بر اساس نوع پلاک
2097
+ * ترتیب فیزیکی چپ‌به‌راست: نوار آبی (پرچم و I.R. IRAN) | دو رقم | حرف | سه رقم | «ایران» و کد استان
2098
+ * رنگ با data-type: private سفید، taxi/public/agricultural زرد، government قرمز، police سبز، army قهوه‌ای روشن، defense آبی روشن
2099
+ */
2100
+ .k-plate {
2101
+ --_h: var(--k-plate-height, 3.5rem);
2102
+ --_bg: #fff;
2103
+ --_ink: #111;
2104
+ display: inline-grid;
2105
+ grid-template-columns: calc(var(--_h) * 0.42) 1fr auto 1.35fr auto;
2106
+ /* ارتفاع بخش‌ها دقیقاً هم‌اندازهٔ پلاک؛ وگرنه input بلندتر می‌شود و پایینش بریده و متن بالا می‌رود */
2107
+ grid-template-rows: minmax(0, 1fr);
2108
+ align-items: stretch;
2109
+ box-sizing: border-box;
2110
+ justify-self: start;
2111
+ /* ۵۲۰ ÷ ۱۱۰ */
2112
+ inline-size: calc(var(--_h) * 4.73);
2113
+ max-inline-size: 100%;
2114
+ block-size: var(--_h);
2115
+ direction: ltr;
2116
+ border: 2px solid #111;
2117
+ border-radius: calc(var(--_h) * 0.12);
2118
+ background: var(--_bg);
2119
+ color: var(--_ink);
2120
+ box-shadow: var(--k-shadow-sm);
2121
+ overflow: hidden;
2122
+ transition: box-shadow var(--k-duration-fast);
2123
+ }
2124
+ .k-plate[data-type="taxi"], .k-plate[data-type="public"], .k-plate[data-type="agricultural"] { --_bg: #f7c600; }
2125
+ .k-plate[data-type="government"] { --_bg: #c8102e; --_ink: #fff; }
2126
+ .k-plate[data-type="police"] { --_bg: #0b5d3b; --_ink: #fff; }
2127
+ .k-plate[data-type="army"] { --_bg: #c9a46a; }
2128
+ .k-plate[data-type="defense"] { --_bg: #5aa7dc; --_ink: #fff; }
2129
+ .k-plate:focus-within { box-shadow: var(--k-shadow-sm), var(--k-ring-brand); }
2130
+ .k-plate[data-invalid] { box-shadow: var(--k-shadow-sm), var(--k-ring-error); }
2131
+
2132
+ .k-plate__flag {
2133
+ display: grid;
2134
+ grid-template-rows: auto 1fr;
2135
+ justify-items: center;
2136
+ align-content: start;
2137
+ gap: calc(var(--_h) * 0.1);
2138
+ padding-block: calc(var(--_h) * 0.1);
2139
+ background: #1f4fa8;
2140
+ color: #fff;
2141
+ font: 700 calc(var(--_h) * 0.13)/1.15 system-ui, sans-serif;
2142
+ text-align: center;
2143
+ }
2144
+ .k-plate__flag-colors {
2145
+ inline-size: 70%;
2146
+ aspect-ratio: 7 / 4;
2147
+ background: linear-gradient(#239f40 0 33.3%, #fff 33.3% 66.6%, #da0000 66.6%);
2148
+ }
2149
+
2150
+ .k-plate__seg {
2151
+ box-sizing: border-box;
2152
+ min-inline-size: 0;
2153
+ inline-size: 100%;
2154
+ block-size: 100%;
2155
+ min-block-size: 0;
2156
+ /* ارقام فارسی وزیرمتن حدود ۰٫۰۹em بالاتر از وسط جعبهٔ فونت‌اند (اندازه‌گیری با measureText) */
2157
+ padding: 0.18em 0 0;
2158
+ border: 0;
2159
+ outline: 0;
2160
+ background: transparent;
2161
+ color: inherit;
2162
+ font: inherit;
2163
+ font-size: calc(var(--_h) * 0.62);
2164
+ font-weight: var(--k-weight-bold);
2165
+ line-height: 1;
2166
+ text-align: center;
2167
+ }
2168
+ .k-plate__seg::placeholder { color: currentColor; opacity: 0.25; }
2169
+ .k-plate__letter {
2170
+ appearance: none;
2171
+ box-sizing: border-box;
2172
+ block-size: 100%;
2173
+ min-block-size: 0;
2174
+ /* حرف‌ها برعکسِ ارقام کمی پایین‌تر از وسط‌اند */
2175
+ padding: 0 calc(var(--_h) * 0.08) 0.16em;
2176
+ border: 0;
2177
+ outline: 0;
2178
+ background: transparent;
2179
+ color: inherit;
2180
+ font: inherit;
2181
+ font-size: calc(var(--_h) * 0.5);
2182
+ font-weight: var(--k-weight-bold);
2183
+ text-align: center;
2184
+ text-align-last: center;
2185
+ cursor: pointer;
2186
+ }
2187
+ .k-plate__letter option { color: #111; background: #fff; }
2188
+ .k-plate__seg:focus-visible, .k-plate__letter:focus-visible { background: rgb(0 0 0 / 0.07); }
2189
+ .k-plate[data-type="government"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
2190
+ .k-plate[data-type="police"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
2191
+ .k-plate[data-type="defense"] :is(.k-plate__seg, .k-plate__letter):focus-visible { background: rgb(255 255 255 / 0.15); }
2192
+
2193
+ /* بخش استان: «ایران» بالا، دو رقم پایین، جدا با خط عمودی */
2194
+ .k-plate__region {
2195
+ display: grid;
2196
+ grid-template-rows: auto minmax(0, 1fr);
2197
+ align-items: center;
2198
+ justify-items: center;
2199
+ box-sizing: border-box;
2200
+ inline-size: calc(var(--_h) * 0.95);
2201
+ min-block-size: 0;
2202
+ padding-block: calc(var(--_h) * 0.06) calc(var(--_h) * 0.04);
2203
+ border-inline-start: 2px solid currentColor;
2204
+ }
2205
+ .k-plate__region-label { font-size: calc(var(--_h) * 0.2); font-weight: var(--k-weight-bold); line-height: 1; }
2206
+ .k-plate__region .k-plate__seg { font-size: calc(var(--_h) * 0.48); padding-block-start: 0.1em; }
2207
+ @media (forced-colors: active) {
2208
+ .k-plate { border-color: CanvasText; }
2209
+ }
2210
+
1955
2211
  /* پنجرهٔ شناور (Popover) — غیرمودال، کنار یک دکمه */
1956
2212
  .k-popover-anchor { position: relative; display: inline-flex; vertical-align: middle; }
1957
2213
  .k-popover {
@@ -2141,6 +2397,73 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2141
2397
  .k-radio-group--cards .k-check:has(:checked) { outline: 2px solid Highlight; }
2142
2398
  }
2143
2399
 
2400
+ /* امتیاز ستاره‌ای (Rating) — روی رادیوهای بومی؛ نسخهٔ فقط‌خواندنی با role="img" */
2401
+ .k-rating { --_s: var(--k-rating-size, 1.5rem); display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 0; border: 0; }
2402
+ .k-rating--sm { --_s: var(--k-rating-size, 1.125rem); }
2403
+ .k-rating--lg { --_s: var(--k-rating-size, 2rem); }
2404
+ .k-rating__star { position: relative; display: inline-grid; place-items: center; inline-size: var(--_s); block-size: var(--_s); border-radius: var(--k-radius-sm); color: var(--k-border-primary); cursor: pointer; transition: color var(--k-duration-fast), scale var(--k-duration-fast) var(--k-ease-emphasized); }
2405
+ .k-rating__star svg { inline-size: 100%; block-size: 100%; }
2406
+ .k-rating__star[data-filled] { color: var(--k-rating-color, var(--k-zafaran-400)); }
2407
+ .k-rating__star[data-half] svg .k-rating__half { fill: var(--k-rating-color, var(--k-zafaran-400)); }
2408
+ .k-rating__star:hover { scale: 1.12; }
2409
+ .k-rating__star:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
2410
+ .k-rating[data-readonly] .k-rating__star { cursor: default; }
2411
+ .k-rating[data-readonly] .k-rating__star:hover { scale: none; }
2412
+ .k-rating__value { margin-inline-start: var(--k-space-2); color: var(--k-text-secondary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
2413
+ .k-rating:has(:disabled) .k-rating__star { cursor: not-allowed; opacity: 0.6; }
2414
+ @media (forced-colors: active) {
2415
+ .k-rating__star[data-filled] { color: Highlight; }
2416
+ }
2417
+
2418
+ /* کنترل تکه‌ای (Segmented control) — روی رادیوهای بومی
2419
+ * <div class="k-segmented" role="radiogroup" aria-label="نمایش">
2420
+ * <label class="k-segmented__item"><input type="radio" name="v" class="k-sr-only" checked>فهرست</label>
2421
+ * …
2422
+ * </div>
2423
+ * اندازه‌ها: k-segmented--sm | k-segmented--block (تمام‌عرض)
2424
+ */
2425
+ .k-segmented {
2426
+ --_h: calc(2.5rem * var(--k-density));
2427
+ display: inline-flex;
2428
+ gap: 2px;
2429
+ padding: 3px;
2430
+ border: 1px solid var(--k-border-secondary);
2431
+ border-radius: var(--k-radius-lg);
2432
+ background: var(--k-bg-secondary);
2433
+ }
2434
+ .k-segmented--sm { --_h: calc(2.25rem * var(--k-density)); }
2435
+ .k-segmented--block { display: flex; }
2436
+ .k-segmented--block .k-segmented__item { flex: 1; }
2437
+ .k-segmented__item {
2438
+ position: relative;
2439
+ display: inline-flex;
2440
+ align-items: center;
2441
+ justify-content: center;
2442
+ gap: var(--k-space-1_5);
2443
+ block-size: calc(var(--_h) - 8px);
2444
+ padding-inline: var(--k-space-3);
2445
+ border-radius: calc(var(--k-radius-lg) - 3px);
2446
+ color: var(--k-text-tertiary);
2447
+ font-size: var(--k-text-sm);
2448
+ font-weight: var(--k-weight-semibold);
2449
+ white-space: nowrap;
2450
+ cursor: pointer;
2451
+ user-select: none;
2452
+ transition: background-color var(--k-duration-fast), color var(--k-duration-fast), box-shadow var(--k-duration-fast);
2453
+ }
2454
+ .k-segmented__item svg { inline-size: 1.125rem; block-size: 1.125rem; }
2455
+ .k-segmented__item:hover { color: var(--k-text-primary); }
2456
+ .k-segmented__item:has(:checked) {
2457
+ background: var(--k-bg-elevated);
2458
+ color: var(--k-text-primary);
2459
+ box-shadow: var(--k-shadow-sm), inset 0 0 0 1px var(--k-border-secondary), var(--k-highlight);
2460
+ }
2461
+ .k-segmented__item:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
2462
+ .k-segmented__item:has(:disabled) { color: var(--k-text-quaternary); cursor: not-allowed; }
2463
+ @media (forced-colors: active) {
2464
+ .k-segmented__item:has(:checked) { outline: 2px solid Highlight; }
2465
+ }
2466
+
2144
2467
  /* انتخاب از فهرست — <select> بومی با ظاهر کاشی (دسترس‌پذیر و سازگار با گوشی)
2145
2468
  * <div class="k-select"><select class="k-select__control">…</select></div>
2146
2469
  * اندازه‌ها: k-select--sm | k-select--lg — خطا: aria-invalid="true"
@@ -2882,4 +3205,43 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2882
3205
  .k-tooltip { border: 1px solid CanvasText; }
2883
3206
  }
2884
3207
 
3208
+ /* درخت (Tree view) — الگوی Tree در WAI-ARIA
3209
+ * <ul role="tree" class="k-tree"><li role="treeitem" aria-expanded="true" class="k-tree__item">…<ul role="group">…</ul></li></ul>
3210
+ */
3211
+ .k-tree, .k-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
3212
+ .k-tree [role="group"] { padding-inline-start: var(--k-tree-indent, 1.25rem); }
3213
+ .k-tree__item { outline: 0; }
3214
+ .k-tree__row {
3215
+ display: flex;
3216
+ align-items: center;
3217
+ gap: var(--k-space-1_5);
3218
+ min-block-size: var(--k-tree-row-height, 2.25rem);
3219
+ padding-inline: var(--k-space-2);
3220
+ border-radius: var(--k-radius-md);
3221
+ color: var(--k-text-secondary);
3222
+ font-size: var(--k-text-sm);
3223
+ font-weight: var(--k-weight-medium);
3224
+ cursor: pointer;
3225
+ user-select: none;
3226
+ }
3227
+ .k-tree__row:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
3228
+ .k-tree__item:focus-visible > .k-tree__row { box-shadow: var(--k-ring-brand); }
3229
+ .k-tree__item[aria-selected="true"] > .k-tree__row { background: var(--k-bg-active); color: var(--k-text-primary); }
3230
+ .k-tree__item[aria-selected="true"] > .k-tree__row .k-tree__icon { color: var(--k-text-brand); }
3231
+ .k-tree__toggle { display: grid; place-items: center; flex-shrink: 0; inline-size: 1.25rem; block-size: 1.25rem; color: var(--k-text-tertiary); transition: rotate var(--k-duration-fast); }
3232
+ /* فلش «بسته» در RTL به چپ اشاره می‌کند */
3233
+ .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
3234
+ [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
3235
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
3236
+ [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
3237
+ .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
3238
+ .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
3239
+ .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
3240
+ .k-tree__label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3241
+ .k-tree__meta { color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
3242
+ .k-tree__item[aria-disabled="true"] > .k-tree__row { color: var(--k-text-quaternary); cursor: not-allowed; }
3243
+ @media (forced-colors: active) {
3244
+ .k-tree__item[aria-selected="true"] > .k-tree__row { outline: 2px solid Highlight; }
3245
+ }
3246
+
2885
3247
  }
@@ -653,6 +653,47 @@
653
653
  .k-badge { border-color: CanvasText; }
654
654
  }
655
655
 
656
+ /* نوار اطلاع‌رسانی بالای صفحه (Banner)
657
+ * <div class="k-banner k-banner--brand" role="region" aria-label="اطلاعیه">…</div>
658
+ * رنگ‌ها: neutral (پیش‌فرض) | brand | warning | error
659
+ */
660
+ .k-banner {
661
+ --_accent: var(--k-text-tertiary);
662
+ --_bg: var(--k-bg-secondary);
663
+ display: flex;
664
+ flex-wrap: wrap;
665
+ align-items: center;
666
+ gap: var(--k-space-2) var(--k-space-4);
667
+ padding: var(--k-space-3) var(--k-space-4);
668
+ border: 1px solid var(--k-border-secondary);
669
+ border-radius: var(--k-banner-radius, var(--k-radius-xl));
670
+ background: var(--_bg);
671
+ box-shadow: var(--k-shadow-xs), var(--k-highlight);
672
+ color: var(--k-text-secondary);
673
+ font-size: var(--k-text-sm);
674
+ }
675
+ .k-banner--flush { border-inline: 0; border-block-start: 0; border-radius: 0; box-shadow: none; }
676
+ .k-banner--brand { --_accent: var(--k-text-brand); --_bg: var(--k-bg-brand-subtle); }
677
+ .k-banner--warning { --_accent: var(--k-text-warning); --_bg: var(--k-bg-warning-subtle); }
678
+ .k-banner--error { --_accent: var(--k-text-error); --_bg: var(--k-bg-error-subtle); }
679
+ .k-banner__icon {
680
+ display: grid;
681
+ place-items: center;
682
+ flex-shrink: 0;
683
+ inline-size: 2rem;
684
+ block-size: 2rem;
685
+ border: 1px solid var(--k-border-primary);
686
+ border-radius: var(--k-radius-md);
687
+ background: var(--k-bg-elevated);
688
+ color: var(--_accent);
689
+ box-shadow: var(--k-shadow-xs);
690
+ }
691
+ .k-banner__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
692
+ .k-banner__text { flex: 1 1 16rem; min-inline-size: 0; margin: 0; }
693
+ .k-banner__text strong { color: var(--k-text-primary); font-weight: var(--k-weight-semibold); }
694
+ .k-banner__actions { display: flex; align-items: center; gap: var(--k-space-2); }
695
+ .k-banner__close { margin-inline-start: auto; }
696
+
656
697
  /* مسیر صفحه (Breadcrumb)
657
698
  * <nav class="k-breadcrumb" aria-label="مسیر"><ol>
658
699
  * <li><a class="k-breadcrumb__link" href="/">خانه</a></li>
@@ -732,6 +773,18 @@ a.k-breadcrumb__link:hover, button.k-breadcrumb__link:hover { background: var(--
732
773
  .k-breadcrumb__link[aria-current="page"] { outline: 1px solid CanvasText; }
733
774
  }
734
775
 
776
+ /* گروه دکمه‌های چسبیده (Button group)
777
+ * <div class="k-btn-group" role="group" aria-label="قالب‌بندی"><button class="k-btn">…</button>…</div>
778
+ */
779
+ .k-btn-group { display: inline-flex; isolation: isolate; border-radius: var(--k-btn-radius, var(--k-radius-md)); box-shadow: var(--k-shadow-xs); }
780
+ .k-btn-group > .k-btn { border-radius: 0; box-shadow: var(--k-shadow-skeuomorphic); }
781
+ .k-btn-group > .k-btn:not(:first-child) { margin-inline-start: -1px; }
782
+ .k-btn-group > .k-btn:first-child { border-start-start-radius: inherit; border-end-start-radius: inherit; }
783
+ .k-btn-group > .k-btn:last-child { border-start-end-radius: inherit; border-end-end-radius: inherit; }
784
+ .k-btn-group > .k-btn:is(:hover, :focus-visible) { z-index: 1; }
785
+ .k-btn-group > .k-btn:focus-visible { box-shadow: var(--k-shadow-skeuomorphic), var(--k-ring-brand); }
786
+ .k-btn-group > .k-btn[aria-pressed="true"], .k-btn-group > .k-btn[aria-current] { background: var(--k-bg-active); color: var(--k-text-primary); }
787
+
735
788
  /* دکمه — به سبک Untitled UI: سایهٔ اسکئومورفیک و حلقهٔ فوکوس نرم
736
789
  * <button class="k-btn k-btn--primary k-btn--md">ثبت</button>
737
790
  * گونه‌ها: primary | secondary | tertiary | link | danger | danger-secondary
@@ -1298,6 +1351,41 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1298
1351
  .k-checkbox::before { display: none; }
1299
1352
  }
1300
1353
 
1354
+ /* تراشه‌های فیلتر (Chips) — دکمه‌های aria-pressed
1355
+ * <div class="k-chips" role="group" aria-label="دسته‌بندی"><button class="k-chip" aria-pressed="true">…</button></div>
1356
+ */
1357
+ .k-chips { display: flex; flex-wrap: wrap; gap: var(--k-space-2); }
1358
+ .k-chip {
1359
+ display: inline-flex;
1360
+ align-items: center;
1361
+ gap: var(--k-space-1_5);
1362
+ block-size: 2rem;
1363
+ padding-inline: var(--k-space-3);
1364
+ border: 1px solid var(--k-border-primary);
1365
+ border-radius: var(--k-radius-full);
1366
+ background: var(--k-bg-elevated);
1367
+ color: var(--k-text-secondary);
1368
+ font: inherit;
1369
+ font-size: var(--k-text-sm);
1370
+ font-weight: var(--k-weight-medium);
1371
+ white-space: nowrap;
1372
+ cursor: pointer;
1373
+ box-shadow: var(--k-shadow-xs);
1374
+ transition: background-color var(--k-duration-fast), border-color var(--k-duration-fast), color var(--k-duration-fast);
1375
+ }
1376
+ .k-chip:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1377
+ .k-chip:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1378
+ .k-chip svg { inline-size: 1rem; block-size: 1rem; }
1379
+ .k-chip[aria-pressed="true"] { border-color: var(--k-border-brand); background: var(--k-bg-brand-subtle); color: var(--k-text-brand); }
1380
+ .k-chip__check { display: none; }
1381
+ .k-chip[aria-pressed="true"] .k-chip__check { display: inline-flex; }
1382
+ .k-chip__count { min-inline-size: 1.25rem; padding-inline: 0.375rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); color: var(--k-text-tertiary); font-size: var(--k-text-xs); line-height: 1.25rem; text-align: center; }
1383
+ .k-chip[aria-pressed="true"] .k-chip__count { background: color-mix(in srgb, var(--k-text-brand) 18%, transparent); color: var(--k-text-brand); }
1384
+ .k-chip:disabled { color: var(--k-text-quaternary); cursor: not-allowed; }
1385
+ @media (forced-colors: active) {
1386
+ .k-chip[aria-pressed="true"] { border-width: 2px; border-color: Highlight; }
1387
+ }
1388
+
1301
1389
  /* جستجو و انتخاب (Combobox) و پالت فرمان — فهرست گزینه‌ها با الگوی listbox
1302
1390
  * متغیرها: --k-listbox-max-height --k-option-height
1303
1391
  */
@@ -1353,6 +1441,15 @@ a.k-btn[aria-disabled="true"]:not([aria-busy="true"]) {
1353
1441
  .k-command__footer { display: flex; gap: var(--k-space-4); padding: var(--k-space-2) var(--k-space-5); border-block-start: 1px solid var(--k-border-secondary); color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
1354
1442
  .k-command__footer span { display: inline-flex; align-items: center; gap: var(--k-space-1); }
1355
1443
 
1444
+ /* شمارش معکوس */
1445
+ .k-countdown { display: inline-flex; align-items: baseline; gap: var(--k-space-1); color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
1446
+ .k-countdown--blocks { gap: var(--k-space-2); }
1447
+ .k-countdown__unit { display: grid; justify-items: center; gap: var(--k-space-1); min-inline-size: 3.25rem; padding: var(--k-space-2) var(--k-space-3); border: 1px solid var(--k-border-secondary); border-radius: var(--k-radius-lg); background: var(--k-bg-elevated); box-shadow: var(--k-shadow-xs), var(--k-highlight); }
1448
+ .k-countdown__num { color: var(--k-text-primary); font-size: var(--k-text-2xl); line-height: 1.1; }
1449
+ .k-countdown__name { color: var(--k-text-tertiary); font-size: var(--k-text-xs); font-weight: var(--k-weight-medium); }
1450
+ .k-countdown__sep { align-self: center; color: var(--k-text-quaternary); }
1451
+ .k-countdown[data-done] { color: var(--k-text-tertiary); }
1452
+
1356
1453
  /* پنجرهٔ گفتگو — روی <dialog> بومی: تلهٔ فوکوس، Esc و غیرفعال شدن پس‌زمینه رایگان
1357
1454
  * اندازه‌ها: k-dialog--sm | k-dialog--md (پیش‌فرض) | k-dialog--lg
1358
1455
  *
@@ -1835,6 +1932,31 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1835
1932
  .k-menu__item:focus { outline: 2px solid Highlight; }
1836
1933
  }
1837
1934
 
1935
+ /* انتخاب ماه و سال شمسی */
1936
+ .k-monthpicker { display: grid; gap: var(--k-space-3); inline-size: var(--k-monthpicker-width, 18rem); }
1937
+ .k-monthpicker__header { display: flex; align-items: center; justify-content: space-between; gap: var(--k-space-2); }
1938
+ .k-monthpicker__year { color: var(--k-text-primary); font-size: var(--k-text-md); font-weight: var(--k-weight-semibold); }
1939
+ .k-monthpicker__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--k-space-1); }
1940
+ .k-monthpicker__month {
1941
+ block-size: 2.5rem;
1942
+ border: 0;
1943
+ border-radius: var(--k-radius-md);
1944
+ background: transparent;
1945
+ color: var(--k-text-secondary);
1946
+ font: inherit;
1947
+ font-size: var(--k-text-sm);
1948
+ font-weight: var(--k-weight-medium);
1949
+ cursor: pointer;
1950
+ }
1951
+ .k-monthpicker__month:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
1952
+ .k-monthpicker__month:focus-visible { outline: 2px solid transparent; box-shadow: var(--k-ring-brand); }
1953
+ .k-monthpicker__month[aria-current="date"] { color: var(--k-text-brand); font-weight: var(--k-weight-bold); }
1954
+ .k-monthpicker__month[aria-pressed="true"] { background: var(--k-bg-brand); color: var(--k-text-on-brand); font-weight: var(--k-weight-semibold); }
1955
+ .k-monthpicker__month:disabled { color: var(--k-text-quaternary); text-decoration: line-through; cursor: not-allowed; }
1956
+ @media (forced-colors: active) {
1957
+ .k-monthpicker__month[aria-pressed="true"] { outline: 2px solid Highlight; }
1958
+ }
1959
+
1838
1960
  /* ورودی عدد با دکمه‌های افزایش و کاهش */
1839
1961
  .k-number .k-input { padding-inline: var(--k-space-1); }
1840
1962
  .k-number .k-input__control { text-align: center; }
@@ -1944,6 +2066,140 @@ html:has(.k-dialog[open]) { overflow: hidden; }
1944
2066
  .k-pagination__summary { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
1945
2067
  @media (max-width: 36rem) { .k-pagination__pages li:not(:has([aria-current])):not(:first-child):not(:last-child) { display: none; } }
1946
2068
 
2069
+ /* قدرت رمز عبور: نوار چهارقسمتی + فهرست شرط‌ها */
2070
+ .k-strength { display: grid; gap: var(--k-space-2); }
2071
+ .k-strength__bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--k-space-1); }
2072
+ .k-strength__bar { block-size: 0.25rem; border-radius: var(--k-radius-full); background: var(--k-bg-tertiary); transition: background-color var(--k-duration-normal); }
2073
+ .k-strength[data-score="1"] .k-strength__bar:nth-child(-n + 1) { background: var(--k-text-error); }
2074
+ .k-strength[data-score="2"] .k-strength__bar:nth-child(-n + 2) { background: var(--k-text-warning); }
2075
+ .k-strength[data-score="3"] .k-strength__bar:nth-child(-n + 3) { background: var(--k-text-success); }
2076
+ .k-strength[data-score="4"] .k-strength__bar { background: var(--k-text-success); }
2077
+ .k-strength__label { color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2078
+ .k-strength__label strong { color: var(--k-text-secondary); font-weight: var(--k-weight-semibold); }
2079
+ .k-strength__rules { display: grid; gap: var(--k-space-1); margin: 0; padding: 0; list-style: none; }
2080
+ .k-strength__rule { display: flex; align-items: center; gap: var(--k-space-1_5); color: var(--k-text-tertiary); font-size: var(--k-text-sm); }
2081
+ .k-strength__rule svg { inline-size: 1rem; block-size: 1rem; flex-shrink: 0; }
2082
+ .k-strength__rule[data-met] { color: var(--k-text-success); }
2083
+ @media (forced-colors: active) {
2084
+ .k-strength__bar { border: 1px solid CanvasText; }
2085
+ .k-strength[data-score] .k-strength__bar { forced-color-adjust: none; }
2086
+ }
2087
+
2088
+ /* پلاک خودروی ایران — نسبت واقعی ۵۲۰×۱۱۰ میلی‌متر و رنگ بر اساس نوع پلاک
2089
+ * ترتیب فیزیکی چپ‌به‌راست: نوار آبی (پرچم و I.R. IRAN) | دو رقم | حرف | سه رقم | «ایران» و کد استان
2090
+ * رنگ با data-type: private سفید، taxi/public/agricultural زرد، government قرمز، police سبز، army قهوه‌ای روشن، defense آبی روشن
2091
+ */
2092
+ .k-plate {
2093
+ --_h: var(--k-plate-height, 3.5rem);
2094
+ --_bg: #fff;
2095
+ --_ink: #111;
2096
+ display: inline-grid;
2097
+ grid-template-columns: calc(var(--_h) * 0.42) 1fr auto 1.35fr auto;
2098
+ /* ارتفاع بخش‌ها دقیقاً هم‌اندازهٔ پلاک؛ وگرنه input بلندتر می‌شود و پایینش بریده و متن بالا می‌رود */
2099
+ grid-template-rows: minmax(0, 1fr);
2100
+ align-items: stretch;
2101
+ box-sizing: border-box;
2102
+ justify-self: start;
2103
+ /* ۵۲۰ ÷ ۱۱۰ */
2104
+ inline-size: calc(var(--_h) * 4.73);
2105
+ max-inline-size: 100%;
2106
+ block-size: var(--_h);
2107
+ direction: ltr;
2108
+ border: 2px solid #111;
2109
+ border-radius: calc(var(--_h) * 0.12);
2110
+ background: var(--_bg);
2111
+ color: var(--_ink);
2112
+ box-shadow: var(--k-shadow-sm);
2113
+ overflow: hidden;
2114
+ transition: box-shadow var(--k-duration-fast);
2115
+ }
2116
+ .k-plate[data-type="taxi"], .k-plate[data-type="public"], .k-plate[data-type="agricultural"] { --_bg: #f7c600; }
2117
+ .k-plate[data-type="government"] { --_bg: #c8102e; --_ink: #fff; }
2118
+ .k-plate[data-type="police"] { --_bg: #0b5d3b; --_ink: #fff; }
2119
+ .k-plate[data-type="army"] { --_bg: #c9a46a; }
2120
+ .k-plate[data-type="defense"] { --_bg: #5aa7dc; --_ink: #fff; }
2121
+ .k-plate:focus-within { box-shadow: var(--k-shadow-sm), var(--k-ring-brand); }
2122
+ .k-plate[data-invalid] { box-shadow: var(--k-shadow-sm), var(--k-ring-error); }
2123
+
2124
+ .k-plate__flag {
2125
+ display: grid;
2126
+ grid-template-rows: auto 1fr;
2127
+ justify-items: center;
2128
+ align-content: start;
2129
+ gap: calc(var(--_h) * 0.1);
2130
+ padding-block: calc(var(--_h) * 0.1);
2131
+ background: #1f4fa8;
2132
+ color: #fff;
2133
+ font: 700 calc(var(--_h) * 0.13)/1.15 system-ui, sans-serif;
2134
+ text-align: center;
2135
+ }
2136
+ .k-plate__flag-colors {
2137
+ inline-size: 70%;
2138
+ aspect-ratio: 7 / 4;
2139
+ background: linear-gradient(#239f40 0 33.3%, #fff 33.3% 66.6%, #da0000 66.6%);
2140
+ }
2141
+
2142
+ .k-plate__seg {
2143
+ box-sizing: border-box;
2144
+ min-inline-size: 0;
2145
+ inline-size: 100%;
2146
+ block-size: 100%;
2147
+ min-block-size: 0;
2148
+ /* ارقام فارسی وزیرمتن حدود ۰٫۰۹em بالاتر از وسط جعبهٔ فونت‌اند (اندازه‌گیری با measureText) */
2149
+ padding: 0.18em 0 0;
2150
+ border: 0;
2151
+ outline: 0;
2152
+ background: transparent;
2153
+ color: inherit;
2154
+ font: inherit;
2155
+ font-size: calc(var(--_h) * 0.62);
2156
+ font-weight: var(--k-weight-bold);
2157
+ line-height: 1;
2158
+ text-align: center;
2159
+ }
2160
+ .k-plate__seg::placeholder { color: currentColor; opacity: 0.25; }
2161
+ .k-plate__letter {
2162
+ appearance: none;
2163
+ box-sizing: border-box;
2164
+ block-size: 100%;
2165
+ min-block-size: 0;
2166
+ /* حرف‌ها برعکسِ ارقام کمی پایین‌تر از وسط‌اند */
2167
+ padding: 0 calc(var(--_h) * 0.08) 0.16em;
2168
+ border: 0;
2169
+ outline: 0;
2170
+ background: transparent;
2171
+ color: inherit;
2172
+ font: inherit;
2173
+ font-size: calc(var(--_h) * 0.5);
2174
+ font-weight: var(--k-weight-bold);
2175
+ text-align: center;
2176
+ text-align-last: center;
2177
+ cursor: pointer;
2178
+ }
2179
+ .k-plate__letter option { color: #111; background: #fff; }
2180
+ .k-plate__seg:focus-visible, .k-plate__letter:focus-visible { background: rgb(0 0 0 / 0.07); }
2181
+ .k-plate[data-type="government"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
2182
+ .k-plate[data-type="police"] :is(.k-plate__seg, .k-plate__letter):focus-visible,
2183
+ .k-plate[data-type="defense"] :is(.k-plate__seg, .k-plate__letter):focus-visible { background: rgb(255 255 255 / 0.15); }
2184
+
2185
+ /* بخش استان: «ایران» بالا، دو رقم پایین، جدا با خط عمودی */
2186
+ .k-plate__region {
2187
+ display: grid;
2188
+ grid-template-rows: auto minmax(0, 1fr);
2189
+ align-items: center;
2190
+ justify-items: center;
2191
+ box-sizing: border-box;
2192
+ inline-size: calc(var(--_h) * 0.95);
2193
+ min-block-size: 0;
2194
+ padding-block: calc(var(--_h) * 0.06) calc(var(--_h) * 0.04);
2195
+ border-inline-start: 2px solid currentColor;
2196
+ }
2197
+ .k-plate__region-label { font-size: calc(var(--_h) * 0.2); font-weight: var(--k-weight-bold); line-height: 1; }
2198
+ .k-plate__region .k-plate__seg { font-size: calc(var(--_h) * 0.48); padding-block-start: 0.1em; }
2199
+ @media (forced-colors: active) {
2200
+ .k-plate { border-color: CanvasText; }
2201
+ }
2202
+
1947
2203
  /* پنجرهٔ شناور (Popover) — غیرمودال، کنار یک دکمه */
1948
2204
  .k-popover-anchor { position: relative; display: inline-flex; vertical-align: middle; }
1949
2205
  .k-popover {
@@ -2133,6 +2389,73 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2133
2389
  .k-radio-group--cards .k-check:has(:checked) { outline: 2px solid Highlight; }
2134
2390
  }
2135
2391
 
2392
+ /* امتیاز ستاره‌ای (Rating) — روی رادیوهای بومی؛ نسخهٔ فقط‌خواندنی با role="img" */
2393
+ .k-rating { --_s: var(--k-rating-size, 1.5rem); display: inline-flex; align-items: center; gap: 2px; margin: 0; padding: 0; border: 0; }
2394
+ .k-rating--sm { --_s: var(--k-rating-size, 1.125rem); }
2395
+ .k-rating--lg { --_s: var(--k-rating-size, 2rem); }
2396
+ .k-rating__star { position: relative; display: inline-grid; place-items: center; inline-size: var(--_s); block-size: var(--_s); border-radius: var(--k-radius-sm); color: var(--k-border-primary); cursor: pointer; transition: color var(--k-duration-fast), scale var(--k-duration-fast) var(--k-ease-emphasized); }
2397
+ .k-rating__star svg { inline-size: 100%; block-size: 100%; }
2398
+ .k-rating__star[data-filled] { color: var(--k-rating-color, var(--k-zafaran-400)); }
2399
+ .k-rating__star[data-half] svg .k-rating__half { fill: var(--k-rating-color, var(--k-zafaran-400)); }
2400
+ .k-rating__star:hover { scale: 1.12; }
2401
+ .k-rating__star:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
2402
+ .k-rating[data-readonly] .k-rating__star { cursor: default; }
2403
+ .k-rating[data-readonly] .k-rating__star:hover { scale: none; }
2404
+ .k-rating__value { margin-inline-start: var(--k-space-2); color: var(--k-text-secondary); font-size: var(--k-text-sm); font-weight: var(--k-weight-semibold); }
2405
+ .k-rating:has(:disabled) .k-rating__star { cursor: not-allowed; opacity: 0.6; }
2406
+ @media (forced-colors: active) {
2407
+ .k-rating__star[data-filled] { color: Highlight; }
2408
+ }
2409
+
2410
+ /* کنترل تکه‌ای (Segmented control) — روی رادیوهای بومی
2411
+ * <div class="k-segmented" role="radiogroup" aria-label="نمایش">
2412
+ * <label class="k-segmented__item"><input type="radio" name="v" class="k-sr-only" checked>فهرست</label>
2413
+ * …
2414
+ * </div>
2415
+ * اندازه‌ها: k-segmented--sm | k-segmented--block (تمام‌عرض)
2416
+ */
2417
+ .k-segmented {
2418
+ --_h: calc(2.5rem * var(--k-density));
2419
+ display: inline-flex;
2420
+ gap: 2px;
2421
+ padding: 3px;
2422
+ border: 1px solid var(--k-border-secondary);
2423
+ border-radius: var(--k-radius-lg);
2424
+ background: var(--k-bg-secondary);
2425
+ }
2426
+ .k-segmented--sm { --_h: calc(2.25rem * var(--k-density)); }
2427
+ .k-segmented--block { display: flex; }
2428
+ .k-segmented--block .k-segmented__item { flex: 1; }
2429
+ .k-segmented__item {
2430
+ position: relative;
2431
+ display: inline-flex;
2432
+ align-items: center;
2433
+ justify-content: center;
2434
+ gap: var(--k-space-1_5);
2435
+ block-size: calc(var(--_h) - 8px);
2436
+ padding-inline: var(--k-space-3);
2437
+ border-radius: calc(var(--k-radius-lg) - 3px);
2438
+ color: var(--k-text-tertiary);
2439
+ font-size: var(--k-text-sm);
2440
+ font-weight: var(--k-weight-semibold);
2441
+ white-space: nowrap;
2442
+ cursor: pointer;
2443
+ user-select: none;
2444
+ transition: background-color var(--k-duration-fast), color var(--k-duration-fast), box-shadow var(--k-duration-fast);
2445
+ }
2446
+ .k-segmented__item svg { inline-size: 1.125rem; block-size: 1.125rem; }
2447
+ .k-segmented__item:hover { color: var(--k-text-primary); }
2448
+ .k-segmented__item:has(:checked) {
2449
+ background: var(--k-bg-elevated);
2450
+ color: var(--k-text-primary);
2451
+ box-shadow: var(--k-shadow-sm), inset 0 0 0 1px var(--k-border-secondary), var(--k-highlight);
2452
+ }
2453
+ .k-segmented__item:has(:focus-visible) { box-shadow: var(--k-ring-brand); }
2454
+ .k-segmented__item:has(:disabled) { color: var(--k-text-quaternary); cursor: not-allowed; }
2455
+ @media (forced-colors: active) {
2456
+ .k-segmented__item:has(:checked) { outline: 2px solid Highlight; }
2457
+ }
2458
+
2136
2459
  /* انتخاب از فهرست — <select> بومی با ظاهر کاشی (دسترس‌پذیر و سازگار با گوشی)
2137
2460
  * <div class="k-select"><select class="k-select__control">…</select></div>
2138
2461
  * اندازه‌ها: k-select--sm | k-select--lg — خطا: aria-invalid="true"
@@ -2874,4 +3197,43 @@ html:has(.k-dialog[open]) { overflow: hidden; }
2874
3197
  .k-tooltip { border: 1px solid CanvasText; }
2875
3198
  }
2876
3199
 
3200
+ /* درخت (Tree view) — الگوی Tree در WAI-ARIA
3201
+ * <ul role="tree" class="k-tree"><li role="treeitem" aria-expanded="true" class="k-tree__item">…<ul role="group">…</ul></li></ul>
3202
+ */
3203
+ .k-tree, .k-tree [role="group"] { margin: 0; padding: 0; list-style: none; }
3204
+ .k-tree [role="group"] { padding-inline-start: var(--k-tree-indent, 1.25rem); }
3205
+ .k-tree__item { outline: 0; }
3206
+ .k-tree__row {
3207
+ display: flex;
3208
+ align-items: center;
3209
+ gap: var(--k-space-1_5);
3210
+ min-block-size: var(--k-tree-row-height, 2.25rem);
3211
+ padding-inline: var(--k-space-2);
3212
+ border-radius: var(--k-radius-md);
3213
+ color: var(--k-text-secondary);
3214
+ font-size: var(--k-text-sm);
3215
+ font-weight: var(--k-weight-medium);
3216
+ cursor: pointer;
3217
+ user-select: none;
3218
+ }
3219
+ .k-tree__row:hover { background: var(--k-bg-hover); color: var(--k-text-primary); }
3220
+ .k-tree__item:focus-visible > .k-tree__row { box-shadow: var(--k-ring-brand); }
3221
+ .k-tree__item[aria-selected="true"] > .k-tree__row { background: var(--k-bg-active); color: var(--k-text-primary); }
3222
+ .k-tree__item[aria-selected="true"] > .k-tree__row .k-tree__icon { color: var(--k-text-brand); }
3223
+ .k-tree__toggle { display: grid; place-items: center; flex-shrink: 0; inline-size: 1.25rem; block-size: 1.25rem; color: var(--k-text-tertiary); transition: rotate var(--k-duration-fast); }
3224
+ /* فلش «بسته» در RTL به چپ اشاره می‌کند */
3225
+ .k-tree__toggle svg { inline-size: 1rem; block-size: 1rem; }
3226
+ [dir="rtl"] .k-tree__toggle svg { scale: -1 1; }
3227
+ .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: 90deg; }
3228
+ [dir="rtl"] .k-tree__item[aria-expanded="true"] > .k-tree__row .k-tree__toggle { rotate: -90deg; }
3229
+ .k-tree__spacer { flex-shrink: 0; inline-size: 1.25rem; }
3230
+ .k-tree__icon { display: inline-grid; flex-shrink: 0; color: var(--k-text-tertiary); }
3231
+ .k-tree__icon svg { inline-size: 1.125rem; block-size: 1.125rem; }
3232
+ .k-tree__label { flex: 1; min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
3233
+ .k-tree__meta { color: var(--k-text-tertiary); font-size: var(--k-text-xs); }
3234
+ .k-tree__item[aria-disabled="true"] > .k-tree__row { color: var(--k-text-quaternary); cursor: not-allowed; }
3235
+ @media (forced-colors: active) {
3236
+ .k-tree__item[aria-selected="true"] > .k-tree__row { outline: 2px solid Highlight; }
3237
+ }
3238
+
2877
3239
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kashi-ui/css",
3
- "version": "0.9.1",
3
+ "version": "0.11.0",
4
4
  "description": "استایل کامپوننت‌های کاشی با CSS خالص — برای هر فریم‌ورکی",
5
5
  "main": "./dist/kashi.css",
6
6
  "style": "./dist/kashi.css",
@@ -21,7 +21,7 @@
21
21
  "build": "node build.mjs"
22
22
  },
23
23
  "dependencies": {
24
- "@kashi-ui/tokens": "^0.9.1"
24
+ "@kashi-ui/tokens": "^0.11.0"
25
25
  },
26
26
  "devDependencies": {
27
27
  "vazirmatn": "^33.0.3"